diff --git a/.gitignore b/.gitignore deleted file mode 100644 index cafce85c9..000000000 --- a/.gitignore +++ /dev/null @@ -1,50 +0,0 @@ -*.gcda -*.gcno -*.gdb -*.o -*~ -.*.swp -.deps -.gdb_history -.gdbinit -.libs -/*.mpers.i -/.version -/CREDITS -/ChangeLog -/aclocal.m4 -/autom4te.cache -/compile -/config.guess -/config.h -/config.h.in -/config.log -/config.status -/config.sub -/configure -/depcomp -/install-sh -/ioctl_redefs[12].h -/ioctls_all[012].h -/ioctlsort[012] -/libmpers-m32.a -/libmpers-mx32.a -/libstrace.a -/missing -/mpers-m32 -/mpers-m32.stamp -/mpers-mx32 -/mpers-mx32.stamp -/mpers.am -/stamp-h1 -/strace -/strace-*.tar.gz -/strace-*.tar.xz -/strace.dsc -/strace.spec -/test-driver -/tests-m32 -/tests-mx32 -Makefile -Makefile.in -core diff --git a/.mailmap b/.mailmap deleted file mode 100644 index b8565ae71..000000000 --- a/.mailmap +++ /dev/null @@ -1,9 +0,0 @@ -# Map git author names and email addresses to canonical/preferred form. - - - - - - - -Eugene Syromyatnikov diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0eba591dc..000000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -language: c - -dist: trusty - -before_install: ./travis-install.sh - -script: ./travis-build.sh - -after_success: ./travis-success.sh - -sudo: required - -git: - depth: 2147483647 - -env: - global: - - SLEEP_A_BIT="sleep 0.2" - - VERBOSE="1" - -matrix: - include: - - compiler: gcc - env: - - TARGET=x86_64 - - COVERAGE=true - - compiler: gcc - env: - - TARGET=x32 - - compiler: gcc - env: - - TARGET=x86 - - compiler: clang-3.6 - env: - - TARGET=x86_64 - - compiler: musl-gcc - env: - - TARGET=x86_64 - - compiler: clang-3.6 - env: - - TARGET=x86 - - compiler: musl-gcc - env: - - TARGET=x86 diff --git a/Android.mk b/Android.mk index 717d60c0d..22267ef45 100644 --- a/Android.mk +++ b/Android.mk @@ -39,8 +39,8 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -strace_version := $(shell grep strace $(LOCAL_PATH)/debian/changelog.in | \ - head -2 | tail -1 | cut -d " " -f 2) +strace_version := $(shell grep strace $(LOCAL_PATH)/debian/changelog | \ + head -1 | cut -d " " -f 2) LOCAL_SRC_FILES := \ access.c \ @@ -64,7 +64,6 @@ LOCAL_SRC_FILES := \ evdev.c \ eventfd.c \ execve.c \ - exit.c \ fadvise.c \ fallocate.c \ fanotify.c \ @@ -127,14 +126,18 @@ LOCAL_SRC_FILES := \ pathtrace.c \ perf.c \ personality.c \ + pkeys.c \ poll.c \ prctl.c \ + print_dev_t.c \ print_mq_attr.c \ print_msgbuf.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 \ @@ -142,6 +145,7 @@ LOCAL_SRC_FILES := \ process.c \ process_vm.c \ ptp.c \ + qualify.c \ quota.c \ readahead.c \ readlink.c \ @@ -153,6 +157,8 @@ LOCAL_SRC_FILES := \ scsi.c \ seccomp.c \ sendfile.c \ + sg_io_v3.c \ + sg_io_v4.c \ sigaltstack.c \ signal.c \ signalfd.c \ @@ -187,11 +193,11 @@ LOCAL_SRC_FILES := \ uname.c \ upeek.c \ userfaultfd.c \ + ustat.c \ util.c \ utime.c \ utimes.c \ v4l2.c \ - vsprintf.c \ wait.c \ xattr.c \ xmalloc.c \ @@ -283,7 +289,9 @@ LOCAL_CFLAGS := \ \ -DMAJOR_IN_SYSMACROS \ -DPACKAGE_NAME='"strace"' \ - -DVERSION='"$(strace_version)"' \ + -DPACKAGE_URL='"https://strace.io"' \ + -DPACKAGE_VERSION='"$(strace_version)"' \ + -DSIZEOF_KERNEL_LONG_T=SIZEOF_LONG \ -DSIZEOF_OFF_T=SIZEOF_LONG \ -DSIZEOF_LONG_LONG=8 \ -DSTDC_HEADERS=1 \ diff --git a/COPYING b/COPYING index e9078d3ed..168a71552 100644 --- a/COPYING +++ b/COPYING @@ -4,6 +4,7 @@ Copyright (c) 1993 Ulrich Pegelow Copyright (c) 1995, 1996 Michael Elizabeth Chastain Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey Copyright (C) 1998-2001 Wichert Akkerman +Copyright (C) 2001-2017 The strace developers. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/CREDITS b/CREDITS new file mode 100644 index 000000000..3bd4be910 --- /dev/null +++ b/CREDITS @@ -0,0 +1,183 @@ +The primary authors of strace were: + + Paul Kranenburg + Branko Lankester + Rick Sladkey + +These people have contributed to strace. Some have reported problems, others +have contributed improvements to the documentation, actual code, provided +information, provided resources, or helped to port strace to new systems. +Those contributions are described in the version control logs and ChangeLog-CVS +file. If your name has been left out, if you'd rather not be listed, or if +you'd prefer a different address be used, please send a note to the +strace-devel@lists.sourceforge.net mailing list. + + Aaron Ucko + Adrien Kunysz + Alexey Neyman + Ali Polatel + Anchit Jain + Andi Kleen + Andre McCurdy + Andreas Schwab + Anton Blanchard + Arkadiusz Miskiewicz + Aurelien Jacobs + Bai Weidong + Bart Van Assche + Ben Noordhuis + Bernhard Reutner-Fischer + Bo Kullmar + Cai Fei + Carlos O'Donell + Carmelo AMOROSO + Chris Dearman + Chris Metcalf + Chris Zankel + Christian Svensson + D.J. Barrow + Damir Shayhutdinov + Daniel P. Berrange + David Daney + David Mosberger-Tang + David S. Miller + David Wilder + David Woodhouse + Denys Vlasenko + Dmitry V. Levin + Douglas Mencken + Dr. David Alan Gilbert + Edgar E. Iglesias + Elliott Hughes + Elvira Khabirova + Erik Johansson + Etienne Gemsa + Eugene Syromyatnikov + Ezequiel Garcia + Fabien Siron + Fei Jie + Felix Janda + Fernando Luis Vazquez Cao + Florian Lohoff + Frederik Schüler + Gabor Gombas + Gabriel Laskar + Ganesan Rajagopal + Gaël Roualland + Giedrius Statkevičius + Gleb Fotengauer-Malinovskiy + Grant Edwards + Greg Banks + H.J. Lu + Heiko Carstens + Helge Deller + Henrik Storner + Holger Hans Peter Freyther + Jacob Goense + Jakub Bogusz + Jakub Jelinek + James Clarke + James Cowgill + James Hogan + James Yang + Jan Kratochvil + JayRJoshi + Jeff Mahoney + Jian Zhen + JingPiao Chen + Joe Ilacqua + Johannes Stezenbach + John Hughes + John Spencer + Ju"rgen Fluk + Juergen Weigert + Katerina Koukiou + Keith Owens + Keith Thompson + Kirill A. Shutemov + Kyle McMartin + Lai JiangShan + Leonard N. Zubkoff + Linus Torvalds + Lubomir Rintel + Luca Clementi + Lupe Christoph + Maarten ter Huurne + Mark Hills + Mark Wielaard + Marty Leisner + Masatake YAMATO + Matt Day + Matthias Pfaller + Max Filippov + Maxim Shchetynin + Maxin B. John + Michael E Chastain + Michael Holzheu + Michael Shigorin + Michail Litvak + Michal Ludvig + Mike Frysinger + Mike Stroyan + Mikulas Patocka + Muttley Meen + Nahim El Atmani + Namhyung Kim + Nate Eldredge + Nate Sammons + Neil Campbell + Paolo Bonzini + Patrik Jakobsson + Paul Mundt + Pavel Machek + Peter Jones + Philippe De Muyter + Philippe Ombredanne + Pádraig Brady + Quentin Monnet + Rajeev V. Pillai + Ralf Baechle + Randolph Chung + Reuben Sumner + Richard Braakman + Richard Henderson + Richard Hirst + Richard W.M. Jones + Roland Borde + Roland McGrath + Sami Farin + Scott Tsai + Sean Stangl + Sebastian Pipping + Seraphime Kirkovski + Sergei Trofimovich + Simon Murray + Solar Designer + Srinivasa Ds + Stanislav Brabec + Stefan Sørensen + Steve Bennett + Steve McIntyre + Szabolcs Nagy + Thanh Ma + Thiemo Seufer + Thomas Bogendoerfer + Thomas De Schampheleire + Tim Yamin + Timo Lindfors + Tom Dyas + Tommi Rantala + Topi Miettinen + Ulrich Drepper + Vicente Olivert Riera + Vineet Gupta + Wang Chao + Wichert Akkerman + William Manley + Xiaoning Ding + Yang Zhiguo + Zach Brown + Zev Weiss + Zhang Le + Zubin Mithra + Марк Коренберг diff --git a/CREDITS.in b/CREDITS.in deleted file mode 100644 index d55f2f81d..000000000 --- a/CREDITS.in +++ /dev/null @@ -1,91 +0,0 @@ -The primary authors of strace were: - - Paul Kranenburg - Branko Lankester - Rick Sladkey - -These people have contributed to strace. Some have reported problems, others -have contributed improvements to the documentation, actual code, provided -information, provided resources, or helped to port strace to new systems. -Those contributions are described in the version control logs and ChangeLog-CVS -file. If your name has been left out, if you'd rather not be listed, or if -you'd prefer a different address be used, please send a note to the -strace-devel@lists.sourceforge.net mailing list. - -##< -## There is no need to list here any name that appears as an Author in -## "git log" output. Those are automatically added when this template -## is used to generate the CREDITS file. -##> -Aaron Ucko ucko@vax1.rockhurst.edu -Adrien Kunysz adrien@kunysz.be -Anton Blanchard anton@samba.org -Arkadiusz Miskiewicz misiek@pld.org.pl -Bai Weidong baiwd@cn.fujitsu.com -Bo Kullmar bk@kullmar.se -Cai Fei caifei@cn.fujitsu.com -D.J. Barrow djbarrow@de.ibm.com -David Mosberger-Tang davidm@hpl.hp.com -David S. Miller davem@caip.rutgers.edu -David Wilder wilder@us.ibm.com -David Woodhouse dwmw2@redhat.com -Douglas Mencken dougmencken@gmail.com -Fernando Luis Vazquez Cao fernando@oss.ntt.co.jp -Florian Lohoff flo@rfc822.org -Gabor Gombas gombasg@sztaki.hu -Ganesan Rajagopal rganesan@myrealbox.com -Gaël Roualland gael.roualland@iname.com -Greg Banks gbanks@pocketpenguins.com -Henrik Storner storner@osiris.ping.dk -Jakub Jelinek jj@ultra.linux.cz -Jeff Mahoney jeffm@suse.com -Jian Zhen zhenjl@gmail.com -Joe Ilacqua spike@world.std.com -Johannes Stezenbach js@sig21.net -Ju"rgen Fluk louis@marco.de -Juergen Weigert jnweiger@immd4.informatik.uni-erlangen.de -Keith Thompson kst@alsys.com -Kyle McMartin kyle@mcmartin.ca -Lai JiangShan laijs@cn.fujitsu.com -Leonard N. Zubkoff lnz@dandelion.com -Linus Torvalds Linus.Torvalds@cs.helsinki.fi -Lupe Christoph lupe@alanya.isar.muc.de -Marty Leisner leisner@sdsp.mc.xerox.com -Matt Day mday@artisoft.com -Matthias Pfaller leo@dachau.marco.de -Maxim Shchetynin maxim@de.ibm.com -Michael E Chastain mec@duracef.shout.net -Michael Holzheu holzheu@de.ibm.com -Michail Litvak mci@owl.openwall.com -Mike Stroyan mike.stroyan@hp.com -Muttley Meen muttley.meen@gmail.com -Nate Eldredge nate@cartsys.com -Paul Mundt lethal@linux-sh.org -Peter Jones pjones@redhat.com -Pádraig Brady P@draigBrady.com -Rajeev V. Pillai rajeevvp@gmail.com -Randolph Chung tausq@debian.org -Reuben Sumner rasumner@undergrad.math.uwaterloo.ca -Richard Braakman dark@xs4all.nl -Richard Henderson richard@twiddle.tamu.edu -Richard Hirst rhirst@linuxcare.com -Roland Borde bo@uebemc.siemens.de -Sami Farin safari@u.safari.iki.fi -Scott Tsai scottt958@yahoo.com.tw -Simon Murray simon@transitive.com -Solar Designer solar@openwall.com -Srinivasa Ds srinivasa@in.ibm.com -Steve Bennett steveb@workware.net.au -Thanh Ma tma@encore.com -Thiemo Seufer ths@networkno.de -Thomas Bogendoerfer tsbogend@bigbug.franken.de -Tim Yamin plasmaroo@gentoo.org -Timo Lindfors timo.lindfors@iki.fi -Tom Dyas tdyas@eden.rutgers.edu -Tommi Rantala ext-tommi.1.rantala@nokia.com -Topi Miettinen Topi.Miettinen@nic.fi -Xiaoning Ding dingxn@gmail.com -Yang Zhiguo yzgcsu@cn.fujitsu.com -Zach Brown zach.brown@oracle.com -Zhang Le zhilg@users.sourceforge.net -Марк Коренберг socketpair@gmail.com diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 000000000..d0bf7d5bf --- /dev/null +++ b/ChangeLog @@ -0,0 +1,33867 @@ +2017-02-14 Dmitry V. Levin + + Prepare for 4.16 release. + * NEWS: Update for 4.16 release. + +2017-02-13 Dmitry V. Levin + + .mailmap: add addresses of JingPiao Chen. + * .mailmap: Add both addresses of JingPiao Chen here to avoid + duplications in CREDITS file. + + tests: skip scno tampering tests on compat mips abi. + * tests/scno_tampering.sh: In case of mips abi, skip the test + unless it is the native abi. + +2017-02-12 Dmitry V. Levin + + Fix -Werror=duplicate-decl-specifier compilation issues. + capability.c:82:28: error: duplicate "const" declaration specifier + capability.c:110:33: error: duplicate "const" declaration specifier + rt_tgsigqueueinfo.c:42:61: error: duplicate "const" declaration specifier + utime.c:66:23: error: duplicate "const" declaration specifier + waitid.c:147:20: error: duplicate "const" declaration specifier + + * capability.c (cap_user_header_t, cap_user_data_t): Remove. + (get_cap_header): Change return type + to "const struct user_cap_header_struct *". + (print_cap_header, print_cap_data): Change the type of last argument + to "const struct user_cap_header_struct * const". + (SYS_FUNC(capget)): Change type of "h" variable + to "const struct user_cap_header_struct *". + (SYS_FUNC(capset)): Change type of "h" variable + to "const struct user_cap_header_struct * const". + * tests/rt_tgsigqueueinfo.c (k_tgsigqueueinfo): Change the type of last + argument to "const void *const". + * tests/utime.c (main): Change the type of "tail_u" variable + to "const struct utimbuf *const". + * tests/waitid.c (do_waitid): Change the type of 3rd argument + to "const siginfo_t *const". + +2017-02-12 Dmitry V. Levin + + tests: rewrite pipe syscall decoding check from match_grep to match_diff + * configure.ac (AC_CHECK_FUNCS): Remove pipe2. + * tests/pipe.c: Include , skip the test if [!__NR_pipe] + instead of [!HAVE_PIPE2]. + (main): Do not call pipe2. + * tests/pipe.test: Skip the test if libc pipe wrapper does not use + pipe syscall, rewrite from match_grep to match_diff. + * tests/pipe.expected: Update expected output. + +2017-02-11 Dmitry V. Levin + + tests: rewrite pipe2 syscall decoding check from match_grep to match_diff + Unlike pipe.test that is based on match_grep, the new test + is based on match_diff and does more rigorous testing. + + * tests/pipe2.c: New file. + * tests/pipe2.test: New test. + * tests/.gitignore: Add pipe2. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add pipe2.test. + +2017-02-10 Dmitry V. Levin + + tests: rewrite mq.test from match_grep to match_diff. + Unlike the previous edition of the test that was based on match_grep, + the new one is match_diff based and does more rigorous testing. + + * tests/mq.c: Include . + (NAME): New macro. + (main): Use it. Print expected output. + * tests/mq.expected: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove mq.expected. + * tests/mq.test: Use run_strace_match_diff. + +2017-02-09 Dmitry V. Levin + + Simplify struct inject_opts.rval semantics. + Drop use of INJECT_OPTS_RVAL_DISABLE special inject_opts.rval value, + INJECT_OPTS_RVAL_DEFAULT is enough. + + * defs.h (INJECT_OPTS_RVAL_DISABLE): Remove. + * qualify.c (qualify_inject_common): Do not replace + INJECT_OPTS_RVAL_DEFAULT with INJECT_OPTS_RVAL_DISABLE + in inject_opts.rval. + * syscall.c (tamper_with_syscall_entering): Check + for INJECT_OPTS_RVAL_DEFAULT instead of INJECT_OPTS_RVAL_DISABLE. + +2017-02-09 Dmitry V. Levin + + tests: check signal injection along with fault injection. + * tests/qual_inject-error-signal.c: New file. + * tests/qual_inject-error-signal.expected: Likewise. + * tests/qual_inject-error-signal.test: New test. + * tests/.gitignore: Add qual_inject-error-signal. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (MISC_TESTS): Add qual_inject-error-signal.test. + (EXTRA_DIST): Add qual_inject-error-signal.expected. + + tests: simplify qual_inject-signal.test. + * tests/qual_inject-signal.test: Use $NAME instead of qual_inject-signal. + +2017-02-09 Dmitry V. Levin + + Make symbolic errno values match case-insensitive. + Follow the example of case-insensitive symbolic signal values in signal + and inject expressions and make symbolic errno values in inject + expressions case-insensitive. + + * qualify.c (find_errno_by_name): Use strcasecmp instead of strcmp + to match symbolic errno values. + * tests/qual_fault.c (main): Likewise. + * tests/qual_fault.test: Test case-insensitive symbolic errno match. + +2017-02-09 Dmitry V. Levin + + tests: check case-insensitive symbolic signal match. + * tests/qual_signal.test: Test case-insensitive symbolic signal match. + +2017-02-09 Eugene Syromyatnikov + + Update NEWS. + +2017-02-08 Dmitry V. Levin + + Update NEWS. + +2017-02-08 Dmitry V. Levin + + strace.spec.in: fix dist version checks. + * strace.spec.in: Fix libunwind availability check. + + Reported-by: Eugene Syromyatnikov + +2017-02-08 Dmitry V. Levin + + tests: update ipc_sem.test for new glibc. + Starting with commit glibc-2.24-553-g40c0a78, glibc may pass NULL + address to semctl like other libcs. + + * tests/ipc_sem.c (main) [__GLIBC__]: Remove. + +2017-02-08 Dmitry V. Levin + + tests: fix typo in bpf.test. + * tests/bpf.c (main): Add missing semicolon. + + Fixes: ad427721 ("tests: rewrite bpf.test from match_grep to match_diff") + +2017-02-08 Dmitry V. Levin + + tests: check signal injection. + * tests/qual_inject-signal.c: New file. + * tests/qual_inject-signal.expected: Likewise. + * tests/qual_inject-signal.test: New test. + * tests/.gitignore: Add qual_inject-signal. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (MISC_TESTS): Add qual_inject-signal.test. + (EXTRA_DIST): Add qual_inject-signal.expected. + +2017-02-08 Dmitry V. Levin + + Implement -e inject= option. + Introduce -e inject= as a general injection option, + limit -e fault= option to syscall fault injection. + + Change default return code of syscall fault injection to ENOSYS. + + * qualify.c (parse_inject_token): Add fault_tokens_only argument, + do not accept retval= and signal= tokens when fault_tokens_only + is set to true. + (parse_inject_expression): Add fault_tokens_only argument, + forward it to parse_inject_token. + (qualify_inject_common): New function. + (qualify_fault): Use it. + (qualify_inject): New function. + (qual_options): New entry. + * strace.1: Describe -e inject= option. + * NEWS: Mention -e inject= option. + * tests/qual_fault-syntax.test: Test that -e fault= option does not + support retval=, signal=, and multiple error= tokens. + * tests/qual_fault.c (DEFAULT_ERRNO): Set to ENOSYS unconditionally. + * tests/qual_inject-retval.test: Replace -e fault= option + with -e inject= option. + * tests/qual_inject-syntax.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + +2017-02-08 Dmitry V. Levin + + tests: prepare for introduction of -e inject= option. + Rename files related to fault injection to avoid further confusion. + + * tests/fault_injection-exit_group.expected: Rename + to tests/qual_fault-exit_group.expected. + * tests/fault_injection-exit_group.test: Rename + to tests/qual_fault-exit_group.test. + * tests/fault_syntax.test: Rename to tests/qual_fault-syntax.test. + * tests/fault_injection.c: Rename to tests/qual_fault.c. + * tests/fault_injection.test: Rename to tests/qual_fault.test. + * tests/fault_injection-retval.c: Rename to tests/qual_inject-retval.c. + * tests/fault_injection-retval.test: Rename + to tests/qual_inject-retval.test. + * tests/fault_injection.sh: Rename to tests/scno_tampering.sh. + * tests/.gitignore: Update. + * tests/Makefile.am (check_PROGRAMS, DECODER_TESTS, MISC_TESTS, + EXTRA_DIST): Update. + +2017-02-08 Dmitry V. Levin + + Prepare for introduction of -e inject= option. + As -e fault= injection syntax has been extended to configure various + kinds of injections besides fault injection, the original option name + bacame too narrow. + + This change renames internal constants, types, and functions from + "fault" to more generic inject/tamper ones. + + * defs.h (fault_opts): Rename to inject_opts. + (FAULT_OPTS_RVAL_DEFAULT): Rename to INJECT_OPTS_RVAL_DEFAULT. + (FAULT_OPTS_RVAL_DISABLE): Rename to INJECT_OPTS_RVAL_DISABLE. + (struct tcb): Rename fault_vec field to inject_vec. + (TCB_FAULT_INJ): Rename to TCB_TAMPERED. + (QUAL_FAULT): Rename to QUAL_INJECT. + (fault_vec): Rename to inject_vec. + All users changed. + * qualify.c (fault_set): Rename to inject_set. + (parse_fault_token): Rename to parse_inject_token. + (parse_fault_expression): Rename to parse_inject_expression. + All callers changed. + * syscall.c (fault_vec): Rename to inject_vec. + (tcb_fault_opts): Rename to tcb_inject_opts. + (inject_syscall_fault_entering): Rename to tamper_with_syscall_entering. + (update_syscall_fault_exiting): Rename to tamper_with_syscall_exiting. + (syscall_fault_injected): Rename to syscall_tampered. + All callers changed. + +2017-02-07 Dmitry V. Levin + + tests: make Makefile.am lists sorted in C locale. + * tests/Makefile.am (check_PROGRAMS, DECODER_TESTS, MISC_TESTS, + EXTRA_DIST): Make sorted in C locale. + +2017-02-07 Dmitry V. Levin + + tests: use ARG_STR in msg_control.test. + Drop local VAL_STR macro in favour of ARG_STR macro from tests/tests.h. + + * tests/msg_control.c (VAL_STR): Remove. + (test_sol_socket, test_sol_ip): Replace VAL_STR with ARG_STR. + +2017-02-07 Dmitry V. Levin + + powerpc, powerpc64: wire up new syscalls. + * linux/powerpc/syscallent.h [382]: Add kexec_file_load entry. + * linux/powerpc64/syscallent.h [382]: Likewise. + + microblaze: wire up new syscalls. + * linux/microblaze/syscallent.h [392..397]: New entries. + + avr32: wire up new syscalls. + * linux/avr32/syscallent.h [328..330]: New entries. + +2017-02-06 Dmitry V. Levin + + Update IPV6_* constants. + * xlat/sockipv6options.in: Add IPV6_RECVFRAGSIZE introduced + by linux kernel commit v4.10-rc1~202^2~340^2~1. + + Update IP_* constants. + * xlat/sockipoptions.in: Add IP_RECVFRAGSIZE introduced + by linux kernel commit v4.10-rc1~202^2~340^2~2. + +2017-02-06 Jacob Goense + + or1k: fix build. + This fixes a typo in the arch_set_success for the or1k architecture. + + * linux/or1k/set_error.c (arch_setsuccess): Rename to arch_set_success. + + Fixes: 41d647c ("Implement success injection") + Closes: https://github.com/strace/strace/pull/6 + +2017-02-04 Gleb Fotengauer-Malinovskiy + + Update ioctl entries from linux 4.10. + * linux/32/ioctls_inc_align16.h: Update from linux v4.10 using ioctls_gen.sh. + * linux/32/ioctls_inc_align32.h: Likewise. + * linux/32/ioctls_inc_align64.h: Likewise. + * linux/64/ioctls_inc.h: Likewise. + * linux/x32/ioctls_inc0.h: Likewise. + * NEWS: Mention this. + + maint: update for linux 4.10. + * maint/ioctls_sym.sh: Update workaround for linux/if_pppox.h file. + + maint: add workaround for m68k. + * maint/ioctls_sym.sh: Skip asm/amigayle.h. + +2017-01-31 Dmitry V. Levin + + tests: check decoding of bpf corner cases. + * tests/bpf.c (bogus_bpf): New function. + (BOGUS_BPF): New macro. + (main): Use them. + * tests/bpf.test: Add -a option. + +2017-01-29 Dmitry V. Levin + + tests: rewrite bpf.test from match_grep to match_diff. + * tests/bpf.c (errstr): New variable. + (sys_bpf): New function. + (map_create, map_any, prog_load, obj_manage, prog_cgroup): Use it. + (main): Update expected output. + * tests/bpf.test: Use run_strace_match_diff. + + bpf: move common code to a separate function. + * bpf.c (bpf_prog_attach_detach): New function. + (bpf_prog_attach, bpf_prog_detach): Use it. + +2017-01-29 Quentin Monnet + + Update bpf syscall decoding. + Implement decoding of BPF_OBJ_PIN, BPF_OBJ_GET, BPF_PROG_ATTACH, + and BPF_PROG_DETACH commands. + + * bpf.c: Include "xlat/bpf_attach_type.h". + (bpf_obj_manage, bpf_prog_attach, bpf_prog_detach): New functions. + (SYS_FUNC(bpf)): Use them. + * configure.ac: Check for union bpf_attr.bpf_fd and union + bpf_attr.attach_type. + * xlat/bpf_attach_type.in: New file. + * xlat/bpf_commands.in: Update list of BPF_* command constants. + * xlat/bpf_map_types.in: Update list of BPF_MAP_TYPE_* constants. + * xlat/bpf_prog_types.in: Update list of BPF_PROG_TYPE_* constants. + * tests/bpf.c [HAVE_UNION_BPF_ATTR_BPF_FD] (obj_manage): New function. + [HAVE_UNION_BPF_ATTR_ATTACH_TYPE] (prog_cgroup): Likewise. + (main): Use them. + +2017-01-28 Elvira Khabirova + + tests: check success injection. + * tests/fault_injection-retval.c: New file. + * tests/fault_injection-retval.test: New test. + * tests/.gitignore: Add fault_injection-retval. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (MISC_TESTS): Add fault_injection-retval.test. + +2017-01-28 Elvira Khabirova + + Implement success injection. + This extends fault injection syntax with :retval= option. + When :retval=VALUE is specified, the syscall number is replaced by -1 + and a bogus success VALUE is returned to the callee. + + * defs.h (fault_opts): Remove err field, add rval field. + (MAX_ERRNO_VALUE, FAULT_OPTS_RVAL_DEFAULT, FAULT_OPTS_RVAL_DISABLE): + New macros. + * qualify.c (parse_fault_token): Handle retval= token. + (qualify_fault): Update fault_opts initialization after the move + from struct fault_opts.err to struct fault_opts.rval. + * syscall.c (arch_set_success): New prototype. + (inject_syscall_fault_entering): Check opts->rval instead of opts->err. + (update_syscall_fault_exiting): Implement retval injection. + * strace.1: Update the section on fault injection. + * NEWS: Mention retval= option. + * linux/aarch64/set_error.c (arch_set_success): New function. + * linux/alpha/set_error.c: Likewise. + * linux/arc/set_error.c: Likewise. + * linux/arm/set_error.c: Likewise. + * linux/avr32/set_error.c: Likewise. + * linux/bfin/set_error.c: Likewise. + * linux/crisv10/set_error.c: Likewise. + * linux/hppa/set_error.c: Likewise. + * linux/i386/set_error.c: Likewise. + * linux/ia64/set_error.c: Likewise. + * linux/m68k/set_error.c: Likewise. + * linux/metag/set_error.c: Likewise. + * linux/microblaze/set_error.c: Likewise. + * linux/mips/set_error.c: Likewise. + * linux/nios2/set_error.c: Likewise. + * linux/or1k/set_error.c: Likewise. + * linux/powerpc/set_error.c: Likewise. + * linux/riscv/set_error.c: Likewise. + * linux/s390/set_error.c: Likewise. + * linux/sh/set_error.c: Likewise. + * linux/sh64/set_error.c: Likewise. + * linux/sparc/set_error.c: Likewise. + * linux/sparc64/set_error.c: Likewise. + * linux/tile/set_error.c: Likewise. + * linux/x86_64/set_error.c: Likewise. + * linux/xtensa/set_error.c: Likewise. + + Closes: https://github.com/strace/strace/issues/3 + +2017-01-26 Dmitry V. Levin + + mips: rewrite configure check without sgidefs.h. + Use builtin macros provided by gcc >= 3.4 instead of sgidefs.h macros. + + * configure.ac : Do not include , use _ABIO32 + instead of _MIPS_SIM_ABI32, _ABIN32 instead of _MIPS_SIM_NABI32, + and _ABI64 instead of _MIPS_SIM_ABI64. + +2017-01-20 Elvira Khabirova + + .gitignore: add missing files that should be ignored. + * .gitignore: Add /ioctl_iocdef.[ih]. + + Fixes: 5679fad ("ioctlsort: get ioctl definitions from host, not build") + +2017-01-20 Andre McCurdy + + mips: use + Build fix for MIPS with musl libc. + + The MIPS specific header is provided by glibc and uclibc + but not by musl. Regardless of the libc, the kernel headers provide + which provides the same definitions, so use that + instead. + + * configure.ac: Replace with . + +2017-01-20 JingPiao Chen + + Implement decoding of ustat syscall. + * configure.ac (AC_CHECK_HEADERS): Add ustat.h. + * ustat.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/dummy.h: Remove sys_ustat. + * tests/ustat.c: New file. + * tests/ustat.test: New test. + * tests/.gitignore: Add ustat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ustat.test. + + Makefile.am: allow indented DEF_MPERS_TYPE includes. + * Makefile.am (m%_type_defs.h): Change sed regular expression to allow + arbitrary number of whitespace characters between "#" symbol + and "include" directive. + + strace.1: fix formatting. + * strace.1: Remove misplaced .TP macros. + +2017-01-13 Dmitry V. Levin + + tests: drop non-USE_ASM_STAT case support. + With the switch of fstatat family tests to USE_ASM_STAT variant, + there are no non-USE_ASM_STAT users left. Remove support of unused + non-USE_ASM_STAT case. + + * configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_mtim.tv_nsec. + * tests/fstatat.c (USE_ASM_STAT): Remove. + * tests/fstatx.c: Likewise. + * tests/lstatx.c: Likewise. + * tests/xstatx.c: Assume USE_ASM_STAT. + [!USE_ASM_STAT]: Remove. + +2017-01-13 Dmitry V. Levin + + tests: call newfstatat and fstatat64 syscalls directly. + Do not use glibc wrappers to call newfstatat and fstatat64. + These wrappers have various problems, e.g. they segfault on sparc64 + and mips64 if BOGUS_STRUCT_STAT is not disabled, and they do wrong + conversion of timestamps on mips64. + + * tests/fstatat.c (TEST_SYSCALL_INVOKE): Invoke the relevant syscall + directly. + (USE_ASM_STAT): Define. + * tests/fstatat64.c (TEST_BOGUS_STRUCT_STAT): Remove. + (STRUCT_STAT, STRUCT_STAT_STR, STRUCT_STAT_IS_STAT64): Define. + + Based on patch by James Cowgill . + +2017-01-13 Dmitry V. Levin + + tests: remove redundant SAMPLE_SIZE definitions. + Remove all definitions of SAMPLE_SIZE that are identical to the fallback + definition in tests/xstatx.c. + + * tests/fstat64.c (SAMPLE_SIZE): Remove. + * tests/lstat64.c (SAMPLE_SIZE): Remove. + * tests/stat64.c (SAMPLE_SIZE): Remove. + +2017-01-13 Dmitry V. Levin + + tests: change SAMPLE_SIZE type to libc_off_t. + As ftruncate libc function and our create_sample function that calls + ftruncate both take size argument of type libc_off_t, change the type + of SAMPLE_SIZE constant to libc_off_t. + + * tests/fstat.c (SAMPLE_SIZE): Cast to libc_off_t. + * tests/lstat.c (SAMPLE_SIZE): Likewise. + * tests/oldfstat.c (SAMPLE_SIZE): Likewise. + * tests/oldlstat.c (SAMPLE_SIZE): Likewise. + * tests/oldstat.c (SAMPLE_SIZE): Likewise. + * tests/stat.c (SAMPLE_SIZE): Likewise. + * tests/xstatx.c (SAMPLE_SIZE): Likewise. + +2017-01-13 Alexey Neyman + + ioctlsort: get ioctl definitions from host, not build. + When cross-compiling, ioctlsort must obtain _IOC_* values from the + host, build's values may be incompatible. + + * ioctl_iocdef.c: New file. + * Makefile.am (EXTRA_DIST): Add it. + (ioctl_iocdef.i, ioctl_iocdef.h): New rules. + (ioctlsort%.o): Depend on ioctl_iocdef.h. + (CLEANFILES): Add ioctl_iocdef.h and ioctl_iocdef.i. + * ioctlsort.c: Include "ioctl_iocdef.h" instead of . + +2017-01-13 Dmitry V. Levin + + tests: treat struct stat mismatch as an error. + If the test detects struct stat mismatch, this is likely an error + in definitions of a stat structure that might affect strace as well. + Fail the test instead of skipping it to attract more attention. + + * tests/xstatx.c (main): Return 1 instead of 77 + in case of struct stat mismatch. + +2017-01-12 Dmitry V. Levin + + tests: rewrite diagnostics about struct stat mismatch. + * tests/xstatx.c (LOG_STAT_OFFSETOF_SIZEOF): New macro. + (main): Use it to print struct stat mismatch details. + + tests: fix typo in tests/xstatx.c. + * tests/xstatx.c [!IS_FSTAT]: Define IS_FSTAT instead of IS_STAT. + +2017-01-12 JingPiao Chen + + tests: fix typo in mlock.c. + * tests/mlock.c [!(__NR_mlock && __NR_munlock)]: Fix spelling + of SKIP_MAIN_UNDEFINED. + +2017-01-12 JingPiao Chen + + strace: move description of -k option to the appropriate place. + Follow the example of strace.1 and put the description of -k option + into the output format group. + + * strace.c (usage): Move description of -k option to the output + format group. + +2017-01-11 Dmitry V. Levin + + Remove redundant commas at the end of structure initializers. + Automatically remove redundant commas using the following + sed expression: + + git grep -El ',[[:space:]]+}' |xargs sed -ri 's/,([[:space:]]+\})/\1/' + + * linux/32/syscallent.h: Remove redundant commas at the end of structure + initializers. + * linux/64/syscallent.h: Likewise. + * linux/alpha/syscallent.h: Likewise. + * linux/arm/syscallent.h: Likewise. + * linux/avr32/syscallent.h: Likewise. + * linux/bfin/syscallent.h: Likewise. + * linux/crisv10/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/microblaze/userent.h: Likewise. + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-n64.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/powerpc64/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/xtensa/syscallent.h: Likewise. + * tests/kexec_file_load.c: Likewise. + + Reported-by: Eugene Syromyatnikov + +2017-01-10 Dmitry V. Levin + + tests: check decoding of scsi ioctl commands. + * tests/ioctl_scsi.c: New file. + * tests/ioctl_scsi.test: New test. + * tests/.gitignore: Add ioctl_scsi. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_scsi.test. + + scsi: implement decoding of all SG_* ioctl commands. + * print_sg_req_info.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * xlat/sg_scsi_reset.in: New file. + * scsi.c: Include "xlat/sg_scsi_reset.h". + (scsi_ioctl): Implement decoding of all SG_* ioctl commands. + + scsi: prepare for decoding of other SG_* ioctl commands. + * scsi.c (scsi_ioctl): Introduce a switch statement. + + tests: check decoding of ioctl SG_IO v3 commands. + * tests/ioctl_sg_io_v3.c: New file. + * tests/ioctl_sg_io_v3.test: New test. + * tests/.gitignore: Add ioctl_sg_io_v3. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_sg_io_v3.test. + + tests: check decoding of ioctl SG_IO v4 commands. + * tests/ioctl_sg_io_v4.c: New file. + * tests/ioctl_sg_io_v4.test: New test. + * tests/.gitignore: Add ioctl_sg_io_v4. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_sg_io_v4.test. + +2017-01-10 Dmitry V. Levin + + scsi: add fallback definitions for SG_* ioctl command constants. + Unfortunately, from libc does not provide all constants + recognized by the kernel. + + * xlat/scsi_sg_commands.in: New file. + * scsi.c: Include "xlat/scsi_sg_commands.h" instead of providing + a fallback definition of SG_IO. + +2017-01-10 Dmitry V. Levin + + xlat: provide fallback definitions for BSG_FLAG_* constants. + BSG_FLAG_* constants were introduced later than the header file where + they are defined. + + * xlat/bsg_flags.in: Add default values for constants. + +2017-01-10 Dmitry V. Levin + + xlat: provide fallback definitions for SG_FLAG_* constants. + Unfortunately, from libc does not provide all constants + recognized by the kernel. + + * xlat/sg_io_flags.in: Add default values for constants. + +2017-01-10 Dmitry V. Levin + + sg_io_v4: print din_resid and dout_resid fields as signed integers. + * sg_io_v4.c (decode_response): Print din_resid and dout_resid fields + using %d format. + +2017-01-10 Dmitry V. Levin + + sg_io: cleanup printing of sg_io buffers. + Turn print_sg_io_buffer into a universal sg_io buffer printer. + + * sg_io_v3.c (print_sg_io_buffer): Add iovec_count argument. + Call tprint_iov_upto when iovec_count is non-zero. + (decode_request, decode_response): Do not call tprint_iov_upto directly, + use print_sg_io_buffer instead. + * sg_io_v4.c: Likewise. + +2017-01-10 Dmitry V. Levin + + sg_io: decode structures on exiting syscall in case of syserror. + The SCSI driver, starting with kernel commit v2.6.25-rc1~1230^2~78, + translates its "struct request.errors" to ioctl errors after + filling in all the output members of the SG_IO header structure. + + As there is no easy way to tell SCSI layer errors from other syscall + errors, decode the structure on exiting syscall in case of syserror, + too. + + * scsi.c (scsi_ioctl): Do not call set_tcb_priv_ulong, use + get_tcb_priv_data instead of get_tcb_priv_ulong, call decode_sg_io + unconditionally. + * sg_io_v3.c (decode_request): Save a copy of struct_sg_io_hdr using + set_tcb_priv_data. + (decode_response): Restore it using get_tcb_priv_data. Print its i/o + fields when umove call fails. Pass IOV_DECODE_STR to tprint_iov_upto + unconditionally. + * sg_io_v4.c (decode_request): Save a copy of struct sg_io_v4 using + set_tcb_priv_data. + (decode_response): Restore it using get_tcb_priv_data. Print its i/o + fields when umove call fails. Pass IOV_DECODE_STR to tprint_iov_upto + unconditionally. + +2017-01-08 Dmitry V. Levin + + sg_io: reorder printing of fields to follow structure order. + * sg_io_v4.c (decode_request): Print timeout, flags, and usr_ptr fields + after dout_xferp field. + + sg_io_v3: print sg_io_hdr.duration field as unsigned integer. + * sg_io_v3.c (decode_response): Print duration field using %u format. + + sg_io_v3: print msg_status field. + * sg_io_v3.c (decode_response): Print msg_status field. + + sg_io: print names of array fields and corresponding length fields. + * sg_io_v3.c (decode_request): Print names of cmd_len, cmdp, + and dxferp fields. + (decode_response): Print names of dxferp, sb_len_wr, and sbp fields. + * sg_io_v4.c (decode_request): Print names of request_len, request, + dout_xfer_len, and dout_xferp fields. + (decode_response): Print names of response_len, response, + and din_xferp fields. + +2017-01-08 Dmitry V. Levin + + sg_io_v3: print status fields using %#x format specifier. + The formerly used format string %02x led to misleading output as there + was no clear indication sometimes whether the printed integer was + decimal or hexadecimal. + + * sg_io_v3.c (decode_response): Print status and masked_status fields + using %#x format specifier instead of %02x. + +2017-01-08 Dmitry V. Levin + + sg_io_v4: print status fields in a hexadecimal form. + The tradition is to print scsi status codes in a hexadecimal form. + + * sg_io_v4.c (decode_response): Print driver_status, transport_status, + and device_status fields using %#x format specifier instead of %u. + +2017-01-08 Dmitry V. Levin + + sg_io_v4: print request_tag and generated_tag fields in hex. + The tradition is to print scsi tags in a hexadecimal form. + + * sg_io_v4.c (decode_request): Print request_tag field + using ("%#" PRI__x64) format string. + (decode_response): Print generated_tag field using ("%#" PRI__x64) + format string. + +2017-01-08 Dmitry V. Levin + + sg_io_v4: print usr_ptr field in a hexadecimal form. + As the nature of this field is pointer-like, print it + in a hexadecimal form. + + * sg_io_v4.c (decode_request): Print usr_ptr field + using ("%#" PRI__x64) format string. + +2017-01-08 Dmitry V. Levin + + sg_io_v4: do not print spare_in and spare_out fields. + As the kernel does not touch these fields, there is no use + to print them. + + * sg_io_v4.c (decode_request): Do not print spare_in field. + (decode_response): Do not print spare_out field. + +2017-01-08 Dmitry V. Levin + + sg_io: decode struct sg_io_hdr.info and struct sg_io_v4.info. + Print struct sg_io_hdr.info and struct sg_io_v4.info using printflags. + + * xlat/sg_io_info.in: New file. + * defs.h (sg_io_info): New xlat prototype. + * sg_io_v3.c: Include "xlat/sg_io_info.h". + (decode_response): Print struct_sg_io_hdr.info using printflags. + * sg_io_v4.c: (decode_response): Print struct sg_io_v4.info + using printflags. + +2017-01-08 Dmitry V. Levin + + sg_io: decode struct sg_io_hdr.flags and struct sg_io_v4.flags. + Print struct sg_io_hdr.flags and struct sg_io_v4.flags using printflags. + + * xlat/sg_io_flags.in: New file. + * sg_io_v3.c: Include "xlat/sg_io_flags.h". + (decode_request): Print struct_sg_io_hdr.flags using printflags. + * xlat/bsg_flags.in: New file. + * sg_io_v4.c: Include "xlat/bsg_flags.h". + (decode_request): Print struct sg_io_v4.flags using printflags. + +2017-01-08 Dmitry V. Levin + + Mpersify struct sg_io_hdr. + struct sg_io_hdr contains pointers and therefore has to be mpersified. + + * defs.h (decode_sg_io_v3): Remove prototype. + * sg_io_v3.c (struct_sg_io_hdr): Typedef to struct sg_io_hdr. + Mpersify it. + (decode_sg_io_v3): Wrap into MPERS_PRINTER_DECL. + +2017-01-08 Dmitry V. Levin + + Split scsi.c. + Move decoders of SG_IO v3 and v4 APIs into separate files, + compile generic SG_IO decoder unconditionally. + + * sg_io_v3.c: New file. + * sg_io_v4.c: Likewise. + * Makefile.am (strace_SOURCES): Add them. + * defs.h (decode_sg_io_v3, decode_sg_io_v4): New prototypes. + * ioctl.c (ioctl_decode): Remove [HAVE_SCSI_SG_H] condition. + * scsi.c: (print_sg_io_res): Remove. + (print_sg_io_req): Rename to decode_sg_io, replace print_sg_io_v3_req + with decode_sg_io_v3, replace print_sg_io_v4_req with decode_sg_io_v4, + compile uncoditionally. + (scsi_ioctl): Replace print_sg_io_req and print_sg_io_res + with decode_sg_io, compile uncoditionally. + Move [HAVE_SCSI_SG_H] code to sg_io_v3.c. + Move [HAVE_LINUX_BSG_H] code to sg_io_v4.c. + +2017-01-07 Dmitry V. Levin + + scsi: detect and print changes of interface id. + * scsi.c (print_sg_io_v3_res): Detect and print changes + of struct sg_io_hdr.interface_id field between entering and exiting + syscall. + (print_sg_io_v4_res): Detect and print changes of struct sg_io_v4.guard + field between entering and exiting syscall. + + scsi: print field names of all fields being printed. + * scsi.c (print_sg_io_v3_req): Always print the name + of struct sg_io_hdr.interface_id field. + (print_sg_io_v4_req): Always print the name of struct sg_io_v4.guard + field. + (print_sg_io_req): Print unknown interface id as an integer. + (scsi_ioctl): Save interface id on entering syscall and use it + on exiting syscall. + + scsi: print struct sg_io_hdr.dxfer_direction field name. + * scsi.c (print_sg_io_v3_req): Print struct sg_io_hdr.dxfer_direction + field name. + + scsi: print "protocol" and "subprotocol" field names of struct sg_io_v4. + * scsi.c (print_sg_io_v4_req): Print field names + of struct sg_io_v4.protocol and struct sg_io_v4.subprotocol. + +2017-01-07 Dmitry V. Levin + + Print hexadecimal integer in error diagnostics using %#x. + The formerly used format string %x led to misleading output as there was + no clear indication sometimes whether the printed integer was decimal or + hexadecimal. + + * aio.c (startup_child, test_ptrace_seize): Print status + using %#x format specifier instead of %x. + +2017-01-07 Dmitry V. Levin + + aio: print hexadecimal integer using %#x. + The formerly used format string %x led to misleading output as there was + no clear indication sometimes whether the printed integer was decimal or + hexadecimal. + + * aio.c (print_common_flags): Print struct iocb.aio_flags using %#x + format specifier instead of %x. + * tests/aio.c (main): Likewise. + +2017-01-06 Dmitry V. Levin + + scsi: rewrite print_sg_io_buffer using printstr_ex(QUOTE_FORCE_HEX) + As printstr_ex has got QUOTE_FORCE_HEX flag support, there is no need + to implement it manually any longer. + + * scsi.c (print_uchar): Remove. + (print_sg_io_buffer): Rewrite using printstr_ex(QUOTE_FORCE_HEX). + +2017-01-06 Eugene Syromyatnikov + + getrandom: print string as hex-escaped. + Since there is no reason to interpret the value returned by getrandom as + ASCII string, it makes sense to always print it as a hex-escaped string. + + * getrandom.c (SYS_FUNC(getrandom)): Use printstr_ex instead + of printstrn, set QUOTE_FORCE_HEX in user_style parameter in order + to force hex-escaped string formatting. + * tests/getrandom.test: Remove no longer needed -xx flag as the string + is always printed in hexadecimal format now. + + Suggested-by: JingPiao Chen + +2017-01-06 Eugene Syromyatnikov + + util: add support for forcing printing string as hex-escaped. + This could be useful in cases when some binary data should not be + interpreted as an ASCII string, but rather as an array of byte values. + + * defs.h (QUOTE_FORCE_HEX): New macro constant. + * util.c (quote_string): Enable use_hex when QUOTE_FORCE_HEX is set + in user_style parameter. + +2017-01-06 Eugene Syromyatnikov + + term: do not abort decoding in case of non-verbose output. + The case of unset verbose is handled by umoven_or_printaddr, moreover, + exiting at this point is plain wrong and leads to last argument not + being printed while it should be. + + * term.c (decode_termios, decode_termio, decode_winsize, decode_ttysize, + decode_modem_flags): Do not check verbose flags explicitly and do not + exit early if it is not set. + +2017-01-05 Dmitry V. Levin + + tests: skip fault injection tests on hppa if the kernel is too old. + * tests/fault_injection.sh: Add the minimal kernel version for hppa. + +2017-01-05 Dmitry V. Levin + + tests: skip readahead.test on MIPS n64 when built with glibc < 2.25. + Due to a bug in glibc readahead syscall wrapper on MIPS n64, + this wrapper cannot be used in readahead.test. + + * tests/readahead.c [HAVE_READAHEAD && LINUX_MIPSN64 && glibc < 2.25]: + Undefine HAVE_READAHEAD. + + Reported-by: James Cowgill + +2017-01-05 Dmitry V. Levin + + tests: replace init_magic with fill_memory. + Use the same fill_memory/fill_memory_ex interface in all affected tests. + + * tests/ioctl_block.c (init_magic): Remove. + (main): Replace init_magic with fill_memory. + * tests/ioctl_evdev.c: Likewise. + * tests/ioctl_v4l2.c: Likewise. + * tests/ioctl_mtd.c (magic, init_magic): Remove. + (main): Replace init_magic with fill_memory. + * tests/ioctl_rtc.c: Likewise. + +2017-01-05 Dmitry V. Levin + + tests: rewrite ioctl_v4l2 test without reliance on init_magic. + * tests/ioctl_v4l2.c (cc0, cc1, cc2, cc3, fourcc): New macros. + (main): Use them. Rewrite expected output without assumptions + on any particular magic data. + +2017-01-04 Dmitry V. Levin + + tests: remove redundant casts in fill_memory{,_ex} invocations. + * tests/ioctl_loop.c (main): Remove redundant casts of fill_memory + first argument. + * tests/kexec_load.c (main): Likewise. + * tests/perf_event_open.c (main): Likewise. + * tests/quotactl.c (main): Likewise. + * tests/mq_sendrecv.c (main): Remove redundant casts of fill_memory_ex + first argument. + * tests/quotactl-xfs.c (main): Likewise. + +2017-01-04 Dmitry V. Levin + + tests: change the type of fill_memory{,_ex} first argument to void * + As these functions behave like memset, it's more convenient to have + the first argument of type void * like memset. + + * tests/fill_memory.c (fill_memory, fill_memory_ex): Change the type + of first argument from "char *" to "void *". + * tests/tests.h (fill_memory, fill_memory_ex): Likewise. + +2017-01-04 Eugene Syromyatnikov + + tests: check non-verbose decoding of LOOP_* ioctls. + * tests/ioctl_loop-nv.c: New file. + * tests/ioctl_loop-nv.test: New test. + * tests/ioctl_loop.c [!ABBREV] (ABBREV): Define to 0. + (print_loop_info, print_loop_info64): Handle [ABBREV != 0] case. + * tests/.gitignore: Add ioctl_loop-nv. + * tests/Makefile.am (check_PROGRAMS): Likewise. + + tests: add more checks of LOOP_* ioctls decoding. + * tests/ioctl_loop.c: Include . + (magic, lmagic): Move static constants ... + (main): ... here. Change types of magic constants to kernel_ulong_t. + Add more checks. + +2017-01-04 JingPiao Chen + Eugene Syromyatnikov + + tests: check decoding of LOOP_* ioctls. + * tests/ioctl_loop.c: New file. + * tests/ioctl_loop-v.c: Likewise. + * tests/ioctl_loop.test: New test. + * tests/ioctl_loop-v.test: Likewise. + * tests/.gitignore: Add ioctl_loop and ioctl_loop-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_loop.test and ioctl_loop-v.test. + +2017-01-04 Dmitry V. Levin + + Drop vsprintf.c. + Drop custom vfprintf implementation that was disabled by default. + Apparently nobody tests strace with this vfprintf enabled, otherwise + multiple uses of format specifiers not supported by this custom vfprintf + would not left unnoticed. + + The GNU C library is not the only libc available, so those who want + faster implementations of libc functions are encouraged to try building + strace with other libc implementations. + + * vsprintf.c: Remove. + * Makefile.am (strace_SOURCES): Remove vsprintf.c. + * defs.h (USE_CUSTOM_PRINTF, strace_vfprintf): Remove. + * strace.c (tprintf): Replace strace_vfprintf with vfprintf. + +2017-01-04 Eugene Syromyatnikov + + loop: remove unnecessary verbose check. + The verbose flag is responsible for dereferencing of addresses, and it + is perfectly handled by umove_or_printaddr; moreover, this early exit + leads to incorrect formatting of last argument. + + * loop.c (loop_ioctl): Do not check verbose flag explicitly and do not + exit early if it is not set. + +2017-01-04 Eugene Syromyatnikov + + loop: fix lo_encrypt_key field output. + lo_encrypt_key is a sized string with its size specified by + lo_encrypt_key_size field, so take lo_encrypt_key_size into account. + + * loop.c (decode_loop_info, decode_loop_info64): Use minimum of + LO_KEY_SIZE and lo_encrypt_key_size field value as lo_encrypt_key size. + +2017-01-04 Eugene Syromyatnikov + + loop: print lo_encrypt_key_size field of struct loop_info as unsigned. + It is converted to an unsigned value in kernel (see loop_info64_from_old + in drivers/block/loop.c), so let's print it that way despite its type. + + * loop.c (decode_loop_info): Print lo_encrypt_key_size as an uint32_t + value. + +2017-01-04 Eugene Syromyatnikov + + tests: add more checks of unknown ioctl command formatting. + * tests/ioctl.c (main): Additional check for unknown ioctl command + decoding. + * tests/ioctl_evdev.c (main): Likewise. + * tests/ioctl_dm.c: Include for _IOC_SIZE and _IOC_NR. + (main) : New constants. + Add more checks for unknown command formatting. + +2017-01-04 Eugene Syromyatnikov + + ioctl: do not print explicit 0x prefix and do not specify minimum width. + Specifying output width for size argument is rather misleading - it can + be up to 14 bits in size. The use of explicit "0x" prefix is + discouraged because 0x0 looks ugly. Usage of width specification along + with alternate form flag leads to inconsistent output for 0. + Let's use just plain %#x qualifiers instead. + + * ioctl.c (ioctl_print_code): Change printf qualifiers for ioctl command + type, number and size to "%#x". + * tests/ioctl.c (main): Update expected test output. + * tests/ioctl_dm.c (main): Likewise. + * tests/ioctl_evdev.c (main): Likewise. + +2017-01-04 Eugene Syromyatnikov + + loop: fix printing of the reserved field array items. + They are of char type, so "hh" length modifier should be used (otherwise + they are printed incorrectly as they are sign extended implicitly when + passed as printf arguments in case char is a signed type which is true + for most compilers). + + * loop.c (decode_loop_info): Change "%#x" printf qualifier to "%#hhx" + in printing routine for array elements of the "reserved" field of + loop_info structure. + +2017-01-04 Eugene Syromyatnikov + + tests: check ioctl(SIOCGIFCONF) decoding. + * tests/ioctl_sock_gifconf.c: New file. + * tests/ioctl_sock_gifconf.test: New test. + * tests/.gitignore: Add ioctl_sock_gifconf. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_sock_gifconf.test. + + dm.c: add copyright notice. + +2017-01-04 Dmitry V. Levin + + Add scno.h and syscallent.i to .gitignore files. + * .gitignore: Add /scno.h and /syscallent.i. + * tests/.gitignore: Add scno.h and syscallent.i. + +2017-01-04 JingPiao Chen + + tests/.gitignore: add generated files that should be ignored. + * tests/.gitignore: Replace addkey with add_key, add attach-f-p-cmd. + +2017-01-03 Dmitry V. Levin + + Remove checks of __NR_* availability from strace source code. + * strace.c: Remove __NR_tkill checks, assume it is always defined. + * util.c: Remove __NR_process_vm_readv checks and fallback definitions, + assume it is always defined. + + Include "scno.h" in files that check __NR_* constants. + * strace.c: Include "scno.h". + * util.c: Likewise. + + Generate scno.h for use during the build of strace itself. + * Makefile.am: Include scno.am. + ($(strace_OBJECTS)): New rule. + +2017-01-01 Dmitry V. Levin + + Generate scno.h without invoking a generated executable helper. + Generate scno.h using only those tools that are available for cross + build. This allows to use scno.h during the build of strace itself. + + * scno.am: New file. + * scno.head: New file. + * Makefile.am (EXTRA_DIST): Add it. + * tests/generate_scno.c: Remove. + * tests/.gitignore: Remove generate_scno. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (CLEANFILES): Remove scno.h. + (scno.h, $(scno_dependants)): Remove rules. + (scno_dependants): Remove. + ($(objects)): New rule. + Include ../scno.am. + +2017-01-01 Dmitry V. Levin + + Update all publicly shown copyright year number ranges. + * COPYING: Update copyright year number range. + * configure.ac: Likewise. + * strace.c: Likewise. + * tests/strace-V.test: Use the current year for the check. + +2016-12-31 Dmitry V. Levin + + defs.h: stop including + Limit the number of files where is included + to only those few that need it. + + * defs.h: Do not include . + * clone.c: Include . + * strace.c: Likewise. + * syscall.c: Likewise. + * util.c: Likewise. + +2016-12-30 Dmitry V. Levin + + tests: do not use BUILT_SOURCES. + * tests/Makefile.am (ksysent.$(OBJEXT)): New rule. + (BUILT_SOURCES): Remove. + +2016-12-30 Dmitry V. Levin + + Fix cross build. + This fixes cross build regression introduced by commit + v4.15-39-g605a705a63d533dceb3c2d489468fcd3aed3963c. + + * tests/Makefile.am (BUILT_SOURCES): Remove scno.h + (objects, scno_dependants): New variables. + ($(scno_dependants)): New rule. + + Reported-by: Joakim Bech + +2016-12-30 Dmitry V. Levin + + tests: do not use defs.h and syscall.h. + * tests/generate_scno.c: Include "tests.h", "sysent.h", , + , and instead of "defs.h" and "syscall.h". + * tests/ksysent.c: Likewise. + * tests/nsyscalls.c: Include "tests.h", "sysent.h", , + , and instead of "defs.h" and "syscall.h". + + Move definition of struct sysent and trace flags to a separate file. + * sysent.h: New file. + * Makefile.am (strace_SOURCES): Add it. + * defs.h: Include it. + (struct sysent, TRACE_FILE, TRACE_IPC, TRACE_NETWORK, TRACE_PROCESS, + TRACE_SIGNAL, TRACE_DESC, TRACE_MEMORY, SYSCALL_NEVER_FAILS, + STACKTRACE_INVALIDATE_CACHE, STACKTRACE_CAPTURE_ON_ENTER, + TRACE_INDIRECT_SUBCALL, COMPAT_SYSCALL_TYPES): Remove. + +2016-12-29 Eugene Syromyatnikov + + Mpersify SIOC* ioctls. + struct ifreq and struct ifconf are ABI-dependent and should have been + mpersified. + + * defs.h (sock_ioctl): Remove prototype. + * sock.c (struct_ifconf, struct_ifreq): New typedefs. + (DEF_MPERS_TYPE(struct_ifconf), DEF_MPERS_TYPE(struct_ifreq), + MPERS_DEFS): New includes. + (print_ifreq, print_ifc_len, print_ifconf_ifreq): Replace struct ifreq + with struct_ifreq. + (decode_ifconf): Replace struct ifconf with struct_ifconf, struct ifreq + with struct_fireq. + (sock_ioctl): Wrap into MPERS_PRINTER_DECL. + +2016-12-29 Eugene Syromyatnikov + Dmitry V. Levin + + sock: rewrite decode_ifconf. + * sock.c (decode_ifconf): Rewrite. + +2016-12-29 Eugene Syromyatnikov + + xlat: update LOOP_* ioctl flags constants. + * configure.ac (AC_CHECK_DECLS): Add LO_FLAGS_USE_AOPS + and LO_FLAGS_DIRECT_IO. + * xlat/loop_flags_options.in: Likewise. Add default values + for constants. + +2016-12-29 Eugene Syromyatnikov + + loop: add fallback definitions for LOOP_* ioctl command constants. + Since these are architecture-independent and have been added over the + kernel's lifetime, it makes sense to have these definitions in strace + itself. + + * xlat/loop_cmds.in: New file. + * loop.c: Include "xlat/loop_cmds.h". + (loop_ioctl): Eliminate conditional compilation based on availability + of LOOP_* constant definitions. + +2016-12-29 Dmitry V. Levin + + xlat: extend syntax. + * xlat/gen.sh: Implement #stop directive that stops preprocessor + at the line it has been encountered during the first pass. This could + be used, for example, to provide fallback definitions for constants + without defining xlat tables. + +2016-12-29 Eugene Syromyatnikov + Dmitry V. Levin + + loop: mpersify struct loop_info and loop_ioctl function. + struct loop_info contains fields of type long, so it definitely should + have been mpersified. + + * defs.h (loop_ioctl): Remove prototype. + * loop.c (struct_loop_info): New typedef. + Include DEF_MPERS_TYPE(struct_loop_info) and MPERS_DEFS. + (decode_loop_info): Replace struct loop_info with struct_loop_info. + Cast lo_inode, lo_init[0], and lo_init[1] to kernel_ulong_t and print + them using appropriate format specifiers. + (loop_ioctl): Wrap into MPERS_PRINTER_DECL. + +2016-12-29 Eugene Syromyatnikov + + loop: print lo_device and lo_rdevice fields using print_dev_t. + * loop.c (decode_loop_info, decode_loop_info64): Use print_dev_t + for printing lo_device and lo_rdevice fields. + +2016-12-29 Eugene Syromyatnikov + Dmitry V. Levin + + Move device number printing code into a separate routine. + * print_dev_t.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * defs.h (print_dev_t): New prototype. + * dm.c: Do not include . + (dm_decode_device, dm_print_dev, dm_decode_dm_name_list): Use + print_dev_t function for printing device numbers. + * mknod.c: Do not include . + (decode_mknod): Use print_dev_t function for printing device number. + * print_struct_stat.c: Do not include . + (print_struct_stat): Use print_dev_t function for printing device + numbers. + +2016-12-28 Dmitry V. Levin + + tests: enhance invalid address decoding check in seccomp-strict.test. + * tests/seccomp-strict.c (main): Change the type of addr variable + containg the invalid address from unsigned long to kernel_ulong_t, + print it using %#llx format. + +2016-12-28 Eugene Syromyatnikov + + tests: check decoding of prctl PR_GET_TID_ADDRESS operation. + * tests/prctl-tid_address.c: New file. + * tests/prctl-tid_address.test: New test. + * tests/.gitignore: Add prctl-tid_address. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add prctl-tid_address.test. + +2016-12-28 Dmitry V. Levin + + Update the publicly shown copyright information. + Set the publicly shown copyright holder to "The strace developers.". + + * COPYING: Update copyright information. + * configure.ac: Add AC_COPYRIGHT. + * strace.c (print_version): New function. + (init): Use it. + * tests/strace-V.test: Update expected output. + +2016-12-28 Dmitry V. Levin + + configure: specify project URL. + * configure.ac (AC_INIT): Add URL. + +2016-12-28 Seraphime Kirkovski + + Document signal injection. + * strace.1: Describe :signal=SIG option of the fault injection syntax. + * NEWS: Mention signal injection. + +2016-12-28 Seraphime Kirkovski + + Implement signal injection. + This extends the fault injection capability with :signal=SIG option + which injects a signal on entering each syscall from the specified set. + + :signal and :error options are complementary, if they are both specified + the syscall will be fault injected as usual and the specified signal + will be delivered to the tracee. + + * defs.h (struct fault_opts): Change the type of err field to int16_t, + add signo field. + (trace_syscall): Add a pointer argument. + * qualify.c: Include "nsig.h". + (parse_fault_token): Handle signal= option. + (qualify_fault): Update default fault_opts. + * strace.c (trace): Forward signal number from trace_syscall + to ptrace_restart(PTRACE_SYSCALL). + * syscall.c (inject_syscall_fault_entering): Add pointer argument, + save there the signal number specified by fault options. Do not inject + a syscall fault unless instructed by fault options. + (update_syscall_fault_exiting): Update the error code injection check. + (trace_syscall_entering): Add pointer argument, forward it to + inject_syscall_fault_entering. + (trace_syscall): Add pointer argument, forward it to + trace_syscall_entering. + +2016-12-28 Dmitry V. Levin + + Update README.md. + * README.md: Update homepage URL, mention command-line interface + and tampering capabilities in the description. + +2016-12-28 Dmitry V. Levin + + tests: robustify prctl-arg2-intptr.test. + Robustify prctl-arg2-intptr.test against unrelated prctl invocations. + + * tests/prctl-arg2-intptr.test: Filter out unrelated PR_GET_* + and PR_SET_* prctl calls. + +2016-12-27 Dmitry V. Levin + + signal: remove redundant checks around NSIG. + * signal.c (struct old_sigaction, struct new_sigaction, + struct new_sigaction32): Remove safety checks for NSIG >= sizeof(long). + + Introduce NSIG_BYTES. + * nsig.h (NSIG_BYTES): New macro. + * desc.c: Use it in comments instead of NSIG. + * epoll.c: Likewise. + * poll.c: Likewise. + * signalfd.c: Likewise. + * signal.c: Likewise. + (sprintsigmask_n, print_sigset_addr_len_limit): Use it instead of NSIG. + * linux/alpha/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/arm/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/crisv10/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/ia64/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/m68k/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/microblaze/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/mips/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/powerpc/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/s390/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/sparc/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/tile/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/x86_64/arch_sigreturn.c (arch_sigreturn): Likewise. + * tests/pselect6.c (main): Likewise. + + Move NSIG ifdefery to a separate header file. + * nsig.h: New file. + * Makefile.am (strace_SOURCES): Add it. + * signal.c: Include "nsig.h" instead of , remove + NSIG workarounds. + * sigreturn.c: Likewise. + * syscall.c: Likewise. + * tests/pselect6.c: Likewise. + + Introduce ANY_WORDSIZE_LESS_THAN_KERNEL_LONG macro. + * defs.h (ANY_WORDSIZE_LESS_THAN_KERNEL_LONG): New macro. + (truncate_klong_to_current_wordsize, + truncate_kulong_to_current_wordsize): Use it. + * mem.c (SYS_FUNC(old_mmap)): Likewise. + * util.c (umoven, umovestr, dumpiov_upto): Likewise. + * syscall.c (trace_syscall_exiting): Likewise. + + Simplify personality checks in msghdr.c and signal.c. + * msghdr.c: Check for [!current_wordsize] instead + of [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4]. + * signal.c: Likewise. + +2016-12-26 Dmitry V. Levin + + Replace widen_to_long with truncate_klong_to_current_wordsize. + * defs.h (widen_to_long): Remove. + (truncate_klong_to_current_wordsize): New static inline function. + * aio.c (SYS_FUNC(io_submit), SYS_FUNC(io_getevents): Use it + instead of widen_to_long. + * linux/sparc64/get_syscall_args.c (get_syscall_args): Update comment. + * linux/x86_64/get_syscall_args.c (get_syscall_args): Likewise. + + Replace widen_to_ulong with truncate_kulong_to_current_wordsize. + * defs.h (widen_to_ulong): Remove. + (truncate_kulong_to_current_wordsize): New static inline function. + * io.c (do_preadv, do_pwritev): Use it instead of widen_to_ulong. + +2016-12-26 Dmitry V. Levin + + Simplify print_lld_from_low_high_val ifdefery. + The demise of HAVE_STRUCT_TCB_EXT_ARG opens the way for a simpler + implementation. + + * io.c (print_lld_from_low_high_val): Merge [SIZEOF_LONG > 4 + && SIZEOF_LONG == SIZEOF_LONG_LONG] + and [SIZEOF_KERNEL_LONG_T > SIZEOF_LONG] cases + into a single [SIZEOF_KERNEL_LONG_T > 4] case. + [SIZEOF_KERNEL_LONG_T == 4]: Use direct casts to long long + instead of zero_extend_signed_to_ull. + +2016-12-26 Dmitry V. Levin + + Simplify getllval ifdefery. + The demise of HAVE_STRUCT_TCB_EXT_ARG opens the way for a simpler + implementation. + + * util.c (getllval): Merge [SIZEOF_LONG > 4 + && SIZEOF_LONG == SIZEOF_LONG_LONG] + and [SIZEOF_KERNEL_LONG_T > SIZEOF_LONG] cases + into a single [SIZEOF_KERNEL_LONG_T > 4] case. + +2016-12-26 Eugene Syromyatnikov + + prctl: print pointer returned by PR_GET_TID_ADDRESS as kernel long. + Since there is no compat handler for x32/n32, kernel returns kernel's + long as a result of the call. + + Interesting, does any callee out there actually care to have enough room + allocated for kernel long? + + * prctl.c (SYS_FUNC(prctl)): Use printnum_kptr instead of printnum_ptr + to print the value stored at address pointed by addr2 argument + of PR_GET_TID_ADDRESS operation. + +2016-12-26 Eugene Syromyatnikov + + Add functions for printing pointers of kernel_ulong_t size. + In cases where no compat for x32/n32 is implemented, pointer is of + kernel's long size, so it should be printed appropriately. + + * defs.h [!current_klongsize] (printnum_addr_klong_int): New prototype. + (printnum_kptr): New macro. + * util.c [!current_klongsize] (printnum_addr_klong_int): New function. + +2016-12-26 Eugene Syromyatnikov + Dmitry V. Levin + + Print indirect pointers as pointers. + Originally, printnum_long_int was used, but it prints NULL incorrectly. + + * defs.h (DECL_PRINTNUM_ADDR): New macro. + (DECL_PRINTNUM_ADDR(int), DECL_PRINTNUM_ADDR(int64)): New prototypes. + [!current_wordsize] (printnum_addr_long_int): New prototype. + [!current_wordsize] (printnum_ptr): Use it. + [current_wordsize > 4] (printnum_ptr): Use printnum_addr_int64. + [current_wordsize == 4] (printnum_ptr) Use printnum_addr_int. + * util.c (DEF_PRINTNUM_ADDR): New macro. + (DEF_PRINTNUM_ADDR(int, unsigned int), + DEF_PRINTNUM_ADDR(int64, uint64_t)): New macro instantiations that + provide printnum_addr_int and printnum_addr_int64, accordingly. + [!current_wordsize] (printnum_addr_long_int): New function. + * xet_robust_list.c (sprintaddr): New function. + (main): Use it, update expected output. + * tests/ipc_sem.c (main): Update expected output. + +2016-12-26 Eugene Syromyatnikov + + ipc_sem: print 4th argument of semctl syscall as an address. + * ipc_sem.c (SYS_FUNC(semctl)): Print 4th argument using printaddr. + * tests/ipc_sem.c (cleanup): Update expected output. + +2016-12-26 Dmitry V. Levin + + Do not define printnum_long_int on systems with constant current_wordsize + * defs.h: Check [!current_wordsize] instead + of [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] to select + definitions of printnum_slong, printnum_ulong, and printnum_ptr. + * util.c: Check [!current_wordsize] instead + of [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] to decide + whether to compile printnum_long_int. + +2016-12-26 Dmitry V. Levin + + umoven: detect invalid addresses. + Do not silently truncate tracee addresses to current_wordsize. + After transition from long to kernel_ulong_t there should be no sign + extension issues with tracee addresses, and invalid addresses should + be printed properly. + + * util.c (umoven): Check [SIZEOF_KERNEL_LONG_T > 4] instead + of [SIZEOF_LONG > 4], reject addresses that do not fit into + current_wordsize. + * tests/umoven-illptr.c: New file. + * tests/umoven-illptr.test: New test. + * tests/.gitignore: Add umoven-illptr. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add umoven-illptr.test. + +2016-12-26 Dmitry V. Levin + + umovestr: detect invalid addresses. + Do not silently truncate tracee addresses to current_wordsize. + After transition from long to kernel_ulong_t there should be no sign + extension issues with tracee addresses, and invalid addresses should + be printed properly. + + * util.c (umovestr): Check [SIZEOF_KERNEL_LONG_T > 4] instead + of [SIZEOF_LONG > 4], reject addresses that do not fit into + current_wordsize. + * tests/umovestr-illptr.c: New file. + * tests/umovestr-illptr.test: New test. + * tests/.gitignore: Add umovestr-illptr. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add umovestr-illptr.test. + +2016-12-26 Dmitry V. Levin + + lseek: simplify _llseek syscall decoder. + After transition from long to kernel_ulong_t the implementation + could be made a bit simpler. + + * lseek.c (SYS_FUNC(llseek)): Use direct cast to long long instead + of zero_extend_signed_to_ull. + +2016-12-26 Dmitry V. Levin + + lseek: merge two different implementations of lseek syscall decoder. + After transition from long to kernel_ulong_t there are no mo + complications that required to keep a separate implementation + for x32 and mips n32. + + * lseek.c (SYS_FUNC(lseek)): Merge two different implementations + into a single one. + +2016-12-26 Dmitry V. Levin + + Remove HAVE_STRUCT_TCB_EXT_ARG, ext_arg, and u_lrval. + After transition from long to kernel_ulong_t these fields + are no longer needed. + + * defs.h (HAVE_STRUCT_TCB_EXT_ARG): Remove. + (struct tcb) [HAVE_STRUCT_TCB_EXT_ARG]: Remove. + [HAVE_STRUCT_TCB_EXT_ARG]: Remove. + (RVAL_MASK): Update. + * io.c (print_lld_from_low_high_val): Check + [SIZEOF_KERNEL_LONG_T > SIZEOF_LONG] + instead of [HAVE_STRUCT_TCB_EXT_ARG]. + Use u_arg instead of ext_arg. + * linux/mips/get_error.c (get_error) [LINUX_MIPSN32]: Remove. + * linux/mips/get_syscall_args.c (get_syscall_args) [LINUX_MIPSN32]: + Remove. + [LINUX_MIPSN64]: Extend to [LINUX_MIPSN32]. + * linux/x86_64/get_error.c (get_error) [X32]: Remove. + * linux/x86_64/get_syscall_args.c (get_syscall_args) [X32]: Remove. + * lseek.c: Check [SIZEOF_KERNEL_LONG_T > SIZEOF_LONG] + instead of [HAVE_STRUCT_TCB_EXT_ARG]. + [SIZEOF_KERNEL_LONG_T > SIZEOF_LONG] (SYS_FUNC(lseek)): Use u_arg + instead of ext_arg. Use RVAL_UDECIMAL instead of RVAL_LUDECIMAL. + * mem.c (SYS_FUNC(mmap)): Pass offset syscall argument directly + to print_mmap. + * syscall.c (trace_syscall_exiting) [HAVE_STRUCT_TCB_EXT_ARG]: Remove. + * times.c (SYS_FUNC(times)): Use RVAL_UDECIMAL instead + of RVAL_LUDECIMAL. + * util.c (getllval): Check [SIZEOF_KERNEL_LONG_T > SIZEOF_LONG] + instead of [HAVE_STRUCT_TCB_EXT_ARG]. Use u_arg instead of ext_arg. + +2016-12-26 Dmitry V. Levin + + Remove getarg_klu. + After transition from long to kernel_ulong_t we no longer need + tcp->ext_arg, and therefore a function to access it is also no longer + needed. + + * defs.h (getarg_klu): Remove prototype. + * util.c (getarg_klu): Remove. + (printargs): Access tcp->u_arg directly + * bjm.c (SYS_FUNC(init_module)): Likewise. + * clone.c (SYS_FUNC(unshare)): Likewise. + * fadvise.c (SYS_FUNC(fadvise64)): Likewise. + * kcmp.c (SYS_FUNC(kcmp)): Likewise. + * kexec.c (SYS_FUNC(kexec_file_load)): Likewise. + * keyctl.c (SYS_FUNC(keyctl)): Likewise. + * lookup_dcookie.c (SYS_FUNC(lookup_dcookie)): Likewise. + * mem.c (do_mprotect): Likewise. + * mq.c (SYS_FUNC(mq_timedsend), SYS_FUNC(mq_timedreceive)): Likewise. + * pkeys.c (SYS_FUNC(pkey_alloc)): Likewise. + * prctl.c (print_prctl_args, SYS_FUNC(prctl), SYS_FUNC(arch_prctl)): + Likewise. + +2016-12-26 Dmitry V. Levin + + Remove printaddr_klu. + After transition from long to kernel_ulong_t we no longer need + two versions of printaddr function. + + * defs.h (printaddr): Remove. + (printaddr_klu): Rename to printaddr. + * util.c (printaddr_klu): Likewise. + * bjm.c (SYS_FUNC(init_module)): Replace printaddr_klu with printaddr. + * mem.c (do_mprotect): Likewise. + +2016-12-26 Eugene Syromyatnikov + + tests: check decoding of a subset of prctl operations. + Check decoding of prctl operations that take the second syscall argument + as a pointer to an integer. + + * tests/prctl-arg2-intptr.c: New file. + * tests/prctl-arg2-intptr.test: New test. + * tests/.gitignore: Add prctl-arg2-intptr. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add prctl-arg2-intptr.test. + +2016-12-26 Dmitry V. Levin + + Automatically replace PRI_kr[dux] with PRI_kl[dux] + Remove temporary macros created for transition from long + to kernel_ulong_t. + + Automatically replace PRI_kr[dux] with PRI_kl[dux] using + $ git grep -l 'PRI_kr[dux]' | xargs sed -ri 's/PRI_kr([dux])/PRI_kl\1/g' + + * defs.h (PRI_krd, PRI_kru, PRI_krx): Remove. All users updated. + +2016-12-26 Dmitry V. Levin + + Automatically replace kernel_(scno|ureg)_t with kernel_ulong_t. + Remove temporary types created for transition from long + to kernel_ulong_t. + + Automatically replace kernel_scno_t and kernel_ureg_t with + kernel_ulong_t using + $ git grep -El 'kernel_(scno|ureg)_t' | + xargs sed -ri 's/kernel_(scno|ureg)_t/kernel_ulong_t/g' + + * kernel_types.h (kernel_scno_t, kernel_ureg_t): Remove. + All users updated. + +2016-12-26 Dmitry V. Levin + + Redirect kernel_ureg_t and kernel_scno_t from unsigned long to kernel_ulong_t + * defs.h (struct tcb): Change u_rval type from long to kernel_long_t. + (PRI_krd, PRI_kru, PRI_krx): Redirect to PRI_kld, PRI_klu, and PRI_klx. + * kernel_types.h (kernel_scno_t, kernel_ureg_t): Redirect + to kernel_ulong_t. + +2016-12-26 Dmitry V. Levin + + Print kernel_ureg_t and kernel_scno_t using dedicated format strings. + Prepare for the change of kernel_ureg_t and kernel_scno_t from + unsigned long to kernel_ulong_t. + + * defs.h (PRI_krd, PRI_kru, PRI_krx): New temporary macros. + All users updated. + +2016-12-26 Dmitry V. Levin + + vm_read_mem: detect address truncation. + When sizeof(kernel_ureg_t) > sizeof(long), the tracee address passed + to vm_read_mem could be silently truncated. Detect this situation + and return EIO when the tracee address does not fit into unsigned long. + + * util.c (vm_read_mem): Save raddr argument into a temporary variable + truncated_raddr of type unsigned long. Set errno to EIO and return -1 + when truncated_raddr does not equal to raddr. + +2016-12-26 Dmitry V. Levin + + trace_syscall_exiting: prepare personality check for u_rval type change. + * syscall.c (trace_syscall_exiting): Check for sizeof(tcp->u_rval) + instead of sizeof(long) when deciding how to print tcp->u_rval. + +2016-12-26 Dmitry V. Levin + + Use ptr_to_kulong instead of explicit casts of pointers to kernel_ureg_t + Direct casts to kernel_ureg_t will not work after the change + of kernel_ureg_t from unsigned long to kernel_ulong_t. + + * defs.h (ptr_to_kulong): New macro. + * block.c (print_blkpg_req): Use it instead of explicit casts + to kernel_ureg_t. + * btrfs.c (btrfs_ioctl): Likewise. + * evdev.c (ff_effect_ioctl): Likewise. + * mmsghdr.c (dumpiov_in_mmsghdr): Likewise. + * msghdr.c (print_struct_msghdr, dumpiov_in_msghdr): Likewise. + * mtd.c (decode_mtd_oob_buf): Likewise. + * printsiginfo.c (printsigval, print_si_info): Likewise. + * scsi.c (print_sg_io_v3_req, print_sg_io_v3_res): Likewise. + * sigaltstack.c (print_stack_t): Likewise. + * sock.c (decode_ifconf): Likewise. + * sysctl.c (SYS_FUNC(sysctl)): Likewise. + * util.c (dumpiov_upto): Likewise. + * v4l2.c (print_v4l2_framebuffer, print_v4l2_ext_control, + print_v4l2_ext_controls): Likewise. + +2016-12-26 Dmitry V. Levin + + umove*: remove redundant casts. + * util.c (umoven, umovestr): Remove casts from unsigned long to pointer. + + upoke: remove redundant casts. + * upoke.c (upoke): Remove casts from unsigned long to pointer. + +2016-12-25 Dmitry V. Levin + + signal: cleanup decoding of sa_handler and sa_restorer. + Change type of sa_handler and sa_restorer fields from function pointers + to unsigned long. This saves the code from a lot of casts between + pointers and integers. + + Rename __sa_handler to sa_handler__ as names starting with underscore + symbol are reserved and should not be used. + + * signal.c (old_sigaction): Rename __sa_handler to sa_handler__, + all users updated. Change the type of sa_handler__ and sa_restorer + from pointer to unsigned long. + (old_sigaction32): Rename __sa_handler to sa_handler__, all users + updated. + (decode_old_sigaction): Remove now redundant casts from + old_sigaction32.sa_handler__ to old_sigaction.sa_handler__, + from old_sigaction32.sa_restorer to old_sigaction.sa_restorer, + and from old_sigaction.sa_handler__ to unsigned long. Print + old_sigaction.sa_restorer using printaddr. + * signal.c (new_sigaction): Rename __sa_handler to sa_handler__, + all users updated. Change the type of sa_handler__ and sa_restorer + from pointer to unsigned long. + (new_sigaction32): Rename __sa_handler to sa_handler__, all users + updated. + (decode_new_sigaction): Remove now redundant casts from + new_sigaction32.sa_handler__ to new_sigaction.sa_handler__, + from new_sigaction32.sa_restorer to new_sigaction.sa_restorer, + and from new_sigaction.sa_handler__ to unsigned long. Print + new_sigaction.sa_restorer using printaddr. + +2016-12-25 Dmitry V. Levin + + signal: change signal handler address type from unsigned long to kernel_ureg_t + * signal.c (get_sa_handler_str, print_sa_handler): Change handler type + from unsigned long to kernel_ureg_t. + + quota: change address argument type from unsigned long to kernel_ureg_t. + * quota.c (decode_cmd_data): Change the type of data argument + from unsigned long to kernel_ureg_t. + + execve: prepare for handling big pointers. + * execve.c (printargv): Change cp.p64 type from unsigned long + to kernel_ulong_t so it could handle wordsize > sizeof(long) properly. + +2016-12-25 Dmitry V. Levin + + clone: print clone flags without truncation. + The flags argument is defined in kernel as unsigned long, + so change its decoding to avoid truncation. + + * clone.c (SYS_FUNC(clone)): Change flags type from unsigned long + to kernel_ureg_t, print it using printflags64 instead of printflags. + +2016-12-25 Dmitry V. Levin + + Use printxval64 instead of printxval_long. + After the change of tcb.u_arg type from long to kernel_ureg_t it is safe + to stop using printxval_long proxy and pass syscall arguments directly + to printxval64. + + * defs.h (printxval_long): Remove. + * fcntl.c (print_fcntl): Replace printxval_long with printxval64. + * mtd.c (mtd_ioctl): Likewise. + * numa.c (SYS_FUNC(mbind)): Likewise. + * or1k_atomic.c [OR1K] (SYS_FUNC(or1k_atomic)): Likewise. + * sysmips.c [MIPS] (SYS_FUNC(sysmips)): Likewise. + * term.c (term_ioctl): Likewise. + +2016-12-25 Dmitry V. Levin + + Use printflags64 instead of printflags_long. + After the change of tcb.u_arg type from long to kernel_ureg_t it is safe + to stop using printflags_long proxy and pass syscall arguments directly + to printflags64. + + * defs.h (printflags_long): Remove. + * fcntl.c (print_fcntl): Replace printflags_long with printflags64. + * numa.c (SYS_FUNC(get_mempolicy)): Likewise. + * perf.c (SYS_FUNC(perf_event_open)): Likewise. + * sram_alloc.c [BFIN] (SYS_FUNC(sram_alloc)): Likewise. + +2016-12-25 Dmitry V. Levin + + upeek, upoke: change argument types from long to unsigned long. + * defs.h (upeek, upoke): Change offset argument type from long + to unsigned long. Change res argument type from long to kernel_ureg_t. + * upeek.c (upeek): Likewise. + * upoke.c (upoke.c): Likewise. + * syscall.c (print_pc) [ARCH_PC_PEEK_ADDR]: Change pc type from long + to kernel_ureg_t. + * linux/aarch64/arch_regs.c (arm_sp_ptr): Remove redundant cast. + * linux/metag/get_syscall_args.c (get_syscall_args): Likewise. + * linux/sh/get_syscall_result.c (get_syscall_result_regs): Likewise. + * linux/sh64/get_syscall_result.c (get_syscall_result_regs): Likewise. + * linux/powerpc/getregs_old.c (getregs_old): Remove redundant casts. + * linux/alpha/arch_getrval2.c (getrval2): Change r20 type from long + to unsigned long. + * linux/alpha/arch_regs.c (alpha_r0, alpha_a3): Change type from long + to unsigned long. + * linux/bfin/arch_regs.c (bfin_r0): Likewise. + * linux/crisv10/arch_regs.c (cris_r10): Likewise. + * linux/hppa/arch_regs.c (hppa_r28): Likewise. + * linux/ia64/arch_regs.c (IA64_PSR_IS): Likewise. + * linux/microblaze/arch_regs.c (microblaze_r3): Likewise. + * linux/sh/arch_regs.c (sh_r0): Likewise. + * linux/sh64/arch_regs.c (sh64_r9): Likewise. + * linux/xtensa/arch_regs.c (xtensa_a2): Likewise. + * linux/alpha/arch_sigreturn.c (arch_sigreturn): Change addr type + from long to unsigned long. + * linux/microblaze/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/alpha/get_scno.c (arch_get_scno): Update for the change + of signedness. + * linux/arc/get_syscall_args.c (get_syscall_args): Change arc_args type + from pointer to long to pointer to unsigned long. + * linux/arm/arch_regs.c (arm_sp_ptr): Change type from pointer to long + to pointer to unsigned long. + * linux/arm/arch_regs.h (arm_sp_ptr): Likewise. + * linux/i386/arch_regs.c (i386_esp_ptr): Likewise. + * linux/i386/arch_regs.h (i386_esp_ptr): Likewise. + * linux/m68k/arch_regs.c (m68k_usp_ptr): Likewise. + * linux/m68k/arch_regs.h (m68k_usp_ptr): Likewise. + * linux/ia64/get_syscall_args.c (get_syscall_args): Use umove + instead of umoven. + * linux/sh/arch_getrval2.c (getrval2): Change val type from long + to unsigned long. + + arch_sigreturn: change tracee address type from long to unsigned long. + * linux/arm/arch_sigreturn.c (arch_sigreturn): Change addr variable + type from long to unsigned long. + * linux/ia64/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/m68k/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/powerpc/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/s390/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/sparc/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/tile/arch_sigreturn.c (arch_sigreturn): Likewise. + * linux/crisv10/arch_sigreturn.c (arch_sigreturn): Change the type + of addr and regs variables from long to unsigned long. + * linux/mips/arch_sigreturn.c (arch_sigreturn): Change addr variable + type from long to kernel_ureg_t. + * linux/x86_64/arch_sigreturn.c (arch_sigreturn): Change the type + of offset and addr variables from long to kernel_ureg_t. + + kexec: change flags type from unsigned long to kernel_ureg_t. + * kexec.c (SYS_FUNC(kexec_load)): Change n variable type + from unsigned long to kernel_ureg_t. Use printxval64 instead + of printxval_long. Use printflags64 instead of printflags_long. + + kexec: change types of pointers and sizes to kernel_ureg_t. + * kexec.c (print_seg): Change the type of *seg and seg_buf variables + from unsigned long to kernel_ureg_t. + (print_kexec_segments): Change len argument type from unsigned long + to kernel_ureg_t. Change seg variable type from unsigned long + to kernel_ureg_t. + + printsiginfo: change len argument type from unsigned long to kernel_ureg_t + * printsiginfo.c (print_siginfo_array): Change len argument type + from unsigned long to kernel_ureg_t. + + signal: change address argument type from unsigned long to kernel_ureg_t + * signal.c (print_sigqueueinfo): Change address argument type + from unsigned long to kernel_ureg_t. + + statfs64: change size argument type from unsigned long to kernel_ureg_t. + * defs.h (print_struct_statfs64): Change size argument type + from unsigned long to kernel_ureg_t. + * print_statfs.c (print_struct_statfs64): Likewise. + * fetch_struct_statfs.c (fetch_struct_statfs64): Likewise. + * fstatfs64.c (SYS_FUNC(fstatfs64)): Pass size argument directly + to print_struct_statfs64. + * statfs64.c (SYS_FUNC(statfs64)): Likewise. + + Cast tcp->u_rval to kernel_ureg_t instead of unsigned long. + * fcntl.c (print_fcntl): Cast tcp->u_rval to kernel_ureg_t instead + of unsigned long. + * membarrier.c (SYS_FUNC(membarrier)): Likewise. + * prctl.c (SYS_FUNC(prctl)): Likewise. + * sched.c (SYS_FUNC(sched_getscheduler)): Likewise. + * time.c (do_adjtimex): Likewise. + + decode_sockbuf: change addrlen argument type from long to kernel_ureg_t. + * net.c (decode_sockbuf): Change addrlen argument type from long + to kernel_ureg_t. + + netlink: change size types from unsigned long to kernel_ureg_t. + * defs.h (decode_netlink): Change len argument type from unsigned long + to kernel_ureg_t. + * netlink.c (fetch_nlmsghdr): Likewise. + (decode_nlmsghdr_with_payload): Likewise. Change nlmsg_len variable + type from unsigned long to unsigned int. + (decode_netlink): Change the type of len argument and next_len variable + from unsigned long to kernel_ureg_t. Change nlmsg_len variable type + from unsigned long to unsigned int. + + ipc_msg: change size types from unsigned long to kernel_ureg_t. + * ipc_msg.c (tprint_msgsnd): Change count argument type + from unsigned long to kernel_ureg_t. Change flags argument type + from unsigned long to unsigned int. + (tprint_msgrcv): Change the type of count and msgtyp arguments + from unsigned long to kernel_ureg_t. + (fetch_msgrcv_args): Change *pair type from unsigned long + to kernel_ureg_t. + (SYS_FUNC(msgrcv)): Change pair type from unsigned long + to kernel_ureg_t. + * print_msgbuf.c (tprint_msgbuf): Change count argument type + from unsigned long to kernel_ureg_t. + + dumpiov_upto: change size types from unsigned long to kernel_ureg_t. + * defs.h (dumpiov_upto): Change data_size argument type + from unsigned long to kernel_ureg_t. + * util.c (dumpiov_upto): Change the type of data_size argument + and iov_len variable from unsigned long to kernel_ureg_t. + +2016-12-25 Dmitry V. Levin + + msghdr: change cmsghdr size types from size_t to unsigned int. + As the kernel does not accept control messages longer than the value + of int sysctl_optmem_max kernel variable exported as + /proc/sys/net/core/optmem_max, we do not print them either. + + Since unsigned int has enough room to contain any valid control message + size, change all internal cmsghdr size types from size_t + to unsigned int. + + * msghdr.c (print_scm_rights, print_scm_creds, print_scm_security, + print_cmsg_ip_pktinfo, print_cmsg_uint, print_cmsg_uint8_t, + print_cmsg_ip_opts, print_cmsg_ip_recverr, print_cmsg_ip_origdstaddr, + cmsg_printer, print_cmsg_type_data): Change data_len argument type + from size_t to unsigned int. + (cmsg_socket_printers): Change min_len type from size_t to unsigned int. + (decode_msg_control): Change the type of in_control_len argument, + cmsg_len, and len variables from size_t to kernel_ureg_t. + Change the type of cmsg_size, control_len, and buf_len variables + from size_t to unsigned int. + +2016-12-25 Dmitry V. Levin + + msghdr: change register based size types from unsigned long to kernel_ureg_t + * defs.h (dumpiov_in_msghdr): Change data_size argument type + from unsigned long to kernel_ureg_t. + * msghdr.h (print_struct_msghdr): Likewise. + * msghdr.c (print_struct_msghdr): Likewise. Cast msghdr.msg_iovlen + and msghdr.msg_controllen to kernel_ureg_t instead of unsigned long. + (decode_msghdr, dumpiov_in_msghdr): Change data_size argument type + from unsigned long to kernel_ureg_t. + (SYS_FUNC(sendmsg)): Pass -1 instead of -1UL as data_size argument + to decode_msghdr. + * mmsghdr.c (print_struct_mmsghdr): Pass (kernel_ureg_t) -1 instead + of -1UL as data_size argument to print_struct_msghdr. + (dumpiov_in_mmsghdr): Cast msghdr.msg_iovlen to kernel_ureg_t instead + of unsigned long. + * syscall.c (dumpio): Pass -1 instead of -1UL as data_size argument + to dumpiov_in_msghdr + + mq: remove redundant u_rval check. + * mq.c (SYS_FUNC(mq_timedreceive)): Do not check for tcp->u_rval < 0, + syserror(tcp) is enough, and printstrn can handle len < 0 anyway. + + io: change size types from unsigned long to kernel_ureg_t. + * defs.h (tprint_iov_upto): Change the type of len and data_size + arguments from unsigned long to kernel_ureg_t. + (tprint_iov): Change the type of len argument from unsigned long + to kernel_ureg_t. + * io.c (print_iovec_config): Change data_size type from unsigned long + to kernel_ureg_t. + (print_iovec): Change the type of *iov, iov_buf, and len variables + from unsigned long to kernel_ureg_t. + (tprint_iov_upto): Change the type of len and data_size arguments, and + the type of iov variable from unsigned long to kernel_ureg_t. + + mount: change flags type from unsigned long to kernel_ureg_t. + * mount.c (SYS_FUNC(mount)): Change the type of flags from unsigned long + to kernel_ureg_t, use printflags64 instead of printflags_long + to print it. + + mem: change mmap arguments type from unsigned long to kernel_ureg_t. + * mem.c (print_mmap): Change the type of len, prot, and flags + from unsigned long to kernel_ureg_t. Use printflags64 instead + of printflags_long. Use printxval64 instead of printxval_long. + (SYS_FUNC(old_mmap)): Check for current_klongsize instead + of [AARCH64 || X86_64] to take X32 into account. + (SYS_FUNC(mremap)): Use printflags64 instead of printflags_long. + (SYS_FUNC(remap_file_pages)): Change the type of size, prot, pgoff, and + flags from unsigned long to kernel_ureg_t. Use printflags64 instead + of printflags_long. Use printxval64 instead of printxval_long. + [POWERPC] (SYS_FUNC(subpage_prot)): Change the type of len and nmemb + from unsigned long to kernel_ureg_t. + + numa: change size arguments type from unsigned long to kernel_ureg_t. + * numa.c (print_node, print_addr): Add kernel_ureg_t support. + (print_nodemask): Change type of maxnodes argument from unsigned long + to kernel_ureg_t. + (SYS_FUNC(move_pages)): Change npages type from unsigned long + to kernel_ureg_t. Change buf type from long to kernel_ureg_t. + + print_sigset_addr_len: change len argument type from long to kernel_ureg_t + * defs.h (print_sigset_addr_len): Change len argument type from long + to kernel_ureg_t. + * signal.c (print_sigset_addr_len_limit, print_sigset_addr_len): Likewise. + + process_vm: change size arguments type from unsigned long to kernel_ureg_t + * process_vm.c (SYS_FUNC(process_vm_readv), + SYS_FUNC(process_vm_writev)): Change the type of local_iovcnt, + remote_iovcnt, and flags from unsigned long to kernel_ureg_t. + + printstr*: change len argument type from long to kernel_ureg_t. + * defs.h (printstr_ex, printstrn): Change len argument type from long + to kernel_ureg_t. + * util.c (printstr_ex): Likewise. + + xattr: change size arguments type from unsigned long to kernel_ureg_t. + * xattr.c (print_xattr_val): Change type of insize and size arguments + from unsigned long to kernel_ureg_t. + (print_xattr_list): Change type of size argument from unsigned long + to kernel_ureg_t. + +2016-12-25 Dmitry V. Levin + + printstr_ex: fix decoding of non-NUL-terminated strings when len == -1. + Do not treat len == -1 in any special way. All users who need the + string to be handled as a NUL-terminated string set QUOTE_0_TERMINATED + bit in user_style flags already. + + * util.c (printstr_ex): Remove (len == -1) check. + * tests/printstr.c: New file. + * tests/printstr.test: New test. + * tests/.gitignore: Add printstr. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add printstr.test. + +2016-12-25 Dmitry V. Levin + + Fix decoding of sethostname syscall. + The second argument of sethostname syscall is not an unsigned long but + unsigned int. The kernel does not look at the string argument when + the length argument is too long. + + * hostname.c [HAVE_LINUX_UTSNAME_H]: Include . + [!__NEW_UTS_LEN] (__NEW_UTS_LEN): Define. + (SYS_FUNC(sethostname)): Treat the second argument as unsigned int. + Print the first argument as a pointer when the second argument exceeds + __NEW_UTS_LEN. + * tests/sethostname.c [HAVE_LINUX_UTSNAME_H]: Include . + [!__NEW_UTS_LEN] (__NEW_UTS_LEN): Define. + (main): Use it. Check that the second argument of sethostname + is handled as unsigned int. Check that the first argument is printed + as a pointer when the second argument exceeds __NEW_UTS_LEN. + +2016-12-25 Dmitry V. Levin + + tests: add F8ILL_KULONG_* and f8ill_ptr_to_kulong to tests.h. + * tests/tests.h (F8ILL_KULONG_SUPPORTED, F8ILL_KULONG_MASK): New macros. + (f8ill_ptr_to_kulong): New static inline function. + +2016-12-25 Dmitry V. Levin + + printstr: rename to printstrn, add printstr as a thin wrapper. + As about half of all printstr uses cases are invocations with the last + argument set to -1, create a dedicated function for this use case. + + * defs.h (printstr): Rename to printstrn. All callers updated. + (printstr): New static inline function. All callers updated. + +2016-12-25 Dmitry V. Levin + + process: change ptrace arguments type from unsigned long to kernel_ureg_t + (SYS_FUNC(ptrace)): Change type of request and data arguments + from unsigned long to kernel_ureg_t. + + process: change tracee address type from unsigned long to kernel_ureg_t. + * process.c (print_user_offset_addr): Change address argument type + from unsigned long to kernel_ureg_t. + (SYS_FUNC(ptrace)): Change addr variable type from unsigned long + to kernel_ureg_t. + + net: change address argument type from long to kernel_ureg_t. + * net.c (decode_sockbuf, decode_pair_fd, print_linger, print_ucred, + print_tpacket_stats, print_icmp_filter, print_getsockopt, print_mreq, + print_mreq6, print_group_req, print_tpacket_req, print_packet_mreq, + print_setsockopt): Change address argument type from long + to kernel_ureg_t. + + print_mq_attr: change address argument type from long to kernel_ureg_t. + * print_mq_attr.c (printmqattr): Change address argument type from long + to kernel_ureg_t. + + ipc_*: change address argument type from long to kernel_ureg_t. + * ipc_msg.c (tprint_msgsnd, tprint_msgrcv, fetch_msgrcv_args): Change + address argument type from long to kernel_ureg_t. + * ipc_msgctl.c (print_msqid_ds): Likewise. + * ipc_sem.c (tprint_sembuf_array): Likewise. + * ipc_shmctl.c (print_shmid_ds): Likewise. + + print_msgbuf: change address argument type from long to kernel_ureg_t. + * print_msgbuf.c (tprint_msgbuf): Change address argument type + from long to kernel_ureg_t. + + desc: change tracee address type from long to kernel_ureg_t. + * desc.c (decode_select): Rename arg to addr, change its type + from long to kernel_ureg_t. + + uid: change address argument type from long to kernel_ureg_t. + * uid.c (get_print_uid): Change address argument type + from long to kernel_ureg_t. + + time: change address argument type from long to kernel_ureg_t. + * time.c (print_timezone, do_adjtimex): Change address argument type + from long to kernel_ureg_t. + + sched: change address argument type from long to kernel_ureg_t. + * sched.c (print_sched_attr): Change address argument type + from long to kernel_ureg_t. + + printsiginfo: change address argument type from long to kernel_ureg_t. + * printsiginfo.c (printsiginfo_at): Change address argument type + from long to kernel_ureg_t. + + print_timex: change address argument type from long to kernel_ureg_t. + * print_timex.c (print_timex): Change address argument type + from long to kernel_ureg_t. + + print_sigevent: change address argument type from long to kernel_ureg_t. + * print_sigevent.c (print_sigevent): Change address argument type + from long to kernel_ureg_t. + + poll: change address argument type from long to kernel_ureg_t. + * poll.c (decode_poll_exiting): Change tracee address argument type + from long to kernel_ureg_t. + + printrusage*: change tracee address argument type from long to kernel_ureg_t + * defs.h [ALPHA] (printrusage32): Change address argument type + from long to kernel_ureg_t. + * printrusage.c (printrusage): Likewise. + [ALPHA] (printrusage32): Likewise. + * wait.c (printwaitn): Change the type of tracee address argument + of print_rusage from long to kernel_ureg_t. + + print_time*: change tracee address argument type from long to kernel_ureg_t + * defs.h [ALPHA] (sprint_timeval32, print_timeval32, + print_timeval32_pair, print_itimerval32): Change address argument type + from long to kernel_ureg_t. + * desc.c (decode_select): Change the type of tracee address argument + of print_tv_ts and sprint_tv_ts from long to kernel_ureg_t. + * print_timespec.c (print_timespec, sprint_timespec, + print_timespec_utime_pair, print_itimerspec): Change address argument + type from long to kernel_ureg_t. + * print_timeval.c (print_timeval, print_timeval_pair, sprint_timeval, + print_itimerval, print_timeval32, print_timeval32_pair, + print_itimerval32, sprint_timeval32): Likewise. + + rtc: change type of ioctl 3rd argument from long to kernel_ureg_t. + * rtc.c (decode_rtc_time, decode_rtc_wkalrm, decode_rtc_pll_info): + Change addr type from long to kernel_ureg_t. + (rtc_ioctl): Change arg type from long to kernel_ureg_t. + + mtd: change type of ioctl 3rd argument from long to kernel_ureg_t. + * mtd.c (decode_erase_info_user, decode_erase_info_user64, + decode_mtd_oob_buf, decode_mtd_oob_buf64, decode_otp_info, + decode_otp_select, decode_mtd_write_req, decode_mtd_info_user, + decode_nand_oobinfo, decode_nand_ecclayout_user, decode_mtd_ecc_stats): + Change addr type from long to kernel_ureg_t. + (mtd_ioctl): Change arg type from long to kernel_ureg_t. + + hdio: change type of ioctl 3rd argument from long to kernel_ureg_t. + * hdio.c (hdio_ioctl): Change arg type from long to kernel_ureg_t. + + v4l2: change type of ioctl 3rd argument from long to kernel_ureg_t. + * v4l2.c (print_v4l2_capability, print_v4l2_fmtdesc, print_v4l2_format, + print_v4l2_requestbuffers, print_v4l2_buffer, print_v4l2_framebuffer, + print_v4l2_buf_type, print_v4l2_streamparm, print_v4l2_standard, + print_v4l2_input, print_v4l2_control, print_v4l2_queryctrl, + print_v4l2_cropcap, print_v4l2_crop, print_v4l2_ext_controls, + print_v4l2_frmsizeenum, print_v4l2_frmivalenum, + print_v4l2_create_buffers, v4l2_ioctl): Change arg type from long + to kernel_ureg_t. + + evdev: change type of ioctl 3rd argument from long to kernel_ureg_t. + * evdev.c (ff_effect_ioctl, abs_ioctl, keycode_ioctl, keycode_V2_ioctl, + getid_ioctl, decode_bitset, mtslots_ioctl, repeat_ioctl, bit_ioctl, + evdev_read_ioctl, evdev_write_ioctl, evdev_ioctl): Change arg type + from long to kernel_ureg_t. + + btrfs: change type of ioctl 3rd argument from long to kernel_ureg_t. + * btrfs.c (btrfs_print_balance, btrfs_ioctl): Change arg type from long + to kernel_ureg_t. + + block: change type of ioctl 3rd argument from long to kernel_ureg_t. + * block.c (block_ioctl): Change arg type from long to kernel_ureg_t. + + Change type of ioctl 3rd argument from long to kernel_ureg_t. + * defs.h (DECL_IOCTL): Change arg type from long to kernel_ureg_t. + * dm.c (dm_known_ioctl, dm_ioctl): Likewise. + * file_ioctl.c (file_ioctl): Likewise. + * fs_x_ioctl.c (fs_x_ioctl): Likewise. + * ioctl.c (ioctl_decode): Likewise. + * loop.c (decode_loop_info, decode_loop_info64): Change addr type + from long to kernel_ureg_t. + (loop_ioctl): Change arg type from long to kernel_ureg_t. + * ptp.c (ptp_ioctl): Likewise. + * scsi.c (print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req, + print_sg_io_v4_res, scsi_ioctl): Likewise. + * sock.c (print_ifreq, sock_ioctl): Likewise. + (decode_ifconf): Change addr type from long to kernel_ureg_t. + * term.c (decode_termios, decode_termio, decode_winsize, decode_ttysize, + decode_modem_flags): Likewise. + (term_ioctl): Change arg type from long to kernel_ureg_t. + * ubi.c (ubi_ioctl): Likewise. + * userfaultfd.c (uffdio_ioctl): Likewise. + + ldt: change address argument type from long to kernel_ureg_t. + * defs.h [HAVE_STRUCT_USER_DESC] (print_user_desc): Change address + argument type from long to kernel_ureg_t. + * ldt.c [HAVE_STRUCT_USER_DESC] (print_user_desc): Likewise. + + fcntl: change address argument type from long to kernel_ureg_t. + * fcntl.c (printflock64, printflock, print_f_owner_ex): Change + address argument type from long to kernel_ureg_t. + + execve: change address argument type from long to kernel_ureg_t. + * execve.c (printargv, printargc): Change address argument type + from long to kernel_ureg_t. + + dirent: change address argument type from long to kernel_ureg_t. + * dirent.c (print_old_dirent): Change address argument type from long + to kernel_ureg_t. + + bpf: change address argument type from long to kernel_ureg_t. + * bpf.c (bpf_map_create, bpf_map_update_elem, bpf_map_delete_elem, + bpf_map_io, bpf_prog_load, SYS_FUNC(bpf)): Change address argument + type from long to kernel_ureg_t. + + dump*: change address argument type from long to kernel_ureg_t. + * defs.h (dumpiov_in_msghdr, dumpiov_in_mmsghdr, dumpiov_upto, dumpstr): + Change address argument type from long to kernel_ureg_t. + * mmsghdr.c (dumpiov_in_mmsghdr): Likewise. + * msghdr.c (fetch_msghdr_namelen, decode_msghdr, dumpiov_in_msghdr): + Likewise. + * util.c (dumpiov_upto, dumpstr): Likewise. + + print_sigset_addr_len: change address argument type from long to kernel_ureg_t + * defs.h (print_sigset_addr_len) Change address argument type from long + to kernel_ureg_t. + * signal.c (print_sigset_addr_len_limit, print_sigset_addr_len, + decode_old_sigaction, decode_new_sigaction): Likewise. + + decode_sockaddr: change address argument type from long to kernel_ureg_t + * defs.h (decode_sockaddr) Change tracee address argument type from long + to kernel_ureg_t. + * sockaddr.c (decode_sockaddr): Likewise. + + print_struct_statfs*: change address argument type from long to kernel_ureg_t + * defs.h (print_struct_statfs, print_struct_statfs64): Change address + argument type from long to kernel_ureg_t. + * print_statfs.c (print_struct_statfs, print_struct_statfs64): Likewise. + * fetch_struct_statfs.c (fetch_struct_statfs, fetch_struct_statfs64): + Likewise. + + fetch_struct_flock: change address argument type from long to kernel_ureg_t + * fetch_struct_flock.c (fetch_struct_flock, fetch_struct_flock64): + Change address argument type from long to kernel_ureg_t. + + fetch_seccomp_fprog: change address argument type from long to kernel_ureg_t + * fetch_seccomp_fprog.c (fetch_seccomp_fprog): Change address argument + type from long to kernel_ureg_t. + + printnum_*, printpair_*: change address argument type from long to kernel_ureg_t + * defs.h (DECL_PRINTNUM, DECL_PRINTPAIR, printnum_long_int): Change + address argument type from long to kernel_ureg_t. + * util.c (DEF_PRINTNUM, DEF_PRINTPAIR, printnum_long_int): Likewise. + + printpath*: change address argument type from long to kernel_ureg_t. + * defs.h (printpath, printpathn): Change address argument type + from long to kernel_ureg_t. + * util.c (printpath, printpathn): Likewise. + + printstr*: change address argument type from long to kernel_ureg_t. + * defs.h (printstr_ex, printstr_ex): Change address argument type + from long to kernel_ureg_t. + * util.c (printstr_ex): Likewise. + + umove*: change tracee address argument type from long to kernel_ureg_t. + * defs.h (umovestr, umoven, umoven_or_printaddr, + umoven_or_printaddr_ignore_syserror): Change tracee address argument + type from long to kernel_ureg_t. + (print_array): Change the type of tracee address argument of umoven_func + from long to kernel_ureg_t. + * util.c (vm_read_mem, umovestr, umoven, umoven_or_printaddr, + umoven_or_printaddr_ignore_syserror): Change tracee address argument + type from long to kernel_ureg_t. + (print_array): Change the type of tracee address argument of umoven_func + from long to kernel_ureg_t. + * desc.c (umove_kulong_array_or_printaddr): Change tracee address + argument type from long to kernel_ureg_t. + * mmsghdr.c (fetch_struct_mmsghdr_or_printaddr): Likewise. + + futex: change address type from long to kernel_ureg_t. + * futex.c (SYS_FUNC(futex)): Change address type from long + to kernel_ureg_t. + + file_handle: change address type from long to kernel_ureg_t. + * file_handle.c (SYS_FUNC(name_to_handle_at), + SYS_FUNC(open_by_handle_at)): Change address type from long + to kernel_ureg_t. + + printsiginfo: cast pointers to kernel_ureg_t instead of unsigned long. + * printsiginfo.c (printsigval): Cast siginfo.si_ptr pointer + to kernel_ureg_t instead of unsigned long. + (print_si_info): Cast siginfo.si_addr and siginfo.si_call_addr pointers + to kernel_ureg_t instead of unsigned long. + + sigaltstack: cast pointers and sizes to kernel_ureg_t instead of unsigned long + * sigaltstack.c (print_stack_t): Cast sigaltstack.ss_sp pointer + and sigaltstack.ss_size to kernel_ureg_t instead of unsigned long. + + v4l2: cast pointers to kernel_ureg_t instead of long. + * v4l2.c (print_v4l2_ext_control): Cast v4l2_ext_control.string pointer + to kernel_ureg_t instead of long. + + v4l2: cast pointers to kernel_ureg_t instead of unsigned long. + * v4l2.c (print_v4l2_buffer): Remove redundant cast. + (print_v4l2_framebuffer): Cast v4l2_framebuffer.base pointer + to kernel_ureg_t instead of unsigned long. + (print_v4l2_ext_controls): Cast v4l2_ext_controls.controls pointer + to kernel_ureg_t instead of unsigned long. + +2016-12-24 Dmitry V. Levin + + sysctl: cast pointers to kernel_ureg_t instead of size_t. + * sysctl.c (SYS_FUNC(sysctl)): Cast __sysctl_args.oldval and + __sysctl_args.newval pointers to kernel_ureg_t instead of size_t. + + sysctl: cast pointers to kernel_ureg_t instead of long. + * sysctl.c (SYS_FUNC(sysctl)): Cast __sysctl_args.oldlenp pointer + to kernel_ureg_t instead of long. + + block: cast pointers to kernel_ureg_t instead of long. + * block.c (print_blkpg_req): Cast blkpg_ioctl_arg.data pointer + to kernel_ureg_t instead of long. + + dumpiov_upto: cast pointers to kernel_ureg_t instead of long. + * util.c (dumpiov_upto): Cast iovec.iov_base pointer to kernel_ureg_t + instead of long. + + msghdr: cast pointers to kernel_ureg_t instead of long. + * msghdr.c (print_struct_msghdr): Cast msghdr.msg_name pointer + to kernel_ureg_t instead of long. + (dumpiov_in_msghdr): Cast msghdr.msg_iov pointer to kernel_ureg_t + instead of long. + + mmsghdr: cast pointers to kernel_ureg_t instead of long. + * mmsghdr.c (dumpiov_in_mmsghdr): Cast msghdr.msg_iov pointer + to kernel_ureg_t instead of long. + + Remove redundant casts of ptrace arguments. + * strace.c (maybe_switch_tcbs, trace): Do not cast ptrace 4th argument + from pointer to long type. + + ptrace_restart: cleanup. + * strace.c (ptrace_restart): Replace the sequence of "if" statements + with a "switch" statement. + + ptrace_restart: change types of integer arguments to unsigned. + * strace.c (ptrace_restart): Change types of "op" and "sig" + from int to unsigned int. + + process: remove redundant syserror checks. + * process.c (SYS_FUNC(ptrace)): Remove syserror checks as both + print_siginfo_array and print_seccomp_fprog do the right thing + by using umoven_or_printaddr. + + sparc64: remove redundant casts. + * linux/sparc64/get_syscall_args.c (get_syscall_args): Remove + redundant casts from uint32_t to long. + +2016-12-23 Dmitry V. Levin + + numa: change address argument type from unsigned long to kernel_ureg_t. + * numa.c (print_nodemask): Change address argument type from + unsigned long to kernel_ureg_t. + + net: change address argument type from unsigned long to kernel_ureg_t. + * net.c (fetch_socklen): Change address argument type from + unsigned long to kernel_ureg_t. + + mem: change tracee address type from unsigned long to kernel_ureg_t. + * mem.c (print_mmap, SYS_FUNC(remap_file_pages), + SYS_FUNC(subpage_prot)): Change the type of variables containing tracee + addresses from unsigned long to kernel_ureg_t. + + kexec: change address argument type from unsigned long to kernel_ureg_t. + * kexec.c (print_kexec_segments): Change address argument type + from unsigned long to kernel_ureg_t. + + poll: change counter type from unsigned long to unsigned int. + * poll.c (decode_poll_exiting): Change the type of printed and + max_printed counters from unsigned long to unsigned int. + + xattr: change address argument type from unsigned long to kernel_ureg_t. + * xattr.c (print_xattr_val, print_xattr_list): Change address + argument type from unsigned long to kernel_ureg_t. + + uid: change address argument type from unsigned long to kernel_ureg_t. + * uid.c (print_groups): Change address argument type + from unsigned long to kernel_ureg_t. + + stat64: change address argument type from unsigned long to kernel_ureg_t + * stat64.c (decode_struct_stat64): Change address argument type + from unsigned long to kernel_ureg_t. + + stat: change address argument type from unsigned long to kernel_ureg_t. + * stat.c (decode_struct_stat): Change address argument type + from unsigned long to kernel_ureg_t. + + sigaltstack: change address argument type from unsigned long to kernel_ureg_t + * sigaltstack.c (print_stack_t): Change address argument type + from unsigned long to kernel_ureg_t. + + resource: change address argument type from unsigned long to kernel_ureg_t + * resource.c (print_rlimit64, print_rlimit32, decode_rlimit): Change + address argument type from unsigned long to kernel_ureg_t. + + printsiginfo: change address argument type from unsigned long to kernel_ureg_t + * printsiginfo.c (print_siginfo_array): Change address argument type + from unsigned long to kernel_ureg_t. + + poll: change tracee address type from unsigned long to kernel_ureg_t. + * poll.c (decode_poll_entering, decode_poll_exiting): Change the type + all tracee address variables from unsigned long to kernel_ureg_t. + + perf: change address argument type from unsigned long to kernel_ureg_t. + * perf.c (fetch_perf_event_attr, print_perf_event_attr): Change + address argument type from unsigned long to kernel_ureg_t. + + pathtrace: change tracee address type from unsigned long to kernel_ureg_t + * pathtrace.c (upathmatch): Change address argument type + from unsigned long to kernel_ureg_t. + (pathtrace_match): Change the type of all tracee address variables + from unsigned long to kernel_ureg_t. + + scsi: change address argument type from unsigned long to kernel_ureg_t. + * scsi.c (print_sg_io_buffer): Change address argument type + from unsigned long to kernel_ureg_t. + + dm: change address argument type from unsigned long to kernel_ureg_t. + * dm.c (dm_decode_dm_target_spec, dm_decode_dm_target_deps, + dm_decode_dm_name_list, dm_decode_dm_target_versions, + dm_decode_dm_target_msg, dm_decode_string): Change address argument type + from unsigned long to kernel_ureg_t. + + oldstat: change address argument type from unsigned long to kernel_ureg_t + * oldstat.c (print_old_kernel_stat): Change address argument type + from unsigned long to kernel_ureg_t. + + capability: change address argument type from unsigned long to kernel_ureg_t + * capability.c (get_cap_header, print_cap_header, print_cap_data): + Change address argument type from unsigned long to kernel_ureg_t. + + btrfs: change address argument type from unsigned long to kernel_ureg_t. + * btrfs.c (btrfs_print_qgroup_inherit): Change address argument type + from unsigned long to kernel_ureg_t. + + affinity: change address argument type from unsigned long to kernel_ureg_t + * affinity.c (print_affinitylist): Change address argument type from + unsigned long to kernel_ureg_t. + + aio: change address type from unsigned long to kernel_ureg_t. + * aio.c (print_iocb): Remove casts to unsigned long. + (print_iocbp, SYS_FUNC(io_submit)): Change address type + from unsigned long to kernel_ureg_t. + + mmsghdr: change address argument type from unsigned long to kernel_ureg_t + * mmsghdr.c (save_mmsgvec_namelen, decode_mmsgvec): Change + address argument type from unsigned long to kernel_ureg_t. + + msghdr: change address argument type from unsigned long to kernel_ureg_t + * msghdr.c (decode_msg_control): Change address argument type + from unsigned long to kernel_ureg_t. + + fetch_struct_stat64: change address argument type from unsigned long to kernel_ureg_t + * fetch_struct_stat64.c (fetch_struct_stat64): Change address argument + type from unsigned long to kernel_ureg_t. + + fetch_struct_stat: change address argument type from unsigned long to kernel_ureg_t + * fetch_struct_stat.c (fetch_struct_stat): Change address argument + type from unsigned long to kernel_ureg_t. + + fetch_struct_msghdr: change address argument type from unsigned long to kernel_ureg_t + * fetch_struct_msghdr.c (fetch_struct_msghdr): Change + address argument type from unsigned long to kernel_ureg_t. + + fetch_struct_mmsghdr: change address argument type from unsigned long to kernel_ureg_t + * fetch_struct_mmsghdr.c (fetch_struct_mmsghdr): Change + address argument type from unsigned long to kernel_ureg_t. + + decode_netlink: change address argument type from unsigned long to kernel_ureg_t + * defs.h (decode_netlink) Change address argument type + from unsigned long to kernel_ureg_t. + * netlink.c (fetch_nlmsghdr, decode_nlmsghdr_with_payload, + decode_netlink): Likewise. + + print_seccomp_*: change address argument type from unsigned long to kernel_ureg_t + * defs.h (print_seccomp_filter, print_seccomp_fprog): Change + address argument type from unsigned long to kernel_ureg_t. + * seccomp.c (print_seccomp_filter, print_seccomp_fprog, + decode_seccomp_set_mode_strict): Likewise. + + tprint_iov*: change address argument type from unsigned long to kernel_ureg_t + * defs.h (tprint_iov, tprint_iov_upto): Change address argument type + from unsigned long to kernel_ureg_t. + * io.c (tprint_iov, tprint_iov_upto): Likewise. + + print_array: change tracee address type from unsigned long to kernel_ureg_t + * defs.h (print_array): Change start_addr type from unsigned long + to kernel_ureg_t. + * util.c (print_array): Likewise. Change the type of all tracee + address variables from unsigned long to kernel_ureg_t. + +2016-12-23 Dmitry V. Levin + + Rename LONG_LONG to ULONG_LONG and change it to return unsigned long long + In all places where LONG_LONG is used the destination already has type + unsigned long long, so it is quite natural to change LONG_LONG as well. + + * defs.h (LONG_LONG): Rename to ULONG_LONG, change return type + from long long to unsigned long long. All callers updated. + +2016-12-23 Dmitry V. Levin + + mem: remove redundant casts. + * mem.c (SYS_FUNC(old_mmap)): Remove redundant cast + from kernel_ureg_t to unsigned long. + [S390] (SYS_FUNC(old_mmap_pgoff)): Remove redundant cast + from unsigned int to unsigned long. + + desc: remove redundant casts. + * desc.c (umove_kulong_array_or_printaddr): Remove redundant cast + from uint32_t to kernel_ulong_t. + (SYS_FUNC(pselect6)): Remove redundant casts from kernel_ulong_t + to unsigned long. + +2016-12-22 Dmitry V. Levin + + print_sigevent: remove redundant cast. + * print_sigevent.c (print_sigevent): Remove redundant cast from + struct_sigevent.sigev_value.sival_ptr to unsigned long as the former + is not a pointer but an unsigned integer. + + tests: fix xattr.test for the case when listxattr returns a long list. + * tests/xattr.c (DEFAULT_STRLEN): New macro. + (main): Use it to limit the length passed to print_quoted_memory. + Print ellipsis when the list returned by listxattr is too long. + +2016-12-22 Gabriel Laskar + + tests: test for correct ellipsis with -s in xattr. + * tests/xattr-strings.c: New file. + * tests/xattr-strings.test: New test. + * tests/.gitignore: Add xattr-string. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add xattr-string.test. + +2016-12-22 Gabriel Laskar + + xattr: use printstr_ex instead of print_quoted_string. + This fixes the display when using `-s` to limit the string size + of the values displayed by {get,set}xattr. + + * xattr.c (print_xattr_val): Remove static buffer. Use printstr_ex + instead of print_quoted_string. + + Reported-by: Марк Коренберг + +2016-12-22 Eugene Syromyatnikov + + tests: use scno.h in finit_module, kcmp, renameat2 tests. + * tests/finit_module.c: Include "scno.h". + * tests/kcmp.c: Likewise. + * tests/renameat2.c: Likewise. + +2016-12-21 Dmitry V. Levin + + sock: cast pointers to kernel_ureg_t instead of unsigned long. + * sock.c (decode_ifconf): Cast ifconf.ifc_buf pointer to kernel_ureg_t + instead of unsigned long. + + scsi: cast pointers to kernel_ureg_t instead of unsigned long. + * scsi.c (print_sg_io_v3_req, print_sg_io_v3_res): Cast sg_io_hdr.cmdp, + sg_io_hdr.dxferp, and sg_io_hdr.sbp pointers to kernel_ureg_t instead + of unsigned long. + + mtd: cast pointers to kernel_ureg_t instead of unsigned long. + * mtd.c (decode_mtd_oob_buf): Cast mtd_oob_buf.ptr pointer + to kernel_ureg_t instead of unsigned long. + + msghdr: cast pointers to kernel_ureg_t instead of unsigned long. + * msghdr.c (print_struct_msghdr): Cast msghdr.msg_iov and + msghdr.msg_control pointers to kernel_ureg_t instead of unsigned long. + + evdev: cast tcp->u_rval to kernel_ureg_t instead of unsigned long. + * evdev.c (decode_bitset): Cast tcp->u_rval to kernel_ureg_t + instead of unsigned long. + + evdev: cast pointers to kernel_ureg_t instead of unsigned long. + * evdev.c (ff_effect_ioctl): Cast ff_periodic_effect.custom_data + pointer to kernel_ureg_t instead of unsigned long. + + btrfs: cast pointers to kernel_ureg_t instead of unsigned long. + * btrfs.c (btrfs_ioctl): Cast btrfs_ioctl_send_args.clone_sources + and btrfs_ioctl_vol_args_v2.qgroup_inherit pointers to kernel_ureg_t + instead of unsigned long. + + Rework ifdefery around print_user_desc. + * configure.ac (AC_CHECK_TYPES): Check for struct user_desc + in . + * clone.c (print_tls_arg): New function. + (SYS_FUNC(clone)): Use it. + (print_user_desc): Move prototype ... + * defs.h [HAVE_STRUCT_USER_DESC]: ... here. + * ldt.c: Check for HAVE_STRUCT_USER_DESC instead of architectures. + * linux/dummy.h: Likewise. + + Introduce DECL_IOCTL macro to declare *_ioctl functions. + * defs.h (DECL_IOCTL): New macro. + (dm_ioctl, file_ioctl, fs_x_ioctl, loop_ioctl, ptp_ioctl, scsi_ioctl, + sock_ioctl, term_ioctl, ubi_ioctl, uffdio_ioctl): Rewrite prototypes + using DECL_IOCTL. + + Introduce DECL_PRINT* macros to declare printnum_* and printpair_* + * defs.h (DECL_PRINTNUM, DECL_PRINTPAIR): New macros. + (printnum_short, printnum_int, printnum_int64): Rewrite prototypes + using DECL_PRINTNUM. + (printpair_int, printpair_int64): Rewrite prototypes + using DECL_PRINTPAIR. + + ioctl: use uintptr_t for casts between 32-bit integers and pointers. + * ioctl.c (compare): Cast pointer to uintptr_t before assigning + it to an integer. + (ioctl_lookup): Cast integer to uintptr_t before passing it + as a pointer. + + scsi: use umove_or_printaddr. + * scsi.c (scsi_ioctl): Use umove_or_printaddr. + + Remove dumpiov wrapper. + * defs.h (dumpiov): Remove. + * syscall.c (dumpio): Use dumpiov_upto instead of dumpiov. + + travis: fix enabling of gcc -Werror builds. + * travis-build.sh: Use DISTCHECK_CONFIGURE_FLAGS instead + of CHECK_CONFIGURE_FLAGS and ENABLE_GCC_WERROR. + [$CC == gcc]: Add --enable-gcc-Werror to DISTCHECK_CONFIGURE_FLAGS + instead of ENABLE_GCC_WERROR. + [$CHECK == coverage]: Add --enable-code-coverage + to DISTCHECK_CONFIGURE_FLAGS instead of CHECK_CONFIGURE_FLAGS. + + printaddr: change argument type to kernel_ureg_t. + * defs.h (printaddr): Change argument type from unsigned long + to kernel_ureg_t. + + tests: check decoding of unreadable ip_mreq and ipv6_mreq structures. + * tests/ip_mreq.c (main): Check short read. + + tests: rewrite ip_mreq.c using arrays and iterators. + * tests/ip_mreq.c (main): Create arrays of setsockopt arguments to test. + Iterate over these arrays invoking setsockopt and printing expected + output. + + tests: rewrite ip_mreq.c using tail_alloc. + * tests/ip_mreq.c (main): Allocate objects of struct ip_mreq + and struct ipv6_mreq using tail_alloc instead of using stack. + + tests: rewrite ip_mreq.c without asserts. + * tests/ip_mreq.c: Do not include . + (main): Do not use assert. Use sprintrc instead of errno2name. + +2016-12-20 Dmitry V. Levin + + Remove NEED_PTRACE_PROTOTYPE_WORKAROUND. + Remove the workaround for broken ptrace prototypes + that seems to be unneeded for quite a long time. + + * defs.h [NEED_PTRACE_PROTOTYPE_WORKAROUND]: Remove. + +2016-12-20 Dmitry V. Levin + + tests: use scno.h in tests of relatively new syscalls. + * tests/add_key.c: Include "scno.h" after . + * tests/copy_file_range.c: Likewise. + * tests/execveat.c: Likewise. + * tests/kexec_file_load.c: Likewise. + * tests/membarrier.c: Likewise. + * tests/memfd_create.c: Likewise. + * tests/mlock2.c: Likewise. + * tests/pkey_alloc.c: Likewise. + * tests/pkey_free.c: Likewise. + * tests/pkey_mprotect.c: Likewise. + * tests/preadv2-pwritev2.c: Likewise. + * tests/userfaultfd.c: Likewise. + +2016-12-20 Dmitry V. Levin + + tests: generate scno.h from syscallent.h for use by other tests. + Provide scno.h with fallback definitions of all __NR_* constants known + to strace for the personbality being tested. + + Some tests need just __NR_* constants without any kernel support. + Such tests can include "scno.h" after to get definitions + of these constants when system headers are too old. + + * tests/generate_scno.c: New file. + * tests/.gitignore: Add generate_scno. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (scno.h): New rule. + (BUILT_SOURCES, CLEANFILES): Add scno.h. + +2016-12-20 Dmitry V. Levin + + tests: fix potential errno clobbering in membarrier test. + * tests/membarrier.c (main): Save errno. + +2016-12-20 Dmitry V. Levin + + Do not use widen_to_ulong in kexec.c and process_vm.c. + Automatic argument truncation makes use of this function redundant. + + * kexec.c (SYS_FUNC(kexec_load)): Do not invoke widen_to_ulong. + * process_vm.c (SYS_FUNC(process_vm_readv), + SYS_FUNC(process_vm_writev)): Likewise. + +2016-12-20 Dmitry V. Levin + + x32: implement automatic argument truncation for compat syscalls. + x32 syscalls starting with number 512 are compat syscalls that operate + on compat types. Set COMPAT_SYSCALL_TYPES flag to these syscall entries + and make get_syscall_args truncate arguments of syscalls that have this + flag set, to avoid unpleasant alternative of adding multiple + widen_to_ulong invocations to individual syscall parsers. + + preadv, pwritev, preadv2, and pwritev2 are exceptions: while these + syscalls operate on compat types, the offset argument has a regular + 64-bit type, so the automatic argument truncation cannot be applied. + + * defs.h (COMPAT_SYSCALL_TYPES): New macro. + * syscall.c (CST): New macro, defined to COMPAT_SYSCALL_TYPES. + * linux/ia64/syscallent.h: Do not include "../i386/syscallent.h" + unless [CST > 0]. + * linux/x32/syscallent.h [512..533, 536..545]: Add CST flag. + * linux/x86_64/get_syscall_args.c (get_syscall_args): Truncate arguments + of compat syscalls to 32-bit values. + * tests/ksysent.c (CST): New macro, defined to 0. + * tests/nsyscalls.c (CST): Likewise. + +2016-12-20 Dmitry V. Levin + + x32: fix decoding of mprotect and pkey_mprotect syscall arguments. + As there are no compat versions of mprotect or pkey_mprotect syscalls + in x32 personality, "addr", "len", and "prot" syscall arguments have + kernel_ulong_t type and should be printed accordingly. + + * mem.c (do_mprotect): Retrieve 1st, 2nd and 3rd arguments using + getarg_klu, print them using printaddr_klu, PRI_klu format, + and printflags64, correspondingly. + +2016-12-20 Dmitry V. Levin + + Make tprint_iov function a static inline wrapper. + * io.c (tprint_iov): Move ... + * defs.h: ... here, add static inline keywords. + +2016-12-20 Eugene Syromyatnikov + + x32: fix decoding of 3rd argument of preadv* and pwritev* syscalls. + In x32 personality these syscalls use compat type for the 3rd argument, + therefore it has to be truncated there. + + * io.c (do_preadv, do_pwritev): Truncate tcp->u_arg[2] using + widen_to_ulong. + +2016-12-19 Eugene Syromyatnikov + + tests: fix preadv2-pwritev2 test on x32. + On x32 p(read|write)v(|2) syscalls are implemented via compat, which + truncates len argument to unsigned int. + + * tests/preadv2-pwritev2.c (main): Print vlen argument as unsigned long. + +2016-12-19 Eugene Syromyatnikov + + kexec: fix for the x32 ABI. + There is no compat (and no 32-bit version, ever) for x32 ABI, so + kernel's long type should be used for arguments' values. + + The only remaining thing is a pointer to cmdline string, but it is + currently broken on x32 anyway. + + * kexec.c (SYS_FUNC(kexec_file_load)): Print the cmdline_len argument + as kernel long, retrieve it via getarg_klu; use printflags64 for + printing the flags argument, retrieve it via getarg_klu. + +2016-12-19 Dmitry V. Levin + + Check for current_klongsize instead of current_personality where appropriate + current_klongsize checks are more universal, therefore they are usually + shorter and easier to comprehend. + + * desc.c (umove_kulong_array_or_printaddr): Check for current_klongsize + instead of current_personality and current_wordsize. + * io.c (print_lld_from_low_high_val): Likewise. + * lseek.c (SYS_FUNC(lseek)): Likewise. + * resource.c (decode_rlimit): Likewise. + * syscall.c (is_negated_errno): Likewise. + * util.c (getllval, getarg_klu): Likewise. + +2016-12-19 Dmitry V. Levin + + Use kernel_ulong_t instead of unsigned long long where appropriate. + * defs.h (printaddr_ull): Rename to printaddr_klu, change argument + type from unsigned long long to kernel_ulong_t. All callers updated. + (getarg_ull): Rename to getarg_klu, change return value type + from unsigned long long to kernel_ulong_t. All callers updated. + (PRI_kl, PRI_kld, PRI_klu, PRI_klx): New macros. + * bjm.c (SYS_FUNC(init_module)): Print kernel_ulong_t type using + PRI_klu format. + * desc.c (SYS_FUNC(pselect6)): Likewise. + * fadvise.c (SYS_FUNC(fadvise64)): Likewise. + * lookup_dcookie.c (SYS_FUNC(lookup_dcookie)): Likewise. + * mq.c (SYS_FUNC(mq_timedsend), SYS_FUNC(mq_timedreceive)): Likewise. + * kcmp.c (SYS_FUNC(kcmp)): Print kernel_ulong_t type using + PRI_klx format. + * keyctl.c (SYS_FUNC(keyctl)): Likewise. + * pkeys.c (SYS_FUNC(pkey_alloc)): Likewise. + * prctl.c (print_prctl_args, SYS_FUNC(prctl), SYS_FUNC(arch_prctl)): + Print kernel_ulong_t type using PRI_kld, PRI_klu, or PRI_klx format. + * util.c (printaddr_ull): Rename to printaddr_klu, change argument + type from unsigned long long to kernel_ulong_t, print it using + PRI_klx format. + (getarg_ull): Rename to getarg_klu, change return value type + from unsigned long long to kernel_ulong_t, print it using + PRI_klx format. + + fcntl.c: print 64-bit fields of struct_kernel_flock64 using PRId64 format + * fcntl.c (print_struct_flock64): Print l_start and l_len fields + of struct_kernel_flock64 using PRId64 format. + + v4l2.c: print v4l2_ext_control.value64 using PRId64 format. + * v4l2.c (print_v4l2_ext_control): Print value64 field + of struct_v4l2_ext_control using PRId64 format. + + perf.c: print perf_event_attr.__reserved_1 using PRIx64 format. + * perf.c (print_perf_event_attr): Print __reserved_1 field + of perf_event_attr using PRIx64 format. + + btrfs.c: print 64-bit fields of btrfs_ioctl_vol_args_v2 using PRIu64 format + * block.c (btrfs_ioctl): Print size and transid fields + of struct_btrfs_ioctl_vol_args_v2 using PRIu64 format. + + block.c: change type of long long fileds to int64_t. + * block.c (struct_blkpg_partition): Change type of start and length + fields from long long to int64_t. + (print_blkpg_req): Print them using PRId64 format. + +2016-12-19 Eugene Syromyatnikov + + Introduce current_klongsize in addition to current_wordsize. + Subsequent commits are going to use current_klongsize + as the tracee's size of kernel_ulong_t type. + + * defs.h (PERSONALITY0_KLONGSIZE): New macro. + [X86_64] (PERSONALITY2_KLONGSIZE): Likewise. + [SUPPORTED_PERSONALITIES > 1] (PERSONALITY1_KLONGSIZE): Likewise. + [SUPPORTED_PERSONALITIES == 1] (current_klongsize): Likewise. + [SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_KLONGSIZE == + PERSONALITY1_KLONGSIZE] (current_klongsize): Likewise. + [SUPPORTED_PERSONALITIES != 1 && (SUPPORTED_PERSONALITIES != 2 || + PERSONALITY0_KLONGSIZE != PERSONALITY1_KLONGSIZE)] (current_klongsize): + New variable prototype. + * syscall.c [!current_klongsize] (current_klongsize): New variable. + [!current_klongsize] (personality_klongsize): New array. + (set_personality) [!current_klongsize]: Update current_klongsize + with the appropriate value from personality_klongsize. + +2016-12-19 Dmitry V. Levin + + configure: define SIZEOF_KERNEL_LONG_T macro. + Provide SIZEOF_KERNEL_LONG_T macro in addition to SIZEOF_LONG and + SIZEOF_LONG_LONG for checking of kernel_long_t and kernel_ulong_t + types at the time of preprocessing. + + * configure.ac (AC_CHECK_SIZEOF): Add kernel_long_t. + +2016-12-19 Dmitry V. Levin + + Remove getarg_ll. + This function has never been used in the code, and in perspective + the whole ext_arg thing will go away. + + * defs.h (getarg_ll): Remove prototype. + * util.c (getarg_ll): Remove. + +2016-12-19 Dmitry V. Levin + + struct tcb: make types of syscall arguments unsigned. + This is the first step in the direction of revisiting current practice + of indiscriminate use of signed types for syscall arguments and memory + addresses. + + * kernel_types.h (kernel_ureg_t): New type, typedef to unsigned long. + * defs.h (struct tcb): Change type of u_arg from long to kernel_ureg_t. + [HAVE_STRUCT_TCB_EXT_ARG]: Change type of ext_arg from long long + to unsigned long long. + * desc.c (decode_select): Change type of syscall arguments from long + to kernel_ureg_t. + (SYS_FUNC(oldselect)): Change type of select_args from long + to kernel_ureg_t. + * io.c (print_lld_from_low_high_val): Remove no longer needed cast + of syscall arguments to unsigned long. + * lseek.c (SYS_FUNC(lseek)): Cast syscall argument from unsigned long + to long. + * mem.c (print_mmap): Change type of syscall arguments from long + to kernel_ureg_t. + (SYS_FUNC(old_mmap), SYS_FUNC(old_mmap_pgoff)): Change type of u_arg + from long to kernel_ureg_t. + (SYS_FUNC(mmap), SYS_FUNC(mmap_pgoff), SYS_FUNC(mmap_pgoff)): Remove + no longer needed cast of syscall arguments to unsigned long. + * pathtrace.c (pathtrace_match): Change type of args and select_args + from long to kernel_ureg_t. + * util.c (getarg_ull): Remove no longer needed casts of syscall + arguments to unsigned types. + +2016-12-19 Dmitry V. Levin + + s390: fix decoding of mmap2 syscall when arguments are not available. + * mem.c [S390] (SYS_FUNC(old_mmap_pgoff)): Use umove_or_printaddr + instead of umoven to fetch mmap arguments, fix return value when this + fetch fails. + + Fix pathmatch of oldselect syscall on 64-bit architectures. + * pathtrace.c (pathtrace_match): Fix fetching of 32-bit oldselect + arguments on 64-bit architectures. + + Cleanup oldselect. + * desc.c (SYS_FUNC(oldselect)): Rewrite without use of macros. + +2016-12-18 Dmitry V. Levin + + Change scno type from long to unsigned long. + Use an unsigned type for syscall numbers as they are not intended + for signed arithmetics. Introduce kernel_scno_t as a typedef + to unsigned long, that could be changed later to kernel_ulong_t. + + * kernel_types.h (kernel_scno_t): New type, typedef to unsigned long. + * defs.h (struct tcb): Change type of scno field from long + to kernel_scno_t. + (syscall_name): Change argument type from long to kernel_scno_t. + (scno_in_range, scno_is_valid): Change argument type from unsigned long + to kernel_scno_t. + * linux/aarch64/set_scno.c (arch_set_scno): Change scno argument type + from long to kernel_scno_t. + * linux/alpha/set_scno.c (arch_set_scno): Likewise. + * linux/arc/set_scno.c (arch_set_scno): Likewise. + * linux/arm/set_scno.c (arch_set_scno): Likewise. + * linux/avr32/set_scno.c (arch_set_scno): Likewise. + * linux/bfin/set_scno.c (arch_set_scno): Likewise. + * linux/crisv10/set_scno.c (arch_set_scno): Likewise. + * linux/hppa/set_scno.c (arch_set_scno): Likewise. + * linux/i386/set_scno.c (arch_set_scno): Likewise. + * linux/ia64/set_scno.c (arch_set_scno): Likewise. + * linux/m68k/set_scno.c (arch_set_scno): Likewise. + * linux/metag/set_scno.c (arch_set_scno): Likewise. + * linux/microblaze/set_scno.c (arch_set_scno): Likewise. + * linux/mips/set_scno.c (arch_set_scno): Likewise. + * linux/nios2/set_scno.c (arch_set_scno): Likewise. + * linux/or1k/set_scno.c (arch_set_scno): Likewise. + * linux/powerpc/set_scno.c (arch_set_scno): Likewise. + * linux/riscv/set_scno.c (arch_set_scno): Likewise. + * linux/s390/set_scno.c (arch_set_scno): Likewise. + * linux/sh/set_scno.c (arch_set_scno): Likewise. + * linux/sh64/set_scno.c (arch_set_scno): Likewise. + * linux/sparc/set_scno.c (arch_set_scno): Likewise. + * linux/tile/set_scno.c (arch_set_scno): Likewise. + * linux/x86_64/set_scno.c (arch_set_scno): Likewise. + * linux/xtensa/set_scno.c (arch_set_scno): Likewise. + * linux/aarch64/get_scno.c (arch_get_scno): Change scno variable type + from long to kernel_scno_t. + * linux/alpha/get_scno.c (arch_get_scno): Likewise. + * linux/arm/get_scno.c (arch_get_scno): Likewise. + * linux/sh/get_scno.c (arch_get_scno): Likewise. + * linux/x86_64/get_scno.c (arch_get_scno): Likewise. + * syscall.c (arch_set_scno): Likewise. + (shuffle_scno): Change return type from long to kernel_scno_t. + (syscall_name): Change argument type from long to kernel_scno_t. + +2016-12-18 Dmitry V. Levin + + Lowercase SCNO_IN_RANGE and SCNO_IS_VALID. + * defs.h (SCNO_IN_RANGE): Rename to scno_in_range. All callers updated. + (SCNO_IS_VALID): Rename to scno_is_valid. All callers updated. + + Turn SCNO_IN_RANGE and SCNO_IS_VALID into static inline functions. + * defs.h (SCNO_IN_RANGE, SCNO_IS_VALID): Transform into static inline + functions. + + count.c: use syserror instead of direct u_error access. + * count.c (count_syscall): Use syserror instead of u_error. + + Replace "(unsigned long) -1L" with -1UL. + * defs.h (dumpiov): Replace "(unsigned long) -1L" with -1UL. + * io.c (print_iovec, tprint_iov): Likewise. + * msghdr.c (SYS_FUNC(sendmsg)): Likewise. + * syscall.c (dumpio): Likewise. + * poll.c (decode_poll_exiting): Replace "(unsigned int) -1" with -1U. + + Add toplevel recursive check-valgrind rule. + * Makefile.am (.PHONY): Add check-valgrind-local. + (check-valgrind): New rule. + * configure.ac (AM_EXTRA_RECURSIVE_TARGETS): Add it. + + m4: fix check-valgrind-* rules generated by AX_VALGRIND_CHECK. + * m4/ax_valgrind_check.m4 (check-valgrind-$(1)): Depend + on $(BUILT_SOURCES), honor $(AM_MAKEFLAGS), build check-am + instead of check-TESTS. + + travis: do coverage using a dedicated build. + * .travis.yml (after_success): Remove. + (matrix): Create an entry for the regular x86_64 target. + * travis-success.sh: Merge into ... + * travis-build.sh: ... this file. Disable optimization + for coverage builds. + * travis-install.sh: Rename COVERAGE=true to CHECK=coverage. + +2016-12-17 Dmitry V. Levin + + mips n32: provide fallback definitions of kernel_long_t/kernel_ulong_t. + * kernel_types.h [!(HAVE___KERNEL_LONG_T && HAVE___KERNEL_ULONG_T) && + LINUX_MIPSN32] (kernel_long_t, kernel_ulong_t): Define to long long types. + +2016-12-17 Eugene Syromyatnikov + + util: simplify definitions of bit mask constants in umovestr. + * util.c (umovestr): Do not check for SIZEOF_LONG in definitions + of bit mask constants. + + tests: check decoding of prctl operations without arguments. + * tests/prctl-no-args.c: New file. + * tests/prctl-no-args.test: New test. + * tests/.gitignore: Add prctl-no-args. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add prctl-no-args.test. + + tests: check decoding of prctl PR_[GS]ET_SECUREBITS operations. + * tests/prctl-securebits.c: New file. + * tests/prctl-securebits.test: New test. + * tests/.gitignore: Add prctl-securebits. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add prctl-securebits.test. + + tests: check decoding of prctl PR_[GS]ET_DUMPABLE operations. + * tests/prctl-dumpable.c: New file. + * tests/prctl-dumpable.test: New test. + * tests/.gitignore: Add prctl-dumpable. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add prctl-dumpable.test. + + prctl: implement decoding of SUID_DUMP_* constants in PR_[GS]ET_DUMPABLE + * xlat/pr_dumpable.in: New file. + * prctl.c: Include "xlat/pr_dumpable.h". + (SYS_FUNC(prctl)): Decode returned value of PR_GET_DUMPABLE operation + and the second syscall argument of PR_SET_DUMPABLE operation + as SUID_DUMP_* constants. + +2016-12-16 Dmitry V. Levin + + Include "kernel_types.h" in defs.h and tests/tests.h. + As kernel_ulong_t type is going to be used in the definition + of struct tcb and in many function prototypes, make it readily + available for every source file by including "kernel_types.h" + in defs.h and tests/tests.h files. + + * defs.h: Include "kernel_types.h". + * tests/tests.h: Likewise. + * desc.c: Do not include "kernel_types.h". + * dirent.c: Likewise. + * keyctl.c: Likewise. + * syscall.c: Likewise. + * linux/asm_stat.h: Likewise. + * tests/answer.c: Likewise. + * tests/epoll_pwait.c: Likewise. + * tests/fanotify_init.c: Likewise. + * tests/fanotify_mark.c: Likewise. + * tests/file_handle.c: Likewise. + * tests/ftruncate.c: Likewise. + * tests/getdents.c: Likewise. + * tests/init_delete_module.h: Likewise. + * tests/inotify.c: Likewise. + * tests/inotify_init1.c: Likewise. + * tests/ioprio.c: Likewise. + * tests/ipc_msgbuf.c: Likewise. + * tests/kcmp.c: Likewise. + * tests/kexec_file_load.c: Likewise. + * tests/kexec_load.c: Likewise. + * tests/keyctl.c: Likewise. + * tests/lookup_dcookie.c: Likewise. + * tests/lseek.c: Likewise. + * tests/mq_sendrecv.c: Likewise. + * tests/nsyscalls.c: Likewise. + * tests/pkey_alloc.c: Likewise. + * tests/pkey_free.c: Likewise. + * tests/pkey_mprotect.c: Likewise. + * tests/prctl-pdeathsig.c: Likewise. + * tests/prctl-tsc.c: Likewise. + * tests/preadv2-pwritev2.c: Likewise. + * tests/process_vm_readv_writev.c: Likewise. + * tests/read-write.c: Likewise. + * tests/setfsugid.c: Likewise. + * tests/setns.c: Likewise. + * tests/truncate.c: Likewise. + * tests/unshare.c: Likewise. + * tests/xgetrlimit.c: Likewise. + +2016-12-15 Dmitry V. Levin + + Post-release administrivia. + * NEWS: Add a header line for the next release. + * debian/changelog.in: Add a changelog entry for 4.15-1. + * strace.spec.in: Likewise. + +2016-12-14 Dmitry V. Levin + + xlat: provide fallback definitions for NETLINK_* constants. + As new constants have been added gradually over kernel releases, define + all constant values to make newer constants decoded properly when strace + is built with older kernel headers. + + * xlat/netlink_protocols.in: Add default values for constants. + * net.c [!NETLINK_SOCK_DIAG && NETLINK_INET_DIAG]: Remove. + * socketutils.c: Likewise. + +2016-12-14 Dmitry V. Levin + + tests: relax getaffinity return value check in tests/sched_xetaffinity.c + * tests/sched_xetaffinity.c (errstr): New variable. + (getaffinity, setaffinity): Initialize it. + (main): Use it. Allow getaffinity return value to be less than + its cpusetsize argument. + + tests: fix threads-execve.test for large pids. + * tests/threads-execve.c (main): Fix expected output for large pids. + +2016-12-13 Dmitry V. Levin + + Prepare for 4.15 release. + * NEWS: Update for 4.15 release. + + .mailmap: add addresses of Thomas De Schampheleire. + * .mailmap: Add both addresses of Thomas De Schampheleire here to avoid + duplications in CREDITS file. + + Sync strace.spec and debian/ with packages. + * debian/control: Add Vcs-* metadata from 4.13-0.1. + * debian/watch: Sync with 4.13-0.1. + * strace.spec.in: Sync with 4.14.0.100.622a-1. + +2016-12-13 Dmitry V. Levin + + tests: workaround a bug in GNU grep. + Workaround a bug introduced in GNU grep 2.27, for details see + https://lists.gnu.org/archive/html/bug-grep/2016-12/msg00011.html + + * tests/init.sh (grep_pid_status): New function. + * tests/detach-running.test: Use it instead of grep to search + in /proc/$pid/status. + * tests/detach-sleeping.test: Likewise. + * tests/detach-stopped.test: Likewise. + +2016-12-13 Eugene Syromyatnikov + + tests: fix typo in comment inside prctl-tsc.c. + +2016-12-13 Sean Stangl + Dmitry V. Levin + + Fix libunwind segfault when -p is passed before -k. + * strace.c (init) [USE_LIBUNWIND]: Call unwind_tcb_init after + unwind_init for all allocated tcb structures if stack trace is enabled. + * unwind.c (unwind_tcb_init): Skip if tcb is already initialized. + +2016-12-13 Eugene Syromyatnikov + Dmitry V. Levin + + Update NEWS. + +2016-12-07 Dmitry V. Levin + + tests: skip fault injection tests on unsupported platforms. + * tests/fault_injection.sh: New file. + * tests/Makefile.am (EXTRA_DIST): Add it. + * tests/fault_injection-exit_group.test: Use it. + * tests/fault_injection.test: Likewise. + + tests: introduce require_min_kernel_version_or_skip function. + * tests/init.sh (kernel_version_code, + require_min_kernel_version_or_skip): New functions. + * tests/threads-execve.test: Use require_min_kernel_version_or_skip. + +2016-12-07 Eugene Syromyatnikov + + tests: add descriptions to prctl-pdeathsig and prctl-tsc tests. + +2016-12-07 Dmitry V. Levin + + tests: robustify prctl-pdeathsig.test and prctl-tsc.test. + Rrobustify remaining prctl tests against unrelated prctl invocations + + * tests/prctl-pdeathsig.test: Filter out unrelated PR_GET_* and PR_SET_* + prctl calls. + * tests/prctl-tsc.test: Likewise. + +2016-12-07 Thomas De Schampheleire + + Makefile.am: don't confuse CFLAGS and CFLAGS_FOR_BUILD. + Commit dc427d50d96b15c9a64d7e78d97ce4d194622a63 enabled a number of extra + warning flags through configure.ac. The configure script will determine + dynamically if CC supports these flags before adding them to WARN_CFLAGS. + + ioctlsort is compiled with CC_FOR_BUILD, rather than CC. Nevertheless, + the flags passed to this compilation also include WARN_CFLAGS (through + AM_CFLAGS). This is incorrect: in a cross-compilation use case, CC + and CC_FOR_BUILD are not the same. The former is the cross-compiler, + the latter is the host compiler. Both may be of different versions + and support different warning flags. + + In particular, this posed a problem when cross-compiling with a host + compiler gcc 4.1, which does not support all the new flags: + + /usr/bin/gcc -DHAVE_CONFIG_H -I./linux/arm -I./linux/arm -I./linux + -I./linux -I. -I. -I/host-sysroot/usr/include -Wall -Wempty-body + -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op + -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration + -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings -O2 + -I/host-sysroot/usr/include -DIOCTLSORT_INC=\"ioctls_all0.h\" -c -o + ioctlsort0.o ./ioctlsort.c + cc1: error: unrecognized command line option "-Wempty-body" + cc1: error: unrecognized command line option "-Wignored-qualifiers" + cc1: error: unrecognized command line option "-Wlogical-op" + cc1: error: unrecognized command line option "-Wmissing-parameter-type" + cc1: error: unrecognized command line option "-Wold-style-declaration" + cc1: error: unrecognized command line option "-Wtype-limits" + make[2]: *** [ioctlsort0.o] Error 1 + + * Makefile.am (AM_CFLAGS_FOR_BUILD, AM_CPPFLAGS_FOR_BUILD): New + variables. + (ioctlsort_CPPFLAGS): Use AM_CPPFLAGS_FOR_BUILD instead of AM_CPPFLAGS. + (ioctlsort_CFLAGS): Use AM_CFLAGS_FOR_BUILD instead of AM_CFLAGS. + (ioctlsort_LDFLAGS): Use AM_LDFLAGS_FOR_BUILD instead of AM_LDFLAGS. + * m4/ax_prog_cc_for_build.m4 (AX_PROG_CC_FOR_BUILD): Redirect + WARN_CFLAGS and gl_unknown_warnings_are_errors, call st_WARN_CFLAGS, + substitute WARN_CFLAGS_FOR_BUILD. + +2016-12-07 Dmitry V. Levin + + m4: prepare gl_WARN_ADD for simultaneous use of multiple compilers. + * m4/warnings.m4 (gl_COMPILER_OPTION_IF): Change gl_Flags to use + _AC_LANG_PREFIX[]FLAGS in unquoted form. Change gl_Warn to use gl_Flags + instead of _AC_LANG_ABBREV. Change notification message to mention + the variable name of the compiler. + (gl_UNKNOWN_WARNINGS_ARE_ERRORS): Do nothing if + gl_unknown_warnings_are_errors is set. + (gl_WARN_ADD): Change the use of gl_UNKNOWN_WARNINGS_ARE_ERRORS from + AC_REQUIRE to a regular call. + +2016-12-07 Dmitry V. Levin + + AX_PROG_CC_FOR_BUILD: redirect more variables related to C compiler. + Some of these variables cannot be redirected using traditional + pushdef/popdef mechanism because of complex constructions like + [ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu] employed by autoconf macros. + Use st_SAVE_VAR/st_RESTORE_VAR to workaround this issue. + + * m4/ax_prog_cc_for_build.m4: Redirect ac_cv_prog_cc_stdc, + ac_cv_prog_cc_c11, ac_cv_prog_cc_c99, ac_cv_prog_cc_c89, + am_cv_prog_cc_c_o, and am_cv_CC_dependencies_compiler_type using + pushdef/popdef. + Redirect ac_c_decl_warn_flag, ac_c_preproc_warn_flag, ac_c_werror_flag, + ac_compile, ac_compiler_gnu, ac_cpp, ac_cv_c_compiler_gnu, + ac_cv_c_decl_report, and ac_link using st_SAVE_VAR/st_RESTORE_VAR. + +2016-12-07 Dmitry V. Levin + + Move all gl_WARN_ADD calls to a separate m4 macro. + This is going to be needed for the upcoming AX_PROG_CC_FOR_BUILD + change. + + * configure.ac: Call st_WARN_CFLAGS before AX_PROG_CC_FOR_BUILD. + Move all gl_WARN_ADD calls ... + * m4/st_warn_cflags.m4: ... here. + +2016-12-07 Dmitry V. Levin + + m4: introduce st_SAVE_VAR and st_RESTORE_VAR macros. + These new macros are going to be needed for the upcoming + AX_PROG_CC_FOR_BUILD change. + + * m4/st_save_restore_var.m4: New file. + +2016-12-06 Dmitry V. Levin + + tests: add valgrind support to "make check" + * m4/ax_valgrind_check.m4: Import from the autoconf-archive package. + * configure.ac: Invoke AX_VALGRIND_CHECK. + * valgrind.supp: Move to tests/strace.supp. + * Makefile.am (EXTRA_DIST): Remove valgrind.supp. + * tests/Makefile.am: Add @VALGRIND_CHECK_RULES@. + (VALGRIND_FLAGS, VALGRIND_SUPPRESSIONS_FILES): New variables. + (EXTRA_DIST): Add strace.supp. + * tests/init.sh: Add valgrind command prefix to $STRACE when appropriate. + +2016-12-06 Dmitry V. Levin + + tests: robustify threads-execve.test against race conditions. + Due to probabilistic nature of the test, try it several times. + + * tests/threads-execve.c (NUMBER_OF_ITERATIONS): Change to 1. + * tests/threads-execve.test: Iterate up to 10 times. + +2016-12-06 Dmitry V. Levin + + tests: fix expected output in strace-ttt.test. + If strace -ttt is running too long, it might happen that time stamps + before and after its invocation differ for more than a second. + Adjust expected output to handle this rare but possible case. + + * tests/strace-ttt.test: Allow any time stamp between start and finish + of strace invocation. + +2016-12-06 Dmitry V. Levin + + tests: fix expected output in strace-tt.test. + If strace -tt is running too long, it might happen that time stamps + before and after its invocation differ for more than a second. + Adjust expected output to handle this rare but possible case. + + * tests/strace-tt.test: Allow any time stamp between start and finish + of strace invocation. + +2016-12-06 Dmitry V. Levin + + tests: robustify redirect.test against race conditions. + Introduce a synchronization mechanism between the tracee and its peer. + + * tests/redirect.test: Change timeout file to $OUT. Let the tracee + remove $LOG, wait for $LOG removal in its peer. + +2016-12-06 Dmitry V. Levin + + tests: robustify attach-f-p.test against race conditions. + Introduce a synchronization mechanism between attach-f-p and strace. + + * tests/attach-f-p-cmd.c: New file. + * tests/Makefile.am (check_PROGRAMS): Add attach-f-p-cmd. + * tests/attach-f-p.c: Include . + (main): Write to stdout instead of descriptor 3. Wait for the peer + writing to stdout. + * tests/attach-f-p.test: Assume that ./attach-f-p-cmd works. + Use $OUT for expected output. Use attach-f-p-cmd for unlocking $OUT. + +2016-12-06 Dmitry V. Levin + + tests: robustify attach-p-cmd.test against race conditions. + Introduce a synchronization mechanism between attach-p-cmd-p + and attach-p-cmd-cmd processes. + + * tests/attach-p-cmd-cmd.c: Include and . + (main): Wait for the lock directory creation by attach-p-cmd-p. + * tests/attach-p-cmd-p.c: Include and . + (main): Create a lock directory and wait for its removal + by attach-p-cmd-cmd. + * tests/attach-p-cmd.test: Assume that test programs work. + +2016-12-05 Dmitry V. Levin + + Rewrite remaining qual_* parsers using bit sets. + * defs.h (struct fault_opts): Replace forward declaration + with a definition. + (qualbits_t, qualify_read, qualify_write, qualify_signals): Remove. + (qual_flags): New function prototype. + (nsyscall_vec, sysent_vec, fault_vec): New variable prototypes. + * qualify.c (abbrev_set, fault_set, raw_set, trace_set, verbose_set): + New variables. + (qualify_read, qualify_write, qualify_signals): Add static qualifier. + (find_errno_by_name, lookup_class, parse_fault_expression, + parse_fault_token, qual_flags, qualify, qualify_abbrev, qualify_fault, + qualify_raw, qualify_syscall, qualify_syscall_class, + qualify_syscall_name, qualify_syscall_number, qualify_syscall_tokens, + qualify_trace, qualify_verbose, strip_prefix): New functions. + * syscall.c (nsyscall_vec, nsysent_vec): Remove static qualifier. + (MAX_NSYSCALLS1, MAX_NSYSCALLS2, MAX_NSYSCALLS, qual_vec, qual_flags, + qual_fault, qual_syscall, qual_options, fault_opts, qualify_one, + qualify_scno, lookup_class, qualify_syscall_class, qualify_syscall_name, + qual_syscall_ex, qual_syscall, strip_prefix, find_errno_by_name, + parse_fault_token, parse_fault_expression, qual_fault, qualify): Remove. + (decode_socket_subcall, decode_ipc_subcall, decode_mips_subcall, + get_scno): Update use of qual_flags. + (inject_syscall_fault_entering): Update per-personality allocation + of tcp->fault_vec. + * tests/fault_injection-exit_group.test: Check parsing of inversed + fault sets. + * tests/fault_injection.test: Check parsing of -efault=none. + * tests/options-syntax.test: Check parsing of invalid syscall numbers. + + Change qual_vec/qual_fault into static fixed size arrays. + * defs.h (qual_vec, num_quals): Remove. + (qual_flags): Move ... + * syscall.c: ... here. + (num_quals, num_faults, MIN_QUALS, reallocate_vec, reallocate_qual, + reallocate_fault): Remove. + (qual_vec, qual_fault): Change into static fixed size arrays. + (qualify_one): Remove reallocate_qual and reallocate_fault calls. + (qualify): Likewise. Replace num_quals and num_faults with + MAX_NSYSCALLS. + + Rewrite qual_signal using bit sets. + * defs.h (signal_set): New variable prototypes. + (qualify_signals): New function prototypes. + (QUAL_SIGNAL): Change to a value greater than 0xff. + (QUAL_FAULT): Change to a lower value. + * qualify.c (signal_set): New variable. + (sigstr_to_uint, qualify_signals): New functions. + * syscall.c (qual_signal): Remove. + (qual_options): Replace qual_signal with NULL. + (qualify): Use qualify_signals. + * strace.c (print_signalled, print_stopped): Use is_number_in_set + with signal_set argument. + +2016-12-05 Dmitry V. Levin + + Rewrite qual_desc using bit sets. + As a side effect, this also fixes support of negated sets + of descriptors. + + * defs.h (struct number_set): New forward declaration. + (read_set, write_set): New variable prototypes. + (is_number_in_set, qualify_read, qualify_write): New function + prototypes. + (QUAL_READ, QUAL_WRITE): Change to values greater than 0xff. + * qualify.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * syscall.c (qual_desc): Remove. + (qual_options): Replace qual_desc with NULL. + (qualify): Use qualify_read and qualify_write. + (dumpio): Use is_number_in_set. + * tests/options-syntax.test: Check invalid sets of descriptors. + * tests/readv.test: Check dumping of negated sets of descriptors. + +2016-12-05 Dmitry V. Levin + + tests: skip redirect-fds.test when strace is wrapped with valgrind. + valgrind is not as transparent as strace wrt standard descriptors, + so if strace is wrapped with valgrind, the test would check valgrind + transparency properties and fail imminently. + + * tests/redirect-fds.test: Skip the test when $STRACE shows a presence + of valgrind. + +2016-12-05 Dmitry V. Levin + + Add valgrind.supp. + As valgrind is not quite happy about the way how get_cpuset_size uses + sched_getaffinity, add a suppression file for this case. + + * valgrind.supp: New file. + * Makefile.am (EXTRA_DIST): Add it. + +2016-12-05 Dmitry V. Levin + + affinity: pass 0 as a pid to sched_getaffinity. + * affinity.c (get_cpuset_size): Pass 0 instead of getpid() + to sched_getaffinity. + + affinity: document the method of finding out the cpuset size. + * affinity.c (get_cpuset_size): Add a comment about sched_getaffinity. + +2016-12-05 Dmitry V. Levin + + tests: make options-syntax.test tolerant of strace wrappers. + Change the test to allow wrappers like STRACE="valgrind ./strace". + + * tests/options-syntax.test: Strip all words but last from $STRACE + variable in all contexts where the name of strace executable is expected + in its output. + +2016-12-04 Dmitry V. Levin + + Do not allocate memory for line buffered output. + libc is perfectly capable of allocating memory for its buffers, + so let it do its job. + + * strace.c (init): Do not allocate memory for setvbuf invocation. + +2016-12-04 Eugene Syromyatnikov + + Update NEWS. + + tests: use kernel_ulong_t as argument type in setfsuid/setfsgid tests. + * setfsugid.c: Include "kernel_types.h". + (main): Change type of entries of the "tests" array from long to + kernel_ulong_t. + +2016-12-04 Eugene Syromyatnikov + Elvira Khabirova + + uid: print size as signed in setgroups/getgroups. + As this is the type used in kernel. + + * uid.c (SYS_FUNC(setgroups), SYS_FUNC(getgroups)): Print size parameter + as "%d". + * tests/getgroups.c: Update expected output. + * tests/setgroups.c: Likewise. + +2016-12-04 Eugene Syromyatnikov + Elvira Khabirova + + uid: use printuid for printing UID/GID value. + * uid.c (setfsuid, get_print_uid, print_gid): Use printuid. + * tests/setfsugid.c (printuid): New function. + (main): Use it to print UID/GID values. + * tests/setgroups.c: Likewise. + * tests/setugid.c (ugid2int): Remove. + (printuid): New function. + (main): Use it to print UID/GID values. + +2016-12-01 Eugene Syromyatnikov + + tests: additional check for PTRACE_SETSIGINFO ptrace command. + * tests/ptrace.c (main): Add an additional PTRACE_SETSIGINFO check. + +2016-12-01 Dmitry V. Levin + + syscall_name: clear __X32_SYSCALL_BIT from syscall number on x32. + * linux/x86_64/get_scno.c (X32_PERSONALITY_NUMBER): New macro. + * syscall.c (syscall_name) [X32_PERSONALITY_NUMBER && __X32_SYSCALL_BIT]: + Clear __X32_SYSCALL_BIT from scno on x32 personality. + +2016-12-01 Eugene Syromyatnikov + + Print syscall names only for defined syscalls. + The string literal "__NR_syscall_4294967295" is semantically incorrect + as there is no such constant defined. + + * syscall.c (syscall_name): Return NULL if there is no syscall + corresponding to the given number. + * defs.h (syscall_name): Document this behaviour. + * printsiginfo.c (print_si_info): Print syscall name with "__NR_" prefix + only if there is a syscall corresponding to si_syscall number; print + a plain syscall number otherwise. + * tests/ptrace.c (main): Update expected output. + +2016-12-01 Eugene Syromyatnikov + + affinity: print cpu set as an array. + * affinity.c: Add comma between elements of cpu set. + * tests/sched_xetaffinity.c (main): Update expected output. + + statfs: fix printing format of f_fsid field. + * print_statfs.c: Print f_fsid as a structure containing field "val" + which, in turn, is an array of two elements that used to be printed + as members of f_fsid structure. + * tests/statfs.expected: Update expected output. + * tests/xstatfsx.c (print_statfs): Likewise. + + swap: always print priority value. + * swapon.c (SYS_FUNC(swapon)): Do not check for non-zero the value + of the prio variable in order to print it. + * tests/swap.c (main): Update expected output. + +2016-12-01 Elvira Khabirova + + tests: show pattern line number in match_grep. + This makes debugging of failing test a bit easier. + + * tests/init.sh (match_grep): Add the cnt variable, increment it on every + pattern line read, print it as a prefix for non-matched pattern. + +2016-11-30 Eugene Syromyatnikov + Elvira Khabirova + + futex: make output of the val3 argument of the FUTEX_WAKE_OP command more structured + It is a number which consists of several xlat values, not a structure. + + * futex.c (SYS_FUNC(futex)): Modify output of the val3 argument + of the FUTEX_WAKE_OP futex syscall command. + * tests/futex.c (main): Update expected output. + +2016-11-30 Eugene Syromyatnikov + + tests: additional checks for prctl-* tests. + * tests/prctl-pdeathsig.c (main): Additional checks. + * tests/prctl-tsc.c (main): Likewise. + * tests/prctl-pdeathsig.test: Update value of -a argument. + * tests/prctl-tsc.test: Likewise. + +2016-11-30 JingPiao Chen + + tests: add prctl-pdeathsig.test and prctl-tsc.test. + * tests/prctl-pdeathsig.c: New file. + * tests/prctl-tsc.c: Likewise. + * tests/prctl-pdeathsig.test: New test. + * tests/prctl-tsc.test: Likewise. + * tests/.gitignore: Add prctl-pdeathsig and prctl-tsc. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add prctl-pdeathsig.test and prctl-tsc.test. + +2016-11-30 Dmitry V. Levin + + syscall: Simplify strip_prefix. + * syscall.c (strip_prefix): Use strncmp instead of strlen+memcmp. + + util: fix integer overflow check in string_to_uint_ex. + * util.c (string_to_uint_ex): Fix the check for integer overflow + on systems where LONG_MAX == INT_MAX. + + Check dumping of io syscalls when descriptor arguments are sensibly large + * tests/tests.h (pipe_maxfd): New prototype. + * tests/pipe_maxfd.c: New file. + * tests/print_maxfd.c: Likewise. + * tests/.gitignore: Add print_maxfd. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (libtests_a_SOURCES): Add pipe_maxfd.c. + * tests/readv.c (main): Use pipe_maxfd() instead of pipe(), + fds[0] instead of 0, fds[1] instead of 1. + * tests/readv.test: Use print_maxfd to specify dump descriptor numbers. + + dumpio: remove useless check. + * syscall.c (dumpio): Remove SEN_printargs check. Use tcp->s_ent->sen + directly. + +2016-11-29 Dmitry V. Levin + + Fix dumping of io syscalls when descriptor argument has unused bits set. + * syscall.c (dumpio): Explicitly cast the first argument of syscall + to "int", the same way as the kernel does. + * tests/read-write.c: Include and "kernel_types.h". + (k_read, k_write): New functions. + (test_dump, main): Use them. + + x32: fix preadv2-pwritev2.test. + * tests/preadv2-pwritev2.c: Include "kernel_types.h". + (main): Use kernel_ulong_t instead of unsigned long as types + of arguments of preadv2 and pwritev2 syscalls. + + x32: wire up preadv2 and pwritev2 syscalls. + * linux/x32/syscallent.h [546]: Add preadv2 entry. + [547]: Add pwritev2 entry. + +2016-11-29 Eugene Syromyatnikov + Elvira Khabirova + + signal: fix omission of field names in sigaction printers. + * signal.c (decode_old_sigaction, decode_new_sigaction): Add printing + of the field names. + * tests/sigaction.awk: Update expected output. + +2016-11-29 Elvira Khabirova + + Make date output format conform to ISO 8601. + * util.c (sprinttime): Make date output conform to ISO 8601. + * tests/utime.c (print_tm): Update expected output. + * tests/xstatx.c (print_time): Likewise. + +2016-11-29 Dmitry V. Levin + + tests: rewrite utime.test without relying on libc utime wrapper. + * tests/utime.c (k_utime): New function, a thin wrapper around + syscall(__NR_utime). + (main): Use it instead of utime. + * tests/utime.test: Update. + +2016-11-29 Dmitry V. Levin + + Fix meaning of negated sets in fault expressions. + Change the parser of fault expression to follow the POLA: + -e fault=!SET + means that all syscalls except those from SET are subject to fault + injection; + -e fault=!SET1:error=ERRNO1, -e fault=!SET2:error=ERRNO2 + means that all syscalls except those from SET2 are subject to fault + injection with error code ERRNO2, and all syscalls from SET2 that are + not in SET1 are subject to fault injection with error code ERRNO1. + + * syscall.c (qualify_scno, qualify_syscall_class, qualify_syscall_name): + Handle negated QUAL_FAULT case differently. + * tests/fault_syntax.test: Add checks of negated sets. + +2016-11-29 Eugene Syromyatnikov + + print_sigevent: fix field names of sigev_value structure. + * print_sigevent.c (print_sigevent): Change "int" to "sival_int", "ptr" + to "sival_ptr". + * tests/mq_sendrecv.c (main): Update expected output in accordance with + fixed field names. + * tests/timer_create.c (main): Likewise. + + tests: add more utime checks. + * tests/utime.c: Include and . + (main): Add checks for invalid pointers. + + utime: fix omission of field names in utimbuf structure printing. + * utime.c (SYS_FUNC(utime)): Print struct utimbuf as a structure, + not as an array (use curly brackets instead of square ones). + Add field names to the output. + * tests/utime.c (main): Update expected output. + + mem: print mincore output as an array. + * mem.c (SYS_FUNC(minore)): Print commas between elements. + * tests/mincore.c (print_mincore): Update expected output in accordance + with syscall decoder formatting change. + +2016-11-29 Eugene Syromyatnikov + + util: provide information whether xlat value has been found. + This is necessary for the upcoming change in the output format + of the val3 argument of the FUTEX_WAKE_OP futex command. + + * defs.h (printxvals, printxval_searchn): Change return type to int. + (printxval64, printxval, printxval_long): Likewise. Forward the value + returned by printxvals call. + * util.c (printxvals, printxval_searchn): Change return type to int, + return 1 if xlat value has been found, 0 otherwise. + +2016-11-29 Eugene Syromyatnikov + + util: check dflt argument for NULL in printxvals. + This is necessary for the upcoming change in the output format + of the val3 argument of the FUTEX_WAKE_OP futex command. + + * util.c (printxvals): Do not print dflt if it is NULL. + +2016-11-29 Eugene Syromyatnikov + + capability: fix omission of capability structure field names. + * capability.c (print_cap_header, print_cap_data): Add field names + to the output. + * tests/caps.awk: Update test output. + +2016-11-28 Dmitry V. Levin + + tests: fix "comparison between signed and unsigned" compilation warnings + * tests/readv.c (main): Cast r_len to int. + * tests/preadv2-pwritev2.c (dumpio): Likewise. + + aarch64, arm, sparc: add comments on fault injection support in kernel. + * linux/aarch64/set_scno.c: Note the kernel commit that introduced + NT_ARM_SYSTEM_CALL support. + * linux/arm/set_scno.c: Note the kernel commit that introduced + PTRACE_SET_SYSCALL support. + * linux/sparc/set_scno.c: Note the kernel commit that introduced + reloading from the syscall number register. + + tests: check -C option. + * tests/strace-C.expected: New file. + * tests/strace-C.test: New test. + * tests/Makefile.am (MISC_TESTS): Add strace-C.test. + (EXTRA_DIST): Add strace-C.expected. + + tests: check basic options syntax. + * tests/options-syntax.test: New file. + * tests/Makefile.am (MISC_TESTS): Add it. + +2016-11-28 Dmitry V. Levin + + Fix -r option syntax. + While -r option implies -t, it should not literally have the effect + of -t option, e.g. -rr should not increment tflag twice. + + * strace.c (init): In the getopt loop, do not increment tflag for each + occurrence of -r option. After the getopt loop, if rflag is set, set + tflag to 1. Issue a warning that -tt has no effect with -r. + +2016-11-28 Eugene Syromyatnikov + + Print timeval pair as an array of timeval entries. + * print_timeval.c (print_timeval_item): New function. + (print_timeval_pair): Use it as a print_function in print_array call. + * tests/futimesat.c (main): Update to test new behaviour. + * tests/utimes.c (main): Likewise. + + tests: treat tv_sec/tv_usec as signed types in futimesat and utimes tests + * tests/futimesat.c: Print tv_sec and tv_usec fields as signed types. + * tests/utimes.c: Likewise. + +2016-11-28 Dmitry V. Levin + + alpha: print struct timeval32 consistently. + * defs.h [ALPHA] (timeval32_t): New type. + [ALPHA] (print_timeval32_t): New prototype. + * print_timeval.c [ALPHA] (timeval32_t): Remove. + [ALPHA] (print_timeval32_t): Remove static keyword. + * printrusage.c [ALPHA] (printrusage32): Use timeval32_t instead + of local definition of struct timeval32. Use print_timeval32_t. + +2016-11-28 Dmitry V. Levin + + Print struct timeval consistently. + Use print_struct_timeval interface to print struct timeval. + + * print_timeval.c (print_struct_timeval): New mpers printer. + * print_timex.c (print_timex): Use it. + * printrusage.c (printrusage): Likewise. + * v4l2.c (print_v4l2_buffer): Likewise. + * tests/getrusage.c (main): Print tv_sec and tv_usec fields as signed. + * tests/waitid.c (sprint_rusage): Likewise. + + Suggested-by: Eugene Syromyatnikov + +2016-11-28 Dmitry V. Levin + + Split print_time.c. + After commit v4.14-136-g151d1d1 that removed the last object common + for timespec and timeval parsers there is no need to keep them all + in a single file. + + * print_timespec.c: New file. + * print_timeval.c: Likewise. + * Makefile.am (strace_SOURCES): Add them. + * print_time.c: Move all timespec related code to print_timespec.c. + Move all timeval related code to print_timeval.c. + +2016-11-28 Dmitry V. Levin + + tests: check decoding of threads when a non-leader thread invokes execve + * tests/threads-execve.c: New file. + * tests/threads-execve.test: New test. + * tests/.gitignore: Add threads-execve. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (threads_execve_LDADD): New variable. + (MISC_TESTS): Add threads-execve.test. + +2016-11-27 Dmitry V. Levin + + tests: check decoding of fault injected exit_group syscall. + * tests/answer.c: New file. + * tests/fault_injection-exit_group.expected: Likewise. + * tests/fault_injection-exit_group.test: New test. + * tests/.gitignore: Add answer. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fault_injection-exit_group.test. + (EXTRA_DIST): Add fault_injection-exit_group.expected. + +2016-11-27 Dmitry V. Levin + + Set PTRACE_O_TRACEEXIT option and handle PTRACE_EVENT_EXIT events. + Do not assume that some syscalls do not generate syscall-exit-stops. + When syscalls fail for any reason they may generate syscall-exit-stops. + + The solution is to wait for an actual exit reported by PTRACE_EVENT_EXIT + and print the end of unfinished exiting syscall properly. + + * exit.c: Remove. + * Makefile.am (strace_SOURCES): Remove exit.c. + * linux/dummy.h (sys_exit): Alias to printargs_d. + * strace.c (ptrace_setoptions): Add PTRACE_O_TRACEEXIT bit. + (print_event_exit): New function. + (trace): Use it in case of PTRACE_EVENT_EXIT. + * syscall.c (trace_syscall_entering): Remove special handling + of SEN_exit. + +2016-11-27 Dmitry V. Levin + + Change printargs to return RVAL_DECODED. + As printargs is invoked as a generic syscall decoder only and + it is not supposed to print anything on exiting, change printargs + to return RVAL_DECODED so it would not be called on exiting at all. + + * util.c (printargs): Print args unconditionally, return RVAL_DECODED. + +2016-11-26 Dmitry V. Levin + + Enhance error diagnostics of exit/exit_group decoder. + * exit.c (SYS_FUNC(exit)): Print the name of syscall that has returned. + +2016-11-26 Dmitry V. Levin + + Restrain from fault injection while the trace executes strace code. + There is little use in injections of faults into syscalls made by strace. + + * syscall.c (trace_syscall_entering): Clear QUAL_FAULT bit from + tcp->qual_flg when tcp->flags has TCB_HIDE_LOG bit set. + +2016-11-26 Dmitry V. Levin + + Move two global flags to tracee scope. + A simultaneous use of -p option and tracing of a command available + since commit v4.11-183-gfa8c286 introduces a race condition because + the flags whether the first exec has happened are global. + + Fix the race by moving hide_log_until_execve and hide_log_until_execve + global variables to TCB_HIDE_LOG and TCB_SKIP_DETACH_ON_FIRST_EXEC bits + in struct tcb.flags, correspondingly. + + * defs.h (TCB_HIDE_LOG, TCB_SKIP_DETACH_ON_FIRST_EXEC, hide_log): + New macros. + (hide_log_until_execve): Remove prototype. + * strace.c (skip_one_b_execve, hide_log_until_execve): Remove. + (startup_child): Set TCB_HIDE_LOG and TCB_SKIP_DETACH_ON_FIRST_EXEC bits + in the allocated tcb structure. + (init): Remove initialization of hide_log_until_execve and + skip_one_b_execve. + (print_stopped): Use hide_log() instead of hide_log_until_execve. + (trace): Check and clear TCB_SKIP_DETACH_ON_FIRST_EXEC flag instead + of skip_one_b_execve. + * syscall.c (trace_syscall_entering): Clear TCB_HIDE_LOG flag instead of + hide_log_until_execve. + (trace_syscall_entering, trace_syscall_exiting): Check hide_log() + instead of hide_log_until_execve. + +2016-11-26 Dmitry V. Levin + + Treat execveat as an execve family syscall. + * syscall.c (trace_syscall_entering): Clear hide_log_until_execve flag + also when SEN_execveat is encountered. + +2016-11-25 Dmitry V. Levin + + Change parser of fault expressions to conform the documentation. + Make expressions like fault=SYSCALL1,SYSCALL2:error=EPERM work + as documented, i.e. fail both SYSCALL1 and SYSCALL2 with EPERM. + + * syscall.c (parse_fault_expression): Remove const qualifier from + "name" and "token: variables, as well as from the return value. + (qual_fault): Remove const qualifier from "name" variables. + Split "name" into comma delimited tokens and pass each token + to individual qual_syscall_ex call. + (qualify): For QUAL_FAULT options, pass the whole option value + to their qualify methods without prior splitting into comma + delimited tokens. + * tests/fault_injection.test: Check it. + * tests/fault_syntax.test: Check empty syscall sets. + +2016-11-24 Dmitry V. Levin + + Simplify parse_fault_expression. + * syscall.c (parse_fault_expression): Rewrite iterator over strtok_r + in a more concise way. + +2016-11-26 Eugene Syromyatnikov + + Fix omission of field names in printers of timeval structure. + * print_time.c (time_fmt): Remove. + (timeval_fmt): New constant. + (print_timeval_t, sprint_timeval, print_timeval32_t, sprint_timeval32): + Use it instead of time_fmt. + * print_timex.c (print_timex): Print field names of the time field. + * printrusage.c (printrusage, printrusage32): Print field names + of ru_utime and ru_stime fields. + * tests/adjtimex.c (main): Add field names to expected output. + * tests/clock_nanosleep.c (main): Likewise. + * tests/futimesat.c (main): Likewise. + * tests/getrusage.c (main): Likewise. + * tests/nanosleep.c (main): Likewise. + * tests/oldselect.expected: Likewise. + * tests/utimes.c (main): Likewise. + * tests/wait4.c (sprint_rusage): Likewise. + * tests/waitid.c (sprint_rusage): Likewise. + * tests/xetitimer.c (main): Likewise. + * tests/xettimeofday.c (main): Likewise. + * tests/xselect.c (main): Likewise. + + Fix omission of field names in printers of timespec structure. + * print_time.c (timespec_fmt): New constant. + (print_timespec_t, sprint_timespec): Use it instead of time_fmt. + * tests/aio.c: Add field names to expected output. + * tests/clock_nanosleep.c (main): Likewise. + * tests/clock_xettime.c (main): Likewise. + * tests/futex.c (main): Likewise. + * tests/mq_sendrecv.c (do_send, do_recv): Likewise. + * tests/nanosleep.c (main): Likewise. + * tests/ppoll-v.expected: Likewise. + * tests/ppoll.expected: Likewise. + * tests/pselect6.c (main): Likewise. + * tests/recvmmsg-timeout.c (main): Likewise. + * tests/restart_syscall.c (main): Likewise. + * tests/rt_sigtimedwait.c (iterate, main): Likewise. + * tests/sched_rr_get_interval.c (main): Likewise. + * tests/semop.c (main): Likewise. + * tests/strace-T.expected: Likewise. + * tests/timer_xettime.c (main): Likewise. + * tests/timerfd_xettime.c (main): Likewise. + * tests/utimensat.c (print_ts): Likewise. + +2016-11-26 Dmitry V. Levin + + tests: robustify prctl-name.test against unrelated prctl invocations. + * tests/prctl-name.test: Filter out unrelated PR_GET_* prctl calls. + +2016-11-22 Dmitry V. Levin + + tests: cleanup prctl-name.c. + * tests/prctl-name.c (main): Remove "len" variable, rename "len1" + to "len". Remove "name1" variable, use "name" instead. + + Move KVM_* ioctl entries from ioctls_inc*.h to ioctls_arch*.h. + * linux/32/ioctls_inc_align32.h: Regenerate. + * linux/32/ioctls_inc_align64.h: Likewise. + * linux/64/ioctls_inc.h: Likewise. + * linux/arm/ioctls_arch0.h: Likewise. + * linux/i386/ioctls_arch0.h: Likewise. + * linux/powerpc/ioctls_arch0.h: Likewise. + * linux/s390/ioctls_arch0.h: Likewise. + * linux/s390x/ioctls_arch0.h: Likewise. + * linux/x32/ioctls_inc0.h: Likewise. + * linux/x86_64/ioctls_arch0.h: Likewise. + + maint: add more workarounds for alpha and powerpc. + * maint/ioctls_sym.sh: Skip asm/core_*.h. Filter out from + asm-generic/ioctls.h those macros that are defined using unavailable + struct termios2 on alpha and powerpc. + +2016-11-22 Andreas Schwab + + Add ioctl definitions for 16-bit alignment. + * Makefile.am (EXTRA_DIST): Add linux/32/ioctls_inc_align16.h. + * linux/32/ioctls_inc_align16.h: New file. + * linux/32/ioctls_inc.h [M68K]: Include it. + +2016-11-22 Dmitry V. Levin + + maint: move KVM_* constants from ioctls_inc.h to ioctls_arch.h. + * maint/ioctls_gen.sh: Place constants defined in linux/kvm.h + into ioctls_arch.h instead of ioctls_inc.h. + +2016-11-21 Dmitry V. Levin + + maint: harmonize use of ioctls_sym.sh. + * maint/ioctls_gen.sh: Consistently specify INCLUDES for all + ioctls_sym.sh invocations. Use $mydir to specify ioctls_sym.sh + location. + + maint: rework workarounds for linux/kvm.h. + * maint/ioctls_sym.sh: Remove pre-include linux/kvm.h workarounds. + Skip linux/kvm.h on those architectures that have no asm/kvm.h file. + Introduce post-process workarounds, add post-process workarounds + for linux/kvm.h. + +2016-11-20 Elvira Khabirova + + Restructure strace.1. + * strace.1 (OPTIONS): Add subsections. + (PROBLEMS): Rename to REPORTING BUGS. + (SEE ALSO): Move to the bottom. + +2016-11-20 Eugene Syromyatnikov + + prctl: implement decoding of PR_SET_FP_MODE and PR_GET_FP_MODE options. + * xlat/pr_fp_mode.in: New file. + * prctl.c: Include "xlat/pr_fp_mode.h". + (SYS_FUNC(prctl)): Add handling for PR_SET_FP_MODE and PR_GET_FP_MODE + options. + + prctl: add braces for conditional blocks with else/else-if blocks having braces + +2016-11-20 Eugene Syromyatnikov + + prctl: cast arg2 to int in PR_SET_PTRACER handler. + Kernel code does this when compares it with -1 (apart from comparing it with + PR_SET_PTRACER_ANY, which is also -1) in security/yama/yama_lsm.c. + + * prctl.c (SYS_FUNC(prctl)) : Cast arg2 to int before + comparing it with -1. + +2016-11-20 Eugene Syromyatnikov + + prctl: use getarg_ull for option value retrieval. + The prctl syscall does not use compat on x32/n32, so argument types + are in fact kernel_ulong_t. + + * prctl.c (print_prctl_args): Use getarg_ull, print as "%#llx" instead + of "%#lx". + (SYS_FUNC(prctl)): Use getarg_ull to store call arguments in arg2, arg3, + arg4, arg5 variables of type unsigned long long. Use them in printing + routines. + (SYS_FUNC(arch_prctl)): Use getarg_ull to store call argument in addr + variable of type unsigned long long. Print it as "%#llx" instead of + "%#lx". + +2016-11-20 Eugene Syromyatnikov + + block: add some definitions from + This is done in order to fix build error on old distributions where + struct blkpg_ioctl_arg declaration is broken: + + In file included from block.c:35: + /usr/include/linux/blkpg.h:36: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token + block.c: In function 'print_blkpg_req': + block.c:113: error: 'struct_blkpg_ioctl_arg' has no member named 'data' + + (from SLE10) + + * block.c: Include instead of . + (BLKPG, BLKPG_DEVNAMELTH, BLKPG_VOLNAMELTH): New macros. + (struct_blkpg_ioctl_arg, struct_blkpg_partition): New definitions, + copied from blkpg_ioctl_arg and blkpg_partition structures defined + in . + +2016-11-20 Eugene Syromyatnikov + + xlat: add values to new ARCH_* constants. + Since UAPI header declares them under CONFIG_CHECKPOINT_RESTORE + and they would never be defined in user space. + + * xlat/archvals.in: Add numeric values to ARCH_MAP_VDSO_* constants. + +2016-11-20 Dmitry V. Levin + + prctl: include instead of + There are no users of prctl function in prctl.c, and all the rest + is provided by anyway. + + * prctl.c: Include instead of . + +2016-11-20 Dmitry V. Levin + + tests: check decoding of prctl PR_GET_NAME/PR_SET_NAME operations. + * tests/prctl-name.c: New file. + * tests/prctl-name.test: New test. + * tests/.gitignore: Add prctl-name. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add prctl-name.test. + + prctl: fix printing of PR_SET_NAME's argument. + * prctl.c (SYS_FUNC(prctl)): Use printstr_ex with QUOTE_0_TERMINATED + instead of printstr to print the argument of PR_SET_NAME and PR_GET_NAME + operations. + + printstr_ex: fix handling of last byte when QUOTE_0_TERMINATED bit set. + * util.c (printstr_ex): Simplify handling of size == 0 case. + Do not artificially decrement size when QUOTE_0_TERMINATED bit is set. + Ensure that str[size] byte is non-zero if it hasn't been fetched. + +2016-11-19 Dmitry V. Levin + + printstr_ex: handle QUOTE_0_TERMINATED bit consistently. + When user_style has QUOTE_0_TERMINATED bit set, printstr_ex prints + the fetched string as a NUL-terminated. + After this change, the string is being fetched as a NUL-terminated, too. + + * util.c (printstr_ex): Use umovestr instead of umoven + if QUOTE_0_TERMINATED bit is set. + +2016-11-19 Dmitry V. Levin + + Cleanup fetch part of printstr_ex. + * util.c (printstr_ex): Initialize "style" early, unify error handling. + +2016-11-18 Dmitry V. Levin + + Update prctl ARCH_* constants. + * xlat/archvals.in: Add ARCH_MAP_VDSO_X32, ARCH_MAP_VDSO_32, and + ARCH_MAP_VDSO_64 introduced by linux kernel commit v4.9-rc1~155^2~6. + + Update V4L2_* constants. + * xlat/v4l2_device_capabilities_flags.in: Add V4L2_CAP_TOUCH introduced + by linux kernel commit v4.9-rc4~7^2~422. + * xlat/v4l2_input_types.in: Add V4L2_CAP_TOUCH introduced + by linux kernel commit v4.9-rc4~7^2~422. + + Update fs *_MAGIC constants. + * xlat/fsmagic.in: Add DAXFS_MAGIC introduced by linux kernel commit + v4.9-rc1~45^2^2~5. + + Update MS_* constants. + * xlat/mount_flags.in: Add MS_NOREMOTELOCK introduced + by linux kernel commit v4.9-rc1~57^2~1^2~7. + + Update FALLOC_* constants. + * xlat/falloc_flags.in: Add FALLOC_FL_UNSHARE_RANGE introduced + by linux kernel commit v4.9-rc1~31^2~69. + + Update BTRFS_* constants. + * xlat/btrfs_features_compat_ro.in: Add + BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID introduced + by linux kernel commit v4.9-rc1~7^2^2~4. + + Update BPF_* constants. + * xlat/bpf_prog_types.in: Add BPF_PROG_TYPE_PERF_EVENT introduced + by linux kernel commit v4.9-rc1~127^2~302^2~4. + +2016-11-18 Eugene Syromyatnikov + + make-dist: use HEAD for making distribution package. + * make-dist: Use HEAD commit instead of master branch by default. + +2016-11-18 Dmitry V. Levin + + tests: fix btrfs build error on some old systems. + Fix the following build error on SLE 11 SP4: + + btrfs.c: In function 'btrfs_test_dev_replace_ioctl': + btrfs.c:1570: error: unknown field 'start' specified in initializer + + * tests/btrfs.c (btrfs_test_dev_replace_ioctl): Move initialization + of struct btrfs_ioctl_dev_replace_args.start.srcdevid out of the + designated initializer. + +2016-11-18 Dmitry V. Levin + + tests: check decoding of ERESTARTSYS error code. + * tests/erestartsys.c: New file. + * tests/erestartsys.test: New test. + * tests/.gitignore: Add erestartsys. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add erestartsys.test. + +2016-11-18 Dmitry V. Levin + + Fix signame usage in qual_signal. + Do not assume that the string returned by signame starts with "SIG" + prefix, this is not always the case. + + * syscall.c (qual_signal): Skip signame return value + when it does not have "SIG" prefix. + +2016-11-18 Dmitry V. Levin + + tests: check -e signal=set syntax. + * tests/qual_signal.c: New file. + * tests/qual_signal.test: New test. + * tests/.gitignore: Add qual_signal. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (MISC_TESTS): Add qual_signal.test. + +2016-11-17 Dmitry V. Levin + + Make -e fault= expressions cumulative. + Change the way how subsequent -e fault= expressions are interpreted + to implement a cumulative behavior. For example, + -e fault=file:when=3+ -e fault=chdir + now specifies that all chdir syscalls and 3+ file related syscalls + except chdir are subject for fault injection. + + * syscall.c (qualify): Do not reset qual_vec for QUAL_FAULT. + * tests/fault_injection.test: Check it. + +2016-11-16 Dmitry V. Levin + + tests: check syscall fault injection. + * tests/fault_injection.c: New file. + * tests/fault_injection.test: New test. + * tests/fault_syntax.test: Likewise. + * tests/.gitignore: Add fault_injection. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (MISC_TESTS): Add fault_injection.test and fault_syntax.test. + +2016-11-16 Dmitry V. Levin + + Implement syscall fault injection. + Introduce new -e fault=EXPR syntax that can be used to specify a subset + of syscalls that are subject of syscall fault injection, an error code + that has to be injected, and a frequency of injection. + + The expression specifying syscall fault injection has the following + format: SET[:error=ERRNO][:when=FIRST[+[STEP]]] + where only SET is a required part and all the rest is optional. + + The method used to implement syscall fault injection is the following: + on entering syscall the syscall number is substituted by an invalid + syscall number -1, and on exiting syscall the error code returned by + the kernel is substituted with the error code specified in the fault + expression. + + This implementaion is based on the prototype developed + by Nahim El Atmani as a part of his GSoC 2016 strace project. + + * defs.h (struct fault_opts): New forward declaration. + (struct tcb): Add fault_vec field. + (TCB_FAULT_INJ, QUAL_FAULT): New macros. + * strace.1: Document -e fault expression syntax. + * strace.c (usage): Mention -e fault expression. + (droptcb): Deallocate fault_vec member. + * syscall.c (qual_fault, arch_set_scno, arch_set_error): New prototypes. + (qual_options): Add "fault" option. + (struct fault_opts): New structure. + (num_faults): New variable. + (fault_vec): New array. + (syscall_fault_injected, tcb_fault_opts, reallocate_fault, + find_errno_by_name, qual_syscall_ex, strip_prefix, parse_fault_token, + parse_fault_expression, qual_fault, inject_syscall_fault_entering, + update_syscall_fault_exiting): New functions. + (qual_syscall): Use qual_syscall_ex. + (qualify_one): Add argument: a pointer to struct fault_opts, all callers + changed. Copy struct fault_opts from the pointer to fault_vec. + Use reallocate_fault. + (qualify_scno, qualify_syscall_class, qualify_syscall_name): Add + argument: a pointer to struct fault_opts. + (qualify): Use reallocate_fault. Do not check "all" class for + QUAL_FAULT qualifier. + (lookup_class): Check for "all" class. + (trace_syscall_entering): Use inject_syscall_fault_entering. + (trace_syscall_exiting): Use update_syscall_fault_exiting. Clear + TCB_FAULT_INJ flag along with TCB_INSYSCALL. Print " (INJECTED)" suffix + when the syscall has been injected successfully. + [ARCH_REGS_FOR_GETREGSET && !HAVE_GETREGS_OLD] + (ptrace_setregset): New function. + (ptrace_setregset_or_setregs): Define to ptrace_setregset. + [ARCH_REGS_FOR_GETREGS && !HAVE_GETREGS_OLD] + (ptrace_setregs): New function. + (ptrace_setregset_or_setregs): Define to ptrace_setregs. + [ptrace_setregset_or_setregs] (set_regs): New function. + Include "set_scno.c" and "set_error.c" + * NEWS: Mention this enhancement. + +2016-11-16 Dmitry V. Levin + + Implement arch specific methods of changing syscall number and error code + This introduces arch_set_error and arch_set_scno functions for each + supported architecture, needed to implement syscall fault injection. + + * linux/aarch64/set_error.c: New file. + * linux/aarch64/set_scno.c: Likewise. + * linux/alpha/set_error.c: Likewise. + * linux/alpha/set_scno.c: Likewise. + * linux/arc/set_error.c: Likewise. + * linux/arc/set_scno.c: Likewise. + * linux/arm/set_error.c: Likewise. + * linux/arm/set_scno.c: Likewise. + * linux/avr32/set_error.c: Likewise. + * linux/avr32/set_scno.c: Likewise. + * linux/bfin/set_error.c: Likewise. + * linux/bfin/set_scno.c: Likewise. + * linux/crisv10/set_error.c: Likewise. + * linux/crisv10/set_scno.c: Likewise. + * linux/crisv32/set_error.c: Likewise. + * linux/crisv32/set_scno.c: Likewise. + * linux/hppa/set_error.c: Likewise. + * linux/hppa/set_scno.c: Likewise. + * linux/i386/set_error.c: Likewise. + * linux/i386/set_scno.c: Likewise. + * linux/ia64/set_error.c: Likewise. + * linux/ia64/set_scno.c: Likewise. + * linux/m68k/set_error.c: Likewise. + * linux/m68k/set_scno.c: Likewise. + * linux/metag/set_error.c: Likewise. + * linux/metag/set_scno.c: Likewise. + * linux/microblaze/set_error.c: Likewise. + * linux/microblaze/set_scno.c: Likewise. + * linux/mips/set_error.c: Likewise. + * linux/mips/set_scno.c: Likewise. + * linux/nios2/set_error.c: Likewise. + * linux/nios2/set_scno.c: Likewise. + * linux/or1k/set_error.c: Likewise. + * linux/or1k/set_scno.c: Likewise. + * linux/powerpc/set_error.c: Likewise. + * linux/powerpc/set_scno.c: Likewise. + * linux/powerpc64/set_error.c: Likewise. + * linux/powerpc64/set_scno.c: Likewise. + * linux/riscv/set_error.c: Likewise. + * linux/riscv/set_scno.c: Likewise. + * linux/s390/set_error.c: Likewise. + * linux/s390/set_scno.c: Likewise. + * linux/s390x/set_error.c: Likewise. + * linux/s390x/set_scno.c: Likewise. + * linux/sh/set_error.c: Likewise. + * linux/sh/set_scno.c: Likewise. + * linux/sh64/set_error.c: Likewise. + * linux/sh64/set_scno.c: Likewise. + * linux/sparc/set_error.c: Likewise. + * linux/sparc/set_scno.c: Likewise. + * linux/sparc64/set_error.c: Likewise. + * linux/sparc64/set_scno.c: Likewise. + * linux/tile/set_error.c: Likewise. + * linux/tile/set_scno.c: Likewise. + * linux/x32/set_error.c: Likewise. + * linux/x32/set_scno.c: Likewise. + * linux/x86_64/set_error.c: Likewise. + * linux/x86_64/set_scno.c: Likewise. + * linux/xtensa/set_error.c: Likewise. + * linux/xtensa/set_scno.c: Likewise. + * Makefile.am (EXTRA_DIST): Add them. + +2016-11-16 Dmitry V. Levin + + cris: add syscall tables. + The incomplete CRIS support introduced by commit v4.5.18-77-gea0e6e8 + should not have been merged because it lacks essential parts, e.g. + syscall tables. + + This change adds missing syscall tables for crisv10 and crisv32. + + * linux/crisv10/syscallent.h: New file. + * linux/crisv32/syscallent.h: Likewise. + * Makefile.am (EXTRA_DIST): Add them. + +2016-11-16 Dmitry V. Levin + + Introduce string_to_uint_ex and string_to_uint_upto functions. + * defs.h (string_to_uint_ex): New prototype. + (string_to_uint_upto): New function, a thin wrapper around + string_to_uint_ex. + * util.c (string_to_uint_ex): New function. + (string_to_uint): Change into a thin wrapper around string_to_uint_upto. + * strace.c (init): Use string_to_uint_upto. + * syscall.c (qualify_scno, qual_signal, qual_desc): Use + string_to_uint_upto instead of string_to_uint. + +2016-11-16 Dmitry V. Levin + + Split qual_syscall into separate functions. + Split qual_syscall into qualify_scno, qualify_syscall_class, + and qualify_syscall_name. + This might be needed later to implement syscall fault injection. + + * syscall.c (qualify_scno, qualify_syscall_class, qualify_syscall_name): + New functions. + (qual_syscall): Use them. + +2016-11-15 Dmitry V. Levin + + xtensa: wire up new syscalls. + * linux/xtensa/syscallent.h [342..347]: New entries. + +2016-11-14 Dmitry V. Levin + + arc: wire up new syscalls. + * linux/arc/syscallent.h [247, 248]: New entries. + +2016-11-13 Dmitry V. Levin + + tests: fix potential compilation warning in ioctl_block.c. + ioctl_block.c:48: warning: 'init_magic' defined but not used + + * tests/ioctl_block.c (init_magic): Define only for + [BLKTRACESETUP && HAVE_STRUCT_BLK_USER_TRACE_SETUP]. + +2016-11-13 Eugene Syromyatnikov + + Add support for pkey_mprotect, pkey_alloc, pkey_free syscalls. + * linux/32/syscallent.h: Add syscall entries for pkey_* calls. + * linux/64/syscallent.h: Likewise. + * linux/arm/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-n64.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * mem.c (do_mprotect): New function, common handler for mprotect and + pkey_mprotect. + (SYS_FUNC(mprotect)): Convert to wrapper around do_mprotect. + (SYS_FUNC(pkey_mprotect)): New function. + * xlat/pkey_access.in: New file. + * pkeys.c: New file containing implementation of pkey_alloc and + pkey_free. + * Makefile.am: Add it. + * NEWS: Mention this enhancement. + * tests/.gitignore: Add pkey_alloc, pkey_free, and pkey_mprotect. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add pkey_alloc.test, pkey_free.test, and + pkey_mprotect.test. + * tests/pkey_alloc.c: New file. + * tests/pkey_free.c: Likewise. + * tests/pkey_mprotect.c: Likewise. + * tests/pkey_alloc.test: New test. + * tests/pkey_free.test: Likewise. + * tests/pkey_mprotect.test: Likewise. + +2016-11-13 Eugene Syromyatnikov + + tests: fix "constant is too large" compilation warnings. + alarm.c: In function 'main': + alarm.c:41: warning: integer constant is too large for 'long' type + aio.c: In function 'main': + aio.c:162: warning: integer constant is too large for 'long' type + btrfs.c: In function 'btrfs_test_sync_ioctls': + btrfs.c:202: warning: integer constant is too large for 'long' type + btrfs.c: In function 'btrfs_test_subvol_ioctls': + btrfs.c:289: warning: integer constant is too large for 'long' type + btrfs.c:290: warning: integer constant is too large for 'long' type + dup2.c: In function 'main': + dup2.c:12: warning: integer constant is too large for 'long' type + dup2.c:13: warning: integer constant is too large for 'long' type + dup3.c: In function 'main': + dup3.c:13: warning: integer constant is too large for 'long' type + dup3.c:14: warning: integer constant is too large for 'long' type + epoll_create.c: In function 'main': + epoll_create.c:12: warning: integer constant is too large for 'long' type + epoll_ctl.c: In function 'invoke_syscall': + epoll_ctl.c:14: warning: integer constant is too large for 'long' type + faccessat.c: In function 'main': + faccessat.c:13: warning: integer constant is too large for 'long' type + fchdir.c: In function 'main': + fchdir.c:12: warning: integer constant is too large for 'long' type + struct_flock.c: In function 'invoke_test_syscall': + struct_flock.c:48: warning: integer constant is too large for 'long' type + struct_flock.c: In function 'test_flock_einval': + struct_flock.c:58: warning: integer constant is too large for 'long' type + struct_flock.c:59: warning: integer constant is too large for 'long' type + fcntl64.c: In function 'test_flock64_einval': + fcntl64.c:44: warning: integer constant is too large for 'long' type + fcntl64.c:45: warning: integer constant is too large for 'long' type + fcntl.c: In function 'test_flock64_einval': + fcntl.c:44: warning: integer constant is too large for 'long' type + fcntl.c:45: warning: integer constant is too large for 'long' type + fdatasync.c: In function 'main': + fdatasync.c:12: warning: integer constant is too large for 'long' type + flock.c: In function 'main': + flock.c:13: warning: integer constant is too large for 'long' type + xstatx.c: In function 'main': + xstatx.c:255: warning: integer constant is too large for 'long' type + xstatx.c:290: warning: integer constant is too large for 'long' type + xstatx.c:290: warning: integer constant is too large for 'long' type + xstatx.c:290: warning: integer constant is too large for 'long' type + xstatx.c:290: warning: integer constant is too large for 'long' type + xstatx.c:290: warning: integer constant is too large for 'long' type + xstatx.c:290: warning: integer constant is too large for 'long' type + xstatx.c:290: warning: integer constant is too large for 'long' type + xstatx.c:290: warning: integer constant is too large for 'long' type + xstatx.c:290: warning: integer constant is too large for 'long' type + xstatx.c:294: warning: integer constant is too large for 'long' type + xstatx.c:294: warning: integer constant is too large for 'long' type + xstatx.c:294: warning: integer constant is too large for 'long' type + xstatx.c:294: warning: integer constant is too large for 'long' type + xstatx.c:294: warning: integer constant is too large for 'long' type + xstatx.c:294: warning: integer constant is too large for 'long' type + xstatx.c:294: warning: integer constant is too large for 'long' type + xstatx.c:294: warning: integer constant is too large for 'long' type + xstatx.c:294: warning: integer constant is too large for 'long' type + xstatfsx.c: In function 'main': + xstatfsx.c:113: warning: integer constant is too large for 'long' type + fsync.c: In function 'main': + fsync.c:12: warning: integer constant is too large for 'long' type + ftruncate64.c: In function 'main': + ftruncate64.c:39: warning: integer constant is too large for 'long' type + futimesat.c: In function 'main': + futimesat.c:52: warning: integer constant is too large for 'long' type + futimesat.c:59: warning: integer constant is too large for 'long' type + get_mempolicy.c: In function 'main': + get_mempolicy.c:83: warning: integer constant is too large for 'long' type + get_mempolicy.c:84: warning: integer constant is too large for 'long' type + get_mempolicy.c:85: warning: integer constant is too large for 'long' type + get_mempolicy.c:86: warning: integer constant is too large for 'long' type + getdents.c: In function 'main': + getdents.c:109: warning: integer constant is too large for 'long' type + getdents.c:110: warning: integer constant is too large for 'long' type + getdents.c:114: warning: integer constant is too large for 'long' type + getdents64.c: In function 'main': + getdents64.c:114: warning: integer constant is too large for 'long' type + getdents64.c:115: warning: integer constant is too large for 'long' type + getdents64.c:119: warning: integer constant is too large for 'long' type + xgetrlimit.c: In function 'main': + xgetrlimit.c:71: warning: integer constant is too large for 'long' type + ioctl_block.c:44: warning: integer constant is too large for 'long' type + ioctl_block.c: In function 'main': + ioctl_block.c:136: warning: integer constant is too large for 'long' type + ioctl_block.c:137: warning: integer constant is too large for 'long' type + ioctl_block.c:161: warning: integer constant is too large for 'long' type + ioctl_block.c:170: warning: integer constant is too large for 'long' type + ioctl_block.c:171: warning: integer constant is too large for 'long' type + ioctl_evdev.c:42: warning: integer constant is too large for 'long' type + ioctl_mtd.c:46: warning: integer constant is too large for 'long' type + ioctl_rtc.c:40: warning: integer constant is too large for 'long' type + ioperm.c: In function 'main': + ioperm.c:12: warning: integer constant is too large for 'long' type + ioctl_v4l2.c: In function 'main': + ioctl_v4l2.c:409: warning: integer constant is too large for 'long' type + ipc.c: In function 'ipc_call': + ipc.c:52: warning: integer constant is too large for 'long' type + kill.c: In function 'main': + kill.c:59: warning: integer constant is too large for 'long' type + kill.c:62: warning: integer constant is too large for 'long' type + kill.c:63: warning: integer constant is too large for 'long' type + kill.c:68: warning: integer constant is too large for 'long' type + linkat.c: In function 'main': + linkat.c:14: warning: integer constant is too large for 'long' type + linkat.c:15: warning: integer constant is too large for 'long' type + mbind.c: In function 'main': + mbind.c:41: warning: integer constant is too large for 'long' type + mbind.c:43: warning: integer constant is too large for 'long' type + mbind.c:44: warning: integer constant is too large for 'long' type + migrate_pages.c: In function 'main': + migrate_pages.c:41: warning: integer constant is too large for 'long' type + In file included from mkdirat.c:10: + umode_t.c: In function 'test_syscall': + umode_t.c:47: warning: integer constant is too large for 'long' type + mknod.c: In function 'call_mknod': + mknod.c:16: warning: integer constant is too large for 'long' type + mknod.c: In function 'main': + mknod.c:23: warning: integer constant is too large for 'long' type + mknod.c:49: warning: integer constant is too large for 'long' type + mknod.c:56: warning: integer constant is too large for 'long' type + mknodat.c:12: warning: integer constant is too large for 'long' type + mknodat.c: In function 'call_mknodat': + mknodat.c:17: warning: integer constant is too large for 'long' type + mknodat.c: In function 'main': + mknodat.c:24: warning: integer constant is too large for 'long' type + mknodat.c:50: warning: integer constant is too large for 'long' type + mknodat.c:57: warning: integer constant is too large for 'long' type + mmap.c: In function 'main': + mmap.c:51: warning: integer constant is too large for 'long' type + move_pages.c: In function 'print_stat_pages': + move_pages.c:139: warning: integer constant is too large for 'long' type + move_pages.c: In function 'print_move_pages': + move_pages.c:166: warning: integer constant is too large for 'long' type + move_pages.c: In function 'main': + move_pages.c:188: warning: integer constant is too large for 'long' type + mq_sendrecv.c: In function 'main': + mq_sendrecv.c:238: warning: integer constant is too large for 'long' type + mq_sendrecv.c:401: warning: integer constant is too large for 'long' type + mq_sendrecv.c:403: warning: integer constant is too large for 'long' type + nsyscalls.c: In function 'test_syscall': + nsyscalls.c:64: warning: integer constant is too large for 'long' type + nsyscalls.c:65: warning: integer constant is too large for 'long' type + nsyscalls.c:66: warning: integer constant is too large for 'long' type + nsyscalls.c:67: warning: integer constant is too large for 'long' type + nsyscalls.c:68: warning: integer constant is too large for 'long' type + nsyscalls.c:69: warning: integer constant is too large for 'long' type + preadv-pwritev.c: In function 'main': + preadv-pwritev.c:162: warning: comparison between signed and unsigned + prlimit64.c: In function 'main': + prlimit64.c:65: warning: integer constant is too large for 'long' type + prlimit64.c:70: warning: integer constant is too large for 'long' type + remap_file_pages.c: In function 'main': + remap_file_pages.c:42: warning: integer constant is too large for 'long' type + remap_file_pages.c:43: warning: integer constant is too large for 'long' type + remap_file_pages.c:45: warning: integer constant is too large for 'long' type + renameat.c: In function 'main': + renameat.c:15: warning: integer constant is too large for 'long' type + renameat.c:16: warning: integer constant is too large for 'long' type + rt_sigqueueinfo.c: In function 'main': + rt_sigqueueinfo.c:41: warning: integer constant is too large for 'long' type + rt_tgsigqueueinfo.c: In function 'k_tgsigqueueinfo': + rt_tgsigqueueinfo.c:45: warning: integer constant is too large for 'long' type + rt_tgsigqueueinfo.c:46: warning: integer constant is too large for 'long' type + rt_tgsigqueueinfo.c:47: warning: integer constant is too large for 'long' type + rt_tgsigqueueinfo.c: In function 'main': + rt_tgsigqueueinfo.c:67: warning: integer constant is too large for 'long' type + sendfile.c: In function 'main': + sendfile.c:110: warning: integer constant is too large for 'long' type + sendfile64.c: In function 'main': + sendfile64.c:100: warning: integer constant is too large for 'long' type + set_mempolicy.c: In function 'main': + set_mempolicy.c:129: warning: integer constant is too large for 'long' type + set_mempolicy.c:130: warning: integer constant is too large for 'long' type + setrlimit.c: In function 'main': + setrlimit.c:44: warning: integer constant is too large for 'long' type + socketcall.c: In function 'test_socketcall': + socketcall.c:58: warning: integer constant is too large for 'long' type + splice.c: In function 'main': + splice.c:41: warning: integer constant is too large for 'long' type + splice.c:42: warning: integer constant is too large for 'long' type + splice.c:45: warning: integer constant is too large for 'long' type + splice.c:46: warning: integer constant is too large for 'long' type + symlinkat.c: In function 'main': + symlinkat.c:12: warning: integer constant is too large for 'long' type + sync_file_range.c: In function 'main': + sync_file_range.c:42: warning: integer constant is too large for 'long' type + sync_file_range.c:43: warning: integer constant is too large for 'long' type + syslog.c: In function 'main': + syslog.c:14: warning: integer constant is too large for 'long' type + tee.c: In function 'main': + tee.c:41: warning: integer constant is too large for 'long' type + tee.c:42: warning: integer constant is too large for 'long' type + timer_create.c: In function 'main': + timer_create.c:52: warning: integer constant is too large for 'long' type + timer_create.c:84: warning: integer constant is too large for 'long' type + timer_create.c:85: warning: integer constant is too large for 'long' type + truncate64.c: In function 'main': + truncate64.c:41: warning: integer constant is too large for 'long' type + xgetrlimit.c: In function 'main': + xgetrlimit.c:71: warning: integer constant is too large for 'long' type + umode_t.c: In function 'test_syscall': + umode_t.c:46: warning: integer constant is too large for 'long' type + unlinkat.c: In function 'main': + unlinkat.c:13: warning: integer constant is too large for 'long' type + waitpid.c: In function 'main': + waitpid.c:43: warning: integer constant is too large for 'long' type + waitid.c: In function 'poison': + waitid.c:141: warning: integer constant is too large for 'long' type + xetpriority.c: In function 'main': + xetpriority.c:15: warning: integer constant is too large for 'long' type + xetpriority.c:19: warning: integer constant is too large for 'long' type + xetpriority.c:20: warning: integer constant is too large for 'long' type + xetpgid.c: In function 'main': + xetpgid.c:43: warning: integer constant is too large for 'long' type + xetpgid.c:47: warning: integer constant is too large for 'long' type + xetpgid.c:48: warning: integer constant is too large for 'long' type + + (SLES 11SP4, i386) + + * tests/alarm.c (main): Add proper suffix to integer constant. + * tests/aio.c (main): Likewise. + * tests/btrfs.c (btrfs_test_sync_ioctls, btrfs_test_subvol_ioctls): Likewise. + * tests/dup2.c (main): Likewise. + * tests/dup3.c (main): Likewise. + * tests/epoll_create.c (main): Likewise. + * tests/epoll_ctl.c (invoke_syscall): Likewise. + * tests/faccessat.c (main): Likewise. + * tests/fchdir.c (main): Likewise. + * tests/fcntl.c (test_flock64_einval): Likewise. + * tests/fcntl64.c (test_flock64_einval): Likewise. + * tests/fdatasync.c (main): Likewise. + * tests/flock.c (main): Likewise. + * tests/fstat64.c (SAMPLE_SIZE): Likewise. + * tests/fstat.c (SAMPLE_SIZE): Likewise. + * tests/fsync.c (main): Likewise. + * tests/ftruncate64.c (main): Likewise. + * tests/futimesat.c (main): Likewise. + * tests/get_mempolicy.c (main): Likewise. + * tests/getdents.c (main): Likewise. + * tests/getdents64.c (main): Likewise. + * tests/ioctl_block.c (lmagic, main): Likewise. + * tests/ioctl_evdev.c (lmagic): Likewise. + * tests/ioctl_mtd.c (lmagic): Likewise. + * tests/ioctl_rtc.c (lmagic): Likewise. + * tests/ioctl_v4l2.c (main): Likewise. + * tests/ioperm.c (main): Likewise. + * tests/ipc.c (ipc_call): Likewise. + * tests/kill.c (main): Likewise. + * tests/linkat.c (main): Likewise. + * tests/lstat64.c (SAMPLE_SIZE): Likewise. + * tests/lstat.c (SAMPLE_SIZE): Likewise. + * tests/mbind.c (main): Likewise. + * tests/migrate_pages.c (main): Likewise. + * tests/mkdirat.c (TEST_SYSCALL_PREFIX_ARGS): Likewise. + * tests/mknod.c (call_mknod, main): Likewise. + * tests/mknodat.c (fd, call_mknodat, main): Likewise. + * tests/mmap.c (main): Likewise. + * tests/move_pages.c (print_stat_pages, print_move_pages): Likewise. + * tests/mq_sendrecv.c (main): Likewise. + * tests/nsyscalls.c (test_syscall): Likewise. + * tests/prlimit64.c (main): Likewise. + * tests/remap_file_pages.c (main): Likewise. + * tests/renameat.c (main): Likewise. + * tests/rt_sigqueueinfo.c (main): Likewise. + * tests/rt_tgsigqueueinfo.c (k_tgsigqueueinfo, main): Likewise. + * tests/sendfile.c (main): Likewise. + * tests/sendfile64.c (main): Likewise. + * tests/set_mempolicy.c (main): Likewise. + * tests/setrlimit.c (main): Likewise. + * tests/socketcall.c (test_socketcall): Likewise. + * tests/splice.c (main): Likewise. + * tests/stat64.c (SAMPLE_SIZE): Likewise. + * tests/stat.c (SAMPLE_SIZE): Likewise. + * tests/struct_flock.c (invoke_test_syscall, test_flock_einval): Likewise. + * tests/symlinkat.c (main): Likewise. + * tests/sync_file_range.c (main): Likewise. + * tests/syslog.c (main): Likewise. + * tests/tee.c (main): Likewise. + * tests/timer_create.c (main): Likewise. + * tests/truncate64.c (main): Likewise. + * tests/umode_t.c (test_syscall): Likewise. + * tests/unlinkat.c (main): Likewise. + * tests/waitid.c (main): Likewise. + * tests/waitpid.c (main): Likewise. + * tests/xetpgid.c (main): Likewise. + * tests/xetpriority.c (main): Likewise. + * tests/xgetrlimit.c (main): Likewise. + * tests/xstatfsx.c (main) [CHECK_ODD_SIZE]: Likewise. + * tests/xstatx.c (main): Likewise. + +2016-11-13 Eugene Syromyatnikov + + tests: fix "comparison between signed and unsigned" compilation warnings + preadv-pwritev.c: In function 'main': + preadv-pwritev.c:162: warning: comparison between signed and unsigned + readv.c: In function 'main': + readv.c:148: warning: comparison between signed and unsigned + recvmsg.c: In function 'main': + recvmsg.c:148: warning: comparison between signed and unsigned + + * tests/preadv-pwritev.c (main): Cast r_len to int. + * tests/readv.c (main): Likewise. + * tests/recvmsg.c (main): Likewise. + +2016-11-13 Dmitry V. Levin + + syscall.c: refactor getregs_old fallback in get_regs. + This change moves remaining arch specific getregs_old code into + appropriate arch subdirectories and removes unnecessary code + duplication. + + * linux/getregs_old.h: New file. + * linux/powerpc/getregs_old.h: Likewise. + * linux/powerpc64/getregs_old.h: Likewise. + * linux/x86_64/getregs_old.h: Likewise. + * Makefile.am (EXTRA_DIST): Add them. + * syscall.c: Include "getregs_old.h". + [X86_64 || POWERPC]: Remove. + [ARCH_REGS_FOR_GETREGSET] (ptrace_getregset_or_getregs): Define + to ptrace_getregset. + [ARCH_REGS_FOR_GETREGS] (ptrace_getregset_or_getregs): Define + to ptrace_getregs. + (get_regs): Check for ptrace_getregset_or_getregs instead + of ARCH_REGS_FOR_GETREGSET and ARCH_REGS_FOR_GETREGS. Use + ptrace_getregset_or_getregs instead of ptrace_getregset and + ptrace_getregs. Check for HAVE_GETREGS_OLD instead of X86_64 + and POWERPC. Use use_getregs_old instead of getregset_support + and old_kernel. + +2016-11-13 Eugene Syromyatnikov + + Rename BUILD_BUG_ON_ZERO macro. + In order to avoid name clash on distributions which decide to include + kernel headers instead of UAPI ones. For example, on SLES 11SP4: + + gcc -DHAVE_CONFIG_H -I./linux/x86_64 -I./linux -I. -Wall -O2 -c net.c + In file included from /usr/include/linux/sysctl.h:25:0, + from /usr/include/linux/netfilter.h:6, + from /usr/include/linux/netfilter_arp.h:8, + from /usr/include/linux/netfilter_arp/arp_tables.h:14, + from net.c:60: + net.c: In function 'print_packet_mreq': + gcc_compat.h:59:27: error: negative width in bit-field '' + # define MUST_BE_ARRAY(a) BUILD_BUG_ON_ZERO(!SAME_TYPE((a), &(a)[0])) + ^ + defs.h:76:53: note: in expansion of macro 'MUST_BE_ARRAY' + #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]) + MUST_BE_ARRAY(a)) + ^ + net.c:747:22: note: in expansion of macro 'ARRAY_SIZE' + if (mreq.mr_alen > ARRAY_SIZE(mreq.mr_address)) + ^ + due to the fact BUILD_BUG_ON_ZERO is already defined in . + + * gcc_compat.h (BUILD_BUG_ON_ZERO): Rename to FAIL_BUILD_ON_ZERO. + (MUST_BE_ARRAY): Update usage. + +2016-11-12 Dmitry V. Levin + + syscall.c: factor out ptrace_getregs from get_regs. + Move the code that calls ptrace(PTRACE_GETREGS) to a separate function. + + * syscall.c (ptrace_getregs): New function. + (get_regs): Use it. + +2016-11-12 Dmitry V. Levin + + syscall.c: rename get_regset to ptrace_getregset. + * syscall.c (get_regset): Rename to ptrace_getregset. + (get_regs): Rename get_regset to ptrace_getregset. + +2016-11-12 Andreas Schwab + + m68k: switch to PTRACE_GETREGS. + * Makefile.am (EXTRA_DIST): Add linux/m68k/arch_regs.h, remove + linux/m68k/get_syscall_result.c. + * linux/m68k/arch_regs.c (m68k_d0, ARCH_PC_PEEK_ADDR): Don't + define. + (m68k_regs, m68k_usp_ptr, ARCH_PC_REG, ARCH_REGS_FOR_GETREGS): + Define. + * linux/m68k/arch_regs.h: New file. + * linux/m68k/arch_sigreturn.c (arch_sigreturn): Use m68k_usp_ptr. + * linux/m68k/get_error.c (get_error): Use m68k_regs.d0. + * linux/m68k/get_scno.c (arch_get_scno): Use m68k_regs.orig_d0. + * linux/m68k/get_syscall_args.c (get_syscall_args): Use m68k_regs. + * linux/m68k/get_syscall_result.c: Remove. + + tests: do not run old_mmap test on m68k. + * tests/old_mmap.c: Skip test on m68k. + +2016-11-12 Dmitry V. Levin + + syscall.c: introduce reallocate_vec function. + This might be needed later to implement syscall fault injection. + + * syscall.c (reallocate_vec): New function. + (reallocate_qual): Use it. + +2016-11-12 Dmitry V. Levin + + Fix prototypes of qual_desc, qual_signal, and qual_syscall functions. + * syscall.c (qual_desc, qual_signal, qual_syscall): Fix prototypes. + (struct qual_options): Fix type of "qualify" member. + +2016-11-12 Eugene Syromyatnikov + + linux/x32/syscallent.h: fix syscallent array initialisation on x32. + Why gcc didn't complain about it? It is definitely an index clash. + + * linux/x32/syscallent.h: Change initializer indices for empty records from + [327 ... 511] to [329 ... 511]. + +2016-11-11 Dmitry V. Levin + + Introduce upoke function. + This will be needed to implement fault injection on those architectures + that lack PTRACE_SETREGSET/PTRACE_SETREGS support. + + * defs.h (upoke): New prototype. + * upoke.c: New file. + * Makefile.am (libstrace_a_SOURCES): Add it. + +2016-11-11 Gleb Fotengauer-Malinovskiy + + Update ioctl entries from linux 4.9. + * linux/32/ioctls_inc_align32.h: Update from linux v4.9 using ioctls_gen.sh. + * linux/32/ioctls_inc_align64.h: Likewise. + * linux/64/ioctls_inc.h: Likewise. + * linux/x32/ioctls_inc0.h: Likewise. + * NEWS: Mention this. + +2016-11-10 Eugene Syromyatnikov + + Update NEWS. + +2016-11-10 Mikulas Patocka + Eugene Syromyatnikov + + Add support for decoding of DM_* ioctl commands. + * dm.c: New file. + * xlat/dm_flags.in: Likewise. + * Makefile.am (strace_SOURCES): Add dm.c. + * configure.ac (AC_CHECK_HEADERS): Add linux/dm-ioctl.h. + * defs.h (dm_ioctl): New prototype. + * ioctl.c (ioctl_decode) [HAVE_LINUX_DM_IOCTL_H]: Call dm_ioctl + for 0xfd ioctl type. + * tests/ioctl_dm.c: New file. + * tests/ioctl_dm-v.c: Likewise. + * tests/ioctl_dm.test: New test. + * tests/ioctl_dm-v.test: Likewise. + * tests/.gitignore: Add ioctl_dm and ioctl_dm-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_dm.test and ioctl_dm-v.test. + +2016-11-10 Dmitry V. Levin + + Introduce ALIGNOF macro. + * gcc_compat.h (ALIGNOF): New macro. + +2016-11-10 Eugene Syromyatnikov + + util: add support for QUOTE_0_TERMINATED in user_style to ptrintstr_ex. + This enables printing size-limited (expectedly) ASCIZ strings. + + This is done by increasing umoven size limit for sized strings by one + byte above max_strlen (enabling copying possible NUL byte in case len is + greater than max_strlen) and decreasing size after copying by one byte + in case QUOTE_0_TERMINATED is set (due to user_style or usage of len of + -1). As a result, there is one excess byte for string_quote in case + QUOTE_0_TERMINATED is set so string_quote can check for NUL termination + of strings up to size bytes in size (which is len or max_strlen, whatever + is greater). + + The catch here is that when string is not properly NUL-terminated and + QUOTE_0_TERMINATED is provided in user_style and len is less than + max_strlen then last non-NUL byte is not printed. But ellipsis is + printed instead, being indication that string is not terminated + properly. QUOTE_OMIT_TRAILING_0 should be used instead in case this + behaviour is not intended. + + * util.c (printstr_ex): Copy one excess byte in case of non-negative len + provided and it is more than max_strlen; handle case of max_strlen of 0 + in case QUOTE_0_TERMINATED is set separately; check for need of printing + ellipsis by checking resulting style against QUOTE_0_TERMINATED. + +2016-11-09 Eugene Syromyatnikov + + tests: check decoding of mq_{notify,open,timedreceive,timedsend,unlink} + * tests/mq_sendrecv.c: New file. + * tests/mq_sendrecv-read.c: Likewise. + * tests/mq_sendrecv-write.c: Likewise. + * tests/mq_sendrecv.test: New test. + * tests/mq_sendrecv-read.test: Likewise. + * tests/mq_sendrecv-write.test: Likewise. + * tests/.gitignore: Add mq_sendrecv, mq_sendrecv-read, + and mq_sendrecv-write. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (mq_sendrecv_LDADD, mq_sendrecv_read_LDADD, mq_sendrecv_write_LDADD): + New variables. + (DECODER_TESTS): Add mq_sendrecv.test, mq_sendrecv-read.test, + and mq_sendrecv-write.test. + +2016-11-08 Dmitry V. Levin + + tests: skip times.test if CLOCK_PROCESS_CPUTIME_ID does not work. + * tests/times.c (main): Skip if clock_gettime consistenly returns zero + for CLOCK_PROCESS_CPUTIME_ID timer. + +2016-10-31 Eugene Syromyatnikov + + tests: add tests for perf_event_attr structure decoding in perf_event_open + * configure.ac: Add checks for presence of various fields of struct + perf_event_attr defined in kernel headers. + * tests/perf_event_open.c: New file. + * tests/perf_event_open_unabbrev.c: Likewise. + * tests/perf_event_open.test: New test. + * tests/perf_event_open_unabbrev.test: Likewise. + * tests/.gitignore: Add perf_event_open, perf_event_open_unabbrev. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add perf_event_open.test, perf_event_open_unabbrev.test. + + Implement decoding of perf_event_attr structure in perf_event_open syscall + * linux/perf_event_struct.h: New file, definition of struct perf_event_attr + from Linux 4.8 + * Makefile.am (strace_SOURCES): Add it. + * xlat/hw_breakpoint_len.in: New file. + * xlat/hw_breakpoint_type.in: Likewise. + * xlat/perf_attr_size.in: Likewise. + * xlat/perf_branch_sample_type.in: Likewise. + * xlat/perf_event_read_format.in: Likewise. + * xlat/perf_event_sample_format.in: Likewise. + * xlat/perf_hw_cache_id.in: Likewise. + * xlat/perf_hw_cache_op_id.in: Likewise. + * xlat/perf_hw_cache_op_result_id.in: Likewise. + * xlat/perf_hw_id.in: Likewise. + * xlat/perf_sw_ids.in: Likewise. + * xlat/perf_type_id.in: Likewise. + * perf.c [HAVE_LINUX_PERF_EVENT_H]: Remove inclusion of + . + (PRINT_XLAT): New macro for simplifying printing values from + sorted xlat. + (printxlat_search): New function, wrapper for xlat_search with behaviour + similar to printval. + (print_perf_event_attr): New print_event_attr structure fetching and + printing function. + (SYS_FUNC(perf_event_open)): Use print_perf_event_attr for displaying + attr argument contents. + * tests/perf_event_open.c: Renamed to + tests/perf_event_open_nonverbose.c. + * tests/perf_event_open.test: add -e verbose=none in order to preserve + output format being checked (in case verbose output is enabled, + contents of attr arguments are shown now); rename to + tests/perf_event_open_nonverbose.test; add -e trace=perf_event_open. + + tests: fix name spelling. + +2016-10-30 Eugene Syromyatnikov + + tests: fix name spelling. + + Update NEWS. + + Fix typo in comment in tests/quotactl.h. + + tests: fix invalid pointer checks in quotactl test. + * tests/quotactl.h (bogus_special, bogus_addr): Move it... + * tests/quotactl.c (main): ... here; remove static and const qualifiers, + use memory after tail_alloc instead of magic numbers. + * tests/quotactl-xfs.c (main): Likewise. + + tests: fix invalid pointer checks in getcpu test. + * test/getcpu.c (main): Replace magic numbers deemed invalid pointers + with addresses after memory returned by tail_alloc. + + tests: fix invalid pointer checks in request_key test. + * test/request_key.c (main): Replace magic numbers deemed invalid pointers + with addresses after memory returned by tail_alloc. + + tests: fix invalid pointer checks in add_key test. + * test/add_key.c (main): Replace magic numbers deemed invalid pointers + with addresses after memory returned by tail_alloc. + + statfs: use printxval_search. + * print_statfs.c (print_statfs_type): Use printxval_search for printing + FS magic xlat value. + + util: add printing helper for sorted xlat arrays. + * util.c (printxval_searchn): New function. + * defs.h (printxval_searchn): New prototype. + (printxval_search): New helper macro useful in conjunction with static + xlat arrays. + + defs: add check for argument being array to ARRAY_SIZE macro. + * gcc_compat.h [GNUC_PREREQ(3, 0)] (BUILD_BUG_ON_ZERO): New macro. + (SAME_TYPE, MUST_BE_ARRAY): Likewise. + * defs.h (ARRAY_SIZE): Add MUST_BE_ARRAY for build-time type check. + + tests: check decoding of oldfstat, oldlstat, and oldstat syscalls. + * tests/oldfstat.c: New file. + * tests/oldlstat.c: Likewise. + * tests/oldstat.c: Likewise. + * tests/oldfstat.test: New test. + * tests/oldlstat.test: Likewise. + * tests/oldstat.test: Likewise. + * tests/xstatx.c [!OLD_STAT]: define OLD_STAT to 0. + (print_stat) [OLD_STAT]: Print predefined values for + st_blksize/st_blocks. + (print_stat): Check for !OLD_STAT in nanosecond precision checks. + (main) [OLD_STAT]: Ignore EOVERFLOW. + (main): Test for successful rc in returned size value check; + print address only on non-successful rc. + * tests/.gitignore: Add oldfstat, oldlstat, and oldstat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add oldfstat.test, oldlstat.test, and oldstat.test. + + tests: additional tests of stat decoders. + * tests/fstatx.c (IS_FSTAT): Define to 1. + * tests/fstatat64.c [__GLIBC__ && __sparc64__] (TEST_BOGUS_STRUCT_STAT): + Define to 0. + * tests/xstatx.c [!IS_STAT] (IS_STAT): Define to 0. + [!TEST_BOGUS_STRUCT_STAT] (TEST_BOGUS_STRUCT_STAT): Define to 1. + (main): Add a check for non-available pointer and a check + for block device file. + * tests/statx.sh: Add tracing of /dev/full file, specify alignment. + * tests/fstat.test: Specify alignment. + +2016-10-30 Eugene Syromyatnikov + + tests: prepare for additional tests of stat decoders. + PRINT_SYSCALL_HEADER/PRINT_SYSCALL_FOOTER now contain open/close brace + pair in order to save errno. PRINT_SYSCALL_FOOTER now uses sprintrc for + printing rc/errno. + + * tests/xstatx.c: Include . + (main): Update PRINT_SYSCALL_FOOTER call convention. + * tests/fstatat.c (PRINT_SYSCALL_HEADER): Add errno saving. + (PRINT_SYSCALL_FOOTER): Restore errno. + * tests/fstatx.c: Likewise. + * tests/lstatx.c: Likewise. + +2016-10-28 Dmitry V. Levin + + Provide a safe definition of O_ACCMODE. + Some libcs e.g. musl are guilty of messing up with O_ACCMODE. + + * open.c (O_ACCMODE): Redefine to 03. + +2016-10-28 Eugene Syromyatnikov + + Implement dumping of mq_timedsend and mq_timedreceive syscalls. + * syscall.c (dumpio): Add SEN_mq_timedreceive and SEN_mq_timedsend. + + mq: print msg_prio as a pointer, not as an immediate value. + * mq.c (SYS_FUNC(mq_timedreceive)): Use printnum_int for printing + msg_prio argument. + +2016-10-28 Eugene Syromyatnikov + + mq: print msg payload only in case of successful mq_timedreceive call. + Also, use u_rval for determining message size. + + * mq.c (SYS_FUNC(mq_timedreceive)): Check for syserror and non-negative + u_rval before calling printstr on msg_ptr argument, or use printaddr otherwise; + provide u_rval as string size. + +2016-10-28 Eugene Syromyatnikov + + mq: Print msg_prio parameter as unsigned int in mq_timedsend. + * mq.c (SYS_FUNC(mq_timedsend)): Change conversion specifier from "%ld" + to "%u", cast argument value to unsigned int. + +2016-10-28 Eugene Syromyatnikov + + mq: Properly print mq_flags field. + mq_flags field of struct mq_attr can contain only O_NONBLOCK flag (other + flags are treated as invalid by mq_getsetattr). Moreover, this field is + ignored by mq_open at all (O_NONBLOCK is set via oflag, not via attr + attribute). + + * xlat/mq_attr_flags.in: New file. + * print_mq_attr.c: Include xlat/mq_attr_flags.h. + (printmqattr): New parameter, bool decode_flags; cast members of struct + mq_attr to long long type; use mq_attr_flags xlat for printing mq_flags; + print mq_flags as flags only in case decode_flags parameter is set + to true. + * mq.c (SYS_FUNC(mq_open)): Specify value of false for decode_flags + parameter of printmqattr call. + (SYS_FUNC(mq_getsetattr)): Specify value of true for decode_flags + parameter of printmqattr call. + * tests/mq.expected: Update expected output. + +2016-10-28 Eugene Syromyatnikov + + mq: Print msg_len parameter as kernel_ulong_t. + * mq.c (SYS_FUNC(mq_timedsend)): Change conversion specifier from "%lu" + to "%llu", use getarg_ull for obtaining msg_len parameter. + (SYS_FUNC(mq_timedreceive)): Likewise. + + print_mq_attr: fix typo. + * print_mq_attr.c (printmqattr): Print field name "mq_curmsgs" + instead of "mq_curmsg". + * tests/mq.expected: Update expected output. + +2016-10-28 Eugene Syromyatnikov + + mq: print mqdes parameter as int. + It is defined as int in . + + * mq.c (SYS_FUNC(mq_timedsend)): Use "%d" conversion specifier instead + of "%ld" for printing mqdes (0th parameter), cast parameter value to + int. + (SYS_FUNC(mq_timedreceive)): Likewise. + (SYS_FUNC(mq_notify)): Likewise. + (SYS_FUNC(mq_getsetattr)): Likewise. + +2016-10-28 Eugene Syromyatnikov + + mq: curly brackets usage fix. + Use curly brackets for denoting blocks in both of if branches if they + are already used in at least one branch. + + tests: additional name_to_handle_at/open_by_handle_at checks. + * tests/file_handle.c: Additional name_to_handle_at/open_by_handle_at + checks. + + tests: require only presence of __NR_* macros for file_handle test. + * tests/file_handle.c: replace fcntl.h include with asm/unistd.h. + [MAX_HANDLE_SZ]: change to defined __NR_name_to_handle_at + && defined __NR_open_by_handle_at, add fcntl.h include + [!MAX_HANDLE_SZ]: Add definition of MAX_HANDLE_SZ and struct + file_handle. + (main): Change name_to_handle_at and open_by_handle_at calls to syscall. + + tests: proper type conversion in keyctl test. + * tests/keyctl.c (printarg): Add intermediate conversion of arg to uintptr_t + since kernel_ulong_t may be of different size. + +2016-10-28 Eugene Syromyatnikov + + file_handle: use separate xlat for name_ta_handle_at flags. + Since the only two flags supported are AT_SYMLINK_FOLLOW and + AT_EMPTY_PATH. + + * xlat/name_to_handle_at_flags.in: New file. + * file_handle.c (SYS_FUNC(name_to_handle_at)): Use name_to_handle_at_flags + for printing flags parameter. + +2016-10-28 Eugene Syromyatnikov + + tests: check decoding of kexec_file_load and kexec_load syscalls. + * tests/kexec_file_load.c: New file. + * tests/kexec_load.c: Likewise. + * tests/kexec_file_load.test: New test. + * tests/kexec_load.test: Likewise. + * tests/.gitignore: Add kexec_file_load and kexec_load. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add kexec_file_load.test and kexec_load.test. + +2016-10-28 Eugene Syromyatnikov + + kexec: use widen_to_ulong since kexec_load has compat on x32/n32. + Curiously, kexec_load uses compat on x32/n32, so its parameters should + be 4 bytes in size on these ABIs. + + * kexec.c (SYS_FUNC(kexec_load)): Use widen_to_ulong for casting + parameters to proper size on x32/n32. + +2016-10-28 Eugene Syromyatnikov + + kexec: fix zeroing of higher bits of flags parameter in kexec_load. + * kexec.c (SYS_FUNC(kexec_load)): Perform type conversion before + negation in order to properly negate higher bits of KEXEC_ARCH_MASK. + + kexec: add printing of struct kexec_segment field names. + * kexec.c (print_seg): Print field names of the kexec_segment structure. + + tests: check decoding of unshare syscall. + * tests/unshare.c: New file. + * tests/unshare.test: New test. + * tests/.gitignore: Add unshare. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add unshare.test. + +2016-10-28 Eugene Syromyatnikov + + clone: use kernel_ulong_t as type of flags parameter of unshare call. + Kernel declares flags parameter as long and looks like x32 and n32 + implement no compat for this call. + + * clone.c (SYS_FUNC(unshare)): Use getarg_ull and printflags64 for + obtaining and parsing flags parameter. + +2016-10-28 Eugene Syromyatnikov + + clone: use separate flag list for unshare. + Not all clone flags could be passed to unshare (see check_unshare_flags + function in kernel/fork.c). + + * xlat/unshare_flags.in: New file. + * clone.c (SYS_FUNC(unshare)): Use unshare_flags for printing flags + parameter. + +2016-10-28 Eugene Syromyatnikov + + tests: check decoding of setns syscall. + * tests/setns.c: New file. + * tests/setns.test: New test. + * tests/.gitignore: Add setns. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setns.test. + +2016-10-28 Eugene Syromyatnikov + + clone: use separate xlat for nstype parameter of setns syscall. + nstype is not flag set but specific type value against which it is + compared in kernel (see kernel/nsproxy.c, SYSCALL_DEFINE2(setns, ...)). + + * xlat/setns_types.in: New file. + * clone.c: Use printxval and setns_types for nstype parameter. + +2016-10-28 Eugene Syromyatnikov + + tests: check non-verbose capget/capset output. + * tests/caps-abbrev.awk: New file. + * tests/caps-abbrev.c: Likewise. + * tests/caps-abbrev.test: New test. + * tests/.gitignore: Add caps-abbrev. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add caps-abbrev.test. + (EXTRA_DIST): Add caps-abbrev.awk. + + tests: additional capset decoder checks. + * tests/caps.awk: Add patterns for additional checks. + * tests/caps.c: Implement additional checks. + + tests: check decoding of fanotify_init syscall. + * tests/fanotify_init.c: New file. + * tests/fanotify_init.test: New test. + * tests/.gitignore: Add fanotify_init. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fanotify_init.test. + + tests: some additional checks for fanotify_mark. + * tests/fanotify_mark.c (do_call): New function. + (main): Use it. + + tests: use sprintrc in tests/fanotify_mark.c. + * tests/fanotify.c (main): Use sprintrc. + + tests: check decoding of {init,finit,delete}_module syscalls. + * tests/delete_module.c: New file. + * tests/finit_module.c: Likewise. + * tests/init_delete_module.h: Likewise. + * tests/init_module.c: Likewise. + * tests/delete_module.test: New test. + * tests/finit_module.test: Likewise. + * tests/init_module.test: Likewise. + * tests/.gitignore: Add delete_nodule, finit_module, and init_module. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add delete_module.test, finit_module.test, + and init_module.test. + (EXTRA_DIST): Add init_delete_module.h. + +2016-10-28 Eugene Syromyatnikov + + bjm: use getarg_ull for retrieving first two parameters of init_module syscall + As init_module has no compat wrapper, its first parameter is a pointer + and the second is length, they both have the same size as kernel_ulong_t + type. + + * bjm.c (SYS_FUNC(init_module)): Obtain first two parameters using + getarg_ull, print address argument using printaddr_ull, print length + argument using "%llu" conversion specifier. + +2016-10-28 Dmitry V. Levin + + Add printaddr_ull, change printaddr into a thin wrapper around it. + * defs.h (printaddr_ull): New prototype. + (printaddr): Change to a static inline wrapper around printaddr_ull. + * util.c (printaddr): Rename to printaddr_ull, change argument type + to unsigned long long, change print format to %#llx. + +2016-10-28 Eugene Syromyatnikov + + xlat: add values for MODULE_INIT_* constants. + * bjm.c (MODULE_INIT_IGNORE_MODVERSIONS, MODULE_INIT_IGNORE_VERMAGIC): + Remove. + * xlat/module_init_flags.in: Add values for + MODULE_INIT_IGNORE_MODVERSIONS and MODULE_INIT_IGNORE_VERMAGIC records. + +2016-10-28 Eugene Syromyatnikov + + Remove parser of create_module syscall. + Since create_module syscall is present only in kernels before Linux 2.6 + and strace does not support those kernels, there is no use to keep this + parser any longer. + + * bjm.c (SYS_FUNC(create_module)): Remove. + * linux/dummy.h (sys_create_module): Add stub alias. + +2016-10-28 Eugene Syromyatnikov + + tests: check decoding of process_vm_readv and process_vm_writev syscalls + * tests/process_vm_readv.c: New file. + * tests/process_vm_readv_writev.c: Likewise. + * tests/process_vm_writev.c: Likewise. + * tests/process_vm_readv.test: New test. + * tests/process_vm_writev.test: Likewise. + * tests/.gitignore: Add process_vm_readv and process_vm_writev. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add process_vm_readv.test and process_vm_writev.test. + (EXTRA_DIST): Add process_vm_readv_writev.c. + + process_vm: use widen_to_ulong for local_iovcnt, renote_iovcnt, and flags + * process_vm.c (SYS_FUNC(process_vm_readv), + SYS_FUNC(process_vm_writev)): Use widen_to_ulong for local_iovcnt, + renote_iovcnt, and flags parameters. + +2016-10-28 Eugene Syromyatnikov + + defs: add widen_to_ulong macro. + This is similar to widen_to_long, but for unsigned values. + + * defs.h (widen_to_ulong): New macro. + +2016-10-28 Eugene Syromyatnikov + + process_vm: print pid argument as int. + * process_vm.c (SYS_FUNC(process_vm_readv), + SYS_FUNC(process_vm_writev)): Change conversion specifier for pid + argument from "%ld" to "%d". + +2016-10-28 Eugene Syromyatnikov + + process_vm: remove syserror check for iovec printing. + This check had been done by print_array inside tprint_iov anyway. + + * process_vm.c (SYS_FUNC(process_vm_readv)): Use tprint_iov_upto for + printing local_iov; do not check for syserror, provide decode_iov + parameter to tprint_iov{,_upto} based on its value instead. + +2016-10-28 Eugene Syromyatnikov + + io: use umoven_or_printaddr_ignore_syserror as umove function in tprint_iov_upto + This enables printing of iovec arrays even in case of failed syscall + (failed syscall doesn't mean that iovec itself is inaccessible and + useless). One caveat here is that we should explicitly provide proper + IOV_DECODE_* value based on syserror value in case printing is performed + on exiting; we can't simply override it to IOV_DECODE_ADDR on exiting + when syserror is up, since this may be called by code which tries to + print iovec containing local data, which should be perfectly accessible + (on the other hand, there are no cases of such behaviour at the moment). + + Since iovecs themselves are printed even if syscall has failed now, + preadv test is updated to reflect this. It is notable, though, that this + is the only place where this case is checked. + + * io.c (tprint_iov_upto): Specify umoven_or_printaddr_ignore_syserror + instead of umoven_or_printaddr as umoven_func parameter. + (SYS_FUNC(readv), do_preadv): Specify decode_iov parameter value + based on syserror(tcp) value. + * scsi.c: (print_sg_io_v3_res, print_sg_io_v4_res): Likewise. + * tests/preadv.c: Update expected output for the case when preadv + with singe-item iovec failed. + +2016-10-28 Eugene Syromyatnikov + + Move umoven_or_printaddr_ignore_syserror to util.c. + * defs.h (umoven_or_printaddr_ignore_syserror): New prototype. + * v4l2.c (umoven_or_printaddr_ignore_syserror): Move ... + * util.c: ... here. + +2016-10-28 Eugene Syromyatnikov + + v4l2: check for verbose flag in umoven_or_printaddr_ignore_syserror. + This change makes behaviour of umoven_or_printaddr_ignore_syserror in + line with umoven_or_printaddr when verbose flag is disabled. + + * v4l2.c (umoven_or_printaddr_ignore_syserror): Simply call printaddr + when verbose flag is unset. + +2016-10-28 Eugene Syromyatnikov + + tests: check decoding of kcmp syscall. + * tests/kcmp.c: New file. + * tests/kcmp.test: New test. + * tests/.gitignore: Add kcmp. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add kcmp.test. + +2016-10-28 Dmitry V. Levin + + kcmp: print index parameters of unknown commands as kernel_ulong_t. + * lookup_dcookie.c (SYS_FUNC(kcmp)): Use getarg_ull to retrieve idx1 + and idx2, print them using %#llx format in case of unknown command. + +2016-10-27 Eugene Syromyatnikov + + tests: check decoding of inotify family syscalls. + * tests/inotify.c: New file. + * tests/inotify_init1.c: Likewise. + * tests/inotify.test: New test. + * tests/inotify_init1.test: Likewise. + * tests/.gitignore: Add inotify and inotify_init1. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add inotify.test and inotify_init1.test. + + xlat: use IN_* prefix for inotify_init1 flag constants. + * xlat/inotify_init_flags.in: Replace O_* prefix with IN_* prefix for + O_NONBLOCK and O_CLOEXEC constants, provide fallback definitions. + + tests: check decoding of lookup_dcookie syscall. + * tests/lookup_dcookie.c: New file. + * tests/lookup_dcookie.test: New test. + * tests/.gitignore: Add lookup_dcookie. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add lookup_dcookie.test. + +2016-10-27 Eugene Syromyatnikov + + lookup_dcookie: print len parameter as kernel_ulong_t. + It is size_t and without compat on x32/n32. + + * lookup_dcookie.c (SYS_FUNC(lookup_dcookie)): Change conversion + specifier from "%lu" to "%llu", use getarg_ull for len argument + retrieval. + +2016-10-26 Eugene Syromyatnikov + + defs.h: add offsetofend macro. + Analogous to offsetof but returns structure offset after the specified + field. Useful for checking whether specific field is present in obtained + data or specifying amount of data to copy based on the (last) field needed. + + * defs.h (offsetofend): New macro. + +2016-10-26 Eugene Syromyatnikov + + tests: move ARG_STR and similar macros to tests.h. + * tests/add_key.c (_STR, ARG_STR): Move ... + * tests/tests.h: ... here. + (ARG_ULL_STR): New macro. + * tests/keyctl.c (ARG_STR): Remove. + * tests/quotactl.h (ARG_STR): Likewise. + * tests/request_key.c (ARG_STR): Likewise. + + tests: move LL_PAIR and LL_VAL_TO_PAIR macros to tests.h. + * tests/fadvise.h (LL_PAIR, LL_VAL_TO_PAIR): Move ... + * tests/tests.h: ... here. + + tests: check decoding of ioprio_get and ioprio_set syscalls. + * tests/ioprio.c: New file. + * tests/ioprio.test: New test. + * tests/.gitignore: Add ioprio. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioprio.test. + +2016-10-26 Eugene Syromyatnikov + + xlat: provide fallback definitions for CLOCK_* constants. + Since new values have been added gradually over various kernel versions, + it's better to define them explicitly in order to avoid situations when + strace built with older kernel headers cannot decode some recently + defined values. + + * xlat/clocknames.in: Add values for constants. + +2016-10-26 Eugene Syromyatnikov + + tests: move fill_memory and fill_memory_ex into a separate file. + * tests/fill_memory.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + * tests/quotactl.h (fill_memory, fill_memory_ex): Move to fill_memory.c. + * tests/tests.h (fill_memory, fill_memory_ex): New prototypes. + + tests: add period parameter to fill_memory_ex. + * tests/quotactl.h (fill_memory_ex): Add period parameter, + use it as a divisor in non-constant part of value. + (fill_memory): Specify period of 0x80 to fill_memory_ex call. + * tests/quotactl-xfs.c (main): Likewise. + +2016-10-05 Dmitry V. Levin + + Post-release administrivia. + * NEWS: Add a header line for the next release. + * debian/changelog.in: Add a changelog entry for 4.14-1. + * strace.spec.in: Likewise. + +2016-10-04 Dmitry V. Levin + + Prepare for 4.14 release. + * NEWS: Update for 4.14 release. + + Generate SEN numbers in a locale independent order. + * generate_sen.sh: Sort SEN numbers using C collation rules. + +2016-10-04 Dmitry V. Levin + + Assume that offsetof is provided by stddef.h. + According to C89, shall define offsetof macro. + + * defs.h: Include unconditionally. + [!offsetof]: Remove. + +2016-10-03 Eugene Syromyatnikov + + tests: check decoding of add_key, keyctl, and request_key syscalls. + * tests/add_key.c: New file. + * tests/keyctl.c: Likewise. + * tests/request_key.c: Likewise. + * tests/add_key.test: New test. + * tests/keyctl.test: Likewise. + * tests/request_key.test: Likewise. + * tests/.gitignore: Add add_key, keyctl, and request_key. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add add_key.test, keyctl.test, and request_key.test. + +2016-10-03 Eugene Syromyatnikov + + keyctl: use kernel_ulong_t and getarg_ull instead of long. + This potentially fixes keyctl decoder for x32 personality. + + * keyctl.c (keyctl_update_key, keyctl_read_key, keyctl_instantiate_key, + keyctl_instantiate_key_iov, keyctl_dh_compute): Change addr and len + arguments to kernel_ulong_t. Print len using %llu format. + (keyctl_keyring_search): Change addr1 and addr2 arguments + to kernel_ulong_t. + (print_dh_params): Change addr argument to kernel_ulong_t. + (SYS_FUNC(keyctl)): Retrieve arguments via getarg_ull, pass them + to the appropriate handlers. + +2016-10-03 Eugene Syromyatnikov + + keyctl: fix parameter signedness. + * keyctl.c (keyctl_update_key): Change addr and len arguments + to unsigned. + (keyctl_read_key): Likewise. + (keyctl_instantiate_key): Likewise. + (keyctl_instantiate_key_iov): Likewise. + (keyctl_dh_compute): Likewise. + (keyctl_keyring_search): Change addr1 and addr2 arguments to unsigned. + (keyctl_chown_key): Change user and group arguments to unsigned. + (keyctl_get_persistent): Change uid argument to unsigned. + +2016-10-03 Eugene Syromyatnikov + + keyctl: use printstr_ex for printing out buffer. + keyctl_read_key had subtle bug by treating out buffer in KEYCTL_READ + as NUL-terminated, which is not true. We fix it by adding parameter to + keyctl_read_key signalising whether buffer is NUL-terminated and using + printstr_ex for printing (expectedly) NUL-terminated strings. + + * keyctl.c (keyctl_read_key): Add has_nul parameter. Do not use -1 as + string len. Use printstr_ex for buffer output with user style depending + on has_nul value. + (SYS_FUNC(keyctl)): Specify has_nul parameter to keyctl_read_key + by comparing cmd value with KEYCTL_READ. + +2016-10-03 Eugene Syromyatnikov + + Add printstr_ex which allows for providing user quotation style. + This is useful for providing QUOTE_OMIT_TRAILING_0 and maybe other + flags. + + * defs.h (printstr_ex): New prototype. + (printstr): Change to a wrapper around printstr_ex with zero user style. + * util.c (printstr): Rename to ... + (printstr_ex) ... new function, add user_style argument which is or'ed + with computed style. + +2016-10-03 Eugene Syromyatnikov + + util: add quote_string flag signalising that string is NUL-terminated. + It is useful in cases strings with size provided are expected to be + NUL-terminated but are not trustworthy enough to call just plain + printstr(str, -1). + + * defs.h (QUOTE_OMIT_TRAILING_0): New constant definition. + * util.c (string_quote): Swallow terminating NUL if + QUOTE_OMIT_TRAILING_0 is set. + +2016-10-03 Eugene Syromyatnikov + + keyctl: add support for KEYCTL_DH_COMPUTE. + * keyctl.c (struct keyctl_dh_params): New structure. + (print_dh_params, keyctl_dh_compute): New functions. + (SYS_FUNC(keyctl)): Add support for KEYCTL_DH_COMPUTE cmd value. + +2016-10-03 Dmitry V. Levin + + x86_64: fix is_negated_errno for x32 personality. + * syscall.c (is_negated_errno) [X86_64]: Do not truncate kernel_ulong_t + to uint32_t for x32 personality. + + tests: fix another regression in qual_syscall.test. + * tests/qual_syscall.test: Fix pattern_nonabbrev_verbose pattern. + (check_output_mismatch): Print the pattern that triggered match failure. + + Use err_name, print unrecognized errno values as numbers. + * syscall.c (trace_syscall_exiting): Use err_name() instead + of open-coding it. Print unrecognized errno values using %lu format + instead of ERRNO_%lu as the latter prodices an invalid constant. + +2016-10-03 Eugene Syromyatnikov + + keyctl: print errno name in KEYCTL_REJECT in case it is available. + * keyctl.c (keyctl_reject_key): Get errno string via err_name + and print it if it is not NULL. + + Add function for getting errno string. + * defs.h (err_name): New prototype. + * syscall.c (err_name): New function. + +2016-10-03 Dmitry V. Levin + + struct tcb: change the type of u_error field from int to unsigned long. + This is the type actually used for the error code on architectures + that use a dedicated register. + + * defs.h (struct tcb): Change the type of u_error to unsigned long. + * syscall.c (trace_syscall_exiting): Change the type of u_error variable + to unsigned long, print it using %lu format, drop no longer needed + explicit cast to unsigned long. + (saved_u_error): Change type to unsigned long. + +2016-10-02 Dmitry V. Levin + + Use tprints instead of tprintf in a few more places. + * btrfs.c (btrfs_print_qgroup_inherit, btrfs_print_tree_search, + btrfs_ioctl): Replace tprintf with tprints for printing strings without + format specifiers. + * net.c (print_group_req): Likewise. + * scsi.c (scsi_ioctl): Likewise. + * term.c (decode_termios, decode_termio): Likewise. + * userfaultfd.c (uffdio_ioctl): Likewise. + +2016-10-02 Eugene Syromyatnikov + + keyctl: do not print comma for KEYCTL_SESSION_TO_PARENT command. + Since this command doesn't have any additional arguments, the comma does + not needed. Since this is the only command which lacks additional + arguments, it's better to add special case for it rather than add + printing of comma to all other commands. + + * keyctl.c (SYS_FUNC(keyctl)): Add check for command not being + KEYCTL_SESSION_TO_PARENT when printing comma dividing cmd argument + from the rest. + +2016-10-02 Eugene Syromyatnikov + + keyctl: use getarg_ull for printing generic arguments. + Otherwise it is erroneous on x32, for example. + + * keyctl.c (SYS_FUNC(keyctl)): Use "%#llx" conversion specifier + and getarg_ull for fallback argument printing. + +2016-10-02 Eugene Syromyatnikov + + keyctl: use printuid for printing UID/GID. + UID/GID are unsigned except special -1 value (which is also special in + context of specific keyctl commands), so special printing function + should be used. + + * keyctl.c (keyctl_chown_key, keyctl_get_persistent): Use printuid + instead of printf with "%d" conversion for printing UID/GID. + +2016-10-02 Eugene Syromyatnikov + + io: handle data_size of -1 as unlimited data in print_iovec. + Otherwise it can be depleted and print_iovec starts printing empty + strings. + + * io.c (print_iovec): Interpret c->data_size of -1 as unlimited data + and do not decrease it in this case. + +2016-10-01 Dmitry V. Levin + + tests: fix typo in qual_syscall.test. + Fix test regression introduced by commit v4.13-225-g55334ef. + + * tests/qual_syscall.test: Fix typo. + +2016-09-30 Dmitry V. Levin + + Enhance -e abbrev=set, -e raw=set, and -e verbose=set. + Enhance abbrev=, raw=, and verbose= to accept the same syntax as trace=. + For example, this allows such syntax as -e verbose=file. + + * syscall.c (lookup_class): Define before qual_syscall. + (qualify): Move the loop based on lookup_class ... + (qual_syscall): ... here. + * tests/qual_syscall.test: Check it. + +2016-09-30 Dmitry V. Levin + + tests/qual_syscall.test: rewrite without ls. + * tests/qual_syscall.test: Invoke ./umovestr instead of ls. + Update expected output. + +2016-09-28 Eugene Syromyatnikov + + tests: check decoding of fadvise64 and fadvise64_64 syscalls. + * tests/fadvise.h: New file. + * tests/fadvise64.c: Likewise. + * tests/fadvise64_64.c: Likewise. + * tests/fadvise64.test: New test. + * tests/fadvise64_64.test: Likewise. + * tests/.gitignore: Add fadvise64 and fadvise64_64. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fadvise64.test, fadvise64_64.test. + (EXTRA_DIST): Add fadvise.h. + +2016-09-28 Dmitry V. Levin + + mips o32: implement fetching the 7th subcall argument. + * syscall.c [LINUX_MIPSO32] (decode_mips_subcall): Fetch the last + argument of 7-arg syscalls. + +2016-09-28 Eugene Syromyatnikov + + x32: use proper decoder for fadvise64 syscall. + fadvise_64_64 decoder used before this change prints different sign + of the "len" argument (loff_t vs size_t). + + * linux/x32/syscallent.h (fadvise64): Replace SEN(fadvise64_64) + with SEN(fadvise64). + +2016-09-28 Eugene Syromyatnikov + + fadvise: use getarg_ull for obtaining len argument of fadvise64 syscall. + Since its type is size_t, it is 64-bit wide on x32 and special care + should be taken in order to obtain it. + + * fadvise.c (SYS_FUNC(fadvise64)): Use getarg_ull for obtaining value + of "len" syscall argument. + +2016-09-28 Eugene Syromyatnikov + + util: add getarg_ll and getarg_ull functions. + These allow retrieving specific argument in full taking into account + peculiarities of runtimes which employ tcp->ext_arg (e.g. x32). + + * defs.h (getarg_ll, getarg_ull): New prototypes. + * util.c (getarg_ll, getarg_ull): New functions. + (printargs): Use getarg_ull. + +2016-09-28 Eugene Syromyatnikov + + fadvise: change printing of len argument to unsigned in fadvise64 syscall + The kernel declares fadvise64 as + long sys_fadvise64(int fd, loff_t offset, size_t len, int advice); + + * fadvise.c (SYS_FUNC(fadvise64)): Change conversion specifier from + "%ld" to "%lu" for printing len argument since kernel expects argument + of type size_t. + +2016-09-28 Dmitry V. Levin + + sh64, sparc64: use proper decoder for fadvise64_64 syscall. + This change is no-op yet, but things will change when decoder + of fadvise64 syscall get fixed. + + * linux/sh64/syscallent.h (fadvise64_64): Replace SEN(fadvise64) + with SEN(fadvise64_64). + * linux/sparc64/syscallent.h (fadvise64_64): Likewise. + +2016-09-28 Eugene Syromyatnikov + + tests: check decoding of fallocate syscall. + * configure.ac (AC_CHECK_FUNCS): Add fallocate. + * tests/fallocate.c: New file. + * tests/fallocate.test: New test. + * tests/.gitignore: Add fallocate. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fallocate.test. + +2016-09-27 Eugene Syromyatnikov + + fallocate: change print format of offset and len arguments to signed. + Since types of these arguments are off_t and kernel actually expects + signed values in order to fail when negative values are provided, + lets display these values as signed. + + * fallocate.c (SYS_FUNC(fallocate)): Change conversion specifier for + printing "offset" and "len" syscall arguments from %llu to %lld. + +2016-09-27 Eugene Syromyatnikov + + xlat: add default values for falloc_flags constants. + In order to avoid dependence of declared constants to headers available + on build system. + + * xlat/falloc_flags.in: Add default values for constants. + +2016-09-27 Eugene Syromyatnikov + + tests: check decoding of getcpu syscall. + * tests/getcpu.c: New file. + * tests/getcpu.test: New test. + * tests/.gitignore: Add getcpu. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getcpu.test. + + tests: make magic values in ioctl_block test distinctive. + * tests/ioctl.block (init_magic): Add iterator value to magic value + in order to enable detection of potential 4-byte aligned shifts. + + tests: additional getcwd decoding checks. + * tests/getcwd.c (main): Add more checks for getcwd arguments decoding. + + tests: check decoding of quotactl syscall. + * configure.ac (AC_CHECK_HEADERS): Add linux/dqblk_xfs.h, linux/quota.h, + and sys/quota.h. + * tests/.gitignore: Add quotactl, quotactl-v, quotactl-xfs, + and quotactl-xfs-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add quotactl.test, quotactl-v.test, + quotactl-xfs.test, and quotactl-xfs-v.test. + (EXTRA_DIST): Add quotactl.h + * quotactl.h: New file. + * quotactl.c: Likewise. + * quotactl-v.c: Likewise. + * quotactl-xfs.c: Likewise. + * quotactl-xfs-v.c: Likewise. + * quotactl.test: New test. + * quotactl-v.test: Likewise. + * quotactl-xfs.test: Likewise. + * quotactl-xfs-v.test: Likewise. + +2016-09-27 Dmitry V. Levin + + quota: ensure that names of structure fields are printed properly. + * quota.c (PRINT_FIELD_D, PRINT_FIELD_U, PRINT_FIELD_X): New macros. + (decode_cmd_data): Use them to print structure fields. + + Enhance zero_extend_signed_to_ull and sign_extend_unsigned_to_ll macros. + * defs.h (zero_extend_signed_to_ull, sign_extend_unsigned_to_ll): + Add support of char types. + * tests/tests.h (zero_extend_signed_to_ull, sign_extend_unsigned_to_ll): + Likewise. + + quota: move Q_QUOTAON handling to subcommand switch statement. + * quota.c (SYS_FUNC(quotactl)): Move handling of Q_QUOTAON subcommand ... + (decode_cmd_data): ... here. + +2016-09-27 Eugene Syromyatnikov + + quota: remove legacy subcommand decoding support code. + Support for these quota subcommands by linux kernels has been dropped + long time ago (between 2.5.16 and 2.5.17), so lets drop it in order + to minimize amount of code which should be subjected to testing and + structured conversion. + + * quota.c (struct v1_dqblk, struct v2_dqblk, struct v2_dqinfo, + struct v1_dqstats, struct v2_dqstats): Remove. + (decode_cmd_data): Remove handling of Q_V1_GETQUOTA, Q_V1_SETQUOTA, + Q_V2_GETQUOTA, Q_V2_SETQUOTA, Q_V2_GETINFO, Q_V2_SETINFO, Q_V1_GETSTATS, + and Q_V2_GETSTATS subcommands. + (SYS_FUNC(quotactl)): Remove handling of Q_V1_QUOTAON subcommand. + +2016-09-27 Eugene Syromyatnikov + + quota: add realtime block limits fields to XFS disk quota printing code. + * quota.c (decode_cmd_data): Add printing of d_rtb_hardlimit + and d_rtb_softlimit fields to struct xfs_dqblk printing code. + +2016-09-27 Eugene Syromyatnikov + + quota: add packed attribute to struct if_dqblk definition. + Since the only difference between 32-bit and 64-bit environments + regarding this structure is its padding, lets just add packed attribute + to its definition instead of going full mpers. + + * quota.c (struct if_dqblk): Add ATTRIBUTE_PACKED. + +2016-09-27 Eugene Syromyatnikov + + quota: Add decoding for Q_XQUOTARM subcommand. + * quota.c (decode_cmd_data): Add Q_XQUOTARM handling to subcommand + switch. + +2016-09-27 Eugene Syromyatnikov + + quota: add dispatch of SYNC subcommands. + Q_XQUOTASYNC is no-op, but it does not require id/addr arguments anyway. + + * quota.c (decode_cmd_data): Add Q_SYNC and Q_XQUOTASYNC to subcommand + dispatch switch since id/addr arguments for these subcommands are known + to be ignored. + +2016-09-27 Eugene Syromyatnikov + + quota: add missing prefixes to struct field names. + * quota.c (decode_cmd_data): Print field names in accordance with + their definition. + + quota: fix indentation inside subcommand dispatching switch statement. + +2016-09-27 Eugene Syromyatnikov + + quota: avoid printing id argument for those commands that ignore it. + As id argument is not used for Q_QUOTAOFF, Q_GETFMT, Q_V2_GETINFO, + Q_GETINFO, Q_V2_SEETINFO, Q_SETINFO, Q_SYNC, Q_XQUOTAON, Q_XQUOTAOFF, + Q_XQUOTARM, Q_XGETQSTAT, Q_XGETQSTATV, Q_XQUOTASYNC, Q_V1_GETSTATS, and + Q_V2_GETSTATS subcommands, do not print it for these subcommands. + + * quota.c (decode_cmd_data): Add id argument parameter, add printing + of id argument for Q_GETQUOTA, Q_SETQUOTA, Q_GETNEXTQUOTA, + Q_V1_GETQUOTA, Q_V1_SETQUOTA, Q_V2_GETQUOTA, Q_V2_SETQUOTA, + Q_XGETQUOTA, Q_XGETNEXTQUOTA, Q_XSETQLIM, and unknown subcommands. + (SYS_FUNC(quotactl)): Remove printing of id argument, pass it + to decode_cmd_data. + +2016-09-27 Eugene Syromyatnikov + + quota: use printuid for id parameter printing. + * quota.c (SYS_FUNC(quotactl)): Since id call argument is used for + user/group/project ID which all have special semantics for -1, + print it the same way as UIDs are printed. + + quota: display quota subcommand as a macro. + * quota.c (SYS_FUNC(quotactl)): Replace disjunction of two xlat values + (which also lacks shift of the left part) with QCMD macro call. + +2016-09-26 Dmitry V. Levin + + tests: use VERBOSE macro in waitid and waitid-v tests. + * tests/waitid-v.c (VERBOSE_RUSAGE): Remove. + (VERBOSE): Define to 1. + * tests/waitid.c (sprint_rusage): Check VERBOSE instead + of VERBOSE_RUSAGE. + + tests: use VERBOSE macro in wait4 and wait4-v tests. + * tests/wait4-v.c (VERBOSE_RUSAGE): Remove. + (VERBOSE): Define to 1. + * tests/wait4.c (sprint_rusage): Check VERBOSE instead + of VERBOSE_RUSAGE. + + tests: use VERBOSE macro in msg_control and msg_control-v tests. + * tests/msg_control-v.c (VERBOSE_MSGHDR): Remove. + (VERBOSE): Define to 1. + * tests/msg_control.c (print_fds, print_ip_opts): Check VERBOSE instead + of VERBOSE_MSGHDR. + + tests: use VERBOSE macro in mmsg_name and mmsg_name-v tests. + * tests/mmsg_name-v.c (VERBOSE_MMSGHDR): Remove. + (VERBOSE): Define to 1. + * tests/mmsg_name.c (test_mmsg_name): Check VERBOSE instead + of VERBOSE_MMSGHDR. + + tests: use VERBOSE macro in ioctl_rtc and ioctl_rtc-v tests. + * tests/ioctl_rtc-v.c (VERBOSE_IOCTL): Remove. + (VERBOSE): Define to 1. + * tests/ioctl_rtc.c (print_rtc_time): Check VERBOSE instead + of VERBOSE_IOCTL. + + tests: use VERBOSE macro in ioctl_evdev and ioctl_evdev-v tests. + * tests/ioctl_evdev-v.c (VERBOSE_IOCTL): Remove. + (VERBOSE): Define to 1. + * tests/ioctl_evdev.c: Check VERBOSE instead of VERBOSE_IOCTL. + + tests: use VERBOSE macro in execveat and execveat-v tests. + * tests/execveat-v.c (VERBOSE_EXECVEAT): Remove. + (VERBOSE): Define to 1. + * tests/execveat.c (main): Check VERBOSE instead of VERBOSE_EXECVEAT. + + tests: use VERBOSE macro in execve and execve-v tests. + * tests/execve-v.c (VERBOSE_EXECVE): Remove. + (VERBOSE): Define to 1. + * tests/execve.c (main): Check VERBOSE instead of VERBOSE_EXECVE. + +2016-09-26 Dmitry V. Levin + + tests: add VERBOSE macro. + Introduce VERBOSE macro (defaults to 0) that is expected to be defined + to 1 by code testing "strace -v" output. + + * tests/tests.h [!VERBOSE] (VERBOSE): New macro. + +2016-09-20 Dmitry V. Levin + + decode_open: print the mode argument when O_TMPFILE flag is set. + O_TMPFILE reqires the mode argument (just like O_CREAT), so print it. + + * open.c (STRACE_O_TMPFILE): New macro. + (decode_open): Print the mode argument when O_TMPFILE flag is set. + * tests/open.c (main): Check it. + Fixes RH#1377846. + +2016-09-20 Dmitry V. Levin + + tests: use sprintrc in tests/ptrace.c. + * tests/ptrace.c (errstr): New static variable. + (do_ptrace): Initialize it using sprintrc. + (test_peeksiginfo, main): Use errstr. + + tests: use sprintrc in tests/netlink_protocol.c. + * tests/netlink_protocol.c (main): Use sprintrc. + + tests: use sprintrc in tests/fchownat.c. + * tests/fchownat.c (main): Use sprintrc. + + tests: use sprintrc in tests/fchmodat.c. + * tests/fchmodat.c (main): Use sprintrc. Add more fchmodat decoding tests. + + tests: use sprintrc in tests/fchmod.c. + * tests/fchmod.c (main): Use sprintrc. Add more fchmod decoding tests. + * tests/fchmod.test: Update the value specified for strace -a parameter. + + tests: use sprintrc in tests/getgroups.c. + * tests/getgroups.c (main): Use sprintrc. + + tests: use sprintrc in tests/setgroups.c. + * tests/setgroups.c (main): Use sprintrc. + +2016-09-19 Dmitry V. Levin + + tests/utime.c: rewrite without assert. + * tests/utime.c: Do not include . + (main): Use sprintrc instead of assert. + + tests/xattr.c: rewrite without assert. + * tests/xattr.c: Do not include . + (main): Use sprintrc instead of assert. + + tests: use sprintrc in tests/xchownx.c. + * tests/xchownx.c (main): Do not include . Use sprintrc. + + tests/xstatfsx.c: fix potential errno clobbering. + * tests/xstatfsx.c (main): Use sprintrc. + +2016-09-19 Dmitry V. Levin + + Add more fs magic constants. + Add *_MAGIC constants defined for some relatively widespread + non-mainline filesystems. + + * xlat/fsmagic.in: Add AUFS_SUPER_MAGIC, GPFS_SUPER_MAGIC, + VZFS_SUPER_MAGIC, and ZFS_SUPER_MAGIC constants. + +2016-09-15 Eugene Syromyatnikov + + tests: fix whitespace for explicit type casts in futex test. + +2016-09-14 Dmitry V. Levin + + Add more fs magic constants. + Add *_MAGIC constants defined inside linux fs but not explicitly + exported via linux uapi. + + * xlat/fsmagic.in: Add HFS_SUPER_MAGIC, HFSPLUS_SUPER_MAGIC, + EXOFS_SUPER_MAGIC, CEPH_SUPER_MAGIC, UBIFS_SUPER_MAGIC, JFS_SUPER_MAGIC, + BEFS_SUPER_MAGIC, NTFS_SB_MAGIC, XFS_SB_MAGIC, CONFIGFS_MAGIC, + FUSE_CTL_SUPER_MAGIC, FUSE_SUPER_MAGIC, AFS_FS_MAGIC, OCFS2_SUPER_MAGIC, + VXFS_SUPER_MAGIC, LOGFS_MAGIC, SMB2_MAGIC_NUMBER, and CIFS_MAGIC_NUMBER + constants. + +2016-09-14 Dmitry V. Levin + + Update fs *_MAGIC constants. + Add fs *_MAGIC constants exported by linux uapi. + + * xlat/fsmagic.in: Add BFS_MAGIC, GFS2_MAGIC, and ROMFS_MAGIC constants + defined in linux/bfs_fs.h, linux/gfs2_ondisk.h, and linux/romfs_fs.h, + respectively. + +2016-09-13 Dmitry V. Levin + + tests: workaround limited semctl implementation in musl. + musl libc forwards semctl command argument for 8 known commands only, + for all the rest it passes 0 instead. + + * tests/ipc_sem.c (main): Update semctl expected output. + +2016-09-13 Eugene Syromyatnikov + + tests: add more IPC decoding checks. + * tests/ipc_msg.c: Additional msgget (parameter format) and msgctl + (parameter format, decoding of struct msqid_ds in IPC_SET/IPC_STAT + commands) checks. + * tests/ipc_sem.c: Additional semget and semctl checks. + * tests/ipc_shm.c: Additional shmget and shmctl checks. + * tests/semop.c: Additional semop checks. Add checks for semtimedop. + * tests/semop.test: Add explicit -e parameter in order to trace both + semop and semtimedop. + * tests/shmxt.c: Additional shmat and shmdt checks. + +2016-09-12 Dmitry V. Levin + + .mailmap: add addresses of Dr. David Alan Gilbert. + * .mailmap: Add both addresses of Dr. David Alan Gilbert here to avoid + duplications in CREDITS file. + +2016-09-12 Eugene Syromyatnikov + + .mailmap: add canonical name for Eugene Syromyatnikov. + This is needed due to apparent deviation in spelling of commit author + name in several commits. + + * .mailmap: Add canonical name for Eugene Syromyatnikov. + +2016-09-12 Dmitry V. Levin + + Update generic ioctl entries from linux 4.8. + * linux/64/ioctls_inc.h: Update from linux v4.8 using ioctls_gen.sh. + * linux/32/ioctls_inc_align32.h: Likewise. + * linux/32/ioctls_inc_align64.h: Likewise. + +2016-09-12 Gleb Fotengauer-Malinovskiy + + x32: update ioctl entries from linux 4.8. + * linux/x32/ioctls_inc0.h: Update from linux v4.8 using ioctls_gen.sh. + + maint: update for linux 4.8. + * maint/ioctls_sym.sh: Add workarounds for linux/atm_zatm.h and + xen/evtchn.h files. + +2016-09-12 Dmitry V. Levin + + tests: use sprintrc_grep in tests/ipc_shm.c. + * tests/ipc_shm.c (main): Use sprintrc_grep. + + tests: use sprintrc_grep in tests/ipc_sem.c. + * tests/ipc_sem.c (main): Use sprintrc_grep. + +2016-09-11 Dmitry V. Levin + + tests: use sprintrc_grep in tests/ipc_msg.c. + * tests/ipc_msg.c (main): Use sprintrc_grep. + +2016-09-10 Dmitry V. Levin + + tests: use sprintrc in tests/chmod.c. + * tests/chmod.c (main): Use sprintrc. Add more chmod decoding tests. + +2016-09-09 Dmitry V. Levin + + ipc: fix printing of nsops argument of semop and semtimedop syscalls. + According to POSIX, nsops argument of semop syscall has type size_t, + but the kernel treats nsops argument of semop and semtimedop syscalls + as unsigned int. + + * ipc_sem.c (tprint_sembuf_array): Change type of "count" argument + from unsigned long to unsigned int, print it using %u format. + +2016-09-09 Eugene Syromyatnikov + + tests/aio.c: bring indentation in conformance with the rest of the file. + +2016-09-09 Eugene Syromyatnikov + + tests: use predefined constant in aio_context_t checks in aio test. + Also fix io_cancel and io_destroy checks which did not check correct + printing of context argument properly. + + * tests/aio.c (main): Update syscall checks in order to use newly + defined bogus_ctx constant. + +2016-09-09 Dmitry V. Levin + + Mark io_setup and io_destroy as memory mapping related syscalls. + As io_setup syscall allocates some memory using do_mmap_pgoff, and + io_destroy deallocates this memory using vm_munmap, set TRACE_MEMORY + flag for all sysentries of io_setup and io_destroy using the following + oneliner: + sed -ri '/io_setup|io_destroy/ s/0,/TM,/' linux/*/syscallent*.h + + * linux/*/syscallent*.h (io_setup, io_destroy): Change sys_flags to TM. + +2016-09-08 Dmitry V. Levin + + travis: add x86 musl. + * .travis.yml (matric): Add musl-gcc/x86. + * travis-build.sh [TARGET == x86]: Specify --target along with --build + to configure. + * travis-install.sh [CC == musl-gcc && TARGET == x32]: Add -mx32 to $CC. + [CC == musl-gcc && TARGET == x86]: Add -m32 to $CC. Specify --build + and --target to musl configure invocation. + +2016-09-08 Eugene Syromyatnikov + + tests: use PRI__*64 macros in aio test. + It was incorrectly assumed that __*64 types are long long on all + platforms, despite strace having specially crafted macros in order + to handle precisely this architecture discrepancy. + The commit fixes this oversight. + + * tests/aio.c (main): Use PRI__*64 macros for correct format conversion + specifiers for __*64-typed values. + +2016-09-08 Eugene Syromyatnikov + + ipc: fix printing of integer arguments. + * ipc_msgctl.c (SYS_FUNC(msgctl)): As msqid argument is treated as int + by the kernel, cast it to int and print it using %d format. + * ipc_sem.c (SYS_FUNC(semop), SYS_FUNC(semtimedop)): Likewise, + for semid argument. + (SYS_FUNC(semget)): Likewise, for nsems argument. + (SYS_FUNC(semctl)): Likewise, for semid and semnum arguments. + * ipc_shm.c (SYS_FUNC(shmat)): Likewise, for shmid argument. + * ipc_shmctl.c (SYS_FUNC(shmctl)): Likewise. + +2016-09-08 Dmitry V. Levin + + ipc: fix printing key_t arguments of msgget, semget, and shmget syscalls + * ipc_msg.c (SYS_FUNC(msgget)): As key_t type in the kernel + is __kernel_key_t (i.e. int), cast key_t argument to int + and print it using %#x format. + * ipc_sem.c (SYS_FUNC(semget)): Likewise. + * ipc_shm.c (SYS_FUNC(shmget)): Likewise. + * tests/ipc_msg.c (main): Test it. + * tests/ipc_sem.c (main): Likewise. + * tests/ipc_shm.c (main): Likewise. + +2016-09-08 Eugene Syromyatnikov + + tests: add more sched_getattr and sched_setattr decoding checks. + * tests/sched_xetattr.c (main): Add more sched_getattr and sched_setattr + decoding checks. + +2016-09-08 Eugene Syromyatnikov + + tests: change type of sched_nice field to signed in sched_xetattr test. + Kernel headers declare this field as s32, and strace prints it with %d + specifier. + + * tests/sched_xetattr.c (main): Change type of sched_nice field of struct + sched_attr to int32_t, update format specifiers accordingly. + +2016-09-08 Eugene Syromyatnikov + + tests: add sprintrc_grep function to libtests. + New sprintrc_grep function is sprintrc function equivalent suitable for + tests where grep-base pattern matching is employed. + + * tests/tests.h (sprintrc_grep): New prototype. + * tests/sprintrc.c (enum sprintrc_fmt): New sprintrc format enumeration. + (sprintrc_ex): New function, renamed from sprintrc and updated to + support different formats. + (sprintrc): Change to use sprintrc_ex with SPRINTRC_FMT_RAW. + (sprintrc_grep): New function, calls sprintrc_ex with SPRINTRC_FMT_GREP. + +2016-09-08 Eugene Syromyatnikov + + tests: perform more strict structure allocation in sched_xetattr test. + Use tail_alloc with precise size of the structure. + + * tests/sched_xetattr.c (main): Eliminate usage of anonymous union type. + Rename sched to sched_attr. Change type of sched_attr to struct + pointer. Use tail_alloc for sched_attr allocation, update printf + statements accrodingly. + +2016-09-08 Eugene Syromyatnikov + + tests: split long lines in sched_xetattr test. + * tests/sched_xetattr.c (main): Split long lines. + +2016-09-07 Dmitry V. Levin + + tests/aio.c: fix for x32 personality. + * tests/aio.c (main): Do not pass 64-bit aio_context_t to io_submit + and io_getevents until strace learns how to print 64-bit pointers on x32 + and on x86_64 for x32 personality. + +2016-09-07 Dmitry V. Levin + + aio: print aio_context_t as a pointer type. + As aio_context_t is treated by the kernel as a pointer, + print it using printaddr. + + * aio.c (SYS_FUNC(io_setup)): Print the pointer to aio_context_t + argument using printnum_ptr. + (SYS_FUNC(io_destroy), SYS_FUNC(io_submit), SYS_FUNC(io_cancel), + SYS_FUNC(io_getevents)): Print aio_context_t argument using printaddr. + * tests/aio.c (sprint_aio_context_t): Remove. + (main): Update expected output. + +2016-09-07 Dmitry V. Levin + + tests/aio.c: rewrite without assert. + * tests/aio.c: Do not include . + (main): Use sprintrc instead of assert. + +2016-09-06 Eugene Syromyatnikov + + tests: add more aio decoding checks. + * tests/aio.c (sprint_aio_context_t): New function. + (main): Use it; add more checks. + +2016-09-06 Eugene Syromyatnikov + + tests: add suffix and cast to 64-bit constants in aio test. + This helps to avoid warnings like + "integer constant is too large for ‘long’ type" + reported by some versions of gcc on 32-bit platforms. + + * tests/aio.c (main): Add ULL suffix to 64-bit constants + and cast them to unsigned long. + +2016-09-05 Eugene Syromyatnikov + + tests: check decoding of perf_event_open syscall. + * tests/perf_event_open.c: New file. + * tests/perf_event_open.test: New test. + * tests/.gitignore: Add perf_event_open. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add perf_event_open.test. + + Makefile.am: use pwd instead of realpath. + * Makefile.am (CODE_COVERAGE_GENHTML_OPTIONS): Use standard pwd(1) + instead of less widespread realpath(1) utility from GNU coreutils. + +2016-09-05 Dmitry V. Levin + + tests: use sprintrc in tests/xetpriority.c. + * tests/xetpriority.c (main): Use sprintrc. + + tests: use sprintrc in vhangup.test. + * tests/vhangup.c (main): Use sprintrc. + + tests: use sprintrc in tests/sockname.c. + * tests/sockname.c (test_sockname_syscall): Use sprintrc. + + tests: use sprintrc in signalfd4.test. + * tests/signalfd4.c (main): Use sprintrc. + + tests: use sprintrc in setrlimit.test. + * tests/setrlimit.c (main): Use sprintrc. + + tests: use sprintrc in set_mempolicy.test. + * tests/set_mempolicy.c (main, print_nodes): Use sprintrc. + + tests: use sprintrc in openat.test. + * tests/openat.c (main): Use sprintrc. + + tests: use sprintrc in open.test. + * tests/open.c (main): Use sprintrc. + + tests: use sprintrc in move_pages.test. + * tests/move_pages.c (print_stat_pages, print_move_pages): Use sprintrc. + + tests: use sprintrc in mlockall.test. + * tests/mlockall.c (main): Use sprintrc. + + tests: use sprintrc in mlock.test. + * tests/mlock.c (main): Use sprintrc. + + tests: use sprintrc in epoll_create1.test. + * tests/epoll_create1.c (main): Use sprintrc. + +2016-09-05 Eugene Syromyatnikov + + tests: fix printing of min_nr and nr arguments of io_getevents syscall. + * tests/aio.c (main): Change output format for min_nr and nr arguments + in io_getevents check to %ld, cast these arguments to long. + + tests: use sprintrc for return code output in aio test. + * tests/aio.c (main): Use sprintrc for return code output. + + tests: add more tests for ched_rr_get_interval decoding. + * tests/sched_rr_get_interval.c (main): Check decoding of invalid + timespec pointer and successful syscall invocation. + + tests: use sprintrc for return code output in sched_rr_get_interval test + * tests/sched_rr_get_interval.c (main): Use sprintrc for return code + output. + + tests: add more tests for sched_getscheduler and sched_xetscheduler. + * tests/sched_xetscheduler.c (main): Check for decoding of invalid PID + in sched_getscheduler and sched_setscheduler, invalid address + of sched_param structure, and invalid policy value. + + tests: use sprintrc for return code output in sched_xetscheduler test. + * tests/sched_xetscheduler.c (main): Use sprintrc for return code output. + +2016-09-05 Eugene Syromyatnikov + + aio: use printfd for fd printing. + struct iocb contains two fields with fd semantics: aio_fildes and + aio_resfd. It is quite reasonable to use the appropriate function for + printing them (apart from just "%d"). + + * aio.c (print_common_flags): Add struct tcb pointer to parameter list; + use printfd for printing aio_resfd field. + (print_iocb_header): Add struct tcb pointer to parameter list; + use printfd for printing aio_fildes field. + (print_iocb): Provide tcp argument to print_iocb_header + and print_common_flags. + (SYS_FUNC(io_cancel)): Likewise. + +2016-09-05 Dmitry V. Levin + + sh64: wire up new syscalls. + * linux/sh64/syscallent.h [380..393]: New entries. + +2016-09-02 Dmitry V. Levin + + sh: wire up new syscalls. + * linux/sh/syscallent.h [369..382]: New entries. + +2016-09-05 Dmitry V. Levin + + avr32: wire up preadv2 and pwritev2 syscalls. + * linux/avr32/syscallent.h [326]: Add preadv2 entry. + [327]: Add pwritev2 entry. + +2016-09-05 Eugene Syromyatnikov + + tests: check decoding of readahead syscall. + * configure.ac (AC_CHECK_FUNCS): Add readahead. + * tests/readahead.c: New file. + * tests/readahead.test: New test. + * tests/.gitignore: Add readahead. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add readahead.test. + +2016-09-02 Eugene Syromyatnikov + + tests: move sprintrc function to libtests. + * tests/tests.h (sprintrc): New prototype. + * tests/futex.c (sprintrc): Move to ... + * tests/sprintrc.c: ... new file. + * tests/Makefile.am (libtests_a_SOURCES): Add sprintrc.c. + + tests/futex: add support to sprintrc for return codes other than 0 and -1 + * tests/futex.c (sprintrc): Print the actual return code provided, + not just "0". Check snprintf return code. + + tests/futex: increase sprintrc static buffer size. + * tests/futex.c (sprintrc): Increase buffer size from 256 to 4096. + + tests/futex: rename retstr to sprintrc. + * tests/futex.c (retstr): Rename to sprintrc. + (main): Convert all retstr calls to sprintrc. + +2016-09-01 Eugene Syromyatnikov + + readahead: fix print format for the "count" argument. + According to documentation and kernel's syscalls.h, its type is size_t, + so "%lu" format should be used instead of "%ld". + + * readahead.c (SYS_FUNC(readahead)): Fix conversion specifier + for the "count" argument. + +2016-08-31 Dmitry V. Levin + + tests/xstatx.c: use zero_extend_signed_to_ull/sign_extend_unsigned_to_ll + Use zero_extend_signed_to_ull and sign_extend_unsigned_to_ll macros + instead of explicit casts with unpredictable sign extension semantics. + + * tests/xstatx.c (print_time, main): Use zero_extend_signed_to_ull + instead of explicit cast. + (print_stat): Use zero_extend_signed_to_ull and + sign_extend_unsigned_to_ll instead of explicit casts. + +2016-08-31 Dmitry V. Levin + + tests: add sign_extend_unsigned_to_ll macro. + * tests/tests.h (sign_extend_unsigned_to_ll): New macro from defs.h. + +2016-08-31 Eugene Syromiatnikov + + Refactor common sa_handler printing code. + * xlat/sa_handler_values.in: New file. + * signal.c: Include "xlat/sa_handler_values.h". + (get_sa_handler_str, print_sa_handler): New functions. + (SYS_FUNC(sigsetmask), SYS_FUNC(signal), decode_new_sigaction): Use them. + +2016-08-31 Dmitry V. Levin + + Update TCP* constants. + * xlat/socktcpoptions.in: Add TCP_REPAIR_WINDOW introduced by linux + kernel commit v4.8-rc1~140^2~226. + +2016-08-30 Dmitry V. Levin + + Update SCTP_* constants. + * xlat/socksctpoptions.in: Add SCTP_PR_SUPPORTED, SCTP_DEFAULT_PRINFO, + and SCTP_PR_ASSOC_STATUS introduced by linux kernel commits + v4.8-rc1~140^2~148^2~5, v4.8-rc1~140^2~148^2~4, and + v4.8-rc1~140^2~148^2~3, respectively. + + Update fs *_MAGIC constants. + * xlat/fsmagic.in: Add BALLOON_KVM_MAGIC and ZSMALLOC_MAGIC introduced + by linux kernel commits v4.8-rc1~147^2~82 and v4.8-rc1~147^2~74, + respectively. + + Update KEXEC_ARCH_* constants. + * xlat/kexec_arch_values.in: Add KEXEC_ARCH_AARCH64 introduced by linux + kernel commit v4.8-rc1~16^2~41. + + Update ETH_P_* constants. + * xlat/ethernet_protocols.in: Add ETH_P_NCSI introduced by linux kernel + commit v4.8-rc1~140^2~65^2~8. + + Update BPF_* constants. + * xlat/bpf_map_types.in: Add BPF_MAP_TYPE_CGROUP_ARRAY introduced + by linux kernel commit v4.8-rc1~140^2~212^2~2. + * xlat/bpf_prog_types.in: Add BPF_PROG_TYPE_XDP introduced + by linux kernel commit v4.8-rc1~140^2~64^2~10. + +2016-08-30 Dmitry V. Levin + + Remove HAVE_SIGACTION checks. + The syscall parsers guarded by HAVE_SIGACTION check have to be compiled + regardless of libc sigaction function availability. + + * configure.ac (AC_CHECK_FUNCS): Remove sigaction. + * signal.c: Remove HAVE_SIGACTION checks. + +2016-08-30 Dmitry V. Levin + + Remove obsolescent autoconf macro AC_TYPE_SIGNAL. + All supported systems are expected to have C89 conforming sematics. + + * configure.ac (AC_TYPE_SIGNAL): Remove. + +2016-08-30 Dmitry V. Levin + + Remove obsolescent autoconf macro AC_C_CONST. + All supported systems are expected to have the 'const' keyword. + + * configure.ac (AC_C_CONST): Remove. + +2016-08-30 Eugene Syromiatnikov + + tests: check decoding of futex syscall. + * tests/futex.c: New file. + * tests/futex.test: New test. + * tests/.gitignore: Add futex. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add futex.test. + +2016-08-30 Eugene Syromyatnikov + + futex: do not pretend is included. + As configure.ac does not check for linux/futex.h, HAVE_LINUX_FUTEX_H is + never defined and therefore the inclusion of guarded by + HAVE_LINUX_FUTEX_H makes no sense. + + Moreover, used to have an incorrect definition + of FUTEX_WAIT_BITSET_PRIVATE and FUTEX_WAKE_BITSET_PRIVATE: + since kernel commit v2.6.24-6320-gcd68998 where these definitions + were initially introduced and up to v2.6.31-7082-gf8d1e54 where they + were finally fixed these macros had been incorrectly defined via + FUTEX_WAIT_BITS and FUTEX_WAKE_BITS instead of FUTEX_WAIT_BITSET + and FUTEX_WAKE_BITSET, and these incorrect definitions made their way + into some distributions still in use. + + * futex.c [HAVE_LINUX_FUTEX_H]: Remove. + +2016-08-30 Eugene Syromyatnikov + + futex: avoid printing val when it is not used by the futex command. + This is analogous to timeout argument omitting in FUTEX_WAKE_BITSET + command. + + * futex.c (SYS_FUNC(futex)): Remove common printing of val argument. + Add printing of val argument for all futex commands except + FUTEX_LOCK_PI, FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI. + +2016-08-30 Eugene Syromyatnikov + + xlat: add FUTEX_WAIT* commands with FUTEX_CLOCK_REALTIME bit set. + * xlat/futexops.in: Add FUTEX_WAIT|FUTEX_CLOCK_REALTIME and + FUTEX_WAIT_PRIVATE|FUTEX_CLOCK_REALTIME values supported by linux kernel + since commit v4.5-rc1~172^2. + +2016-08-30 Eugene Syromyatnikov + + futex: fix formatting of unknown command argument. + Use alternate form for printing hexadecimal numbers to avoid confusion. + Use printaddr to print uaddr as the latter is interpreted as a pointer + in all currently supported futex operations. + + * futex.c (SYS_FUNC(futex)): Fix formatting of unknown command + argument. + +2016-08-30 Eugene Syromyatnikov + + futex: add handling of FUTEX_FD command. + Since obsolete FUTEX_FD command is known and used to have some expected + argument format, print FUTEX_FD using that format. + + * futex.c (SYS_FUNC(futex)): Handle FUTEX_FD command. + +2016-08-30 Eugene Syromyatnikov + + futex: fix formatting of val3 hexadecimal argument. + * futex.c (SYS_FUNC(futex)): In FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET, + print hexadecimal val3 argument in alternate form to avoid confusion. + +2016-08-30 Eugene Syromyatnikov + + futex: fix FUTEX_WAKE_OP compare function mask. + According to the initial and current (v4.7) kernel implementations, + in FUTEX_WAKE_OP case the compare function does not have + FUTEX_OP_OPARG_SHIFT flag and occupies 4 bits starting with bit 24. + + * futex.c (SYS_FUNC(futex)): Do not print FUTEX_OP_OPARG_SHIFT + for 27th bit of val3 in FUTEX_WAKE_OP case. + +2016-08-30 Dmitry V. Levin + + tests: use correct m32/mx32 st_mtime_nsec checks in tests/xstatx.c. + * bootstrap: Add -DMPERS_IS_$(MPERS_NAME) to ARCH_MFLAGS. + * tests/xstatx.c [USE_ASM_STAT && STRUCT_STAT_IS_STAT64 && MPERS_IS_m32]: + Redefine HAVE_STRUCT_STAT_ST_MTIME_NSEC + to HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC. + [USE_ASM_STAT && STRUCT_STAT_IS_STAT64 && MPERS_IS_mx32]: + Redefine HAVE_STRUCT_STAT_ST_MTIME_NSEC + to HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC. + [USE_ASM_STAT && !STRUCT_STAT_IS_STAT64 && MPERS_IS_m32]: + Redefine HAVE_STRUCT_STAT_ST_MTIME_NSEC + to HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC. + [USE_ASM_STAT && !STRUCT_STAT_IS_STAT64 && MPERS_IS_mx32]: + Redefine HAVE_STRUCT_STAT_ST_MTIME_NSEC + to HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC. + + Based on patch by James Clarke . + +2016-08-30 Dmitry V. Levin + + Remove redundant check for PTRACE_LISTEN availability. + As ptrace.h already ensures that PTRACE_LISTEN is defined, + there is no need to check this fact in other places. + + * strace.c (ptrace_restart): Do not check that PTRACE_LISTEN is defined. + +2016-08-30 Dmitry V. Levin + + Remove unused autoconf macro AC_TYPE_GETGROUPS. + strace code does not use GETGROUPS_T. + + * configure.ac (AC_TYPE_GETGROUPS): Remove. + +2016-08-30 Dmitry V. Levin + + Remove unused autoconf macro AC_TYPE_MODE_T. + strace code already redefines mode_t. + + * configure.ac (AC_TYPE_MODE_T): Remove. + +2016-08-30 James Clarke + + Use PTRACE_SUNDETACH everywhere on SPARC and SPARC64. + SPARC has a different PTRACE_DETACH value correctly defined in + sys/ptrace.h, but linux/ptrace.h clobbers it with the standard one. + PTRACE_SUNDETACH is also defined to the correct value by sys/ptrace.h, + so use that instead. + + * strace.c (detach) [SPARC]: Move redefinition of PTRACE_DETACH + to PTRACE_SUNDETACH ... + * ptrace.h [SPARC || SPARC64]: ... here. + +2016-08-29 Dmitry V. Levin + + Remove obsolescent autoconf macro AC_HEADER_STDC. + All systems supported by strace are expected to have C89 conforming + header files. + + * configure.ac (AC_HEADER_STDC): Remove. + +2016-08-29 Dmitry V. Levin + + Remove unneeded autoconf macro AC_HEADER_DIRENT. + strace code already includes unconditionally. + + * configure.ac (AC_HEADER_DIRENT): Remove. + +2016-08-28 Dmitry V. Levin + + Remove unneeded autoconf macro AC_HEADER_STDBOOL. + strace code assumes C99. + + * configure.ac (AC_HEADER_STDBOOL): Remove. + * defs.h: Include unconditionally. + +2016-08-27 Dmitry V. Levin + + Remove obsolescent autoconf macro AC_HEADER_STAT. + No systems supported by strace are expected to have the bug workarounded + by AC_HEADER_STAT macro. + + * configure.ac (AC_HEADER_STAT): Remove. + +2016-08-29 Dmitry V. Levin + + Do not use AC_HEADER_MAJOR, include unconditionally. + glibc, starting with commit glibc-2.24-28-gdbab657, has deprecated + inclusion of by . The method used + for deprecation breaks AC_HEADER_MAJOR: this autoconf macro no longer + defines MAJOR_IN_SYSMACROS, which consequently breaks build. + + Let's assume that all systems supported by strace provide major, minor, + and makedev macros via . + + * configure.ac (AC_HEADER_MAJOR): Remove. + * mknod.c [MAJOR_IN_SYSMACROS, MAJOR_IN_MKDEV]: Remove. + Include unconditionally. + * print_struct_stat.c: Likewise. + * tests/mknod.c: Likewise. + * tests/mknodat.c: Likewise. + * tests/xstatx.c: Likewise. + +2016-08-29 Dmitry V. Levin + + btrfs: mpersify struct btrfs_ioctl_vol_args_v2. + This complements commit v4.11-719-gfb0c609. + + * btrfs.c (struct_btrfs_ioctl_vol_args_v2): New type. Mpersify it. + (btrfs_print_qgroup_inherit): Change qgi_addr type to unsigned long. + (btrfs_ioctl): Replace struct btrfs_ioctl_vol_args_v2 with + struct_btrfs_ioctl_vol_args_v2. + +2016-08-29 Elvira Khabirova + + mpers.awk: relax union member name absence check. + This fixes mpersing of unions containing nameless members, + e.g. struct btrfs_ioctl_vol_args_v2. + + * mpers.awk (what_is): Print names of union_type members as is. + +2016-08-24 Dmitry V. Levin + + Revert "tests/xstatx.c: fix stat syscall tests on mips64" + Previous commit effectively changed types of st_atime, st_ctime, and + st_mtime members of struct stat and struct stat64 to signed integers, + making the mips64 workaround obsolete. + + This reverts commit 3fb84bfc79949c145197c61fbf04ce18464e9112. + + * tests/xstatx.c (create_sample) [__mips64]: Remove. + +2016-08-24 Dmitry V. Levin + + 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. + +2016-08-24 Dmitry V. Levin + + mpers.m4: check for struct stat64, struct stat, and their members. + * m4/mpers.m4 (st_MPERS_STRUCT_STAT): New macro. + (st_MPERS): Use it. + +2016-08-24 Dmitry V. Levin + + mpers: add MPERS_IS_* to CFLAGS passed to mpers.sh. + This allows testing of MPERS_IS_* macros in pre-MPERS_DEFS parts + of source code. + + * Makefile.am (mpers-m%.stamp): Add -DMPERS_IS_$(mpers_NAME) to CFLAGS + passed to mpers.sh. + * mpers_test.sh: Likewise. + +2016-08-24 Dmitry V. Levin + + Move redefinition of stat types to asm_stat.h. + * file.c: Move redefinition of types that might be used + to define struct stat ... + * linux/asm_stat.h: ... here. + * tests/xstatx.c: Remove redefinition of stat types. + +2016-08-24 Dmitry V. Levin + + x86_64: provide a replacement of for x32 personality. + For the reason described in commit v4.10-517-gcfde1e3, a correct + definition of struct stat for x32 personality is necessary to enable + "asm_stat.h" with -mx32 on x86_64. + + * linux/x32/asm_stat.h: Rename to ... + * linux/x86_64/asm_stat.h: ... new file. + * Makefile.am (strace_SOURCES): Add it. + * linux/x32/asm_stat.h: New file, include "x86_64/asm_stat.h". + +2016-08-24 Dmitry V. Levin + + x32/asm_stat.h: provide definitions for i386 personality. + This enables x32/asm_stat.h with -m32. + + * linux/x32/asm_stat.h [__x86_64__ && __ILP32__]: Redirect stat. + Include "linux/asm_stat.h". + (struct stat): Define for [__x86_64__ && __ILP32__] only. + (struct __old_kernel_stat): Remove. + +2016-08-23 Dmitry V. Levin + + Introduce a separate SEN entry for fstatat64 syscall. + * linux/dummy.h (sys_fstatat64): Redirect to sys_newfstatat. + * linux/32/syscallent.h: Replace SEN(newfstatat) with SEN(fstatat64). + * linux/alpha/syscallent.h: Likewise. + * linux/arm/syscallent.h: Likewise. + * linux/avr32/syscallent.h: Likewise. + * linux/bfin/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/xtensa/syscallent.h: Likewise. + * pathtrace.c (pathtrace_match): Handle SEN_fstatat64. + +2016-08-23 Dmitry V. Levin + + Do not check for struct stat.st_{a,c}time_nsec. + Assume that the check for struct stat.st_mtime_nsec is enough. + Likewise, do not check for struct stat.st_{a,c}tim.tv_nsec. + + * configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_atime_nsec, + struct stat.st_ctime_nsec, struct stat.st_atim.tv_nsec, + and struct stat.st_ctim.tv_nsec. + * file.c (HAVE_STRUCT_STAT_ST_ATIME_NSEC, + HAVE_STRUCT_STAT_ST_CTIME_NSEC): Remove. + * printstat.h (HAVE_STRUCT_STAT_ST_ATIME_NSEC, + HAVE_STRUCT_STAT_ST_CTIME_NSEC): Replace with + HAVE_STRUCT_STAT_ST_MTIME_NSEC. + * tests/xstatx.c: Likewise. + +2016-08-23 Dmitry V. Levin + + Add sign_extend_unsigned_to_ll macro. + * defs.h (sign_extend_unsigned_to_ll): New macro, mirrors + zero_extend_signed_to_ull. + + zero_extend_signed_to_ull: add short int support. + * defs.h (zero_extend_signed_to_ull): Add short int support. + * tests/tests.h: Likewise. + + Rename widen_to_ull to zero_extend_signed_to_ull. + * defs.h (widen_to_ull): Rename to zero_extend_signed_to_ull. + All callers changed. + * tests/tests.h: Likewise. + +2016-08-23 Dmitry V. Levin + + sparc, sparc64: remove obsolete code. + Remove remains of solaris personality support. + This complements commit v4.10-45-gdf4dd8b. + + * file.c [SPARC || SPARC64] (SYS_FUNC(xstat), SYS_FUNC(fxstat)): Remove. + +2016-08-22 Dmitry V. Levin + + sparc64: fix decoding of struct stat64 related syscalls. + For some reason, struct stat and struct stat64 are different on sparc64. + This change fixes decoding of struct stat64 related syscalls for sparc64 + personality, sparc32 personality on sparc64 needs more work. + + * file.c (printstat64) [SPARC64]: Do not use printstat. + (SYS_FUNC(newfstatat)): Likewise. + +2016-08-22 Eugene Syromyatnikov + + tests: fill old_value argument in timer{,fd}_xettime tests. + This is needed in order to differentiate it from the value returned + by the call. As a consequence, it enables revealing possible bugs + in syscall parsers, for example, when the value read on syscall + entering and not on syscall exiting, as it was the case with + timerfd_settime parser. + + * tests/timer_xettime.c (main): Fill old.its field with value different + from the expected one upon call return. + * tests/timerfd_xettime.c: Likewise. + +2016-08-22 Eugene Syromyatnikov + + Fix old_value argument retrieval in timerfd_settime parser. + This is done similar to timer_settime syscall parser. + + * time.c (SYS_FUNC(timerfd_settime)): Retrieve old_value argument + on exiting and not on entering. Return 0 instead of RVAL_DECODED + since the call hasn't been decoded in full on entering. + +2016-08-21 Richard W.M. Jones + + Add RISC-V architecture support. + The original port of strace was done by Palmer Dabbelt + (eecs.berkeley.edu), based on strace 4.9. + + * configure.ac: Define RISCV for riscv*. + * clone.c [RISCV]: Define ARG_* macros as for OR1K. + * defs.h [RISCV] (SUPPORTED_PERSONALITIES): Define to 2. + [RISCV] (NEED_UID16_PARSERS): Define to 1. + * linux/riscv/arch_regs.c: New file. + * linux/riscv/errnoent1.h: Likewise. + * linux/riscv/get_error.c: Likewise. + * linux/riscv/get_scno.c: Likewise. + * linux/riscv/get_syscall_args.c: Likewise. + * linux/riscv/ioctls_arch0.h: Likewise. + * linux/riscv/ioctls_arch1.h: Likewise. + * linux/riscv/ioctls_inc0.h: Likewise. + * linux/riscv/ioctls_inc1.h: Likewise. + * linux/riscv/signalent1.h: Likewise. + * linux/riscv/stat32.h: Likewise. + * linux/riscv/syscallent.h: Likewise. + * linux/riscv/syscallent1.h: Likewise. + * Makefile.am (EXTRA_DIST): Add them. + +2016-08-21 Eugene Syromyatnikov + + Move SH-specific argument number calculation to getllval. + This change prevents scattering of ll-related hacks and simplifies + pread/pwrite syscalls parsers' logic a bit. + + * util.c (getllval): Add fixup for arg_no for SuperH when argument + number is equal to 3. + * io.c (PREAD_OFFSET_ARG): Remove. + (SYS_FUNC(pread)): Always use argument number 3 for "count" argument + printing. + (SYS_FUNC(pwrite)): Likewise. + +2016-08-21 Dmitry V. Levin + + sparc64: fix sigreturn decoding for sparc personality. + * linux/sparc/arch_sigreturn.c (arch_sigreturn): Parametrize + member types of struct signal_frame. + * linux/sparc64/arch_sigreturn.c (sparc64_arch_sigreturn, + sparc32_arch_sigreturn): New functions. + (arch_sigreturn): Use them. + +2016-08-20 Dmitry V. Levin + + Fix compat decoding of struct sigaction.sa_mask on big endian architectures + * signal.c (decode_new_sigaction) [SUPPORTED_PERSONALITIES > 1 && + SIZEOF_LONG > 4]: Use LONG_LONG to convert sa_mask from 32-bit + struct sigaction to 64-bit struct sigaction. + +2016-08-19 Dmitry V. Levin + + Fix decoding of indirect shmat's return code for non-native personalities + * ipc_shm.c (SYS_FUNC(shmat)): Fetch current_wordsize bytes of data + to obtain return code of indirect shmat subcall. + +2016-08-18 Dmitry V. Levin + + sparc64: fix sparc personality decoding of mmap64's offset argument. + * linux/sparc64/syscallent1.h: Remove redirection of sys_mmap_4koff. + +2016-08-19 Dmitry V. Levin + + sparc64: fix decoding of the forth argument of semctl syscall. + On sparc64, unlike all other architectures where semctl is an indirect + ipc subcall, the forth argument is passed directly. + + * ipc_sem.c (SYS_FUNC(semctl)) [SPARC64]: Print 4th argument without + indirection in case of native personality. + +2016-08-16 Dmitry V. Levin + + Add sparc64 specific ptrace constants. + * xlat/ptrace_cmds.in: Add PTRACE_GETREGS64, PTRACE_SETREGS64, + PTRACE_GETFPREGS64, and PTRACE_SETFPREGS64. + + sparc64: fix sign extension bug of syscall args for sparc personality. + * linux/sparc64/get_syscall_args.c (get_syscall_args): Zero-extend + syscall args from 32 bit for sparc personality. + +2016-08-16 Dmitry V. Levin + + sparc64: fix tty ioctl numbers. + The structures defined in asm/termbits.h have the same size + on sparc and sparc64. + + * linux/sparc64/ioctls_arch0.h (TCGETS, TCGETS2, TCSETS, TCSETS2, + TCSETSF, TCSETSF2, TCSETSW, TCSETSW2): Sync with + linux/sparc/ioctls_arch0.h + +2016-08-15 Dmitry V. Levin + + evdev.c: fix typo in comment. + +2016-08-15 Dmitry V. Levin + + Drop support of dummy members of struct stat. + As st_flags, st_fstype, and st_gen members of struct stat are not filled + by the kernel, there is no use supporting them. + + * configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_flags, + struct stat.st_fstype, and struct stat.st_gen. + * file.c [STAT32_PERSONALITY, HAVE_STRUCT_STAT64]: Do not undefine + HAVE_STRUCT_STAT_ST_FLAGS, HAVE_STRUCT_STAT_ST_FSTYPE, + and HAVE_STRUCT_STAT_ST_GEN. + * printstat.h (DO_PRINTSTAT): Do not check for + HAVE_STRUCT_STAT_ST_FLAGS, HAVE_STRUCT_STAT_ST_FSTYPE, + and HAVE_STRUCT_STAT_ST_GEN. + +2016-08-15 Dmitry V. Levin + + Assume that struct stat contains st_blksize, st_blocks, and st_rdev. + Our test suite already assumes that struct stat contains st_blksize, + st_blocks, and st_rdev members, and there haven't been any complaints. + + * configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_blksize, + struct stat.st_blocks, and struct stat.st_rdev. + * printstat.h (DO_PRINTSTAT): Do not check for + HAVE_STRUCT_STAT_ST_BLKSIZE, HAVE_STRUCT_STAT_ST_BLOCKS, + and HAVE_STRUCT_STAT_ST_RDEV. + +2016-08-15 Dmitry V. Levin + + tests: fix pause.test when pause syscall is not available. + * tests/pause.c (main): Fix expected output when pause syscall + is not available. + +2016-08-14 Dmitry V. Levin + + powerpc64, sparc64: fix redefinitions of ARCH_PC_REG. + This fixes compilation warning that ARCH_PC_REG is redefined. + + * linux/powerpc64/arch_regs.c (ARCH_PC_REG): Undefine before + the new definition. + * linux/sparc64/arch_regs.c (ARCH_PC_REG): Likewise. + +2016-08-14 Dmitry V. Levin + + s390x, x32: remove redundant definitions of ARCH_PC_REG. + * linux/s390x/arch_regs.c (ARCH_PC_REG): Remove, it is already defined + in just included linux/s390/arch_regs.c. + * linux/x32/arch_regs.c (ARCH_PC_REG): Remove, it is already defined + in just included linux/x86_64/arch_regs.c. + +2016-08-13 Dmitry V. Levin + + tests: check for leaks of placeholder descriptors. + * tests/redirect-fds.c: New file. + * tests/redirect-fds.test: New test. + * tests/.gitignore: Add redirect-fds. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (MISC_TESTS): Add redirect-fds.test. + + tests/init.sh: print exit code of failed commands. + * init.sh (run_prog, run_prog_skip_if_failed): When the program fails, + add its exit code to the diagnostic message. + (run_strace): When strace fails, add its exit code to the diagnostic + message. + (run_strace_merge): When strace-log-merge fails, add its exit code + to the diagnostic message. + +2016-08-13 Dmitry V. Levin + + Fix leakage of placeholder descriptors to tracees. + As a side effect of commit v4.11-211-g0736d4e, strace used to leak + placeholders for standard descriptors to tracees thus affecting their + behaviour. Fix this by setting close-on-exec flag on placeholder + descriptors. + + * strace.c (open_dummy_desc): Set close-on-exec flag on the descriptor + that is going to be returned to the caller. + (fd_is_placeholder): New array. + (ensure_standard_fds_opened, redirect_standard_fds): New functions. + (startup_child): Use redirect_standard_fds. + (init): Use ensure_standard_fds_opened. + +2016-08-12 Dmitry V. Levin + + sparc64: fix decoding of uid and gid-related syscalls. + sparc64 has no native 16-bit uid/gid syscalls. + + * linux/sparc64/syscallent.h (chown, lchown, setuid, getuid, setgid, + getgid, geteuid, getegid, getgroups, setgroups, fchown, setreuid, + setregid, setfsuid, setfsgid): Change handlers from 16-bit to 32-bit. + +2016-08-12 Dmitry V. Levin + + tests: fix *stat64 tests on alpha. + On some architectures including alpha, provides a + definition of struct stat that has no st_atime_nsec, st_mtime_nsec, and + st_ctime_nsec fields. At the same time, struct stat64 always has these + fields. Fix tests to take this difference into account. + + * tests/fstat64.c (STRUCT_STAT_IS_STAT64): New macro, defined to 1. + * tests/lstat64.c (STRUCT_STAT_IS_STAT64): Likewise. + * tests/stat64.c (STRUCT_STAT_IS_STAT64): Likewise. + * tests/xstatx.c [!STRUCT_STAT] (STRUCT_STAT_IS_STAT64): New macro, + defined to 0. + [USE_ASM_STAT && STRUCT_STAT_IS_STAT64]: + (HAVE_STRUCT_STAT_ST_ATIME_NSEC, HAVE_STRUCT_STAT_ST_CTIME_NSEC, + HAVE_STRUCT_STAT_ST_MTIME_NSEC): Redefine to 1. + +2016-08-11 Dmitry V. Levin + + tests: skip rt_tgsigqueueinfo.test when the syscall is not available. + * tests/rt_tgsigqueueinfo.c (main): Skip the test when the syscall + is not available. + +2016-08-11 James Cowgill + + tests/fcntl.c: fix fcntl test on mips64. + On mips64 the F_GETLK and F_SETLKW64 constants have identical values which + causes the "wrong" constant to be printed by strace. + + tests/fcntl.c (test_flock64): Do not test F_SETLKW64 on mips64. + +2016-08-11 James Cowgill + + tests/nsyscalls.test: only trace the "syscall" syscall on mips o32. + The "syscall" syscall only exists on o32 and causes strace to error out on + 64-bit mips ABIs. Pass MIPS_ABI from the configure script through to + nsyscalls.test so the MIPS ABI can be checked. + + * configure.ac (MIPS_ABI): Substitute into output files. + * tests/Makefile.am (MIPS_ABI): Export via AM_TEST_LOG_FLAGS. + * tests/nsyscalls.test: Restrict special mips handling to mips o32. + +2016-08-11 James Cowgill + + tests/xstatx.c: fix stat syscall tests on mips64. + For historical reasons the kernel struct stat represents times as unsigned + 32-bit integers on mips64. Therefore, while it's possible to give a file a + timestamp before 1970 with futimens, reading the same timestamp through + struct stat will give a positive time (around 2106). + Workaround by using positive timestamps for testing on mips64. + + * tests/xstatx.c (create_sample): Use positive timestamps on mips64. + +2016-08-11 Dmitry V. Levin + + tests/mlock2.c: fix test failure on mips64. + * tests/mlock2.c (main): Pass unsigned long arguments to mlock2 syscall + explicitly, to avoid unwanted sign extension issues. + + Based on patch by James Cowgill + +2016-08-09 Dmitry V. Levin + + Use instead of + There are no users of SYS_* macros provided by , + and definitions of __NR_* macros could be obtained directly + from . + + * defs.h: Include instead of . + * test/seccomp.c: Likewise. + * test/threaded_execve.c: Likewise. + * test/x32_lseek.c: Likewise. + * test/x32_mmap.c: Likewise. + * tests/_newselect.c: Likewise. + * tests/access.c: Likewise. + * tests/acct.c: Likewise. + * tests/aio.c: Likewise. + * tests/alarm.c: Likewise. + * tests/attach-f-p.c: Likewise. + * tests/bpf.c: Likewise. + * tests/brk.c: Likewise. + * tests/chmod.c: Likewise. + * tests/chown.c: Likewise. + * tests/chown32.c: Likewise. + * tests/chroot.c: Likewise. + * tests/clock_adjtime.c: Likewise. + * tests/clock_nanosleep.c: Likewise. + * tests/clock_xettime.c: Likewise. + * tests/copy_file_range.c: Likewise. + * tests/creat.c: Likewise. + * tests/dup2.c: Likewise. + * tests/dup3.c: Likewise. + * tests/epoll_create.c: Likewise. + * tests/epoll_create1.c: Likewise. + * tests/epoll_ctl.c: Likewise. + * tests/epoll_pwait.c: Likewise. + * tests/epoll_wait.c: Likewise. + * tests/eventfd.c: Likewise. + * tests/execveat.c: Likewise. + * tests/faccessat.c: Likewise. + * tests/fchdir.c: Likewise. + * tests/fchmod.c: Likewise. + * tests/fchmodat.c: Likewise. + * tests/fchown.c: Likewise. + * tests/fchown32.c: Likewise. + * tests/fchownat.c: Likewise. + * tests/fcntl.c: Likewise. + * tests/fcntl64.c: Likewise. + * tests/fdatasync.c: Likewise. + * tests/flock.c: Likewise. + * tests/fstat.c: Likewise. + * tests/fstat64.c: Likewise. + * tests/fstatat64.c: Likewise. + * tests/fstatfs.c: Likewise. + * tests/fstatfs64.c: Likewise. + * tests/fsync.c: Likewise. + * tests/ftruncate.c: Likewise. + * tests/ftruncate64.c: Likewise. + * tests/futimesat.c: Likewise. + * tests/get_mempolicy.c: Likewise. + * tests/getcwd.c: Likewise. + * tests/getdents.c: Likewise. + * tests/getdents64.c: Likewise. + * tests/getegid.c: Likewise. + * tests/getegid32.c: Likewise. + * tests/geteuid.c: Likewise. + * tests/geteuid32.c: Likewise. + * tests/getgid.c: Likewise. + * tests/getgid32.c: Likewise. + * tests/getgroups.c: Likewise. + * tests/getgroups32.c: Likewise. + * tests/getpgrp.c: Likewise. + * tests/getrandom.c: Likewise. + * tests/getresgid.c: Likewise. + * tests/getresgid32.c: Likewise. + * tests/getresuid.c: Likewise. + * tests/getresuid32.c: Likewise. + * tests/getrlimit.c: Likewise. + * tests/getrusage.c: Likewise. + * tests/getuid.c: Likewise. + * tests/getuid32.c: Likewise. + * tests/getxxid.c: Likewise. + * tests/ioctl_uffdio.c: Likewise. + * tests/ioperm.c: Likewise. + * tests/iopl.c: Likewise. + * tests/ipc.c: Likewise. + * tests/kill.c: Likewise. + * tests/lchown.c: Likewise. + * tests/lchown32.c: Likewise. + * tests/libmmsg.c: Likewise. + * tests/libsocketcall.c: Likewise. + * tests/link.c: Likewise. + * tests/linkat.c: Likewise. + * tests/llseek.c: Likewise. + * tests/lseek.c: Likewise. + * tests/lstat.c: Likewise. + * tests/lstat64.c: Likewise. + * tests/mbind.c: Likewise. + * tests/membarrier.c: Likewise. + * tests/memfd_create.c: Likewise. + * tests/migrate_pages.c: Likewise. + * tests/mkdir.c: Likewise. + * tests/mkdirat.c: Likewise. + * tests/mknod.c: Likewise. + * tests/mknodat.c: Likewise. + * tests/mlock.c: Likewise. + * tests/mlock2.c: Likewise. + * tests/move_pages.c: Likewise. + * tests/newfstatat.c: Likewise. + * tests/nsyscalls.c: Likewise. + * tests/old_mmap.c: Likewise. + * tests/oldselect.c: Likewise. + * tests/open.c: Likewise. + * tests/openat.c: Likewise. + * tests/pause.c: Likewise. + * tests/poll.c: Likewise. + * tests/prctl-seccomp-filter-v.c: Likewise. + * tests/prctl-seccomp-strict.c: Likewise. + * tests/preadv2-pwritev2.c: Likewise. + * tests/prlimit64.c: Likewise. + * tests/pselect6.c: Likewise. + * tests/ptrace.c: Likewise. + * tests/readdir.c: Likewise. + * tests/readlink.c: Likewise. + * tests/readlinkat.c: Likewise. + * tests/reboot.c: Likewise. + * tests/remap_file_pages.c: Likewise. + * tests/rename.c: Likewise. + * tests/renameat.c: Likewise. + * tests/renameat2.c: Likewise. + * tests/rmdir.c: Likewise. + * tests/rt_sigpending.c: Likewise. + * tests/rt_sigprocmask.c: Likewise. + * tests/rt_sigsuspend.c: Likewise. + * tests/rt_sigtimedwait.c: Likewise. + * tests/rt_tgsigqueueinfo.c: Likewise. + * tests/sched_get_priority_mxx.c: Likewise. + * tests/sched_rr_get_interval.c: Likewise. + * tests/sched_xetaffinity.c: Likewise. + * tests/sched_xetattr.c: Likewise. + * tests/sched_xetparam.c: Likewise. + * tests/sched_xetscheduler.c: Likewise. + * tests/sched_yield.c: Likewise. + * tests/seccomp-filter-v.c: Likewise. + * tests/seccomp-filter.c: Likewise. + * tests/seccomp-strict.c: Likewise. + * tests/select.c: Likewise. + * tests/sendfile.c: Likewise. + * tests/sendfile64.c: Likewise. + * tests/set_mempolicy.c: Likewise. + * tests/setdomainname.c: Likewise. + * tests/setfsgid.c: Likewise. + * tests/setfsgid32.c: Likewise. + * tests/setfsuid.c: Likewise. + * tests/setfsuid32.c: Likewise. + * tests/setgid.c: Likewise. + * tests/setgid32.c: Likewise. + * tests/setgroups.c: Likewise. + * tests/setgroups32.c: Likewise. + * tests/sethostname.c: Likewise. + * tests/setregid.c: Likewise. + * tests/setregid32.c: Likewise. + * tests/setresgid.c: Likewise. + * tests/setresgid32.c: Likewise. + * tests/setresuid.c: Likewise. + * tests/setresuid32.c: Likewise. + * tests/setreuid.c: Likewise. + * tests/setreuid32.c: Likewise. + * tests/setrlimit.c: Likewise. + * tests/setuid.c: Likewise. + * tests/setuid32.c: Likewise. + * tests/signalfd4.c: Likewise. + * tests/socketcall.c: Likewise. + * tests/splice.c: Likewise. + * tests/stat.c: Likewise. + * tests/stat64.c: Likewise. + * tests/statfs.c: Likewise. + * tests/statfs64.c: Likewise. + * tests/swap.c: Likewise. + * tests/symlink.c: Likewise. + * tests/symlinkat.c: Likewise. + * tests/sync.c: Likewise. + * tests/sync_file_range.c: Likewise. + * tests/sync_file_range2.c: Likewise. + * tests/syslog.c: Likewise. + * tests/tee.c: Likewise. + * tests/time.c: Likewise. + * tests/timer_create.c: Likewise. + * tests/timer_xettime.c: Likewise. + * tests/timerfd_xettime.c: Likewise. + * tests/times-fail.c: Likewise. + * tests/times.c: Likewise. + * tests/truncate.c: Likewise. + * tests/truncate64.c: Likewise. + * tests/ugetrlimit.c: Likewise. + * tests/umount.c: Likewise. + * tests/umount2.c: Likewise. + * tests/uname.c: Likewise. + * tests/unix-pair-send-recv.c: Likewise. + * tests/unlink.c: Likewise. + * tests/unlinkat.c: Likewise. + * tests/userfaultfd.c: Likewise. + * tests/utimes.c: Likewise. + * tests/vhangup.c: Likewise. + * tests/vmsplice.c: Likewise. + * tests/waitid.c: Likewise. + * tests/waitpid.c: Likewise. + * tests/xet_robust_list.c: Likewise. + * tests/xetpgid.c: Likewise. + * tests/xetpriority.c: Likewise. + * tests/xettimeofday.c: Likewise. + +2016-08-09 Dmitry V. Levin + + ia64: replace SYS_clone2 with __NR_clone2. + Migrate to __NR_* the last user of SYS_* macros provided + by . + + * clone.c [IA64] (ARG_STACKSIZE, ARG_PTID, ARG_CTID, ARG_TLS): Replace + SYS_clone2 with __NR_clone2. + +2016-08-09 Dmitry V. Levin + + Make sure that tcp->s_ent and tcp->s_prev_ent do not point to freed memory + This complements commit v4.13-33-g60d7ec8. + + * syscall.c (sysent_buf): New structure. + (free_sysent_buf): New function. + (get_scno): Use them. + +2016-08-09 Dmitry V. Levin + + file.c: move definitions of struct stat32 to separate files. + * linux/aarch64/stat32.h: New file. + * linux/powerpc64/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 (EXTRA_DIST): Add them. + * file.c [SUPPORTED_PERSONALITIES > 1]: Remove arch specific definitions + of struct stat32, include "stat32.h" instead. + +2016-08-09 Dmitry V. Levin + + sparc, sparc64: remove obsolete code. + Remove remains of solaris personality support. + This complements commit v4.10-45-gdf4dd8b. + + * file.c [SPARC || SPARC64]: Remove the code related to struct solstat. + (printstat, printoldstat) [SPARC || SPARC64]: Remove. + +2016-08-09 Dmitry V. Levin + + sparc64: fix decoding of stat family syscalls. + This complements commit v4.13-28-gaebfe83. + + * file.c [SPARC64]: Change STAT32_PERSONALITY to 1. + +2016-08-09 Dmitry V. Levin + + Fix decoding of invalid syscalls mapped to indirect subcalls. + When the syscall number returned by arch_get_scno is a mapped indirect + subcall (i.e. mapped subcall of socketcall or ipc syscall), do not + mistakenly treat it as a valid indirect subcall. + + * defs.h (SCNO_IS_VALID): Treat scno with TRACE_INDIRECT_SUBCALL flag + as invalid. + * syscall.c (syscall_name): Do no shuffle scno. + (trace_syscall_entering, trace_syscall_exiting): Use + tcp->s_ent->sys_name instead of syscall_name. + (get_scno): In case of invalid syscall, allocate a dynamic struct sysent + containing an appropriate .sys_name. + * tests/nsyscalls.c (main) [SYS_socket_subcall]: Check decoding + of direct syscall number SYS_socket_subcall+1. + (main) [SYS_ipc_subcall]: Check decoding of direct syscall number + SYS_ipc_subcall+1. + +2016-08-08 Dmitry V. Levin + + linux/subcall.h: remove redundant definitions. + * linux/subcall.h: Remove definitions of non-existent socket + and ipc subcalls. + + defs.h: simplify SUPPORTED_PERSONALITIES definition. + * defs.h: Group definition of SUPPORTED_PERSONALITIES by value. + +2016-08-08 Dmitry V. Levin + + defs.h: simplify PERSONALITY1_WORDSIZE definition. + Move definition of PERSONALITY1_WORDSIZE macro outside arch specific + ifdefs. + + * defs.h [SPARC64 || X86_64 || X32 || AARCH64 || POWERPC64 || TILE] + (PERSONALITY1_WORDSIZE): Remove. + [SUPPORTED_PERSONALITIES > 1] (PERSONALITY1_WORDSIZE): Define to 4 + unconditionally. + +2016-08-08 Dmitry V. Levin + + defs.h: simplify PERSONALITY0_WORDSIZE definition. + Move definition of PERSONALITY0_WORDSIZE macro outside arch specific + ifdefs. + + * defs.h (PERSONALITY0_WORDSIZE): Define to SIZEOF_LONG unconditionally. + +2016-08-08 Dmitry V. Levin + + sparc64: swap personality numbers. + Fix inconsistency between syscall and ioctl entries on sparc64. + Make layout of personalities on sparc64 the same as on other + architectures that support two personalities. + + * defs.h [SPARC64] (PERSONALITY0_WORDSIZE): Change to 8. + [SPARC64] (PERSONALITY1_WORDSIZE): Change to 4. + * linux/sparc64/get_scno.c (arch_get_scno): Swap personality numbers. + * linux/sparc64/ioctls_arch1.h: Rename to ioctls_arch0.h. + * linux/sparc64/ioctls_arch0.h: Rename to ioctls_arch1.h. + * linux/sparc64/ioctls_inc0.h: Rename to ioctls_inc1.h. + * linux/sparc64/ioctls_inc1.h: Rename to ioctls_inc0.h. + +2016-08-08 Dmitry V. Levin + + defs.h: cleanup personality specific macro definitions. + Move the code that defines PERSONALITY[12]_INCLUDE_FUNCS, + PERSONALITY[12]_INCLUDE_PRINTERS_DECLS, + PERSONALITY[12]_INCLUDE_PRINTERS_DEFS, and MPERS_{m,mx}32_IOCTL_MACROS + macros outside arch specific ifdefs. + + * defs.h [SPARC] (PERSONALITY0_WORDSIZE): Remove. + [SPARC64 && HAVE_M32_MPERS]: Remove. + [X86_64 && HAVE_M32_MPERS]: Remove. + [X86_64 && HAVE_MX32_MPERS]: Remove. + [X32 && HAVE_M32_MPERS]: Remove. + [AARCH64 && HAVE_M32_MPERS]: Remove. + [POWERPC64 && HAVE_M32_MPERS]: Remove. + [TILE && HAVE_M32_MPERS]: Remove. + (PERSONALITY0_INCLUDE_PRINTERS_DECLS, + PERSONALITY0_INCLUDE_PRINTERS_DEFS): Define unconditionally. + [SUPPORTED_PERSONALITIES > 1 && HAVE_M32_MPERS] + (PERSONALITY1_INCLUDE_PRINTERS_DECLS, + PERSONALITY1_INCLUDE_PRINTERS_DEFS, PERSONALITY1_INCLUDE_FUNCS, + MPERS_m32_IOCTL_MACROS): Define for + [SUPPORTED_PERSONALITIES > 1 && HAVE_M32_MPERS] case. + (PERSONALITY2_INCLUDE_PRINTERS_DECLS, + PERSONALITY2_INCLUDE_PRINTERS_DEFS, PERSONALITY2_INCLUDE_FUNCS, + MPERS_mx32_IOCTL_MACROS): Define for + [SUPPORTED_PERSONALITIES > 2 && HAVE_MX32_MPERS] case. + +2016-08-07 Dmitry V. Levin + + Change #include guard trailing part comments. + * defs.h: Change comment of the trailing part of #include guard. + * flock.h: Likewise. + * gcc_compat.h: Likewise. + * ipc_defs.h: Likewise. + * kernel_types.h: Likewise. + * mpers_type.h: Likewise. + * msghdr.h: Likewise. + * printsiginfo.h: Likewise. + * ptrace.h: Likewise. + * regs.h: Likewise. + * seccomp_fprog.h: Likewise. + * sigevent.h: Likewise. + * statfs.h: Likewise. + * xlat.h: Likewise. + +2016-08-08 Eugene Syromyatnikov + + Unify usage of #include guards. + This commit is an attempt to unify usage of include guards (in top-level + headers, at least). As a side note, different files with *.h extension + have different semantics: for example, printargs.h is included multiple + times in order to generate slightly varying code depending on values of + macro definitions - maybe it's better to change extension of such files + to something like *.inc. + + * defs.h: Add #include guard. + * flock.h: Likewise. + * ipc_defs.h: Likewise. + * mpers_type.h: Likewise. + * printsiginfo.h: Likewise. + * ptrace.h: Likewise. + * regs.h: Likewise. + * seccomp_fprog.h: Likewise. + * gcc_compat.h: Rename the macro used for #include guard. + * msghdr.h: Likewise. + * sigevent.h: Likewise. + * kernel_types.h: Comment the trailing part of #include guard. + * xlat.h: Add missing macro definition for #include guard. + +2016-08-06 Dmitry V. Levin + + tests: add #include guards. + * tests/tests.h: Add #include guard. + +2016-08-05 Dmitry V. Levin + + linux: add #include guards. + * linux/dummy.h: Add #include guard. + * linux/inet_diag.h: Likewise. + * linux/netlink_diag.h: Likewise. + * linux/sock_diag.h: Likewise. + * linux/syscall.h: Likewise. + * linux/unix_diag.h: Likewise. + +2016-08-04 Dmitry V. Levin + + tests/umode_t.c: guard against libc printf format errors. + * tests/umode_t.c (test_syscall): Use different printf format specifiers + to detect libc printf format errors. + +2016-08-04 Dmitry V. Levin + + travis: use a suitable musl revision. + There seems to be no readily available binary packages of musl that are + sufficiently up to date to be used to build and test strace, so prepare + a suitable musl from source. + + * travis-install.sh (musl-gcc): Do not add an extra repository, + do not install musl-tools and linux-musl-dev packages. + Download, build, and install a suitable musl revision instead. + +2016-08-03 Dmitry V. Levin + + Fix printing of mode_t, umode_t, and umask types. + Print numeric umode_t type using %#03ho format. + Print return value of umask syscall using %#03lo format. + When printing symbolic mode_t type, always print lower 9 bits, + and print the numeric part using %#03o format. + + * defs.h (sprintmode): Remove. + (print_symbolic_mode_t, print_numeric_umode_t, + print_numeric_long_umask): New prototypes. + * printmode.c (sprintmode): Remove. + (print_symbolic_mode_t, print_numeric_umode_t, + print_numeric_long_umask): New functions. + * chmod.c (decode_chmod): Use print_numeric_umode_t. + * ipc_msg.c (SYS_FUNC(msgget)): Likewise. + * ipc_msgctl.c (print_msqid_ds): Likewise. + * ipc_sem.c (SYS_FUNC(semget)): Likewise. + * ipc_shm.c (SYS_FUNC(shmget)): Likewise. + * ipc_shmctl.c (print_shmid_ds): Likewise. + * mq.c (SYS_FUNC(mq_open)): Likewise. + * open.c (decode_open, SYS_FUNC(creat)): Likewise. + * umask.c (SYS_FUNC(umask)): Likewise. + * mknod.c (decode_mknod): Use print_symbolic_mode_t. + * printstat.h (DO_PRINTSTAT): Likewise. + * syscall.c (trace_syscall_exiting): Use print_numeric_long_umask. + * tests/umode_t.c: New file. + * tests/Makefile.am (EXTRA_DIST): Add it. + * tests/creat.c: Rewrite as a thin wrapper around umode_t.c + * tests/mkdir.c: Likewise. + * tests/mkdirat.c: Likewise. + * tests/mknod.c: Extend test coverage of mknod syscall. + * tests/mknodat.c: Extend test coverage of mknodat syscall. + * tests/umask.c: Extend test coverage of umask syscall. + * tests/creat.test: Update the value specified for strace -a parameter. + * tests/mkdir.test: Likewise. + * tests/mkdirat.test: Likewise. + * tests/mknodat.test: Likewise. + +2016-08-02 Dmitry V. Levin + + tests: simplify attach-f-p.test. + * tests/attach-f-p.c Simplify communications between threads + by replacing per-thread timers with pipes. + * tests/attach-f-p.test: Do not ignore signals. + + tests: cleanup attach-p-cmd.test. + * tests/attach-p-cmd-cmd.c (main): Cleanup expected output. + * tests/attach-p-cmd-p.c (main): Print expected output. + * tests/attach-p-cmd.test: Do not print expected output. + + ip_mreq.test: rewrite from match_grep to match_diff. + * tests/ip_mreq.c (main): Print expected output. + * tests/ip_mreq.test: Use run_strace_match_diff. + * tests/ip_mreq.expected: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove it. + + fanotify_mark.test: rewrite from match_grep to match_diff. + * tests/fanotify_mark.c (main): Print expected output. + * tests/fanotify_mark.test: Use run_strace_match_diff. + * tests/fanotify_mark.expected: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove it. + + signalfd4.test: rewrite from match_grep to match_diff. + * tests/signalfd4.c (get_sigset_size): New function. + (main): Use it. Print expected output. + * tests/signalfd4.test: Use run_strace_match_diff. + * tests/signalfd4.expected: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove it. + +2016-07-31 Dmitry V. Levin + + tests: rename signalfd.test to signalfd4.test. + * tests/signalfd.c: Rename to signalfd4.c. + * tests/signalfd.test: Rename to signalfd4.test. + * tests/signalfd.expected: Rename to signalfd4.expected. + * tests/.gitignore: Replace signalfd with signalfd4. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Replace signalfd.test with signalfd4.test. + (EXTRA_DIST): Replace signalfd.expected with signalfd4.expected. + +2016-07-30 Dmitry V. Levin + + memfd_create.test: rewrite from match_grep to match_diff. + * tests/memfd_create.c (main): Print expected output. + * tests/memfd_create.test: Use run_strace_match_diff. + * tests/memfd_create.expected: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove it. + +2016-07-29 Dmitry V. Levin + + Set exit status to 1 if strace has not traced any processes. + * strace.c (main): Initialize exit_code with 1 when no processes + has been attached. + * strace.1: Document it. + * NEWS: Mention this change. + + Attach to the target process before attempting to attach to its siblings + * strace.c (attach_tcb): Attach to tcp->pid first. + + Report the name of ptrace command when ptrace_attach_or_seize fails. + * strace.c (ptrace_attach_cmd): New variable. + (ptrace_attach_or_seize): Save last ptrace command's name + to ptrace_attach_cmd. + (attach_tcb, startup_child): Use it in error diagnostics. + + strace.c: refactor startup_attach. + * strace.c (startup_attach): Move the inner part of the big loop + over tcbtab elements ... + (attach_tcb): ... to this new function. + + startup_attach: do not use atoi. + * strace.c (startup_attach): Replace atoi with string_to_uint. + +2016-07-28 Dmitry V. Levin + + Do not enable mpers runtime checks if mpers is not enabled. + * m4/mpers.m4 (HAVE_RUNTIME): Enable iff both mpers and runtime + work properly. + +2016-07-28 Dmitry V. Levin + + linux/dummy_check.sh: remove obsolete script. + Starting with commit v4.10-62-ga0bd374, function prototypes + of syscall parsers are generated at build time. + + * linux/dummy_check.sh: Remove. + +2016-07-28 Dmitry V. Levin + + generate_xlat_in.sh: remove obsolete script. + This script has been created by commit v4.8-180-g0ed617b + for the one-shot job of automatic convertion of xlat structures + from *.c files to xlat/*.in files. + + * generate_xlat_in.sh: Remove. + +2016-07-28 Dmitry V. Levin + + tests: use terse notation in designated initializers where appropriate. + * tests/btrfs.c (btrfs_test_dev_replace_ioctl): Initialize + struct btrfs_ioctl_dev_replace_args using terse notation. + * tests/clock_nanosleep.c (main): Initialize struct timespec + using terse notation. + * tests/nanosleep.c (main): Likewise. + +2016-07-28 Dmitry V. Levin + + Consistently use extended regular expressions where appropriate. + When grep or sed is used with basic regular expressions containing + '(', ')', '{', '}', '|', '?', and '+' special characters, convert them + to extended regular expressions for better portability and readability. + + * generate_mpers_am.sh: Convert grep and sed BREs to EREs. + * Makefile.am (ioctl_redefs%.h, m%_type_defs.h, m%_funcs.h, + mpers_printer_decl_pattern, printers.h, %_printer_decls.h, + %_printer_defs.h): Convert sed BREs to EREs. + * generate_sen.sh: Likewise. + * linux/mips/genstub.sh: Likewise. + * make-dsc: Likewise. + * mpers.sh: Likewise. + * xlat/gen.sh: Likewise. + * tests/Makefile.am (ksysent.h): Likewise. + * tests/ksysent.sed: Likewise. + * tests/pc.test: Likewise. + * tests/strace-S.test: Likewise. + * tests/strace-V.test: Likewise. + * tests/strace-k.test: Likewise. + +2016-07-28 Dmitry V. Levin + + tests: fix extended regexps. + * tests/adjtimex.c (main): Consistently quote curly braces + in expected output. + * tests/uio.expected: Likewise. + +2016-07-27 Dmitry V. Levin + + Post-release administrivia. + * NEWS: Add header line for the next release. + * debian/changelog.in: Add a changelog entry for 4.13-1. + * strace.spec.in: Likewise. + +2016-07-26 Dmitry V. Levin + + Prepare for 4.13 release. + * NEWS: Update for 4.13 release. + + Fix one more code pattern that might break gcc strict aliasing rules. + * btrfs.c (btrfs_ioctl): Add one more expicit cast to "void *", + to avoid breaking strict-aliasing rules reported by some gcc compilers. + * syscall.c (decode_socket_subcall): Likewise. + * util.c (next_set_bit): Likewise. + * tests/btrfs.c (btrfs_test_send_ioctl): Likewise. + + Fix casts of ptrace's third argument. + * strace.c (maybe_allocate_tcb): Replace "(char *) 0" with NULL + as ptrace's third argument. + * linux/sparc64/get_scno.c (arch_get_scno): Cast third argument + of ptrace to "void *'. + * syscall.c (get_regs): Likewise. + * upeek.c (upeek): Likewise. + * util.c (umoven): Likewise. + + tests/btrfs.c: do not include the same header file twice. + * tests/btrfs.c: Do not include , is enough. + + tests: fix accept4.test on systems that lack SOCK_CLOEXEC definition. + * tests/accept4.c: Check that O_CLOEXEC is defined. Use O_CLOEXEC + instead of SOCK_CLOEXEC. + +2016-07-26 Dmitry V. Levin + + tests: fix vhangup.test. + * tests/vhangup.c (main): Fix expected output for the case when + the calling process has CAP_SYS_TTY_CONFIG capability. + + Reported-by: Yun-Chih Chen + +2016-07-26 Dmitry V. Levin + + tests: fix chown.test. + * tests/chown.test: Fix the value specified for strace -a parameter. + + Reported-by: Yun-Chih Chen + +2016-07-25 Dmitry V. Levin + + x32: fix syscall entries for x86_64 variants of io_setup and io_submit. + * linux/x32/syscallent.h (64:io_setup, 64:io_submit): Change handler + to printargs. + + tests/ipc.c: fix typo. + +2016-07-24 Dmitry V. Levin + + NEWS: Prepare for 4.13 release. + +2016-07-23 Dmitry V. Levin + + debian: add gcc-multilib to Build-Depends for relevant architectures. + * debian/control (Build-Depends) [amd64, ppc64, sparc64, x32]: + Add gcc-multilib to enable multiple personalities support. + +2016-07-22 Dmitry V. Levin + + tests: check decoding of ipc syscall. + * tests/ipc.c: New file. + * tests/ipc.test: New test. + * tests/.gitignore: Add ipc. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ipc.test. + + Fix corner cases of ipc syscall decoding. + * xlat/ipccalls.in: New file. + * ipc.c: New file. + * Makefile.am (libstrace_a_SOURCES): Add it. + * linux/dummy.h (sys_ipc): Remove stub alias. + * syscall.c (decode_ipc_subcall): Treat 1st argument of ipc syscall + as "unsigned int". + [S390 || S390X]: Skip ipc cubcalls that have non-zero version. + [SPARC64]: Likewise, for the native personality. + Save ipc cubcall version for later use by specific ipc parsers. + * ipc_msg.c (SYS_FUNC(msgrcv)): Handle non-zero ipc subcall version. + [SPARC64]: Handle non-ipc_kludge case for the native personality. + * linux/subcall.h (msgrcv): Change nargs from 4 to 5. + * linux/s390/syscallent.h (ipc): Change nargs from 6 to 5. + * linux/s390x/syscallent.h (ipc): Likewise. + +2016-07-21 Dmitry V. Levin + + tests: skip netlink_protocol.test on old systems. + * tests/netlink_protocol.c: Check that HAVE_SYS_XATTR_H is defined. + Include and . + (main): Check that system.sockprotoname attribute is supported. + + Do not print too many arguments of socketcall syscall. + * socketcall.c (SYS_FUNC(socketcall)): Print just "call" and "args" + syscall arguments. + * tests/socketcall.c (test_socketcall): Update expected output. + * tests/socketcall.test: Likewise. + +2016-07-20 Dmitry V. Levin + + tests/nsyscalls.c: change the type of syscall arguments to kernel_ulong_t + As most syscalls on x32 and mips n32 are actually 64-bit, + check that 64-bit syscall arguments are decoded properly. + + This also workarounds x32 gcc sign extension bug + reported by Eugene Syromyatnikov at + https://sourceforge.net/p/strace/mailman/message/35150860/ + + * tests/nsyscalls.c: Include "kernel_types.h". + (main): Change the type of syscall arguments to kernel_ulong_t. + +2016-07-20 Dmitry V. Levin + + x32, mips n32: make printargs print full 64-bit syscall arguments. + As most of x32 syscalls are regular x86_64 syscalls, they should be + printed by default as 64-bit syscalls, and syscall parsers at their + discretion might print syscalls differently. This is already + implemented in 64-bit strace tracing x32 personality processes, + and now x32 strace will also behave this way. + + Similar reasoning applies to mips n32. + + * util.c (printargs) [HAVE_STRUCT_TCB_EXT_ARG]: Print syscall arguments + from ext_arg array using %llx format. + +2016-07-20 Dmitry V. Levin + + tests: check decoding of socketcall syscall. + * tests/socketcall.c: New file. + * tests/socketcall.test: New test. + * tests/.gitignore: Add socketcall. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add socketcall.test. + + Fix corner cases of socketcall syscall. + * xlat/socketcalls.in: New file. + * socketcall.c: New file. + * Makefile.am (libstrace_a_SOURCES): Add it. + * linux/dummy.h (sys_socketcall): Remove stub alias. + * syscall.c (decode_socket_subcall): Treat 1st argument of socketcall + as "int". Do not substitute syscall until all socketcall arguments + have been fetched successfully. + +2016-07-19 Dmitry V. Levin + + tests: check decoding and dumping of send and recv syscalls. + * tests/unix-pair-send-recv.c: New file. + * tests/unix-pair-send-recv.expected: Likewise. + * tests/unix-pair-send-recv.test: New test. + * tests/.gitignore: Add unix-pair-send-recv. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add unix-pair-send-recv.test. + (EXTRA_DIST): Add unix-pair-send-recv.expected. + + tests: rename unix-pair-send-recv to unix-pair-sendto-recvfrom. + * dumpio.expected: Rename to unix-pair-sendto-recvfrom.expected. + * dumpio.test: Rename to unix-pair-sendto-recvfrom.test. + * unix-pair-send-recv.c: Rename to unix-pair-sendto-recvfrom.c + * .gitignore: Rename unix-pair-send-recv to unix-pair-sendto-recvfrom. + * Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add unix-pair-sendto-recvfrom.test. + (MISC_TESTS): Remove dumpio.test. + (EXTRA_DIST): Rename dumpio.expected + to unix-pair-sendto-recvfrom.expected. + + tests: check decoding of shutdown syscall. + * tests/shutdown.c: New file. + * tests/shutdown.test: New test. + * tests/.gitignore: Add shutdown. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add shutdown.test. + + xlat/shutdown_modes.in: convert to modern syntax. + * xlat/shutdown_modes.in: Replace open-coded xlat table with a list + of constants. + + tests: check silent decoding of sendmmsg and recvmmsg syscalls. + * tests/mmsg-silent.c: New file. + * tests/mmsg-silent.test: New test. + * tests/.gitignore: Add mmsg-silent. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mmsg-silent.test. + + Print unsent messages of failed sendmmsg syscall. + * mmsghdr.c (decode_mmsgvec): Clear syserror for the time of printing + struct mmsghdr array in !use_msg_len case. + (SYS_FUNC(sendmmsg)): As failed sendmmsg syscall does not + set msg_len fields, tell this to decode_mmsgvec. + * tests/mmsg_name.c (test_mmsg_name): Check it. + + Print unsent messages of sendmmsg syscall. + * defs.h (decode_mmsgvec): Add int argument. + * mmsghdr.c (print_struct_mmsghdr_config): Add msg_len_vlen field. + (print_struct_mmsghdr): Print struct mmsghdr.msg_len only for + msg_len_vlen first elements of struct mmsghdr array. + (decode_mmsgvec): Add msg_len_vlen argument. + (SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg)): Pass to decode_mmsgvec + the number of elements of struct mmsghdr array that contain meaningful + struct mmsghdr.msg_len. + * tests/mmsg_name.c (test_mmsg_name): Check it. + + tests: check verbose decoding of msg_name* fields of struct mmsghdr array + * tests/mmsg_name-v.c: New file. + * tests/mmsg_name-v.test: New test. + * tests/.gitignore: Add mmsg_name-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mmsg_name-v.test. + + tests: check decoding of msg_name* fields of struct mmsghdr array. + * tests/mmsg_name.c: New file. + * tests/mmsg_name.test: New test. + * tests/.gitignore: Add mmsg_name. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mmsg_name.test. + +2016-07-19 Dmitry V. Levin + + Fix decoding of msg_name* fields of recvmmsg syscall's msghdr array argument + As msg_namelen fields of recvmmsg syscall's struct msghdr array have + the same read-write semantics as struct msghdr argument of recvmsg + syscall, parser of recvmmsg syscall needs a similar fix. + + * mmsghdr.c (print_struct_mmsghdr): Increment p_user_msg_namelen field. + (mmsgvec_data): New structure. + (free_mmsgvec_data, save_mmsgvec_namelen): New functions. + (decode_mmsgvec): Take into account the data saved + by save_mmsgvec_namelen function. + (SYS_FUNC(recvmmsg)): Use save_mmsgvec_namelen. + +2016-07-19 Dmitry V. Levin + + mmsghdr.c: rewrite decode_mmsgvec using print_array. + * fetch_struct_mmsghdr.c (sizeof_struct_mmsghdr): New mpers printer. + * mmsghdr.c: Include . + (print_struct_mmsghdr_config): New structure. + (fetch_struct_mmsghdr_or_printaddr, print_struct_mmsghdr): New functions. + (decode_mmsgvec): Rewrite using them and print_array. + + tests: check decoding of timeout argument of recvmmsg syscall. + * tests/recvmmsg-timeout.c: New file. + * tests/recvmmsg-timeout.test: New test. + * tests/.gitignore: Add recvmmsg-timeout. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add recvmmsg-timeout.test. + + Fix printing of remaining timeout of recvmmsg syscall. + * mmsghdr.c (SYS_FUNC(recvmmsg)): Do not print remaining timeout + when the 5th syscall argument is NULL. + * tests/mmsg.c (main): Update expected output. + + Remove configure checks for recvmmsg and sendmmsg. + * configure.ac (AC_CHECK_FUNCS): Remove recvmmsg and sendmmsg. + + tests: add recv_mmsg and send_mmsg functions to libtests. + * tests/tests.h (recv_mmsg, send_mmsg): New prototype. + * tests/libmmsg.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + * tests/mmsg.c Do not check for __NR_sendmmsg, __NR_recvmmsg, + HAVE_SENDMMSG, and HAVE_RECVMMSG. Do not include unused headers. + (recv_mmsg, send_mmsg): Remove. + + tests: add socketcall function to libtests. + * tests/tests.h (socketcall): New prototype. + * tests/libsocketcall.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + +2016-07-18 Dmitry V. Levin + + Use IOV_MAX instead of UIO_MAXIOV. + IOV_MAX appears to be more portable than UIO_MAXIOV. + + * msghdr.c: Include . Remove fallback defintion of UIO_MAXIOV. + (get_optmem_max): Replace UIO_MAXIOV with IOV_MAX. + * tests/msg_control.c: Likewise. + +2016-07-18 Dmitry V. Levin + + Unabuse struct tcb.auxstr. + As we've got a proper mechanism that parsers can use for storing private + data between entering and exiting stages, all cases of struct tcb.auxstr + abuse should go. + + * btrfs.c (btrfs_ioctl): Use set_tcb_priv_ulong and get_tcb_priv_ulong + instead of abusing tcp->auxstr. + * file_handle.c (SYS_FUNC(name_to_handle_at)): Likewise. + * msghdr.c (SYS_FUNC(recvmsg)): Likewise. + * net.c (decode_sockname, SYS_FUNC(recvfrom)): Likewise. + * v4l2.c (print_v4l2_queryctrl): Likewise. + +2016-07-18 Dmitry V. Levin + + Fix race condition in decoding timeout argument of recvmmsg syscall. + As the value returned by sprint_timespec points to a static area and may + be overwritten by subsequent calls to sprint_timespec, it is not safe to + save this value on entering syscall and use it later on exiting. + + * mmsghdr.c (SYS_FUNC(recvmmsg)): On entering syscall, copy the value + returned by sprint_timespec to a dynamically allocated memory, and save + the pointer using set_tcb_priv_data. On exiting, restore it using + get_tcb_priv_data. + +2016-07-18 Dmitry V. Levin + + Fix race condition in decoding rt_sigtimedwait's timeout argument. + As the value returned by sprint_timespec points to a static area and may + be overwritten by subsequent calls to sprint_timespec, it is not safe to + save this value on entering syscall and use it later on exiting. + + * signal.c (SYS_FUNC(rt_sigtimedwait)): On entering syscall, copy the + value returned by sprint_timespec to a dynamically allocated memory, + and save the pointer using set_tcb_priv_data. On exiting, restore it + using get_tcb_priv_data. + +2016-07-18 Patrik Jakobsson + + Add private data field to struct tcb. + We need to be able to store private data in the struct tcb across it's + lifetime. To ensure proper deallocation of this stored data a callback + must be provided along with the data. The callback is executed + automatically on exiting syscall, and when the life of the tcb ends. + + * defs.h (struct tcb): Add _priv_data and _free_priv_data fields. + (get_tcb_priv_data, set_tcb_priv_data, free_tcb_priv_data): + New prototypes. + (get_tcb_priv_ulong, set_tcb_priv_ulong): New static inline functions. + * strace.c (get_tcb_priv_data, set_tcb_priv_data, free_tcb_priv_data): + New functions. + (droptcb): Call free_tcb_priv_data. + * syscall.c (trace_syscall_exiting): Call free_tcb_priv_data + when clearing TCB_INSYSCALL flag. + +2016-07-18 Dmitry V. Levin + + net.c: move parsers of sendmsg and recvmsg syscalls to msghdr.c. + * defs.h (fetch_msghdr_namelen, decode_msghdr): Remove. + * net.c (SYS_FUNC(sendmsg), SYS_FUNC(recvmsg)): Move ... + * msghdr.c: ... here. + (fetch_msghdr_namelen, decode_msghdr): Add static qualifier. + + net.c: move parsers of sendmmsg and recvmmsg syscalls to mmsghdr.c. + * defs.h (decode_mmsgvec): Remove. + * net.c: Do not include "msghdr.h". + (SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg)): Move ... + * mmsghdr.c: ... here. + (decode_mmsgvec): Add static qualifier. + + msghdr.c: move all mmsghdr parsers to a separate file. + * msghdr.h (print_struct_msghdr): New prototype. + * msghdr.c (print_msghdr): Rename to print_struct_msghdr, remove + static qualifier, all callers changed. + (decode_mmsghdr, decode_mmsgvec, dumpiov_in_mmsghdr): Move to ... + * mmsghdr.c: ... new file. + * Makefile.am (strace_SOURCES): Add it. + +2016-07-14 Dmitry V. Levin + + tests: disable part of msg_name test on non-glibc systems. + Sadly, musl recvmsg wrapper blindly dereferences 2nd argument, + so limit the affected part of the test to glibc that doesn't. + + * tests/msg_name.c (test_msg_name) [!__GLIBC__]: Do not test + with inaccessible 2nd argument. + +2016-07-13 Dmitry V. Levin + + Print struct iovec as a regular structure. + * io.c (print_iovec): Print names of iov_base and iov_len fields. + * tests/aio.c (main): Update expected output. + * tests/inet-cmsg.c (main): Likewise. + * tests/mmsg.c (main): Likewise. + * tests/msg_name.c (test_msg_name): Likewise. + * tests/preadv-pwritev.c (main): Likewise. + * tests/preadv2-pwritev2.c (main): Likewise. + * tests/preadv.c (main): Likewise. + * tests/pwritev.c (main): Likewise. + * tests/readv.c (main): Likewise. + * tests/recvmsg.c (main): Likewise. + * tests/vmsplice.c (main): Likewise. + * tests/scm_rights-fd.test: Likewise. + * tests/uio.expected: Likewise. + + tests: check decoding of msghdr.msg_name* arguments of recvmsg syscall. + * tests/msg_name.c: New file. + * tests/msg_name.test: New test. + * tests/.gitignore: Add msg_name. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add msg_name.test. + +2016-07-13 Dmitry V. Levin + + Fix decoding of struct msghdr.msg_name* arguments of recvmsg syscall. + As the msghdr.msg_namelen argument of recvmsg syscall has the same + read-write semantics as the address length argument of recvfrom syscall, + parser of recvmsg syscall needs a similar fix. + + * defs.h (fetch_msghdr_namelen): New prototype. + (decode_msghdr): Add "int *" argument. + * msghdr.c (print_msghdr): Likewise. Treat it as a pointer to struct + msghdr.msg_namelen passed to the kernel. Pass to decode_sockaddr + the size of socket address actually returned by the kernel. + Print both user and kernel address lengths when the value changes. + (decode_msghdr, decode_mmsghdr): Add "int *" argument, + forward it to print_msghdr. + (decode_mmsgvec): Update decode_mmsghdr invocation. + (fetch_msghdr_namelen): New function. + * net.c (SYS_FUNC(sendmsg)): Update decode_msghdr invocation. + (SYS_FUNC(recvmsg)): Use fetch_msghdr_namelen on entering to save + struct msghdr.msg_namelen. On exiting, pass the saved value + to decode_msghdr. + +2016-07-12 Dmitry V. Levin + + Update generic ioctl entries from linux 4.7. + * linux/64/ioctls_inc.h: Update from linux v4.7 using ioctls_gen.sh. + * linux/32/ioctls_inc_align32.h: Likewise. + * linux/32/ioctls_inc_align64.h: Likewise. + +2016-07-12 Gleb Fotengauer-Malinovskiy + + x32: update ioctl entries from linux 4.7. + * linux/x32/ioctls_inc0.h: Update from linux v4.7 using ioctls_gen.sh. + + maint: update for linux 4.7. + * maint/ioctls_sym.sh: Drop obsolete workarounds for linux/btrfs.h. + +2016-07-12 Dmitry V. Levin + + block.c: remove BLKDAXGET support. + BLKDAXGET was removed by linux kernel commit v4.7-rc1~78^2^2~4. + + * block.c: Do not define BLKDAXGET. + (block_ioctl): Remove BLKDAXGET support. + * tests/ioctl_block.c (main): Remove BLKDAXGET test. + +2016-07-12 Dmitry V. Levin + + Fix printing of socklen argument of bind and sendto syscalls. + * net.c (SYS_FUNC(bind)): Print 3rd syscall argument using %d format. + (SYS_FUNC(sendto)): Print 6th syscall argument using %d format. + + tests: check decoding of sockaddr related arguments of recvfrom syscall. + * configure.ac (AC_CHECK_FUNCS): Add recvfrom. + * tests/recvfrom.c: New file. + * tests/recvfrom.test: New test. + * tests/.gitignore: Add recvfrom. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add recvfrom.test. + + Fix decoding of sockaddr related arguments of recvfrom syscall. + * net.c (SYS_FUNC(recvfrom)): Use fetch_socklen. Save the address + length passed to the kernel and print it on error. Do not print more + bytes of the socket address than actually returned by the kernel. + Print both user and kernel address lengths when the returned address + is truncated. + + tests: check decoding of accept4 syscall. + * configure.ac (AC_CHECK_FUNCS): Add accept4. + * tests/accept4.c: New file. + * tests/accept4.test: New test. + * tests/.gitignore: Add accept4. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add accept4.test. + + tests: check decoding of accept syscall. + * tests/accept.c: New file. + * tests/accept.test: New test. + * tests/.gitignore: Add accept. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add accept.test. + + tests: check decoding of getpeername syscall. + * tests/getpeername.c: New file. + * tests/getpeername.test: New test. + * tests/.gitignore: Add getpeername. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getpeername.test. + + tests: check decoding of getsockname syscall. + * tests/getsockname.c: New file. + * tests/getsockname.test: New test. + * tests/sockname.c: New file. + * tests/.gitignore: Add getsockname. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getsockname.test. + (EXTRA_DIST): Add sockname.c. + + Print both values of changing address length in sockname family syscalls + * net.c (decode_sockname): Print both user and kernel address lengths + when the value changes. + * tests/net-y-unix.c (main): Update expected output. + * tests/net-yy-unix.c (main): Likewise. + * tests/net.expected: Likewise. + + Enhance diagnostics of address truncation in sockname family syscalls. + * net.c (decode_sockname): Print both user and kernel address lengths + when the returned address is truncated. + * tests/sun_path.expected: Update expected output. + + Fix decoding of getsockname, getpeername, accept, and accept4 syscalls. + * net.c (fetch_socklen): New function. + (decode_sockname): Use it. On entering syscall, decode early + and return RVAL_DECODED when possible. On error, print the address + length passed to the kernel. Do not print more bytes of the socket + address than actually returned by the kernel. + +2016-07-11 Dmitry V. Levin + + Prepare parsers of sockname family syscalls for the upcoming fix. + * net.c (do_sockname): Rename to decode_sockname, drop second argument, + do not print sock_type_flags, return RVAL_DECODED on exiting. + (SYS_FUNC(accept), SYS_FUNC(getsockname)): Use decode_sockname instead + of do_sockname, take its return code into account. + (SYS_FUNC(accept4)): Likewise. Print sock_type_flags when + decode_sockname returns RVAL_DECODED. + +2016-07-08 Dmitry V. Levin + + netlink: handle multipart netlink messages. + Handle multipart netlink messages made of multiple struct nlmsghdr + headers with associated payload in one byte stream. + + * netlink.c (fetch_nlmsghdr, print_nlmsghdr, + decode_nlmsghdr_with_payload): New functions. + (decode_netlink): Use them. + * tests/netlink_parsing.c (send_query): Check them. + +2016-07-07 Dmitry V. Levin + + tests: extend netlink protocol check. + * tests/netlink_protocol.c (send_query): Check that no part + of netlink message is fetched beyond the end of message. + Check decoding of zero address and zero length messages. + Check decoding of messages with nlmsg_len exceeding message length. + +2016-07-07 Fabien Siron + + tests: check decoding of netlink protocol. + * tests/netlink_protocol.test: New test. + * tests/netlink_protocol.c: New file. + * tests/.gitignore: Add netlink_protocol. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add netlink_protocol.test. + +2016-07-07 Fabien Siron + + Add a general netlink socket parser. + Introduce a general socket netlink parser which prints the header and + a string for the remaining part of the buffer. It doesn't handle all + the netlink flags and types yet because the parser needs more + information, this will be implemented later. + + * net.c (decode_sockbuf): New function. + (SYS_FUNC(send), SYS_FUNC(sendto), SYS_FUNC(recv), SYS_FUNC(recvfrom)): + Use it instead of printstr. + * msghdr.c (print_msghdr): Pass IOV_DECODE_NETLINK to tprint_iov_upto() + for netlink sockets. + * netlink.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * defs.h (decode_netlink, getfdproto): New prototypes. + (iov_decode): Add IOV_DECODER_NETLINK. + * io.c (print_iovec): Use decode_netlink(). + * util.c (getfdproto): Remove static keyword. + * xlat/netlink_flags.in: New file. + * xlat/netlink_types.in: New file. + +2016-07-07 Dmitry V. Levin + + Update sigaltstack SS_* constants. + * xlat/sigaltstack_flags.in: Add SS_AUTODISARM introduced + by linux kernel commit v4.7-rc1~195^2. + + Update fs *_MAGIC constants. + * xlat/fsmagic.in: Add NSFS_MAGIC, TRACEFS_MAGIC, BPF_FS_MAGIC, + and UDF_SUPER_MAGIC introduced by linux kernel commits + v3.19-rc1~53^2~7^2~1, v4.1-rc1~147^2~4, v4.4-rc1~141^2~17^2~1, + and v4.7-rc1~161^2, respectively. + +2016-07-05 Dmitry V. Levin + + Update KEYCTL_* constants. + * xlat/keyctl_commands.in: Add KEYCTL_DH_COMPUTE introduced + by linux kernel commit v4.7-rc1~124^2~2^2~2^2. + + Update input event constants. + * xlat/evdev_keycode.in: Add KEY_* constants introduced + by linux kernel commit v4.7-rc6~32^2~6^2. + +2016-07-04 Dmitry V. Levin + + Update RWF_* constants. + * xlat/rwf_flags.in: Add RWF_DSYNC and RWF_SYNC introduced + by linux kernel commit v4.7-rc1~158^2~1. + +2016-07-07 Dmitry V. Levin + + Update BPF_MAP_TYPE_* constants. + * xlat/bpf_prog_types.in: Add BPF_PROG_TYPE_TRACEPOINT introduced + by linux kernel commit v4.7-rc1~154^2~332^2~6. + +2016-07-03 Dmitry V. Levin + + msghdr.c: limit output when printing excessively large messages. + Limit output of struct msghdr.msg_control when + struct msghdr.msg_controllen is greater than the maximum ancillary + buffer size specified in /proc/sys/net/core/optmem_max file. + + * configure.ac (AC_CHECK_FUNCS): Add open64. + * defs.h (read_int_from_file): New prototype. + * util.c (read_int_from_file): New function. + * msghdr.c (get_optmem_max): New function based on read_int_from_file. + (decode_msg_control): Use it to check control_len argument. + * tests/msg_control.c (test_big_len): New function. + (main): Use it to test printing of excessively large messages. + +2016-07-03 Dmitry V. Levin + + tests: add read_int_from_file function to libtests. + * tests/overflowuid.c (read_int_from_file): New function. + (check_overflow_id): Use it. + * tests/tests.h (read_int_from_file): New prototype. + +2016-07-02 Dmitry V. Levin + + msghdr.c: limit IP_RECVOPTS/IP_RETOPTS output in abbrev mode. + * msghdr.c (print_cmsg_ip_opts): Do not print more than max_strlen + bytes of ip options in abbrev mode. + * tests/msg_control.c (print_ip_opts): Use DEFAULT_STRLEN. + (test_sol_ip): Test IP_RETOPTS output in abbrev mode. + + msghdr.c: limit SCM_RIGHTS output in abbrev mode. + * msghdr.c (print_scm_rights): Do not print more than max_strlen + descriptors in abbrev mode. + * tests/msg_control.c (DEFAULT_STRLEN): New macro. + (print_fds): Use it. + (test_scm_rights3): New function. + (main): Use it to test SCM_RIGHTS output in abbrev mode. + * tests/msg_control-v.c: New file. + * tests/msg_control-v.test: New test. + * tests/.gitignore: Add msg_control-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add msg_control-v.test. + +2016-07-01 Dmitry V. Levin + + tests: check decoding of struct msghdr ancillary data. + * tests/msg_control.c: New file. + * tests/msg_control.test: New test. + * tests/.gitignore: Add msg_control. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add msg_control.test. + +2016-06-30 Dmitry V. Levin + + msghdr.c: reorganize struct cmsghdr handler. + * msghdr.c (sock_ee): New structure. + (print_scm_rights, print_scm_creds, print_scm_security, + print_cmsg_ip_pktinfo, print_cmsg_uint, print_cmsg_ip_opts, + print_cmsg_ip_recverr, print_cmsg_ip_origdstaddr): Remove data_len + argument validity check, don't print ", cmsg_data=" prefix here. + (print_cmsg_ip_tos): Likewise. Rename to print_cmsg_uint8_t. + (cmsg_printer): New type. + (cmsg_socket_printers, cmsg_ip_printers): New arrays. + (print_cmsg_type_data): Use them to handle struct cmsghdr + and its cmsg_data. + + msghdr.c: merge print_cmsg_ip_ttl and print_cmsg_ip_checksum. + * msghdr.c (print_cmsg_ip_ttl): Rename to print_cmsg_uint. + (print_cmsg_ip_checksum): Remove. + (print_cmsg_type_data): Replace print_cmsg_ip_ttl + and print_cmsg_ip_checksum with print_cmsg_uint. + + msghdr.c: enhance representation of unprintable part of msg_control array + * msghdr.c (decode_msg_control): When msg_control array has an + unprintable part, print its address. + + msghdr.c: apply a sane limit to the length of IP_ORIGDSTADDR address. + * msghdr.c (print_cmsg_ip_origdstaddr): Limit address length to the size + of struct sockaddr_storage. + + msghdr.c: fix printing SCM_RIGHTS array. + * msghdr.c (print_scm_rights): Do not print array elements outside + bounds defined by struct cmsghdr.cmsg_len. + + msghdr.c: print unrecognized struct cmsghdr.cmsg_type in hex. + * msghdr.c (print_cmsg_type_data): Use %#x format when printing + struct cmsghdr.cmsg_type as an integer. + + msghdr.c: fix printing of struct in_pktinfo. + * msghdr.c (print_cmsg_ip_pktinfo): Fix printing + of struct in_pktinfo.ipi_addr. + + msghdr.c: fix representation of struct cmsghdr.cmsg_data integer arrays. + * msghdr.c (print_cmsg_ip_opts): Print struct cmsghdr.cmsg_data + as an array of hexadecimal integers. + * tests/inet-cmsg.c (print_opts): Update expected output. + + msghdr.c: fix representation of integer struct cmsghdr.cmsg_data values. + * msghdr.c (print_cmsg_ip_ttl, print_cmsg_ip_tos, + print_cmsg_ip_checksum): Print struct cmsghdr.cmsg_data value as an + array element. + * tests/inet-cmsg.c (print_ttl, print_tos): Update expected output. + + msghdr.c: when printing struct struct cmsghdr.cmsg_data, also print its name + * msghdr.c (print_scm_rights, print_scm_creds, print_scm_security, + print_cmsg_ip_pktinfo, print_cmsg_ip_ttl, print_cmsg_ip_tos, + print_cmsg_ip_checksum, print_cmsg_ip_opts, print_cmsg_ip_recverr, + print_cmsg_ip_origdstaddr): Print "cmsg_data=" before its contents. + * tests/inet-cmsg.c (print_pktinfo, print_ttl, print_tos, print_opts, + print_origdstaddr): Update expected output. + * tests/scm_rights-fd.test: Likewise. + +2016-06-27 Dmitry V. Levin + + msghdr.c: print struct mmsghdr as a regular structure. + * msghdr.c (decode_mmsghdr): Print names of msg_hdr and msg_len fields. + * tests/mmsg.c (main): Update expected output. + + net.c: move all msghdr and mmsghdr parsers to a separate file. + * defs.h (msg_flags, socketlayers, decode_msghdr, decode_mmsg): + New prototypes. + * msghdr.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * net.c: Move all msghdr and mmsghdr parsers to msghdr.c. + + 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. + + net.c: move fallback definition of struct mmsghdr to a separate file. + * msghdr.h: New file. + * Makefile.am (strace_SOURCES): Add it. + * net.c: Include it. Move fallback definition of struct mmsghdr there. + * tests/mmsg.c: Include "msghdr.h". Remove fallback definition + of struct mmsghdr. + +2016-06-26 Dmitry V. Levin + + net.c: print struct msghdr as a regular structure. + * net.c (print_msghdr): Print msg_name, msg_namelen, msg_iov, + and msg_iovlen fields like other regular fields. + * tests/inet-cmsg.c (main): Update expected output. + * tests/mmsg.c (main): Likewise. + * tests/recvmsg.c (main): Likewise. + * tests/scm_rights-fd.test: Likewise. + + net.c: rename some internal functions for consistency and readability. + * net.c (printcmsghdr): Rename to decode_msg_control. + (do_msghdr): Rename to print_msghdr. + (extractmsghdr): Rename to fetch_msghdr. + (extractmmsghdr): Rename to fetch_mmsghdr. + (printmsghdr): Rename to decode_msghdr. + (printmmsghdr): Rename to decode_mmsghdr. + All callers updated. + + net.c: when printing struct msghdr.msg_control, also print its name. + * net.c (printcmsghdr): Skip control messages of zero length. + Always print "msg_control=" before the control message. + (do_msghdr): Print control message before its length, not after. + * tests/inet-cmsg.c (main): Update expected output. + * tests/scm_rights-fd.test: Likewise. + + Assume that libc provides struct msghdr.msg_control. + * configure.ac (AC_CHECK_MEMBERS): Remove struct msghdr.msg_control. + * net.c (do_msghdr): Remove HAVE_STRUCT_MSGHDR_MSG_CONTROL check. + +2016-06-25 Dmitry V. Levin + + net.c: move all sockaddr parsers to a separate file. + * sockaddr_ll.c: Rename to sockaddr.c + (print_sockaddr_data_ll): Add static keyword. + * Makefile.am (strace_SOURCES): Likewise. + * defs.h (print_sockaddr_data_ll): Remove. + (addrfams): New prototype. + * net.c: Move all sockaddr parsers to sockaddr.c. + + net.c: rename printsock to decode_sockaddr. + * defs.h (printsock): Rename to decode_sockaddr. + * net.c (printsock): Likewise. + (do_msghdr, SYS_FUNC(bind), do_sockname, SYS_FUNC(sendto), + SYS_FUNC(recvfrom)): Replace printsock with decode_sockaddr. + + defs.h: remove unused prototype. + * defs.h (print_sock_optmgmt): Remove. + + tests: check decoding of sockaddr structures. + * tests/net-sockaddr.c: New file. + * tests/net-sockaddr.test: New test. + * tests/.gitignore: Add net-sockaddr. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add net-sockaddr.test. + +2016-06-24 Dmitry V. Levin + + net.c: fix printing AF_PACKET socket addresses. + * defs.h (print_ifindex, print_sockaddr_data_ll): New prototypes. + * net.c: Stop including "xlat/af_packet_types.h". + (print_ifindex): Remove static keyword. + (print_sockaddr_data_l): Remove. + * sockaddr_ll.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * xlat/arp_hardware_types.in: New file. + * xlat/ethernet_protocols.in: Likewise. + + net.c: skip details of too short socket addresses, part 2. + * net.c (sa_printers): Add minimal address length for each socket family. + (print_sockaddr): Call socket family specific sockaddr printer + only when socket address length is greater or equal + the minimal address length for the socket family. + + net.c: fix printing AF_BLUETOOTH socket addresses. + * xlat/hci_channels.in: New file. + * net.c (print_sockaddr_data_raw): New function. + (print_sockaddr): Use it. + [HAVE_BLUETOOTH_BLUETOOTH_H]: Include "xlat/hci_channels.h". + [HAVE_BLUETOOTH_BLUETOOTH_H] (print_sockaddr_data_bt): Fix printing + sockaddr_hci, sockaddr_sco, sockaddr_rc, and sockaddr_l2 structures. + + net.c: fix printing AF_IPX sockets addresses, part 2. + * net.c (print_sockaddr_data_ipx): Print sockaddr_ipx.sipx_network + using %#08x format. Print elements of sockaddr_ipx.sipx_node array + and sockaddr_ipx.sipx_type using %#02x format. + +2016-06-24 Dmitry V. Levin + + net.c: fix printing AF_UNIX abstract socket addresses. + AF_UNIX abstract socket address specified by sockaddr_un.sun_path + is not a NUL-terminated string. + + * net.c (SIZEOF_SA_FAMILY): New macro. + (print_sockaddr_data_un): Use it. Specify actual address length + in print_quoted_string calls. Do not set QUOTE_0_TERMINATED flag + when printing an abstract socket address. + +2016-06-24 Dmitry V. Levin + + net.c: fix printing field names of struct sockaddr_nl. + * net.c (print_sockaddr_data_nl): Change "pid" to "nl_pid", "groups" + to "nl_groups". Print sockaddr_nl.nl_groups using %#08x format. + * tests/net-yy-netlink.c (main): Update. + + net.c: fix printing struct sockaddr_in6.sin6_flowinfo. + * net.c (print_sockaddr_data_in6): Convert sockaddr_in6.sin6_flowinfo + from network order to host order before printing. + +2016-06-23 Dmitry V. Levin + + net.c: do not print sockaddr_in6.sin6_scope_id unnecessarily. + Prior to RFC2553, struct sockaddr_in6 had no sin6_scope_id field. + As the kernel still accepts RFC2133 editions of struct sockaddr_in6, + print sockaddr_in6.sin6_scope_id only when it is specified. + + * net.c (SIN6_MIN_LEN): New macro. + (print_sockaddr_data_in6): Print sockaddr_in6.sin6_scope_id only when + socket address length exceeds SIN6_MIN_LEN. + +2016-06-23 Dmitry V. Levin + + net.c: fix printing raw data of socket addresses. + * net.c (print_sockaddr): When printing socket address raw data, read + exactly the number of data bytes specified for the socket addess. + + net.c: skip details of too short socket addresses. + * net.c (print_sockaddr): Print socket address details only when + the address size is greater than sizeof(struct sockaddr.sa_family). + (print_sockaddr_data_un): Remove handling of addrlen == 2. + * tests/net-y-unix.c (main): Update expected pattern. + * tests/net-yy-unix.c (main): Likewise. + * tests/net.expected: Likewise. + +2016-06-22 Dmitry V. Levin + + Assume that libc provides struct sockaddr_in6.sin6_scope_id. + * configure.ac (AC_CHECK_MEMBERS): Remove + struct sockaddr_in6.sin6_scope_id. + * net.c (print_sockaddr_data_in6): Remove + HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID check. + + Split print_sockaddr. + * net.c (sockaddr_buf_t): Remove. + (sockaddr_printer): New type. + (sa_printers): New array of sockaddr_printer. + (print_sockaddr): Use it. Move printers of family specific + sockaddr data to separate funcions. + +2016-06-22 Fabien Siron + + Add a enum for decoding to tprint_iov() and tprint_iov_upto() + Introduce a new type iov_decode which will be used instead of the integer + "decode" as a parameter. + + * defs.h (iov_decode): New enum. + (tprint_iov, tprint_iov_upto): Change type of "decode_iov" to enum iov_decode. + * aio.c (print_iocb): Change type of "decode_iov" to enum iov_decode in + tprint_iov() call. + * keyctl.c (keyctl_instantiate_key_iov): Likewise. + * process.c (ptrace): Likewise. + * process_vm.c (process_vm_readv, process_vm_writev): Likewise. + * io.c (writev, do_pwritev, vmsplice): Likewise. + (print_iovec): Replace the condition with a switch. + (tprint_iov_upto): Change type of "decode_iov" to enum iov_decode. + (readv, do_preadv): Change type of "decode_iov" to enum iov_decode in + tprint_iov_upto() call. + * scsi.c (print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req, + print_sg_io_v4_res): Likewise. + * net.c (do_msghdr): Adapt call of tprint_iov_upto(). + +2016-06-22 Dmitry V. Levin + + printsock: fix zero padding of sockaddr buffer. + Before this change printsock used to erroneously clear the last byte + of sockaddr buffer. + + * net.c (printsock): Use struct sockaddr_storage as a sockaddr buffer. + Reserve additional byte after the sockaddr buffer for zero padding. + Do not clear memory that is going to be overwritten by umoven. + Clear the tail of sockaddr buffer that was not overwritten by umoven. + +2016-06-21 Fabien Siron + + Change printsock to return socket family. + * defs.h (printsock): Change return type to int. + * net.c (printsock): Likewise. Return socket family on success + and -1 in case of an error. + +2016-06-21 Dmitry V. Levin + + Unexport addrfams. + * defs.h (addrfams): Remove. + + sock.c: use print_sockaddr. + * sock.c (print_ifreq_addr): Remove. + (PRINT_IFREQ_ADDR): New macro. + (print_ifreq, decode_ifconf): Use it instead of print_ifreq_addr. + + Export print_sockaddr function. + * defs.h (print_sockaddr): New prototype. + * net.c (print_sockaddr): Remove static keyword. + Change type of address pointer to "const void *". + (print_cmsg_ip_recverr, print_group_req): Remove redundant casts + in print_sockaddr invocations. + + xlat/addrfams.in: provide fallback definitions. + * xlat/addrfams.in: add fallback definitions for constants. + + Update AF_* constants. + * xlat/addrfams.in: Add AF_QIPCRTR. + + Assume that libc provides inet_ntop and inet_pton. + * configure.ac (AC_CHECK_FUNCS): Remove inet_ntop and inet_pton. + * net.c (sockaddr_buf_t, print_sockaddr, print_mreq6): Remove + HAVE_INET_NTOP checks. + * tests/ip_mreq.c: Remove HAVE_INET_PTON check. + + net.c: use SO_LINGER unconditionally. + * net.c (print_linger, print_getsockopt, print_setsockopt): Do not check + for SO_LINGER availability. + + net.c: use AF_BLUETOOTH unconditionally. + * net.c (print_sockaddr, SYS_FUNC(socket)): Do not check + for AF_BLUETOOTH availability. + +2016-06-20 Dmitry V. Levin + + Consistently use AF_UNIX over AF_LOCAL. + As these constants have the same value 1, let's use and print only one + of them, e.g. AF_UNIX. + + * xlat/addrfams.in (AF_LOCAL): Remove. + * tests/net-accept-connect.c (main): Replace AF_LOCAL with AF_UNIX. + * tests/net-y-unix.c: Likewise. + * tests/net-yy-unix.c: Likewise. + * tests/netlink_unix_diag.c: Likewise. + +2016-06-19 Dmitry V. Levin + + net.c: fix printing AF_IPX sockets. + * net.c (print_sockaddr): Print sockaddr_ipx as a regular structure. + (SYS_FUNC(socket)): Remove special handling of AF_IPX. + + net.c: use AF_IPX unconditionally. + * net.c (sockaddr_buf_t, print_sockaddr, SYS_FUNC(socket)): Do not check + for AF_IPX availability. + + Cleanup netipx/ipx.h availability check. + * configure.ac (AC_CHECK_HEADERS): Add netipx/ipx.h. + * net.c: Check for HAVE_NETIPX_IPX_H instead of __GLIBC__. + +2016-06-19 Fabien Siron + + Make getfdproto return enum instead of string. + Introduce a new enum type sock_proto and use it instead of strings for socket + protocols identification. + + * defs.h (sock_proto): New enum. + (get_proto_by_name): New function. + * socketutils.c (protocols): New static table. + (print_sockaddr_by_inode): Use it. Change type of "proto" argument + to sock_proto. + (get_proto_by_name): New function. + * util.c (getfdproto): Use it. Change return type to sock_proto. + (printfd): Update. + +2016-06-18 Dmitry V. Levin + + Split travis-ci.sh. + * travis-ci.sh: Split into travis-build.sh, travis-install.sh, + and travis-success.sh files. + * .travis.yml (before_install, after_success, git): New mappings. + (script): Change to travis-build.sh. + (addons, install): Remove. + (env): Remove matrix. + (matrix): Replace exclude list with include list. + +2016-06-17 Dmitry V. Levin + + Introduce HAVE_STRUCT_TCB_EXT_ARG macro. + Check for "if HAVE_STRUCT_TCB_EXT_ARG" instead of + "if defined LINUX_MIPSN32 || defined X32". + + * defs.h (HAVE_STRUCT_TCB_EXT_ARG): Define for LINUX_MIPSN32 || X32. + (struct tcb): Check it instead of LINUX_MIPSN32 || X32. + (RVAL_LUDECIMAL): Likewise. + * io.c (print_lld_from_low_high_val): Likewise. + * lseek.c (SYS_FUNC(lseek)): Likewise. + * mem.c (SYS_FUNC(mmap)): Likewise. + * syscall.c (trace_syscall_exiting): Likewise. + * util.c (getllval): Likewise. + +2016-06-17 Dmitry V. Levin + + btrfs: fix build with fresh linux/btrfs.h. + Fix build with fresh that provides a slightly different + definition of struct btrfs_ioctl_defrag_range_args. + + * btrfs.c (btrfs_ioctl): Cast "len" member of + struct btrfs_ioctl_defrag_range_args to uint64_t. + * tests/btrfs.c (btrfs_print_defrag_range_args): Cast "start" and "len" + members of struct btrfs_ioctl_defrag_range_args to uint64_t. + +2016-06-17 Dmitry V. Levin + + btrfs: provide fallback definitions for BTRFS_IOC_QUOTA_RESCAN* + was introduced in linux v3.9-rc1 while some + of btrfs ioctls were added later, e.g. BTRFS_IOC_QUOTA_RESCAN + and BTRFS_IOC_QUOTA_RESCAN_STATUS in v3.10-rc2, + or BTRFS_IOC_QUOTA_RESCAN_WAIT in v3.11-rc1. + + * btrfs.c [!BTRFS_IOC_QUOTA_RESCAN] + (struct btrfs_ioctl_quota_rescan_args): New structure. + (BTRFS_IOC_QUOTA_RESCAN, BTRFS_IOC_QUOTA_RESCAN_STATUS): New macros. + [!BTRFS_IOC_QUOTA_RESCAN_WAIT] (BTRFS_IOC_QUOTA_RESCAN_WAIT): New macro. + * tests/btrfs.c: Likewise. + + Reported-by: Li Er + +2016-06-17 Dmitry V. Levin + + configure.ac: fix checks for btrfs specific structures. + * configure.ac (AC_CHECK_MEMBERS): Fix typo in the check for + struct btrfs_ioctl_defrag_range_args.start and + struct btrfs_ioctl_search_args_v2.buf_size. + +2016-06-16 Elvira Khabirova + + README: add system requirements and beautify the file. + +2016-06-16 Fei Jie + + tests: add signal_receive.test. + * tests/signal_receive.c: New file. + * tests/signal_receive.test: New test. + * tests/.gitignore: Add signal_receive. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (MISC_TESTS): Add signal_receive.test. + + tests: add signal2name function to libtests. + * tests/tests.h (signal2name): New prototype. + * tests/signal2name.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + +2016-06-16 Dmitry V. Levin + + net.c: use AF_INET6 unconditionally. + * net.c (SYS_FUNC(socket)): Do not check for AF_INET6 availability. + +2016-06-16 Dmitry V. Levin + + configure.ac: do not check for linux/in6.h. + The last user of was removed by commit v4.9-252-gf362a33. + + * configure.ac (AC_CHECK_HEADERS): Remove linux/in6.h. + +2016-06-16 Dmitry V. Levin + + net.c: use AF_PACKET unconditionally. + * net.c: Do not check for AF_PACKET availability. + + net.c: include unconditionally. + * configure.ac (AC_CHECK_HEADERS): Remove linux/if_packet.h. + * net.c: Include unconditionally. + + net.c: use ICMP_FILTER unconditionally. + * net.c: Do not check for ICMP_FILTER availability. + + net.c: include unconditionally. + * configure.ac (AC_CHECK_HEADERS): Remove linux/icmp.h. + * net.c: Follow the example of tests/net-icmp_filter.c and include + unconditionally. + +2016-06-14 Dmitry V. Levin + + net.c: use AF_NETLINK unconditionally. + * net.c: Do not check for AF_NETLINK availability. + + net.c: include unconditionally. + * configure.ac (AC_CHECK_HEADERS): Remove linux/netlink.h. + * net.c: Follow the example of socketutils.c and include + unconditionally. + +2016-06-14 Elvira Khabirova + + Remove UNDEFINED_SCNO. + Since UNDEFINED_SCNO is set if and only if !SCNO_IS_VALID + and since tcp->s_ent can only be set to &sysent[tcp->scno] + (or to &unknown, but only when !SCNO_IS_VALID), there is no need + to check for UNDEFINED_SCNO before calling syscall_name(tcp->scno). + + * defs.h (UNDEFINED_SCNO): Remove. + * syscall.c (get_scno, trace_syscall_entering, trace_syscall_exiting): + Remove checks for UNDEFINED_SCNO. + +2016-06-14 Dmitry V. Levin + + tests/attach-f-p.c: fix typo in comment. + +2016-06-14 Elvira Khabirova + + strace.c: fix style in function definition. + * strace.c (kill_save_errno): Move the type of return value + to another line. + + Turn on more compiler warnings. + * configure.ac (gl_WARN_ADD): Add -Wempty-body, -Wformat-security, + -Wignored-qualifiers, -Winit-self, -Wlogical-op, + -Wmissing-parameter-type, -Wnested-externs, -Wold-style-declaration, + -Wold-style-definition, -Wtype-limits. + + strace.c: fix a warning reported by -Wold-style-definition. + * strace.c (usage): Add void to the list of function argments. + +2016-06-14 Dmitry V. Levin + + tests/ioctl_evdev.c: fix typo in comment. + +2016-06-14 Elvira Khabirova + + Move printargs* functions to util.c. + * syscall.c (printargs, printargs_u, printargs_d): Move ... + * util.c: ... here. + + tests/xgetrlimit.c: fix a warning reported by -Wtype-limits. + * tests/xgetrlimit.c (sprint_rlim): Explicitly cast constants + to the type of argument. + +2016-06-11 Dmitry V. Levin + + Consistently use printaddr for printing addresses. + * bjm.c (SYS_FUNC(init_module)): Use printaddr. + * clone.c (SYS_FUNC(clone)): Likewise. + * evdev.c (ff_effect_ioctl): Likewise. + * mtd.c (decode_mtd_oob_buf): Likewise. + * net.c (SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg), SYS_FUNC(getsockopt)): + Likewise. + * print_sigevent.c (print_sigevent): Likewise. + * printsiginfo.c (printsigval, print_si_info): Likewise. + * signal.c (decode_new_sigaction): Likewise. + * sysmips.c (SYS_FUNC(sysmips)): Likewise. + * util.c (printpathn, printstr, umoven_or_printaddr): Likewise. + * v4l2.c (print_v4l2_buffer, print_v4l2_framebuffer, + umoven_or_printaddr_ignore_syserror): Likewise. + * tests/net-icmp_filter.c (main): Update. + + Based on patch by Eugene Syromyatnikov . + +2016-06-10 Dmitry V. Levin + + tests/attach-p-cmd-p.c: cleanup. + * attach-p-cmd-p.c (handler): Move code ... + (main): ... here. Unblock SIGALRM only. + Use alarm() instead of setitimer(). + Replace endless loop with a pause() call. + Check that chdir() returns ENOENT. + + tests: enhance test coverage of SIGCHLD siginfo_t. + * tests/siginfo.c: New file. + * tests/siginfo.test: New test. + * tests/wait.c: Remove. + * tests/wait.expected: Remove. + * tests/wait.test: Remove. + * tests/.gitignore: Add siginfo, remove wait. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add siginfo.test, remove wait.test. + (EXTRA_DIST): Remove wait.expected. + + tests: extend test coverage of waitid syscall. + * tests/waitid.c: New file. + * tests/waitid-v.c: Likewise. + * tests/waitid.test: New test. + * tests/waitid-v.test: Likewise. + * tests/.gitignore: Add waitid and waitid-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add waitid.test and waitid-v.test. + + tests: extend test coverage of wait4 syscall. + * tests/wait4.c: New file. + * tests/wait4-v.c: Likewise. + * tests/wait4.test: New test. + * tests/wait4-v.test: Likewise. + * tests/.gitignore: Add wait4 and wait4-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add wait4.test and wait4-v.test. + + tests: add widen_to_ull macro to tests.h. + * tests.h (widen_to_ull): New macro, copied from defs.h + + Fix sign extension issues in the parser of struct rusage. + * printrusage.c (printrusage): Do not cast members of struct rusage + to type long, use widen_to_ull instead. + +2016-06-09 Dmitry V. Levin + + tests: check decoding of waitpid syscall. + * tests/waitpid.c: New file. + * tests/waitpid.test: New test. + * tests/.gitignore: Add waitpid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add waitpid.test. + +2016-06-09 Fei Jie + + tests: add strace-E.test. + * tests/strace-E.expected: New file. + * tests/strace-E.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + (EXTRA_DIST): Add strace-E.expected. + +2016-06-08 Dmitry V. Levin + + strace.spec.in: enable libunwind on more platforms. + * strace.spec.in: Add libunwind-devel to BuildRequires for RHEL8 family. + +2016-06-08 Dmitry V. Levin + + make-dist: generate strace-*.tar.gz, strace.dsc, and strace.spec. + Change make-dist to generate strace-*.tar.gz, strace.dsc, + and strace.spec in addition to strace-*.tar.xz. + + * configure.ac (AM_INIT_AUTOMAKE): Remove no-dist-gzip. + * make-dsc: New file. + * make-dist: Use it. + * .gitignore: Add strace-*.tar.gz, strace.dsc, and strace.spec. + +2016-06-08 Dmitry V. Levin + + Parametrize debian/changelog. + * configure.ac (CHANGELOGTIME): Rename to RPM_CHANGELOGTIME. + (DEB_CHANGELOGTIME): New variable. + (AC_CONFIG_FILES): Add debian/changelog. + * strace.spec.in: Rename CHANGELOGTIME to RPM_CHANGELOGTIME. + * debian/changelog: Rename to ... + * debian/changelog.in: ... this file. Add parametrized entry. + * debian/.gitignore: New file. + + git-version-gen: replace '-' with '.' in generated version. + * git-version-gen: Replace '-' with '.' so version conforms to policies + * configure.ac (SPEC_VERSION): Remove. + * strace.spec.in: Replace SPEC_VERSION with PACKAGE_VERSION. + Remove %srcname. + +2016-06-07 Dmitry V. Levin + + Parametrize strace.spec. + * configure.ac (SPEC_VERSION, CHANGELOGTIME): Define. + (AC_CONFIG_FILES): Add strace.spec. + * strace.spec: Rename to ... + * strace.spec.in: ... this file. Parametrize Version, srcname, + and the last %changelog entry. Initialize .tarball-version file. + + strace.spec: adopt for OBS. + * strace.spec: Parametrize libunwind-devel BRs, BuildRoot, and %defattr. + +2016-06-07 Dmitry V. Levin + + tests: remove obsolete strace-f.test. + strace-f.test is too inexact while fork-f.test does the right thing. + + * tests/strace-f.test: Remove. + * tests/Makefile.am (MISC_TESTS): Remove it. + * strace.spec (BuildRequires): Remove time. + +2016-06-07 Dmitry V. Levin + + tests: always distribute strace-k.test. + Fix distribution of tests/strace-k.test file when configured + without libunwind. + + * tests/Makefile.am (EXTRA_DIST): Add strace-k.test. + +2016-06-07 Dmitry V. Levin + + make-dist: skip news-check for non-releases. + * make-dist: Run news-check only when the commit being built + matches a release tag. + +2016-06-06 Dmitry V. Levin + + tests: check decoding of setrlimit, getrlimit, and ugetrlimit syscalls. + * tests/getrlimit.c: New file. + * tests/setrlimit.c: Likewise. + * tests/ugetrlimit.c: Likewise. + * tests/xgetrlimit.c: Likewise. + * tests/getrlimit.test: New test. + * tests/setrlimit.test: Likewise. + * tests/ugetrlimit.test: Likewise. + * tests/.gitignore: Add getrlimit, setrlimit, and ugetrlimit. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getrlimit.test, setrlimit.test, + and ugetrlimit.test. + (EXTRA_DIST): Add xgetrlimit.c. + + tests: check decoding of prlimit64 syscall. + * tests/prlimit64.c: New file. + * tests/prlimit64.test: New test. + * tests/.gitignore: Add prlimit64. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add prlimit64.test. + + Fix decoding of pid_t argument of prlimit64 syscall. + * resource.c (SYS_FUNC(prlimit64)): Print pid_t syscall + argument using %d format. + +2016-06-06 Dmitry V. Levin + + Do not check for old sysctl enums. + Assume that sysctl enums defined since linux v2.6 are always defined, + with a signle exception: check for CTL_PROC which definition was removed + in v2.6.18 and restored later in v2.6.23. + + * configure.ac (AC_CHECK_DECLS): Remove old constants. + * xlat/sysctl_kern.in: Mark constants older than KERN_PRINTK_RATELIMIT + as unconditional. + * xlat/sysctl_net.in: Mark constants older than NET_LLC + as unconditional. + * xlat/sysctl_net_core.in: Mark constants older than NET_CORE_BUDGET + as unconditional. + * xlat/sysctl_net_ipv4.in: Mark constants older than + NET_IPV4_IGMP_MAX_MSF as unconditional. + * xlat/sysctl_net_ipv4_conf.in: Mark constants older than + NET_IPV4_CONF_FORCE_IGMP_VERSION as unconditional. + * xlat/sysctl_net_ipv4_route.in: Mark constants older than + NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS as unconditional. + * xlat/sysctl_net_ipv6.in: Mark constants older than + NET_IPV6_MLD_MAX_MSF as unconditional. + * xlat/sysctl_net_ipv6_route.in: Mark constants older than + NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS as unconditional. + * xlat/sysctl_net_unix.in: Mark all constants as unconditional. + * xlat/sysctl_root.in: Mark constants older than CTL_ARLAN + as unconditional. + * xlat/sysctl_vm.in: Mark constants older than VM_MAX_MAP_COUNT + as unconditional. + +2016-06-06 Dmitry V. Levin + + xlat: extend syntax. + * xlat/gen.sh: Implement #conditional directive that turns on + preprocessor checks turned off earlier by #unconditional directive. + +2016-06-06 Elvira Khabirova + + mpers.awk: remove unnecessary type attribute retrieval. + * mpers.awk (what_is): Do not retrieve "type" attribute + for "enumeration_type". + + tests/ptrace.c: fix fork() return value check. + * tests/ptrace.c (test_peeksiginfo): Explicitly cast fork() return value + to pid_t. + + .gitignore: add missing files that should be ignored. + * .gitignore: Add ioctl_redefs[12].h and libstrace.a. + +2016-06-06 Dmitry V. Levin + + debian: sync with the package. + * debian/control (Build-Depends) [amd64]: Remove libunwind-dev. + * debian/changelog: Sync with 4.12-3. + * debian/rules: Likewise. + +2016-06-06 Dmitry V. Levin + + tests/strace-S.test: fix testing 64-bit strace using a 32-bit userspace. + * tests/strace-S.test: Measure wall clock time instead of system time. + Use local "./readv" instead of system "date" as a sample executable. + + Reported-by: Steve McIntyre + +2016-06-06 Dmitry V. Levin + + tests/strace-S.test: enhance error diagnostics. + * tests/strace-S.test: If strace output does not meet expectations, + print the output. + +2016-06-02 Dmitry V. Levin + + .gitignore: sort the list of ignored patterns. + * .gitignore: Sort. + +2016-06-01 Dmitry V. Levin + + maint: post-release administrivia. + * NEWS: Add header line for the next release. + +2016-05-31 Dmitry V. Levin + + Prepare for 4.12 release. + * NEWS: Update for 4.12 release. + * debian/changelog: 4.12-1. + * strace.spec: 4.12-1. + + Sync strace.spec and debian/changelog with packages. + * debian/changelog: Sync with 4.11-1. + * strace.spec: Sync with 4.11.0.163.9720-2. + +2016-05-30 Dmitry V. Levin + + Mpersify hdio.c. + * defs.h (hdio_ioctl): Remove. + * hdio.c: Mpersify struct hd_geometry. + (hdio_ioctl): Mpersify. + +2016-05-29 Dmitry V. Levin + + loop.c: decode LOOP_SET_DIRECT_IO. + * loop.c (loop_ioctl) [LOOP_SET_DIRECT_IO] : Handle LOOP_SET_DIRECT_IO. + + loop.c: fix printing of arrays. + * loop.c (decode_loop_info): Use square brackets to print + struct loop_info.lo_init and struct loop_info.reserved arrays. + (decode_loop_info64): Use square brackets to print + struct loop_info64.lo_init array. + + loop.c: fix printing of structure members' names. + * loop.c (decode_loop_info, decode_loop_info64): Do not strip "lo_" + prefix from printed names. + + loop.c: optimize decoding of paired ioctls. + * loop.c (loop_ioctl): Optimize decoding of LOOP_[GS]ET_STATUS + and LOOP_[GS]ET_STATUS64 ioctl pairs. + +2016-05-28 Dmitry V. Levin + + tests/ioctl_evdev.c: check EVIOCGUNIQ decoding. + * tests/ioctl_evdev.c (main): Check EVIOCGUNIQ(0) decoding. + + tests/ioctl_mtd.c: fix build with musl. + * tests/ioctl_mtd.c: Include . + + tests: check decoding of 'M' type ioctls. + * tests/ioctl_mtd.c: New file. + * tests/ioctl_mtd.test: New test. + * tests/.gitignore: Add ioctl_mtd. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_mtd.test. + + Mpersify mtd.c. + * defs.h (mtd_ioctl): Remove. + * mtd.c: Mpersify struct mtd_oob_buf and ioctl numbers. + (mtd_ioctl): Mpersify. + + mtd.c: refactor. + * mtd.c (mtd_ioctl): Move parsers of structures to separate functions. + + Move parser of UBI_* ioctls to a separate file. + * mtd.c (ubi_ioctl): Move to ... + * ubi.c: ... new file. + * Makefile.am (strace_SOURCES): Add it. + + tests: check decoding of EVIOC* ioctls. + * tests/ioctl_evdev.c: New file. + * tests/ioctl_evdev-v.c: Likewise. + * tests/ioctl_evdev.test: New test. + * tests/ioctl_evdev-v.test: Likewise. + * tests/.gitignore: Add ioctl_evdev and ioctl_evdev-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_evdev.test and ioctl_evdev-v.test. + + Mpersify EVIOC* ioctl parser. + * defs.h (evdev_abs): New xlat prototype. + (evdev_ioctl): Remove. + * evdev.c: Do not include "xlat/evdev_abs.h". + Mpersify struct ff_effect and ioctl numbers. + (evdev_ioctl): Mpersify. + * NEWS: Mention this enhancement. + + evdev.c: fix printing of unrecognized event type passed to EVIOCGBIT. + * evdev.c (bit_ioctl): If event type is not unrecognized, + print the argument as an address. + + evdev.c: fix printing of EV_PWR's argument. + * evdev.c (bit_ioctl): Fix printing of comma before EV_PWR's argument. + + evdev.c: fix indentation. + * evdev.c: Fix indentation of print formats. + + evdev.c: fix decoding of EVIOCGNAME, EVIOCGPHYS, and EVIOCGUNIQ. + * evdev.c (evdev_read_ioctl): Fix printing of the string returned + in response to EVIOCGNAME, EVIOCGPHYS, and EVIOCGUNIQ requests. + + evdev.c: fix EVIOCGVERSION decoding. + * evdev.c (evdev_read_ioctl): Print EVIOCGVERSION's argument + using #x format. + + evdev.c: fix EVIOCGMTSLOTS decoding. + * evdev.c (mtslots_ioctl): Use umove_or_printaddr. + + evdev.c: fix bitset decoding. + * evdev.c (decode_bitset): Use umove_or_printaddr. + + evdev.c: fix decoding of struct input_id. + * evdev.c (getid_ioctl): Use umove_or_printaddr. + + evdev.c: fix decoding of struct input_keymap_entry. + * evdev.c (keycode_V2_ioctl): Use umove_or_printaddr. + + evdev.c: fix decoding of EVIOCGKEYCODE/EVIOCSKEYCODE. + * evdev.c (keycode_ioctl): Use umove_or_printaddr. + + evdev.c: fix decoding of struct input_absinfo. + * evdev.c (abs_ioctl): Use umove_or_printaddr. + + evdev.c: fix decoding of struct ff_effect. + * evdev.c (ff_effect_ioctl): Use umove_or_printaddr. + Fix printing of struct ff_effect.u member names. + + evdev.c: fix printing of struct ff_envelope.fade_level. + * evdev.c (decode_envelope): Print struct ff_envelope.fade_level + using #x format. + + evdev.c: fix decoding of EVIOCGRAB and EVIOCREVOKE. + * evdev.c (evdev_write_ioctl): Print argument of EVIOCGRAB + and EVIOCREVOKE as unsigned long. + + evdev.c: fix EVIOCRMFF decoding. + * evdev.c (evdev_write_ioctl): Print EVIOCRMFF's argument as int. + + evdev.c: move handling of EVIOCGBIT to a separate function. + * evdev.c (evdev_read_ioctl): Move EVIOCGBIT handling to ... + (bit_ioctl): ... new function. + +2016-05-28 Dmitry V. Levin + + evdev.c: reorder ioctl command checks. + Change the order of ioctl command cheks to match the kernel: + 1st, check for fixed-number fixed-length commands, + 2nd, check for fixed-number variable-length commands, + 3rd, check for multi-number fixed-length commands, + 4thm check for multi-number variable-length commands. + + * evdev.c (evdev_read_ioctl, evdev_write_ioctl): Reorder + ioctl command checks. + +2016-05-28 Dmitry V. Levin + + evdev.c: decode all directions except _IOC_READ on entering syscall. + * evdev.c (evdev_write_ioctl): Remove exiting check. + (evdev_read_ioctl): Move entering check ... + (evdev_ioctl): ... here. Add RVAL_DECODED to return code in _IOC_WRITE + and default cases. + + evdev.c: fix indentation of preprocessor directives. + * evdev.c: Fix indentation of preprocessor directives. + Move inclusion of into [HAVE_LINUX_INPUT_H]. + +2016-05-28 Jeff Mahoney + + file_ioctl.c: print first two extents for FIDEDUPERANGE in abbrev mode. + * file_ioctl.c (file_ioctl, print_file_dedupe_range_info): Print first + two elements of info array in abbrev mode. + * tests/btrfs.c (btrfs_test_extent_same_ioctl): Handle newly + printed elements. + +2016-05-27 Dmitry V. Levin + + ioctl.c: fix typo in decoding of EVIOCSABS's parameter. + * ioctl.c (evdev_decode_number): Fix typo in printxval default value. + +2016-05-27 Jeff Mahoney + + tests: check decoding of btrfs RDWR ioctls returned data. + * tests/btrfs-vw.test: New file. + * tests/btrfs-w.test: New file. + * tests/Makefile.am (DECODER_TESTS): Add them. + + tests/btrfs.c: fix live btrfs_test_search_ioctls output. + * tests/btrfs.c (btrfs_test_search_ioctls): Use print_tree_search_buf + for BTRFS_IOC_TREE_SEARCH and fix missing whitespace. + + btrfs.c: don't use print_array in btrfs_print_tree_search. + * btrfs.c (btrfs_print_tree_search): Don't use print_array. The buffer + represents a series of variable sized records, not an array. + + btrfs.c: fix print_array usage in btrfs_print_logical_ino_container. + * btrfs.c: (btrfs_print_logical_ino_container) Fix the element count + to reflect the number of records rather than the number of items. + +2016-05-26 Jeff Mahoney + + tests/btrfs.c: fix btrfs-v for BTRFS_IOC_TREE_SEARCH. + * tests/btrfs.c (btrfs_test_send_ioctl): Assign key_reference + to search_args for BTRFS_IOC_TREE_SEARCH ioctl tests. + +2016-05-26 Fabien Siron + + Fix -yy documentation. + * strace.c (usage): Fix description of -yy option. + * strace.1: Likewise. + +2016-05-26 Dmitry V. Levin + + tests/ioctl_block.c: tweak magic constants to make the test more reliable + * tests/ioctl_block.c (main): Change bad pointer to make + its lower 32-bit part closer to -1U. + + tests/btrfs.c: check basic decoding of read-only ioctls. + * tests/btrfs.c (btrfs_test_read_ioctls): New function. + (main): Use it. + + tests: check decoding of BLK* ioctls. + * configure.ac (AC_CHECK_TYPES): Add struct blk_user_trace_setup. + * tests/ioctl_block.c: New file. + * tests/ioctl_block.test: New test. + * tests/.gitignore: Add ioctl_block. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_block.test. + + Mpersify BLK* ioctl parser. + * defs.h (block_ioctl): Remove. + * block.c: Mpersify struct blk_user_trace_setup, + struct blkpg_ioctl_arg, struct blkpg_partition, and ioctl numbers. + (block_ioctl): Mpersify. + * NEWS: Mention this enhancement. + + block.c: optimize decoding of paired ioctls. + * block.c (block_ioctl): Optimize decoding of commands that return + a signed int. + + block.c: fix printing of uint64_t pairs. + * block.c (block_ioctl): Print uint64_t values using PRIu64 format. + + block.c: fix printing of struct blk_user_trace_setup. + * block.c (block_ioctl): Fix printing of comma before + struct blk_user_trace_setup.name on exiting syscall. + + Move parser of 'X' type ioctls to a separate file. + * fs_x_ioctl.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * block.c: (block_ioctl): Move parser of FITRIM, FIFREEZE, and FITHAW + to fs_x_ioctl.c. + * defs.h (fs_x_ioctl): New prototype. + * ioctl.c (ioctl_decode): Call fs_x_ioctl for ioctl type 'X'. + + Move parser of HDIO_* ioctls to a separate file. + * hdio.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * block.c: Do not include . + (block_ioctl): Move parser of HDIO_GETGEO to hdio.c. + * defs.h (hdio_ioctl): New prototype. + * ioctl.c (ioctl_decode): Call hdio_ioctl for ioctl type 0x03. + + Fix explicit casts of signed integer types to unsigned long long. + * defs.h (widen_to_ull): New macro. + * dirent.c (print_old_dirent, SYS_FUNC(getdents)): Use it in place + of explicit casts to unsigned long long. + * io.c (print_lld_from_low_high_val): Likewise. + * lseek.c (SYS_FUNC(llseek)): Likewise. + * printsiginfo.c (print_si_info): Likewise. + * printstat.h (DO_PRINTSTAT): Likewise. + * sysinfo.c (SYS_FUNC(sysinfo)): Likewise. + * times.c (SYS_FUNC(times)): Likewise. + * fetch_struct_statfs.c (ASSIGN_NUMBER): Remove. + (fetch_struct_statfs, fetch_struct_statfs64): Replace ASSIGN_NUMBER + with widen_to_ull. + + scsi.c: print __u64 types using PRI__u64 format. + * scsi.c (print_sg_io_v4_req, print_sg_io_v4_res): Remove explicit casts + to unsigned long long, print fields of type __u64 using PRI__u64 format. + +2016-05-25 Dmitry V. Levin + + tests: check decoding of RTC_* ioctls. + * configure.ac (AC_CHECK_FUNCS): Add ioctl_rtc. + * tests/ioctl_rtc.c: New file. + * tests/ioctl_rtc-v.c: Likewise. + * tests/ioctl_rtc.test: New test. + * tests/ioctl_rtc-v.test: Likewise. + * tests/.gitignore: Add ioctl_rtc and ioctl_rtc-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_rtc.test and ioctl_rtc-v.test. + + Mpersify RTC_* ioctl parser. + * defs.h (rtc_ioctl): Remove. + * rtc.c: Mpersify struct rtc_pll_info and ioctl numbers. + (rtc_ioctl): Mpersify. + * NEWS: Mention this enhancement. + + rtc.c: fix decoding of struct rtc_wkalrm. + * rtc.c (decode_rtc_wkalrm): Print field name of struct rtc_wkalrm.time. + + file_ioctl.c: print file descriptors using printfd. + * file_ioctl.c (print_file_dedupe_range_info): Print + struct file_dedupe_range_info.dest_fd using printfd. + (file_ioctl): Print struct file_clone_range.src_fd using printfd. + + rtc.c: do not print argument of ioctls that have no arguments. + * rtc.c (rtc_ioctl): Do not print argument of RTC_{A,U,P,W}IE_{ON,OFF} + and RTC_VL_CLR ioctls. + + rtc.c: decode RTC_PLL_GET and RTC_PLL_SET. + * rtc.c (rtc_ioctl): Decode RTC_PLL_GET and RTC_PLL_SET + + rtc.c: optimize decoding of paired ioctls. + * rtc.c (rtc_ioctl): Optimize decoding of RTC_ALM_READ/RTC_ALM_SET, + RTC_RD_TIME/RTC_SET_TIME, and RTC_WKALM_RD/RTC_WKALM_SET ioctl pairs. + + block.c: handle BLKDAXGET. + * block.c [!BLKDAXGET] (BLKDAXGET): Define. + (block_ioctl): Handle it. + + tests: check decoding of mount syscall. + * tests/mount.c: New file. + * tests/mount.test: New test. + * tests/.gitignore: Add mount. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mount. + +2016-05-24 Dmitry V. Levin + + tests/vhangup.c: diassociate from the controlling terminal first. + * tests/vhangup.c (main): Call setsid before vhangup. + +2016-05-24 Fei Jie + + tests: add vhangup.test. + * tests/vhangup.c: New file. + * tests/vhangup.test: New test. + * tests/.gitignore: Add vhangup. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add vhangup.test. + +2016-05-24 Dmitry V. Levin + + NEWS: Prepare for 4.12 release. + +2016-05-24 Gleb Fotengauer-Malinovskiy + + tests/btrfs.c: fix build on x32. + * tests/btrfs.c (btrfs_test_ino_path_ioctls): Fix printing of st_ino. + +2016-05-24 Dmitry V. Levin + + tests/btrfs.c: fix build with u64 based BTRFS_IOC_DEFAULT_SUBVOL. + * tests/btrfs.c: Fix build on systems where BTRFS_IOC_DEFAULT_SUBVOL + is defined using unexported type "u64". + + btrfs.c: fix build on systems without BTRFS_IOC_FILE_EXTENT_SAME. + * btrfs.c (btrfs_ioctl): Skip BTRFS_IOC_FILE_EXTENT_SAME case + if this constant is not defined. + * tests/btrfs.c (btrfs_test_extent_same_ioctl): Skip this part + of the test if BTRFS_IOC_FILE_EXTENT_SAME is not defined. + + tests/btrfs.c: fix printing struct btrfs_ioctl_clone_range_args. + * tests/btrfs.c (btrfs_test_clone_ioctls): Print __u64 members + of struct btrfs_ioctl_clone_range_args using PRI__u64 format. + + tests/btrfs.c: tweak magic constants to make the test more reliable. + * tests/btrfs.c (btrfs_test_sync_ioctls): Change u64val + to 0xdeadbeefbadc0ded. + (btrfs_test_subvol_ioctls): Likewise. Change bad_pointer + to make their lower 32-bit parts closer to -1U. + + btrfs.c: print file descriptors using printfd. + * btrfs.c (btrfs_ioctl): Print struct btrfs_ioctl_send_args.send_fd, + struct btrfs_ioctl_vol_args.fd, and struct btrfs_ioctl_vol_args_v2.fd + using printfd. + * tests/btrfs.c (btrfs_print_vol_args_v2, btrfs_test_subvol_ioctls, + btrfs_test_device_ioctls, btrfs_test_clone_ioctls, + btrfs_test_send_ioctl): Update. + + tests/btrfs.c: do not print errno in case of fs type mismatch. + * tests/btrfs.c (main): Use error_msg_and_fail instead of + perror_msg_and_fail when the fs type of the given directory + is not BTRFS_SUPER_MAGIC. + + tests/btrfs.c: fix indentation. + * tests/btrfs.c: Fix indentation of preprocessor directives + and function prototypes. + + tests/btrfs.c: sort included headers. + * tests/btrfs.c: Sort included headers. + + tests/btrfs.c: do not use alloca. + * tests/btrfs.c: Don't include . + (btrfs_test_subvol_ioctls): Allocate + struct btrfs_ioctl_vol_args_v2.qgroup_inherit using tail_alloc. + + tests/btrfs.c: fix build on systems without or + * tests/btrfs.c: Include "tests.h" first. + Skip the test if [!HAVE_LINUX_BTRFS_H]. Skip parts of the test + that use struct fiemap if [!HAVE_LINUX_FIEMAP_H]. + +2016-05-24 Jeff Mahoney + + tests: add testing for btrfs ioctls. + * tests/btrfs.c: New file. + * tests/btrfs.test: New test. + * tests/btrfs-v.test: Likewise. + * tests/.gitignore: Add btrfs. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add btrfs.test and btrfs-v.test. + +2016-05-24 Dmitry V. Levin + + tests/file_ioctl.c: use tail_alloc. + * tests/file_ioctl.c (main): Allocate struct fiemap using tail_alloc. + + tests/file_ioctl.c: fix build on systems without + * tests/file_ioctl.c: Include "tests.h" first. + Skip the test if [!HAVE_LINUX_FIEMAP_H]. + +2016-05-24 Jeff Mahoney + + tests: add testing for FS_IOC_FIEMAP. + This is limited to FIEMAP. FICLONE* and FIDEDUPERANGE originated in + btrfs and will be tested there. + + * tests/file_ioctl.c: New file. + * tests/file_ioctl.test: New test. + * tests/.gitignore: Add file_ioctl. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add file_ioctl.test. + +2016-05-24 Dmitry V. Levin + + Mpersify btrfs.c. + * btrfs.c: Mpersify 3 arch-specific structures + and corresponding ioctl numbers. + (btrfs_ioctl): Mpersify. + * defs.h (btrfs_ioctl): Remove. + + btrfs.c: use print_array. + * btrfs.c (print_btrfs_data_container_logical_ino, + print_btrfs_data_container_ino_path, print_uint64, + print_btrfs_ioctl_search_header, print_objectid_callback, + print_btrfs_ioctl_space_info): New functions. + (btrfs_print_logical_ino_container, btrfs_print_ino_path_container): + Rewrite printers of struct btrfs_data_container.val array + using print_array. + (btrfs_print_qgroup_inherit): Rewrite printer of + struct btrfs_qgroup_inherit.qgroups array using print_array. + (btrfs_print_tree_search): Rewrite printer of + struct btrfs_ioctl_search_header array using print_array. + (btrfs_ioctl): Rewrite printer of + struct btrfs_ioctl_send_args.clone_sources and + struct btrfs_ioctl_space_args.spaces using print_array. + + btrfs.c: simplify BTRFS_IOC_GET_FSLABEL parser. + * btrfs.c (btrfs_ioctl): Share code of parser of BTRFS_IOC_SET_FSLABEL + with parser of BTRFS_IOC_GET_FSLABEL only on BTRFS_IOC_GET_FSLABEL's + entering. + + btrfs.c: fix BTRFS_IOC_TREE_SEARCH_V2 output. + * btrfs.c (btrfs_ioctl): Fix BTRFS_IOC_TREE_SEARCH_V2 output + in case of EOVERFLOW and failed umove. + + btrfs.c: cleanup use of tcp->auxstr. + * btrfs.c (btrfs_ioctl): Reset tcp->auxstr only if it is set. + + btrfs.c: cleanup struct btrfs_ioctl_get_dev_stats.nr_items check. + * btrfs.c (btrfs_ioctl): Cleanup check of iterator of + btrfs_ioctl_get_dev_stats.values array. + + btrfs.c: do not use BTRFS_SUBVOL_NAME_MAX. + * btrfs.c [BTRFS_SUBVOL_NAME_MAX]: Remove. + (btrfs_ioctl): Use sizeof(struct btrfs_ioctl_vol_args_v2.name) + instead of BTRFS_SUBVOL_NAME_MAX + 1. + + btrfs.c: mark some function arguments as const. + * btrfs.c (btrfs_print_balance_args, btrfs_print_features, + btrfs_print_qgroup_limit, btrfs_print_data_container_header, + btrfs_print_logical_ino_container, btrfs_print_ino_path_container, + btrfs_print_qgroup_inherit): Mark some function arguments as const. + + btrfs.c: use umove instead of umoven. + * btrfs.c: Use umove instead of umoven and umove_or_printaddr + instead of umoven_or_printaddr. + + btrfs.c: remove unused variable. + * btrfs.c (btrfs_ioctl): Remove "ret" variable. + + btrfs.c: use printxval/printxval64 instead of printxvals. + * btrfs.c (btrfs_ioctl): Do not call printxvals directly, + use printxval/printxval64 wrappers that do the right thing. + + btrfs.c: fix indentation. + * btrfs.c: Fix indentation of preprocessor directives and print formats. + + xlat/btrfs_dev_stats_values.in: cleanup. + * xlat/btrfs_dev_stats_values.in: Remove HAVE_DECL_* defines, + use #unconditional instead. + + file_ioctl.c: use print_array. + * file_ioctl.c (file_ioctl): Rewrite printers of + struct file_dedupe_range_info and struct fiemap_extent arrays + using print_array. + + file_ioctl.c: fix indentation. + * file_ioctl.c: Fix indentation of preprocessor directives + and print formats. + +2016-05-24 Dmitry V. Levin + + file_ioctl.c: include instead of + Being a wrapper around , brings + no benefits for this parser. + + * file_ioctl.c: Include instead of . + +2016-05-24 Dmitry V. Levin + + file_ioctl.c: fix build on systems without + * configure.ac (AC_CHECK_HEADERS): Add linux/fiemap.h. + * file_ioctl.c: Do not include and xlat/fiemap_*.h + if [!HAVE_LINUX_FIEMAP_H]. + (file_ioctl): Do not parse FS_IOC_FIEMAP if [!HAVE_LINUX_FIEMAP_H]. + + ioctl.c: fix build. + * ioctl.c (ioctl_decode): Move definition of "ret" variable + to [ALPHA || POWERPC] case. + [ALPHA || POWERPC]: Fix syntax error. + +2016-05-24 Jeff Mahoney + + ioctl: add decoding for FS_IOC_FIEMAP. + * file_ioctl.c: Include , "xlat/fiemap_flags.h", + and "xlat/fiemap_extent_flags.h". + (file_ioctl): Handle FS_IOC_FIEMAP. + * ioctl.c (ioctl_decode): Use file_ioctl for decoding 'f' code ioctls. + +2016-05-24 Dmitry V. Levin + + Add xlat/fiemap_flags.in and xlat/fiemap_extent_flags.in. + * xlat/fiemap_flags.in: New file. + * xlat/fiemap_extent_flags.in: Likewise. + +2016-05-24 Jeff Mahoney + + ioctl: add decoding support for btrfs ioctls. + * btrfs.c: New file. + * file_ioctl.c: Likewise. + * Makefile.am (strace_SOURCES): Add them. + * configure.ac (AC_CHECK_HEADERS): Add linux/btrfs.h. + (AC_CHECK_MEMBERS): Add struct btrfs_ioctl_feature_flags.compat_flags, + struct btrfs_ioctl_fs_info_args.nodesize, + struct btrfs_ioctl_defrag_range_args.start, + and struct btrfs_ioctl_search_args_v2.buf_size. + (AC_CHECK_DECLS): Add BTRFS_COMPRESS_* enums. + * defs.h (btrfs_ioctl, file_ioctl): New prototypes. + * ioctl.c (ioctl_decode) [HAVE_LINUX_BTRFS_H]: Use btrfs_ioctl. + * xlat/btrfs_balance_args.in: New file. + * xlat/btrfs_balance_ctl_cmds.in: Likewise. + * xlat/btrfs_balance_flags.in: Likewise. + * xlat/btrfs_balance_state.in: Likewise. + * xlat/btrfs_compress_types.in: Likewise. + * xlat/btrfs_defrag_flags.in: Likewise. + * xlat/btrfs_dev_replace_cmds.in: Likewise. + * xlat/btrfs_dev_replace_results.in: Likewise. + * xlat/btrfs_dev_replace_state.in: Likewise. + * xlat/btrfs_dev_stats_flags.in: Likewise. + * xlat/btrfs_dev_stats_values.in: Likewise. + * xlat/btrfs_features_compat.in: Likewise. + * xlat/btrfs_features_compat_ro.in: Likewise. + * xlat/btrfs_features_incompat.in: Likewise. + * xlat/btrfs_key_types.in: Likewise. + * xlat/btrfs_qgroup_ctl_cmds.in: Likewise. + * xlat/btrfs_qgroup_inherit_flags.in: Likewise. + * xlat/btrfs_qgroup_limit_flags.in: Likewise. + * xlat/btrfs_qgroup_status_flags.in: Likewise. + * xlat/btrfs_scrub_flags.in: Likewise. + * xlat/btrfs_send_flags.in: Likewise. + * xlat/btrfs_snap_flags_v2.in: Likewise. + * xlat/btrfs_space_info_flags.in: Likewise. + * xlat/btrfs_tree_objectids.in: Likewise. + +2016-05-24 Gleb Fotengauer-Malinovskiy + + x32: update ioctl entries from linux 4.6. + * linux/x32/ioctls_inc0.h: Update from linux v4.6 using ioctls_gen.sh. + +2016-05-24 Dmitry V. Levin + + tests/attach-f-p.c: sleep a bit more to let the tracer catch up. + On noticeably lagging systems, the parent process may invoke its chdir + call before the tracer gets notified about completion of its last child + process. Add extra sleep in the parent process to win the race. + + * tests/attach-f-p.c (main): Change timerid into a static array. + Arm a timer in the parent process and wait for it. + +2016-05-23 Dmitry V. Levin + + tests/attach-p-cmd-cmd.c: fix potential errno clobbering. + * tests/attach-p-cmd-cmd.c (main): Call getpid before chdir. + + tests/net-yy-netlink.c: robustify against libc specific issues. + * tests/net-yy-netlink.c (main): Use getsockname instead of recvmsg + as the latter has notible implementation differences that make + the test unreliable. + + tests/net-yy-netlink.c: robustify against os specific issues. + * tests/net-yy-netlink.c (main): Pass a pointer to a real struct msghdr + as NULL doesn't work well on some systems. + + tests/net-yy-{inet,netlink}.test: cleanup. + * tests/net-yy-inet.test: Do not pass arguments to net-yy-inet + as the latter does not accept them. + * tests/net-yy-netlink.test: Do not pass arguments to net-yy-netlink + as the latter does not accept them. + +2016-05-22 Jeff Mahoney + + tests: define PRI__[dux]64 macros to print __s64 and __u64 values. + Rather than cast every __u64 or __s64 before printing, + define printing helpers for those types directly. + + This complements commit 1f3482bedad505a41caf1d61b3a4e7e09a2f4330. + + * tests/tests.h (PRI__d64, PRI__u64, PRI__x64): New macros. + +2016-05-22 Dmitry V. Levin + + tests: remove manual creation of memory mapping holes. + We used to call tail_alloc(1) to create memory mapping holes around + regular tail_alloc allocations. This is no longer needed since regular + tail_alloc allocations create additional memory mapping holes. + + * tests/clock_adjtime.c (main): Remove creation of memory mapping holes + using tail_alloc(1). + * tests/futimesat.c (main): Likewise. + * tests/get_mempolicy.c (print_nodes, main): Likewise. + * tests/getgroups.c (main): Likewise. + * tests/getresugid.c (main): Likewise. + * tests/ioctl_uffdio.c (main): Likewise. + * tests/ioctl_v4l2.c (main): Likewise. + * tests/move_pages.c (main): Likewise. + * tests/net-icmp_filter.c (main): Likewise. + * tests/ptrace.c (test_peeksiginfo, main): Likewise. + * tests/pwritev.c (main): Likewise. + * tests/set_mempolicy.c (print_nodes): Likewise. + * tests/setgroups.c (main): Likewise. + * tests/umovestr3.c (main): Likewise. + * tests/utimes.c (main): Likewise. + * tests/xattr.c (main): Likewise. + +2016-05-22 Dmitry V. Levin + + tests: make tail_alloc create additional memory mapping holes. + * tests/tail_alloc.c (tail_alloc): Create additional memory mapping + holes before and after the allocated memory. + +2016-05-21 Dmitry V. Levin + + mpers: add support of conditionally compiled printers. + We used to declare and define all printers marked with + MPERS_PRINTER_DECL, including ifdef'ed ones. That approach left us + no way to conditionally compile mpersified printers, which was not + a problem until btrfs ioctls appeared on the horizon. + + With this change, those mpersified printers that are not going + to be compiled are also won't be declared and won't be added to + struct_printers. + + This is implemented by filtering all source files containing + MPERS_PRINTER_DECL markers through CPP. As a nice side effect, this + also lifts an ugly requirement of writing all MPERS_PRINTER_DECL + declarations in a single line. + + * README-mpers: Update description of MPERS_PRINTER_DECL syntax. + * defs.h [IN_MPERS_BOOTSTRAP] (MPERS_PRINTER_DECL): Turn into + a recursive variadic macro. + [!IN_MPERS_BOOTSTRAP] (MPERS_PRINTER_DECL): Turn into a variadic macro. + All callers changed. + * Makefile.am (mpers_preproc_files, mpers_printer_decl_pattern): + New variables. + (CLEANFILES): Add $(mpers_preproc_files). + (%.c.mpers.i): New rule. + (printers.h, %_printer_decls.h, %_printer_defs.h): Use + mpers_preproc_files instead of srcdir_mpers_source_files, + use mpers_printer_decl_pattern. + * .gitignore: Add /*.mpers.i. + +2016-05-20 Dmitry V. Levin + + Remove redundant declaration of v4l2_ioctl. + There is no need to declare mpers printers in defs.h because + they are already declared in printers.h or native_printer_decls.h. + + This complements commit 1e56814f77594a22a74ddee629639eb0bb7edf3a. + + * defs.h (v4l2_ioctl): Remove. + +2016-05-21 Dmitry V. Levin + + Fix one more code pattern that might break gcc strict aliasing rules. + * socketutils.c (receive_responses): Turn static buffer into a union + to avoid breaking of gcc strict aliasing rules. + * tests/netlink_inet_diag.c (check_responses): Likewise. + * tests/netlink_netlink_diag.c (check_responses): Likewise. + * tests/netlink_unix_diag.c (check_responses): Likewise. + +2016-05-21 Fabien Siron + + tests: add check for netlink protocol decoding with -yy option. + * tests/netlink_netlink_diag.c: New file. + * tests/net-yy-netlink.c: New file. + * tests/net-yy-netlink.test: New test. + * tests/.gitignore: Add net-yy-netlink and netlink_netlink_diag + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add net-yy-netlink.test. + +2016-05-18 Fabien Siron + + Add netlink domain sockets support to socketutils. + * linux/netlink_diag.h: New file. + * Makefile.am (EXTRA_DIST): Add it. + * socketutils.c: Include it and "xlat/netlink_protocols.h". + (netlink_send_query, netlink_parse_response, netlink_print): New + functions. + (print_sockaddr_by_inode): Hook up netlink_print. + +2016-05-18 Dmitry V. Levin + + tests/pread64-pwrite64.c: robustify against os specific issues. + Do not assume that pwrite64 syscall fails when only part of the + specified memory buffer is accessible. With some kernels, one + accessible byte at the end of page is enough for pwrite64 syscall + to return 1. + + * tests/pread64-pwrite64.c (main): Tweak the test that can lead + to a partial write. + +2016-05-18 Dmitry V. Levin + + tests/read-write.c: robustify against os specific issues. + Do not assume that write syscall fails when only part of the specified + memory buffer is accessible. With some kernels, one accessible byte + at the end of page is enough for write syscall to return 1. + + * tests/read-write.c (main): Tweak the test that can lead to a partial + write. + +2016-05-18 Dmitry V. Levin + + umovestr3.test: extend test coverage. + * tests/umovestr3.c: Include . + (main): Test with each number between PATH_MAX-1 and 0. + + tests/timer_create.c: robustify against os specific issues. + * tests/timer_create.c (main): Do not assume any specific error code + returned by timer_create, print whatever it is. + + Fix some compilation warnings on older systems. + * print_statfs.c (print_statfs_flags): Define only + for [HAVE_STRUCT_STATFS_F_FLAGS || HAVE_STRUCT_STATFS64_F_FLAGS]. + * tests/inet-cmsg.c (print_origdstaddr): Define only + for [IP_ORIGDSTADDR]. + + Update generic ioctl entries from linux 4.6. + * linux/64/ioctls_inc.h: Update from linux v4.6 using ioctls_gen.sh. + * linux/32/ioctls_inc_align32.h: Likewise. + * linux/32/ioctls_inc_align64.h: Likewise. + * NEWS: Mention this. + + maint: update for linux 4.6. + * maint/ioctls_sym.sh: Update workarounds for linux/kvm.h. + + Update SOL_* constants. + * xlat/socketlayers.in: Add SOL_KCM. + + Update MSG_* constants. + * xlat/msg_flags.in: Add MSG_BATCH. + + Update AF_* constants. + * xlat/addrfams.in: Add AF_KCM. + +2016-05-17 Fei Jie + + tests: add brk.test. + * tests/brk.c: New file. + * tests/brk.test: New test. + * tests/.gitignore: Add brk. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add brk.test. + +2016-05-17 Dmitry V. Levin + + Fix printing of invalid arguments of term ioctls. + * term.c (term_ioctl): Print arguments of TCXONC and TCFLSH ioctls + using printxval_long. + + mips: fix printing of invalid operations argument of sysmips syscall. + * sysmips.c (SYS_FUNC(sysmips)): Print 1st argument of syscall using + printxval_long. + + bfin: fix printing of invalid flags argument of sram_alloc syscall. + * sram_alloc.c (SYS_FUNC(sram_alloc)): Print 2nd argument using + printflags_long. + +2016-05-16 Dmitry V. Levin + + Fix printing of invalid arguments of prctl syscall. + * prctl.c (SYS_FUNC(prctl)): Print 2nd syscall argument + of PR_CAPBSET_DROP, PR_CAPBSET_READ, PR_CAP_AMBIENT, PR_MCE_KILL, + and PR_SET_SECCOMP using printxval_long. + Print 2nd syscall argument of PR_SET_SECUREBITS using printflags_long. + Print 3rd syscall argument of PR_CAP_AMBIENT and PR_MCE_KILL using + printxval_long. + * tests/prctl-seccomp-strict.c (main): Update. + + Fix printing of invalid flags argument of perf_event_open syscall. + * numa.c (SYS_FUNC(perf_event_open)): Print 5th argument of syscall + using printflags_long. + + or1k: fix printing of invalid 1st argument of or1k_atomic syscall. + * or1k_atomic.c (SYS_FUNC(or1k_atomic)): Print 1st argument using + printxval_long. + + Fix printing of invalid flags argument of get_mempolicy syscall. + * numa.c (SYS_FUNC(get_mempolicy)): Print 5th argument of syscall + using printxval_long. + + Fix printing of invalid mode argument of mbind syscall. + * numa.c (SYS_FUNC(mbind)): Print 3rd argument of syscall + using printxval_long. + * tests/mbind.c (main): Update. + + Fix printing of invalid argument of MTDFILEMODE ioctl. + * mtd.c (mtd_ioctl): Print 3rd argument of MTDFILEMODE ioctl + using printflags_long. + + Fix printing of invalid flags argument of mount syscall. + * mount.c (SYS_FUNC(mount)): Print 1st argument using printflags_long. + + Fix printing of invalid arguments of memory mapping related syscalls. + * mem.c (print_mmap): Print 3rd and 4th arguments of syscall + using printflags_long. + (SYS_FUNC(mprotect)): Print 3rd argument of syscall using + printflags_long. + (SYS_FUNC(mremap)): Print 4th argument of syscall using printflags_long. + (SYS_FUNC(remap_file_pages)): Print 3rd and 4th arguments of syscall + using printflags_long. + * tests/remap_file_pages.c (main): Update. + + Fix printing of invalid flags argument of kexec_load and kexec_file_load + * kexec.c (SYS_FUNC(kexec_load), SYS_FUNC(kexec_file_load)): Print + flags argument using printflags_long. + + Fix printing of invalid 3rd argument of fcntl/fcntl64 syscall. + * fcntl.c (print_fcntl): Print 3rd argument of F_NOTIFY, F_SETLEASE, and + F_ADD_SEALS operations using printflags_long. + + Fix printing of invalid flags argument of unshare syscall. + * clone.c (SYS_FUNC(unshare)): Print 1st argument using printflags_long. + + Introduce printflags_long and printxval_long. + * defs.h (printflags_long, printxval_long): New static inline functions. + + Fix printing of invalid struct xfs_dqblk.d_flags. + * quota.c (decode_cmd_data): Explicitly cast struct xfs_dqblk.d_flags + to uint8_t to avoid potential sign-extension bug when printing + invalid struct xfs_dqblk.d_flags. + + Fix printing of invalid struct ubi_mkvol_req.vol_type. + * mtd.c (ubi_ioctl): Explicitly cast struct ubi_mkvol_req.vol_type + to unsigned short to avoid potential sign-extension bug when printing + invalid struct ubi_mkvol_req.vol_type. + +2016-05-16 Dmitry V. Levin + + Fix decoding of prctl/arch_prctl operation argument. + Consistently treat operation argument of prctl/arch_prctl syscalls + as int to match the kernel behaviour. + + * prctl.c (SYS_FUNC(prctl), SYS_FUNC(arch_prctl)): Assign 1st argument + of syscalls to a variable of type unsigned int and use it in all + subsequent checks and lookups. + +2016-05-16 Dmitry V. Levin + + Fix printing of struct sched_attr.sched_flags. + * sched.c (print_sched_attr): Print sched_flags using printflags64. + + Fix printing of struct statfs.f_flags. + * print_statfs.c (print_statfs_flags): Print flags using printflags64. + + Fix printing of invalid struct ifreq.ifr_flags. + * sock.c (print_ifreq): Explicitly cast struct ifreq.ifr_flags + to unsigned short to avoid potential sign-extension bug when printing + invalid struct ifreq.ifr_flags. + + Fix printing of invalid struct pollfd.events. + * poll.c (print_pollfd): Explicitly cast struct pollfd.events + to unsigned short to avoid potential sign-extension bug when printing + invalid struct pollfd.events. + + Fix printing of invalid struct sembuf.sem_flg. + * ipc_sem.c (print_sembuf): Explicitly cast struct sembuf.sem_flg + to unsigned short to avoid potential sign-extension bug when printing + invalid struct sembuf.sem_flg. + + Fix printing of invalid l_type and l_whence in fcntl/fcntl64 syscalls. + * fcntl.c (print_struct_flock64): Explicitly cast l_type and l_whence + fields to unsigned short to avoid potential sign-extension bug when + printing invalid l_type or l_whence fields. + + Fix printing of fanotify_mark mask argument. + * fanotify.c (SYS_FUNC(fanotify_mark)): Print mask using printflags64. + +2016-05-16 Dmitry V. Levin + + Fix decoding of epoll_ctl operation argument. + Consistently treat operation argument of epoll_ctl syscall as int + to match the kernel behaviour. + + * epoll.c (SYS_FUNC(epoll_ctl)): Assign 2nd argument of syscall + to a variable of type unsigned int and use it in all subsequent + checks and lookups. + * tests/epoll_ctl.c (invoke_syscall): New function. + (main): Use it. + +2016-05-16 Dmitry V. Levin + + Fix printing of invalid d_type in getdents syscall. + * dirent.c (SYS_FUNC(getdents)): Treat d_type as unsigned char to avoid + potential sign-extension bug when printing invalid d_type. + + bfin: fix decoding of cacheflush syscall. + * cacheflush.c (SYS_FUNC(cacheflush)): Print 2nd argument + using %lu format. Print 3rd argument as flags. + + Fix decoding of BPF_MAP_UPDATE_ELEM flags. + * bpf.c (bpf_map_update_elem): Print attr.flags using printxval64. + +2016-05-16 Dmitry V. Levin + + Fix decoding of fcntl/fcntl64 operation argument. + Consistently treat operation argument of fcntl/fcntl64 syscalls as int + to match the kernel behaviour. + + * fcntl.c (print_fcntl, SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): Assign + 2nd argument of syscall to a variable of type unsigned int + and use it in all subsequent checks and lookups. + * tests/struct_flock.c (invoke_test_syscall): New function. + (test_flock_einval, test_flock): Use it. + * tests/fcntl.c (test_flock64_einval): Use it. + * tests/fcntl64.c (test_flock64_einval, test_flock64): Use it. + +2016-05-15 Dmitry V. Levin + + Rename sprintflags64 to sprintflags. + * defs.h (sprintflags): Remove. + (sprintflags64): Rename to sprintflags. + * util.c (sprintflags64): Rename to sprintflags. + + Prepare for transition from sprintflags64 to sprintflags. + * fcntl.c (print_fcntl): Cast 3rd argument of sprintflags + to unsigned long. + * membarrier.c (SYS_FUNC(membarrier)): Likewise. + * prctl.c (SYS_FUNC(prctl)): Likewise. + * poll.c (decode_poll_exiting): Cast 3rd argument of sprintflags + to unsigned short. + +2016-05-14 Dmitry V. Levin + + Rename xlookup64 to xlookup. + * defs.h (xlookup): Remove. + (xlookup64): Rename to xlookup. + * util.c (xlookup64): Rename to xlookup. + + Prepare for transition from xlookup64 to xlookup. + * fcntl.c (print_fcntl, SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): + Cast 2nd argument of xlookup to unsigned long. + * prctl.c (SYS_FUNC(prctl)): Likewise. + * sched.c (SYS_FUNC(sched_getscheduler)): Likewise. + * time.c (do_adjtimex): Likewise. + * ioprio.c (sprint_ioprio): Change type of the argument + and local variables from int to unsigned int. + * keyctl.c (print_keyring_serial_number): Cast 2nd argument + of xlookup to unsigned int. + * net.c (tprint_sock_type): Change type of the argument to unsigned int. + * printmode.c (sprintmode): Likewise. + * printsiginfo.c (printsigval): Change type of si_code argument + to unsigned int. + +2016-05-14 Dmitry V. Levin + + v4l2: fix build with old kernel headers. + Prior to v2.6.25-rc3, didn't include all + required headers, resulting to omission of V4L2_* constants. + + This issue doesn't arise in v4l2.c and tests/ioctl_v4l2.c files + because they already include all necessary headers themselves. + + * configure.ac (AC_CHECK_DECLS): Include , , + and before . + +2016-05-13 Dmitry V. Levin + + configure.ac: do not check for sys/ioctl.h and ioctls.h. + Since sys/ioctl.h is included unconditionally when needed + and ioctls.h doesn't exist, these checks are redundant. + + * configure.ac (AC_CHECK_HEADERS): Remove ioctls.h and sys/ioctl.h. + +2016-05-13 Dmitry V. Levin + + sock.c: include instead of or + Include for on alpha, sh, and sh64 + architectures because their use _IOR and _IOW macros + but don't include anything that would define these macros. + + Being a wrapper around , brings + no benefits in this case. simply doesn't exist. + + * sock.c [ALPHA || SH || SH64]: Include + instead of or . + +2016-05-13 Dmitry V. Levin + + v4l2: include instead of + Being a wrapper around , brings + no benefits for parser of VIDIOC_* ioctls. + + * v4l2.c: Include instead of . + +2016-05-13 Dmitry V. Levin + + printsiginfo: remove "verbose" argument. + Remove erroneous use of verbose(tcp) as a printing limit + for already fetched members of siginfo_t structure. + + * printsiginfo.h (printsiginfo): Remove boolean argument. + * printsiginfo.c (printsigval): Remove boolean argument, print + si_int and si_ptr members unconditionally. All callers changed. + (print_si_info): Remove boolean argument, print si_utime and si_stime + members unconditionally. All callers changed. + (printsiginfo): Remove boolean argument. All callers changed. + +2016-05-13 Dmitry V. Levin + + tests/ptrace.c: tweak magic constants to make the test more reliable. + * tests/ptrace.c (main): Change bad_request and bad_data to make they + lower 32-bit parts closer to -1U. + +2016-05-13 Dmitry V. Levin + + tests/ioctl_v4l2.c: fix build on older systems. + Fix build on systems without HAVE_DECL_V4L2_CTRL_TYPE_STRING or + V4L2_CTRL_CLASS_CAMERA. + + * tests/ioctl_v4l2.c (main) [VIDIOC_S_EXT_CTRLS]: Disable part of the + test if [!HAVE_DECL_V4L2_CTRL_TYPE_STRING]. + Replace V4L2_CTRL_CLASS_CAMERA with V4L2_CTRL_CLASS_USER. + +2016-05-13 Dmitry V. Levin + + Do not use htole32 function. + htole32 function is not portable enough. + + * v4l2.c (print_pixelformat): Rewrite initialization of pixel format + union without using of htole32. + * tests/ioctl_v4l2.c (main): Likewise. + +2016-05-13 Dmitry V. Levin + + tests/ioctl_v4l2.c: fix typo. + * tests/ioctl_v4l2.c (main) + [!HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE]: Fix typo in expected + output string. + + tests: check decoding of ptrace syscall. + * tests/ptrace.c: New file. + * tests/ptrace.test: New test. + * tests/.gitignore: Add ptrace. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ptrace. + +2016-05-13 Dmitry V. Levin + + ptrace: decode data argument of PTRACE_PEEKSIGINFO request. + The data argument of PTRACE_PEEKSIGINFO request is a pointer + to siginfo_t array. + + * printsiginfo.c (print_siginfo_t): New function. + (print_siginfo_array): New mpers printer. + * process.c (SYS_FUNC(ptrace)): Print data argument of + PTRACE_PEEKSIGINFO request using print_siginfo_array. + +2016-05-13 Dmitry V. Levin + + ptrace: decode data argument of PTRACE_SECCOMP_GET_FILTER request. + * process.c (SYS_FUNC(ptrace)): Print data argument of + PTRACE_SECCOMP_GET_FILTER request on exiting using print_seccomp_fprog. + + ptrace: decode argument of PTRACE_GETEVENTMSG request. + * process.c (SYS_FUNC(ptrace)): Print data argument of + PTRACE_GETEVENTMSG request on exiting using printnum_ulong. + + ptrace: decode arguments of PTRACE_[GS]ETSIGMASK requests. + * process.c (SYS_FUNC(ptrace)): Print arguments of PTRACE_GETSIGMASK + and PTRACE_SETSIGMASK requests using print_sigset_addr_len. + + ptrace: return RVAL_DECODED for requests decoded on entering. + * process.c (SYS_FUNC(ptrace)): Return RVAL_DECODED on entering for all + ptrace requests except those that are partially decoded in exiting, + +2016-05-12 Dmitry V. Levin + + ptrace: print PTRACE_O_* flags using printflags64. + As flags argument has a long integer type, print it using printflags64 + because printflags takes unsigned int argument. + + * process.c (SYS_FUNC(ptrace)): Print PTRACE_O_* flags + using printflags64. + +2016-05-12 Dmitry V. Levin + + ptrace: print data argument of PTRACE_SEIZE et al requests as flags. + * process.c (SYS_FUNC(ptrace)): Print data argument of + PTRACE_SEIZE and PTRACE_OLDSETOPTIONS as PTRACE_O_* flags. + + ptrace: print data argument of PTRACE_SINGLEBLOCK et al requests as signo + * process.c (SYS_FUNC(ptrace)): Print data argument of + PTRACE_SINGLEBLOCK, PTRACE_SYSEMU, and PTRACE_SYSEMU_SINGLESTEP requests + as a signal number. + +2016-05-12 Dmitry V. Levin + + ptrace: decode addr argument of PTRACE_PEEKSIGINFO request. + The addr argument of PTRACE_PEEKSIGINFO request is a pointer to + a struct ptrace_peeksiginfo_args. + + * process.c: Include "xlat/ptrace_peeksiginfo_flags.h". + (SYS_FUNC(ptrace)): Print addr argument of PTRACE_PEEKSIGINFO request + as a struct ptrace_peeksiginfo_args. + * xlat/ptrace_peeksiginfo_flags.in: New file. + +2016-05-12 Dmitry V. Levin + + ptrace: fix printing addr argument of PTRACE_GETSIGMASK et al requests. + For PTRACE_GETSIGMASK and PTRACE_SETSIGMASK requests, addr argument + contains the size of the buffer pointed to by data argument. + For PTRACE_SECCOMP_GET_FILTER request, addr argument contains + an offset counter. + + * process.c (SYS_FUNC(ptrace)): Print addr argument of + PTRACE_GETSIGMASK, PTRACE_SETSIGMASK, and PTRACE_SECCOMP_GET_FILTER + requests using %lu format. + +2016-05-12 Dmitry V. Levin + + ptrace: do not print data argument of some requests on sparc. + On sparc, kernel ignores data argument of PTRACE_GETREGS, + PTRACE_SETREGS, PTRACE_GETFPREGS, and PTRACE_SETFPREGS requests. + + * process.c (SYS_FUNC(ptrace)) [SPARC || SPARC64]: Return RVAL_DECODED + right after printing addr argument if request is one of PTRACE_GETREGS, + PTRACE_SETREGS, PTRACE_GETFPREGS, or PTRACE_SETFPREGS. + +2016-05-12 Dmitry V. Levin + + ptrace: do not print addr and data arguments of PTRACE_ATTACH-like requests + As kernel ignores addr and data arguments of PTRACE_ATTACH, + PTRACE_INTERRUPT, PTRACE_KILL, and PTRACE_LISTEN request, + we do not print them either. + + * process.c (SYS_FUNC(ptrace)): After printing pid argument, return + RVAL_DECODED if request is one of PTRACE_ATTACH, PTRACE_INTERRUPT, + PTRACE_KILL, or PTRACE_LISTEN. + +2016-05-12 Dmitry V. Levin + + ptrace: do not print arguments of PTRACE_TRACEME request. + As kernel ignores arguments of PTRACE_TRACEME request, + we do not print them either. + + * process.c (SYS_FUNC(ptrace)): If request is PTRACE_TRACEME, + return early with RVAL_DECODED. + +2016-05-12 Dmitry V. Levin + + ptrace: print request using printxval64. + As first argument of ptrace syscall has a long integer type, print + it using printxval64 because printxval takes unsigned int argument. + + * process.c (SYS_FUNC(ptrace)): Change type of "request" variable + from "long" to "unsigned long", print it using printxval64 instead + of printxval. + +2016-05-12 Dmitry V. Levin + + Do not sign-extend siginfo_t.si_syscall. + * printsiginfo.c (print_si_info): Explicitly cast si_syscall member + of siginfo_t that has type "int" to "unsigned int", to avoid sign + extension when passed to syscall_name function. + + Export print_seccomp_fprog for further use in parser of ptrace syscall. + * defs.h (print_seccomp_fprog): New prototype. + * seccomp.c (print_seccomp_fprog): Remove "static" keyword. + Move printing of struct seccomp_fprog fields ... + (print_seccomp_filter): ... here. + +2016-05-11 Fei Jie + + tests: add munlockall.test. + * tests/munlockall.c: New file. + * tests/munlockall.test: New test. + * tests/.gitignore: Add munlockall. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add munlockall.test. + + tests: add link.test. + * tests/link.c: New file. + * tests/link.test: New test. + * tests/.gitignore: Add link. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add link.test. + +2016-05-11 Dmitry V. Levin + + tests: check decoding and dumping of preadv2 and pwritev2 syscalls. + * tests/preadv2-pwritev2.c: New file. + * tests/preadv2-pwritev2.test: New test. + * tests/.gitignore: Add preadv2-pwritev2. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add preadv2-pwritev2. + + Implement decoding of preadv2 and pwritev2 syscalls. + * io.c: Include "xlat/rwf_flags.h". + (do_preadv, do_pwritev, SYS_FUNC(preadv2), SYS_FUNC(pwritev2)): + New functions. + (SYS_FUNC(preadv)): Use do_preadv. + (SYS_FUNC(pwritev)): Use do_pwritev. + * linux/32/syscallent.h (preadv2, pwritev2): New entries. + * linux/64/syscallent.h: Likewise. + * linux/arm/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-n64.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/powerpc64/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * syscall.c (dumpio): Handle SEN_preadv2 and SEN_pwritev2. + * xlat/rwf_flags.in: New file. + * NEWS: Mention parsers of new syscalls. + +2016-05-10 Dmitry V. Levin + + tests: extend test coverage of xattr family syscalls. + * tests/xattr.c: Check decoding of all xattr family syscalls. + * tests/xattr.test: Use run_strace_match_diff. + * tests/xattr.expected: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove it. + + tests: add print_quoted_memory function to libtests. + * tests/print_quoted_string.c (print_quoted_memory): New function. + (print_quoted_string): Use it. + * tests/tests.h (print_quoted_memory): New prototype. + + Fix corner cases of xattr family syscalls decoding. + * xattr.c (print_xattr_val): Do not take insize into account, print it + as unsigned long. + Do not decode xattr values of size larger than XATTR_SIZE_MAX. + Use static buffer for fetching xattr values. + (print_xattr_list): Do not decode string when size is zero. + +2016-05-10 Dr. David Alan Gilbert + + userfaultfd: Add ioctl tests. + * tests/ioctl_uffdio.c: New file. + * tests/ioctl_uffdio.test: New test. + * tests/.gitignore: Add ioctl_uffdio. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_uffdio.test. + +2016-05-10 Dr. David Alan Gilbert + + Decode UFFDIO_* ioctls. + Decode the ioctls associated with the userfaultfd fd. + Note that they tend to read from and also return result in it's data + structure. + + * configure.ac (AC_CHECK_HEADERS): Add linux/userfaultfd.h. + * userfaultfd.c [HAVE_LINUX_USERFAULTFD_H]: Add ioctl decoder. + * defs.h (uffdio_ioctl): New prototype. + * ioctl.c (ioctl_decode) [HAVE_LINUX_USERFAULTFD_H]: Wire in + uffdio_ioctl. + * xlat/uffd_*.in: Create flag xlat for all the IOCTLs. + +2016-05-10 Dmitry V. Levin + + Update AX_CODE_COVERAGE. + * m4/ax_code_coverage.m4: Update to serial 16. + * Makefile.am (CODE_COVERAGE_LCOV_OPTIONS): Remove. + (CODE_COVERAGE_GENHTML_OPTIONS): Update, add prefix. + (CODE_COVERAGE_BRANCH_COVERAGE): Set to 1. + + strace-ff.test: fix race condition. + * tests/strace-ff.test: Wait for completion of PR_SET_PTRACER command. + + tests/epoll_pwait.c: fix for x32. + * tests/epoll_pwait.c (main): Explicitly cast last syscall argument + to kernel_ulong_t. + + strace-S.test: check "-S name" + * tests/strace-S.test: Add a check for "-c -S name" output. + + Fix NULL dereference in "-S name" when syscall table has holes. + * count.c (syscall_cmp): Do not pass NULL to strcmp. + + strace-S.test: cleanup. + * tests/strace-S.test: Rewrite using sed. + +2016-05-09 Fei Jie + + tests: add strace-S.test. + * tests/strace-S.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + +2016-05-09 Dmitry V. Levin + + strace-ff.test: check that -ff does not create unexpected output files. + * tests/strace-ff.expected: New file. + * tests/Makefile.am (EXTRA_DIST): Add it. + * tests/strace-ff.test: Use it. Check that no other output files + have been created. + +2016-05-09 Fei Jie + + tests: add strace-ff.test. + * tests/strace-ff.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + +2016-05-09 Dmitry V. Levin + + strace-V.test: cleanup. + * tests/strace-V.test: Move config.h parser to a function. + Rename $OUT to $EXP, swap arguments passed to match_diff. + +2016-05-09 Fei Jie + + tests: add strace-V.test. + * tests/strace-V.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + +2016-05-09 Dmitry V. Levin + + tests: check decoding of epoll_pwait syscall. + * tests/epoll_pwait.c: New file. + * tests/epoll_pwait.test: New test. + * tests/.gitignore: Add epoll_pwait. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add epoll_pwait.test. + +2016-05-09 Dmitry V. Levin + + Assume that sys/epoll.h exists. + This header file was added in glibc-2.3.2, + so it's safe to assume its availability. + + * configure.ac (AC_CHECK_HEADERS): Remove sys/epoll.h. + * epoll.c: Include unconditionally. + Compile [HAVE_SYS_EPOLL_H] code unconditionally. + * tests/epoll_ctl.c: Do not check for HAVE_SYS_EPOLL_H. + * tests/epoll_wait.c: Likewise. + +2016-05-08 Fabien Siron + + Factorize send_query functions. + * socketutils.c (send_query): New function. + (inet_send_query, unix_send_query): Use it. + +2016-05-08 Dmitry V. Levin + + tests: relax timings. + Allow nanosleep(2) to spend 10% more time to make the test suite + more reliable on slow systems. + + * tests/count.test: Treat 1.1 seconds as valid output. + * tests/strace-T.expected: Likewise. + * tests/strace-r.expected: Likewise. + +2016-05-07 Dmitry V. Levin + + tests/attach-f-p.c: increase timeouts. + Increase timeouts to make the test more reliable on slow systems. + + * tests/attach-f-p.c (its): Increase timeouts to 1, 2, and 3 seconds, + respectively. + +2016-05-07 Dmitry V. Levin + + Remove unused functions. + * defs.h (umove_ulong_or_printaddr, umove_ulong_array_or_printaddr): + Remove. + * util.c (umove_ulong_or_printaddr, umove_ulong_array_or_printaddr): + Likewise. + + v4l2.c: use print_array function. + * v4l2.c (print_v4l2_ext_control, umoven_or_printaddr_ignore_syserror): + New functions. + (print_v4l2_ext_controls): Use them via print_array. + + uid.c: use print_array function. + * uid.c (print_gid): New function. + (print_groups): Use it via print_array. + + seccomp.c: use print_array function. + * seccomp.c (decode_filter, decode_seccomp_fprog): Remove. + (print_bpf_filter): New function. + (print_seccomp_fprog): Use it via print_array. + * tests/seccomp-filter-v.c (main): Update. + + scsi.c: use print_array function. + * scsi.c (print_uchar): New function. + (print_sg_io_buffer): Use it via print_array. + + poll.c: use print_array function. + * poll.c (print_pollfd): Change for use as print_array callback. + (decode_poll_entering): Use print_array. + * tests/poll.c: Update. + * tests/poll.test: Update. + + numa.c: use print_array function. + * numa.c (print_node): New function. + (print_nodemask): Use it via print_array. + (print_page_array, print_int_array): Remove. + (print_addr): New function. + (print_status, print_int): Change for use as print_array callback. + (SYS_FUNC(move_pages)): Use print_addr, print_int, and print_status + via print_array. + * tests/move_pages.c: Update. + * tests/set_mempolicy.c: Likewise. + * tests/set_mempolicy.test: Likewise. + + mem.c: use print_array function. + * mem.c [POWERPC] (print_protmap_entry): New function. + [POWERPC] (SYS_FUNC(subpage_prot)): Use it via print_array. + + kexec.c: use print_array function. + * kexec.c (print_seg): Change for use as print_array callback. + (print_kexec_segments): Use print_array. + + ipc_sem.c: use print_array function. + * ipc_sem.c (tprint_sembuf): Rename to print_sembuf, change signature + for use as print_array callback. + (tprint_sembuf_array): Use print_array. + + io.c: use print_array function. + * io.c (print_iovec_config): New structure. + (print_iovec): New function. + (tprint_iov_upto): Use print_array. + * tests/preadv.c (main): Update. + * tests/pwritev.c (print_iovec, main): Likewise. + + epoll.c: use print_array function. + * epoll.c (print_epoll_event): Change signature for use as print_array + callback, all users updated. + (print_epoll_event_array): Remove. + (epoll_wait_common): Change to use print_array instead + of print_epoll_event_array. + + aio.c: use print_array function. + * aio.c (print_iocbp): New function. + (SYS_FUNC(io_submit)): Use it via print_array. Use widen_to_long + to process long int argument. + (print_io_event): Change to print struct io_event fetched elsewhere. + (SYS_FUNC(io_cancel)): Update use of print_io_event. + (SYS_FUNC(io_getevents)): Use print_io_event via print_array. + Use widen_to_long to print long int arguments. + * tests/aio.c (main): Check decoding of io_submit with negative "nr". + + Introduce print_array function for consistent decoding of arrays. + * defs.h (print_array): New prototype. + * util.c (print_array): New function. + +2016-05-06 Dmitry V. Levin + + Fix corner cases of ICMP_FILTER decoding. + * net.c (print_icmp_filter): Print icmp_filter for any positive length. + * tests/net-icmp_filter.c: New file. + * tests/net-icmp_filter.test: New test. + * tests/.gitignore: Add net-icmp_filter. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add net-icmp_filter.test. + +2016-05-05 Dmitry V. Levin + + xlat: do not strip "1<<" prefix from xlat strings. + * xlat/gen.sh (cond_xlat, gen_header): Do not strip "1<<" prefix + from xlat strings to fix incorrect output. + * tests/caps.awk: Update. + + Reported-by: Dr. David Alan Gilbert + +2016-05-05 Dmitry V. Levin + + tests/xstatfsx.c: fix mips o32 support. + mips o32 differs from all other 32-bit architectures by defining + __kernel_fsid_t structure as an array of long ints. + + * tests/xstatfsx.c (print_statfs): Explicitly cast elements + of PRINT_F_FSID array to unsigned int. + +2016-05-05 Dmitry V. Levin + + Mpersify VIDIOC_* ioctl parser. + * v4l2.c: Mpersify arch-specific structures. + (v4l2_ioctl): Mpersify. + * tests/ioctl_v4l2.c: New file. + * tests/ioctl_v4l2.test: New test. + * tests/.gitignore: Add ioctl_v4l2. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioctl_v4l2.test. + +2016-05-05 Dmitry V. Levin + + Mpersify ioctl macros. + As values of some ioctl macros differ between personalities, these + personality specific ioctl macros should be properly defined for + mpersified code. Implement this by redefining personality specific + ioctl macros from ioctlent*.h for each file that includes MPERS_DEFS. + + * Makefile.am (ioctl_macros_h): New variable. + (ioctl_macros%.h): New rule. + (BUILT_SOURCES, CLEANFILES): Add $(ioctl_macros_h). + (m%_type_defs.h): #include MPERS_$(mpers_PREFIX)IOCTL_MACROS. + * defs.h [HAVE_M32_MPERS] (MPERS_m32_IOCTL_MACROS): New macro. + [HAVE_MX32_MPERS] (MPERS_mx32_IOCTL_MACROS): Likewise. + + Acked-by: Elvira Khabirova + +2016-05-05 Dmitry V. Levin + + Fix decoding of VIDIOC_* ioctls. + * v4l2.c: Fix numerous bugs in decoding of VIDIOC_* ioctls. + * tests/ioctl.c (main): Update. + +2016-05-05 Dmitry V. Levin + + nsyscalls.test: add mips o32 support. + Out-of-range syscalls looks differently on mips o32. + + * tests/nsyscalls.c (main): Handle LINUX_MIPSO32. + * tests/nsyscalls.test: Trace syscall called "syscall" on mips. + +2016-04-29 Dmitry V. Levin + + Remove initialization of big holes in syscallent.h files. + There is no need to explicitly initialize big holes after conversion + of syscallent.h files to use designated initializers. For architectures + that have some data at the end of syscallent.h this initialization of + big holes is no-op, for others it just inflates the table unnecessarily. + + * linux/arc/syscallent.h: Remove initialization of arch specific block + at the end of table. + * linux/metag/syscallent.h: Likewise. + * linux/nios2/syscallent.h: Likewise. + * linux/or1k/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/tile/syscallent1.h: Likewise. + * linux/arm/syscallent.h: Remove explicit initialization of a big hole + before socket subcalls. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/mips/syscallent-n32.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/powerpc64/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/mips/syscallent-compat.h: Remove explicit initialization + of big holes between different mips ABIs. + * linux/mips/syscallent-n64.h: Remove explicit initialization + of big holes before socket subcalls and between different mips ABIs. + * linux/mips/syscallent-o32.h: Likewise. + +2016-04-29 Dmitry V. Levin + + xlat: make "1< + +2016-04-29 Dmitry V. Levin + + Fix typo in XLAT_TYPE_PAIR. + * xlat.h (XLAT_TYPE_PAIR): Take "type" parameter. + + Reported-by: Dr. David Alan Gilbert + +2016-04-29 Dmitry V. Levin + + Fix decoding of move_pages syscall. + * numa.c (print_page_array, print_status, print_int, print_int_array): + New functions. + (SYS_FUNC(move_pages)): Rewrite using these functions. + * tests/move_pages.c: New file. + * tests/move_pages.test: New test. + * tests/.gitignore: Add move_pages. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add move_pages.test. + + tests: check decoding of mbind syscall. + * tests/mbind.c: New file. + * tests/mbind.test: New test. + * tests/.gitignore: Add mbind. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mbind.test. + +2016-04-29 Jeff Mahoney + + Change type of struct xlat.val to uint64_t. + Some ioctls have flags fields that are 64-bit. A 32-bit val means + these flags will never be matched or printed. + + * xlat.h: Include . + (struct xlat): Change type of val to uint64_t. + +2016-04-29 Dmitry V. Levin + + xlat: extend syntax with #val_type directive. + When #val_type directive is encountered, gen.sh starts using + XLAT_TYPE/XLAT_TYPE_PAIR macros instead of XLAT/XLAT_PAIR, + with #val_type's argument as a type. + + For example, "#val_type uint64_t" means values of type uint64_t. + + * xlat/gen.sh (gen_header, print_xlat, print_xlat_pair): + Add val_type support. + +2016-04-29 Dmitry V. Levin + + xlat/gen.sh: prepare for adding #val_type directive support. + This is essentially a no-op change that makes the following change + easier to read. + + * xlat/gen.sh (print_xlat, print_xlat_pair): New functions. + (cond_xlat, gen_header): Use them. + +2016-04-29 Dmitry V. Levin + + Introduce XLAT_TYPE and XLAT_TYPE_PAIR macros. + * xlat.h (XLAT_TYPE): New macro, similar to XLAT but casts + to the specified type instead of unsigned int. + (XLAT_TYPE_PAIR): New macro, similar to XLAT_PAIR but casts + to the specified type instead of unsigned int. + +2016-04-29 Dmitry V. Levin + + xlat: generate xlat pairs using new XLAT_PAIR macro. + Before this change there were two forms of xlat entries: those that use XLAT + or XLAT_END macros, and others verbatim entries. This change converts + the latter to use new XLAT_PAIR macro. + + This is necessary for the upcoming change of xlat.val type. + + * xlat.h (XLAT_PAIR): New macro. + * xlat/gen.sh (cond_xlat, gen_header): Use it. + +2016-04-29 Dmitry V. Levin + + Explicitly cast argument of XLAT macro to unsigned int. + This is necessary for the upcoming change of xlat.val type. + + * xlat.h (XLAT): Cast the argument to unsigned int. + +2016-04-29 Dmitry V. Levin + + Change type of {s,t}print_open_modes's argument to unsigned. + As "flags" argument of sprint_open_modes and tprint_open_modes is + involved only in bit operations, change its type to unsigned. + + * defs.h.c (sprint_open_modes, tprint_open_modes): Change type + to unsigned int. + * open.c (sprint_open_modes, tprint_open_modes): Likewise. + +2016-04-28 Dmitry V. Levin + + tests/remap_file_pages.c: fix for the upcoming change of xlat.val type. + The "flags" argument of remap_file_page syscall has type "unsigned + long", so it is not correct to load most significant bits with garbage + ans assume they are going to be ignored. + + * tests/remap_file_pages.c (main): Remove artificial garbage from flags. + +2016-04-28 Dmitry V. Levin + + Introduce printflags64 function. + This is necessary for the upcoming change of xlat.val type. + + * defs.h (printflags): Rename to printflags64, change type of integer + argument to uint64_t. + (printflags): New static inline function. + * util.c (printflags): Rename to printflags64, change type of integer + argument to uint64_t. Print it using PRIx64 format. + Based on patch by Jeff Mahoney . + +2016-04-28 Dmitry V. Levin + + Introduce sprintflags64 function. + This is necessary for the upcoming change of xlat.val type. + + * defs.h (sprintflags): Rename to sprintflags64, change type of integer + argument to uint64_t. + (sprintflags): New static inline function. + * util.c (sprintflags): Rename to sprintflags64, change type of integer + argument to uint64_t. Print it using PRIx64 format. + Based on patch by Jeff Mahoney . + +2016-04-28 Dmitry V. Levin + + printxvals: change type of integer argument to uint64_t. + This is necessary for the upcoming change of xlat.val type. + All users of printxvals are already prepared for this change. + + * defs.h (printxvals): Change type of integer argument to uint64_t. + * util.c (printxvals): Likewise. Print it using PRIx64 format. + Patch by Jeff Mahoney . + +2016-04-28 Dmitry V. Levin + + xlat_search: change type of integer argument to uint64_t. + This is necessary for the upcoming change of xlat.val type. + All users of addflags are already prepared for this change. + + * defs.h (xlat_search): Change type of integer argument to uint64_t. + * util.c (xlat_search): Likewise. Pass it by pointer. + (xlat_bsearch_compare): Treat first argument as a pointer. + Patch by Jeff Mahoney . + +2016-04-28 Dmitry V. Levin + + Introduce xlookup64 function. + This is necessary for the upcoming change of xlat.val type. + + * defs.h (xlookup): Rename to xlookup64, change type of integer argument + to uint64_t. + (xlookup): New static inline function. + * util.c (xlookup): Rename to xlookup64, change type of integer + argument to uint64_t. + Based on patch by Jeff Mahoney . + +2016-04-28 Dmitry V. Levin + + addflags: change type of integer argument to uint64_t. + This is necessary for the upcoming change of xlat.val type. + All users of addflags are already prepared for this change. + + * defs.h (addflags): Change type of integer argument to uint64_t. + * util.c (addflags): Likewise. Print it using PRIx64 format. + Based on patch by Jeff Mahoney . + +2016-04-28 Dmitry V. Levin + + Introduce printxval64 wrapper. + This is necessary for the upcoming change of xlat.val type. + + * defs.h (printxval64): New static inline function. + +2016-04-28 Dmitry V. Levin + + Turn printxval macro into a static inline function. + This is necessary for the upcoming change of xlat.val type. + + * defs.h (printxval): Change to static inline function. + +2016-04-28 Dmitry V. Levin + + tests: check decoding of migrate_pages syscall. + * tests/migrate_pages.c: New file. + * tests/migrate_pages.test: New test. + * tests/.gitignore: Add migrate_pages. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add migrate_pages.test. + + Fix decoding of migrate_pages syscall. + * numa.c (SYS_FUNC(migrate_pages)): Print syscall arguments + in the right order. + + tests: check decoding of set_mempolicy syscall. + * tests/set_mempolicy.c: New file. + * tests/set_mempolicy.test: New test. + * tests/.gitignore: Add set_mempolicy. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add set_mempolicy.test. + + tests: check decoding of get_mempolicy syscall. + * tests/get_mempolicy.c: New file. + * tests/get_mempolicy.test: New test. + * tests/.gitignore: Add get_mempolicy. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add get_mempolicy.test. + + numa: fix decoding of nodemask arrays. + * numa.c (get_nodes): Rewrite an rename to print_nodemask. + All callers updated. + (SYS_FUNC(mbind), SYS_FUNC(set_mempolicy), SYS_FUNC(get_mempolicy)): + Print a delimiter before nodemask argument. + +2016-04-27 Dmitry V. Levin + + Fix decoding of policy argument of get_mempolicy syscall. + * numa.c (SYS_FUNC(get_mempolicy)): Print policy argument in square + brackets to indicate indirect access. + + Fix decoding of pid_t argument of migrate_pages syscall. + * numa.c (SYS_FUNC(migrate_pages)): Print pid_t syscall + argument using %d format. + + tests: add printxval function to libtests. + * tests/tests.h (printxval): New prototype. + * tests/printxval.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + + tests: check decoding of remap_file_pages syscall. + * tests/remap_file_pages.c: New file. + * tests/remap_file_pages.test: New test. + * tests/.gitignore: Add remap_file_pages. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add remap_file_pages.test. + +2016-04-27 Fei Jie + + tests: add pause.test. + * tests/pause.c: New file. + * tests/pause.test: New test. + * tests/.gitignore: Add pause. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add pause.test. + + tests: add kill.test. + * tests/kill.c: New file. + * tests/kill.test: New test. + * tests/.gitignore: Add kill. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add kill.test. + +2016-04-27 Dmitry V. Levin + + Fix decoding of pid_t arguments of kill and tgkill syscalls. + * signal.c (SYS_FUNC(kill), SYS_FUNC(tgkill)): Print pid_t syscall + arguments using %d format. + +2016-04-27 Fei Jie + + tests: add mlock.test. + * tests/mlock.c: New file. + * tests/mlock.test: New test. + * tests/.gitignore: Add mlock. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mlock.test. + +2016-04-27 Dmitry V. Levin + + Move parsers of NUMA related syscalls to numa.c. + * mem.c (get_nodes, SYS_FUNC(mbind), SYS_FUNC(set_mempolicy), + SYS_FUNC(get_mempolicy), SYS_FUNC(migrate_pages), SYS_FUNC(move_pages)): + Move ... + * numa.c: ... here. + * Makefile.am (strace_SOURCES): Add numa.c + + tests/umovestr3.c: robustify against os specific issues. + * tests/umovestr3.c (main): Create extra gap before unreadable page. + + tests: extend test coverage of umovestr short read condition. + * tests/umovestr3.c: New file. + * tests/umovestr3.test: New test. + * tests/.gitignore: Add umovestr3. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add umovestr3.test. + + tests: check decoding of out-of-range syscalls. + * tests/nsyscalls.c: New file. + * tests/nsyscalls.test: New test. + * tests/.gitignore: Add nsyscalls. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add nsyscalls.test. + +2016-04-26 Dmitry V. Levin + + Fix decoding of 3rd argument of getdents/getdents64 syscalls. + * dirent.c (SYS_FUNC(getdents)): Always print 3rd syscall argument + as unsigned int. + * dirent64.c (SYS_FUNC(getdents64)): Likewise. + * tests/getdents.c (main): Check it. + * tests/getdents64.c (main): Likewise. + + Fix decoding of LINUX_REBOOT_CMD_RESTART2 argument. + * reboot.c (SYS_FUNC(reboot)): Cast numeric arguments to unsigned int. + +2016-04-26 Dmitry V. Levin + + .travis.yml: raise sleep delay. + Previous sleep delay value seems to be not enough nowadays. + + .travis.yml (SLEEP_A_BIT): Raise sleep delay. + +2016-04-26 Dmitry V. Levin + + Move definitions of MPOL_* constants to xlat files. + * mem.c (MPOL_DEFAULT, MPOL_PREFERRED, MPOL_BIND, MPOL_INTERLEAVE): + Move to xlat/policies.in. + (MPOL_F_NODE, MPOL_F_ADDR): Move to xlat/mempolicyflags.in. + (MPOL_MF_STRICT, MPOL_MF_MOVE, MPOL_MF_MOVE_ALL): Move + to xlat/mbindflags.in. + + tests: check decoding of renameat2 syscall. + * tests/renameat2.c: New file. + * tests/renameat2.test: New test. + * tests/.gitignore: Add renameat2. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add renameat2.test. + + Add default values for RENAME_* constants. + * xlat/rename_flags.in: Add default values. + + tests: check decoding of utimes syscall. + * tests/utimes.c: New file. + * tests/utimes.test: New test. + * tests/.gitignore: Add utimes. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add utimes.test. + + tests: check decoding of futimesat syscall. + * tests/futimesat.c: New file. + * tests/futimesat.test: New test. + * tests/.gitignore: Add futimesat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add futimesat.test. + + tests: extend test coverage of mknod syscall. + * mknod.c (main): Check more corner cases of mode_t parser. + * mknod.test: Update. + +2016-04-26 Fei Jie + + tests: add sched_yield.test. + * tests/sched_yield.c: New file. + * tests/sched_yield.test: New test. + * tests/.gitignore: Add sched_yield. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add sched_yield.test. + + tests: add sync.test. + * tests/sync.c: New file. + * tests/sync.test: New test. + * tests/.gitignore: Add sync. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add sync.test. + + tests: add mknodat.test. + * tests/mknodat.c: New file. + * tests/mknodat.test: New test. + * tests/.gitignore: Add mknodat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mknodat.test. + + tests: add unlink.test. + * tests/unlink.c: New file. + * tests/unlink.test: New test. + * tests/.gitignore: Add unlink. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add unlink.test. + + tests: add reboot.test. + * tests/reboot.c: New file. + * tests/reboot.test: New test. + * tests/.gitignore: Add reboot. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add reboot.test. + +2016-04-26 Dmitry V. Levin + + Fix decoding of statfs family syscalls. + Fix decoders of fstatfs, fstatfs64, statfs, and statfs64 syscalls + by rewriting them using mpers infrastructure. + + * fetch_struct_statfs.c: New file. + * fstatfs.c: Likewise. + * fstatfs64.c: Likewise. + * print_statfs.c: Likewise. + * statfs.h: Likewise. + * statfs64.c: Likewise. + * statfs.c: Remove everything except SYS_FUNC(statfs). + * configure.ac: Remove the check for struct statfs64 in . + Add checks for struct statfs and struct statfs64 in . + Add checks for f_frsize and f_flags members of these structures. + * defs.h (struct strace_statfs): New forward declaration. + (print_struct_statfs, print_struct_statfs64): New prototypes. + * Makefile.am (libstrace_a_SOURCES): Add fstatfs.c, fstatfs64.c, + statfs.c, and statfs64.c. + (strace_SOURCES): Add fetch_struct_statfs.c, print_statfs.c, + and statfs.h. + * NEWS: Mention this fix. + * tests/fstatfs.c: New file. + * tests/fstatfs64.c: Likewise. + * tests/statfs64.c: Likewise. + * tests/xstatfs.c: Likewise. + * tests/xstatfs64.c: Likewise. + * tests/xstatfsx.c: Likewise. + * tests/fstatfs.test: New test. + * tests/fstatfs64.test: Likewise. + * tests/statfs64.test: Likewise. + * tests/statfs.c: Rewrite using xstatfs.c. + * tests/statfs.test: Update. + * tests/.gitignore: Add fstatfs, fstatfs64, and statfs64. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fstatfs.test, fstatfs64.test, and statfs64.test. + (EXTRA_DIST): Add xstatfs.c, xstatfs64.c, and xstatfsx.c. + +2016-04-26 Dmitry V. Levin + + tests: add printflags function to libtests. + * tests/printflags.c: New file. + * tests/tests.h (printflags): New prototype. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + +2016-04-26 Dmitry V. Levin + + Move definition of struct xlat to a separate header file. + Define struct xlat in a separate file so that it could be used later by + tests without inclusion of defs.h header file. + + * defs.h (struct xlat, XLAT, XLAT_END): Move ... + * xlat.h: ... here. + * Makefile.am (strace_SOURCES): Add xlat.h. + +2016-04-25 Dmitry V. Levin + + alpha: decode osf_statfs64 and osf_fstatfs64 syscalls. + * linux/alpha/syscallent.h (osf_statfs64, osf_fstatfs64): Set nargs + and handler. + +2016-04-25 Dmitry V. Levin + + alpha: fix decoding of osf_statfs and osf_fstatfs syscalls. + Do not attempt to print struct osf_statfs as if it was the same as + struct statfs. Since struct osf_statfs has never been decoded properly, + it is probably too late to implement a decoder, so let's just print the + pointer. + + * statfs.c [ALPHA] (SYS_FUNC(osf_statfs), SYS_FUNC(osf_fstatfs)): Move ... + * alpha.c: ... here. Replace printstatfs with printaddr. + +2016-04-25 Dmitry V. Levin + + statfs: print f_flags field only when ST_VALID flag is set. + * statfs.c (print_statfs_flags): New function. + (printstatfs, printstatfs64, printcompat_statfs64): Use it. + * xlat/statfs_flags.in (ST_VALID): Move to the head of the list. + * tests/statfs.expected: Update. + +2016-04-25 Fei Jie + + tests: add symlink.test. + * tests/symlink.c: New file. + * tests/symlink.test: New test. + * tests/.gitignore: Add symlink. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add symlink.test. + + tests: add rmdir.test. + * tests/rmdir.c: New file. + * tests/rmdir.test: New test. + * tests/.gitignore: Add rmdir. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add rmdir.test. + + tests: add setdomainname.test. + * tests/setdomainname.c: New file. + * tests/setdomainname.test: New test. + * tests/.gitignore: Add setdomainname. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setdomainname.test. + + tests: add sched_rr_get_interval.test. + * tests/sched_rr_get_interval.c: New file. + * tests/sched_rr_get_interval.test: New test. + * tests/.gitignore: Add sched_rr_get_interval. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add sched_rr_get_interval.test. + +2016-04-25 Dmitry V. Levin + + statfs: decode f_flags field of struct statfs. + * xlat/statfs_flags.in: New file. + * statfs.c: Include "xlat/statfs_flags.h". + (printstatfs) [_STATFS_F_FLAGS]: Print statbuf.f_flags as flags. + (printstatfs64) [_STATFS_F_FLAGS]: Likewise. + (printcompat_statfs64): Likewise. + * tests/statfs.expected: Update. + +2016-04-25 Zev Weiss + + statfs: don't quote f_type macro names. + * statfs.c (sprintfstype): Don't add double-quotes to fs magic macros. + * tests/statfs.expected: Remove double-quotes. + +2016-04-25 Dmitry V. Levin + + tests/shmxt.c: robustify against arch specific issues. + Do not treat failed shmat(SHM_RND) as a test failure. + This change partially reverts commit + bea707377d2ee3e1950bfa43537ef928163a5fa6. + + * tests/shmxt.c (main): Use SHM_RND in the second shmat call, + do not treat its potential error as a test failure. + +2016-04-23 Dmitry V. Levin + + Rename PRI__s64 to PRI__d64. + As PRI__*64 macros mirror PRI*64 macros from inttypes.h, follow the + principle of least astonishment and name these macros the same way. + + * defs.h (PRI__s64): Rename to PRI__d64. + +2016-04-23 Dmitry V. Levin + + Fix old_mmap output when mmap arguments are unfetchable. + * mem.c (SYS_FUNC(old_mmap)): Use umove_or_printaddr instead of umoven + to fetch mmap arguments, return RVAL_DECODED when umove_or_printaddr + fails. + * tests/old_mmap.c (main): Check it. + +2016-04-22 Dmitry V. Levin + + aarch64: fix old_mmap output for arm personality. + * mem.c (SYS_FUNC(old_mmap)) [AARCH64]: Fetch mmap arguments + as 32-bit integers. + + Define old_mmap parser only on architectures that use it. + * mem.c (SYS_FUNC(old_mmap)): Define only on AARCH64, ARM, I386, X86_64, + X32, M68K, S390, and S390X. + +2016-04-22 Dmitry V. Levin + + tests: extend test coverage of mmap syscall. + Check decoding of "old mmap" edition of mmap syscall + on those architectures that define it. + + * tests/old_mmap.c: New file. + * tests/old_mmap.test: New test. + * tests/.gitignore: Add old_mmap. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add old_mmap.test. + +2016-04-22 Dmitry V. Levin + + tests: extend test coverage of mincore syscall. + * tests/mincore.c (print_mincore): New function. + (test_mincore): Use it. Check mincore with invalid vec address. + Check mincore with length argument not a multiple of the page size. + (main): Check with DEFAULT_STRLEN pages. + +2016-04-22 Dmitry V. Levin + + Move parsers of sync_file_range and sync_file_range2 syscalls to libstrace + For each given architecture only one of these two syscalls has a + syscallent entry. When each parser is placed into a separate file, + moving to libstrace ensures that only one of them that is need + is linked into strace executable. + + * sync_file_range.c (SYS_FUNC(sync_file_range2)): Move ... + * sync_file_range2.c: ... here. + * Makefile.am (strace_SOURCES): Move sync_file_range.c ... + (libstrace_a_SOURCES): ... here. Add sync_file_range2.c. + (strace_SOURCES_c): Add filtered libstrace_a_SOURCES. + +2016-04-22 Dmitry V. Levin + + tests: check decoding of clock_adjtime syscall. + * tests/clock_adjtime.c: New file. + * tests/clock_adjtime.test: New test. + * tests/.gitignore: Add clock_adjtime. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add clock_adjtime.test. + +2016-04-21 Dmitry V. Levin + + tests: do not include unnecessarily. + Automatically change tests/*.c files using the following script: + + for f in tests/*.c; do + grep -q '\/d' "$f" + done + +2016-04-21 Dmitry V. Levin + + tests: do not include unnecessarily. + Automatically change tests/*.c files using the following script: + + for f in tests/*.c; do + grep -Fv errno.h "$f" | + grep -Ewq '(si_)?errno|SOCK_FILTER_DENY_SYSCALL' || + sed -i '/# *include */d' "$f" + done + +2016-04-21 Dmitry V. Levin + + tests/xetpriority.c: print syscall() result using %ld format. + + tests/xetpgid.c: print syscall() result using %ld format. + + tests/xchownx.c: use errno2name. + + tests/userfaultfd.c: stop using assert. + + tests/unlinkat.c: print syscall() result using %ld format. + + tests/umount.c: use errno2name. + + tests/truncate64.c: cleanup. + * tests/truncate64.c (main): Use errno2name, stop using assert. + + tests/truncate.c: cleanup. + * tests/truncate.c (main): Use errno2name, stop using assert. + + tests/tee.c: stop using assert. + + tests/syslog.c: use errno2name. + + tests/sync_file_range2.c: stop using assert. + + tests/sync_file_range.c: stop using assert. + + tests/symlinkat.c: cleanup. + + tests/swap.c: cleanup. + * tests/swap.c (error_msg): Remove. + (main): Use errno2name. + + tests/splice.c: stop using assert. + + tests/setugid.c: cleanup. + + tests/sethostname.c: use errno2name. + + tests/setgroups.c: use errno2name. + * tests/setgroups.c (errno2str): Remove. + (main): Use errno2name. + + tests/seccomp-strict.c: cleanup. + * tests/seccomp-strict.c (main): Use errno2name, stop using assert. + + tests/seccomp-filter.c: cleanup. + * tests/seccomp-filter.c (main): Use errno2name, stop using assert. + + tests/sched_xetscheduler.c: print syscall() result using %ld format. + + tests/sched_xetparam.c: print syscall() result using %ld format. + + tests/renameat.c: print syscall() result using %ld format. + + tests/rename.c: print syscall() result using %ld format. + + tests/readv.c: cleanup. + + tests/pwritev.c: use errno2name. + + tests/preadv-pwritev.c: cleanup. + + tests/prctl-seccomp-strict.c: cleanup. + * tests/prctl-seccomp-strict.c (main): Use errno2name, + stop using assert. + + tests/openat.c: use errno2name. + + tests/open.c: use errno2name. + + tests/mlockall.c: cleanup. + + tests/mlock2.c: stop using assert. + + tests/mknod.c: print syscall() result using %ld format. + + tests/mkdirat.c: print syscall() result using %ld format. + + tests/lseek.c: cleanup. + * tests/lseek.c (main): Use errno2name, stop using assert. + + tests/llseek.c: cleanup. + * tests/llseek.c (main): Use errno2name, stop using assert. + + tests/linkat.c: print syscall() result using %ld format. + + tests/iopl.c: use errno2name. + + tests/ioperm.c: use errno2name. + + tests/getgroups.c: use errno2name. + * tests/getgroups.c (errno2str): Remove. + (main): Use errno2name. + + tests/ftruncate64.c: cleanup. + * tests/ftruncate64.c (main): Use errno2name, stop using assert. + + tests/ftruncate.c: cleanup. + * tests/ftruncate.c (main): Use errno2name, stop using assert. + + tests/fsync.c: print syscall() result using %ld format. + + tests/flock.c: print syscall() result using %ld format. + + tests/file_handle.c: use errno2name. + + tests/fdatasync.c: print syscall() result using %ld format. + + tests/fchownat.c: use errno2name. + + tests/fchmodat.c: use errno2name. + + tests/fchmod.c: use errno2name. + + tests/faccessat.c: print syscall() result using %ld format. + + tests/epoll_wait.c: print syscall() result using %ld format. + + tests/epoll_ctl.c: print syscall() result using %ld format. + + tests/epoll_create1.c: cleanup. + * tests/epoll_create1.c (main): Use errno2name, stop using assert. + + tests/epoll_create.c: print syscall() result using %ld format. + + tests/dup3.c: print syscall() result using %ld format. + + tests/dup2.c: print syscall() result using %ld format. + + tests/dup.c: cleanup. + + tests/creat.c: stop using sys/stat.h. + + tests/copy_file_range.c: stop using assert. + + tests/chroot.c: use errno2name. + + tests/aio.c: use errno2name. + + tests: cleanup acct.test. + * tests/acct.c (main): Use errno2name, stop using assert, + change sample file name. + * tests/acct.test: Update. + + tests: use errno2name() + Automatically change tests/*.c files using the following sed regexp: + sed -i 's/errno == E[[:alnum:]]\+ ? "E[[:alnum:]]\+" : "E[[:alnum:]]\+"/errno2name()/g' + + tests/dup.c: include "tests.h" + This is going to be necessary for the following commit. + +2016-04-21 Fei Jie + + tests: add getpgrp.test. + * tests/getpgrp.c: New file. + * tests/getpgrp.test: New test. + * tests/.gitignore: Add getpgrp. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getpgrp.test. + + tests: add access.test. + * tests/access.c: New file. + * tests/access.test: New test. + * tests/.gitignore: Add access. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add access.test. + + tests: add fchdir.test. + * tests/fchdir.c: New file. + * tests/fchdir.test: New test. + * tests/.gitignore: Add fchdir. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fchdir.test. + + tests: add mkdir.test. + * tests/mkdir.c: New file. + * tests/mkdir.test: New test. + * tests/.gitignore: Add mkdir. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mkdir.test. + + tests: add getsid.test. + * tests/getsid.c: New file. + * tests/getsid.test: New test. + * tests/.gitignore: Add getsid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getsid.test. + +2016-04-21 Dmitry V. Levin + + tests: add errno2name function to libtests. + Add a simple translator of errno to its name, so one could + simply use errno2name() instead of complex expressions like + errno == EINVAL ? "EINVAL" : "EFAULT". + + * tests.h (errno2name): New prototype. + * errno2name.c: New file. + * Makefile.am (libtests_a_SOURCES): Add it. + +2016-04-20 Dmitry V. Levin + + hppa: rename ECANCELLED to ECANCELED. + hppa seems to be the only architecture that defines ECANCELLED synonym + for ECANCELED constant, other architectures just define ECANCELED. + Change the way how this constant is printed on hppa to be in line + with other architectures. + + * linux/hppa/errnoent.h [253]: Rename ECANCELLED to ECANCELED. + +2016-04-20 Dmitry V. Levin + + Remove parser of unimplemented timerfd syscall. + timerfd syscall was introduced in v2.6.22-rc1, but in v2.6.25-rc1 + it was replaced by timerfd_* syscall family. + + * linux/avr32/syscallent.h (timerfd): Fix nargs. + * linux/dummy.h (sys_timerfd): Add stub alias. + * time.c (SYS_FUNC(timerfd)): Remove. + +2016-04-20 Dmitry V. Levin + + tests: workaround kernel bugs in seccomp-strict.test and prctl-seccomp-strict.test + If kernel implementation of strict seccomp mode is buggy, test programs + will be killed by SIGKILL. This is a known problem at least on + x32 and mips. Skip affected tests if this is the case. + + This change partially revert commit 9c1a72cd3f3d52d573876ce474b620a5f141fb1b. + + * tests/seccomp-strict.c (main): Remove workaround for x32. + * tests/prctl-seccomp-strict.c: Likewise. + * tests/seccomp-strict.test: Skip the test if the test program + has been killed by SIGKILL. + * tests/prctl-seccomp-strict.test: Likewise. + +2016-04-20 Dmitry V. Levin + + tests/shmxt.c: do not use SHM_RND, it is unreliable. + * tests/shmxt.c (main): Do not set SHM_RND flag. + + tests/rt_sigpending.c: fix for systems where _NSIG > 16 * sizeof(long) + * tests/rt_sigsuspend.c (iterate): Do not assume that size will be less + than sizeof(long) on the second iteration. + + prctl-seccomp-strict.test: robustify against unrelated prctl invocations + * tests/prctl-seccomp-strict.test: Filter out PR_GET_* prctl calls. + +2016-04-20 Dmitry V. Levin + + tests: adjust rt_sigpending to older kernels. + With linux kernels older than v3.9-rc1, compat rt_sigpending syscall + could fail with EFAULT in cases where on later kernels it succeeds. + Adjust the test to handle both cases properly. + + * tests/rt_sigpending.c (iterate): Stop iterations if rt_sigpending + failed with EFAULT. + +2016-04-20 Dmitry V. Levin + + tests: adjust readv/writev and preadv/pwritev tests to older kernels. + With linux kernels older than v3.16-rc1, iovec based compat syscalls may + return EINVAL in some cases where on later kernels they return EFAULT. + Adjust tests to handle both cases properly. + + * tests/preadv-pwritev.c: Include . + (main): Print either "EINVAL" or "EFAULT" depending on errno. + * tests/pwritev.c: Likewise. + * tests/readv.c: Likewise. + +2016-04-20 Dmitry V. Levin + + tests: remove obsolete non-strict uid tests. + Recently added strict tests for uid/gid related syscalls + made old uid tests obsolete. + + * tests/uid.awk: Remove. + * tests/uid.c: Remove. + * tests/uid.test: Remove. + * tests/uid16.c: Remove. + * tests/uid16.test: Remove. + * tests/uid32.c: Remove. + * tests/uid32.test: Remove. + * tests/.gitignore: Remove uid, uid16, and uid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Remove uid.test, uid16.test, and uid32.test. + (EXTRA_DIST): Remove uid.awk. + +2016-04-20 Dmitry V. Levin + + tests: extend test coverage of getuid/getgid family syscalls. + Add strict tests for getuid, getuid32, getgid, getgid32, geteuid, + geteuid32, getegid, and getegid32 syscalls. + + * tests/getegid.c: New file. + * tests/getegid.test: New test. + * tests/getegid32.c: New file. + * tests/getegid32.test: New test. + * tests/geteuid.c: New file. + * tests/geteuid.test: New test. + * tests/geteuid32.c: New file. + * tests/geteuid32.test: New test. + * tests/getgid.c: New file. + * tests/getgid.test: New test. + * tests/getgid32.c: New file. + * tests/getgid32.test: New test. + * tests/getuid.c: New file. + * tests/getuid.test: New test. + * tests/getuid32.c: New file. + * tests/getuid32.test: New test. + * tests/.gitignore: Add getuid, getuid32, getgid, getgid32, geteuid, + * geteuid32, getegid, and getegid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getegid.test, getegid32.test, geteuid.test, + geteuid32.test, getgid.test, getgid32.test, getuid.test, + and getuid32.test. + +2016-04-20 Dmitry V. Levin + + tests: extend test coverage of getresgid32 syscall. + * tests/getresgid32.c: New file. + * tests/getresgid32.test: New test. + * tests/.gitignore: Add getresgid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getresgid32.test. + + tests: extend test coverage of getresgid syscall. + * tests/getresgid.c: New file. + * tests/getresgid.test: New test. + * tests/.gitignore: Add getresgid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getresgid.test. + + tests: extend test coverage of getresuid32 syscall. + * tests/getresuid32.c: New file. + * tests/getresuid32.test: New test. + * tests/.gitignore: Add getresuid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getresuid32.test. + + tests: extend test coverage of getresuid syscall. + * tests/getresugid.c: New file. + * tests/getresuid.c: New file. + * tests/getresuid.test: New test. + * tests/.gitignore: Add getresuid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getresuid.test. + (EXTRA_DIST): Add getresugid.c. + +2016-04-20 Fei Jie + + tests: add symlinkat.test. + * tests/symlinkat.c: New file. + * tests/symlinkat.test: New test. + * tests/.gitignore: Add symlinkat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add symlinkat.test. + + tests: add iopl.test. + * tests/iopl.c: New file. + * tests/iopl.test: New test. + * tests/.gitignore: Add iopl. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add iopl.test. + +2016-04-20 Dmitry V. Levin + + mips o32, powerpc, powerpc64: fix decoding of iopl syscall. + * linux/mips/syscallent-o32.h (iopl): Fix nargs. + * linux/powerpc/syscallent.h (iopl): Fix nargs and sys_func. + * linux/powerpc64/syscallent.h (iopl): Likewise. + +2016-04-20 Fei Jie + + tests: add ioperm.test. + * tests/ioperm.c: New file. + * tests/ioperm.test: New test. + * tests/.gitignore: Add ioperm. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add ioperm.test. + +2016-04-20 Dmitry V. Levin + + Fix corner cases of getgroups and setgroups syscall decoders. + * uid.c (print_groups): New function. + (SYS_FUNC(setgroups), SYS_FUNC(getgroups)): Use it. + Print first syscall argument using %u format. + * tests/getgroups.c: New file. + * tests/getgroups.test: New test. + * tests/getgroups32.c: New file. + * tests/getgroups32.test: New test. + * tests/setgroups.c: New file. + * tests/setgroups.test: New test. + * tests/setgroups32.c: New file. + * tests/setgroups32.test: New test. + * tests/.gitignore: Add getgroups, getgroups32, setgroups, + and setgroups32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add getgroups.test, getgroups32.test, + setgroups.test, and setgroups32.test. + + Cleanup setfsuid syscall decoder. + * uid.c (SYS_FUNC(setfsuid)): Remove redundant check. + + tests: check decoding of setfsgid32 syscall. + * tests/setfsgid32.c: New file. + * tests/setfsgid32.test: New test. + * tests/.gitignore: Add setfsgid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setfsgid32.test. + + tests: check decoding of setfsgid syscall. + * tests/setfsugid.c: New file. + * tests/setfsgid.c: New file. + * tests/setfsgid.test: New test. + * tests/.gitignore: Add setfsgid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setfsgid.test. + (EXTRA_DIST): Add setfsugid.c. + + tests: check decoding of setfsuid32 syscall. + * tests/setfsuid32.c: New file. + * tests/setfsuid32.test: New test. + * tests/.gitignore: Add setfsuid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setfsuid32.test. + + tests: check decoding of setfsuid syscall. + * tests/setfsugid.c: New file. + * tests/setfsuid.c: New file. + * tests/setfsuid.test: New test. + * tests/.gitignore: Add setfsuid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setfsuid.test. + (EXTRA_DIST): Add setfsugid.c. + + tests: extend test coverage of setresgid32 syscall. + * tests/setresgid32.c: New file. + * tests/setresgid32.test: New test. + * tests/.gitignore: Add setresgid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setresgid32.test. + + tests: extend test coverage of setresgid syscall. + * tests/setresgid.c: New file. + * tests/setresgid.test: New test. + * tests/.gitignore: Add setresgid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setresgid.test. + + tests: extend test coverage of setresuid32 syscall. + * tests/setresuid32.c: New file. + * tests/setresuid32.test: New test. + * tests/.gitignore: Add setresuid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setresuid32.test. + + tests: extend test coverage of setresuid syscall. + * tests/setresugid.c: New file. + * tests/setresuid.c: New file. + * tests/setresuid.test: New test. + * tests/.gitignore: Add setresuid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setresuid.test. + (EXTRA_DIST): Add setresugid.c. + + tests: extend test coverage of setregid32 syscall. + * tests/setregid32.c: New file. + * tests/setregid32.test: New test. + * tests/.gitignore: Add setregid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setregid32.test. + + tests: extend test coverage of setregid syscall. + * tests/setregid.c: New file. + * tests/setregid.test: New test. + * tests/.gitignore: Add setregid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setregid.test. + + tests: extend test coverage of setreuid32 syscall. + * tests/setreuid32.c: New file. + * tests/setreuid32.test: New test. + * tests/.gitignore: Add setreuid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setreuid32.test. + + tests: extend test coverage of setreuid syscall. + * tests/setreugid.c: New file. + * tests/setreuid.c: New file. + * tests/setreuid.test: New test. + * tests/.gitignore: Add setreuid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setreuid.test. + (EXTRA_DIST): Add setreugid.c. + + tests: extend test coverage of setgid32 syscall. + * tests/setgid32.c: New file. + * tests/setgid32.test: New test. + * tests/.gitignore: Add setgid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setgid32.test. + + tests: extend test coverage of setgid syscall. + * tests/setgid.c: New file. + * tests/setgid.test: New test. + * tests/.gitignore: Add setgid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setgid.test. + + tests: extend test coverage of setuid32 syscall. + * tests/setuid32.c: New file. + * tests/setuid32.test: New test. + * tests/.gitignore: Add setuid32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setuid32.test. + + tests: extend test coverage of setuid syscall. + * tests/setugid.c: New file. + * tests/setuid.c: New file. + * tests/setuid.test: New test. + * tests/.gitignore: Add setuid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add setuid.test. + (EXTRA_DIST): Add setugid.c. + +2016-04-20 Fei Jie + + tests: add shmxt.test. + * tests/shmxt.c: New file. + * tests/shmxt.test: New test. + * tests/.gitignore: Add shmxt. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add shmxt.test. + +2016-04-20 Dmitry V. Levin + + alpha: fix decoding of shmat syscall. + On alpha, shmat syscall is known as osf_shmat. + + * linux/alpha/syscallent.h (osf_shmat): Fix sys_flags and sys_func. + +2016-04-20 Fei Jie + + tests: add semop.test. + * tests/semop.c: New file. + * tests/semop.test: New test. + * tests/.gitignore: Add semop. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add semop.test. + +2016-04-18 Dmitry V. Levin + + prctl-seccomp-filter-v.test: robustify against unrelated prctl invocations + * tests/prctl-seccomp-filter-v.test: Filter out PR_GET_* prctl calls. + + Reported-by: Steve McIntyre + +2016-04-18 Dmitry V. Levin + + tests/pselect6.c: fix potential output mismatch. + * tests/pselect6.c (main): In the last case of printing pselect6 + syscall, print the last argument the same way as in other cases. + + Reported-by: Steve McIntyre + +2016-04-18 Dmitry V. Levin + + tests: check decoding of fchown32 syscall. + * tests/fchown32.c: New file. + * tests/fchown32.test: New test. + * tests/.gitignore: Add fchown32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fchown32.test. + + tests: check decoding of fchown syscall. + * tests/fchown.c: New file. + * tests/fchown.test: New test. + * tests/.gitignore: Add fchown. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fchown.test. + + tests: check decoding of lchown32 syscall. + * tests/lchown32.c: New file. + * tests/lchown32.test: New test. + * tests/.gitignore: Add lchown32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add lchown32.test. + + tests: check decoding of lchown syscall. + * tests/lchown.c: New file. + * tests/lchown.test: New test. + * tests/.gitignore: Add lchown. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add lchown.test. + + tests: check decoding of chown32 syscall. + * tests/chown32.c: New file. + * tests/chown32.test: New test. + * tests/.gitignore: Add chown32. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add chown32.test. + + tests: check decoding of chown syscall. + * tests/chown.c: New file. + * tests/chown.test: New test. + * tests/xchownx.c: New file. + * tests/.gitignore: Add chown. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add chown.test. + (EXTRA_DIST): Add xchownx.c. + + Fix decoding of 16-bit uid_t/git_t. + * uid.c (printuid): Always cast value to uid_t. + +2016-04-18 Dmitry V. Levin + + tests: move kernel uid overflow check to libtests. + This code used in two different places, so move it to the library. + + * tests/overflowuid.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + * tests/tests.h (check_overflowuid, check_overflowgid): New prototypes. + * tests/uid.c (main): Use check_overflowuid. + * tests/uid16.c (main): Likewise. + +2016-04-12 Dmitry V. Levin + + tests: skip seccomp-strict.test and prctl-seccomp-strict.test on x32. + As x86_64 kernel does not support x32 syscall numbers in + SECCOMP_MODE_STRICT, skip affected tests on x32. + + * tests/seccomp-strict.c (main) [__x86_64__ && __ILP32__]: Bail out + using error_msg_and_skip. + * tests/prctl-seccomp-strict.c: Likewise. + +2016-04-12 Dmitry V. Levin + + tests: add seccomp-filter.test. + * tests/seccomp-filter.c: New file. + * tests/seccomp-filter.test: New test. + * tests/.gitignore: Add seccomp-filter. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add seccomp-filter.test. + +2016-04-12 Dmitry V. Levin + + seccomp: fix decoding of sock_fprog and sock_filter structures. + Always print struct sock_fprog.len. + Fix printing of unfetchable elements in sock_filter array. + Fix printing of large sock_filter arrays. + + * seccomp.c (decode_fprog): Rewrite into decode_seccomp_fprog and + print_seccomp_fprog. + (print_seccomp_filter): Replace decode_fprog with print_seccomp_fprog. + * tests/prctl-seccomp-filter-v.c (main): Update. + * tests/seccomp-filter-v.c: New file. + * tests/seccomp-filter-v.test: New test. + * tests/.gitignore: Add seccomp-filter-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add seccomp-filter-v.test. + +2016-04-11 Dmitry V. Levin + + seccomp: print SECCOMP_* and BPF_* constants in a more compact way. + * seccomp.c (decode_bpf_code, decode_bpf_stmt): Replace " | " with "|". + * tests/prctl-seccomp-filter-v.c: Update. + + tests: rename seccomp.test to prctl-seccomp-filter-v.test. + * tests/.gitignore: Replace seccomp with prctl-seccomp-filter-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Replace seccomp.test with prctl-seccomp-filter-v.test. + * tests/seccomp.c: Rename to tests/prctl-seccomp-filter-v.c. + * tests/seccomp.test: Rename to tests/prctl-seccomp-filter-v.test. + + tests: add seccomp-strict.test. + * tests/seccomp-strict.c: New file. + * tests/seccomp-strict.test: New test. + * tests/.gitignore: Add seccomp-strict. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add seccomp-strict.test. + + tests: add prctl-seccomp-strict.test. + * tests/prctl-seccomp-strict.c: New file. + * tests/prctl-seccomp-strict.test: New test. + * tests/.gitignore: Add prctl-seccomp-strict. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add prctl-seccomp-strict.test. + + tests: bring lists back to the sorted order. + +2016-04-10 Dmitry V. Levin + + tests/epoll_create1.c: extend for the case of ENOSYS. + * epoll_create1.c: Make the test work in case of epoll_create1 + returning ENOSYS. + + tests/epoll_ctl.c: extend epoll_ctl coverage. + * tests/epoll_ctl.c (main): Check EPOLL_CTL_DEL decoding. Check + decoding of long int descriptors and NULL struct epoll_event pointer. + +2016-04-09 Dmitry V. Levin + + tests: add mlockall.test. + * tests/mlockall.c: New file. + * tests/mlockall.test: New test. + * tests/.gitignore: Add mlockall. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mlockall.test. + +2016-04-08 Fei Jie + + tests: add epoll_wait.test. + * tests/epoll_wait.c: New file. + * tests/epoll_wait.test: New test. + * tests/.gitignore: Add epoll_wait. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add epoll_wait.test. + + tests: add epoll_ctl.test. + * tests/epoll_ctl.c: New file. + * tests/epoll_ctl.test: New test. + * tests/.gitignore: Add epoll_ctl. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add epoll_ctl.test. + + tests: add epoll_create.test. + * tests/epoll_create.c: New file. + * tests/epoll_create.test: New test. + * tests/.gitignore: Add epoll_create. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add epoll_create.test. + +2016-04-08 Dmitry V. Levin + + tests/pread64-pwrite64.c: minor cleanup. + * tests/pread64-pwrite64.c: Do not include . + +2016-04-07 Dmitry V. Levin + + Fix decoding of swapon flags. + * swapon.c (SYS_FUNC(swapon)): Print priority regardless + of SWAP_FLAG_PREFER flag being set. + * tests/swap.c (error_msg): Handle EINVAL. + (main): Check decoding of swapon flags. + + tests/unlinkat.c: check AT_* decoding. + * tests/unlinkat.c (main): Check decoding of AT_* constants. + + tests/linkat.c: check AT_* decoding. + * tests/linkat.c (main): Check decoding of AT_* constants. + +2016-04-06 Elliott Hughes + + Improve decoding of Android's PR_SET_VMA prctl. + Before: + + prctl(0x53564d41 /* PR_??? */, 0, 0x7f8ab53000, 4096, + "atexit handlers") = 0 + + After: + + prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0x7fa8cbd000, 4096, + "atexit handlers") = 0 + + * prctl.c (SYS_FUNC(prctl)) [__ANDROID__]: Do not define PR_SET_VMA. + * Hard-code PR_SET_VMA_ANON_NAME, the only current sub-option. + * xlat/prctl_options.in: Add PR_SET_VMA. + +2016-04-06 Fei Jie + + tests: add mkdirat.test. + * tests/mkdirat.c: New file. + * tests/mkdirat.test: New test. + * tests/.gitignore: Add mkdirat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mkdirat.test. + + tests: add swap.test. + * tests/swap.c: New file. + * tests/swap.test: New test. + * tests/.gitignore: Add swap. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add swap.test. + + tests: add unlinkat.test. + * tests/unlinkat.c: New file. + * tests/unlinkat.test: New test. + * tests/.gitignore: Add unlinkat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add unlinkat.test. + + tests: add linkat.test. + * tests/linkat.c: New file. + * tests/linkat.test: New test. + * tests/.gitignore: Add linkat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add linkat.test. + +2016-04-06 Dmitry V. Levin + + tests: add sync_file_range.test and sync_file_range2.test. + * configure.ac (AC_CHECK_FUNCS): Add sync_file_range. + * tests/sync_file_range.c: New file. + * tests/sync_file_range2.c: Likewise. + * tests/sync_file_range.test: New test. + * tests/sync_file_range2.test: Likewise. + * tests/.gitignore: Add sync_file_range and sync_file_range2. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add sync_file_range.test and sync_file_range2.test. + +2016-04-05 Dmitry V. Levin + + Add default values for SYNC_FILE_RANGE_* constants. + * xlat/sync_file_range_flags.in: Add default values. + +2016-04-05 Elliott Hughes + + Fix sync_file_range2 output. + Before: + + sync_file_range2(3SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE| + SYNC_FILE_RANGE_WAIT_AFTER|0xfffffff8, 0, 0, ) + + After: + + sync_file_range2(3, SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE| + SYNC_FILE_RANGE_WAIT_AFTER|0xfffffff8, 0, 0) + + * sync_file_range.c (SYS_FUNC(sync_file_range2)): Output the ", " + in the right place. + +2016-04-04 Dmitry V. Levin + + Replace PF_* constants with AF_* + AF_* constants appear to be more standardized, and in practice there's + always a one to one relationship between AF_* and PF_*, so let's + use AF_* instead of PF_*. + + * xlat/domains.in: Remove. + * net.c: Do not define PF_UNSPEC. Stop including "xlat/domains.h". + Replace PF_* with AF_*. Replace domains with addrfams. + * tests/inet-cmsg.c: Replace PF_INET with AF_INET. + * tests/net-yy-inet.c: Likewise. + * tests/netlink_inet_diag.c: Likewise. + * tests/net-accept-connect.c: Replace PF_LOCAL with AF_LOCAL. + * tests/net-y-unix.c: Likewise. + * tests/net-yy-unix.c: Likewise. + * tests/netlink_unix_diag.c: Likewise. + * tests/net.expected: Replace PF_ with AF_. + +2016-04-03 Dmitry V. Levin + + tests: add read-write.test. + * tests/read-write.c: New file. + * tests/read-write.test: New test. + * tests/.gitignore: Add read-write. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add read-write.test. + +2016-04-02 Dmitry V. Levin + + tests/pread64-pwrite64.test: extend dumpio coverage. + * tests/pread64-pwrite64.c (dump_str, print_hex, test_dump): + New functions. + (main): Use them to test dumping of various data. + * tests/pread64-pwrite64.test: Update. + + tests: add hexdump_memdup function to libtests. + * tests/hexdump_strdup.c (hexdump_memdup): New function. + (hexdump_strdup): Use it. + * tests/tests.h (hexdump_memdup): New prototype. + + tests: add fchownat.test. + * tests/fchownat.c: New file. + * tests/fchownat.test: New test. + * tests/.gitignore: Add fchownat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fchownat.test. + + tests: add fchmodat.test. + * tests/fchmodat.c: New file. + * tests/fchmodat.test: New test. + * tests/.gitignore: Add fchmodat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fchmodat.test. + + Fix printing of negative offsets in pread64 and pwrite64 syscalls. + * io.c (SYS_FUNC(pread), SYS_FUNC(pwrite)): Print offset + using %lld format string. + * tests/pread64-pwrite64.c: New file. + * tests/pread64-pwrite64.test: New test. + * tests/.gitignore: Add pread64-pwrite64. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (pread64_pwrite64_CPPFLAGS): New variable. + (DECODER_TESTS): Add pread64-pwrite64. + + tests/hexdump_strdup.c: add support for longer strings. + * tests/hexdump_strdup.c (hexdump_strdup): Output extra space character + before hexdumping of the 9th symbol. + + tests/preadv-pwritev.c: fix typo in error diagnostics. + * tests/preadv-pwritev.c (main): Fix typo in error message. + +2016-04-01 Fei Jie + + tests: add chroot.test. + * tests/chroot.c: New file. + * tests/chroot.test: New test. + * tests/.gitignore: Add chroot. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add chroot.test. + + tests: add fdatasync.test. + * tests/fdatasync.c: New file. + * tests/fdatasync.test: New test. + * tests/.gitignore: Add fdatasync. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fdatasync.test. + + tests: add fsync.test. + * tests/fsync.c: New file. + * tests/fsync.test: New test. + * tests/.gitignore: Add fsync. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add fsync.test. + + tests: add sethostname.test. + * tests/sethostname.c: New file. + * tests/sethostname.test: New test. + * tests/.gitignore: Add sethostname. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add sethostname.test. + +2016-04-01 Dmitry V. Levin + + Consistently handle unsigned arguments of mmap* and remap_file_pages. + Explicitly declare first 4 arguments of mmap* and all remap_file_pages + arguments as unsigned to avoid potential sign extension issues. + + * mem.c (print_mmap, SYS_FUNC(remap_file_pages)): Assign syscall + arguments to local variables of appropriate types. + +2016-04-01 Dmitry V. Levin + + Consistently handle 2nd and 3rd arguments of [gs]etsockopt as unsigned. + The second (level) and third (optname) arguments of getsockopt and + setsockopt syscalls are enums, so treat them consistently as enums: + use "unsigned int" type to avoid potential sign extension issues. + + * net.c (print_sockopt_fd_level_name, print_getsockopt, + print_setsockopt): Change type of "level" and "name" arguments + from "int" to "unsigned int". + +2016-04-01 Dmitry V. Levin + + Add sentinel attribute to printxvals. + * gcc_compat.h (ATTRIBUTE_SENTINEL): New macro. + * defs.h (printxvals): Add ATTRIBUTE_SENTINEL. + + Cleanup parser of ptrace syscall. + * process.c (print_user_offset_addr): New function for printing offset + address in the tracee's USER area. + (SYS_FUNC(ptrace)): Assign syscall arguments to local variables with + appropriate types. Print pid argument as int. Use switch statement + in the code that handles address argument. Use print_user_offset_addr + to print address in PTRACE_PEEKUSER and PTRACE_POKEUSER requests. + +2016-03-31 Jeff Mahoney + + Define PRI__[uxs]64 macros to print __s64 and __u64 values. + Rather than cast every __u64 or __s64 before printing, + define printing helpers for those types directly. + + * defs.h (PRI__s64, PRI__u64, PRI__x64): New macros. + +2016-03-31 Dmitry V. Levin + + Implement dumping of preadv and pwritev syscalls. + * syscall.c (dumpio): Add SEN_preadv and SEN_pwritev. + * NEWS: Mention this. + * tests/preadv-pwritev.c: New file. + * tests/preadv-pwritev.test: New test. + * tests/.gitignore: Add preadv-pwritev. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (preadv_pwritev_CPPFLAGS): New variable. + (DECODER_TESTS): Add preadv-pwritev. + +2016-03-30 Dmitry V. Levin + + Fix decoding of preadv syscall in case of short read. + * io.c (SYS_FUNC(preadv)): Call tprint_iov_upto instead + of tprint_iov and specify syscall return value as a data size limit. + * NEWS: Mention it. + * tests/preadv.c (main): Add a test case for preadv short read. + + Fix printing of negative offsets in preadv and pwritev syscalls. + * io.c (print_llu_from_low_high_val): Rename to + print_lld_from_low_high_val, all callers changed. + Print value as a signed integer. + * tests/preadv.c: New file. + * tests/preadv.test: New test. + * tests/pwritev.c: New file. + * tests/pwritev.test: New test. + * tests/.gitignore: Add preadv and pwritev. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (preadv_CPPFLAGS, pwritev_CPPFLAGS): New variables. + (DECODER_TESTS): Add preadv.test and pwritev.test. + + Fix printing of unreadable struct iovec. + * io.c (tprint_iov_upto): If the first element of iovec array is + unreadable, print its address without array markup. + * tests/readv.c (main): Check it. + + tests: factor out a part common to many simply organized test scripts. + * tests/init.sh (run_strace_match_diff): New function. + * tests/acct.test: Rewrite using run_strace_match_diff. + * tests/aio.test: Likewise. + * tests/alarm.test: Likewise. + * tests/chmod.test: Likewise. + * tests/clock_nanosleep.test: Likewise. + * tests/clock_xettime.test: Likewise. + * tests/copy_file_range.test: Likewise. + * tests/creat.test: Likewise. + * tests/dup.test: Likewise. + * tests/dup2.test: Likewise. + * tests/dup3.test: Likewise. + * tests/epoll_create1.test: Likewise. + * tests/execveat-v.test: Likewise. + * tests/execveat.test: Likewise. + * tests/fchmod.test: Likewise. + * tests/fcntl.test: Likewise. + * tests/file_handle.test: Likewise. + * tests/flock.test: Likewise. + * tests/fork-f.test: Likewise. + * tests/ftruncate.test: Likewise. + * tests/ftruncate64.test: Likewise. + * tests/getcwd.test: Likewise. + * tests/getdents.test: Likewise. + * tests/getdents64.test: Likewise. + * tests/getrandom.test: Likewise. + * tests/getrusage.test: Likewise. + * tests/getxxid.test: Likewise. + * tests/inet-cmsg.test: Likewise. + * tests/init.sh: Likewise. + * tests/membarrier.test: Likewise. + * tests/mincore.test: Likewise. + * tests/mknod.test: Likewise. + * tests/mlock2.test: Likewise. + * tests/mmsg.test: Likewise. + * tests/nanosleep.test: Likewise. + * tests/open.test: Likewise. + * tests/openat.test: Likewise. + * tests/pselect6.test: Likewise. + * tests/readdir.test: Likewise. + * tests/readlink.test: Likewise. + * tests/readv.test: Likewise. + * tests/recvmsg.test: Likewise. + * tests/rename.test: Likewise. + * tests/renameat.test: Likewise. + * tests/rt_sigpending.test: Likewise. + * tests/rt_sigprocmask.test: Likewise. + * tests/rt_sigqueueinfo.test: Likewise. + * tests/rt_sigsuspend.test: Likewise. + * tests/rt_sigtimedwait.test: Likewise. + * tests/rt_tgsigqueueinfo.test: Likewise. + * tests/sched_get_priority_mxx.test: Likewise. + * tests/sched_xetaffinity.test: Likewise. + * tests/sched_xetparam.test: Likewise. + * tests/sched_xetscheduler.test: Likewise. + * tests/seccomp.test: Likewise. + * tests/select.test: Likewise. + * tests/sendfile.test: Likewise. + * tests/sendfile64.test: Likewise. + * tests/splice.test: Likewise. + * tests/statx.sh: Likewise. + * tests/sysinfo.test: Likewise. + * tests/syslog.test: Likewise. + * tests/tee.test: Likewise. + * tests/time.test: Likewise. + * tests/timer_create.test: Likewise. + * tests/timer_xettime.test: Likewise. + * tests/timerfd_xettime.test: Likewise. + * tests/times-fail.test: Likewise. + * tests/times.test: Likewise. + * tests/truncate.test: Likewise. + * tests/truncate64.test: Likewise. + * tests/umask.test: Likewise. + * tests/umount.test: Likewise. + * tests/umount2.test: Likewise. + * tests/userfaultfd.test: Likewise. + * tests/vmsplice.test: Likewise. + * tests/xet_robust_list.test: Likewise. + * tests/xetitimer.test: Likewise. + * tests/xetpgid.test: Likewise. + * tests/xetpriority.test: Likewise. + * tests/xettimeofday.test: Likewise. + + tests: introduce $NAME. + * tests/init.sh (NAME): New variable, defined to ${ME_%.test}. + (run_prog, match_awk, match_diff, match_grep): Replace ${ME_%.test} + with $NAME. + * tests/fcntl.test: Likewise. + * tests/fstat.test: Likewise. + * tests/mmap.test: Likewise. + * tests/net-y-unix.test: Likewise. + * tests/net-yy-inet.test: Likewise. + * tests/net-yy-unix.test: Likewise. + * tests/open.test: Likewise. + * tests/openat.test: Likewise. + * tests/poll.test: Likewise. + * tests/ppoll.test: Likewise. + * tests/readlink.test: Likewise. + * tests/select.test: Likewise. + * tests/statx.sh: Likewise. + * tests/uname.test: Likewise. + +2016-03-30 Dmitry V. Levin + + tests: move definitions of $OUT and $ERR to init.sh. + As virtually every test defines either one or both of OUT and ERR + variables and these definitions are exactly the same, move definitions + of these variables from individual tests to init.sh. + + * tests/init.sh (OUT, ERR): New variables. + * tests/ipc.sh: Remove initialization of OUT variable. + * tests/statx.sh: Likewise. + * tests/*.test: Remove initialization of OUT and ERR variables. + +2016-03-29 Dmitry V. Levin + + tests: simplify sendfile.test and sendfile64.test. + Use the executable itself for input by default. + + * tests/sendfile.c (main): Use av[0] instead of av[1] for input. + * tests/sendfile64.c (main): Likewise. + * tests/sendfile.test: Invoke run_prog without arguments. + * tests/sendfile64.test: Likewise. + +2016-03-29 Dmitry V. Levin + + open.test, openat.test: lift /proc requirement. + While -P option needs /proc to match descriptors, it does not use + /proc to match pathnames. As these tests do not need descriptor + match, the /proc requirement can be safely lifted. + + * tests/open.test: Lift /proc/self/fd/ requirement. + * tests/openat.test: Likewise. + +2016-03-29 Dmitry V. Levin + + quotactl: add decoding of Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA. + * quota.c (if_nextdqblk): New structure. + (decode_cmd_data): Handle Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA. + + Update Q_* constants. + * xlat/quotacmds.in: Add Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA introduced + by linux kernel commits v4.6-rc1~65^2~9^2~5 and v4.6-rc1~65^2~9^2~6. + + Update CLONE_* constants. + * xlat/clone_flags.in: Rename CLONE_STOPPED to CLONE_NEWCGROUP. + The former was removed by linux kernel commit v2.6.38-rc1~217. + The latter was introduced by linux kernel commit v4.6-rc1~67^2~8. + + Update BPF_MAP_TYPE_* constants. + * xlat/bpf_map_types.in: Add BPF_MAP_TYPE_PERCPU_HASH, + BPF_MAP_TYPE_PERCPU_ARRAY, and BPF_MAP_TYPE_STACK_TRACE introduced by + linux kernel commits v4.6-rc1~91^2~326^2~5, v4.6-rc1~91^2~326^2~4, and + v4.6-rc1~91^2~212^2~1, respectively. + + Update SO_* constants. + * xlat/sockoptions.in: Add SO_CNX_ADVICE introduced by linux kernel + commit v4.6-rc1~91^2~176. + + Update SEGV_* constants. + * xlat/sigsegv_codes.in: Add SEGV_PKUERR introduced by linux kernel + commit v4.6-rc1~68^2~23. + + avr32: wire up copy_file_range syscall. + * linux/avr32/syscallent.h [325]: Add copy_file_range entry. + +2016-03-28 JayRJoshi + + tests/uname.test: check abbreviated output, use print_quoted_string. + * tests/uname.c (main): Use print_quoted_string to print + utsname members. Add abbrev check. + * tests/uname.test: Add abbrev check. + +2016-03-28 Dmitry V. Levin + + faccessat.test: robustify against libcs invoking faccessat syscall on their own + * tests/faccessat.c (TMP_FILE): Rename to sample, change its value + to "faccessat.sample". + * tests/faccessat.test: Rewrite using openat.test. + + openat.test: robustify against libcs invoking openat syscall on their own + * tests/openat.c (main): Rename fname to sample, change its value + to "openat.sample". + * tests/openat.test: Use -P option to filter out openat syscalls + made by libc and dynamic linker. + + tests: add open.test. + * tests/open.c: New file. + * tests/open.test: New test. + * tests/.gitignore: Add open. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add open.test. + +2016-03-27 Dmitry V. Levin + + Update generic ioctl entries from linux 4.5. + * linux/64/ioctls_inc.h: Update from linux v4.5 using ioctls_gen.sh. + * linux/32/ioctls_inc_align32.h: Likewise. + * linux/32/ioctls_inc_align64.h: Likewise. + * NEWS: Mention this. + +2016-03-26 Dmitry V. Levin + + maint: update for linux 4.5. + * maint/ioctls_sym.sh: Update workarounds for drm/*_drm.h files. + Add workarounds for xen/gntdev.h and net/nfc/nci_core.h files. + Update path of saa6588.h and exynos-fimc.h files. + +2016-03-25 Dmitry V. Levin + + Fix decoding of device numbers in mknod and mknodat syscalls. + * mknod.c (decode_mknod): Treat device number argument as unsigned int. + * tests/mknod.c: Include or + for definition of makedev macro. + (main): Add a check for a character special file. + +2016-03-25 Dmitry V. Levin + + sparc64: fix decoding of mknod and mknodat syscalls for sparc personality + Remove remnants of solaris personality support in mknod parser + that resulted to sparc personality being decoded as old solaris + personality. This complements commit v4.10-45-gdf4dd8b and fixes + commit v4.10-46-g588a90f. + + * mknod.c (decode_mknod) [SPARC || SPARC64]: Remove. + +2016-03-25 Katerina Koukiou + + tests: add openat.test. + * tests/openat.c: New file. + * tests/openat.test: New test. + * tests/.gitignore: Add openat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add openat.test. + +2016-03-25 Fei Jie + + tests: add renameat.test. + * tests/renameat.c: New file. + * tests/renameat.test: New test. + * tests/.gitignore: Add renameat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add renameat.test. + + tests: add faccessat.test. + * tests/faccessat.c: New file. + * tests/faccessat.test: New test. + * tests/.gitignore: Add faccessat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add faccessat.test. + + tests: add creat.test. + * tests/creat.c: New file. + * tests/creat.test: New test. + * tests/.gitignore: Add creat. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add creat.test. + + tests: add mknod.test. + * tests/mknod.c: New file. + * tests/mknod.test: New test. + * tests/.gitignore: Add mknod. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add mknod.test. + + tests: add syslog.test. + * tests/syslog.c: New file. + * tests/syslog.test: New test. + * tests/.gitignore: Add syslog. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (DECODER_TESTS): Add syslog.test. + +2016-03-23 JayRJoshi + + tests/scm_rights-fd.test: fix pathname regex. + Pathname containing >, }, or non-printable characters was resulting + in failing of the test. + + * tests/scm_rights-fd.test: Fix pathname regex and simplify things. + +2016-03-24 Dmitry V. Levin + + tests: add strace-r.test. + * tests/strace-r.expected: New file. + * tests/strace-r.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + (EXTRA_DIST): Add strace-r.expected. + + tests: add strace-ttt.test. + * tests/strace-ttt.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + + tests: add strace-tt.test. + * tests/strace-tt.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + + tests: add strace-t.test. + * tests/strace-t.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + + tests: add strace-T.test. + * tests/strace-T.expected: New file. + * tests/strace-T.test: New test. + * tests/Makefile.am (MISC_TESTS): Add it. + (EXTRA_DIST): Add strace-T.expected. + +2016-03-23 Dmitry V. Levin + + tests: split out tests of specific decoders. + Split TESTS into three groups: tests of specific decoders, libunwind + tests, and all other tests. + + * tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test, + bexecve.test, count-f.test, count.test, detach-running.test, + detach-sleeping.test, detach-stopped.test, dumpio.test, + filter-unavailable.test, fork-f.test, ksysent.test, opipe.test, + pc.test, qual_syscall.test, redirect.test, restart_syscall.test, + strace-f.test, and vfork-f.test to MISC_TESTS. + Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS. + Add $(DECODER_TESTS) and $(MISC_TESTS). + +2016-03-23 JayRJoshi + + tests: add getcwd.test. + * tests/getcwd.c: New file. + * tests/getcwd.test: New test. + * tests/.gitignore: Add getcwd. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add getcwd.test. + + tests: add print_quoted_string function to libtests. + * tests/tests.h (print_quoted_string): New prototype. + * tests/print_quoted_string.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + +2016-03-17 Fei Jie + + tests: add xetpriority.test. + * resource.c (SYS_FUNC(getpriority), SYS_FUNC(setpriority)): Print + the second syscall argument using %d format. + * tests/xetpriority.c: New file. + * tests/xetpriority.test: New test. + * tests/.gitignore: Add xetpriority. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add xetpriority.test. + +2016-03-15 Fei Jie + + tests: add flock.test. + * tests/flock.c: New file. + * tests/flock.test: New test. + * tests/.gitignore: Add flock. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add flock.test. + + tests: add sched_xetscheduler.test. + * tests/sched_xetscheduler.c: New file. + * tests/sched_xetscheduler.test: New test. + * tests/.gitignore: Add sched_xetscheduler. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add sched_xetscheduler.test. + +2016-03-15 Dmitry V. Levin + + alpha: fix SOCK_DIAG_BY_FAMILY tests. + This complements commit v4.9-368-g301c65c. + + * tests/netlink_inet_diag.c (check_responses): Align "buf" + on sizeof(long) boundary. + * tests/netlink_unix_diag.c (check_responses): Likewise. + +2016-03-14 Dmitry V. Levin + + Update EPOLL* constants. + * xlat/epollevents.in: Add EPOLLWAKEUP and EPOLLEXCLUSIVE. + +2016-03-12 Dmitry V. Levin + + tests: add count-f.test. + * tests/count-f.c: New file. + * tests/count-f.expected: Likewise. + * tests/count-f.test: New test. + * tests/.gitignore: Add count-f. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (count_f_LDADD): New variable. + (EXTRA_DIST): Add count-f.expected. + (TESTS): Add count-f.test. + +2016-02-21 Dmitry V. Levin + + hppa: wire up copy_file_range syscall. + * linux/hppa/syscallent.h [346]: Add copy_file_range entry. + +2016-03-11 Fei Jie + + tests: filter strace output in uname test. + * tests/uname.test: Use uniq to filter strace output. + +2016-03-10 Fei Jie + + tests: add sched_xetparam.test. + * tests/sched_xetparam.c: New file. + * tests/sched_xetparam.test: New test. + * tests/.gitignore: Add sched_xetparam. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add sched_xetparam.test. + + tests: add sched_get_priority_mxx.test. + * tests/sched_get_priority_mxx.c: New file. + * tests/sched_get_priority_mxx.test: New test. + * tests/.gitignore: Add sched_get_priority_mxx. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add sched_get_priority_mxx.test. + + tests: add dup.test, dup2.test, and dup3.test. + * tests/dup.c: New file. + * tests/dup.test: New test. + * tests/dup2.c: New file. + * tests/dup2.test: New test. + * tests/dup3.c: New file. + * tests/dup3.test: New test. + * tests/.gitignore: Add dup, dup2, and dup3. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add dup.test, dup2.test, and dup3.test. + +2016-03-10 Fabien Siron + + tests: add fchmod.test. + * tests/fchmod.c: New file. + * tests/fchmod.test: New test. + * tests/.gitignore: Add fchmod. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add fchmod.test. + +2016-03-09 Fei Jie + + tests: add acct.test. + * tests/acct.c: New file. + * tests/acct.test: New test. + * tests/.gitignore: Add acct. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add acct.test. + +2016-03-07 Anchit Jain + + tests: add chmod.test. + * tests/chmod.c: New file. + * tests/chmod.test: New test. + * tests/.gitignore: Add chmod. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add chmod.test. + +2016-03-05 Nahim El Atmani + + Reduce memory usage while managing tcbs allocation. + * strace.c (init): Remove initial memory allocation for tcbtab. + (expand_tcbtab): Do initial memory allocation when tcbtabsize == 0. + + Reviewed-By: Gabriel Laskar + Reported-by: haris iqbal + +2016-03-01 Fei Jie + + tests: add umask.test. + * tests/umask.c: New file. + * tests/umask.test: New test. + * tests/.gitignore: Add umask. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add umask.test. + + tests: add rename.test. + * tests/rename.c: New file. + * tests/rename.test: New test. + * tests/.gitignore: Add rename. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add rename.test. + + tests: add uname.test. + * tests/uname.c: New file. + * tests/uname.test: New test. + * tests/.gitignore: Add uname. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add uname.test. + +2016-02-20 Dmitry V. Levin + + mips: wire up copy_file_range syscall. + * linux/mips/syscallent-n32.h [6324]: Add copy_file_range entry. + * linux/mips/syscallent-n64.h [5320]: Likewise. + * linux/mips/syscallent-o32.h [4360]: Likewise. + +2016-02-19 Dmitry V. Levin + + tests: add rt_sigsuspend.test. + * tests/rt_sigsuspend.c: New file. + * tests/rt_sigsuspend.test: New test. + * tests/.gitignore: Add rt_sigsuspend. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add rt_sigsuspend.test. + + Print pid_t arguments of rt_sigqueueinfo and rt_tgsigqueueinfo as int. + * signal.c (SYS_FUNC(rt_sigqueueinfo)): Print first syscall argument + using %d format. + (SYS_FUNC(rt_tgsigqueueinfo)): Print first and second syscall arguments + using %d format. + * tests/rt_tgsigqueueinfo.c: New file. + * tests/rt_tgsigqueueinfo.test: New test. + * tests/.gitignore: Add rt_tgsigqueueinfo. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add rt_tgsigqueueinfo.test. + + getrusage.test: fix build on x32. + * tests/getrusage.c: Include + (main): Print members of struct timeval using %ju format. + +2016-02-19 Dmitry V. Levin + + getrusage.test: check that getrusage parser does not access extra memory + Place struct rusage at the end of an allocated memory page followed by + an inaccessible page. + + * tests/getrusage.c (main): Use tail_alloc. + +2016-02-19 Fei Jie + + tests: add getrusage.test. + * tests/getrusage.c: New file. + * tests/getrusage.test: New test. + * tests/.gitignore: Add getrusage. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add getrusage.test. + +2016-02-19 Dmitry V. Levin + + Print rt_sigtimedwait return value as a signal name. + * signal.c (SYS_FUNC(rt_sigtimedwait)): Decode return value. + * tests/rt_sigtimedwait.c: New file. + * tests/rt_sigtimedwait.test: New test. + * tests/.gitignore: Add rt_sigtimedwait. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add rt_sigtimedwait.test. + + tests: add rt_sigprocmask.test. + * tests/rt_sigprocmask.c: New file. + * tests/rt_sigprocmask.test: New test. + * tests/.gitignore: Add rt_sigprocmask. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add rt_sigprocmask.test. + + Fix corner cases of rt_sigpending syscall decoder. + * signal (print_sigset_addr_len_limit): New function, cloned from + print_sigset_addr_len with added minimal length argument. + Treat length less than minimal length or greater than NSIG/8 as invalid. + Do not align length to 4-byte boundary. Align destination buffer + to 4-byte boundary and initialize it with zeroes so that subsequent + call to sprintsigmask_n will not access uninitialized data. + (print_sigset_addr_len): Turn into a wrapper around + print_sigset_addr_len_limit with current_wordsize + as a minimal length argument. + (SYS_FUNC(rt_sigpending)): Call print_sigset_addr_len_limit + instead of print_sigset_addr_len with 1 as a minimal length argument. + * tests/rt_sigpending.c: New file. + * tests/rt_sigpending.test: New test. + * tests/.gitignore: Add rt_sigpending. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add rt_sigpending.test. + +2016-02-19 Dmitry V. Levin + + Change unix_diag requests back to use full dump instead of exact match. + Unfortunately, 64-bit linux kernel has a bug in matching inode numbers + greater than INT_MAX, so unix_diag exact match is not reliable. + + This partially reverts commit 69bfc89770152033d4aa0bc5673fc46e65d89838. + + * socketutils.c (unix_send_query): Add NLM_F_DUMP to nlmsg_flags, + remove initialization of udiag_cookie. + * tests/netlink_unix_diag.c (send_query): Remove "inode" argument, + add NLM_F_DUMP to nlmsg_flags, remove initialization of udiag_ino + and udiag_cookie. + (check_responses): Remove "inode" argument and its use. + (main): Remove invocation of inode_of_sockfd and passing of listening + socket inode to send_query and check_responses. + +2016-02-19 Michael Shigorin + + tests: avoid using cpp -dD. + -dD is less portable across some peculiar preprocessors. + + tests/Makefile.am (ksysent.h): Use cpp -dM instead of cpp -dD. + +2016-02-16 Dmitry V. Levin + + tests: add poll.test. + * tests/poll.c: New file. + * tests/poll.test: New test. + * tests/.gitignore: Add poll. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add poll.test. + + Fix abbreviated output of poll and ppoll decoders. + * poll.c (decode_poll_entering, decode_poll_exiting): Fix corner cases + of abbreviated output. + * tests/ppoll-v.expected: Update. + * tests/ppoll.expected: Update. + * tests/ppoll.test: Update. + + Print unfetchable address in poll and ppoll decoders. + * poll.c (decode_poll_entering): Replace umove call with + umove_or_printaddr. + (decode_poll_exiting): Print unfetchable address when umove call fails. + + Print offsets in lseek and _llseek syscalls as signed integers. + * lseek.c (SYS_FUNC(lseek)): Print offset using %lld format. + (SYS_FUNC(llseek)): Likewise. Treat high and low components of offset + as unsigned long integers. + * tests/llseek.c (main): Check that negative offset is printed properly. + * tests/lseek.c (main): Likewise. + +2016-02-14 Dmitry V. Levin + + tests: add xetpgid.test. + * tests/xetpgid.c: New file. + * tests/xetpgid.test: New test. + * tests/.gitignore: Add xetpgid. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add xetpgid.test. + + tests: add alarm.test. + * tests/alarm.c: New file. + * tests/alarm.test: New test. + * tests/.gitignore: Add alarm. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add alarm.test. + + Replace printargs_lu and printargs_ld with printargs_u and printargs_d. + * defs.h (printargs_lu): Rename to printargs_u. + (printargs_ld): Rename to printargs_d. + * syscall.c (printargs_lu): Rename to printargs_u. Replace %lu with %u. + (printargs_ld): Rename to printargs_d. Replace %ld with %d. + * linux/dummy.h (sys_getpgrp): Change to printargs. + (sys_alarm): Change to printargs_u. + (sys_getpgid, sys_getsid, sys_nice, sys_setpgid, sys_setpgrp, + sys_timer_delete, sys_timer_getoverrun): Change to printargs_d. + + Change printargs_lu and printargs_ld to return RVAL_DECODED. + * syscall.c (printargs_lu, printargs_ld): Return RVAL_DECODED. + + redirect.test: fix the way how strace output is discarded. + * tests/redirect.test: Disable tracing of syscalls, signals, + and exit status instead of redirecting strace output to /dev/null. + + tests: extend coverage of struct iovec arrays. + * tests/readv.c (main): Check decoding of empty, inaccessible, + and partially inaccessible iovec arrays. + * tests/readv.test: Update. + + Implement dumping of vmsplice syscall. + * syscall.c (dumpio): Add SEN_vmsplice. + * NEWS: Mention this. + * tests/vmsplice.c: New file. + * tests/vmsplice.test: New test. + * tests/.gitignore: Add vmsplice. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add vmsplice.test. + + tests: add tee.test. + * tests/tee.c: New file. + * tests/tee.test: New test. + * tests/.gitignore: Add tee. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add tee.test. + + Fix printing of negative offsets in splice syscall. + * io.c (SYS_FUNC(splice)): Use PRId64 instead of PRIu64 for printing + offsets. + * tests/splice.c: New file. + * tests/splice.test: New test. + * tests/.gitignore: Add splice. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add splice.test. + + Implement copy_file_range syscall decoding. + * copy_file_range.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/32/syscallent.h (copy_file_range): New entry. + * linux/64/syscallent.h: Likewise. + * linux/arm/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/powerpc64/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/sparc64/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * pathtrace.c (pathtrace_match): Add SEN_copy_file_range. + * NEWS: Mention new syscall parser. + * tests/copy_file_range.c: New file. + * tests/copy_file_range.test: New test. + * tests/.gitignore: Add copy_file_range. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add copy_file_range.test. + + Update fs *_MAGIC constants. + * xlat/fsmagic.in: Add CGROUP2_SUPER_MAGIC and OVERLAYFS_SUPER_MAGIC. + + Update IPV6_* constants. + * xlat/sockipv6options.in: Add IPV6_HDRINCL. + + Update SO_* constants. + * xlat/sockoptions.in: Add SO_ATTACH_REUSEPORT_CBPF + and SO_ATTACH_REUSEPORT_EBPF. + + Update MADV_* constants. + * xlat/madvise_cmds.in: Add MAD_FREE. + +2016-02-13 Dmitry V. Levin + + tests: robustify execve and execveat tests. + * tests/execve.c (main): Use one page gap between two mapped regions + for an address that is more likely to be not yet mapped. + * tests/execveat.c (main): Likewise. + + tests: simplify execve test. + * tests/execve.c (main): Simplify the test assuming that execve syscall + never returns ENOSYS. + +2016-02-13 Dmitry V. Levin + + Fix numbers of syscall arguments in syscall tables. + This semi-automatic change brings syscall tables in sync with kernel's + include/linux/syscalls.h file. + + * linux/aarch64/syscallent.h (recv): Fix nargs. + * linux/alpha/syscallent.h (sigaltstack, init_module, + sched_getscheduler, settimeofday): Likewise. + * linux/arm/syscallent.h (signal, pciconfig_iobase, msgrcv, msgctl, + shmat, shmdt, shmctl, semtimedop, get_mempolicy, set_mempolicy, + timerfd_create): Likewise. + * linux/bfin/syscallent.h (signal, delete_module): Likewise. + * linux/hppa/syscallent.h (init_module, munlockall, sched_getscheduler, + io_cancel, set_tid_address, listxattr, llistxattr, flistxattr, + removexattr, lremovexattr, fremovexattr): Likewise. + * linux/i386/syscallent.h (signal, mmap): Likewise. + * linux/ia64/syscallent.h (init_module, readv, writev, + sched_getscheduler): Likewise. + * linux/m68k/syscallent.h (signal, request_key): Likewise. + * linux/microblaze/syscallent.h (signal, clone, fstatfs64, vmsplice): + Likewise. + * linux/mips/syscallent-n32.h (getpgid, statfs, fstatfs, init_module, + delete_module): Likewise. + * linux/mips/syscallent-n64.h (getpgid, statfs, fstatfs, init_module, + delete_module): Likewise. + * linux/mips/syscallent-o32.h (signal, statfs, fstatfs, ioperm, + fstatfs64): Likewise. + * linux/powerpc/syscallent.h (signal, spu_run, spu_create): Likewise. + * linux/powerpc64/syscallent.h (signal, pread64, pwrite64, readahead, + fadvise64, lookup_dcookie, spu_run, spu_create, sync_file_range2, + fallocate, preadv, pwritev, fanotify_mark): Likewise. + * linux/s390/syscallent.h (signal, mmap, lookup_dcookie, ipc): Likewise. + * linux/s390x/syscallent.h (signal, ipc): Likewise. + * linux/sh/syscallent.h (signal, ipc, munlockall, fstatfs64, vmsplice): + Likewise. + * linux/sh64/syscallent.h (signal, ipc, msgrcv, msgctl, shmat, shmdt, + shmctl, fstatfs64, vmsplice): Likewise. + * linux/sparc/syscallent.h (ptrace, dup, signal, ipc): Likewise. + * linux/sparc64/syscallent.h (ptrace, dup, signal, pread64, pwrite64, + readahead, lookup_dcookie, fadvise64, fadvise64_64, ipc, + sync_file_range, fallocate, preadv, pwritev, fanotify_mark): Likewise. + * linux/x32/syscallent.h (64:recvmsg): Likewise. + * linux/xtensa/syscallent.h (mremap, futex, reboot, init_module, + delete_module, request_key, getcpu, ioprio_set, ioprio_get, utimensat, + futimesat, fchmodat, faccessat): Likewise. + * NEWS: Mention this fix. + +2016-02-13 Dmitry V. Levin + + s390: decode fadvise64 and fadvise64_64. + * linux/s390/syscallent.h (fadvise64): Set sys_func. + (fadvise64_64): Set nargs and sys_func. + + mips n64: use the most optimal parser for fadvise64 syscall. + * linux/mips/syscallent-n64.h (fadvise64): Replace SEN(fadvise64_64) + with SEN(fadvise64). + + ia64: decode fstatfs64 and statfs64. + * linux/ia64/syscallent.h (fstatfs64, statfs64): Set nargs and sys_func. + +2016-02-13 Dmitry V. Levin + + alpha, ia64, mips, sh, sh64: fix the number of pipe syscall arguments. + On alpha, ia64, mips, sh, sh64, sparc, and sparc64 architectures + pipe syscall does not take arguments. + + * linux/alpha/syscallent.h (pipe): Change nargs to 0. + * linux/ia64/syscallent.h (pipe): Likewise. + * linux/mips/syscallent-n32.h (pipe): Likewise. + * linux/mips/syscallent-n64.h (pipe): Likewise. + * linux/mips/syscallent-o32.h (pipe): Likewise. + * linux/sh/syscallent.h (pipe): Likewise. + * linux/sh64/syscallent.h (pipe): Likewise. + +2016-02-13 Dmitry V. Levin + + alpha, ia64, mips, sh*, sparc*: fix error path decoding of pipe syscall. + * net.c (do_pipe) [HAVE_GETRVAL2]: Remove. + Always call decode_pair_fd on exiting. + (SYS_FUNC(pipe)) [HAVE_GETRVAL2]: Call printpair_fd instead of do_pipe. + + Fix pathtrace match for pipe2 syscall. + * pathtrace.c (pathtrace_match): As pipe2 syscall has no descriptors + or paths to test, move SEN_pipe2 to the appropriate category. + + avr32: wire up missing syscalls. + * linux/avr32/syscallent.h [322..324]: Add userfaultfd, membarrier, + and mlock2 entries. + +2016-02-12 Dmitry V. Levin + + tests: check decoding of madvise, mlockall, mremap, and msync syscalls. + * tests/mmap.c (main): Change output format from regexp to verbatim. + Add tests for madvise, mlockall, mremap, and msync syscalls. + * tests/mmap.test: Convert from match_grep to match_diff. + Add madvise, mlockall, mremap, and msync syscalls to syscall filter. + +2016-02-11 Dmitry V. Levin + + Simplify decoding of waitpid and wait4 syscalls. + * wait.c (printwaitn): Replace "n" and "bitness" integer arguments + with a single print_rusage function pointer. All callers updated. + + waitid: print pid argument as int. + * wait.c (SYS_FUNC(waitid)): As the type of second syscall argument + in the kernel is pid_t, print it as int. + + waitid: always print 5th argument. + * wait.c (SYS_FUNC(waitid)): Do not check for tcp->s_ent->nargs + as waitid syscall has 5 arguments. + + socketutils: add const qualifier to variables. + * socketutils.c (cache_and_print_inode_details): Make "details" + parameter const. + (print_sockaddr_by_inode_cached): Make "e" variable const. + (inet_send_query): Make struct nlmsghdr and struct inet_diag_req_v2 + members const. Make "msg" variable const. + (inet_parse_response): Make "data" parameter and diag_msg variable const. + (receive_responses): Make "h" and "rc" variables const. + (unix_send_query): Make struct nlmsghdr and struct unix_diag_req + members const. Make "msg" variable const. + (unix_print): Make all parameters const. + (print_sockaddr_by_inode): Make proto_name parameter const. + + print_sockaddr_by_inode: cleanup protocol lookup. + * socketutils.c (tcp_v4_print, udp_v4_print, tcp_v6_print, + udp_v6_print): New functions. + (print_sockaddr_by_inode): Make "protocols" array static, replace + "family" and "protocol" members with "print" in its underlying + structure. Iterate through protocols array when the protocol name + is specified. + +2016-02-09 Dmitry V. Levin + + tests: check that -f -p attaches to threads properly. + Check that -f -p attaches and follows all threads of the given pid. + + * tests/attach-f-p.c: New file. + * tests/attach-f-p.test: New test. + * tests/.gitignore: Add attach-f-p. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (attach_f_p_LDADD): New variable. + (TESTS): Add attach-f-p.test. + +2016-02-09 Dmitry V. Levin + + Introduce libstrace.a for potentially conditional compilation units. + Some files are used conditionally depending on architecture and + configuration. Create a library for the purpose of keeping such + compilation units. + + * Makefile.am (strace_LDADD, noinst_LIBRARIES): Add libstrace.a. + (libstrace_a_CPPFLAGS): New variable, set to $(strace_CPPFLAGS). + (libstrace_a_CFLAGS): New variable, set to $(strace_CFLAGS). + (libstrace_a_SOURCES): New variable, set to upeek.c. + * util.c (upeek): Move ... + * upeek.c: ... here. + +2016-02-08 Dmitry V. Levin + + travis-ci: pass more gcov arguments to codecov. + + tests: extend coverage of struct itimerspec. + * tests/timer_xettime.c (main): Check decoding of NULL struct itimerspec + pointer. + + tests: extend coverage of utimensat syscall. + * tests/utimensat.c (main): Check decoding of NULL struct timespec + pointer. + + tests: extend coverage of time syscall. + * tests/time.c (main): Check decoding of NULL time_t pointer. + + tests: extend coverage of struct sigevent. + * tests/timer_create.c (main): Check decoding of NULL struct sigevent + pointer. Check decoding of invalid sigev_notify value. + +2016-02-08 Dmitry V. Levin + + tests: extend coverage of execve and execveat syscalls. + Check decoding of inaccessible or partially inaccessible arrays. + + * tests/execve-v.c: New file. + * tests/execveat-v.c: Likewise. + * tests/execve-v.test: New test. + * tests/execveat-v.test: Likewise. + * tests/execve.c: Rewrite. + * tests/execveat.c: Likewise. + * tests/execve.test: Likewise. + * tests/execveat.test: Likewise. + * tests/execve.expected: Remove. + * tests/execve-v.expected: Likewise. + * tests/execveat.expected: Likewise. + * tests/execveat-v.expected: Likewise. + * tests/.gitignore: Add execve-v and execveat-v. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add execve-v.test and execveat-v.test. + (EXTRA_DIST): Remove execve.expected, execve-v.expected, + execveat.expected, and execveat-v.expected. + +2016-02-08 Dmitry V. Levin + + Fix decoding of execve and execveat syscalls with invalid input. + * execve.c (printargv): Fix decoding of inaccessible or partially + inaccessible array. + (printargc): Diagnose inaccessible or partially inaccessible array. + (decode_execve, SYS_FUNC(execv)): Update printargv and printargc callers. + + tests: extend coverage of capget syscall. + * tests/caps.c (main): Check decoding of inaccessible cap_user_header_t + and/or cap_user_data_t. + * tests/caps.awk: Update match patterns. + * tests/caps.test: Update. + + tests: extend coverage of sched_getaffinity syscall. + * tests/sched_xetaffinity.c (main): Check decoding of pointer + to inaccessible cpu_set_t. + + tests: extend coverage of utime syscall. + * tests/utime.c (main): Check decoding of NULL struct utimbuf pointer. + Check decoding of struct utimbuf located at the end of page boundary. + * tests/utime.test: Update. + + tests: extend coverage of sysinfo syscall. + * tests/sysinfo.c (main): Check decoding of NULL struct sysinfo pointer. + Check decoding of struct sysinfo located at the end of page boundary. + * tests/sysinfo.test: Update. + + tests: extend coverage of adjtimex syscall. + * tests/adjtimex.c (main): Check decoding of NULL struct timex pointer. + Check decoding of struct timex located at the end of page boundary. + * tests/adjtimex.test: Update. + + tests: check that strace does not retain stdin and stdout descriptors. + * tests/redirect.test: New test. + * tests/Makefile.am (TESTS): Add it. + + Create a dummy pipe descriptor instead of opening /dev/null. + * strace.c (open_dev_null): Rename to open_dummy_desc. All callers + changed. Create a pipe and return its first descriptor instead of + opening /dev/null. + +2016-02-08 Denys Vlasenko + + If stdin/stdout aren't open on startup, open them to /dev/null. + Otherwise, -oLOGFILE may end up using one of them. This conflicts + with the previous change, which closes stdin/out in strace. + + * strace.c (init): If fcntl(F_GETFD) fails on stdin or stdout, + sanitize them: open /dev/null and dup it until fds 0,1,2 + are all used up. + +2016-02-08 Denys Vlasenko + + Close stdin/out after child is forked. + Testcase: + + { sleep 1; yes | head -n99999; } | strace -o/dev/null sh -c 'exec <&-; sleep 9' + + The writer (head) will be able to perform writes to write end of the pipe. + With strace call removed, head will immediately get SIGPIPE. + + This change fixes this: now writer immediately gets SIGPIPE with strace too. + + * strace.c (startup_child): Close stdin/out and reopen them to /dev/null. + +2016-02-05 Dmitry V. Levin + + tests: add opipe.test. + Check that -o |pipe_command works. In particular, check that + strace waits for completion of piped command. + + * tests/opipe.test: New test. + * tests/Makefile.am (TESTS): Add it. + +2016-02-05 Keith Owens + + strace-graph: print the pid in the graph. + * strace-graph: Prefix each command with its pid. + + strace-graph: cope with clone immediately followed by exit. + * strace-graph: A clone() followed by exit() with no intervening fork + or execve resulted in the new pid having no seq key. That breaks when + trying to use seq as an array reference. Ensure that clone populates + the new pid with an empty seq entry. + + strace-graph: handle recent strace output. + * strace-graph: Fix regex for --SIG. Ignore '+++ exited with +++' + lines. Handle exit_group syscall as well as _exit. + + strace-graph: handle strace -T. + * strace-graph: Ignore extra ' ' field added by strace -T. + + strace-graph: use "strict" and "warnings" pragmas. + * strace-graph: Set "use strict" and "use warnings" options. Fix errors + detected by strict/warnings. $result is really a string, it can be "-1" + followed by an error text. + +2016-02-04 Dmitry V. Levin + + Add README.md file with links to build status and test coverage. + + travis-ci: prepare and submit test coverage report. + + tests: extend readlink and readlinkat coverage. + * tests/readlink.c (PREFIX, TARGET, LINKPATH): New macros. + (main): Allocate memory for string and buffer passed to the syscall + being tested using tail_alloc mechanism. Create and cleanup test + symlink. Test syscall error path output. Print hexquoted strings + using hexquote_strndup. + * tests/readlinkat.c: Likewise. + * tests/readlink.test: Remove creation and cleanup of test symlinks. + + tests: add hexquote_strndup function to libtests. + * tests/tests.h (hexquote_strndup): New prototype. + * tests/hexquote_strndup.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + + readlinkat.test: use readlink.test. + * tests/readlink.test (syscall): Initialize from $0. + * tests/readlinkat.test: Source readlink.test. + +2016-02-04 Gabriel Laskar + + Add configure --enable-code-coverage option. + * m4/ax_code_coverage.m4: New file. + * configure.ac: Use AX_CODE_COVERAGE. + * Makefile.am: Add @CODE_COVERAGE_RULES@. + (CODE_COVERAGE_LCOV_OPTIONS, CODE_COVERAGE_GENHTML_OPTIONS, + CODE_COVERAGE_IGNORE_PATTERN): New variables. + (strace_CPPFLAGS): Add $(CODE_COVERAGE_CPPFLAGS). + (strace_CFLAGS): Add $(CODE_COVERAGE_CFLAGS). + (strace_LDADD): Add $(CODE_COVERAGE_LDFLAGS). + * .gitignore: Add *.gcda and *.gcno. + +2016-02-03 Dmitry V. Levin + + Makefile.am: introduce strace_CFLAGS and derivatives. + * Makefile.am (strace_CFLAGS): New variable, set to $(AM_CFLAGS). + (libmpers_CFLAGS): New variable, set to $(strace_CFLAGS). + (libmpers_m32_a_CFLAGS, libmpers_mx32_a_CFLAGS): New variables, + set to $(libmpers_CFLAGS). + + Makefile.am: use strace_CPPFLAGS consistently. + * Makefile.am (libmpers_CPPFLAGS): Replace $(AM_CPPFLAGS) + with $(strace_CPPFLAGS). + +2016-02-03 Dmitry V. Levin + + tests: replace net-fd.test with net-y-unix.test. + Unlike the former test that was based on match_grep, + the new one uses match_diff and does more rigorous testing. + + * tests/net-y-unix.c: New file. + * tests/net-y-unix.test: New test. + * tests/net-fd.test: Remove. + * tests/net-fd.expected: Remove. + * tests/.gitignore: Add net-y-unix. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Replace net-fd.test with net-y-unix.test. + (net-fd.log): Remove. + (EXTRA_DIST): Remove net-fd.expected. + +2016-02-03 Dmitry V. Levin + + Implement caching of print_sockaddr_by_inode. + As -yy parser, compared to -y, needs to do at least 5 extra syscalls + (getxattr, socket, sendmsg, recvmsg, close) to print socket details, + caching results of netlink conversations between strace and kernel + noticeably reduces amount of system time spent by strace. + + The caching is safe since sockets do not change their addresses after + successful bind or connect syscall. + + * defs.h (string_quote, print_sockaddr_by_inode_cached): New prototypes. + * socketutils.c (cache_entry): New type. + (CACHE_SIZE, CACHE_MASK): New macros. + (cache): New static array. + (cache_and_print_inode_details): New static function. + (print_sockaddr_by_inode_cached): New function. + (inet_parse_response, unix_parse_response): Use + cache_and_print_inode_details. + * util.c (printfd): Use string_quote and print_sockaddr_by_inode_cached. + (string_quote): Remove static qualifier. + * NEWS: Mention this improvement. + * tests/unix-yy.c (main): Update. + +2016-02-03 Dmitry V. Levin + + Change unix_diag requests to use exact match instead of full dump. + * socketutils.c (unix_send_query): Remove NLM_F_DUMP from nlmsg_flags, + initialize udiag_cookie. + * tests/netlink_unix_diag.c (send_query): Remove "family" and "proto" + arguments, add "inode" argument, remove NLM_F_DUMP from nlmsg_flags, + initialize udiag_ino and udiag_cookie. + (check_responses): Add "inode" argument, check inode match. + (main): Pass listening socket inode to send_query and check_responses. + + Robustify netlink response parsers. + * socketutils.c (inet_parse_response, unix_parse_response): Change + return type from bool to int, return -1 on all parse errors except + inode mismatch. + (receive_responses): Stop on the first nlmsg_type that is not + SOCK_DIAG_BY_FAMILY, also stop when the parser returns -1. + * tests/netlink_inet_diag.c (check_responses): Stop on short messages, + on first nlmsg_type that is not SOCK_DIAG_BY_FAMILY, print more verbose + diagnostics for NLMSG_ERROR. + * tests/netlink_unix_diag.c (check_responses): Likewise. + + inet_parse_response: add a safety check. + * socketutils.c (inet_parse_response): Check that netlink message + is large enough to contain a inet_diag_msg structure. + + receive_responses: avoid potential hangup. + * socketutils.c (receive_responses): Pass MSG_DONTWAIT to recvmsg after + the first recvmsg call to avoid potential hangup. + +2016-02-03 Dmitry V. Levin + + tests: replace net-yy.test with net-yy-inet.test. + Unlike the former test that was based on match_awk, + the new one uses match_diff and does more rigorous testing. + + * tests/net-yy-inet.c: New file. + * tests/net-yy-inet.test: New test. + * tests/net-yy.test: Remove. + * tests/net-yy-accept.awk: Remove. + * tests/net-yy-connect.awk: Remove. + * tests/inet-accept-connect-send-recv.c: Remove. + * tests/.gitignore: Replace inet-accept-connect-send-recv + with net-yy-inet. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Replace net-yy.test with net-yy-inet.test. + (EXTRA_DIST): Remove net-yy-accept.awk and net-yy-connect.awk. + +2016-02-03 Dmitry V. Levin + + tests: replace unix-yy.test with net-yy-unix.test. + Unlike the former test that was based on match_awk, + the new one uses match_diff and does more rigorous testing. + + * tests/net-yy-unix.c: New file. + * tests/net-yy-unix.test: New test. + * tests/unix-yy.test: Remove. + * tests/unix-yy-accept.awk: Remove. + * tests/unix-yy-connect.awk: Remove. + * tests/.gitignore: Add net-yy-unix. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Replace unix-yy.test with net-yy-unix.test. + (EXTRA_DIST): Remove unix-yy-accept.awk and unix-yy-connect.awk. + +2016-02-02 Dmitry V. Levin + + tests: add inode_of_sockfd function to libtests. + * tests/tests.h (inode_of_sockfd): New prototype. + * tests/inode_of_sockfd.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + + unix_parse_response: add a safety check. + * socketutils.c (unix_parse_response): Check that netlink message + is large enough to contain a unix_diag_msg structure. + +2016-01-29 Dmitry V. Levin + + Fixed decoding of mincore syscall's last argument. + * mem.c (SYS_FUNC(mincore)): Print only those bytes of the vector + that were written by the kernel. + * NEWS: Mention this fix. + * tests/mincore.c: New file. + * tests/mincore.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add mincore. + (TESTS): Add mincore.test. + * tests/.gitignore: Add mincore. + +2016-01-23 Dmitry V. Levin + + Move fallback -yy socket print from printfd to print_sockaddr_by_inode. + * util.c (printfd): In -yy mode, move fallback print of proto:[inode] ... + * socketutils.c (to print_sockaddr_by_inode): ... here. + +2016-01-22 Dmitry V. Levin + + Implement simultaneous use of -p option and tracing of a command. + * strace.c (init): Allow -p option along with a command. + (startup_child): In -D mode, record the parent of the tracer process + as strace_child. + (startup_attach): Save trace_tracer_pid before -D mode fork. + When tracing a command in -f mode, do not check for the command's + threads as it has no threads at this moment. + Never attach to the tracer process. + In -D mode, never attach to the parent of the tracer process, + terminate that process only once at the end of startup_attach, + and reset strace_child. + * strace.1: Document that -p option can be used along with tracing + of a command. + * NEWS: Mention it. + * tests/attach-p-cmd-cmd.c: New file. + * tests/attach-p-cmd-p.c: Likewise. + * tests/attach-p-cmd.test: New test. + * tests/.gitignore: Add attach-p-cmd-cmd and attach-p-cmd-p. + * tests/Makefile.am (check_PROGRAMS): Likewise. + (TESTS): Add attach-p-cmd.test. + + This fixes Debian bug #549942. + +2016-01-22 Dmitry V. Levin + + strace.1: fix format of -P description. + * strace.1 (-P): Write trailing using regular font. + +2016-01-21 Dmitry V. Levin + + tests: use local nanosleep based sleep utility replacement. + * tests/sleep.c: New file. + * tests/.gitignore: Add sleep. + * tests/Makefile.am (check_PROGRAMS): Likewise. + * tests/count.test: Use it instead of system sleep utility. + + tests: add error_msg_and_fail function to libtests. + * tests/tests.h (error_msg_and_fail): New prototype. + * tests/error_msg.c (error_msg_and_fail): New function. + +2016-01-20 Dmitry V. Levin + + Fix dumping of recvmmsg syscall in case of short read. + * net.c (dumpiov_in_mmsghdr): Call dumpiov_upto instead of dumpiov, + pass data size limit to dumpiov_upto. + * NEWS: Mention this fix. + * tests/mmsg.c (main): Update. + + Fix dumping of recvmsg syscall in case of short read. + * defs.h (dumpiov_in_msghdr): Add unsigned long argument. + * net.c (dumpiov_in_msghdr): Add data_size argument. Call dumpiov_upto + instead of dumpiov, pass data_size to dumpiov_upto. + * syscall.c (dumpio): Pass data size limit to dumpiov_in_msghdr. + * NEWS: Mention this fix. + * tests/recvmsg.c: New file. + * tests/recvmsg.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add recvmsg. + (TESTS): Add recvmsg.test. + * tests/.gitignore: Add recvmsg. + + Fix decoding and dumping of readv syscall in case of short read. + * defs.h (dumpiov_upto): New prototype. + (dumpiov): Change to a wrapper around dumpiov_upto. + * util.c (dumpiov): Rename to dumpiov_upto, add and check data_size + argument. + * io.c (SYS_FUNC(readv)): Call tprint_iov_upto instead + of tprint_iov and specify syscall return value as a data size limit. + * syscall.c (dumpio): In case of SEN_readv, call dumpiov_upto instead + of dumpiov and specify syscall return value as a data size limit. + * NEWS: Mention this fix. + * tests/readv.c: New file. + * tests/readv.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add readv. + (TESTS): Add readv.test. + * tests/.gitignore: Add readv. + + tests/tests.h: add ARRAY_SIZE and LENGTH_OF macros. + * tests/tests.h (ARRAY_SIZE, LENGTH_OF): New macros. + * tests/aio.c (ARRAY_SIZE): Remove. + * tests/mmsg.c (LENGTH_OF): Remove. + + tests: add hexdump_strdup function to libtests. + * tests/tests.h (hexdump_strdup): New prototype. + * tests/hexdump_strdup.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + + tests: add tprintf function to libtests. + * tests/tests.h (tprintf): New prototype. + * tests/tprintf.c: New file. + * tests/Makefile.am (libtests_a_SOURCES): Add it. + * tests/mmsg.c: Use tprintf. + +2016-01-19 Dmitry V. Levin + + quotactl: add Q_XGETQSTATV command decoding. + * quota.c (fs_qfilestatv, fs_quota_statv): New structures. + (decode_cmd_data): Handle Q_XGETQSTATV case. + + quotactl: add decoding of if_dqinfo.dqi_flags constants. + * xlat/if_dqinfo_flags.in: New file. + * quota.c: Include "xlat/if_dqinfo_flags.h". + (decode_cmd_data): Print struct if_dqinfo.dqi_flags using printflags. + + quotactl: consistenly decode all write and unknown commands on entering. + * quota.c (decode_cmd_data): Change return type to int. + Return 0 on entering Q_GETQUOTA, Q_V1_GETQUOTA, Q_V2_GETQUOTA, + Q_XGETQUOTA, Q_GETFMT, Q_GETINFO, Q_V2_GETINFO, Q_V1_GETSTATS, + Q_V2_GETSTATS, and Q_XGETQSTAT commands, return RVAL_DECODED + for any other command. + (SYS_FUNC(quotactl)): On entering, print third argument of any command. + For any command except Q_QUOTAON and Q_V1_QUOTAON, call decode_cmd_data + and forward its return value. + + quotactl: fix Q_QUOTAON command decoding. + * quota.c (SYS_FUNC(quotactl)): Print Q_QUOTAON 4th argument as a path. + + quotactl: print third argument as unsigned int. + * quota.c (SYS_FUNC(quotactl)): Consistently print the third + argument using "%u" format. + + quotactl: fix Q_XQUOTAOFF command decoding. + * quota.c (decode_cmd_data): Print xfs quota flags argument. + + quotactl: fix Q_GETFMT and Q_XQUOTAON commands decoding. + * quota.c (decode_cmd_data): As quota format value and xfs quota flags + are in-memory constants, print it like an array of one element instead + of a structure. + +2016-01-17 Dmitry V. Levin + + Update quotactl constants. + * xlat/quota_formats.in: Add QFMT_OCFS2 and QFMT_VFS_V1. + * xlat/quotacmds.in: Add Q_XGETQSTATV. + * xlat/quotatypes.in: Add PRJQUOTA. + * xlat/xfs_quota_flags.in: Add FS_QUOTA_PDQ_ACCT and FS_QUOTA_PDQ_ENFD. + +2016-01-19 Dmitry V. Levin + + Replace u_int{8,16,32,64} with uint{8,16,32,64} + * util.c: Replace u_int{32,64} with uint{32,64}. + * quota.c: Replace u_int{8,16,32,64} with uint{8,16,32,64}. + + Move definitions of quotactl constants to xlat files. + * quota.c (Q_*): Move to xlat/quotacmds.in. + (USRQUOTA, GRPQUOTA): Move to xlat/quotatypes.in. + (QFMT_VFS_OLD, QFMT_VFS_V0): Move to xlat/quota_formats.in. + (XFS_QUOTA_*): Move to xlat/xfs_quota_flags.in. + (XFS_*_QUOTA): Move to xlat/xfs_dqblk_flags.in. + (QIF_*): Move to xlat/if_dqblk_valid.in. + (IIF_*): Move to xlat/if_dqinfo_valid.in. + +2016-01-15 Dmitry V. Levin + + llseek.test: robustify against libcs invoking _llseek syscall on their own + * tests/llseek.test: Filter out _llseek calls made with non-negative + descriptor arguments. + + lseek.test: robustify against libcs invoking lseek syscall on their own. + * tests/lseek.test: Filter out lseek calls made with non-negative + descriptor arguments. + +2016-01-14 Dmitry V. Levin + + mmsg.test: fix regression introduced by commit v4.11-138-g6e815ce. + This fixes the test on platforms where both __NR_sendmmsg and + HAVE_SENDMMSG are defined but the former is not implemented by the + kernel and the second is implemented as an indirect syscall. + + * tests/mmsg.c (LENGTH_OF): New macro. + (send_mmsg, recv_mmsg): Print expected output in case of ENOSYS. + (main): Redirect stdout to a new descriptor. Use LENGTH_OF. + Print expected output. + * tests/mmsg.test: Update. + * tests/mmsg.expected: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove mmsg.expected. + +2016-01-13 Dmitry V. Levin + + aio.test: check memory access by aio decoders. + * tests/aio.c (main): Place all objects passed to io_* syscalls + at the end of memory pages followed by inaccessible pages. + +2016-01-13 Dmitry V. Levin + + s390, s390x: fix printing of syscalls unknown to the kernel. + On s390/s390x, syscalls with NR up to 255 can be implemented + directly using "svc NR", for NR >= 256 "svc 0" with %r1=NR is used. + The latter method is allowed for NR < 256, too. + + When the syscall number specified directly or indirectly is recognized + by the kernel, i.e. it is less than its NR_syscalls value, it is stored + in %r2 and is available to arch_get_scno via s390_regset.gprs[2]. + For syscall numbers >= NR_syscalls this register is set to 0, + but %r1 remains unchanged and could be used by arch_get_scno + via s390_regset.gprs[1] to decide what the syscall number is. + + * linux/s390/get_scno.c (arch_get_scno): If s390_regset.gprs[2] is zero, + take syscall number from s390_regset.gprs[1]. + * NEWS: Mention this fix. + + This fixes Debian bug #485979 and Fedora bug #1298294. + +2016-01-13 Dmitry V. Levin + + s390, s390x: print all syscall arguments for syscall number 0. + * linux/s390/syscallent.h [0]: Set nargs to MA. + * linux/s390x/syscallent.h: Likewise. + + mips o32: alias sys_syscall to printargs. + * linux/dummy.h (sys_syscall): Alias to printargs. + * syscall.c [LINUX_MIPSO32] (SYS_FUNC(syscall)): Remove. + +2016-01-13 Dmitry V. Levin + + travis-ci: update build matrix. + Add clang-3.6/x86_64, clang-3.6/x86, and musl-gcc/x86_64 to the matrix. + + * .travis.yml (compiler): Add gcc, clang-3.6, and musl-gcc. + (env): Add matrix, remove global ENABLE_GCC_WERROR. + (matrix): Add exclude, remove include. + * travis-ci.sh: Add support for clang and musl-gcc. + Use --enable-gcc-Werror for gcc build unconditionally. + +2016-01-13 Dmitry V. Levin + + mpers.awk: add support for DWARF files generated by clang. + * mpers.awk: Define default_pointer_size. Initialize byte_size + for DW_TAG_pointer_type to default_pointer_size. Set parent + for DW_TAG_member only. Handle DW_AT_count as an alternative + to DW_AT_upper_bound. + +2016-01-12 Dmitry V. Levin + + configure.ac: reorder some statements for better readability. + * configure.ac: Sort and group together AC_PROG_*, AC_C_*, AC_TYPE_*, + AC_HEADER_*, AC_CHECK_FUNCS, AC_CHECK_TYPES, AC_CHECK_MEMBERS, + and AC_CHECK_HEADERS. + + scm_rights-fd.test: rewrite without fork. + * tests/scm_rights.c (main): Rewrite without fork. + Place all objects passed to sendmsg and recvmsg at the end + of memory pages followed by inaccessible pages. + * tests/scm_rights-fd.test: Update. + + tests: fix clang "duplicate 'const' declaration specifier" warnings. + * tests/ksysent.c (pstr_t): Remove second const specifier. + * tests/mmsg.c (main): Remove second const specifier from one[], two[], + and three[]. + + tests/times.c: fix clang compilation warning. + * tests/times.c (main): Initialize dummy variable. + +2016-01-12 Dmitry V. Levin + + tests/mmsg.c: fix build on rhel6/ppc. + There are weird platforms that define __NR_sendmmsg but at the same time + do not define __NR_recvmmsg. Add a workaround for them. + + * configure.ac (AC_CHECK_FUNCS): Add recvmmsg. + * tests/mmsg.c: Check for __NR_recvmmsg || HAVE_RECVMMSG. + +2016-01-12 Dmitry V. Levin + + s390: fix sigreturn decoding on recent kernels. + Linux kernel commit v4.3-rc1-50-g8d4bd0e corrected uc_sigmask + of the compat signal frame, so remove the old workaround. + + * linux/s390/arch_sigreturn.c (arch_sigreturn) [S390]: Remove. + +2016-01-12 Dmitry V. Levin + + Update PTRACE_* constants. + * ptrace.h (PTRACE_SECCOMP_GET_FILTER): Define. + * xlat/ptrace_cmds.in: Add PTRACE_SECCOMP_GET_FILTER. + +2016-01-12 Dmitry V. Levin + + Fix struct sigevent decoding for musl. + Do not rely on "struct sigevent.__pad" being located at the same address + as "struct sigevent.sigev_notify_thread_id", it's not the case with musl + libc. Do not rely on struct sigevent definition at all to access + sigev_notify_thread_id. + + * configure.ac (AC_CHECK_MEMBERS): Remove struct sigevent._sigev_un._pad + and struct sigevent.__pad. + * sigevent.h: New file. + * Makefile.am (strace_SOURCES): Add it. + * print_sigevent.c: Include it. + * print_sigevent.c (struct_sigevent): Remove. + (print_sigevent): Update all struct_sigevent users. + * tests/timer_create.c: Include "sigevent.h". + (main): Use struct_sigevent instead of struct sigevent, + all struct sigevent clients changed. + +2016-01-12 Dmitry V. Levin + + syscall.c: include + All users of NSIG macro must include . + This complements commit v4.10-184-g0e946ab. + + * syscall.c: Include . + +2016-01-12 Dmitry V. Levin + + signal.c: fix musl libc compilation warning. + musl libc defines SIGRTMAX to a function that returns signed int, + which obviously makes gcc -Wsign-compare unhappy. + + * signal.c (signame): Cast ASM_SIGRTMAX to unsigned int. + +2016-01-12 Dmitry V. Levin + + tests: fix TEST_SYSCALL_{NR,STR} and STRUCT_STAT_STR macros for musl. + The contents of TEST_SYSCALL_NAME and STRUCT_STAT macros was subject + to macro expansion when used in definitions of TEST_SYSCALL_NR, + TEST_SYSCALL_STR, and STRUCT_STAT_STR macros. + + As some libcs, e.g. musl libc, define lfs64 names as macros + (stat64 as stat, lstat64 as lstat, etc.), this might result to incorrect + expansion of TEST_SYSCALL_NR, TEST_SYSCALL_STR, and STRUCT_STAT_STR + macros. To avoid this problem, define these macros directly and remove + TEST_SYSCALL_NAME macro. + + * tests/_newselect.c (TEST_SYSCALL_NAME): Remove. + (TEST_SYSCALL_NR, TEST_SYSCALL_STR): New macros. + * tests/fcntl.c: Likewise. + * tests/fcntl64.c: Likewise. + * tests/fstat.c: Likewise. + * tests/fstatat64.c: Likewise. + * tests/lstat.c: Likewise. + * tests/newfstatat.c: Likewise. + * tests/select.c: Likewise. + * tests/stat.c: Likewise. + * tests/fstat64.c (TEST_SYSCALL_NAME): Remove. + (TEST_SYSCALL_NR, TEST_SYSCALL_STR, STRUCT_STAT_STR): New macros. + * tests/lstat64.c: Likewise. + * tests/stat64.c: Likewise. + * tests/fstatx.c (TEST_SYSCALL_NR, nrify, nrify_): Remove. + * tests/lstatx.c: Likewise. + * tests/struct_flock.c (TEST_SYSCALL_NR, TEST_SYSCALL_STR, nrify, + nrify_, stringify, stringify_): Remove. + * tests/xselect.c: Likewise. + * tests/xstatx.c: Check TEST_SYSCALL_STR instead of TEST_SYSCALL_NAME. + (STRUCT_STAT_STR, TEST_SYSCALL_STR, stringify, stringify_): Remove. + [!STRUCT_STAT] (STRUCT_STAT_STR): New macro. + +2016-01-12 Dmitry V. Levin + + tests/struct_flock.c: fix musl libc compilation warnings. + The size of off_t is not something one can rely upon. For example, + musl libc unconditionally defines it as an int64_t type on x86. + A cast to the target type helps to avoid these libc differences. + + * configure.ac: Call AC_C_TYPEOF. + * tests/struct_flock.c (TYPEOF_FLOCK_OFF_T): New macro. + (test_flock_einval): Use it instead of off_t. + +2016-01-12 Dmitry V. Levin + + tests/inet-cmsg.c: fix musl libc compilation warnings. + The types that are used to define msg_namelen member of struct msghdr + and cmsg_len member of struct cmsghdr differ between libcs. + For example, glibc defines them as size_t, while musl libc - as type + socklen_t. Print these fields using %lu format to avoid issues caused + by libc differences. + + * tests/inet-cmsg.c (main): Cast mh.msg_controllen and c->cmsg_len + to unsigned long and print them using %lu format. + +2016-01-11 Dmitry V. Levin + + aio.test: include instead of + * tests/aio.c: Include instead of . + + mmsg.test: check memory access by sendmmsg and recvmmsg decoders. + * tests/tests.h (tail_memdup): New prototype. + * tests/tail_alloc.c (tail_memdup): New function. + * tests/mmsg.c (main): Place all objects passed to sendmmsg and recvmmsg + at the end of memory pages followed by inaccessible pages. + + mmsg.test: check decoding of flags passed to sendmmsg and recvmmsg. + * tests/mmsg.c (main): Pass MSG_DONTROUTE|MSG_NOSIGNAL to sendmmsg. + Pass MSG_DONTWAIT to recvmmsg. + * tests/mmsg.expected: Update. + +2016-01-11 Dmitry V. Levin + + mmsg.test: prefer direct sendmmsg/recvmmsg syscalls to libc wrappers. + * tests/mmsg.c: Include . + Check for __NR_sendmmsg as an alternative to HAVE_SENDMMSG. + [!HAVE_STRUCT_MMSGHDR] (struct mmsghdr): Define. + (send_mmsg, recv_mmsg): New functions. + (main): Use them instead of sendmmsg and recvmmsg. + + Reported-by: Szabolcs Nagy + +2016-01-10 Dmitry V. Levin + + sigreturn.test: use RT_5 signal number instead of RT_2. + Make the test compatible with musl libc that uses RT_2 internally. + + * tests/sigreturn.c (main): Replace RT_2 with RT_5. + * tests/sigreturn.test: Likewise. + + Reported-by: Szabolcs Nagy + +2016-01-10 Dmitry V. Levin + + avr32: wire up accept4 syscall. + * linux/avr32/syscallent.h [321]: Add accept4 entry. + +2016-01-09 Dmitry V. Levin + + sparc64: fix names of {s,g}etres{u,g}id syscalls. + * linux/sparc64/syscallent.h [108 ... 111]: Use sparc64 syscall names. + + sparc64: remove sparc32 syscall entries. + * linux/sparc64/syscallent.h [31, 32, 35, 44, 53, 56, 69, 70, 72, 77, + 82, 84, 87, 89, 91, 94, 112, 115, 155, 231]: Unassign. + + sparc: remove sparc64 syscall entries. + * linux/sparc/syscallent.h [52, 163]: Unassign. + + sparc64: clone syscallent.h from sparc. + * linux/sparc64/syscallent.h: Clone from linux/sparc/syscallent.h. + + sparc: fix mlock2 sysentry, wire up bind, listen, and setsockopt syscalls + * linux/sparc/syscallent.h [353]: Move mlock2 entry to 356. + [353, 354, 355]: Add bind, listen, and setsockopt entries. + * NEWS: Mention this. + +2016-01-09 Dmitry V. Levin + + tests: do not use settimeofday wrapper provided by libc. + Workaround limitations of settimeofday wrapper provided by musl libc. + + * tests/xettimeofday.c (main): Call settimeofday using syscall(). + + Reported-by: Szabolcs Nagy + +2016-01-09 Dmitry V. Levin + + ioctl.test: robustify against libcs invoking ioctl syscall on their own. + * tests/ioctl.test: Filter out from the log ioctl calls with standard + descriptor arguments. + + Reported-by: Szabolcs Nagy + +2016-01-09 Dmitry V. Levin + + alpha: enhance decoding of getxpid, getxuid, and getxgid syscalls. + Print the second return value of getxpid, getxuid, and getxgid syscalls + that return a pair of values using the same mechanism as pipe syscall. + + * alpha.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/alpha/syscallent.h [20]: Change SEN(getpid) to SEN(getxpid). + [24]: Change SEN(getuid) to SEN(getxuid). + [47]: Change SEN(getgid) to SEN(getxgid). + * NEWS: Mention this enhancement. + * tests/uid.awk: Update for getxgid output change. + * tests/uid.test: Cleanup. + * tests/getxxid.c: New file. + * tests/getxxid.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add getxxid. + (TESTS): Add getxxid.test. + * tests/.gitignore: Add getxxid. + +2016-01-08 Dmitry V. Levin + + Cleanup parser of getpagesize syscall. + * mem.c (SYS_FUNC(getpagesize)): Decode on entering syscall. + + alpha: alias getdtablesize to printargs. + * linux/dummy.h [ALPHA] (sys_getdtablesize): Alias to printargs. + * desc.c [ALPHA] (SYS_FUNC(getdtablesize)): Remove. + +2016-01-08 Dmitry V. Levin + + tests: change text marker in fork-f and vfork-f tests. + Use chdir syscalls instead of pwrite64 syscalls as a method of inserting + text markers into strace output because the former are more portable. + + * tests/fork-f.c (logit): Rename to logit_. Use chdir instead of pwrite. + (logit): New macro wrapper around logit_. + (main): Update expected output. + * tests/vfork-f.c: Likewise. + * tests/fork-f.test: Update. + +2016-01-07 Dmitry V. Levin + + Fix printing of 32-bit times syscall return value on 64-bit architectures + This change complements commit v4.9-359-gd93d9f8 by fixing + RVAL_UDECIMAL case. + The only syscall that appears to be affected is the times syscall. + + * syscall.c (trace_syscall_exiting): In case of RVAL_UDECIMAL, + when current personality is 32-bit, print 32-bit return code. + * NEWS: Mention this fix. + + Reported-by: Steve McIntyre + +2016-01-07 Dmitry V. Levin + + tests/vfork-f.c: support platforms without vfork. + On some platforms, e.g. hppa glibc, vfork() is implemented using fork + syscall, so the test cannot rely on the parent process remaining blocked + until the child process either terminates or calls execve. + + * tests/vfork-f.c (main): Explicitly block the parent until the child + either terminates or calls execve. + +2016-01-07 Dmitry V. Levin + + Fix and enhance decoding of sched_[gs]etaffinity syscalls. + Print cpu_set_t as a set of integers, similar to the way + fd_set is printed as a set of descriptors. + + * affinity.c: Include . + (get_cpuset_size): New function. + (print_affinitylist): Rewrite using get_cpuset_size and next_set_bit. + (sched_getaffinity, sched_setaffinity): Print first two args as ints. + * NEWS: Mention this enhancement. + * tests/sched_xetaffinity.c: New file. + * tests/sched_xetaffinity.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add sched_xetaffinity. + (TESTS): Add sched_xetaffinity.test. + * tests/.gitignore: Add sched_xetaffinity. + + Reported-by: Joe Korty + +2016-01-06 Dmitry V. Levin + + tests: convert epoll_create1.test from match_grep to match_diff. + * tests/epoll_create1.c (main): Print expected output. + * tests/epoll_create1.test: Use match_diff instead of match_grep. + * tests/epoll_create1.expected: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove epoll_create1.expected. + + tests/struct_flock.c: use libtests. + * tests/struct_flock.c (create_sample): Return void, + all callers changed. Use perror_msg_and_fail. + * tests/fcntl.c: Use SKIP_MAIN_UNDEFINED. + * tests/fcntl64.c: Likewise. + + tests/file_handle.c: use libtests. + * tests/file_handle.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/uid32.c: use libtests. + * tests/uid32.c: Use SKIP_MAIN_UNDEFINED. + + tests/uid16.c: use libtests. + * tests/uid16.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/uid.c: use libtests. + * tests/uid.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/netlink_unix_diag.c: use libtests. + * tests/netlink_unix_diag.c (send_query, check_responses, main): + Use perror_msg_and_skip. + + tests/netlink_inet_diag.c: use libtests. + * tests/netlink_inet_diag.c (send_query, check_responses, main): + Use perror_msg_and_skip. + + tests/readdir.c: use libtests. + * tests/readdir.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/getdents64.c: use libtests. + * tests/getdents64.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/getdents.c: use libtests. + * tests/getdents.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/ipc_shm.c: use libtests. + * tests/ipc_shm.c (cleanup): New function. + (main): Use it and perror_msg_and_skip. + + tests/ipc_sem.c: use libtests. + * tests/ipc_sem.c (cleanup): New function. + (main): Use it and perror_msg_and_skip. + + tests/ipc_msg.c: use libtests. + * tests/ipc_msg.c (cleanup): New function. + (main): Use it and perror_msg_and_skip. + + tests/ipc_msgbuf.c: use libtests. + * tests/ipc_msgbuf.c (cleanup): New function. + (main): Use it and perror_msg_and_skip. + + tests/mq.c: use libtests. + * tests/mq.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/utimensat.c: use libtests. + * tests/utimensat.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/ppoll.c: use libtests. + * tests/ppoll.c (main): Use assert, perror_msg_and_skip, + and perror_msg_and_fail. + + tests/mmsg.c: use libtests. + * tests/mmsg.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/ip_mreq.c: use libtests. + * tests/ip_mreq.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/ioctl.c: use libtests. + * tests/ioctl.c: Use SKIP_MAIN_UNDEFINED. + (main): Use %m printf format specifier. + + tests/pipe.c: use libtests. + * tests/pipe.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_fail and perror_msg_and_skip. + + tests/getrandom.c: use libtests. + * tests/getrandom.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/signalfd.c: use libtests. + * tests/signalfd.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/pc.c: use libtests. + * tests/pc.c (main): Use assert, get_page_size, perror_msg_and_fail, + and perror_msg_and_skip. + + tests/uio.c: use libtests. + * tests/uio.c: Use SKIP_MAIN_UNDEFINED. + + tests/bpf.c: use libtests. + * tests/bpf.c: Use SKIP_MAIN_UNDEFINED. + (main) Use perror_msg_and_skip. + + tests/aio.c: use libtests. + * tests/aio.c: Use SKIP_MAIN_UNDEFINED. + (main) Use perror_msg_and_skip. + + tests/sched_xetattr.c: use libtests. + * tests/sched_xetattr.c: Use SKIP_MAIN_UNDEFINED. + (main) Use perror_msg_and_skip. + + tests/wait.c: use libtests. + * tests/wait.c (main): Use perror_msg_and_fail. + + tests/vfork-f.c: use libtests. + * tests/vfork-f.c (main): Use assert and perror_msg_and_fail. + + tests/fork-f.c: use libtests. + * tests/fork-f.c (main): Use assert and perror_msg_and_fail. + + tests/userfaultfd.c: use libtests. + * tests/userfaultfd.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert. + + tests/mlock2.c: use libtests. + * tests/mlock2.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert. + + tests/membarrier.c: use libtests. + * tests/membarrier.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert. + + tests/nanosleep.c: use libtests. + * tests/nanosleep.c (main): Use assert, perror_msg_and_fail, + and perror_msg_and_skip. + + tests/timerfd_xettime.c: use libtests. + * tests/timerfd_xettime.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/timer_xettime.c: use libtests. + * tests/timer_xettime.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/timer_create.c: use libtests. + * tests/timer_create.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/clock_xettime.c: use libtests. + * tests/clock_xettime.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/clock_nanosleep.c: use libtests. + * tests/clock_nanosleep.c (main): Use assert and perror_msg_and_skip. + + tests/truncate64.c: use libtests. + * tests/truncate64.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/truncate.c: use libtests. + * tests/truncate.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/ftruncate64.c: use libtests. + * tests/ftruncate64.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/ftruncate.c: use libtests. + * tests/ftruncate.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + +2016-01-05 Dmitry V. Levin + + tests/llseek.c: use libtests. + * tests/llseek.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/lseek.c: use libtests. + * tests/lseek.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/readlinkat.c: use libtests. + * tests/readlinkat.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/readlink.c: use libtests. + * tests/readlink.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/xattr.c: use libtests. + * tests/xattr.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/seccomp.c: use libtests. + * tests/seccomp.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_fail and perror_msg_and_skip. + + tests/restart_syscall.c: use libtests. + * tests/restart_syscall.c (main): Use assert, perror_msg_and_fail, + and perror_msg_and_skip. + + tests/inet-cmsg.c: use libtests. + * tests/inet-cmsg.c (main): Use perror_msg_and_skip. + + tests/eventfd.c: use libtests. + * tests/eventfd.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip. + + tests/epoll_create1.c: use libtests. + * tests/epoll_create1.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert and perror_msg_and_skip. + + tests/mmap.c: use libtests. + * tests/mmap.c (main): Use get_page_size and perror_msg_and_fail. + + tests/fanotify_mark.c: use libtests. + * tests/fanotify_mark.c: Use SKIP_MAIN_UNDEFINED. + + tests/inet-accept-connect-send-recv.c: use libtests. + * tests/inet-accept-connect-send-recv.c (main): Use perror_msg_and_skip + and perror_msg_and_fail. + + tests/net-accept-connect.c: use libtests. + * tests/net-accept-connect.c (main): Use perror_msg_and_skip + and perror_msg_and_fail. + + tests/unix-pair-send-recv.c: use libtests. + * tests/unix-pair-send-recv.c (main): Use perror_msg_and_skip + and perror_msg_and_fail. + +2016-01-06 Dmitry V. Levin + + tests/xselect.c: use libtests. + * tests/xselect.c (main): Use assert, perror_msg_and_fail, + and perror_msg_and_skip. + + tests/pselect6.c: use libtests. + * tests/pselect6.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert, perror_msg_and_fail, and perror_msg_and_skip. + +2016-01-05 Dmitry V. Levin + + tests/oldselect.c: use libtests. + * tests/oldselect.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_fail and perror_msg_and_skip. + + tests/select.c: use libtests. + * tests/select.c: Use SKIP_MAIN_UNDEFINED. + + tests/_newselect.c: use libtests. + * tests/_newselect.c: Use SKIP_MAIN_UNDEFINED. + + tests/fstatat.c: use libtests. + * tests/fstatat.c: Use SKIP_MAIN_UNDEFINED. + + tests/newfstatat.c: use libtests. + * tests/newfstatat.c: Use SKIP_MAIN_UNDEFINED. + + tests/fstatat64.c: use libtests. + * tests/fstatat64.c: Use SKIP_MAIN_UNDEFINED. + + tests/xstatx.c: use libtests. + * tests/xstatx.c: Use SKIP_MAIN_UNDEFINED. + + tests/stat64.c: use libtests. + * tests/stat64.c: Use SKIP_MAIN_UNDEFINED. + + tests/stat.c: use libtests. + * tests/stat.c: Use SKIP_MAIN_UNDEFINED. + + tests/lstat64.c: use libtests. + * tests/lstat64.c: Use SKIP_MAIN_UNDEFINED. + + tests/lstat.c: use libtests. + * tests/lstat.c: Use SKIP_MAIN_UNDEFINED. + + tests/fstat64.c: use libtests. + * tests/fstat64.c: Use SKIP_MAIN_UNDEFINED. + + tests/fstat.c: use libtests. + * tests/fstat.c: Use SKIP_MAIN_UNDEFINED. + + tests/statfs.c: use libtests. + * tests/statfs.c (main): Use perror_msg_and_fail. + +2016-01-06 Dmitry V. Levin + + tests/xettimeofday.c: use libtests. + * tests/xettimeofday.c (main): Use assert and perror_msg_and_skip. + + tests/utime.c: use libtests. + * tests/utime.c (main): Use assert and perror_msg_and_skip. + + tests/filter-unavailable.c: use libtests. + * tests/filter-unavailable.c (main): Use perror_msg_and_fail. + + tests/scm_rights.c: use libtests. + * tests/scm_rights.c (main): Use perror_msg_and_fail and perror_msg_and_skip. + + tests/caps.c: use libtests. + * tests/caps.c (main): Use perror_msg_and_skip. + + tests/rt_sigqueueinfo.c: use libtests. + * tests/rt_sigqueueinfo.c (main): Use assert and perror_msg_and_skip. + + tests/umount.c: use libtests. + * tests/umount.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_fail. + + tests/umount2.c: use libtests. + * tests/umount2.c (main): Use perror_msg_and_fail. + +2016-01-05 Dmitry V. Levin + + tests/times.c: use libtests. + * tests/times.c (main): Use perror_msg_and_fail and perror_msg_and_skip. + +2016-01-04 Dmitry V. Levin + + tests/times-fail.c: use assert. + * tests/times-fail.c (main): Use assert. + + tests/memfd_create.c: use libtests. + * tests/memfd_create.c: Use SKIP_MAIN_UNDEFINED. + + tests/execveat.c: use libtests. + * tests/execveat.c: Use SKIP_MAIN_UNDEFINED. + + tests/xetitimer.c: use libtests. + * tests/xetitimer.c (main): Use perror_msg_and_skip. + +2016-01-05 Dmitry V. Levin + + tests/sysinfo.c: use libtests. + * tests/sysinfo.c (main): Use perror_msg_and_skip. + + tests/sigaltstack.c: use libtests. + * tests/sigaltstack.c (main): Use perror_msg_and_skip. + + tests/adjtimex.c: use libtests. + * tests/adjtimex.c (main): Use perror_msg_and_skip. + + tests/xet_robust_list.c: use libtests. + * tests/xet_robust_list.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip and tail_alloc. + + tests/umovestr2.c: use libtests. + * tests/umovestr2.c (main): Use get_page_size and tail_alloc. + + tests/umovestr.c: use libtests. + * tests/umovestr.c (main): Use perror_msg_and_skip and tail_alloc. + + tests/time.c: use libtests. + * tests/time.c: Use SKIP_MAIN_UNDEFINED. + (main): Use perror_msg_and_skip and tail_alloc. + + tests/sendfile64.c: use libtests. + * tests/sendfile64.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert, perror_msg_and_fail, perror_msg_and_skip, + and tail_alloc. + + tests/sendfile.c: use libtests. + * tests/sendfile.c: Use SKIP_MAIN_UNDEFINED. + (main): Use assert, perror_msg_and_fail, perror_msg_and_skip, + and tail_alloc. + +2016-01-05 Dmitry V. Levin + + tests: include tests.h instead of config.h. + Automatically edit tests/*.c files using the following perl one-liner: + + perl -0777 -pi -e \ + 's/#ifdef HAVE_CONFIG_H\n# include "config\.h"\n#endif\n*/#include "tests.h"\n/' \ + tests/*.c + +2016-01-05 Dmitry V. Levin + + tests: introduce libtests. + Introduce tests/libtests.a with common functions for use in tests. + + * tests/tests.h: New file. + * tests/error_msg.c: Likewise. + * tests/tail_alloc.c: Likewise. + * tests/get_page_size.c: Likewise. + * tests/Makefile.am (libtests_a_SOURCES, libtests_a_CPPFLAGS, + check_LIBRARIES, LDADD): New variables. + (clock_xettime_LDADD, filter_unavailable_LDADD, mq_LDADD, + pc_LDADD, times_LDADD): Add $(LDADD). + * tests/.gitignore: Add libtests.a. + +2016-01-01 Dmitry V. Levin + + tests: enable strace-k.test only for --with-libunwind configurations. + Also, since -k option does not support multiple personalities, + add strace-k.test to XFAIL_TESTS when running mpers tests. + + * tests/Makefile.am (MPERS_NAME, LIBUNWIND_TESTS, XFAIL_TESTS_, + XFAIL_TESTS_m32, XFAIL_TESTS_mx32, XFAIL_TESTS): New variables. + [USE_LIBUNWIND] (LIBUNWIND_TESTS): Add strace-k.test. + (TESTS): Replace strace-k.test with $(LIBUNWIND_TESTS). + * bootstrap: Substitute MPERS_NAME variable in tests-*/Makefile.am. + * tests/strace-k.test: Do not check for -k option availability. + +2016-01-02 Dmitry V. Levin + + Move gcc compat macros to gcc_compat.h. + * defs.h: Include "gcc_compat.h". + (GNUC_PREREQ, ATTRIBUTE_NORETURN, ATTRIBUTE_FORMAT, + ATTRIBUTE_ALIGNED, ATTRIBUTE_PACKED, ATTRIBUTE_MALLOC, + ATTRIBUTE_NOINLINE, ATTRIBUTE_ALLOC_SIZE): Move ... + * gcc_compat.h: ... here. + * Makefile.am (strace_SOURCES): Add gcc_compat.h. + +2015-12-31 Dmitry V. Levin + + Move defs.h from noinst_HEADERS to strace_SOURCES. + * Makefile.am (noinst_HEADERS): Move defs.h ... + (strace_SOURCES): ... here. + +2015-12-30 Dmitry V. Levin + + test: remove fork.c and vfork.c. + These manual tests are obsoleted by fork-f.test and vfork-f.test. + + * test/fork.c: Remove. + * test/vfork.c: Remove. + * test/Makefile (PROGS): Remove fork and vfork. + * test/.gitignore: Remove fork and vfork. + +2015-12-30 Dmitry V. Levin + + tests: add fork-f.test and vfork-f.test. + Check how strace -f follows fork and vfork syscalls. + + * tests/fork-f.c: New file. + * tests/fork-f.test: New test. + * tests/vfork-f.c: New file. + * tests/vfork-f.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add fork-f and vfork-f. + (TESTS): Add fork-f.test and vfork-f.test. + * tests/.gitignore: Add fork-f and vfork-f. + +2015-12-29 Dmitry V. Levin + + Set SYSCALL_NEVER_FAILS flag for getpid, getppid and gettid syscall. + * linux/*/syscallent*.h (getpid, getppid, gettid): Set NF flag. + +2015-12-29 Dmitry V. Levin + + Set SYSCALL_NEVER_FAILS flag for umask syscall. + Linux kernel always ANDs umask argument with 0700 and therefore + this syscall never fails. + + * linux/*/syscallent*.h (umask): Set NF flag. + +2015-12-27 Dmitry V. Levin + + alpha, ia64, mips, nios2, powerpc, sparc: always check for syscall error + On architectures that use dedicated registers to report syscall errors, + check for syscall error condition regardless of SYSCALL_NEVER_FAILS flag + in the syscall entry. On architectures that use negated errno + semantics, there is no way to distinguish a syscall error from a valid + return code that looks like a syscall error, and the check for + SYSCALL_NEVER_FAILS flag remains the only way to tell one case + from another. + + * linux/alpha/get_error.c (get_error): Ignore check_errno. + * linux/ia64/get_error.c: Likewise. + * linux/mips/get_error.c: Likewise. + * linux/nios2/get_error.c: Likewise. + * linux/powerpc/get_error.c: Likewise. + * linux/sparc/get_error.c: Likewise. + * linux/sparc64/get_error.c: Likewise. + +2015-12-27 Dmitry V. Levin + + Handle unlikely errors from personality syscall. + Despite being marked as SYSCALL_NEVER_FAILS, personality syscall still + might report a failure on some architectures due to obscure kernel + bugs. Check for this unlikely case and let users know that their + kernel has gone bananas. + + * personality.c (SYS_FUNC(personality)): Do not parse syscall return + value in case of syserror. + +2015-12-27 Dmitry V. Levin + + Do not truncate return value of get{,e}[ug]id and setfs[ug]id syscalls. + This should not be a user visible change unless the kernel does + something completely unexpected. In the latter case, let user see + what is going on. + + * uid.c (SYS_FUNC(getuid), SYS_FUNC(setfsuid)): Do not truncate + tcp->u_rval to uid_t on exiting syscall, return RVAL_DECODED. + +2015-12-26 Dmitry V. Levin + + Enhance personality syscall decoding. + * xlat/personality_options.in: Split into ... + * xlat/personality_types.in: ... personality types and ... + * xlat/personality_flags.in: ... personality flags. + * personality.c: Include "xlat/personality_types.h" + and "xlat/personality_flags.h" instead of "xlat/personality_options.h". + (SYS_FUNC(personality)): Print PER_MASK part of personality as + a symbolic value, and the rest of personality as a set of flags. + * tests/personality.c (main): Add more test cases. + * tests/personality.test: Update. + +2015-12-25 Dmitry V. Levin + + sh, sh64: fix syscall flags in several syscall entries. + * linux/sh/syscallent.h (geteuid32, getegid32, setfsuid32, setfsgid32): + Set SYSCALL_NEVER_FAILS flag. + (fchown32): Set TRACE_DESC flag. + * linux/sh64/syscallent.h: Likewise. + +2015-12-25 Dmitry V. Levin + + Print personality value 0xffffffff properly. + Value 0xffffffff of personality syscall first argument has a special + meaning, it is not a set of personality flags. + + * personality.c (SYS_FUNC(personality)): If personality equals + to 0xffffffff, print it verbatim. + * tests/personality.c (main): Test it. + +2015-12-25 Dmitry V. Levin + + tests: add personality.test. + * tests/personality.c: New file. + * tests/personality.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add personality. + (TESTS): Add personality.test. + * tests/.gitignore: Add personality. + + Enhance personality syscall decoding. + * personality.c (SYS_FUNC(personality)): On entering syscall, + print first argument not as a hex value but as a set of flags. + On exiting syscall, print return code as a set of flags. + * NEWS: Mention this enhancement. + +2015-12-25 Dmitry V. Levin + + Set SYSCALL_NEVER_FAILS flag for personality syscall. + Starting with commit + v2.6.29-6609-g11d06b2a1e5658f448a308aa3beb97bacd64a940, personality + syscall never fails to set the personality, but before commit + v2.6.35-rc1-372-g485d527 it still could return an error. + Starting with that commit, personality syscall never returns an error. + + * linux/*/syscallent.h: Set SYSCALL_NEVER_FAILS flag in personality + syscall entries. + +2015-12-24 Dmitry V. Levin + + Add personality emulation flags. + * xlat/personality_options.in: Add UNAME26, ADDR_NO_RANDOMIZE, + FDPIC_FUNCPTRS, MMAP_PAGE_ZERO, ADDR_COMPAT_LAYOUT, READ_IMPLIES_EXEC, + ADDR_LIMIT_32BIT, SHORT_INODE, WHOLE_SECONDS, STICKY_TIMEOUTS, + and ADDR_LIMIT_3GB. + +2015-12-24 Dmitry V. Levin + + arc, metag, nios2, or1k, tile: fix build. + Fix build regression introduced by commit + 34683e3926d8c2daa368afb805da422ee7043396. + + * linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap. + * linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff. + * linux/nios2/syscallent.h: Likewise. + * linux/or1k/syscallent.h: Likewise. + * linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and sys_mmap_4koff. + * pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap. + * NEWS: Mention this build fix. + + Reported-by: Alexey Brodkin + +2015-12-24 Dmitry V. Levin + + packages: remove acl development library from build dependencies. + Starting with commit v4.9-46-g681452b that removed all references + to acl.h, we no longer use acl development library. + + * .travis.yml (addons.apt.packages): Remove libacl1-dev. + * strace.spec (BuildRequires): Remove libacl-devel. + +2015-12-23 Dmitry V. Levin + + packages/x86_64: enable experimental -k option. + * debian/control (Build-Depends) [amd64]: Add libunwind-dev. + * strace.spec (BuildRequires) [x86_64]: Add libunwind-devel. + + maint: post-release administrivia. + * NEWS: Add header line for the next release. + +2015-12-21 Dmitry V. Levin + + Prepare for 4.11 release. + * NEWS: Update for 4.11 release. + * debian/changelog: 4.11-1. + * strace.spec: 4.11-1. + +2015-12-20 Dmitry V. Levin + + Sync strace.spec and debian/ with packages. + * debian/changelog: Sync with 4.10-3. + * debian/control: Likewise. + * debian/rules: Likewise. + * strace.spec: Sync with 4.10-3. + + .mailmap: add addresses of Kirill A. Shutemov. + * .mailmap: Add both addresses of Kirill A. Shutemov here + to avoid duplications in CREDITS file. + +2015-12-19 Dmitry V. Levin + + NEWS: Prepare for 4.11 release. + +2015-12-18 Dmitry V. Levin + + ia64: wire up mlock2 syscall. + * linux/ia64/syscallent.h [1346]: Add mlock2 entry. + +2015-12-17 Dmitry V. Levin + + Add copyright headers to some files which lack them. + Before this change, all files that exist since 20th century had + copyright headers, while most files that appeared later didn't. This + change fixes the inconsistency by adding missing copyright headers. + + It doesn't mean that copyright headers became maintained. In my view, + git history provides much better information on this subject and is much + more accurate than copyright headers. + +2015-12-16 Dmitry V. Levin + + tests/aio.c: include + * tests/aio.c: Include for struct timespec. + + Reported-by: Szabolcs Nagy + +2015-12-16 Dmitry V. Levin + + mpers.sh: switch to DWARF version 2 format for better portability. + * mpers.sh (CFLAGS): Replace -gdwarf-4 with -gdwarf-2. + + mpers.awk: add support for DWARF version 2 format. + * mpers.awk: Handle DW_AT_data_member_location in DWARF v2 format. + +2015-12-16 Dmitry V. Levin + + Replace %Ld/%Lu printf format specifiers with %lld/%llu. + As %Ld and %Lu printf format specifiers are not quite portable, + replace them with %lld and %llu, respectively. + + * desc.c (SYS_FUNC(pselect6)): Replace %Lu with %llu. + * dirent.c (print_old_dirent, SYS_FUNC(getdents)): Likewise. + * times.c (SYS_FUNC(times)): Likewise. + * fcntl.c (print_struct_flock64): Replace %Ld with %lld. + * tests/ftruncate.c (main): Replace %Lu with %llu. + * tests/ftruncate64.c (main): Likewise. + * tests/getdents.c (print_dirent): Likewise. + * tests/llseek.c (main): Likewise. + * tests/lseek.c (main): Likewise. + * tests/truncate.c (main): Likewise. + * tests/truncate64.c (main): Likewise. + * tests/xstatx.c (main): Likewise. + * tests/pselect6.c (main): Replace %Ld with %lld. + * tests/xselect.c(main): Likewise. + + Reported-by: Szabolcs Nagy + +2015-12-16 Szabolcs Nagy + + Fix SYS_FUNC and SEN macros for musl. + The syscall_name argument was subject to macro expansion because + it was passed down to other macros before it was prefixed. + + musl libc defines lfs64 names as macros (e.g. fstat64 as fstat) + so SYS_FUNC(fstat64) was expanded to sys_fstat. + + This change adds the prefix before the name is passed to other macros, + i.e. the argument of SYS_FUNC_NAME is already prefixed with sys_. + + * defs.h (SYS_FUNC): Add sys_ prefix to SYS_FUNC_NAME's argument. + (SYS_FUNC_NAME): Do not add sys_ prefix to MPERS_FUNC_NAME's argument. + * linux/ia64/syscallent.h (SYS_FUNC_NAME): Do not add sys_ prefix + to MPERS_FUNC_NAME's argument. + * syscall.c (SEN_NAME): Remove. + (SEN): Replace SEN_NAME call with its definition. Add sys_ prefix + to SYS_FUNC_NAME's argument. + +2015-12-15 Dmitry V. Levin + + tests/times.test: workaround libc bug on x32. + As glibc times wrapper on x32 is known to wrongly truncate and then sign + extend the syscall return value, invoke the syscall directly on x32. + + * tests/times.c (main) [__NR_times && __x86_64__ && __ILP32__]: + Invoke times syscall using inline asm. + +2015-12-15 Dmitry V. Levin + + mpers.awk: make fillers added to the output structure more predictable. + * mpers.awk (array_seq): New function. + (what_is): Use it for printing filler names. Tweak return types. + * mpers_test.sh: Use a more complicated sample type to test mpers + machinery. + +2015-12-15 Dmitry V. Levin + + Robustify mpers.awk against input containing index loops. + Make mpers.awk check for potential index loops. Such loops should not + normally happen, but mpers.awk will not go into infinite recursion if + they do. + + * mpers.awk (enter, leave): New functions. + (what_is): Use them. + +2015-12-15 Dmitry V. Levin + + Robustify mpers.awk against invalid input. + Make mpers.awk check that accessed elements of the main array that + are expected to have non-empty values really meet this requirement. + + * mpers.awk (array_get): New function. + (what_is, END): Use it. + * mpers_test.sh: Use a more complicated type to test mpers machinery. + + Reported-by: Mike Frysinger + +2015-12-14 Dmitry V. Levin + + Replace HAVE_LITTLE_ENDIAN_LONG_LONG with WORDS_BIGENDIAN. + * defs.h: Use WORDS_BIGENDIAN instead of HAVE_LITTLE_ENDIAN_LONG_LONG. + * configure.ac (AC_LITTLE_ENDIAN_LONG_LONG): Remove. + * m4/long_long.m4: Remove. + +2015-12-14 Dmitry V. Levin + + Remove unused parser of xmknod syscall. + The last reference to this parser was removed by commit + v4.10-45-gdf4dd8b. + + * mknod.c [SPARC || SPARC64] (SYS_FUNC(xmknod)): Remove. + +2015-12-13 Dmitry V. Levin + + tests/restart_syscall: add a workaround for old arm kernels. + As arm kernels used to overwrite ARM_r0 with -EINTR after + ERESTART_RESTARTBLOCK, update regexp to workaround this. + + * tests/restart_syscall.c (main) [__arm__]: Add 0xfffffffc as a valid + alternative value for the first argument of restarted nanosleep syscall. + +2015-12-12 Dmitry V. Levin + + tests/.gitignore: add ksysent.h. + tests/ksysent.h is a generated file listed in CLEANFILES. + This change complements commit v4.10-566-gbab4ef4. + + * tests/.gitignore: Add ksysent.h. + +2015-12-11 Dmitry V. Levin + + aarch64: make arm registers unsigned. + Follow the x86_64 example and define registers in arm_pt_regs + as unsigned, to avoid potential sign extension bugs. + + This also fixes --enable-gcc-Werror build. + + * linux/aarch64/arch_regs.c (arm_pt_regs): Change uregs's type + from int to uint32_t. + + Reported-by: Sergey Bolshakov + +2015-12-10 Dmitry V. Levin + + tests: add ksysent.test. + Check that syscall names and numbers defined in syscallent files + match kernel __NR_* constants defined by . + + Tested on various platforms, including the following combinations + of architectures and kernel headers: + + x86_64: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.12, 3.11, + 3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel + i386: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.11, + 3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel + aarch64: 4.4-rc + alpha: 4.3 + arm eabi: 4.4-rc, 4.2, 4.1 + hppa: 3.18 + ia64: 3.18 + mips o32: 4.1 + ppc: 3.18 + ppc64: 3.10-rhel, 2.6.32-rhel + s390: 3.18 + s390x: 3.18 + sparc: 4.1 + sparc: 3.18 + x32: 3.19 + + The only platform which is known at this moment to fail the test + is CentOS-5 provided by OBS. On x86_64 instance it fails with + error: "prlimit64" syscall #300 is "fanotify_init" in syscallent.h + and on i586 it similarly fails with + error: "prlimit64" syscall #338 is "fanotify_init" in syscallent.h + So this is a real platform bug that is not likely to be worked around + on the strace side. + + * tests/ksysent.c: New file. + * tests/ksysent.sed: Likewise. + * tests/ksysent.test: New test. + * tests/Makefile.am (AM_CPPFLAGS): Add -I$(builddir). + (check_PROGRAMS): Add ksysent. + (TESTS): Add ksysent.test. + (EXTRA_DIST): Add ksysent.sed. + (ksysent.h): New rule. + (BUILT_SOURCES, CLEANFILES): Add ksysent.h. + * tests/.gitignore: Add ksysent. + +2015-12-09 Dmitry V. Levin + + Document that syscall names match kernel __NR_* constants. + * strace.1: Note syscall naming difference between architectures + and the rule of choosing the right syscall name in each case. + +2015-12-09 Dmitry V. Levin + + ia64: print all ia32 syscalls using printargs. + Printing of ia32 syscalls on ia64 must have been broken for a long time. + Do not pretend that it works, print ia32 syscalls using printargs + instead. + + * linux/ia64/syscallent.h: Remove all redefinitions of sys_* macros. + Stop including"../dummy.h". Include "../i386/syscallent.h" with + SYS_FUNC_NAME macro temporarily redirected to printargs. + +2015-12-09 Dmitry V. Levin + + Fix build on architectures for which arch_sigreturn is not implemented. + This complements commit 527b42ff8da3f52fa7c48eb766b2b57fb0f0b977. + + * linux/arch_sigreturn.c (arch_sigreturn): Define. + +2015-12-09 Dmitry V. Levin + + aarch64: swap 64-bit and 32-bit personalities. + Let native 64-bit personality be personality 0, and 32-bit personality + be personality 1, to follow the traditional layout used for other + architectures. + + * defs.h [AARCH64]: Swap PERSONALITY0_WORDSIZE and + PERSONALITY1_WORDSIZE, remove DEFAULT_PERSONALITY. + [AARCH64 && HAVE_M32_MPERS]: Rename PERSONALITY1_* to PERSONALITY0_*. + * file.c [AARCH64 || defined X86_64 || defined X32]: Define + STAT32_PERSONALITY for AARCH64 as well. + * syscall.c (update_personality) [AARCH64]: Adjust PERSONALITY_NAMES. + * linux/aarch64/errnoent1.h: Adjust comment. + * linux/aarch64/get_error.c (get_error): Adjust tcp->currpers check. + * linux/aarch64/get_syscall_args.c (get_syscall_args): Likewise. + * linux/arm/arch_sigreturn.c (arch_sigreturn) [AARCH64]: Likewise. + * linux/aarch64/get_scno.c (arch_get_scno): Adjust update_personality + invocations. + * linux/aarch64/ioctls_arch0.h: Swap with ... + * linux/aarch64/ioctls_arch1.h: ... this file. + * linux/aarch64/ioctls_inc0.h: Swap with ... + * linux/aarch64/ioctls_inc1.h: ... this file. + * linux/aarch64/syscallent.h: Swap with ... + * linux/aarch64/syscallent1.h: ... this file. + +2015-12-08 Dmitry V. Levin + + mips: fix fadvise64 syscall entries. + * linux/mips/syscallent-n32.h [6216]: Change syscall handler + from fadvise64 to fadvise64_64. + * linux/mips/syscallent-n64.h [5215]: Rename from "fadvise64_64" + to "fadvise64" + * linux/mips/syscallent-o32.h [4254]: Likewise. + + xtensa: wire up syncfs syscall. + * linux/xtensa/syscallent.h [179]: Add syncfs entry. + + sh, sh64: fix syscall entries. + * linux/sh/syscallent.h [322]: Fix timerfd_create entry. + * linux/sh64/syscallent.h [350]: Likewise. + [0]: Fix restart_syscall entry. + + powerpc, powerpc64: wire up mlock2 syscall. + * linux/powerpc/syscallent.h [378]: Add mlock2 entry. + * linux/powerpc64/syscallent.h: Likewise. + + hppa: fix syscall entries. + * linux/hppa/syscallent.h: Swap [343] and [344] entries. + + avr32: update syscall entries. + * linux/avr32/syscallent.h [0]: Rename from setup to restart_syscall. + [284 ... 320]: New entries. + + m68k: fix syscall names. + * linux/m68k/syscallent.h [335]: Rename "atomic_comxchg_32" + to "atomic_cmpxchg_32". + + sparc: update syscall names. + * linux/sparc/syscallent.h [160]: Rename "sched_setaffinity" + to "sched_set_affinity". + [161]: Rename "sched_getaffinity" to "sched_get_affinity". + + powerpc, powerpc64: update syscall names. + * linux/powerpc/syscallent.h [201]: Rename "MOL" to "multiplexer". + [225]: Rename "tux" to "tuxcall". + [256]: Rename "debug_setcontext" to "sys_debug_setcontext". + * linux/powerpc64/syscallent.h: Likewise. + + alpha: update syscall entries. + * linux/alpha/syscallent.h [224 ... 228]: Add stub entries. + [100]: Rename "osf_getpriority" to "getpriority". + [255]: Rename "osf_subsysinfo" to "osf_subsys_info". + [303]: Rename "adjtimex32" to "old_adjtimex". + [319]: Rename "sysctl" to "_sysctl". + [320]: Remove. + +2015-12-08 Dmitry V. Levin + + Fix mmap syscall entries. + Change syscall names to match kernel __NR_* constants. + + * linux/avr32/syscallent.h [90]: Rename "mmap" to "mmap2". + * linux/bfin/syscallent.h [90]: Rename "old_mmap" to "mmap". + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * tests/mmap.c (main): Remove old_mmap from expected output. + * tests/mmap.test: Remove old_mmap from the list of mmap syscalls. + +2015-12-08 Dmitry V. Levin + + Fix select and _newselect syscall entries. + Change syscall names to match kernel __NR_* constants. + This reverts commit ddcf54969d253582ab2cfdcab8ede9cdae3fb171. + + * linux/arm/syscallent.h [82]: Rename "oldselect" to "select". + [142]: Rename "select" to "_newselect". + * linux/bfin/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/powerpc/syscallent.h [82]: Likewise. + * linux/powerpc64/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/hppa/syscallent.h [142]: Rename "select" to "_newselect". + * linux/mips/syscallent-n32.h [6022]: Rename "select" to "_newselect". + * linux/mips/syscallent-n64.h [5022]: Likewise. + * linux/mips/syscallent-o32.h [4142]: Likewise. + * linux/s390/syscallent.h [142]: Rename "select" to "_newselect". + * linux/sparc/syscallent.h [230]: Rename "select" to "_newselect". + * tests/oldselect.test: Rename oldselect to select. Convert + from match_grep to match_diff. + * tests/oldselect.expected: Likewise. + * xselect.c: New file, based on select.c. + * tests/_newselect.c: New file. + * tests/select.c: Replace with a wrapper around xselect.c. + * tests/select.test: Parametrize. + * tests/_newselect.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add _newselect. + (TESTS): Add _newselect.test. + (EXTRA_DIST): Add xselect.c. + * tests/.gitignore: Add _newselect. + +2015-12-08 Dmitry V. Levin + + Fix exit syscall entries. + Change syscall names to match kernel __NR_* constants. + + * linux/avr32/syscallent.h [1]: Rename "_exit" to "exit". + * linux/bfin/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/x32/syscallent.h [60]: Rename "_exit" to "exit". + * linux/x86_64/syscallent.h: Likewise. + +2015-12-08 Dmitry V. Levin + + Fix pread64 and pwrite64 syscall entries. + Change syscall names to match kernel __NR_* constants. + + * linux/alpha/syscallent.h [349]: Rename "pread" to "pread64". + [350]: Rename "pwrite" to "pwrite64". + * linux/ia64/syscallent.h [1148]: Rename "pread" to "pread64". + [1149]: Rename "pwrite" to "pwrite64". + * linux/sh/syscallent.h [180]: Rename "pread" to "pread64". + [181]: Rename "pwrite" to "pwrite64". + * linux/sh64/syscallent.h: Likewise. + * linux/x32/syscallent.h [17]: Rename "pread" to "pread64". + [18]: Rename "pwrite" to "pwrite64". + * linux/x86_64/syscallent.h: Likewise. + +2015-12-08 Dmitry V. Levin + + tests: sort the list of tests. + * tests/Makefile.am (TESTS): Sort the list of regular tests. + * tests/.gitignore: Sort. + + ia64: fix remap_file_pages syscall entry. + * linux/ia64/syscallent.h (1125): Set to remap_file_pages. + + bfin, i386: remove sysentry for nonexistent security syscall. + * linux/bfin/syscallent.h (223): Remove. + * linux/i386/syscallent.h: Likewise. + + build: add -D_FILE_OFFSET_BITS=64 to _CPPFLAGS instead of _CFLAGS. + * tests/Makefile.am (fstat64_CFLAGS): Rename to fstat64_CPPFLAGS, + replace $(AM_CFLAGS) with $(AM_CPPFLAGS). + (fstatat64_CFLAGS): Rename to fstatat64_CPPFLAGS, + replace $(AM_CFLAGS) with $(AM_CPPFLAGS). + (ftruncate64_CFLAGS): Rename to ftruncate64_CPPFLAGS, + replace $(AM_CFLAGS) with $(AM_CPPFLAGS). + (lstat64_CFLAGS): Rename to lstat64_CPPFLAGS, + replace $(AM_CFLAGS) with $(AM_CPPFLAGS). + (mmap64_CFLAGS): Rename to mmap64_CPPFLAGS, + replace $(AM_CFLAGS) with $(AM_CPPFLAGS). + (newfstatat_CFLAGS): Rename to newfstatat_CPPFLAGS, + replace $(AM_CFLAGS) with $(AM_CPPFLAGS). + (stat64_CFLAGS): Rename to stat64_CPPFLAGS, + replace $(AM_CFLAGS) with $(AM_CPPFLAGS). + (statfs_CFLAGS): Rename to statfs_CPPFLAGS, + replace $(AM_CFLAGS) with $(AM_CPPFLAGS). + (truncate64_CFLAGS): Rename to truncate64_CPPFLAGS, + replace $(AM_CFLAGS) with $(AM_CPPFLAGS). + (uio_CFLAGS): Rename to uio_CPPFLAGS, + replace $(AM_CFLAGS) with $(AM_CPPFLAGS). + +2015-12-08 Dmitry V. Levin + + Move x32 replacement to x32 specific directory. + As tests-m*32/Makefile.am files now refer to proper arch specific + directories, it's possible to relocate x32 replacement + to its arch specific directory. + + * linux/x86_64/asm_stat.h: Move ... + * linux/x32/asm_stat.h: ... here, remove x32 guard. + * Makefile.am (strace_SOURCES): Remove linux/x86_64/asm_stat.h. + +2015-12-08 Dmitry V. Levin + + build: set arch specific -m switches in tests-m*32/Makefile.am files properly + * tests/Makefile.am (ARCH_MFLAGS, AM_LDFLAGS): New variables. + (AM_CPPFLAGS): Use ARCH_MFLAGS. + * bootstrap: In tests-m32/Makefile.am and tests-mx32/Makefile.am, + add -m32 and -mx32, respectively, to ARCH_MFLAGS instead of AM_CFLAGS. + + build: initialize ARCH variable in tests-m*32/Makefile.am files properly + * configure.ac (arch_m32): Set to sparc on sparc64, powerpc on + powerpc64, arm on aarch64, i386 on x86_64 and x32, $arch in other cases. + (arch_mx32): Set to x32 on x86_64, $arch in other cases. + (AC_SUBST): Add arch_m32 and arch_mx32. + * bootstrap: Substitute @arch@ with @arch_m32@ in tests-m32/Makefile.am. + Substitute @arch@ with @arch_mx32@ in tests-mx32/Makefile.am. + +2015-12-07 Dmitry V. Levin + + tests: add umount.test and umount2.test. + * tests/umount.c: New file. + * tests/umount2.c: Likewise. + * tests/umount.test: New test. + * tests/umount2.test: Likewise. + * tests/Makefile.am (check_PROGRAMS): Add umount and umount2. + (TESTS): Add umount.test and umount2.test. + * tests/.gitignore: Add umount and umount2. + + avr32: fix umount2 syscall entry. + * linux/avr32/syscallent.h: Rename umount to umount2. + + Update umount2 flags. + * umount.c (MNT_FORCE, MNT_DETACH, MNT_EXPIRE): Move definitions ... + * xlat/umount_flags.in: ... here. Add UMOUNT_NOFOLLOW. + +2015-12-07 Dmitry V. Levin + + Print the first argument of umount2 syscall as a path. + * umount.c (SYS_FUNC(umount2)): Use printpath instead of printstr. + + This fixes Debian bug #785050. + +2015-12-06 Dmitry V. Levin + + prctl: add PR_CAP_AMBIENT parser. + * xlat/pr_cap_ambient.in: New file. + * prctl.c: Include "xlat/pr_cap_ambient.h". + (SYS_FUNC(prctl)): Handle PR_CAP_AMBIENT. + + prctl: finish decoding of several commands on entering syscall. + * prctl.c (SYS_FUNC(prctl)): Return RVAL_DECODED after decoding of + PR_GET_DUMPABLE, PR_GET_KEEPCAPS, PR_GET_SECCOMP, PR_GET_TIMERSLACK, + PR_GET_TIMING, and PR_CAPBSET_READ commands. + + Fix build on systems that lack EM_FRV definition. + * xlat/audit_arch.in: Guard AUDIT_ARCH_FRV with EM_FRV check. + + times.test: workaround buggy libc. + * tests/times.c: Include . + (main): On systems where user's and kernel's long types are the same, + prefer direct times syscall over libc's times function because + the latter is more prone to return value truncation. + + times.test: reduce cpu time consumption, increase struct tms diversity. + * tests/times.c (main): Reduce cpu time consumption fourfold, + make the parent process consume less cpu time than the child process + so that members of the structure returned by times syscall would be + more likely to contain different values. + +2015-12-06 Dmitry V. Levin + + mips n32, x32: fix printing of times syscall return value. + As times syscall returns kernel's long value, it has to be printed as + RVAL_LUDECIMAL on systems where long type is less than kernel's long. + + * times.c (SYS_FUNC(times)) [RVAL_LUDECIMAL && !IN_MPERS]: + Return RVAL_LUDECIMAL instead of RVAL_UDECIMAL. + +2015-12-06 Dmitry V. Levin + + unix-yy.test: fix portability issue. + * tests/unix-yy-connect.awk (r_close_listen): Quote square brackets + that are not part of a bracket expression. + + inet-cmsg.test: skip the test when the network is not functional. + * tests/inet-cmsg.c (main): Return 77 if inet datagram socket + cannot be bound to INADDR_LOOPBACK. + +2015-12-05 Dmitry V. Levin + + fcntl: skip F_GETLK64, F_SETLK64, and F_SETLKW64 in fcntl syscall parser + As the kernel recognizes F_GETLK64, F_SETLK64, and F_SETLKW64 commands + in fcntl64 syscall only, do not parse their structures in fcntl parser. + + * xlat/fcntlcmds.in: Move F_GETLK64, F_SETLK64, and F_SETLKW64 ... + * xlat/fcntl64cmds.in: ... here. + * fcntl.c: Include "xlat/fcntl64cmds.h". + (print_fcntl): Move printing of first two syscall arguments + and handling of F_GETLK64, F_SETLK64, and F_SETLKW64 commands ... + (SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): ... here. + * tests/fcntl.c: New file, based on struct_flock.c. + * tests/fcntl64.c: Likewise. + * tests/struct_flock.c (test_flock_einval, create_sample): New functions. + (test_flock): Use test_flock_einval. + (test_flock64, main): Remove. + * tests/fcntl.test: New test. + * tests/fcntl64.test: Likewise. + * tests/struct_flock.test: Remove. + * tests/Makefile.am (check_PROGRAMS): Add fcntl and fcntl64, + remove struct_flock. + (TESTS): Add fcntl.test and fcntl64.test, remove struct_flock.test. + (EXTRA_DIST) Add struct_flock.c. + * tests/.gitignore: Add fcntl and fcntl64, remove struct_flock. + +2015-12-05 Dmitry V. Levin + + print_fcntl: finish with unrecognized commands on entering syscall. + * fcntl.c (print_fcntl): Merge two switch statements. + +2015-12-04 Elvira Khabirova + + fcntl: create a separate parser for fcntl64 syscall. + * fcntl.c(print_fcntl): New function, made from SYS_FUNC(fcntl). + (SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): Use it. + * linux/32/syscallent.h: Change parser of fcntl64 to SEN(fcntl64). + * linux/arm/syscallent.h: Likewise. + * linux/avr32/syscallent.h: Likewise. + * linux/bfin/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/xtensa/syscallent.h: Likewise. + +2015-12-05 Dmitry V. Levin + + travis-ci: add build matrix. + + tests: replace old stat tests with stat.test and stat64.test. + * tests/stat.c: Replace with a wrapper around lstatx.c + * tests/stat.test: Replace with a wrapper around statx.sh. + * tests/stat32-v.test: Remove. + * tests/stat32.c: Remove. + * tests/stat64-v.test: Remove. + * tests/stat64.c: New file. + * tests/stat64.test: New test. + * tests/Makefile.am (check_PROGRAMS): Replace stat32 with stat64. + (stat_CFLAGS): Rename to stat64_CFLAGS. + (TESTS): Replace stat32-v.test and stat64-v.test with stat64.test. + * tests/.gitignore: Replace stat32 with stat64. + + tests: add lstat.test and lstat64.test. + * tests/lstat.c: New file. + * tests/lstat64.c: Likewise. + * tests/lstatx.c: Likewise. + * tests/lstat.test: New test. + * tests/lstat64.test: Likewise. + * tests/Makefile.am (check_PROGRAMS): Add lstat and lstat64. + (lstat64_CFLAGS): Define. + (TESTS): Add lstat.test and lstat64.test. + (EXTRA_DIST): Add lstatx.c. + * tests/.gitignore: Add lstat and lstat64. + + tests: add fstat.test and fstat64.test. + * tests/fstat.c: New file. + * tests/fstat64.c: Likewise. + * tests/fstatx.c: Likewise. + * tests/fstat.test: New test. + * tests/fstat64.test: Likewise. + * tests/Makefile.am (check_PROGRAMS): Add fstat and fstat64. + (fstat64_CFLAGS): Define. + (TESTS): Add fstat.test and fstat64.test. + (EXTRA_DIST): Add fstatx.c. + * tests/.gitignore: Add fstat and fstat64. + +2015-12-05 Dmitry V. Levin + + tests: prepare for detailed testing of stat family syscalls. + Parametrize code from fstatat.c to support + as an alternative to and move it to a separate file. + + * tests/statx.sh: New file, based on fstatat64.test. + * tests/fstatat64.test: Use it. + * tests/newfstatat.test: Likewise. + * tests/xstatx.c: New file, based on fstatat.c. + * tests/fstatat.c: Use it. + * tests/Makefile.am (EXTRA_DIST): Add statx.sh and xstatx.c. + * tests/fstatat64.c (FSTATAT_NAME): Change to TEST_SYSCALL_NAME. + * tests/newfstatat.c: Likewise. + +2015-12-04 Gabriel Laskar + + ioctl: allow to stop decoding number. + For some ioctls, like from drm, the identification of the correct ioctl + is done by custom code. Specifying IOCTL_NUMBER_STOP_LOOKUP on + return of ioctl_decode_command_number() disables further calls to + ioctl_lookup(). + + * defs.h (IOCTL_NUMBER_UNKNOWN, IOCTL_NUMBER_HANDLED, + IOCTL_NUMBER_STOP_LOOKUP): Add macros representing ioctl number state + decoding. + * ioctl.c (SYS_FUNC(ioctl)): Skip ioctl_lookup() when + ioctl_decode_command_number() returns a value with + IOCTL_NUMBER_STOP_LOOKUP flag is set. + + Suggested-by: Patrik Jakobsson + +2015-12-04 Dmitry V. Levin + + tests: skip restart_syscall.test on x32. + The syscall number of restart_syscall returned by the kernel in case + of ERESTART_RESTARTBLOCK is broken on x32 from the beginning, see + https://lkml.org/lkml/2015/11/30/790 + + Until that improves, skip the test on x32. + + * tests/restart_syscall.c (main) [__x86_64__ && __ILP32__]: Return 77. + +2015-12-04 Dmitry V. Levin + + x32: fix decoding of i386 personality lseek syscall. + On x32, tcp->ext_arg is not initialized for i386 personality, + so tcp->u_arg has to be used instead. + + * lseek.c (SYS_FUNC(lseek)) [X32]: Handle "current_personality == 1" case. + +2015-12-04 Dmitry V. Levin + + x86_64, x32: add a replacement for + Some old kernel headers, Ubuntu 14.04 in particular, provide + editions that are completely wrong for x32. + Workaround this issue by providing a replacement. + + * linux/x86_64/asm_stat.h: New file. + * linux/x32/asm_stat.h: Likewise. + * Makefile.am (strace_SOURCES): Add them. + +2015-12-04 Dmitry V. Levin + + Add a wrapper around + * linux/asm_stat.h: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c: Use it. + + kernel_types.h: protect from double inclusion. + * kernel_types.h: Add #include guard. + +2015-12-03 Dmitry V. Levin + + fstatat64.test: lift /proc requirement. + While -P option needs /proc to match descriptors, it does not use + /proc to match pathnames. As this test does not need descriptor + match, the /proc requirement can be safely lifted. + + * tests/fstatat64.test: Lift /proc/self/fd/ requirement. + +2015-12-02 Dmitry V. Levin + + tests: add fstatat64.test and newfstatat.test. + * configure.ac (AC_CHECK_FUNCS): Add fstatat, ftruncate, and futimens. + * tests/fstatat.c: New file. + * tests/fstatat64.c: Likewise. + * tests/newfstatat.c: Likewise. + * tests/fstatat64.test: New test. + * tests/newfstatat.test: Likewise. + * tests/Makefile.am (check_PROGRAMS): Add fstatat64 and newfstatat. + (fstatat64_CFLAGS, newstatat_CFLAGS): Define. + (TESTS): Add fstatat64.test and newfstatat.test. + (EXTRA_DIST): Add fstatat.c. + * tests/.gitignore: Add fstatat64 and newfstatat. + +2015-12-01 Dmitry V. Levin + + alpha, ppc, sh, sh64: fix fstatat64 syscall entries. + * linux/alpha/syscallent.h (newfstatat): Change sys_name to fstatat64. + * linux/powerpc/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + + ppc64: clone syscallent.h from ppc. + * linux/powerpc64/syscallent.h: Clone from linux/powerpc/syscallent.h + with entries for numbers 192..197, 204, 226, and 254 unassigned. + + tests: add lseek.test and llseek.test. + * tests/llseek.c: New file. + * tests/lseek.c: Likewise. + * tests/llseek.test: New test. + * tests/lseek.test: Likewise. + * tests/Makefile.am (check_PROGRAMS): Add llseek and lseek. + (TESTS): Add llseek.test and lseek.test. + * tests/.gitignore: Add llseek and lseek. + + tests: add ftruncate64.test and truncate64.test. + * tests/ftruncate64.c: New file. + * tests/truncate64.c: Likewise. + * tests/ftruncate64.test: New test. + * tests/truncate64.test: Likewise. + * tests/Makefile.am (check_PROGRAMS): Add ftruncate64 and truncate64. + (ftruncate64_CFLAGS, truncate64_CFLAGS): Define. + (TESTS): Add ftruncate64.test and truncate64.test. + * tests/.gitignore: Add ftruncate64 and truncate64. + + tests: add ftruncate.test and truncate.test. + * tests/ftruncate.c: New file. + * tests/truncate.c: Likewise. + * tests/ftruncate.test: New test. + * tests/truncate.test: Likewise. + * tests/Makefile.am (check_PROGRAMS): Add ftruncate and truncate. + (TESTS): Add ftruncate.test and truncate.test. + * tests/.gitignore: Add ftruncate and truncate. + +2015-11-30 Dmitry V. Levin + + build: robustify linux/fcntl.h check. + * configure.ac (AC_CHECK_TYPES): Support older linux kernel headers + by including before . + +2015-11-30 Dmitry V. Levin + + syscall.c: move inclusion of arch specific files to the end of file. + Move inclusion of arch specific files that define static functions to + the end of syscall.c. + + * syscall.c (get_syscall_result_regs, get_error, getregs_old): + New forward declarations. + (arch_get_scno): Move forward. + Move inclusion of "get_scno.c", "get_syscall_args.c", + "get_syscall_result.c", "get_error.c", and "getregs_old.c" + to the end of file. + +2015-11-30 Dmitry V. Levin + + x86_64: change getregs_old to forward ptrace return code. + * linux/x86_64/getregs_old.c (getregs_old): Change to return ptrace + return code. + * syscall.c (get_regs) [ARCH_REGS_FOR_GETREGSET && X86_64]: Use + getregs_old return code. + +2015-11-30 Dmitry V. Levin + + Cleanup print_pc. + Apparently, there are only two types of instruction pointer printers + depending on the architecture: those that print a register that was + fetched earlier, and those that fetch a register themselves using upeek. + With this change, architectures of the first type have ARCH_PC_REG + defined in their arch_regs.c file, architectures of the first type + have ARCH_PC_PEEK_ADDR defined there, and the common code in syscall.c + uses these macros to print the instruction pointer. + + * Makefile.am (EXTRA_DIST): Remove linux/*/print_pc.c. + * linux/*/print_pc.c: Remove. + * linux/aarch64/arch_regs.c(ARCH_PC_REG): Define macro. + * linux/arc/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/arm/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/avr32/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/i386/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/ia64/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/metag/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/mips/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/nios2/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/or1k/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/powerpc64/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/powerpc/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/s390/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/s390x/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/sparc64/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/sparc/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/tile/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/x32/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/x86_64/arch_regs.c(ARCH_PC_REG): Likewise. + * linux/alpha/arch_regs.c(ARCH_PC_PEEK_ADDR): Define macro. + * linux/bfin/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise. + * linux/crisv10/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise. + * linux/crisv32/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise. + * linux/hppa/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise. + * linux/m68k/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise. + * linux/microblaze/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise. + * linux/sh64/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise. + * linux/sh/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise. + * linux/xtensa/arch_regs.c(ARCH_PC_PEEK_ADDR): Likewise. + * syscall.c (print_pc): Stop including "print_pc.c". + Use ARCH_PC_REG or ARCH_PC_PEEK_ADDR. + +2015-11-30 Dmitry V. Levin + + cleanup: make get_scno.c files more readable. + Make get_scno.c files more self-contained. While they are still + being included by syscall.c, the latter no longer provides + a function framework for them. + + * linux/aarch64/get_scno.c (arch_get_scno): Define. + * linux/alpha/get_scno.c: Likewise. + * linux/arc/get_scno.c: Likewise. + * linux/arm/get_scno.c: Likewise. + * linux/avr32/get_scno.c: Likewise. + * linux/bfin/get_scno.c: Likewise. + * linux/crisv10/get_scno.c: Likewise. + * linux/hppa/get_scno.c: Likewise. + * linux/i386/get_scno.c: Likewise. + * linux/ia64/get_scno.c: Likewise. + * linux/m68k/get_scno.c: Likewise. + * linux/metag/get_scno.c: Likewise. + * linux/microblaze/get_scno.c: Likewise. + * linux/mips/get_scno.c: Likewise. + * linux/nios2/get_scno.c: Likewise. + * linux/or1k/get_scno.c: Likewise. + * linux/powerpc/get_scno.c: Likewise. + * linux/powerpc64/get_scno.c: Likewise. + * linux/s390/get_scno.c: Likewise. + * linux/sh/get_scno.c: Likewise. + * linux/sh64/get_scno.c: Likewise. + * linux/sparc/get_scno.c: Likewise. + * linux/sparc64/get_scno.c: Likewise. + * linux/tile/get_scno.c: Likewise. + * linux/x86_64/get_scno.c: Likewise. + * linux/xtensa/get_scno.c: Likewise. + * syscall.c (arch_get_scno): New declaration. + Include "get_scno.c" in file scope. + (get_scno): Use arch_get_scno. + + Requested-by: Denys Vlasenko + +2015-11-30 Dmitry V. Levin + + cleanup: make get_syscall_args.c files more readable. + Make get_syscall_args.c files more self-contained. While they are + still being included by syscall.c, the latter no longer defines + get_syscall_args function. + + * linux/aarch64/get_syscall_args.c: Include "arm/get_syscall_args.c" + with get_syscall_args temporarily defined to arm_get_syscall_args. + (get_syscall_args): Define. + * linux/alpha/get_syscall_args.c (get_syscall_args): Define. + * linux/arc/get_syscall_args.c: Likewise. + * linux/arm/get_syscall_args.c: Likewise. + * linux/avr32/get_syscall_args.c: Likewise. + * linux/bfin/get_syscall_args.c: Likewise. + * linux/crisv10/get_syscall_args.c: Likewise. + * linux/hppa/get_syscall_args.c: Likewise. + * linux/i386/get_syscall_args.c: Likewise. + * linux/ia64/get_syscall_args.c: Likewise. + * linux/m68k/get_syscall_args.c: Likewise. + * linux/metag/get_syscall_args.c: Likewise. + * linux/microblaze/get_syscall_args.c: Likewise. + * linux/mips/get_syscall_args.c: Likewise. + * linux/nios2/get_syscall_args.c: Likewise. + * linux/or1k/get_syscall_args.c: Likewise. + * linux/powerpc/get_syscall_args.c: Likewise. + * linux/s390/get_syscall_args.c: Likewise. + * linux/sh/get_syscall_args.c: Likewise. + * linux/sh64/get_syscall_args.c: Likewise. + * linux/sparc/get_syscall_args.c: Likewise. + * linux/tile/get_syscall_args.c: Likewise. + * linux/x86_64/get_syscall_args.c: Likewise. + * linux/xtensa/get_syscall_args.c: Likewise. + * syscall.c (get_syscall_args): Remove. + Include "get_syscall_args.c" in file scope. + + Requested-by: Denys Vlasenko + +2015-11-30 Dmitry V. Levin + + cleanup: make get_syscall_result.c files more readable. + Make get_syscall_result.c files more self-contained. While they are + still being included by syscall.c, the latter no longer provides + a function framework for them. + + * linux/alpha/get_syscall_result.c (get_syscall_result_regs): Define. + * linux/bfin/get_syscall_result.c: Likewise. + * linux/crisv10/get_syscall_result.c: Likewise. + * linux/hppa/get_syscall_result.c: Likewise. + * linux/m68k/get_syscall_result.c: Likewise. + * linux/microblaze/get_syscall_result.c: Likewise. + * linux/sh/get_syscall_result.c: Likewise. + * linux/sh64/get_syscall_result.c: Likewise. + * linux/xtensa/get_syscall_result.c: Likewise. + * syscall.c [!ARCH_REGS_FOR_GETREGSET && !ARCH_REGS_FOR_GETREGS]: + Define USE_GET_SYSCALL_RESULT_REGS macro. + [USE_GET_SYSCALL_RESULT_REGS]: Include "get_syscall_result.c". + (get_syscall_result) [USE_GET_SYSCALL_RESULT_REGS]: Stop including + "get_syscall_result.c". Call get_syscall_result_regs. + + Requested-by: Denys Vlasenko + +2015-11-29 Dmitry V. Levin + + cleanup: make get_error.c files more readable. + Make get_error.c files more self-sustained. While they are still being + included by syscall.c, the latter no longer defines get_error function. + + * linux/aarch64/get_error.c: Include "arm/get_error.c" with get_error + temporarily defined to arm_get_error. + (get_error): Define. + * linux/alpha/get_error.c (get_error): Define. + * linux/arc/get_error.c: Likewise. + * linux/arm/get_error.c: Likewise. + * linux/avr32/get_error.c: Likewise. + * linux/bfin/get_error.c: Likewise. + * linux/crisv10/get_error.c: Likewise. + * linux/hppa/get_error.c: Likewise. + * linux/i386/get_error.c: Likewise. + * linux/ia64/get_error.c: Likewise. + * linux/m68k/get_error.c: Likewise. + * linux/metag/get_error.c: Likewise. + * linux/microblaze/get_error.c: Likewise. + * linux/mips/get_error.c: Likewise. + * linux/nios2/get_error.c: Likewise. + * linux/or1k/get_error.c: Likewise. + * linux/powerpc/get_error.c: Likewise. + * linux/s390/get_error.c: Likewise. + * linux/sh/get_error.c: Likewise. + * linux/sh64/get_error.c: Likewise. + * linux/sparc/get_error.c: Likewise. + * linux/sparc64/get_error.c: Likewise. + * linux/tile/get_error.c: Likewise. + * linux/x86_64/get_error.c: Likewise. + * linux/xtensa/get_error.c: Likewise. + * syscall.c: Include "get_error.c" in file scope. + (get_error): Remove. Move arch independent code ... + (get_syscall_result): ... here. Update get_error invocation. + + Requested-by: Denys Vlasenko + +2015-11-28 Dmitry V. Levin + + cleanup: make arch_sigreturn.c files more readable. + Make arch_sigreturn.c files more self-sustained. While they are + still being included by sigreturn.c, the latter no longer defines + arch_sigreturn function. + + * linux/alpha/arch_sigreturn.c (arch_sigreturn): Define. + * linux/arm/arch_sigreturn.c: Likewise. + * linux/crisv10/arch_sigreturn.c: Likewise. + * linux/i386/arch_sigreturn.c: Likewise. + * linux/ia64/arch_sigreturn.c: Likewise. + * linux/m68k/arch_sigreturn.c: Likewise. + * linux/microblaze/arch_sigreturn.c: Likewise. + * linux/mips/arch_sigreturn.c: Likewise. + * linux/powerpc/arch_sigreturn.c: Likewise. + * linux/s390/arch_sigreturn.c: Likewise. + * linux/sparc/arch_sigreturn.c: Likewise. + * linux/tile/arch_sigreturn.c: Likewise. + * linux/x32/arch_sigreturn.c: Remove code. + Include "x86_64/arch_sigreturn.c". + * linux/x86_64/arch_sigreturn.c: Stop including "x32/arch_sigreturn.c". + Include "i386/arch_sigreturn.c" with arch_sigreturn temporarily defined + to i386_arch_sigreturn. + (arch_sigreturn): Define. Add x32 personality support there. + * sigreturn.c: Remove arch_sigreturn header and footer. + + Requested-by: Denys Vlasenko + +2015-11-26 Dmitry V. Levin + + Add initial Travis CI support. + * .travis.yml: New file. + * travis-ci.sh: Likewise. + +2015-11-27 Dmitry V. Levin + + tests: remove temporary files left after two tests. + * tests/net-yy.test: Remove "$LOG"-connect and "$LOG"-accept. + * tests/unix-yy.test: Likewise. + +2015-11-27 Dmitry V. Levin + + tests: skip stat32-v.test on x32. + Explicitly skip 32-bit stat test on x32 even if libc pretends + to support it. + + * tests/stat.c (main) [__x86_64__ && __ILP32__]: Skip. + +2015-11-27 Dmitry V. Levin + + tests: fix ipc_msgbuf.test on x32. + * tests/ipc_msgbuf.c: Include "config.h" and "kernel_types.h". + (main): Replace "long" with "kernel_long_t" in struct msgbuf. + + x32: fix pselect6 decoding. + * desc.c: Include "kernel_types.h". + (umove_kulong_array_or_printaddr): New function. + (SYS_FUNC(pselect6)): Use it. + + x32: fix sigreturn decoding. + * linux/x32/arch_sigreturn.c: Implement x32_rt_sigreturn decoding. + * linux/x86_64/arch_sigreturn.c: Handle (current_personality == 0) + case only. + Include "x32/arch_sigreturn.c" instead of "i386/arch_sigreturn.c". + + x32: fix struct dirent decoding. + * kernel_types.h: New file. + * Makefile.am (strace_SOURCES): Add it. + * configure.ac (AC_CHECK_TYPES): Check for __kernel_long_t + and __kernel_ulong_t in . + * dirent.c: Stop including . + (kernel_dirent): Remove. + Include "kernel_types.h". + (print_old_dirent, SYS_FUNC(getdents)): Print variables + of kernel_ulong_t type using %Lu format. + * syscall.c (kernel_long_t, kernel_ulong_t): Remove. + Include "kernel_types.h". + * tests/getdents.c (kernel_dirent): Remove. + Include "kernel_types.h". + (print_dirent): Print variables of kernel_ulong_t type using %Lu format. + +2015-11-26 Elvira Khabirova + + Refer to -h on incorrect usage. + * defs.h (error_msg_and_help): New prototype. + * strace.c (error_msg_and_help): New function. + (error_opt_arg, init): Use it. + (usage): Remove unnecessary arguments. + * count.c: Use the new function. + + Rearrange flags descriptions in the usage text. + * strace.c (usage): Rearrange descriptions. + * tests/strace-k.test: Change the option detecting regexp accordingly. + +2015-11-26 Dmitry V. Levin + + tests: run in "set -x" mode if VERBOSE variable is non-null. + * tests/init.sh: Enter "set -x" mode if $VERBOSE is non-null. + +2015-11-26 Dmitry V. Levin + + tests: fix match_diff usage. + Fix argument order in match_diff invocations: + the first argument has to be actual output, + the second argument has to be expected output. + + * tests/aio.test: Swap match_diff arguments. + * tests/clock_nanosleep.test: Likewise. + * tests/clock_xettime.test: Likewise. + * tests/file_handle.test: Likewise. + * tests/getdents.test: Likewise. + * tests/getdents64.test: Likewise. + * tests/getrandom.test: Likewise. + * tests/inet-cmsg.test: Likewise. + * tests/ioctl.test: Likewise. + * tests/membarrier.test: Likewise. + * tests/mlock2.test: Likewise. + * tests/nanosleep.test: Likewise. + * tests/pselect6.test: Likewise. + * tests/readdir.test: Likewise. + * tests/readlink.test: Likewise. + * tests/readlinkat.test: Likewise. + * tests/rt_sigqueueinfo.test: Likewise. + * tests/seccomp.test: Likewise. + * tests/select.test: Likewise. + * tests/sendfile.test: Likewise. + * tests/sendfile64.test: Likewise. + * tests/struct_flock.test: Likewise. + * tests/sysinfo.test: Likewise. + * tests/time.test: Likewise. + * tests/timer_create.test: Likewise. + * tests/timer_xettime.test: Likewise. + * tests/timerfd_xettime.test: Likewise. + * tests/times-fail.test: Likewise. + * tests/times.test: Likewise. + * tests/umovestr2.test: Likewise. + * tests/userfaultfd.test: Likewise. + * tests/utime.test: Likewise. + * tests/utimensat.test: Likewise. + * tests/xet_robust_list.test: Likewise. + * tests/xetitimer.test: Likewise. + * tests/xettimeofday.test: Likewise. + +2015-11-26 Dmitry V. Levin + + x86_64: fix x32 personality support in print_llu_from_low_high_val. + x86 is the only personality supported on x86_64 + that has 32-bit syscall arguments. + + * io.c (print_llu_from_low_high_val) [X86_64]: Fix + current_personality == 2 case. + +2015-11-26 Dmitry V. Levin + + x86_64: fix x32 personality support in getllval. + x86 is the only personality supported on x86_64 + that has 32-bit syscall arguments. + + * util.c (getllval) [X86_64]: Fix current_personality == 2 case. + +2015-11-26 Dmitry V. Levin + + tests/file_handle: fix expected output. + * tests/file_handle.c (main): Parametrize handle_type + in open_by_handle_at parser output. + + startup_attach: fix compilation warning. + * strace.c (startup_attach): Split single error_msg statement with + variable number of arguments to silence a compilation warning. + +2015-11-26 Dmitry V. Levin + + .gitignore: add mpers_xlat.h. + Ignore mpers_xlat.h generated since commit v4.10-454-g5cb45b2. + + * .gitignore: Add /mpers_xlat.h. + + Reported-by: Elvira Khabirova + +2015-11-26 Dmitry V. Levin + + tests: add struct_flock.test. + * tests/struct_flock.c: New file. + * tests/struct_flock.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add struct_flock. + (TESTS): Add struct_flock.test. + * tests/.gitignore: Add struct_flock. + + Convert parsers of flock structures to new mpers infrastructure. + * fetch_struct_flock.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * fcntl.c (print_struct_flock64): New function. + (printflock64): Use fetch_struct_flock64 and print_struct_flock64. + (printflock): Use fetch_struct_flock and print_struct_flock64. + + fcntl.c: implement decoding for all known operations. + * xlat/f_owner_types.in: New file. + * xlat/f_seals.in: Likewise. + * fcntl.c: Include "xlat/f_owner_types.h" and "xlat/f_seals.h". + (print_f_owner_ex): New function. + (SYS_FUNC(fcntl)): Use it. + Handle F_SETPIPE_SZ, F_GETPIPE_SZ, F_OFD_SETLKW, + F_OFD_SETLK, F_SETOWN_EX, F_ADD_SEALS, F_SETSIG, + F_OFD_GETLK, F_GETOWN_EX, F_GET_SEALS, F_GETSIG. + + fcntl.c: mark F_DUPFD and F_DUPFD_CLOEXEC return code with RVAL_FD flag. + * fcntl.c (SYS_FUNC(fcntl)): Set RVAL_FD flag in the return code + for F_DUPFD and F_DUPFD_CLOEXEC operations. + + fcntl.c: remove redundant ifdefs. + * fcntl.c (USE_PRINTFLOCK64): Remove macro. + (printflock64): Define unconditionally. + (SYS_FUNC(fcntl)): Do not check for USE_PRINTFLOCK64, + F_DUPFD_CLOEXEC, F_NOTIFY, F_SETLEASE, and F_GETLEASE macros. + + Update F_* constants. + * xlat/fcntlcmds.in: Add F_SETOWN_EX, F_GETOWN_EX, F_GETOWNER_UIDS, + F_OFD_GETLK, F_OFD_SETLK, F_OFD_SETLKW, and F_CANCELLK. + Remove F_ALLOCSP, F_BLKSIZE, F_BLOCKS, F_CHKFL, F_CNVT, F_DUP2FD, + F_ISSTREAM, F_NPRIV, F_PRIV, F_QUOTACL, F_REVOKE, F_RGETLK, F_RSETLK, + F_RSETLKW, F_SHARE, and F_UNSHARE. + Add default values. + + Update LOCK_* constants. + * xlat/flockcmds.in: Add LOCK_MAND, LOCK_READ, LOCK_WRITE, and LOCK_RW. + Add default values. + +2015-11-26 Dmitry V. Levin + + fcntl.c: use instead of + Include for proper definitions of F_* constants + and flock structures. + + * configure.ac (AC_CHECK_TYPES): Check for struct flock, struct flock64, + struct __kernel_flock, and struct __kernel_flock64 in . + * flock.h: New file. + * Makefile.am (strace_SOURCES): Add it. + * fcntl.c: Include it instead of . + (struct flock64): Remove. + (printflock): Use struct_kernel_flock instead of struct flock. + (printflock64): Use struct_kernel_flock64 instead of struct flock64. + +2015-11-26 Elvira Khabirova + + mpers: fix compound types with arbitrary member alignments. + * mpers.sh: Compound types are now represented as packed + with character arrays as explicit fillers inbetween members + and at the end. + +2015-11-26 Mike Frysinger + + Support C libraries without System V shared memory/ipc. + Some systems (like Bionic) omit support for SysV related code. That + means no C library headers for strace to include. Add configure tests + to probe the headers from the kernel and use them when they are + available. + + It might make more sense to never rely on the C library's headers as + there is no guarantee or requirement that the structure layout between + apps and the C library match that what is passed to the kernel. + + * configure.ac (AC_CHECK_HEADERS): Check for linux/ipc.h, + linux/mqueue.h, linux/msg.h, linux/sem.h, linux/shm.h, + sys/ipc.h, sys/msg.h, sys/sem.h, and sys/shm.h. + * ipc_defs.h: Include or depending + on what is available. + * ipc_msg.c: Replace with "ipc_defs.h". + Fallback to when available. + * ipc_msgctl.c: Include , , or + based on what is available. Note missing support for old ipc structs. + * ipc_sem.c: Include or depending + on what is available. Only decode sembuf when available. + * ipc_shm.c: Fallback to when available. + * ipc_shmctl.c: Include , , or + based on what is available. Note missing support for old ipc structs. + * print_mq_attr.c: Fallback to when available. + +2015-11-25 Dmitry V. Levin + + CREDITS.in: add Jian Zhen. + Thanks to Jian Zhen for donation of https://github.com/strace/ and + strace.io. + + * CREDITS.in: Add Jian Zhen. + +2015-11-24 Dmitry V. Levin + + Fix syscall entries of unimplemented getpmsg and putpmsg syscalls. + * linux/ia64/syscallent.h (getpmsg): Change SEN(printargs) + to SEN(getpmsg). + (putpmsg): Change SEN(printargs) to SEN(putpmsg). + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-n64.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + * linux/arm/syscallent.h (getpmsg, putpmsg): Set sys_flags to TN. + * linux/bfin/syscallent.h (getpmsg, putpmsg): Likewise. + * linux/hppa/syscallent.h (getpmsg, putpmsg): Likewise. + * linux/i386/syscallent.h (getpmsg, putpmsg): Likewise. + * linux/m68k/syscallent.h (getpmsg, putpmsg): Likewise. + * linux/microblaze/syscallent.h (getpmsg, putpmsg): Likewise. + * linux/powerpc/syscallent.h (getpmsg, putpmsg): Likewise. + * linux/s390/syscallent.h (getpmsg, putpmsg): Likewise. + * linux/s390x/syscallent.h (getpmsg, putpmsg): Likewise. + * linux/x32/syscallent.h (getpmsg, putpmsg): Likewise. + * linux/x86_64/syscallent.h (getpmsg, putpmsg): Likewise. + +2015-11-24 Dmitry V. Levin + + Remove parsers of getpmsg and putpmsg syscalls. + These system calls are not implemented in the Linux kernel. + + * linux/dummy.h(getpmsg, putpmsg): Move to the list of deprecated + syscalls. + * Makefile.am (strace_SOURCES): Remove stream.c. + * stream.c: Remove. + * xlat/pmsgflags.in: Remove. + +2015-11-24 Dmitry V. Levin + + Remove parser of query_module syscall. + Since query_module syscall is present only in kernels before Linux 2.6 + and strace does not support those kernels, there is no use to keep this + parser any longer. + + * bjm.c: Do not include , "xlat/qm_which.h", + and "xlat/modflags.h". + (MOD_*, QM_*, module_symbol, module_info, SYS_FUNC(query_module)): + Remove. + * linux/dummy.h (sys_query_module): Add stub alias. + * xlat/modflags.in: Remove. + * xlat/qm_which.in: Remove. + +2015-11-24 Dmitry V. Levin + + Fix syscall entries of deprecated sysfs syscall. + * linux/alpha/syscallent.h (sysfs): Change nargs from 5 to 3. + * linux/hppa/syscallent.h (sysfs): Likewise. + * linux/mips/syscallent-n32.h (sysfs): Likewise. + * linux/mips/syscallent-n64.h (sysfs): Likewise. + + Move sysfs syscall to deprecated category. + * linux/dummy.h (sys_sysfs): Move to the list of deprecated syscalls. + + Fix syscall entries of deprecated bdflush syscall. + * linux/alpha/syscallent.h (bdflush): Change nargs from 0 to 2. + * linux/arm/syscallent.h (bdflush): Likewise. + * linux/avr32/syscallent.h (bdflush): Likewise. + * linux/bfin/syscallent.h (bdflush): Likewise. + * linux/hppa/syscallent.h (bdflush): Likewise. + * linux/i386/syscallent.h (bdflush): Likewise. + * linux/ia64/syscallent.h (bdflush): Likewise. + * linux/m68k/syscallent.h (bdflush): Likewise. + * linux/microblaze/syscallent.h (bdflush): Likewise. + * linux/powerpc/syscallent.h (bdflush): Likewise. + * linux/s390/syscallent.h (bdflush): Likewise. + * linux/s390x/syscallent.h (bdflush): Likewise. + * linux/sh/syscallent.h (bdflush): Likewise. + * linux/sh64/syscallent.h (bdflush): Likewise. + * linux/sparc/syscallent.h (bdflush): Likewise. + +2015-11-22 Dmitry V. Levin + + Implement name_to_handle_at and open_by_handle_at syscalls decoding. + * file_handle.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/dummy.h (sys_name_to_handle_at, sys_open_by_handle_at): + Remove stub aliases. + * pathtrace.c (pathtrace_match): Add SEN_name_to_handle_at. + * tests/file_handle.c: New file. + * tests/file_handle.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add file_handle. + (TESTS): Add file_handle.test. + * tests/.gitignore: Add file_handle. + + Implement lookup_dcookie syscall decoding. + * lookup_dcookie.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/dummy.h (sys_lookup_dcookie): Remove stub alias. + + Implement kexec_file_load syscall decoding. + * xlat/kexec_file_load_flags.in: New file. + * kexec.c: Include "xlat/kexec_file_load_flags.h". + (SYS_FUNC(kexec_file_load)): New function. + * linux/dummy.h (sys_kexec_file_load): Remove stub alias. + * pathtrace.c (pathtrace_match): Add SEN_kexec_file_load. + + Implement kcmp syscall decoding. + * kcmp.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/dummy.h (sys_kcmp): Remove stub alias. + * xlat/kcmp_types.in: New file. + + Implement iopl syscall decoding. + * iopl.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/dummy.h (sys_iopl): Remove stub alias. + + Implement ioperm syscall decoding. + * ioperm.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/dummy.h (sys_ioperm): Remove stub alias. + + net: fix printing of IP_RECVOPTS/IP_RETOPTS cmsg options. + * net.c (print_cmsg_ip_opts): Print each byte as unsigned char. + + userfaultfd: fix pathtrace support. + * pathtrace.c (pathtrace_match): Add SEN_userfaultfd. + +2015-11-22 Dmitry V. Levin + + Implement IPPROTO_IP control messages decoding. + * net.c: Include "xlat/ip_cmsg_types.h". + (print_cmsg_ip_pktinfo, print_cmsg_ip_ttl, print_cmsg_ip_tos, + print_cmsg_ip_opts, print_cmsg_ip_recverr, print_cmsg_ip_checksum, + print_cmsg_ip_origdstaddr): New functions. + (print_cmsg_type_data): Add generic SOL_IP level decoding. + Use these functions for decoding of IP_PKTINFO, IP_TTL, IP_TOS, + IP_RECVOPTS, IP_RETOPTS, IP_RECVERR, IP_ORIGDSTADDR, IP_CHECKSUM, + and SCM_SECURITY type messages. + * xlat/ip_cmsg_types.in: New file. + * xlat/sockipoptions.in: Move IP_RETOPTS before IP_RECVRETOPTS. + * tests/inet-cmsg.c: New file. + * tests/inet-cmsg.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add inet-cmsg. + (TESTS): Add inet-cmsg.test. + * tests/.gitignore: Add inet-cmsg. + + Suggested-by: Orion Poplawski + +2015-11-22 Dmitry V. Levin + + Simplify control messages printers. + Do not pass sizeof(struct cmsghdr) to every cmsg printer. + + * net.c (printcmsghdr): Pass pointer to cmsg_data and length + of cmsg_data to print_cmsg_type_data. + (print_cmsg_type_data): Update prototype. Pass pointer to cmsg_data + and length of cmsg_data to cmsg printers. + (print_scm_rights, print_scm_creds, print_scm_security): Update. + +2015-11-21 Dmitry V. Levin + + net: factor out address printing code to a separate function. + * net.c (sockaddr_buf_t): New type. + (print_sockaddr): New function. + (printsock, print_group_req): Use it. + +2015-11-20 Dmitry V. Levin + + mpers: skip xlat struct definitions in mpers mode. + Avoid duplicate definitions of xlat structures in files + compiled in mpers mode. + + Each xlat file defines the corresponding xlat struct with + either global or local visibility using the following rules: + + - if xlat struct declaration is available in defs.h, + a global definition is provided in regular mode, + and nothing is provided in mpers mode; + - otherwise, if xlat file is included by a mpers source file, + a global definition is provided in regular mode + (unless no mpers mode is supported on this architecture, + in that case, a local definition is provided instead), + and a declaration is provided in mpers mode; + - otherwise, a local definition is provided in regular mode, + and an error message is printed in mpers mode. + + Fallback definitions of constants provided by xlat files + remain available in all modes. + + * bootstrap: Invoke generate_mpers_am.sh before xlat/gen.sh. + * defs.h (adjtimex_modes, adjtimex_status, sigev_value): Remove. + * generate_mpers_am.sh: Generate mpers_xlat.h. + * Makefile.am (EXTRA_DIST): Add mpers_xlat.h. + * print_sigevent.c: Include "xlat/sigev_value.h" unconditionally. + * print_timex.c: Include "xlat/adjtimex_modes.h" and + "xlat/adjtimex_status.h" unconditionally. + * xlat/gen.sh (cond_xlat): Move printing of fallback definitions ... + (cond_def): ... here. + (gen_header): Check also mpers_xlat.h for global declarations + of xlat structures. + Process input file twice, first time print directives + only, second time print everything. + Wrap struct xlat into #ifdef IN_MPERS ... #else ... #endif. + * xlat/getrandom_flags.in: Cleanup. + +2015-11-20 Dmitry V. Levin + + tests: rewrite getdents test in C for better coverage. + * tests/getdents.awk: Remove. + * tests/getdents.out: Remove. + * tests/getdents.c: New file. + * tests/getdents.test: Rewrite. + * tests/getdents64.c: New file. + * tests/getdents64.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add getdents and getdents64. + (TESTS): Add getdents64.test. + (EXTRA_DIST): Remove getdents.awk and getdents.out. + * tests/.gitignore: Add getdents and getdents64. + +2015-11-19 Dmitry V. Levin + + tests: add readdir.test. + * tests/readdir.c: New file. + * tests/readdir.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add readdir. + (TESTS): Add readdir.test. + * tests/.gitignore: Add readdir. + + Mpersify parsers of readdir and getdents syscalls. + * defs.h (dirent_types): New xlat prototype. + * dirent.c: Stop including "xlat/direnttypes.h". + (kernel_dirent): New typedef. Mpersify it. + (print_old_dirent): Use it instead of old_dirent_t. + (SYS_FUNC(getdents)): Use it instead of struct kernel_dirent. + Rename direnttypes to dirent_types. + (SYS_FUNC(getdents64)): Move ... + * dirent64.c: ... here. Rename direnttypes to dirent_types. + Include "xlat/dirent_types.h". + * Makefile.am (strace_SOURCES): Add dirent64.c. + * xlat/direnttypes.in: Rename to xlat/dirent_types.in. + +2015-11-19 Gabriel Laskar + + getdents: fix typos in array output. + Array should be enclosed by square brakets, and elements should be + separated by commas. + + * dirent.c (SYS_FUNC(getdents), SYS_FUNC(getdents64)): Fix typos + in array output. + * tests/getdents.awk: Update regexps to match fixed output. + * tests/getdents.out: Update output. + +2015-11-19 Dmitry V. Levin + + printcmsghdr: move type and data decoders to a separate function. + * net.c (print_scm_rights, print_scm_creds, print_scm_security): Change + to return void. Move printing of struct cmsghdr closing '}' ... + (printcmsghdr): ... here. Move type and data decoders to ... + (print_cmsg_type_data): ... new function. + +2015-11-18 Dmitry V. Levin + + Assume that libc provides sendmsg. + Starting with commit v4.6-281-g7af9f35, we implicitly assume that + HAVE_SENDMSG is always defined. Therefore, the check for sendmsg + availability is redundant and could be safely removed. + + * configure.ac (AC_CHECK_FUNCS): Remove sendmsg. + * linux/dummy.h [!HAVE_SENDMSG] (sys_recvmsg, sys_sendmsg): Remove + stub aliases. + * net.c [HAVE_SENDMSG]: Define unconditionally. + * syscall.c (dumpio) [HAVE_SENDMSG]: Likewise. + +2015-11-18 Dmitry V. Levin + + net.c: move fallback definition of SCM_SECURITY to xlat/ + * net.c: Move fallback definition of SCM_SECURITY ... + * xlat/scmvals.in: ... here. + +2015-11-17 Dmitry V. Levin + + Implement mlock2 syscall decoding. + * mem.c: Include "xlat/mlock_flags.h". + (SYS_FUNC(mlock2)): New function. + * xlat/mlock_flags.in: New file. + * xlat/mlockall_flags.in: Add MCL_ONFAULT, add default values. + * linux/dummy.h (mlock2): Remove. + * tests/mlock2.c: New file. + * tests/mlock2.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add mlock2. + (TESTS): Add mlock2.test. + * tests/.gitignore Add mlock2. + + Implement membarrier syscall decoding. + * membarrier.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * xlat/membarrier_cmds.in: New file. + * linux/dummy.h (membarrier): Remove. + * tests/membarrier.c: New file. + * tests/membarrier.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add membarrier. + (TESTS): Add membarrier.test. + * tests/.gitignore: Add membarrier. + + Implement userfaultfd syscall decoding. + * userfaultfd.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * xlat/uffd_flags.in: New file. + * linux/dummy.h (userfaultfd): Remove. + * tests/userfaultfd.c: New file. + * tests/userfaultfd.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add userfaultfd. + (TESTS): Add userfaultfd.test. + * tests/.gitignore: Add userfaultfd. + +2015-11-17 Dmitry V. Levin + + ia64: wire up kcmp syscall. + ia64 has kcmp syscall starting with linux kernel commit + v4.3-rc7-1-gd305c47. + + * linux/ia64/syscallent.h (kcmp): New entry. + +2015-11-17 Dmitry V. Levin + + powerpc: wire up direct sysv ipc syscalls. + Starting with linux commit v4.3-rc3-33-ga342361, powerpc has + direct sysv ipc syscalls in addition to traditional ipc syscall. + + * linux/powerpc/syscallent.h (semop, semget, semctl, semtimedop, msgsnd, + msgrcv, msgget, msgctl, shmat, shmdt, shmget, shmctl): New entries. + +2015-11-17 Dmitry V. Levin + + Wire up userfaultfd, membarrier, and mlock2 syscalls. + * linux/dummy.h (membarrier, mlock2, userfaultfd): New stub aliases. + * linux/32/syscallent.h (userfaultfd, membarrier, mlock2): New entries. + * linux/64/syscallent.h (userfaultfd, membarrier, mlock2): Likewise. + * linux/arm/syscallent.h (userfaultfd, membarrier, mlock2): Likewise. + * linux/hppa/syscallent.h (userfaultfd, membarrier, mlock2): Likewise. + * linux/i386/syscallent.h (userfaultfd, membarrier, mlock2): Likewise. + * linux/ia64/syscallent.h (userfaultfd, membarrier): Likewise. + * linux/m68k/syscallent.h (userfaultfd, membarrier, mlock2): Likewise. + * linux/microblaze/syscallent.h (userfaultfd, membarrier, mlock2): Likewise. + * linux/mips/syscallent-n32.h (userfaultfd, membarrier, mlock2): Likewise. + * linux/mips/syscallent-n64.h (userfaultfd, membarrier, mlock2): Likewise. + * linux/mips/syscallent-o32.h (userfaultfd, membarrier, mlock2): Likewise. + * linux/powerpc/syscallent.h (userfaultfd, membarrier): Likewise. + * linux/s390/syscallent.h (userfaultfd, membarrier, mlock2): Likewise. + * linux/s390x/syscallent.h (userfaultfd, membarrier, mlock2): Likewise. + * linux/sparc/syscallent.h (membarrier, userfaultfd, mlock2): Likewise. + * linux/x32/syscallent.h (userfaultfd, membarrier, mlock2): Likewise. + * linux/x86_64/syscallent.h (userfaultfd, membarrier, mlock2): Likewise. + +2015-11-16 Dmitry V. Levin + + sprintflags: skip zero flags. + Tweak sprintflags behaviour to match printflags. + + * util.c (sprintflags): Skip zero flags unless the value passed + to sprintflags is also zero. + +2015-11-16 Mike Frysinger + + printflags: handle empty xlats. + If the set of headers are unable to produce a valid list, printflags + will try to pass NULL to tprints which crashes. Add a sanity check + for this edge case. + + * util.c (printflags): Check xlat->str is not NULL. + +2015-11-16 Dmitry V. Levin + + mpers: forward mpers_DEFS to mpers.sh. + mpers_DEFS has to be forwarded to mpers.sh so that config.h would be + properly included by defs.h at preprocessor stage. + + * Makefile.am (mpers-m%.stamp): Add the whole $(mpers_sh_opts) set of + options to mpers.sh's CPPFLAGS. + +2015-11-16 Dmitry V. Levin + + tests/ioctl: workaround glibc ioctl wrapper on powerpc. + * tests/ioctl.c (main) [POWERPC] Disable TCGETS test. + +2015-11-15 Dmitry V. Levin + + powerpc: wire up switch_endian syscall. + powerpc has switch_endian syscall starting with linux commit + v4.0-rc4-67-g529d235. + + * linux/powerpc/syscallent.h (switch_endian): New entry. + +2015-11-15 Dmitry V. Levin + + sparc: reserve more space for new syscalls. + Move socket subcalls further down the table to make room + for new syscalls. + + * linux/sparc/syscallent.h (SYS_socket_subcall): Raise from 353 to 400. + +2015-11-15 Dmitry V. Levin + + m68k: wire up direct socket syscalls. + Starting with linux commit v4.3-rc3-1-g5b3f33e, m68k has direct + socket syscalls in addition to traditional socketcall syscall. + + * linux/m68k/syscallent.h (socket, socketpair, bind, connect, listen, + accept4, getsockopt, setsockopt, getsockname, getpeername, sendto, + sendmsg, recvfrom, recvmsg, shutdown, recvmmsg, sendmmsg): New entries. + +2015-11-15 Dmitry V. Levin + + i386: wire up direct socket syscalls. + Starting with linux commit v4.2-rc1-64-g9dea5dc, x86 has direct + socket syscalls in addition to traditional socketcall syscall. + + * linux/i386/syscallent.h (socket, socketpair, bind, connect, listen, + accept4, getsockopt, setsockopt, getsockname, getpeername, sendto, + sendmsg, recvfrom, recvmsg, shutdown): New entries. + +2015-11-11 Heiko Carstens + + s390, s390x: update syscall tables. + * linux/s390/syscallent.h: Add new syscalls available with kernel 4.3.0. + * linux/s390x/syscallent.h: Likewise. + +2015-11-07 Dmitry V. Levin + + Fix *_printer_defs.h rules ambiguousness. + There is an ambiguousness in *_printer_defs.h rules definition: + + $ grep '^[^ ]*_defs\.h: ' Makefile.am + m%_defs.h: $(srcdir_mpers_source_files) + %_printer_defs.h: $(srcdir_mpers_source_files) + + While it appears to work with GNU make, it has to be fixed nevertheless. + + * Makefile.am (m%_defs.h): Rename to m%_type_defs.h. + (mpers_m32_targets): Rename m32_defs.h to m32_type_defs.h. + (mpers_mx32_targets): Rename mx32_defs.h to mx32_type_defs.h. + * mpers_type.h: Rename m32_defs.h to m32_type_defs.h, + mx32_defs.h to mx32_type_defs.h. + * .gitignore: Likewise. + + Reported-by: Elliott Hughes + +2015-10-09 Dmitry V. Levin + + fcntl.c: make use of RVAL_DECODED. + * fcntl.c (SYS_FUNC(fcntl)): Return RVAL_DECODED for write-only operations. + +2015-10-08 Dmitry V. Levin + + desc.c: move parser of fcntl syscall to a separate file. + * fcntl.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * desc.c (printflock64, printflock, SYS_FUNC(fcntl)): Move to fcntl.c. + + desc.c: move parser of flock syscall to a separate file. + * flock.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * desc.c (SYS_FUNC(flock)): Move to flock.c. + +2015-10-08 Dmitry V. Levin + + tests: fix false uio.test failures. + * tests/uio.c (main): Use descriptor number 0 in pread/pwrite + and preadv/pwritev syscalls. + * tests/uio.expected: Update regexps. + + Reported-by: Lennart Sorensen + +2015-10-01 Gabriel Laskar + + Fix make -j builds. + In files generated by mpers scripts, includes directives are taken from + original files where the type definition was done. This causes to + include defs.h in multiple files. defs.h includes printers.h header, + which is a generated header. + + This patch add an explicit dependency to printers.h for the mpers + scripts. + + * Makefile.am (mpers-m%.stamp): Add printers.h to order-only + prerequisites. + +2015-09-29 Mike Frysinger + + mpers: fix shell code to conform better to POSIX. + The `echo -n` behavior is non-portable, so use printf instead. + + * generate_mpers_am.sh: Change `echo -n` to `printf`. + +2015-09-23 Gabriel Laskar + + ioctl: fix ioctl command number decoding in case of conflicts. + When a command number was decoded through ioctl_decode_command_number(), + there was no check for conflicts with other potential ioctls numbers. + + For example: + ioctl(fd, MCE_GET_RECORD_LEN, &i); + output: + ioctl(3, MIXER_READ(1), 0x7ffddce74a58) = 0 + instead of: + ioctl(3, MIXER_READ(1) or MCE_GET_RECORD_LEN, 0x7ffee435ce08) = 0 + + * ioctl.c (SYS_FUNC(ioctl)): Fix ioctl command number decoding + in case of conflicts. + * tests/ioctl.c (main): Add a case for command number conflicts. + +2015-09-23 Dmitry V. Levin + + tests: convert ioctl.test from match_grep to match_diff. + * tests/ioctl.c (main): Print expected output. + * tests/ioctl.test: Use match_diff instead of match_grep. + * tests/ioctl.expected: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove ioctl.expected. + +2015-09-20 Dmitry V. Levin + + Convert parser of seccomp filter program to new mpers infrastructure. + * seccomp_fprog.h: New file. + * fetch_seccomp_fprog.c: New file. + * Makefile.am (strace_SOURCES): Add them. + * seccomp.c: Include "seccomp_fprog.h". + (print_seccomp_filter): Use fetch_seccomp_fprog. + +2015-09-19 Dmitry V. Levin + + tests/init.sh: enhance match_grep error diagnostics. + * tests/init.sh (match_grep): Check patterns one by one, + output only those patterns that didn't match. + + tests/init.sh: fix comment. + * tests/init.sh (match_awk): Fix usage description. + + tests: add one more case to select.test. + * tests/select.c (main): Check how timeout is printed + on exiting syscall. + + tests: uncouple pselect6 from select.test. + * tests/select.c Do not include . + Include . + [!__NR_select]: Skip the test. + (main): Remove pselect6 support, test just select syscall. + * tests/select.test: Remove all pselect6 checks, test just + select syscall. + + tests: robustify select test. + * tests/select.c: Do not include . + (main): Skip the test instead of assertions. + Add some padding to the timeval structure. + + tests: add one more case to pselect6.test. + * tests/pselect6.c (main): Check how timeout is printed + on exiting syscall. + + tests: robustify pselect6 test. + * tests/pselect6.c: Do not include and . + Include . + [!__NR_pselect6]: Skip the test. + (main): Skip the test instead of assertions. + Add some padding to the timespec structure. + + Convert another parser of struct timeval to new mpers infrastructure. + * print_time.c (sprint_timeval): New mpers printer. + [ALPHA] (sprint_timeval32): New function. + * defs.h [ALPHA] (sprint_timeval32): New prototype. + (bitness_t, TIMEVAL_TEXT_BUFSIZE, printtv_bitness, sprinttv): Remove. + * desc.c (decode_select): Replace bitness parameter with two printers. + Use them instead of printtv_bitness and sprinttv. + (sys_oldselect, sys_select): Pass print_timeval and sprint_timeval + to decode_select. + [ALPHA] (sys_osf_select): Pass print_timeval32 and sprint_timeval32 + to decode_select. + (pselect6): Pass print_timespec and sprint_timespec to decode_select. + * time.c (UTIME_NOW, UTIME_OMIT, current_time_t_is_compat, + struct timeval32, printtv_bitness, do_sprinttv, sprinttv): Remove. + + Convert another parser of struct timespec to new mpers infrastructure. + * print_time.c (sprint_timespec): New mpers printer. + * defs.h (TIMESPEC_TEXT_BUFSIZE): Update. + (sprint_timespec): Remove. + * time.c (sprint_timespec): Remove. + * net.c (sys_recvmmsg): Update callers. + * poll.c (decode_poll_exiting): Likewise. + + tests: add another case to pselect6 test. + * tests/pselect6.c: Include . + (handler): New function. + (main): Install an interval timer. + Use it to check how ERESTARTNOHAND is printed. + + Fix decoding of gettimeofday and settimeofday. + * time.c (print_timezone): new function. + (sys_gettimeofday, sys_settimeofday): Use it instead of print_timeval + to print struct timezone. + [ALPHA] (sys_osf_gettimeofday, sys_osf_settimeofday): Use it + instead of print_timeval32 to print struct timezone. + * tests/xettimeofday.c: New file. + * tests/xettimeofday.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add xettimeofday. + (TESTS): Add xettimeofday. + * tests/.gitignore: Add xettimeofday. + + Convert parser of struct timeval to new mpers infrastructure. + * defs.h (printtv, printtv_special): Remove. + [ALPHA] (print_timeval32, print_timeval32_pair): New prototypes. + * print_time.c (print_timeval): New mpers printer. + [ALPHA] (print_timeval32, print_timeval32_pair): New functions. + * time.c (sys_gettimeofday, sys_settimeofday): Use print_timeval + instead of printtv. + [ALPHA] (sys_osf_gettimeofday, sys_osf_settimeofday): + Use print_timeval32 instead of printtv_bitness. + * utimes.c [ALPHA] (sys_osf_utimes): Use print_timeval32_pair + instead of printtv_bitness. + + Convert parser of struct timespec to new mpers infrastructure. + * defs.h (print_timespec): Remove. + * print_time.c (print_timespec): New mpers printer. + * futex.c (sys_futex): Use print_timespec instead of printtv. + * ipc_sem.c (sys_semtimedop): Likewise. + * mq.c (sys_mq_timedsend, sys_mq_timedreceive): Likewise. + * time.c (clock_settime, clock_gettime, clock_nanosleep): Likewise. + (print_timespec): Remove. + + Remove unused parser of adjtime syscall. + * time.c (sys_adjtime): Remove. + + Fix decoding of clock_nanosleep. + * time.c (sys_clock_nanosleep): Use is_erestart, + temporarily_clear_syserror, and restore_cleared_syserror. + * tests/clock_nanosleep.c: New file. + * tests/clock_nanosleep.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add clock_nanosleep. + (TESTS): Add clock_nanosleep.test. + * tests/.gitignore: Add clock_nanosleep. + + Add is_erestart helper function. + * defs.h (is_erestart): New prototype. + * syscall.c (is_erestart): New function. + * time.c (sys_nanosleep): Use is_erestart, + temporarily_clear_syserror, and restore_cleared_syserror. + + Add helper functions to clear/restore syserror. + * defs.h (temporarily_clear_syserror, restore_cleared_syserror): + New prototypes. + * syscall.c (saved_u_error): New variable. + (temporarily_clear_syserror, restore_cleared_syserror): New functions. + * aio.c (sys_io_getevents): Use temporarily_clear_syserror + and restore_cleared_syserror. + * mq.c (sys_mq_timedreceive): Likewise. + * signal.c (sys_rt_sigtimedwait): Likewise. + + tests: add nanosleep.test. + * tests/nanosleep.c: New file. + * tests/nanosleep.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add nanosleep. + (TESTS): Add nanosleep.test. + * tests/.gitignore: Add nanosleep. + + tests: rewrite restart_syscall in C. + * tests/restart_syscall.c: New file. + * tests/restart_syscall.expected: Remove. + * tests/restart_syscall_unknown.expected: Remove. + * tests/restart_syscall.test: Update to use restart_syscall. + * tests/Makefile.am (check_PROGRAMS): Add restart_syscall. + (EXTRA_DIST): Remove restart_syscall.expected + and restart_syscall_unknown.expected. + * tests/.gitignore: Add restart_syscall. + + Properly initialize siginfo_t object passed to print_stopped function. + * strace.c (trace): Clear the whole siginfo_t variable before passing it + to ptrace(PTRACE_GETSIGINFO) because the latter may initialize only a + part of the structure. + + tests: add clock_xettime.test. + * tests/clock_xettime.c: New file. + * tests/clock_xettime.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add clock_xettime. + (TESTS): Add clock_xettime.test. + * tests/.gitignore: Add clock_xettime. + + Convert parser of struct itimerval to new mpers infrastructure. + * defs.h [ALPHA] (print_itimerval32): New prototype. + * print_time.c (print_itimerval): New mpers printer. + [ALPHA] (timeval32_t): New typedef. + [ALPHA] (print_timeval32_t, print_itimerval32): New functions. + * time.c (sys_getitimer, sys_setitimer): Use print_itimerval instead + of printitv. + [ALPHA] (sys_osf_getitimer, sys_osf_setitimer): Use print_itimerval32 + instead of printitv_bitness. + (tprint_timeval32, tprint_timeval, printitv_bitness, printitv): Remove. + + tests: add xetitimer.test. + * tests/xetitimer.c: New file. + * tests/xetitimer.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add xetitimer. + (TESTS): Add xetitimer.test. + * tests/.gitignore: Add xetitimer. + + Convert parser of struct itimerspec to new mpers infrastructure. + * print_time.c (print_itimerspec): New mpers printer. + * time.c (sys_timer_settime, sys_timer_gettime, sys_timerfd, + sys_timerfd_settime, sys_timerfd_gettime): Use it instead of printitv. + +2015-09-17 Dmitry V. Levin + + print_time.c: introduce print_timespec_t helper. + * print_time.c (time_fmt): New constant string. + (print_timeval_t): Use it. + (print_timespec_t): New function. + (print_timespec_t_utime): Use it. + + tests: add timerfd_xettime.test. + * tests/timerfd_xettime.c: New file. + * tests/timerfd_xettime.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add timerfd_xettime. + (TESTS): Add timerfd_xettime.test. + * tests/.gitignore: Add timerfd_xettime. + + tests: add timer_xettime.test. + * tests/timer_xettime.c: New file. + * tests/timer_xettime.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add timer_xettime. + (TESTS): Add timer_xettime.test. + * tests/.gitignore: Add timer_xettime. + + time.c: move parser of time syscall to print_time.c. + * time.c (current_time_t_is_int32): Remove. + (sys_time): Move ... + * print_time.c: ... here. Mpersify time_t. + + print_time.c: remove unused function parameters. + * print_time.c (print_timespec_t_utime, print_timeval_t): Remove + "struct tcb *" parameter. + (print_timespec_utime_pair, print_timeval_pair): Update callers. + + Add struct timex.tai support. + * configure.ac (AC_CHECK_MEMBERS): Add struct timex.tai. + * print_timex.c (print_timex) [HAVE_STRUCT_TIMEX_TAI]: Print tai field. + * tests/adjtimex.c (main) [HAVE_STRUCT_TIMEX_TAI]: Likewise. + + Convert parser of struct timex to new mpers infrastructure. + * defs.h (adjtimex_modes, adjtimex_status): New xlat prototypes. + * print_timex.c (struct_timex): New typedef. Mpersify it. + [IN_MPERS]: Do not include "xlat/adjtimex_modes.h" + and "xlat/adjtimex_status.h". + [SUPPORTED_PERSONALITIES > 1]: Remove. + (tprint_timeval): Remove. + (tprint_timex): Rename to print_timex. Mpersify it. + * time.c (do_adjtimex): Rename tprint_timex to print_timex. + * tests/adjtimex.c: New file. + * tests/adjtimex.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add adjtimex. + (TESTS): Add adjtimex.test. + * tests/.gitignore: Add adjtimex. + + Move parser of struct timex to a separate file. + * print_timex.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * time.c (tprint_timex32, tprint_timex): Move to print_timex.c. + + Enhance parser of struct sigevent. + * print_sigevent.c (print_sigevent): Always print names + of struct_sigevent fields along with their values. + Print signal name of sigev_signo for those sigev_notify values + that require valid signal numbers. + * tests/timer_create.c: New file. + * tests/timer_create.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add timer_create. + (TESTS): Add timer_create.test. + * tests/.gitignore: Add timer_create. + +2015-09-16 Dmitry V. Levin + + Convert parser of struct sigevent to new mpers infrastructure. + * defs.h (sigev_value): New prototype. + (printsigevent): Remove. + * print_sigevent.c (struct_sigevent): New typedef. Mpersify it. + [IN_MPERS]: Do not include "xlat/sigev_value.h". + (printsigevent32): Remove. + (printsigevent): Rename to print_sigevent. Mpersify it. + * mq.c (sys_mq_notify): Rename printsigevent to print_sigevent. + * time.c (sys_timer_create): Likewise. + + Move parser of struct sigevent to a separate file. + * print_sigevent.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * time.c (printsigevent32, printsigevent): Move to print_sigevent.c. + + time.c: move fallback definitions of SIGEV_* values to xlat/ + * time.c: Move fallback definitions of SIGEV_* values ... + * xlat/sigev_value.in: ... here. + + Simplify use of mpers printers. + * native_defs.h: New file. + * syscall.c: Include it. + * mpers_type.h [!IN_MPERS] (MPERS_DEFS): Change to "native_defs.h". + * defs.h (MPERS_PRINTER_NAME): Remove. + [SUPPORTED_PERSONALITIES > 1] (MPERS_PRINTER_NAME, printers): Move ... + * Makefile.am (printers.h): ... here. + Add macro definitions for mpers printers. + (m%_defs.h): Add redefinition of MPERS_PRINTER_NAME and inclusion + of "$(mpers_PREFIX)printer_decls.h". + (strace_SOURCES): Add native_defs.h. + * README-mpers: Update instructions for using mpers printers. + * ipc_msg.c (tprint_msgsnd, tprint_msgrcv): Call tprint_msgbuf directly. + * mq.c (sys_mq_open, mq_getsetattr): Call printmqattr directly. + * process.c (sys_ptrace): Call printsiginfo_at directly. + * signal.c (print_sigqueueinfo, sys_rt_sigtimedwait): Likewise. + * resource.c (sys_getrusage): Call printrusage directly. + * utimes.c (sys_utimensat): Call print_timespec_utime_pair directly. + (sys_utimes, sys_futimesat): Call print_timeval_pair directly. + * wait.c (printwaitn): Call printrusage directly. + (sys_waitid): Call printrusage and printsiginfo_at directly. + +2015-09-15 Dmitry V. Levin + + Add a new helper function umove_ulong_array_or_printaddr. + * defs.h (umove_ulong_array_or_printaddr): New prototype. + * util.c (umove_ulong_array_or_printaddr): New function. + * desc.c (sys_pselect6): Use it instead of open-coding + a proxy struct parser for different personalities. + * io.c (tprint_iov_upto): Use it instead of open-coding + a struct iovec parser for different personalities. + * kexec.c (print_kexec_segments): Use it instead of open-coding + a struct kexec_segment parser for different personalities. + (print_seg): Pass arguments using an array. + + tests: add pselect6.test. + * tests/pselect6.c: New file. + * tests/pselect6.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add pselect6. + (TESTS): Add pselect6.test. + * tests/.gitignore: Add pselect6. + +2015-09-14 Dmitry V. Levin + + Rename umove_long_or_printaddr to umove_ulong_or_printaddr. + Rename the recently added function to reflect what kind of data type + it actually deals with: unsigned long int, without sign extension. + + * defs.h (umove_long_or_printaddr): Rename to umove_ulong_or_printaddr, + chage 3rd argument to unsigned long *. + * util.c (umove_long_or_printaddr): Likewise. + * aio.c (sys_io_submit): Update callers. + +2015-09-14 Dmitry V. Levin + + aarch64, ppc64, sparc64, tile: hook up mpers printers. + * defs.h [AARCH64 && HAVE_M32_MPERS]: Define PERSONALITY0_INCLUDE_FUNCS, + PERSONALITY0_INCLUDE_PRINTERS_DECLS, + and PERSONALITY0_INCLUDE_PRINTERS_DEFS. + [POWERPC64 && HAVE_M32_MPERS]: Define PERSONALITY1_INCLUDE_FUNCS, + PERSONALITY1_INCLUDE_PRINTERS_DECLS, + and PERSONALITY1_INCLUDE_PRINTERS_DEFS. + [SPARC64 && HAVE_M32_MPERS]: Likewise. + [TILE && HAVE_M32_MPERS]: Likewise. + +2015-09-14 Anton Blanchard + + Add PowerPC specific ptrace constants. + * xlat/ptrace_cmds.in: Add PowerPC specific ptrace constants. + +2015-09-14 Dmitry V. Levin + + Update SCTP_* constants. + * xlat/socksctpoptions.in: Add SCTP_GET_ASSOC_ID_LIST, SCTP_AUTO_ASCONF, + SCTP_PEER_ADDR_THLDS, SCTP_RECVRCVINFO, SCTP_RECVNXTINFO, + SCTP_DEFAULT_SNDINFO, SCTP_SOCKOPT_CONNECTX, SCTP_SOCKOPT_CONNECTX3, + and SCTP_GET_ASSOC_STATS. + + Update F_* constants. + * xlat/fcntlcmds.in: Add F_SETPIPE_SZ, F_GETPIPE_SZ, F_ADD_SEALS, + and F_GET_SEALS. + + Update RENAME_* constants. + * xlat/rename_flags.in: Add RENAME_WHITEOUT. + + Update SO_* constants. + * xlat/sockoptions.in: Add SO_ATTACH_BPF, SO_BPF_EXTENSIONS, + SO_BUSY_POLL, SO_DETACH_BPF, SO_GET_FILTER, SO_INCOMING_CPU, + SO_LOCK_FILTER, SO_MAX_PACING_RATE, SO_PEEK_OFF, SO_RXQ_OVFL, + SO_SELECT_ERR_QUEUE, and SO_WIFI_STATUS. + + Update INPUT_PROP_* constants. + * xlat/evdev_prop.in: Add INPUT_PROP_ACCELEROMETER. + + Update KEY_* constants. + * xlat/evdev_keycode.in: Add KEY_ROTATE_DISPLAY, KEY_NUMERIC_A, + KEY_NUMERIC_B, KEY_NUMERIC_C, and KEY_NUMERIC_D. + + Update FALLOC_FL_* constants. + * xlat/falloc_flags.in: Add FALLOC_FL_INSERT_RANGE. + + Update AF_* and PF_* constants. + * xlat/addrfams.in: Add AF_IB and AF_MPLS. + * xlat/domains.in: Add PF_IB and PF_MPLS. + + Update TCP_* constants. + * xlat/socktcpoptions.in: Add TCP_NOTSENT_LOWAT, TCP_CC_INFO, + TCP_SAVE_SYN, and TCP_SAVED_SYN. + + Update PACKET_* constants. + * xlat/sockpacketoptions.in: Add PACKET_VNET_HDR, PACKET_TX_TIMESTAMP, + PACKET_TIMESTAMP, PACKET_FANOUT, PACKET_TX_HAS_OFF, PACKET_QDISC_BYPASS, + PACKET_ROLLOVER_STATS, and PACKET_FANOUT_DATA. + + Update BPF_MAP_TYPE_* constants. + * xlat/bpf_map_types.in: Add BPF_MAP_TYPE_PERF_EVENT_ARRAY. + + Update IPPROTO_* constants. + * xlat/inet_protocols.in: Add IPPROTO_MPLS. + + Update IP_* constants. + * xlat/sockipoptions.in: Add IP_CHECKSUM and IP_BIND_ADDRESS_NO_PORT. + + Update PTRACE_O_* constants. + * ptrace.h: Define PTRACE_O_SUSPEND_SECCOMP. + * xlat/ptrace_setoptions_flags.in: Add it. + + Update PR_* constants. + * xlat/prctl_options.in: Add PR_SET_FP_MODE, PR_GET_FP_MODE, + and PR_CAP_AMBIENT. + + Update SECBIT_* constants. + * xlat/secbits.in: Add SECBIT_NO_CAP_AMBIENT_RAISE + and SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED. + +2015-08-28 Dmitry V. Levin + + mpers.m4: workaround missing gnu/stubs-*.h files. + On some systems missing gnu/stubs-*.h files make -m32/-mx32 compilation + checks fail. As we want to support multiple personalities despite of + this limitation, workaround the check by creating empty gnu stub files + if necessary. + + * m4/mpers.m4 (st_MPERS): Check for the gnu stub file. Create an empty + gnu stub file if the system one is missing. + * Makefile.am (DISTCLEANFILES): Add gnu/stubs-32.h and gnu/stubs-x32.h. + +2015-08-28 Elvira Khabirova + + tests: add times-fail.test. + * tests/times-fail.c: New file. + * tests/times-fail.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add times-fail. + (TESTS): Add times-fail.test. + * tests/.gitignore: Add times-fail. + +2015-08-28 Eugene Syromyatnikov + + tests: add times.test. + * tests/times.c: New file. + * tests/times.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add times. + (TESTS): Add times.test. + (times_LDADD): Define. + * tests/.gitignore: Add times. + +2015-08-28 Elvira Khabirova + + Mpersify parser of times syscall. + Fix multiple personalities support in parser of times syscall by + mpersifying struct tms. + + * times.c (tms_t): New typedef. Mpersify it. + (sys_times): Use it instead of struct tms. + +2015-08-28 Elvira Khabirova + + tests: add sysinfo.test. + * tests/sysinfo.c: New file. + * tests/sysinfo.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add sysinfo. + (TESTS): Add sysinfo.test. + * tests/.gitignore: Add sysinfo. + +2015-08-28 Elvira Khabirova + + Mpersify parser of sysinfo syscall. + Fix multiple personalities support in parser of sysinfo syscall by + mpersifying struct sysinfo. + + * sysinfo.c (sysinfo_t): New typedef. Mpersify it. + (sys_sysinfo): Use it instead of struct sysinfo. + +2015-08-28 Elvira Khabirova + + Enhance msgctl syscall decoding. + Make parser of msgctl syscall print struct msqid_ds. + + * ipc_msgctl.c (msqid_ds_t): New typedef. Mpersify it. + (print_msqid_ds): New function. Use msqid_ds_t. + (sys_msgctl): Use print_msqid_ds. + * tests/ipc_msg.c: Update for struct msqid_ds support. + +2015-08-28 Elvira Khabirova + + Enhance shmctl syscall decoding. + Make parser of shmctl syscall print struct shmid_ds. + + * ipc_shmctl.c (shmid_ds_t): New typedef. Mpersify it. + (print_shmid_ds): New function. Use shmid_ds_t. + (sys_shmctl): Use print_shmid_ds. + * tests/ipc_shm.c: Update for struct shmid_ds support. + +2015-08-28 Elvira Khabirova + + tests: add ipc_msgbuf.test. + * tests/ipc_msgbuf.c: New file. + * tests/ipc_msgbuf.expected: Likewise. + * tests/ipc_msgbuf.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add ipc_msgbuf. + (TESTS): Add ipc_msgbuf.test. + (EXTRA_DIST): Add ipc_msgbuf.expected. + * tests/.gitignore: Add ipc_msgbuf. + +2015-08-28 Elvira Khabirova + + Mpersify tprint_msgsnd and tprint_msgrcv. + Fix multiple personalities support in tprint_msgsnd and tprint_msgrcv + by converting tprint_msgbuf into a mpersified printer. + + * print_msgbuf.c (msgbuf_t): New typedef. Mpersify it. + (tprint_msgbuf): Use it instead of long. + Wrap function name into MPERS_PRINTER_DECL. + * ipc_msg.c (tprint_msgsnd, tprint_msgrcv): Use mpersified + tprint_msgbuf. + +2015-08-28 Elvira Khabirova + + tests: add mq.test. + * tests/mq.c: New file. + * tests/mq.expected: Likewise. + * tests/mq.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add mq. + (TESTS): Add mq.test. + (EXTRA_DIST): Add mq.expected. + (mq_LDADD): Add -lrt. + * tests/.gitignore: Add mq. + +2015-08-28 Elvira Khabirova + + Mpersify parsers of mq_open and mq_getsetattr syscalls. + Fix multiple personalities support in parsers of mq_open and + mq_getsetattr by converting printmqattr into a mpersified printer. + + * print_mq_attr.c (mq_attr_t): New typedef. Mpersify it. + (printmqattr): Use it instead of struct mq_attr. Wrap function name + into MPERS_PRINTER_DECL. + * mq.c (mq_open, mq_getsetattr): Use mpersified printmqattr. + +2015-08-28 Dmitry V. Levin + + tests: add wait.test. + * tests/wait.c: New file. + * tests/wait.expected: Likewise. + * tests/wait.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add wait. + (TESTS): Add wait.test. + (EXTRA_DIST): Add wait.expected. + * tests/.gitignore: Add wait. + +2015-08-28 Dmitry V. Levin + + Mpersify parsers of getrusage, waitpid, wait4, and waitid syscalls. + Fix multiple personalities support in parsers of getrusage, waitpid, + wait4, and waitid syscalls by converting printrusage into a mpersified + printer. + + * defs.h (printrusage): Remove. + * printrusage.c (rusage_t): New typedef. Mpersify it. + (printrusage): Use it instead of struct rusage. + Wrap function name into MPERS_PRINTER_DECL. + * resource.c (sys_getrusage): Use mpersified printrusage. + * wait.c (printwaitn, sys_waitid): Likewise. + +2015-08-28 Elvira Khabirova + + tests: add rt_sigqueueinfo.test. + * tests/rt_sigqueueinfo.c: New file. + * tests/rt_sigqueueinfo.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add rt_sigqueueinfo. + (TESTS): Add rt_sigqueueinfo.test. + * tests/.gitignore: Add rt_sigqueueinfo. + +2015-08-28 Elvira Khabirova + + Mpersify printsiginfo_at printer. + Fix multiple personalities support in parsers of ptrace, + rt_sigqueueinfo, rt_tgsigqueueinfo, rt_sigtimedwait and waitid syscalls + by converting printsiginfo_at into a mpersified printer. + + * printsiginfo.c (siginfo_t): Mpersify. + (printsiginfo_at): Wrap function name into MPERS_PRINTER_DECL. + * defs.h (printsiginfo_at): Remove. + * signal.c (print_sigqueueinfo, sys_rt_sigtimedwait): Use mpersified + printsiginfo_at. + * process.c (sys_ptrace): Likewise. + * wait.c (sys_waitid): Likewise. + +2015-08-28 Elvira Khabirova + + Mpersify parser of sigaltstack syscall. + Fix multiple personalities support in parser of sigaltstack syscall by + mpersifying stack_t typedef. + + * sigaltstack.c (stack_t): Mpersify. + (print_stack_t): Use it. + +2015-08-28 Elvira Khabirova + + Mpersify parser of utime syscall. + Fix multiple personalities support in parser of utime syscall by using + mpersified utimbuf_t typedef. + + * utime.c (utimbuf_t): New typedef. Mpersify it. + (sys_utime): Use it instead of a locally defined union. + +2015-08-28 Dmitry V. Levin + + tests: add utimensat.test. + * tests/utimensat.c: New file. + * tests/utimensat.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add utimensat. + (TESTS): Add utimensat.test. + * configure.ac (AC_CHECK_FUNCS): Add utimensat. + * tests/.gitignore: Add utimensat. + +2015-08-28 Dmitry V. Levin + + Mpersify parsers of utimes, futimesat, and utimensat syscalls. + Fix multiple personalities support in parsers of utimes, futimesat, + and utimensat syscalls by introducing two mpersified printers: + print_timeval_pair and print_timespec_utime_pair. + + * print_time.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * utimes.c (decode_utimes): Remove. + (sys_utimes, sys_futimesat): Use print_timeval_pair instead + of decode_utimes. + (sys_utimensat): Use print_timespec_utime_pair instead of decode_utimes. + +2015-08-28 Elvira Khabirova + + Add mpers support. + Add a subsystem for semi-automatical definition of how parsers should + work with personality-dependent (mpers) types of tracee's data. Create + auxiliary libraries containing mpers syscall parsers and printer + functions, one library for each possible nonnative target personality. + + Currently some parsers do not handle differences in definitions of data + types between personalities, namely LP64 and ILP32. When + this is the case, long integers, pointers, and all compound + types containing long and pointer members may be printed incorrectly, + because of differences in sizes, offsets and alignments. + + Since in most cases these are the only differences in desired behaviour + of parsers and printers for different personalities, a correct way + would be to compile one source code into multiple parsers, differing + only in definitions of mpers types. + + To get a definition of a given type for nonnative personality + a very basic .c file containing a declaration of a variable of this type + is being compiled for this personality (using -m32 or -mx32 compiler + flag). Information about the type is then being extracted from + this binary's DWARF debug info with an awk script and put + into a corresponding header file. Resulting headers are being used to + compile mpers variations of syscall parsers and printer functions. + + In addition to syscall parsers, there can occur a need to create mpers + printing functions, which then can be called from many places + in the code (for example, printsiginfo_at). Such functions (printers) + are marked in a special manner. + + For each possible nonnative target personality a library is being + created, containing mpers variations of syscall parsers and printers. + Only syscall parsers from files marked in a special manner and specially + marked functions from such files are being recompiled and included + in these libraries. + + generate_mpers_am.sh is called by bootstrap to find the files + from strace_SOURCES which include MPERS_DEFS. During compilation, + these files are being inspected for inclusions of DEF_MPERS_TYPE, + and nonnative variations of each included type are being generated + by an awk script. + + Mpers parser names are being modified during inclusions of syscallent + headers for nonnative personalities. Pointers to printers are + being stored in structs struct_printers, and a master + pointer printers is being updated on every set_personality. + + * README-mpers: New README explaining how to use mpers support. + * empty.h: New empty file. + * generate_mpers_am.sh: New file. + * mpers.awk: Likewise. + * mpers.sh: Likewise. + * mpers_test.sh: Likewise. + * mpers_type.h: Likewise. + * Makefile.am (strace_SOURCES): Add empty.h and mpers_type.h. + (strace_CPPFLAGS, strace_LDFLAGS, strace_LDADD): Move to the beginning + of the file. + (strace_LDADD, noinst_LIBRARIES): Add libmpers-%.a. + (EXTRA_DIST): Add mpers.awk, mpers.sh, mpers_test.sh. + (BUILT_SOURCES, CLEANFILES): Add new generated files: + native_printer_decls.h, native_printer_defs.h, printers.h, + [HAVE_M32_MPERS] $(mpers_m32_targets), and [HAVE_MX32_MPERS] + $(mpers_mx32_targets). + (mpers_NAME, mpers_PREFIX, mpers_DEFS, mpers_INCLUDES, mpers_CPPFLAGS, + mpers_sh_opts, libmpers_CPPFLAGS, libmpers_m[x]32_a_SOURCES, + libmpers_m[x]32_a_CPPFLAGS, mpers_m[x]32_targets): New variables. + (mpers-m[x]32.stamp, m[x]32_defs.h, m[x]32_funcs.h, printers.h, + %_printer_decls.h, %_printer_defs.h, clean-local, + native_printer_decls.h, native_printer_defs.h, $mpers_m[x]32_targets): + New targets. + * bootstrap: Add generate_mpers_am.sh. + * configure.ac: Add AC_PROG_RANLIB. + * m4/mpers.m4: Add HAVE_MPERS variable. Add $st_cv_mpers checks. + * defs.h: Include mpers_type.h. + Include printers.h, native_printer_decls.h, define MPERS_PRINTER_NAME. + Redefine SYS_FUNC_NAME. Define MPERS_PRINTER_DECL. + [HAVE_M32_MPERS]: define PERSONALITY1_INCLUDE_FUNCS, + PERSONALITY1_INCLUDE_PRINTERS_DECLS, PERSONALITY1_INCLUDE_PRINTERS_DEFS + for X86_64, X32. + [HAVE_MX32_MPERS]: define PERSONALITY2_INCLUDE_FUNCS, + PERSONALITY2_INCLUDE_PRINTERS_DECLS, PERSONALITY2_INCLUDE_PRINTERS_DEFS + for X86_64. + Add fallback definitions of + PERSONALITY1_INCLUDE_FUNCS, PERSONALITY2_INCLUDE_FUNCS, + PERSONALITY0_INCLUDE_PRINTERS_DECLS, PERSONALITY0_INCLUDE_PRINTERS_DEFS, + PERSONALITY1_INCLUDE_PRINTERS_DECLS, PERSONALITY1_INCLUDE_PRINTERS_DEFS, + PERSONALITY2_INCLUDE_PRINTERS_DECLS, PERSONALITY2_INCLUDE_PRINTERS_DEFS. + * syscall.c: Include PERSONALITY1_INCLUDE_FUNCS, + PERSONALITY2_INCLUDE_FUNCS, + PERSONALITY0_INCLUDE_PRINTERS_DECLS, PERSONALITY0_INCLUDE_PRINTERS_DEFS, + PERSONALITY1_INCLUDE_PRINTERS_DECLS, PERSONALITY1_INCLUDE_PRINTERS_DEFS, + PERSONALITY2_INCLUDE_PRINTERS_DECLS, PERSONALITY2_INCLUDE_PRINTERS_DEFS. + (printers): New struct. Update it when needed. + * .gitignore: Add libmpers-m32.a, libmpers-mx32.a, m32_defs.h, + m32_funcs.h, m32_printer_decls.h, m32_printer_defs.h, mpers-m32, + mpers-m32.stamp, mpers-mx32, mpers-mx32.stamp, mpers.am, mx32_defs.h, + mx32_funcs.h, mx32_printer_decls.h, mx32_printer_defs.h, + native_printer_decls.h, native_printer_defs.h, and printers.h. + +2015-08-28 Dmitry V. Levin + + tests: convert readlink.test and readlinkat.test from match_awk to match_diff + * tests/readlink.c (main): Print expected output. + * tests/readlinkat.c (main): Likewise. + * tests/readlink.test: Use match_diff instead of match_awk. + * tests/readlinkat.test: Likewise. + * tests/readlink.awk: Remove. + * tests/readlinkat.awk: Likewise. + * tests/Makefile.am (EXTRA_DIST): Remove readlink.awk and readlinkat.awk. + + tests: convert getrandom.test from match_awk to match_diff. + * tests/getrandom.c (main): Print expected output. + * tests/getrandom.test: Use match_diff instead of match_awk. + * tests/getrandom.awk: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove getrandom.awk. + +2015-08-27 Dmitry V. Levin + + tests: convert select.test from match_awk to match_diff. + * tests/select.c (main): Print expected output. + * tests/select.test: Use match_diff instead of match_awk. + * tests/select.awk: Remove. + * tests/Makefile.am (EXTRA_DIST): Remove select.awk. + + tests: convert several tests from match_grep to match_diff. + * tests/sendfile.test: Use match_diff instead of match_grep. + * tests/sendfile64.test: Likewise. + * tests/time.test: Likewise. + * tests/utime.test: Likewise. + * tests/xet_robust_list.test: Likewise. + * tests/sendfile.c (main): Update match patterns for match_diff. + * tests/sendfile64.c (main): Likewise. + * tests/time.c (main): Likewise. + * tests/utime.c (main): Likewise. + * tests/xet_robust_list.c (main): Likewise. + +2015-08-27 Dmitry V. Levin + + tests: fix match_diff usage. + The first argument of match_diff should be the file with expected + output, the second argument - the file with actual output. + + * tests/aio.test: Swap match_diff arguments. + * tests/restart_syscall.test: Likewise. + * tests/seccomp.test: Likewise. + * tests/umovestr2.test: Likewise. + +2015-08-27 Dmitry V. Levin + + build: fix -I options. + * configure.ac (AM_INIT_AUTOMAKE): Add nostdinc. + * Makefile.am (AM_CPPFLAGS): Append -I$(builddir) and -I$(srcdir). + * tests/Makefile.am (AM_CPPFLAGS): Likewise. + +2015-08-26 Dmitry V. Levin + + aio: rewrite from libaio.h to linux/aio_abi.h. + * configure.ac (AC_CHECK_HEADERS): Remove libaio.h. + * aio.c: Assume that is available, + include it instead of . + [!IOCB_RESFD]: Remove. + (enum iocb_sub): Remove SUB_POLL. + (tprint_lio_opcode): Update. + (print_common_flags): Use IOCB_FLAG_RESFD instead of IOCB_RESFD, + rename fields of struct iocb. + (iocb_is_valid, print_iocb_header, print_iocb): New functions. + (sys_io_submit): Use print_iocb. + (print_io_event): Fix struct io_event decoding. + (sys_io_cancel): Use print_iocb_header. + * strace.spec (BuildRequires): Remove libaio-devel. + * tests/aio.c (main): Test IOCB_CMD_PREADV, io_cancel, + and struct io_event decoding. + * tests/aio.test (syscalls): Add io_cancel. + +2015-08-26 Dmitry V. Levin + + Fix multiple personalities support in parser of io_submit syscall. + Introduce a new helper function to fetch tracee's long integers + and use it to fix multiple personalities support in io_submit parser. + + * defs.h (umove_long_or_printaddr): New prototype. + * util.c (umove_long_or_printaddr): New function. + * aio.c (sys_io_submit): Use it to fetch tracee's pointers. + * tests/aio.c: New file. + * tests/aio.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add aio. + (TESTS): Add aio.test. + * tests/.gitignore: Add aio. + +2015-08-26 Dmitry V. Levin + + tests: fix build on systems that lack O_CLOEXEC definition. + * tests/epoll_create1.c (main): Check that O_CLOEXEC is defined. + * tests/eventfd.c (main): Likewise. + * tests/signalfd.c (main): Likewise. + + tests: fix build on systems that lack AT_FDCWD definition. + * tests/readlinkat.c: Stop including . + (main): Replace AT_FDCWD with -100. + + Fix printing of io_getevents first argument. + * aio.c (sys_io_getevents): Print first argument using "%lu" format. + +2015-08-26 Mike Frysinger + + decode extend getsockopt/setsockopt options. + Currently the code assumes the set of valid options between getsockopt + and setsockopt are exactly the same and thus maintains one list. The + kernel unfortunately does not do this -- it allows for different opts + between the get and set functions. See the {g,s}et_opt{min,max} fields + in the various netfilter subcores. + + To support this, extend the printxval function to take multiple sets of + xlats as varargs. Then we add the new get/set lists, and pass them down + in the net code when decoding things. + + A simple example is iptables; before: + getsockopt(4, SOL_IP, 0x40 /* IP_??? */, ...) = 0 + getsockopt(4, SOL_IP, 0x41 /* IP_??? */, ...) = 0 + after: + getsockopt(4, SOL_IP, IPT_SO_GET_INFO, ...) = 0 + getsockopt(4, SOL_IP, IPT_SO_GET_ENTRIES, ...) = 0 + + If these were setsockopt calls, then 0x40 & 0x41 would be + IPT_SO_SET_REPLACE & IPT_SO_SET_ADD_COUNTERS. + + * configure.ac: Check for netfilter headers. + * defs.h (printxvals): New prototype. + (printxval): Change to a define. + * net.c: Include netfilter headers and new sockopts headers. + (print_sockopt_fd_level_name): Add a is_getsockopt argument. Change SOL_IP + and SOL_IPV6 decoding to use printxvals, and use is_getsockopt to pass more + xlats down. + (getsockopt): Call print_sockopt_fd_level_name with is_getsockopt as true. + (setsockopt): Call print_sockopt_fd_level_name with is_getsockopt as false. + * util.c (printxval): Rename to ... + (printxvals): ... this. Rewrite to be varargs based. + * xlat/getsockipoptions.in: New xlat list. + * xlat/getsockipv6options.in, xlat/setsockipoptions.in, + xlat/setsockipv6options.in: Likewise. + +2015-08-26 Dmitry V. Levin + + Fix build on systems that lack VIDIOC_CREATE_BUFS definition. + * v4l2.c (v4l2_ioctl): Check that v4l2_ioctl is defined. + + Fix build on systems that lack EM_ARM/EM_OPENRISC definitions. + * xlat/audit_arch.in: Guard AUDIT_ARCH_ARM and AUDIT_ARCH_ARMEB + with EM_ARM check. Guard AUDIT_ARCH_OPENRISC with EM_OPENRISC check. + +2015-08-25 Dmitry V. Levin + + Fix build on systems that lack UBI_IOCVOLCRBLK/UBI_IOCVOLRMBLK definitions + * mtd.c (ubi_ioctl): Check that UBI_IOCVOLCRBLK and UBI_IOCVOLRMBLK + are defined. + + Fix build on systems that lack O_CLOEXEC definition. + * xlat/efd_flags.in: Check that O_CLOEXEC is defined. + * xlat/epollflags.in: Likewise. + * xlat/sfd_flags.in: Likewise. + * xlat/timerfdflags.in: Fix O_CLOEXEC check. + +2015-08-21 Elvira Khabirova + + printsiginfo.c: fix integer conversions. + * printsiginfo.c (printsigsource): Print si_pid and si_uid as unsigned + integers. + (printsigval): Print si_int as signed int. + +2015-08-20 Dmitry V. Levin + + Fix decoding of times syscall return value. + Always print return value of successful times syscall + as unsigned long integer. + + * times.c (sys_times): Return RVAL_UDECIMAL unless syserror. + +2015-08-20 Elvira Khabirova + + mq.c: remove repeated code. + * mq.c (sys_mq_open): Use printmqattr instead of implementing it again. + [HAVE_MQUEUE_H]: Remove. + +2015-08-20 Elvira Khabirova + + ipc_msg.c: fix multiple personalities support in msgrcv ipc subcall. + When msgrcv syscall is an ipc subcall, msgp (pointer to struct msgbuf) + and msgtyp (message type) syscall arguments are passed via proxy + structure which definition significantly depends on tracee's + wordsize. + + * ipc_msg.c (fetch_msgrcv_args): New function. + (sys_msgrcv): Use it. + +2015-08-20 Elvira Khabirova + + ipc.c: split into separate files. + In preparation for upcoming mpers-related changes, + split ipc.c into independent groups of parsers. + + * ipc_defs.h: New file. + * ipc_msg.c: Likewise. + * ipc_msgctl.c: Likewise. + * ipc_sem.c: Likewise. + * ipc_shm.c: Likewise. + * ipc_shmctl.c: Likewise. + * mq.c: Likewise. + * print_mq_attr.c: Likewise. + * print_msgbuf.c: Likewise. + * ipc.c: Remove. + (sys_mq_open, sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, + sys_mq_getsetattr): Move to mq.c. + (sys_msgget, tprint_msgsnd, sys_msgsnd, tprint_msgrcv, sys_msgrcv): Move + to ipc_msg.c. + (sys_msgctl): Move to ipc_msgctl.c. + (tprint_sembuf, tprint_sembuf_array, sys_semop, sys_semtimedop, + sys_semget, syssemctl): Move to ipc_sem.c. + (sys_shmget, sys_shmat, sys_shmdt): Move to ipc_shm.c. + (sys_shmctl): Move to ipc_shmctl.c. + (printmqattr): Move to print_mq_attr.c. + (tprint_msgbuf): Move to print_msgbuf.c. + (IPC_64, PRINTCTL): Move to ipc_defs.h. + * defs.h (struct xlat resource_flags): New prototype. + * Makefile.am (strace_SOURCES): Remove ipc.c. Add ipc_defs.h, mq.c, + ipc_msg.c, ipc_msgctl.c, ipc_sem.c, ipc_shm.c, ipc_shmctl.c, + print_mq_attr.c, and print_msgbuf.c. + +2015-08-20 Elvira Khabirova + + .gitignore: add sen.h and sys_func.h. + +2015-08-19 Dmitry V. Levin + + tests: add sendfile.test and sendfile64.test. + * tests/sendfile.c: New file. + * tests/sendfile64.c: New file. + * tests/sendfile.test: New test. + * tests/sendfile64.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add sendfile and sendfile64. + (TESTS): Add sendfile.test and sendfile64.test. + * tests/.gitignore: Add sendfile and sendfile64. + +2015-08-19 Dmitry V. Levin + + sendfile: decode file offset both on entering and exiting syscall. + When sendfile is called with a valid pointer to a file offset variable, + kernel updates this variable on successfull exit from syscall. + + * sendfile.c (sys_sendfile, sys_sendfile64): Print tcp->u_arg[2] + on exiting syscall as well as on entering. + +2015-08-19 Dmitry V. Levin + + io.c: move sendfile parsers to a separate file. + * sendfile.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * io.c (sys_sendfile, sys_sendfile64): Move to sendfile.c + +2015-08-19 Dmitry V. Levin + + Make printnum_* functions return boolean status. + With this change, printnum_* functions return true iff they + successfully fetched necessary data from tracee's memory. + + * defs.h (printnum_short, printnum_int, printnum_int64, + printnum_long_int, printpair_int, printpair_int64): Return bool. + * util.c (DEF_PRINTNUM, DEF_PRINTPAIR, printnum_long_int): Likewise. + +2015-08-19 Dmitry V. Levin + + mips: print _MIPS_SIM in configure.ac for debug purposes. + * configure.ac [MIPS]: Print _MIPS_SIM. + + xtensa: fix several syscall entries. + * linux/xtensa/syscallent.h: Fix nargs in splice, tee, vmsplice, + pselect6, ppoll, epoll_pwait, and set_robust_list syscall entries. + + ia64: fix syscall numbers for set_robust_list, get_robust_list, and splice syscalls + * linux/ia64/syscallent.h: Place syscall entries for set_robust_list, + get_robust_list, and splice in correct order. + +2015-08-18 Dmitry V. Levin + + tests: add a test for get_robust_list and set_robust_list decoding. + * tests/xet_robust_list.c: New file. + * tests/xet_robust_list.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add xet_robust_list. + (TESTS): Add xet_robust_list.test. + * tests/.gitignore: Add xet_robust_list. + + Simplify printing of get_robust_list first argument. + * get_robust_list.c (sys_get_robust_list): Print first argument + using "%d" format. + +2015-08-18 Elvira Khabirova + + Fix io_setup first argument printing. + * aio.c (sys_io_setup): Print first argument using "%u" format. + +2015-08-18 Dmitry V. Levin + + Fix printing tracee's long integers. + Replace ambiguous printnum_long that used to fetch native long integers + from tracee's memory with printnum_ptr, printnum_slong, and printnum_ulong + that fetch tracee's pointer, signed long, and unsigned long integers. + + * defs.h (printnum_long, printpair_long): Remove prototypes. + (printnum_int64, printpair_int64): Remove macros, declare functions + unconditionally. + [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] (printnum_long_int): + New prototype. + (printnum_ptr, printnum_slong, printnum_ulong): New macros. + * aio.c (sys_io_setup): Use printnum_ulong. + * block.c (block_ioctl): Use printnum_slong and printnum_ulong. + * get_robust_list.c (sys_get_robust_list): Use printnum_ptr + and printnum_ulong. + * io.c (print_off_t): Remove. + (sys_sendfile): Use printnum_ulong. + * ipc.c (sys_semctl): Use printnum_ptr. + * prctl.c (sys_prctl): Likewise. + * process.c (sys_ptrace): Likewise. + * rtc.c (rtc_ioctl): Use printnum_ulong. + * util.c (printnum_long, printpair_long): Remove. + (printnum_int64, printpair_int64): Define unconditionally. + [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] (printnum_long_int): + New function. + +2015-08-18 Dmitry V. Levin + + Fix time syscall decoding for some personalities. + * time.c (current_time_t_is_int32): Define. + (sys_time): Use it, printnum_int, and printnum_int64 instead + of printnum_long. + * tests/time.c: New file. + * tests/time.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add time. + (TESTS): Add time.test. + * tests/.gitignore: Add time. + +2015-08-18 Mike Frysinger + + signal: SIGSYS: decode si_syscall & si_arch fields. + When receiving SIGSYS, the si_syscall & si_arch fields are set to known + values, so make sure we decode their values into the symbol settings. + This makes stracing seccomp failures much easier. + + * defs.h (syscall_name): New prototype. + * printsiginfo.c: Include linux/audit.h and xlat/audit_arch.h. + (print_si_info): Decode si_syscall & si_arch for SIGSYS. + * syscall.c (undefined_scno_name): Delete. + (syscall_name): New function. + (trace_syscall_entering): Change undefined_scno_name to syscall_name. + (trace_syscall_exiting): Likewise. + * xlat/audit_arch.in: New file. + +2015-08-18 Elvira Khabirova + + ipc.c: remove unnecesarry #ifdef IPC_64. + * ipc.c (PRINTCTL): Remove #ifdef IPC_64 check as IPC_64 is always + defined at this point. + +2015-08-16 Elvira Khabirova + + resource.c: move times parser to a separate file. + * times.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * resource.c (sys_times): Move to times.c. + +2015-08-16 Elvira Khabirova + + sysctl.c: remove KERN_JAVA_* defines handling. + This has been obsoleted by binfmt_misc since Linux 2.1.43. + + * sysctl.c (sys_sysctl): Remove KERN_JAVA_INTERPRETER + and KERN_JAVA_APPLETVIEWER. + +2015-08-16 Elvira Khabirova + + sysinfo.c: remove obsolete code. + struct sysinfo members totalhigh, freehigh and mem_unit are present + since Linux 2.3.48. + + * configure.ac (AC_CHECK_MEMBERS): Remove struct sysinfo checks. + * sysinfo.c (sys_sysinfo): Remove HAVE_STRUCT_SYSINFO_* checks. + +2015-08-15 Gleb Fotengauer-Malinovskiy + + tests: add readlink.test and readlinkat.test. + * tests/readlink.c: New file. + * tests/readlink.awk: Likewise. + * tests/readlinkat.c: Likewise. + * tests/readlinkat.awk: Likewise. + * tests/readlink.test: New test. + * tests/readlinkat.test: Likewise. + * tests/Makefile.am (check_PROGRAMS): Add readlink and readlinkat. + (TESTS): Add readlink.test and readlinkat.test. + (EXTRA_DIST): Add readlink.awk and readlinkat.awk. + * tests/.gitignore: Add readlink and readlinkat. + +2015-08-09 Dmitry V. Levin + + Print nanoseconds along with seconds in stat family syscalls. + * configure.ac (AC_CHECK_MEMBERS): Add stat.st_atim.tv_nsec, + stat.st_ctim.tv_nsec, stat.st_mtim.tv_nsec, stat.st_atime_nsec, + stat.st_atime_csec, and stat.st_mtime_nsec. + * file.c: Explicitly define HAVE_STRUCT_STAT_ST_ATIME_NSEC, + HAVE_STRUCT_STAT_ST_CTIME_NSEC and HAVE_STRUCT_STAT_ST_MTIME_NSEC + for locally defined types. + * printstat.h (DO_PRINTSTAT): Print st_atime_nsec, st_ctime_nsec, + and st_mtime_nsec members. + * tests/stat.c [_FILE_OFFSET_BITS == 64]: Use st_atime_nsec, + st_ctime_nsec, and st_mtime_nsec via st_atim.tv_nsec, st_ctim.tv_nsec, + and st_mtim.tv_nsec. + (main): Print st_atime_nsec, st_ctime_nsec, and st_mtime_nsec members. + + This fixes Fedora bug #1251176. + +2015-08-03 Dmitry V. Levin + + signalfd4: fix flags decoding. + * configure.ac (AC_CHECK_FUNCS): Add eventfd. + (AC_CHECK_HEADERS): Add sys/signalfd.h. + * signalfd.c: Include . + [HAVE_SYS_SIGNALFD_H] Include . + Include "xlat/sfd_flags.h". + (do_signalfd): Use sfd_flags for flags decoding. + * xlat/sfd_flags.in: New file. + * tests/signalfd.c: Likewise. + * tests/signalfd.expected: Likewise. + * tests/signalfd.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add signalfd. + (TESTS): Add signalfd.test. + (EXTRA_DIST): Add signalfd.expected. + * tests/.gitignore: Add signalfd. + + signalfd, signalfd4: mark return code with RVAL_FD flag. + * signalfd.c (do_signalfd): Set RVAL_FD flag in the return code. + + signal.c: move signalfd parsers to a separate file. + * signalfd.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * signal.c (do_signalfd, sys_signalfd, sys_signalfd4): Move to signalfd.c + + perf_event_open: mark return code with RVAL_FD flag. + * perf.c (sys_perf_event_open): Set RVAL_FD flag in the return code. + + pipe, pipe2, socketpair: print returned descriptors using printfd. + * net.c (printpair_fd, decode_pair_fd): New functions. + (do_pipe, sys_socketpair): Use them. + + socket: mark return code with RVAL_FD flag. + * net.c (sys_socket): Set RVAL_FD flag in the return code. + * tests/net-yy-accept.awk: Update socket and bind regexps. + * tests/unix-yy-accept.awk: Likewise. + * tests/net-yy-connect.awk: Update socket and connect regexps. + * tests/unix-yy-connect.awk: Likewise. + + timerfd, timerfd_create: mark return code with RVAL_FD flag. + * time.c (sys_timerfd, sys_timerfd_create): Set RVAL_FD flag + in the return code. + +2015-08-02 Dmitry V. Levin + + inotify_init1: mark return code with RVAL_FD flag. + * inotify.c (sys_inotify_init1): Set RVAL_FD flag in the return code. + + fanotify_init: mark return code with RVAL_FD flag. + * fanotify.c (sys_fanotify_init): Set RVAL_FD flag in the return code. + + Fix epoll_create syscall decoding. + * epoll.c (sys_epoll_create): New function. + * linux/dummy.h (sys_epoll_create): Remove. + + epoll_create1: mark return code with RVAL_FD flag. + * epoll.c (sys_epoll_create1): Set RVAL_FD flag in the return code. + + epoll_create1: fix pathtrace support. + * pathtrace.c (pathtrace_match): Add SEN_epoll_create1. + + epoll_create1: fix flags decoding. + * xlat/epollflags.in: Remove EPOLL_NONBLOCK, provide fallback definition + for EPOLL_CLOEXEC. + * tests/epoll_create1.c: New file. + * tests/epoll_create1.expected: Likewise. + * tests/epoll_create1.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add epoll_create1. + (TESTS): Add epoll_create1.test. + (EXTRA_DIST): Add epoll_create1.expected. + * tests/.gitignore: Add epoll_create1. + +2015-08-01 Dmitry V. Levin + + desc.c: move epoll parsers to a separate file. + * epoll.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * desc.c (sys_epoll_create1, print_epoll_event, sys_epoll_ctl, + print_epoll_event_array, epoll_wait_common, epoll_wait, epoll_pwait): + Move to epoll.c. + + eventfd2: fix flags decoding. + * configure.ac (AC_CHECK_HEADERS): Add sys/eventfd.h. + * eventfd.c: Include . + [HAVE_SYS_EVENTFD_H] Include . + Include "xlat/efd_flags.h". + (do_eventfd): Use efd_flags for flags decoding. + * xlat/efd_flags.in: New file. + * tests/eventfd.c: New file. + * tests/eventfd.expected: Likewise. + * tests/eventfd.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add eventfd. + (TESTS): Add eventfd.test. + (EXTRA_DIST): Add eventfd.expected. + * tests/.gitignore: Add eventfd. + + eventfd: print first argument as unsigned int. + * eventfd.c (do_eventfd): Explicitly cast initial value to unsigned int. + + Mark eventfd return code with RVAL_FD flag. + * eventfd.c (do_eventfd): Set RVAL_FD flag in the return code. + + desc.c: move eventfd parsers to a separate file. + * eventfd.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * desc.c (do_eventfd, sys_eventfd, sys_eventfd2): Move to eventfd.c. + + Update PERF_FLAG_* constants. + * xlat/perf_event_open_flags.in: Add PERF_FLAG_FD_CLOEXEC, + provide fallback definitions. + + desc.c: move perf_event_open parser to a separate file. + * perf.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * desc.c (sys_perf_event_open): Move to perf.c. + +2015-08-01 Elvira Khabirova + + time.c: remove obsolete code from adjtimex parser. + Linux versions 1.3.28 and below are not supported. + + * time.c (tprint_timex) [LINUX_VERSION_CODE < 66332]: Remove. + +2015-08-01 Elvira Khabirova + + ipc.c: move fallback definitions of msg, sem, and shm constants to xlat/ + * ipc.c: Move MSG_STAT and MSG_INFO definitions to xlat/msgctl_flags.in. + Move SHM_STAT and SHM_INFO definitions to xlat/shmctl_flags.in. + Move SEM_STAT and SEM_INFO definitions to xlat/semctl_flags.in. + +2015-08-01 Dmitry V. Levin + + tests/ppoll: replace SIGABRT with SIGHUP. + Use SIGHUP instead of SIGABRT, the number of the former + is more portable across architectures. + + * tests/ppoll.c (test2): Replace SIGABRT with SIGHUP. + * tests/ppoll.expected: Update regexp. + * tests/ppoll-v.expected: Likewise. + +2015-08-01 Dmitry V. Levin + + decode_poll_exiting: reserve more space in output buffer. + * poll.c (decode_poll_exiting): Reserve more space in output buffer. + +2015-07-30 Dmitry V. Levin + + Cleanup poll/ppoll decoders. + * poll.c (decode_poll): Split into print_pollfd, decode_poll_entering, + and decode_poll_exiting. + (sys_poll, sys_ppoll): Update callers. + * tests/ppoll.c: New file. + * tests/ppoll.expected: Likewise. + * tests/ppoll-v.expected: Likewise. + * tests/ppoll.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add ppoll. + (TESTS): Add ppoll.test. + (EXTRA_DIST): Add ppoll.expected and ppoll-v.expected. + * tests/.gitignore: Add ppoll. + + poll: print timeout argument as int. + * poll.c (sys_poll): Explicitly cast timeout argument to int. + + stream.c: move poll and ppoll parsers to a separate file. + * poll.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * stream.c (decode_poll, sys_poll, sys_ppoll): Move to poll.c. + + Assume that is available. + * configure.ac (AC_CHECK_HEADERS): Remove poll.h and sys/poll.h. + * pathtrace.c: Include unconditionally. + * stream.c: Likewise. + [HAVE_SYS_POLL_H]: Compile unconditionally. + [!HAVE_SYS_POLL_H]: Remove. + + tests: add oldselect.test. + * tests/oldselect.c: New file. + * tests/oldselect.expected: Likewise. + * tests/oldselect.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add oldselect. + (TESTS): Add oldselect.test. + (EXTRA_DIST): Add oldselect.expected. + * tests/.gitignore: Add oldselect. + +2015-07-30 Elvira Khabirova + + Fix oldselect decoding on 64-bit architectures. + As struct sel_arg_struct is an array of 32-bit values, + fetch it using an intermediate array on 64-bit architectures. + + * desc.c (sys_oldselect): Rename args to long_args. + [SIZEOF_LONG == 4] Alias oldselect_args to long_args. + [SIZEOF_LONG != 4] Introduce oldselect_args to fetch oldselect args. + * linux/sh64/syscallent.h (oldselect): Remove. + +2015-07-30 Dmitry V. Levin + + net.c: use printaddr. + * net.c (printsock, sys_recvfrom): Use printaddr. + +2015-07-30 Denys Vlasenko + + net.c: recvfrom fixes. + This change fixes these three problems (before/after is shown): + + On interrupted syscall, flags are not decoded: + + -recvfrom(3, 0x7fff0a41e306, 10, 2, 0, 0) = ? ERESTARTSYS + +recvfrom(3, 0x7fff0a41e306, 10, MSG_PEEK, 0, 0) = ? ERESTARTSYS + + If peer address is unavalable (example: anon sockets from socketpair()), + kernel returns socklen of 0, but we ignore that and show bogus sockaddr data: + + -recvfrom(3, "123456789\0", 10, MSG_PEEK, {sa_family=0x7777 /* AF_??? */, sa_data="wwwwwwwwwwwwww"}, [0]) = 10 + +recvfrom(3, "123456789\0", 10, MSG_PEEK, 0x7ffde6edf760, [0]) = 10 + + SYS_FUNC(recvfrom) passes address of fromlen, not fromlen, to printsock(): + + - printsock(tcp, tcp->u_arg[4], tcp->u_arg[5]); + + printsock(tcp, tcp->u_arg[4], fromlen); + +2015-07-29 Elliott Hughes + + prctl: decode Android-specific PR_SET_VMA. + Android kernels have a prctl to name VMAs. + + * prctl.c (sys_prctl) [__ANDROID__]: Decode PR_SET_VMA. + +2015-07-29 Dmitry V. Levin + + mips: fix stub files. + This complements commit 140ecf876686d49085c6eb3a2306e2ea6ea641bc. + + * linux/mips/genstub.sh: Output SEN(printargs) instead of printargs. + + Reported-by: Elliott Hughes + +2015-07-29 Dmitry V. Levin + + tests/bpf: fix build with incompatibly old linux/bpf.h and/or gcc. + * configure.ac: Check how union bpf_attr.log_buf initialization works. + * tests/bpf.c: Check for HAVE_UNION_BPF_ATTR_LOG_BUF. + + Implement sched_getattr and sched_setattr syscalls decoding. + * xlat/sched_flags.in: New file. + * sched.c: Include "xlat/sched_flags.h". + (print_sched_attr, sys_sched_setattr, sys_sched_getattr): New functions. + * linux/dummy.h (sys_sched_getattr, sys_sched_setattr): Remove. + * tests/sched_xetattr.c: New file. + * tests/sched_xetattr.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add sched_xetattr. + (TESTS): Add sched_xetattr.test. + * tests/.gitignore: Add sched_xetattr. + + Implement memfd_create syscall decoding. + * memfd_create.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/dummy.h (sys_memfd_create): Remove. + * pathtrace.c (pathtrace_match): Add SEN_memfd_create. + * xlat/memfd_create_flags.in: New file. + * tests/memfd_create.c: New file. + * tests/memfd_create.expected: Likewise. + * tests/memfd_create.test: New test. + * tests/Makefile.am: (check_PROGRAMS): Add memfd_create. + (TESTS): Add memfd_create.test. + (EXTRA_DIST): Add memfd_create.expected. + * tests/.gitignore: Add memfd_create. + +2015-07-28 Elliott Hughes + + Fix builds where HAVE_MQUEUE_H isn't defined. + Android doesn't have . + + * ipc.c (sys_mq_open) [!HAVE_MQUEUE_H]: Fix printaddr invocation. + +2015-07-27 Dmitry V. Levin + + tests/restart_syscall: skip if nanosleep looks uninterrupted. + * tests/restart_syscall.test: Skip if restart_syscall is not detected + and nanosleep syscall looks uninterrupted. + + Implement execveat syscall decoding. + * execve.c (decode_execve): New function. + (sys_execve): Use it. + (sys_execveat): New function. + * linux/dummy.h (sys_execveat): Remove. + * tests/execveat.c: New file. + * tests/execveat.expected: Likewise. + * tests/execveat-v.expected: Likewise. + * tests/execveat.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add execveat. + (TESTS): Add execveat.test. + (EXTRA_DIST): Add execveat.expected and execveat-v.expected. + * tests/.gitignore: Add execveat. + + execve: fix support of personalities with different word size. + * execve.c (printargc): Do not assume that host and target pointers have + the same size. + * tests/execve.c: New file. + * tests/execve.expected: Likewise. + * tests/execve-v.expected: Likewise. + * tests/execve.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add execve. + (TESTS): Add execve.test. + (EXTRA_DIST): Add execve.expected and execve-v.expected. + * tests/.gitignore: Add execve. + + Implement bpf syscall decoding. + * bpf.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * configure.ac (AC_CHECK_HEADERS): Add linux/bpf.h. + * linux/dummy.h (sys_bpf): Remove. + * pathtrace.c (pathtrace_match): Add SEN_bpf. + * xlat/bpf_commands.in: New file. + * xlat/bpf_map_types.in: New file. + * xlat/bpf_map_update_elem_flags.in: New file. + * xlat/bpf_prog_types.in: New file. + * tests/bpf.c: New file. + * tests/bpf.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add bpf. + (TESTS): Add bpf.test. + * tests/.gitignore: Add bpf. + +2015-07-25 Dmitry V. Levin + + prctl: fix decoding of unrecognized commands. + The use of printargs introduced by commit v4.10-179-g210a6b6 is wrong: + when the first argument is already printed, printargs cannot be called. + + * prctl.c (print_prctl_args): New function. + (sys_prctl): Use it. + +2015-07-23 Dmitry V. Levin + + Macroize -m32/-mx32 configure checks. + Prepare for additional configure checks that would be needed + for new multiple personalities support. + + * m4/mpers.m4: New file. + * configure.ac: Use it. + +2015-07-22 Dmitry V. Levin + + tests/uid: import uid overflow check from tests/uid16. + * tests/uid.c (main): Skip if the uid returned by getuid matches + /proc/sys/kernel/overflowuid. + +2015-07-21 Dmitry V. Levin + + sh64: fix inotify_{add,rm}_watch syscall entries. + * linux/sh64/syscallent.h (inotify_add_watch, inotify_rm_watch): + Set sys_func. + + microblaze: fix several syscall entries. + * linux/microblaze/syscallent.h (signalfd4, eventfd2, epoll_create1, + dup3, pipe2, inotify_init1, recvmmsg): Set sys_func. + + hppa: fix several syscall entries. + * linux/hppa/syscallent.h (remap_file_pages, mq_open, mq_unlink, + mq_timedsend, mq_timedreceive, mq_notify, mq_getsetattr, + clock_nanosleep, signalfd, timerfd): Set sys_func. + + ia64: fix getpagesize syscall entry. + * linux/ia64/syscallent.h (getpagesize): Fux nargs. + + avr32: fix fstatat64 syscall entry. + * linux/avr32/syscallent.h (fstatat64): Set sys_func. + + alpha: fix 2 dummy osf syscall entries. + * linux/alpha/syscallent.h (osf_set_program_attributes): Fix nargs. + (osf_sigstack): Fix nargs and sys_name. + + alpha, arm, ia64, mips, sh64: fix semop syscall entries. + * linux/alpha/syscallent.h (semop): Fix nargs, set sys_func. + * linux/ia64/syscallent.h (semop): Set sys_func. + * linux/mips/syscallent-n32.h (semop): Likewise. + * linux/mips/syscallent-n64.h (semop): Likewise. + * linux/arm/syscallent.h (semop): Fix nargs. + * linux/sh64/syscallent.h (semop): Likewise. + + m68k: fix getpagesize decoding. + * linux/m68k/syscallent.h (getpagesize): Set sys_func. + * mem.c [M68K] (sys_getpagesize): Define. + + tests/ip_mreq: skip if basic setsockopt operations fail. + * tests/ip_mreq.c (main): Return 77 if basic + IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP options cannot be set. + +2015-07-21 Dmitry V. Levin + + tests: use -lpthread instead of -pthread. + On some obscure systems, -lpthread is more likely to work than -pthread. + + * tests/Makefile.am (filter_unavailable_LDFLAGS): Rename to + filter_unavailable_LDADD and change to -lpthread. + +2015-07-21 Dmitry V. Levin + + mips o32: fix utimensat syscall entry. + * linux/mips/syscallent-o32.h (utimensat): set sys_flags and sys_func. + +2015-07-21 Dmitry V. Levin + + linux/mips/syscallent-compat.h: use designated initializers. + Change linux/mips/syscallent-compat.h to use designated initializers + like normal syscallent.h files. + + * linux/mips/syscallent-compat.h: Use designated initializers. + +2015-07-21 Dmitry V. Levin + + linux/mips/syscallent-compat.h: fix initalization of empty entries. + This complements commit 140ecf876686d49085c6eb3a2306e2ea6ea641bc. + + * linux/mips/syscallent-compat.h: Fix initalization of empty entries. + +2015-07-20 Dmitry V. Levin + + Remove unused parsers of getmsg and putmsg. + * stream.c [SPARC || SPARC64] (sys_putmsg, sys_getmsg): Remove. + Stop including "xlat/msgflags.h". + * xlat/msgflags.in: Remove. + + sigreturn: make use of RVAL_DECODED. + * sigreturn.c (arch_sigreturn): New function. + (sys_sigreturn): Use it. Return RVAL_DECODED. + * linux/alpha/arch_sigreturn.c: Update. + * linux/crisv10/arch_sigreturn.c: Likewise. + * linux/m68k/arch_sigreturn.c: Likewise. + * linux/microblaze/arch_sigreturn.c: Likewise. + * linux/x86_64/arch_sigreturn.c: Likewise. + + or1k_atomic.c: make use of RVAL_DECODED. + * or1k_atomic.c (sys_or1k_atomic): Update for RVAL_DECODED. + + Update openat parser for the RVAL_DECODED change. + * open.c (sys_openat): Update for RVAL_DECODED. + + bjm.c: make use of RVAL_DECODED. + * bjm.c (sys_create_module, sys_delete_module, sys_init_module, + sys_finit_module): Update for RVAL_DECODED. + + access.c: make use of RVAL_DECODED. + * access.c (decode_access, sys_faccessat): Update for RVAL_DECODED. + + affinity.c: make use of RVAL_DECODED. + * affinity.c (sys_sched_setaffinity): Update for RVAL_DECODED. + + affinity.c: use printaddr and umove_or_printaddr. + * affinity.c (print_affinitylist): Use printaddr and umove_or_printaddr. + (sys_sched_getaffinity): Remove redundant u_rval check. + + aio.c: enhance io_* syscalls decoding. + * aio.c (sys_io_setup): Use printnum_int64 and printnum_long. + (sys_io_destroy, sys_io_submit): Update for RVAL_DECODED. + (sys_io_submit): Use umove_or_printaddr and printaddr. + Enclose iocb array in square brackets. + Change to traditional structure output format. + (print_io_event): New function. + (sys_io_cancel, sys_io_getevents): Use it. + (sys_io_cancel): Use umove_or_printaddr and printaddr. + (sys_io_getevents): Use printaddr. + + cacheflush.c: make use of RVAL_DECODED. + * cacheflush.c (sys_cacheflush): Update for RVAL_DECODED. + + cacheflush.c: use printaddr. + * cacheflush.c (sys_cacheflush): Use printaddr. + + capability.c: make use of RVAL_DECODED. + * capability.c (sys_capset): Update for RVAL_DECODED. + + capability.c: use printaddr and umove_or_printaddr. + * capability.c (get_cap_header): Use printaddr. + (print_cap_data): Use printaddr and umove_or_printaddr. + + chdir.c: make use of RVAL_DECODED. + * chdir.c (sys_chdir): Update for RVAL_DECODED. + + chmod.c: make use of RVAL_DECODED. + * chmod.c (decode_chmod): Change to return void. + (sys_chmod, sys_fchmodat): Update callers. Update for RVAL_DECODED. + (sys_fchmod): Update for RVAL_DECODED. + + clone.c: make use of RVAL_DECODED. + * clone.c (sys_setns, sys_unshare, sys_fork): Update for RVAL_DECODED. + + Alias sys_epoll_create to printargs_ld. + * desc.c (sys_epoll_create): Remove. + * linux/dummy.h (sys_epoll_create): Alias to printargs_ld. + + desc.c: make use of RVAL_DECODED. + * desc.c (sys_flock, sys_close, sys_dup, do_dup2, sys_epoll_create1, + sys_epoll_ctl, do_eventfd, sys_perf_event_open): Update + for RVAL_DECODED. + + desc.c: do not use xmalloc, use umove_or_printaddr and printaddr. + * desc.c (printflock64, printflock): Use umove_or_printaddr. + (decode_select): Do not use xmalloc. Use umoven_or_printaddr + and printaddr. + (sys_oldselect): Use printaddr. + (sys_epoll_ctl): Use umoven_or_printaddr and printaddr. + (print_epoll_event_array): New function. + (sys_epoll_wait_common): Use it. + (sys_pselect6): Use umove_or_printaddr. + (sys_eventfd2): Use printaddr. + + xlat/epollctls.in: add default values. + * xlat/epollctls.in (EPOLL_CTL_ADD, EPOLL_CTL_DEL, EPOLL_CTL_MOD): Add + default values. + + dirent.c: do not use xmalloc. + * dirent.c (print_old_dirent): Use umove_or_printaddr. + (sys_readdir): Use printaddr. + (sys_getdents, sys_getdents64): Do not use xmalloc for dirents, + treat malloc failure the same way as umoven failure. Use printaddr. + + execve.c: make use of RVAL_DECODED. + * execve.c (sys_execve, sys_execv): Update for RVAL_DECODED. + + execve.c: use printaddr and umove_or_printaddr. + * execve.c (printargv): Use umoven_or_printaddr. + (sys_execve, sys_execv): Use printaddr. + + fadvise.c: make use of RVAL_DECODED. + * fadvise.c (sys_fadvise64, sys_fadvise64_64): Update for RVAL_DECODED. + + fallocate.c: make use of RVAL_DECODED. + * fallocate.c (sys_fallocate): Update for RVAL_DECODED. + + fanotify.c: make use of RVAL_DECODED. + * fanotify.c (sys_fanotify_init, sys_fanotify_mark): Update + for RVAL_DECODED. + + fchownat.c: make use of RVAL_DECODED. + * fchownat.c (sys_fchownat): Update for RVAL_DECODED. + + file.c: use umove_or_printaddr. + * file.c (printstat32, printstatsol): Remove. + (printstat, printstat64, printoldstat): Use umove_or_printaddr. + + futex.c: enhance futex syscall decoding. + * futex.c (sys_futex): Use switch statement. Use printaddr. + Print uint32_t syscall arguments using %u format. + Update for RVAL_DECODED. + + get_robust_list.c: use printnum_long. + * get_robust_list.c (sys_get_robust_list): Use printnum_long. + + getcpu.c: use printnum_int and printaddr. + * getcpu.c (sys_getcpu): Use printnum_int and printaddr. + + getcwd.c: use printaddr. + * getcwd.c (sys_getcwd): Use printaddr. + + getrandom.c: use printaddr. + * getrandom.c (sys_getrandom): Use printaddr. + + hostname.c: make use of RVAL_DECODED. + * hostname.c (sys_sethostname): Update for RVAL_DECODED. + + hostname.c: use printaddr. + * hostname.c (sys_gethostname): Use printaddr. + + inotify.c: make use of RVAL_DECODED. + * inotify.c (sys_inotify_add_watch, sys_inotify_rm_watch, + sys_inotify_init1): Update for RVAL_DECODED. + + io.c: make use of RVAL_DECODED. + * io.c (sys_write, sys_writev, sys_pwrite, sys_pwritev, sys_sendfile, + sys_sendfile64, sys_tee, sys_splice, sys_vmsplice): Update + for RVAL_DECODED. + + Use printnum_int64 instead of print_loff_t. + * defs.h (print_loff_t): Remove. + * io.c (print_loff_t): Remove. + (sys_sendfile64, sys_splice): Use printnum_int64 instead of print_loff_t. + * mtd.c (mtd_ioctl): Likewise. + + io.c: use printaddr and umove_or_printaddr. + * io.c (sys_read, sys_pread): Use printaddr. + (tprint_iov_upto): Do not fetch data in case of syserror. + Use printaddr. + (sys_readv, sys_preadv): Remove redundant check for syserror. + (print_off_t): Use printnum_int and printnum_long. + (print_loff_t): Use umove_or_printaddr. + + ioprio.c: make use of RVAL_DECODED. + * ioprio.c (sys_ioprio_set): Update for RVAL_DECODED. + + ipc.c: use printaddr and umove_or_printaddr. + * ipc.c (sys_msgctl): Use printaddr. + (tprint_msgbuf): New function. + (tprint_msgsnd, tprint_msgrcv): Use it. + (sys_msgrcv): Use umove_or_printaddr. + (tprint_sembuf): Rename to tprint_sembuf_array. + (tprint_sembuf): New function. + (tprint_sembuf_array): Use it. + (sys_semop, sys_semtimedop): Update callers. + (sys_shmctl, sys_shmat, sys_shmdt): Use printaddr. + (sys_mq_open, printmqattr): Use printaddr and umove_or_printaddr. + * tests/ipc_msg.c (main): Update msgctl IPC_RMID regexp. + * tests/ipc_shm.c (main): Update shmctl IPC_RMID regexp. + + kexec.c: use printaddr and umove_or_printaddr. + * kexec.c (print_seg): New function. + (print_kexec_segments): Use it. Use printaddr and umove_or_printaddr. + (kexec_load): Use printaddr. Update for RVAL_DECODED. + + keyctl.c: make use of RVAL_DECODED. + * keyctl.c (sys_add_key, sys_request_key): Update for RVAL_DECODED. + (keyctl_join_session_keyring, keyctl_handle_key, + keyctl_set_reqkey_keyring): Remove. + (keyctl_get_keyring_id, keyctl_update_key, keyctl_handle_key_key, + keyctl_read_key, keyctl_keyring_search, keyctl_chown_key, + keyctl_instantiate_key, keyctl_instantiate_key_iov, keyctl_negate_key, + keyctl_reject_key, keyctl_set_timeout, keyctl_get_persistent, + keyctl_setperm_key): Change to return void. + Update for RVAL_DECODED. + (sys_keyctl): Update callers. Update for RVAL_DECODED. + + keyctl.c: use printaddr. + * keyctl.c (keyctl_read_key): Use printaddr. + + ldt.c: make use of RVAL_DECODED. + * ldt.c (sys_modify_ldt, sys_set_thread_area, sys_get_thread_area): + Update for RVAL_DECODED. + + ldt.c: use printaddr and umove_or_printaddr. + * ldt.c [I386 || X86_64 || X32] (print_user_desc): + Use umove_or_printaddr. + [I386 || X86_64 || X32] (sys_modify_ldt): Use printaddr. + [(M68K || MIPS] (set_thread_area): Likewise. + [I386 || X86_64 || X32] (set_thread_area): Do not fetch data + if !verbose. + [I386 || X86_64 || X32] (get_thread_area): Remove redundant check + for syserror. + + link.c: make use of RVAL_DECODED. + * link.c (sys_link, sys_linkat, sys_unlinkat, sys_symlinkat): Update + for RVAL_DECODED. + + lseek.c: make use of RVAL_DECODED. + * lseek.c (sys_lseek): Update for RVAL_DECODED. + + lseek.c: use printnum_int64. + * lseek.c (sys_llseek): Use printnum_int64. + + mem.c: make use of RVAL_DECODED. + * mem.c (print_mmap): Change to return void. + Update for RVAL_DECODED. + (sys_old_mmap, sys_old_mmap_pgoff, sys_mmap, sys_mmap_pgoff, + sys_mmap_4koff): Update callers. Update for RVAL_DECODED. + (sys_brk, sys_munmap, sys_mprotect, sys_mremap, sys_madvise, + sys_mlockall, sys_msync, sys_remap_file_pages, sys_mbind, + sys_set_mempolicy, sys_migrate_pages, [POWERPC] subpage_prot): + Update for RVAL_DECODED. + + mem.c: use printaddr and umove_or_printaddr. + * mem.c (sys_brk, print_mmap, sys_munmap, sys_mprotect, sys_mremap, + sys_madvise, sys_msync, sys_mincore, sys_remap_file_pages, get_nodes, + sys_mbind, [POWERPC] sys_subpage_prot): Use printaddr. + (sys_get_mempolicy): Use printaddr and umove_or_printaddr. + + mknod.c: make use of RVAL_DECODED. + * mknod.c (decode_mknod): Change to return void. + Update for RVAL_DECODED. + (sys_mknod, sys_mknodat): Update callers. Update for RVAL_DECODED. + [SPARC || SPARC64] (xmknod): Update for RVAL_DECODED. + + mount.c: make use of RVAL_DECODED. + * mount.c (sys_mount): Update for RVAL_DECODED. + + mount.c: use printaddr. + * mount.c (sys_mount): Use printaddr. + + Alias sys_connect to sys_bind. + * linux/dummy.h (sys_connect): Alias to sys_bind. + * net.c (sys_connect): Remove. + + net.c: make use of RVAL_DECODED. + * net.c (sys_socket, sys_bind, sys_listen, sys_send, sys_sendto, + sys_sendmsg, sys_shutdown, sys_setsockopt): Update for RVAL_DECODED. + + net.c: use printaddr and umove_or_printaddr. + * net.c (printsock): Use printaddr and umove_or_printaddr. + (printcmsghdr, printmsghdr, printmmsghdr, decode_mmsg, do_sockname, + sys_recv, sys_recvfrom, sys_recvmsg, do_pipe, print_linger, print_ucred, + print_tpacket_stats, print_icmp_filter, print_getsockopt, + print_group_req, print_tpacket_req, print_packet_mreq, + print_setsockopt): Use printaddr. + (print_mreq, print_mreq6): Use umove_or_printaddr. + +2015-07-18 Elvira Khabirova + + tests: add sigaltstack.test. + * tests/sigaltstack.c: New file. + * tests/sigaltstack.expected: Likewise. + * tests/sigaltstack.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add sigaltstack. + (TESTS): Add sigaltstack.test. + (EXTRA_DIST): sigaltstack.expected. + * tests/.gitignore: Add sigaltstack. + + bootstrap: delete personality test directories beforehand. + * bootstrap: Delete tests-m32 and tests-mx32 directories + before creating them. + +2015-07-18 Dmitry V. Levin + + defs.h: do not include + * printsiginfo.h: New file. + * Makefile.am (strace_SOURCES): Add it. + * defs.h: Do not include . + (printsiginfo): Remove. + * printsiginfo.c: Include and "printsiginfo.h". + * strace.c: Likewise. + * sigaltstack.c: Include . + * signal.c: Likewise. + * sigreturn.c: Likewise. + * time.c: Likewise. + + resource.c: move printrusage and printrusage32 to a separate file. + * printrusage.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * resource.c (printrusage, [ALPHA] printrusage32): Move + to printrusage.c. + + open.c: make use of RVAL_DECODED. + * open.c (decode_open, sys_creat): Update for RVAL_DECODED. + + personality.c: make use of RVAL_DECODED. + * personality.c (sys_personality): Update for RVAL_DECODED. + + printsiginfo.c: use umove_or_printaddr. + * printsiginfo.c (printsiginfo_at): Use umove_or_printaddr. + + prctl.c: make use of RVAL_DECODED. + * prctl.c (prctl_enter, prctl_exit): Merge into sys_prctl. + (sys_prctl, sys_arch_prctl): Update for RVAL_DECODED. + + prctl.c: use printaddr and umove_or_printaddr. + * prctl.c (prctl_exit): Use printaddr and umove_or_printaddr. + + process.c: use printaddr. + * process.c (sys_ptrace): Use printaddr. + + process_vm.c: make use of RVAL_DECODED. + * process_vm.c (sys_process_vm_writev): Update for RVAL_DECODED. + + process_vm.c: use printaddr. + * process_vm.c (sys_process_vm_readv): Use printaddr. + + reboot.c: make use of RVAL_DECODED. + * reboot.c (sys_reboot): Update for RVAL_DECODED. + + Enhance quotactl decoding. + * quota.c (decode_cmd_data): Use umove_or_printaddr. + (sys_quotactl): Do not disable the parser in verbose mode. + Decode all "set" commands on entering syscall. + + readahead.c: make use of RVAL_DECODED. + * readahead.c (sys_readahead.c): Update for RVAL_DECODED. + + readlink.c: use printaddr. + * readlink.c (decode_readlink): Use printaddr. + + renameat.c: make use of RVAL_DECODED. + * renameat.c (sys_renameat, sys_renameat2): Update for RVAL_DECODED. + + resource.c: make use of RVAL_DECODED. + * resource.c (sys_setrlimit, sys_getpriority, sys_setpriority): + Update for RVAL_DECODED. + + resource.c: use umove_or_printaddr. + * resource.c (print_rlimit64, print_rlimit32, printrusage32, + printrusage, sys_times): Use umove_or_printaddr. + (decode_rlimit64): Remove. + (decode_rlimit): Remove redundant checks. + [defined(current_wordsize) && current_wordsize != 4] (decode_rlimit): + Define to print_rlimit64. + (sys_prlimit64): Replace decode_rlimit64 with print_rlimit64. + + sched.c: make use of RVAL_DECODED. + * sched.c (sys_sched_setscheduler, sys_sched_setparam, + sys_sched_get_priority_min): Update for RVAL_DECODED. + + sched.c: use printnum_int and printaddr. + * sched.c (sys_sched_setscheduler, sys_sched_getparam, + sys_sched_setparam): Use printnum_int for sched_param decoding. + (sched_rr_get_interval): Use printaddr. + + scsi.c: use printaddr. + * scsi.c (print_sg_io_buffer): Use printaddr. + +2015-07-17 Dmitry V. Levin + + seccomp.c: make use of RVAL_DECODED. + * seccomp.c (sys_seccomp): Update for RVAL_DECODED. + + seccomp.c: use printaddr and umove_or_printaddr. + * seccomp.c (decode_fprog, decode_seccomp_set_mode_strict): + Use printaddr. + (print_seccomp_filter): Use umove_or_printaddr. + + sigaltstack.c: use printaddr and umove_or_printaddr. + * sigaltstack.c (print_stack_t): Use umove_or_printaddr and printaddr. + + signal.c: make use of RVAL_DECODED. + * signal.c (sys_sigsuspend, sys_kill, sys_tgkill, sys_rt_sigsuspend, + sys_rt_sigqueueinfo, sys_rt_tgsigqueueinfo, sys_restart_syscall, + do_signalfd): Update for RVAL_DECODED. + + signal.c: use printaddr and umove_or_printaddr. + * signal.c (print_sigset_addr_len, decode_old_sigaction): + Use printaddr and umove_or_printaddr. + (sys_signal): Use printaddr. + (sys_sigprocmask, sys_sigpending, sys_rt_sigprocmask, + sys_rt_sigpending): Remove redundant checks for syserror. + (decode_new_sigaction): Use umove_or_printaddr. + +2015-07-16 Dmitry V. Levin + + sram_alloc.c: make use of RVAL_DECODED. + * sram_alloc.c [BFIN] (sys_sram_alloc): Update for RVAL_DECODED. + + statfs.c: use umove_or_printaddr. + * statfs.c (printstatfs, printstatfs64, printcompat_statfs64): + Use umove_or_printaddr. + + swapon.c: make use of RVAL_DECODED. + * swapon.c (sys_swapon): Update for RVAL_DECODED. + + swapon.c: move fallback definitions of swap options to xlat/ + * swapon.c: Move definitions of SWAP_FLAG_* flags ... + * xlat/swap_flags.in: ... here. + + sync_file_range2: fix typo in flags decoding. + * sync_file_range.c (sys_sync_file_range2): Fix typo in flags decoding. + + sync_file_range.c: make use of RVAL_DECODED. + * sync_file_range.c (sys_sync_file_range, sys_sync_file_range2): Update + for RVAL_DECODED. + + syslog.c: use umove_or_printaddr and RVAL_DECODED. + * sysctl.c (sys_sysctl): Use umove_or_printaddr and RVAL_DECODED. + + sysinfo.c: use umove_or_printaddr. + * sysinfo.c (sys_sysinfo): Use umove_or_printaddr. + + syslog.c: make use of RVAL_DECODED. + * syslog.c (sys_syslog): Update for RVAL_DECODED. + + syslog.c: use printaddr. + * syslog.c (sys_syslog): Use printaddr. + + sysmips.c: cleanup. + * sysmips.c [MIPS] (sys_sysmips): Use switch statement. Use printaddr. + Fix misprinted ", " delimiter. + + sysmips.c: make use of RVAL_DECODED. + * sysmips.c [MIPS] (sys_sysmips): Update for RVAL_DECODED. + + time.c: make use of RVAL_DECODED. + * time.c (sys_settimeofday, sys_osf_settimeofday, sys_clock_settime, + sys_timerfd, sys_timerfd_create, sys_timerfd_settime): Update + for RVAL_DECODED. + (timerfd_gettime): Decode struct itimerspec argument on exiting syscall. + + time.c: use printaddr, printnum_int, and umoven_or_printaddr. + * time.c (sys_nanosleep): Use printaddr. + (printitv_bitness, tprint_timex32, tprint_timex, printsigevent32, + printsigevent): Use umoven_or_printaddr. + (sys_timer_create): Use printnum_int. + (sys_getitimer, sys_osf_getitimer, sys_setitimer, sys_osf_setitimer, + do_adjtimex, sys_timer_settime, sys_timer_gettime): Remove + redundant checks for syserror. + + sprinttv: do not fetch data in case of syserror. + * time.c (sprinttv): Do not fetch data in case syserror. + Print address instead of {...} in case of umove failure. + (sys_gettimeofday, sys_osf_gettimeofday, sys_adjtime, sys_clock_gettime, + clock_nanosleep): Remove now redundant checks for syserror. + + truncate.c: make use of RVAL_DECODED. + * truncate.c (sys_truncate, sys_truncate64, sys_ftruncate, + sys_ftruncate64): Update for RVAL_DECODED. + + umask.c: make use of RVAL_DECODED. + * umask.c (sys_umask): Update for RVAL_DECODED. + + umount.c: make use of RVAL_DECODED. + * umount.c (sys_umount2): Update for RVAL_DECODED. + + utimes.c: make use of RVAL_DECODED. + * utimes.c (decode_utimes): Change to return void. + Update for RVAL_DECODED. + (sys_utimes, sys_futimesat, sys_utimensat, sys_osf_utimes): + Update callers. Update for RVAL_DECODED. + +2015-07-16 Dmitry V. Levin + + tests/uid.test: adopt for alpha. + Make the test work on alpha that has getxuid syscall instead of getuid. + + * tests/uid.awk (BEGIN): Update getuid regexp to match both getuid + and getxuid syscalls. + * tests/uid.c (main): Allow __NR_getxuid as an alternative + to __NR_getuid. + * tests/uid.test: If getuid syscall is not available, probe for + getxuid syscall. + +2015-07-16 Dmitry V. Levin + + uid.c: make use of RVAL_DECODED. + * uid.c (sys_setuid, sys_setreuid, sys_setresuid, sys_chown, sys_fchown, + sys_setgroups): Update for RVAL_DECODED. + + uid.c: use printaddr and umoven_or_printaddr. + * uid.c (get_print_uid): Use umoven_or_printaddr. + (sys_getresuid): Do not check for syserror, get_print_uid now does + the right thing. + (sys_setgroups, sys_getgroups): Add const qualifier to local variables + that are assigned once. Use printaddr. + + ia64: wire up utimensat syscall. + * linux/ia64/syscallent.h (utimensat): New entry. + + decode_utimes: enclose timespec array in square brackets. + * utimes.c (decode_utimes): enclose timespec array in square brackets + instead of curly brackets. + + uname.c: use umove_or_printaddr. + * uname.c (sys_uname): Use umove_or_printaddr. + + tests: add utime.test. + * tests/utime.c: New file. + * tests/utime.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add utime. + (TESTS): Add utime.test. + * tests/.gitignore: Add utime. + + utime.c: make use of RVAL_DECODED. + * utime.c (sys_utime): Update for RVAL_DECODED. + + utime.c: use umoven_or_printaddr. + * utime.c (sys_utime): Use umoven_or_printaddr. + +2015-07-15 Dmitry V. Levin + + wait.c: use printaddr and umove_or_printaddr. + * wait.c (waitid): Do not check for NULL the address passed + to printrusage. + (printwaitn): Likewise. + Use printaddr and umove_or_printaddr for fetching wait status. + + wait: move fallback definitions of wait options to xlat/ + * wait.c: Move definitions of __W* flags ... + * xlat/wait4_options.in: ... here. + + tests: add xattr.test. + * tests/xattr.c: New file. + * tests/xattr.expected: Likewise. + * tests/xattr.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add xattr. + (TESTS): Add xattr.test. + (EXTRA_DIST): Add xattr.expected. + * tests/.gitignore: Add xattr. + +2015-07-14 Dmitry V. Levin + + xattr.c: make use of RVAL_DECODED. + * xattr.c (sys_setxattr, sys_fsetxattr, sys_removexattr, + sys_fremovexattr): Update for RVAL_DECODED. + + print_xattr_val: do not fetch data in case of !verbose || syserror. + * xattr.c (print_xattr_val): Do not fetch data in case + of !verbose || syserror. Use printaddr. + + print_xattr_list: use printaddr. + * xattr.c (print_xattr_list): Use printaddr. + + print_xattr_val: remove unused argument. + * xattr.c (print_xattr_val): Remove unused "failed" argument. + (sys_setxattr, sys_fsetxattr, sys_getxattr, sys_fgetxattr): Update + all callers. + + print_xattr_list: remove redundant address check. + * xattr.c (print_xattr_list): Do not check for NULL the address passed + to printstr. + + ipc.c: make use of RVAL_DECODED. + * ipc.c (sys_mq_notify, sys_mq_open, sys_mq_timedreceive, + sys_mq_timedsend, sys_msgctl, sys_msgget, sys_msgsnd, sys_semctl, + sys_semget, sys_semop, sys_semtimedop, sys_shmctl, sys_shmdt, + sys_shmget): Update for RVAL_DECODED. + (sys_shmat): Decode all arguments on entering syscall. + +2015-07-14 Dmitry V. Levin + + umoven_or_printaddr: do not fetch data if not in verbose mode. + After this change, umoven_or_printaddr and its callers, including + printnum_* and printpair_*, will not fetch data in !verbose mode. + + * util.c (umoven_or_printaddr): Do not call umoven if !verbose. + +2015-07-14 Dmitry V. Levin + + Change printnum_* printers to honor syserror. + With this change, printnum_* printers will not attempt to fetch data + in case of exiting(tcp) && syserror(tcp). + All "at exiting" decoders that call these printers have been made + ready for this change in previous commits. + + * util.c (DEF_PRINTNUM, DEF_PRINTPAIR): Use umove_or_printaddr. + * prctl.c (prctl_exit): Use printnum_int and printnum_long. + (sys_arch_prctl): Do not check for syserror. + +2015-07-13 Dmitry V. Levin + + term.c: enhance tty ioctl parser. + Decode as much data on entering syscall as possible. + + * term.c (decode_termios, decode_termio, decode_winsize, decode_ttysize, + decode_modem_flags): New functions. + (term_ioctl): Use them. Update for RVAL_DECODED. + +2015-07-12 Elvira Khabirova + + Change comparisons with function pointers to comparisons with SENs. + * pathtrace.c (pathtrace_match): Change all comparisons with function + pointers to a single SEN based switch. + * syscall.c (dumpio, trace_syscall_entering): Change all comparisons + with function pointers to comparisons with SENs. + * ipc.c (sys_ipc): Remove. + * sock.c (sys_socketcall): Likewise. + * linux/dummy.h (sys_ipc, sys_socketcall): New aliases. + + Add unique syscall entry numbers (SENs) + * Makefile.am (BUILT_SOURCES, CLEANFILES): Add sen.h. + (syscallent_names, syscallent_patterns, syscallent_files): New variables. + (sen.h): New rule. + * defs.h (struct sysent): Add sen field. + * generate_sen.sh: New file. + * linux/syscall.h: Include "sen.h". + * syscall.c (SEN_NAME): New temporary macro. + (SEN): Use it to prepend syscall entry number. + + Introduce SEN macro. + * syscall.c (SEN): New temporary macro. + * linux/dummy.h (sys_printargs): New macro. + * linux/subcall.h: Wrap all sys_func entries using SEN. + * linux/*/syscallent*.h: Likewise. + +2015-07-10 Dmitry V. Levin + + scsi.c: enhance SG_IO ioctl parser. + Fix SG_IO ioctl output in case of failed umove + + * scsi.c: Include instead of . + Update for RVAL_DECODED. + (print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req, + print_sg_io_v4_res): Do not print address in case of failed umove. + (scsi_ioctl): Use printaddr. + +2015-07-10 Dmitry V. Levin + + ptp.c: enhance ptp ioctl parser. + * ptp.c: Include instead of . + Update for RVAL_DECODED. + (ptp_ioctl): Use umove_or_printaddr. + +2015-07-10 Dmitry V. Levin + + mtd.c: enhance mtd and ubi ioctl parsers. + Decode as much data on entering syscall as possible. + + * xlat/mtd_file_mode_options.in: New file. + * mtd.c: Include instead of . + Include "xlat/mtd_file_mode_options.h". + Update for RVAL_DECODED. + (mtd_ioctl, ubi_ioctl): Use printnum_int and umove_or_printaddr. + +2015-07-10 Dmitry V. Levin + + sock.c: enhance socket ioctl parser. + Decode as much data on entering syscall as possible. + + * sock.c: Update for RVAL_DECODED. + (print_addr): Remove. + (print_ifreq_addr, print_ifreq, print_ifc_len, decode_ifconf): New + functions. + (sock_ioctl) Use them. Use umove_or_printaddr. + +2015-07-10 Dmitry V. Levin + + block.c: enhance block ioctl parser. + * block.c: Update for RVAL_DECODED. + Define BLKROTATIONAL and BLKZEROOUT. + (block_ioctl): Decode them. Use printnum_short, printnum_int, + printnum_long, printpair_int64, and umove_or_printaddr. + (print_blkpg_req, block_ioctl): Use umove_or_printaddr. + +2015-07-09 Dmitry V. Levin + + blkpg_ops: add BLKPG_RESIZE_PARTITION constant. + * xlat/blkpg_ops.in: Add BLKPG_RESIZE_PARTITION. + + Reported-by: Christian Neukirchen + +2015-07-09 Dmitry V. Levin + + loop.c: enhance loop ioctl parser. + Decode as much data on entering syscall as possible. + + * loop.c: Include instead of . + Update for RVAL_DECODED. + (decode_loop_info, decode_loop_info64): New functions. + (loop_ioctl): Use them. Decode LOOP_SET_STATUS, LOOP_SET_STATUS64, + LOOP_SET_FD, LOOP_CHANGE_FD, LOOP_CTL_ADD and LOOP_CTL_REMOVE on + entering syscall. + Print LOOP_SET_FD and LOOP_CHANGE_FD arguments using printfd. + +2015-07-09 Dmitry V. Levin + + rtc.c: enhance rtc ioctl parser. + * rtc.c: Update for RVAL_DECODED. + (print_rtc): Rename to print_rtc_time. + (decode_rtc_time, decode_rtc_wkalrm): New functions. + (rtc_ioctl): Use them. + [RTC_VL_READ]: Decode RTC_VL_READ. + Use printnum_long for RTC_IRQP_READ and RTC_EPOCH_READ decoding. + + Use printpair_int. + * evdev.c (repeat_ioctl): Use printpair_int. + * net.c (do_pipe, sys_socketpair): Likewise. + +2015-07-09 Dmitry V. Levin + + Add several generic integer pairs printing functions. + Add functions to fetch and print pairs of integer types. + Note that these printers do not attempt to fetch data + in case of exiting(tcp) && syserror(tcp). + + printnum_* printers will follow as soon as all callers are made ready + for this change. + + * defs.h (printpair_int, printpair_long, printpair_int64): New + prototypes. + * util.c (DEF_PRINTPAIR): New macro. + (printpair_int, printpair_long, printpair_int64): New functions. + +2015-07-09 Dmitry V. Levin + + Add two generic integer printing functions. + Add printnum_short and printnum_int64 in addition to already existing + printnum_int and printnum_long. + + * defs.h (printnum_short, printnum_int64): New prototypes. + * util.c (DEF_PRINTNUM): New macro. + (printnum_int, printnum_long): Use DEF_PRINTNUM. + (printnum_short, printnum_int64): New functions. + +2015-07-09 Dmitry V. Levin + + Add address printing functions. + printaddr is a simple function implementing "print NULL or address" + idiom. + umoven_or_printaddr is a wrapper around umoven that has the same return + value semantics as umoven but also prints the address when the data + is not going to be fetched (in case of exiting(tcp) && syserror(tcp)) + or cannot be fetched (umoven fails). + umove_or_printaddr is a macro wrapper around umoven_or_printaddr that + mirrors umove wrapper around umoven. + + * defs.h (printaddr, umoven_or_printaddr): New prototypes. + (umove_or_printaddr): New macro. + * util.c (printaddr, umoven_or_printaddr): New functions. + +2015-07-09 Dmitry V. Levin + + Implement RVAL_DECODED flag. + Implement a method for "on entering" parsers to return + "done with decoding" information to their callers. + + If a syscall parser called from trace_syscall_entering returns a value + with RVAL_DECODED bit set, record this value in tcp->sys_func_rval + and use it in trace_syscall_exiting instead of calling the parser on + exiting syscall. + + If an ioctl parser returned RVAL_DECODED, this would tell + SYS_FUNC(ioctl) that the decoding is finished but fallback printing of + the ioctl command argument is needed, while e.g. RVAL_DONE+1 would mean + that the decoding is finished and no fallback decoding is needed. + + * defs.h (struct tcb): Add sys_func_rval. + (RVAL_DECODED): New macro. + * syscall.c (trace_syscall_entering): Initialize tcp->sys_func_rval + along with setting TCB_INSYSCALL flag. + (trace_syscall_exiting): Use tcp->sys_func_rval instead of calling + tcp->s_ent->sys_func when the former has RVAL_DECODED flag set. + Reset tcp->sys_func_rval along with clearing TCB_INSYSCALL flag. + * ioctl.c (sys_ioctl): Set RVAL_DECODED flag on exiting. + Print ioctl argument iff RVAL_DECODED is set and fallback decoding + is requested. + +2015-07-05 Dmitry V. Levin + + time.c: move rtc ioctl parser to a separate file. + * rtc.c: new file + * Makefile.am (strace_SOURCES): Add it. + * time.c (print_rtc, rtc_ioctl): Move to rtc.c. + + term.c: fix typo. + * term.c: Rename TCLFLSH to TCFLSH. + + Do not include sys/filio.h. + * configure.ac (AC_CHECK_HEADERS): Remove sys/filio.h. + * term.c: Do not include . + +2015-07-02 Dmitry V. Levin + + ioctl: prepare ioctl_decode_command_number for future changes. + * ioctl.c (ioctl_decode_command_number): Change 1st arg to struct tcb*. + (sys_ioctl): Update callers. + + ioctl: simplify ioctl_decode signature. + * ioctl.c (ioctl_decode): Remove 2nd and 3rd parameters. + (sys_ioctl): Update callers. + + ioctl: consistently use name "code" for ioctl request code. + * ioctl.c (evdev_decode_number, hiddev_decode_number, + ioctl_decode_command_number): Rename "arg" to "code". + + Move ioctl syscall parser to ioctl.c. + * io.c (sys_ioctl): Move ... + * ioctl.c: ... here. + (ioctl_lookup, ioctl_next_match, ioctl_print_code, ioctl_decode, + ioctl_decode_command_number): Declare as static. + * defs.h (ioctl_lookup, ioctl_next_match, ioctl_print_code, + ioctl_decode, ioctl_decode_command_number): Remove. + + ioctl: remove obsolete registry of ioctl characters. + * ioctl.c: Remove registry of ioctl characters. + +2015-06-30 Dmitry V. Levin + + Fix filtering of syscalls. + * syscall.c (trace_syscall_exiting): Skip filtered syscalls also in case + of get_regs or get_syscall_result failure. + * tests/filter-unavailable.c: New file. + * tests/filter-unavailable.expected: Likewise. + * tests/filter-unavailable.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add filter-unavailable. + (filter_unavailable_LDFLAGS): Add -pthread. + (TESTS): Add filter-unavailable.test. + (EXTRA_DIST): Add filter-unavailable.expected. + * tests/.gitignore: Add filter-unavailable. + + Reported-by: Bryan Matsuo + +2015-06-30 Dmitry V. Levin + + Fix -qq option in conjunction with -o option. + This change makes -qq option work in conjunction with -o option, + thus complementing commit v4.7-222-g01997cf. + + * strace.c (init): Do not reset qflag. + +2015-06-30 Dmitry V. Levin + + xtensa: wire up new syscalls. + * linux/xtensa/syscallent.h (bpf, execveat): New entries. + + bfin: wire up new syscalls. + * linux/bfin/syscallent.h (kcmp, finit_module, sched_setattr, + sched_getattr, renameat2, seccomp, getrandom, memfd_create, + bpf, execveat): New entries. + + alpha: wire up new syscalls. + * linux/alpha/syscallent.h (getrandom, memfd_create, execveat): + New entries. + +2015-06-17 Dmitry V. Levin + + tests: skip stat32 test if struct stat is defined incorrectly. + If stat.st_mode returned by syscall is 0, it means that the definition + of struct stat in is incorrect. This is the case e.g. on + mips n32 where the only available stat syscall is 64-bit but at the same + time struct stat defined by is 32-bit. + + * tests/stat.c (main) [NR_stat]: Return 77 if st_mode is 0. + +2015-06-17 Dmitry V. Levin + + Consistenly use #ifdef to check for AC_DEFINE'd macros. + * aio.c (print_common_flags): Use #ifdef in the check for + HAVE_STRUCT_IOCB_U_C_FLAGS. + * defs.h: Use #ifdef in the check for HAVE_LITTLE_ENDIAN_LONG_LONG. + * net.c: Use #ifdef in the check for HAVE_SENDMSG. + * syscall.c (dumpio): Likewise. + * printstat.h (DO_PRINTSTAT): Use #ifdef in checks for + HAVE_STRUCT_STAT_ST_* macros. + * util.c: Use #ifdef in checks for HAVE_SYS_XATTR_H. + + xattr: move fallback definitions of xattr flags to xlat/ + * xattr.c: Include insread of . + Move definitions of XATTR_* flags ... + * xlat/xattrflags.in: ... here. + + link: move fallback definitions of AT_* constants to xlat/ + * link.c: Move definitions of AT_* constants ... + * xlat/at_flags.in: ... here. + + net: move fallback definitions of SOL_* constants to xlat/ + * net.c: Move definitions of SOL_* constants ... + * xlat/socketlayers.in: ... here. + + futex: move fallback definitions of futex constants to xlat/ + * futex.c: Move definitions of FUTEX_OP_CMP_* constants ... + * xlat/futexwakecmps.in: ... here. + * futex.c: Move definitions of other FUTEX_OP_* constants ... + * xlat/futexwakeops.in: ... here. + * futex.c: Move definitions of remaining FUTEX_* constants except + FUTEX_PRIVATE_FLAG and FUTEX_CLOCK_REALTIME flags ... + * xlat/futexops.in: ... here. + + clone: move definitions of cloning flags to xlat/ + * clone.c: Include . Move definitions of CLONE_* flags ... + * xlat/clone_flags.in: ... here. + +2015-06-16 Dmitry V. Levin + + Update mount flags constants. + * mount.c: Remove definitions of mount flags constants. + * xlat/mount_flags.in: Update from linux v4.0, add default values. + + mount: update parser to match kernel behaviour. + * mount.c (sys_mount): Do not decode type and data strings for + MS_SHARED, MS_PRIVATE, MS_SLAVE, and MS_UNBINDABLE mount flags + that do not imply valid strings. + + mount: robustify MS_MGC_VAL decoding. + * mount.c (sys_mount): When printing mount flags, do not assume that + (flags & MS_MGC_MSK) == MS_MGC_VAL. + +2015-06-08 Dmitry V. Levin + + net: decode setsockopt() multicast arguments. + * configure.ac (AC_CHECK_FUNCS): Add inet_pton. + * net.c (print_mreq, print_mreq6): New functions. + (print_setsockopt): Use them to decode IP_ADD_MEMBERSHIP, + IP_DROP_MEMBERSHIP, IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP, + IPV6_JOIN_ANYCAST, and IPV6_LEAVE_ANYCAST. + * tests/ip_mreq.c: New file. + * tests/ip_mreq.expected: Likewise. + * tests/ip_mreq.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add ip_mreq. + (TESTS): Add ip_mreq.test. + (EXTRA_DIST): ip_mreq.expected. + * tests/.gitignore: Add ip_mreq. + + Based on patch by Ben Noordhuis . + +2015-06-08 Dmitry V. Levin + + Update IPV6 socket options constants. + * xlat/sockipv6options.in: Update from linux v4.0. + +2015-06-05 Dmitry V. Levin + + net: factor out interface index printing code. + * net.c (print_ifindex): New function. + (printsock) [HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID]: Use it. + +2015-05-25 Dmitry V. Levin + + Consistently use error_msg instead of fprintf(stderr) + * linux/alpha/get_scno.c: Use error_msg. + * linux/arm/get_scno.c: Likewise. + * linux/mips/get_scno.c: Likewise. + * linux/sh/get_scno.c: Likewise. + * linux/x86_64/get_scno.c: Likewise. + * exit.c (sys_exit): Likewise. + * pathtrace.c (pathtrace_select, pathtrace_match): Likewise. + * strace.c (alloctcb, droptcb, detach, startup_attach, + test_ptrace_seize, init, cleanup, print_debug_info, + maybe_allocate_tcb, startup_tcb, trace): Likewise. + * syscall.c (update_personality, trace_syscall_exiting, + get_scno): Likewise. + * unwind.c (DPRINTF): Likewise. + * tests/bexecve.test: Update patterns. + * tests/detach-stopped.test: Likewise. + + Consistently print OOM diagnostic messages. + * bjm.c (sys_query_module): Use error_msg to print OOM diagnostics. + * util.c (dumpiov, dumpstr): Likewise. + +2015-05-25 Dmitry V. Levin + + Introduce memory allocation wrappers. + Introduce wrappers to the following functions that do memory allocation: + malloc, calloc, realloc, strdup. + + This commit is a follow-up to the related discussions in strace-devel ML: + http://sourceforge.net/p/strace/mailman/message/33618180/ + http://sourceforge.net/p/strace/mailman/message/33733470/ + + * defs.h (xmalloc, xcalloc, xreallocarray, xstrdup): New prototypes. + * xmalloc.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * count.c (count_syscall, call_summary_pers): Use xcalloc. + * desc.c (decode_select): Use xmalloc. + * dirent.c (sys_getdents, sys_getdents64): Likewise. + * net.c (sys_recvmmsg): Use xstrdup. + * pathtrace.c (storepath): Use xreallocarray. + (pathtrace_match): Use xmalloc. + * strace.c (die_out_of_memory): Move to xmalloc.c. + (expand_tcbtab): Use xcalloc and xreallocarray. + (startup_child): Use xstrdup. + (init): Use xmalloc, xcalloc, and xstrdup. + * syscall.c (reallocate_qual): Use xreallocarray. + (qualify): Use xstrdup. + * unwind.c (unwind_tcb_init): Use xmalloc. + (build_mmap_cache): Use xcalloc, xreallocarray, and xstrdup. + (get_symbol_name): Use xreallocarray. + (stacktrace_walk, queue_put): Use xmalloc. + * util.c (printstr): Use xmalloc. + * vsprintf.c (strace_vfprintf): Likewise. + +2015-05-21 Dmitry V. Levin + + Fix ioctl entries on 32-bit architectures with 64-bit aligned structures + Some ioctl constants are defined to different values on those 32-bit + architectures where structures containing a 64-bit field are aligned on + a 8-byte boundary and have a size multiple of 8 bytes, and on other + 32-bit architectures. + + * configure.ac: Check the size of a structure containing a 64-bit field. + * linux/32/ioctls_inc.h: Rename to ... + * linux/32/ioctls_inc_align32.h: ... this. + * linux/32/ioctls_inc_align64.h: New file. + * linux/32/ioctls_inc.h: Include either 32/ioctls_inc_align32.h + or ioctls_inc_align64.h depending on SIZEOF_STRUCT_I64_I32. + * Makefile.am (EXTRA_DIST): Add linux/32/ioctls_inc_align32.h and + * linux/32/ioctls_inc_align64.h. + * tests/ioctl.c (main): Test for VIDIOC_ENUMINPUT. + * tests/ioctl.expected: Check VIDIOC_ENUMINPUT decoding. + + Reported-by: Philippe De Muyter + +2015-05-21 Dmitry V. Levin + + maint: make linux/kvm.h parseable on arm. + * maint/ioctls_sym.sh [AARCH64 || ARM]: Add missing definitions for + structures referenced from linux/kvm.h. + +2015-05-21 Philippe De Muyter + + v4l2: add decoding for VIDIOC_S_CROP's arg. + * v4l2.c (v4l2_ioctl): Add decoding for VIDIOC_S_CROP's arg. + +2015-05-19 Ezequiel Garcia + + Add support for Altera's Nios-II softcore architecture. + This commit adds strace support for Altera's Nios-II. The architecture + is supported by Linux since v3.19, and it implements the generic syscall + ABI. + + * configure.ac: Add nios2 support. + * cacheflush.c [NIOS2] (sys_cacheflush): New function. + * linux/nios2/*: New Nios-II specific files. + * Makefile.am (EXTRA_DIST): Add them. + +2015-05-19 Philippe De Muyter + + v4l2: VIDIOC_CROPCAP: add missing braces around arg printout. + * v4l2.c (v4l2_ioctl): case VIDIOC_CROPCAP: add missing braces around arg + printout. + +2015-05-19 Dmitry V. Levin + + maint: avoid effects of locale when sorting files. + * maint/ioctls_gen.sh: Invoke sort with LC_COLLATE=C. + * maint/ioctls_hex.sh: Likewise. + * maint/ioctls_sym.sh: Likewise. + + Reported-by: Philippe De Muyter + +2015-04-18 Philippe De Muyter + + v4l2: add decoding for VIDIOC_CREATE_BUFS's arg. + * v4l2.c (v4l2_ioctl): Add decoding for VIDIOC_CREATE_BUFS's arg. + +2015-04-17 Dmitry V. Levin + + mips o32: decode indirect syscall. + Implement decoding of MIPS O32 specific indirect syscall. + + * syscall.c [LINUX_MIPSO32] (decode_mips_subcall, sys_syscall): + New functions. + (trace_syscall_entering) [LINUX_MIPSO32]: Use decode_mips_subcall. + * linux/mips/syscallent-o32.h (4000): Change sys_func to sys_syscall. + + Reported-and-tested-by: Arturo Borrero Gonzalez + +2015-04-14 Dmitry V. Levin + + debian: add gawk to Build-Depends. + * debian/control (Build-Depends): Add gawk. + Patch by Reiner Herrmann . + + This fixes Debian bug #780992. + +2015-04-14 Dmitry V. Levin + + tests: fix bexecve.test for the case of mixed personalities. + Fix bexecve.test when the executable being run does not match the + native architecture. + + * tests/bexecve.test: Use "set_ptracer_any" instead of "sh". + Allow for a personality switch notification in the strace output. + +2015-04-07 Dmitry V. Levin + + tests: add a test for "resuming interrupted nanosleep" + * tests/restart_syscall.test: New test. + * tests/restart_syscall.expected: New file. + * tests/restart_syscall_unknown.expected: Likewise. + * tests/Makefile.am (TESTS): Add restart_syscall.test. + (EXTRA_DIST): Add restart_syscall.expected + (TEST_LOG_COMPILER): Change to "env". + (OS, ARCH, AM_TEST_LOG_FLAGS): Define. + and restart_syscall_unknown.expected. + + tests: strip executable bit from *.expected files. + +2015-04-07 Dmitry V. Levin + + Declare syscall parsers using SYS_FUNC macro. + Introduce SYS_FUNC macro to declare and define all syscall parsers. + + * Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h. + (sys_func.h): New rule. + * defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros. + * linux/syscall.h: Include "sys_func.h". + [NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers. + Remove other declarations. + * linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs + and osf_fstatfs syscall parsers. + * *.c: Use SYS_FUNC to define syscall parsers. + +2015-04-07 Denys Vlasenko + + Fix confusing "resuming interrupted unknown" message. + Dmitry reported seeing the following: + + $ sleep 2 & sleep 1; ./strace -erestart_syscall -p $! + [1] 12345 + Process 12345 attached + restart_syscall(<... resuming interrupted unknown ...>) = 0 + + Fixing it by replacing "unknown" with "system call". + +2015-04-07 Dmitry V. Levin + + tests: workaround old gawk versions that do not provide @include support + Some of our tests use GNU awk @include extension, but not all currently + used versions of GNU awk support it. Skip these tests if gawk does not + provide @include support. + + * tests/init.sh (check_gawk): New function. + (match_awk): Use it. + +2015-04-06 Dmitry V. Levin + + tests: rewrite umovestr2.test without using grep. + The regular expression generated by umovestr2.c on systems with large + page size is too big for GNU grep. Rewrite the test to use diff + instead of grep. + + * tests/umovestr2.test: Use match_diff instead of match_grep. + * tests/umovestr2.c (main): Convert output from regexp to plain text. + +2015-03-31 Dmitry V. Levin + + Cleanup process_vm_writev syscall decoding. + * process_vm.c (sys_process_vm_writev): Do not check for syserror, + it is not applicable on entering syscall. + + umovestr: read chunks of memory up to pagesize at a time. + * defs.h (get_pagesize): New prototype. + * mem.c (get_pagesize) Make global. + * util.c (PAGMASK): Remove. + (vm_read_mem): New process_vm_readv proxy function. + (umoven, umovestr): Use it. + (umovestr): Read chunks up to pagesize at a time. + +2015-03-31 Dmitry V. Levin + + umovestr: fix short read bug. + * util.c (umovestr): Check the right address. + * tests/umovestr.c: New file. + * tests/umovestr2.c: Likewise. + * tests/umovestr.expected: Likewise. + * tests/umovestr.test: New test. + * tests/umovestr2.test: Likewise. + * tests/Makefile.am (check_PROGRAMS): Add umovestr and umovestr2. + (TESTS): Add umovestr.test and umovestr2.test. + (EXTRA_DIST): Add umovestr.expected. + * tests/.gitignore: Add umovestr and umovestr2. + + Reported-by: Josef T. Burger + +2015-03-31 Dmitry V. Levin + + When process_vm_readv fails with EPERM, try PTRACE_PEEKDATA. + process_vm_readv() and ptrace(PTRACE_PEEKDATA) have inconsistent access + control rules wrt traced processes: process_vm_readv() is more likely to + fail with EPERM than ptrace(PTRACE_PEEKDATA) when tracing a process that + has execve'd a privileged executable. + + * util.c (umoven, umovestr): If process_vm_readv returned EPERM, + fall back to ptrace(PTRACE_PEEKDATA). + + Reported-by: Andrew Guertin + +2015-03-30 Dmitry V. Levin + + Use macros for gcc attributes. + * defs.h (error_msg, perror_msg, error_msg_and_die, perror_msg_and_die, + die_out_of_memory, printllval, printnum_int, printnum_long, tprintf): + Use ATTRIBUTE_* macros for gcc attributes. + * file.c (struct stat64): Likewise. + * statfs.c (struct compat_statfs64): Likewise. + * strace.c (die, exec_or_die, init): Likewise. + * linux/sparc/arch_sigreturn.c: Likewise. + * linux/ubi-user.h: Likewise. + +2015-03-30 Dmitry V. Levin + + Introduce macros for gcc attributes. + Define macros for gcc attributes that are already in use + or going to be used soon. + + * defs.h (GNUC_PREREQ, ATTRIBUTE_NORETURN, ATTRIBUTE_FORMAT, + ATTRIBUTE_ALIGNED, ATTRIBUTE_PACKED, ATTRIBUTE_MALLOC, + ATTRIBUTE_NOINLINE, ATTRIBUTE_ALLOC_SIZE): New macros. + +2015-03-28 Felix Janda + + Include for _IOC_* macros. + Fix a compilation failure with musl libc. + + * evdev.c: Include . + * ioctl.c: Include instead of . + * ioctlsort.c: Likewise. + + Reported-by: Dima Krasner + Acked-by: Mike Frysinger + +2015-03-28 Felix Janda + + Include for S_I* macros. + Fix a compilation failure with musl libc. + + * mknod.c: Include . + * printmode.c: Likewise. + + Reported-by: Dima Krasner + Acked-by: Mike Frysinger + +2015-03-27 Dmitry V. Levin + + signal.c: move siginfo_t parsers to a separate file. + * printsiginfo.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * defs.h (printsiginfo): Change second argument's type from int to bool. + * signal.c: Stop defining siginfo_t related constants. + Move inclusion of xlat/sig*_codes.h files to printsiginfo.c + (printsigsource, printsigval, printsiginfo_at): Move to printsiginfo.c. + (printsiginfo): Change second argument's type from int to bool, + split, and move to printsiginfo.c. + + Update siginfo_t constants. + * xlat/sigbus_codes.in: Add BUS_MCEERR_AR and BUS_MCEERR_AO, + add default values. + * xlat/sigtrap_codes.in: Add TRAP_BRANCH and TRAP_HWBKPT, + add default values. + * xlat/sigsegv_codes.in: Add SEGV_BNDERR, add default values. + * xlat/sigchld_codes.in: Add default values. + * xlat/sigemt_codes.in: Likewise. + * xlat/sigfpe_codes.in: Likewise. + * xlat/sigill_codes.in: Likewise. + * xlat/siginfo_codes.in: Likewise. + * xlat/sigpoll_codes.in: Likewise. + * xlat/sigsys_codes.in: Likewise. + +2015-03-26 Dmitry V. Levin + + signal.c: move sigaltstack parser to a separate file. + * sigaltstack.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * signal.c (print_stack_t, sys_sigaltstack): Move to sigaltstack.c. + * xlat/sigaltstack_flags.in: Add default values. + +2015-03-25 Denys Vlasenko + + Move sparc64 get_scno() code where it belongs. + + sparc: rename personality 2 files to personality 1. + Run-tested in qemu 32-bit sparc. + +2015-03-25 Denys Vlasenko + + sparc: delete personality 1. + Personality 1 for sparc and sparc64 appears to be an old attempt + to support stracing Solaris binaries. + + It stalled after the only syscall, solaris_open, was covered: + all other solaris_foo's are printargs. + + This change deletes personality 1. Now sparc is an one-personality + arch, and sparc64 is a two-personality one. + + For clarity, pure renaming of personality 2 files to personality 1 for sparc64 + is performed in the next commit - this prevents a state where syscallent1.h + seems to indergo a lot of changes, where in fact in is deleted, and then + replaced by syscallent2.h + + Therefore, tree at this commit will not build. + +2015-03-24 Denys Vlasenko + + qemu_multiarch_testing/*: make it easier to do debug in sandboxes. + +2015-03-24 Denys Vlasenko + + sparc: fix v4.10-25-g8497b62 fallout. + Before: + + $ sleep 3 & ./strace -p $! + Process 8703 attached + syscall: unknown syscall trap 1a800003 00025d58 + syscall_516(0, 0x40080000, 0, 0xfc000f00, 0x28, 0xefc03b18) = 0 + exit_group(0) = ? + +++ exited with 0 +++ + + After: + + $ sleep 3 & ./strace -p $! + Process 8725 attached + restart_syscall(<... resuming interrupted nanosleep ...>) = 0 + exit_group(0) = ? + +++ exited with 0 +++ + +2015-03-24 Dmitry V. Levin + + get_scno: add diagnostics for invalid syscall numbers. + * syscall.c (get_scno): Print a debug level message + for !SCNO_IS_VALID syscall numbers. + +2015-03-24 Dmitry V. Levin + + arm: fix v4.10-25-g8497b62 fallout. + Starting with commit v4.10-25-g8497b62, + + arm$ ./strace true + pid 1234 stray syscall exit + Segmentation fault + + Fix this by updating ARM syscall sanity check. + In particular, get_scno() should not set TCB_INSYSCALL flag because + other code assumes that s_ent is properly initialized when this flag + is set. + + * linux/arm/get_scno.c: Check syscall number after fetching. + Do not apply the check to SCNO_IN_RANGE syscalls. + Do not set TCB_INSYSCALL flag. + Extend diagnostics and move it to debug level. + +2015-03-24 Dmitry V. Levin + + mips: fix pipe syscall decoding. + * linux/mips/arch_getrval2.c: New file. + * Makefile.am (EXTRA_DIST): Add it. + * defs.h [MIPS] (HAVE_GETRVAL2): Define. + +2015-03-23 Dmitry V. Levin + + sigreturn.c: split arch specific code into separate arch files. + Split code that use arch-specific registers to separate arch files. + + * sigreturn.c (sys_sigreturn): Move arch-specific code + to linux/*/arch_sigreturn.c, include "arch_sigreturn.c". + * linux/arch_sigreturn.c: New file. + * Makefile.am (EXTRA_DIST): Add linux/arch_sigreturn.c + and linux/*/arch_sigreturn.c files. + +2015-03-23 Dmitry V. Levin + + syscall.c: split arch specific code into separate arch files. + Split code that use arch-specific registers to separate arch files. + + * syscall.c: Move definitions of variables containing fetched registers + to linux/*/arch_regs.c files. + [HAVE_GETRVAL2] (getrval2): Move arch-specific code + to linux/*/arch_getrval2.c, include "arch_getrval2.c". + (print_pc): Move arch-specific code to linux/*/print_pc.c files, + include "print_pc.c". + [X86_64] (x86_64_getregs_old): Rename to getregs_old, move to + linux/x86_64/getregs_old.c, include "getregs_old.c". + [POWERPC] (powerpc_getregs_old): Rename to getregs_old, move to + linux/powerpc/getregs_old.c, include "getregs_old.c". + (get_regs) [X86_64, POWERPC]: Update callers. + (get_scno): Move arch-specific code to linux/*/get_scno.c, + include "get_scno.c". + (get_syscall_args): Move arch-specific code + to linux/*/get_syscall_args.c, include "get_syscall_args.c". + (get_error): Move arch-specific code to linux/*/get_error.c, + include "get_error.c". + (get_syscall_result): Move arch-specific code + to linux/*/get_syscall_result.c, include "get_syscall_result.c". + * Makefile.am (EXTRA_DIST): Add new linux/*/*.c files. + +2015-03-23 Dmitry V. Levin + + syscall.c: prepare for the split. + Move functions that use arch-specific registers to the end of file. + +2015-03-23 Dmitry V. Levin + + Move get_regs error check from trace_syscall_entering to get_scno. + Starting with commit v4.10-25-g8497b62, get_scno() can be called outside + trace_syscall_entering(), so move the get_regs_error check from + trace_syscall_entering() to get_scno(). + + * syscall.c (trace_syscall_entering): Move get_regs_error check ... + (get_scno): ... here. + +2015-03-23 Dmitry V. Levin + + alpha, ia64, sh, sparc, sparc64: fix pipe and pipe2 syscalls decoding. + Fix pipe syscall decoding on alpha. + Fix pipe2 syscall decoding on ia64, sh, sparc, and sparc64. + + * configure.ac (AC_CHECK_FUNCS): Add pipe2. + * defs.h [ALPHA || IA64 || SH || SPARC || SPARC64] (HAVE_GETRVAL2): + Define. + * net.c (do_pipe): Check HAVE_GETRVAL2 instead of architecture macros. + Do not use getrval2 for pipe2 decoding. + Print address if umove call fails. + * syscall.c (getrval2): Check HAVE_GETRVAL2 instead of architecture + macros. Implement for [ALPHA]. + * tests/pipe.c: New file. + * tests/pipe.expected: New file. + * tests/pipe.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add pipe. + (TESTS): Add pipe.test. + (EXTRA_DIST): Add pipe.expected. + * tests/.gitignore: Add pipe. + +2015-03-22 Dmitry V. Levin + + decode_socket_subcall: fetch all arguments with a single umoven call. + * syscall.c (decode_socket_subcall): Replace umoven fetch loop + with a single umoven call. + +2015-03-21 Denys Vlasenko + + New test: test/many_looping_threads.c. + + test/.gitignore: add missing test targets. + + Trivial optimization in sys_sigreturn() + + Change last parameter of umoven() from char* to void* + Saves tons of casts. + + Remove unused struct tcb::inst field. + It is unused since we dropped support for kernels without PTRACE_SETOPTIONS. + + test/Makefile: add missing test targets. + + Move the comment about termination logic where it belongs. + + startup_tcb() never fails, remove code which checks for failures. + +2015-03-21 Denys Vlasenko + + Show the syscall name in "resuming interrupted call" message. + When signal is received, or if we have attached to a process, + current syscall (if process is in one) gets restarted. + + Some syscalls are restarted via "restart_syscall()" mechanism. + On such sycalls, we don't show _which_ syscall gets restarted. + + IOW: users want to see "resuming interrupted nanosleep" + instead of "resuming interrupted call" when they attach to "sleep 999". + + Kernel does expose this information. The only thing we need is + to fetch syscall# on attach, and save it. + + This patch does this. It adds tcp->s_prev_ent, which is + a pointer to struct_sysent of the previous syscall of this tracee. + It can be NULL. + + sys_restart_syscall() is made to use it when the message is generated. + + To similarly handle restart_syscall() *after signals*, not just + on attach, on each syscall exit patch saves exited syscall's data + in the same member (tcp->s_prev_ent). + + Example: + + $ sleep 3 & strace -p $! + Process 8728 attached + restart_syscall(<... resuming interrupted nanosleep ...>) = 0 + _exit(0) = ? + +++ exited with 0 +++ + +2015-03-20 Dmitry V. Levin + + tests: add a test for mmap/mprotect/munmap decoding. + * tests/mmap.c: New file. + * tests/mmap64.c: New file. + * tests/mmap.test: New test. + * tests/mmap64.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add mmap and mmap64. + (mmap64_CFLAGS): Define. + (TESTS): Add mmap.test and mmap64.test. + * tests/.gitignore: Add mmap and mmap64. + + sparc, sparc64: fix decoding of mmap2. + * linux/sparc/syscallent.h (mmap2): Decode with sys_mmap_4koff, + not sys_mmap. + * linux/sparc64/syscallent2.h (mmap2): Decode with sys_mmap_pgoff, + not sys_mmap. + +2015-03-19 Dmitry V. Levin + + tests: add a test for SECCOMP_MODE_FILTER decoding. + * tests/seccomp.c: New file. + * tests/seccomp.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add seccomp. + (TESTS): Add seccomp.test. + * tests/.gitignore: Add seccomp. + +2015-03-18 Dmitry V. Levin + + tests: factor out common awk code. + Factor out awk code used in several tests to match.awk. + + * tests/match.awk: New file. + * tests/Makefile.am (EXTRA_DIST): Add it. + * tests/caps.awk: Use it. + * tests/getdents.awk: Likewise. + * tests/getrandom.awk: Likewise. + * tests/select.awk: Likewise. + * tests/sigaction.awk: Likewise. + * tests/init.sh (match_awk): Use gawk not awk. Define AWKPATH. + * tests/getdents.test: Likewise. + +2015-03-18 Dmitry V. Levin + + tests: skip netlink based tests when resources are not available. + * tests/netlink_inet_diag.c (main): Return 77 if socket, bind, + or listen syscall fail. + * tests/netlink_unix_diag.c (main): Likewise. + +2015-03-18 Dmitry V. Levin + + aarch64, arm: decode extra padded compat struct statfs64. + According to arch/arm/kernel/sys_oabi-compat.c, + struct statfs64 has extra padding with EABI. + + * statfs.c [AARCH64 || defined ARM] (COMPAT_STATFS64_PADDED_SIZE): + Define. + (do_statfs64_fstatfs64): New function, factored out from sys_statfs64. + [COMPAT_STATFS64_PADDED_SIZE]: Check it in addition to + sizeof(struct compat_statfs64). + (sys_statfs64, sys_fstatfs64): Use do_statfs64_fstatfs64. + + Reported-and-tested-by: Elliott Hughes + +2015-03-18 Dmitry V. Levin + + tests: factor out common shell code to functions. + Factor out shell code used in several tests to common functions. + + * tests/fanotify_mark.expected: New file. + * tests/ioctl.expected: New file. + * tests/net-fd.expected: New file. + * tests/net.expected: New file. + * tests/statfs.expected: New file. + * tests/sun_path.expected: New file. + * tests/uio.expected: New file. + * tests/ipc.sh: New file. + * tests/Makefile.am (EXTRA_DIST): Add them. + * tests/init.sh (dump_log_and_fail_with, run_prog, + run_prog_skip_if_failed, run_strace, run_strace_merge, + match_awk, match_diff, match_grep): New functions. + * tests/*.test: Use them. + +2015-03-18 Elliott Hughes + + Show f_flags field in printstatfs. + printstatfs64 was right, but printstatfs was missing f_flags. + Noticed on aarch64. + + * statfs.c (printstatfs) [_STATFS_F_FLAGS]: Print statfs.f_flags. + +2015-03-16 Dmitry V. Levin + + tests/uid*: use fchown* instead of chown* + Newer architectures have no chown syscall, so use fchown* syscalls + for testing printuid. + + * tests/uid.test: Use fchown instead of chown. + * tests/uid.c: Test __NR_fchown instead of __NR_chown. + (main): Use __NR_fchown instead of __NR_chown. + * tests/uid32.c: Test __NR_fchown32 instead of __NR_chown32. + (main): Use __NR_fchown32 instead of __NR_chown32. + * tests/uid16.c: Test __NR_fchown and __NR_fchown32 instead + of __NR_chown and __NR_chown32. + (main): Use __NR_fchown instead of __NR_chown. + * tests/uid.awk: Update regexp. + +2015-03-16 Dmitry V. Levin + + stat64-v.test: add newfstatat syscall support. + Newer architectures have no stat syscall, so stat() is implemented there + using newfstatat syscall. + + * tests/stat.c (STAT_FNAME): Rename to STAT_PREFIX. Update callers. + [_FILE_OFFSET_BITS == 64] (STAT_PREFIX): Add newfstatat support. + (main) [!NR_stat]: Add newfstatat support. + + Reported-by: Andreas Schwab + +2015-03-16 Andreas Schwab + + aarch64: properly decode generic syscalls. + * linux/aarch64/syscallent1.h: Don't override entries 277 to 1023. + + tests: verify that all patterns match. + * tests/ipc_msg.test: Count matches to verify that all patterns match. + * tests/ipc_sem.test: Likewise. + * tests/ipc_shm.test: Likewise. + * tests/stat32-v.test: Likewise. + * tests/stat64-v.test: Likewise. + +2015-03-16 Dmitry V. Levin + + Fix stat64 st_[acm]time decoding for personalities with 32-bit time_t. + STRUCT_STAT.st_[acm]time are declared as unsigned int for some + personalities, while time_t is signed. + + * printstat.h (DO_PRINTSTAT): If st_[acm]time have the same size as int, + explicitly cast them to int. + * tests/stat64-v.test: Test that negative time_t is decoded properly. + + Reported-by: Andreas Schwab + +2015-03-16 Dmitry V. Levin + + semctl: fix indirect syscall decoding. + On architectures where the semctl call is implemented by the ipc syscall + the 4th argument is passed by reference. + + * ipc.c (sys_semctl): Handle the indirect ipc subcall case. + * tests/ipc_sem.c (main): Optionally match indirection + in the 4th argument of semctl calls. + + Reported-by: Andreas Schwab + +2015-03-16 Andreas Schwab + + tests/ipc_*: match IPC_64 flag. + * tests/ipc_msg.c (main): Optionally match "IPC_64|" in the third + argument of the ipc call. + * tests/ipc_sem.c (main): Likewise. + * tests/ipc_shm.c (main): Likewise. + +2015-03-16 Andreas Schwab + + Fix crash in ipc_sem test. + Properly use union semun as argument of semctl. + + * tests/ipc_sem.c (main): Properly use union semun as argument of + semctl. Don't handle EFAULT specially. + * tests/ipc_sem.test: Revert last change. + +2015-03-16 Andreas Schwab + + m68k: fix sigreturn decoding. + * sigreturn.c (sys_sigreturn) [M68K]: Fetch the words of the + signal mask from the proper place. + + aarch64: fix ioctl decoding. + * linux/aarch64/ioctls_inc0.h: Rename from ioctls_inc1.h. + * linux/aarch64/ioctls_inc1.h: Rename from ioctls_inc0.h. + * linux/aarch64/ioctls_arch0.h: Rename from ioctls_arch1.h. + * linux/aarch64/ioctls_arch1.h: Rename from ioctls_arch0.h. + +2015-03-12 Andreas Schwab + + tests/select.test: handle architectures using pselect6 syscall. + * tests/select.awk (BEGIN): Update regexps to match both select + and pselect6 syscalls. + * tests/select.test: Probe for both select and pselect6 syscall. + + Distribute linux/aarch64/arch_regs.h. + * Makefile.am (EXTRA_DIST): Add linux/aarch64/arch_regs.h. + + Fix decoding of mmap2 for arm. + * syscallent.h (mmap2): Decode with sys_mmap_4koff, not + sys_mmap_pgoff. + +2015-03-12 Andreas Schwab + + m68k: define HAVE_SA_RESTORER. + On m68k the kernel sigaction structure has the sa_restorer member for + historical reasons. + + * signal.c (HAVE_SA_RESTORER): Define for M68K. + +2015-03-11 Dmitry V. Levin + + aarch64: fix rt_sigreturn decoding. + * sigreturn.c (sys_sigreturn) [AARCH64]: Fix personality check. + +2015-03-09 Dmitry V. Levin + + maint: post-release administrivia. + * NEWS: Add header line for next release. + +2015-03-06 Dmitry V. Levin + + Prepare for 4.10 release. + * NEWS: Update for 4.10 release. + * debian/changelog: 4.10-1. + * strace.spec: 4.10-1. + + Move sigreturn/rt_sigreturn parser to a separate file. + * sigreturn.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * defs.h (sprintsigmask_n): New prototype. + (tprintsigmask_addr): New macro. + * signal.c (sprintsigmask_n): Make global. + (tprintsigmask_addr): Remove. + (sys_sigreturn): Move to sigreturn.c. + +2015-03-05 Dmitry V. Levin + + ia64: use PTRACE_GETREGS to fetch registers. + * linux/ia64/arch_regs.h: Stop including . + (ia64_frame_ptr): New declaration. + * signal.c (sys_sigreturn) [IA64]: Use ia64_frame_ptr. + * syscall.c [IA64]: Include . + [IA64] (ia64_regs, ia64_frame_ptr): New variable. + [IA64] (ARCH_REGS_FOR_GETREGS): New macro. + [IA64] (ia64_ia32mode): Convert to macro. + [IA64] (ia64_r8, ia64_r10): Remove. + (getrval2, print_pc, get_scno, get_syscall_args, get_error) [IA64]: + Use ia64_regs. + (get_syscall_result) [IA64]: Remove. + + s390, s390x: use PTRACE_GETREGSET to fetch registers. + * linux/s390/arch_regs.h: New file. + * linux/s390x/arch_regs.h: New file. + * Makefile.am (EXTRA_DIST): Add them. + * signal.c (sys_sigreturn) [S390 || S390X]: Use s390_frame_ptr. + * syscall.c [S390 || S390X] (s390_regset, s390_frame_ptr): New variable. + [S390 || S390X] (ARCH_REGS_FOR_GETREGSET): New macro. + (print_pc) [S390 || S390X]: Use s390_regset. + (get_scno) [S390 || S390X]: Likewise. + (get_syscall_args) [S390 || S390X]: Likewise. + (get_error) [S390 || S390X]: Likewise. + (get_syscall_result) [S390 || S390X]: Remove. + + qemu_multiarch_testing: update. + * qemu_multiarch_testing/README: Update statistics. + +2015-03-05 Dmitry V. Levin + + tests: robustify unix-yy.test. + Implement additional synchronization between parent and child processes + to guarantee that the child starts closing connected socket only after + exiting of the parent's accept() syscall. + This guarantee seems to be necessary to reliably receive UNIX_DIAG_PEER + messages from NETLINK_SOCK_DIAG interface. + + * tests/net-accept-connect.c: Implement additional synchronization + between parent and child processes. + * tests/unix-yy-connect.awk: Update. + +2015-03-05 Dmitry V. Levin + + Use SIGRTMIN from kernel headers. + * configure.ac (ASM_SIGRTMIN): Define to SIGRTMIN from . + * signal.c: Use ASM_SIGRTMIN instead of constants provided by libc. + * tests/sigreturn.c: Use ASM_SIGRTMIN instead of hardcoded value. + Use lower RT_* numbers to support pre-3.18 hppa kernels. + * tests/sigreturn.test: Update regexp. + +2015-03-05 Dmitry V. Levin + + ppc64: fix compilation warning. + Fix compilation warning introduced by commit + 577be2593d4895ef941e1c4e5e1608f7dd13610d + + * signal.c (sys_sigreturn) [POWERPC64]: Fix initialization of signal + mask on 32bit personality. + +2015-03-05 Dmitry V. Levin + + aarch64: fix compilation warnings. + Fix compilation warnings introduced by commit + 5b9b7e1d347eb4556084cdccad75e8247c535ed5: + + signal.c:702:45: warning: signed and unsigned type in conditional expression [-Wsign-compare] + syscall.c:746:34: warning: initialization from incompatible pointer type [enabled by default] + + * syscall.c [AARCH64] (aarch64_sp_ptr): Add explicit cast. + [AARCH64] (arm_sp_ptr): Change pointer type to unsigned. + * linux/aarch64/arch_regs.h (arm_sp_ptr): Update. + + Reported-by: Mike Frysinger + +2015-03-05 Dmitry V. Levin + + i386: simplify sigreturn decoding. + * signal.c (sys_sigreturn) [X86_64 || X32 || I386]: Do not define + i386_sigcontext_struct and i386_fpstate structures. + +2015-03-05 Dmitry V. Levin + + tests: add a test for sigreturn/rt_sigreturn decoding. + Convert test/sigreturn.c into a regular test. + + * test/Makefile (PROGS): Remove sigreturn. + * test/.gitignore: Likewise. + * test/sigreturn.c: Rewrite to ... + * tests/sigreturn.c: ... new file. + * tests/sigreturn.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add sigreturn. + (TESTS): Add sigreturn.test. + * tests/.gitignore: Add sigreturn. + +2015-03-04 Dmitry V. Levin + + sigreturn: print signal mask as a syscall argument. + Although sigreturn takes signal mask via frame pointer, + it's more convenient to display signal mask as a syscall argument + rather than an outstanding object of unknown nature: + + Before this change: + sigreturn() (mask [USR2 CHLD RT_2 RT_3 RT_4 RT_31 RT_32]) = 0 + + After this change: + sigreturn({mask=[USR2 CHLD RT_2 RT_3 RT_4 RT_31 RT_32]}) = 0 + + * signal.c (sys_sigreturn): Display signal mask as a syscall argument. + +2015-03-04 Dmitry V. Levin + + aarch64: implement rt_sigreturn decoding. + * linux/64/syscallent.h (139): Use sys_sigreturn for rt_sigreturn + decoding. + * syscall.c [ARM] (arm_regs): Make static. + [ARM] (arm_sp_ptr): New variable. + [AARCH64] (aarch64_sp_ptr, arm_sp_ptr): New variables. + * linux/aarch64/arch_regs.h: New file. + * linux/arm/arch_regs.h (arm_regs): Remove. + (arm_sp_ptr): New declaration. + * signal.c (sys_sigreturn) [ARM]: Use arm_sp_ptr. + [AARCH64]: Print signal mask. + + arm: simplify sigreturn decoding. + * signal.c (sys_sigreturn) [ARM]: Do not define sigcontext and ucontext + structures, fetch signal mask only, use print_sigset_addr_len. + + s390: fix sigreturn decoding. + * signal.c (sys_sigreturn) [S390]: Fix signal mask decoding. + + mips o32: fix sigreturn decoding. + * signal.c (sys_sigreturn) [LINUX_MIPSO32]: Fix the address of signal mask. + [MIPS] Use print_sigset_addr_len to print signal mask. + + x86_64, x32: implement rt_sigreturn decoding. + * syscall.c [X86_64 || X32] (x86_64_rsp_ptr): New variable. + * linux/x86_64/arch_regs.h (x86_64_rsp_ptr): New declaration. + * linux/x86_64/syscallent.h (15): Use sys_sigreturn for rt_sigreturn + decoding. + * linux/x32/syscallent.h (513): Likewise. + * signal.c (sys_sigreturn) [X86_64 || X32]: Print signal mask + for non-i386 personalities. + + sparc, sparc64: fix sigreturn decoding. + * linux/sparc/arch_regs.h (U_REG_FP): New macro. + * signal.c (sys_sigreturn) [SPARC || SPARC64]: Fix decoding + of upper 32 bits of the sigmask. + + ppc, ppc64: fix sigreturn decoding. + * signal.c (sys_sigreturn) [POWERPC]: Fix decoding of upper 32 bits + of the sigmask. + + sigreturn: issue a less innocuous warning. + * signal.c (sys_sigreturn): Issue a less innocuous warning on + architectures for which signal mask decoding is not implemented yet. + +2015-03-04 Dmitry V. Levin + + bootstrap: do not link Makefile* files. + * bootstrap: Do not symlink any Makefile* files, not just Makefile.am + and Makefile.in. + + Reported-by: Christopher Covington + +2015-03-04 Dmitry V. Levin + + ia64: fix sigreturn decoding. + * signal.c (sys_sigreturn) [IA64]: Fix the address of signal mask. + Use print_sigset_addr_len to print signal mask. + +2015-03-04 Dmitry V. Levin + + ia64: use generic signalent. + This complements commit v4.9-321-gfcf7f8d. + + * linux/ia64/signalent.h: Remove. + * Makefile.am (EXTRA_DIST): Remove it. + +2015-03-04 Giedrius Statkevičius + + Document that -k is available only with libunwind. + Without this users might get confused why `man strace` describes + an option that doesn't work. + + * strace.1: Note that -k is available only if strace is built + with libunwind. + +2015-03-03 Dmitry V. Levin + + debian: update control file. + * debian/control (strace, strace-udeb): Add mips64 and mips64el + to architecture list. + Patch by James Cowgill + + This fixes Debian bug #773375. + +2015-03-03 Dmitry V. Levin + + debian: sync with 4.9-2 package. + * debian/changelog: Sync with 4.9-2. + * debian/control: Likewise. + +2015-03-03 Dmitry V. Levin + + Add arch-specific PTRACE_* constants. + * xlat/ptrace_cmds.in: Add arch-specific ptrace commands. + * xlat/ptrace_events.in: Add PTRACE_EVENT_MIGRATE for tile. + * xlat/ptrace_setoptions_flags.in: Add PTRACE_O_TRACEMIGRATE for tile. + + This fixes Debian bug #734554. + +2015-03-03 Mike Frysinger + + Clarify bootstrap-vs-autoreconf usage. + * README-hacking: Tell people to run ./bootstrap. + +2015-03-03 Dmitry V. Levin + + mips n32: fix preadv/pwritev offset decoding. + In mips n32 abi, like in most of 32-bit architectures, offset + is passed to preadv/pwritev syscalls using two syscall arguments. + + * io.c (print_llu_from_low_high_val) [LINUX_MIPSN32]: Remove. + +2015-03-03 Mike Frysinger + + tests: skip ipc_sem.test on broken kernels. + Rather than trigger an ERROR which fails `make check`, go with SKIP + instead. We don't want the testsuite failing due to kernel bugs. + + * tests/ipc_sem.c (main): Change 99 to 77. + +2015-03-03 Mike Frysinger + + tests: skip pc.test on s390. + The s390 hardware can't support an exact si_addr, and the current kernels + don't handle text addresses correctly at all. Until that improves, skip + the test on s390. + + * tests/pc.c (main): Return 77 on s390 systems. + +2015-03-03 Mike Frysinger + + tests: note the kernel configs for -yy options. + * tests/net-yy.test: Note CONFIG_INET_TCP_DIAG. + * tests/unix-yy.test: Note CONFIG_UNIX_DIAG. + +2015-03-02 Dmitry V. Levin + + alpha: fix -yy decoding. + * socketutils.c (receive_responses): Align buffer on a sizeof(long) boundary. + + Reported-and-tested-by: Mike Frysinger + +2015-03-02 Dmitry V. Levin + + aarch64, x32: fix decoding of compat personality statfs64/fstatfs64. + * statfs.c (struct compat_statfs64) [AARCH64 || X32]: Apply the same + attributes as on X86_64. + + mips: fix compilation warning. + * syscall.c (get_scno) [MIPS]: Fix harmless compilation warning + about comparison between signed and unsigned integer expressions. + + x32: fix compilation warnings. + * sysinfo.c (sys_sysinfo): Use ll length format modifier + instead of l and cast kernel ulong types to unsigned long long. + + aarch64: add -i option support. + * syscall.c (print_pc): Add aarch64 support. + +2015-03-02 Dmitry V. Levin + + ioctl: use x32 specific ioctl entries on x32 personality. + As ioctls_inc.h generated natively on x32 differs both from 32/ioctls_inc.h + (by 45 entries) and from linux/64/ioctls_inc.h (by 322 entries), use x32 + specific ioctl entries on x32 personality. + + * linux/x32/ioctls_inc0.h: Generate from linux v3.19 using ioctls_gen.sh. + * linux/x86_64/ioctlent2.h: Remove. + * linux/x86_64/ioctls_arch2.h: New file. + * linux/x86_64/ioctls_inc2.h: New file. + * Makefile.am (EXTRA_DIST): Remove linux/x86_64/ioctlent2.h, add + linux/x86_64/ioctls_arch2.h and linux/x86_64/ioctls_inc2.h. + +2015-03-02 Dmitry V. Levin + + tests/uid16: skip if real uid is larger than 16bit. + * tests/uid16.c (main): Skip if the uid returned by getuid matches + /proc/sys/kernel/overflowuid. + +2015-03-02 Dmitry V. Levin + + tests: fix uid tests on big endian architectures. + * tests/uid.c (main): Ignore uids returned by getresuid to avoid + 16bit vs 32bit issues on big endian architectures. + Change real UID instead of effective UID in setresuid test. + * tests/uid16.c (main): Likewise. + * tests/uid32.c (main): Change real UID instead of effective UID + in setresuid test to match uid.c + * tests/uid.awk: Update setresuid regexp. + + Reported-by: Mike Frysinger + +2015-03-01 Mike Frysinger + + tests/getdents: handle older getdents calls. + If the tools we use call older getdents syscalls where d_type isn't + passed back, or the arch is old (like Alpha) and can't pass back in + either version, make sure we don't fail. + + * tests/getdents.awk (d_type_dir, d_type_reg): Accept DT_UNKNOWN. + +2015-02-28 Dmitry V. Levin + + Fix multiple personalities support in decoding syscall return values. + * syscall.c (trace_syscall_exiting): When current personality is 32bit, + print 32bit return code. + + Update generic 64-bit ioctlent from linux v3.19. + * linux/64/ioctls_inc.h: Update from linux v3.19 using ioctls_gen.sh. + +2015-02-28 Dmitry V. Levin + + sparc, sparc64: fix rt_sigaction decoding. + Fix regression introduced by commit v4.9-9-gc3a5c01. + + * signal.c (HAVE_SA_RESTORER): New macro. + [HPPA || IA64]: Do not undefine SA_RESTORER. + (old_sigaction, old_sigaction32, new_sigaction): Use HAVE_SA_RESTORER + instead of SA_RESTORER to check whether to define sa_restorer. + (decode_old_sigaction, decode_new_sigaction): Use HAVE_SA_RESTORER in + addition to SA_RESTORER to check whether to use sa_restorer. + +2015-02-28 Dmitry V. Levin + + Fix stack buffer overflow when specified command is too long. + * strace.c (startup_child): Check that the length of the command strace + is going to execute does not exceed PATH_MAX limit. + + Reported-by: Cheolung Lee + +2015-02-28 Dmitry V. Levin + + build: include ptrace.h after regs.h. + Restore the order of including and + headers that was inadvertently changed by commit v4.9-280-g5503dd2. + + This should fix build on platforms like m68k where some constants + are defined simultaneously as enums by and as macros + by . + + * process.c: Include "ptrace.h" after "regs.h". + * signal.c: Likewise. + * syscall.c: Likewise. + * util.c: Likewise. + +2015-02-28 Dmitry V. Levin + + x32: fix decoding of timeval, timespec, and timex structures. + As time_t is a 64-bit type in x32 personality, it is not correct to + treat it as a long int type. + + * time.c (current_time_t_is_compat): New macro. + (sprinttv, sprint_timespec, printitv_bitness, tprint_timex): Use it. + (tprint_timeval, do_sprinttv, sprint_timespec): Use j and uintmax_t + when printing tv_sec/tv_usec. + (tprint_timex): Use j and intmax_t/uintmax_t when printing struct timex + members of type kernel_long_t. + +2015-02-28 Mike Frysinger + + tests/ipc_sem: detect broken kernels. + When running 32bit ipc tests on ppc/sparc with a 64bit kernel, the ipc + logic wrongly returns errors. Detect that and throw an error. + + * tests/ipc_sem.c: Return 99 when errno is EFAULT. + * tests/ipc_sem.test: Save output to $OUT and show it when failing. + Handle exit status 99 to throw an ERROR. + +2015-02-27 Dmitry V. Levin + + build: do not link strace with -ldl. + * configure.ac: Fix dladdr check. + +2015-02-27 Mike Frysinger + + Handle broken PTRACE_EVENT_STOP values. + For a few linux releases (3.1 through 3.3), this define in the exported + headers were broken. Redefine if that's the case. + + * ptrace.h [PTRACE_EVENT_STOP]: Redefine if PTRACE_EVENT_STOP is 7. + +2015-02-27 Mike Frysinger + + bootstrap: always set up test dirs. + When files get updated, the bootstrap script should make sure the + parallel dirs are kept in sync. + + * bootstrap: Always generate the test$m. Clean up symlinks first. + Don't link in Makefile.in files. + +2015-02-27 Mike Frysinger + + Fix cross-compiling of ioctlsort. + Use the AX_PROG_CC_FOR_BUILD helper to set up build settings when cross + compiling. This way ioctlsort uses the build tools all the time. + + * configure.ac: Call AX_PROG_CC_FOR_BUILD. + * Makefile.am (ioctlsort_CC): Set to CC_FOR_BUILD. + (ioctlsort_CPPFLAGS): Change CPPFLAGS to CPPFLAGS_FOR_BUILD. + (ioctlsort_CFLAGS): Change CFLAGS to CFLAGS_FOR_BUILD. + (ioctlsort_LDFLAGS): Change LDFLAGS to LDFLAGS_FOR_BUILD. + (ioctlsort_LD): Delete. + (ioctlsort%): Change to ioctlsort%$(BUILD_EXEEXT). Use ioctlsort_CFLAGS. + * m4/ax_prog_cc_for_build.m4: Import from the autoconf-archive package. + +2015-02-27 Dmitry V. Levin + + tests: robustify pc.test. + * configure.ac: Check for dladdr in -ldl. + * tests/Makefile.am (pc_LDADD): Adde $(dl_LIBS). + * tests/pc.c: Include "config.h" and . + (main): Use dladdr to find the address to unmap. + +2015-02-27 Dmitry V. Levin + + tests: drop support for alternative names of select syscall. + This mostly reverts commit 4a00fc4867bde7a4c333f238851e5cb03f02c824. + + * tests/select.awk: Drop _newselect support. + * tests/select.test: Skip if select syscall is not supported. + +2015-02-27 Dmitry V. Levin + + Rename _newselect to select. + As an exception to the general rules that syscall names should match + __NR_* constants defined in kernel headers, show select as "select" + and old select as "oldselect". + + * linux/arm/syscallent.h (82): Change name to oldselect. + * linux/hppa/syscallent.h (142): Change name to select. + * linux/mips/syscallent-n32.h (6022): Likewise. + * linux/mips/syscallent-n64.h (5022): Likewise. + * linux/mips/syscallent-o32.h (4142): Likewise. + * linux/sparc/syscallent.h (230): Likewise. + +2015-02-27 Dmitry V. Levin + + sparc: sync syscall entries with kernel headers. + * linux/sparc/syscallent.h: Fix syscall entries for vmsplice, + inotify_init, inotify_add_watch, inotify_rm_watch, inotify_rm_watch, + ioprio_set, ioprio_get, splice, sync_file_range, sched_getaffinity, and + sched_setaffinity. + (67, 68, 202, 230): Change syscall names to match __NR_* constants + defined in arch/sparc/include/uapi/asm/unistd.h. + +2015-02-26 Dmitry V. Levin + + s390, s390x: sync syscall entry names with kernel headers. + * linux/s390/syscallent.h (1, 180, 181): Change syscall names to match + __NR_* constants defined in arch/s390/include/uapi/asm/unistd.h. + * linux/s390x/syscallent.h: Likewise. + +2015-02-26 Mike Frysinger + + xlat: avoid fork bombing the build system. + When there were fewer xlat headers, this didn't matter as much. + But now with >200, trying to run them all in parallel can easily + fork bomb smaller systems. + + * xlat/gen.sh (main): Do not more jobs than # of cpus. + +2015-02-26 Dmitry V. Levin + + arm: sync syscall entry names with kernel. + * linux/arm/syscallent.h (82, 90, 180, 181, 327): + Change syscall names to match __NR_* constants defined + in arch/arm/include/uapi/asm/unistd.h. + + arm: fix get_mempolicy, set_mempolicy, and timerfd_create syscall entries + * linux/arm/syscallent.h (320, 321, 350): Fix names and handlers. + + hppa: sync syscall entry names with kernel. + * linux/hppa/syscallent.h (18, 28, 59, 84, 108, 109, 280): + Change syscall names to match __NR_* constants defined in + arch/parisc/include/uapi/asm/unistd.h. + + subcall.h: add sendmmsg entry. + * linux/subcall.h: Add sys_sendmmsg entry. + (SYS_socket_nsubcalls): Update. + + arm: simplify ARM_FIRST_SHUFFLED_SYSCALL definition. + * linux/arm/syscallent.h (ARM_FIRST_SHUFFLED_SYSCALL): Use SYS_ipc_subcall. + + ia64: parametrize i386 syscallent size check. + * linux/ia64/syscallent.h: Use (SYS_ipc_subcall + SYS_ipc_nsubcalls) + instead of numeric constant. + + Cleanup linux/subcall.h. + * linux/subcall.h: Use SYS_ipc_subcall. + + alpha: fix statfs decoding. + * statfs.c (printstatfs) [ALPHA]: Remove faulty code. + + x32: fix build regression. + * linux/x32/arch_regs.h: New file. + * Makefile.am (EXTRA_DIST): Add it. + +2015-02-26 Mike Frysinger + + hppa: fix fanotify_mark decoding. + The parisc kernel has some legacy baggage here and decodes the 64bit + field in the reverse order. Handle it in strace too. + + * fanotify.c [HPPA] (sys_fanotify_mark): Reverse the mask bits. + +2015-02-26 Mike Frysinger + + ia64: fix decoding of getresuid/getresgid/setresgid. + Looks like the similarity of these names caused confusion when generating + the syscall table. getresgid was wired to the wrong output while the other + two were wired up to printargs instead of the real printer. + + * linux/ia64/syscallent.h: Connect getresuid to sys_getresuid, getresgid to + sys_getresgid, and setresgid to sys_setresgid. + +2015-02-26 Mike Frysinger + + ia64: fix up builds after 16bit uid support. + The ia64 port pulls in the i386 syscall table so it can decode + 32bit apps, so we need to enable the 16bit uid parsers for it. + + * defs.h (NEED_UID16_PARSERS): Define to 1 for IA64. + * linux/ia64/syscallent.h: Undefine sys_stime to avoid redefine warnings. + +2015-02-26 Mike Frysinger + + v4l2: use uintmax_t for times. + There is no guarantee that the backing value for the various time fields + are ints or longs which makes printfs annoying. Lets cast them to the + uintmax_t type so we can use the j flag and not worry about truncation. + + * v4l2.c (v4l2_ioctl): Use j and uintmax_t when printing tv_sec/tv_usec. + +2015-02-26 Mike Frysinger + + ignore core/compile files. + Newer autotools includes a compile helper script. + + * .gitignore: Add /compile and core. + +2015-02-24 Dmitry V. Levin + + NEWS: Prepare for 4.10 release. + +2015-02-24 Dmitry V. Levin + + Remove support for systems without PTRACE_SETOPTIONS. + Assume that the kernel is v2.5.46 or newer, i.e. PTRACE_SETOPTIONS + and PTRACE_O_TRACESYSGOOD|PTRACE_O_TRACEEXEC|PTRACE_O_TRACECLONE + are universally available. + + This change removes all code that implemented post-execve SIGTRAP + handling and fork/vfork/clone->CLONE_PTRACE substitution. + + * defs.h (TCB_BPTSET, TCB_WAITEXECVE): Remove macros. + (need_fork_exec_workarounds, setbpt, clearbpt): Remove declarations. + * strace.c (need_fork_exec_workarounds, + test_ptrace_setoptions_followfork, test_ptrace_setoptions_for_all): + Remove. + (syscall_trap_sig): Set to (SIGTRAP | 0x80). + (ptrace_setoptions): Set to (PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXEC). + (detach): Do not test for TCB_BPTSET. + (init): Do not call test_ptrace_setoptions_followfork and + test_ptrace_setoptions_for_all. Do not test for TCB_BPTSET. + * syscall.c (syscall_fixup_on_sysenter, internal_fork, internal_exec, + syscall_fixup_for_fork_exec, syscall_fixup_on_sysexit): Remove. + (trace_syscall_entering): Do not test for TCB_WAITEXECVE. Do not call + syscall_fixup_on_sysenter and syscall_fixup_for_fork_exec. + (trace_syscall_exiting): Do not call syscall_fixup_on_sysexit and + syscall_fixup_for_fork_exec. + [IA64] (ia64_ia32mode): Make static. + * linux/ia64/arch_regs.h (ia64_ia32mode): Remove declaration. + * util.c: Do not include "syscall.h". + (arg_setup, get_arg0, get_arg1, set_arg0, set_arg1, restore_arg0, + restore_arg1, arg_finish_change, change_syscall, setbpt, clearbpt): + Remove. + * tests/ptrace_setoptions.test: Remove. + * tests/Makefile.am (TESTS): Remove it. + +2015-02-24 Dmitry V. Levin + + tests: robustify pc.test. + * tests/pc.c (main): Unmap larger memory region. + Dump process map for debug purposes. + * tests/pc.test: Update regexps to take CLD_DUMPED child process + into account. + +2015-02-23 Dmitry V. Levin + + tests: fix "make dist" regression. + * tests/Makefile.am (EXTRA_DIST): Add getrandom.awk. + + tests: workaround broken awk. + * tests/getdents.out: New file. + * tests/Makefile.am (EXTRA_DIST): Add it. + * tests/getdents.test: Check whether awk is capable of matching long + regular expressions. + +2015-02-23 Dmitry V. Levin + + Fix compilation warnings about incompatible print formats. + On some platforms printing of __s64 types with "%lld" format, + or __u64 types with "%llu" or "%llx" formats causes a warning + that __s64/__u64 type is not compatible with long long format. + From my PoV, this is nonsense, but the workaround costs nothing. + + * scsi.c (print_sg_io_v4_req, print_sg_io_v4_res): Cast __u64 types + to (unsigned long long). + * v4l2.c (v4l2_ioctl): Likewise. Cast __s64 type to (long long). + +2015-02-23 Dmitry V. Levin + + powerpc64: fix build regression. + * linux/powerpc64/arch_regs.h: New file. + * Makefile.am (EXTRA_DIST): Add it. + + signalent: update from linux v3.19. + * linux/alpha/signalent.h: Update from linux v3.19 signalent.sh. + * linux/hppa/signalent.h: Likewise. + * linux/mips/signalent.h: Likewise. + * linux/sparc/signalent.h: Likewise. + + Cleanup auxiliary signalent files. + * linux/aarch64/signalent1.h: Include "signalent.h". + * linux/powerpc64/signalent1.h: Likewise. + * linux/sparc64/signalent2.h: Likewise. + * linux/tile/signalent1.h: Likewise. + * linux/x32/signalent1.h: Likewise. + * linux/x86_64/signalent1.h: Likewise. + * linux/x86_64/signalent2.h: Likewise. + * linux/sparc64/signalent.h: Include "sparc/signalent.h". + * linux/sparc64/signalent1.h: Include "sparc/signalent1.h". + * linux/x32/signalent.h: Remove. + * Makefile.am (EXTRA_DIST): Remove linux/x32/signalent.h. + +2015-02-23 Dmitry V. Levin + + x86_64, x32: fix sys_sigreturn. + On x86_64/x32, sys_sigreturn is defined only for i386 personality. + + * signal.c (sys_sigreturn): Define for X32. + (sys_sigreturn) [X86_64 || X32]: Implement for i386 personality only. + +2015-02-23 Dmitry V. Levin + + sparc, x32: fix build regression. + * syscall.c (print_pc): Use current_wordsize iff it is defined. + + Change errnoent.h files to use designated initializers. + * signal.c (printsiginfo): Allow elements of errnoent array to be zero. + * syscall.c (trace_syscall_exiting): Likewise. + * errnoent.sh: Output designated initializers. + * linux/errnoent.h: Regenerated. + * linux/alpha/errnoent.h: Regenerated. + * linux/hppa/errnoent.h: Regenerated. + * linux/mips/errnoent.h: Regenerated. + * linux/sparc/errnoent.h: Regenerated. + * linux/sparc/errnoent1.h: Regenerated. + * linux/powerpc/errnoent.h: New file. + * linux/powerpc64/errnoent.h: Include "powerpc/errnoent.h". + * Makefile.am (EXTRA_DIST): Add linux/powerpc/errnoent.h + and linux/powerpc64/errnoent.h. + + errnoent: update from linux v3.19. + * linux/errnoent.h: Update from linux v3.19 using errnoent.sh. + * linux/alpha/errnoent.h: Likewise. + * linux/hppa/errnoent.h: Likewise. + * linux/mips/errnoent.h: Likewise. + * linux/sparc/errnoent.h: Likewise. + + Cleanup auxiliary errnoent files. + * linux/aarch64/errnoent1.h: Include "errnoent.h". + * linux/powerpc64/errnoent1.h: Likewise. + * linux/sparc64/errnoent2.h: Likewise. + * linux/tile/errnoent1.h: Likewise. + * linux/x32/errnoent1.h: Likewise. + * linux/x86_64/errnoent1.h: Likewise. + * linux/x86_64/errnoent2.h: Likewise. + * linux/sparc64/errnoent.h: Include "sparc/errnoent.h". + * linux/sparc64/errnoent1.h: Include "sparc/errnoent1.h". + * linux/x32/errnoent.h: Remove. + * Makefile.am (EXTRA_DIST): Remove linux/x32/errnoent.h. + +2015-02-22 Dmitry V. Levin + + evdev: update constants from linux v3.19. + * xlat/evdev_keycode.in: Update from linux v3.19. + * xlat/evdev_prop.in: Likewise. + + evdev: decode keycode value in EVIOC[GS]KEYCODE_V2 commands. + * evdev.c (keycode_V2_ioctl): Use evdev_keycode to print + input_keymap_entry.keycode. + + evdev: fix build with old kernel headers. + * configure.ac: Check whether struct input_absinfo.resolution is defined + in . + * evdev.c (SYN_MAX): Add fallback definition. + (abs_ioctl): Wrap use of struct input_absinfo.resolution in #ifdef check. + (keycode_V2_ioctl, mtslots_ioctl, repeat_ioctl): Wrap in #ifdef checks. + (evdev_read_ioctl): Wrap in #ifdef checks the code that uses EV_SW, + EVIOCGREP, EVIOCGKEYCODE_V2, EVIOCGMTSLOTS, EVIOCGPROP, and EVIOCGSW. + (evdev_write_ioctl): Wrap in #ifdef checks the code that uses EVIOCSREP, + EVIOCSKEYCODE_V2, EVIOCSCLOCKID, and EVIOCREVOKE. + +2015-02-22 Etienne Gemsa + + Add decoding for evdev ioctls. + This patch introduces decoding for evdev ioctls. For EVIOCSFF the five + first members are decoded, the union is not. The code was compiled and + tested on x86_64 with Linux 3.13. + + * evdev.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * defs.h (evdev_ioctl): New prototype. + * ioctl.c (ioctl_decode): Call evdev_ioctl for 'E' ioctl commands. + * xlat/evdev_autorepeat.in: New file. + * xlat/evdev_ff_status.in: New file. + * xlat/evdev_ff_types.in: New file. + * xlat/evdev_keycode.in: New file. + * xlat/evdev_leds.in: New file. + * xlat/evdev_misc.in: New file. + * xlat/evdev_mtslots.in: New file. + * xlat/evdev_prop.in: New file. + * xlat/evdev_relative_axes.in: New file. + * xlat/evdev_snd.in: New file. + * xlat/evdev_switch.in: New file. + * xlat/evdev_sync.in: New file. + +2015-02-22 Dmitry V. Levin + + Fix build with old kernel headers. + * strace.c (print_debug_info, maybe_allocate_tcb, print_signalled, + print_exited): Remove "const" qualifier from status variable to + workaround some old implementations of WIFSIGNALED/WIFSTOPPED/WIFEXITED + macros. + * v4l2.c: Include . + (v4l2_ioctl): Check that V4L2_CTRL_FLAG_NEXT_CTRL and VIDIOC_S_EXT_CTRLS + macros are defined. + * tests/Makefile.am (AM_CPPFLAGS): Define. + + Fix "make dist" regression. + * Makefile.am (EXTRA_DIST): Remove README-linux. + +2015-02-20 Elliott Hughes + + test/sfd.c: add missing includes. + +2015-02-19 Dmitry V. Levin + + Remove linux/fanotify.h. + * linux/fanotify.h: Remove. + * Makefile.am (EXTRA_DIST): Remove it. + * fanotify.c: Do not include . + * xlat/fan_classes.in: Add default values. + * xlat/fan_event_flags.in: Likewise. + * xlat/fan_init_flags.in: Likewise. + * xlat/fan_mark_flags.in: Likewise. + + Remove linux/keyctl.h. + * linux/keyctl.h: Remove. + * Makefile.am (EXTRA_DIST): Remove it. + * keyctl.c: Do not include . + * xlat/key_perms.in: Add default values. + * xlat/key_reqkeys.in: Likewise. + * xlat/key_spec.in: Likewise. + * xlat/keyctl_commands.in: Likewise. + + Remove linux/kexec.h. + * linux/kexec.h: Remove. + * Makefile.am (EXTRA_DIST): Remove it. + * kexec.c: Do not include . + * xlat/kexec_arch_values.in: Add default values. + * xlat/kexec_flags.in: Rename to kexec_load_flags.in, add default + values. + + Remove linux/inotify.h. + * linux/inotify.h: Remove. + * Makefile.am (EXTRA_DIST): Remove it. + * inotify.c: Do not include . + * xlat/inotify_flags.in: Add default values. + + Remove linux/reboot.h. + * linux/reboot.h: Remove. + * Makefile.am (EXTRA_DIST): Remove it. + * reboot.c: Do not include . + * xlat/bootflags1.in: Add default values. + * xlat/bootflags2.in: Likewise. + * xlat/bootflags3.in: Likewise. + + seccomp: fix fallback definitions of some SECCOMP_* constants. + * seccomp.c (SECCOMP_SET_MODE_STRICT, SECCOMP_SET_MODE_FILTER, + SECCOMP_FILTER_FLAG_TSYNC): Remove fallback definitions. + * xlat/seccomp_filter_flags.in: Add default value. + * xlat/seccomp_ops.in: Add default values. + +2015-02-19 Dmitry V. Levin + + is_negated_errno: sync MAX_ERRNO with the kernel. + Linux kernel used to guarantee that the largest errno value will not + exceed 4095, but SECCOMP_RET_ERRNO support introduced by kernel commit + v3.4-rc2-13-gacf3b2c71ed20c53dc69826683417703c2a88059 inadvertently + broke it. The guarantee is back with kernel commit + v3.19-8275-g580c57f1076872ebc2427f898b927944ce170f2d. + + * syscall.c (is_negated_errno): Set maximum errno value to 4095. + +2015-02-19 Mike Frysinger + + README-linux: punt. + Considering we're requiring linux-2.6 era kernels, the discussion of + header troubles that plagued 2.2 and 2.4 are no longer relevant. + + * README-linux: Delete. + +2015-02-19 Dmitry V. Levin + + Improve prctl decoding. + * configure.ac (AC_CHECK_HEADERS): Add linux/securebits.h. + * prctl.c (sys_prctl): Implement full decoding of all PR_* constants + as defined in linux v3.19. + (sys_arch_prctl): Fix decoding of unknown commands. + * xlat/cap.in: New file. + * xlat/pr_mce_kill.in: New file. + * xlat/pr_mce_kill_policy.in: New file. + * xlat/pr_set_mm.in: New file. + * xlat/pr_tsc.in: New file. + * xlat/pr_unalign_flags.in: New file. + * xlat/secbits.in: New file. + * xlat/prctl_options.in: Remove non-linux constants, add fallback + definitions. + * xlat/seccomp_mode.in: Add fallback definitions. + + xlat: extend syntax. + * xlat/gen.sh (gen_header): If the name of constant is specified with a + value, generate a default definition for the constant using this value. + * xlat/timerfdflags.in: Use extended syntax. + + Move CAP_* definitions out to header files. + * Makefile.am (strace_SOURCES): Add caps0.h and caps1.h. + * caps0.h: New file. + * caps1.h: New file. + * capability.c: Remove CAP_* definitions, include "caps0.h" + and "caps1.h" instead. + Include "xlat/cap_mask0.h" instead of "xlat/capabilities.h". + Include "xlat/cap_mask1.h" instead of "xlat/capabilities1.h". + (print_cap_bits): Update callers. + * xlat/capabilities.in: Rename to xlat/cap_mask0.in. + * xlat/capabilities1.in: Rename to xlat/cap_mask1.in. + +2015-02-18 Dmitry V. Levin + + Declare all format printers with printf format attribute. + * defs.h (printllval, printnum_int, printnum_long): Mark with + format(printf) attribute. + * sock.c (sock_ioctl): Fix format string. + +2015-02-17 Dmitry V. Levin + + Rename printnum to printnum_long to avoid confusion. + * defs.h (printnum): Rename to printnum_long. + * util.c (printnum): Likewise. + * process.c (sys_ptrace): Likewise. + * time.c (sys_time): Likewise. + + Use printnum_int consistently. + * sock.c (sock_ioctl): Use printnum_int instead of printnum to print + integer type. + * stream.c (sys_getpmsg): Likewise. + +2015-02-16 Dmitry V. Levin + + print_pc: fix multiple personalities support. + * syscall.c (print_pc): Choose instruction pointer format depending + on current_wordsize, not the size of long integer type. + * tests/pc.c: New file. + * tests/pc.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add pc. + (TESTS): Add pc.test. + * tests/.gitignore: Add pc. + + mips: use PTRACE_GETREGS to fetch all registers. + * linux/mips/arch_regs.h (struct mips_regs): New structure. + (mips_REG_*): New macros. + * signal.c (sys_sigreturn) [MIPS]: Use mips_REG_SP. + * syscall.c [MIPS] (struct mips_regs): New variable. + [MIPS] (ARCH_REGS_FOR_GETREGS): New macro. + (mips_a3, mips_r2): Remove. + (print_pc) [MIPS]: Use mips_REG_EPC. + (get_scno) [MIPS]: Use mips_REG_V0 and mips_REG_A3. + (get_syscall_args) [MIPS]: Use mips_REG_A[0-5]. + (get_syscall_result) [MIPS]: Remove. + (get_error) [MIPS]: Use mips_REG_A3 and mips_REG_V0. + + mips: move ABI check to configure.ac. + * configure.ac [MIPS]: Check for MIPS ABI. + * defs.h [MIPS]: Remove MIPS ABI check. + * ioctlsort.c: Likewise. + + tests: support alternative names of select syscall. + * tests/select.awk: Recognize "_newselect" as another name of "select". + * tests/select.test: Try alternative names of select syscall. + +2015-02-15 Dmitry V. Levin + + i386: fix compilation warning. + Some gcc versions complain about assigning long* to uint32_t* on i386. + + * syscall.c [I386] (i386_esp_ptr): Change type from uint32_t* to long*. + * linux/i386/arch_regs.h (i386_esp_ptr): Likewise. + * linux/x86_64/arch_regs.h: Do not include "i386/arch_regs.h". + (i386_esp_ptr): New prototype. + +2015-02-14 Dmitry V. Levin + + Do not reset get_regs_error unnecessarily. + As get_regs() is now guaranteed to set get_regs_error, + there is no need to reset get_regs_error before get_regs() call. + + * strace.c (trace): Call clear_regs() iff !WIFSTOPPED. + +2015-02-14 Dmitry V. Levin + + get_syscall_result: remove redundant ifdefs. + As get_regs() is now guaranteed to fetch registers when either + ARCH_REGS_FOR_GETREGSET or ARCH_REGS_FOR_GETREGS is defined, we can + safely replace all checks for architectures where these macros are defined + with a single check for these macros. + + * syscall.c (get_syscall_result): Check for [ARCH_REGS_FOR_GETREGSET || + ARCH_REGS_FOR_GETREGS]. Remove all checks for architectures where + nothing has to be done after get_regs(). + +2015-02-14 Dmitry V. Levin + + get_regs: define for all architectures. + * defs.h (get_regs_error): Remove. + (clear_regs): Update prototype, declare unconditionally. + (get_regs): Declare unconditionally. + * syscall.c (clear_regs): New function. + (get_regs): Define unconditionally. + (get_regs_error): Define unconditionally, change scope to static. + + get_regs: unify code for architectures that use PTRACE_GETREGS. + * syscall.c [I386, POWERPC, ARM, AVR32, SPARC, SPARC64, TILE] + (ARCH_REGS_FOR_GETREGS): New macro. + (get_regs): Unify code for ARCH_REGS_FOR_GETREGS architectures. + + get_regset: define iff PTRACE_GETREGSET is used. + * syscall.c [AARCH64, X86_64, X32] (ARCH_REGS_FOR_GETREGSET, + ARCH_IOVEC_FOR_GETREGSET): New macros. + (get_regset): Define iff ARCH_REGS_FOR_GETREGSET is defined; change + return type to long, return ptrace() return code instead of assigning it + to get_regs_error; do not list individual architectures, implement + constant and variable iovec cases depending on ARCH_IOVEC_FOR_GETREGSET. + (get_regs): Assign get_regset() return code to get_regs_error. + +2015-02-14 Dmitry V. Levin + + arm, i386: switch back to use PTRACE_GETREGS. + PTRACE_GETREGSET and PTRACE_GETREGS methods are equally good on arm and + i386 architectures, but PTRACE_GETREGSET with fallback to PTRACE_GETREGS + is a bit more costly, so choose the method that costs less. + This partially reverts commit v4.7-149-gfaa177e. + + * syscall.c [ARM, I386] (ARCH_REGS_FOR_GETREGSET): Remove. + (get_regset) [ARM || I386]: Remove. + (get_regs) [ARM || I386]: Use PTRACE_GETREGS unconditionally. + +2015-02-14 Dmitry V. Levin + + syscall.c: remove obsolete ifdefs. + * syscall.c (get_regset, get_regs): Do not check for availability + of PTRACE_GETREGSET and NT_PRSTATUS macros. + + syscall.c: ensure that NT_PRSTATUS is defined. + * syscall.c: Do not include . + (NT_PRSTATUS): New macro. + +2015-02-13 Dmitry V. Levin + + Move regs-related macros and declarations from defs.h to regs.h. + * regs.h: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/arch_regs.h: New file. + * linux/alpha/arch_regs.h: Likewise. + * linux/arm/arch_regs.h: Likewise. + * linux/hppa/arch_regs.h: Likewise. + * linux/i386/arch_regs.h: Likewise. + * linux/ia64/arch_regs.h: Likewise. + * linux/mips/arch_regs.h: Likewise. + * linux/powerpc/arch_regs.h: Likewise. + * linux/sh64/arch_regs.h: Likewise. + * linux/sparc/arch_regs.h: Likewise. + * linux/sparc64/arch_regs.h: Likewise. + * linux/tile/arch_regs.h: Likewise. + * linux/x86_64/arch_regs.h: Likewise. + * Makefile.am (EXTRA_DIST): Add them. + * defs.h: Remove definitions of PTRACE_*, REG_*, PT_*, U_REG_*, + and ARM_* macros. + Remove declarations of struct pt_regs variables. + [SPARC]: Do not include . + [SPARC64]: Do not include . + * bjm.c: Do not include . + * process.c: Include "regs.h". + Do not include and . + [IA64]: Do not include and . + * util.c: Likewise. + * syscall.c: Likewise. + [AARCH64]: Define struct arm_pt_regs and ARM_* macros. + [SPARC]: Include . + [SPARC64]: Include . + * signal.c: Include "regs.h". + Do not include and . + [IA64]: Do not include . + * strace.c [IA64]: Do not include . + + Move all ptrace-related macros and declarations from defs.h to ptrace.h. + * ptrace.h: New file. + * Makefile.am (strace_SOURCES): Add it. + * configure.ac (AC_CHECK_HEADERS): Remove linux/ptrace.h and sys/ptrace.h. + * defs.h: Do not include and . + Remove definitions of PTRACE_* macros. + * process.c: Remove workarounds, include "ptrace.h". + * signal.c: Likewise. + * syscall.c: Likewise. + * util.c: Likewise. + * strace.c: Include "ptrace.h". + * wait.c: Likewise. + +2015-02-12 Dmitry V. Levin + + Enhance wait status decoding. + * xlat/ptrace_events.in: New file. + * wait.c: Include "xlat/ptrace_events.h". + (printstatus): In case of WIFSTOPPED, print 0x80 flag separately from + the stop signal name. + [WIFCONTINUED]: Add WIFCONTINUED support. + Decode PTRACE_EVENT_* events. + +2015-02-08 Bart Van Assche + + scsi: add bsg support. + The Linux kernel supports two different versions of the SG_IO API, + namely v3 and v4. This patch adds support for version 4 of this API. + At least the sg3_utils package supports version 4 of this API. Version + 4 of this API is used if /dev/bsg/H:C:I:L is used as device name. + + This patch has been tested by inspecting the output of the following + commands: + + modprobe scsi_debug dev_size_mb=16 delay=0 + dev=$(lsscsi | sed -n '/ scsi_debug /s,^[^/]*,,p') + ./strace -eioctl -s256 sg_inq $dev + echo 'Test XDWRITEREAD(10)' + bsg=/dev/bsg/$(lsscsi | sed -n '/ scsi_debug /s,^\[\([^]]\+\)\].*,\1,p') + dd if=/dev/zero bs=512 count=1 | + ./strace -eioctl -s256 sg_raw -s 512 -r 1024 $bsg 53 00 00 00 00 01 00 00 01 00 + + * configure.ac (AC_CHECK_HEADERS): Add linux/bsg.h. + * xlat/bsg_protocol.in: New file. + * xlat/bsg_subprotocol.in: Likewise. + * scsi.c: Include them and . + (print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req, + print_sg_io_v4_res): New functions. + (print_sg_io_req, print_sg_io_res): Use them. + (scsi_ioctl): Update callers. + +2015-02-08 Bart Van Assche + + scsi: Add iovec support. + * scsi.c (print_sg_io_req, print_sg_io_res): Add support for decoding + iovecs passed via the SG I/O v3 interface. Decode the "data in" and + "data out" buffers in hex instead of in ASCII. + + scsi: on exit, print only initialized part of the buffer. + * scsi.c (print_sg_io_res): Only print that part of the data in buffer + that has been initialized by the SCSI LLD driver. + + scsi: make print_sg_io_buffer() print square brackets instead of its callers + * scsi.c (print_sg_io_buffer): Print square brackets in this function. + (print_sg_io_req, print_sg_io_res): Update callers. + +2015-02-08 Bart Van Assche + + scsi: improve consistency with other decoding functions. + Pass pointers to tracee's memory as integers instead of pointers. + + * scsi.c (print_sg_io_buffer): Change second argument's type to + unsigned long. + (print_sg_io_req, print_sg_io_res): Update callers. + +2015-02-08 Dmitry V. Levin + + tests: extend getdents to support all filesystems regardless of file order + * tests/getdents.awk: Include all 6 possible permutations of 3 + direntries to regexps. + +2015-02-08 Dmitry V. Levin + + print_setsockopt: fix fall-through bug in SOL_IP switch case. + This fixes the bug introduced by commit v4.9-250-ga0a4909. + + * net.c (print_setsockopt): Separate SOL_IP case from SOL_PACKET. + + Reported-by: Ben Noordhuis + +2015-02-07 Dmitry V. Levin + + Do not watch for post-execve SIGTRAP if PTRACE_O_TRACEEXEC is enabled. + If PTRACE_O_TRACEEXEC option is enabled, then post-execve SIGTRAPs are + suppressed and we can safely skip -ENOSYS heuristics. This partially + reverts commits v4.9-258-g8e398b6 and v4.9-261-gd70c41d. + + * syscall.c (syscall_fixup_on_sysenter): Skip if PTRACE_O_TRACEEXEC + flag is set in ptrace_setoptions. Remove all SECCOMP_RET_ERRNO + workarounds as they are not needed when PTRACE_O_TRACEEXEC is not + supported by the kernel. + +2015-02-07 Dmitry V. Levin + + When the process stared by strace exits/terminates, forget its pid. + The process stared by strace can exit/terminate only once. When this + happens, forget its pid, so that any other event or action related to a + process with the same pid as the pid of that first process would not be + confused with that first process. + + * strace.c (print_signalled, print_exited): Clear strace_child when it + equals to the given pid. + +2015-02-07 Dmitry V. Levin + + -b execve: avoid misleading warning about unknown pid. + * strace.c (maybe_allocate_tcb): If detach_on_execve is set, do not warn + about !WIFSTOPPED process with pid == strace_child. + * tests/bexecve.test: New test. + * tests/Makefile.am (TESTS): Add it. + + -b execve: do not use struct tcb after detach. + * strace.c (trace): Do not proceed after detach. + +2015-02-07 Dmitry V. Levin + + trace: split into several functions. + This change moves the main loop back to main() and splits trace() + into several functions. There are no algorithmic changes. + + * strace.c (print_debug_info, maybe_allocate_tcb, maybe_switch_tcbs, + print_signalled, print_exited, print_stopped, startup_tcb): New + functions. + (trace) Use them. Move the main loop ... + (main): ... here. + +2015-02-07 Dmitry V. Levin + + printsiginfo: constify the first argument. + * signal.c (printsiginfo): Make the first argument a pointer to a const type. + * defs.h (printsiginfo): Likewise. + (printsiginfo, printsiginfo_at): Always define these prototypes. + * configure.ac (AC_CHECK_TYPES): Remove siginfo_t, as HAVE_SIGINFO_T + is no longer used. + +2015-02-06 Dmitry V. Levin + + test: add a manual test for seccomp decoding. + * test/.gitignore: Add seccomp. + * test/Makefile (PROGS): Likewise. + * test/seccomp.c: New file. + * test/README: Mention ../tests/. + + Implement seccomp decoding. + * configure.ac (AC_CHECK_HEADERS): Add linux/filter.h + and linux/seccomp.h. + * defs.h (print_seccomp_filter): New prototype. + * linux/dummy.h (sys_seccomp): Remove. + * linux/syscall.h (sys_seccomp): New prototype. + * prctl.c: Include . + (sys_prctl): Decode PR_SET_SECCOMP. + * seccomp.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * xlat/bpf_class.in: New file. + * xlat/bpf_miscop.in: Likewise. + * xlat/bpf_mode.in: Likewise. + * xlat/bpf_op_alu.in: Likewise. + * xlat/bpf_op_jmp.in: Likewise. + * xlat/bpf_rval.in: Likewise. + * xlat/bpf_size.in: Likewise. + * xlat/bpf_src.in: Likewise. + * xlat/seccomp_filter_flags.in: Likewise. + * xlat/seccomp_mode.in: Likewise. + * xlat/seccomp_ops.in: Likewise. + * xlat/seccomp_ret_action.in: Likewise. + +2015-02-06 Dmitry V. Levin + + is_negated_errno: support large errno values. + Thanks to SECCOMP_RET_DATA == 0xffff, abnormally large errno + values could be easily seen when a seccomp filter is used, e.g. + BPF_STMT(BPF_RET, SECCOMP_RET_ERRNO | SECCOMP_RET_DATA) + + * syscall.c (is_negated_errno): Allow errno values as large as 0xffff. + +2015-02-06 Dmitry V. Levin + + x86, x32, x86_64: print SECCOMP_RET_ERRNO filtered syscalls. + This is required to process SECCOMP_RET_ERRNO filtered syscalls on + systems where linux kernel does not change the syscall number to -1. + + * syscall.c (is_negated_errno): Move before syscall_fixup_on_sysenter. + (syscall_fixup_on_sysenter) [I386 || X32 || X86_64] : Use it to check + AX register. + +2015-02-06 Dmitry V. Levin + + is_negated_errno: merge x86_64 and x32 definitions. + * syscall.c (kernel_long_t, kernel_ulong_t): New types. + (is_negated_errno): Merge [X32] and [!X32] definitions. + (get_error): Merge [X86_64] and [X32] code. + +2015-02-06 Dmitry V. Levin + + x32: rename is_negated_errno_x32 to is_negated_errno. + Use the same function name on all architectures. + + * syscall.c [X32] (is_negated_errno_x32): Rename to is_negated_errno. + (get_error) [X32]: Update callers. + +2015-02-06 Dmitry V. Levin + + x86, x32, x86_64: do not skip syscall number -1. + Syscall number -1 might be a side effect of SECCOMP_RET_ERRNO filtering. + + * syscall.c (syscall_fixup_on_sysenter) [I386 || X32 || X86_64]: + Do not skip syscalls that have number -1. + +2015-02-06 Dmitry V. Levin + + x86_64: do not interpet syscall number -1 as a x32 personality syscall. + Syscall number -1 might be a side effect of SECCOMP_RET_ERRNO filtering. + + * syscall.c (get_scno) [X86_64]: Handle the case of scno == -1. + +2015-02-05 Dmitry V. Levin + + Implement getrandom syscall decoding. + * getrandom.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/dummy.h (sys_getrandom): Remove. + * linux/syscall.h (sys_getrandom): New prototype. + * xlat/getrandom_flags.in: New file. + * tests/getrandom.c: New file. + * tests/getrandom.awk: New file. + * tests/getrandom.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add getrandom. + (TESTS): Add getrandom.test. + (EXTRA_DIST): Add getrandom.awk. + * tests/.gitignore: Add getrandom. + +2015-02-04 Dmitry V. Levin + + tests: add a test for select syscall decoding. + Convert test/select.c into a regular test. + + * test/Makefile (PROGS): Remove select. + * test/.gitignore: Likewise. + * test/select.c: Rewrite to ... + * tests/select.c: ... new file. + * tests/select.awk: New file. + * tests/select.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add select. + (TESTS): Add select.test. + (EXTRA_DIST): Add select.awk. + * tests/.gitignore: Add select. + +2015-02-01 Dmitry V. Levin + + tests: add a test for the latest dumpio fix. + * tests/dumpio.expected: New file. + * tests/unix-pair-send-recv.c: New file. + * tests/dumpio.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add unix-pair-send-recv. + (TESTS): Add dumpio.test. + (EXTRA_DIST): Add dumpio.expected. + * tests/.gitignore: Add unix-pair-send-recv. + +2015-02-01 Aurelien Jacobs + + Fix simultaneous -e read and -e write usage. + This allows using both -e read=FD and -e write=FD at the same time + with the same FD. + Without this patch, the -e write=FD is ignored if -e read=FD is used + at the same time. + +2015-01-31 Dmitry V. Levin + + net.c: remove unused HAVE_SIN6_SCOPE_ID_LINUX-based code. + The AC_SIN6_SCOPE_ID autoconf macro that was able to define + HAVE_SIN6_SCOPE_ID_LINUX was removed by commit v4.4-98-g64f793a. + + * net.c [HAVE_SIN6_SCOPE_ID_LINUX]: Remove. + +2015-01-30 Dmitry V. Levin + + printsock: do not fetch sockaddr.sa_data twice. + * net.c (printsock): Print addrbuf.sa.sa_data using print_quoted_string. + + setsockopt: add decoding of MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP. + * net.c (print_group_req): New function. + (print_setsockopt): Use it. + +2015-01-29 Dmitry V. Levin + + tests: add a test for sockaddr_un.sun_path decoding. + * tests/net-accept-connect.c: Allow long socket addresses. + * tests/sun_path.test: New test. + * tests/Makefile.am (TESTS): Add it. + + printsock: print the whole sockaddr_un.sun_path. + * net.c (printsock): If sockaddr_un.sun_path is not NUL-terminated, + do not omit the last byte of sockaddr_un.sun_path array. + + printsock: do not fetch sockaddr_un.sun_path twice. + * net.c (printsock): Print addrbuf.sau.sun_path using + print_quoted_string. + +2015-01-29 Dmitry V. Levin + + net: define all SOL_* constants. + Ensure that all known SOL_* constants are defined. + Sync the list of known SOL_* constants with linux/socket.h. + + * net.c: Provide definitions for all SOL_* constants. + Remove all SOL_* preprocessor conditionals. + (socketlayers): Disconnect from inet_protocols. + * xlat/socketlayers.in: Remove SOL_ICMP, add SOL_ALG and SOL_NFC. + +2015-01-29 Dmitry V. Levin + + setsockopt: decode PACKET_ADD_MEMBERSHIP. + * xlat/packet_mreq_type.in: New file. + * net.c: Include "xlat/packet_mreq_type.h". + (print_packet_mreq): New function. + (print_setsockopt): Use it. + +2015-01-29 Dmitry V. Levin + + getsockopt, setsockopt: do not decode structures in non-verbose mode. + Move the code that is common between getsockopt and setsockopt parsers + to a separate function. + Move printers specific to getsockopt and setsockopt to separate + functions, choose appropriate parsers depending on verbose mode. + Move parsers of specific socket options to separate functions. + + * net.c (printicmpfilter): Rename to print_icmp_filter. + (printsockopt): Remove. + (print_sockopt_fd_level_name, print_linger, print_ucred, + print_tpacket_stats, print_getsockopt, print_tpacket_req, + print_packet_mreq, print_setsockopt): New functions. + (sys_getsockopt, sys_setsockopt): Use them. + +2015-01-28 Dmitry V. Levin + + sendmsg: do not decode msghdr in non-verbose mode. + * net.c (printmsghdr): Do not decode struct msghdr in non-verbose mode. + + decode_select: do not allocate unused memory. + * desc.c (decode_select): On entering syscall, do not allocate memory + in non-verbose mode. + +2015-01-26 Dmitry V. Levin + + xattr: quote using print_quoted_string. + * xattr.c (print_xattr_val): Drop local quoting code, use + print_quoted_string. + + v4l2: quote pixelformat. + * v4l2.c (print_pixelformat): Output in quoted v4l2_fourcc() format. + + v4l2: quote strings. + * v4l2.c (v4l2_ioctl): Print strings using print_quoted_string. + + mips: quote sysmips nodename. + * sysmips.c (sys_sysmips): Print nodename using print_quoted_string. + + block_ioctl: quote strings. + * block.c (print_blkpg_req): Print blkpg_partition.devname and + blkpg_partition.volname using print_quoted_string. + (block_ioctl): Print blk_user_trace_setup.name using print_quoted_string. + + sys_uname: quote struct utsname members. + * uname.c (PRINT_UTS_MEMBER): New macro. + (sys_uname): Use them. + + sock_ioctl: quote network interface names. + * sock.c (print_ifname): New function. + (sock_ioctl): Use it to quote ifr_name, ifru_newname, and ifru_slave. + + printsock: quote network interface names. + * net.c (printsock): Print network interface names returned by + if_indextoname() using print_quoted_string. + + getdents, getdents64: quote filenames. + * dirent.c (print_old_dirent): Fix quoting. + (sys_getdents): Print d_name using print_quoted_string. + (sys_getdents64): Likewise. + * tests/getdents.test: Test it. + * tests/getdents.awk: Update. + +2015-01-26 Dmitry V. Levin + + printfd: quote pathnames. + Change printfd() behaviour in show_fd_path mode to quote pathnames + the same way printpathn() does. + + * util.c (printfd): Print non-socket paths using print_quoted_string. + * tests/scm_rights-fd.test: Test it. + * tests/scm_rights.c: Update. + +2015-01-26 Dmitry V. Levin + + Rework string_quote API. + string_quote() has proven to be too hard to use, replace it with + print_quoted_string() that does memory allocation and prints the result. + + * defs.h (string_quote): Remove. + (QUOTE_0_TERMINATED, QUOTE_OMIT_LEADING_TRAILING_QUOTES): New macros. + (print_quoted_string): New prototype. + * util.c (string_quote): Make static; take "style" flags instead + of "len", treat QUOTE_0_TERMINATED style flag as former (len == -1); + add QUOTE_OMIT_LEADING_TRAILING_QUOTES style flag support. + (ALLOCA_CUTOFF, use_alloca): New macros. + (print_quoted_string): New function. + (printpathn, printstr): Update to new API. + * loop.c (loop_ioctl): Likewise. + * mtd.c (ubi_ioctl): Likewise. + * net.c (print_scm_security): Likewise. + * socketutils.c (unix_parse_response): Likewise. + +2015-01-24 Dmitry V. Levin + + avr32: fix typo in sys_timerfd syscall entry. + * linux/avr32/syscallent.h (timerfd): Change sys_name to "timerfd". + + hppa: fix typos in getresuid and getresgid syscall entries. + * linux/hppa/syscallent.h (getresuid): Change sys_func to sys_getresuid. + (getresgid): Change sys_func to sys_getresgid. + +2015-01-24 Helge Deller + + hppa: fix typo in getpeername syscall entry. + This fixes an obvious typo which prints "lock" instead of "getpeername" + for the getpeername syscall. + + * linux/hppa/syscallent.h (getpeername): Change sys_name to "getpeername". + +2015-01-24 Dmitry V. Levin + + Impove struct cmsghdr decoding. + Print all cmsghdr structures in msg_control array, + not just the first one. + Change output format to be consistent with other parts of strace + where structures and arrays are printed. + Implement decoder for SCM_SECURITY message type. + + * net.c (print_scm_rights, print_scm_creds, print_scm_security): + New functions. + (printcmsghdr): Use them. Iterate over all members of the array. + * xlat/scmvals.in: Add SCM_SECURITY. + * tests/scm_rights.c (main): Pass one more descriptor to the receiver. + Set SO_PASSCRED on the receiver part. Reserve enough space to receive + SCM_CREDENTIALS and SCM_RIGHTS. + * tests/scm_rights-fd.test: Update. + +2015-01-24 Dmitry V. Levin + + Update SO_* constants. + * xlat/sockoptions.in: Add SO_DOMAIN, SO_MARK, SO_NOFCS, SO_PASSSEC, + SO_PROTOCOL, SO_RCVBUFFORCE, SO_SNDBUFFORCE, SO_TIMESTAMPING, + and SO_TIMESTAMPNS. + +2015-01-24 Dmitry V. Levin + + tests: run tests for each supported personality. + When strace supports more than one personality, run test suite + for each personality supported by the host system. + + * bootstrap: Create tests-m32 and tests-mx32 subtrees from tests. + * configure.ac: Check for -m32 and -mx32 runtime support. + (AC_CONFIG_FILES): Add tests-m32/Makefile and tests-mx32/Makefile. + * Makefile.am [HAVE_M32_RUNTIME] (TESTS_M32): Define. + [HAVE_MX32_RUNTIME] (TESTS_MX32): Define. + (SUBDIRS): Add $(TESTS_M32) $(TESTS_MX32). + * .gitignore: Add /tests-m32 and /tests-mx32. + +2015-01-24 Dmitry V. Levin + + Fix ILP32 personality struct cmsghdr decoding on LP64 architectures. + * net.c (union_cmsghdr): New union. + [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] (cmsghdr32): New structure. + (printcmsghdr): Properly handle the case of current_wordsize < sizeof(long). + + Fix ILP32 personality preadv/pwritev offset decoding on LP64 architectures + * io.c (print_llu_from_low_high_val) [SIZEOF_LONG == SIZEOF_LONG_LONG + && SUPPORTED_PERSONALITIES > 1]: Properly handle the case of + current_wordsize < sizeof(long). + +2015-01-22 Dmitry V. Levin + + ioctl: take all 32 bits of ioctl commands into account. + Historically, only 16 bits (8-bit number and 8-bit type) of 32-bit ioctl + commands were used for decoding, which was the source for numerous + annoying collisions like this: + + ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 + ioctl(0, MGSL_IOCGPARAMS or MMTIMER_GETRES or MTIOCTOP or SNDCTL_MIDI_MPUMODE, 0x7fffd47f7338) = -1 ENOTTY (Inappropriate ioctl for device) + + The solution is to use all 32 bits for decoding, not just "number" and + "type", but also "size" and "direction". + + As some architectures override defaults that come from asm-generic/ and + provide alternative definitions for some ioctl commands, we support + per-architecture ioctl definitions and merge them with common + definitions at build time. During the merge, we used to keep both + generic and architecture-specific definitions, now architecture-specific + definitions have precedence over generic ones -- ioctlsort omits + definitions from asm-generic/ for those ioctl names that have different + definitions in asm/. + + Additional bits of "direction" are architecture specific -- the number + of bits and their values differ between architectures. To reduce + architecture differences in the source code, we keep "direction" in + symbolic form and compile it in ioctlsort. + + Additional bits of "size" are also architecture specific -- not only the + number of bits differ between architectures, but sizes of many types + depend on sizeof(long). To reduce architecture differences in the + source code, we keep 32-bit and 64-bit versions of common ioctl + definitions, and use the appropriate version for each architecture and + personality. + + To implement this, the tools for generating ioctl definitions from + kernel headers have been rewritten, and the source format of ioctl + definitions has been extended. The final ioctlent*.h files that are + included by syscall.c are now generated from source ioctls_inc*.h and + ioctls_arch*.h files at build time with ioctlsort. + + * ioctl.c (ioctl_lookup): Use all 32 bits of ioctl command code. + * ioctlsort.c: Rewritten. + * linux/32/ioctls_inc.h: New file. + * linux/64/ioctls_inc.h: New file. + * linux/aarch64/ioctls_arch0.h: New file. + * linux/aarch64/ioctls_arch1.h: New file. + * linux/aarch64/ioctls_inc0.h: New file. + * linux/aarch64/ioctls_inc1.h: New file. + * linux/alpha/ioctls_arch0.h: New file. + * linux/alpha/ioctls_inc0.h: New file. + * linux/arc/ioctls_arch0.h: New file. + * linux/arc/ioctls_inc0.h: New file. + * linux/arm/ioctls_arch0.h: New file. + * linux/arm/ioctls_inc0.h: New file. + * linux/avr32/ioctls_arch0.h: New file. + * linux/avr32/ioctls_inc0.h: New file. + * linux/bfin/ioctls_arch0.h: New file. + * linux/bfin/ioctls_inc0.h: New file. + * linux/hppa/ioctls_arch0.h: New file. + * linux/hppa/ioctls_inc0.h: New file. + * linux/i386/ioctls_arch0.h: New file. + * linux/i386/ioctls_inc0.h: New file. + * linux/ia64/ioctls_arch0.h: New file. + * linux/ia64/ioctls_inc0.h: New file. + * linux/m68k/ioctls_arch0.h: New file. + * linux/m68k/ioctls_inc0.h: New file. + * linux/metag/ioctls_arch0.h: New file. + * linux/metag/ioctls_inc0.h: New file. + * linux/microblaze/ioctls_arch0.h: New file. + * linux/microblaze/ioctls_inc0.h: New file. + * linux/mips/ioctls_arch0.h: New file. + * linux/mips/ioctls_inc0.h: New file. + * linux/or1k/ioctls_arch0.h: New file. + * linux/or1k/ioctls_inc0.h: New file. + * linux/powerpc/ioctls_arch0.h: New file. + * linux/powerpc/ioctls_inc0.h: New file. + * linux/powerpc64/ioctls_arch0.h: New file. + * linux/powerpc64/ioctls_arch1.h: New file. + * linux/powerpc64/ioctls_inc0.h: New file. + * linux/powerpc64/ioctls_inc1.h: New file. + * linux/s390/ioctls_arch0.h: New file. + * linux/s390/ioctls_inc0.h: New file. + * linux/s390x/ioctls_arch0.h: New file. + * linux/s390x/ioctls_inc0.h: New file. + * linux/sh/ioctls_arch0.h: New file. + * linux/sh/ioctls_inc0.h: New file. + * linux/sh64/ioctls_arch0.h: New file. + * linux/sh64/ioctls_inc0.h: New file. + * linux/sparc/ioctls_arch0.h: New file. + * linux/sparc/ioctls_inc0.h: New file. + * linux/sparc64/ioctls_arch0.h: New file. + * linux/sparc64/ioctls_arch2.h: New file. + * linux/sparc64/ioctls_inc0.h: New file. + * linux/sparc64/ioctls_inc2.h: New file. + * linux/tile/ioctls_arch0.h: New file. + * linux/tile/ioctls_arch1.h: New file. + * linux/tile/ioctls_inc0.h: New file. + * linux/tile/ioctls_inc1.h: New file. + * linux/x32/ioctls_arch0.h: New file. + * linux/x32/ioctls_arch1.h: New file. + * linux/x32/ioctls_inc0.h: New file. + * linux/x32/ioctls_inc1.h: New file. + * linux/x86_64/ioctls_arch0.h: New file. + * linux/x86_64/ioctls_arch1.h: New file. + * linux/x86_64/ioctls_inc0.h: New file. + * linux/x86_64/ioctls_inc1.h: New file. + * linux/xtensa/ioctls_arch0.h: New file. + * linux/xtensa/ioctls_inc0.h: New file. + * linux/aarch64/ioctlent.h.in: Remove. + * linux/aarch64/ioctlent1.h: Remove. + * linux/alpha/ioctlent.h.in: Remove. + * linux/arc/ioctlent.h.in: Remove. + * linux/arm/ioctlent.h.in: Remove. + * linux/avr32/ioctlent.h.in: Remove. + * linux/bfin/ioctlent.h.in: Remove. + * linux/hppa/ioctlent.h.in: Remove. + * linux/i386/ioctlent.h.in: Remove. + * linux/ia64/ioctlent.h.in: Remove. + * linux/ioctlent.h.in: Remove. + * linux/ioctlent.sh: Remove. + * linux/m68k/ioctlent.h.in: Remove. + * linux/metag/ioctlent.h.in: Remove. + * linux/microblaze/ioctlent.h.in: Remove. + * linux/mips/ioctlent.h.in: Remove. + * linux/mips/ioctlent.sh: Remove. + * linux/or1k/ioctlent.h.in: Remove. + * linux/powerpc/ioctlent.h.in: Remove. + * linux/powerpc64/ioctlent.h: Remove. + * linux/powerpc64/ioctlent1.h: Remove. + * linux/s390/ioctlent.h.in: Remove. + * linux/s390x/ioctlent.h.in: Remove. + * linux/sh/ioctlent.h.in: Remove. + * linux/sh64/ioctlent.h.in: Remove. + * linux/sparc/ioctlent.h.in: Remove. + * linux/sparc64/ioctlent.h.in: Remove. + * linux/sparc64/ioctlent2.h: Remove. + * linux/tile/ioctlent.h.in: Remove. + * linux/tile/ioctlent1.h: Remove. + * linux/x32/ioctlent.h.in: Remove. + * linux/x32/ioctlent1.h: Remove. + * linux/x86_64/ioctlent.h.in: Remove. + * linux/x86_64/ioctlent1.h: Remove. + * linux/xtensa/ioctlent.h.in: Remove. + * linux/x86_64/ioctlent2.h: Include ioctlent0.h instead of ioctlent.h. + * syscall.c (struct_ioctlent ioctlent0): Likewise. + * Makefile.am: Remove all ioctlent-related definitions. + Define the list of ioctlent*.h files that have to be generated by + presence of $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h files. + Add rules for ioctlent*.h files generation. + (EXTRA_DIST): Update. + * maint/ioctls_gen.sh: New file. + * maint/ioctls_hex.sh: New file. + * maint/ioctls_sym.sh: New file. + * maint/print_ioctlent.c: New file. + * HACKING-scripts: Update for ioctlent.sh -> ioctls_gen.sh migration. + * .gitignore: Add ioctlent[012].h and ioctls_all[012].h. + * configure.ac (AC_CHECK_HEADERS): Add linux/hiddev.h + and linux/mmtimer.h for tests. + * tests/ioctl.c: New file. + * tests/ioctl.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add ioctl. + (TESTS): Add ioctl.test. + * tests/.gitignore: Add ioctl. + +2015-01-21 Gabriel Laskar + + ioctl: add decoding for parametrized command names. + Some ioctl commands from evdev, hiddev, mixer, uinput, spi, and joystick + are parametrized by a size or a number that are variable. This change + implements printing of these parametrized ioctl command names. + + * configure.ac (AC_CHECK_HEADERS): Add linux/input.h. + * defs.h (ioctl_decode_number): New prototype. + * io.c (sys_ioctl): Use ioctl_decode_number. + * ioctl.c (ioctl_decode_number): New function. + * xlat/evdev_abs.in: New file. + * xlat/evdev_ev.in: New file. + +2015-01-21 Dmitry V. Levin + + Update auxiliary maintainer mode build tools. + * git-set-file-times: Update from rsync. + * git-version-gen: Update from gnulib. + * gitlog-to-changelog: Likewise. + + Update warnings.m4. + * m4/warnings.m4: Update from gnulib. + +2015-01-21 Dmitry V. Levin + + powerpc64: maintain own linux/powerpc64 subdirectory. + Most architectures supported by strace have their own subdirectory in + linux directory, but powerpc64 didn't, causing inconveniences. + + * configure.ac (arch): Define to "powerpc64" on powerpc64. + * linux/powerpc/errnoent1.h: Move to linux/powerpc64/. + * linux/powerpc/ioctlent1.h: Likewise. + * linux/powerpc/signalent1.h: Likewise. + * linux/powerpc/syscallent1.h: Likewise. + * linux/powerpc64/ioctlent.h: New file. + * linux/powerpc64/syscallent.h: Likewise. + * linux/powerpc64/userent.h: Likewise. + * Makefile.am (EXTRA_DIST): Remove linux/powerpc/ioctlent1.h, + linux/powerpc/syscallent1.h, linux/powerpc/errnoent1.h, and + linux/powerpc/signalent1.h; added linux/powerpc64/errnoent1.h, + linux/powerpc64/ioctlent.h, linux/powerpc64/ioctlent1.h, + linux/powerpc64/signalent1.h, linux/powerpc64/syscallent.h, + linux/powerpc64/syscallent1.h, and linux/powerpc64/userent.h. + +2015-01-21 Dmitry V. Levin + + configure.ac: remove unused AC_INCLUDEDIR. + * configure.ac (AC_INCLUDEDIR): Remove. + * m4/includedir.m4: Remove. + + ioctl: print unrecognized ioctl codes in _IOC(dir,type,nr,size) format. + * defs.h (ioctl_print_code): New prototype. + * ioctl.c: Include xlat/ioctl_dirs.h. + (ioctl_print_code): New function. + * io.c (sys_ioctl): Use it. + * xlat/ioctl_dirs.in: New file. + +2015-01-20 Dmitry V. Levin + + ioctl: assume that all ioctl commands have unsigned int type. + In linux, ioctl command number has a 32-bit unsigned integer type: + fs/ioctl.c:SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) + If the kernel completely ignores other bits on 64-bit architectures, + why should strace care? + Let's follow the kernel and treat it as unsigned int. + + * defs.h (struct_ioctlent): Change "code" type to "unsigned int". + (ioctl_decode, ioctl_lookup, block_ioctl, loop_ioctl, mtd_ioctl, + ubi_ioctl, ptp_ioctl, scsi_ioctl, sock_ioctl, term_ioctl, rtc_ioctl, + v4l2_ioctl): Likewise. + * ioctl.c (ioctl_decode, ioctl_lookup, compare, ioctl_next_match): + Likewise. + * block.c (block_ioctl): Likewise. + * loop.c (loop_ioctl): Likewise. + * mtd.c (mtd_ioctl, ubi_ioctl): Likewise. + * ptp.c (ptp_ioctl): Likewise. + * scsi.c (scsi_ioctl): Likewise. + * sock.c (sock_ioctl): Likewise. + * term.c (term_ioctl): Likewise. + * time.c (rtc_ioctl): Likewise. + * v4l2.c (v4l2_ioctl): Likewise. + * ioctlsort.c (struct ioctlent, compare, main): Likewise. + +2015-01-16 Dmitry V. Levin + + ioctlent.sh: cleanup regexps that are used to fetch bases. + + ioctlent.sh: sync lookup regexps that are used in grep and sed. + ioctlent.sh looks for ioctl command names using grep, and fetches them + with their definitions using sed. Historically, lookup regexps used in + grep and sed are slightly different, which makes the script more + complicated than necessary. + + qemu_multiarch_testing: update. + * qemu_multiarch_testing/.gitignore: New file. + * qemu_multiarch_testing/README: Update statistics. + * qemu_multiarch_testing/hdc.dir/init2: Run "make check". + * qemu_multiarch_testing/make-hdc-img.sh: Robustify, + automatically calculate hdc image size. + * qemu_multiarch_testing/parallel-build-hdc-img.sh: Reduce + hdb image size. Report completion of each parallelized task. + +2015-01-14 Dmitry V. Levin + + tests: add IPC_STAT to ipc tests, workaround limitiations of old kernels + * tests/ipc_msg.c: Include . + (main): Add a test call with IPC_STAT, handle old kernels MSG_STAT behaviour. + * tests/ipc_sem.c: Include . + (main): Add a test call with IPC_STAT, handle old kernels SEM_STAT behaviour. + * tests/ipc_shm.c: Include . + (main): Add a test call with IPC_STAT, handle old kernels SHM_STAT behaviour. + + Change length type of umoven and umovestr to unsigned. + * defs.h (umoven, umovestr): Change type of 3rd argument from "int" + to "unsigned int". + * util.c (umoven, umovestr): Likewise. Adjust the code appropriately. + + tests: skip sendmmsg/recvmmsg test if these syscalls are not implemented in kernel + * tests/mmsg.c: #include + (main): Return 77 if sendmmsg failed with ENOSYS. + + tests: skip ip network tests when the network is not functional. + * tests/inet-accept-connect-send-recv.c (main): Return 77 if inet stream + socket cannot be created or it cannot be bound to INADDR_LOOPBACK. + * tests/net-yy.test: Skip the test if inet-accept-connect-send-recv + returns 77. + + tests: handle the case when all 64 process capability bits are set. + * tests/caps.awk: Handle the case when all bits of 64-bit capability + word are set. + + tests: explicitly request gawk when using gawk features. + * tests/uid.test: Check for gawk availability and invoke gawk instead of + plain awk because the test uses gawk's match() feature. + + tests: skip detach tests if kill does not work. + * tests/detach-running.test: Skip if "kill -0" does not work. + * tests/detach-sleeping.test: Likewise. + * tests/detach-stopped.test: Likewise. + + ARM OABI: fix potential compilation warning. + * syscall.c (get_scno) [!__ARM_EABI__ || ENABLE_ARM_OABI]: Fix + "comparison between signed and unsigned" warning reported by some + gcc versions. + + powerpc: fix potential compilation warning. + * mem.c [POWERPC] (sys_subpage_prot): Fix "comparison between signed + and unsigned" warning reported by some gcc versions. + +2015-01-13 Dmitry V. Levin + + sparc, sparc64: remove ioctl header file names from solaris ioctl entries + Starting with commit v4.9-27-g3e252ca, header file names should not be + part of ioctlent files included by syscall.c + + * linux/sparc/ioctlent1.h: Remove ioctl header file names. + * linux/sparc64/ioctlent2.h: Remove all entries, include "ioctlent.h". + +2015-01-13 Dmitry V. Levin + + mips: enable indirect ipc subcall support. + * linux/mips/syscallent-n32.h [LINUX_MIPSN32]: Define SYS_socket_subcall, + include "subcall.h". + * linux/mips/syscallent-n64.h [LINUX_MIPSN64]: Likewise. + * linux/mips/syscallent-o32.h [LINUX_MIPSO32]: Likewise. + + mips: remove stub entries from syscallent files, generate stubs at build time + * linux/mips/genstub.sh: New file. + * Makefile.am (EXTRA_DIST): Add it. + * configure.ac [MIPS]: Use it to generate syscallent stubs. + * linux/mips/.gitignore: Add syscallent stubs. + * linux/mips/syscallent-n32.h: Remove stub entries, include + the stub file instead. + * linux/mips/syscallent-n64.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + + build: add $(builddir)/$(OS)/$(ARCH) to the headers search list. + * Makefile.am (AM_CPPFLAGS): Add -I$(builddir)/$(OS)/$(ARCH) before + -I$(srcdir)/$(OS)/$(ARCH). + + build: fix build if siginfo_t lacks si_timerid/si_overrun. + * configure.ac (AC_CHECK_MEMBERS): Check for siginfo_t.si_timerid and + siginfo_t.si_overrun. + * signal.c (printsiginfo) [SI_TIMER]: Check HAVE_SIGINFO_T_SI_TIMERID + and HAVE_SIGINFO_T_SI_OVERRUN. + + configure.ac: remove unused AM_CONDITIONAL expressions. + * configure.ac (AM_CONDITIONAL): Remove I386, X86_64, X32. + + tests: portability fixes. + * tests/stat.test: dd obs= is not portable, use bs= instead. + * tests/stat32-v.test: Likewise. + * tests/stat64-v.test: Likewise. + * tests/net.test: Use $* instead of $@ in the quoted string. + * tests/net-fd.test: Likewise. + * tests/statfs.test: Quote { and } in regexps. + * tests/caps.awk: Likewise. + * tests/getdents.awk: Likewise. + * tests/net-yy-accept.awk: Likewise. + * tests/net-yy-connect.awk: Likewise. + * tests/sigaction.awk: Likewise. + * tests/unix-yy-accept.awk: Likewise. + * tests/unix-yy-connect.awk: Likewise. + +2015-01-12 Dmitry V. Levin + + Wire up new syscalls. + * linux/dummy.h (sys_bpf, sys_execveat, sys_getrandom, + sys_kexec_file_load, sys_memfd_create, sys_seccomp): New stub aliases. + * linux/32/syscallent.h (seccomp, getrandom, memfd_create, bpf, + execveat): New entries. + * linux/64/syscallent.h: Likewise. + * linux/arm/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-n64.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/ia64/syscallent.h (getrandom, memfd_create, bpf, execveat): + New entries. + * linux/m68k/syscallent.h: Likewise. + * linux/s390/syscallent.h: (seccomp, getrandom, memfd_create, bpf, + s390_pci_mmio_write, s390_pci_mmio_read, execveat): New entries. + * linux/s390x/syscallent.h: Likewise. + * linux/x86_64/syscallent.h (seccomp, getrandom, memfd_create, + kexec_file_load, bpf, execveat): New entries. + * linux/x32/syscallent.h: Likewise. + * linux/xtensa/syscallent.h (seccomp, getrandom, memfd_create): + New entries. + +2015-01-12 Dmitry V. Levin + + s390x: adjust some syscall entries. + According to linux/arch/s390/include/uapi/asm/unistd.h, readdir is + defined both on s390 and s390x, while getrlimit, _llseek, sendfile64, + and fadvise64_64 are defined on s390 only. + + * linux/s390x/syscallent.h (readdir): Add. + (getrlimit, _llseek, sendfile64, fadvise64_64): Remove. + +2015-01-12 Dmitry V. Levin + + Change syscallent.h files to use designated initializers. + Automatically convert all linux syscallent.h files to a form that uses + designated initializers, with subsequent correction of whitespace + indentation. + + * linux/alpha/syscallent.h: Use designated initializers. + * linux/arm/syscallent.h: Likewise. + * linux/avr32/syscallent.h: Likewise. + * linux/bfin/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-n64.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/xtensa/syscallent.h: Likewise. + +2015-01-12 Dmitry V. Levin + + Create generic 32-bit syscallent.h. + Since arc/syscallent.h, metag/syscallent.h, or1k/syscallent.h, and + tile/syscallent1.h share a lot of identical syscall entries described in + , move these entries to a new file 32/syscallent.h + using the following automated conversion with subsequent correction of + whitespace indentation: + + sed -e 's|^[[:space:]]*\({[^}]\+},\)[[:space:]]*/\*[[:space:]]\([[:space:]]*[0-9]\+\)[[:space:]]*\*/|[\2] = \1|' -e '/^[[:space:]]*\[[[:space:]]*2\(4[4-9]\|5[0-9]\)/d' linux/arc/syscallent.h + + * linux/32/syscallent.h: New file. + * Makefile.am (EXTRA_DIST): Add it. + * linux/arc/syscallent.h: Include "32/syscallent.h", + remove generic 32-bit syscall entries, use designated initializers. + * linux/metag/syscallent.h: Likewise. + * linux/or1k/syscallent.h: Likewise. + * linux/tile/syscallent1.h: Likewise. + +2015-01-12 Dmitry V. Levin + + tile: fix syscall entries. + * linux/tile/syscallent1.h (truncate64, ftruncate64): Change nargs to 3. + (pread64, pwrite64): Change nargs to 5. + (llseek): Change sys_name to _llseek. + + s390: fix fadvise64 and fadvise64_64 syscall entries. + * linux/s390/syscallent.h (fadvise64, fadvise64_64): Change sys_func to + printargs until special parsers for 31-bit 31 s390 emulation wrappers + are written. + + alpha: fix fadvise64 syscall entry. + * linux/alpha/syscallent.h (fadvise64): Change sys_name to fadvise64. + + tile: fix fadvise64_64 syscall entry. + * linux/tile/syscallent1.h (fadvise64_64): Fix nargs, sys_func, + and sys_name. + + Fix getrlimit and ugetrlimit syscall entries. + * linux/arm/syscallent.h (getrlimit, ugetrlimit): Fix sys_name. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/avr32/syscallent.h (getrlimit): Fix sys_name. + * linux/or1k/syscallent.h: Likewise. + * linux/s390/syscallent.h (ugetrlimit): Fix sys_name. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + + Fix umount and umount2 syscall entries. + * linux/aarch64/syscallent1.h (umount): Change nargs to 1. + * linux/avr32/syscallent.h: Likewise. + * linux/xtensa/syscallent.h: Likewise. + * linux/ia64/syscallent.h (umount2): Change nargs to 2. + * linux/arm/syscallent.h (umount, umount2): Fix sys_name. + * linux/bfin/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/metag/syscallent.h: (umount2): Fix sys_name. + * linux/or1k/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + + Fix sendfile64 syscall entries. + * linux/arc/syscallent.h (sendfile64): Change sys_name to sendfile64. + * linux/metag/syscallent.h: Likewise. + * linux/or1k/syscallent.h: Likewise. + + Fix number of arguments in ipc family syscall entries. + * linux/64/syscallent.h (msgget, semget, semtimedop, semop, shmget, + shmctl, shmat, shmdt): Fix nargs for direct ipc syscalls. + * linux/alpha/syscallent.h (msgctl, msgget, msgrcv, semget, shmctl, + shmdt, shmget, semtimedop): Likewise. + * linux/avr32/syscallent.h (msgget, semget, semop, semtimedop, shmat, + shmget, shmdt, shmctl): Likewise. + * linux/bfin/syscallent.h (semget, semop, msgctl, msgget, msgrcv, shmat, + * shmctl, shmdt, shmget, semtimedop): Likewise. + * linux/hppa/syscallent.h (semop, semget, msgrcv, msgget, msgctl, + semtimedop): Likewise. + * linux/microblaze/syscallent.h (semtimedop, semget, semop, msgctl, + msgget, msgrcv, shmat, shmctl, shmdt, shmget): Likewise. + * linux/ia64/syscallent.h (semtimedop): Likewise. + * linux/mips/syscallent-n32.h (semtimedop): Likewise. + * linux/mips/syscallent-n64.h (semtimedop): Likewise. + * linux/or1k/syscallent.h (msgget, msgctl, msgrcv, semget, semtimedop, + semop, shmget, shmctl, shmat, shmdt): Likewise. + * linux/sh64/syscallent.h (semget, msgget, shmget): Likewise. + * linux/tile/syscallent1.h (msgget, semget, semtimedop, semop, shmget, + shmctl, shmat, shmdt): Likewise. + * linux/x32/syscallent.h (shmget, shmat, shmctl, semget, semop, shmdt, + msgget, semtimedop): Likewise. + * linux/x86_64/syscallent.h (shmget, shmat, shmctl, semget, semop, + shmdt, msgget, semtimedop): Likewise. + * linux/xtensa/syscallent.h (shmget, shmat, shmctl, shmdt, semtimedop, + semget, semop, msgget, msgrcv, msgctl): Likewise. + +2015-01-12 Dmitry V. Levin + + Create generic 64-bit syscallent.h. + Since aarch64/syscallent1.h and tile/syscallent.h share a lot of + identical syscall entries described in , move + these entries to a new file 64/syscallent.h using the following + automated conversion with subsequent correction of whitespace + indentation: + + sed -e 's|^[[:space:]]*\({[^}]\+},\)[[:space:]]*/\*[[:space:]]\([[:space:]]*[0-9]\+\)[[:space:]]*\*/|[\2] = \1|' -e '/^\[[[:space:]]*2\(4[4-9]\|5[0-9]\)\]/d' linux/tile/syscallent.h + + * linux/64/syscallent.h: New file. + * Makefile.am (EXTRA_DIST): Add it. + * linux/aarch64/syscallent1.h: Include "64/syscallent.h", + remove generic 64-bit syscall entries, use designated initializers. + * linux/tile/syscallent.h: Likewise. + +2015-01-12 Dmitry V. Levin + + Fix nfsservctl syscall entries. + * linux/arc/syscallent.h (nfsservctl): Set nargs, sys_func, and sys_name. + * linux/metag/syscallent.h: Likewise. + + Add missing syscall entries for sched_[gs]etattr and renameat2. + * linux/alpha/syscallent.h (sched_setattr, sched_getattr, renameat2): + New syscall entries. + * linux/arc/syscallent.h: Likewise. + * linux/metag/syscallent.h: Likewise. + * linux/or1k/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/tile/syscallent1.h: Likewise. + + Fix NUMA related syscall entries. + * linux/alpha/syscallent.h (mbind, get_mempolicy, set_mempolicy): + Set sys_func. + * linux/hppa/syscallent.h (mbind, get_mempolicy, set_mempolicy): + Fix nargs, set sys_func. + * linux/microblaze/syscallent.h (mbind): Fix nargs. + * linux/mips/syscallent-n32.h (move_pages): Set sys_func. + * linux/mips/syscallent-n64.h (move_pages): Likewise. + * linux/mips/syscallent-o32.h (mbind): Fix nargs. + * linux/or1k/syscallent.h (migrate_pages): Likewise. + * linux/powerpc/syscallent.h (migrate_pages): Likewise. + * linux/sh/syscallent.h (mbind): Likewise. + * linux/sh64/syscallent.h (mbind): Likewise. + + xtensa: fix syscall entries. + * linux/xtensa/syscallent.h (sendmmsg): Fix sys_func and sys_name. + (restart_syscall, io_setup, io_destroy, io_submit, io_getevents, + io_cancel, add_key, request_key, keyctl): Set sys_func. + (migrate_pages, mbind, get_mempolicy, set_mempolicy, move_pages, + fstatat64): Fix nargs. + (renameat2): New entry. + + Fix sched_setparam syscall entries. + * linux/aarch64/syscallent1.h (sched_setparam): Change nargs to 2. + * linux/arm/syscallent.h (sched_setparam): Likewise. + * linux/avr32/syscallent.h (sched_setparam): Likewise. + * linux/bfin/syscallent.h (sched_setparam): Likewise. + * linux/i386/syscallent.h (sched_setparam): Likewise. + * linux/m68k/syscallent.h (sched_setparam): Likewise. + * linux/microblaze/syscallent.h (sched_setparam): Likewise. + * linux/s390/syscallent.h (sched_setparam): Likewise. + * linux/s390x/syscallent.h (sched_setparam): Likewise. + * linux/sh/syscallent.h (sched_setparam): Likewise. + * linux/sh64/syscallent.h (sched_setparam): Likewise. + * linux/tile/syscallent.h (sched_setparam): Likewise. + * linux/tile/syscallent1.h (sched_setparam): Likewise. + * linux/x32/syscallent.h (sched_setparam): Likewise. + * linux/x86_64/syscallent.h (sched_setparam): Likewise. + + arc: fix fanotify_mark syscall entry. + * linux/arc/syscallent.h (fanotify_mark): Change nargs to 6. + + ia64: add fallocate syscall entry. + * linux/ia64/syscallent.h (fallocate): Add syscall entry. + + Fix lookup_dcookie syscall entries. + * linux/s390/syscallent.h (lookup_dcookie): Add syscall entry. + * linux/s390x/syscallent.h (lookup_dcookie): Likewise. + * linux/tile/syscallent.h (lookup_dcookie): Change nargs to 3. + * linux/x32/syscallent.h (lookup_dcookie): Likewise. + + aarch64: fix syscall names for statfs, fstatfs, truncate, and ftruncate. + * linux/aarch64/syscallent1.h (statfs, fstatfs, truncate, ftruncate): + Use correct syscall names. + + aarch64: fix mlock syscall entry. + * linux/aarch64/syscallent1.h (mlock): Change to mlock entry. + + sh, sh64: fix mlock syscall entry. + * linux/sh/syscallent.h (mlock): Change nargs to 2. + * linux/sh64/syscallent.h (mlock): Likewise. + + tile: fix swapon syscall entries. + * linux/tile/syscallent.h (swapon): Change nargs to 2. + * linux/tile/syscallent1.h (swapon): Likewise. + +2015-01-12 Dmitry V. Levin + + ARM EABI: reserve some space for new syscalls. + Reserve the same space for new syscalls on EABI as it is already + reserved on OABI. + + * linux/arm/syscallent.h [__ARM_EABI__] (ARM_FIRST_SHUFFLED_SYSCALL): + Raise to 400. + +2015-01-12 Dmitry V. Levin + + arm: rewrite shuffle_scno in a bit more readable way. + * linux/arm/syscallent.h: Define ARM_FIRST_SHUFFLED_SYSCALL instead of + ARM_LAST_ORDINARY_SYSCALL. + * syscall.c [ARM || AARCH64] (shuffle_scno): Update. + + tests: add tests for ipc syscalls decoding. + * tests/ipc_msg.c: New file. + * tests/ipc_sem.c: Likewise. + * tests/ipc_shm.c: Likewise. + * tests/ipc_msg.test: New test. + * tests/ipc_sem.test: Likewise. + * tests/ipc_shm.test: Likewise. + * tests/Makefile.am (check_PROGRAMS): Add ipc_msg, ipc_sem, and ipc_shm. + (TESTS): Add ipc_msg.test, ipc_sem.test, and ipc_shm.test. + * tests/.gitignore: Add ipc_msg, ipc_sem, and ipc_shm. + +2015-01-12 Dmitry V. Levin + + Fix indirect ipc subcall handling. + indirect_ipccall used to guess whether currently decoded ipc syscall is + an indirect subcall or not based on generic knowledge, while there is a + robust method to identify indirect ipc subcalls. + + * defs.h (TRACE_INDIRECT_SUBCALL): New flag. + * ipc.c (indirect_ipccall): Check it. + * linux/subcall.h: Set it. + +2015-01-12 Dmitry V. Levin + + Move socket and ipc subcall entries to subcall.h. + Syscall entries for socket and ipc subcalls are the same on all + architectures, or at least they should be the same, so move them + to the single file. + + * linux/subcall.h: Add syscall entries for socket and ipc subcalls. + * linux/arm/syscallent.h: Remove entries for socket and ipc subcalls. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + +2015-01-12 Dmitry V. Levin + + sh: fix typo introduced by commit v4.9-121-gd535b8b. + * linux/sh/syscallent.h (getresgid32): Fix typo in sys_func and sys_name. + +2015-01-10 Dmitry V. Levin + + Fix fanotify_mark decoding on 32-bit architectures. + The fanotify_mark syscall takes a 64-bit mask, and on 32-bit + architectures it is split up into two syscall arguments. + + * configure.ac (AC_CHECK_FUNCS): Add fanotify_mark. + (AC_CHECK_HEADERS): Add sys/fanotify.h. + * defs.h (getllval): New prototype. + * util.c (getllval): New function based on printllval. + (printllval): Use getllval. + * fanotify.c (sys_fanotify_mark): Use getllval to properly decode + 64-bit mask and two syscall arguments followed by it. + * tests/fanotify_mark.c: New file. + * tests/fanotify_mark.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add fanotify_mark. + (TESTS): Add fanotify_mark.test. + * tests/.gitignore: Add fanotify_mark. + +2015-01-09 Dmitry V. Levin + + v4l2: fix build on systems with older kernel headers. + * v4l2.c (print_v4l2_format_fmt): Do not use + V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY unless it is defined. + (v4l2_ioctl): Do not use VIDIOC_ENUM_FRAMESIZES and + VIDIOC_ENUM_FRAMEINTERVALS unless they are defined. + +2015-01-09 Dmitry V. Levin + + tests: fix build with awk that does not support switch-case. + The switch-case statement is a gawk-specific feature which is not + necessarily available, let's use traditional if-else statements instead. + + * tests/uid.awk: Rewrite without switch-case statements. + +2015-01-09 Dmitry V. Levin + + Fix build on systems that lack O_CLOEXEC definition. + * xlat/timerfdflags.in [!TFD_CLOEXEC]: Check that O_CLOEXEC is defined. + +2015-01-09 Dmitry V. Levin + + Fix build on systems that lack NETLINK_SOCK_DIAG definition. + NETLINK_INET_DIAG was introduced in linux v2.6.14, + NETLINK_SOCK_DIAG was added much later in linux v3.3. + + * net.c [!NETLINK_SOCK_DIAG && NETLINK_INET_DIAG] + (NETLINK_SOCK_DIAG): Define. + * socketutils.c: Likewise. + * tests/netlink_unix_diag.c: Likewise. + +2015-01-09 Dmitry V. Levin + + Cleanup local copy of linux/fanotify.h. + * linux/fanotify.h: Remove macros and structures not used by + fanotify_init and fanotify_mark parsers. + + Fix "make dist" regression introduced by commit v4.9-125-g120e5db. + * Makefile.am (EXTRA_DIST): Add linux/unix_diag.h. + +2015-01-08 Dmitry V. Levin + + tests: fix build with fresh glibc. + * tests/netlink_unix_diag.c: Include . + +2015-01-08 Dmitry V. Levin + + ioctlent.sh: handle linux/aufs_type.h properly. + Before this change, ioctlent.sh could not recognize unusual constants + defined by linux/aufs_type.h, resulting to ioctls.h with references to + these constants without appropriate definitions in ioctldefs.h. + + * linux/ioctlent.sh: Update the regexp that is used to lookup constants + referenced by generated ioctls.h. + +2015-01-08 Dmitry V. Levin + + tests: fix distcheck. + * tests/stat32-v.test: Remove work files if the test is skipped. + + Fix printing of time_t values set in the distant future. + * util.c (sprinttime): Increase buffer size. + * tests/stat64-v.test: Try to set modification time of the sample file + to a value set in the distant future. + + Use AC_CHECK_TYPES to check for struct statfs64. + * m4/statfs.m4: Remove. + * configure.ac (AC_STATFS64): Remove. + (AC_CHECK_TYPES): Add struct statfs64. + * statfs.c: Replace HAVE_STATFS64 with HAVE_STRUCT_STATFS64. + + Use AC_CHECK_TYPES to check for struct stat64. + * m4/stat.m4: Remove. + * configure.ac (AC_STAT64): Remove. + (AC_CHECK_TYPES): Add struct stat64. + * file.c: Replace HAVE_STAT64 with HAVE_STRUCT_STAT64. + + file.c: fix 32-bit stat decoding on 64-bit architectures. + * file.c [SPARC || SPARC64] (struct stat): Remove, use generic + definition from . + [SPARC64] (struct stat_sparc64, printstat_sparc64): Remove. + [AARCH64 || X86_64 || X32 || POWERPC64 || SPARC64] (struct stat32, + STAT32_PERSONALITY): Define. + [STAT32_PERSONALITY] (struct stat_powerpc32): Rename to struct stat32. + [STAT32_PERSONALITY] (printstat_powerpc32): Rename to printstat32. + (printstat) [STAT32_PERSONALITY]: Call printstat32 when + current_personality == STAT32_PERSONALITY. + [HAVE_STAT64] (printstat64) [STAT32_PERSONALITY]: Call printstat when + current_personality != STAT32_PERSONALITY. + [!HAVE_STAT64] (sys_stat64): Fallback to sys_stat. + [!HAVE_STAT64] (sys_fstat64): Fallback to sys_fstat. + + sparc: reuse struct stat parser code for struct solstat decoding. + * printstat.h: Parametrize major() and minor(). + * file.c [SPARC || SPARC64]: Define do_printstat_sol by instantiating + printstat.h template. + [SPARC || SPARC64] (printstatsol): Use do_printstat_sol. + + ppc64: reuse struct stat parser code for struct stat_powerpc32 decoding. + * file.c [POWERPC64]: Define do_printstat32 by instantiating printstat.h + template. + [POWERPC64] (printstat_powerpc32): Use do_printstat32. + + file.c: group related parsers together. + * file.c (sys_stat, sys_fstat): Collect in one place right before + the definition of printstat64. + (sys_stat64, sys_fstat64): Collect in one place right after the + definition of printstat64. + + file.c: collect scattered __old_kernel_stat related code. + * file.c [HAVE_STRUCT___OLD_KERNEL_STAT] (convertoldstat, printoldstat, + sys_oldstat, sys_oldfstat): Collect functions in one place. + + Use the same source code for struct stat/stat64 decoding. + * file.c: Define do_printstat64 by instantiating printstat.h template. + (printstat64): Use do_printstat64. + + x32: use generic printstat/printstat64 parsers. + * file.c (printstat) [X32]: Define. + (printstat64) [X32]: Use "struct stat64" instead of "struct stat". + Use printstat for x32 personality processes. + (printstat64_x32): Remove. + (sys_stat64, sys_fstat64) [X32]: Use printstat64 instead of + printstat64_x32. + + x32: remove redundant definitions. + * file.c [X32]: Do not define "struct stat" and "struct + __old_kernel_stat" locally, use definitions provided by . + Do not define "struct stat64" exclusively, reuse another definition + added earlier for X86_64. + + Convert do_printstat to a template function. + * printstat.h: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c: Include "printstat.h". + (do_printstat): Move to printstat.h, parametrize its name + and struct stat. + + file.c: prepare realprintstat for parametrization. + * file.c (realprintstat): Adjust format strings so that all 64-bit + integer fields are printed with %llu format, and %u format is used for + all the rest. Rename to do_printstat. + (printstat, printoldstat): Update callers. + + tests: cleanup stat.test. + * tests/stat.test: Rewrite in a more readable way. + + tests: check verbose decoding of 32-bit and 64-bit struct stat. + * tests/stat.c: New file. + * tests/stat32.c: Likewise. + * tests/stat32-v.test: New file. + * tests/stat64-v.test: Likewise. + * tests/Makefile.am (check_PROGRAMS): Add stat and stat32. + (stat_CFLAGS): Define. + (TESTS): Add stat32-v.test and stat64-v.test. + * tests/.gitignore: Add stat and stat32. + +2015-01-07 Dmitry V. Levin + + Cleanup struct stat.st_flags decoding. + There are no symbolic constants defined for struct stat.st_flags, + so decode this rare field as unsigned int. + + * xlat/fileflags.in: Remove. + * file.c (realprintstat, printstat64) [HAVE_STRUCT_STAT_ST_FLAGS]: + Decode struct stat.st_flags as unsigned int. + +2015-01-07 Dmitry V. Levin + + Drop struct stat.st_aclcnt and stat.st_level support. + Remove the code that supports struct stat.st_aclcnt and stat.st_level + decoding -- these fields are not defined in system headers. + + * configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_aclcnt and + struct stat.st_level. + * file.c (realprintstat, printstat64) + [HAVE_STRUCT_STAT_ST_ACLCNT || HAVE_STRUCT_STAT_ST_LEVEL]: Remove. + +2015-01-07 Dmitry V. Levin + + tests: fix race condition in net-accept-connect based tests. + Change all net-accept-connect based tests to use different unix domain + socket addresses, so that these tests could be safely run in parallel. + + * tests/net-accept-connect.c: Parametrize unix domain socket address. + * tests/net-fd.test: Pass socket address to net-accept-connect. + * tests/net.test: Likewise. + * tests/unix-yy.test: Likewise. + * tests/unix-yy-accept.awk: Update regexps. + * tests/unix-yy-connect.awk: Likewise. + +2014-12-31 Mike Frysinger + + timerfd: update flags decoding. + The current code only decodes TFD_TIMER_ABSTIME when the kernel has + a bunch of newer flags. We have to handle fallbacks for all of them + since the kernel doesn't currently export things to userspace. + + * time.c: Include fcntl.h for O_* defines. + (TFD_TIMER_ABSTIME): Move to xlat/timerfdflags.in. + * xlat/timerfdflags.in: Add more definitions. + +2014-12-29 Dmitry V. Levin + + sparc: fix fxstat decoding. + * file.c [SPARC || SPARC64] (sys_fxstat): Print file descriptor + using printfd. + +2014-12-29 Dmitry V. Levin + + sparc: drop _STAT64_VER support. + Starting with commit v4.6-240-g5afdf12, nobody compiles this + non-Linux code. + + * file.c [SPARC || SPARC64] (sys_xstat, sys_fxstat): Remove + _STAT64_VER code. + +2014-12-29 Dmitry V. Levin + + sparc: remove redundant sys_lxstat. + * file.c [SPARC || SPARC64] (sys_lxstat): Remove. + * linux/sparc/dummy2.h (solaris_lxstat): Alias to sys_xstat. + * linux/sparc64/dummy2.h (solaris_lxstat): Likewise. + +2014-12-28 Dmitry V. Levin + + file.c: do not include unused headers. + * file.c: Do not include . + +2014-12-27 Dmitry V. Levin + + Cleanup UTIME_NOW/UTIME_OMIT decoding. + Move the code that's present in two copies from sprinttv() + to a new helper function. + + * time.c (do_sprinttv): New function. + (sprinttv): Use it. + +2014-12-27 Elliott Hughes + + Fix UTIME_NOW/UTIME_OMIT decoding. + The kernel doesn't actually care what tv_sec is set to --- it only checks + tv_nsec when looking for the special values. + +2014-12-26 Dmitry V. Levin + + Make -yy output for inet sockets consistent with unix domain sockets. + Prepend -yy output generated for INET/INET6 TCP/UDP sockets with their + protocol name obtained using getxattr. + + * socketutils.c (inet_parse_response): Add proto_name argument. + Print proto_name for connected and unconnected sockets. + (receive_responses): Add proto_name argument, pass it to the parser. + (inet_print): Add proto_name argument, pass it to receive_responses. + (unix_parse_response): Add proto_name argument. + (print_sockaddr_by_inode): Pass protocol name to inet_print calls. + * tests/net-yy-accept.awk: Update to match new output format. + * tests/net-yy-connect.awk: Likewise. + +2014-12-25 Dmitry V. Levin + + tests: robustify unix domain socket decoding test. + Unix domain socket address family name is not universally decoded as + AF_LOCAL, other names like AF_UNIX and AF_FILE are valid synonyms. + Similarly, PF_UNIX and PF_FILE are valid synonyms for PF_LOCAL. + + Some test regexps have to be properly initialized before they could + be used, so make sure they are initialized before use. + +2014-12-25 Dmitry V. Levin + + tests: fix unix domain socket decoding availability test. + Since inet_diag and unix_diag interfaces are implemented by different + kernel modules, they have to be tested separately. + + * tests/netlink_unix_diag.c: New file. + * tests/unix-yy.test: Use it. + * tests/Makefile.am (check_PROGRAMS): Add it. + * tests/.gitignore: Likewise. + +2014-12-25 Masatake YAMATO + + tests: add a test for decoding unix domain socket addresses. + * tests/unix-yy-accept.awk: New file. + * tests/unix-yy-connect.awk: New file. + * tests/unix-yy.test: New test. + * tests/Makefile.am (TESTS): Add it. + (EXTRA_DIST): Add unix-yy-accept.awk and unix-yy-connect.awk. + +2014-12-25 Masatake YAMATO + + Support unix domain sockets in -yy option. + This change extends -yy option to handle unix domain sockets: + their peer addresses will be printed, similar to inet sockets. + + For a listening socket, its socket inode and socket path are printed. + For an accepted socket, its socket inode, the peer inode, and the + socket path are printed. + For a client socket, its socket inode and the peer inode are printed. + + An example of a server side communication using netcat: + + $ ./strace -yy -e network nc -l -U /tmp/example.sock + socket(PF_LOCAL, SOCK_STREAM, 0) = 3 + setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 + bind(3, {sa_family=AF_LOCAL, sun_path="/tmp/example.sock"}, 19) = 0 + listen(3, 10) = 0 + accept(3, {sa_family=AF_LOCAL, NULL}, [2]) = 414727245,"/tmp/example.sock"]> + recvfrom(414727245,"/tmp/example.sock"]>, "INPUT\n", 8192, 0, NULL, NULL) = 6 + INPUT + + An example of a client side communication using netcat: + + $ ./strace -yy -e network nc -U /tmp/example.sock + socket(PF_LOCAL, SOCK_STREAM, 0) = 3 + connect(3, {sa_family=AF_LOCAL, sun_path="/tmp/example.sock"}, 19) = 0 + getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 + INPUT + ... + sendto(314727246]>, "INPUT\n", 6, 0, NULL, 0) = 6 + + * linux/unix_diag.h: New file. + * socketutils.c (send_query): Rename to inet_send_query. + (parse_response): Rename to inet_parse_response. + (unix_print, unix_send_query, unix_parse_response): New functions. + (receive_responses): Add a new argument named parser: a function for + handling protocol specific data parts of diag messages. + (print_sockaddr_by_inode): Call unix_print. + Replace NETLINK_INET_DIAG with NETLINK_SOCK_DIAG, they are equal + but NETLINK_SOCK_DIAG looks more generic. + +2014-12-16 Masatake YAMATO + + Use the protocol name of a socket as a hint for peer address resolution. + To resolve the peer address of socket, all combinations of families + (AF_INET, AF_INET6) and protocols(IPPROTO_TCP, IPPROTO_UDP) were tried. + This change utilizes the protocol name obtained via getxattr to specify + the right combination. + + * socketutils.c (inet_print): New helper function. + (print_sockaddr_by_inode): Use it. Utilize the protocol name + associated with the given inode for resolving the peer socket + address. If the protocol name is NULL, resolve the address + by trying combinations of families and protocols as before. + * defs.h (print_sockaddr_by_inode): Update prototype. + * util.c (printfd): Pass the protocol name associated with + the given path to print_sockaddr_by_inode as the 2nd argument. + +2014-12-16 Dmitry V. Levin + + Fix decoding of getgroups, getgroups32, setgroups, and setgroups32 syscalls + Convert parsers of these syscalls to the same scheme as were applied to + parsers of other uid/gid related syscalls. + That is, define two sets of parsers on architectures that support + (either directly or via multiarch) 16-bit and 32-bit gid getgroups + and setgroups syscalls simultaneously, and reuse essentially the same + code by parametrizing uid_t and names of parser functions. + + * groups.c: Remove. + (sys_getgroups, sys_setgroups): Move ... + * uid.c: ... here and parametrize their names. + * Makefile.am (strace_SOURCES): Remove groups.c. + * linux/syscall.h (sys_getgroups32, sys_setgroups32): Remove. + [NEED_UID16_PARSERS] (sys_getgroups16, sys_setgroups16): New prototypes. + * linux/arm/syscallent.h: Rename sys_[gs]etgroups to sys_[gs]etgroups16, + rename sys_[gs]etgroups32 to sys_[gs]etgroups. + * linux/bfin/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * tests/uid.c: Test for getgroups. + * tests/uid16.c: Likewise. + * tests/uid32.c: Test for getgroups32. + * tests/uid.awk: Test for getgroups/getgroups32 decoding. + * tests/uid.test: Trace getgroups/getgroups32 syscalls. + +2014-12-16 Dmitry V. Levin + + Fix decoding of 16-bit *chown and [gs]et*[gu]id syscalls. + Define two sets of parsers on architectures that support (either + directly or via multiarch) 16-bit and 32-bit uid/gid syscalls + simultaneously. Since the code in these two sets is essentially + the same and the key difference between them is the size of uid_t, + implement it by parametrizing uid_t and names of parser functions. + + * defs.h (NEED_UID16_PARSERS): New macro. + * linux/syscall.h [NEED_UID16_PARSERS] (sys_chown16, sys_fchown16, + sys_getresuid16, sys_getuid16, sys_setfsuid16, sys_setresuid16, + sys_setreuid16, sys_setuid16): New prototypes. + * linux/dummy.h (sys_geteuid16): Alias to sys_getuid16. + (sys_getegid16, sys_getgid16, sys_getresgid16, sys_setfsgid16, + sys_setgid16, sys_setregid16, sys_setresgid16): Alias to corresponding + sys_*uid16 functions. + * uid.c: Stop including . + Parametrize uid_t and names of all exported functions. + (get_print_uid): New function. + (sys_getresuid): Use it. + (printuid): Check for (uid_t) -1. + * uid16.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * linux/arm/syscallent.h: Use sys_chown16, sys_fchown16, sys_getegid16, + sys_geteuid16, sys_getgid16, sys_getresgid16, sys_getresuid16, + sys_getuid16, sys_setfsgid16, sys_setfsuid16, sys_setgid16, + sys_setregid16, sys_setresgid16, sys_setresuid16, sys_setreuid16, + and sys_setuid16 parsers for *chown and [gs]et*[gu]id syscall entries. + * linux/bfin/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * tests/uid16.c: New file. + * tests/uid16.test: New test. + * tests/Makefile.am (CHECK_PROGRAMS): Add uid16. + (TESTS): Add uid16.test. + * tests/.gitignore: Add uid16. + +2014-12-16 Dmitry V. Levin + + sh, sh64: fix uid/gid syscall entries. + * linux/sh/syscallent.h: Replace printargs with real syscall + parsers in *chown32 and [gs]et*[gu]id32 syscall entries. + * linux/sh64/syscallent.h: Likewise. + + s390: fix uid/gid syscall entries. + * linux/s390/syscallent.h: Add "32" suffix to names of *chown32 + and [gs]et*[gu]id32 syscalls #198..216. + + sparc: fix uid/gid syscall entries. + * linux/sparc/syscallent.h: Add "32" suffix to names + of [gs]etres[gu]id32 syscalls #108..112. + Fix entry for syscall #112 from setresgid32 to setregid32. + +2014-12-15 Dmitry V. Levin + + chown.c: split into separate files. + This will make further uid/gid fixes simpler. + + * fchownat.c: New file. + * chown.c (sys_fchownat: Move to fchownat.c. + (sys_chown, sys_fchown): Move to uid.c. + * Makefile.am (strace_SOURCES): Remove chown.c, add fchownat.c. + +2014-12-15 Dmitry V. Levin + + util.c: move printuid to uid.c. + This will make further uid/gid fixes simpler. + + * util.c (printuid): Move + * uid.c: ... here. + +2014-12-15 Dmitry V. Levin + + tests/uid.awk: rewrite in a more maintainable style. + Since the test is virtually a FSM, rewrite it as a FSM. + +2014-12-14 Dmitry V. Levin + + printuid: fix uid_t decoding on 64-bit architectures. + It was not a good idea to treat uid_t as a long int type because + the latter is twice larger than uid_t on 64-bit architectures. + + * defs.h (printuid): Change uid argument type from "unsigned long" + to "unsigned int". + * util.c (printuid): Likewise. When uid equals to -1, print "-1". + * tests/uid.awk: New file. + * tests/uid.c: New file. + * tests/uid32.c: Likewise. + * tests/uid.test: New test. + * tests/uid32.test: Likewise. + * tests/Makefile.am (CHECK_PROGRAMS): Add uid and uid32. + (TESTS): Add uid.test and uid32.test. + (EXTRA_DIST): Add uid.awk. + * tests/.gitignore: Add uid and uid32. + +2014-12-13 Dmitry V. Levin + + Update PTRACE_* constants. + * xlat/ptrace_cmds.in: Add PTRACE_PEEKSIGINFO, PTRACE_GETSIGMASK, + and PTRACE_SETSIGMASK. + + Update SWAP_FLAG_* constants. + * swapon.c: Ensure that SWAP_FLAG_DISCARD_ONCE and + SWAP_FLAG_DISCARD_PAGES are defined. + * xlat/swap_flags.in: Add SWAP_FLAG_DISCARD_ONCE and + SWAP_FLAG_DISCARD_PAGES. + +2014-12-11 Dmitry V. Levin + + Update SCHED_* constants. + * xlat/schedulers.in: Add SCHED_BATCH, SCHED_ISO, SCHED_IDLE, and + SCHED_DEADLINE. + + Update prctl PR_* constants. + * xlat/prctl_options.in: Add PR_SET_THP_DISABLE, PR_GET_THP_DISABLE, + PR_MPX_ENABLE_MANAGEMENT, and PR_MPX_DISABLE_MANAGEMENT. + +2014-12-11 Dmitry V. Levin + + Always compile sys_prctl parser. + Since sys_prctl is referenced by syscallent files unconditionally, + conditional compilation of sys_prctl depending on prctl availability is + pointless. + + * prctl.c (unalignctl_string, sys_prctl): Compile unconditionally. + +2014-12-11 Dmitry V. Levin + + process.c: split struct_user_offsets into architecture-specific include files + * Makefile.am (EXTRA_DIST): Add linux/alpha/userent.h, + linux/arm/userent.h, linux/avr32/userent.h, linux/bfin/userent.h, + linux/crisv10/userent.h, linux/crisv32/userent.h, + linux/i386/userent.h, linux/i386/userent0.h, linux/ia64/userent.h, + linux/m68k/userent.h, linux/microblaze/userent.h, + linux/mips/userent.h, linux/or1k/userent.h, linux/powerpc/userent.h, + linux/s390/userent.h, linux/s390/userent0.h, linux/s390/userent1.h, + linux/s390x/userent.h, linux/sh/userent.h, linux/sh/userent0.h, + linux/sh64/userent.h, linux/sparc/userent.h, linux/sparc64/userent.h, + linux/tile/userent.h, linux/userent.h, linux/userent0.h, + linux/x32/userent.h, linux/x86_64/userent.h, and + linux/xtensa/userent.h. + * process.c (struct_user_offsets): Split into architecture-specific + include files, inculde userent.h. + + process.c: include less headers. + * process.c: Do not include and . + Reorder inclusion of xlat header files. + + Unexport struct_user_offsets. + * defs.h (struct_user_offsets): Remove. + * process.c (struct_user_offsets): Make static. + +2014-12-11 Dmitry V. Levin + + process.c: introduce XLAT_UOFF macro. + Introduce XLAT_UOFF macro and use it to automatically transform + struct_user_offsets array into a more readable and compact form. + + for n in $(sed -n 's/^[[:space:]]*{[[:space:]]*uoff(\([a-z_0-9]\+\)),.*/\1/p' process.c |sort -u); do + sed -i 's/^\([[:space:]]*\){[[:space:]]*uoff('"$n"'),[[:space:]]*"offsetof(struct user,[[:space:]]*'"$n"')"[[:space:]]*},$/\1XLAT_UOFF('"$n"'),/' process.c + done + + * process.c (XLAT_UOFF): New macro. + (struct_user_offsets): Use it. + +2014-12-11 Dmitry V. Levin + + process.c: move sethostname and gethostname parsers to a separate file. + * hostname.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c (sys_sethostname, sys_gethostname): Move to hostname.c. + + process.c: move exit parser to a separate file. + * exit.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c (sys_exit): Move to exit.c. + + process.c: move clone, setns, unshare, and fork parsers to a separate file + * clone.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c: Move sys_clone, sys_setns, sys_unshare, sys_fork, and + related code to clone.c. + + process.c: move get*uid and set*uid parsers to a separate file. + * uid.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c (sys_getuid, sys_setfsuid, sys_setuid, sys_getresuid, + sys_setreuid, sys_setresuid): Move to uid.c. + + process.c: move getgroups* and setgroups* parsers to a separate file. + * groups.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c: Move sys_setgroups, sys_getgroups, sys_setgroups32, + sys_getgroups32, and related code to groups.c. + + process.c: move execve and execv parsers to a separate file. + * execve.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c: Move sys_execve, sys_execv, and related code to execve.c. + + process.c: move waitpid, wait4, osf_wait4, and waitid parsers to a separate file + * wait.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c: Move sys_waitpid, sys_wait4, sys_osf_wait4, sys_waitid and + related code to wait.c. + + process.c: move uname parser to a separate file. + * uname.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c (sys_uname): Move to uname.c. + + process.c: move futex parser to a separate file. + * futex.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c: Move sys_futex and related code to futex.c. + + process.c: move get_robust_list parser to a separate file. + * get_robust_list.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c (sys_get_robust_list): Move to get_robust_list.c. + + process.c: move sched_* parsers to a separate file. + * sched.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c: Move sys_sched_getscheduler, sys_sched_setscheduler, + sys_sched_getparam, sys_sched_setparam, sys_sched_get_priority_min, + sys_sched_rr_get_interval, and related code to sched.c. + + process.c: move sched_setaffinity and sched_getaffinity parsers to a separate file + * affinity.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c (sys_sched_setaffinity, sys_sched_getaffinity): Move + to affinity.c. + + process.c: move prctl and arch_prctl parsers to a separate file. + * prctl.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c: Move sys_prctl, sys_arch_prctl, and related code to prctl.c. + + process.c: move getcpu parser to a separate file. + * getcpu.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c (sys_getcpu): Move to getcpu.c. + + process.c: move process_vm_readv and process_vm_writev parsers to a separate file + * process_vm.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * process.c (sys_process_vm_readv, sys_process_vm_writev): Move + to process_vm.c. + + Implement decoding of fallocate FALLOC_FL_* flags. + * xlat/falloc_flags.in: New file. + * configure.ac (AC_CHECK_HEADERS): Add linux/falloc.h. + * fallocate.c [HAVE_LINUX_FALLOC_H]: Include . + Include xlat/falloc_flags.h. + (sys_fallocate): Decode flags. + + Fix decoding of renameat2 RENAME_* flags. + * renameat.c: Include where RENAME_NOREPLACE, + RENAME_EXCHANGE, and RENAME_WHITEOUT are usually defined. + + file.c: move open, openat, and creat parsers to a separate file. + * open.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c: Move sys_open, sys_openat, sys_creat, and related code + to open.c. + + file.c: move access and faccessat parsers to a separate file. + * access.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c: Move sys_access, sys_faccessat and related code to access.c. + + file.c: move umask parser to a separate file. + * umask.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (sys_umask): Move to umask.c. + + file.c: move lseek and llseek parsers to a separate file. + * lseek.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c: Move sys_lseek, sys_llseek, and related code to lseek.c. + + file.c: move readahead parser to a separate file. + * readahead.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (sys_readahead): Move to readahead.c. + + file.c: move truncate, truncate64, ftruncate, and ftruncate64 parsers to a separate file + * truncate.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (sys_truncate, sys_truncate64, sys_ftruncate, sys_ftruncate64): + Move to truncate.c. + + file.c: move chdir parser to a separate file. + * chdir.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (sys_chdir): Move to chdir.c. + + file.c: move link, linkat, unlinkat, and symlinkat parsers to a separate file + * link.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c: Move sys_link, sys_linkat, sys_unlinkat, sys_symlinkat, and + related code to link.c. + + file.c: move readlink and readlinkat parsers to a separate file. + * readlink.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (decode_readlink, sys_readlink, sys_readlinkat): Move + to readlink.c. + + file.c: move renameat and renameat2 parsers to a separate file. + * renameat.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c: Move sys_renameat, sys_renameat2, and related code + to renameat.c. + + file.c: move chown, fchown, and fchownat parsers to a separate file. + * chown.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (sys_chown, sys_fchownat, sys_fchown): Move to chown.c. + + Export at_flags. + * defs.h (at_flags): New prototype. + + file.c: move chmod, fchmod, and fchmodat parsers to a separate file. + * chmod.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (sys_chmod, sys_fchmodat, sys_fchmod): Move to chmod.c. + + file.c: move utimes, futimesat, utimensat, and osf_utimes parsers to a separate file + * utimes.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (decode_utimes, sys_utimes, sys_futimesat, sys_utimensat, + sys_osf_utimes): Move to utimes.c. + + file.c: move utime parser to a separate file. + * utime.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (sys_utime): Move to utime.c. + + Export sprinttime. + * defs.h (sprinttime): New prototype. + * file.c (sprinttime): Make global and move to util.c. + + file.c: move mknod, mknodat, and xmknod parsers to a separate file. + * mknod.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c: Move sys_mknod, sys_mknodat, sys_xmknod, and related code + to mknod.c. + + file.c: export sprintmode and move it to a separate file. + * printmode.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * defs.h (sprintmode): New prototype. + * file.c (sprintmode): Make global and move to printmode.c. + + file.c: move getcwd parser to a separate file. + * getcwd.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (sys_getcwd): Move to getcwd.c. + + file.c: move *xattr parsers to a separate file. + * xattr.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c: Move sys_setxattr, sys_fsetxattr, sys_getxattr, sys_fgetxattr, + sys_listxattr, sys_flistxattr, sys_removexattr, sys_fremovexattr, + and related code to xattr.c. + + file.c: move fadvise64 and fadvise64_64 parsers to a separate file. + * fadvise.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c: Move sys_fadvise64, sys_fadvise64_64, and related code + to fadvise.c. + + file.c: move sync_file_range and sync_file_range2 parsers to a separate file + * sync_file_range.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c: Move sys_sync_file_range, sys_sync_file_range2, and related + code to sync_file_range.c. + + file.c: move fallocate parser to a separate file. + * fallocate.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (sys_fallocate): Move to fallocate.c. + + file.c: move swapon parser to a separate file. + * swapon.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c: Move sys_swapon and related code to swapon.c. + +2014-12-06 Dmitry V. Levin + + Implement full decoding of 64-bit capabilities. + Unlike v1 capabilities which are 32-bit, v2 and v3 are 64-bit, but + before this change only lower 32 capability bits were decoded for + v2 and v3. + + * xlat/capabilities1.in: New file. + * capability.c: Define v2/v3 CAP_* constants. + Include xlat/capabilities1.h. + (get_cap_header): New function. + (print_cap_header): Update to use get_cap_header result. + (print_cap_data): Decoder higher capability bits for v2 and v3. + (sys_capget, sys_capset): Use get_cap_header, update print_cap_header + and print_cap_data calls. + * tests/caps.c: New file. + * tests/caps.awk: New file. + * tests/caps.test: New test. + * tests/Makefile.am (CHECK_PROGRAMS): Add caps. + (TESTS): Add caps.test. + (EXTRA_DIST): Add caps.awk. + +2014-12-06 Dmitry V. Levin + + Make parsers of capget and capset syscalls self-contained. + Various versions of used to require different + workarounds to avoid conflicts with types defined by libc headers. + Define all required types and constants locally to fix this issue. + + * configure.ac (AC_CHECK_HEADERS): Remove linux/capability.h. + * capability.c: Do not include , remove workarounds + for problematic versions of file. + Define CAP_* and _LINUX_CAPABILITY_VERSION_* constants as enums. + (struct __user_cap_header_struct, struct __user_cap_data_struct): Define. + * xlat/cap_version.in: Add #unconditional. + * xlat/capabilities.in: Likewise. + +2014-12-04 Dmitry V. Levin + + Remove system.c. + All disjoint parts of system.c have been moved to separate files. + + * system.c: Remove. + * Makefile.am (strace_SOURCES): Remove it. + +2014-12-04 Dmitry V. Levin + + Move mount parser to a separate file. + * mount.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * system.c: Move sys_mount and related code to mount.c. + + Move umount2 parser to a separate file. + * umount.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * system.c: Move sys_umount2 and related code to umount.c. + + Move personality parser to a separate file. + * personality.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * system.c: Move sys_personality and related code to personality.c. + + Move syslog parser to a separate file. + * syslog.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * system.c: Move sys_syslog and related code to syslog.c. + + Move cacheflush parser to a separate file. + * cacheflush.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * system.c: Move inclusion of to cacheflush.c. + [M68K, BFIN, SH]: Move to cacheflush.c. + + bfin: move sram_alloc parser to a separate file. + * sram_alloc.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * system.c [BFIN]: Move sys_sram_alloc and related code to sram_alloc.c. + + Move capget and capset parsers to a separate file. + * capability.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * system.c: Move inclusion of headers and macro definitions related + to capget and capset decoding to capability.c. + (print_cap_header, print_cap_data, sys_capget, sys_capset): Move + to capability.c. + +2014-12-03 Dmitry V. Levin + + Move sysctl parser to a separate file. + * sysctl.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * system.c: Move sys_sysctl and related code to sysctl.c. + + mips: move sysmips parser to a separate file. + * sysmips.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * system.c: Fix typo in the check for . + Move inclusions of and to sysmips.c. + [MIPS]: Likewise. + + or1k: move or1k_atomic parser to a separate file. + * or1k_atomic.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * system.c [OR1K]: Move to or1k_atomic.c. + +2014-12-02 Dmitry V. Levin + + Alias sys_setdomainname to sys_sethostname. + Since parsers for setdomainname and sethostname syscalls are identical, + replace sys_setdomainname with an alias to sys_sethostname. + + * linux/dummy.h (sys_setdomainname): Alias to sys_sethostname. + * linux/syscall.h (sys_setdomainname): Remove. + * process.c (sys_setdomainname): Remove. + +2014-12-02 Dmitry V. Levin + + Alias sys_getpeername to sys_getsockname. + Since parsers for getpeername and getsockname syscalls are identical, + replace sys_getpeername with an alias to sys_getsockname. + + * linux/dummy.h (sys_getpeername): Alias to sys_getsockname. + * linux/syscall.h (sys_getpeername): Remove. + * net.c (sys_getpeername): Remove. + +2014-12-02 Dmitry V. Levin + + Alias sys_stime to sys_time. + Since parsers for stime and time syscalls are identical, + replace sys_stime with an alias to sys_time. + + * linux/dummy.h (sys_stime): Alias to sys_time. + * linux/syscall.h (sys_stime): Remove. + * time.c (sys_stime): Remove. + +2014-12-02 Dmitry V. Levin + + Remove unused sys_mctl. + Starting with commit v4.6-240-g5afdf12, nobody compiles this + non-Linux code. + + * mem.c [MC_SYNC]: Remove. + * xlat/mctl_funcs.in: Remove. + * xlat/mctl_lockas.in: Remove. + +2014-12-01 Dmitry V. Levin + + Alias sys_mkdir and sys_mkdirat to sys_chmod and sys_fchmodat. + Special parsers for mkdir and mkdirat are redundant because + sys_chmod and sys_fchmodat implement the same decoding. + + * file.c (decode_mkdir, sys_mkdir, sys_mkdirat): Remove. + * linux/dummy.h (sys_mkdir): Alias to sys_chmod. + (sys_mkdirat): Alias to sys_fchmodat. + * linux/syscall.h (sys_mkdir, sys_mkdirat): Remove. + * pathtrace.c (pathtrace_match): Do not check for sys_mkdirat. + +2014-12-01 Dmitry V. Levin + + Remove unused based code. + Starting with commit v4.6-240-g5afdf12, nobody compiles this + non-Linux code. + + * configure.ac (AC_CHECK_HEADERS): Remove sys/acl.h. + * file.c [HAVE_SYS_ACL_H]: Remove. + * xlat/aclcmds.in: Remove. + +2014-12-01 Dmitry V. Levin + + Remove unused based code. + Starting with commit v4.6-240-g5afdf12, nobody compiles this + non-Linux code. + + * configure.ac (AC_CHECK_HEADERS): Remove sys/asynch.h. + * file.c [HAVE_SYS_ASYNCH_H]: Remove. + +2014-11-27 Masatake YAMATO + + Print protocol name of socket descriptors with -yy option. + For those socket descriptors that have no associated ip:port pairs + (or when this information is not available), -yy option prints + the same information as -y option, e.g. + + $ strace -e sendto -yy ip l > /dev/null + sendto(3, ... + + This change makes -yy output more informative: instead of just + printing "socket", the name of protocol behind the socket descriptor + will be printed, e.g. + + sendto(3, ... + + * configure.ac (AC_CHECK_HEADERS): Add sys/xattr.h. + * tests/net-yy-accept.awk: Update to support protocol names. + * tests/net-yy-connect.awk: Likewise. + * util.c [HAVE_SYS_XATTR_H]: Include . + (getfdproto): New function. + (printfd): Use it. + +2014-11-21 Dmitry V. Levin + + Replace MAXPATHLEN with PATH_MAX. + MAXPATHLEN is defined to PATH_MAX, so replace the former with the latter. + + * strace.c (startup_child): Replace MAXPATHLEN with PATH_MAX. + * util.c (printpathn, printpath): Likewise. + +2014-11-21 Mike Frysinger + + Decode FIFREEZE/FITHAW/FITRIM ioctls. + The freeze/thaw ones are simple, but the trim is an interesting struct. + + * block.c (block_ioctl): Handle FIFREEZE/FITHAW/FITRIM. + * ioctl.c (ioctl_decode): Pass 'X' ioctls to block_ioctl. + +2014-11-21 Dmitry V. Levin + + Include unconditionally. + Since is standardized by POSIX and is present in all + available versions of glibc, it's safe to assume that any usable + libc implementation provides this header file. + + * configure.ac (AC_CHECK_HEADERS): Remove sys/uio.h. + * io.c: Include unconditionally. + (tprint_iov_upto, tprint_iov, sys_readv, sys_writev, + print_llu_from_low_high_val, sys_preadv, sys_pwritev): Define + unconditionally. + * net.c: Include unconditionally. + * util.c: Include unconditionally. + (dumpiov): Define unconditionally. + +2014-11-21 Dmitry V. Levin + + Consistently use C99 designated initializers in the new netlink code. + * socketutils.c (send_query, receive_responses): Use designated + initializers for sockaddr_nl, nlmsghdr, and inet_diag_req_v2 structures. + * tests/netlink_inet_diag.c (send_query, check_responses): Likewise. + +2014-11-20 Mike Frysinger + + Decode open's O_TMPFILE. + * xlat/open_mode_flags.in: Add O_TMPFILE definition. + +2014-11-11 Helge Deller + + hppa: update error codes and signal numbers. + There are two important changes in here: + + 1. EWOULDBLOCK has been up to kernel 3.14 errorcode #246. Since hppa + folks had problems with EWOULDBLOCK != EAGAIN, this was changed in + kernel 3.14. + + 2. Starting with kernel 3.18, hppa folks changed some signal numbers in + such a way that we end up with SIGRTMIN == 32, which brings hppa in sync + with other linux ports. + + Both were incompatible changes which basically broke hppa ABI, but since + they have been merged into the kernel, we have to follow. + +2014-11-11 Thomas De Schampheleire + + stack trace support: fix check on symbol name presence. + The output format of the stack trace is supposed to be different + depending on whether symbol names are available in the build. + + However, the check only verified the validity of the pointer, not of the + string pointed to (which could be empty). + + This commit fixes the check so that the original output: + + mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x5e000 + > /lib/libc-2.10.1.so(_IO_file_doallocate+0x8c) [0x68a38] + > /lib/libc-2.10.1.so(_IO_doallocbuf+0x6c) [0x78574] + > /lib/libc-2.10.1.so(_IO_file_overflow+0x184) [0x7763c] + > /lib/libc-2.10.1.so(_IO_file_xsputn+0x88) [0x76aac] + > /lib/libc-2.10.1.so(_IO_puts+0xc8) [0x6b64c] + > /bin/busybox(+0x0) [0x62c60] + > /bin/busybox(+0x0) [0x4940] + > /bin/busybox(+0x0) [0x499c] + > /bin/busybox(+0x0) [0x4e08] + > /lib/libc-2.10.1.so(__libc_init_first+0x30c) [0x1f84c] + > /lib/libc-2.10.1.so(__libc_start_main+0xd8) [0x1f9f8] + + becomes: + + mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x5e000 + > /lib/libc-2.10.1.so(_IO_file_doallocate+0x8c) [0x68a38] + > /lib/libc-2.10.1.so(_IO_doallocbuf+0x6c) [0x78574] + > /lib/libc-2.10.1.so(_IO_file_overflow+0x184) [0x7763c] + > /lib/libc-2.10.1.so(_IO_file_xsputn+0x88) [0x76aac] + > /lib/libc-2.10.1.so(_IO_puts+0xc8) [0x6b64c] + > /bin/busybox() [0x62c60] + > /bin/busybox() [0x4940] + > /bin/busybox() [0x499c] + > /bin/busybox() [0x4e08] + > /lib/libc-2.10.1.so(__libc_init_first+0x30c) [0x1f84c] + > /lib/libc-2.10.1.so(__libc_start_main+0xd8) [0x1f9f8] + + Acked-by: Masatake YAMATO + +2014-11-11 Masatake YAMATO + + tests: add a test for decoding and dumping of recvmmsg/sendmmsg. + * configure (AC_CHECK_FUNCS): Add sendmmsg. + * tests/mmsg.c: New file. + * tests/mmsg.expected: New file. + * tests/mmsg.test: New test. + * tests/.gitignore: Add mmsg. + * tests/Makefile.am (CHECK_PROGRAMS): Add mmsg. + (TESTS): Add mmsg.test. + (EXTRA_DIST): Add mmsg.expected. + +2014-11-11 Masatake YAMATO + + Add functions for dumping iovecs in mmsghdr used in sendmmsg and recvmmsg + This patch is similar to what I did in commit + 02f9f6b386741a52f58e1b31ad4e7fff60781ef8. + That commit was for sendmsg and recvmsg system calls. + This one is for sendmmsg and recvmmsg system calls. + + * defs.h (dumpiov_in_mmsghdr): New declaration. + * net.c (extractmmsghdr): New function derived from printmmsghdr. + (printmmsghdr): Use it. + (dumpiov_in_mmsghdr): New function. + * syscall.c (dumpio) [HAVE_SENDMSG]: Call dumpiov_in_mmsghdr + for recvmmsg and sendmmsg syscalls. + +2014-11-11 Masatake YAMATO + + Use the definition of struct mmsghdr if it is defined in build environment + mmsghrd structure type is defined locally in printmmsghdr function. + + However, more functions will refer the definition in modifications for + supporting "-e write=set" and "-e read=set" option for sendmmsg and + recvmmsg system calls. + + After this change, the system definition of struct mmsghdr will be used + if configure reports it is available, falling back to the old local + definition. + + * configure.ac (AC_CHECK_TYPES): Add struct mmsghdr. + * net.c [!HAVE_STRUCT_MMSGHDR] (struct mmsghdr): Define. + (printmmsghdr): Use previously defined struct mmsghdr. + +2014-11-11 Masatake YAMATO + + Introduce a separate function to copy from msghdr32 to msghdr. + This patch is an initial step for supporting "-e write=set" and + "-e read=set" option for sendmmsg and recvmmsg system calls. + + Coverting a data of msghdr32 to msghdr is needed both for + {send,recv}msg and {send,recv}mmsg to decode parameters. + To share the copying code in both decoders, a separate + function named copy_from_msghdr32 is introduced. + + * net.c [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4] + (copy_from_msghdr32): New function. + (extractmsghdr) [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4]: Use it. + +2014-11-11 Dmitry V. Levin + + ioctlsort: rewrite build rules using noinst_PROGRAMS. + * linux/ioctlsort.c: Rename to ioctlsort.c + * Makefile.am (EXTRA_DIST): Rename linux/ioctlsort.c to ioctlsort.c. + [MAINTAINER_MODE] (noinst_PROGRAMS): Add ioctlsort. + (ioctlsort_SOURCES): Add ioctlsort.c. + (nodist_ioctlsort_SOURCES): Add ioctls.h and ioctldefs.h. + (CLEANFILES): Add $(nodist_ioctlsort_SOURCES). + (ioctlsort.$(OBJEXT)): Likewise. + (ioctlsort): Remove. + +2014-11-11 Lubomir Rintel + + Makefile.am: look for ioctl definitions in the kernel build tree by default + While most of ioctl-related kernel headers are now exported by kernel's + headers_install, some are still modules_install only. The kernel's + headers installed into /usr/include/ are usually headers_install'ed and + therefore don't contain some internal headers we need. The solution is + to look for modules_install'ed headers for the running kernel, and fall + back to old behavior if they aren't found. + +2014-11-04 Lubomir Rintel + + Dump details for Bluetooth socket operations. + * configure.ac (AC_CHECK_HEADERS): Add bluetooth/bluetooth.h. + * xlat/bt_protocols.in: New file. + * net.c [AF_BLUETOOTH && HAVE_BLUETOOTH_BLUETOOTH_H]: Include bluetooth + headers. + [PF_BLUETOOTH && HAVE_BLUETOOTH_BLUETOOTH_H]: Include "xlat/bt_protocols.h". + (printsock) [AF_BLUETOOTH && HAVE_BLUETOOTH_BLUETOOTH_H]: Dump details + for AF_BLUETOOTH sockets. + (sys_socket) [PF_BLUETOOTH && HAVE_BLUETOOTH_BLUETOOTH_H]: Decode + protocol for PF_BLUETOOTH sockets. + +2014-11-04 Philippe De Muyter + + Implement Video4Linux video-input ioctls decoder. + Introduce v4l2.c, a decoder for the arguments of the video-input subset + of the v4l2 ioctl's. This is a combination of + - previous work by Peter Zotov , found at + https://gist.githubusercontent.com/whitequark/1263207/raw/strace-4.6-v4l2-ioctls.patch + - previous work by William Manley , found at + http://marc.info/?l=strace&m=139395588520675 + - forward port, additions and fixes by Philippe De Muyter + + As v4l2 is a moving target, I have made v4l2.c compilable with ancient + linux kernels by testing the availability of some macros. It has been + succesfully compiled on linux 3.10, 3.1, 2.6.31 and 2.6.22, and + succesfully used on linux 3.10 with a camera device. + + * configure.ac: Check for availabilty of V4L2_* enum constants. + * Makefile.am (strace_SOURCES): Add v4l2.c. + * defs.h (v4l2_ioctl): New prototype. + * ioctl.c (ioctl_decode): Use v4l2_ioctl. + * v4l2.c: New file. + * xlat/v4l2_*.in: New files. + + Cc: Peter Zotov + Cc: William Manley + +2014-11-04 Dmitry V. Levin + + Update ioctl entries. + * linux/ioctlent.h.in: Regenerate from v3.17 headers. + + Remove ioctl header file names from the executable. + * defs.h (struct ioctlent): Remove "doth" field. + * Makefile.am ($(ioctlent_h)): Remove 1st field. + +2014-11-04 Dmitry V. Levin + + Filter out redundant ioctl entries early. + For two ioctl entries with the same code, if one's name is a prefix + to another's name, keep the entry with a shorter name. Filter out + redundant ioctl entries at ioctlsort stage so that distributed + ioctlent.h.in files will be already filtered. + + * linux/ioctlsort.c (is_not_prefix): New function. + (main): Use it. + * linux/ioctlent-filter.awk: Remove. + * Makefile.am (EXTRA_DIST): Remove linux/ioctlent-filter.awk. + ($(ioctlent_h)): Don't use linux/ioctlent-filter.awk. + +2014-11-03 Dmitry V. Levin + + ioctlent.sh: update the list of directories exported by headers_install. + * linux/ioctlent.sh: Add drm, mtd, rdma, video, and xen directories. + +2014-11-01 Masatake YAMATO + + Add a function for dumping iovec in msghdr used in sendmsg and recvmsg. + Here is an example session: + + $ ./strace -e write=all ip link change dev enp0s25 mtu 1501 > /dev/null + sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"(... + * 40 bytes in buffer 0 + | 00000 28 00 00 00 10 00 05 00 d0 d9 aa 53 00 00 00 00 (..........S.... | + | 00010 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ................ | + | 00020 08 00 04 00 dd 05 00 00 ........ | + ... + + $ ./strace -e read=all ip link show > /dev/null + recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"... + * 8192 bytes in buffer 0 + | 00000 34 00 00 00 02 00 00 00 00 00 00 00 ff 23 00 00 4............#.. | + | 00010 ff ff ff ff 20 00 00 00 10 00 05 00 00 00 00 00 .... ........... | + ... + + * defs.h (dumpiov_in_msghdr): New prototype. + * net.c (extractmsghdr): New function derived from printmsghdr. + (printmsghdr): Use extractmsghdr. + (dumpiov_in_msghdr): New function. + * syscall.c (dumpio) [HAVE_SENDMSG]: Call dumpiov_in_msghdr for recvmsg + and sendmsg syscalls. + +2014-10-31 Maarten ter Huurne + + Include regardless of existence. + This fixes compilation with musl libc. + This approach was already used in process.c, so I assume it is safe. + + * signal.c: Move [HAVE_LINUX_PTRACE_H] code out of [HAVE_SYS_REG_H] check. + * syscall.c: Likewise. + * util.c: Likewise. + +2014-10-31 Dmitry V. Levin + + sock: decode SIOCSIFNAME on entering syscall. + * sock.c (sock_ioctl): Handle SIOCSIFNAME on entering syscall. + +2014-10-31 Mike Frysinger + + sock: fix decoding of SIOCSIFNAME. + The decoding of SIOCSIFNAME is incorrect. It does not use + the ifr_index field to look things up, but ifr_newname. + + * sock.c (sock_ioctl): Split out SIOCSIFNAME from SIOCGIFNAME and + display ifr_newname. + +2014-10-31 Mike Frysinger + + sock: fix decoding of struct ifreq.ifr_name. + The ifr name fields of the ifreq structure might not be NUL terminated. + If the user makes an ioctl call where they aren't, then strace ends up + reading random content from its own stack. Limit the printf lengths. + + * sock.c (sock_ioctl): Add explicit length limits to ifr_name printfs. + +2014-10-03 Elliott Hughes + + Don't risk truncating open flags by using mode_t. + On Android, 32-bit arm and x86 use __kernel_mode_t (an unsigned short) + as their mode_t. The open(2) flags are actually an int, so high ones + like O_CLOEXEC get truncated if you coerce them to mode_t. + + * defs.h (tprint_open_modes, sprint_open_modes): Change argument type + from mode_t to int. + * file.c (tprint_open_modes, sprint_open_modes): Likewise. + +2014-09-29 Dmitry V. Levin + + Enhance sysinfo decoding. + * configure.ac (AC_CHECK_MEMBERS): Check for struct sysinfo.totalhigh, + struct sysinfo.freehigh, and struct sysinfo.mem_unit. + * sysinfo.c (sys_sysinfo): Treat failed umove() call as syserror(). + Print totalhigh, freehigh, and mem_unit members when struct sysinfo + supports them. + + Move sysinfo parser to a separate file. + * sysinfo.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * resource.c (sys_sysinfo): Move to sysinfo.c. + +2014-09-29 Dmitry V. Levin + + Fix build with musl libc. + * resource.c: Include for struct sysinfo definition. + + Reported-by: Steven Honeyman + +2014-09-23 Dmitry V. Levin + + tests: cleanup checks for basic programs. + * tests/init.sh: Check for cat and rm. + * tests/getdents.test: Check for awk. + * tests/ptrace_setoptions.test: Check for grep. + * tests/net-fd.test: Do not check for rm. + * tests/net.test: Likewise. + * tests/scm_rights-fd.test: Likewise. + * tests/stat.test: Likewise. + * tests/uio.test: Likewise. + + tests: add a test for -yy option. + * tests/net-yy.test: New test. + * tests/inet-accept-connect-send-recv.c: New file. + * tests/netlink_inet_diag.c: Likewise. + * tests/net-yy-accept.awk: Likewise. + * tests/net-yy-connect.awk: Likewise. + * tests/.gitignore: Add inet-accept-connect-send-recv, + netlink_inet_diag, *.tmp-*, and *.tmp.*. + * tests/Makefile.am (check_PROGRAMS): Add inet-accept-connect-send-recv + and netlink_inet_diag. + (TESTS): Add net-yy.test. + (EXTRA_DIST): Add net-yy-accept.awk and net-yy-connect.awk. + +2014-09-22 Dmitry V. Levin + + Move statfs related parsers to a separate file. + * statfs.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (sprintfstype, printstatfs, sys_statfs, sys_fstatfs): Move + to statfs.c. + [HAVE_STATFS64] (printstatfs64, printcompat_statfs64, sys_statfs64, + sys_fstatfs64): Likewise. + [ALPHA] (osf_statfs, osf_fstatfs): Likewise. + + fsmagic: sort array by value and use bsearch for faster lookup. + * defs.h (xlat_search): New prototype. + * util.c (xlat_bsearch_compare, xlat_search): New functions. + * file.c (sprintfstype): Use xlat_search for fsmagic lookup. + * xlat/fsmagic.in: Sort by value and mark as not NULL-terminated. + * tests/statfs.c: New file. + * tests/statfs.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add statfs. + (statfs_CFLAGS): Define. + (TESTS): Add statfs.test. + * tests/.gitignore: Add statfs. + +2014-09-21 Dmitry V. Levin + + fsmagic: update from + * xlat/fsmagic.in: Add new constants from . + Reported by Elliott Hughes. + +2014-09-17 Dmitry V. Levin + + Add -yy option: print ip and port associated with socket descriptors. + When two ore more -y options are given, print local and remote ip:port + pairs associated with socket descriptors. This implementation uses + NETLINK_INET_DIAG for sockaddr lookup; it's based on the patch + prepared by Zubin Mithra as a part of his GSoC 2014 strace project. + + * Makefile.am (strace_SOURCES): Add socketutils.c + (EXTRA_DIST): Add linux/inet_diag.h and linux/sock_diag.h. + * defs.h (print_sockaddr_by_inode): New prototype. + * linux/inet_diag.h: New file. + * linux/sock_diag.h: Likewise. + * socketutils.c: Likewise. + * strace.1: Document -yy option. + * strace.c (usage): Likewise. + * util.c (printfd): Use print_sockaddr_by_inode. + +2014-09-17 Vicente Olivert Riera + + sigaction: wrap sa_restorer in #ifdef SA_RESTORER consistently. + Wrap sa_restorer member definitions in #ifdef SA_RESTORER to be + consistent with their use. + If an architecture does not provide sa_restorer members but still + defines SA_RESTORER macro, the latter has to be explicitly undefined. + + This change fixes compilation failures like this one: + signal.c: In function 'decode_old_sigaction': + signal.c:631:21: error: 'struct old_sigaction' has no member named 'sa_restorer' + signal.c: In function 'decode_new_sigaction': + signal.c:1224:21: error: 'struct new_sigaction' has no member named 'sa_restorer' + + * signal.c (struct old_sigaction, struct old_sigaction32, + struct new_sigaction, struct new_sigaction32): + Wrap sa_restorer member in #ifdef SA_RESTORER. + (decode_old_sigaction, decode_new_sigaction): + Wrap use of sa32.sa_restorer in #ifdef SA_RESTORER. + +2014-09-17 Dmitry V. Levin + + Fix compilation warnings reported by gcc -Wsign-compare. + * configure.ac (gl_WARN_ADD): Add -Wsign-compare. + * defs.h (struct tcb): Change 'currpers' type to unsigned. + (struct xlat): Change 'val' type to unsigned + (signame): Add 'const' qualifier to its argument. + (xlookup, printxval): Add 'const' qualifier to the 2nd argument and + change its type to unsigned. + (printpathn): Change the 3rd argument type to unsigned. + (ioctl_lookup): Change 1st argument type to unsigned. + * count.c (call_summary_pers, call_summary): Change 'i' type to unsigned. + * file.c (print_xattr_list): Fix comparisons between signed and unsigned + long values. + * ioctl.c (compare): Fix cast. + (ioctl_lookup): Change 1st argument type to to unsigned. + (ioctl_next_match): Change 'code' type to unsigned. + * mem.c (sys_move_pages): Change 'i' type to unsigned. + * mtd.c (mtd_ioctl): Change 'i' and 'j' types to unsigned. + Print 'i' using %u format string. + * process.c (sys_prctl): Change 'i' type to unsigned. + (printargv): Change 'n' type to unsigned. + (sys_ptrace): Change 'addr' type to unsigned. + * scsi.c (print_sg_io_buffer): Add 'const' qualifier to 'len' argument + and change its type to unsigned. Change 'i' and 'allocated' types + to unsigned. + * signal.c (signame): Add 'const' qualifier to its argument. + Fix comparisons between signed and unsigned values. + (sprintsigmask_n, printsiginfo): Fix comparisons between signed and + unsigned values. + * sock.c (sock_ioctl): Change 'i' and 'nifra' types to unsigned. + * strace.c (expand_tcbtab, alloctcb): Change 'i' type to unsigned. + (detach): Change 'sig' type to unsigned. + (startup_attach): Change 'tcbi' type to unsigned. + (startup_child): Change 'm', 'n', and 'len' types to unsigned. + (init): Use new variable to iterate 'tcbtab'. + (pid2tcb): Change 'i' type to unsigned. + (cleanup): Change 'i' and 'sig' types to unsigned. + * syscall.c (update_personality): Change 'personality' argument type + to unsigned. + (struct qual_options): Change 'bitflag' type to unsigned. + (reallocate_qual): Add 'const' qualifier to its argument and change its + type to unsigned. + (qualify_one): Change 'n' and 'bitflag' arguments types to unsigned. + Add 'const' qualifier to 'n', 'not', and 'pers' arguments. + Change 'p' type to signed int. + (qual_syscall): Change 'bitflag' argument type to unsigned. + Add 'const' qualifier to 'bitflag' and 'not' arguments. + Change 'p' type to signed int. + (qual_signal): Change 'bitflag' argument type to unsigned. + Add 'const' qualifier to 'bitflag' and 'not' arguments. + Change 'i' type to unsigned. + (qual_desc): Change 'bitflag' argument type to unsigned. + Add 'const' qualifier to 'bitflag' and 'not' arguments. + (qualify): Change 'i' type to unsigned. + (get_scno): Change 'currpers' type to unsigned. + Fix a comparison between signed and unsigned values. + * system.c (sys_sysctl): Change 'cnt' and 'max_cnt' types to unsigned. + Fix comparisons between signed and unsigned values. + * util.c (xlookup, printxval): Add 'const' qualifier to 'val' argument + and change its type to unsigned. + (printuid): Fix a comparison between signed and unsigned values. + (printpathn): Change 'n' argument type to unsigned. + (printstr): Change 'size' type to unsigned. + Fix a comparison between signed and unsigned values. + (setbpt): Change 'i' type to unsigned. + * net.c (printsock): Silence a compilation warning. + * reboot.c (sys_reboot): Likewise. + +2014-09-11 Dmitry V. Levin + + Move dirent related parsers to a separate file. + * dirent.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * file.c (print_old_dirent, sys_readdir, sys_getdents, sys_getdents64): + Move to dirent.c. + + getdents, getdents64: fix potential out-of-bounds read issues. + * file.c (sys_getdents): Check for invalid d_reclen. + Avoid reading from uninitialized memory. + (sys_getdents64): Likewise. + * tests/getdents.awk: New file. + * tests/getdents.test: New test. + * tests/Makefile.am (TESTS): Add it. + (EXTRA_DIST): Add getdents.awk. + +2014-09-10 Dmitry V. Levin + + tprint_sock_type: remove unused parameter. + * net.c (tprint_sock_type): Remove unused parameter 'tcp'. + (sys_socket, sys_socketpair): Update callers. + + printsock: fix decoding of unrecognized AF_PACKET packet types. + * net.c (printsock): Fix fallback string for AF_PACKET packet types. + +2014-09-09 Dmitry V. Levin + + decode_select: fix potential use of an uninitialized variable. + A pointer to fd_set was used uninitialized when nfds == 0. + + * desc.c (decode_select): Initialize fds. + + Reported-by: Zubin Mithra + +2014-09-08 Dmitry V. Levin + + Use external libaio.h. + Stop using an outdated partial copy of libaio.h, switch back to external + libaio.h from libaio. + This partially reverts commit 2df03c494eb3c36c4178eba35c374831031d1a58. + + * aio.c: Drop a partial copy of libaio.h, include instead. + (print_common_flags): Check for HAVE_STRUCT_IOCB_U_C_FLAGS. + (sys_io_submit): Check for HAVE_DECL_IO_CMD_PWRITE and + HAVE_DECL_IO_CMD_PWRITEV. + * configure.ac: Check for libaio.h and declaration it provides. + +2014-08-19 Dmitry V. Levin + + maint: post-release administrivia. + * NEWS: Add header line for next release. + +2014-08-15 Dmitry V. Levin + + Prepare for 4.9 release. + * NEWS: Update for 4.9 release. + * debian/changelog: 4.9-1. + * strace.spec: 4.9-1. + + Sync strace.spec and debian/ with packages. + * debian/changelog: Sync with 4.8-1.1. + * debian/control: Likewise. + * debian/rules: Likewise. + * strace.spec: Sync with 4.8-5. + + NEWS: Update for 4.9 release. + +2014-08-15 Mike Frysinger + + Update syscall tables to the point where they include renameat2. + * linux/dummy.h: Add printargs aliases for sys_sched_getattr and + sys_sched_setattr. + * linux/aarch64/syscallent1.h: Add kcmp/finit_module/sched_setattr/ + sched_getattr/renameat2. + * linux/alpha/syscallent.h: Add kcmp/finit_module. + * linux/arm/syscallent.h: Add sched_setattr/sched_getattr/renameat2. + * linux/hppa/syscallent.h: Add sched_setattr/sched_getattr/utimes/renameat2. + * linux/i386/syscallent.h: Add sched_setattr/sched_getattr/renameat2. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-n64.h: Add getdents64/sched_setattr/sched_getattr/ + renameat2. + * linux/mips/syscallent-o32.h: Add sched_setattr/sched_getattr/renameat2. + * linux/powerpc/syscallent.h: Fix finit_module/kcmp order. Add sched_setattr/ + sched_getattr/renameat2. + * linux/s390/syscallent.h: Add sched_setattr/sched_getattr/renameat2. + * linux/s390x/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/xtensa/syscallent.h: Add sched_setattr/sched_getattr. + + renameat2: add decoding support. + * file.c (decode_renameat, sys_renameat2): New functions. + (sys_renameat): Use decode_renameat. + * pathtrace.c (pathtrace_match): Handle sys_renameat2. + * linux/syscall.h (sys_renameat2): New prototype. + * xlat/rename_flags.in: New file. + +2014-08-14 Mike Frysinger + + CREDITS: fix generation in out of tree builds. + The {...} code changes the working dir with `cd`, but the commands outside + of that block expects to be in the original dir. Change to a subshell so + the path outside of this block remains unchanged. + + * Makefile.am ($(srcdir)/CREDITS): Change {...} to (...). + +2014-08-14 Mike Frysinger + + ia64: add missing syscalls. + When the preadv/pwritev syscalls were added, the ones before it in the + ia64 list were missed, so all the syscalls there and later were not in + the right location (causing things to be decoded incorrectly). + + Add the missing syscalls before preadv which also re-aligns all the + syscalls after that point. This fixes the uio.test. + + * linux/ia64/syscallent.h: Add syscalls 1310 through 1318. + +2014-08-14 Mike Frysinger + + ia64: fix sigaction decoding. + Looks like ia64 doesn't have sa_restorer either, yet still defines + SA_RESTORER. Deploy the same trick that HPPA is using to make the + test pass. + + * signal.c (SA_RESTORER): Undefine when IA64 is defined. + (struct new_sigaction) [IA64]: Disable sa_restorer. + +2014-08-12 Dmitry V. Levin + + tests: skip detach-stopped.test when PTRACE_SEIZE doesn't work. + detach-stopped.test is known to fail when PTRACE_SEIZE is not available, + so skip the test in that case. + + * tests/detach-stopped.test: Check for "strace -d" output and skip the + test when it says that PTRACE_SEIZE doesn't work. + +2014-08-11 Erik Johansson + + sh: fix syscall numbering for recv and sendto. + * linux/sh/syscallent.h: Swap recv and sendto syscall entries. + +2014-08-11 Mike Frysinger + + tests: fix uio building w/out preadv/pwritev. + The preadv/pwritev symbols weren't added to glibc until the 2.10 release, + so trying to build the uio test leads to link failures. Add configure + tests and update uio.test to handle this. + + * configure.ac (AC_CHECK_FUNCS): Add preadv/pwritev. + * tests/uio.c: Include config.h. + (main): Check for HAVE_PREADV and HAVE_PWRITEV. + * tests/uio.test: Check exit status of uio helper. + +2014-08-11 Mike Frysinger + + tests: ignore *.tmp files. + The tests like to generate random .tmp files, so ignore them. + + * tests/.gitignore: Add *.tmp. + +2014-08-11 Mike Frysinger + + tests: fix shell errors in detach tests. + The current detach test code does: + set -e + ... + cleanup() { + set +e + kill ... + wait ... + } + ... + cleanup + exit 0 + + The problem is that while `set -e` is disabled for the body of the + cleanup function, it isn't necessarily disabled in the caller scope. + So if the return value of the cleanup function (`wait` in this case) + is non-zero, the script ends up failing overall. + + Add an explicit return 0 to the cleanup function so that we don't kill + the overall test pipeline. + + * tests/detach-running.test (cleanup): Add return 0. + * tests/detach-sleeping.test (cleanup): Likewise. + * tests/detach-stopped.test (cleanup): Likewise. + +2014-08-11 Mike Frysinger + + set_ptracer_any: add a little documentation. + This way I don't have to keep reading up on these options and wondering + why the code isn't aborting when the call fails. + + * tests/set_ptracer_any.c (main): Note prctl failures are ok. + +2014-08-10 Mike Frysinger + + signal: fix thinko in sa_restorer. + Previous commit here re-added the bugs trying to be fixed due to a + logic thinko. The patches were tested in isolation and hand merged + later. Oops. + + * signal.c (struct new_sigaction): Change || to &&. + +2014-08-09 Mike Frysinger + + sigaction test: support arches w/out SA_RESTORER and swapped args. + Running Linux 3.15 (sparc64) and glibc 2.17 (sparc32) triggers a + rt_sigaction call that does not use SA_RESTORER and has an order + where it inserts a restorer and a size. The current tests don't + support that ordering, so add another regex. + + * tests/sigaction.awk: Support no SA_RESTORER and swapped args. + +2014-08-09 Mike Frysinger + + alpha/sparc: fix arg count for rt_sigaction. + Both these arches have a rt_sigaction syscall that takes 5 args, not 4. + + * linux/alpha/syscallent.h (rt_sigaction): Change nargs to 5. + * linux/sparc/syscallent.h (rt_sigaction): Change nargs to 5. + +2014-08-09 Mike Frysinger + + hppa: fix sigaction decoding. + Since the rt_sigaction syscall on hppa doesn't have a sa_restorer, + do not include it in the kernel struct. + + We also have to undefine SA_RESTORER so that code doesn't try to + use it. The headers will export this, but the syscall doesn't + actually respect it. + + * signal.c (SA_RESTORER): Undefine when HPPA is defined. + (struct new_sigaction): Disable sa_restorer on hppa. + +2014-08-09 Mike Frysinger + + alpha: fix sigaction decoding. + Since the rt_sigaction syscall on alpha doesn't have a sa_restorer, + do not include it in the kernel struct. + + * signal.c (struct new_sigaction): Disable sa_restorer on alpha. + +2014-08-08 Dmitry V. Levin + + Prepare for -yy option support. + * defs.h (show_fd_path): Change type to unsigned int. + * strace.c (show_fd_path): Likewise. + (init): Handle repeated -y option. + +2014-08-07 Dmitry V. Levin + + Fix preadv/pwritev offset decoding on ILP32 architectures. + This fixes regression introduced by the previous commit. + + * io.c (print_llu_from_low_high_val) [SIZEOF_LONG != SIZEOF_LONG_LONG]: + Cast argument to unsigned long before casting it to unsigned long long. + +2014-08-07 Dmitry V. Levin + + Fix preadv/pwritev offset decoding on bigendian architectures. + This partially reverts commit 7845a42b39e59e904d01e75e21f7bc7eb6462560. + + * util.c (printllval): Remove align argument. + * defs.h (printllval): Update prototype. + (printllval_aligned, printllval_unaligned): Remove. + * file.c (sys_readahead, sys_truncate64, sys_ftruncate64, sys_fadvise64, + sys_fadvise64_64, sys_sync_file_range, sys_sync_file_range2, + sys_fallocate): Replace printllval_aligned call with printllval. + * io.c (sys_pread, sys_pwrite): Likewise. + (print_llu_from_low_high_val): New function. + (sys_preadv, sys_pwritev): Use it instead of printllval_unaligned. + +2014-08-06 Dmitry V. Levin + + Decode file descriptors returned by accept and accept4 syscalls. + * net.c (do_accept): Rename to do_sockname. + (sys_accept, sys_accept4): Update callers, return RVAL_FD. + (sys_getsockname, sys_getpeername): Call do_sockname directly. + * tests/net-fd.test: Update. + +2014-08-01 Mike Frysinger + + x32: update io_{setup,submit} syscalls. + Starting in 3.16, these two syscalls have gotten their own entry + point for x32. See linux 7fd44dacdd803c0bbf38bf478d51d280902bb0f1. + + * linux/x32/syscallent.h: Change existing io_{setup,submit} to 64bit, + and add new entry points for x32 specifically. + +2014-06-18 Max Filippov + + xtensa: sort values in struct_user_offsets. + Otherwise ptrace syscall argument decoding is wrong: + ptrace(PTRACE_PEEKUSER, 296, syscall_nr, [0x4048eb]) = 0 + ptrace(PTRACE_PEEKUSER, 296, syscall_nr, [0x3fa6cd30]) = 0 + ptrace(PTRACE_PEEKUSER, 296, syscall_nr, [0x8040676d]) = 0 + instead of + ptrace(PTRACE_PEEKUSER, 296, pc, [0x4048eb]) = 0 + ptrace(PTRACE_PEEKUSER, 296, a1, [0x3fa6cd30]) = 0 + ptrace(PTRACE_PEEKUSER, 296, a0, [0x8040676d]) = 0 + + * process.c (struct_user_offsets) [XTENSA]: Sort values. + +2014-06-18 Dmitry V. Levin + + Document -k option as experimental. + strace -k does not produce a reliable output on all supported + configurations yet, even basic strace-k.test is known to fail + on some of them. + + * strace.c (usage): Document -k option as experimental. + * strace.1: Likewise. + * NEWS: Likewise. + +2014-06-18 Dmitry V. Levin + + tests: robustify -k test. + Split stack-fcall.c into several compilation units so that intermediate + function calls would not be optimized out by compiler. + + * tests/stack-fcall.c: Move intermediate functions to ... + * tests/stack-fcall-*.c: ... new files. + * tests/Makefile.am (stack_fcall_SOURCES): Add stack-fcall-*.c. + +2014-06-13 Dmitry V. Levin + + tests: enhance -k test. + Add two more function calls to the stack. Suggested by Masatake YAMATO. + + * tests/stack-fcall.c (f1): Rename to f3. + (f1, f2): New functions. + * tests/strace-k.test: Update. + +2014-06-13 Dmitry V. Levin + + unwind: ignore memory mappings that have no PROT_EXEC bit set. + * unwind.c (build_mmap_cache): For each memory mapping being scanned, + save its PROT_EXEC bit and skip the mapping if it is not set. + + unwind: cleanup build_mmap_cache. + * unwind.c (build_mmap_cache): Move local variables to the code branch + where they are used. Check return code of sscanf and strdup. Do not + treat unusual memory mappings as fatal errors. Do not skip memory + mappings with path names starting with "[". + + unwind: remove unused field from mmap_cache_t. + * unwind.c (mmap_cache_t): Remove "deleted" field. + (build_mmap_cache): Remove initialization of "deleted" field. + +2014-06-12 Dmitry V. Levin + + unwind: refactor stacktrace_walk. + * unwind.c (stacktrace_walk): Move stack frame printing code + to separate function print_stack_frame. + + unwind: constify binary_filename and symbol_name functions arguments. + * unwind.c (call_action_fn, print_call_cb, sprint_call_or_error, + queue_put, queue_put_call): Add const qualifier to binary_filename and + symbol_name arguments. + +2014-06-11 Luca Clementi + + unwind: disable stack trace with multiple personalities. + * unwind.c (unwind_cache_invalidate, unwind_print_stacktrace, + unwind_capture_stacktrace): Disable stack tracing of non-default + personality processes. + +2014-06-05 Dmitry V. Levin + + unwind: rename function_off_set to function_offset. + * unwind.c (call_action_fn, stacktrace_walk, STACK_ENTRY_SYMBOL_FMT, + print_call_cb, sprint_call_or_error, queue_put, queue_put_call): + Rename function_off_set to function_offset. + + unwind: fix a bug in range updating of binary search. + * unwind.c (print_stacktrace): Fix another off-by-one error in binary search. + + unwind: use fopen64 instead of fopen. + * unwind.c (fopen_for_input): Define to fopen64 iff + [_LARGEFILE64_SOURCE && HAVE_FOPEN64], otherwise define it to fopen. + (build_mmap_cache): Use fopen_for_input instead of fopen. + +2014-06-05 Dmitry V. Levin + + unwind: fix build on 32-bit architectures. + Fix compilation warnings in unwind.c on 32-bit architectures. + On some architectures getuid is actually getuid32, so change the test + to use getpid instead of getuid. + + * unwind.c (STACK_ENTRY_SYMBOL_FMT): Explicitly cast function_off_set + to unsigned long. + (queue_put_error): Change the 3rd argument's type to unsigned long. + * tests/stack-fcall.c (f1): Use getpid instead of getuid. + * tests/strace-k.test: Likewise. + +2014-06-05 Dmitry V. Levin + + tests: robustify -w option test. + * tests/count.test: Allow nanosleep to spend a bit less time than 1 second. + +2014-06-04 Dmitry V. Levin + + Fix delete_module decoding. + * xlat/delete_module_flags.in: New file. + * file.c (sys_delete_module): Move ... + * bjm.c (sys_delete_module): ... to here. + Decode 1st argument using printstr instead of printpath. + * NEWS: Mention it. + +2014-06-04 Zubin Mithra + + Decode paths associated with file descriptors returned by syscalls. + * defs.h (RVAL_FD): New macro. + (RVAL_MASK, RVAL_STR, RVAL_NONE): Update. + * desc.c (sys_dup, sys_delete_module): New functions. + (do_dup2, decode_open, sys_creat): Change return value to RVAL_FD. + * linux/dummy.h (sys_delete_module, sys_dup): Remove. + * linux/syscall.h (sys_delete_module, sys_dup): New prototypes. + * syscall.c (trace_syscall_exiting): Handle RVAL_FD. + +2014-06-03 Dmitry V. Levin + + NEWS: Prepare for 4.9 release. + + Warn about flags that have no effect with -c. + * strace.c (init): Issue a warning if -i, -k, -r, -t, -T, or -y is used + along with -c. + This fixes Debian bug #443895. + + debian: enable security hardening features. + * debian/rules: Follow the advice in https://wiki.debian.org/Hardening + and enable maximum hardening as for programs that handle untrusted data. + Patch by Markus . + +2014-06-03 Dmitry V. Levin + + debian: update control file. + * debian/control (strace64): Fix a typo in package description. + Patch by Pascal De Vuyst . + (strace, strace-udeb): Add x32 to architecture list. + Patch by Guillaume Morin . + (strace, strace-udeb): Add or1k to architecture list. + Patch by Christian Svensson . + (strace, strace-udeb): Add arm64 to architecture list, + and remove defunct arm. + Patch by Wookey . + + This fixes Debian bugs: #697625, #727018, #742235, #749956. + +2014-06-03 Dmitry V. Levin + + manpage: minor corrections. + $ groff -ww -mandoc -z strace.1 + strace.1:65: warning: macro `IX' not defined + + * strace.1: define IX macro as empty for groff. + Change remaining '-' as minus to '\-'. + Have two word spaces after a full stop as an end of sentence. + Use extra space ('\,' or '\/') between roman and italic characters. + Based on patch by Bjarni Ingi Gislason . + This fixes Debian bug #725987. + +2014-05-30 Masatake YAMATO + + unwind: tests: add a test for -k option. + * tests/stack-fcall.c: New test target. + * tests/strace-k.test: New test driver. + * tests/Makefile.am (check_PROGRAMS): Add stack-fcall. + (TESTS): Add strace-k.test. + * tests/.gitignore: Add stack-fcall. + +2014-05-30 Masatake YAMATO + + unwind: move stacktrace capturing and mmap cache invalidating to trace_syscall_entering + Instead of handling stacktrace capturing and mmap cache invalidating in + sys_* functions, handle them uniformly in trace_syscall_entering using + new flags introduced by previous two commits. + + The patch is simpler than its older version(v3). The value of + hide_log_until_execve is just ignored. I found the value is nothing + to do with this patch. unwind_cache_invalidate is mentioned only + once in trace_syscall_exiting. + Both are suggested by Dmitry Levin. + +2014-05-30 Dmitry V. Levin + + unwind: add SE and SI flags to syscall entries for all architectures. + Add SE flag to execve, exit, and exit_group syscall entries. + Add SI flag to brk, execve, mmap, mprotect, mremap, munmap, + remap_file_pages, shmat, and shmdt syscall entries. + +2014-05-30 Masatake YAMATO + + unwind: introduce markers specifying the needs of special care in unwinding + Some system calls require capturing the stack trace before they are + processed in kernel. Typical one is execve. Some system calls require + invalidating mmap cache after they are processed in kernel. + + In current implementation these requirements are handled directly by + appropriate syscall handlers. However, it is difficult to keep the + source code maintainable using this approach to cover all system calls + which have such requirements. + + A more generic way to implement this is to flag all syscalls that + require special processing, and handle these flags right in + trace_syscall_entering instead of changing syscall handlers. + + This patch just defines new flags: STACKTRACE_INVALIDATE_CACHE and + STACKTRACE_CAPTURE_ON_ENTER. + + The names of macros are suggested by Dmitry Levin. + +2014-05-30 Masatake YAMATO + + unwind: enable dwarf cache of libunwind. + Here is the benchmark of the dwarf cache. + + Target program: + + #include + int main(void) + { + unsigned int max = 0x6fff, i; + for (i = 0; i < max; i++) + sched_yield(); + return 0; + } + + Command line: + + ./strace -o /dev/null -k a.out + + With the dwarf cache: + + real 0m12.081s + user 0m3.858s + sys 0m8.194s + + Without the dwarf cache: + + real 0m22.326s + user 0m5.218s + sys 0m16.952s + +2014-05-30 Masatake YAMATO + + unwind: report expected backtracing error. + When a file mmap'ed to the target process is unlink'ed, backtracing the + stack would fail. Current implementation reports it as + "backtracing_error". To avoid confusion, the message is changed to + "expected_backtracing_error". + + Here is the reproducer: + + $ cat ./p-deleted.c + #include + + int main(int argc, char **argv) { + return unlink(argv[0]) < 0; + } + + $ strace -e unlink -k ./p-deleted + unlink("./p-deleted") = 0 + > /usr/lib64/libc-2.18.so(unlink+0x7) [0xe7f17] + > /home/yamato/var/strace/t_unwind/p-deleted (deleted)(+0x0) [0x575] + > /usr/lib64/libc-2.18.so(__libc_start_main+0xf5) [0x21d65] + > backtracing_error [0x7ffff1365590] + +++ exited with 0 +++ + + p-deleted is deleted therefore backtracing_error is reported. This + patch records the deleted marker when making mmap cache and refers the + recorded information in the case "backtracing_error" to switch the + message. + + Here is the output of this patch: + + $ strace -e unlink -k ./p-deleted + unlink("./p-deleted") = 0 + > /usr/lib64/libc-2.18.so(unlink+0x7) [0xe7f17] + > /home/yamato/var/strace/t_unwind/p-deleted (deleted)(+0x0) [0x575] + > /usr/lib64/libc-2.18.so(__libc_start_main+0xf5) [0x21d65] + > expected_backtracing_error [0x7ffff1365590] + +++ exited with 0 +++ + + This solution is not perfect: if a file is unlink'ed after making the + mmap cache and before unwinding, strace cannot have a chance to record + the deleted marker. + + In this version of patch, hardcoded magic number used in comparing "(delete)" + string is replaced with strlen as suggested by Dmitry Levin. + + In old version of patch, the deleted entry was thrown away from mmap + cache to avoid to report "backtracing_error". In this patch I keep it, + and just switch the error message. + Inspired by the review comment from Dmitry Levin. + +2014-05-30 Masatake YAMATO + + unwind: call unwind_tcb_fin before printing detached message. + captured stacktrace is printed in unwind_tcb_fin if tcp->queue is not + empty. This should happen before printing detached message, so + unwind_tcb_fin is moved to the top of droptcb. + + This is implicitly suggested by Dmitry Levin in patch review process. + +2014-05-30 Masatake YAMATO + + unwind: implement automatic mmap cache invalidation. + A mmap cache belonging to a tcb was updated when a system call which + changed the memory mapping was called. This implementation was assumed + the mapping was changed only by the tcb. However, this assumption is + incorrect if the target application is multi-threaded; more than two + tcbs can shared the same memory mapping and a tcb can modify it without + being noticed by the others. + + This change introduces a global integer variable mmap_cache_generation, + and mmap_cache_generation field to struct tcb. The variable + is incremented each time a process enters a syscall that can modify its + memory mapping. Each tcb records the value of this variable at the + moment if building its mmap cache. Every mmap cache associated with + the given tcb can be validated by comparing its mmap_cache_generation + field with the variable mmap_cache_generation. + + This implementation is inefficient. If strace attaches two processes + which don't share the memory mapping, rebuilding mmap cache of a tcb + triggered by another tcb's mmap system call is not necessary. + +2014-05-30 Masatake YAMATO + + unwind: introduce queue_t for capturing stacktrace. + This is the second step for splitting capturing from printing. + + New `queue' field is added to tcb. Captured stacktrace is stored here. + The field is initialized/finalized at unwind_tcb_init/unwind_tcb_fin. + + New API function unwind_capture_stacktrace is added. This function + captures the currest stack using stracktrace_walker and records it in + tcb. It's printing is delayed to the next call of + unwind_print_stacktrace. + + unwind_print_stacktrace is extended. Now it checks queue field of + the given tcb at the start of function. If the function finds a + captured stack trace, the latter is printed using stracktrace_walker. + + Currently unwind_capture_stacktrace invocations are added directly to + handlers of mmap, munmap, mprotect, and execve. + + Here is the difference of output with/without patch: + + (without patch) + execve("./test-fork", ["./test-fork"], [/* 56 vars */]) = 0 + > /usr/lib64/ld-2.18.so(check_one_fd.part.0+0x82) [0x11f0] + + (with patch) + execve("./test-fork", ["./test-fork"], [/* 54 vars */]) = 0 + > /usr/lib64/libc-2.18.so(execve+0x7) [0xbcd27] + > /home/yamato/var/strace/strace(exec_or_die+0x10c) [0x26ac] + > /home/yamato/var/strace/strace(startup_child+0x346) [0x134f6] + > /home/yamato/var/strace/strace(init+0x89f) [0x13dff] + > /home/yamato/var/strace/strace(main+0xa) [0x26ca] + > /usr/lib64/libc-2.18.so(__libc_start_main+0xf5) [0x21d65] + > /home/yamato/var/strace/strace(_start+0x29) [0x2799] + + In older version output lines of captured elements were built when + printing. In this version they are built when capturing the stack. + As result, unneeded dynamic memory allocations are avoided. + Suggested by Luca Clementi. + + In older version the combination of snprintf and realloc were used. + In this version they are replaced with asprintf. + Suggested by Dmitry Levin. + +2014-05-30 Masatake YAMATO + + unwind: introduce own debug macro. + * unwind.c (DPRINTF): New macro, to be utilized in debugging cache + management code. + +2014-05-30 Masatake YAMATO + + unwind: introduce stacktrace_walker. + In current implementation, the stack trace is captured and printed at + the same time, in trace_syscall_exiting. This approach cannot + provide user expected information when a system call changes the + memory mapping. In such cases, the stack trace should be captured on + entering syscall and printed on exiting. + + As the initial step for splitting capturing from printing, this change + introduces stacktrace_walker utility function. It can be used both for + capturing in trace_syscall_entering and printing in + trace_syscall_exiting. + +2014-05-30 Masatake YAMATO + + unwind: give all exported functions "unwind_" prefix. + * unwind.c (init_unwind_addr_space): Rename to unwind_init. + (init_libunwind_ui): Rename to unwind_tcb_init. + (free_libunwind_ui): Rename to unwind_tcb_fin. + (delete_mmap_cache): Rename to unwind_cache_invalidate. + (print_stacktrace): Rename to unwind_print_stacktrace. + * defs.h: Update prototypes. + * mem.c: All callers updated. + * process.c: Likewise. + * strace.c: Likewise. + * syscall.c: Likewise. + +2014-05-30 Masatake YAMATO + + unwind: delete mmap cache in free_libunwind_ui. + free_libunwind_ui is expected to release all unwind related resources + attached to tcp. + + * strace.c (droptcb): Move delete_mmap_cache call ... + * unwind.c (free_libunwind_ui): ... to here. + +2014-05-30 Masatake YAMATO + + unwind: make alloc_mmap_cache function local. + * defs.h (alloc_mmap_cache): Remove. + * unwind.c (alloc_mmap_cache): Add static qualifier. + + unwind: fix a bug in range updating of binary search. + * unwind.c (print_stacktrace): Fix off-by-one error in binary search. + +2014-05-30 Luca Clementi + + Add -k option to print stack trace after each syscall. + Print the stack trace of the traced process after each system call when + -k option is specified. It is implemented using libunwind to unwind the + stack and to obtain the function name pointed by the IP. + + Based on the code that was originally taken from strace-plus + of Philip J. Guo. + + * configure.ac: Add --with-libunwind option. Check libunwind support. + * Makefile.am: Add libunwind support. + * defs.h (struct tcb) [USE_LIBUNWIND]: Append libunwind specific fields. + [USE_LIBUNWIND] (stack_trace_enabled, alloc_mmap_cache, + delete_mmap_cache, print_stacktrace): New prototypes. + * mem.c (print_mmap, sys_munmap, sys_mprotect): Add libunwind support. + * process.c (sys_execve): Likewise. + * strace.c (usage, alloctcb, droptcb, init): Likewise. + * syscall.c (trace_syscall_exiting): Likewise. + * unwind.c: New file. + * strace.1: Document -k option. + +2014-05-30 Dmitry V. Levin + + sysctl: update CTL_*, KERN_*, NET_*, and VM_* constants. + * configure.ac (AC_CHECK_DECLS): Add CTL_*, KERN_*, NET_*, and + VM_* constants. + * system.c (CTL_PROC, CTL_CPU): Remove definitions. + * xlat/sysctl_*.in: Update. + + Check for constants used by waitid function. + * configure.ac (AC_CHECK_DECLS): Add P_* constants. + + Check for LO_FLAGS_READ_ONLY constant. + * configure.ac (AC_CHECK_DECLS): Add LO_FLAGS_READ_ONLY. + + Compress blank lines. + Suppress empty lines left after automated xlat conversion. + + xlat: cleanup the aftermath of automatic conversion. + + Generate xlat/*.in files. + Automatically convert xlat structures from *.c files to xlat/*.in files + using "./generate_xlat_in.sh *.c" command. + + Rename several xlat structures to avoid collisions. + * bjm.c (which): Rename to qm_which. + * ipc.c (msg_flags): Rename to ipc_msg_flags. + * time.c (which): Rename to itimer_which. + + Enhance xlat generator. + * xlat/gen.sh: Define all xlat structs not declared in defs.h as static. + Some symbolic constants are not macros, extend #ifdef check to cover + symbolic constants checked by AC_CHECK_DECLS. + Handle complex symbolic constants in SYMBOL|... form. + Handle symbolic constants in 1< + + Use bootstrap script consistently. + Now that ./xlat/gen.sh has to be run before autoreconf, + replace all autoreconf calls with ./bootstrap call. + + * bootstrap: Forward arguments to autoreconf. + * build_static_example.sh: Replace autoreconf call with bootstrap call. + * make-dist: Likewise. + * qemu_multiarch_testing/README: Likewise. + +2014-05-30 Mike Frysinger + + Implement xlat generator. + * bootstrap: New file. + * xlat/gen.sh: Likewise. + * Makefile.am: Include xlat/Makemodule.am + (EXTRA_DIST): Add $(XLAT_INPUT_FILES), $(XLAT_HEADER_FILES), and + xlat/gen.sh. + +2014-05-30 Dmitry V. Levin + + tests: fix SCM_RIGHTS test for big-endian systems. + * tests/scm_rights.c (main): Send zero integer to avoid issues with + endianness. + * tests/scm_rights-fd.test: Update grep patterns. + + Decode file descriptors passed via SCM_RIGHTS control messages. + * net.c (printcmsghdr): Print descriptors from SCM_RIGHTS control + messages using printfd. + * tests/scm_rights.c: New file. + * tests/scm_rights-fd.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add scm_rights. + (TESTS): Add scm_rights-fd.test. + * tests/.gitignore: Add scm_rights and uio. + + tests: add a test for -c and -w options. + * tests/count.test: New test. + * tests/Makefile.am (TESTS): Add it. + +2014-05-29 Mark Hills + + Optionally produce stats on syscall latency. + Time spent in system time is not useful where a syscall depends on some + non-CPU resource, eg. typically open() or stat() to a network drive. + + This patch adds a new flag (-w) to produce a summary of the time + difference between beginning and end of the system call (ie. latency) + + This functionality has been useful to profile slow processes that + are not CPU-bound. + +2014-05-29 Dmitry V. Levin + + Constify count_syscall function. + * count.c (count_syscall): Add const qualifier to timeval argument and + rename it. Store the wall clock time spent while in syscall in separate + timeval variable. + * defs.h (count_syscall): Update prototype. + * syscall.c (trace_syscall_exiting): Update count_syscall invocation. + + Constify tv_* functions. + * defs.h (tv_nz, tv_cmp, tv_float, tv_add, tv_sub, tv_mul, tv_div): Add + const qualifier to read only arguments. + * util.c (tv_nz, tv_cmp, tv_float, tv_add, tv_sub, tv_mul, tv_div): + Likewise. + +2014-05-28 Dmitry V. Levin + + Use printstr for sethostname, setdomainname, and gethostname decoding. + The argument passed to sethostname and setdomainname syscalls, as well + as the string returned by gethostname syscall, is not a pathname, so + printpathn is not the right method for its decoding. + + * process.c (sys_sethostname, sys_setdomainname): Decode 1st argument + using printstr instead of printpathn. + [ALPHA] (sys_gethostname): Likewise. + +2014-05-21 James Hogan + + Fix {get,set}rlimit decoding with unreliable SIZEOF_RLIM_T. + When strace is built with large file support definitions in CFLAGS (as + may be provided by buildroot) the C library headers may expose a 64-bit + rlim_t even though the struct rlimit fields used by the system call + interface are only 32-bit. The SIZEOF_RLIM_T will then be 8 which + results in bad decoding of the getrlimit and setrlimit syscalls. + + This is fixed by replacing unreliable SIZEOF_RLIM_T based checks with + checks for current_wordsize. + +2014-05-13 Masatake YAMATO + + Enhance setns syscall decoding. + * process.c (sys_setns): New function. + Decode the 2nd syscall argument using clone_flags. + * linux/syscall.h (sys_setns): New prototype. + * linux/dummy.h (sys_setns): Remove. + +2014-05-12 Dmitry V. Levin + + mips: fix syscall entries that should have TP flag set. + + xtensa: fix unshare syscall entry. + + alpha, hppa, mips n64: fix waitid syscall entry. + + Add TM flag to shmat and shmdt syscall entries. + + Alias sys_vfork to sys_fork. + * process.c (sys_vfork): Remove. + * linux/syscall.h (sys_vfork): Likewise. + * linux/dummy.h (sys_vfork): Alias to sys_fork. + * linux/alpha/syscallent.h: Fix vfork entry. + * util.c (setbpt): Do not check for sys_vfork. + * syscall.c (syscall_fixup_for_fork_exec): Likewise. + +2014-04-17 Dmitry V. Levin + + epoll_ctl: fix EPOLL_CTL_DEL argument decoding. + * desc.c (sys_epoll_ctl): Do not parse the event structure for + EPOLL_CTL_DEL operation. + + Reported-by: Марк Коренберг + +2014-04-17 Dmitry V. Levin + + Update CLOCK_* constants. + * time.c (clocknames): Add CLOCK_BOOTTIME, CLOCK_REALTIME_ALARM, + CLOCK_BOOTTIME_ALARM, CLOCK_SGI_CYCLE, and CLOCK_TAI. + Fixes RH#1088455. + +2014-04-17 Dmitry V. Levin + + Fix preadv/pwritev offset decoding. + * util.c (printllval): Add align argument. + * defs.h (printllval): Update prototype. + (printllval_aligned, printllval_unaligned): New macros. + * file.c (sys_readahead, sys_truncate64, sys_ftruncate64, sys_fadvise64, + sys_fadvise64_64, sys_sync_file_range, sys_sync_file_range2, + sys_fallocate): Replace printllval call with printllval_aligned. + * io.c (sys_pread, sys_pwrite): Likewise. + (sys_preadv, sys_pwritev): Replace printllval call with + printllval_unaligned. + * linux/arm/syscallent.h: Set the number of preadv and pwritev + arguments to 5. + * linux/mips/syscallent-o32.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/xtensa/syscallent.h: Likewise. + + Reported-by: Dima Kogan + +2014-04-16 Dmitry V. Levin + + tests: add a test for pread/pwrite and preadv/pwritev offset decoding. + * tests/uio.c: New file. + * tests/uio.test: New test. + * tests/Makefile.am (check_PROGRAMS): Add uio. + (uio_CFLAGS): Define. + (TESTS): Add uio.test. + +2014-04-10 Dmitry V. Levin + + Refactor LDT decoding. + * configure.ac (AC_CHECK_TYPES): Remove struct user_desc. + * ldt.c: New file. + * Makefile.am (strace_SOURCES): Add ldt.c. + * mem.c: Do not include . + (print_ldt_entry): Remove. + (sys_modify_ldt, sys_set_thread_area, sys_get_thread_area): Move... + * ldt.c: ... here. + * process.c: Do not include . + (sys_clone) [I386 || X86_64 || X32]: Use print_user_desc. + +2014-04-10 Denys Vlasenko + + Make int3 example in comments more cut-n-pastable. + I found that I use it quite often. Lets make it so that + after cut-n-pasting it into a file, there is no need + to edit the result (e.g. no need to remove C comment + chars from every line. + +2014-04-09 Dmitry V. Levin + + mips: enable decoding of set_thread_area. + * linux/dummy.h [MIPS]: Do not redirect sys_set_thread_area to printargs. + * mem.c [MIPS] (sys_set_thread_area): Define. + + x86_64, x32: enable decoding of modify_ldt, get_thread_area, and set_thread_area + * linux/dummy.h [X86_64 || X32]: Do not redirect sys_modify_ldt, + sys_get_thread_area, and sys_set_thread_area to printargs. + + x32: decode clone LDT user_desc entries for x86 processes. + * mem.c [X32]: Include asm/ldt.h. + [X32] (print_ldt_entry, sys_modify_ldt, sys_set_thread_area, + sys_get_thread_area): Define. + * process.c [X32]: Include asm/ldt.h. + (sys_clone) [X32]: Decode LDT entry if current_personality == 1. + +2014-04-09 Elliott Hughes + + x86-64: decode clone LDT user_desc entries for x86 processes. + * mem.c [X86_64]: Include asm/ldt.h. + [X86_64] (print_ldt_entry, sys_modify_ldt, sys_set_thread_area, + sys_get_thread_area): Define. + * process.c [X86_64]: Include asm/ldt.h. + (sys_clone) [X86_64]: Decode LDT entry if current_personality == 1. + +2014-04-09 Dmitry V. Levin + + x32: fix clone(2) argument order for x86 processes. + Apply the same fix that was made for x86_64. + + * process.c [X32] (ARG_CTID, ARG_TLS): Take current + personality into account. + +2014-04-09 Elliott Hughes + + x86-64: fix clone(2) argument order for x86 processes. + Without this patch, strace claims that parent_tidptr == tls, which is + clearly wrong. It is expected that parent_tidptr == child_tidptr. + + * process.c [X86_64] (ARG_CTID, ARG_TLS): Take current + personality into account. + +2014-04-06 Elliott Hughes + + aarch64: Fix decoding of arm struct stat64. + We need to handle this situation more like x86-64. 32-bit arm and i386 + actually have a common struct stat64, except the arm one must not be + packed. Additionally, on aarch64 the 32-bit personality is personality 0. + +2014-03-20 Dmitry V. Levin + + ARM EABI: disable OABI support by default. + OABI is rarely used in ARM EABI systems nowadays, so disable its support + by default. Add --enable-arm-oabi option to enable ARM OABI support. + + * configure.ac: New option --enable-arm-oabi. + * syscall.c (get_scno) [ARM]: Check ENABLE_ARM_OABI macro defined by + configure instead of undocumented STRACE_KNOWS_ONLY_EABI macro. + +2014-03-12 Elliott Hughes + + Fix stat decoding for LP64 bionic. + Patch fb642bb6d63f7ffe2228bf48a6008bc8f56f67ff fixed building with + HAVE_STAT64 for aarch64 with uapi kernel headers but not x86_64. + The workaround needed to be applied to all LP64 architectures, not + just aarch64. This patch fixes that and adds an explanatory comment. + +2014-03-11 Masatake YAMATO + + Decode protocol argument for PF_NETLINK sockets. + * net.c (protocols): Rename to inet_protocols. + [PF_NETLINK] (netlink_protocols): New xlat structure. + (sys_socket): Rename protocols to inet_protocols. + [PF_NETLINK]: Decode protocol argument using netlink_protocols. + + Acked-by: Mike Frysinger + +2014-03-11 Dmitry V. Levin + + Cleanup socketpair decoding. + The only supported domain for socketpair syscall is AF_UNIX, so + no decoding related to other domains is required for socketpair. + + * net.c (sys_socketpair): Remove support for PF_INET and PF_IPX domains, + print the protocol argument as is. + +2014-03-11 Dmitry V. Levin + + printsiginfo: add SIGSYS decoding. + * configure.ac (AC_CHECK_MEMBERS): Check for siginfo_t.si_syscall. + * signal.c (SYS_SECCOMP): Define if not yet defined. + (sigsys_codes): new xlat structure. + (printsiginfo): Decode SIGSYS. + + Update siginfo codes. + * signal.c (siginfo_codes): Add SI_DETHREAD. + + Factor out printing of si_pid and si_uid members of siginfo_t. + * signal.c (printsigsource): New function. + (printsiginfo): Use it. + +2014-03-10 Elliott Hughes + + Improve SI_TIMER decoding. + Decode siginfo_t more clearly for si_code SI_TIMER. + The 'pid' is actually a POSIX timer id, and the 'uid' is actually the + overrun. + Also factor out the si_value dumping so it's the same for every si_code. + +2014-03-03 Elliott Hughes + + aarch64: fix decoding of arm syscall numbers. + If an aarch64 strace is tracing a process using the arm personality, it + also needs to call the shuffle_scno function for the ARM-specific + syscalls. + + * syscall.c (shuffle_scno): Define on AARCH64. + (get_scno) [AARCH64]: Call shuffle_scno when the tracee is in 32-bit mode. + +2014-03-03 Dmitry V. Levin + + Fix fcntl decoding. + Assume that F_SETLK64, F_SETLKW64, and F_GETLK64 are either defined or + not defined altogether. + Do not assume that sizeof(off_t) < sizeof(long long) when F_SETLK64 is + undefined. + + This change fixes build with musl libc on x86. + + * configure.ac: Define SIZEOF_OFF_T. + * desc.c (USE_PRINTFLOCK64): New macro. + (struct flock64, printflock64): Do not define on X32. + (printflock): Replace X32 specific workaround with SIZEOF_OFF_T check. + Fix printing off_t members of struct flock. + (sys_fcntl): Use USE_PRINTFLOCK64. + +2014-03-01 Dmitry V. Levin + + sys_fcntl: remove F_FREESP and F_FREESP64 support. + F_FREESP and F_FREESP64 fcntl commands are not available in Linux + and therefore the code implementing their decoding is useless. + Besides that, F_FREESP64 decoding is too complicated to support. + + * desc.c (fcntlcmds): Remove F_FREESP and F_FREESP64. + Remove F_FREESP64 from the check whether to define struct flock64. + (sys_fcntl): Remove F_FREESP and F_FREESP64 support. + +2014-02-28 Elliott Hughes + + Add multi-personality support to struct old_sigaction decoding. + struct sigaction is another structure that contains members + whose size differs between 32-bit and 64-bit personalities. + + * signal.c [HAVE_SIGACTION] (old_sigaction32): New structure. + [HAVE_SIGACTION] (decode_old_sigaction): Decode 32-bit struct + old_sigaction on a 64-bit host. + +2014-02-28 Elliott Hughes + + Fix decoding of arm struct stat64 by aarch64 strace. + aarch64's uapi header files have a struct stat but no struct stat64. + To correctly decode a 32-bit process' s struct stat64 we need + HAVE_STAT64, but then the build fails because there is no struct stat64. + Luckily, the aarch64 struct stat is structurally equivalent to the arm + struct stat64, so we can just reuse that. + + * file.c [AARCH64] (stat64): Define to stat. + +2014-02-28 Dmitry V. Levin + + Remove obsolete ioctlsort.c. + The generic version of ioctlsort.c became obsolete after commit + v4.6-240-g5afdf12 that removed its last non-Linux users. + + * ioctlsort.c: Remove. + * Makefile.am (EXTRA_DIST): Remove ioctlsort.c. + + Reported-by: Elliott Hughes + +2014-02-27 Dmitry V. Levin + + Add multi-personality support to stack_t decoding. + stack_t is one of many structures that contain members + whose size differs between 32-bit and 64-bit personalities. + + * signal.c (print_stack_t): Decode 32-bit stack_t on a 64-bit host. + + Reported-by: Elliott Hughes + +2014-02-27 Dmitry V. Levin + + Rewrite signal mask decoding without sigset_t. + The sigset_t provided by libc is not quite convenient. + In glibc, sigset_t is an array with space for 1024 bits, which is much + more than required: all architectures supported by Linux have only 64 + signals except MIPS, which has 128. + In bionic libc, LP32 sigset_t is only 4 bytes long, which is less than + necessary. + + With this change, signal mask is decoded without use of intermediate + sigset_t structure, which saves us some cpu cycles in case of glibc with + its inflated sigset_t, and enables build with libcs where sigset_t is + broken. + + Old implementation used to check each signal number in the given signal + mask twice using sigismember(). + New implementation is based on popcount and next_set_bit() so it's + noticeably faster. + + * configure.ac: Check for __builtin_popcount. + * signal.c: Ensure that NSIG >= 32. + (sprintsigmask, sprintsigmask_long, printsigmask): Remove. + (popcount32, sprintsigmask_n): New functions. + (tprintsigmask_addr, sprintsigmask_val, tprintsigmask_val): New macros. + (print_sigset_addr_len, sys_sigsetmask, sys_sigreturn, sys_siggetmask, + sys_sigsuspend, sys_sigprocmask, decode_new_sigaction): Update to use + new signal mask decoding interface. + * tests/sigaction.c (main): Add a test with almost filled signal mask. + * tests/sigaction.awk: Update. + +2014-02-26 Dmitry V. Levin + + Fix build with Bionic libc. + Add generic tests for fopen64 and fputs_unlocked functions to fix build + with Bionic libc that does not provide them. + + * configure.ac (AC_CHECK_FUNCS): Add fopen64 and fputs_unlocked. + * strace.c [_LARGEFILE64_SOURCE]: Use fopen instead of fopen64 + if !HAVE_FOPEN64. + Use fputs instead of fputs_unlocked if !HAVE_FPUTS_UNLOCKED. + * vsprintf.c: Use fputs instead of fputs_unlocked + if !HAVE_FPUTS_UNLOCKED. + + Reported-by: Elliott Hughes + +2014-02-25 James Yang + + powerpc64: fix 64-bit process detection on embedded. + * syscall.c (get_scno) [POWERPC64]: Fix 64-bit process detection + on embedded powerpc. + +2014-02-25 Dmitry V. Levin + + Do not compile scsi ioctl decoding if is not available. + Add a generic test for availability to fix build with + Bionic libc that does not provide . + + * configure.ac (AC_CHECK_HEADERS): Add scsi/sg.h. + * ioctl.c (ioctl_decode): Do not call scsi_ioctl if !HAVE_SCSI_SG_H. + * scsi.c: Do not compile scsi ioctl decoding if !HAVE_SCSI_SG_H. + + Reported-by: Elliott Hughes + +2014-02-14 Dmitry V. Levin + + Revert "Add support for Altera's Nios-II softcore architecture" + The patch originally submitted by Ezequiel García was OK, but I somehow + managed to mangle it so that most of the patch was not applied. + + According to Ezequiel García, an architecture port based on the generic + syscall ABI is in progress. + + This reverts commit 61e426e87ac81be4b4ff9de581635b4ea585624f. + +2014-02-08 Dmitry V. Levin + + tests: tighten sigaction check. + * tests/sigaction.awk: Check that input conatins all expected lines. + +2014-02-08 Dmitry V. Levin + + Fix sigaction reporting on non-x86 architectures. + If SA_RESTORER is not defined by libc headers but defined by kernel + headers, use the definition provided by kernel headers for proper + sigaction decoding. + + * signal.c [!SA_RESTORER]: Define to ASM_SA_RESTORER if the latter is + defined, regardless of architecure. + +2014-02-08 Dmitry V. Levin + + Check for SA_RESTORER definition in + Kernel header cannot be included from regular code + because it conflicts with libc headers, but SA_RESTORER is needed in + signal.c, so SA_RESTORER value is forwarded from to + config.h using a configure check. + + * configure.ac (ASM_SA_RESTORER): Define if SA_RESTORER is defined + in . + +2014-02-07 Dmitry V. Levin + + arm: fix compilation warning. + Fix "dereferencing type-punned pointer will break strict-aliasing rules" + warning introduced by commit v4.8-54-g670b21b. + + * signal.c (sys_sigreturn) [ARM]: Avoid dereferencing type-punned pointers. + +2014-02-06 Dmitry V. Levin + + kexec: fix typo. + * kexec.c (print_kexec_segments) [SUPPORTED_PERSONALITIES == 1]: Fix typo. + +2014-02-06 Ezequiel Garcia + + Add support for Altera's Nios-II softcore architecture. + This commit adds strace support for Altera's Nios-II official + kernel port as found in git://git.rocketboards.org/linux-socfpga.git + + Notice that this an out-of-tree kernel architectural port, and uses the + legacy (non-generic) system call ABI. In particular, the port doesn't + support PTRACE_GETREGSET, so the implementation is based on PTRACE_GETREGS. + + Given it's mandatory for new architectures to support the generic + syscall ABI and PTRACE_GETREGSET, if the nios2 architecure is ever + mainlined, the strace support will have to be re-factored accordingly. + + * linux/nios2/ioctlent.h.in: New file. + * linux/nios2/syscallent.h: Likewise. + * Makefile.am (EXTRA_DIST): Add linux/nios2/ioctlent.h.in and + linux/nios2/syscallent.h. + * configure.ac: Add NIOS2 to the list of supported architectures. + * defs.h [NIOS2]: Use register reading system. + * process.c (struct_user_offsets): Add NIOS2 support. + * syscall.c (get_regs, get_scno, get_syscall_args, + get_syscall_result, get_error): Likewise. + * util.c (change_syscall): Likewise. + * mem.c (sys_getpagesize): Define on NIOS2. + * system.c [NIOS2] (sys_cacheflush, sys_nios2cmpxchg): New functions. + + Acked-by: Mike Frysinger + +2014-02-05 Dmitry V. Levin + + Implement add_key, keyctl, and request_key decoding. + * keyctl.c: New file. + * linux/keyctl.h: Likewise. + * Makefile.am (strace_SOURCES): Add keyctl.c. + (EXTRA_DIST): Add linux/keyctl.h. + * linux/dummy.h (sys_add_key, sys_keyctl, sys_request_key): Remove. + * linux/syscall.h (sys_add_key, sys_keyctl, sys_request_key): New + prototypes. + + Implement ioprio_get and ioprio_set decoding. + * ioprio.c: New file. + * Makefile.am (strace_SOURCES): Add ioprio.c. + * linux/dummy.h (sys_ioprio_get, sys_ioprio_set): Remove. + * linux/syscall.h (sys_ioprio_get, sys_ioprio_set): New prototypes. + + Implement finit_module decoding. + * bjm.c (module_init_flags): New xlat structure. + (sys_finit_module): New function. + * linux/dummy.h (sys_finit_module): Remove. + * linux/syscall.h (sys_finit_module): New prototype. + + Cleanup inotify syscalls decoding. + * linux/inotify.h: New file. + * file.c (inotify_modes, inotify_init_flags, sys_inotify_add_watch, + sys_inotify_rm_watch, sys_inotify_init1): Move... + * inotify.c: ... here. + (inotify_modes): Rename to inotify_flags, convert to XLAT form. + (inotify_init_flags): Convert to XLAT form. + * Makefile.am (strace_SOURCES): Add inotify.c. + (EXTRA_DIST): Add linux/inotify.h. + + Enhance reboot decoding. + * linux/reboot.h: New file. + * system.c (bootflags1, bootflags2, bootflags3, sys_reboot): Move... + * reboot.c: ... here. + (bootflags2, bootflags3): Update constants. + * Makefile.am (strace_SOURCES): Add reboot.c. + (EXTRA_DIST): Add linux/reboot.h. + + Implement kexec_load decoding. + * kexec.c: New file. + * linux/kexec.h: Likewise. + * Makefile.am (strace_SOURCES): Add kexec.c. + (EXTRA_DIST): Add linux/kexec.h. + * linux/dummy.h (sys_kexec_load): Remove. + * linux/syscall.h (sys_kexec_load): New prototype. + + Use prepared editions of recently imported linux headers. + * linux/fanotify.h: Replace with edition prepared with headers_install.sh. + * linux/personality.h: Likewise. + + Implement fanotify_init and fanotify_mark decoding. + * fanotify.c: New file. + * linux/fanotify.h: Likewise. + * Makefile.am (strace_SOURCES): Add fanotify.c. + (EXTRA_DIST): Add linux/fanotify.h. + * defs.h (print_dirfd): New prototype. + * file.c (print_dirfd): Export. + * linux/dummy.h (sys_fanotify_init, sys_fanotify_mark): Remove. + * linux/syscall.h (sys_fanotify_init, sys_fanotify_mark): New + prototypes. + * pathtrace.c (pathtrace_match): Handle sys_fanotify_init and + sys_fanotify_mark. + + Use XLAT_END macro. + Automatically update all xlat structures using the following sed regexp: + s/^[[:space:]]*{[[:space:]]*0[[:space:]]*,[[:space:]]*NULL[[:space:]]*,\?[[:space:]]*}[[:space:]]*,\?[[:space:]]*/\tXLAT_END/ + + Itroduce XLAT_END macro to make xlat structures more compact. + * defs.h (XLAT_END): New macro. + + Convert personality_options to XLAT form. + * linux/personality.h: New file. + * Makefile.am (EXTRA_DIST): Add it. + * system.c: Include . + (personality_options): Update PER_* constants, convert to XLAT form. + + Convert futexops to XLAT form. + * process.c: Define FUTEX_*_PRIVATE macros. + (futexops): Convert to XLAT form. + + Convert sigev_value to XLAT form. + * time.c (sigev_value): Convert to XLAT form. + (printsigevent32, printsigevent): Update use of sigev_value. + + Use XLAT macro. + Automatically convert all xlat structures to XLAT form + using the following sed regexp: + s/^[[:space:]]*{[[:space:]]*\([^",}[:space:]]\+\)[[:space:]]*,[[:space:]]*"\1",\?[[:space:]]*}[[:space:]]*/\tXLAT(\1)/ + +2014-02-05 Dmitry V. Levin + + Introduce XLAT macro to ease maintenance of xlat structures. + * defs.h (XLAT): New macro. + + Suggested-by: Mike Frysinger + +2014-02-04 Stefan Sørensen + + Decode ptp ioctls. + * defs.h (ptp_ioctl): New prototype. + * ioctl.c (ioctl_decode): Call ptp_ioctl when code is '='. + * Makefile.am (strace_SOURCES): Add ptp.c. + (EXTRA_DIST): Add linux/ptp_clock.h. + * ptp.c: New file. + * linux/ptp_clock.h: New file. + +2014-02-03 Stefan Sørensen + + Decode dynamic posix clocks. + * time.c (cpuclocknames): New xlat structure. + (printclockname): New function that decodes posix clock names, + including dynamic fd encoded clocks. + (sys_clock_settime, sys_clock_gettime, sys_clock_nanosleep, + sys_clock_adjtime, sys_timer_create, sys_timerfd, sys_timerfd_create): + Use it. + + Update ADJ_* constants. + * time.c (adjtimex_modes): Add ADJ_TAI, ADJ_SETOFFSET, ADJ_MICRO, + ADJ_NANO, ADJ_OFFSET_SS_READ. + +2014-02-02 Philippe Ombredanne + + Add decoding of sockets descriptor 'paths' for network calls. + * net.c (sys_bind, sys_listen, do_accept, sys_send, sys_sendto, + sys_sendmsg, sys_sendmmsg, sys_recv, sys_recvfrom, sys_recvmsg, + sys_recvmmsg, sys_shutdown, sys_getsockopt, sys_setsockopt): Decode + socket descriptor arguments using printfd. + * pathtrace.c (pathtrace_match): Also check TRACE_NETWORK syscalls + that take socket descriptor arguments. + * tests/net-fd.test: New test for socket descriptor arguments decoding. + * tests/Makefile.am (TESTS): Add net-fd.test. + (net-fd.log): New dependency on net.log. + +2014-02-02 Dmitry V. Levin + + tests: rename all tests so that their names end in .test suffix. + Due to automake limitations, some features work only for tests + that end in one of the suffixes listed in TEST_EXTENSIONS. + + * tests/detach-running: Rename to detach-running.test. + * tests/detach-sleeping: Rename to detach-sleeping.test. + * tests/detach-stopped: Rename to detach-stopped.test. + * tests/net: Rename to net.test. + * tests/ptrace_setoptions: Rename to ptrace_setoptions.test. + * tests/qual_syscall: Rename to qual_syscall.test. + * tests/sigaction.sh: Rename to sigaction.test. + * tests/stat: Rename to stat.test. + * tests/strace-f: Rename to strace-f.test. + * tests/Makefile.am (TESTS): Update. + (LOG_COMPILER): Rename to TEST_LOG_COMPILER. + +2014-01-31 Mike Frysinger + + net: add more sockopt options. + This syncs with the defines as available in linux-3.13. + + * net.c (sockipoptions): Add IP_IPSEC_POLICY, IP_XFRM_POLICY, + IP_PASSSEC, IP_TRANSPARENT, IP_ORIGDSTADDR, IP_RECVORIGDSTADDR, + IP_MINTTL, IP_NODEFRAG, IP_UNBLOCK_SOURCE, IP_BLOCK_SOURCE, + IP_ADD_SOURCE_MEMBERSHIP, IP_DROP_SOURCE_MEMBERSHIP, MCAST_JOIN_GROUP, + MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE, MCAST_LEAVE_GROUP, + MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP, IP_MULTICAST_ALL, + IP_UNICAST_IF. + +2014-01-08 Chris Dearman + + mips: fix sigaction reporting. + MIPS userland uses the same sigaction structure with a full signal + mask for old_sigaction and new_sigaction and does does not have + an sa_restorer field. + + These changes have been tested on MIPS O32 big/little endian, MIPS N64 + big endian and x86-64. + + * signal.c (old_sigaction) [MIPS]: Add definition for MIPS. + (decode_old_sigaction) [MIPS]: Print sa_mask according to its definition. + (new_sigaction) [MIPS]: Add definition for MIPS. + +2014-01-08 Dmitry V. Levin + + Factor out struct sigaction printing code. + * signal.c [HAVE_SIGACTION] (decode_old_sigaction): New function. + [HAVE_SIGACTION] (sys_sigaction): Use it. + (decode_new_sigaction): New function. + (sys_rt_sigaction): Use it. + +2014-01-08 Dmitry V. Levin + + tests: add a test for rt_sigaction output. + Since "struct sigaction" varies between architectures, rt_sigaction + decoding sometimes produces incorrect output. This test is expected + to catch basic rt_sigaction decoding bugs. + + Based on a patch proposed by Chris Dearman. + + * tests/sigaction.c: New file. + * tests/sigaction.awk: Likewise. + * tests/sigaction.sh: New test. + * tests/Makefile.am (check_PROGRAMS): Add sigaction. + (TESTS): Add sigaction.sh. + (EXTRA_DIST): Add sigaction.awk. + * tests/.gitignore: Add sigaction. + +2014-01-05 Kirill A. Shutemov + + mem: add missed MAP_HUGETLB mmap flag. + * mem.c (mmap_flags): Add MAP_HUGETLB mmap flag. + + Acked-by: Mike Frysinger + +2013-12-31 Mike Frysinger + + Delete old PTRACE_{PEEK,POKE}USR logic. + The code base has settled on PTRACE_{PEEK,POKE}USER (with an E) and has + logic in defs.h to make sure it's set sanely. Delete this old logic as + the defs.h takes care of it now. + + * process.c: Delete PTRACE_PEEKUSR/PTRACE_POKEUSR defines. + * signal.c: Likewise. + * syscall.c: Delete PTRACE_PEEKUSR define. + * util.c: Likewise. + +2013-12-31 Mike Frysinger + + Decode the O_PATH flag. + * file.c (open_mode_flags): Add O_PATH. + +2013-11-13 Dmitry V. Levin + + Remove unused configure checks. + * configure.ac (AC_CHECK_FUNCS): Remove _sys_siglist and sys_siglist. + (AC_CHECK_DECLS): Likewise. + +2013-11-13 Dmitry V. Levin + + Assume that provides a valid ptrace prototype. + We used to explicitly list architectures where from glibc + is known to provide a valid prototype for ptrace, and use a homegrown + replacement for all the rest. Situation seems to be better nowadays, + glibc is not the only libc available, so let's use ptrace prototype from + by default, leaving the replacement for rare broken cases + if any. + + * defs.h: Use ptrace prototype workaround iff + NEED_PTRACE_PROTOTYPE_WORKAROUND is defined. + +2013-11-12 Dmitry V. Levin + + Stop using _LFS64_LARGEFILE. + There is only one place left in the code where strace guesses whether + libc provides LFS64 functions and structures. The most natural thing to + do there is to check for _LARGEFILE64_SOURCE - the macro provided by + glibc. Other libc implementations that provide nondegenerate LFS64 + interfaces are expected to define this macro as well. + + * defs.h (_LFS64_LARGEFILE): Remove. + * strace.c: Use _LARGEFILE64_SOURCE instead of _LFS64_LARGEFILE. + +2013-11-12 Dmitry V. Levin + + Define truncate64, ftruncate64, and getdents64 decoders unconditionally. + These decoders are referenced by most architectures, there were no + undefined references so far because _LFS64_LARGEFILE appears to be + always defined by glibc when _GNU_SOURCE is defined. + + * file.c (sys_truncate64, sys_ftruncate64, sys_getdents64): Define + unconditionally. + +2013-11-12 Dmitry V. Levin + + Define printflock64 only if it is referenced by other code. + * configure.ac (AC_CHECK_TYPES): Add struct flock64. + * desc.c (HAVE_F_SETLK64, HAVE_F_SETLKW64, HAVE_F_GETLK64): New macros. + [!HAVE_STRUCT_FLOCK64] (struct flock64): Define. + (printflock64): Define only if referenced by other code. + (sys_fcntl): Handle F_FREESP64, F_SETLK64, F_SETLKW64, and F_GETLK64 iff + these constants are defined and differ from their non-64bit versions. + +2013-11-12 Dmitry V. Levin + + Make PTRACE_PEEKUSER/PTRACE_POKEUSER checks less glibc specific. + * configure.ac (AC_CHECK_DECLS): Add PTRACE_PEEKUSER and + PTRACE_POKEUSER. + * defs.h: Define PTRACE_PEEKUSER and PTRACE_POKEUSER only if + they are not provided by . + + Reported by John Spencer. + +2013-11-12 Dmitry V. Levin + + Remove unneeded redefinitions of IPPROTO_* macros. + IPPROTO_* macros are defined by , no need to redefine + them. + + * net.c (IPPROTO_EGP, IPPROTO_PUP, IPPROTO_IDP, IPPROTO_IGMP, + IPPROTO_RAW, IPPROTO_MAX): Remove. + + Reported by John Spencer. + +2013-11-12 Dmitry V. Levin + + Remove unused AC_OFF_T_IS_LONG_LONG configure check. + * configure.ac: Remove AC_OFF_T_IS_LONG_LONG. + * m4/long_long.m4: Likewise. + + Remove unused code. + * configure.ac (AC_CHECK_TYPES): Remove struct opthdr and + struct t_opthdr. + * net.c (print_sock_optmgmt): Remove. + +2013-11-12 Dmitry V. Levin + + Use struct sigcontext instead of struct sigcontext_struct. + * configure.ac (AC_CHECK_TYPES): Remove struct sigcontext_struct. + * signal.c (sys_sigreturn) [S390 || S390X || POWERPC || ALPHA): Replace + struct sigcontext_struct with struct sigcontext. + + Reported by John Spencer. + +2013-11-12 Dmitry V. Levin + + Use standard names of sched_param structure members. + * process.c (sys_sched_setscheduler, sys_sched_getparam, + sys_sched_setparam): Use portable struct sched_param member name + sched_priority instead of glibc specific __sched_priority. + + Reported by John Spencer. + +2013-11-12 Dmitry V. Levin + + Make SIGEV_THREAD_ID decoding less glibc specific. + SIGEV_THREAD_ID decoding requires access to an internal member of + struct sigevent. There seems to be no portable way to do it besides + adding a configure check. + + * configure.ac (AC_CHECK_MEMBERS): Check for + struct sigevent._sigev_un._pad and struct sigevent.__pad. + * time.c (printsigevent): Use an appropriate struct sigevent member + to print thread id. + + Reported by John Spencer. + +2013-11-11 Dmitry V. Levin + + Remove unused configure checks. + * configure.ac (AC_CHECK_MEMBERS): Remove T_conn_res.QUEUE_ptr, + T_conn_res.ACCEPTOR_id, dqblk.dqb_curblocks, sigcontext.sc_hi2. + +2013-11-11 Dmitry V. Levin + + Assume "long long" availability. + Most of the code already uses long long types unconditionally. + + * configure.ac: Remove the check for long long. + * file.c (printstat64): Remove HAVE_LONG_LONG checks, use %llu format + string unconditionally. + +2013-11-11 Dmitry V. Levin + + Include only if there is no + * pathtrace.c: Do not include if is available. + * stream.c: Likewise. + + Move io_* syscalls decoding to a separate file. + * desc.c (sys_io_setup, sys_io_destroy, sys_io_submit, sys_io_cancel, + sys_io_getevents, declarations from libaio.h): Move to ... + * aio.c: new file. + * Makefile.am (strace_SOURCES): Add aio.c. + +2013-11-11 Denys Vlasenko + + Stop using external libaio.h. + This change incorporates a partial copy instead + of using external libaio.h. + Why? + Because we want to properly decode 32-bit aio calls + by 64-bit strace. For that, we need more definitions than + libaio.h provides. + (These defs are not done yet, but will eventually be done). + Keeping our local 32-bit compat defs in sync with libaio.h + _without seeing libaio structs_ is hard/more bug prone. + A smaller benefit is that we don't need libaio installed. + +2013-11-11 Denys Vlasenko + + sys_io_submit: simplify iocb_cmd_lookup() helper. + This helper returns two values (a string and an enum). + The caller prints the string. It's simpler to just print + the string in the caller itself. This eliminates + "return by reference" and more importantly, an intermediate + static string buffer for the string result. + + Since function of the helper is different now, + it is renamed to tprint_lio_opcode(). + +2013-11-11 Denys Vlasenko + + sys_io_submit: stop traversing iocb vector after first failure. + The program may use a very large nr but supply either outright + invalid iocbpp[], or one with far fewer elements than nr. + We used to try reading iocbpp[i] until i == nr. + With this change, we stop on the first failure. + +2013-11-09 Denys Vlasenko + + Fix pathtrace_match() to match recent fixes to select decoding. + + Fix select decoding on e.g. 32-bit ppc process by 64-bit strace. + Added next_set_bit() function which finds the next set bit, + properly taking into account word size of the traced process. + Use it in decode_select() instead of fd_isset(). + Also, properly round fdsize up to word size of traced process, + not to strace's word size. + +2013-11-06 Denys Vlasenko + + Speed up and explain fd_isset() + +2013-11-05 Dr. David Alan Gilbert + + Add a test for the latest select decoding fix. + * test/select.c (main): Add a test for nfds larger than FD_SETSIZE. + +2013-11-05 Dmitry V. Levin + + Fix select decoding for glibc in _FORTIFY_SOURCE mode. + glibc in _FORTIFY_SOURCE mode raises SIGABRT when descriptor greater + or equal to FD_SETSIZE is passed to FD_ISSET. Select family syscalls, + however, can legitimately accept such descriptors. To overcome this + limitation, we have to replace FD_ISSET with an equivalent that imposes + no such restrictions. + + * desc.c (fd_isset): New function. + (decode_select): Use it instead of FD_ISSET. + +2013-11-05 Dmitry V. Levin + + More select decoding fixes. + * desc.c (decode_select): Actually print arg[0] as int on entering + syscall. When arg[0] is negative, do not attempt to fetch and decode + descriptor sets on entering syscall, kernel will reject it anyway. + On exiting syscall, stop checking descriptor sets as soon as all + returned descriptors are found. + +2013-11-05 Denys Vlasenko + + Truncate arg[0] to int in select decoding. + This matches kernel's behavior. + + test/select.c: make comment more understandable. + +2013-11-05 Dr. David Alan Gilbert + + Fix select decoding with bogus (huge or negative) nfds. + We used to allocate and fetch bit arrays using a sanitized + length, but then iterate over them with "j < arg[0]" condition, + where arg[0] is not sanitized. This segfaults if arg[0] is huge + or negative. This change fixes this. + + Add test/select.c to capture the case. + +2013-09-26 Ali Polatel + + Work around conflict between and + Since glibc-2.18~39 defines ptrace_peeksiginfo_args + which collides with . + + * configure.ac: Check for `struct ptrace_peeksiginfo_args' in + . + * process.c: Work around potential conflict between + and by redefining ptrace_peeksiginfo_args. + * signal.c: Likewise. + * syscall.c: Likewise. + * util.c: Likewise. + +2013-09-11 Vineet Gupta + + Add support for ARC Cores from Synopsys. + Take #2 on mainlining strace support for ARC (last one was 4.6 based back + in March 2011), see + http://sourceforge.net/p/strace/mailman/message/27210168/ + + The syscall ABI is asm-generic/unistd.h based (so no legacy syscalls), + hence very similar to metag port. + + test/* all seem to work well. + + * linux/arc/ioctlent.h.in: New file. + * linux/arc/syscallent.h: Likewise. + * Makefile.am (EXTRA_DIST): Add linux/arc/ioctlent.h.in and + linux/arc/syscallent.h. + * configure.ac: Add ARC to the list of supported architectures. + * defs.h: Add ARC support. + * process.c (struct_user_offsets): Likewise. + * signal.c (sys_sigreturn): Likewise. + * syscall.c (print_pc, get_regset, get_regs, get_scno, get_syscall_args, + get_syscall_result, get_error): Likewise. + * util.c (change_syscall): Likewise. + + Acked-by: Mike Frysinger + +2013-09-11 William Manley + + Add support for decoding sync_file_range. + * file.c (sync_file_range_flags): New xlat structure. + (sys_sync_file_range, sys_sync_file_range2): New functions. + * linux/syscall.h (sys_sync_file_range, sys_sync_file_range2): New + prototypes. + * linux/dummy.h (sys_sync_file_range, sys_sync_file_range2): Remove. + * linux/mips/syscallent-o32.h: Set the number of sync_file_range + arguments to 7. + +2013-09-11 Mike Frysinger + + fanotify_mark: fix number of args for 32bit arches. + The fanotify_mark func takes a 64bit mask, so 32bit arches have to split + it up into two fields. When the syscall was added, it was listed as only + having 5 fields total (since that's correct for 64bit systems). + + * linux/arm/syscallent.h: Set the number of fanotify_mark arguments to 6. + * linux/bfin/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/metag/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + * linux/or1k/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/tile/syscallent1.h: Likewise. + + Acked-by: Chris Metcalf [for tile] + +2013-09-11 Dmitry V. Levin + + x86, x86_64: fix compilation warnings. + Fix "dereferencing type-punned pointer will break strict-aliasing rules" + warnings introduced by commit v4.8-52-gb51f364. + + * signal.c (sys_sigreturn): Avoid dereferencing type-punned pointers. + +2013-07-18 Denys Vlasenko + + Remove rt parameter from [s]printsigmask() + In almost all cases, the parameter was 1 ("decode RT sigs too"). + This change hardwires it to be 1. + + The cases where it was 0 are, and why the change to "decode RT sigs too" + is fine: + + IA64: 64-bit arch, all 64 signals fit in one word in any case. + S390[x]: sc.oldmask is a sigset_t on kernel side, + (sigset_t *)&sc.oldmask[0] does contain all 64 signals. + TILE: uc.uc_sigmask is a sigset_t on kernel side, + memcpy(&sigm, &uc.uc_sigmask, NSIG / 8) copies all 64 signals. + +2013-07-18 Denys Vlasenko + + Convert some uses of long_to_sigmask+printsigmask to sprintsigmask_long. + This allows to drop long_to_sigmask function, + and a whole bunch of sigset_t variables. + + Simplify some sigmask manipulations. + + Add compat support for sys_pselect6. + + I386: fix signedness mismatch warning. + &i386_regs.esp is a pointer to long, not unsigned long. + It needs a cast. + +2013-07-18 Denys Vlasenko + + Fix sigset printing via print_sigset(). + Replace print_sigset() with print_sigset_addr_len(), + which takes not only addr, but also len parameter. + This allows us to drop "do we need to print RT signals?" parameter, + and this fixes RT signals printing in many syscalls. + + sys_epoll_pwait: print RT signals too, print sigmask size argument. + + sys_sigprocmask: print_sigset -> print_sigset_addr_len(current_wordsize), + no change in functionality. + + sys_sigpending: use print_sigset_addr_len(current_wordsize) + instead of open-coding it. + + sys_rt_sigprocmask: use print_sigset_addr_len instead of open-coding it. + sys_rt_sigpending: ditto. + sys_rt_sigsuspend: ditto. + sys_rt_sigtimedwait: ditto. + + do_signalfd: print_sigset -> print_sigset_addr_len. This fixes + RT signals printing (wasn't showing them before). + + sys_ppoll: ditto. + + copy_sigset_len() is folded into its only user, print_sigset_addr_len(), + and copy_sigset() is gone. + + While at it, checked kernel sources and noted where kernel enforces + sigset_size == NSIG / 8 (== sizeof(kernel_sigset_t)), + and where it allows word-sized sigset_size ([rt_]sigpending). + +2013-07-18 Denys Vlasenko + + sys_rt_sigaction: fix sigset copying. + In practice, we always copy as many bytes as syscall param says + (8, or 16 on mips). However, malicious program can call sigaction + with wrong sigset size. Such syscall will result in EINVAL, + but we (strace) end up copying 128 bytes (sizeof(sigset_t)), + which copyes some garbage from stack after struct sigaction. + + Now we always copy NSIG / 8 bytes (which is 8 bytes, or 16 on mips). + +2013-07-18 Denys Vlasenko + + ARM: remove wrong NSIG = 32 define. + ARM in fact has 64 signals (1..64), and NSIG should be 65 + (as usual, rememebr that NSIG_libc == NSIG_kernel+1). + + I carefully reviewed all usages of NSIG. In syscall.c, + the only usage is: + for (i = 0; i <= NSIG; i++) + if (strcasecmp(s, signame(i) + 3) == 0)... + which is safe even if NSIG is way too big - signame(i) + returns a well-formed string for any i. + + In signal.c, memcpy(&sigset, &sc.sc_mask, NSIG / 8) is used by + IA64 and TILE code, so ARM change can't affect it. And final + usage is: + struct new_sigaction::unsigned long sa_mask[NSIG / sizeof(long)]; + It will grow on ARM (and become correct in the process). + Its only use is + memcpy(&sigset, &sa.sa_mask, NSIG / 8); + printsigmask(&sigset, 1); + which used to copy garbage in high bits, now it will copy actual data. + +2013-07-17 Denys Vlasenko + + ARM: fix sigreturn decoding. + Decoding of test/sigreturn testcase: + Was: + sigreturn() (mask [QUIT TRAP ABRT BUS SEGV USR2 PIPE STKFLT STOP XCPU VTALRM PROF WINCH IO PWR RTMIN]) = 0 + Now: + sigreturn() (mask [CHLD RT_1 RT_3 RT_31 RT_32]) = 0 + +2013-07-16 Denys Vlasenko + + Group USE_CUSTOM_PRINTF define with other tweakables. + No code changes. + +2013-07-16 Denys Vlasenko + + Improve sigreturn decoding on x86 to show RT signal bits too. + This includes decoding of 32-bit sigreturn by 64-bit strace, + which previously wasn't done. + + Added a test for it. + +2013-07-12 Anton Blanchard + + powerpc: enhance 32/64bit detection. + We were using uname to determine if userspace was 32 or 64bit. + This fails when we have a 64bit kernel and a 32bit userspace. + + * configure.ac (powerpc*): Similar to x86, use a runtime test + to determine if we are 32 or 64bit. + +2013-07-12 Anton Blanchard + + powerpc: fix some compiler warnings. + Fix a number of differing signedness warnings when building on + powerpc. + + powerpc: fix iflag build issue (static -> extern) + +2013-07-10 Denys Vlasenko + + PTRACE_SEIZE can set ptrace options immediately, use this feature. + This eliminates some rare bugs, such as post-execve SIGTRAP + generation when we attach to a process, and it manages to finish + execve'ing before we set TRACEEXEC option to suppress that. + +2013-07-08 Denys Vlasenko + + If -o|logger is in use, exit trace loop if nprocs == 0. + + Exit trace loop if got ECHILD, not if nprocs == 0. + Comment gives a testcase which wasn't handled correctly + by the old code. + +2013-07-07 Denys Vlasenko + + s390[x]: get rid of syscall_mode, delete code which never triggers. + Before this change, the logic was as follows: + syscall entry: + get_scno: + syscall_mode = GPR2 + scno = syscall_mode unless syscall_mode == -ENOSYS + (if -ENOSYS, scn is retrieved by decoding current insn) + fixup: + gpr2 = GPR2 + syscall_mode = scno unless syscall_mode == -ENOSYS + if (gpr2 != syscall_mode) stray_entry + syscall exit: + get_res: + gpr2 = GRP2 + fixup: + syscall_mode = scno unless syscall_mode == -ENOSYS + if (WAITEXECVE && gpr2 in (-ENOSYS, scno)) gpr2 = 0; + get_error: + gpr2 is retval + + Entry fixup's if() can never trigger: + regardless whether GPR2 is -ENOSYS or not, syscall_mode is always + equal to GRP2 value there. So it can be removed. + + On sysexit path, syscall mode is never used. + + Therefore, syscall_mode variable is deleted. grp2 is read from + GPR2 register in get_scno, redundant read in entry fixup is removed. + As a result, entry fixup's s390 code block vanishes completely. + + gpr2 variable is renamed s390_gpr2 to match the convention used + by other arches. + +2013-07-04 Denys Vlasenko + + ARM: add STRACE_KNOWS_ONLY_EABI define which can be used to omit OABI support + + Add paranoia check before passing a long to pid2tcb(int pid) + +2013-07-02 Denys Vlasenko + + In debug output, show waitpid status with 6 hex digits, not 4. + This shows event byte values better (without variable offset): + + [wait(0x01057f) = 29491] WIFSTOPPED,sig=SIGTRAP,EVENT_FORK (1) + [wait(0x80057f) = 29492] WIFSTOPPED,sig=SIGTRAP,EVENT_STOP (128) + ^^ + +2013-07-02 Denys Vlasenko + + Replace suspicious popen_pid assignment with an obviously correct one. + popen_pid = vfork() does work correctly, but for a subtle reason + that wrong assignment of 0 happens in the child _first_, + and _then_ correct value overwrites it in the parent. + + (And in a hyphothetical system where vfork = fork, + popen_pid wouldn't be shared, so it will also be ok.) + + However, it's not necessary to be difficult. + This change makes it so that assignment is done only in parent. + +2013-07-01 Denys Vlasenko + + Convert trace() from returning int to returning void. + The cleanup sequence in error cases, and on normal code path + was nearly the same, no point in duplicating it. + + Remove ia64-specific printing of current address on signal delivery. + The address is printed anyway by printleader() if -i is active. + + Rename ia32 to ia64_ia32mode, and make it bool, not long. + Grepping for just ia32 was turning up many false positives. + +2013-06-30 Denys Vlasenko + + Fold is_restart_error() into its sole user. + +2013-06-29 Denys Vlasenko + + Update qemu_multiarch_testing/README. + +2013-06-28 Denys Vlasenko + + sys_clone: add a comment about CLONE_PTRACE and CLONE_UNTRACED. + No code changes. + + POWERPC: get rid of "static long ppc_result" + + POWERPC: read ppc_regs.nip if -i. + + POWERPC: if GETREGS fails with EIO, don't try it again. + + Get rid of powerpc_getreg(), it's a copy of upeek() + + Change upeek() to take pid, not full tcp. + This will be used by next change. + +2013-06-26 Anton Blanchard + + powerpc: Provide a fallback for old kernels without PTRACE_GETREGS. + PTRACE_GETREGS was added to the ppc kernel in 2.6.23. In order to + provide backward compatibility for very old kernels, add a manual + fallback. + + * syscall.c (powerpc_getreg, powerpc_getregs_old): New functions. + (get_regs): Call powerpc_getregs_old if PTRACE_GETREGS is not supported. + +2013-06-26 Anton Blanchard + + powerpc: Use PTRACE_GETREGS to fetch all registers. + * defs.h: declare ppc_regs and get_regs_error. + * signal.c (sys_sigreturn): Use ppc_regs instead of upeek. + * syscall.c: define ppc_regs. + (printcall): Use ppc_regs instead of upeek. + (get_scno): Replace multiple upeek calls with one PTRACE_GETREGS call. + (get_syscall_result): Likewise. + +2013-06-26 Denys Vlasenko + + Another manpage tweak. + + Manpage update. + + Update build_static_example.sh. + Now it also contains a tested example of i686 build on 64-bit host. + + In -f mode, do not assume that new pid is stopped - handle exits too. + +2013-06-26 Denys Vlasenko + + Set strace_child only in the right branch. + "strace_child = pid" assignment was racing in NOMMU case + because of vfork (no way to know which process would win). + + After this change, strace_child is set to nonzero only + in one process after [v]fork. + +2013-06-26 Denys Vlasenko + + Get rid of TCB_INUSE and TCB_STRACE_CHILD. + We can use tcb::pid == 0 as an indicator of free tcb, + and we already have strace_child variable which holds + pid of our child, if any. + +2013-06-21 Denys Vlasenko + + Fix debug output of wait4 result (was reusing buf[] on unknown events) + + Show PTRACE_EVENT_STOP correctly in debug output. + +2013-06-21 Denys Vlasenko + + Panic a bit less when we see an unknown pid. + I stumbeld over this case when I used "exec stace ...". + + * strace.c (trace): Do not exit if we see an unknown pid in wait4. + +2013-06-21 Denys Vlasenko + + detach(): Reorganize code. Logic is the same. + * strace.c (detach): Use goto's instead of excessive nesting. + Drop sigstop_expected and interrupt_done variables. + + Eat pending SIGSTOP _before_ PTRACE_DETACH in detach() + * strace.c (detach): If TCB_IGNORE_ONE_SIGSTOP is set, + di not PTRACE_DETACH - wait for SIGSTOP first. + +2013-06-20 Denys Vlasenko + + detach(): warn if we see ECHILD from waitpid. + * strace.c (detach): Warn if we see ECHILD from waitpid. + Explain in comments that we don't normally expect !WIFSTOPPED + either, and also that PTRACE_CONT failure isn't expected + (the "break" there is a "I'm confused, bailing out" code style).. + + Improve error messages in detach() + * strace.c (detach): Change return type from int to void. + Improve error meesages: show PID, tell exactly which operation fails. + +2013-06-20 Denys Vlasenko + + Remove workarounds for ancient kernels lacking __WALL. + __WALL is available and working at least since 2.4 kernels: 10 years ago. + + * strace (detach): Remove workarounds for ancient kernels lacking __WALL. + Add missing EINTR check. + (trace): Remove workarounds for ancient kernels lacking __WALL. + Remove redundant double error printout. + +2013-06-20 Denys Vlasenko + + USE_SEIZE: fix detaching from stopped processes. + V3: split SEIZE/!SEIZE code paths to reduce confusion. + Extensively comment every possible case. + Verified that all tests/detach* tests work in both SEIZE and !SEIZE + cases. + + * strace.c (detach): If PTRACE_SEIZE API is in use, stop the tracee + using PTRACE_INTERRUPT instead of sending it a SIGSTOP. + In a subsequent waitpid loop, correctly wait and suppress SIGSTOP + on detach if PTRACE_INTERRUPT wasn't used, or wait for any ptrace + stop and detach without suppressing signals. + +2013-06-19 Dmitry V. Levin + + tests: disable /proc based checks when /proc is not mounted. + * tests/detach-running: Disable /proc based checks when + /proc/self/status is not available. + * tests/detach-sleeping: Likewise. + * tests/detach-stopped: Likewise. + +2013-06-19 Denys Vlasenko + + tests/detach-{running,sleeping,stopped}: check post-detach state. + Check that traced process still exists and is in a right state + after strace detached from it. + +2013-06-19 Dmitry V. Levin + + tests: ensure that strace can detach from running processes. + * tests/detach-running: New test. + * tests/Makefile.am (TESTS): Add it. + + tests: ensure that strace does not leave sleeping processes stopped. + * tests/detach-sleeping: Do not send SIGCONT to the sleeping process. + +2013-06-18 Dmitry V. Levin + + tests: fix parallel-tests support in detach-* tests. + * tests/detach-sleeping: Use $LOG file for set_ptracer_any output. + * tests/detach-stopped: Likewise. + + tests: parametrize "sleep 1" + * tests/init.sh (SLEEP_A_BIT): New variable. + * tests/detach-sleeping: Use it. + * tests/detach-stopped: Likewise. + + tests: ensure that strace can detach from sleeping and stopped processes + * tests/set_ptracer_any.c: New file. + * tests/detach-sleeping: New test. + * tests/detach-stopped: Likewise. + * tests/Makefile.am (check_PROGRAMS): Add set_ptracer_any. + (TESTS): Add detach-sleeping and detach-stopped. + * tests/.gitignore: Add set_ptracer_any. + +2013-06-18 Dmitry V. Levin + + tests: enhance timeout checks. + Run each test using a wrapper that does all necessary timeout checks. + + * tests/run.sh: New file. + * tests/Makefile.am (EXTRA_DIST, LOG_COMPILER): Add it. + * tests/init.sh (check_strace, check_timeout): Remove. + * tests/detach-stopped: Update callers. + * tests/net: Likewise. + * tests/ptrace_setoptions: Likewise. + * tests/qual_syscall: Likewise. + * tests/stat: Likewise. + * tests/strace-f: Likewise. + +2013-06-18 Dmitry V. Levin + + tests: enable parallel-tests support. + * configure.ac (AM_INIT_AUTOMAKE): Add parallel-tests. + + tests: prepare for parallel-tests support. + * tests/Makefile.am (CLEANFILES): Calculate dynamically from TESTS. + * tests/init.sh (LOG): New variable. + * tests/detach-stopped: Use it. + * tests/net: Likewise. + * tests/qual_syscall: Likewise. + * tests/stat: Likewise. + * tests/strace-f: Likewise. + +2013-06-18 Denys Vlasenko + + Cleanups. No logic changes. + * defs.h: Define new ptrace constants unconditionally. + * strace.c (detach): Fix comment. + (trace): Remove now unnecessary "if USE_SEIZE". + +2013-06-05 Dmitry V. Levin + + maint: post-release administrivia. + * NEWS: Add header line for next release. + +2013-06-03 Dmitry V. Levin + + ioctlent: add UAPI support. + * Makefile.am (IOCTLSORT_INCLUDEDIR): Define. + (ioctlsort): Use it. + * linux/ioctlent.sh (lookup_ioctls): Look into uapi directory tree. + Strip "uapi/" prefix from output path names. + * linux/ioctlent.h.in: Regenerate from v3.9 headers. + * NEWS: Mention it. + + Prepare for 4.8 release. + * NEWS: Update for 4.8 release. + * debian/changelog: 4.8-1. + * strace.spec: 4.8-1. + +2013-06-02 Dmitry V. Levin + + Fix "make dist" on recently added architectures. + * Makefile.am (EXTRA_DIST): Add linux/aarch64/errnoent1.h, + linux/aarch64/ioctlent.h.in, linux/aarch64/ioctlent1.h, + linux/aarch64/signalent1.h, linux/aarch64/syscallent.h, + linux/aarch64/syscallent1.h, linux/metag/ioctlent.h.in, + linux/metag/syscallent.h, linux/or1k/ioctlent.h.in, + linux/or1k/syscallent.h, linux/tile/errnoent1.h, linux/tile/ioctlent1.h, + linux/tile/signalent1.h, linux/tile/syscallent1.h, linux/ubi-user.h, + linux/xtensa/ioctlent.h.in, and linux/xtensa/syscallent.h. + + Fix "make dist" regression introduced by commit v4.7-184-gd648f29. + * Makefile.am (EXTRA_DIST): Add linux/ubi-user.h. + +2013-05-28 Dmitry V. Levin + + Do not suppress signal delivery messages with -qq. + Current implementation of -qq does not allow suppressing exit status + messages without suppressing signal delivery messages, which is not + good. There is a traditional "-e signal=none" syntax that can be used + to suppress all signal delivery messages. + This partially reverts commit v4.7-222-g01997cf. + + * strace.c (trace): Do not suppress signal delivery messages with -qq. + * strace.1: Update documentation about -qq option. + +2013-05-23 Chris Metcalf + + tile: use siginfo_t, not struct siginfo. + As of glibc 2.16, "struct siginfo" is no longer supported, + and "siginfo_t" must be used instead. + + tile: remove MAP_CACHE_xxx support in mem.c. + These flags support functionality in mmap() that has not been + pushed back to the community, and which may or may not eventually + end up being the final community model. In the interim, having + these flags unconditionally present for "#ifdef TILE" just means + that the TILE build breaks if using the community versions of + the kernel and glibc, so just revert the code until such time + as it may end up in the community. + +2013-05-17 Mike Frysinger + + Rename COPYRIGHT to COPYING. + The standard name people have adopted is "COPYING" rather than + "COPYRIGHT". Use that as a lot of license scanning tools look for it. + + * COPYRIGHT: Rename to ... + * COPYING: ... this. + * Makefile.am (EXTRA_DIST): Rename COPYRIGHT to COPYING. + * README: Likewise. + * strace.spec (%files): Likewise. + +2013-05-17 Dmitry V. Levin + + Sync strace.spec and debian/ with packages. + * debian/changelog: Sync with 4.7-1. + * debian/strace.docs: Likewise. + * strace.spec: Sync with 4.7-3. + + Update PTRACE_O_* constants. + * process.c (ptrace_setoptions_flags): Sync with Linux 3.9. + + Update AF_*, PF_*, MSG_*, and TCP_* constants. + * net.c (domains, addrfams, protocols, socktcpoptions): Sync with + Linux 3.9. + +2013-05-14 Dmitry V. Levin + + NOMMU: do not hide startup syscalls unless in -D mode. + On NOMMU systems in "strace PROG" case, we have no way to attach to + the tracee before it calls execve unless in -D mode. That is, the + first execve call is very likely to be missed, and setting + hide_log_until_execve just results to empty log. + + * strace.c (init) [NOMMU_SYSTEM]: Do not set hide_log_until_execve + unless in -D mode. + +2013-05-14 Dmitry V. Levin + + Make -D mode work when the Yama LSM is enabled. + * strace.c [HAVE_PRCTL]: Include sys/prctl.h. + (startup_child) [HAVE_PRCTL && PR_SET_PTRACER && PR_SET_PTRACER_ANY]: + In -D mode, allow tracing the process that is going to become the + tracee. + + Update PR_* constants. + * process.c (prctl_options): Add PR_SET_PTRACER. + +2013-05-14 Denys Vlasenko + + Hide startup syscalls. + Tested with "./strace [-D] [-q] [-bexecve] env true", + all cases seem to work. + + * defs.h: Declare new variable: bool hide_log_until_execve. + * strace.c: Define hide_log_until_execve. + Rename skip_startup_execve to skip_one_b_execve. + (startup_child): Do not set skip_one_b_execve = 1 here. + (init): If "strace PROG" case (as opposed to "strace -pPID"), + set skip_one_b_execve and hide_log_until_execve to 1. + (trace): Don't print signal messages if hide_log_until_execve == 1. + * syscall.c (trace_syscall_entering): + Skip syscall printing if hide_log_until_execve == 1. + Reset hide_log_until_execve if we enter execve syscall. + (trace_syscall_exiting): Skip syscall printing if hide_log_until_execve == 1. + +2013-05-13 Daniel P. Berrange + + Allow -q to be repeated for very quiet output. + Even with the -q flag specified, tracing output is still mixed + with messages about signals and process exit status, which is + often irrelevant. Allow the -q option to be repeated to force + the suppression of signals / exit status info too. + + * defs.h: Change 'qflag' from 'bool' to 'unsigned int'. + * strace.1: Document ability to repeat '-q' option. + * strace.c: Allow '-q' to be repeated to quieten process + exit status and signal messages. + +2013-05-11 Dmitry V. Levin + + mips o32: fix syscall table. + * linux/mips/syscallent-o32.h: Add entries for getpmsg, putpmsg, + get_mempolicy, set_mempolicy and vserver. Fix names for umount, + umount2, mmap, mmap2, pread64, pwrite64, sigaltstack and fstatat64 + syscalls. + +2013-05-10 Dmitry V. Levin + + mips n64: fix syscall table. + * linux/mips/syscallent-n64.h: Add entries for get_mempolicy, + set_mempolicy and timerfd syscalls. Fix entry for socket syscall. + Fix names for pread64, pwrite64, shmat, rt_sigsuspend, sigaltstack + and umount2 syscalls. + + mips n32: fix syscall table. + * linux/mips/syscallent-n32.h: Add entries for mbind, get_mempolicy, + set_mempolicy and timerfd syscalls. Fix entry for socket syscall. + Fix handlers for truncate, ftruncate and getdents64 syscalls. + Fix names for pread64, pwrite64, shmat, rt_sigsuspend, sigaltstack, + umount2, and getdents64 syscalls. + +2013-05-08 Dmitry V. Levin + + sync_file_range: fix number of syscall arguments. + * linux/avr32/syscallent.h: Set the number of sync_file_range arguments + to 6. + * linux/bfin/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + * linux/or1k/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Change sync_file_range to + sync_file_range2, set the number of sync_file_range2 arguments to 6. + * linux/tile/syscallent.h: Change sync_file_range to sync_file_range2, + set the number of sync_file_range2 arguments to 4. + * linux/tile/syscallent1.h: Change sync_file_range to sync_file_range2. + update handler. + * linux/xtensa/syscallent.h: Likewise. + + Add syscall entries for new linux syscalls. + * linux/dummy.h: Add printargs aliases for sys_finit_module, sys_kcmp + and sys_sync_file_range2. + * linux/alpha/syscallent.h: Add entries for process_vm_readv + and process_vm_writev. + * linux/bfin/syscallent.h: Likewise. + * linux/arm/syscallent.h: Add entries for sync_file_range2, kcmp + and finit_module. + * linux/hppa/syscallent.h: Add entries for process_vm_readv, + process_vm_writev, kcmp and finit_module. + * linux/tile/syscallent.h: Likewise. + * linux/tile/syscallent1.h: Likewise. + * linux/ia64/syscallent.h: Add entry for finit_module. + * linux/i386/syscallent.h: Add entries for kcmp and finit_module. + * linux/m68k/syscallent.h: Likewise. + * linux/metag/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-n64.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + * linux/or1k/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/xtensa/syscallent.h: Likewise. + * linux/s390/syscallent.h: Add entries for s390_runtime_instr, kcmp + and finit_module. + * linux/s390x/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Add entries for kern_features, kcmp + and finit_module. + + tests/net: fix portability issues. + * tests/net-accept-connect.c: Fix address length passed to bind() + and connect(). + * tests/net: Update regexps. + + tests: add a test for basic network syscalls. + * tests/.gitignore: Add net-accept-connect, *.o and *.log.*. + * tests/Makefile.am (AM_CFLAGS): New variable. + (check_PROGRAMS): Add net-accept-connect. + (TESTS): Add net. + * tests/net-accept-connect.c: New file. + * tests/net: New file. + + tests: do not skip tests when timeout utility is not available. + * tests/init.sh (check_timeout): New function. + * tests/ptrace_setoptions: Use it. + * tests/qual_syscall: Likewise. + * tests/stat: Likewise. + * tests/strace-f: Likewise. + +2013-05-07 Dmitry V. Levin + + Move subcall decoding configuration out of the common code. + * Makefile.am (EXTRA_DIST): Add linux/subcall.h. + * linux/syscall.h (SYS_socket_subcall): Remove. + (SYS_socket_nsubcalls, SYS_ipc_subcall, SYS_ipc_nsubcalls): Move to ... + * linux/subcall.h: ... new file. + * linux/arm/syscallent.h: Define SYS_socket_subcall, include subcall.h. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + + Suggested by Mike Frysinger and Chris Metcalf. + +2013-05-07 Dmitry V. Levin + + sparc: remove some unused declarations and macros. + * linux/syscall.h [SPARC || SPARC64] (sys_msgsys, sys_semsys, + sys_shmsys): Remove declarations. + [SPARC || SPARC64] (SYS_semsys_subcall, SYS_semsys_nsubcalls, + SYS_msgsys_subcall, SYS_msgsys_nsubcalls, SYS_shmsys_subcall, + SYS_shmsys_nsubcalls): Remove macros. + +2013-05-07 Mike Frysinger + + mips: fix build regression. + The recent commit (2690fadc8b35190dddd29274a7405bac13adc469) shuffled + the mips headers around causing it to check the ABI defines before it + included the header which set those up. Now all mips builds fail with: + In file included from count.c:36:0: + defs.h:48:4: error: #error Unsupported _MIPS_SIM + + * defs.h [MIPS]: Move sgidefs.h above _MIPS_SIM check. + +2013-05-07 James Hogan + + metag: rename llseek syscall to _llseek. + The raw llseek syscall is called _llseek from userland, so fix the + naming of it for metag to allow the stat test to pass. + + * linux/metag/syscallent.h: Rename llseek syscall to _llseek. + +2013-05-07 James Hogan + + metag: disable socket and ipc subcall support. + The metag architecture also uses dedicated syscalls and doesn't need to + multiplex ipc and socket subcalls. + + * linux/syscall.h [METAG]: Do not define SYS_socket_subcall and + SYS_ipc_subcall. + +2013-05-07 Dmitry V. Levin + + pread, pwrite: fix number of syscall arguments. + The number of pread and pwrite arguments depends on architecture and + personality. For 64bit and ilp32 it equals to 4, for unaligned + 32bit it equals to 5, and for aligned 32bit it equals to 6. + + * linux/aarch64/syscallent1.h: Change the number of pread and pwrite + arguments to 4. + * linux/alpha/syscallent.h: Likewise. + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-n64.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/or1k/syscallent.h: Change the number of pread and pwrite + arguments to 5. + +2013-05-07 Dmitry V. Levin + + preadv, pwritev: fix number of syscall arguments. + The number of preadv and pwritev arguments depends on architecture and + personality. For 64bit and ilp32 it equals to 4, for unaligned 32bit + it equals to 5, and for aligned 32bit it equals to 6. + + * linux/aarch64/syscallent1.h: Change the number of preadv and pwritev + arguments to 4. + * linux/alpha/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-n64.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Change the number of preadv and pwritev + arguments to 6. + * linux/sh/syscallent.h: Likewise. + * linux/xtensa/syscallent.h: Likewise. + +2013-05-07 Dmitry V. Levin + + ftruncate64, truncate64: fix number of syscall arguments. + The number of ftruncate64/truncate64 arguments depends on architecture + and personality. For 64bit and ilp32 it equals to 2, for unaligned + 32bit it equals to 3, and for aligned 32bit it equals to 4. + + * linux/or1k/syscallent.h: Change the number of ftruncate64 and + truncate64 arguments to 3. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Change ftruncate64 and truncate64 handlers. + * linux/sparc/syscallent.h: Change ftruncate64 handler, change the + number of its arguments to 3. + * linux/xtensa/syscallent.h: Change the number of ftruncate64 and + truncate64 arguments to 4. + +2013-05-07 Dmitry V. Levin + + fallocate: fix number of syscall arguments. + The number of fallocate arguments depends on architecture and + personality. For 64bit and ilp32 it equals to 4, + for 32bit it equals to 6. + + * linux/aarch64/syscallent1.h: Change the number of fallocate arguments + to 4. + * linux/alpha/syscallent.h: Likewise. + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-n64.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Set fallocate handler and flags. + +2013-05-07 Dmitry V. Levin + + fadvise64, fadvise64_64: fix handlers and number of syscall arguments. + The number of fadvise64 arguments depends on architecture and + personality. For 64bit and ilp32 it equals to 4, for unaligned + 32bit it equals to 5, and for aligned 32bit it equals to 6. + + The number of fadvise64_64 arguments is 4 for 64bit and ilp32, for + unaligned 32bit and most of aligned 32bit it equals to 6, and for + mips o32 it equals to 7. + + * linux/alpha/syscallent.h: Set fadvise64 handler. + * linux/s390/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Set fadvise64_64 handler, change the number + of syscall arguments to 6. + * linux/ia64/syscallent.h: Change the number of fadvise64 arguments + to 4. + * linux/mips/syscallent-n32.h: Likewise. + * linux/tile/syscallent1.h: Change the number of fadvise64 arguments + to 5. + * linux/mips/syscallent-o32.h: Change the number of fadvise64_64 + arguments to 7. + * linux/s390x/syscallent.h: Change fadvise64_64 handler. Set fadvise64 + handler. Change numbers of fadvise64 and fadvise64_64 arguments to 4. + * linux/sh64/syscallent.h: Change fadvise64_64 handler. + Change numbers of fadvise64 and fadvise64_64 arguments to 4. + * linux/sparc/syscallent.h: Set fadvise64 and fadvise64_64 handlers, + change numbers of their arguments to 5 and 6. + * linux/x86_64/syscallent.h: Change fadvise64 handler. + +2013-05-07 Dmitry V. Levin + + mips o32: raise the max number of syscall arguments to 7. + On mips o32, fadvise64_64 takes 7 arguments. + + * defs.h [LINUX_MIPSO32]: Raise MAX_ARGS to 7. + +2013-05-07 Dmitry V. Levin + + mips: split syscallent.h. + linux/mips/syscallent.h consisted of several parts that had little in + common. Split them into separate files to ease maintenance. + + * linux/mips/syscallent-compat.h: New file. + * linux/mips/syscallent-n32.h: Likewise. + * linux/mips/syscallent-n64.h: Likewise. + * linux/mips/syscallent-o32.h: Likewise. + * linux/mips/syscallent.h: Include them. + * Makefile.am (EXTRA_DIST): Add them. + +2013-05-07 Dmitry V. Levin + + readahead: fix number of syscall arguments. + The number of readahead arguments depends on architecture and + personality. For 64bit and ilp32 it equals to 3, for unaligned 32bit it + equals to 4, and for aligned 32bit it equals to 5. + + * linux/aarch64/syscallent1.h: Set number of readahead arguments to 3. + * linux/alpha/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/or1k/syscallent.h: Set number of readahead arguments to 4. + * linux/sh/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/xtensa/syscallent.h: Set number of readahead arguments to 5. + +2013-05-06 Dmitry V. Levin + + linux/syscall.h: make subcall decoding configuration more readable. + * linux/syscall.h: Inverse and sort the subcall ifdef, + add a comment why subcall decoding support is not enabled + on some architectures. + +2013-05-06 Chris Zankel + + xtensa: disable socket and ipc subcall support. + The Xtensa architecture also uses dedicated syscalls and doesn't + need to multiplex ipc and socket subcalls. + + * linux/syscall.h [XTENSA]: Do not define SYS_socket_subcall and + SYS_ipc_subcall. + +2013-05-06 Dmitry V. Levin + + Fix syscall flags. + * linux/aarch64/syscallent1.h: Fix syscall flags for send. + * linux/alpha/syscallent.h: Fix syscall flags for fchdir, getcwd, + oldumount, sigaltstack, umount, uselib, and utimes. + * linux/arm/syscallent.h: Fix syscall flags for close, creat, dup, dup2, + fchdir, fchmod, fchown, fchown32, fcntl, fcntl64, fdatasync, flock, + fsetxattr, fsync, getdents, getdents64, ioctl, oldfstat, oldselect, + open, pipe, poll, pread, pwrite, read, readahead, readdir, readv, + select, socketcall, write, and writev. + * linux/avr32/syscallent.h: Fix syscall flags for inotify_init and + unshare. + * linux/bfin/syscallent.h: Fix syscall flags for pread64 and pwrite64. + * linux/hppa/syscallent.h: Fix syscall flags for fchdir, flistxattr, + getcwd, pause, signal, umount2, uselib, utime, and vfork. + * linux/ia64/syscallent.h: Fix syscall flags for creat, fchdir, + lstat, umount, uselib, and utimes. Fix syscall handlers for + fgetxattr, flistxattr, fremovexattr, and fsetxattr. + * linux/m68k/syscallent.h: Fix syscall flags for close, creat, dup, + dup2, fchdir, fchmod, fchown, fchown32, fcntl, fcntl64, fdatasync, + flock, fsetxattr, getdents, ioctl, oldfstat, oldselect, open, pipe, + poll, pread64, pwrite64, read, readahead, readdir, readv, select, + socketcall, write, and writev. + * linux/metag/syscallent.h: Fix syscall flags for fanotify_init, + prlimit64, process_vm_readv, process_vm_writev, and quotactl. + * linux/microblaze/syscallent.h: Fix syscall flags for close, creat, + dup, dup2, fchdir, fchmod, fchown, fchown32, fcntl, fcntl64, + fdatasync, flock, fsetxattr, getdents, ioctl, oldfstat, oldselect, + open, perf_event_open, pipe, poll, pread64, pwrite64, read, readahead, + readdir, readv, select, socketcall, write, and writev. + * linux/mips/syscallent.h: Fix syscall flags for close, creat, dup, + dup2, fchdir, fchmod, fchown, fcntl, fcntl64, fdatasync, flock, + fsetxattr, getdents, getdents64, getxattr, ioctl, lgetxattr, + listxattr, llistxattr, lremovexattr, lsetxattr, oldfstat, open, pipe, + pivot_root, poll, pread, pwrite, read, readahead, readv, removexattr, + select, setxattr, socketcall, statfs, write, and writev. + * linux/or1k/syscallent.h: Fix syscall flags for fchdir and quotactl. + * linux/powerpc/syscallent.h: Fix syscall flags for fchdir. + * linux/sh/syscallent.h: Fix syscall flags for getcwd. + * linux/sparc/syscallent.h: Fix syscall flags for getresgid, getresuid, + setresgid, setresgid32, and setresuid. + * linux/xtensa/syscallent.h: Fix syscall flags for close, creat, dup, + dup2, fallocate, fchdir, fchmod, fchown, fcntl, fcntl64, fdatasync, + flock, fsetxattr, fstatfs, fstatfs64, fsync, getdents, getdents64, + ioctl, open, pipe, pivot_root, poll, pread64, pwrite64, read, + readahead, readv, rt_sigreturn, select, setfsgid, setfsuid, setuid, + swapoff, times, utime, write, and writev. + + tests/stat: enhance regexps. + * tests/stat: Enhance regexps that check tracing of stat/stat64 and + fstatat/fstatat64 syscalls. + +2013-05-06 Chris Metcalf + + tests/stat: support fstatat syscall for stat() + Newer Linux architectures don't support the stat/stat64 syscalls. + Instead they use fstatat() with AT_FDCWD and an extra flags argument. + Support seeing this output in the 'strace -efile' test. + + As part of this change, use "grep -E -x" syntax consistently for + all stat tests, since the number of \(foo\)\? expressions was becoming + pretty unwieldy. + + * tests/stat: Update stat/stat64 check regexp to handle architectures + that use fstatat instead. Use "grep -E -x" syntax consistently. + +2013-05-06 Dmitry V. Levin + + ARM OABI: fix 64-bit arguments decoding. + ARM OABI and ARM EABI have different function parameters passing rules, + see commit v4.6-11-g7a5b08f for details. + + * util.c (printllval): Do not align argument number in case of ARM OABI. + * file.c (sys_fadvise64_64): Likewise. + +2013-05-06 Mike Frysinger + + printllval: fix 64bit unpacking on mips/o32 and xtensa. + The mips/o32 ABI and xtensa arch also do 64bit aligning, so add it to the + printllval list for this. + + Normally for sys_fadvise64_64 we'd handle the same list of arches, but + mips/o32 ABI is funky and doesn't shift -- it has 7 args. So just add + xtensa to it. + + * file.c (sys_fadvise64_64): Add XTENSA to the shifted list. + * util.c (printllval): Add LINUX_MIPSO32 and XTENSA to the shifted list. + +2013-05-06 Chris Metcalf + + tile: disable socket and ipc subcall support. + The tile arch just has the dedicated syscalls, so disable + the logic for parsing subcalls. + + * linux/syscall.h [TILE]: Do not define SYS_socket_subcall and + SYS_ipc_subcall. + +2013-05-06 Mike Frysinger + + Blackfin: disable socketcall and ipc subcall support. + The Blackfin arch does not have a socketcall or ipc subcall + (it has dedicated syscalls broken out), so disable the logic for it. + + * linux/syscall.h [BFIN]: Do not define SYS_socket_subcall and + SYS_ipc_subcall. + +2013-05-05 Mike Frysinger + + s390: fix # of args truncate64/ftruncate64 takes. + * linux/s390/syscallent.h: Change nargs to 3 for truncate64/ftruncate64. + +2013-05-05 Mike Frysinger + + mtd: clamp ubi name strings. + Since the length fields with the ubi volnames are signed 16bit values, + make sure we clamp that number to the size of the buffer we've allocated + on the stack to prevent buffer overflows. + + * mtd.c (ubi_ioctl): Clamp length to string_quote to 0/UBI_MAX_VOLUME_NAME. + Check the return of string_quote and tweak the output accordingly. + +2013-05-04 Dmitry V. Levin + + printxval: support more architectures. + * configure.ac: Define SIZEOF_LONG_LONG. + * util.c (printllval): Handle all architectures with sizeof(long) > 4 + and sizeof(long) == sizeof(long long). + +2013-05-04 Mike Frysinger + + Fix building for sparc64 targets. + * util.c (printllval): Handle SPARC64 define. + + Fix building for mips n64 targets. + * util.c (printllval): Handle LINUX_MIPSN64 define. + +2013-05-03 Dmitry V. Levin + + hppa: fix stat64 and fstat64 decoding. + * file.c [HPPA]: Do not redefine stat64 to hpux_stat64. + + arm, aarch64, ppc: fix printllval-based decoders. + * util.c (printllval) [ARM || POWERPC]: Align argument number. + [AARCH64]: Align argument number in 32bit mode. + * file.c (sys_fadvise64_64) [ARM || POWERPC]: Remove no longer needed + printllval workaround. + [AARCH64]: Fix printing POSIX_FADV_* constants in 32bit mode. + +2013-05-02 Mike Frysinger + + Decode mtd/ubi ioctls. + Been playing with UBI of late and it'd help if I could see what it was + doing. Not entirely sure about the decoding of UBI_IOCVOLUP -- it takes + a pointer to a 64bit value, not a strict. + + * util.c (MAX, MIN): Move to ... + * defs.h (MAX, MIN): ... here. + (CLAMP): Define. + (ubi_ioctl): New prototype. + * ioctl.c (ioctl_decode): Call ubi_ioctl when code is 'o' or 'O'. + * mtd.c: Include ubi user API header. + (ubi_volume_types): New enum decode. + (ubi_volume_props): Likewise. + (ubi_ioctl): Define. + * linux/ubi-user.h: Import from linux 3.8. + +2013-05-02 Mike Frysinger + + test: add mtd/ubi test helpers. + I used these to develop the mtd/ubi ioctl decoders. + + * test/.gitignore: Add mtd/ubi. + * test/Makefile: Declare all tests in a PROGS var. + Declare build targets .PHONY. + (all): Depend on $(PROGS) instead of hardcoded list. + (clean): Remove $(PROGS) instead of hardcoded list. + * test/mtd.c: New file. + * test/ubi.c: Likewise. + +2013-05-02 Mike Frysinger + + test: include headers for used funcs. + These funcs use things like wait/write/read/strcmp but sometimes + don't include the right header for them. + + * test/Makefile: Add -Wall to CFLAGS. + * test/clone.c: Include unistd.h. + * test/fork.c: Include sys/wait.h. + * test/sig.c: Include unistd.h. + * test/sigkill_rain.c: Include sys/wait.h. + * test/vfork.c: Include sys/wait.h. + * test/wait_must_be_interruptible.c: Include string.h + +2013-05-02 Dmitry V. Levin + + ia64: fix compilation warnings introduced by commit v4.7-174-g44f0ed1. + * linux/ia64/syscallent.h: Undefine sys_oldlstat, sys_lstat and + sys_lstat64 before redefining them to printargs. + + Reported-by: Mike Frysinger + +2013-05-02 Mike Frysinger + + tests: stat: fix clean up of sample file. + * tests/stat: Also rm the sample file at the end of the test. + + Ignore more files. + * .gitignore: Add gdb related files. + * tests/.gitignore: Ignore test logs. + +2013-05-02 Dmitry V. Levin + + x32: fix decoding of i386 truncate and ftruncate syscalls. + * linux/x32/syscallent1.h: Remove sys_*truncate64 redirections. + + x32: fix printllval-based decoders of i386 syscalls. + * util.c (printllval) [X32]: Handle i386 personality. + + tests: add basic test for ftruncate, lseek and stat family syscalls. + * tests/stat: New test. + * tests/Makefile.am (TESTS): Add stat. + +2013-05-01 Dmitry V. Levin + + x32: fix build regressions introduced by commit v4.7-96-g8435d67. + * desc.c (printflock) [X32]: Add special handling required for + this architecture with sizeof(long) < sizeof(off_t). + * file.c [X32] (struct stat64): Add __attribute__((packed)). + [X32] (HAVE_STAT64): Define. + (printstat) [X32]: Redirect to printstat64. + (printstat64) [X32]: Use "struct stat" instead of "struct stat64". + [X32] (realprintstat64): Rename to printstat64_x32. + (sys_stat64, sys_fstat64) [X32]: Remove second definitions of these + functions. Call printstat64_x32 instead of printstat64 + * linux/x32/syscallent.h: Fix handlers for truncate and ftruncate. + + Alias sys_*lstat* syscall printing functions. + * file.c (sys_lstat, sys_lstat64, sys_oldlstat): Remove. + * linux/dummy.h: Move !HAVE_STRUCT___OLD_KERNEL_STAT aliases forward. + (sys_lstat): Alias to sys_stat. + (sys_lstat64): Alias to sys_stat64. + (sys_oldlstat): Alias to sys_oldstat. + * linux/syscall.h (sys_lstat, sys_lstat64, sys_oldlstat): Remove. + * linux/x32/syscallent1.h (sys_lstat64): Remove. + + x86_64: decode __old_kernel_stat based syscalls. + * linux/x86_64/syscallent1.h: Remove sys_old*stat redirections. + + x32: fix decoding of __old_kernel_stat based syscalls. + * file.c [X32] (struct __old_kernel_stat): Define. + * linux/x32/syscallent1.h: Remove sys_old*stat redirections. + +2013-05-01 James Hogan + + test/threaded_execve: fix on metag. + The metag ABI has stacks growing upwards so clone expects the stack + argument to point at the bottom of the stack instead of the top. + + * test/threaded_execve.c [__metag__]: Define clone2 differently + to avoid a segfault at runtime. + +2013-05-01 James Hogan + + test/skodic: make a bit more portable. + * test/skodic.c (main): Don't use MAP_FIXED since valid virtual addresses + vary between architectures (as far as I can tell the use of MAP_FIXED is + not relevant to the test). Also don't assume the file desriptor returned + by open call is 3 when passing it to mmap. + +2013-05-01 Mike Frysinger + + printllval: handle s390x. + This is a 64bit arch w/no personalities, so fix printing. + It can now trace a simple call like readahead: + $ cat test.c + main(){readahead(-1, (unsigned long long)1 << 50, 0);} + $ gcc test.c + $ ./strace -ereadahead ./a.out + readahead(-1, 1125899906842624, 0) = -1 EBADF (Bad file descriptor) + + * util.c (printllval): Handle S390X define. + +2013-05-01 Mike Frysinger + + Stop using old AM_CONFIG_HEADER macro. + Building with automake-1.13 throws an error: + configure.ac:6: error: 'AM_CONFIG_HEADER': this macro is obsolete. + You should use the 'AC_CONFIG_HEADERS' macro instead. + + * configure.ac (AM_CONFIG_HEADER): Rename to AC_CONFIG_HEADERS. + +2013-04-30 Dmitry V. Levin + + build: introduce git-version-gen. + * .gitignore: Add .version. + * Makefile.am (EXTRA_DIST, BUILT_SOURCES): Add $(srcdir)/.version. + Add rules to check NEWS, generate $(srcdir)/.version and + $(distdir)/.tarball-version files. + Change ChangeLog and CREDITS generation rules to depend on + $(srcdir)/.version instead of $(srcdir)/.git/refs/heads/*. + * NEWS: Add dates to recent releases. + * configure.ac (AC_INIT): Use git-version-gen. + (AM_INIT_AUTOMAKE): Remove check-news. + * git-version-gen: Import from gnulib. + * make-dist: Check NEWS. + + Makefile.am: sort long lists to ease maintenance. + * Makefile.am (strace_SOURCES, EXTRA_DIST): Sort, place one list element + per line. + + build: fix "make dist" regression introduced by commit v4.7-105-g7270de5 + * Makefile.am (EXTRA_DIST): Remove linux/arm/syscallent1.h, + linux/arm/signalent1.h, linux/arm/ioctlent1.h and linux/arm/errnoent1.h. + + build: fix "make dist" regression introduced by commit v4.7-29-g17e3860. + * Makefile.am (EXTRA_DIST): Add linux/ioctlent-filter.awk. + +2013-04-30 Mike Frysinger + + Blackfin: tweak sram_alloc syscall decode. + * system.c (sys_sram_alloc): The 2nd argument of sram_alloc syscall + is a bit field, not a specific value, so decode it as such. + +2013-03-31 Zev Weiss + + Print io_submit() offsets in decimal. + This makes output formatting more consistent with pread()/pwrite(), + which print their offset parameters in decimal. + + * desc.c (sys_io_submit): Change offset output format from %llx to %lld. + +2013-03-30 Andreas Schwab + + Fix building outside source directory. + The file linux/ioctlent.h is generated in the build directory, so + "../ioctlent.h" won't find it. + + * linux/aarch64/ioctlent1.h: Remove "../" from include file name. + * linux/powerpc/ioctlent1.h: Likewise. + * linux/tile/ioctlent1.h: Likewise. + * linux/x32/ioctlent1.h: Likewise. + * linux/x86_64/ioctlent1.h: Likewise. + * linux/x86_64/ioctlent2.h: Likewise. + +2013-03-30 Andreas Schwab + + AArch64: Fix printing of long long value. + * util.c (printllval): Fix printing of long long values on + AArch64. + +2013-03-27 Dmitry V. Levin + + Update PR_* constants. + * process.c (prctl_options): Add more PR_* constants from linux/prctl.h. + +2013-03-25 Chris Zankel + + Add support for the XTENSA architecture. + * configure.ac: Add XTENSA to the list of supported architectures. + * defs.h: Add XTENSA support. + * linux/xtensa/syscallent.h: New file. + * linux/xtensa/ioctlent.h.in: Likewise. + * process.c (struct_user_offsets): Add XTENSA support. + * signal.c (sys_sigreturn): Likewise. + * syscall.c (printcall, get_scno, get_syscall_args, + get_syscall_result, get_error): Likewise. + * util.c (change_syscall): Likewise. + +2013-03-22 Denys Vlasenko + + Add example script which builds static (possibly cross-compiled) strace. + +2013-03-21 Dmitry V. Levin + + Use 64-bit versions of stat, readdir and setrlimit functions when available + strace already has a mechanism to use fopen64 for output when the 64-bit + version of fopen is available on 32-bit architectures. Apply this + mechanism for other three functions to make strace fully adopted for + 64-bit types. + + * strace.c (struct_stat, stat_file, struct_dirent, read_dir, + struct_rlimit, set_rlimit): New macros. + (startup_attach): Use read_dir. + (startup_child): Use struct_stat and stat_file. + (main): Use struct_rlimit and set_rlimit. + +2013-03-20 Dmitry V. Levin + + Do not use struct dirent in readdir decoding. + struct dirent from libc should not be used for umove'ing into because it + contains fixed size d_name. + + * file.c (printdir): Rename to print_old_dirent. + [SH64]: Decode using struct kernel_dirent. + [!SH64]: Decode using an open-coded struct with 32-bit d_ino and d_off. + (sys_readdir): Update. + +2013-03-20 Dmitry V. Levin + + Do not use off_t in sendfile decoding. + sendfile parser used to decode off_t* parameter as a pointer to host + off_t type. With this change, it is decoded as a pointer to target long + type. + + * io.c (print_off_t): New function. + (sys_sendfile): Use it. + * linux/aarch64/syscallent1.h: Use sys_sendfile64 for sendfile decoding. + * linux/tile/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Use sys_sendfile64 for sendfile64 decoding. + * linux/metag/syscallent.h: Correct sendfile syscall name. + * linux/or1k/syscallent.h: Likewise. + +2013-03-18 Dmitry V. Levin + + Fix build with older versions of libaio.h. + * configure.ac: When libaio.h is available, check for + struct iocb.u.c.flags, IO_CMD_PWRITE and IO_CMD_PWRITEV. + * desc.c (print_common_flags): Check for HAVE_STRUCT_IOCB_U_C_FLAGS. + (sys_io_submit): Check for HAVE_DECL_IO_CMD_PWRITE and + HAVE_DECL_IO_CMD_PWRITEV. + + Fix io_submit decoding. + * desc.c (print_common_flags, sys_io_submit): Add missing ", " to + SUB_COMMON output, remove extra ", " from SUB_VECTOR output. + +2013-03-18 Maxin B. John + + tests: relax check_prog to allow timeout command provided by busybox. + Busybox version of timeout doesn't have --version option. + Relax check_prog to handle those cases. + + * tests/init.sh (check_prog): Use type builtin to check program + availability. + +2013-03-18 Dmitry V. Levin + + Reorganize get_regs code, hopefully without functional changes. + * syscall.c [I386 || ARM || OR1K || METAG] (ARCH_REGS_FOR_GETREGSET): + New macro. + (get_regset): Implement for AARCH64, METAG, OR1K and X32. + (get_regs) [AARCH64 || METAG || OR1K || X32]: Use it. + + arm, i386: use PTRACE_GETREGSET if available. + * syscall.c [ARM || I386 || X86_64] (get_regset): New function. + (get_regs) [ARM || I386 || X86_64]: Use it. + + Include and on all architectures. + * syscall.c: Include and on all architectures. + + x86-64: enhance PTRACE_GETREGSET test. + * syscall.c (get_regs) [X86_64]: Check whether PTRACE_GETREGSET + works regardless of the kernel version. + + x32: use PTRACE_GETREGSET unconditionally. + * syscall.c (get_regs) [X32]: Assume that PTRACE_GETREGSET always works + regardless of the kernel version. + + x86-64, x32: do not include linux/ptrace.h unnecessarily. + * syscall.c [X86_64 || X32]: Stop including linux/ptrace.h. + + i386, tile, x32: do not redefine ptrace prototype. + * defs.h [I386 || TILE || X32]: Use ptrace prototype from sys/ptrace.h. + + ptrace: decode note segment descriptor types. + * configure.ac (AC_CHECK_HEADERS): Add elf.h. + * process.c: Include elf.h. + (nt_descriptor_types): New xlat structure. + (sys_ptrace): Use it. + +2013-03-14 Dmitry V. Levin + + Update MADV_* constants. + * mem.c (madvise_cmds): Add more MADV_* constants from + asm-generic/mman-common.h + + Reported-by: Robin Hack + +2013-03-07 Denys Vlasenko + + Tweaks for -c: fixed setitimer/getitimer hack; optimized call_summary_pers() + count_syscall() was calling setitimer/getitimer once in order to find + smallest "tick" OS uses in time accounting, in order to use it + for syscalls which apparently spent less than that time in syscall. + The code assumed that this "tick" is not zero... but it is zero + on linux-3.6.11. Which means that this hack doesn't work... + + At least this change prevents this measurement from being done + _repeatedly_, by initializing one_tick to -1, not 0. + + While at it, added comments in count_syscall() explaining what we are doing. + + Optimized call_summary_pers() a bit, by eliminating redundant tv -> float + conversions, and prevented 0.0/0.0 which was resulting in "% time" + being shown as "-nan" if total CPU time spent was 0.000000 + (try "strace -c /bin/true"). + + The code seems to seriously underestimate CPU usage: + "strace -c ls -lR /usr/share >/dev/null" shows total time spent + in syscalls to be only ~10..20% of what "time ls -lR /usr/share >/dev/null" + shows. + + It might be useful to have a mode where we show wall clock time + spent in syscalls, not CPU time. It might also be more accurate. + + text data bss dec hex filename + 245019 676 5708 251403 3d60b strace_old + 244923 684 5676 251283 3d593 strace + +2013-03-06 Denys Vlasenko + + Open-code isprint(c) and isspace(c) + We don't call setlocale, thus we always use C locale. + But libc supports various other locales, and therefore + its ctype interface is general and at times inefficient. + For example, in glibc these macros result in function call, + whereas for e.g. isprint(c) just c >= ' ' && c <= 0x7e + suffices. + + By open-coding ctype checks (we have only 4 of them) + we avoid function calls, we get smaller code: + + text data bss dec hex filename + 245127 680 5708 251515 3d67b strace_old + 245019 676 5708 251403 3d60b strace + + and we don't link in ctype tables (beneficial for static builds). + +2013-03-06 Denys Vlasenko + + Makefile: add commented-out tweak to generate link map. + + Stop using a large static buffer in getfdpath. + text data bss dec hex filename + 245075 680 9836 255591 3e667 strace_old + 245143 680 5708 251531 3d68b strace + +2013-03-05 Denys Vlasenko + + Fix wrongly indented closing curly brace. No code changes. + + strace_vfprintf: if malloc fails, exit gracefully. + +2013-03-05 Dmitry V. Levin + + Use sysconf(_SC_PAGESIZE) instead of hardcoded PAGE_SHIFT. + PAGE_SHIFT couldn't be reliably obtained at compile time, + thanks to Chris Metcalf for the hint. + + * mem.c: Do not include . + [SH64] Do not include . + (get_pagesize): New function. + (sys_mmap_pgoff, sys_old_mmap_pgoff): Use it. + +2013-03-05 Denys Vlasenko + + Emit better message for ERESTARTNOHAND return. + + Disable STREAMS syscalls for non-SPARC. + text data bss dec hex filename + 3002 0 1024 4026 fba stream.o.old + 1729 0 1024 2753 ac1 stream.o + + Fix printstrbufarg's address argument to be long, not int. + + Remove variable tracing_paths and check in pathtrace_match. + +2013-03-05 Denys Vlasenko + + Use dynamically-sized selected[] array for -P PATH. + While at it, added a small optimization of not remembering + the path twice if it happens to be the same. + + text data bss dec hex filename + 245111 680 10860 256651 3ea8b strace_old + 245075 680 9804 255559 3e647 strace + +2013-03-05 Denys Vlasenko + + metag,or1k: whitesace style fix. no code changes. + + Assorted fixes to syscallent.h. + or1k was missing TM on many memory-related syscalls + sys_lookup_dcookie is 3-arg on 64-bit arches, and isn't TF + sys_recvmsg is 3-arg on all arches + sys_nfsservctl is 3-arg on all arches + sys_timerfd_create is 2-arg on all arches + sys_[f]truncate64 is 4-arg or 3-arg, never 5-arg + truncate64 is TF + sys_[l]lseek is TD + fstat[64] is TD + +2013-03-05 James Hogan + + Add support for Imagination Technologies Meta. + Add support for Imagination Technologies Meta architecture (the + architecture/ABI is usually referred to as metag in code). The Meta + Linux kernel port is in the process of being upstreamed for v3.9 so it + uses generic system call numbers. + + sys_lookup_dcookie writes a filename to buffer argument, so I've set + TF flag. + nfsservctl appears to be set to sys_ni_syscall in asm-generic/unistd.h + so I've left it blank. + truncate64/ftruncate64/pread64/pwrite64/readahead have unaligned 64bit + args which are packed tightly on metag, so less arguments on metag. + fchdir/llseek takes a file descriptor so s/TF/TD/ + sync_file_range has 2 64bit args so uses 6 args, so s/4/6/ + timerfd_create/msgget/msgctl/msgrcv/semget/segtimedop/semop/shmget/ + shmctl/shmat/shmdt/recvmsg/migrate_pages have different number of args. + oldgetrlimit is just getrlimit for metag. + add TM flag to various memory syscalls. + metag doesn't directly use sys_mmap_pgoff for mmap2. + prlimit64/process_vm_readv/process_vm_writev take a pid so add TP flag. + fanotify_init doesn't appear to take a file descriptor so remove TD. + Add kcmp syscall. + + Cc: Christian Svensson + +2013-03-01 Denys Vlasenko + + umovestr: speed up check for NUL byte in the fetched word. + +2013-03-01 Dmitry V. Levin + + Fix trace=set regression introduced by commit v4.7-111-g9cbc15b. + * syscall.c (qual_syscall, qualify): Pass personality down to + qualify_one. + * tests/qual_syscall: New test. + * tests/Makefile.am (TESTS): Add qual_syscall. + +2013-03-01 Chris Metcalf + + tile: handle printllval like x86_64 or powerpc64. + Without this fix the tilegx build fails when it hits the new #error + about SIZEOF_LONG > 4. + + * util.c (printllval): Fix printing of long long values on TILE. + +2013-02-27 Denys Vlasenko + + Make -b take SYSCALL param, document it in --help and in manpage. + To not waste an option letter for just one trick, + extend -b to take a parameter: + "on which syscalls do you want to detach?". + Currently supports only execve. + + While at it, fixed (by removing non-Linux and stale info) + and extended manpage text about -f. + +2013-02-26 Dmitry V. Levin + + Cleanup umoven and umovestr. + Cleanup sloppy error handling. + + First, EFAULT kind of errors from process_vm_readv by itself is not + something unusual, so a warning message will not be issued unless a + short read is detected. + + Second, clients of umoven and umovestr are not prepared to detect and + handle short reads that can happen in these functions. The most safe + way to handle them is to return an error code. + + * util.c (umoven, umovestr): Cleanup handling of errors coming from + process_vm_readv and PTRACE_PEEKDATA. + +2013-02-26 Dmitry V. Levin + + pathtrace: fix umovestr return code check. + * pathtrace.c (upathmatch): Only NUL-terminated strings can be + path-matched, so fix the umovestr return code check to filter out + unsuitable strings. + +2013-02-26 Dmitry V. Levin + + Fix compilation errors uncovered by -Werror=enum-compare. + This fixes regression introduced by commit v4.7-111-g9cbc15b. + + * syscall.c: Merge all nsyscalls* enums into single enum. + Likewise merge nerrnos*, nsignals*, and nioctlents* into single enums. + +2013-02-26 Denys Vlasenko + + Mass replace error_msg("%s", "literal") -> error_msg("literal") + There is no need to print literal strings through "%s". + Only untrusted strings such as filenames need that. + +2013-02-26 Ben Noordhuis + + Make umoven report success as 0, not >=0, stop returning success on partial reads + umoven() uses process_vm_readv() when available but it returns the + return value of that syscall, which is the number of bytes copied, + while its callers expect it to simply return zero on success. + + It was causing syscalls that take a user-space argument to print + the abbreviated version, e.g.: + + epoll_ctl(5, EPOLL_CTL_ADD, 10, {...}) + + Instead of: + + epoll_ctl(5, EPOLL_CTL_ADD, 10, {EPOLLIN, {u32=10, u64=10}}) + + * util.c (umoven): Make umove[n] report success as 0, not >=0, + stop returning "success" on partial reads. + +2013-02-26 Denys Vlasenko + + Assorted NOMMU fixes. + With -D, strdup'ing of pathname is necessary only on NOMMU. + + Don't set skip_startup_execve to 1 if NOMMU and not in daemonized mode + (try "strace [-D] -b env echo HI" to see whether we detach on correct execve). + + Fix test_ptrace_FOO shortcuts on NOMMU to always assume success + and _properly_ set all variables. + +2013-02-26 Denys Vlasenko + + Shorten help text - no need to show deprecated option -F. + +2013-02-23 Denys Vlasenko + + Merge adjacent tprint's. + + Correct i > MAX_NSYSCALLS commparison: should be i >= MAX_NSYSCALLS. + +2013-02-22 Denys Vlasenko + + Fix wrong offset display in dumpstr. + BTW, the new code from prev commit is 5 times faster + than old one :) + +2013-02-22 Denys Vlasenko + + Fix a bug in dumpstr (no null termination). Essentially rewrote dumpstr. + This is a 14 year old bug (!). + + It wasn't biting us merely because outstr[80] was static, thus ended up + in bss and whatever was after it "accidentally" provided the NUL byte. + When dumpstr was changed to use on-stack buffer, the bug reared its ugly head. + + This is a rewrite which is smaller and should be significantly faster + for _long_ strings. + + text data bss dec hex filename + 244627 680 10860 256167 3e8a7 strace.t9/strace + 244563 680 10860 256103 3e867 strace.ta/strace + + * util.c (dumpstr): Rewrite to be faster and smaller. + +2013-02-22 Denys Vlasenko + + Eliminate MAX_QUALS, make qualifier array dynamic. + MAX_QUALS was 2048, even though most arches used less than 500 entries + in it. MAX_QUALS had to be maintained by hand to be higher than syscall + count. It also limited the highest possible fd to track. + + This change makes qual_flagsN[] arrays start sized to the required minimum + (number of syscalls) and grow dynamically if user requested + -e read=BIGNUM. As a precaution, BIGNUM should be < 2^15, but this limit + can be raised with no cost for normal strace invocations. + + qual_flags is now a define to qual_vec[current_personality]. + + As a bonus, this patch aliases sysent, errnoent, signalent, ioctlent + names in one-personality arches to their corresponding 0 arrays, + removing one indirection level. + + text data bss dec hex filename + 244471 700 12928 258099 3f033 strace.t7/strace + 244627 680 10860 256167 3e8a7 strace.t8/strace + +2013-02-22 Denys Vlasenko + + Create and use struct_sysent and struct_ioctlent typedefs. + This is a preparatory mass replace patch with no code changes. + + The future change will need to typedef sysent to sysent0, + which results in compile failures when "struct sysent" string + gets mangled into "struct sysent0". + +2013-02-22 Denys Vlasenko + + Use tcp->qual_flg instead of qual_flags[] in verbose() and abbrev() + We have hundreds of uses of these macros. + Result is more efficient and 1.1 kbyte shorter code: + + text data bss dec hex filename + 245579 700 12928 259207 3f487 strace.t5/strace + 244471 700 12928 258099 3f033 strace.t6/strace + +2013-02-21 Denys Vlasenko + + Remove unused QUAL_FAULT code (was used by non-Linux code only). + +2013-02-21 Denys Vlasenko + + Use uint8_t for qual_flags[] instead of ints. + Resulting bss reduction is ~6kbytes: + + text data bss dec hex filename + 245703 700 19072 265475 40d03 strace.t4/strace + 245687 700 12928 259315 3f4f3 strace.t5/strace + +2013-02-21 Denys Vlasenko + + Eliminate many SCNO_IS_VALID checks. + By adding tcp->s_ent pointer tot syscall table entry, + we can replace sysent[tcp->scno] references by tcp->s_ent. + More importantly, we may ensure that tcp->s_ent is always valid, + regardless of tcp->scno value. This allows us to drop + SCNO_IS_VALID(tcp->scno) checks before we access syscall + table entry. + + We can optimize (qual_flags[tcp->scno] & QUAL_foo) checks + with a similar technique. + + Resulting code shrink: + text data bss dec hex filename + 245975 700 19072 265747 40e13 strace.t3/strace + 245703 700 19072 265475 40d03 strace.t4/strace + + * count.c (count_syscall): Use cheaper SCNO_IN_RANGE() check. + * defs.h: Add "int qual_flg" and "const struct sysent *s_ent" + to struct tcb. Remove "int u_nargs" from it. + Add UNDEFINED_SCNO constant which will mark undefined scnos + in tcp->qual_flg. + * pathtrace.c (pathtrace_match): Drop SCNO_IS_VALID check. + Use tcp->s_ent instead of sysent[tcp->scno]. + * process.c (sys_prctl): Use tcp->s_ent->nargs instead of tcp->u_nargs. + (sys_waitid): Likewise. + * strace.c (init): Add compile-time check that DEFAULT_QUAL_FLAGS + constant is consistent with init code. + * syscall.c (decode_socket_subcall): Use tcp->s_ent->nargs + instead of tcp->u_nargs. Set tcp->qual_flg and tcp->s_ent. + (decode_ipc_subcall): Likewise. + (printargs): Use tcp->s_ent->nargs instead of tcp->u_nargs. + (printargs_lu): Likewise. + (printargs_ld): Likewise. + (get_scno): [MIPS,ALPHA] Use cheaper SCNO_IN_RANGE() check. + If !SCNO_IS_VALID, set tcp->s_ent and tcp->qual_flg to default values. + (internal_fork): Use tcp->s_ent instead of sysent[tcp->scno]. + (syscall_fixup_for_fork_exec): Remove SCNO_IS_VALID check. + Use tcp->s_ent instead of sysent[tcp->scno]. + (get_syscall_args): Likewise. + (get_error): Drop SCNO_IS_VALID check where it is redundant. + (dumpio): Drop SCNO_IS_VALID check where it is redundant. + Use tcp->s_ent instead of sysent[tcp->scno]. + (trace_syscall_entering): Use (tcp->qual_flg & UNDEFINED_SCNO) instead + of SCNO_IS_VALID check. Use tcp->s_ent instead of sysent[tcp->scno]. + Drop SCNO_IS_VALID check where it is redundant. + Print undefined syscall name with undefined_scno_name(tcp). + (trace_syscall_exiting): Likewise. + * util.c (setbpt): Use tcp->s_ent instead of sysent[tcp->scno]. + +2013-02-21 Denys Vlasenko + + ARM: make it one-personality arch. + ARM in fact _is_ one personality. + + We had two personalities for it because it has a handful of + syscalls with huge scnos (0x000f00xx). + + Extending syscall table to have [0x000f0005] index is of course + not a good idea. + + Someone decided to handle that by having a separate personality + just for these syscalls. + + But multi-personality arch does a bit more work in other parts. + + This patch is another alternative: "move" 0x000f00nn syscalls + down to the entries just above last ordinary syscall, + by manipulating scno if it falls into the 0x000f00xx range. + + In order to not worsen genuine undefined scnos' printing, + the code remaps scno back to actual value before printing + "syscall_NNN" string. + + * defs.h: Remove multi-reprsonality defines from ARM. + * syscall.c (shuffle_scno): New function. + (undefined_scno_name): New function. + (get_scno): [ARM] Replace personality setting with scno shuffling. + (trace_syscall_entering): Print unknown syscall name using + undefined_scno_name(). + (trace_syscall_exiting): Likewise. + * linux/arm/syscallent.h: Add ARM specific syscalls at the end. + * linux/arm/errnoent1.h: Deleted. + * linux/arm/ioctlent1.h: Deleted. + * linux/arm/signalent1.h: Deleted. + * linux/arm/syscallent1.h: Deleted. + +2013-02-20 Denys Vlasenko + + arm: shorten syscall table for EABI - no point in storing NULL entries. + Also, reformatted ARM code in get_scno(), mostly improved comments, + without code changes. + + Use the same style of includes in linux/*/* files. + While at it, fix some comments which say + "we use i386 syscalls/ioctls/errnos" but in reality + common ones are used. + +2013-02-19 Denys Vlasenko + + Fix compiler warnings. + With constant current_wordsize == 4 and 32-bit longs, + gcc was spooked by "1ul << (8 * current_wordsize)" = "1ul << 32". + + Make such places conditional on SIZEOF_LONG > 4. + +2013-02-19 Denys Vlasenko + + Improve comment text. No code changes. + +2013-02-19 Denys Vlasenko + + Fix NOMMU + daemonized tracer SEGV. + pathname[] was getting destroyed, execve of garbage pathname + failing, and to top it off, the tracer's stack was also + smashed and trecer segfaulted. + + * strace.c (exec_or_die): New function. + (startup_child): Don't use pathname[] contents after vfork, + make a malloced copy instead. Explain "NOMMU + -D bug" + and how we work around it. + +2013-02-19 Denys Vlasenko + + Make it possible to to do test builds for NOMMU architectures. + And while using it, I discovered that -D doesn't work too well + on NOMMU. Added a comment about it. + +2013-02-19 Denys Vlasenko + + Clean up mmap decoding. + Previous code merges too many similar, but different ways + of decoding mmap. For example, sys_old_mmap is "params in memory" + API... except SH[64], where it is "params in regs", + i.e. what sys_mmap ("new mmap") function does on other arches! + + It's much simpler when every mmap handler has same API regardless + of arch. Where API means whether params are in regs or in memory, + and whether offset is in bytes, pages, or 4k blocks. + + Then we just insert correct function pointers into + arch syscall tables. + + It turns out there are four common mmap APIs over + all architectures which exist in Linux kernel, + and one outlier for S390. + + A number of mmap decoders were plain wrong in arch tables. + For example, BFIN has no old_mmap. It returns ENOSYS. + I checked kernel sources for all arches nad fixed the tables. + + There was dead code for x86_64 for old_mmap: + x86_64 has no old_mmap. + + * mem.c: Refactor mmap functions so that we have five mmap syscall + handlers, each with the fixed API (not varying by arch). + * pathtrace.c (pathtrace_match): Adjust sys_func == mmap_func checks. + * linux/syscall.h: Declare new mmap syscall handler functions. + * linux/arm/syscallent.h: mmap2 is sys_mmap_pgoff. + * linux/avr32/syscallent.h: mmap is sys_mmap_pgoff. + * linux/bfin/syscallent.h: old_mmap is ENOSYS, mmap2 is sys_mmap_pgoff. + * linux/hppa/syscallent.h: mmap2 is sys_mmap_4koff. + * linux/i386/syscallent.h: mmap2 is sys_mmap_pgoff. + * linux/ia64/syscallent.h: mmap2 is sys_mmap_pgoff. + * linux/m68k/syscallent.h: mmap2 is sys_mmap_pgoff. + * linux/microblaze/syscallent.h: old_mmap is sys_mmap, mmap2 is sys_mmap_pgoff. + * linux/mips/syscallent.h: mmap is sys_mmap_4kgoff. + * linux/or1k/syscallent.h: mmap2 is sys_mmap_pgoff. + * linux/powerpc/syscallent.h: mmap2 is sys_mmap_4kgoff. + * linux/s390/syscallent.h: mmap2 is sys_old_mmap_pgoff. + * linux/s390x/syscallent.h: mmap is sys_old_mmap and thus has 1 arg. + * linux/sh/syscallent.h: old_mmap2 is sys_mmap, mmap2 is sys_mmap_4koff. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent1.h: mmap is TD|TM. + * linux/tile/syscallent1.h: mmap2 is sys_mmap_4koff. + +2013-02-18 Denys Vlasenko + + Remove unused function sys_mmap64. + No wonder that it is unused. + It's code looked quite questionable. + + * mem.c (sys_mmap64): Remove this function. + +2013-02-18 Denys Vlasenko + + Remove code which supports systems with long long off_t. + While looking at mmap mess, did experimenting in order + to figure out what gets used when. + + Tried building armv4tl, armv5l, armv6l, mips, mipsel, i686, + x86_64 and none of they have long long off_t, + which isn't suprprising: we aren't using glibc defines + which enable that. + + Moreover, we SHOULD NOT use off_t in syscall decode! + Its size depends on libc, not on arch! I.e. it is essentially + unpredictable and can even in theory vary on the same arch + with different libc. + + We should use longs or long longs, in a way which matches + architectural ABI for the given syscall. There are usually + *at most* two permutations, no need to add yet another variable + (sizeof(off_t)) to the mix. + + This change removes almost all HAVE_LONG_LONG_OFF_T conditionals, + which will reveal further possible simplifications. + + * mem.c: Remove code conditional on HAVE_LONG_LONG_OFF_T. + As a result, never remap sys_mmap64 to sys_mmap. + (print_mmap): Compile unconditionally. + (sys_old_mmap): Compile unconditionally. + (sys_mmap): Compile unconditionally. + * io.c (sys_sendfile): Add a FIXME comment. + * file.c: Remove code conditional on HAVE_LONG_LONG_OFF_T. + As a result, never remap sys_*stat64 to sys_*stat etc. + (sys_truncate): Compile unconditionally. + (realprintstat): Likewise. + (sys_stat): Likewise. + (sys_fstat): Likewise. + (sys_lstat): Likewise. + * desc.c (printflock): Likewise. + +2013-02-18 Denys Vlasenko + + Fixes in "new" mmap. + * mem.c (sys_mmap): Ensure unsigned expansion of tcp->u_arg[5]. + Add page shift of offset for I386. + Use tcp->ext_arg[5] as offset for X32. + (sys_old_mmap): [X32] Remove this function, X32 doesn't use is. + + Preliminary simplifications in mmap functions. + * mem.c: Move "define sys_mmap64 sys_mmap" from the top + to the only place it affects. + (print_mmap): Make offset argument unsigned, for safer implicit conversions. + (sys_old_mmap): [IA64] use unsigned narrow_arg[]. + Cast u_arg[5] (offset param) to unsigned long, to prevent erroneous signed + expansion. + +2013-02-17 Denys Vlasenko + + Remove broken HAVE_LONG_LONG conditionals. + We use printllval without HAVE_LONG_LONG guards in many places, + but define it only if HAVE_LONG_LONG. This means that + on !HAVE_LONG_LONG systems we won't build for some time now. + + * defs.h: Remove HAVE_LONG_LONG guard around LONG_LONG() macro + and printllval() function declaration. + * util.c: Remove HAVE_LONG_LONG guard around printllval() + function definition. + (printllval): Add compile-time error check for using wrong + if branch. Explain places where we deliberately use mismatched + types for printf formats. + +2013-02-17 Denys Vlasenko + + Use explicit long type instead of off_t. + * file.c (sys_lseek): Use long instead of off_t. + + Merge two identical tables. + * defs.h: Declare whence_codes[]. + * desc.c: Delete static whence[]. + (printflock[64]): Use whence_codes. + * file.c: Make whence_codes[] non-static. + Add SEEK_DATA and SEEK_HOLE to them. + +2013-02-17 Denys Vlasenko + + Remove wrong x32-specific lseek. + Testing confirmed what I suspected: x32 lseek uses kernel-sized + (i.e. wide) long for offset parameter. + + * file.c: Delete sys_lseek32. + * linux/syscall.h: Likewise. + * linux/x32/syscallent1.h: Likewise. + * test/x32_lseek.c: New file. + +2013-02-17 Denys Vlasenko + + Fix SEGV in lseek. + I found hard way why the code was using "_whence" name. + + * file.c: Rename whence[] to whence_codes[]. + (sys_lseek): Fix printxval() to use whence_codes[]. + (sys_lseek32): Likewise. + +2013-02-17 Denys Vlasenko + + Comment inner workings of sys_[l]lseek. + The code doesn't look fully correct to me, but I need to experiment + on actual x32 machine before I start "fixing" things. + For now, add comments, and optimize out one tprints() call... + + * file.c (sys_lseek): Rename '_whence' as 'whence'. + Merge printing of ", " into subsequent tprintf. + (sys_lseek32): Likewise. + (sys_llseek): Likewise. + +2013-02-17 Denys Vlasenko + + Cosmetic fixes to syscall tables, no code changes. + +2013-02-16 Denys Vlasenko + + Make linux/mips/syscallent.h smaller. + * linux/mips/syscallent.h: Remove trailing empty elements. + Compactify huge stretches of NULL elements in the middle. + + Simple optimization in get_error. + * defs.h: Define SCNO_IN_RANGE(scno) macro. + * syscall.c (get_error): Change return type to void. + Use SCNO_IN_RANGE instead of SCNO_IS_VALID. + (trace_syscall_exiting): Stop checking get_error() return value. + + Mass rename of SCNO_IN_RANGE define to SCNO_IS_VALID. + + Finish prefixing regs struct names with arch_ + * defs: Rename regs -> sparc_regs. + * signal.c (sys_sigreturn): Use new variable name. + * syscall.c: Rename regs -> sparc_regs, regs -> avr32_regs. + (getrval2): Use new variable names. + (printcall): Likewise. + +2013-02-15 Denys Vlasenko + + Use the same type for i386_regs on 32-bit and 64-bit x86. + * defs.h: Stop including for x86. + Change i386_regs from "struct pt_regs" to "struct user_regs_struct". + * syscall.c: Likewise. + + Fix build error on Tile. + * syscall.c (get_scno): [TILE] Remove TCB_WAITEXECVE check, + it is never true on Tile, and stopped compiling when + TCB_WAITEXECVE define was removed for Tile. + +2013-02-15 Denys Vlasenko + + x86: zero-extend 32-bit args in syscall entry instead of sign-extension. + Zero-extension is slightly more common that sign-extension: + all pointers are zero-extended, and some other params are unsigned. + + Whereas signed ones (fds, pids, etc) are often treated as + _32-bit ints_ even by kernel, so just unconditionally casting + such tcp->u_arg[N] to int works. + + * syscall.c (get_syscall_args): [X86] Zero-extend 32-bit args + instead of sign-extension. + +2013-02-15 Denys Vlasenko + + Macroize conditional signed widening operation. + * defs.h: Define widen_to_long() macro. + * signal.c (sys_kill): Use it instead of open-coding it. + (sys_tgkill): Use widen_to_long() on pids. + * resource.c (decode_rlimit): Formatting fix. + +2013-02-15 Denys Vlasenko + + A better handling of current_wordsize. + On x86_64: + text data bss dec hex filename + 435661 26628 47424 509713 7c711 strace_old + 435501 26612 47440 509553 7c671 strace_new_clever_wordsize + + On x32 and arm it should be even better, current_wordsize becomes + a constant there. + + * defs.h: Declare current_wordsize as a variable if needed, + else declare as a constant define. + Remove declatation of personality_wordsize[]. + * syscall.c: Make personality_wordsize[] static. + Declare current_wordsize as a variable if needed. + (set_personality): Set current_wordsize only if non-constant. + +2013-02-15 Denys Vlasenko + + Remove unnecessary "return 0" statements. + * util.c (change_syscall): Remove dummy "return 0"s. + +2013-02-14 Denys Vlasenko + + x86: fix required kernel version for GETREGSET. + * syscall.c (get_regs): [X86] Use GETREGSET only if kernel >= 2.6.35 + + Whitespace fix, no code changes. + +2013-02-14 Christian Svensson + + Add support for the OpenRISC 1000 platform. + * configure.ac: Added or1k architecture.. + * defs.h: Added or1k to use register reading system. + * linux/or1k/ioctlent.h.in: Use i386 ioctls. + * linux/or1k/syscallent.h: New file. + * process.c: Added or1k register defs to struct_user_offsets[]. + * syscall.c: Added or1k_io iovec for or1k GETREGSET, +   regset structure for or1k. +   (printcall): Added handling for or1k. +   (get_regs): Likewise. +   (get_scno): Likewise. +   (get_syscall_args): Likewise. +   (get_syscall_result): Likewise. + (get_error): Likewise. + * util.c (change_syscall): Added dummy handling for or1k. + * system.c (sys_or1k_atomic): New function (or1k specific syscall). + +2013-02-14 Denys Vlasenko + + [X86] Use ptrace(PTRACE_GETREGSET, NT_PRSTATUS) to get registers. + Unlike PTRACE_GETREGS, this new method detects 32-bit processes + reliably, without checking segment register values which + are undocumented and aren't part of any sort of API. + While at it, also fixed x32 detection to use __X32_SYSCALL_BIT, + as it should have been from the beginning. + + * defs.h: Declare os_release and KERNEL_VERSION. + * strace.c: Make os_release non-static, remove KERNEL_VERSION define. + * syscall.c: New struct i386_user_regs_struct, + static union x86_regs_union and struct iovec x86_io. + (printcall): Use i386_regs or x86_64_regs depending on x86_io.iov_len. + (get_regs): On x86 and kernels 2.6.30+, use PTRACE_GETREGSET, + on earlier kernels fall back to old method. + (get_scno): [X86] Determine personality based on regset size + on scno & __X32_SYSCALL_BIT. + (syscall_fixup_on_sysenter): Use i386_regs or x86_64_regs depending + on x86_io.iov_len. + (get_syscall_args): Likewise. + (get_error): Likewise. + +2013-02-13 Denys Vlasenko + + Rename some register statics by prefixing their names with arch. + This makes it easier to grep for them. + + * syscall.c: Rename variables: + r0 -> bfin_r0,alpha_r0,sh_r0. + a3 -> mips_a3. + r2 -> mips_r2. + (get_scno): Use new variable names. + (get_syscall_result): Likewise. + (get_error): Likewise. + +2013-02-13 Denys Vlasenko + + Factor out code to check addr, fetch and print siginfo. + * defs.h: Declare new function printsiginfo_at(tcp, addr). + * process.c (sys_waitid): Use printsiginfo_at(). + (sys_ptrace): Likewise. + * signal.c: (printsiginfo_at): Implement this new function. + (sys_rt_sigsuspend): Use printsiginfo_at(). + (sys_rt_sigtimedwait): Likewise. + + Decode struct iov in PTRACE_GET/SETREGSET. + * process.c (sys_ptrace): Decode struct iov in PTRACE_GET/SETREGSET. + +2013-02-12 Denys Vlasenko + + Unify representations of struct user fields for subarchitectures. + * process.c: Unify MIPS and LINUX_MIPSN32, and SH and SH64 parts of + struct_user_offsets[]. + + Add start_code and start_data members of struct user. + * process.c: Add start_code and start_data members of struct user + in struct_user_offsets[], where appropriate. + + Remove hacks for old kernels for architectures which require new kernels + * util.c (change_syscall): For MICROBLAZE, replace code + with dummy "return 0" and a comment explaining why that is ok + for this architecture. + +2013-02-12 Denys Vlasenko + + Remove stray syscall result reading code on syscall entry for s390. + This is a leftover from sysenter/sysexit split. + I can't run-test it, but from code inspection it seems to be correct. + + * syscall.c (get_scno): Remove stray syscall result reading for s390[x]. + +2013-02-12 Denys Vlasenko + + Deobfuscate definitions of struct user offsets. + The maze of ifdefs/ifndefs was scaring new contributors. + Format it so that every arch has its own ifdef block. + + * process.c: Deobfuscate definitions of struct user offsets. + +2013-02-12 Denys Vlasenko + + Remove hacks for old kernels for architectures which require new kernels + * defs.h: Do not define TCB_WAITEXECVE for AARCH64. + * util.c (change_syscall): For AARCH64 and X32, replace code + with dummy "return 0" and a comment explaining why that is ok + for these architectures. + + Remove old kernel hacks for architectures which require new kernels. + * defs.h: Do not define TCB_WAITEXECVE for AVR32, BFIN and TILE. + * util.c (change_syscall): For AVR32, BFIN and TILE, replace code + with dummy "return 0" and a comment explaining why that is ok + for these architectures. + + Handle recv[m]msg for non-native 32-bit personality syscalls. + * net.c (printmsghdr): If current_wordsize is 4 and long is wider than it, + read 32-bit struct msghdr and expand it into a native one before using it. + (printmmsghdr): Likewise for struct mmsghdr. + +2013-02-12 Denys Vlasenko + + Fix is_negated_errno() check for X32. + X32's return value is 64-bit. We were truncating it to 32-bit long + before checking for -errno. + + * syscall.c (is_negated_errno_x32): New function. + (get_error): Use is_negated_errno_x32 for X32 architecture. + +2013-02-12 Denys Vlasenko + + Remove unused / ambiguously used defines. + We sometimes use LINUXSPARC and sometimes (more often) + use "defined(SPARC) || defined(SPARC64)". Better to use + one construct consistently. + LINUX_MIPS64 is altogether unused. + + * defs.h: Remove LINUXSPARC and LINUX_MIPS64 defines. + Move PTRACE_xxx compat defines up, before arch-specific + machinery. Use defined(SPARC) || defined(SPARC64) + instead of LINUXSPARC. + * file.c: Use defined(SPARC) || defined(SPARC64) instead of LINUXSPARC. + * signal.c: Likewise. + +2013-02-11 Denys Vlasenko + + Preparatory patch for "new" x86 personality detection. + * syscall.c: Move PT_FLAGS_COMPAT define to its only user, get_scno(). + Rename arm_regs_union's fields to names less likely to collide with + system defines. + (get_regs): Use sizeof(arm_regs_union) instead of sizeof(aarch64_regs). + This should be the same, but htis way it's cleaner. + Remove __X32_SYSCALL_MASK and use __X32_SYSCALL_BIT instead. + Explain 64-bit check in X32 build better. + +2013-02-09 Dmitry V. Levin + + Fix sigaltstack decoder. + strace used to hang when decoding sigaltstack called with invalid + stack_t pointers because of mishandling umove() return code. + + * signal.c (print_stack_t): Handle unfetchable stack_t properly. + Change return type to void. + (sys_sigaltstack): Update print_stack_t() usage. + + Reported-by: kawillia@ucalgary.ca + +2013-02-09 Mike Frysinger + + Fix decoding of sysctl() when oldval fields are NULL. + If you call glibc's syscall wrapper like so: + static int name[] = { CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE }; + int buffer[2] = { 32768, 61000 }; + size_t size = sizeof(buffer); + sysctl(name, 3, 0, 0, buffer, size); + (note that oldval/oldlenp are NULL). + + The current strace code complains like so: + _sysctl({{CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE, 38}, 3, process_vm_readv: Bad address + (nil), 0, 0x7fffe23c3960, 8}) = -1 EACCES (Permission denied) + + Since passing NULL for the old values is valid, handle that explicitly. + This also simplifies the code a bit by splitting up the handling of the + new and old args so that we only handle the new args once. + + Now the output looks like: + _sysctl({{CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE, 38}, 3, NULL, 0, 0x7fff8c0c91b0, 8) = -1 EACCES (Permission denied) + + * system.c (sys_sysctl): Check if info.oldval is NULL first. Move the + processing of oldlen/info.newval/info.newlen out so they always get + executed. Fix the format strings so we use %lu for unsigned long rather + than a mix of %ld and %lu. + +2013-02-08 Denys Vlasenko + + If we are on a glibc system, assume it's at least glibc 2.1. + It is not likely anyone uses glibc older that that: + glibc 2.1.1 was released in 1999 + + * net.c: Remove test for glibc >= 2.1. + * signal.c: Remove code which is compiled only for glibc < 2.1. + * util.c: Likewise. + +2013-02-08 Denys Vlasenko + + S390: stop using needlessly static long pc variable. + * syscall.c: Remove "static long pc" variable. + (get_scno): Use an automatic long variable instead of a static. + + Dying suddenly with abort() is rude, avoid if possible. + * file.c (sys_utime): Don't call abort() if wordsize is strange. + Instead, warn user about it. + * desc.c (printflock): Use the same message string as in sys_utime. + + Remove vestigial hacks around non-Linux struct sigactions. + * signal.c: Stop using __sighandler_t glibc'ism. Remove SA_HANDLER macro. + Explain why we can't use "sa_handler" as a field name. + (sys_sigaction): Use __sa_handler instead of SA_HANDLER macro. + (sys_rt_sigaction): Likewise. + +2013-02-08 Denys Vlasenko + + Optimize AArch64 handling of 32-bit personality. + By putting aarch64_regs and arm_regs into a union, + register copying is eliminated. + No need to check and change personality on syscall exit. + + * defs.h: Remove unused NUM_ARM_REGS define. Fix indentation. + * syscall.c: Put aarch64_regs and arm_regs into a union. + (update_personality): Shorten bitness message. + (printcall): Add commented-out PC printing. + (get_regs): Remove now-unnecessary 64-to-32 bits register copying. + (get_syscall_result): Drop personality changing code. + +2013-02-07 Denys Vlasenko + + Rename some register statics by prefixing their names with arch. + This makes it easier to grep for them. + + * syscall.c: Make IA64's r8, r10 global variables static. + Rename variables: + r8,r10 -> ia64_r8,ia64_r10. + d0 -> m68k_d0. + a3 -> alpha_a3. + r28 -> hppa_r28. + r9 -> sh64_r9. + r10 -> cris_r10. + r3 -> microblaze_r3. + (get_scno): Use new variable names. + (syscall_fixup_on_sysenter): Likewise. + (get_syscall_result): Likewise. + (get_error): Likewise. + +2013-02-06 Denys Vlasenko + + Rename ARM's regs structure to arm_regs. + Compile-tested. + + * defs.h: Rename regs structure to arm_regs. + * syscall.c: Likewise. + (printcall): Use new name instead of old one. + (get_regs): Likewise. + (get_scno): Likewise. + (get_syscall_args): Likewise. + (get_error): Likewise. + * signal.c (sys_sigreturn): Likewise. + +2013-02-06 Denys Vlasenko + + Stop needlessly using static variable. + * syscall.c: Remove static long psr. + (get_scno): Use local psr variable. + (get_syscall_result): Likewise. + +2013-02-06 Denys Vlasenko + + Shortcut tests for fork/exec syscalls. + This change should speed up strace by a tiny bit. + + More importantly, it makes it much more clear that + fork and exec fixups are not necessary for any reasonably + recent kernels. IOW: syscall_fixup_for_fork_exec() and its callees + are all dead code. + + * defs.h: Declare new need_fork_exec_workarounds flag variable. + * strace.c: Define need_fork_exec_workarounds flag variable. + (test_ptrace_setoptions_followfork): Return 0/1 as success/fail indicator. + (test_ptrace_setoptions_for_all): Likewise. + (init): Set need_fork_exec_workarounds to TRUE if needed. + * syscall.c: Rename internal_syscall() to syscall_fixup_for_fork_exec(). + (trace_syscall_entering): Call syscall_fixup_for_fork_exec() only if + need_fork_exec_workarounds == TRUE. + (trace_syscall_exiting): Likewise. + +2013-02-05 Ben Noordhuis + + Improve perf_event_open argument decoding. + * configure.ac (AC_CHECK_HEADERS): Add linux/perf_event.h. + * desc.c [HAVE_LINUX_PERF_EVENT_H]: Include . + (perf_event_open_flags): New xlat structure. + (sys_perf_event_open): New function. + * linux/dummy.h (sys_perf_event_open): Remove. + * linux/syscall.h (sys_perf_event_open): New prototype. + +2013-02-05 Chris Metcalf + + tile: fix merge skew with new get_regs architecture. + * defs.h [TILE]: Declare clear_regs(), get_regs() and get_regs_error. + * syscall.c (get_regs) [TILE]: Fix merge skew. + (printcall) [TILE]: fix a compiler warning about pt_reg_t in + a printf expression. + +2013-02-05 Bernhard Reutner-Fischer + + mount: decode MS_NOSEC. + * system.c (MS_NOSEC): Define. + (mount_flags): Add MS_NOSEC. + + mmap: decode MAP_UNINITIALIZED. + * mem.c (mmap_flags): Add MAP_UNINITIALIZED. + +2013-02-05 Dmitry V. Levin + + Print 64-bit instruction pointers zero padded. + * syscall.c (printcall): Print 64-bit instruction pointers zero padded. + + x86_64: fix compilation warning introduced in previous commit. + * syscall.c (printcall): Cast x86_64_regs.rip to the type being printed. + +2013-02-05 Denys Vlasenko + + Simple bug fix for x86_86. + * syscall.c (printcall): Use x86_64_regs.rip, not x86_64_regs.ip. + +2013-02-05 Chris Metcalf + + Add tilegx support to strace. + tilegx support has been in the kernel since 3.0. + In addition, fix some issues with the tilepro support already + present in strace, primarily the decision to use the + numbering space for system calls. + + * defs.h [TILE]: Include and provide an extern + struct pt_regs tile_regs for efficiency. Provide compat 32-bit + personality via SUPPORTED_PERSONALITIES, PERSONALITY0_WORDSIZE, + PERSONALITY1_WORDSIZE, and DEFAULT_PERSONALITY. + * linux/tile/errnoent1.h: New file, includes linux/errnoent.h. + * linux/tile/ioctlent1.h: New file, includes linux/ioctlent.h. + * linux/tile/signalent1.h: New file, includes linux/signalent.h. + * linux/tile/syscallent.h: Update with new asm-generic syscalls. + The version previously committed was the from the first tile patch + to LKML, which subsequently was changed to use . + * linux/tile/syscallent1.h: Copy from linux/tile/syscallent.h. + * mem.c (addtileflags) [TILE]: use %ld properly for a "long" variable. + * process.c [TILE]: Choose clone arguments correctly and properly + suppress all "struct user" related offsets in user_struct_offsets. + * signal.c [TILE]: Use tile_regs not upeek. + * syscall.c (update_personality) [TILE]: Print mode. + (PT_FLAGS_COMPAT) [TILE]: Provide if not in system headers. + (tile_regs) [TILE]: Define 'struct pt_regs' variable to hold state. + (get_regs) [TILE]: use PTRACE_GETREGS to set tile_regs rather than using upeek. + (get_scno) [TILE]: Set personality. + (get_syscall_args) [TILE]: Use tile_regs. + (get_syscall_result) [TILE]: Update tile_regs. + (get_error) [TILE]: Use tile_regs. + (printcall) [TILE]: Print pc. + (arg0_offset, arg1_offset, restore_arg0, restore_arg1) [TILE]: + Properly handle tile call semantics and support tilegx. + +2013-02-05 Denys Vlasenko + + Small optimization for SPARC[64] get_scno. + * syscall.c: Remove static unsigned long trap veriable. + (get_scno): Use local trap variable. + + Do not compile getrval2() if not needed. + * syscall.c (getrval2): Do not compile it for architetures where + it isn't ever used. + +2013-02-05 Denys Vlasenko + + Optimize out PTRACE_PEEKUSER with -i. + strace -i was fetching PC with a separate PEEKUSER + despite having GETREGS data: + + ptrace(PTRACE_GETREGS, 22331, 0, 0x8087f00) = 0 + ptrace(PTRACE_PEEKUSER, 22331, 4*EIP, [0x80dd7b7]) = 0 + write(3, "[080dd7b7] ioctl(0, SNDCTL_TMR_T"..., 82) = 82 + ptrace(PTRACE_SYSCALL, 22331, 0, SIG_0) = 0 + + Now it does this: + + ptrace(PTRACE_GETREGS, 22549, 0, 0x8087ea0) = 0 + write(3, "[080dd7b7] ioctl(0, SNDCTL_TMR_T"..., 82) = 82 + ptrace(PTRACE_SYSCALL, 22549, 0, SIG_0) = 0 + + Analogous improvement in sys_sigreturn() is also implemented. + + * defs.h: Declare extern struct pt_regs regs for SPARC[64] and ARM. + Declare clear_regs(), get_regs() and get_regs_error flag variable. + * strace.c (trace): Call get_regs(pid) as soon as we know the tcb + and that it is stopped. + * syscall.c (get_regs): New function. Used to fetch registers early, + just after tracee has stopped. + (printcall): Move it here from util.c. Use global regs.REG data, + if available on the arch, instead of re-fetching it. + (get_scno): Use global regs.REG data. + (get_syscall_result): Likewise. + * signal.c (sys_sigreturn): Likewise. + * util.c (printcall): Moved to syscall.c. + +2012-12-15 Stanislav Brabec + + Fix sys_semtimedop decoding on s390x. + The s390 and s390x pass semtimedop arguments differently from other + architectures. sys_semtimedop parser was fixed for s390 by commit + v4.6-177-ge0f5fd8, and s390x requires the same fix. + + * linux/ipc.c (sys_semtimedop): Fix timespec decoding on s390x. + +2012-12-08 Dmitry V. Levin + + Fix *xattr decoding. + * file.c (print_xattr_val): Do not attempt to decode a zero sized array. + Fixes RH#885233. + +2012-12-08 Stanislav Brabec + + sys_semtimedop: fix timeval argument index in wrapped call. + Looking at the implementation of wrapped semtimedop() call inside glibc + and kernel, I started to believe that timeval should be located in + tcp->u_arg[4] and not tcp->u_arg[5]. Fortunately, tcp->u_arg[5] now + works correctly as well, due to side effects of decode_ipc_subcall(). + + declaration in header: + int semtimedop(semid, *sops, nsops, *timeout); + 0 1 2 3 + + sys_ipc arguments in glibc on all patforms except s390*: + semid, (int) nsops, 0, CHECK_N (sops, nsops), timeout + 0 1 2 3 4 + We have to use indexes: 0 3 1 4 + + sys_ipc arguments on s390*: + semid, (int) nsops, timeout, sops + 0 1 2 3 + We have to use indexes: 0 3 1 2 + + * ipc.c (sys_semtimedop) [!S390]: Fix timeval argument index in + indirect_ipccall case. + +2012-12-06 John Spencer + + Fix glibc version checks. + * util.c: Check if __GLIBC__ is defined before using it. + * signal.c: Likewise. Fix __GLIBC_MINOR__ checks. + +2012-11-29 James Hogan + + Add state argument to change_syscall and fix SPARC. + Add a state argument to change_syscall() so that SPARC can modify that + instead of read-modify-writing the whole register set. This function is + always called within an arg_setup/arg_finish_change sequence which on + certain architectures like SPARC will also be doing a read-modify-write. + This prevents the second write (from arg_finish_change) from undoing the + effects of the change_syscall call. + + * util.c (change_syscall): Move below definition of arg_setup_state. + Add state argument. + [SPARC || SPARC64] Change to set state->u_regs[U_REG_G1] rather than + read-modify-writing it with PTRACE_GETREGS and PTRACE_SETREGS. + (setbpt, clearbpt): Pass state argument to change_syscall. + +2012-11-12 Steve McIntyre + + Add support for tracing 32-bit ARM EABI binaries on AArch64. + * defs.h [AARCH64]: Copy in the definition of arm_pt_regs and the + accessor macros, so it's possible to build on AArch64 without + ARM system headers. Set SUPPORTED_PERSONALITIES to 2. + Define PERSONALITY0_WORDSIZE and PERSONALITY1_WORDSIZE. + Set DEFAULT_PERSONALITY to 1. + * linux/aarch64/errnoent1.h: New file, includes generic errnoent.h. + * linux/aarch64/ioctlent1.h: New file, includes generic ioctlent.h. + * linux/aarch64/signalent1.h: New file, includes generic signalent.h. + * linux/aarch64/syscallent1.h: Rename from linux/aarch64/syscallent.h. + * linux/aarch64/syscallent.h: New file, includes arm/syscallent.h. + * syscall.c [AARCH64]: Define aarch64_regs. + (update_personality) [AARCH64]: Add debug output. + (get_scno) [AARCH64]: Determine if we're in ARM or AArch64 mode by + checking the size of the returned uio structure from PTRACE_GETREGSET + and interpret the structure accordingly. + (get_syscall_result): Likewise. + (get_syscall_args): Merge the AArch64 and ARM sections so that on + AArch64 we can fall back to supporting the ARM personality. + (get_error): Likewise. + +2012-11-12 Dmitry V. Levin + + Move asm-generic ioctl definitions to linux/ioctlent.h.in. + * linux/ioctlent.h.in: Add asm-generic ioctl entries from all + linux/*/ioctlent.h.in files. + * linux/bfin/ioctlent.h.in: Remove asm-generic ioctl entries. + * linux/i386/ioctlent.h.in: Likewise. + * linux/powerpc/ioctlent.h.in: Likewise. + * linux/s390/ioctlent.h.in: Likewise. + * linux/sparc/ioctlent.h.in: Likewise. + +2012-10-27 Dmitry V. Levin + + Filter out redundant "*32" ioctl entries. + * linux/ioctlent-filter.awk: New file. + * Makefile.am: Use it. + * linux/ioctlent.h.in: Removed redundant "*32" entries. + +2012-10-26 Dmitry V. Levin + + Enhance quotactl decoding. + * quota.c (sys_quotactl): Decode 2nd syscall argument using printpath. + * pathtrace.c (pathtrace_match): Add quotactl support. + * linux/*/syscallent.h: Add TF flag to quotactl entry. + +2012-10-26 Steve McIntyre + + Add AArch64 support to strace. + AArch64 has been included in linux from 3.7 onwards. + Add support for AArch64 in strace, tested on linux in a simulator. + + * configure.ac: Support AArch64. + * defs.h [AARCH64]: Include , define TCB_WAITEXECVE. + * ipc.c (indirect_ipccall): Support AArch64. + * process.c (struct_user_offsets): Likewise. + * syscall.c [AARCH64]: Include , , and + . Define struct user_pt_regs regs. + (get_scno, get_syscall_result): Support AArch64 using PTRACE_GETREGSET. + (get_syscall_args, get_error): Support AArch64. + * linux/aarch64/ioctlent.h.in: New file. + * linux/aarch64/syscallent.h: New file, based on linux 3.7 version of + asm-generic/unistd.h. + +2012-10-26 Steve McIntyre + + linux: add new errno values for EPROBE_DEFER and EOPENSTALE. + New definitions match updates in Linux 3.4 and Linux 3.5 respectively. + + * linux/errnoent.h (ERRNO_517): Change to EPROBE_DEFER. + (ERRNO_518): Change to EOPENSTALE. + +2012-10-26 Namhyung Kim + + Add -e trace=memory option. + Add a new 'memory' category for tracing memory mapping related syscalls. + + Affected syscalls are: break, brk, get_mempolicy, madvise, mbind, + migrate_pages, mincore, mlock, mlockall, mmap, move_pages, mprotect, + mremap, msync, munlock, munlockall, munmap, remap_file_pages, and + set_mempolicy. + + * defs.h (TRACE_MEMORY): New macro. + * syscall.c (lookup_class): Handle trace=memory option. + * strace.1: Document it. + * linux/alpha/syscallent.h: Add TM flag to memory mapping related syscalls. + * linux/arm/syscallent.h: Likewise. + * linux/avr32/syscallent.h: Likewise. + * linux/bfin/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + +2012-09-28 Mike Frysinger + + x32: add 64bit annotation too. + Since someone can invoke these entry points directly with syscall(), + at least decode their name and show that they're 64bit versions rather + than just showing syscall_###. + + * linux/x32/syscallent.h: Sync all missing entries below 312 with x86_64. + +2012-09-28 Dmitry V. Levin + + Ignore fflush(3) return value. + strace used to honor fflush(3) return value in trace_syscall_entering + which resulted to tracees not being PTRACE_SYSCALL'ed which in turn + caused nasty hangups like this one: + + $ strace -o'|:' pwd + |:: Broken pipe + + There is little strace can do in case of fflush(3) returning EOF, and + hangup is certainly not the best solution for the issue. + + * syscall.c (trace_syscall_entering): Ignore fflush(3) return value. + +2012-09-28 Dmitry V. Levin + + Use perror_msg instead of perror. + * signal.c (sys_sigreturn): Use perror_msg instead of perror. + * strace.c (tprintf, tprints, detach, startup_attach): Likewise. + * syscall.c (get_scno): Likewise. + * util.c (umoven, umovestr): Likewise. + +2012-09-27 Denys Vlasenko + + process_vm_readv may return ESRCH if tracee was killed, don't complain. + Discovered by running test/sigkill_rain under strace. + + * util.c (umoven): Do not emit error message if process_vm_readv + fails with ESRCH. + (umovestr): LikeWise. + +2012-09-13 Denys Vlasenko + + Trivial fixes, no code changes. + * strace.c: Fix compiler warning message about tgkill - we don't use it. + Fix indentation of preprocessor directives. + (trace): Remove outdated comment. + +2012-08-24 Dmitry V. Levin + + Always check setreuid return code. + * strace.c (startup_child): Check setreuid return code. + +2012-08-24 Mike Frysinger + + x32: update {g,s}etsockopt syscall numbers. + Starting with linux 3.6 (and backported to earlier kernels), these two + syscalls have changed numbers (moving from native to compat entry points). + Update the strace syscall list accordingly. + + * linux/x32/syscallent.h: Move setsockopt from 54 to 541, and move + getsockopt from 55 to 542. + +2012-08-16 Dmitry V. Levin + + Decode file type returned by getdents system call. + * file.c (sys_getdents): Decode d_type in unabbreviated mode. + +2012-07-12 Dmitry V. Levin + + Close pipe and wait for the pipe process termination. + In case of normal strace termination, when the trace output is + redirected to a file or a pipe, close it and wait for the pipe + process termination. + + * strace.c (main): Before normal exit, close shared_log when it + differs from stderr, and wait for popen_pid termination. + +2012-07-10 Denys Vlasenko + + Enable usage of PTRACE_SEIZE. + * defs.h: Define USE_SEIZE to 1. Remove PTRACE_SEIZE_DEVEL + and PTRACE_EVENT_STOP1. + * strace.c (ptrace_attach_or_seize): Replace PTRACE_SEIZE_DEVEL + with 0. + (trace): Do not check for PTRACE_EVENT_STOP1. + +2012-06-05 Mike Frysinger + + x32: update syscall table. + This syncs with the syscall table as it is in linux 3.4. + + * linux/x32/syscallent.h (59): Fix comment typo. + (78): Add missing getdents entry. + (174): Delete create_module entry (not in the kernel). + (181, 182, 183, 184, 185): Add missing entries. + (524, 536, 539, 540): Fix spacing. + +2012-05-18 Denys Vlasenko + + Merge adjacent printing operations in a few places. + * file.c (sys_readahead): Merge tprints() with following printllval(). + (sys_ftruncate64): Likewise. + (sys_fadvise64): Likewise. + (sys_fadvise64_64): Likewise. + (sys_fallocate): Merge tprints() with following tprintf(). + +2012-05-16 Denys Vlasenko + + Use %d printf format instead of %i everywhere. + * loop.c (loop_ioctl): Use %d instead of %i. + * mtd.c (mtd_ioctl): Likewise. + + Fix a few goofs in sys_sysctl() + * system.c (sys_sysctl): Cast pointer to long, not size_t, + when we intend to use it as an address. Set oldlen to 0 prior + to reading into it - we want to have deterministic result + if read fails. + +2012-05-16 Denys Vlasenko + + Stop using non-standard %Zu and %Zd formats for size_t printing. + The documented formats are %zu and %zd, but since our (normally disabled) + "fast" printf code doesn't support those too, I convert them to %lu and %ld. + + * bjm.c (sys_query_module): Convert %Zd usages to %lu. + * system.c (sys_sysctl): Likewise. + +2012-05-15 Denys Vlasenko + + Remove outdated comment about suspending new tracees. + We no longer track parent/child relationship between tracees. + Therefore, we no longer suspend new tracee until parent is seen + exiting form [v]fork/clone. The comment is obsolete. + + * strace.c (trace): Remove outdated comment. + +2012-05-15 Denys Vlasenko + + Make sure current_wordsize and PERSONALITY0_WORDSIZE are ints in all arches + On 64bit systems with a single personality, they used to be sizeof(long), + which has type "long", not "int", which complicates printf formats. + + * defs.h: Ensure that PERSONALITY0_WORDSIZE;s tyoe is int. + This in turn makes sure current_wordsize is also an int. + * count.c (call_summary): Revert the change which added cast to int. + +2012-05-15 Dmitry V. Levin + + Add configure --enable-gcc-Werror option. + * configure.ac: New option --enable-gcc-Werror. + + Make x86-64 build free of artificial warnings. + * signal.c (sys_sigreturn): Do not issue "no sys_sigreturn" warning + on X86_64. + +2012-05-14 Dmitry V. Levin + + Fix kernel release string parsing. + * strace.c (get_os_release): Handle "X.Y-something" utsname.release + strings properly. + + Reported-by: Bryce Gibson + +2012-05-14 Denys Vlasenko + + On clearing "breakpopint", restore syscall number too. + This fixes Fedora bug 659382. + Low risk: this code is not supposed to be used on any non-acient kernel. + + * util.c (clearbpt): Restore syscall number too. + +2012-05-05 Mike Frysinger + + util: fix building when glibc has a stub process_vm_readv. + If you have a newer glibc which provides process_vm_readv, but it is built + against older kernel headers which lack __NR_process_vm_readv, the library + will contain a stub implementation that just returns ENOSYS. Autoconf + checks for this case explicitly and will declare it as unavailable. So we + end up in a case where the headers provide the prototype, but autoconf has + not defined HAVE_PROCESS_VM_READV, so we hit the same build failure again: + + util.c:738:16: error: static declaration of 'process_vm_readv' follows non-static declaration + /usr/include/bits/uio.h:58:16: note: previous declaration of 'process_vm_readv' was here + + So rename our local function to something unique, and add a define so the + callers all hit the right place. + + * util.c (strace_process_vm_readv): Rename from process_vm_readv. + (process_vm_readv): Define to strace_process_vm_readv. + +2012-05-03 Dmitry V. Levin + + doc: describe documentation policy. + * README-hacking: Describe documentation policy. + +2012-05-02 Dmitry V. Levin + + maint: post-release administrivia. + * NEWS: Add header line for next release. + + Prepare for 4.7 release. + * configure.ac: Version 4.7. + * debian/changelog: 4.7-1. + * strace.spec: 4.7-1. + + Fix build with from 2.6.18 kernel headers. + * configure.ac: Check for LO_FLAGS_AUTOCLEAR and LO_FLAGS_PARTSCAN + declarations. + * loop.c (loop_flags_options): Use LO_FLAGS_AUTOCLEAR and + LO_FLAGS_PARTSCAN only when appropriate declarations are available. + (loop_ioctl): Use LOOP_SET_CAPACITY only when it is defined. + +2012-05-01 Dmitry V. Levin + + * vsprintf.c: Check for USE_CUSTOM_PRINTF earlier. + + Remove duplicate names from CREDITS. + * .mailmap: Merge email addresses. + * CREDITS.in: Remove a duplicate name. + +2012-05-01 Dmitry V. Levin + + tests: raise strace check timeout to 60 seconds. + * tests/init.sh (check_timeout): New variable. + * tests/ptrace_setoptions: Use it. + * tests/strace-f: Likewise. + + Reported-by: Mike Frysinger + +2012-05-01 Dmitry V. Levin + + Update STA_* constants. + * time.c (adjtimex_status): Add STA_NANO, STA_MODE, and STA_CLK. + * NEWS (Improvements): Mention it. + + NEWS: update for release. + * NEWS (Improvements): Mention recent recvmsg/recvmmsg decoders + enhancements. + (Portability): Add a recommendation for the minimum Linux kernel + version to use. + + Make printing of utsname.domainname more portable. + * configure.ac: Check for struct utsname.domainname field. + * process.c (sys_uname): Print utsname.domainname when the field is + available. + +2012-05-01 Dmitry V. Levin + + Fix recvmmsg decode: do not show more data than actually returned. + This change complements recent fix for recvmsg decoding. + + * net.c (printmmsghdr): Add msg_len parameter to pass down to do_msghdr. + When this parameter is zero, pass mmsghdr.msg_len to do_msghdr instead. + (decode_mmsg): Add msg_len parameter, pass it down to printmmsghdr. + (sys_sendmmsg): Call decode_mmsg with msg_len == (unsigned long) -1L. + (sys_recvmmsg): Call decode_mmsg with msg_len == 0. + +2012-05-01 Dmitry V. Levin + + Remove recently introduced use of ULONG_MAX. + * io.c: Remove limits.h inclusion. + (tprint_iov): Use "(unsigned long) -1L" instead of "ULONG_MAX". + * net.c: Remove limits.h inclusion. + (printmmsghdr, sys_sendmsg): Use "(unsigned long) -1L" instead of + "ULONG_MAX". + +2012-04-28 Denys Vlasenko + + Enable printing of uts.domainname in uname syscall. + * process.c (sys_uname): Enable printing of uts.domainname + +2012-04-28 Denys Vlasenko + + Fix printstr's len parameter width. + We often pass syscall params and other long-sized values + as printstr(len). Truncating them to int may be a bad thing. + + * defs.h: Change len parameter's type from int to long in + string_quote and printstr function declarations. + * util.c (string_quote): Special-case only len==-1, not all len<0. + (printstr): Likewise. + +2012-04-28 Denys Vlasenko + + Fix recvmsg decode: do not show more data than actually returned. + I noticed that "hostname -d" talks over netlink and gets 20 bytes + of response, but we show entire 1024 bytes of iov. + This changes fixes that. + + * defs.h: New function tprint_iov_upto. + * io.c (tprint_iov_upto): Definition of this function. + (tprint_iov): Call tprint_iov_upto. + * net.c (do_msghdr): Add data_size parameter, pass it down to tprint_iov_upto. + (printmsghdr): Add data_size parameter, pass it down to do_msghdr. + (printmmsghdr): Call do_msghdr with data_size==ULONG_MAX. + (sys_sendmsg): Call printmsghdr with data_size==ULONG_MAX. + (sys_recvmsg): Call printmsghdr with data_size==tcp->u_rval. + +2012-04-27 Dmitry V. Levin + + Package strace-log-merge. + * strace.spec (%files): Add strace-log-merge. + +2012-04-27 Mike Frysinger + + NEWS: clarify & fix typo. + +2012-04-27 Mike Frysinger + + Cast current_wordsize to an int. + On 64bit systems with a single personality, we see: + count.c: In function 'call_summary': + count.c:223:5: warning: format '%u' expects type 'unsigned int', + but argument 3 has type 'long unsigned int' + + Since on multi-personality systems this is an array of ints, cast + the multiplication to an int and update the printf format. + + * count.c (call_summary): Change %u to %d and cast first argument to int. + +2012-04-20 Dmitry V. Levin + + Update NEWS for upcoming 4.7 release. + * NEWS: Update for 4.7 release. + + Sync strace.spec and debian/ with packages. + * debian/changelog: Sync with 4.5.20-2.3. + * debian/control: Likewise. + * strace.spec: Sync with 4.6-2. + +2012-04-18 Mike Frysinger + + Decode /dev/loop ioctls. + Needed to debug some losetup failures, and it's easier when you can see + what the kernel is getting vs what you think you're sending, so add some + decoders for those ioctls. + + * loop.c: New file. + * Makefile.am (strace_SOURCES): Add loop.c. + * defs.h (loop_ioctl): New prototype. + (string_quote): Likewise. + * ioctl.c (ioctl_decode): Call loop_ioctl when code is 'L'. + * util.c (string_quote): Remove static keyword. + +2012-04-18 H.J. Lu + + x32: add ia32 support. + * Makefile.am (EXTRA_DIST): Add linux/x32/errnoent1.h, + linux/x32/ioctlent1.h, linux/x32/signalent1.h and + linux/x32/syscallent1.h. + * configure.ac: Remove AC_GNU_SOURCE, obsoleted by + AC_USE_SYSTEM_EXTENSIONS. + * defs.h (SUPPORTED_PERSONALITIES): Set to 2 for X32. + (PERSONALITY1_WORDSIZE): Set to 4 for X32. + * file.c (stat64): New struct for X32. + (sys_lseek32): New function for X32. + (stat64): Undef. + (sys_fstat64): Likewise. + (sys_stat64): Likewise. + (realprintstat64): New function for X32. + (sys_fstat64): Likewise. + (sys_stat64): Likewise. + * mem.c (sys_old_mmap): New function for X32. + * pathtrace.c (pathtrace_match): Also check sys_old_mmap for X32. + * syscall.c (update_personality): Add X32 support. + (get_scno): Support currpers == 1 for X32. + * linux/syscall.h (sys_lseek32): New function prototype for X32. + * linux/x32/errnoent1.h: New file. + * linux/x32/ioctlent1.h: Likewise. + * linux/x32/signalent1.h: Likewise. + * linux/x32/syscallent1.h: Likewise. + +2012-04-17 H.J. Lu + + Cast clock_t type to unsigned long long. + * resource.c (sys_times): Cast clock_t type to unsigned long long. + * signal.c (printsiginfo): Likewise. + +2012-04-16 Denys Vlasenko + + Add custom (faster) vfprintf implementation (disabled by default) + * defs.h: Declare strace_vfprintf either as a alias to vfprintf + or as a bona fide function. USE_CUSTOM_PRINTF define controls whether + we use strace_vfprintf. By default, we don't. + * strace.c (tprintf): Call strace_vfprintf instead of vfprintf. + * vsprintf.c: New file, implements strace_vfprintf. + +2012-04-16 Denys Vlasenko + + Stop using %h[h]u format specifiers. + This is needed for simplified printf, and reduces code size a bit. + + * block.c (block_ioctl): Cast the value to unsinged and use %u + instead of using %hu. + * desc.c (sys_io_cancel): Likewise. + * resource.c (sys_sysinfo): Likewise. + +2012-04-16 Denys Vlasenko + + Trivial speed optimization. + * strace.c (tprints): Use fputs_unlocked instead of fputs. + +2012-04-16 H.J. Lu + + Fix a problem with sys_lseek on x32. + * file.c (sys_lseek): Use MIPS-n32 variant also for x32 + +2012-04-16 H.J. Lu + + Add x32 support to strace. + X32 support is added to Linux kernel 3.4. In a nutshell, x32 is x86-64 with + 32bit pointers. At system call level, x32 is also identical to x86-64, + as shown by many changes like "defined(X86_64) || defined(X32)". The + main differerence bewteen x32 and x86-64 is off_t in x32 is long long + instead of long. + + This patch adds x32 support to strace. Tested on Linux/x32. + + * configure.ac: Support X32. + * defs.h: Set SUPPORTED_PERSONALITIES to 3 for X86_64, + Set PERSONALITY2_WORDSIZE to 4 for X86_64. + Add tcb::ext_arg for X32. + * file.c (stat): New for X32. + (sys_lseek): Use 64-bit version for X32. + (printstat64): Check current_personality != 1 for X86_64. + * ipc.c (indirect_ipccall): Check current_personality == 1 + for X86_64. + * mem.c (sys_mmap64): Also use tcp->u_arg for X32. Print NULL + for zero address. Call printllval for offset for X32. + * pathtrace.c (pathtrace_match): Don't check sys_old_mmap for + X32. + * process.c (ARG_FLAGS): Defined for X32. + (ARG_STACK): Likewise. + (ARG_PTID): Likewise. + (change_syscall): Handle X32. + (struct_user_offsets): Support X32. + (sys_arch_prctl): Likewise. + * signal.c: Include for X32. + (SA_RESTORER): Also define for X32. + * syscall.c (update_personality): Support X32 for X86_64. + (is_restart_error): Likewise. + (syscall_fixup_on_sysenter): Likewise. + (get_syscall_args): Likewise. + (get_syscall_result): Likewise. + (get_error): Likewise. + (__X32_SYSCALL_BIT): Define if not defined. + (__X32_SYSCALL_MASK): Likewise. + (get_scno): Check DS register value for X32. Use + __X32_SYSCALL_MASK on X32 system calls. + * util.c (printllval): Use ext_arg for X32. + (printcall): Support X32. + (change_syscall): Likewise. + (arg0_offset): Likewise. + (arg1_offset): Likewise. + * Makefile.am (EXTRA_DIST): Add linux/x32/errnoent.h, + linux/x32/ioctlent.h.in, linux/x32/signalent.h, + linux/x32/syscallent.h, linux/x86_64/errnoent2.h, + linux/x86_64/ioctlent2.h, linux/x86_64/signalent2.h and + linux/x86_64/syscallent2.h. + * linux/x32/errnoent.h: New. + * linux/x32/ioctlent.h.in: Likewise. + * linux/x32/signalent.h: Likewise. + * linux/x32/syscallent.h: Likewise. + * linux/x86_64/errnoent2.h: Likewise. + * linux/x86_64/ioctlent2.h: Likewise. + * linux/x86_64/signalent2.h: Likewise. + * linux/x86_64/syscallent2.h: Likewise. + +2012-04-16 H.J. Lu + + Restore tcb::u_lrval; fix lseek on MIPS-n32. + Linux kernel v3.4 adds x32 support. Both x32 and n32 use 64bit offset + for lseek parameter and return value. We need u_lrval to handle it + properly. Also we shouldn't check HAVE_LONG_LONG_OFF_T for n32 lseek. + This patch fixes it properly and prepares lseek for x32. + + * defs.h (tcb): Restore tcb::u_lrval field, RVAL_Lfoo constants. + Set RVAL_MASK to 7. + * file.c (sys_lseek): Print 64bit offset and return RVAL_LUDECIMAL + for n32. + * syscall.c (get_error): Set u_lrval for MIPS-n32. + (trace_syscall_exiting): Handle RVAL_Lfoo return value types. + +2012-04-06 Mike Frysinger + + Decode mtd ioctls. + I got tired of figuring out mtd structures (which show up a lot + in the embedded space), so add decoders for those ioctls. + + * defs.h (mtd_ioctl): New prototype. + (print_loff_t): Likewise. + * io.c (print_loff_t): Delete static keyword + * ioctl.c (ioctl_decode): Call mtd_ioctl when code is 'M'. + * Makefile.am (strace_SOURCES): Add mtd.c. + (EXTRA_DIST): Add linux/mtd-abi.h. + * mtd.c: New file. + * linux/mtd-abi.h: New file. + +2012-04-05 Mike Frysinger + + Fix indefinite hang on no-mmu systems. + The ptrace setoptions code will fork a child which goes to sleep and + expects the parent to continue on to do tests. Unfortunately, this + does not work on no-mmu systems as fork() is actually vfork() and any + vforked children will hang the parent until it exits or execs. + + We might be able to make this test work on no-mmu systems with a bit + of work, but easier to just disable this for the release so it works + now. + + * strace.c (test_ptrace_setoptions_for_all): Return if strace_vforked. + +2012-03-29 Denys Vlasenko + + Makefile.am: whitespace fix. + +2012-03-27 Anton Blanchard + + powerpc: Add syscall entries for direct socket system calls. + * linux/powerpc/syscallent.h: Add direct socket system calls. + +2012-03-26 Dmitry V. Levin + + qual_syscall: fix potential NULL dereference. + Fix regression introduced by commit + c1371ebc400fe9578908beca87f2bf407daf1506 + + * syscall.c (qual_syscall): Handle null sys_name. + + Reported-by: Fr. Br. George + +2012-03-26 Dmitry V. Levin + + strace-log-merge: fix file suffix calculation. + * strace-log-merge: Quote file prefix to fix file suffix calculation. + + Reported-by: Denys Vlasenko + Suggested-by: Andreas Schwab + +2012-03-26 Denys Vlasenko + + Remove unreachable code. + * strace.c (process_opt_p_list): Remove unreachable code. + + manpage: remove false info about -p being limited to 32 processes. + + Tweak help text and manpage (added -In to manpage) + +2012-03-25 Dmitry V. Levin + + printstr: check for potential integer overflow. + * util.c (printstr): Check for potential integer overflow during outstr + buffer size calculation. + + Robustify parsing of numbers from strings. + * defs.h (string_to_uint): New prototype. + * util.c (string_to_uint): New function. + * strace.c (error_opt_arg): New function. + (process_opt_p_list): Use string_to_uint instead of atoi. + Terminate in case of invalid process id. + (init): Use string_to_uint instead of atoi. + Use error_opt_arg in case of invalid option argument. + * syscall.c (qual_syscall, qual_signal, qual_desc): Use string_to_uint + instead of atoi. + + strace-log-merge: enhance usage error diagnostics. + * strace-log-merge: Add --help option. Check number of arguments. + Issue an error message when no strace output was merged. + + configure.ac: sort lists and use m4_normalize to ease maintenance. + * configure.ac (AC_CHECK_FUNCS, AC_CHECK_HEADERS, AC_CHECK_MEMBERS, + AC_CHECK_DECLS): Sort lists, use m4_normalize. + +2012-03-23 Denys Vlasenko + + Simple optimizations. + Why open-coding isdigit is a good idea? + + Before: call __ctype_b_loc + movzbl (%ebx),%edx + mov (%eax),%eax + testb $0x8,0x1(%eax,%edx,2) + je lbl + + After: movzbl (%eax),%edx + sub $0x30,%edx + cmp $0x9,%dl + ja lbl + + text data bss dec hex filename + 236869 704 18944 256517 3ea05 strace.before + 236719 700 18944 256363 3e96b strace + + * defs.h: Alias sigemptyset to __sigemptyset on glibc. + * syscall.c (qual_syscall): Open-code isdigit. + (qual_desc): Likewise. + (qual_signal): Open-code isdigit. Remove string copying + which was done for no apparent reason. + +2012-03-23 Denys Vlasenko + + Reorder declarations in defs.h. No code changes. + * defs.h: Reorder declarations (such as: keep all printing functions together). + +2012-03-22 Denys Vlasenko + + Simplify current tcp switching and current column handling. + Instead of using "static FILE *outf and static unsigned int curcol" + to cache current outfile and its position, we can simply + remember current tcb and use its ->outf and ->curcol. + This allows to drop numerous "tcp->curcol = curcol" ops in trace(). + + Turns out we can't drop "static FILE *outf", but now its role is + a bit clearer: it newer changes after init, stays == stderr or + opened to shared log (which may be the same thing if neither -o + nor -ff was specified). Let's rename it then. + + text data bss dec hex filename + 236953 704 18944 256601 3ea59 strace.before.prev.commit + 236905 704 18944 256553 3ea29 strace.before + 236869 704 18944 256517 3ea05 strace + + * strace.c: Replace curcol static variable by struct tcb *current_tcp. + Rename static FILE *outf to shared_log (since it no longer caches tcp->outf). + (ptrace_restart): Use current_tcp->curcol instead of curcol. + (tprintf): Check current_tcp != NULL instead of outf != NULL. + Use current_tcp->outf instead of outf, current_tcp->curcol instead of curcol. + (tprints): Likewise. + (line_ended): Likewise. + (printleader): Switch current tcb by "current_tcp = tcp" istead of + assignments to outf and curcol. + (droptcb): Set current_tcp to NULL if we dropped it. + (startup_child): Rename outf to shared_log. + (init): Likewise. + (cleanup): Likewise. + (trace): Simplify current tcp switching and current column handling. + +2012-03-22 Denys Vlasenko + + Make threaded execve handling code more reabable and somewhat simpler. + * strace.c (droptcb): Remove outfname check in "outfname && followfork >= 2" - + with recent changes, followfork >= 2 check guarantees that outfile + was specified, and _is already opened_. + (trace): Move tcb existence check before threaded execve handling. + This allows to remove tcp != NULL checks in threaded execve handling. + Rewrite threaded execve handling code to be less indented, + keeping the same logic. + +2012-03-21 Denys Vlasenko + + simple cleanups in defs.h. No logic changes. + * defs.h: Move offsetof macro definition into "libc stuff" section. + Renumber TCB_foo constants (smaller constants -> sometimes smaller code). + Remove uoff macro. + * process.c: Move uoff macro here (sole user). + + Show "+++ exited..." with -C. + * strace.c (trace): Show "+++ exited..." with -C too. + Save tcp->curcol after PTRACE_LISTEN failure too, just in case. + + Slight tweak to qemu_multiarch_testing scripts. + +2012-03-21 Denys Vlasenko + + Replace reprinting decision logic. + After this change, we no longer need to decide when we need + to set TCB_REPRINT, and when we don't: it's never needed :) + + Well, almost. That pesky pid-changing execve needs special treatment. + If not it, it'd be possible to nuke TCB_REPRINT... + + While at it, fix a case of mishandled -C. + + * strace.c (printleader): Do not set TCB_REPRINT. + (trace): Set TCB_REPRINT only for execve with changing pid. + Fix mishandling of -C. + * syscall.c (trace_syscall_entering): Do not clear TCB_REPRINT. + (trace_syscall_exiting): Replace reprinting decision logic. + Remove call to printargs(): it is known to just return 0 here. + +2012-03-21 Denys Vlasenko + + Report some ptrace failures; nuke tcp->ptrace_errno. + Report some (not all) ptrace errors, namely, + errors on ptrace restart operations. + + Before: 10533 sendto(-1, 0x804895e, 17, 0, NULL, 0 + After: 10533 sendto(-1, 0x804895e, 17, 0, NULL, 0 + + This tells user that strace failed to let sendto syscall + to be entered - process was dead at that point of time. + It is (marginally) better than to always say "" + + While at it, patch removes tcp->ptrace_errno. + I added it many months ago, and it looks that after all + it is not needed for ptrace error detection: I failed to execute + a single existing code path which is accessible + through that variable only. + + * defs.h: Remove struct tcp::ptrace_errno field. + * strace.c (ptrace_restart): Emit message to log on error. + (printleader): Remove "if (printing_tcp->ptrace_errno)..." code. + (trace): Remove !tcp->ptrace_errno check, it's always true. + +2012-03-20 Denys Vlasenko + + Eliminate redundant checks of res variable. + * syscall.c (trace_syscall_entering): Eliminate redundant checks of res variable. + (trace_syscall_exiting): Likewise. + + Rename POWERPC-specific static variable result to ppc_result. + * syscall.c: Rename POWERPC-specific static variable result to ppc_result. + + Remove redundant checks in syscall entry/exit, rename badly named function + * syscall.c (syscall_enter): Rename to get_syscall_args. + Document its return values. + (trace_syscall_entering): Don't check get_syscall_args() return + value for 0, it never returns that. + (syscall_fixup_on_sysexit): Make it return void. + (trace_syscall_exiting): Fix up syscall_fixup_on_sysexit() + call site accordingly. + + Trivial tweaks. No logic changes. + * process.c (sys_ptrace): Remove unneeded line wrapping. + * syscall.c (trace_syscall_entering): Use tprints() instead of tprintf(). + + Make ptrace_restart() static. No code changes. + * defs.h: Remove ptrace_restart() declaration. + * strace.c (ptrace_restart): Move its definition here. + * util.c (ptrace_restart): Remove its definition. + +2012-03-20 Dmitry V. Levin + + Do not include limits.h unnecessarily. + * ioctl.c: Remove limits.h inclusion left after the reverted change. + +2012-03-20 Denys Vlasenko + + Partially revert last change. + Thank you Dmitry for spotting it. + + * ioctl.c (compare): Partially revert last change - the new + comparison logic was buggy. + +2012-03-20 Denys Vlasenko + + Simplify search in ioctl table. + text data bss dec hex filename + 236973 704 18944 256621 3ea6d strace.before + 236929 704 18944 256577 3ea41 strace + + * ioctl.c (compare): Simplify generation of compare result. + (ioctl_lookup): Pass key directly, not as part of dummy struct. + (ioctl_next_match): More readable code. No logic changes. + +2012-03-19 Denys Vlasenko + + Update qemu build script: now tries to upload result back to host. + +2012-03-19 Denys Vlasenko + + Shrink space needed by undefined syscalls in syscall tables. + Undefined syscall looked like this before this change: + { 5, 0, printargs, "SYS_53" }, + That is, "SYS_53" string had to be allocated and stored in strace binary. + Since now SCNO_IN_RANGE() macro requires sysent[scno].sys_func != NULL + for valid syscalls, we can replace printargs with NULL in such lines + and make them "invalid", thus not requiring syscall name string. + + Savings on i386: + text data bss dec hex filename + 237389 704 18944 257037 3ec0d strace.before + 236973 704 18944 256621 3ea6d strace + Savings on mips: + 336551 153692 38320 528563 810b3 strace.before + 275543 153688 38320 467551 7225f strace + + Tested to still decode undefined syscalls correctly (syscall no. 222 on i386). + + * linux/*/syscallent.h: Replace 'printargs, "SYS_nnn"' with + 'NULL, NULL'. + +2012-03-19 Denys Vlasenko + + Optimize code if we have only one personality. + On i386: + text data bss dec hex filename + 238025 672 18980 257677 3ee8d strace.before + 237389 704 18944 257037 3ec0d strace + + * defs.h: Define PERSONALITY0_WORDSIZE as sizeof(long) if not defined. + Introduce new define, current_wordsize as + (personality_wordsize[current_personality]). + Make set_personality() no-op, current_personality constant zero, + current_wordsize as PERSONALITY0_WORDSIZE if we have only one personality. + * count.c (call_summary): Use current_wordsize instead of + personality_wordsize[current_personality]. + * desc.c (printflock): Likewise. + * file.c (sys_utime): Likewise. + * io.c (tprint_iov): Likewise. + * process.c (printargv): Likewise. + * resource.c (decode_rlimit): Likewise. + * signal.c (sys_kill): Likewise. + (sys_rt_sigaction): Likewise. + * time.c (sprinttv): Likewise. + (sprint_timespec): Likewise. + (printitv_bitness): Likewise. + (tprint_timex): Likewise. + (printsigevent): Likewise. + * util.c (dumpiov): Likewise. + (umoven): Likewise. + (umovestr): Likewise. + * syscall.c: Initialize sysent to sysent0 etc. + Make current_personality, personality_wordsize[], set_personality() + conditional on SUPPORTED_PERSONALITIES > 1. + +2012-03-18 Denys Vlasenko + + Fix mips64 build failure: sys_pwrite64 doesn't exist. + sys_pwrite seems to do the same thing as sys_pwrite64 + which we deleted when we removed non-Linux code. + + * linux/mips/syscallent.h: s/sys_pwrite64/sys_pwrite/ + +2012-03-18 Denys Vlasenko + + qemu_multiarch_testing/: a directory with scripts for build testing. + +2012-03-18 Denys Vlasenko + + Make internal_fork and internal_exec static. + text data bss dec hex filename + 237917 672 18980 257569 3ee21 strace + 237845 672 18980 257497 3edd9 strace_new + + * defs.h: Remove declarations of internal_fork and internal_exec. + * process.c: Remove definitions of internal_fork and internal_exec. + * syscall.c: Move them here. + (internal_syscall): Return void instead of int. We were always + returning zero, and callers weren't checking it anyway. + +2012-03-18 Denys Vlasenko + + Remove code which is not used on Linux. + Compile tested in qemu on armv4l,armv4tl,armv5l,armv6l,i686, + mipsel,mips,x86_64 + + * syscall.c: Remove code which handles RVAL_Lfoo constants. + * defs.h: Remove struct tcb::u_lrval member - it is never set. + Remove RVAL_Lfoo constants which signify return of "long" result - + they are never used. + +2012-03-18 Denys Vlasenko + + Remove unused version of sys_lseek. + It is buggy: it returns RVAL_LUDECIMAL, which means the return value + is in tcp->u_lrval. But tcp->u_lrval is never set + (on Linux - it used to be set on other OSes). + + * file.c (sys_lseek): Remove a version of this function which is + supposed to be used if off_t is long long. It appears to be buggy + and unused. + +2012-03-17 Denys Vlasenko + + Revert "Remove underscores from a few syscall names which have them" + This reverts commit 31972d52b1059d8faca1c5f417c2db1a90b868ae. + +2012-03-17 Denys Vlasenko + + Simplify sys_lseek64 conditional compilation. + It looks like sys_lseek64() is never used. + For one, it is buggy (always shows 0 return value), and no one complains. + + From code inspection: sys_lseek64 name is not used anywhere. + It is defined to sys_lseek if HAVE_LONG_LONG_OFF_T is true. + Thus, if !HAVE_LONG_LONG_OFF_T, it is never used. + Therefore "if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T" + conditional it sits in can be simplified to + "if HAVE_LONG_LONG_OFF_T". + Therefore, we can move it a bit up and merge with + "if !HAVE_LONG_LONG_OFF_T, use this sys_lseek()" code block, + by addind an "else" clause to it. + To simplify it more, drop define and just rename sys_lseek64 -> + sys_lseek. + + Since the function is buggy, I think it is unused and we can + just drop it. (I checked: at least I386 never uses it). + + * file.c (sys_lseek64): Rename to sys_lseek; don't compile it + if _LFS64_LARGEFILE but !HAVE_LONG_LONG_OFF_T since in this case + it is never used. + +2012-03-17 Denys Vlasenko + + Remove underscores from a few syscall names which have them. + Affected names are "_newselect", "_llseek", "_sysctl". + I see no apparent reason why they have leading underscores. + Moreover, some arches have underscored names and some have + non-underscored ones. This is not consistent. + + I verified that every architectire I touched did not have + a similarly named syscall without underscore, thus this change + does not introduce new ambiquities. + + I left "_exit" untouched for now, but the same points stand for it too: + some architectures use "exit" and no one complains. So why many + arches are using "_exit"? + + * linux/*/syscallent.h: Remove underscores from displayed + syscall names for _newselect, _llseek, _sysctl. + +2012-03-17 Denys Vlasenko + + Remove unused struct tcb::baddr field. + * defs.h: Remove unused struct tcb::baddr field. + + Remove unused PTRACE_WRITE{TEXT,DATA} constants (they are from SunOS) + * util.c: Remove unused PTRACE_WRITE{TEXT,DATA} constants. + + Reindent case labels. No code changes. + * net.c (printsockopt): Reindent case labels. + * signal.c (sys_signal): Likewise. + + Remove unused constants. No code changes. + * syscall.c: Remove unused ENOIOCTLCMD constant. Fix indentation. + * util.c: Remove unused CLONE_STOPPED constant. + + Move change_syscall() to its only user and make it static. + * defs.h: Remove declaration of change_syscall(). + * process.c (change_syscall): Remove definition of this function. + * util.c (change_syscall): Add definition of change_syscall(). + + MAP_ANON is the same as MAP_ANONYMOUS, no need to have the former. + * mem.c: Do not allocate string for MAP_ANON if it is the same as + MAP_ANONYMOUS. + + Indentation and whitespace fixes. No code changes. + + test/threaded_execve: make it also test a case when leader is not in syscall + +2012-03-16 Dmitry V. Levin + + Implement prlimit64 decoding, rewrite [gs]etrlimit decoding. + * configure.ac: Remove AC_RLIM_T_IS_LONG_LONG call. + Define SIZEOF_RLIM_T. + * m4/long_long.m4 (AC_RLIM_T_IS_LONG_LONG): Remove. + * linux/dummy.h (sys_prlimit64): Remove. + * linux/syscall.h (sys_prlimit64): New prototype. + * resource.c (resources): Reindent, add RLIMIT_RTTIME. + (sprintrlim, print_rlimit32, sys_getrlimit, sys_setrlimit): Remove. + [HAVE_LONG_LONG_RLIM_T]: Remove dead code. + [_LFS64_LARGEFILE || HAVE_LONG_LONG_RLIM_T]: Likewise. + (sprint_rlim64, print_rlimit64, decode_rlimit64, sprint_rlim32, + print_rlimit32, decode_rlimit, sys_getrlimit, sys_setrlimit, + sys_prlimit64): New functions. + +2012-03-16 Denys Vlasenko + + Remove another "interrupt to quit" message. + * strace.c (startup_attach): Remove another "interrupt to quit" message. + + Fix "strace -oFILE -ff -p" behavior. + * strace.c (newoutf): Set tcp->outf in non-ff mode too. + (alloctcb): This define is removed. + (alloc_tcb): Renamed to alloctcb. Does not set tcp->outf anymore. + Lost 'command_options_parsed' flag parameter. + (startup_attach): Do not say "interrupt to quit" in attach message - + ^C does not work in all cases, we mislead users. + Call newoutf(tcp) after successful attach. + (startup_child): Call newoutf(tcp) after successful attach. + (trace): Call newoutf(tcp) when we picked up already attached child. + +2012-03-16 Denys Vlasenko + + Make alloc_tcb and droptcb static. No code changes. + The change is trivial. Diff is large because it is confused + by function definitions being moved around. + + * defs.h: Remove declarations of alloc_tcb and droptcb. + * strace.c: Make alloc_tcb and droptcb static. + Shuffle functions around to make compiler happy. + +2012-03-16 Denys Vlasenko + + Tidy up includes and copyright notices, fix indentation. + The files not mentioned in changelog below had only + copyright notices fixes and indentation fixes. + + * defs.h: Include and . + * file.c: Do not include . + Move struct kernel_dirent declaration below top include block. + * block.c: Do not include and . + * quota.c: Likewise. + * desc.c: Likewise. + * signal.c: Likewise. + +2012-03-16 Dmitry V. Levin + + scsi.c: add copyright header. + * scsi.c: This file was added back in 2007 without a copyright header. + Add it now. + +2012-03-15 Dmitry V. Levin + + Enhance capget and capset syscalls decoding. + * system.c (cap_version): New xlat structure. + (print_cap_header, print_cap_data): New functions. + (sys_capget, sys_capset): Use them. + + Remove unused code. + * syscall.c (subcall_style, decode_subcall): Remove. + [SYS_socket_subcall] (decode_socket_subcall): New function, based on + decode_subcall in deref_style. + [SYS_ipc_subcall] (decode_ipc_subcall): New function, based on + decode_subcall in shift_style. + (trace_syscall_entering): Use decode_socket_subcall and + decode_ipc_subcall instead of decode_subcall. + + Fix IPC decoding on alpha and arm. + * ipc.c (indirect_ipccall): Return 0 on ALPHA and ARM EABI. + (sys_shmat): Use indirect_ipccall for proper return value decoding. + + arm: fix compilation warnings. + * configure.ac: Define SIZEOF_LONG. + * signal.c (sys_rt_sigaction) [SUPPORTED_PERSONALITIES > 1]: Help + compiler to optimize out unreachable code that is not expected to work + on platforms where sizeof(long) <= 4. + +2012-03-15 Dmitry V. Levin + + tests: robustify again buggy shells. + * tests/init.sh (check_strace): Use "${parameter:-word}" shell syntax + instead of "${parameter-word}". + + Reported-by: Mike Frysinger + +2012-03-15 Mike Frysinger + + improve ifdef check with decode_subcall. + Use the same ifdef logic around the call sites of decode_subcall() + to protect the definition of the func itself. This fixes warnings + for targets like hppa which don't use this func. + + * syscall.c (decode_subcall): Wrap in SYS_socket_subcall and + SYS_ipc_subcall define checks. + +2012-03-15 Mike Frysinger + + alpha: fix decode of osf_sigprocmask. + The alpha sigprocmask syscall is special in that it comes from OSF rather + than the style that everyone else uses. + + Tested with this simple code: + $ cat test.c + #include + main() { + sigset_t set, oldset; + sigemptyset(&set); + sigaddset(&set, SIGINT); + sigaddset(&set, SIGHUP); + sigprocmask(SIG_SETMASK, &set, &oldset); + sigprocmask(SIG_UNBLOCK, &oldset, &set); + sleep(3); + } + $ gcc test.c && ./strace ./a.out + ... + osf_sigprocmask(SIG_SETMASK, [HUP INT]) = 0 (old mask []) + osf_sigprocmask(SIG_UNBLOCK, []) = 0x3 (old mask [HUP INT]) + osf_sigprocmask(SIG_BLOCK, [CHLD]) = 0x3 (old mask [HUP INT]) + ... + + * linux/alpha/syscallent.h: Call sys_sigprocmask for osf_sigprocmask, + and change number of arguments to two. + * signal.c (sys_sigprocmask): Fix decoding of alpha osf sigprocmask. + +2012-03-15 Denys Vlasenko + + Fix array size calculation in previous commit. + * pathtrace.c (getfdpath): Fix array size calculation. + +2012-03-15 Denys Vlasenko + + pathtrace_select() is never called with NULL, remove dead code. + pathtrace_select() is only called for -P FILE options, + and FILE is never a NULL pointer. + + text data bss dec hex filename + 239453 672 19012 259137 3f441 strace.before + 239329 672 19012 259013 3f3c5 strace + + * pathtrace.c (pathtrace_select): Remove "if (path == NULL)...". + (pathtrace_select): Remove code which only executes if path == NULL. + The code was also buggy, it can free non-malloced pointer. + (getfdpath): Simplify snprintf to sprintf. + (pathmatch): Use strcmp() == 0 idiom for string equality test. + (pathtrace_match): Likewise. + +2012-03-15 Denys Vlasenko + + manpage: remove bugs which are fixed. + "A traced process ignores SIGSTOP" - fixed, expected to be in linux-3.4.x. + "A traced process which tries to block SIGTRAP will be sent a SIGSTOP + in an attempt to force continuation of tracing." - not needed + and no longer done. + "On Linux, exciting as it would be, tracing the init process is forbidden" + - not true anymore. + "When a traced process receives a SIGTRAP signal not + associated with tracing, strace will not report that signal correctly." + - not true anymore. + + Simplify SIGCHLD handler setting. + * strace.c (init): Set SIGCHLD to SIG_DFL earlier. + (startup_child): Do not bother restoring SIGCHLD handler. + + When reporting signals, use short signal names (SIGfoo) instead of strerror + * defs.h: Remove strsignal declaration. + * signal.c: Better check for SI_FROMUSER define. + * strace.c (strerror): Remove this function. + (trace): Use short signal names (SIGfoo) instead of strerror. + + Remove TODO file: it's eleven years old and completely outdated. + + Clean up defs.h order. No code changes. + * defs.h: Group together related declarations. No code changes. + +2012-03-15 Denys Vlasenko + + Fix lame kernel version checking code. + The code "os_release[0] >= '3'" is not good for any + finer-grained checks such as "kernel >= 3.2.1". + Let's proactively fix it. + + * strace.c: Change os_release from string to integer. + (get_os_release): Parse uname.release to KERNEL_VERSION + representation. + (init): Convert kernel version check to KERNEL_VERSION. + +2012-03-15 Denys Vlasenko + + Experimental support for "detach on execve" feature. + * strace.c: Define new detach_on_execve, skip_startup_execve bool variables. + (init): Set detach_on_execve on -b, set skip_startup_execve if + "strace PROG" form is used. + (trace): Detach from process if -b and we see PTRACE_EVENT_EXEC event. + + Simple fixes. + * strace.c (usage): Document -d; document that -F is deprecated. + (droptcb): Print "" correctly for non-ff mode too. + (detach): Suppress a warning. + + Remove an outdated comment. + * defs.h: Remove an outdated comment. + + Remove extra include directives. No code changes. + * defs.h: Include unconditionally. + Other files were doing it unconditionally, so no harm done. + * bjm.c: Remove system includes which are already included by defs.h. + * pathtrace.c: Likewise. + * process.c: Likewise. + * signal.c: Likewise. + * strace.c: Likewise. + * stream.c: Likewise. + * syscall.c: Likewise. + * system.c: Likewise. + * util.c: Likewise. + +2012-03-15 Denys Vlasenko + + Tidy up order of includes; make bool variables explicit. + Bool variables are more compact in data and (on x86) on code too: + + text data bss dec hex filename + 237950 676 19044 257670 3ee86 strace.before + 237838 676 19012 257526 3edf6 strace + + * defs.h: Group library includes at the top of the file. + Rename dtime to Tflag, debug to debug_flag. + Change debug_flag,Tflag,qflag,not_failing_only,show_fd_path,tracing_paths + variable declarations from int to bool. + * strace.c: Change corresponding definitions. Do the same for static + variables iflag,rflag,print_pid_pfx. + Rename dtime to Tflag, debug to debug_flag. + * syscall.c: Rename dtime to Tflag, debug to debug_flag. + +2012-03-15 Dmitry V. Levin + + Fix compiler warnings about breaking strict-aliasing rules. + * system.c (sys_capget, sys_capset): Use proxy unions to cast long* + pointers to cap_user_header_t and cap_user_data_t pointers without + breaking strict-aliasing rules. + + Reported-by: Mike Frysinger + +2012-03-15 Mike Frysinger + + ppc64: drop unused pid variable. + * syscall.c (get_scno) [POWERPC64]: Delete unused pid variable. + +2012-03-15 Dmitry V. Levin + + ia64: fix compilation warnings. + * linux/ia64/syscallent.h: Remove improper defines and undefs. + + Reported-by: Mike Frysinger + +2012-03-15 Dmitry V. Levin + + Ensure that SWAP_FLAG_* constants are defined. + * file.c: Define those of SWAP_FLAG_* constants which are not yet + provided by . + + Reported-by: Mike Frysinger + +2012-03-14 Dmitry V. Levin + + Enhance *listxattr syscalls decoding. + * file.c (print_xattr_list): New function. + (sys_listxattr, sys_flistxattr): Use it. + +2012-03-13 Dmitry V. Levin + + Fix *at syscalls flags decoding. + Several *at decoders were defining own incomplete *atflags xlat + structures. That was error prone, and fchownat decoder actually + failed to recognize AT_EMPTY_PATH. Merging these incomplete + structures into the single at_flags xlat structure will fix + flags handling in all these decoders altogether. + + * file.c: Define all AT_* constants used by *at decoders. + (at_flags): New xlat structure, with records for all AT_* constants. + (fstatatflags, linkat_flags, unlinkatflags): Remove. + (sys_newfstatat, sys_linkat, sys_unlinkat, sys_fchownat, + sys_utimensat): Use at_flags. + +2012-03-13 Dmitry V. Levin + + Fix linkat flags decoding. + * file.c (linkat_flags): New xlat structure. + (sys_linkat): Decode flags using linkat_flags. + + Implement sys_rt_tgsigqueueinfo syscall decoder. + * linux/dummy.h (sys_rt_tgsigqueueinfo): Remove. + * linux/syscall.h (sys_rt_tgsigqueueinfo): New prototype. + * signal.c (print_sigqueueinfo): New function, based on + sys_rt_sigqueueinfo. + (sys_rt_sigqueueinfo): Use print_sigqueueinfo. + (sys_rt_tgsigqueueinfo): New function. + + Implement syslog syscall decoder. + * linux/dummy.h (sys_syslog): Remove. + * linux/syscall.h (sys_syslog): New prototype. + * system.c (syslog_action_type): New xlat structure. + (sys_syslog): New function. + +2012-03-13 Denys Vlasenko + + Less ugly debug display of ptrace events. + * strace.c (trace): Less ugly debug display of ptrace events. + + Make manpage mention that -p "`pidof PROG`" works. + +2012-03-13 Denys Vlasenko + + Fix logging for "strace -o FILE -ff test/threaded_execve" test case. + Our logic which was deciding whether to print "" + thingy wasn't working properly for -ff case. + + * defs.h: Group log generation-related declarations together. + Add a large comment which explains how it works. + Add declaration of line_ended() function. + * strace.c (line_ended): New function which sets up internal data + to indicate that previous line was finished. + (printleader): Change logic to fix log generation in -ff mode. + (newoutf): Make check for -ff mode consistent with other places. + (droptcb): Print "" if last line for this tcp wasn't finished. + (cleanup): Remove code to print "", printleader() + or detach() will do it instead. + (trace): Remove code to print "". + Add code which finishes threaded execve's incomplete line + with " " message. Replace printing_tcp = NULL + followed by fflush() by line_ended() call. + * process.c (sys_exit): Call line_ended() to indicate that we finished priting. + * syscall.c (trace_syscall_exiting): Set printing_tcp to current tcp. + Call line_ended() to indicate that we finished priting. + Remove call to fflush(), it is done by line_ended() now. + +2012-03-13 Dmitry V. Levin + + net.c: recognize MSG_WAITFORONE. + * net.c (msg_flags): Add MSG_WAITFORONE. + +2012-03-12 Denys Vlasenko + + Treat -ff without -o FILE as single -f. + * strace.c (init): Treat -ff without -o FILE as single -f. + + Style fix. No code changes. + * strace.c (process_opt_p_list): Style fix. + +2012-03-12 Denys Vlasenko + + Reduce stack usage by ~0.5k. + main() uses ~0.5k of stack for local variables and such. When we enter + main tracing loop, most of these variables are no longer used. + But they still take up stack for the entire life of strace. + We can avoid this wastage if we move init code into a separate function. + (Need to be careful and not allow automatic inlining). + + * strace.c (init): New function. Most of pre-existing code of + main is now living here. + (main): Call init() to do initialization. + +2012-03-12 Denys Vlasenko + + Preparatory cosmetic changes for the next commit. + * strace.c (tprintf): Move function up in the source file. No code changes. + (tprints): Likewise. + (printleader): Likewise. + (tabto): Likewise. + +2012-03-11 Dmitry V. Levin + + Implement sendmmsg syscall decoder. + * linux/dummy.h (sys_sendmmsg): Remove. + * linux/syscall.h (sys_sendmmsg): New prototype. + * net.c (printmmsghdr): Add index argument specifying the element in + mmsghdr array to print. + (decode_mmsg): New function, prints the whole mmsghdr array, its length + and message flags. + (sys_sendmmsg): New function. + (sys_recvmmsg): Use decode_mmsg to fix mmsghdr array decoding. + + Implement sched_rr_get_interval syscall decoder. + * linux/dummy.h (sys_sched_rr_get_interval): Remove. + * linux/syscall.h (sys_sched_rr_get_interval): New prototype. + * process.c (sys_sched_rr_get_interval): New function. + + Implement migrate_pages syscall decoder. + * linux/dummy.h (sys_migrate_pages): Remove. + * linux/syscall.h (sys_migrate_pages): New prototype. + * mem.c (sys_migrate_pages): New function. + + Implement get_robust_list syscall decoder. + * linux/dummy.h (sys_get_robust_list): Remove. + * linux/syscall.h (sys_get_robust_list): New prototype. + * process.c (sys_get_robust_list): New function. + + Define sys_set_robust_list as an alias to sys_munmap. + * linux/dummy.h (sys_set_robust_list): Redefine to sys_munmap. + + Implement clock_adjtime syscall decoder. + * linux/dummy.h (sys_clock_adjtime): Remove. + * linux/syscall.h (sys_clock_adjtime): New prototype. + * time.c (do_adjtimex): New function, based on sys_adjtimex. + (sys_adjtimex): Use it. + (sys_clock_adjtime): New function. + + Define sys_setns as an alias to sys_inotify_rm_watch. + * linux/dummy.h (sys_setns): Redefine to sys_inotify_rm_watch. + + Sort definitions of dummy parsers. No code changes. + * linux/dummy.h: Sort definitions of parsers implemented as aliases. + + Correct inotify_rm_watch decoder. + * file.c (sys_inotify_rm_watch): Print second argument as int. + + Alias sys_fsync to sys_close. + * file.c (sys_fsync): Remove. + * linux/syscall.h (sys_fsync): Likewise. + * linux/dummy.h (sys_fsync): Alias to sys_close. + * linux/m68k/syscallent.h: Add TD flag to fsync entry. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + +2012-03-10 Dmitry V. Levin + + Update ioctl entries. + * linux/ioctlent.h.in: Regenerate from v3.3 headers. + * linux/i386/ioctlent.h.in: Likewise. + + strace-log-merge: cleanup. + * strace-log-merge: Redirect usage to stderr, make the check + for numeric suffix simpler. + + Add syscall entries for new linux syscalls. + * linux/i386/syscallent.h: Update process_vm_writev handler. + * linux/powerpc/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/alpha/syscallent.h: Add entries for accept4 and sendmmsg. + * linux/arm/syscallent.h: Add entries for process_vm_readv and + process_vm_writev. + * linux/m68k/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Add entries for process_vm_readv, + process_vm_writev and accept4. + * linux/microblaze/syscallent.h: Add entries for sendmmsg, + process_vm_readv and process_vm_writev. + + Implement process_vm_writev decoder. + * process.c (sys_process_vm_writev): New function. + * linux/syscall.h (sys_process_vm_writev): New prototype. + + Output iovec length in vmsplice and process_vm_readv decoders. + * io.c (sys_vmsplice): Output iovec length. + * process.c (sys_process_vm_readv): Likewise. + +2012-03-09 Dmitry V. Levin + + swapon: decode swap flags. + * file.c: Include . + (swap_flags): New xlat structure. + (sys_swapon): New function. + * linux/dummy.h (sys_swapon): Remove. + * linux/syscall.h (sys_swapon): New declaration. + +2012-03-09 Denys Vlasenko + + Trivial simplification. + * strace.c (detach): Use waitpid instead of wait4. + +2012-03-09 Denys Vlasenko + + Don't consider PROG to be our child in "strace -D PROG" case. + TCB_STRACE_CHILD is used for the case when "strace PROG" is ^C-ed + or something like that. strace should not just exit - it should + do something with its child (such as signal it too). + + In -D case, PROG is not really a child of _strace_, it is a child + of strace's parent. It's ok to handle it exactly as an attached process. + + While we are at it, remove nonsensical special-casing of TCB_STRACE_CHILD + in printing of "" message. + + * strace.c (startup_attach): Don't set TCB_STRACE_CHILD if -D. + (trace): Print "" on error regardless of TCB_STRACE_CHILD. + +2012-03-09 Denys Vlasenko + + Fix the case where we try to detach unattached processes. + Before this change: + $ strace -D -p1 + strace: -D and -p are mutually exclusive options + Process 1 detached <==== WRONG! (and we try to SIGSTOP it!!!) + + * defs.h: Change the meaning of TCB_ATTACHED: now it means "this tracee + is attached to us". Add TCB_STRACE_CHILD: "this tracee is our child". + * strace.c (kill_save_errno): Move up. No code changes. + (process_opt_p_list): Don't set TCB_ATTACHED on new tcb. + (startup_attach): Change how we work with TCB_ATTACHED. + Set TCB_STRACE_CHILD on -D. + (startup_child): Use kill_save_errno instead of kill. + Set TCB_ATTACHED and TCB_STRACE_CHILD on attached strace child. + If we are in -D case, don't set TCB_ATTACHED (we aren't attached yet). + (detach): do not do PTRACE_DETACH if TCB_ATTACHED is not set. + (cleanup): Check TCB_STRACE_CHILD instead of TCB_ATTACHED. + (trace): Likewise. + +2012-03-09 Denys Vlasenko + + Call PTRACE_CONT with addr=0. + * strace.c (trace): Call PTRACE_CONT with addr=0. + + install strace-log-merge by "make install" + + strace_log_merge: new file. Helper to merge timestamped strace -ff logs. + +2012-03-09 Denys Vlasenko + + Fix PID prefix printing in "strace -oLOG -ff -p1 -p2 -p3" case. + In this case we were printing PIDs to LOG.* files + even though it is not necessary. + + The fix is in the addition of "&& followfork < 2" condition. + + * strace.c: Remove pflag_seen variable, add print_pid_pfx one. + (process_opt_p_list): Do not pflag_seen++. + (main): Use "nprocs != 0" condition instead of "pflag_seen != 0". + Set print_pid_pfx before entering main tracing loop. + (printleader): Use print_pid_pfx to decide whether to print pid prefix. + +2012-03-09 Denys Vlasenko + + Allow -p PID to take comma or whitespace-separated list of PIDs. + * defs.h: Clarify meaning of TCB_ATTACHED. No code changes. + * strace.c (process_opt_p_list): New function. + (main): Call process_opt_p_list to process -p PIDs argument. + +2012-03-08 Denys Vlasenko + + Pass addr=0 instead of 1 into restarting ptrace calls. + While we are at it, fold do_ptrace into its lone caller. + We no longer set tcp->ptrace_errno = ESRCH on ESRC error in upeek. + Other code paths where ptrace fails wern't doing it, and the code which + checks tcp->ptrace_errno even assumes it is never set to ESRCH. + (It was me who added this code sometime ago, so it was my fault + that it was a bit messy) + + I ran sigkill_rain test and verified that unfinished syscalls are + still handled correctly. + + * util.c (ptrace_restart): Do not pass addr=1 to ptrace(), pass 0 instead. + I have no idea why we were passing 1. Ptrace documentation says + that addr parameter is ignored. + (do_ptrace): Remove this function. + (upeek): Use ptrace() instead of do_ptrace(). + * defs.h: Remove do_ptrace() declaration. + +2012-03-08 Denys Vlasenko + + Trivial tweaks to error messages. + * strace.c (test_ptrace_setoptions_followfork): Use kill_save_errno + instead of kill. + (trace): Use perror_msg instead of perror. + * count.c (set_sortby): Use error_msg_and_die instead of fprintf. + * syscall.c (qualify): Likewise. + * util.c (ptrace_restart): Expand error message. + (umoven): Likewise. + (umovestr): Likewise. + (upeek): Use perror_msg instead of sprintf + perror. + +2012-02-28 Denys Vlasenko + + Remove stray sys_swapon() declaration. + * linux/syscall.h: Remove stray sys_swapon() declaration. + * linux/mips/syscallent.h: Include dummy.h with correct relative path. + * linux/dummy.h: Tweak one place where spaces are used instead of tabs. + * linux/dummy_check.sh: New script. It helps in finding stray syscall + handler declarations. + +2012-02-27 Denys Vlasenko + + Correct syscall entries for t[g]kill. + * linux/hppa/syscallent.h: Make tgkill use sys_tgkill, not printargs. + * linux/sh/syscallent.h: Change tkill type TD -> TS. + * linux/sh64/syscallent.h: Likewise. + * linux/mips/syscallent.h: Change tkill type 0 -> TS. + * linux/x86_64/syscallent.h: Likewise. + * linux/avr32/syscallent.h: Likewise. + +2012-02-27 Denys Vlasenko + + Assorted trivial optimizations. + text data bss dec hex filename + 236448 672 19044 256164 3e8a4 strace.before + 236360 672 19044 256076 3e84c strace + + * file.c (sprintmode): Use smaller static buffer, eliminate strlen call. + (sprinttime): Use smaller static buffer. + (printstat_sparc64): Coalesce two printing calls into one. + (printstat_powerpc32): Likewise. + (printcompat_statfs6): Likewise. + (sys_utime): Do not fetch personality_wordsize[current_personality] + repeatedly - cache it in local variable instead. + * process.c (printargv): Likewise. + * resource.c (sprintrlim): Return const char*, not char*. This allows + to eliminate sprintf(buf, "RLIM_INFINITY"). Use smaller static buffer. + (sprintrlim64): Likewise. + * strace.c (strerror): Use smaller static buffer. + (strsignal): Likewise. + +2012-02-27 Denys Vlasenko + + Alias a few more syscall printing functions. + text data bss dec hex filename + 237384 672 19044 257100 3ec4c strace.before + 236448 672 19044 256164 3e8a4 strace + + * defs.h: Declare new functions printargs_lu(), printargs_ld() + which simply print syscall all args as unsigned or signed longs. + * desc.c (sys_epoll_create): Call printargs_ld() instead of open-coding it. + * linux/syscall.h: Remove declarations of the following functions: + sys_alarm, sys_getresgid, sys_getsid, sys_nice, sys_setgid, sys_setpgid, + sys_setpgrp, sys_setregid, sys_setresgid. + * process.c (sys_setgid): Delete this function: now aliased to sys_setuid(). + (sys_getresgid): Delete this function: now aliased to sys_getresuid(). + (sys_setregid): Delete this function: now aliased to sys_setreuid(). + (sys_setresgid): Delete this function: now aliased to sys_setresuid(). + (sys_setpgrp): Delete this function: now aliased to printargs_lu(). + (sys_getsid): Likewise. + (sys_setpgid): Likewise. + (sys_alarm): Likewise. + (sys_getpgrp): Delete this function: was unused - was already shadowed + by a define in linux/dummy.h. + (sys_setsid): Likewise. + (sys_getpgid): Likewise. + * resource.c (sys_nice): Delete this function: now aliased to printargs_ld(). + * linux/dummy.h: Define new aliases (see above for the list). + * syscall.c (printargs_lu): New function. + (printargs_ld): New function. + +2012-02-27 Denys Vlasenko + + Style fixes, no code changes. + * desc.c (sys_io_getevents): Indentation fix. + * file.c (sys_xstat): Remove space after function name. + (decode_mknod): Indentation fix. + * net.c (printsockopt): Indentation fix. + * process.c (unalignctl_string): Indentation fix. + (sys_sched_getscheduler): Remove space after ! operator. + +2012-02-25 Dmitry V. Levin + + Compress blank lines. + Suppress repeated empty lines left after automated code removal. + This change was made by filtering every source code file through + "cat -s". + +2012-02-25 Dmitry V. Levin + + Remove parts of automake machinery which are not needed on Linux. + This change is a verbatim part of Dmitry's changes to remove support + for non-Linux architectures. + + * Makefile.am: Don't install PORTING file. Install README-linux-ptrace file. + Set OS variable to linux unconditionally. + * configure.ac: Remove code to set opsys variable, and its usage. + Remove checks for headers which are never present on Linux. + * m4/stat.m4: Remove 'ifdef LINUX' check. + * m4/statfs.m4: Likewise. + +2012-02-25 Dmitry V. Levin + + Remove and update documentation. + This change is a verbatim part of Dmitry's changes to remove support + for non-Linux architectures. + + * PORTING: Deleted. + * INSTALL: Modified. + * README: Modified. + * strace.1: Modified: bugs should be reported to mailing list, not Debian. + * strace.spec: do not install PORTING file. + +2012-02-25 Denys Vlasenko + + Remove a few more code parts which are unused on Linux. + This change is abapted from Dmitry's changes to remove support for + non-Linux architectures. + + * Makefile.am: Remove if LINUX/endif pairs. + * defs.h: Remove stream_ioctl() declaration. + * ioctl.c (ioctl_decode): Remove 'ifdef HAVE_SYS_STREAM_H' block. + * resource.c: Use 'defined(FOO)' instead of 'defined FOO' form. + * util.c: Likewise. + * signal.c: Remove conditional includes which are never used on Linux. + * stream.c: Likewise. + * file.c: Remove excessive empty lines. + +2012-02-25 Denys Vlasenko + + Build fixes after non-Linux code removal. + * configure.ac: Remove calls to proc-based ptrace checks. + * proc.c: Remove, it's empty now. + * Makefile.am: Remove reference to proc.c. + * net.c: Remove trailing newlines. + * quota.c: Likewise + * resource.c: Likewise + * strace.c: Likewise + * stream.c: Likewise + * time.c: Likewise + + Fix defined(FOO) style. + * file.c: Consistently use defined(FOO) instead of defined (FOO). + * mem.c: Likewise. + * net.c: Likewise. + * signal.c: Likewise. + * sock.c: Likewise. + * linux/mips/syscallent.h: Likewise. + + Reindent preprocessor directives in util.c; fix style. + * util.c: Fix indentation of preprocessor directives broken by + automatic removal of non-Linux code. Fix style to use consistent + defined(FOO) instead of defined (FOO). + + Reindent preprocessor directives in syscall.c; fix style. + * syscall.c: Fix indentation of preprocessor directives broken by + automatic removal of non-Linux code. Fix style to use consistent + defined(FOO) instead of defined (FOO). + + Reindent defs.h preprocessor directives. + * defs.h: Fix indentation of preprocessor directives broken by + automatic removal of non-Linux code. + + Cleanup after non-Linux code removal. + Conditions such as defined(LINUX) are always true now, + defined(FREEBSD) etc are always false. + When if directive has them as subexpressions, it can be simplified. + Another trivial changes here are fixes for directive indentation. + +2012-02-25 Denys Vlasenko + + Manual removal of non-Linux source, documentation, etc. + Remove non-Linux source directories: freebsd/, svr4/, sunos4/, svr4/. + Remove README-freebsd, README-sunos4, README-svr4, m4/procfs.m4. + + linux/sparc/{errnoent1,ioctlent1,signalent1}.h used to point to svr4/ files - + replace their contents with copies of used (and now deleted) files. + Make linux/sparc64/{errnoent1,ioctlent1,signalent1}.h include these files + instead of svr4/* ones. + + Makefile.am: remove references to deleted files. + configure.ac: Remove a few tests which make no sense on Linux. + Man page: remove non-Linux quirks information. + +2012-02-25 Denys Vlasenko + + Automated removal of non-Linux code. + This change is generated by running every source through the following command: + + unifdef -DLINUX -Dlinux -USUNOS4 -USVR4 -UUNIXWARE -UFREEBSD + -USUNOS4_KERNEL_ARCH_KLUDGE -UHAVE_MP_PROCFS + -UHAVE_POLLABLE_PROCFS -UHAVE_PR_SYSCALL -UUSE_PROCFS file.c + +2012-02-24 Denys Vlasenko + + When accessing data blocks, truncate addr to wordsize. + * util.c (umoven): Truncate addr to wordsize before use. + +2012-02-22 Dmitry V. Levin + + strace.1: fix a typo. + * strace.1: Fix a typo in example description. + This fixes Debian bug #653309. + + Fix sockaddr_un.sun_path name in decoded output. + * net.c (printsock): Show sockaddr_un.sun_path as "sun_path". + This fixes Debian bug #554946. + + Avoid potential core file clobbering on exit. + * strace.c (main): Set RLIMIT_CORE to zero before terminating itself + with a deadly signal. + This fixes Debian bug #656398. + +2012-02-20 Dmitry V. Levin + + Eliminate native_scno and known_scno. + * defs.h (known_scno): Remove. + (sysent): Remove native_scno field. + * process.c [IA64]: Replace known_scno(tcp) with tcp->scno. + (internal_fork) [USE_PROCFS || !LINUX]: Likewise. + * syscall.c: Do not define NR_SYSCALL_BASE. + (known_scno): Remove. + (syscall_fixup_on_sysenter) [USE_PROCFS]: Replace known_scno(tcp) + with tcp->scno. + (trace_syscall_entering) [SVR4 || FREEBSD || SUNOS4]: Likewise. + (syscall_fixup_on_sysexit) [SUNOS4]: Likewise. + + Remove initialization of native_scno field. + * linux/i386/syscallent.h: Remove native_scno initialization for clone, + fork and vfork. + * linux/ia64/syscallent.h (sys_fork, sys_vfork): Remove redirections + to printargs. + * linux/syscall.h [IA64]: Do not define SYS_fork and SYS_vfork. + * util.c (printcall) [IA64]: Likewise. + (setbpt): Use sys_func to check for clone, fork and vfork syscalls. + + Do not use SYS_ipc and SYS_socketcall. + * linux/dummy.h (sys_ipc, sys_socketcall): Remove redirections to + printargs. + * linux/ia64/syscallent.h: Likewise. + * linux/i386/syscallent.h: Remove native_scno initialization for "ipc" + and "socketcall". + * linux/syscall.h (sys_ipc, sys_socketcall): New prototypes. + (SYS_ipc, SYS_socketcall): Remove no longer used constants. + [IA64]: Remove undefining of ipc and socket SYS_* constants. + [SPARC || SPARC64]: Remove unused ipc SYS_* constants. + * ipc.c (sys_ipc): New function. + * sock.c (sys_socketcall): Likewise. + * syscall.c (trace_syscall_entering): Use sys_func to check for ipc and + socket subcalls. + +2012-02-20 Dmitry V. Levin + + Remove initialization of native_scno field for most of syscalls. + The native_scno field is not so much used in the code than before. + In many cases sys_func is checked instead, and for most of syscall + entries there is no need to initialize native_scno. + + * linux/i386/syscallent.h: Remove native_scno initialization for + _exit, read, write, waitpid, execve, wait4, sysfs, readv, writev, + pread64, pwrite64, exit_group, waitid, send, recv, sendto and + recvfrom syscall entries. + * linux/syscall.h: Do not define no longer used SYS_waitid and + SYS_sub_* constants. + [IA64]: Do not define SYS_waitpid and SYS32_* constants. + * defs.h: Do not define no longer used __NR_exit_group constant. + * strace.c [USE_PROCFS] (proc_open): Use sys_func to check for execve. + +2012-02-14 Mike Frysinger + + util: check for process_vm_readv in C library. + glibc-2.15 provides process_vm_readv, so trying to provide it ourselves + with that version fails. + + * configure.ac (AC_CHECK_FUNCS): Add process_vm_readv. + * util.c: Handle HAVE_PROCESS_VM_READV. + +2012-02-09 Denys Vlasenko + + README-linux-ptrace: correct the description of suppressed signals. + +2012-02-06 Dmitry V. Levin + + strace -P: fix handling of invalid syscalls. + * pathtrace.c (pathtrace_match): Check the given syscall number using + SCNO_IN_RANGE. + +2012-02-06 H.J. Lu + + Skip the syscall entry if the sys_func field is NULL. + Avoid NULL dereference when there are holes in sysent tables. + It can happen with syscall (number, ...) and number is in those holes. + There are no targets with holey systent tables so far, but at least + one such a target, x32, is already on the horizon. + + * defs.h (SCNO_IN_RANGE): Also check the sys_func field. + +2012-02-06 H.J. Lu + + Define RLIM64_INFINITY only if not defined. + * resource.c (RLIM64_INFINITY): Define only if it isn't defined. + +2012-02-06 H.J. Lu + + Cast to long for %l in printf. + Cast a value to long for %l in printf to avoid compiler warning + on systems where it may be long long. + + * count.c (call_summary_pers): Cast to long. + * ipc.c (sys_mq_open, printmqattr): Likewise. + * quota.c (decode_cmd_data): Likewise. + * resource.c (sys_sysinfo): Likewise. + * time.c (tprint_timex): Likewise. + +2012-02-06 H.J. Lu + + Check HAVE_LONG_LONG_OFF_T when printing offset. + When HAVE_LONG_LONG_OFF_T is defined, we need to use %llu to print + offset. + + * io.c (sys_sendfile): Check HAVE_LONG_LONG_OFF_T when printing + offset. + +2012-02-06 H.J. Lu + + Define old stat functions only if needed. + When HAVE_LONG_LONG_OFF_T is defined, those old stat functions aren't + used and strace won't link since they use realprintstat which isn't + defined when HAVE_LONG_LONG_OFF_T is defined. + + * file.c (convertoldstat, sys_oldstat, sys_oldfstat, sys_oldlstat): + Define only if HAVE_LONG_LONG_OFF_T isn't defined. + +2012-02-06 H.J. Lu + + Print NULL for zero address in sys_mmap64. + * mem.c (sys_mmap64): Print NULL for zero address so that it is + consistent with sys_mmap. + +2012-02-04 Dmitry V. Levin + + Remove unused sys_pread64 and sys_pwrite64 parsers on Linux. + * io.c [HAVE_LONG_LONG_OFF_T]: Remove sys_pread64 and sys_pwrite64 + aliases. + (sys_pread64, sys_pwrite64): Define these functions only on + [SVR4 && _LFS64_LARGEFILE] platform. + * linux/mips/syscallent.h: Use sys_pread and sys_pwrite to handle + appropriate syscalls. + * linux/syscall.h (sys_pread64, sys_pwrite64): Remove. + * syscall.c (dumpio): Check sys_pread64 and sys_pwrite64 only on + [SVR4 && _LFS64_LARGEFILE] platform. + +2012-02-03 Denys Vlasenko + + Trivial changes to help text. No code changes. + * strace.c (usage): Tweak help text: remove unpaired closing brackets, + make -V and -h sit on separate lines (hard to see them otherwise). + +2012-01-29 Denys Vlasenko + + Simple optimizations. + text data bss dec hex filename + 239474 672 20484 260630 3fa16 strace.before + 239234 668 19044 258946 3f382 strace + + * file.c (sprint_open_modes): Reduce static buffer size. + Simplify separator printing. + * signal.c (sprintsigmask): Reduce static buffer size. + Simplify separator printing and printing of almost full masks. + Use stpcpy instead of sprintf and strcpy+strlen. + * strace.c (startup_child): Don't strchr() for ':' twice in a row. + * util.c (sprintflags): Exit loop early if possible. + +2012-01-29 Denys Vlasenko + + Trivial optimization. + * strace.c (cleanup): Read 'interrupted' volatile variable only once. + +2012-01-29 Denys Vlasenko + + Make interactive-ness directly controllable via command line option. + Defaults are often ok, but when they are not, people get confused. + "Why can't I kill strace?" and "Why strace dies on ^C when I want + to _tracee_ to die instead?" are typical complaints. + + * strace.c: Replace 'interactive' variable with 'opt_intr' variable. + Define INTR_foo constants for its possible values. + Define 'interactive' as a macro. + (usage): Document -I n option. + (main): Parse -I n option, modify signal handling to accomidate new + -I 1 and -I 4 modes. + +2012-01-29 Denys Vlasenko + + Suppress compiler warning. + * strace.c (trace): Frame potentially unused label with ifdef/endif. + + On Ctrl-C induced detach, send SIGINT to child tracee, not SIGTERM. + * strace.c (interrupt): Remember signal number. + (cleanup): If we exiting due to signal, send that signal to child tracee. + +2012-01-29 Denys Vlasenko + + Add experimental code to use PTRACE_SEIZE, disabled by default. + All new code is predicated on "ifdef USE_SEIZE". If it is not defined, + behavior is not changed. + + If USE_SEIZE is enabled and run-time check shows that PTRACE_SEIZE works, then: + - All attaching is done with PTRACE_SEIZE + PTRACE_INTERRUPT. + This means that we no longer generate (and possibly race with) SIGSTOP. + - PTRACE_EVENT_STOP will be generated if tracee is group-stopped. + When we detect it, we issue PTRACE_LISTEN instead of PTRACE_SYSCALL. + This leaves tracee stopped. This fixes the inability to SIGSTOP or ^Z + a straced process. + + * defs.h: Add commented-out "define USE_SEIZE 1" and define PTRACE_SEIZE + and related constants. + * strace.c: New variable post_attach_sigstop shows whether we age going + to expect SIGSTOP on attach (IOW: are we going to use PTRACE_SEIZE). + (ptrace_attach_or_seize): New function. Uses PTRACE_ATTACH or + PTRACE_SEIZE + PTRACE_INTERRUPT to attach to given pid. + (startup_attach): Use ptrace_attach_or_seize() instead of ptrace(PTRACE_ATTACH). + (startup_child): Conditionally use alternative attach method using PTRACE_SEIZE. + (test_ptrace_setoptions_followfork): More robust parameters to PTRACE_TRACEME. + (test_ptrace_seize): New function to test whether PTRACE_SEIZE works. + (main): Call test_ptrace_seize() while initializing. + (trace): If PTRACE_EVENT_STOP is seen, restart using PTRACE_LISTEN in order + to not let tracee run. + * process.c: Decode PTRACE_SEIZE, PTRACE_INTERRUPT, PTRACE_LISTEN. + * util.c (ptrace_restart): Add "LISTEN" to a possible error message. + +2012-01-28 Denys Vlasenko + + process_vm_readv gets EINVAL if process is gone (SIGKILLed). Don't complain. + * util.c (umoven): Don't complain on EINVAL from process_vm_readv. + (umovestr): Likewise. + + Revert last change. Add a comment to prevent further misunderstanding. + * time.c (sys_nanosleep): Display remaining time only on interrupt. + + Fix nanosleep decoding: second argument was not shown after success. + * time.c (sys_nanosleep): Fix bug - inverted is_restart_error() check. + * syscall.c (is_restart_error): Remove redundant check. + +2012-01-28 Denys Vlasenko + + Use process_vm_readv instead of PTRACE_PEEKDATA to read data blocks. + Currently, we use PTRACE_PEEKDATA to read things like filenames and + data passed by I/O syscalls. + PTRACE_PEEKDATA gets one word per syscall. This is VERY expensive. + For example, in order to print fstat syscall, we need to perform + more than twenty trips into kernel to fetch one struct stat! + + Kernel 3.2 got a new syscall, process_vm_readv(), which can be used to + copy data blocks out of process' address space. + + This change uses it in umoven() and umovestr() functions if possible, + with fallback to old method if process_vm_readv() fails. + If it returns ENOSYS, we don't try to use it anymore, eliminating + overhead of trying it on older kernels. + + Result of "time strace -oLOG ls -l /usr/lib >/dev/null": + before patch: 0.372s + After patch: 0.262s + + * util.c (process_vm_readv): Wrapper to call process_vm_readv syscall. + (umoven): Use process_vm_readv for block reads of tracee memory. + (umovestr): Likewise. + * linux/syscall.h: Declare new function sys_process_vm_readv. + * process.c (sys_process_vm_readv): Decoder for new syscall. + * linux/i386/syscallent.h: Add process_vm_readv, process_vm_writev syscalls. + * linux/x86_64/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + +2012-01-28 Denys Vlasenko + + Fix a case of broken output if last seen syscall was exit. + * defs.h: Rename tcp_last to printing_tcp. Explain what it means. + Remove printtrailer() function. + * process.c (sys_exit): Convert printtrailer() call to "printing_tcp = NULL". + * strace.c: Add new variable printing_tcp. + (cleanup): Convert printtrailer() call to "printing_tcp = NULL". + (trace): Likewise. + (trace): Fix checks for incomplete line - it was working wrongly if last syscall was exit. + (printleader): Set printing_tcp. + (printtrailer): Remove this function. + * syscall.c: Remove tcp_last variable. + (trace_syscall_entering): Don't set printing_tcp, printleader call now does it. + (trace_syscall_exiting): Convert printtrailer() call to "printing_tcp = NULL". + +2012-01-28 Denys Vlasenko + + Fix handling of test/threaded_execve.c testcase. + Since 3.0, Linux has a way to identify which thread execve'ed. + This patch makes use of it in order to properly dispose + of disappeared ("superseded") thread leader, + and replace it with execve'ed thread. + + Before this patch, strace was "leaking" thread which exec'ed. + It was thinking that it still runs. It would look like this: + + 18460 pause( <=== thread leader + 18466 execve("/proc/self/exe", ["exe", "exe"], [/* 47 vars */] + 18465 +++ exited with 0 +++ <=== exits from other threads + 18460 <... pause resumed> ) = 0 + + The last line is wrong: it's not pause resumed, it's execve resumed. + If thread leader would do exit instead of pause, it is much worse: + strace panics because it thinks it sees return from exit syscall! + + And strace isn't aware 18466 (exec'ed thread) is gone. + It still thinks it's executes execve syscall. + + * strace.c: New variable "static char *os_release". + (get_os_release): New static function. + (main): Call get_os_release to retrieve Linux version. + (trace): If we see PTRACE_EVENT_EXEC, retrieve old pid, and if it + differs from new one, free one of tcbs and print correct messages. + +2012-01-27 Denys Vlasenko + + Fix readlink result display - was printing bogus "..." semi-randomly. + * file.c (decode_readlink): Use printstr() instead of printpathn(). + + Add new test program: test/threaded_execve.c. + + Make pid2tcb static. + * defs.h: Remove pid2tcb declaration. + * strace.c (pid2tcb): Make this function static. + +2012-01-24 Denys Vlasenko + + Per Dmitry's request, remove paranoid check in verror_msg() + * strace.c (verror_msg): Remove redundant check for msg != NULL. + + More robust error check for vasprintf. + * strace.c (verror_msg): More robust error check for vasprintf. + +2012-01-24 Denys Vlasenko + + Slightly more compact handling of argv[] + text data bss dec hex filename + 238274 672 20484 259430 3f566 strace.before + 238226 672 20484 259382 3f536 strace + + * strace.c (main): Slightly more compact handling of argv[] + +2012-01-24 Denys Vlasenko + + Trivial optimization. + * strace.c: Set default interactive = 1 statically instead + of doing it in main(). + +2012-01-24 Denys Vlasenko + + Allocate -o OUTFILE buffer only if needed. + text data bss dec hex filename + 238258 668 28676 267602 41552 strace.before + 238274 668 20484 259426 3f562 strace + + * strace.c (main): Allocate -o OUTFILE buffer only if needed: + unused buffer in bss is not entirely free. + +2012-01-24 Denys Vlasenko + + Use single fprintf in verror_msg() + This change partially reverts commit 44d0532. + + In code before commit 44d0532, single fprintf was used on purpose: + we want to send entire message as one write() call. Since stderr + is unbuffered, separate fprintf's to it always result in separate + writes, they are not coalesced. If we aren't the only program + which writes to this particular stderr, this may result + in interleaved messages. + + Since this function is not performance critical, I guess + it's ok to make it less efficient. + + * strace.c (verror_msg): Attempt to print the message in single + write operation. Use separate fprintfs as a fallback if malloc fails. + +2012-01-21 Denys Vlasenko + + Improve code readability (logic is unchanged) + * util.c (umoven): Move assignment out of function call. Make assignment + to a flag variable later, closer to the place where it will be used. + (umovestr): Likewise. + (uload): Likewise. + +2012-01-20 Denys Vlasenko + + Change umovestr API: return > 0 instead of 0 if NUL was seen. + * pathtrace.c (upathmatch): Adjust umovestr return value check for new API. + * util.c (printpathn): Use umovestr() > 0 return value for more efficient + (and robust - we don't depend on "no overwrote past NUL" behavior anymore) + handling of terminating NUL. + (printstr): Remove useless NUL placement before umovestr() call. + Allocate 1 byte more to outstr[] array - for NUL. + (umovestr): Change to return 1 if NUL was seen. + + umovestr result may have no NUL, use "%.*s" instead of "%s" to print it. + * system.c (sys_mount): Be careful when printing umovestr result, + it may have no terminating NUL. + (sys_sysmips): Likewise. + +2012-01-20 Denys Vlasenko + + Eliminate code duplication in time printing, reduce a few static buffers + text data bss dec hex filename + 238454 664 28772 267890 41672 strace.before + 238106 664 28676 267446 414b6 strace + + * defs.h: Add TIMESPEC_TEXT_BUFSIZE and TIMEVAL_TEXT_BUFSIZE defines. + Add 'int special' parameter to sprinttv(). + * time.c (sprinttv): Add 'int special' parameter, and use it + similarly to 'int special' parameter of printtv_bitness(). + (printtv_bitness): Use sprinttv() instead of duplicating its code. + (print_timespec): Use sprint_timespec() instead of duplicating + its code. + * desc.c (decode_select): Use TIMEVAL_TEXT_BUFSIZE instead of 128 + when checking remaining buffer size. + * net.c (sys_recvmsg): Use TIMESPEC_TEXT_BUFSIZE instead of 128 + for static buffer size. + * stream.c (decode_poll): Use TIMESPEC_TEXT_BUFSIZE instead of 128 + when checking remaining buffer size. + +2012-01-19 Denys Vlasenko + + Reduce bss usage and speed up string printing. + text data bss dec hex filename + 237913 660 49284 287857 46471 strace.before + 237973 660 28772 267405 4148d strace + + This reduces L1 D-cache pressure a bit: instead of dirtying + 20k of bss, we will reuse already dirty stack area. + + * util.c (printpathn): Use on-stack buffers instead of static ones. + Saves 5*MAXPATHLEN in bss. + (printstr): Use tprints() instead of tprintf("%s") when printing + formatted string. May be a bit faster, depending on libc. + +2012-01-18 Andreas Schwab + + Add support for compat_statfs64. + * file.c (struct compat_statfs64, printcompat_statfs64): Define. + (sys_statfs64, sys_fstatfs64): Use it. + + Add support for statfs64.f_flags. + * file.c (printstatfs64): Print f_flags if available. + + Fix missing parens. + * signal.c (sys_sigreturn): Add missing parens. + +2012-01-18 Denys Vlasenko + + Get rid of TCB_SIGTRAPPED. + On attempts to block or set SIGTRAP handler, + for example, using sigaction syscall, we generate + an additional SIGSTOP. + + This change gets rid of this SIGSTOP sending/ignoring. + It appears to work just fine. + + It also works if I force strace to not use PTRACE_O_TRACESYSGOOD, + which means strace stops will be marked with SIGTRAP, + not (SIGTRAP | 0x80) - I wondered maybe that's when + this hack is needed. + + So, why we even have TCB_SIGTRAPPED? No one knows. It predates + version control: this code was present in the initial commit, + in 1999. No adequate comments, either. + + Moreover, TCB_SIGTRAPPED is not set in sys_rt_sigaction + and sys_sigprocmask syscalls - the ones which are most usually + used to implement signal blocking, it is only set in obsolete + sys_signal, sys_sigaction, sys_sigsetmask, and in some dead + non-Linux code. + + I think whatever bug it was fixing is gone long ago - + at least as long as sys_rt_sigaction is used by glibc. + Again, since glibc (and uclibc) uses sys_rt_sigaction + and sys_sigprocmask, modified code paths are not used + by most programs anyway. + + * defs.h: Remove definition of TCB_SIGTRAPPED. + * signal.c (sys_sigvec): Don't set TCB_SIGTRAPPED and don't send SIGSTOP. + (sys_sigsetmask): Likewise. + (sys_sigaction): Likewise. + (sys_signal): Likewise. + * strace.c (trace): Remove code which executes if TCB_SIGTRAPPED is set. + +2012-01-18 Denys Vlasenko + + When we write log, flush output buffers in a few more cases. + I observed a case when signal delivery message was buffered + by stdio until it was flushed along with the next syscall + entry message. + + * strace.c (trace): Flush output buffers in a few more cases. + +2012-01-18 Denys Vlasenko + + Fix old sigaction display. + * signal.c (sys_sigaction): Fix display of sigaction with + SIG_DFL/SIG_IGN handlers. + + Change x86_64_regs struct type from pt_regs to user_regs_struct. + * syscall.c: Change x86_64_regs struct type from + pt_regs to user_regs_struct, and explain the change in comment. + +2012-01-17 Dmitry V. Levin + + Fix struct pt_regs declaration on i386 and x86-64. + * defs.h [I386] (i386_regs): Replace definition with declaration. + [X86_64] (x86_64_regs): Remove. + * syscall.c [X86_64] (x86_64_regs): Make static. + +2012-01-12 Denys Vlasenko + + Make ERESTARTxyz messages more descriptive. + There is widespread confusion about exact meaning + of ERESTARTxyz codes. Before this change, we were showing + all four of them the same: as "(To be restarted)". + + This change prints better explanations for these codes, + and contains verbose comments which explain *why* we display + codes that way - or else someone confused + is bound to come later and mangle them again. + New messages are: + + ERESTARTSYS (To be restarted if SA_RESTART is set) + ERESTARTNOINTR (To be restarted) + ERESTARTNOHAND (Interrupted by signal) + ERESTART_RESTARTBLOCK (Interrupted by signal) + + * syscall.c (trace_syscall_exiting): Make ERESTARTxyz messages + more descriptive. + +2012-01-10 Denys Vlasenko + + Fix sigreturn arg count from 1 to 0 on all architectures. + * linux/alpha/syscallent.h: Change [rt_]sigreturn's arg count to 0. + * linux/arm/syscallent.h: Likewise. + * linux/avr32/syscallent.h: Likewise. + * linux/bfin/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + +2012-01-10 Denys Vlasenko + + Display mask on enter to sigreturn, not on exit. + sys_sigreturn() performs ugly manipulations in order to show + signal mask which is restored by this syscall: on syscall entry, + fetches it from the stack, saves it in tcp->u_arg[] + (where it used to overflow this array - fixed sometime ago), + then retrieves the mask and displays it on syscall exit. + + Apparently, the motivation is to make it slightly more obvious + to user that signal mask is restored only when this syscall returns. + IMO, this hardly justifies the necessary hacks. It is much easier + to display the mask at the point when we fetch it - on syscall entry. + + While at it, I made it so that we do display returned value/errno. + I see no point in hiding it and showing uninformative "= ?" instead. + + Example of pause() being interrupted by ALRM which has installed handler + which re-arms ALRM: + + Before the patch: + + rt_sigsuspend([INT]) = ? ERESTARTNOHAND (To be restarted) + --- {si_signo=SIGALRM, si_code=SI_KERNEL} (Alarm clock) --- + alarm(1) = 0 + sigreturn() = ? (mask now [INT]) + + After: + + rt_sigsuspend([INT]) = ? ERESTARTNOHAND (To be restarted) + --- {si_signo=SIGALRM, si_code=SI_KERNEL} (Alarm clock) --- + alarm(1) = 0 + sigreturn() (mask [INT]) = -1 EINTR (Interrupted system call) + + * defs.h: Declare struct pt_regs i386_regs and struct pt_regs x86_64_regs. + * syscall.c: Remove "static" keywork from these structures' definitions. + * signal.c (sys_sigreturn): Display mask on enter, not on exit. + +2012-01-04 Denys Vlasenko + + Do not detach from tracee which experienced ptrace error. + Before this patch, if a thread got nuked by exit in another thread + and we happened to poke it at the same time, we print "????(" thingy + and detach the thread. Since we removed "detach before death" logic, + this no longer matches the behavior of other threads. + Before patch: + [pid 1780] exit_group(1) = ? + [pid 1778] ????( + Process 1778 detached + [pid 5860] +++ exited with 1 +++ + After: + [pid 17765] exit_group(1) = ? + [pid 21680] ????( + [pid 17791] +++ exited with 1 +++ + [pid 21680] +++ exited with 1 +++ + + * strace (trace): Do not detach from tracee which experienced ptrace error. + +2012-01-04 Denys Vlasenko + + Remove sig parameter from detach() + * strace.c (detach): Drop sig parameter - it is zero in all calls. + (cleanup): Don't pass sig = 0 to detach() call. + (detach): Ditto. + +2011-12-26 Dmitry V. Levin + + Enhance decoding for personalities with small wordsize. + * util.c (umoven, umovestr) [SUPPORTED_PERSONALITIES > 1]: If current + personality's wordsize is less than sizeof(long), use only significant + bits of the given address. + +2011-12-23 Dmitry V. Levin + + Enhance personality switching. + On syscall entry, save current personality in the tcb structure + along with scno. + On syscall exit, restore current personality from the tcb structure. + * defs.h (struct tcb) [SUPPORTED_PERSONALITIES > 1]: Add currpers + field. + * strace.c (alloc_tcb) [SUPPORTED_PERSONALITIES > 1]: Initialize + tcp->currpers. + * syscall.c (update_personality) [SUPPORTED_PERSONALITIES > 1]: New + function. + (get_scno, trace_syscall_exiting): Use it. + + Reported-by: Michael A Fetterman + +2011-12-01 Dmitry V. Levin + + * net.c (socktcpoptions): Add more TCP_* constants from linux/tcp.h. + Reported-by: Rick Jones + +2011-12-01 Heiko Carstens + + Fix sys_ipc/sys_semtimedop decoding on s390. + The s390 kernel sys_ipc system call only takes five arguments instead of + six arguments which the common code sys_ipc implementation takes. + One of the arguments of the sys_semtimedop subcall is therefore passed in + a different register than in the common code implementation. + This leads to broken decoding of the timespec argument: + + semtimedop(0, 0x3ffffb43832, 1, {...}) = -1 EAGAIN + + Fixed it looks like this: + + semtimedop(0, 0x3ffffc2c842, 1, {0, 10000000}) = -1 EINTR + + * linux/ipc.c (sys_semtimedop): Fix timespec decoding on s390. + +2011-11-29 Dmitry V. Levin + + strace.c (trace): Fix compilation warning. + +2011-11-28 Dmitry V. Levin + + linux/syscall.h: Remove redundant function declarations. + Remove 51 function declarations aliased to other declarations in + linux/dummy.h file. + + linux/syscall.h: Sort function declarations. + + linux/syscall.h: Place one function declaration per line. + + Remove redundant parsers. + * desc.c (sys_dup): Remove. + * file.c (sys_pivotroot, sys_rmdir, sys_fchdir, sys_chroot, sys_fchroot, + sys_unlink, sys_symlink, sys_rename): Remove. + * linux/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_pivotroot, + sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove. + * linux/dummy.h: Add aliases for sys_chroot, sys_dup, sys_pivotroot, + sys_rename, sys_rmdir, sys_symlink, sys_unlink. + * pathtrace.c (pathtrace_match): Update. + * sunos4/dummy.h: Add aliases for sys_chroot, sys_dup, sys_fchdir, + sys_fchroot, sys_rename, sys_rmdir, sys_symlink, sys_unlink. + * svr4/dummy.h: Likewise. + * sunos4/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_fchroot, + sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove. + * svr4/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_fchroot, + sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove. + + Reflect the fact that nfsservctl syscall was removed from linux kernels. + linux/dummy.h: Move nfsservctl to "unimplemented" section. + +2011-11-27 Dmitry V. Levin + + x86_64: add getcpu syscall entry. + * linux/x86_64/syscallent.h: Add syscall entry for getcpu. + +2011-11-26 Dmitry V. Levin + + Add syscall entries for new linux syscalls. + * linux/dummy.h: Add printargs parsers for new syscalls. + * linux/arm/syscallent.h: Add entries for sys_clock_adjtime, + sys_name_to_handle_at, sys_open_by_handle_at, sys_sendmmsg, sys_setns + and sys_syncfs. + * linux/i386/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/alpha/syscallent.h: Add entries for sys_clock_adjtime, + sys_name_to_handle_at, sys_open_by_handle_at, sys_setns and sys_syncfs. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/avr32/syscallent.h: Add entry for sys_setns. + * linux/bfin/syscallent.h: Add entries for sys_sendmmsg and sys_setns. + * linux/hppa/syscallent.h: Add entries for sys_clock_adjtime, + fanotify_init, fanotify_mark, sys_name_to_handle_at, + sys_open_by_handle_at, sys_sendmmsg, sys_setns and sys_syncfs. + + Fix prctl syscall entries. + * linux/mips/syscallent.h: Fix prctl handler. + * linux/tile/syscallent.h: Likewise. + + arm: fix io_* syscall entries. + * linux/arm/syscallent.h: Fix handlers for io_setup, io_destroy, + io_getevents, io_submit and io_cancel. + + Fix mincore syscall entries. + * linux/arm/syscallent.h: Fix mincore handler. + * linux/avr32/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + +2011-11-25 Dmitry V. Levin + + Fix sendmsg syscall entries. + * linux/arm/syscallent.h: Fix number of sendmsg arguments. + * linux/avr32/syscallent.h: Likewise. + * linux/bfin/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + + Fix epoll_wait syscall entries. + * linux/arm/syscallent.h: Fix epoll_wait flags and handler. + * linux/m68k/syscallent.h: Fix epoll_wait flags. + * linux/microblaze/syscallent.h: Fix number of epoll_wait arguments. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + + Fix epoll_ctl syscall entries. + * linux/arm/syscallent.h: Fix epoll_ctl flags and handler. + * linux/m68k/syscallent.h: Fix epoll_ctl flags. + * linux/x86_64/syscallent.h: Fix number of epoll_ctl arguments. + + arm: fix epoll_create syscall entry. + * linux/arm/syscallent.h: Fix epoll_create handler. + + Fix mlockall syscall entries. + * linux/arm/syscallent.h: Fix number of mlockall arguments. + * linux/avr32/syscallent.h: Likewise. + * linux/bfin/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + + Fix epoll_pwait syscall entries. + * linux/alpha/syscallent.h: Fix number of epoll_pwait arguments. + * linux/arm/syscallent.h: Likewise. + * linux/avr32/syscallent.h: Likewise. + * linux/bfin/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + + Fix reboot syscall entries. + * linux/alpha/syscallent.h: Fix number of reboot arguments. + * linux/arm/syscallent.h: Likewise. + * linux/avr32/syscallent.h: Likewise. + * linux/bfin/syscallent.h: Likewise. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + + Fix swapon syscall entries. + * linux/arm/syscallent.h: Fix number of swapon arguments. + * linux/avr32/syscallent.h: Likewise. + * linux/bfin/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/alpha/syscallent.h: Fix number of swapon arguments, add TF flag. + * linux/hppa/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + + Fix sgetmask and ssetmask syscall entries. + * linux/hppa/syscallent.h: Fix sgetmask and ssetmask entries. + * linux/powerpc/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/tile/syscallent.h: Likewise. + + Rename siggetmask to sgetmask and sigsetmask to ssetmask. + * linux/arm/syscallent.h: Rename siggetmask to sgetmask and + sigsetmask to ssetmask. + * linux/bfin/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Rename sys_sgetmask to sys_siggetmask, + sys_ssetmask to sys_sigsetmask. + + Add TRACE_IPC flag to sys_ipc syscall entries. + * linux/arm/syscallent.h: Add TI flag to sys_ipc entry. + * linux/avr32/syscallent.h: Likewise. + * linux/bfin/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + +2011-11-05 Dmitry V. Levin + + gitlog-to-changelog: update from gnulib. + * gitlog-to-changelog: Update from gnulib. + * Makefile.am: Add --append-dot to gitlog-to-changelog invocation. + +2011-10-22 Denys Vlasenko + + Decode TIOCSCTTY's third parameter. + * term.c (term_ioctl): Decode TIOCSCTTY's third parameter. + +2011-10-14 Dmitry V. Levin + + Remove useless and obsolete "#if DONE" sections. No code changes. + * linux/dummy.h: Remove "#if DONE" section. + * linux/sparc/dummy2.h: Likewise. + * linux/sparc64/dummy2.h: Likewise. + * sunos4/dummy.h: Likewise. + * svr4/dummy.h: Likewise. + + Add names for dummy parsers. No code changes. + * linux/dummy.h: Add aliases to printargs() for those of dummy parsers + that had no own names before. + * linux/*/syscallent.h: Use these new names instead of printargs. + + Sort definitions of dummy parsers. No code changes. + * linux/dummy.h: Sort definitions of parsers implemented as aliases + to printargs(). + +2011-10-14 Mike Frysinger + + sys_epoll_create1: decode flag arguments correctly. + * desc.c (epollflags): Define. + (sys_epoll_create1): Use epollflags to printflags. Change "O" to "EPOLL". + + Reported-by: Марк Коренберг + +2011-10-11 Dmitry V. Levin + + Implement decoding of splice, tee and vmsplice(2) syscalls. + * io.c (print_loff_t): New function. + (sys_sendfile64): Use it. + (splice_flags): New xlat structure. + (sys_tee, sys_splice, sys_vmsplice): New functions. + * linux/syscall.h (sys_tee, sys_splice, sys_vmsplice): Declare them. + * linux/*/syscallent.h: Use them. + +2011-10-11 Dmitry V. Levin + + Fix epoll_wait and epoll_pwait decoding. + * desc.c (epoll_wait_common): Print "maxevents" and "timeout" arguments + as integers. + + Reported-by: Марк Коренберг + +2011-10-11 Dmitry V. Levin + + Decode EPOLLRDHUP. + * desc.c (epollevents): Add EPOLLRDHUP. + + Reported-by: Марк Коренберг + +2011-10-11 Dmitry V. Levin + + Remove unreachable code in umoven() and umovestr(). + * util.c (umoven, umovestr): Remove unreachable code. + + Reported-by: Weichuan Yan + +2011-09-05 Denys Vlasenko + + Do post-attach initialization earlier; fix "we ignore SIGSTOP on NOMMU" bug + We set ptrace options when we see post-attach SIGSTOP. + This is wrong: it's better to set them right away on the very first + stop (whichever it will be). It also will make adding SEIZE support easier, + since SEIZE has no post-attach SIGSTOP. + + We do it by adding a new bit, TCB_IGNORE_ONE_SIGSTOP, and treating + TCB_STARTUP and TCB_IGNORE_ONE_SIGSTOP as two slightly different things. + + * defs.h: Add a new flag bit, TCB_IGNORE_ONE_SIGSTOP. + * process.c (internal_fork): Set TCB_IGNORE_ONE_SIGSTOP on a newly added child. + * strace.c (startup_attach): Set TCB_IGNORE_ONE_SIGSTOP after attach. + Fix a case when "strace -p PID" found PID dead but sone other of its threads + still alive. + (startup_child): Set TCB_IGNORE_ONE_SIGSTOP after attach, _if needed_. + This fixes a bogus case where we can ignore a _real_ SIGSTOP on NOMMU. + (detach): Perform anti-SIGSTOP dance only if TCB_IGNORE_ONE_SIGSTOP is set, + not if TCB_STARTUP is set. + (trace): Set TCB_IGNORE_ONE_SIGSTOP after attach. + Clear TCB_STARTUP and initialize tracee on the very first tracee stop. + Clear TCB_IGNORE_ONE_SIGSTOP when SIGSTOP is seen. + +2011-09-05 Denys Vlasenko + + Get rid of TCB_ATTACH_DONE. + * defs.h: Remove TCB_ATTACH_DONE constant. + * strace.c (startup_attach): Use TCB_STARTUP instead of TCB_ATTACH_DONE + to distinquish attached from not-yet-attached threads. + +2011-09-05 Denys Vlasenko + + Set TCB_STARTUP only _after_ we attached. + This fixes logic in detach() which thinks that TCB_STARTUP + means that we are already attached, but did not see SIGSTOP yet. + This also allows to get rid of TCB_ATTACH_DONE flag. + + * process.c (internal_fork): Set TCB_STARTUP after attach. + * strace.c (startup_attach): Likewise. + (startup_child): Likewise. + (alloc_tcb): Do not set TCB_STARTUP on tcb allocation - we are + not attached yet. + (trace): Set TCB_STARTUP when we detech an auto-attached child. + +2011-09-02 Denys Vlasenko + + Simple optimizations in trace() + * strace.c (trace): Calculate WSTOPSIG(status) once, + unify code paths to ptrace(PTRACE_SYSCALL). + + Trivial fixes on error paths. + * strace.c (startup_attach): Emit message on fork() failure. + (startup_child): Remove non-informative comment. + * util.c (ptrace_restart): use perror_msg() on error instead of fprintf(). + +2011-09-01 Denys Vlasenko + + Fix compile failure introduced by last commit. + * desc.c (decode_select): Fix double definition of nfds. + +2011-09-01 Denys Vlasenko + + Roll back "die on malloc failure" behaviour a bit. + After recent change, select(2^31-1, NULL, NULL, NULL) + would make strace exit. This change caps fdsize so that + it is always in [0, 1025*1024], IOW: we will try to allocate at most + 1 megabyte, which in practice will almost always work, + unlike malloc(2Gig). + + * desc.c (decode_select): Cap fdsize to 1024*1024. + * pathtrace.c (pathtrace_match): Cap fdsize to 1024*1024. + * file.c (sys_getdents): Cap len to 1024*1024. + (sys_getdents64): Cap len to 1024*1024. + * util.c (dumpiov): Refuse to process iov with more than 1024*1024 + elements. Don't die on malloc failure. + (dumpstr): Don't die on malloc failure. + +2011-09-01 Denys Vlasenko + + Add stpcpy to autoconf machinery. + * configure.ac: Add stpcpy to AC_CHECK_FUNCS. + * defs.h: Frame stpcpy with "if !defined HAVE_STPCPY". + * util.c: Likewise. + + Simplify sprinttv() + * time.c (sprinttv): Trivial simplifications. + + * desc.c (decode_select): Set tcp->auxstr as late as possible. + +2011-09-01 Denys Vlasenko + + Reformat setuid-ing code in startup_child() + New code does the same as old one, but is more readable (I hope). + + * strace.c (startup_child): Reformat setuid-ing code. + +2011-09-01 Denys Vlasenko + + Minor tweaks in startup_child(). Logic isn't changed (but code is) + * strace.c (startup_attach): Tweak comment. + (startup_child): Move common code out of ifdef. + Indent nested ifdefs. Tweak comments. Remove two + unnecessary calls to getpid(). + + Use tprints with literal strings, it may be faster than tprintf. + * bjm.c: Replace tprintf("str") with tprints("str"). + * block.c: Likewise. + * desc.c: Likewise. + * file.c: Likewise. + * io.c: Likewise. + * ipc.c: Likewise. + * mem.c: Likewise. + * net.c: Likewise. + * proc.c: Likewise. + * process.c: Likewise. + * quota.c: Likewise. + * resource.c: Likewise. + * scsi.c: Likewise. + * signal.c: Likewise. + * sock.c: Likewise. + * strace.c: Likewise. + * stream.c: Likewise. + * syscall.c: Likewise. + * system.c: Likewise. + * term.c: Likewise. + * time.c: Likewise. + * util.c: Likewise. + + Fix "format not a string literal" warning caused by tprintf(str) + * defs.h: Declare tprints(). + * strace.c: Define tprints(). + (tabto): Use tprints(str), since tprintf(str) was throwing a warning. + * desc.c: Use tprints(str) instead of tprintf("%s", str). + * file.c: Likewise. + * io.c: Likewise. + * net.c: Likewise. + * process.c: Likewise. + * signal.c: Likewise. + * syscall.c: Likewise. + * util.c: Likewise. + +2011-08-31 Denys Vlasenko + + Add README-linux-ptrace file. + I tried to push this doc to Michael Kerrisk , + but got no reply. To avoid losing the document, let it live + in strace tree for now. + +2011-08-31 Denys Vlasenko + + Make out-of-memory handling more uniform. + This fixes one real bug in dumpstr(). + + * defs.h: Declare die_out_of_memory(). + * strace.c (die_out_of_memory): New function. + (strace_popen): If allocation fails, call die_out_of_memory(). + (main): Likewise. + (expand_tcbtab): Likewise. + (rebuild_pollv): Likewise. + * count.c (count_syscall): Likewise. + (call_summary_pers): Likewise. + * desc.c (decode_select): Likewise. + * file.c (sys_getdents): Likewise. + (sys_getdents64): Likewise. + (sys_getdirentries): Likewise. + * pathtrace.c (pathtrace_match): Likewise. + * syscall.c (qualify): Likewise. + * util.c (printstr): Likewise. + (dumpiov): Likewise. + (dumpstr): Likewise. + (fixvfork): Likewise. + * mem.c (sys_mincore): Don't check free() parameter for NULL. + +2011-08-31 Denys Vlasenko + + Optimization: eliminate all remaining usages of strcat() + After this change, we don't use strcat() anywhere. + + * defs.h: Change sprinttv() return type to char *. + * time.c (sprinttv): Return pointer past last stored char. + * desc.c (decode_select): Change printing logic in order to eliminate + usage of strcat() - use stpcpy(), *outptr++ = ch, sprintf() instead. + Also reduce usage of strlen(). + * stream.c (decode_poll): Likewise. + +2011-08-31 Denys Vlasenko + + Optimize string_quote() for speed. + * util.c (string_quote): Speed up check for terminating NUL. + Replace strintf() with open-coded binary to hex/oct conversions - + we potentially do them for every single byte, need to be fast. + + Optimization: eliminate some usages of strcat() + * defs.h: Declare stpcpy(). + * util.c: Define stpcpy(). + * file.c: Remove static str_append(). + (sprint_open_modes): Use stpcpy() instead of str_append(). + (sprintflags): Use stpcpy() instead of strcat(). + (printpathn): Eliminate usage of strcat(). + (printstr): Eliminate usage of strcat(). + +2011-08-30 Denys Vlasenko + + Small optimization on AVR32. + * syscall.c (syscall_enter): Optimize tcp->u_arg[i] setting + from regs.FOO for AVR32. + +2011-08-30 Denys Vlasenko + + On X86_64 and I386, use PTRACE_GETREGS to fetch all registers. + Before this change, registers were read with PTRACE_PEEKUSER + ptrace operation, one per register. This is slower than + fetching them all in one ptrace operation. + + * defs.h: include asm/ptrace.h on X86_64 and I386. + * syscall.c: New static variables i386_regs and x86_64_regs. + Remove static eax/rax variables. + (get_scno): Fetch all registers with single PTRACE_GETREGS operation. + (get_syscall_result): Likewise. + (syscall_fixup_on_sysenter): Use PTRACE_GETREGS results in i386/x86_64_regs. + (syscall_enter): Set tcp->u_arg[i] from PTRACE_GETREGS results. + (get_error): Set tcp->u_rval, tcp->u_error from PTRACE_GETREGS results. + +2011-08-30 Dmitry V. Levin + + Do not include + * strace.c: Do not include explicitly, it is already included + implicitly by . + +2011-08-30 Dmitry V. Levin + + Include to get PATH_MAX definition. + * pathtrace.c: Include instead of to get + PATH_MAX definition. + + Reported-by: Steve Bennett + +2011-08-26 Denys Vlasenko + + Indent a large set of nested ifdefs/endifs. No code changes. + * defs.h: Indent a large set of nested ifdefs/endifs + + Rename syscall_fixup to syscall_fixup_on_sysenter. + * defs.h: Tweak comment. + * syscall.c: Rename syscall_fixup to syscall_fixup_on_sysenter. + (trace_syscall_entering): Use new finction name. + + Make syscall result reading more consistent among different arches. + * syscall.c: Eliminate static flags variable for POWERPC. + (syscall_fixup): Don't fetch syscall results. Affected arches: + POWERPC, BFIN, HPPA. + (syscall_fixup_on_sysexit): Move syscall results fetching code + for this function to get_syscall_result. Affected arches: + S390X, POWERPC, BFIN, M68K, HPPA, CRIS, MICROBLAZE. + (get_syscall_result): Add syscall results fetching. + +2011-08-25 Denys Vlasenko + + Simplify syscall_fixup[_on_sysexit] + * syscall.c (syscall_fixup): Remove checks for entering(tcp). + Remove code which executes if exiting(tcp). + (syscall_fixup_on_sysexit): Remove code which executes + if entering(tcp). Remove checks for exiting(tcp). + + Split syscall_fixup into enter/exit pair of functions. + * syscall.c: Create syscall_fixup_on_sysexit() which is a copy of + syscall_fixup(). + (trace_syscall_exiting): Call syscall_fixup_on_sysexit() instead of + syscall_fixup(). + + Remove stray commas in struct initializers. No code changes. + * process.c: Remove stray commas in struct initializers. + +2011-08-24 Denys Vlasenko + + Optimize tabto() + tabto is used in many lines of strace output. + On glibc, tprintf("%*s", col - curcol, "") is noticeably slow + compared to tprintf(" "). Use the latter. + Observed ~15% reduction of time spent in userspace. + + * defs.h: Drop extern declaration of acolumn. Make tabto() + take no parameters. + * process.c (sys_exit): Call tabto() with no parameters. + * syscall.c (trace_syscall_exiting): Call tabto() with no parameters. + * strace.c: Make acolumn static, add static char *acolumn_spaces. + (main): Allocate acolumn_spaces as a string of spaces. + (printleader): Call tabto() with no parameters. + (tabto): Use simpler method to print lots of spaces. + +2011-08-24 Denys Vlasenko + + * syscall.c (sys_indir): Use %ld for printing long, not %u. + +2011-08-24 Denys Vlasenko + + Opotimize "scno >= 0 && scno < nsyscalls" check. + gcc can't figure out on its own that this check can be done with + single compare, and does two compares. We can help it by casting + scno to unsigned long: ((unsigned long)(scno) < nsyscalls) + + * defs.h: New macro SCNO_IN_RANGE(long_var). + * count.c (count_syscall): Use SCNO_IN_RANGE() instead of open-coded check. + * syscall.c (getrval2): Use SCNO_IN_RANGE() instead of open-coded check. + This fixes a bug: missing check for scno < 0 and scno > nsyscalls + instead of scno >= nsyscalls. + (get_scno): Use SCNO_IN_RANGE() instead of open-coded check. + This fixes a bug: scno > nsyscalls instead of scno >= nsyscalls. + (known_scno): Use SCNO_IN_RANGE() instead of open-coded check. + (internal_syscall): Likewise. + (syscall_enter): Likewise. + (trace_syscall_entering): Likewise. + (get_error): Likewise. + (trace_syscall_exiting): Likewise. + +2011-08-24 Denys Vlasenko + + Remove scno_good logic in syscall exit. + * syscall.c (trace_syscall_exiting): Remove scno_good logic, + it can't trigger in syscall exit. + + Remove redundant assignments. + * syscall.c (get_error): Remove redundant "u_error = 0" and redundant + and unclear comments. + + Group int-sized fields together in struct tcb. + * defs.h: Group int-sized fields together in struct tcb. + +2011-08-24 Denys Vlasenko + + Reorder functions in syscall.c. No code changes. + Old order (basically "in no particular order"): + dumpio + decode_subcall + internal_syscall + get_scno + get_syscall_result + known_scno + syscall_fixup + is_negated_errno + get_error + syscall_enter + trace_syscall_entering + trace_syscall_exiting + trace_syscall + printargs + getrval2 + sys_indir + is_restart_error + + New order: + various utility functions: + decode_subcall + printargs + getrval2 + sys_indir + is_restart_error + syscall enter handling functions: + get_scno + known_scno + syscall_fixup (also used in syscall exit code) + internal_syscall (also used in syscall exit code) + syscall_enter + trace_syscall_entering + syscall exit handling functions: + get_syscall_result + is_negated_errno + get_error + dumpio + trace_syscall_exiting + main syscall enter/exit function: + trace_syscall + + * syscall.c: Reorder functions so that related ones are closer + in the source. + +2011-08-24 Denys Vlasenko + + Rename some functions, delete unused one. No code changes. + * defs.h: Rename get_scno_on_sysenter() to get_scno(); + delete force_result() declaration. + * strace.c (proc_open): Rename get_scno_on_sysenter() to get_scno(). + * syscall.c: Rename get_scno_on_sysenter() to get_scno(). + Rename get_scno_on_sysexit() to get_syscall_result(). + Delete unused force_result(). + +2011-08-24 Denys Vlasenko + + Unify per-architecture post-execve SIGTRAP check. + Move post-execve SIGTRAP check from get_scno_on_sysenter + (multitude of places on many architectures) to a single location + in trace_syscall_entering. This loosens the logic for some arches, + since many of them had additional checks such as scno == 0. + However, on non-ancient Linux kernels we should never have post-execve + SIGTRAP in the first place, by virtue of using PTRACE_O_TRACEEXEC. + + * syscall.c (get_scno_on_sysenter): Remove tcp->flags & TCB_WAITEXECVE checks. + (trace_syscall_entering): Do tcp->flags & TCB_WAITEXECVE check here. + (get_scno_on_sysexit): Tweak comment. + (syscall_fixup): Likewise. + (trace_syscall_exiting): Likewise. + +2011-08-24 Denys Vlasenko + + Speed up x86 by avoiding EAX read on syscall entry. + on x86, EAX read on syscall entry is not necessary if we know + that post-execve SIGTRAP is disabled by PTRACE_O_TRACEEXEC ptrace option. + This patch (a) moves EAX retrieval from syscall_fixup + to get_scno_on_sysexit, and (b) perform EAX retrieval in syscall_fixup + only if we are in syscall entry and PTRACE_O_TRACEEXEC option is not on. + + * syscall.c (get_scno_on_sysexit): On I386 and X86_64, read eax/rax + which contain syscall return value. + (syscall_fixup): On I386 and X86_64, read eax/rax only on syscall enter + and only if PTRACE_O_TRACEEXEC is not in effect. + +2011-08-24 Denys Vlasenko + + Do not read syscall no in get_scno_on_sysexit. + * syscall.c (get_scno_on_sysexit): Remove scno retrieval code, since + we don't save it anyway. This is the first real logic change + which should make strace faster: for example, on x64 ORIG_EAX + is no longer read in each syscall exit. + + Simplify get_scno_on_sysenter/sysexit. + * syscall.c (get_scno_on_sysenter): Remove "if (exiting(tcp))" code, + make "if (entering(tcp))" code unconditional. + (get_scno_on_sysexit): Remove "if (entering(tcp))" code, + make "if (exiting(tcp))" code unconditional. + +2011-08-24 Denys Vlasenko + + get_scno is an unholy mess, make it less horrible. + Currently, get_scno does *much* more than "get syscall no". + It checks for post-execve SIGTRAP. It checks for changes + in personality. It retrieves params on entry and registers on exit. + Worse still, it is different in different architectures: for example, + for AVR32 regs are fetched in get_scno(), while for e.g. I386 + it is done in syscall_enter(). + + Another problem is that get_scno() is called on both syscall entry and + syscall exit, which is stupid: we don't need to know scno on syscall + exit, it is already known from last syscall entry and stored in + tcp->scno! In essence, get_scno() does two completely different things + on syscall entry and on exit, they are just mixed into one bottle, like + shampoo and conditioner. + + The following patches will try to improve this situation. + + This change duplicates get_scno into identical get_scno_on_sysenter, + get_scno_on_sysexit functions. Call them in syscall enter and syscall + exit, correspondingly. + + * defs.h: Rename get_scno to get_scno_on_sysenter; declare it only + if USE_PROCFS. + * strace.c (proc_open): Call get_scno_on_sysenter instead of get_scno. + * syscall.c (get_scno): Split into two (so far identical) functions + get_scno_on_sysenter and get_scno_on_sysexit. + (trace_syscall_entering): Call get_scno_on_sysenter instead of get_scno. + (trace_syscall_exiting): Call get_scno_on_sysexit instead of get_scno. + +2011-08-23 Dmitry V. Levin + + Reduce code redundancy in syscall_enter() + * syscall.c [LINUX] (syscall_enter): Move tcp->u_nargs initialization + from arch-specific ifdefs to common code. Always cache tcp->u_nargs in + a local variable and use it in for() loops. + [IA64, AVR32] Rewrite tcp->u_arg[] initialization using a loop. + +2011-08-23 Denys Vlasenko + + Define MAX_ARGS to 6 for all Linux arches. + * defs.h: Define MAX_ARGS to 6 for all Linux arches. + * linux/ia64/syscallent.h: Change all 8-argument printargs + to MA (MAX_ARGS). + linux/mips/syscallent.h: Change all two 7-argument printargs + to MA (MAX_ARGS). + + Fix argument printing in sys_mmap64. + * mem.c (sys_mmap64): Fix a bug where we used tcp->u_args[i] + instead of argument values copied from memory. + +2011-08-23 Denys Vlasenko + + Cache tcp->u_nargs in a local variable for for() loops. + Loops of the form "for (i = 0; i < tcp->u_nargs; i++) ..." + need to fetch tcp->u_nargs from memory on every iteration + if "..." part has a function call (gcc doesn't know that + tcp->u_nargs won't change). This can be sped up + by putting tcp->u_nargs in a local variable, which might + go into a CPU register. + + * syscall.c (decode_subcall): Cache tcp->u_nargs in a local variable + as for() loop limit value. + (syscall_enter): Likewise. + +2011-08-23 Denys Vlasenko + + Drop checks for sysent[i].nargs == -1. + * defs.h: Declare nsyscalls, nerrnos, nioctlents, nsignals as unsigned. + * syscall.c: Define nsyscalls, nerrnos, nioctlents, nsignals as unsigned. + (decode_subcall): Drop checks for sysent[i].nargs == -1. + (syscall_enter): Likewise. + +2011-08-23 Denys Vlasenko + + Stop using nargs == -1 in syscallent tables. + Usage -1 as argument count in syscallent tables + necessitates the check for it, a-la: + if (sysent[tcp->scno].nargs != -1) + tcp->u_nargs = sysent[tcp->scno].nargs; + else + tcp->u_nargs = MAX_ARGS; + which is stupid: we waste cycles checking something which + is constant and known at compile time. + + * defs.h: Make struct sysent::nargs unsigned. + * freebsd/i386/syscallent.h: Replace nargs of -1 with MA. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * svr4/syscallent.h: Likewise. + * freebsd/syscalls.pl: Likewise in generator script. + * syscallent.sh: Likewise in generator script. + * syscall.c: Add define MA MAX_ARGS / undef MA around includes + of syscallent[N].h. + +2011-08-23 Denys Vlasenko + + Move trace_syscall_exiting below trace_syscall_entering. No code changes. + Syscall enter happens before syscall exit. Having functions + in opposite order in the source is confusing. + + * syscall.c: Move trace_syscall_exiting below trace_syscall_entering. + +2011-08-23 Denys Vlasenko + + Fix -z display. + Before this patch, the following: + open("qwerty", O_RDONLY) = -1 ENOENT + write(2, "wc: qwerty: No such file or dire"..., 38) = 38 + was shown totally wrongly with -z: + open("qwerty", O_RDONLY) = 38 + (yes, that's right, write syscall is lost!) + Now it is shown "less wrongly" as: + open("qwerty", O_RDONLY + write(2, "wc: qwerty: No such file or dire"..., 38) = 38 + + * syscall.c (trace_syscall_exiting): Use common TCB_INSYSCALL clearing + via "goto ret". This fixes totally broken display of -z, but even now + it is not working as intended. Add a comment about that. + (trace_syscall_entering): Use common TCB_INSYSCALL setting + via "goto ret". + +2011-08-23 Denys Vlasenko + + Straighten up confused comments/messages about post-execve SIGTRAP handling + * defs.h: Explain TCB_INSYSCALL and TCB_WAITEXECVE bits in detail. + * strace.c (choose_pfd): Use entering/exiting macros instead of direct check + for TCB_INSYSCALL. + * syscall.c (get_scno): Use entering/exiting macros instead of direct check + for TCB_INSYSCALL. Fix comments about post-execve SIGTRAP. + (syscall_fixup): Use entering/exiting instead of direct check + for TCB_INSYSCALL. Add a comment what "not a syscall entry" message + usually means. Change wrong "stray syscall exit" messages into + "not a syscall entry" ones. + + count_syscall() always returns 0, optimize it. + * defs.h (count_syscall): Change return type from int to void. + * count.c (count_syscall): Change return type from int to void. + * syscall.c (trace_syscall_exiting): Change code around call + to count_syscall accordingly. + + Optimize out dummy PC printing on signal delivery. + * strace.c (trace): Optimize out dummy PC printing on signal delivery. + While at it, tweak comments. + + Conditionally optimize out unused code. + * syscall.c (internal_syscall): Call internal_exec only if + SUNOS4 || (LINUX && TCB_WAITEXECVE). + * process.c (internal_exec): Define this function only if + SUNOS4 || (LINUX && TCB_WAITEXECVE). + (printwaitn): Don't check wordsize if SUPPORTED_PERSONALITIES == 1. + * signal.c (sys_kill): Likewise. + * syscall.c (is_negated_errno): Likewise. + (trace_syscall_exiting): Fold a tprintf into tprintfs which follow it. + + Cosmetic improvement in ifdefs. No code changes. + * strace.c (proc_open): Change ifdefs so that braces are properly paired. + + Exclude tcp->pfd from non-procfs systems. + * defs.h: Make struct tcb::pfd fields conditional on USE_PROCFS. + * strace.c (alloc_tcb): Use tcp->pfd only if USE_PROCFS. + (droptcb): Likewise. + + Small optimizations related to memory allocation. + * strace (expand_tcbtab): Shorten "out of memory" message. + (rebuild_pollv): Remove unnecessary NULL check before free(). + * util.c (dumpstr): Add a comment about likely bug. + + Improve code readability by avoiding assignments inside if() + * desc.c (decode_select): Move assignment out of if() condition. + * file.c (sprinttime): Likewise. + (sys_getdirentries): Likewise. + * io.c (sys_ioctl): Likewise. + * strace.c (test_ptrace_setoptions_followfork): Likewise. + (main): Likewise. + (proc_open): Likewise. + (detach): Likewise. + (proc_poll): Likewise. + (trace): Likewise. + * syscall.c (qualify): Likewise. + (sys_indir): Likewise. + * test/procpollable.c (main): Likewise. + * test/sfd.c (main): Likewise. + * time.c (printtv_bitness): Likewise. + (sprinttv): Likewise. + (print_timespec): Likewise. + (void sprint_timespec): Likewise. + (printitv_bitness): Likewise. + * util.c (dumpstr): Likewise. + (umovestr): Likewise. + (fixvfork): Likewise. + + Convert ioctl_next_match() to new-style C function definition. + * ioctl.c (ioctl_next_match): Convert to new-style C function definition. + +2011-08-23 Denys Vlasenko + + Small optimization in signal and ioctl tables. + Trivial shuffling of data tables puts them all in one file, + allowing gcc to see their sizes and eliminate variables + which store these sizes. + + Surprisingly, in C mode gcc does not optimize out static const int + variables. Help it by using enums instead. + + * defs.h: Stop exporting ioctlent{0,1,2}, nioctlents{0,1,2}, + signalent{0,1,2}, nsignals{0,1,2}. + * ioctl.c: Remove definitions of ioctlent{,0,1,2} and nioctlents{,0,1,2}. + * signal.c: Remove definitions of signalent{,0,1,2} and nsignals{,0,1,2}. + * syscall.c: Move above definitions to this file. Make them static const + or enums if suitable. + +2011-08-23 Denys Vlasenko + + Don't return int from set_personality(), no one checks it. + * defs.h (set_personality): Change return type to void. + * syscall.c (set_personality): Change return type to void. + + Remove unused declaration. + * defs.h: Remove unused declaration of handle_new_child(). + + Use natural-sized integer field for tcb::flags. + * defs: Change struct tcb::flags type from short to int. + This results in smaller code at least on x86. + + Make needlessly static data local. + * syscall.c (get_scno): For POWERPC64 and X86-64, variable currpers + is declared static. But its old data is never used. Convert it + to ordinary local variable. + + Optimize get_scno function. + * syscall.c (get_scno): Make gpr_offset[] array static const. + + Optimize iocb_cmd_lookup. + * desc.c (iocb_cmd_lookup): Make command table constant. + Reduce size of static char buffer. + + Correct sys_sendfile[64] type and nargs. + * freebsd/i386/syscallent.h: Correct sys_sendfile nargs 7->8 + * linux/mips/syscallent.h: Correct sys_sendfile64 nargs 5->4 + * linux/sh/syscallent.h: Correct sys_sendfile64 nargs 5->4 + * linux/sh64/syscallent.h: Correct sys_sendfile64 nargs 5->4 + * linux/m68k/syscallent.h: Correct sys_sendfile64 type TF->TD|TN + * linux/microblaze/syscallent.h: Correct sys_sendfile64 type TF->TD|TN + * linux/tile/syscallent.h: Correct sys_sendfile and sys_sendfile64 type TD->TD|TN + + Make addflags return void. + * defs.h (addflags): Change return type from int to void. + * util.c (addflags): Change return type from int to void. + +2011-08-23 Denys Vlasenko + + Set saner MAX_ARGS (6 or 8) for X86_64 and I386. + I noticed that tcp->u_args[MAX_ARGS] array is way larger than + I'd expect: for all arches except HPPA it has 32 (!) elements. + + I looked at the code and so far I spotted only one abuser of + this fact: sys_sigreturn. On several arches, it saves sigset_t + into tcp->u_args[1...N] on entry and prints it on exit, a-la + + memcpy(&tcp->u_arg[1], &sc.oldmask[0], sizeof(sigset_t)) + + The problem here is that in glibc sigset_t is insanely large: + 128 bytes, and using sizeof(sigset_t) in memcpy will overrun + &tcp->u_args[1] even with MAX_ARGS == 32: + On 32 bits, sizeof(tcp->u_args) == 32*4 == 128 bytes! + We may already have a bug there! + + This commit changes the code to save NSIG / 8 bytes only. + NSIG can't ever be > 256, and in practice is <= 129, + thus NSIG / 8 is <= 16 bytes == 4 32-bit words, + and even MAX_ARGS == 5 should be enough for saving signal masks. + + * defs.h: Reduce MAX_ARGS for X86_64 and I386 from 32 to 8 + for FreeBSD and to 6 for everyone else. Add comment about current + state of needed MAX_ARGS. + * signal.c: Add comment about size of sigset_t. + (sprintsigmask): Reduce static string buffer from 8k to 2k. + (sys_sigreturn): Fix sigset saving to save only NSIG / 8 bytes, + not sizeof(sigset_t) bytes. + * linux/mips/syscallent.h: Reduce nargs of printargs-type syscall to 7. + * linux/arm/syscallent.h: Reduce nargs of printargs-type syscall to 6. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + +2011-08-23 Denys Vlasenko + + Optimize sys_old_mmap. + * mem.c (sys_old_mmap): For Ia64 and 32-bit personality of x86-64, + copy narrow parameters from userspace by single umove, not by six + separate ones; then assign them to long u_arg[i]. For SH[64], + avoid copying of tcp->u_arg. + (sys_mmap): Add FIXME comment - SH64 and i386 seem to be handled + differently for no apparent reason. + * test/mmap_offset_decode.c: New test program, illustrates FIXME. + +2011-08-23 Denys Vlasenko + + Untangle ifdef forest in sys_mmap64. No code changes. + After careful analysis, it looks like !LINUX and ALPHA + pass all seven parameters in registers; and in all other cases + parameters are on stack (pointed to by tcp->u_arg[0]). + In light of this, reorganize ifdefs, making them simpler, + without changing any logic. + After this, it's apparent we use tcp->u_arg[4,5,6] and possibly + [7] without checking that it's valid to do so. + So far, just add a comment about this. + + * mem.c (sys_mmap64): Rewrite ifdefs in a much simpler way. + Add comments about apparent bugs. + +2011-08-23 Denys Vlasenko + + Style and comment fixes, no code changes. + * mem.c: Indent includes to show nesting better. + (addtileflags): Fix style of this function definition; + correct wrong endif comment, add another endif comment. + + Use simpler rounding up to next multiple of 2. + * util.c (printllval): simpler rounding up to next multiple of 2. + + Cosmetic fixes, no code changes. + * defs.h: Add/reformat comments. + * signal.c: Remove wrong comment. Add warning directive + when we detect that NSIG is undefined. Add comment about + NSIG on ARM. Fix typo in comment. + (signame): Reformat code a bit without changes to logic. + Shorten static buffer. + (sys_rt_sigprocmask): Remove stray empty line. + * syscall.c: Add warning directive when we detect that + NSIG is undefined. Add comment about NSIG on ARM. + +2011-08-23 Dmitry V. Levin + + Fix PTRACE_SETOPTIONS tests. + * strace.c [LINUX] (kill_save_errno): New function. + (test_ptrace_setoptions_followfork): Change return type to void. + Fix and harden error handling. Use kill_save_errno() to avoid errno + clobbering. Treat EIO from ptrace() the same way as EINVAL. + (test_ptrace_setoptions_for_all): Use kill_save_errno() to avoid errno + clobbering. Treat EIO from ptrace() the same way as EINVAL. + (main): Update use of test_ptrace_setoptions_followfork(). + + Fix compilation on linux 2.4.x. + * configure.ac: Check for BLKGETSIZE64. + * block.c (block_ioctl): Check for HAVE_BLKGETSIZE64. + +2011-08-17 Denys Vlasenko + + Remove tcp->parent and TCB_CLONE_THREAD. + tcp->parent is used for only two things: + (1) to send signal on detach via tgkill (need to know tgid). + Solution: use tkill, it needs only tid. + (2) to optimize out ptrace options setting for new tracees. + Not a big deal if we drop this optimization: "set options" op is fast, + doing it just one extra time once per each tracee is hardly measurable. + + TCB_CLONE_THREAD is a misnomer. It used only to flag sibling we attached to + in startup_attach. This is used to prevent infinite recursive rescanning + of /proc/PID/task. + Despite the name, there is no guarantee it is set only on non-leader: + if one would run "strace -f -p THREAD_ID" and THREAD_ID is *not* + a thread leader, strace will happily attach to it and all siblings + and will think that THREAD_ID is the leader! Which is a bug, but + since we no longer detach when we think tracee is going to die, + this bug no longer matters, because we do not use the knowledge + about thread group leaders for anything. (We used it to delay + leader's exit). + + IOW: after this patch strace has no need to know about threads, parents + and children, and so on. Therefore it does not track that information. + It treats all tracees as independent entities. Overall, + this simplifies code a lot. + + * defs.h: Add TCB_ATTACH_DONE flag, remove TCB_CLONE_THREAD flag + and struct tcb::parent field. + * process.c (internal_fork): Don't set tcpchild->parent. + * strace.c (startup_attach): Use TCB_ATTACH_DONE flag instead of + TCB_CLONE_THREAD to avoid attach attempts on already-attached threads. + Unlike TCB_CLONE_THREAD, TCB_ATTACH_DONE bit is used only temporarily, + and only in this function. We clear it on every tcb before we return. + (detach): Use tkill instead of tgkill. + (trace): Set ptrace options on new tracees unconditionally, + not only when tcp->parent == NULL. + +2011-08-17 Denys Vlasenko + + Remove TCB_SUSPENDED constant and related code. + Since we no longer suspend waitpid'ing tracees, we have only one case when + we suspend tracee: when we pick up a new tracee created by clone/fork/vfork. + + Background: on some other OSes, attach to child is done this way: + get fork's result (pid), loop ptrace(PTRACE_ATTACH) until you hook up + new process/thread. This is ugly and not safe, but what matters for us + is that it doesn't require suspending. Suspending is required + on Linux only, because on Linux attach to child is done differently. + + On Linux, we use two methods of catching new tracee: + adding CLONE_THREAD bit to syscall (if needed, we change + [v]fork into clone before that), or using ptrace options. + In both cases, it may be so that new tracee appears before one which + created it returns from syscall. In this case, current code + suspends new tracee until its creator returns. Only then + strace can determine who is its parent (it needs child's pid for this, + which is visible in parent's [v]fork/clone result). + This is inherently racy. For example, what if SIGKILL kills + creator after it succeeded creating child, but before it returns? + Looks like we will have child suspended forever. + + But after previous commit, we DO NOT NEED parent<->child link for anything. + Therefore we do not need suspending too. Bingo! + + This patch removes suspending code. Now new tracees will be continued + right away. Next patch will remove tcp->parent member. + + * defs.h: Remove TCB_SUSPENDED constant + * process.c (handle_new_child): Delete this function. + (internal_fork): Do not call handle_new_child on syscall exit. + * strace.c (handle_ptrace_event): Delete this function. + (trace): Do not suspend new child; remove all handling + of now impossible TCB_SUSPENDED condition. + +2011-08-17 Denys Vlasenko + + Do not detach when we think tracee is going to die. + Current code plays some ungodly tricks, trying to not detach + thread group leader until all threads exit. + + Also, it detaches from a tracee when signal delivery is detected + which will cause tracee to exit. + This operation is racy (not to mention the determination + whether signal is set to SIG_DFL is a horrible hack): + after we determined that this signal is indeed fatal + but before we detach and let process die, + *other thread* may set a handler to this signal, and + we will leak the process, falsely displaying it as killed! + + I need to look in the past to figure out why we even do it. + First guess is that it's a workaround for old kernel bugs: + kernel used to deliver exit notifications to the tracer, + not to real parent. These workarounds are ancient + (internal_exit is from 1995). + + The patch deletes the hacks. We no longer need tcp->nclone_threads, + TCB_EXITING and TCB_GROUP_EXITING. We also lose a few rather + ugly functions. + + I also added a new message: "+++ exited with EXITCODE +++" + which shows exact moment strace got exit notification. + It is analogous to existing "+++ killed by SIG +++" message. + + * defs.h: Delete struct tcb::nclone_threads field, + TCB_EXITING and TCB_GROUP_EXITING constants, + declarations of sigishandled() and internal_exit(). + * process.c (internal_exit): Delete this function. + (handle_new_child): Don't ++tcp->nclone_threads. + * signal.c (parse_sigset_t): Delete this function. + (sigishandled): Delete this function. + * strace.c (startup_attach): Don't tcbtab[tcbi]->nclone_threads++. + (droptcb): Don't delay dropping if tcp->nclone_threads > 0, + don't drop parent if its nclone_threads reached 0: + just drop (only) this tcb unconditionally. + (detach): don't drop parent. + (handle_group_exit): Delete this function. + (handle_ptrace_event): Instead of handle_group_exit, just drop tcb; + do not panic if we see WIFEXITED from an attached pid; + print "+++ exited with EXITCODE +++" for every WIFEXITED pid. + * syscall.c (internal_syscall): Do not treat sys_exit specially - + don't call internal_exit on it. + +2011-08-16 Sergei Trofimovich + + Declare printrusage32() on Alpha. + * defs.h [ALPHA] (printrusage32): New declaration. + +2011-08-15 Denys Vlasenko + + Slight optimization and cleanup in trace() + * strace.c (trace): Do not recalculate "cflag ? &ru : NULL" + again and again. Do not clear errno unnecessarily. + Consistently check wait errors as pid < 0, not pid == -1. + Indent ifdefs for better readability. + Remove comments after endif if ifdef/endif block is really tiny. + + Fix compilation on 2.4.20 kernel based system. + * block.c (block_ioctl): add ifdef/endif around BLKGETSIZE64 usage + * strace.c (trace): add ifdef/endif around WIFCONTINUED usage + +2011-07-19 Dmitry V. Levin + + Check for additional PTRACE_* constants. + * configure.ac (AC_CHECK_DECLS): Add PTRACE_O_TRACESYSGOOD, + PTRACE_O_TRACEEXEC, PTRACE_O_TRACEEXIT, PTRACE_EVENT_EXEC, + PTRACE_EVENT_VFORK_DONE and PTRACE_EVENT_EXIT. + * defs.h [LINUX]: Define these PTRACE_* constants when they are not + provided by . + + Reported-by: Douglas Mencken + Reported-by: Steve Bennett + +2011-07-19 Denys Vlasenko + + Remove superfluous backslash-continuation in configure.ac. + * configure.ac: remove superfluous backslash continuation + in AC_CHECK_DECLS + +2011-06-24 Denys Vlasenko + + Make IOCTL_WSTOP more readable. + * defs.h: Make IOCTL_WSTOP more readable + + Trivial cleanups. + * strace.c (trace): Change ifdef LINUX to make a bit more sense, + remove wrong comment at its endif. Slightly optimize + "+++ killed by SIG +++" message for systems without WCOREDUMP macro. + + Remove redundant include + * strace.c: Remove redundant include + + Clean up two old comments. + * strace.c (startup_attach): Remove misplaced comment. + (trace) Remove incomplete part of a comment. + + Make a few variables static. + * defs.h: Remove tcbtab declaration. + * strace.c: Make run_uid, run_gid, outf, tcbtab, progname + global variables static + + Add debug output in initial attachment code. + * strace.c (startup_attach): If -d, report pid and success/failure + of every attach attempt. + + Better debug logging of allocations and waitpit results. + * strace.c (alloc_tcb): Print number of allocated tcb's if -d. + (droptcb): Likewise. + (handle_ptrace_event): Remove PTRACE_EVENT_EXEC debug message. + (trace): Improve logging of waitpid: show WIFxxx, exitcode/signal, + ptrace event name, WCOREDUMP - all on one line. + +2011-06-23 Denys Vlasenko + + Optimize arrays of register indexes in syscall_enter. + * syscall.c (syscall_enter) [BFIN]: Make register no array "static const". + [SH]: Make register no array "const", pre-multiply it by 4. + [SH64]: Make register no array "const". + [X86_64]: Make register no array "const", pre-multiply it by 8. + +2011-06-23 Denys Vlasenko + + Deindent syscall_enter by removing unnecessary braces. No code changes. + syscall_enter has many long (>80 columns) lines. + It is aggravated by the fact that it has a lot of {} blocks + which are not necessary (the code is the same without them). + This patch removes {}s and deindents affected lines. + While at it, it indents ifdefs so that nesting is easier to track, + and adds a few spaces in the expressions, such as + "tcp->u_nargs*sizeof..." -> "tcp->u_nargs * sizeof...". + There is no actual changes to the code here. + + * syscall.c (syscall_enter): Remove unnecessary {} blocks. + +2011-06-23 Denys Vlasenko + + Remove dead "ifndef CLONE_PTRACE" branch. + process.c defines CLONE_PTRACE for Linux, so it can't be undefined. + Therefore ifndef CLONE_PTRACE code is dead (since at least 2004). + This patch removes it. + + * process.c (handle_new_child): Remove ifdef CLONE_PTRACE/endif (but not + the code inside) and entire ifndef CLONE_PTRACE/endif block. + +2011-06-23 Denys Vlasenko + + Add a comment about setbpt. No code changes. + * defs.h: Add a comment about setbpt(). + + Untangle a particularly badly obfuscated bit of code. No logic changes. + * util.c (setbpt): Calculate new arg0 in more readable way. + +2011-06-23 Denys Vlasenko + + Remove TCB_FOLLOWFORK. + TCB_FOLLOWFORK flag seems to be unnecessary, because we either follow + all [v]forks/clones or don't follow any, therefore global variable + followfork is an already existing indicator of what we want to do. + This patch drops all setting/clearing of TCB_FOLLOWFORK bit, + and replaces checks for this bit by checks of followfork value. + In internal_fork, check is moved to in front of if(), since + the check is needed on both "entering" and "exiting" branch. + + * defs.h: Remove TCB_FOLLOWFORK define. + * process.c (internal_fork): Do not set/clear TCB_FOLLOWFORK, + test followfork instead of tcp->flags & TCB_FOLLOWFORK. + (handle_new_child): Likewise. + * strace.c (startup_attach): Likewise. + +2011-06-23 Dmitry V. Levin + + * system.c (sys_capget, sys_capset): Fix pointer arithmetics. + +2011-06-23 Denys Vlasenko + + Make initial tcb allocation more readable. No logic changes. + * strace.c (main): Make initial tcb allocation more readable. + +2011-06-23 Denys Vlasenko + + Do not allocate tiny cap_user_header/data structures, place them on stack. + This allows us to avoid having code to malloc them, and code to check + for malloc failure. Resulting code decrease: + text data bss dec hex filename + 10175 0 16 10191 27cf system.o.old + 9797 0 0 9797 2645 system.o + + * system.c (sys_capget): Put cap_user_header_t and cap_user_data_t + on stack, rather than allocating them in heap. These structures + are very small (a few integer fields), stack is a better place + for them. + (sys_capset): Likewise. + +2011-06-23 Denys Vlasenko + + Use [p]error_msg[_and_die] where appropriate. No logic changes. + Resulting size changes: + text data bss dec hex filename + 17445 16 8572 26033 65b1 strace.o.old + 16850 16 8572 25438 635e strace.o + + * strace.c: Replace fprintf[+cleanup]+exit with [p]error_msg_and_die, + fprintf("progname: ...") with [p]error_msg where appropriate. + +2011-06-22 Denys Vlasenko + + Whitespace cleanups. No code changes. + * count.c: Place opening curly brace after if (), + not on the next line. Almost all strace code alredy + uses this style. + * desc.c: Likewise. + * file.c: Likewise. + * net.c: Likewise. + * pathtrace.c: Likewise. + * process.c: Likewise. + * quota.c: Likewise. + * signal.c: Likewise. + * strace.c: Likewise. + * syscall.c: Likewise. + * time.c: Likewise. + +2011-06-22 Denys Vlasenko + + Make strace_fopen abort on error. + Error from strace_fopen in main results in call to exit(1). + Error from strace_fopen in newoutf is propagated to newoutf + callers: startup_attach (where it results in exit(1)) + and alloc_tcb (where error is ignored). In second case, + the behavior doesn't seem to be right: it means with -ff + on open error for new LOGFILE.PID the output will continue + to go into *the same file as the previous process* - which + would be confusing. Moreover, on droptcb outf may be closed + and the output of other, still running process outputting + to the same outf will be lost. I don't think this is sane. + IOW: in all cases, error in strace_fopen should be fatal. + + * strace.c (strace_fopen): Abort on error instead of returning NULL. + (newoutf): Change return type to void. + (startup_attach): Remove error check on newoutf return value. + (main): Remove error check on strace_fopen return value. + +2011-06-22 Denys Vlasenko + + Make set_cloexec_flag abort on error. + set_cloexec_flag() may fail only if we pass it a bad fd, + such as -1 or non-opened one. If we do, we have a bug + in the caller. It makes no sense to try to continue + running when we detect such a blatant bug in our own code. + + * strace (set_cloexec_flag): Abort instead of returning error + indicator. Change function to return void. + (strace_fopen): Remove error check on set_cloexec_flag return value. + (proc_open): Likewise. + (proc_poll_open): Likewise. + +2011-06-22 Denys Vlasenko + + Make strace_popen abort on error. + It makes no sense to postpone abort on strace_popen error + unti it returns. Moreover, out-of-memory error was exiting + without any message. + While at it, use 0 as "none" for popen_pid, as optimization. + + * strace: Initialize popen_pid to 0 - this puts it in bss. + (trace): Reset popen_pid to 0 instead of -1. + (strace_popen): Never return NULL as error indicator, + abort with good error message instead. + (main): Remove NULL check of strace_popen result. + +2011-06-22 Denys Vlasenko + + Delete fork_tcb() + Get rid of fork_tcb() function. It used to do what the comment + above it says, but now it doesn't do much: + it only sets tcp->flags |= TCB_FOLLOWFORK and maybe calls + expand_tcbtab(). The second operation is not necessary, since + alloc_tcp() will do it itself when needed. + This patch deletes fork_tcb(), open-coding tcp->flags |= TCB_FOLLOWFORK + where it was formerly called. It also makes nprocs, tcbtabsize and + expand_tcbtab() static. (While at it, I nuked redundant + extern char **environ declaration: strace.c had *two* of them...) + + * defs.h: Remove declarations of nprocs, tcbtabsize and + expand_tcbtab. + * process.c (fork_tcb): Remove this function. + (internal_fork): Open-code fork_tcb. + (handle_new_child): Likewise. + * strace.c: Remove redundant "extern char **environ". Declare + nprocs and tcbtabsize static. + (expand_tcbtab): Make it static. + +2011-06-22 Denys Vlasenko + + Simplify expand_tcbtab and alloc_tcb. + Get rid of a few intermediate variables, simplifies a few expressions, + and uses error_msg_and_die instead of more verbose + fprintf+cleanup+exit sequence. + In alloc_tcp, I use memset to clear entire new tcp. + This not only saves a few bytes of code, but lowers the chances + of future bugs where some data "leaks out" into new tcb's + from old ones because we forgot to re-initialize it. + + * strace.c (expand_tcbtab): Simplify this function. No logic changes. + (alloc_tcb): Likewise. + +2011-06-21 Denys Vlasenko + + Trivial fixes. + * process.c (internal_fork): Remove conditionals which make no difference + (we return 0 on both branches of these ifs). + * util.c: Fix indentation of an ifdef. + +2011-06-21 Dmitry V. Levin + + Fix build when libaio-devel is not available. + * desc.c: Do not compile code that uses struct iocb unless + HAVE_LIBAIO_H is set. + + Reported-by: Denys Vlasenko + +2011-06-21 Dmitry V. Levin + + tests: finish ptrace_setoptions_* merge. + * tests/Makefile.am (TESTS): Merge ptrace_setoptions_*. + * tests/ptrace_setoptions: Check for Linux kernel > 2.6. + +2011-06-21 Denys Vlasenko + + Remove write-only nchildren member from struct tcb. + * defs.h: Remove nchildren member from struct tcb. + * process.c (handle_new_child): Remove inc/decrements of tcp->nchildren. + (internal_fork): Likewise. + * strace.c (startup_attach): Likewise. + (droptcb): Likewise. + (alloc_tcb): Remove initialization of tcp->nchildren. + + Fix tests/ptrace_setoptions_* to match last fix in ptrace options code. + + Remove write-only nzombies member from struct tcb. + * defs.h: Remove nzombies member from struct tcb. + * strace.c (droptcb): Remove "tcp->parent->nzombies++". + (alloc_tcb): Remove "tcp->nzombies = 0". + +2011-06-21 Denys Vlasenko + + Fix regression introduced by "Properly handle real SIGTRAPs" change. + Commit 3454e4b463e6c22c7ea8c5461ef5a077f4650a54 + introduced a bug: sometimes, TRACECLONE/TRACE[V]FORK opts were not set. + The check (tcp->parent == NULL) in old code was meant to check + "if we are not a child created by auto-attach" - in this case, + options need to be set on the child; otherwise they are inherited + and do not need to be set. + I misunderstood the check and if tcp->parent is not NULL, I was + setting only ptrace_setoptions_for_all bits. + This change fixes the problem. Since the fixed logic makes it + unnecessary to keep two sets of options in separate variables, + I merge them back into one variable, ptrace_setoptions. + + * defs.h: Merge ptrace_setoptions_followfork and ptrace_setoptions_for_all + into one variable, ptrace_setoptions. + * strace.c: Likewise. + (test_ptrace_setoptions_followfork): Use ptrace_setoptions variable. + (test_ptrace_setoptions_for_all): Likewise. + (main): Likewise. + * process.c (internal_fork): Likewise. + (internal_exec): Likewise. + * strace.c (trace): Fix the bug where different options were set + depending on "tcp->parent == NULL" condition. Add a comment + which makes it more clear why this condition is checked. + +2011-06-18 Denys Vlasenko + + Do not suspend waitpid. + strace used to suspend waitpid until there is a child + for waitpid'ing process to collect status from. + Apparently, it was done because in some very old kernels + (circa 2002 or even earlier) there were ptrace bugs which + were making waitpid in real parent to not see children. + This kernel bug is fixed long ago. This change removes the workaround. + test/wait_must_be_interruptible.c is a test program which + illustrates why without this change strace changes + programs's behavior. + + * defs.h: Delete waitpid and nclone_waiting members from from struct tcb. + Remove declaration of internal_wait(). + * process.c (internal_wait): Remove this function. + * strace.c (alloc_tcb): Do not set tcp->nclone_waiting. + (resume): Remove this function. + (resume_from_tcp): Remove this function. + (detach): Do not call resume_from_tcp(). + (handle_group_exit): Do not call resume_from_tcp(). + * syscall.c (internal_syscall): Do not call internal_wait(). + +2011-06-13 Andi Kleen + + Enhance io_submit() decoding. + strace didn't decode important fields in the iocb passed to io_submit. + This patch changes the code to dump them all. Also it prefixes the fields + with names to make it easier to read. + + * desc.c (iocb_cmd_lookup, print_common_flags): New functions. + (sys_io_submit): New iocb decoder. + +2011-06-13 Dmitry V. Levin + + Add argument to tprint_iov() specifying whether to decode each iovec. + * defs.h (tprint_iov): Add decode_iov argument. + * io.c (tprint_iov): Implement new decode_iov argument. + (sys_readv, sys_writev, sys_sendfile, sys_preadv, sys_pwritev): Update + tprint_iov calls. + * net.c (do_msghdr): Likewise. + + Introduce ARRAY_SIZE() macro. + * defs.h (ARRAY_SIZE): New macro. + * ioctl.c: Use it. + * pathtrace.c (pathmatch, storepath): Likewise. + * process.c (printpriv): Likewise. + * signal.c: Likewise. + * syscall.c: Likewise. + +2011-06-13 Andi Kleen + + Fix decoding of timer id returned by timer_create. + * time.c (sys_timer_create): The kernel returns a integer, not a + pointer for the timer id in the memory pointed to by timer_id. + +2011-06-09 Dmitry V. Levin + + Add test for PTRACE_O_TRACESYSGOOD. + * tests/ptrace_setoptions_for_all: New file. + * tests/Makefile.am (TESTS): Add ptrace_setoptions_for_all. + + tests: update test for linux kernel version. + * tests/ptrace_setoptions_followfork: Check for Linux kernel > 2.6. + +2011-06-09 Dmitry V. Levin + + Update ptrace_setoptions test. + The test have to be adjusted after commit v4.6-5-g3454e4b. + + * ptrace_setoptions: Update grep pattern, rename to + ptrace_setoptions_followfork. + * tests/Makefile.am (TESTS): Rename ptrace_setoptions to + ptrace_setoptions_followfork. + +2011-06-09 Dmitry V. Levin + + * strace.c (verror_msg): Rewrite without use of heap memory allocation. + +2011-06-09 Dmitry V. Levin + + Fix MIPS syscall entries. + * linux/mips/syscallent.h: Remove duplicate entries for 4336, 4337, + and 4338 syscall numbers. + + Reported-by: Denys Vlasenko + +2011-06-08 Denys Vlasenko + + Don't display bogus parameter for sigreturn syscall. + * linux/*/syscallent.h: For those arches which use sys_sigreturn, + not printargs, to show [rt_]sigreturn syscall, change number of arguments + from 1 to 0: sys_sigreturn function doesn't use syscall parameters. + (I guess kernel doesn't actually _have_ any parameters for this syscall, + at least on these architectures). Do the same change for I386 and x86-64 + even though they use printargs: I looked at kernel code and syscall + definitely doesn't have any parameters on these arches. + (I hesitate to change 1 to 0 params for arches I don't know - + it is remotely possible some of them do have a parameter for this syscall). + + Optimize sigreturn handling. + * signal.c (sys_sigreturn): move stack pointer variables, + and for SPARC and MIPS, stack pointer and sigmask reading code + into "if (entering) ..." block, because it is only needed + in this branch; load tcp->u_arg[1] into sigmask for display + _after_ we know for sure u_arg[1] does contain valid sigmask + (IOW: perform operation only when we know we will need the result) + + Do not call umoven to fetch parameters if we have zero params. + * syscall.c [I386] (syscall_enter): Do not call umoven + to fetch zero bytes. This is just an optimization. + + "Modernize" four old-style function parameter declarations. + * signal.c (signame, long_to_sigset, printsigmask, printsignal): + Convert old-style C function definitions to a "modern" form. + This does not change any actual code. + +2011-06-08 Denys Vlasenko + + Fix sigreturn decoding on MIPS. + The "return 0" line was accidentally deleted circa 2007, + which made sigreturn on MIPS always display "= 0" return + instead of more informative " = ? (mask now [MASK])". + + * strace.c (sys_sigreturn): Add wrongly deleted "return 0" line + +2011-06-08 Denys Vlasenko + + Print at least one space between SYSCALL(ARGS) and = RESULT if tracee is killed + We already do it in the normal case, but in rare code path where + tracee is gone (SIGKILLed?) sometimes we were printing this: + "SYSCALL(ARGS )= ? " - note jammed together ")=". + test/sigkill_rain.c can be used to verify the fix. + + * strace.c (printleader): add a space after ")" in " )" + +2011-06-08 Denys Vlasenko + + Add fflush after printf in test/sigkill_rain.c. + + Update test/* directory, it seem to be a bit bit-rotted. + Added README; modified sigkill_rain.c to be more understandable, + made clone.c compile; added wait_must_be_interruptible.c test; + updated Makefile and .gitignore. + +2011-06-07 Denys Vlasenko + + Whitespace cleanups. no code changes. + * bjm.c: Fix tabulation (such as extra spaces before tabs), + convert punctuation where it deviates from prevalent form + elsewhere in strace code, convert sizeof and offsetof where + it deviates from from prevalent form, remove space between + function/macro/array names and (parameters) or [index], + add space between "if" and (condition), correct non-standard + or wrong indentaion. + * defs.h: Likewise + * desc.c: Likewise + * file.c: Likewise + * ipc.c: Likewise + * linux/arm/syscallent.h: Likewise + * linux/avr32/syscallent.h: Likewise + * linux/hppa/syscallent.h: Likewise + * linux/i386/syscallent.h: Likewise + * linux/ioctlsort.c: Likewise + * linux/m68k/syscallent.h: Likewise + * linux/microblaze/syscallent.h: Likewise + * linux/powerpc/syscallent.h: Likewise + * linux/s390/syscallent.h: Likewise + * linux/s390x/syscallent.h: Likewise + * linux/sh/syscallent.h: Likewise + * linux/sh64/syscallent.h: Likewise + * linux/tile/syscallent.h: Likewise + * linux/x86_64/syscallent.h: Likewise + * mem.c: Likewise + * net.c: Likewise + * pathtrace.c: Likewise + * process.c: Likewise + * signal.c: Likewise + * sock.c: Likewise + * strace.c: Likewise + * stream.c: Likewise + * sunos4/syscall.h: Likewise + * sunos4/syscallent.h: Likewise + * svr4/syscall.h: Likewise + * svr4/syscallent.h: Likewise + * syscall.c: Likewise + * system.c: Likewise + * test/childthread.c: Likewise + * test/leaderkill.c: Likewise + * test/skodic.c: Likewise + * time.c: Likewise + * util.c: Likewise + +2011-05-30 Dmitry V. Levin + + ARM EABI: fix 64-bit syscall's arguments decoding. + ARM OABI and ARM EABI have different function parameters passing rules. + With EABI, 64-bit function parameters passed in registers are aligned to + an even-numbered register instead of using the next available pair, see + http://lkml.org/lkml/2006/1/12/175 + This rule also applies to syscall's arguments. + + * linux/arm/syscallent.h (pread, pwrite, truncate64, ftruncate64, + readahead, preadv, pwritev): Fix number of arguments. + * util.c (printllval): Align 64bit argument to 64bit boundary on + __ARM_EABI__. + + Reported-by: Damir Shayhutdinov + +2011-05-30 Damir Shayhutdinov + + Linux: implement decoding of preadv and pwritev syscalls. + * io.c [LINUX && HAVE_SYS_UIO_H] (sys_preadv, sys_pwritev): New functions. + * linux/syscall.h (sys_preadv, sys_pwritev): Declare them. + * linux/*/syscallent.h: Use them. + +2011-05-30 Denys Vlasenko + + "Modernize" all old-style function parameter declarations. + * bjm.c: Convert all remaining old-style C function definitions + to a "modern" form. This does not change any actual code. + * io.c: Likewise + * ioctl.c: Likewise + * net.c: Likewise + * proc.c: Likewise + * process.c: Likewise + * signal.c: Likewise + * sock.c: Likewise + * strace.c: Likewise + * stream.c: Likewise + * syscall.c: Likewise + * system.c: Likewise + * time.c: Likewise + * util.c: Likewise + +2011-05-27 Denys Vlasenko + + Cleanups on top of "handle SIGTRAP properly" change, based on Dmitry's comments. + * defs.h ([p]error_msg[_and_die]): Declare new functions. + * strace.c (SYSCALLTRAP): Rename to syscall_trap_sig. + ([p]error_msg[_and_die]): Define new functions. + (strace_tracer_pid): New variable, it controls which pid will + do cleanup on exit via [p]error_msg_and_die. + (main): Set strace_tracer_pid to our initial pid. + (startup_attach): Change strace_tracer_pid if we are in -D mode. + (test_ptrace_setoptions_for_all): Minor changes to logic, + such as better diagnostic messages. + +2011-05-25 Denys Vlasenko + + Identifier "errno" may be a macro, it's unsafe to use it. + * strace.c (strerror): Rename parameter errno to err_no + +2011-05-24 Denys Vlasenko + + Don't perform TCB_WAITEXECVE wait if not needed. + * defs.h (ptrace_setoptions_for_all): Expose this variable. + * strace.c (ptrace_setoptions_for_all): Remove "static". + * process.c (internal_exec): Don't set TCB_WAITEXECVE bit + if we know that post-execve SIGTRAP is not going to happen. + +2011-05-23 Denys Vlasenko + + Properly handle real SIGTRAPs. + * defs.h (ptrace_setoptions): Variable renamed to ptrace_setoptions_followfork. + * process.c (internal_fork): Ditto. + * strace.c (ptrace_setoptions_for_all): New variable. + (SYSCALLTRAP): New variable. + (error_msg_and_die): New function. + (test_ptrace_setoptions_for_all): New function. + (main): Call test_ptrace_setoptions_for_all() at init. + (handle_ptrace_event): Handle PTRACE_EVENT_EXEC (by ignoring it). + (trace): Check events and set ptrace options without -f too. + Check WSTOPSIG(status) not for SIGTRAP, but for SYSCALLTRAP. + +2011-04-24 Mike Frysinger + + Blackfin: update syscall list. + + * linux/bfin/syscallent.h: Add name_to_handle_at, open_by_handle_at, + clock_adjtime, and syncfs syscalls. + +2011-04-24 Mike Frysinger + + linux: add new EHWPOISON errno. + + * linux/errnoent.h: Change ERRNO_133 to EHWPOISON. + +2011-04-08 Grant Edwards + + Add ability to print file descriptor paths and filter by those paths. + * pathtrace.c: New file, implements matching syscall arguments to + user-specified file paths. + * Makefile.am (strace_SOURCES): Add pathtrace.c. + * defs.h (TCB_FILTERED, filtered): New defines. + (getfdpath, pathtrace_select, pathtrace_match, show_fd_path, + tracing_paths): New declarations. + * strace.c (show_fd_path, tracing_paths): New global variables. + (usage, main): Implement handling of -y and -P options. + * strace.1: Add descriptions of -y and -P options. + * syscall.c (trace_syscall_entering): Add path matching logic to the + print/noprint decision and set the TCB_FILTERED bit appropriately. + (trace_syscall_exiting): Use filtered() macro that checks the + TCB_FILTERED bit to determine print/noprint status. + * util.c (printfd): Use getfdpath(). + +2011-04-07 Dmitry V. Levin + + Fix BLKTRACESTOP definition. + * block.c: Fix typo in the check for BLKTRACESTOP. + Reported by Gabor Z. Papp. + +2011-03-15 Dmitry V. Levin + + Ensure that PTRACE_GETSIGINFO et al are always defined on Linux. + * configure.ac (AC_CHECK_DECLS): Add PTRACE_* constants. + * defs.h [LINUX]: Define those PTRACE_* constants that are not provided + by . + + * CREDITS.in: Fix typo. + +2011-03-14 Dmitry V. Levin + + Update PTRACE_* constants. + * process.c (ptrace_cmds): Add PTRACE_GETREGSET and PTRACE_SETREGSET. + + Prepare for 4.6 release. + * NEWS: Update for 4.6 release. + * configure.ac: Version 4.6. + * debian/changelog: 4.6-1. + * strace.spec: 4.6-1. + +2011-03-14 Mike Frysinger + + linux/ioctlent: unify them all. + This unifies all the ioctlent.h's in the linux subdir while still + allowing each arch to maintain its own minor list. + + The basic method is: + - each arch has linux//ioctlent.h.in which defines only the + arch-specific ioctls; + - linux/ioctlent.h.in which defines only the common ioctls; + - at build time, these two headers are combined and sorted to produce + the linux/ioctlent.h file. + + This also requires a little tweaking of the include files since the + common ioctlent.h is a built file. + + * linux/ioctlent.h: Split into linux/ioctlent.h.in and + linux/i386/ioctlent.h.in, remove asm entries from the former, remove + non-asm entries from the latter. + * linux/alpha/ioctlent.h: Rename to linux/alpha/ioctlent.h.in, remove + non-asm entries. + * linux/bfin/ioctlent.h: Rename to linux/bfin/ioctlent.h.in, remove + non-asm entries. + * linux/hppa/ioctlent.h: Rename to linux/hppa/ioctlent.h.in, remove + non-asm entries. + * linux/ia64/ioctlent.h: Rename to linux/ia64/ioctlent.h.in, remove + non-asm entries. + * linux/mips/ioctlent.h: Rename to linux/mips/ioctlent.h.in, remove + non-asm entries. + * linux/powerpc/ioctlent.h: Rename to linux/powerpc/ioctlent.h.in, + remove non-asm entries. + * linux/s390/ioctlent.h: Rename to linux/s390/ioctlent.h.in, remove + non-asm entries. + * linux/sh/ioctlent.h: Rename to linux/sh/ioctlent.h.in, remove + non-asm entries. + * linux/sparc/ioctlent.h: Rename to linux/sparc/ioctlent.h.in, remove + non-asm entries. + * linux/arm/ioctlent.h.in: New file. + * linux/avr32/ioctlent.h.in: Likewise. + * linux/i386/ioctlent.h.in: Likewise. + * linux/m68k/ioctlent.h.in: Likewise. + * linux/microblaze/ioctlent.h.in: Likewise. + * linux/tile/ioctlent.h.in: Likewise. + * linux/x86_64/ioctlent.h.in: Likewise. + * linux/s390x/ioctlent.h.in: Include ioctlent.h.in instead of + ioctlent.h. + * linux/sh64/ioctlent.h.in: Likewise. + * linux/sparc64/ioctlent.h.in: Likewise. + * linux/arm/ioctlent1.h: Update ioctlent.h include. + * linux/powerpc/ioctlent1.h: Likewise. + * linux/sparc/ioctlent1.h: Likewise. + * linux/sparc64/ioctlent1.h: Likewise. + * linux/x86_64/ioctlent1.h: Likewise. + * Makefile.am (AM_CPPFLAGS): Add -I$(builddir)/$(OS). + (EXTRA_DIST): Update. + [MAINTAINER_MODE && LINUX]: Convert from ioctlent_h to ioctlent_h_in. + [LINUX]: Add $(builddir)/$(OS)/ioctlent.h generation rules. + * .gitignore: Add linux/ioctlent.h. + +2011-03-10 Dmitry V. Levin + + Show more details about signals received by traced processess. + * strace.c [!USE_PROCFS] (trace): Differentiate output format depending + on PTRACE_GETSIGINFO success or failure. In the former case, use + printsiginfo() to show more details about received signal. + + Get rid of PT_GETSIGINFO. + * strace.c [!USE_PROCFS] (trace): Assume that PTRACE_GETSIGINFO is + available. Replace PT_GETSIGINFO with PTRACE_GETSIGINFO. Use + PTRACE_GETSIGINFO for all signals. + + Enhance decoding of kernel-generated signals. + * signal.c (printsiginfo) [LINUX]: Do not print uninteresting + zero-initialized fields. + + Fix decoding of user-generated signals. + * signal.c [LINUX] (SI_FROMUSER): Define. + [LINUX || SVR4] (printsiginfo) [SI_FROMUSER]: Enhance decoding. + + Recognize SI_KERNEL and SI_ASYNCNL. + * signal.c [LINUX] (SI_KERNEL, SI_ASYNCNL): Define. + [LINUX || SVR4] (siginfo_codes): Add entries for SI_KERNEL and + SI_ASYNCNL, reorder entries. + +2011-03-05 Sebastian Pipping + + Take all git branches into account for generation of CREDITS file. + * Makefile.am: Make CREDITS target depend on all git branches. + +2011-03-04 Dmitry V. Levin + + Fix decoding of file descriptors. + * defs.h (printfd): New function prototype. + * util.c (printfd): New function. + * file.c (print_dirfd): Update prototype to use printfd(). + (sys_openat, sys_faccessat, sys_newfstatat, sys_mkdirat, sys_linkat, + sys_unlinkat, sys_readlinkat, sys_renameat, sys_fchownat, sys_fchmodat, + sys_futimesat, sys_utimensat, sys_mknodat): Update use of print_dirfd(). + (sys_lseek, sys_llseek, sys_readahead, sys_ftruncate, sys_ftruncate64, + sys_fstat, sys_fstat64, sys_oldfstat, sys_fstatfs, sys_fstatfs64, + sys_fchdir, sys_fchroot, sys_linkat, sys_fchown, sys_fchmod, sys_fsync, + sys_readdir, sys_getdents, sys_getdirentries, sys_fsetxattr, + sys_fgetxattr, sys_flistxattr, sys_fremovexattr, sys_fadvise64, + sys_fadvise64_64, sys_inotify_add_watch, sys_inotify_rm_watch, + sys_fallocate): Use printfd() for decoding of file descriptors. + * desc.c (sys_fcntl, sys_flock, sys_close, sys_dup, do_dup2, + decode_select, sys_epoll_ctl, epoll_wait_common): Use printfd() for + decoding of file descriptors. + * io.c (sys_read, sys_write, sys_readv, sys_writev, sys_pread, + sys_pwrite, sys_sendfile, sys_sendfile64, sys_pread64, sys_pwrite64, + sys_ioctl): Likewise. + * mem.c (print_mmap, sys_mmap64): Likewise. + * signal.c (do_signalfd): Likewise. + * stream.c (decode_poll): Likewise. + * time.c (sys_timerfd_settime, sys_timerfd_gettime): Likewise. + Based on patch from Grant Edwards . + +2011-03-03 Sebastian Pipping + + Print shutdown(2) modes as SHUT_* constants. + * net.c (shutdown_modes): New xlat structure. + (sys_shutdown): Use shutdown_modes to decode 2nd syscall argument. + + Fix decoding of inotify_init1() flags. + * file.c (inotify_init_flags): New xlat structure. + (sys_inotify_init1): Use it instead of open_mode_flags. + +2011-03-03 Dmitry V. Levin + + Fix struct xlat initialization bugs. + * file.c (inotify_modes): Terminate with NULL entry. + * net.c (sock_type_flags): Make this array static. + (socketlayers): Add a comment that this array should remain not + NULL-terminated. + + tests: avoid SIGPIPE. + * tests/ptrace_setoptions: Replace "grep -q" with "grep > /dev/null". + The former may result to strace being killed by SIGPIPE, which in + certain configuratons may lead to generation of a core file. + Suggested by Mike Frysinger. + +2011-03-01 Mike Frysinger + + tests: do not make missing /usr/bin/time a failure. + * tests/init.sh (framework_skip_): New function. + (check_prog): Use it instead of framework_failure_. + +2011-02-27 Dmitry V. Levin + + Generate an xz tar archive of the distribution. + * configure.ac (AM_INIT_AUTOMAKE): Replace dist-bzip2 with dist-xz. + * Makefile.am: Update srpm target. + * make-dist: Update for dist-xz. + * strace.spec: Update Source tag. + * debian/watch: Update regexp. + * .gitignore: Add strace-*.tar.xz. + + Use "make check" in debian/rules and strace.spec. + * debian/control: Update Build-Depends. + * debian/rules: Run "make check". + * strace.spec: Update BuildRequires. Run "make check" in %check section. + + Implement two basic "strace -f" tests. + * Makefile.am (SUBDIRS): Add tests. + * configure.ac (AC_CONFIG_FILES): Add tests/Makefile. + * tests/.gitignore: New file. + * tests/Makefile.am: Likewise. + * tests/init.sh: Likewise. + * tests/ptrace_setoptions: Likewise. + * tests/strace-f: Likewise. + +2011-02-26 Dmitry V. Levin + + ppc, s390, sparc: regenerate ioctlent.h files. + * linux/powerpc/ioctlent.h: Regenerated using Fedora 15 kernel headers. + * linux/s390/ioctlent.h: Likewise. + * linux/sparc/ioctlent.h: Likewise. + + Remove redundant ioctlent.h files. + * linux/s390x/ioctlent.h: Replace old contents with include of + s390/ioctlent.h file. + * linux/sparc64/ioctlent.h: Replace old contents with include of + sparc/ioctlent.h file. + +2011-02-25 Dmitry V. Levin + + ioctlsort: sync with ioctl_lookup() + * linux/ioctlsort.c (main): Use NR and TYPE bits only, to sync with + ioctl_lookup() which looks at these bits only. + + Remove obsolete .cvsignore files. + * test/.cvsignore: Rename to test/.gitignore. + * */.cvsignore, */*/.cvsignore: Removed. + + Ignore generated intermediate header files. + * .gitignore: Add ioctls.h and ioctldefs.h. + +2011-02-24 Dmitry V. Levin + + Generate much of the CREDITS file from git log. + * CREDITS.in: New file, derived from CREDITS, without names of + those who are listed as git log 'Author:'s. + * CREDITS: Remove file. + * Makefile.am [MAINTAINER_MODE] (CREDITS): New rule. + * .gitignore: Add CREDITS. + * .mailmap: New file, required to map git author names and email + addresses to canonical/preferred form. + +2011-02-23 Dmitry V. Levin + + sparc: fix compilation warning. + * file.c [!HAVE_LONG_LONG_OFF_T] (realprintstat): Cast st_size + to unsigned long. + + Update the list of files that must be distributed. + * Makefile.am (EXTRA_DIST): Add debian/source/format, debian/watch, + linux/ia64/signalent.h, linux/powerpc/ioctlent1.h, + linux/powerpc/syscallent1.h, linux/powerpc/errnoent1.h, + linux/powerpc/signalent1.h. + + Fix compilation warning reported by gcc -Wunused-but-set-variable. + * process.c (printwaitn) [!SUNOS4]: Do not define "exited" variable. + +2011-02-22 Mike Frysinger + + ioctlsort: zero pad ioctl codes to 4 places. + Zero padding the ioctl number will allow simple sorting via shell scripts. + + * linux/ioctlsort.c (main): Output ioctl codes zero padded. + * linux/ioctlent.h: Regenerated. + +2011-02-22 Mike Frysinger + + Update mount flags to latest linux. + * system.c (MS_RELATIME, MS_KERNMOUNT, MS_I_VERSION, + MS_STRICTATIME, MS_BORN): Define. + (mount_flags): Add MS_RELATIME, MS_KERNMOUNT, MS_I_VERSION, + MS_STRICTATIME, MS_BORN. + +2011-02-22 Dmitry V. Levin + + Sync debian/changelog and strace.spec with packages. + * debian/changelog: Sync with 4.5.20-2. + * strace.spec: Likewise. + +2011-02-20 Dmitry V. Levin + + Add TRACE_DESC|TRACE_FILE flags to fanotify_* sysentries. + * linux/*/syscallent.h: Add TD flag to fanotify_init. Add TD|TF flags + to fanotify_mark. + + Fix flags of fallocate sysentries. + * linux/*/syscallent.h: Fix sys_fallocate flags. + + Add TRACE_DESC flag to epoll_create* sysentries. + * linux/*/syscallent.h: Add TD flag to sys_epoll_create and + sys_epoll_create1. + + Add TRACE_DESC flag to fgetxattr, flistxattr, and fremovexattr sysentries + * linux/*/syscallent.h: Add TD flag to sys_fgetxattr, sys_flistxattr, + and fremovexattr. + + Add TRACE_FILE flag to swapoff sysentries. + * linux/*/syscallent.h: Add TF flag to sys_swapoff. + + Add TRACE_DESC flag to fadvise64* sysentries. + * linux/*/syscallent.h: Add TD flag to sys_fadvise64 and + sys_fadvise64_64. + + Add TRACE_DESC flag to mmap, mmap2, and old_mmap sysentries. + * linux/*/syscallent.h: Add TD flag to sys_mmap and sys_old_mmap. + + Do not initialize native_scno on platforms with only one personality. + * linux/bfin/syscallent.h: Remove redundant native_scno initialization. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + + Add LOOP_* ioctls defined in linux/loop.h. + * linux/ioctlent.sh: Add LOOP_* ioctls (0x4C..) defined in linux/loop.h + header file. + * linux/ioctlent.h: Regenerated. + Reported by Mike Frysinger. + +2011-02-19 Dmitry V. Levin + + Fix PTRACE_GETEVENTMSG usage and enhance test_ptrace_setoptions() + * strace.c (handle_ptrace_event): Fix PTRACE_GETEVENTMSG usage. + (test_ptrace_setoptions): Test that PTRACE_GETEVENTMSG works properly. + +2011-02-19 Mike Frysinger + + linux/sparc: move to common syscall.h. + Rather than constantly deal with the sparc/syscall.h going stale, merge + the few sparc-specific pieces into the linux/syscall.h header. + + * linux/syscall.h: Add sparc-specific pieces from sparc/syscall.h. + * Makefile.am (EXTRA_DIST): Remove linux/sparc/syscall.h and + linux/sparc64/syscall.h. + * linux/sparc/syscall.h, linux/sparc64/syscall.h: Deleted. + +2011-02-19 Mike Frysinger + + sparc: add new funcs to syscall.h. + Sync missing defs from the common syscall.h here. + + * linux/sparc/syscall.h: Add sys_setfsuid, sys_pread64, and + sys_pwrite64 prototypes. + +2011-02-19 Mike Frysinger + + sparc: punt unused syscall.h.2. + I can't find any mention of this header actually being used. + Seems to be a really old copy of the common syscall.h. + + * Makefile.am (EXTRA_DIST): Remove linux/sparc/syscall.h.2. + * linux/sparc/syscall.h.2: Deleted. + +2011-02-19 Dmitry V. Levin + + Fix raw exit_group(2) decoding. + * syscall.c (trace_syscall_entering): Check for sys_exit instead of + SYS_exit to handle exit_group(2) as well as _exit(2). + +2011-02-18 Dmitry V. Levin + + Optimize known_scno() + * syscall.c (known_scno): Do not check for native_scno field on + platforms that support only one personality. + + * process.c (internal_exit) [IA64]: Remove redundant check. + +2011-02-09 Dmitry V. Levin + + Fix biarch support in IO dumping. + * syscall.c (dumpio): Switch on tcp->sys_func instead of tcp->scno + for more reliable results. + + Simplify tprintf() declaration. + * defs.h (tprintf): Simplify declaration. + +2011-02-05 Dmitry V. Levin + + * defs.h (SYSCALL_NEVER_FAILS): Fix typo. + +2011-01-19 Dmitry V. Levin + + Fix decoding of get[ug]id, gete[ug]id and setfs[ug]id return values. + * defs.h (SYSCALL_NEVER_FAILS): New syscall flag. + * linux/dummy.h: Change redirection for sys_get[ug]id, sys_gete[ug]id + and setfs[ug]id. + * linux/*/syscallent.h: Set SYSCALL_NEVER_FAILS flag for get[ug]id, + gete[ug]id and setfs[ug]id syscalls. + * process.c [LINUX] (sys_getuid, sys_setfsuid): New functions. + * syscall.c (NF): New shorthand macro for use in syscallent.h files. + (get_error): Check SYSCALL_NEVER_FAILS flag. + Reported by Марк Коренберг . + + * linux/*/syscallent.h: Fix typo in sys_newfstatat syscall flags. + +2011-01-18 Mike Frysinger + + Blackfin: update ioctl list. + * linux/bfin/ioctlent.h: Sync with latest kernel sources. + +2011-01-17 Dmitry V. Levin + + Fix stat64 decoding on mips. + * linux/mips/syscallent.h: Use sys_stat64() to decode stat64 syscall. + This fixes Debian bug #599028. + + Update linux/*/syscallent.h files to match Linux kernel v2.6.37. + * linux/alpha/syscallent.h: Add hooks for fanotify_init, fanotify_mark, + and prlimit64. + * linux/i386/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/microblaze/syscallent.h: Likewise. + * linux/mips/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + * linux/arm/syscallent.h: Add hooks for accept4, fanotify_init, + fanotify_mark, and prlimit64. + * linux/hppa/syscallent.h: Add hook for prlimit64. + +2011-01-16 Dmitry V. Levin + + block.c: cleanup. + * block.c: Include . + (print_blkpg_req): Always decode struct blkpg_ioctl_arg. + Robustify decoding of strings. + (block_ioctl): Do not decode return values passed by pointers on exit + from failed syscalls. + Use format macros from inttypes.h to print values of type uint64_t. + +2011-01-15 Dmitry V. Levin + + Add block ioctl support. + * block.c: New file. + * Makefile.am (strace_SOURCES): Add it. + * defs.h [LINUX] (block_ioctl): New function. + * ioctl.c (ioctl_decode) [LINUX]: Use it to decode HDIO_* and BLK* + ioctls. + Patch by Jeff Mahoney + +2011-01-14 Holger Hans Peter Freyther + + Parse SOL_SCTP socket options. + * configure.ac (AC_CHECK_HEADERS): Add netinet/sctp.h. + * net.c [HAVE_NETINET_SCTP_H]: Include . + [SOL_SCTP] (socksctpoptions): New xlat structure. + (sys_getsockopt, printsockopt): Parse SOL_SCTP options. + + * net.c (socketlayers): Add more SOL_* constants from linux/socket.h. + +2011-01-14 Dmitry V. Levin + + strace.1: fix misleading italics. + * strace.1: Use bold instead of italics for "-e trace=" keywords. + This fixes Debian bug #589323. + + Update linux/ioctlent.h. + * linux/ioctlent.h: Regenerate using linux v2.6.37 headers. + + Add HDIO_* ioctls defined in linux/hdreg.h. + * linux/ioctlent.sh: Add HDIO_* ioctls (0x03..) defined in + linux/hdreg.h header file. + This fixes Debian bug #450953. + +2011-01-13 Dmitry V. Levin + + Test PTRACE_O_TRACECLONE and PTRACE_O_TRACEVFORK along with PTRACE_O_TRACEFORK + * strace.c (test_ptrace_setoptions): Add PTRACE_O_TRACECLONE and + PTRACE_O_TRACEVFORK to PTRACE_SETOPTIONS call, to test exactly + the same set of options that is going to be used later in trace(). + +2011-01-10 Dmitry V. Levin + + * net.c (protocols): Add more IPPROTO_* constants defined in netinet/in.h + +2011-01-10 Holger Hans Peter Freyther + + * net.c (protocols): Add IPPROTO_GRE, IPPROTO_SCTP and IPPROTO_UDPLITE. + +2011-01-10 Carmelo AMOROSO + + sh: Add entry for not-multiplexed accept4. + * linux/sh/syscallent.h: Add specific entry for not-multiplexed accept4 + available in kernel mainline since v2.6.37-rc6, see + http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21b6e4c7106b2d68a6710506d8706608272fd78b + +2010-12-14 Carmelo AMOROSO + + sh: Add entries for not-multiplexed socket calls. + * linux/sh/syscallent.h: Add specific entries for not-multiplexed + socket calls (available in kernel mainline since v2.6.37-rc1) + + sh: Fix compilation warning in do_pipe due to missing prototype. + * defs.h [SH]: Make getrval2 prototype visible to do_pipe + and fix the following compiler warning: + .../net.c: In function 'do_pipe': + .../net.c:1632: warning: implicit declaration of function 'getrval2' + .../net.c:1632: warning: format '%lu' expects type 'long unsigned int', + but argument 3 has type 'int' + +2010-12-14 Dmitry V. Levin + + Fix build on uClibc. + * defs.h [LINUX]: Define PTRACE_GETEVENTMSG macro. + Patch by Douglas Mencken . + +2010-12-07 Dmitry V. Levin + + Fix strace -f -o '|command' hangup. + * strace.c (main): Call test_ptrace_setoptions() before parsing + -o option, otherwise a forked command will cause a hangup inside + test_ptrace_setoptions(). + +2010-12-03 Dmitry V. Levin + + Output diagnostics to stderr. + * syscall.c (get_scno): Output information about changes in + personality mode to stderr. Reported by Pádraig Brady. + + Recognize more clone flags. + * process.c (CLONE_*): Define more flags from linux v2.6.25. + (clone_flags): Add entries for them. + Proposed by . + + Decode struct ucred for getsockopt SO_PEERCRED. + * net.c (sys_getsockopt): Decode SO_PEERCRED. + Proposed by Arkadiusz Miśkiewicz . + +2010-12-03 Carmelo AMOROSO + + sh: Add support for tracing sys_cacheflush system call. + * linux/sh/syscallent.h: Update sys_cacheflush entry. + * linux/syscall.h [SH] (sys_cacheflush): New function declaration. + * system.c [SH] (cacheflush_flags): New xlat structure. + [SH] (sys_cacheflush): New function. + + Reviewed-by: Angelo Castello + +2010-11-30 Dmitry V. Levin + + Cleanup test_ptrace_setoptions() + * strace.c (test_ptrace_setoptions): Cleanup. + (main): Fix test_ptrace_setoptions() error diagnostics message. + Print ptrace_setoptions value in debug mode. + +2010-11-30 Wang Chao + + Handle followfork using ptrace_setoptions if available. + If PTRACE_O_TRACECLONE et al options are supported by kernel, + use them to do followfork rather than the original setbpt + method that changes registers ourselves. + + * defs.h [LINUX] (handle_new_child): New function prototype. + * process.c [LINUX] (handle_new_child): New function based on the + code from internal_fork(), with a trivial change: do reparent only + for sys_clone. + [LINUX] (internal_fork): Use handle_new_child(). Do nothing if + ptrace_setoptions is in effect. + * strace.c [LINUX] (handle_ptrace_event): New function. + [LINUX] (trace): If ptrace_setoptions is in effect, then + call the new function to handle PTRACE_EVENT_* status, and + set PTRACE_SETOPTIONS when we see the initial stop of tracee. + +2010-11-30 Wang Chao + + Test how PTRACE_SETOPTIONS support works. + Currently test fork related options only. Fork a child that uses + PTRACE_TRACEME at startup and then does a fork so strace can test + how the PTRACE_SETOPTIONS support works before it handles any real + tracee. Since PTRACE_O_TRACECLONE/*FORK were introduced to kernel + at the same time, this test seems to be enough for these 3 options. + + * defs.h [LINUX]: Define PTRACE_O_TRACECLONE et al macros here. + (ptrace_setoptions): New variable declaration. + * strace.c [LINUX] (test_ptrace_setoptions): New function, tests + whether kernel supports PTRACE_O_CLONE/*FORK, the result is stored + in the new variable ptrace_setoptions for later use. + (main): Call test_ptrace_setoptions() if followfork option is set. + +2010-09-17 Dmitry V. Levin + + Enable support for less verbose build rules. + * configure.ac (AM_INIT_AUTOMAKE): Add silent-rules. + +2010-09-17 Wang Chao + + Do not trace children cloned with CLONE_UNTRACED flag. + If clone is called with flag CLONE_UNTRACED, to be consistent with + option PTRACE_O_TRACECLONE, we should not set CLONE_PTRACE flag on + its arguments. + + * process.c [LINUX] (internal_fork): Check the syscall and arguments. + +2010-09-17 Dmitry V. Levin + + Update the list of CLOCK_* constants to match Linux kernel v2.6.32+ + * time.c (struct xlat clocknames[]): Add more RT clock IDs. + Reported by Tommi Rantala. + +2010-09-16 Dmitry V. Levin + + Update linux/hppa/syscallent.h to match Linux kernel v2.6.35. + * linux/hppa/syscallent.h: Add hooks for recvmmsg and accept4. + +2010-09-15 Dmitry V. Levin + + Pass less information to qualify_one and qual_* + * syscall.c (qualify_one, qual_syscall, qual_signal, qual_fault, + qual_desc): Take just a bitflag argument instead of pointer to the whole + qual_options structure. + (struct qual_options): Update prototype of "qualify" field. + (qualify): Update use of qualify_one and qual_options->qualify. + +2010-09-15 Wang Chao + + Fix -e option with only one value in qualifier statement. + Fix regression introduced by commit v4.5.20-19-g30145dd: + if -e option is used with only one value in qualifier statement, + e.g. 'strace -e trace=open ls', syscall information would not be + printed properly. + + * syscall.c (qualify): Remove faulty optimization. + +2010-09-15 Mike Frysinger + + Fix off_t/rlim_t size checks when cross-compiling. + The current off_t/rlim_t size checks (wrt size of long long) use AC_RUN + which obviously doesn't work when cross-compiling. While we don't hit + any configure errors, the fall back code is pretty dumb (which is to say + there isn't any). Considering the code in question though, we can use + some fun compiler tricks with sizeof and array lengths to turn it into + a pure build test and avoid the RUN issue completely. + + * m4/long_long.m4 (AC_OFF_T_IS_LONG_LONG, AC_RLIM_T_IS_LONG_LONG): + Convert from AC_RUN_IFELSE to AC_COMPILE_IFELSE. + +2010-09-15 Mike Frysinger + + Fix long long little endian detection when cross-compiling. + The long long endian detection code does an AC_TRY_RUN() and since that + doesn't work when cross-compiling, it sets a fallback value. However, + rather than do any sort of default endian detection, the code simply + sets it to "no". This probably breaks most little endian systems out + there when cross-compiling for them. It certainly breaks Blackfin + systems. So use the common endian detection code provided by autoconf + and key off of that when cross-compiling. + + * configure.ac: Call AC_C_BIGENDIAN. + * m4/long_long.m4 (AC_LITTLE_ENDIAN_LONG_LONG): Set cross-compiling + logic based on ac_cv_c_bigendian. + +2010-09-15 Mike Frysinger + + Blackfin: decode new syscalls. + * linux/bfin/syscallent.h: Add fanotify/prlimit/cacheflush syscalls. + * linux/syscall.h: Add sys_cacheflush() decl. + * system.c: Decode Blackfin's cacheflush syscall. + + * linux/ioctlent.sh: Search a few non-exported paths. + +2010-09-15 Roland McGrath + + Clean up pid2tcb usage. + * strace.c (pid2tcb): Always match pid. Fail for argument <= 0. + [USE_PROCFS] (first_used_tcb): New function. + [USE_PROCFS] (trace): Use that instead of pid2tcb(0). + +2010-09-09 Dmitry V. Levin + + Turn on more compiler warnings. + * configure.ac: Enable gcc -Wwrite-strings. + + Import warnings.m4 from gnulib. + * m4/warnings.m4: Replace with warnings.m4 from gnulib. + * configure.ac: Use gl_WARN_ADD from new warnings.m4. + * Makefile.am (AM_CFLAGS): Update for new warnings.m4. + + Split acinclude.m4. + * Makefile.am (ACLOCAL_AMFLAGS): Add "-I m4". + * acinclude.m4: Remove. + * m4/includedir.m4: New file, with definition of AC_INCLUDEDIR from + acinclude.m4. + * m4/long_long.m4: New file, with definitions of AC_OFF_T_IS_LONG_LONG, + AC_RLIM_T_IS_LONG_LONG and AC_LITTLE_ENDIAN_LONG_LONG from acinclude.m4. + * m4/procfs.m4: New file, with definitions of AC_MP_PROCFS, + AC_POLLABLE_PROCFS and AC_STRUCT_PR_SYSCALL from acinclude.m4. + * m4/stat.m4: New file, with definition of AC_STAT64 from acinclude.m4. + * m4/statfs.m4: New file, with definition of AC_STATFS64 from + acinclude.m4. + * m4/warnings.m4: New file, with definition of AC_WARNFLAGS from + acinclude.m4. + + * process.c (sys_waitid): Remove unused variable. + +2010-09-07 Dmitry V. Levin + + Fix const-correctness issues uncovered by gcc -Wwrite-strings. + * defs.h (struct xlat): Add const qualifier to the field of + type "char *". + (set_sortby, qualify, printnum, printnum_int): Add const qualifier to + arguments of type "char *". + * count.c (set_sortby): Add const qualifier to the argument and + automatic variable of type "char *". + * desc.c (decode_select): Add const qualifier to automatic variables of + type "char *". + * ioctlsort.c (struct ioctlent): Add const qualifier to fields of + type "char *". + (main): Add const qualifier to argv. + * process.c (printargv): Add const qualifier to the argument and + automatic variable of type "char *". + (printargc) Add const qualifier to argument of type "char *". + * signal.c (sprintsigmask, parse_sigset_t): Add const qualifier to + arguments of type "char *". + * strace.c (progname): Add const qualifier. + (detach): Add const qualifier to automatic variable of type "char *". + * stream.c (struct strbuf): Add const qualifier to the field of + type "char *". + * syscall.c (struct qual_options): Add const qualifier to fields of + type "char *". + (qual_syscall, qual_fault, qual_desc, lookup_class): Add const qualifier + to arguments of type "char *". + (qual_signal): Add const qualifier to the argument of type "char *", + avoid modification of constant argument. + (qualify): Likewise. + * util.c (printflags): Add const qualifier to automatic variable of + type "char *". + (printnum, printnum_int): Add const qualifier to arguments of + type "char *". + +2010-09-04 Wang Chao + + Fix printing clone flags. + When we trace clone() syscall with only exit signal as clone + flags, strace would print an unnecessary OR operator. + + * process.c (sys_clone): Fix this. + +2010-08-28 Wang Chao + + Drop nclone_detached and related flags. + Remove nclone_detached since CLONE_DETACHED flag was no-op for a very + long time in kernel. + + * defs.h (struct tcb): Remove nclone_detached field. + Remove TCB_CLONE_DETACHED flag. + * process.c: Remove CLONE_DETACHED flag. + (clone_flags): Remove CLONE_DETACHED entry. + (internal_fork, internal_wait): Remove code dealing with CLONE_DETACHED + flag and nclone_detached. + * strace.c (startup_attach, alloc_tcb, droptcb, handle_group_exit): + Likewise. + +2010-08-09 Neil Campbell + + Correct get/set_robust_list syscall numbers for powerpc. + * linux/powerpc/syscallent.h: Swap positions of get_ and set_robust_list. + +2010-08-09 Wang Chao + + Handle CLONE_PARENT flag. + * process.c (internal_fork): The parent of new cloned process is the + same of the calling process when CLONE_PARENT is set. + + Fix error when judging if process has children. + * process.c (internal_wait): Processes counted in tcp->nclone_threads + are tcp's threads, rather than tcp's children. + +2010-08-09 Wang Chao + + Forbid using mutually exclusive options -D and -p together. + If we use -D and -p option together to trace a multi-thread program, in + addition to the main thread, other threads could not be traced even if we + present -f option. Moreover, when executing 'strace -D -p ', + strace could not terminate normally. + + * strace.c (main): Check it. + +2010-08-05 David Daney + + Update Linux MIPS syscalls to match 2.6.35-rc6+ + * linux/mips/syscallent.h: Add and update 405 hooks. + +2010-08-05 Edgar E. Iglesias + + Add support for the MicroBlaze architecture. + * configure.ac: Recognize MicroBlaze. + * linux/microblaze/syscallent.h: New file. + * Makefile.am (EXTRA_DIST): Add linux/microblaze/syscallent.h + * process.c (change_syscall, struct_user_offsets): Add MicroBlaze + support. + * signal.c (sys_sigreturn): Likewise. + * syscall.c (internal_syscall, get_scno, syscall_fixup, get_error, + syscall_enter): Likewise. + +2010-08-05 Frederik Schüler + + linux/sparc: add missing syscall declarations. + * linux/sparc/syscall.h: Sync with linux/syscall.h + +2010-07-17 Andreas Schwab + + Handle biarch get/setrlimit. + * resource.c (print_rlimit32) [POWERPC64 || X86_64]: Define. + (sys_getrlimit, sys_setrlimit) [POWERPC64 || X86_64]: Use it. + +2010-07-13 Andreas Schwab + + Add biarch support for powerpc64. + * acinclude.m4 (AC_LITTLE_ENDIAN_LONG_LONG): Use int instead of + long. + * configure.ac [$host_cpu = powerpc*]: Also define POWERPC64 if + $host_cpu = powerpc64. + * defs.h (SUPPORTED_PERSONALITIES, PERSONALITY0_WORDSIZE) + (PERSONALITY1_WORDSIZE) [POWERPC64]: Define. + * file.c: (struct stat_powerpc32, printstat_powerpc32) [POWERPC64]: + Define. + (printstat) [LINUX && POWERPC64]: Use printstat_powerpc32 in + 32-bit personality. + (sys_newfstatat) [POWERPC64]: Handle personalities. + * signal.c (sys_sigreturn) [POWERPC64]: Likewise. + * util.c (printllval) [POWERPC64]: Likewise. + (printcall) [POWERPC64]: Use wider format for IP prefix. + * syscall.c (get_scno) [POWERPC64]: Check for 64/32 bit mode. + * linux/powerpc/errnoent1.h: New file. + * linux/powerpc/ioctlent1.h: New file. + * linux/powerpc/signalent1.h: New file. + * linux/powerpc/syscallent1.h: New file. + +2010-07-09 Andreas Schwab + + Balance braces. + * strace.c (proc_open): Avoid unbalanced braces. + (trace): Likewise. + +2010-07-06 Andreas Schwab + + Remove extern declaration at file scope. + * defs.h (force_result): Declare. + * process.c (internal_wait): Don't declare force_result. + +2010-06-24 Andreas Schwab + + Document -C/-D. + * strace.c (usage): Document -C. + * strace.1: Document -D. + +2010-06-13 Roland McGrath + + Fix sourceforge download URL. + +2010-06-05 Andreas Schwab + + M68K: Fix fetching syscall arguments. + * syscall.c (syscall_enter) [M68K]: Properly handle more than five + syscall arguments. + +2010-05-28 Andreas Schwab + + Decode TLS syscalls on m68k. + * linux/m68k/syscallent.h: Add entries for get_thread_area, + set_thread_area, atomic_comxchg_32, atomic_barrier. + * linux/dummy.h (sys_get_thread_area, sys_set_thread_area) [M68K]: + Don't redefine. + * mem.c (sys_get_thread_area, sys_set_thread_area) [LINUX && M68K]: New. + + Fix warning when compiling for m68k. + * syscall.c (d0): Define as long. + +2010-04-13 Dmitry V. Levin + + Prepare for 4.5.20 release. + * NEWS: Update for 4.5.20 release. + * configure.ac: Version 4.5.20. + * debian/changelog: 4.5.20-1. + * strace.spec: 4.5.20-1. + +2010-04-13 Frederik Schüler + + Update debian/* files for the upcoming release. + * debian/control: update standards-version to 3.8.4. + * debian/rules: allow parallel building. + * debian/rules: comment out verbose build, only needed for debugging. + * debian/rules: clean up clean: target, dh_clean does most of the work + already. + * debian/rules: use *-stamp instead of stamp-*, so dh_clean can tidy + up for us. + +2010-04-13 Heiko Carstens + + Fix s390 system call table list. + * linux/s390/syscallent.h: Add the missing entries for preadv and + pwritev to the system call table list. + * linux/s390x/syscallent.h: Likewise. + +2010-04-07 Dmitry V. Levin + + Update linux/ioctlent.h. + * linux/ioctlent.sh: Search in asm-generic directory as well. + * linux/ioctlent.h: Regenerated. + + Update linux/*/syscallent.h files to match Linux kernel v2.6.33. + * linux/alpha/syscallent.h: Add 47 hooks. + * linux/arm/syscallent.h: Update hooks for pselect6, ppoll, + epoll_pwait. Add 11 hooks. + * linux/bfin/syscallent.h: Update hooks for prctl, fallocate, + signalfd4, eventfd2, epoll_create1, dup3, pipe2, perf_event_open. + Hook up recvmmsg. + * linux/hppa/syscallent.h: Update hooks for signalfd4, eventfd2, + epoll_create1, dup3, pipe2, perf_event_open. + * linux/i386/syscallent.h: Fix syscall name for the kexec_load hook. + Add 5 hooks. + * linux/ia64/syscallent.h: Fix syscall name for the kexec_load hook. + Add 4 hooks. + * linux/m68k/syscallent.h: Add 50 hooks. + * linux/powerpc/syscallent.h: Fix hook for timerfd_create. Fix + 6 syscall names to match the kernel. Use sys_semop to parse semop. + Add 14 hooks. + * linux/s390/syscallent.h: Fix syscall name for the kexec_load hook. + Add 14 hooks. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Add 13 hooks. + * linux/sh64/syscallent.h: Add 15 hooks. + * linux/sparc/syscallent.h: Add 22 hooks. + * linux/x86_64/syscallent.h: Add 5 hooks. + + Enhance recvmmsg parser. + * net.c (sys_recvmmsg): Decode mmsghdr structure on exit from the + syscall. Decode timespec structure both on entrance and on exit. + +2010-04-07 Andreas Schwab + + Decode recvmmsg syscall. + * net.c (do_msghr): New function to print struct msghdr. + (printmsghdr): Use it. + (printmmsghdr, sys_recvmmsg): New. + * linux/syscall.h: Declare sys_recvmmsg. + (SYS_sub_recvmmsg): Define. + (SYS_socket_nsubcalls): Bump. + * linux/sparc/syscall.h: Likewise. + * linux/arm/syscallent.h: Add sys_recvmmsg. + * linux/bfin/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/m68k/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/ia64/syscallent.h: Adjust. + +2010-04-07 Dmitry V. Levin + + * strace.1: Fix quoting of hyphens and formatting of strace options. + + Split trace_syscall() for better readability. + * syscall.c (trace_syscall): Split into trace_syscall_exiting() and + trace_syscall_entering(). + + Implement -C option to combine regular and -c output. + * defs.h (cflag_t): New enum. + * strace.1: Document -C option. + * strace.c (cflag): Update type. + (main): Handle -C option. + (trace): Update use of cflag. + * count.c (count_syscall): Move clearing of TCB_INSYSCALL to ... + * syscall.c (trace_syscall): ... here. Update use of cflag. + Based on patch by Adrien Kunysz. + + Fix "make dist" regression introduced by commit v4.5.19-12-g5078770. + * Makefile.am (EXTRA_DIST): Rename linux/syscallent.h to linux/i386/syscallent.h + + * desc.c (sys_epoll_pwait): Fix output formatting bug. + + * desc.c (decode_select): Fix potential stack buffer overflow. + +2010-03-31 Dmitry V. Levin + + Fix msgsnd indirect ipccall decoding. + This regression was introduced by commit v4.5.18-136-g783f5bc. + * ipc.c (tprint_msgsnd): Add and use "flags" argument. + (sys_msgsnd): Pass "flags" argument to tprint_msgsnd(). + Patch by Anton Blanchard. + +2010-03-23 Mark Wielaard + + Hook up inotify_init1 open mode flags printer. + * file.c [LINUX] (sys_inotify_init1): New function. + * linux/syscall.h: Declare new sys_inotify_init1 handler. + * linux/bfin/syscallent.h: Hook up new handler. + * linux/hppa/syscallent.h: Likewise. + * linux/i386/syscallent.h: Likewise. + * linux/x86_64/syscallent.h: Likewise. + +2010-03-09 Andreas Schwab + + Avoid spurious error when checking for linux/netlink.h. + * configure.ac: Include when checking for + linux/netlink.h. + +2010-02-23 Andreas Schwab + + Fix reporting signal mask by sigreturn on powerpc. + * signal.c (sys_sigreturn) [POWERPC]: Skip dummy stack frame when + locating signal context. + +2010-02-09 David Daney + + Fix MIPS N32/N64 compile error. + * syscall.c [LINUX_MIPSN32 || LINUX_MIPSN64] (syscall_enter): Pass + tcp->pid to ptrace(). + +2010-02-05 Chris Metcalf + + Add support for the TILE architecture. + * configure.ac: Add TILE to the list of supported architectures. + * defs.h: Define TCB_WAITEXECVE for TILE. + * linux/tile/syscallent.h: New file. + * Makefile.am (EXTRA_DIST): Add linux/tile/syscallent.h + * process.c (change_syscall, struct_user_offsets): Add TILE support. + * syscall.c (get_scno, get_error, syscall_enter): Likewise. + * mem.c (mmap_flags, print_mmap): Add MAP_CACHE_xxx TILE extensions + support. + * signal.c (sigact_flags): Add SA_NOPTRACE. + (sys_sigreturn): Add TILE support. + +2010-02-04 Dmitry V. Levin + + Remove dead code. + * defs.h (tv_tv): Remove. + * net.c (sys_xsetsockaddr): Remove commented out dead code. + * process.c (setarg, sys_execv, sys_execve, struct_user_offsets): + Likewise. + * signal.c (sys_sigsuspend): Likewise. + * strace.c (reaper, trace): Likewise. + * stream.c (internal_stream_ioctl): Likewise. + * syscall.c (trace_syscall): Likewise. + * term.c (term_ioctl): Likewise. + * util.c (tv_tv, umoven, uload, getpc, fixvfork, setbpt, clearbpt): + Likewise. + + Merge Linux internal_clone() into internal_fork() + * defs.h (internal_clone): Remove. + * process.c (internal_clone): Merge into internal_fork(). + (internal_fork) [!LINUX]: Remove dead code. + * syscall.c (internal_syscall): Replace internal_clone() with + internal_fork(). + + * Makefile.am (INCLUDES): Remove redundant search directories. + +2010-02-04 Frederik Schüler + + Update debian/* files. + * debian/control: add sparc64 to the architectures list. + This closes Debian bug #560062 + * Backport commit f0df31e71a58c6e79ba77c1a9d84b2f38d44bec7 to fix FTBFS. + This closes Debian bug #560516 + * debian/control: Update standards-version to 3.8.3. + * debian/control: Lower package priority to optional, matching + the archive override. + * debian/control: add ${misc:Depends} to Depends: lines where + appropriate. + * debian/watch: new file, allows automatic tracking of new + upstream versions. + * debian/source/format: new file, adapt to debian source format "quilt" + * debian/rules: indentation cleanups; use dh_testroot and dh_prep + in clean target. + +2010-01-25 Andreas Schwab + + Fix spurious failure of AC_STAT64 test. + * acinclude.m4 (AC_STAT64): Include first. + +2010-01-12 Andreas Schwab + + Don't kill the process when detaching. + * strace.c (detach): Call clearbpt when TCB_BPTSET is set. + +2009-12-25 Dmitry V. Levin + + Decode fifth argument of mremap syscall. + * mem.c (sys_mremap): Decode fifth argument. + * linux/*/syscallent.h: Update the number of mremap syscall arguments. + +2009-12-24 Chris Metcalf + + * mem.c (sys_mbind): Display first argument in hex. + + * mem.c (mremap_flags): Add MREMAP_FIXED. + +2009-11-16 Mike Frysinger + + Move i386-specific files out of common linux dir. + * linux/syscallent.h: Moved to ... + * linux/i386/syscallent.h: ... here. + * linux/ia64/syscallent.h: Update i386 syscallent.h include. + * linux/sparc/gen.pl: Likewise. + * linux/x86_64/syscallent1.h: Likewise. + +2009-11-16 Andreas Schwab + + Remove support for pre-C89. + * defs.h: Remove references to __STDC__ and P macros. + * strace.c: Likewise. + +2009-11-13 Dmitry V. Levin + + Decode more SOL_PACKET socket options. + * net.c (sockpacketoptions): Add more PACKET_* entries. + (sys_getsockopt): Decode PACKET_STATISTICS. + (printsockopt): Decode PACKET_RX_RING and PACKET_TX_RING. + Patch by Gabor Gombas. + +2009-11-11 Andreas Schwab + + Ignore errors if a thread is killed. + * util.c (clearbpt): Ignore ESRCH error. + +2009-11-06 Bernhard Reutner-Fischer + + Fix handling of Linux systems without struct statfs64. + * acinclude.m4 (AC_STATFS64): New macro to check for struct statfs64. + * configure.ac: Call AC_STATFS64. + * file.c (printstatfs64, sys_statfs64, sys_fstatfs64): Compile only + if struct statfs64 is available. + +2009-11-06 Dmitry V. Levin + + Fix getsockopt decoding on architectures where sizeof(long) > sizeof(int) + * net.c (sys_getsockopt): Optimize output a bit. + Decode integer argument using printnum_int(), patch by Gabor Gombas. + + Check umove() return code. + * bjm.c (sys_query_module): Print input parameters when entering + syscall. Fix handling of syscall error. Handle unlikely umove() + failures. + * ipc.c (tprint_msgrcv): New function. Move part of msgrcv parser code + here, add check umove() return code. + (sys_msgsnd): Print msqid parameter as int instead of long. + (sys_msgrcv): Likewise. Use tprint_msgrcv(). + * process.c (print_affinitylist): Check umove() return code. + * sock.c (sock_ioctl): Handle unlikely umove() failure in the + SIOCGIFCONF parser. + + Fix check for linux/netlink.h on Linux 2.6.32-rc5+ + * configure.ac (AC_CHECK_HEADERS): In check for linux/netlink.h, include + sys/socket.h instead of linux/socket.h beforehand. + +2009-11-04 Andreas Schwab + + Decode fallocate on PowerPC. + * linux/powerpc/syscallent.h: Decode fallocate. + + Factor out printing of 64bit syscall argument. + * defs.h (ALIGN64): Remove. + (printllval): Declare. + * util.c (printllval): Define. + * file.c (sys_readahead): Use printllval. + (sys_lseek64): Likewise. + (sys_truncate64): Likewise. + (sys_ftruncate64): Likewise. + (sys_fadvise64): Likewise. + (sys_fadvise64_64): Likewise. + (sys_fallocate): Likewise. + * io.c (sys_pread): Likewise. + (sys_pwrite): Likewise. + (sys_pread64): Likewise. + (sys_pwrite64): Likewise. + * mem.c (sys_mmap64): Likewise. + +2009-11-03 Andreas Schwab + + Correct decoding of readahead and fadvice64(_64) on PowerPC. + * file.c (sys_readahead): Align 64bit argument. Handle PowerPC64 + like other 64bit architectures. + (sys_fadvise64): Likewise. + (sys_fadvise64_64): Handle PowerPC like ARM. + * linux/powerpc/syscallent.h (sys_readahead): Account for 64bit + argument alignment on PowerPC32. + +2009-10-27 Andreas Schwab + + Maintain separate print column for each process. + * defs.h (struct tcp): Add curcol. + * strace.c: (alloc_tcb): Initialize it. + (trace): Use curcol from current process and save it before + continuing. + (tprintf): Don't modify curcol on output error. + +2009-10-21 Roland McGrath + + * strace.spec: 4.5.19-1 release. + +2009-10-21 Dmitry V. Levin + + * file.c (printstat64): Cleanup trailing whitespace. + +2009-10-16 Andreas Schwab + + Fix decoding of newfstatat syscall on x86-64. + * file.c (printstat64) [LINUX && X68_64]: If tracing a 64-bit + process redirect to printstat. + Fixes RH#529316 "Field values shown for "newfstatat" system + call are incorrect" + +2009-10-12 Dmitry V. Levin + + * configure.ac (AC_CHECK_HEADERS): Remove asm/reg.h. + +2009-10-12 Mike Frysinger + + sparc/linux: Rewrite to use asm/ptrace.h. + The current sparc/linux code uses asm/reg.h, but recent Linux kernels + dropped that header completely. So switch over to the ptrace headers + as those should stick around indefinitely as part of the ABI. + + * defs.h [LINUXSPARC] (U_REG_G1, U_REG_O0, U_REG_O1): Define. + * process.c: Drop asm/regs.h include. + [SPARC || SPARC64] (change_syscall): Change struct regs to struct pt_regs. + * signal.c: Drop asm/regs.h include. + (m_siginfo_t): Unify [SPARC || SPARC64] and [MIPS]. + [SPARC || SPARC64] (sys_sigreturn): Change struct regs to struct pt_regs. + * syscall.c: Drop asm/regs.h include. + [SPARC || SPARC64] (internal_syscall, get_scno, get_error, force_result, + syscall_enter): Change struct regs to struct pt_regs. + * util.c: Drop asm/regs.h include. + (_hack_syscall5, _ptrace): Delete. + [SPARC || SPARC64] (getpc, printcall, arg_setup_state): Change + struct regs to struct pt_regs. + +2009-10-11 Roland McGrath + + * make-dist: Clean up. + + * configure.ac: Use AC_CONFIG_AUX_DIR([.]). + +2009-10-09 Dmitry V. Levin + + * make-dist: New script for preparing release tarballs. + + * git-set-file-times: Import from rsync. + + * Makefile.am [MAINTAINER_MODE]: Define and export TAR_OPTIONS. + +2009-10-08 Dmitry V. Levin + + Enhance msgsnd() parser. + * ipc.c (tprint_msgsnd): New function. Move msgsnd parser code here, + add check for umove() return code. + (sys_msgsnd): Use tprint_msgsnd(). + + * NEWS: Update for 4.5.19 release. + + Enhance semop()/semtimedop() sembuf parser. + * ipc.c (tprint_sembuf): New function. Move sembuf parser code here, + add abbrev() support. + (sys_semop, sys_semtimedop): Use tprint_sembuf(). + +2009-10-08 Jakub Bogusz + + Add pretty printing of sembuf argument to semop() and semtimedop() + * ipc.c (semop_flags): New xlat structure. + (sys_semop, sys_semtimedop): Add pretty printing of sembuf argument. + +2009-10-08 Mike Frysinger + + Add support for Linux/no-mmu with vfork. + * configure.ac (AC_CHECK_FUNCS): Add fork. + * strace.c (strace_vforked): Define. + (startup_child): Do not raise SIGSTOP if vforked. + (trace): Skip first exec when starting up after vforked. + * syscall.c [BFIN] (get_scno): Drop waitexec checks. + + Avoid malloc(0) in getdents parsers. + On end of directory, getdents returns 0. This return value is used to + then try and do malloc(0), but on some systems this will always return + NULL. Since the code won't read the pointer in question if len is 0, + then don't bother calling malloc(0) and set the pointer to NULL ourself. + * file.c (sys_getdents, sys_getdents64): Avoid malloc(0) call. + +2009-10-07 Mike Frysinger + + Add sys_nanosleep() prototype for sparc. + * linux/sparc/syscall.h (sys_nanosleep): New prototype. + Reported by Frederik Schüler. + + Silence compiler warnings about implicit cast from pointer to integer. + * util.c (do_ptrace): Cast ptrace() 4th arg to long. + (ptrace_restart): Drop void* cast on ptrace() 4th arg. + + Ignore .gdb files from FLAT toolchains. + * .gitignore: Add /*.gdb. + + * configure.ac (AC_CHECK_FUNCS): Sort and expand. + + Blackfin: Update ioctl/syscall lists. + * linux/bfin/ioctlent.h: Sync list with latest kernel sources. + * linux/bfin/syscallent.h: Likewise. + + ioctlsort: Check ppc hosts too. + * linux/ioctlsort.c: Check for __powerpc__. + +2009-10-07 Andreas Schwab + + Fix build on ia64. + * linux/ia64/syscallent.h: Update for addition of accept4 syscall + in ../syscallent.h. + +2009-10-07 Roland McGrath + + * strace.spec (%doc): Add ChangeLog-CVS. + + * Makefile.am (srpm): New phony target. + + * Makefile.am (EXTRA_DIST): Add ChangeLog. + ($(srcdir)/ChangeLog): New target, replaces gen-changelog phony target. + Put it inside [MAINTAINER_MODE]. + +2009-10-06 Dmitry V. Levin + + * NEWS: Update for 4.5.19 release. + +2009-10-05 Frederik Schüler + + Prepare debian/* files for release. + * debian/rules: Do not ship ChangeLog anymore. + * debian/control: Update to Debian standards version 3.8.1, and remove + Roland from the Maintainers list. This closes Debian bug #521458. + * debian/changelog: Document changes and prepare for release. + +2009-10-05 Dmitry V. Levin + + * defs.h [HPPA]: Lower MAX_ARGS from 32 to 6. + + * ipc.c [LINUX] (sys_shmat): HPPA does not use an IPC multiplexer. + Based on patch from Carlos O'Donell. + +2009-10-05 Carlos O'Donell + + * linux/hppa/syscallent.h: Update syscalls. + Based on work by Kyle McMartin and Helge Deller. + + Fix SA_HANDLER function pointer comparisons for hppa. + * signal.c (sys_sigaction): Cast SA_HANDLER function pointers to long. + (sys_rt_sigaction): Likewise. + +2009-10-05 Edgar E. Iglesias + + CRIS: Correct first argument to upeek() + This complements commit ea0e6e80260d2b1b7ad40282012b0e47869bcddf. + * syscall.c [CRISV10 || CRISV32] (syscall_fixup, syscall_enter): Pass + tcp pointer instead of pid to upeek(). + * util.c [CRISV10 || CRISV32] (printcall): Likewise. + +2009-10-05 Dmitry V. Levin + + * signal.c (do_signalfd): Fix typo in output format. + +2009-09-21 Dmitry V. Levin + + * Makefile.am (gen_changelog_start_date): Fix date. + +2009-09-19 Dmitry V. Levin + + Prepare for 4.5.19 release. + * NEWS: Update for 4.5.19 release. + * configure.ac: Version 4.5.19. + * debian/changelog: 4.5.19-1. + * strace.spec: 4.5.19-1. + + Update debian/* to 4.5.18-1. + * debian/changelog: Update to 4.5.18-1. + * debian/compat: Set compatibility level to 7. + * debian/control (Build-Depends): Update debhelper requirement. + (strace, strace64): Add Section and Priority tags. + +2009-09-19 Kirill A. Shutemov + + Fix fadvise64 decoding on ARM. + * file.c (sys_fadvise64_64) [ARM]: Fix argument ordering. + +2009-09-18 Dmitry V. Levin + + Fix follow fork/vfork on Linux ARM OABI. + __NR_SYSCALL_BASE eis 0 for EABI and is 0x900000 for OABI. + * process (change_syscall) [LINUX && ARM]: Mask off the high order bits + when changing syscall. + + Reviewed-by: Kirill A. Shutemov + +2009-09-18 Mike Frysinger + + Mark shell scripts as executable. + + Ignore ioctlsort helper program. + * .gitignore: Add ioctlsort. + + linux/errno: Add ERFKILL. + * linux/errnoent.h: Change ERRNO_132 to ERFKILL according to errno 132 + definition introduced in Linux 2.6.31. + +2009-09-01 Paolo Bonzini + + Add accept4 socketcall. + This second patch in the series adds support for accept4 as a socketcall + sub-call. Besides the need to renumber all system calls, this poses + no problem. + Tested on i686. + + * linux/arm/syscallent.h: Add accept4 socketcall. + * linux/m68k/syscallent.h: Likewise. + * linux/powerpc/syscallent.h: Likewise. + * linux/s390/syscallent.h: Likewise. + * linux/s390x/syscallent.h: Likewise. + * linux/sh/syscallent.h: Likewise. + * linux/sh64/syscallent.h: Likewise. + * linux/sparc/syscallent.h: Likewise. + * linux/syscallent.h: Likewise. + + * linux/sparc/syscall.h (SYS_sub_accept4): Declare. + (SYS_socket_nsubcalls): Update. + * linux/syscall.h: Likewise. + +2009-09-01 Paolo Bonzini + + Replace x86-64 paccept with accept4. + This patch changes the paccept syscall to accept4 for x86-64, since + the former was dropped in Linux kernel commit v2.6.27-rc7-14-g2d4c826. + At the same time, it adds support for pretty printing its arguments. + + * linux/x86_64/syscallent.h: Replace paccept with accept4, + hook in sys_accept4. + * net.c (sys_accept): Leave a small stub calling the new... + (do_accept): ... function, which also adds a flags_arg argument. + (sys_accept4): New. + +2009-08-28 Andreas Schwab + + Zero-extend 32-bit addresses when printing argv array. + (printargv): Zero-extend 32-bit addresses. + Fixes RH#519480 "64-bit strace is lazy on execve of 32-bit + process". + +2009-08-12 Andreas Schwab + + Add more futex decoding. + * process.c (FUTEX_WAIT_REQUEUE_PI, FUTEX_CMP_REQUEUE_PI) + (FUTEX_PRIVATE_FLAG, FUTEX_CLOCK_REALTIME): Define. + (futexops): Add entries for them. + (sys_futex): Decode FUTEX_CMP_REQUEUE_PI and + FUTEX_WAIT_REQUEUE_PI. + +2009-07-08 Dmitry V. Levin + + Generate ChangeLog from git log. + * .gitignore: Add ChangeLog + * ChangeLog: Rename to ChangeLog-CVS. + * Makefile.am (gen-changelog): New rule. + (dist-hook): Depend on it. + (EXTRA_DIST): Add ChangeLog-CVS. + * README-hacking: Describe changes. + * gitlog-to-changelog: Import from gnulib. + + +See ChangeLog-CVS for older changes. diff --git a/HACKING-scripts b/HACKING-scripts deleted file mode 100644 index 1220fdd93..000000000 --- a/HACKING-scripts +++ /dev/null @@ -1,58 +0,0 @@ -Each strace port relies heavily on port-specific headers: - - errnoent.h - map error number to error name like strerror() - - ioctlent.h - map ioctl number to symbolic define - - signalent.h - map signal number to signal name like strsignal() - - syscallent.h - map syscall number to name and function signature - -Since generating these headers from scratch (or even just updating them) can be -a big pain, there are a few scripts to help automate the process. Since each -port organizes their kernel sources differently, there may be a specific script -for your kernel. - -We will use the Linux kernel (2.6.20+) as an example below (the Blackfin -architecture to be specific). Hopefully, it'll be obvious how to swap out a -different system or architecture as your circumstances apply. - -ksrc=/usr/src/linux -asrc=$ksrc/arch/blackfin/include - -To use the errnoent.sh script, give it all the headers that might contain -appropriate errno values. Excessive headers are not a problem. The resulting -output should be directly usable without modification. - sh ./errnoent.sh \ - $ksrc/include/linux/*errno*.h \ - $ksrc/include/asm-generic/*errno*.h \ - $asrc/asm/*errno*.h \ - > errnoent.h - -To use the ioctls_gen.sh script, give it all the base include directories. The -script will crawl all the headers and try to discover appropriate ioctls. -Unlike the other scripts, this one creates files for further processing. This -is because ioctls tend to have a lot of define indirection, and the ioctlent0.h -header needs to be fully expanded into numeric form and sorted properly. So -first we process all of the ioctls with the ioctls_gen.sh into ioctls_inc.h and -ioctls_arch.h, and then we compile them into ioctlsort.c. The resulting -output, while directly usable, only contains definitions that match exactly the -current kernel version that the script ran against. That means older/newer -ioctl defines that might be present in the existing ioctlent0.h header will be -lost if things are copied directly. A little creative use of `diff` and manual -merging should be used to produce the final ioctlent0.h header. - sh ./maint/ioctls_gen.sh $ksrc/include $asrc - gcc -Wall -I. ioctlsort.c -o ioctlsort - ./ioctlsort > ioctlent0.h - -To use the signalent.sh script, give it all the headers that might contain -appropriate signal values. Excessive headers are not a problem. The resulting -output should be directly usable without modification. - sh ./signalent.sh \ - $asrc/asm/signal.h \ - > signalent.h - -To use the syscallent.sh script, give it the header with the list of your -system call numbers. The resulting output is useful as a template for creating -a proper header as it can really only detect the system call number and its -name. It has no way of knowing the number of arguments or strace flags for -decoding them (yet?). - sh ./syscallent.sh \ - $asrc/asm/unistd.h \ - > syscallent.h diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..f24fc88e7 --- /dev/null +++ b/Makefile @@ -0,0 +1,6710 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# Automake input for strace. +# +# Copyright (c) 2002-2009 Roland McGrath +# Copyright (c) 2006-2016 Dmitry V. Levin +# Copyright (c) 2008-2015 Mike Frysinger +# Copyright (c) 2015 Elvira Khabirova +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# scno.h make rules for strace. +# +# Copyright (c) 2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + + +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/strace +pkgincludedir = $(includedir)/strace +pkglibdir = $(libdir)/strace +pkglibexecdir = $(libexecdir)/strace +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-pc-linux-gnu +host_triplet = x86_64-pc-linux-gnu +bin_PROGRAMS = strace$(EXEEXT) +DIST_COMMON = $(srcdir)/xlat/Makemodule.am $(srcdir)/scno.am \ + $(srcdir)/mpers.am $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(srcdir)/strace.spec.in \ + $(top_srcdir)/debian/changelog.in depcomp AUTHORS COPYING \ + INSTALL NEWS README compile config.guess config.sub install-sh \ + missing +#am__append_1 = unwind.c +#am__append_2 = $(libunwind_CPPFLAGS) +#am__append_3 = $(libunwind_LDFLAGS) +#am__append_4 = $(libunwind_LIBS) +am__append_5 = libmpers-m32.a +am__append_6 = libmpers-m32.a +am__append_7 = $(mpers_m32_targets) +am__append_8 = $(mpers_m32_targets) +am__append_9 = libmpers-mx32.a +am__append_10 = libmpers-mx32.a +am__append_11 = $(mpers_mx32_targets) +am__append_12 = $(mpers_mx32_targets) +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/ax_valgrind_check.m4 \ + $(top_srcdir)/m4/mpers.m4 \ + $(top_srcdir)/m4/st_save_restore_var.m4 \ + $(top_srcdir)/m4/st_warn_cflags.m4 \ + $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = strace.spec debian/changelog +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AR = ar +ARFLAGS = cru +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libmpers_m32_a_AR = $(AR) $(ARFLAGS) +libmpers_m32_a_LIBADD = +am__libmpers_m32_a_SOURCES_DIST = 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 +am__objects_1 = libmpers_m32_a-block.$(OBJEXT) \ + libmpers_m32_a-btrfs.$(OBJEXT) libmpers_m32_a-dirent.$(OBJEXT) \ + libmpers_m32_a-evdev.$(OBJEXT) \ + libmpers_m32_a-fetch_seccomp_fprog.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_flock.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_mmsghdr.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_msghdr.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_stat.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_stat64.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_statfs.$(OBJEXT) \ + libmpers_m32_a-hdio.$(OBJEXT) \ + libmpers_m32_a-ipc_msgctl.$(OBJEXT) \ + libmpers_m32_a-ipc_shmctl.$(OBJEXT) \ + libmpers_m32_a-loop.$(OBJEXT) libmpers_m32_a-mtd.$(OBJEXT) \ + libmpers_m32_a-print_mq_attr.$(OBJEXT) \ + libmpers_m32_a-print_msgbuf.$(OBJEXT) \ + libmpers_m32_a-print_sg_req_info.$(OBJEXT) \ + libmpers_m32_a-print_sigevent.$(OBJEXT) \ + libmpers_m32_a-print_time.$(OBJEXT) \ + libmpers_m32_a-print_timespec.$(OBJEXT) \ + libmpers_m32_a-print_timeval.$(OBJEXT) \ + libmpers_m32_a-print_timex.$(OBJEXT) \ + libmpers_m32_a-printrusage.$(OBJEXT) \ + libmpers_m32_a-printsiginfo.$(OBJEXT) \ + libmpers_m32_a-rtc.$(OBJEXT) libmpers_m32_a-sg_io_v3.$(OBJEXT) \ + libmpers_m32_a-sigaltstack.$(OBJEXT) \ + libmpers_m32_a-sock.$(OBJEXT) libmpers_m32_a-sysinfo.$(OBJEXT) \ + libmpers_m32_a-times.$(OBJEXT) libmpers_m32_a-ustat.$(OBJEXT) \ + libmpers_m32_a-utime.$(OBJEXT) libmpers_m32_a-v4l2.$(OBJEXT) +am_libmpers_m32_a_OBJECTS = $(am__objects_1) +libmpers_m32_a_OBJECTS = $(am_libmpers_m32_a_OBJECTS) +libmpers_mx32_a_AR = $(AR) $(ARFLAGS) +libmpers_mx32_a_LIBADD = +am__libmpers_mx32_a_SOURCES_DIST = 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 +am__objects_2 = libmpers_mx32_a-block.$(OBJEXT) \ + libmpers_mx32_a-btrfs.$(OBJEXT) \ + libmpers_mx32_a-dirent.$(OBJEXT) \ + libmpers_mx32_a-evdev.$(OBJEXT) \ + libmpers_mx32_a-fetch_seccomp_fprog.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_flock.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_mmsghdr.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_msghdr.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_stat.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_stat64.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_statfs.$(OBJEXT) \ + libmpers_mx32_a-hdio.$(OBJEXT) \ + libmpers_mx32_a-ipc_msgctl.$(OBJEXT) \ + libmpers_mx32_a-ipc_shmctl.$(OBJEXT) \ + libmpers_mx32_a-loop.$(OBJEXT) libmpers_mx32_a-mtd.$(OBJEXT) \ + libmpers_mx32_a-print_mq_attr.$(OBJEXT) \ + libmpers_mx32_a-print_msgbuf.$(OBJEXT) \ + libmpers_mx32_a-print_sg_req_info.$(OBJEXT) \ + libmpers_mx32_a-print_sigevent.$(OBJEXT) \ + libmpers_mx32_a-print_time.$(OBJEXT) \ + libmpers_mx32_a-print_timespec.$(OBJEXT) \ + libmpers_mx32_a-print_timeval.$(OBJEXT) \ + libmpers_mx32_a-print_timex.$(OBJEXT) \ + libmpers_mx32_a-printrusage.$(OBJEXT) \ + libmpers_mx32_a-printsiginfo.$(OBJEXT) \ + libmpers_mx32_a-rtc.$(OBJEXT) \ + libmpers_mx32_a-sg_io_v3.$(OBJEXT) \ + libmpers_mx32_a-sigaltstack.$(OBJEXT) \ + libmpers_mx32_a-sock.$(OBJEXT) \ + libmpers_mx32_a-sysinfo.$(OBJEXT) \ + libmpers_mx32_a-times.$(OBJEXT) \ + libmpers_mx32_a-ustat.$(OBJEXT) \ + libmpers_mx32_a-utime.$(OBJEXT) libmpers_mx32_a-v4l2.$(OBJEXT) +am_libmpers_mx32_a_OBJECTS = $(am__objects_2) +libmpers_mx32_a_OBJECTS = $(am_libmpers_mx32_a_OBJECTS) +libstrace_a_AR = $(AR) $(ARFLAGS) +libstrace_a_LIBADD = +am_libstrace_a_OBJECTS = libstrace_a-fstatfs.$(OBJEXT) \ + libstrace_a-fstatfs64.$(OBJEXT) libstrace_a-ipc.$(OBJEXT) \ + libstrace_a-socketcall.$(OBJEXT) libstrace_a-statfs.$(OBJEXT) \ + libstrace_a-statfs64.$(OBJEXT) \ + libstrace_a-sync_file_range.$(OBJEXT) \ + libstrace_a-sync_file_range2.$(OBJEXT) \ + libstrace_a-upeek.$(OBJEXT) libstrace_a-upoke.$(OBJEXT) +libstrace_a_OBJECTS = $(am_libstrace_a_OBJECTS) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(man1dir)" +PROGRAMS = $(bin_PROGRAMS) +am__strace_SOURCES_DIST = access.c affinity.c aio.c alpha.c bjm.c \ + block.c bpf.c btrfs.c cacheflush.c capability.c caps0.h \ + caps1.h chdir.c chmod.c clone.c copy_file_range.c count.c \ + defs.h desc.c dirent.c dirent64.c dm.c empty.h 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 flock.h futex.c gcc_compat.h 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_defs.h ipc_msg.c \ + ipc_msgctl.c ipc_sem.c ipc_shm.c ipc_shmctl.c kcmp.c \ + kernel_types.h kexec.c keyctl.c ldt.c link.c linux/asm_stat.h \ + linux/x32/asm_stat.h linux/x86_64/asm_stat.h lookup_dcookie.c \ + loop.c lseek.c mem.c membarrier.c memfd_create.c mknod.c \ + mmsghdr.c mount.c mpers_type.h mq.c msghdr.c msghdr.h mtd.c \ + native_defs.h net.c netlink.c nsig.h numa.c oldstat.c open.c \ + or1k_atomic.c pathtrace.c perf.c perf_event_struct.h \ + 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 printsiginfo.h \ + process.c process_vm.c ptp.c ptrace.h qualify.c quota.c \ + readahead.c readlink.c reboot.c regs.h renameat.c resource.c \ + rtc.c sched.c scsi.c seccomp.c seccomp_fprog.h sendfile.c \ + sg_io_v3.c sg_io_v4.c sigaltstack.c sigevent.h signal.c \ + signalfd.c sigreturn.c sock.c sockaddr.c socketutils.c \ + sram_alloc.c stat.c stat.h stat64.c statfs.c statfs.h strace.c \ + swapon.c syscall.c sysctl.c sysent.h 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 xlat.h xmalloc.c unwind.c +#am__objects_3 = strace-unwind.$(OBJEXT) +am_strace_OBJECTS = strace-access.$(OBJEXT) strace-affinity.$(OBJEXT) \ + strace-aio.$(OBJEXT) strace-alpha.$(OBJEXT) \ + strace-bjm.$(OBJEXT) strace-block.$(OBJEXT) \ + strace-bpf.$(OBJEXT) strace-btrfs.$(OBJEXT) \ + strace-cacheflush.$(OBJEXT) strace-capability.$(OBJEXT) \ + strace-chdir.$(OBJEXT) strace-chmod.$(OBJEXT) \ + strace-clone.$(OBJEXT) strace-copy_file_range.$(OBJEXT) \ + strace-count.$(OBJEXT) strace-desc.$(OBJEXT) \ + strace-dirent.$(OBJEXT) strace-dirent64.$(OBJEXT) \ + strace-dm.$(OBJEXT) strace-epoll.$(OBJEXT) \ + strace-evdev.$(OBJEXT) strace-eventfd.$(OBJEXT) \ + strace-execve.$(OBJEXT) strace-fadvise.$(OBJEXT) \ + strace-fallocate.$(OBJEXT) strace-fanotify.$(OBJEXT) \ + strace-fchownat.$(OBJEXT) strace-fcntl.$(OBJEXT) \ + strace-fetch_seccomp_fprog.$(OBJEXT) \ + strace-fetch_struct_flock.$(OBJEXT) \ + strace-fetch_struct_mmsghdr.$(OBJEXT) \ + strace-fetch_struct_msghdr.$(OBJEXT) \ + strace-fetch_struct_stat.$(OBJEXT) \ + strace-fetch_struct_stat64.$(OBJEXT) \ + strace-fetch_struct_statfs.$(OBJEXT) \ + strace-file_handle.$(OBJEXT) strace-file_ioctl.$(OBJEXT) \ + strace-fs_x_ioctl.$(OBJEXT) strace-flock.$(OBJEXT) \ + strace-futex.$(OBJEXT) strace-get_robust_list.$(OBJEXT) \ + strace-getcpu.$(OBJEXT) strace-getcwd.$(OBJEXT) \ + strace-getrandom.$(OBJEXT) strace-hdio.$(OBJEXT) \ + strace-hostname.$(OBJEXT) strace-inotify.$(OBJEXT) \ + strace-io.$(OBJEXT) strace-ioctl.$(OBJEXT) \ + strace-ioperm.$(OBJEXT) strace-iopl.$(OBJEXT) \ + strace-ioprio.$(OBJEXT) strace-ipc_msg.$(OBJEXT) \ + strace-ipc_msgctl.$(OBJEXT) strace-ipc_sem.$(OBJEXT) \ + strace-ipc_shm.$(OBJEXT) strace-ipc_shmctl.$(OBJEXT) \ + strace-kcmp.$(OBJEXT) strace-kexec.$(OBJEXT) \ + strace-keyctl.$(OBJEXT) strace-ldt.$(OBJEXT) \ + strace-link.$(OBJEXT) strace-lookup_dcookie.$(OBJEXT) \ + strace-loop.$(OBJEXT) strace-lseek.$(OBJEXT) \ + strace-mem.$(OBJEXT) strace-membarrier.$(OBJEXT) \ + strace-memfd_create.$(OBJEXT) strace-mknod.$(OBJEXT) \ + strace-mmsghdr.$(OBJEXT) strace-mount.$(OBJEXT) \ + strace-mq.$(OBJEXT) strace-msghdr.$(OBJEXT) \ + strace-mtd.$(OBJEXT) strace-net.$(OBJEXT) \ + strace-netlink.$(OBJEXT) strace-numa.$(OBJEXT) \ + strace-oldstat.$(OBJEXT) strace-open.$(OBJEXT) \ + strace-or1k_atomic.$(OBJEXT) strace-pathtrace.$(OBJEXT) \ + strace-perf.$(OBJEXT) strace-personality.$(OBJEXT) \ + strace-pkeys.$(OBJEXT) strace-poll.$(OBJEXT) \ + strace-prctl.$(OBJEXT) strace-print_dev_t.$(OBJEXT) \ + strace-print_mq_attr.$(OBJEXT) strace-print_msgbuf.$(OBJEXT) \ + strace-print_sg_req_info.$(OBJEXT) \ + strace-print_sigevent.$(OBJEXT) strace-print_statfs.$(OBJEXT) \ + strace-print_struct_stat.$(OBJEXT) strace-print_time.$(OBJEXT) \ + strace-print_timespec.$(OBJEXT) strace-print_timeval.$(OBJEXT) \ + strace-print_timex.$(OBJEXT) strace-printmode.$(OBJEXT) \ + strace-printrusage.$(OBJEXT) strace-printsiginfo.$(OBJEXT) \ + strace-process.$(OBJEXT) strace-process_vm.$(OBJEXT) \ + strace-ptp.$(OBJEXT) strace-qualify.$(OBJEXT) \ + strace-quota.$(OBJEXT) strace-readahead.$(OBJEXT) \ + strace-readlink.$(OBJEXT) strace-reboot.$(OBJEXT) \ + strace-renameat.$(OBJEXT) strace-resource.$(OBJEXT) \ + strace-rtc.$(OBJEXT) strace-sched.$(OBJEXT) \ + strace-scsi.$(OBJEXT) strace-seccomp.$(OBJEXT) \ + strace-sendfile.$(OBJEXT) strace-sg_io_v3.$(OBJEXT) \ + strace-sg_io_v4.$(OBJEXT) strace-sigaltstack.$(OBJEXT) \ + strace-signal.$(OBJEXT) strace-signalfd.$(OBJEXT) \ + strace-sigreturn.$(OBJEXT) strace-sock.$(OBJEXT) \ + strace-sockaddr.$(OBJEXT) strace-socketutils.$(OBJEXT) \ + strace-sram_alloc.$(OBJEXT) strace-stat.$(OBJEXT) \ + strace-stat64.$(OBJEXT) strace-statfs.$(OBJEXT) \ + strace-strace.$(OBJEXT) strace-swapon.$(OBJEXT) \ + strace-syscall.$(OBJEXT) strace-sysctl.$(OBJEXT) \ + strace-sysinfo.$(OBJEXT) strace-syslog.$(OBJEXT) \ + strace-sysmips.$(OBJEXT) strace-term.$(OBJEXT) \ + strace-time.$(OBJEXT) strace-times.$(OBJEXT) \ + strace-truncate.$(OBJEXT) strace-ubi.$(OBJEXT) \ + strace-uid.$(OBJEXT) strace-uid16.$(OBJEXT) \ + strace-umask.$(OBJEXT) strace-umount.$(OBJEXT) \ + strace-uname.$(OBJEXT) strace-userfaultfd.$(OBJEXT) \ + strace-ustat.$(OBJEXT) strace-util.$(OBJEXT) \ + strace-utime.$(OBJEXT) strace-utimes.$(OBJEXT) \ + strace-v4l2.$(OBJEXT) strace-wait.$(OBJEXT) \ + strace-xattr.$(OBJEXT) strace-xmalloc.$(OBJEXT) \ + $(am__objects_3) +strace_OBJECTS = $(am_strace_OBJECTS) +am__DEPENDENCIES_1 = +#am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) +strace_DEPENDENCIES = libstrace.a $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) $(am__append_5) $(am__append_9) +strace_LINK = $(CCLD) $(strace_CFLAGS) $(CFLAGS) $(strace_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +SCRIPTS = $(bin_SCRIPTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libmpers_m32_a_SOURCES) $(libmpers_mx32_a_SOURCES) \ + $(libstrace_a_SOURCES) $(strace_SOURCES) +DIST_SOURCES = $(am__libmpers_m32_a_SOURCES_DIST) \ + $(am__libmpers_mx32_a_SOURCES_DIST) $(libstrace_a_SOURCES) \ + $(am__strace_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man_MANS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__extra_recursive_targets = check-valgrind-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +DIST_SUBDIRS = tests tests-m32 tests-mx32 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz +GZIP_ENV = --best +DIST_TARGETS = dist-xz dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing aclocal-1.14 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AUTOCONF = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing autoconf +AUTOHEADER = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing autoheader +AUTOMAKE = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing automake-1.14 +AWK = gawk +BUILD_EXEEXT = +BUILD_OBJEXT = +CC = gcc +CCDEPMODE = depmode=gcc3 +CC_FOR_BUILD = gcc +CFLAGS = -g -O2 +CFLAGS_FOR_BUILD = -g -O2 +CODE_COVERAGE_CFLAGS = +CODE_COVERAGE_CPPFLAGS = +CODE_COVERAGE_CXXFLAGS = +CODE_COVERAGE_ENABLED = no +CODE_COVERAGE_LDFLAGS = +CPP = gcc -E +CPPFLAGS = +CPPFLAGS_FOR_BUILD = +CPP_FOR_BUILD = gcc -E +CYGPATH_W = echo +DEB_CHANGELOGTIME = Wed, 15 Feb 2017 11:38:25 -0800 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +ENABLE_VALGRIND_drd = no +ENABLE_VALGRIND_helgrind = no +ENABLE_VALGRIND_memcheck = yes +ENABLE_VALGRIND_sgcheck = +EXEEXT = +GCOV = +GENHTML = +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LCOV = +LDFLAGS = +LDFLAGS_FOR_BUILD = +LIBOBJS = +LIBS = +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing makeinfo +MIPS_ABI = +MKDIR_P = /bin/mkdir -p +OBJEXT = o +PACKAGE = strace +PACKAGE_BUGREPORT = strace-devel@lists.sourceforge.net +PACKAGE_NAME = strace +PACKAGE_STRING = strace 4.16 +PACKAGE_TARNAME = strace +PACKAGE_URL = https://strace.io +PACKAGE_VERSION = 4.16 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +RANLIB = ranlib +RPM_CHANGELOGTIME = Wed Feb 15 2017 +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +VALGRIND = valgrind +VALGRIND_ENABLED = yes +VERSION = 4.16 +WARN_CFLAGS = -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings +WARN_CFLAGS_FOR_BUILD = -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings +abs_builddir = /usr/local/google/home/enh/Downloads/strace-4.16 +abs_srcdir = /usr/local/google/home/enh/Downloads/strace-4.16 +abs_top_builddir = /usr/local/google/home/enh/Downloads/strace-4.16 +abs_top_srcdir = /usr/local/google/home/enh/Downloads/strace-4.16 +ac_ct_CC = gcc +ac_ct_CC_FOR_BUILD = gcc +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +arch = x86_64 +arch_m32 = i386 +arch_mx32 = x32 +bindir = ${exec_prefix}/bin +build = x86_64-pc-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = pc +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +dl_LIBS = -ldl +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-pc-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +libunwind_CPPFLAGS = +libunwind_LDFLAGS = +libunwind_LIBS = +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = +top_builddir = . +top_srcdir = . +valgrind_enabled_tools = memcheck +valgrind_tools = memcheck helgrind drd sgcheck +TESTS_M32 = tests-m32 +TESTS_MX32 = tests-mx32 +SUBDIRS = tests $(TESTS_M32) $(TESTS_MX32) +man_MANS = strace.1 +bin_SCRIPTS = strace-graph strace-log-merge +OS = linux +# ARCH is `i386', `m68k', `sparc', etc. +ARCH = x86_64 +ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = -I$(builddir)/$(OS)/$(ARCH) \ + -I$(srcdir)/$(OS)/$(ARCH) \ + -I$(builddir)/$(OS) \ + -I$(srcdir)/$(OS) \ + -I$(builddir) \ + -I$(srcdir) + +AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD) +AM_CPPFLAGS_FOR_BUILD = $(AM_CPPFLAGS) +XLAT_INPUT_FILES = xlat/access_flags.in xlat/aclipc.in \ + xlat/addrfams.in xlat/adjtimex_modes.in xlat/adjtimex_state.in \ + xlat/adjtimex_status.in xlat/advise.in xlat/af_packet_types.in \ + xlat/archvals.in xlat/arp_hardware_types.in xlat/at_flags.in \ + xlat/atomic_ops.in xlat/audit_arch.in xlat/baud_options.in \ + xlat/blkpg_ops.in xlat/bootflags1.in xlat/bootflags2.in \ + xlat/bootflags3.in xlat/bpf_attach_type.in xlat/bpf_class.in \ + xlat/bpf_commands.in xlat/bpf_map_types.in \ + xlat/bpf_map_update_elem_flags.in xlat/bpf_miscop.in \ + xlat/bpf_mode.in xlat/bpf_op_alu.in xlat/bpf_op_jmp.in \ + xlat/bpf_prog_types.in xlat/bpf_rval.in xlat/bpf_size.in \ + xlat/bpf_src.in xlat/bsg_flags.in xlat/bsg_protocol.in \ + xlat/bsg_subprotocol.in xlat/bt_protocols.in \ + xlat/btrfs_balance_args.in xlat/btrfs_balance_ctl_cmds.in \ + xlat/btrfs_balance_flags.in xlat/btrfs_balance_state.in \ + xlat/btrfs_compress_types.in xlat/btrfs_defrag_flags.in \ + xlat/btrfs_dev_replace_cmds.in \ + xlat/btrfs_dev_replace_results.in \ + xlat/btrfs_dev_replace_state.in xlat/btrfs_dev_stats_flags.in \ + xlat/btrfs_dev_stats_values.in xlat/btrfs_features_compat.in \ + xlat/btrfs_features_compat_ro.in \ + xlat/btrfs_features_incompat.in xlat/btrfs_key_types.in \ + xlat/btrfs_qgroup_ctl_cmds.in \ + xlat/btrfs_qgroup_inherit_flags.in \ + xlat/btrfs_qgroup_limit_flags.in \ + xlat/btrfs_qgroup_status_flags.in xlat/btrfs_scrub_flags.in \ + xlat/btrfs_send_flags.in xlat/btrfs_snap_flags_v2.in \ + xlat/btrfs_space_info_flags.in xlat/btrfs_tree_objectids.in \ + xlat/cacheflush_scope.in xlat/cap.in xlat/cap_mask0.in \ + xlat/cap_mask1.in xlat/cap_version.in xlat/clockflags.in \ + xlat/clocknames.in xlat/clone_flags.in xlat/cpuclocknames.in \ + xlat/delete_module_flags.in xlat/dirent_types.in \ + xlat/dm_flags.in xlat/efd_flags.in xlat/epollctls.in \ + xlat/epollevents.in xlat/epollflags.in \ + xlat/ethernet_protocols.in xlat/evdev_abs.in \ + xlat/evdev_autorepeat.in xlat/evdev_ev.in \ + xlat/evdev_ff_status.in xlat/evdev_ff_types.in \ + xlat/evdev_keycode.in xlat/evdev_leds.in xlat/evdev_misc.in \ + xlat/evdev_mtslots.in xlat/evdev_prop.in \ + xlat/evdev_relative_axes.in xlat/evdev_snd.in \ + xlat/evdev_switch.in xlat/evdev_sync.in xlat/f_owner_types.in \ + xlat/f_seals.in xlat/falloc_flags.in xlat/fan_classes.in \ + xlat/fan_event_flags.in xlat/fan_init_flags.in \ + xlat/fan_mark_flags.in xlat/fcntl64cmds.in xlat/fcntlcmds.in \ + xlat/fdflags.in xlat/fiemap_extent_flags.in \ + xlat/fiemap_flags.in xlat/flockcmds.in xlat/fsmagic.in \ + xlat/futexops.in xlat/futexwakecmps.in xlat/futexwakeops.in \ + xlat/getrandom_flags.in xlat/getsockipoptions.in \ + xlat/getsockipv6options.in xlat/hci_channels.in \ + xlat/hw_breakpoint_len.in xlat/hw_breakpoint_type.in \ + xlat/icmpfilterflags.in xlat/if_dqblk_valid.in \ + xlat/if_dqinfo_flags.in xlat/if_dqinfo_valid.in \ + xlat/iffflags.in xlat/inet_protocols.in xlat/inotify_flags.in \ + xlat/inotify_init_flags.in xlat/ioctl_dirs.in \ + xlat/ioprio_class.in xlat/ioprio_who.in xlat/ip_cmsg_types.in \ + xlat/ipc_msg_flags.in xlat/ipccalls.in xlat/itimer_which.in \ + xlat/kcmp_types.in xlat/kexec_arch_values.in \ + xlat/kexec_file_load_flags.in xlat/kexec_load_flags.in \ + xlat/key_perms.in xlat/key_reqkeys.in xlat/key_spec.in \ + xlat/keyctl_commands.in xlat/lockfcmds.in xlat/loop_cmds.in \ + xlat/loop_crypt_type_options.in xlat/loop_flags_options.in \ + xlat/madvise_cmds.in xlat/mbindflags.in xlat/mctl_sync.in \ + xlat/membarrier_cmds.in xlat/memfd_create_flags.in \ + xlat/mempolicyflags.in xlat/mlock_flags.in \ + xlat/mlockall_flags.in xlat/mmap_flags.in xlat/mmap_prot.in \ + xlat/modem_flags.in xlat/modetypes.in \ + xlat/module_init_flags.in xlat/mount_flags.in \ + xlat/move_pages_flags.in xlat/mq_attr_flags.in \ + xlat/mremap_flags.in xlat/msg_flags.in xlat/msgctl_flags.in \ + xlat/mtd_file_mode_options.in xlat/mtd_flags_options.in \ + xlat/mtd_mode_options.in xlat/mtd_nandecc_options.in \ + xlat/mtd_otp_options.in xlat/mtd_type_options.in \ + xlat/name_to_handle_at_flags.in xlat/netlink_flags.in \ + xlat/netlink_protocols.in xlat/netlink_types.in \ + xlat/notifyflags.in xlat/nt_descriptor_types.in \ + xlat/open_access_modes.in xlat/open_mode_flags.in \ + xlat/openmodessol.in xlat/packet_mreq_type.in \ + xlat/perf_attr_size.in xlat/perf_branch_sample_type.in \ + xlat/perf_event_open_flags.in xlat/perf_event_read_format.in \ + xlat/perf_event_sample_format.in xlat/perf_hw_cache_id.in \ + xlat/perf_hw_cache_op_id.in xlat/perf_hw_cache_op_result_id.in \ + xlat/perf_hw_id.in xlat/perf_sw_ids.in xlat/perf_type_id.in \ + xlat/personality_flags.in xlat/personality_types.in \ + xlat/pkey_access.in xlat/policies.in xlat/pollflags.in \ + xlat/pr_cap_ambient.in xlat/pr_dumpable.in xlat/pr_fp_mode.in \ + xlat/pr_mce_kill.in xlat/pr_mce_kill_policy.in \ + xlat/pr_set_mm.in xlat/pr_tsc.in xlat/pr_unalign_flags.in \ + xlat/prctl_options.in xlat/priorities.in \ + xlat/ptp_flags_options.in xlat/ptrace_cmds.in \ + xlat/ptrace_events.in xlat/ptrace_peeksiginfo_flags.in \ + xlat/ptrace_setoptions_flags.in xlat/quota_formats.in \ + xlat/quotacmds.in xlat/quotatypes.in xlat/rename_flags.in \ + xlat/resource_flags.in xlat/resources.in xlat/rwf_flags.in \ + xlat/sa_handler_values.in xlat/sched_flags.in \ + xlat/schedulers.in xlat/scmvals.in xlat/scsi_sg_commands.in \ + xlat/secbits.in xlat/seccomp_filter_flags.in \ + xlat/seccomp_mode.in xlat/seccomp_ops.in \ + xlat/seccomp_ret_action.in xlat/semctl_flags.in \ + xlat/semop_flags.in xlat/setns_types.in \ + xlat/setsockipoptions.in xlat/setsockipv6options.in \ + xlat/sfd_flags.in xlat/sg_io_dxfer_direction.in \ + xlat/sg_io_flags.in xlat/sg_io_info.in xlat/sg_scsi_reset.in \ + xlat/shm_flags.in xlat/shm_resource_flags.in \ + xlat/shmctl_flags.in xlat/shutdown_modes.in \ + xlat/sigact_flags.in xlat/sigaltstack_flags.in \ + xlat/sigbus_codes.in xlat/sigchld_codes.in \ + xlat/sigemt_codes.in xlat/sigev_value.in xlat/sigfpe_codes.in \ + xlat/sigill_codes.in xlat/siginfo_codes.in \ + xlat/sigpoll_codes.in xlat/sigprocmaskcmds.in \ + xlat/sigprof_codes.in xlat/sigsegv_codes.in \ + xlat/sigsys_codes.in xlat/sigtrap_codes.in \ + xlat/sock_type_flags.in xlat/socketcalls.in \ + xlat/socketlayers.in xlat/sockipoptions.in \ + xlat/sockipv6options.in xlat/sockipxoptions.in \ + xlat/sockoptions.in xlat/sockpacketoptions.in \ + xlat/sockrawoptions.in xlat/socksctpoptions.in \ + xlat/socktcpoptions.in xlat/socktypes.in xlat/splice_flags.in \ + xlat/sram_alloc_flags.in xlat/statfs_flags.in \ + xlat/swap_flags.in xlat/sync_file_range_flags.in \ + xlat/sysctl_kern.in xlat/sysctl_net.in xlat/sysctl_net_core.in \ + xlat/sysctl_net_ipv4.in xlat/sysctl_net_ipv4_conf.in \ + xlat/sysctl_net_ipv4_route.in xlat/sysctl_net_ipv6.in \ + xlat/sysctl_net_ipv6_route.in xlat/sysctl_net_unix.in \ + xlat/sysctl_root.in xlat/sysctl_vm.in \ + xlat/syslog_action_type.in xlat/sysmips_operations.in \ + xlat/tcflsh_options.in xlat/tcxonc_options.in \ + xlat/timerfdflags.in xlat/ubi_volume_props.in \ + xlat/ubi_volume_types.in xlat/uffd_api_flags.in \ + xlat/uffd_copy_flags.in xlat/uffd_flags.in \ + xlat/uffd_register_ioctl_flags.in \ + xlat/uffd_register_mode_flags.in xlat/uffd_zeropage_flags.in \ + xlat/umount_flags.in xlat/unshare_flags.in xlat/usagewho.in \ + xlat/v4l2_buf_flags.in xlat/v4l2_buf_types.in \ + xlat/v4l2_capture_modes.in xlat/v4l2_colorspaces.in \ + xlat/v4l2_control_classes.in xlat/v4l2_control_flags.in \ + xlat/v4l2_control_ids.in xlat/v4l2_control_types.in \ + xlat/v4l2_device_capabilities_flags.in xlat/v4l2_fields.in \ + xlat/v4l2_format_description_flags.in \ + xlat/v4l2_frameinterval_types.in xlat/v4l2_framesize_types.in \ + xlat/v4l2_input_types.in xlat/v4l2_memories.in \ + xlat/v4l2_streaming_capabilities.in xlat/wait4_options.in \ + xlat/waitid_types.in xlat/whence_codes.in xlat/xattrflags.in \ + xlat/xfs_dqblk_flags.in xlat/xfs_quota_flags.in +XLAT_HEADER_FILES = xlat/access_flags.h xlat/aclipc.h xlat/addrfams.h \ + xlat/adjtimex_modes.h xlat/adjtimex_state.h \ + xlat/adjtimex_status.h xlat/advise.h xlat/af_packet_types.h \ + xlat/archvals.h xlat/arp_hardware_types.h xlat/at_flags.h \ + xlat/atomic_ops.h xlat/audit_arch.h xlat/baud_options.h \ + xlat/blkpg_ops.h xlat/bootflags1.h xlat/bootflags2.h \ + xlat/bootflags3.h xlat/bpf_attach_type.h xlat/bpf_class.h \ + xlat/bpf_commands.h xlat/bpf_map_types.h \ + xlat/bpf_map_update_elem_flags.h xlat/bpf_miscop.h \ + xlat/bpf_mode.h xlat/bpf_op_alu.h xlat/bpf_op_jmp.h \ + xlat/bpf_prog_types.h xlat/bpf_rval.h xlat/bpf_size.h \ + xlat/bpf_src.h xlat/bsg_flags.h xlat/bsg_protocol.h \ + xlat/bsg_subprotocol.h xlat/bt_protocols.h \ + xlat/btrfs_balance_args.h xlat/btrfs_balance_ctl_cmds.h \ + xlat/btrfs_balance_flags.h xlat/btrfs_balance_state.h \ + xlat/btrfs_compress_types.h xlat/btrfs_defrag_flags.h \ + xlat/btrfs_dev_replace_cmds.h xlat/btrfs_dev_replace_results.h \ + xlat/btrfs_dev_replace_state.h xlat/btrfs_dev_stats_flags.h \ + xlat/btrfs_dev_stats_values.h xlat/btrfs_features_compat.h \ + xlat/btrfs_features_compat_ro.h xlat/btrfs_features_incompat.h \ + xlat/btrfs_key_types.h xlat/btrfs_qgroup_ctl_cmds.h \ + xlat/btrfs_qgroup_inherit_flags.h \ + xlat/btrfs_qgroup_limit_flags.h \ + xlat/btrfs_qgroup_status_flags.h xlat/btrfs_scrub_flags.h \ + xlat/btrfs_send_flags.h xlat/btrfs_snap_flags_v2.h \ + xlat/btrfs_space_info_flags.h xlat/btrfs_tree_objectids.h \ + xlat/cacheflush_scope.h xlat/cap.h xlat/cap_mask0.h \ + xlat/cap_mask1.h xlat/cap_version.h xlat/clockflags.h \ + xlat/clocknames.h xlat/clone_flags.h xlat/cpuclocknames.h \ + xlat/delete_module_flags.h xlat/dirent_types.h xlat/dm_flags.h \ + xlat/efd_flags.h xlat/epollctls.h xlat/epollevents.h \ + xlat/epollflags.h xlat/ethernet_protocols.h xlat/evdev_abs.h \ + xlat/evdev_autorepeat.h xlat/evdev_ev.h xlat/evdev_ff_status.h \ + xlat/evdev_ff_types.h xlat/evdev_keycode.h xlat/evdev_leds.h \ + xlat/evdev_misc.h xlat/evdev_mtslots.h xlat/evdev_prop.h \ + xlat/evdev_relative_axes.h xlat/evdev_snd.h \ + xlat/evdev_switch.h xlat/evdev_sync.h xlat/f_owner_types.h \ + xlat/f_seals.h xlat/falloc_flags.h xlat/fan_classes.h \ + xlat/fan_event_flags.h xlat/fan_init_flags.h \ + xlat/fan_mark_flags.h xlat/fcntl64cmds.h xlat/fcntlcmds.h \ + xlat/fdflags.h xlat/fiemap_extent_flags.h xlat/fiemap_flags.h \ + xlat/flockcmds.h xlat/fsmagic.h xlat/futexops.h \ + xlat/futexwakecmps.h xlat/futexwakeops.h \ + xlat/getrandom_flags.h xlat/getsockipoptions.h \ + xlat/getsockipv6options.h xlat/hci_channels.h \ + xlat/hw_breakpoint_len.h xlat/hw_breakpoint_type.h \ + xlat/icmpfilterflags.h xlat/if_dqblk_valid.h \ + xlat/if_dqinfo_flags.h xlat/if_dqinfo_valid.h xlat/iffflags.h \ + xlat/inet_protocols.h xlat/inotify_flags.h \ + xlat/inotify_init_flags.h xlat/ioctl_dirs.h \ + xlat/ioprio_class.h xlat/ioprio_who.h xlat/ip_cmsg_types.h \ + xlat/ipc_msg_flags.h xlat/ipccalls.h xlat/itimer_which.h \ + xlat/kcmp_types.h xlat/kexec_arch_values.h \ + xlat/kexec_file_load_flags.h xlat/kexec_load_flags.h \ + xlat/key_perms.h xlat/key_reqkeys.h xlat/key_spec.h \ + xlat/keyctl_commands.h xlat/lockfcmds.h xlat/loop_cmds.h \ + xlat/loop_crypt_type_options.h xlat/loop_flags_options.h \ + xlat/madvise_cmds.h xlat/mbindflags.h xlat/mctl_sync.h \ + xlat/membarrier_cmds.h xlat/memfd_create_flags.h \ + xlat/mempolicyflags.h xlat/mlock_flags.h xlat/mlockall_flags.h \ + xlat/mmap_flags.h xlat/mmap_prot.h xlat/modem_flags.h \ + xlat/modetypes.h xlat/module_init_flags.h xlat/mount_flags.h \ + xlat/move_pages_flags.h xlat/mq_attr_flags.h \ + xlat/mremap_flags.h xlat/msg_flags.h xlat/msgctl_flags.h \ + xlat/mtd_file_mode_options.h xlat/mtd_flags_options.h \ + xlat/mtd_mode_options.h xlat/mtd_nandecc_options.h \ + xlat/mtd_otp_options.h xlat/mtd_type_options.h \ + xlat/name_to_handle_at_flags.h xlat/netlink_flags.h \ + xlat/netlink_protocols.h xlat/netlink_types.h \ + xlat/notifyflags.h xlat/nt_descriptor_types.h \ + xlat/open_access_modes.h xlat/open_mode_flags.h \ + xlat/openmodessol.h xlat/packet_mreq_type.h \ + xlat/perf_attr_size.h xlat/perf_branch_sample_type.h \ + xlat/perf_event_open_flags.h xlat/perf_event_read_format.h \ + xlat/perf_event_sample_format.h xlat/perf_hw_cache_id.h \ + xlat/perf_hw_cache_op_id.h xlat/perf_hw_cache_op_result_id.h \ + xlat/perf_hw_id.h xlat/perf_sw_ids.h xlat/perf_type_id.h \ + xlat/personality_flags.h xlat/personality_types.h \ + xlat/pkey_access.h xlat/policies.h xlat/pollflags.h \ + xlat/pr_cap_ambient.h xlat/pr_dumpable.h xlat/pr_fp_mode.h \ + xlat/pr_mce_kill.h xlat/pr_mce_kill_policy.h xlat/pr_set_mm.h \ + xlat/pr_tsc.h xlat/pr_unalign_flags.h xlat/prctl_options.h \ + xlat/priorities.h xlat/ptp_flags_options.h xlat/ptrace_cmds.h \ + xlat/ptrace_events.h xlat/ptrace_peeksiginfo_flags.h \ + xlat/ptrace_setoptions_flags.h xlat/quota_formats.h \ + xlat/quotacmds.h xlat/quotatypes.h xlat/rename_flags.h \ + xlat/resource_flags.h xlat/resources.h xlat/rwf_flags.h \ + xlat/sa_handler_values.h xlat/sched_flags.h xlat/schedulers.h \ + xlat/scmvals.h xlat/scsi_sg_commands.h xlat/secbits.h \ + xlat/seccomp_filter_flags.h xlat/seccomp_mode.h \ + xlat/seccomp_ops.h xlat/seccomp_ret_action.h \ + xlat/semctl_flags.h xlat/semop_flags.h xlat/setns_types.h \ + xlat/setsockipoptions.h xlat/setsockipv6options.h \ + xlat/sfd_flags.h xlat/sg_io_dxfer_direction.h \ + xlat/sg_io_flags.h xlat/sg_io_info.h xlat/sg_scsi_reset.h \ + xlat/shm_flags.h xlat/shm_resource_flags.h xlat/shmctl_flags.h \ + xlat/shutdown_modes.h xlat/sigact_flags.h \ + xlat/sigaltstack_flags.h xlat/sigbus_codes.h \ + xlat/sigchld_codes.h xlat/sigemt_codes.h xlat/sigev_value.h \ + xlat/sigfpe_codes.h xlat/sigill_codes.h xlat/siginfo_codes.h \ + xlat/sigpoll_codes.h xlat/sigprocmaskcmds.h \ + xlat/sigprof_codes.h xlat/sigsegv_codes.h xlat/sigsys_codes.h \ + xlat/sigtrap_codes.h xlat/sock_type_flags.h xlat/socketcalls.h \ + xlat/socketlayers.h xlat/sockipoptions.h \ + xlat/sockipv6options.h xlat/sockipxoptions.h \ + xlat/sockoptions.h xlat/sockpacketoptions.h \ + xlat/sockrawoptions.h xlat/socksctpoptions.h \ + xlat/socktcpoptions.h xlat/socktypes.h xlat/splice_flags.h \ + xlat/sram_alloc_flags.h xlat/statfs_flags.h xlat/swap_flags.h \ + xlat/sync_file_range_flags.h xlat/sysctl_kern.h \ + xlat/sysctl_net.h xlat/sysctl_net_core.h \ + xlat/sysctl_net_ipv4.h xlat/sysctl_net_ipv4_conf.h \ + xlat/sysctl_net_ipv4_route.h xlat/sysctl_net_ipv6.h \ + xlat/sysctl_net_ipv6_route.h xlat/sysctl_net_unix.h \ + xlat/sysctl_root.h xlat/sysctl_vm.h xlat/syslog_action_type.h \ + xlat/sysmips_operations.h xlat/tcflsh_options.h \ + xlat/tcxonc_options.h xlat/timerfdflags.h \ + xlat/ubi_volume_props.h xlat/ubi_volume_types.h \ + xlat/uffd_api_flags.h xlat/uffd_copy_flags.h xlat/uffd_flags.h \ + xlat/uffd_register_ioctl_flags.h \ + xlat/uffd_register_mode_flags.h xlat/uffd_zeropage_flags.h \ + xlat/umount_flags.h xlat/unshare_flags.h xlat/usagewho.h \ + xlat/v4l2_buf_flags.h xlat/v4l2_buf_types.h \ + xlat/v4l2_capture_modes.h xlat/v4l2_colorspaces.h \ + xlat/v4l2_control_classes.h xlat/v4l2_control_flags.h \ + xlat/v4l2_control_ids.h xlat/v4l2_control_types.h \ + xlat/v4l2_device_capabilities_flags.h xlat/v4l2_fields.h \ + xlat/v4l2_format_description_flags.h \ + xlat/v4l2_frameinterval_types.h xlat/v4l2_framesize_types.h \ + xlat/v4l2_input_types.h xlat/v4l2_memories.h \ + xlat/v4l2_streaming_capabilities.h xlat/wait4_options.h \ + xlat/waitid_types.h xlat/whence_codes.h xlat/xattrflags.h \ + xlat/xfs_dqblk_flags.h xlat/xfs_quota_flags.h +strace_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_2) \ + $(CODE_COVERAGE_CPPFLAGS) +strace_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS) +strace_LDFLAGS = $(am__append_3) +strace_LDADD = libstrace.a $(am__append_4) $(CODE_COVERAGE_LDFLAGS) \ + $(am__append_5) $(am__append_9) +noinst_LIBRARIES = libstrace.a $(am__append_6) $(am__append_10) +libstrace_a_CPPFLAGS = $(strace_CPPFLAGS) +libstrace_a_CFLAGS = $(strace_CFLAGS) +libstrace_a_SOURCES = \ + fstatfs.c \ + fstatfs64.c \ + ipc.c \ + socketcall.c \ + statfs.c \ + statfs64.c \ + sync_file_range.c \ + sync_file_range2.c \ + upeek.c \ + upoke.c \ + # end of libstrace_a_SOURCES + +strace_SOURCES = access.c affinity.c aio.c alpha.c bjm.c block.c bpf.c \ + btrfs.c cacheflush.c capability.c caps0.h caps1.h chdir.c \ + chmod.c clone.c copy_file_range.c count.c defs.h desc.c \ + dirent.c dirent64.c dm.c empty.h 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 flock.h futex.c gcc_compat.h 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_defs.h ipc_msg.c \ + ipc_msgctl.c ipc_sem.c ipc_shm.c ipc_shmctl.c kcmp.c \ + kernel_types.h kexec.c keyctl.c ldt.c link.c linux/asm_stat.h \ + linux/x32/asm_stat.h linux/x86_64/asm_stat.h lookup_dcookie.c \ + loop.c lseek.c mem.c membarrier.c memfd_create.c mknod.c \ + mmsghdr.c mount.c mpers_type.h mq.c msghdr.c msghdr.h mtd.c \ + native_defs.h net.c netlink.c nsig.h numa.c oldstat.c open.c \ + or1k_atomic.c pathtrace.c perf.c perf_event_struct.h \ + 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 printsiginfo.h \ + process.c process_vm.c ptp.c ptrace.h qualify.c quota.c \ + readahead.c readlink.c reboot.c regs.h renameat.c resource.c \ + rtc.c sched.c scsi.c seccomp.c seccomp_fprog.h sendfile.c \ + sg_io_v3.c sg_io_v4.c sigaltstack.c sigevent.h signal.c \ + signalfd.c sigreturn.c sock.c sockaddr.c socketutils.c \ + sram_alloc.c stat.c stat.h stat64.c statfs.c statfs.h strace.c \ + swapon.c syscall.c sysctl.c sysent.h 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 xlat.h xmalloc.c \ + $(am__append_1) +CODE_COVERAGE_BRANCH_COVERAGE = 1 +CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \ + --prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .) + +CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*' + +# Enable this to get link map generated +#strace_LDFLAGS += -Wl,-Map=strace.mapfile +EXTRA_DIST = \ + $(man_MANS) \ + .version \ + COPYING \ + CREDITS \ + ChangeLog \ + ChangeLog-CVS \ + README-linux-ptrace \ + debian/changelog \ + debian/compat \ + debian/control \ + debian/copyright \ + debian/rules \ + debian/source/format \ + debian/strace-udeb.install \ + debian/strace.docs \ + debian/strace.examples \ + debian/strace.install \ + debian/strace.manpages \ + debian/strace64.install \ + debian/strace64.manpages \ + debian/watch \ + errnoent.sh \ + generate_sen.sh \ + ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align16.h \ + linux/32/ioctls_inc_align32.h \ + linux/32/ioctls_inc_align64.h \ + linux/32/syscallent.h \ + linux/64/ioctls_inc.h \ + linux/64/syscallent.h \ + linux/aarch64/arch_regs.c \ + linux/aarch64/arch_regs.h \ + linux/aarch64/arch_sigreturn.c \ + linux/aarch64/errnoent1.h \ + linux/aarch64/get_error.c \ + linux/aarch64/get_scno.c \ + linux/aarch64/get_syscall_args.c\ + linux/aarch64/ioctls_arch0.h \ + linux/aarch64/ioctls_arch1.h \ + linux/aarch64/ioctls_inc0.h \ + linux/aarch64/ioctls_inc1.h \ + linux/aarch64/set_error.c \ + linux/aarch64/set_scno.c \ + linux/aarch64/signalent1.h \ + linux/aarch64/syscallent.h \ + linux/aarch64/syscallent1.h \ + linux/alpha/arch_getrval2.c \ + linux/alpha/arch_regs.c \ + linux/alpha/arch_regs.h \ + linux/alpha/arch_sigreturn.c \ + linux/alpha/errnoent.h \ + linux/alpha/get_error.c \ + linux/alpha/get_scno.c \ + linux/alpha/get_syscall_args.c \ + linux/alpha/get_syscall_result.c\ + linux/alpha/ioctls_arch0.h \ + linux/alpha/ioctls_inc0.h \ + linux/alpha/set_error.c \ + linux/alpha/set_scno.c \ + linux/alpha/signalent.h \ + linux/alpha/syscallent.h \ + linux/alpha/userent.h \ + linux/arc/arch_regs.c \ + linux/arc/get_error.c \ + linux/arc/get_scno.c \ + linux/arc/get_syscall_args.c \ + linux/arc/ioctls_arch0.h \ + linux/arc/ioctls_inc0.h \ + linux/arc/set_error.c \ + linux/arc/set_scno.c \ + linux/arc/syscallent.h \ + linux/arch_regs.h \ + linux/arch_sigreturn.c \ + linux/arm/arch_regs.c \ + linux/arm/arch_regs.h \ + linux/arm/arch_sigreturn.c \ + linux/arm/get_error.c \ + linux/arm/get_scno.c \ + linux/arm/get_syscall_args.c \ + linux/arm/ioctls_arch0.h \ + linux/arm/ioctls_inc0.h \ + linux/arm/set_error.c \ + linux/arm/set_scno.c \ + linux/arm/syscallent.h \ + linux/arm/userent.h \ + linux/avr32/arch_regs.c \ + linux/avr32/get_error.c \ + linux/avr32/get_scno.c \ + linux/avr32/get_syscall_args.c \ + linux/avr32/ioctls_arch0.h \ + linux/avr32/ioctls_inc0.h \ + linux/avr32/set_error.c \ + linux/avr32/set_scno.c \ + linux/avr32/syscallent.h \ + linux/avr32/userent.h \ + linux/bfin/arch_regs.c \ + linux/bfin/get_error.c \ + linux/bfin/get_scno.c \ + linux/bfin/get_syscall_args.c \ + linux/bfin/get_syscall_result.c \ + linux/bfin/ioctls_arch0.h \ + linux/bfin/ioctls_inc0.h \ + linux/bfin/set_error.c \ + linux/bfin/set_scno.c \ + linux/bfin/syscallent.h \ + linux/bfin/userent.h \ + linux/crisv10/arch_regs.c \ + linux/crisv10/arch_sigreturn.c \ + linux/crisv10/get_error.c \ + linux/crisv10/get_scno.c \ + linux/crisv10/get_syscall_args.c \ + linux/crisv10/get_syscall_result.c \ + linux/crisv10/set_error.c \ + linux/crisv10/set_scno.c \ + linux/crisv10/syscallent.h \ + linux/crisv10/userent.h \ + linux/crisv32/arch_regs.c \ + linux/crisv32/arch_sigreturn.c \ + linux/crisv32/get_error.c \ + linux/crisv32/get_scno.c \ + linux/crisv32/get_syscall_args.c \ + linux/crisv32/get_syscall_result.c \ + linux/crisv32/set_error.c \ + linux/crisv32/set_scno.c \ + linux/crisv32/syscallent.h \ + linux/crisv32/userent.h \ + linux/dummy.h \ + linux/errnoent.h \ + linux/getregs_old.h \ + linux/hppa/arch_regs.c \ + linux/hppa/arch_regs.h \ + linux/hppa/errnoent.h \ + linux/hppa/get_error.c \ + linux/hppa/get_scno.c \ + linux/hppa/get_syscall_args.c \ + linux/hppa/get_syscall_result.c \ + linux/hppa/ioctls_arch0.h \ + linux/hppa/ioctls_inc0.h \ + linux/hppa/set_error.c \ + linux/hppa/set_scno.c \ + linux/hppa/signalent.h \ + linux/hppa/syscallent.h \ + linux/i386/arch_regs.c \ + linux/i386/arch_regs.h \ + linux/i386/arch_sigreturn.c \ + linux/i386/get_error.c \ + linux/i386/get_scno.c \ + linux/i386/get_syscall_args.c \ + linux/i386/ioctls_arch0.h \ + linux/i386/ioctls_inc0.h \ + linux/i386/set_error.c \ + linux/i386/set_scno.c \ + linux/i386/syscallent.h \ + linux/i386/userent.h \ + linux/i386/userent0.h \ + linux/ia64/arch_getrval2.c \ + linux/ia64/arch_regs.c \ + linux/ia64/arch_regs.h \ + linux/ia64/arch_sigreturn.c \ + linux/ia64/get_error.c \ + linux/ia64/get_scno.c \ + linux/ia64/get_syscall_args.c \ + linux/ia64/ioctls_arch0.h \ + linux/ia64/ioctls_inc0.h \ + linux/ia64/set_error.c \ + linux/ia64/set_scno.c \ + linux/ia64/syscallent.h \ + linux/ia64/userent.h \ + linux/inet_diag.h \ + linux/m68k/arch_regs.c \ + linux/m68k/arch_regs.h \ + linux/m68k/arch_sigreturn.c \ + linux/m68k/get_error.c \ + linux/m68k/get_scno.c \ + linux/m68k/get_syscall_args.c \ + linux/m68k/ioctls_arch0.h \ + linux/m68k/ioctls_inc0.h \ + linux/m68k/set_error.c \ + linux/m68k/set_scno.c \ + linux/m68k/syscallent.h \ + linux/m68k/userent.h \ + linux/metag/arch_regs.c \ + linux/metag/get_error.c \ + linux/metag/get_scno.c \ + linux/metag/get_syscall_args.c \ + linux/metag/ioctls_arch0.h \ + linux/metag/ioctls_inc0.h \ + linux/metag/set_error.c \ + linux/metag/set_scno.c \ + linux/metag/syscallent.h \ + linux/microblaze/arch_regs.c \ + linux/microblaze/arch_sigreturn.c \ + linux/microblaze/get_error.c \ + linux/microblaze/get_scno.c \ + linux/microblaze/get_syscall_args.c \ + linux/microblaze/get_syscall_result.c \ + linux/microblaze/ioctls_arch0.h \ + linux/microblaze/ioctls_inc0.h \ + linux/microblaze/set_error.c \ + linux/microblaze/set_scno.c \ + linux/microblaze/syscallent.h \ + linux/microblaze/userent.h \ + linux/mips/arch_getrval2.c \ + linux/mips/arch_regs.c \ + linux/mips/arch_regs.h \ + linux/mips/arch_sigreturn.c \ + linux/mips/errnoent.h \ + linux/mips/genstub.sh \ + linux/mips/get_error.c \ + linux/mips/get_scno.c \ + linux/mips/get_syscall_args.c \ + linux/mips/ioctls_arch0.h \ + linux/mips/ioctls_inc0.h \ + linux/mips/set_error.c \ + linux/mips/set_scno.c \ + linux/mips/signalent.h \ + linux/mips/syscallent-compat.h \ + linux/mips/syscallent-n32.h \ + linux/mips/syscallent-n64.h \ + linux/mips/syscallent-o32.h \ + linux/mips/syscallent.h \ + linux/mips/userent.h \ + linux/mtd-abi.h \ + linux/netlink_diag.h \ + linux/nios2/arch_regs.c \ + linux/nios2/get_error.c \ + linux/nios2/get_scno.c \ + linux/nios2/get_syscall_args.c \ + linux/nios2/ioctls_arch0.h \ + linux/nios2/ioctls_inc0.h \ + linux/nios2/set_error.c \ + linux/nios2/set_scno.c \ + linux/nios2/syscallent.h \ + linux/or1k/arch_regs.c \ + linux/or1k/get_error.c \ + linux/or1k/get_scno.c \ + linux/or1k/get_syscall_args.c \ + linux/or1k/ioctls_arch0.h \ + linux/or1k/ioctls_inc0.h \ + linux/or1k/set_error.c \ + linux/or1k/set_scno.c \ + linux/or1k/syscallent.h \ + linux/or1k/userent.h \ + linux/personality.h \ + linux/powerpc/arch_regs.c \ + linux/powerpc/arch_regs.h \ + linux/powerpc/arch_sigreturn.c \ + linux/powerpc/errnoent.h \ + linux/powerpc/get_error.c \ + linux/powerpc/get_scno.c \ + linux/powerpc/get_syscall_args.c \ + linux/powerpc/getregs_old.c \ + linux/powerpc/getregs_old.h \ + linux/powerpc/ioctls_arch0.h \ + linux/powerpc/ioctls_inc0.h \ + linux/powerpc/set_error.c \ + linux/powerpc/set_scno.c \ + linux/powerpc/syscallent.h \ + linux/powerpc/userent.h \ + linux/powerpc64/arch_regs.c \ + linux/powerpc64/arch_regs.h \ + linux/powerpc64/arch_sigreturn.c \ + linux/powerpc64/errnoent.h \ + linux/powerpc64/errnoent1.h \ + linux/powerpc64/get_error.c \ + linux/powerpc64/get_scno.c \ + linux/powerpc64/get_syscall_args.c \ + linux/powerpc64/getregs_old.c \ + linux/powerpc64/getregs_old.h \ + linux/powerpc64/ioctls_arch0.h \ + linux/powerpc64/ioctls_arch1.h \ + linux/powerpc64/ioctls_inc0.h \ + linux/powerpc64/ioctls_inc1.h \ + linux/powerpc64/set_error.c \ + linux/powerpc64/set_scno.c \ + linux/powerpc64/signalent1.h \ + linux/powerpc64/syscallent.h \ + linux/powerpc64/syscallent1.h \ + linux/powerpc64/userent.h \ + linux/ptp_clock.h \ + linux/riscv/arch_regs.c \ + linux/riscv/errnoent1.h \ + linux/riscv/get_error.c \ + linux/riscv/get_scno.c \ + linux/riscv/get_syscall_args.c \ + linux/riscv/ioctls_arch0.h \ + linux/riscv/ioctls_arch1.h \ + linux/riscv/ioctls_inc0.h \ + linux/riscv/ioctls_inc1.h \ + linux/riscv/set_error.c \ + linux/riscv/set_scno.c \ + linux/riscv/signalent1.h \ + linux/riscv/syscallent.h \ + linux/riscv/syscallent1.h \ + linux/s390/arch_regs.c \ + linux/s390/arch_regs.h \ + linux/s390/arch_sigreturn.c \ + linux/s390/get_error.c \ + linux/s390/get_scno.c \ + linux/s390/get_syscall_args.c \ + linux/s390/ioctls_arch0.h \ + linux/s390/ioctls_inc0.h \ + linux/s390/set_error.c \ + linux/s390/set_scno.c \ + linux/s390/syscallent.h \ + linux/s390/userent.h \ + linux/s390/userent0.h \ + linux/s390/userent1.h \ + linux/s390x/arch_regs.c \ + linux/s390x/arch_regs.h \ + linux/s390x/arch_sigreturn.c \ + linux/s390x/get_error.c \ + linux/s390x/get_scno.c \ + linux/s390x/get_syscall_args.c \ + linux/s390x/ioctls_arch0.h \ + linux/s390x/ioctls_inc0.h \ + linux/s390x/set_error.c \ + linux/s390x/set_scno.c \ + linux/s390x/syscallent.h \ + linux/s390x/userent.h \ + linux/sh/arch_getrval2.c \ + linux/sh/arch_regs.c \ + linux/sh/get_error.c \ + linux/sh/get_scno.c \ + linux/sh/get_syscall_args.c \ + linux/sh/get_syscall_result.c \ + linux/sh/ioctls_arch0.h \ + linux/sh/ioctls_inc0.h \ + linux/sh/set_error.c \ + linux/sh/set_scno.c \ + linux/sh/syscallent.h \ + linux/sh/userent.h \ + linux/sh/userent0.h \ + linux/sh64/arch_regs.c \ + linux/sh64/arch_regs.h \ + linux/sh64/get_error.c \ + linux/sh64/get_scno.c \ + linux/sh64/get_syscall_args.c \ + linux/sh64/get_syscall_result.c \ + linux/sh64/ioctls_arch0.h \ + linux/sh64/ioctls_inc0.h \ + linux/sh64/set_error.c \ + linux/sh64/set_scno.c \ + linux/sh64/syscallent.h \ + linux/sh64/userent.h \ + linux/signalent.h \ + linux/sock_diag.h \ + linux/sparc/arch_getrval2.c \ + linux/sparc/arch_regs.c \ + linux/sparc/arch_regs.h \ + linux/sparc/arch_sigreturn.c \ + linux/sparc/errnoent.h \ + linux/sparc/gen.pl \ + linux/sparc/get_error.c \ + linux/sparc/get_scno.c \ + linux/sparc/get_syscall_args.c \ + linux/sparc/ioctls_arch0.h \ + linux/sparc/ioctls_inc0.h \ + linux/sparc/set_error.c \ + linux/sparc/set_scno.c \ + linux/sparc/signalent.h \ + linux/sparc/syscallent.h \ + linux/sparc/userent.h \ + linux/sparc64/arch_getrval2.c \ + linux/sparc64/arch_regs.c \ + linux/sparc64/arch_regs.h \ + linux/sparc64/arch_sigreturn.c \ + linux/sparc64/errnoent.h \ + linux/sparc64/errnoent1.h \ + linux/sparc64/get_error.c \ + linux/sparc64/get_scno.c \ + linux/sparc64/get_syscall_args.c\ + linux/sparc64/ioctls_arch0.h \ + linux/sparc64/ioctls_arch1.h \ + linux/sparc64/ioctls_inc0.h \ + linux/sparc64/ioctls_inc1.h \ + linux/sparc64/set_error.c \ + linux/sparc64/set_scno.c \ + linux/sparc64/signalent.h \ + linux/sparc64/signalent1.h \ + linux/sparc64/syscallent.h \ + linux/sparc64/syscallent1.h \ + linux/sparc64/userent.h \ + linux/subcall.h \ + linux/syscall.h \ + linux/tile/arch_regs.c \ + linux/tile/arch_regs.h \ + linux/tile/arch_sigreturn.c \ + linux/tile/errnoent1.h \ + linux/tile/get_error.c \ + linux/tile/get_scno.c \ + linux/tile/get_syscall_args.c \ + linux/tile/ioctls_arch0.h \ + linux/tile/ioctls_arch1.h \ + linux/tile/ioctls_inc0.h \ + linux/tile/ioctls_inc1.h \ + linux/tile/set_error.c \ + linux/tile/set_scno.c \ + linux/tile/signalent1.h \ + linux/tile/syscallent.h \ + linux/tile/syscallent1.h \ + linux/tile/userent.h \ + linux/ubi-user.h \ + linux/unix_diag.h \ + linux/userent.h \ + linux/userent0.h \ + linux/x32/arch_regs.c \ + linux/x32/arch_regs.h \ + linux/x32/arch_sigreturn.c \ + linux/x32/errnoent1.h \ + linux/x32/get_error.c \ + linux/x32/get_scno.c \ + linux/x32/get_syscall_args.c \ + linux/x32/ioctls_arch0.h \ + linux/x32/ioctls_arch1.h \ + linux/x32/ioctls_inc0.h \ + linux/x32/ioctls_inc1.h \ + linux/x32/set_error.c \ + linux/x32/set_scno.c \ + linux/x32/signalent1.h \ + linux/x32/syscallent.h \ + linux/x32/syscallent1.h \ + linux/x32/userent.h \ + linux/x86_64/arch_regs.c \ + linux/x86_64/arch_regs.h \ + linux/x86_64/arch_sigreturn.c \ + linux/x86_64/errnoent1.h \ + linux/x86_64/errnoent2.h \ + linux/x86_64/gentab.pl \ + linux/x86_64/get_error.c \ + linux/x86_64/get_scno.c \ + linux/x86_64/get_syscall_args.c \ + linux/x86_64/getregs_old.c \ + linux/x86_64/getregs_old.h \ + linux/x86_64/ioctls_arch0.h \ + linux/x86_64/ioctls_arch1.h \ + linux/x86_64/ioctls_arch2.h \ + linux/x86_64/ioctls_inc0.h \ + linux/x86_64/ioctls_inc1.h \ + linux/x86_64/ioctls_inc2.h \ + linux/x86_64/set_error.c \ + linux/x86_64/set_scno.c \ + linux/x86_64/signalent1.h \ + linux/x86_64/signalent2.h \ + linux/x86_64/syscallent.h \ + linux/x86_64/syscallent1.h \ + linux/x86_64/syscallent2.h \ + linux/x86_64/userent.h \ + linux/xtensa/arch_regs.c \ + linux/xtensa/get_error.c \ + linux/xtensa/get_scno.c \ + linux/xtensa/get_syscall_args.c \ + linux/xtensa/get_syscall_result.c \ + linux/xtensa/ioctls_arch0.h \ + linux/xtensa/ioctls_inc0.h \ + linux/xtensa/set_error.c \ + linux/xtensa/set_scno.c \ + linux/xtensa/syscallent.h \ + linux/xtensa/userent.h \ + maint/ioctls_gen.sh \ + maint/ioctls_hex.sh \ + maint/ioctls_sym.sh \ + maint/print_ioctlent.c \ + mpers.awk \ + mpers.sh \ + mpers_test.sh \ + mpers_xlat.h \ + scno.head \ + signalent.sh \ + strace-graph \ + strace-log-merge \ + strace.spec \ + syscallent.sh \ + $(XLAT_INPUT_FILES) \ + $(XLAT_HEADER_FILES) \ + xlat/gen.sh \ + xlate.el + +strace_SOURCES_c = \ + $(filter %.c,$(strace_SOURCES)) $(filter %.c,$(libstrace_a_SOURCES)) + +syscallent_names = subcall.h syscallent.h syscallent1.h \ + syscallent-n32.h syscallent-n64.h syscallent-o32.h + +syscallent_patterns = $(patsubst %,\%/%,$(syscallent_names)) +syscallent_files = $(filter $(syscallent_patterns),$(EXTRA_DIST)) +today = $(shell date +%Y-%m-%d) +version_regexp = $(subst .,\.,$(VERSION)) +news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))' +ioctlsort_CC = $(CC_FOR_BUILD) +ioctlsort_DEFS = $(DEFS) +ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES) +ioctlsort_CPPFLAGS = $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) +ioctlsort_CFLAGS = $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) +ioctlsort_LDFLAGS = $(AM_LDFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) +ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h) +ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h)) +ioctl_redefs_h = $(filter-out ioctl_redefs0.h,$(subst ioctlent,ioctl_redefs,$(ioctlent_h))) +BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) native_printer_decls.h \ + native_printer_defs.h printers.h sen.h sys_func.h .version \ + $(am__append_7) $(am__append_11) +CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ + ioctl_iocdef.h ioctl_iocdef.i native_printer_decls.h \ + native_printer_defs.h printers.h sen.h sys_func.h syscallent.i \ + scno.h $(am__append_8) $(am__append_12) +DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h +SCNO_CPPFLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(ARCH_MFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) + +digits = [[:digit:]][[:digit:]]* +al_nums = [[:alnum:]_][[:alnum:]_]* +SCNO_SED = /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 + +# Generated by ./generate_mpers_am.sh; do not edit. +mpers_source_files = 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 + +# defines mpers_source_files +srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files)) +mpers_preproc_files = $(mpers_source_files:.c=.c.mpers.i) +mpers_NAME = +mpers_PREFIX = $(mpers_NAME)_ +mpers_DEFS = $(DEFS) +mpers_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES) +mpers_CPPFLAGS = $(strace_CPPFLAGS) $(CPPFLAGS) +mpers_sh_opts = $(mpers_DEFS) $(mpers_INCLUDES) $(mpers_CPPFLAGS) +libmpers_CPPFLAGS = $(strace_CPPFLAGS) -DIN_MPERS +libmpers_CFLAGS = $(strace_CFLAGS) +mpers_printer_decl_pattern = ^MPERS_PRINTER_DECL\(([^,)]+),[[:space:]]*([^,)]+),[[:space:]]*([^)]+)\)$$ +libmpers_m32_a_SOURCES = $(mpers_source_files) +libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32 +libmpers_m32_a_CFLAGS = $(libmpers_CFLAGS) +mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h +libmpers_mx32_a_SOURCES = $(mpers_source_files) +libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32 +libmpers_mx32_a_CFLAGS = $(libmpers_CFLAGS) +mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h +#gen_changelog_start_date = 2009-07-08 20:00 +all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(srcdir)/xlat/Makemodule.am $(srcdir)/scno.am $(srcdir)/mpers.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/xlat/Makemodule.am $(srcdir)/scno.am $(srcdir)/mpers.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: # $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: # $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +strace.spec: $(top_builddir)/config.status $(srcdir)/strace.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +debian/changelog: $(top_builddir)/config.status $(top_srcdir)/debian/changelog.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +libmpers-m32.a: $(libmpers_m32_a_OBJECTS) $(libmpers_m32_a_DEPENDENCIES) $(EXTRA_libmpers_m32_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmpers-m32.a + $(AM_V_AR)$(libmpers_m32_a_AR) libmpers-m32.a $(libmpers_m32_a_OBJECTS) $(libmpers_m32_a_LIBADD) + $(AM_V_at)$(RANLIB) libmpers-m32.a + +libmpers-mx32.a: $(libmpers_mx32_a_OBJECTS) $(libmpers_mx32_a_DEPENDENCIES) $(EXTRA_libmpers_mx32_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmpers-mx32.a + $(AM_V_AR)$(libmpers_mx32_a_AR) libmpers-mx32.a $(libmpers_mx32_a_OBJECTS) $(libmpers_mx32_a_LIBADD) + $(AM_V_at)$(RANLIB) libmpers-mx32.a + +libstrace.a: $(libstrace_a_OBJECTS) $(libstrace_a_DEPENDENCIES) $(EXTRA_libstrace_a_DEPENDENCIES) + $(AM_V_at)-rm -f libstrace.a + $(AM_V_AR)$(libstrace_a_AR) libstrace.a $(libstrace_a_OBJECTS) $(libstrace_a_LIBADD) + $(AM_V_at)$(RANLIB) libstrace.a +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +strace$(EXEEXT): $(strace_OBJECTS) $(strace_DEPENDENCIES) $(EXTRA_strace_DEPENDENCIES) + @rm -f strace$(EXEEXT) + $(AM_V_CCLD)$(strace_LINK) $(strace_OBJECTS) $(strace_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/libmpers_m32_a-block.Po +include ./$(DEPDIR)/libmpers_m32_a-btrfs.Po +include ./$(DEPDIR)/libmpers_m32_a-dirent.Po +include ./$(DEPDIR)/libmpers_m32_a-evdev.Po +include ./$(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Po +include ./$(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Po +include ./$(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Po +include ./$(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Po +include ./$(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Po +include ./$(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Po +include ./$(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Po +include ./$(DEPDIR)/libmpers_m32_a-hdio.Po +include ./$(DEPDIR)/libmpers_m32_a-ipc_msgctl.Po +include ./$(DEPDIR)/libmpers_m32_a-ipc_shmctl.Po +include ./$(DEPDIR)/libmpers_m32_a-loop.Po +include ./$(DEPDIR)/libmpers_m32_a-mtd.Po +include ./$(DEPDIR)/libmpers_m32_a-print_mq_attr.Po +include ./$(DEPDIR)/libmpers_m32_a-print_msgbuf.Po +include ./$(DEPDIR)/libmpers_m32_a-print_sg_req_info.Po +include ./$(DEPDIR)/libmpers_m32_a-print_sigevent.Po +include ./$(DEPDIR)/libmpers_m32_a-print_time.Po +include ./$(DEPDIR)/libmpers_m32_a-print_timespec.Po +include ./$(DEPDIR)/libmpers_m32_a-print_timeval.Po +include ./$(DEPDIR)/libmpers_m32_a-print_timex.Po +include ./$(DEPDIR)/libmpers_m32_a-printrusage.Po +include ./$(DEPDIR)/libmpers_m32_a-printsiginfo.Po +include ./$(DEPDIR)/libmpers_m32_a-rtc.Po +include ./$(DEPDIR)/libmpers_m32_a-sg_io_v3.Po +include ./$(DEPDIR)/libmpers_m32_a-sigaltstack.Po +include ./$(DEPDIR)/libmpers_m32_a-sock.Po +include ./$(DEPDIR)/libmpers_m32_a-sysinfo.Po +include ./$(DEPDIR)/libmpers_m32_a-times.Po +include ./$(DEPDIR)/libmpers_m32_a-ustat.Po +include ./$(DEPDIR)/libmpers_m32_a-utime.Po +include ./$(DEPDIR)/libmpers_m32_a-v4l2.Po +include ./$(DEPDIR)/libmpers_mx32_a-block.Po +include ./$(DEPDIR)/libmpers_mx32_a-btrfs.Po +include ./$(DEPDIR)/libmpers_mx32_a-dirent.Po +include ./$(DEPDIR)/libmpers_mx32_a-evdev.Po +include ./$(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Po +include ./$(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Po +include ./$(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Po +include ./$(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Po +include ./$(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Po +include ./$(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Po +include ./$(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Po +include ./$(DEPDIR)/libmpers_mx32_a-hdio.Po +include ./$(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Po +include ./$(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Po +include ./$(DEPDIR)/libmpers_mx32_a-loop.Po +include ./$(DEPDIR)/libmpers_mx32_a-mtd.Po +include ./$(DEPDIR)/libmpers_mx32_a-print_mq_attr.Po +include ./$(DEPDIR)/libmpers_mx32_a-print_msgbuf.Po +include ./$(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Po +include ./$(DEPDIR)/libmpers_mx32_a-print_sigevent.Po +include ./$(DEPDIR)/libmpers_mx32_a-print_time.Po +include ./$(DEPDIR)/libmpers_mx32_a-print_timespec.Po +include ./$(DEPDIR)/libmpers_mx32_a-print_timeval.Po +include ./$(DEPDIR)/libmpers_mx32_a-print_timex.Po +include ./$(DEPDIR)/libmpers_mx32_a-printrusage.Po +include ./$(DEPDIR)/libmpers_mx32_a-printsiginfo.Po +include ./$(DEPDIR)/libmpers_mx32_a-rtc.Po +include ./$(DEPDIR)/libmpers_mx32_a-sg_io_v3.Po +include ./$(DEPDIR)/libmpers_mx32_a-sigaltstack.Po +include ./$(DEPDIR)/libmpers_mx32_a-sock.Po +include ./$(DEPDIR)/libmpers_mx32_a-sysinfo.Po +include ./$(DEPDIR)/libmpers_mx32_a-times.Po +include ./$(DEPDIR)/libmpers_mx32_a-ustat.Po +include ./$(DEPDIR)/libmpers_mx32_a-utime.Po +include ./$(DEPDIR)/libmpers_mx32_a-v4l2.Po +include ./$(DEPDIR)/libstrace_a-fstatfs.Po +include ./$(DEPDIR)/libstrace_a-fstatfs64.Po +include ./$(DEPDIR)/libstrace_a-ipc.Po +include ./$(DEPDIR)/libstrace_a-socketcall.Po +include ./$(DEPDIR)/libstrace_a-statfs.Po +include ./$(DEPDIR)/libstrace_a-statfs64.Po +include ./$(DEPDIR)/libstrace_a-sync_file_range.Po +include ./$(DEPDIR)/libstrace_a-sync_file_range2.Po +include ./$(DEPDIR)/libstrace_a-upeek.Po +include ./$(DEPDIR)/libstrace_a-upoke.Po +include ./$(DEPDIR)/strace-access.Po +include ./$(DEPDIR)/strace-affinity.Po +include ./$(DEPDIR)/strace-aio.Po +include ./$(DEPDIR)/strace-alpha.Po +include ./$(DEPDIR)/strace-bjm.Po +include ./$(DEPDIR)/strace-block.Po +include ./$(DEPDIR)/strace-bpf.Po +include ./$(DEPDIR)/strace-btrfs.Po +include ./$(DEPDIR)/strace-cacheflush.Po +include ./$(DEPDIR)/strace-capability.Po +include ./$(DEPDIR)/strace-chdir.Po +include ./$(DEPDIR)/strace-chmod.Po +include ./$(DEPDIR)/strace-clone.Po +include ./$(DEPDIR)/strace-copy_file_range.Po +include ./$(DEPDIR)/strace-count.Po +include ./$(DEPDIR)/strace-desc.Po +include ./$(DEPDIR)/strace-dirent.Po +include ./$(DEPDIR)/strace-dirent64.Po +include ./$(DEPDIR)/strace-dm.Po +include ./$(DEPDIR)/strace-epoll.Po +include ./$(DEPDIR)/strace-evdev.Po +include ./$(DEPDIR)/strace-eventfd.Po +include ./$(DEPDIR)/strace-execve.Po +include ./$(DEPDIR)/strace-fadvise.Po +include ./$(DEPDIR)/strace-fallocate.Po +include ./$(DEPDIR)/strace-fanotify.Po +include ./$(DEPDIR)/strace-fchownat.Po +include ./$(DEPDIR)/strace-fcntl.Po +include ./$(DEPDIR)/strace-fetch_seccomp_fprog.Po +include ./$(DEPDIR)/strace-fetch_struct_flock.Po +include ./$(DEPDIR)/strace-fetch_struct_mmsghdr.Po +include ./$(DEPDIR)/strace-fetch_struct_msghdr.Po +include ./$(DEPDIR)/strace-fetch_struct_stat.Po +include ./$(DEPDIR)/strace-fetch_struct_stat64.Po +include ./$(DEPDIR)/strace-fetch_struct_statfs.Po +include ./$(DEPDIR)/strace-file_handle.Po +include ./$(DEPDIR)/strace-file_ioctl.Po +include ./$(DEPDIR)/strace-flock.Po +include ./$(DEPDIR)/strace-fs_x_ioctl.Po +include ./$(DEPDIR)/strace-futex.Po +include ./$(DEPDIR)/strace-get_robust_list.Po +include ./$(DEPDIR)/strace-getcpu.Po +include ./$(DEPDIR)/strace-getcwd.Po +include ./$(DEPDIR)/strace-getrandom.Po +include ./$(DEPDIR)/strace-hdio.Po +include ./$(DEPDIR)/strace-hostname.Po +include ./$(DEPDIR)/strace-inotify.Po +include ./$(DEPDIR)/strace-io.Po +include ./$(DEPDIR)/strace-ioctl.Po +include ./$(DEPDIR)/strace-ioperm.Po +include ./$(DEPDIR)/strace-iopl.Po +include ./$(DEPDIR)/strace-ioprio.Po +include ./$(DEPDIR)/strace-ipc_msg.Po +include ./$(DEPDIR)/strace-ipc_msgctl.Po +include ./$(DEPDIR)/strace-ipc_sem.Po +include ./$(DEPDIR)/strace-ipc_shm.Po +include ./$(DEPDIR)/strace-ipc_shmctl.Po +include ./$(DEPDIR)/strace-kcmp.Po +include ./$(DEPDIR)/strace-kexec.Po +include ./$(DEPDIR)/strace-keyctl.Po +include ./$(DEPDIR)/strace-ldt.Po +include ./$(DEPDIR)/strace-link.Po +include ./$(DEPDIR)/strace-lookup_dcookie.Po +include ./$(DEPDIR)/strace-loop.Po +include ./$(DEPDIR)/strace-lseek.Po +include ./$(DEPDIR)/strace-mem.Po +include ./$(DEPDIR)/strace-membarrier.Po +include ./$(DEPDIR)/strace-memfd_create.Po +include ./$(DEPDIR)/strace-mknod.Po +include ./$(DEPDIR)/strace-mmsghdr.Po +include ./$(DEPDIR)/strace-mount.Po +include ./$(DEPDIR)/strace-mq.Po +include ./$(DEPDIR)/strace-msghdr.Po +include ./$(DEPDIR)/strace-mtd.Po +include ./$(DEPDIR)/strace-net.Po +include ./$(DEPDIR)/strace-netlink.Po +include ./$(DEPDIR)/strace-numa.Po +include ./$(DEPDIR)/strace-oldstat.Po +include ./$(DEPDIR)/strace-open.Po +include ./$(DEPDIR)/strace-or1k_atomic.Po +include ./$(DEPDIR)/strace-pathtrace.Po +include ./$(DEPDIR)/strace-perf.Po +include ./$(DEPDIR)/strace-personality.Po +include ./$(DEPDIR)/strace-pkeys.Po +include ./$(DEPDIR)/strace-poll.Po +include ./$(DEPDIR)/strace-prctl.Po +include ./$(DEPDIR)/strace-print_dev_t.Po +include ./$(DEPDIR)/strace-print_mq_attr.Po +include ./$(DEPDIR)/strace-print_msgbuf.Po +include ./$(DEPDIR)/strace-print_sg_req_info.Po +include ./$(DEPDIR)/strace-print_sigevent.Po +include ./$(DEPDIR)/strace-print_statfs.Po +include ./$(DEPDIR)/strace-print_struct_stat.Po +include ./$(DEPDIR)/strace-print_time.Po +include ./$(DEPDIR)/strace-print_timespec.Po +include ./$(DEPDIR)/strace-print_timeval.Po +include ./$(DEPDIR)/strace-print_timex.Po +include ./$(DEPDIR)/strace-printmode.Po +include ./$(DEPDIR)/strace-printrusage.Po +include ./$(DEPDIR)/strace-printsiginfo.Po +include ./$(DEPDIR)/strace-process.Po +include ./$(DEPDIR)/strace-process_vm.Po +include ./$(DEPDIR)/strace-ptp.Po +include ./$(DEPDIR)/strace-qualify.Po +include ./$(DEPDIR)/strace-quota.Po +include ./$(DEPDIR)/strace-readahead.Po +include ./$(DEPDIR)/strace-readlink.Po +include ./$(DEPDIR)/strace-reboot.Po +include ./$(DEPDIR)/strace-renameat.Po +include ./$(DEPDIR)/strace-resource.Po +include ./$(DEPDIR)/strace-rtc.Po +include ./$(DEPDIR)/strace-sched.Po +include ./$(DEPDIR)/strace-scsi.Po +include ./$(DEPDIR)/strace-seccomp.Po +include ./$(DEPDIR)/strace-sendfile.Po +include ./$(DEPDIR)/strace-sg_io_v3.Po +include ./$(DEPDIR)/strace-sg_io_v4.Po +include ./$(DEPDIR)/strace-sigaltstack.Po +include ./$(DEPDIR)/strace-signal.Po +include ./$(DEPDIR)/strace-signalfd.Po +include ./$(DEPDIR)/strace-sigreturn.Po +include ./$(DEPDIR)/strace-sock.Po +include ./$(DEPDIR)/strace-sockaddr.Po +include ./$(DEPDIR)/strace-socketutils.Po +include ./$(DEPDIR)/strace-sram_alloc.Po +include ./$(DEPDIR)/strace-stat.Po +include ./$(DEPDIR)/strace-stat64.Po +include ./$(DEPDIR)/strace-statfs.Po +include ./$(DEPDIR)/strace-strace.Po +include ./$(DEPDIR)/strace-swapon.Po +include ./$(DEPDIR)/strace-syscall.Po +include ./$(DEPDIR)/strace-sysctl.Po +include ./$(DEPDIR)/strace-sysinfo.Po +include ./$(DEPDIR)/strace-syslog.Po +include ./$(DEPDIR)/strace-sysmips.Po +include ./$(DEPDIR)/strace-term.Po +include ./$(DEPDIR)/strace-time.Po +include ./$(DEPDIR)/strace-times.Po +include ./$(DEPDIR)/strace-truncate.Po +include ./$(DEPDIR)/strace-ubi.Po +include ./$(DEPDIR)/strace-uid.Po +include ./$(DEPDIR)/strace-uid16.Po +include ./$(DEPDIR)/strace-umask.Po +include ./$(DEPDIR)/strace-umount.Po +include ./$(DEPDIR)/strace-uname.Po +include ./$(DEPDIR)/strace-unwind.Po +include ./$(DEPDIR)/strace-userfaultfd.Po +include ./$(DEPDIR)/strace-ustat.Po +include ./$(DEPDIR)/strace-util.Po +include ./$(DEPDIR)/strace-utime.Po +include ./$(DEPDIR)/strace-utimes.Po +include ./$(DEPDIR)/strace-v4l2.Po +include ./$(DEPDIR)/strace-wait.Po +include ./$(DEPDIR)/strace-xattr.Po +include ./$(DEPDIR)/strace-xmalloc.Po + +.c.o: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +libmpers_m32_a-block.o: block.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-block.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-block.Tpo -c -o libmpers_m32_a-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-block.Tpo $(DEPDIR)/libmpers_m32_a-block.Po +# $(AM_V_CC)source='block.c' object='libmpers_m32_a-block.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c + +libmpers_m32_a-block.obj: block.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-block.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-block.Tpo -c -o libmpers_m32_a-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-block.Tpo $(DEPDIR)/libmpers_m32_a-block.Po +# $(AM_V_CC)source='block.c' object='libmpers_m32_a-block.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` + +libmpers_m32_a-btrfs.o: btrfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-btrfs.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-btrfs.Tpo -c -o libmpers_m32_a-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-btrfs.Tpo $(DEPDIR)/libmpers_m32_a-btrfs.Po +# $(AM_V_CC)source='btrfs.c' object='libmpers_m32_a-btrfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c + +libmpers_m32_a-btrfs.obj: btrfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-btrfs.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-btrfs.Tpo -c -o libmpers_m32_a-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-btrfs.Tpo $(DEPDIR)/libmpers_m32_a-btrfs.Po +# $(AM_V_CC)source='btrfs.c' object='libmpers_m32_a-btrfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` + +libmpers_m32_a-dirent.o: dirent.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-dirent.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-dirent.Tpo -c -o libmpers_m32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-dirent.Tpo $(DEPDIR)/libmpers_m32_a-dirent.Po +# $(AM_V_CC)source='dirent.c' object='libmpers_m32_a-dirent.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c + +libmpers_m32_a-dirent.obj: dirent.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-dirent.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-dirent.Tpo -c -o libmpers_m32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-dirent.Tpo $(DEPDIR)/libmpers_m32_a-dirent.Po +# $(AM_V_CC)source='dirent.c' object='libmpers_m32_a-dirent.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` + +libmpers_m32_a-evdev.o: evdev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-evdev.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-evdev.Tpo -c -o libmpers_m32_a-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-evdev.Tpo $(DEPDIR)/libmpers_m32_a-evdev.Po +# $(AM_V_CC)source='evdev.c' object='libmpers_m32_a-evdev.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c + +libmpers_m32_a-evdev.obj: evdev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-evdev.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-evdev.Tpo -c -o libmpers_m32_a-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-evdev.Tpo $(DEPDIR)/libmpers_m32_a-evdev.Po +# $(AM_V_CC)source='evdev.c' object='libmpers_m32_a-evdev.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` + +libmpers_m32_a-fetch_seccomp_fprog.o: fetch_seccomp_fprog.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_seccomp_fprog.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_m32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Po +# $(AM_V_CC)source='fetch_seccomp_fprog.c' object='libmpers_m32_a-fetch_seccomp_fprog.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c + +libmpers_m32_a-fetch_seccomp_fprog.obj: fetch_seccomp_fprog.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_seccomp_fprog.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_m32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Po +# $(AM_V_CC)source='fetch_seccomp_fprog.c' object='libmpers_m32_a-fetch_seccomp_fprog.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` + +libmpers_m32_a-fetch_struct_flock.o: fetch_struct_flock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_flock.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo -c -o libmpers_m32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Po +# $(AM_V_CC)source='fetch_struct_flock.c' object='libmpers_m32_a-fetch_struct_flock.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c + +libmpers_m32_a-fetch_struct_flock.obj: fetch_struct_flock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_flock.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo -c -o libmpers_m32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Po +# $(AM_V_CC)source='fetch_struct_flock.c' object='libmpers_m32_a-fetch_struct_flock.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` + +libmpers_m32_a-fetch_struct_mmsghdr.o: fetch_struct_mmsghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_mmsghdr.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Tpo -c -o libmpers_m32_a-fetch_struct_mmsghdr.o `test -f 'fetch_struct_mmsghdr.c' || echo '$(srcdir)/'`fetch_struct_mmsghdr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Po +# $(AM_V_CC)source='fetch_struct_mmsghdr.c' object='libmpers_m32_a-fetch_struct_mmsghdr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_mmsghdr.o `test -f 'fetch_struct_mmsghdr.c' || echo '$(srcdir)/'`fetch_struct_mmsghdr.c + +libmpers_m32_a-fetch_struct_mmsghdr.obj: fetch_struct_mmsghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_mmsghdr.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Tpo -c -o libmpers_m32_a-fetch_struct_mmsghdr.obj `if test -f 'fetch_struct_mmsghdr.c'; then $(CYGPATH_W) 'fetch_struct_mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_mmsghdr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Po +# $(AM_V_CC)source='fetch_struct_mmsghdr.c' object='libmpers_m32_a-fetch_struct_mmsghdr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_mmsghdr.obj `if test -f 'fetch_struct_mmsghdr.c'; then $(CYGPATH_W) 'fetch_struct_mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_mmsghdr.c'; fi` + +libmpers_m32_a-fetch_struct_msghdr.o: fetch_struct_msghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_msghdr.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Tpo -c -o libmpers_m32_a-fetch_struct_msghdr.o `test -f 'fetch_struct_msghdr.c' || echo '$(srcdir)/'`fetch_struct_msghdr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Po +# $(AM_V_CC)source='fetch_struct_msghdr.c' object='libmpers_m32_a-fetch_struct_msghdr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_msghdr.o `test -f 'fetch_struct_msghdr.c' || echo '$(srcdir)/'`fetch_struct_msghdr.c + +libmpers_m32_a-fetch_struct_msghdr.obj: fetch_struct_msghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_msghdr.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Tpo -c -o libmpers_m32_a-fetch_struct_msghdr.obj `if test -f 'fetch_struct_msghdr.c'; then $(CYGPATH_W) 'fetch_struct_msghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_msghdr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Po +# $(AM_V_CC)source='fetch_struct_msghdr.c' object='libmpers_m32_a-fetch_struct_msghdr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_msghdr.obj `if test -f 'fetch_struct_msghdr.c'; then $(CYGPATH_W) 'fetch_struct_msghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_msghdr.c'; fi` + +libmpers_m32_a-fetch_struct_stat.o: fetch_struct_stat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_stat.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Tpo -c -o libmpers_m32_a-fetch_struct_stat.o `test -f 'fetch_struct_stat.c' || echo '$(srcdir)/'`fetch_struct_stat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Po +# $(AM_V_CC)source='fetch_struct_stat.c' object='libmpers_m32_a-fetch_struct_stat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_stat.o `test -f 'fetch_struct_stat.c' || echo '$(srcdir)/'`fetch_struct_stat.c + +libmpers_m32_a-fetch_struct_stat.obj: fetch_struct_stat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_stat.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Tpo -c -o libmpers_m32_a-fetch_struct_stat.obj `if test -f 'fetch_struct_stat.c'; then $(CYGPATH_W) 'fetch_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Po +# $(AM_V_CC)source='fetch_struct_stat.c' object='libmpers_m32_a-fetch_struct_stat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_stat.obj `if test -f 'fetch_struct_stat.c'; then $(CYGPATH_W) 'fetch_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat.c'; fi` + +libmpers_m32_a-fetch_struct_stat64.o: fetch_struct_stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_stat64.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Tpo -c -o libmpers_m32_a-fetch_struct_stat64.o `test -f 'fetch_struct_stat64.c' || echo '$(srcdir)/'`fetch_struct_stat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Po +# $(AM_V_CC)source='fetch_struct_stat64.c' object='libmpers_m32_a-fetch_struct_stat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_stat64.o `test -f 'fetch_struct_stat64.c' || echo '$(srcdir)/'`fetch_struct_stat64.c + +libmpers_m32_a-fetch_struct_stat64.obj: fetch_struct_stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_stat64.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Tpo -c -o libmpers_m32_a-fetch_struct_stat64.obj `if test -f 'fetch_struct_stat64.c'; then $(CYGPATH_W) 'fetch_struct_stat64.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Po +# $(AM_V_CC)source='fetch_struct_stat64.c' object='libmpers_m32_a-fetch_struct_stat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_stat64.obj `if test -f 'fetch_struct_stat64.c'; then $(CYGPATH_W) 'fetch_struct_stat64.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat64.c'; fi` + +libmpers_m32_a-fetch_struct_statfs.o: fetch_struct_statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_statfs.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Tpo -c -o libmpers_m32_a-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Po +# $(AM_V_CC)source='fetch_struct_statfs.c' object='libmpers_m32_a-fetch_struct_statfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c + +libmpers_m32_a-fetch_struct_statfs.obj: fetch_struct_statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_statfs.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Tpo -c -o libmpers_m32_a-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Po +# $(AM_V_CC)source='fetch_struct_statfs.c' object='libmpers_m32_a-fetch_struct_statfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` + +libmpers_m32_a-hdio.o: hdio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-hdio.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-hdio.Tpo -c -o libmpers_m32_a-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-hdio.Tpo $(DEPDIR)/libmpers_m32_a-hdio.Po +# $(AM_V_CC)source='hdio.c' object='libmpers_m32_a-hdio.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c + +libmpers_m32_a-hdio.obj: hdio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-hdio.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-hdio.Tpo -c -o libmpers_m32_a-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-hdio.Tpo $(DEPDIR)/libmpers_m32_a-hdio.Po +# $(AM_V_CC)source='hdio.c' object='libmpers_m32_a-hdio.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` + +libmpers_m32_a-ipc_msgctl.o: ipc_msgctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_msgctl.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo -c -o libmpers_m32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Po +# $(AM_V_CC)source='ipc_msgctl.c' object='libmpers_m32_a-ipc_msgctl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c + +libmpers_m32_a-ipc_msgctl.obj: ipc_msgctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_msgctl.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo -c -o libmpers_m32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Po +# $(AM_V_CC)source='ipc_msgctl.c' object='libmpers_m32_a-ipc_msgctl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` + +libmpers_m32_a-ipc_shmctl.o: ipc_shmctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_shmctl.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo -c -o libmpers_m32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Po +# $(AM_V_CC)source='ipc_shmctl.c' object='libmpers_m32_a-ipc_shmctl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c + +libmpers_m32_a-ipc_shmctl.obj: ipc_shmctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_shmctl.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo -c -o libmpers_m32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Po +# $(AM_V_CC)source='ipc_shmctl.c' object='libmpers_m32_a-ipc_shmctl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` + +libmpers_m32_a-loop.o: loop.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-loop.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-loop.Tpo -c -o libmpers_m32_a-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-loop.Tpo $(DEPDIR)/libmpers_m32_a-loop.Po +# $(AM_V_CC)source='loop.c' object='libmpers_m32_a-loop.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c + +libmpers_m32_a-loop.obj: loop.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-loop.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-loop.Tpo -c -o libmpers_m32_a-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-loop.Tpo $(DEPDIR)/libmpers_m32_a-loop.Po +# $(AM_V_CC)source='loop.c' object='libmpers_m32_a-loop.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` + +libmpers_m32_a-mtd.o: mtd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-mtd.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-mtd.Tpo -c -o libmpers_m32_a-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-mtd.Tpo $(DEPDIR)/libmpers_m32_a-mtd.Po +# $(AM_V_CC)source='mtd.c' object='libmpers_m32_a-mtd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c + +libmpers_m32_a-mtd.obj: mtd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-mtd.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-mtd.Tpo -c -o libmpers_m32_a-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-mtd.Tpo $(DEPDIR)/libmpers_m32_a-mtd.Po +# $(AM_V_CC)source='mtd.c' object='libmpers_m32_a-mtd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` + +libmpers_m32_a-print_mq_attr.o: print_mq_attr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_mq_attr.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo -c -o libmpers_m32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo $(DEPDIR)/libmpers_m32_a-print_mq_attr.Po +# $(AM_V_CC)source='print_mq_attr.c' object='libmpers_m32_a-print_mq_attr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c + +libmpers_m32_a-print_mq_attr.obj: print_mq_attr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_mq_attr.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo -c -o libmpers_m32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo $(DEPDIR)/libmpers_m32_a-print_mq_attr.Po +# $(AM_V_CC)source='print_mq_attr.c' object='libmpers_m32_a-print_mq_attr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` + +libmpers_m32_a-print_msgbuf.o: print_msgbuf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_msgbuf.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo -c -o libmpers_m32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo $(DEPDIR)/libmpers_m32_a-print_msgbuf.Po +# $(AM_V_CC)source='print_msgbuf.c' object='libmpers_m32_a-print_msgbuf.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c + +libmpers_m32_a-print_msgbuf.obj: print_msgbuf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_msgbuf.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo -c -o libmpers_m32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo $(DEPDIR)/libmpers_m32_a-print_msgbuf.Po +# $(AM_V_CC)source='print_msgbuf.c' object='libmpers_m32_a-print_msgbuf.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` + +libmpers_m32_a-print_sg_req_info.o: print_sg_req_info.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_sg_req_info.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_sg_req_info.Tpo -c -o libmpers_m32_a-print_sg_req_info.o `test -f 'print_sg_req_info.c' || echo '$(srcdir)/'`print_sg_req_info.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_sg_req_info.Tpo $(DEPDIR)/libmpers_m32_a-print_sg_req_info.Po +# $(AM_V_CC)source='print_sg_req_info.c' object='libmpers_m32_a-print_sg_req_info.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_sg_req_info.o `test -f 'print_sg_req_info.c' || echo '$(srcdir)/'`print_sg_req_info.c + +libmpers_m32_a-print_sg_req_info.obj: print_sg_req_info.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_sg_req_info.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_sg_req_info.Tpo -c -o libmpers_m32_a-print_sg_req_info.obj `if test -f 'print_sg_req_info.c'; then $(CYGPATH_W) 'print_sg_req_info.c'; else $(CYGPATH_W) '$(srcdir)/print_sg_req_info.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_sg_req_info.Tpo $(DEPDIR)/libmpers_m32_a-print_sg_req_info.Po +# $(AM_V_CC)source='print_sg_req_info.c' object='libmpers_m32_a-print_sg_req_info.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_sg_req_info.obj `if test -f 'print_sg_req_info.c'; then $(CYGPATH_W) 'print_sg_req_info.c'; else $(CYGPATH_W) '$(srcdir)/print_sg_req_info.c'; fi` + +libmpers_m32_a-print_sigevent.o: print_sigevent.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_sigevent.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo -c -o libmpers_m32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo $(DEPDIR)/libmpers_m32_a-print_sigevent.Po +# $(AM_V_CC)source='print_sigevent.c' object='libmpers_m32_a-print_sigevent.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c + +libmpers_m32_a-print_sigevent.obj: print_sigevent.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_sigevent.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo -c -o libmpers_m32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo $(DEPDIR)/libmpers_m32_a-print_sigevent.Po +# $(AM_V_CC)source='print_sigevent.c' object='libmpers_m32_a-print_sigevent.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` + +libmpers_m32_a-print_time.o: print_time.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_time.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_time.Tpo -c -o libmpers_m32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_time.Tpo $(DEPDIR)/libmpers_m32_a-print_time.Po +# $(AM_V_CC)source='print_time.c' object='libmpers_m32_a-print_time.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c + +libmpers_m32_a-print_time.obj: print_time.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_time.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_time.Tpo -c -o libmpers_m32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_time.Tpo $(DEPDIR)/libmpers_m32_a-print_time.Po +# $(AM_V_CC)source='print_time.c' object='libmpers_m32_a-print_time.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` + +libmpers_m32_a-print_timespec.o: print_timespec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timespec.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timespec.Tpo -c -o libmpers_m32_a-print_timespec.o `test -f 'print_timespec.c' || echo '$(srcdir)/'`print_timespec.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timespec.Tpo $(DEPDIR)/libmpers_m32_a-print_timespec.Po +# $(AM_V_CC)source='print_timespec.c' object='libmpers_m32_a-print_timespec.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timespec.o `test -f 'print_timespec.c' || echo '$(srcdir)/'`print_timespec.c + +libmpers_m32_a-print_timespec.obj: print_timespec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timespec.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timespec.Tpo -c -o libmpers_m32_a-print_timespec.obj `if test -f 'print_timespec.c'; then $(CYGPATH_W) 'print_timespec.c'; else $(CYGPATH_W) '$(srcdir)/print_timespec.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timespec.Tpo $(DEPDIR)/libmpers_m32_a-print_timespec.Po +# $(AM_V_CC)source='print_timespec.c' object='libmpers_m32_a-print_timespec.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timespec.obj `if test -f 'print_timespec.c'; then $(CYGPATH_W) 'print_timespec.c'; else $(CYGPATH_W) '$(srcdir)/print_timespec.c'; fi` + +libmpers_m32_a-print_timeval.o: print_timeval.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timeval.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timeval.Tpo -c -o libmpers_m32_a-print_timeval.o `test -f 'print_timeval.c' || echo '$(srcdir)/'`print_timeval.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timeval.Tpo $(DEPDIR)/libmpers_m32_a-print_timeval.Po +# $(AM_V_CC)source='print_timeval.c' object='libmpers_m32_a-print_timeval.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timeval.o `test -f 'print_timeval.c' || echo '$(srcdir)/'`print_timeval.c + +libmpers_m32_a-print_timeval.obj: print_timeval.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timeval.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timeval.Tpo -c -o libmpers_m32_a-print_timeval.obj `if test -f 'print_timeval.c'; then $(CYGPATH_W) 'print_timeval.c'; else $(CYGPATH_W) '$(srcdir)/print_timeval.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timeval.Tpo $(DEPDIR)/libmpers_m32_a-print_timeval.Po +# $(AM_V_CC)source='print_timeval.c' object='libmpers_m32_a-print_timeval.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timeval.obj `if test -f 'print_timeval.c'; then $(CYGPATH_W) 'print_timeval.c'; else $(CYGPATH_W) '$(srcdir)/print_timeval.c'; fi` + +libmpers_m32_a-print_timex.o: print_timex.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timex.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timex.Tpo -c -o libmpers_m32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timex.Tpo $(DEPDIR)/libmpers_m32_a-print_timex.Po +# $(AM_V_CC)source='print_timex.c' object='libmpers_m32_a-print_timex.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c + +libmpers_m32_a-print_timex.obj: print_timex.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timex.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timex.Tpo -c -o libmpers_m32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timex.Tpo $(DEPDIR)/libmpers_m32_a-print_timex.Po +# $(AM_V_CC)source='print_timex.c' object='libmpers_m32_a-print_timex.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` + +libmpers_m32_a-printrusage.o: printrusage.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printrusage.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printrusage.Tpo -c -o libmpers_m32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-printrusage.Tpo $(DEPDIR)/libmpers_m32_a-printrusage.Po +# $(AM_V_CC)source='printrusage.c' object='libmpers_m32_a-printrusage.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c + +libmpers_m32_a-printrusage.obj: printrusage.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printrusage.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printrusage.Tpo -c -o libmpers_m32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-printrusage.Tpo $(DEPDIR)/libmpers_m32_a-printrusage.Po +# $(AM_V_CC)source='printrusage.c' object='libmpers_m32_a-printrusage.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` + +libmpers_m32_a-printsiginfo.o: printsiginfo.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printsiginfo.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo -c -o libmpers_m32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo $(DEPDIR)/libmpers_m32_a-printsiginfo.Po +# $(AM_V_CC)source='printsiginfo.c' object='libmpers_m32_a-printsiginfo.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c + +libmpers_m32_a-printsiginfo.obj: printsiginfo.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printsiginfo.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo -c -o libmpers_m32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo $(DEPDIR)/libmpers_m32_a-printsiginfo.Po +# $(AM_V_CC)source='printsiginfo.c' object='libmpers_m32_a-printsiginfo.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` + +libmpers_m32_a-rtc.o: rtc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-rtc.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-rtc.Tpo -c -o libmpers_m32_a-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-rtc.Tpo $(DEPDIR)/libmpers_m32_a-rtc.Po +# $(AM_V_CC)source='rtc.c' object='libmpers_m32_a-rtc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c + +libmpers_m32_a-rtc.obj: rtc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-rtc.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-rtc.Tpo -c -o libmpers_m32_a-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-rtc.Tpo $(DEPDIR)/libmpers_m32_a-rtc.Po +# $(AM_V_CC)source='rtc.c' object='libmpers_m32_a-rtc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` + +libmpers_m32_a-sg_io_v3.o: sg_io_v3.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sg_io_v3.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sg_io_v3.Tpo -c -o libmpers_m32_a-sg_io_v3.o `test -f 'sg_io_v3.c' || echo '$(srcdir)/'`sg_io_v3.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sg_io_v3.Tpo $(DEPDIR)/libmpers_m32_a-sg_io_v3.Po +# $(AM_V_CC)source='sg_io_v3.c' object='libmpers_m32_a-sg_io_v3.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sg_io_v3.o `test -f 'sg_io_v3.c' || echo '$(srcdir)/'`sg_io_v3.c + +libmpers_m32_a-sg_io_v3.obj: sg_io_v3.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sg_io_v3.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sg_io_v3.Tpo -c -o libmpers_m32_a-sg_io_v3.obj `if test -f 'sg_io_v3.c'; then $(CYGPATH_W) 'sg_io_v3.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v3.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sg_io_v3.Tpo $(DEPDIR)/libmpers_m32_a-sg_io_v3.Po +# $(AM_V_CC)source='sg_io_v3.c' object='libmpers_m32_a-sg_io_v3.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sg_io_v3.obj `if test -f 'sg_io_v3.c'; then $(CYGPATH_W) 'sg_io_v3.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v3.c'; fi` + +libmpers_m32_a-sigaltstack.o: sigaltstack.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sigaltstack.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo -c -o libmpers_m32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo $(DEPDIR)/libmpers_m32_a-sigaltstack.Po +# $(AM_V_CC)source='sigaltstack.c' object='libmpers_m32_a-sigaltstack.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c + +libmpers_m32_a-sigaltstack.obj: sigaltstack.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sigaltstack.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo -c -o libmpers_m32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo $(DEPDIR)/libmpers_m32_a-sigaltstack.Po +# $(AM_V_CC)source='sigaltstack.c' object='libmpers_m32_a-sigaltstack.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` + +libmpers_m32_a-sock.o: sock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sock.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sock.Tpo -c -o libmpers_m32_a-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sock.Tpo $(DEPDIR)/libmpers_m32_a-sock.Po +# $(AM_V_CC)source='sock.c' object='libmpers_m32_a-sock.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c + +libmpers_m32_a-sock.obj: sock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sock.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sock.Tpo -c -o libmpers_m32_a-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sock.Tpo $(DEPDIR)/libmpers_m32_a-sock.Po +# $(AM_V_CC)source='sock.c' object='libmpers_m32_a-sock.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` + +libmpers_m32_a-sysinfo.o: sysinfo.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sysinfo.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo -c -o libmpers_m32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo $(DEPDIR)/libmpers_m32_a-sysinfo.Po +# $(AM_V_CC)source='sysinfo.c' object='libmpers_m32_a-sysinfo.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c + +libmpers_m32_a-sysinfo.obj: sysinfo.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sysinfo.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo -c -o libmpers_m32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo $(DEPDIR)/libmpers_m32_a-sysinfo.Po +# $(AM_V_CC)source='sysinfo.c' object='libmpers_m32_a-sysinfo.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` + +libmpers_m32_a-times.o: times.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-times.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-times.Tpo -c -o libmpers_m32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-times.Tpo $(DEPDIR)/libmpers_m32_a-times.Po +# $(AM_V_CC)source='times.c' object='libmpers_m32_a-times.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c + +libmpers_m32_a-times.obj: times.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-times.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-times.Tpo -c -o libmpers_m32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-times.Tpo $(DEPDIR)/libmpers_m32_a-times.Po +# $(AM_V_CC)source='times.c' object='libmpers_m32_a-times.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` + +libmpers_m32_a-ustat.o: ustat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ustat.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ustat.Tpo -c -o libmpers_m32_a-ustat.o `test -f 'ustat.c' || echo '$(srcdir)/'`ustat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ustat.Tpo $(DEPDIR)/libmpers_m32_a-ustat.Po +# $(AM_V_CC)source='ustat.c' object='libmpers_m32_a-ustat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ustat.o `test -f 'ustat.c' || echo '$(srcdir)/'`ustat.c + +libmpers_m32_a-ustat.obj: ustat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ustat.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ustat.Tpo -c -o libmpers_m32_a-ustat.obj `if test -f 'ustat.c'; then $(CYGPATH_W) 'ustat.c'; else $(CYGPATH_W) '$(srcdir)/ustat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ustat.Tpo $(DEPDIR)/libmpers_m32_a-ustat.Po +# $(AM_V_CC)source='ustat.c' object='libmpers_m32_a-ustat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ustat.obj `if test -f 'ustat.c'; then $(CYGPATH_W) 'ustat.c'; else $(CYGPATH_W) '$(srcdir)/ustat.c'; fi` + +libmpers_m32_a-utime.o: utime.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-utime.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-utime.Tpo -c -o libmpers_m32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-utime.Tpo $(DEPDIR)/libmpers_m32_a-utime.Po +# $(AM_V_CC)source='utime.c' object='libmpers_m32_a-utime.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c + +libmpers_m32_a-utime.obj: utime.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-utime.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-utime.Tpo -c -o libmpers_m32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-utime.Tpo $(DEPDIR)/libmpers_m32_a-utime.Po +# $(AM_V_CC)source='utime.c' object='libmpers_m32_a-utime.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` + +libmpers_m32_a-v4l2.o: v4l2.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-v4l2.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-v4l2.Tpo -c -o libmpers_m32_a-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-v4l2.Tpo $(DEPDIR)/libmpers_m32_a-v4l2.Po +# $(AM_V_CC)source='v4l2.c' object='libmpers_m32_a-v4l2.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c + +libmpers_m32_a-v4l2.obj: v4l2.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-v4l2.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-v4l2.Tpo -c -o libmpers_m32_a-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-v4l2.Tpo $(DEPDIR)/libmpers_m32_a-v4l2.Po +# $(AM_V_CC)source='v4l2.c' object='libmpers_m32_a-v4l2.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` + +libmpers_mx32_a-block.o: block.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-block.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-block.Tpo -c -o libmpers_mx32_a-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-block.Tpo $(DEPDIR)/libmpers_mx32_a-block.Po +# $(AM_V_CC)source='block.c' object='libmpers_mx32_a-block.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c + +libmpers_mx32_a-block.obj: block.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-block.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-block.Tpo -c -o libmpers_mx32_a-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-block.Tpo $(DEPDIR)/libmpers_mx32_a-block.Po +# $(AM_V_CC)source='block.c' object='libmpers_mx32_a-block.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` + +libmpers_mx32_a-btrfs.o: btrfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-btrfs.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-btrfs.Tpo -c -o libmpers_mx32_a-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-btrfs.Tpo $(DEPDIR)/libmpers_mx32_a-btrfs.Po +# $(AM_V_CC)source='btrfs.c' object='libmpers_mx32_a-btrfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c + +libmpers_mx32_a-btrfs.obj: btrfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-btrfs.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-btrfs.Tpo -c -o libmpers_mx32_a-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-btrfs.Tpo $(DEPDIR)/libmpers_mx32_a-btrfs.Po +# $(AM_V_CC)source='btrfs.c' object='libmpers_mx32_a-btrfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` + +libmpers_mx32_a-dirent.o: dirent.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-dirent.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-dirent.Tpo -c -o libmpers_mx32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-dirent.Tpo $(DEPDIR)/libmpers_mx32_a-dirent.Po +# $(AM_V_CC)source='dirent.c' object='libmpers_mx32_a-dirent.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c + +libmpers_mx32_a-dirent.obj: dirent.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-dirent.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-dirent.Tpo -c -o libmpers_mx32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-dirent.Tpo $(DEPDIR)/libmpers_mx32_a-dirent.Po +# $(AM_V_CC)source='dirent.c' object='libmpers_mx32_a-dirent.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` + +libmpers_mx32_a-evdev.o: evdev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-evdev.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-evdev.Tpo -c -o libmpers_mx32_a-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-evdev.Tpo $(DEPDIR)/libmpers_mx32_a-evdev.Po +# $(AM_V_CC)source='evdev.c' object='libmpers_mx32_a-evdev.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c + +libmpers_mx32_a-evdev.obj: evdev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-evdev.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-evdev.Tpo -c -o libmpers_mx32_a-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-evdev.Tpo $(DEPDIR)/libmpers_mx32_a-evdev.Po +# $(AM_V_CC)source='evdev.c' object='libmpers_mx32_a-evdev.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` + +libmpers_mx32_a-fetch_seccomp_fprog.o: fetch_seccomp_fprog.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_seccomp_fprog.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_mx32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Po +# $(AM_V_CC)source='fetch_seccomp_fprog.c' object='libmpers_mx32_a-fetch_seccomp_fprog.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c + +libmpers_mx32_a-fetch_seccomp_fprog.obj: fetch_seccomp_fprog.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_seccomp_fprog.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_mx32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Po +# $(AM_V_CC)source='fetch_seccomp_fprog.c' object='libmpers_mx32_a-fetch_seccomp_fprog.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` + +libmpers_mx32_a-fetch_struct_flock.o: fetch_struct_flock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_flock.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo -c -o libmpers_mx32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Po +# $(AM_V_CC)source='fetch_struct_flock.c' object='libmpers_mx32_a-fetch_struct_flock.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c + +libmpers_mx32_a-fetch_struct_flock.obj: fetch_struct_flock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_flock.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo -c -o libmpers_mx32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Po +# $(AM_V_CC)source='fetch_struct_flock.c' object='libmpers_mx32_a-fetch_struct_flock.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` + +libmpers_mx32_a-fetch_struct_mmsghdr.o: fetch_struct_mmsghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_mmsghdr.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Tpo -c -o libmpers_mx32_a-fetch_struct_mmsghdr.o `test -f 'fetch_struct_mmsghdr.c' || echo '$(srcdir)/'`fetch_struct_mmsghdr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Po +# $(AM_V_CC)source='fetch_struct_mmsghdr.c' object='libmpers_mx32_a-fetch_struct_mmsghdr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_mmsghdr.o `test -f 'fetch_struct_mmsghdr.c' || echo '$(srcdir)/'`fetch_struct_mmsghdr.c + +libmpers_mx32_a-fetch_struct_mmsghdr.obj: fetch_struct_mmsghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_mmsghdr.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Tpo -c -o libmpers_mx32_a-fetch_struct_mmsghdr.obj `if test -f 'fetch_struct_mmsghdr.c'; then $(CYGPATH_W) 'fetch_struct_mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_mmsghdr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Po +# $(AM_V_CC)source='fetch_struct_mmsghdr.c' object='libmpers_mx32_a-fetch_struct_mmsghdr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_mmsghdr.obj `if test -f 'fetch_struct_mmsghdr.c'; then $(CYGPATH_W) 'fetch_struct_mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_mmsghdr.c'; fi` + +libmpers_mx32_a-fetch_struct_msghdr.o: fetch_struct_msghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_msghdr.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Tpo -c -o libmpers_mx32_a-fetch_struct_msghdr.o `test -f 'fetch_struct_msghdr.c' || echo '$(srcdir)/'`fetch_struct_msghdr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Po +# $(AM_V_CC)source='fetch_struct_msghdr.c' object='libmpers_mx32_a-fetch_struct_msghdr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_msghdr.o `test -f 'fetch_struct_msghdr.c' || echo '$(srcdir)/'`fetch_struct_msghdr.c + +libmpers_mx32_a-fetch_struct_msghdr.obj: fetch_struct_msghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_msghdr.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Tpo -c -o libmpers_mx32_a-fetch_struct_msghdr.obj `if test -f 'fetch_struct_msghdr.c'; then $(CYGPATH_W) 'fetch_struct_msghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_msghdr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Po +# $(AM_V_CC)source='fetch_struct_msghdr.c' object='libmpers_mx32_a-fetch_struct_msghdr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_msghdr.obj `if test -f 'fetch_struct_msghdr.c'; then $(CYGPATH_W) 'fetch_struct_msghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_msghdr.c'; fi` + +libmpers_mx32_a-fetch_struct_stat.o: fetch_struct_stat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_stat.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Tpo -c -o libmpers_mx32_a-fetch_struct_stat.o `test -f 'fetch_struct_stat.c' || echo '$(srcdir)/'`fetch_struct_stat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Po +# $(AM_V_CC)source='fetch_struct_stat.c' object='libmpers_mx32_a-fetch_struct_stat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_stat.o `test -f 'fetch_struct_stat.c' || echo '$(srcdir)/'`fetch_struct_stat.c + +libmpers_mx32_a-fetch_struct_stat.obj: fetch_struct_stat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_stat.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Tpo -c -o libmpers_mx32_a-fetch_struct_stat.obj `if test -f 'fetch_struct_stat.c'; then $(CYGPATH_W) 'fetch_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Po +# $(AM_V_CC)source='fetch_struct_stat.c' object='libmpers_mx32_a-fetch_struct_stat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_stat.obj `if test -f 'fetch_struct_stat.c'; then $(CYGPATH_W) 'fetch_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat.c'; fi` + +libmpers_mx32_a-fetch_struct_stat64.o: fetch_struct_stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_stat64.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Tpo -c -o libmpers_mx32_a-fetch_struct_stat64.o `test -f 'fetch_struct_stat64.c' || echo '$(srcdir)/'`fetch_struct_stat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Po +# $(AM_V_CC)source='fetch_struct_stat64.c' object='libmpers_mx32_a-fetch_struct_stat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_stat64.o `test -f 'fetch_struct_stat64.c' || echo '$(srcdir)/'`fetch_struct_stat64.c + +libmpers_mx32_a-fetch_struct_stat64.obj: fetch_struct_stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_stat64.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Tpo -c -o libmpers_mx32_a-fetch_struct_stat64.obj `if test -f 'fetch_struct_stat64.c'; then $(CYGPATH_W) 'fetch_struct_stat64.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Po +# $(AM_V_CC)source='fetch_struct_stat64.c' object='libmpers_mx32_a-fetch_struct_stat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_stat64.obj `if test -f 'fetch_struct_stat64.c'; then $(CYGPATH_W) 'fetch_struct_stat64.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat64.c'; fi` + +libmpers_mx32_a-fetch_struct_statfs.o: fetch_struct_statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_statfs.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Tpo -c -o libmpers_mx32_a-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Po +# $(AM_V_CC)source='fetch_struct_statfs.c' object='libmpers_mx32_a-fetch_struct_statfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c + +libmpers_mx32_a-fetch_struct_statfs.obj: fetch_struct_statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_statfs.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Tpo -c -o libmpers_mx32_a-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Po +# $(AM_V_CC)source='fetch_struct_statfs.c' object='libmpers_mx32_a-fetch_struct_statfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` + +libmpers_mx32_a-hdio.o: hdio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-hdio.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-hdio.Tpo -c -o libmpers_mx32_a-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-hdio.Tpo $(DEPDIR)/libmpers_mx32_a-hdio.Po +# $(AM_V_CC)source='hdio.c' object='libmpers_mx32_a-hdio.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c + +libmpers_mx32_a-hdio.obj: hdio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-hdio.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-hdio.Tpo -c -o libmpers_mx32_a-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-hdio.Tpo $(DEPDIR)/libmpers_mx32_a-hdio.Po +# $(AM_V_CC)source='hdio.c' object='libmpers_mx32_a-hdio.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` + +libmpers_mx32_a-ipc_msgctl.o: ipc_msgctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_msgctl.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo -c -o libmpers_mx32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Po +# $(AM_V_CC)source='ipc_msgctl.c' object='libmpers_mx32_a-ipc_msgctl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c + +libmpers_mx32_a-ipc_msgctl.obj: ipc_msgctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_msgctl.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo -c -o libmpers_mx32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Po +# $(AM_V_CC)source='ipc_msgctl.c' object='libmpers_mx32_a-ipc_msgctl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` + +libmpers_mx32_a-ipc_shmctl.o: ipc_shmctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_shmctl.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo -c -o libmpers_mx32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Po +# $(AM_V_CC)source='ipc_shmctl.c' object='libmpers_mx32_a-ipc_shmctl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c + +libmpers_mx32_a-ipc_shmctl.obj: ipc_shmctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_shmctl.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo -c -o libmpers_mx32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Po +# $(AM_V_CC)source='ipc_shmctl.c' object='libmpers_mx32_a-ipc_shmctl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` + +libmpers_mx32_a-loop.o: loop.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-loop.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-loop.Tpo -c -o libmpers_mx32_a-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-loop.Tpo $(DEPDIR)/libmpers_mx32_a-loop.Po +# $(AM_V_CC)source='loop.c' object='libmpers_mx32_a-loop.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c + +libmpers_mx32_a-loop.obj: loop.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-loop.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-loop.Tpo -c -o libmpers_mx32_a-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-loop.Tpo $(DEPDIR)/libmpers_mx32_a-loop.Po +# $(AM_V_CC)source='loop.c' object='libmpers_mx32_a-loop.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` + +libmpers_mx32_a-mtd.o: mtd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-mtd.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-mtd.Tpo -c -o libmpers_mx32_a-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-mtd.Tpo $(DEPDIR)/libmpers_mx32_a-mtd.Po +# $(AM_V_CC)source='mtd.c' object='libmpers_mx32_a-mtd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c + +libmpers_mx32_a-mtd.obj: mtd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-mtd.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-mtd.Tpo -c -o libmpers_mx32_a-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-mtd.Tpo $(DEPDIR)/libmpers_mx32_a-mtd.Po +# $(AM_V_CC)source='mtd.c' object='libmpers_mx32_a-mtd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` + +libmpers_mx32_a-print_mq_attr.o: print_mq_attr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_mq_attr.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo -c -o libmpers_mx32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Po +# $(AM_V_CC)source='print_mq_attr.c' object='libmpers_mx32_a-print_mq_attr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c + +libmpers_mx32_a-print_mq_attr.obj: print_mq_attr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_mq_attr.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo -c -o libmpers_mx32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Po +# $(AM_V_CC)source='print_mq_attr.c' object='libmpers_mx32_a-print_mq_attr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` + +libmpers_mx32_a-print_msgbuf.o: print_msgbuf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_msgbuf.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo -c -o libmpers_mx32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Po +# $(AM_V_CC)source='print_msgbuf.c' object='libmpers_mx32_a-print_msgbuf.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c + +libmpers_mx32_a-print_msgbuf.obj: print_msgbuf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_msgbuf.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo -c -o libmpers_mx32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Po +# $(AM_V_CC)source='print_msgbuf.c' object='libmpers_mx32_a-print_msgbuf.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` + +libmpers_mx32_a-print_sg_req_info.o: print_sg_req_info.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_sg_req_info.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Tpo -c -o libmpers_mx32_a-print_sg_req_info.o `test -f 'print_sg_req_info.c' || echo '$(srcdir)/'`print_sg_req_info.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Tpo $(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Po +# $(AM_V_CC)source='print_sg_req_info.c' object='libmpers_mx32_a-print_sg_req_info.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_sg_req_info.o `test -f 'print_sg_req_info.c' || echo '$(srcdir)/'`print_sg_req_info.c + +libmpers_mx32_a-print_sg_req_info.obj: print_sg_req_info.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_sg_req_info.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Tpo -c -o libmpers_mx32_a-print_sg_req_info.obj `if test -f 'print_sg_req_info.c'; then $(CYGPATH_W) 'print_sg_req_info.c'; else $(CYGPATH_W) '$(srcdir)/print_sg_req_info.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Tpo $(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Po +# $(AM_V_CC)source='print_sg_req_info.c' object='libmpers_mx32_a-print_sg_req_info.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_sg_req_info.obj `if test -f 'print_sg_req_info.c'; then $(CYGPATH_W) 'print_sg_req_info.c'; else $(CYGPATH_W) '$(srcdir)/print_sg_req_info.c'; fi` + +libmpers_mx32_a-print_sigevent.o: print_sigevent.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_sigevent.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo -c -o libmpers_mx32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo $(DEPDIR)/libmpers_mx32_a-print_sigevent.Po +# $(AM_V_CC)source='print_sigevent.c' object='libmpers_mx32_a-print_sigevent.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c + +libmpers_mx32_a-print_sigevent.obj: print_sigevent.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_sigevent.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo -c -o libmpers_mx32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo $(DEPDIR)/libmpers_mx32_a-print_sigevent.Po +# $(AM_V_CC)source='print_sigevent.c' object='libmpers_mx32_a-print_sigevent.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` + +libmpers_mx32_a-print_time.o: print_time.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_time.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_time.Tpo -c -o libmpers_mx32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_time.Tpo $(DEPDIR)/libmpers_mx32_a-print_time.Po +# $(AM_V_CC)source='print_time.c' object='libmpers_mx32_a-print_time.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c + +libmpers_mx32_a-print_time.obj: print_time.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_time.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_time.Tpo -c -o libmpers_mx32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_time.Tpo $(DEPDIR)/libmpers_mx32_a-print_time.Po +# $(AM_V_CC)source='print_time.c' object='libmpers_mx32_a-print_time.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` + +libmpers_mx32_a-print_timespec.o: print_timespec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timespec.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timespec.Tpo -c -o libmpers_mx32_a-print_timespec.o `test -f 'print_timespec.c' || echo '$(srcdir)/'`print_timespec.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timespec.Tpo $(DEPDIR)/libmpers_mx32_a-print_timespec.Po +# $(AM_V_CC)source='print_timespec.c' object='libmpers_mx32_a-print_timespec.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timespec.o `test -f 'print_timespec.c' || echo '$(srcdir)/'`print_timespec.c + +libmpers_mx32_a-print_timespec.obj: print_timespec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timespec.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timespec.Tpo -c -o libmpers_mx32_a-print_timespec.obj `if test -f 'print_timespec.c'; then $(CYGPATH_W) 'print_timespec.c'; else $(CYGPATH_W) '$(srcdir)/print_timespec.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timespec.Tpo $(DEPDIR)/libmpers_mx32_a-print_timespec.Po +# $(AM_V_CC)source='print_timespec.c' object='libmpers_mx32_a-print_timespec.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timespec.obj `if test -f 'print_timespec.c'; then $(CYGPATH_W) 'print_timespec.c'; else $(CYGPATH_W) '$(srcdir)/print_timespec.c'; fi` + +libmpers_mx32_a-print_timeval.o: print_timeval.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timeval.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timeval.Tpo -c -o libmpers_mx32_a-print_timeval.o `test -f 'print_timeval.c' || echo '$(srcdir)/'`print_timeval.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timeval.Tpo $(DEPDIR)/libmpers_mx32_a-print_timeval.Po +# $(AM_V_CC)source='print_timeval.c' object='libmpers_mx32_a-print_timeval.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timeval.o `test -f 'print_timeval.c' || echo '$(srcdir)/'`print_timeval.c + +libmpers_mx32_a-print_timeval.obj: print_timeval.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timeval.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timeval.Tpo -c -o libmpers_mx32_a-print_timeval.obj `if test -f 'print_timeval.c'; then $(CYGPATH_W) 'print_timeval.c'; else $(CYGPATH_W) '$(srcdir)/print_timeval.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timeval.Tpo $(DEPDIR)/libmpers_mx32_a-print_timeval.Po +# $(AM_V_CC)source='print_timeval.c' object='libmpers_mx32_a-print_timeval.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timeval.obj `if test -f 'print_timeval.c'; then $(CYGPATH_W) 'print_timeval.c'; else $(CYGPATH_W) '$(srcdir)/print_timeval.c'; fi` + +libmpers_mx32_a-print_timex.o: print_timex.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timex.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo -c -o libmpers_mx32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo $(DEPDIR)/libmpers_mx32_a-print_timex.Po +# $(AM_V_CC)source='print_timex.c' object='libmpers_mx32_a-print_timex.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c + +libmpers_mx32_a-print_timex.obj: print_timex.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timex.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo -c -o libmpers_mx32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo $(DEPDIR)/libmpers_mx32_a-print_timex.Po +# $(AM_V_CC)source='print_timex.c' object='libmpers_mx32_a-print_timex.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` + +libmpers_mx32_a-printrusage.o: printrusage.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printrusage.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo -c -o libmpers_mx32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo $(DEPDIR)/libmpers_mx32_a-printrusage.Po +# $(AM_V_CC)source='printrusage.c' object='libmpers_mx32_a-printrusage.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c + +libmpers_mx32_a-printrusage.obj: printrusage.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printrusage.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo -c -o libmpers_mx32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo $(DEPDIR)/libmpers_mx32_a-printrusage.Po +# $(AM_V_CC)source='printrusage.c' object='libmpers_mx32_a-printrusage.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` + +libmpers_mx32_a-printsiginfo.o: printsiginfo.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printsiginfo.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo -c -o libmpers_mx32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo $(DEPDIR)/libmpers_mx32_a-printsiginfo.Po +# $(AM_V_CC)source='printsiginfo.c' object='libmpers_mx32_a-printsiginfo.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c + +libmpers_mx32_a-printsiginfo.obj: printsiginfo.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printsiginfo.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo -c -o libmpers_mx32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo $(DEPDIR)/libmpers_mx32_a-printsiginfo.Po +# $(AM_V_CC)source='printsiginfo.c' object='libmpers_mx32_a-printsiginfo.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` + +libmpers_mx32_a-rtc.o: rtc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-rtc.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-rtc.Tpo -c -o libmpers_mx32_a-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-rtc.Tpo $(DEPDIR)/libmpers_mx32_a-rtc.Po +# $(AM_V_CC)source='rtc.c' object='libmpers_mx32_a-rtc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c + +libmpers_mx32_a-rtc.obj: rtc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-rtc.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-rtc.Tpo -c -o libmpers_mx32_a-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-rtc.Tpo $(DEPDIR)/libmpers_mx32_a-rtc.Po +# $(AM_V_CC)source='rtc.c' object='libmpers_mx32_a-rtc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` + +libmpers_mx32_a-sg_io_v3.o: sg_io_v3.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sg_io_v3.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sg_io_v3.Tpo -c -o libmpers_mx32_a-sg_io_v3.o `test -f 'sg_io_v3.c' || echo '$(srcdir)/'`sg_io_v3.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sg_io_v3.Tpo $(DEPDIR)/libmpers_mx32_a-sg_io_v3.Po +# $(AM_V_CC)source='sg_io_v3.c' object='libmpers_mx32_a-sg_io_v3.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sg_io_v3.o `test -f 'sg_io_v3.c' || echo '$(srcdir)/'`sg_io_v3.c + +libmpers_mx32_a-sg_io_v3.obj: sg_io_v3.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sg_io_v3.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sg_io_v3.Tpo -c -o libmpers_mx32_a-sg_io_v3.obj `if test -f 'sg_io_v3.c'; then $(CYGPATH_W) 'sg_io_v3.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v3.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sg_io_v3.Tpo $(DEPDIR)/libmpers_mx32_a-sg_io_v3.Po +# $(AM_V_CC)source='sg_io_v3.c' object='libmpers_mx32_a-sg_io_v3.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sg_io_v3.obj `if test -f 'sg_io_v3.c'; then $(CYGPATH_W) 'sg_io_v3.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v3.c'; fi` + +libmpers_mx32_a-sigaltstack.o: sigaltstack.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sigaltstack.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo -c -o libmpers_mx32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo $(DEPDIR)/libmpers_mx32_a-sigaltstack.Po +# $(AM_V_CC)source='sigaltstack.c' object='libmpers_mx32_a-sigaltstack.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c + +libmpers_mx32_a-sigaltstack.obj: sigaltstack.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sigaltstack.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo -c -o libmpers_mx32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo $(DEPDIR)/libmpers_mx32_a-sigaltstack.Po +# $(AM_V_CC)source='sigaltstack.c' object='libmpers_mx32_a-sigaltstack.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` + +libmpers_mx32_a-sock.o: sock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sock.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sock.Tpo -c -o libmpers_mx32_a-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sock.Tpo $(DEPDIR)/libmpers_mx32_a-sock.Po +# $(AM_V_CC)source='sock.c' object='libmpers_mx32_a-sock.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c + +libmpers_mx32_a-sock.obj: sock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sock.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sock.Tpo -c -o libmpers_mx32_a-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sock.Tpo $(DEPDIR)/libmpers_mx32_a-sock.Po +# $(AM_V_CC)source='sock.c' object='libmpers_mx32_a-sock.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` + +libmpers_mx32_a-sysinfo.o: sysinfo.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sysinfo.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo -c -o libmpers_mx32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo $(DEPDIR)/libmpers_mx32_a-sysinfo.Po +# $(AM_V_CC)source='sysinfo.c' object='libmpers_mx32_a-sysinfo.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c + +libmpers_mx32_a-sysinfo.obj: sysinfo.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sysinfo.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo -c -o libmpers_mx32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo $(DEPDIR)/libmpers_mx32_a-sysinfo.Po +# $(AM_V_CC)source='sysinfo.c' object='libmpers_mx32_a-sysinfo.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` + +libmpers_mx32_a-times.o: times.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-times.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-times.Tpo -c -o libmpers_mx32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-times.Tpo $(DEPDIR)/libmpers_mx32_a-times.Po +# $(AM_V_CC)source='times.c' object='libmpers_mx32_a-times.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c + +libmpers_mx32_a-times.obj: times.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-times.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-times.Tpo -c -o libmpers_mx32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-times.Tpo $(DEPDIR)/libmpers_mx32_a-times.Po +# $(AM_V_CC)source='times.c' object='libmpers_mx32_a-times.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` + +libmpers_mx32_a-ustat.o: ustat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ustat.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ustat.Tpo -c -o libmpers_mx32_a-ustat.o `test -f 'ustat.c' || echo '$(srcdir)/'`ustat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ustat.Tpo $(DEPDIR)/libmpers_mx32_a-ustat.Po +# $(AM_V_CC)source='ustat.c' object='libmpers_mx32_a-ustat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ustat.o `test -f 'ustat.c' || echo '$(srcdir)/'`ustat.c + +libmpers_mx32_a-ustat.obj: ustat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ustat.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ustat.Tpo -c -o libmpers_mx32_a-ustat.obj `if test -f 'ustat.c'; then $(CYGPATH_W) 'ustat.c'; else $(CYGPATH_W) '$(srcdir)/ustat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ustat.Tpo $(DEPDIR)/libmpers_mx32_a-ustat.Po +# $(AM_V_CC)source='ustat.c' object='libmpers_mx32_a-ustat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ustat.obj `if test -f 'ustat.c'; then $(CYGPATH_W) 'ustat.c'; else $(CYGPATH_W) '$(srcdir)/ustat.c'; fi` + +libmpers_mx32_a-utime.o: utime.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-utime.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-utime.Tpo -c -o libmpers_mx32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-utime.Tpo $(DEPDIR)/libmpers_mx32_a-utime.Po +# $(AM_V_CC)source='utime.c' object='libmpers_mx32_a-utime.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c + +libmpers_mx32_a-utime.obj: utime.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-utime.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-utime.Tpo -c -o libmpers_mx32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-utime.Tpo $(DEPDIR)/libmpers_mx32_a-utime.Po +# $(AM_V_CC)source='utime.c' object='libmpers_mx32_a-utime.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` + +libmpers_mx32_a-v4l2.o: v4l2.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-v4l2.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-v4l2.Tpo -c -o libmpers_mx32_a-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-v4l2.Tpo $(DEPDIR)/libmpers_mx32_a-v4l2.Po +# $(AM_V_CC)source='v4l2.c' object='libmpers_mx32_a-v4l2.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c + +libmpers_mx32_a-v4l2.obj: v4l2.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-v4l2.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-v4l2.Tpo -c -o libmpers_mx32_a-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-v4l2.Tpo $(DEPDIR)/libmpers_mx32_a-v4l2.Po +# $(AM_V_CC)source='v4l2.c' object='libmpers_mx32_a-v4l2.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` + +libstrace_a-fstatfs.o: fstatfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-fstatfs.o -MD -MP -MF $(DEPDIR)/libstrace_a-fstatfs.Tpo -c -o libstrace_a-fstatfs.o `test -f 'fstatfs.c' || echo '$(srcdir)/'`fstatfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-fstatfs.Tpo $(DEPDIR)/libstrace_a-fstatfs.Po +# $(AM_V_CC)source='fstatfs.c' object='libstrace_a-fstatfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-fstatfs.o `test -f 'fstatfs.c' || echo '$(srcdir)/'`fstatfs.c + +libstrace_a-fstatfs.obj: fstatfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-fstatfs.obj -MD -MP -MF $(DEPDIR)/libstrace_a-fstatfs.Tpo -c -o libstrace_a-fstatfs.obj `if test -f 'fstatfs.c'; then $(CYGPATH_W) 'fstatfs.c'; else $(CYGPATH_W) '$(srcdir)/fstatfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-fstatfs.Tpo $(DEPDIR)/libstrace_a-fstatfs.Po +# $(AM_V_CC)source='fstatfs.c' object='libstrace_a-fstatfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-fstatfs.obj `if test -f 'fstatfs.c'; then $(CYGPATH_W) 'fstatfs.c'; else $(CYGPATH_W) '$(srcdir)/fstatfs.c'; fi` + +libstrace_a-fstatfs64.o: fstatfs64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-fstatfs64.o -MD -MP -MF $(DEPDIR)/libstrace_a-fstatfs64.Tpo -c -o libstrace_a-fstatfs64.o `test -f 'fstatfs64.c' || echo '$(srcdir)/'`fstatfs64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-fstatfs64.Tpo $(DEPDIR)/libstrace_a-fstatfs64.Po +# $(AM_V_CC)source='fstatfs64.c' object='libstrace_a-fstatfs64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-fstatfs64.o `test -f 'fstatfs64.c' || echo '$(srcdir)/'`fstatfs64.c + +libstrace_a-fstatfs64.obj: fstatfs64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-fstatfs64.obj -MD -MP -MF $(DEPDIR)/libstrace_a-fstatfs64.Tpo -c -o libstrace_a-fstatfs64.obj `if test -f 'fstatfs64.c'; then $(CYGPATH_W) 'fstatfs64.c'; else $(CYGPATH_W) '$(srcdir)/fstatfs64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-fstatfs64.Tpo $(DEPDIR)/libstrace_a-fstatfs64.Po +# $(AM_V_CC)source='fstatfs64.c' object='libstrace_a-fstatfs64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-fstatfs64.obj `if test -f 'fstatfs64.c'; then $(CYGPATH_W) 'fstatfs64.c'; else $(CYGPATH_W) '$(srcdir)/fstatfs64.c'; fi` + +libstrace_a-ipc.o: ipc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-ipc.o -MD -MP -MF $(DEPDIR)/libstrace_a-ipc.Tpo -c -o libstrace_a-ipc.o `test -f 'ipc.c' || echo '$(srcdir)/'`ipc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-ipc.Tpo $(DEPDIR)/libstrace_a-ipc.Po +# $(AM_V_CC)source='ipc.c' object='libstrace_a-ipc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-ipc.o `test -f 'ipc.c' || echo '$(srcdir)/'`ipc.c + +libstrace_a-ipc.obj: ipc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-ipc.obj -MD -MP -MF $(DEPDIR)/libstrace_a-ipc.Tpo -c -o libstrace_a-ipc.obj `if test -f 'ipc.c'; then $(CYGPATH_W) 'ipc.c'; else $(CYGPATH_W) '$(srcdir)/ipc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-ipc.Tpo $(DEPDIR)/libstrace_a-ipc.Po +# $(AM_V_CC)source='ipc.c' object='libstrace_a-ipc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-ipc.obj `if test -f 'ipc.c'; then $(CYGPATH_W) 'ipc.c'; else $(CYGPATH_W) '$(srcdir)/ipc.c'; fi` + +libstrace_a-socketcall.o: socketcall.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-socketcall.o -MD -MP -MF $(DEPDIR)/libstrace_a-socketcall.Tpo -c -o libstrace_a-socketcall.o `test -f 'socketcall.c' || echo '$(srcdir)/'`socketcall.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-socketcall.Tpo $(DEPDIR)/libstrace_a-socketcall.Po +# $(AM_V_CC)source='socketcall.c' object='libstrace_a-socketcall.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-socketcall.o `test -f 'socketcall.c' || echo '$(srcdir)/'`socketcall.c + +libstrace_a-socketcall.obj: socketcall.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-socketcall.obj -MD -MP -MF $(DEPDIR)/libstrace_a-socketcall.Tpo -c -o libstrace_a-socketcall.obj `if test -f 'socketcall.c'; then $(CYGPATH_W) 'socketcall.c'; else $(CYGPATH_W) '$(srcdir)/socketcall.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-socketcall.Tpo $(DEPDIR)/libstrace_a-socketcall.Po +# $(AM_V_CC)source='socketcall.c' object='libstrace_a-socketcall.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-socketcall.obj `if test -f 'socketcall.c'; then $(CYGPATH_W) 'socketcall.c'; else $(CYGPATH_W) '$(srcdir)/socketcall.c'; fi` + +libstrace_a-statfs.o: statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-statfs.o -MD -MP -MF $(DEPDIR)/libstrace_a-statfs.Tpo -c -o libstrace_a-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-statfs.Tpo $(DEPDIR)/libstrace_a-statfs.Po +# $(AM_V_CC)source='statfs.c' object='libstrace_a-statfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + +libstrace_a-statfs.obj: statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-statfs.obj -MD -MP -MF $(DEPDIR)/libstrace_a-statfs.Tpo -c -o libstrace_a-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-statfs.Tpo $(DEPDIR)/libstrace_a-statfs.Po +# $(AM_V_CC)source='statfs.c' object='libstrace_a-statfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + +libstrace_a-statfs64.o: statfs64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-statfs64.o -MD -MP -MF $(DEPDIR)/libstrace_a-statfs64.Tpo -c -o libstrace_a-statfs64.o `test -f 'statfs64.c' || echo '$(srcdir)/'`statfs64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-statfs64.Tpo $(DEPDIR)/libstrace_a-statfs64.Po +# $(AM_V_CC)source='statfs64.c' object='libstrace_a-statfs64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-statfs64.o `test -f 'statfs64.c' || echo '$(srcdir)/'`statfs64.c + +libstrace_a-statfs64.obj: statfs64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-statfs64.obj -MD -MP -MF $(DEPDIR)/libstrace_a-statfs64.Tpo -c -o libstrace_a-statfs64.obj `if test -f 'statfs64.c'; then $(CYGPATH_W) 'statfs64.c'; else $(CYGPATH_W) '$(srcdir)/statfs64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-statfs64.Tpo $(DEPDIR)/libstrace_a-statfs64.Po +# $(AM_V_CC)source='statfs64.c' object='libstrace_a-statfs64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-statfs64.obj `if test -f 'statfs64.c'; then $(CYGPATH_W) 'statfs64.c'; else $(CYGPATH_W) '$(srcdir)/statfs64.c'; fi` + +libstrace_a-sync_file_range.o: sync_file_range.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-sync_file_range.o -MD -MP -MF $(DEPDIR)/libstrace_a-sync_file_range.Tpo -c -o libstrace_a-sync_file_range.o `test -f 'sync_file_range.c' || echo '$(srcdir)/'`sync_file_range.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-sync_file_range.Tpo $(DEPDIR)/libstrace_a-sync_file_range.Po +# $(AM_V_CC)source='sync_file_range.c' object='libstrace_a-sync_file_range.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-sync_file_range.o `test -f 'sync_file_range.c' || echo '$(srcdir)/'`sync_file_range.c + +libstrace_a-sync_file_range.obj: sync_file_range.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-sync_file_range.obj -MD -MP -MF $(DEPDIR)/libstrace_a-sync_file_range.Tpo -c -o libstrace_a-sync_file_range.obj `if test -f 'sync_file_range.c'; then $(CYGPATH_W) 'sync_file_range.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-sync_file_range.Tpo $(DEPDIR)/libstrace_a-sync_file_range.Po +# $(AM_V_CC)source='sync_file_range.c' object='libstrace_a-sync_file_range.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-sync_file_range.obj `if test -f 'sync_file_range.c'; then $(CYGPATH_W) 'sync_file_range.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range.c'; fi` + +libstrace_a-sync_file_range2.o: sync_file_range2.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-sync_file_range2.o -MD -MP -MF $(DEPDIR)/libstrace_a-sync_file_range2.Tpo -c -o libstrace_a-sync_file_range2.o `test -f 'sync_file_range2.c' || echo '$(srcdir)/'`sync_file_range2.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-sync_file_range2.Tpo $(DEPDIR)/libstrace_a-sync_file_range2.Po +# $(AM_V_CC)source='sync_file_range2.c' object='libstrace_a-sync_file_range2.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-sync_file_range2.o `test -f 'sync_file_range2.c' || echo '$(srcdir)/'`sync_file_range2.c + +libstrace_a-sync_file_range2.obj: sync_file_range2.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-sync_file_range2.obj -MD -MP -MF $(DEPDIR)/libstrace_a-sync_file_range2.Tpo -c -o libstrace_a-sync_file_range2.obj `if test -f 'sync_file_range2.c'; then $(CYGPATH_W) 'sync_file_range2.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range2.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-sync_file_range2.Tpo $(DEPDIR)/libstrace_a-sync_file_range2.Po +# $(AM_V_CC)source='sync_file_range2.c' object='libstrace_a-sync_file_range2.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-sync_file_range2.obj `if test -f 'sync_file_range2.c'; then $(CYGPATH_W) 'sync_file_range2.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range2.c'; fi` + +libstrace_a-upeek.o: upeek.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-upeek.o -MD -MP -MF $(DEPDIR)/libstrace_a-upeek.Tpo -c -o libstrace_a-upeek.o `test -f 'upeek.c' || echo '$(srcdir)/'`upeek.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-upeek.Tpo $(DEPDIR)/libstrace_a-upeek.Po +# $(AM_V_CC)source='upeek.c' object='libstrace_a-upeek.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-upeek.o `test -f 'upeek.c' || echo '$(srcdir)/'`upeek.c + +libstrace_a-upeek.obj: upeek.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-upeek.obj -MD -MP -MF $(DEPDIR)/libstrace_a-upeek.Tpo -c -o libstrace_a-upeek.obj `if test -f 'upeek.c'; then $(CYGPATH_W) 'upeek.c'; else $(CYGPATH_W) '$(srcdir)/upeek.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-upeek.Tpo $(DEPDIR)/libstrace_a-upeek.Po +# $(AM_V_CC)source='upeek.c' object='libstrace_a-upeek.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-upeek.obj `if test -f 'upeek.c'; then $(CYGPATH_W) 'upeek.c'; else $(CYGPATH_W) '$(srcdir)/upeek.c'; fi` + +libstrace_a-upoke.o: upoke.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-upoke.o -MD -MP -MF $(DEPDIR)/libstrace_a-upoke.Tpo -c -o libstrace_a-upoke.o `test -f 'upoke.c' || echo '$(srcdir)/'`upoke.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-upoke.Tpo $(DEPDIR)/libstrace_a-upoke.Po +# $(AM_V_CC)source='upoke.c' object='libstrace_a-upoke.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-upoke.o `test -f 'upoke.c' || echo '$(srcdir)/'`upoke.c + +libstrace_a-upoke.obj: upoke.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-upoke.obj -MD -MP -MF $(DEPDIR)/libstrace_a-upoke.Tpo -c -o libstrace_a-upoke.obj `if test -f 'upoke.c'; then $(CYGPATH_W) 'upoke.c'; else $(CYGPATH_W) '$(srcdir)/upoke.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-upoke.Tpo $(DEPDIR)/libstrace_a-upoke.Po +# $(AM_V_CC)source='upoke.c' object='libstrace_a-upoke.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-upoke.obj `if test -f 'upoke.c'; then $(CYGPATH_W) 'upoke.c'; else $(CYGPATH_W) '$(srcdir)/upoke.c'; fi` + +strace-access.o: access.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-access.o -MD -MP -MF $(DEPDIR)/strace-access.Tpo -c -o strace-access.o `test -f 'access.c' || echo '$(srcdir)/'`access.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-access.Tpo $(DEPDIR)/strace-access.Po +# $(AM_V_CC)source='access.c' object='strace-access.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-access.o `test -f 'access.c' || echo '$(srcdir)/'`access.c + +strace-access.obj: access.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-access.obj -MD -MP -MF $(DEPDIR)/strace-access.Tpo -c -o strace-access.obj `if test -f 'access.c'; then $(CYGPATH_W) 'access.c'; else $(CYGPATH_W) '$(srcdir)/access.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-access.Tpo $(DEPDIR)/strace-access.Po +# $(AM_V_CC)source='access.c' object='strace-access.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-access.obj `if test -f 'access.c'; then $(CYGPATH_W) 'access.c'; else $(CYGPATH_W) '$(srcdir)/access.c'; fi` + +strace-affinity.o: affinity.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-affinity.o -MD -MP -MF $(DEPDIR)/strace-affinity.Tpo -c -o strace-affinity.o `test -f 'affinity.c' || echo '$(srcdir)/'`affinity.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-affinity.Tpo $(DEPDIR)/strace-affinity.Po +# $(AM_V_CC)source='affinity.c' object='strace-affinity.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-affinity.o `test -f 'affinity.c' || echo '$(srcdir)/'`affinity.c + +strace-affinity.obj: affinity.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-affinity.obj -MD -MP -MF $(DEPDIR)/strace-affinity.Tpo -c -o strace-affinity.obj `if test -f 'affinity.c'; then $(CYGPATH_W) 'affinity.c'; else $(CYGPATH_W) '$(srcdir)/affinity.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-affinity.Tpo $(DEPDIR)/strace-affinity.Po +# $(AM_V_CC)source='affinity.c' object='strace-affinity.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-affinity.obj `if test -f 'affinity.c'; then $(CYGPATH_W) 'affinity.c'; else $(CYGPATH_W) '$(srcdir)/affinity.c'; fi` + +strace-aio.o: aio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-aio.o -MD -MP -MF $(DEPDIR)/strace-aio.Tpo -c -o strace-aio.o `test -f 'aio.c' || echo '$(srcdir)/'`aio.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-aio.Tpo $(DEPDIR)/strace-aio.Po +# $(AM_V_CC)source='aio.c' object='strace-aio.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-aio.o `test -f 'aio.c' || echo '$(srcdir)/'`aio.c + +strace-aio.obj: aio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-aio.obj -MD -MP -MF $(DEPDIR)/strace-aio.Tpo -c -o strace-aio.obj `if test -f 'aio.c'; then $(CYGPATH_W) 'aio.c'; else $(CYGPATH_W) '$(srcdir)/aio.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-aio.Tpo $(DEPDIR)/strace-aio.Po +# $(AM_V_CC)source='aio.c' object='strace-aio.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-aio.obj `if test -f 'aio.c'; then $(CYGPATH_W) 'aio.c'; else $(CYGPATH_W) '$(srcdir)/aio.c'; fi` + +strace-alpha.o: alpha.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-alpha.o -MD -MP -MF $(DEPDIR)/strace-alpha.Tpo -c -o strace-alpha.o `test -f 'alpha.c' || echo '$(srcdir)/'`alpha.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-alpha.Tpo $(DEPDIR)/strace-alpha.Po +# $(AM_V_CC)source='alpha.c' object='strace-alpha.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-alpha.o `test -f 'alpha.c' || echo '$(srcdir)/'`alpha.c + +strace-alpha.obj: alpha.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-alpha.obj -MD -MP -MF $(DEPDIR)/strace-alpha.Tpo -c -o strace-alpha.obj `if test -f 'alpha.c'; then $(CYGPATH_W) 'alpha.c'; else $(CYGPATH_W) '$(srcdir)/alpha.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-alpha.Tpo $(DEPDIR)/strace-alpha.Po +# $(AM_V_CC)source='alpha.c' object='strace-alpha.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-alpha.obj `if test -f 'alpha.c'; then $(CYGPATH_W) 'alpha.c'; else $(CYGPATH_W) '$(srcdir)/alpha.c'; fi` + +strace-bjm.o: bjm.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-bjm.o -MD -MP -MF $(DEPDIR)/strace-bjm.Tpo -c -o strace-bjm.o `test -f 'bjm.c' || echo '$(srcdir)/'`bjm.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-bjm.Tpo $(DEPDIR)/strace-bjm.Po +# $(AM_V_CC)source='bjm.c' object='strace-bjm.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-bjm.o `test -f 'bjm.c' || echo '$(srcdir)/'`bjm.c + +strace-bjm.obj: bjm.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-bjm.obj -MD -MP -MF $(DEPDIR)/strace-bjm.Tpo -c -o strace-bjm.obj `if test -f 'bjm.c'; then $(CYGPATH_W) 'bjm.c'; else $(CYGPATH_W) '$(srcdir)/bjm.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-bjm.Tpo $(DEPDIR)/strace-bjm.Po +# $(AM_V_CC)source='bjm.c' object='strace-bjm.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-bjm.obj `if test -f 'bjm.c'; then $(CYGPATH_W) 'bjm.c'; else $(CYGPATH_W) '$(srcdir)/bjm.c'; fi` + +strace-block.o: block.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-block.o -MD -MP -MF $(DEPDIR)/strace-block.Tpo -c -o strace-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-block.Tpo $(DEPDIR)/strace-block.Po +# $(AM_V_CC)source='block.c' object='strace-block.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c + +strace-block.obj: block.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-block.obj -MD -MP -MF $(DEPDIR)/strace-block.Tpo -c -o strace-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-block.Tpo $(DEPDIR)/strace-block.Po +# $(AM_V_CC)source='block.c' object='strace-block.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` + +strace-bpf.o: bpf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-bpf.o -MD -MP -MF $(DEPDIR)/strace-bpf.Tpo -c -o strace-bpf.o `test -f 'bpf.c' || echo '$(srcdir)/'`bpf.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-bpf.Tpo $(DEPDIR)/strace-bpf.Po +# $(AM_V_CC)source='bpf.c' object='strace-bpf.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-bpf.o `test -f 'bpf.c' || echo '$(srcdir)/'`bpf.c + +strace-bpf.obj: bpf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-bpf.obj -MD -MP -MF $(DEPDIR)/strace-bpf.Tpo -c -o strace-bpf.obj `if test -f 'bpf.c'; then $(CYGPATH_W) 'bpf.c'; else $(CYGPATH_W) '$(srcdir)/bpf.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-bpf.Tpo $(DEPDIR)/strace-bpf.Po +# $(AM_V_CC)source='bpf.c' object='strace-bpf.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-bpf.obj `if test -f 'bpf.c'; then $(CYGPATH_W) 'bpf.c'; else $(CYGPATH_W) '$(srcdir)/bpf.c'; fi` + +strace-btrfs.o: btrfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-btrfs.o -MD -MP -MF $(DEPDIR)/strace-btrfs.Tpo -c -o strace-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-btrfs.Tpo $(DEPDIR)/strace-btrfs.Po +# $(AM_V_CC)source='btrfs.c' object='strace-btrfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c + +strace-btrfs.obj: btrfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-btrfs.obj -MD -MP -MF $(DEPDIR)/strace-btrfs.Tpo -c -o strace-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-btrfs.Tpo $(DEPDIR)/strace-btrfs.Po +# $(AM_V_CC)source='btrfs.c' object='strace-btrfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` + +strace-cacheflush.o: cacheflush.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-cacheflush.o -MD -MP -MF $(DEPDIR)/strace-cacheflush.Tpo -c -o strace-cacheflush.o `test -f 'cacheflush.c' || echo '$(srcdir)/'`cacheflush.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-cacheflush.Tpo $(DEPDIR)/strace-cacheflush.Po +# $(AM_V_CC)source='cacheflush.c' object='strace-cacheflush.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-cacheflush.o `test -f 'cacheflush.c' || echo '$(srcdir)/'`cacheflush.c + +strace-cacheflush.obj: cacheflush.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-cacheflush.obj -MD -MP -MF $(DEPDIR)/strace-cacheflush.Tpo -c -o strace-cacheflush.obj `if test -f 'cacheflush.c'; then $(CYGPATH_W) 'cacheflush.c'; else $(CYGPATH_W) '$(srcdir)/cacheflush.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-cacheflush.Tpo $(DEPDIR)/strace-cacheflush.Po +# $(AM_V_CC)source='cacheflush.c' object='strace-cacheflush.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-cacheflush.obj `if test -f 'cacheflush.c'; then $(CYGPATH_W) 'cacheflush.c'; else $(CYGPATH_W) '$(srcdir)/cacheflush.c'; fi` + +strace-capability.o: capability.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-capability.o -MD -MP -MF $(DEPDIR)/strace-capability.Tpo -c -o strace-capability.o `test -f 'capability.c' || echo '$(srcdir)/'`capability.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-capability.Tpo $(DEPDIR)/strace-capability.Po +# $(AM_V_CC)source='capability.c' object='strace-capability.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-capability.o `test -f 'capability.c' || echo '$(srcdir)/'`capability.c + +strace-capability.obj: capability.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-capability.obj -MD -MP -MF $(DEPDIR)/strace-capability.Tpo -c -o strace-capability.obj `if test -f 'capability.c'; then $(CYGPATH_W) 'capability.c'; else $(CYGPATH_W) '$(srcdir)/capability.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-capability.Tpo $(DEPDIR)/strace-capability.Po +# $(AM_V_CC)source='capability.c' object='strace-capability.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-capability.obj `if test -f 'capability.c'; then $(CYGPATH_W) 'capability.c'; else $(CYGPATH_W) '$(srcdir)/capability.c'; fi` + +strace-chdir.o: chdir.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-chdir.o -MD -MP -MF $(DEPDIR)/strace-chdir.Tpo -c -o strace-chdir.o `test -f 'chdir.c' || echo '$(srcdir)/'`chdir.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-chdir.Tpo $(DEPDIR)/strace-chdir.Po +# $(AM_V_CC)source='chdir.c' object='strace-chdir.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-chdir.o `test -f 'chdir.c' || echo '$(srcdir)/'`chdir.c + +strace-chdir.obj: chdir.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-chdir.obj -MD -MP -MF $(DEPDIR)/strace-chdir.Tpo -c -o strace-chdir.obj `if test -f 'chdir.c'; then $(CYGPATH_W) 'chdir.c'; else $(CYGPATH_W) '$(srcdir)/chdir.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-chdir.Tpo $(DEPDIR)/strace-chdir.Po +# $(AM_V_CC)source='chdir.c' object='strace-chdir.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-chdir.obj `if test -f 'chdir.c'; then $(CYGPATH_W) 'chdir.c'; else $(CYGPATH_W) '$(srcdir)/chdir.c'; fi` + +strace-chmod.o: chmod.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-chmod.o -MD -MP -MF $(DEPDIR)/strace-chmod.Tpo -c -o strace-chmod.o `test -f 'chmod.c' || echo '$(srcdir)/'`chmod.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-chmod.Tpo $(DEPDIR)/strace-chmod.Po +# $(AM_V_CC)source='chmod.c' object='strace-chmod.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-chmod.o `test -f 'chmod.c' || echo '$(srcdir)/'`chmod.c + +strace-chmod.obj: chmod.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-chmod.obj -MD -MP -MF $(DEPDIR)/strace-chmod.Tpo -c -o strace-chmod.obj `if test -f 'chmod.c'; then $(CYGPATH_W) 'chmod.c'; else $(CYGPATH_W) '$(srcdir)/chmod.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-chmod.Tpo $(DEPDIR)/strace-chmod.Po +# $(AM_V_CC)source='chmod.c' object='strace-chmod.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-chmod.obj `if test -f 'chmod.c'; then $(CYGPATH_W) 'chmod.c'; else $(CYGPATH_W) '$(srcdir)/chmod.c'; fi` + +strace-clone.o: clone.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-clone.o -MD -MP -MF $(DEPDIR)/strace-clone.Tpo -c -o strace-clone.o `test -f 'clone.c' || echo '$(srcdir)/'`clone.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-clone.Tpo $(DEPDIR)/strace-clone.Po +# $(AM_V_CC)source='clone.c' object='strace-clone.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-clone.o `test -f 'clone.c' || echo '$(srcdir)/'`clone.c + +strace-clone.obj: clone.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-clone.obj -MD -MP -MF $(DEPDIR)/strace-clone.Tpo -c -o strace-clone.obj `if test -f 'clone.c'; then $(CYGPATH_W) 'clone.c'; else $(CYGPATH_W) '$(srcdir)/clone.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-clone.Tpo $(DEPDIR)/strace-clone.Po +# $(AM_V_CC)source='clone.c' object='strace-clone.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-clone.obj `if test -f 'clone.c'; then $(CYGPATH_W) 'clone.c'; else $(CYGPATH_W) '$(srcdir)/clone.c'; fi` + +strace-copy_file_range.o: copy_file_range.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-copy_file_range.o -MD -MP -MF $(DEPDIR)/strace-copy_file_range.Tpo -c -o strace-copy_file_range.o `test -f 'copy_file_range.c' || echo '$(srcdir)/'`copy_file_range.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-copy_file_range.Tpo $(DEPDIR)/strace-copy_file_range.Po +# $(AM_V_CC)source='copy_file_range.c' object='strace-copy_file_range.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-copy_file_range.o `test -f 'copy_file_range.c' || echo '$(srcdir)/'`copy_file_range.c + +strace-copy_file_range.obj: copy_file_range.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-copy_file_range.obj -MD -MP -MF $(DEPDIR)/strace-copy_file_range.Tpo -c -o strace-copy_file_range.obj `if test -f 'copy_file_range.c'; then $(CYGPATH_W) 'copy_file_range.c'; else $(CYGPATH_W) '$(srcdir)/copy_file_range.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-copy_file_range.Tpo $(DEPDIR)/strace-copy_file_range.Po +# $(AM_V_CC)source='copy_file_range.c' object='strace-copy_file_range.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-copy_file_range.obj `if test -f 'copy_file_range.c'; then $(CYGPATH_W) 'copy_file_range.c'; else $(CYGPATH_W) '$(srcdir)/copy_file_range.c'; fi` + +strace-count.o: count.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-count.o -MD -MP -MF $(DEPDIR)/strace-count.Tpo -c -o strace-count.o `test -f 'count.c' || echo '$(srcdir)/'`count.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-count.Tpo $(DEPDIR)/strace-count.Po +# $(AM_V_CC)source='count.c' object='strace-count.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-count.o `test -f 'count.c' || echo '$(srcdir)/'`count.c + +strace-count.obj: count.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-count.obj -MD -MP -MF $(DEPDIR)/strace-count.Tpo -c -o strace-count.obj `if test -f 'count.c'; then $(CYGPATH_W) 'count.c'; else $(CYGPATH_W) '$(srcdir)/count.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-count.Tpo $(DEPDIR)/strace-count.Po +# $(AM_V_CC)source='count.c' object='strace-count.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-count.obj `if test -f 'count.c'; then $(CYGPATH_W) 'count.c'; else $(CYGPATH_W) '$(srcdir)/count.c'; fi` + +strace-desc.o: desc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-desc.o -MD -MP -MF $(DEPDIR)/strace-desc.Tpo -c -o strace-desc.o `test -f 'desc.c' || echo '$(srcdir)/'`desc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-desc.Tpo $(DEPDIR)/strace-desc.Po +# $(AM_V_CC)source='desc.c' object='strace-desc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-desc.o `test -f 'desc.c' || echo '$(srcdir)/'`desc.c + +strace-desc.obj: desc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-desc.obj -MD -MP -MF $(DEPDIR)/strace-desc.Tpo -c -o strace-desc.obj `if test -f 'desc.c'; then $(CYGPATH_W) 'desc.c'; else $(CYGPATH_W) '$(srcdir)/desc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-desc.Tpo $(DEPDIR)/strace-desc.Po +# $(AM_V_CC)source='desc.c' object='strace-desc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-desc.obj `if test -f 'desc.c'; then $(CYGPATH_W) 'desc.c'; else $(CYGPATH_W) '$(srcdir)/desc.c'; fi` + +strace-dirent.o: dirent.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dirent.o -MD -MP -MF $(DEPDIR)/strace-dirent.Tpo -c -o strace-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dirent.Tpo $(DEPDIR)/strace-dirent.Po +# $(AM_V_CC)source='dirent.c' object='strace-dirent.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c + +strace-dirent.obj: dirent.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dirent.obj -MD -MP -MF $(DEPDIR)/strace-dirent.Tpo -c -o strace-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dirent.Tpo $(DEPDIR)/strace-dirent.Po +# $(AM_V_CC)source='dirent.c' object='strace-dirent.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` + +strace-dirent64.o: dirent64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dirent64.o -MD -MP -MF $(DEPDIR)/strace-dirent64.Tpo -c -o strace-dirent64.o `test -f 'dirent64.c' || echo '$(srcdir)/'`dirent64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dirent64.Tpo $(DEPDIR)/strace-dirent64.Po +# $(AM_V_CC)source='dirent64.c' object='strace-dirent64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dirent64.o `test -f 'dirent64.c' || echo '$(srcdir)/'`dirent64.c + +strace-dirent64.obj: dirent64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dirent64.obj -MD -MP -MF $(DEPDIR)/strace-dirent64.Tpo -c -o strace-dirent64.obj `if test -f 'dirent64.c'; then $(CYGPATH_W) 'dirent64.c'; else $(CYGPATH_W) '$(srcdir)/dirent64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dirent64.Tpo $(DEPDIR)/strace-dirent64.Po +# $(AM_V_CC)source='dirent64.c' object='strace-dirent64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dirent64.obj `if test -f 'dirent64.c'; then $(CYGPATH_W) 'dirent64.c'; else $(CYGPATH_W) '$(srcdir)/dirent64.c'; fi` + +strace-dm.o: dm.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dm.o -MD -MP -MF $(DEPDIR)/strace-dm.Tpo -c -o strace-dm.o `test -f 'dm.c' || echo '$(srcdir)/'`dm.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dm.Tpo $(DEPDIR)/strace-dm.Po +# $(AM_V_CC)source='dm.c' object='strace-dm.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dm.o `test -f 'dm.c' || echo '$(srcdir)/'`dm.c + +strace-dm.obj: dm.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dm.obj -MD -MP -MF $(DEPDIR)/strace-dm.Tpo -c -o strace-dm.obj `if test -f 'dm.c'; then $(CYGPATH_W) 'dm.c'; else $(CYGPATH_W) '$(srcdir)/dm.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dm.Tpo $(DEPDIR)/strace-dm.Po +# $(AM_V_CC)source='dm.c' object='strace-dm.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dm.obj `if test -f 'dm.c'; then $(CYGPATH_W) 'dm.c'; else $(CYGPATH_W) '$(srcdir)/dm.c'; fi` + +strace-epoll.o: epoll.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-epoll.o -MD -MP -MF $(DEPDIR)/strace-epoll.Tpo -c -o strace-epoll.o `test -f 'epoll.c' || echo '$(srcdir)/'`epoll.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-epoll.Tpo $(DEPDIR)/strace-epoll.Po +# $(AM_V_CC)source='epoll.c' object='strace-epoll.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-epoll.o `test -f 'epoll.c' || echo '$(srcdir)/'`epoll.c + +strace-epoll.obj: epoll.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-epoll.obj -MD -MP -MF $(DEPDIR)/strace-epoll.Tpo -c -o strace-epoll.obj `if test -f 'epoll.c'; then $(CYGPATH_W) 'epoll.c'; else $(CYGPATH_W) '$(srcdir)/epoll.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-epoll.Tpo $(DEPDIR)/strace-epoll.Po +# $(AM_V_CC)source='epoll.c' object='strace-epoll.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-epoll.obj `if test -f 'epoll.c'; then $(CYGPATH_W) 'epoll.c'; else $(CYGPATH_W) '$(srcdir)/epoll.c'; fi` + +strace-evdev.o: evdev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-evdev.o -MD -MP -MF $(DEPDIR)/strace-evdev.Tpo -c -o strace-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-evdev.Tpo $(DEPDIR)/strace-evdev.Po +# $(AM_V_CC)source='evdev.c' object='strace-evdev.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c + +strace-evdev.obj: evdev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-evdev.obj -MD -MP -MF $(DEPDIR)/strace-evdev.Tpo -c -o strace-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-evdev.Tpo $(DEPDIR)/strace-evdev.Po +# $(AM_V_CC)source='evdev.c' object='strace-evdev.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` + +strace-eventfd.o: eventfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-eventfd.o -MD -MP -MF $(DEPDIR)/strace-eventfd.Tpo -c -o strace-eventfd.o `test -f 'eventfd.c' || echo '$(srcdir)/'`eventfd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-eventfd.Tpo $(DEPDIR)/strace-eventfd.Po +# $(AM_V_CC)source='eventfd.c' object='strace-eventfd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-eventfd.o `test -f 'eventfd.c' || echo '$(srcdir)/'`eventfd.c + +strace-eventfd.obj: eventfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-eventfd.obj -MD -MP -MF $(DEPDIR)/strace-eventfd.Tpo -c -o strace-eventfd.obj `if test -f 'eventfd.c'; then $(CYGPATH_W) 'eventfd.c'; else $(CYGPATH_W) '$(srcdir)/eventfd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-eventfd.Tpo $(DEPDIR)/strace-eventfd.Po +# $(AM_V_CC)source='eventfd.c' object='strace-eventfd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-eventfd.obj `if test -f 'eventfd.c'; then $(CYGPATH_W) 'eventfd.c'; else $(CYGPATH_W) '$(srcdir)/eventfd.c'; fi` + +strace-execve.o: execve.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-execve.o -MD -MP -MF $(DEPDIR)/strace-execve.Tpo -c -o strace-execve.o `test -f 'execve.c' || echo '$(srcdir)/'`execve.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-execve.Tpo $(DEPDIR)/strace-execve.Po +# $(AM_V_CC)source='execve.c' object='strace-execve.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-execve.o `test -f 'execve.c' || echo '$(srcdir)/'`execve.c + +strace-execve.obj: execve.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-execve.obj -MD -MP -MF $(DEPDIR)/strace-execve.Tpo -c -o strace-execve.obj `if test -f 'execve.c'; then $(CYGPATH_W) 'execve.c'; else $(CYGPATH_W) '$(srcdir)/execve.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-execve.Tpo $(DEPDIR)/strace-execve.Po +# $(AM_V_CC)source='execve.c' object='strace-execve.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-execve.obj `if test -f 'execve.c'; then $(CYGPATH_W) 'execve.c'; else $(CYGPATH_W) '$(srcdir)/execve.c'; fi` + +strace-fadvise.o: fadvise.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fadvise.o -MD -MP -MF $(DEPDIR)/strace-fadvise.Tpo -c -o strace-fadvise.o `test -f 'fadvise.c' || echo '$(srcdir)/'`fadvise.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fadvise.Tpo $(DEPDIR)/strace-fadvise.Po +# $(AM_V_CC)source='fadvise.c' object='strace-fadvise.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fadvise.o `test -f 'fadvise.c' || echo '$(srcdir)/'`fadvise.c + +strace-fadvise.obj: fadvise.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fadvise.obj -MD -MP -MF $(DEPDIR)/strace-fadvise.Tpo -c -o strace-fadvise.obj `if test -f 'fadvise.c'; then $(CYGPATH_W) 'fadvise.c'; else $(CYGPATH_W) '$(srcdir)/fadvise.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fadvise.Tpo $(DEPDIR)/strace-fadvise.Po +# $(AM_V_CC)source='fadvise.c' object='strace-fadvise.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fadvise.obj `if test -f 'fadvise.c'; then $(CYGPATH_W) 'fadvise.c'; else $(CYGPATH_W) '$(srcdir)/fadvise.c'; fi` + +strace-fallocate.o: fallocate.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fallocate.o -MD -MP -MF $(DEPDIR)/strace-fallocate.Tpo -c -o strace-fallocate.o `test -f 'fallocate.c' || echo '$(srcdir)/'`fallocate.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fallocate.Tpo $(DEPDIR)/strace-fallocate.Po +# $(AM_V_CC)source='fallocate.c' object='strace-fallocate.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fallocate.o `test -f 'fallocate.c' || echo '$(srcdir)/'`fallocate.c + +strace-fallocate.obj: fallocate.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fallocate.obj -MD -MP -MF $(DEPDIR)/strace-fallocate.Tpo -c -o strace-fallocate.obj `if test -f 'fallocate.c'; then $(CYGPATH_W) 'fallocate.c'; else $(CYGPATH_W) '$(srcdir)/fallocate.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fallocate.Tpo $(DEPDIR)/strace-fallocate.Po +# $(AM_V_CC)source='fallocate.c' object='strace-fallocate.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fallocate.obj `if test -f 'fallocate.c'; then $(CYGPATH_W) 'fallocate.c'; else $(CYGPATH_W) '$(srcdir)/fallocate.c'; fi` + +strace-fanotify.o: fanotify.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fanotify.o -MD -MP -MF $(DEPDIR)/strace-fanotify.Tpo -c -o strace-fanotify.o `test -f 'fanotify.c' || echo '$(srcdir)/'`fanotify.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fanotify.Tpo $(DEPDIR)/strace-fanotify.Po +# $(AM_V_CC)source='fanotify.c' object='strace-fanotify.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fanotify.o `test -f 'fanotify.c' || echo '$(srcdir)/'`fanotify.c + +strace-fanotify.obj: fanotify.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fanotify.obj -MD -MP -MF $(DEPDIR)/strace-fanotify.Tpo -c -o strace-fanotify.obj `if test -f 'fanotify.c'; then $(CYGPATH_W) 'fanotify.c'; else $(CYGPATH_W) '$(srcdir)/fanotify.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fanotify.Tpo $(DEPDIR)/strace-fanotify.Po +# $(AM_V_CC)source='fanotify.c' object='strace-fanotify.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fanotify.obj `if test -f 'fanotify.c'; then $(CYGPATH_W) 'fanotify.c'; else $(CYGPATH_W) '$(srcdir)/fanotify.c'; fi` + +strace-fchownat.o: fchownat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fchownat.o -MD -MP -MF $(DEPDIR)/strace-fchownat.Tpo -c -o strace-fchownat.o `test -f 'fchownat.c' || echo '$(srcdir)/'`fchownat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fchownat.Tpo $(DEPDIR)/strace-fchownat.Po +# $(AM_V_CC)source='fchownat.c' object='strace-fchownat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fchownat.o `test -f 'fchownat.c' || echo '$(srcdir)/'`fchownat.c + +strace-fchownat.obj: fchownat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fchownat.obj -MD -MP -MF $(DEPDIR)/strace-fchownat.Tpo -c -o strace-fchownat.obj `if test -f 'fchownat.c'; then $(CYGPATH_W) 'fchownat.c'; else $(CYGPATH_W) '$(srcdir)/fchownat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fchownat.Tpo $(DEPDIR)/strace-fchownat.Po +# $(AM_V_CC)source='fchownat.c' object='strace-fchownat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fchownat.obj `if test -f 'fchownat.c'; then $(CYGPATH_W) 'fchownat.c'; else $(CYGPATH_W) '$(srcdir)/fchownat.c'; fi` + +strace-fcntl.o: fcntl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fcntl.o -MD -MP -MF $(DEPDIR)/strace-fcntl.Tpo -c -o strace-fcntl.o `test -f 'fcntl.c' || echo '$(srcdir)/'`fcntl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fcntl.Tpo $(DEPDIR)/strace-fcntl.Po +# $(AM_V_CC)source='fcntl.c' object='strace-fcntl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fcntl.o `test -f 'fcntl.c' || echo '$(srcdir)/'`fcntl.c + +strace-fcntl.obj: fcntl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fcntl.obj -MD -MP -MF $(DEPDIR)/strace-fcntl.Tpo -c -o strace-fcntl.obj `if test -f 'fcntl.c'; then $(CYGPATH_W) 'fcntl.c'; else $(CYGPATH_W) '$(srcdir)/fcntl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fcntl.Tpo $(DEPDIR)/strace-fcntl.Po +# $(AM_V_CC)source='fcntl.c' object='strace-fcntl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fcntl.obj `if test -f 'fcntl.c'; then $(CYGPATH_W) 'fcntl.c'; else $(CYGPATH_W) '$(srcdir)/fcntl.c'; fi` + +strace-fetch_seccomp_fprog.o: fetch_seccomp_fprog.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_seccomp_fprog.o -MD -MP -MF $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo -c -o strace-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo $(DEPDIR)/strace-fetch_seccomp_fprog.Po +# $(AM_V_CC)source='fetch_seccomp_fprog.c' object='strace-fetch_seccomp_fprog.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c + +strace-fetch_seccomp_fprog.obj: fetch_seccomp_fprog.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_seccomp_fprog.obj -MD -MP -MF $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo -c -o strace-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo $(DEPDIR)/strace-fetch_seccomp_fprog.Po +# $(AM_V_CC)source='fetch_seccomp_fprog.c' object='strace-fetch_seccomp_fprog.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` + +strace-fetch_struct_flock.o: fetch_struct_flock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_flock.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_flock.Tpo -c -o strace-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_flock.Tpo $(DEPDIR)/strace-fetch_struct_flock.Po +# $(AM_V_CC)source='fetch_struct_flock.c' object='strace-fetch_struct_flock.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c + +strace-fetch_struct_flock.obj: fetch_struct_flock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_flock.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_flock.Tpo -c -o strace-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_flock.Tpo $(DEPDIR)/strace-fetch_struct_flock.Po +# $(AM_V_CC)source='fetch_struct_flock.c' object='strace-fetch_struct_flock.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` + +strace-fetch_struct_mmsghdr.o: fetch_struct_mmsghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_mmsghdr.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_mmsghdr.Tpo -c -o strace-fetch_struct_mmsghdr.o `test -f 'fetch_struct_mmsghdr.c' || echo '$(srcdir)/'`fetch_struct_mmsghdr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_mmsghdr.Tpo $(DEPDIR)/strace-fetch_struct_mmsghdr.Po +# $(AM_V_CC)source='fetch_struct_mmsghdr.c' object='strace-fetch_struct_mmsghdr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_mmsghdr.o `test -f 'fetch_struct_mmsghdr.c' || echo '$(srcdir)/'`fetch_struct_mmsghdr.c + +strace-fetch_struct_mmsghdr.obj: fetch_struct_mmsghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_mmsghdr.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_mmsghdr.Tpo -c -o strace-fetch_struct_mmsghdr.obj `if test -f 'fetch_struct_mmsghdr.c'; then $(CYGPATH_W) 'fetch_struct_mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_mmsghdr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_mmsghdr.Tpo $(DEPDIR)/strace-fetch_struct_mmsghdr.Po +# $(AM_V_CC)source='fetch_struct_mmsghdr.c' object='strace-fetch_struct_mmsghdr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_mmsghdr.obj `if test -f 'fetch_struct_mmsghdr.c'; then $(CYGPATH_W) 'fetch_struct_mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_mmsghdr.c'; fi` + +strace-fetch_struct_msghdr.o: fetch_struct_msghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_msghdr.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_msghdr.Tpo -c -o strace-fetch_struct_msghdr.o `test -f 'fetch_struct_msghdr.c' || echo '$(srcdir)/'`fetch_struct_msghdr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_msghdr.Tpo $(DEPDIR)/strace-fetch_struct_msghdr.Po +# $(AM_V_CC)source='fetch_struct_msghdr.c' object='strace-fetch_struct_msghdr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_msghdr.o `test -f 'fetch_struct_msghdr.c' || echo '$(srcdir)/'`fetch_struct_msghdr.c + +strace-fetch_struct_msghdr.obj: fetch_struct_msghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_msghdr.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_msghdr.Tpo -c -o strace-fetch_struct_msghdr.obj `if test -f 'fetch_struct_msghdr.c'; then $(CYGPATH_W) 'fetch_struct_msghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_msghdr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_msghdr.Tpo $(DEPDIR)/strace-fetch_struct_msghdr.Po +# $(AM_V_CC)source='fetch_struct_msghdr.c' object='strace-fetch_struct_msghdr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_msghdr.obj `if test -f 'fetch_struct_msghdr.c'; then $(CYGPATH_W) 'fetch_struct_msghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_msghdr.c'; fi` + +strace-fetch_struct_stat.o: fetch_struct_stat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_stat.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_stat.Tpo -c -o strace-fetch_struct_stat.o `test -f 'fetch_struct_stat.c' || echo '$(srcdir)/'`fetch_struct_stat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_stat.Tpo $(DEPDIR)/strace-fetch_struct_stat.Po +# $(AM_V_CC)source='fetch_struct_stat.c' object='strace-fetch_struct_stat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_stat.o `test -f 'fetch_struct_stat.c' || echo '$(srcdir)/'`fetch_struct_stat.c + +strace-fetch_struct_stat.obj: fetch_struct_stat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_stat.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_stat.Tpo -c -o strace-fetch_struct_stat.obj `if test -f 'fetch_struct_stat.c'; then $(CYGPATH_W) 'fetch_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_stat.Tpo $(DEPDIR)/strace-fetch_struct_stat.Po +# $(AM_V_CC)source='fetch_struct_stat.c' object='strace-fetch_struct_stat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_stat.obj `if test -f 'fetch_struct_stat.c'; then $(CYGPATH_W) 'fetch_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat.c'; fi` + +strace-fetch_struct_stat64.o: fetch_struct_stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_stat64.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_stat64.Tpo -c -o strace-fetch_struct_stat64.o `test -f 'fetch_struct_stat64.c' || echo '$(srcdir)/'`fetch_struct_stat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_stat64.Tpo $(DEPDIR)/strace-fetch_struct_stat64.Po +# $(AM_V_CC)source='fetch_struct_stat64.c' object='strace-fetch_struct_stat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_stat64.o `test -f 'fetch_struct_stat64.c' || echo '$(srcdir)/'`fetch_struct_stat64.c + +strace-fetch_struct_stat64.obj: fetch_struct_stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_stat64.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_stat64.Tpo -c -o strace-fetch_struct_stat64.obj `if test -f 'fetch_struct_stat64.c'; then $(CYGPATH_W) 'fetch_struct_stat64.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_stat64.Tpo $(DEPDIR)/strace-fetch_struct_stat64.Po +# $(AM_V_CC)source='fetch_struct_stat64.c' object='strace-fetch_struct_stat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_stat64.obj `if test -f 'fetch_struct_stat64.c'; then $(CYGPATH_W) 'fetch_struct_stat64.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat64.c'; fi` + +strace-fetch_struct_statfs.o: fetch_struct_statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_statfs.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_statfs.Tpo -c -o strace-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_statfs.Tpo $(DEPDIR)/strace-fetch_struct_statfs.Po +# $(AM_V_CC)source='fetch_struct_statfs.c' object='strace-fetch_struct_statfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c + +strace-fetch_struct_statfs.obj: fetch_struct_statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_statfs.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_statfs.Tpo -c -o strace-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_statfs.Tpo $(DEPDIR)/strace-fetch_struct_statfs.Po +# $(AM_V_CC)source='fetch_struct_statfs.c' object='strace-fetch_struct_statfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` + +strace-file_handle.o: file_handle.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file_handle.o -MD -MP -MF $(DEPDIR)/strace-file_handle.Tpo -c -o strace-file_handle.o `test -f 'file_handle.c' || echo '$(srcdir)/'`file_handle.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file_handle.Tpo $(DEPDIR)/strace-file_handle.Po +# $(AM_V_CC)source='file_handle.c' object='strace-file_handle.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file_handle.o `test -f 'file_handle.c' || echo '$(srcdir)/'`file_handle.c + +strace-file_handle.obj: file_handle.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file_handle.obj -MD -MP -MF $(DEPDIR)/strace-file_handle.Tpo -c -o strace-file_handle.obj `if test -f 'file_handle.c'; then $(CYGPATH_W) 'file_handle.c'; else $(CYGPATH_W) '$(srcdir)/file_handle.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file_handle.Tpo $(DEPDIR)/strace-file_handle.Po +# $(AM_V_CC)source='file_handle.c' object='strace-file_handle.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file_handle.obj `if test -f 'file_handle.c'; then $(CYGPATH_W) 'file_handle.c'; else $(CYGPATH_W) '$(srcdir)/file_handle.c'; fi` + +strace-file_ioctl.o: file_ioctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file_ioctl.o -MD -MP -MF $(DEPDIR)/strace-file_ioctl.Tpo -c -o strace-file_ioctl.o `test -f 'file_ioctl.c' || echo '$(srcdir)/'`file_ioctl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file_ioctl.Tpo $(DEPDIR)/strace-file_ioctl.Po +# $(AM_V_CC)source='file_ioctl.c' object='strace-file_ioctl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file_ioctl.o `test -f 'file_ioctl.c' || echo '$(srcdir)/'`file_ioctl.c + +strace-file_ioctl.obj: file_ioctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file_ioctl.obj -MD -MP -MF $(DEPDIR)/strace-file_ioctl.Tpo -c -o strace-file_ioctl.obj `if test -f 'file_ioctl.c'; then $(CYGPATH_W) 'file_ioctl.c'; else $(CYGPATH_W) '$(srcdir)/file_ioctl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file_ioctl.Tpo $(DEPDIR)/strace-file_ioctl.Po +# $(AM_V_CC)source='file_ioctl.c' object='strace-file_ioctl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file_ioctl.obj `if test -f 'file_ioctl.c'; then $(CYGPATH_W) 'file_ioctl.c'; else $(CYGPATH_W) '$(srcdir)/file_ioctl.c'; fi` + +strace-fs_x_ioctl.o: fs_x_ioctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fs_x_ioctl.o -MD -MP -MF $(DEPDIR)/strace-fs_x_ioctl.Tpo -c -o strace-fs_x_ioctl.o `test -f 'fs_x_ioctl.c' || echo '$(srcdir)/'`fs_x_ioctl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fs_x_ioctl.Tpo $(DEPDIR)/strace-fs_x_ioctl.Po +# $(AM_V_CC)source='fs_x_ioctl.c' object='strace-fs_x_ioctl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fs_x_ioctl.o `test -f 'fs_x_ioctl.c' || echo '$(srcdir)/'`fs_x_ioctl.c + +strace-fs_x_ioctl.obj: fs_x_ioctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fs_x_ioctl.obj -MD -MP -MF $(DEPDIR)/strace-fs_x_ioctl.Tpo -c -o strace-fs_x_ioctl.obj `if test -f 'fs_x_ioctl.c'; then $(CYGPATH_W) 'fs_x_ioctl.c'; else $(CYGPATH_W) '$(srcdir)/fs_x_ioctl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fs_x_ioctl.Tpo $(DEPDIR)/strace-fs_x_ioctl.Po +# $(AM_V_CC)source='fs_x_ioctl.c' object='strace-fs_x_ioctl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fs_x_ioctl.obj `if test -f 'fs_x_ioctl.c'; then $(CYGPATH_W) 'fs_x_ioctl.c'; else $(CYGPATH_W) '$(srcdir)/fs_x_ioctl.c'; fi` + +strace-flock.o: flock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-flock.o -MD -MP -MF $(DEPDIR)/strace-flock.Tpo -c -o strace-flock.o `test -f 'flock.c' || echo '$(srcdir)/'`flock.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-flock.Tpo $(DEPDIR)/strace-flock.Po +# $(AM_V_CC)source='flock.c' object='strace-flock.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-flock.o `test -f 'flock.c' || echo '$(srcdir)/'`flock.c + +strace-flock.obj: flock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-flock.obj -MD -MP -MF $(DEPDIR)/strace-flock.Tpo -c -o strace-flock.obj `if test -f 'flock.c'; then $(CYGPATH_W) 'flock.c'; else $(CYGPATH_W) '$(srcdir)/flock.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-flock.Tpo $(DEPDIR)/strace-flock.Po +# $(AM_V_CC)source='flock.c' object='strace-flock.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-flock.obj `if test -f 'flock.c'; then $(CYGPATH_W) 'flock.c'; else $(CYGPATH_W) '$(srcdir)/flock.c'; fi` + +strace-futex.o: futex.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-futex.o -MD -MP -MF $(DEPDIR)/strace-futex.Tpo -c -o strace-futex.o `test -f 'futex.c' || echo '$(srcdir)/'`futex.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-futex.Tpo $(DEPDIR)/strace-futex.Po +# $(AM_V_CC)source='futex.c' object='strace-futex.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-futex.o `test -f 'futex.c' || echo '$(srcdir)/'`futex.c + +strace-futex.obj: futex.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-futex.obj -MD -MP -MF $(DEPDIR)/strace-futex.Tpo -c -o strace-futex.obj `if test -f 'futex.c'; then $(CYGPATH_W) 'futex.c'; else $(CYGPATH_W) '$(srcdir)/futex.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-futex.Tpo $(DEPDIR)/strace-futex.Po +# $(AM_V_CC)source='futex.c' object='strace-futex.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-futex.obj `if test -f 'futex.c'; then $(CYGPATH_W) 'futex.c'; else $(CYGPATH_W) '$(srcdir)/futex.c'; fi` + +strace-get_robust_list.o: get_robust_list.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-get_robust_list.o -MD -MP -MF $(DEPDIR)/strace-get_robust_list.Tpo -c -o strace-get_robust_list.o `test -f 'get_robust_list.c' || echo '$(srcdir)/'`get_robust_list.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-get_robust_list.Tpo $(DEPDIR)/strace-get_robust_list.Po +# $(AM_V_CC)source='get_robust_list.c' object='strace-get_robust_list.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-get_robust_list.o `test -f 'get_robust_list.c' || echo '$(srcdir)/'`get_robust_list.c + +strace-get_robust_list.obj: get_robust_list.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-get_robust_list.obj -MD -MP -MF $(DEPDIR)/strace-get_robust_list.Tpo -c -o strace-get_robust_list.obj `if test -f 'get_robust_list.c'; then $(CYGPATH_W) 'get_robust_list.c'; else $(CYGPATH_W) '$(srcdir)/get_robust_list.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-get_robust_list.Tpo $(DEPDIR)/strace-get_robust_list.Po +# $(AM_V_CC)source='get_robust_list.c' object='strace-get_robust_list.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-get_robust_list.obj `if test -f 'get_robust_list.c'; then $(CYGPATH_W) 'get_robust_list.c'; else $(CYGPATH_W) '$(srcdir)/get_robust_list.c'; fi` + +strace-getcpu.o: getcpu.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getcpu.o -MD -MP -MF $(DEPDIR)/strace-getcpu.Tpo -c -o strace-getcpu.o `test -f 'getcpu.c' || echo '$(srcdir)/'`getcpu.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getcpu.Tpo $(DEPDIR)/strace-getcpu.Po +# $(AM_V_CC)source='getcpu.c' object='strace-getcpu.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getcpu.o `test -f 'getcpu.c' || echo '$(srcdir)/'`getcpu.c + +strace-getcpu.obj: getcpu.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getcpu.obj -MD -MP -MF $(DEPDIR)/strace-getcpu.Tpo -c -o strace-getcpu.obj `if test -f 'getcpu.c'; then $(CYGPATH_W) 'getcpu.c'; else $(CYGPATH_W) '$(srcdir)/getcpu.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getcpu.Tpo $(DEPDIR)/strace-getcpu.Po +# $(AM_V_CC)source='getcpu.c' object='strace-getcpu.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getcpu.obj `if test -f 'getcpu.c'; then $(CYGPATH_W) 'getcpu.c'; else $(CYGPATH_W) '$(srcdir)/getcpu.c'; fi` + +strace-getcwd.o: getcwd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getcwd.o -MD -MP -MF $(DEPDIR)/strace-getcwd.Tpo -c -o strace-getcwd.o `test -f 'getcwd.c' || echo '$(srcdir)/'`getcwd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getcwd.Tpo $(DEPDIR)/strace-getcwd.Po +# $(AM_V_CC)source='getcwd.c' object='strace-getcwd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getcwd.o `test -f 'getcwd.c' || echo '$(srcdir)/'`getcwd.c + +strace-getcwd.obj: getcwd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getcwd.obj -MD -MP -MF $(DEPDIR)/strace-getcwd.Tpo -c -o strace-getcwd.obj `if test -f 'getcwd.c'; then $(CYGPATH_W) 'getcwd.c'; else $(CYGPATH_W) '$(srcdir)/getcwd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getcwd.Tpo $(DEPDIR)/strace-getcwd.Po +# $(AM_V_CC)source='getcwd.c' object='strace-getcwd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getcwd.obj `if test -f 'getcwd.c'; then $(CYGPATH_W) 'getcwd.c'; else $(CYGPATH_W) '$(srcdir)/getcwd.c'; fi` + +strace-getrandom.o: getrandom.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getrandom.o -MD -MP -MF $(DEPDIR)/strace-getrandom.Tpo -c -o strace-getrandom.o `test -f 'getrandom.c' || echo '$(srcdir)/'`getrandom.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getrandom.Tpo $(DEPDIR)/strace-getrandom.Po +# $(AM_V_CC)source='getrandom.c' object='strace-getrandom.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getrandom.o `test -f 'getrandom.c' || echo '$(srcdir)/'`getrandom.c + +strace-getrandom.obj: getrandom.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getrandom.obj -MD -MP -MF $(DEPDIR)/strace-getrandom.Tpo -c -o strace-getrandom.obj `if test -f 'getrandom.c'; then $(CYGPATH_W) 'getrandom.c'; else $(CYGPATH_W) '$(srcdir)/getrandom.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getrandom.Tpo $(DEPDIR)/strace-getrandom.Po +# $(AM_V_CC)source='getrandom.c' object='strace-getrandom.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getrandom.obj `if test -f 'getrandom.c'; then $(CYGPATH_W) 'getrandom.c'; else $(CYGPATH_W) '$(srcdir)/getrandom.c'; fi` + +strace-hdio.o: hdio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-hdio.o -MD -MP -MF $(DEPDIR)/strace-hdio.Tpo -c -o strace-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-hdio.Tpo $(DEPDIR)/strace-hdio.Po +# $(AM_V_CC)source='hdio.c' object='strace-hdio.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c + +strace-hdio.obj: hdio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-hdio.obj -MD -MP -MF $(DEPDIR)/strace-hdio.Tpo -c -o strace-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-hdio.Tpo $(DEPDIR)/strace-hdio.Po +# $(AM_V_CC)source='hdio.c' object='strace-hdio.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` + +strace-hostname.o: hostname.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-hostname.o -MD -MP -MF $(DEPDIR)/strace-hostname.Tpo -c -o strace-hostname.o `test -f 'hostname.c' || echo '$(srcdir)/'`hostname.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-hostname.Tpo $(DEPDIR)/strace-hostname.Po +# $(AM_V_CC)source='hostname.c' object='strace-hostname.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-hostname.o `test -f 'hostname.c' || echo '$(srcdir)/'`hostname.c + +strace-hostname.obj: hostname.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-hostname.obj -MD -MP -MF $(DEPDIR)/strace-hostname.Tpo -c -o strace-hostname.obj `if test -f 'hostname.c'; then $(CYGPATH_W) 'hostname.c'; else $(CYGPATH_W) '$(srcdir)/hostname.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-hostname.Tpo $(DEPDIR)/strace-hostname.Po +# $(AM_V_CC)source='hostname.c' object='strace-hostname.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-hostname.obj `if test -f 'hostname.c'; then $(CYGPATH_W) 'hostname.c'; else $(CYGPATH_W) '$(srcdir)/hostname.c'; fi` + +strace-inotify.o: inotify.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-inotify.o -MD -MP -MF $(DEPDIR)/strace-inotify.Tpo -c -o strace-inotify.o `test -f 'inotify.c' || echo '$(srcdir)/'`inotify.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-inotify.Tpo $(DEPDIR)/strace-inotify.Po +# $(AM_V_CC)source='inotify.c' object='strace-inotify.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-inotify.o `test -f 'inotify.c' || echo '$(srcdir)/'`inotify.c + +strace-inotify.obj: inotify.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-inotify.obj -MD -MP -MF $(DEPDIR)/strace-inotify.Tpo -c -o strace-inotify.obj `if test -f 'inotify.c'; then $(CYGPATH_W) 'inotify.c'; else $(CYGPATH_W) '$(srcdir)/inotify.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-inotify.Tpo $(DEPDIR)/strace-inotify.Po +# $(AM_V_CC)source='inotify.c' object='strace-inotify.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-inotify.obj `if test -f 'inotify.c'; then $(CYGPATH_W) 'inotify.c'; else $(CYGPATH_W) '$(srcdir)/inotify.c'; fi` + +strace-io.o: io.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-io.o -MD -MP -MF $(DEPDIR)/strace-io.Tpo -c -o strace-io.o `test -f 'io.c' || echo '$(srcdir)/'`io.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-io.Tpo $(DEPDIR)/strace-io.Po +# $(AM_V_CC)source='io.c' object='strace-io.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-io.o `test -f 'io.c' || echo '$(srcdir)/'`io.c + +strace-io.obj: io.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-io.obj -MD -MP -MF $(DEPDIR)/strace-io.Tpo -c -o strace-io.obj `if test -f 'io.c'; then $(CYGPATH_W) 'io.c'; else $(CYGPATH_W) '$(srcdir)/io.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-io.Tpo $(DEPDIR)/strace-io.Po +# $(AM_V_CC)source='io.c' object='strace-io.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-io.obj `if test -f 'io.c'; then $(CYGPATH_W) 'io.c'; else $(CYGPATH_W) '$(srcdir)/io.c'; fi` + +strace-ioctl.o: ioctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioctl.o -MD -MP -MF $(DEPDIR)/strace-ioctl.Tpo -c -o strace-ioctl.o `test -f 'ioctl.c' || echo '$(srcdir)/'`ioctl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioctl.Tpo $(DEPDIR)/strace-ioctl.Po +# $(AM_V_CC)source='ioctl.c' object='strace-ioctl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioctl.o `test -f 'ioctl.c' || echo '$(srcdir)/'`ioctl.c + +strace-ioctl.obj: ioctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioctl.obj -MD -MP -MF $(DEPDIR)/strace-ioctl.Tpo -c -o strace-ioctl.obj `if test -f 'ioctl.c'; then $(CYGPATH_W) 'ioctl.c'; else $(CYGPATH_W) '$(srcdir)/ioctl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioctl.Tpo $(DEPDIR)/strace-ioctl.Po +# $(AM_V_CC)source='ioctl.c' object='strace-ioctl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioctl.obj `if test -f 'ioctl.c'; then $(CYGPATH_W) 'ioctl.c'; else $(CYGPATH_W) '$(srcdir)/ioctl.c'; fi` + +strace-ioperm.o: ioperm.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioperm.o -MD -MP -MF $(DEPDIR)/strace-ioperm.Tpo -c -o strace-ioperm.o `test -f 'ioperm.c' || echo '$(srcdir)/'`ioperm.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioperm.Tpo $(DEPDIR)/strace-ioperm.Po +# $(AM_V_CC)source='ioperm.c' object='strace-ioperm.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioperm.o `test -f 'ioperm.c' || echo '$(srcdir)/'`ioperm.c + +strace-ioperm.obj: ioperm.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioperm.obj -MD -MP -MF $(DEPDIR)/strace-ioperm.Tpo -c -o strace-ioperm.obj `if test -f 'ioperm.c'; then $(CYGPATH_W) 'ioperm.c'; else $(CYGPATH_W) '$(srcdir)/ioperm.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioperm.Tpo $(DEPDIR)/strace-ioperm.Po +# $(AM_V_CC)source='ioperm.c' object='strace-ioperm.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioperm.obj `if test -f 'ioperm.c'; then $(CYGPATH_W) 'ioperm.c'; else $(CYGPATH_W) '$(srcdir)/ioperm.c'; fi` + +strace-iopl.o: iopl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-iopl.o -MD -MP -MF $(DEPDIR)/strace-iopl.Tpo -c -o strace-iopl.o `test -f 'iopl.c' || echo '$(srcdir)/'`iopl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-iopl.Tpo $(DEPDIR)/strace-iopl.Po +# $(AM_V_CC)source='iopl.c' object='strace-iopl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-iopl.o `test -f 'iopl.c' || echo '$(srcdir)/'`iopl.c + +strace-iopl.obj: iopl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-iopl.obj -MD -MP -MF $(DEPDIR)/strace-iopl.Tpo -c -o strace-iopl.obj `if test -f 'iopl.c'; then $(CYGPATH_W) 'iopl.c'; else $(CYGPATH_W) '$(srcdir)/iopl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-iopl.Tpo $(DEPDIR)/strace-iopl.Po +# $(AM_V_CC)source='iopl.c' object='strace-iopl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-iopl.obj `if test -f 'iopl.c'; then $(CYGPATH_W) 'iopl.c'; else $(CYGPATH_W) '$(srcdir)/iopl.c'; fi` + +strace-ioprio.o: ioprio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioprio.o -MD -MP -MF $(DEPDIR)/strace-ioprio.Tpo -c -o strace-ioprio.o `test -f 'ioprio.c' || echo '$(srcdir)/'`ioprio.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioprio.Tpo $(DEPDIR)/strace-ioprio.Po +# $(AM_V_CC)source='ioprio.c' object='strace-ioprio.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioprio.o `test -f 'ioprio.c' || echo '$(srcdir)/'`ioprio.c + +strace-ioprio.obj: ioprio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioprio.obj -MD -MP -MF $(DEPDIR)/strace-ioprio.Tpo -c -o strace-ioprio.obj `if test -f 'ioprio.c'; then $(CYGPATH_W) 'ioprio.c'; else $(CYGPATH_W) '$(srcdir)/ioprio.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioprio.Tpo $(DEPDIR)/strace-ioprio.Po +# $(AM_V_CC)source='ioprio.c' object='strace-ioprio.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioprio.obj `if test -f 'ioprio.c'; then $(CYGPATH_W) 'ioprio.c'; else $(CYGPATH_W) '$(srcdir)/ioprio.c'; fi` + +strace-ipc_msg.o: ipc_msg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_msg.o -MD -MP -MF $(DEPDIR)/strace-ipc_msg.Tpo -c -o strace-ipc_msg.o `test -f 'ipc_msg.c' || echo '$(srcdir)/'`ipc_msg.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_msg.Tpo $(DEPDIR)/strace-ipc_msg.Po +# $(AM_V_CC)source='ipc_msg.c' object='strace-ipc_msg.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_msg.o `test -f 'ipc_msg.c' || echo '$(srcdir)/'`ipc_msg.c + +strace-ipc_msg.obj: ipc_msg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_msg.obj -MD -MP -MF $(DEPDIR)/strace-ipc_msg.Tpo -c -o strace-ipc_msg.obj `if test -f 'ipc_msg.c'; then $(CYGPATH_W) 'ipc_msg.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msg.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_msg.Tpo $(DEPDIR)/strace-ipc_msg.Po +# $(AM_V_CC)source='ipc_msg.c' object='strace-ipc_msg.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_msg.obj `if test -f 'ipc_msg.c'; then $(CYGPATH_W) 'ipc_msg.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msg.c'; fi` + +strace-ipc_msgctl.o: ipc_msgctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_msgctl.o -MD -MP -MF $(DEPDIR)/strace-ipc_msgctl.Tpo -c -o strace-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_msgctl.Tpo $(DEPDIR)/strace-ipc_msgctl.Po +# $(AM_V_CC)source='ipc_msgctl.c' object='strace-ipc_msgctl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c + +strace-ipc_msgctl.obj: ipc_msgctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_msgctl.obj -MD -MP -MF $(DEPDIR)/strace-ipc_msgctl.Tpo -c -o strace-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_msgctl.Tpo $(DEPDIR)/strace-ipc_msgctl.Po +# $(AM_V_CC)source='ipc_msgctl.c' object='strace-ipc_msgctl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` + +strace-ipc_sem.o: ipc_sem.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_sem.o -MD -MP -MF $(DEPDIR)/strace-ipc_sem.Tpo -c -o strace-ipc_sem.o `test -f 'ipc_sem.c' || echo '$(srcdir)/'`ipc_sem.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_sem.Tpo $(DEPDIR)/strace-ipc_sem.Po +# $(AM_V_CC)source='ipc_sem.c' object='strace-ipc_sem.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_sem.o `test -f 'ipc_sem.c' || echo '$(srcdir)/'`ipc_sem.c + +strace-ipc_sem.obj: ipc_sem.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_sem.obj -MD -MP -MF $(DEPDIR)/strace-ipc_sem.Tpo -c -o strace-ipc_sem.obj `if test -f 'ipc_sem.c'; then $(CYGPATH_W) 'ipc_sem.c'; else $(CYGPATH_W) '$(srcdir)/ipc_sem.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_sem.Tpo $(DEPDIR)/strace-ipc_sem.Po +# $(AM_V_CC)source='ipc_sem.c' object='strace-ipc_sem.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_sem.obj `if test -f 'ipc_sem.c'; then $(CYGPATH_W) 'ipc_sem.c'; else $(CYGPATH_W) '$(srcdir)/ipc_sem.c'; fi` + +strace-ipc_shm.o: ipc_shm.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_shm.o -MD -MP -MF $(DEPDIR)/strace-ipc_shm.Tpo -c -o strace-ipc_shm.o `test -f 'ipc_shm.c' || echo '$(srcdir)/'`ipc_shm.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_shm.Tpo $(DEPDIR)/strace-ipc_shm.Po +# $(AM_V_CC)source='ipc_shm.c' object='strace-ipc_shm.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_shm.o `test -f 'ipc_shm.c' || echo '$(srcdir)/'`ipc_shm.c + +strace-ipc_shm.obj: ipc_shm.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_shm.obj -MD -MP -MF $(DEPDIR)/strace-ipc_shm.Tpo -c -o strace-ipc_shm.obj `if test -f 'ipc_shm.c'; then $(CYGPATH_W) 'ipc_shm.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shm.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_shm.Tpo $(DEPDIR)/strace-ipc_shm.Po +# $(AM_V_CC)source='ipc_shm.c' object='strace-ipc_shm.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_shm.obj `if test -f 'ipc_shm.c'; then $(CYGPATH_W) 'ipc_shm.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shm.c'; fi` + +strace-ipc_shmctl.o: ipc_shmctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_shmctl.o -MD -MP -MF $(DEPDIR)/strace-ipc_shmctl.Tpo -c -o strace-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_shmctl.Tpo $(DEPDIR)/strace-ipc_shmctl.Po +# $(AM_V_CC)source='ipc_shmctl.c' object='strace-ipc_shmctl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c + +strace-ipc_shmctl.obj: ipc_shmctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_shmctl.obj -MD -MP -MF $(DEPDIR)/strace-ipc_shmctl.Tpo -c -o strace-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_shmctl.Tpo $(DEPDIR)/strace-ipc_shmctl.Po +# $(AM_V_CC)source='ipc_shmctl.c' object='strace-ipc_shmctl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` + +strace-kcmp.o: kcmp.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-kcmp.o -MD -MP -MF $(DEPDIR)/strace-kcmp.Tpo -c -o strace-kcmp.o `test -f 'kcmp.c' || echo '$(srcdir)/'`kcmp.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-kcmp.Tpo $(DEPDIR)/strace-kcmp.Po +# $(AM_V_CC)source='kcmp.c' object='strace-kcmp.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-kcmp.o `test -f 'kcmp.c' || echo '$(srcdir)/'`kcmp.c + +strace-kcmp.obj: kcmp.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-kcmp.obj -MD -MP -MF $(DEPDIR)/strace-kcmp.Tpo -c -o strace-kcmp.obj `if test -f 'kcmp.c'; then $(CYGPATH_W) 'kcmp.c'; else $(CYGPATH_W) '$(srcdir)/kcmp.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-kcmp.Tpo $(DEPDIR)/strace-kcmp.Po +# $(AM_V_CC)source='kcmp.c' object='strace-kcmp.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-kcmp.obj `if test -f 'kcmp.c'; then $(CYGPATH_W) 'kcmp.c'; else $(CYGPATH_W) '$(srcdir)/kcmp.c'; fi` + +strace-kexec.o: kexec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-kexec.o -MD -MP -MF $(DEPDIR)/strace-kexec.Tpo -c -o strace-kexec.o `test -f 'kexec.c' || echo '$(srcdir)/'`kexec.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-kexec.Tpo $(DEPDIR)/strace-kexec.Po +# $(AM_V_CC)source='kexec.c' object='strace-kexec.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-kexec.o `test -f 'kexec.c' || echo '$(srcdir)/'`kexec.c + +strace-kexec.obj: kexec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-kexec.obj -MD -MP -MF $(DEPDIR)/strace-kexec.Tpo -c -o strace-kexec.obj `if test -f 'kexec.c'; then $(CYGPATH_W) 'kexec.c'; else $(CYGPATH_W) '$(srcdir)/kexec.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-kexec.Tpo $(DEPDIR)/strace-kexec.Po +# $(AM_V_CC)source='kexec.c' object='strace-kexec.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-kexec.obj `if test -f 'kexec.c'; then $(CYGPATH_W) 'kexec.c'; else $(CYGPATH_W) '$(srcdir)/kexec.c'; fi` + +strace-keyctl.o: keyctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-keyctl.o -MD -MP -MF $(DEPDIR)/strace-keyctl.Tpo -c -o strace-keyctl.o `test -f 'keyctl.c' || echo '$(srcdir)/'`keyctl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-keyctl.Tpo $(DEPDIR)/strace-keyctl.Po +# $(AM_V_CC)source='keyctl.c' object='strace-keyctl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-keyctl.o `test -f 'keyctl.c' || echo '$(srcdir)/'`keyctl.c + +strace-keyctl.obj: keyctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-keyctl.obj -MD -MP -MF $(DEPDIR)/strace-keyctl.Tpo -c -o strace-keyctl.obj `if test -f 'keyctl.c'; then $(CYGPATH_W) 'keyctl.c'; else $(CYGPATH_W) '$(srcdir)/keyctl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-keyctl.Tpo $(DEPDIR)/strace-keyctl.Po +# $(AM_V_CC)source='keyctl.c' object='strace-keyctl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-keyctl.obj `if test -f 'keyctl.c'; then $(CYGPATH_W) 'keyctl.c'; else $(CYGPATH_W) '$(srcdir)/keyctl.c'; fi` + +strace-ldt.o: ldt.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ldt.o -MD -MP -MF $(DEPDIR)/strace-ldt.Tpo -c -o strace-ldt.o `test -f 'ldt.c' || echo '$(srcdir)/'`ldt.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ldt.Tpo $(DEPDIR)/strace-ldt.Po +# $(AM_V_CC)source='ldt.c' object='strace-ldt.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ldt.o `test -f 'ldt.c' || echo '$(srcdir)/'`ldt.c + +strace-ldt.obj: ldt.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ldt.obj -MD -MP -MF $(DEPDIR)/strace-ldt.Tpo -c -o strace-ldt.obj `if test -f 'ldt.c'; then $(CYGPATH_W) 'ldt.c'; else $(CYGPATH_W) '$(srcdir)/ldt.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ldt.Tpo $(DEPDIR)/strace-ldt.Po +# $(AM_V_CC)source='ldt.c' object='strace-ldt.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ldt.obj `if test -f 'ldt.c'; then $(CYGPATH_W) 'ldt.c'; else $(CYGPATH_W) '$(srcdir)/ldt.c'; fi` + +strace-link.o: link.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-link.o -MD -MP -MF $(DEPDIR)/strace-link.Tpo -c -o strace-link.o `test -f 'link.c' || echo '$(srcdir)/'`link.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-link.Tpo $(DEPDIR)/strace-link.Po +# $(AM_V_CC)source='link.c' object='strace-link.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-link.o `test -f 'link.c' || echo '$(srcdir)/'`link.c + +strace-link.obj: link.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-link.obj -MD -MP -MF $(DEPDIR)/strace-link.Tpo -c -o strace-link.obj `if test -f 'link.c'; then $(CYGPATH_W) 'link.c'; else $(CYGPATH_W) '$(srcdir)/link.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-link.Tpo $(DEPDIR)/strace-link.Po +# $(AM_V_CC)source='link.c' object='strace-link.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-link.obj `if test -f 'link.c'; then $(CYGPATH_W) 'link.c'; else $(CYGPATH_W) '$(srcdir)/link.c'; fi` + +strace-lookup_dcookie.o: lookup_dcookie.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-lookup_dcookie.o -MD -MP -MF $(DEPDIR)/strace-lookup_dcookie.Tpo -c -o strace-lookup_dcookie.o `test -f 'lookup_dcookie.c' || echo '$(srcdir)/'`lookup_dcookie.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-lookup_dcookie.Tpo $(DEPDIR)/strace-lookup_dcookie.Po +# $(AM_V_CC)source='lookup_dcookie.c' object='strace-lookup_dcookie.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-lookup_dcookie.o `test -f 'lookup_dcookie.c' || echo '$(srcdir)/'`lookup_dcookie.c + +strace-lookup_dcookie.obj: lookup_dcookie.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-lookup_dcookie.obj -MD -MP -MF $(DEPDIR)/strace-lookup_dcookie.Tpo -c -o strace-lookup_dcookie.obj `if test -f 'lookup_dcookie.c'; then $(CYGPATH_W) 'lookup_dcookie.c'; else $(CYGPATH_W) '$(srcdir)/lookup_dcookie.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-lookup_dcookie.Tpo $(DEPDIR)/strace-lookup_dcookie.Po +# $(AM_V_CC)source='lookup_dcookie.c' object='strace-lookup_dcookie.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-lookup_dcookie.obj `if test -f 'lookup_dcookie.c'; then $(CYGPATH_W) 'lookup_dcookie.c'; else $(CYGPATH_W) '$(srcdir)/lookup_dcookie.c'; fi` + +strace-loop.o: loop.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-loop.o -MD -MP -MF $(DEPDIR)/strace-loop.Tpo -c -o strace-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-loop.Tpo $(DEPDIR)/strace-loop.Po +# $(AM_V_CC)source='loop.c' object='strace-loop.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c + +strace-loop.obj: loop.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-loop.obj -MD -MP -MF $(DEPDIR)/strace-loop.Tpo -c -o strace-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-loop.Tpo $(DEPDIR)/strace-loop.Po +# $(AM_V_CC)source='loop.c' object='strace-loop.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` + +strace-lseek.o: lseek.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-lseek.o -MD -MP -MF $(DEPDIR)/strace-lseek.Tpo -c -o strace-lseek.o `test -f 'lseek.c' || echo '$(srcdir)/'`lseek.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-lseek.Tpo $(DEPDIR)/strace-lseek.Po +# $(AM_V_CC)source='lseek.c' object='strace-lseek.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-lseek.o `test -f 'lseek.c' || echo '$(srcdir)/'`lseek.c + +strace-lseek.obj: lseek.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-lseek.obj -MD -MP -MF $(DEPDIR)/strace-lseek.Tpo -c -o strace-lseek.obj `if test -f 'lseek.c'; then $(CYGPATH_W) 'lseek.c'; else $(CYGPATH_W) '$(srcdir)/lseek.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-lseek.Tpo $(DEPDIR)/strace-lseek.Po +# $(AM_V_CC)source='lseek.c' object='strace-lseek.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-lseek.obj `if test -f 'lseek.c'; then $(CYGPATH_W) 'lseek.c'; else $(CYGPATH_W) '$(srcdir)/lseek.c'; fi` + +strace-mem.o: mem.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mem.o -MD -MP -MF $(DEPDIR)/strace-mem.Tpo -c -o strace-mem.o `test -f 'mem.c' || echo '$(srcdir)/'`mem.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mem.Tpo $(DEPDIR)/strace-mem.Po +# $(AM_V_CC)source='mem.c' object='strace-mem.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mem.o `test -f 'mem.c' || echo '$(srcdir)/'`mem.c + +strace-mem.obj: mem.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mem.obj -MD -MP -MF $(DEPDIR)/strace-mem.Tpo -c -o strace-mem.obj `if test -f 'mem.c'; then $(CYGPATH_W) 'mem.c'; else $(CYGPATH_W) '$(srcdir)/mem.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mem.Tpo $(DEPDIR)/strace-mem.Po +# $(AM_V_CC)source='mem.c' object='strace-mem.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mem.obj `if test -f 'mem.c'; then $(CYGPATH_W) 'mem.c'; else $(CYGPATH_W) '$(srcdir)/mem.c'; fi` + +strace-membarrier.o: membarrier.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-membarrier.o -MD -MP -MF $(DEPDIR)/strace-membarrier.Tpo -c -o strace-membarrier.o `test -f 'membarrier.c' || echo '$(srcdir)/'`membarrier.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-membarrier.Tpo $(DEPDIR)/strace-membarrier.Po +# $(AM_V_CC)source='membarrier.c' object='strace-membarrier.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-membarrier.o `test -f 'membarrier.c' || echo '$(srcdir)/'`membarrier.c + +strace-membarrier.obj: membarrier.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-membarrier.obj -MD -MP -MF $(DEPDIR)/strace-membarrier.Tpo -c -o strace-membarrier.obj `if test -f 'membarrier.c'; then $(CYGPATH_W) 'membarrier.c'; else $(CYGPATH_W) '$(srcdir)/membarrier.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-membarrier.Tpo $(DEPDIR)/strace-membarrier.Po +# $(AM_V_CC)source='membarrier.c' object='strace-membarrier.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-membarrier.obj `if test -f 'membarrier.c'; then $(CYGPATH_W) 'membarrier.c'; else $(CYGPATH_W) '$(srcdir)/membarrier.c'; fi` + +strace-memfd_create.o: memfd_create.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-memfd_create.o -MD -MP -MF $(DEPDIR)/strace-memfd_create.Tpo -c -o strace-memfd_create.o `test -f 'memfd_create.c' || echo '$(srcdir)/'`memfd_create.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-memfd_create.Tpo $(DEPDIR)/strace-memfd_create.Po +# $(AM_V_CC)source='memfd_create.c' object='strace-memfd_create.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-memfd_create.o `test -f 'memfd_create.c' || echo '$(srcdir)/'`memfd_create.c + +strace-memfd_create.obj: memfd_create.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-memfd_create.obj -MD -MP -MF $(DEPDIR)/strace-memfd_create.Tpo -c -o strace-memfd_create.obj `if test -f 'memfd_create.c'; then $(CYGPATH_W) 'memfd_create.c'; else $(CYGPATH_W) '$(srcdir)/memfd_create.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-memfd_create.Tpo $(DEPDIR)/strace-memfd_create.Po +# $(AM_V_CC)source='memfd_create.c' object='strace-memfd_create.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-memfd_create.obj `if test -f 'memfd_create.c'; then $(CYGPATH_W) 'memfd_create.c'; else $(CYGPATH_W) '$(srcdir)/memfd_create.c'; fi` + +strace-mknod.o: mknod.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mknod.o -MD -MP -MF $(DEPDIR)/strace-mknod.Tpo -c -o strace-mknod.o `test -f 'mknod.c' || echo '$(srcdir)/'`mknod.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mknod.Tpo $(DEPDIR)/strace-mknod.Po +# $(AM_V_CC)source='mknod.c' object='strace-mknod.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mknod.o `test -f 'mknod.c' || echo '$(srcdir)/'`mknod.c + +strace-mknod.obj: mknod.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mknod.obj -MD -MP -MF $(DEPDIR)/strace-mknod.Tpo -c -o strace-mknod.obj `if test -f 'mknod.c'; then $(CYGPATH_W) 'mknod.c'; else $(CYGPATH_W) '$(srcdir)/mknod.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mknod.Tpo $(DEPDIR)/strace-mknod.Po +# $(AM_V_CC)source='mknod.c' object='strace-mknod.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mknod.obj `if test -f 'mknod.c'; then $(CYGPATH_W) 'mknod.c'; else $(CYGPATH_W) '$(srcdir)/mknod.c'; fi` + +strace-mmsghdr.o: mmsghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mmsghdr.o -MD -MP -MF $(DEPDIR)/strace-mmsghdr.Tpo -c -o strace-mmsghdr.o `test -f 'mmsghdr.c' || echo '$(srcdir)/'`mmsghdr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mmsghdr.Tpo $(DEPDIR)/strace-mmsghdr.Po +# $(AM_V_CC)source='mmsghdr.c' object='strace-mmsghdr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mmsghdr.o `test -f 'mmsghdr.c' || echo '$(srcdir)/'`mmsghdr.c + +strace-mmsghdr.obj: mmsghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mmsghdr.obj -MD -MP -MF $(DEPDIR)/strace-mmsghdr.Tpo -c -o strace-mmsghdr.obj `if test -f 'mmsghdr.c'; then $(CYGPATH_W) 'mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/mmsghdr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mmsghdr.Tpo $(DEPDIR)/strace-mmsghdr.Po +# $(AM_V_CC)source='mmsghdr.c' object='strace-mmsghdr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mmsghdr.obj `if test -f 'mmsghdr.c'; then $(CYGPATH_W) 'mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/mmsghdr.c'; fi` + +strace-mount.o: mount.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mount.o -MD -MP -MF $(DEPDIR)/strace-mount.Tpo -c -o strace-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mount.Tpo $(DEPDIR)/strace-mount.Po +# $(AM_V_CC)source='mount.c' object='strace-mount.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c + +strace-mount.obj: mount.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mount.obj -MD -MP -MF $(DEPDIR)/strace-mount.Tpo -c -o strace-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mount.Tpo $(DEPDIR)/strace-mount.Po +# $(AM_V_CC)source='mount.c' object='strace-mount.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi` + +strace-mq.o: mq.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mq.o -MD -MP -MF $(DEPDIR)/strace-mq.Tpo -c -o strace-mq.o `test -f 'mq.c' || echo '$(srcdir)/'`mq.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mq.Tpo $(DEPDIR)/strace-mq.Po +# $(AM_V_CC)source='mq.c' object='strace-mq.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mq.o `test -f 'mq.c' || echo '$(srcdir)/'`mq.c + +strace-mq.obj: mq.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mq.obj -MD -MP -MF $(DEPDIR)/strace-mq.Tpo -c -o strace-mq.obj `if test -f 'mq.c'; then $(CYGPATH_W) 'mq.c'; else $(CYGPATH_W) '$(srcdir)/mq.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mq.Tpo $(DEPDIR)/strace-mq.Po +# $(AM_V_CC)source='mq.c' object='strace-mq.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mq.obj `if test -f 'mq.c'; then $(CYGPATH_W) 'mq.c'; else $(CYGPATH_W) '$(srcdir)/mq.c'; fi` + +strace-msghdr.o: msghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-msghdr.o -MD -MP -MF $(DEPDIR)/strace-msghdr.Tpo -c -o strace-msghdr.o `test -f 'msghdr.c' || echo '$(srcdir)/'`msghdr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-msghdr.Tpo $(DEPDIR)/strace-msghdr.Po +# $(AM_V_CC)source='msghdr.c' object='strace-msghdr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-msghdr.o `test -f 'msghdr.c' || echo '$(srcdir)/'`msghdr.c + +strace-msghdr.obj: msghdr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-msghdr.obj -MD -MP -MF $(DEPDIR)/strace-msghdr.Tpo -c -o strace-msghdr.obj `if test -f 'msghdr.c'; then $(CYGPATH_W) 'msghdr.c'; else $(CYGPATH_W) '$(srcdir)/msghdr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-msghdr.Tpo $(DEPDIR)/strace-msghdr.Po +# $(AM_V_CC)source='msghdr.c' object='strace-msghdr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-msghdr.obj `if test -f 'msghdr.c'; then $(CYGPATH_W) 'msghdr.c'; else $(CYGPATH_W) '$(srcdir)/msghdr.c'; fi` + +strace-mtd.o: mtd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mtd.o -MD -MP -MF $(DEPDIR)/strace-mtd.Tpo -c -o strace-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mtd.Tpo $(DEPDIR)/strace-mtd.Po +# $(AM_V_CC)source='mtd.c' object='strace-mtd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c + +strace-mtd.obj: mtd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mtd.obj -MD -MP -MF $(DEPDIR)/strace-mtd.Tpo -c -o strace-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mtd.Tpo $(DEPDIR)/strace-mtd.Po +# $(AM_V_CC)source='mtd.c' object='strace-mtd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` + +strace-net.o: net.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-net.o -MD -MP -MF $(DEPDIR)/strace-net.Tpo -c -o strace-net.o `test -f 'net.c' || echo '$(srcdir)/'`net.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-net.Tpo $(DEPDIR)/strace-net.Po +# $(AM_V_CC)source='net.c' object='strace-net.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-net.o `test -f 'net.c' || echo '$(srcdir)/'`net.c + +strace-net.obj: net.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-net.obj -MD -MP -MF $(DEPDIR)/strace-net.Tpo -c -o strace-net.obj `if test -f 'net.c'; then $(CYGPATH_W) 'net.c'; else $(CYGPATH_W) '$(srcdir)/net.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-net.Tpo $(DEPDIR)/strace-net.Po +# $(AM_V_CC)source='net.c' object='strace-net.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-net.obj `if test -f 'net.c'; then $(CYGPATH_W) 'net.c'; else $(CYGPATH_W) '$(srcdir)/net.c'; fi` + +strace-netlink.o: netlink.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-netlink.o -MD -MP -MF $(DEPDIR)/strace-netlink.Tpo -c -o strace-netlink.o `test -f 'netlink.c' || echo '$(srcdir)/'`netlink.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-netlink.Tpo $(DEPDIR)/strace-netlink.Po +# $(AM_V_CC)source='netlink.c' object='strace-netlink.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-netlink.o `test -f 'netlink.c' || echo '$(srcdir)/'`netlink.c + +strace-netlink.obj: netlink.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-netlink.obj -MD -MP -MF $(DEPDIR)/strace-netlink.Tpo -c -o strace-netlink.obj `if test -f 'netlink.c'; then $(CYGPATH_W) 'netlink.c'; else $(CYGPATH_W) '$(srcdir)/netlink.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-netlink.Tpo $(DEPDIR)/strace-netlink.Po +# $(AM_V_CC)source='netlink.c' object='strace-netlink.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-netlink.obj `if test -f 'netlink.c'; then $(CYGPATH_W) 'netlink.c'; else $(CYGPATH_W) '$(srcdir)/netlink.c'; fi` + +strace-numa.o: numa.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-numa.o -MD -MP -MF $(DEPDIR)/strace-numa.Tpo -c -o strace-numa.o `test -f 'numa.c' || echo '$(srcdir)/'`numa.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-numa.Tpo $(DEPDIR)/strace-numa.Po +# $(AM_V_CC)source='numa.c' object='strace-numa.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-numa.o `test -f 'numa.c' || echo '$(srcdir)/'`numa.c + +strace-numa.obj: numa.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-numa.obj -MD -MP -MF $(DEPDIR)/strace-numa.Tpo -c -o strace-numa.obj `if test -f 'numa.c'; then $(CYGPATH_W) 'numa.c'; else $(CYGPATH_W) '$(srcdir)/numa.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-numa.Tpo $(DEPDIR)/strace-numa.Po +# $(AM_V_CC)source='numa.c' object='strace-numa.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-numa.obj `if test -f 'numa.c'; then $(CYGPATH_W) 'numa.c'; else $(CYGPATH_W) '$(srcdir)/numa.c'; fi` + +strace-oldstat.o: oldstat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-oldstat.o -MD -MP -MF $(DEPDIR)/strace-oldstat.Tpo -c -o strace-oldstat.o `test -f 'oldstat.c' || echo '$(srcdir)/'`oldstat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-oldstat.Tpo $(DEPDIR)/strace-oldstat.Po +# $(AM_V_CC)source='oldstat.c' object='strace-oldstat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-oldstat.o `test -f 'oldstat.c' || echo '$(srcdir)/'`oldstat.c + +strace-oldstat.obj: oldstat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-oldstat.obj -MD -MP -MF $(DEPDIR)/strace-oldstat.Tpo -c -o strace-oldstat.obj `if test -f 'oldstat.c'; then $(CYGPATH_W) 'oldstat.c'; else $(CYGPATH_W) '$(srcdir)/oldstat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-oldstat.Tpo $(DEPDIR)/strace-oldstat.Po +# $(AM_V_CC)source='oldstat.c' object='strace-oldstat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-oldstat.obj `if test -f 'oldstat.c'; then $(CYGPATH_W) 'oldstat.c'; else $(CYGPATH_W) '$(srcdir)/oldstat.c'; fi` + +strace-open.o: open.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-open.o -MD -MP -MF $(DEPDIR)/strace-open.Tpo -c -o strace-open.o `test -f 'open.c' || echo '$(srcdir)/'`open.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-open.Tpo $(DEPDIR)/strace-open.Po +# $(AM_V_CC)source='open.c' object='strace-open.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-open.o `test -f 'open.c' || echo '$(srcdir)/'`open.c + +strace-open.obj: open.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-open.obj -MD -MP -MF $(DEPDIR)/strace-open.Tpo -c -o strace-open.obj `if test -f 'open.c'; then $(CYGPATH_W) 'open.c'; else $(CYGPATH_W) '$(srcdir)/open.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-open.Tpo $(DEPDIR)/strace-open.Po +# $(AM_V_CC)source='open.c' object='strace-open.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-open.obj `if test -f 'open.c'; then $(CYGPATH_W) 'open.c'; else $(CYGPATH_W) '$(srcdir)/open.c'; fi` + +strace-or1k_atomic.o: or1k_atomic.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-or1k_atomic.o -MD -MP -MF $(DEPDIR)/strace-or1k_atomic.Tpo -c -o strace-or1k_atomic.o `test -f 'or1k_atomic.c' || echo '$(srcdir)/'`or1k_atomic.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-or1k_atomic.Tpo $(DEPDIR)/strace-or1k_atomic.Po +# $(AM_V_CC)source='or1k_atomic.c' object='strace-or1k_atomic.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-or1k_atomic.o `test -f 'or1k_atomic.c' || echo '$(srcdir)/'`or1k_atomic.c + +strace-or1k_atomic.obj: or1k_atomic.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-or1k_atomic.obj -MD -MP -MF $(DEPDIR)/strace-or1k_atomic.Tpo -c -o strace-or1k_atomic.obj `if test -f 'or1k_atomic.c'; then $(CYGPATH_W) 'or1k_atomic.c'; else $(CYGPATH_W) '$(srcdir)/or1k_atomic.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-or1k_atomic.Tpo $(DEPDIR)/strace-or1k_atomic.Po +# $(AM_V_CC)source='or1k_atomic.c' object='strace-or1k_atomic.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-or1k_atomic.obj `if test -f 'or1k_atomic.c'; then $(CYGPATH_W) 'or1k_atomic.c'; else $(CYGPATH_W) '$(srcdir)/or1k_atomic.c'; fi` + +strace-pathtrace.o: pathtrace.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-pathtrace.o -MD -MP -MF $(DEPDIR)/strace-pathtrace.Tpo -c -o strace-pathtrace.o `test -f 'pathtrace.c' || echo '$(srcdir)/'`pathtrace.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-pathtrace.Tpo $(DEPDIR)/strace-pathtrace.Po +# $(AM_V_CC)source='pathtrace.c' object='strace-pathtrace.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-pathtrace.o `test -f 'pathtrace.c' || echo '$(srcdir)/'`pathtrace.c + +strace-pathtrace.obj: pathtrace.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-pathtrace.obj -MD -MP -MF $(DEPDIR)/strace-pathtrace.Tpo -c -o strace-pathtrace.obj `if test -f 'pathtrace.c'; then $(CYGPATH_W) 'pathtrace.c'; else $(CYGPATH_W) '$(srcdir)/pathtrace.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-pathtrace.Tpo $(DEPDIR)/strace-pathtrace.Po +# $(AM_V_CC)source='pathtrace.c' object='strace-pathtrace.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-pathtrace.obj `if test -f 'pathtrace.c'; then $(CYGPATH_W) 'pathtrace.c'; else $(CYGPATH_W) '$(srcdir)/pathtrace.c'; fi` + +strace-perf.o: perf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-perf.o -MD -MP -MF $(DEPDIR)/strace-perf.Tpo -c -o strace-perf.o `test -f 'perf.c' || echo '$(srcdir)/'`perf.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-perf.Tpo $(DEPDIR)/strace-perf.Po +# $(AM_V_CC)source='perf.c' object='strace-perf.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-perf.o `test -f 'perf.c' || echo '$(srcdir)/'`perf.c + +strace-perf.obj: perf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-perf.obj -MD -MP -MF $(DEPDIR)/strace-perf.Tpo -c -o strace-perf.obj `if test -f 'perf.c'; then $(CYGPATH_W) 'perf.c'; else $(CYGPATH_W) '$(srcdir)/perf.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-perf.Tpo $(DEPDIR)/strace-perf.Po +# $(AM_V_CC)source='perf.c' object='strace-perf.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-perf.obj `if test -f 'perf.c'; then $(CYGPATH_W) 'perf.c'; else $(CYGPATH_W) '$(srcdir)/perf.c'; fi` + +strace-personality.o: personality.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-personality.o -MD -MP -MF $(DEPDIR)/strace-personality.Tpo -c -o strace-personality.o `test -f 'personality.c' || echo '$(srcdir)/'`personality.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-personality.Tpo $(DEPDIR)/strace-personality.Po +# $(AM_V_CC)source='personality.c' object='strace-personality.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-personality.o `test -f 'personality.c' || echo '$(srcdir)/'`personality.c + +strace-personality.obj: personality.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-personality.obj -MD -MP -MF $(DEPDIR)/strace-personality.Tpo -c -o strace-personality.obj `if test -f 'personality.c'; then $(CYGPATH_W) 'personality.c'; else $(CYGPATH_W) '$(srcdir)/personality.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-personality.Tpo $(DEPDIR)/strace-personality.Po +# $(AM_V_CC)source='personality.c' object='strace-personality.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-personality.obj `if test -f 'personality.c'; then $(CYGPATH_W) 'personality.c'; else $(CYGPATH_W) '$(srcdir)/personality.c'; fi` + +strace-pkeys.o: pkeys.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-pkeys.o -MD -MP -MF $(DEPDIR)/strace-pkeys.Tpo -c -o strace-pkeys.o `test -f 'pkeys.c' || echo '$(srcdir)/'`pkeys.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-pkeys.Tpo $(DEPDIR)/strace-pkeys.Po +# $(AM_V_CC)source='pkeys.c' object='strace-pkeys.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-pkeys.o `test -f 'pkeys.c' || echo '$(srcdir)/'`pkeys.c + +strace-pkeys.obj: pkeys.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-pkeys.obj -MD -MP -MF $(DEPDIR)/strace-pkeys.Tpo -c -o strace-pkeys.obj `if test -f 'pkeys.c'; then $(CYGPATH_W) 'pkeys.c'; else $(CYGPATH_W) '$(srcdir)/pkeys.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-pkeys.Tpo $(DEPDIR)/strace-pkeys.Po +# $(AM_V_CC)source='pkeys.c' object='strace-pkeys.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-pkeys.obj `if test -f 'pkeys.c'; then $(CYGPATH_W) 'pkeys.c'; else $(CYGPATH_W) '$(srcdir)/pkeys.c'; fi` + +strace-poll.o: poll.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-poll.o -MD -MP -MF $(DEPDIR)/strace-poll.Tpo -c -o strace-poll.o `test -f 'poll.c' || echo '$(srcdir)/'`poll.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-poll.Tpo $(DEPDIR)/strace-poll.Po +# $(AM_V_CC)source='poll.c' object='strace-poll.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-poll.o `test -f 'poll.c' || echo '$(srcdir)/'`poll.c + +strace-poll.obj: poll.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-poll.obj -MD -MP -MF $(DEPDIR)/strace-poll.Tpo -c -o strace-poll.obj `if test -f 'poll.c'; then $(CYGPATH_W) 'poll.c'; else $(CYGPATH_W) '$(srcdir)/poll.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-poll.Tpo $(DEPDIR)/strace-poll.Po +# $(AM_V_CC)source='poll.c' object='strace-poll.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-poll.obj `if test -f 'poll.c'; then $(CYGPATH_W) 'poll.c'; else $(CYGPATH_W) '$(srcdir)/poll.c'; fi` + +strace-prctl.o: prctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-prctl.o -MD -MP -MF $(DEPDIR)/strace-prctl.Tpo -c -o strace-prctl.o `test -f 'prctl.c' || echo '$(srcdir)/'`prctl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-prctl.Tpo $(DEPDIR)/strace-prctl.Po +# $(AM_V_CC)source='prctl.c' object='strace-prctl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-prctl.o `test -f 'prctl.c' || echo '$(srcdir)/'`prctl.c + +strace-prctl.obj: prctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-prctl.obj -MD -MP -MF $(DEPDIR)/strace-prctl.Tpo -c -o strace-prctl.obj `if test -f 'prctl.c'; then $(CYGPATH_W) 'prctl.c'; else $(CYGPATH_W) '$(srcdir)/prctl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-prctl.Tpo $(DEPDIR)/strace-prctl.Po +# $(AM_V_CC)source='prctl.c' object='strace-prctl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-prctl.obj `if test -f 'prctl.c'; then $(CYGPATH_W) 'prctl.c'; else $(CYGPATH_W) '$(srcdir)/prctl.c'; fi` + +strace-print_dev_t.o: print_dev_t.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_dev_t.o -MD -MP -MF $(DEPDIR)/strace-print_dev_t.Tpo -c -o strace-print_dev_t.o `test -f 'print_dev_t.c' || echo '$(srcdir)/'`print_dev_t.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_dev_t.Tpo $(DEPDIR)/strace-print_dev_t.Po +# $(AM_V_CC)source='print_dev_t.c' object='strace-print_dev_t.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_dev_t.o `test -f 'print_dev_t.c' || echo '$(srcdir)/'`print_dev_t.c + +strace-print_dev_t.obj: print_dev_t.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_dev_t.obj -MD -MP -MF $(DEPDIR)/strace-print_dev_t.Tpo -c -o strace-print_dev_t.obj `if test -f 'print_dev_t.c'; then $(CYGPATH_W) 'print_dev_t.c'; else $(CYGPATH_W) '$(srcdir)/print_dev_t.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_dev_t.Tpo $(DEPDIR)/strace-print_dev_t.Po +# $(AM_V_CC)source='print_dev_t.c' object='strace-print_dev_t.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_dev_t.obj `if test -f 'print_dev_t.c'; then $(CYGPATH_W) 'print_dev_t.c'; else $(CYGPATH_W) '$(srcdir)/print_dev_t.c'; fi` + +strace-print_mq_attr.o: print_mq_attr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_mq_attr.o -MD -MP -MF $(DEPDIR)/strace-print_mq_attr.Tpo -c -o strace-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_mq_attr.Tpo $(DEPDIR)/strace-print_mq_attr.Po +# $(AM_V_CC)source='print_mq_attr.c' object='strace-print_mq_attr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c + +strace-print_mq_attr.obj: print_mq_attr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_mq_attr.obj -MD -MP -MF $(DEPDIR)/strace-print_mq_attr.Tpo -c -o strace-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_mq_attr.Tpo $(DEPDIR)/strace-print_mq_attr.Po +# $(AM_V_CC)source='print_mq_attr.c' object='strace-print_mq_attr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` + +strace-print_msgbuf.o: print_msgbuf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_msgbuf.o -MD -MP -MF $(DEPDIR)/strace-print_msgbuf.Tpo -c -o strace-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_msgbuf.Tpo $(DEPDIR)/strace-print_msgbuf.Po +# $(AM_V_CC)source='print_msgbuf.c' object='strace-print_msgbuf.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c + +strace-print_msgbuf.obj: print_msgbuf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_msgbuf.obj -MD -MP -MF $(DEPDIR)/strace-print_msgbuf.Tpo -c -o strace-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_msgbuf.Tpo $(DEPDIR)/strace-print_msgbuf.Po +# $(AM_V_CC)source='print_msgbuf.c' object='strace-print_msgbuf.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` + +strace-print_sg_req_info.o: print_sg_req_info.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_sg_req_info.o -MD -MP -MF $(DEPDIR)/strace-print_sg_req_info.Tpo -c -o strace-print_sg_req_info.o `test -f 'print_sg_req_info.c' || echo '$(srcdir)/'`print_sg_req_info.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_sg_req_info.Tpo $(DEPDIR)/strace-print_sg_req_info.Po +# $(AM_V_CC)source='print_sg_req_info.c' object='strace-print_sg_req_info.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_sg_req_info.o `test -f 'print_sg_req_info.c' || echo '$(srcdir)/'`print_sg_req_info.c + +strace-print_sg_req_info.obj: print_sg_req_info.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_sg_req_info.obj -MD -MP -MF $(DEPDIR)/strace-print_sg_req_info.Tpo -c -o strace-print_sg_req_info.obj `if test -f 'print_sg_req_info.c'; then $(CYGPATH_W) 'print_sg_req_info.c'; else $(CYGPATH_W) '$(srcdir)/print_sg_req_info.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_sg_req_info.Tpo $(DEPDIR)/strace-print_sg_req_info.Po +# $(AM_V_CC)source='print_sg_req_info.c' object='strace-print_sg_req_info.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_sg_req_info.obj `if test -f 'print_sg_req_info.c'; then $(CYGPATH_W) 'print_sg_req_info.c'; else $(CYGPATH_W) '$(srcdir)/print_sg_req_info.c'; fi` + +strace-print_sigevent.o: print_sigevent.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_sigevent.o -MD -MP -MF $(DEPDIR)/strace-print_sigevent.Tpo -c -o strace-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_sigevent.Tpo $(DEPDIR)/strace-print_sigevent.Po +# $(AM_V_CC)source='print_sigevent.c' object='strace-print_sigevent.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c + +strace-print_sigevent.obj: print_sigevent.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_sigevent.obj -MD -MP -MF $(DEPDIR)/strace-print_sigevent.Tpo -c -o strace-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_sigevent.Tpo $(DEPDIR)/strace-print_sigevent.Po +# $(AM_V_CC)source='print_sigevent.c' object='strace-print_sigevent.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` + +strace-print_statfs.o: print_statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_statfs.o -MD -MP -MF $(DEPDIR)/strace-print_statfs.Tpo -c -o strace-print_statfs.o `test -f 'print_statfs.c' || echo '$(srcdir)/'`print_statfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_statfs.Tpo $(DEPDIR)/strace-print_statfs.Po +# $(AM_V_CC)source='print_statfs.c' object='strace-print_statfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_statfs.o `test -f 'print_statfs.c' || echo '$(srcdir)/'`print_statfs.c + +strace-print_statfs.obj: print_statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_statfs.obj -MD -MP -MF $(DEPDIR)/strace-print_statfs.Tpo -c -o strace-print_statfs.obj `if test -f 'print_statfs.c'; then $(CYGPATH_W) 'print_statfs.c'; else $(CYGPATH_W) '$(srcdir)/print_statfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_statfs.Tpo $(DEPDIR)/strace-print_statfs.Po +# $(AM_V_CC)source='print_statfs.c' object='strace-print_statfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_statfs.obj `if test -f 'print_statfs.c'; then $(CYGPATH_W) 'print_statfs.c'; else $(CYGPATH_W) '$(srcdir)/print_statfs.c'; fi` + +strace-print_struct_stat.o: print_struct_stat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_struct_stat.o -MD -MP -MF $(DEPDIR)/strace-print_struct_stat.Tpo -c -o strace-print_struct_stat.o `test -f 'print_struct_stat.c' || echo '$(srcdir)/'`print_struct_stat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_struct_stat.Tpo $(DEPDIR)/strace-print_struct_stat.Po +# $(AM_V_CC)source='print_struct_stat.c' object='strace-print_struct_stat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_struct_stat.o `test -f 'print_struct_stat.c' || echo '$(srcdir)/'`print_struct_stat.c + +strace-print_struct_stat.obj: print_struct_stat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_struct_stat.obj -MD -MP -MF $(DEPDIR)/strace-print_struct_stat.Tpo -c -o strace-print_struct_stat.obj `if test -f 'print_struct_stat.c'; then $(CYGPATH_W) 'print_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/print_struct_stat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_struct_stat.Tpo $(DEPDIR)/strace-print_struct_stat.Po +# $(AM_V_CC)source='print_struct_stat.c' object='strace-print_struct_stat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_struct_stat.obj `if test -f 'print_struct_stat.c'; then $(CYGPATH_W) 'print_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/print_struct_stat.c'; fi` + +strace-print_time.o: print_time.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_time.o -MD -MP -MF $(DEPDIR)/strace-print_time.Tpo -c -o strace-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_time.Tpo $(DEPDIR)/strace-print_time.Po +# $(AM_V_CC)source='print_time.c' object='strace-print_time.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c + +strace-print_time.obj: print_time.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_time.obj -MD -MP -MF $(DEPDIR)/strace-print_time.Tpo -c -o strace-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_time.Tpo $(DEPDIR)/strace-print_time.Po +# $(AM_V_CC)source='print_time.c' object='strace-print_time.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` + +strace-print_timespec.o: print_timespec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timespec.o -MD -MP -MF $(DEPDIR)/strace-print_timespec.Tpo -c -o strace-print_timespec.o `test -f 'print_timespec.c' || echo '$(srcdir)/'`print_timespec.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timespec.Tpo $(DEPDIR)/strace-print_timespec.Po +# $(AM_V_CC)source='print_timespec.c' object='strace-print_timespec.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timespec.o `test -f 'print_timespec.c' || echo '$(srcdir)/'`print_timespec.c + +strace-print_timespec.obj: print_timespec.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timespec.obj -MD -MP -MF $(DEPDIR)/strace-print_timespec.Tpo -c -o strace-print_timespec.obj `if test -f 'print_timespec.c'; then $(CYGPATH_W) 'print_timespec.c'; else $(CYGPATH_W) '$(srcdir)/print_timespec.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timespec.Tpo $(DEPDIR)/strace-print_timespec.Po +# $(AM_V_CC)source='print_timespec.c' object='strace-print_timespec.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timespec.obj `if test -f 'print_timespec.c'; then $(CYGPATH_W) 'print_timespec.c'; else $(CYGPATH_W) '$(srcdir)/print_timespec.c'; fi` + +strace-print_timeval.o: print_timeval.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timeval.o -MD -MP -MF $(DEPDIR)/strace-print_timeval.Tpo -c -o strace-print_timeval.o `test -f 'print_timeval.c' || echo '$(srcdir)/'`print_timeval.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timeval.Tpo $(DEPDIR)/strace-print_timeval.Po +# $(AM_V_CC)source='print_timeval.c' object='strace-print_timeval.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timeval.o `test -f 'print_timeval.c' || echo '$(srcdir)/'`print_timeval.c + +strace-print_timeval.obj: print_timeval.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timeval.obj -MD -MP -MF $(DEPDIR)/strace-print_timeval.Tpo -c -o strace-print_timeval.obj `if test -f 'print_timeval.c'; then $(CYGPATH_W) 'print_timeval.c'; else $(CYGPATH_W) '$(srcdir)/print_timeval.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timeval.Tpo $(DEPDIR)/strace-print_timeval.Po +# $(AM_V_CC)source='print_timeval.c' object='strace-print_timeval.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timeval.obj `if test -f 'print_timeval.c'; then $(CYGPATH_W) 'print_timeval.c'; else $(CYGPATH_W) '$(srcdir)/print_timeval.c'; fi` + +strace-print_timex.o: print_timex.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timex.o -MD -MP -MF $(DEPDIR)/strace-print_timex.Tpo -c -o strace-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timex.Tpo $(DEPDIR)/strace-print_timex.Po +# $(AM_V_CC)source='print_timex.c' object='strace-print_timex.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c + +strace-print_timex.obj: print_timex.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timex.obj -MD -MP -MF $(DEPDIR)/strace-print_timex.Tpo -c -o strace-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timex.Tpo $(DEPDIR)/strace-print_timex.Po +# $(AM_V_CC)source='print_timex.c' object='strace-print_timex.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` + +strace-printmode.o: printmode.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printmode.o -MD -MP -MF $(DEPDIR)/strace-printmode.Tpo -c -o strace-printmode.o `test -f 'printmode.c' || echo '$(srcdir)/'`printmode.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printmode.Tpo $(DEPDIR)/strace-printmode.Po +# $(AM_V_CC)source='printmode.c' object='strace-printmode.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printmode.o `test -f 'printmode.c' || echo '$(srcdir)/'`printmode.c + +strace-printmode.obj: printmode.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printmode.obj -MD -MP -MF $(DEPDIR)/strace-printmode.Tpo -c -o strace-printmode.obj `if test -f 'printmode.c'; then $(CYGPATH_W) 'printmode.c'; else $(CYGPATH_W) '$(srcdir)/printmode.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printmode.Tpo $(DEPDIR)/strace-printmode.Po +# $(AM_V_CC)source='printmode.c' object='strace-printmode.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printmode.obj `if test -f 'printmode.c'; then $(CYGPATH_W) 'printmode.c'; else $(CYGPATH_W) '$(srcdir)/printmode.c'; fi` + +strace-printrusage.o: printrusage.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printrusage.o -MD -MP -MF $(DEPDIR)/strace-printrusage.Tpo -c -o strace-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printrusage.Tpo $(DEPDIR)/strace-printrusage.Po +# $(AM_V_CC)source='printrusage.c' object='strace-printrusage.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c + +strace-printrusage.obj: printrusage.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printrusage.obj -MD -MP -MF $(DEPDIR)/strace-printrusage.Tpo -c -o strace-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printrusage.Tpo $(DEPDIR)/strace-printrusage.Po +# $(AM_V_CC)source='printrusage.c' object='strace-printrusage.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` + +strace-printsiginfo.o: printsiginfo.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printsiginfo.o -MD -MP -MF $(DEPDIR)/strace-printsiginfo.Tpo -c -o strace-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printsiginfo.Tpo $(DEPDIR)/strace-printsiginfo.Po +# $(AM_V_CC)source='printsiginfo.c' object='strace-printsiginfo.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c + +strace-printsiginfo.obj: printsiginfo.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printsiginfo.obj -MD -MP -MF $(DEPDIR)/strace-printsiginfo.Tpo -c -o strace-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printsiginfo.Tpo $(DEPDIR)/strace-printsiginfo.Po +# $(AM_V_CC)source='printsiginfo.c' object='strace-printsiginfo.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` + +strace-process.o: process.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-process.o -MD -MP -MF $(DEPDIR)/strace-process.Tpo -c -o strace-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-process.Tpo $(DEPDIR)/strace-process.Po +# $(AM_V_CC)source='process.c' object='strace-process.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c + +strace-process.obj: process.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-process.obj -MD -MP -MF $(DEPDIR)/strace-process.Tpo -c -o strace-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-process.Tpo $(DEPDIR)/strace-process.Po +# $(AM_V_CC)source='process.c' object='strace-process.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi` + +strace-process_vm.o: process_vm.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-process_vm.o -MD -MP -MF $(DEPDIR)/strace-process_vm.Tpo -c -o strace-process_vm.o `test -f 'process_vm.c' || echo '$(srcdir)/'`process_vm.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-process_vm.Tpo $(DEPDIR)/strace-process_vm.Po +# $(AM_V_CC)source='process_vm.c' object='strace-process_vm.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-process_vm.o `test -f 'process_vm.c' || echo '$(srcdir)/'`process_vm.c + +strace-process_vm.obj: process_vm.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-process_vm.obj -MD -MP -MF $(DEPDIR)/strace-process_vm.Tpo -c -o strace-process_vm.obj `if test -f 'process_vm.c'; then $(CYGPATH_W) 'process_vm.c'; else $(CYGPATH_W) '$(srcdir)/process_vm.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-process_vm.Tpo $(DEPDIR)/strace-process_vm.Po +# $(AM_V_CC)source='process_vm.c' object='strace-process_vm.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-process_vm.obj `if test -f 'process_vm.c'; then $(CYGPATH_W) 'process_vm.c'; else $(CYGPATH_W) '$(srcdir)/process_vm.c'; fi` + +strace-ptp.o: ptp.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ptp.o -MD -MP -MF $(DEPDIR)/strace-ptp.Tpo -c -o strace-ptp.o `test -f 'ptp.c' || echo '$(srcdir)/'`ptp.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ptp.Tpo $(DEPDIR)/strace-ptp.Po +# $(AM_V_CC)source='ptp.c' object='strace-ptp.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ptp.o `test -f 'ptp.c' || echo '$(srcdir)/'`ptp.c + +strace-ptp.obj: ptp.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ptp.obj -MD -MP -MF $(DEPDIR)/strace-ptp.Tpo -c -o strace-ptp.obj `if test -f 'ptp.c'; then $(CYGPATH_W) 'ptp.c'; else $(CYGPATH_W) '$(srcdir)/ptp.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ptp.Tpo $(DEPDIR)/strace-ptp.Po +# $(AM_V_CC)source='ptp.c' object='strace-ptp.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ptp.obj `if test -f 'ptp.c'; then $(CYGPATH_W) 'ptp.c'; else $(CYGPATH_W) '$(srcdir)/ptp.c'; fi` + +strace-qualify.o: qualify.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-qualify.o -MD -MP -MF $(DEPDIR)/strace-qualify.Tpo -c -o strace-qualify.o `test -f 'qualify.c' || echo '$(srcdir)/'`qualify.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-qualify.Tpo $(DEPDIR)/strace-qualify.Po +# $(AM_V_CC)source='qualify.c' object='strace-qualify.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-qualify.o `test -f 'qualify.c' || echo '$(srcdir)/'`qualify.c + +strace-qualify.obj: qualify.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-qualify.obj -MD -MP -MF $(DEPDIR)/strace-qualify.Tpo -c -o strace-qualify.obj `if test -f 'qualify.c'; then $(CYGPATH_W) 'qualify.c'; else $(CYGPATH_W) '$(srcdir)/qualify.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-qualify.Tpo $(DEPDIR)/strace-qualify.Po +# $(AM_V_CC)source='qualify.c' object='strace-qualify.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-qualify.obj `if test -f 'qualify.c'; then $(CYGPATH_W) 'qualify.c'; else $(CYGPATH_W) '$(srcdir)/qualify.c'; fi` + +strace-quota.o: quota.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-quota.o -MD -MP -MF $(DEPDIR)/strace-quota.Tpo -c -o strace-quota.o `test -f 'quota.c' || echo '$(srcdir)/'`quota.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-quota.Tpo $(DEPDIR)/strace-quota.Po +# $(AM_V_CC)source='quota.c' object='strace-quota.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-quota.o `test -f 'quota.c' || echo '$(srcdir)/'`quota.c + +strace-quota.obj: quota.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-quota.obj -MD -MP -MF $(DEPDIR)/strace-quota.Tpo -c -o strace-quota.obj `if test -f 'quota.c'; then $(CYGPATH_W) 'quota.c'; else $(CYGPATH_W) '$(srcdir)/quota.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-quota.Tpo $(DEPDIR)/strace-quota.Po +# $(AM_V_CC)source='quota.c' object='strace-quota.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-quota.obj `if test -f 'quota.c'; then $(CYGPATH_W) 'quota.c'; else $(CYGPATH_W) '$(srcdir)/quota.c'; fi` + +strace-readahead.o: readahead.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-readahead.o -MD -MP -MF $(DEPDIR)/strace-readahead.Tpo -c -o strace-readahead.o `test -f 'readahead.c' || echo '$(srcdir)/'`readahead.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-readahead.Tpo $(DEPDIR)/strace-readahead.Po +# $(AM_V_CC)source='readahead.c' object='strace-readahead.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-readahead.o `test -f 'readahead.c' || echo '$(srcdir)/'`readahead.c + +strace-readahead.obj: readahead.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-readahead.obj -MD -MP -MF $(DEPDIR)/strace-readahead.Tpo -c -o strace-readahead.obj `if test -f 'readahead.c'; then $(CYGPATH_W) 'readahead.c'; else $(CYGPATH_W) '$(srcdir)/readahead.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-readahead.Tpo $(DEPDIR)/strace-readahead.Po +# $(AM_V_CC)source='readahead.c' object='strace-readahead.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-readahead.obj `if test -f 'readahead.c'; then $(CYGPATH_W) 'readahead.c'; else $(CYGPATH_W) '$(srcdir)/readahead.c'; fi` + +strace-readlink.o: readlink.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-readlink.o -MD -MP -MF $(DEPDIR)/strace-readlink.Tpo -c -o strace-readlink.o `test -f 'readlink.c' || echo '$(srcdir)/'`readlink.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-readlink.Tpo $(DEPDIR)/strace-readlink.Po +# $(AM_V_CC)source='readlink.c' object='strace-readlink.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-readlink.o `test -f 'readlink.c' || echo '$(srcdir)/'`readlink.c + +strace-readlink.obj: readlink.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-readlink.obj -MD -MP -MF $(DEPDIR)/strace-readlink.Tpo -c -o strace-readlink.obj `if test -f 'readlink.c'; then $(CYGPATH_W) 'readlink.c'; else $(CYGPATH_W) '$(srcdir)/readlink.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-readlink.Tpo $(DEPDIR)/strace-readlink.Po +# $(AM_V_CC)source='readlink.c' object='strace-readlink.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-readlink.obj `if test -f 'readlink.c'; then $(CYGPATH_W) 'readlink.c'; else $(CYGPATH_W) '$(srcdir)/readlink.c'; fi` + +strace-reboot.o: reboot.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-reboot.o -MD -MP -MF $(DEPDIR)/strace-reboot.Tpo -c -o strace-reboot.o `test -f 'reboot.c' || echo '$(srcdir)/'`reboot.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-reboot.Tpo $(DEPDIR)/strace-reboot.Po +# $(AM_V_CC)source='reboot.c' object='strace-reboot.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-reboot.o `test -f 'reboot.c' || echo '$(srcdir)/'`reboot.c + +strace-reboot.obj: reboot.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-reboot.obj -MD -MP -MF $(DEPDIR)/strace-reboot.Tpo -c -o strace-reboot.obj `if test -f 'reboot.c'; then $(CYGPATH_W) 'reboot.c'; else $(CYGPATH_W) '$(srcdir)/reboot.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-reboot.Tpo $(DEPDIR)/strace-reboot.Po +# $(AM_V_CC)source='reboot.c' object='strace-reboot.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-reboot.obj `if test -f 'reboot.c'; then $(CYGPATH_W) 'reboot.c'; else $(CYGPATH_W) '$(srcdir)/reboot.c'; fi` + +strace-renameat.o: renameat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-renameat.o -MD -MP -MF $(DEPDIR)/strace-renameat.Tpo -c -o strace-renameat.o `test -f 'renameat.c' || echo '$(srcdir)/'`renameat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-renameat.Tpo $(DEPDIR)/strace-renameat.Po +# $(AM_V_CC)source='renameat.c' object='strace-renameat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-renameat.o `test -f 'renameat.c' || echo '$(srcdir)/'`renameat.c + +strace-renameat.obj: renameat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-renameat.obj -MD -MP -MF $(DEPDIR)/strace-renameat.Tpo -c -o strace-renameat.obj `if test -f 'renameat.c'; then $(CYGPATH_W) 'renameat.c'; else $(CYGPATH_W) '$(srcdir)/renameat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-renameat.Tpo $(DEPDIR)/strace-renameat.Po +# $(AM_V_CC)source='renameat.c' object='strace-renameat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-renameat.obj `if test -f 'renameat.c'; then $(CYGPATH_W) 'renameat.c'; else $(CYGPATH_W) '$(srcdir)/renameat.c'; fi` + +strace-resource.o: resource.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-resource.o -MD -MP -MF $(DEPDIR)/strace-resource.Tpo -c -o strace-resource.o `test -f 'resource.c' || echo '$(srcdir)/'`resource.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-resource.Tpo $(DEPDIR)/strace-resource.Po +# $(AM_V_CC)source='resource.c' object='strace-resource.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-resource.o `test -f 'resource.c' || echo '$(srcdir)/'`resource.c + +strace-resource.obj: resource.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-resource.obj -MD -MP -MF $(DEPDIR)/strace-resource.Tpo -c -o strace-resource.obj `if test -f 'resource.c'; then $(CYGPATH_W) 'resource.c'; else $(CYGPATH_W) '$(srcdir)/resource.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-resource.Tpo $(DEPDIR)/strace-resource.Po +# $(AM_V_CC)source='resource.c' object='strace-resource.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-resource.obj `if test -f 'resource.c'; then $(CYGPATH_W) 'resource.c'; else $(CYGPATH_W) '$(srcdir)/resource.c'; fi` + +strace-rtc.o: rtc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-rtc.o -MD -MP -MF $(DEPDIR)/strace-rtc.Tpo -c -o strace-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-rtc.Tpo $(DEPDIR)/strace-rtc.Po +# $(AM_V_CC)source='rtc.c' object='strace-rtc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c + +strace-rtc.obj: rtc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-rtc.obj -MD -MP -MF $(DEPDIR)/strace-rtc.Tpo -c -o strace-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-rtc.Tpo $(DEPDIR)/strace-rtc.Po +# $(AM_V_CC)source='rtc.c' object='strace-rtc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` + +strace-sched.o: sched.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sched.o -MD -MP -MF $(DEPDIR)/strace-sched.Tpo -c -o strace-sched.o `test -f 'sched.c' || echo '$(srcdir)/'`sched.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sched.Tpo $(DEPDIR)/strace-sched.Po +# $(AM_V_CC)source='sched.c' object='strace-sched.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sched.o `test -f 'sched.c' || echo '$(srcdir)/'`sched.c + +strace-sched.obj: sched.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sched.obj -MD -MP -MF $(DEPDIR)/strace-sched.Tpo -c -o strace-sched.obj `if test -f 'sched.c'; then $(CYGPATH_W) 'sched.c'; else $(CYGPATH_W) '$(srcdir)/sched.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sched.Tpo $(DEPDIR)/strace-sched.Po +# $(AM_V_CC)source='sched.c' object='strace-sched.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sched.obj `if test -f 'sched.c'; then $(CYGPATH_W) 'sched.c'; else $(CYGPATH_W) '$(srcdir)/sched.c'; fi` + +strace-scsi.o: scsi.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-scsi.o -MD -MP -MF $(DEPDIR)/strace-scsi.Tpo -c -o strace-scsi.o `test -f 'scsi.c' || echo '$(srcdir)/'`scsi.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-scsi.Tpo $(DEPDIR)/strace-scsi.Po +# $(AM_V_CC)source='scsi.c' object='strace-scsi.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-scsi.o `test -f 'scsi.c' || echo '$(srcdir)/'`scsi.c + +strace-scsi.obj: scsi.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-scsi.obj -MD -MP -MF $(DEPDIR)/strace-scsi.Tpo -c -o strace-scsi.obj `if test -f 'scsi.c'; then $(CYGPATH_W) 'scsi.c'; else $(CYGPATH_W) '$(srcdir)/scsi.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-scsi.Tpo $(DEPDIR)/strace-scsi.Po +# $(AM_V_CC)source='scsi.c' object='strace-scsi.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-scsi.obj `if test -f 'scsi.c'; then $(CYGPATH_W) 'scsi.c'; else $(CYGPATH_W) '$(srcdir)/scsi.c'; fi` + +strace-seccomp.o: seccomp.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-seccomp.o -MD -MP -MF $(DEPDIR)/strace-seccomp.Tpo -c -o strace-seccomp.o `test -f 'seccomp.c' || echo '$(srcdir)/'`seccomp.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-seccomp.Tpo $(DEPDIR)/strace-seccomp.Po +# $(AM_V_CC)source='seccomp.c' object='strace-seccomp.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-seccomp.o `test -f 'seccomp.c' || echo '$(srcdir)/'`seccomp.c + +strace-seccomp.obj: seccomp.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-seccomp.obj -MD -MP -MF $(DEPDIR)/strace-seccomp.Tpo -c -o strace-seccomp.obj `if test -f 'seccomp.c'; then $(CYGPATH_W) 'seccomp.c'; else $(CYGPATH_W) '$(srcdir)/seccomp.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-seccomp.Tpo $(DEPDIR)/strace-seccomp.Po +# $(AM_V_CC)source='seccomp.c' object='strace-seccomp.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-seccomp.obj `if test -f 'seccomp.c'; then $(CYGPATH_W) 'seccomp.c'; else $(CYGPATH_W) '$(srcdir)/seccomp.c'; fi` + +strace-sendfile.o: sendfile.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sendfile.o -MD -MP -MF $(DEPDIR)/strace-sendfile.Tpo -c -o strace-sendfile.o `test -f 'sendfile.c' || echo '$(srcdir)/'`sendfile.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sendfile.Tpo $(DEPDIR)/strace-sendfile.Po +# $(AM_V_CC)source='sendfile.c' object='strace-sendfile.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sendfile.o `test -f 'sendfile.c' || echo '$(srcdir)/'`sendfile.c + +strace-sendfile.obj: sendfile.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sendfile.obj -MD -MP -MF $(DEPDIR)/strace-sendfile.Tpo -c -o strace-sendfile.obj `if test -f 'sendfile.c'; then $(CYGPATH_W) 'sendfile.c'; else $(CYGPATH_W) '$(srcdir)/sendfile.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sendfile.Tpo $(DEPDIR)/strace-sendfile.Po +# $(AM_V_CC)source='sendfile.c' object='strace-sendfile.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sendfile.obj `if test -f 'sendfile.c'; then $(CYGPATH_W) 'sendfile.c'; else $(CYGPATH_W) '$(srcdir)/sendfile.c'; fi` + +strace-sg_io_v3.o: sg_io_v3.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sg_io_v3.o -MD -MP -MF $(DEPDIR)/strace-sg_io_v3.Tpo -c -o strace-sg_io_v3.o `test -f 'sg_io_v3.c' || echo '$(srcdir)/'`sg_io_v3.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sg_io_v3.Tpo $(DEPDIR)/strace-sg_io_v3.Po +# $(AM_V_CC)source='sg_io_v3.c' object='strace-sg_io_v3.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sg_io_v3.o `test -f 'sg_io_v3.c' || echo '$(srcdir)/'`sg_io_v3.c + +strace-sg_io_v3.obj: sg_io_v3.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sg_io_v3.obj -MD -MP -MF $(DEPDIR)/strace-sg_io_v3.Tpo -c -o strace-sg_io_v3.obj `if test -f 'sg_io_v3.c'; then $(CYGPATH_W) 'sg_io_v3.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v3.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sg_io_v3.Tpo $(DEPDIR)/strace-sg_io_v3.Po +# $(AM_V_CC)source='sg_io_v3.c' object='strace-sg_io_v3.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sg_io_v3.obj `if test -f 'sg_io_v3.c'; then $(CYGPATH_W) 'sg_io_v3.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v3.c'; fi` + +strace-sg_io_v4.o: sg_io_v4.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sg_io_v4.o -MD -MP -MF $(DEPDIR)/strace-sg_io_v4.Tpo -c -o strace-sg_io_v4.o `test -f 'sg_io_v4.c' || echo '$(srcdir)/'`sg_io_v4.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sg_io_v4.Tpo $(DEPDIR)/strace-sg_io_v4.Po +# $(AM_V_CC)source='sg_io_v4.c' object='strace-sg_io_v4.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sg_io_v4.o `test -f 'sg_io_v4.c' || echo '$(srcdir)/'`sg_io_v4.c + +strace-sg_io_v4.obj: sg_io_v4.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sg_io_v4.obj -MD -MP -MF $(DEPDIR)/strace-sg_io_v4.Tpo -c -o strace-sg_io_v4.obj `if test -f 'sg_io_v4.c'; then $(CYGPATH_W) 'sg_io_v4.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v4.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sg_io_v4.Tpo $(DEPDIR)/strace-sg_io_v4.Po +# $(AM_V_CC)source='sg_io_v4.c' object='strace-sg_io_v4.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sg_io_v4.obj `if test -f 'sg_io_v4.c'; then $(CYGPATH_W) 'sg_io_v4.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v4.c'; fi` + +strace-sigaltstack.o: sigaltstack.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sigaltstack.o -MD -MP -MF $(DEPDIR)/strace-sigaltstack.Tpo -c -o strace-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sigaltstack.Tpo $(DEPDIR)/strace-sigaltstack.Po +# $(AM_V_CC)source='sigaltstack.c' object='strace-sigaltstack.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c + +strace-sigaltstack.obj: sigaltstack.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sigaltstack.obj -MD -MP -MF $(DEPDIR)/strace-sigaltstack.Tpo -c -o strace-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sigaltstack.Tpo $(DEPDIR)/strace-sigaltstack.Po +# $(AM_V_CC)source='sigaltstack.c' object='strace-sigaltstack.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` + +strace-signal.o: signal.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-signal.o -MD -MP -MF $(DEPDIR)/strace-signal.Tpo -c -o strace-signal.o `test -f 'signal.c' || echo '$(srcdir)/'`signal.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-signal.Tpo $(DEPDIR)/strace-signal.Po +# $(AM_V_CC)source='signal.c' object='strace-signal.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-signal.o `test -f 'signal.c' || echo '$(srcdir)/'`signal.c + +strace-signal.obj: signal.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-signal.obj -MD -MP -MF $(DEPDIR)/strace-signal.Tpo -c -o strace-signal.obj `if test -f 'signal.c'; then $(CYGPATH_W) 'signal.c'; else $(CYGPATH_W) '$(srcdir)/signal.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-signal.Tpo $(DEPDIR)/strace-signal.Po +# $(AM_V_CC)source='signal.c' object='strace-signal.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-signal.obj `if test -f 'signal.c'; then $(CYGPATH_W) 'signal.c'; else $(CYGPATH_W) '$(srcdir)/signal.c'; fi` + +strace-signalfd.o: signalfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-signalfd.o -MD -MP -MF $(DEPDIR)/strace-signalfd.Tpo -c -o strace-signalfd.o `test -f 'signalfd.c' || echo '$(srcdir)/'`signalfd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-signalfd.Tpo $(DEPDIR)/strace-signalfd.Po +# $(AM_V_CC)source='signalfd.c' object='strace-signalfd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-signalfd.o `test -f 'signalfd.c' || echo '$(srcdir)/'`signalfd.c + +strace-signalfd.obj: signalfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-signalfd.obj -MD -MP -MF $(DEPDIR)/strace-signalfd.Tpo -c -o strace-signalfd.obj `if test -f 'signalfd.c'; then $(CYGPATH_W) 'signalfd.c'; else $(CYGPATH_W) '$(srcdir)/signalfd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-signalfd.Tpo $(DEPDIR)/strace-signalfd.Po +# $(AM_V_CC)source='signalfd.c' object='strace-signalfd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-signalfd.obj `if test -f 'signalfd.c'; then $(CYGPATH_W) 'signalfd.c'; else $(CYGPATH_W) '$(srcdir)/signalfd.c'; fi` + +strace-sigreturn.o: sigreturn.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sigreturn.o -MD -MP -MF $(DEPDIR)/strace-sigreturn.Tpo -c -o strace-sigreturn.o `test -f 'sigreturn.c' || echo '$(srcdir)/'`sigreturn.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sigreturn.Tpo $(DEPDIR)/strace-sigreturn.Po +# $(AM_V_CC)source='sigreturn.c' object='strace-sigreturn.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sigreturn.o `test -f 'sigreturn.c' || echo '$(srcdir)/'`sigreturn.c + +strace-sigreturn.obj: sigreturn.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sigreturn.obj -MD -MP -MF $(DEPDIR)/strace-sigreturn.Tpo -c -o strace-sigreturn.obj `if test -f 'sigreturn.c'; then $(CYGPATH_W) 'sigreturn.c'; else $(CYGPATH_W) '$(srcdir)/sigreturn.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sigreturn.Tpo $(DEPDIR)/strace-sigreturn.Po +# $(AM_V_CC)source='sigreturn.c' object='strace-sigreturn.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sigreturn.obj `if test -f 'sigreturn.c'; then $(CYGPATH_W) 'sigreturn.c'; else $(CYGPATH_W) '$(srcdir)/sigreturn.c'; fi` + +strace-sock.o: sock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sock.o -MD -MP -MF $(DEPDIR)/strace-sock.Tpo -c -o strace-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sock.Tpo $(DEPDIR)/strace-sock.Po +# $(AM_V_CC)source='sock.c' object='strace-sock.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c + +strace-sock.obj: sock.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sock.obj -MD -MP -MF $(DEPDIR)/strace-sock.Tpo -c -o strace-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sock.Tpo $(DEPDIR)/strace-sock.Po +# $(AM_V_CC)source='sock.c' object='strace-sock.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` + +strace-sockaddr.o: sockaddr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sockaddr.o -MD -MP -MF $(DEPDIR)/strace-sockaddr.Tpo -c -o strace-sockaddr.o `test -f 'sockaddr.c' || echo '$(srcdir)/'`sockaddr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sockaddr.Tpo $(DEPDIR)/strace-sockaddr.Po +# $(AM_V_CC)source='sockaddr.c' object='strace-sockaddr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sockaddr.o `test -f 'sockaddr.c' || echo '$(srcdir)/'`sockaddr.c + +strace-sockaddr.obj: sockaddr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sockaddr.obj -MD -MP -MF $(DEPDIR)/strace-sockaddr.Tpo -c -o strace-sockaddr.obj `if test -f 'sockaddr.c'; then $(CYGPATH_W) 'sockaddr.c'; else $(CYGPATH_W) '$(srcdir)/sockaddr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sockaddr.Tpo $(DEPDIR)/strace-sockaddr.Po +# $(AM_V_CC)source='sockaddr.c' object='strace-sockaddr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sockaddr.obj `if test -f 'sockaddr.c'; then $(CYGPATH_W) 'sockaddr.c'; else $(CYGPATH_W) '$(srcdir)/sockaddr.c'; fi` + +strace-socketutils.o: socketutils.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-socketutils.o -MD -MP -MF $(DEPDIR)/strace-socketutils.Tpo -c -o strace-socketutils.o `test -f 'socketutils.c' || echo '$(srcdir)/'`socketutils.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-socketutils.Tpo $(DEPDIR)/strace-socketutils.Po +# $(AM_V_CC)source='socketutils.c' object='strace-socketutils.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-socketutils.o `test -f 'socketutils.c' || echo '$(srcdir)/'`socketutils.c + +strace-socketutils.obj: socketutils.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-socketutils.obj -MD -MP -MF $(DEPDIR)/strace-socketutils.Tpo -c -o strace-socketutils.obj `if test -f 'socketutils.c'; then $(CYGPATH_W) 'socketutils.c'; else $(CYGPATH_W) '$(srcdir)/socketutils.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-socketutils.Tpo $(DEPDIR)/strace-socketutils.Po +# $(AM_V_CC)source='socketutils.c' object='strace-socketutils.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-socketutils.obj `if test -f 'socketutils.c'; then $(CYGPATH_W) 'socketutils.c'; else $(CYGPATH_W) '$(srcdir)/socketutils.c'; fi` + +strace-sram_alloc.o: sram_alloc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sram_alloc.o -MD -MP -MF $(DEPDIR)/strace-sram_alloc.Tpo -c -o strace-sram_alloc.o `test -f 'sram_alloc.c' || echo '$(srcdir)/'`sram_alloc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sram_alloc.Tpo $(DEPDIR)/strace-sram_alloc.Po +# $(AM_V_CC)source='sram_alloc.c' object='strace-sram_alloc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sram_alloc.o `test -f 'sram_alloc.c' || echo '$(srcdir)/'`sram_alloc.c + +strace-sram_alloc.obj: sram_alloc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sram_alloc.obj -MD -MP -MF $(DEPDIR)/strace-sram_alloc.Tpo -c -o strace-sram_alloc.obj `if test -f 'sram_alloc.c'; then $(CYGPATH_W) 'sram_alloc.c'; else $(CYGPATH_W) '$(srcdir)/sram_alloc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sram_alloc.Tpo $(DEPDIR)/strace-sram_alloc.Po +# $(AM_V_CC)source='sram_alloc.c' object='strace-sram_alloc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sram_alloc.obj `if test -f 'sram_alloc.c'; then $(CYGPATH_W) 'sram_alloc.c'; else $(CYGPATH_W) '$(srcdir)/sram_alloc.c'; fi` + +strace-stat.o: stat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-stat.o -MD -MP -MF $(DEPDIR)/strace-stat.Tpo -c -o strace-stat.o `test -f 'stat.c' || echo '$(srcdir)/'`stat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-stat.Tpo $(DEPDIR)/strace-stat.Po +# $(AM_V_CC)source='stat.c' object='strace-stat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-stat.o `test -f 'stat.c' || echo '$(srcdir)/'`stat.c + +strace-stat.obj: stat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-stat.obj -MD -MP -MF $(DEPDIR)/strace-stat.Tpo -c -o strace-stat.obj `if test -f 'stat.c'; then $(CYGPATH_W) 'stat.c'; else $(CYGPATH_W) '$(srcdir)/stat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-stat.Tpo $(DEPDIR)/strace-stat.Po +# $(AM_V_CC)source='stat.c' object='strace-stat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-stat.obj `if test -f 'stat.c'; then $(CYGPATH_W) 'stat.c'; else $(CYGPATH_W) '$(srcdir)/stat.c'; fi` + +strace-stat64.o: stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-stat64.o -MD -MP -MF $(DEPDIR)/strace-stat64.Tpo -c -o strace-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-stat64.Tpo $(DEPDIR)/strace-stat64.Po +# $(AM_V_CC)source='stat64.c' object='strace-stat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c + +strace-stat64.obj: stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-stat64.obj -MD -MP -MF $(DEPDIR)/strace-stat64.Tpo -c -o strace-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-stat64.Tpo $(DEPDIR)/strace-stat64.Po +# $(AM_V_CC)source='stat64.c' object='strace-stat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` + +strace-statfs.o: statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-statfs.o -MD -MP -MF $(DEPDIR)/strace-statfs.Tpo -c -o strace-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-statfs.Tpo $(DEPDIR)/strace-statfs.Po +# $(AM_V_CC)source='statfs.c' object='strace-statfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + +strace-statfs.obj: statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-statfs.obj -MD -MP -MF $(DEPDIR)/strace-statfs.Tpo -c -o strace-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-statfs.Tpo $(DEPDIR)/strace-statfs.Po +# $(AM_V_CC)source='statfs.c' object='strace-statfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + +strace-strace.o: strace.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-strace.o -MD -MP -MF $(DEPDIR)/strace-strace.Tpo -c -o strace-strace.o `test -f 'strace.c' || echo '$(srcdir)/'`strace.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-strace.Tpo $(DEPDIR)/strace-strace.Po +# $(AM_V_CC)source='strace.c' object='strace-strace.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-strace.o `test -f 'strace.c' || echo '$(srcdir)/'`strace.c + +strace-strace.obj: strace.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-strace.obj -MD -MP -MF $(DEPDIR)/strace-strace.Tpo -c -o strace-strace.obj `if test -f 'strace.c'; then $(CYGPATH_W) 'strace.c'; else $(CYGPATH_W) '$(srcdir)/strace.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-strace.Tpo $(DEPDIR)/strace-strace.Po +# $(AM_V_CC)source='strace.c' object='strace-strace.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-strace.obj `if test -f 'strace.c'; then $(CYGPATH_W) 'strace.c'; else $(CYGPATH_W) '$(srcdir)/strace.c'; fi` + +strace-swapon.o: swapon.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-swapon.o -MD -MP -MF $(DEPDIR)/strace-swapon.Tpo -c -o strace-swapon.o `test -f 'swapon.c' || echo '$(srcdir)/'`swapon.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-swapon.Tpo $(DEPDIR)/strace-swapon.Po +# $(AM_V_CC)source='swapon.c' object='strace-swapon.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-swapon.o `test -f 'swapon.c' || echo '$(srcdir)/'`swapon.c + +strace-swapon.obj: swapon.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-swapon.obj -MD -MP -MF $(DEPDIR)/strace-swapon.Tpo -c -o strace-swapon.obj `if test -f 'swapon.c'; then $(CYGPATH_W) 'swapon.c'; else $(CYGPATH_W) '$(srcdir)/swapon.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-swapon.Tpo $(DEPDIR)/strace-swapon.Po +# $(AM_V_CC)source='swapon.c' object='strace-swapon.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-swapon.obj `if test -f 'swapon.c'; then $(CYGPATH_W) 'swapon.c'; else $(CYGPATH_W) '$(srcdir)/swapon.c'; fi` + +strace-syscall.o: syscall.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-syscall.o -MD -MP -MF $(DEPDIR)/strace-syscall.Tpo -c -o strace-syscall.o `test -f 'syscall.c' || echo '$(srcdir)/'`syscall.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-syscall.Tpo $(DEPDIR)/strace-syscall.Po +# $(AM_V_CC)source='syscall.c' object='strace-syscall.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-syscall.o `test -f 'syscall.c' || echo '$(srcdir)/'`syscall.c + +strace-syscall.obj: syscall.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-syscall.obj -MD -MP -MF $(DEPDIR)/strace-syscall.Tpo -c -o strace-syscall.obj `if test -f 'syscall.c'; then $(CYGPATH_W) 'syscall.c'; else $(CYGPATH_W) '$(srcdir)/syscall.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-syscall.Tpo $(DEPDIR)/strace-syscall.Po +# $(AM_V_CC)source='syscall.c' object='strace-syscall.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-syscall.obj `if test -f 'syscall.c'; then $(CYGPATH_W) 'syscall.c'; else $(CYGPATH_W) '$(srcdir)/syscall.c'; fi` + +strace-sysctl.o: sysctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysctl.o -MD -MP -MF $(DEPDIR)/strace-sysctl.Tpo -c -o strace-sysctl.o `test -f 'sysctl.c' || echo '$(srcdir)/'`sysctl.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysctl.Tpo $(DEPDIR)/strace-sysctl.Po +# $(AM_V_CC)source='sysctl.c' object='strace-sysctl.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysctl.o `test -f 'sysctl.c' || echo '$(srcdir)/'`sysctl.c + +strace-sysctl.obj: sysctl.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysctl.obj -MD -MP -MF $(DEPDIR)/strace-sysctl.Tpo -c -o strace-sysctl.obj `if test -f 'sysctl.c'; then $(CYGPATH_W) 'sysctl.c'; else $(CYGPATH_W) '$(srcdir)/sysctl.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysctl.Tpo $(DEPDIR)/strace-sysctl.Po +# $(AM_V_CC)source='sysctl.c' object='strace-sysctl.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysctl.obj `if test -f 'sysctl.c'; then $(CYGPATH_W) 'sysctl.c'; else $(CYGPATH_W) '$(srcdir)/sysctl.c'; fi` + +strace-sysinfo.o: sysinfo.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysinfo.o -MD -MP -MF $(DEPDIR)/strace-sysinfo.Tpo -c -o strace-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysinfo.Tpo $(DEPDIR)/strace-sysinfo.Po +# $(AM_V_CC)source='sysinfo.c' object='strace-sysinfo.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c + +strace-sysinfo.obj: sysinfo.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysinfo.obj -MD -MP -MF $(DEPDIR)/strace-sysinfo.Tpo -c -o strace-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysinfo.Tpo $(DEPDIR)/strace-sysinfo.Po +# $(AM_V_CC)source='sysinfo.c' object='strace-sysinfo.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` + +strace-syslog.o: syslog.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-syslog.o -MD -MP -MF $(DEPDIR)/strace-syslog.Tpo -c -o strace-syslog.o `test -f 'syslog.c' || echo '$(srcdir)/'`syslog.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-syslog.Tpo $(DEPDIR)/strace-syslog.Po +# $(AM_V_CC)source='syslog.c' object='strace-syslog.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-syslog.o `test -f 'syslog.c' || echo '$(srcdir)/'`syslog.c + +strace-syslog.obj: syslog.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-syslog.obj -MD -MP -MF $(DEPDIR)/strace-syslog.Tpo -c -o strace-syslog.obj `if test -f 'syslog.c'; then $(CYGPATH_W) 'syslog.c'; else $(CYGPATH_W) '$(srcdir)/syslog.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-syslog.Tpo $(DEPDIR)/strace-syslog.Po +# $(AM_V_CC)source='syslog.c' object='strace-syslog.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-syslog.obj `if test -f 'syslog.c'; then $(CYGPATH_W) 'syslog.c'; else $(CYGPATH_W) '$(srcdir)/syslog.c'; fi` + +strace-sysmips.o: sysmips.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysmips.o -MD -MP -MF $(DEPDIR)/strace-sysmips.Tpo -c -o strace-sysmips.o `test -f 'sysmips.c' || echo '$(srcdir)/'`sysmips.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysmips.Tpo $(DEPDIR)/strace-sysmips.Po +# $(AM_V_CC)source='sysmips.c' object='strace-sysmips.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysmips.o `test -f 'sysmips.c' || echo '$(srcdir)/'`sysmips.c + +strace-sysmips.obj: sysmips.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysmips.obj -MD -MP -MF $(DEPDIR)/strace-sysmips.Tpo -c -o strace-sysmips.obj `if test -f 'sysmips.c'; then $(CYGPATH_W) 'sysmips.c'; else $(CYGPATH_W) '$(srcdir)/sysmips.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysmips.Tpo $(DEPDIR)/strace-sysmips.Po +# $(AM_V_CC)source='sysmips.c' object='strace-sysmips.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysmips.obj `if test -f 'sysmips.c'; then $(CYGPATH_W) 'sysmips.c'; else $(CYGPATH_W) '$(srcdir)/sysmips.c'; fi` + +strace-term.o: term.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-term.o -MD -MP -MF $(DEPDIR)/strace-term.Tpo -c -o strace-term.o `test -f 'term.c' || echo '$(srcdir)/'`term.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-term.Tpo $(DEPDIR)/strace-term.Po +# $(AM_V_CC)source='term.c' object='strace-term.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-term.o `test -f 'term.c' || echo '$(srcdir)/'`term.c + +strace-term.obj: term.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-term.obj -MD -MP -MF $(DEPDIR)/strace-term.Tpo -c -o strace-term.obj `if test -f 'term.c'; then $(CYGPATH_W) 'term.c'; else $(CYGPATH_W) '$(srcdir)/term.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-term.Tpo $(DEPDIR)/strace-term.Po +# $(AM_V_CC)source='term.c' object='strace-term.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-term.obj `if test -f 'term.c'; then $(CYGPATH_W) 'term.c'; else $(CYGPATH_W) '$(srcdir)/term.c'; fi` + +strace-time.o: time.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-time.o -MD -MP -MF $(DEPDIR)/strace-time.Tpo -c -o strace-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-time.Tpo $(DEPDIR)/strace-time.Po +# $(AM_V_CC)source='time.c' object='strace-time.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c + +strace-time.obj: time.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-time.obj -MD -MP -MF $(DEPDIR)/strace-time.Tpo -c -o strace-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-time.Tpo $(DEPDIR)/strace-time.Po +# $(AM_V_CC)source='time.c' object='strace-time.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi` + +strace-times.o: times.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-times.o -MD -MP -MF $(DEPDIR)/strace-times.Tpo -c -o strace-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-times.Tpo $(DEPDIR)/strace-times.Po +# $(AM_V_CC)source='times.c' object='strace-times.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c + +strace-times.obj: times.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-times.obj -MD -MP -MF $(DEPDIR)/strace-times.Tpo -c -o strace-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-times.Tpo $(DEPDIR)/strace-times.Po +# $(AM_V_CC)source='times.c' object='strace-times.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` + +strace-truncate.o: truncate.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-truncate.o -MD -MP -MF $(DEPDIR)/strace-truncate.Tpo -c -o strace-truncate.o `test -f 'truncate.c' || echo '$(srcdir)/'`truncate.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-truncate.Tpo $(DEPDIR)/strace-truncate.Po +# $(AM_V_CC)source='truncate.c' object='strace-truncate.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-truncate.o `test -f 'truncate.c' || echo '$(srcdir)/'`truncate.c + +strace-truncate.obj: truncate.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-truncate.obj -MD -MP -MF $(DEPDIR)/strace-truncate.Tpo -c -o strace-truncate.obj `if test -f 'truncate.c'; then $(CYGPATH_W) 'truncate.c'; else $(CYGPATH_W) '$(srcdir)/truncate.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-truncate.Tpo $(DEPDIR)/strace-truncate.Po +# $(AM_V_CC)source='truncate.c' object='strace-truncate.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-truncate.obj `if test -f 'truncate.c'; then $(CYGPATH_W) 'truncate.c'; else $(CYGPATH_W) '$(srcdir)/truncate.c'; fi` + +strace-ubi.o: ubi.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ubi.o -MD -MP -MF $(DEPDIR)/strace-ubi.Tpo -c -o strace-ubi.o `test -f 'ubi.c' || echo '$(srcdir)/'`ubi.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ubi.Tpo $(DEPDIR)/strace-ubi.Po +# $(AM_V_CC)source='ubi.c' object='strace-ubi.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ubi.o `test -f 'ubi.c' || echo '$(srcdir)/'`ubi.c + +strace-ubi.obj: ubi.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ubi.obj -MD -MP -MF $(DEPDIR)/strace-ubi.Tpo -c -o strace-ubi.obj `if test -f 'ubi.c'; then $(CYGPATH_W) 'ubi.c'; else $(CYGPATH_W) '$(srcdir)/ubi.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ubi.Tpo $(DEPDIR)/strace-ubi.Po +# $(AM_V_CC)source='ubi.c' object='strace-ubi.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ubi.obj `if test -f 'ubi.c'; then $(CYGPATH_W) 'ubi.c'; else $(CYGPATH_W) '$(srcdir)/ubi.c'; fi` + +strace-uid.o: uid.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uid.o -MD -MP -MF $(DEPDIR)/strace-uid.Tpo -c -o strace-uid.o `test -f 'uid.c' || echo '$(srcdir)/'`uid.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uid.Tpo $(DEPDIR)/strace-uid.Po +# $(AM_V_CC)source='uid.c' object='strace-uid.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uid.o `test -f 'uid.c' || echo '$(srcdir)/'`uid.c + +strace-uid.obj: uid.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uid.obj -MD -MP -MF $(DEPDIR)/strace-uid.Tpo -c -o strace-uid.obj `if test -f 'uid.c'; then $(CYGPATH_W) 'uid.c'; else $(CYGPATH_W) '$(srcdir)/uid.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uid.Tpo $(DEPDIR)/strace-uid.Po +# $(AM_V_CC)source='uid.c' object='strace-uid.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uid.obj `if test -f 'uid.c'; then $(CYGPATH_W) 'uid.c'; else $(CYGPATH_W) '$(srcdir)/uid.c'; fi` + +strace-uid16.o: uid16.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uid16.o -MD -MP -MF $(DEPDIR)/strace-uid16.Tpo -c -o strace-uid16.o `test -f 'uid16.c' || echo '$(srcdir)/'`uid16.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uid16.Tpo $(DEPDIR)/strace-uid16.Po +# $(AM_V_CC)source='uid16.c' object='strace-uid16.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uid16.o `test -f 'uid16.c' || echo '$(srcdir)/'`uid16.c + +strace-uid16.obj: uid16.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uid16.obj -MD -MP -MF $(DEPDIR)/strace-uid16.Tpo -c -o strace-uid16.obj `if test -f 'uid16.c'; then $(CYGPATH_W) 'uid16.c'; else $(CYGPATH_W) '$(srcdir)/uid16.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uid16.Tpo $(DEPDIR)/strace-uid16.Po +# $(AM_V_CC)source='uid16.c' object='strace-uid16.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uid16.obj `if test -f 'uid16.c'; then $(CYGPATH_W) 'uid16.c'; else $(CYGPATH_W) '$(srcdir)/uid16.c'; fi` + +strace-umask.o: umask.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-umask.o -MD -MP -MF $(DEPDIR)/strace-umask.Tpo -c -o strace-umask.o `test -f 'umask.c' || echo '$(srcdir)/'`umask.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-umask.Tpo $(DEPDIR)/strace-umask.Po +# $(AM_V_CC)source='umask.c' object='strace-umask.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-umask.o `test -f 'umask.c' || echo '$(srcdir)/'`umask.c + +strace-umask.obj: umask.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-umask.obj -MD -MP -MF $(DEPDIR)/strace-umask.Tpo -c -o strace-umask.obj `if test -f 'umask.c'; then $(CYGPATH_W) 'umask.c'; else $(CYGPATH_W) '$(srcdir)/umask.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-umask.Tpo $(DEPDIR)/strace-umask.Po +# $(AM_V_CC)source='umask.c' object='strace-umask.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-umask.obj `if test -f 'umask.c'; then $(CYGPATH_W) 'umask.c'; else $(CYGPATH_W) '$(srcdir)/umask.c'; fi` + +strace-umount.o: umount.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-umount.o -MD -MP -MF $(DEPDIR)/strace-umount.Tpo -c -o strace-umount.o `test -f 'umount.c' || echo '$(srcdir)/'`umount.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-umount.Tpo $(DEPDIR)/strace-umount.Po +# $(AM_V_CC)source='umount.c' object='strace-umount.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-umount.o `test -f 'umount.c' || echo '$(srcdir)/'`umount.c + +strace-umount.obj: umount.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-umount.obj -MD -MP -MF $(DEPDIR)/strace-umount.Tpo -c -o strace-umount.obj `if test -f 'umount.c'; then $(CYGPATH_W) 'umount.c'; else $(CYGPATH_W) '$(srcdir)/umount.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-umount.Tpo $(DEPDIR)/strace-umount.Po +# $(AM_V_CC)source='umount.c' object='strace-umount.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-umount.obj `if test -f 'umount.c'; then $(CYGPATH_W) 'umount.c'; else $(CYGPATH_W) '$(srcdir)/umount.c'; fi` + +strace-uname.o: uname.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uname.o -MD -MP -MF $(DEPDIR)/strace-uname.Tpo -c -o strace-uname.o `test -f 'uname.c' || echo '$(srcdir)/'`uname.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uname.Tpo $(DEPDIR)/strace-uname.Po +# $(AM_V_CC)source='uname.c' object='strace-uname.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uname.o `test -f 'uname.c' || echo '$(srcdir)/'`uname.c + +strace-uname.obj: uname.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uname.obj -MD -MP -MF $(DEPDIR)/strace-uname.Tpo -c -o strace-uname.obj `if test -f 'uname.c'; then $(CYGPATH_W) 'uname.c'; else $(CYGPATH_W) '$(srcdir)/uname.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uname.Tpo $(DEPDIR)/strace-uname.Po +# $(AM_V_CC)source='uname.c' object='strace-uname.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uname.obj `if test -f 'uname.c'; then $(CYGPATH_W) 'uname.c'; else $(CYGPATH_W) '$(srcdir)/uname.c'; fi` + +strace-userfaultfd.o: userfaultfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-userfaultfd.o -MD -MP -MF $(DEPDIR)/strace-userfaultfd.Tpo -c -o strace-userfaultfd.o `test -f 'userfaultfd.c' || echo '$(srcdir)/'`userfaultfd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-userfaultfd.Tpo $(DEPDIR)/strace-userfaultfd.Po +# $(AM_V_CC)source='userfaultfd.c' object='strace-userfaultfd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-userfaultfd.o `test -f 'userfaultfd.c' || echo '$(srcdir)/'`userfaultfd.c + +strace-userfaultfd.obj: userfaultfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-userfaultfd.obj -MD -MP -MF $(DEPDIR)/strace-userfaultfd.Tpo -c -o strace-userfaultfd.obj `if test -f 'userfaultfd.c'; then $(CYGPATH_W) 'userfaultfd.c'; else $(CYGPATH_W) '$(srcdir)/userfaultfd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-userfaultfd.Tpo $(DEPDIR)/strace-userfaultfd.Po +# $(AM_V_CC)source='userfaultfd.c' object='strace-userfaultfd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-userfaultfd.obj `if test -f 'userfaultfd.c'; then $(CYGPATH_W) 'userfaultfd.c'; else $(CYGPATH_W) '$(srcdir)/userfaultfd.c'; fi` + +strace-ustat.o: ustat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ustat.o -MD -MP -MF $(DEPDIR)/strace-ustat.Tpo -c -o strace-ustat.o `test -f 'ustat.c' || echo '$(srcdir)/'`ustat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ustat.Tpo $(DEPDIR)/strace-ustat.Po +# $(AM_V_CC)source='ustat.c' object='strace-ustat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ustat.o `test -f 'ustat.c' || echo '$(srcdir)/'`ustat.c + +strace-ustat.obj: ustat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ustat.obj -MD -MP -MF $(DEPDIR)/strace-ustat.Tpo -c -o strace-ustat.obj `if test -f 'ustat.c'; then $(CYGPATH_W) 'ustat.c'; else $(CYGPATH_W) '$(srcdir)/ustat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ustat.Tpo $(DEPDIR)/strace-ustat.Po +# $(AM_V_CC)source='ustat.c' object='strace-ustat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ustat.obj `if test -f 'ustat.c'; then $(CYGPATH_W) 'ustat.c'; else $(CYGPATH_W) '$(srcdir)/ustat.c'; fi` + +strace-util.o: util.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-util.o -MD -MP -MF $(DEPDIR)/strace-util.Tpo -c -o strace-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-util.Tpo $(DEPDIR)/strace-util.Po +# $(AM_V_CC)source='util.c' object='strace-util.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c + +strace-util.obj: util.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-util.obj -MD -MP -MF $(DEPDIR)/strace-util.Tpo -c -o strace-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-util.Tpo $(DEPDIR)/strace-util.Po +# $(AM_V_CC)source='util.c' object='strace-util.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi` + +strace-utime.o: utime.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-utime.o -MD -MP -MF $(DEPDIR)/strace-utime.Tpo -c -o strace-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-utime.Tpo $(DEPDIR)/strace-utime.Po +# $(AM_V_CC)source='utime.c' object='strace-utime.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c + +strace-utime.obj: utime.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-utime.obj -MD -MP -MF $(DEPDIR)/strace-utime.Tpo -c -o strace-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-utime.Tpo $(DEPDIR)/strace-utime.Po +# $(AM_V_CC)source='utime.c' object='strace-utime.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` + +strace-utimes.o: utimes.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-utimes.o -MD -MP -MF $(DEPDIR)/strace-utimes.Tpo -c -o strace-utimes.o `test -f 'utimes.c' || echo '$(srcdir)/'`utimes.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-utimes.Tpo $(DEPDIR)/strace-utimes.Po +# $(AM_V_CC)source='utimes.c' object='strace-utimes.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-utimes.o `test -f 'utimes.c' || echo '$(srcdir)/'`utimes.c + +strace-utimes.obj: utimes.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-utimes.obj -MD -MP -MF $(DEPDIR)/strace-utimes.Tpo -c -o strace-utimes.obj `if test -f 'utimes.c'; then $(CYGPATH_W) 'utimes.c'; else $(CYGPATH_W) '$(srcdir)/utimes.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-utimes.Tpo $(DEPDIR)/strace-utimes.Po +# $(AM_V_CC)source='utimes.c' object='strace-utimes.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-utimes.obj `if test -f 'utimes.c'; then $(CYGPATH_W) 'utimes.c'; else $(CYGPATH_W) '$(srcdir)/utimes.c'; fi` + +strace-v4l2.o: v4l2.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-v4l2.o -MD -MP -MF $(DEPDIR)/strace-v4l2.Tpo -c -o strace-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-v4l2.Tpo $(DEPDIR)/strace-v4l2.Po +# $(AM_V_CC)source='v4l2.c' object='strace-v4l2.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c + +strace-v4l2.obj: v4l2.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-v4l2.obj -MD -MP -MF $(DEPDIR)/strace-v4l2.Tpo -c -o strace-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-v4l2.Tpo $(DEPDIR)/strace-v4l2.Po +# $(AM_V_CC)source='v4l2.c' object='strace-v4l2.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` + +strace-wait.o: wait.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-wait.o -MD -MP -MF $(DEPDIR)/strace-wait.Tpo -c -o strace-wait.o `test -f 'wait.c' || echo '$(srcdir)/'`wait.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-wait.Tpo $(DEPDIR)/strace-wait.Po +# $(AM_V_CC)source='wait.c' object='strace-wait.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-wait.o `test -f 'wait.c' || echo '$(srcdir)/'`wait.c + +strace-wait.obj: wait.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-wait.obj -MD -MP -MF $(DEPDIR)/strace-wait.Tpo -c -o strace-wait.obj `if test -f 'wait.c'; then $(CYGPATH_W) 'wait.c'; else $(CYGPATH_W) '$(srcdir)/wait.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-wait.Tpo $(DEPDIR)/strace-wait.Po +# $(AM_V_CC)source='wait.c' object='strace-wait.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-wait.obj `if test -f 'wait.c'; then $(CYGPATH_W) 'wait.c'; else $(CYGPATH_W) '$(srcdir)/wait.c'; fi` + +strace-xattr.o: xattr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xattr.o -MD -MP -MF $(DEPDIR)/strace-xattr.Tpo -c -o strace-xattr.o `test -f 'xattr.c' || echo '$(srcdir)/'`xattr.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-xattr.Tpo $(DEPDIR)/strace-xattr.Po +# $(AM_V_CC)source='xattr.c' object='strace-xattr.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xattr.o `test -f 'xattr.c' || echo '$(srcdir)/'`xattr.c + +strace-xattr.obj: xattr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xattr.obj -MD -MP -MF $(DEPDIR)/strace-xattr.Tpo -c -o strace-xattr.obj `if test -f 'xattr.c'; then $(CYGPATH_W) 'xattr.c'; else $(CYGPATH_W) '$(srcdir)/xattr.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-xattr.Tpo $(DEPDIR)/strace-xattr.Po +# $(AM_V_CC)source='xattr.c' object='strace-xattr.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xattr.obj `if test -f 'xattr.c'; then $(CYGPATH_W) 'xattr.c'; else $(CYGPATH_W) '$(srcdir)/xattr.c'; fi` + +strace-xmalloc.o: xmalloc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xmalloc.o -MD -MP -MF $(DEPDIR)/strace-xmalloc.Tpo -c -o strace-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-xmalloc.Tpo $(DEPDIR)/strace-xmalloc.Po +# $(AM_V_CC)source='xmalloc.c' object='strace-xmalloc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c + +strace-xmalloc.obj: xmalloc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xmalloc.obj -MD -MP -MF $(DEPDIR)/strace-xmalloc.Tpo -c -o strace-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-xmalloc.Tpo $(DEPDIR)/strace-xmalloc.Po +# $(AM_V_CC)source='xmalloc.c' object='strace-xmalloc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi` + +strace-unwind.o: unwind.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-unwind.o -MD -MP -MF $(DEPDIR)/strace-unwind.Tpo -c -o strace-unwind.o `test -f 'unwind.c' || echo '$(srcdir)/'`unwind.c + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-unwind.Tpo $(DEPDIR)/strace-unwind.Po +# $(AM_V_CC)source='unwind.c' object='strace-unwind.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-unwind.o `test -f 'unwind.c' || echo '$(srcdir)/'`unwind.c + +strace-unwind.obj: unwind.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-unwind.obj -MD -MP -MF $(DEPDIR)/strace-unwind.Tpo -c -o strace-unwind.obj `if test -f 'unwind.c'; then $(CYGPATH_W) 'unwind.c'; else $(CYGPATH_W) '$(srcdir)/unwind.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/strace-unwind.Tpo $(DEPDIR)/strace-unwind.Po +# $(AM_V_CC)source='unwind.c' object='strace-unwind.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-unwind.obj `if test -f 'unwind.c'; then $(CYGPATH_W) 'unwind.c'; else $(CYGPATH_W) '$(srcdir)/unwind.c'; fi` +install-man1: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" +check-valgrind-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +check-valgrind: check-valgrind-recursive + +check-valgrind-am: check-valgrind-local + +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-local \ + clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-binSCRIPTS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: install-man1 + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: $(am__recursive_targets) all check install install-am \ + install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am check-valgrind-am \ + check-valgrind-local clean clean-binPROGRAMS clean-cscope \ + clean-generic clean-local clean-noinstLIBRARIES cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-man uninstall-man1 + +$(top_srcdir)/xlat/access_flags.h: $(top_srcdir)/xlat/access_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/aclipc.h: $(top_srcdir)/xlat/aclipc.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/addrfams.h: $(top_srcdir)/xlat/addrfams.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/adjtimex_modes.h: $(top_srcdir)/xlat/adjtimex_modes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/adjtimex_state.h: $(top_srcdir)/xlat/adjtimex_state.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/adjtimex_status.h: $(top_srcdir)/xlat/adjtimex_status.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/advise.h: $(top_srcdir)/xlat/advise.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/af_packet_types.h: $(top_srcdir)/xlat/af_packet_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/archvals.h: $(top_srcdir)/xlat/archvals.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/arp_hardware_types.h: $(top_srcdir)/xlat/arp_hardware_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/at_flags.h: $(top_srcdir)/xlat/at_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/atomic_ops.h: $(top_srcdir)/xlat/atomic_ops.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/audit_arch.h: $(top_srcdir)/xlat/audit_arch.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/baud_options.h: $(top_srcdir)/xlat/baud_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/blkpg_ops.h: $(top_srcdir)/xlat/blkpg_ops.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bootflags1.h: $(top_srcdir)/xlat/bootflags1.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bootflags2.h: $(top_srcdir)/xlat/bootflags2.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bootflags3.h: $(top_srcdir)/xlat/bootflags3.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_attach_type.h: $(top_srcdir)/xlat/bpf_attach_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_class.h: $(top_srcdir)/xlat/bpf_class.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_commands.h: $(top_srcdir)/xlat/bpf_commands.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_map_types.h: $(top_srcdir)/xlat/bpf_map_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_map_update_elem_flags.h: $(top_srcdir)/xlat/bpf_map_update_elem_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_miscop.h: $(top_srcdir)/xlat/bpf_miscop.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_mode.h: $(top_srcdir)/xlat/bpf_mode.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_op_alu.h: $(top_srcdir)/xlat/bpf_op_alu.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_op_jmp.h: $(top_srcdir)/xlat/bpf_op_jmp.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_prog_types.h: $(top_srcdir)/xlat/bpf_prog_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_rval.h: $(top_srcdir)/xlat/bpf_rval.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_size.h: $(top_srcdir)/xlat/bpf_size.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_src.h: $(top_srcdir)/xlat/bpf_src.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bsg_flags.h: $(top_srcdir)/xlat/bsg_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bsg_protocol.h: $(top_srcdir)/xlat/bsg_protocol.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bsg_subprotocol.h: $(top_srcdir)/xlat/bsg_subprotocol.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bt_protocols.h: $(top_srcdir)/xlat/bt_protocols.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_balance_args.h: $(top_srcdir)/xlat/btrfs_balance_args.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_balance_ctl_cmds.h: $(top_srcdir)/xlat/btrfs_balance_ctl_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_balance_flags.h: $(top_srcdir)/xlat/btrfs_balance_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_balance_state.h: $(top_srcdir)/xlat/btrfs_balance_state.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_compress_types.h: $(top_srcdir)/xlat/btrfs_compress_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_defrag_flags.h: $(top_srcdir)/xlat/btrfs_defrag_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_replace_cmds.h: $(top_srcdir)/xlat/btrfs_dev_replace_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_replace_results.h: $(top_srcdir)/xlat/btrfs_dev_replace_results.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_replace_state.h: $(top_srcdir)/xlat/btrfs_dev_replace_state.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_stats_flags.h: $(top_srcdir)/xlat/btrfs_dev_stats_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_stats_values.h: $(top_srcdir)/xlat/btrfs_dev_stats_values.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_features_compat.h: $(top_srcdir)/xlat/btrfs_features_compat.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_features_compat_ro.h: $(top_srcdir)/xlat/btrfs_features_compat_ro.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_features_incompat.h: $(top_srcdir)/xlat/btrfs_features_incompat.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_key_types.h: $(top_srcdir)/xlat/btrfs_key_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_qgroup_ctl_cmds.h: $(top_srcdir)/xlat/btrfs_qgroup_ctl_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_qgroup_inherit_flags.h: $(top_srcdir)/xlat/btrfs_qgroup_inherit_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_qgroup_limit_flags.h: $(top_srcdir)/xlat/btrfs_qgroup_limit_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_qgroup_status_flags.h: $(top_srcdir)/xlat/btrfs_qgroup_status_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_scrub_flags.h: $(top_srcdir)/xlat/btrfs_scrub_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_send_flags.h: $(top_srcdir)/xlat/btrfs_send_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_snap_flags_v2.h: $(top_srcdir)/xlat/btrfs_snap_flags_v2.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_space_info_flags.h: $(top_srcdir)/xlat/btrfs_space_info_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_tree_objectids.h: $(top_srcdir)/xlat/btrfs_tree_objectids.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/cacheflush_scope.h: $(top_srcdir)/xlat/cacheflush_scope.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/cap.h: $(top_srcdir)/xlat/cap.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/cap_mask0.h: $(top_srcdir)/xlat/cap_mask0.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/cap_mask1.h: $(top_srcdir)/xlat/cap_mask1.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/cap_version.h: $(top_srcdir)/xlat/cap_version.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/clockflags.h: $(top_srcdir)/xlat/clockflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/clocknames.h: $(top_srcdir)/xlat/clocknames.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/clone_flags.h: $(top_srcdir)/xlat/clone_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/cpuclocknames.h: $(top_srcdir)/xlat/cpuclocknames.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/delete_module_flags.h: $(top_srcdir)/xlat/delete_module_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/dirent_types.h: $(top_srcdir)/xlat/dirent_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/dm_flags.h: $(top_srcdir)/xlat/dm_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/efd_flags.h: $(top_srcdir)/xlat/efd_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/epollctls.h: $(top_srcdir)/xlat/epollctls.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/epollevents.h: $(top_srcdir)/xlat/epollevents.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/epollflags.h: $(top_srcdir)/xlat/epollflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ethernet_protocols.h: $(top_srcdir)/xlat/ethernet_protocols.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_abs.h: $(top_srcdir)/xlat/evdev_abs.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_autorepeat.h: $(top_srcdir)/xlat/evdev_autorepeat.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_ev.h: $(top_srcdir)/xlat/evdev_ev.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_ff_status.h: $(top_srcdir)/xlat/evdev_ff_status.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_ff_types.h: $(top_srcdir)/xlat/evdev_ff_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_keycode.h: $(top_srcdir)/xlat/evdev_keycode.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_leds.h: $(top_srcdir)/xlat/evdev_leds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_misc.h: $(top_srcdir)/xlat/evdev_misc.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_mtslots.h: $(top_srcdir)/xlat/evdev_mtslots.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_prop.h: $(top_srcdir)/xlat/evdev_prop.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_relative_axes.h: $(top_srcdir)/xlat/evdev_relative_axes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_snd.h: $(top_srcdir)/xlat/evdev_snd.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_switch.h: $(top_srcdir)/xlat/evdev_switch.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_sync.h: $(top_srcdir)/xlat/evdev_sync.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/f_owner_types.h: $(top_srcdir)/xlat/f_owner_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/f_seals.h: $(top_srcdir)/xlat/f_seals.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/falloc_flags.h: $(top_srcdir)/xlat/falloc_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fan_classes.h: $(top_srcdir)/xlat/fan_classes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fan_event_flags.h: $(top_srcdir)/xlat/fan_event_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fan_init_flags.h: $(top_srcdir)/xlat/fan_init_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fan_mark_flags.h: $(top_srcdir)/xlat/fan_mark_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fcntl64cmds.h: $(top_srcdir)/xlat/fcntl64cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fcntlcmds.h: $(top_srcdir)/xlat/fcntlcmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fdflags.h: $(top_srcdir)/xlat/fdflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fiemap_extent_flags.h: $(top_srcdir)/xlat/fiemap_extent_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fiemap_flags.h: $(top_srcdir)/xlat/fiemap_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/flockcmds.h: $(top_srcdir)/xlat/flockcmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fsmagic.h: $(top_srcdir)/xlat/fsmagic.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/futexops.h: $(top_srcdir)/xlat/futexops.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/futexwakecmps.h: $(top_srcdir)/xlat/futexwakecmps.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/futexwakeops.h: $(top_srcdir)/xlat/futexwakeops.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/getrandom_flags.h: $(top_srcdir)/xlat/getrandom_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/getsockipoptions.h: $(top_srcdir)/xlat/getsockipoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/getsockipv6options.h: $(top_srcdir)/xlat/getsockipv6options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/hci_channels.h: $(top_srcdir)/xlat/hci_channels.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/hw_breakpoint_len.h: $(top_srcdir)/xlat/hw_breakpoint_len.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/hw_breakpoint_type.h: $(top_srcdir)/xlat/hw_breakpoint_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/icmpfilterflags.h: $(top_srcdir)/xlat/icmpfilterflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/if_dqblk_valid.h: $(top_srcdir)/xlat/if_dqblk_valid.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/if_dqinfo_flags.h: $(top_srcdir)/xlat/if_dqinfo_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/if_dqinfo_valid.h: $(top_srcdir)/xlat/if_dqinfo_valid.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/iffflags.h: $(top_srcdir)/xlat/iffflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/inet_protocols.h: $(top_srcdir)/xlat/inet_protocols.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/inotify_flags.h: $(top_srcdir)/xlat/inotify_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/inotify_init_flags.h: $(top_srcdir)/xlat/inotify_init_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ioctl_dirs.h: $(top_srcdir)/xlat/ioctl_dirs.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ioprio_class.h: $(top_srcdir)/xlat/ioprio_class.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ioprio_who.h: $(top_srcdir)/xlat/ioprio_who.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ip_cmsg_types.h: $(top_srcdir)/xlat/ip_cmsg_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ipc_msg_flags.h: $(top_srcdir)/xlat/ipc_msg_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ipccalls.h: $(top_srcdir)/xlat/ipccalls.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/itimer_which.h: $(top_srcdir)/xlat/itimer_which.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/kcmp_types.h: $(top_srcdir)/xlat/kcmp_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/kexec_arch_values.h: $(top_srcdir)/xlat/kexec_arch_values.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/kexec_file_load_flags.h: $(top_srcdir)/xlat/kexec_file_load_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/kexec_load_flags.h: $(top_srcdir)/xlat/kexec_load_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/key_perms.h: $(top_srcdir)/xlat/key_perms.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/key_reqkeys.h: $(top_srcdir)/xlat/key_reqkeys.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/key_spec.h: $(top_srcdir)/xlat/key_spec.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/keyctl_commands.h: $(top_srcdir)/xlat/keyctl_commands.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/lockfcmds.h: $(top_srcdir)/xlat/lockfcmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/loop_cmds.h: $(top_srcdir)/xlat/loop_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/loop_crypt_type_options.h: $(top_srcdir)/xlat/loop_crypt_type_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/loop_flags_options.h: $(top_srcdir)/xlat/loop_flags_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/madvise_cmds.h: $(top_srcdir)/xlat/madvise_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mbindflags.h: $(top_srcdir)/xlat/mbindflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mctl_sync.h: $(top_srcdir)/xlat/mctl_sync.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/membarrier_cmds.h: $(top_srcdir)/xlat/membarrier_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/memfd_create_flags.h: $(top_srcdir)/xlat/memfd_create_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mempolicyflags.h: $(top_srcdir)/xlat/mempolicyflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mlock_flags.h: $(top_srcdir)/xlat/mlock_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mlockall_flags.h: $(top_srcdir)/xlat/mlockall_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mmap_flags.h: $(top_srcdir)/xlat/mmap_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mmap_prot.h: $(top_srcdir)/xlat/mmap_prot.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/modem_flags.h: $(top_srcdir)/xlat/modem_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/modetypes.h: $(top_srcdir)/xlat/modetypes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/module_init_flags.h: $(top_srcdir)/xlat/module_init_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mount_flags.h: $(top_srcdir)/xlat/mount_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/move_pages_flags.h: $(top_srcdir)/xlat/move_pages_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mq_attr_flags.h: $(top_srcdir)/xlat/mq_attr_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mremap_flags.h: $(top_srcdir)/xlat/mremap_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/msg_flags.h: $(top_srcdir)/xlat/msg_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/msgctl_flags.h: $(top_srcdir)/xlat/msgctl_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mtd_file_mode_options.h: $(top_srcdir)/xlat/mtd_file_mode_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mtd_flags_options.h: $(top_srcdir)/xlat/mtd_flags_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mtd_mode_options.h: $(top_srcdir)/xlat/mtd_mode_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mtd_nandecc_options.h: $(top_srcdir)/xlat/mtd_nandecc_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mtd_otp_options.h: $(top_srcdir)/xlat/mtd_otp_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mtd_type_options.h: $(top_srcdir)/xlat/mtd_type_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/name_to_handle_at_flags.h: $(top_srcdir)/xlat/name_to_handle_at_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/netlink_flags.h: $(top_srcdir)/xlat/netlink_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/netlink_protocols.h: $(top_srcdir)/xlat/netlink_protocols.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/netlink_types.h: $(top_srcdir)/xlat/netlink_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/notifyflags.h: $(top_srcdir)/xlat/notifyflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/nt_descriptor_types.h: $(top_srcdir)/xlat/nt_descriptor_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/open_access_modes.h: $(top_srcdir)/xlat/open_access_modes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/open_mode_flags.h: $(top_srcdir)/xlat/open_mode_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/openmodessol.h: $(top_srcdir)/xlat/openmodessol.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/packet_mreq_type.h: $(top_srcdir)/xlat/packet_mreq_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_attr_size.h: $(top_srcdir)/xlat/perf_attr_size.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_branch_sample_type.h: $(top_srcdir)/xlat/perf_branch_sample_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_event_open_flags.h: $(top_srcdir)/xlat/perf_event_open_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_event_read_format.h: $(top_srcdir)/xlat/perf_event_read_format.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_event_sample_format.h: $(top_srcdir)/xlat/perf_event_sample_format.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_hw_cache_id.h: $(top_srcdir)/xlat/perf_hw_cache_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_hw_cache_op_id.h: $(top_srcdir)/xlat/perf_hw_cache_op_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_hw_cache_op_result_id.h: $(top_srcdir)/xlat/perf_hw_cache_op_result_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_hw_id.h: $(top_srcdir)/xlat/perf_hw_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_sw_ids.h: $(top_srcdir)/xlat/perf_sw_ids.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_type_id.h: $(top_srcdir)/xlat/perf_type_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/personality_flags.h: $(top_srcdir)/xlat/personality_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/personality_types.h: $(top_srcdir)/xlat/personality_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pkey_access.h: $(top_srcdir)/xlat/pkey_access.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/policies.h: $(top_srcdir)/xlat/policies.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pollflags.h: $(top_srcdir)/xlat/pollflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_cap_ambient.h: $(top_srcdir)/xlat/pr_cap_ambient.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_dumpable.h: $(top_srcdir)/xlat/pr_dumpable.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_fp_mode.h: $(top_srcdir)/xlat/pr_fp_mode.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_mce_kill.h: $(top_srcdir)/xlat/pr_mce_kill.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_mce_kill_policy.h: $(top_srcdir)/xlat/pr_mce_kill_policy.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_set_mm.h: $(top_srcdir)/xlat/pr_set_mm.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_tsc.h: $(top_srcdir)/xlat/pr_tsc.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_unalign_flags.h: $(top_srcdir)/xlat/pr_unalign_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/prctl_options.h: $(top_srcdir)/xlat/prctl_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/priorities.h: $(top_srcdir)/xlat/priorities.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ptp_flags_options.h: $(top_srcdir)/xlat/ptp_flags_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ptrace_cmds.h: $(top_srcdir)/xlat/ptrace_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ptrace_events.h: $(top_srcdir)/xlat/ptrace_events.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ptrace_peeksiginfo_flags.h: $(top_srcdir)/xlat/ptrace_peeksiginfo_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ptrace_setoptions_flags.h: $(top_srcdir)/xlat/ptrace_setoptions_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/quota_formats.h: $(top_srcdir)/xlat/quota_formats.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/quotacmds.h: $(top_srcdir)/xlat/quotacmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/quotatypes.h: $(top_srcdir)/xlat/quotatypes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/rename_flags.h: $(top_srcdir)/xlat/rename_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/resource_flags.h: $(top_srcdir)/xlat/resource_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/resources.h: $(top_srcdir)/xlat/resources.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/rwf_flags.h: $(top_srcdir)/xlat/rwf_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sa_handler_values.h: $(top_srcdir)/xlat/sa_handler_values.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sched_flags.h: $(top_srcdir)/xlat/sched_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/schedulers.h: $(top_srcdir)/xlat/schedulers.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/scmvals.h: $(top_srcdir)/xlat/scmvals.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/scsi_sg_commands.h: $(top_srcdir)/xlat/scsi_sg_commands.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/secbits.h: $(top_srcdir)/xlat/secbits.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/seccomp_filter_flags.h: $(top_srcdir)/xlat/seccomp_filter_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/seccomp_mode.h: $(top_srcdir)/xlat/seccomp_mode.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/seccomp_ops.h: $(top_srcdir)/xlat/seccomp_ops.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/seccomp_ret_action.h: $(top_srcdir)/xlat/seccomp_ret_action.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/semctl_flags.h: $(top_srcdir)/xlat/semctl_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/semop_flags.h: $(top_srcdir)/xlat/semop_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/setns_types.h: $(top_srcdir)/xlat/setns_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/setsockipoptions.h: $(top_srcdir)/xlat/setsockipoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/setsockipv6options.h: $(top_srcdir)/xlat/setsockipv6options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sfd_flags.h: $(top_srcdir)/xlat/sfd_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sg_io_dxfer_direction.h: $(top_srcdir)/xlat/sg_io_dxfer_direction.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sg_io_flags.h: $(top_srcdir)/xlat/sg_io_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sg_io_info.h: $(top_srcdir)/xlat/sg_io_info.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sg_scsi_reset.h: $(top_srcdir)/xlat/sg_scsi_reset.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/shm_flags.h: $(top_srcdir)/xlat/shm_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/shm_resource_flags.h: $(top_srcdir)/xlat/shm_resource_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/shmctl_flags.h: $(top_srcdir)/xlat/shmctl_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/shutdown_modes.h: $(top_srcdir)/xlat/shutdown_modes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigact_flags.h: $(top_srcdir)/xlat/sigact_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigaltstack_flags.h: $(top_srcdir)/xlat/sigaltstack_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigbus_codes.h: $(top_srcdir)/xlat/sigbus_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigchld_codes.h: $(top_srcdir)/xlat/sigchld_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigemt_codes.h: $(top_srcdir)/xlat/sigemt_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigev_value.h: $(top_srcdir)/xlat/sigev_value.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigfpe_codes.h: $(top_srcdir)/xlat/sigfpe_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigill_codes.h: $(top_srcdir)/xlat/sigill_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/siginfo_codes.h: $(top_srcdir)/xlat/siginfo_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigpoll_codes.h: $(top_srcdir)/xlat/sigpoll_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigprocmaskcmds.h: $(top_srcdir)/xlat/sigprocmaskcmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigprof_codes.h: $(top_srcdir)/xlat/sigprof_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigsegv_codes.h: $(top_srcdir)/xlat/sigsegv_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigsys_codes.h: $(top_srcdir)/xlat/sigsys_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigtrap_codes.h: $(top_srcdir)/xlat/sigtrap_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sock_type_flags.h: $(top_srcdir)/xlat/sock_type_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/socketcalls.h: $(top_srcdir)/xlat/socketcalls.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/socketlayers.h: $(top_srcdir)/xlat/socketlayers.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sockipoptions.h: $(top_srcdir)/xlat/sockipoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sockipv6options.h: $(top_srcdir)/xlat/sockipv6options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sockipxoptions.h: $(top_srcdir)/xlat/sockipxoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sockoptions.h: $(top_srcdir)/xlat/sockoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sockpacketoptions.h: $(top_srcdir)/xlat/sockpacketoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sockrawoptions.h: $(top_srcdir)/xlat/sockrawoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/socksctpoptions.h: $(top_srcdir)/xlat/socksctpoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/socktcpoptions.h: $(top_srcdir)/xlat/socktcpoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/socktypes.h: $(top_srcdir)/xlat/socktypes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/splice_flags.h: $(top_srcdir)/xlat/splice_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sram_alloc_flags.h: $(top_srcdir)/xlat/sram_alloc_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/statfs_flags.h: $(top_srcdir)/xlat/statfs_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/swap_flags.h: $(top_srcdir)/xlat/swap_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sync_file_range_flags.h: $(top_srcdir)/xlat/sync_file_range_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_kern.h: $(top_srcdir)/xlat/sysctl_kern.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net.h: $(top_srcdir)/xlat/sysctl_net.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_core.h: $(top_srcdir)/xlat/sysctl_net_core.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_ipv4.h: $(top_srcdir)/xlat/sysctl_net_ipv4.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_ipv4_conf.h: $(top_srcdir)/xlat/sysctl_net_ipv4_conf.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_ipv4_route.h: $(top_srcdir)/xlat/sysctl_net_ipv4_route.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_ipv6.h: $(top_srcdir)/xlat/sysctl_net_ipv6.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_ipv6_route.h: $(top_srcdir)/xlat/sysctl_net_ipv6_route.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_unix.h: $(top_srcdir)/xlat/sysctl_net_unix.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_root.h: $(top_srcdir)/xlat/sysctl_root.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_vm.h: $(top_srcdir)/xlat/sysctl_vm.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/syslog_action_type.h: $(top_srcdir)/xlat/syslog_action_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysmips_operations.h: $(top_srcdir)/xlat/sysmips_operations.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/tcflsh_options.h: $(top_srcdir)/xlat/tcflsh_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/tcxonc_options.h: $(top_srcdir)/xlat/tcxonc_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/timerfdflags.h: $(top_srcdir)/xlat/timerfdflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ubi_volume_props.h: $(top_srcdir)/xlat/ubi_volume_props.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ubi_volume_types.h: $(top_srcdir)/xlat/ubi_volume_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_api_flags.h: $(top_srcdir)/xlat/uffd_api_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_copy_flags.h: $(top_srcdir)/xlat/uffd_copy_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_flags.h: $(top_srcdir)/xlat/uffd_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_register_ioctl_flags.h: $(top_srcdir)/xlat/uffd_register_ioctl_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_register_mode_flags.h: $(top_srcdir)/xlat/uffd_register_mode_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_zeropage_flags.h: $(top_srcdir)/xlat/uffd_zeropage_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/umount_flags.h: $(top_srcdir)/xlat/umount_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/unshare_flags.h: $(top_srcdir)/xlat/unshare_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/usagewho.h: $(top_srcdir)/xlat/usagewho.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_buf_flags.h: $(top_srcdir)/xlat/v4l2_buf_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_buf_types.h: $(top_srcdir)/xlat/v4l2_buf_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_capture_modes.h: $(top_srcdir)/xlat/v4l2_capture_modes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_colorspaces.h: $(top_srcdir)/xlat/v4l2_colorspaces.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_control_classes.h: $(top_srcdir)/xlat/v4l2_control_classes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_control_flags.h: $(top_srcdir)/xlat/v4l2_control_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_control_ids.h: $(top_srcdir)/xlat/v4l2_control_ids.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_control_types.h: $(top_srcdir)/xlat/v4l2_control_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_device_capabilities_flags.h: $(top_srcdir)/xlat/v4l2_device_capabilities_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_fields.h: $(top_srcdir)/xlat/v4l2_fields.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_format_description_flags.h: $(top_srcdir)/xlat/v4l2_format_description_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_frameinterval_types.h: $(top_srcdir)/xlat/v4l2_frameinterval_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_framesize_types.h: $(top_srcdir)/xlat/v4l2_framesize_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_input_types.h: $(top_srcdir)/xlat/v4l2_input_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_memories.h: $(top_srcdir)/xlat/v4l2_memories.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_streaming_capabilities.h: $(top_srcdir)/xlat/v4l2_streaming_capabilities.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/wait4_options.h: $(top_srcdir)/xlat/wait4_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/waitid_types.h: $(top_srcdir)/xlat/waitid_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/whence_codes.h: $(top_srcdir)/xlat/whence_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/xattrflags.h: $(top_srcdir)/xlat/xattrflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/xfs_dqblk_flags.h: $(top_srcdir)/xlat/xfs_dqblk_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/xfs_quota_flags.h: $(top_srcdir)/xlat/xfs_quota_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ + + +# Code coverage +# +# Optional: +# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. +# (Default: $(top_builddir)) +# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated +# by lcov for code coverage. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) +# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage +# reports to be created. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. +# (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore +# +# The generated report will be titled using the $(PACKAGE_NAME) and +# $(PACKAGE_VERSION). In order to add the current git hash to the title, +# use the git-version-gen script, available online. + +# Optional variables +CODE_COVERAGE_DIRECTORY ?= $(top_builddir) +CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info +CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) +CODE_COVERAGE_IGNORE_PATTERN ?= + +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); +code_coverage_quiet = $(code_coverage_quiet_$(V)) +code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) +code_coverage_quiet_0 = --quiet + +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + +# Use recursive makes in order to ignore errors during check +check-code-coverage: +ifeq ($(CODE_COVERAGE_ENABLED),yes) + -$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture +else + @echo "Need to reconfigure with --enable-code-coverage" +endif + +# Capture code coverage data +code-coverage-capture: code-coverage-capture-hook +ifeq ($(CODE_COVERAGE_ENABLED),yes) + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" +else + @echo "Need to reconfigure with --enable-code-coverage" +endif + +# Hook rule executed before code-coverage-capture, overridable by the user +code-coverage-capture-hook: + +ifeq ($(CODE_COVERAGE_ENABLED),yes) +clean: code-coverage-clean +distclean: code-coverage-clean +code-coverage-clean: + -$(LCOV) --directory $(top_builddir) -z + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete +endif + +GITIGNOREFILES ?= +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) + +AM_DISTCHECK_CONFIGURE_FLAGS ?= +AM_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage + +.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean + + +.PHONY: check-valgrind-local +check-valgrind-local: + +.PHONY: srpm +srpm: dist-xz + rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz + +$(srcdir)/.version: + $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@ + +sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c)) + for f in $^; do \ + sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \ + done | sort -u > $@ + +sen.h: $(patsubst %,$(srcdir)/%,$(syscallent_files)) + for f in $^; do cat -- $$f; done | \ + $(srcdir)/generate_sen.sh > $@ + +dist-hook: + $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version + +news-check: NEWS + $(AM_V_GEN)if head -1 $< | \ + grep -x $(news_check_regexp) >/dev/null; then \ + :; \ + else \ + echo >&2 '$<: check failed'; \ + exit 1; \ + fi + +ioctl_redefs%.h: ioctlent%.h ioctlent0.h + sort $< > $<-t + sort ioctlent0.h | comm -23 $<-t - | \ + sed -r -n 's/^\{ "([^"]+)", (0x[[:xdigit:]]+) \},$$/#ifdef \1\n# undef \1\n# define \1 \2\n#endif/p' \ + > $@-t + rm -f $<-t + mv $@-t $@ + +ioctlent%.h: ioctlsort% + ./$< > $@ + +# Need to pick up definitions *for host* while compiling +# ioctlsort *for build*, hence this magic. +ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c + $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ + +ioctl_iocdef.h: ioctl_iocdef.i + sed -n 's/^DEFINE HOST/#define /p' $< > $@ + +ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + +ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h + cat $^ > $@ + +syscallent.i: $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h + $(CPP) -P $(SCNO_CPPFLAGS) $^ -o $@ + +scno.h: $(top_srcdir)/scno.head syscallent.i + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + cat $< >> $@-t + LC_ALL=C sed -n '$(SCNO_SED)' $(filter-out $<,$^) >> $@-t + mv $@-t $@ + +$(strace_OBJECTS): scno.h + +# mpers targets + +mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h + for f in $^; do \ + CC="$(CC)" CFLAGS="$(mpers_sh_opts) -DMPERS_IS_$(mpers_NAME)" \ + CPP="$(CPP)" CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \ + $(srcdir)/mpers.sh -$(mpers_NAME) $$f || exit; \ + done + > $@ + +m%_type_defs.h: $(srcdir_mpers_source_files) + for f in $^; do \ + sed -r -n 's/^#[[:space:]]*include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \ + done > $@-t + echo '#undef MPERS_PRINTER_NAME' >> $@-t + echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t + echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t + echo '#include MPERS_$(mpers_PREFIX)IOCTL_MACROS' >> $@-t + mv $@-t $@ + +m%_funcs.h: $(srcdir_mpers_source_files) + for f in $^; do \ + sed -r -n 's/^SYS_FUNC\(([^)]+)\)/#undef sys_\1\n#define sys_\1 $(mpers_PREFIX)sys_\1/p' $$f || exit; \ + done > $@-t && \ + echo '#include "sys_func.h"' >> $@-t + mv $@-t $@ + +# printers + +%.c.mpers.i: $(srcdir)/%.c + $(CPP) -P $(mpers_sh_opts) -DIN_MPERS_BOOTSTRAP $< -o $@ + +printers.h: $(mpers_preproc_files) + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + echo 'typedef struct {' >> $@-t + for f in $^; do \ + sed -r -n 's/$(mpers_printer_decl_pattern)/ \1 (*\2)(\3);\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f \ + || exit; \ + done >> $@-t + echo '} struct_printers;' >> $@-t + echo 'extern const struct_printers *printers;' >> $@-t + echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t + mv $@-t $@ + +%_printer_decls.h: $(mpers_preproc_files) + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + for f in $^; do \ + sed -r -n 's/$(mpers_printer_decl_pattern)/extern \1 $(mpers_PREFIX)\2(\3);/p' $$f \ + || exit; \ + done >> $@-t + mv $@-t $@ + +%_printer_defs.h: $(mpers_preproc_files) + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + for f in $^; do \ + sed -r -n 's/$(mpers_printer_decl_pattern)/.\2 = $(mpers_PREFIX)\2,/p' $$f \ + || exit; \ + done >> $@-t + mv $@-t $@ + +native_printer_decls.h native_printer_defs.h: mpers_PREFIX = + +$(mpers_m32_targets): mpers_NAME = m32 + +$(mpers_mx32_targets): mpers_NAME = mx32 + +clean-local: + -rm -rf mpers-m32 mpers-mx32 +#$(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \ +# $(srcdir)/.version +# @rm -f $@.new +# (cd $(srcdir); \ +# ./gitlog-to-changelog --append-dot \ +# --since='$(gen_changelog_start_date)'; \ +# echo; echo; echo 'See ChangeLog-CVS for older changes.' \ +# ) > $@.new +# chmod 444 $@.new +# mv -f $@.new $@ + +#$(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \ +# $(srcdir)/Makefile.in $(srcdir)/.version +# $(AM_V_GEN) \ +# ( \ +# cd $(srcdir); \ +# sed '/^##/,$$d' CREDITS.in; \ +# { sed -n '1,/^##>/d; s/ */\t/; s/^./&/p' CREDITS.in; \ +# git log --pretty=format:'%aN %aE'; \ +# } | LC_ALL=C sort -u \ +# | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \ +# ) > $@-t && mv $@-t $@ + +#export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Makefile.am b/Makefile.am index d1ad1fec6..9b00481da 100644 --- a/Makefile.am +++ b/Makefile.am @@ -53,6 +53,9 @@ AM_CPPFLAGS = -I$(builddir)/$(OS)/$(ARCH) \ -I$(builddir) \ -I$(srcdir) +AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD) +AM_CPPFLAGS_FOR_BUILD = $(AM_CPPFLAGS) + include xlat/Makemodule.am strace_CPPFLAGS = $(AM_CPPFLAGS) @@ -73,6 +76,7 @@ libstrace_a_SOURCES = \ sync_file_range.c \ sync_file_range2.c \ upeek.c \ + upoke.c \ # end of libstrace_a_SOURCES strace_SOURCES = \ @@ -97,12 +101,12 @@ strace_SOURCES = \ desc.c \ dirent.c \ dirent64.c \ + dm.c \ empty.h \ epoll.c \ evdev.c \ eventfd.c \ execve.c \ - exit.c \ fadvise.c \ fallocate.c \ fanotify.c \ @@ -166,21 +170,28 @@ strace_SOURCES = \ native_defs.h \ net.c \ netlink.c \ + nsig.h \ numa.c \ oldstat.c \ open.c \ or1k_atomic.c \ pathtrace.c \ perf.c \ + perf_event_struct.h \ 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 \ @@ -190,6 +201,7 @@ strace_SOURCES = \ process_vm.c \ ptp.c \ ptrace.h \ + qualify.c \ quota.c \ readahead.c \ readlink.c \ @@ -203,6 +215,8 @@ strace_SOURCES = \ seccomp.c \ seccomp_fprog.h \ sendfile.c \ + sg_io_v3.c \ + sg_io_v4.c \ sigaltstack.c \ sigevent.h \ signal.c \ @@ -221,6 +235,7 @@ strace_SOURCES = \ swapon.c \ syscall.c \ sysctl.c \ + sysent.h \ sysinfo.c \ syslog.c \ sysmips.c \ @@ -235,11 +250,11 @@ strace_SOURCES = \ umount.c \ uname.c \ userfaultfd.c \ + ustat.c \ util.c \ utime.c \ utimes.c \ v4l2.c \ - vsprintf.c \ wait.c \ xattr.c \ xlat.h \ @@ -289,8 +304,10 @@ EXTRA_DIST = \ debian/watch \ errnoent.sh \ generate_sen.sh \ + ioctl_iocdef.c \ ioctlsort.c \ linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align16.h \ linux/32/ioctls_inc_align32.h \ linux/32/ioctls_inc_align64.h \ linux/32/syscallent.h \ @@ -307,6 +324,8 @@ EXTRA_DIST = \ linux/aarch64/ioctls_arch1.h \ linux/aarch64/ioctls_inc0.h \ linux/aarch64/ioctls_inc1.h \ + linux/aarch64/set_error.c \ + linux/aarch64/set_scno.c \ linux/aarch64/signalent1.h \ linux/aarch64/syscallent.h \ linux/aarch64/syscallent1.h \ @@ -321,6 +340,8 @@ EXTRA_DIST = \ linux/alpha/get_syscall_result.c\ linux/alpha/ioctls_arch0.h \ linux/alpha/ioctls_inc0.h \ + linux/alpha/set_error.c \ + linux/alpha/set_scno.c \ linux/alpha/signalent.h \ linux/alpha/syscallent.h \ linux/alpha/userent.h \ @@ -330,6 +351,8 @@ EXTRA_DIST = \ linux/arc/get_syscall_args.c \ linux/arc/ioctls_arch0.h \ linux/arc/ioctls_inc0.h \ + linux/arc/set_error.c \ + linux/arc/set_scno.c \ linux/arc/syscallent.h \ linux/arch_regs.h \ linux/arch_sigreturn.c \ @@ -341,6 +364,8 @@ EXTRA_DIST = \ linux/arm/get_syscall_args.c \ linux/arm/ioctls_arch0.h \ linux/arm/ioctls_inc0.h \ + linux/arm/set_error.c \ + linux/arm/set_scno.c \ linux/arm/syscallent.h \ linux/arm/userent.h \ linux/avr32/arch_regs.c \ @@ -349,6 +374,8 @@ EXTRA_DIST = \ linux/avr32/get_syscall_args.c \ linux/avr32/ioctls_arch0.h \ linux/avr32/ioctls_inc0.h \ + linux/avr32/set_error.c \ + linux/avr32/set_scno.c \ linux/avr32/syscallent.h \ linux/avr32/userent.h \ linux/bfin/arch_regs.c \ @@ -358,6 +385,8 @@ EXTRA_DIST = \ linux/bfin/get_syscall_result.c \ linux/bfin/ioctls_arch0.h \ linux/bfin/ioctls_inc0.h \ + linux/bfin/set_error.c \ + linux/bfin/set_scno.c \ linux/bfin/syscallent.h \ linux/bfin/userent.h \ linux/crisv10/arch_regs.c \ @@ -366,6 +395,9 @@ EXTRA_DIST = \ linux/crisv10/get_scno.c \ linux/crisv10/get_syscall_args.c \ linux/crisv10/get_syscall_result.c \ + linux/crisv10/set_error.c \ + linux/crisv10/set_scno.c \ + linux/crisv10/syscallent.h \ linux/crisv10/userent.h \ linux/crisv32/arch_regs.c \ linux/crisv32/arch_sigreturn.c \ @@ -373,9 +405,13 @@ EXTRA_DIST = \ linux/crisv32/get_scno.c \ linux/crisv32/get_syscall_args.c \ linux/crisv32/get_syscall_result.c \ + linux/crisv32/set_error.c \ + linux/crisv32/set_scno.c \ + linux/crisv32/syscallent.h \ linux/crisv32/userent.h \ linux/dummy.h \ linux/errnoent.h \ + linux/getregs_old.h \ linux/hppa/arch_regs.c \ linux/hppa/arch_regs.h \ linux/hppa/errnoent.h \ @@ -385,6 +421,8 @@ EXTRA_DIST = \ linux/hppa/get_syscall_result.c \ linux/hppa/ioctls_arch0.h \ linux/hppa/ioctls_inc0.h \ + linux/hppa/set_error.c \ + linux/hppa/set_scno.c \ linux/hppa/signalent.h \ linux/hppa/syscallent.h \ linux/i386/arch_regs.c \ @@ -395,6 +433,8 @@ EXTRA_DIST = \ linux/i386/get_syscall_args.c \ linux/i386/ioctls_arch0.h \ linux/i386/ioctls_inc0.h \ + linux/i386/set_error.c \ + linux/i386/set_scno.c \ linux/i386/syscallent.h \ linux/i386/userent.h \ linux/i386/userent0.h \ @@ -407,17 +447,21 @@ EXTRA_DIST = \ linux/ia64/get_syscall_args.c \ linux/ia64/ioctls_arch0.h \ linux/ia64/ioctls_inc0.h \ + linux/ia64/set_error.c \ + linux/ia64/set_scno.c \ linux/ia64/syscallent.h \ linux/ia64/userent.h \ linux/inet_diag.h \ linux/m68k/arch_regs.c \ + linux/m68k/arch_regs.h \ linux/m68k/arch_sigreturn.c \ linux/m68k/get_error.c \ linux/m68k/get_scno.c \ linux/m68k/get_syscall_args.c \ - linux/m68k/get_syscall_result.c \ linux/m68k/ioctls_arch0.h \ linux/m68k/ioctls_inc0.h \ + linux/m68k/set_error.c \ + linux/m68k/set_scno.c \ linux/m68k/syscallent.h \ linux/m68k/userent.h \ linux/metag/arch_regs.c \ @@ -426,6 +470,8 @@ EXTRA_DIST = \ linux/metag/get_syscall_args.c \ linux/metag/ioctls_arch0.h \ linux/metag/ioctls_inc0.h \ + linux/metag/set_error.c \ + linux/metag/set_scno.c \ linux/metag/syscallent.h \ linux/microblaze/arch_regs.c \ linux/microblaze/arch_sigreturn.c \ @@ -435,6 +481,8 @@ EXTRA_DIST = \ linux/microblaze/get_syscall_result.c \ linux/microblaze/ioctls_arch0.h \ linux/microblaze/ioctls_inc0.h \ + linux/microblaze/set_error.c \ + linux/microblaze/set_scno.c \ linux/microblaze/syscallent.h \ linux/microblaze/userent.h \ linux/mips/arch_getrval2.c \ @@ -448,6 +496,8 @@ EXTRA_DIST = \ linux/mips/get_syscall_args.c \ linux/mips/ioctls_arch0.h \ linux/mips/ioctls_inc0.h \ + linux/mips/set_error.c \ + linux/mips/set_scno.c \ linux/mips/signalent.h \ linux/mips/syscallent-compat.h \ linux/mips/syscallent-n32.h \ @@ -463,6 +513,8 @@ EXTRA_DIST = \ linux/nios2/get_syscall_args.c \ linux/nios2/ioctls_arch0.h \ linux/nios2/ioctls_inc0.h \ + linux/nios2/set_error.c \ + linux/nios2/set_scno.c \ linux/nios2/syscallent.h \ linux/or1k/arch_regs.c \ linux/or1k/get_error.c \ @@ -470,6 +522,8 @@ EXTRA_DIST = \ linux/or1k/get_syscall_args.c \ linux/or1k/ioctls_arch0.h \ linux/or1k/ioctls_inc0.h \ + linux/or1k/set_error.c \ + linux/or1k/set_scno.c \ linux/or1k/syscallent.h \ linux/or1k/userent.h \ linux/personality.h \ @@ -481,8 +535,11 @@ EXTRA_DIST = \ linux/powerpc/get_scno.c \ linux/powerpc/get_syscall_args.c \ linux/powerpc/getregs_old.c \ + linux/powerpc/getregs_old.h \ linux/powerpc/ioctls_arch0.h \ linux/powerpc/ioctls_inc0.h \ + linux/powerpc/set_error.c \ + linux/powerpc/set_scno.c \ linux/powerpc/syscallent.h \ linux/powerpc/userent.h \ linux/powerpc64/arch_regs.c \ @@ -494,10 +551,13 @@ EXTRA_DIST = \ linux/powerpc64/get_scno.c \ linux/powerpc64/get_syscall_args.c \ linux/powerpc64/getregs_old.c \ + linux/powerpc64/getregs_old.h \ linux/powerpc64/ioctls_arch0.h \ linux/powerpc64/ioctls_arch1.h \ linux/powerpc64/ioctls_inc0.h \ linux/powerpc64/ioctls_inc1.h \ + linux/powerpc64/set_error.c \ + linux/powerpc64/set_scno.c \ linux/powerpc64/signalent1.h \ linux/powerpc64/syscallent.h \ linux/powerpc64/syscallent1.h \ @@ -512,6 +572,8 @@ EXTRA_DIST = \ linux/riscv/ioctls_arch1.h \ linux/riscv/ioctls_inc0.h \ linux/riscv/ioctls_inc1.h \ + linux/riscv/set_error.c \ + linux/riscv/set_scno.c \ linux/riscv/signalent1.h \ linux/riscv/syscallent.h \ linux/riscv/syscallent1.h \ @@ -523,6 +585,8 @@ EXTRA_DIST = \ linux/s390/get_syscall_args.c \ linux/s390/ioctls_arch0.h \ linux/s390/ioctls_inc0.h \ + linux/s390/set_error.c \ + linux/s390/set_scno.c \ linux/s390/syscallent.h \ linux/s390/userent.h \ linux/s390/userent0.h \ @@ -535,6 +599,8 @@ EXTRA_DIST = \ linux/s390x/get_syscall_args.c \ linux/s390x/ioctls_arch0.h \ linux/s390x/ioctls_inc0.h \ + linux/s390x/set_error.c \ + linux/s390x/set_scno.c \ linux/s390x/syscallent.h \ linux/s390x/userent.h \ linux/sh/arch_getrval2.c \ @@ -545,6 +611,8 @@ EXTRA_DIST = \ linux/sh/get_syscall_result.c \ linux/sh/ioctls_arch0.h \ linux/sh/ioctls_inc0.h \ + linux/sh/set_error.c \ + linux/sh/set_scno.c \ linux/sh/syscallent.h \ linux/sh/userent.h \ linux/sh/userent0.h \ @@ -556,6 +624,8 @@ EXTRA_DIST = \ linux/sh64/get_syscall_result.c \ linux/sh64/ioctls_arch0.h \ linux/sh64/ioctls_inc0.h \ + linux/sh64/set_error.c \ + linux/sh64/set_scno.c \ linux/sh64/syscallent.h \ linux/sh64/userent.h \ linux/signalent.h \ @@ -571,6 +641,8 @@ EXTRA_DIST = \ linux/sparc/get_syscall_args.c \ linux/sparc/ioctls_arch0.h \ linux/sparc/ioctls_inc0.h \ + linux/sparc/set_error.c \ + linux/sparc/set_scno.c \ linux/sparc/signalent.h \ linux/sparc/syscallent.h \ linux/sparc/userent.h \ @@ -587,6 +659,8 @@ EXTRA_DIST = \ linux/sparc64/ioctls_arch1.h \ linux/sparc64/ioctls_inc0.h \ linux/sparc64/ioctls_inc1.h \ + linux/sparc64/set_error.c \ + linux/sparc64/set_scno.c \ linux/sparc64/signalent.h \ linux/sparc64/signalent1.h \ linux/sparc64/syscallent.h \ @@ -605,6 +679,8 @@ EXTRA_DIST = \ linux/tile/ioctls_arch1.h \ linux/tile/ioctls_inc0.h \ linux/tile/ioctls_inc1.h \ + linux/tile/set_error.c \ + linux/tile/set_scno.c \ linux/tile/signalent1.h \ linux/tile/syscallent.h \ linux/tile/syscallent1.h \ @@ -624,6 +700,8 @@ EXTRA_DIST = \ linux/x32/ioctls_arch1.h \ linux/x32/ioctls_inc0.h \ linux/x32/ioctls_inc1.h \ + linux/x32/set_error.c \ + linux/x32/set_scno.c \ linux/x32/signalent1.h \ linux/x32/syscallent.h \ linux/x32/syscallent1.h \ @@ -638,12 +716,15 @@ EXTRA_DIST = \ linux/x86_64/get_scno.c \ linux/x86_64/get_syscall_args.c \ linux/x86_64/getregs_old.c \ + linux/x86_64/getregs_old.h \ linux/x86_64/ioctls_arch0.h \ linux/x86_64/ioctls_arch1.h \ linux/x86_64/ioctls_arch2.h \ linux/x86_64/ioctls_inc0.h \ linux/x86_64/ioctls_inc1.h \ linux/x86_64/ioctls_inc2.h \ + linux/x86_64/set_error.c \ + linux/x86_64/set_scno.c \ linux/x86_64/signalent1.h \ linux/x86_64/signalent2.h \ linux/x86_64/syscallent.h \ @@ -657,6 +738,8 @@ EXTRA_DIST = \ linux/xtensa/get_syscall_result.c \ linux/xtensa/ioctls_arch0.h \ linux/xtensa/ioctls_inc0.h \ + linux/xtensa/set_error.c \ + linux/xtensa/set_scno.c \ linux/xtensa/syscallent.h \ linux/xtensa/userent.h \ maint/ioctls_gen.sh \ @@ -667,6 +750,7 @@ EXTRA_DIST = \ mpers.sh \ mpers_test.sh \ mpers_xlat.h \ + scno.head \ signalent.sh \ strace-graph \ strace-log-merge \ @@ -677,6 +761,9 @@ EXTRA_DIST = \ xlat/gen.sh \ xlate.el +.PHONY: check-valgrind-local +check-valgrind-local: + .PHONY: srpm srpm: dist-xz rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz @@ -720,9 +807,9 @@ news-check: NEWS ioctlsort_CC = $(CC_FOR_BUILD) ioctlsort_DEFS = $(DEFS) ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES) -ioctlsort_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD) -ioctlsort_CFLAGS = $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) -ioctlsort_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) +ioctlsort_CPPFLAGS = $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) +ioctlsort_CFLAGS = $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) +ioctlsort_LDFLAGS = $(AM_LDFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h) ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h)) @@ -739,10 +826,19 @@ ioctl_redefs%.h: ioctlent%.h ioctlent0.h ioctlent%.h: ioctlsort% ./$< > $@ +# Need to pick up definitions *for host* while compiling +# ioctlsort *for build*, hence this magic. +ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c + $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ + +ioctl_iocdef.h: ioctl_iocdef.i + sed -n 's/^DEFINE HOST/#define /p' $< > $@ + ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ -ioctlsort%.o: ioctls_all%.h $(srcdir)/ioctlsort.c +ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h @@ -751,9 +847,14 @@ ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioc BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) \ native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h .version CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ + ioctl_iocdef.h ioctl_iocdef.i \ native_printer_decls.h native_printer_defs.h printers.h sen.h sys_func.h DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h +include scno.am + +$(strace_OBJECTS): scno.h + # defines mpers_source_files include mpers.am srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files)) @@ -780,7 +881,7 @@ mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h m%_type_defs.h: $(srcdir_mpers_source_files) for f in $^; do \ - sed -r -n 's/^#include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \ + sed -r -n 's/^#[[:space:]]*include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \ done > $@-t echo '#undef MPERS_PRINTER_NAME' >> $@-t echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 000000000..d0a31adce --- /dev/null +++ b/Makefile.in @@ -0,0 +1,6594 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Automake input for strace. +# +# Copyright (c) 2002-2009 Roland McGrath +# Copyright (c) 2006-2016 Dmitry V. Levin +# Copyright (c) 2008-2015 Mike Frysinger +# Copyright (c) 2015 Elvira Khabirova +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# scno.h make rules for strace. +# +# Copyright (c) 2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = strace$(EXEEXT) +DIST_COMMON = $(srcdir)/xlat/Makemodule.am $(srcdir)/scno.am \ + $(srcdir)/mpers.am $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(srcdir)/strace.spec.in \ + $(top_srcdir)/debian/changelog.in depcomp AUTHORS COPYING \ + INSTALL NEWS README compile config.guess config.sub install-sh \ + missing +@USE_LIBUNWIND_TRUE@am__append_1 = unwind.c +@USE_LIBUNWIND_TRUE@am__append_2 = $(libunwind_CPPFLAGS) +@USE_LIBUNWIND_TRUE@am__append_3 = $(libunwind_LDFLAGS) +@USE_LIBUNWIND_TRUE@am__append_4 = $(libunwind_LIBS) +@HAVE_M32_MPERS_TRUE@am__append_5 = libmpers-m32.a +@HAVE_M32_MPERS_TRUE@am__append_6 = libmpers-m32.a +@HAVE_M32_MPERS_TRUE@am__append_7 = $(mpers_m32_targets) +@HAVE_M32_MPERS_TRUE@am__append_8 = $(mpers_m32_targets) +@HAVE_MX32_MPERS_TRUE@am__append_9 = libmpers-mx32.a +@HAVE_MX32_MPERS_TRUE@am__append_10 = libmpers-mx32.a +@HAVE_MX32_MPERS_TRUE@am__append_11 = $(mpers_mx32_targets) +@HAVE_MX32_MPERS_TRUE@am__append_12 = $(mpers_mx32_targets) +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/ax_valgrind_check.m4 \ + $(top_srcdir)/m4/mpers.m4 \ + $(top_srcdir)/m4/st_save_restore_var.m4 \ + $(top_srcdir)/m4/st_warn_cflags.m4 \ + $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = strace.spec debian/changelog +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AR = ar +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libmpers_m32_a_AR = $(AR) $(ARFLAGS) +libmpers_m32_a_LIBADD = +am__libmpers_m32_a_SOURCES_DIST = 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 +am__objects_1 = libmpers_m32_a-block.$(OBJEXT) \ + libmpers_m32_a-btrfs.$(OBJEXT) libmpers_m32_a-dirent.$(OBJEXT) \ + libmpers_m32_a-evdev.$(OBJEXT) \ + libmpers_m32_a-fetch_seccomp_fprog.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_flock.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_mmsghdr.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_msghdr.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_stat.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_stat64.$(OBJEXT) \ + libmpers_m32_a-fetch_struct_statfs.$(OBJEXT) \ + libmpers_m32_a-hdio.$(OBJEXT) \ + libmpers_m32_a-ipc_msgctl.$(OBJEXT) \ + libmpers_m32_a-ipc_shmctl.$(OBJEXT) \ + libmpers_m32_a-loop.$(OBJEXT) libmpers_m32_a-mtd.$(OBJEXT) \ + libmpers_m32_a-print_mq_attr.$(OBJEXT) \ + libmpers_m32_a-print_msgbuf.$(OBJEXT) \ + libmpers_m32_a-print_sg_req_info.$(OBJEXT) \ + libmpers_m32_a-print_sigevent.$(OBJEXT) \ + libmpers_m32_a-print_time.$(OBJEXT) \ + libmpers_m32_a-print_timespec.$(OBJEXT) \ + libmpers_m32_a-print_timeval.$(OBJEXT) \ + libmpers_m32_a-print_timex.$(OBJEXT) \ + libmpers_m32_a-printrusage.$(OBJEXT) \ + libmpers_m32_a-printsiginfo.$(OBJEXT) \ + libmpers_m32_a-rtc.$(OBJEXT) libmpers_m32_a-sg_io_v3.$(OBJEXT) \ + libmpers_m32_a-sigaltstack.$(OBJEXT) \ + libmpers_m32_a-sock.$(OBJEXT) libmpers_m32_a-sysinfo.$(OBJEXT) \ + libmpers_m32_a-times.$(OBJEXT) libmpers_m32_a-ustat.$(OBJEXT) \ + libmpers_m32_a-utime.$(OBJEXT) libmpers_m32_a-v4l2.$(OBJEXT) +@HAVE_M32_MPERS_TRUE@am_libmpers_m32_a_OBJECTS = $(am__objects_1) +libmpers_m32_a_OBJECTS = $(am_libmpers_m32_a_OBJECTS) +libmpers_mx32_a_AR = $(AR) $(ARFLAGS) +libmpers_mx32_a_LIBADD = +am__libmpers_mx32_a_SOURCES_DIST = 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 +am__objects_2 = libmpers_mx32_a-block.$(OBJEXT) \ + libmpers_mx32_a-btrfs.$(OBJEXT) \ + libmpers_mx32_a-dirent.$(OBJEXT) \ + libmpers_mx32_a-evdev.$(OBJEXT) \ + libmpers_mx32_a-fetch_seccomp_fprog.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_flock.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_mmsghdr.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_msghdr.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_stat.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_stat64.$(OBJEXT) \ + libmpers_mx32_a-fetch_struct_statfs.$(OBJEXT) \ + libmpers_mx32_a-hdio.$(OBJEXT) \ + libmpers_mx32_a-ipc_msgctl.$(OBJEXT) \ + libmpers_mx32_a-ipc_shmctl.$(OBJEXT) \ + libmpers_mx32_a-loop.$(OBJEXT) libmpers_mx32_a-mtd.$(OBJEXT) \ + libmpers_mx32_a-print_mq_attr.$(OBJEXT) \ + libmpers_mx32_a-print_msgbuf.$(OBJEXT) \ + libmpers_mx32_a-print_sg_req_info.$(OBJEXT) \ + libmpers_mx32_a-print_sigevent.$(OBJEXT) \ + libmpers_mx32_a-print_time.$(OBJEXT) \ + libmpers_mx32_a-print_timespec.$(OBJEXT) \ + libmpers_mx32_a-print_timeval.$(OBJEXT) \ + libmpers_mx32_a-print_timex.$(OBJEXT) \ + libmpers_mx32_a-printrusage.$(OBJEXT) \ + libmpers_mx32_a-printsiginfo.$(OBJEXT) \ + libmpers_mx32_a-rtc.$(OBJEXT) \ + libmpers_mx32_a-sg_io_v3.$(OBJEXT) \ + libmpers_mx32_a-sigaltstack.$(OBJEXT) \ + libmpers_mx32_a-sock.$(OBJEXT) \ + libmpers_mx32_a-sysinfo.$(OBJEXT) \ + libmpers_mx32_a-times.$(OBJEXT) \ + libmpers_mx32_a-ustat.$(OBJEXT) \ + libmpers_mx32_a-utime.$(OBJEXT) libmpers_mx32_a-v4l2.$(OBJEXT) +@HAVE_MX32_MPERS_TRUE@am_libmpers_mx32_a_OBJECTS = $(am__objects_2) +libmpers_mx32_a_OBJECTS = $(am_libmpers_mx32_a_OBJECTS) +libstrace_a_AR = $(AR) $(ARFLAGS) +libstrace_a_LIBADD = +am_libstrace_a_OBJECTS = libstrace_a-fstatfs.$(OBJEXT) \ + libstrace_a-fstatfs64.$(OBJEXT) libstrace_a-ipc.$(OBJEXT) \ + libstrace_a-socketcall.$(OBJEXT) libstrace_a-statfs.$(OBJEXT) \ + libstrace_a-statfs64.$(OBJEXT) \ + libstrace_a-sync_file_range.$(OBJEXT) \ + libstrace_a-sync_file_range2.$(OBJEXT) \ + libstrace_a-upeek.$(OBJEXT) libstrace_a-upoke.$(OBJEXT) +libstrace_a_OBJECTS = $(am_libstrace_a_OBJECTS) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(man1dir)" +PROGRAMS = $(bin_PROGRAMS) +am__strace_SOURCES_DIST = access.c affinity.c aio.c alpha.c bjm.c \ + block.c bpf.c btrfs.c cacheflush.c capability.c caps0.h \ + caps1.h chdir.c chmod.c clone.c copy_file_range.c count.c \ + defs.h desc.c dirent.c dirent64.c dm.c empty.h 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 flock.h futex.c gcc_compat.h 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_defs.h ipc_msg.c \ + ipc_msgctl.c ipc_sem.c ipc_shm.c ipc_shmctl.c kcmp.c \ + kernel_types.h kexec.c keyctl.c ldt.c link.c linux/asm_stat.h \ + linux/x32/asm_stat.h linux/x86_64/asm_stat.h lookup_dcookie.c \ + loop.c lseek.c mem.c membarrier.c memfd_create.c mknod.c \ + mmsghdr.c mount.c mpers_type.h mq.c msghdr.c msghdr.h mtd.c \ + native_defs.h net.c netlink.c nsig.h numa.c oldstat.c open.c \ + or1k_atomic.c pathtrace.c perf.c perf_event_struct.h \ + 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 printsiginfo.h \ + process.c process_vm.c ptp.c ptrace.h qualify.c quota.c \ + readahead.c readlink.c reboot.c regs.h renameat.c resource.c \ + rtc.c sched.c scsi.c seccomp.c seccomp_fprog.h sendfile.c \ + sg_io_v3.c sg_io_v4.c sigaltstack.c sigevent.h signal.c \ + signalfd.c sigreturn.c sock.c sockaddr.c socketutils.c \ + sram_alloc.c stat.c stat.h stat64.c statfs.c statfs.h strace.c \ + swapon.c syscall.c sysctl.c sysent.h 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 xlat.h xmalloc.c unwind.c +@USE_LIBUNWIND_TRUE@am__objects_3 = strace-unwind.$(OBJEXT) +am_strace_OBJECTS = strace-access.$(OBJEXT) strace-affinity.$(OBJEXT) \ + strace-aio.$(OBJEXT) strace-alpha.$(OBJEXT) \ + strace-bjm.$(OBJEXT) strace-block.$(OBJEXT) \ + strace-bpf.$(OBJEXT) strace-btrfs.$(OBJEXT) \ + strace-cacheflush.$(OBJEXT) strace-capability.$(OBJEXT) \ + strace-chdir.$(OBJEXT) strace-chmod.$(OBJEXT) \ + strace-clone.$(OBJEXT) strace-copy_file_range.$(OBJEXT) \ + strace-count.$(OBJEXT) strace-desc.$(OBJEXT) \ + strace-dirent.$(OBJEXT) strace-dirent64.$(OBJEXT) \ + strace-dm.$(OBJEXT) strace-epoll.$(OBJEXT) \ + strace-evdev.$(OBJEXT) strace-eventfd.$(OBJEXT) \ + strace-execve.$(OBJEXT) strace-fadvise.$(OBJEXT) \ + strace-fallocate.$(OBJEXT) strace-fanotify.$(OBJEXT) \ + strace-fchownat.$(OBJEXT) strace-fcntl.$(OBJEXT) \ + strace-fetch_seccomp_fprog.$(OBJEXT) \ + strace-fetch_struct_flock.$(OBJEXT) \ + strace-fetch_struct_mmsghdr.$(OBJEXT) \ + strace-fetch_struct_msghdr.$(OBJEXT) \ + strace-fetch_struct_stat.$(OBJEXT) \ + strace-fetch_struct_stat64.$(OBJEXT) \ + strace-fetch_struct_statfs.$(OBJEXT) \ + strace-file_handle.$(OBJEXT) strace-file_ioctl.$(OBJEXT) \ + strace-fs_x_ioctl.$(OBJEXT) strace-flock.$(OBJEXT) \ + strace-futex.$(OBJEXT) strace-get_robust_list.$(OBJEXT) \ + strace-getcpu.$(OBJEXT) strace-getcwd.$(OBJEXT) \ + strace-getrandom.$(OBJEXT) strace-hdio.$(OBJEXT) \ + strace-hostname.$(OBJEXT) strace-inotify.$(OBJEXT) \ + strace-io.$(OBJEXT) strace-ioctl.$(OBJEXT) \ + strace-ioperm.$(OBJEXT) strace-iopl.$(OBJEXT) \ + strace-ioprio.$(OBJEXT) strace-ipc_msg.$(OBJEXT) \ + strace-ipc_msgctl.$(OBJEXT) strace-ipc_sem.$(OBJEXT) \ + strace-ipc_shm.$(OBJEXT) strace-ipc_shmctl.$(OBJEXT) \ + strace-kcmp.$(OBJEXT) strace-kexec.$(OBJEXT) \ + strace-keyctl.$(OBJEXT) strace-ldt.$(OBJEXT) \ + strace-link.$(OBJEXT) strace-lookup_dcookie.$(OBJEXT) \ + strace-loop.$(OBJEXT) strace-lseek.$(OBJEXT) \ + strace-mem.$(OBJEXT) strace-membarrier.$(OBJEXT) \ + strace-memfd_create.$(OBJEXT) strace-mknod.$(OBJEXT) \ + strace-mmsghdr.$(OBJEXT) strace-mount.$(OBJEXT) \ + strace-mq.$(OBJEXT) strace-msghdr.$(OBJEXT) \ + strace-mtd.$(OBJEXT) strace-net.$(OBJEXT) \ + strace-netlink.$(OBJEXT) strace-numa.$(OBJEXT) \ + strace-oldstat.$(OBJEXT) strace-open.$(OBJEXT) \ + strace-or1k_atomic.$(OBJEXT) strace-pathtrace.$(OBJEXT) \ + strace-perf.$(OBJEXT) strace-personality.$(OBJEXT) \ + strace-pkeys.$(OBJEXT) strace-poll.$(OBJEXT) \ + strace-prctl.$(OBJEXT) strace-print_dev_t.$(OBJEXT) \ + strace-print_mq_attr.$(OBJEXT) strace-print_msgbuf.$(OBJEXT) \ + strace-print_sg_req_info.$(OBJEXT) \ + strace-print_sigevent.$(OBJEXT) strace-print_statfs.$(OBJEXT) \ + strace-print_struct_stat.$(OBJEXT) strace-print_time.$(OBJEXT) \ + strace-print_timespec.$(OBJEXT) strace-print_timeval.$(OBJEXT) \ + strace-print_timex.$(OBJEXT) strace-printmode.$(OBJEXT) \ + strace-printrusage.$(OBJEXT) strace-printsiginfo.$(OBJEXT) \ + strace-process.$(OBJEXT) strace-process_vm.$(OBJEXT) \ + strace-ptp.$(OBJEXT) strace-qualify.$(OBJEXT) \ + strace-quota.$(OBJEXT) strace-readahead.$(OBJEXT) \ + strace-readlink.$(OBJEXT) strace-reboot.$(OBJEXT) \ + strace-renameat.$(OBJEXT) strace-resource.$(OBJEXT) \ + strace-rtc.$(OBJEXT) strace-sched.$(OBJEXT) \ + strace-scsi.$(OBJEXT) strace-seccomp.$(OBJEXT) \ + strace-sendfile.$(OBJEXT) strace-sg_io_v3.$(OBJEXT) \ + strace-sg_io_v4.$(OBJEXT) strace-sigaltstack.$(OBJEXT) \ + strace-signal.$(OBJEXT) strace-signalfd.$(OBJEXT) \ + strace-sigreturn.$(OBJEXT) strace-sock.$(OBJEXT) \ + strace-sockaddr.$(OBJEXT) strace-socketutils.$(OBJEXT) \ + strace-sram_alloc.$(OBJEXT) strace-stat.$(OBJEXT) \ + strace-stat64.$(OBJEXT) strace-statfs.$(OBJEXT) \ + strace-strace.$(OBJEXT) strace-swapon.$(OBJEXT) \ + strace-syscall.$(OBJEXT) strace-sysctl.$(OBJEXT) \ + strace-sysinfo.$(OBJEXT) strace-syslog.$(OBJEXT) \ + strace-sysmips.$(OBJEXT) strace-term.$(OBJEXT) \ + strace-time.$(OBJEXT) strace-times.$(OBJEXT) \ + strace-truncate.$(OBJEXT) strace-ubi.$(OBJEXT) \ + strace-uid.$(OBJEXT) strace-uid16.$(OBJEXT) \ + strace-umask.$(OBJEXT) strace-umount.$(OBJEXT) \ + strace-uname.$(OBJEXT) strace-userfaultfd.$(OBJEXT) \ + strace-ustat.$(OBJEXT) strace-util.$(OBJEXT) \ + strace-utime.$(OBJEXT) strace-utimes.$(OBJEXT) \ + strace-v4l2.$(OBJEXT) strace-wait.$(OBJEXT) \ + strace-xattr.$(OBJEXT) strace-xmalloc.$(OBJEXT) \ + $(am__objects_3) +strace_OBJECTS = $(am_strace_OBJECTS) +am__DEPENDENCIES_1 = +@USE_LIBUNWIND_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) +strace_DEPENDENCIES = libstrace.a $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) $(am__append_5) $(am__append_9) +strace_LINK = $(CCLD) $(strace_CFLAGS) $(CFLAGS) $(strace_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +SCRIPTS = $(bin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libmpers_m32_a_SOURCES) $(libmpers_mx32_a_SOURCES) \ + $(libstrace_a_SOURCES) $(strace_SOURCES) +DIST_SOURCES = $(am__libmpers_m32_a_SOURCES_DIST) \ + $(am__libmpers_mx32_a_SOURCES_DIST) $(libstrace_a_SOURCES) \ + $(am__strace_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man_MANS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__extra_recursive_targets = check-valgrind-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +DIST_SUBDIRS = tests tests-m32 tests-mx32 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz +GZIP_ENV = --best +DIST_TARGETS = dist-xz dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CYGPATH_W = @CYGPATH_W@ +DEB_CHANGELOGTIME = @DEB_CHANGELOGTIME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ +ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ +ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ +ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ +EXEEXT = @EXEEXT@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LCOV = @LCOV@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MIPS_ABI = @MIPS_ABI@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +RPM_CHANGELOGTIME = @RPM_CHANGELOGTIME@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VALGRIND = @VALGRIND@ +VALGRIND_ENABLED = @VALGRIND_ENABLED@ +VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +arch = @arch@ +arch_m32 = @arch_m32@ +arch_mx32 = @arch_mx32@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dl_LIBS = @dl_LIBS@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libunwind_CPPFLAGS = @libunwind_CPPFLAGS@ +libunwind_LDFLAGS = @libunwind_LDFLAGS@ +libunwind_LIBS = @libunwind_LIBS@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +valgrind_enabled_tools = @valgrind_enabled_tools@ +valgrind_tools = @valgrind_tools@ +@HAVE_M32_RUNTIME_TRUE@TESTS_M32 = tests-m32 +@HAVE_MX32_RUNTIME_TRUE@TESTS_MX32 = tests-mx32 +SUBDIRS = tests $(TESTS_M32) $(TESTS_MX32) +man_MANS = strace.1 +bin_SCRIPTS = strace-graph strace-log-merge +OS = linux +# ARCH is `i386', `m68k', `sparc', etc. +ARCH = @arch@ +ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = -I$(builddir)/$(OS)/$(ARCH) \ + -I$(srcdir)/$(OS)/$(ARCH) \ + -I$(builddir)/$(OS) \ + -I$(srcdir)/$(OS) \ + -I$(builddir) \ + -I$(srcdir) + +AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD) +AM_CPPFLAGS_FOR_BUILD = $(AM_CPPFLAGS) +XLAT_INPUT_FILES = xlat/access_flags.in xlat/aclipc.in \ + xlat/addrfams.in xlat/adjtimex_modes.in xlat/adjtimex_state.in \ + xlat/adjtimex_status.in xlat/advise.in xlat/af_packet_types.in \ + xlat/archvals.in xlat/arp_hardware_types.in xlat/at_flags.in \ + xlat/atomic_ops.in xlat/audit_arch.in xlat/baud_options.in \ + xlat/blkpg_ops.in xlat/bootflags1.in xlat/bootflags2.in \ + xlat/bootflags3.in xlat/bpf_attach_type.in xlat/bpf_class.in \ + xlat/bpf_commands.in xlat/bpf_map_types.in \ + xlat/bpf_map_update_elem_flags.in xlat/bpf_miscop.in \ + xlat/bpf_mode.in xlat/bpf_op_alu.in xlat/bpf_op_jmp.in \ + xlat/bpf_prog_types.in xlat/bpf_rval.in xlat/bpf_size.in \ + xlat/bpf_src.in xlat/bsg_flags.in xlat/bsg_protocol.in \ + xlat/bsg_subprotocol.in xlat/bt_protocols.in \ + xlat/btrfs_balance_args.in xlat/btrfs_balance_ctl_cmds.in \ + xlat/btrfs_balance_flags.in xlat/btrfs_balance_state.in \ + xlat/btrfs_compress_types.in xlat/btrfs_defrag_flags.in \ + xlat/btrfs_dev_replace_cmds.in \ + xlat/btrfs_dev_replace_results.in \ + xlat/btrfs_dev_replace_state.in xlat/btrfs_dev_stats_flags.in \ + xlat/btrfs_dev_stats_values.in xlat/btrfs_features_compat.in \ + xlat/btrfs_features_compat_ro.in \ + xlat/btrfs_features_incompat.in xlat/btrfs_key_types.in \ + xlat/btrfs_qgroup_ctl_cmds.in \ + xlat/btrfs_qgroup_inherit_flags.in \ + xlat/btrfs_qgroup_limit_flags.in \ + xlat/btrfs_qgroup_status_flags.in xlat/btrfs_scrub_flags.in \ + xlat/btrfs_send_flags.in xlat/btrfs_snap_flags_v2.in \ + xlat/btrfs_space_info_flags.in xlat/btrfs_tree_objectids.in \ + xlat/cacheflush_scope.in xlat/cap.in xlat/cap_mask0.in \ + xlat/cap_mask1.in xlat/cap_version.in xlat/clockflags.in \ + xlat/clocknames.in xlat/clone_flags.in xlat/cpuclocknames.in \ + xlat/delete_module_flags.in xlat/dirent_types.in \ + xlat/dm_flags.in xlat/efd_flags.in xlat/epollctls.in \ + xlat/epollevents.in xlat/epollflags.in \ + xlat/ethernet_protocols.in xlat/evdev_abs.in \ + xlat/evdev_autorepeat.in xlat/evdev_ev.in \ + xlat/evdev_ff_status.in xlat/evdev_ff_types.in \ + xlat/evdev_keycode.in xlat/evdev_leds.in xlat/evdev_misc.in \ + xlat/evdev_mtslots.in xlat/evdev_prop.in \ + xlat/evdev_relative_axes.in xlat/evdev_snd.in \ + xlat/evdev_switch.in xlat/evdev_sync.in xlat/f_owner_types.in \ + xlat/f_seals.in xlat/falloc_flags.in xlat/fan_classes.in \ + xlat/fan_event_flags.in xlat/fan_init_flags.in \ + xlat/fan_mark_flags.in xlat/fcntl64cmds.in xlat/fcntlcmds.in \ + xlat/fdflags.in xlat/fiemap_extent_flags.in \ + xlat/fiemap_flags.in xlat/flockcmds.in xlat/fsmagic.in \ + xlat/futexops.in xlat/futexwakecmps.in xlat/futexwakeops.in \ + xlat/getrandom_flags.in xlat/getsockipoptions.in \ + xlat/getsockipv6options.in xlat/hci_channels.in \ + xlat/hw_breakpoint_len.in xlat/hw_breakpoint_type.in \ + xlat/icmpfilterflags.in xlat/if_dqblk_valid.in \ + xlat/if_dqinfo_flags.in xlat/if_dqinfo_valid.in \ + xlat/iffflags.in xlat/inet_protocols.in xlat/inotify_flags.in \ + xlat/inotify_init_flags.in xlat/ioctl_dirs.in \ + xlat/ioprio_class.in xlat/ioprio_who.in xlat/ip_cmsg_types.in \ + xlat/ipc_msg_flags.in xlat/ipccalls.in xlat/itimer_which.in \ + xlat/kcmp_types.in xlat/kexec_arch_values.in \ + xlat/kexec_file_load_flags.in xlat/kexec_load_flags.in \ + xlat/key_perms.in xlat/key_reqkeys.in xlat/key_spec.in \ + xlat/keyctl_commands.in xlat/lockfcmds.in xlat/loop_cmds.in \ + xlat/loop_crypt_type_options.in xlat/loop_flags_options.in \ + xlat/madvise_cmds.in xlat/mbindflags.in xlat/mctl_sync.in \ + xlat/membarrier_cmds.in xlat/memfd_create_flags.in \ + xlat/mempolicyflags.in xlat/mlock_flags.in \ + xlat/mlockall_flags.in xlat/mmap_flags.in xlat/mmap_prot.in \ + xlat/modem_flags.in xlat/modetypes.in \ + xlat/module_init_flags.in xlat/mount_flags.in \ + xlat/move_pages_flags.in xlat/mq_attr_flags.in \ + xlat/mremap_flags.in xlat/msg_flags.in xlat/msgctl_flags.in \ + xlat/mtd_file_mode_options.in xlat/mtd_flags_options.in \ + xlat/mtd_mode_options.in xlat/mtd_nandecc_options.in \ + xlat/mtd_otp_options.in xlat/mtd_type_options.in \ + xlat/name_to_handle_at_flags.in xlat/netlink_flags.in \ + xlat/netlink_protocols.in xlat/netlink_types.in \ + xlat/notifyflags.in xlat/nt_descriptor_types.in \ + xlat/open_access_modes.in xlat/open_mode_flags.in \ + xlat/openmodessol.in xlat/packet_mreq_type.in \ + xlat/perf_attr_size.in xlat/perf_branch_sample_type.in \ + xlat/perf_event_open_flags.in xlat/perf_event_read_format.in \ + xlat/perf_event_sample_format.in xlat/perf_hw_cache_id.in \ + xlat/perf_hw_cache_op_id.in xlat/perf_hw_cache_op_result_id.in \ + xlat/perf_hw_id.in xlat/perf_sw_ids.in xlat/perf_type_id.in \ + xlat/personality_flags.in xlat/personality_types.in \ + xlat/pkey_access.in xlat/policies.in xlat/pollflags.in \ + xlat/pr_cap_ambient.in xlat/pr_dumpable.in xlat/pr_fp_mode.in \ + xlat/pr_mce_kill.in xlat/pr_mce_kill_policy.in \ + xlat/pr_set_mm.in xlat/pr_tsc.in xlat/pr_unalign_flags.in \ + xlat/prctl_options.in xlat/priorities.in \ + xlat/ptp_flags_options.in xlat/ptrace_cmds.in \ + xlat/ptrace_events.in xlat/ptrace_peeksiginfo_flags.in \ + xlat/ptrace_setoptions_flags.in xlat/quota_formats.in \ + xlat/quotacmds.in xlat/quotatypes.in xlat/rename_flags.in \ + xlat/resource_flags.in xlat/resources.in xlat/rwf_flags.in \ + xlat/sa_handler_values.in xlat/sched_flags.in \ + xlat/schedulers.in xlat/scmvals.in xlat/scsi_sg_commands.in \ + xlat/secbits.in xlat/seccomp_filter_flags.in \ + xlat/seccomp_mode.in xlat/seccomp_ops.in \ + xlat/seccomp_ret_action.in xlat/semctl_flags.in \ + xlat/semop_flags.in xlat/setns_types.in \ + xlat/setsockipoptions.in xlat/setsockipv6options.in \ + xlat/sfd_flags.in xlat/sg_io_dxfer_direction.in \ + xlat/sg_io_flags.in xlat/sg_io_info.in xlat/sg_scsi_reset.in \ + xlat/shm_flags.in xlat/shm_resource_flags.in \ + xlat/shmctl_flags.in xlat/shutdown_modes.in \ + xlat/sigact_flags.in xlat/sigaltstack_flags.in \ + xlat/sigbus_codes.in xlat/sigchld_codes.in \ + xlat/sigemt_codes.in xlat/sigev_value.in xlat/sigfpe_codes.in \ + xlat/sigill_codes.in xlat/siginfo_codes.in \ + xlat/sigpoll_codes.in xlat/sigprocmaskcmds.in \ + xlat/sigprof_codes.in xlat/sigsegv_codes.in \ + xlat/sigsys_codes.in xlat/sigtrap_codes.in \ + xlat/sock_type_flags.in xlat/socketcalls.in \ + xlat/socketlayers.in xlat/sockipoptions.in \ + xlat/sockipv6options.in xlat/sockipxoptions.in \ + xlat/sockoptions.in xlat/sockpacketoptions.in \ + xlat/sockrawoptions.in xlat/socksctpoptions.in \ + xlat/socktcpoptions.in xlat/socktypes.in xlat/splice_flags.in \ + xlat/sram_alloc_flags.in xlat/statfs_flags.in \ + xlat/swap_flags.in xlat/sync_file_range_flags.in \ + xlat/sysctl_kern.in xlat/sysctl_net.in xlat/sysctl_net_core.in \ + xlat/sysctl_net_ipv4.in xlat/sysctl_net_ipv4_conf.in \ + xlat/sysctl_net_ipv4_route.in xlat/sysctl_net_ipv6.in \ + xlat/sysctl_net_ipv6_route.in xlat/sysctl_net_unix.in \ + xlat/sysctl_root.in xlat/sysctl_vm.in \ + xlat/syslog_action_type.in xlat/sysmips_operations.in \ + xlat/tcflsh_options.in xlat/tcxonc_options.in \ + xlat/timerfdflags.in xlat/ubi_volume_props.in \ + xlat/ubi_volume_types.in xlat/uffd_api_flags.in \ + xlat/uffd_copy_flags.in xlat/uffd_flags.in \ + xlat/uffd_register_ioctl_flags.in \ + xlat/uffd_register_mode_flags.in xlat/uffd_zeropage_flags.in \ + xlat/umount_flags.in xlat/unshare_flags.in xlat/usagewho.in \ + xlat/v4l2_buf_flags.in xlat/v4l2_buf_types.in \ + xlat/v4l2_capture_modes.in xlat/v4l2_colorspaces.in \ + xlat/v4l2_control_classes.in xlat/v4l2_control_flags.in \ + xlat/v4l2_control_ids.in xlat/v4l2_control_types.in \ + xlat/v4l2_device_capabilities_flags.in xlat/v4l2_fields.in \ + xlat/v4l2_format_description_flags.in \ + xlat/v4l2_frameinterval_types.in xlat/v4l2_framesize_types.in \ + xlat/v4l2_input_types.in xlat/v4l2_memories.in \ + xlat/v4l2_streaming_capabilities.in xlat/wait4_options.in \ + xlat/waitid_types.in xlat/whence_codes.in xlat/xattrflags.in \ + xlat/xfs_dqblk_flags.in xlat/xfs_quota_flags.in +XLAT_HEADER_FILES = xlat/access_flags.h xlat/aclipc.h xlat/addrfams.h \ + xlat/adjtimex_modes.h xlat/adjtimex_state.h \ + xlat/adjtimex_status.h xlat/advise.h xlat/af_packet_types.h \ + xlat/archvals.h xlat/arp_hardware_types.h xlat/at_flags.h \ + xlat/atomic_ops.h xlat/audit_arch.h xlat/baud_options.h \ + xlat/blkpg_ops.h xlat/bootflags1.h xlat/bootflags2.h \ + xlat/bootflags3.h xlat/bpf_attach_type.h xlat/bpf_class.h \ + xlat/bpf_commands.h xlat/bpf_map_types.h \ + xlat/bpf_map_update_elem_flags.h xlat/bpf_miscop.h \ + xlat/bpf_mode.h xlat/bpf_op_alu.h xlat/bpf_op_jmp.h \ + xlat/bpf_prog_types.h xlat/bpf_rval.h xlat/bpf_size.h \ + xlat/bpf_src.h xlat/bsg_flags.h xlat/bsg_protocol.h \ + xlat/bsg_subprotocol.h xlat/bt_protocols.h \ + xlat/btrfs_balance_args.h xlat/btrfs_balance_ctl_cmds.h \ + xlat/btrfs_balance_flags.h xlat/btrfs_balance_state.h \ + xlat/btrfs_compress_types.h xlat/btrfs_defrag_flags.h \ + xlat/btrfs_dev_replace_cmds.h xlat/btrfs_dev_replace_results.h \ + xlat/btrfs_dev_replace_state.h xlat/btrfs_dev_stats_flags.h \ + xlat/btrfs_dev_stats_values.h xlat/btrfs_features_compat.h \ + xlat/btrfs_features_compat_ro.h xlat/btrfs_features_incompat.h \ + xlat/btrfs_key_types.h xlat/btrfs_qgroup_ctl_cmds.h \ + xlat/btrfs_qgroup_inherit_flags.h \ + xlat/btrfs_qgroup_limit_flags.h \ + xlat/btrfs_qgroup_status_flags.h xlat/btrfs_scrub_flags.h \ + xlat/btrfs_send_flags.h xlat/btrfs_snap_flags_v2.h \ + xlat/btrfs_space_info_flags.h xlat/btrfs_tree_objectids.h \ + xlat/cacheflush_scope.h xlat/cap.h xlat/cap_mask0.h \ + xlat/cap_mask1.h xlat/cap_version.h xlat/clockflags.h \ + xlat/clocknames.h xlat/clone_flags.h xlat/cpuclocknames.h \ + xlat/delete_module_flags.h xlat/dirent_types.h xlat/dm_flags.h \ + xlat/efd_flags.h xlat/epollctls.h xlat/epollevents.h \ + xlat/epollflags.h xlat/ethernet_protocols.h xlat/evdev_abs.h \ + xlat/evdev_autorepeat.h xlat/evdev_ev.h xlat/evdev_ff_status.h \ + xlat/evdev_ff_types.h xlat/evdev_keycode.h xlat/evdev_leds.h \ + xlat/evdev_misc.h xlat/evdev_mtslots.h xlat/evdev_prop.h \ + xlat/evdev_relative_axes.h xlat/evdev_snd.h \ + xlat/evdev_switch.h xlat/evdev_sync.h xlat/f_owner_types.h \ + xlat/f_seals.h xlat/falloc_flags.h xlat/fan_classes.h \ + xlat/fan_event_flags.h xlat/fan_init_flags.h \ + xlat/fan_mark_flags.h xlat/fcntl64cmds.h xlat/fcntlcmds.h \ + xlat/fdflags.h xlat/fiemap_extent_flags.h xlat/fiemap_flags.h \ + xlat/flockcmds.h xlat/fsmagic.h xlat/futexops.h \ + xlat/futexwakecmps.h xlat/futexwakeops.h \ + xlat/getrandom_flags.h xlat/getsockipoptions.h \ + xlat/getsockipv6options.h xlat/hci_channels.h \ + xlat/hw_breakpoint_len.h xlat/hw_breakpoint_type.h \ + xlat/icmpfilterflags.h xlat/if_dqblk_valid.h \ + xlat/if_dqinfo_flags.h xlat/if_dqinfo_valid.h xlat/iffflags.h \ + xlat/inet_protocols.h xlat/inotify_flags.h \ + xlat/inotify_init_flags.h xlat/ioctl_dirs.h \ + xlat/ioprio_class.h xlat/ioprio_who.h xlat/ip_cmsg_types.h \ + xlat/ipc_msg_flags.h xlat/ipccalls.h xlat/itimer_which.h \ + xlat/kcmp_types.h xlat/kexec_arch_values.h \ + xlat/kexec_file_load_flags.h xlat/kexec_load_flags.h \ + xlat/key_perms.h xlat/key_reqkeys.h xlat/key_spec.h \ + xlat/keyctl_commands.h xlat/lockfcmds.h xlat/loop_cmds.h \ + xlat/loop_crypt_type_options.h xlat/loop_flags_options.h \ + xlat/madvise_cmds.h xlat/mbindflags.h xlat/mctl_sync.h \ + xlat/membarrier_cmds.h xlat/memfd_create_flags.h \ + xlat/mempolicyflags.h xlat/mlock_flags.h xlat/mlockall_flags.h \ + xlat/mmap_flags.h xlat/mmap_prot.h xlat/modem_flags.h \ + xlat/modetypes.h xlat/module_init_flags.h xlat/mount_flags.h \ + xlat/move_pages_flags.h xlat/mq_attr_flags.h \ + xlat/mremap_flags.h xlat/msg_flags.h xlat/msgctl_flags.h \ + xlat/mtd_file_mode_options.h xlat/mtd_flags_options.h \ + xlat/mtd_mode_options.h xlat/mtd_nandecc_options.h \ + xlat/mtd_otp_options.h xlat/mtd_type_options.h \ + xlat/name_to_handle_at_flags.h xlat/netlink_flags.h \ + xlat/netlink_protocols.h xlat/netlink_types.h \ + xlat/notifyflags.h xlat/nt_descriptor_types.h \ + xlat/open_access_modes.h xlat/open_mode_flags.h \ + xlat/openmodessol.h xlat/packet_mreq_type.h \ + xlat/perf_attr_size.h xlat/perf_branch_sample_type.h \ + xlat/perf_event_open_flags.h xlat/perf_event_read_format.h \ + xlat/perf_event_sample_format.h xlat/perf_hw_cache_id.h \ + xlat/perf_hw_cache_op_id.h xlat/perf_hw_cache_op_result_id.h \ + xlat/perf_hw_id.h xlat/perf_sw_ids.h xlat/perf_type_id.h \ + xlat/personality_flags.h xlat/personality_types.h \ + xlat/pkey_access.h xlat/policies.h xlat/pollflags.h \ + xlat/pr_cap_ambient.h xlat/pr_dumpable.h xlat/pr_fp_mode.h \ + xlat/pr_mce_kill.h xlat/pr_mce_kill_policy.h xlat/pr_set_mm.h \ + xlat/pr_tsc.h xlat/pr_unalign_flags.h xlat/prctl_options.h \ + xlat/priorities.h xlat/ptp_flags_options.h xlat/ptrace_cmds.h \ + xlat/ptrace_events.h xlat/ptrace_peeksiginfo_flags.h \ + xlat/ptrace_setoptions_flags.h xlat/quota_formats.h \ + xlat/quotacmds.h xlat/quotatypes.h xlat/rename_flags.h \ + xlat/resource_flags.h xlat/resources.h xlat/rwf_flags.h \ + xlat/sa_handler_values.h xlat/sched_flags.h xlat/schedulers.h \ + xlat/scmvals.h xlat/scsi_sg_commands.h xlat/secbits.h \ + xlat/seccomp_filter_flags.h xlat/seccomp_mode.h \ + xlat/seccomp_ops.h xlat/seccomp_ret_action.h \ + xlat/semctl_flags.h xlat/semop_flags.h xlat/setns_types.h \ + xlat/setsockipoptions.h xlat/setsockipv6options.h \ + xlat/sfd_flags.h xlat/sg_io_dxfer_direction.h \ + xlat/sg_io_flags.h xlat/sg_io_info.h xlat/sg_scsi_reset.h \ + xlat/shm_flags.h xlat/shm_resource_flags.h xlat/shmctl_flags.h \ + xlat/shutdown_modes.h xlat/sigact_flags.h \ + xlat/sigaltstack_flags.h xlat/sigbus_codes.h \ + xlat/sigchld_codes.h xlat/sigemt_codes.h xlat/sigev_value.h \ + xlat/sigfpe_codes.h xlat/sigill_codes.h xlat/siginfo_codes.h \ + xlat/sigpoll_codes.h xlat/sigprocmaskcmds.h \ + xlat/sigprof_codes.h xlat/sigsegv_codes.h xlat/sigsys_codes.h \ + xlat/sigtrap_codes.h xlat/sock_type_flags.h xlat/socketcalls.h \ + xlat/socketlayers.h xlat/sockipoptions.h \ + xlat/sockipv6options.h xlat/sockipxoptions.h \ + xlat/sockoptions.h xlat/sockpacketoptions.h \ + xlat/sockrawoptions.h xlat/socksctpoptions.h \ + xlat/socktcpoptions.h xlat/socktypes.h xlat/splice_flags.h \ + xlat/sram_alloc_flags.h xlat/statfs_flags.h xlat/swap_flags.h \ + xlat/sync_file_range_flags.h xlat/sysctl_kern.h \ + xlat/sysctl_net.h xlat/sysctl_net_core.h \ + xlat/sysctl_net_ipv4.h xlat/sysctl_net_ipv4_conf.h \ + xlat/sysctl_net_ipv4_route.h xlat/sysctl_net_ipv6.h \ + xlat/sysctl_net_ipv6_route.h xlat/sysctl_net_unix.h \ + xlat/sysctl_root.h xlat/sysctl_vm.h xlat/syslog_action_type.h \ + xlat/sysmips_operations.h xlat/tcflsh_options.h \ + xlat/tcxonc_options.h xlat/timerfdflags.h \ + xlat/ubi_volume_props.h xlat/ubi_volume_types.h \ + xlat/uffd_api_flags.h xlat/uffd_copy_flags.h xlat/uffd_flags.h \ + xlat/uffd_register_ioctl_flags.h \ + xlat/uffd_register_mode_flags.h xlat/uffd_zeropage_flags.h \ + xlat/umount_flags.h xlat/unshare_flags.h xlat/usagewho.h \ + xlat/v4l2_buf_flags.h xlat/v4l2_buf_types.h \ + xlat/v4l2_capture_modes.h xlat/v4l2_colorspaces.h \ + xlat/v4l2_control_classes.h xlat/v4l2_control_flags.h \ + xlat/v4l2_control_ids.h xlat/v4l2_control_types.h \ + xlat/v4l2_device_capabilities_flags.h xlat/v4l2_fields.h \ + xlat/v4l2_format_description_flags.h \ + xlat/v4l2_frameinterval_types.h xlat/v4l2_framesize_types.h \ + xlat/v4l2_input_types.h xlat/v4l2_memories.h \ + xlat/v4l2_streaming_capabilities.h xlat/wait4_options.h \ + xlat/waitid_types.h xlat/whence_codes.h xlat/xattrflags.h \ + xlat/xfs_dqblk_flags.h xlat/xfs_quota_flags.h +strace_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_2) \ + $(CODE_COVERAGE_CPPFLAGS) +strace_CFLAGS = $(AM_CFLAGS) $(CODE_COVERAGE_CFLAGS) +strace_LDFLAGS = $(am__append_3) +strace_LDADD = libstrace.a $(am__append_4) $(CODE_COVERAGE_LDFLAGS) \ + $(am__append_5) $(am__append_9) +noinst_LIBRARIES = libstrace.a $(am__append_6) $(am__append_10) +libstrace_a_CPPFLAGS = $(strace_CPPFLAGS) +libstrace_a_CFLAGS = $(strace_CFLAGS) +libstrace_a_SOURCES = \ + fstatfs.c \ + fstatfs64.c \ + ipc.c \ + socketcall.c \ + statfs.c \ + statfs64.c \ + sync_file_range.c \ + sync_file_range2.c \ + upeek.c \ + upoke.c \ + # end of libstrace_a_SOURCES + +strace_SOURCES = access.c affinity.c aio.c alpha.c bjm.c block.c bpf.c \ + btrfs.c cacheflush.c capability.c caps0.h caps1.h chdir.c \ + chmod.c clone.c copy_file_range.c count.c defs.h desc.c \ + dirent.c dirent64.c dm.c empty.h 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 flock.h futex.c gcc_compat.h 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_defs.h ipc_msg.c \ + ipc_msgctl.c ipc_sem.c ipc_shm.c ipc_shmctl.c kcmp.c \ + kernel_types.h kexec.c keyctl.c ldt.c link.c linux/asm_stat.h \ + linux/x32/asm_stat.h linux/x86_64/asm_stat.h lookup_dcookie.c \ + loop.c lseek.c mem.c membarrier.c memfd_create.c mknod.c \ + mmsghdr.c mount.c mpers_type.h mq.c msghdr.c msghdr.h mtd.c \ + native_defs.h net.c netlink.c nsig.h numa.c oldstat.c open.c \ + or1k_atomic.c pathtrace.c perf.c perf_event_struct.h \ + 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 printsiginfo.h \ + process.c process_vm.c ptp.c ptrace.h qualify.c quota.c \ + readahead.c readlink.c reboot.c regs.h renameat.c resource.c \ + rtc.c sched.c scsi.c seccomp.c seccomp_fprog.h sendfile.c \ + sg_io_v3.c sg_io_v4.c sigaltstack.c sigevent.h signal.c \ + signalfd.c sigreturn.c sock.c sockaddr.c socketutils.c \ + sram_alloc.c stat.c stat.h stat64.c statfs.c statfs.h strace.c \ + swapon.c syscall.c sysctl.c sysent.h 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 xlat.h xmalloc.c \ + $(am__append_1) +CODE_COVERAGE_BRANCH_COVERAGE = 1 +CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \ + --prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .) + +CODE_COVERAGE_IGNORE_PATTERN = '/usr/include/*' + +# Enable this to get link map generated +#strace_LDFLAGS += -Wl,-Map=strace.mapfile +EXTRA_DIST = \ + $(man_MANS) \ + .version \ + COPYING \ + CREDITS \ + ChangeLog \ + ChangeLog-CVS \ + README-linux-ptrace \ + debian/changelog \ + debian/compat \ + debian/control \ + debian/copyright \ + debian/rules \ + debian/source/format \ + debian/strace-udeb.install \ + debian/strace.docs \ + debian/strace.examples \ + debian/strace.install \ + debian/strace.manpages \ + debian/strace64.install \ + debian/strace64.manpages \ + debian/watch \ + errnoent.sh \ + generate_sen.sh \ + ioctl_iocdef.c \ + ioctlsort.c \ + linux/32/ioctls_inc.h \ + linux/32/ioctls_inc_align16.h \ + linux/32/ioctls_inc_align32.h \ + linux/32/ioctls_inc_align64.h \ + linux/32/syscallent.h \ + linux/64/ioctls_inc.h \ + linux/64/syscallent.h \ + linux/aarch64/arch_regs.c \ + linux/aarch64/arch_regs.h \ + linux/aarch64/arch_sigreturn.c \ + linux/aarch64/errnoent1.h \ + linux/aarch64/get_error.c \ + linux/aarch64/get_scno.c \ + linux/aarch64/get_syscall_args.c\ + linux/aarch64/ioctls_arch0.h \ + linux/aarch64/ioctls_arch1.h \ + linux/aarch64/ioctls_inc0.h \ + linux/aarch64/ioctls_inc1.h \ + linux/aarch64/set_error.c \ + linux/aarch64/set_scno.c \ + linux/aarch64/signalent1.h \ + linux/aarch64/syscallent.h \ + linux/aarch64/syscallent1.h \ + linux/alpha/arch_getrval2.c \ + linux/alpha/arch_regs.c \ + linux/alpha/arch_regs.h \ + linux/alpha/arch_sigreturn.c \ + linux/alpha/errnoent.h \ + linux/alpha/get_error.c \ + linux/alpha/get_scno.c \ + linux/alpha/get_syscall_args.c \ + linux/alpha/get_syscall_result.c\ + linux/alpha/ioctls_arch0.h \ + linux/alpha/ioctls_inc0.h \ + linux/alpha/set_error.c \ + linux/alpha/set_scno.c \ + linux/alpha/signalent.h \ + linux/alpha/syscallent.h \ + linux/alpha/userent.h \ + linux/arc/arch_regs.c \ + linux/arc/get_error.c \ + linux/arc/get_scno.c \ + linux/arc/get_syscall_args.c \ + linux/arc/ioctls_arch0.h \ + linux/arc/ioctls_inc0.h \ + linux/arc/set_error.c \ + linux/arc/set_scno.c \ + linux/arc/syscallent.h \ + linux/arch_regs.h \ + linux/arch_sigreturn.c \ + linux/arm/arch_regs.c \ + linux/arm/arch_regs.h \ + linux/arm/arch_sigreturn.c \ + linux/arm/get_error.c \ + linux/arm/get_scno.c \ + linux/arm/get_syscall_args.c \ + linux/arm/ioctls_arch0.h \ + linux/arm/ioctls_inc0.h \ + linux/arm/set_error.c \ + linux/arm/set_scno.c \ + linux/arm/syscallent.h \ + linux/arm/userent.h \ + linux/avr32/arch_regs.c \ + linux/avr32/get_error.c \ + linux/avr32/get_scno.c \ + linux/avr32/get_syscall_args.c \ + linux/avr32/ioctls_arch0.h \ + linux/avr32/ioctls_inc0.h \ + linux/avr32/set_error.c \ + linux/avr32/set_scno.c \ + linux/avr32/syscallent.h \ + linux/avr32/userent.h \ + linux/bfin/arch_regs.c \ + linux/bfin/get_error.c \ + linux/bfin/get_scno.c \ + linux/bfin/get_syscall_args.c \ + linux/bfin/get_syscall_result.c \ + linux/bfin/ioctls_arch0.h \ + linux/bfin/ioctls_inc0.h \ + linux/bfin/set_error.c \ + linux/bfin/set_scno.c \ + linux/bfin/syscallent.h \ + linux/bfin/userent.h \ + linux/crisv10/arch_regs.c \ + linux/crisv10/arch_sigreturn.c \ + linux/crisv10/get_error.c \ + linux/crisv10/get_scno.c \ + linux/crisv10/get_syscall_args.c \ + linux/crisv10/get_syscall_result.c \ + linux/crisv10/set_error.c \ + linux/crisv10/set_scno.c \ + linux/crisv10/syscallent.h \ + linux/crisv10/userent.h \ + linux/crisv32/arch_regs.c \ + linux/crisv32/arch_sigreturn.c \ + linux/crisv32/get_error.c \ + linux/crisv32/get_scno.c \ + linux/crisv32/get_syscall_args.c \ + linux/crisv32/get_syscall_result.c \ + linux/crisv32/set_error.c \ + linux/crisv32/set_scno.c \ + linux/crisv32/syscallent.h \ + linux/crisv32/userent.h \ + linux/dummy.h \ + linux/errnoent.h \ + linux/getregs_old.h \ + linux/hppa/arch_regs.c \ + linux/hppa/arch_regs.h \ + linux/hppa/errnoent.h \ + linux/hppa/get_error.c \ + linux/hppa/get_scno.c \ + linux/hppa/get_syscall_args.c \ + linux/hppa/get_syscall_result.c \ + linux/hppa/ioctls_arch0.h \ + linux/hppa/ioctls_inc0.h \ + linux/hppa/set_error.c \ + linux/hppa/set_scno.c \ + linux/hppa/signalent.h \ + linux/hppa/syscallent.h \ + linux/i386/arch_regs.c \ + linux/i386/arch_regs.h \ + linux/i386/arch_sigreturn.c \ + linux/i386/get_error.c \ + linux/i386/get_scno.c \ + linux/i386/get_syscall_args.c \ + linux/i386/ioctls_arch0.h \ + linux/i386/ioctls_inc0.h \ + linux/i386/set_error.c \ + linux/i386/set_scno.c \ + linux/i386/syscallent.h \ + linux/i386/userent.h \ + linux/i386/userent0.h \ + linux/ia64/arch_getrval2.c \ + linux/ia64/arch_regs.c \ + linux/ia64/arch_regs.h \ + linux/ia64/arch_sigreturn.c \ + linux/ia64/get_error.c \ + linux/ia64/get_scno.c \ + linux/ia64/get_syscall_args.c \ + linux/ia64/ioctls_arch0.h \ + linux/ia64/ioctls_inc0.h \ + linux/ia64/set_error.c \ + linux/ia64/set_scno.c \ + linux/ia64/syscallent.h \ + linux/ia64/userent.h \ + linux/inet_diag.h \ + linux/m68k/arch_regs.c \ + linux/m68k/arch_regs.h \ + linux/m68k/arch_sigreturn.c \ + linux/m68k/get_error.c \ + linux/m68k/get_scno.c \ + linux/m68k/get_syscall_args.c \ + linux/m68k/ioctls_arch0.h \ + linux/m68k/ioctls_inc0.h \ + linux/m68k/set_error.c \ + linux/m68k/set_scno.c \ + linux/m68k/syscallent.h \ + linux/m68k/userent.h \ + linux/metag/arch_regs.c \ + linux/metag/get_error.c \ + linux/metag/get_scno.c \ + linux/metag/get_syscall_args.c \ + linux/metag/ioctls_arch0.h \ + linux/metag/ioctls_inc0.h \ + linux/metag/set_error.c \ + linux/metag/set_scno.c \ + linux/metag/syscallent.h \ + linux/microblaze/arch_regs.c \ + linux/microblaze/arch_sigreturn.c \ + linux/microblaze/get_error.c \ + linux/microblaze/get_scno.c \ + linux/microblaze/get_syscall_args.c \ + linux/microblaze/get_syscall_result.c \ + linux/microblaze/ioctls_arch0.h \ + linux/microblaze/ioctls_inc0.h \ + linux/microblaze/set_error.c \ + linux/microblaze/set_scno.c \ + linux/microblaze/syscallent.h \ + linux/microblaze/userent.h \ + linux/mips/arch_getrval2.c \ + linux/mips/arch_regs.c \ + linux/mips/arch_regs.h \ + linux/mips/arch_sigreturn.c \ + linux/mips/errnoent.h \ + linux/mips/genstub.sh \ + linux/mips/get_error.c \ + linux/mips/get_scno.c \ + linux/mips/get_syscall_args.c \ + linux/mips/ioctls_arch0.h \ + linux/mips/ioctls_inc0.h \ + linux/mips/set_error.c \ + linux/mips/set_scno.c \ + linux/mips/signalent.h \ + linux/mips/syscallent-compat.h \ + linux/mips/syscallent-n32.h \ + linux/mips/syscallent-n64.h \ + linux/mips/syscallent-o32.h \ + linux/mips/syscallent.h \ + linux/mips/userent.h \ + linux/mtd-abi.h \ + linux/netlink_diag.h \ + linux/nios2/arch_regs.c \ + linux/nios2/get_error.c \ + linux/nios2/get_scno.c \ + linux/nios2/get_syscall_args.c \ + linux/nios2/ioctls_arch0.h \ + linux/nios2/ioctls_inc0.h \ + linux/nios2/set_error.c \ + linux/nios2/set_scno.c \ + linux/nios2/syscallent.h \ + linux/or1k/arch_regs.c \ + linux/or1k/get_error.c \ + linux/or1k/get_scno.c \ + linux/or1k/get_syscall_args.c \ + linux/or1k/ioctls_arch0.h \ + linux/or1k/ioctls_inc0.h \ + linux/or1k/set_error.c \ + linux/or1k/set_scno.c \ + linux/or1k/syscallent.h \ + linux/or1k/userent.h \ + linux/personality.h \ + linux/powerpc/arch_regs.c \ + linux/powerpc/arch_regs.h \ + linux/powerpc/arch_sigreturn.c \ + linux/powerpc/errnoent.h \ + linux/powerpc/get_error.c \ + linux/powerpc/get_scno.c \ + linux/powerpc/get_syscall_args.c \ + linux/powerpc/getregs_old.c \ + linux/powerpc/getregs_old.h \ + linux/powerpc/ioctls_arch0.h \ + linux/powerpc/ioctls_inc0.h \ + linux/powerpc/set_error.c \ + linux/powerpc/set_scno.c \ + linux/powerpc/syscallent.h \ + linux/powerpc/userent.h \ + linux/powerpc64/arch_regs.c \ + linux/powerpc64/arch_regs.h \ + linux/powerpc64/arch_sigreturn.c \ + linux/powerpc64/errnoent.h \ + linux/powerpc64/errnoent1.h \ + linux/powerpc64/get_error.c \ + linux/powerpc64/get_scno.c \ + linux/powerpc64/get_syscall_args.c \ + linux/powerpc64/getregs_old.c \ + linux/powerpc64/getregs_old.h \ + linux/powerpc64/ioctls_arch0.h \ + linux/powerpc64/ioctls_arch1.h \ + linux/powerpc64/ioctls_inc0.h \ + linux/powerpc64/ioctls_inc1.h \ + linux/powerpc64/set_error.c \ + linux/powerpc64/set_scno.c \ + linux/powerpc64/signalent1.h \ + linux/powerpc64/syscallent.h \ + linux/powerpc64/syscallent1.h \ + linux/powerpc64/userent.h \ + linux/ptp_clock.h \ + linux/riscv/arch_regs.c \ + linux/riscv/errnoent1.h \ + linux/riscv/get_error.c \ + linux/riscv/get_scno.c \ + linux/riscv/get_syscall_args.c \ + linux/riscv/ioctls_arch0.h \ + linux/riscv/ioctls_arch1.h \ + linux/riscv/ioctls_inc0.h \ + linux/riscv/ioctls_inc1.h \ + linux/riscv/set_error.c \ + linux/riscv/set_scno.c \ + linux/riscv/signalent1.h \ + linux/riscv/syscallent.h \ + linux/riscv/syscallent1.h \ + linux/s390/arch_regs.c \ + linux/s390/arch_regs.h \ + linux/s390/arch_sigreturn.c \ + linux/s390/get_error.c \ + linux/s390/get_scno.c \ + linux/s390/get_syscall_args.c \ + linux/s390/ioctls_arch0.h \ + linux/s390/ioctls_inc0.h \ + linux/s390/set_error.c \ + linux/s390/set_scno.c \ + linux/s390/syscallent.h \ + linux/s390/userent.h \ + linux/s390/userent0.h \ + linux/s390/userent1.h \ + linux/s390x/arch_regs.c \ + linux/s390x/arch_regs.h \ + linux/s390x/arch_sigreturn.c \ + linux/s390x/get_error.c \ + linux/s390x/get_scno.c \ + linux/s390x/get_syscall_args.c \ + linux/s390x/ioctls_arch0.h \ + linux/s390x/ioctls_inc0.h \ + linux/s390x/set_error.c \ + linux/s390x/set_scno.c \ + linux/s390x/syscallent.h \ + linux/s390x/userent.h \ + linux/sh/arch_getrval2.c \ + linux/sh/arch_regs.c \ + linux/sh/get_error.c \ + linux/sh/get_scno.c \ + linux/sh/get_syscall_args.c \ + linux/sh/get_syscall_result.c \ + linux/sh/ioctls_arch0.h \ + linux/sh/ioctls_inc0.h \ + linux/sh/set_error.c \ + linux/sh/set_scno.c \ + linux/sh/syscallent.h \ + linux/sh/userent.h \ + linux/sh/userent0.h \ + linux/sh64/arch_regs.c \ + linux/sh64/arch_regs.h \ + linux/sh64/get_error.c \ + linux/sh64/get_scno.c \ + linux/sh64/get_syscall_args.c \ + linux/sh64/get_syscall_result.c \ + linux/sh64/ioctls_arch0.h \ + linux/sh64/ioctls_inc0.h \ + linux/sh64/set_error.c \ + linux/sh64/set_scno.c \ + linux/sh64/syscallent.h \ + linux/sh64/userent.h \ + linux/signalent.h \ + linux/sock_diag.h \ + linux/sparc/arch_getrval2.c \ + linux/sparc/arch_regs.c \ + linux/sparc/arch_regs.h \ + linux/sparc/arch_sigreturn.c \ + linux/sparc/errnoent.h \ + linux/sparc/gen.pl \ + linux/sparc/get_error.c \ + linux/sparc/get_scno.c \ + linux/sparc/get_syscall_args.c \ + linux/sparc/ioctls_arch0.h \ + linux/sparc/ioctls_inc0.h \ + linux/sparc/set_error.c \ + linux/sparc/set_scno.c \ + linux/sparc/signalent.h \ + linux/sparc/syscallent.h \ + linux/sparc/userent.h \ + linux/sparc64/arch_getrval2.c \ + linux/sparc64/arch_regs.c \ + linux/sparc64/arch_regs.h \ + linux/sparc64/arch_sigreturn.c \ + linux/sparc64/errnoent.h \ + linux/sparc64/errnoent1.h \ + linux/sparc64/get_error.c \ + linux/sparc64/get_scno.c \ + linux/sparc64/get_syscall_args.c\ + linux/sparc64/ioctls_arch0.h \ + linux/sparc64/ioctls_arch1.h \ + linux/sparc64/ioctls_inc0.h \ + linux/sparc64/ioctls_inc1.h \ + linux/sparc64/set_error.c \ + linux/sparc64/set_scno.c \ + linux/sparc64/signalent.h \ + linux/sparc64/signalent1.h \ + linux/sparc64/syscallent.h \ + linux/sparc64/syscallent1.h \ + linux/sparc64/userent.h \ + linux/subcall.h \ + linux/syscall.h \ + linux/tile/arch_regs.c \ + linux/tile/arch_regs.h \ + linux/tile/arch_sigreturn.c \ + linux/tile/errnoent1.h \ + linux/tile/get_error.c \ + linux/tile/get_scno.c \ + linux/tile/get_syscall_args.c \ + linux/tile/ioctls_arch0.h \ + linux/tile/ioctls_arch1.h \ + linux/tile/ioctls_inc0.h \ + linux/tile/ioctls_inc1.h \ + linux/tile/set_error.c \ + linux/tile/set_scno.c \ + linux/tile/signalent1.h \ + linux/tile/syscallent.h \ + linux/tile/syscallent1.h \ + linux/tile/userent.h \ + linux/ubi-user.h \ + linux/unix_diag.h \ + linux/userent.h \ + linux/userent0.h \ + linux/x32/arch_regs.c \ + linux/x32/arch_regs.h \ + linux/x32/arch_sigreturn.c \ + linux/x32/errnoent1.h \ + linux/x32/get_error.c \ + linux/x32/get_scno.c \ + linux/x32/get_syscall_args.c \ + linux/x32/ioctls_arch0.h \ + linux/x32/ioctls_arch1.h \ + linux/x32/ioctls_inc0.h \ + linux/x32/ioctls_inc1.h \ + linux/x32/set_error.c \ + linux/x32/set_scno.c \ + linux/x32/signalent1.h \ + linux/x32/syscallent.h \ + linux/x32/syscallent1.h \ + linux/x32/userent.h \ + linux/x86_64/arch_regs.c \ + linux/x86_64/arch_regs.h \ + linux/x86_64/arch_sigreturn.c \ + linux/x86_64/errnoent1.h \ + linux/x86_64/errnoent2.h \ + linux/x86_64/gentab.pl \ + linux/x86_64/get_error.c \ + linux/x86_64/get_scno.c \ + linux/x86_64/get_syscall_args.c \ + linux/x86_64/getregs_old.c \ + linux/x86_64/getregs_old.h \ + linux/x86_64/ioctls_arch0.h \ + linux/x86_64/ioctls_arch1.h \ + linux/x86_64/ioctls_arch2.h \ + linux/x86_64/ioctls_inc0.h \ + linux/x86_64/ioctls_inc1.h \ + linux/x86_64/ioctls_inc2.h \ + linux/x86_64/set_error.c \ + linux/x86_64/set_scno.c \ + linux/x86_64/signalent1.h \ + linux/x86_64/signalent2.h \ + linux/x86_64/syscallent.h \ + linux/x86_64/syscallent1.h \ + linux/x86_64/syscallent2.h \ + linux/x86_64/userent.h \ + linux/xtensa/arch_regs.c \ + linux/xtensa/get_error.c \ + linux/xtensa/get_scno.c \ + linux/xtensa/get_syscall_args.c \ + linux/xtensa/get_syscall_result.c \ + linux/xtensa/ioctls_arch0.h \ + linux/xtensa/ioctls_inc0.h \ + linux/xtensa/set_error.c \ + linux/xtensa/set_scno.c \ + linux/xtensa/syscallent.h \ + linux/xtensa/userent.h \ + maint/ioctls_gen.sh \ + maint/ioctls_hex.sh \ + maint/ioctls_sym.sh \ + maint/print_ioctlent.c \ + mpers.awk \ + mpers.sh \ + mpers_test.sh \ + mpers_xlat.h \ + scno.head \ + signalent.sh \ + strace-graph \ + strace-log-merge \ + strace.spec \ + syscallent.sh \ + $(XLAT_INPUT_FILES) \ + $(XLAT_HEADER_FILES) \ + xlat/gen.sh \ + xlate.el + +strace_SOURCES_c = \ + $(filter %.c,$(strace_SOURCES)) $(filter %.c,$(libstrace_a_SOURCES)) + +syscallent_names = subcall.h syscallent.h syscallent1.h \ + syscallent-n32.h syscallent-n64.h syscallent-o32.h + +syscallent_patterns = $(patsubst %,\%/%,$(syscallent_names)) +syscallent_files = $(filter $(syscallent_patterns),$(EXTRA_DIST)) +today = $(shell date +%Y-%m-%d) +version_regexp = $(subst .,\.,$(VERSION)) +news_check_regexp = 'Noteworthy changes in release $(version_regexp) ($(today))' +ioctlsort_CC = $(CC_FOR_BUILD) +ioctlsort_DEFS = $(DEFS) +ioctlsort_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES) +ioctlsort_CPPFLAGS = $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) +ioctlsort_CFLAGS = $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) +ioctlsort_LDFLAGS = $(AM_LDFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) +ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h) +ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h)) +ioctl_redefs_h = $(filter-out ioctl_redefs0.h,$(subst ioctlent,ioctl_redefs,$(ioctlent_h))) +BUILT_SOURCES = $(ioctl_redefs_h) $(ioctlent_h) native_printer_decls.h \ + native_printer_defs.h printers.h sen.h sys_func.h .version \ + $(am__append_7) $(am__append_11) +CLEANFILES = $(ioctl_redefs_h) $(ioctlent_h) $(mpers_preproc_files) \ + ioctl_iocdef.h ioctl_iocdef.i native_printer_decls.h \ + native_printer_defs.h printers.h sen.h sys_func.h syscallent.i \ + scno.h $(am__append_8) $(am__append_12) +DISTCLEANFILES = gnu/stubs-32.h gnu/stubs-x32.h +SCNO_CPPFLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(ARCH_MFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) + +digits = [[:digit:]][[:digit:]]* +al_nums = [[:alnum:]_][[:alnum:]_]* +SCNO_SED = /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 + +# Generated by ./generate_mpers_am.sh; do not edit. +mpers_source_files = 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 + +# defines mpers_source_files +srcdir_mpers_source_files = $(patsubst %,$(srcdir)/%,$(mpers_source_files)) +mpers_preproc_files = $(mpers_source_files:.c=.c.mpers.i) +mpers_NAME = +mpers_PREFIX = $(mpers_NAME)_ +mpers_DEFS = $(DEFS) +mpers_INCLUDES = $(DEFAULT_INCLUDES) $(INCLUDES) +mpers_CPPFLAGS = $(strace_CPPFLAGS) $(CPPFLAGS) +mpers_sh_opts = $(mpers_DEFS) $(mpers_INCLUDES) $(mpers_CPPFLAGS) +libmpers_CPPFLAGS = $(strace_CPPFLAGS) -DIN_MPERS +libmpers_CFLAGS = $(strace_CFLAGS) +mpers_printer_decl_pattern = ^MPERS_PRINTER_DECL\(([^,)]+),[[:space:]]*([^,)]+),[[:space:]]*([^)]+)\)$$ +@HAVE_M32_MPERS_TRUE@libmpers_m32_a_SOURCES = $(mpers_source_files) +@HAVE_M32_MPERS_TRUE@libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32 +@HAVE_M32_MPERS_TRUE@libmpers_m32_a_CFLAGS = $(libmpers_CFLAGS) +@HAVE_M32_MPERS_TRUE@mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h +@HAVE_MX32_MPERS_TRUE@libmpers_mx32_a_SOURCES = $(mpers_source_files) +@HAVE_MX32_MPERS_TRUE@libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32 +@HAVE_MX32_MPERS_TRUE@libmpers_mx32_a_CFLAGS = $(libmpers_CFLAGS) +@HAVE_MX32_MPERS_TRUE@mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h +@MAINTAINER_MODE_TRUE@gen_changelog_start_date = 2009-07-08 20:00 +all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/xlat/Makemodule.am $(srcdir)/scno.am $(srcdir)/mpers.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/xlat/Makemodule.am $(srcdir)/scno.am $(srcdir)/mpers.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +strace.spec: $(top_builddir)/config.status $(srcdir)/strace.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +debian/changelog: $(top_builddir)/config.status $(top_srcdir)/debian/changelog.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +libmpers-m32.a: $(libmpers_m32_a_OBJECTS) $(libmpers_m32_a_DEPENDENCIES) $(EXTRA_libmpers_m32_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmpers-m32.a + $(AM_V_AR)$(libmpers_m32_a_AR) libmpers-m32.a $(libmpers_m32_a_OBJECTS) $(libmpers_m32_a_LIBADD) + $(AM_V_at)$(RANLIB) libmpers-m32.a + +libmpers-mx32.a: $(libmpers_mx32_a_OBJECTS) $(libmpers_mx32_a_DEPENDENCIES) $(EXTRA_libmpers_mx32_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmpers-mx32.a + $(AM_V_AR)$(libmpers_mx32_a_AR) libmpers-mx32.a $(libmpers_mx32_a_OBJECTS) $(libmpers_mx32_a_LIBADD) + $(AM_V_at)$(RANLIB) libmpers-mx32.a + +libstrace.a: $(libstrace_a_OBJECTS) $(libstrace_a_DEPENDENCIES) $(EXTRA_libstrace_a_DEPENDENCIES) + $(AM_V_at)-rm -f libstrace.a + $(AM_V_AR)$(libstrace_a_AR) libstrace.a $(libstrace_a_OBJECTS) $(libstrace_a_LIBADD) + $(AM_V_at)$(RANLIB) libstrace.a +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +strace$(EXEEXT): $(strace_OBJECTS) $(strace_DEPENDENCIES) $(EXTRA_strace_DEPENDENCIES) + @rm -f strace$(EXEEXT) + $(AM_V_CCLD)$(strace_LINK) $(strace_OBJECTS) $(strace_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-block.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-btrfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-dirent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-evdev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-hdio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-ipc_msgctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-ipc_shmctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-loop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-mtd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-print_mq_attr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-print_msgbuf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-print_sg_req_info.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-print_sigevent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-print_time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-print_timespec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-print_timeval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-print_timex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-printrusage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-printsiginfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-rtc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-sg_io_v3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-sigaltstack.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-sock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-sysinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-times.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-ustat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-utime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_m32_a-v4l2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-block.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-btrfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-dirent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-evdev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-hdio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-loop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-mtd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-print_mq_attr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-print_msgbuf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-print_sigevent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-print_time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-print_timespec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-print_timeval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-print_timex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-printrusage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-printsiginfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-rtc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-sg_io_v3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-sigaltstack.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-sock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-sysinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-times.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-ustat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-utime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmpers_mx32_a-v4l2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-fstatfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-fstatfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-ipc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-socketcall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-statfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-sync_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-sync_file_range2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-upeek.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstrace_a-upoke.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-access.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-affinity.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-aio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-alpha.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-bjm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-block.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-bpf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-btrfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-cacheflush.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-capability.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-chdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-chmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-clone.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-copy_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-count.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-desc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-dirent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-dirent64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-dm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-epoll.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-evdev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-eventfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-execve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fadvise.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fallocate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fanotify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fchownat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fcntl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fetch_seccomp_fprog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fetch_struct_flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fetch_struct_mmsghdr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fetch_struct_msghdr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fetch_struct_stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fetch_struct_stat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fetch_struct_statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-file_handle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-file_ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-fs_x_ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-futex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-get_robust_list.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-getcpu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-getcwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-getrandom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-hdio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-hostname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-inotify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-io.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ioperm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-iopl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ioprio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ipc_msg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ipc_msgctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ipc_sem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ipc_shm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ipc_shmctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-kcmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-kexec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-keyctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ldt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-link.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-lookup_dcookie.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-loop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-lseek.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-mem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-membarrier.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-memfd_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-mknod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-mmsghdr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-mount.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-mq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-msghdr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-mtd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-net.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-netlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-numa.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-oldstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-open.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-or1k_atomic.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-pathtrace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-perf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-personality.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-pkeys.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-poll.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-prctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_dev_t.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_mq_attr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_msgbuf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_sg_req_info.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_sigevent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_struct_stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_timespec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_timeval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-print_timex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-printmode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-printrusage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-printsiginfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-process.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-process_vm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ptp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-qualify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-quota.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-readahead.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-readlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-reboot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-renameat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-resource.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-rtc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sched.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-scsi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-seccomp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sendfile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sg_io_v3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sg_io_v4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sigaltstack.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-signal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-signalfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sigreturn.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sockaddr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-socketutils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sram_alloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-stat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-strace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-swapon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-syscall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sysctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sysinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-syslog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-sysmips.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-term.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-times.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-truncate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ubi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-uid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-uid16.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-umask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-umount.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-uname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-unwind.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-userfaultfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-ustat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-utime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-utimes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-v4l2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-wait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-xattr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strace-xmalloc.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +libmpers_m32_a-block.o: block.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-block.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-block.Tpo -c -o libmpers_m32_a-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-block.Tpo $(DEPDIR)/libmpers_m32_a-block.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='block.c' object='libmpers_m32_a-block.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c + +libmpers_m32_a-block.obj: block.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-block.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-block.Tpo -c -o libmpers_m32_a-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-block.Tpo $(DEPDIR)/libmpers_m32_a-block.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='block.c' object='libmpers_m32_a-block.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` + +libmpers_m32_a-btrfs.o: btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-btrfs.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-btrfs.Tpo -c -o libmpers_m32_a-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-btrfs.Tpo $(DEPDIR)/libmpers_m32_a-btrfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='btrfs.c' object='libmpers_m32_a-btrfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c + +libmpers_m32_a-btrfs.obj: btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-btrfs.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-btrfs.Tpo -c -o libmpers_m32_a-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-btrfs.Tpo $(DEPDIR)/libmpers_m32_a-btrfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='btrfs.c' object='libmpers_m32_a-btrfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` + +libmpers_m32_a-dirent.o: dirent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-dirent.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-dirent.Tpo -c -o libmpers_m32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-dirent.Tpo $(DEPDIR)/libmpers_m32_a-dirent.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent.c' object='libmpers_m32_a-dirent.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c + +libmpers_m32_a-dirent.obj: dirent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-dirent.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-dirent.Tpo -c -o libmpers_m32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-dirent.Tpo $(DEPDIR)/libmpers_m32_a-dirent.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent.c' object='libmpers_m32_a-dirent.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` + +libmpers_m32_a-evdev.o: evdev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-evdev.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-evdev.Tpo -c -o libmpers_m32_a-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-evdev.Tpo $(DEPDIR)/libmpers_m32_a-evdev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evdev.c' object='libmpers_m32_a-evdev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c + +libmpers_m32_a-evdev.obj: evdev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-evdev.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-evdev.Tpo -c -o libmpers_m32_a-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-evdev.Tpo $(DEPDIR)/libmpers_m32_a-evdev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evdev.c' object='libmpers_m32_a-evdev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` + +libmpers_m32_a-fetch_seccomp_fprog.o: fetch_seccomp_fprog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_seccomp_fprog.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_m32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_seccomp_fprog.c' object='libmpers_m32_a-fetch_seccomp_fprog.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c + +libmpers_m32_a-fetch_seccomp_fprog.obj: fetch_seccomp_fprog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_seccomp_fprog.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_m32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Tpo $(DEPDIR)/libmpers_m32_a-fetch_seccomp_fprog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_seccomp_fprog.c' object='libmpers_m32_a-fetch_seccomp_fprog.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` + +libmpers_m32_a-fetch_struct_flock.o: fetch_struct_flock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_flock.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo -c -o libmpers_m32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_flock.c' object='libmpers_m32_a-fetch_struct_flock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c + +libmpers_m32_a-fetch_struct_flock.obj: fetch_struct_flock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_flock.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo -c -o libmpers_m32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_flock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_flock.c' object='libmpers_m32_a-fetch_struct_flock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` + +libmpers_m32_a-fetch_struct_mmsghdr.o: fetch_struct_mmsghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_mmsghdr.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Tpo -c -o libmpers_m32_a-fetch_struct_mmsghdr.o `test -f 'fetch_struct_mmsghdr.c' || echo '$(srcdir)/'`fetch_struct_mmsghdr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_mmsghdr.c' object='libmpers_m32_a-fetch_struct_mmsghdr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_mmsghdr.o `test -f 'fetch_struct_mmsghdr.c' || echo '$(srcdir)/'`fetch_struct_mmsghdr.c + +libmpers_m32_a-fetch_struct_mmsghdr.obj: fetch_struct_mmsghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_mmsghdr.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Tpo -c -o libmpers_m32_a-fetch_struct_mmsghdr.obj `if test -f 'fetch_struct_mmsghdr.c'; then $(CYGPATH_W) 'fetch_struct_mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_mmsghdr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_mmsghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_mmsghdr.c' object='libmpers_m32_a-fetch_struct_mmsghdr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_mmsghdr.obj `if test -f 'fetch_struct_mmsghdr.c'; then $(CYGPATH_W) 'fetch_struct_mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_mmsghdr.c'; fi` + +libmpers_m32_a-fetch_struct_msghdr.o: fetch_struct_msghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_msghdr.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Tpo -c -o libmpers_m32_a-fetch_struct_msghdr.o `test -f 'fetch_struct_msghdr.c' || echo '$(srcdir)/'`fetch_struct_msghdr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_msghdr.c' object='libmpers_m32_a-fetch_struct_msghdr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_msghdr.o `test -f 'fetch_struct_msghdr.c' || echo '$(srcdir)/'`fetch_struct_msghdr.c + +libmpers_m32_a-fetch_struct_msghdr.obj: fetch_struct_msghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_msghdr.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Tpo -c -o libmpers_m32_a-fetch_struct_msghdr.obj `if test -f 'fetch_struct_msghdr.c'; then $(CYGPATH_W) 'fetch_struct_msghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_msghdr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_msghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_msghdr.c' object='libmpers_m32_a-fetch_struct_msghdr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_msghdr.obj `if test -f 'fetch_struct_msghdr.c'; then $(CYGPATH_W) 'fetch_struct_msghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_msghdr.c'; fi` + +libmpers_m32_a-fetch_struct_stat.o: fetch_struct_stat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_stat.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Tpo -c -o libmpers_m32_a-fetch_struct_stat.o `test -f 'fetch_struct_stat.c' || echo '$(srcdir)/'`fetch_struct_stat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_stat.c' object='libmpers_m32_a-fetch_struct_stat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_stat.o `test -f 'fetch_struct_stat.c' || echo '$(srcdir)/'`fetch_struct_stat.c + +libmpers_m32_a-fetch_struct_stat.obj: fetch_struct_stat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_stat.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Tpo -c -o libmpers_m32_a-fetch_struct_stat.obj `if test -f 'fetch_struct_stat.c'; then $(CYGPATH_W) 'fetch_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_stat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_stat.c' object='libmpers_m32_a-fetch_struct_stat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_stat.obj `if test -f 'fetch_struct_stat.c'; then $(CYGPATH_W) 'fetch_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat.c'; fi` + +libmpers_m32_a-fetch_struct_stat64.o: fetch_struct_stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_stat64.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Tpo -c -o libmpers_m32_a-fetch_struct_stat64.o `test -f 'fetch_struct_stat64.c' || echo '$(srcdir)/'`fetch_struct_stat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_stat64.c' object='libmpers_m32_a-fetch_struct_stat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_stat64.o `test -f 'fetch_struct_stat64.c' || echo '$(srcdir)/'`fetch_struct_stat64.c + +libmpers_m32_a-fetch_struct_stat64.obj: fetch_struct_stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_stat64.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Tpo -c -o libmpers_m32_a-fetch_struct_stat64.obj `if test -f 'fetch_struct_stat64.c'; then $(CYGPATH_W) 'fetch_struct_stat64.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_stat64.c' object='libmpers_m32_a-fetch_struct_stat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_stat64.obj `if test -f 'fetch_struct_stat64.c'; then $(CYGPATH_W) 'fetch_struct_stat64.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat64.c'; fi` + +libmpers_m32_a-fetch_struct_statfs.o: fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_statfs.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Tpo -c -o libmpers_m32_a-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_statfs.c' object='libmpers_m32_a-fetch_struct_statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c + +libmpers_m32_a-fetch_struct_statfs.obj: fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-fetch_struct_statfs.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Tpo -c -o libmpers_m32_a-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Tpo $(DEPDIR)/libmpers_m32_a-fetch_struct_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_statfs.c' object='libmpers_m32_a-fetch_struct_statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` + +libmpers_m32_a-hdio.o: hdio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-hdio.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-hdio.Tpo -c -o libmpers_m32_a-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-hdio.Tpo $(DEPDIR)/libmpers_m32_a-hdio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdio.c' object='libmpers_m32_a-hdio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c + +libmpers_m32_a-hdio.obj: hdio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-hdio.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-hdio.Tpo -c -o libmpers_m32_a-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-hdio.Tpo $(DEPDIR)/libmpers_m32_a-hdio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdio.c' object='libmpers_m32_a-hdio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` + +libmpers_m32_a-ipc_msgctl.o: ipc_msgctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_msgctl.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo -c -o libmpers_m32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msgctl.c' object='libmpers_m32_a-ipc_msgctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c + +libmpers_m32_a-ipc_msgctl.obj: ipc_msgctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_msgctl.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo -c -o libmpers_m32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Tpo $(DEPDIR)/libmpers_m32_a-ipc_msgctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msgctl.c' object='libmpers_m32_a-ipc_msgctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` + +libmpers_m32_a-ipc_shmctl.o: ipc_shmctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_shmctl.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo -c -o libmpers_m32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shmctl.c' object='libmpers_m32_a-ipc_shmctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c + +libmpers_m32_a-ipc_shmctl.obj: ipc_shmctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ipc_shmctl.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo -c -o libmpers_m32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Tpo $(DEPDIR)/libmpers_m32_a-ipc_shmctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shmctl.c' object='libmpers_m32_a-ipc_shmctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` + +libmpers_m32_a-loop.o: loop.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-loop.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-loop.Tpo -c -o libmpers_m32_a-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-loop.Tpo $(DEPDIR)/libmpers_m32_a-loop.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loop.c' object='libmpers_m32_a-loop.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c + +libmpers_m32_a-loop.obj: loop.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-loop.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-loop.Tpo -c -o libmpers_m32_a-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-loop.Tpo $(DEPDIR)/libmpers_m32_a-loop.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loop.c' object='libmpers_m32_a-loop.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` + +libmpers_m32_a-mtd.o: mtd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-mtd.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-mtd.Tpo -c -o libmpers_m32_a-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-mtd.Tpo $(DEPDIR)/libmpers_m32_a-mtd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mtd.c' object='libmpers_m32_a-mtd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c + +libmpers_m32_a-mtd.obj: mtd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-mtd.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-mtd.Tpo -c -o libmpers_m32_a-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-mtd.Tpo $(DEPDIR)/libmpers_m32_a-mtd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mtd.c' object='libmpers_m32_a-mtd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` + +libmpers_m32_a-print_mq_attr.o: print_mq_attr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_mq_attr.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo -c -o libmpers_m32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo $(DEPDIR)/libmpers_m32_a-print_mq_attr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_mq_attr.c' object='libmpers_m32_a-print_mq_attr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c + +libmpers_m32_a-print_mq_attr.obj: print_mq_attr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_mq_attr.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo -c -o libmpers_m32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_mq_attr.Tpo $(DEPDIR)/libmpers_m32_a-print_mq_attr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_mq_attr.c' object='libmpers_m32_a-print_mq_attr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` + +libmpers_m32_a-print_msgbuf.o: print_msgbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_msgbuf.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo -c -o libmpers_m32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo $(DEPDIR)/libmpers_m32_a-print_msgbuf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_msgbuf.c' object='libmpers_m32_a-print_msgbuf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c + +libmpers_m32_a-print_msgbuf.obj: print_msgbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_msgbuf.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo -c -o libmpers_m32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_msgbuf.Tpo $(DEPDIR)/libmpers_m32_a-print_msgbuf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_msgbuf.c' object='libmpers_m32_a-print_msgbuf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` + +libmpers_m32_a-print_sg_req_info.o: print_sg_req_info.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_sg_req_info.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_sg_req_info.Tpo -c -o libmpers_m32_a-print_sg_req_info.o `test -f 'print_sg_req_info.c' || echo '$(srcdir)/'`print_sg_req_info.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_sg_req_info.Tpo $(DEPDIR)/libmpers_m32_a-print_sg_req_info.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sg_req_info.c' object='libmpers_m32_a-print_sg_req_info.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_sg_req_info.o `test -f 'print_sg_req_info.c' || echo '$(srcdir)/'`print_sg_req_info.c + +libmpers_m32_a-print_sg_req_info.obj: print_sg_req_info.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_sg_req_info.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_sg_req_info.Tpo -c -o libmpers_m32_a-print_sg_req_info.obj `if test -f 'print_sg_req_info.c'; then $(CYGPATH_W) 'print_sg_req_info.c'; else $(CYGPATH_W) '$(srcdir)/print_sg_req_info.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_sg_req_info.Tpo $(DEPDIR)/libmpers_m32_a-print_sg_req_info.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sg_req_info.c' object='libmpers_m32_a-print_sg_req_info.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_sg_req_info.obj `if test -f 'print_sg_req_info.c'; then $(CYGPATH_W) 'print_sg_req_info.c'; else $(CYGPATH_W) '$(srcdir)/print_sg_req_info.c'; fi` + +libmpers_m32_a-print_sigevent.o: print_sigevent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_sigevent.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo -c -o libmpers_m32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo $(DEPDIR)/libmpers_m32_a-print_sigevent.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sigevent.c' object='libmpers_m32_a-print_sigevent.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c + +libmpers_m32_a-print_sigevent.obj: print_sigevent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_sigevent.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo -c -o libmpers_m32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_sigevent.Tpo $(DEPDIR)/libmpers_m32_a-print_sigevent.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sigevent.c' object='libmpers_m32_a-print_sigevent.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` + +libmpers_m32_a-print_time.o: print_time.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_time.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_time.Tpo -c -o libmpers_m32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_time.Tpo $(DEPDIR)/libmpers_m32_a-print_time.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_time.c' object='libmpers_m32_a-print_time.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c + +libmpers_m32_a-print_time.obj: print_time.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_time.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_time.Tpo -c -o libmpers_m32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_time.Tpo $(DEPDIR)/libmpers_m32_a-print_time.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_time.c' object='libmpers_m32_a-print_time.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` + +libmpers_m32_a-print_timespec.o: print_timespec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timespec.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timespec.Tpo -c -o libmpers_m32_a-print_timespec.o `test -f 'print_timespec.c' || echo '$(srcdir)/'`print_timespec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timespec.Tpo $(DEPDIR)/libmpers_m32_a-print_timespec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timespec.c' object='libmpers_m32_a-print_timespec.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timespec.o `test -f 'print_timespec.c' || echo '$(srcdir)/'`print_timespec.c + +libmpers_m32_a-print_timespec.obj: print_timespec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timespec.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timespec.Tpo -c -o libmpers_m32_a-print_timespec.obj `if test -f 'print_timespec.c'; then $(CYGPATH_W) 'print_timespec.c'; else $(CYGPATH_W) '$(srcdir)/print_timespec.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timespec.Tpo $(DEPDIR)/libmpers_m32_a-print_timespec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timespec.c' object='libmpers_m32_a-print_timespec.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timespec.obj `if test -f 'print_timespec.c'; then $(CYGPATH_W) 'print_timespec.c'; else $(CYGPATH_W) '$(srcdir)/print_timespec.c'; fi` + +libmpers_m32_a-print_timeval.o: print_timeval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timeval.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timeval.Tpo -c -o libmpers_m32_a-print_timeval.o `test -f 'print_timeval.c' || echo '$(srcdir)/'`print_timeval.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timeval.Tpo $(DEPDIR)/libmpers_m32_a-print_timeval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timeval.c' object='libmpers_m32_a-print_timeval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timeval.o `test -f 'print_timeval.c' || echo '$(srcdir)/'`print_timeval.c + +libmpers_m32_a-print_timeval.obj: print_timeval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timeval.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timeval.Tpo -c -o libmpers_m32_a-print_timeval.obj `if test -f 'print_timeval.c'; then $(CYGPATH_W) 'print_timeval.c'; else $(CYGPATH_W) '$(srcdir)/print_timeval.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timeval.Tpo $(DEPDIR)/libmpers_m32_a-print_timeval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timeval.c' object='libmpers_m32_a-print_timeval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timeval.obj `if test -f 'print_timeval.c'; then $(CYGPATH_W) 'print_timeval.c'; else $(CYGPATH_W) '$(srcdir)/print_timeval.c'; fi` + +libmpers_m32_a-print_timex.o: print_timex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timex.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timex.Tpo -c -o libmpers_m32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timex.Tpo $(DEPDIR)/libmpers_m32_a-print_timex.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timex.c' object='libmpers_m32_a-print_timex.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c + +libmpers_m32_a-print_timex.obj: print_timex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-print_timex.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-print_timex.Tpo -c -o libmpers_m32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-print_timex.Tpo $(DEPDIR)/libmpers_m32_a-print_timex.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timex.c' object='libmpers_m32_a-print_timex.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` + +libmpers_m32_a-printrusage.o: printrusage.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printrusage.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printrusage.Tpo -c -o libmpers_m32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-printrusage.Tpo $(DEPDIR)/libmpers_m32_a-printrusage.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printrusage.c' object='libmpers_m32_a-printrusage.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c + +libmpers_m32_a-printrusage.obj: printrusage.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printrusage.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printrusage.Tpo -c -o libmpers_m32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-printrusage.Tpo $(DEPDIR)/libmpers_m32_a-printrusage.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printrusage.c' object='libmpers_m32_a-printrusage.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` + +libmpers_m32_a-printsiginfo.o: printsiginfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printsiginfo.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo -c -o libmpers_m32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo $(DEPDIR)/libmpers_m32_a-printsiginfo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printsiginfo.c' object='libmpers_m32_a-printsiginfo.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c + +libmpers_m32_a-printsiginfo.obj: printsiginfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-printsiginfo.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo -c -o libmpers_m32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-printsiginfo.Tpo $(DEPDIR)/libmpers_m32_a-printsiginfo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printsiginfo.c' object='libmpers_m32_a-printsiginfo.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` + +libmpers_m32_a-rtc.o: rtc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-rtc.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-rtc.Tpo -c -o libmpers_m32_a-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-rtc.Tpo $(DEPDIR)/libmpers_m32_a-rtc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtc.c' object='libmpers_m32_a-rtc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c + +libmpers_m32_a-rtc.obj: rtc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-rtc.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-rtc.Tpo -c -o libmpers_m32_a-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-rtc.Tpo $(DEPDIR)/libmpers_m32_a-rtc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtc.c' object='libmpers_m32_a-rtc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` + +libmpers_m32_a-sg_io_v3.o: sg_io_v3.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sg_io_v3.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sg_io_v3.Tpo -c -o libmpers_m32_a-sg_io_v3.o `test -f 'sg_io_v3.c' || echo '$(srcdir)/'`sg_io_v3.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sg_io_v3.Tpo $(DEPDIR)/libmpers_m32_a-sg_io_v3.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sg_io_v3.c' object='libmpers_m32_a-sg_io_v3.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sg_io_v3.o `test -f 'sg_io_v3.c' || echo '$(srcdir)/'`sg_io_v3.c + +libmpers_m32_a-sg_io_v3.obj: sg_io_v3.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sg_io_v3.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sg_io_v3.Tpo -c -o libmpers_m32_a-sg_io_v3.obj `if test -f 'sg_io_v3.c'; then $(CYGPATH_W) 'sg_io_v3.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v3.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sg_io_v3.Tpo $(DEPDIR)/libmpers_m32_a-sg_io_v3.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sg_io_v3.c' object='libmpers_m32_a-sg_io_v3.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sg_io_v3.obj `if test -f 'sg_io_v3.c'; then $(CYGPATH_W) 'sg_io_v3.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v3.c'; fi` + +libmpers_m32_a-sigaltstack.o: sigaltstack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sigaltstack.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo -c -o libmpers_m32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo $(DEPDIR)/libmpers_m32_a-sigaltstack.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigaltstack.c' object='libmpers_m32_a-sigaltstack.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c + +libmpers_m32_a-sigaltstack.obj: sigaltstack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sigaltstack.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo -c -o libmpers_m32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sigaltstack.Tpo $(DEPDIR)/libmpers_m32_a-sigaltstack.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigaltstack.c' object='libmpers_m32_a-sigaltstack.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` + +libmpers_m32_a-sock.o: sock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sock.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sock.Tpo -c -o libmpers_m32_a-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sock.Tpo $(DEPDIR)/libmpers_m32_a-sock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sock.c' object='libmpers_m32_a-sock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c + +libmpers_m32_a-sock.obj: sock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sock.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sock.Tpo -c -o libmpers_m32_a-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sock.Tpo $(DEPDIR)/libmpers_m32_a-sock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sock.c' object='libmpers_m32_a-sock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` + +libmpers_m32_a-sysinfo.o: sysinfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sysinfo.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo -c -o libmpers_m32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo $(DEPDIR)/libmpers_m32_a-sysinfo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysinfo.c' object='libmpers_m32_a-sysinfo.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c + +libmpers_m32_a-sysinfo.obj: sysinfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-sysinfo.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo -c -o libmpers_m32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-sysinfo.Tpo $(DEPDIR)/libmpers_m32_a-sysinfo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysinfo.c' object='libmpers_m32_a-sysinfo.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` + +libmpers_m32_a-times.o: times.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-times.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-times.Tpo -c -o libmpers_m32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-times.Tpo $(DEPDIR)/libmpers_m32_a-times.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='times.c' object='libmpers_m32_a-times.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c + +libmpers_m32_a-times.obj: times.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-times.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-times.Tpo -c -o libmpers_m32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-times.Tpo $(DEPDIR)/libmpers_m32_a-times.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='times.c' object='libmpers_m32_a-times.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` + +libmpers_m32_a-ustat.o: ustat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ustat.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ustat.Tpo -c -o libmpers_m32_a-ustat.o `test -f 'ustat.c' || echo '$(srcdir)/'`ustat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ustat.Tpo $(DEPDIR)/libmpers_m32_a-ustat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ustat.c' object='libmpers_m32_a-ustat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ustat.o `test -f 'ustat.c' || echo '$(srcdir)/'`ustat.c + +libmpers_m32_a-ustat.obj: ustat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-ustat.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-ustat.Tpo -c -o libmpers_m32_a-ustat.obj `if test -f 'ustat.c'; then $(CYGPATH_W) 'ustat.c'; else $(CYGPATH_W) '$(srcdir)/ustat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-ustat.Tpo $(DEPDIR)/libmpers_m32_a-ustat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ustat.c' object='libmpers_m32_a-ustat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-ustat.obj `if test -f 'ustat.c'; then $(CYGPATH_W) 'ustat.c'; else $(CYGPATH_W) '$(srcdir)/ustat.c'; fi` + +libmpers_m32_a-utime.o: utime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-utime.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-utime.Tpo -c -o libmpers_m32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-utime.Tpo $(DEPDIR)/libmpers_m32_a-utime.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utime.c' object='libmpers_m32_a-utime.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c + +libmpers_m32_a-utime.obj: utime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-utime.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-utime.Tpo -c -o libmpers_m32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-utime.Tpo $(DEPDIR)/libmpers_m32_a-utime.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utime.c' object='libmpers_m32_a-utime.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` + +libmpers_m32_a-v4l2.o: v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-v4l2.o -MD -MP -MF $(DEPDIR)/libmpers_m32_a-v4l2.Tpo -c -o libmpers_m32_a-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-v4l2.Tpo $(DEPDIR)/libmpers_m32_a-v4l2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2.c' object='libmpers_m32_a-v4l2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c + +libmpers_m32_a-v4l2.obj: v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -MT libmpers_m32_a-v4l2.obj -MD -MP -MF $(DEPDIR)/libmpers_m32_a-v4l2.Tpo -c -o libmpers_m32_a-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_m32_a-v4l2.Tpo $(DEPDIR)/libmpers_m32_a-v4l2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2.c' object='libmpers_m32_a-v4l2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_m32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_m32_a_CFLAGS) $(CFLAGS) -c -o libmpers_m32_a-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` + +libmpers_mx32_a-block.o: block.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-block.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-block.Tpo -c -o libmpers_mx32_a-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-block.Tpo $(DEPDIR)/libmpers_mx32_a-block.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='block.c' object='libmpers_mx32_a-block.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c + +libmpers_mx32_a-block.obj: block.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-block.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-block.Tpo -c -o libmpers_mx32_a-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-block.Tpo $(DEPDIR)/libmpers_mx32_a-block.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='block.c' object='libmpers_mx32_a-block.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` + +libmpers_mx32_a-btrfs.o: btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-btrfs.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-btrfs.Tpo -c -o libmpers_mx32_a-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-btrfs.Tpo $(DEPDIR)/libmpers_mx32_a-btrfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='btrfs.c' object='libmpers_mx32_a-btrfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c + +libmpers_mx32_a-btrfs.obj: btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-btrfs.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-btrfs.Tpo -c -o libmpers_mx32_a-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-btrfs.Tpo $(DEPDIR)/libmpers_mx32_a-btrfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='btrfs.c' object='libmpers_mx32_a-btrfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` + +libmpers_mx32_a-dirent.o: dirent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-dirent.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-dirent.Tpo -c -o libmpers_mx32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-dirent.Tpo $(DEPDIR)/libmpers_mx32_a-dirent.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent.c' object='libmpers_mx32_a-dirent.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c + +libmpers_mx32_a-dirent.obj: dirent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-dirent.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-dirent.Tpo -c -o libmpers_mx32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-dirent.Tpo $(DEPDIR)/libmpers_mx32_a-dirent.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent.c' object='libmpers_mx32_a-dirent.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` + +libmpers_mx32_a-evdev.o: evdev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-evdev.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-evdev.Tpo -c -o libmpers_mx32_a-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-evdev.Tpo $(DEPDIR)/libmpers_mx32_a-evdev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evdev.c' object='libmpers_mx32_a-evdev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c + +libmpers_mx32_a-evdev.obj: evdev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-evdev.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-evdev.Tpo -c -o libmpers_mx32_a-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-evdev.Tpo $(DEPDIR)/libmpers_mx32_a-evdev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evdev.c' object='libmpers_mx32_a-evdev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` + +libmpers_mx32_a-fetch_seccomp_fprog.o: fetch_seccomp_fprog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_seccomp_fprog.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_mx32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_seccomp_fprog.c' object='libmpers_mx32_a-fetch_seccomp_fprog.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c + +libmpers_mx32_a-fetch_seccomp_fprog.obj: fetch_seccomp_fprog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_seccomp_fprog.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo -c -o libmpers_mx32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_seccomp_fprog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_seccomp_fprog.c' object='libmpers_mx32_a-fetch_seccomp_fprog.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` + +libmpers_mx32_a-fetch_struct_flock.o: fetch_struct_flock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_flock.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo -c -o libmpers_mx32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_flock.c' object='libmpers_mx32_a-fetch_struct_flock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c + +libmpers_mx32_a-fetch_struct_flock.obj: fetch_struct_flock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_flock.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo -c -o libmpers_mx32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_flock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_flock.c' object='libmpers_mx32_a-fetch_struct_flock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` + +libmpers_mx32_a-fetch_struct_mmsghdr.o: fetch_struct_mmsghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_mmsghdr.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Tpo -c -o libmpers_mx32_a-fetch_struct_mmsghdr.o `test -f 'fetch_struct_mmsghdr.c' || echo '$(srcdir)/'`fetch_struct_mmsghdr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_mmsghdr.c' object='libmpers_mx32_a-fetch_struct_mmsghdr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_mmsghdr.o `test -f 'fetch_struct_mmsghdr.c' || echo '$(srcdir)/'`fetch_struct_mmsghdr.c + +libmpers_mx32_a-fetch_struct_mmsghdr.obj: fetch_struct_mmsghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_mmsghdr.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Tpo -c -o libmpers_mx32_a-fetch_struct_mmsghdr.obj `if test -f 'fetch_struct_mmsghdr.c'; then $(CYGPATH_W) 'fetch_struct_mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_mmsghdr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_mmsghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_mmsghdr.c' object='libmpers_mx32_a-fetch_struct_mmsghdr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_mmsghdr.obj `if test -f 'fetch_struct_mmsghdr.c'; then $(CYGPATH_W) 'fetch_struct_mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_mmsghdr.c'; fi` + +libmpers_mx32_a-fetch_struct_msghdr.o: fetch_struct_msghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_msghdr.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Tpo -c -o libmpers_mx32_a-fetch_struct_msghdr.o `test -f 'fetch_struct_msghdr.c' || echo '$(srcdir)/'`fetch_struct_msghdr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_msghdr.c' object='libmpers_mx32_a-fetch_struct_msghdr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_msghdr.o `test -f 'fetch_struct_msghdr.c' || echo '$(srcdir)/'`fetch_struct_msghdr.c + +libmpers_mx32_a-fetch_struct_msghdr.obj: fetch_struct_msghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_msghdr.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Tpo -c -o libmpers_mx32_a-fetch_struct_msghdr.obj `if test -f 'fetch_struct_msghdr.c'; then $(CYGPATH_W) 'fetch_struct_msghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_msghdr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_msghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_msghdr.c' object='libmpers_mx32_a-fetch_struct_msghdr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_msghdr.obj `if test -f 'fetch_struct_msghdr.c'; then $(CYGPATH_W) 'fetch_struct_msghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_msghdr.c'; fi` + +libmpers_mx32_a-fetch_struct_stat.o: fetch_struct_stat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_stat.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Tpo -c -o libmpers_mx32_a-fetch_struct_stat.o `test -f 'fetch_struct_stat.c' || echo '$(srcdir)/'`fetch_struct_stat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_stat.c' object='libmpers_mx32_a-fetch_struct_stat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_stat.o `test -f 'fetch_struct_stat.c' || echo '$(srcdir)/'`fetch_struct_stat.c + +libmpers_mx32_a-fetch_struct_stat.obj: fetch_struct_stat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_stat.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Tpo -c -o libmpers_mx32_a-fetch_struct_stat.obj `if test -f 'fetch_struct_stat.c'; then $(CYGPATH_W) 'fetch_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_stat.c' object='libmpers_mx32_a-fetch_struct_stat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_stat.obj `if test -f 'fetch_struct_stat.c'; then $(CYGPATH_W) 'fetch_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat.c'; fi` + +libmpers_mx32_a-fetch_struct_stat64.o: fetch_struct_stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_stat64.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Tpo -c -o libmpers_mx32_a-fetch_struct_stat64.o `test -f 'fetch_struct_stat64.c' || echo '$(srcdir)/'`fetch_struct_stat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_stat64.c' object='libmpers_mx32_a-fetch_struct_stat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_stat64.o `test -f 'fetch_struct_stat64.c' || echo '$(srcdir)/'`fetch_struct_stat64.c + +libmpers_mx32_a-fetch_struct_stat64.obj: fetch_struct_stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_stat64.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Tpo -c -o libmpers_mx32_a-fetch_struct_stat64.obj `if test -f 'fetch_struct_stat64.c'; then $(CYGPATH_W) 'fetch_struct_stat64.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_stat64.c' object='libmpers_mx32_a-fetch_struct_stat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_stat64.obj `if test -f 'fetch_struct_stat64.c'; then $(CYGPATH_W) 'fetch_struct_stat64.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat64.c'; fi` + +libmpers_mx32_a-fetch_struct_statfs.o: fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_statfs.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Tpo -c -o libmpers_mx32_a-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_statfs.c' object='libmpers_mx32_a-fetch_struct_statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c + +libmpers_mx32_a-fetch_struct_statfs.obj: fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-fetch_struct_statfs.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Tpo -c -o libmpers_mx32_a-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Tpo $(DEPDIR)/libmpers_mx32_a-fetch_struct_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_statfs.c' object='libmpers_mx32_a-fetch_struct_statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` + +libmpers_mx32_a-hdio.o: hdio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-hdio.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-hdio.Tpo -c -o libmpers_mx32_a-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-hdio.Tpo $(DEPDIR)/libmpers_mx32_a-hdio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdio.c' object='libmpers_mx32_a-hdio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c + +libmpers_mx32_a-hdio.obj: hdio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-hdio.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-hdio.Tpo -c -o libmpers_mx32_a-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-hdio.Tpo $(DEPDIR)/libmpers_mx32_a-hdio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdio.c' object='libmpers_mx32_a-hdio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` + +libmpers_mx32_a-ipc_msgctl.o: ipc_msgctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_msgctl.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo -c -o libmpers_mx32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msgctl.c' object='libmpers_mx32_a-ipc_msgctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c + +libmpers_mx32_a-ipc_msgctl.obj: ipc_msgctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_msgctl.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo -c -o libmpers_mx32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Tpo $(DEPDIR)/libmpers_mx32_a-ipc_msgctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msgctl.c' object='libmpers_mx32_a-ipc_msgctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` + +libmpers_mx32_a-ipc_shmctl.o: ipc_shmctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_shmctl.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo -c -o libmpers_mx32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shmctl.c' object='libmpers_mx32_a-ipc_shmctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c + +libmpers_mx32_a-ipc_shmctl.obj: ipc_shmctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ipc_shmctl.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo -c -o libmpers_mx32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Tpo $(DEPDIR)/libmpers_mx32_a-ipc_shmctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shmctl.c' object='libmpers_mx32_a-ipc_shmctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` + +libmpers_mx32_a-loop.o: loop.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-loop.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-loop.Tpo -c -o libmpers_mx32_a-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-loop.Tpo $(DEPDIR)/libmpers_mx32_a-loop.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loop.c' object='libmpers_mx32_a-loop.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c + +libmpers_mx32_a-loop.obj: loop.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-loop.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-loop.Tpo -c -o libmpers_mx32_a-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-loop.Tpo $(DEPDIR)/libmpers_mx32_a-loop.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loop.c' object='libmpers_mx32_a-loop.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` + +libmpers_mx32_a-mtd.o: mtd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-mtd.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-mtd.Tpo -c -o libmpers_mx32_a-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-mtd.Tpo $(DEPDIR)/libmpers_mx32_a-mtd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mtd.c' object='libmpers_mx32_a-mtd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c + +libmpers_mx32_a-mtd.obj: mtd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-mtd.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-mtd.Tpo -c -o libmpers_mx32_a-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-mtd.Tpo $(DEPDIR)/libmpers_mx32_a-mtd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mtd.c' object='libmpers_mx32_a-mtd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` + +libmpers_mx32_a-print_mq_attr.o: print_mq_attr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_mq_attr.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo -c -o libmpers_mx32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_mq_attr.c' object='libmpers_mx32_a-print_mq_attr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c + +libmpers_mx32_a-print_mq_attr.obj: print_mq_attr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_mq_attr.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo -c -o libmpers_mx32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Tpo $(DEPDIR)/libmpers_mx32_a-print_mq_attr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_mq_attr.c' object='libmpers_mx32_a-print_mq_attr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` + +libmpers_mx32_a-print_msgbuf.o: print_msgbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_msgbuf.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo -c -o libmpers_mx32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_msgbuf.c' object='libmpers_mx32_a-print_msgbuf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c + +libmpers_mx32_a-print_msgbuf.obj: print_msgbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_msgbuf.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo -c -o libmpers_mx32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Tpo $(DEPDIR)/libmpers_mx32_a-print_msgbuf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_msgbuf.c' object='libmpers_mx32_a-print_msgbuf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` + +libmpers_mx32_a-print_sg_req_info.o: print_sg_req_info.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_sg_req_info.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Tpo -c -o libmpers_mx32_a-print_sg_req_info.o `test -f 'print_sg_req_info.c' || echo '$(srcdir)/'`print_sg_req_info.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Tpo $(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sg_req_info.c' object='libmpers_mx32_a-print_sg_req_info.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_sg_req_info.o `test -f 'print_sg_req_info.c' || echo '$(srcdir)/'`print_sg_req_info.c + +libmpers_mx32_a-print_sg_req_info.obj: print_sg_req_info.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_sg_req_info.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Tpo -c -o libmpers_mx32_a-print_sg_req_info.obj `if test -f 'print_sg_req_info.c'; then $(CYGPATH_W) 'print_sg_req_info.c'; else $(CYGPATH_W) '$(srcdir)/print_sg_req_info.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Tpo $(DEPDIR)/libmpers_mx32_a-print_sg_req_info.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sg_req_info.c' object='libmpers_mx32_a-print_sg_req_info.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_sg_req_info.obj `if test -f 'print_sg_req_info.c'; then $(CYGPATH_W) 'print_sg_req_info.c'; else $(CYGPATH_W) '$(srcdir)/print_sg_req_info.c'; fi` + +libmpers_mx32_a-print_sigevent.o: print_sigevent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_sigevent.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo -c -o libmpers_mx32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo $(DEPDIR)/libmpers_mx32_a-print_sigevent.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sigevent.c' object='libmpers_mx32_a-print_sigevent.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c + +libmpers_mx32_a-print_sigevent.obj: print_sigevent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_sigevent.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo -c -o libmpers_mx32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_sigevent.Tpo $(DEPDIR)/libmpers_mx32_a-print_sigevent.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sigevent.c' object='libmpers_mx32_a-print_sigevent.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` + +libmpers_mx32_a-print_time.o: print_time.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_time.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_time.Tpo -c -o libmpers_mx32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_time.Tpo $(DEPDIR)/libmpers_mx32_a-print_time.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_time.c' object='libmpers_mx32_a-print_time.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c + +libmpers_mx32_a-print_time.obj: print_time.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_time.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_time.Tpo -c -o libmpers_mx32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_time.Tpo $(DEPDIR)/libmpers_mx32_a-print_time.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_time.c' object='libmpers_mx32_a-print_time.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` + +libmpers_mx32_a-print_timespec.o: print_timespec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timespec.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timespec.Tpo -c -o libmpers_mx32_a-print_timespec.o `test -f 'print_timespec.c' || echo '$(srcdir)/'`print_timespec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timespec.Tpo $(DEPDIR)/libmpers_mx32_a-print_timespec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timespec.c' object='libmpers_mx32_a-print_timespec.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timespec.o `test -f 'print_timespec.c' || echo '$(srcdir)/'`print_timespec.c + +libmpers_mx32_a-print_timespec.obj: print_timespec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timespec.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timespec.Tpo -c -o libmpers_mx32_a-print_timespec.obj `if test -f 'print_timespec.c'; then $(CYGPATH_W) 'print_timespec.c'; else $(CYGPATH_W) '$(srcdir)/print_timespec.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timespec.Tpo $(DEPDIR)/libmpers_mx32_a-print_timespec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timespec.c' object='libmpers_mx32_a-print_timespec.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timespec.obj `if test -f 'print_timespec.c'; then $(CYGPATH_W) 'print_timespec.c'; else $(CYGPATH_W) '$(srcdir)/print_timespec.c'; fi` + +libmpers_mx32_a-print_timeval.o: print_timeval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timeval.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timeval.Tpo -c -o libmpers_mx32_a-print_timeval.o `test -f 'print_timeval.c' || echo '$(srcdir)/'`print_timeval.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timeval.Tpo $(DEPDIR)/libmpers_mx32_a-print_timeval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timeval.c' object='libmpers_mx32_a-print_timeval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timeval.o `test -f 'print_timeval.c' || echo '$(srcdir)/'`print_timeval.c + +libmpers_mx32_a-print_timeval.obj: print_timeval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timeval.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timeval.Tpo -c -o libmpers_mx32_a-print_timeval.obj `if test -f 'print_timeval.c'; then $(CYGPATH_W) 'print_timeval.c'; else $(CYGPATH_W) '$(srcdir)/print_timeval.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timeval.Tpo $(DEPDIR)/libmpers_mx32_a-print_timeval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timeval.c' object='libmpers_mx32_a-print_timeval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timeval.obj `if test -f 'print_timeval.c'; then $(CYGPATH_W) 'print_timeval.c'; else $(CYGPATH_W) '$(srcdir)/print_timeval.c'; fi` + +libmpers_mx32_a-print_timex.o: print_timex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timex.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo -c -o libmpers_mx32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo $(DEPDIR)/libmpers_mx32_a-print_timex.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timex.c' object='libmpers_mx32_a-print_timex.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c + +libmpers_mx32_a-print_timex.obj: print_timex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-print_timex.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo -c -o libmpers_mx32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-print_timex.Tpo $(DEPDIR)/libmpers_mx32_a-print_timex.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timex.c' object='libmpers_mx32_a-print_timex.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` + +libmpers_mx32_a-printrusage.o: printrusage.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printrusage.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo -c -o libmpers_mx32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo $(DEPDIR)/libmpers_mx32_a-printrusage.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printrusage.c' object='libmpers_mx32_a-printrusage.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c + +libmpers_mx32_a-printrusage.obj: printrusage.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printrusage.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo -c -o libmpers_mx32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-printrusage.Tpo $(DEPDIR)/libmpers_mx32_a-printrusage.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printrusage.c' object='libmpers_mx32_a-printrusage.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` + +libmpers_mx32_a-printsiginfo.o: printsiginfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printsiginfo.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo -c -o libmpers_mx32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo $(DEPDIR)/libmpers_mx32_a-printsiginfo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printsiginfo.c' object='libmpers_mx32_a-printsiginfo.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c + +libmpers_mx32_a-printsiginfo.obj: printsiginfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-printsiginfo.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo -c -o libmpers_mx32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-printsiginfo.Tpo $(DEPDIR)/libmpers_mx32_a-printsiginfo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printsiginfo.c' object='libmpers_mx32_a-printsiginfo.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` + +libmpers_mx32_a-rtc.o: rtc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-rtc.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-rtc.Tpo -c -o libmpers_mx32_a-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-rtc.Tpo $(DEPDIR)/libmpers_mx32_a-rtc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtc.c' object='libmpers_mx32_a-rtc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c + +libmpers_mx32_a-rtc.obj: rtc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-rtc.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-rtc.Tpo -c -o libmpers_mx32_a-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-rtc.Tpo $(DEPDIR)/libmpers_mx32_a-rtc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtc.c' object='libmpers_mx32_a-rtc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` + +libmpers_mx32_a-sg_io_v3.o: sg_io_v3.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sg_io_v3.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sg_io_v3.Tpo -c -o libmpers_mx32_a-sg_io_v3.o `test -f 'sg_io_v3.c' || echo '$(srcdir)/'`sg_io_v3.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sg_io_v3.Tpo $(DEPDIR)/libmpers_mx32_a-sg_io_v3.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sg_io_v3.c' object='libmpers_mx32_a-sg_io_v3.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sg_io_v3.o `test -f 'sg_io_v3.c' || echo '$(srcdir)/'`sg_io_v3.c + +libmpers_mx32_a-sg_io_v3.obj: sg_io_v3.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sg_io_v3.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sg_io_v3.Tpo -c -o libmpers_mx32_a-sg_io_v3.obj `if test -f 'sg_io_v3.c'; then $(CYGPATH_W) 'sg_io_v3.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v3.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sg_io_v3.Tpo $(DEPDIR)/libmpers_mx32_a-sg_io_v3.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sg_io_v3.c' object='libmpers_mx32_a-sg_io_v3.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sg_io_v3.obj `if test -f 'sg_io_v3.c'; then $(CYGPATH_W) 'sg_io_v3.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v3.c'; fi` + +libmpers_mx32_a-sigaltstack.o: sigaltstack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sigaltstack.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo -c -o libmpers_mx32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo $(DEPDIR)/libmpers_mx32_a-sigaltstack.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigaltstack.c' object='libmpers_mx32_a-sigaltstack.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c + +libmpers_mx32_a-sigaltstack.obj: sigaltstack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sigaltstack.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo -c -o libmpers_mx32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sigaltstack.Tpo $(DEPDIR)/libmpers_mx32_a-sigaltstack.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigaltstack.c' object='libmpers_mx32_a-sigaltstack.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` + +libmpers_mx32_a-sock.o: sock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sock.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sock.Tpo -c -o libmpers_mx32_a-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sock.Tpo $(DEPDIR)/libmpers_mx32_a-sock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sock.c' object='libmpers_mx32_a-sock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c + +libmpers_mx32_a-sock.obj: sock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sock.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sock.Tpo -c -o libmpers_mx32_a-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sock.Tpo $(DEPDIR)/libmpers_mx32_a-sock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sock.c' object='libmpers_mx32_a-sock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` + +libmpers_mx32_a-sysinfo.o: sysinfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sysinfo.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo -c -o libmpers_mx32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo $(DEPDIR)/libmpers_mx32_a-sysinfo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysinfo.c' object='libmpers_mx32_a-sysinfo.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c + +libmpers_mx32_a-sysinfo.obj: sysinfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-sysinfo.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo -c -o libmpers_mx32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-sysinfo.Tpo $(DEPDIR)/libmpers_mx32_a-sysinfo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysinfo.c' object='libmpers_mx32_a-sysinfo.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` + +libmpers_mx32_a-times.o: times.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-times.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-times.Tpo -c -o libmpers_mx32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-times.Tpo $(DEPDIR)/libmpers_mx32_a-times.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='times.c' object='libmpers_mx32_a-times.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c + +libmpers_mx32_a-times.obj: times.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-times.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-times.Tpo -c -o libmpers_mx32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-times.Tpo $(DEPDIR)/libmpers_mx32_a-times.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='times.c' object='libmpers_mx32_a-times.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` + +libmpers_mx32_a-ustat.o: ustat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ustat.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ustat.Tpo -c -o libmpers_mx32_a-ustat.o `test -f 'ustat.c' || echo '$(srcdir)/'`ustat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ustat.Tpo $(DEPDIR)/libmpers_mx32_a-ustat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ustat.c' object='libmpers_mx32_a-ustat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ustat.o `test -f 'ustat.c' || echo '$(srcdir)/'`ustat.c + +libmpers_mx32_a-ustat.obj: ustat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-ustat.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-ustat.Tpo -c -o libmpers_mx32_a-ustat.obj `if test -f 'ustat.c'; then $(CYGPATH_W) 'ustat.c'; else $(CYGPATH_W) '$(srcdir)/ustat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-ustat.Tpo $(DEPDIR)/libmpers_mx32_a-ustat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ustat.c' object='libmpers_mx32_a-ustat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-ustat.obj `if test -f 'ustat.c'; then $(CYGPATH_W) 'ustat.c'; else $(CYGPATH_W) '$(srcdir)/ustat.c'; fi` + +libmpers_mx32_a-utime.o: utime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-utime.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-utime.Tpo -c -o libmpers_mx32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-utime.Tpo $(DEPDIR)/libmpers_mx32_a-utime.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utime.c' object='libmpers_mx32_a-utime.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c + +libmpers_mx32_a-utime.obj: utime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-utime.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-utime.Tpo -c -o libmpers_mx32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-utime.Tpo $(DEPDIR)/libmpers_mx32_a-utime.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utime.c' object='libmpers_mx32_a-utime.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` + +libmpers_mx32_a-v4l2.o: v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-v4l2.o -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-v4l2.Tpo -c -o libmpers_mx32_a-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-v4l2.Tpo $(DEPDIR)/libmpers_mx32_a-v4l2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2.c' object='libmpers_mx32_a-v4l2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c + +libmpers_mx32_a-v4l2.obj: v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -MT libmpers_mx32_a-v4l2.obj -MD -MP -MF $(DEPDIR)/libmpers_mx32_a-v4l2.Tpo -c -o libmpers_mx32_a-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmpers_mx32_a-v4l2.Tpo $(DEPDIR)/libmpers_mx32_a-v4l2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2.c' object='libmpers_mx32_a-v4l2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmpers_mx32_a_CPPFLAGS) $(CPPFLAGS) $(libmpers_mx32_a_CFLAGS) $(CFLAGS) -c -o libmpers_mx32_a-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` + +libstrace_a-fstatfs.o: fstatfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-fstatfs.o -MD -MP -MF $(DEPDIR)/libstrace_a-fstatfs.Tpo -c -o libstrace_a-fstatfs.o `test -f 'fstatfs.c' || echo '$(srcdir)/'`fstatfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-fstatfs.Tpo $(DEPDIR)/libstrace_a-fstatfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatfs.c' object='libstrace_a-fstatfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-fstatfs.o `test -f 'fstatfs.c' || echo '$(srcdir)/'`fstatfs.c + +libstrace_a-fstatfs.obj: fstatfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-fstatfs.obj -MD -MP -MF $(DEPDIR)/libstrace_a-fstatfs.Tpo -c -o libstrace_a-fstatfs.obj `if test -f 'fstatfs.c'; then $(CYGPATH_W) 'fstatfs.c'; else $(CYGPATH_W) '$(srcdir)/fstatfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-fstatfs.Tpo $(DEPDIR)/libstrace_a-fstatfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatfs.c' object='libstrace_a-fstatfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-fstatfs.obj `if test -f 'fstatfs.c'; then $(CYGPATH_W) 'fstatfs.c'; else $(CYGPATH_W) '$(srcdir)/fstatfs.c'; fi` + +libstrace_a-fstatfs64.o: fstatfs64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-fstatfs64.o -MD -MP -MF $(DEPDIR)/libstrace_a-fstatfs64.Tpo -c -o libstrace_a-fstatfs64.o `test -f 'fstatfs64.c' || echo '$(srcdir)/'`fstatfs64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-fstatfs64.Tpo $(DEPDIR)/libstrace_a-fstatfs64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatfs64.c' object='libstrace_a-fstatfs64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-fstatfs64.o `test -f 'fstatfs64.c' || echo '$(srcdir)/'`fstatfs64.c + +libstrace_a-fstatfs64.obj: fstatfs64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-fstatfs64.obj -MD -MP -MF $(DEPDIR)/libstrace_a-fstatfs64.Tpo -c -o libstrace_a-fstatfs64.obj `if test -f 'fstatfs64.c'; then $(CYGPATH_W) 'fstatfs64.c'; else $(CYGPATH_W) '$(srcdir)/fstatfs64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-fstatfs64.Tpo $(DEPDIR)/libstrace_a-fstatfs64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatfs64.c' object='libstrace_a-fstatfs64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-fstatfs64.obj `if test -f 'fstatfs64.c'; then $(CYGPATH_W) 'fstatfs64.c'; else $(CYGPATH_W) '$(srcdir)/fstatfs64.c'; fi` + +libstrace_a-ipc.o: ipc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-ipc.o -MD -MP -MF $(DEPDIR)/libstrace_a-ipc.Tpo -c -o libstrace_a-ipc.o `test -f 'ipc.c' || echo '$(srcdir)/'`ipc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-ipc.Tpo $(DEPDIR)/libstrace_a-ipc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc.c' object='libstrace_a-ipc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-ipc.o `test -f 'ipc.c' || echo '$(srcdir)/'`ipc.c + +libstrace_a-ipc.obj: ipc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-ipc.obj -MD -MP -MF $(DEPDIR)/libstrace_a-ipc.Tpo -c -o libstrace_a-ipc.obj `if test -f 'ipc.c'; then $(CYGPATH_W) 'ipc.c'; else $(CYGPATH_W) '$(srcdir)/ipc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-ipc.Tpo $(DEPDIR)/libstrace_a-ipc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc.c' object='libstrace_a-ipc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-ipc.obj `if test -f 'ipc.c'; then $(CYGPATH_W) 'ipc.c'; else $(CYGPATH_W) '$(srcdir)/ipc.c'; fi` + +libstrace_a-socketcall.o: socketcall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-socketcall.o -MD -MP -MF $(DEPDIR)/libstrace_a-socketcall.Tpo -c -o libstrace_a-socketcall.o `test -f 'socketcall.c' || echo '$(srcdir)/'`socketcall.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-socketcall.Tpo $(DEPDIR)/libstrace_a-socketcall.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='socketcall.c' object='libstrace_a-socketcall.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-socketcall.o `test -f 'socketcall.c' || echo '$(srcdir)/'`socketcall.c + +libstrace_a-socketcall.obj: socketcall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-socketcall.obj -MD -MP -MF $(DEPDIR)/libstrace_a-socketcall.Tpo -c -o libstrace_a-socketcall.obj `if test -f 'socketcall.c'; then $(CYGPATH_W) 'socketcall.c'; else $(CYGPATH_W) '$(srcdir)/socketcall.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-socketcall.Tpo $(DEPDIR)/libstrace_a-socketcall.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='socketcall.c' object='libstrace_a-socketcall.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-socketcall.obj `if test -f 'socketcall.c'; then $(CYGPATH_W) 'socketcall.c'; else $(CYGPATH_W) '$(srcdir)/socketcall.c'; fi` + +libstrace_a-statfs.o: statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-statfs.o -MD -MP -MF $(DEPDIR)/libstrace_a-statfs.Tpo -c -o libstrace_a-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-statfs.Tpo $(DEPDIR)/libstrace_a-statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='libstrace_a-statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + +libstrace_a-statfs.obj: statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-statfs.obj -MD -MP -MF $(DEPDIR)/libstrace_a-statfs.Tpo -c -o libstrace_a-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-statfs.Tpo $(DEPDIR)/libstrace_a-statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='libstrace_a-statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + +libstrace_a-statfs64.o: statfs64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-statfs64.o -MD -MP -MF $(DEPDIR)/libstrace_a-statfs64.Tpo -c -o libstrace_a-statfs64.o `test -f 'statfs64.c' || echo '$(srcdir)/'`statfs64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-statfs64.Tpo $(DEPDIR)/libstrace_a-statfs64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs64.c' object='libstrace_a-statfs64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-statfs64.o `test -f 'statfs64.c' || echo '$(srcdir)/'`statfs64.c + +libstrace_a-statfs64.obj: statfs64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-statfs64.obj -MD -MP -MF $(DEPDIR)/libstrace_a-statfs64.Tpo -c -o libstrace_a-statfs64.obj `if test -f 'statfs64.c'; then $(CYGPATH_W) 'statfs64.c'; else $(CYGPATH_W) '$(srcdir)/statfs64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-statfs64.Tpo $(DEPDIR)/libstrace_a-statfs64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs64.c' object='libstrace_a-statfs64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-statfs64.obj `if test -f 'statfs64.c'; then $(CYGPATH_W) 'statfs64.c'; else $(CYGPATH_W) '$(srcdir)/statfs64.c'; fi` + +libstrace_a-sync_file_range.o: sync_file_range.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-sync_file_range.o -MD -MP -MF $(DEPDIR)/libstrace_a-sync_file_range.Tpo -c -o libstrace_a-sync_file_range.o `test -f 'sync_file_range.c' || echo '$(srcdir)/'`sync_file_range.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-sync_file_range.Tpo $(DEPDIR)/libstrace_a-sync_file_range.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sync_file_range.c' object='libstrace_a-sync_file_range.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-sync_file_range.o `test -f 'sync_file_range.c' || echo '$(srcdir)/'`sync_file_range.c + +libstrace_a-sync_file_range.obj: sync_file_range.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-sync_file_range.obj -MD -MP -MF $(DEPDIR)/libstrace_a-sync_file_range.Tpo -c -o libstrace_a-sync_file_range.obj `if test -f 'sync_file_range.c'; then $(CYGPATH_W) 'sync_file_range.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-sync_file_range.Tpo $(DEPDIR)/libstrace_a-sync_file_range.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sync_file_range.c' object='libstrace_a-sync_file_range.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-sync_file_range.obj `if test -f 'sync_file_range.c'; then $(CYGPATH_W) 'sync_file_range.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range.c'; fi` + +libstrace_a-sync_file_range2.o: sync_file_range2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-sync_file_range2.o -MD -MP -MF $(DEPDIR)/libstrace_a-sync_file_range2.Tpo -c -o libstrace_a-sync_file_range2.o `test -f 'sync_file_range2.c' || echo '$(srcdir)/'`sync_file_range2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-sync_file_range2.Tpo $(DEPDIR)/libstrace_a-sync_file_range2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sync_file_range2.c' object='libstrace_a-sync_file_range2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-sync_file_range2.o `test -f 'sync_file_range2.c' || echo '$(srcdir)/'`sync_file_range2.c + +libstrace_a-sync_file_range2.obj: sync_file_range2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-sync_file_range2.obj -MD -MP -MF $(DEPDIR)/libstrace_a-sync_file_range2.Tpo -c -o libstrace_a-sync_file_range2.obj `if test -f 'sync_file_range2.c'; then $(CYGPATH_W) 'sync_file_range2.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range2.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-sync_file_range2.Tpo $(DEPDIR)/libstrace_a-sync_file_range2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sync_file_range2.c' object='libstrace_a-sync_file_range2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-sync_file_range2.obj `if test -f 'sync_file_range2.c'; then $(CYGPATH_W) 'sync_file_range2.c'; else $(CYGPATH_W) '$(srcdir)/sync_file_range2.c'; fi` + +libstrace_a-upeek.o: upeek.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-upeek.o -MD -MP -MF $(DEPDIR)/libstrace_a-upeek.Tpo -c -o libstrace_a-upeek.o `test -f 'upeek.c' || echo '$(srcdir)/'`upeek.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-upeek.Tpo $(DEPDIR)/libstrace_a-upeek.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='upeek.c' object='libstrace_a-upeek.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-upeek.o `test -f 'upeek.c' || echo '$(srcdir)/'`upeek.c + +libstrace_a-upeek.obj: upeek.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-upeek.obj -MD -MP -MF $(DEPDIR)/libstrace_a-upeek.Tpo -c -o libstrace_a-upeek.obj `if test -f 'upeek.c'; then $(CYGPATH_W) 'upeek.c'; else $(CYGPATH_W) '$(srcdir)/upeek.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-upeek.Tpo $(DEPDIR)/libstrace_a-upeek.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='upeek.c' object='libstrace_a-upeek.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-upeek.obj `if test -f 'upeek.c'; then $(CYGPATH_W) 'upeek.c'; else $(CYGPATH_W) '$(srcdir)/upeek.c'; fi` + +libstrace_a-upoke.o: upoke.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-upoke.o -MD -MP -MF $(DEPDIR)/libstrace_a-upoke.Tpo -c -o libstrace_a-upoke.o `test -f 'upoke.c' || echo '$(srcdir)/'`upoke.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-upoke.Tpo $(DEPDIR)/libstrace_a-upoke.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='upoke.c' object='libstrace_a-upoke.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-upoke.o `test -f 'upoke.c' || echo '$(srcdir)/'`upoke.c + +libstrace_a-upoke.obj: upoke.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -MT libstrace_a-upoke.obj -MD -MP -MF $(DEPDIR)/libstrace_a-upoke.Tpo -c -o libstrace_a-upoke.obj `if test -f 'upoke.c'; then $(CYGPATH_W) 'upoke.c'; else $(CYGPATH_W) '$(srcdir)/upoke.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstrace_a-upoke.Tpo $(DEPDIR)/libstrace_a-upoke.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='upoke.c' object='libstrace_a-upoke.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstrace_a_CPPFLAGS) $(CPPFLAGS) $(libstrace_a_CFLAGS) $(CFLAGS) -c -o libstrace_a-upoke.obj `if test -f 'upoke.c'; then $(CYGPATH_W) 'upoke.c'; else $(CYGPATH_W) '$(srcdir)/upoke.c'; fi` + +strace-access.o: access.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-access.o -MD -MP -MF $(DEPDIR)/strace-access.Tpo -c -o strace-access.o `test -f 'access.c' || echo '$(srcdir)/'`access.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-access.Tpo $(DEPDIR)/strace-access.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='access.c' object='strace-access.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-access.o `test -f 'access.c' || echo '$(srcdir)/'`access.c + +strace-access.obj: access.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-access.obj -MD -MP -MF $(DEPDIR)/strace-access.Tpo -c -o strace-access.obj `if test -f 'access.c'; then $(CYGPATH_W) 'access.c'; else $(CYGPATH_W) '$(srcdir)/access.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-access.Tpo $(DEPDIR)/strace-access.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='access.c' object='strace-access.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-access.obj `if test -f 'access.c'; then $(CYGPATH_W) 'access.c'; else $(CYGPATH_W) '$(srcdir)/access.c'; fi` + +strace-affinity.o: affinity.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-affinity.o -MD -MP -MF $(DEPDIR)/strace-affinity.Tpo -c -o strace-affinity.o `test -f 'affinity.c' || echo '$(srcdir)/'`affinity.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-affinity.Tpo $(DEPDIR)/strace-affinity.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='affinity.c' object='strace-affinity.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-affinity.o `test -f 'affinity.c' || echo '$(srcdir)/'`affinity.c + +strace-affinity.obj: affinity.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-affinity.obj -MD -MP -MF $(DEPDIR)/strace-affinity.Tpo -c -o strace-affinity.obj `if test -f 'affinity.c'; then $(CYGPATH_W) 'affinity.c'; else $(CYGPATH_W) '$(srcdir)/affinity.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-affinity.Tpo $(DEPDIR)/strace-affinity.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='affinity.c' object='strace-affinity.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-affinity.obj `if test -f 'affinity.c'; then $(CYGPATH_W) 'affinity.c'; else $(CYGPATH_W) '$(srcdir)/affinity.c'; fi` + +strace-aio.o: aio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-aio.o -MD -MP -MF $(DEPDIR)/strace-aio.Tpo -c -o strace-aio.o `test -f 'aio.c' || echo '$(srcdir)/'`aio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-aio.Tpo $(DEPDIR)/strace-aio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aio.c' object='strace-aio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-aio.o `test -f 'aio.c' || echo '$(srcdir)/'`aio.c + +strace-aio.obj: aio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-aio.obj -MD -MP -MF $(DEPDIR)/strace-aio.Tpo -c -o strace-aio.obj `if test -f 'aio.c'; then $(CYGPATH_W) 'aio.c'; else $(CYGPATH_W) '$(srcdir)/aio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-aio.Tpo $(DEPDIR)/strace-aio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aio.c' object='strace-aio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-aio.obj `if test -f 'aio.c'; then $(CYGPATH_W) 'aio.c'; else $(CYGPATH_W) '$(srcdir)/aio.c'; fi` + +strace-alpha.o: alpha.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-alpha.o -MD -MP -MF $(DEPDIR)/strace-alpha.Tpo -c -o strace-alpha.o `test -f 'alpha.c' || echo '$(srcdir)/'`alpha.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-alpha.Tpo $(DEPDIR)/strace-alpha.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='alpha.c' object='strace-alpha.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-alpha.o `test -f 'alpha.c' || echo '$(srcdir)/'`alpha.c + +strace-alpha.obj: alpha.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-alpha.obj -MD -MP -MF $(DEPDIR)/strace-alpha.Tpo -c -o strace-alpha.obj `if test -f 'alpha.c'; then $(CYGPATH_W) 'alpha.c'; else $(CYGPATH_W) '$(srcdir)/alpha.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-alpha.Tpo $(DEPDIR)/strace-alpha.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='alpha.c' object='strace-alpha.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-alpha.obj `if test -f 'alpha.c'; then $(CYGPATH_W) 'alpha.c'; else $(CYGPATH_W) '$(srcdir)/alpha.c'; fi` + +strace-bjm.o: bjm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-bjm.o -MD -MP -MF $(DEPDIR)/strace-bjm.Tpo -c -o strace-bjm.o `test -f 'bjm.c' || echo '$(srcdir)/'`bjm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-bjm.Tpo $(DEPDIR)/strace-bjm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bjm.c' object='strace-bjm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-bjm.o `test -f 'bjm.c' || echo '$(srcdir)/'`bjm.c + +strace-bjm.obj: bjm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-bjm.obj -MD -MP -MF $(DEPDIR)/strace-bjm.Tpo -c -o strace-bjm.obj `if test -f 'bjm.c'; then $(CYGPATH_W) 'bjm.c'; else $(CYGPATH_W) '$(srcdir)/bjm.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-bjm.Tpo $(DEPDIR)/strace-bjm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bjm.c' object='strace-bjm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-bjm.obj `if test -f 'bjm.c'; then $(CYGPATH_W) 'bjm.c'; else $(CYGPATH_W) '$(srcdir)/bjm.c'; fi` + +strace-block.o: block.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-block.o -MD -MP -MF $(DEPDIR)/strace-block.Tpo -c -o strace-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-block.Tpo $(DEPDIR)/strace-block.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='block.c' object='strace-block.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-block.o `test -f 'block.c' || echo '$(srcdir)/'`block.c + +strace-block.obj: block.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-block.obj -MD -MP -MF $(DEPDIR)/strace-block.Tpo -c -o strace-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-block.Tpo $(DEPDIR)/strace-block.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='block.c' object='strace-block.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-block.obj `if test -f 'block.c'; then $(CYGPATH_W) 'block.c'; else $(CYGPATH_W) '$(srcdir)/block.c'; fi` + +strace-bpf.o: bpf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-bpf.o -MD -MP -MF $(DEPDIR)/strace-bpf.Tpo -c -o strace-bpf.o `test -f 'bpf.c' || echo '$(srcdir)/'`bpf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-bpf.Tpo $(DEPDIR)/strace-bpf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bpf.c' object='strace-bpf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-bpf.o `test -f 'bpf.c' || echo '$(srcdir)/'`bpf.c + +strace-bpf.obj: bpf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-bpf.obj -MD -MP -MF $(DEPDIR)/strace-bpf.Tpo -c -o strace-bpf.obj `if test -f 'bpf.c'; then $(CYGPATH_W) 'bpf.c'; else $(CYGPATH_W) '$(srcdir)/bpf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-bpf.Tpo $(DEPDIR)/strace-bpf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bpf.c' object='strace-bpf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-bpf.obj `if test -f 'bpf.c'; then $(CYGPATH_W) 'bpf.c'; else $(CYGPATH_W) '$(srcdir)/bpf.c'; fi` + +strace-btrfs.o: btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-btrfs.o -MD -MP -MF $(DEPDIR)/strace-btrfs.Tpo -c -o strace-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-btrfs.Tpo $(DEPDIR)/strace-btrfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='btrfs.c' object='strace-btrfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-btrfs.o `test -f 'btrfs.c' || echo '$(srcdir)/'`btrfs.c + +strace-btrfs.obj: btrfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-btrfs.obj -MD -MP -MF $(DEPDIR)/strace-btrfs.Tpo -c -o strace-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-btrfs.Tpo $(DEPDIR)/strace-btrfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='btrfs.c' object='strace-btrfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-btrfs.obj `if test -f 'btrfs.c'; then $(CYGPATH_W) 'btrfs.c'; else $(CYGPATH_W) '$(srcdir)/btrfs.c'; fi` + +strace-cacheflush.o: cacheflush.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-cacheflush.o -MD -MP -MF $(DEPDIR)/strace-cacheflush.Tpo -c -o strace-cacheflush.o `test -f 'cacheflush.c' || echo '$(srcdir)/'`cacheflush.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-cacheflush.Tpo $(DEPDIR)/strace-cacheflush.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cacheflush.c' object='strace-cacheflush.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-cacheflush.o `test -f 'cacheflush.c' || echo '$(srcdir)/'`cacheflush.c + +strace-cacheflush.obj: cacheflush.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-cacheflush.obj -MD -MP -MF $(DEPDIR)/strace-cacheflush.Tpo -c -o strace-cacheflush.obj `if test -f 'cacheflush.c'; then $(CYGPATH_W) 'cacheflush.c'; else $(CYGPATH_W) '$(srcdir)/cacheflush.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-cacheflush.Tpo $(DEPDIR)/strace-cacheflush.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cacheflush.c' object='strace-cacheflush.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-cacheflush.obj `if test -f 'cacheflush.c'; then $(CYGPATH_W) 'cacheflush.c'; else $(CYGPATH_W) '$(srcdir)/cacheflush.c'; fi` + +strace-capability.o: capability.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-capability.o -MD -MP -MF $(DEPDIR)/strace-capability.Tpo -c -o strace-capability.o `test -f 'capability.c' || echo '$(srcdir)/'`capability.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-capability.Tpo $(DEPDIR)/strace-capability.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='capability.c' object='strace-capability.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-capability.o `test -f 'capability.c' || echo '$(srcdir)/'`capability.c + +strace-capability.obj: capability.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-capability.obj -MD -MP -MF $(DEPDIR)/strace-capability.Tpo -c -o strace-capability.obj `if test -f 'capability.c'; then $(CYGPATH_W) 'capability.c'; else $(CYGPATH_W) '$(srcdir)/capability.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-capability.Tpo $(DEPDIR)/strace-capability.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='capability.c' object='strace-capability.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-capability.obj `if test -f 'capability.c'; then $(CYGPATH_W) 'capability.c'; else $(CYGPATH_W) '$(srcdir)/capability.c'; fi` + +strace-chdir.o: chdir.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-chdir.o -MD -MP -MF $(DEPDIR)/strace-chdir.Tpo -c -o strace-chdir.o `test -f 'chdir.c' || echo '$(srcdir)/'`chdir.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-chdir.Tpo $(DEPDIR)/strace-chdir.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='chdir.c' object='strace-chdir.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-chdir.o `test -f 'chdir.c' || echo '$(srcdir)/'`chdir.c + +strace-chdir.obj: chdir.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-chdir.obj -MD -MP -MF $(DEPDIR)/strace-chdir.Tpo -c -o strace-chdir.obj `if test -f 'chdir.c'; then $(CYGPATH_W) 'chdir.c'; else $(CYGPATH_W) '$(srcdir)/chdir.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-chdir.Tpo $(DEPDIR)/strace-chdir.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='chdir.c' object='strace-chdir.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-chdir.obj `if test -f 'chdir.c'; then $(CYGPATH_W) 'chdir.c'; else $(CYGPATH_W) '$(srcdir)/chdir.c'; fi` + +strace-chmod.o: chmod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-chmod.o -MD -MP -MF $(DEPDIR)/strace-chmod.Tpo -c -o strace-chmod.o `test -f 'chmod.c' || echo '$(srcdir)/'`chmod.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-chmod.Tpo $(DEPDIR)/strace-chmod.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='chmod.c' object='strace-chmod.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-chmod.o `test -f 'chmod.c' || echo '$(srcdir)/'`chmod.c + +strace-chmod.obj: chmod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-chmod.obj -MD -MP -MF $(DEPDIR)/strace-chmod.Tpo -c -o strace-chmod.obj `if test -f 'chmod.c'; then $(CYGPATH_W) 'chmod.c'; else $(CYGPATH_W) '$(srcdir)/chmod.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-chmod.Tpo $(DEPDIR)/strace-chmod.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='chmod.c' object='strace-chmod.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-chmod.obj `if test -f 'chmod.c'; then $(CYGPATH_W) 'chmod.c'; else $(CYGPATH_W) '$(srcdir)/chmod.c'; fi` + +strace-clone.o: clone.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-clone.o -MD -MP -MF $(DEPDIR)/strace-clone.Tpo -c -o strace-clone.o `test -f 'clone.c' || echo '$(srcdir)/'`clone.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-clone.Tpo $(DEPDIR)/strace-clone.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='clone.c' object='strace-clone.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-clone.o `test -f 'clone.c' || echo '$(srcdir)/'`clone.c + +strace-clone.obj: clone.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-clone.obj -MD -MP -MF $(DEPDIR)/strace-clone.Tpo -c -o strace-clone.obj `if test -f 'clone.c'; then $(CYGPATH_W) 'clone.c'; else $(CYGPATH_W) '$(srcdir)/clone.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-clone.Tpo $(DEPDIR)/strace-clone.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='clone.c' object='strace-clone.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-clone.obj `if test -f 'clone.c'; then $(CYGPATH_W) 'clone.c'; else $(CYGPATH_W) '$(srcdir)/clone.c'; fi` + +strace-copy_file_range.o: copy_file_range.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-copy_file_range.o -MD -MP -MF $(DEPDIR)/strace-copy_file_range.Tpo -c -o strace-copy_file_range.o `test -f 'copy_file_range.c' || echo '$(srcdir)/'`copy_file_range.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-copy_file_range.Tpo $(DEPDIR)/strace-copy_file_range.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='copy_file_range.c' object='strace-copy_file_range.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-copy_file_range.o `test -f 'copy_file_range.c' || echo '$(srcdir)/'`copy_file_range.c + +strace-copy_file_range.obj: copy_file_range.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-copy_file_range.obj -MD -MP -MF $(DEPDIR)/strace-copy_file_range.Tpo -c -o strace-copy_file_range.obj `if test -f 'copy_file_range.c'; then $(CYGPATH_W) 'copy_file_range.c'; else $(CYGPATH_W) '$(srcdir)/copy_file_range.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-copy_file_range.Tpo $(DEPDIR)/strace-copy_file_range.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='copy_file_range.c' object='strace-copy_file_range.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-copy_file_range.obj `if test -f 'copy_file_range.c'; then $(CYGPATH_W) 'copy_file_range.c'; else $(CYGPATH_W) '$(srcdir)/copy_file_range.c'; fi` + +strace-count.o: count.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-count.o -MD -MP -MF $(DEPDIR)/strace-count.Tpo -c -o strace-count.o `test -f 'count.c' || echo '$(srcdir)/'`count.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-count.Tpo $(DEPDIR)/strace-count.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='count.c' object='strace-count.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-count.o `test -f 'count.c' || echo '$(srcdir)/'`count.c + +strace-count.obj: count.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-count.obj -MD -MP -MF $(DEPDIR)/strace-count.Tpo -c -o strace-count.obj `if test -f 'count.c'; then $(CYGPATH_W) 'count.c'; else $(CYGPATH_W) '$(srcdir)/count.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-count.Tpo $(DEPDIR)/strace-count.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='count.c' object='strace-count.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-count.obj `if test -f 'count.c'; then $(CYGPATH_W) 'count.c'; else $(CYGPATH_W) '$(srcdir)/count.c'; fi` + +strace-desc.o: desc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-desc.o -MD -MP -MF $(DEPDIR)/strace-desc.Tpo -c -o strace-desc.o `test -f 'desc.c' || echo '$(srcdir)/'`desc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-desc.Tpo $(DEPDIR)/strace-desc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='desc.c' object='strace-desc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-desc.o `test -f 'desc.c' || echo '$(srcdir)/'`desc.c + +strace-desc.obj: desc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-desc.obj -MD -MP -MF $(DEPDIR)/strace-desc.Tpo -c -o strace-desc.obj `if test -f 'desc.c'; then $(CYGPATH_W) 'desc.c'; else $(CYGPATH_W) '$(srcdir)/desc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-desc.Tpo $(DEPDIR)/strace-desc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='desc.c' object='strace-desc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-desc.obj `if test -f 'desc.c'; then $(CYGPATH_W) 'desc.c'; else $(CYGPATH_W) '$(srcdir)/desc.c'; fi` + +strace-dirent.o: dirent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dirent.o -MD -MP -MF $(DEPDIR)/strace-dirent.Tpo -c -o strace-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dirent.Tpo $(DEPDIR)/strace-dirent.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent.c' object='strace-dirent.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dirent.o `test -f 'dirent.c' || echo '$(srcdir)/'`dirent.c + +strace-dirent.obj: dirent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dirent.obj -MD -MP -MF $(DEPDIR)/strace-dirent.Tpo -c -o strace-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dirent.Tpo $(DEPDIR)/strace-dirent.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent.c' object='strace-dirent.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dirent.obj `if test -f 'dirent.c'; then $(CYGPATH_W) 'dirent.c'; else $(CYGPATH_W) '$(srcdir)/dirent.c'; fi` + +strace-dirent64.o: dirent64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dirent64.o -MD -MP -MF $(DEPDIR)/strace-dirent64.Tpo -c -o strace-dirent64.o `test -f 'dirent64.c' || echo '$(srcdir)/'`dirent64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dirent64.Tpo $(DEPDIR)/strace-dirent64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent64.c' object='strace-dirent64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dirent64.o `test -f 'dirent64.c' || echo '$(srcdir)/'`dirent64.c + +strace-dirent64.obj: dirent64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dirent64.obj -MD -MP -MF $(DEPDIR)/strace-dirent64.Tpo -c -o strace-dirent64.obj `if test -f 'dirent64.c'; then $(CYGPATH_W) 'dirent64.c'; else $(CYGPATH_W) '$(srcdir)/dirent64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dirent64.Tpo $(DEPDIR)/strace-dirent64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dirent64.c' object='strace-dirent64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dirent64.obj `if test -f 'dirent64.c'; then $(CYGPATH_W) 'dirent64.c'; else $(CYGPATH_W) '$(srcdir)/dirent64.c'; fi` + +strace-dm.o: dm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dm.o -MD -MP -MF $(DEPDIR)/strace-dm.Tpo -c -o strace-dm.o `test -f 'dm.c' || echo '$(srcdir)/'`dm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dm.Tpo $(DEPDIR)/strace-dm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dm.c' object='strace-dm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dm.o `test -f 'dm.c' || echo '$(srcdir)/'`dm.c + +strace-dm.obj: dm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-dm.obj -MD -MP -MF $(DEPDIR)/strace-dm.Tpo -c -o strace-dm.obj `if test -f 'dm.c'; then $(CYGPATH_W) 'dm.c'; else $(CYGPATH_W) '$(srcdir)/dm.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-dm.Tpo $(DEPDIR)/strace-dm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dm.c' object='strace-dm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-dm.obj `if test -f 'dm.c'; then $(CYGPATH_W) 'dm.c'; else $(CYGPATH_W) '$(srcdir)/dm.c'; fi` + +strace-epoll.o: epoll.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-epoll.o -MD -MP -MF $(DEPDIR)/strace-epoll.Tpo -c -o strace-epoll.o `test -f 'epoll.c' || echo '$(srcdir)/'`epoll.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-epoll.Tpo $(DEPDIR)/strace-epoll.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='epoll.c' object='strace-epoll.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-epoll.o `test -f 'epoll.c' || echo '$(srcdir)/'`epoll.c + +strace-epoll.obj: epoll.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-epoll.obj -MD -MP -MF $(DEPDIR)/strace-epoll.Tpo -c -o strace-epoll.obj `if test -f 'epoll.c'; then $(CYGPATH_W) 'epoll.c'; else $(CYGPATH_W) '$(srcdir)/epoll.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-epoll.Tpo $(DEPDIR)/strace-epoll.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='epoll.c' object='strace-epoll.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-epoll.obj `if test -f 'epoll.c'; then $(CYGPATH_W) 'epoll.c'; else $(CYGPATH_W) '$(srcdir)/epoll.c'; fi` + +strace-evdev.o: evdev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-evdev.o -MD -MP -MF $(DEPDIR)/strace-evdev.Tpo -c -o strace-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-evdev.Tpo $(DEPDIR)/strace-evdev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evdev.c' object='strace-evdev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-evdev.o `test -f 'evdev.c' || echo '$(srcdir)/'`evdev.c + +strace-evdev.obj: evdev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-evdev.obj -MD -MP -MF $(DEPDIR)/strace-evdev.Tpo -c -o strace-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-evdev.Tpo $(DEPDIR)/strace-evdev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evdev.c' object='strace-evdev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-evdev.obj `if test -f 'evdev.c'; then $(CYGPATH_W) 'evdev.c'; else $(CYGPATH_W) '$(srcdir)/evdev.c'; fi` + +strace-eventfd.o: eventfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-eventfd.o -MD -MP -MF $(DEPDIR)/strace-eventfd.Tpo -c -o strace-eventfd.o `test -f 'eventfd.c' || echo '$(srcdir)/'`eventfd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-eventfd.Tpo $(DEPDIR)/strace-eventfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='eventfd.c' object='strace-eventfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-eventfd.o `test -f 'eventfd.c' || echo '$(srcdir)/'`eventfd.c + +strace-eventfd.obj: eventfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-eventfd.obj -MD -MP -MF $(DEPDIR)/strace-eventfd.Tpo -c -o strace-eventfd.obj `if test -f 'eventfd.c'; then $(CYGPATH_W) 'eventfd.c'; else $(CYGPATH_W) '$(srcdir)/eventfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-eventfd.Tpo $(DEPDIR)/strace-eventfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='eventfd.c' object='strace-eventfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-eventfd.obj `if test -f 'eventfd.c'; then $(CYGPATH_W) 'eventfd.c'; else $(CYGPATH_W) '$(srcdir)/eventfd.c'; fi` + +strace-execve.o: execve.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-execve.o -MD -MP -MF $(DEPDIR)/strace-execve.Tpo -c -o strace-execve.o `test -f 'execve.c' || echo '$(srcdir)/'`execve.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-execve.Tpo $(DEPDIR)/strace-execve.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='execve.c' object='strace-execve.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-execve.o `test -f 'execve.c' || echo '$(srcdir)/'`execve.c + +strace-execve.obj: execve.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-execve.obj -MD -MP -MF $(DEPDIR)/strace-execve.Tpo -c -o strace-execve.obj `if test -f 'execve.c'; then $(CYGPATH_W) 'execve.c'; else $(CYGPATH_W) '$(srcdir)/execve.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-execve.Tpo $(DEPDIR)/strace-execve.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='execve.c' object='strace-execve.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-execve.obj `if test -f 'execve.c'; then $(CYGPATH_W) 'execve.c'; else $(CYGPATH_W) '$(srcdir)/execve.c'; fi` + +strace-fadvise.o: fadvise.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fadvise.o -MD -MP -MF $(DEPDIR)/strace-fadvise.Tpo -c -o strace-fadvise.o `test -f 'fadvise.c' || echo '$(srcdir)/'`fadvise.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fadvise.Tpo $(DEPDIR)/strace-fadvise.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fadvise.c' object='strace-fadvise.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fadvise.o `test -f 'fadvise.c' || echo '$(srcdir)/'`fadvise.c + +strace-fadvise.obj: fadvise.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fadvise.obj -MD -MP -MF $(DEPDIR)/strace-fadvise.Tpo -c -o strace-fadvise.obj `if test -f 'fadvise.c'; then $(CYGPATH_W) 'fadvise.c'; else $(CYGPATH_W) '$(srcdir)/fadvise.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fadvise.Tpo $(DEPDIR)/strace-fadvise.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fadvise.c' object='strace-fadvise.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fadvise.obj `if test -f 'fadvise.c'; then $(CYGPATH_W) 'fadvise.c'; else $(CYGPATH_W) '$(srcdir)/fadvise.c'; fi` + +strace-fallocate.o: fallocate.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fallocate.o -MD -MP -MF $(DEPDIR)/strace-fallocate.Tpo -c -o strace-fallocate.o `test -f 'fallocate.c' || echo '$(srcdir)/'`fallocate.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fallocate.Tpo $(DEPDIR)/strace-fallocate.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fallocate.c' object='strace-fallocate.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fallocate.o `test -f 'fallocate.c' || echo '$(srcdir)/'`fallocate.c + +strace-fallocate.obj: fallocate.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fallocate.obj -MD -MP -MF $(DEPDIR)/strace-fallocate.Tpo -c -o strace-fallocate.obj `if test -f 'fallocate.c'; then $(CYGPATH_W) 'fallocate.c'; else $(CYGPATH_W) '$(srcdir)/fallocate.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fallocate.Tpo $(DEPDIR)/strace-fallocate.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fallocate.c' object='strace-fallocate.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fallocate.obj `if test -f 'fallocate.c'; then $(CYGPATH_W) 'fallocate.c'; else $(CYGPATH_W) '$(srcdir)/fallocate.c'; fi` + +strace-fanotify.o: fanotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fanotify.o -MD -MP -MF $(DEPDIR)/strace-fanotify.Tpo -c -o strace-fanotify.o `test -f 'fanotify.c' || echo '$(srcdir)/'`fanotify.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fanotify.Tpo $(DEPDIR)/strace-fanotify.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fanotify.c' object='strace-fanotify.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fanotify.o `test -f 'fanotify.c' || echo '$(srcdir)/'`fanotify.c + +strace-fanotify.obj: fanotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fanotify.obj -MD -MP -MF $(DEPDIR)/strace-fanotify.Tpo -c -o strace-fanotify.obj `if test -f 'fanotify.c'; then $(CYGPATH_W) 'fanotify.c'; else $(CYGPATH_W) '$(srcdir)/fanotify.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fanotify.Tpo $(DEPDIR)/strace-fanotify.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fanotify.c' object='strace-fanotify.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fanotify.obj `if test -f 'fanotify.c'; then $(CYGPATH_W) 'fanotify.c'; else $(CYGPATH_W) '$(srcdir)/fanotify.c'; fi` + +strace-fchownat.o: fchownat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fchownat.o -MD -MP -MF $(DEPDIR)/strace-fchownat.Tpo -c -o strace-fchownat.o `test -f 'fchownat.c' || echo '$(srcdir)/'`fchownat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fchownat.Tpo $(DEPDIR)/strace-fchownat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fchownat.c' object='strace-fchownat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fchownat.o `test -f 'fchownat.c' || echo '$(srcdir)/'`fchownat.c + +strace-fchownat.obj: fchownat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fchownat.obj -MD -MP -MF $(DEPDIR)/strace-fchownat.Tpo -c -o strace-fchownat.obj `if test -f 'fchownat.c'; then $(CYGPATH_W) 'fchownat.c'; else $(CYGPATH_W) '$(srcdir)/fchownat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fchownat.Tpo $(DEPDIR)/strace-fchownat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fchownat.c' object='strace-fchownat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fchownat.obj `if test -f 'fchownat.c'; then $(CYGPATH_W) 'fchownat.c'; else $(CYGPATH_W) '$(srcdir)/fchownat.c'; fi` + +strace-fcntl.o: fcntl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fcntl.o -MD -MP -MF $(DEPDIR)/strace-fcntl.Tpo -c -o strace-fcntl.o `test -f 'fcntl.c' || echo '$(srcdir)/'`fcntl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fcntl.Tpo $(DEPDIR)/strace-fcntl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcntl.c' object='strace-fcntl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fcntl.o `test -f 'fcntl.c' || echo '$(srcdir)/'`fcntl.c + +strace-fcntl.obj: fcntl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fcntl.obj -MD -MP -MF $(DEPDIR)/strace-fcntl.Tpo -c -o strace-fcntl.obj `if test -f 'fcntl.c'; then $(CYGPATH_W) 'fcntl.c'; else $(CYGPATH_W) '$(srcdir)/fcntl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fcntl.Tpo $(DEPDIR)/strace-fcntl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fcntl.c' object='strace-fcntl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fcntl.obj `if test -f 'fcntl.c'; then $(CYGPATH_W) 'fcntl.c'; else $(CYGPATH_W) '$(srcdir)/fcntl.c'; fi` + +strace-fetch_seccomp_fprog.o: fetch_seccomp_fprog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_seccomp_fprog.o -MD -MP -MF $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo -c -o strace-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo $(DEPDIR)/strace-fetch_seccomp_fprog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_seccomp_fprog.c' object='strace-fetch_seccomp_fprog.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_seccomp_fprog.o `test -f 'fetch_seccomp_fprog.c' || echo '$(srcdir)/'`fetch_seccomp_fprog.c + +strace-fetch_seccomp_fprog.obj: fetch_seccomp_fprog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_seccomp_fprog.obj -MD -MP -MF $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo -c -o strace-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_seccomp_fprog.Tpo $(DEPDIR)/strace-fetch_seccomp_fprog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_seccomp_fprog.c' object='strace-fetch_seccomp_fprog.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_seccomp_fprog.obj `if test -f 'fetch_seccomp_fprog.c'; then $(CYGPATH_W) 'fetch_seccomp_fprog.c'; else $(CYGPATH_W) '$(srcdir)/fetch_seccomp_fprog.c'; fi` + +strace-fetch_struct_flock.o: fetch_struct_flock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_flock.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_flock.Tpo -c -o strace-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_flock.Tpo $(DEPDIR)/strace-fetch_struct_flock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_flock.c' object='strace-fetch_struct_flock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_flock.o `test -f 'fetch_struct_flock.c' || echo '$(srcdir)/'`fetch_struct_flock.c + +strace-fetch_struct_flock.obj: fetch_struct_flock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_flock.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_flock.Tpo -c -o strace-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_flock.Tpo $(DEPDIR)/strace-fetch_struct_flock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_flock.c' object='strace-fetch_struct_flock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_flock.obj `if test -f 'fetch_struct_flock.c'; then $(CYGPATH_W) 'fetch_struct_flock.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_flock.c'; fi` + +strace-fetch_struct_mmsghdr.o: fetch_struct_mmsghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_mmsghdr.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_mmsghdr.Tpo -c -o strace-fetch_struct_mmsghdr.o `test -f 'fetch_struct_mmsghdr.c' || echo '$(srcdir)/'`fetch_struct_mmsghdr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_mmsghdr.Tpo $(DEPDIR)/strace-fetch_struct_mmsghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_mmsghdr.c' object='strace-fetch_struct_mmsghdr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_mmsghdr.o `test -f 'fetch_struct_mmsghdr.c' || echo '$(srcdir)/'`fetch_struct_mmsghdr.c + +strace-fetch_struct_mmsghdr.obj: fetch_struct_mmsghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_mmsghdr.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_mmsghdr.Tpo -c -o strace-fetch_struct_mmsghdr.obj `if test -f 'fetch_struct_mmsghdr.c'; then $(CYGPATH_W) 'fetch_struct_mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_mmsghdr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_mmsghdr.Tpo $(DEPDIR)/strace-fetch_struct_mmsghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_mmsghdr.c' object='strace-fetch_struct_mmsghdr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_mmsghdr.obj `if test -f 'fetch_struct_mmsghdr.c'; then $(CYGPATH_W) 'fetch_struct_mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_mmsghdr.c'; fi` + +strace-fetch_struct_msghdr.o: fetch_struct_msghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_msghdr.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_msghdr.Tpo -c -o strace-fetch_struct_msghdr.o `test -f 'fetch_struct_msghdr.c' || echo '$(srcdir)/'`fetch_struct_msghdr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_msghdr.Tpo $(DEPDIR)/strace-fetch_struct_msghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_msghdr.c' object='strace-fetch_struct_msghdr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_msghdr.o `test -f 'fetch_struct_msghdr.c' || echo '$(srcdir)/'`fetch_struct_msghdr.c + +strace-fetch_struct_msghdr.obj: fetch_struct_msghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_msghdr.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_msghdr.Tpo -c -o strace-fetch_struct_msghdr.obj `if test -f 'fetch_struct_msghdr.c'; then $(CYGPATH_W) 'fetch_struct_msghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_msghdr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_msghdr.Tpo $(DEPDIR)/strace-fetch_struct_msghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_msghdr.c' object='strace-fetch_struct_msghdr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_msghdr.obj `if test -f 'fetch_struct_msghdr.c'; then $(CYGPATH_W) 'fetch_struct_msghdr.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_msghdr.c'; fi` + +strace-fetch_struct_stat.o: fetch_struct_stat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_stat.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_stat.Tpo -c -o strace-fetch_struct_stat.o `test -f 'fetch_struct_stat.c' || echo '$(srcdir)/'`fetch_struct_stat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_stat.Tpo $(DEPDIR)/strace-fetch_struct_stat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_stat.c' object='strace-fetch_struct_stat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_stat.o `test -f 'fetch_struct_stat.c' || echo '$(srcdir)/'`fetch_struct_stat.c + +strace-fetch_struct_stat.obj: fetch_struct_stat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_stat.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_stat.Tpo -c -o strace-fetch_struct_stat.obj `if test -f 'fetch_struct_stat.c'; then $(CYGPATH_W) 'fetch_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_stat.Tpo $(DEPDIR)/strace-fetch_struct_stat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_stat.c' object='strace-fetch_struct_stat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_stat.obj `if test -f 'fetch_struct_stat.c'; then $(CYGPATH_W) 'fetch_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat.c'; fi` + +strace-fetch_struct_stat64.o: fetch_struct_stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_stat64.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_stat64.Tpo -c -o strace-fetch_struct_stat64.o `test -f 'fetch_struct_stat64.c' || echo '$(srcdir)/'`fetch_struct_stat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_stat64.Tpo $(DEPDIR)/strace-fetch_struct_stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_stat64.c' object='strace-fetch_struct_stat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_stat64.o `test -f 'fetch_struct_stat64.c' || echo '$(srcdir)/'`fetch_struct_stat64.c + +strace-fetch_struct_stat64.obj: fetch_struct_stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_stat64.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_stat64.Tpo -c -o strace-fetch_struct_stat64.obj `if test -f 'fetch_struct_stat64.c'; then $(CYGPATH_W) 'fetch_struct_stat64.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_stat64.Tpo $(DEPDIR)/strace-fetch_struct_stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_stat64.c' object='strace-fetch_struct_stat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_stat64.obj `if test -f 'fetch_struct_stat64.c'; then $(CYGPATH_W) 'fetch_struct_stat64.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_stat64.c'; fi` + +strace-fetch_struct_statfs.o: fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_statfs.o -MD -MP -MF $(DEPDIR)/strace-fetch_struct_statfs.Tpo -c -o strace-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_statfs.Tpo $(DEPDIR)/strace-fetch_struct_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_statfs.c' object='strace-fetch_struct_statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_statfs.o `test -f 'fetch_struct_statfs.c' || echo '$(srcdir)/'`fetch_struct_statfs.c + +strace-fetch_struct_statfs.obj: fetch_struct_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fetch_struct_statfs.obj -MD -MP -MF $(DEPDIR)/strace-fetch_struct_statfs.Tpo -c -o strace-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fetch_struct_statfs.Tpo $(DEPDIR)/strace-fetch_struct_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fetch_struct_statfs.c' object='strace-fetch_struct_statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fetch_struct_statfs.obj `if test -f 'fetch_struct_statfs.c'; then $(CYGPATH_W) 'fetch_struct_statfs.c'; else $(CYGPATH_W) '$(srcdir)/fetch_struct_statfs.c'; fi` + +strace-file_handle.o: file_handle.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file_handle.o -MD -MP -MF $(DEPDIR)/strace-file_handle.Tpo -c -o strace-file_handle.o `test -f 'file_handle.c' || echo '$(srcdir)/'`file_handle.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file_handle.Tpo $(DEPDIR)/strace-file_handle.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file_handle.c' object='strace-file_handle.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file_handle.o `test -f 'file_handle.c' || echo '$(srcdir)/'`file_handle.c + +strace-file_handle.obj: file_handle.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file_handle.obj -MD -MP -MF $(DEPDIR)/strace-file_handle.Tpo -c -o strace-file_handle.obj `if test -f 'file_handle.c'; then $(CYGPATH_W) 'file_handle.c'; else $(CYGPATH_W) '$(srcdir)/file_handle.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file_handle.Tpo $(DEPDIR)/strace-file_handle.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file_handle.c' object='strace-file_handle.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file_handle.obj `if test -f 'file_handle.c'; then $(CYGPATH_W) 'file_handle.c'; else $(CYGPATH_W) '$(srcdir)/file_handle.c'; fi` + +strace-file_ioctl.o: file_ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file_ioctl.o -MD -MP -MF $(DEPDIR)/strace-file_ioctl.Tpo -c -o strace-file_ioctl.o `test -f 'file_ioctl.c' || echo '$(srcdir)/'`file_ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file_ioctl.Tpo $(DEPDIR)/strace-file_ioctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file_ioctl.c' object='strace-file_ioctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file_ioctl.o `test -f 'file_ioctl.c' || echo '$(srcdir)/'`file_ioctl.c + +strace-file_ioctl.obj: file_ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-file_ioctl.obj -MD -MP -MF $(DEPDIR)/strace-file_ioctl.Tpo -c -o strace-file_ioctl.obj `if test -f 'file_ioctl.c'; then $(CYGPATH_W) 'file_ioctl.c'; else $(CYGPATH_W) '$(srcdir)/file_ioctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-file_ioctl.Tpo $(DEPDIR)/strace-file_ioctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file_ioctl.c' object='strace-file_ioctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-file_ioctl.obj `if test -f 'file_ioctl.c'; then $(CYGPATH_W) 'file_ioctl.c'; else $(CYGPATH_W) '$(srcdir)/file_ioctl.c'; fi` + +strace-fs_x_ioctl.o: fs_x_ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fs_x_ioctl.o -MD -MP -MF $(DEPDIR)/strace-fs_x_ioctl.Tpo -c -o strace-fs_x_ioctl.o `test -f 'fs_x_ioctl.c' || echo '$(srcdir)/'`fs_x_ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fs_x_ioctl.Tpo $(DEPDIR)/strace-fs_x_ioctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs_x_ioctl.c' object='strace-fs_x_ioctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fs_x_ioctl.o `test -f 'fs_x_ioctl.c' || echo '$(srcdir)/'`fs_x_ioctl.c + +strace-fs_x_ioctl.obj: fs_x_ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-fs_x_ioctl.obj -MD -MP -MF $(DEPDIR)/strace-fs_x_ioctl.Tpo -c -o strace-fs_x_ioctl.obj `if test -f 'fs_x_ioctl.c'; then $(CYGPATH_W) 'fs_x_ioctl.c'; else $(CYGPATH_W) '$(srcdir)/fs_x_ioctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-fs_x_ioctl.Tpo $(DEPDIR)/strace-fs_x_ioctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fs_x_ioctl.c' object='strace-fs_x_ioctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-fs_x_ioctl.obj `if test -f 'fs_x_ioctl.c'; then $(CYGPATH_W) 'fs_x_ioctl.c'; else $(CYGPATH_W) '$(srcdir)/fs_x_ioctl.c'; fi` + +strace-flock.o: flock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-flock.o -MD -MP -MF $(DEPDIR)/strace-flock.Tpo -c -o strace-flock.o `test -f 'flock.c' || echo '$(srcdir)/'`flock.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-flock.Tpo $(DEPDIR)/strace-flock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='flock.c' object='strace-flock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-flock.o `test -f 'flock.c' || echo '$(srcdir)/'`flock.c + +strace-flock.obj: flock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-flock.obj -MD -MP -MF $(DEPDIR)/strace-flock.Tpo -c -o strace-flock.obj `if test -f 'flock.c'; then $(CYGPATH_W) 'flock.c'; else $(CYGPATH_W) '$(srcdir)/flock.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-flock.Tpo $(DEPDIR)/strace-flock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='flock.c' object='strace-flock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-flock.obj `if test -f 'flock.c'; then $(CYGPATH_W) 'flock.c'; else $(CYGPATH_W) '$(srcdir)/flock.c'; fi` + +strace-futex.o: futex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-futex.o -MD -MP -MF $(DEPDIR)/strace-futex.Tpo -c -o strace-futex.o `test -f 'futex.c' || echo '$(srcdir)/'`futex.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-futex.Tpo $(DEPDIR)/strace-futex.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='futex.c' object='strace-futex.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-futex.o `test -f 'futex.c' || echo '$(srcdir)/'`futex.c + +strace-futex.obj: futex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-futex.obj -MD -MP -MF $(DEPDIR)/strace-futex.Tpo -c -o strace-futex.obj `if test -f 'futex.c'; then $(CYGPATH_W) 'futex.c'; else $(CYGPATH_W) '$(srcdir)/futex.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-futex.Tpo $(DEPDIR)/strace-futex.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='futex.c' object='strace-futex.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-futex.obj `if test -f 'futex.c'; then $(CYGPATH_W) 'futex.c'; else $(CYGPATH_W) '$(srcdir)/futex.c'; fi` + +strace-get_robust_list.o: get_robust_list.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-get_robust_list.o -MD -MP -MF $(DEPDIR)/strace-get_robust_list.Tpo -c -o strace-get_robust_list.o `test -f 'get_robust_list.c' || echo '$(srcdir)/'`get_robust_list.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-get_robust_list.Tpo $(DEPDIR)/strace-get_robust_list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_robust_list.c' object='strace-get_robust_list.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-get_robust_list.o `test -f 'get_robust_list.c' || echo '$(srcdir)/'`get_robust_list.c + +strace-get_robust_list.obj: get_robust_list.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-get_robust_list.obj -MD -MP -MF $(DEPDIR)/strace-get_robust_list.Tpo -c -o strace-get_robust_list.obj `if test -f 'get_robust_list.c'; then $(CYGPATH_W) 'get_robust_list.c'; else $(CYGPATH_W) '$(srcdir)/get_robust_list.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-get_robust_list.Tpo $(DEPDIR)/strace-get_robust_list.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_robust_list.c' object='strace-get_robust_list.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-get_robust_list.obj `if test -f 'get_robust_list.c'; then $(CYGPATH_W) 'get_robust_list.c'; else $(CYGPATH_W) '$(srcdir)/get_robust_list.c'; fi` + +strace-getcpu.o: getcpu.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getcpu.o -MD -MP -MF $(DEPDIR)/strace-getcpu.Tpo -c -o strace-getcpu.o `test -f 'getcpu.c' || echo '$(srcdir)/'`getcpu.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getcpu.Tpo $(DEPDIR)/strace-getcpu.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getcpu.c' object='strace-getcpu.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getcpu.o `test -f 'getcpu.c' || echo '$(srcdir)/'`getcpu.c + +strace-getcpu.obj: getcpu.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getcpu.obj -MD -MP -MF $(DEPDIR)/strace-getcpu.Tpo -c -o strace-getcpu.obj `if test -f 'getcpu.c'; then $(CYGPATH_W) 'getcpu.c'; else $(CYGPATH_W) '$(srcdir)/getcpu.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getcpu.Tpo $(DEPDIR)/strace-getcpu.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getcpu.c' object='strace-getcpu.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getcpu.obj `if test -f 'getcpu.c'; then $(CYGPATH_W) 'getcpu.c'; else $(CYGPATH_W) '$(srcdir)/getcpu.c'; fi` + +strace-getcwd.o: getcwd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getcwd.o -MD -MP -MF $(DEPDIR)/strace-getcwd.Tpo -c -o strace-getcwd.o `test -f 'getcwd.c' || echo '$(srcdir)/'`getcwd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getcwd.Tpo $(DEPDIR)/strace-getcwd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getcwd.c' object='strace-getcwd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getcwd.o `test -f 'getcwd.c' || echo '$(srcdir)/'`getcwd.c + +strace-getcwd.obj: getcwd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getcwd.obj -MD -MP -MF $(DEPDIR)/strace-getcwd.Tpo -c -o strace-getcwd.obj `if test -f 'getcwd.c'; then $(CYGPATH_W) 'getcwd.c'; else $(CYGPATH_W) '$(srcdir)/getcwd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getcwd.Tpo $(DEPDIR)/strace-getcwd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getcwd.c' object='strace-getcwd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getcwd.obj `if test -f 'getcwd.c'; then $(CYGPATH_W) 'getcwd.c'; else $(CYGPATH_W) '$(srcdir)/getcwd.c'; fi` + +strace-getrandom.o: getrandom.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getrandom.o -MD -MP -MF $(DEPDIR)/strace-getrandom.Tpo -c -o strace-getrandom.o `test -f 'getrandom.c' || echo '$(srcdir)/'`getrandom.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getrandom.Tpo $(DEPDIR)/strace-getrandom.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getrandom.c' object='strace-getrandom.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getrandom.o `test -f 'getrandom.c' || echo '$(srcdir)/'`getrandom.c + +strace-getrandom.obj: getrandom.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-getrandom.obj -MD -MP -MF $(DEPDIR)/strace-getrandom.Tpo -c -o strace-getrandom.obj `if test -f 'getrandom.c'; then $(CYGPATH_W) 'getrandom.c'; else $(CYGPATH_W) '$(srcdir)/getrandom.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-getrandom.Tpo $(DEPDIR)/strace-getrandom.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getrandom.c' object='strace-getrandom.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-getrandom.obj `if test -f 'getrandom.c'; then $(CYGPATH_W) 'getrandom.c'; else $(CYGPATH_W) '$(srcdir)/getrandom.c'; fi` + +strace-hdio.o: hdio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-hdio.o -MD -MP -MF $(DEPDIR)/strace-hdio.Tpo -c -o strace-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-hdio.Tpo $(DEPDIR)/strace-hdio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdio.c' object='strace-hdio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-hdio.o `test -f 'hdio.c' || echo '$(srcdir)/'`hdio.c + +strace-hdio.obj: hdio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-hdio.obj -MD -MP -MF $(DEPDIR)/strace-hdio.Tpo -c -o strace-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-hdio.Tpo $(DEPDIR)/strace-hdio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hdio.c' object='strace-hdio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-hdio.obj `if test -f 'hdio.c'; then $(CYGPATH_W) 'hdio.c'; else $(CYGPATH_W) '$(srcdir)/hdio.c'; fi` + +strace-hostname.o: hostname.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-hostname.o -MD -MP -MF $(DEPDIR)/strace-hostname.Tpo -c -o strace-hostname.o `test -f 'hostname.c' || echo '$(srcdir)/'`hostname.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-hostname.Tpo $(DEPDIR)/strace-hostname.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hostname.c' object='strace-hostname.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-hostname.o `test -f 'hostname.c' || echo '$(srcdir)/'`hostname.c + +strace-hostname.obj: hostname.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-hostname.obj -MD -MP -MF $(DEPDIR)/strace-hostname.Tpo -c -o strace-hostname.obj `if test -f 'hostname.c'; then $(CYGPATH_W) 'hostname.c'; else $(CYGPATH_W) '$(srcdir)/hostname.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-hostname.Tpo $(DEPDIR)/strace-hostname.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hostname.c' object='strace-hostname.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-hostname.obj `if test -f 'hostname.c'; then $(CYGPATH_W) 'hostname.c'; else $(CYGPATH_W) '$(srcdir)/hostname.c'; fi` + +strace-inotify.o: inotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-inotify.o -MD -MP -MF $(DEPDIR)/strace-inotify.Tpo -c -o strace-inotify.o `test -f 'inotify.c' || echo '$(srcdir)/'`inotify.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-inotify.Tpo $(DEPDIR)/strace-inotify.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inotify.c' object='strace-inotify.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-inotify.o `test -f 'inotify.c' || echo '$(srcdir)/'`inotify.c + +strace-inotify.obj: inotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-inotify.obj -MD -MP -MF $(DEPDIR)/strace-inotify.Tpo -c -o strace-inotify.obj `if test -f 'inotify.c'; then $(CYGPATH_W) 'inotify.c'; else $(CYGPATH_W) '$(srcdir)/inotify.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-inotify.Tpo $(DEPDIR)/strace-inotify.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inotify.c' object='strace-inotify.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-inotify.obj `if test -f 'inotify.c'; then $(CYGPATH_W) 'inotify.c'; else $(CYGPATH_W) '$(srcdir)/inotify.c'; fi` + +strace-io.o: io.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-io.o -MD -MP -MF $(DEPDIR)/strace-io.Tpo -c -o strace-io.o `test -f 'io.c' || echo '$(srcdir)/'`io.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-io.Tpo $(DEPDIR)/strace-io.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io.c' object='strace-io.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-io.o `test -f 'io.c' || echo '$(srcdir)/'`io.c + +strace-io.obj: io.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-io.obj -MD -MP -MF $(DEPDIR)/strace-io.Tpo -c -o strace-io.obj `if test -f 'io.c'; then $(CYGPATH_W) 'io.c'; else $(CYGPATH_W) '$(srcdir)/io.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-io.Tpo $(DEPDIR)/strace-io.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='io.c' object='strace-io.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-io.obj `if test -f 'io.c'; then $(CYGPATH_W) 'io.c'; else $(CYGPATH_W) '$(srcdir)/io.c'; fi` + +strace-ioctl.o: ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioctl.o -MD -MP -MF $(DEPDIR)/strace-ioctl.Tpo -c -o strace-ioctl.o `test -f 'ioctl.c' || echo '$(srcdir)/'`ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioctl.Tpo $(DEPDIR)/strace-ioctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioctl.c' object='strace-ioctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioctl.o `test -f 'ioctl.c' || echo '$(srcdir)/'`ioctl.c + +strace-ioctl.obj: ioctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioctl.obj -MD -MP -MF $(DEPDIR)/strace-ioctl.Tpo -c -o strace-ioctl.obj `if test -f 'ioctl.c'; then $(CYGPATH_W) 'ioctl.c'; else $(CYGPATH_W) '$(srcdir)/ioctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioctl.Tpo $(DEPDIR)/strace-ioctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioctl.c' object='strace-ioctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioctl.obj `if test -f 'ioctl.c'; then $(CYGPATH_W) 'ioctl.c'; else $(CYGPATH_W) '$(srcdir)/ioctl.c'; fi` + +strace-ioperm.o: ioperm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioperm.o -MD -MP -MF $(DEPDIR)/strace-ioperm.Tpo -c -o strace-ioperm.o `test -f 'ioperm.c' || echo '$(srcdir)/'`ioperm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioperm.Tpo $(DEPDIR)/strace-ioperm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioperm.c' object='strace-ioperm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioperm.o `test -f 'ioperm.c' || echo '$(srcdir)/'`ioperm.c + +strace-ioperm.obj: ioperm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioperm.obj -MD -MP -MF $(DEPDIR)/strace-ioperm.Tpo -c -o strace-ioperm.obj `if test -f 'ioperm.c'; then $(CYGPATH_W) 'ioperm.c'; else $(CYGPATH_W) '$(srcdir)/ioperm.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioperm.Tpo $(DEPDIR)/strace-ioperm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioperm.c' object='strace-ioperm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioperm.obj `if test -f 'ioperm.c'; then $(CYGPATH_W) 'ioperm.c'; else $(CYGPATH_W) '$(srcdir)/ioperm.c'; fi` + +strace-iopl.o: iopl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-iopl.o -MD -MP -MF $(DEPDIR)/strace-iopl.Tpo -c -o strace-iopl.o `test -f 'iopl.c' || echo '$(srcdir)/'`iopl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-iopl.Tpo $(DEPDIR)/strace-iopl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='iopl.c' object='strace-iopl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-iopl.o `test -f 'iopl.c' || echo '$(srcdir)/'`iopl.c + +strace-iopl.obj: iopl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-iopl.obj -MD -MP -MF $(DEPDIR)/strace-iopl.Tpo -c -o strace-iopl.obj `if test -f 'iopl.c'; then $(CYGPATH_W) 'iopl.c'; else $(CYGPATH_W) '$(srcdir)/iopl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-iopl.Tpo $(DEPDIR)/strace-iopl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='iopl.c' object='strace-iopl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-iopl.obj `if test -f 'iopl.c'; then $(CYGPATH_W) 'iopl.c'; else $(CYGPATH_W) '$(srcdir)/iopl.c'; fi` + +strace-ioprio.o: ioprio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioprio.o -MD -MP -MF $(DEPDIR)/strace-ioprio.Tpo -c -o strace-ioprio.o `test -f 'ioprio.c' || echo '$(srcdir)/'`ioprio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioprio.Tpo $(DEPDIR)/strace-ioprio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioprio.c' object='strace-ioprio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioprio.o `test -f 'ioprio.c' || echo '$(srcdir)/'`ioprio.c + +strace-ioprio.obj: ioprio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ioprio.obj -MD -MP -MF $(DEPDIR)/strace-ioprio.Tpo -c -o strace-ioprio.obj `if test -f 'ioprio.c'; then $(CYGPATH_W) 'ioprio.c'; else $(CYGPATH_W) '$(srcdir)/ioprio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ioprio.Tpo $(DEPDIR)/strace-ioprio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioprio.c' object='strace-ioprio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ioprio.obj `if test -f 'ioprio.c'; then $(CYGPATH_W) 'ioprio.c'; else $(CYGPATH_W) '$(srcdir)/ioprio.c'; fi` + +strace-ipc_msg.o: ipc_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_msg.o -MD -MP -MF $(DEPDIR)/strace-ipc_msg.Tpo -c -o strace-ipc_msg.o `test -f 'ipc_msg.c' || echo '$(srcdir)/'`ipc_msg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_msg.Tpo $(DEPDIR)/strace-ipc_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msg.c' object='strace-ipc_msg.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_msg.o `test -f 'ipc_msg.c' || echo '$(srcdir)/'`ipc_msg.c + +strace-ipc_msg.obj: ipc_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_msg.obj -MD -MP -MF $(DEPDIR)/strace-ipc_msg.Tpo -c -o strace-ipc_msg.obj `if test -f 'ipc_msg.c'; then $(CYGPATH_W) 'ipc_msg.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msg.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_msg.Tpo $(DEPDIR)/strace-ipc_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msg.c' object='strace-ipc_msg.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_msg.obj `if test -f 'ipc_msg.c'; then $(CYGPATH_W) 'ipc_msg.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msg.c'; fi` + +strace-ipc_msgctl.o: ipc_msgctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_msgctl.o -MD -MP -MF $(DEPDIR)/strace-ipc_msgctl.Tpo -c -o strace-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_msgctl.Tpo $(DEPDIR)/strace-ipc_msgctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msgctl.c' object='strace-ipc_msgctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_msgctl.o `test -f 'ipc_msgctl.c' || echo '$(srcdir)/'`ipc_msgctl.c + +strace-ipc_msgctl.obj: ipc_msgctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_msgctl.obj -MD -MP -MF $(DEPDIR)/strace-ipc_msgctl.Tpo -c -o strace-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_msgctl.Tpo $(DEPDIR)/strace-ipc_msgctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_msgctl.c' object='strace-ipc_msgctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_msgctl.obj `if test -f 'ipc_msgctl.c'; then $(CYGPATH_W) 'ipc_msgctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_msgctl.c'; fi` + +strace-ipc_sem.o: ipc_sem.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_sem.o -MD -MP -MF $(DEPDIR)/strace-ipc_sem.Tpo -c -o strace-ipc_sem.o `test -f 'ipc_sem.c' || echo '$(srcdir)/'`ipc_sem.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_sem.Tpo $(DEPDIR)/strace-ipc_sem.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_sem.c' object='strace-ipc_sem.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_sem.o `test -f 'ipc_sem.c' || echo '$(srcdir)/'`ipc_sem.c + +strace-ipc_sem.obj: ipc_sem.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_sem.obj -MD -MP -MF $(DEPDIR)/strace-ipc_sem.Tpo -c -o strace-ipc_sem.obj `if test -f 'ipc_sem.c'; then $(CYGPATH_W) 'ipc_sem.c'; else $(CYGPATH_W) '$(srcdir)/ipc_sem.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_sem.Tpo $(DEPDIR)/strace-ipc_sem.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_sem.c' object='strace-ipc_sem.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_sem.obj `if test -f 'ipc_sem.c'; then $(CYGPATH_W) 'ipc_sem.c'; else $(CYGPATH_W) '$(srcdir)/ipc_sem.c'; fi` + +strace-ipc_shm.o: ipc_shm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_shm.o -MD -MP -MF $(DEPDIR)/strace-ipc_shm.Tpo -c -o strace-ipc_shm.o `test -f 'ipc_shm.c' || echo '$(srcdir)/'`ipc_shm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_shm.Tpo $(DEPDIR)/strace-ipc_shm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shm.c' object='strace-ipc_shm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_shm.o `test -f 'ipc_shm.c' || echo '$(srcdir)/'`ipc_shm.c + +strace-ipc_shm.obj: ipc_shm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_shm.obj -MD -MP -MF $(DEPDIR)/strace-ipc_shm.Tpo -c -o strace-ipc_shm.obj `if test -f 'ipc_shm.c'; then $(CYGPATH_W) 'ipc_shm.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shm.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_shm.Tpo $(DEPDIR)/strace-ipc_shm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shm.c' object='strace-ipc_shm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_shm.obj `if test -f 'ipc_shm.c'; then $(CYGPATH_W) 'ipc_shm.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shm.c'; fi` + +strace-ipc_shmctl.o: ipc_shmctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_shmctl.o -MD -MP -MF $(DEPDIR)/strace-ipc_shmctl.Tpo -c -o strace-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_shmctl.Tpo $(DEPDIR)/strace-ipc_shmctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shmctl.c' object='strace-ipc_shmctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_shmctl.o `test -f 'ipc_shmctl.c' || echo '$(srcdir)/'`ipc_shmctl.c + +strace-ipc_shmctl.obj: ipc_shmctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ipc_shmctl.obj -MD -MP -MF $(DEPDIR)/strace-ipc_shmctl.Tpo -c -o strace-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ipc_shmctl.Tpo $(DEPDIR)/strace-ipc_shmctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipc_shmctl.c' object='strace-ipc_shmctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ipc_shmctl.obj `if test -f 'ipc_shmctl.c'; then $(CYGPATH_W) 'ipc_shmctl.c'; else $(CYGPATH_W) '$(srcdir)/ipc_shmctl.c'; fi` + +strace-kcmp.o: kcmp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-kcmp.o -MD -MP -MF $(DEPDIR)/strace-kcmp.Tpo -c -o strace-kcmp.o `test -f 'kcmp.c' || echo '$(srcdir)/'`kcmp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-kcmp.Tpo $(DEPDIR)/strace-kcmp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kcmp.c' object='strace-kcmp.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-kcmp.o `test -f 'kcmp.c' || echo '$(srcdir)/'`kcmp.c + +strace-kcmp.obj: kcmp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-kcmp.obj -MD -MP -MF $(DEPDIR)/strace-kcmp.Tpo -c -o strace-kcmp.obj `if test -f 'kcmp.c'; then $(CYGPATH_W) 'kcmp.c'; else $(CYGPATH_W) '$(srcdir)/kcmp.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-kcmp.Tpo $(DEPDIR)/strace-kcmp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kcmp.c' object='strace-kcmp.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-kcmp.obj `if test -f 'kcmp.c'; then $(CYGPATH_W) 'kcmp.c'; else $(CYGPATH_W) '$(srcdir)/kcmp.c'; fi` + +strace-kexec.o: kexec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-kexec.o -MD -MP -MF $(DEPDIR)/strace-kexec.Tpo -c -o strace-kexec.o `test -f 'kexec.c' || echo '$(srcdir)/'`kexec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-kexec.Tpo $(DEPDIR)/strace-kexec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kexec.c' object='strace-kexec.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-kexec.o `test -f 'kexec.c' || echo '$(srcdir)/'`kexec.c + +strace-kexec.obj: kexec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-kexec.obj -MD -MP -MF $(DEPDIR)/strace-kexec.Tpo -c -o strace-kexec.obj `if test -f 'kexec.c'; then $(CYGPATH_W) 'kexec.c'; else $(CYGPATH_W) '$(srcdir)/kexec.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-kexec.Tpo $(DEPDIR)/strace-kexec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kexec.c' object='strace-kexec.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-kexec.obj `if test -f 'kexec.c'; then $(CYGPATH_W) 'kexec.c'; else $(CYGPATH_W) '$(srcdir)/kexec.c'; fi` + +strace-keyctl.o: keyctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-keyctl.o -MD -MP -MF $(DEPDIR)/strace-keyctl.Tpo -c -o strace-keyctl.o `test -f 'keyctl.c' || echo '$(srcdir)/'`keyctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-keyctl.Tpo $(DEPDIR)/strace-keyctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='keyctl.c' object='strace-keyctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-keyctl.o `test -f 'keyctl.c' || echo '$(srcdir)/'`keyctl.c + +strace-keyctl.obj: keyctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-keyctl.obj -MD -MP -MF $(DEPDIR)/strace-keyctl.Tpo -c -o strace-keyctl.obj `if test -f 'keyctl.c'; then $(CYGPATH_W) 'keyctl.c'; else $(CYGPATH_W) '$(srcdir)/keyctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-keyctl.Tpo $(DEPDIR)/strace-keyctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='keyctl.c' object='strace-keyctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-keyctl.obj `if test -f 'keyctl.c'; then $(CYGPATH_W) 'keyctl.c'; else $(CYGPATH_W) '$(srcdir)/keyctl.c'; fi` + +strace-ldt.o: ldt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ldt.o -MD -MP -MF $(DEPDIR)/strace-ldt.Tpo -c -o strace-ldt.o `test -f 'ldt.c' || echo '$(srcdir)/'`ldt.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ldt.Tpo $(DEPDIR)/strace-ldt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ldt.c' object='strace-ldt.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ldt.o `test -f 'ldt.c' || echo '$(srcdir)/'`ldt.c + +strace-ldt.obj: ldt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ldt.obj -MD -MP -MF $(DEPDIR)/strace-ldt.Tpo -c -o strace-ldt.obj `if test -f 'ldt.c'; then $(CYGPATH_W) 'ldt.c'; else $(CYGPATH_W) '$(srcdir)/ldt.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ldt.Tpo $(DEPDIR)/strace-ldt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ldt.c' object='strace-ldt.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ldt.obj `if test -f 'ldt.c'; then $(CYGPATH_W) 'ldt.c'; else $(CYGPATH_W) '$(srcdir)/ldt.c'; fi` + +strace-link.o: link.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-link.o -MD -MP -MF $(DEPDIR)/strace-link.Tpo -c -o strace-link.o `test -f 'link.c' || echo '$(srcdir)/'`link.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-link.Tpo $(DEPDIR)/strace-link.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='link.c' object='strace-link.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-link.o `test -f 'link.c' || echo '$(srcdir)/'`link.c + +strace-link.obj: link.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-link.obj -MD -MP -MF $(DEPDIR)/strace-link.Tpo -c -o strace-link.obj `if test -f 'link.c'; then $(CYGPATH_W) 'link.c'; else $(CYGPATH_W) '$(srcdir)/link.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-link.Tpo $(DEPDIR)/strace-link.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='link.c' object='strace-link.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-link.obj `if test -f 'link.c'; then $(CYGPATH_W) 'link.c'; else $(CYGPATH_W) '$(srcdir)/link.c'; fi` + +strace-lookup_dcookie.o: lookup_dcookie.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-lookup_dcookie.o -MD -MP -MF $(DEPDIR)/strace-lookup_dcookie.Tpo -c -o strace-lookup_dcookie.o `test -f 'lookup_dcookie.c' || echo '$(srcdir)/'`lookup_dcookie.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-lookup_dcookie.Tpo $(DEPDIR)/strace-lookup_dcookie.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lookup_dcookie.c' object='strace-lookup_dcookie.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-lookup_dcookie.o `test -f 'lookup_dcookie.c' || echo '$(srcdir)/'`lookup_dcookie.c + +strace-lookup_dcookie.obj: lookup_dcookie.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-lookup_dcookie.obj -MD -MP -MF $(DEPDIR)/strace-lookup_dcookie.Tpo -c -o strace-lookup_dcookie.obj `if test -f 'lookup_dcookie.c'; then $(CYGPATH_W) 'lookup_dcookie.c'; else $(CYGPATH_W) '$(srcdir)/lookup_dcookie.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-lookup_dcookie.Tpo $(DEPDIR)/strace-lookup_dcookie.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lookup_dcookie.c' object='strace-lookup_dcookie.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-lookup_dcookie.obj `if test -f 'lookup_dcookie.c'; then $(CYGPATH_W) 'lookup_dcookie.c'; else $(CYGPATH_W) '$(srcdir)/lookup_dcookie.c'; fi` + +strace-loop.o: loop.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-loop.o -MD -MP -MF $(DEPDIR)/strace-loop.Tpo -c -o strace-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-loop.Tpo $(DEPDIR)/strace-loop.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loop.c' object='strace-loop.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-loop.o `test -f 'loop.c' || echo '$(srcdir)/'`loop.c + +strace-loop.obj: loop.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-loop.obj -MD -MP -MF $(DEPDIR)/strace-loop.Tpo -c -o strace-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-loop.Tpo $(DEPDIR)/strace-loop.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='loop.c' object='strace-loop.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-loop.obj `if test -f 'loop.c'; then $(CYGPATH_W) 'loop.c'; else $(CYGPATH_W) '$(srcdir)/loop.c'; fi` + +strace-lseek.o: lseek.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-lseek.o -MD -MP -MF $(DEPDIR)/strace-lseek.Tpo -c -o strace-lseek.o `test -f 'lseek.c' || echo '$(srcdir)/'`lseek.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-lseek.Tpo $(DEPDIR)/strace-lseek.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lseek.c' object='strace-lseek.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-lseek.o `test -f 'lseek.c' || echo '$(srcdir)/'`lseek.c + +strace-lseek.obj: lseek.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-lseek.obj -MD -MP -MF $(DEPDIR)/strace-lseek.Tpo -c -o strace-lseek.obj `if test -f 'lseek.c'; then $(CYGPATH_W) 'lseek.c'; else $(CYGPATH_W) '$(srcdir)/lseek.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-lseek.Tpo $(DEPDIR)/strace-lseek.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lseek.c' object='strace-lseek.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-lseek.obj `if test -f 'lseek.c'; then $(CYGPATH_W) 'lseek.c'; else $(CYGPATH_W) '$(srcdir)/lseek.c'; fi` + +strace-mem.o: mem.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mem.o -MD -MP -MF $(DEPDIR)/strace-mem.Tpo -c -o strace-mem.o `test -f 'mem.c' || echo '$(srcdir)/'`mem.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mem.Tpo $(DEPDIR)/strace-mem.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mem.c' object='strace-mem.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mem.o `test -f 'mem.c' || echo '$(srcdir)/'`mem.c + +strace-mem.obj: mem.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mem.obj -MD -MP -MF $(DEPDIR)/strace-mem.Tpo -c -o strace-mem.obj `if test -f 'mem.c'; then $(CYGPATH_W) 'mem.c'; else $(CYGPATH_W) '$(srcdir)/mem.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mem.Tpo $(DEPDIR)/strace-mem.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mem.c' object='strace-mem.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mem.obj `if test -f 'mem.c'; then $(CYGPATH_W) 'mem.c'; else $(CYGPATH_W) '$(srcdir)/mem.c'; fi` + +strace-membarrier.o: membarrier.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-membarrier.o -MD -MP -MF $(DEPDIR)/strace-membarrier.Tpo -c -o strace-membarrier.o `test -f 'membarrier.c' || echo '$(srcdir)/'`membarrier.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-membarrier.Tpo $(DEPDIR)/strace-membarrier.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='membarrier.c' object='strace-membarrier.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-membarrier.o `test -f 'membarrier.c' || echo '$(srcdir)/'`membarrier.c + +strace-membarrier.obj: membarrier.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-membarrier.obj -MD -MP -MF $(DEPDIR)/strace-membarrier.Tpo -c -o strace-membarrier.obj `if test -f 'membarrier.c'; then $(CYGPATH_W) 'membarrier.c'; else $(CYGPATH_W) '$(srcdir)/membarrier.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-membarrier.Tpo $(DEPDIR)/strace-membarrier.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='membarrier.c' object='strace-membarrier.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-membarrier.obj `if test -f 'membarrier.c'; then $(CYGPATH_W) 'membarrier.c'; else $(CYGPATH_W) '$(srcdir)/membarrier.c'; fi` + +strace-memfd_create.o: memfd_create.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-memfd_create.o -MD -MP -MF $(DEPDIR)/strace-memfd_create.Tpo -c -o strace-memfd_create.o `test -f 'memfd_create.c' || echo '$(srcdir)/'`memfd_create.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-memfd_create.Tpo $(DEPDIR)/strace-memfd_create.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='memfd_create.c' object='strace-memfd_create.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-memfd_create.o `test -f 'memfd_create.c' || echo '$(srcdir)/'`memfd_create.c + +strace-memfd_create.obj: memfd_create.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-memfd_create.obj -MD -MP -MF $(DEPDIR)/strace-memfd_create.Tpo -c -o strace-memfd_create.obj `if test -f 'memfd_create.c'; then $(CYGPATH_W) 'memfd_create.c'; else $(CYGPATH_W) '$(srcdir)/memfd_create.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-memfd_create.Tpo $(DEPDIR)/strace-memfd_create.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='memfd_create.c' object='strace-memfd_create.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-memfd_create.obj `if test -f 'memfd_create.c'; then $(CYGPATH_W) 'memfd_create.c'; else $(CYGPATH_W) '$(srcdir)/memfd_create.c'; fi` + +strace-mknod.o: mknod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mknod.o -MD -MP -MF $(DEPDIR)/strace-mknod.Tpo -c -o strace-mknod.o `test -f 'mknod.c' || echo '$(srcdir)/'`mknod.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mknod.Tpo $(DEPDIR)/strace-mknod.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mknod.c' object='strace-mknod.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mknod.o `test -f 'mknod.c' || echo '$(srcdir)/'`mknod.c + +strace-mknod.obj: mknod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mknod.obj -MD -MP -MF $(DEPDIR)/strace-mknod.Tpo -c -o strace-mknod.obj `if test -f 'mknod.c'; then $(CYGPATH_W) 'mknod.c'; else $(CYGPATH_W) '$(srcdir)/mknod.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mknod.Tpo $(DEPDIR)/strace-mknod.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mknod.c' object='strace-mknod.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mknod.obj `if test -f 'mknod.c'; then $(CYGPATH_W) 'mknod.c'; else $(CYGPATH_W) '$(srcdir)/mknod.c'; fi` + +strace-mmsghdr.o: mmsghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mmsghdr.o -MD -MP -MF $(DEPDIR)/strace-mmsghdr.Tpo -c -o strace-mmsghdr.o `test -f 'mmsghdr.c' || echo '$(srcdir)/'`mmsghdr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mmsghdr.Tpo $(DEPDIR)/strace-mmsghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mmsghdr.c' object='strace-mmsghdr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mmsghdr.o `test -f 'mmsghdr.c' || echo '$(srcdir)/'`mmsghdr.c + +strace-mmsghdr.obj: mmsghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mmsghdr.obj -MD -MP -MF $(DEPDIR)/strace-mmsghdr.Tpo -c -o strace-mmsghdr.obj `if test -f 'mmsghdr.c'; then $(CYGPATH_W) 'mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/mmsghdr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mmsghdr.Tpo $(DEPDIR)/strace-mmsghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mmsghdr.c' object='strace-mmsghdr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mmsghdr.obj `if test -f 'mmsghdr.c'; then $(CYGPATH_W) 'mmsghdr.c'; else $(CYGPATH_W) '$(srcdir)/mmsghdr.c'; fi` + +strace-mount.o: mount.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mount.o -MD -MP -MF $(DEPDIR)/strace-mount.Tpo -c -o strace-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mount.Tpo $(DEPDIR)/strace-mount.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mount.c' object='strace-mount.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c + +strace-mount.obj: mount.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mount.obj -MD -MP -MF $(DEPDIR)/strace-mount.Tpo -c -o strace-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mount.Tpo $(DEPDIR)/strace-mount.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mount.c' object='strace-mount.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi` + +strace-mq.o: mq.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mq.o -MD -MP -MF $(DEPDIR)/strace-mq.Tpo -c -o strace-mq.o `test -f 'mq.c' || echo '$(srcdir)/'`mq.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mq.Tpo $(DEPDIR)/strace-mq.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mq.c' object='strace-mq.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mq.o `test -f 'mq.c' || echo '$(srcdir)/'`mq.c + +strace-mq.obj: mq.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mq.obj -MD -MP -MF $(DEPDIR)/strace-mq.Tpo -c -o strace-mq.obj `if test -f 'mq.c'; then $(CYGPATH_W) 'mq.c'; else $(CYGPATH_W) '$(srcdir)/mq.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mq.Tpo $(DEPDIR)/strace-mq.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mq.c' object='strace-mq.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mq.obj `if test -f 'mq.c'; then $(CYGPATH_W) 'mq.c'; else $(CYGPATH_W) '$(srcdir)/mq.c'; fi` + +strace-msghdr.o: msghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-msghdr.o -MD -MP -MF $(DEPDIR)/strace-msghdr.Tpo -c -o strace-msghdr.o `test -f 'msghdr.c' || echo '$(srcdir)/'`msghdr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-msghdr.Tpo $(DEPDIR)/strace-msghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='msghdr.c' object='strace-msghdr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-msghdr.o `test -f 'msghdr.c' || echo '$(srcdir)/'`msghdr.c + +strace-msghdr.obj: msghdr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-msghdr.obj -MD -MP -MF $(DEPDIR)/strace-msghdr.Tpo -c -o strace-msghdr.obj `if test -f 'msghdr.c'; then $(CYGPATH_W) 'msghdr.c'; else $(CYGPATH_W) '$(srcdir)/msghdr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-msghdr.Tpo $(DEPDIR)/strace-msghdr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='msghdr.c' object='strace-msghdr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-msghdr.obj `if test -f 'msghdr.c'; then $(CYGPATH_W) 'msghdr.c'; else $(CYGPATH_W) '$(srcdir)/msghdr.c'; fi` + +strace-mtd.o: mtd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mtd.o -MD -MP -MF $(DEPDIR)/strace-mtd.Tpo -c -o strace-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mtd.Tpo $(DEPDIR)/strace-mtd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mtd.c' object='strace-mtd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mtd.o `test -f 'mtd.c' || echo '$(srcdir)/'`mtd.c + +strace-mtd.obj: mtd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-mtd.obj -MD -MP -MF $(DEPDIR)/strace-mtd.Tpo -c -o strace-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-mtd.Tpo $(DEPDIR)/strace-mtd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mtd.c' object='strace-mtd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-mtd.obj `if test -f 'mtd.c'; then $(CYGPATH_W) 'mtd.c'; else $(CYGPATH_W) '$(srcdir)/mtd.c'; fi` + +strace-net.o: net.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-net.o -MD -MP -MF $(DEPDIR)/strace-net.Tpo -c -o strace-net.o `test -f 'net.c' || echo '$(srcdir)/'`net.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-net.Tpo $(DEPDIR)/strace-net.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='net.c' object='strace-net.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-net.o `test -f 'net.c' || echo '$(srcdir)/'`net.c + +strace-net.obj: net.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-net.obj -MD -MP -MF $(DEPDIR)/strace-net.Tpo -c -o strace-net.obj `if test -f 'net.c'; then $(CYGPATH_W) 'net.c'; else $(CYGPATH_W) '$(srcdir)/net.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-net.Tpo $(DEPDIR)/strace-net.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='net.c' object='strace-net.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-net.obj `if test -f 'net.c'; then $(CYGPATH_W) 'net.c'; else $(CYGPATH_W) '$(srcdir)/net.c'; fi` + +strace-netlink.o: netlink.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-netlink.o -MD -MP -MF $(DEPDIR)/strace-netlink.Tpo -c -o strace-netlink.o `test -f 'netlink.c' || echo '$(srcdir)/'`netlink.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-netlink.Tpo $(DEPDIR)/strace-netlink.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='netlink.c' object='strace-netlink.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-netlink.o `test -f 'netlink.c' || echo '$(srcdir)/'`netlink.c + +strace-netlink.obj: netlink.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-netlink.obj -MD -MP -MF $(DEPDIR)/strace-netlink.Tpo -c -o strace-netlink.obj `if test -f 'netlink.c'; then $(CYGPATH_W) 'netlink.c'; else $(CYGPATH_W) '$(srcdir)/netlink.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-netlink.Tpo $(DEPDIR)/strace-netlink.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='netlink.c' object='strace-netlink.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-netlink.obj `if test -f 'netlink.c'; then $(CYGPATH_W) 'netlink.c'; else $(CYGPATH_W) '$(srcdir)/netlink.c'; fi` + +strace-numa.o: numa.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-numa.o -MD -MP -MF $(DEPDIR)/strace-numa.Tpo -c -o strace-numa.o `test -f 'numa.c' || echo '$(srcdir)/'`numa.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-numa.Tpo $(DEPDIR)/strace-numa.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='numa.c' object='strace-numa.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-numa.o `test -f 'numa.c' || echo '$(srcdir)/'`numa.c + +strace-numa.obj: numa.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-numa.obj -MD -MP -MF $(DEPDIR)/strace-numa.Tpo -c -o strace-numa.obj `if test -f 'numa.c'; then $(CYGPATH_W) 'numa.c'; else $(CYGPATH_W) '$(srcdir)/numa.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-numa.Tpo $(DEPDIR)/strace-numa.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='numa.c' object='strace-numa.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-numa.obj `if test -f 'numa.c'; then $(CYGPATH_W) 'numa.c'; else $(CYGPATH_W) '$(srcdir)/numa.c'; fi` + +strace-oldstat.o: oldstat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-oldstat.o -MD -MP -MF $(DEPDIR)/strace-oldstat.Tpo -c -o strace-oldstat.o `test -f 'oldstat.c' || echo '$(srcdir)/'`oldstat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-oldstat.Tpo $(DEPDIR)/strace-oldstat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oldstat.c' object='strace-oldstat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-oldstat.o `test -f 'oldstat.c' || echo '$(srcdir)/'`oldstat.c + +strace-oldstat.obj: oldstat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-oldstat.obj -MD -MP -MF $(DEPDIR)/strace-oldstat.Tpo -c -o strace-oldstat.obj `if test -f 'oldstat.c'; then $(CYGPATH_W) 'oldstat.c'; else $(CYGPATH_W) '$(srcdir)/oldstat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-oldstat.Tpo $(DEPDIR)/strace-oldstat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oldstat.c' object='strace-oldstat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-oldstat.obj `if test -f 'oldstat.c'; then $(CYGPATH_W) 'oldstat.c'; else $(CYGPATH_W) '$(srcdir)/oldstat.c'; fi` + +strace-open.o: open.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-open.o -MD -MP -MF $(DEPDIR)/strace-open.Tpo -c -o strace-open.o `test -f 'open.c' || echo '$(srcdir)/'`open.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-open.Tpo $(DEPDIR)/strace-open.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='open.c' object='strace-open.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-open.o `test -f 'open.c' || echo '$(srcdir)/'`open.c + +strace-open.obj: open.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-open.obj -MD -MP -MF $(DEPDIR)/strace-open.Tpo -c -o strace-open.obj `if test -f 'open.c'; then $(CYGPATH_W) 'open.c'; else $(CYGPATH_W) '$(srcdir)/open.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-open.Tpo $(DEPDIR)/strace-open.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='open.c' object='strace-open.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-open.obj `if test -f 'open.c'; then $(CYGPATH_W) 'open.c'; else $(CYGPATH_W) '$(srcdir)/open.c'; fi` + +strace-or1k_atomic.o: or1k_atomic.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-or1k_atomic.o -MD -MP -MF $(DEPDIR)/strace-or1k_atomic.Tpo -c -o strace-or1k_atomic.o `test -f 'or1k_atomic.c' || echo '$(srcdir)/'`or1k_atomic.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-or1k_atomic.Tpo $(DEPDIR)/strace-or1k_atomic.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='or1k_atomic.c' object='strace-or1k_atomic.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-or1k_atomic.o `test -f 'or1k_atomic.c' || echo '$(srcdir)/'`or1k_atomic.c + +strace-or1k_atomic.obj: or1k_atomic.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-or1k_atomic.obj -MD -MP -MF $(DEPDIR)/strace-or1k_atomic.Tpo -c -o strace-or1k_atomic.obj `if test -f 'or1k_atomic.c'; then $(CYGPATH_W) 'or1k_atomic.c'; else $(CYGPATH_W) '$(srcdir)/or1k_atomic.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-or1k_atomic.Tpo $(DEPDIR)/strace-or1k_atomic.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='or1k_atomic.c' object='strace-or1k_atomic.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-or1k_atomic.obj `if test -f 'or1k_atomic.c'; then $(CYGPATH_W) 'or1k_atomic.c'; else $(CYGPATH_W) '$(srcdir)/or1k_atomic.c'; fi` + +strace-pathtrace.o: pathtrace.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-pathtrace.o -MD -MP -MF $(DEPDIR)/strace-pathtrace.Tpo -c -o strace-pathtrace.o `test -f 'pathtrace.c' || echo '$(srcdir)/'`pathtrace.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-pathtrace.Tpo $(DEPDIR)/strace-pathtrace.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pathtrace.c' object='strace-pathtrace.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-pathtrace.o `test -f 'pathtrace.c' || echo '$(srcdir)/'`pathtrace.c + +strace-pathtrace.obj: pathtrace.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-pathtrace.obj -MD -MP -MF $(DEPDIR)/strace-pathtrace.Tpo -c -o strace-pathtrace.obj `if test -f 'pathtrace.c'; then $(CYGPATH_W) 'pathtrace.c'; else $(CYGPATH_W) '$(srcdir)/pathtrace.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-pathtrace.Tpo $(DEPDIR)/strace-pathtrace.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pathtrace.c' object='strace-pathtrace.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-pathtrace.obj `if test -f 'pathtrace.c'; then $(CYGPATH_W) 'pathtrace.c'; else $(CYGPATH_W) '$(srcdir)/pathtrace.c'; fi` + +strace-perf.o: perf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-perf.o -MD -MP -MF $(DEPDIR)/strace-perf.Tpo -c -o strace-perf.o `test -f 'perf.c' || echo '$(srcdir)/'`perf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-perf.Tpo $(DEPDIR)/strace-perf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='perf.c' object='strace-perf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-perf.o `test -f 'perf.c' || echo '$(srcdir)/'`perf.c + +strace-perf.obj: perf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-perf.obj -MD -MP -MF $(DEPDIR)/strace-perf.Tpo -c -o strace-perf.obj `if test -f 'perf.c'; then $(CYGPATH_W) 'perf.c'; else $(CYGPATH_W) '$(srcdir)/perf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-perf.Tpo $(DEPDIR)/strace-perf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='perf.c' object='strace-perf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-perf.obj `if test -f 'perf.c'; then $(CYGPATH_W) 'perf.c'; else $(CYGPATH_W) '$(srcdir)/perf.c'; fi` + +strace-personality.o: personality.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-personality.o -MD -MP -MF $(DEPDIR)/strace-personality.Tpo -c -o strace-personality.o `test -f 'personality.c' || echo '$(srcdir)/'`personality.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-personality.Tpo $(DEPDIR)/strace-personality.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='personality.c' object='strace-personality.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-personality.o `test -f 'personality.c' || echo '$(srcdir)/'`personality.c + +strace-personality.obj: personality.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-personality.obj -MD -MP -MF $(DEPDIR)/strace-personality.Tpo -c -o strace-personality.obj `if test -f 'personality.c'; then $(CYGPATH_W) 'personality.c'; else $(CYGPATH_W) '$(srcdir)/personality.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-personality.Tpo $(DEPDIR)/strace-personality.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='personality.c' object='strace-personality.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-personality.obj `if test -f 'personality.c'; then $(CYGPATH_W) 'personality.c'; else $(CYGPATH_W) '$(srcdir)/personality.c'; fi` + +strace-pkeys.o: pkeys.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-pkeys.o -MD -MP -MF $(DEPDIR)/strace-pkeys.Tpo -c -o strace-pkeys.o `test -f 'pkeys.c' || echo '$(srcdir)/'`pkeys.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-pkeys.Tpo $(DEPDIR)/strace-pkeys.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pkeys.c' object='strace-pkeys.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-pkeys.o `test -f 'pkeys.c' || echo '$(srcdir)/'`pkeys.c + +strace-pkeys.obj: pkeys.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-pkeys.obj -MD -MP -MF $(DEPDIR)/strace-pkeys.Tpo -c -o strace-pkeys.obj `if test -f 'pkeys.c'; then $(CYGPATH_W) 'pkeys.c'; else $(CYGPATH_W) '$(srcdir)/pkeys.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-pkeys.Tpo $(DEPDIR)/strace-pkeys.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pkeys.c' object='strace-pkeys.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-pkeys.obj `if test -f 'pkeys.c'; then $(CYGPATH_W) 'pkeys.c'; else $(CYGPATH_W) '$(srcdir)/pkeys.c'; fi` + +strace-poll.o: poll.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-poll.o -MD -MP -MF $(DEPDIR)/strace-poll.Tpo -c -o strace-poll.o `test -f 'poll.c' || echo '$(srcdir)/'`poll.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-poll.Tpo $(DEPDIR)/strace-poll.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='poll.c' object='strace-poll.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-poll.o `test -f 'poll.c' || echo '$(srcdir)/'`poll.c + +strace-poll.obj: poll.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-poll.obj -MD -MP -MF $(DEPDIR)/strace-poll.Tpo -c -o strace-poll.obj `if test -f 'poll.c'; then $(CYGPATH_W) 'poll.c'; else $(CYGPATH_W) '$(srcdir)/poll.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-poll.Tpo $(DEPDIR)/strace-poll.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='poll.c' object='strace-poll.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-poll.obj `if test -f 'poll.c'; then $(CYGPATH_W) 'poll.c'; else $(CYGPATH_W) '$(srcdir)/poll.c'; fi` + +strace-prctl.o: prctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-prctl.o -MD -MP -MF $(DEPDIR)/strace-prctl.Tpo -c -o strace-prctl.o `test -f 'prctl.c' || echo '$(srcdir)/'`prctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-prctl.Tpo $(DEPDIR)/strace-prctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='prctl.c' object='strace-prctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-prctl.o `test -f 'prctl.c' || echo '$(srcdir)/'`prctl.c + +strace-prctl.obj: prctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-prctl.obj -MD -MP -MF $(DEPDIR)/strace-prctl.Tpo -c -o strace-prctl.obj `if test -f 'prctl.c'; then $(CYGPATH_W) 'prctl.c'; else $(CYGPATH_W) '$(srcdir)/prctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-prctl.Tpo $(DEPDIR)/strace-prctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='prctl.c' object='strace-prctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-prctl.obj `if test -f 'prctl.c'; then $(CYGPATH_W) 'prctl.c'; else $(CYGPATH_W) '$(srcdir)/prctl.c'; fi` + +strace-print_dev_t.o: print_dev_t.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_dev_t.o -MD -MP -MF $(DEPDIR)/strace-print_dev_t.Tpo -c -o strace-print_dev_t.o `test -f 'print_dev_t.c' || echo '$(srcdir)/'`print_dev_t.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_dev_t.Tpo $(DEPDIR)/strace-print_dev_t.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_dev_t.c' object='strace-print_dev_t.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_dev_t.o `test -f 'print_dev_t.c' || echo '$(srcdir)/'`print_dev_t.c + +strace-print_dev_t.obj: print_dev_t.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_dev_t.obj -MD -MP -MF $(DEPDIR)/strace-print_dev_t.Tpo -c -o strace-print_dev_t.obj `if test -f 'print_dev_t.c'; then $(CYGPATH_W) 'print_dev_t.c'; else $(CYGPATH_W) '$(srcdir)/print_dev_t.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_dev_t.Tpo $(DEPDIR)/strace-print_dev_t.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_dev_t.c' object='strace-print_dev_t.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_dev_t.obj `if test -f 'print_dev_t.c'; then $(CYGPATH_W) 'print_dev_t.c'; else $(CYGPATH_W) '$(srcdir)/print_dev_t.c'; fi` + +strace-print_mq_attr.o: print_mq_attr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_mq_attr.o -MD -MP -MF $(DEPDIR)/strace-print_mq_attr.Tpo -c -o strace-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_mq_attr.Tpo $(DEPDIR)/strace-print_mq_attr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_mq_attr.c' object='strace-print_mq_attr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_mq_attr.o `test -f 'print_mq_attr.c' || echo '$(srcdir)/'`print_mq_attr.c + +strace-print_mq_attr.obj: print_mq_attr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_mq_attr.obj -MD -MP -MF $(DEPDIR)/strace-print_mq_attr.Tpo -c -o strace-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_mq_attr.Tpo $(DEPDIR)/strace-print_mq_attr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_mq_attr.c' object='strace-print_mq_attr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_mq_attr.obj `if test -f 'print_mq_attr.c'; then $(CYGPATH_W) 'print_mq_attr.c'; else $(CYGPATH_W) '$(srcdir)/print_mq_attr.c'; fi` + +strace-print_msgbuf.o: print_msgbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_msgbuf.o -MD -MP -MF $(DEPDIR)/strace-print_msgbuf.Tpo -c -o strace-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_msgbuf.Tpo $(DEPDIR)/strace-print_msgbuf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_msgbuf.c' object='strace-print_msgbuf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_msgbuf.o `test -f 'print_msgbuf.c' || echo '$(srcdir)/'`print_msgbuf.c + +strace-print_msgbuf.obj: print_msgbuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_msgbuf.obj -MD -MP -MF $(DEPDIR)/strace-print_msgbuf.Tpo -c -o strace-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_msgbuf.Tpo $(DEPDIR)/strace-print_msgbuf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_msgbuf.c' object='strace-print_msgbuf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_msgbuf.obj `if test -f 'print_msgbuf.c'; then $(CYGPATH_W) 'print_msgbuf.c'; else $(CYGPATH_W) '$(srcdir)/print_msgbuf.c'; fi` + +strace-print_sg_req_info.o: print_sg_req_info.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_sg_req_info.o -MD -MP -MF $(DEPDIR)/strace-print_sg_req_info.Tpo -c -o strace-print_sg_req_info.o `test -f 'print_sg_req_info.c' || echo '$(srcdir)/'`print_sg_req_info.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_sg_req_info.Tpo $(DEPDIR)/strace-print_sg_req_info.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sg_req_info.c' object='strace-print_sg_req_info.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_sg_req_info.o `test -f 'print_sg_req_info.c' || echo '$(srcdir)/'`print_sg_req_info.c + +strace-print_sg_req_info.obj: print_sg_req_info.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_sg_req_info.obj -MD -MP -MF $(DEPDIR)/strace-print_sg_req_info.Tpo -c -o strace-print_sg_req_info.obj `if test -f 'print_sg_req_info.c'; then $(CYGPATH_W) 'print_sg_req_info.c'; else $(CYGPATH_W) '$(srcdir)/print_sg_req_info.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_sg_req_info.Tpo $(DEPDIR)/strace-print_sg_req_info.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sg_req_info.c' object='strace-print_sg_req_info.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_sg_req_info.obj `if test -f 'print_sg_req_info.c'; then $(CYGPATH_W) 'print_sg_req_info.c'; else $(CYGPATH_W) '$(srcdir)/print_sg_req_info.c'; fi` + +strace-print_sigevent.o: print_sigevent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_sigevent.o -MD -MP -MF $(DEPDIR)/strace-print_sigevent.Tpo -c -o strace-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_sigevent.Tpo $(DEPDIR)/strace-print_sigevent.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sigevent.c' object='strace-print_sigevent.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_sigevent.o `test -f 'print_sigevent.c' || echo '$(srcdir)/'`print_sigevent.c + +strace-print_sigevent.obj: print_sigevent.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_sigevent.obj -MD -MP -MF $(DEPDIR)/strace-print_sigevent.Tpo -c -o strace-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_sigevent.Tpo $(DEPDIR)/strace-print_sigevent.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_sigevent.c' object='strace-print_sigevent.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_sigevent.obj `if test -f 'print_sigevent.c'; then $(CYGPATH_W) 'print_sigevent.c'; else $(CYGPATH_W) '$(srcdir)/print_sigevent.c'; fi` + +strace-print_statfs.o: print_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_statfs.o -MD -MP -MF $(DEPDIR)/strace-print_statfs.Tpo -c -o strace-print_statfs.o `test -f 'print_statfs.c' || echo '$(srcdir)/'`print_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_statfs.Tpo $(DEPDIR)/strace-print_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_statfs.c' object='strace-print_statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_statfs.o `test -f 'print_statfs.c' || echo '$(srcdir)/'`print_statfs.c + +strace-print_statfs.obj: print_statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_statfs.obj -MD -MP -MF $(DEPDIR)/strace-print_statfs.Tpo -c -o strace-print_statfs.obj `if test -f 'print_statfs.c'; then $(CYGPATH_W) 'print_statfs.c'; else $(CYGPATH_W) '$(srcdir)/print_statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_statfs.Tpo $(DEPDIR)/strace-print_statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_statfs.c' object='strace-print_statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_statfs.obj `if test -f 'print_statfs.c'; then $(CYGPATH_W) 'print_statfs.c'; else $(CYGPATH_W) '$(srcdir)/print_statfs.c'; fi` + +strace-print_struct_stat.o: print_struct_stat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_struct_stat.o -MD -MP -MF $(DEPDIR)/strace-print_struct_stat.Tpo -c -o strace-print_struct_stat.o `test -f 'print_struct_stat.c' || echo '$(srcdir)/'`print_struct_stat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_struct_stat.Tpo $(DEPDIR)/strace-print_struct_stat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_struct_stat.c' object='strace-print_struct_stat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_struct_stat.o `test -f 'print_struct_stat.c' || echo '$(srcdir)/'`print_struct_stat.c + +strace-print_struct_stat.obj: print_struct_stat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_struct_stat.obj -MD -MP -MF $(DEPDIR)/strace-print_struct_stat.Tpo -c -o strace-print_struct_stat.obj `if test -f 'print_struct_stat.c'; then $(CYGPATH_W) 'print_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/print_struct_stat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_struct_stat.Tpo $(DEPDIR)/strace-print_struct_stat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_struct_stat.c' object='strace-print_struct_stat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_struct_stat.obj `if test -f 'print_struct_stat.c'; then $(CYGPATH_W) 'print_struct_stat.c'; else $(CYGPATH_W) '$(srcdir)/print_struct_stat.c'; fi` + +strace-print_time.o: print_time.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_time.o -MD -MP -MF $(DEPDIR)/strace-print_time.Tpo -c -o strace-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_time.Tpo $(DEPDIR)/strace-print_time.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_time.c' object='strace-print_time.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_time.o `test -f 'print_time.c' || echo '$(srcdir)/'`print_time.c + +strace-print_time.obj: print_time.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_time.obj -MD -MP -MF $(DEPDIR)/strace-print_time.Tpo -c -o strace-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_time.Tpo $(DEPDIR)/strace-print_time.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_time.c' object='strace-print_time.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_time.obj `if test -f 'print_time.c'; then $(CYGPATH_W) 'print_time.c'; else $(CYGPATH_W) '$(srcdir)/print_time.c'; fi` + +strace-print_timespec.o: print_timespec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timespec.o -MD -MP -MF $(DEPDIR)/strace-print_timespec.Tpo -c -o strace-print_timespec.o `test -f 'print_timespec.c' || echo '$(srcdir)/'`print_timespec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timespec.Tpo $(DEPDIR)/strace-print_timespec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timespec.c' object='strace-print_timespec.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timespec.o `test -f 'print_timespec.c' || echo '$(srcdir)/'`print_timespec.c + +strace-print_timespec.obj: print_timespec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timespec.obj -MD -MP -MF $(DEPDIR)/strace-print_timespec.Tpo -c -o strace-print_timespec.obj `if test -f 'print_timespec.c'; then $(CYGPATH_W) 'print_timespec.c'; else $(CYGPATH_W) '$(srcdir)/print_timespec.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timespec.Tpo $(DEPDIR)/strace-print_timespec.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timespec.c' object='strace-print_timespec.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timespec.obj `if test -f 'print_timespec.c'; then $(CYGPATH_W) 'print_timespec.c'; else $(CYGPATH_W) '$(srcdir)/print_timespec.c'; fi` + +strace-print_timeval.o: print_timeval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timeval.o -MD -MP -MF $(DEPDIR)/strace-print_timeval.Tpo -c -o strace-print_timeval.o `test -f 'print_timeval.c' || echo '$(srcdir)/'`print_timeval.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timeval.Tpo $(DEPDIR)/strace-print_timeval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timeval.c' object='strace-print_timeval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timeval.o `test -f 'print_timeval.c' || echo '$(srcdir)/'`print_timeval.c + +strace-print_timeval.obj: print_timeval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timeval.obj -MD -MP -MF $(DEPDIR)/strace-print_timeval.Tpo -c -o strace-print_timeval.obj `if test -f 'print_timeval.c'; then $(CYGPATH_W) 'print_timeval.c'; else $(CYGPATH_W) '$(srcdir)/print_timeval.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timeval.Tpo $(DEPDIR)/strace-print_timeval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timeval.c' object='strace-print_timeval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timeval.obj `if test -f 'print_timeval.c'; then $(CYGPATH_W) 'print_timeval.c'; else $(CYGPATH_W) '$(srcdir)/print_timeval.c'; fi` + +strace-print_timex.o: print_timex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timex.o -MD -MP -MF $(DEPDIR)/strace-print_timex.Tpo -c -o strace-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timex.Tpo $(DEPDIR)/strace-print_timex.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timex.c' object='strace-print_timex.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timex.o `test -f 'print_timex.c' || echo '$(srcdir)/'`print_timex.c + +strace-print_timex.obj: print_timex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-print_timex.obj -MD -MP -MF $(DEPDIR)/strace-print_timex.Tpo -c -o strace-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-print_timex.Tpo $(DEPDIR)/strace-print_timex.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_timex.c' object='strace-print_timex.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-print_timex.obj `if test -f 'print_timex.c'; then $(CYGPATH_W) 'print_timex.c'; else $(CYGPATH_W) '$(srcdir)/print_timex.c'; fi` + +strace-printmode.o: printmode.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printmode.o -MD -MP -MF $(DEPDIR)/strace-printmode.Tpo -c -o strace-printmode.o `test -f 'printmode.c' || echo '$(srcdir)/'`printmode.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printmode.Tpo $(DEPDIR)/strace-printmode.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printmode.c' object='strace-printmode.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printmode.o `test -f 'printmode.c' || echo '$(srcdir)/'`printmode.c + +strace-printmode.obj: printmode.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printmode.obj -MD -MP -MF $(DEPDIR)/strace-printmode.Tpo -c -o strace-printmode.obj `if test -f 'printmode.c'; then $(CYGPATH_W) 'printmode.c'; else $(CYGPATH_W) '$(srcdir)/printmode.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printmode.Tpo $(DEPDIR)/strace-printmode.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printmode.c' object='strace-printmode.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printmode.obj `if test -f 'printmode.c'; then $(CYGPATH_W) 'printmode.c'; else $(CYGPATH_W) '$(srcdir)/printmode.c'; fi` + +strace-printrusage.o: printrusage.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printrusage.o -MD -MP -MF $(DEPDIR)/strace-printrusage.Tpo -c -o strace-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printrusage.Tpo $(DEPDIR)/strace-printrusage.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printrusage.c' object='strace-printrusage.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printrusage.o `test -f 'printrusage.c' || echo '$(srcdir)/'`printrusage.c + +strace-printrusage.obj: printrusage.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printrusage.obj -MD -MP -MF $(DEPDIR)/strace-printrusage.Tpo -c -o strace-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printrusage.Tpo $(DEPDIR)/strace-printrusage.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printrusage.c' object='strace-printrusage.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printrusage.obj `if test -f 'printrusage.c'; then $(CYGPATH_W) 'printrusage.c'; else $(CYGPATH_W) '$(srcdir)/printrusage.c'; fi` + +strace-printsiginfo.o: printsiginfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printsiginfo.o -MD -MP -MF $(DEPDIR)/strace-printsiginfo.Tpo -c -o strace-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printsiginfo.Tpo $(DEPDIR)/strace-printsiginfo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printsiginfo.c' object='strace-printsiginfo.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printsiginfo.o `test -f 'printsiginfo.c' || echo '$(srcdir)/'`printsiginfo.c + +strace-printsiginfo.obj: printsiginfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-printsiginfo.obj -MD -MP -MF $(DEPDIR)/strace-printsiginfo.Tpo -c -o strace-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-printsiginfo.Tpo $(DEPDIR)/strace-printsiginfo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printsiginfo.c' object='strace-printsiginfo.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-printsiginfo.obj `if test -f 'printsiginfo.c'; then $(CYGPATH_W) 'printsiginfo.c'; else $(CYGPATH_W) '$(srcdir)/printsiginfo.c'; fi` + +strace-process.o: process.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-process.o -MD -MP -MF $(DEPDIR)/strace-process.Tpo -c -o strace-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-process.Tpo $(DEPDIR)/strace-process.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='process.c' object='strace-process.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-process.o `test -f 'process.c' || echo '$(srcdir)/'`process.c + +strace-process.obj: process.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-process.obj -MD -MP -MF $(DEPDIR)/strace-process.Tpo -c -o strace-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-process.Tpo $(DEPDIR)/strace-process.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='process.c' object='strace-process.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-process.obj `if test -f 'process.c'; then $(CYGPATH_W) 'process.c'; else $(CYGPATH_W) '$(srcdir)/process.c'; fi` + +strace-process_vm.o: process_vm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-process_vm.o -MD -MP -MF $(DEPDIR)/strace-process_vm.Tpo -c -o strace-process_vm.o `test -f 'process_vm.c' || echo '$(srcdir)/'`process_vm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-process_vm.Tpo $(DEPDIR)/strace-process_vm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='process_vm.c' object='strace-process_vm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-process_vm.o `test -f 'process_vm.c' || echo '$(srcdir)/'`process_vm.c + +strace-process_vm.obj: process_vm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-process_vm.obj -MD -MP -MF $(DEPDIR)/strace-process_vm.Tpo -c -o strace-process_vm.obj `if test -f 'process_vm.c'; then $(CYGPATH_W) 'process_vm.c'; else $(CYGPATH_W) '$(srcdir)/process_vm.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-process_vm.Tpo $(DEPDIR)/strace-process_vm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='process_vm.c' object='strace-process_vm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-process_vm.obj `if test -f 'process_vm.c'; then $(CYGPATH_W) 'process_vm.c'; else $(CYGPATH_W) '$(srcdir)/process_vm.c'; fi` + +strace-ptp.o: ptp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ptp.o -MD -MP -MF $(DEPDIR)/strace-ptp.Tpo -c -o strace-ptp.o `test -f 'ptp.c' || echo '$(srcdir)/'`ptp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ptp.Tpo $(DEPDIR)/strace-ptp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ptp.c' object='strace-ptp.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ptp.o `test -f 'ptp.c' || echo '$(srcdir)/'`ptp.c + +strace-ptp.obj: ptp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ptp.obj -MD -MP -MF $(DEPDIR)/strace-ptp.Tpo -c -o strace-ptp.obj `if test -f 'ptp.c'; then $(CYGPATH_W) 'ptp.c'; else $(CYGPATH_W) '$(srcdir)/ptp.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ptp.Tpo $(DEPDIR)/strace-ptp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ptp.c' object='strace-ptp.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ptp.obj `if test -f 'ptp.c'; then $(CYGPATH_W) 'ptp.c'; else $(CYGPATH_W) '$(srcdir)/ptp.c'; fi` + +strace-qualify.o: qualify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-qualify.o -MD -MP -MF $(DEPDIR)/strace-qualify.Tpo -c -o strace-qualify.o `test -f 'qualify.c' || echo '$(srcdir)/'`qualify.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-qualify.Tpo $(DEPDIR)/strace-qualify.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qualify.c' object='strace-qualify.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-qualify.o `test -f 'qualify.c' || echo '$(srcdir)/'`qualify.c + +strace-qualify.obj: qualify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-qualify.obj -MD -MP -MF $(DEPDIR)/strace-qualify.Tpo -c -o strace-qualify.obj `if test -f 'qualify.c'; then $(CYGPATH_W) 'qualify.c'; else $(CYGPATH_W) '$(srcdir)/qualify.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-qualify.Tpo $(DEPDIR)/strace-qualify.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qualify.c' object='strace-qualify.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-qualify.obj `if test -f 'qualify.c'; then $(CYGPATH_W) 'qualify.c'; else $(CYGPATH_W) '$(srcdir)/qualify.c'; fi` + +strace-quota.o: quota.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-quota.o -MD -MP -MF $(DEPDIR)/strace-quota.Tpo -c -o strace-quota.o `test -f 'quota.c' || echo '$(srcdir)/'`quota.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-quota.Tpo $(DEPDIR)/strace-quota.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='quota.c' object='strace-quota.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-quota.o `test -f 'quota.c' || echo '$(srcdir)/'`quota.c + +strace-quota.obj: quota.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-quota.obj -MD -MP -MF $(DEPDIR)/strace-quota.Tpo -c -o strace-quota.obj `if test -f 'quota.c'; then $(CYGPATH_W) 'quota.c'; else $(CYGPATH_W) '$(srcdir)/quota.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-quota.Tpo $(DEPDIR)/strace-quota.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='quota.c' object='strace-quota.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-quota.obj `if test -f 'quota.c'; then $(CYGPATH_W) 'quota.c'; else $(CYGPATH_W) '$(srcdir)/quota.c'; fi` + +strace-readahead.o: readahead.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-readahead.o -MD -MP -MF $(DEPDIR)/strace-readahead.Tpo -c -o strace-readahead.o `test -f 'readahead.c' || echo '$(srcdir)/'`readahead.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-readahead.Tpo $(DEPDIR)/strace-readahead.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='readahead.c' object='strace-readahead.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-readahead.o `test -f 'readahead.c' || echo '$(srcdir)/'`readahead.c + +strace-readahead.obj: readahead.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-readahead.obj -MD -MP -MF $(DEPDIR)/strace-readahead.Tpo -c -o strace-readahead.obj `if test -f 'readahead.c'; then $(CYGPATH_W) 'readahead.c'; else $(CYGPATH_W) '$(srcdir)/readahead.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-readahead.Tpo $(DEPDIR)/strace-readahead.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='readahead.c' object='strace-readahead.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-readahead.obj `if test -f 'readahead.c'; then $(CYGPATH_W) 'readahead.c'; else $(CYGPATH_W) '$(srcdir)/readahead.c'; fi` + +strace-readlink.o: readlink.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-readlink.o -MD -MP -MF $(DEPDIR)/strace-readlink.Tpo -c -o strace-readlink.o `test -f 'readlink.c' || echo '$(srcdir)/'`readlink.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-readlink.Tpo $(DEPDIR)/strace-readlink.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='readlink.c' object='strace-readlink.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-readlink.o `test -f 'readlink.c' || echo '$(srcdir)/'`readlink.c + +strace-readlink.obj: readlink.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-readlink.obj -MD -MP -MF $(DEPDIR)/strace-readlink.Tpo -c -o strace-readlink.obj `if test -f 'readlink.c'; then $(CYGPATH_W) 'readlink.c'; else $(CYGPATH_W) '$(srcdir)/readlink.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-readlink.Tpo $(DEPDIR)/strace-readlink.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='readlink.c' object='strace-readlink.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-readlink.obj `if test -f 'readlink.c'; then $(CYGPATH_W) 'readlink.c'; else $(CYGPATH_W) '$(srcdir)/readlink.c'; fi` + +strace-reboot.o: reboot.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-reboot.o -MD -MP -MF $(DEPDIR)/strace-reboot.Tpo -c -o strace-reboot.o `test -f 'reboot.c' || echo '$(srcdir)/'`reboot.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-reboot.Tpo $(DEPDIR)/strace-reboot.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='reboot.c' object='strace-reboot.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-reboot.o `test -f 'reboot.c' || echo '$(srcdir)/'`reboot.c + +strace-reboot.obj: reboot.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-reboot.obj -MD -MP -MF $(DEPDIR)/strace-reboot.Tpo -c -o strace-reboot.obj `if test -f 'reboot.c'; then $(CYGPATH_W) 'reboot.c'; else $(CYGPATH_W) '$(srcdir)/reboot.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-reboot.Tpo $(DEPDIR)/strace-reboot.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='reboot.c' object='strace-reboot.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-reboot.obj `if test -f 'reboot.c'; then $(CYGPATH_W) 'reboot.c'; else $(CYGPATH_W) '$(srcdir)/reboot.c'; fi` + +strace-renameat.o: renameat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-renameat.o -MD -MP -MF $(DEPDIR)/strace-renameat.Tpo -c -o strace-renameat.o `test -f 'renameat.c' || echo '$(srcdir)/'`renameat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-renameat.Tpo $(DEPDIR)/strace-renameat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='renameat.c' object='strace-renameat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-renameat.o `test -f 'renameat.c' || echo '$(srcdir)/'`renameat.c + +strace-renameat.obj: renameat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-renameat.obj -MD -MP -MF $(DEPDIR)/strace-renameat.Tpo -c -o strace-renameat.obj `if test -f 'renameat.c'; then $(CYGPATH_W) 'renameat.c'; else $(CYGPATH_W) '$(srcdir)/renameat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-renameat.Tpo $(DEPDIR)/strace-renameat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='renameat.c' object='strace-renameat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-renameat.obj `if test -f 'renameat.c'; then $(CYGPATH_W) 'renameat.c'; else $(CYGPATH_W) '$(srcdir)/renameat.c'; fi` + +strace-resource.o: resource.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-resource.o -MD -MP -MF $(DEPDIR)/strace-resource.Tpo -c -o strace-resource.o `test -f 'resource.c' || echo '$(srcdir)/'`resource.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-resource.Tpo $(DEPDIR)/strace-resource.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='resource.c' object='strace-resource.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-resource.o `test -f 'resource.c' || echo '$(srcdir)/'`resource.c + +strace-resource.obj: resource.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-resource.obj -MD -MP -MF $(DEPDIR)/strace-resource.Tpo -c -o strace-resource.obj `if test -f 'resource.c'; then $(CYGPATH_W) 'resource.c'; else $(CYGPATH_W) '$(srcdir)/resource.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-resource.Tpo $(DEPDIR)/strace-resource.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='resource.c' object='strace-resource.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-resource.obj `if test -f 'resource.c'; then $(CYGPATH_W) 'resource.c'; else $(CYGPATH_W) '$(srcdir)/resource.c'; fi` + +strace-rtc.o: rtc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-rtc.o -MD -MP -MF $(DEPDIR)/strace-rtc.Tpo -c -o strace-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-rtc.Tpo $(DEPDIR)/strace-rtc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtc.c' object='strace-rtc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-rtc.o `test -f 'rtc.c' || echo '$(srcdir)/'`rtc.c + +strace-rtc.obj: rtc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-rtc.obj -MD -MP -MF $(DEPDIR)/strace-rtc.Tpo -c -o strace-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-rtc.Tpo $(DEPDIR)/strace-rtc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtc.c' object='strace-rtc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-rtc.obj `if test -f 'rtc.c'; then $(CYGPATH_W) 'rtc.c'; else $(CYGPATH_W) '$(srcdir)/rtc.c'; fi` + +strace-sched.o: sched.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sched.o -MD -MP -MF $(DEPDIR)/strace-sched.Tpo -c -o strace-sched.o `test -f 'sched.c' || echo '$(srcdir)/'`sched.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sched.Tpo $(DEPDIR)/strace-sched.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sched.c' object='strace-sched.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sched.o `test -f 'sched.c' || echo '$(srcdir)/'`sched.c + +strace-sched.obj: sched.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sched.obj -MD -MP -MF $(DEPDIR)/strace-sched.Tpo -c -o strace-sched.obj `if test -f 'sched.c'; then $(CYGPATH_W) 'sched.c'; else $(CYGPATH_W) '$(srcdir)/sched.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sched.Tpo $(DEPDIR)/strace-sched.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sched.c' object='strace-sched.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sched.obj `if test -f 'sched.c'; then $(CYGPATH_W) 'sched.c'; else $(CYGPATH_W) '$(srcdir)/sched.c'; fi` + +strace-scsi.o: scsi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-scsi.o -MD -MP -MF $(DEPDIR)/strace-scsi.Tpo -c -o strace-scsi.o `test -f 'scsi.c' || echo '$(srcdir)/'`scsi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-scsi.Tpo $(DEPDIR)/strace-scsi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scsi.c' object='strace-scsi.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-scsi.o `test -f 'scsi.c' || echo '$(srcdir)/'`scsi.c + +strace-scsi.obj: scsi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-scsi.obj -MD -MP -MF $(DEPDIR)/strace-scsi.Tpo -c -o strace-scsi.obj `if test -f 'scsi.c'; then $(CYGPATH_W) 'scsi.c'; else $(CYGPATH_W) '$(srcdir)/scsi.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-scsi.Tpo $(DEPDIR)/strace-scsi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scsi.c' object='strace-scsi.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-scsi.obj `if test -f 'scsi.c'; then $(CYGPATH_W) 'scsi.c'; else $(CYGPATH_W) '$(srcdir)/scsi.c'; fi` + +strace-seccomp.o: seccomp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-seccomp.o -MD -MP -MF $(DEPDIR)/strace-seccomp.Tpo -c -o strace-seccomp.o `test -f 'seccomp.c' || echo '$(srcdir)/'`seccomp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-seccomp.Tpo $(DEPDIR)/strace-seccomp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='seccomp.c' object='strace-seccomp.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-seccomp.o `test -f 'seccomp.c' || echo '$(srcdir)/'`seccomp.c + +strace-seccomp.obj: seccomp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-seccomp.obj -MD -MP -MF $(DEPDIR)/strace-seccomp.Tpo -c -o strace-seccomp.obj `if test -f 'seccomp.c'; then $(CYGPATH_W) 'seccomp.c'; else $(CYGPATH_W) '$(srcdir)/seccomp.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-seccomp.Tpo $(DEPDIR)/strace-seccomp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='seccomp.c' object='strace-seccomp.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-seccomp.obj `if test -f 'seccomp.c'; then $(CYGPATH_W) 'seccomp.c'; else $(CYGPATH_W) '$(srcdir)/seccomp.c'; fi` + +strace-sendfile.o: sendfile.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sendfile.o -MD -MP -MF $(DEPDIR)/strace-sendfile.Tpo -c -o strace-sendfile.o `test -f 'sendfile.c' || echo '$(srcdir)/'`sendfile.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sendfile.Tpo $(DEPDIR)/strace-sendfile.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sendfile.c' object='strace-sendfile.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sendfile.o `test -f 'sendfile.c' || echo '$(srcdir)/'`sendfile.c + +strace-sendfile.obj: sendfile.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sendfile.obj -MD -MP -MF $(DEPDIR)/strace-sendfile.Tpo -c -o strace-sendfile.obj `if test -f 'sendfile.c'; then $(CYGPATH_W) 'sendfile.c'; else $(CYGPATH_W) '$(srcdir)/sendfile.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sendfile.Tpo $(DEPDIR)/strace-sendfile.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sendfile.c' object='strace-sendfile.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sendfile.obj `if test -f 'sendfile.c'; then $(CYGPATH_W) 'sendfile.c'; else $(CYGPATH_W) '$(srcdir)/sendfile.c'; fi` + +strace-sg_io_v3.o: sg_io_v3.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sg_io_v3.o -MD -MP -MF $(DEPDIR)/strace-sg_io_v3.Tpo -c -o strace-sg_io_v3.o `test -f 'sg_io_v3.c' || echo '$(srcdir)/'`sg_io_v3.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sg_io_v3.Tpo $(DEPDIR)/strace-sg_io_v3.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sg_io_v3.c' object='strace-sg_io_v3.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sg_io_v3.o `test -f 'sg_io_v3.c' || echo '$(srcdir)/'`sg_io_v3.c + +strace-sg_io_v3.obj: sg_io_v3.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sg_io_v3.obj -MD -MP -MF $(DEPDIR)/strace-sg_io_v3.Tpo -c -o strace-sg_io_v3.obj `if test -f 'sg_io_v3.c'; then $(CYGPATH_W) 'sg_io_v3.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v3.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sg_io_v3.Tpo $(DEPDIR)/strace-sg_io_v3.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sg_io_v3.c' object='strace-sg_io_v3.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sg_io_v3.obj `if test -f 'sg_io_v3.c'; then $(CYGPATH_W) 'sg_io_v3.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v3.c'; fi` + +strace-sg_io_v4.o: sg_io_v4.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sg_io_v4.o -MD -MP -MF $(DEPDIR)/strace-sg_io_v4.Tpo -c -o strace-sg_io_v4.o `test -f 'sg_io_v4.c' || echo '$(srcdir)/'`sg_io_v4.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sg_io_v4.Tpo $(DEPDIR)/strace-sg_io_v4.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sg_io_v4.c' object='strace-sg_io_v4.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sg_io_v4.o `test -f 'sg_io_v4.c' || echo '$(srcdir)/'`sg_io_v4.c + +strace-sg_io_v4.obj: sg_io_v4.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sg_io_v4.obj -MD -MP -MF $(DEPDIR)/strace-sg_io_v4.Tpo -c -o strace-sg_io_v4.obj `if test -f 'sg_io_v4.c'; then $(CYGPATH_W) 'sg_io_v4.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v4.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sg_io_v4.Tpo $(DEPDIR)/strace-sg_io_v4.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sg_io_v4.c' object='strace-sg_io_v4.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sg_io_v4.obj `if test -f 'sg_io_v4.c'; then $(CYGPATH_W) 'sg_io_v4.c'; else $(CYGPATH_W) '$(srcdir)/sg_io_v4.c'; fi` + +strace-sigaltstack.o: sigaltstack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sigaltstack.o -MD -MP -MF $(DEPDIR)/strace-sigaltstack.Tpo -c -o strace-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sigaltstack.Tpo $(DEPDIR)/strace-sigaltstack.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigaltstack.c' object='strace-sigaltstack.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sigaltstack.o `test -f 'sigaltstack.c' || echo '$(srcdir)/'`sigaltstack.c + +strace-sigaltstack.obj: sigaltstack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sigaltstack.obj -MD -MP -MF $(DEPDIR)/strace-sigaltstack.Tpo -c -o strace-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sigaltstack.Tpo $(DEPDIR)/strace-sigaltstack.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigaltstack.c' object='strace-sigaltstack.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sigaltstack.obj `if test -f 'sigaltstack.c'; then $(CYGPATH_W) 'sigaltstack.c'; else $(CYGPATH_W) '$(srcdir)/sigaltstack.c'; fi` + +strace-signal.o: signal.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-signal.o -MD -MP -MF $(DEPDIR)/strace-signal.Tpo -c -o strace-signal.o `test -f 'signal.c' || echo '$(srcdir)/'`signal.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-signal.Tpo $(DEPDIR)/strace-signal.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signal.c' object='strace-signal.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-signal.o `test -f 'signal.c' || echo '$(srcdir)/'`signal.c + +strace-signal.obj: signal.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-signal.obj -MD -MP -MF $(DEPDIR)/strace-signal.Tpo -c -o strace-signal.obj `if test -f 'signal.c'; then $(CYGPATH_W) 'signal.c'; else $(CYGPATH_W) '$(srcdir)/signal.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-signal.Tpo $(DEPDIR)/strace-signal.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signal.c' object='strace-signal.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-signal.obj `if test -f 'signal.c'; then $(CYGPATH_W) 'signal.c'; else $(CYGPATH_W) '$(srcdir)/signal.c'; fi` + +strace-signalfd.o: signalfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-signalfd.o -MD -MP -MF $(DEPDIR)/strace-signalfd.Tpo -c -o strace-signalfd.o `test -f 'signalfd.c' || echo '$(srcdir)/'`signalfd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-signalfd.Tpo $(DEPDIR)/strace-signalfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signalfd.c' object='strace-signalfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-signalfd.o `test -f 'signalfd.c' || echo '$(srcdir)/'`signalfd.c + +strace-signalfd.obj: signalfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-signalfd.obj -MD -MP -MF $(DEPDIR)/strace-signalfd.Tpo -c -o strace-signalfd.obj `if test -f 'signalfd.c'; then $(CYGPATH_W) 'signalfd.c'; else $(CYGPATH_W) '$(srcdir)/signalfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-signalfd.Tpo $(DEPDIR)/strace-signalfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signalfd.c' object='strace-signalfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-signalfd.obj `if test -f 'signalfd.c'; then $(CYGPATH_W) 'signalfd.c'; else $(CYGPATH_W) '$(srcdir)/signalfd.c'; fi` + +strace-sigreturn.o: sigreturn.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sigreturn.o -MD -MP -MF $(DEPDIR)/strace-sigreturn.Tpo -c -o strace-sigreturn.o `test -f 'sigreturn.c' || echo '$(srcdir)/'`sigreturn.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sigreturn.Tpo $(DEPDIR)/strace-sigreturn.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigreturn.c' object='strace-sigreturn.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sigreturn.o `test -f 'sigreturn.c' || echo '$(srcdir)/'`sigreturn.c + +strace-sigreturn.obj: sigreturn.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sigreturn.obj -MD -MP -MF $(DEPDIR)/strace-sigreturn.Tpo -c -o strace-sigreturn.obj `if test -f 'sigreturn.c'; then $(CYGPATH_W) 'sigreturn.c'; else $(CYGPATH_W) '$(srcdir)/sigreturn.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sigreturn.Tpo $(DEPDIR)/strace-sigreturn.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sigreturn.c' object='strace-sigreturn.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sigreturn.obj `if test -f 'sigreturn.c'; then $(CYGPATH_W) 'sigreturn.c'; else $(CYGPATH_W) '$(srcdir)/sigreturn.c'; fi` + +strace-sock.o: sock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sock.o -MD -MP -MF $(DEPDIR)/strace-sock.Tpo -c -o strace-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sock.Tpo $(DEPDIR)/strace-sock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sock.c' object='strace-sock.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sock.o `test -f 'sock.c' || echo '$(srcdir)/'`sock.c + +strace-sock.obj: sock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sock.obj -MD -MP -MF $(DEPDIR)/strace-sock.Tpo -c -o strace-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sock.Tpo $(DEPDIR)/strace-sock.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sock.c' object='strace-sock.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sock.obj `if test -f 'sock.c'; then $(CYGPATH_W) 'sock.c'; else $(CYGPATH_W) '$(srcdir)/sock.c'; fi` + +strace-sockaddr.o: sockaddr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sockaddr.o -MD -MP -MF $(DEPDIR)/strace-sockaddr.Tpo -c -o strace-sockaddr.o `test -f 'sockaddr.c' || echo '$(srcdir)/'`sockaddr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sockaddr.Tpo $(DEPDIR)/strace-sockaddr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sockaddr.c' object='strace-sockaddr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sockaddr.o `test -f 'sockaddr.c' || echo '$(srcdir)/'`sockaddr.c + +strace-sockaddr.obj: sockaddr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sockaddr.obj -MD -MP -MF $(DEPDIR)/strace-sockaddr.Tpo -c -o strace-sockaddr.obj `if test -f 'sockaddr.c'; then $(CYGPATH_W) 'sockaddr.c'; else $(CYGPATH_W) '$(srcdir)/sockaddr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sockaddr.Tpo $(DEPDIR)/strace-sockaddr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sockaddr.c' object='strace-sockaddr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sockaddr.obj `if test -f 'sockaddr.c'; then $(CYGPATH_W) 'sockaddr.c'; else $(CYGPATH_W) '$(srcdir)/sockaddr.c'; fi` + +strace-socketutils.o: socketutils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-socketutils.o -MD -MP -MF $(DEPDIR)/strace-socketutils.Tpo -c -o strace-socketutils.o `test -f 'socketutils.c' || echo '$(srcdir)/'`socketutils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-socketutils.Tpo $(DEPDIR)/strace-socketutils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='socketutils.c' object='strace-socketutils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-socketutils.o `test -f 'socketutils.c' || echo '$(srcdir)/'`socketutils.c + +strace-socketutils.obj: socketutils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-socketutils.obj -MD -MP -MF $(DEPDIR)/strace-socketutils.Tpo -c -o strace-socketutils.obj `if test -f 'socketutils.c'; then $(CYGPATH_W) 'socketutils.c'; else $(CYGPATH_W) '$(srcdir)/socketutils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-socketutils.Tpo $(DEPDIR)/strace-socketutils.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='socketutils.c' object='strace-socketutils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-socketutils.obj `if test -f 'socketutils.c'; then $(CYGPATH_W) 'socketutils.c'; else $(CYGPATH_W) '$(srcdir)/socketutils.c'; fi` + +strace-sram_alloc.o: sram_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sram_alloc.o -MD -MP -MF $(DEPDIR)/strace-sram_alloc.Tpo -c -o strace-sram_alloc.o `test -f 'sram_alloc.c' || echo '$(srcdir)/'`sram_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sram_alloc.Tpo $(DEPDIR)/strace-sram_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sram_alloc.c' object='strace-sram_alloc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sram_alloc.o `test -f 'sram_alloc.c' || echo '$(srcdir)/'`sram_alloc.c + +strace-sram_alloc.obj: sram_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sram_alloc.obj -MD -MP -MF $(DEPDIR)/strace-sram_alloc.Tpo -c -o strace-sram_alloc.obj `if test -f 'sram_alloc.c'; then $(CYGPATH_W) 'sram_alloc.c'; else $(CYGPATH_W) '$(srcdir)/sram_alloc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sram_alloc.Tpo $(DEPDIR)/strace-sram_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sram_alloc.c' object='strace-sram_alloc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sram_alloc.obj `if test -f 'sram_alloc.c'; then $(CYGPATH_W) 'sram_alloc.c'; else $(CYGPATH_W) '$(srcdir)/sram_alloc.c'; fi` + +strace-stat.o: stat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-stat.o -MD -MP -MF $(DEPDIR)/strace-stat.Tpo -c -o strace-stat.o `test -f 'stat.c' || echo '$(srcdir)/'`stat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-stat.Tpo $(DEPDIR)/strace-stat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stat.c' object='strace-stat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-stat.o `test -f 'stat.c' || echo '$(srcdir)/'`stat.c + +strace-stat.obj: stat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-stat.obj -MD -MP -MF $(DEPDIR)/strace-stat.Tpo -c -o strace-stat.obj `if test -f 'stat.c'; then $(CYGPATH_W) 'stat.c'; else $(CYGPATH_W) '$(srcdir)/stat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-stat.Tpo $(DEPDIR)/strace-stat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stat.c' object='strace-stat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-stat.obj `if test -f 'stat.c'; then $(CYGPATH_W) 'stat.c'; else $(CYGPATH_W) '$(srcdir)/stat.c'; fi` + +strace-stat64.o: stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-stat64.o -MD -MP -MF $(DEPDIR)/strace-stat64.Tpo -c -o strace-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-stat64.Tpo $(DEPDIR)/strace-stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stat64.c' object='strace-stat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c + +strace-stat64.obj: stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-stat64.obj -MD -MP -MF $(DEPDIR)/strace-stat64.Tpo -c -o strace-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-stat64.Tpo $(DEPDIR)/strace-stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stat64.c' object='strace-stat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` + +strace-statfs.o: statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-statfs.o -MD -MP -MF $(DEPDIR)/strace-statfs.Tpo -c -o strace-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-statfs.Tpo $(DEPDIR)/strace-statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='strace-statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + +strace-statfs.obj: statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-statfs.obj -MD -MP -MF $(DEPDIR)/strace-statfs.Tpo -c -o strace-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-statfs.Tpo $(DEPDIR)/strace-statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='strace-statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + +strace-strace.o: strace.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-strace.o -MD -MP -MF $(DEPDIR)/strace-strace.Tpo -c -o strace-strace.o `test -f 'strace.c' || echo '$(srcdir)/'`strace.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-strace.Tpo $(DEPDIR)/strace-strace.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strace.c' object='strace-strace.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-strace.o `test -f 'strace.c' || echo '$(srcdir)/'`strace.c + +strace-strace.obj: strace.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-strace.obj -MD -MP -MF $(DEPDIR)/strace-strace.Tpo -c -o strace-strace.obj `if test -f 'strace.c'; then $(CYGPATH_W) 'strace.c'; else $(CYGPATH_W) '$(srcdir)/strace.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-strace.Tpo $(DEPDIR)/strace-strace.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strace.c' object='strace-strace.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-strace.obj `if test -f 'strace.c'; then $(CYGPATH_W) 'strace.c'; else $(CYGPATH_W) '$(srcdir)/strace.c'; fi` + +strace-swapon.o: swapon.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-swapon.o -MD -MP -MF $(DEPDIR)/strace-swapon.Tpo -c -o strace-swapon.o `test -f 'swapon.c' || echo '$(srcdir)/'`swapon.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-swapon.Tpo $(DEPDIR)/strace-swapon.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='swapon.c' object='strace-swapon.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-swapon.o `test -f 'swapon.c' || echo '$(srcdir)/'`swapon.c + +strace-swapon.obj: swapon.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-swapon.obj -MD -MP -MF $(DEPDIR)/strace-swapon.Tpo -c -o strace-swapon.obj `if test -f 'swapon.c'; then $(CYGPATH_W) 'swapon.c'; else $(CYGPATH_W) '$(srcdir)/swapon.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-swapon.Tpo $(DEPDIR)/strace-swapon.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='swapon.c' object='strace-swapon.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-swapon.obj `if test -f 'swapon.c'; then $(CYGPATH_W) 'swapon.c'; else $(CYGPATH_W) '$(srcdir)/swapon.c'; fi` + +strace-syscall.o: syscall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-syscall.o -MD -MP -MF $(DEPDIR)/strace-syscall.Tpo -c -o strace-syscall.o `test -f 'syscall.c' || echo '$(srcdir)/'`syscall.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-syscall.Tpo $(DEPDIR)/strace-syscall.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syscall.c' object='strace-syscall.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-syscall.o `test -f 'syscall.c' || echo '$(srcdir)/'`syscall.c + +strace-syscall.obj: syscall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-syscall.obj -MD -MP -MF $(DEPDIR)/strace-syscall.Tpo -c -o strace-syscall.obj `if test -f 'syscall.c'; then $(CYGPATH_W) 'syscall.c'; else $(CYGPATH_W) '$(srcdir)/syscall.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-syscall.Tpo $(DEPDIR)/strace-syscall.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syscall.c' object='strace-syscall.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-syscall.obj `if test -f 'syscall.c'; then $(CYGPATH_W) 'syscall.c'; else $(CYGPATH_W) '$(srcdir)/syscall.c'; fi` + +strace-sysctl.o: sysctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysctl.o -MD -MP -MF $(DEPDIR)/strace-sysctl.Tpo -c -o strace-sysctl.o `test -f 'sysctl.c' || echo '$(srcdir)/'`sysctl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysctl.Tpo $(DEPDIR)/strace-sysctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysctl.c' object='strace-sysctl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysctl.o `test -f 'sysctl.c' || echo '$(srcdir)/'`sysctl.c + +strace-sysctl.obj: sysctl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysctl.obj -MD -MP -MF $(DEPDIR)/strace-sysctl.Tpo -c -o strace-sysctl.obj `if test -f 'sysctl.c'; then $(CYGPATH_W) 'sysctl.c'; else $(CYGPATH_W) '$(srcdir)/sysctl.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysctl.Tpo $(DEPDIR)/strace-sysctl.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysctl.c' object='strace-sysctl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysctl.obj `if test -f 'sysctl.c'; then $(CYGPATH_W) 'sysctl.c'; else $(CYGPATH_W) '$(srcdir)/sysctl.c'; fi` + +strace-sysinfo.o: sysinfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysinfo.o -MD -MP -MF $(DEPDIR)/strace-sysinfo.Tpo -c -o strace-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysinfo.Tpo $(DEPDIR)/strace-sysinfo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysinfo.c' object='strace-sysinfo.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysinfo.o `test -f 'sysinfo.c' || echo '$(srcdir)/'`sysinfo.c + +strace-sysinfo.obj: sysinfo.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysinfo.obj -MD -MP -MF $(DEPDIR)/strace-sysinfo.Tpo -c -o strace-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysinfo.Tpo $(DEPDIR)/strace-sysinfo.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysinfo.c' object='strace-sysinfo.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysinfo.obj `if test -f 'sysinfo.c'; then $(CYGPATH_W) 'sysinfo.c'; else $(CYGPATH_W) '$(srcdir)/sysinfo.c'; fi` + +strace-syslog.o: syslog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-syslog.o -MD -MP -MF $(DEPDIR)/strace-syslog.Tpo -c -o strace-syslog.o `test -f 'syslog.c' || echo '$(srcdir)/'`syslog.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-syslog.Tpo $(DEPDIR)/strace-syslog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syslog.c' object='strace-syslog.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-syslog.o `test -f 'syslog.c' || echo '$(srcdir)/'`syslog.c + +strace-syslog.obj: syslog.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-syslog.obj -MD -MP -MF $(DEPDIR)/strace-syslog.Tpo -c -o strace-syslog.obj `if test -f 'syslog.c'; then $(CYGPATH_W) 'syslog.c'; else $(CYGPATH_W) '$(srcdir)/syslog.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-syslog.Tpo $(DEPDIR)/strace-syslog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='syslog.c' object='strace-syslog.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-syslog.obj `if test -f 'syslog.c'; then $(CYGPATH_W) 'syslog.c'; else $(CYGPATH_W) '$(srcdir)/syslog.c'; fi` + +strace-sysmips.o: sysmips.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysmips.o -MD -MP -MF $(DEPDIR)/strace-sysmips.Tpo -c -o strace-sysmips.o `test -f 'sysmips.c' || echo '$(srcdir)/'`sysmips.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysmips.Tpo $(DEPDIR)/strace-sysmips.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysmips.c' object='strace-sysmips.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysmips.o `test -f 'sysmips.c' || echo '$(srcdir)/'`sysmips.c + +strace-sysmips.obj: sysmips.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-sysmips.obj -MD -MP -MF $(DEPDIR)/strace-sysmips.Tpo -c -o strace-sysmips.obj `if test -f 'sysmips.c'; then $(CYGPATH_W) 'sysmips.c'; else $(CYGPATH_W) '$(srcdir)/sysmips.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-sysmips.Tpo $(DEPDIR)/strace-sysmips.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sysmips.c' object='strace-sysmips.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-sysmips.obj `if test -f 'sysmips.c'; then $(CYGPATH_W) 'sysmips.c'; else $(CYGPATH_W) '$(srcdir)/sysmips.c'; fi` + +strace-term.o: term.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-term.o -MD -MP -MF $(DEPDIR)/strace-term.Tpo -c -o strace-term.o `test -f 'term.c' || echo '$(srcdir)/'`term.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-term.Tpo $(DEPDIR)/strace-term.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='term.c' object='strace-term.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-term.o `test -f 'term.c' || echo '$(srcdir)/'`term.c + +strace-term.obj: term.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-term.obj -MD -MP -MF $(DEPDIR)/strace-term.Tpo -c -o strace-term.obj `if test -f 'term.c'; then $(CYGPATH_W) 'term.c'; else $(CYGPATH_W) '$(srcdir)/term.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-term.Tpo $(DEPDIR)/strace-term.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='term.c' object='strace-term.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-term.obj `if test -f 'term.c'; then $(CYGPATH_W) 'term.c'; else $(CYGPATH_W) '$(srcdir)/term.c'; fi` + +strace-time.o: time.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-time.o -MD -MP -MF $(DEPDIR)/strace-time.Tpo -c -o strace-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-time.Tpo $(DEPDIR)/strace-time.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='time.c' object='strace-time.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c + +strace-time.obj: time.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-time.obj -MD -MP -MF $(DEPDIR)/strace-time.Tpo -c -o strace-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-time.Tpo $(DEPDIR)/strace-time.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='time.c' object='strace-time.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi` + +strace-times.o: times.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-times.o -MD -MP -MF $(DEPDIR)/strace-times.Tpo -c -o strace-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-times.Tpo $(DEPDIR)/strace-times.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='times.c' object='strace-times.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c + +strace-times.obj: times.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-times.obj -MD -MP -MF $(DEPDIR)/strace-times.Tpo -c -o strace-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-times.Tpo $(DEPDIR)/strace-times.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='times.c' object='strace-times.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi` + +strace-truncate.o: truncate.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-truncate.o -MD -MP -MF $(DEPDIR)/strace-truncate.Tpo -c -o strace-truncate.o `test -f 'truncate.c' || echo '$(srcdir)/'`truncate.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-truncate.Tpo $(DEPDIR)/strace-truncate.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='truncate.c' object='strace-truncate.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-truncate.o `test -f 'truncate.c' || echo '$(srcdir)/'`truncate.c + +strace-truncate.obj: truncate.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-truncate.obj -MD -MP -MF $(DEPDIR)/strace-truncate.Tpo -c -o strace-truncate.obj `if test -f 'truncate.c'; then $(CYGPATH_W) 'truncate.c'; else $(CYGPATH_W) '$(srcdir)/truncate.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-truncate.Tpo $(DEPDIR)/strace-truncate.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='truncate.c' object='strace-truncate.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-truncate.obj `if test -f 'truncate.c'; then $(CYGPATH_W) 'truncate.c'; else $(CYGPATH_W) '$(srcdir)/truncate.c'; fi` + +strace-ubi.o: ubi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ubi.o -MD -MP -MF $(DEPDIR)/strace-ubi.Tpo -c -o strace-ubi.o `test -f 'ubi.c' || echo '$(srcdir)/'`ubi.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ubi.Tpo $(DEPDIR)/strace-ubi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ubi.c' object='strace-ubi.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ubi.o `test -f 'ubi.c' || echo '$(srcdir)/'`ubi.c + +strace-ubi.obj: ubi.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ubi.obj -MD -MP -MF $(DEPDIR)/strace-ubi.Tpo -c -o strace-ubi.obj `if test -f 'ubi.c'; then $(CYGPATH_W) 'ubi.c'; else $(CYGPATH_W) '$(srcdir)/ubi.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ubi.Tpo $(DEPDIR)/strace-ubi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ubi.c' object='strace-ubi.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ubi.obj `if test -f 'ubi.c'; then $(CYGPATH_W) 'ubi.c'; else $(CYGPATH_W) '$(srcdir)/ubi.c'; fi` + +strace-uid.o: uid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uid.o -MD -MP -MF $(DEPDIR)/strace-uid.Tpo -c -o strace-uid.o `test -f 'uid.c' || echo '$(srcdir)/'`uid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uid.Tpo $(DEPDIR)/strace-uid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uid.c' object='strace-uid.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uid.o `test -f 'uid.c' || echo '$(srcdir)/'`uid.c + +strace-uid.obj: uid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uid.obj -MD -MP -MF $(DEPDIR)/strace-uid.Tpo -c -o strace-uid.obj `if test -f 'uid.c'; then $(CYGPATH_W) 'uid.c'; else $(CYGPATH_W) '$(srcdir)/uid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uid.Tpo $(DEPDIR)/strace-uid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uid.c' object='strace-uid.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uid.obj `if test -f 'uid.c'; then $(CYGPATH_W) 'uid.c'; else $(CYGPATH_W) '$(srcdir)/uid.c'; fi` + +strace-uid16.o: uid16.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uid16.o -MD -MP -MF $(DEPDIR)/strace-uid16.Tpo -c -o strace-uid16.o `test -f 'uid16.c' || echo '$(srcdir)/'`uid16.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uid16.Tpo $(DEPDIR)/strace-uid16.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uid16.c' object='strace-uid16.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uid16.o `test -f 'uid16.c' || echo '$(srcdir)/'`uid16.c + +strace-uid16.obj: uid16.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uid16.obj -MD -MP -MF $(DEPDIR)/strace-uid16.Tpo -c -o strace-uid16.obj `if test -f 'uid16.c'; then $(CYGPATH_W) 'uid16.c'; else $(CYGPATH_W) '$(srcdir)/uid16.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uid16.Tpo $(DEPDIR)/strace-uid16.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uid16.c' object='strace-uid16.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uid16.obj `if test -f 'uid16.c'; then $(CYGPATH_W) 'uid16.c'; else $(CYGPATH_W) '$(srcdir)/uid16.c'; fi` + +strace-umask.o: umask.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-umask.o -MD -MP -MF $(DEPDIR)/strace-umask.Tpo -c -o strace-umask.o `test -f 'umask.c' || echo '$(srcdir)/'`umask.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-umask.Tpo $(DEPDIR)/strace-umask.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='umask.c' object='strace-umask.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-umask.o `test -f 'umask.c' || echo '$(srcdir)/'`umask.c + +strace-umask.obj: umask.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-umask.obj -MD -MP -MF $(DEPDIR)/strace-umask.Tpo -c -o strace-umask.obj `if test -f 'umask.c'; then $(CYGPATH_W) 'umask.c'; else $(CYGPATH_W) '$(srcdir)/umask.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-umask.Tpo $(DEPDIR)/strace-umask.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='umask.c' object='strace-umask.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-umask.obj `if test -f 'umask.c'; then $(CYGPATH_W) 'umask.c'; else $(CYGPATH_W) '$(srcdir)/umask.c'; fi` + +strace-umount.o: umount.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-umount.o -MD -MP -MF $(DEPDIR)/strace-umount.Tpo -c -o strace-umount.o `test -f 'umount.c' || echo '$(srcdir)/'`umount.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-umount.Tpo $(DEPDIR)/strace-umount.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='umount.c' object='strace-umount.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-umount.o `test -f 'umount.c' || echo '$(srcdir)/'`umount.c + +strace-umount.obj: umount.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-umount.obj -MD -MP -MF $(DEPDIR)/strace-umount.Tpo -c -o strace-umount.obj `if test -f 'umount.c'; then $(CYGPATH_W) 'umount.c'; else $(CYGPATH_W) '$(srcdir)/umount.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-umount.Tpo $(DEPDIR)/strace-umount.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='umount.c' object='strace-umount.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-umount.obj `if test -f 'umount.c'; then $(CYGPATH_W) 'umount.c'; else $(CYGPATH_W) '$(srcdir)/umount.c'; fi` + +strace-uname.o: uname.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uname.o -MD -MP -MF $(DEPDIR)/strace-uname.Tpo -c -o strace-uname.o `test -f 'uname.c' || echo '$(srcdir)/'`uname.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uname.Tpo $(DEPDIR)/strace-uname.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uname.c' object='strace-uname.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uname.o `test -f 'uname.c' || echo '$(srcdir)/'`uname.c + +strace-uname.obj: uname.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-uname.obj -MD -MP -MF $(DEPDIR)/strace-uname.Tpo -c -o strace-uname.obj `if test -f 'uname.c'; then $(CYGPATH_W) 'uname.c'; else $(CYGPATH_W) '$(srcdir)/uname.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-uname.Tpo $(DEPDIR)/strace-uname.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uname.c' object='strace-uname.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-uname.obj `if test -f 'uname.c'; then $(CYGPATH_W) 'uname.c'; else $(CYGPATH_W) '$(srcdir)/uname.c'; fi` + +strace-userfaultfd.o: userfaultfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-userfaultfd.o -MD -MP -MF $(DEPDIR)/strace-userfaultfd.Tpo -c -o strace-userfaultfd.o `test -f 'userfaultfd.c' || echo '$(srcdir)/'`userfaultfd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-userfaultfd.Tpo $(DEPDIR)/strace-userfaultfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='userfaultfd.c' object='strace-userfaultfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-userfaultfd.o `test -f 'userfaultfd.c' || echo '$(srcdir)/'`userfaultfd.c + +strace-userfaultfd.obj: userfaultfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-userfaultfd.obj -MD -MP -MF $(DEPDIR)/strace-userfaultfd.Tpo -c -o strace-userfaultfd.obj `if test -f 'userfaultfd.c'; then $(CYGPATH_W) 'userfaultfd.c'; else $(CYGPATH_W) '$(srcdir)/userfaultfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-userfaultfd.Tpo $(DEPDIR)/strace-userfaultfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='userfaultfd.c' object='strace-userfaultfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-userfaultfd.obj `if test -f 'userfaultfd.c'; then $(CYGPATH_W) 'userfaultfd.c'; else $(CYGPATH_W) '$(srcdir)/userfaultfd.c'; fi` + +strace-ustat.o: ustat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ustat.o -MD -MP -MF $(DEPDIR)/strace-ustat.Tpo -c -o strace-ustat.o `test -f 'ustat.c' || echo '$(srcdir)/'`ustat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ustat.Tpo $(DEPDIR)/strace-ustat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ustat.c' object='strace-ustat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ustat.o `test -f 'ustat.c' || echo '$(srcdir)/'`ustat.c + +strace-ustat.obj: ustat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-ustat.obj -MD -MP -MF $(DEPDIR)/strace-ustat.Tpo -c -o strace-ustat.obj `if test -f 'ustat.c'; then $(CYGPATH_W) 'ustat.c'; else $(CYGPATH_W) '$(srcdir)/ustat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-ustat.Tpo $(DEPDIR)/strace-ustat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ustat.c' object='strace-ustat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-ustat.obj `if test -f 'ustat.c'; then $(CYGPATH_W) 'ustat.c'; else $(CYGPATH_W) '$(srcdir)/ustat.c'; fi` + +strace-util.o: util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-util.o -MD -MP -MF $(DEPDIR)/strace-util.Tpo -c -o strace-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-util.Tpo $(DEPDIR)/strace-util.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util.c' object='strace-util.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c + +strace-util.obj: util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-util.obj -MD -MP -MF $(DEPDIR)/strace-util.Tpo -c -o strace-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-util.Tpo $(DEPDIR)/strace-util.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util.c' object='strace-util.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi` + +strace-utime.o: utime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-utime.o -MD -MP -MF $(DEPDIR)/strace-utime.Tpo -c -o strace-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-utime.Tpo $(DEPDIR)/strace-utime.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utime.c' object='strace-utime.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c + +strace-utime.obj: utime.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-utime.obj -MD -MP -MF $(DEPDIR)/strace-utime.Tpo -c -o strace-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-utime.Tpo $(DEPDIR)/strace-utime.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utime.c' object='strace-utime.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi` + +strace-utimes.o: utimes.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-utimes.o -MD -MP -MF $(DEPDIR)/strace-utimes.Tpo -c -o strace-utimes.o `test -f 'utimes.c' || echo '$(srcdir)/'`utimes.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-utimes.Tpo $(DEPDIR)/strace-utimes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utimes.c' object='strace-utimes.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-utimes.o `test -f 'utimes.c' || echo '$(srcdir)/'`utimes.c + +strace-utimes.obj: utimes.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-utimes.obj -MD -MP -MF $(DEPDIR)/strace-utimes.Tpo -c -o strace-utimes.obj `if test -f 'utimes.c'; then $(CYGPATH_W) 'utimes.c'; else $(CYGPATH_W) '$(srcdir)/utimes.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-utimes.Tpo $(DEPDIR)/strace-utimes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utimes.c' object='strace-utimes.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-utimes.obj `if test -f 'utimes.c'; then $(CYGPATH_W) 'utimes.c'; else $(CYGPATH_W) '$(srcdir)/utimes.c'; fi` + +strace-v4l2.o: v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-v4l2.o -MD -MP -MF $(DEPDIR)/strace-v4l2.Tpo -c -o strace-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-v4l2.Tpo $(DEPDIR)/strace-v4l2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2.c' object='strace-v4l2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-v4l2.o `test -f 'v4l2.c' || echo '$(srcdir)/'`v4l2.c + +strace-v4l2.obj: v4l2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-v4l2.obj -MD -MP -MF $(DEPDIR)/strace-v4l2.Tpo -c -o strace-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-v4l2.Tpo $(DEPDIR)/strace-v4l2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2.c' object='strace-v4l2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-v4l2.obj `if test -f 'v4l2.c'; then $(CYGPATH_W) 'v4l2.c'; else $(CYGPATH_W) '$(srcdir)/v4l2.c'; fi` + +strace-wait.o: wait.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-wait.o -MD -MP -MF $(DEPDIR)/strace-wait.Tpo -c -o strace-wait.o `test -f 'wait.c' || echo '$(srcdir)/'`wait.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-wait.Tpo $(DEPDIR)/strace-wait.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wait.c' object='strace-wait.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-wait.o `test -f 'wait.c' || echo '$(srcdir)/'`wait.c + +strace-wait.obj: wait.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-wait.obj -MD -MP -MF $(DEPDIR)/strace-wait.Tpo -c -o strace-wait.obj `if test -f 'wait.c'; then $(CYGPATH_W) 'wait.c'; else $(CYGPATH_W) '$(srcdir)/wait.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-wait.Tpo $(DEPDIR)/strace-wait.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wait.c' object='strace-wait.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-wait.obj `if test -f 'wait.c'; then $(CYGPATH_W) 'wait.c'; else $(CYGPATH_W) '$(srcdir)/wait.c'; fi` + +strace-xattr.o: xattr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xattr.o -MD -MP -MF $(DEPDIR)/strace-xattr.Tpo -c -o strace-xattr.o `test -f 'xattr.c' || echo '$(srcdir)/'`xattr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-xattr.Tpo $(DEPDIR)/strace-xattr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xattr.c' object='strace-xattr.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xattr.o `test -f 'xattr.c' || echo '$(srcdir)/'`xattr.c + +strace-xattr.obj: xattr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xattr.obj -MD -MP -MF $(DEPDIR)/strace-xattr.Tpo -c -o strace-xattr.obj `if test -f 'xattr.c'; then $(CYGPATH_W) 'xattr.c'; else $(CYGPATH_W) '$(srcdir)/xattr.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-xattr.Tpo $(DEPDIR)/strace-xattr.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xattr.c' object='strace-xattr.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xattr.obj `if test -f 'xattr.c'; then $(CYGPATH_W) 'xattr.c'; else $(CYGPATH_W) '$(srcdir)/xattr.c'; fi` + +strace-xmalloc.o: xmalloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xmalloc.o -MD -MP -MF $(DEPDIR)/strace-xmalloc.Tpo -c -o strace-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-xmalloc.Tpo $(DEPDIR)/strace-xmalloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xmalloc.c' object='strace-xmalloc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c + +strace-xmalloc.obj: xmalloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-xmalloc.obj -MD -MP -MF $(DEPDIR)/strace-xmalloc.Tpo -c -o strace-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-xmalloc.Tpo $(DEPDIR)/strace-xmalloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xmalloc.c' object='strace-xmalloc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi` + +strace-unwind.o: unwind.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-unwind.o -MD -MP -MF $(DEPDIR)/strace-unwind.Tpo -c -o strace-unwind.o `test -f 'unwind.c' || echo '$(srcdir)/'`unwind.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-unwind.Tpo $(DEPDIR)/strace-unwind.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unwind.c' object='strace-unwind.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-unwind.o `test -f 'unwind.c' || echo '$(srcdir)/'`unwind.c + +strace-unwind.obj: unwind.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -MT strace-unwind.obj -MD -MP -MF $(DEPDIR)/strace-unwind.Tpo -c -o strace-unwind.obj `if test -f 'unwind.c'; then $(CYGPATH_W) 'unwind.c'; else $(CYGPATH_W) '$(srcdir)/unwind.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/strace-unwind.Tpo $(DEPDIR)/strace-unwind.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unwind.c' object='strace-unwind.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(strace_CPPFLAGS) $(CPPFLAGS) $(strace_CFLAGS) $(CFLAGS) -c -o strace-unwind.obj `if test -f 'unwind.c'; then $(CYGPATH_W) 'unwind.c'; else $(CYGPATH_W) '$(srcdir)/unwind.c'; fi` +install-man1: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" +check-valgrind-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +check-valgrind: check-valgrind-recursive + +check-valgrind-am: check-valgrind-local + +clean: clean-recursive + +clean-am: clean-binPROGRAMS clean-generic clean-local \ + clean-noinstLIBRARIES mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-binSCRIPTS + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: install-man1 + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: $(am__recursive_targets) all check install install-am \ + install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am check-valgrind-am \ + check-valgrind-local clean clean-binPROGRAMS clean-cscope \ + clean-generic clean-local clean-noinstLIBRARIES cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-man uninstall-man1 + +$(top_srcdir)/xlat/access_flags.h: $(top_srcdir)/xlat/access_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/aclipc.h: $(top_srcdir)/xlat/aclipc.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/addrfams.h: $(top_srcdir)/xlat/addrfams.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/adjtimex_modes.h: $(top_srcdir)/xlat/adjtimex_modes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/adjtimex_state.h: $(top_srcdir)/xlat/adjtimex_state.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/adjtimex_status.h: $(top_srcdir)/xlat/adjtimex_status.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/advise.h: $(top_srcdir)/xlat/advise.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/af_packet_types.h: $(top_srcdir)/xlat/af_packet_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/archvals.h: $(top_srcdir)/xlat/archvals.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/arp_hardware_types.h: $(top_srcdir)/xlat/arp_hardware_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/at_flags.h: $(top_srcdir)/xlat/at_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/atomic_ops.h: $(top_srcdir)/xlat/atomic_ops.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/audit_arch.h: $(top_srcdir)/xlat/audit_arch.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/baud_options.h: $(top_srcdir)/xlat/baud_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/blkpg_ops.h: $(top_srcdir)/xlat/blkpg_ops.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bootflags1.h: $(top_srcdir)/xlat/bootflags1.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bootflags2.h: $(top_srcdir)/xlat/bootflags2.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bootflags3.h: $(top_srcdir)/xlat/bootflags3.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_attach_type.h: $(top_srcdir)/xlat/bpf_attach_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_class.h: $(top_srcdir)/xlat/bpf_class.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_commands.h: $(top_srcdir)/xlat/bpf_commands.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_map_types.h: $(top_srcdir)/xlat/bpf_map_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_map_update_elem_flags.h: $(top_srcdir)/xlat/bpf_map_update_elem_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_miscop.h: $(top_srcdir)/xlat/bpf_miscop.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_mode.h: $(top_srcdir)/xlat/bpf_mode.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_op_alu.h: $(top_srcdir)/xlat/bpf_op_alu.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_op_jmp.h: $(top_srcdir)/xlat/bpf_op_jmp.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_prog_types.h: $(top_srcdir)/xlat/bpf_prog_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_rval.h: $(top_srcdir)/xlat/bpf_rval.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_size.h: $(top_srcdir)/xlat/bpf_size.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_src.h: $(top_srcdir)/xlat/bpf_src.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bsg_flags.h: $(top_srcdir)/xlat/bsg_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bsg_protocol.h: $(top_srcdir)/xlat/bsg_protocol.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bsg_subprotocol.h: $(top_srcdir)/xlat/bsg_subprotocol.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bt_protocols.h: $(top_srcdir)/xlat/bt_protocols.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_balance_args.h: $(top_srcdir)/xlat/btrfs_balance_args.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_balance_ctl_cmds.h: $(top_srcdir)/xlat/btrfs_balance_ctl_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_balance_flags.h: $(top_srcdir)/xlat/btrfs_balance_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_balance_state.h: $(top_srcdir)/xlat/btrfs_balance_state.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_compress_types.h: $(top_srcdir)/xlat/btrfs_compress_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_defrag_flags.h: $(top_srcdir)/xlat/btrfs_defrag_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_replace_cmds.h: $(top_srcdir)/xlat/btrfs_dev_replace_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_replace_results.h: $(top_srcdir)/xlat/btrfs_dev_replace_results.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_replace_state.h: $(top_srcdir)/xlat/btrfs_dev_replace_state.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_stats_flags.h: $(top_srcdir)/xlat/btrfs_dev_stats_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_dev_stats_values.h: $(top_srcdir)/xlat/btrfs_dev_stats_values.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_features_compat.h: $(top_srcdir)/xlat/btrfs_features_compat.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_features_compat_ro.h: $(top_srcdir)/xlat/btrfs_features_compat_ro.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_features_incompat.h: $(top_srcdir)/xlat/btrfs_features_incompat.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_key_types.h: $(top_srcdir)/xlat/btrfs_key_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_qgroup_ctl_cmds.h: $(top_srcdir)/xlat/btrfs_qgroup_ctl_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_qgroup_inherit_flags.h: $(top_srcdir)/xlat/btrfs_qgroup_inherit_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_qgroup_limit_flags.h: $(top_srcdir)/xlat/btrfs_qgroup_limit_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_qgroup_status_flags.h: $(top_srcdir)/xlat/btrfs_qgroup_status_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_scrub_flags.h: $(top_srcdir)/xlat/btrfs_scrub_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_send_flags.h: $(top_srcdir)/xlat/btrfs_send_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_snap_flags_v2.h: $(top_srcdir)/xlat/btrfs_snap_flags_v2.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_space_info_flags.h: $(top_srcdir)/xlat/btrfs_space_info_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/btrfs_tree_objectids.h: $(top_srcdir)/xlat/btrfs_tree_objectids.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/cacheflush_scope.h: $(top_srcdir)/xlat/cacheflush_scope.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/cap.h: $(top_srcdir)/xlat/cap.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/cap_mask0.h: $(top_srcdir)/xlat/cap_mask0.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/cap_mask1.h: $(top_srcdir)/xlat/cap_mask1.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/cap_version.h: $(top_srcdir)/xlat/cap_version.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/clockflags.h: $(top_srcdir)/xlat/clockflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/clocknames.h: $(top_srcdir)/xlat/clocknames.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/clone_flags.h: $(top_srcdir)/xlat/clone_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/cpuclocknames.h: $(top_srcdir)/xlat/cpuclocknames.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/delete_module_flags.h: $(top_srcdir)/xlat/delete_module_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/dirent_types.h: $(top_srcdir)/xlat/dirent_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/dm_flags.h: $(top_srcdir)/xlat/dm_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/efd_flags.h: $(top_srcdir)/xlat/efd_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/epollctls.h: $(top_srcdir)/xlat/epollctls.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/epollevents.h: $(top_srcdir)/xlat/epollevents.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/epollflags.h: $(top_srcdir)/xlat/epollflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ethernet_protocols.h: $(top_srcdir)/xlat/ethernet_protocols.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_abs.h: $(top_srcdir)/xlat/evdev_abs.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_autorepeat.h: $(top_srcdir)/xlat/evdev_autorepeat.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_ev.h: $(top_srcdir)/xlat/evdev_ev.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_ff_status.h: $(top_srcdir)/xlat/evdev_ff_status.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_ff_types.h: $(top_srcdir)/xlat/evdev_ff_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_keycode.h: $(top_srcdir)/xlat/evdev_keycode.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_leds.h: $(top_srcdir)/xlat/evdev_leds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_misc.h: $(top_srcdir)/xlat/evdev_misc.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_mtslots.h: $(top_srcdir)/xlat/evdev_mtslots.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_prop.h: $(top_srcdir)/xlat/evdev_prop.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_relative_axes.h: $(top_srcdir)/xlat/evdev_relative_axes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_snd.h: $(top_srcdir)/xlat/evdev_snd.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_switch.h: $(top_srcdir)/xlat/evdev_switch.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/evdev_sync.h: $(top_srcdir)/xlat/evdev_sync.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/f_owner_types.h: $(top_srcdir)/xlat/f_owner_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/f_seals.h: $(top_srcdir)/xlat/f_seals.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/falloc_flags.h: $(top_srcdir)/xlat/falloc_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fan_classes.h: $(top_srcdir)/xlat/fan_classes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fan_event_flags.h: $(top_srcdir)/xlat/fan_event_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fan_init_flags.h: $(top_srcdir)/xlat/fan_init_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fan_mark_flags.h: $(top_srcdir)/xlat/fan_mark_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fcntl64cmds.h: $(top_srcdir)/xlat/fcntl64cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fcntlcmds.h: $(top_srcdir)/xlat/fcntlcmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fdflags.h: $(top_srcdir)/xlat/fdflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fiemap_extent_flags.h: $(top_srcdir)/xlat/fiemap_extent_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fiemap_flags.h: $(top_srcdir)/xlat/fiemap_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/flockcmds.h: $(top_srcdir)/xlat/flockcmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/fsmagic.h: $(top_srcdir)/xlat/fsmagic.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/futexops.h: $(top_srcdir)/xlat/futexops.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/futexwakecmps.h: $(top_srcdir)/xlat/futexwakecmps.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/futexwakeops.h: $(top_srcdir)/xlat/futexwakeops.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/getrandom_flags.h: $(top_srcdir)/xlat/getrandom_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/getsockipoptions.h: $(top_srcdir)/xlat/getsockipoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/getsockipv6options.h: $(top_srcdir)/xlat/getsockipv6options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/hci_channels.h: $(top_srcdir)/xlat/hci_channels.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/hw_breakpoint_len.h: $(top_srcdir)/xlat/hw_breakpoint_len.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/hw_breakpoint_type.h: $(top_srcdir)/xlat/hw_breakpoint_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/icmpfilterflags.h: $(top_srcdir)/xlat/icmpfilterflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/if_dqblk_valid.h: $(top_srcdir)/xlat/if_dqblk_valid.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/if_dqinfo_flags.h: $(top_srcdir)/xlat/if_dqinfo_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/if_dqinfo_valid.h: $(top_srcdir)/xlat/if_dqinfo_valid.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/iffflags.h: $(top_srcdir)/xlat/iffflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/inet_protocols.h: $(top_srcdir)/xlat/inet_protocols.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/inotify_flags.h: $(top_srcdir)/xlat/inotify_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/inotify_init_flags.h: $(top_srcdir)/xlat/inotify_init_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ioctl_dirs.h: $(top_srcdir)/xlat/ioctl_dirs.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ioprio_class.h: $(top_srcdir)/xlat/ioprio_class.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ioprio_who.h: $(top_srcdir)/xlat/ioprio_who.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ip_cmsg_types.h: $(top_srcdir)/xlat/ip_cmsg_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ipc_msg_flags.h: $(top_srcdir)/xlat/ipc_msg_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ipccalls.h: $(top_srcdir)/xlat/ipccalls.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/itimer_which.h: $(top_srcdir)/xlat/itimer_which.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/kcmp_types.h: $(top_srcdir)/xlat/kcmp_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/kexec_arch_values.h: $(top_srcdir)/xlat/kexec_arch_values.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/kexec_file_load_flags.h: $(top_srcdir)/xlat/kexec_file_load_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/kexec_load_flags.h: $(top_srcdir)/xlat/kexec_load_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/key_perms.h: $(top_srcdir)/xlat/key_perms.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/key_reqkeys.h: $(top_srcdir)/xlat/key_reqkeys.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/key_spec.h: $(top_srcdir)/xlat/key_spec.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/keyctl_commands.h: $(top_srcdir)/xlat/keyctl_commands.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/lockfcmds.h: $(top_srcdir)/xlat/lockfcmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/loop_cmds.h: $(top_srcdir)/xlat/loop_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/loop_crypt_type_options.h: $(top_srcdir)/xlat/loop_crypt_type_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/loop_flags_options.h: $(top_srcdir)/xlat/loop_flags_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/madvise_cmds.h: $(top_srcdir)/xlat/madvise_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mbindflags.h: $(top_srcdir)/xlat/mbindflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mctl_sync.h: $(top_srcdir)/xlat/mctl_sync.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/membarrier_cmds.h: $(top_srcdir)/xlat/membarrier_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/memfd_create_flags.h: $(top_srcdir)/xlat/memfd_create_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mempolicyflags.h: $(top_srcdir)/xlat/mempolicyflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mlock_flags.h: $(top_srcdir)/xlat/mlock_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mlockall_flags.h: $(top_srcdir)/xlat/mlockall_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mmap_flags.h: $(top_srcdir)/xlat/mmap_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mmap_prot.h: $(top_srcdir)/xlat/mmap_prot.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/modem_flags.h: $(top_srcdir)/xlat/modem_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/modetypes.h: $(top_srcdir)/xlat/modetypes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/module_init_flags.h: $(top_srcdir)/xlat/module_init_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mount_flags.h: $(top_srcdir)/xlat/mount_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/move_pages_flags.h: $(top_srcdir)/xlat/move_pages_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mq_attr_flags.h: $(top_srcdir)/xlat/mq_attr_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mremap_flags.h: $(top_srcdir)/xlat/mremap_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/msg_flags.h: $(top_srcdir)/xlat/msg_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/msgctl_flags.h: $(top_srcdir)/xlat/msgctl_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mtd_file_mode_options.h: $(top_srcdir)/xlat/mtd_file_mode_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mtd_flags_options.h: $(top_srcdir)/xlat/mtd_flags_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mtd_mode_options.h: $(top_srcdir)/xlat/mtd_mode_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mtd_nandecc_options.h: $(top_srcdir)/xlat/mtd_nandecc_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mtd_otp_options.h: $(top_srcdir)/xlat/mtd_otp_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mtd_type_options.h: $(top_srcdir)/xlat/mtd_type_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/name_to_handle_at_flags.h: $(top_srcdir)/xlat/name_to_handle_at_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/netlink_flags.h: $(top_srcdir)/xlat/netlink_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/netlink_protocols.h: $(top_srcdir)/xlat/netlink_protocols.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/netlink_types.h: $(top_srcdir)/xlat/netlink_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/notifyflags.h: $(top_srcdir)/xlat/notifyflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/nt_descriptor_types.h: $(top_srcdir)/xlat/nt_descriptor_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/open_access_modes.h: $(top_srcdir)/xlat/open_access_modes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/open_mode_flags.h: $(top_srcdir)/xlat/open_mode_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/openmodessol.h: $(top_srcdir)/xlat/openmodessol.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/packet_mreq_type.h: $(top_srcdir)/xlat/packet_mreq_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_attr_size.h: $(top_srcdir)/xlat/perf_attr_size.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_branch_sample_type.h: $(top_srcdir)/xlat/perf_branch_sample_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_event_open_flags.h: $(top_srcdir)/xlat/perf_event_open_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_event_read_format.h: $(top_srcdir)/xlat/perf_event_read_format.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_event_sample_format.h: $(top_srcdir)/xlat/perf_event_sample_format.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_hw_cache_id.h: $(top_srcdir)/xlat/perf_hw_cache_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_hw_cache_op_id.h: $(top_srcdir)/xlat/perf_hw_cache_op_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_hw_cache_op_result_id.h: $(top_srcdir)/xlat/perf_hw_cache_op_result_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_hw_id.h: $(top_srcdir)/xlat/perf_hw_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_sw_ids.h: $(top_srcdir)/xlat/perf_sw_ids.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_type_id.h: $(top_srcdir)/xlat/perf_type_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/personality_flags.h: $(top_srcdir)/xlat/personality_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/personality_types.h: $(top_srcdir)/xlat/personality_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pkey_access.h: $(top_srcdir)/xlat/pkey_access.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/policies.h: $(top_srcdir)/xlat/policies.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pollflags.h: $(top_srcdir)/xlat/pollflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_cap_ambient.h: $(top_srcdir)/xlat/pr_cap_ambient.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_dumpable.h: $(top_srcdir)/xlat/pr_dumpable.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_fp_mode.h: $(top_srcdir)/xlat/pr_fp_mode.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_mce_kill.h: $(top_srcdir)/xlat/pr_mce_kill.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_mce_kill_policy.h: $(top_srcdir)/xlat/pr_mce_kill_policy.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_set_mm.h: $(top_srcdir)/xlat/pr_set_mm.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_tsc.h: $(top_srcdir)/xlat/pr_tsc.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pr_unalign_flags.h: $(top_srcdir)/xlat/pr_unalign_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/prctl_options.h: $(top_srcdir)/xlat/prctl_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/priorities.h: $(top_srcdir)/xlat/priorities.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ptp_flags_options.h: $(top_srcdir)/xlat/ptp_flags_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ptrace_cmds.h: $(top_srcdir)/xlat/ptrace_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ptrace_events.h: $(top_srcdir)/xlat/ptrace_events.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ptrace_peeksiginfo_flags.h: $(top_srcdir)/xlat/ptrace_peeksiginfo_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ptrace_setoptions_flags.h: $(top_srcdir)/xlat/ptrace_setoptions_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/quota_formats.h: $(top_srcdir)/xlat/quota_formats.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/quotacmds.h: $(top_srcdir)/xlat/quotacmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/quotatypes.h: $(top_srcdir)/xlat/quotatypes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/rename_flags.h: $(top_srcdir)/xlat/rename_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/resource_flags.h: $(top_srcdir)/xlat/resource_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/resources.h: $(top_srcdir)/xlat/resources.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/rwf_flags.h: $(top_srcdir)/xlat/rwf_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sa_handler_values.h: $(top_srcdir)/xlat/sa_handler_values.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sched_flags.h: $(top_srcdir)/xlat/sched_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/schedulers.h: $(top_srcdir)/xlat/schedulers.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/scmvals.h: $(top_srcdir)/xlat/scmvals.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/scsi_sg_commands.h: $(top_srcdir)/xlat/scsi_sg_commands.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/secbits.h: $(top_srcdir)/xlat/secbits.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/seccomp_filter_flags.h: $(top_srcdir)/xlat/seccomp_filter_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/seccomp_mode.h: $(top_srcdir)/xlat/seccomp_mode.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/seccomp_ops.h: $(top_srcdir)/xlat/seccomp_ops.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/seccomp_ret_action.h: $(top_srcdir)/xlat/seccomp_ret_action.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/semctl_flags.h: $(top_srcdir)/xlat/semctl_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/semop_flags.h: $(top_srcdir)/xlat/semop_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/setns_types.h: $(top_srcdir)/xlat/setns_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/setsockipoptions.h: $(top_srcdir)/xlat/setsockipoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/setsockipv6options.h: $(top_srcdir)/xlat/setsockipv6options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sfd_flags.h: $(top_srcdir)/xlat/sfd_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sg_io_dxfer_direction.h: $(top_srcdir)/xlat/sg_io_dxfer_direction.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sg_io_flags.h: $(top_srcdir)/xlat/sg_io_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sg_io_info.h: $(top_srcdir)/xlat/sg_io_info.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sg_scsi_reset.h: $(top_srcdir)/xlat/sg_scsi_reset.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/shm_flags.h: $(top_srcdir)/xlat/shm_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/shm_resource_flags.h: $(top_srcdir)/xlat/shm_resource_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/shmctl_flags.h: $(top_srcdir)/xlat/shmctl_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/shutdown_modes.h: $(top_srcdir)/xlat/shutdown_modes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigact_flags.h: $(top_srcdir)/xlat/sigact_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigaltstack_flags.h: $(top_srcdir)/xlat/sigaltstack_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigbus_codes.h: $(top_srcdir)/xlat/sigbus_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigchld_codes.h: $(top_srcdir)/xlat/sigchld_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigemt_codes.h: $(top_srcdir)/xlat/sigemt_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigev_value.h: $(top_srcdir)/xlat/sigev_value.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigfpe_codes.h: $(top_srcdir)/xlat/sigfpe_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigill_codes.h: $(top_srcdir)/xlat/sigill_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/siginfo_codes.h: $(top_srcdir)/xlat/siginfo_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigpoll_codes.h: $(top_srcdir)/xlat/sigpoll_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigprocmaskcmds.h: $(top_srcdir)/xlat/sigprocmaskcmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigprof_codes.h: $(top_srcdir)/xlat/sigprof_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigsegv_codes.h: $(top_srcdir)/xlat/sigsegv_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigsys_codes.h: $(top_srcdir)/xlat/sigsys_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sigtrap_codes.h: $(top_srcdir)/xlat/sigtrap_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sock_type_flags.h: $(top_srcdir)/xlat/sock_type_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/socketcalls.h: $(top_srcdir)/xlat/socketcalls.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/socketlayers.h: $(top_srcdir)/xlat/socketlayers.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sockipoptions.h: $(top_srcdir)/xlat/sockipoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sockipv6options.h: $(top_srcdir)/xlat/sockipv6options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sockipxoptions.h: $(top_srcdir)/xlat/sockipxoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sockoptions.h: $(top_srcdir)/xlat/sockoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sockpacketoptions.h: $(top_srcdir)/xlat/sockpacketoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sockrawoptions.h: $(top_srcdir)/xlat/sockrawoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/socksctpoptions.h: $(top_srcdir)/xlat/socksctpoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/socktcpoptions.h: $(top_srcdir)/xlat/socktcpoptions.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/socktypes.h: $(top_srcdir)/xlat/socktypes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/splice_flags.h: $(top_srcdir)/xlat/splice_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sram_alloc_flags.h: $(top_srcdir)/xlat/sram_alloc_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/statfs_flags.h: $(top_srcdir)/xlat/statfs_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/swap_flags.h: $(top_srcdir)/xlat/swap_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sync_file_range_flags.h: $(top_srcdir)/xlat/sync_file_range_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_kern.h: $(top_srcdir)/xlat/sysctl_kern.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net.h: $(top_srcdir)/xlat/sysctl_net.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_core.h: $(top_srcdir)/xlat/sysctl_net_core.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_ipv4.h: $(top_srcdir)/xlat/sysctl_net_ipv4.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_ipv4_conf.h: $(top_srcdir)/xlat/sysctl_net_ipv4_conf.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_ipv4_route.h: $(top_srcdir)/xlat/sysctl_net_ipv4_route.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_ipv6.h: $(top_srcdir)/xlat/sysctl_net_ipv6.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_ipv6_route.h: $(top_srcdir)/xlat/sysctl_net_ipv6_route.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_unix.h: $(top_srcdir)/xlat/sysctl_net_unix.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_root.h: $(top_srcdir)/xlat/sysctl_root.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_vm.h: $(top_srcdir)/xlat/sysctl_vm.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/syslog_action_type.h: $(top_srcdir)/xlat/syslog_action_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysmips_operations.h: $(top_srcdir)/xlat/sysmips_operations.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/tcflsh_options.h: $(top_srcdir)/xlat/tcflsh_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/tcxonc_options.h: $(top_srcdir)/xlat/tcxonc_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/timerfdflags.h: $(top_srcdir)/xlat/timerfdflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ubi_volume_props.h: $(top_srcdir)/xlat/ubi_volume_props.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/ubi_volume_types.h: $(top_srcdir)/xlat/ubi_volume_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_api_flags.h: $(top_srcdir)/xlat/uffd_api_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_copy_flags.h: $(top_srcdir)/xlat/uffd_copy_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_flags.h: $(top_srcdir)/xlat/uffd_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_register_ioctl_flags.h: $(top_srcdir)/xlat/uffd_register_ioctl_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_register_mode_flags.h: $(top_srcdir)/xlat/uffd_register_mode_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/uffd_zeropage_flags.h: $(top_srcdir)/xlat/uffd_zeropage_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/umount_flags.h: $(top_srcdir)/xlat/umount_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/unshare_flags.h: $(top_srcdir)/xlat/unshare_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/usagewho.h: $(top_srcdir)/xlat/usagewho.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_buf_flags.h: $(top_srcdir)/xlat/v4l2_buf_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_buf_types.h: $(top_srcdir)/xlat/v4l2_buf_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_capture_modes.h: $(top_srcdir)/xlat/v4l2_capture_modes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_colorspaces.h: $(top_srcdir)/xlat/v4l2_colorspaces.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_control_classes.h: $(top_srcdir)/xlat/v4l2_control_classes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_control_flags.h: $(top_srcdir)/xlat/v4l2_control_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_control_ids.h: $(top_srcdir)/xlat/v4l2_control_ids.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_control_types.h: $(top_srcdir)/xlat/v4l2_control_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_device_capabilities_flags.h: $(top_srcdir)/xlat/v4l2_device_capabilities_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_fields.h: $(top_srcdir)/xlat/v4l2_fields.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_format_description_flags.h: $(top_srcdir)/xlat/v4l2_format_description_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_frameinterval_types.h: $(top_srcdir)/xlat/v4l2_frameinterval_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_framesize_types.h: $(top_srcdir)/xlat/v4l2_framesize_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_input_types.h: $(top_srcdir)/xlat/v4l2_input_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_memories.h: $(top_srcdir)/xlat/v4l2_memories.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/v4l2_streaming_capabilities.h: $(top_srcdir)/xlat/v4l2_streaming_capabilities.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/wait4_options.h: $(top_srcdir)/xlat/wait4_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/waitid_types.h: $(top_srcdir)/xlat/waitid_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/whence_codes.h: $(top_srcdir)/xlat/whence_codes.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/xattrflags.h: $(top_srcdir)/xlat/xattrflags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/xfs_dqblk_flags.h: $(top_srcdir)/xlat/xfs_dqblk_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/xfs_quota_flags.h: $(top_srcdir)/xlat/xfs_quota_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ + +@CODE_COVERAGE_RULES@ + +.PHONY: check-valgrind-local +check-valgrind-local: + +.PHONY: srpm +srpm: dist-xz + rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz + +$(srcdir)/.version: + $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@ + +sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c)) + for f in $^; do \ + sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \ + done | sort -u > $@ + +sen.h: $(patsubst %,$(srcdir)/%,$(syscallent_files)) + for f in $^; do cat -- $$f; done | \ + $(srcdir)/generate_sen.sh > $@ + +dist-hook: + $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version + +news-check: NEWS + $(AM_V_GEN)if head -1 $< | \ + grep -x $(news_check_regexp) >/dev/null; then \ + :; \ + else \ + echo >&2 '$<: check failed'; \ + exit 1; \ + fi + +ioctl_redefs%.h: ioctlent%.h ioctlent0.h + sort $< > $<-t + sort ioctlent0.h | comm -23 $<-t - | \ + sed -r -n 's/^\{ "([^"]+)", (0x[[:xdigit:]]+) \},$$/#ifdef \1\n# undef \1\n# define \1 \2\n#endif/p' \ + > $@-t + rm -f $<-t + mv $@-t $@ + +ioctlent%.h: ioctlsort% + ./$< > $@ + +# Need to pick up definitions *for host* while compiling +# ioctlsort *for build*, hence this magic. +ioctl_iocdef.i: $(srcdir)/ioctl_iocdef.c + $(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(strace_CPPFLAGS) $(CPPFLAGS) $< -o $@ + +ioctl_iocdef.h: ioctl_iocdef.i + sed -n 's/^DEFINE HOST/#define /p' $< > $@ + +ioctlsort%$(BUILD_EXEEXT): ioctlsort%.o + $(ioctlsort_CC) $(ioctlsort_CFLAGS) $(ioctlsort_LDFLAGS) $< -o $@ + +ioctlsort%.o: ioctls_all%.h ioctl_iocdef.h $(srcdir)/ioctlsort.c + $(ioctlsort_CC) $(ioctlsort_DEFS) $(ioctlsort_INCLUDES) $(ioctlsort_CPPFLAGS) $(ioctlsort_CFLAGS) -DIOCTLSORT_INC=\"$<\" -c -o $@ $(srcdir)/ioctlsort.c + +ioctls_all%.h: $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%.h $(srcdir)/$(OS)/$(ARCH)/ioctls_arch%.h + cat $^ > $@ + +syscallent.i: $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h + $(CPP) -P $(SCNO_CPPFLAGS) $^ -o $@ + +scno.h: $(top_srcdir)/scno.head syscallent.i + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + cat $< >> $@-t + LC_ALL=C sed -n '$(SCNO_SED)' $(filter-out $<,$^) >> $@-t + mv $@-t $@ + +$(strace_OBJECTS): scno.h + +# mpers targets + +mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h + for f in $^; do \ + CC="$(CC)" CFLAGS="$(mpers_sh_opts) -DMPERS_IS_$(mpers_NAME)" \ + CPP="$(CPP)" CPPFLAGS="$(mpers_sh_opts) -DIN_MPERS -DMPERS_IS_$(mpers_NAME)" \ + $(srcdir)/mpers.sh -$(mpers_NAME) $$f || exit; \ + done + > $@ + +m%_type_defs.h: $(srcdir_mpers_source_files) + for f in $^; do \ + sed -r -n 's/^#[[:space:]]*include DEF_MPERS_TYPE\(([^)]+)\)/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \ + done > $@-t + echo '#undef MPERS_PRINTER_NAME' >> $@-t + echo '#define MPERS_PRINTER_NAME(printer_name) printer_name' >> $@-t + echo '#include "$(mpers_PREFIX)printer_decls.h"' >> $@-t + echo '#include MPERS_$(mpers_PREFIX)IOCTL_MACROS' >> $@-t + mv $@-t $@ + +m%_funcs.h: $(srcdir_mpers_source_files) + for f in $^; do \ + sed -r -n 's/^SYS_FUNC\(([^)]+)\)/#undef sys_\1\n#define sys_\1 $(mpers_PREFIX)sys_\1/p' $$f || exit; \ + done > $@-t && \ + echo '#include "sys_func.h"' >> $@-t + mv $@-t $@ + +# printers + +%.c.mpers.i: $(srcdir)/%.c + $(CPP) -P $(mpers_sh_opts) -DIN_MPERS_BOOTSTRAP $< -o $@ + +printers.h: $(mpers_preproc_files) + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + echo 'typedef struct {' >> $@-t + for f in $^; do \ + sed -r -n 's/$(mpers_printer_decl_pattern)/ \1 (*\2)(\3);\n#define \2 MPERS_PRINTER_NAME(\2)\n/p' $$f \ + || exit; \ + done >> $@-t + echo '} struct_printers;' >> $@-t + echo 'extern const struct_printers *printers;' >> $@-t + echo '#define MPERS_PRINTER_NAME(printer_name) printers->printer_name' >> $@-t + mv $@-t $@ + +%_printer_decls.h: $(mpers_preproc_files) + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + for f in $^; do \ + sed -r -n 's/$(mpers_printer_decl_pattern)/extern \1 $(mpers_PREFIX)\2(\3);/p' $$f \ + || exit; \ + done >> $@-t + mv $@-t $@ + +%_printer_defs.h: $(mpers_preproc_files) + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + for f in $^; do \ + sed -r -n 's/$(mpers_printer_decl_pattern)/.\2 = $(mpers_PREFIX)\2,/p' $$f \ + || exit; \ + done >> $@-t + mv $@-t $@ + +native_printer_decls.h native_printer_defs.h: mpers_PREFIX = + +@HAVE_M32_MPERS_TRUE@$(mpers_m32_targets): mpers_NAME = m32 + +@HAVE_MX32_MPERS_TRUE@$(mpers_mx32_targets): mpers_NAME = mx32 + +clean-local: + -rm -rf mpers-m32 mpers-mx32 +@MAINTAINER_MODE_TRUE@$(srcdir)/ChangeLog: $(srcdir)/gitlog-to-changelog $(srcdir)/Makefile.in \ +@MAINTAINER_MODE_TRUE@ $(srcdir)/.version +@MAINTAINER_MODE_TRUE@ @rm -f $@.new +@MAINTAINER_MODE_TRUE@ (cd $(srcdir); \ +@MAINTAINER_MODE_TRUE@ ./gitlog-to-changelog --append-dot \ +@MAINTAINER_MODE_TRUE@ --since='$(gen_changelog_start_date)'; \ +@MAINTAINER_MODE_TRUE@ echo; echo; echo 'See ChangeLog-CVS for older changes.' \ +@MAINTAINER_MODE_TRUE@ ) > $@.new +@MAINTAINER_MODE_TRUE@ chmod 444 $@.new +@MAINTAINER_MODE_TRUE@ mv -f $@.new $@ + +@MAINTAINER_MODE_TRUE@$(srcdir)/CREDITS: $(srcdir)/CREDITS.in $(srcdir)/.mailmap \ +@MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(srcdir)/.version +@MAINTAINER_MODE_TRUE@ $(AM_V_GEN) \ +@MAINTAINER_MODE_TRUE@ ( \ +@MAINTAINER_MODE_TRUE@ cd $(srcdir); \ +@MAINTAINER_MODE_TRUE@ sed '/^##/,$$d' CREDITS.in; \ +@MAINTAINER_MODE_TRUE@ { sed -n '1,/^##>/d; s/ */\t/; s/^./&/p' CREDITS.in; \ +@MAINTAINER_MODE_TRUE@ git log --pretty=format:'%aN %aE'; \ +@MAINTAINER_MODE_TRUE@ } | LC_ALL=C sort -u \ +@MAINTAINER_MODE_TRUE@ | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}'; \ +@MAINTAINER_MODE_TRUE@ ) > $@-t && mv $@-t $@ + +@MAINTAINER_MODE_TRUE@export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner --mode=go-w,go+rX + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/NEWS b/NEWS index 47ffe026d..e5d01a361 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,78 @@ +Noteworthy changes in release 4.16 (2017-02-14) +=============================================== + +* Improvements + * Implemented syscall return value injection (-e inject=SET:retval= option). + * Implemented signal injection (-e inject=SET:signal= option). + * Implemented decoding of SUID_DUMP_* constants in PR_[GS]ET_DUMPABLE. + * Implemented decoding of all SG_* ioctl commands. + * Implemented decoding of ustat syscall. + * Implemented decoding of BPF_OBJ_PIN, BPF_OBJ_GET, BPF_PROG_ATTACH, + and BPF_PROG_DETACH commands of bpf syscall. + * Enhanced decoding of sg_io_hdr and sg_io_v4 structures. + * Enhanced decoding of get_robust_list, getrandom, io_submit, set_robust_list + syscalls. + * Enhanced decoding of entities of kernel long type on x32 and mips n32 ABIs. + * Updated lists of IP_*, IPV6_*, and LOOP_* constants. + * Updated lists of ioctl commands from Linux 4.10. + * Added decoding of recently added syscalls on avr32, microblaze, ppc, + and ppc64. + +* Bug fixes + * Fixed pathmatch of oldselect syscall on 64-bit architectures. + * Fixed decoding of mmap2 syscall on s390 when arguments are not available. + * Fixed decoding of kexec_file_load, mprotect, pkey_mprotect, prctl, preadv*, + and pwritev* syscalls on x32. + * Fixed printing of string arguments of getxattr and setxattr syscalls + when -s option is used to limit the printed string size. + * Fixed decoding of ifconf, ifreq, and loop_info structures on non-native + personalities. + * Fixed decoding of SG_* and LOOP_* ioctl commands. + * Fixed build on mips with musl libc. + * Fixed cross-building of ioctlsort. + * Applied minor formatting fixes to the manual page. + +Noteworthy changes in release 4.15 (2016-12-14) +=============================================== + +* Changes in behavior + * Time stamps are now printed according to ISO 8601. + * Changed output format of val3 parameter of futex FUTEX_WAKE_OP operation. + * The last argument of mincore, sched_getaffinity, and sched_setaffinity + syscalls is now formatted as an array. + +* Improvements + * Implemented syscall fault injection (-e fault=... option). + * Implemented decoding of DM_* ioctl commands. + * Implemented decoding of attr parameter of perf_event_open syscall. + * Implemented decoding of pkey_alloc, pkey_free, and pkey_mprotect syscalls. + * Implemented dumping of mq_timedsend and mq_timedreceive syscalls. + * Implemented decoding of PR_SET_FP_MODE and PR_GET_FP_MODE operations + of prctl syscall. + * Implemented PTRACE_GETREGS API support on m68k. + * Updated lists of ARCH_*, BPF_*, BTRFS_*, FALLOC_*, MS_*, *_MAGIC, + and V4L2_* constants. + * Updated lists of ioctl commands from Linux 4.9. + * Added decoding of recently added syscalls on arc, x32, and xtensa. + * Enhanced manual page. + +* Bug fixes + * Fixed corner cases in decoding of exit, exit_group, futimesat, getgroups, + getresuid, init_module, inotify_init1, kcmp, kexec_load, lookup_dcookie, + mq_getsetattr, mq_notify, mq_open, mq_timedreceive, mq_timedsend, + name_to_handle_at, prctl, process_vm_readv, process_vm_writev, setfsuid, + setgroups, setns, unshare, and utimes syscalls. + * Fixed handling of verbose flag in printing of controls array + of struct v4l2_ext_controls. + * Fixed omission of field names in the output of capability, sigaction, + sigevent, statfs, timespec, timeval, and utimbuf structures. + * Fixed printing of unknown syscalls in siginfo structure. + * Fixed decoding of ioctl constants on m68k. + * Fixed cris architecture support. + * Fixed cross build when host compiler does not support the same + set of warning flags as the cross compiler. + * Fixed build on SLE10 and SLE11. + Noteworthy changes in release 4.14 (2016-10-04) =============================================== diff --git a/NOTICE b/NOTICE deleted file mode 100644 index e9078d3ed..000000000 --- a/NOTICE +++ /dev/null @@ -1,29 +0,0 @@ -Copyright (c) 1991, 1992 Paul Kranenburg -Copyright (c) 1993 Branko Lankester -Copyright (c) 1993 Ulrich Pegelow -Copyright (c) 1995, 1996 Michael Elizabeth Chastain -Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey -Copyright (C) 1998-2001 Wichert Akkerman -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README-hacking b/README-hacking deleted file mode 100644 index 16d12c031..000000000 --- a/README-hacking +++ /dev/null @@ -1,32 +0,0 @@ -Requirements -============ -If you use the GIT version of strace there will be some files missing -that you need to build strace. These files are generated by tools from -the GNU Autoconf and Automake packages. - -Note: rather than run `autoreconf' directly, use the `./bootstrap' script. - - -No more ChangeLog file -====================== -Do not create or modify the ChangeLog files. Starting at 2009-07-09, the -policy changed. Before, we would insert the exact same text (or worse, -sometimes slightly differing) into both the ChangeLog file and the commit -log. Now we put that information only in the commit log, and generate -the top-level ChangeLog file from logs at "make dist" time. As such, -there are strict requirements on the form of the commit log messages. - - -Commit log requirements -======================= -Each commit log should always start with a one-line summary, the second -line should be blank, and the remaining lines are usually ChangeLog-style -entries for all affected files, except the leading TABs which should -be omitted. - - -Documentation -============= -All noteworthy changes should be mentioned in NEWS. All changes in strace -command interface should be reflected in the man page. New options should -be documented both in -h output and in the man page. diff --git a/README-mpers b/README-mpers deleted file mode 100644 index ad1ca1816..000000000 --- a/README-mpers +++ /dev/null @@ -1,14 +0,0 @@ -To use mpers functionality, one should: -* typedef all of the target types which are compound and not typedefed -already; -* for each target type, include DEF_MPERS_TYPE(target_type_t), these can -be included conditionally; -* include MPERS_DEFS once; -* before inclusion of MPERS_DEFS include all important headers -(containing definitions of these types or other behaviour-affecting -defines); -* printers should be defined -as MPERS_PRINTER_DECL(return_type, function_name, args), -inside files that include MPERS_DEFS these printers should be called -as MPERS_FUNC_NAME(function_name)(args), in other files -they should be called just as function_name(args). diff --git a/README.md b/README.md deleted file mode 100644 index 71c6ec084..000000000 --- a/README.md +++ /dev/null @@ -1,9 +0,0 @@ -This is [strace](http://strace.io) -- 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](http://man7.org/linux/man-pages/man2/ptrace.2.html). - -strace is released under a Berkeley-style license at the request of Paul Kranenburg; see the file [COPYING](https://raw.githubusercontent.com/strace/strace/master/COPYING) for details. - -See the file [NEWS](https://raw.githubusercontent.com/strace/strace/master/NEWS) for information on what has changed in recent versions. - -Please send bug reports and enhancements to [the strace mailing list](https://lists.sourceforge.net/lists/listinfo/strace-devel). - -[![Build Status](https://travis-ci.org/strace/strace.svg?branch=master)](https://travis-ci.org/strace/strace) [![Code Coverage](https://codecov.io/github/strace/strace/coverage.svg?branch=master)](https://codecov.io/github/strace/strace?branch=master) diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 000000000..cca8cf2ae --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,1209 @@ +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.14' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.14.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.14.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# AM_EXTRA_RECURSIVE_TARGETS -*- Autoconf -*- + +# Copyright (C) 2012-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_EXTRA_RECURSIVE_TARGETS +# -------------------------- +# Define the list of user recursive targets. This macro exists only to +# be traced by Automake, which will ensure that a proper definition of +# user-defined recursive targets (and associated rules) is propagated +# into all the generated Makefiles. +# TODO: We should really reject non-literal arguments here... +AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], []) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/ax_code_coverage.m4]) +m4_include([m4/ax_prog_cc_for_build.m4]) +m4_include([m4/ax_valgrind_check.m4]) +m4_include([m4/mpers.m4]) +m4_include([m4/st_save_restore_var.m4]) +m4_include([m4/st_warn_cflags.m4]) +m4_include([m4/warnings.m4]) diff --git a/affinity.c b/affinity.c index 6b6eaa330..0eb109404 100644 --- a/affinity.c +++ b/affinity.c @@ -35,10 +35,21 @@ get_cpuset_size(void) static unsigned int cpuset_size; if (!cpuset_size) { - pid_t pid = getpid(); + /* + * If the cpuset size passed to sched_getaffinity is less + * than necessary to store the bitmask, the kernel does not + * look at the mask pointer and fails with EINVAL. + * + * If the cpuset size is large enough, the kernel fails with + * EFAULT on inaccessible mask pointers. + * + * This undocumented kernel feature can be used to probe + * the kernel and find out the minimal valid cpuset size + * without allocating any memory for the CPU affinity mask. + */ cpuset_size = 128; while (cpuset_size && - sched_getaffinity(pid, cpuset_size, NULL) == -1 && + sched_getaffinity(0, cpuset_size, NULL) == -1 && EINVAL == errno) { cpuset_size <<= 1; } @@ -50,7 +61,8 @@ get_cpuset_size(void) } static void -print_affinitylist(struct tcb *tcp, const unsigned long addr, const unsigned int len) +print_affinitylist(struct tcb *const tcp, const kernel_ulong_t addr, + const unsigned int len) { const unsigned int max_size = get_cpuset_size(); const unsigned int umove_size = len < max_size ? len : max_size; @@ -75,7 +87,7 @@ print_affinitylist(struct tcb *tcp, const unsigned long addr, const unsigned int if (i < 0) break; tprintf("%s%d", sep, i); - sep = " "; + sep = ", "; } if (size < len) tprintf("%s...", sep); diff --git a/aio.c b/aio.c index 7caccddf1..e246b3535 100644 --- a/aio.c +++ b/aio.c @@ -87,7 +87,7 @@ print_common_flags(struct tcb *tcp, const struct iocb *cb) printfd(tcp, cb->aio_resfd); } if (cb->aio_flags & ~IOCB_FLAG_RESFD) - tprintf(", flags=%x", cb->aio_flags); + tprintf(", flags=%#x", cb->aio_flags); #endif } @@ -130,8 +130,7 @@ print_iocb(struct tcb *tcp, const struct iocb *cb) case SUB_COMMON: if (cb->aio_lio_opcode == 1 && iocb_is_valid(cb)) { tprints(", str="); - printstr(tcp, (unsigned long) cb->aio_buf, - (unsigned long) cb->aio_nbytes); + printstrn(tcp, cb->aio_buf, cb->aio_nbytes); } else { tprintf(", buf=%#" PRIx64, (uint64_t) cb->aio_buf); } @@ -162,13 +161,13 @@ print_iocb(struct tcb *tcp, const struct iocb *cb) static bool print_iocbp(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { - unsigned long addr; + kernel_ulong_t addr; struct iocb cb; - if (elem_size < sizeof(long)) { + if (elem_size < sizeof(kernel_ulong_t)) { addr = * (unsigned int *) elem_buf; } else { - addr = * (unsigned long *) elem_buf; + addr = * (kernel_ulong_t *) elem_buf; } tprints("{"); @@ -181,12 +180,13 @@ print_iocbp(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) SYS_FUNC(io_submit) { - const long nr = widen_to_long(tcp->u_arg[1]); - const unsigned long addr = tcp->u_arg[2]; - unsigned long iocbp; + const kernel_long_t nr = + truncate_klong_to_current_wordsize(tcp->u_arg[1]); + const kernel_ulong_t addr = tcp->u_arg[2]; + kernel_ulong_t iocbp; printaddr(tcp->u_arg[0]); - tprintf(", %ld, ", nr); + tprintf(", %" PRI_kld ", ", nr); if (nr < 0) printaddr(addr); @@ -237,9 +237,9 @@ SYS_FUNC(io_getevents) { if (entering(tcp)) { printaddr(tcp->u_arg[0]); - tprintf(", %ld, %ld, ", - widen_to_long(tcp->u_arg[1]), - widen_to_long(tcp->u_arg[2])); + tprintf(", %" PRI_kld ", %" PRI_kld ", ", + truncate_klong_to_current_wordsize(tcp->u_arg[1]), + truncate_klong_to_current_wordsize(tcp->u_arg[2])); } else { struct io_event buf; print_array(tcp, tcp->u_arg[3], tcp->u_rval, &buf, sizeof(buf), diff --git a/bjm.c b/bjm.c index 7a72809a1..926add3c4 100644 --- a/bjm.c +++ b/bjm.c @@ -33,17 +33,9 @@ #include "xlat/delete_module_flags.h" -SYS_FUNC(create_module) -{ - printpath(tcp, tcp->u_arg[0]); - tprintf(", %lu", tcp->u_arg[1]); - - return RVAL_DECODED | RVAL_HEX; -} - SYS_FUNC(delete_module) { - printstr(tcp, tcp->u_arg[0], -1); + printstr(tcp, tcp->u_arg[0]); tprints(", "); printflags(delete_module_flags, tcp->u_arg[1], "O_???"); @@ -53,15 +45,12 @@ SYS_FUNC(delete_module) SYS_FUNC(init_module) { printaddr(tcp->u_arg[0]); - tprintf(", %lu, ", tcp->u_arg[1]); - printstr(tcp, tcp->u_arg[2], -1); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); + printstr(tcp, tcp->u_arg[2]); return RVAL_DECODED; } -#define MODULE_INIT_IGNORE_MODVERSIONS 1 -#define MODULE_INIT_IGNORE_VERMAGIC 2 - #include "xlat/module_init_flags.h" SYS_FUNC(finit_module) @@ -70,7 +59,7 @@ SYS_FUNC(finit_module) printfd(tcp, tcp->u_arg[0]); tprints(", "); /* param_values */ - printstr(tcp, tcp->u_arg[1], -1); + printstr(tcp, tcp->u_arg[1]); tprints(", "); /* flags */ printflags(module_init_flags, tcp->u_arg[2], "MODULE_INIT_???"); diff --git a/block.c b/block.c index 3c007464e..4d1a965b4 100644 --- a/block.c +++ b/block.c @@ -32,9 +32,27 @@ #include DEF_MPERS_TYPE(struct_blkpg_ioctl_arg) #include DEF_MPERS_TYPE(struct_blkpg_partition) -#include +#include #include +typedef struct { + int op; + int flags; + int datalen; + void *data; +} struct_blkpg_ioctl_arg; + +#define BLKPG_DEVNAMELTH 64 +#define BLKPG_VOLNAMELTH 64 +typedef struct { + int64_t start; /* starting offset in bytes */ + int64_t length; /* length in bytes */ + int pno; /* partition number */ + char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2, + to be used in kernel messages */ + char volname[BLKPG_VOLNAMELTH]; /* volume label */ +} struct_blkpg_partition; + #define BLKTRACE_BDEV_SIZE 32 typedef struct blk_user_trace_setup { char name[BLKTRACE_BDEV_SIZE]; /* output */ @@ -46,11 +64,12 @@ typedef struct blk_user_trace_setup { uint32_t pid; } struct_blk_user_trace_setup; -typedef struct blkpg_ioctl_arg struct_blkpg_ioctl_arg; -typedef struct blkpg_partition struct_blkpg_partition; - #include MPERS_DEFS +#ifndef BLKPG +# define BLKPG _IO(0x12,105) +#endif + /* * ioctl numbers <= 114 are present in Linux 2.4. The following ones have been * added since then and headers containing them may not be available on every @@ -110,9 +129,10 @@ print_blkpg_req(struct tcb *tcp, const struct_blkpg_ioctl_arg *blkpg) tprintf(", flags=%d, datalen=%d, data=", blkpg->flags, blkpg->datalen); - if (!umove_or_printaddr(tcp, (long) blkpg->data, &p)) { - tprintf("{start=%lld, length=%lld, pno=%d, devname=", - (long long) p.start, (long long) p.length, p.pno); + if (!umove_or_printaddr(tcp, ptr_to_kulong(blkpg->data), &p)) { + tprintf("{start=%" PRId64 ", length=%" PRId64 + ", pno=%d, devname=", + p.start, p.length, p.pno); print_quoted_string(p.devname, sizeof(p.devname), QUOTE_0_TERMINATED); tprints(", volname="); @@ -123,14 +143,14 @@ print_blkpg_req(struct tcb *tcp, const struct_blkpg_ioctl_arg *blkpg) tprints("}"); } -MPERS_PRINTER_DECL(int, block_ioctl, struct tcb *tcp, - const unsigned int code, const long arg) +MPERS_PRINTER_DECL(int, block_ioctl, struct tcb *const tcp, + const unsigned int code, const kernel_ulong_t arg) { switch (code) { /* take arg as a value, not as a pointer */ case BLKRASET: case BLKFRASET: - tprintf(", %lu", arg); + tprintf(", %" PRI_klu, arg); break; /* return an unsigned short */ diff --git a/bootstrap b/bootstrap deleted file mode 100755 index f7ef6f719..000000000 --- a/bootstrap +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -eu - -for m in m32 mx32; do - tests=tests-$m - rm -rf $tests - mkdir $tests - s='[[:space:]]*' - sed "s/@arch@/@arch_$m@/; - s/^MPERS_NAME$s=.*/& $m/; - s/^ARCH_MFLAGS$s=.*/& -DMPERS_IS_\$(MPERS_NAME) -$m/" \ - tests/Makefile.am > $tests/Makefile.am - for f in tests/*; do - case "${f##*/}" in - Makefile*) continue;; - esac - ln -s ../"$f" $tests/ - done -done - -./generate_mpers_am.sh -./xlat/gen.sh - -exec autoreconf -f -i "$@" diff --git a/bpf.c b/bpf.c index 20070b371..99410183b 100644 --- a/bpf.c +++ b/bpf.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2017 Quentin Monnet * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,9 +36,11 @@ #include "xlat/bpf_map_types.h" #include "xlat/bpf_prog_types.h" #include "xlat/bpf_map_update_elem_flags.h" +#include "xlat/bpf_attach_type.h" static int -bpf_map_create(struct tcb *tcp, const long addr, unsigned int size) +bpf_map_create(struct tcb *const tcp, const kernel_ulong_t addr, + unsigned int size) { struct { uint32_t map_type, key_size, value_size, max_entries; @@ -61,7 +64,8 @@ bpf_map_create(struct tcb *tcp, const long addr, unsigned int size) } static void -bpf_map_update_elem(struct tcb *tcp, const long addr, unsigned int size) +bpf_map_update_elem(struct tcb *const tcp, const kernel_ulong_t addr, + unsigned int size) { struct { uint32_t map_fd; @@ -88,7 +92,8 @@ bpf_map_update_elem(struct tcb *tcp, const long addr, unsigned int size) } static void -bpf_map_delete_elem(struct tcb *tcp, const long addr, unsigned int size) +bpf_map_delete_elem(struct tcb *const tcp, const kernel_ulong_t addr, + unsigned int size) { struct { uint32_t map_fd; @@ -110,7 +115,8 @@ bpf_map_delete_elem(struct tcb *tcp, const long addr, unsigned int size) } static int -bpf_map_io(struct tcb *tcp, const long addr, unsigned int size, const char *text) +bpf_map_io(struct tcb *const tcp, const kernel_ulong_t addr, unsigned int size, + const char *const text) { struct bpf_io_elem_struct { uint32_t map_fd; @@ -142,7 +148,8 @@ bpf_map_io(struct tcb *tcp, const long addr, unsigned int size, const char *text } static int -bpf_prog_load(struct tcb *tcp, const long addr, unsigned int size) +bpf_prog_load(struct tcb *const tcp, const kernel_ulong_t addr, + unsigned int size) { struct { uint32_t prog_type, insn_cnt; @@ -165,17 +172,88 @@ bpf_prog_load(struct tcb *tcp, const long addr, unsigned int size) printxval(bpf_prog_types, attr.prog_type, "BPF_PROG_TYPE_???"); tprintf(", insn_cnt=%u, insns=%#" PRIx64 ", license=", attr.insn_cnt, attr.insns); - printstr(tcp, attr.license, -1); + printstr(tcp, attr.license); tprintf(", log_level=%u, log_size=%u, log_buf=%#" PRIx64 ", kern_version=%u}", attr.log_level, attr.log_size, attr.log_buf, attr.kern_version); return RVAL_DECODED | RVAL_FD; } +static int +bpf_obj_manage(struct tcb *const tcp, const kernel_ulong_t addr, + unsigned int size) +{ + struct { + uint64_t ATTRIBUTE_ALIGNED(8) pathname; + uint32_t bpf_fd; + } attr = {}; + + if (!size) { + printaddr(addr); + return RVAL_DECODED | RVAL_FD; + } + if (size > sizeof(attr)) + size = sizeof(attr); + if (umoven_or_printaddr(tcp, addr, size, &attr)) + return RVAL_DECODED | RVAL_FD; + + tprintf("{pathname="); + printpath(tcp, attr.pathname); + tprints(", bpf_fd="); + printfd(tcp, attr.bpf_fd); + tprintf("}"); + + return RVAL_DECODED | RVAL_FD; +} + +static int +bpf_prog_attach_detach(struct tcb *const tcp, const kernel_ulong_t addr, + unsigned int size, bool print_attach_bpf_fd) +{ + struct { + uint32_t target_fd, attach_bpf_fd, attach_type; + } attr = {}; + + if (!size) { + printaddr(addr); + return RVAL_DECODED; + } + if (size > sizeof(attr)) + size = sizeof(attr); + if (umoven_or_printaddr(tcp, addr, size, &attr)) + return RVAL_DECODED; + + tprintf("{target_fd="); + printfd(tcp, attr.target_fd); + if (print_attach_bpf_fd) { + tprintf(", attach_bpf_fd="); + printfd(tcp, attr.attach_bpf_fd); + } + tprintf(", attach_type="); + printxval(bpf_attach_type, attr.attach_type, "BPF_???"); + tprintf("}"); + + return RVAL_DECODED; +} + +static int +bpf_prog_attach(struct tcb *const tcp, const kernel_ulong_t addr, + unsigned int size) +{ + return bpf_prog_attach_detach(tcp, addr, size, true); +} + +static int +bpf_prog_detach(struct tcb *const tcp, const kernel_ulong_t addr, + unsigned int size) +{ + return bpf_prog_attach_detach(tcp, addr, size, false); +} + SYS_FUNC(bpf) { - const int cmd = tcp->u_arg[0]; - const long addr = tcp->u_arg[1]; + const unsigned int cmd = tcp->u_arg[0]; + const kernel_ulong_t addr = tcp->u_arg[1]; const unsigned int size = tcp->u_arg[2]; int rc = RVAL_DECODED; @@ -203,6 +281,18 @@ SYS_FUNC(bpf) case BPF_PROG_LOAD: rc = bpf_prog_load(tcp, addr, size); break; + case BPF_OBJ_PIN: + rc = bpf_obj_manage(tcp, addr, size); + break; + case BPF_OBJ_GET: + rc = bpf_obj_manage(tcp, addr, size); + break; + case BPF_PROG_ATTACH: + rc = bpf_prog_attach(tcp, addr, size); + break; + case BPF_PROG_DETACH: + rc = bpf_prog_detach(tcp, addr, size); + break; default: printaddr(addr); break; diff --git a/btrfs.c b/btrfs.c index 1306ceffc..e007040fd 100644 --- a/btrfs.c +++ b/btrfs.c @@ -204,7 +204,7 @@ btrfs_print_balance_args(const char *name, const struct btrfs_balance_args *bba) } static void -btrfs_print_balance(struct tcb *tcp, const long arg, bool out) +btrfs_print_balance(struct tcb *const tcp, const kernel_ulong_t arg, bool out) { struct btrfs_ioctl_balance_args balance_args; @@ -376,7 +376,7 @@ print_uint64(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) } static void -btrfs_print_qgroup_inherit(struct tcb *tcp, const unsigned long qgi_addr) +btrfs_print_qgroup_inherit(struct tcb *const tcp, const kernel_ulong_t qgi_addr) { struct btrfs_qgroup_inherit inherit; @@ -512,7 +512,8 @@ print_btrfs_ioctl_space_info(struct tcb *tcp, void *elem_buf, } MPERS_PRINTER_DECL(int, btrfs_ioctl, - struct tcb *tcp, const unsigned int code, const long arg) + struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) { switch (code) { /* Take no arguments; command only. */ @@ -1216,7 +1217,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, tprints("..."); else { uint64_t record; - print_array(tcp, (unsigned long) args.clone_sources, + print_array(tcp, ptr_to_kulong(args.clone_sources), args.clone_sources_count, &record, sizeof(record), umoven_or_printaddr, @@ -1316,11 +1317,11 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, printflags64(btrfs_snap_flags_v2, args.flags, "BTRFS_SUBVOL_???"); if (args.flags & BTRFS_SUBVOL_QGROUP_INHERIT) { - tprintf(", size=%llu, qgroup_inherit=", - (unsigned long long) args.size); + tprintf(", size=%" PRIu64 ", qgroup_inherit=", + (uint64_t) args.size); btrfs_print_qgroup_inherit(tcp, - (unsigned long) args.qgroup_inherit); + ptr_to_kulong(args.qgroup_inherit)); } tprints(", name="); print_quoted_string(args.name, sizeof(args.name), @@ -1328,7 +1329,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, tprints("}"); return 0; } - tprintf("{transid=%llu}", (unsigned long long) args.transid); + tprintf("{transid=%" PRIu64 "}", (uint64_t) args.transid); break; } diff --git a/capability.c b/capability.c index 421649d57..a3f06ea33 100644 --- a/capability.c +++ b/capability.c @@ -52,19 +52,19 @@ enum { #include "xlat/cap_version.h" -typedef struct user_cap_header_struct { +struct user_cap_header_struct { uint32_t version; int pid; -} *cap_user_header_t; +}; -typedef struct user_cap_data_struct { +struct user_cap_data_struct { uint32_t effective; uint32_t permitted; uint32_t inheritable; -} *cap_user_data_t; +}; -static cap_user_header_t -get_cap_header(struct tcb *tcp, unsigned long addr) +static const struct user_cap_header_struct * +get_cap_header(struct tcb *const tcp, const kernel_ulong_t addr) { static struct user_cap_header_struct header; @@ -78,17 +78,18 @@ get_cap_header(struct tcb *tcp, unsigned long addr) } static void -print_cap_header(struct tcb *tcp, unsigned long addr, cap_user_header_t h) +print_cap_header(struct tcb *const tcp, const kernel_ulong_t addr, + const struct user_cap_header_struct *const h) { if (!addr || !h) { printaddr(addr); return; } - tprints("{"); + tprints("{version="); printxval(cap_version, h->version, "_LINUX_CAPABILITY_VERSION_???"); - tprintf(", %d}", h->pid); + tprintf(", pid=%d}", h->pid); } static void @@ -105,7 +106,8 @@ print_cap_bits(const uint32_t lo, const uint32_t hi) } static void -print_cap_data(struct tcb *tcp, unsigned long addr, const cap_user_header_t h) +print_cap_data(struct tcb *const tcp, const kernel_ulong_t addr, + const struct user_cap_header_struct *const h) { struct user_cap_data_struct data[2]; unsigned int len; @@ -124,18 +126,18 @@ print_cap_data(struct tcb *tcp, unsigned long addr, const cap_user_header_t h) if (umoven_or_printaddr(tcp, addr, len * sizeof(data[0]), data)) return; - tprints("{"); + tprints("{effective="); print_cap_bits(data[0].effective, len > 1 ? data[1].effective : 0); - tprints(", "); + tprints(", permitted="); print_cap_bits(data[0].permitted, len > 1 ? data[1].permitted : 0); - tprints(", "); + tprints(", inheritable="); print_cap_bits(data[0].inheritable, len > 1 ? data[1].inheritable : 0); tprints("}"); } SYS_FUNC(capget) { - cap_user_header_t h; + const struct user_cap_header_struct *h; if (entering(tcp)) { h = get_cap_header(tcp, tcp->u_arg[0]); @@ -150,7 +152,8 @@ SYS_FUNC(capget) SYS_FUNC(capset) { - cap_user_header_t h = get_cap_header(tcp, tcp->u_arg[0]); + const struct user_cap_header_struct *const h = + get_cap_header(tcp, tcp->u_arg[0]); print_cap_header(tcp, tcp->u_arg[0], h); tprints(", "); print_cap_data(tcp, tcp->u_arg[1], h); diff --git a/clone.c b/clone.c index 604a695ea..5c60fbe47 100644 --- a/clone.c +++ b/clone.c @@ -30,14 +30,16 @@ */ #include "defs.h" - #include +#include #ifndef CSIGNAL # define CSIGNAL 0x000000ff #endif #include "xlat/clone_flags.h" +#include "xlat/setns_types.h" +#include "xlat/unshare_flags.h" #if defined IA64 # define ARG_FLAGS 0 @@ -73,25 +75,40 @@ # define ARG_CTID 4 #endif -#if defined I386 || defined X86_64 || defined X32 -extern void print_user_desc(struct tcb *, long); -#endif /* I386 || X86_64 || X32 */ +static void +print_tls_arg(struct tcb *const tcp, const kernel_ulong_t addr) +{ +#ifdef HAVE_STRUCT_USER_DESC +# if SUPPORTED_PERSONALITIES > 1 + if (current_personality == 1) +# endif + { + print_user_desc(tcp, tcp->u_arg[ARG_TLS]); + } +# if SUPPORTED_PERSONALITIES > 1 + else +# endif +#endif /* HAVE_STRUCT_USER_DESC */ + { + printaddr(tcp->u_arg[ARG_TLS]); + } +} SYS_FUNC(clone) { if (exiting(tcp)) { const char *sep = "|"; - unsigned long flags = tcp->u_arg[ARG_FLAGS]; + kernel_ulong_t flags = tcp->u_arg[ARG_FLAGS]; tprints("child_stack="); printaddr(tcp->u_arg[ARG_STACK]); tprints(", "); #ifdef ARG_STACKSIZE if (ARG_STACKSIZE != -1) - tprintf("stack_size=%#lx, ", + tprintf("stack_size=%#" PRI_klx ", ", tcp->u_arg[ARG_STACKSIZE]); #endif tprints("flags="); - if (!printflags(clone_flags, flags &~ CSIGNAL, NULL)) + if (!printflags64(clone_flags, flags &~ CSIGNAL, NULL)) sep = ""; if ((flags & CSIGNAL) != 0) tprintf("%s%s", sep, signame(flags & CSIGNAL)); @@ -103,22 +120,8 @@ SYS_FUNC(clone) printaddr(tcp->u_arg[ARG_PTID]); } if (flags & CLONE_SETTLS) { -#if defined I386 || defined X86_64 || defined X32 -# ifndef I386 - if (current_personality == 1) -# endif - { - tprints(", tls="); - print_user_desc(tcp, tcp->u_arg[ARG_TLS]); - } -# ifndef I386 - else -# endif -#endif /* I386 || X86_64 || X32 */ - { - tprints(", tls="); - printaddr(tcp->u_arg[ARG_TLS]); - } + tprints(", tls="); + print_tls_arg(tcp, tcp->u_arg[ARG_TLS]); } if (flags & (CLONE_CHILD_SETTID|CLONE_CHILD_CLEARTID)) { tprints(", child_tidptr="); @@ -144,14 +147,14 @@ SYS_FUNC(setns) { printfd(tcp, tcp->u_arg[0]); tprints(", "); - printflags(clone_flags, tcp->u_arg[1], "CLONE_???"); + printxval(setns_types, tcp->u_arg[1], "CLONE_NEW???"); return RVAL_DECODED; } SYS_FUNC(unshare) { - printflags_long(clone_flags, tcp->u_arg[0], "CLONE_???"); + printflags64(unshare_flags, tcp->u_arg[0], "CLONE_???"); return RVAL_DECODED; } diff --git a/compile b/compile new file mode 100755 index 000000000..531136b06 --- /dev/null +++ b/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/config.guess b/config.guess new file mode 100755 index 000000000..3c022c5bb --- /dev/null +++ b/config.guess @@ -0,0 +1,1444 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2015 Free Software Foundation, Inc. + +timestamp='2015-09-14' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2015 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.h.in b/config.h.in new file mode 100644 index 000000000..8b335f8b5 --- /dev/null +++ b/config.h.in @@ -0,0 +1,1293 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define for the AArch64 architecture. */ +#undef AARCH64 + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* Define for the Alpha architecture. */ +#undef ALPHA + +/* Define for the ARC architecture. */ +#undef ARC + +/* Define for the ARM architecture. */ +#undef ARM + +/* SA_RESTORER defined in */ +#undef ASM_SA_RESTORER + +/* SIGRTMIN defined in */ +#undef ASM_SIGRTMIN + +/* Define for the AVR32 architecture. */ +#undef AVR32 + +/* Define for the Blackfin architecture. */ +#undef BFIN + +/* Define for the CRISv10 architecture. */ +#undef CRISV10 + +/* Define for the CRISv32 architecture. */ +#undef CRISV32 + +/* Define to 1 if you want OABI support on ARM EABI. */ +#undef ENABLE_ARM_OABI + +/* Define to 1 if you have the `accept4' function. */ +#undef HAVE_ACCEPT4 + +/* Define to 1 if you have the header file. */ +#undef HAVE_ASM_CACHECTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ASM_SIGCONTEXT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ASM_SYSMIPS_H + +/* Define to 1 if you have BLKGETSIZE64. */ +#undef HAVE_BLKGETSIZE64 + +/* Define to 1 if you have the header file. */ +#undef HAVE_BLUETOOTH_BLUETOOTH_H + +/* Define to 1 if you have the declaration of `BTRFS_COMPRESS_LZO', and to 0 + if you don't. */ +#undef HAVE_DECL_BTRFS_COMPRESS_LZO + +/* Define to 1 if you have the declaration of `BTRFS_COMPRESS_NONE', and to 0 + if you don't. */ +#undef HAVE_DECL_BTRFS_COMPRESS_NONE + +/* Define to 1 if you have the declaration of `BTRFS_COMPRESS_ZLIB', and to 0 + if you don't. */ +#undef HAVE_DECL_BTRFS_COMPRESS_ZLIB + +/* Define to 1 if you have the declaration of `CTL_ARLAN', and to 0 if you + don't. */ +#undef HAVE_DECL_CTL_ARLAN + +/* Define to 1 if you have the declaration of `CTL_FRV', and to 0 if you + don't. */ +#undef HAVE_DECL_CTL_FRV + +/* Define to 1 if you have the declaration of `CTL_PM', and to 0 if you don't. + */ +#undef HAVE_DECL_CTL_PM + +/* Define to 1 if you have the declaration of `CTL_PROC', and to 0 if you + don't. */ +#undef HAVE_DECL_CTL_PROC + +/* Define to 1 if you have the declaration of `CTL_S390DBF', and to 0 if you + don't. */ +#undef HAVE_DECL_CTL_S390DBF + +/* Define to 1 if you have the declaration of `CTL_SUNRPC', and to 0 if you + don't. */ +#undef HAVE_DECL_CTL_SUNRPC + +/* Define to 1 if you have the declaration of `KERN_ACPI_VIDEO_FLAGS', and to + 0 if you don't. */ +#undef HAVE_DECL_KERN_ACPI_VIDEO_FLAGS + +/* Define to 1 if you have the declaration of `KERN_BOOTLOADER_TYPE', and to 0 + if you don't. */ +#undef HAVE_DECL_KERN_BOOTLOADER_TYPE + +/* Define to 1 if you have the declaration of `KERN_COMPAT_LOG', and to 0 if + you don't. */ +#undef HAVE_DECL_KERN_COMPAT_LOG + +/* Define to 1 if you have the declaration of `KERN_HZ_TIMER', and to 0 if you + don't. */ +#undef HAVE_DECL_KERN_HZ_TIMER + +/* Define to 1 if you have the declaration of `KERN_IA64_UNALIGNED', and to 0 + if you don't. */ +#undef HAVE_DECL_KERN_IA64_UNALIGNED + +/* Define to 1 if you have the declaration of `KERN_MAX_LOCK_DEPTH', and to 0 + if you don't. */ +#undef HAVE_DECL_KERN_MAX_LOCK_DEPTH + +/* Define to 1 if you have the declaration of `KERN_NGROUPS_MAX', and to 0 if + you don't. */ +#undef HAVE_DECL_KERN_NGROUPS_MAX + +/* Define to 1 if you have the declaration of `KERN_NMI_WATCHDOG', and to 0 if + you don't. */ +#undef HAVE_DECL_KERN_NMI_WATCHDOG + +/* Define to 1 if you have the declaration of `KERN_PANIC_ON_NMI', and to 0 if + you don't. */ +#undef HAVE_DECL_KERN_PANIC_ON_NMI + +/* Define to 1 if you have the declaration of `KERN_PRINTK_RATELIMIT', and to + 0 if you don't. */ +#undef HAVE_DECL_KERN_PRINTK_RATELIMIT + +/* Define to 1 if you have the declaration of `KERN_PRINTK_RATELIMIT_BURST', + and to 0 if you don't. */ +#undef HAVE_DECL_KERN_PRINTK_RATELIMIT_BURST + +/* Define to 1 if you have the declaration of `KERN_PTY', and to 0 if you + don't. */ +#undef HAVE_DECL_KERN_PTY + +/* Define to 1 if you have the declaration of `KERN_RANDOMIZE', and to 0 if + you don't. */ +#undef HAVE_DECL_KERN_RANDOMIZE + +/* Define to 1 if you have the declaration of `KERN_SETUID_DUMPABLE', and to 0 + if you don't. */ +#undef HAVE_DECL_KERN_SETUID_DUMPABLE + +/* Define to 1 if you have the declaration of `KERN_SPARC_SCONS_PWROFF', and + to 0 if you don't. */ +#undef HAVE_DECL_KERN_SPARC_SCONS_PWROFF + +/* Define to 1 if you have the declaration of `KERN_SPIN_RETRY', and to 0 if + you don't. */ +#undef HAVE_DECL_KERN_SPIN_RETRY + +/* Define to 1 if you have the declaration of `KERN_UNKNOWN_NMI_PANIC', and to + 0 if you don't. */ +#undef HAVE_DECL_KERN_UNKNOWN_NMI_PANIC + +/* Define to 1 if you have the declaration of `LO_FLAGS_AUTOCLEAR', and to 0 + if you don't. */ +#undef HAVE_DECL_LO_FLAGS_AUTOCLEAR + +/* Define to 1 if you have the declaration of `LO_FLAGS_DIRECT_IO', and to 0 + if you don't. */ +#undef HAVE_DECL_LO_FLAGS_DIRECT_IO + +/* Define to 1 if you have the declaration of `LO_FLAGS_PARTSCAN', and to 0 if + you don't. */ +#undef HAVE_DECL_LO_FLAGS_PARTSCAN + +/* Define to 1 if you have the declaration of `LO_FLAGS_READ_ONLY', and to 0 + if you don't. */ +#undef HAVE_DECL_LO_FLAGS_READ_ONLY + +/* Define to 1 if you have the declaration of `LO_FLAGS_USE_AOPS', and to 0 if + you don't. */ +#undef HAVE_DECL_LO_FLAGS_USE_AOPS + +/* Define to 1 if you have the declaration of `NET_CIPSOV4_CACHE_BUCKET_SIZE', + and to 0 if you don't. */ +#undef HAVE_DECL_NET_CIPSOV4_CACHE_BUCKET_SIZE + +/* Define to 1 if you have the declaration of `NET_CIPSOV4_CACHE_ENABLE', and + to 0 if you don't. */ +#undef HAVE_DECL_NET_CIPSOV4_CACHE_ENABLE + +/* Define to 1 if you have the declaration of `NET_CIPSOV4_RBM_OPTFMT', and to + 0 if you don't. */ +#undef HAVE_DECL_NET_CIPSOV4_RBM_OPTFMT + +/* Define to 1 if you have the declaration of `NET_CIPSOV4_RBM_STRICTVALID', + and to 0 if you don't. */ +#undef HAVE_DECL_NET_CIPSOV4_RBM_STRICTVALID + +/* Define to 1 if you have the declaration of `NET_CORE_AEVENT_ETIME', and to + 0 if you don't. */ +#undef HAVE_DECL_NET_CORE_AEVENT_ETIME + +/* Define to 1 if you have the declaration of `NET_CORE_AEVENT_RSEQTH', and to + 0 if you don't. */ +#undef HAVE_DECL_NET_CORE_AEVENT_RSEQTH + +/* Define to 1 if you have the declaration of `NET_CORE_BUDGET', and to 0 if + you don't. */ +#undef HAVE_DECL_NET_CORE_BUDGET + +/* Define to 1 if you have the declaration of `NET_CORE_DESTROY_DELAY', and to + 0 if you don't. */ +#undef HAVE_DECL_NET_CORE_DESTROY_DELAY + +/* Define to 1 if you have the declaration of `NET_CORE_WARNINGS', and to 0 if + you don't. */ +#undef HAVE_DECL_NET_CORE_WARNINGS + +/* Define to 1 if you have the declaration of `NET_DCCP', and to 0 if you + don't. */ +#undef HAVE_DECL_NET_DCCP + +/* Define to 1 if you have the declaration of `NET_IPV4_CONF_ARP_ACCEPT', and + to 0 if you don't. */ +#undef HAVE_DECL_NET_IPV4_CONF_ARP_ACCEPT + +/* Define to 1 if you have the declaration of `NET_IPV4_CONF_ARP_ANNOUNCE', + and to 0 if you don't. */ +#undef HAVE_DECL_NET_IPV4_CONF_ARP_ANNOUNCE + +/* Define to 1 if you have the declaration of `NET_IPV4_CONF_ARP_IGNORE', and + to 0 if you don't. */ +#undef HAVE_DECL_NET_IPV4_CONF_ARP_IGNORE + +/* Define to 1 if you have the declaration of `NET_IPV4_CONF_ARP_NOTIFY', and + to 0 if you don't. */ +#undef HAVE_DECL_NET_IPV4_CONF_ARP_NOTIFY + +/* Define to 1 if you have the declaration of + `NET_IPV4_CONF_FORCE_IGMP_VERSION', and to 0 if you don't. */ +#undef HAVE_DECL_NET_IPV4_CONF_FORCE_IGMP_VERSION + +/* Define to 1 if you have the declaration of + `NET_IPV4_CONF_PROMOTE_SECONDARIES', and to 0 if you don't. */ +#undef HAVE_DECL_NET_IPV4_CONF_PROMOTE_SECONDARIES + +/* Define to 1 if you have the declaration of + `NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR', and to 0 if you don't. */ +#undef HAVE_DECL_NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR + +/* Define to 1 if you have the declaration of `NET_IPV4_IGMP_MAX_MSF', and to + 0 if you don't. */ +#undef HAVE_DECL_NET_IPV4_IGMP_MAX_MSF + +/* Define to 1 if you have the declaration of `NET_IPV4_IPFRAG_MAX_DIST', and + to 0 if you don't. */ +#undef HAVE_DECL_NET_IPV4_IPFRAG_MAX_DIST + +/* Define to 1 if you have the declaration of + `NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS', and to 0 if you don't. */ +#undef HAVE_DECL_NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS + +/* Define to 1 if you have the declaration of + `NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS', and to 0 if you don't. */ +#undef HAVE_DECL_NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS + +/* Define to 1 if you have the declaration of `NET_IPV6_MLD_MAX_MSF', and to 0 + if you don't. */ +#undef HAVE_DECL_NET_IPV6_MLD_MAX_MSF + +/* Define to 1 if you have the declaration of + `NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS', and to 0 if you don't. */ +#undef HAVE_DECL_NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS + +/* Define to 1 if you have the declaration of `NET_IRDA', and to 0 if you + don't. */ +#undef HAVE_DECL_NET_IRDA + +/* Define to 1 if you have the declaration of `NET_LLC', and to 0 if you + don't. */ +#undef HAVE_DECL_NET_LLC + +/* Define to 1 if you have the declaration of `NET_NETFILTER', and to 0 if you + don't. */ +#undef HAVE_DECL_NET_NETFILTER + +/* Define to 1 if you have the declaration of `NET_TCP_ABC', and to 0 if you + don't. */ +#undef HAVE_DECL_NET_TCP_ABC + +/* Define to 1 if you have the declaration of `NET_TCP_ALLOWED_CONG_CONTROL', + and to 0 if you don't. */ +#undef HAVE_DECL_NET_TCP_ALLOWED_CONG_CONTROL + +/* Define to 1 if you have the declaration of `NET_TCP_AVAIL_CONG_CONTROL', + and to 0 if you don't. */ +#undef HAVE_DECL_NET_TCP_AVAIL_CONG_CONTROL + +/* Define to 1 if you have the declaration of `NET_TCP_BASE_MSS', and to 0 if + you don't. */ +#undef HAVE_DECL_NET_TCP_BASE_MSS + +/* Define to 1 if you have the declaration of `NET_TCP_BIC_BETA', and to 0 if + you don't. */ +#undef HAVE_DECL_NET_TCP_BIC_BETA + +/* Define to 1 if you have the declaration of `NET_TCP_CONG_CONTROL', and to 0 + if you don't. */ +#undef HAVE_DECL_NET_TCP_CONG_CONTROL + +/* Define to 1 if you have the declaration of `NET_TCP_DEFAULT_WIN_SCALE', and + to 0 if you don't. */ +#undef HAVE_DECL_NET_TCP_DEFAULT_WIN_SCALE + +/* Define to 1 if you have the declaration of `NET_TCP_DMA_COPYBREAK', and to + 0 if you don't. */ +#undef HAVE_DECL_NET_TCP_DMA_COPYBREAK + +/* Define to 1 if you have the declaration of `NET_TCP_FRTO_RESPONSE', and to + 0 if you don't. */ +#undef HAVE_DECL_NET_TCP_FRTO_RESPONSE + +/* Define to 1 if you have the declaration of `NET_TCP_MAX_SSTHRESH', and to 0 + if you don't. */ +#undef HAVE_DECL_NET_TCP_MAX_SSTHRESH + +/* Define to 1 if you have the declaration of `NET_TCP_MODERATE_RCVBUF', and + to 0 if you don't. */ +#undef HAVE_DECL_NET_TCP_MODERATE_RCVBUF + +/* Define to 1 if you have the declaration of `NET_TCP_MTU_PROBING', and to 0 + if you don't. */ +#undef HAVE_DECL_NET_TCP_MTU_PROBING + +/* Define to 1 if you have the declaration of `NET_TCP_NO_METRICS_SAVE', and + to 0 if you don't. */ +#undef HAVE_DECL_NET_TCP_NO_METRICS_SAVE + +/* Define to 1 if you have the declaration of `NET_TCP_SLOW_START_AFTER_IDLE', + and to 0 if you don't. */ +#undef HAVE_DECL_NET_TCP_SLOW_START_AFTER_IDLE + +/* Define to 1 if you have the declaration of `NET_TCP_TSO_WIN_DIVISOR', and + to 0 if you don't. */ +#undef HAVE_DECL_NET_TCP_TSO_WIN_DIVISOR + +/* Define to 1 if you have the declaration of `PTRACE_PEEKUSER', and to 0 if + you don't. */ +#undef HAVE_DECL_PTRACE_PEEKUSER + +/* Define to 1 if you have the declaration of `PTRACE_POKEUSER', and to 0 if + you don't. */ +#undef HAVE_DECL_PTRACE_POKEUSER + +/* Define to 1 if you have the declaration of `P_ALL', and to 0 if you don't. + */ +#undef HAVE_DECL_P_ALL + +/* Define to 1 if you have the declaration of `P_CID', and to 0 if you don't. + */ +#undef HAVE_DECL_P_CID + +/* Define to 1 if you have the declaration of `P_GID', and to 0 if you don't. + */ +#undef HAVE_DECL_P_GID + +/* Define to 1 if you have the declaration of `P_LWPID', and to 0 if you + don't. */ +#undef HAVE_DECL_P_LWPID + +/* Define to 1 if you have the declaration of `P_PGID', and to 0 if you don't. + */ +#undef HAVE_DECL_P_PGID + +/* Define to 1 if you have the declaration of `P_PID', and to 0 if you don't. + */ +#undef HAVE_DECL_P_PID + +/* Define to 1 if you have the declaration of `P_PPID', and to 0 if you don't. + */ +#undef HAVE_DECL_P_PPID + +/* Define to 1 if you have the declaration of `P_SID', and to 0 if you don't. + */ +#undef HAVE_DECL_P_SID + +/* Define to 1 if you have the declaration of `P_UID', and to 0 if you don't. + */ +#undef HAVE_DECL_P_UID + +/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you + don't. */ +#undef HAVE_DECL_SYS_ERRLIST + +/* Define to 1 if you have the declaration of + `V4L2_BUF_TYPE_SLICED_VBI_CAPTURE', and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE + +/* Define to 1 if you have the declaration of + `V4L2_BUF_TYPE_SLICED_VBI_OUTPUT', and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT + +/* Define to 1 if you have the declaration of `V4L2_BUF_TYPE_VBI_CAPTURE', and + to 0 if you don't. */ +#undef HAVE_DECL_V4L2_BUF_TYPE_VBI_CAPTURE + +/* Define to 1 if you have the declaration of `V4L2_BUF_TYPE_VBI_OUTPUT', and + to 0 if you don't. */ +#undef HAVE_DECL_V4L2_BUF_TYPE_VBI_OUTPUT + +/* Define to 1 if you have the declaration of `V4L2_BUF_TYPE_VIDEO_CAPTURE', + and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE + +/* Define to 1 if you have the declaration of + `V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE', and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE + +/* Define to 1 if you have the declaration of `V4L2_BUF_TYPE_VIDEO_OUTPUT', + and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT + +/* Define to 1 if you have the declaration of + `V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE', and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE + +/* Define to 1 if you have the declaration of + `V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY', and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY + +/* Define to 1 if you have the declaration of `V4L2_BUF_TYPE_VIDEO_OVERLAY', + and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OVERLAY + +/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_470_SYSTEM_BG', + and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_BG + +/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_470_SYSTEM_M', + and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_M + +/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_BT878', and to + 0 if you don't. */ +#undef HAVE_DECL_V4L2_COLORSPACE_BT878 + +/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_JPEG', and to 0 + if you don't. */ +#undef HAVE_DECL_V4L2_COLORSPACE_JPEG + +/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_REC709', and to + 0 if you don't. */ +#undef HAVE_DECL_V4L2_COLORSPACE_REC709 + +/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_SMPTE170M', and + to 0 if you don't. */ +#undef HAVE_DECL_V4L2_COLORSPACE_SMPTE170M + +/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_SMPTE240M', and + to 0 if you don't. */ +#undef HAVE_DECL_V4L2_COLORSPACE_SMPTE240M + +/* Define to 1 if you have the declaration of `V4L2_COLORSPACE_SRGB', and to 0 + if you don't. */ +#undef HAVE_DECL_V4L2_COLORSPACE_SRGB + +/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_BITMASK', and to + 0 if you don't. */ +#undef HAVE_DECL_V4L2_CTRL_TYPE_BITMASK + +/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_BOOLEAN', and to + 0 if you don't. */ +#undef HAVE_DECL_V4L2_CTRL_TYPE_BOOLEAN + +/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_BUTTON', and to + 0 if you don't. */ +#undef HAVE_DECL_V4L2_CTRL_TYPE_BUTTON + +/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_CTRL_CLASS', and + to 0 if you don't. */ +#undef HAVE_DECL_V4L2_CTRL_TYPE_CTRL_CLASS + +/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_INTEGER', and to + 0 if you don't. */ +#undef HAVE_DECL_V4L2_CTRL_TYPE_INTEGER + +/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_INTEGER64', and + to 0 if you don't. */ +#undef HAVE_DECL_V4L2_CTRL_TYPE_INTEGER64 + +/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_INTEGER_MENU', + and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_CTRL_TYPE_INTEGER_MENU + +/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_MENU', and to 0 + if you don't. */ +#undef HAVE_DECL_V4L2_CTRL_TYPE_MENU + +/* Define to 1 if you have the declaration of `V4L2_CTRL_TYPE_STRING', and to + 0 if you don't. */ +#undef HAVE_DECL_V4L2_CTRL_TYPE_STRING + +/* Define to 1 if you have the declaration of `V4L2_FIELD_ALTERNATE', and to 0 + if you don't. */ +#undef HAVE_DECL_V4L2_FIELD_ALTERNATE + +/* Define to 1 if you have the declaration of `V4L2_FIELD_ANY', and to 0 if + you don't. */ +#undef HAVE_DECL_V4L2_FIELD_ANY + +/* Define to 1 if you have the declaration of `V4L2_FIELD_BOTTOM', and to 0 if + you don't. */ +#undef HAVE_DECL_V4L2_FIELD_BOTTOM + +/* Define to 1 if you have the declaration of `V4L2_FIELD_INTERLACED', and to + 0 if you don't. */ +#undef HAVE_DECL_V4L2_FIELD_INTERLACED + +/* Define to 1 if you have the declaration of `V4L2_FIELD_INTERLACED_BT', and + to 0 if you don't. */ +#undef HAVE_DECL_V4L2_FIELD_INTERLACED_BT + +/* Define to 1 if you have the declaration of `V4L2_FIELD_INTERLACED_TB', and + to 0 if you don't. */ +#undef HAVE_DECL_V4L2_FIELD_INTERLACED_TB + +/* Define to 1 if you have the declaration of `V4L2_FIELD_NONE', and to 0 if + you don't. */ +#undef HAVE_DECL_V4L2_FIELD_NONE + +/* Define to 1 if you have the declaration of `V4L2_FIELD_SEQ_BT', and to 0 if + you don't. */ +#undef HAVE_DECL_V4L2_FIELD_SEQ_BT + +/* Define to 1 if you have the declaration of `V4L2_FIELD_SEQ_TB', and to 0 if + you don't. */ +#undef HAVE_DECL_V4L2_FIELD_SEQ_TB + +/* Define to 1 if you have the declaration of `V4L2_FIELD_TOP', and to 0 if + you don't. */ +#undef HAVE_DECL_V4L2_FIELD_TOP + +/* Define to 1 if you have the declaration of `V4L2_FRMIVAL_TYPE_CONTINUOUS', + and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_FRMIVAL_TYPE_CONTINUOUS + +/* Define to 1 if you have the declaration of `V4L2_FRMIVAL_TYPE_DISCRETE', + and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_FRMIVAL_TYPE_DISCRETE + +/* Define to 1 if you have the declaration of `V4L2_FRMIVAL_TYPE_STEPWISE', + and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_FRMIVAL_TYPE_STEPWISE + +/* Define to 1 if you have the declaration of `V4L2_FRMSIZE_TYPE_CONTINUOUS', + and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_FRMSIZE_TYPE_CONTINUOUS + +/* Define to 1 if you have the declaration of `V4L2_FRMSIZE_TYPE_DISCRETE', + and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_FRMSIZE_TYPE_DISCRETE + +/* Define to 1 if you have the declaration of `V4L2_FRMSIZE_TYPE_STEPWISE', + and to 0 if you don't. */ +#undef HAVE_DECL_V4L2_FRMSIZE_TYPE_STEPWISE + +/* Define to 1 if you have the declaration of `V4L2_MEMORY_DMABUF', and to 0 + if you don't. */ +#undef HAVE_DECL_V4L2_MEMORY_DMABUF + +/* Define to 1 if you have the declaration of `V4L2_MEMORY_MMAP', and to 0 if + you don't. */ +#undef HAVE_DECL_V4L2_MEMORY_MMAP + +/* Define to 1 if you have the declaration of `V4L2_MEMORY_OVERLAY', and to 0 + if you don't. */ +#undef HAVE_DECL_V4L2_MEMORY_OVERLAY + +/* Define to 1 if you have the declaration of `V4L2_MEMORY_USERPTR', and to 0 + if you don't. */ +#undef HAVE_DECL_V4L2_MEMORY_USERPTR + +/* Define to 1 if you have the declaration of `V4L2_PRIORITY_BACKGROUND', and + to 0 if you don't. */ +#undef HAVE_DECL_V4L2_PRIORITY_BACKGROUND + +/* Define to 1 if you have the declaration of `V4L2_PRIORITY_INTERACTIVE', and + to 0 if you don't. */ +#undef HAVE_DECL_V4L2_PRIORITY_INTERACTIVE + +/* Define to 1 if you have the declaration of `V4L2_PRIORITY_RECORD', and to 0 + if you don't. */ +#undef HAVE_DECL_V4L2_PRIORITY_RECORD + +/* Define to 1 if you have the declaration of `V4L2_PRIORITY_UNSET', and to 0 + if you don't. */ +#undef HAVE_DECL_V4L2_PRIORITY_UNSET + +/* Define to 1 if you have the declaration of `V4L2_TUNER_ANALOG_TV', and to 0 + if you don't. */ +#undef HAVE_DECL_V4L2_TUNER_ANALOG_TV + +/* Define to 1 if you have the declaration of `V4L2_TUNER_DIGITAL_TV', and to + 0 if you don't. */ +#undef HAVE_DECL_V4L2_TUNER_DIGITAL_TV + +/* Define to 1 if you have the declaration of `V4L2_TUNER_RADIO', and to 0 if + you don't. */ +#undef HAVE_DECL_V4L2_TUNER_RADIO + +/* Define to 1 if you have the declaration of `VM_BLOCK_DUMP', and to 0 if you + don't. */ +#undef HAVE_DECL_VM_BLOCK_DUMP + +/* Define to 1 if you have the declaration of `VM_HUGETLB_GROUP', and to 0 if + you don't. */ +#undef HAVE_DECL_VM_HUGETLB_GROUP + +/* Define to 1 if you have the declaration of `VM_LAPTOP_MODE', and to 0 if + you don't. */ +#undef HAVE_DECL_VM_LAPTOP_MODE + +/* Define to 1 if you have the declaration of `VM_LEGACY_VA_LAYOUT', and to 0 + if you don't. */ +#undef HAVE_DECL_VM_LEGACY_VA_LAYOUT + +/* Define to 1 if you have the declaration of `VM_MAX_MAP_COUNT', and to 0 if + you don't. */ +#undef HAVE_DECL_VM_MAX_MAP_COUNT + +/* Define to 1 if you have the declaration of `VM_SWAP_TOKEN_TIMEOUT', and to + 0 if you don't. */ +#undef HAVE_DECL_VM_SWAP_TOKEN_TIMEOUT + +/* Define to 1 if you have the declaration of `VM_VFS_CACHE_PRESSURE', and to + 0 if you don't. */ +#undef HAVE_DECL_VM_VFS_CACHE_PRESSURE + +/* Define to 1 if the system provides dladdr */ +#undef HAVE_DLADDR + +/* Define to 1 if you have the header file. */ +#undef HAVE_ELF_H + +/* Define to 1 if you have the `fallocate' function. */ +#undef HAVE_FALLOCATE + +/* Define to 1 if you have the `fanotify_mark' function. */ +#undef HAVE_FANOTIFY_MARK + +/* Define to 1 if you have the `fopen64' function. */ +#undef HAVE_FOPEN64 + +/* Define to 1 if you have the `fork' function. */ +#undef HAVE_FORK + +/* Define to 1 if you have the `fputs_unlocked' function. */ +#undef HAVE_FPUTS_UNLOCKED + +/* Define to 1 if you have the `fstatat' function. */ +#undef HAVE_FSTATAT + +/* Define to 1 if you have the `ftruncate' function. */ +#undef HAVE_FTRUNCATE + +/* Define to 1 if you have the `futimens' function. */ +#undef HAVE_FUTIMENS + +/* Define to 1 if you have the header file. */ +#undef HAVE_GNU_STUBS + +/* Define to 1 if you have the header file. */ +#undef HAVE_GNU_STUBS_32_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GNU_STUBS_X32_H + +/* Define to 1 if you have the `if_indextoname' function. */ +#undef HAVE_IF_INDEXTONAME + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBUNWIND_PTRACE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_BPF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_BSG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_BTRFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_DM_IOCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_DQBLK_XFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_FALLOC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_FIEMAP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_FILTER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_HIDDEV_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_INPUT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_IPC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_IP_VS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_MMTIMER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_MQUEUE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_MSG_H + +/* Define to 1 if you have the header file. + */ +#undef HAVE_LINUX_NETFILTER_ARP_ARP_TABLES_H + +/* Define to 1 if you have the header + file. */ +#undef HAVE_LINUX_NETFILTER_BRIDGE_EBTABLES_H + +/* Define to 1 if you have the header file. + */ +#undef HAVE_LINUX_NETFILTER_IPV4_IP_TABLES_H + +/* Define to 1 if you have the header + file. */ +#undef HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_PERF_EVENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_QUOTA_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_SECCOMP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_SECUREBITS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_SEM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_SHM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_USERFAULTFD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_UTSNAME_H + +/* Define to 1 if you have CFLAG mpers support */ +#undef HAVE_M32_MPERS + +/* Define to 1 if MPERS_NAME has the type 'struct stat'. */ +#undef HAVE_M32_STRUCT_STAT + +/* Define to 1 if MPERS_NAME has the type 'struct stat64'. */ +#undef HAVE_M32_STRUCT_STAT64 + +/* Define to 1 if 'st_mtime_nsec' is a member of MPERS_NAME 'struct stat64'. + */ +#undef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC + +/* Define to 1 if 'st_mtime_nsec' is a member of MPERS_NAME 'struct stat'. */ +#undef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MQUEUE_H + +/* Define to 1 if you have CFLAG mpers support */ +#undef HAVE_MX32_MPERS + +/* Define to 1 if MPERS_NAME has the type 'struct stat'. */ +#undef HAVE_MX32_STRUCT_STAT + +/* Define to 1 if MPERS_NAME has the type 'struct stat64'. */ +#undef HAVE_MX32_STRUCT_STAT64 + +/* Define to 1 if 'st_mtime_nsec' is a member of MPERS_NAME 'struct stat64'. + */ +#undef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC + +/* Define to 1 if 'st_mtime_nsec' is a member of MPERS_NAME 'struct stat'. */ +#undef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_SCTP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_TCP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_UDP_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETIPX_IPX_H + +/* Define to 1 if you have the `open64' function. */ +#undef HAVE_OPEN64 + +/* Define to 1 if you have the `prctl' function. */ +#undef HAVE_PRCTL + +/* Define to 1 if you have the `preadv' function. */ +#undef HAVE_PREADV + +/* Define to 1 if you have the `process_vm_readv' function. */ +#undef HAVE_PROCESS_VM_READV + +/* Define to 1 if you have the `pwritev' function. */ +#undef HAVE_PWRITEV + +/* Define to 1 if you have the `readahead' function. */ +#undef HAVE_READAHEAD + +/* Define to 1 if you have the header file. */ +#undef HAVE_SCSI_SG_H + +/* Define to 1 if `si_overrun' is a member of `siginfo_t'. */ +#undef HAVE_SIGINFO_T_SI_OVERRUN + +/* Define to 1 if `si_syscall' is a member of `siginfo_t'. */ +#undef HAVE_SIGINFO_T_SI_SYSCALL + +/* Define to 1 if `si_timerid' is a member of `siginfo_t'. */ +#undef HAVE_SIGINFO_T_SI_TIMERID + +/* Define to 1 if you have the `signalfd' function. */ +#undef HAVE_SIGNALFD + +/* Define to 1 if the system has the type `sig_atomic_t'. */ +#undef HAVE_SIG_ATOMIC_T + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `stpcpy' function. */ +#undef HAVE_STPCPY + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STROPTS_H + +/* Define to 1 if you have the `strsignal' function. */ +#undef HAVE_STRSIGNAL + +/* Define to 1 if the system has the type `struct blk_user_trace_setup'. */ +#undef HAVE_STRUCT_BLK_USER_TRACE_SETUP + +/* Define to 1 if `start' is a member of `struct + btrfs_ioctl_defrag_range_args'. */ +#undef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START + +/* Define to 1 if `compat_flags' is a member of `struct + btrfs_ioctl_feature_flags'. */ +#undef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS + +/* Define to 1 if `nodesize' is a member of `struct btrfs_ioctl_fs_info_args'. + */ +#undef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE + +/* Define to 1 if `buf_size' is a member of `struct + btrfs_ioctl_search_args_v2'. */ +#undef HAVE_STRUCT_BTRFS_IOCTL_SEARCH_ARGS_V2_BUF_SIZE + +/* Define to 1 if the system has the type `struct flock'. */ +#undef HAVE_STRUCT_FLOCK + +/* Define to 1 if the system has the type `struct flock64'. */ +#undef HAVE_STRUCT_FLOCK64 + +/* Define to 1 if the system has the type `struct ia64_fpreg'. */ +#undef HAVE_STRUCT_IA64_FPREG + +/* Define to 1 if `resolution' is a member of `struct input_absinfo'. */ +#undef HAVE_STRUCT_INPUT_ABSINFO_RESOLUTION + +/* Define to 1 if the system has the type `struct mmsghdr'. */ +#undef HAVE_STRUCT_MMSGHDR + +/* Define to 1 if `aux_watermark' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_AUX_WATERMARK + +/* Define to 1 if `bp_type' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_BP_TYPE + +/* Define to 1 if `branch_sample_type' is a member of `struct + perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_BRANCH_SAMPLE_TYPE + +/* Define to 1 if `comm_exec' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_COMM_EXEC + +/* Define to 1 if `config1' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG1 + +/* Define to 1 if `config2' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG2 + +/* Define to 1 if `context_switch' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_CONTEXT_SWITCH + +/* Define to 1 if `exclude_callchain_kernel' is a member of `struct + perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_KERNEL + +/* Define to 1 if `exclude_callchain_user' is a member of `struct + perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_USER + +/* Define to 1 if `exclude_guest' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_GUEST + +/* Define to 1 if `exclude_host' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_HOST + +/* Define to 1 if `mmap2' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_MMAP2 + +/* Define to 1 if `mmap_data' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_MMAP_DATA + +/* Define to 1 if `precise_ip' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP + +/* Define to 1 if `sample_id_all' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_ID_ALL + +/* Define to 1 if `sample_max_stack' is a member of `struct perf_event_attr'. + */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_MAX_STACK + +/* Define to 1 if `sample_regs_intr' is a member of `struct perf_event_attr'. + */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_INTR + +/* Define to 1 if `sample_regs_user' is a member of `struct perf_event_attr'. + */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_USER + +/* Define to 1 if `sample_stack_user' is a member of `struct perf_event_attr'. + */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_STACK_USER + +/* Define to 1 if `use_clockid' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_USE_CLOCKID + +/* Define to 1 if `write_backward' is a member of `struct perf_event_attr'. */ +#undef HAVE_STRUCT_PERF_EVENT_ATTR_WRITE_BACKWARD + +/* Define to 1 if the system has the type `struct ptrace_peeksiginfo_args'. */ +#undef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS + +/* Define to 1 if the system has the type `struct pt_all_user_regs'. */ +#undef HAVE_STRUCT_PT_ALL_USER_REGS + +/* Define to 1 if the system has the type `struct sigcontext'. */ +#undef HAVE_STRUCT_SIGCONTEXT + +/* Define to 1 if the system has the type `struct stat64'. */ +#undef HAVE_STRUCT_STAT64 + +/* Define to 1 if `st_mtime_nsec' is a member of `struct stat64'. */ +#undef HAVE_STRUCT_STAT64_ST_MTIME_NSEC + +/* Define to 1 if the system has the type `struct statfs'. */ +#undef HAVE_STRUCT_STATFS + +/* Define to 1 if the system has the type `struct statfs64'. */ +#undef HAVE_STRUCT_STATFS64 + +/* Define to 1 if `f_flags' is a member of `struct statfs64'. */ +#undef HAVE_STRUCT_STATFS64_F_FLAGS + +/* Define to 1 if `f_frsize' is a member of `struct statfs64'. */ +#undef HAVE_STRUCT_STATFS64_F_FRSIZE + +/* Define to 1 if `f_fsid.val' is a member of `struct statfs64'. */ +#undef HAVE_STRUCT_STATFS64_F_FSID_VAL + +/* Define to 1 if `f_fsid.__val' is a member of `struct statfs64'. */ +#undef HAVE_STRUCT_STATFS64_F_FSID___VAL + +/* Define to 1 if `f_flags' is a member of `struct statfs'. */ +#undef HAVE_STRUCT_STATFS_F_FLAGS + +/* Define to 1 if `f_frsize' is a member of `struct statfs'. */ +#undef HAVE_STRUCT_STATFS_F_FRSIZE + +/* Define to 1 if `f_fsid.val' is a member of `struct statfs'. */ +#undef HAVE_STRUCT_STATFS_F_FSID_VAL + +/* Define to 1 if `f_fsid.__val' is a member of `struct statfs'. */ +#undef HAVE_STRUCT_STATFS_F_FSID___VAL + +/* Define to 1 if `st_mtime_nsec' is a member of `struct stat'. */ +#undef HAVE_STRUCT_STAT_ST_MTIME_NSEC + +/* Define to 1 if `tai' is a member of `struct timex'. */ +#undef HAVE_STRUCT_TIMEX_TAI + +/* Define to 1 if the system has the type `struct user_desc'. */ +#undef HAVE_STRUCT_USER_DESC + +/* Define to 1 if `domainname' is a member of `struct utsname'. */ +#undef HAVE_STRUCT_UTSNAME_DOMAINNAME + +/* Define to 1 if the system has the type `struct __kernel_flock'. */ +#undef HAVE_STRUCT___KERNEL_FLOCK + +/* Define to 1 if the system has the type `struct __kernel_flock64'. */ +#undef HAVE_STRUCT___KERNEL_FLOCK64 + +/* Define to 1 if the system has the type `struct __old_kernel_stat'. */ +#undef HAVE_STRUCT___OLD_KERNEL_STAT + +/* Define to 1 if you have the `sync_file_range' function. */ +#undef HAVE_SYNC_FILE_RANGE + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_CONF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_EVENTFD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_FANOTIFY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IPC_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_MSG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_QUOTA_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_REG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SEM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SHM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SIGNALFD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_XATTR_H + +/* Define to 1 if typeof works with your compiler. */ +#undef HAVE_TYPEOF + +/* Define to 1 if union bpf_attr.attach_type initialization works */ +#undef HAVE_UNION_BPF_ATTR_ATTACH_TYPE + +/* Define to 1 if union bpf_attr.bpf_fd initialization works */ +#undef HAVE_UNION_BPF_ATTR_BPF_FD + +/* Define to 1 if union bpf_attr.log_buf initialization works */ +#undef HAVE_UNION_BPF_ATTR_LOG_BUF + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_USTAT_H + +/* Define to 1 if you have the `utimensat' function. */ +#undef HAVE_UTIMENSAT + +/* Define to 1 if the system provides __builtin_popcount function */ +#undef HAVE___BUILTIN_POPCOUNT + +/* Define to 1 if the system has the type `__kernel_long_t'. */ +#undef HAVE___KERNEL_LONG_T + +/* Define to 1 if the system has the type `__kernel_ulong_t'. */ +#undef HAVE___KERNEL_ULONG_T + +/* Define for the HPPA architecture. */ +#undef HPPA + +/* Define for the i386 architecture. */ +#undef I386 + +/* Define for the IA64 architecture. */ +#undef IA64 + +/* Define for _ABIN32. */ +#undef LINUX_MIPSN32 + +/* Define for _ABI64. */ +#undef LINUX_MIPSN64 + +/* Define for _ABIO32. */ +#undef LINUX_MIPSO32 + +/* Define for the m68k architecture. */ +#undef M68K + +/* Define for the Meta architecture. */ +#undef METAG + +/* Define for the MicroBlaze architecture. */ +#undef MICROBLAZE + +/* Define for the MIPS architecture. */ +#undef MIPS + +/* Define for the Nios-II architecture. */ +#undef NIOS2 + +/* Define for the OpenRISC 1000 architecture. */ +#undef OR1K + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define for the PowerPC architecture. */ +#undef POWERPC + +/* Define for the PowerPC64 architecture. */ +#undef POWERPC64 + +/* Define for the RISC-V architecture */ +#undef RISCV + +/* Define for the S390 architecture. */ +#undef S390 + +/* Define for the S390x architecture. */ +#undef S390X + +/* Define for the SH architecture. */ +#undef SH + +/* Define for the SH64 architecture. */ +#undef SH64 + +/* The size of `kernel_long_t', as computed by sizeof. */ +#undef SIZEOF_KERNEL_LONG_T + +/* The size of `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of `long long', as computed by sizeof. */ +#undef SIZEOF_LONG_LONG + +/* The size of `off_t', as computed by sizeof. */ +#undef SIZEOF_OFF_T + +/* The size of `struct i64_i32', as computed by sizeof. */ +#undef SIZEOF_STRUCT_I64_I32 + +/* Define for the SPARC architecture. */ +#undef SPARC + +/* Define for the SPARC64 architecture. */ +#undef SPARC64 + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define for the Tile architecture */ +#undef TILE + +/* Compile stack tracing functionality */ +#undef USE_LIBUNWIND + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + +/* Version number of package */ +#undef VERSION + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Define for the 32bit AMD x86-64 architecture. */ +#undef X32 + +/* Define for the 64bit AMD x86-64 architecture. */ +#undef X86_64 + +/* Define for the Xtensa architecture */ +#undef XTENSA + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define to __typeof__ if your compiler spells it that way. */ +#undef typeof + +/* Define to `int' if doesn't define. */ +#undef uid_t diff --git a/config.status b/config.status new file mode 100755 index 000000000..e38358530 --- /dev/null +++ b/config.status @@ -0,0 +1,1741 @@ +#! /bin/sh +# Generated by configure. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by strace $as_me 4.16, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +# Files that config.status was made for. +config_files=" Makefile tests/Makefile tests-m32/Makefile tests-mx32/Makefile strace.spec debian/changelog" +config_headers=" config.h" +config_commands=" depfiles" + +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to . +strace home page: ." + +ac_cs_config="" +ac_cs_version="\ +strace config.status 4.16 +configured by ./configure, generated by GNU Autoconf 2.69, + with options \"$ac_cs_config\" + +Copyright (C) Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='/usr/local/google/home/enh/Downloads/strace-4.16' +srcdir='.' +INSTALL='/usr/bin/install -c' +MKDIR_P='/bin/mkdir -p' +AWK='gawk' +test -n "$AWK" || AWK=awk +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +if $ac_cs_recheck; then + set X /bin/sh './configure' $ac_configure_extra_args --no-create --no-recursion + shift + $as_echo "running CONFIG_SHELL=/bin/sh $*" >&6 + CONFIG_SHELL='/bin/sh' + export CONFIG_SHELL + exec "$@" +fi + +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +# +# INIT-COMMANDS +# +AMDEP_TRUE="" ac_aux_dir="." + + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "tests-m32/Makefile") CONFIG_FILES="$CONFIG_FILES tests-m32/Makefile" ;; + "tests-mx32/Makefile") CONFIG_FILES="$CONFIG_FILES tests-mx32/Makefile" ;; + "strace.spec") CONFIG_FILES="$CONFIG_FILES strace.spec" ;; + "debian/changelog") CONFIG_FILES="$CONFIG_FILES debian/changelog" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX")` && + test -n "$tmp" && test -d "$tmp" +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && +S["am__EXEEXT_FALSE"]="" +S["am__EXEEXT_TRUE"]="#" +S["LTLIBOBJS"]="" +S["LIBOBJS"]="" +S["VALGRIND_CHECK_RULES"]="\n"\ +"# Valgrind check\n"\ +"#\n"\ +"# Optional:\n"\ +"# - VALGRIND_SUPPRESSIONS_FILES: Space-separated list of Valgrind suppressions\n"\ +"# files to load. (Default: empty)\n"\ +"# - VALGRIND_FLAGS: General flags to pass to all Valgrind tools.\n"\ +"# (Default: --num-callers=30)\n"\ +"# - VALGRIND_$toolname_FLAGS: Flags to pass to Valgrind $toolname (one of:\n"\ +"# memcheck, helgrind, drd, sgcheck). (Default: various)\n"\ +"\n"\ +"# Optional variables\n"\ +"VALGRIND_SUPPRESSIONS ?= $(addprefix --suppressions=,$(VALGRIND_SUPPRESSIONS_FILES))\n"\ +"VALGRIND_FLAGS ?= --num-callers=30\n"\ +"VALGRIND_memcheck_FLAGS ?= --leak-check=full --show-reachable=no\n"\ +"VALGRIND_helgrind_FLAGS ?= --history-level=approx\n"\ +"VALGRIND_drd_FLAGS ?=\n"\ +"VALGRIND_sgcheck_FLAGS ?=\n"\ +"\n"\ +"# Internal use\n"\ +"valgrind_log_files = $(addprefix test-suite-,$(addsuffix .log,$(valgrind_tools)))\n"\ +"\n"\ +"valgrind_memcheck_flags = --tool=memcheck $(VALGRIND_memcheck_FLAGS)\n"\ +"valgrind_helgrind_flags = --tool=helgrind $(VALGRIND_helgrind_FLAGS)\n"\ +"valgrind_drd_flags = --tool=drd $(VALGRIND_drd_FLAGS)\n"\ +"valgrind_sgcheck_flags = --tool=exp-sgcheck $(VALGRIND_sgcheck_FLAGS)\n"\ +"\n"\ +"valgrind_quiet = $(valgrind_quiet_$(V))\n"\ +"valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY))\n"\ +"valgrind_quiet_0 = --quiet\n"\ +"valgrind_v_use = $(valgrind_v_use_$(V))\n"\ +"valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY))\n"\ +"valgrind_v_use_0 = @echo \" USE \" $(patsubst check-valgrind-%,%,$@):;\n"\ +"\n"\ +"# Support running with and without libtool.\n"\ +"ifneq ($(LIBTOOL),)\n"\ +"valgrind_lt = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=execute\n"\ +"else\n"\ +"valgrind_lt =\n"\ +"endif\n"\ +"\n"\ +"# Use recursive makes in order to ignore errors during check\n"\ +"check-valgrind:\n"\ +"ifeq ($(VALGRIND_ENABLED),yes)\n"\ +" -$(AM_V_at)$(foreach tool,$(valgrind_enabled_tools), \\\n"\ +" $(MAKE) $(AM_MAKEFLAGS) -k check-valgrind-$(tool); \\\n"\ +" )\n"\ +"else\n"\ +" @echo \"Need to reconfigure with --enable-valgrind\"\n"\ +"endif\n"\ +"\n"\ +"# Valgrind running\n"\ +"VALGRIND_TESTS_ENVIRONMENT = \\\n"\ +" $(TESTS_ENVIRONMENT) \\\n"\ +" env VALGRIND=$(VALGRIND) \\\n"\ +" G_SLICE=always-malloc,debug-blocks \\\n"\ +" G_DEBUG=fatal-warnings,fatal-criticals,gc-friendly\n"\ +"\n"\ +"VALGRIND_LOG_COMPILER = \\\n"\ +" $(valgrind_lt) \\\n"\ +" $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS)\n"\ +"\n"\ +"define valgrind_tool_rule =\n"\ +"check-valgrind-$(1): $$(BUILT_SOURCES)\n"\ +"ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes)\n"\ +" $$(valgrind_v_use)$$(MAKE) $$(AM_MAKEFLAGS) check-am \\\n"\ +" TESTS_ENVIRONMENT=\"$$(VALGRIND_TESTS_ENVIRONMENT)\" \\\n"\ +" LOG_COMPILER=\"$$(VALGRIND_LOG_COMPILER)\" \\\n"\ +" LOG_FLAGS=\"$$(valgrind_$(1)_flags)\" \\\n"\ +" TEST_SUITE_LOG=test-suite-$(1).log\n"\ +"else ifeq ($$(VALGRIND_ENABLED),yes)\n"\ +" @echo \"Need to reconfigure with --enable-valgrind-$(1)\"\n"\ +"else\n"\ +" @echo \"Need to reconfigure with --enable-valgrind\"\n"\ +"endif\n"\ +"endef\n"\ +"\n"\ +"$(foreach tool,$(valgrind_tools),$(eval $(call valgrind_tool_rule,$(tool))))\n"\ +"\n"\ +"AM_DISTCHECK_CONFIGURE_FLAGS ?=\n"\ +"AM_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind\n"\ +"\n"\ +"MOSTLYCLEANFILES ?=\n"\ +"MOSTLYCLEANFILES += $(valgrind_log_files)\n"\ +"\n"\ +".PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools))\n"\ +"" +S["valgrind_enabled_tools"]=" memcheck" +S["valgrind_tools"]="memcheck helgrind drd sgcheck" +S["ENABLE_VALGRIND_sgcheck"]="" +S["ENABLE_VALGRIND_drd"]="no" +S["ENABLE_VALGRIND_helgrind"]="no" +S["ENABLE_VALGRIND_memcheck"]="yes" +S["VALGRIND_ENABLED"]="yes" +S["VALGRIND_ENABLED_FALSE"]="#" +S["VALGRIND_ENABLED_TRUE"]="" +S["VALGRIND"]="valgrind" +S["HAVE_MX32_MPERS_FALSE"]="#" +S["HAVE_MX32_MPERS_TRUE"]="" +S["HAVE_MX32_RUNTIME_FALSE"]="#" +S["HAVE_MX32_RUNTIME_TRUE"]="" +S["HAVE_M32_MPERS_FALSE"]="#" +S["HAVE_M32_MPERS_TRUE"]="" +S["HAVE_M32_RUNTIME_FALSE"]="#" +S["HAVE_M32_RUNTIME_TRUE"]="" +S["USE_LIBUNWIND_FALSE"]="" +S["USE_LIBUNWIND_TRUE"]="#" +S["libunwind_CPPFLAGS"]="" +S["libunwind_LDFLAGS"]="" +S["libunwind_LIBS"]="" +S["PERL"]="/usr/bin/perl" +S["dl_LIBS"]="-ldl" +S["MIPS_ABI"]="" +S["arch_mx32"]="x32" +S["arch_m32"]="i386" +S["arch"]="x86_64" +S["CODE_COVERAGE_RULES"]="\n"\ +"# Code coverage\n"\ +"#\n"\ +"# Optional:\n"\ +"# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.\n"\ +"# Multiple directories may be specified, separated by whitespace.\n"\ +"# (Default: $(top_builddir))\n"\ +"# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated\n"\ +"# by lcov for code coverage. (Default:\n"\ +"# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)\n"\ +"# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage\n"\ +"# reports to be created. (Default:\n"\ +"# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)\n"\ +"# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage,\n"\ +"# set to 0 to disable it and leave empty to stay with the default.\n"\ +"# (Default: empty)\n"\ +"# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov\n"\ +"# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)\n"\ +"# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov\n"\ +"# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)\n"\ +"# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov\n"\ +"# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the\n"\ +"# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)\n"\ +"# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov\n"\ +"# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)\n"\ +"# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering\n"\ +"# lcov instance. (Default: empty)\n"\ +"# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov\n"\ +"# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)\n"\ +"# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the\n"\ +"# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE)\n"\ +"# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml\n"\ +"# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT)\n"\ +"# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore\n"\ +"#\n"\ +"# The generated report will be titled using the $(PACKAGE_NAME) and\n"\ +"# $(PACKAGE_VERSION). In order to add the current git hash to the title,\n"\ +"# use the git-version-gen script, available online.\n"\ +"\n"\ +"# Optional variables\n"\ +"CODE_COVERAGE_DIRECTORY ?= $(top_builddir)\n"\ +"CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info\n"\ +"CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage\n"\ +"CODE_COVERAGE_BRANCH_COVERAGE ?=\n"\ +"CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\\\n"\ +"--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))\n"\ +"CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT)\n"\ +"CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool \"$(GCOV)\"\n"\ +"CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH)\n"\ +"CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT)\n"\ +"CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?=\n"\ +"CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT)\n"\ +"CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\\\n"\ +"$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\\\n"\ +"--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE))\n"\ +"CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS)\n"\ +"CODE_COVERAGE_IGNORE_PATTERN ?=\n"\ +"\n"\ +"code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V))\n"\ +"code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY))\n"\ +"code_coverage_v_lcov_cap_0 = @echo \" LCOV --capture\"\\\n"\ +" $(CODE_COVERAGE_OUTPUT_FILE);\n"\ +"code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V))\n"\ +"code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY))\n"\ +"code_coverage_v_lcov_ign_0 = @echo \" LCOV --remove /tmp/*\"\\\n"\ +" $(CODE_COVERAGE_IGNORE_PATTERN);\n"\ +"code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V))\n"\ +"code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY))\n"\ +"code_coverage_v_genhtml_0 = @echo \" GEN \" $(CODE_COVERAGE_OUTPUT_DIRECTORY);\n"\ +"code_coverage_quiet = $(code_coverage_quiet_$(V))\n"\ +"code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))\n"\ +"code_coverage_quiet_0 = --quiet\n"\ +"\n"\ +"# sanitizes the test-name: replaces with underscores: dashes and dots\n"\ +"code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1)))\n"\ +"\n"\ +"# Use recursive makes in order to ignore errors during check\n"\ +"check-code-coverage:\n"\ +"ifeq ($(CODE_COVERAGE_ENABLED),yes)\n"\ +" -$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check\n"\ +" $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture\n"\ +"else\n"\ +" @echo \"Need to reconfigure with --enable-code-coverage\"\n"\ +"endif\n"\ +"\n"\ +"# Capture code coverage data\n"\ +"code-coverage-capture: code-coverage-capture-hook\n"\ +"ifeq ($(CODE_COVERAGE_ENABLED),yes)\n"\ +" $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file \"$(CODE_COVE"\ +"RAGE_OUTPUT_FILE).tmp\" --test-name \"$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))\" --no-checksum --compat-libtool $(CODE_COVERAG"\ +"E_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS)\n"\ +" $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove \"$(CODE_COVERAGE_OUTPUT_FIL"\ +"E).tmp\" \"/tmp/*\" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file \"$(CODE_COVERAGE_OUTPUT_FILE)\" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOP"\ +"TS)\n"\ +" -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp\n"\ +" $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory \"$(CODE_COV"\ +"ERAGE_OUTPUT_DIRECTORY)\" --title \"$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage\" --legend --show-details \"$(CODE_COVERAGE_OUTPUT_FILE)\" $(CODE_CO"\ +"VERAGE_GENHTML_OPTIONS)\n"\ +" @echo \"file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html\"\n"\ +"else\n"\ +" @echo \"Need to reconfigure with --enable-code-coverage\"\n"\ +"endif\n"\ +"\n"\ +"# Hook rule executed before code-coverage-capture, overridable by the user\n"\ +"code-coverage-capture-hook:\n"\ +"\n"\ +"ifeq ($(CODE_COVERAGE_ENABLED),yes)\n"\ +"clean: code-coverage-clean\n"\ +"distclean: code-coverage-clean\n"\ +"code-coverage-clean:\n"\ +" -$(LCOV) --directory $(top_builddir) -z\n"\ +" -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)\n"\ +" -find . \\( -name \"*.gcda\" -o -name \"*.gcno\" -o -name \"*.gcov\" \\) -delete\n"\ +"endif\n"\ +"\n"\ +"GITIGNOREFILES ?=\n"\ +"GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)\n"\ +"\n"\ +"AM_DISTCHECK_CONFIGURE_FLAGS ?=\n"\ +"AM_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage\n"\ +"\n"\ +".PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean\n"\ +"" +S["CODE_COVERAGE_LDFLAGS"]="" +S["CODE_COVERAGE_CXXFLAGS"]="" +S["CODE_COVERAGE_CFLAGS"]="" +S["CODE_COVERAGE_CPPFLAGS"]="" +S["GENHTML"]="" +S["LCOV"]="" +S["GCOV"]="" +S["CODE_COVERAGE_ENABLED"]="no" +S["CODE_COVERAGE_ENABLED_FALSE"]="" +S["CODE_COVERAGE_ENABLED_TRUE"]="#" +S["SED"]="/bin/sed" +S["EGREP"]="/bin/grep -E" +S["GREP"]="/bin/grep" +S["RANLIB"]="ranlib" +S["WARN_CFLAGS_FOR_BUILD"]=" -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaratio"\ +"n -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings" +S["LDFLAGS_FOR_BUILD"]="" +S["CPPFLAGS_FOR_BUILD"]="" +S["CFLAGS_FOR_BUILD"]="-g -O2" +S["BUILD_OBJEXT"]="" +S["BUILD_EXEEXT"]="" +S["CPP_FOR_BUILD"]="gcc -E" +S["ac_ct_CC_FOR_BUILD"]="gcc" +S["CC_FOR_BUILD"]="gcc" +S["WARN_CFLAGS"]=" -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaratio"\ +"n -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings" +S["CPP"]="gcc -E" +S["am__fastdepCC_FALSE"]="#" +S["am__fastdepCC_TRUE"]="" +S["CCDEPMODE"]="depmode=gcc3" +S["am__nodep"]="_no" +S["AMDEPBACKSLASH"]="\\" +S["AMDEP_FALSE"]="#" +S["AMDEP_TRUE"]="" +S["am__quote"]="" +S["am__include"]="include" +S["DEPDIR"]=".deps" +S["OBJEXT"]="o" +S["EXEEXT"]="" +S["ac_ct_CC"]="gcc" +S["CPPFLAGS"]="" +S["LDFLAGS"]="" +S["CFLAGS"]="-g -O2" +S["CC"]="gcc" +S["DEB_CHANGELOGTIME"]="Wed, 15 Feb 2017 11:38:25 -0800" +S["RPM_CHANGELOGTIME"]="Wed Feb 15 2017" +S["host_os"]="linux-gnu" +S["host_vendor"]="pc" +S["host_cpu"]="x86_64" +S["host"]="x86_64-pc-linux-gnu" +S["build_os"]="linux-gnu" +S["build_vendor"]="pc" +S["build_cpu"]="x86_64" +S["build"]="x86_64-pc-linux-gnu" +S["MAINT"]="#" +S["MAINTAINER_MODE_FALSE"]="" +S["MAINTAINER_MODE_TRUE"]="#" +S["AM_BACKSLASH"]="\\" +S["AM_DEFAULT_VERBOSITY"]="1" +S["AM_DEFAULT_V"]="$(AM_DEFAULT_VERBOSITY)" +S["AM_V"]="$(V)" +S["am__untar"]="$${TAR-tar} xf -" +S["am__tar"]="$${TAR-tar} chof - \"$$tardir\"" +S["AMTAR"]="$${TAR-tar}" +S["am__leading_dot"]="." +S["SET_MAKE"]="" +S["AWK"]="gawk" +S["mkdir_p"]="$(MKDIR_P)" +S["MKDIR_P"]="/bin/mkdir -p" +S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s" +S["STRIP"]="" +S["install_sh"]="${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/install-sh" +S["MAKEINFO"]="${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing makeinfo" +S["AUTOHEADER"]="${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing autoheader" +S["AUTOMAKE"]="${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing automake-1.14" +S["AUTOCONF"]="${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing autoconf" +S["ACLOCAL"]="${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing aclocal-1.14" +S["VERSION"]="4.16" +S["PACKAGE"]="strace" +S["CYGPATH_W"]="echo" +S["am__isrc"]="" +S["INSTALL_DATA"]="${INSTALL} -m 644" +S["INSTALL_SCRIPT"]="${INSTALL}" +S["INSTALL_PROGRAM"]="${INSTALL}" +S["target_alias"]="" +S["host_alias"]="" +S["build_alias"]="" +S["LIBS"]="" +S["ECHO_T"]="" +S["ECHO_N"]="-n" +S["ECHO_C"]="" +S["DEFS"]="-DHAVE_CONFIG_H" +S["mandir"]="${datarootdir}/man" +S["localedir"]="${datarootdir}/locale" +S["libdir"]="${exec_prefix}/lib" +S["psdir"]="${docdir}" +S["pdfdir"]="${docdir}" +S["dvidir"]="${docdir}" +S["htmldir"]="${docdir}" +S["infodir"]="${datarootdir}/info" +S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}" +S["oldincludedir"]="/usr/include" +S["includedir"]="${prefix}/include" +S["localstatedir"]="${prefix}/var" +S["sharedstatedir"]="${prefix}/com" +S["sysconfdir"]="${prefix}/etc" +S["datadir"]="${datarootdir}" +S["datarootdir"]="${prefix}/share" +S["libexecdir"]="${exec_prefix}/libexec" +S["sbindir"]="${exec_prefix}/sbin" +S["bindir"]="${exec_prefix}/bin" +S["program_transform_name"]="s,x,x," +S["prefix"]="/usr/local" +S["exec_prefix"]="${prefix}" +S["PACKAGE_URL"]="https://strace.io" +S["PACKAGE_BUGREPORT"]="strace-devel@lists.sourceforge.net" +S["PACKAGE_STRING"]="strace 4.16" +S["PACKAGE_VERSION"]="4.16" +S["PACKAGE_TARNAME"]="strace" +S["PACKAGE_NAME"]="strace" +S["PATH_SEPARATOR"]=":" +S["SHELL"]="/bin/sh" +_ACAWK +cat >>"$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +D["PACKAGE_NAME"]=" \"strace\"" +D["PACKAGE_TARNAME"]=" \"strace\"" +D["PACKAGE_VERSION"]=" \"4.16\"" +D["PACKAGE_STRING"]=" \"strace 4.16\"" +D["PACKAGE_BUGREPORT"]=" \"strace-devel@lists.sourceforge.net\"" +D["PACKAGE_URL"]=" \"https://strace.io\"" +D["PACKAGE"]=" \"strace\"" +D["VERSION"]=" \"4.16\"" +D["STDC_HEADERS"]=" 1" +D["HAVE_SYS_TYPES_H"]=" 1" +D["HAVE_SYS_STAT_H"]=" 1" +D["HAVE_STDLIB_H"]=" 1" +D["HAVE_STRING_H"]=" 1" +D["HAVE_MEMORY_H"]=" 1" +D["HAVE_STRINGS_H"]=" 1" +D["HAVE_INTTYPES_H"]=" 1" +D["HAVE_STDINT_H"]=" 1" +D["HAVE_UNISTD_H"]=" 1" +D["__EXTENSIONS__"]=" 1" +D["_ALL_SOURCE"]=" 1" +D["_GNU_SOURCE"]=" 1" +D["_POSIX_PTHREAD_SEMANTICS"]=" 1" +D["_TANDEM_SOURCE"]=" 1" +D["X86_64"]=" 1" +D["ENABLE_ARM_OABI"]=" 0" +D["HAVE_TYPEOF"]=" 1" +D["HAVE_ACCEPT4"]=" 1" +D["HAVE_FALLOCATE"]=" 1" +D["HAVE_FANOTIFY_MARK"]=" 1" +D["HAVE_FOPEN64"]=" 1" +D["HAVE_FORK"]=" 1" +D["HAVE_FPUTS_UNLOCKED"]=" 1" +D["HAVE_FSTATAT"]=" 1" +D["HAVE_FTRUNCATE"]=" 1" +D["HAVE_FUTIMENS"]=" 1" +D["HAVE_IF_INDEXTONAME"]=" 1" +D["HAVE_OPEN64"]=" 1" +D["HAVE_PRCTL"]=" 1" +D["HAVE_PREADV"]=" 1" +D["HAVE_PROCESS_VM_READV"]=" 1" +D["HAVE_PWRITEV"]=" 1" +D["HAVE_READAHEAD"]=" 1" +D["HAVE_SIGNALFD"]=" 1" +D["HAVE_STPCPY"]=" 1" +D["HAVE_STRERROR"]=" 1" +D["HAVE_STRSIGNAL"]=" 1" +D["HAVE_SYNC_FILE_RANGE"]=" 1" +D["HAVE_UTIMENSAT"]=" 1" +D["HAVE_SIG_ATOMIC_T"]=" 1" +D["HAVE_STRUCT_SIGCONTEXT"]=" 1" +D["HAVE_STRUCT_MMSGHDR"]=" 1" +D["HAVE___KERNEL_LONG_T"]=" 1" +D["HAVE___KERNEL_ULONG_T"]=" 1" +D["HAVE_STRUCT___OLD_KERNEL_STAT"]=" 1" +D["HAVE_STRUCT_USER_DESC"]=" 1" +D["HAVE_STRUCT_STAT_ST_MTIME_NSEC"]=" 1" +D["HAVE_STRUCT_FLOCK"]=" 1" +D["HAVE_STRUCT_FLOCK64"]=" 1" +D["HAVE_STRUCT_TIMEX_TAI"]=" 1" +D["HAVE_STRUCT_UTSNAME_DOMAINNAME"]=" 1" +D["HAVE_SIGINFO_T_SI_SYSCALL"]=" 1" +D["HAVE_SIGINFO_T_SI_TIMERID"]=" 1" +D["HAVE_SIGINFO_T_SI_OVERRUN"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_MMAP_DATA"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_ID_ALL"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_HOST"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_GUEST"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_KERNEL"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_USER"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_MMAP2"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_BP_TYPE"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG1"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG2"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_BRANCH_SAMPLE_TYPE"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_USER"]=" 1" +D["HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_STACK_USER"]=" 1" +D["HAVE_ELF_H"]=" 1" +D["HAVE_INTTYPES_H"]=" 1" +D["HAVE_LINUX_BSG_H"]=" 1" +D["HAVE_LINUX_DM_IOCTL_H"]=" 1" +D["HAVE_LINUX_DQBLK_XFS_H"]=" 1" +D["HAVE_LINUX_FALLOC_H"]=" 1" +D["HAVE_LINUX_FIEMAP_H"]=" 1" +D["HAVE_LINUX_FILTER_H"]=" 1" +D["HAVE_LINUX_HIDDEV_H"]=" 1" +D["HAVE_LINUX_IP_VS_H"]=" 1" +D["HAVE_LINUX_IPC_H"]=" 1" +D["HAVE_LINUX_MMTIMER_H"]=" 1" +D["HAVE_LINUX_MSG_H"]=" 1" +D["HAVE_LINUX_PERF_EVENT_H"]=" 1" +D["HAVE_LINUX_QUOTA_H"]=" 1" +D["HAVE_LINUX_SECCOMP_H"]=" 1" +D["HAVE_LINUX_SECUREBITS_H"]=" 1" +D["HAVE_LINUX_SEM_H"]=" 1" +D["HAVE_LINUX_SHM_H"]=" 1" +D["HAVE_LINUX_UTSNAME_H"]=" 1" +D["HAVE_MQUEUE_H"]=" 1" +D["HAVE_NETIPX_IPX_H"]=" 1" +D["HAVE_SCSI_SG_H"]=" 1" +D["HAVE_STROPTS_H"]=" 1" +D["HAVE_SYS_EVENTFD_H"]=" 1" +D["HAVE_SYS_FANOTIFY_H"]=" 1" +D["HAVE_SYS_IPC_H"]=" 1" +D["HAVE_SYS_MSG_H"]=" 1" +D["HAVE_SYS_QUOTA_H"]=" 1" +D["HAVE_SYS_REG_H"]=" 1" +D["HAVE_SYS_SEM_H"]=" 1" +D["HAVE_SYS_SHM_H"]=" 1" +D["HAVE_SYS_SIGNALFD_H"]=" 1" +D["HAVE_SYS_XATTR_H"]=" 1" +D["HAVE_USTAT_H"]=" 1" +D["HAVE_NETINET_TCP_H"]=" 1" +D["HAVE_NETINET_UDP_H"]=" 1" +D["HAVE_LINUX_MQUEUE_H"]=" 1" +D["HAVE_LINUX_NETFILTER_ARP_ARP_TABLES_H"]=" 1" +D["HAVE_LINUX_NETFILTER_IPV4_IP_TABLES_H"]=" 1" +D["HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H"]=" 1" +D["HAVE_LINUX_INPUT_H"]=" 1" +D["HAVE_STRUCT_INPUT_ABSINFO_RESOLUTION"]=" 1" +D["HAVE_STRUCT_STATFS"]=" 1" +D["HAVE_STRUCT_STATFS_F_FRSIZE"]=" 1" +D["HAVE_STRUCT_STATFS_F_FLAGS"]=" 1" +D["HAVE_STRUCT_STATFS_F_FSID_VAL"]=" 1" +D["HAVE_STRUCT_STATFS64"]=" 1" +D["HAVE_STRUCT_STATFS64_F_FRSIZE"]=" 1" +D["HAVE_STRUCT_STATFS64_F_FLAGS"]=" 1" +D["HAVE_STRUCT_STATFS64_F_FSID_VAL"]=" 1" +D["HAVE_STRUCT_BLK_USER_TRACE_SETUP"]=" 1" +D["HAVE_LINUX_BTRFS_H"]=" 1" +D["HAVE_DECL_BTRFS_COMPRESS_NONE"]=" 0" +D["HAVE_DECL_BTRFS_COMPRESS_ZLIB"]=" 0" +D["HAVE_DECL_BTRFS_COMPRESS_LZO"]=" 0" +D["HAVE_DECL_SYS_ERRLIST"]=" 1" +D["HAVE_DECL_PTRACE_PEEKUSER"]=" 1" +D["HAVE_DECL_PTRACE_POKEUSER"]=" 1" +D["HAVE_DECL_P_PID"]=" 1" +D["HAVE_DECL_P_PPID"]=" 0" +D["HAVE_DECL_P_PGID"]=" 1" +D["HAVE_DECL_P_SID"]=" 0" +D["HAVE_DECL_P_CID"]=" 0" +D["HAVE_DECL_P_UID"]=" 0" +D["HAVE_DECL_P_GID"]=" 0" +D["HAVE_DECL_P_ALL"]=" 1" +D["HAVE_DECL_P_LWPID"]=" 0" +D["HAVE_DECL_LO_FLAGS_READ_ONLY"]=" 1" +D["HAVE_DECL_LO_FLAGS_USE_AOPS"]=" 0" +D["HAVE_DECL_LO_FLAGS_AUTOCLEAR"]=" 1" +D["HAVE_DECL_LO_FLAGS_PARTSCAN"]=" 1" +D["HAVE_DECL_LO_FLAGS_DIRECT_IO"]=" 0" +D["HAVE_DECL_CTL_PROC"]=" 1" +D["HAVE_DECL_CTL_ARLAN"]=" 1" +D["HAVE_DECL_CTL_S390DBF"]=" 1" +D["HAVE_DECL_CTL_SUNRPC"]=" 1" +D["HAVE_DECL_CTL_PM"]=" 1" +D["HAVE_DECL_CTL_FRV"]=" 1" +D["HAVE_DECL_KERN_PRINTK_RATELIMIT"]=" 1" +D["HAVE_DECL_KERN_PRINTK_RATELIMIT_BURST"]=" 1" +D["HAVE_DECL_KERN_PTY"]=" 1" +D["HAVE_DECL_KERN_NGROUPS_MAX"]=" 1" +D["HAVE_DECL_KERN_SPARC_SCONS_PWROFF"]=" 1" +D["HAVE_DECL_KERN_HZ_TIMER"]=" 1" +D["HAVE_DECL_KERN_UNKNOWN_NMI_PANIC"]=" 1" +D["HAVE_DECL_KERN_BOOTLOADER_TYPE"]=" 1" +D["HAVE_DECL_KERN_RANDOMIZE"]=" 1" +D["HAVE_DECL_KERN_SETUID_DUMPABLE"]=" 1" +D["HAVE_DECL_KERN_SPIN_RETRY"]=" 1" +D["HAVE_DECL_KERN_ACPI_VIDEO_FLAGS"]=" 1" +D["HAVE_DECL_KERN_IA64_UNALIGNED"]=" 1" +D["HAVE_DECL_KERN_COMPAT_LOG"]=" 1" +D["HAVE_DECL_KERN_MAX_LOCK_DEPTH"]=" 1" +D["HAVE_DECL_KERN_NMI_WATCHDOG"]=" 1" +D["HAVE_DECL_KERN_PANIC_ON_NMI"]=" 1" +D["HAVE_DECL_NET_LLC"]=" 1" +D["HAVE_DECL_NET_NETFILTER"]=" 1" +D["HAVE_DECL_NET_DCCP"]=" 1" +D["HAVE_DECL_NET_IRDA"]=" 1" +D["HAVE_DECL_NET_CORE_DESTROY_DELAY"]=" 0" +D["HAVE_DECL_NET_CORE_BUDGET"]=" 1" +D["HAVE_DECL_NET_CORE_AEVENT_ETIME"]=" 1" +D["HAVE_DECL_NET_CORE_AEVENT_RSEQTH"]=" 1" +D["HAVE_DECL_NET_CORE_WARNINGS"]=" 1" +D["HAVE_DECL_NET_IPV4_IGMP_MAX_MSF"]=" 1" +D["HAVE_DECL_NET_TCP_NO_METRICS_SAVE"]=" 1" +D["HAVE_DECL_NET_TCP_DEFAULT_WIN_SCALE"]=" 1" +D["HAVE_DECL_NET_TCP_MODERATE_RCVBUF"]=" 1" +D["HAVE_DECL_NET_TCP_TSO_WIN_DIVISOR"]=" 1" +D["HAVE_DECL_NET_TCP_BIC_BETA"]=" 1" +D["HAVE_DECL_NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR"]=" 1" +D["HAVE_DECL_NET_TCP_CONG_CONTROL"]=" 1" +D["HAVE_DECL_NET_TCP_ABC"]=" 1" +D["HAVE_DECL_NET_IPV4_IPFRAG_MAX_DIST"]=" 1" +D["HAVE_DECL_NET_TCP_MTU_PROBING"]=" 1" +D["HAVE_DECL_NET_TCP_BASE_MSS"]=" 1" +D["HAVE_DECL_NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS"]=" 1" +D["HAVE_DECL_NET_TCP_DMA_COPYBREAK"]=" 1" +D["HAVE_DECL_NET_TCP_SLOW_START_AFTER_IDLE"]=" 1" +D["HAVE_DECL_NET_CIPSOV4_CACHE_ENABLE"]=" 1" +D["HAVE_DECL_NET_CIPSOV4_CACHE_BUCKET_SIZE"]=" 1" +D["HAVE_DECL_NET_CIPSOV4_RBM_OPTFMT"]=" 1" +D["HAVE_DECL_NET_CIPSOV4_RBM_STRICTVALID"]=" 1" +D["HAVE_DECL_NET_TCP_AVAIL_CONG_CONTROL"]=" 1" +D["HAVE_DECL_NET_TCP_ALLOWED_CONG_CONTROL"]=" 1" +D["HAVE_DECL_NET_TCP_MAX_SSTHRESH"]=" 1" +D["HAVE_DECL_NET_TCP_FRTO_RESPONSE"]=" 1" +D["HAVE_DECL_NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS"]=" 1" +D["HAVE_DECL_NET_IPV4_CONF_FORCE_IGMP_VERSION"]=" 1" +D["HAVE_DECL_NET_IPV4_CONF_ARP_ANNOUNCE"]=" 1" +D["HAVE_DECL_NET_IPV4_CONF_ARP_IGNORE"]=" 1" +D["HAVE_DECL_NET_IPV4_CONF_PROMOTE_SECONDARIES"]=" 1" +D["HAVE_DECL_NET_IPV4_CONF_ARP_ACCEPT"]=" 1" +D["HAVE_DECL_NET_IPV4_CONF_ARP_NOTIFY"]=" 1" +D["HAVE_DECL_NET_IPV6_MLD_MAX_MSF"]=" 1" +D["HAVE_DECL_NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS"]=" 1" +D["HAVE_DECL_VM_MAX_MAP_COUNT"]=" 1" +D["HAVE_DECL_VM_LAPTOP_MODE"]=" 1" +D["HAVE_DECL_VM_BLOCK_DUMP"]=" 1" +D["HAVE_DECL_VM_HUGETLB_GROUP"]=" 1" +D["HAVE_DECL_VM_VFS_CACHE_PRESSURE"]=" 1" +D["HAVE_DECL_VM_LEGACY_VA_LAYOUT"]=" 1" +D["HAVE_DECL_VM_SWAP_TOKEN_TIMEOUT"]=" 1" +D["HAVE_DECL_V4L2_FIELD_ANY"]=" 1" +D["HAVE_DECL_V4L2_FIELD_NONE"]=" 1" +D["HAVE_DECL_V4L2_FIELD_TOP"]=" 1" +D["HAVE_DECL_V4L2_FIELD_BOTTOM"]=" 1" +D["HAVE_DECL_V4L2_FIELD_INTERLACED"]=" 1" +D["HAVE_DECL_V4L2_FIELD_SEQ_TB"]=" 1" +D["HAVE_DECL_V4L2_FIELD_SEQ_BT"]=" 1" +D["HAVE_DECL_V4L2_FIELD_ALTERNATE"]=" 1" +D["HAVE_DECL_V4L2_FIELD_INTERLACED_TB"]=" 1" +D["HAVE_DECL_V4L2_FIELD_INTERLACED_BT"]=" 1" +D["HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE"]=" 1" +D["HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE"]=" 1" +D["HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT"]=" 1" +D["HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE"]=" 1" +D["HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OVERLAY"]=" 1" +D["HAVE_DECL_V4L2_BUF_TYPE_VBI_CAPTURE"]=" 1" +D["HAVE_DECL_V4L2_BUF_TYPE_VBI_OUTPUT"]=" 1" +D["HAVE_DECL_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE"]=" 1" +D["HAVE_DECL_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT"]=" 1" +D["HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY"]=" 1" +D["HAVE_DECL_V4L2_TUNER_RADIO"]=" 1" +D["HAVE_DECL_V4L2_TUNER_ANALOG_TV"]=" 1" +D["HAVE_DECL_V4L2_TUNER_DIGITAL_TV"]=" 1" +D["HAVE_DECL_V4L2_MEMORY_MMAP"]=" 1" +D["HAVE_DECL_V4L2_MEMORY_USERPTR"]=" 1" +D["HAVE_DECL_V4L2_MEMORY_OVERLAY"]=" 1" +D["HAVE_DECL_V4L2_MEMORY_DMABUF"]=" 1" +D["HAVE_DECL_V4L2_COLORSPACE_SMPTE170M"]=" 1" +D["HAVE_DECL_V4L2_COLORSPACE_SMPTE240M"]=" 1" +D["HAVE_DECL_V4L2_COLORSPACE_REC709"]=" 1" +D["HAVE_DECL_V4L2_COLORSPACE_BT878"]=" 1" +D["HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_M"]=" 1" +D["HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_BG"]=" 1" +D["HAVE_DECL_V4L2_COLORSPACE_JPEG"]=" 1" +D["HAVE_DECL_V4L2_COLORSPACE_SRGB"]=" 1" +D["HAVE_DECL_V4L2_PRIORITY_UNSET"]=" 1" +D["HAVE_DECL_V4L2_PRIORITY_BACKGROUND"]=" 1" +D["HAVE_DECL_V4L2_PRIORITY_INTERACTIVE"]=" 1" +D["HAVE_DECL_V4L2_PRIORITY_RECORD"]=" 1" +D["HAVE_DECL_V4L2_FRMSIZE_TYPE_DISCRETE"]=" 1" +D["HAVE_DECL_V4L2_FRMSIZE_TYPE_CONTINUOUS"]=" 1" +D["HAVE_DECL_V4L2_FRMSIZE_TYPE_STEPWISE"]=" 1" +D["HAVE_DECL_V4L2_FRMIVAL_TYPE_DISCRETE"]=" 1" +D["HAVE_DECL_V4L2_FRMIVAL_TYPE_CONTINUOUS"]=" 1" +D["HAVE_DECL_V4L2_FRMIVAL_TYPE_STEPWISE"]=" 1" +D["HAVE_DECL_V4L2_CTRL_TYPE_INTEGER"]=" 1" +D["HAVE_DECL_V4L2_CTRL_TYPE_BOOLEAN"]=" 1" +D["HAVE_DECL_V4L2_CTRL_TYPE_MENU"]=" 1" +D["HAVE_DECL_V4L2_CTRL_TYPE_BUTTON"]=" 1" +D["HAVE_DECL_V4L2_CTRL_TYPE_INTEGER64"]=" 1" +D["HAVE_DECL_V4L2_CTRL_TYPE_CTRL_CLASS"]=" 1" +D["HAVE_DECL_V4L2_CTRL_TYPE_STRING"]=" 1" +D["HAVE_DECL_V4L2_CTRL_TYPE_BITMASK"]=" 1" +D["HAVE_DECL_V4L2_CTRL_TYPE_INTEGER_MENU"]=" 1" +D["HAVE_BLKGETSIZE64"]=" 1" +D["SIZEOF_LONG"]=" 8" +D["SIZEOF_LONG_LONG"]=" 8" +D["SIZEOF_OFF_T"]=" 8" +D["SIZEOF_KERNEL_LONG_T"]=" 8" +D["SIZEOF_STRUCT_I64_I32"]=" 16" +D["ASM_SIGRTMIN"]=" 32" +D["ASM_SA_RESTORER"]=" 0x04000000" +D["HAVE___BUILTIN_POPCOUNT"]=" 1" +D["HAVE_DLADDR"]=" 1" +D["HAVE_GNU_STUBS_32_H"]=" 1" +D["HAVE_M32_MPERS"]=" 1" +D["HAVE_M32_STRUCT_STAT"]=" 1" +D["HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC"]=" 1" +D["HAVE_M32_STRUCT_STAT64"]=" 1" +D["HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC"]=" 1" +D["HAVE_GNU_STUBS_X32_H"]=" 1" +D["HAVE_MX32_MPERS"]=" 1" +D["HAVE_MX32_STRUCT_STAT"]=" 1" +D["HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC"]=" 1" + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { + line = $ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + ac_datarootdir_hack=' + s&@datadir@&${datarootdir}&g + s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g + s&@infodir@&${datarootdir}/info&g + s&@localedir@&${datarootdir}/locale&g + s&@mandir@&${datarootdir}/man&g + s&\${datarootdir}&${prefix}/share&g' ;; +esac +ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +} + +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 diff --git a/config.sub b/config.sub new file mode 100755 index 000000000..7a8ce3e62 --- /dev/null +++ b/config.sub @@ -0,0 +1,1813 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2015 Free Software Foundation, Inc. + +timestamp='2015-08-20' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2015 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | armh | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armh-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure new file mode 100755 index 000000000..36905ea14 --- /dev/null +++ b/configure @@ -0,0 +1,15062 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for strace 4.16. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +# +# Copyright (C) 1999-2017 The strace developers. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: strace-devel@lists.sourceforge.net about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='strace' +PACKAGE_TARNAME='strace' +PACKAGE_VERSION='4.16' +PACKAGE_STRING='strace 4.16' +PACKAGE_BUGREPORT='strace-devel@lists.sourceforge.net' +PACKAGE_URL='https://strace.io' + +ac_unique_file="strace.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +VALGRIND_CHECK_RULES +valgrind_enabled_tools +valgrind_tools +ENABLE_VALGRIND_sgcheck +ENABLE_VALGRIND_drd +ENABLE_VALGRIND_helgrind +ENABLE_VALGRIND_memcheck +VALGRIND_ENABLED +VALGRIND_ENABLED_FALSE +VALGRIND_ENABLED_TRUE +VALGRIND +HAVE_MX32_MPERS_FALSE +HAVE_MX32_MPERS_TRUE +HAVE_MX32_RUNTIME_FALSE +HAVE_MX32_RUNTIME_TRUE +HAVE_M32_MPERS_FALSE +HAVE_M32_MPERS_TRUE +HAVE_M32_RUNTIME_FALSE +HAVE_M32_RUNTIME_TRUE +USE_LIBUNWIND_FALSE +USE_LIBUNWIND_TRUE +libunwind_CPPFLAGS +libunwind_LDFLAGS +libunwind_LIBS +PERL +dl_LIBS +MIPS_ABI +arch_mx32 +arch_m32 +arch +CODE_COVERAGE_RULES +CODE_COVERAGE_LDFLAGS +CODE_COVERAGE_CXXFLAGS +CODE_COVERAGE_CFLAGS +CODE_COVERAGE_CPPFLAGS +GENHTML +LCOV +GCOV +CODE_COVERAGE_ENABLED +CODE_COVERAGE_ENABLED_FALSE +CODE_COVERAGE_ENABLED_TRUE +SED +EGREP +GREP +RANLIB +WARN_CFLAGS_FOR_BUILD +LDFLAGS_FOR_BUILD +CPPFLAGS_FOR_BUILD +CFLAGS_FOR_BUILD +BUILD_OBJEXT +BUILD_EXEEXT +CPP_FOR_BUILD +ac_ct_CC_FOR_BUILD +CC_FOR_BUILD +WARN_CFLAGS +CPP +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +DEB_CHANGELOGTIME +RPM_CHANGELOGTIME +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_silent_rules +enable_maintainer_mode +enable_dependency_tracking +enable_gcc_Werror +with_gcov +enable_code_coverage +enable_arm_oabi +with_libunwind +enable_valgrind +enable_valgrind_memcheck +enable_valgrind_helgrind +enable_valgrind_drd +enable_valgrind_sgcheck +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures strace 4.16 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/strace] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of strace 4.16:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-gcc-Werror turn on gcc's -Werror option + --enable-code-coverage Whether to enable code coverage support + --enable-arm-oabi enable OABI support on ARM EABI + --enable-valgrind Whether to enable Valgrind on the unit tests + --disable-valgrind-memcheck + Whether to skip memcheck during the Valgrind tests + --disable-valgrind-helgrind + Whether to skip helgrind during the Valgrind tests + --disable-valgrind-drd Whether to skip drd during the Valgrind tests + --enable-valgrind-sgcheck + Whether to use sgcheck during the Valgrind tests + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gcov=GCOV use given GCOV for coverage (GCOV=gcov). + --with-libunwind use libunwind to implement stack tracing support + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +strace home page: . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +strace configure 4.16 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. + +Copyright (C) 1999-2017 The strace developers. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------------------------- ## +## Report this to strace-devel@lists.sourceforge.net ## +## ------------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* Tell GNU C headers to include stubs. */ +#define __need_GNU_STUBS_H + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + if test "$GCC" = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#undef $2 +/* Declare this function with the same prototype as __builtin_$2. + This removes a warning about conflicting types for built-in function $2 */ +__typeof__(__builtin_$2) $2; +__typeof__(__builtin_$2) *f = $2; + +int +main () +{ +return f != $2; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + eval "$3=no" + fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by strace $as_me 4.16, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_aux_dir= +for ac_dir in . "$srcdir"/.; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +ac_config_headers="$ac_config_headers config.h" + +am__api_version='1.14' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='strace' + VERSION='4.16' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +RPM_CHANGELOGTIME="$(LC_TIME=C date '+%a %b %d %Y')" + +DEB_CHANGELOGTIME="$(LC_TIME=C date -R)" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Wall" >&5 +$as_echo_n "checking whether $CC handles -Wall... " >&6; } +if ${gl_cv_warn_CFLAGS__Wall+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wall" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Wall=yes +else + gl_cv_warn_CFLAGS__Wall=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Wall" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Wall" >&6; } +if test "x$gl_cv_warn_CFLAGS__Wall" = xyes; then : + as_fn_append WARN_CFLAGS " -Wall" +fi + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Wempty-body" >&5 +$as_echo_n "checking whether $CC handles -Wempty-body... " >&6; } +if ${gl_cv_warn_CFLAGS__Wempty_body+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wempty-body" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Wempty_body=yes +else + gl_cv_warn_CFLAGS__Wempty_body=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Wempty_body" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Wempty_body" >&6; } +if test "x$gl_cv_warn_CFLAGS__Wempty_body" = xyes; then : + as_fn_append WARN_CFLAGS " -Wempty-body" +fi + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Wformat-security" >&5 +$as_echo_n "checking whether $CC handles -Wformat-security... " >&6; } +if ${gl_cv_warn_CFLAGS__Wformat_security+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-security" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Wformat_security=yes +else + gl_cv_warn_CFLAGS__Wformat_security=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Wformat_security" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Wformat_security" >&6; } +if test "x$gl_cv_warn_CFLAGS__Wformat_security" = xyes; then : + as_fn_append WARN_CFLAGS " -Wformat-security" +fi + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Wignored-qualifiers" >&5 +$as_echo_n "checking whether $CC handles -Wignored-qualifiers... " >&6; } +if ${gl_cv_warn_CFLAGS__Wignored_qualifiers+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wignored-qualifiers" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Wignored_qualifiers=yes +else + gl_cv_warn_CFLAGS__Wignored_qualifiers=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Wignored_qualifiers" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Wignored_qualifiers" >&6; } +if test "x$gl_cv_warn_CFLAGS__Wignored_qualifiers" = xyes; then : + as_fn_append WARN_CFLAGS " -Wignored-qualifiers" +fi + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Winit-self" >&5 +$as_echo_n "checking whether $CC handles -Winit-self... " >&6; } +if ${gl_cv_warn_CFLAGS__Winit_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Winit-self" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Winit_self=yes +else + gl_cv_warn_CFLAGS__Winit_self=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Winit_self" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Winit_self" >&6; } +if test "x$gl_cv_warn_CFLAGS__Winit_self" = xyes; then : + as_fn_append WARN_CFLAGS " -Winit-self" +fi + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Wlogical-op" >&5 +$as_echo_n "checking whether $CC handles -Wlogical-op... " >&6; } +if ${gl_cv_warn_CFLAGS__Wlogical_op+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Wlogical_op=yes +else + gl_cv_warn_CFLAGS__Wlogical_op=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Wlogical_op" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Wlogical_op" >&6; } +if test "x$gl_cv_warn_CFLAGS__Wlogical_op" = xyes; then : + as_fn_append WARN_CFLAGS " -Wlogical-op" +fi + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Wmissing-parameter-type" >&5 +$as_echo_n "checking whether $CC handles -Wmissing-parameter-type... " >&6; } +if ${gl_cv_warn_CFLAGS__Wmissing_parameter_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-parameter-type" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Wmissing_parameter_type=yes +else + gl_cv_warn_CFLAGS__Wmissing_parameter_type=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Wmissing_parameter_type" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Wmissing_parameter_type" >&6; } +if test "x$gl_cv_warn_CFLAGS__Wmissing_parameter_type" = xyes; then : + as_fn_append WARN_CFLAGS " -Wmissing-parameter-type" +fi + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Wnested-externs" >&5 +$as_echo_n "checking whether $CC handles -Wnested-externs... " >&6; } +if ${gl_cv_warn_CFLAGS__Wnested_externs+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wnested-externs" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Wnested_externs=yes +else + gl_cv_warn_CFLAGS__Wnested_externs=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Wnested_externs" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Wnested_externs" >&6; } +if test "x$gl_cv_warn_CFLAGS__Wnested_externs" = xyes; then : + as_fn_append WARN_CFLAGS " -Wnested-externs" +fi + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Wold-style-declaration" >&5 +$as_echo_n "checking whether $CC handles -Wold-style-declaration... " >&6; } +if ${gl_cv_warn_CFLAGS__Wold_style_declaration+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wold-style-declaration" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Wold_style_declaration=yes +else + gl_cv_warn_CFLAGS__Wold_style_declaration=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Wold_style_declaration" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Wold_style_declaration" >&6; } +if test "x$gl_cv_warn_CFLAGS__Wold_style_declaration" = xyes; then : + as_fn_append WARN_CFLAGS " -Wold-style-declaration" +fi + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Wold-style-definition" >&5 +$as_echo_n "checking whether $CC handles -Wold-style-definition... " >&6; } +if ${gl_cv_warn_CFLAGS__Wold_style_definition+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wold-style-definition" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Wold_style_definition=yes +else + gl_cv_warn_CFLAGS__Wold_style_definition=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Wold_style_definition" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Wold_style_definition" >&6; } +if test "x$gl_cv_warn_CFLAGS__Wold_style_definition" = xyes; then : + as_fn_append WARN_CFLAGS " -Wold-style-definition" +fi + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Wsign-compare" >&5 +$as_echo_n "checking whether $CC handles -Wsign-compare... " >&6; } +if ${gl_cv_warn_CFLAGS__Wsign_compare+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Wsign_compare=yes +else + gl_cv_warn_CFLAGS__Wsign_compare=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Wsign_compare" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Wsign_compare" >&6; } +if test "x$gl_cv_warn_CFLAGS__Wsign_compare" = xyes; then : + as_fn_append WARN_CFLAGS " -Wsign-compare" +fi + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Wtype-limits" >&5 +$as_echo_n "checking whether $CC handles -Wtype-limits... " >&6; } +if ${gl_cv_warn_CFLAGS__Wtype_limits+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtype-limits" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Wtype_limits=yes +else + gl_cv_warn_CFLAGS__Wtype_limits=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Wtype_limits" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Wtype_limits" >&6; } +if test "x$gl_cv_warn_CFLAGS__Wtype_limits" = xyes; then : + as_fn_append WARN_CFLAGS " -Wtype-limits" +fi + + +if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Wwrite-strings" >&5 +$as_echo_n "checking whether $CC handles -Wwrite-strings... " >&6; } +if ${gl_cv_warn_CFLAGS__Wwrite_strings+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wwrite-strings" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Wwrite_strings=yes +else + gl_cv_warn_CFLAGS__Wwrite_strings=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Wwrite_strings" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Wwrite_strings" >&6; } +if test "x$gl_cv_warn_CFLAGS__Wwrite_strings" = xyes; then : + as_fn_append WARN_CFLAGS " -Wwrite-strings" +fi + + +# Check whether --enable-gcc-Werror was given. +if test "${enable_gcc_Werror+set}" = set; then : + enableval=$enable_gcc_Werror; case $enableval in + yes) if test x${gl_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC handles -Werror" >&5 +$as_echo_n "checking whether $CC handles -Werror... " >&6; } +if ${gl_cv_warn_CFLAGS__Werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS__Werror=yes +else + gl_cv_warn_CFLAGS__Werror=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS__Werror" >&5 +$as_echo "$gl_cv_warn_CFLAGS__Werror" >&6; } +if test "x$gl_cv_warn_CFLAGS__Werror" = xyes; then : + as_fn_append WARN_CFLAGS " -Werror" +fi + + ;; + no) ;; + *) as_fn_error $? "bad value $enableval for gcc-Werror option" "$LINENO" 5 ;; + esac + +fi + + + + + + +if test -n "${ac_c_decl_warn_flag+set}"; then : + st_saved_ac_c_decl_warn_flag="${ac_c_decl_warn_flag}"; unset ac_c_decl_warn_flag +fi + +if test -n "${ac_c_preproc_warn_flag+set}"; then : + st_saved_ac_c_preproc_warn_flag="${ac_c_preproc_warn_flag}"; unset ac_c_preproc_warn_flag +fi + +if test -n "${ac_c_werror_flag+set}"; then : + st_saved_ac_c_werror_flag="${ac_c_werror_flag}"; unset ac_c_werror_flag +fi + +if test -n "${ac_compile+set}"; then : + st_saved_ac_compile="${ac_compile}"; unset ac_compile +fi + +if test -n "${ac_compiler_gnu+set}"; then : + st_saved_ac_compiler_gnu="${ac_compiler_gnu}"; unset ac_compiler_gnu +fi + +if test -n "${ac_cpp+set}"; then : + st_saved_ac_cpp="${ac_cpp}"; unset ac_cpp +fi + +if test -n "${ac_cv_c_compiler_gnu+set}"; then : + st_saved_ac_cv_c_compiler_gnu="${ac_cv_c_compiler_gnu}"; unset ac_cv_c_compiler_gnu +fi + +if test -n "${ac_cv_c_decl_report+set}"; then : + st_saved_ac_cv_c_decl_report="${ac_cv_c_decl_report}"; unset ac_cv_c_decl_report +fi + +if test -n "${ac_link+set}"; then : + st_saved_ac_link="${ac_link}"; unset ac_link +fi + +if test -n "${ac_tool_prefix+set}"; then : + st_saved_ac_tool_prefix="${ac_tool_prefix}"; unset ac_tool_prefix +fi + +if test -n "${cross_compiling+set}"; then : + st_saved_cross_compiling="${cross_compiling}"; unset cross_compiling +fi + +cross_compiling=no + +{ $as_echo "$as_me:${as_lineno-$LINENO}: looking for a C compiler that generates native executables" >&5 +$as_echo "$as_me: looking for a C compiler that generates native executables" >&6;} +ac_ext=c +ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' +ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' +ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC_FOR_BUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC_FOR_BUILD"; then + ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC_FOR_BUILD="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD +if test -n "$CC_FOR_BUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 +$as_echo "$CC_FOR_BUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC_FOR_BUILD"; then + ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC_FOR_BUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC_FOR_BUILD"; then + ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC_FOR_BUILD="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD +if test -n "$ac_ct_CC_FOR_BUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5 +$as_echo "$ac_ct_CC_FOR_BUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC_FOR_BUILD" = x; then + CC_FOR_BUILD="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD + fi +else + CC_FOR_BUILD="$ac_cv_prog_CC_FOR_BUILD" +fi + +if test -z "$CC_FOR_BUILD"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC_FOR_BUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC_FOR_BUILD"; then + ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC_FOR_BUILD="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD +if test -n "$CC_FOR_BUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 +$as_echo "$CC_FOR_BUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC_FOR_BUILD"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC_FOR_BUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC_FOR_BUILD"; then + ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC_FOR_BUILD="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC_FOR_BUILD + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC_FOR_BUILD to just the basename; use the full file name. + shift + ac_cv_prog_CC_FOR_BUILD="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD +if test -n "$CC_FOR_BUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 +$as_echo "$CC_FOR_BUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC_FOR_BUILD"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC_FOR_BUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC_FOR_BUILD"; then + ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC_FOR_BUILD="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD +if test -n "$CC_FOR_BUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 +$as_echo "$CC_FOR_BUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC_FOR_BUILD" && break + done +fi +if test -z "$CC_FOR_BUILD"; then + ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC_FOR_BUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC_FOR_BUILD"; then + ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD +if test -n "$ac_ct_CC_FOR_BUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5 +$as_echo "$ac_ct_CC_FOR_BUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC_FOR_BUILD" && break +done + + if test "x$ac_ct_CC_FOR_BUILD" = x; then + CC_FOR_BUILD="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD + fi +fi + +fi + + +test -z "$CC_FOR_BUILD" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS_FOR_BUILD+set} +ac_save_CFLAGS=$CFLAGS_FOR_BUILD +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD accepts -g" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD accepts -g... " >&6; } +if ${ac_cv_build_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_build_prog_cc_g=no + CFLAGS_FOR_BUILD="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_build_prog_cc_g=yes +else + CFLAGS_FOR_BUILD="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS_FOR_BUILD="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_build_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_g" >&5 +$as_echo "$ac_cv_build_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS_FOR_BUILD=$ac_save_CFLAGS +elif test $ac_cv_build_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS_FOR_BUILD="-g -O2" + else + CFLAGS_FOR_BUILD="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS_FOR_BUILD="-O2" + else + CFLAGS_FOR_BUILD= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC_FOR_BUILD option to accept ISO C89" >&5 +$as_echo_n "checking for $CC_FOR_BUILD option to accept ISO C89... " >&6; } +if ${ac_cv_build_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_build_prog_cc_c89=no +ac_save_CC=$CC_FOR_BUILD +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC_FOR_BUILD="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_build_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_build_objext + test "x$ac_cv_build_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC_FOR_BUILD=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_build_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c89" >&5 +$as_echo "$ac_cv_build_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_build_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' +ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' +ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' +ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' +ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD understands -c and -o together" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD understands -c and -o together... " >&6; } +if ${am_cv_build_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_build_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC_FOR_BUILD -c conftest.$ac_ext -o conftest2.$ac_build_objext" >&5 + ($CC_FOR_BUILD -c conftest.$ac_ext -o conftest2.$ac_build_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_build_objext; then + : OK + else + am_cv_build_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_build_prog_cc_c_o" >&5 +$as_echo "$am_cv_build_prog_cc_c_o" >&6; } +if test "$am_cv_build_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC_FOR_BUILD="$am_aux_dir/compile $CC_FOR_BUILD" +fi +ac_ext=c +ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' +ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' +ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +depcc="$CC_FOR_BUILD" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_build_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_build_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_build_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_build_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_build_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_build_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_build_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_build_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' +ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' +ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP_FOR_BUILD" && test -d "$CPP_FOR_BUILD"; then + CPP_FOR_BUILD= +fi +if test -z "$CPP_FOR_BUILD"; then + if ${ac_cv_build_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP_FOR_BUILD in "$CC_FOR_BUILD -E" "$CC_FOR_BUILD -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_build_prog_CPP=$CPP_FOR_BUILD + +fi + CPP_FOR_BUILD=$ac_cv_build_prog_CPP +else + ac_cv_build_prog_CPP=$CPP_FOR_BUILD +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP_FOR_BUILD" >&5 +$as_echo "$CPP_FOR_BUILD" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP_FOR_BUILD\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' +ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' +ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Wall" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Wall... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Wall+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Wall" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Wall=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Wall=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Wall" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Wall" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Wall" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Wall" +fi + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Wempty-body" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Wempty-body... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Wempty_body+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Wempty-body" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Wempty_body=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Wempty_body=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Wempty_body" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Wempty_body" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Wempty_body" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Wempty-body" +fi + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Wformat-security" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Wformat-security... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Wformat_security+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Wformat-security" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Wformat_security=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Wformat_security=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Wformat_security" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Wformat_security" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Wformat_security" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Wformat-security" +fi + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Wignored-qualifiers" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Wignored-qualifiers... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Wignored_qualifiers+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Wignored-qualifiers" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Wignored_qualifiers=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Wignored_qualifiers=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Wignored_qualifiers" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Wignored_qualifiers" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Wignored_qualifiers" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Wignored-qualifiers" +fi + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Winit-self" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Winit-self... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Winit_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Winit-self" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Winit_self=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Winit_self=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Winit_self" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Winit_self" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Winit_self" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Winit-self" +fi + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Wlogical-op" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Wlogical-op... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Wlogical_op+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Wlogical-op" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Wlogical_op=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Wlogical_op=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Wlogical_op" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Wlogical_op" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Wlogical_op" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Wlogical-op" +fi + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Wmissing-parameter-type" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Wmissing-parameter-type... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Wmissing_parameter_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Wmissing-parameter-type" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Wmissing_parameter_type=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Wmissing_parameter_type=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Wmissing_parameter_type" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Wmissing_parameter_type" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Wmissing_parameter_type" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Wmissing-parameter-type" +fi + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Wnested-externs" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Wnested-externs... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Wnested_externs+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Wnested-externs" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Wnested_externs=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Wnested_externs=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Wnested_externs" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Wnested_externs" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Wnested_externs" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Wnested-externs" +fi + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Wold-style-declaration" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Wold-style-declaration... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Wold_style_declaration+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Wold-style-declaration" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Wold_style_declaration=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Wold_style_declaration=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Wold_style_declaration" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Wold_style_declaration" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Wold_style_declaration" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Wold-style-declaration" +fi + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Wold-style-definition" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Wold-style-definition... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Wold_style_definition+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Wold-style-definition" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Wold_style_definition=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Wold_style_definition=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Wold_style_definition" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Wold_style_definition" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Wold_style_definition" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Wold-style-definition" +fi + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Wsign-compare" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Wsign-compare... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Wsign_compare+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Wsign-compare" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Wsign_compare=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Wsign_compare=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Wsign_compare" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Wsign_compare" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Wsign_compare" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Wsign-compare" +fi + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Wtype-limits" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Wtype-limits... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Wtype_limits+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Wtype-limits" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Wtype_limits=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Wtype_limits=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Wtype_limits" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Wtype_limits" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Wtype_limits" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Wtype-limits" +fi + + +if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Wwrite-strings" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Wwrite-strings... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Wwrite_strings+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Wwrite-strings" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Wwrite_strings=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Wwrite_strings=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Wwrite_strings" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Wwrite_strings" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Wwrite_strings" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Wwrite-strings" +fi + + +# Check whether --enable-gcc-Werror was given. +if test "${enable_gcc_Werror+set}" = set; then : + enableval=$enable_gcc_Werror; case $enableval in + yes) if test x${gl_build_unknown_warnings_are_errors+set} = x; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror -Wunknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror__Wunknown_warning_option" = xyes; then : + gl_build_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_build_unknown_warnings_are_errors= +fi + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD handles -Werror" >&5 +$as_echo_n "checking whether $CC_FOR_BUILD handles -Werror... " >&6; } +if ${gl_cv_warn_CFLAGS_FOR_BUILD__Werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS_FOR_BUILD" + as_fn_append CFLAGS_FOR_BUILD " $gl_build_unknown_warnings_are_errors -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_CFLAGS_FOR_BUILD__Werror=yes +else + gl_cv_warn_CFLAGS_FOR_BUILD__Werror=no +fi +rm -f core conftest.err conftest.$ac_build_objext \ + conftest$ac_build_exeext conftest.$ac_ext + CFLAGS_FOR_BUILD="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_CFLAGS_FOR_BUILD__Werror" >&5 +$as_echo "$gl_cv_warn_CFLAGS_FOR_BUILD__Werror" >&6; } +if test "x$gl_cv_warn_CFLAGS_FOR_BUILD__Werror" = xyes; then : + as_fn_append WARN_CFLAGS_FOR_BUILD " -Werror" +fi + + ;; + no) ;; + *) as_fn_error $? "bad value $enableval for gcc-Werror option" "$LINENO" 5 ;; + esac + +fi + + + + +if test -n "${st_saved_cross_compiling+set}"; then : + cross_compiling="${st_saved_cross_compiling}"; unset st_saved_cross_compiling +fi + +if test -n "${st_saved_ac_tool_prefix+set}"; then : + ac_tool_prefix="${st_saved_ac_tool_prefix}"; unset st_saved_ac_tool_prefix +fi + +if test -n "${st_saved_ac_link+set}"; then : + ac_link="${st_saved_ac_link}"; unset st_saved_ac_link +fi + +if test -n "${st_saved_ac_cv_c_decl_report+set}"; then : + ac_cv_c_decl_report="${st_saved_ac_cv_c_decl_report}"; unset st_saved_ac_cv_c_decl_report +fi + +if test -n "${st_saved_ac_cv_c_compiler_gnu+set}"; then : + ac_cv_c_compiler_gnu="${st_saved_ac_cv_c_compiler_gnu}"; unset st_saved_ac_cv_c_compiler_gnu +fi + +if test -n "${st_saved_ac_cpp+set}"; then : + ac_cpp="${st_saved_ac_cpp}"; unset st_saved_ac_cpp +fi + +if test -n "${st_saved_ac_compiler_gnu+set}"; then : + ac_compiler_gnu="${st_saved_ac_compiler_gnu}"; unset st_saved_ac_compiler_gnu +fi + +if test -n "${st_saved_ac_compile+set}"; then : + ac_compile="${st_saved_ac_compile}"; unset st_saved_ac_compile +fi + +if test -n "${st_saved_ac_c_werror_flag+set}"; then : + ac_c_werror_flag="${st_saved_ac_c_werror_flag}"; unset st_saved_ac_c_werror_flag +fi + +if test -n "${st_saved_ac_c_preproc_warn_flag+set}"; then : + ac_c_preproc_warn_flag="${st_saved_ac_c_preproc_warn_flag}"; unset st_saved_ac_c_preproc_warn_flag +fi + +if test -n "${st_saved_ac_c_decl_warn_flag+set}"; then : + ac_c_decl_warn_flag="${st_saved_ac_c_decl_warn_flag}"; unset st_saved_ac_c_decl_warn_flag +fi + + + +BUILD_EXEEXT=$ac_build_exeext +BUILD_OBJEXT=$ac_build_objext + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = xyes; then : + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + +$as_echo "#define _MINIX 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if ${ac_cv_safe_to_define___extensions__+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes +else + ac_cv_safe_to_define___extensions__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + + + # allow to override gcov location + +# Check whether --with-gcov was given. +if test "${with_gcov+set}" = set; then : + withval=$with_gcov; _AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov +else + _AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5 +$as_echo_n "checking whether to build with code coverage support... " >&6; } + # Check whether --enable-code-coverage was given. +if test "${enable_code_coverage+set}" = set; then : + enableval=$enable_code_coverage; +else + enable_code_coverage=no +fi + + + if test x$enable_code_coverage = xyes; then + CODE_COVERAGE_ENABLED_TRUE= + CODE_COVERAGE_ENABLED_FALSE='#' +else + CODE_COVERAGE_ENABLED_TRUE='#' + CODE_COVERAGE_ENABLED_FALSE= +fi + + CODE_COVERAGE_ENABLED=$enable_code_coverage + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_code_coverage" >&5 +$as_echo "$enable_code_coverage" >&6; } + + if test "$enable_code_coverage" = "yes" ; then : + + # check for gcov + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. +set dummy ${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GCOV"; then + ac_cv_prog_GCOV="$GCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GCOV="${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GCOV=$ac_cv_prog_GCOV +if test -n "$GCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 +$as_echo "$GCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_GCOV"; then + ac_ct_GCOV=$GCOV + # Extract the first word of "$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. +set dummy $_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_GCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_GCOV"; then + ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_GCOV="$_AX_CODE_COVERAGE_GCOV_PROG_WITH" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV +if test -n "$ac_ct_GCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5 +$as_echo "$ac_ct_GCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_GCOV" = x; then + GCOV=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + GCOV=$ac_ct_GCOV + fi +else + GCOV="$ac_cv_prog_GCOV" +fi + + if test "X$GCOV" = "X:"; then : + as_fn_error $? "gcov is needed to do coverage" "$LINENO" 5 +fi + + + if test "$GCC" = "no" ; then : + + as_fn_error $? "not compiling with gcc, which is required for gcov code coverage" "$LINENO" 5 + +fi + + # List of supported lcov versions. + lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" + + # Extract the first word of "lcov", so it can be a program name with args. +set dummy lcov; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LCOV"; then + ac_cv_prog_LCOV="$LCOV" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LCOV="lcov" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LCOV=$ac_cv_prog_LCOV +if test -n "$LCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 +$as_echo "$LCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + # Extract the first word of "genhtml", so it can be a program name with args. +set dummy genhtml; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GENHTML+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GENHTML"; then + ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GENHTML="genhtml" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GENHTML=$ac_cv_prog_GENHTML +if test -n "$GENHTML"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5 +$as_echo "$GENHTML" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test "$LCOV" ; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&5 +$as_echo_n "checking for lcov version... " >&6; } +if ${ax_cv_lcov_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_lcov_version=invalid + lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` + for lcov_check_version in $lcov_version_list; do + if test "$lcov_version" = "$lcov_check_version"; then + ax_cv_lcov_version="$lcov_check_version (ok)" + fi + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lcov_version" >&5 +$as_echo "$ax_cv_lcov_version" >&6; } + +else + + lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" + as_fn_error $? "$lcov_msg" "$LINENO" 5 + +fi + + case $ax_cv_lcov_version in + ""|invalid) + lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." + as_fn_error $? "$lcov_msg" "$LINENO" 5 + LCOV="exit 0;" + ;; + esac + + if test -z "$GENHTML" ; then : + + as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5 + +fi + + CODE_COVERAGE_CPPFLAGS="-DNDEBUG" + CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" + CODE_COVERAGE_LDFLAGS="-lgcov" + + + + + + +fi + +CODE_COVERAGE_RULES=' +# Code coverage +# +# Optional: +# - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. +# Multiple directories may be specified, separated by whitespace. +# (Default: $(top_builddir)) +# - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated +# by lcov for code coverage. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) +# - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage +# reports to be created. (Default: +# $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) +# - CODE_COVERAGE_BRANCH_COVERAGE: Set to 1 to enforce branch coverage, +# set to 0 to disable it and leave empty to stay with the default. +# (Default: empty) +# - CODE_COVERAGE_LCOV_SHOPTS_DEFAULT: Extra options shared between both lcov +# instances. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_LCOV_SHOPTS: Extra options to shared between both lcov +# instances. (Default: $CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +# - CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH: --gcov-tool pathtogcov +# - CODE_COVERAGE_LCOV_OPTIONS_DEFAULT: Extra options to pass to the +# collecting lcov instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +# - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the collecting lcov +# instance. (Default: $CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +# - CODE_COVERAGE_LCOV_RMOPTS_DEFAULT: Extra options to pass to the filtering +# lcov instance. (Default: empty) +# - CODE_COVERAGE_LCOV_RMOPTS: Extra options to pass to the filtering lcov +# instance. (Default: $CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +# - CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT: Extra options to pass to the +# genhtml instance. (Default: based on $CODE_COVERAGE_BRANCH_COVERAGE) +# - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml +# instance. (Default: $CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +# - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore +# +# The generated report will be titled using the $(PACKAGE_NAME) and +# $(PACKAGE_VERSION). In order to add the current git hash to the title, +# use the git-version-gen script, available online. + +# Optional variables +CODE_COVERAGE_DIRECTORY ?= $(top_builddir) +CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info +CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage +CODE_COVERAGE_BRANCH_COVERAGE ?= +CODE_COVERAGE_LCOV_SHOPTS_DEFAULT ?= $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc lcov_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_LCOV_SHOPTS ?= $(CODE_COVERAGE_LCOV_SHOPTS_DEFAULT) +CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH ?= --gcov-tool "$(GCOV)" +CODE_COVERAGE_LCOV_OPTIONS_DEFAULT ?= $(CODE_COVERAGE_LCOV_OPTIONS_GCOVPATH) +CODE_COVERAGE_LCOV_OPTIONS ?= $(CODE_COVERAGE_LCOV_OPTIONS_DEFAULT) +CODE_COVERAGE_LCOV_RMOPTS_DEFAULT ?= +CODE_COVERAGE_LCOV_RMOPTS ?= $(CODE_COVERAGE_LCOV_RMOPTS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ +$(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ +--rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) +CODE_COVERAGE_IGNORE_PATTERN ?= + +code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) +code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ + $(CODE_COVERAGE_OUTPUT_FILE); +code_coverage_v_lcov_ign = $(code_coverage_v_lcov_ign_$(V)) +code_coverage_v_lcov_ign_ = $(code_coverage_v_lcov_ign_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_lcov_ign_0 = @echo " LCOV --remove /tmp/*"\ + $(CODE_COVERAGE_IGNORE_PATTERN); +code_coverage_v_genhtml = $(code_coverage_v_genhtml_$(V)) +code_coverage_v_genhtml_ = $(code_coverage_v_genhtml_$(AM_DEFAULT_VERBOSITY)) +code_coverage_v_genhtml_0 = @echo " GEN " $(CODE_COVERAGE_OUTPUT_DIRECTORY); +code_coverage_quiet = $(code_coverage_quiet_$(V)) +code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) +code_coverage_quiet_0 = --quiet + +# sanitizes the test-name: replaces with underscores: dashes and dots +code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) + +# Use recursive makes in order to ignore errors during check +check-code-coverage: +ifeq ($(CODE_COVERAGE_ENABLED),yes) + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture +else + @echo "Need to reconfigure with --enable-code-coverage" +endif + +# Capture code coverage data +code-coverage-capture: code-coverage-capture-hook +ifeq ($(CODE_COVERAGE_ENABLED),yes) + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" +else + @echo "Need to reconfigure with --enable-code-coverage" +endif + +# Hook rule executed before code-coverage-capture, overridable by the user +code-coverage-capture-hook: + +ifeq ($(CODE_COVERAGE_ENABLED),yes) +clean: code-coverage-clean +distclean: code-coverage-clean +code-coverage-clean: + -$(LCOV) --directory $(top_builddir) -z + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete +endif + +GITIGNOREFILES ?= +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) + +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage + +.PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean +' + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported architecture" >&5 +$as_echo_n "checking for supported architecture... " >&6; } +arch_m32= +arch_mx32= +case "$host_cpu" in +bfin) + arch=bfin + +$as_echo "#define BFIN 1" >>confdefs.h + + ;; +i[3456]86|pentium) + arch=i386 + +$as_echo "#define I386 1" >>confdefs.h + + ;; +ia64) + arch=ia64 + +$as_echo "#define IA64 1" >>confdefs.h + + ;; +m68k) + arch=m68k + +$as_echo "#define M68K 1" >>confdefs.h + + ;; +sparc64*) + arch=sparc64 + arch_m32=sparc + +$as_echo "#define SPARC64 1" >>confdefs.h + + ;; +sparc*) + arch=sparc + +$as_echo "#define SPARC 1" >>confdefs.h + + ;; +metag*) + arch=metag + +$as_echo "#define METAG 1" >>confdefs.h + + ;; +mips*) + arch=mips + +$as_echo "#define MIPS 1" >>confdefs.h + + ;; +alpha*) + arch=alpha + +$as_echo "#define ALPHA 1" >>confdefs.h + + ;; +powerpc*) + +$as_echo "#define POWERPC 1" >>confdefs.h + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __LP64__ +# error 32 bit +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + arch=powerpc64 +else + arch=powerpc +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$arch" = "powerpc64"; then + arch_m32=powerpc + +$as_echo "#define POWERPC64 1" >>confdefs.h + + fi + ;; +arm*) + arch=arm + +$as_echo "#define ARM 1" >>confdefs.h + + ;; +aarch64*) + arch=aarch64 + arch_m32=arm + +$as_echo "#define AARCH64 1" >>confdefs.h + + ;; +avr32*) + arch=avr32 + +$as_echo "#define AVR32 1" >>confdefs.h + + ;; +arc*) + arch=arc + +$as_echo "#define ARC 1" >>confdefs.h + + ;; +s390) + arch=s390 + +$as_echo "#define S390 1" >>confdefs.h + + ;; +s390x) + arch=s390x + +$as_echo "#define S390X 1" >>confdefs.h + + ;; +hppa*|parisc*) + arch=hppa + +$as_echo "#define HPPA 1" >>confdefs.h + + ;; +sh64*) + arch=sh64 + +$as_echo "#define SH64 1" >>confdefs.h + + ;; +sh*) + arch=sh + +$as_echo "#define SH 1" >>confdefs.h + + ;; +x86?64*) + arch_m32=i386 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __ILP32__ +# error not x32 +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + arch=x32 +else + arch=x86_64 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$arch" = "x86_64"; then + arch_mx32=x32 + +$as_echo "#define X86_64 1" >>confdefs.h + + else + +$as_echo "#define X32 1" >>confdefs.h + + fi + ;; +cris|crisv10) + arch=crisv10 + +$as_echo "#define CRISV10 1" >>confdefs.h + + ;; +crisv32) + arch=crisv32 + +$as_echo "#define CRISV32 1" >>confdefs.h + + ;; +tile*) + arch=tile + +$as_echo "#define TILE 1" >>confdefs.h + + ;; +microblaze*) + arch=microblaze + +$as_echo "#define MICROBLAZE 1" >>confdefs.h + + ;; +nios2*) + arch=nios2 + +$as_echo "#define NIOS2 1" >>confdefs.h + + ;; + +or1k*) + arch=or1k + +$as_echo "#define OR1K 1" >>confdefs.h + + ;; + +xtensa*) + arch=xtensa + +$as_echo "#define XTENSA 1" >>confdefs.h + + ;; + +riscv*) + arch=riscv + +$as_echo "#define RISCV 1" >>confdefs.h + + ;; + +*) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: NO!" >&5 +$as_echo "NO!" >&6; } + as_fn_error $? "architecture $host_cpu is not supported by strace" "$LINENO" 5 + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $arch" >&5 +$as_echo "$arch" >&6; } + +test -n "$arch_m32" || + arch_m32=$arch +test -n "$arch_mx32" || + arch_mx32=$arch + + + + +MIPS_ABI= +if test "$arch" = mips; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _MIPS_SIM" >&5 +$as_echo_n "checking for _MIPS_SIM... " >&6; } +if ${st_cv__MIPS_SIM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "_MIPS_SIM" "st_cv__MIPS_SIM" ""; then : + +else + as_fn_error $? "_MIPS_SIM cannot be determined" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv__MIPS_SIM" >&5 +$as_echo "$st_cv__MIPS_SIM" >&6; } + + # requires GCC >= 3.4 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MIPS ABI" >&5 +$as_echo_n "checking for MIPS ABI... " >&6; } +if ${st_cv_mips_abi+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +int i[_MIPS_SIM == _ABIO32 ? 1 : - 1]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + st_cv_mips_abi=o32 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +int i[_MIPS_SIM == _ABIN32 ? 1 : - 1]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + st_cv_mips_abi=n32 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +int i[_MIPS_SIM == _ABI64 ? 1 : - 1]; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + st_cv_mips_abi=n64 +else + st_cv_mips_abi=unknown +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_mips_abi" >&5 +$as_echo "$st_cv_mips_abi" >&6; } + + case "$st_cv_mips_abi" in + o32) +$as_echo "#define LINUX_MIPSO32 1" >>confdefs.h +;; + n32) +$as_echo "#define LINUX_MIPSN32 1" >>confdefs.h +;; + n64) +$as_echo "#define LINUX_MIPSN64 1" >>confdefs.h +;; + *) as_fn_error $? "Unsupported _MIPS_SIM" "$LINENO" 5;; + esac + MIPS_ABI="$st_cv_mips_abi" +fi + + +# Check whether --enable-arm-oabi was given. +if test "${enable_arm_oabi+set}" = set; then : + enableval=$enable_arm_oabi; +else + enable_arm_oabi=no +fi + +case "$enable_arm_oabi" in + yes) enable_arm_oabi=1 ;; + no) enable_arm_oabi=0 ;; + *) as_fn_error $? "bad value $enable_arm_oabi for arm-oabi option" "$LINENO" 5 ;; +esac + +cat >>confdefs.h <<_ACEOF +#define ENABLE_ARM_OABI $enable_arm_oabi +_ACEOF + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof syntax and keyword spelling" >&5 +$as_echo_n "checking for typeof syntax and keyword spelling... " >&6; } +if ${ac_cv_c_typeof+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_typeof=no + for ac_kw in typeof __typeof__ no; do + test $ac_kw = no && break + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + int value; + typedef struct { + char a [1 + + ! (($ac_kw (value)) + (($ac_kw (value)) 0 < ($ac_kw (value)) -1 + ? ($ac_kw (value)) - 1 + : ~ (~ ($ac_kw (value)) 0 + << sizeof ($ac_kw (value)))))]; } + ac__typeof_type_; + return + (! ((void) ((ac__typeof_type_ *) 0), 0)); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_typeof=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test $ac_cv_c_typeof != no && break + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_typeof" >&5 +$as_echo "$ac_cv_c_typeof" >&6; } + if test $ac_cv_c_typeof != no; then + +$as_echo "#define HAVE_TYPEOF 1" >>confdefs.h + + if test $ac_cv_c_typeof != typeof; then + +cat >>confdefs.h <<_ACEOF +#define typeof $ac_cv_c_typeof +_ACEOF + + fi + fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if ${ac_cv_type_uid_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +$as_echo "#define uid_t int" >>confdefs.h + + +$as_echo "#define gid_t int" >>confdefs.h + +fi + + +for ac_func in accept4 fallocate fanotify_mark fopen64 fork fputs_unlocked fstatat ftruncate futimens if_indextoname open64 prctl preadv process_vm_readv pwritev readahead signalfd stpcpy strerror strsignal sync_file_range utimensat +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include +" +if test "x$ac_cv_type_sig_atomic_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIG_ATOMIC_T 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "struct sigcontext" "ac_cv_type_struct_sigcontext" "#include +" +if test "x$ac_cv_type_struct_sigcontext" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SIGCONTEXT 1 +_ACEOF + + +fi + + +ac_fn_c_check_type "$LINENO" "struct mmsghdr" "ac_cv_type_struct_mmsghdr" "#include +" +if test "x$ac_cv_type_struct_mmsghdr" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_MMSGHDR 1 +_ACEOF + + +fi + + +ac_fn_c_check_type "$LINENO" "__kernel_long_t" "ac_cv_type___kernel_long_t" "#include +" +if test "x$ac_cv_type___kernel_long_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE___KERNEL_LONG_T 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "__kernel_ulong_t" "ac_cv_type___kernel_ulong_t" "#include +" +if test "x$ac_cv_type___kernel_ulong_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE___KERNEL_ULONG_T 1 +_ACEOF + + +fi + + +ac_fn_c_check_type "$LINENO" "struct stat64" "ac_cv_type_struct_stat64" "#include +#include +" +if test "x$ac_cv_type_struct_stat64" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT64 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "struct __old_kernel_stat" "ac_cv_type_struct___old_kernel_stat" "#include +#include +" +if test "x$ac_cv_type_struct___old_kernel_stat" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT___OLD_KERNEL_STAT 1 +_ACEOF + + +fi + + +ac_fn_c_check_type "$LINENO" "struct user_desc" "ac_cv_type_struct_user_desc" "#include +" +if test "x$ac_cv_type_struct_user_desc" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_USER_DESC 1 +_ACEOF + + +fi + + +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime_nsec" "ac_cv_member_struct_stat_st_mtime_nsec" "#include +#include +" +if test "x$ac_cv_member_struct_stat_st_mtime_nsec" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct stat64" "st_mtime_nsec" "ac_cv_member_struct_stat64_st_mtime_nsec" "#include +#include +" +if test "x$ac_cv_member_struct_stat64_st_mtime_nsec" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT64_ST_MTIME_NSEC 1 +_ACEOF + + +fi + + +ac_fn_c_check_type "$LINENO" "struct pt_all_user_regs" "ac_cv_type_struct_pt_all_user_regs" "#include +" +if test "x$ac_cv_type_struct_pt_all_user_regs" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PT_ALL_USER_REGS 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "struct ia64_fpreg" "ac_cv_type_struct_ia64_fpreg" "#include +" +if test "x$ac_cv_type_struct_ia64_fpreg" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IA64_FPREG 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "struct ptrace_peeksiginfo_args" "ac_cv_type_struct_ptrace_peeksiginfo_args" "#include +" +if test "x$ac_cv_type_struct_ptrace_peeksiginfo_args" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS 1 +_ACEOF + + +fi + + +ac_fn_c_check_type "$LINENO" "struct flock" "ac_cv_type_struct_flock" "#include +#include +" +if test "x$ac_cv_type_struct_flock" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_FLOCK 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "struct flock64" "ac_cv_type_struct_flock64" "#include +#include +" +if test "x$ac_cv_type_struct_flock64" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_FLOCK64 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "struct __kernel_flock" "ac_cv_type_struct___kernel_flock" "#include +#include +" +if test "x$ac_cv_type_struct___kernel_flock" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT___KERNEL_FLOCK 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "struct __kernel_flock64" "ac_cv_type_struct___kernel_flock64" "#include +#include +" +if test "x$ac_cv_type_struct___kernel_flock64" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT___KERNEL_FLOCK64 1 +_ACEOF + + +fi + + +ac_fn_c_check_member "$LINENO" "struct timex" "tai" "ac_cv_member_struct_timex_tai" "#include +" +if test "x$ac_cv_member_struct_timex_tai" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TIMEX_TAI 1 +_ACEOF + + +fi + + +ac_fn_c_check_member "$LINENO" "struct utsname" "domainname" "ac_cv_member_struct_utsname_domainname" "#include +" +if test "x$ac_cv_member_struct_utsname_domainname" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_UTSNAME_DOMAINNAME 1 +_ACEOF + + +fi + + +ac_fn_c_check_member "$LINENO" "siginfo_t" "si_syscall" "ac_cv_member_siginfo_t_si_syscall" "#include +" +if test "x$ac_cv_member_siginfo_t_si_syscall" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGINFO_T_SI_SYSCALL 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "siginfo_t" "si_timerid" "ac_cv_member_siginfo_t_si_timerid" "#include +" +if test "x$ac_cv_member_siginfo_t_si_timerid" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGINFO_T_SI_TIMERID 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "siginfo_t" "si_overrun" "ac_cv_member_siginfo_t_si_overrun" "#include +" +if test "x$ac_cv_member_siginfo_t_si_overrun" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGINFO_T_SI_OVERRUN 1 +_ACEOF + + +fi + + +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "precise_ip" "ac_cv_member_struct_perf_event_attr_precise_ip" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_precise_ip" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "mmap_data" "ac_cv_member_struct_perf_event_attr_mmap_data" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_mmap_data" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_MMAP_DATA 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "sample_id_all" "ac_cv_member_struct_perf_event_attr_sample_id_all" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_sample_id_all" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_ID_ALL 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "exclude_host" "ac_cv_member_struct_perf_event_attr_exclude_host" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_exclude_host" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_HOST 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "exclude_guest" "ac_cv_member_struct_perf_event_attr_exclude_guest" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_exclude_guest" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_GUEST 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "exclude_callchain_kernel" "ac_cv_member_struct_perf_event_attr_exclude_callchain_kernel" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_exclude_callchain_kernel" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_KERNEL 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "exclude_callchain_user" "ac_cv_member_struct_perf_event_attr_exclude_callchain_user" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_exclude_callchain_user" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_USER 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "mmap2" "ac_cv_member_struct_perf_event_attr_mmap2" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_mmap2" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_MMAP2 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "comm_exec" "ac_cv_member_struct_perf_event_attr_comm_exec" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_comm_exec" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_COMM_EXEC 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "use_clockid" "ac_cv_member_struct_perf_event_attr_use_clockid" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_use_clockid" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_USE_CLOCKID 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "context_switch" "ac_cv_member_struct_perf_event_attr_context_switch" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_context_switch" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_CONTEXT_SWITCH 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "write_backward" "ac_cv_member_struct_perf_event_attr_write_backward" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_write_backward" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_WRITE_BACKWARD 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "bp_type" "ac_cv_member_struct_perf_event_attr_bp_type" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_bp_type" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_BP_TYPE 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "config1" "ac_cv_member_struct_perf_event_attr_config1" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_config1" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG1 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "config2" "ac_cv_member_struct_perf_event_attr_config2" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_config2" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG2 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "branch_sample_type" "ac_cv_member_struct_perf_event_attr_branch_sample_type" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_branch_sample_type" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_BRANCH_SAMPLE_TYPE 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "sample_regs_user" "ac_cv_member_struct_perf_event_attr_sample_regs_user" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_sample_regs_user" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_USER 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "sample_stack_user" "ac_cv_member_struct_perf_event_attr_sample_stack_user" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_sample_stack_user" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_STACK_USER 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "sample_regs_intr" "ac_cv_member_struct_perf_event_attr_sample_regs_intr" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_sample_regs_intr" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_INTR 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "aux_watermark" "ac_cv_member_struct_perf_event_attr_aux_watermark" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_aux_watermark" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_AUX_WATERMARK 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct perf_event_attr" "sample_max_stack" "ac_cv_member_struct_perf_event_attr_sample_max_stack" "#include +" +if test "x$ac_cv_member_struct_perf_event_attr_sample_max_stack" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_MAX_STACK 1 +_ACEOF + + +fi + + +for ac_header in asm/cachectl.h asm/sysmips.h bluetooth/bluetooth.h elf.h inttypes.h linux/bsg.h linux/dm-ioctl.h linux/dqblk_xfs.h linux/falloc.h linux/fiemap.h linux/filter.h linux/hiddev.h linux/ip_vs.h linux/ipc.h linux/mmtimer.h linux/msg.h linux/perf_event.h linux/quota.h linux/seccomp.h linux/securebits.h linux/sem.h linux/shm.h linux/userfaultfd.h linux/utsname.h mqueue.h netinet/sctp.h netipx/ipx.h scsi/sg.h stropts.h sys/conf.h sys/eventfd.h sys/fanotify.h sys/ipc.h sys/msg.h sys/quota.h sys/reg.h sys/sem.h sys/shm.h sys/signalfd.h sys/xattr.h ustat.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in asm/sigcontext.h +do : + ac_fn_c_check_header_compile "$LINENO" "asm/sigcontext.h" "ac_cv_header_asm_sigcontext_h" "#include +" +if test "x$ac_cv_header_asm_sigcontext_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ASM_SIGCONTEXT_H 1 +_ACEOF + +fi + +done + + +for ac_header in netinet/tcp.h netinet/udp.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in linux/mqueue.h +do : + ac_fn_c_check_header_compile "$LINENO" "linux/mqueue.h" "ac_cv_header_linux_mqueue_h" "#include +" +if test "x$ac_cv_header_linux_mqueue_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_MQUEUE_H 1 +_ACEOF + +fi + +done + + +for ac_header in linux/netfilter_arp/arp_tables.h linux/netfilter_bridge/ebtables.h linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include +#include +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in linux/input.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/input.h" "ac_cv_header_linux_input_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_input_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_INPUT_H 1 +_ACEOF + + ac_fn_c_check_member "$LINENO" "struct input_absinfo" "resolution" "ac_cv_member_struct_input_absinfo_resolution" "#include +" +if test "x$ac_cv_member_struct_input_absinfo_resolution" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_INPUT_ABSINFO_RESOLUTION 1 +_ACEOF + + +fi + + +fi + +done + + +for ac_header in linux/bpf.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/bpf.h" "ac_cv_header_linux_bpf_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_bpf_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_BPF_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether union bpf_attr.log_buf initialization works" >&5 +$as_echo_n "checking whether union bpf_attr.log_buf initialization works... " >&6; } +if ${st_cv_have_union_bpf_attr_log_buf+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +union bpf_attr a = { .log_buf = 0 }; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + st_cv_have_union_bpf_attr_log_buf=yes +else + st_cv_have_union_bpf_attr_log_buf=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_have_union_bpf_attr_log_buf" >&5 +$as_echo "$st_cv_have_union_bpf_attr_log_buf" >&6; } + if test $st_cv_have_union_bpf_attr_log_buf = yes; then + +$as_echo "#define HAVE_UNION_BPF_ATTR_LOG_BUF 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether union bpf_attr.bpf_fd initialization works" >&5 +$as_echo_n "checking whether union bpf_attr.bpf_fd initialization works... " >&6; } +if ${st_cv_have_union_bpf_attr_bpf_fd+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +union bpf_attr a = { .bpf_fd = 0 }; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + st_cv_have_union_bpf_attr_bpf_fd=yes +else + st_cv_have_union_bpf_attr_bpf_fd=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_have_union_bpf_attr_bpf_fd" >&5 +$as_echo "$st_cv_have_union_bpf_attr_bpf_fd" >&6; } + if test $st_cv_have_union_bpf_attr_bpf_fd = yes; then + +$as_echo "#define HAVE_UNION_BPF_ATTR_BPF_FD 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether union bpf_attr.attach_type initialization works" >&5 +$as_echo_n "checking whether union bpf_attr.attach_type initialization works... " >&6; } +if ${st_cv_have_union_bpf_attr_attach_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +union bpf_attr a = { .attach_type = 0 }; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + st_cv_have_union_bpf_attr_attach_type=yes +else + st_cv_have_union_bpf_attr_attach_type=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_have_union_bpf_attr_attach_type" >&5 +$as_echo "$st_cv_have_union_bpf_attr_attach_type" >&6; } + if test $st_cv_have_union_bpf_attr_attach_type = yes; then + +$as_echo "#define HAVE_UNION_BPF_ATTR_ATTACH_TYPE 1" >>confdefs.h + + fi + +fi + +done + + +ac_fn_c_check_type "$LINENO" "struct statfs" "ac_cv_type_struct_statfs" "#include +#include +" +if test "x$ac_cv_type_struct_statfs" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS 1 +_ACEOF + + + ac_fn_c_check_member "$LINENO" "struct statfs" "f_frsize" "ac_cv_member_struct_statfs_f_frsize" "#include +#include +" +if test "x$ac_cv_member_struct_statfs_f_frsize" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS_F_FRSIZE 1 +_ACEOF + + +fi + + ac_fn_c_check_member "$LINENO" "struct statfs" "f_flags" "ac_cv_member_struct_statfs_f_flags" "#include +#include +" +if test "x$ac_cv_member_struct_statfs_f_flags" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS_F_FLAGS 1 +_ACEOF + + +fi + + ac_fn_c_check_member "$LINENO" "struct statfs" "f_fsid.val" "ac_cv_member_struct_statfs_f_fsid_val" "#include +#include +" +if test "x$ac_cv_member_struct_statfs_f_fsid_val" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS_F_FSID_VAL 1 +_ACEOF + + +fi + + ac_fn_c_check_member "$LINENO" "struct statfs" "f_fsid.__val" "ac_cv_member_struct_statfs_f_fsid___val" "#include +#include +" +if test "x$ac_cv_member_struct_statfs_f_fsid___val" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS_F_FSID___VAL 1 +_ACEOF + + +fi + + +fi + + +ac_fn_c_check_type "$LINENO" "struct statfs64" "ac_cv_type_struct_statfs64" "#include +#include +" +if test "x$ac_cv_type_struct_statfs64" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS64 1 +_ACEOF + + + ac_fn_c_check_member "$LINENO" "struct statfs64" "f_frsize" "ac_cv_member_struct_statfs64_f_frsize" "#include +#include +" +if test "x$ac_cv_member_struct_statfs64_f_frsize" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS64_F_FRSIZE 1 +_ACEOF + + +fi + + ac_fn_c_check_member "$LINENO" "struct statfs64" "f_flags" "ac_cv_member_struct_statfs64_f_flags" "#include +#include +" +if test "x$ac_cv_member_struct_statfs64_f_flags" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS64_F_FLAGS 1 +_ACEOF + + +fi + + ac_fn_c_check_member "$LINENO" "struct statfs64" "f_fsid.val" "ac_cv_member_struct_statfs64_f_fsid_val" "#include +#include +" +if test "x$ac_cv_member_struct_statfs64_f_fsid_val" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS64_F_FSID_VAL 1 +_ACEOF + + +fi + + ac_fn_c_check_member "$LINENO" "struct statfs64" "f_fsid.__val" "ac_cv_member_struct_statfs64_f_fsid___val" "#include +#include +" +if test "x$ac_cv_member_struct_statfs64_f_fsid___val" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS64_F_FSID___VAL 1 +_ACEOF + + +fi + + +fi + + +ac_fn_c_check_type "$LINENO" "struct blk_user_trace_setup" "ac_cv_type_struct_blk_user_trace_setup" "#include +" +if test "x$ac_cv_type_struct_blk_user_trace_setup" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_BLK_USER_TRACE_SETUP 1 +_ACEOF + + +fi + + +for ac_header in linux/btrfs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/btrfs.h" "ac_cv_header_linux_btrfs_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_btrfs_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_BTRFS_H 1 +_ACEOF + + ac_fn_c_check_member "$LINENO" "struct btrfs_ioctl_feature_flags" "compat_flags" "ac_cv_member_struct_btrfs_ioctl_feature_flags_compat_flags" " #include +#include +" +if test "x$ac_cv_member_struct_btrfs_ioctl_feature_flags_compat_flags" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct btrfs_ioctl_fs_info_args" "nodesize" "ac_cv_member_struct_btrfs_ioctl_fs_info_args_nodesize" " #include +#include +" +if test "x$ac_cv_member_struct_btrfs_ioctl_fs_info_args_nodesize" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct btrfs_ioctl_defrag_range_args" "start" "ac_cv_member_struct_btrfs_ioctl_defrag_range_args_start" " #include +#include +" +if test "x$ac_cv_member_struct_btrfs_ioctl_defrag_range_args_start" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START 1 +_ACEOF + + +fi +ac_fn_c_check_member "$LINENO" "struct btrfs_ioctl_search_args_v2" "buf_size" "ac_cv_member_struct_btrfs_ioctl_search_args_v2_buf_size" " #include +#include +" +if test "x$ac_cv_member_struct_btrfs_ioctl_search_args_v2_buf_size" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_BTRFS_IOCTL_SEARCH_ARGS_V2_BUF_SIZE 1 +_ACEOF + + +fi + + ac_fn_c_check_decl "$LINENO" "BTRFS_COMPRESS_NONE" "ac_cv_have_decl_BTRFS_COMPRESS_NONE" " #include +#include +" +if test "x$ac_cv_have_decl_BTRFS_COMPRESS_NONE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_BTRFS_COMPRESS_NONE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "BTRFS_COMPRESS_ZLIB" "ac_cv_have_decl_BTRFS_COMPRESS_ZLIB" " #include +#include +" +if test "x$ac_cv_have_decl_BTRFS_COMPRESS_ZLIB" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_BTRFS_COMPRESS_ZLIB $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "BTRFS_COMPRESS_LZO" "ac_cv_have_decl_BTRFS_COMPRESS_LZO" " #include +#include +" +if test "x$ac_cv_have_decl_BTRFS_COMPRESS_LZO" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_BTRFS_COMPRESS_LZO $ac_have_decl +_ACEOF + +fi + +done + + +ac_fn_c_check_decl "$LINENO" "sys_errlist" "ac_cv_have_decl_sys_errlist" "$ac_includes_default" +if test "x$ac_cv_have_decl_sys_errlist" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_ERRLIST $ac_have_decl +_ACEOF + +ac_fn_c_check_decl "$LINENO" "PTRACE_PEEKUSER" "ac_cv_have_decl_PTRACE_PEEKUSER" "#include +" +if test "x$ac_cv_have_decl_PTRACE_PEEKUSER" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_PEEKUSER $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "PTRACE_POKEUSER" "ac_cv_have_decl_PTRACE_POKEUSER" "#include +" +if test "x$ac_cv_have_decl_PTRACE_POKEUSER" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PTRACE_POKEUSER $ac_have_decl +_ACEOF + + +ac_fn_c_check_decl "$LINENO" "P_PID" "ac_cv_have_decl_P_PID" "#include +" +if test "x$ac_cv_have_decl_P_PID" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_P_PID $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "P_PPID" "ac_cv_have_decl_P_PPID" "#include +" +if test "x$ac_cv_have_decl_P_PPID" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_P_PPID $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "P_PGID" "ac_cv_have_decl_P_PGID" "#include +" +if test "x$ac_cv_have_decl_P_PGID" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_P_PGID $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "P_SID" "ac_cv_have_decl_P_SID" "#include +" +if test "x$ac_cv_have_decl_P_SID" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_P_SID $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "P_CID" "ac_cv_have_decl_P_CID" "#include +" +if test "x$ac_cv_have_decl_P_CID" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_P_CID $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "P_UID" "ac_cv_have_decl_P_UID" "#include +" +if test "x$ac_cv_have_decl_P_UID" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_P_UID $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "P_GID" "ac_cv_have_decl_P_GID" "#include +" +if test "x$ac_cv_have_decl_P_GID" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_P_GID $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "P_ALL" "ac_cv_have_decl_P_ALL" "#include +" +if test "x$ac_cv_have_decl_P_ALL" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_P_ALL $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "P_LWPID" "ac_cv_have_decl_P_LWPID" "#include +" +if test "x$ac_cv_have_decl_P_LWPID" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_P_LWPID $ac_have_decl +_ACEOF + + +ac_fn_c_check_decl "$LINENO" "LO_FLAGS_READ_ONLY" "ac_cv_have_decl_LO_FLAGS_READ_ONLY" "#include +" +if test "x$ac_cv_have_decl_LO_FLAGS_READ_ONLY" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LO_FLAGS_READ_ONLY $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "LO_FLAGS_USE_AOPS" "ac_cv_have_decl_LO_FLAGS_USE_AOPS" "#include +" +if test "x$ac_cv_have_decl_LO_FLAGS_USE_AOPS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LO_FLAGS_USE_AOPS $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "LO_FLAGS_AUTOCLEAR" "ac_cv_have_decl_LO_FLAGS_AUTOCLEAR" "#include +" +if test "x$ac_cv_have_decl_LO_FLAGS_AUTOCLEAR" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LO_FLAGS_AUTOCLEAR $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "LO_FLAGS_PARTSCAN" "ac_cv_have_decl_LO_FLAGS_PARTSCAN" "#include +" +if test "x$ac_cv_have_decl_LO_FLAGS_PARTSCAN" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LO_FLAGS_PARTSCAN $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "LO_FLAGS_DIRECT_IO" "ac_cv_have_decl_LO_FLAGS_DIRECT_IO" "#include +" +if test "x$ac_cv_have_decl_LO_FLAGS_DIRECT_IO" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LO_FLAGS_DIRECT_IO $ac_have_decl +_ACEOF + + +ac_fn_c_check_decl "$LINENO" "CTL_PROC" "ac_cv_have_decl_CTL_PROC" "#include +#include +" +if test "x$ac_cv_have_decl_CTL_PROC" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_CTL_PROC $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "CTL_ARLAN" "ac_cv_have_decl_CTL_ARLAN" "#include +#include +" +if test "x$ac_cv_have_decl_CTL_ARLAN" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_CTL_ARLAN $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "CTL_S390DBF" "ac_cv_have_decl_CTL_S390DBF" "#include +#include +" +if test "x$ac_cv_have_decl_CTL_S390DBF" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_CTL_S390DBF $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "CTL_SUNRPC" "ac_cv_have_decl_CTL_SUNRPC" "#include +#include +" +if test "x$ac_cv_have_decl_CTL_SUNRPC" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_CTL_SUNRPC $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "CTL_PM" "ac_cv_have_decl_CTL_PM" "#include +#include +" +if test "x$ac_cv_have_decl_CTL_PM" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_CTL_PM $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "CTL_FRV" "ac_cv_have_decl_CTL_FRV" "#include +#include +" +if test "x$ac_cv_have_decl_CTL_FRV" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_CTL_FRV $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_PRINTK_RATELIMIT" "ac_cv_have_decl_KERN_PRINTK_RATELIMIT" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_PRINTK_RATELIMIT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_PRINTK_RATELIMIT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_PRINTK_RATELIMIT_BURST" "ac_cv_have_decl_KERN_PRINTK_RATELIMIT_BURST" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_PRINTK_RATELIMIT_BURST" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_PRINTK_RATELIMIT_BURST $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_PTY" "ac_cv_have_decl_KERN_PTY" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_PTY" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_PTY $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_NGROUPS_MAX" "ac_cv_have_decl_KERN_NGROUPS_MAX" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_NGROUPS_MAX" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_NGROUPS_MAX $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_SPARC_SCONS_PWROFF" "ac_cv_have_decl_KERN_SPARC_SCONS_PWROFF" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_SPARC_SCONS_PWROFF" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_SPARC_SCONS_PWROFF $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_HZ_TIMER" "ac_cv_have_decl_KERN_HZ_TIMER" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_HZ_TIMER" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_HZ_TIMER $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_UNKNOWN_NMI_PANIC" "ac_cv_have_decl_KERN_UNKNOWN_NMI_PANIC" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_UNKNOWN_NMI_PANIC" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_UNKNOWN_NMI_PANIC $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_BOOTLOADER_TYPE" "ac_cv_have_decl_KERN_BOOTLOADER_TYPE" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_BOOTLOADER_TYPE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_BOOTLOADER_TYPE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_RANDOMIZE" "ac_cv_have_decl_KERN_RANDOMIZE" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_RANDOMIZE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_RANDOMIZE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_SETUID_DUMPABLE" "ac_cv_have_decl_KERN_SETUID_DUMPABLE" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_SETUID_DUMPABLE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_SETUID_DUMPABLE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_SPIN_RETRY" "ac_cv_have_decl_KERN_SPIN_RETRY" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_SPIN_RETRY" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_SPIN_RETRY $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_ACPI_VIDEO_FLAGS" "ac_cv_have_decl_KERN_ACPI_VIDEO_FLAGS" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_ACPI_VIDEO_FLAGS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_ACPI_VIDEO_FLAGS $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_IA64_UNALIGNED" "ac_cv_have_decl_KERN_IA64_UNALIGNED" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_IA64_UNALIGNED" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_IA64_UNALIGNED $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_COMPAT_LOG" "ac_cv_have_decl_KERN_COMPAT_LOG" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_COMPAT_LOG" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_COMPAT_LOG $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_MAX_LOCK_DEPTH" "ac_cv_have_decl_KERN_MAX_LOCK_DEPTH" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_MAX_LOCK_DEPTH" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_MAX_LOCK_DEPTH $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_NMI_WATCHDOG" "ac_cv_have_decl_KERN_NMI_WATCHDOG" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_NMI_WATCHDOG" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_NMI_WATCHDOG $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "KERN_PANIC_ON_NMI" "ac_cv_have_decl_KERN_PANIC_ON_NMI" "#include +#include +" +if test "x$ac_cv_have_decl_KERN_PANIC_ON_NMI" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_KERN_PANIC_ON_NMI $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_LLC" "ac_cv_have_decl_NET_LLC" "#include +#include +" +if test "x$ac_cv_have_decl_NET_LLC" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_LLC $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_NETFILTER" "ac_cv_have_decl_NET_NETFILTER" "#include +#include +" +if test "x$ac_cv_have_decl_NET_NETFILTER" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_NETFILTER $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_DCCP" "ac_cv_have_decl_NET_DCCP" "#include +#include +" +if test "x$ac_cv_have_decl_NET_DCCP" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_DCCP $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IRDA" "ac_cv_have_decl_NET_IRDA" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IRDA" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IRDA $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_CORE_DESTROY_DELAY" "ac_cv_have_decl_NET_CORE_DESTROY_DELAY" "#include +#include +" +if test "x$ac_cv_have_decl_NET_CORE_DESTROY_DELAY" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_CORE_DESTROY_DELAY $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_CORE_BUDGET" "ac_cv_have_decl_NET_CORE_BUDGET" "#include +#include +" +if test "x$ac_cv_have_decl_NET_CORE_BUDGET" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_CORE_BUDGET $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_CORE_AEVENT_ETIME" "ac_cv_have_decl_NET_CORE_AEVENT_ETIME" "#include +#include +" +if test "x$ac_cv_have_decl_NET_CORE_AEVENT_ETIME" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_CORE_AEVENT_ETIME $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_CORE_AEVENT_RSEQTH" "ac_cv_have_decl_NET_CORE_AEVENT_RSEQTH" "#include +#include +" +if test "x$ac_cv_have_decl_NET_CORE_AEVENT_RSEQTH" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_CORE_AEVENT_RSEQTH $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_CORE_WARNINGS" "ac_cv_have_decl_NET_CORE_WARNINGS" "#include +#include +" +if test "x$ac_cv_have_decl_NET_CORE_WARNINGS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_CORE_WARNINGS $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV4_IGMP_MAX_MSF" "ac_cv_have_decl_NET_IPV4_IGMP_MAX_MSF" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV4_IGMP_MAX_MSF" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV4_IGMP_MAX_MSF $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_NO_METRICS_SAVE" "ac_cv_have_decl_NET_TCP_NO_METRICS_SAVE" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_NO_METRICS_SAVE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_NO_METRICS_SAVE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_DEFAULT_WIN_SCALE" "ac_cv_have_decl_NET_TCP_DEFAULT_WIN_SCALE" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_DEFAULT_WIN_SCALE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_DEFAULT_WIN_SCALE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_MODERATE_RCVBUF" "ac_cv_have_decl_NET_TCP_MODERATE_RCVBUF" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_MODERATE_RCVBUF" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_MODERATE_RCVBUF $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_TSO_WIN_DIVISOR" "ac_cv_have_decl_NET_TCP_TSO_WIN_DIVISOR" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_TSO_WIN_DIVISOR" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_TSO_WIN_DIVISOR $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_BIC_BETA" "ac_cv_have_decl_NET_TCP_BIC_BETA" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_BIC_BETA" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_BIC_BETA $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR" "ac_cv_have_decl_NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_CONG_CONTROL" "ac_cv_have_decl_NET_TCP_CONG_CONTROL" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_CONG_CONTROL" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_CONG_CONTROL $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_ABC" "ac_cv_have_decl_NET_TCP_ABC" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_ABC" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_ABC $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV4_IPFRAG_MAX_DIST" "ac_cv_have_decl_NET_IPV4_IPFRAG_MAX_DIST" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV4_IPFRAG_MAX_DIST" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV4_IPFRAG_MAX_DIST $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_MTU_PROBING" "ac_cv_have_decl_NET_TCP_MTU_PROBING" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_MTU_PROBING" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_MTU_PROBING $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_BASE_MSS" "ac_cv_have_decl_NET_TCP_BASE_MSS" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_BASE_MSS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_BASE_MSS $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS" "ac_cv_have_decl_NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_DMA_COPYBREAK" "ac_cv_have_decl_NET_TCP_DMA_COPYBREAK" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_DMA_COPYBREAK" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_DMA_COPYBREAK $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_SLOW_START_AFTER_IDLE" "ac_cv_have_decl_NET_TCP_SLOW_START_AFTER_IDLE" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_SLOW_START_AFTER_IDLE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_SLOW_START_AFTER_IDLE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_CIPSOV4_CACHE_ENABLE" "ac_cv_have_decl_NET_CIPSOV4_CACHE_ENABLE" "#include +#include +" +if test "x$ac_cv_have_decl_NET_CIPSOV4_CACHE_ENABLE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_CIPSOV4_CACHE_ENABLE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_CIPSOV4_CACHE_BUCKET_SIZE" "ac_cv_have_decl_NET_CIPSOV4_CACHE_BUCKET_SIZE" "#include +#include +" +if test "x$ac_cv_have_decl_NET_CIPSOV4_CACHE_BUCKET_SIZE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_CIPSOV4_CACHE_BUCKET_SIZE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_CIPSOV4_RBM_OPTFMT" "ac_cv_have_decl_NET_CIPSOV4_RBM_OPTFMT" "#include +#include +" +if test "x$ac_cv_have_decl_NET_CIPSOV4_RBM_OPTFMT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_CIPSOV4_RBM_OPTFMT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_CIPSOV4_RBM_STRICTVALID" "ac_cv_have_decl_NET_CIPSOV4_RBM_STRICTVALID" "#include +#include +" +if test "x$ac_cv_have_decl_NET_CIPSOV4_RBM_STRICTVALID" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_CIPSOV4_RBM_STRICTVALID $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_AVAIL_CONG_CONTROL" "ac_cv_have_decl_NET_TCP_AVAIL_CONG_CONTROL" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_AVAIL_CONG_CONTROL" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_AVAIL_CONG_CONTROL $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_ALLOWED_CONG_CONTROL" "ac_cv_have_decl_NET_TCP_ALLOWED_CONG_CONTROL" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_ALLOWED_CONG_CONTROL" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_ALLOWED_CONG_CONTROL $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_MAX_SSTHRESH" "ac_cv_have_decl_NET_TCP_MAX_SSTHRESH" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_MAX_SSTHRESH" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_MAX_SSTHRESH $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_TCP_FRTO_RESPONSE" "ac_cv_have_decl_NET_TCP_FRTO_RESPONSE" "#include +#include +" +if test "x$ac_cv_have_decl_NET_TCP_FRTO_RESPONSE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_TCP_FRTO_RESPONSE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS" "ac_cv_have_decl_NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV4_CONF_FORCE_IGMP_VERSION" "ac_cv_have_decl_NET_IPV4_CONF_FORCE_IGMP_VERSION" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV4_CONF_FORCE_IGMP_VERSION" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV4_CONF_FORCE_IGMP_VERSION $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV4_CONF_ARP_ANNOUNCE" "ac_cv_have_decl_NET_IPV4_CONF_ARP_ANNOUNCE" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV4_CONF_ARP_ANNOUNCE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV4_CONF_ARP_ANNOUNCE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV4_CONF_ARP_IGNORE" "ac_cv_have_decl_NET_IPV4_CONF_ARP_IGNORE" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV4_CONF_ARP_IGNORE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV4_CONF_ARP_IGNORE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV4_CONF_PROMOTE_SECONDARIES" "ac_cv_have_decl_NET_IPV4_CONF_PROMOTE_SECONDARIES" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV4_CONF_PROMOTE_SECONDARIES" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV4_CONF_PROMOTE_SECONDARIES $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV4_CONF_ARP_ACCEPT" "ac_cv_have_decl_NET_IPV4_CONF_ARP_ACCEPT" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV4_CONF_ARP_ACCEPT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV4_CONF_ARP_ACCEPT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV4_CONF_ARP_NOTIFY" "ac_cv_have_decl_NET_IPV4_CONF_ARP_NOTIFY" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV4_CONF_ARP_NOTIFY" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV4_CONF_ARP_NOTIFY $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV6_MLD_MAX_MSF" "ac_cv_have_decl_NET_IPV6_MLD_MAX_MSF" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV6_MLD_MAX_MSF" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV6_MLD_MAX_MSF $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS" "ac_cv_have_decl_NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS" "#include +#include +" +if test "x$ac_cv_have_decl_NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "VM_MAX_MAP_COUNT" "ac_cv_have_decl_VM_MAX_MAP_COUNT" "#include +#include +" +if test "x$ac_cv_have_decl_VM_MAX_MAP_COUNT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VM_MAX_MAP_COUNT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "VM_LAPTOP_MODE" "ac_cv_have_decl_VM_LAPTOP_MODE" "#include +#include +" +if test "x$ac_cv_have_decl_VM_LAPTOP_MODE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VM_LAPTOP_MODE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "VM_BLOCK_DUMP" "ac_cv_have_decl_VM_BLOCK_DUMP" "#include +#include +" +if test "x$ac_cv_have_decl_VM_BLOCK_DUMP" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VM_BLOCK_DUMP $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "VM_HUGETLB_GROUP" "ac_cv_have_decl_VM_HUGETLB_GROUP" "#include +#include +" +if test "x$ac_cv_have_decl_VM_HUGETLB_GROUP" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VM_HUGETLB_GROUP $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "VM_VFS_CACHE_PRESSURE" "ac_cv_have_decl_VM_VFS_CACHE_PRESSURE" "#include +#include +" +if test "x$ac_cv_have_decl_VM_VFS_CACHE_PRESSURE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VM_VFS_CACHE_PRESSURE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "VM_LEGACY_VA_LAYOUT" "ac_cv_have_decl_VM_LEGACY_VA_LAYOUT" "#include +#include +" +if test "x$ac_cv_have_decl_VM_LEGACY_VA_LAYOUT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VM_LEGACY_VA_LAYOUT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "VM_SWAP_TOKEN_TIMEOUT" "ac_cv_have_decl_VM_SWAP_TOKEN_TIMEOUT" "#include +#include +" +if test "x$ac_cv_have_decl_VM_SWAP_TOKEN_TIMEOUT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VM_SWAP_TOKEN_TIMEOUT $ac_have_decl +_ACEOF + + +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_ANY" "ac_cv_have_decl_V4L2_FIELD_ANY" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FIELD_ANY" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FIELD_ANY $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_NONE" "ac_cv_have_decl_V4L2_FIELD_NONE" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FIELD_NONE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FIELD_NONE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_TOP" "ac_cv_have_decl_V4L2_FIELD_TOP" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FIELD_TOP" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FIELD_TOP $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_BOTTOM" "ac_cv_have_decl_V4L2_FIELD_BOTTOM" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FIELD_BOTTOM" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FIELD_BOTTOM $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_INTERLACED" "ac_cv_have_decl_V4L2_FIELD_INTERLACED" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FIELD_INTERLACED" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FIELD_INTERLACED $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_SEQ_TB" "ac_cv_have_decl_V4L2_FIELD_SEQ_TB" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FIELD_SEQ_TB" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FIELD_SEQ_TB $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_SEQ_BT" "ac_cv_have_decl_V4L2_FIELD_SEQ_BT" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FIELD_SEQ_BT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FIELD_SEQ_BT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_ALTERNATE" "ac_cv_have_decl_V4L2_FIELD_ALTERNATE" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FIELD_ALTERNATE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FIELD_ALTERNATE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_INTERLACED_TB" "ac_cv_have_decl_V4L2_FIELD_INTERLACED_TB" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FIELD_INTERLACED_TB" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FIELD_INTERLACED_TB $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FIELD_INTERLACED_BT" "ac_cv_have_decl_V4L2_FIELD_INTERLACED_BT" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FIELD_INTERLACED_BT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FIELD_INTERLACED_BT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_CAPTURE" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_CAPTURE" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_CAPTURE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_OUTPUT" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_OVERLAY" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OVERLAY" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OVERLAY" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OVERLAY $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VBI_CAPTURE" "ac_cv_have_decl_V4L2_BUF_TYPE_VBI_CAPTURE" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VBI_CAPTURE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_BUF_TYPE_VBI_CAPTURE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VBI_OUTPUT" "ac_cv_have_decl_V4L2_BUF_TYPE_VBI_OUTPUT" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VBI_OUTPUT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_BUF_TYPE_VBI_OUTPUT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_SLICED_VBI_CAPTURE" "ac_cv_have_decl_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_SLICED_VBI_OUTPUT" "ac_cv_have_decl_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY" "ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_TUNER_RADIO" "ac_cv_have_decl_V4L2_TUNER_RADIO" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_TUNER_RADIO" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_TUNER_RADIO $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_TUNER_ANALOG_TV" "ac_cv_have_decl_V4L2_TUNER_ANALOG_TV" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_TUNER_ANALOG_TV" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_TUNER_ANALOG_TV $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_TUNER_DIGITAL_TV" "ac_cv_have_decl_V4L2_TUNER_DIGITAL_TV" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_TUNER_DIGITAL_TV" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_TUNER_DIGITAL_TV $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_MEMORY_MMAP" "ac_cv_have_decl_V4L2_MEMORY_MMAP" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_MEMORY_MMAP" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_MEMORY_MMAP $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_MEMORY_USERPTR" "ac_cv_have_decl_V4L2_MEMORY_USERPTR" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_MEMORY_USERPTR" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_MEMORY_USERPTR $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_MEMORY_OVERLAY" "ac_cv_have_decl_V4L2_MEMORY_OVERLAY" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_MEMORY_OVERLAY" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_MEMORY_OVERLAY $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_MEMORY_DMABUF" "ac_cv_have_decl_V4L2_MEMORY_DMABUF" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_MEMORY_DMABUF" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_MEMORY_DMABUF $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_SMPTE170M" "ac_cv_have_decl_V4L2_COLORSPACE_SMPTE170M" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_COLORSPACE_SMPTE170M" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_COLORSPACE_SMPTE170M $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_SMPTE240M" "ac_cv_have_decl_V4L2_COLORSPACE_SMPTE240M" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_COLORSPACE_SMPTE240M" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_COLORSPACE_SMPTE240M $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_REC709" "ac_cv_have_decl_V4L2_COLORSPACE_REC709" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_COLORSPACE_REC709" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_COLORSPACE_REC709 $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_BT878" "ac_cv_have_decl_V4L2_COLORSPACE_BT878" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_COLORSPACE_BT878" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_COLORSPACE_BT878 $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_470_SYSTEM_M" "ac_cv_have_decl_V4L2_COLORSPACE_470_SYSTEM_M" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_COLORSPACE_470_SYSTEM_M" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_M $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_470_SYSTEM_BG" "ac_cv_have_decl_V4L2_COLORSPACE_470_SYSTEM_BG" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_COLORSPACE_470_SYSTEM_BG" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_COLORSPACE_470_SYSTEM_BG $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_JPEG" "ac_cv_have_decl_V4L2_COLORSPACE_JPEG" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_COLORSPACE_JPEG" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_COLORSPACE_JPEG $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_COLORSPACE_SRGB" "ac_cv_have_decl_V4L2_COLORSPACE_SRGB" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_COLORSPACE_SRGB" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_COLORSPACE_SRGB $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_PRIORITY_UNSET" "ac_cv_have_decl_V4L2_PRIORITY_UNSET" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_PRIORITY_UNSET" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_PRIORITY_UNSET $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_PRIORITY_BACKGROUND" "ac_cv_have_decl_V4L2_PRIORITY_BACKGROUND" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_PRIORITY_BACKGROUND" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_PRIORITY_BACKGROUND $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_PRIORITY_INTERACTIVE" "ac_cv_have_decl_V4L2_PRIORITY_INTERACTIVE" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_PRIORITY_INTERACTIVE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_PRIORITY_INTERACTIVE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_PRIORITY_RECORD" "ac_cv_have_decl_V4L2_PRIORITY_RECORD" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_PRIORITY_RECORD" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_PRIORITY_RECORD $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FRMSIZE_TYPE_DISCRETE" "ac_cv_have_decl_V4L2_FRMSIZE_TYPE_DISCRETE" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FRMSIZE_TYPE_DISCRETE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FRMSIZE_TYPE_DISCRETE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FRMSIZE_TYPE_CONTINUOUS" "ac_cv_have_decl_V4L2_FRMSIZE_TYPE_CONTINUOUS" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FRMSIZE_TYPE_CONTINUOUS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FRMSIZE_TYPE_CONTINUOUS $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FRMSIZE_TYPE_STEPWISE" "ac_cv_have_decl_V4L2_FRMSIZE_TYPE_STEPWISE" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FRMSIZE_TYPE_STEPWISE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FRMSIZE_TYPE_STEPWISE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FRMIVAL_TYPE_DISCRETE" "ac_cv_have_decl_V4L2_FRMIVAL_TYPE_DISCRETE" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FRMIVAL_TYPE_DISCRETE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FRMIVAL_TYPE_DISCRETE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FRMIVAL_TYPE_CONTINUOUS" "ac_cv_have_decl_V4L2_FRMIVAL_TYPE_CONTINUOUS" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FRMIVAL_TYPE_CONTINUOUS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FRMIVAL_TYPE_CONTINUOUS $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_FRMIVAL_TYPE_STEPWISE" "ac_cv_have_decl_V4L2_FRMIVAL_TYPE_STEPWISE" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_FRMIVAL_TYPE_STEPWISE" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_FRMIVAL_TYPE_STEPWISE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_INTEGER" "ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_CTRL_TYPE_INTEGER $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_BOOLEAN" "ac_cv_have_decl_V4L2_CTRL_TYPE_BOOLEAN" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_BOOLEAN" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_CTRL_TYPE_BOOLEAN $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_MENU" "ac_cv_have_decl_V4L2_CTRL_TYPE_MENU" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_MENU" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_CTRL_TYPE_MENU $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_BUTTON" "ac_cv_have_decl_V4L2_CTRL_TYPE_BUTTON" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_BUTTON" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_CTRL_TYPE_BUTTON $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_INTEGER64" "ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER64" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER64" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_CTRL_TYPE_INTEGER64 $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_CTRL_CLASS" "ac_cv_have_decl_V4L2_CTRL_TYPE_CTRL_CLASS" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_CTRL_CLASS" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_CTRL_TYPE_CTRL_CLASS $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_STRING" "ac_cv_have_decl_V4L2_CTRL_TYPE_STRING" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_STRING" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_CTRL_TYPE_STRING $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_BITMASK" "ac_cv_have_decl_V4L2_CTRL_TYPE_BITMASK" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_BITMASK" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_CTRL_TYPE_BITMASK $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "V4L2_CTRL_TYPE_INTEGER_MENU" "ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER_MENU" "#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_V4L2_CTRL_TYPE_INTEGER_MENU" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_V4L2_CTRL_TYPE_INTEGER_MENU $ac_have_decl +_ACEOF + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BLKGETSIZE64" >&5 +$as_echo_n "checking for BLKGETSIZE64... " >&6; } +if ${ac_cv_have_blkgetsize64+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int +main () +{ +return !BLKGETSIZE64; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_have_blkgetsize64=yes +else + ac_cv_have_blkgetsize64=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_have_blkgetsize64 = yes; then + +$as_echo "#define HAVE_BLKGETSIZE64 1" >>confdefs.h + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_blkgetsize64" >&5 +$as_echo "$ac_cv_have_blkgetsize64" >&6; } + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if ${ac_cv_sizeof_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_long_long=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 +$as_echo_n "checking size of off_t... " >&6; } +if ${ac_cv_sizeof_off_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "#include +"; then : + +else + if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (off_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_off_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 +$as_echo "$ac_cv_sizeof_off_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_OFF_T $ac_cv_sizeof_off_t +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of kernel_long_t" >&5 +$as_echo_n "checking size of kernel_long_t... " >&6; } +if ${ac_cv_sizeof_kernel_long_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (kernel_long_t))" "ac_cv_sizeof_kernel_long_t" "#include \"$srcdir/kernel_types.h\" +"; then : + +else + if test "$ac_cv_type_kernel_long_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (kernel_long_t) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_kernel_long_t=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_kernel_long_t" >&5 +$as_echo "$ac_cv_sizeof_kernel_long_t" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_KERNEL_LONG_T $ac_cv_sizeof_kernel_long_t +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct i64_i32" >&5 +$as_echo_n "checking size of struct i64_i32... " >&6; } +if ${ac_cv_sizeof_struct_i64_i32+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct i64_i32))" "ac_cv_sizeof_struct_i64_i32" "struct i64_i32 {long long i64; int i32;}; +"; then : + +else + if test "$ac_cv_type_struct_i64_i32" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (struct i64_i32) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_struct_i64_i32=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_i64_i32" >&5 +$as_echo "$ac_cv_sizeof_struct_i64_i32" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_STRUCT_I64_I32 $ac_cv_sizeof_struct_i64_i32 +_ACEOF + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGRTMIN" >&5 +$as_echo_n "checking for SIGRTMIN... " >&6; } +if ${st_cv_SIGRTMIN+:} false; then : + $as_echo_n "(cached) " >&6 +else + st_cv_SIGRTMIN="$(echo SIGRTMIN | + $CPP $CPPFLAGS -P -imacros asm/signal.h - | + grep '^[0-9]')" + test -n "$st_cv_SIGRTMIN" || st_cv_SIGRTMIN=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_SIGRTMIN" >&5 +$as_echo "$st_cv_SIGRTMIN" >&6; } +if test "x$st_cv_SIGRTMIN" != xno; then + +cat >>confdefs.h <<_ACEOF +#define ASM_SIGRTMIN $st_cv_SIGRTMIN +_ACEOF + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SA_RESTORER" >&5 +$as_echo_n "checking for SA_RESTORER... " >&6; } +if ${st_cv_SA_RESTORER+:} false; then : + $as_echo_n "(cached) " >&6 +else + st_cv_SA_RESTORER="$(echo SA_RESTORER | + $CPP $CPPFLAGS -P -imacros asm/signal.h - | + grep ^0x)" + test -n "$st_cv_SA_RESTORER" || st_cv_SA_RESTORER=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_SA_RESTORER" >&5 +$as_echo "$st_cv_SA_RESTORER" >&6; } +if test "x$st_cv_SA_RESTORER" != xno; then + +cat >>confdefs.h <<_ACEOF +#define ASM_SA_RESTORER $st_cv_SA_RESTORER +_ACEOF + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5 +$as_echo_n "checking for __builtin_popcount... " >&6; } +if ${st_cv_have___builtin_popcount+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +__builtin_popcount(0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + st_cv_have___builtin_popcount=yes +else + st_cv_have___builtin_popcount=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_have___builtin_popcount" >&5 +$as_echo "$st_cv_have___builtin_popcount" >&6; } +if test "x$st_cv_have___builtin_popcount" = xyes; then + +$as_echo "#define HAVE___BUILTIN_POPCOUNT 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dladdr in -ldl" >&5 +$as_echo_n "checking for dladdr in -ldl... " >&6; } +if ${ac_cv_lib_dl_dladdr+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dladdr (); +int +main () +{ +return dladdr (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dladdr=yes +else + ac_cv_lib_dl_dladdr=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dladdr" >&5 +$as_echo "$ac_cv_lib_dl_dladdr" >&6; } +if test "x$ac_cv_lib_dl_dladdr" = xyes; then : + dl_LIBS='-ldl' +else + dl_LIBS= +fi + +if test "x$ac_cv_lib_dl_dladdr" = xyes; then + +$as_echo "#define HAVE_DLADDR 1" >>confdefs.h + +fi + + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PERL=$ac_cv_path_PERL +if test -n "$PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +libunwind_CPPFLAGS= +libunwind_LDFLAGS= +libunwind_LIBS= + +# Check whether --with-libunwind was given. +if test "${with_libunwind+set}" = set; then : + withval=$with_libunwind; case "${withval}" in + yes|no|check) ;; + *) with_libunwind=yes + libunwind_CPPFLAGS="-I${withval}/include" + libunwind_LDFLAGS="-L${withval}/lib" ;; + esac +else + with_libunwind=check + +fi + + +use_libunwind=no +if test "x$with_libunwind" != xno; then : + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $libunwind_CPPFLAGS" + + for ac_header in libunwind-ptrace.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ptrace.h" "ac_cv_header_libunwind_ptrace_h" "$ac_includes_default" +if test "x$ac_cv_header_libunwind_ptrace_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUNWIND_PTRACE_H 1 +_ACEOF + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $libunwind_LDFLAGS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lunwind" >&5 +$as_echo_n "checking for backtrace in -lunwind... " >&6; } +if ${ac_cv_lib_unwind_backtrace+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lunwind $libunwind_LIBS + $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char backtrace (); +int +main () +{ +return backtrace (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_unwind_backtrace=yes +else + ac_cv_lib_unwind_backtrace=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_unwind_backtrace" >&5 +$as_echo "$ac_cv_lib_unwind_backtrace" >&6; } +if test "x$ac_cv_lib_unwind_backtrace" = xyes; then : + libunwind_LIBS="-lunwind $libunwind_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unw_create_addr_space in libunwind-generic" >&5 +$as_echo_n "checking for unw_create_addr_space in libunwind-generic... " >&6; } + saved_LIBS="$LIBS" + LIBS="-lunwind-generic $libunwind_LIBS $LIBS" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return !unw_create_addr_space(0, 0) + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + libunwind_LIBS="-lunwind-generic $libunwind_LIBS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _UPT_create in -lunwind-ptrace" >&5 +$as_echo_n "checking for _UPT_create in -lunwind-ptrace... " >&6; } +if ${ac_cv_lib_unwind_ptrace__UPT_create+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lunwind-ptrace $libunwind_LIBS + $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _UPT_create (); +int +main () +{ +return _UPT_create (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_unwind_ptrace__UPT_create=yes +else + ac_cv_lib_unwind_ptrace__UPT_create=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_unwind_ptrace__UPT_create" >&5 +$as_echo "$ac_cv_lib_unwind_ptrace__UPT_create" >&6; } +if test "x$ac_cv_lib_unwind_ptrace__UPT_create" = xyes; then : + libunwind_LIBS="-lunwind-ptrace $libunwind_LIBS" + use_libunwind=yes + +else + if test "x$with_libunwind" != xcheck; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to find _UPT_create in libunwind-ptrace +See \`config.log' for more details" "$LINENO" 5; } + fi + +fi + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "x$with_libunwind" != xcheck; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to find unw_create_addr_space in libunwind-generic +See \`config.log' for more details" "$LINENO" 5; } + fi + + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + LIBS="$saved_LIBS" + +else + if test "x$with_libunwind" != xcheck; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to find libunwind +See \`config.log' for more details" "$LINENO" 5; } + fi + +fi + + + LDFLAGS="$saved_LDFLAGS" + +else + if test "x$with_libunwind" != xcheck; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to find libunwind-ptrace.h +See \`config.log' for more details" "$LINENO" 5; } + fi + + +fi + +done + + + CPPFLAGS="$saved_CPPFLAGS" + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable stack tracing support using libunwind" >&5 +$as_echo_n "checking whether to enable stack tracing support using libunwind... " >&6; } +if test "x$use_libunwind" = xyes; then + +$as_echo "#define USE_LIBUNWIND 1" >>confdefs.h + + + + +fi + if test "x$use_libunwind" = xyes; then + USE_LIBUNWIND_TRUE= + USE_LIBUNWIND_FALSE='#' +else + USE_LIBUNWIND_TRUE='#' + USE_LIBUNWIND_FALSE= +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_libunwind" >&5 +$as_echo "$use_libunwind" >&6; } + +if test "$arch" = mips && test "$no_create" != yes; then + mkdir -p linux/mips + if $srcdir/linux/mips/genstub.sh linux/mips; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Generated MIPS syscallent stubs" >&5 +$as_echo "Generated MIPS syscallent stubs" >&6; } + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Failed to generate syscallent stubs +See \`config.log' for more details" "$LINENO" 5; } + fi +fi + + + + + + + + + + + + +case "$arch" in + aarch64|powerpc64|sparc64|tile|x32|x86_64) + + + + for ac_header in gnu/stubs-32.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "gnu/stubs-32.h" "ac_cv_header_gnu_stubs_32_h" "$ac_includes_default" +if test "x$ac_cv_header_gnu_stubs_32_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GNU_STUBS_32_H 1 +_ACEOF + IFLAG= +else + mkdir -p gnu + : > gnu/stubs-32.h + { $as_echo "$as_me:${as_lineno-$LINENO}: Created empty gnu/stubs-32.h" >&5 +$as_echo "$as_me: Created empty gnu/stubs-32.h" >&6;} + IFLAG=-I. +fi + +done + + + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -m32 $IFLAG" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -m32 compile support" >&5 +$as_echo_n "checking for -m32 compile support... " >&6; } +if ${st_cv_m32_cc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + int main(){return 0;} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + st_cv_m32_cc=yes +else + st_cv_m32_cc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_m32_cc" >&5 +$as_echo "$st_cv_m32_cc" >&6; } + if test $st_cv_m32_cc = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -m32 runtime support" >&5 +$as_echo_n "checking for -m32 runtime support... " >&6; } +if ${st_cv_m32_runtime+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + st_cv_m32_runtime=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + int main(){return 0;} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + st_cv_m32_runtime=yes +else + st_cv_m32_runtime=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_m32_runtime" >&5 +$as_echo "$st_cv_m32_runtime" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mpers.sh -m32 works" >&5 +$as_echo_n "checking whether mpers.sh -m32 works... " >&6; } +if ${st_cv_m32_mpers+:} false; then : + $as_echo_n "(cached) " >&6 +else + if CC="$CC" CPP="$CPP" CPPFLAGS="$CPPFLAGS" \ + $srcdir/mpers_test.sh m32; then + st_cv_m32_mpers=yes + else + st_cv_m32_mpers=no + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_m32_mpers" >&5 +$as_echo "$st_cv_m32_mpers" >&6; } + if test $st_cv_m32_mpers = yes; then + +$as_echo "#define HAVE_M32_MPERS 1" >>confdefs.h + + + + + + + + + +if test -n "${ac_cv_type_struct_stat+set}"; then : + saved_ac_cv_type_struct_stat="${ac_cv_type_struct_stat}"; unset ac_cv_type_struct_stat +fi +if test -n "${ac_cv_m32_type_struct_stat+set}"; then : + ac_cv_type_struct_stat="${ac_cv_m32_type_struct_stat}" +fi + + + + + + +ac_fn_c_check_type "$LINENO" "struct stat" "ac_cv_type_struct_stat" "#include +#include +" +if test "x$ac_cv_type_struct_stat" = xyes; then : + +$as_echo "#define HAVE_M32_STRUCT_STAT 1" >>confdefs.h + +fi + + + + + + + +if test -n "${ac_cv_type_struct_stat+set}"; then : + ac_cv_m32_type_struct_stat="${ac_cv_type_struct_stat}" +fi +if test -n "${saved_ac_cv_type_struct_stat+set}"; then : + ac_cv_type_struct_stat="${saved_ac_cv_type_struct_stat}"; unset saved_ac_cv_type_struct_stat +fi + + + + + + + + + + + + + +if test -n "${ac_cv_member_struct_stat_st_mtime_nsec+set}"; then : + saved_ac_cv_member_struct_stat_st_mtime_nsec="${ac_cv_member_struct_stat_st_mtime_nsec}"; unset ac_cv_member_struct_stat_st_mtime_nsec +fi +if test -n "${ac_cv_m32_member_struct_stat_st_mtime_nsec+set}"; then : + ac_cv_member_struct_stat_st_mtime_nsec="${ac_cv_m32_member_struct_stat_st_mtime_nsec}" +fi + + + + + + +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime_nsec" "ac_cv_member_struct_stat_st_mtime_nsec" "#include +#include +" +if test "x$ac_cv_member_struct_stat_st_mtime_nsec" = xyes; then : + +$as_echo "#define HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC 1" >>confdefs.h + +fi + + + + + + + +if test -n "${ac_cv_member_struct_stat_st_mtime_nsec+set}"; then : + ac_cv_m32_member_struct_stat_st_mtime_nsec="${ac_cv_member_struct_stat_st_mtime_nsec}" +fi +if test -n "${saved_ac_cv_member_struct_stat_st_mtime_nsec+set}"; then : + ac_cv_member_struct_stat_st_mtime_nsec="${saved_ac_cv_member_struct_stat_st_mtime_nsec}"; unset saved_ac_cv_member_struct_stat_st_mtime_nsec +fi + + + + + + + + + + + + + + + + +if test -n "${ac_cv_type_struct_stat64+set}"; then : + saved_ac_cv_type_struct_stat64="${ac_cv_type_struct_stat64}"; unset ac_cv_type_struct_stat64 +fi +if test -n "${ac_cv_m32_type_struct_stat64+set}"; then : + ac_cv_type_struct_stat64="${ac_cv_m32_type_struct_stat64}" +fi + + + + + + +ac_fn_c_check_type "$LINENO" "struct stat64" "ac_cv_type_struct_stat64" "#include +#include +" +if test "x$ac_cv_type_struct_stat64" = xyes; then : + +$as_echo "#define HAVE_M32_STRUCT_STAT64 1" >>confdefs.h + +fi + + + + + + + +if test -n "${ac_cv_type_struct_stat64+set}"; then : + ac_cv_m32_type_struct_stat64="${ac_cv_type_struct_stat64}" +fi +if test -n "${saved_ac_cv_type_struct_stat64+set}"; then : + ac_cv_type_struct_stat64="${saved_ac_cv_type_struct_stat64}"; unset saved_ac_cv_type_struct_stat64 +fi + + + + + + + + + + + + + +if test -n "${ac_cv_member_struct_stat64_st_mtime_nsec+set}"; then : + saved_ac_cv_member_struct_stat64_st_mtime_nsec="${ac_cv_member_struct_stat64_st_mtime_nsec}"; unset ac_cv_member_struct_stat64_st_mtime_nsec +fi +if test -n "${ac_cv_m32_member_struct_stat64_st_mtime_nsec+set}"; then : + ac_cv_member_struct_stat64_st_mtime_nsec="${ac_cv_m32_member_struct_stat64_st_mtime_nsec}" +fi + + + + + + +ac_fn_c_check_member "$LINENO" "struct stat64" "st_mtime_nsec" "ac_cv_member_struct_stat64_st_mtime_nsec" "#include +#include +" +if test "x$ac_cv_member_struct_stat64_st_mtime_nsec" = xyes; then : + +$as_echo "#define HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC 1" >>confdefs.h + +fi + + + + + + + +if test -n "${ac_cv_member_struct_stat64_st_mtime_nsec+set}"; then : + ac_cv_m32_member_struct_stat64_st_mtime_nsec="${ac_cv_member_struct_stat64_st_mtime_nsec}" +fi +if test -n "${saved_ac_cv_member_struct_stat64_st_mtime_nsec+set}"; then : + ac_cv_member_struct_stat64_st_mtime_nsec="${saved_ac_cv_member_struct_stat64_st_mtime_nsec}"; unset saved_ac_cv_member_struct_stat64_st_mtime_nsec +fi + + + + + + + + + fi + fi + CFLAGS="$saved_CFLAGS" + ;; + + *) + st_cv_m32_runtime=no + st_cv_m32_mpers=no + ;; +esac + + if test "$st_cv_m32_mpers$st_cv_m32_runtime" = yesyes; then + HAVE_M32_RUNTIME_TRUE= + HAVE_M32_RUNTIME_FALSE='#' +else + HAVE_M32_RUNTIME_TRUE='#' + HAVE_M32_RUNTIME_FALSE= +fi + + if test "$st_cv_m32_mpers" = yes; then + HAVE_M32_MPERS_TRUE= + HAVE_M32_MPERS_FALSE='#' +else + HAVE_M32_MPERS_TRUE='#' + HAVE_M32_MPERS_FALSE= +fi + + + + + + + + + + + + + + + + + + + + + + + +case "$arch" in + x86_64) + + + + for ac_header in gnu/stubs-x32.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "gnu/stubs-x32.h" "ac_cv_header_gnu_stubs_x32_h" "$ac_includes_default" +if test "x$ac_cv_header_gnu_stubs_x32_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GNU_STUBS_X32_H 1 +_ACEOF + IFLAG= +else + mkdir -p gnu + : > gnu/stubs-x32.h + { $as_echo "$as_me:${as_lineno-$LINENO}: Created empty gnu/stubs-x32.h" >&5 +$as_echo "$as_me: Created empty gnu/stubs-x32.h" >&6;} + IFLAG=-I. +fi + +done + + + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -mx32 $IFLAG" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mx32 compile support" >&5 +$as_echo_n "checking for -mx32 compile support... " >&6; } +if ${st_cv_mx32_cc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + int main(){return 0;} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + st_cv_mx32_cc=yes +else + st_cv_mx32_cc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_mx32_cc" >&5 +$as_echo "$st_cv_mx32_cc" >&6; } + if test $st_cv_mx32_cc = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mx32 runtime support" >&5 +$as_echo_n "checking for -mx32 runtime support... " >&6; } +if ${st_cv_mx32_runtime+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + st_cv_mx32_runtime=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + int main(){return 0;} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + st_cv_mx32_runtime=yes +else + st_cv_mx32_runtime=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_mx32_runtime" >&5 +$as_echo "$st_cv_mx32_runtime" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mpers.sh -mx32 works" >&5 +$as_echo_n "checking whether mpers.sh -mx32 works... " >&6; } +if ${st_cv_mx32_mpers+:} false; then : + $as_echo_n "(cached) " >&6 +else + if CC="$CC" CPP="$CPP" CPPFLAGS="$CPPFLAGS" \ + $srcdir/mpers_test.sh mx32; then + st_cv_mx32_mpers=yes + else + st_cv_mx32_mpers=no + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $st_cv_mx32_mpers" >&5 +$as_echo "$st_cv_mx32_mpers" >&6; } + if test $st_cv_mx32_mpers = yes; then + +$as_echo "#define HAVE_MX32_MPERS 1" >>confdefs.h + + + + + + + + + +if test -n "${ac_cv_type_struct_stat+set}"; then : + saved_ac_cv_type_struct_stat="${ac_cv_type_struct_stat}"; unset ac_cv_type_struct_stat +fi +if test -n "${ac_cv_mx32_type_struct_stat+set}"; then : + ac_cv_type_struct_stat="${ac_cv_mx32_type_struct_stat}" +fi + + + + + + +ac_fn_c_check_type "$LINENO" "struct stat" "ac_cv_type_struct_stat" "#include +#include +" +if test "x$ac_cv_type_struct_stat" = xyes; then : + +$as_echo "#define HAVE_MX32_STRUCT_STAT 1" >>confdefs.h + +fi + + + + + + + +if test -n "${ac_cv_type_struct_stat+set}"; then : + ac_cv_mx32_type_struct_stat="${ac_cv_type_struct_stat}" +fi +if test -n "${saved_ac_cv_type_struct_stat+set}"; then : + ac_cv_type_struct_stat="${saved_ac_cv_type_struct_stat}"; unset saved_ac_cv_type_struct_stat +fi + + + + + + + + + + + + + +if test -n "${ac_cv_member_struct_stat_st_mtime_nsec+set}"; then : + saved_ac_cv_member_struct_stat_st_mtime_nsec="${ac_cv_member_struct_stat_st_mtime_nsec}"; unset ac_cv_member_struct_stat_st_mtime_nsec +fi +if test -n "${ac_cv_mx32_member_struct_stat_st_mtime_nsec+set}"; then : + ac_cv_member_struct_stat_st_mtime_nsec="${ac_cv_mx32_member_struct_stat_st_mtime_nsec}" +fi + + + + + + +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime_nsec" "ac_cv_member_struct_stat_st_mtime_nsec" "#include +#include +" +if test "x$ac_cv_member_struct_stat_st_mtime_nsec" = xyes; then : + +$as_echo "#define HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC 1" >>confdefs.h + +fi + + + + + + + +if test -n "${ac_cv_member_struct_stat_st_mtime_nsec+set}"; then : + ac_cv_mx32_member_struct_stat_st_mtime_nsec="${ac_cv_member_struct_stat_st_mtime_nsec}" +fi +if test -n "${saved_ac_cv_member_struct_stat_st_mtime_nsec+set}"; then : + ac_cv_member_struct_stat_st_mtime_nsec="${saved_ac_cv_member_struct_stat_st_mtime_nsec}"; unset saved_ac_cv_member_struct_stat_st_mtime_nsec +fi + + + + + + + + + + + + + + + + +if test -n "${ac_cv_type_struct_stat64+set}"; then : + saved_ac_cv_type_struct_stat64="${ac_cv_type_struct_stat64}"; unset ac_cv_type_struct_stat64 +fi +if test -n "${ac_cv_mx32_type_struct_stat64+set}"; then : + ac_cv_type_struct_stat64="${ac_cv_mx32_type_struct_stat64}" +fi + + + + + + +ac_fn_c_check_type "$LINENO" "struct stat64" "ac_cv_type_struct_stat64" "#include +#include +" +if test "x$ac_cv_type_struct_stat64" = xyes; then : + +$as_echo "#define HAVE_MX32_STRUCT_STAT64 1" >>confdefs.h + +fi + + + + + + + +if test -n "${ac_cv_type_struct_stat64+set}"; then : + ac_cv_mx32_type_struct_stat64="${ac_cv_type_struct_stat64}" +fi +if test -n "${saved_ac_cv_type_struct_stat64+set}"; then : + ac_cv_type_struct_stat64="${saved_ac_cv_type_struct_stat64}"; unset saved_ac_cv_type_struct_stat64 +fi + + + + + + + + + + + + + +if test -n "${ac_cv_member_struct_stat64_st_mtime_nsec+set}"; then : + saved_ac_cv_member_struct_stat64_st_mtime_nsec="${ac_cv_member_struct_stat64_st_mtime_nsec}"; unset ac_cv_member_struct_stat64_st_mtime_nsec +fi +if test -n "${ac_cv_mx32_member_struct_stat64_st_mtime_nsec+set}"; then : + ac_cv_member_struct_stat64_st_mtime_nsec="${ac_cv_mx32_member_struct_stat64_st_mtime_nsec}" +fi + + + + + + +ac_fn_c_check_member "$LINENO" "struct stat64" "st_mtime_nsec" "ac_cv_member_struct_stat64_st_mtime_nsec" "#include +#include +" +if test "x$ac_cv_member_struct_stat64_st_mtime_nsec" = xyes; then : + +$as_echo "#define HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC 1" >>confdefs.h + +fi + + + + + + + +if test -n "${ac_cv_member_struct_stat64_st_mtime_nsec+set}"; then : + ac_cv_mx32_member_struct_stat64_st_mtime_nsec="${ac_cv_member_struct_stat64_st_mtime_nsec}" +fi +if test -n "${saved_ac_cv_member_struct_stat64_st_mtime_nsec+set}"; then : + ac_cv_member_struct_stat64_st_mtime_nsec="${saved_ac_cv_member_struct_stat64_st_mtime_nsec}"; unset saved_ac_cv_member_struct_stat64_st_mtime_nsec +fi + + + + + + + + + fi + fi + CFLAGS="$saved_CFLAGS" + ;; + + *) + st_cv_mx32_runtime=no + st_cv_mx32_mpers=no + ;; +esac + + if test "$st_cv_mx32_mpers$st_cv_mx32_runtime" = yesyes; then + HAVE_MX32_RUNTIME_TRUE= + HAVE_MX32_RUNTIME_FALSE='#' +else + HAVE_MX32_RUNTIME_TRUE='#' + HAVE_MX32_RUNTIME_FALSE= +fi + + if test "$st_cv_mx32_mpers" = yes; then + HAVE_MX32_MPERS_TRUE= + HAVE_MX32_MPERS_FALSE='#' +else + HAVE_MX32_MPERS_TRUE='#' + HAVE_MX32_MPERS_FALSE= +fi + + + + + + + + + + + + + + + + + + # Check whether --enable-valgrind was given. +if test "${enable_valgrind+set}" = set; then : + enableval=$enable_valgrind; enable_valgrind=$enableval +else + enable_valgrind= +fi + + + if test "$enable_valgrind" != "no"; then : + + # Check for Valgrind. + # Extract the first word of "valgrind", so it can be a program name with args. +set dummy valgrind; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_VALGRIND+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$VALGRIND"; then + ac_cv_prog_VALGRIND="$VALGRIND" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_VALGRIND="valgrind" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +VALGRIND=$ac_cv_prog_VALGRIND +if test -n "$VALGRIND"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND" >&5 +$as_echo "$VALGRIND" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "$VALGRIND" = ""; then : + + if test "$enable_valgrind" = "yes"; then : + + as_fn_error $? "Could not find valgrind; either install it or reconfigure with --disable-valgrind" "$LINENO" 5 + +else + + enable_valgrind=no + +fi + +else + + enable_valgrind=yes + +fi + +fi + + if test "$enable_valgrind" = "yes"; then + VALGRIND_ENABLED_TRUE= + VALGRIND_ENABLED_FALSE='#' +else + VALGRIND_ENABLED_TRUE='#' + VALGRIND_ENABLED_FALSE= +fi + + VALGRIND_ENABLED=$enable_valgrind + + + # Check for Valgrind tools we care about. + valgrind_enabled_tools= + + # Check whether --enable-valgrind-memcheck was given. +if test "${enable_valgrind_memcheck+set}" = set; then : + enableval=$enable_valgrind_memcheck; enable_valgrind_memcheck=$enableval +else + enable_valgrind_memcheck= +fi + + if test "$enable_valgrind" = "no"; then : + + enable_valgrind_memcheck=no +elif test "$enable_valgrind_memcheck" != "no"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Valgrind tool memcheck" >&5 +$as_echo_n "checking for Valgrind tool memcheck... " >&6; } +if ${ax_cv_valgrind_tool_memcheck+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_valgrind_tool_memcheck=no + + if `$VALGRIND --tool=memcheck --help >/dev/null 2>&1`; then : + + ax_cv_valgrind_tool_memcheck=yes + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_valgrind_tool_memcheck" >&5 +$as_echo "$ax_cv_valgrind_tool_memcheck" >&6; } + if test "$ax_cv_valgrind_tool_memcheck" = "no"; then : + + if test "$enable_valgrind_memcheck" = "yes"; then : + + as_fn_error $? "Valgrind does not support memcheck; reconfigure with --disable-valgrind-memcheck" "$LINENO" 5 + +else + + enable_valgrind_memcheck=no + +fi + +else + + enable_valgrind_memcheck=yes + +fi + +fi + if test "$enable_valgrind_memcheck" = "yes"; then : + + valgrind_enabled_tools="$valgrind_enabled_tools memcheck" + +fi + ENABLE_VALGRIND_memcheck=$enable_valgrind_memcheck + + + # Check whether --enable-valgrind-helgrind was given. +if test "${enable_valgrind_helgrind+set}" = set; then : + enableval=$enable_valgrind_helgrind; enable_valgrind_helgrind=$enableval +else + enable_valgrind_helgrind= +fi + + if test "$enable_valgrind" = "no"; then : + + enable_valgrind_helgrind=no +elif test "$enable_valgrind_helgrind" != "no"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Valgrind tool helgrind" >&5 +$as_echo_n "checking for Valgrind tool helgrind... " >&6; } +if ${ax_cv_valgrind_tool_helgrind+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_valgrind_tool_helgrind=no + + if `$VALGRIND --tool=helgrind --help >/dev/null 2>&1`; then : + + ax_cv_valgrind_tool_helgrind=yes + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_valgrind_tool_helgrind" >&5 +$as_echo "$ax_cv_valgrind_tool_helgrind" >&6; } + if test "$ax_cv_valgrind_tool_helgrind" = "no"; then : + + if test "$enable_valgrind_helgrind" = "yes"; then : + + as_fn_error $? "Valgrind does not support helgrind; reconfigure with --disable-valgrind-helgrind" "$LINENO" 5 + +else + + enable_valgrind_helgrind=no + +fi + +else + + enable_valgrind_helgrind=yes + +fi + +fi + if test "$enable_valgrind_helgrind" = "yes"; then : + + valgrind_enabled_tools="$valgrind_enabled_tools helgrind" + +fi + ENABLE_VALGRIND_helgrind=$enable_valgrind_helgrind + + + # Check whether --enable-valgrind-drd was given. +if test "${enable_valgrind_drd+set}" = set; then : + enableval=$enable_valgrind_drd; enable_valgrind_drd=$enableval +else + enable_valgrind_drd= +fi + + if test "$enable_valgrind" = "no"; then : + + enable_valgrind_drd=no +elif test "$enable_valgrind_drd" != "no"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Valgrind tool drd" >&5 +$as_echo_n "checking for Valgrind tool drd... " >&6; } +if ${ax_cv_valgrind_tool_drd+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_valgrind_tool_drd=no + + if `$VALGRIND --tool=drd --help >/dev/null 2>&1`; then : + + ax_cv_valgrind_tool_drd=yes + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_valgrind_tool_drd" >&5 +$as_echo "$ax_cv_valgrind_tool_drd" >&6; } + if test "$ax_cv_valgrind_tool_drd" = "no"; then : + + if test "$enable_valgrind_drd" = "yes"; then : + + as_fn_error $? "Valgrind does not support drd; reconfigure with --disable-valgrind-drd" "$LINENO" 5 + +else + + enable_valgrind_drd=no + +fi + +else + + enable_valgrind_drd=yes + +fi + +fi + if test "$enable_valgrind_drd" = "yes"; then : + + valgrind_enabled_tools="$valgrind_enabled_tools drd" + +fi + ENABLE_VALGRIND_drd=$enable_valgrind_drd + + + # Check whether --enable-valgrind-sgcheck was given. +if test "${enable_valgrind_sgcheck+set}" = set; then : + enableval=$enable_valgrind_sgcheck; enable_valgrind_sgcheck=$enableval +else + enable_valgrind_sgcheck= +fi + + if test "$enable_valgrind" = "no"; then : + + enable_valgrind_sgcheck=no +elif test "$enable_valgrind_sgcheck" = "yes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Valgrind tool sgcheck" >&5 +$as_echo_n "checking for Valgrind tool sgcheck... " >&6; } +if ${ax_cv_valgrind_tool_sgcheck+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_cv_valgrind_tool_sgcheck=no + + if `$VALGRIND --tool=exp-sgcheck --help >/dev/null 2>&1`; then : + + ax_cv_valgrind_tool_sgcheck=yes + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_valgrind_tool_sgcheck" >&5 +$as_echo "$ax_cv_valgrind_tool_sgcheck" >&6; } + if test "$ax_cv_valgrind_tool_sgcheck" = "no"; then : + + if test "$enable_valgrind_sgcheck" = "yes"; then : + + as_fn_error $? "Valgrind does not support sgcheck; reconfigure with --disable-valgrind-sgcheck" "$LINENO" 5 + +else + + enable_valgrind_sgcheck=no + +fi + +else + + enable_valgrind_sgcheck=yes + +fi + +fi + if test "$enable_valgrind_sgcheck" = "yes"; then : + + valgrind_enabled_tools="$valgrind_enabled_tools sgcheck" + +fi + ENABLE_VALGRIND_sgcheck=$enable_valgrind_sgcheck + + + valgrind_tools="memcheck helgrind drd sgcheck" + + valgrind_enabled_tools=$valgrind_enabled_tools + + +VALGRIND_CHECK_RULES=' +# Valgrind check +# +# Optional: +# - VALGRIND_SUPPRESSIONS_FILES: Space-separated list of Valgrind suppressions +# files to load. (Default: empty) +# - VALGRIND_FLAGS: General flags to pass to all Valgrind tools. +# (Default: --num-callers=30) +# - VALGRIND_$toolname_FLAGS: Flags to pass to Valgrind $toolname (one of: +# memcheck, helgrind, drd, sgcheck). (Default: various) + +# Optional variables +VALGRIND_SUPPRESSIONS ?= $(addprefix --suppressions=,$(VALGRIND_SUPPRESSIONS_FILES)) +VALGRIND_FLAGS ?= --num-callers=30 +VALGRIND_memcheck_FLAGS ?= --leak-check=full --show-reachable=no +VALGRIND_helgrind_FLAGS ?= --history-level=approx +VALGRIND_drd_FLAGS ?= +VALGRIND_sgcheck_FLAGS ?= + +# Internal use +valgrind_log_files = $(addprefix test-suite-,$(addsuffix .log,$(valgrind_tools))) + +valgrind_memcheck_flags = --tool=memcheck $(VALGRIND_memcheck_FLAGS) +valgrind_helgrind_flags = --tool=helgrind $(VALGRIND_helgrind_FLAGS) +valgrind_drd_flags = --tool=drd $(VALGRIND_drd_FLAGS) +valgrind_sgcheck_flags = --tool=exp-sgcheck $(VALGRIND_sgcheck_FLAGS) + +valgrind_quiet = $(valgrind_quiet_$(V)) +valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY)) +valgrind_quiet_0 = --quiet +valgrind_v_use = $(valgrind_v_use_$(V)) +valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY)) +valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):; + +# Support running with and without libtool. +ifneq ($(LIBTOOL),) +valgrind_lt = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=execute +else +valgrind_lt = +endif + +# Use recursive makes in order to ignore errors during check +check-valgrind: +ifeq ($(VALGRIND_ENABLED),yes) + -$(A''M_V_at)$(foreach tool,$(valgrind_enabled_tools), \ + $(MAKE) $(AM_MAKEFLAGS) -k check-valgrind-$(tool); \ + ) +else + @echo "Need to reconfigure with --enable-valgrind" +endif + +# Valgrind running +VALGRIND_TESTS_ENVIRONMENT = \ + $(TESTS_ENVIRONMENT) \ + env VALGRIND=$(VALGRIND) \ + G_SLICE=always-malloc,debug-blocks \ + G_DEBUG=fatal-warnings,fatal-criticals,gc-friendly + +VALGRIND_LOG_COMPILER = \ + $(valgrind_lt) \ + $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) + +define valgrind_tool_rule = +check-valgrind-$(1): $$(BUILT_SOURCES) +ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes) + $$(valgrind_v_use)$$(MAKE) $$(AM_MAKEFLAGS) check-am \ + TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \ + LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \ + LOG_FLAGS="$$(valgrind_$(1)_flags)" \ + TEST_SUITE_LOG=test-suite-$(1).log +else ifeq ($$(VALGRIND_ENABLED),yes) + @echo "Need to reconfigure with --enable-valgrind-$(1)" +else + @echo "Need to reconfigure with --enable-valgrind" +endif +endef + +$(foreach tool,$(valgrind_tools),$(eval $(call valgrind_tool_rule,$(tool)))) + +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind + +MOSTLYCLEANFILES ?= +MOSTLYCLEANFILES += $(valgrind_log_files) + +.PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools)) +' + + + + + +ac_config_files="$ac_config_files Makefile tests/Makefile tests-m32/Makefile tests-mx32/Makefile strace.spec debian/changelog" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${CODE_COVERAGE_ENABLED_TRUE}" && test -z "${CODE_COVERAGE_ENABLED_FALSE}"; then + as_fn_error $? "conditional \"CODE_COVERAGE_ENABLED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${USE_LIBUNWIND_TRUE}" && test -z "${USE_LIBUNWIND_FALSE}"; then + as_fn_error $? "conditional \"USE_LIBUNWIND\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_M32_RUNTIME_TRUE}" && test -z "${HAVE_M32_RUNTIME_FALSE}"; then + as_fn_error $? "conditional \"HAVE_M32_RUNTIME\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_M32_MPERS_TRUE}" && test -z "${HAVE_M32_MPERS_FALSE}"; then + as_fn_error $? "conditional \"HAVE_M32_MPERS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_MX32_RUNTIME_TRUE}" && test -z "${HAVE_MX32_RUNTIME_FALSE}"; then + as_fn_error $? "conditional \"HAVE_MX32_RUNTIME\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_MX32_MPERS_TRUE}" && test -z "${HAVE_MX32_MPERS_FALSE}"; then + as_fn_error $? "conditional \"HAVE_MX32_MPERS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${VALGRIND_ENABLED_TRUE}" && test -z "${VALGRIND_ENABLED_FALSE}"; then + as_fn_error $? "conditional \"VALGRIND_ENABLED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by strace $as_me 4.16, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to . +strace home page: ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +strace config.status 4.16 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "tests-m32/Makefile") CONFIG_FILES="$CONFIG_FILES tests-m32/Makefile" ;; + "tests-mx32/Makefile") CONFIG_FILES="$CONFIG_FILES tests-mx32/Makefile" ;; + "strace.spec") CONFIG_FILES="$CONFIG_FILES strace.spec" ;; + "debian/changelog") CONFIG_FILES="$CONFIG_FILES debian/changelog" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX")` && + test -n "$tmp" && test -d "$tmp" +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/configure.ac b/configure.ac index 404dfb9da..7004bd3ff 100644 --- a/configure.ac +++ b/configure.ac @@ -32,11 +32,15 @@ AC_PREREQ(2.57) AC_INIT([strace], m4_esyscmd([./git-version-gen .tarball-version]), - [strace-devel@lists.sourceforge.net]) + [strace-devel@lists.sourceforge.net], + [strace], + [https://strace.io]) +AC_COPYRIGHT([Copyright (C) 1999-2017 The strace developers.]) AC_CONFIG_SRCDIR([strace.c]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests]) +AM_EXTRA_RECURSIVE_TARGETS([check-valgrind]) AM_MAINTAINER_MODE AC_CANONICAL_HOST @@ -47,6 +51,7 @@ AC_SUBST(DEB_CHANGELOGTIME) AC_PROG_CC AC_PROG_CPP +st_WARN_CFLAGS AX_PROG_CC_FOR_BUILD AC_PROG_INSTALL AC_PROG_RANLIB @@ -210,29 +215,26 @@ AC_SUBST(arch_mx32) MIPS_ABI= if test "$arch" = mips; then AC_CACHE_CHECK([for _MIPS_SIM], [st_cv__MIPS_SIM], - [AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM], - [#include ], + [AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM], , [AC_MSG_ERROR([_MIPS_SIM cannot be determined])])]) + # requires GCC >= 3.4 AC_CACHE_CHECK([for MIPS ABI], [st_cv_mips_abi], [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include ]], - [[int i[_MIPS_SIM == _MIPS_SIM_ABI32 ? 1 : - 1];]])], + [AC_LANG_PROGRAM(, [[int i[_MIPS_SIM == _ABIO32 ? 1 : - 1];]])], [st_cv_mips_abi=o32], [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include ]], - [[int i[_MIPS_SIM == _MIPS_SIM_NABI32 ? 1 : - 1];]])], + [AC_LANG_PROGRAM(, [[int i[_MIPS_SIM == _ABIN32 ? 1 : - 1];]])], [st_cv_mips_abi=n32], [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include ]], - [[int i[_MIPS_SIM == _MIPS_SIM_ABI64 ? 1 : - 1];]])], + [AC_LANG_PROGRAM(, [[int i[_MIPS_SIM == _ABI64 ? 1 : - 1];]])], [st_cv_mips_abi=n64], [st_cv_mips_abi=unknown])])])]) case "$st_cv_mips_abi" in - o32) AC_DEFINE([LINUX_MIPSO32], [1], [Define for _MIPS_SIM_ABI32.]);; - n32) AC_DEFINE([LINUX_MIPSN32], [1], [Define for _MIPS_SIM_NABI32.]);; - n64) AC_DEFINE([LINUX_MIPSN64], [1], [Define for _MIPS_SIM_ABI64.]);; + o32) AC_DEFINE([LINUX_MIPSO32], [1], [Define for _ABIO32.]);; + n32) AC_DEFINE([LINUX_MIPSN32], [1], [Define for _ABIN32.]);; + n64) AC_DEFINE([LINUX_MIPSN64], [1], [Define for _ABI64.]);; *) AC_MSG_ERROR([Unsupported _MIPS_SIM]);; esac MIPS_ABI="$st_cv_mips_abi" @@ -251,29 +253,6 @@ esac AC_DEFINE_UNQUOTED([ENABLE_ARM_OABI], [$enable_arm_oabi], [Define to 1 if you want OABI support on ARM EABI.]) -gl_WARN_ADD([-Wall]) -gl_WARN_ADD([-Wempty-body]) -gl_WARN_ADD([-Wformat-security]) -gl_WARN_ADD([-Wignored-qualifiers]) -gl_WARN_ADD([-Winit-self]) -gl_WARN_ADD([-Wlogical-op]) -gl_WARN_ADD([-Wmissing-parameter-type]) -gl_WARN_ADD([-Wnested-externs]) -gl_WARN_ADD([-Wold-style-declaration]) -gl_WARN_ADD([-Wold-style-definition]) -gl_WARN_ADD([-Wsign-compare]) -gl_WARN_ADD([-Wtype-limits]) -gl_WARN_ADD([-Wwrite-strings]) -AC_ARG_ENABLE([gcc-Werror], - [AS_HELP_STRING([--enable-gcc-Werror], [turn on gcc's -Werror option])], - [case $enableval in - yes) gl_WARN_ADD([-Werror]) ;; - no) ;; - *) AC_MSG_ERROR([bad value $enableval for gcc-Werror option]) ;; - esac] -) -AC_SUBST([WARN_CFLAGS]) - AC_C_BIGENDIAN AC_C_TYPEOF @@ -291,7 +270,6 @@ AC_CHECK_FUNCS(m4_normalize([ futimens if_indextoname open64 - pipe2 prctl preadv process_vm_readv @@ -316,12 +294,12 @@ AC_CHECK_TYPES([struct stat64, struct __old_kernel_stat],,, [#include #include ]) +AC_CHECK_TYPES([struct user_desc],,, [#include ]) + AC_CHECK_MEMBERS([struct stat.st_mtime_nsec, struct stat64.st_mtime_nsec],,, [#include #include ]) -AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec]) - AC_CHECK_TYPES(m4_normalize([ struct pt_all_user_regs, struct ia64_fpreg, @@ -347,6 +325,30 @@ AC_CHECK_MEMBERS(m4_normalize([ siginfo_t.si_overrun ]),,, [#include ]) +AC_CHECK_MEMBERS(m4_normalize([ + struct perf_event_attr.precise_ip, + struct perf_event_attr.mmap_data, + struct perf_event_attr.sample_id_all, + struct perf_event_attr.exclude_host, + struct perf_event_attr.exclude_guest, + struct perf_event_attr.exclude_callchain_kernel, + struct perf_event_attr.exclude_callchain_user, + struct perf_event_attr.mmap2, + struct perf_event_attr.comm_exec, + struct perf_event_attr.use_clockid, + struct perf_event_attr.context_switch, + struct perf_event_attr.write_backward, + struct perf_event_attr.bp_type, + struct perf_event_attr.config1, + struct perf_event_attr.config2, + struct perf_event_attr.branch_sample_type, + struct perf_event_attr.sample_regs_user, + struct perf_event_attr.sample_stack_user, + struct perf_event_attr.sample_regs_intr, + struct perf_event_attr.aux_watermark, + struct perf_event_attr.sample_max_stack +]),,, [#include ]) + AC_CHECK_HEADERS(m4_normalize([ asm/cachectl.h asm/sysmips.h @@ -354,6 +356,7 @@ AC_CHECK_HEADERS(m4_normalize([ elf.h inttypes.h linux/bsg.h + linux/dm-ioctl.h linux/dqblk_xfs.h linux/falloc.h linux/fiemap.h @@ -387,6 +390,7 @@ AC_CHECK_HEADERS(m4_normalize([ sys/shm.h sys/signalfd.h sys/xattr.h + ustat.h ])) AC_CHECK_HEADERS([asm/sigcontext.h],,, [#include ]) @@ -419,6 +423,28 @@ AC_CHECK_HEADERS([linux/bpf.h], [ AC_DEFINE(HAVE_UNION_BPF_ATTR_LOG_BUF, [1], [Define to 1 if union bpf_attr.log_buf initialization works]) fi + AC_CACHE_CHECK([whether union bpf_attr.bpf_fd initialization works], + [st_cv_have_union_bpf_attr_bpf_fd], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[union bpf_attr a = { .bpf_fd = 0 };]])], + [st_cv_have_union_bpf_attr_bpf_fd=yes], + [st_cv_have_union_bpf_attr_bpf_fd=no])]) + if test $st_cv_have_union_bpf_attr_bpf_fd = yes; then + AC_DEFINE(HAVE_UNION_BPF_ATTR_BPF_FD, [1], + [Define to 1 if union bpf_attr.bpf_fd initialization works]) + fi + AC_CACHE_CHECK([whether union bpf_attr.attach_type initialization works], + [st_cv_have_union_bpf_attr_attach_type], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[union bpf_attr a = { .attach_type = 0 };]])], + [st_cv_have_union_bpf_attr_attach_type=yes], + [st_cv_have_union_bpf_attr_attach_type=no])]) + if test $st_cv_have_union_bpf_attr_attach_type = yes; then + AC_DEFINE(HAVE_UNION_BPF_ATTR_ATTACH_TYPE, [1], + [Define to 1 if union bpf_attr.attach_type initialization works]) + fi ]) AC_CHECK_TYPES([struct statfs], [ @@ -479,8 +505,10 @@ AC_CHECK_DECLS(m4_normalize([ AC_CHECK_DECLS(m4_normalize([ LO_FLAGS_READ_ONLY, + LO_FLAGS_USE_AOPS, LO_FLAGS_AUTOCLEAR, - LO_FLAGS_PARTSCAN + LO_FLAGS_PARTSCAN, + LO_FLAGS_DIRECT_IO ]),,, [#include ]) AC_CHECK_DECLS(m4_normalize([ @@ -631,6 +659,7 @@ AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64], AC_CHECK_SIZEOF([long]) AC_CHECK_SIZEOF([long long]) AC_CHECK_SIZEOF([off_t],,[#include ]) +AC_CHECK_SIZEOF([kernel_long_t],,[#include "$srcdir/kernel_types.h"]) AC_CHECK_SIZEOF([struct i64_i32],,[struct i64_i32 {long long i64; int i32;};]) AC_CACHE_CHECK([for SIGRTMIN], [st_cv_SIGRTMIN], @@ -770,6 +799,9 @@ fi st_MPERS([m32], [aarch64|powerpc64|sparc64|tile|x32|x86_64]) st_MPERS([mx32], [x86_64]) +AX_VALGRIND_DFLT([sgcheck], [off]) +AX_VALGRIND_CHECK + AC_CONFIG_FILES([Makefile tests/Makefile tests-m32/Makefile diff --git a/copy_file_range.c b/copy_file_range.c index 8e711d1e0..ad858a99f 100644 --- a/copy_file_range.c +++ b/copy_file_range.c @@ -42,7 +42,7 @@ SYS_FUNC(copy_file_range) printnum_int64(tcp, tcp->u_arg[3], "%" PRId64); tprints(", "); /* size_t len */ - tprintf("%lu, ", tcp->u_arg[4]); + tprintf("%" PRI_klu ", ", tcp->u_arg[4]); /* unsigned int flags */ tprintf("%u", (unsigned int) tcp->u_arg[5]); diff --git a/count.c b/count.c index 1393b6e4e..4b333bf3c 100644 --- a/count.c +++ b/count.c @@ -53,17 +53,16 @@ count_syscall(struct tcb *tcp, const struct timeval *syscall_exiting_tv) struct timeval wtv; struct timeval *tv = &wtv; struct call_counts *cc; - unsigned long scno = tcp->scno; - if (!SCNO_IN_RANGE(scno)) + if (!scno_in_range(tcp->scno)) return; if (!counts) counts = xcalloc(nsyscalls, sizeof(*counts)); - cc = &counts[scno]; + cc = &counts[tcp->scno]; cc->calls++; - if (tcp->u_error) + if (syserror(tcp)) cc->errors++; /* tv = wall clock time spent while in syscall */ diff --git a/debian/.gitignore b/debian/.gitignore deleted file mode 100644 index 8132460c6..000000000 --- a/debian/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/changelog diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..c4a21b85d --- /dev/null +++ b/debian/changelog @@ -0,0 +1,931 @@ +strace (4.16-1) experimental; urgency=low + + * strace 4.16 snapshot. + + -- Strace Wed, 15 Feb 2017 11:38:25 -0800 + +strace (4.15-1) unstable; urgency=medium + + * New upstream version. + + -- Dmitry V. Levin Tue, 14 Dec 2016 08:09:10 +0000 + +strace (4.14-1) unstable; urgency=medium + + * New upstream version. + + -- Dmitry V. Levin Tue, 04 Oct 2016 18:19:20 +0000 + +strace (4.13-1) unstable; urgency=medium + + * New upstream version. + + -- Dmitry V. Levin Tue, 26 Jul 2016 16:17:18 +0000 + +strace (4.12-3) unstable; urgency=medium + + * Fix up 32/64-bit test output in strace -S test to fix i386 build + * Run make check with VERBOSE=1 so we get useful information in build logs + + -- Steve McIntyre <93sam@debian.org> Sat, 04 Jun 2016 02:37:44 +0100 + +strace (4.12-2) unstable; urgency=medium + + * Remove libunwind dependency. Closes: #826223 + + -- Steve McIntyre <93sam@debian.org> Fri, 03 Jun 2016 13:43:44 +0100 + +strace (4.12-1) unstable; urgency=low + + [ Dmitry V. Levin ] + * New upstream version. + + implemented simultaneous use of -p option and tracing of a command, + closes: #549942 + + fixed decoding of syscalls unknown to the kernel on s390/s390x, + closes: #485979 + + -- Dmitry V. Levin Tue, 31 May 2016 11:12:13 +0000 + +strace (4.11-1) unstable; urgency=low + + [ Dmitry V. Levin ] + * New upstream version. + + fixed decoding of path argument of umount2 syscall, closes: #785050 + + [ Steve McIntyre ] + * Drop patches against old upstream - all upstream now. + * Add simple upstream patch to fix printing of 32-bit times syscall + return value on 64-bit architectures. + + -- Steve McIntyre <93sam@debian.org> Fri, 08 Jan 2015 00:52:05 +0000 + +strace (4.10-3) unstable; urgency=medium + + * Really fix mips* builds - fix sys_syscall() handling. + Closes: #781753 + * Clean up strace64.substvars at clean time + * Remove ancient changelog entries that annoy lintian + * Update Standards-Version to 3.9.6 (no changes needed) + + -- Steve McIntyre <93sam@debian.org> Wed, 08 Jul 2015 23:44:03 +0100 + +strace (4.10-2) unstable; urgency=medium + + * Fix building on arm64 using patches from upstream. Closes: #790770 + * Fix various test suite failures using patches from upstream. + Closes: #781040 + * Fix mips o32 build. Thanks to Arturo Borrero Gonzalez + for tracking this. + * Add build-dependency on gawk for the test suite. Closes: #780992 + + -- Steve McIntyre <93sam@debian.org> Thu, 02 Jul 2015 02:03:25 +0100 + +strace (4.10-1) unstable; urgency=low + + [ Dmitry V. Levin ] + * New upstream version. + + enhanced ioctl decoding, closes: #692913 + + enabled mips64el build, closes: #773375 + + updated signal and errno numbers, closes: #768642 + + updated generic and added arch-specific PTRACE_* constants, + closes: #734554 + + -- Steve McIntyre <93sam@debian.org> Sat, 21 Mar 2015 22:18:25 +0000 + +strace (4.9-2) unstable; urgency=medium + + * Turn on support for ppc64el, code is already in upstream. + Closes: #744121. + + -- Steve McIntyre <93sam@debian.org> Wed, 20 Aug 2014 18:00:20 +0100 + +strace (4.9-1) unstable; urgency=medium + + [ Dmitry V. Levin ] + * New upstream version. + + added -w option to produce stats on syscall latency, closes: #457497 + + applied miscellaneous corrections to the manpage, closes: #725987 + + fixed a typo in package description, closes: #697625 + + enabled or1k build, closes: #742235 + + enabled maximum security hardening, thanks to Markus + + [ Steve McIntyre ] + * New maintainer. Thanks to Frederik for all his prior work! + + -- Steve McIntyre <93sam@debian.org> Wed, 20 Aug 2014 15:11:36 +0100 + +strace (4.8-1.1) unstable; urgency=low + + * NMU + * Uploading 4.8 to unstable to fix long-standing bugs that have been + fixed for ages in experimental only. + * enable arm64 build, Closes: #749956 + * enable x32 build, Closes: #727018 + * lintian-inspired fixes: + + add build-arch and build-indep targets in debian/rules + + update standards-version to 3.9.5 + + remove ancient changelog entries causing syntax checker errors + + add hardening using buildflags.mk + + trivial changes to Description: fields + + -- Steve McIntyre <93sam@debian.org> Thu, 10 Jul 2014 14:22:18 +0000 + +strace (4.8-1) experimental; urgency=low + + * New upstream version. + + Added aarch64 support, closes: #693074 + + Fixed kernel release string parsing, closes: #702309 + + -- Dmitry V. Levin Mon, 03 Jun 2013 15:16:17 +0000 + +strace (4.7-1) experimental; urgency=low + + [ Dmitry V. Levin ] + * New upstream version. + + Fixed sockaddr_un.sun_path name in decoded output, closes: #554946 + + Avoid potential core file clobbering on exit, closes: #656398 + + Fixed a typo in documentation, closes: #653309 + + -- Frederik Schüler Tue, 12 Feb 2013 10:35:22 +0100 + +strace (4.6-1) unstable; urgency=low + + * New upstream version. + + Added HDIO_* ioctl names, closes: #450953 + + Fixed stat64 decoding on mips, closes: #599028 + + Fixed misleading italics in the manual page, closes: #589323 + + -- Dmitry V. Levin Mon, 14 Mar 2011 15:16:17 +0000 + +strace (4.5.20-2.3) unstable; urgency=low + + * Non-maintainer upload. + * Add sh4 to arch list. + * Add powerpcspe to arch list (Closes: #579842). + + -- Nobuhiro Iwamatsu Tue, 22 Mar 2011 09:03:49 +0900 + +strace (4.5.20-2.2) unstable; urgency=low + + * Non-maintainer upload. + * Add sh4 to arch list (Closes: #537105). + + -- Nobuhiro Iwamatsu Wed, 09 Mar 2011 09:22:01 +0900 + +strace (4.5.20-2.1) unstable; urgency=low + + * NMU, added armhf support. (Closes: #596960) + + -- Konstantinos Margaritis Thu, 24 Feb 2011 14:47:54 +0000 + +strace (4.5.20-2) unstable; urgency=low + + * Add missing sparc syscall defines to fix FTBFS on sparc. + + -- Frederik Schüler Tue, 04 May 2010 14:31:46 +0200 + +strace (4.5.20-1) unstable; urgency=low + + [ Dmitry V. Levin ] + * New upstream version. + + Corrected decoding of 64bit syscalls, closes: #570603 + + Corrected getsockopt decoding on architectures where + sizeof(long) > sizeof(int), closes: #494844 + + Corrected decoding of epoll_pwait, closes: #513014 + + Implemented -C option to combine regular and -c output, closes: #466196 + + [ Frederik Schüler ] + * Update standards-version to 3.8.4. + * debian/rules: allow parallel building. + * debian/rules: comment out verbose build, only needed for debugging. + * debian/rules: clean up clean: target, dh_clean does most of the work + already. + * debian/rules: use *-stamp instead of stamp-*, so dh_clean can tidy + up for us. + + -- Frederik Schüler Tue, 13 Apr 2010 13:02:57 +0200 + +strace (4.5.19-2) unstable; urgency=low + + * Add sparc64 to the architectures list, closes: #560062 + * Fix FTBFS, thanks to Aurelien Jarno for pointing + out the solution. Closes: #560516 + * Rebuild as normal package, closes: #566968 + * Update standards-version to 3.8.3. + * Lower package priority to optional, matching the archive override. + * Add watch file. + + -- Frederik Schüler Tue, 26 Jan 2010 12:20:51 +0100 + +strace (4.5.19-1) unstable; urgency=low + + [ Dmitry V. Levin ] + * New upstream release. + + Fixed FTBFS on armel, closes: #520084, #535564 + + Marked sendfile(2) as a network syscall, closes: #509499 + + Fixed syscall numbers for tee and sync_file_range, closes: #503124 + + Corrected accept(2) decoding, closes: #507573 + + Changed strace to exit/kill with traced process + exitcode/signal, closes: #37665 + + [ Frederik Schüler ] + * Move myself from uploaders to maintainers, and drop Roland from the list, + closes: #521458 + * Apply hppa fixes, thanks to Carlos O'Donell + and Helge Deller for the fixes, closes: #546619, #437928 + * Update standards-version to 3.8.1. + + -- Frederik Schüler Mon, 05 Oct 2009 22:39:54 +0200 + +strace (4.5.18-1) unstable; urgency=low + + * New upstream release, closes: #515655 + + Fix FTBFS, closes: #518852 + * Backported patch from CVS: Fix support for NUL-terminated + string, closes: #508484 + * Build-depend on debhelper (>= 7.0.0). + + -- Frederik Schüler Mon, 09 Mar 2009 14:39:42 +0100 + +strace (4.5.17+cvs080723-2) unstable; urgency=low + + * Pull Fix for sparc FTBFS from CVS, closes: #492774 + * Make strace64 priority extra. + + -- Frederik Schüler Sat, 02 Aug 2008 10:36:59 +0200 + +strace (4.5.17+cvs080723-1) unstable; urgency=low + + * New upstream cvs snapshot. + - fixes arm and armel FTBFS. + + -- Frederik Schüler Wed, 23 Jul 2008 15:23:22 +0200 + +strace (4.5.17-1) unstable; urgency=low + + * New upstream release. + + -- Frederik Schüler Sat, 19 Jul 2008 21:38:30 +0200 + +strace (4.5.16+cvs20080708-2) unstable; urgency=low + + * Rerun autotools in correct order. + * Add strace64 package on i386, powerpc, s390 and sparc, + closes: #491167, #491188 + + -- Frederik Schüler Thu, 17 Jul 2008 17:21:27 +0200 + +strace (4.5.16+cvs20080708-1) unstable; urgency=low + + * New upstream snapshot. + + Fix chmod/chown typo in debian/rules, closes: #459255. + + Install strace-graph too, closes: 469068. + + Fix m68k build, closes: 456879. + + Arm updates, closes: #441000. + + fix build on mips/mipsel, closes: #448802. + + show poll() parameters before blocking, closes: #369651. + + use dh_strip instead of install -s, closes: #438055, #396682. + + fix sparc build, closes: #469379. + * Acknowledge NMU, closes: #469380. + * Remove Wichert Akkerman from uploaders list. + * Bump standards version to 3.8.0. + - Add Homepage field. + * Add dh_md5sums call, closes: #439428. + * Fix dpkg-gencontrol call. + * Update debian/copyright. + + -- Frederik Schüler Tue, 01 Jul 2008 23:05:51 +0200 + +strace (4.5.16-1) unstable; urgency=low + + * New upstream version. + + 64-bit builds, closes: #435303. + + LFS build fix, closes: #385310. + + Fix multithread issues + + Fix spurious SIGSTOP on early interrupt. + + Fix utime for biarch. + + Fix -u error message. + + Better futex syscall printing. + + Fix argv/envp printing with small -s settings, and for biarch. + + New syscalls: getcpu, eventfd, timerfd, signalfd, epoll_pwait, + move_pages, utimensat. + + -- Roland McGrath Fri, 03 Aug 2007 03:24:21 -0700 + +strace (4.5.15-1) unstable; urgency=high + + [ Roland McGrath ] + * New upstream version. + + Fix -ff -o behavior, closes: #353935. + + Fail when nonoption args follow -p switches, closes: #361302. + + Fix semtimedop, closes: #340239. + + ARM support fixes, closes: #360152, #360154. + + [ Frederik Schüler ] + * Fix configure script, closes: #428997 + + -- Frederik Schüler Fri, 22 Jun 2007 16:28:08 +0000 + +strace (4.5.14-2) unstable; urgency=low + + * New comaintainer. + * Fix build failure with linux-2.6.18, thanks to Andreas Henriksson for the + patch, closes: #392556. + * Fix build with libc6 2.5. + * Acknowledge NMUs, closes: #315500, #355733 + + -- Frederik Schüler Thu, 26 Oct 2006 22:11:25 +0200 + +strace (4.5.14-1) unstable; urgency=low + + * New upstream version. + + Fix crash in printing sysctl, closes: #339117. + + Respect DEB_BUILD_OPTIONS=nostrip, closes: #325132. + + Fix ipc syscall decoding, closes: #340239. + + Add missing source files to tarball, closes: #336197. + + Build on armeb, closes: #335681. + + -- Roland McGrath Mon, 16 Jan 2006 22:17:38 -0800 + +strace (4.5.13-1) unstable; urgency=low + + * New upstream version. + + Fix m68k build, closes: #315500. + + Fix setsockopt decoding on 64-bit. + + Fix typos in socket option name strings. + + Display more IPV6 socket options by name. + + Don't display inappropriate syscalls for -e trace=file. + + New selector type -e trace=desc for file-descriptor using calls. + + Fix 32-bit old_mmap syscall decoding on x86-64. + + Fix errors detaching from multithreaded process on interrupt. + + Note 4.5.12 fix for crash handling bad signal numbers. + + -- Roland McGrath Wed, 3 Aug 2005 04:41:49 -0700 + +strace (4.5.12-1) unstable; urgency=low + + * New upstream version. + + Build on ppc64, closes: #301089. + + Refuse negative -s argument value, closes: #303256. + + Fix known syscall recognition for IA32 processes on x86-64. + + Fix bad output for ptrace on x86-64. + + Fix potential buffer overruns. + + Make some diagnostics more consistent. + + Update PowerPC system calls. + + Better printing for Linux aio system calls. + + Don't truncate statfs64 fields to 32 bits in output. + + Cosmetic code cleanups. + + -- Roland McGrath Wed, 8 Jun 2005 13:52:39 -0700 + +strace (4.5.11-1) unstable; urgency=low + + * New upstream version. + + Update MIPS system call table, closes: #256684. + + Fix build on s390 and sparc, closes: #294172, #293564. + + Fix select handling on nonstandard fd_set sizes, closes: #65654, #284290. + + Don't print errors for null file name pointers, closes: #63093. + + Fix initial execve output with -i. + + Fix build nits, closes: #300598. + + -- Roland McGrath Tue, 22 Mar 2005 15:12:22 -0800 + +strace (4.5.9-1) unstable; urgency=low + + * New upstream version. + + Fix potential crash in getxattr printing, closes: #283704. + + Improve socket ioctl printing, closes: #192164. + + Fix sparc build, closes: #278449. + + Update ia64 syscall list. + + Fix x86_64 syscall argument extraction for 32-bit processes. + + Fix -e signal=NAME parsing. + + Fix x86_64 exit_group syscall handling. + + Improve mount flags printing. + + Support symbolic printing of x86_64 arch_prctl parameters. + + Add strace-udeb package for Debian installer debugging, closes: #268294. + + -- Roland McGrath Fri, 4 Feb 2005 01:53:01 -0800 + +strace (4.5.8-1) unstable; urgency=low + + * New upstream version. + + Fix strace64 man page symlink, closes: #269220. + + Update syscall tables for Alpha, ARM, HPPA, closes: #273887. + + Build strace64 for s390, closes: #271500. + + Fix some endian issues in 64-bit argument output on 32-bit machines. + + Support new Linux syscalls mbind, set_mempolicy, get_mempolicy, waitid. + + Support Linux syscalls fadvise64, fadvise64_64, and epoll_*. + + Improve ioctl command name matching. + + Print RTC_* ioctl structure contents. + + Support newer RLIMIT_* values. + + Print struct cmsghdr details in sendmsg. + + -- Roland McGrath Tue, 19 Oct 2004 18:05:28 -0700 + +strace (4.5.7-1) unstable; urgency=low + + * New upstream version. + + Update man page about -c, closes: #254438. + + Include pread/pwrite calls in -e read/write tracing, closes: #239947. + + Update SO_* and IP_* value lists, closes: #171653. + + Print attribute values in *xattr system calls. + + Print clock_t values symbolically in Linux clock_* system calls. + + Show PER_* values correctly, closes: #40588. + + Fix `strace64' build on sparc, closes: #254728. + + -- Roland McGrath Tue, 31 Aug 2004 01:41:19 -0700 + +strace (4.5.6-1) unstable; urgency=low + + * New upstream version. + + Update Linux ioctl lists and decode some more network ioctls. + + Fix `quotactl' argument decoding on 64-bit. + + Linux/SPARC64 support, closes: #254728. + + -- Roland McGrath Mon, 12 Jul 2004 00:18:32 -0700 + +strace (4.5.5-1) unstable; urgency=low + + * New upstream version. + + Fix support for 32-bit (i386) binaries on Linux/AMD64. + + -- Roland McGrath Sun, 27 Jun 2004 22:19:15 -0700 + +strace (4.5.4-1) unstable; urgency=low + + * Build package on amd64, closes: #246568. + * New upstream version. + + Recognize more PF_* and AF_* values, closes: #250506. + + Other fixes. + + -- Roland McGrath Thu, 3 Jun 2004 19:35:37 -0700 + +strace (4.5.3-1) unstable; urgency=low + + * New upstream version. + + Finish fix for -f on Linux/S390(x). + + Print extra wait status bits, closes: #240062. + + -- Roland McGrath Fri, 16 Apr 2004 15:27:43 -0700 + +strace (4.5.2-1) unstable; urgency=low + + * New upstream version. + + Check for errors writing to -o file, closes: #218762 + + Print multiple ioctl code matches on Linux. + + Various other fixes. + + Update typos and obsolete bits in man page, closes: #217008, #223390 + + Fix compilation problems with newer kernel headers, closes: #223207 + + Update HPPA system calls, closes: #231632 + + Fix PID in messages, closes: #229802 + + Fix s390 brokenness in 4.5, closes: #226098 + + -- Roland McGrath Mon, 1 Mar 2004 22:44:55 -0800 + +strace (4.5-1) unstable; urgency=low + + * New upstream version. + + Fix mlock syscall printing. + + MIPS & S390 updates. + + Print names for SIGRT_* in sets. + + -- Roland McGrath Wed, 24 Sep 2003 15:20:18 -0700 + +strace (4.4.99-1) unstable; urgency=low + + * New upstream version. + + Alpha updates. + + Add a few more new Linux 2.5 system calls. + + Stephen Thomas contributed a port to Linux/SH64. + + Print protocol names for PF_INET6 sockets. + + -- Roland McGrath Thu, 17 Jul 2003 02:04:43 -0700 + +strace (4.4.98-1) unstable; urgency=low + + * New upstream version. + + Fixes clone argument bugs. + + Fixes sem* printing bugs. + + Fixes -e argument parsing, closes: #188379. + + Fixes hanging parent in odd wait cases, closes: #47608, #109656. + + Fixes -q defaulting, closes: #47113, #153678. + + Fixes trying to execute directories, closes: #137103. + + Updates ARM support, thanks to Russell King. + + Updates S390/S390x support. + * Bump standards-version to 3.5.10 + + -- Roland McGrath Mon, 2 Jun 2003 12:26:29 -0700 + +strace (4.4.96-1) unstable; urgency=low + + * New upstream version. + + Handles yet more new Linux 2.5 system calls. + + Fixes x86_64 and ia64 clone printing. + + Updates SH port. + + -- Roland McGrath Sun, 30 Mar 2003 17:14:34 -0800 + +strace (4.4.95-1) unstable; urgency=low + + * New upstream version. + + Fixes printing of getresuid and getresgid values. + + -- Roland McGrath Mon, 24 Feb 2003 02:50:43 -0800 + +strace (4.4.94-1) unstable; urgency=low + + * New upstream version. + + New option -E to set environment variables. + + Build fixes for sparc, closes: #178636. + + -- Roland McGrath Wed, 19 Feb 2003 19:12:40 -0800 + +strace (4.4.93-1) unstable; urgency=low + + * New upstream version. + + Grok new quotactl arguments, closes: #154067. + + Fix m68k build problem, closes: #176528. + + Old bugs prior release actually closes: #154068. + + Fix S390 bugs with -f, and bugs with execve. + * Switched to non-native packaging (empty .diff), closes: #176388. + + -- Roland McGrath Tue, 21 Jan 2003 12:22:08 -0800 + +strace (4.4.92-1) unstable; urgency=low + + * New upstream version. + + Updated config.guess and config.sub, closes: #176241. + + Several fixes for PPC, closes: #144326. + + Fixed ptrace output for unknown requests, closes: #77728. + + Fixed output of getdents64, truncate64, ftruncate64, closes: #169528. + + Old bugs the last release actually closes: #153750, #38467, #109993, + #109815, #104594, #113087, #134803, #166622, #96356, #94725, #32147, + #32798, #36801, #41066, #81637, #138300, #143791. + + -- Roland McGrath Tue, 14 Jan 2003 02:02:44 -0800 + +strace (4.4.91-1) unstable; urgency=low + + * New upstream version. + + Fixes -f on x86-64. + + -- Roland McGrath Fri, 10 Jan 2003 12:55:34 -0800 + +strace (4.4.90-1) unstable; urgency=low + + * New maintainer. + * New upstream version. + + -- Roland McGrath Fri, 10 Jan 2003 01:58:40 -0800 + +strace (4.4-1.2) unstable; urgency=low + + * NMU + * Quick one-liner to allow building on the ARM. Closes: #109993. + * Re-ran autoconf, hopefully I didn't break other arches. + + -- Anand Kumria Mon, 1 Oct 2001 14:22:25 +1000 + +strace (4.4-1.1) unstable; urgency=low + + * NMU. + * Added patch from David Mosberger which fixes some ia64 issues. + Closes: #113087. + * Added ia64-specific Build-Depends on libc6.1-dev. Closes: + #109815. + * Ran autoheader, so the s390 patch applies. Closes: #104594. + + -- Jeff Licquia Tue, 25 Sep 2001 13:15:28 -0500 + +strace (4.4-1) unstable; urgency=low + + * New upstream version + + Added S390 support. Closes: Bug#104594 + + New config.{guess,sub}. Closes: Bug#92532 + + LFS support for Linux/sparc. Closes: Bug#99215 + * Works on IA64 again. Closes: Bug#103854 + * Don't override CFLAGS in debian/rules + * Remove rules to create configure & friends. Closes: Bug#92483 + + -- Wichert Akkerman Sun, 19 Aug 2001 14:10:58 +0200 + +strace (4.3-3.1) unstable; urgency=low + + * copy in new config.{guess,sub} to get support for new architectures. + Closes: #94725 + + -- LaMont Jones Mon, 9 Jul 2001 21:39:34 -0600 + +strace (4.3-3) unstable; urgency=low + + * Update architecture list + + -- Wichert Akkerman Sat, 14 Apr 2001 10:42:19 +0200 + +strace (4.3-2) unstable; urgency=low + + * Run cvsbuild so we don't need to run autohead & friends + * Sync to current CVS + + -- Wichert Akkerman Fri, 13 Apr 2001 19:08:53 +0200 + +strace (4.3-1) unstable; urgency=low + + * New upstream version + * Updated Build-Depends to use a recent glibc so we get the 2.4 kernel + headers + * Changed Architecture so we only build on Linux + * Include section and priority in control info + + -- Wichert Akkerman Sun, 1 Apr 2001 16:35:32 +0200 + +strace (4.2-4) frozen unstable; urgency=low + + * Actually install postinst and prerm so we get the proper /usr/doc/strace + symlink + + -- Wichert Akkerman Thu, 17 Feb 2000 21:49:17 +0100 + +strace (4.2-3) frozen unstable; urgency=low + + * Fix typo in aclocal.m4 that prevented compilation on architectures without + LFS + + -- Wichert Akkerman Sun, 13 Feb 2000 01:19:11 +0100 + +strace (4.2-2) frozen unstable; urgency=low + + * only include linux/ptrace.h if sys/reg.h hasn't been found by configure, + Closes: Bug# 39556 + + -- Wichert Akkerman Thu, 27 Jan 2000 03:22:55 +0100 + +strace (4.2-1) frozen unstable; urgency=low + + * New upstream version: + + Builds correctly on glibc2.0 again, Closes: Bug# 51648 + + Small y2k fix in printtimes, Closes: Bug# 54592 + + semop is handled now, Closes: Bug# 52684 + + -- Wichert Akkerman Fri, 21 Jan 2000 21:45:41 +0100 + +strace (4.1-1) unstable; urgency=low + + * New upstream version + * Bump standards-version to 3.1.0 + * FHS 2.1 compliant + + -- Wichert Akkerman Fri, 26 Nov 1999 01:42:07 +0100 + +strace (4.0-1) unstable; urgency=low + + * New upstream version + + -- Wichert Akkerman Fri, 9 Jul 1999 16:12:34 +0200 + +strace (3.99.1-1) unstable; urgency=low + + * New upstream version, second pre-release for 4.0 + + -- Wichert Akkerman Wed, 9 Jun 1999 15:20:42 +0200 + +strace (3.99-1) unstable; urgency=low + + * New upstream maintainer (me :) + * New upstream version, pre-release for strace 4.0 + * See upstream changelog for changes + * Build with glibc2.1 + + -- Wichert Akkerman Tue, 27 Apr 1999 14:00:15 +0200 + +strace (3.1.0.1-12) unstable; urgency=low + + * Only i386 has a LDT, so check for architecture in mem.c (Bug# 32798) + * Check for nsignals properly, closes: #34445 + * Fix check for overruns in umove*, patch by Nate Eldredge + + -- Wichert Akkerman Mon, 15 Mar 1999 00:43:14 +0100 + +strace (3.1.0.1-11) unstable; urgency=low + + * Merge some ARM stuff that got stuck in my mailbox + + -- Wichert Akkerman Sun, 31 Jan 1999 13:04:13 +0100 + +strace (3.1.0.1-10) unstable; urgency=low + + * Move sys_poll to the DONE section in linux/dummy.h + * Support subarchitectures for alpha (Bug# 32147) + * Incorporate changes from Ulrich Drepper + + up number of supported personalities on Linux sparc to 3 + + add O_DIRECT, O_LARGEFILE and O_DIRECTORY to openmodes + + change prefix for printxval to SEEK_ in sys_lseek + + add a support for a whole bunch of syscalls + + updated sys_pread and sys_pwrite for SVR4 + + handle sys_delete_module properly + + change SYS_socket_subcall to 230 for non-powerpc architectures + + sys_chown is now lchown + + looks like a whole lot of syscalls is moved from 180 to 230 + + Revamp a lot of the signal handling code + + handle sys_clone + + Lots more (it was a 6494-line patch and I'm too lazy to put all + changes in here..) + * Please note you need to have 2.1 or 2.2 kernel sources in /usr/src/linux + in order to compile this. + + -- Wichert Akkerman Fri, 29 Jan 1999 02:04:12 +0100 + +strace (3.1.0.1-9) unstable; urgency=low + + * Add support for poll() systemcall + + -- Wichert Akkerman Thu, 31 Dec 1998 16:03:44 +0100 + +strace (3.1.0.1-8) frozen unstable; urgency=low + + * Use new_stat from libc6 now, except for powerpc and sparc + + -- Wichert Akkerman Thu, 24 Dec 1998 11:35:32 +0100 + +strace (3.1.0.1-7) frozen unstable; urgency=low + + * Fix sparc support + * Display nanosleep call correctly (Bug# 25904) + * Honour -v flag in printargs (Bug# 10426) + * Play with #define to get proper kernel struct stat + * Compile with 2.1.131 kernel source + + -- Wichert Akkerman Sat, 19 Dec 1998 15:02:14 +0100 + +strace (3.1.0.1-6) frozen unstable; urgency=low + + * Set NSIG correctly for ARM + * Include strace-graph script from Richard Braakman + as an example. Try it and be amazed! + * Fix sigaction problem, patch from Topi Miettinen + + + -- Wichert Akkerman Mon, 7 Dec 1998 02:10:30 +0100 + +strace (3.1.0.1-5) unstable; urgency=low + + * Patched from Richard Braakman : + + use correct dirent.h on Linux + + remove debugging code left from the powerpc patch + + fix output for execve when -v is used + + -- Wichert Akkerman Fri, 13 Nov 1998 15:59:17 +0100 + +strace (3.1.0.1-5) unstable; urgency=low + + * Add location of upstream sources to the copyright + * Merged ARM architecture support from Jim Studt + + -- Wichert Akkerman Mon, 9 Nov 1998 16:43:24 +0100 + +strace (3.1.0.1-4) unstable; urgency=low + + * More ppc patches from Daniel Jacobowitz + + -- Wichert Akkerman Mon, 12 Oct 1998 00:59:44 +0200 + +strace (3.1.0.1-3) unstable; urgency=low + + * Added support for sys_query_module, patch from Brian J. Murrell + + * Preserve timestamps for documentation when installed + * Incorporate patches from Daniel Jacobowitz : + + powerpc patches + + Patches include changing SYS_socket_subcall and SYS_ipc_subcall, + check for stray syscall exit after execv, and completely regenerated + syscall, errno, and ioctl lists. + + Decode capget and capset arguments. + + -- Wichert Akkerman Sun, 11 Oct 1998 22:42:56 +0200 + +strace (3.1.0.1-2) unstable; urgency=low + + * Patch to support sparc, courtesy of RedHat + * Cleaned up some stuff the patch left broken + * Fix some more compilation-issues for IPX with current kernels + + -- Wichert Akkerman Fri, 24 Jul 1998 22:53:43 +0200 + +strace (3.1.0.1-1) unstable; urgency=low + + * New (actually very old) upstream version. Fixes something we + already had fixed + * Compiled with current kernel-headers from libc6-dev + * Fixed spelling-error + * Compress changelog + * Bumped standard-version to 2.4.1.0 + + -- Wichert Akkerman Wed, 22 Jul 1998 15:53:23 +0200 + +strace (3.1-14) unstable; urgency=low + + * Don't let libc6 trick us anymore with {f,l,}stat() calls + * Fix configure.in to support PentiumII processors + + -- Wichert Akkerman Mon, 22 Jun 1998 20:17:20 +0200 + +strace (3.1-13) unstable; urgency=low + + * Corrected error on PowerPC patch that broke other archictectures + (Bug# 13837) + + -- Wichert Akkerman Tue, 14 Oct 1997 15:41:29 +0200 + +strace (3.1-12) unstable; urgency=low + + * PowerPC patches by Klee Dienes (Bug# 10788, 10790) + * Create correct md5sums (Bug# 13363) + * Put changelog in correct place (Bug# 13363) + * Pristine sources + + -- Wichert Akkerman Mon, 6 Oct 1997 15:42:25 +0200 + +strace (3.1-11) unstable; urgency=low + + * Ported to libc6 / glibc2 (Bug# 11729) + * Compress manpage + + -- Wichert Akkerman Fri, 1 Aug 1997 00:13:38 +0200 + +strace (3.1-10) unstable; urgency=low + + * Install upstream changelog + * Added dependencies to control file for libc + * Added md5sums to .deb file + + -- Wichert Akkerman Fri, 11 Jul 1997 12:26:12 +0200 + +strace (3.1-9) stable; urgency=low + + * Fixed bug with hanging children. Patch by Matthias Urlichs + * Added some more constants to net.c. + * glibc patches, courtesy of Klee Dienes (Bug# 7735) + + -- Wichert Akkerman Mon, 21 Apr 1997 11:59:45 +0200 + +strace (3.1-8) frozen unstable; urgency=low + + * Added detection of ROSE networking + + -- Wichert Akkerman Tue, 12 Nov 1996 22:21:22 +0100 + +strace (3.1-7) stable; urgency=low + + * Install manpage with correct mode (0644) (Bug#4813) + * Renamed debian changelog to changelog.Debian + + -- Wichert Akkerman Sat, 26 Oct 1996 18:15:41 +0200 + +strace (3.1-6) stable; urgency=low + + * Small patch for compilation on kernels 2.1.0 and later (see signal.c) + + -- Wichert Akkerman Fri, 18 Oct 1996 00:28:47 +0200 + +strace (3.1-5) stable unstable; urgency=low + + * Moved to new packagingformat + * Fixed umoven bug (Bug# 4523) + * Corrected number of parameters for mmap systemcall (bug# 4508) + + -- Wichert Akkerman Sat, 23 Sep 1996 23:33:58 +0200 + +strace (3.1-4) unstable; urgency=low + + * Fixed changestemplate + + -- Wichert Akkerman , Thu Sep 12 14:59:44 MET DST 1996 + +strace (3.1-3) unstable; urgency=low + + * Revamped debian files + + -- Wichert Akkerman , Thu Jul 11 20:19:11 MET DST 1996 + + +strace (3.1-2) unstable; urgency=low + * Added some #ifdef's around IPX stuff to make it compilable on non-Linux + systems. + * changed debian.control and debian.rules to conform to new debian naming + schemes + * added architecture-option to debian.rules and debian.control + + -- Wichert Akkerman + +strace (3.1-1) unstable; urgency=low + + * Moved to new upstream version + * added more protocol families to domains + * added IPIP-protocol to protocols + * added MSG_PROXY and MSG_CTRUNC to msg_flags + * added SO_BSDCOMPAT and SO_REUSEPORT to sockoptions + * added IP, IPX and TCP-options + * added IP, IPX and TCP support to get-/setsockopt() + * added IPX support + + -- Wichert Akkerman diff --git a/debian/changelog.in b/debian/changelog.in index 3f4bd04ca..288cef982 100644 --- a/debian/changelog.in +++ b/debian/changelog.in @@ -4,6 +4,18 @@ strace (@PACKAGE_VERSION@-1) experimental; urgency=low -- Strace <@PACKAGE_BUGREPORT@> @DEB_CHANGELOGTIME@ +strace (4.15-1) unstable; urgency=medium + + * New upstream version. + + -- Dmitry V. Levin Tue, 14 Dec 2016 08:09:10 +0000 + +strace (4.14-1) unstable; urgency=medium + + * New upstream version. + + -- Dmitry V. Levin Tue, 04 Oct 2016 18:19:20 +0000 + strace (4.13-1) unstable; urgency=medium * New upstream version. diff --git a/debian/control b/debian/control index 570542fdf..79773c332 100644 --- a/debian/control +++ b/debian/control @@ -5,6 +5,8 @@ Priority: optional Build-Depends: libc6-dev (>= 2.2.2) [!alpha !ia64], libc6.1-dev (>= 2.2.2) [alpha ia64], gcc-multilib [amd64 i386 powerpc ppc64 s390 sparc sparc64 x32], debhelper (>= 7.0.0), gawk Standards-Version: 3.9.6 Homepage: http://sourceforge.net/projects/strace/ +Vcs-Git: https://anonscm.debian.org/git/collab-maint/strace.git +Vcs-Browser: https://anonscm.debian.org/git/collab-maint/strace.git Package: strace Architecture: alpha amd64 arm64 armeb armel armhf hppa i386 ia64 m68k mips mipsel mips64 mips64el or1k powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32 diff --git a/debian/watch b/debian/watch index 5e4f652af..8bb7f45ac 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,2 @@ version=3 -opts="uversionmangle=s/-/./g" http://sf.net/strace/strace-([[:digit:].-]*)\.tar\.xz +opts=pgpsigurlmangle=s/$/.asc/,uversionmangle=s/-/./g http://sf.net/strace/strace-([[:digit:].-]*)\.tar\.xz diff --git a/defs.h b/defs.h index 2b4118b5a..b333a2218 100644 --- a/defs.h +++ b/defs.h @@ -51,10 +51,11 @@ #include #include #include -#include +#include "kernel_types.h" #include "mpers_type.h" #include "gcc_compat.h" +#include "sysent.h" #ifndef HAVE_STRERROR const char *strerror(int); @@ -68,7 +69,12 @@ const char *strerror(int); extern char *stpcpy(char *dst, const char *src); #endif -#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) +#ifndef offsetofend +# define offsetofend(type, member) \ + (offsetof(type, member) + sizeof(((type *)NULL)->member)) +#endif + +#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]) + MUST_BE_ARRAY(a)) /* macros */ #ifndef MAX @@ -119,15 +125,6 @@ extern char *stpcpy(char *dst, const char *src); #define USE_SEIZE 1 /* To force NOMMU build, set to 1 */ #define NOMMU_SYSTEM 0 -/* - * Set to 1 to use speed-optimized vfprintf implementation. - * It results in strace using about 5% less CPU in user space - * (compared to glibc version). - * But strace spends a lot of time in kernel space, - * so overall it does not appear to be a significant win. - * Thus disabled by default. - */ -#define USE_CUSTOM_PRINTF 0 #ifndef ERESTARTSYS # define ERESTARTSYS 512 @@ -144,7 +141,8 @@ extern char *stpcpy(char *dst, const char *src); #if defined X86_64 # define SUPPORTED_PERSONALITIES 3 -# define PERSONALITY2_WORDSIZE 4 +# define PERSONALITY2_WORDSIZE 4 +# define PERSONALITY2_KLONGSIZE PERSONALITY0_KLONGSIZE #elif defined AARCH64 \ || defined POWERPC64 \ || defined RISCV \ @@ -162,12 +160,14 @@ extern char *stpcpy(char *dst, const char *src); # define DEFAULT_PERSONALITY 0 #endif -#define PERSONALITY0_WORDSIZE SIZEOF_LONG +#define PERSONALITY0_WORDSIZE SIZEOF_LONG +#define PERSONALITY0_KLONGSIZE SIZEOF_KERNEL_LONG_T #define PERSONALITY0_INCLUDE_PRINTERS_DECLS "native_printer_decls.h" #define PERSONALITY0_INCLUDE_PRINTERS_DEFS "native_printer_defs.h" #if SUPPORTED_PERSONALITIES > 1 -# define PERSONALITY1_WORDSIZE 4 +# define PERSONALITY1_WORDSIZE 4 +# define PERSONALITY1_KLONGSIZE PERSONALITY1_WORDSIZE #endif #if SUPPORTED_PERSONALITIES > 1 && defined HAVE_M32_MPERS @@ -192,24 +192,20 @@ extern char *stpcpy(char *dst, const char *src); # define PERSONALITY2_INCLUDE_FUNCS "empty.h" #endif -typedef struct sysent { - unsigned nargs; - int sys_flags; - int sen; - int (*sys_func)(); - const char *sys_name; -} struct_sysent; - typedef struct ioctlent { const char *symbol; unsigned int code; } struct_ioctlent; -#if defined LINUX_MIPSN32 || defined X32 -# define HAVE_STRUCT_TCB_EXT_ARG 1 -#else -# define HAVE_STRUCT_TCB_EXT_ARG 0 -#endif +struct inject_opts { + uint16_t first; + uint16_t step; + uint16_t signo; + int rval; +}; + +#define MAX_ERRNO_VALUE 4095 +#define INJECT_OPTS_RVAL_DEFAULT (-(MAX_ERRNO_VALUE + 1)) /* Trace Control Block */ struct tcb { @@ -217,13 +213,9 @@ struct tcb { int pid; /* If 0, this tcb is free */ int qual_flg; /* qual_flags[scno] or DEFAULT_QUAL_FLAGS + RAW */ unsigned long u_error; /* Error code */ - long scno; /* System call number */ - long u_arg[MAX_ARGS]; /* System call arguments */ -#if HAVE_STRUCT_TCB_EXT_ARG - long long ext_arg[MAX_ARGS]; - long long u_lrval; /* long long return value */ -#endif - long u_rval; /* Return value */ + kernel_ulong_t scno; /* System call number */ + kernel_ulong_t u_arg[MAX_ARGS]; /* System call arguments */ + kernel_long_t u_rval; /* Return value */ #if SUPPORTED_PERSONALITIES > 1 unsigned int currpers; /* Personality at the time of scno update */ #endif @@ -235,6 +227,7 @@ struct tcb { void (*_free_priv_data)(void *); /* Callback for freeing priv_data */ const struct_sysent *s_ent; /* sysent[scno] or dummy struct for bad scno */ const struct_sysent *s_prev_ent; /* for "resuming interrupted SYSCALL" msg */ + struct inject_opts *inject_vec[SUPPORTED_PERSONALITIES]; struct timeval stime; /* System time usage as of last process wait */ struct timeval dtime; /* Delta for system time usage */ struct timeval etime; /* Syscall entry time */ @@ -271,16 +264,19 @@ struct tcb { #define TCB_ATTACHED 0x08 /* We attached to it already */ #define TCB_REPRINT 0x10 /* We should reprint this syscall on exit */ #define TCB_FILTERED 0x20 /* This system call has been filtered out */ +#define TCB_TAMPERED 0x40 /* A syscall has been tampered with */ +#define TCB_HIDE_LOG 0x80 /* We should hide everything (until execve) */ +#define TCB_SKIP_DETACH_ON_FIRST_EXEC 0x100 /* -b execve should skip detach on first execve */ /* qualifier flags */ #define QUAL_TRACE 0x001 /* this system call should be traced */ #define QUAL_ABBREV 0x002 /* abbreviate the structures of this syscall */ #define QUAL_VERBOSE 0x004 /* decode the structures of this syscall */ #define QUAL_RAW 0x008 /* print all args in hex for this syscall */ -#define QUAL_SIGNAL 0x010 /* report events with this signal */ -#define QUAL_READ 0x020 /* dump data read on this file descriptor */ -#define QUAL_WRITE 0x040 /* dump data written to this file descriptor */ -typedef uint8_t qualbits_t; +#define QUAL_INJECT 0x010 /* tamper with this system call on purpose */ +#define QUAL_SIGNAL 0x100 /* report events with this signal */ +#define QUAL_READ 0x200 /* dump data read from this file descriptor */ +#define QUAL_WRITE 0x400 /* dump data written to this file descriptor */ #define DEFAULT_QUAL_FLAGS (QUAL_TRACE | QUAL_ABBREV | QUAL_VERBOSE) @@ -290,6 +286,7 @@ typedef uint8_t qualbits_t; #define verbose(tcp) ((tcp)->qual_flg & QUAL_VERBOSE) #define abbrev(tcp) ((tcp)->qual_flg & QUAL_ABBREV) #define filtered(tcp) ((tcp)->flags & TCB_FILTERED) +#define hide_log(tcp) ((tcp)->flags & TCB_HIDE_LOG) #include "xlat.h" @@ -301,6 +298,7 @@ extern const struct xlat msg_flags[]; extern const struct xlat open_access_modes[]; extern const struct xlat open_mode_flags[]; extern const struct xlat resource_flags[]; +extern const struct xlat sg_io_info[]; extern const struct xlat socketlayers[]; extern const struct xlat whence_codes[]; @@ -309,34 +307,14 @@ extern const struct xlat whence_codes[]; #define RVAL_HEX 001 /* hex format */ #define RVAL_OCTAL 002 /* octal format */ #define RVAL_UDECIMAL 003 /* unsigned decimal format */ -#if HAVE_STRUCT_TCB_EXT_ARG -# if 0 /* unused so far */ -# define RVAL_LDECIMAL 004 /* long decimal format */ -# define RVAL_LHEX 005 /* long hex format */ -# define RVAL_LOCTAL 006 /* long octal format */ -# endif -# define RVAL_LUDECIMAL 007 /* long unsigned decimal format */ -#endif /* HAVE_STRUCT_TCB_EXT_ARG */ #define RVAL_FD 010 /* file descriptor */ -#define RVAL_MASK 017 /* mask for these values */ +#define RVAL_MASK 013 /* mask for these values */ #define RVAL_STR 020 /* Print `auxstr' field after return val */ #define RVAL_NONE 040 /* Print nothing */ #define RVAL_DECODED 0100 /* syscall decoding finished */ -#define TRACE_FILE 001 /* Trace file-related syscalls. */ -#define TRACE_IPC 002 /* Trace IPC-related syscalls. */ -#define TRACE_NETWORK 004 /* Trace network-related syscalls. */ -#define TRACE_PROCESS 010 /* Trace process-related syscalls. */ -#define TRACE_SIGNAL 020 /* Trace signal-related syscalls. */ -#define TRACE_DESC 040 /* Trace file descriptor-related syscalls. */ -#define TRACE_MEMORY 0100 /* Trace memory mapping-related syscalls. */ -#define SYSCALL_NEVER_FAILS 0200 /* Syscall is always successful. */ -#define STACKTRACE_INVALIDATE_CACHE 0400 /* Trigger proc/maps cache updating */ -#define STACKTRACE_CAPTURE_ON_ENTER 01000 /* Capture stacktrace on "entering" stage */ -#define TRACE_INDIRECT_SUBCALL 02000 /* Syscall is an indirect socket/ipc subcall. */ - #define IOCTL_NUMBER_UNKNOWN 0 #define IOCTL_NUMBER_HANDLED 1 #define IOCTL_NUMBER_STOP_LOOKUP 010 @@ -389,7 +367,6 @@ extern bool count_wallclock; extern unsigned int qflag; extern bool not_failing_only; extern unsigned int show_fd_path; -extern bool hide_log_until_execve; /* are we filtering traces based on paths? */ extern const char **paths_selected; #define tracing_paths (paths_selected != NULL) @@ -422,30 +399,26 @@ void *xreallocarray(void *ptr, size_t nmemb, size_t size) ATTRIBUTE_ALLOC_SIZE((2, 3)); char *xstrdup(const char *str) ATTRIBUTE_MALLOC; -#if USE_CUSTOM_PRINTF -/* - * See comment in vsprintf.c for allowed formats. - * Short version: %h[h]u, %zu, %tu are not allowed, use %[l[l]]u. - */ -int strace_vfprintf(FILE *fp, const char *fmt, va_list args); -#else -# define strace_vfprintf vfprintf -#endif - extern int read_int_from_file(const char *, int *); extern void set_sortby(const char *); extern void set_overhead(int); -extern void qualify(const char *); extern void print_pc(struct tcb *); -extern int trace_syscall(struct tcb *); +extern int trace_syscall(struct tcb *, unsigned int *); extern void count_syscall(struct tcb *, const struct timeval *); extern void call_summary(FILE *); extern void clear_regs(void); extern void get_regs(pid_t pid); extern int get_scno(struct tcb *tcp); -extern const char *syscall_name(long scno); +/** + * Convert syscall number to syscall name. + * + * @param scno Syscall number. + * @return String literal corresponding to the syscall number in case latter + * is valid; NULL otherwise. + */ +extern const char *syscall_name(kernel_ulong_t scno); extern const char *err_name(unsigned long err); extern bool is_erestart(struct tcb *); @@ -467,30 +440,42 @@ static inline int set_tcb_priv_ulong(struct tcb *tcp, unsigned long val) return set_tcb_priv_data(tcp, (void *) val, 0); } -extern int umoven(struct tcb *, long, unsigned int, void *); +extern int +umoven(struct tcb *tcp, kernel_ulong_t addr, unsigned int len, void *laddr); #define umove(pid, addr, objp) \ umoven((pid), (addr), sizeof(*(objp)), (void *) (objp)) -extern int umoven_or_printaddr(struct tcb *, long, unsigned int, void *); + +extern int +umoven_or_printaddr(struct tcb *tcp, kernel_ulong_t addr, + unsigned int len, void *laddr); #define umove_or_printaddr(pid, addr, objp) \ umoven_or_printaddr((pid), (addr), sizeof(*(objp)), (void *) (objp)) -extern int umovestr(struct tcb *, long, unsigned int, char *); -extern int upeek(int pid, long, long *); + +extern int +umoven_or_printaddr_ignore_syserror(struct tcb *tcp, kernel_ulong_t addr, + unsigned int len, void *laddr); + +extern int +umovestr(struct tcb *tcp, kernel_ulong_t addr, unsigned int len, char *laddr); + +extern int upeek(int pid, unsigned long, kernel_ulong_t *); +extern int upoke(int pid, unsigned long, kernel_ulong_t); extern bool print_array(struct tcb *tcp, - const unsigned long start_addr, - const size_t nmemb, - void *const elem_buf, - const size_t elem_size, - int (*const umoven_func)(struct tcb *, - long, + kernel_ulong_t start_addr, + size_t nmemb, + void *elem_buf, + size_t elem_size, + int (*umoven_func)(struct tcb *, + kernel_ulong_t, unsigned int, void *), - bool (*const print_func)(struct tcb *, + bool (*print_func)(struct tcb *, void *elem_buf, size_t elem_size, void *opaque_data), - void *const opaque_data); + void *opaque_data); #if defined ALPHA || defined IA64 || defined MIPS \ || defined SH || defined SPARC || defined SPARC64 @@ -510,12 +495,21 @@ extern const char *xlookup(const struct xlat *, const uint64_t); extern const char *xlat_search(const struct xlat *, const size_t, const uint64_t); extern unsigned long get_pagesize(void); +extern int +string_to_uint_ex(const char *str, char **endptr, + unsigned int max_val, const char *accepted_ending); extern int string_to_uint(const char *str); +static inline int +string_to_uint_upto(const char *const str, unsigned int max_val) +{ + return string_to_uint_ex(str, NULL, max_val, NULL); +} extern int next_set_bit(const void *bit_array, unsigned cur_bit, unsigned size_bits); #define QUOTE_0_TERMINATED 0x01 #define QUOTE_OMIT_LEADING_TRAILING_QUOTES 0x02 #define QUOTE_OMIT_TRAILING_0 0x08 +#define QUOTE_FORCE_HEX 0x10 extern int string_quote(const char *, char *, unsigned int, unsigned int); extern int print_quoted_string(const char *, unsigned int, unsigned int); @@ -524,21 +518,23 @@ extern int print_quoted_string(const char *, unsigned int, unsigned int); * b refers to the higher numbered u_arg */ #ifdef WORDS_BIGENDIAN -# define LONG_LONG(a,b) \ - ((long long)((unsigned long long)(unsigned)(b) | ((unsigned long long)(a)<<32))) +# define ULONG_LONG(a,b) \ + ((unsigned long long)(unsigned)(b) | ((unsigned long long)(a)<<32)) #else -# define LONG_LONG(a,b) \ - ((long long)((unsigned long long)(unsigned)(a) | ((unsigned long long)(b)<<32))) +# define ULONG_LONG(a,b) \ + ((unsigned long long)(unsigned)(a) | ((unsigned long long)(b)<<32)) #endif extern int getllval(struct tcb *, unsigned long long *, int); extern int printllval(struct tcb *, const char *, int) ATTRIBUTE_FORMAT((printf, 2, 0)); -extern void printaddr(long); -extern void printxvals(const uint64_t, const char *, const struct xlat *, ...) +extern void printaddr(kernel_ulong_t addr); +extern int printxvals(const uint64_t, const char *, const struct xlat *, ...) ATTRIBUTE_SENTINEL; -extern long long getarg_ll(struct tcb *tcp, int argn); -extern unsigned long long getarg_ull(struct tcb *tcp, int argn); +extern int printxval_searchn(const struct xlat *xlat, size_t xlat_size, + uint64_t val, const char *dflt); +#define printxval_search(xlat__, val__, dflt__) \ + printxval_searchn(xlat__, ARRAY_SIZE(xlat__), val__, dflt__) extern int printargs(struct tcb *); extern int printargs_u(struct tcb *); extern int printargs_d(struct tcb *); @@ -550,53 +546,30 @@ extern const char *sprinttime(time_t); extern void print_symbolic_mode_t(unsigned int); extern void print_numeric_umode_t(unsigned short); extern void print_numeric_long_umask(unsigned long); -extern void dumpiov_in_msghdr(struct tcb *, long, unsigned long); -extern void dumpiov_in_mmsghdr(struct tcb *, long); -extern void dumpiov_upto(struct tcb *, int, long, unsigned long); -#define dumpiov(tcp, len, addr) \ - dumpiov_upto((tcp), (len), (addr), (unsigned long) -1L) -extern void dumpstr(struct tcb *, long, int); -extern void printstr_ex(struct tcb *, long addr, long len, - unsigned int user_style); -extern bool printnum_short(struct tcb *, long, const char *) - ATTRIBUTE_FORMAT((printf, 3, 0)); -extern bool printnum_int(struct tcb *, long, const char *) - ATTRIBUTE_FORMAT((printf, 3, 0)); -extern bool printnum_int64(struct tcb *, long, const char *) - ATTRIBUTE_FORMAT((printf, 3, 0)); - -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 -extern bool printnum_long_int(struct tcb *, long, const char *, const char *) - ATTRIBUTE_FORMAT((printf, 3, 0)) - ATTRIBUTE_FORMAT((printf, 4, 0)); -# define printnum_slong(tcp, addr) \ - printnum_long_int((tcp), (addr), "%" PRId64, "%d") -# define printnum_ulong(tcp, addr) \ - printnum_long_int((tcp), (addr), "%" PRIu64, "%u") -# define printnum_ptr(tcp, addr) \ - printnum_long_int((tcp), (addr), "%#" PRIx64, "%#x") -#elif SIZEOF_LONG > 4 -# define printnum_slong(tcp, addr) \ - printnum_int64((tcp), (addr), "%" PRId64) -# define printnum_ulong(tcp, addr) \ - printnum_int64((tcp), (addr), "%" PRIu64) -# define printnum_ptr(tcp, addr) \ - printnum_int64((tcp), (addr), "%#" PRIx64) -#else -# define printnum_slong(tcp, addr) \ - printnum_int((tcp), (addr), "%d") -# define printnum_ulong(tcp, addr) \ - printnum_int((tcp), (addr), "%u") -# define printnum_ptr(tcp, addr) \ - printnum_int((tcp), (addr), "%#x") -#endif +extern void print_dev_t(unsigned long long dev); + +extern void +dumpiov_in_msghdr(struct tcb *, kernel_ulong_t addr, kernel_ulong_t data_size); + +extern void +dumpiov_in_mmsghdr(struct tcb *, kernel_ulong_t addr); + +extern void +dumpiov_upto(struct tcb *, int len, kernel_ulong_t addr, kernel_ulong_t data_size); + +extern void +dumpstr(struct tcb *, kernel_ulong_t addr, int len); + +extern void +printstr_ex(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len, + unsigned int user_style); + +extern void +printpathn(struct tcb *, kernel_ulong_t addr, unsigned int n); + +extern void +printpath(struct tcb *, kernel_ulong_t addr); -extern bool printpair_int(struct tcb *, long, const char *) - ATTRIBUTE_FORMAT((printf, 3, 0)); -extern bool printpair_int64(struct tcb *, long, const char *) - ATTRIBUTE_FORMAT((printf, 3, 0)); -extern void printpath(struct tcb *, long); -extern void printpathn(struct tcb *, long, unsigned int); #define TIMESPEC_TEXT_BUFSIZE \ (sizeof(intmax_t)*3 * 2 + sizeof("{tv_sec=%jd, tv_nsec=%jd}")) extern void printfd(struct tcb *, int); @@ -604,47 +577,72 @@ extern void print_sockaddr(struct tcb *tcp, const void *, int); extern bool print_sockaddr_by_inode(const unsigned long, const enum sock_proto); extern bool print_sockaddr_by_inode_cached(const unsigned long); extern void print_dirfd(struct tcb *, int); -extern int decode_sockaddr(struct tcb *, long, int); -#ifdef ALPHA -extern void printrusage32(struct tcb *, long); -extern const char *sprint_timeval32(struct tcb *tcp, long); -extern void print_timeval32(struct tcb *tcp, long); -extern void print_timeval32_pair(struct tcb *tcp, long); -extern void print_itimerval32(struct tcb *tcp, long); -#endif + +extern int +decode_sockaddr(struct tcb *, kernel_ulong_t addr, int addrlen); + extern void printuid(const char *, const unsigned int); -extern void print_sigset_addr_len(struct tcb *, long, long); + +extern void +print_sigset_addr_len(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len); + extern const char *sprintsigmask_n(const char *, const void *, unsigned int); #define tprintsigmask_addr(prefix, mask) \ tprints(sprintsigmask_n((prefix), (mask), sizeof(mask))) extern void printsignal(int); -extern void tprint_iov(struct tcb *, unsigned long, unsigned long, enum iov_decode); -extern void tprint_iov_upto(struct tcb *, unsigned long, unsigned long, - enum iov_decode, unsigned long); -extern void decode_netlink(struct tcb *, unsigned long, unsigned long); + +extern void +tprint_iov_upto(struct tcb *, kernel_ulong_t len, kernel_ulong_t addr, + enum iov_decode, kernel_ulong_t data_size); + +extern void +decode_netlink(struct tcb *, kernel_ulong_t addr, kernel_ulong_t len); + extern void tprint_open_modes(unsigned int); extern const char *sprint_open_modes(unsigned int); -extern void print_seccomp_filter(struct tcb *, unsigned long); -extern void print_seccomp_fprog(struct tcb *, unsigned long, unsigned short); + +extern void +print_seccomp_filter(struct tcb *, kernel_ulong_t addr); + +extern void +print_seccomp_fprog(struct tcb *, kernel_ulong_t addr, unsigned short len); struct strace_stat; extern void print_struct_stat(struct tcb *tcp, const struct strace_stat *const st); struct strace_statfs; -extern void print_struct_statfs(struct tcb *tcp, long); -extern void print_struct_statfs64(struct tcb *tcp, long, unsigned long); + +extern void +print_struct_statfs(struct tcb *, kernel_ulong_t addr); + +extern void +print_struct_statfs64(struct tcb *, kernel_ulong_t addr, kernel_ulong_t size); extern void print_ifindex(unsigned int); -extern int file_ioctl(struct tcb *, const unsigned int, long); -extern int fs_x_ioctl(struct tcb *, const unsigned int, long); -extern int loop_ioctl(struct tcb *, const unsigned int, long); -extern int ptp_ioctl(struct tcb *, const unsigned int, long); -extern int scsi_ioctl(struct tcb *, const unsigned int, long); -extern int sock_ioctl(struct tcb *, const unsigned int, long); -extern int term_ioctl(struct tcb *, const unsigned int, long); -extern int ubi_ioctl(struct tcb *, const unsigned int, long); -extern int uffdio_ioctl(struct tcb *, const unsigned int, long); +struct number_set; +extern struct number_set read_set; +extern struct number_set write_set; +extern struct number_set signal_set; + +extern bool is_number_in_set(unsigned int number, const struct number_set *); +extern void qualify(const char *); +extern unsigned int qual_flags(const unsigned int); + +#define DECL_IOCTL(name) \ +extern int \ +name ## _ioctl(struct tcb *, unsigned int request, kernel_ulong_t arg) +DECL_IOCTL(dm); +DECL_IOCTL(file); +DECL_IOCTL(fs_x); +DECL_IOCTL(ptp); +DECL_IOCTL(scsi); +DECL_IOCTL(term); +DECL_IOCTL(ubi); +DECL_IOCTL(uffdio); +#undef DECL_IOCTL + +extern int decode_sg_io_v4(struct tcb *, const kernel_ulong_t arg); extern int tv_nz(const struct timeval *); extern int tv_cmp(const struct timeval *, const struct timeval *); @@ -664,41 +662,59 @@ extern void unwind_capture_stacktrace(struct tcb* tcp); #endif static inline void -printstr(struct tcb *tcp, long addr, long len) +printstrn(struct tcb *tcp, kernel_ulong_t addr, kernel_ulong_t len) { printstr_ex(tcp, addr, len, 0); } -static inline int -printflags(const struct xlat *x, unsigned int flags, const char *dflt) +static inline void +printstr(struct tcb *tcp, kernel_ulong_t addr) { - return printflags64(x, flags, dflt); + printstr_ex(tcp, addr, -1, QUOTE_0_TERMINATED); } static inline int -printflags_long(const struct xlat *x, unsigned long flags, const char *dflt) +printflags(const struct xlat *x, unsigned int flags, const char *dflt) { return printflags64(x, flags, dflt); } -static inline void +static inline int printxval64(const struct xlat *x, const uint64_t val, const char *dflt) { - printxvals(val, dflt, x, NULL); + return printxvals(val, dflt, x, NULL); } -static inline void +static inline int printxval(const struct xlat *x, const unsigned int val, const char *dflt) { - printxvals(val, dflt, x, NULL); + return printxvals(val, dflt, x, NULL); } static inline void -printxval_long(const struct xlat *x, const unsigned long val, const char *dflt) +tprint_iov(struct tcb *tcp, kernel_ulong_t len, kernel_ulong_t addr, + enum iov_decode decode_iov) { - printxvals(val, dflt, x, NULL); + tprint_iov_upto(tcp, len, addr, decode_iov, -1); } +#ifdef ALPHA +typedef struct { + int tv_sec, tv_usec; +} timeval32_t; + +extern void print_timeval32_t(const timeval32_t *); +extern void printrusage32(struct tcb *, kernel_ulong_t); +extern const char *sprint_timeval32(struct tcb *tcp, kernel_ulong_t); +extern void print_timeval32(struct tcb *tcp, kernel_ulong_t); +extern void print_timeval32_pair(struct tcb *tcp, kernel_ulong_t); +extern void print_itimerval32(struct tcb *tcp, kernel_ulong_t); +#endif + +#ifdef HAVE_STRUCT_USER_DESC +extern void print_user_desc(struct tcb *, kernel_ulong_t addr); +#endif + /* Strace log generation machinery. * * printing_tcp: tcb which has incomplete line being printed right now. @@ -733,24 +749,120 @@ extern unsigned current_personality; #if SUPPORTED_PERSONALITIES == 1 # define current_wordsize PERSONALITY0_WORDSIZE +# define current_klongsize PERSONALITY0_KLONGSIZE #else # if SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_WORDSIZE == PERSONALITY1_WORDSIZE # define current_wordsize PERSONALITY0_WORDSIZE # else extern unsigned current_wordsize; # endif +# if SUPPORTED_PERSONALITIES == 2 && PERSONALITY0_KLONGSIZE == PERSONALITY1_KLONGSIZE +# define current_klongsize PERSONALITY0_KLONGSIZE +# else +extern unsigned current_klongsize; +# endif #endif -/* In many, many places we play fast and loose and use - * tprintf("%d", (int) tcp->u_arg[N]) to print fds, pids etc. - * We probably need to use widen_to_long() instead: - */ -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 -# define widen_to_long(v) (current_wordsize == 4 ? (long)(int32_t)(v) : (long)(v)) -#else -# define widen_to_long(v) ((long)(v)) +#define ANY_WORDSIZE_LESS_THAN_KERNEL_LONG \ + (SIZEOF_KERNEL_LONG_T > 4 \ + && (SIZEOF_LONG < SIZEOF_KERNEL_LONG_T || !defined(current_wordsize))) + +#define DECL_PRINTNUM(name) \ +extern bool \ +printnum_ ## name(struct tcb *, kernel_ulong_t addr, const char *fmt) \ + ATTRIBUTE_FORMAT((printf, 3, 0)) +DECL_PRINTNUM(short); +DECL_PRINTNUM(int); +DECL_PRINTNUM(int64); +#undef DECL_PRINTNUM + +#define DECL_PRINTNUM_ADDR(name) \ +extern bool \ +printnum_addr_ ## name(struct tcb *, kernel_ulong_t addr) +DECL_PRINTNUM_ADDR(int); +DECL_PRINTNUM_ADDR(int64); +#undef DECL_PRINTNUM_ADDR + +#ifndef current_wordsize +extern bool +printnum_long_int(struct tcb *, kernel_ulong_t addr, + const char *fmt_long, const char *fmt_int) + ATTRIBUTE_FORMAT((printf, 3, 0)) + ATTRIBUTE_FORMAT((printf, 4, 0)); +extern bool printnum_addr_long_int(struct tcb *, kernel_ulong_t addr); +# define printnum_slong(tcp, addr) \ + printnum_long_int((tcp), (addr), "%" PRId64, "%d") +# define printnum_ulong(tcp, addr) \ + printnum_long_int((tcp), (addr), "%" PRIu64, "%u") +# define printnum_ptr(tcp, addr) \ + printnum_addr_long_int((tcp), (addr)) +#elif current_wordsize > 4 +# define printnum_slong(tcp, addr) \ + printnum_int64((tcp), (addr), "%" PRId64) +# define printnum_ulong(tcp, addr) \ + printnum_int64((tcp), (addr), "%" PRIu64) +# define printnum_ptr(tcp, addr) \ + printnum_addr_int64((tcp), (addr)) +#else /* current_wordsize == 4 */ +# define printnum_slong(tcp, addr) \ + printnum_int((tcp), (addr), "%d") +# define printnum_ulong(tcp, addr) \ + printnum_int((tcp), (addr), "%u") +# define printnum_ptr(tcp, addr) \ + printnum_addr_int((tcp), (addr)) #endif +#ifndef current_klongsize +extern bool printnum_addr_klong_int(struct tcb *, kernel_ulong_t addr); +# define printnum_kptr(tcp, addr) \ + printnum_addr_klong_int((tcp), (addr)) +#elif current_klongsize > 4 +# define printnum_kptr(tcp, addr) \ + printnum_addr_int64((tcp), (addr)) +#else /* current_klongsize == 4 */ +# define printnum_kptr(tcp, addr) \ + printnum_addr_int((tcp), (addr)) +#endif + +#define DECL_PRINTPAIR(name) \ +extern bool \ +printpair_ ## name(struct tcb *, kernel_ulong_t addr, const char *fmt) \ + ATTRIBUTE_FORMAT((printf, 3, 0)) +DECL_PRINTPAIR(int); +DECL_PRINTPAIR(int64); +#undef DECL_PRINTPAIR + +static inline kernel_long_t +truncate_klong_to_current_wordsize(const kernel_long_t v) +{ +#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG + if (current_wordsize < sizeof(v)) { + return (int) v; + } else +#endif + { + return v; + } +} + +static inline kernel_ulong_t +truncate_kulong_to_current_wordsize(const kernel_ulong_t v) +{ +#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG + if (current_wordsize < sizeof(v)) { + return (unsigned int) v; + } else +#endif + { + return v; + } +} + +/* + * Cast a pointer or a pointer-sized integer to kernel_ulong_t. + */ +#define ptr_to_kulong(v) ((kernel_ulong_t) (unsigned long) (v)) + /* * Zero-extend a signed integer type to unsigned long long. */ @@ -775,8 +887,6 @@ extern const struct_sysent sysent0[]; extern const char *const errnoent0[]; extern const char *const signalent0[]; extern const struct_ioctlent ioctlent0[]; -extern qualbits_t *qual_vec[SUPPORTED_PERSONALITIES]; -#define qual_flags (qual_vec[current_personality]) #if SUPPORTED_PERSONALITIES > 1 extern const struct_sysent *sysent; @@ -794,7 +904,10 @@ extern unsigned nsyscalls; extern unsigned nerrnos; extern unsigned nsignals; extern unsigned nioctlents; -extern unsigned num_quals; + +extern const unsigned int nsyscall_vec[SUPPORTED_PERSONALITIES]; +extern const struct_sysent *const sysent_vec[SUPPORTED_PERSONALITIES]; +extern struct inject_opts *inject_vec[SUPPORTED_PERSONALITIES]; #ifdef IN_MPERS_BOOTSTRAP /* Transform multi-line MPERS_PRINTER_DECL statements to one-liners. */ @@ -808,18 +921,25 @@ extern unsigned num_quals; # define MPERS_PRINTER_DECL(type, name, ...) type MPERS_FUNC_NAME(name)(__VA_ARGS__) #endif /* !IN_MPERS_BOOTSTRAP */ +/* Checks that sysent[scno] is not out of range. */ +static inline bool +scno_in_range(kernel_ulong_t scno) +{ + return scno < nsyscalls; +} + /* - * If you need non-NULL sysent[scno].sys_func, non-NULL sysent[scno].sys_name, - * and non-indirect sysent[scno].sys_flags. + * Checks whether scno is not out of range, + * its corresponding sysent[scno].sys_func is non-NULL, + * and its sysent[scno].sys_flags has no TRACE_INDIRECT_SUBCALL flag set. */ -#define SCNO_IS_VALID(scno) \ - ((unsigned long)(scno) < nsyscalls \ - && sysent[scno].sys_func \ - && !(sysent[scno].sys_flags & TRACE_INDIRECT_SUBCALL)) - -/* Only ensures that sysent[scno] isn't out of range */ -#define SCNO_IN_RANGE(scno) \ - ((unsigned long)(scno) < nsyscalls) +static inline bool +scno_is_valid(kernel_ulong_t scno) +{ + return scno_in_range(scno) + && sysent[scno].sys_func + && !(sysent[scno].sys_flags & TRACE_INDIRECT_SUBCALL); +} #define MPERS_FUNC_NAME__(prefix, name) prefix ## name #define MPERS_FUNC_NAME_(prefix, name) MPERS_FUNC_NAME__(prefix, name) @@ -829,6 +949,16 @@ extern unsigned num_quals; #define SYS_FUNC(syscall_name) int SYS_FUNC_NAME(sys_ ## syscall_name)(struct tcb *tcp) +#if SIZEOF_KERNEL_LONG_T > SIZEOF_LONG +# define PRI_kl "ll" +#else +# define PRI_kl "l" +#endif + +#define PRI_kld PRI_kl"d" +#define PRI_klu PRI_kl"u" +#define PRI_klx PRI_kl"x" + /* * The kernel used to define 64-bit types on 64-bit systems on a per-arch * basis. Some architectures would use unsigned long and others would use diff --git a/depcomp b/depcomp new file mode 100755 index 000000000..4ebd5b3a2 --- /dev/null +++ b/depcomp @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2013-05-30.07; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/desc.c b/desc.c index 4695db583..48824697f 100644 --- a/desc.c +++ b/desc.c @@ -69,17 +69,17 @@ SYS_FUNC(dup3) } static int -decode_select(struct tcb *tcp, long *args, - void (*print_tv_ts) (struct tcb *, const long), - const char * (*sprint_tv_ts) (struct tcb *, const long)) +decode_select(struct tcb *const tcp, const kernel_ulong_t *const args, + void (*const print_tv_ts) (struct tcb *, kernel_ulong_t), + const char * (*const sprint_tv_ts) (struct tcb *, kernel_ulong_t)) { int i, j; int nfds, fdsize; fd_set *fds = NULL; const char *sep; - long arg; + kernel_ulong_t addr; - /* Kernel truncates arg[0] to int, we do the same. */ + /* Kernel truncates args[0] to int, we do the same. */ nfds = (int) args[0]; /* Kernel rejects negative nfds, so we don't parse it either. */ @@ -102,13 +102,13 @@ decode_select(struct tcb *tcp, long *args, if (verbose(tcp) && fdsize > 0) fds = malloc(fdsize); for (i = 0; i < 3; i++) { - arg = args[i+1]; + addr = args[i+1]; tprints(", "); if (!fds) { - printaddr(arg); + printaddr(addr); continue; } - if (umoven_or_printaddr(tcp, arg, fdsize, fds)) + if (umoven_or_printaddr(tcp, addr, fdsize, fds)) continue; tprints("["); for (j = 0, sep = "";; j++) { @@ -146,8 +146,8 @@ decode_select(struct tcb *tcp, long *args, for (i = 0; i < 3 && ready_fds > 0; i++) { int first = 1; - arg = args[i+1]; - if (!arg || !fds || umoven(tcp, arg, fdsize, fds) < 0) + addr = args[i+1]; + if (!addr || !fds || umoven(tcp, addr, fdsize, fds) < 0) continue; for (j = 0;; j++) { j = next_set_bit(fds, j, nfds); @@ -192,26 +192,26 @@ decode_select(struct tcb *tcp, long *args, SYS_FUNC(oldselect) { - long long_args[5]; -#undef oldselect_args -#if SIZEOF_LONG == 4 -# define oldselect_args long_args -#else + kernel_ulong_t select_args[5]; unsigned int oldselect_args[5]; - unsigned int i; -#endif - if (umove(tcp, tcp->u_arg[0], &oldselect_args) < 0) { - printaddr(tcp->u_arg[0]); - return 0; - } -#ifndef oldselect_args - for (i = 0; i < 5; i++) { - long_args[i] = oldselect_args[i]; + if (sizeof(*select_args) == sizeof(*oldselect_args)) { + if (umove_or_printaddr(tcp, tcp->u_arg[0], &select_args)) { + return 0; + } + } else { + unsigned int i; + + if (umove_or_printaddr(tcp, tcp->u_arg[0], &oldselect_args)) { + return 0; + } + + for (i = 0; i < 5; ++i) { + select_args[i] = oldselect_args[i]; + } } -#endif - return decode_select(tcp, long_args, print_timeval, sprint_timeval); -#undef oldselect_args + + return decode_select(tcp, select_args, print_timeval, sprint_timeval); } #ifdef ALPHA @@ -226,27 +226,23 @@ SYS_FUNC(select) return decode_select(tcp, tcp->u_arg, print_timeval, sprint_timeval); } -#include "kernel_types.h" - static int -umove_kulong_array_or_printaddr(struct tcb *tcp, const long addr, - kernel_ulong_t *ptr, size_t n) +umove_kulong_array_or_printaddr(struct tcb *const tcp, const kernel_ulong_t addr, + kernel_ulong_t *const ptr, const size_t n) { -#if defined X86_64 || defined X32 - if (current_personality == 1) { -#else - if (current_wordsize < sizeof(*ptr)) { -#endif +#ifndef current_klongsize + if (current_klongsize < sizeof(*ptr)) { uint32_t ptr32[n]; int r = umove_or_printaddr(tcp, addr, &ptr32); if (!r) { size_t i; for (i = 0; i < n; ++i) - ptr[i] = (kernel_ulong_t) ptr32[i]; + ptr[i] = ptr32[i]; } return r; } +#endif /* !current_klongsize */ return umoven_or_printaddr(tcp, addr, n * sizeof(*ptr), ptr); } @@ -260,10 +256,9 @@ SYS_FUNC(pselect6) if (!umove_kulong_array_or_printaddr(tcp, tcp->u_arg[5], data, ARRAY_SIZE(data))) { tprints("{"); - /* NB: kernel requires data[1] == NSIG / 8 */ - print_sigset_addr_len(tcp, (unsigned long) data[0], - (unsigned long) data[1]); - tprintf(", %llu}", (unsigned long long) data[1]); + /* NB: kernel requires data[1] == NSIG_BYTES */ + print_sigset_addr_len(tcp, data[0], data[1]); + tprintf(", %" PRI_klu "}", data[1]); } } diff --git a/dirent.c b/dirent.c index c27767526..2ba6fe7ab 100644 --- a/dirent.c +++ b/dirent.c @@ -33,14 +33,12 @@ #include DEF_MPERS_TYPE(kernel_dirent) -#include "kernel_types.h" - #include MPERS_DEFS #define D_NAME_LEN_MAX 256 static void -print_old_dirent(struct tcb *tcp, long addr) +print_old_dirent(struct tcb *const tcp, const kernel_ulong_t addr) { kernel_dirent d; @@ -68,7 +66,7 @@ SYS_FUNC(readdir) print_old_dirent(tcp, tcp->u_arg[1]); /* Not much point in printing this out, it is always 1. */ if (tcp->u_arg[2] != 1) - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %" PRI_klu, tcp->u_arg[2]); } return 0; } diff --git a/dm.c b/dm.c new file mode 100644 index 000000000..7f856895f --- /dev/null +++ b/dm.c @@ -0,0 +1,587 @@ +/* + * Support for decoding of DM_* ioctl commands. + * + * Copyright (c) 2016 Mikulas Patocka + * Copyright (c) 2016 Masatake Yamato + * Copyright (c) 2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_DM_IOCTL_H + +# include +# include + +# if DM_VERSION_MAJOR == 4 + +/* Definitions for command which have been added later */ + +# ifndef DM_LIST_VERSIONS +# define DM_LIST_VERSIONS _IOWR(DM_IOCTL, 0xd, struct dm_ioctl) +# endif +# ifndef DM_TARGET_MSG +# define DM_TARGET_MSG _IOWR(DM_IOCTL, 0xe, struct dm_ioctl) +# endif +# ifndef DM_DEV_SET_GEOMETRY +# define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, 0xf, struct dm_ioctl) +# endif + + +static void +dm_decode_device(const unsigned int code, const struct dm_ioctl *ioc) +{ + switch (code) { + case DM_REMOVE_ALL: + case DM_LIST_DEVICES: + case DM_LIST_VERSIONS: + break; + default: + if (ioc->dev) { + tprints(", dev="); + print_dev_t(ioc->dev); + } + if (ioc->name[0]) { + tprints(", name="); + print_quoted_string(ioc->name, DM_NAME_LEN, + QUOTE_0_TERMINATED); + } + if (ioc->uuid[0]) { + tprints(", uuid="); + print_quoted_string(ioc->uuid, DM_UUID_LEN, + QUOTE_0_TERMINATED); + } + break; + } +} + +static void +dm_decode_values(struct tcb *tcp, const unsigned int code, + const struct dm_ioctl *ioc) +{ + if (entering(tcp)) { + switch (code) { + case DM_TABLE_LOAD: + tprintf(", target_count=%" PRIu32, + ioc->target_count); + break; + case DM_DEV_SUSPEND: + if (ioc->flags & DM_SUSPEND_FLAG) + break; + /* Fall through */ + case DM_DEV_RENAME: + case DM_DEV_REMOVE: + case DM_DEV_WAIT: + tprintf(", event_nr=%" PRIu32, + ioc->event_nr); + break; + } + } else if (!syserror(tcp)) { + switch (code) { + case DM_DEV_CREATE: + case DM_DEV_RENAME: + case DM_DEV_SUSPEND: + case DM_DEV_STATUS: + case DM_DEV_WAIT: + case DM_TABLE_LOAD: + case DM_TABLE_CLEAR: + case DM_TABLE_DEPS: + case DM_TABLE_STATUS: + case DM_TARGET_MSG: + tprintf(", target_count=%" PRIu32, + ioc->target_count); + tprintf(", open_count=%" PRIu32, + ioc->open_count); + tprintf(", event_nr=%" PRIu32, + ioc->event_nr); + break; + } + } +} + +#include "xlat/dm_flags.h" + +static void +dm_decode_flags(const struct dm_ioctl *ioc) +{ + tprints(", flags="); + printflags(dm_flags, ioc->flags, "DM_???"); +} + +static void +dm_decode_dm_target_spec(struct tcb *const tcp, const kernel_ulong_t addr, + const struct dm_ioctl *const ioc) +{ + static const uint32_t target_spec_size = + sizeof(struct dm_target_spec); + uint32_t i; + uint32_t offset = ioc->data_start; + uint32_t offset_end; + + if (abbrev(tcp)) { + if (ioc->target_count) + tprints(", ..."); + + return; + } + + for (i = 0; i < ioc->target_count; i++) { + struct dm_target_spec s; + + offset_end = offset + target_spec_size; + + if (offset_end <= offset || offset_end > ioc->data_size) + goto misplaced; + + tprints(", "); + + if (i >= max_strlen) { + tprints("..."); + break; + } + + if (umove_or_printaddr(tcp, addr + offset, &s)) + break; + + tprintf("{sector_start=%" PRI__u64 ", length=%" PRI__u64, + s.sector_start, s.length); + + if (exiting(tcp)) + tprintf(", status=%" PRId32, s.status); + + tprints(", target_type="); + print_quoted_string(s.target_type, DM_MAX_TYPE_NAME, + QUOTE_0_TERMINATED); + + tprints(", string="); + printstr_ex(tcp, addr + offset_end, ioc->data_size - offset_end, + QUOTE_0_TERMINATED); + tprintf("}"); + + if (entering(tcp)) + offset += s.next; + else + offset = ioc->data_start + s.next; + + if (offset <= offset_end) + goto misplaced; + } + + return; + +misplaced: + tprints(", /* misplaced struct dm_target_spec */ ..."); +} + +bool +dm_print_dev(struct tcb *tcp, void *dev_ptr, size_t dev_size, void *dummy) +{ + uint64_t *dev = (uint64_t *) dev_ptr; + + print_dev_t(*dev); + + return 1; +} + +static void +dm_decode_dm_target_deps(struct tcb *const tcp, const kernel_ulong_t addr, + const struct dm_ioctl *const ioc) +{ + static const uint32_t target_deps_dev_offs = + offsetof(struct dm_target_deps, dev); + uint64_t dev_buf; + struct dm_target_deps s; + uint32_t offset = ioc->data_start; + uint32_t offset_end = offset + target_deps_dev_offs; + uint32_t space; + + if (abbrev(tcp)) { + tprints(", ..."); + return; + } + + tprints(", "); + + if (offset_end <= offset || offset_end > ioc->data_size) + goto misplaced; + + if (umove_or_printaddr(tcp, addr + offset, &s)) + return; + + space = (ioc->data_size - offset_end) / sizeof(dev_buf); + + if (s.count > space) + goto misplaced; + + tprintf("{count=%u, deps=", s.count); + + print_array(tcp, addr + offset_end, s.count, &dev_buf, sizeof(dev_buf), + umoven_or_printaddr, dm_print_dev, NULL); + + tprints("}"); + + return; + +misplaced: + tprints("/* misplaced struct dm_target_deps */ ..."); +} + +static void +dm_decode_dm_name_list(struct tcb *const tcp, const kernel_ulong_t addr, + const struct dm_ioctl *const ioc) +{ + static const uint32_t name_list_name_offs = + offsetof(struct dm_name_list, name); + struct dm_name_list s; + uint32_t offset = ioc->data_start; + uint32_t offset_end; + uint32_t count; + + if (abbrev(tcp)) { + tprints(", ..."); + return; + } + + for (count = 0;; count++) { + offset_end = offset + name_list_name_offs; + + if (offset_end <= offset || offset_end > ioc->data_size) + goto misplaced; + + tprints(", "); + + if (count >= max_strlen) { + tprints("..."); + break; + } + + if (umove_or_printaddr(tcp, addr + offset, &s)) + break; + if (!count && !s.dev) { + tprints("/* no devices present */"); + break; + } + + tprints("{dev="); + print_dev_t(s.dev); + + tprints("name="); + printstr_ex(tcp, addr + offset_end, ioc->data_size - offset_end, + QUOTE_0_TERMINATED); + tprints("}"); + + if (!s.next) + break; + + offset += s.next; + if (offset <= offset_end) + goto misplaced; + } + + return; + +misplaced: + tprints(", /* misplaced struct dm_name_list */ ..."); +} + +static void +dm_decode_dm_target_versions(struct tcb *const tcp, const kernel_ulong_t addr, + const struct dm_ioctl *const ioc) +{ + static const uint32_t target_vers_name_offs = + offsetof(struct dm_target_versions, name); + struct dm_target_versions s; + uint32_t offset = ioc->data_start; + uint32_t offset_end; + uint32_t count; + + if (abbrev(tcp)) { + tprints(", ..."); + return; + } + + for (count = 0;; count++) { + offset_end = offset + target_vers_name_offs; + + if (offset_end <= offset || offset_end > ioc->data_size) + goto misplaced; + + tprints(", "); + + if (count >= max_strlen) { + tprints("..."); + break; + } + + if (umove_or_printaddr(tcp, addr + offset, &s)) + break; + + tprints("{name="); + printstr_ex(tcp, addr + offset_end, ioc->data_size - offset_end, + QUOTE_0_TERMINATED); + tprintf(", version=%" PRIu32 ".%" PRIu32 ".%" PRIu32 "}", + s.version[0], s.version[1], s.version[2]); + + if (!s.next) + break; + + offset += s.next; + if (offset <= offset_end) + goto misplaced; + } + + return; + +misplaced: + tprints(", /* misplaced struct dm_target_versions */ ..."); +} + +static void +dm_decode_dm_target_msg(struct tcb *const tcp, const kernel_ulong_t addr, + const struct dm_ioctl *const ioc) +{ + static const uint32_t target_msg_message_offs = + offsetof(struct dm_target_msg, message); + uint32_t offset = ioc->data_start; + uint32_t offset_end = offset + target_msg_message_offs; + + if (abbrev(tcp)) { + tprints(", ..."); + return; + } + + if (offset_end > offset && offset_end <= ioc->data_size) { + struct dm_target_msg s; + + tprints(", "); + + if (umove_or_printaddr(tcp, addr + offset, &s)) + return; + + tprintf("{sector=%" PRI__u64 ", message=", s.sector); + printstr_ex(tcp, addr + offset_end, ioc->data_size - offset_end, + QUOTE_0_TERMINATED); + tprints("}"); + } else { + tprints(", /* misplaced struct dm_target_msg */"); + } +} + +static void +dm_decode_string(struct tcb *const tcp, const kernel_ulong_t addr, + const struct dm_ioctl *const ioc) +{ + uint32_t offset = ioc->data_start; + + if (abbrev(tcp)) { + tprints(", ..."); + return; + } + + if (offset < ioc->data_size) { + tprints(", string="); + printstr_ex(tcp, addr + offset, ioc->data_size - offset, + QUOTE_0_TERMINATED); + } else { + tprints(", /* misplaced string */"); + } +} + +static inline bool +dm_ioctl_has_params(const unsigned int code) +{ + switch (code) { + case DM_VERSION: + case DM_REMOVE_ALL: + case DM_DEV_CREATE: + case DM_DEV_REMOVE: + case DM_DEV_SUSPEND: + case DM_DEV_STATUS: + case DM_TABLE_CLEAR: + return false; + } + + return true; +} + +static int +dm_known_ioctl(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) +{ + struct dm_ioctl *ioc = NULL; + struct dm_ioctl *entering_ioc = NULL; + bool ioc_changed = false; + + if (entering(tcp)) { + ioc = malloc(sizeof(*ioc)); + if (!ioc) + return 0; + } else { + ioc = alloca(sizeof(*ioc)); + } + + if ((umoven(tcp, arg, offsetof(struct dm_ioctl, data), ioc) < 0) || + (ioc->data_size < offsetof(struct dm_ioctl, data_size))) { + if (entering(tcp)) + free(ioc); + return 0; + } + if (entering(tcp)) + set_tcb_priv_data(tcp, ioc, free); + else { + entering_ioc = get_tcb_priv_data(tcp); + + /* + * retrieve_status, __dev_status called only in case of success, + * so it looks like there's no need to check open_count, + * event_nr, target_count, dev fields for change (they are + * printed only in case of absence of errors). + */ + if (!entering_ioc || + (ioc->version[0] != entering_ioc->version[0]) || + (ioc->version[1] != entering_ioc->version[1]) || + (ioc->version[2] != entering_ioc->version[2]) || + (ioc->data_size != entering_ioc->data_size) || + (ioc->data_start != entering_ioc->data_start) || + (ioc->flags != entering_ioc->flags)) + ioc_changed = true; + } + + if (exiting(tcp) && syserror(tcp) && !ioc_changed) + return 1; + + /* + * device mapper code uses %d in some places and %u in another, but + * fields themselves are declared as __u32. + */ + tprintf("%s{version=%u.%u.%u", entering(tcp) ? ", " : " => ", + ioc->version[0], ioc->version[1], ioc->version[2]); + /* + * if we use a different version of ABI, do not attempt to decode + * ioctl fields + */ + if (ioc->version[0] != DM_VERSION_MAJOR) { + tprints(", /* Unsupported device mapper ABI version */ ..."); + goto skip; + } + + tprintf(", data_size=%u", ioc->data_size); + + if (dm_ioctl_has_params(code)) + tprintf(", data_start=%u", ioc->data_start); + + if (ioc->data_size < offsetof(struct dm_ioctl, data)) { + tprints(", /* Incorrect data_size */ ..."); + goto skip; + } + + dm_decode_device(code, ioc); + dm_decode_values(tcp, code, ioc); + dm_decode_flags(ioc); + + switch (code) { + case DM_DEV_WAIT: + case DM_TABLE_STATUS: + if (entering(tcp) || syserror(tcp)) + break; + dm_decode_dm_target_spec(tcp, arg, ioc); + break; + case DM_TABLE_LOAD: + if (exiting(tcp)) + break; + dm_decode_dm_target_spec(tcp, arg, ioc); + break; + case DM_TABLE_DEPS: + if (entering(tcp) || syserror(tcp)) + break; + dm_decode_dm_target_deps(tcp, arg, ioc); + break; + case DM_LIST_DEVICES: + if (entering(tcp) || syserror(tcp)) + break; + dm_decode_dm_name_list(tcp, arg, ioc); + break; + case DM_LIST_VERSIONS: + if (entering(tcp) || syserror(tcp)) + break; + dm_decode_dm_target_versions(tcp, arg, ioc); + break; + case DM_TARGET_MSG: + if (entering(tcp)) + dm_decode_dm_target_msg(tcp, arg, ioc); + else if (!syserror(tcp) && ioc->flags & DM_DATA_OUT_FLAG) + dm_decode_string(tcp, arg, ioc); + break; + case DM_DEV_RENAME: + case DM_DEV_SET_GEOMETRY: + if (exiting(tcp)) + break; + dm_decode_string(tcp, arg, ioc); + break; + } + + skip: + tprints("}"); + return 1; +} + +int +dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg) +{ + switch (code) { + case DM_VERSION: + case DM_REMOVE_ALL: + case DM_LIST_DEVICES: + case DM_DEV_CREATE: + case DM_DEV_REMOVE: + case DM_DEV_RENAME: + case DM_DEV_SUSPEND: + case DM_DEV_STATUS: + case DM_DEV_WAIT: + case DM_TABLE_LOAD: + case DM_TABLE_CLEAR: + case DM_TABLE_DEPS: + case DM_TABLE_STATUS: + case DM_LIST_VERSIONS: + case DM_TARGET_MSG: + case DM_DEV_SET_GEOMETRY: + return dm_known_ioctl(tcp, code, arg); + default: + return 0; + } +} + +# else /* !(DM_VERSION_MAJOR == 4) */ + +int +dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg) +{ + return 0; +} + +# endif /* DM_VERSION_MAJOR == 4 */ +#endif /* HAVE_LINUX_DM_IOCTL_H */ diff --git a/epoll.c b/epoll.c index 7382e0c0a..8dc7ab095 100644 --- a/epoll.c +++ b/epoll.c @@ -109,9 +109,9 @@ SYS_FUNC(epoll_pwait) epoll_wait_common(tcp); if (exiting(tcp)) { tprints(", "); - /* NB: kernel requires arg[5] == NSIG / 8 */ + /* NB: kernel requires arg[5] == NSIG_BYTES */ print_sigset_addr_len(tcp, tcp->u_arg[4], tcp->u_arg[5]); - tprintf(", %lu", tcp->u_arg[5]); + tprintf(", %" PRI_klu, tcp->u_arg[5]); } return 0; } diff --git a/evdev.c b/evdev.c index b24f9d320..687455157 100644 --- a/evdev.c +++ b/evdev.c @@ -76,7 +76,7 @@ decode_envelope(void *const data) } static int -ff_effect_ioctl(struct tcb *tcp, long arg) +ff_effect_ioctl(struct tcb *const tcp, const kernel_ulong_t arg) { tprints(", "); @@ -135,7 +135,7 @@ ff_effect_ioctl(struct tcb *tcp, long arg) decode_envelope(&ffe.u.periodic.envelope); tprintf(", custom_len=%u, custom_data=", ffe.u.periodic.custom_len); - printaddr((unsigned long) ffe.u.periodic.custom_data); + printaddr(ptr_to_kulong(ffe.u.periodic.custom_data)); tprints("}"); break; case FF_RUMBLE: @@ -154,7 +154,7 @@ ff_effect_ioctl(struct tcb *tcp, long arg) } static int -abs_ioctl(struct tcb *tcp, long arg) +abs_ioctl(struct tcb *const tcp, const kernel_ulong_t arg) { tprints(", "); @@ -188,7 +188,7 @@ abs_ioctl(struct tcb *tcp, long arg) } static int -keycode_ioctl(struct tcb *tcp, long arg) +keycode_ioctl(struct tcb *const tcp, const kernel_ulong_t arg) { tprints(", "); @@ -205,7 +205,7 @@ keycode_ioctl(struct tcb *tcp, long arg) # ifdef EVIOCGKEYCODE_V2 static int -keycode_V2_ioctl(struct tcb *tcp, long arg) +keycode_V2_ioctl(struct tcb *const tcp, const kernel_ulong_t arg) { tprints(", "); @@ -242,7 +242,7 @@ keycode_V2_ioctl(struct tcb *tcp, long arg) # endif /* EVIOCGKEYCODE_V2 */ static int -getid_ioctl(struct tcb *tcp, long arg) +getid_ioctl(struct tcb *const tcp, const kernel_ulong_t arg) { tprints(", "); @@ -262,13 +262,14 @@ getid_ioctl(struct tcb *tcp, long arg) } static int -decode_bitset(struct tcb *tcp, long arg, const struct xlat decode_nr[], - const unsigned int max_nr, const char *dflt) +decode_bitset(struct tcb *const tcp, const kernel_ulong_t arg, + const struct xlat decode_nr[], const unsigned int max_nr, + const char *const dflt) { tprints(", "); unsigned int size; - if ((unsigned long) tcp->u_rval > max_nr) + if ((kernel_ulong_t) tcp->u_rval > max_nr) size = max_nr; else size = tcp->u_rval; @@ -304,7 +305,8 @@ decode_bitset(struct tcb *tcp, long arg, const struct xlat decode_nr[], # ifdef EVIOCGMTSLOTS static int -mtslots_ioctl(struct tcb *tcp, const unsigned int code, long arg) +mtslots_ioctl(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) { tprints(", "); @@ -336,7 +338,7 @@ mtslots_ioctl(struct tcb *tcp, const unsigned int code, long arg) # if defined EVIOCGREP || defined EVIOCSREP static int -repeat_ioctl(struct tcb *tcp, long arg) +repeat_ioctl(struct tcb *const tcp, const kernel_ulong_t arg) { tprints(", "); printpair_int(tcp, arg, "%u"); @@ -345,7 +347,8 @@ repeat_ioctl(struct tcb *tcp, long arg) # endif /* EVIOCGREP || EVIOCSREP */ static int -bit_ioctl(struct tcb *tcp, const unsigned int ev_nr, const long arg) +bit_ioctl(struct tcb *const tcp, const unsigned int ev_nr, + const kernel_ulong_t arg) { switch (ev_nr) { case EV_SYN: @@ -395,7 +398,8 @@ bit_ioctl(struct tcb *tcp, const unsigned int ev_nr, const long arg) } static int -evdev_read_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +evdev_read_ioctl(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) { /* fixed-number fixed-length commands */ switch (code) { @@ -434,7 +438,7 @@ evdev_read_ioctl(struct tcb *tcp, const unsigned int code, const long arg) if (syserror(tcp)) printaddr(arg); else - printstr(tcp, arg, tcp->u_rval); + printstrn(tcp, arg, tcp->u_rval); return 1; # ifdef EVIOCGPROP case _IOC_NR(EVIOCGPROP(0)): @@ -469,7 +473,8 @@ evdev_read_ioctl(struct tcb *tcp, const unsigned int code, const long arg) } static int -evdev_write_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +evdev_write_ioctl(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) { /* fixed-number fixed-length commands */ switch (code) { @@ -492,7 +497,7 @@ evdev_write_ioctl(struct tcb *tcp, const unsigned int code, const long arg) # ifdef EVIOCREVOKE case EVIOCREVOKE: # endif - tprintf(", %lu", arg); + tprintf(", %" PRI_klu, arg); return 1; # ifdef EVIOCSCLOCKID case EVIOCSCLOCKID: @@ -509,8 +514,8 @@ evdev_write_ioctl(struct tcb *tcp, const unsigned int code, const long arg) return 0; } -MPERS_PRINTER_DECL(int, evdev_ioctl, struct tcb *tcp, - const unsigned int code, const long arg) +MPERS_PRINTER_DECL(int, evdev_ioctl, struct tcb *const tcp, + const unsigned int code, const kernel_ulong_t arg) { switch(_IOC_DIR(code)) { case _IOC_READ: diff --git a/execve.c b/execve.c index d2ff9f740..6e45b11bf 100644 --- a/execve.c +++ b/execve.c @@ -34,7 +34,7 @@ #include "defs.h" static void -printargv(struct tcb *tcp, long addr) +printargv(struct tcb *const tcp, kernel_ulong_t addr) { if (!addr || !verbose(tcp)) { printaddr(addr); @@ -49,8 +49,8 @@ printargv(struct tcb *tcp, long addr) for (n = 0; addr; sep = ", ", addr += wordsize, ++n) { union { unsigned int p32; - unsigned long p64; - char data[sizeof(long)]; + kernel_ulong_t p64; + char data[sizeof(kernel_ulong_t)]; } cp; if (umoven(tcp, addr, wordsize, cp.data)) { @@ -70,13 +70,13 @@ printargv(struct tcb *tcp, long addr) break; } tprints(sep); - printstr(tcp, wordsize < sizeof(cp.p64) ? cp.p32 : cp.p64, -1); + printstr(tcp, wordsize < sizeof(cp.p64) ? cp.p32 : cp.p64); } tprints("]"); } static void -printargc(struct tcb *tcp, long addr) +printargc(struct tcb *const tcp, kernel_ulong_t addr) { if (!addr || !verbose(tcp)) { printaddr(addr); diff --git a/exit.c b/exit.c deleted file mode 100644 index aec01da18..000000000 --- a/exit.c +++ /dev/null @@ -1,15 +0,0 @@ -#include "defs.h" - -SYS_FUNC(exit) -{ - if (exiting(tcp)) { - error_msg("_exit returned!"); - return -1; - } - /* special case: we stop tracing this process, finish line now */ - tprintf("%ld) ", tcp->u_arg[0]); - tabto(); - tprints("= ?\n"); - line_ended(); - return 0; -} diff --git a/fadvise.c b/fadvise.c index 34933f77f..f0d057b70 100644 --- a/fadvise.c +++ b/fadvise.c @@ -42,7 +42,7 @@ SYS_FUNC(fadvise64) printfd(tcp, tcp->u_arg[0]); argn = printllval(tcp, ", %lld", 1); - tprintf(", %llu, ", getarg_ull(tcp, argn++)); + tprintf(", %" PRI_klu ", ", tcp->u_arg[argn++]); printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???"); return RVAL_DECODED; diff --git a/fcntl.c b/fcntl.c index bfe8b1458..74168c6a2 100644 --- a/fcntl.c +++ b/fcntl.c @@ -46,15 +46,15 @@ print_struct_flock64(const struct_kernel_flock64 *fl, const int getlk) printxval(lockfcmds, (unsigned short) fl->l_type, "F_???"); tprints(", l_whence="); printxval(whence_codes, (unsigned short) fl->l_whence, "SEEK_???"); - tprintf(", l_start=%lld, l_len=%lld", - (long long) fl->l_start, (long long) fl->l_len); + tprintf(", l_start=%" PRId64 ", l_len=%" PRId64, + (int64_t) fl->l_start, (int64_t) fl->l_len); if (getlk) tprintf(", l_pid=%lu", (unsigned long) fl->l_pid); tprints("}"); } static void -printflock64(struct tcb *tcp, const long addr, const int getlk) +printflock64(struct tcb *const tcp, const kernel_ulong_t addr, const int getlk) { struct_kernel_flock64 fl; @@ -63,7 +63,7 @@ printflock64(struct tcb *tcp, const long addr, const int getlk) } static void -printflock(struct tcb *tcp, const long addr, const int getlk) +printflock(struct tcb *const tcp, const kernel_ulong_t addr, const int getlk) { struct_kernel_flock64 fl; @@ -72,7 +72,7 @@ printflock(struct tcb *tcp, const long addr, const int getlk) } static void -print_f_owner_ex(struct tcb *tcp, const long addr) +print_f_owner_ex(struct tcb *const tcp, const kernel_ulong_t addr) { struct { int type, pid; } owner; @@ -96,11 +96,11 @@ print_fcntl(struct tcb *tcp) break; case F_SETOWN: case F_SETPIPE_SZ: - tprintf(", %ld", tcp->u_arg[2]); + tprintf(", %" PRI_kld, tcp->u_arg[2]); break; case F_DUPFD: case F_DUPFD_CLOEXEC: - tprintf(", %ld", tcp->u_arg[2]); + tprintf(", %" PRI_kld, tcp->u_arg[2]); return RVAL_DECODED | RVAL_FD; case F_SETFL: tprints(", "); @@ -122,15 +122,15 @@ print_fcntl(struct tcb *tcp) break; case F_NOTIFY: tprints(", "); - printflags_long(notifyflags, tcp->u_arg[2], "DN_???"); + printflags64(notifyflags, tcp->u_arg[2], "DN_???"); break; case F_SETLEASE: tprints(", "); - printxval_long(lockfcmds, tcp->u_arg[2], "F_???"); + printxval64(lockfcmds, tcp->u_arg[2], "F_???"); break; case F_ADD_SEALS: tprints(", "); - printflags_long(f_seals, tcp->u_arg[2], "F_SEAL_???"); + printflags64(f_seals, tcp->u_arg[2], "F_SEAL_???"); break; case F_SETSIG: tprints(", "); @@ -143,7 +143,7 @@ print_fcntl(struct tcb *tcp) if (entering(tcp) || syserror(tcp) || tcp->u_rval == 0) return 0; tcp->auxstr = sprintflags("flags ", fdflags, - (unsigned long) tcp->u_rval); + (kernel_ulong_t) tcp->u_rval); return RVAL_HEX | RVAL_STR; case F_GETFL: if (entering(tcp) || syserror(tcp)) @@ -171,13 +171,13 @@ print_fcntl(struct tcb *tcp) case F_GETLEASE: if (entering(tcp) || syserror(tcp)) return 0; - tcp->auxstr = xlookup(lockfcmds, (unsigned long) tcp->u_rval); + tcp->auxstr = xlookup(lockfcmds, (kernel_ulong_t) tcp->u_rval); return RVAL_HEX | RVAL_STR; case F_GET_SEALS: if (entering(tcp) || syserror(tcp) || tcp->u_rval == 0) return 0; tcp->auxstr = sprintflags("seals ", f_seals, - (unsigned long) tcp->u_rval); + (kernel_ulong_t) tcp->u_rval); return RVAL_HEX | RVAL_STR; case F_GETSIG: if (entering(tcp) || syserror(tcp) || tcp->u_rval == 0) @@ -185,7 +185,7 @@ print_fcntl(struct tcb *tcp) tcp->auxstr = signame(tcp->u_rval); return RVAL_STR; default: - tprintf(", %#lx", tcp->u_arg[2]); + tprintf(", %#" PRI_klx, tcp->u_arg[2]); break; } return RVAL_DECODED; diff --git a/fetch_seccomp_fprog.c b/fetch_seccomp_fprog.c index d54b9796c..e483e8169 100644 --- a/fetch_seccomp_fprog.c +++ b/fetch_seccomp_fprog.c @@ -34,8 +34,8 @@ typedef struct seccomp_fprog seccomp_fprog_t; #include MPERS_DEFS -MPERS_PRINTER_DECL(bool, fetch_seccomp_fprog, - struct tcb *tcp, const long addr, void *p) +MPERS_PRINTER_DECL(bool, fetch_seccomp_fprog, struct tcb *const tcp, + const kernel_ulong_t addr, void *const p) { struct seccomp_fprog *pfp = p; seccomp_fprog_t mfp; diff --git a/fetch_struct_flock.c b/fetch_struct_flock.c index b5713f4f7..bb248761d 100644 --- a/fetch_struct_flock.c +++ b/fetch_struct_flock.c @@ -51,8 +51,8 @@ typedef struct_kernel_flock64 struct_flock64; && FLOCK_MEMBERS_EQ(type, l_len) \ && FLOCK_MEMBERS_EQ(type, l_pid)) -MPERS_PRINTER_DECL(bool, fetch_struct_flock, - struct tcb *tcp, const long addr, void *p) +MPERS_PRINTER_DECL(bool, fetch_struct_flock, struct tcb *const tcp, + const kernel_ulong_t addr, void *const p) { struct_kernel_flock64 *pfl = p; struct_flock mfl; @@ -71,8 +71,8 @@ MPERS_PRINTER_DECL(bool, fetch_struct_flock, return true; } -MPERS_PRINTER_DECL(bool, fetch_struct_flock64, - struct tcb *tcp, const long addr, void *p) +MPERS_PRINTER_DECL(bool, fetch_struct_flock64, struct tcb *const tcp, + const kernel_ulong_t addr, void *const p) { struct_kernel_flock64 *pfl = p; struct_flock64 mfl; diff --git a/fetch_struct_mmsghdr.c b/fetch_struct_mmsghdr.c index 87d52c6c5..04f98abaf 100644 --- a/fetch_struct_mmsghdr.c +++ b/fetch_struct_mmsghdr.c @@ -43,7 +43,8 @@ typedef struct mmsghdr struct_mmsghdr; */ MPERS_PRINTER_DECL(int, fetch_struct_mmsghdr, - struct tcb *tcp, const unsigned long addr, void *p) + struct tcb *const tcp, const kernel_ulong_t addr, + void *const p) { struct mmsghdr *p_native = p; struct_mmsghdr v_compat; diff --git a/fetch_struct_msghdr.c b/fetch_struct_msghdr.c index 78b505b8e..d5f5adc59 100644 --- a/fetch_struct_msghdr.c +++ b/fetch_struct_msghdr.c @@ -43,9 +43,10 @@ typedef struct msghdr struct_msghdr; */ MPERS_PRINTER_DECL(int, fetch_struct_msghdr, - struct tcb *tcp, const unsigned long addr, void *p) + struct tcb *const tcp, const kernel_ulong_t addr, + void *const p) { - struct msghdr *p_native = p; + struct msghdr *const p_native = p; struct_msghdr v_compat; if (sizeof(*p_native) == sizeof(v_compat)) diff --git a/fetch_struct_stat.c b/fetch_struct_stat.c index 399b78c3e..50d102841 100644 --- a/fetch_struct_stat.c +++ b/fetch_struct_stat.c @@ -70,7 +70,7 @@ typedef struct stat struct_stat; #endif MPERS_PRINTER_DECL(bool, fetch_struct_stat, - struct tcb *tcp, const unsigned long addr, + struct tcb *const tcp, const kernel_ulong_t addr, struct strace_stat *const dst) { #ifdef HAVE_STRUCT_STAT diff --git a/fetch_struct_stat64.c b/fetch_struct_stat64.c index b7281b594..b7e480570 100644 --- a/fetch_struct_stat64.c +++ b/fetch_struct_stat64.c @@ -68,7 +68,7 @@ typedef struct stat64 struct_stat64; #endif MPERS_PRINTER_DECL(bool, fetch_struct_stat64, - struct tcb *tcp, const unsigned long addr, + struct tcb *const tcp, const kernel_ulong_t addr, struct strace_stat *const dst) { #ifdef HAVE_STRUCT_STAT64 diff --git a/fetch_struct_statfs.c b/fetch_struct_statfs.c index ddb248b40..454e5b4ec 100644 --- a/fetch_struct_statfs.c +++ b/fetch_struct_statfs.c @@ -40,7 +40,8 @@ typedef struct statfs64 struct_statfs64; #include "statfs.h" MPERS_PRINTER_DECL(bool, fetch_struct_statfs, - struct tcb *tcp, const long addr, struct strace_statfs *p) + struct tcb *const tcp, const kernel_ulong_t addr, + struct strace_statfs *const p) { struct_statfs b; @@ -78,8 +79,8 @@ MPERS_PRINTER_DECL(bool, fetch_struct_statfs, #endif MPERS_PRINTER_DECL(bool, fetch_struct_statfs64, - struct tcb *tcp, const long addr, const unsigned long size, - struct strace_statfs *p) + struct tcb *const tcp, const kernel_ulong_t addr, + const kernel_ulong_t size, struct strace_statfs *const p) { struct_statfs64 b; diff --git a/file_handle.c b/file_handle.c index 21cf0f181..f2f0b22dd 100644 --- a/file_handle.c +++ b/file_handle.c @@ -27,6 +27,8 @@ #include "defs.h" +#include "xlat/name_to_handle_at_flags.h" + #ifndef MAX_HANDLE_SZ # define MAX_HANDLE_SZ 128 #endif @@ -39,7 +41,7 @@ typedef struct { SYS_FUNC(name_to_handle_at) { file_handle_header h; - const long addr = tcp->u_arg[2]; + const kernel_ulong_t addr = tcp->u_arg[2]; if (entering(tcp)) { /* dirfd */ @@ -58,7 +60,8 @@ SYS_FUNC(name_to_handle_at) tprints(", "); /* flags */ - printflags(at_flags, tcp->u_arg[4], "AT_???"); + printflags(name_to_handle_at_flags, tcp->u_arg[4], + "AT_???"); return RVAL_DECODED; } @@ -95,7 +98,7 @@ SYS_FUNC(name_to_handle_at) tprints(", "); /* flags */ - printflags(at_flags, tcp->u_arg[4], "AT_???"); + printflags(name_to_handle_at_flags, tcp->u_arg[4], "AT_???"); } return 0; } @@ -103,7 +106,7 @@ SYS_FUNC(name_to_handle_at) SYS_FUNC(open_by_handle_at) { file_handle_header h; - const long addr = tcp->u_arg[1]; + const kernel_ulong_t addr = tcp->u_arg[1]; /* mount_fd */ printfd(tcp, tcp->u_arg[0]); diff --git a/file_ioctl.c b/file_ioctl.c index de8101937..fec2f69b0 100644 --- a/file_ioctl.c +++ b/file_ioctl.c @@ -123,7 +123,8 @@ print_fiemap_extent(struct tcb *tcp, void *elem_buf, size_t elem_size, void *dat #endif /* HAVE_LINUX_FIEMAP_H */ int -file_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +file_ioctl(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) { switch (code) { case FICLONE: /* W */ diff --git a/fs_x_ioctl.c b/fs_x_ioctl.c index 7403e6b0d..2fa30f56d 100644 --- a/fs_x_ioctl.c +++ b/fs_x_ioctl.c @@ -30,7 +30,8 @@ #include int -fs_x_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +fs_x_ioctl(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) { switch (code) { #ifdef FITRIM diff --git a/fstatfs64.c b/fstatfs64.c index 63eb3dfa6..166fc63da 100644 --- a/fstatfs64.c +++ b/fstatfs64.c @@ -2,13 +2,11 @@ SYS_FUNC(fstatfs64) { - const unsigned long size = tcp->u_arg[1]; - if (entering(tcp)) { printfd(tcp, tcp->u_arg[0]); - tprintf(", %lu, ", size); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); } else { - print_struct_statfs64(tcp, tcp->u_arg[2], size); + print_struct_statfs64(tcp, tcp->u_arg[2], tcp->u_arg[1]); } return 0; } diff --git a/futex.c b/futex.c index d1b5a42cc..5267dc482 100644 --- a/futex.c +++ b/futex.c @@ -43,11 +43,11 @@ SYS_FUNC(futex) { - const long uaddr = tcp->u_arg[0]; + const kernel_ulong_t uaddr = tcp->u_arg[0]; const int op = tcp->u_arg[1]; const int cmd = op & 127; - const long timeout = tcp->u_arg[3]; - const long uaddr2 = tcp->u_arg[4]; + const kernel_ulong_t timeout = tcp->u_arg[3]; + const kernel_ulong_t uaddr2 = tcp->u_arg[4]; const unsigned int val = tcp->u_arg[2]; const unsigned int val2 = tcp->u_arg[3]; const unsigned int val3 = tcp->u_arg[5]; @@ -91,13 +91,19 @@ SYS_FUNC(futex) tprintf(", %u", val); tprintf(", %u, ", val2); printaddr(uaddr2); - tprints(", {"); + tprints(", "); if ((val3 >> 28) & 8) - tprints("FUTEX_OP_OPARG_SHIFT|"); - printxval(futexwakeops, (val3 >> 28) & 0x7, "FUTEX_OP_???"); - tprintf(", %u, ", (val3 >> 12) & 0xfff); - printxval(futexwakecmps, (val3 >> 24) & 0xf, "FUTEX_OP_CMP_???"); - tprintf(", %u}", val3 & 0xfff); + tprints("FUTEX_OP_OPARG_SHIFT<<28|"); + if (printxval(futexwakeops, (val3 >> 28) & 0x7, NULL)) + tprints("<<28"); + else + tprints("<<28 /* FUTEX_OP_??? */"); + tprintf("|%#x<<12|", (val3 >> 12) & 0xfff); + if (printxval(futexwakecmps, (val3 >> 24) & 0xf, NULL)) + tprints("<<24"); + else + tprints("<<24 /* FUTEX_OP_CMP_??? */"); + tprintf("|%#x", val3 & 0xfff); break; case FUTEX_WAIT_REQUEUE_PI: tprintf(", %u", val); @@ -115,7 +121,8 @@ SYS_FUNC(futex) break; default: tprintf(", %u", val); - tprintf(", %#lx", timeout); + tprints(", "); + printaddr(timeout); tprints(", "); printaddr(uaddr2); tprintf(", %#x", val3); diff --git a/gcc_compat.h b/gcc_compat.h index 908df16c7..fe3f9048f 100644 --- a/gcc_compat.h +++ b/gcc_compat.h @@ -52,6 +52,16 @@ # define ATTRIBUTE_PACKED /* empty */ #endif +#if GNUC_PREREQ(3, 0) +# define SAME_TYPE(x, y) __builtin_types_compatible_p(typeof(x), typeof(y)) +# define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0) +/* &(a)[0] is a pointer and not an array, shouldn't be treated as the same */ +# define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0])) +#else +# define SAME_TYPE(x, y) 0 +# define MUST_BE_ARRAY(a) 0 +#endif + #if GNUC_PREREQ(3, 0) # define ATTRIBUTE_MALLOC __attribute__((__malloc__)) #else @@ -70,6 +80,12 @@ # define ATTRIBUTE_SENTINEL /* empty */ #endif +#if GNUC_PREREQ(4, 1) +# define ALIGNOF(t_) __alignof__(t_) +#else +# define ALIGNOF(t_) (sizeof(struct {char x_; t_ y_;}) - sizeof(t_)) +#endif + #if GNUC_PREREQ(4, 3) # define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args)) #else diff --git a/generate_mpers_am.sh b/generate_mpers_am.sh deleted file mode 100755 index 833cd29b3..000000000 --- a/generate_mpers_am.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -e - -list="$(sed -r -n '/^strace_SOURCES[[:space:]]*=/,/^[[:space:]]*# end of strace_SOURCES/ s/^[[:space:]]*([[:alnum:]][^.]*\.c)[[:space:]]*\\$/\1/p' Makefile.am | - xargs -r grep -Elx '#[[:space:]]*include[[:space:]]+MPERS_DEFS' | - tr '\n' ' ')" - -cat > mpers.am < mpers_xlat.h diff --git a/getcwd.c b/getcwd.c index 329762397..a8ef591b3 100644 --- a/getcwd.c +++ b/getcwd.c @@ -7,7 +7,7 @@ SYS_FUNC(getcwd) printaddr(tcp->u_arg[0]); else printpathn(tcp, tcp->u_arg[0], tcp->u_rval - 1); - tprintf(", %lu", tcp->u_arg[1]); + tprintf(", %" PRI_klu, tcp->u_arg[1]); } return 0; } diff --git a/getrandom.c b/getrandom.c index c82b3b7f8..ea9ad5727 100644 --- a/getrandom.c +++ b/getrandom.c @@ -7,8 +7,9 @@ SYS_FUNC(getrandom) if (syserror(tcp)) printaddr(tcp->u_arg[0]); else - printstr(tcp, tcp->u_arg[0], tcp->u_rval); - tprintf(", %lu, ", tcp->u_arg[1]); + printstr_ex(tcp, tcp->u_arg[0], tcp->u_rval, + QUOTE_FORCE_HEX); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); printflags(getrandom_flags, tcp->u_arg[2], "GRND_???"); } return 0; diff --git a/git-set-file-times b/git-set-file-times deleted file mode 100755 index 077ac0e0c..000000000 --- a/git-set-file-times +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; - -# Sets mtime and atime of files to the latest commit time in git. -# -# This is useful after the first clone of the rsync repository BEFORE you -# do any building. It is also safe if you have done a "make distclean". - -my %ls; -my $commit_time; -my $prefix = @ARGV && $ARGV[0] =~ s/^--prefix=// ? shift : ''; - -$/ = "\0"; -open FH, 'git ls-files -z|' or die $!; -while () { - chomp; - $ls{$_} = $_; -} -close FH; - -$/ = "\n"; -open FH, "git log -r --name-only --no-color --pretty=raw -z @ARGV |" or die $!; -while () { - chomp; - if (/^committer .*? (\d+) (?:[\-\+]\d+)$/) { - $commit_time = $1; - } elsif (s/\0\0commit [a-f0-9]{40}$// or s/\0$//) { - my @files = delete @ls{split(/\0/, $_)}; - @files = grep { defined $_ } @files; - next unless @files; - map { s/^/$prefix/ } @files; - utime $commit_time, $commit_time, @files; - } - last unless %ls; -} -close FH; diff --git a/git-version-gen b/git-version-gen deleted file mode 100755 index 28e9109f6..000000000 --- a/git-version-gen +++ /dev/null @@ -1,227 +0,0 @@ -#!/bin/sh -# Print a version string. -scriptversion=2014-12-02.19; # UTC - -# Copyright (C) 2007-2014 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. -# It may be run two ways: -# - from a git repository in which the "git describe" command below -# produces useful output (thus requiring at least one signed tag) -# - from a non-git-repo directory containing a .tarball-version file, which -# presumes this script is invoked like "./git-version-gen .tarball-version". - -# In order to use intra-version strings in your project, you will need two -# separate generated version string files: -# -# .tarball-version - present only in a distribution tarball, and not in -# a checked-out repository. Created with contents that were learned at -# the last time autoconf was run, and used by git-version-gen. Must not -# be present in either $(srcdir) or $(builddir) for git-version-gen to -# give accurate answers during normal development with a checked out tree, -# but must be present in a tarball when there is no version control system. -# Therefore, it cannot be used in any dependencies. GNUmakefile has -# hooks to force a reconfigure at distribution time to get the value -# correct, without penalizing normal development with extra reconfigures. -# -# .version - present in a checked-out repository and in a distribution -# tarball. Usable in dependencies, particularly for files that don't -# want to depend on config.h but do want to track version changes. -# Delete this file prior to any autoconf run where you want to rebuild -# files to pick up a version string change; and leave it stale to -# minimize rebuild time after unrelated changes to configure sources. -# -# As with any generated file in a VC'd directory, you should add -# /.version to .gitignore, so that you don't accidentally commit it. -# .tarball-version is never generated in a VC'd directory, so needn't -# be listed there. -# -# Use the following line in your configure.ac, so that $(VERSION) will -# automatically be up-to-date each time configure is run (and note that -# since configure.ac no longer includes a version string, Makefile rules -# should not depend on configure.ac for version updates). -# -# AC_INIT([GNU project], -# m4_esyscmd([build-aux/git-version-gen .tarball-version]), -# [bug-project@example]) -# -# Then use the following lines in your Makefile.am, so that .version -# will be present for dependencies, and so that .version and -# .tarball-version will exist in distribution tarballs. -# -# EXTRA_DIST = $(top_srcdir)/.version -# BUILT_SOURCES = $(top_srcdir)/.version -# $(top_srcdir)/.version: -# echo $(VERSION) > $@-t && mv $@-t $@ -# dist-hook: -# echo $(VERSION) > $(distdir)/.tarball-version - - -me=$0 - -version="git-version-gen $scriptversion - -Copyright 2011 Free Software Foundation, Inc. -There is NO warranty. You may redistribute this software -under the terms of the GNU General Public License. -For more information about these matters, see the files named COPYING." - -usage="\ -Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT] -Print a version string. - -Options: - - --prefix PREFIX prefix of git tags (default 'v') - --fallback VERSION - fallback version to use if \"git --version\" fails - - --help display this help and exit - --version output version information and exit - -Running without arguments will suffice in most cases." - -prefix=v -fallback= - -while test $# -gt 0; do - case $1 in - --help) echo "$usage"; exit 0;; - --version) echo "$version"; exit 0;; - --prefix) shift; prefix="$1";; - --fallback) shift; fallback="$1";; - -*) - echo "$0: Unknown option '$1'." >&2 - echo "$0: Try '--help' for more information." >&2 - exit 1;; - *) - if test "x$tarball_version_file" = x; then - tarball_version_file="$1" - elif test "x$tag_sed_script" = x; then - tag_sed_script="$1" - else - echo "$0: extra non-option argument '$1'." >&2 - exit 1 - fi;; - esac - shift -done - -if test "x$tarball_version_file" = x; then - echo "$usage" - exit 1 -fi - -tag_sed_script="${tag_sed_script:-s/x/x/}" - -nl=' -' - -# Avoid meddling by environment variable of the same name. -v= -v_from_git= - -# First see if there is a tarball-only version file. -# then try "git describe", then default. -if test -f $tarball_version_file -then - v=`cat $tarball_version_file` || v= - case $v in - *$nl*) v= ;; # reject multi-line output - [0-9]*) ;; - *) v= ;; - esac - test "x$v" = x \ - && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2 -fi - -if test "x$v" != x -then - : # use $v -# Otherwise, if there is at least one git commit involving the working -# directory, and "git describe" output looks sensible, use that to -# derive a version string. -elif test "`git log -1 --pretty=format:x . 2>&1`" = x \ - && v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \ - || git describe --abbrev=4 HEAD 2>/dev/null` \ - && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \ - && case $v in - $prefix[0-9]*) ;; - *) (exit 1) ;; - esac -then - # Is this a new git that lists number of commits since the last - # tag or the previous older version that did not? - # Newer: v6.10-77-g0f8faeb - # Older: v6.10-g0f8faeb - case $v in - *-*-*) : git describe is okay three part flavor ;; - *-*) - : git describe is older two part flavor - # Recreate the number of commits and rewrite such that the - # result is the same as if we were using the newer version - # of git describe. - vtag=`echo "$v" | sed 's/-.*//'` - commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \ - || { commit_list=failed; - echo "$0: WARNING: git rev-list failed" 1>&2; } - numcommits=`echo "$commit_list" | wc -l` - v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`; - test "$commit_list" = failed && v=UNKNOWN - ;; - esac - - # Change the first '-' to a '.', so version-comparing tools work properly. - # Remove the "g" in git describe's output string, to save a byte. - # Change remaining '-' to '.', so version conforms to policies. - v=`echo "$v" | sed 's/-/.0./;s/\(.*\)-g/\1-/;s/-/./g'`; - v_from_git=1 -elif test "x$fallback" = x || git --version >/dev/null 2>&1; then - v=UNKNOWN -else - v=$fallback -fi - -v=`echo "$v" |sed "s/^$prefix//"` - -# Test whether to append the "-dirty" suffix only if the version -# string we're using came from git. I.e., skip the test if it's "UNKNOWN" -# or if it came from .tarball-version. -if test "x$v_from_git" != x; then - # Don't declare a version "dirty" merely because a time stamp has changed. - git update-index --refresh > /dev/null 2>&1 - - dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty= - case "$dirty" in - '') ;; - *) # Append the suffix only if there isn't one already. - case $v in - *-dirty) ;; - *) v="$v-dirty" ;; - esac ;; - esac -fi - -# Omit the trailing newline, so that m4_esyscmd can use the result directly. -printf %s "$v" - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/gitlog-to-changelog b/gitlog-to-changelog deleted file mode 100755 index 190f7b5db..000000000 --- a/gitlog-to-changelog +++ /dev/null @@ -1,437 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' - & eval 'exec perl -wS "$0" $argv:q' - if 0; -# Convert git log output to ChangeLog format. - -my $VERSION = '2014-11-20 17:25'; # UTC -# The definition above must lie within the first 8 lines in order -# for the Emacs time-stamp write hook (at end) to update it. -# If you change this file with Emacs, please let the write hook -# do its job. Otherwise, update this string manually. - -# Copyright (C) 2008-2014 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Written by Jim Meyering - -use strict; -use warnings; -use Getopt::Long; -use POSIX qw(strftime); - -(my $ME = $0) =~ s|.*/||; - -# use File::Coda; # http://meyering.net/code/Coda/ -END { - defined fileno STDOUT or return; - close STDOUT and return; - warn "$ME: failed to close standard output: $!\n"; - $? ||= 1; -} - -sub usage ($) -{ - my ($exit_code) = @_; - my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); - if ($exit_code != 0) - { - print $STREAM "Try '$ME --help' for more information.\n"; - } - else - { - print $STREAM < ChangeLog - $ME -- -n 5 foo > last-5-commits-to-branch-foo - -SPECIAL SYNTAX: - -The following types of strings are interpreted specially when they appear -at the beginning of a log message line. They are not copied to the output. - - Copyright-paperwork-exempt: Yes - Append the "(tiny change)" notation to the usual "date name email" - ChangeLog header to mark a change that does not require a copyright - assignment. - Co-authored-by: Joe User - List the specified name and email address on a second - ChangeLog header, denoting a co-author. - Signed-off-by: Joe User - These lines are simply elided. - -In a FILE specified via --amend, comment lines (starting with "#") are ignored. -FILE must consist of pairs where SHA is a 40-byte SHA1 (alone on -a line) referring to a commit in the current project, and CODE refers to one -or more consecutive lines of Perl code. Pairs must be separated by one or -more blank line. - -Here is sample input for use with --amend=FILE, from coreutils: - -3a169f4c5d9159283548178668d2fae6fced3030 -# fix typo in title: -s/all tile types/all file types/ - -1379ed974f1fa39b12e2ffab18b3f7a607082202 -# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. -# Change the author to be Paul. Note the escaped "@": -s,Jim .*>,Paul Eggert , - -EOF - } - exit $exit_code; -} - -# If the string $S is a well-behaved file name, simply return it. -# If it contains white space, quotes, etc., quote it, and return the new string. -sub shell_quote($) -{ - my ($s) = @_; - if ($s =~ m![^\w+/.,-]!) - { - # Convert each single quote to '\'' - $s =~ s/\'/\'\\\'\'/g; - # Then single quote the string. - $s = "'$s'"; - } - return $s; -} - -sub quoted_cmd(@) -{ - return join (' ', map {shell_quote $_} @_); -} - -# Parse file F. -# Comment lines (starting with "#") are ignored. -# F must consist of pairs where SHA is a 40-byte SHA1 -# (alone on a line) referring to a commit in the current project, and -# CODE refers to one or more consecutive lines of Perl code. -# Pairs must be separated by one or more blank line. -sub parse_amend_file($) -{ - my ($f) = @_; - - open F, '<', $f - or die "$ME: $f: failed to open for reading: $!\n"; - - my $fail; - my $h = {}; - my $in_code = 0; - my $sha; - while (defined (my $line = )) - { - $line =~ /^\#/ - and next; - chomp $line; - $line eq '' - and $in_code = 0, next; - - if (!$in_code) - { - $line =~ /^([0-9a-fA-F]{40})$/ - or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), - $fail = 1, next; - $sha = lc $1; - $in_code = 1; - exists $h->{$sha} - and (warn "$ME: $f:$.: duplicate SHA1\n"), - $fail = 1, next; - } - else - { - $h->{$sha} ||= ''; - $h->{$sha} .= "$line\n"; - } - } - close F; - - $fail - and exit 1; - - return $h; -} - -# git_dir_option $SRCDIR -# -# From $SRCDIR, the --git-dir option to pass to git (none if $SRCDIR -# is undef). Return as a list (0 or 1 element). -sub git_dir_option($) -{ - my ($srcdir) = @_; - my @res = (); - if (defined $srcdir) - { - my $qdir = shell_quote $srcdir; - my $cmd = "cd $qdir && git rev-parse --show-toplevel"; - my $qcmd = shell_quote $cmd; - my $git_dir = qx($cmd); - defined $git_dir - or die "$ME: cannot run $qcmd: $!\n"; - $? == 0 - or die "$ME: $qcmd had unexpected exit code or signal ($?)\n"; - chomp $git_dir; - push @res, "--git-dir=$git_dir/.git"; - } - @res; -} - -{ - my $since_date; - my $until_date; - my $format_string = '%s%n%b%n'; - my $amend_file; - my $append_dot = 0; - my $cluster = 1; - my $strip_tab = 0; - my $strip_cherry_pick = 0; - my $srcdir; - GetOptions - ( - help => sub { usage 0 }, - version => sub { print "$ME version $VERSION\n"; exit }, - 'since=s' => \$since_date, - 'until=s' => \$until_date, - 'format=s' => \$format_string, - 'amend=s' => \$amend_file, - 'append-dot' => \$append_dot, - 'cluster!' => \$cluster, - 'strip-tab' => \$strip_tab, - 'strip-cherry-pick' => \$strip_cherry_pick, - 'srcdir=s' => \$srcdir, - ) or usage 1; - - defined $since_date - and unshift @ARGV, "--since=$since_date"; - defined $until_date - and unshift @ARGV, "--until=$until_date"; - - # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) - # that makes a correction in the log or attribution of that commit. - my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; - - my @cmd = ('git', - git_dir_option $srcdir, - qw(log --log-size), - '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); - open PIPE, '-|', @cmd - or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n" - . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); - - my $prev_multi_paragraph; - my $prev_date_line = ''; - my @prev_coauthors = (); - while (1) - { - defined (my $in = ) - or last; - $in =~ /^log size (\d+)$/ - or die "$ME:$.: Invalid line (expected log size):\n$in"; - my $log_nbytes = $1; - - my $log; - my $n_read = read PIPE, $log, $log_nbytes; - $n_read == $log_nbytes - or die "$ME:$.: unexpected EOF\n"; - - # Extract leading hash. - my ($sha, $rest) = split ':', $log, 2; - defined $sha - or die "$ME:$.: malformed log entry\n"; - $sha =~ /^[0-9a-fA-F]{40}$/ - or die "$ME:$.: invalid SHA1: $sha\n"; - - # If this commit's log requires any transformation, do it now. - my $code = $amend_code->{$sha}; - if (defined $code) - { - eval 'use Safe'; - my $s = new Safe; - # Put the unpreprocessed entry into "$_". - $_ = $rest; - - # Let $code operate on it, safely. - my $r = $s->reval("$code") - or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; - - # Note that we've used this entry. - delete $amend_code->{$sha}; - - # Update $rest upon success. - $rest = $_; - } - - # Remove lines inserted by "git cherry-pick". - if ($strip_cherry_pick) - { - $rest =~ s/^\s*Conflicts:\n.*//sm; - $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m; - } - - my @line = split "\n", $rest; - my $author_line = shift @line; - defined $author_line - or die "$ME:$.: unexpected EOF\n"; - $author_line =~ /^(\d+) (.*>)$/ - or die "$ME:$.: Invalid line " - . "(expected date/author/email):\n$author_line\n"; - - # Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog - # `(tiny change)' annotation. - my $tiny = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line) - ? ' (tiny change)' : ''); - - my $date_line = sprintf "%s %s$tiny\n", - strftime ("%F", localtime ($1)), $2; - - my @coauthors = grep /^Co-authored-by:.*$/, @line; - # Omit meta-data lines we've already interpreted. - @line = grep !/^(?:Signed-off-by:[ ].*>$ - |Co-authored-by:[ ] - |Copyright-paperwork-exempt:[ ] - )/x, @line; - - # Remove leading and trailing blank lines. - if (@line) - { - while ($line[0] =~ /^\s*$/) { shift @line; } - while ($line[$#line] =~ /^\s*$/) { pop @line; } - } - - # Record whether there are two or more paragraphs. - my $multi_paragraph = grep /^\s*$/, @line; - - # Format 'Co-authored-by: A U Thor ' lines in - # standard multi-author ChangeLog format. - for (@coauthors) - { - s/^Co-authored-by:\s*/\t /; - s/\s*/ - or warn "$ME: warning: missing email address for " - . substr ($_, 5) . "\n"; - } - - # If clustering of commit messages has been disabled, if this header - # would be different from the previous date/name/email/coauthors header, - # or if this or the previous entry consists of two or more paragraphs, - # then print the header. - if ( ! $cluster - || $date_line ne $prev_date_line - || "@coauthors" ne "@prev_coauthors" - || $multi_paragraph - || $prev_multi_paragraph) - { - $prev_date_line eq '' - or print "\n"; - print $date_line; - @coauthors - and print join ("\n", @coauthors), "\n"; - } - $prev_date_line = $date_line; - @prev_coauthors = @coauthors; - $prev_multi_paragraph = $multi_paragraph; - - # If there were any lines - if (@line == 0) - { - warn "$ME: warning: empty commit message:\n $date_line\n"; - } - else - { - if ($append_dot) - { - # If the first line of the message has enough room, then - if (length $line[0] < 72) - { - # append a dot if there is no other punctuation or blank - # at the end. - $line[0] =~ /[[:punct:]\s]$/ - or $line[0] .= '.'; - } - } - - # Remove one additional leading TAB from each line. - $strip_tab - and map { s/^\t// } @line; - - # Prefix each non-empty line with a TAB. - @line = map { length $_ ? "\t$_" : '' } @line; - - print "\n", join ("\n", @line), "\n"; - } - - defined ($in = ) - or last; - $in ne "\n" - and die "$ME:$.: unexpected line:\n$in"; - } - - close PIPE - or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; - # FIXME-someday: include $PROCESS_STATUS in the diagnostic - - # Complain about any unused entry in the --amend=F specified file. - my $fail = 0; - foreach my $sha (keys %$amend_code) - { - warn "$ME:$amend_file: unused entry: $sha\n"; - $fail = 1; - } - - exit $fail; -} - -# Local Variables: -# mode: perl -# indent-tabs-mode: nil -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "my $VERSION = '" -# time-stamp-format: "%:y-%02m-%02d %02H:%02M" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "'; # UTC" -# End: diff --git a/hdio.c b/hdio.c index e9dbdf1ac..6e256d94b 100644 --- a/hdio.c +++ b/hdio.c @@ -36,8 +36,8 @@ typedef struct hd_geometry struct_hd_geometry; #include MPERS_DEFS -MPERS_PRINTER_DECL(int, hdio_ioctl, struct tcb *tcp, - const unsigned int code, const long arg) +MPERS_PRINTER_DECL(int, hdio_ioctl, struct tcb *const tcp, + const unsigned int code, const kernel_ulong_t arg) { switch (code) { case HDIO_GETGEO: diff --git a/hostname.c b/hostname.c index c64d954da..75f96ba69 100644 --- a/hostname.c +++ b/hostname.c @@ -1,9 +1,24 @@ #include "defs.h" +#ifdef HAVE_LINUX_UTSNAME_H +# include +#endif + +#ifndef __NEW_UTS_LEN +# define __NEW_UTS_LEN 64 +#endif + SYS_FUNC(sethostname) { - printstr(tcp, tcp->u_arg[0], tcp->u_arg[1]); - tprintf(", %lu", tcp->u_arg[1]); + unsigned int len = tcp->u_arg[1]; + + if (len > __NEW_UTS_LEN) { + printaddr(tcp->u_arg[0]); + } else { + printstrn(tcp, tcp->u_arg[0], len); + } + + tprintf(", %u", len); return RVAL_DECODED; } @@ -15,8 +30,8 @@ SYS_FUNC(gethostname) if (syserror(tcp)) printaddr(tcp->u_arg[0]); else - printstr(tcp, tcp->u_arg[0], -1); - tprintf(", %lu", tcp->u_arg[1]); + printstr(tcp, tcp->u_arg[0]); + tprintf(", %" PRI_klu, tcp->u_arg[1]); } return 0; } diff --git a/install-sh b/install-sh new file mode 100755 index 000000000..377bb8687 --- /dev/null +++ b/install-sh @@ -0,0 +1,527 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2011-11-20.07; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/io.c b/io.c index 8a93cb89c..c41b66fa2 100644 --- a/io.c +++ b/io.c @@ -41,8 +41,8 @@ SYS_FUNC(read) if (syserror(tcp)) printaddr(tcp->u_arg[1]); else - printstr(tcp, tcp->u_arg[1], tcp->u_rval); - tprintf(", %lu", tcp->u_arg[2]); + printstrn(tcp, tcp->u_arg[1], tcp->u_rval); + tprintf(", %" PRI_klu, tcp->u_arg[2]); } return 0; } @@ -51,22 +51,22 @@ SYS_FUNC(write) { printfd(tcp, tcp->u_arg[0]); tprints(", "); - printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); - tprintf(", %lu", tcp->u_arg[2]); + printstrn(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprintf(", %" PRI_klu, tcp->u_arg[2]); return RVAL_DECODED; } struct print_iovec_config { enum iov_decode decode_iov; - unsigned long data_size; + kernel_ulong_t data_size; }; static bool print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { - const unsigned long *iov; - unsigned long iov_buf[2], len; + const kernel_ulong_t *iov; + kernel_ulong_t iov_buf[2], len; struct print_iovec_config *c = data; if (elem_size < sizeof(iov_buf)) { @@ -85,14 +85,14 @@ print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) case IOV_DECODE_STR: if (len > c->data_size) len = c->data_size; - if (c->data_size != (unsigned long) -1L) + if (c->data_size != (kernel_ulong_t) -1) c->data_size -= len; - printstr(tcp, iov[0], len); + printstrn(tcp, iov[0], len); break; case IOV_DECODE_NETLINK: if (len > c->data_size) len = c->data_size; - if (c->data_size != (unsigned long) -1L) + if (c->data_size != (kernel_ulong_t) -1) c->data_size -= len; decode_netlink(tcp, iov[0], iov[1]); break; @@ -101,7 +101,7 @@ print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) break; } - tprintf(", iov_len=%lu}", iov[1]); + tprintf(", iov_len=%" PRI_klu "}", iov[1]); return true; } @@ -111,22 +111,16 @@ print_iovec(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) * Example: recvmsg returing a short read. */ void -tprint_iov_upto(struct tcb *tcp, unsigned long len, unsigned long addr, - enum iov_decode decode_iov, unsigned long data_size) +tprint_iov_upto(struct tcb *const tcp, const kernel_ulong_t len, + const kernel_ulong_t addr, const enum iov_decode decode_iov, + const kernel_ulong_t data_size) { - unsigned long iov[2]; + kernel_ulong_t iov[2]; struct print_iovec_config config = { .decode_iov = decode_iov, .data_size = data_size }; print_array(tcp, addr, len, iov, current_wordsize * 2, - umoven_or_printaddr, print_iovec, &config); -} - -void -tprint_iov(struct tcb *tcp, unsigned long len, unsigned long addr, - enum iov_decode decode_iov) -{ - tprint_iov_upto(tcp, len, addr, decode_iov, (unsigned long) -1L); + umoven_or_printaddr_ignore_syserror, print_iovec, &config); } SYS_FUNC(readv) @@ -136,8 +130,9 @@ SYS_FUNC(readv) tprints(", "); } else { tprint_iov_upto(tcp, tcp->u_arg[2], tcp->u_arg[1], + syserror(tcp) ? IOV_DECODE_ADDR : IOV_DECODE_STR, tcp->u_rval); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %" PRI_klu, tcp->u_arg[2]); } return 0; } @@ -147,7 +142,7 @@ SYS_FUNC(writev) printfd(tcp, tcp->u_arg[0]); tprints(", "); tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], IOV_DECODE_STR); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %" PRI_klu, tcp->u_arg[2]); return RVAL_DECODED; } @@ -161,8 +156,8 @@ SYS_FUNC(pread) if (syserror(tcp)) printaddr(tcp->u_arg[1]); else - printstr(tcp, tcp->u_arg[1], tcp->u_rval); - tprintf(", %lu, ", tcp->u_arg[2]); + printstrn(tcp, tcp->u_arg[1], tcp->u_rval); + tprintf(", %" PRI_klu ", ", tcp->u_arg[2]); printllval(tcp, "%lld", 3); } return 0; @@ -172,8 +167,8 @@ SYS_FUNC(pwrite) { printfd(tcp, tcp->u_arg[0]); tprints(", "); - printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); - tprintf(", %lu, ", tcp->u_arg[2]); + printstrn(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[2]); printllval(tcp, "%lld", 3); return RVAL_DECODED; @@ -182,38 +177,20 @@ SYS_FUNC(pwrite) static void print_lld_from_low_high_val(struct tcb *tcp, int arg) { -#if SIZEOF_LONG > 4 && SIZEOF_LONG == SIZEOF_LONG_LONG -# if SUPPORTED_PERSONALITIES > 1 -# ifdef X86_64 - if (current_personality != 1) -# else - if (current_wordsize == sizeof(long)) -# endif -# endif - tprintf("%ld", tcp->u_arg[arg]); -# if SUPPORTED_PERSONALITIES > 1 - else - tprintf("%ld", - ((unsigned long) tcp->u_arg[arg + 1] << current_wordsize * 8) - | (unsigned long) tcp->u_arg[arg]); -# endif -#elif SIZEOF_LONG > 4 -# error Unsupported configuration: SIZEOF_LONG > 4 && SIZEOF_LONG_LONG > SIZEOF_LONG -#elif HAVE_STRUCT_TCB_EXT_ARG -# if SUPPORTED_PERSONALITIES > 1 - if (current_personality == 1) { - tprintf("%lld", - (zero_extend_signed_to_ull(tcp->u_arg[arg + 1]) << sizeof(long) * 8) - | zero_extend_signed_to_ull(tcp->u_arg[arg])); +#if SIZEOF_KERNEL_LONG_T > 4 +# ifndef current_klongsize + if (current_klongsize < SIZEOF_KERNEL_LONG_T) { + tprintf("%" PRI_kld, (tcp->u_arg[arg + 1] << 32) + | tcp->u_arg[arg]); } else -# endif +# endif /* !current_klongsize */ { - tprintf("%lld", tcp->ext_arg[arg]); + tprintf("%" PRI_kld, tcp->u_arg[arg]); } -#else /* SIZEOF_LONG_LONG > SIZEOF_LONG && !HAVE_STRUCT_TCB_EXT_ARG */ +#else /* SIZEOF_KERNEL_LONG_T == 4 */ tprintf("%lld", - (zero_extend_signed_to_ull(tcp->u_arg[arg + 1]) << sizeof(long) * 8) - | zero_extend_signed_to_ull(tcp->u_arg[arg])); + ((long long) tcp->u_arg[arg + 1] << 32) + | ((long long) tcp->u_arg[arg])); #endif } @@ -226,9 +203,13 @@ do_preadv(struct tcb *tcp, const int flags_arg) printfd(tcp, tcp->u_arg[0]); tprints(", "); } else { - tprint_iov_upto(tcp, tcp->u_arg[2], tcp->u_arg[1], IOV_DECODE_STR, - tcp->u_rval); - tprintf(", %lu, ", tcp->u_arg[2]); + kernel_ulong_t len = + truncate_kulong_to_current_wordsize(tcp->u_arg[2]); + + tprint_iov_upto(tcp, len, tcp->u_arg[1], + syserror(tcp) ? IOV_DECODE_ADDR : + IOV_DECODE_STR, tcp->u_rval); + tprintf(", %" PRI_klu ", ", len); print_lld_from_low_high_val(tcp, 3); if (flags_arg >= 0) { tprints(", "); @@ -251,10 +232,13 @@ SYS_FUNC(preadv2) static int do_pwritev(struct tcb *tcp, const int flags_arg) { + kernel_ulong_t len = + truncate_kulong_to_current_wordsize(tcp->u_arg[2]); + printfd(tcp, tcp->u_arg[0]); tprints(", "); - tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], IOV_DECODE_STR); - tprintf(", %lu, ", tcp->u_arg[2]); + tprint_iov(tcp, len, tcp->u_arg[1], IOV_DECODE_STR); + tprintf(", %" PRI_klu ", ", len); print_lld_from_low_high_val(tcp, 3); if (flags_arg >= 0) { tprints(", "); @@ -285,7 +269,7 @@ SYS_FUNC(tee) printfd(tcp, tcp->u_arg[1]); tprints(", "); /* size_t len */ - tprintf("%lu, ", tcp->u_arg[2]); + tprintf("%" PRI_klu ", ", tcp->u_arg[2]); /* unsigned int flags */ printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???"); @@ -307,7 +291,7 @@ SYS_FUNC(splice) printnum_int64(tcp, tcp->u_arg[3], "%" PRId64); tprints(", "); /* size_t len */ - tprintf("%lu, ", tcp->u_arg[4]); + tprintf("%" PRI_klu ", ", tcp->u_arg[4]); /* unsigned int flags */ printflags(splice_flags, tcp->u_arg[5], "SPLICE_F_???"); @@ -321,7 +305,7 @@ SYS_FUNC(vmsplice) tprints(", "); /* const struct iovec *iov, unsigned long nr_segs */ tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], IOV_DECODE_STR); - tprintf(", %lu, ", tcp->u_arg[2]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[2]); /* unsigned int flags */ printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???"); diff --git a/ioctl.c b/ioctl.c index e4b20d97c..aa1880f8d 100644 --- a/ioctl.c +++ b/ioctl.c @@ -42,7 +42,7 @@ static int compare(const void *a, const void *b) { - const unsigned int code1 = (const unsigned long) a; + const unsigned int code1 = (const uintptr_t) a; const unsigned int code2 = ((struct_ioctlent *) b)->code; return (code1 > code2) ? 1 : (code1 < code2) ? -1 : 0; } @@ -52,7 +52,7 @@ ioctl_lookup(const unsigned int code) { struct_ioctlent *iop; - iop = bsearch((const void *) (const unsigned long) code, ioctlent, + iop = bsearch((const void *) (const uintptr_t) code, ioctlent, nioctlents, sizeof(ioctlent[0]), compare); while (iop > ioctlent) { iop--; @@ -79,7 +79,7 @@ ioctl_print_code(const unsigned int code) { tprints("_IOC("); printflags(ioctl_dirs, _IOC_DIR(code), "_IOC_???"); - tprintf(", 0x%02x, 0x%02x, 0x%02x)", + tprintf(", %#x, %#x, %#x)", _IOC_TYPE(code), _IOC_NR(code), _IOC_SIZE(code)); } @@ -227,7 +227,7 @@ static int ioctl_decode(struct tcb *tcp) { const unsigned int code = tcp->u_arg[1]; - const long arg = tcp->u_arg[2]; + const kernel_ulong_t arg = tcp->u_arg[2]; switch (_IOC_TYPE(code)) { #if defined(ALPHA) || defined(POWERPC) @@ -255,10 +255,8 @@ ioctl_decode(struct tcb *tcp) return block_ioctl(tcp, code, arg); case 'X': return fs_x_ioctl(tcp, code, arg); -#ifdef HAVE_SCSI_SG_H case 0x22: return scsi_ioctl(tcp, code, arg); -#endif case 'L': return loop_ioctl(tcp, code, arg); case 'M': @@ -281,6 +279,10 @@ ioctl_decode(struct tcb *tcp) #ifdef HAVE_LINUX_BTRFS_H case 0x94: return btrfs_ioctl(tcp, code, arg); +#endif +#ifdef HAVE_LINUX_DM_IOCTL_H + case 0xfd: + return dm_ioctl(tcp, code, arg); #endif default: break; @@ -319,7 +321,7 @@ SYS_FUNC(ioctl) if (ret) --ret; else - tprintf(", %#lx", tcp->u_arg[2]); + tprintf(", %#" PRI_klx, tcp->u_arg[2]); ret |= RVAL_DECODED; } else { if (ret) diff --git a/ioctl_iocdef.c b/ioctl_iocdef.c new file mode 100644 index 000000000..accbbedd5 --- /dev/null +++ b/ioctl_iocdef.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2017 Alexey Neyman + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * This file is *PREPROCESSED*, not *COMPILED* for host and the result + * is included into ioctlsort (which is compiled for build). Since some + * of these values are used in structure initializers, they cannot be + * defined as 'const unsigned int' - instead, they have to be macros. + * Hence, the result of preprocessing will be run through sed to change + * 'DEFINE' into '#define' + */ +#include + +DEFINE HOST_IOC_NONE _IOC_NONE +DEFINE HOST_IOC_READ _IOC_READ +DEFINE HOST_IOC_WRITE _IOC_WRITE + +DEFINE HOST_IOC_SIZESHIFT _IOC_SIZESHIFT +DEFINE HOST_IOC_DIRSHIFT _IOC_DIRSHIFT diff --git a/ioctl_iocdef.h b/ioctl_iocdef.h new file mode 100644 index 000000000..adf725586 --- /dev/null +++ b/ioctl_iocdef.h @@ -0,0 +1,5 @@ +#define _IOC_NONE 0U +#define _IOC_READ 2U +#define _IOC_WRITE 1U +#define _IOC_SIZESHIFT ((0 +8)+8) +#define _IOC_DIRSHIFT (((0 +8)+8)+14) diff --git a/ioctl_redefs1.h b/ioctl_redefs1.h index ea9169995..f5b401546 100644 --- a/ioctl_redefs1.h +++ b/ioctl_redefs1.h @@ -326,6 +326,10 @@ # undef DRM_IOCTL_MODE_OBJ_SETPROPERTY # define DRM_IOCTL_MODE_OBJ_SETPROPERTY 0xc01464ba #endif +#ifdef DRM_IOCTL_MSM_GEM_SUBMIT +# undef DRM_IOCTL_MSM_GEM_SUBMIT +# define DRM_IOCTL_MSM_GEM_SUBMIT 0xc0246446 +#endif #ifdef DRM_IOCTL_R128_DEPTH # undef DRM_IOCTL_R128_DEPTH # define DRM_IOCTL_R128_DEPTH 0x4018644c diff --git a/ioctl_redefs2.h b/ioctl_redefs2.h index d691a6120..d88140011 100644 --- a/ioctl_redefs2.h +++ b/ioctl_redefs2.h @@ -710,14 +710,6 @@ # undef KCOV_INIT_TRACE # define KCOV_INIT_TRACE 0x80046301 #endif -#ifdef KVM_S390_STORE_STATUS -# undef KVM_S390_STORE_STATUS -# define KVM_S390_STORE_STATUS 0x4004ae95 -#endif -#ifdef KVM_S390_VCPU_FAULT -# undef KVM_S390_VCPU_FAULT -# define KVM_S390_VCPU_FAULT 0x4004ae52 -#endif #ifdef MATROXFB_GET_ALL_OUTPUTS # undef MATROXFB_GET_ALL_OUTPUTS # define MATROXFB_GET_ALL_OUTPUTS 0x80046efb diff --git a/ioctlent0.h b/ioctlent0.h index 40f33f462..e6ffddbfb 100644 --- a/ioctlent0.h +++ b/ioctlent0.h @@ -574,9 +574,6 @@ { "HPET_IE_OFF", 0x00006802 }, { "HPET_EPI", 0x00006804 }, { "HPET_DPI", 0x00006805 }, -{ "LIRC_NOTIFY_DECODE", 0x00006920 }, -{ "LIRC_SETUP_START", 0x00006921 }, -{ "LIRC_SETUP_END", 0x00006922 }, { "KYRO_IOCTL_OVERLAY_CREATE", 0x00006b00 }, { "KYRO_IOCTL_OVERLAY_VIEWPORT_SET", 0x00006b01 }, { "KYRO_IOCTL_SET_VIDEO_MODE", 0x00006b02 }, @@ -757,6 +754,7 @@ { "SIOCSMIIREG", 0x00008949 }, { "SIOCWANDEV", 0x0000894a }, { "SIOCOUTQNSD", 0x0000894b }, +{ "SIOCGSKNS", 0x0000894c }, { "SIOCDARP", 0x00008953 }, { "SIOCGARP", 0x00008954 }, { "SIOCSARP", 0x00008955 }, @@ -880,7 +878,11 @@ { "KVM_SMI", 0x0000aeb7 }, { "VHOST_SET_OWNER", 0x0000af01 }, { "VHOST_RESET_OWNER", 0x0000af02 }, +{ "BT_BMC_IOCTL_SMS_ATN", 0x0000b100 }, { "PPPOEIOCDFWD", 0x0000b101 }, +{ "NS_GET_USERNS", 0x0000b701 }, +{ "NS_GET_PARENT", 0x0000b702 }, +{ "IOCTL_EVTCHN_RESTRICT_DOMID", 0x00024506 }, { "IOCTL_EVTCHN_BIND_VIRQ", 0x00044500 }, { "IOCTL_EVTCHN_BIND_UNBOUND_PORT", 0x00044502 }, { "IOCTL_EVTCHN_UNBIND", 0x00044503 }, @@ -908,8 +910,11 @@ { "SONYPI_IOCSBLUE", 0x40017609 }, { "SONYPI_IOCSFAN", 0x4001760b }, { "HFI1_IOCTL_SET_PKEY", 0x40021beb }, +{ "CEC_ADAP_S_PHYS_ADDR", 0x40026102 }, { "ATM_SETBACKEND", 0x400261f2 }, { "ATM_NEWBACKENDIF", 0x400261f3 }, +{ "RIO_CM_CHAN_CLOSE", 0x40026304 }, +{ "RIO_CM_CHAN_LISTEN", 0x40026306 }, { "RIO_MPORT_MAINT_HDID_SET", 0x40026d01 }, { "NCP_IOC_GETMOUNTUID", 0x40026e02 }, { "AUDIO_SET_ATTRIBUTES", 0x40026f11 }, @@ -1034,9 +1039,9 @@ { "VIDIOC_STREAMOFF", 0x40045613 }, { "VIDIOC_S_PRIORITY", 0x40045644 }, { "IVTV_IOC_PASSTHROUGH_MODE", 0x400456c1 }, -{ "SW_SYNC_IOC_INC", 0x40045701 }, { "SNDRV_RAWMIDI_IOCTL_DROP", 0x40045730 }, { "SNDRV_RAWMIDI_IOCTL_DRAIN", 0x40045731 }, +{ "CEC_S_MODE", 0x40046109 }, { "SONET_SETFRAMING", 0x40046115 }, { "ATM_SETSC", 0x400461f1 }, { "ATM_DROPPARTY", 0x400461f5 }, @@ -1069,15 +1074,10 @@ { "LIRC_SET_SEND_CARRIER", 0x40046913 }, { "LIRC_SET_REC_CARRIER", 0x40046914 }, { "LIRC_SET_SEND_DUTY_CYCLE", 0x40046915 }, -{ "LIRC_SET_REC_DUTY_CYCLE", 0x40046916 }, { "LIRC_SET_TRANSMITTER_MASK", 0x40046917 }, { "LIRC_SET_REC_TIMEOUT", 0x40046918 }, { "LIRC_SET_REC_TIMEOUT_REPORTS", 0x40046919 }, -{ "LIRC_SET_REC_FILTER_PULSE", 0x4004691a }, -{ "LIRC_SET_REC_FILTER_SPACE", 0x4004691b }, -{ "LIRC_SET_REC_FILTER", 0x4004691c }, { "LIRC_SET_MEASURE_CARRIER_MODE", 0x4004691d }, -{ "LIRC_SET_REC_DUTY_CYCLE_RANGE", 0x4004691e }, { "IPMICTL_SET_MAINTENANCE_MODE_CMD", 0x4004691f }, { "LIRC_SET_REC_CARRIER_RANGE", 0x4004691f }, { "LIRC_SET_WIDEBAND_RECEIVER", 0x40046923 }, @@ -1162,6 +1162,7 @@ { "VHOST_SCSI_GET_ABI_VERSION", 0x4004af42 }, { "VHOST_SCSI_SET_EVENTS_MISSED", 0x4004af43 }, { "VHOST_SCSI_GET_EVENTS_MISSED", 0x4004af44 }, +{ "VHOST_VSOCK_SET_RUNNING", 0x4004af61 }, { "SISFB_SET_AUTOMAXIMIZE", 0x4004f303 }, { "SISFB_SET_TVPOSOFFSET", 0x4004f304 }, { "SISFB_SET_LOCK", 0x4004f306 }, @@ -1220,6 +1221,8 @@ { "BINDER_SET_IDLE_TIMEOUT", 0x40086203 }, { "CM_IOCSPTS", 0x40086302 }, { "BC_FREE_BUFFER", 0x40086303 }, +{ "RIO_CM_CHAN_BIND", 0x40086305 }, +{ "RIO_CM_CHAN_CONNECT", 0x40086308 }, { "BC_ATTEMPT_ACQUIRE", 0x4008630a }, { "BC_DEAD_BINDER_DONE", 0x40086310 }, { "CM_IOSDBGLVL", 0x400863fa }, @@ -1236,6 +1239,7 @@ { "DRM_IOCTL_MGA_FLUSH", 0x40086441 }, { "DRM_IOCTL_R128_CCE_STOP", 0x40086442 }, { "DRM_IOCTL_RADEON_CP_STOP", 0x40086442 }, +{ "DRM_IOCTL_VGEM_FENCE_SIGNAL", 0x40086442 }, { "DRM_IOCTL_SAVAGE_BCI_EVENT_WAIT", 0x40086443 }, { "DRM_IOCTL_OMAP_GEM_CPU_PREP", 0x40086444 }, { "DRM_IOCTL_ETNAVIV_GEM_CPU_FINI", 0x40086445 }, @@ -1317,6 +1321,7 @@ { "VHOST_SET_VRING_BUSYLOOP_TIMEOUT", 0x4008af23 }, { "VHOST_GET_VRING_BUSYLOOP_TIMEOUT", 0x4008af24 }, { "VHOST_NET_SET_BACKEND", 0x4008af30 }, +{ "VHOST_VSOCK_SET_GUEST_CID", 0x4008af60 }, { "PPPOEIOCSFWD", 0x4008b100 }, { "IOW_WRITE", 0x4008c001 }, { "IOW_READ", 0x4008c002 }, @@ -1350,8 +1355,8 @@ { "NCP_IOC_GETROOT", 0x400c6e08 }, { "UBI_IOCRSVOL", 0x400c6f02 }, { "AUDIO_SET_KARAOKE", 0x400c6f12 }, -{ "KVM_CREATE_SPAPR_TCE", 0x400caea8 }, { "MBXFB_IOCS_REG", 0x400cf404 }, +{ "BLKRESETZONE", 0x40101283 }, { "FW_CDEV_IOC_START_ISO", 0x4010230a }, { "FW_CDEV_IOC_SET_ISO_CHANNELS", 0x40102317 }, { "PTP_EXTTS_REQUEST", 0x40103d02 }, @@ -1408,6 +1413,7 @@ { "BC_INCREFS_DONE", 0x40106308 }, { "CHIOGSTATUS", 0x40106308 }, { "BC_ACQUIRE_DONE", 0x40106309 }, +{ "RIO_CM_CHAN_SEND", 0x40106309 }, { "DRM_IOCTL_SET_CLIENT_CAP", 0x4010640d }, { "DRM_IOCTL_SET_UNIQUE", 0x40106410 }, { "DRM_IOCTL_FREE_BUFS", 0x4010641a }, @@ -1546,9 +1552,6 @@ { "KVM_SET_USER_MEMORY_REGION", 0x4020ae46 }, { "KVM_IRQFD", 0x4020ae76 }, { "KVM_SIGNAL_MSI", 0x4020aea5 }, -{ "KVM_CREATE_SPAPR_TCE_64", 0x4020aea8 }, -{ "KVM_PPC_GET_HTAB_FD", 0x4020aeaa }, -{ "KVM_ARM_VCPU_INIT", 0x4020aeae }, { "KVM_S390_SET_IRQ_STATE", 0x4020aeb5 }, { "KVM_S390_GET_IRQ_STATE", 0x4020aeb6 }, { "SNDRV_COMPRESS_SET_METADATA", 0x40244314 }, @@ -1661,7 +1664,6 @@ { "DRM_IOCTL_MGA_INIT", 0x40806440 }, { "KVM_PPC_GET_PVINFO", 0x4080aea1 }, { "KVM_SET_DEBUGREGS", 0x4080aea2 }, -{ "KVM_PPC_RTAS_DEFINE_TOKEN", 0x4080aeac }, { "SNDRV_COMPRESS_SET_PARAMS", 0x40844312 }, { "V4L2_DEVICE_NOTIFY_EVENT", 0x40887602 }, { "SNDRV_SEQ_IOCTL_DELETE_QUEUE", 0x408c5333 }, @@ -1722,6 +1724,7 @@ { "CAPI_INSTALLED", 0x80024322 }, { "SNDRV_DM_FM_IOCTL_INFO", 0x80024820 }, { "IOCTL_WDM_MAX_COMMAND", 0x800248a0 }, +{ "CEC_ADAP_G_PHYS_ADDR", 0x80026101 }, { "IPMICTL_REGISTER_FOR_CMD", 0x8002690e }, { "IPMICTL_UNREGISTER_FOR_CMD", 0x8002690f }, { "FE_READ_SIGNAL_STRENGTH", 0x80026f47 }, @@ -1841,6 +1844,7 @@ { "WDIOC_GETTIMEOUT", 0x80045707 }, { "WDIOC_GETPRETIMEOUT", 0x80045709 }, { "WDIOC_GETTIMELEFT", 0x8004570a }, +{ "CEC_G_MODE", 0x80046108 }, { "SONET_GETDIAG", 0x80046114 }, { "SONET_GETFRAMING", 0x80046116 }, { "CHIOGPICKER", 0x80046304 }, @@ -1850,18 +1854,10 @@ { "LIRC_GET_FEATURES", 0x80046900 }, { "LIRC_GET_SEND_MODE", 0x80046901 }, { "LIRC_GET_REC_MODE", 0x80046902 }, -{ "LIRC_GET_SEND_CARRIER", 0x80046903 }, -{ "LIRC_GET_REC_CARRIER", 0x80046904 }, -{ "LIRC_GET_SEND_DUTY_CYCLE", 0x80046905 }, -{ "LIRC_GET_REC_DUTY_CYCLE", 0x80046906 }, { "LIRC_GET_REC_RESOLUTION", 0x80046907 }, { "I2OVALIDATE", 0x80046908 }, { "LIRC_GET_MIN_TIMEOUT", 0x80046908 }, { "LIRC_GET_MAX_TIMEOUT", 0x80046909 }, -{ "LIRC_GET_MIN_FILTER_PULSE", 0x8004690a }, -{ "LIRC_GET_MAX_FILTER_PULSE", 0x8004690b }, -{ "LIRC_GET_MIN_FILTER_SPACE", 0x8004690c }, -{ "LIRC_GET_MAX_FILTER_SPACE", 0x8004690d }, { "LIRC_GET_LENGTH", 0x8004690f }, { "IPMICTL_SET_GETS_EVENTS_CMD", 0x80046910 }, { "IPMICTL_SET_MY_ADDRESS_CMD", 0x80046911 }, @@ -2014,7 +2010,6 @@ { "BTRFS_IOC_START_SYNC", 0x80089418 }, { "BTRFS_IOC_SUBVOL_GETFLAGS", 0x80089419 }, { "KVM_X86_GET_MCE_CAP_SUPPORTED", 0x8008ae9d }, -{ "KVM_ALLOCATE_RMA", 0x8008aea9 }, { "VHOST_GET_FEATURES", 0x8008af00 }, { "FUNCTIONFS_ENDPOINT_DESC", 0x80096782 }, { "DMX_GET_PES_PIDS", 0x800a6f2f }, @@ -2102,7 +2097,6 @@ { "VIDEO_GET_EVENT", 0x80206f1c }, { "RTC_PLL_GET", 0x80207011 }, { "PPPIOCGXASYNCMAP", 0x80207450 }, -{ "KVM_ARM_PREFERRED_TARGET", 0x8020aeaf }, { "SNDRV_HDSP_IOCTL_GET_CONFIG_INFO", 0x80244841 }, { "SNDRV_HDSPM_IOCTL_GET_VERSION", 0x80244848 }, { "SONET_GETSTAT", 0x80246110 }, @@ -2156,6 +2150,7 @@ { "FDPOLLDRVSTAT", 0x80500213 }, { "PTP_CLOCK_GETCAPS", 0x80503d01 }, { "SOUND_MIXER_INFO", 0x805c4d65 }, +{ "CEC_ADAP_G_LOG_ADDRS", 0x805c6103 }, { "SNDRV_TIMER_IOCTL_STATUS", 0x80605414 }, { "VIDIOC_QUERYCAP", 0x80685600 }, { "I2OEVTGET", 0x8068690b }, @@ -2213,6 +2208,7 @@ { "KVM_GET_XSAVE", 0x9000aea4 }, { "HIDIOCGRDESC", 0x90044802 }, { "GADGET_SET_PRINTER_STATUS", 0xc0016722 }, +{ "RIO_CM_CHAN_CREATE", 0xc0026303 }, { "CAPI_GET_MANUFACTURER", 0xc0044306 }, { "CAPI_GET_SERIAL", 0xc0044308 }, { "GIGASET_REDIR", 0xc0044700 }, @@ -2253,6 +2249,9 @@ { "SONET_SETDIAG", 0xc0046112 }, { "SONET_CLRDIAG", 0xc0046113 }, { "BINDER_VERSION", 0xc0046209 }, +{ "RIO_CM_EP_GET_LIST_SIZE", 0xc0046301 }, +{ "RIO_CM_EP_GET_LIST", 0xc0046302 }, +{ "RIO_CM_MPORT_GET_LIST", 0xc004630b }, { "DRM_IOCTL_BLOCK", 0xc0046412 }, { "DRM_IOCTL_UNBLOCK", 0xc0046413 }, { "DRM_IOCTL_ADD_DRAW", 0xc0046427 }, @@ -2290,6 +2289,7 @@ { "VIDIOC_S_CTRL", 0xc008561c }, { "VIDIOC_OMAP3ISP_STAT_EN", 0xc00856c7 }, { "CM_IOCGATR", 0xc0086301 }, +{ "RIO_CM_CHAN_ACCEPT", 0xc0086307 }, { "CIOC_KERNEL_VERSION", 0xc008630a }, { "DRM_IOCTL_GEM_FLINK", 0xc008640a }, { "DRM_IOCTL_ADD_CTX", 0xc0086420 }, @@ -2353,6 +2353,7 @@ { "UI_BEGIN_FF_ERASE", 0xc00c55ca }, { "DRM_IOCTL_PRIME_HANDLE_TO_FD", 0xc00c642d }, { "DRM_IOCTL_PRIME_FD_TO_HANDLE", 0xc00c642e }, +{ "DRM_IOCTL_MSM_GEM_MADVISE", 0xc00c6448 }, { "DRM_IOCTL_VIA_CMDBUF_SIZE", 0xc00c644b }, { "DRM_IOCTL_I915_VBLANK_SWAP", 0xc00c644f }, { "DRM_IOCTL_RADEON_GEM_SET_DOMAIN", 0xc00c6463 }, @@ -2362,6 +2363,7 @@ { "KVM_CREATE_DEVICE", 0xc00caee0 }, { "FSL_HV_IOCTL_PARTITION_GET_STATUS", 0xc00caf02 }, { "MBXFB_IOCX_REG", 0xc00cf405 }, +{ "BLKREPORTZONE", 0xc0101282 }, { "STP_POLICY_ID_SET", 0xc0102500 }, { "CAPI_GET_VERSION", 0xc0104307 }, { "CAPI_MANUFACTURER_CMD", 0xc0104320 }, @@ -2380,6 +2382,7 @@ { "USBDEVFS_BULK32", 0xc0105502 }, { "USBDEVFS_IOCTL", 0xc0105512 }, { "NS_GETPSTAT", 0xc0106161 }, +{ "RIO_CM_CHAN_RECEIVE", 0xc010630a }, { "DRM_IOCTL_GET_UNIQUE", 0xc0106401 }, { "DRM_IOCTL_IRQ_BUSID", 0xc0106403 }, { "DRM_IOCTL_SET_VERSION", 0xc0106407 }, @@ -2398,6 +2401,7 @@ { "DRM_IOCTL_QXL_MAP", 0xc0106441 }, { "DRM_IOCTL_TEGRA_GEM_MMAP", 0xc0106441 }, { "DRM_IOCTL_VC4_WAIT_SEQNO", 0xc0106441 }, +{ "DRM_IOCTL_VGEM_FENCE_ATTACH", 0xc0106441 }, { "DRM_IOCTL_VIRTGPU_MAP", 0xc0106441 }, { "DRM_IOCTL_AMDGPU_CTX", 0xc0106442 }, { "DRM_IOCTL_ETNAVIV_GEM_NEW", 0xc0106442 }, @@ -2419,6 +2423,7 @@ { "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", 0xc0106447 }, { "DRM_IOCTL_EXYNOS_VIDI_CONNECTION", 0xc0106447 }, { "DRM_IOCTL_TEGRA_GET_SYNCPT", 0xc0106447 }, +{ "DRM_IOCTL_VC4_GET_PARAM", 0xc0106447 }, { "DRM_IOCTL_MGA_GETPARAM", 0xc0106449 }, { "DRM_IOCTL_TEGRA_GET_SYNCPT_BASE", 0xc0106449 }, { "DRM_IOCTL_TEGRA_GEM_SET_TILING", 0xc010644a }, @@ -2462,6 +2467,7 @@ { "DRM_IOCTL_I915_GET_SPRITE_COLORKEY", 0xc014646a }, { "DRM_IOCTL_I915_SET_SPRITE_COLORKEY", 0xc014646b }, { "DRM_IOCTL_MODE_GETENCODER", 0xc01464a6 }, +{ "VTPM_PROXY_IOC_NEW_DEV", 0xc014a100 }, { "HFI1_IOCTL_TID_UPDATE", 0xc0181be4 }, { "HFI1_IOCTL_TID_FREE", 0xc0181be5 }, { "HFI1_IOCTL_TID_INVAL_READ", 0xc0181bed }, @@ -2472,6 +2478,7 @@ { "FW_CDEV_IOC_SEND_PHY_PACKET", 0xc0182315 }, { "HIDIOCGUSAGE", 0xc018480b }, { "HIDIOCGUCODE", 0xc018480d }, +{ "ION_IOC_HEAP_QUERY", 0xc0184908 }, { "AMDKFD_IOC_WAIT_EVENTS", 0xc0184b0c }, { "MTRRIOC_GET_ENTRY", 0xc0184d03 }, { "MTRRIOC_GET_PAGE_ENTRY", 0xc0184d08 }, @@ -2494,6 +2501,7 @@ { "DRM_IOCTL_VIRTGPU_GET_CAPS", 0xc0186449 }, { "DRM_IOCTL_VIA_WAIT_IRQ", 0xc018644d }, { "DRM_IOCTL_AMDGPU_GEM_USERPTR", 0xc0186451 }, +{ "DRM_IOCTL_AMDGPU_WAIT_FENCES", 0xc0186452 }, { "DRM_IOCTL_RADEON_ALLOC", 0xc0186453 }, { "DRM_IOCTL_I915_GEM_PIN", 0xc0186455 }, { "DRM_IOCTL_RADEON_GEM_INFO", 0xc018645c }, @@ -2560,7 +2568,6 @@ { "DRM_IOCTL_AMDGPU_GEM_CREATE", 0xc0206440 }, { "DRM_IOCTL_VIA_ALLOCMEM", 0xc0206440 }, { "DRM_IOCTL_SIS_FB_ALLOC", 0xc0206444 }, -{ "DRM_IOCTL_MSM_GEM_SUBMIT", 0xc0206446 }, { "DRM_IOCTL_VIA_DMA_INIT", 0xc0206447 }, { "DRM_IOCTL_AMDGPU_WAIT_CS", 0xc0206449 }, { "DRM_IOCTL_MGA_DMA_BOOTSTRAP", 0xc020644c }, @@ -2596,11 +2603,11 @@ { "VIDIOC_ENCODER_CMD", 0xc028564d }, { "VIDIOC_TRY_ENCODER_CMD", 0xc028564e }, { "VIDIOC_OMAP3ISP_STAT_REQ", 0xc02856c6 }, -{ "SW_SYNC_IOC_CREATE_FENCE", 0xc0285700 }, { "DRM_IOCTL_GET_MAP", 0xc0286404 }, { "DRM_IOCTL_GET_CLIENT", 0xc0286405 }, { "DRM_IOCTL_ADD_MAP", 0xc0286415 }, { "DRM_IOCTL_VIA_MAP_INIT", 0xc0286444 }, +{ "DRM_IOCTL_MSM_GEM_SUBMIT", 0xc0286446 }, { "DRM_IOCTL_I915_GEM_MMAP", 0xc028645e }, { "DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST", 0xc0286461 }, { "DRM_IOCTL_EXYNOS_IPP_QUEUE_BUF", 0xc0286472 }, @@ -2650,6 +2657,7 @@ { "IPMICTL_RECEIVE_MSG_TRUNC", 0xc030690b }, { "IPMICTL_RECEIVE_MSG", 0xc030690c }, { "NCP_IOC_GET_FS_INFO_V2", 0xc0306e04 }, +{ "GPIO_GET_LINEEVENT_IOCTL", 0xc030b404 }, { "MBXFB_IOCX_OVERLAY", 0xc030f400 }, { "VIDIOC_ENUMAUDIO", 0xc0345641 }, { "VIDIOC_ENUMAUDOUT", 0xc0345642 }, @@ -2662,6 +2670,8 @@ { "VIDIOC_DBG_G_REGISTER", 0xc0385650 }, { "VIDIOC_OMAP3ISP_CCDC_CFG", 0xc03856c1 }, { "SNDRV_RAWMIDI_IOCTL_STATUS", 0xc0385720 }, +{ "CEC_TRANSMIT", 0xc0386105 }, +{ "CEC_RECEIVE", 0xc0386106 }, { "DRM_IOCTL_VIRTGPU_RESOURCE_CREATE", 0xc0386444 }, { "DRM_IOCTL_MODE_ATOMIC", 0xc03864bc }, { "BTRFS_IOC_INO_PATHS", 0xc0389423 }, @@ -2686,6 +2696,8 @@ { "DRM_IOCTL_NOUVEAU_GEM_PUSHBUF", 0xc0406481 }, { "DRM_IOCTL_MODE_GETRESOURCES", 0xc04064a0 }, { "DRM_IOCTL_MODE_GETPROPERTY", 0xc04064aa }, +{ "GPIOHANDLE_GET_LINE_VALUES_IOCTL", 0xc040b408 }, +{ "GPIOHANDLE_SET_LINE_VALUES_IOCTL", 0xc040b409 }, { "VIDIOC_QUERYCTRL", 0xc0445624 }, { "VIDIOC_G_MODULATOR", 0xc0445636 }, { "BLKTRACESETUP", 0xc0481273 }, @@ -2706,10 +2718,12 @@ { "GPIO_GET_LINEINFO_IOCTL", 0xc048b402 }, { "SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT", 0xc04c5349 }, { "VIDIOC_OMAP3ISP_AF_CFG", 0xc04c56c5 }, +{ "CEC_ADAP_G_CAPS", 0xc04c6100 }, { "SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION", 0xc0505350 }, { "SNDRV_TIMER_IOCTL_GSTATUS", 0xc0505405 }, { "SNDRV_CTL_IOCTL_ELEM_LIST", 0xc0505510 }, { "VIDIOC_ENUMINPUT", 0xc050561a }, +{ "CEC_DQEVENT", 0xc0506107 }, { "DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY", 0xc0506470 }, { "DRM_IOCTL_MODE_GETCONNECTOR", 0xc05064a7 }, { "VIDIOC_G_TUNER", 0xc054561d }, @@ -2726,6 +2740,7 @@ { "VIDIOC_PREPARE_BUF", 0xc058565d }, { "DRM_IOCTL_TEGRA_SUBMIT", 0xc0586448 }, { "SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS", 0xc05c5340 }, +{ "CEC_ADAP_S_LOG_ADDRS", 0xc05c6104 }, { "PTP_PIN_GETFUNC", 0xc0603d06 }, { "CCISS_BIG_PASSTHRU", 0xc0604212 }, { "SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER", 0xc0605345 }, @@ -2816,11 +2831,11 @@ { "DM_LIST_VERSIONS", 0xc138fd0d }, { "DM_TARGET_MSG", 0xc138fd0e }, { "DM_DEV_SET_GEOMETRY", 0xc138fd0f }, +{ "GPIO_GET_LINEHANDLE_IOCTL", 0xc16cb403 }, { "SNDRV_EMU10K1_IOCTL_CODE_PEEK", 0xc1b04812 }, { "KVM_GET_IRQCHIP", 0xc208ae62 }, { "SNDRV_PCM_IOCTL_HW_REFINE", 0xc2604110 }, { "SNDRV_PCM_IOCTL_HW_PARAMS", 0xc2604111 }, -{ "VIDIOC_VSP1_LUT_CONFIG", 0xc40056c1 }, { "BTRFS_IOC_SCRUB", 0xc400941b }, { "BTRFS_IOC_SCRUB_PROGRESS", 0xc400941d }, { "BTRFS_IOC_BALANCE_V2", 0xc4009420 }, diff --git a/ioctlent1.h b/ioctlent1.h index 03384b3fd..8e963ae85 100644 --- a/ioctlent1.h +++ b/ioctlent1.h @@ -574,9 +574,6 @@ { "HPET_IE_OFF", 0x00006802 }, { "HPET_EPI", 0x00006804 }, { "HPET_DPI", 0x00006805 }, -{ "LIRC_NOTIFY_DECODE", 0x00006920 }, -{ "LIRC_SETUP_START", 0x00006921 }, -{ "LIRC_SETUP_END", 0x00006922 }, { "KYRO_IOCTL_OVERLAY_CREATE", 0x00006b00 }, { "KYRO_IOCTL_OVERLAY_VIEWPORT_SET", 0x00006b01 }, { "KYRO_IOCTL_SET_VIDEO_MODE", 0x00006b02 }, @@ -757,6 +754,7 @@ { "SIOCSMIIREG", 0x00008949 }, { "SIOCWANDEV", 0x0000894a }, { "SIOCOUTQNSD", 0x0000894b }, +{ "SIOCGSKNS", 0x0000894c }, { "SIOCDARP", 0x00008953 }, { "SIOCGARP", 0x00008954 }, { "SIOCSARP", 0x00008955 }, @@ -880,7 +878,11 @@ { "KVM_SMI", 0x0000aeb7 }, { "VHOST_SET_OWNER", 0x0000af01 }, { "VHOST_RESET_OWNER", 0x0000af02 }, +{ "BT_BMC_IOCTL_SMS_ATN", 0x0000b100 }, { "PPPOEIOCDFWD", 0x0000b101 }, +{ "NS_GET_USERNS", 0x0000b701 }, +{ "NS_GET_PARENT", 0x0000b702 }, +{ "IOCTL_EVTCHN_RESTRICT_DOMID", 0x00024506 }, { "IOCTL_EVTCHN_BIND_VIRQ", 0x00044500 }, { "IOCTL_EVTCHN_BIND_UNBOUND_PORT", 0x00044502 }, { "IOCTL_EVTCHN_UNBIND", 0x00044503 }, @@ -908,8 +910,11 @@ { "SONYPI_IOCSBLUE", 0x40017609 }, { "SONYPI_IOCSFAN", 0x4001760b }, { "HFI1_IOCTL_SET_PKEY", 0x40021beb }, +{ "CEC_ADAP_S_PHYS_ADDR", 0x40026102 }, { "ATM_SETBACKEND", 0x400261f2 }, { "ATM_NEWBACKENDIF", 0x400261f3 }, +{ "RIO_CM_CHAN_CLOSE", 0x40026304 }, +{ "RIO_CM_CHAN_LISTEN", 0x40026306 }, { "RIO_MPORT_MAINT_HDID_SET", 0x40026d01 }, { "NCP_IOC_GETMOUNTUID", 0x40026e02 }, { "AUDIO_SET_ATTRIBUTES", 0x40026f11 }, @@ -1051,9 +1056,9 @@ { "IVTV_IOC_PASSTHROUGH_MODE", 0x400456c1 }, { "VIDIOC_AM437X_CCDC_CFG", 0x400456c1 }, { "VPFE_CMD_S_CCDC_RAW_PARAMS", 0x400456c1 }, -{ "SW_SYNC_IOC_INC", 0x40045701 }, { "SNDRV_RAWMIDI_IOCTL_DROP", 0x40045730 }, { "SNDRV_RAWMIDI_IOCTL_DRAIN", 0x40045731 }, +{ "CEC_S_MODE", 0x40046109 }, { "SONET_SETFRAMING", 0x40046115 }, { "ATM_SETSC", 0x400461f1 }, { "ATM_DROPPARTY", 0x400461f5 }, @@ -1093,15 +1098,10 @@ { "LIRC_SET_SEND_CARRIER", 0x40046913 }, { "LIRC_SET_REC_CARRIER", 0x40046914 }, { "LIRC_SET_SEND_DUTY_CYCLE", 0x40046915 }, -{ "LIRC_SET_REC_DUTY_CYCLE", 0x40046916 }, { "LIRC_SET_TRANSMITTER_MASK", 0x40046917 }, { "LIRC_SET_REC_TIMEOUT", 0x40046918 }, { "LIRC_SET_REC_TIMEOUT_REPORTS", 0x40046919 }, -{ "LIRC_SET_REC_FILTER_PULSE", 0x4004691a }, -{ "LIRC_SET_REC_FILTER_SPACE", 0x4004691b }, -{ "LIRC_SET_REC_FILTER", 0x4004691c }, { "LIRC_SET_MEASURE_CARRIER_MODE", 0x4004691d }, -{ "LIRC_SET_REC_DUTY_CYCLE_RANGE", 0x4004691e }, { "IPMICTL_SET_MAINTENANCE_MODE_CMD", 0x4004691f }, { "LIRC_SET_REC_CARRIER_RANGE", 0x4004691f }, { "LIRC_SET_WIDEBAND_RECEIVER", 0x40046923 }, @@ -1210,6 +1210,7 @@ { "VHOST_SCSI_GET_ABI_VERSION", 0x4004af42 }, { "VHOST_SCSI_SET_EVENTS_MISSED", 0x4004af43 }, { "VHOST_SCSI_GET_EVENTS_MISSED", 0x4004af44 }, +{ "VHOST_VSOCK_SET_RUNNING", 0x4004af61 }, { "PPPOEIOCSFWD", 0x4004b100 }, { "IOW_WRITE", 0x4004c001 }, { "IOW_READ", 0x4004c002 }, @@ -1256,7 +1257,9 @@ { "DMA_BUF_IOCTL_SYNC", 0x40086200 }, { "BINDER_SET_IDLE_TIMEOUT", 0x40086203 }, { "BC_FREE_BUFFER", 0x40086303 }, +{ "RIO_CM_CHAN_BIND", 0x40086305 }, { "CHIOGSTATUS", 0x40086308 }, +{ "RIO_CM_CHAN_CONNECT", 0x40086308 }, { "BC_ATTEMPT_ACQUIRE", 0x4008630a }, { "BC_DEAD_BINDER_DONE", 0x40086310 }, { "DRM_IOCTL_MODESET_CTL", 0x40086408 }, @@ -1277,6 +1280,7 @@ { "DRM_IOCTL_MGA_FLUSH", 0x40086441 }, { "DRM_IOCTL_R128_CCE_STOP", 0x40086442 }, { "DRM_IOCTL_RADEON_CP_STOP", 0x40086442 }, +{ "DRM_IOCTL_VGEM_FENCE_SIGNAL", 0x40086442 }, { "DRM_IOCTL_SAVAGE_BCI_EVENT_WAIT", 0x40086443 }, { "DRM_IOCTL_OMAP_GEM_CPU_PREP", 0x40086444 }, { "DRM_IOCTL_ETNAVIV_GEM_CPU_FINI", 0x40086445 }, @@ -1340,6 +1344,7 @@ { "VHOST_SET_VRING_BUSYLOOP_TIMEOUT", 0x4008af23 }, { "VHOST_GET_VRING_BUSYLOOP_TIMEOUT", 0x4008af24 }, { "VHOST_NET_SET_BACKEND", 0x4008af30 }, +{ "VHOST_VSOCK_SET_GUEST_CID", 0x4008af60 }, { "SNDRV_DM_FM_IOCTL_SET_PARAMS", 0x40094824 }, { "FDFMTTRK", 0x400c0248 }, { "RUN_ARRAY", 0x400c0930 }, @@ -1413,9 +1418,9 @@ { "UBI_IOCRSVOL", 0x400c6f02 }, { "AUDIO_SET_KARAOKE", 0x400c6f12 }, { "PPPIOCSCOMPRESS", 0x400c744d }, -{ "KVM_CREATE_SPAPR_TCE", 0x400caea8 }, { "KVM_DIRTY_TLB", 0x400caeaa }, { "MBXFB_IOCS_REG", 0x400cf404 }, +{ "BLKRESETZONE", 0x40101283 }, { "FW_CDEV_IOC_START_ISO", 0x4010230a }, { "PTP_EXTTS_REQUEST", 0x40103d02 }, { "CCISS_SETNODENAME", 0x40104205 }, @@ -1429,6 +1434,7 @@ { "OMAPFB_GET_COLOR_KEY", 0x40104f33 }, { "BC_INCREFS_DONE", 0x40106308 }, { "BC_ACQUIRE_DONE", 0x40106309 }, +{ "RIO_CM_CHAN_SEND", 0x40106309 }, { "DRM_IOCTL_SET_CLIENT_CAP", 0x4010640d }, { "DRM_IOCTL_AGP_FREE", 0x40106435 }, { "DRM_IOCTL_OMAP_SET_PARAM", 0x40106441 }, @@ -1548,9 +1554,6 @@ { "KVM_SET_USER_MEMORY_REGION", 0x4020ae46 }, { "KVM_IRQFD", 0x4020ae76 }, { "KVM_SIGNAL_MSI", 0x4020aea5 }, -{ "KVM_CREATE_SPAPR_TCE_64", 0x4020aea8 }, -{ "KVM_PPC_GET_HTAB_FD", 0x4020aeaa }, -{ "KVM_ARM_VCPU_INIT", 0x4020aeae }, { "KVM_S390_SET_IRQ_STATE", 0x4020aeb5 }, { "KVM_S390_GET_IRQ_STATE", 0x4020aeb6 }, { "FW_CDEV_IOC_SEND_REQUEST", 0x40242301 }, @@ -1660,7 +1663,6 @@ { "UBI_IOCVOLCRBLK", 0x40804f07 }, { "KVM_PPC_GET_PVINFO", 0x4080aea1 }, { "KVM_SET_DEBUGREGS", 0x4080aea2 }, -{ "KVM_PPC_RTAS_DEFINE_TOKEN", 0x4080aeac }, { "SNDRV_COMPRESS_SET_PARAMS", 0x40844312 }, { "SNDRV_SEQ_IOCTL_DELETE_QUEUE", 0x408c5333 }, { "VIDIOC_S_JPEGCOMP", 0x408c563e }, @@ -1720,6 +1722,7 @@ { "CAPI_INSTALLED", 0x80024322 }, { "SNDRV_DM_FM_IOCTL_INFO", 0x80024820 }, { "IOCTL_WDM_MAX_COMMAND", 0x800248a0 }, +{ "CEC_ADAP_G_PHYS_ADDR", 0x80026101 }, { "IPMICTL_REGISTER_FOR_CMD", 0x8002690e }, { "IPMICTL_UNREGISTER_FOR_CMD", 0x8002690f }, { "FE_READ_SIGNAL_STRENGTH", 0x80026f47 }, @@ -1852,6 +1855,7 @@ { "WDIOC_GETTIMEOUT", 0x80045707 }, { "WDIOC_GETPRETIMEOUT", 0x80045709 }, { "WDIOC_GETTIMELEFT", 0x8004570a }, +{ "CEC_G_MODE", 0x80046108 }, { "SONET_GETDIAG", 0x80046114 }, { "SONET_GETFRAMING", 0x80046116 }, { "CM_IOCGSTATUS", 0x80046300 }, @@ -1864,18 +1868,10 @@ { "LIRC_GET_FEATURES", 0x80046900 }, { "LIRC_GET_SEND_MODE", 0x80046901 }, { "LIRC_GET_REC_MODE", 0x80046902 }, -{ "LIRC_GET_SEND_CARRIER", 0x80046903 }, -{ "LIRC_GET_REC_CARRIER", 0x80046904 }, -{ "LIRC_GET_SEND_DUTY_CYCLE", 0x80046905 }, -{ "LIRC_GET_REC_DUTY_CYCLE", 0x80046906 }, { "LIRC_GET_REC_RESOLUTION", 0x80046907 }, { "I2OVALIDATE", 0x80046908 }, { "LIRC_GET_MIN_TIMEOUT", 0x80046908 }, { "LIRC_GET_MAX_TIMEOUT", 0x80046909 }, -{ "LIRC_GET_MIN_FILTER_PULSE", 0x8004690a }, -{ "LIRC_GET_MAX_FILTER_PULSE", 0x8004690b }, -{ "LIRC_GET_MIN_FILTER_SPACE", 0x8004690c }, -{ "LIRC_GET_MAX_FILTER_SPACE", 0x8004690d }, { "LIRC_GET_LENGTH", 0x8004690f }, { "IPMICTL_SET_GETS_EVENTS_CMD", 0x80046910 }, { "IPMICTL_SET_MY_ADDRESS_CMD", 0x80046911 }, @@ -2020,7 +2016,6 @@ { "BTRFS_IOC_START_SYNC", 0x80089418 }, { "BTRFS_IOC_SUBVOL_GETFLAGS", 0x80089419 }, { "KVM_X86_GET_MCE_CAP_SUPPORTED", 0x8008ae9d }, -{ "KVM_ALLOCATE_RMA", 0x8008aea9 }, { "VHOST_GET_FEATURES", 0x8008af00 }, { "FUNCTIONFS_ENDPOINT_DESC", 0x80096782 }, { "DMX_GET_PES_PIDS", 0x800a6f2f }, @@ -2106,7 +2101,6 @@ { "AUDIO_GET_STATUS", 0x80206f0a }, { "PPPIOCGXASYNCMAP", 0x80207450 }, { "PPPIOCGCOMPRESSORS", 0x80207486 }, -{ "KVM_ARM_PREFERRED_TARGET", 0x8020aeaf }, { "SNDRV_HDSP_IOCTL_GET_CONFIG_INFO", 0x80244841 }, { "SNDRV_HDSPM_IOCTL_GET_VERSION", 0x80244848 }, { "SONET_GETSTAT", 0x80246110 }, @@ -2154,6 +2148,7 @@ { "FDGETDRVPRM", 0x80580211 }, { "SNDRV_TIMER_IOCTL_STATUS", 0x80585414 }, { "SOUND_MIXER_INFO", 0x805c4d65 }, +{ "CEC_ADAP_G_LOG_ADDRS", 0x805c6103 }, { "VIDIOC_QUERYCAP", 0x80685600 }, { "I2OEVTGET", 0x8068690b }, { "SNDRV_PCM_IOCTL_STATUS", 0x806c4120 }, @@ -2209,6 +2204,7 @@ { "KVM_GET_XSAVE", 0x9000aea4 }, { "HIDIOCGRDESC", 0x90044802 }, { "GADGET_SET_PRINTER_STATUS", 0xc0016722 }, +{ "RIO_CM_CHAN_CREATE", 0xc0026303 }, { "AGPIOC_ALLOCATE", 0xc0044106 }, { "CAPI_GET_MANUFACTURER", 0xc0044306 }, { "CAPI_GET_SERIAL", 0xc0044308 }, @@ -2252,7 +2248,10 @@ { "SONET_CLRDIAG", 0xc0046113 }, { "BINDER_VERSION", 0xc0046209 }, { "CM_IOCGATR", 0xc0046301 }, +{ "RIO_CM_EP_GET_LIST_SIZE", 0xc0046301 }, +{ "RIO_CM_EP_GET_LIST", 0xc0046302 }, { "CIOC_KERNEL_VERSION", 0xc004630a }, +{ "RIO_CM_MPORT_GET_LIST", 0xc004630b }, { "DRM_IOCTL_BLOCK", 0xc0046412 }, { "DRM_IOCTL_UNBLOCK", 0xc0046413 }, { "DRM_IOCTL_ADD_DRAW", 0xc0046427 }, @@ -2303,6 +2302,7 @@ { "SNDRV_CTL_IOCTL_TLV_COMMAND", 0xc008551c }, { "VIDIOC_G_CTRL", 0xc008561b }, { "VIDIOC_S_CTRL", 0xc008561c }, +{ "RIO_CM_CHAN_ACCEPT", 0xc0086307 }, { "DRM_IOCTL_GET_UNIQUE", 0xc0086401 }, { "DRM_IOCTL_GEM_FLINK", 0xc008640a }, { "DRM_IOCTL_INFO_BUFS", 0xc0086418 }, @@ -2366,6 +2366,7 @@ { "DRM_IOCTL_MAP_BUFS", 0xc00c6419 }, { "DRM_IOCTL_PRIME_HANDLE_TO_FD", 0xc00c642d }, { "DRM_IOCTL_PRIME_FD_TO_HANDLE", 0xc00c642e }, +{ "DRM_IOCTL_MSM_GEM_MADVISE", 0xc00c6448 }, { "DRM_IOCTL_VIA_CMDBUF_SIZE", 0xc00c644b }, { "DRM_IOCTL_I915_VBLANK_SWAP", 0xc00c644f }, { "DRM_IOCTL_RADEON_GEM_SET_DOMAIN", 0xc00c6463 }, @@ -2381,6 +2382,7 @@ { "KVM_CREATE_DEVICE", 0xc00caee0 }, { "FSL_HV_IOCTL_PARTITION_GET_STATUS", 0xc00caf02 }, { "MBXFB_IOCX_REG", 0xc00cf405 }, +{ "BLKREPORTZONE", 0xc0101282 }, { "STP_POLICY_ID_SET", 0xc0102500 }, { "CAPI_GET_VERSION", 0xc0104307 }, { "GIGASET_VERSION", 0xc0104703 }, @@ -2394,6 +2396,7 @@ { "SNDRV_SEQ_IOCTL_RUNNING_MODE", 0xc0105303 }, { "USBDEVFS_CONTROL", 0xc0105500 }, { "USBDEVFS_BULK", 0xc0105502 }, +{ "RIO_CM_CHAN_RECEIVE", 0xc010630a }, { "DRM_IOCTL_IRQ_BUSID", 0xc0106403 }, { "DRM_IOCTL_SET_VERSION", 0xc0106407 }, { "DRM_IOCTL_GEM_OPEN", 0xc010640b }, @@ -2409,6 +2412,7 @@ { "DRM_IOCTL_QXL_MAP", 0xc0106441 }, { "DRM_IOCTL_TEGRA_GEM_MMAP", 0xc0106441 }, { "DRM_IOCTL_VC4_WAIT_SEQNO", 0xc0106441 }, +{ "DRM_IOCTL_VGEM_FENCE_ATTACH", 0xc0106441 }, { "DRM_IOCTL_VIRTGPU_MAP", 0xc0106441 }, { "DRM_IOCTL_AMDGPU_CTX", 0xc0106442 }, { "DRM_IOCTL_ETNAVIV_GEM_NEW", 0xc0106442 }, @@ -2431,6 +2435,7 @@ { "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", 0xc0106447 }, { "DRM_IOCTL_EXYNOS_VIDI_CONNECTION", 0xc0106447 }, { "DRM_IOCTL_TEGRA_GET_SYNCPT", 0xc0106447 }, +{ "DRM_IOCTL_VC4_GET_PARAM", 0xc0106447 }, { "DRM_IOCTL_VIA_DMA_INIT", 0xc0106447 }, { "DRM_IOCTL_I915_ALLOC", 0xc0106448 }, { "DRM_IOCTL_TEGRA_GET_SYNCPT_BASE", 0xc0106449 }, @@ -2480,6 +2485,7 @@ { "SCIF_SEND", 0xc0147306 }, { "SCIF_RECV", 0xc0147307 }, { "SCIF_GET_NODEIDS", 0xc014730e }, +{ "VTPM_PROXY_IOC_NEW_DEV", 0xc014a100 }, { "HFI1_IOCTL_TID_UPDATE", 0xc0181be4 }, { "HFI1_IOCTL_TID_FREE", 0xc0181be5 }, { "HFI1_IOCTL_TID_INVAL_READ", 0xc0181bed }, @@ -2488,6 +2494,7 @@ { "FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE", 0xc018230d }, { "HIDIOCGUSAGE", 0xc018480b }, { "HIDIOCGUCODE", 0xc018480d }, +{ "ION_IOC_HEAP_QUERY", 0xc0184908 }, { "AMDKFD_IOC_WAIT_EVENTS", 0xc0184b0c }, { "MEMWRITEOOB64", 0xc0184d15 }, { "MEMREADOOB64", 0xc0184d16 }, @@ -2510,6 +2517,7 @@ { "DRM_IOCTL_VIRTGPU_GET_CAPS", 0xc0186449 }, { "DRM_IOCTL_RADEON_TEXTURE", 0xc018644e }, { "DRM_IOCTL_AMDGPU_GEM_USERPTR", 0xc0186451 }, +{ "DRM_IOCTL_AMDGPU_WAIT_FENCES", 0xc0186452 }, { "DRM_IOCTL_I915_GEM_PIN", 0xc0186455 }, { "DRM_IOCTL_RADEON_GEM_INFO", 0xc018645c }, { "DRM_IOCTL_RADEON_GEM_VA", 0xc018646b }, @@ -2574,7 +2582,6 @@ { "X86_IOC_RDMSR_REGS", 0xc02063a0 }, { "X86_IOC_WRMSR_REGS", 0xc02063a1 }, { "DRM_IOCTL_AMDGPU_GEM_CREATE", 0xc0206440 }, -{ "DRM_IOCTL_MSM_GEM_SUBMIT", 0xc0206446 }, { "DRM_IOCTL_AMDGPU_WAIT_CS", 0xc0206449 }, { "DRM_IOCTL_RADEON_GEM_MMAP", 0xc020645e }, { "DRM_IOCTL_RADEON_GEM_PREAD", 0xc0206461 }, @@ -2598,6 +2605,7 @@ { "VIDIOC_S_EDID", 0xc0245629 }, { "SNDRV_RAWMIDI_IOCTL_STATUS", 0xc0245720 }, { "DRM_IOCTL_VERSION", 0xc0246400 }, +{ "DRM_IOCTL_MSM_GEM_SUBMIT", 0xc0246446 }, { "DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST", 0xc0246446 }, { "DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST", 0xc0246447 }, { "DRM_IOCTL_MODE_CURSOR2", 0xc02464bb }, @@ -2611,7 +2619,6 @@ { "AMDKFD_IOC_GET_CLOCK_COUNTERS", 0xc0284b05 }, { "VIDIOC_ENCODER_CMD", 0xc028564d }, { "VIDIOC_TRY_ENCODER_CMD", 0xc028564e }, -{ "SW_SYNC_IOC_CREATE_FENCE", 0xc0285700 }, { "DRM_IOCTL_DMA", 0xc0286429 }, { "DRM_IOCTL_I915_GEM_MMAP", 0xc028645e }, { "DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST", 0xc0286461 }, @@ -2646,6 +2653,7 @@ { "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", 0xc0306446 }, { "DRM_IOCTL_NOUVEAU_GEM_NEW", 0xc0306480 }, { "DRM_IOCTL_MODE_SETPLANE", 0xc03064b7 }, +{ "GPIO_GET_LINEEVENT_IOCTL", 0xc030b404 }, { "MBXFB_IOCX_OVERLAY", 0xc030f400 }, { "VIDIOC_ENUMAUDIO", 0xc0345641 }, { "VIDIOC_ENUMAUDOUT", 0xc0345642 }, @@ -2656,6 +2664,8 @@ { "VIDIOC_SUBDEV_G_CROP", 0xc038563b }, { "VIDIOC_SUBDEV_S_CROP", 0xc038563c }, { "VIDIOC_DBG_G_REGISTER", 0xc0385650 }, +{ "CEC_TRANSMIT", 0xc0386105 }, +{ "CEC_RECEIVE", 0xc0386106 }, { "DRM_IOCTL_VIRTGPU_RESOURCE_CREATE", 0xc0386444 }, { "DRM_IOCTL_MODE_ATOMIC", 0xc03864bc }, { "BTRFS_IOC_INO_PATHS", 0xc0389423 }, @@ -2682,6 +2692,8 @@ { "DRM_IOCTL_NOUVEAU_GEM_PUSHBUF", 0xc0406481 }, { "DRM_IOCTL_MODE_GETRESOURCES", 0xc04064a0 }, { "DRM_IOCTL_MODE_GETPROPERTY", 0xc04064aa }, +{ "GPIOHANDLE_GET_LINE_VALUES_IOCTL", 0xc040b408 }, +{ "GPIOHANDLE_SET_LINE_VALUES_IOCTL", 0xc040b409 }, { "VIDIOC_QUERYBUF", 0xc0445609 }, { "VIDIOC_QBUF", 0xc044560f }, { "VIDIOC_DQBUF", 0xc0445611 }, @@ -2707,7 +2719,9 @@ { "SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT", 0xc04c5349 }, { "VIDIOC_ENUMINPUT", 0xc04c561a }, { "VIDIOC_OMAP3ISP_AF_CFG", 0xc04c56c5 }, +{ "CEC_ADAP_G_CAPS", 0xc04c6100 }, { "SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION", 0xc0505350 }, +{ "CEC_DQEVENT", 0xc0506107 }, { "DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY", 0xc0506470 }, { "DRM_IOCTL_MODE_GETCONNECTOR", 0xc05064a7 }, { "CCISS_PASSTHRU", 0xc054420b }, @@ -2722,6 +2736,7 @@ { "DRM_IOCTL_TEGRA_SUBMIT", 0xc0586448 }, { "UVCIOC_CTRL_MAP", 0xc0587520 }, { "SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS", 0xc05c5340 }, +{ "CEC_ADAP_S_LOG_ADDRS", 0xc05c6104 }, { "PTP_PIN_GETFUNC", 0xc0603d06 }, { "SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER", 0xc0605345 }, { "UI_BEGIN_FF_UPLOAD", 0xc06055c8 }, @@ -2808,13 +2823,13 @@ { "DM_LIST_VERSIONS", 0xc138fd0d }, { "DM_TARGET_MSG", 0xc138fd0e }, { "DM_DEV_SET_GEOMETRY", 0xc138fd0f }, +{ "GPIO_GET_LINEHANDLE_IOCTL", 0xc16cb403 }, { "SNDRV_EMU10K1_IOCTL_CODE_PEEK", 0xc18c4812 }, { "KVM_GET_IRQCHIP", 0xc208ae62 }, { "SNDRV_PCM_IOCTL_HW_REFINE", 0xc25c4110 }, { "SNDRV_PCM_IOCTL_HW_PARAMS", 0xc25c4111 }, { "SNDRV_CTL_IOCTL_ELEM_READ", 0xc2c45512 }, { "SNDRV_CTL_IOCTL_ELEM_WRITE", 0xc2c45513 }, -{ "VIDIOC_VSP1_LUT_CONFIG", 0xc40056c1 }, { "BTRFS_IOC_SCRUB", 0xc400941b }, { "BTRFS_IOC_SCRUB_PROGRESS", 0xc400941d }, { "BTRFS_IOC_BALANCE_V2", 0xc4009420 }, diff --git a/ioctlent2.h b/ioctlent2.h index 5fc9de91d..6811dc208 100644 --- a/ioctlent2.h +++ b/ioctlent2.h @@ -574,9 +574,6 @@ { "HPET_IE_OFF", 0x00006802 }, { "HPET_EPI", 0x00006804 }, { "HPET_DPI", 0x00006805 }, -{ "LIRC_NOTIFY_DECODE", 0x00006920 }, -{ "LIRC_SETUP_START", 0x00006921 }, -{ "LIRC_SETUP_END", 0x00006922 }, { "KYRO_IOCTL_OVERLAY_CREATE", 0x00006b00 }, { "KYRO_IOCTL_OVERLAY_VIEWPORT_SET", 0x00006b01 }, { "KYRO_IOCTL_SET_VIDEO_MODE", 0x00006b02 }, @@ -757,6 +754,7 @@ { "SIOCSMIIREG", 0x00008949 }, { "SIOCWANDEV", 0x0000894a }, { "SIOCOUTQNSD", 0x0000894b }, +{ "SIOCGSKNS", 0x0000894c }, { "SIOCDARP", 0x00008953 }, { "SIOCGARP", 0x00008954 }, { "SIOCSARP", 0x00008955 }, @@ -880,7 +878,11 @@ { "KVM_SMI", 0x0000aeb7 }, { "VHOST_SET_OWNER", 0x0000af01 }, { "VHOST_RESET_OWNER", 0x0000af02 }, +{ "BT_BMC_IOCTL_SMS_ATN", 0x0000b100 }, { "PPPOEIOCDFWD", 0x0000b101 }, +{ "NS_GET_USERNS", 0x0000b701 }, +{ "NS_GET_PARENT", 0x0000b702 }, +{ "IOCTL_EVTCHN_RESTRICT_DOMID", 0x00024506 }, { "IOCTL_EVTCHN_BIND_VIRQ", 0x00044500 }, { "IOCTL_EVTCHN_BIND_UNBOUND_PORT", 0x00044502 }, { "IOCTL_EVTCHN_UNBIND", 0x00044503 }, @@ -908,8 +910,11 @@ { "SONYPI_IOCSBLUE", 0x40017609 }, { "SONYPI_IOCSFAN", 0x4001760b }, { "HFI1_IOCTL_SET_PKEY", 0x40021beb }, +{ "CEC_ADAP_S_PHYS_ADDR", 0x40026102 }, { "ATM_SETBACKEND", 0x400261f2 }, { "ATM_NEWBACKENDIF", 0x400261f3 }, +{ "RIO_CM_CHAN_CLOSE", 0x40026304 }, +{ "RIO_CM_CHAN_LISTEN", 0x40026306 }, { "RIO_MPORT_MAINT_HDID_SET", 0x40026d01 }, { "NCP_IOC_GETMOUNTUID", 0x40026e02 }, { "AUDIO_SET_ATTRIBUTES", 0x40026f11 }, @@ -1051,9 +1056,9 @@ { "IVTV_IOC_PASSTHROUGH_MODE", 0x400456c1 }, { "VIDIOC_AM437X_CCDC_CFG", 0x400456c1 }, { "VPFE_CMD_S_CCDC_RAW_PARAMS", 0x400456c1 }, -{ "SW_SYNC_IOC_INC", 0x40045701 }, { "SNDRV_RAWMIDI_IOCTL_DROP", 0x40045730 }, { "SNDRV_RAWMIDI_IOCTL_DRAIN", 0x40045731 }, +{ "CEC_S_MODE", 0x40046109 }, { "SONET_SETFRAMING", 0x40046115 }, { "ATM_SETSC", 0x400461f1 }, { "ATM_DROPPARTY", 0x400461f5 }, @@ -1093,15 +1098,10 @@ { "LIRC_SET_SEND_CARRIER", 0x40046913 }, { "LIRC_SET_REC_CARRIER", 0x40046914 }, { "LIRC_SET_SEND_DUTY_CYCLE", 0x40046915 }, -{ "LIRC_SET_REC_DUTY_CYCLE", 0x40046916 }, { "LIRC_SET_TRANSMITTER_MASK", 0x40046917 }, { "LIRC_SET_REC_TIMEOUT", 0x40046918 }, { "LIRC_SET_REC_TIMEOUT_REPORTS", 0x40046919 }, -{ "LIRC_SET_REC_FILTER_PULSE", 0x4004691a }, -{ "LIRC_SET_REC_FILTER_SPACE", 0x4004691b }, -{ "LIRC_SET_REC_FILTER", 0x4004691c }, { "LIRC_SET_MEASURE_CARRIER_MODE", 0x4004691d }, -{ "LIRC_SET_REC_DUTY_CYCLE_RANGE", 0x4004691e }, { "IPMICTL_SET_MAINTENANCE_MODE_CMD", 0x4004691f }, { "LIRC_SET_REC_CARRIER_RANGE", 0x4004691f }, { "LIRC_SET_WIDEBAND_RECEIVER", 0x40046923 }, @@ -1201,15 +1201,14 @@ { "BTRFS_IOC_CLONE", 0x40049409 }, { "FICLONE", 0x40049409 }, { "BTRFS_IOC_BALANCE_CTL", 0x40049421 }, -{ "KVM_S390_VCPU_FAULT", 0x4004ae52 }, { "KVM_INTERRUPT", 0x4004ae86 }, { "KVM_SET_SIGNAL_MASK", 0x4004ae8b }, -{ "KVM_S390_STORE_STATUS", 0x4004ae95 }, { "KVM_SET_MP_STATE", 0x4004ae99 }, { "VHOST_SET_LOG_FD", 0x4004af07 }, { "VHOST_SCSI_GET_ABI_VERSION", 0x4004af42 }, { "VHOST_SCSI_SET_EVENTS_MISSED", 0x4004af43 }, { "VHOST_SCSI_GET_EVENTS_MISSED", 0x4004af44 }, +{ "VHOST_VSOCK_SET_RUNNING", 0x4004af61 }, { "PPPOEIOCSFWD", 0x4004b100 }, { "IOW_WRITE", 0x4004c001 }, { "IOW_READ", 0x4004c002 }, @@ -1256,7 +1255,9 @@ { "DMA_BUF_IOCTL_SYNC", 0x40086200 }, { "BINDER_SET_IDLE_TIMEOUT", 0x40086203 }, { "BC_FREE_BUFFER", 0x40086303 }, +{ "RIO_CM_CHAN_BIND", 0x40086305 }, { "CHIOGSTATUS", 0x40086308 }, +{ "RIO_CM_CHAN_CONNECT", 0x40086308 }, { "BC_ATTEMPT_ACQUIRE", 0x4008630a }, { "BC_DEAD_BINDER_DONE", 0x40086310 }, { "DRM_IOCTL_MODESET_CTL", 0x40086408 }, @@ -1277,6 +1278,7 @@ { "DRM_IOCTL_MGA_FLUSH", 0x40086441 }, { "DRM_IOCTL_R128_CCE_STOP", 0x40086442 }, { "DRM_IOCTL_RADEON_CP_STOP", 0x40086442 }, +{ "DRM_IOCTL_VGEM_FENCE_SIGNAL", 0x40086442 }, { "DRM_IOCTL_SAVAGE_BCI_EVENT_WAIT", 0x40086443 }, { "DRM_IOCTL_OMAP_GEM_CPU_PREP", 0x40086444 }, { "DRM_IOCTL_ETNAVIV_GEM_CPU_FINI", 0x40086445 }, @@ -1318,6 +1320,7 @@ { "BTRFS_IOC_WAIT_SYNC", 0x40089416 }, { "BTRFS_IOC_SUBVOL_SETFLAGS", 0x4008941a }, { "KVM_SET_IDENTITY_MAP_ADDR", 0x4008ae48 }, +{ "KVM_S390_VCPU_FAULT", 0x4008ae52 }, { "KVM_IRQ_LINE", 0x4008ae61 }, { "KVM_SET_GSI_ROUTING", 0x4008ae6a }, { "KVM_ASSIGN_SET_MSIX_NR", 0x4008ae73 }, @@ -1325,6 +1328,7 @@ { "KVM_SET_CPUID", 0x4008ae8a }, { "KVM_SET_CPUID2", 0x4008ae90 }, { "KVM_SET_VAPIC_ADDR", 0x4008ae93 }, +{ "KVM_S390_STORE_STATUS", 0x4008ae95 }, { "KVM_X86_SETUP_MCE", 0x4008ae9c }, { "VHOST_SET_FEATURES", 0x4008af00 }, { "VHOST_SET_MEM_TABLE", 0x4008af03 }, @@ -1339,6 +1343,7 @@ { "VHOST_SET_VRING_BUSYLOOP_TIMEOUT", 0x4008af23 }, { "VHOST_GET_VRING_BUSYLOOP_TIMEOUT", 0x4008af24 }, { "VHOST_NET_SET_BACKEND", 0x4008af30 }, +{ "VHOST_VSOCK_SET_GUEST_CID", 0x4008af60 }, { "SNDRV_DM_FM_IOCTL_SET_PARAMS", 0x40094824 }, { "FDFMTTRK", 0x400c0248 }, { "RUN_ARRAY", 0x400c0930 }, @@ -1402,8 +1407,8 @@ { "UBI_IOCRSVOL", 0x400c6f02 }, { "AUDIO_SET_KARAOKE", 0x400c6f12 }, { "PPPIOCSCOMPRESS", 0x400c744d }, -{ "KVM_CREATE_SPAPR_TCE", 0x400caea8 }, { "MBXFB_IOCS_REG", 0x400cf404 }, +{ "BLKRESETZONE", 0x40101283 }, { "FW_CDEV_IOC_START_ISO", 0x4010230a }, { "FW_CDEV_IOC_SET_ISO_CHANNELS", 0x40102317 }, { "PTP_EXTTS_REQUEST", 0x40103d02 }, @@ -1426,6 +1431,7 @@ { "OMAPFB_GET_COLOR_KEY", 0x40104f33 }, { "BC_INCREFS_DONE", 0x40106308 }, { "BC_ACQUIRE_DONE", 0x40106309 }, +{ "RIO_CM_CHAN_SEND", 0x40106309 }, { "DRM_IOCTL_SET_CLIENT_CAP", 0x4010640d }, { "DRM_IOCTL_AGP_FREE", 0x40106435 }, { "DRM_IOCTL_OMAP_SET_PARAM", 0x40106441 }, @@ -1548,9 +1554,6 @@ { "KVM_SET_USER_MEMORY_REGION", 0x4020ae46 }, { "KVM_IRQFD", 0x4020ae76 }, { "KVM_SIGNAL_MSI", 0x4020aea5 }, -{ "KVM_CREATE_SPAPR_TCE_64", 0x4020aea8 }, -{ "KVM_PPC_GET_HTAB_FD", 0x4020aeaa }, -{ "KVM_ARM_VCPU_INIT", 0x4020aeae }, { "KVM_S390_SET_IRQ_STATE", 0x4020aeb5 }, { "KVM_S390_GET_IRQ_STATE", 0x4020aeb6 }, { "SNDRV_COMPRESS_SET_METADATA", 0x40244314 }, @@ -1659,7 +1662,6 @@ { "UBI_IOCVOLCRBLK", 0x40804f07 }, { "KVM_PPC_GET_PVINFO", 0x4080aea1 }, { "KVM_SET_DEBUGREGS", 0x4080aea2 }, -{ "KVM_PPC_RTAS_DEFINE_TOKEN", 0x4080aeac }, { "SNDRV_COMPRESS_SET_PARAMS", 0x40844312 }, { "V4L2_DEVICE_NOTIFY_EVENT", 0x40887602 }, { "SNDRV_SEQ_IOCTL_DELETE_QUEUE", 0x408c5333 }, @@ -1720,6 +1722,7 @@ { "CAPI_INSTALLED", 0x80024322 }, { "SNDRV_DM_FM_IOCTL_INFO", 0x80024820 }, { "IOCTL_WDM_MAX_COMMAND", 0x800248a0 }, +{ "CEC_ADAP_G_PHYS_ADDR", 0x80026101 }, { "IPMICTL_REGISTER_FOR_CMD", 0x8002690e }, { "IPMICTL_UNREGISTER_FOR_CMD", 0x8002690f }, { "FE_READ_SIGNAL_STRENGTH", 0x80026f47 }, @@ -1852,6 +1855,7 @@ { "WDIOC_GETTIMEOUT", 0x80045707 }, { "WDIOC_GETPRETIMEOUT", 0x80045709 }, { "WDIOC_GETTIMELEFT", 0x8004570a }, +{ "CEC_G_MODE", 0x80046108 }, { "SONET_GETDIAG", 0x80046114 }, { "SONET_GETFRAMING", 0x80046116 }, { "CM_IOCGSTATUS", 0x80046300 }, @@ -1864,18 +1868,10 @@ { "LIRC_GET_FEATURES", 0x80046900 }, { "LIRC_GET_SEND_MODE", 0x80046901 }, { "LIRC_GET_REC_MODE", 0x80046902 }, -{ "LIRC_GET_SEND_CARRIER", 0x80046903 }, -{ "LIRC_GET_REC_CARRIER", 0x80046904 }, -{ "LIRC_GET_SEND_DUTY_CYCLE", 0x80046905 }, -{ "LIRC_GET_REC_DUTY_CYCLE", 0x80046906 }, { "LIRC_GET_REC_RESOLUTION", 0x80046907 }, { "I2OVALIDATE", 0x80046908 }, { "LIRC_GET_MIN_TIMEOUT", 0x80046908 }, { "LIRC_GET_MAX_TIMEOUT", 0x80046909 }, -{ "LIRC_GET_MIN_FILTER_PULSE", 0x8004690a }, -{ "LIRC_GET_MAX_FILTER_PULSE", 0x8004690b }, -{ "LIRC_GET_MIN_FILTER_SPACE", 0x8004690c }, -{ "LIRC_GET_MAX_FILTER_SPACE", 0x8004690d }, { "LIRC_GET_LENGTH", 0x8004690f }, { "IPMICTL_SET_GETS_EVENTS_CMD", 0x80046910 }, { "IPMICTL_SET_MY_ADDRESS_CMD", 0x80046911 }, @@ -2018,7 +2014,6 @@ { "BTRFS_IOC_START_SYNC", 0x80089418 }, { "BTRFS_IOC_SUBVOL_GETFLAGS", 0x80089419 }, { "KVM_X86_GET_MCE_CAP_SUPPORTED", 0x8008ae9d }, -{ "KVM_ALLOCATE_RMA", 0x8008aea9 }, { "VHOST_GET_FEATURES", 0x8008af00 }, { "FUNCTIONFS_ENDPOINT_DESC", 0x80096782 }, { "DMX_GET_PES_PIDS", 0x800a6f2f }, @@ -2106,7 +2101,6 @@ { "VIDEO_GET_EVENT", 0x80206f1c }, { "PPPIOCGXASYNCMAP", 0x80207450 }, { "PPPIOCGCOMPRESSORS", 0x80207486 }, -{ "KVM_ARM_PREFERRED_TARGET", 0x8020aeaf }, { "SNDRV_HDSP_IOCTL_GET_CONFIG_INFO", 0x80244841 }, { "SNDRV_HDSPM_IOCTL_GET_VERSION", 0x80244848 }, { "SONET_GETSTAT", 0x80246110 }, @@ -2153,6 +2147,7 @@ { "PTP_CLOCK_GETCAPS", 0x80503d01 }, { "FDGETDRVPRM", 0x80580211 }, { "SOUND_MIXER_INFO", 0x805c4d65 }, +{ "CEC_ADAP_G_LOG_ADDRS", 0x805c6103 }, { "SNDRV_TIMER_IOCTL_STATUS", 0x80605414 }, { "VIDIOC_QUERYCAP", 0x80685600 }, { "I2OEVTGET", 0x8068690b }, @@ -2209,6 +2204,7 @@ { "KVM_GET_XSAVE", 0x9000aea4 }, { "HIDIOCGRDESC", 0x90044802 }, { "GADGET_SET_PRINTER_STATUS", 0xc0016722 }, +{ "RIO_CM_CHAN_CREATE", 0xc0026303 }, { "AGPIOC_ALLOCATE", 0xc0044106 }, { "CAPI_GET_MANUFACTURER", 0xc0044306 }, { "CAPI_GET_SERIAL", 0xc0044308 }, @@ -2252,7 +2248,10 @@ { "SONET_CLRDIAG", 0xc0046113 }, { "BINDER_VERSION", 0xc0046209 }, { "CM_IOCGATR", 0xc0046301 }, +{ "RIO_CM_EP_GET_LIST_SIZE", 0xc0046301 }, +{ "RIO_CM_EP_GET_LIST", 0xc0046302 }, { "CIOC_KERNEL_VERSION", 0xc004630a }, +{ "RIO_CM_MPORT_GET_LIST", 0xc004630b }, { "DRM_IOCTL_BLOCK", 0xc0046412 }, { "DRM_IOCTL_UNBLOCK", 0xc0046413 }, { "DRM_IOCTL_ADD_DRAW", 0xc0046427 }, @@ -2303,6 +2302,7 @@ { "SNDRV_CTL_IOCTL_TLV_COMMAND", 0xc008551c }, { "VIDIOC_G_CTRL", 0xc008561b }, { "VIDIOC_S_CTRL", 0xc008561c }, +{ "RIO_CM_CHAN_ACCEPT", 0xc0086307 }, { "DRM_IOCTL_GET_UNIQUE", 0xc0086401 }, { "DRM_IOCTL_GEM_FLINK", 0xc008640a }, { "DRM_IOCTL_INFO_BUFS", 0xc0086418 }, @@ -2366,6 +2366,7 @@ { "DRM_IOCTL_MAP_BUFS", 0xc00c6419 }, { "DRM_IOCTL_PRIME_HANDLE_TO_FD", 0xc00c642d }, { "DRM_IOCTL_PRIME_FD_TO_HANDLE", 0xc00c642e }, +{ "DRM_IOCTL_MSM_GEM_MADVISE", 0xc00c6448 }, { "DRM_IOCTL_VIA_CMDBUF_SIZE", 0xc00c644b }, { "DRM_IOCTL_I915_VBLANK_SWAP", 0xc00c644f }, { "DRM_IOCTL_RADEON_GEM_SET_DOMAIN", 0xc00c6463 }, @@ -2379,6 +2380,7 @@ { "KVM_CREATE_DEVICE", 0xc00caee0 }, { "FSL_HV_IOCTL_PARTITION_GET_STATUS", 0xc00caf02 }, { "MBXFB_IOCX_REG", 0xc00cf405 }, +{ "BLKREPORTZONE", 0xc0101282 }, { "STP_POLICY_ID_SET", 0xc0102500 }, { "CAPI_GET_VERSION", 0xc0104307 }, { "GIGASET_VERSION", 0xc0104703 }, @@ -2390,6 +2392,7 @@ { "SNDRV_SEQ_IOCTL_RUNNING_MODE", 0xc0105303 }, { "USBDEVFS_CONTROL", 0xc0105500 }, { "USBDEVFS_BULK", 0xc0105502 }, +{ "RIO_CM_CHAN_RECEIVE", 0xc010630a }, { "DRM_IOCTL_IRQ_BUSID", 0xc0106403 }, { "DRM_IOCTL_SET_VERSION", 0xc0106407 }, { "DRM_IOCTL_GEM_OPEN", 0xc010640b }, @@ -2405,6 +2408,7 @@ { "DRM_IOCTL_QXL_MAP", 0xc0106441 }, { "DRM_IOCTL_TEGRA_GEM_MMAP", 0xc0106441 }, { "DRM_IOCTL_VC4_WAIT_SEQNO", 0xc0106441 }, +{ "DRM_IOCTL_VGEM_FENCE_ATTACH", 0xc0106441 }, { "DRM_IOCTL_VIRTGPU_MAP", 0xc0106441 }, { "DRM_IOCTL_AMDGPU_CTX", 0xc0106442 }, { "DRM_IOCTL_ETNAVIV_GEM_NEW", 0xc0106442 }, @@ -2427,6 +2431,7 @@ { "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", 0xc0106447 }, { "DRM_IOCTL_EXYNOS_VIDI_CONNECTION", 0xc0106447 }, { "DRM_IOCTL_TEGRA_GET_SYNCPT", 0xc0106447 }, +{ "DRM_IOCTL_VC4_GET_PARAM", 0xc0106447 }, { "DRM_IOCTL_VIA_DMA_INIT", 0xc0106447 }, { "DRM_IOCTL_I915_ALLOC", 0xc0106448 }, { "DRM_IOCTL_TEGRA_GET_SYNCPT_BASE", 0xc0106449 }, @@ -2472,6 +2477,7 @@ { "DRM_IOCTL_I915_GET_SPRITE_COLORKEY", 0xc014646a }, { "DRM_IOCTL_I915_SET_SPRITE_COLORKEY", 0xc014646b }, { "DRM_IOCTL_MODE_GETENCODER", 0xc01464a6 }, +{ "VTPM_PROXY_IOC_NEW_DEV", 0xc014a100 }, { "HFI1_IOCTL_TID_UPDATE", 0xc0181be4 }, { "HFI1_IOCTL_TID_FREE", 0xc0181be5 }, { "HFI1_IOCTL_TID_INVAL_READ", 0xc0181bed }, @@ -2482,6 +2488,7 @@ { "FW_CDEV_IOC_SEND_PHY_PACKET", 0xc0182315 }, { "HIDIOCGUSAGE", 0xc018480b }, { "HIDIOCGUCODE", 0xc018480d }, +{ "ION_IOC_HEAP_QUERY", 0xc0184908 }, { "AMDKFD_IOC_WAIT_EVENTS", 0xc0184b0c }, { "MTRRIOC_GET_ENTRY", 0xc0184d03 }, { "MTRRIOC_GET_PAGE_ENTRY", 0xc0184d08 }, @@ -2505,6 +2512,7 @@ { "DRM_IOCTL_VIRTGPU_GET_CAPS", 0xc0186449 }, { "DRM_IOCTL_RADEON_TEXTURE", 0xc018644e }, { "DRM_IOCTL_AMDGPU_GEM_USERPTR", 0xc0186451 }, +{ "DRM_IOCTL_AMDGPU_WAIT_FENCES", 0xc0186452 }, { "DRM_IOCTL_I915_GEM_PIN", 0xc0186455 }, { "DRM_IOCTL_RADEON_GEM_INFO", 0xc018645c }, { "DRM_IOCTL_RADEON_GEM_VA", 0xc018646b }, @@ -2572,7 +2580,6 @@ { "X86_IOC_RDMSR_REGS", 0xc02063a0 }, { "X86_IOC_WRMSR_REGS", 0xc02063a1 }, { "DRM_IOCTL_AMDGPU_GEM_CREATE", 0xc0206440 }, -{ "DRM_IOCTL_MSM_GEM_SUBMIT", 0xc0206446 }, { "DRM_IOCTL_AMDGPU_WAIT_CS", 0xc0206449 }, { "DRM_IOCTL_RADEON_GEM_CREATE", 0xc020645d }, { "DRM_IOCTL_RADEON_GEM_MMAP", 0xc020645e }, @@ -2605,8 +2612,8 @@ { "AMDKFD_IOC_GET_CLOCK_COUNTERS", 0xc0284b05 }, { "VIDIOC_ENCODER_CMD", 0xc028564d }, { "VIDIOC_TRY_ENCODER_CMD", 0xc028564e }, -{ "SW_SYNC_IOC_CREATE_FENCE", 0xc0285700 }, { "DRM_IOCTL_DMA", 0xc0286429 }, +{ "DRM_IOCTL_MSM_GEM_SUBMIT", 0xc0286446 }, { "DRM_IOCTL_I915_GEM_MMAP", 0xc028645e }, { "DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST", 0xc0286461 }, { "DRM_IOCTL_EXYNOS_IPP_QUEUE_BUF", 0xc0286472 }, @@ -2646,6 +2653,7 @@ { "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", 0xc0306446 }, { "DRM_IOCTL_NOUVEAU_GEM_NEW", 0xc0306480 }, { "DRM_IOCTL_MODE_SETPLANE", 0xc03064b7 }, +{ "GPIO_GET_LINEEVENT_IOCTL", 0xc030b404 }, { "MBXFB_IOCX_OVERLAY", 0xc030f400 }, { "VIDIOC_ENUMAUDIO", 0xc0345641 }, { "VIDIOC_ENUMAUDOUT", 0xc0345642 }, @@ -2656,6 +2664,8 @@ { "VIDIOC_SUBDEV_G_CROP", 0xc038563b }, { "VIDIOC_SUBDEV_S_CROP", 0xc038563c }, { "VIDIOC_DBG_G_REGISTER", 0xc0385650 }, +{ "CEC_TRANSMIT", 0xc0386105 }, +{ "CEC_RECEIVE", 0xc0386106 }, { "DRM_IOCTL_VIRTGPU_RESOURCE_CREATE", 0xc0386444 }, { "DRM_IOCTL_MODE_ATOMIC", 0xc03864bc }, { "BTRFS_IOC_INO_PATHS", 0xc0389423 }, @@ -2680,6 +2690,8 @@ { "DRM_IOCTL_NOUVEAU_GEM_PUSHBUF", 0xc0406481 }, { "DRM_IOCTL_MODE_GETRESOURCES", 0xc04064a0 }, { "DRM_IOCTL_MODE_GETPROPERTY", 0xc04064aa }, +{ "GPIOHANDLE_GET_LINE_VALUES_IOCTL", 0xc040b408 }, +{ "GPIOHANDLE_SET_LINE_VALUES_IOCTL", 0xc040b409 }, { "VIDIOC_QUERYCTRL", 0xc0445624 }, { "VIDIOC_G_MODULATOR", 0xc0445636 }, { "BLKTRACESETUP", 0xc0481273 }, @@ -2702,12 +2714,14 @@ { "GPIO_GET_LINEINFO_IOCTL", 0xc048b402 }, { "SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT", 0xc04c5349 }, { "VIDIOC_OMAP3ISP_AF_CFG", 0xc04c56c5 }, +{ "CEC_ADAP_G_CAPS", 0xc04c6100 }, { "SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION", 0xc0505350 }, { "VIDIOC_QUERYBUF", 0xc0505609 }, { "VIDIOC_QBUF", 0xc050560f }, { "VIDIOC_DQBUF", 0xc0505611 }, { "VIDIOC_ENUMINPUT", 0xc050561a }, { "VIDIOC_PREPARE_BUF", 0xc050565d }, +{ "CEC_DQEVENT", 0xc0506107 }, { "DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY", 0xc0506470 }, { "DRM_IOCTL_MODE_GETCONNECTOR", 0xc05064a7 }, { "CCISS_PASSTHRU", 0xc054420b }, @@ -2722,6 +2736,7 @@ { "DRM_IOCTL_TEGRA_SUBMIT", 0xc0586448 }, { "UVCIOC_CTRL_MAP", 0xc0587520 }, { "SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS", 0xc05c5340 }, +{ "CEC_ADAP_S_LOG_ADDRS", 0xc05c6104 }, { "PTP_PIN_GETFUNC", 0xc0603d06 }, { "SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER", 0xc0605345 }, { "UI_BEGIN_FF_UPLOAD", 0xc06055c8 }, @@ -2808,13 +2823,13 @@ { "DM_LIST_VERSIONS", 0xc138fd0d }, { "DM_TARGET_MSG", 0xc138fd0e }, { "DM_DEV_SET_GEOMETRY", 0xc138fd0f }, +{ "GPIO_GET_LINEHANDLE_IOCTL", 0xc16cb403 }, { "SNDRV_EMU10K1_IOCTL_CODE_PEEK", 0xc18c4812 }, { "KVM_GET_IRQCHIP", 0xc208ae62 }, { "SNDRV_PCM_IOCTL_HW_REFINE", 0xc25c4110 }, { "SNDRV_PCM_IOCTL_HW_PARAMS", 0xc25c4111 }, { "SNDRV_CTL_IOCTL_ELEM_READ", 0xc2c85512 }, { "SNDRV_CTL_IOCTL_ELEM_WRITE", 0xc2c85513 }, -{ "VIDIOC_VSP1_LUT_CONFIG", 0xc40056c1 }, { "BTRFS_IOC_SCRUB", 0xc400941b }, { "BTRFS_IOC_SCRUB_PROGRESS", 0xc400941d }, { "BTRFS_IOC_BALANCE_V2", 0xc4009420 }, diff --git a/ioctlsort.c b/ioctlsort.c index 9c3169102..079f21e59 100644 --- a/ioctlsort.c +++ b/ioctlsort.c @@ -33,7 +33,8 @@ #include #include #include -#include + +#include "ioctl_iocdef.h" struct ioctlent { const char *info; diff --git a/ioperm.c b/ioperm.c index 1a92a2631..e9eea7f6f 100644 --- a/ioperm.c +++ b/ioperm.c @@ -2,7 +2,7 @@ SYS_FUNC(ioperm) { - tprintf("%#lx, %#lx, %d", + tprintf("%#" PRI_klx ", %#" PRI_klx ", %d", tcp->u_arg[0], tcp->u_arg[1], (int) tcp->u_arg[2]); return RVAL_DECODED; diff --git a/ipc.c b/ipc.c index 00a9d0d3e..bd23a4ed9 100644 --- a/ipc.c +++ b/ipc.c @@ -45,7 +45,7 @@ SYS_FUNC(ipc) unsigned int i; for (i = 1; i < tcp->s_ent->nargs; ++i) - tprintf(", %#lx", tcp->u_arg[i]); + tprintf(", %#" PRI_klx, tcp->u_arg[i]); return RVAL_DECODED; } diff --git a/ipc_msg.c b/ipc_msg.c index 7ef5cda93..a5f9e83e3 100644 --- a/ipc_msg.c +++ b/ipc_msg.c @@ -57,8 +57,8 @@ SYS_FUNC(msgget) } static void -tprint_msgsnd(struct tcb *tcp, const long addr, const unsigned long count, - const unsigned long flags) +tprint_msgsnd(struct tcb *const tcp, const kernel_ulong_t addr, + const kernel_ulong_t count, const unsigned int flags) { tprint_msgbuf(tcp, addr, count); printflags(ipc_msg_flags, flags, "MSG_???"); @@ -78,15 +78,16 @@ SYS_FUNC(msgsnd) } static void -tprint_msgrcv(struct tcb *tcp, const long addr, const unsigned long count, - const long msgtyp) +tprint_msgrcv(struct tcb *const tcp, const kernel_ulong_t addr, + const kernel_ulong_t count, const kernel_ulong_t msgtyp) { tprint_msgbuf(tcp, addr, count); - tprintf("%ld, ", msgtyp); + tprintf("%" PRI_kld ", ", msgtyp); } static int -fetch_msgrcv_args(struct tcb *tcp, const long addr, unsigned long *pair) +fetch_msgrcv_args(struct tcb *const tcp, const kernel_ulong_t addr, + kernel_ulong_t *const pair) { if (current_wordsize == sizeof(*pair)) { if (umoven_or_printaddr(tcp, addr, 2 * sizeof(*pair), pair)) @@ -117,10 +118,10 @@ SYS_FUNC(msgrcv) tprint_msgrcv(tcp, tcp->u_arg[3], tcp->u_arg[1], tcp->u_arg[4]); } else { - unsigned long pair[2]; + kernel_ulong_t pair[2]; if (fetch_msgrcv_args(tcp, tcp->u_arg[3], pair)) - tprintf(", %lu, ", tcp->u_arg[1]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); else tprint_msgrcv(tcp, pair[0], tcp->u_arg[1], pair[1]); diff --git a/ipc_msgctl.c b/ipc_msgctl.c index a7352cb9a..f289c3013 100644 --- a/ipc_msgctl.c +++ b/ipc_msgctl.c @@ -51,7 +51,7 @@ typedef struct msqid64_ds msqid_ds_t; #include "xlat/msgctl_flags.h" static void -print_msqid_ds(struct tcb *tcp, const long addr, int cmd) +print_msqid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd) { /* TODO: We don't properly decode old compat ipc calls. */ if (cmd & IPC_64) @@ -101,7 +101,7 @@ SYS_FUNC(msgctl) PRINTCTL(msgctl_flags, tcp->u_arg[1], "MSG_???"); tprints(", "); } else { - const long addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2]; + const kernel_ulong_t addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2]; print_msqid_ds(tcp, addr, tcp->u_arg[1]); } return 0; diff --git a/ipc_sem.c b/ipc_sem.c index db7974698..4a7037839 100644 --- a/ipc_sem.c +++ b/ipc_sem.c @@ -57,7 +57,8 @@ print_sembuf(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) #endif static void -tprint_sembuf_array(struct tcb *tcp, const long addr, const unsigned int count) +tprint_sembuf_array(struct tcb *const tcp, const kernel_ulong_t addr, + const unsigned int count) { #if defined HAVE_SYS_SEM_H || defined HAVE_LINUX_SEM_H struct sembuf sb; @@ -125,7 +126,7 @@ SYS_FUNC(semctl) ) { printnum_ptr(tcp, tcp->u_arg[3]); } else { - tprintf("%#lx", tcp->u_arg[3]); + printaddr(tcp->u_arg[3]); } return RVAL_DECODED; } diff --git a/ipc_shm.c b/ipc_shm.c index f9a053744..c4bdb87a1 100644 --- a/ipc_shm.c +++ b/ipc_shm.c @@ -48,7 +48,7 @@ SYS_FUNC(shmget) tprintf("%#x", key); else tprints("IPC_PRIVATE"); - tprintf(", %lu, ", tcp->u_arg[1]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); if (printflags(shm_resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0) tprints("|"); print_numeric_umode_t(tcp->u_arg[2] & 0777); diff --git a/ipc_shmctl.c b/ipc_shmctl.c index 12bb806b1..ff76af8c2 100644 --- a/ipc_shmctl.c +++ b/ipc_shmctl.c @@ -51,7 +51,7 @@ typedef struct shmid64_ds shmid_ds_t; #include "xlat/shmctl_flags.h" static void -print_shmid_ds(struct tcb *tcp, const long addr, int cmd) +print_shmid_ds(struct tcb *const tcp, const kernel_ulong_t addr, int cmd) { /* TODO: We don't properly decode old compat ipc calls. */ if (cmd & IPC_64) @@ -101,7 +101,7 @@ SYS_FUNC(shmctl) PRINTCTL(shmctl_flags, tcp->u_arg[1], "SHM_???"); tprints(", "); } else { - const long addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2]; + const kernel_ulong_t addr = tcp->u_arg[indirect_ipccall(tcp) ? 3 : 2]; print_shmid_ds(tcp, addr, tcp->u_arg[1]); } return 0; diff --git a/kcmp.c b/kcmp.c index aec494a33..97795e639 100644 --- a/kcmp.c +++ b/kcmp.c @@ -33,8 +33,8 @@ SYS_FUNC(kcmp) pid_t pid1 = tcp->u_arg[0]; pid_t pid2 = tcp->u_arg[1]; int type = tcp->u_arg[2]; - unsigned long idx1 = tcp->u_arg[3]; - unsigned long idx2 = tcp->u_arg[4]; + kernel_ulong_t idx1 = tcp->u_arg[3]; + kernel_ulong_t idx2 = tcp->u_arg[4]; tprintf("%d, %d, ", pid1, pid2); printxval(kcmp_types, type, "KCMP_???"); @@ -51,7 +51,7 @@ SYS_FUNC(kcmp) case KCMP_VM: break; default: - tprintf(", %#lx, %#lx", idx1, idx2); + tprintf(", %#" PRI_klx ", %#" PRI_klx, idx1, idx2); } return RVAL_DECODED; diff --git a/kernel_types.h b/kernel_types.h index 551a1e6e5..5a276135a 100644 --- a/kernel_types.h +++ b/kernel_types.h @@ -35,7 +35,7 @@ typedef __kernel_long_t kernel_long_t; typedef __kernel_ulong_t kernel_ulong_t; -# elif defined __x86_64__ && defined __ILP32__ +# elif (defined __x86_64__ && defined __ILP32__) || defined LINUX_MIPSN32 typedef long long kernel_long_t; typedef unsigned long long kernel_ulong_t; diff --git a/kexec.c b/kexec.c index 128b1dffc..44d5bd185 100644 --- a/kexec.c +++ b/kexec.c @@ -40,8 +40,8 @@ static bool print_seg(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { - const unsigned long *seg; - unsigned long seg_buf[4]; + const kernel_ulong_t *seg; + kernel_ulong_t seg_buf[4]; if (elem_size < sizeof(seg_buf)) { unsigned int i; @@ -53,25 +53,25 @@ print_seg(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) seg = elem_buf; } - tprints("{"); + tprints("{buf="); printaddr(seg[0]); - tprintf(", %lu, ", seg[1]); + tprintf(", bufsz=%" PRI_klu ", mem=", seg[1]); printaddr(seg[2]); - tprintf(", %lu}", seg[3]); + tprintf(", memsz=%" PRI_klu "}", seg[3]); return true; } static void -print_kexec_segments(struct tcb *tcp, const unsigned long addr, - const unsigned long len) +print_kexec_segments(struct tcb *const tcp, const kernel_ulong_t addr, + const kernel_ulong_t len) { if (len > KEXEC_SEGMENT_MAX) { printaddr(addr); return; } - unsigned long seg[4]; + kernel_ulong_t seg[4]; const size_t sizeof_seg = ARRAY_SIZE(seg) * current_wordsize; print_array(tcp, addr, len, seg, sizeof_seg, @@ -82,19 +82,19 @@ SYS_FUNC(kexec_load) { /* entry, nr_segments */ printaddr(tcp->u_arg[0]); - tprintf(", %lu, ", tcp->u_arg[1]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); /* segments */ print_kexec_segments(tcp, tcp->u_arg[2], tcp->u_arg[1]); tprints(", "); /* flags */ - unsigned long n = tcp->u_arg[3]; - printxval_long(kexec_arch_values, n & KEXEC_ARCH_MASK, "KEXEC_ARCH_???"); - n &= ~KEXEC_ARCH_MASK; + kernel_ulong_t n = tcp->u_arg[3]; + printxval64(kexec_arch_values, n & KEXEC_ARCH_MASK, "KEXEC_ARCH_???"); + n &= ~(kernel_ulong_t) KEXEC_ARCH_MASK; if (n) { tprints("|"); - printflags_long(kexec_load_flags, n, "KEXEC_???"); + printflags64(kexec_load_flags, n, "KEXEC_???"); } return RVAL_DECODED; @@ -111,12 +111,12 @@ SYS_FUNC(kexec_file_load) printfd(tcp, tcp->u_arg[1]); tprints(", "); /* cmdline_len */ - tprintf("%lu, ", tcp->u_arg[2]); + tprintf("%" PRI_klu ", ", tcp->u_arg[2]); /* cmdline */ - printstr(tcp, tcp->u_arg[3], tcp->u_arg[2]); + printstrn(tcp, tcp->u_arg[3], tcp->u_arg[2]); tprints(", "); /* flags */ - printflags_long(kexec_file_load_flags, tcp->u_arg[4], "KEXEC_FILE_???"); + printflags64(kexec_file_load_flags, tcp->u_arg[4], "KEXEC_FILE_???"); return RVAL_DECODED; } diff --git a/keyctl.c b/keyctl.c index 7f047c6bf..c270221ff 100644 --- a/keyctl.c +++ b/keyctl.c @@ -26,7 +26,6 @@ */ #include "defs.h" -#include "kernel_types.h" typedef int32_t key_serial_t; @@ -52,15 +51,15 @@ print_keyring_serial_number(key_serial_t id) SYS_FUNC(add_key) { /* type */ - printstr(tcp, tcp->u_arg[0], -1); + printstr(tcp, tcp->u_arg[0]); /* description */ tprints(", "); - printstr(tcp, tcp->u_arg[1], -1); + printstr(tcp, tcp->u_arg[1]); /* payload */ tprints(", "); - printstr(tcp, tcp->u_arg[2], tcp->u_arg[3]); + printstrn(tcp, tcp->u_arg[2], tcp->u_arg[3]); /* payload length */ - tprintf(", %lu, ", tcp->u_arg[3]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[3]); /* keyring serial number */ print_keyring_serial_number(tcp->u_arg[4]); @@ -70,13 +69,13 @@ SYS_FUNC(add_key) SYS_FUNC(request_key) { /* type */ - printstr(tcp, tcp->u_arg[0], -1); + printstr(tcp, tcp->u_arg[0]); /* description */ tprints(", "); - printstr(tcp, tcp->u_arg[1], -1); + printstr(tcp, tcp->u_arg[1]); /* callout_info */ tprints(", "); - printstr(tcp, tcp->u_arg[2], -1); + printstr(tcp, tcp->u_arg[2]); /* keyring serial number */ tprints(", "); print_keyring_serial_number(tcp->u_arg[3]); @@ -97,7 +96,7 @@ keyctl_update_key(struct tcb *tcp, key_serial_t id, kernel_ulong_t addr, { print_keyring_serial_number(id); tprints(", "); - printstr(tcp, addr, len); + printstrn(tcp, addr, len); tprintf(", %llu", zero_extend_signed_to_ull(len)); } @@ -136,9 +135,9 @@ keyctl_keyring_search(struct tcb *tcp, key_serial_t id1, kernel_ulong_t addr1, { print_keyring_serial_number(id1); tprints(", "); - printstr(tcp, addr1, -1); + printstr(tcp, addr1); tprints(", "); - printstr(tcp, addr2, -1); + printstr(tcp, addr2); tprints(", "); print_keyring_serial_number(id2); } @@ -158,7 +157,7 @@ keyctl_instantiate_key(struct tcb *tcp, key_serial_t id1, kernel_ulong_t addr, { print_keyring_serial_number(id1); tprints(", "); - printstr(tcp, addr, len); + printstrn(tcp, addr, len); tprintf(", %llu, ", zero_extend_signed_to_ull(len)); print_keyring_serial_number(id2); } @@ -257,7 +256,7 @@ keyctl_dh_compute(struct tcb *tcp, kernel_ulong_t params, kernel_ulong_t buf, kernel_ulong_t rval = (tcp->u_rval >= 0) && ((kernel_ulong_t) tcp->u_rval > len) ? len : (kernel_ulong_t) tcp->u_rval; - printstr(tcp, buf, rval); + printstrn(tcp, buf, rval); } tprintf(", %llu", zero_extend_signed_to_ull(len)); } @@ -269,10 +268,10 @@ keyctl_dh_compute(struct tcb *tcp, kernel_ulong_t params, kernel_ulong_t buf, SYS_FUNC(keyctl) { int cmd = tcp->u_arg[0]; - unsigned long long arg2 = getarg_ull(tcp, 1); - unsigned long long arg3 = getarg_ull(tcp, 2); - unsigned long long arg4 = getarg_ull(tcp, 3); - unsigned long long arg5 = getarg_ull(tcp, 4); + kernel_ulong_t arg2 = tcp->u_arg[1]; + kernel_ulong_t arg3 = tcp->u_arg[2]; + kernel_ulong_t arg4 = tcp->u_arg[3]; + kernel_ulong_t arg5 = tcp->u_arg[4]; if (entering(tcp)) { printxval(keyctl_commands, cmd, "KEYCTL_???"); @@ -291,7 +290,7 @@ SYS_FUNC(keyctl) break; case KEYCTL_JOIN_SESSION_KEYRING: - printstr(tcp, arg2, -1); + printstr(tcp, arg2); break; case KEYCTL_UPDATE: @@ -364,7 +363,9 @@ SYS_FUNC(keyctl) return 0; default: - tprintf("%#llx, %#llx, %#llx, %#llx", arg2, arg3, arg4, arg5); + tprintf("%#" PRI_klx ", %#" PRI_klx + ", %#" PRI_klx ", %#" PRI_klx, + arg2, arg3, arg4, arg5); break; } diff --git a/ldt.c b/ldt.c index 7d5c7bf88..91bdf15de 100644 --- a/ldt.c +++ b/ldt.c @@ -33,12 +33,12 @@ #include "defs.h" -#if defined I386 || defined X86_64 || defined X32 +#ifdef HAVE_STRUCT_USER_DESC # include void -print_user_desc(struct tcb *tcp, const long addr) +print_user_desc(struct tcb *const tcp, const kernel_ulong_t addr) { struct user_desc desc; @@ -67,12 +67,12 @@ print_user_desc(struct tcb *tcp, const long addr) SYS_FUNC(modify_ldt) { - tprintf("%ld, ", tcp->u_arg[0]); + tprintf("%" PRI_kld ", ", tcp->u_arg[0]); if (tcp->u_arg[2] != sizeof(struct user_desc)) printaddr(tcp->u_arg[1]); else print_user_desc(tcp, tcp->u_arg[1]); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %" PRI_klu, tcp->u_arg[2]); return RVAL_DECODED; } @@ -105,7 +105,7 @@ SYS_FUNC(get_thread_area) return 0; } -#endif /* I386 || X86_64 || X32 */ +#endif /* HAVE_STRUCT_USER_DESC */ #if defined(M68K) || defined(MIPS) SYS_FUNC(set_thread_area) diff --git a/linux/32/ioctls_inc.h b/linux/32/ioctls_inc.h index 72905b46d..27ae3f5c6 100644 --- a/linux/32/ioctls_inc.h +++ b/linux/32/ioctls_inc.h @@ -1,4 +1,6 @@ -#if defined X86_64 || defined X32 \ +#if defined M68K +# include "32/ioctls_inc_align16.h" +#elif defined X86_64 || defined X32 \ || SIZEOF_STRUCT_I64_I32 < SIZEOF_LONG_LONG * 2 # include "32/ioctls_inc_align32.h" #else diff --git a/linux/32/ioctls_inc_align16.h b/linux/32/ioctls_inc_align16.h new file mode 100644 index 000000000..71c9d1873 --- /dev/null +++ b/linux/32/ioctls_inc_align16.h @@ -0,0 +1,2729 @@ +/* Generated by ioctls_gen.sh from definitions found in $linux/include/ tree. */ +{ "acpi/apei.h", "APEI_ERST_CLEAR_RECORD", _IOC_WRITE, 0x4501, 0x08 }, +{ "acpi/apei.h", "APEI_ERST_GET_RECORD_COUNT", _IOC_READ, 0x4502, 0x04 }, +{ "asm-generic/ioctls.h", "FIOASYNC", 0, 0x5452, 0 }, +{ "asm-generic/ioctls.h", "FIOCLEX", 0, 0x5451, 0 }, +{ "asm-generic/ioctls.h", "FIONBIO", 0, 0x5421, 0 }, +{ "asm-generic/ioctls.h", "FIONCLEX", 0, 0x5450, 0 }, +{ "asm-generic/ioctls.h", "FIONREAD", 0, 0x541B, 0 }, +{ "asm-generic/ioctls.h", "FIOQSIZE", 0, 0x5460, 0 }, +{ "asm-generic/ioctls.h", "TCFLSH", 0, 0x540B, 0 }, +{ "asm-generic/ioctls.h", "TCGETA", 0, 0x5405, 0 }, +{ "asm-generic/ioctls.h", "TCGETS", 0, 0x5401, 0 }, +{ "asm-generic/ioctls.h", "TCGETS2", _IOC_READ, 0x542a, 0x2c }, +{ "asm-generic/ioctls.h", "TCGETX", 0, 0x5432, 0 }, +{ "asm-generic/ioctls.h", "TCSBRK", 0, 0x5409, 0 }, +{ "asm-generic/ioctls.h", "TCSBRKP", 0, 0x5425, 0 }, +{ "asm-generic/ioctls.h", "TCSETA", 0, 0x5406, 0 }, +{ "asm-generic/ioctls.h", "TCSETAF", 0, 0x5408, 0 }, +{ "asm-generic/ioctls.h", "TCSETAW", 0, 0x5407, 0 }, +{ "asm-generic/ioctls.h", "TCSETS", 0, 0x5402, 0 }, +{ "asm-generic/ioctls.h", "TCSETS2", _IOC_WRITE, 0x542b, 0x2c }, +{ "asm-generic/ioctls.h", "TCSETSF", 0, 0x5404, 0 }, +{ "asm-generic/ioctls.h", "TCSETSF2", _IOC_WRITE, 0x542d, 0x2c }, +{ "asm-generic/ioctls.h", "TCSETSW", 0, 0x5403, 0 }, +{ "asm-generic/ioctls.h", "TCSETSW2", _IOC_WRITE, 0x542c, 0x2c }, +{ "asm-generic/ioctls.h", "TCSETX", 0, 0x5433, 0 }, +{ "asm-generic/ioctls.h", "TCSETXF", 0, 0x5434, 0 }, +{ "asm-generic/ioctls.h", "TCSETXW", 0, 0x5435, 0 }, +{ "asm-generic/ioctls.h", "TCXONC", 0, 0x540A, 0 }, +{ "asm-generic/ioctls.h", "TIOCCBRK", 0, 0x5428, 0 }, +{ "asm-generic/ioctls.h", "TIOCCONS", 0, 0x541D, 0 }, +{ "asm-generic/ioctls.h", "TIOCEXCL", 0, 0x540C, 0 }, +{ "asm-generic/ioctls.h", "TIOCGDEV", _IOC_READ, 0x5432, 0x04 }, +{ "asm-generic/ioctls.h", "TIOCGETD", 0, 0x5424, 0 }, +{ "asm-generic/ioctls.h", "TIOCGEXCL", _IOC_READ, 0x5440, 0x04 }, +{ "asm-generic/ioctls.h", "TIOCGICOUNT", 0, 0x545D, 0 }, +{ "asm-generic/ioctls.h", "TIOCGLCKTRMIOS", 0, 0x5456, 0 }, +{ "asm-generic/ioctls.h", "TIOCGPGRP", 0, 0x540F, 0 }, +{ "asm-generic/ioctls.h", "TIOCGPKT", _IOC_READ, 0x5438, 0x04 }, +{ "asm-generic/ioctls.h", "TIOCGPTLCK", _IOC_READ, 0x5439, 0x04 }, +{ "asm-generic/ioctls.h", "TIOCGPTN", _IOC_READ, 0x5430, 0x04 }, +{ "asm-generic/ioctls.h", "TIOCGRS485", 0, 0x542E, 0 }, +{ "asm-generic/ioctls.h", "TIOCGSERIAL", 0, 0x541E, 0 }, +{ "asm-generic/ioctls.h", "TIOCGSID", 0, 0x5429, 0 }, +{ "asm-generic/ioctls.h", "TIOCGSOFTCAR", 0, 0x5419, 0 }, +{ "asm-generic/ioctls.h", "TIOCGWINSZ", 0, 0x5413, 0 }, +{ "asm-generic/ioctls.h", "TIOCLINUX", 0, 0x541C, 0 }, +{ "asm-generic/ioctls.h", "TIOCMBIC", 0, 0x5417, 0 }, +{ "asm-generic/ioctls.h", "TIOCMBIS", 0, 0x5416, 0 }, +{ "asm-generic/ioctls.h", "TIOCMGET", 0, 0x5415, 0 }, +{ "asm-generic/ioctls.h", "TIOCMIWAIT", 0, 0x545C, 0 }, +{ "asm-generic/ioctls.h", "TIOCMSET", 0, 0x5418, 0 }, +{ "asm-generic/ioctls.h", "TIOCNOTTY", 0, 0x5422, 0 }, +{ "asm-generic/ioctls.h", "TIOCNXCL", 0, 0x540D, 0 }, +{ "asm-generic/ioctls.h", "TIOCOUTQ", 0, 0x5411, 0 }, +{ "asm-generic/ioctls.h", "TIOCPKT", 0, 0x5420, 0 }, +{ "asm-generic/ioctls.h", "TIOCSBRK", 0, 0x5427, 0 }, +{ "asm-generic/ioctls.h", "TIOCSCTTY", 0, 0x540E, 0 }, +{ "asm-generic/ioctls.h", "TIOCSERCONFIG", 0, 0x5453, 0 }, +{ "asm-generic/ioctls.h", "TIOCSERGETLSR", 0, 0x5459, 0 }, +{ "asm-generic/ioctls.h", "TIOCSERGETMULTI", 0, 0x545A, 0 }, +{ "asm-generic/ioctls.h", "TIOCSERGSTRUCT", 0, 0x5458, 0 }, +{ "asm-generic/ioctls.h", "TIOCSERGWILD", 0, 0x5454, 0 }, +{ "asm-generic/ioctls.h", "TIOCSERSETMULTI", 0, 0x545B, 0 }, +{ "asm-generic/ioctls.h", "TIOCSERSWILD", 0, 0x5455, 0 }, +{ "asm-generic/ioctls.h", "TIOCSETD", 0, 0x5423, 0 }, +{ "asm-generic/ioctls.h", "TIOCSIG", _IOC_WRITE, 0x5436, 0x04 }, +{ "asm-generic/ioctls.h", "TIOCSLCKTRMIOS", 0, 0x5457, 0 }, +{ "asm-generic/ioctls.h", "TIOCSPGRP", 0, 0x5410, 0 }, +{ "asm-generic/ioctls.h", "TIOCSPTLCK", _IOC_WRITE, 0x5431, 0x04 }, +{ "asm-generic/ioctls.h", "TIOCSRS485", 0, 0x542F, 0 }, +{ "asm-generic/ioctls.h", "TIOCSSERIAL", 0, 0x541F, 0 }, +{ "asm-generic/ioctls.h", "TIOCSSOFTCAR", 0, 0x541A, 0 }, +{ "asm-generic/ioctls.h", "TIOCSTI", 0, 0x5412, 0 }, +{ "asm-generic/ioctls.h", "TIOCSWINSZ", 0, 0x5414, 0 }, +{ "asm-generic/ioctls.h", "TIOCVHANGUP", 0, 0x5437, 0 }, +{ "asm-generic/sockios.h", "FIOGETOWN", 0, 0x8903, 0 }, +{ "asm-generic/sockios.h", "FIOSETOWN", 0, 0x8901, 0 }, +{ "asm-generic/sockios.h", "SIOCATMARK", 0, 0x8905, 0 }, +{ "asm-generic/sockios.h", "SIOCGPGRP", 0, 0x8904, 0 }, +{ "asm-generic/sockios.h", "SIOCGSTAMP", 0, 0x8906, 0 }, +{ "asm-generic/sockios.h", "SIOCGSTAMPNS", 0, 0x8907, 0 }, +{ "asm-generic/sockios.h", "SIOCSPGRP", 0, 0x8902, 0 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_BO_LIST", _IOC_READ|_IOC_WRITE, 0x6443, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CS", _IOC_READ|_IOC_WRITE, 0x6444, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_CTX", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_METADATA", _IOC_READ|_IOC_WRITE, 0x6446, 0x11c }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x08 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_OP", _IOC_READ|_IOC_WRITE, 0x6450, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6451, 0x18 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_VA", _IOC_WRITE, 0x6448, 0x28 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_FENCES", _IOC_READ|_IOC_WRITE, 0x6452, 0x18 }, +{ "drm/drm.h", "DRM_IOCTL_ADD_BUFS", _IOC_READ|_IOC_WRITE, 0x6416, 0x18 }, +{ "drm/drm.h", "DRM_IOCTL_ADD_CTX", _IOC_READ|_IOC_WRITE, 0x6420, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_ADD_DRAW", _IOC_READ|_IOC_WRITE, 0x6427, 0x04 }, +{ "drm/drm.h", "DRM_IOCTL_ADD_MAP", _IOC_READ|_IOC_WRITE, 0x6415, 0x18 }, +{ "drm/drm.h", "DRM_IOCTL_AGP_ACQUIRE", _IOC_NONE, 0x6430, 0x00 }, +{ "drm/drm.h", "DRM_IOCTL_AGP_ALLOC", _IOC_READ|_IOC_WRITE, 0x6434, 0x10 }, +{ "drm/drm.h", "DRM_IOCTL_AGP_BIND", _IOC_WRITE, 0x6436, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_AGP_ENABLE", _IOC_WRITE, 0x6432, 0x04 }, +{ "drm/drm.h", "DRM_IOCTL_AGP_FREE", _IOC_WRITE, 0x6435, 0x10 }, +{ "drm/drm.h", "DRM_IOCTL_AGP_INFO", _IOC_READ, 0x6433, 0x20 }, +{ "drm/drm.h", "DRM_IOCTL_AGP_RELEASE", _IOC_NONE, 0x6431, 0x00 }, +{ "drm/drm.h", "DRM_IOCTL_AGP_UNBIND", _IOC_WRITE, 0x6437, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_AUTH_MAGIC", _IOC_WRITE, 0x6411, 0x04 }, +{ "drm/drm.h", "DRM_IOCTL_BLOCK", _IOC_READ|_IOC_WRITE, 0x6412, 0x04 }, +{ "drm/drm.h", "DRM_IOCTL_CONTROL", _IOC_WRITE, 0x6414, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_DMA", _IOC_READ|_IOC_WRITE, 0x6429, 0x28 }, +{ "drm/drm.h", "DRM_IOCTL_DROP_MASTER", _IOC_NONE, 0x641f, 0x00 }, +{ "drm/drm.h", "DRM_IOCTL_FINISH", _IOC_WRITE, 0x642c, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_FREE_BUFS", _IOC_WRITE, 0x641a, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_GEM_CLOSE", _IOC_WRITE, 0x6409, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_GEM_FLINK", _IOC_READ|_IOC_WRITE, 0x640a, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_GEM_OPEN", _IOC_READ|_IOC_WRITE, 0x640b, 0x10 }, +{ "drm/drm.h", "DRM_IOCTL_GET_CAP", _IOC_READ|_IOC_WRITE, 0x640c, 0x10 }, +{ "drm/drm.h", "DRM_IOCTL_GET_CLIENT", _IOC_READ|_IOC_WRITE, 0x6405, 0x18 }, +{ "drm/drm.h", "DRM_IOCTL_GET_CTX", _IOC_READ|_IOC_WRITE, 0x6423, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_GET_MAGIC", _IOC_READ, 0x6402, 0x04 }, +{ "drm/drm.h", "DRM_IOCTL_GET_MAP", _IOC_READ|_IOC_WRITE, 0x6404, 0x18 }, +{ "drm/drm.h", "DRM_IOCTL_GET_SAREA_CTX", _IOC_READ|_IOC_WRITE, 0x641d, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_GET_STATS", _IOC_READ, 0x6406, 0x7c }, +{ "drm/drm.h", "DRM_IOCTL_GET_UNIQUE", _IOC_READ|_IOC_WRITE, 0x6401, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_INFO_BUFS", _IOC_READ|_IOC_WRITE, 0x6418, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_IRQ_BUSID", _IOC_READ|_IOC_WRITE, 0x6403, 0x10 }, +{ "drm/drm.h", "DRM_IOCTL_LOCK", _IOC_WRITE, 0x642a, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_MAP_BUFS", _IOC_READ|_IOC_WRITE, 0x6419, 0x0c }, +{ "drm/drm.h", "DRM_IOCTL_MARK_BUFS", _IOC_WRITE, 0x6417, 0x18 }, +{ "drm/drm.h", "DRM_IOCTL_MODESET_CTL", _IOC_WRITE, 0x6408, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_ADDFB", _IOC_READ|_IOC_WRITE, 0x64ae, 0x1c }, +{ "drm/drm.h", "DRM_IOCTL_MODE_ADDFB2", _IOC_READ|_IOC_WRITE, 0x64b8, 0x64 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_ATOMIC", _IOC_READ|_IOC_WRITE, 0x64bc, 0x38 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_ATTACHMODE", _IOC_READ|_IOC_WRITE, 0x64a8, 0x48 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_CREATEPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64bd, 0x10 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_CREATE_DUMB", _IOC_READ|_IOC_WRITE, 0x64b2, 0x20 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_CURSOR", _IOC_READ|_IOC_WRITE, 0x64a3, 0x1c }, +{ "drm/drm.h", "DRM_IOCTL_MODE_CURSOR2", _IOC_READ|_IOC_WRITE, 0x64bb, 0x24 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_DESTROYPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64be, 0x04 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_DESTROY_DUMB", _IOC_READ|_IOC_WRITE, 0x64b4, 0x04 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_DETACHMODE", _IOC_READ|_IOC_WRITE, 0x64a9, 0x48 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_DIRTYFB", _IOC_READ|_IOC_WRITE, 0x64b1, 0x18 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_GETCONNECTOR", _IOC_READ|_IOC_WRITE, 0x64a7, 0x50 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_GETCRTC", _IOC_READ|_IOC_WRITE, 0x64a1, 0x68 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_GETENCODER", _IOC_READ|_IOC_WRITE, 0x64a6, 0x14 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_GETFB", _IOC_READ|_IOC_WRITE, 0x64ad, 0x1c }, +{ "drm/drm.h", "DRM_IOCTL_MODE_GETGAMMA", _IOC_READ|_IOC_WRITE, 0x64a4, 0x20 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_GETPLANE", _IOC_READ|_IOC_WRITE, 0x64b6, 0x20 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_GETPLANERESOURCES", _IOC_READ|_IOC_WRITE, 0x64b5, 0x0c }, +{ "drm/drm.h", "DRM_IOCTL_MODE_GETPROPBLOB", _IOC_READ|_IOC_WRITE, 0x64ac, 0x10 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_GETPROPERTY", _IOC_READ|_IOC_WRITE, 0x64aa, 0x40 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_GETRESOURCES", _IOC_READ|_IOC_WRITE, 0x64a0, 0x40 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_MAP_DUMB", _IOC_READ|_IOC_WRITE, 0x64b3, 0x10 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_OBJ_GETPROPERTIES", _IOC_READ|_IOC_WRITE, 0x64b9, 0x1c }, +{ "drm/drm.h", "DRM_IOCTL_MODE_OBJ_SETPROPERTY", _IOC_READ|_IOC_WRITE, 0x64ba, 0x14 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_PAGE_FLIP", _IOC_READ|_IOC_WRITE, 0x64b0, 0x18 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_RMFB", _IOC_READ|_IOC_WRITE, 0x64af, 0x04 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_SETCRTC", _IOC_READ|_IOC_WRITE, 0x64a2, 0x68 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_SETGAMMA", _IOC_READ|_IOC_WRITE, 0x64a5, 0x20 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_SETPLANE", _IOC_READ|_IOC_WRITE, 0x64b7, 0x30 }, +{ "drm/drm.h", "DRM_IOCTL_MODE_SETPROPERTY", _IOC_READ|_IOC_WRITE, 0x64ab, 0x10 }, +{ "drm/drm.h", "DRM_IOCTL_MOD_CTX", _IOC_WRITE, 0x6422, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_NEW_CTX", _IOC_WRITE, 0x6425, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_PRIME_FD_TO_HANDLE", _IOC_READ|_IOC_WRITE, 0x642e, 0x0c }, +{ "drm/drm.h", "DRM_IOCTL_PRIME_HANDLE_TO_FD", _IOC_READ|_IOC_WRITE, 0x642d, 0x0c }, +{ "drm/drm.h", "DRM_IOCTL_RES_CTX", _IOC_READ|_IOC_WRITE, 0x6426, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_RM_CTX", _IOC_READ|_IOC_WRITE, 0x6421, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_RM_DRAW", _IOC_READ|_IOC_WRITE, 0x6428, 0x04 }, +{ "drm/drm.h", "DRM_IOCTL_RM_MAP", _IOC_WRITE, 0x641b, 0x18 }, +{ "drm/drm.h", "DRM_IOCTL_SET_CLIENT_CAP", _IOC_WRITE, 0x640d, 0x10 }, +{ "drm/drm.h", "DRM_IOCTL_SET_MASTER", _IOC_NONE, 0x641e, 0x00 }, +{ "drm/drm.h", "DRM_IOCTL_SET_SAREA_CTX", _IOC_WRITE, 0x641c, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_SET_UNIQUE", _IOC_WRITE, 0x6410, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_SET_VERSION", _IOC_READ|_IOC_WRITE, 0x6407, 0x10 }, +{ "drm/drm.h", "DRM_IOCTL_SG_ALLOC", _IOC_READ|_IOC_WRITE, 0x6438, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_SG_FREE", _IOC_WRITE, 0x6439, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_SWITCH_CTX", _IOC_WRITE, 0x6424, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_UNBLOCK", _IOC_READ|_IOC_WRITE, 0x6413, 0x04 }, +{ "drm/drm.h", "DRM_IOCTL_UNLOCK", _IOC_WRITE, 0x642b, 0x08 }, +{ "drm/drm.h", "DRM_IOCTL_UPDATE_DRAW", _IOC_WRITE, 0x643f, 0x14 }, +{ "drm/drm.h", "DRM_IOCTL_VERSION", _IOC_READ|_IOC_WRITE, 0x6400, 0x24 }, +{ "drm/drm.h", "DRM_IOCTL_WAIT_VBLANK", _IOC_READ|_IOC_WRITE, 0x643a, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_FINI", _IOC_WRITE, 0x6445, 0x08 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x30 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6448, 0x18 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GEM_WAIT", _IOC_WRITE, 0x6449, 0x20 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, +{ "drm/etnaviv_drm.h", "DRM_IOCTL_ETNAVIV_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x20 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_EXEC", _IOC_READ|_IOC_WRITE, 0x6462, 0x08 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_GET_VER", _IOC_READ|_IOC_WRITE, 0x6460, 0x08 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST", _IOC_READ|_IOC_WRITE, 0x6461, 0x28 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_GET", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_GEM_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_CMD_CTRL", _IOC_READ|_IOC_WRITE, 0x6473, 0x08 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6470, 0x50 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_QUEUE_BUF", _IOC_READ|_IOC_WRITE, 0x6472, 0x28 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_IPP_SET_PROPERTY", _IOC_READ|_IOC_WRITE, 0x6471, 0x60 }, +{ "drm/exynos_drm.h", "DRM_IOCTL_EXYNOS_VIDI_CONNECTION", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_CLEAR", _IOC_WRITE, 0x6442, 0x0c }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_COPY", _IOC_WRITE, 0x6447, 0x0c }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_DOCOPY", _IOC_NONE, 0x6448, 0x00 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_FLIP", _IOC_NONE, 0x644e, 0x00 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_FLUSH", _IOC_NONE, 0x6443, 0x00 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_FSTATUS", _IOC_NONE, 0x644a, 0x00 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_GETAGE", _IOC_NONE, 0x6444, 0x00 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_GETBUF", _IOC_READ|_IOC_WRITE, 0x6445, 0x10 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_INIT", _IOC_WRITE, 0x6440, 0x40 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_MC", _IOC_WRITE, 0x644c, 0x14 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_OV0FLIP", _IOC_NONE, 0x644b, 0x00 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_OV0INFO", _IOC_READ, 0x6449, 0x08 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_RSTATUS", _IOC_NONE, 0x644d, 0x00 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_SWAP", _IOC_NONE, 0x6446, 0x00 }, +{ "drm/i810_drm.h", "DRM_IOCTL_I810_VERTEX", _IOC_WRITE, 0x6441, 0x0c }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_ALLOC", _IOC_READ|_IOC_WRITE, 0x6448, 0x10 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_BATCHBUFFER", _IOC_WRITE, 0x6443, 0x18 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_CMDBUFFER", _IOC_WRITE, 0x644b, 0x18 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_DESTROY_HEAP", _IOC_WRITE, 0x644c, 0x04 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_FLIP", _IOC_NONE, 0x6442, 0x00 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_FLUSH", _IOC_NONE, 0x6441, 0x00 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_FREE", _IOC_WRITE, 0x6449, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_BUSY", _IOC_READ|_IOC_WRITE, 0x6457, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_CREATE", _IOC_READ|_IOC_WRITE, 0x646d, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_DESTROY", _IOC_WRITE, 0x646e, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6474, 0x18 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM", _IOC_READ|_IOC_WRITE, 0x6475, 0x18 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x645b, 0x10 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_ENTERVT", _IOC_NONE, 0x6459, 0x00 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER", _IOC_WRITE, 0x6454, 0x28 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_EXECBUFFER2", _IOC_WRITE, 0x6469, 0x40 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_APERTURE", _IOC_READ, 0x6463, 0x10 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_CACHING", _IOC_READ|_IOC_WRITE, 0x6470, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_GET_TILING", _IOC_READ|_IOC_WRITE, 0x6462, 0x10 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_INIT", _IOC_WRITE, 0x6453, 0x10 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_LEAVEVT", _IOC_NONE, 0x645a, 0x00 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6466, 0x0c }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x645e, 0x28 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_MMAP_GTT", _IOC_READ|_IOC_WRITE, 0x6464, 0x10 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_PIN", _IOC_READ|_IOC_WRITE, 0x6455, 0x18 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_PREAD", _IOC_WRITE, 0x645c, 0x20 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_PWRITE", _IOC_WRITE, 0x645d, 0x20 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_SET_CACHING", _IOC_WRITE, 0x646f, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_SET_DOMAIN", _IOC_WRITE, 0x645f, 0x0c }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_SET_TILING", _IOC_READ|_IOC_WRITE, 0x6461, 0x10 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_SW_FINISH", _IOC_WRITE, 0x6460, 0x04 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_THROTTLE", _IOC_NONE, 0x6458, 0x00 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_UNPIN", _IOC_WRITE, 0x6456, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x6473, 0x18 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GEM_WAIT", _IOC_READ|_IOC_WRITE, 0x646c, 0x10 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6446, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID", _IOC_READ|_IOC_WRITE, 0x6465, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GET_RESET_STATS", _IOC_READ|_IOC_WRITE, 0x6472, 0x18 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646a, 0x14 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_GET_VBLANK_PIPE", _IOC_READ, 0x644e, 0x04 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_HWS_ADDR", _IOC_WRITE, 0x6451, 0x10 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_INIT", _IOC_WRITE, 0x6440, 0x44 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_INIT_HEAP", _IOC_WRITE, 0x644a, 0x0c }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_IRQ_EMIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x04 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_IRQ_WAIT", _IOC_WRITE, 0x6445, 0x04 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_OVERLAY_ATTRS", _IOC_READ|_IOC_WRITE, 0x6468, 0x2c }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_OVERLAY_PUT_IMAGE", _IOC_WRITE, 0x6467, 0x2c }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_REG_READ", _IOC_READ|_IOC_WRITE, 0x6471, 0x10 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_SETPARAM", _IOC_WRITE, 0x6447, 0x08 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_SET_SPRITE_COLORKEY", _IOC_READ|_IOC_WRITE, 0x646b, 0x14 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_SET_VBLANK_PIPE", _IOC_WRITE, 0x644d, 0x04 }, +{ "drm/i915_drm.h", "DRM_IOCTL_I915_VBLANK_SWAP", _IOC_READ|_IOC_WRITE, 0x644f, 0x0c }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_BLIT", _IOC_WRITE, 0x6448, 0x34 }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_CLEAR", _IOC_WRITE, 0x6444, 0x14 }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_DMA_BOOTSTRAP", _IOC_READ|_IOC_WRITE, 0x644c, 0x1a }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_FLUSH", _IOC_WRITE, 0x6441, 0x08 }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6449, 0x08 }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_ILOAD", _IOC_WRITE, 0x6447, 0x0c }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_INDICES", _IOC_WRITE, 0x6446, 0x10 }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_INIT", _IOC_WRITE, 0x6440, 0x5c }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_RESET", _IOC_NONE, 0x6442, 0x00 }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_SET_FENCE", _IOC_WRITE, 0x644a, 0x04 }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_SWAP", _IOC_NONE, 0x6443, 0x00 }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_VERTEX", _IOC_WRITE, 0x6445, 0x0c }, +{ "drm/mga_drm.h", "DRM_IOCTL_MGA_WAIT_FENCE", _IOC_READ|_IOC_WRITE, 0x644b, 0x04 }, +{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_CPU_FINI", _IOC_WRITE, 0x6445, 0x04 }, +{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x18 }, +{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6448, 0x0c }, +{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x24 }, +{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, +{ "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x18 }, +{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_FINI", _IOC_WRITE, 0x6483, 0x04 }, +{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_PREP", _IOC_WRITE, 0x6482, 0x08 }, +{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6484, 0x28 }, +{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6480, 0x30 }, +{ "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_PUSHBUF", _IOC_READ|_IOC_WRITE, 0x6481, 0x40 }, +{ "drm/omap_drm.h", "DRM_IOCTL_OMAP_GEM_CPU_FINI", _IOC_WRITE, 0x6445, 0x10 }, +{ "drm/omap_drm.h", "DRM_IOCTL_OMAP_GEM_CPU_PREP", _IOC_WRITE, 0x6444, 0x08 }, +{ "drm/omap_drm.h", "DRM_IOCTL_OMAP_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6446, 0x18 }, +{ "drm/omap_drm.h", "DRM_IOCTL_OMAP_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/omap_drm.h", "DRM_IOCTL_OMAP_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, +{ "drm/omap_drm.h", "DRM_IOCTL_OMAP_SET_PARAM", _IOC_WRITE, 0x6441, 0x10 }, +{ "drm/qxl_drm.h", "DRM_IOCTL_QXL_ALLOC", _IOC_READ|_IOC_WRITE, 0x6440, 0x08 }, +{ "drm/qxl_drm.h", "DRM_IOCTL_QXL_ALLOC_SURF", _IOC_READ|_IOC_WRITE, 0x6446, 0x18 }, +{ "drm/qxl_drm.h", "DRM_IOCTL_QXL_CLIENTCAP", _IOC_WRITE, 0x6445, 0x08 }, +{ "drm/qxl_drm.h", "DRM_IOCTL_QXL_EXECBUFFER", _IOC_WRITE, 0x6442, 0x10 }, +{ "drm/qxl_drm.h", "DRM_IOCTL_QXL_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/qxl_drm.h", "DRM_IOCTL_QXL_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, +{ "drm/qxl_drm.h", "DRM_IOCTL_QXL_UPDATE_AREA", _IOC_WRITE, 0x6443, 0x18 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_BLIT", _IOC_WRITE, 0x644b, 0x18 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_CCE_IDLE", _IOC_NONE, 0x6444, 0x00 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_CCE_RESET", _IOC_NONE, 0x6443, 0x00 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_CCE_START", _IOC_NONE, 0x6441, 0x00 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_CCE_STOP", _IOC_WRITE, 0x6442, 0x08 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_CLEAR", _IOC_WRITE, 0x6448, 0x14 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_DEPTH", _IOC_WRITE, 0x644c, 0x18 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_FLIP", _IOC_NONE, 0x6453, 0x00 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_FULLSCREEN", _IOC_WRITE, 0x6450, 0x04 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6452, 0x08 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_INDICES", _IOC_WRITE, 0x644a, 0x14 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_INDIRECT", _IOC_READ|_IOC_WRITE, 0x644f, 0x10 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_INIT", _IOC_WRITE, 0x6440, 0x58 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_RESET", _IOC_NONE, 0x6446, 0x00 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_STIPPLE", _IOC_WRITE, 0x644d, 0x04 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_SWAP", _IOC_NONE, 0x6447, 0x00 }, +{ "drm/r128_drm.h", "DRM_IOCTL_R128_VERTEX", _IOC_WRITE, 0x6449, 0x10 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_ALLOC", _IOC_READ|_IOC_WRITE, 0x6453, 0x10 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_CLEAR", _IOC_WRITE, 0x6448, 0x18 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_CMDBUF", _IOC_WRITE, 0x6450, 0x10 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_CP_IDLE", _IOC_NONE, 0x6444, 0x00 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_CP_INIT", _IOC_WRITE, 0x6440, 0x54 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_CP_RESET", _IOC_NONE, 0x6443, 0x00 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_CP_RESUME", _IOC_NONE, 0x6458, 0x00 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_CP_START", _IOC_NONE, 0x6441, 0x00 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_CP_STOP", _IOC_WRITE, 0x6442, 0x08 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_CS", _IOC_READ|_IOC_WRITE, 0x6466, 0x20 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_FLIP", _IOC_NONE, 0x6452, 0x00 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_FREE", _IOC_WRITE, 0x6454, 0x08 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_FULLSCREEN", _IOC_WRITE, 0x6446, 0x04 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_BUSY", _IOC_READ|_IOC_WRITE, 0x646a, 0x08 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x645d, 0x1c }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_GET_TILING", _IOC_READ|_IOC_WRITE, 0x6469, 0x0c }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x645c, 0x18 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x645e, 0x20 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_OP", _IOC_READ|_IOC_WRITE, 0x646c, 0x10 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_PREAD", _IOC_READ|_IOC_WRITE, 0x6461, 0x20 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_PWRITE", _IOC_READ|_IOC_WRITE, 0x6462, 0x20 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_SET_DOMAIN", _IOC_READ|_IOC_WRITE, 0x6463, 0x0c }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_SET_TILING", _IOC_READ|_IOC_WRITE, 0x6468, 0x0c }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_USERPTR", _IOC_READ|_IOC_WRITE, 0x646d, 0x18 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_VA", _IOC_READ|_IOC_WRITE, 0x646b, 0x18 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GEM_WAIT_IDLE", _IOC_WRITE, 0x6464, 0x08 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6451, 0x08 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_INDICES", _IOC_WRITE, 0x644a, 0x14 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_INDIRECT", _IOC_READ|_IOC_WRITE, 0x644d, 0x10 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_INFO", _IOC_READ|_IOC_WRITE, 0x6467, 0x10 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_INIT_HEAP", _IOC_WRITE, 0x6455, 0x0c }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_IRQ_EMIT", _IOC_READ|_IOC_WRITE, 0x6456, 0x04 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_IRQ_WAIT", _IOC_WRITE, 0x6457, 0x04 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_RESET", _IOC_NONE, 0x6445, 0x00 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_SETPARAM", _IOC_WRITE, 0x6459, 0x0c }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_STIPPLE", _IOC_WRITE, 0x644c, 0x04 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_SURF_ALLOC", _IOC_WRITE, 0x645a, 0x0c }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_SURF_FREE", _IOC_WRITE, 0x645b, 0x04 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_SWAP", _IOC_NONE, 0x6447, 0x00 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_TEXTURE", _IOC_READ|_IOC_WRITE, 0x644e, 0x18 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_VERTEX", _IOC_WRITE, 0x6449, 0x10 }, +{ "drm/radeon_drm.h", "DRM_IOCTL_RADEON_VERTEX2", _IOC_WRITE, 0x644f, 0x18 }, +{ "drm/savage_drm.h", "DRM_IOCTL_SAVAGE_BCI_CMDBUF", _IOC_WRITE, 0x6441, 0x24 }, +{ "drm/savage_drm.h", "DRM_IOCTL_SAVAGE_BCI_EVENT_EMIT", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 }, +{ "drm/savage_drm.h", "DRM_IOCTL_SAVAGE_BCI_EVENT_WAIT", _IOC_WRITE, 0x6443, 0x08 }, +{ "drm/savage_drm.h", "DRM_IOCTL_SAVAGE_BCI_INIT", _IOC_WRITE, 0x6440, 0x50 }, +{ "drm/sis_drm.h", "DRM_IOCTL_SIS_AGP_ALLOC", _IOC_READ|_IOC_WRITE, 0x6454, 0x10 }, +{ "drm/sis_drm.h", "DRM_IOCTL_SIS_AGP_FREE", _IOC_WRITE, 0x6455, 0x10 }, +{ "drm/sis_drm.h", "DRM_IOCTL_SIS_AGP_INIT", _IOC_READ|_IOC_WRITE, 0x6453, 0x08 }, +{ "drm/sis_drm.h", "DRM_IOCTL_SIS_FB_ALLOC", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/sis_drm.h", "DRM_IOCTL_SIS_FB_FREE", _IOC_WRITE, 0x6445, 0x10 }, +{ "drm/sis_drm.h", "DRM_IOCTL_SIS_FB_INIT", _IOC_WRITE, 0x6456, 0x08 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_CLOSE_CHANNEL", _IOC_READ|_IOC_WRITE, 0x6446, 0x10 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_CREATE", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_GET_FLAGS", _IOC_READ|_IOC_WRITE, 0x644d, 0x08 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_GET_TILING", _IOC_READ|_IOC_WRITE, 0x644b, 0x10 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_MMAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_SET_FLAGS", _IOC_READ|_IOC_WRITE, 0x644c, 0x08 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GEM_SET_TILING", _IOC_READ|_IOC_WRITE, 0x644a, 0x10 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GET_SYNCPT", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_GET_SYNCPT_BASE", _IOC_READ|_IOC_WRITE, 0x6449, 0x10 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_OPEN_CHANNEL", _IOC_READ|_IOC_WRITE, 0x6445, 0x10 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6448, 0x58 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_INCR", _IOC_READ|_IOC_WRITE, 0x6443, 0x08 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_READ", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 }, +{ "drm/tegra_drm.h", "DRM_IOCTL_TEGRA_SYNCPT_WAIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_BO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_CREATE_SHADER_BO", _IOC_READ|_IOC_WRITE, 0x6445, 0x18 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_HANG_STATE", _IOC_READ|_IOC_WRITE, 0x6446, 0xa0 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_MMAP_BO", _IOC_READ|_IOC_WRITE, 0x6444, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_SUBMIT_CL", _IOC_READ|_IOC_WRITE, 0x6440, 0xa0 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_BO", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, +{ "drm/vc4_drm.h", "DRM_IOCTL_VC4_WAIT_SEQNO", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, +{ "drm/vgem_drm.h", "DRM_IOCTL_VGEM_FENCE_ATTACH", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, +{ "drm/vgem_drm.h", "DRM_IOCTL_VGEM_FENCE_SIGNAL", _IOC_WRITE, 0x6442, 0x08 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_AGP_INIT", _IOC_READ|_IOC_WRITE, 0x6442, 0x08 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_ALLOCMEM", _IOC_READ|_IOC_WRITE, 0x6440, 0x14 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_BLIT_SYNC", _IOC_WRITE, 0x644f, 0x08 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_CMDBUFFER", _IOC_WRITE, 0x6448, 0x08 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_CMDBUF_SIZE", _IOC_READ|_IOC_WRITE, 0x644b, 0x0c }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_DEC_FUTEX", _IOC_WRITE, 0x6445, 0x10 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_DMA_BLIT", _IOC_WRITE, 0x644e, 0x28 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_DMA_INIT", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_FB_INIT", _IOC_READ|_IOC_WRITE, 0x6443, 0x08 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_FLUSH", _IOC_NONE, 0x6449, 0x00 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_FREEMEM", _IOC_WRITE, 0x6441, 0x14 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_MAP_INIT", _IOC_READ|_IOC_WRITE, 0x6444, 0x14 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_PCICMD", _IOC_WRITE, 0x644a, 0x08 }, +{ "drm/via_drm.h", "DRM_IOCTL_VIA_WAIT_IRQ", _IOC_READ|_IOC_WRITE, 0x644d, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_EXECBUFFER", _IOC_WRITE, 0x6442, 0x20 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_GETPARAM", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_GET_CAPS", _IOC_READ|_IOC_WRITE, 0x6449, 0x18 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_MAP", _IOC_READ|_IOC_WRITE, 0x6441, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_RESOURCE_CREATE", _IOC_READ|_IOC_WRITE, 0x6444, 0x38 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_RESOURCE_INFO", _IOC_READ|_IOC_WRITE, 0x6445, 0x10 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST", _IOC_READ|_IOC_WRITE, 0x6446, 0x24 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST", _IOC_READ|_IOC_WRITE, 0x6447, 0x24 }, +{ "drm/virtgpu_drm.h", "DRM_IOCTL_VIRTGPU_WAIT", _IOC_READ|_IOC_WRITE, 0x6448, 0x08 }, +{ "linux/agpgart.h", "AGPIOC_ACQUIRE", _IOC_NONE, 0x4101, 0x00 }, +{ "linux/agpgart.h", "AGPIOC_ALLOCATE", _IOC_READ|_IOC_WRITE, 0x4106, 0x04 }, +{ "linux/agpgart.h", "AGPIOC_BIND", _IOC_WRITE, 0x4108, 0x04 }, +{ "linux/agpgart.h", "AGPIOC_CHIPSET_FLUSH", _IOC_NONE, 0x410a, 0x00 }, +{ "linux/agpgart.h", "AGPIOC_DEALLOCATE", _IOC_WRITE, 0x4107, 0x04 }, +{ "linux/agpgart.h", "AGPIOC_INFO", _IOC_READ, 0x4100, 0x04 }, +{ "linux/agpgart.h", "AGPIOC_PROTECT", _IOC_WRITE, 0x4105, 0x04 }, +{ "linux/agpgart.h", "AGPIOC_RELEASE", _IOC_NONE, 0x4102, 0x00 }, +{ "linux/agpgart.h", "AGPIOC_RESERVE", _IOC_WRITE, 0x4104, 0x04 }, +{ "linux/agpgart.h", "AGPIOC_SETUP", _IOC_WRITE, 0x4103, 0x04 }, +{ "linux/agpgart.h", "AGPIOC_UNBIND", _IOC_WRITE, 0x4109, 0x04 }, +{ "linux/am437x-vpfe.h", "VIDIOC_AM437X_CCDC_CFG", _IOC_WRITE, 0x56c1, 0x04 }, +{ "linux/android/binder.h", "BC_ACQUIRE", _IOC_WRITE, 0x6305, 0x04 }, +{ "linux/android/binder.h", "BC_ACQUIRE_DONE", _IOC_WRITE, 0x6309, 0x10 }, +{ "linux/android/binder.h", "BC_ACQUIRE_RESULT", _IOC_WRITE, 0x6302, 0x04 }, +{ "linux/android/binder.h", "BC_ATTEMPT_ACQUIRE", _IOC_WRITE, 0x630a, 0x08 }, +{ "linux/android/binder.h", "BC_CLEAR_DEATH_NOTIFICATION", _IOC_WRITE, 0x630f, 0x0c }, +{ "linux/android/binder.h", "BC_DEAD_BINDER_DONE", _IOC_WRITE, 0x6310, 0x08 }, +{ "linux/android/binder.h", "BC_DECREFS", _IOC_WRITE, 0x6307, 0x04 }, +{ "linux/android/binder.h", "BC_ENTER_LOOPER", _IOC_NONE, 0x630c, 0x00 }, +{ "linux/android/binder.h", "BC_EXIT_LOOPER", _IOC_NONE, 0x630d, 0x00 }, +{ "linux/android/binder.h", "BC_FREE_BUFFER", _IOC_WRITE, 0x6303, 0x08 }, +{ "linux/android/binder.h", "BC_INCREFS", _IOC_WRITE, 0x6304, 0x04 }, +{ "linux/android/binder.h", "BC_INCREFS_DONE", _IOC_WRITE, 0x6308, 0x10 }, +{ "linux/android/binder.h", "BC_REGISTER_LOOPER", _IOC_NONE, 0x630b, 0x00 }, +{ "linux/android/binder.h", "BC_RELEASE", _IOC_WRITE, 0x6306, 0x04 }, +{ "linux/android/binder.h", "BC_REPLY", _IOC_WRITE, 0x6301, 0x40 }, +{ "linux/android/binder.h", "BC_REQUEST_DEATH_NOTIFICATION", _IOC_WRITE, 0x630e, 0x0c }, +{ "linux/android/binder.h", "BC_TRANSACTION", _IOC_WRITE, 0x6300, 0x40 }, +{ "linux/android/binder.h", "BINDER_SET_CONTEXT_MGR", _IOC_WRITE, 0x6207, 0x04 }, +{ "linux/android/binder.h", "BINDER_SET_IDLE_PRIORITY", _IOC_WRITE, 0x6206, 0x04 }, +{ "linux/android/binder.h", "BINDER_SET_IDLE_TIMEOUT", _IOC_WRITE, 0x6203, 0x08 }, +{ "linux/android/binder.h", "BINDER_SET_MAX_THREADS", _IOC_WRITE, 0x6205, 0x04 }, +{ "linux/android/binder.h", "BINDER_THREAD_EXIT", _IOC_WRITE, 0x6208, 0x04 }, +{ "linux/android/binder.h", "BINDER_VERSION", _IOC_READ|_IOC_WRITE, 0x6209, 0x04 }, +{ "linux/android/binder.h", "BINDER_WRITE_READ", _IOC_READ|_IOC_WRITE, 0x6201, 0x30 }, +{ "linux/android/binder.h", "BR_ACQUIRE", _IOC_READ, 0x7208, 0x10 }, +{ "linux/android/binder.h", "BR_ACQUIRE_RESULT", _IOC_READ, 0x7204, 0x04 }, +{ "linux/android/binder.h", "BR_ATTEMPT_ACQUIRE", _IOC_READ, 0x720b, 0x14 }, +{ "linux/android/binder.h", "BR_CLEAR_DEATH_NOTIFICATION_DONE", _IOC_READ, 0x7210, 0x08 }, +{ "linux/android/binder.h", "BR_DEAD_BINDER", _IOC_READ, 0x720f, 0x08 }, +{ "linux/android/binder.h", "BR_DEAD_REPLY", _IOC_NONE, 0x7205, 0x00 }, +{ "linux/android/binder.h", "BR_DECREFS", _IOC_READ, 0x720a, 0x10 }, +{ "linux/android/binder.h", "BR_ERROR", _IOC_READ, 0x7200, 0x04 }, +{ "linux/android/binder.h", "BR_FAILED_REPLY", _IOC_NONE, 0x7211, 0x00 }, +{ "linux/android/binder.h", "BR_FINISHED", _IOC_NONE, 0x720e, 0x00 }, +{ "linux/android/binder.h", "BR_INCREFS", _IOC_READ, 0x7207, 0x10 }, +{ "linux/android/binder.h", "BR_NOOP", _IOC_NONE, 0x720c, 0x00 }, +{ "linux/android/binder.h", "BR_OK", _IOC_NONE, 0x7201, 0x00 }, +{ "linux/android/binder.h", "BR_RELEASE", _IOC_READ, 0x7209, 0x10 }, +{ "linux/android/binder.h", "BR_REPLY", _IOC_READ, 0x7203, 0x40 }, +{ "linux/android/binder.h", "BR_SPAWN_LOOPER", _IOC_NONE, 0x720d, 0x00 }, +{ "linux/android/binder.h", "BR_TRANSACTION", _IOC_READ, 0x7202, 0x40 }, +{ "linux/android/binder.h", "BR_TRANSACTION_COMPLETE", _IOC_NONE, 0x7206, 0x00 }, +{ "linux/apm_bios.h", "APM_IOC_STANDBY", _IOC_NONE, 0x4101, 0x00 }, +{ "linux/apm_bios.h", "APM_IOC_SUSPEND", _IOC_NONE, 0x4102, 0x00 }, +{ "linux/arcfb.h", "FBIO_GETCONTROL2", _IOC_READ, 0x4689, 0x04 }, +{ "linux/arcfb.h", "FBIO_WAITEVENT", _IOC_NONE, 0x4688, 0x00 }, +{ "linux/atm_eni.h", "ENI_MEMDUMP", _IOC_WRITE, 0x6160, 0x0c }, +{ "linux/atm_eni.h", "ENI_SETMULT", _IOC_WRITE, 0x6167, 0x0c }, +{ "linux/atm_he.h", "HE_GET_REG", _IOC_WRITE, 0x6160, 0x0c }, +{ "linux/atm_idt77105.h", "IDT77105_GETSTAT", _IOC_WRITE, 0x6132, 0x0c }, +{ "linux/atm_idt77105.h", "IDT77105_GETSTATZ", _IOC_WRITE, 0x6133, 0x0c }, +{ "linux/atm_nicstar.h", "NS_ADJBUFLEV", _IOC_NONE, 0x6163, 0x00 }, +{ "linux/atm_nicstar.h", "NS_GETPSTAT", _IOC_READ|_IOC_WRITE, 0x6161, 0x0c }, +{ "linux/atm_nicstar.h", "NS_SETBUFLEV", _IOC_WRITE, 0x6162, 0x0c }, +{ "linux/atm_tcp.h", "ATMTCP_CREATE", _IOC_NONE, 0x618e, 0x00 }, +{ "linux/atm_tcp.h", "ATMTCP_REMOVE", _IOC_NONE, 0x618f, 0x00 }, +{ "linux/atm_tcp.h", "SIOCSIFATMTCP", _IOC_NONE, 0x6180, 0x00 }, +{ "linux/atm_zatm.h", "ZATM_GETPOOL", _IOC_WRITE, 0x6161, 0x0c }, +{ "linux/atm_zatm.h", "ZATM_GETPOOLZ", _IOC_WRITE, 0x6162, 0x0c }, +{ "linux/atm_zatm.h", "ZATM_SETPOOL", _IOC_WRITE, 0x6163, 0x0c }, +{ "linux/atmarp.h", "ATMARPD_CTRL", _IOC_NONE, 0x61e1, 0x00 }, +{ "linux/atmarp.h", "ATMARP_ENCAP", _IOC_NONE, 0x61e5, 0x00 }, +{ "linux/atmarp.h", "ATMARP_MKIP", _IOC_NONE, 0x61e2, 0x00 }, +{ "linux/atmarp.h", "ATMARP_SETENTRY", _IOC_NONE, 0x61e3, 0x00 }, +{ "linux/atmbr2684.h", "BR2684_SETFILT", _IOC_WRITE, 0x6190, 0x1c }, +{ "linux/atmclip.h", "SIOCMKCLIP", _IOC_NONE, 0x61e0, 0x00 }, +{ "linux/atmdev.h", "ATM_ADDADDR", _IOC_WRITE, 0x6188, 0x0c }, +{ "linux/atmdev.h", "ATM_ADDLECSADDR", _IOC_WRITE, 0x618e, 0x0c }, +{ "linux/atmdev.h", "ATM_ADDPARTY", _IOC_WRITE, 0x61f4, 0x08 }, +{ "linux/atmdev.h", "ATM_DELADDR", _IOC_WRITE, 0x6189, 0x0c }, +{ "linux/atmdev.h", "ATM_DELLECSADDR", _IOC_WRITE, 0x618f, 0x0c }, +{ "linux/atmdev.h", "ATM_DROPPARTY", _IOC_WRITE, 0x61f5, 0x04 }, +{ "linux/atmdev.h", "ATM_GETADDR", _IOC_WRITE, 0x6186, 0x0c }, +{ "linux/atmdev.h", "ATM_GETCIRANGE", _IOC_WRITE, 0x618a, 0x0c }, +{ "linux/atmdev.h", "ATM_GETESI", _IOC_WRITE, 0x6185, 0x0c }, +{ "linux/atmdev.h", "ATM_GETLECSADDR", _IOC_WRITE, 0x6190, 0x0c }, +{ "linux/atmdev.h", "ATM_GETLINKRATE", _IOC_WRITE, 0x6181, 0x0c }, +{ "linux/atmdev.h", "ATM_GETLOOP", _IOC_WRITE, 0x6152, 0x0c }, +{ "linux/atmdev.h", "ATM_GETNAMES", _IOC_WRITE, 0x6183, 0x08 }, +{ "linux/atmdev.h", "ATM_GETSTAT", _IOC_WRITE, 0x6150, 0x0c }, +{ "linux/atmdev.h", "ATM_GETSTATZ", _IOC_WRITE, 0x6151, 0x0c }, +{ "linux/atmdev.h", "ATM_GETTYPE", _IOC_WRITE, 0x6184, 0x0c }, +{ "linux/atmdev.h", "ATM_NEWBACKENDIF", _IOC_WRITE, 0x61f3, 0x02 }, +{ "linux/atmdev.h", "ATM_QUERYLOOP", _IOC_WRITE, 0x6154, 0x0c }, +{ "linux/atmdev.h", "ATM_RSTADDR", _IOC_WRITE, 0x6187, 0x0c }, +{ "linux/atmdev.h", "ATM_SETBACKEND", _IOC_WRITE, 0x61f2, 0x02 }, +{ "linux/atmdev.h", "ATM_SETCIRANGE", _IOC_WRITE, 0x618b, 0x0c }, +{ "linux/atmdev.h", "ATM_SETESI", _IOC_WRITE, 0x618c, 0x0c }, +{ "linux/atmdev.h", "ATM_SETESIF", _IOC_WRITE, 0x618d, 0x0c }, +{ "linux/atmdev.h", "ATM_SETLOOP", _IOC_WRITE, 0x6153, 0x0c }, +{ "linux/atmdev.h", "ATM_SETSC", _IOC_WRITE, 0x61f1, 0x04 }, +{ "linux/atmlec.h", "ATMLEC_CTRL", _IOC_NONE, 0x61d0, 0x00 }, +{ "linux/atmlec.h", "ATMLEC_DATA", _IOC_NONE, 0x61d1, 0x00 }, +{ "linux/atmlec.h", "ATMLEC_MCAST", _IOC_NONE, 0x61d2, 0x00 }, +{ "linux/atmmpc.h", "ATMMPC_CTRL", _IOC_NONE, 0x61d8, 0x00 }, +{ "linux/atmmpc.h", "ATMMPC_DATA", _IOC_NONE, 0x61d9, 0x00 }, +{ "linux/atmsvc.h", "ATMSIGD_CTRL", _IOC_NONE, 0x61f0, 0x00 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_ASKUMOUNT", _IOC_READ|_IOC_WRITE, 0x937d, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_CATATONIC", _IOC_READ|_IOC_WRITE, 0x9379, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_CLOSEMOUNT", _IOC_READ|_IOC_WRITE, 0x9375, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_EXPIRE", _IOC_READ|_IOC_WRITE, 0x937c, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_FAIL", _IOC_READ|_IOC_WRITE, 0x9377, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_ISMOUNTPOINT", _IOC_READ|_IOC_WRITE, 0x937e, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_OPENMOUNT", _IOC_READ|_IOC_WRITE, 0x9374, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_PROTOSUBVER", _IOC_READ|_IOC_WRITE, 0x9373, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_PROTOVER", _IOC_READ|_IOC_WRITE, 0x9372, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_READY", _IOC_READ|_IOC_WRITE, 0x9376, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_REQUESTER", _IOC_READ|_IOC_WRITE, 0x937b, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_SETPIPEFD", _IOC_READ|_IOC_WRITE, 0x9378, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_TIMEOUT", _IOC_READ|_IOC_WRITE, 0x937a, 0x18 }, +{ "linux/auto_dev-ioctl.h", "AUTOFS_DEV_IOCTL_VERSION", _IOC_READ|_IOC_WRITE, 0x9371, 0x18 }, +{ "linux/auto_fs.h", "AUTOFS_IOC_CATATONIC", _IOC_NONE, 0x9362, 0x00 }, +{ "linux/auto_fs.h", "AUTOFS_IOC_EXPIRE", _IOC_READ, 0x9365, 0x10c }, +{ "linux/auto_fs.h", "AUTOFS_IOC_FAIL", _IOC_NONE, 0x9361, 0x00 }, +{ "linux/auto_fs.h", "AUTOFS_IOC_PROTOVER", _IOC_READ, 0x9363, 0x04 }, +{ "linux/auto_fs.h", "AUTOFS_IOC_READY", _IOC_NONE, 0x9360, 0x00 }, +{ "linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", _IOC_READ|_IOC_WRITE, 0x9364, 0x04 }, +{ "linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT32", _IOC_READ|_IOC_WRITE, 0x9364, 0x04 }, +{ "linux/auto_fs4.h", "AUTOFS_IOC_ASKUMOUNT", _IOC_READ, 0x9370, 0x04 }, +{ "linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", _IOC_WRITE, 0x9366, 0x04 }, +{ "linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", _IOC_READ, 0x9367, 0x04 }, +{ "linux/blkpg.h", "BLKPG", _IOC_NONE, 0x1269, 0x00 }, +{ "linux/blkzoned.h", "BLKREPORTZONE", _IOC_READ|_IOC_WRITE, 0x1282, 0x10 }, +{ "linux/blkzoned.h", "BLKRESETZONE", _IOC_WRITE, 0x1283, 0x10 }, +{ "linux/bt-bmc.h", "BT_BMC_IOCTL_SMS_ATN", _IOC_NONE, 0xb100, 0x00 }, +{ "linux/btrfs.h", "BTRFS_IOC_ADD_DEV", _IOC_WRITE, 0x940a, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_BALANCE", _IOC_WRITE, 0x940c, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_BALANCE_CTL", _IOC_WRITE, 0x9421, 0x04 }, +{ "linux/btrfs.h", "BTRFS_IOC_BALANCE_PROGRESS", _IOC_READ, 0x9422, 0x400 }, +{ "linux/btrfs.h", "BTRFS_IOC_BALANCE_V2", _IOC_READ|_IOC_WRITE, 0x9420, 0x400 }, +{ "linux/btrfs.h", "BTRFS_IOC_CLONE", _IOC_WRITE, 0x9409, 0x04 }, +{ "linux/btrfs.h", "BTRFS_IOC_CLONE_RANGE", _IOC_WRITE, 0x940d, 0x20 }, +{ "linux/btrfs.h", "BTRFS_IOC_DEFAULT_SUBVOL", _IOC_WRITE, 0x9413, 0x08 }, +{ "linux/btrfs.h", "BTRFS_IOC_DEFRAG", _IOC_WRITE, 0x9402, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_DEFRAG_RANGE", _IOC_WRITE, 0x9410, 0x30 }, +{ "linux/btrfs.h", "BTRFS_IOC_DEVICES_READY", _IOC_READ, 0x9427, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_DEV_INFO", _IOC_READ|_IOC_WRITE, 0x941e, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_DEV_REPLACE", _IOC_READ|_IOC_WRITE, 0x9435, 0xa22 }, +{ "linux/btrfs.h", "BTRFS_IOC_FILE_EXTENT_SAME", _IOC_READ|_IOC_WRITE, 0x9436, 0x18 }, +{ "linux/btrfs.h", "BTRFS_IOC_FS_INFO", _IOC_READ, 0x941f, 0x400 }, +{ "linux/btrfs.h", "BTRFS_IOC_GET_DEV_STATS", _IOC_READ|_IOC_WRITE, 0x9434, 0x408 }, +{ "linux/btrfs.h", "BTRFS_IOC_GET_FEATURES", _IOC_READ, 0x9439, 0x18 }, +{ "linux/btrfs.h", "BTRFS_IOC_GET_FSLABEL", _IOC_READ, 0x9431, 0x100 }, +{ "linux/btrfs.h", "BTRFS_IOC_GET_SUPPORTED_FEATURES", _IOC_READ, 0x9439, 0x48 }, +{ "linux/btrfs.h", "BTRFS_IOC_INO_LOOKUP", _IOC_READ|_IOC_WRITE, 0x9412, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_INO_PATHS", _IOC_READ|_IOC_WRITE, 0x9423, 0x38 }, +{ "linux/btrfs.h", "BTRFS_IOC_LOGICAL_INO", _IOC_READ|_IOC_WRITE, 0x9424, 0x38 }, +{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_ASSIGN", _IOC_WRITE, 0x9429, 0x18 }, +{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_CREATE", _IOC_WRITE, 0x942a, 0x10 }, +{ "linux/btrfs.h", "BTRFS_IOC_QGROUP_LIMIT", _IOC_READ, 0x942b, 0x30 }, +{ "linux/btrfs.h", "BTRFS_IOC_QUOTA_CTL", _IOC_READ|_IOC_WRITE, 0x9428, 0x10 }, +{ "linux/btrfs.h", "BTRFS_IOC_QUOTA_RESCAN", _IOC_WRITE, 0x942c, 0x40 }, +{ "linux/btrfs.h", "BTRFS_IOC_QUOTA_RESCAN_STATUS", _IOC_READ, 0x942d, 0x40 }, +{ "linux/btrfs.h", "BTRFS_IOC_QUOTA_RESCAN_WAIT", _IOC_NONE, 0x942e, 0x00 }, +{ "linux/btrfs.h", "BTRFS_IOC_RESIZE", _IOC_WRITE, 0x9403, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_RM_DEV", _IOC_WRITE, 0x940b, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_RM_DEV_V2", _IOC_WRITE, 0x943a, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_SCAN_DEV", _IOC_WRITE, 0x9404, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_SCRUB", _IOC_READ|_IOC_WRITE, 0x941b, 0x400 }, +{ "linux/btrfs.h", "BTRFS_IOC_SCRUB_CANCEL", _IOC_NONE, 0x941c, 0x00 }, +{ "linux/btrfs.h", "BTRFS_IOC_SCRUB_PROGRESS", _IOC_READ|_IOC_WRITE, 0x941d, 0x400 }, +{ "linux/btrfs.h", "BTRFS_IOC_SEND", _IOC_WRITE, 0x9426, 0x44 }, +{ "linux/btrfs.h", "BTRFS_IOC_SET_FEATURES", _IOC_WRITE, 0x9439, 0x30 }, +{ "linux/btrfs.h", "BTRFS_IOC_SET_FSLABEL", _IOC_WRITE, 0x9432, 0x100 }, +{ "linux/btrfs.h", "BTRFS_IOC_SET_RECEIVED_SUBVOL", _IOC_READ|_IOC_WRITE, 0x9425, 0xc0 }, +{ "linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE", _IOC_WRITE, 0x9401, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_SNAP_CREATE_V2", _IOC_WRITE, 0x9417, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_SNAP_DESTROY", _IOC_WRITE, 0x940f, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_SPACE_INFO", _IOC_READ|_IOC_WRITE, 0x9414, 0x10 }, +{ "linux/btrfs.h", "BTRFS_IOC_START_SYNC", _IOC_READ, 0x9418, 0x08 }, +{ "linux/btrfs.h", "BTRFS_IOC_SUBVOL_CREATE", _IOC_WRITE, 0x940e, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_SUBVOL_CREATE_V2", _IOC_WRITE, 0x9418, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_SUBVOL_GETFLAGS", _IOC_READ, 0x9419, 0x08 }, +{ "linux/btrfs.h", "BTRFS_IOC_SUBVOL_SETFLAGS", _IOC_WRITE, 0x941a, 0x08 }, +{ "linux/btrfs.h", "BTRFS_IOC_SYNC", _IOC_NONE, 0x9408, 0x00 }, +{ "linux/btrfs.h", "BTRFS_IOC_TRANS_END", _IOC_NONE, 0x9407, 0x00 }, +{ "linux/btrfs.h", "BTRFS_IOC_TRANS_START", _IOC_NONE, 0x9406, 0x00 }, +{ "linux/btrfs.h", "BTRFS_IOC_TREE_SEARCH", _IOC_READ|_IOC_WRITE, 0x9411, 0x1000 }, +{ "linux/btrfs.h", "BTRFS_IOC_TREE_SEARCH_V2", _IOC_READ|_IOC_WRITE, 0x9411, 0x70 }, +{ "linux/btrfs.h", "BTRFS_IOC_WAIT_SYNC", _IOC_WRITE, 0x9416, 0x08 }, +{ "linux/capi.h", "CAPI_CLR_FLAGS", _IOC_READ, 0x4325, 0x04 }, +{ "linux/capi.h", "CAPI_GET_ERRCODE", _IOC_READ, 0x4321, 0x02 }, +{ "linux/capi.h", "CAPI_GET_FLAGS", _IOC_READ, 0x4323, 0x04 }, +{ "linux/capi.h", "CAPI_GET_MANUFACTURER", _IOC_READ|_IOC_WRITE, 0x4306, 0x04 }, +{ "linux/capi.h", "CAPI_GET_PROFILE", _IOC_READ|_IOC_WRITE, 0x4309, 0x40 }, +{ "linux/capi.h", "CAPI_GET_SERIAL", _IOC_READ|_IOC_WRITE, 0x4308, 0x04 }, +{ "linux/capi.h", "CAPI_GET_VERSION", _IOC_READ|_IOC_WRITE, 0x4307, 0x10 }, +{ "linux/capi.h", "CAPI_INSTALLED", _IOC_READ, 0x4322, 0x02 }, +{ "linux/capi.h", "CAPI_MANUFACTURER_CMD", _IOC_READ|_IOC_WRITE, 0x4320, 0x08 }, +{ "linux/capi.h", "CAPI_NCCI_GETUNIT", _IOC_READ, 0x4327, 0x04 }, +{ "linux/capi.h", "CAPI_NCCI_OPENCOUNT", _IOC_READ, 0x4326, 0x04 }, +{ "linux/capi.h", "CAPI_REGISTER", _IOC_WRITE, 0x4301, 0x0c }, +{ "linux/capi.h", "CAPI_SET_FLAGS", _IOC_READ, 0x4324, 0x04 }, +{ "linux/cciss_ioctl.h", "CCISS_BIG_PASSTHRU", _IOC_READ|_IOC_WRITE, 0x4212, 0x58 }, +{ "linux/cciss_ioctl.h", "CCISS_DEREGDISK", _IOC_NONE, 0x420c, 0x00 }, +{ "linux/cciss_ioctl.h", "CCISS_GETBUSTYPES", _IOC_READ, 0x4207, 0x04 }, +{ "linux/cciss_ioctl.h", "CCISS_GETDRIVVER", _IOC_READ, 0x4209, 0x04 }, +{ "linux/cciss_ioctl.h", "CCISS_GETFIRMVER", _IOC_READ, 0x4208, 0x04 }, +{ "linux/cciss_ioctl.h", "CCISS_GETHEARTBEAT", _IOC_READ, 0x4206, 0x04 }, +{ "linux/cciss_ioctl.h", "CCISS_GETINTINFO", _IOC_READ, 0x4202, 0x08 }, +{ "linux/cciss_ioctl.h", "CCISS_GETLUNINFO", _IOC_READ, 0x4211, 0x0c }, +{ "linux/cciss_ioctl.h", "CCISS_GETNODENAME", _IOC_READ, 0x4204, 0x10 }, +{ "linux/cciss_ioctl.h", "CCISS_GETPCIINFO", _IOC_READ, 0x4201, 0x08 }, +{ "linux/cciss_ioctl.h", "CCISS_PASSTHRU", _IOC_READ|_IOC_WRITE, 0x420b, 0x52 }, +{ "linux/cciss_ioctl.h", "CCISS_REGNEWD", _IOC_NONE, 0x420e, 0x00 }, +{ "linux/cciss_ioctl.h", "CCISS_REGNEWDISK", _IOC_WRITE, 0x420d, 0x04 }, +{ "linux/cciss_ioctl.h", "CCISS_RESCANDISK", _IOC_NONE, 0x4210, 0x00 }, +{ "linux/cciss_ioctl.h", "CCISS_REVALIDVOLS", _IOC_NONE, 0x420a, 0x00 }, +{ "linux/cciss_ioctl.h", "CCISS_SETINTINFO", _IOC_WRITE, 0x4203, 0x08 }, +{ "linux/cciss_ioctl.h", "CCISS_SETNODENAME", _IOC_WRITE, 0x4205, 0x10 }, +{ "linux/cdrom.h", "CDROMAUDIOBUFSIZ", 0, 0x5382, 0 }, +{ "linux/cdrom.h", "CDROMCLOSETRAY", 0, 0x5319, 0 }, +{ "linux/cdrom.h", "CDROMEJECT", 0, 0x5309, 0 }, +{ "linux/cdrom.h", "CDROMEJECT_SW", 0, 0x530f, 0 }, +{ "linux/cdrom.h", "CDROMGETSPINDOWN", 0, 0x531d, 0 }, +{ "linux/cdrom.h", "CDROMMULTISESSION", 0, 0x5310, 0 }, +{ "linux/cdrom.h", "CDROMPAUSE", 0, 0x5301, 0 }, +{ "linux/cdrom.h", "CDROMPLAYBLK", 0, 0x5317, 0 }, +{ "linux/cdrom.h", "CDROMPLAYMSF", 0, 0x5303, 0 }, +{ "linux/cdrom.h", "CDROMPLAYTRKIND", 0, 0x5304, 0 }, +{ "linux/cdrom.h", "CDROMREADALL", 0, 0x5318, 0 }, +{ "linux/cdrom.h", "CDROMREADAUDIO", 0, 0x530e, 0 }, +{ "linux/cdrom.h", "CDROMREADCOOKED", 0, 0x5315, 0 }, +{ "linux/cdrom.h", "CDROMREADMODE1", 0, 0x530d, 0 }, +{ "linux/cdrom.h", "CDROMREADMODE2", 0, 0x530c, 0 }, +{ "linux/cdrom.h", "CDROMREADRAW", 0, 0x5314, 0 }, +{ "linux/cdrom.h", "CDROMREADTOCENTRY", 0, 0x5306, 0 }, +{ "linux/cdrom.h", "CDROMREADTOCHDR", 0, 0x5305, 0 }, +{ "linux/cdrom.h", "CDROMRESET", 0, 0x5312, 0 }, +{ "linux/cdrom.h", "CDROMRESUME", 0, 0x5302, 0 }, +{ "linux/cdrom.h", "CDROMSEEK", 0, 0x5316, 0 }, +{ "linux/cdrom.h", "CDROMSETSPINDOWN", 0, 0x531e, 0 }, +{ "linux/cdrom.h", "CDROMSTART", 0, 0x5308, 0 }, +{ "linux/cdrom.h", "CDROMSTOP", 0, 0x5307, 0 }, +{ "linux/cdrom.h", "CDROMSUBCHNL", 0, 0x530b, 0 }, +{ "linux/cdrom.h", "CDROMVOLCTRL", 0, 0x530a, 0 }, +{ "linux/cdrom.h", "CDROMVOLREAD", 0, 0x5313, 0 }, +{ "linux/cdrom.h", "CDROM_CHANGER_NSLOTS", 0, 0x5328, 0 }, +{ "linux/cdrom.h", "CDROM_CLEAR_OPTIONS", 0, 0x5321, 0 }, +{ "linux/cdrom.h", "CDROM_DEBUG", 0, 0x5330, 0 }, +{ "linux/cdrom.h", "CDROM_DISC_STATUS", 0, 0x5327, 0 }, +{ "linux/cdrom.h", "CDROM_DRIVE_STATUS", 0, 0x5326, 0 }, +{ "linux/cdrom.h", "CDROM_GET_CAPABILITY", 0, 0x5331, 0 }, +{ "linux/cdrom.h", "CDROM_GET_MCN", 0, 0x5311, 0 }, +{ "linux/cdrom.h", "CDROM_LAST_WRITTEN", 0, 0x5395, 0 }, +{ "linux/cdrom.h", "CDROM_LOCKDOOR", 0, 0x5329, 0 }, +{ "linux/cdrom.h", "CDROM_MEDIA_CHANGED", 0, 0x5325, 0 }, +{ "linux/cdrom.h", "CDROM_NEXT_WRITABLE", 0, 0x5394, 0 }, +{ "linux/cdrom.h", "CDROM_SELECT_DISC", 0, 0x5323, 0 }, +{ "linux/cdrom.h", "CDROM_SELECT_SPEED", 0, 0x5322, 0 }, +{ "linux/cdrom.h", "CDROM_SEND_PACKET", 0, 0x5393, 0 }, +{ "linux/cdrom.h", "CDROM_SET_OPTIONS", 0, 0x5320, 0 }, +{ "linux/cdrom.h", "DVD_AUTH", 0, 0x5392, 0 }, +{ "linux/cdrom.h", "DVD_READ_STRUCT", 0, 0x5390, 0 }, +{ "linux/cdrom.h", "DVD_WRITE_STRUCT", 0, 0x5391, 0 }, +{ "linux/cec.h", "CEC_ADAP_G_CAPS", _IOC_READ|_IOC_WRITE, 0x6100, 0x4c }, +{ "linux/cec.h", "CEC_ADAP_G_LOG_ADDRS", _IOC_READ, 0x6103, 0x5c }, +{ "linux/cec.h", "CEC_ADAP_G_PHYS_ADDR", _IOC_READ, 0x6101, 0x02 }, +{ "linux/cec.h", "CEC_ADAP_S_LOG_ADDRS", _IOC_READ|_IOC_WRITE, 0x6104, 0x5c }, +{ "linux/cec.h", "CEC_ADAP_S_PHYS_ADDR", _IOC_WRITE, 0x6102, 0x02 }, +{ "linux/cec.h", "CEC_DQEVENT", _IOC_READ|_IOC_WRITE, 0x6107, 0x50 }, +{ "linux/cec.h", "CEC_G_MODE", _IOC_READ, 0x6108, 0x04 }, +{ "linux/cec.h", "CEC_RECEIVE", _IOC_READ|_IOC_WRITE, 0x6106, 0x38 }, +{ "linux/cec.h", "CEC_S_MODE", _IOC_WRITE, 0x6109, 0x04 }, +{ "linux/cec.h", "CEC_TRANSMIT", _IOC_READ|_IOC_WRITE, 0x6105, 0x38 }, +{ "linux/chio.h", "CHIOEXCHANGE", _IOC_WRITE, 0x6302, 0x1c }, +{ "linux/chio.h", "CHIOGELEM", _IOC_WRITE, 0x6310, 0x6c }, +{ "linux/chio.h", "CHIOGPARAMS", _IOC_READ, 0x6306, 0x14 }, +{ "linux/chio.h", "CHIOGPICKER", _IOC_READ, 0x6304, 0x04 }, +{ "linux/chio.h", "CHIOGSTATUS", _IOC_WRITE, 0x6308, 0x08 }, +{ "linux/chio.h", "CHIOGVPARAMS", _IOC_READ, 0x6313, 0x70 }, +{ "linux/chio.h", "CHIOINITELEM", _IOC_NONE, 0x6311, 0x00 }, +{ "linux/chio.h", "CHIOMOVE", _IOC_WRITE, 0x6301, 0x14 }, +{ "linux/chio.h", "CHIOPOSITION", _IOC_WRITE, 0x6303, 0x0c }, +{ "linux/chio.h", "CHIOSPICKER", _IOC_WRITE, 0x6305, 0x04 }, +{ "linux/chio.h", "CHIOSVOLTAG", _IOC_WRITE, 0x6312, 0x30 }, +{ "linux/cm4000_cs.h", "CM_IOCARDOFF", _IOC_NONE, 0x6304, 0x00 }, +{ "linux/cm4000_cs.h", "CM_IOCGATR", _IOC_READ|_IOC_WRITE, 0x6301, 0x04 }, +{ "linux/cm4000_cs.h", "CM_IOCGSTATUS", _IOC_READ, 0x6300, 0x04 }, +{ "linux/cm4000_cs.h", "CM_IOCSPTS", _IOC_WRITE, 0x6302, 0x04 }, +{ "linux/cm4000_cs.h", "CM_IOCSRDR", _IOC_NONE, 0x6303, 0x00 }, +{ "linux/cm4000_cs.h", "CM_IOSDBGLVL", _IOC_WRITE, 0x63fa, 0x04 }, +{ "linux/coda.h", "CIOC_KERNEL_VERSION", _IOC_READ|_IOC_WRITE, 0x630a, 0x04 }, +{ "linux/dm-ioctl.h", "DM_DEV_CREATE", _IOC_READ|_IOC_WRITE, 0xfd03, 0x138 }, +{ "linux/dm-ioctl.h", "DM_DEV_REMOVE", _IOC_READ|_IOC_WRITE, 0xfd04, 0x138 }, +{ "linux/dm-ioctl.h", "DM_DEV_RENAME", _IOC_READ|_IOC_WRITE, 0xfd05, 0x138 }, +{ "linux/dm-ioctl.h", "DM_DEV_SET_GEOMETRY", _IOC_READ|_IOC_WRITE, 0xfd0f, 0x138 }, +{ "linux/dm-ioctl.h", "DM_DEV_STATUS", _IOC_READ|_IOC_WRITE, 0xfd07, 0x138 }, +{ "linux/dm-ioctl.h", "DM_DEV_SUSPEND", _IOC_READ|_IOC_WRITE, 0xfd06, 0x138 }, +{ "linux/dm-ioctl.h", "DM_DEV_WAIT", _IOC_READ|_IOC_WRITE, 0xfd08, 0x138 }, +{ "linux/dm-ioctl.h", "DM_LIST_DEVICES", _IOC_READ|_IOC_WRITE, 0xfd02, 0x138 }, +{ "linux/dm-ioctl.h", "DM_LIST_VERSIONS", _IOC_READ|_IOC_WRITE, 0xfd0d, 0x138 }, +{ "linux/dm-ioctl.h", "DM_REMOVE_ALL", _IOC_READ|_IOC_WRITE, 0xfd01, 0x138 }, +{ "linux/dm-ioctl.h", "DM_TABLE_CLEAR", _IOC_READ|_IOC_WRITE, 0xfd0a, 0x138 }, +{ "linux/dm-ioctl.h", "DM_TABLE_DEPS", _IOC_READ|_IOC_WRITE, 0xfd0b, 0x138 }, +{ "linux/dm-ioctl.h", "DM_TABLE_LOAD", _IOC_READ|_IOC_WRITE, 0xfd09, 0x138 }, +{ "linux/dm-ioctl.h", "DM_TABLE_STATUS", _IOC_READ|_IOC_WRITE, 0xfd0c, 0x138 }, +{ "linux/dm-ioctl.h", "DM_TARGET_MSG", _IOC_READ|_IOC_WRITE, 0xfd0e, 0x138 }, +{ "linux/dm-ioctl.h", "DM_VERSION", _IOC_READ|_IOC_WRITE, 0xfd00, 0x138 }, +{ "linux/dma-buf.h", "DMA_BUF_IOCTL_SYNC", _IOC_WRITE, 0x6200, 0x08 }, +{ "linux/dn.h", "OSIOCGNETADDR", _IOC_READ, 0x89e1, 0x04 }, +{ "linux/dn.h", "OSIOCSNETADDR", _IOC_WRITE, 0x89e0, 0x04 }, +{ "linux/dn.h", "SIOCGNETADDR", _IOC_READ, 0x89e1, 0x04 }, +{ "linux/dn.h", "SIOCSNETADDR", _IOC_WRITE, 0x89e0, 0x04 }, +{ "linux/dvb/audio.h", "AUDIO_BILINGUAL_CHANNEL_SELECT", _IOC_NONE, 0x6f14, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_CHANNEL_SELECT", _IOC_NONE, 0x6f09, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_CLEAR_BUFFER", _IOC_NONE, 0x6f0c, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_CONTINUE", _IOC_NONE, 0x6f04, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_GET_CAPABILITIES", _IOC_READ, 0x6f0b, 0x04 }, +{ "linux/dvb/audio.h", "AUDIO_GET_PTS", _IOC_READ, 0x6f13, 0x08 }, +{ "linux/dvb/audio.h", "AUDIO_GET_STATUS", _IOC_READ, 0x6f0a, 0x20 }, +{ "linux/dvb/audio.h", "AUDIO_PAUSE", _IOC_NONE, 0x6f03, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_PLAY", _IOC_NONE, 0x6f02, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_SELECT_SOURCE", _IOC_NONE, 0x6f05, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_SET_ATTRIBUTES", _IOC_WRITE, 0x6f11, 0x02 }, +{ "linux/dvb/audio.h", "AUDIO_SET_AV_SYNC", _IOC_NONE, 0x6f07, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_SET_BYPASS_MODE", _IOC_NONE, 0x6f08, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_SET_EXT_ID", _IOC_NONE, 0x6f10, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_SET_ID", _IOC_NONE, 0x6f0d, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_SET_KARAOKE", _IOC_WRITE, 0x6f12, 0x0c }, +{ "linux/dvb/audio.h", "AUDIO_SET_MIXER", _IOC_WRITE, 0x6f0e, 0x08 }, +{ "linux/dvb/audio.h", "AUDIO_SET_MUTE", _IOC_NONE, 0x6f06, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_SET_STREAMTYPE", _IOC_NONE, 0x6f0f, 0x00 }, +{ "linux/dvb/audio.h", "AUDIO_STOP", _IOC_NONE, 0x6f01, 0x00 }, +{ "linux/dvb/ca.h", "CA_GET_CAP", _IOC_READ, 0x6f81, 0x10 }, +{ "linux/dvb/ca.h", "CA_GET_DESCR_INFO", _IOC_READ, 0x6f83, 0x08 }, +{ "linux/dvb/ca.h", "CA_GET_MSG", _IOC_READ, 0x6f84, 0x10c }, +{ "linux/dvb/ca.h", "CA_GET_SLOT_INFO", _IOC_READ, 0x6f82, 0x0c }, +{ "linux/dvb/ca.h", "CA_RESET", _IOC_NONE, 0x6f80, 0x00 }, +{ "linux/dvb/ca.h", "CA_SEND_MSG", _IOC_WRITE, 0x6f85, 0x10c }, +{ "linux/dvb/ca.h", "CA_SET_DESCR", _IOC_WRITE, 0x6f86, 0x10 }, +{ "linux/dvb/ca.h", "CA_SET_PID", _IOC_WRITE, 0x6f87, 0x08 }, +{ "linux/dvb/dmx.h", "DMX_ADD_PID", _IOC_WRITE, 0x6f33, 0x02 }, +{ "linux/dvb/dmx.h", "DMX_GET_CAPS", _IOC_READ, 0x6f30, 0x08 }, +{ "linux/dvb/dmx.h", "DMX_GET_PES_PIDS", _IOC_READ, 0x6f2f, 0x0a }, +{ "linux/dvb/dmx.h", "DMX_GET_STC", _IOC_READ|_IOC_WRITE, 0x6f32, 0x10 }, +{ "linux/dvb/dmx.h", "DMX_REMOVE_PID", _IOC_WRITE, 0x6f34, 0x02 }, +{ "linux/dvb/dmx.h", "DMX_SET_BUFFER_SIZE", _IOC_NONE, 0x6f2d, 0x00 }, +{ "linux/dvb/dmx.h", "DMX_SET_FILTER", _IOC_WRITE, 0x6f2b, 0x3a }, +{ "linux/dvb/dmx.h", "DMX_SET_PES_FILTER", _IOC_WRITE, 0x6f2c, 0x12 }, +{ "linux/dvb/dmx.h", "DMX_SET_SOURCE", _IOC_WRITE, 0x6f31, 0x04 }, +{ "linux/dvb/dmx.h", "DMX_START", _IOC_NONE, 0x6f29, 0x00 }, +{ "linux/dvb/dmx.h", "DMX_STOP", _IOC_NONE, 0x6f2a, 0x00 }, +{ "linux/dvb/frontend.h", "FE_DISEQC_RECV_SLAVE_REPLY", _IOC_READ, 0x6f40, 0x0a }, +{ "linux/dvb/frontend.h", "FE_DISEQC_RESET_OVERLOAD", _IOC_NONE, 0x6f3e, 0x00 }, +{ "linux/dvb/frontend.h", "FE_DISEQC_SEND_BURST", _IOC_NONE, 0x6f41, 0x00 }, +{ "linux/dvb/frontend.h", "FE_DISEQC_SEND_MASTER_CMD", _IOC_WRITE, 0x6f3f, 0x07 }, +{ "linux/dvb/frontend.h", "FE_DISHNETWORK_SEND_LEGACY_CMD", _IOC_NONE, 0x6f50, 0x00 }, +{ "linux/dvb/frontend.h", "FE_ENABLE_HIGH_LNB_VOLTAGE", _IOC_NONE, 0x6f44, 0x00 }, +{ "linux/dvb/frontend.h", "FE_GET_EVENT", _IOC_READ, 0x6f4e, 0x28 }, +{ "linux/dvb/frontend.h", "FE_GET_FRONTEND", _IOC_READ, 0x6f4d, 0x24 }, +{ "linux/dvb/frontend.h", "FE_GET_INFO", _IOC_READ, 0x6f3d, 0xa8 }, +{ "linux/dvb/frontend.h", "FE_GET_PROPERTY", _IOC_READ, 0x6f53, 0x08 }, +{ "linux/dvb/frontend.h", "FE_READ_BER", _IOC_READ, 0x6f46, 0x04 }, +{ "linux/dvb/frontend.h", "FE_READ_SIGNAL_STRENGTH", _IOC_READ, 0x6f47, 0x02 }, +{ "linux/dvb/frontend.h", "FE_READ_SNR", _IOC_READ, 0x6f48, 0x02 }, +{ "linux/dvb/frontend.h", "FE_READ_STATUS", _IOC_READ, 0x6f45, 0x04 }, +{ "linux/dvb/frontend.h", "FE_READ_UNCORRECTED_BLOCKS", _IOC_READ, 0x6f49, 0x04 }, +{ "linux/dvb/frontend.h", "FE_SET_FRONTEND", _IOC_WRITE, 0x6f4c, 0x24 }, +{ "linux/dvb/frontend.h", "FE_SET_FRONTEND_TUNE_MODE", _IOC_NONE, 0x6f51, 0x00 }, +{ "linux/dvb/frontend.h", "FE_SET_PROPERTY", _IOC_WRITE, 0x6f52, 0x08 }, +{ "linux/dvb/frontend.h", "FE_SET_TONE", _IOC_NONE, 0x6f42, 0x00 }, +{ "linux/dvb/frontend.h", "FE_SET_VOLTAGE", _IOC_NONE, 0x6f43, 0x00 }, +{ "linux/dvb/net.h", "NET_ADD_IF", _IOC_READ|_IOC_WRITE, 0x6f34, 0x06 }, +{ "linux/dvb/net.h", "NET_GET_IF", _IOC_READ|_IOC_WRITE, 0x6f36, 0x06 }, +{ "linux/dvb/net.h", "NET_REMOVE_IF", _IOC_NONE, 0x6f35, 0x00 }, +{ "linux/dvb/osd.h", "OSD_GET_CAPABILITY", _IOC_READ, 0x6fa1, 0x08 }, +{ "linux/dvb/osd.h", "OSD_SEND_CMD", _IOC_WRITE, 0x6fa0, 0x1c }, +{ "linux/dvb/video.h", "VIDEO_CLEAR_BUFFER", _IOC_NONE, 0x6f22, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_COMMAND", _IOC_READ|_IOC_WRITE, 0x6f3b, 0x48 }, +{ "linux/dvb/video.h", "VIDEO_CONTINUE", _IOC_NONE, 0x6f18, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_FAST_FORWARD", _IOC_NONE, 0x6f1f, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_FREEZE", _IOC_NONE, 0x6f17, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_GET_CAPABILITIES", _IOC_READ, 0x6f21, 0x04 }, +{ "linux/dvb/video.h", "VIDEO_GET_EVENT", _IOC_READ, 0x6f1c, 0x14 }, +{ "linux/dvb/video.h", "VIDEO_GET_FRAME_COUNT", _IOC_READ, 0x6f3a, 0x08 }, +{ "linux/dvb/video.h", "VIDEO_GET_FRAME_RATE", _IOC_READ, 0x6f38, 0x04 }, +{ "linux/dvb/video.h", "VIDEO_GET_NAVI", _IOC_READ, 0x6f34, 0x404 }, +{ "linux/dvb/video.h", "VIDEO_GET_PTS", _IOC_READ, 0x6f39, 0x08 }, +{ "linux/dvb/video.h", "VIDEO_GET_SIZE", _IOC_READ, 0x6f37, 0x0c }, +{ "linux/dvb/video.h", "VIDEO_GET_STATUS", _IOC_READ, 0x6f1b, 0x14 }, +{ "linux/dvb/video.h", "VIDEO_PLAY", _IOC_NONE, 0x6f16, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_SELECT_SOURCE", _IOC_NONE, 0x6f19, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_SET_ATTRIBUTES", _IOC_NONE, 0x6f35, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_SET_BLANK", _IOC_NONE, 0x6f1a, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_SET_DISPLAY_FORMAT", _IOC_NONE, 0x6f1d, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_SET_FORMAT", _IOC_NONE, 0x6f25, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_SET_HIGHLIGHT", _IOC_WRITE, 0x6f27, 0x10 }, +{ "linux/dvb/video.h", "VIDEO_SET_ID", _IOC_NONE, 0x6f23, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_SET_SPU", _IOC_WRITE, 0x6f32, 0x08 }, +{ "linux/dvb/video.h", "VIDEO_SET_SPU_PALETTE", _IOC_WRITE, 0x6f33, 0x08 }, +{ "linux/dvb/video.h", "VIDEO_SET_STREAMTYPE", _IOC_NONE, 0x6f24, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_SET_SYSTEM", _IOC_NONE, 0x6f26, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_SLOWMOTION", _IOC_NONE, 0x6f20, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_STILLPICTURE", _IOC_WRITE, 0x6f1e, 0x08 }, +{ "linux/dvb/video.h", "VIDEO_STOP", _IOC_NONE, 0x6f15, 0x00 }, +{ "linux/dvb/video.h", "VIDEO_TRY_COMMAND", _IOC_READ|_IOC_WRITE, 0x6f3c, 0x48 }, +{ "linux/fb.h", "FBIOBLANK", 0, 0x4611, 0 }, +{ "linux/fb.h", "FBIOGETCMAP", 0, 0x4604, 0 }, +{ "linux/fb.h", "FBIOGET_CON2FBMAP", 0, 0x460F, 0 }, +{ "linux/fb.h", "FBIOGET_DISPINFO", 0, 0x4618, 0 }, +{ "linux/fb.h", "FBIOGET_FSCREENINFO", 0, 0x4602, 0 }, +{ "linux/fb.h", "FBIOGET_GLYPH", 0, 0x4615, 0 }, +{ "linux/fb.h", "FBIOGET_HWCINFO", 0, 0x4616, 0 }, +{ "linux/fb.h", "FBIOGET_VBLANK", _IOC_READ, 0x4612, 0x20 }, +{ "linux/fb.h", "FBIOGET_VSCREENINFO", 0, 0x4600, 0 }, +{ "linux/fb.h", "FBIOPAN_DISPLAY", 0, 0x4606, 0 }, +{ "linux/fb.h", "FBIOPUTCMAP", 0, 0x4605, 0 }, +{ "linux/fb.h", "FBIOPUT_CON2FBMAP", 0, 0x4610, 0 }, +{ "linux/fb.h", "FBIOPUT_MODEINFO", 0, 0x4617, 0 }, +{ "linux/fb.h", "FBIOPUT_VSCREENINFO", 0, 0x4601, 0 }, +{ "linux/fb.h", "FBIO_ALLOC", 0, 0x4613, 0 }, +{ "linux/fb.h", "FBIO_CURSOR", _IOC_READ|_IOC_WRITE, 0x4608, 0x44 }, +{ "linux/fb.h", "FBIO_FREE", 0, 0x4614, 0 }, +{ "linux/fb.h", "FBIO_WAITFORVSYNC", _IOC_WRITE, 0x4620, 0x04 }, +{ "linux/fd.h", "FDCLRPRM", _IOC_NONE, 0x0241, 0x00 }, +{ "linux/fd.h", "FDDEFPRM", _IOC_WRITE, 0x0243, 0x1c }, +{ "linux/fd.h", "FDEJECT", _IOC_NONE, 0x025a, 0x00 }, +{ "linux/fd.h", "FDFLUSH", _IOC_NONE, 0x024b, 0x00 }, +{ "linux/fd.h", "FDFMTBEG", _IOC_NONE, 0x0247, 0x00 }, +{ "linux/fd.h", "FDFMTEND", _IOC_NONE, 0x0249, 0x00 }, +{ "linux/fd.h", "FDFMTTRK", _IOC_WRITE, 0x0248, 0x0c }, +{ "linux/fd.h", "FDGETDRVPRM", _IOC_READ, 0x0211, 0x52 }, +{ "linux/fd.h", "FDGETDRVSTAT", _IOC_READ, 0x0212, 0x34 }, +{ "linux/fd.h", "FDGETDRVTYP", _IOC_READ, 0x020f, 0x10 }, +{ "linux/fd.h", "FDGETFDCSTAT", _IOC_READ, 0x0215, 0x1c }, +{ "linux/fd.h", "FDGETMAXERRS", _IOC_READ, 0x020e, 0x14 }, +{ "linux/fd.h", "FDGETPRM", _IOC_READ, 0x0204, 0x1c }, +{ "linux/fd.h", "FDMSGOFF", _IOC_NONE, 0x0246, 0x00 }, +{ "linux/fd.h", "FDMSGON", _IOC_NONE, 0x0245, 0x00 }, +{ "linux/fd.h", "FDPOLLDRVSTAT", _IOC_READ, 0x0213, 0x34 }, +{ "linux/fd.h", "FDRAWCMD", _IOC_NONE, 0x0258, 0x00 }, +{ "linux/fd.h", "FDRESET", _IOC_NONE, 0x0254, 0x00 }, +{ "linux/fd.h", "FDSETDRVPRM", _IOC_WRITE, 0x0290, 0x52 }, +{ "linux/fd.h", "FDSETEMSGTRESH", _IOC_NONE, 0x024a, 0x00 }, +{ "linux/fd.h", "FDSETMAXERRS", _IOC_WRITE, 0x024c, 0x14 }, +{ "linux/fd.h", "FDSETPRM", _IOC_WRITE, 0x0242, 0x1c }, +{ "linux/fd.h", "FDTWADDLE", _IOC_NONE, 0x0259, 0x00 }, +{ "linux/fd.h", "FDWERRORCLR", _IOC_NONE, 0x0256, 0x00 }, +{ "linux/fd.h", "FDWERRORGET", _IOC_READ, 0x0217, 0x18 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_ADD_DESCRIPTOR", _IOC_READ|_IOC_WRITE, 0x2306, 0x18 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_ALLOCATE", _IOC_READ|_IOC_WRITE, 0x2302, 0x20 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE", _IOC_READ|_IOC_WRITE, 0x230d, 0x18 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE", _IOC_WRITE, 0x230f, 0x18 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_CREATE_ISO_CONTEXT", _IOC_READ|_IOC_WRITE, 0x2308, 0x1c }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_DEALLOCATE", _IOC_WRITE, 0x2303, 0x04 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE", _IOC_WRITE, 0x230e, 0x04 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE", _IOC_WRITE, 0x2310, 0x18 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_FLUSH_ISO", _IOC_WRITE, 0x2318, 0x04 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_GET_CYCLE_TIMER", _IOC_READ, 0x230c, 0x0c }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_GET_CYCLE_TIMER2", _IOC_READ|_IOC_WRITE, 0x2314, 0x14 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_GET_INFO", _IOC_READ|_IOC_WRITE, 0x2300, 0x24 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_GET_SPEED", _IOC_NONE, 0x2311, 0x00 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_INITIATE_BUS_RESET", _IOC_WRITE, 0x2305, 0x04 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_QUEUE_ISO", _IOC_READ|_IOC_WRITE, 0x2309, 0x18 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_RECEIVE_PHY_PACKETS", _IOC_WRITE, 0x2316, 0x08 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_REMOVE_DESCRIPTOR", _IOC_WRITE, 0x2307, 0x04 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_BROADCAST_REQUEST", _IOC_WRITE, 0x2312, 0x24 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_PHY_PACKET", _IOC_READ|_IOC_WRITE, 0x2315, 0x14 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_REQUEST", _IOC_WRITE, 0x2301, 0x24 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_RESPONSE", _IOC_WRITE, 0x2304, 0x14 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_SEND_STREAM_PACKET", _IOC_WRITE, 0x2313, 0x28 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_SET_ISO_CHANNELS", _IOC_WRITE, 0x2317, 0x0c }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_START_ISO", _IOC_WRITE, 0x230a, 0x10 }, +{ "linux/firewire-cdev.h", "FW_CDEV_IOC_STOP_ISO", _IOC_WRITE, 0x230b, 0x04 }, +{ "linux/fs.h", "BLKALIGNOFF", _IOC_NONE, 0x127a, 0x00 }, +{ "linux/fs.h", "BLKBSZGET", _IOC_READ, 0x1270, 0x04 }, +{ "linux/fs.h", "BLKBSZSET", _IOC_WRITE, 0x1271, 0x04 }, +{ "linux/fs.h", "BLKDISCARD", _IOC_NONE, 0x1277, 0x00 }, +{ "linux/fs.h", "BLKDISCARDZEROES", _IOC_NONE, 0x127c, 0x00 }, +{ "linux/fs.h", "BLKFLSBUF", _IOC_NONE, 0x1261, 0x00 }, +{ "linux/fs.h", "BLKFRAGET", _IOC_NONE, 0x1265, 0x00 }, +{ "linux/fs.h", "BLKFRASET", _IOC_NONE, 0x1264, 0x00 }, +{ "linux/fs.h", "BLKGETSIZE", _IOC_NONE, 0x1260, 0x00 }, +{ "linux/fs.h", "BLKGETSIZE64", _IOC_READ, 0x1272, 0x04 }, +{ "linux/fs.h", "BLKIOMIN", _IOC_NONE, 0x1278, 0x00 }, +{ "linux/fs.h", "BLKIOOPT", _IOC_NONE, 0x1279, 0x00 }, +{ "linux/fs.h", "BLKPBSZGET", _IOC_NONE, 0x127b, 0x00 }, +{ "linux/fs.h", "BLKRAGET", _IOC_NONE, 0x1263, 0x00 }, +{ "linux/fs.h", "BLKRASET", _IOC_NONE, 0x1262, 0x00 }, +{ "linux/fs.h", "BLKROGET", _IOC_NONE, 0x125e, 0x00 }, +{ "linux/fs.h", "BLKROSET", _IOC_NONE, 0x125d, 0x00 }, +{ "linux/fs.h", "BLKROTATIONAL", _IOC_NONE, 0x127e, 0x00 }, +{ "linux/fs.h", "BLKRRPART", _IOC_NONE, 0x125f, 0x00 }, +{ "linux/fs.h", "BLKSECDISCARD", _IOC_NONE, 0x127d, 0x00 }, +{ "linux/fs.h", "BLKSECTGET", _IOC_NONE, 0x1267, 0x00 }, +{ "linux/fs.h", "BLKSECTSET", _IOC_NONE, 0x1266, 0x00 }, +{ "linux/fs.h", "BLKSSZGET", _IOC_NONE, 0x1268, 0x00 }, +{ "linux/fs.h", "BLKTRACESETUP", _IOC_READ|_IOC_WRITE, 0x1273, 0x3e }, +{ "linux/fs.h", "BLKTRACESTART", _IOC_NONE, 0x1274, 0x00 }, +{ "linux/fs.h", "BLKTRACESTOP", _IOC_NONE, 0x1275, 0x00 }, +{ "linux/fs.h", "BLKTRACETEARDOWN", _IOC_NONE, 0x1276, 0x00 }, +{ "linux/fs.h", "BLKZEROOUT", _IOC_NONE, 0x127f, 0x00 }, +{ "linux/fs.h", "FIBMAP", _IOC_NONE, 0x0001, 0x00 }, +{ "linux/fs.h", "FICLONE", _IOC_WRITE, 0x9409, 0x04 }, +{ "linux/fs.h", "FICLONERANGE", _IOC_WRITE, 0x940d, 0x20 }, +{ "linux/fs.h", "FIDEDUPERANGE", _IOC_READ|_IOC_WRITE, 0x9436, 0x18 }, +{ "linux/fs.h", "FIFREEZE", _IOC_READ|_IOC_WRITE, 0x5877, 0x04 }, +{ "linux/fs.h", "FIGETBSZ", _IOC_NONE, 0x0002, 0x00 }, +{ "linux/fs.h", "FITHAW", _IOC_READ|_IOC_WRITE, 0x5878, 0x04 }, +{ "linux/fs.h", "FITRIM", _IOC_READ|_IOC_WRITE, 0x5879, 0x18 }, +{ "linux/fs.h", "FS_IOC32_GETFLAGS", _IOC_READ, 0x6601, 0x04 }, +{ "linux/fs.h", "FS_IOC32_GETVERSION", _IOC_READ, 0x7601, 0x04 }, +{ "linux/fs.h", "FS_IOC32_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, +{ "linux/fs.h", "FS_IOC32_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, +{ "linux/fs.h", "FS_IOC_FIEMAP", _IOC_READ|_IOC_WRITE, 0x660b, 0x20 }, +{ "linux/fs.h", "FS_IOC_FSGETXATTR", _IOC_READ, 0x581f, 0x1c }, +{ "linux/fs.h", "FS_IOC_FSSETXATTR", _IOC_WRITE, 0x5820, 0x1c }, +{ "linux/fs.h", "FS_IOC_GETFLAGS", _IOC_READ, 0x6601, 0x04 }, +{ "linux/fs.h", "FS_IOC_GETVERSION", _IOC_READ, 0x7601, 0x04 }, +{ "linux/fs.h", "FS_IOC_GET_ENCRYPTION_POLICY", _IOC_WRITE, 0x6615, 0x0c }, +{ "linux/fs.h", "FS_IOC_GET_ENCRYPTION_PWSALT", _IOC_WRITE, 0x6614, 0x10 }, +{ "linux/fs.h", "FS_IOC_SETFLAGS", _IOC_WRITE, 0x6602, 0x04 }, +{ "linux/fs.h", "FS_IOC_SETVERSION", _IOC_WRITE, 0x7602, 0x04 }, +{ "linux/fs.h", "FS_IOC_SET_ENCRYPTION_POLICY", _IOC_READ, 0x6613, 0x0c }, +{ "linux/fsl-diu-fb.h", "MFB_GET_ALPHA", _IOC_READ, 0x4d00, 0x01 }, +{ "linux/fsl-diu-fb.h", "MFB_GET_AOID", _IOC_READ, 0x4d04, 0x08 }, +{ "linux/fsl-diu-fb.h", "MFB_GET_GAMMA", _IOC_READ, 0x4d01, 0x01 }, +{ "linux/fsl-diu-fb.h", "MFB_GET_PIXFMT", _IOC_READ, 0x4d08, 0x04 }, +{ "linux/fsl-diu-fb.h", "MFB_SET_ALPHA", _IOC_WRITE, 0x4d00, 0x01 }, +{ "linux/fsl-diu-fb.h", "MFB_SET_AOID", _IOC_WRITE, 0x4d04, 0x08 }, +{ "linux/fsl-diu-fb.h", "MFB_SET_BRIGHTNESS", _IOC_WRITE, 0x4d03, 0x01 }, +{ "linux/fsl-diu-fb.h", "MFB_SET_CHROMA_KEY", _IOC_WRITE, 0x4d01, 0x0a }, +{ "linux/fsl-diu-fb.h", "MFB_SET_GAMMA", _IOC_WRITE, 0x4d01, 0x01 }, +{ "linux/fsl-diu-fb.h", "MFB_SET_PIXFMT", _IOC_WRITE, 0x4d08, 0x04 }, +{ "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_DOORBELL", _IOC_READ|_IOC_WRITE, 0xaf06, 0x08 }, +{ "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_GETPROP", _IOC_READ|_IOC_WRITE, 0xaf07, 0x28 }, +{ "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_MEMCPY", _IOC_READ|_IOC_WRITE, 0xaf05, 0x28 }, +{ "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_GET_STATUS", _IOC_READ|_IOC_WRITE, 0xaf02, 0x0c }, +{ "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_RESTART", _IOC_READ|_IOC_WRITE, 0xaf01, 0x08 }, +{ "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_START", _IOC_READ|_IOC_WRITE, 0xaf03, 0x10 }, +{ "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_PARTITION_STOP", _IOC_READ|_IOC_WRITE, 0xaf04, 0x08 }, +{ "linux/fsl_hypervisor.h", "FSL_HV_IOCTL_SETPROP", _IOC_READ|_IOC_WRITE, 0xaf08, 0x28 }, +{ "linux/fuse.h", "FUSE_DEV_IOC_CLONE", _IOC_READ, 0xe500, 0x04 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_DDCB", _IOC_READ|_IOC_WRITE, 0xa532, 0xe8 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_EXECUTE_RAW_DDCB", _IOC_READ|_IOC_WRITE, 0xa533, 0xe8 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_GET_CARD_STATE", _IOC_READ, 0xa524, 0x04 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_PIN_MEM", _IOC_READ|_IOC_WRITE, 0xa528, 0x20 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_READ_REG16", _IOC_READ, 0xa522, 0x10 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_READ_REG32", _IOC_READ, 0xa520, 0x10 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_READ_REG64", _IOC_READ, 0xa51e, 0x10 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_SLU_READ", _IOC_READ|_IOC_WRITE, 0xa551, 0x38 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_SLU_UPDATE", _IOC_READ|_IOC_WRITE, 0xa550, 0x38 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_UNPIN_MEM", _IOC_READ|_IOC_WRITE, 0xa529, 0x20 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_WRITE_REG16", _IOC_WRITE, 0xa523, 0x10 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_WRITE_REG32", _IOC_WRITE, 0xa521, 0x10 }, +{ "linux/genwqe/genwqe_card.h", "GENWQE_WRITE_REG64", _IOC_WRITE, 0xa51f, 0x10 }, +{ "linux/gigaset_dev.h", "GIGASET_BRKCHARS", _IOC_WRITE, 0x4702, 0x06 }, +{ "linux/gigaset_dev.h", "GIGASET_CONFIG", _IOC_READ|_IOC_WRITE, 0x4701, 0x04 }, +{ "linux/gigaset_dev.h", "GIGASET_REDIR", _IOC_READ|_IOC_WRITE, 0x4700, 0x04 }, +{ "linux/gigaset_dev.h", "GIGASET_VERSION", _IOC_READ|_IOC_WRITE, 0x4703, 0x10 }, +{ "linux/gpio.h", "GPIOHANDLE_GET_LINE_VALUES_IOCTL", _IOC_READ|_IOC_WRITE, 0xb408, 0x40 }, +{ "linux/gpio.h", "GPIOHANDLE_SET_LINE_VALUES_IOCTL", _IOC_READ|_IOC_WRITE, 0xb409, 0x40 }, +{ "linux/gpio.h", "GPIO_GET_CHIPINFO_IOCTL", _IOC_READ, 0xb401, 0x44 }, +{ "linux/gpio.h", "GPIO_GET_LINEEVENT_IOCTL", _IOC_READ|_IOC_WRITE, 0xb404, 0x30 }, +{ "linux/gpio.h", "GPIO_GET_LINEHANDLE_IOCTL", _IOC_READ|_IOC_WRITE, 0xb403, 0x16c }, +{ "linux/gpio.h", "GPIO_GET_LINEINFO_IOCTL", _IOC_READ|_IOC_WRITE, 0xb402, 0x48 }, +{ "linux/gsmmux.h", "GSMIOC_DISABLE_NET", _IOC_NONE, 0x4703, 0x00 }, +{ "linux/gsmmux.h", "GSMIOC_ENABLE_NET", _IOC_WRITE, 0x4702, 0x34 }, +{ "linux/gsmmux.h", "GSMIOC_GETCONF", _IOC_READ, 0x4700, 0x4c }, +{ "linux/gsmmux.h", "GSMIOC_SETCONF", _IOC_WRITE, 0x4701, 0x4c }, +{ "linux/hdreg.h", "HDIO_DRIVE_CMD", 0, 0x031f, 0 }, +{ "linux/hdreg.h", "HDIO_DRIVE_RESET", 0, 0x031c, 0 }, +{ "linux/hdreg.h", "HDIO_DRIVE_TASK", 0, 0x031e, 0 }, +{ "linux/hdreg.h", "HDIO_DRIVE_TASKFILE", 0, 0x031d, 0 }, +{ "linux/hdreg.h", "HDIO_GETGEO", 0, 0x0301, 0 }, +{ "linux/hdreg.h", "HDIO_GET_32BIT", 0, 0x0309, 0 }, +{ "linux/hdreg.h", "HDIO_GET_ACOUSTIC", 0, 0x030f, 0 }, +{ "linux/hdreg.h", "HDIO_GET_ADDRESS", 0, 0x0310, 0 }, +{ "linux/hdreg.h", "HDIO_GET_BUSSTATE", 0, 0x031a, 0 }, +{ "linux/hdreg.h", "HDIO_GET_DMA", 0, 0x030b, 0 }, +{ "linux/hdreg.h", "HDIO_GET_IDENTITY", 0, 0x030d, 0 }, +{ "linux/hdreg.h", "HDIO_GET_KEEPSETTINGS", 0, 0x0308, 0 }, +{ "linux/hdreg.h", "HDIO_GET_MULTCOUNT", 0, 0x0304, 0 }, +{ "linux/hdreg.h", "HDIO_GET_NICE", 0, 0x030c, 0 }, +{ "linux/hdreg.h", "HDIO_GET_NOWERR", 0, 0x030a, 0 }, +{ "linux/hdreg.h", "HDIO_GET_QDMA", 0, 0x0305, 0 }, +{ "linux/hdreg.h", "HDIO_GET_UNMASKINTR", 0, 0x0302, 0 }, +{ "linux/hdreg.h", "HDIO_GET_WCACHE", 0, 0x030e, 0 }, +{ "linux/hdreg.h", "HDIO_OBSOLETE_IDENTITY", 0, 0x0307, 0 }, +{ "linux/hdreg.h", "HDIO_SCAN_HWIF", 0, 0x0328, 0 }, +{ "linux/hdreg.h", "HDIO_SET_32BIT", 0, 0x0324, 0 }, +{ "linux/hdreg.h", "HDIO_SET_ACOUSTIC", 0, 0x032c, 0 }, +{ "linux/hdreg.h", "HDIO_SET_ADDRESS", 0, 0x032f, 0 }, +{ "linux/hdreg.h", "HDIO_SET_BUSSTATE", 0, 0x032d, 0 }, +{ "linux/hdreg.h", "HDIO_SET_DMA", 0, 0x0326, 0 }, +{ "linux/hdreg.h", "HDIO_SET_KEEPSETTINGS", 0, 0x0323, 0 }, +{ "linux/hdreg.h", "HDIO_SET_MULTCOUNT", 0, 0x0321, 0 }, +{ "linux/hdreg.h", "HDIO_SET_NICE", 0, 0x0329, 0 }, +{ "linux/hdreg.h", "HDIO_SET_NOWERR", 0, 0x0325, 0 }, +{ "linux/hdreg.h", "HDIO_SET_PIO_MODE", 0, 0x0327, 0 }, +{ "linux/hdreg.h", "HDIO_SET_QDMA", 0, 0x032e, 0 }, +{ "linux/hdreg.h", "HDIO_SET_UNMASKINTR", 0, 0x0322, 0 }, +{ "linux/hdreg.h", "HDIO_SET_WCACHE", 0, 0x032b, 0 }, +{ "linux/hdreg.h", "HDIO_SET_XFER", 0, 0x0306, 0 }, +{ "linux/hdreg.h", "HDIO_TRISTATE_HWIF", 0, 0x031b, 0 }, +{ "linux/hdreg.h", "HDIO_UNREGISTER_HWIF", 0, 0x032a, 0 }, +{ "linux/hid-roccat.h", "ROCCATIOCGREPSIZE", _IOC_READ, 0x48f1, 0x04 }, +{ "linux/hiddev.h", "HIDIOCAPPLICATION", _IOC_NONE, 0x4802, 0x00 }, +{ "linux/hiddev.h", "HIDIOCGCOLLECTIONINDEX", _IOC_WRITE, 0x4810, 0x18 }, +{ "linux/hiddev.h", "HIDIOCGCOLLECTIONINFO", _IOC_READ|_IOC_WRITE, 0x4811, 0x10 }, +{ "linux/hiddev.h", "HIDIOCGDEVINFO", _IOC_READ, 0x4803, 0x1a }, +{ "linux/hiddev.h", "HIDIOCGFIELDINFO", _IOC_READ|_IOC_WRITE, 0x480a, 0x38 }, +{ "linux/hiddev.h", "HIDIOCGFLAG", _IOC_READ, 0x480e, 0x04 }, +{ "linux/hiddev.h", "HIDIOCGREPORT", _IOC_WRITE, 0x4807, 0x0c }, +{ "linux/hiddev.h", "HIDIOCGREPORTINFO", _IOC_READ|_IOC_WRITE, 0x4809, 0x0c }, +{ "linux/hiddev.h", "HIDIOCGSTRING", _IOC_READ, 0x4804, 0x104 }, +{ "linux/hiddev.h", "HIDIOCGUCODE", _IOC_READ|_IOC_WRITE, 0x480d, 0x18 }, +{ "linux/hiddev.h", "HIDIOCGUSAGE", _IOC_READ|_IOC_WRITE, 0x480b, 0x18 }, +{ "linux/hiddev.h", "HIDIOCGUSAGES", _IOC_READ|_IOC_WRITE, 0x4813, 0x101c }, +{ "linux/hiddev.h", "HIDIOCGVERSION", _IOC_READ, 0x4801, 0x04 }, +{ "linux/hiddev.h", "HIDIOCINITREPORT", _IOC_NONE, 0x4805, 0x00 }, +{ "linux/hiddev.h", "HIDIOCSFLAG", _IOC_WRITE, 0x480f, 0x04 }, +{ "linux/hiddev.h", "HIDIOCSREPORT", _IOC_WRITE, 0x4808, 0x0c }, +{ "linux/hiddev.h", "HIDIOCSUSAGE", _IOC_WRITE, 0x480c, 0x18 }, +{ "linux/hiddev.h", "HIDIOCSUSAGES", _IOC_WRITE, 0x4814, 0x101c }, +{ "linux/hidraw.h", "HIDIOCGRAWINFO", _IOC_READ, 0x4803, 0x08 }, +{ "linux/hidraw.h", "HIDIOCGRDESC", _IOC_READ, 0x4802, 0x1004 }, +{ "linux/hidraw.h", "HIDIOCGRDESCSIZE", _IOC_READ, 0x4801, 0x04 }, +{ "linux/hpet.h", "HPET_DPI", _IOC_NONE, 0x6805, 0x00 }, +{ "linux/hpet.h", "HPET_EPI", _IOC_NONE, 0x6804, 0x00 }, +{ "linux/hpet.h", "HPET_IE_OFF", _IOC_NONE, 0x6802, 0x00 }, +{ "linux/hpet.h", "HPET_IE_ON", _IOC_NONE, 0x6801, 0x00 }, +{ "linux/hpet.h", "HPET_INFO", _IOC_READ, 0x6803, 0x0c }, +{ "linux/hpet.h", "HPET_IRQFREQ", _IOC_WRITE, 0x6806, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_CONFIG_BUFS", _IOC_WRITE, 0x431f, 0x20 }, +{ "linux/hsi/cs-protocol.h", "CS_GET_IF_VERSION", _IOC_READ, 0x431e, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_GET_STATE", _IOC_READ, 0x4315, 0x04 }, +{ "linux/hsi/cs-protocol.h", "CS_SET_WAKELINE", _IOC_WRITE, 0x4317, 0x04 }, +{ "linux/hsi/hsi_char.h", "HSC_GET_RX", _IOC_WRITE, 0x6b14, 0x0c }, +{ "linux/hsi/hsi_char.h", "HSC_GET_TX", _IOC_WRITE, 0x6b16, 0x10 }, +{ "linux/hsi/hsi_char.h", "HSC_RESET", _IOC_NONE, 0x6b10, 0x00 }, +{ "linux/hsi/hsi_char.h", "HSC_SEND_BREAK", _IOC_NONE, 0x6b12, 0x00 }, +{ "linux/hsi/hsi_char.h", "HSC_SET_PM", _IOC_NONE, 0x6b11, 0x00 }, +{ "linux/hsi/hsi_char.h", "HSC_SET_RX", _IOC_WRITE, 0x6b13, 0x0c }, +{ "linux/hsi/hsi_char.h", "HSC_SET_TX", _IOC_WRITE, 0x6b15, 0x10 }, +{ "linux/i2o-dev.h", "I2OEVTGET", _IOC_READ, 0x690b, 0x68 }, +{ "linux/i2o-dev.h", "I2OEVTREG", _IOC_WRITE, 0x690a, 0x0c }, +{ "linux/i2o-dev.h", "I2OGETIOPS", _IOC_READ, 0x6900, 0x20 }, +{ "linux/i2o-dev.h", "I2OHRTGET", _IOC_READ|_IOC_WRITE, 0x6901, 0x0c }, +{ "linux/i2o-dev.h", "I2OHTML", _IOC_READ|_IOC_WRITE, 0x6909, 0x1c }, +{ "linux/i2o-dev.h", "I2OLCTGET", _IOC_READ|_IOC_WRITE, 0x6902, 0x0c }, +{ "linux/i2o-dev.h", "I2OPARMGET", _IOC_READ|_IOC_WRITE, 0x6904, 0x18 }, +{ "linux/i2o-dev.h", "I2OPARMSET", _IOC_READ|_IOC_WRITE, 0x6903, 0x18 }, +{ "linux/i2o-dev.h", "I2OPASSTHRU", _IOC_READ, 0x690c, 0x08 }, +{ "linux/i2o-dev.h", "I2OPASSTHRU32", _IOC_READ, 0x690c, 0x08 }, +{ "linux/i2o-dev.h", "I2OSWDEL", _IOC_READ|_IOC_WRITE, 0x6907, 0x1a }, +{ "linux/i2o-dev.h", "I2OSWDL", _IOC_READ|_IOC_WRITE, 0x6905, 0x1a }, +{ "linux/i2o-dev.h", "I2OSWUL", _IOC_READ|_IOC_WRITE, 0x6906, 0x1a }, +{ "linux/i2o-dev.h", "I2OVALIDATE", _IOC_READ, 0x6908, 0x04 }, +{ "linux/i8k.h", "I8K_BIOS_VERSION", _IOC_READ, 0x6980, 0x04 }, +{ "linux/i8k.h", "I8K_FN_STATUS", _IOC_READ, 0x6983, 0x04 }, +{ "linux/i8k.h", "I8K_GET_FAN", _IOC_READ|_IOC_WRITE, 0x6986, 0x04 }, +{ "linux/i8k.h", "I8K_GET_SPEED", _IOC_READ|_IOC_WRITE, 0x6985, 0x04 }, +{ "linux/i8k.h", "I8K_GET_TEMP", _IOC_READ, 0x6984, 0x04 }, +{ "linux/i8k.h", "I8K_MACHINE_ID", _IOC_READ, 0x6981, 0x04 }, +{ "linux/i8k.h", "I8K_POWER_STATUS", _IOC_READ, 0x6982, 0x04 }, +{ "linux/i8k.h", "I8K_SET_FAN", _IOC_READ|_IOC_WRITE, 0x6987, 0x04 }, +{ "linux/if_pppox.h", "PPPOEIOCDFWD", _IOC_NONE, 0xb101, 0x00 }, +{ "linux/if_pppox.h", "PPPOEIOCSFWD", _IOC_WRITE, 0xb100, 0x04 }, +{ "linux/if_tun.h", "TUNATTACHFILTER", _IOC_WRITE, 0x54d5, 0x06 }, +{ "linux/if_tun.h", "TUNDETACHFILTER", _IOC_WRITE, 0x54d6, 0x06 }, +{ "linux/if_tun.h", "TUNGETFEATURES", _IOC_READ, 0x54cf, 0x04 }, +{ "linux/if_tun.h", "TUNGETFILTER", _IOC_READ, 0x54db, 0x06 }, +{ "linux/if_tun.h", "TUNGETIFF", _IOC_READ, 0x54d2, 0x04 }, +{ "linux/if_tun.h", "TUNGETSNDBUF", _IOC_READ, 0x54d3, 0x04 }, +{ "linux/if_tun.h", "TUNGETVNETBE", _IOC_READ, 0x54df, 0x04 }, +{ "linux/if_tun.h", "TUNGETVNETHDRSZ", _IOC_READ, 0x54d7, 0x04 }, +{ "linux/if_tun.h", "TUNGETVNETLE", _IOC_READ, 0x54dd, 0x04 }, +{ "linux/if_tun.h", "TUNSETDEBUG", _IOC_WRITE, 0x54c9, 0x04 }, +{ "linux/if_tun.h", "TUNSETGROUP", _IOC_WRITE, 0x54ce, 0x04 }, +{ "linux/if_tun.h", "TUNSETIFF", _IOC_WRITE, 0x54ca, 0x04 }, +{ "linux/if_tun.h", "TUNSETIFINDEX", _IOC_WRITE, 0x54da, 0x04 }, +{ "linux/if_tun.h", "TUNSETLINK", _IOC_WRITE, 0x54cd, 0x04 }, +{ "linux/if_tun.h", "TUNSETNOCSUM", _IOC_WRITE, 0x54c8, 0x04 }, +{ "linux/if_tun.h", "TUNSETOFFLOAD", _IOC_WRITE, 0x54d0, 0x04 }, +{ "linux/if_tun.h", "TUNSETOWNER", _IOC_WRITE, 0x54cc, 0x04 }, +{ "linux/if_tun.h", "TUNSETPERSIST", _IOC_WRITE, 0x54cb, 0x04 }, +{ "linux/if_tun.h", "TUNSETQUEUE", _IOC_WRITE, 0x54d9, 0x04 }, +{ "linux/if_tun.h", "TUNSETSNDBUF", _IOC_WRITE, 0x54d4, 0x04 }, +{ "linux/if_tun.h", "TUNSETTXFILTER", _IOC_WRITE, 0x54d1, 0x04 }, +{ "linux/if_tun.h", "TUNSETVNETBE", _IOC_WRITE, 0x54de, 0x04 }, +{ "linux/if_tun.h", "TUNSETVNETHDRSZ", _IOC_WRITE, 0x54d8, 0x04 }, +{ "linux/if_tun.h", "TUNSETVNETLE", _IOC_WRITE, 0x54dc, 0x04 }, +{ "linux/iio/events.h", "IIO_GET_EVENT_FD_IOCTL", _IOC_READ, 0x6990, 0x04 }, +{ "linux/input.h", "EVIOCGEFFECTS", _IOC_READ, 0x4584, 0x04 }, +{ "linux/input.h", "EVIOCGID", _IOC_READ, 0x4502, 0x08 }, +{ "linux/input.h", "EVIOCGKEYCODE", _IOC_READ, 0x4504, 0x08 }, +{ "linux/input.h", "EVIOCGKEYCODE_V2", _IOC_READ, 0x4504, 0x28 }, +{ "linux/input.h", "EVIOCGMASK", _IOC_READ, 0x4592, 0x10 }, +{ "linux/input.h", "EVIOCGRAB", _IOC_WRITE, 0x4590, 0x04 }, +{ "linux/input.h", "EVIOCGREP", _IOC_READ, 0x4503, 0x08 }, +{ "linux/input.h", "EVIOCGVERSION", _IOC_READ, 0x4501, 0x04 }, +{ "linux/input.h", "EVIOCREVOKE", _IOC_WRITE, 0x4591, 0x04 }, +{ "linux/input.h", "EVIOCRMFF", _IOC_WRITE, 0x4581, 0x04 }, +{ "linux/input.h", "EVIOCSCLOCKID", _IOC_WRITE, 0x45a0, 0x04 }, +{ "linux/input.h", "EVIOCSFF", _IOC_WRITE, 0x4580, 0x28 }, +{ "linux/input.h", "EVIOCSKEYCODE", _IOC_WRITE, 0x4504, 0x08 }, +{ "linux/input.h", "EVIOCSKEYCODE_V2", _IOC_WRITE, 0x4504, 0x28 }, +{ "linux/input.h", "EVIOCSMASK", _IOC_WRITE, 0x4593, 0x10 }, +{ "linux/input.h", "EVIOCSREP", _IOC_WRITE, 0x4503, 0x08 }, +{ "linux/ipmi.h", "IPMICTL_GET_MAINTENANCE_MODE_CMD", _IOC_READ, 0x691e, 0x04 }, +{ "linux/ipmi.h", "IPMICTL_GET_MY_ADDRESS_CMD", _IOC_READ, 0x6912, 0x04 }, +{ "linux/ipmi.h", "IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD", _IOC_READ, 0x6919, 0x04 }, +{ "linux/ipmi.h", "IPMICTL_GET_MY_CHANNEL_LUN_CMD", _IOC_READ, 0x691b, 0x04 }, +{ "linux/ipmi.h", "IPMICTL_GET_MY_LUN_CMD", _IOC_READ, 0x6914, 0x04 }, +{ "linux/ipmi.h", "IPMICTL_GET_TIMING_PARMS_CMD", _IOC_READ, 0x6917, 0x08 }, +{ "linux/ipmi.h", "IPMICTL_RECEIVE_MSG", _IOC_READ|_IOC_WRITE, 0x690c, 0x18 }, +{ "linux/ipmi.h", "IPMICTL_RECEIVE_MSG_TRUNC", _IOC_READ|_IOC_WRITE, 0x690b, 0x18 }, +{ "linux/ipmi.h", "IPMICTL_REGISTER_FOR_CMD", _IOC_READ, 0x690e, 0x02 }, +{ "linux/ipmi.h", "IPMICTL_REGISTER_FOR_CMD_CHANS", _IOC_READ, 0x691c, 0x0c }, +{ "linux/ipmi.h", "IPMICTL_SEND_COMMAND", _IOC_READ, 0x690d, 0x14 }, +{ "linux/ipmi.h", "IPMICTL_SEND_COMMAND_SETTIME", _IOC_READ, 0x6915, 0x1c }, +{ "linux/ipmi.h", "IPMICTL_SET_GETS_EVENTS_CMD", _IOC_READ, 0x6910, 0x04 }, +{ "linux/ipmi.h", "IPMICTL_SET_MAINTENANCE_MODE_CMD", _IOC_WRITE, 0x691f, 0x04 }, +{ "linux/ipmi.h", "IPMICTL_SET_MY_ADDRESS_CMD", _IOC_READ, 0x6911, 0x04 }, +{ "linux/ipmi.h", "IPMICTL_SET_MY_CHANNEL_ADDRESS_CMD", _IOC_READ, 0x6918, 0x04 }, +{ "linux/ipmi.h", "IPMICTL_SET_MY_CHANNEL_LUN_CMD", _IOC_READ, 0x691a, 0x04 }, +{ "linux/ipmi.h", "IPMICTL_SET_MY_LUN_CMD", _IOC_READ, 0x6913, 0x04 }, +{ "linux/ipmi.h", "IPMICTL_SET_TIMING_PARMS_CMD", _IOC_READ, 0x6916, 0x08 }, +{ "linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD", _IOC_READ, 0x690f, 0x02 }, +{ "linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD_CHANS", _IOC_READ, 0x691d, 0x0c }, +{ "linux/isdn.h", "IIOCDBGVAR", _IOC_NONE, 0x497f, 0x00 }, +{ "linux/isdn.h", "IIOCDRVCTL", _IOC_NONE, 0x4980, 0x00 }, +{ "linux/isdn.h", "IIOCGETCPS", _IOC_NONE, 0x4915, 0x00 }, +{ "linux/isdn.h", "IIOCGETDVR", _IOC_NONE, 0x4916, 0x00 }, +{ "linux/isdn.h", "IIOCGETMAP", _IOC_NONE, 0x4911, 0x00 }, +{ "linux/isdn.h", "IIOCGETPRF", _IOC_NONE, 0x490f, 0x00 }, +{ "linux/isdn.h", "IIOCGETSET", _IOC_NONE, 0x4908, 0x00 }, +{ "linux/isdn.h", "IIOCNETAIF", _IOC_NONE, 0x4901, 0x00 }, +{ "linux/isdn.h", "IIOCNETALN", _IOC_NONE, 0x4920, 0x00 }, +{ "linux/isdn.h", "IIOCNETANM", _IOC_NONE, 0x4905, 0x00 }, +{ "linux/isdn.h", "IIOCNETASL", _IOC_NONE, 0x4913, 0x00 }, +{ "linux/isdn.h", "IIOCNETDIF", _IOC_NONE, 0x4902, 0x00 }, +{ "linux/isdn.h", "IIOCNETDIL", _IOC_NONE, 0x4914, 0x00 }, +{ "linux/isdn.h", "IIOCNETDLN", _IOC_NONE, 0x4921, 0x00 }, +{ "linux/isdn.h", "IIOCNETDNM", _IOC_NONE, 0x4906, 0x00 }, +{ "linux/isdn.h", "IIOCNETDWRSET", _IOC_NONE, 0x4918, 0x00 }, +{ "linux/isdn.h", "IIOCNETGCF", _IOC_NONE, 0x4904, 0x00 }, +{ "linux/isdn.h", "IIOCNETGNM", _IOC_NONE, 0x4907, 0x00 }, +{ "linux/isdn.h", "IIOCNETGPN", _IOC_NONE, 0x4922, 0x00 }, +{ "linux/isdn.h", "IIOCNETHUP", _IOC_NONE, 0x490b, 0x00 }, +{ "linux/isdn.h", "IIOCNETLCR", _IOC_NONE, 0x4917, 0x00 }, +{ "linux/isdn.h", "IIOCNETSCF", _IOC_NONE, 0x4903, 0x00 }, +{ "linux/isdn.h", "IIOCSETBRJ", _IOC_NONE, 0x490d, 0x00 }, +{ "linux/isdn.h", "IIOCSETGST", _IOC_NONE, 0x490c, 0x00 }, +{ "linux/isdn.h", "IIOCSETMAP", _IOC_NONE, 0x4912, 0x00 }, +{ "linux/isdn.h", "IIOCSETPRF", _IOC_NONE, 0x4910, 0x00 }, +{ "linux/isdn.h", "IIOCSETSET", _IOC_NONE, 0x4909, 0x00 }, +{ "linux/isdn.h", "IIOCSETVER", _IOC_NONE, 0x490a, 0x00 }, +{ "linux/isdn.h", "IIOCSIGPRF", _IOC_NONE, 0x490e, 0x00 }, +{ "linux/isdn_ppp.h", "PPPIOCBUNDLE", _IOC_WRITE, 0x7481, 0x04 }, +{ "linux/isdn_ppp.h", "PPPIOCGCALLINFO", _IOC_READ|_IOC_WRITE, 0x7480, 0x88 }, +{ "linux/isdn_ppp.h", "PPPIOCGCOMPRESSORS", _IOC_READ, 0x7486, 0x20 }, +{ "linux/isdn_ppp.h", "PPPIOCGIFNAME", _IOC_READ, 0x7488, 0x10 }, +{ "linux/isdn_ppp.h", "PPPIOCGMPFLAGS", _IOC_READ, 0x7482, 0x04 }, +{ "linux/isdn_ppp.h", "PPPIOCSCOMPRESSOR", _IOC_WRITE, 0x7487, 0x04 }, +{ "linux/isdn_ppp.h", "PPPIOCSMPFLAGS", _IOC_WRITE, 0x7483, 0x04 }, +{ "linux/isdn_ppp.h", "PPPIOCSMPMRU", _IOC_WRITE, 0x7485, 0x04 }, +{ "linux/isdn_ppp.h", "PPPIOCSMPMTU", _IOC_WRITE, 0x7484, 0x04 }, +{ "linux/ivtv.h", "IVTV_IOC_DMA_FRAME", _IOC_WRITE, 0x56c0, 0x38 }, +{ "linux/ivtv.h", "IVTV_IOC_PASSTHROUGH_MODE", _IOC_WRITE, 0x56c1, 0x04 }, +{ "linux/ivtvfb.h", "IVTVFB_IOC_DMA_FRAME", _IOC_WRITE, 0x56c0, 0x0c }, +{ "linux/ixjuser.h", "IXJCTL_AEC_GET_LEVEL", _IOC_NONE, 0x71cd, 0x00 }, +{ "linux/ixjuser.h", "IXJCTL_AEC_START", _IOC_WRITE, 0x71cb, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_AEC_STOP", _IOC_NONE, 0x71cc, 0x00 }, +{ "linux/ixjuser.h", "IXJCTL_CARDTYPE", _IOC_READ, 0x71c1, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_CID", _IOC_READ, 0x71d4, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_CIDCW", _IOC_WRITE, 0x71d9, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_DAA_AGAIN", _IOC_WRITE, 0x71d2, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_DAA_COEFF_SET", _IOC_WRITE, 0x71d0, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_DRYBUFFER_CLEAR", _IOC_NONE, 0x71e7, 0x00 }, +{ "linux/ixjuser.h", "IXJCTL_DRYBUFFER_READ", _IOC_READ, 0x71e6, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_DSP_IDLE", _IOC_NONE, 0x71c5, 0x00 }, +{ "linux/ixjuser.h", "IXJCTL_DSP_RESET", _IOC_NONE, 0x71c0, 0x00 }, +{ "linux/ixjuser.h", "IXJCTL_DSP_TYPE", _IOC_READ, 0x71c3, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_DSP_VERSION", _IOC_READ, 0x71c4, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_DTMF_PRESCALE", _IOC_WRITE, 0x71e8, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_FILTER_CADENCE", _IOC_WRITE, 0x71d6, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_FRAMES_READ", _IOC_READ, 0x71e2, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_FRAMES_WRITTEN", _IOC_READ, 0x71e3, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_GET_FILTER_HIST", _IOC_WRITE, 0x71c8, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_HZ", _IOC_WRITE, 0x71e0, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_INIT_TONE", _IOC_WRITE, 0x71c9, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_INTERCOM_START", _IOC_WRITE, 0x71fd, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_INTERCOM_STOP", _IOC_WRITE, 0x71fe, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_MIXER", _IOC_WRITE, 0x71cf, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_PLAY_CID", _IOC_NONE, 0x71d7, 0x00 }, +{ "linux/ixjuser.h", "IXJCTL_PORT", _IOC_WRITE, 0x71d1, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_POTS_PSTN", _IOC_WRITE, 0x71d5, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_PSTN_LINETEST", _IOC_NONE, 0x71d3, 0x00 }, +{ "linux/ixjuser.h", "IXJCTL_RATE", _IOC_WRITE, 0x71e1, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_READ_WAIT", _IOC_READ, 0x71e4, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_SC_RXG", _IOC_WRITE, 0x71ea, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_SC_TXG", _IOC_WRITE, 0x71eb, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_SERIAL", _IOC_READ, 0x71c2, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_SET_FILTER", _IOC_WRITE, 0x71c7, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_SET_FILTER_RAW", _IOC_WRITE, 0x71dd, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_SET_LED", _IOC_WRITE, 0x71ce, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_SIGCTL", _IOC_WRITE, 0x71e9, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_TESTRAM", _IOC_NONE, 0x71c6, 0x00 }, +{ "linux/ixjuser.h", "IXJCTL_TONE_CADENCE", _IOC_WRITE, 0x71ca, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_VERSION", _IOC_READ, 0x71da, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_VMWI", _IOC_READ, 0x71d8, 0x04 }, +{ "linux/ixjuser.h", "IXJCTL_WRITE_WAIT", _IOC_READ, 0x71e5, 0x04 }, +{ "linux/joystick.h", "JSIOCGAXES", _IOC_READ, 0x6a11, 0x01 }, +{ "linux/joystick.h", "JSIOCGAXMAP", _IOC_READ, 0x6a32, 0x40 }, +{ "linux/joystick.h", "JSIOCGBTNMAP", _IOC_READ, 0x6a34, 0x400 }, +{ "linux/joystick.h", "JSIOCGBUTTONS", _IOC_READ, 0x6a12, 0x01 }, +{ "linux/joystick.h", "JSIOCGCORR", _IOC_READ, 0x6a22, 0x24 }, +{ "linux/joystick.h", "JSIOCGVERSION", _IOC_READ, 0x6a01, 0x04 }, +{ "linux/joystick.h", "JSIOCSAXMAP", _IOC_WRITE, 0x6a31, 0x40 }, +{ "linux/joystick.h", "JSIOCSBTNMAP", _IOC_WRITE, 0x6a33, 0x400 }, +{ "linux/joystick.h", "JSIOCSCORR", _IOC_WRITE, 0x6a21, 0x24 }, +{ "linux/kcov.h", "KCOV_DISABLE", _IOC_NONE, 0x6365, 0x00 }, +{ "linux/kcov.h", "KCOV_ENABLE", _IOC_NONE, 0x6364, 0x00 }, +{ "linux/kcov.h", "KCOV_INIT_TRACE", _IOC_READ, 0x6301, 0x04 }, +{ "linux/kd.h", "GIO_CMAP", 0, 0x4B70, 0 }, +{ "linux/kd.h", "GIO_FONT", 0, 0x4B60, 0 }, +{ "linux/kd.h", "GIO_FONTX", 0, 0x4B6B, 0 }, +{ "linux/kd.h", "GIO_SCRNMAP", 0, 0x4B40, 0 }, +{ "linux/kd.h", "GIO_UNIMAP", 0, 0x4B66, 0 }, +{ "linux/kd.h", "GIO_UNISCRNMAP", 0, 0x4B69, 0 }, +{ "linux/kd.h", "KDADDIO", 0, 0x4B34, 0 }, +{ "linux/kd.h", "KDDELIO", 0, 0x4B35, 0 }, +{ "linux/kd.h", "KDDISABIO", 0, 0x4B37, 0 }, +{ "linux/kd.h", "KDENABIO", 0, 0x4B36, 0 }, +{ "linux/kd.h", "KDFONTOP", 0, 0x4B72, 0 }, +{ "linux/kd.h", "KDGETKEYCODE", 0, 0x4B4C, 0 }, +{ "linux/kd.h", "KDGETLED", 0, 0x4B31, 0 }, +{ "linux/kd.h", "KDGETMODE", 0, 0x4B3B, 0 }, +{ "linux/kd.h", "KDGKBDIACR", 0, 0x4B4A, 0 }, +{ "linux/kd.h", "KDGKBDIACRUC", 0, 0x4BFA, 0 }, +{ "linux/kd.h", "KDGKBENT", 0, 0x4B46, 0 }, +{ "linux/kd.h", "KDGKBLED", 0, 0x4B64, 0 }, +{ "linux/kd.h", "KDGKBMETA", 0, 0x4B62, 0 }, +{ "linux/kd.h", "KDGKBMODE", 0, 0x4B44, 0 }, +{ "linux/kd.h", "KDGKBSENT", 0, 0x4B48, 0 }, +{ "linux/kd.h", "KDGKBTYPE", 0, 0x4B33, 0 }, +{ "linux/kd.h", "KDKBDREP", 0, 0x4B52, 0 }, +{ "linux/kd.h", "KDMAPDISP", 0, 0x4B3C, 0 }, +{ "linux/kd.h", "KDMKTONE", 0, 0x4B30, 0 }, +{ "linux/kd.h", "KDSETKEYCODE", 0, 0x4B4D, 0 }, +{ "linux/kd.h", "KDSETLED", 0, 0x4B32, 0 }, +{ "linux/kd.h", "KDSETMODE", 0, 0x4B3A, 0 }, +{ "linux/kd.h", "KDSIGACCEPT", 0, 0x4B4E, 0 }, +{ "linux/kd.h", "KDSKBDIACR", 0, 0x4B4B, 0 }, +{ "linux/kd.h", "KDSKBDIACRUC", 0, 0x4BFB, 0 }, +{ "linux/kd.h", "KDSKBENT", 0, 0x4B47, 0 }, +{ "linux/kd.h", "KDSKBLED", 0, 0x4B65, 0 }, +{ "linux/kd.h", "KDSKBMETA", 0, 0x4B63, 0 }, +{ "linux/kd.h", "KDSKBMODE", 0, 0x4B45, 0 }, +{ "linux/kd.h", "KDSKBSENT", 0, 0x4B49, 0 }, +{ "linux/kd.h", "KDUNMAPDISP", 0, 0x4B3D, 0 }, +{ "linux/kd.h", "KIOCSOUND", 0, 0x4B2F, 0 }, +{ "linux/kd.h", "PIO_CMAP", 0, 0x4B71, 0 }, +{ "linux/kd.h", "PIO_FONT", 0, 0x4B61, 0 }, +{ "linux/kd.h", "PIO_FONTRESET", 0, 0x4B6D, 0 }, +{ "linux/kd.h", "PIO_FONTX", 0, 0x4B6C, 0 }, +{ "linux/kd.h", "PIO_SCRNMAP", 0, 0x4B41, 0 }, +{ "linux/kd.h", "PIO_UNIMAP", 0, 0x4B67, 0 }, +{ "linux/kd.h", "PIO_UNIMAPCLR", 0, 0x4B68, 0 }, +{ "linux/kd.h", "PIO_UNISCRNMAP", 0, 0x4B6A, 0 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_EVENT", _IOC_READ|_IOC_WRITE, 0x4b08, 0x20 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_CREATE_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b02, 0x58 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_ADDRESS_WATCH", _IOC_WRITE, 0x4b0f, 0x10 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_REGISTER", _IOC_WRITE, 0x4b0d, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_UNREGISTER", _IOC_WRITE, 0x4b0e, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DBG_WAVE_CONTROL", _IOC_WRITE, 0x4b10, 0x10 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_EVENT", _IOC_WRITE, 0x4b09, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_DESTROY_QUEUE", _IOC_READ|_IOC_WRITE, 0x4b03, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_CLOCK_COUNTERS", _IOC_READ|_IOC_WRITE, 0x4b05, 0x28 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_PROCESS_APERTURES", _IOC_READ, 0x4b06, 0x190 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_GET_VERSION", _IOC_READ, 0x4b01, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_RESET_EVENT", _IOC_WRITE, 0x4b0b, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_EVENT", _IOC_WRITE, 0x4b0a, 0x08 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 }, +{ "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 }, +{ "linux/lightnvm.h", "NVM_DEV_CREATE", _IOC_WRITE, 0x4c22, 0x80 }, +{ "linux/lightnvm.h", "NVM_DEV_FACTORY", _IOC_WRITE, 0x4c25, 0x24 }, +{ "linux/lightnvm.h", "NVM_DEV_INIT", _IOC_WRITE, 0x4c24, 0x2c }, +{ "linux/lightnvm.h", "NVM_DEV_REMOVE", _IOC_WRITE, 0x4c23, 0x24 }, +{ "linux/lightnvm.h", "NVM_GET_DEVICES", _IOC_READ, 0x4c21, 0x1000 }, +{ "linux/lightnvm.h", "NVM_INFO", _IOC_READ|_IOC_WRITE, 0x4c20, 0x1000 }, +{ "linux/lirc.h", "LIRC_GET_FEATURES", _IOC_READ, 0x6900, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_LENGTH", _IOC_READ, 0x690f, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MAX_TIMEOUT", _IOC_READ, 0x6909, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_MIN_TIMEOUT", _IOC_READ, 0x6908, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_MODE", _IOC_READ, 0x6902, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_REC_RESOLUTION", _IOC_READ, 0x6907, 0x04 }, +{ "linux/lirc.h", "LIRC_GET_SEND_MODE", _IOC_READ, 0x6901, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_MEASURE_CARRIER_MODE", _IOC_WRITE, 0x691d, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_CARRIER", _IOC_WRITE, 0x6914, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_CARRIER_RANGE", _IOC_WRITE, 0x691f, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_MODE", _IOC_WRITE, 0x6912, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT", _IOC_WRITE, 0x6918, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_REC_TIMEOUT_REPORTS", _IOC_WRITE, 0x6919, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_CARRIER", _IOC_WRITE, 0x6913, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_DUTY_CYCLE", _IOC_WRITE, 0x6915, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_SEND_MODE", _IOC_WRITE, 0x6911, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_TRANSMITTER_MASK", _IOC_WRITE, 0x6917, 0x04 }, +{ "linux/lirc.h", "LIRC_SET_WIDEBAND_RECEIVER", _IOC_WRITE, 0x6923, 0x04 }, +{ "linux/loop.h", "LOOP_CHANGE_FD", 0, 0x4C06, 0 }, +{ "linux/loop.h", "LOOP_CLR_FD", 0, 0x4C01, 0 }, +{ "linux/loop.h", "LOOP_CTL_ADD", 0, 0x4C80, 0 }, +{ "linux/loop.h", "LOOP_CTL_GET_FREE", 0, 0x4C82, 0 }, +{ "linux/loop.h", "LOOP_CTL_REMOVE", 0, 0x4C81, 0 }, +{ "linux/loop.h", "LOOP_GET_STATUS", 0, 0x4C03, 0 }, +{ "linux/loop.h", "LOOP_GET_STATUS64", 0, 0x4C05, 0 }, +{ "linux/loop.h", "LOOP_SET_CAPACITY", 0, 0x4C07, 0 }, +{ "linux/loop.h", "LOOP_SET_DIRECT_IO", 0, 0x4C08, 0 }, +{ "linux/loop.h", "LOOP_SET_FD", 0, 0x4C00, 0 }, +{ "linux/loop.h", "LOOP_SET_STATUS", 0, 0x4C02, 0 }, +{ "linux/loop.h", "LOOP_SET_STATUS64", 0, 0x4C04, 0 }, +{ "linux/mISDNif.h", "IMADDTIMER", _IOC_READ, 0x4940, 0x04 }, +{ "linux/mISDNif.h", "IMCLEAR_L2", _IOC_READ, 0x4946, 0x04 }, +{ "linux/mISDNif.h", "IMCTRLREQ", _IOC_READ, 0x4945, 0x04 }, +{ "linux/mISDNif.h", "IMDELTIMER", _IOC_READ, 0x4941, 0x04 }, +{ "linux/mISDNif.h", "IMGETCOUNT", _IOC_READ, 0x4943, 0x04 }, +{ "linux/mISDNif.h", "IMGETDEVINFO", _IOC_READ, 0x4944, 0x04 }, +{ "linux/mISDNif.h", "IMGETVERSION", _IOC_READ, 0x4942, 0x04 }, +{ "linux/mISDNif.h", "IMHOLD_L1", _IOC_READ, 0x4948, 0x04 }, +{ "linux/mISDNif.h", "IMSETDEVNAME", _IOC_READ, 0x4947, 0x18 }, +{ "linux/matroxfb.h", "MATROXFB_GET_ALL_OUTPUTS", _IOC_READ, 0x6efb, 0x04 }, +{ "linux/matroxfb.h", "MATROXFB_GET_AVAILABLE_OUTPUTS", _IOC_READ, 0x6ef9, 0x04 }, +{ "linux/matroxfb.h", "MATROXFB_GET_OUTPUT_CONNECTION", _IOC_READ, 0x6ef8, 0x04 }, +{ "linux/matroxfb.h", "MATROXFB_GET_OUTPUT_MODE", _IOC_READ|_IOC_WRITE, 0x6efa, 0x04 }, +{ "linux/matroxfb.h", "MATROXFB_SET_OUTPUT_CONNECTION", _IOC_WRITE, 0x6ef8, 0x04 }, +{ "linux/matroxfb.h", "MATROXFB_SET_OUTPUT_MODE", _IOC_WRITE, 0x6efa, 0x04 }, +{ "linux/media.h", "MEDIA_IOC_DEVICE_INFO", _IOC_READ|_IOC_WRITE, 0x7c00, 0x100 }, +{ "linux/media.h", "MEDIA_IOC_ENUM_ENTITIES", _IOC_READ|_IOC_WRITE, 0x7c01, 0x100 }, +{ "linux/media.h", "MEDIA_IOC_ENUM_LINKS", _IOC_READ|_IOC_WRITE, 0x7c02, 0x1c }, +{ "linux/media.h", "MEDIA_IOC_G_TOPOLOGY", _IOC_READ|_IOC_WRITE, 0x7c04, 0x48 }, +{ "linux/media.h", "MEDIA_IOC_SETUP_LINK", _IOC_READ|_IOC_WRITE, 0x7c03, 0x30 }, +{ "linux/mei.h", "IOCTL_MEI_CONNECT_CLIENT", _IOC_READ|_IOC_WRITE, 0x4801, 0x10 }, +{ "linux/mei.h", "IOCTL_MEI_NOTIFY_GET", _IOC_READ, 0x4803, 0x04 }, +{ "linux/mei.h", "IOCTL_MEI_NOTIFY_SET", _IOC_WRITE, 0x4802, 0x04 }, +{ "linux/meye.h", "MEYEIOC_G_PARAMS", _IOC_READ, 0x76c0, 0x06 }, +{ "linux/meye.h", "MEYEIOC_QBUF_CAPT", _IOC_WRITE, 0x76c2, 0x04 }, +{ "linux/meye.h", "MEYEIOC_STILLCAPT", _IOC_NONE, 0x76c4, 0x00 }, +{ "linux/meye.h", "MEYEIOC_STILLJCAPT", _IOC_READ, 0x76c5, 0x04 }, +{ "linux/meye.h", "MEYEIOC_SYNC", _IOC_READ|_IOC_WRITE, 0x76c3, 0x04 }, +{ "linux/meye.h", "MEYEIOC_S_PARAMS", _IOC_WRITE, 0x76c1, 0x06 }, +{ "linux/mic_ioctl.h", "MIC_VIRTIO_ADD_DEVICE", _IOC_READ|_IOC_WRITE, 0x7301, 0x04 }, +{ "linux/mic_ioctl.h", "MIC_VIRTIO_CONFIG_CHANGE", _IOC_READ|_IOC_WRITE, 0x7305, 0x04 }, +{ "linux/mic_ioctl.h", "MIC_VIRTIO_COPY_DESC", _IOC_READ|_IOC_WRITE, 0x7302, 0x04 }, +{ "linux/mmc/ioctl.h", "MMC_IOC_CMD", _IOC_READ|_IOC_WRITE, 0xb300, 0x48 }, +{ "linux/mmc/ioctl.h", "MMC_IOC_MULTI_CMD", _IOC_READ|_IOC_WRITE, 0xb301, 0x08 }, +{ "linux/mmtimer.h", "MMTIMER_GETBITS", _IOC_NONE, 0x6d04, 0x00 }, +{ "linux/mmtimer.h", "MMTIMER_GETCOUNTER", _IOC_READ, 0x6d09, 0x04 }, +{ "linux/mmtimer.h", "MMTIMER_GETFREQ", _IOC_READ, 0x6d02, 0x04 }, +{ "linux/mmtimer.h", "MMTIMER_GETOFFSET", _IOC_NONE, 0x6d00, 0x00 }, +{ "linux/mmtimer.h", "MMTIMER_GETRES", _IOC_READ, 0x6d01, 0x04 }, +{ "linux/mmtimer.h", "MMTIMER_MMAPAVAIL", _IOC_NONE, 0x6d06, 0x00 }, +{ "linux/msdos_fs.h", "FAT_IOCTL_GET_ATTRIBUTES", _IOC_READ, 0x7210, 0x04 }, +{ "linux/msdos_fs.h", "FAT_IOCTL_GET_VOLUME_ID", _IOC_READ, 0x7213, 0x04 }, +{ "linux/msdos_fs.h", "FAT_IOCTL_SET_ATTRIBUTES", _IOC_WRITE, 0x7211, 0x04 }, +{ "linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", _IOC_READ, 0x7201, 0x214 }, +{ "linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", _IOC_READ, 0x7202, 0x214 }, +{ "linux/mtio.h", "MTIOCGET", _IOC_READ, 0x6d02, 0x1c }, +{ "linux/mtio.h", "MTIOCPOS", _IOC_READ, 0x6d03, 0x04 }, +{ "linux/mtio.h", "MTIOCTOP", _IOC_WRITE, 0x6d01, 0x06 }, +{ "linux/nbd.h", "NBD_CLEAR_QUE", _IOC_NONE, 0xab05, 0x00 }, +{ "linux/nbd.h", "NBD_CLEAR_SOCK", _IOC_NONE, 0xab04, 0x00 }, +{ "linux/nbd.h", "NBD_DISCONNECT", _IOC_NONE, 0xab08, 0x00 }, +{ "linux/nbd.h", "NBD_DO_IT", _IOC_NONE, 0xab03, 0x00 }, +{ "linux/nbd.h", "NBD_PRINT_DEBUG", _IOC_NONE, 0xab06, 0x00 }, +{ "linux/nbd.h", "NBD_SET_BLKSIZE", _IOC_NONE, 0xab01, 0x00 }, +{ "linux/nbd.h", "NBD_SET_FLAGS", _IOC_NONE, 0xab0a, 0x00 }, +{ "linux/nbd.h", "NBD_SET_SIZE", _IOC_NONE, 0xab02, 0x00 }, +{ "linux/nbd.h", "NBD_SET_SIZE_BLOCKS", _IOC_NONE, 0xab07, 0x00 }, +{ "linux/nbd.h", "NBD_SET_SOCK", _IOC_NONE, 0xab00, 0x00 }, +{ "linux/nbd.h", "NBD_SET_TIMEOUT", _IOC_NONE, 0xab09, 0x00 }, +{ "linux/ncp_fs.h", "NCP_IOC_CONN_LOGGED_IN", _IOC_NONE, 0x6e03, 0x00 }, +{ "linux/ncp_fs.h", "NCP_IOC_GETCHARSETS", _IOC_READ|_IOC_WRITE, 0x6e0b, 0x2a }, +{ "linux/ncp_fs.h", "NCP_IOC_GETDENTRYTTL", _IOC_WRITE, 0x6e0c, 0x04 }, +{ "linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID", _IOC_WRITE, 0x6e02, 0x02 }, +{ "linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID2", _IOC_WRITE, 0x6e02, 0x04 }, +{ "linux/ncp_fs.h", "NCP_IOC_GETOBJECTNAME", _IOC_READ|_IOC_WRITE, 0x6e09, 0x0c }, +{ "linux/ncp_fs.h", "NCP_IOC_GETPRIVATEDATA", _IOC_READ|_IOC_WRITE, 0x6e0a, 0x08 }, +{ "linux/ncp_fs.h", "NCP_IOC_GETROOT", _IOC_WRITE, 0x6e08, 0x0c }, +{ "linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO", _IOC_READ|_IOC_WRITE, 0x6e04, 0x26 }, +{ "linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO_V2", _IOC_READ|_IOC_WRITE, 0x6e04, 0x24 }, +{ "linux/ncp_fs.h", "NCP_IOC_LOCKUNLOCK", _IOC_READ, 0x6e07, 0x14 }, +{ "linux/ncp_fs.h", "NCP_IOC_NCPREQUEST", _IOC_READ, 0x6e01, 0x0c }, +{ "linux/ncp_fs.h", "NCP_IOC_SETCHARSETS", _IOC_READ, 0x6e0b, 0x2a }, +{ "linux/ncp_fs.h", "NCP_IOC_SETDENTRYTTL", _IOC_READ, 0x6e0c, 0x04 }, +{ "linux/ncp_fs.h", "NCP_IOC_SETOBJECTNAME", _IOC_READ, 0x6e09, 0x0c }, +{ "linux/ncp_fs.h", "NCP_IOC_SETPRIVATEDATA", _IOC_READ, 0x6e0a, 0x08 }, +{ "linux/ncp_fs.h", "NCP_IOC_SETROOT", _IOC_READ, 0x6e08, 0x0c }, +{ "linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", _IOC_WRITE, 0x6e06, 0x04 }, +{ "linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", _IOC_READ, 0x6e05, 0x18 }, +{ "linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", _IOC_READ, 0x6e06, 0x04 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_CAP", _IOC_READ|_IOC_WRITE, 0x4e01, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_START", _IOC_READ|_IOC_WRITE, 0x4e02, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_ARS_STATUS", _IOC_READ|_IOC_WRITE, 0x4e03, 0x30 }, +{ "linux/ndctl.h", "ND_IOCTL_CALL", _IOC_READ|_IOC_WRITE, 0x4e0a, 0x40 }, +{ "linux/ndctl.h", "ND_IOCTL_CLEAR_ERROR", _IOC_READ|_IOC_WRITE, 0x4e04, 0x20 }, +{ "linux/ndctl.h", "ND_IOCTL_DIMM_FLAGS", _IOC_READ|_IOC_WRITE, 0x4e03, 0x08 }, +{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e05, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_GET_CONFIG_SIZE", _IOC_READ|_IOC_WRITE, 0x4e04, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_SET_CONFIG_DATA", _IOC_READ|_IOC_WRITE, 0x4e06, 0x08 }, +{ "linux/ndctl.h", "ND_IOCTL_SMART", _IOC_READ|_IOC_WRITE, 0x4e01, 0x84 }, +{ "linux/ndctl.h", "ND_IOCTL_SMART_THRESHOLD", _IOC_READ|_IOC_WRITE, 0x4e02, 0x0c }, +{ "linux/ndctl.h", "ND_IOCTL_VENDOR", _IOC_READ|_IOC_WRITE, 0x4e09, 0x08 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_CHANGE_CPMODE", _IOC_WRITE, 0x6e80, 0x10 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_CLEAN_SEGMENTS", _IOC_WRITE, 0x6e88, 0x78 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_DELETE_CHECKPOINT", _IOC_WRITE, 0x6e81, 0x08 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_BDESCS", _IOC_READ|_IOC_WRITE, 0x6e87, 0x18 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_CPINFO", _IOC_READ, 0x6e82, 0x18 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_CPSTAT", _IOC_READ, 0x6e83, 0x18 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_SUINFO", _IOC_READ, 0x6e84, 0x18 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_SUSTAT", _IOC_READ, 0x6e85, 0x30 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_GET_VINFO", _IOC_READ|_IOC_WRITE, 0x6e86, 0x18 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_RESIZE", _IOC_WRITE, 0x6e8b, 0x08 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 }, +{ "linux/nilfs2_api.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 }, +{ "linux/nsfs.h", "NS_GET_PARENT", _IOC_NONE, 0xb702, 0x00 }, +{ "linux/nsfs.h", "NS_GET_USERNS", _IOC_NONE, 0xb701, 0x00 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_RESCAN", _IOC_NONE, 0x4e46, 0x00 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_RESET", _IOC_NONE, 0x4e44, 0x00 }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_SUBMIT_IO", _IOC_WRITE, 0x4e42, 0x2c }, +{ "linux/nvme_ioctl.h", "NVME_IOCTL_SUBSYS_RESET", _IOC_NONE, 0x4e45, 0x00 }, +{ "linux/nvram.h", "NVRAM_INIT", _IOC_NONE, 0x7040, 0x00 }, +{ "linux/nvram.h", "NVRAM_SETCKS", _IOC_NONE, 0x7041, 0x00 }, +{ "linux/omap3isp.h", "VIDIOC_OMAP3ISP_AEWB_CFG", _IOC_READ|_IOC_WRITE, 0x56c3, 0x1e }, +{ "linux/omap3isp.h", "VIDIOC_OMAP3ISP_AF_CFG", _IOC_READ|_IOC_WRITE, 0x56c5, 0x4a }, +{ "linux/omap3isp.h", "VIDIOC_OMAP3ISP_CCDC_CFG", _IOC_READ|_IOC_WRITE, 0x56c1, 0x20 }, +{ "linux/omap3isp.h", "VIDIOC_OMAP3ISP_HIST_CFG", _IOC_READ|_IOC_WRITE, 0x56c4, 0x30 }, +{ "linux/omap3isp.h", "VIDIOC_OMAP3ISP_PRV_CFG", _IOC_READ|_IOC_WRITE, 0x56c2, 0x3c }, +{ "linux/omap3isp.h", "VIDIOC_OMAP3ISP_STAT_EN", _IOC_READ|_IOC_WRITE, 0x56c7, 0x04 }, +{ "linux/omap3isp.h", "VIDIOC_OMAP3ISP_STAT_REQ", _IOC_READ|_IOC_WRITE, 0x56c6, 0x16 }, +{ "linux/omapfb.h", "OMAPFB_CTRL_TEST", _IOC_WRITE, 0x4f2e, 0x04 }, +{ "linux/omapfb.h", "OMAPFB_GET_CAPS", _IOC_READ, 0x4f2a, 0x0c }, +{ "linux/omapfb.h", "OMAPFB_GET_COLOR_KEY", _IOC_WRITE, 0x4f33, 0x0c }, +{ "linux/omapfb.h", "OMAPFB_GET_DISPLAY_INFO", _IOC_READ, 0x4f3f, 0x20 }, +{ "linux/omapfb.h", "OMAPFB_GET_OVERLAY_COLORMODE", _IOC_READ, 0x4f3b, 0x3a }, +{ "linux/omapfb.h", "OMAPFB_GET_UPDATE_MODE", _IOC_WRITE, 0x4f2b, 0x04 }, +{ "linux/omapfb.h", "OMAPFB_GET_VRAM_INFO", _IOC_READ, 0x4f3d, 0x20 }, +{ "linux/omapfb.h", "OMAPFB_LCD_TEST", _IOC_WRITE, 0x4f2d, 0x04 }, +{ "linux/omapfb.h", "OMAPFB_MEMORY_READ", _IOC_READ, 0x4f3a, 0x10 }, +{ "linux/omapfb.h", "OMAPFB_MIRROR", _IOC_WRITE, 0x4f1f, 0x04 }, +{ "linux/omapfb.h", "OMAPFB_QUERY_MEM", _IOC_WRITE, 0x4f38, 0x08 }, +{ "linux/omapfb.h", "OMAPFB_QUERY_PLANE", _IOC_WRITE, 0x4f35, 0x44 }, +{ "linux/omapfb.h", "OMAPFB_SETUP_MEM", _IOC_WRITE, 0x4f37, 0x08 }, +{ "linux/omapfb.h", "OMAPFB_SETUP_PLANE", _IOC_WRITE, 0x4f34, 0x44 }, +{ "linux/omapfb.h", "OMAPFB_SET_COLOR_KEY", _IOC_WRITE, 0x4f32, 0x0c }, +{ "linux/omapfb.h", "OMAPFB_SET_TEARSYNC", _IOC_WRITE, 0x4f3e, 0x08 }, +{ "linux/omapfb.h", "OMAPFB_SET_UPDATE_MODE", _IOC_WRITE, 0x4f28, 0x04 }, +{ "linux/omapfb.h", "OMAPFB_SYNC_GFX", _IOC_NONE, 0x4f25, 0x00 }, +{ "linux/omapfb.h", "OMAPFB_UPDATE_WINDOW", _IOC_WRITE, 0x4f36, 0x44 }, +{ "linux/omapfb.h", "OMAPFB_UPDATE_WINDOW_OLD", _IOC_WRITE, 0x4f2f, 0x14 }, +{ "linux/omapfb.h", "OMAPFB_VSYNC", _IOC_NONE, 0x4f26, 0x00 }, +{ "linux/omapfb.h", "OMAPFB_WAITFORGO", _IOC_NONE, 0x4f3c, 0x00 }, +{ "linux/omapfb.h", "OMAPFB_WAITFORVSYNC", _IOC_NONE, 0x4f39, 0x00 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_DISABLE", _IOC_NONE, 0x2401, 0x00 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_ENABLE", _IOC_NONE, 0x2400, 0x00 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_ID", _IOC_READ, 0x2407, 0x04 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_PAUSE_OUTPUT", _IOC_WRITE, 0x2409, 0x04 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_PERIOD", _IOC_WRITE, 0x2404, 0x08 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_REFRESH", _IOC_NONE, 0x2402, 0x00 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_RESET", _IOC_NONE, 0x2403, 0x00 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_SET_BPF", _IOC_WRITE, 0x2408, 0x04 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_SET_FILTER", _IOC_WRITE, 0x2406, 0x04 }, +{ "linux/perf_event.h", "PERF_EVENT_IOC_SET_OUTPUT", _IOC_NONE, 0x2405, 0x00 }, +{ "linux/phantom.h", "PHN_GETREG", _IOC_READ|_IOC_WRITE, 0x7005, 0x08 }, +{ "linux/phantom.h", "PHN_GETREGS", _IOC_READ|_IOC_WRITE, 0x7007, 0x28 }, +{ "linux/phantom.h", "PHN_GET_REG", _IOC_READ|_IOC_WRITE, 0x7000, 0x04 }, +{ "linux/phantom.h", "PHN_GET_REGS", _IOC_READ|_IOC_WRITE, 0x7002, 0x04 }, +{ "linux/phantom.h", "PHN_NOT_OH", _IOC_NONE, 0x7004, 0x00 }, +{ "linux/phantom.h", "PHN_SETREG", _IOC_WRITE, 0x7006, 0x08 }, +{ "linux/phantom.h", "PHN_SETREGS", _IOC_WRITE, 0x7008, 0x28 }, +{ "linux/phantom.h", "PHN_SET_REG", _IOC_WRITE, 0x7001, 0x04 }, +{ "linux/phantom.h", "PHN_SET_REGS", _IOC_WRITE, 0x7003, 0x04 }, +{ "linux/pktcdvd.h", "PACKET_CTRL_CMD", _IOC_READ|_IOC_WRITE, 0x5801, 0x18 }, +{ "linux/platform_data/media/si4713.h", "SI4713_IOC_MEASURE_RNL", _IOC_READ|_IOC_WRITE, 0x56c0, 0x1c }, +{ "linux/pmu.h", "PMU_IOC_CAN_SLEEP", _IOC_READ, 0x4205, 0x04 }, +{ "linux/pmu.h", "PMU_IOC_GET_BACKLIGHT", _IOC_READ, 0x4201, 0x04 }, +{ "linux/pmu.h", "PMU_IOC_GET_MODEL", _IOC_READ, 0x4203, 0x04 }, +{ "linux/pmu.h", "PMU_IOC_GRAB_BACKLIGHT", _IOC_READ, 0x4206, 0x04 }, +{ "linux/pmu.h", "PMU_IOC_HAS_ADB", _IOC_READ, 0x4204, 0x04 }, +{ "linux/pmu.h", "PMU_IOC_SET_BACKLIGHT", _IOC_WRITE, 0x4202, 0x04 }, +{ "linux/pmu.h", "PMU_IOC_SLEEP", _IOC_NONE, 0x4200, 0x00 }, +{ "linux/ppdev.h", "PPCLAIM", _IOC_NONE, 0x708b, 0x00 }, +{ "linux/ppdev.h", "PPCLRIRQ", _IOC_READ, 0x7093, 0x04 }, +{ "linux/ppdev.h", "PPDATADIR", _IOC_WRITE, 0x7090, 0x04 }, +{ "linux/ppdev.h", "PPEXCL", _IOC_NONE, 0x708f, 0x00 }, +{ "linux/ppdev.h", "PPFCONTROL", _IOC_WRITE, 0x708e, 0x02 }, +{ "linux/ppdev.h", "PPGETFLAGS", _IOC_READ, 0x709a, 0x04 }, +{ "linux/ppdev.h", "PPGETMODE", _IOC_READ, 0x7098, 0x04 }, +{ "linux/ppdev.h", "PPGETMODES", _IOC_READ, 0x7097, 0x04 }, +{ "linux/ppdev.h", "PPGETPHASE", _IOC_READ, 0x7099, 0x04 }, +{ "linux/ppdev.h", "PPGETTIME", _IOC_READ, 0x7095, 0x08 }, +{ "linux/ppdev.h", "PPNEGOT", _IOC_WRITE, 0x7091, 0x04 }, +{ "linux/ppdev.h", "PPRCONTROL", _IOC_READ, 0x7083, 0x01 }, +{ "linux/ppdev.h", "PPRDATA", _IOC_READ, 0x7085, 0x01 }, +{ "linux/ppdev.h", "PPRELEASE", _IOC_NONE, 0x708c, 0x00 }, +{ "linux/ppdev.h", "PPRSTATUS", _IOC_READ, 0x7081, 0x01 }, +{ "linux/ppdev.h", "PPSETFLAGS", _IOC_WRITE, 0x709b, 0x04 }, +{ "linux/ppdev.h", "PPSETMODE", _IOC_WRITE, 0x7080, 0x04 }, +{ "linux/ppdev.h", "PPSETPHASE", _IOC_WRITE, 0x7094, 0x04 }, +{ "linux/ppdev.h", "PPSETTIME", _IOC_WRITE, 0x7096, 0x08 }, +{ "linux/ppdev.h", "PPWCONTROL", _IOC_WRITE, 0x7084, 0x01 }, +{ "linux/ppdev.h", "PPWCTLONIRQ", _IOC_WRITE, 0x7092, 0x01 }, +{ "linux/ppdev.h", "PPWDATA", _IOC_WRITE, 0x7086, 0x01 }, +{ "linux/ppdev.h", "PPYIELD", _IOC_NONE, 0x708d, 0x00 }, +{ "linux/ppp-ioctl.h", "PPPIOCATTACH", _IOC_WRITE, 0x743d, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCATTCHAN", _IOC_WRITE, 0x7438, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCCONNECT", _IOC_WRITE, 0x743a, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCDETACH", _IOC_WRITE, 0x743c, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCDISCONN", _IOC_NONE, 0x7439, 0x00 }, +{ "linux/ppp-ioctl.h", "PPPIOCGASYNCMAP", _IOC_READ, 0x7458, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCGCHAN", _IOC_READ, 0x7437, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCGDEBUG", _IOC_READ, 0x7441, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCGFLAGS", _IOC_READ, 0x745a, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCGIDLE", _IOC_READ, 0x743f, 0x08 }, +{ "linux/ppp-ioctl.h", "PPPIOCGL2TPSTATS", _IOC_READ, 0x7436, 0x48 }, +{ "linux/ppp-ioctl.h", "PPPIOCGMRU", _IOC_READ, 0x7453, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCGNPMODE", _IOC_READ|_IOC_WRITE, 0x744c, 0x08 }, +{ "linux/ppp-ioctl.h", "PPPIOCGRASYNCMAP", _IOC_READ, 0x7455, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCGUNIT", _IOC_READ, 0x7456, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCGXASYNCMAP", _IOC_READ, 0x7450, 0x20 }, +{ "linux/ppp-ioctl.h", "PPPIOCNEWUNIT", _IOC_READ|_IOC_WRITE, 0x743e, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCSACTIVE", _IOC_WRITE, 0x7446, 0x06 }, +{ "linux/ppp-ioctl.h", "PPPIOCSASYNCMAP", _IOC_WRITE, 0x7457, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCSCOMPRESS", _IOC_WRITE, 0x744d, 0x0c }, +{ "linux/ppp-ioctl.h", "PPPIOCSDEBUG", _IOC_WRITE, 0x7440, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCSFLAGS", _IOC_WRITE, 0x7459, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCSMAXCID", _IOC_WRITE, 0x7451, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCSMRRU", _IOC_WRITE, 0x743b, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCSMRU", _IOC_WRITE, 0x7452, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCSNPMODE", _IOC_WRITE, 0x744b, 0x08 }, +{ "linux/ppp-ioctl.h", "PPPIOCSPASS", _IOC_WRITE, 0x7447, 0x06 }, +{ "linux/ppp-ioctl.h", "PPPIOCSRASYNCMAP", _IOC_WRITE, 0x7454, 0x04 }, +{ "linux/ppp-ioctl.h", "PPPIOCSXASYNCMAP", _IOC_WRITE, 0x744f, 0x20 }, +{ "linux/ppp-ioctl.h", "PPPIOCXFERUNIT", _IOC_NONE, 0x744e, 0x00 }, +{ "linux/pps.h", "PPS_FETCH", _IOC_READ|_IOC_WRITE, 0x70a4, 0x04 }, +{ "linux/pps.h", "PPS_GETCAP", _IOC_READ, 0x70a3, 0x04 }, +{ "linux/pps.h", "PPS_GETPARAMS", _IOC_READ, 0x70a1, 0x04 }, +{ "linux/pps.h", "PPS_KC_BIND", _IOC_WRITE, 0x70a5, 0x04 }, +{ "linux/pps.h", "PPS_SETPARAMS", _IOC_WRITE, 0x70a2, 0x04 }, +{ "linux/pr.h", "IOC_PR_CLEAR", _IOC_WRITE, 0x70cd, 0x10 }, +{ "linux/pr.h", "IOC_PR_PREEMPT", _IOC_WRITE, 0x70cb, 0x18 }, +{ "linux/pr.h", "IOC_PR_PREEMPT_ABORT", _IOC_WRITE, 0x70cc, 0x18 }, +{ "linux/pr.h", "IOC_PR_REGISTER", _IOC_WRITE, 0x70c8, 0x18 }, +{ "linux/pr.h", "IOC_PR_RELEASE", _IOC_WRITE, 0x70ca, 0x10 }, +{ "linux/pr.h", "IOC_PR_RESERVE", _IOC_WRITE, 0x70c9, 0x10 }, +{ "linux/ptp_clock.h", "PTP_CLOCK_GETCAPS", _IOC_READ, 0x3d01, 0x50 }, +{ "linux/ptp_clock.h", "PTP_ENABLE_PPS", _IOC_WRITE, 0x3d04, 0x04 }, +{ "linux/ptp_clock.h", "PTP_EXTTS_REQUEST", _IOC_WRITE, 0x3d02, 0x10 }, +{ "linux/ptp_clock.h", "PTP_PEROUT_REQUEST", _IOC_WRITE, 0x3d03, 0x38 }, +{ "linux/ptp_clock.h", "PTP_PIN_GETFUNC", _IOC_READ|_IOC_WRITE, 0x3d06, 0x60 }, +{ "linux/ptp_clock.h", "PTP_PIN_SETFUNC", _IOC_WRITE, 0x3d07, 0x60 }, +{ "linux/ptp_clock.h", "PTP_SYS_OFFSET", _IOC_WRITE, 0x3d05, 0x340 }, +{ "linux/ptp_clock.h", "PTP_SYS_OFFSET_PRECISE", _IOC_READ|_IOC_WRITE, 0x3d08, 0x40 }, +{ "linux/radeonfb.h", "FBIO_RADEON_GET_MIRROR", _IOC_READ, 0x4003, 0x04 }, +{ "linux/radeonfb.h", "FBIO_RADEON_SET_MIRROR", _IOC_WRITE, 0x4004, 0x04 }, +{ "linux/raid/md_u.h", "ADD_NEW_DISK", _IOC_WRITE, 0x0921, 0x14 }, +{ "linux/raid/md_u.h", "CLEAR_ARRAY", _IOC_NONE, 0x0920, 0x00 }, +{ "linux/raid/md_u.h", "CLUSTERED_DISK_NACK", _IOC_NONE, 0x0935, 0x00 }, +{ "linux/raid/md_u.h", "GET_ARRAY_INFO", _IOC_READ, 0x0911, 0x48 }, +{ "linux/raid/md_u.h", "GET_BITMAP_FILE", _IOC_READ, 0x0915, 0x1000 }, +{ "linux/raid/md_u.h", "GET_DISK_INFO", _IOC_READ, 0x0912, 0x14 }, +{ "linux/raid/md_u.h", "HOT_ADD_DISK", _IOC_NONE, 0x0928, 0x00 }, +{ "linux/raid/md_u.h", "HOT_GENERATE_ERROR", _IOC_NONE, 0x092a, 0x00 }, +{ "linux/raid/md_u.h", "HOT_REMOVE_DISK", _IOC_NONE, 0x0922, 0x00 }, +{ "linux/raid/md_u.h", "PROTECT_ARRAY", _IOC_NONE, 0x0927, 0x00 }, +{ "linux/raid/md_u.h", "RAID_AUTORUN", _IOC_NONE, 0x0914, 0x00 }, +{ "linux/raid/md_u.h", "RAID_VERSION", _IOC_READ, 0x0910, 0x0c }, +{ "linux/raid/md_u.h", "RESTART_ARRAY_RW", _IOC_NONE, 0x0934, 0x00 }, +{ "linux/raid/md_u.h", "RUN_ARRAY", _IOC_WRITE, 0x0930, 0x0c }, +{ "linux/raid/md_u.h", "SET_ARRAY_INFO", _IOC_WRITE, 0x0923, 0x48 }, +{ "linux/raid/md_u.h", "SET_BITMAP_FILE", _IOC_WRITE, 0x092b, 0x04 }, +{ "linux/raid/md_u.h", "SET_DISK_FAULTY", _IOC_NONE, 0x0929, 0x00 }, +{ "linux/raid/md_u.h", "SET_DISK_INFO", _IOC_NONE, 0x0924, 0x00 }, +{ "linux/raid/md_u.h", "STOP_ARRAY", _IOC_NONE, 0x0932, 0x00 }, +{ "linux/raid/md_u.h", "STOP_ARRAY_RO", _IOC_NONE, 0x0933, 0x00 }, +{ "linux/raid/md_u.h", "UNPROTECT_ARRAY", _IOC_NONE, 0x0926, 0x00 }, +{ "linux/raid/md_u.h", "WRITE_RAID_INFO", _IOC_NONE, 0x0925, 0x00 }, +{ "linux/random.h", "RNDADDENTROPY", _IOC_WRITE, 0x5203, 0x08 }, +{ "linux/random.h", "RNDADDTOENTCNT", _IOC_WRITE, 0x5201, 0x04 }, +{ "linux/random.h", "RNDCLEARPOOL", _IOC_NONE, 0x5206, 0x00 }, +{ "linux/random.h", "RNDGETENTCNT", _IOC_READ, 0x5200, 0x04 }, +{ "linux/random.h", "RNDGETPOOL", _IOC_READ, 0x5202, 0x08 }, +{ "linux/random.h", "RNDZAPENTCNT", _IOC_NONE, 0x5204, 0x00 }, +{ "linux/raw.h", "RAW_GETBIND", _IOC_NONE, 0xac01, 0x00 }, +{ "linux/raw.h", "RAW_SETBIND", _IOC_NONE, 0xac00, 0x00 }, +{ "linux/reiserfs_fs.h", "REISERFS_IOC_UNPACK", _IOC_WRITE, 0xcd01, 0x04 }, +{ "linux/rfkill.h", "RFKILL_IOCTL_NOINPUT", _IOC_NONE, 0x5201, 0x00 }, +{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_ACCEPT", _IOC_READ|_IOC_WRITE, 0x6307, 0x08 }, +{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_BIND", _IOC_WRITE, 0x6305, 0x08 }, +{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_CLOSE", _IOC_WRITE, 0x6304, 0x02 }, +{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_CONNECT", _IOC_WRITE, 0x6308, 0x08 }, +{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_CREATE", _IOC_READ|_IOC_WRITE, 0x6303, 0x02 }, +{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_LISTEN", _IOC_WRITE, 0x6306, 0x02 }, +{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_RECEIVE", _IOC_READ|_IOC_WRITE, 0x630a, 0x10 }, +{ "linux/rio_cm_cdev.h", "RIO_CM_CHAN_SEND", _IOC_WRITE, 0x6309, 0x10 }, +{ "linux/rio_cm_cdev.h", "RIO_CM_EP_GET_LIST", _IOC_READ|_IOC_WRITE, 0x6302, 0x04 }, +{ "linux/rio_cm_cdev.h", "RIO_CM_EP_GET_LIST_SIZE", _IOC_READ|_IOC_WRITE, 0x6301, 0x04 }, +{ "linux/rio_cm_cdev.h", "RIO_CM_MPORT_GET_LIST", _IOC_READ|_IOC_WRITE, 0x630b, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_ALLOC_DMA", _IOC_READ|_IOC_WRITE, 0x6d13, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_DEV_ADD", _IOC_WRITE, 0x6d17, 0x1e }, +{ "linux/rio_mport_cdev.h", "RIO_DEV_DEL", _IOC_WRITE, 0x6d18, 0x1e }, +{ "linux/rio_mport_cdev.h", "RIO_DISABLE_DOORBELL_RANGE", _IOC_WRITE, 0x6d0a, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_DISABLE_PORTWRITE_RANGE", _IOC_WRITE, 0x6d0c, 0x10 }, +{ "linux/rio_mport_cdev.h", "RIO_ENABLE_DOORBELL_RANGE", _IOC_WRITE, 0x6d09, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_ENABLE_PORTWRITE_RANGE", _IOC_WRITE, 0x6d0b, 0x10 }, +{ "linux/rio_mport_cdev.h", "RIO_FREE_DMA", _IOC_WRITE, 0x6d14, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_GET_EVENT_MASK", _IOC_READ, 0x6d0e, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MAP_INBOUND", _IOC_READ|_IOC_WRITE, 0x6d11, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_MAP_OUTBOUND", _IOC_READ|_IOC_WRITE, 0x6d0f, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_GET_PROPERTIES", _IOC_READ, 0x6d04, 0x30 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_COMPTAG_SET", _IOC_WRITE, 0x6d02, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_HDID_SET", _IOC_WRITE, 0x6d01, 0x02 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_PORT_IDX_GET", _IOC_READ, 0x6d03, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_READ_LOCAL", _IOC_READ, 0x6d05, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_READ_REMOTE", _IOC_READ, 0x6d07, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_WRITE_LOCAL", _IOC_WRITE, 0x6d06, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_MPORT_MAINT_WRITE_REMOTE", _IOC_WRITE, 0x6d08, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_SET_EVENT_MASK", _IOC_WRITE, 0x6d0d, 0x04 }, +{ "linux/rio_mport_cdev.h", "RIO_TRANSFER", _IOC_READ|_IOC_WRITE, 0x6d15, 0x18 }, +{ "linux/rio_mport_cdev.h", "RIO_UNMAP_INBOUND", _IOC_WRITE, 0x6d12, 0x08 }, +{ "linux/rio_mport_cdev.h", "RIO_UNMAP_OUTBOUND", _IOC_WRITE, 0x6d10, 0x28 }, +{ "linux/rio_mport_cdev.h", "RIO_WAIT_FOR_ASYNC", _IOC_WRITE, 0x6d16, 0x08 }, +{ "linux/rtc.h", "RTC_AIE_OFF", _IOC_NONE, 0x7002, 0x00 }, +{ "linux/rtc.h", "RTC_AIE_ON", _IOC_NONE, 0x7001, 0x00 }, +{ "linux/rtc.h", "RTC_ALM_READ", _IOC_READ, 0x7008, 0x24 }, +{ "linux/rtc.h", "RTC_ALM_SET", _IOC_WRITE, 0x7007, 0x24 }, +{ "linux/rtc.h", "RTC_EPOCH_READ", _IOC_READ, 0x700d, 0x04 }, +{ "linux/rtc.h", "RTC_EPOCH_SET", _IOC_WRITE, 0x700e, 0x04 }, +{ "linux/rtc.h", "RTC_IRQP_READ", _IOC_READ, 0x700b, 0x04 }, +{ "linux/rtc.h", "RTC_IRQP_SET", _IOC_WRITE, 0x700c, 0x04 }, +{ "linux/rtc.h", "RTC_PIE_OFF", _IOC_NONE, 0x7006, 0x00 }, +{ "linux/rtc.h", "RTC_PIE_ON", _IOC_NONE, 0x7005, 0x00 }, +{ "linux/rtc.h", "RTC_PLL_GET", _IOC_READ, 0x7011, 0x1c }, +{ "linux/rtc.h", "RTC_PLL_SET", _IOC_WRITE, 0x7012, 0x1c }, +{ "linux/rtc.h", "RTC_RD_TIME", _IOC_READ, 0x7009, 0x24 }, +{ "linux/rtc.h", "RTC_SET_TIME", _IOC_WRITE, 0x700a, 0x24 }, +{ "linux/rtc.h", "RTC_UIE_OFF", _IOC_NONE, 0x7004, 0x00 }, +{ "linux/rtc.h", "RTC_UIE_ON", _IOC_NONE, 0x7003, 0x00 }, +{ "linux/rtc.h", "RTC_VL_CLR", _IOC_NONE, 0x7014, 0x00 }, +{ "linux/rtc.h", "RTC_VL_READ", _IOC_READ, 0x7013, 0x04 }, +{ "linux/rtc.h", "RTC_WIE_OFF", _IOC_NONE, 0x7010, 0x00 }, +{ "linux/rtc.h", "RTC_WIE_ON", _IOC_NONE, 0x700f, 0x00 }, +{ "linux/rtc.h", "RTC_WKALM_RD", _IOC_READ, 0x7010, 0x26 }, +{ "linux/rtc.h", "RTC_WKALM_SET", _IOC_WRITE, 0x700f, 0x26 }, +{ "linux/scif_ioctl.h", "SCIF_ACCEPTREG", _IOC_READ|_IOC_WRITE, 0x7305, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_ACCEPTREQ", _IOC_READ|_IOC_WRITE, 0x7304, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_BIND", _IOC_READ|_IOC_WRITE, 0x7301, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_CONNECT", _IOC_READ|_IOC_WRITE, 0x7303, 0x08 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_MARK", _IOC_READ|_IOC_WRITE, 0x730f, 0x0c }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_SIGNAL", _IOC_READ|_IOC_WRITE, 0x7311, 0x24 }, +{ "linux/scif_ioctl.h", "SCIF_FENCE_WAIT", _IOC_READ|_IOC_WRITE, 0x7310, 0x04 }, +{ "linux/scif_ioctl.h", "SCIF_GET_NODEIDS", _IOC_READ|_IOC_WRITE, 0x730e, 0x14 }, +{ "linux/scif_ioctl.h", "SCIF_LISTEN", _IOC_WRITE, 0x7302, 0x04 }, +{ "linux/scif_ioctl.h", "SCIF_READFROM", _IOC_READ|_IOC_WRITE, 0x730a, 0x24 }, +{ "linux/scif_ioctl.h", "SCIF_RECV", _IOC_READ|_IOC_WRITE, 0x7307, 0x14 }, +{ "linux/scif_ioctl.h", "SCIF_REG", _IOC_READ|_IOC_WRITE, 0x7308, 0x28 }, +{ "linux/scif_ioctl.h", "SCIF_SEND", _IOC_READ|_IOC_WRITE, 0x7306, 0x14 }, +{ "linux/scif_ioctl.h", "SCIF_UNREG", _IOC_READ|_IOC_WRITE, 0x7309, 0x10 }, +{ "linux/scif_ioctl.h", "SCIF_VREADFROM", _IOC_READ|_IOC_WRITE, 0x730c, 0x24 }, +{ "linux/scif_ioctl.h", "SCIF_VWRITETO", _IOC_READ|_IOC_WRITE, 0x730d, 0x24 }, +{ "linux/scif_ioctl.h", "SCIF_WRITETO", _IOC_READ|_IOC_WRITE, 0x730b, 0x24 }, +{ "linux/serio.h", "SPIOCSTYPE", _IOC_WRITE, 0x7101, 0x04 }, +{ "linux/sockios.h", "SIOCADDDLCI", 0, 0x8980, 0 }, +{ "linux/sockios.h", "SIOCADDMULTI", 0, 0x8931, 0 }, +{ "linux/sockios.h", "SIOCADDRT", 0, 0x890B, 0 }, +{ "linux/sockios.h", "SIOCBONDCHANGEACTIVE", 0, 0x8995, 0 }, +{ "linux/sockios.h", "SIOCBONDENSLAVE", 0, 0x8990, 0 }, +{ "linux/sockios.h", "SIOCBONDINFOQUERY", 0, 0x8994, 0 }, +{ "linux/sockios.h", "SIOCBONDRELEASE", 0, 0x8991, 0 }, +{ "linux/sockios.h", "SIOCBONDSETHWADDR", 0, 0x8992, 0 }, +{ "linux/sockios.h", "SIOCBONDSLAVEINFOQUERY", 0, 0x8993, 0 }, +{ "linux/sockios.h", "SIOCBRADDBR", 0, 0x89a0, 0 }, +{ "linux/sockios.h", "SIOCBRADDIF", 0, 0x89a2, 0 }, +{ "linux/sockios.h", "SIOCBRDELBR", 0, 0x89a1, 0 }, +{ "linux/sockios.h", "SIOCBRDELIF", 0, 0x89a3, 0 }, +{ "linux/sockios.h", "SIOCDARP", 0, 0x8953, 0 }, +{ "linux/sockios.h", "SIOCDELDLCI", 0, 0x8981, 0 }, +{ "linux/sockios.h", "SIOCDELMULTI", 0, 0x8932, 0 }, +{ "linux/sockios.h", "SIOCDELRT", 0, 0x890C, 0 }, +{ "linux/sockios.h", "SIOCDEVPRIVATE", 0, 0x89F0, 0 }, +{ "linux/sockios.h", "SIOCDIFADDR", 0, 0x8936, 0 }, +{ "linux/sockios.h", "SIOCDRARP", 0, 0x8960, 0 }, +{ "linux/sockios.h", "SIOCETHTOOL", 0, 0x8946, 0 }, +{ "linux/sockios.h", "SIOCGARP", 0, 0x8954, 0 }, +{ "linux/sockios.h", "SIOCGHWTSTAMP", 0, 0x89b1, 0 }, +{ "linux/sockios.h", "SIOCGIFADDR", 0, 0x8915, 0 }, +{ "linux/sockios.h", "SIOCGIFBR", 0, 0x8940, 0 }, +{ "linux/sockios.h", "SIOCGIFBRDADDR", 0, 0x8919, 0 }, +{ "linux/sockios.h", "SIOCGIFCONF", 0, 0x8912, 0 }, +{ "linux/sockios.h", "SIOCGIFCOUNT", 0, 0x8938, 0 }, +{ "linux/sockios.h", "SIOCGIFDSTADDR", 0, 0x8917, 0 }, +{ "linux/sockios.h", "SIOCGIFENCAP", 0, 0x8925, 0 }, +{ "linux/sockios.h", "SIOCGIFFLAGS", 0, 0x8913, 0 }, +{ "linux/sockios.h", "SIOCGIFHWADDR", 0, 0x8927, 0 }, +{ "linux/sockios.h", "SIOCGIFINDEX", 0, 0x8933, 0 }, +{ "linux/sockios.h", "SIOCGIFMAP", 0, 0x8970, 0 }, +{ "linux/sockios.h", "SIOCGIFMEM", 0, 0x891f, 0 }, +{ "linux/sockios.h", "SIOCGIFMETRIC", 0, 0x891d, 0 }, +{ "linux/sockios.h", "SIOCGIFMTU", 0, 0x8921, 0 }, +{ "linux/sockios.h", "SIOCGIFNAME", 0, 0x8910, 0 }, +{ "linux/sockios.h", "SIOCGIFNETMASK", 0, 0x891b, 0 }, +{ "linux/sockios.h", "SIOCGIFPFLAGS", 0, 0x8935, 0 }, +{ "linux/sockios.h", "SIOCGIFSLAVE", 0, 0x8929, 0 }, +{ "linux/sockios.h", "SIOCGIFTXQLEN", 0, 0x8942, 0 }, +{ "linux/sockios.h", "SIOCGIFVLAN", 0, 0x8982, 0 }, +{ "linux/sockios.h", "SIOCGMIIPHY", 0, 0x8947, 0 }, +{ "linux/sockios.h", "SIOCGMIIREG", 0, 0x8948, 0 }, +{ "linux/sockios.h", "SIOCGRARP", 0, 0x8961, 0 }, +{ "linux/sockios.h", "SIOCGSKNS", 0, 0x894C, 0 }, +{ "linux/sockios.h", "SIOCOUTQNSD", 0, 0x894B, 0 }, +{ "linux/sockios.h", "SIOCPROTOPRIVATE", 0, 0x89E0, 0 }, +{ "linux/sockios.h", "SIOCRTMSG", 0, 0x890D, 0 }, +{ "linux/sockios.h", "SIOCSARP", 0, 0x8955, 0 }, +{ "linux/sockios.h", "SIOCSHWTSTAMP", 0, 0x89b0, 0 }, +{ "linux/sockios.h", "SIOCSIFADDR", 0, 0x8916, 0 }, +{ "linux/sockios.h", "SIOCSIFBR", 0, 0x8941, 0 }, +{ "linux/sockios.h", "SIOCSIFBRDADDR", 0, 0x891a, 0 }, +{ "linux/sockios.h", "SIOCSIFDSTADDR", 0, 0x8918, 0 }, +{ "linux/sockios.h", "SIOCSIFENCAP", 0, 0x8926, 0 }, +{ "linux/sockios.h", "SIOCSIFFLAGS", 0, 0x8914, 0 }, +{ "linux/sockios.h", "SIOCSIFHWADDR", 0, 0x8924, 0 }, +{ "linux/sockios.h", "SIOCSIFHWBROADCAST", 0, 0x8937, 0 }, +{ "linux/sockios.h", "SIOCSIFLINK", 0, 0x8911, 0 }, +{ "linux/sockios.h", "SIOCSIFMAP", 0, 0x8971, 0 }, +{ "linux/sockios.h", "SIOCSIFMEM", 0, 0x8920, 0 }, +{ "linux/sockios.h", "SIOCSIFMETRIC", 0, 0x891e, 0 }, +{ "linux/sockios.h", "SIOCSIFMTU", 0, 0x8922, 0 }, +{ "linux/sockios.h", "SIOCSIFNAME", 0, 0x8923, 0 }, +{ "linux/sockios.h", "SIOCSIFNETMASK", 0, 0x891c, 0 }, +{ "linux/sockios.h", "SIOCSIFPFLAGS", 0, 0x8934, 0 }, +{ "linux/sockios.h", "SIOCSIFSLAVE", 0, 0x8930, 0 }, +{ "linux/sockios.h", "SIOCSIFTXQLEN", 0, 0x8943, 0 }, +{ "linux/sockios.h", "SIOCSIFVLAN", 0, 0x8983, 0 }, +{ "linux/sockios.h", "SIOCSMIIREG", 0, 0x8949, 0 }, +{ "linux/sockios.h", "SIOCSRARP", 0, 0x8962, 0 }, +{ "linux/sockios.h", "SIOCWANDEV", 0, 0x894A, 0 }, +{ "linux/sonet.h", "SONET_CLRDIAG", _IOC_READ|_IOC_WRITE, 0x6113, 0x04 }, +{ "linux/sonet.h", "SONET_GETDIAG", _IOC_READ, 0x6114, 0x04 }, +{ "linux/sonet.h", "SONET_GETFRAMING", _IOC_READ, 0x6116, 0x04 }, +{ "linux/sonet.h", "SONET_GETFRSENSE", _IOC_READ, 0x6117, 0x06 }, +{ "linux/sonet.h", "SONET_GETSTAT", _IOC_READ, 0x6110, 0x24 }, +{ "linux/sonet.h", "SONET_GETSTATZ", _IOC_READ, 0x6111, 0x24 }, +{ "linux/sonet.h", "SONET_SETDIAG", _IOC_READ|_IOC_WRITE, 0x6112, 0x04 }, +{ "linux/sonet.h", "SONET_SETFRAMING", _IOC_WRITE, 0x6115, 0x04 }, +{ "linux/sonypi.h", "SONYPI_IOCGBAT1CAP", _IOC_READ, 0x7602, 0x02 }, +{ "linux/sonypi.h", "SONYPI_IOCGBAT1REM", _IOC_READ, 0x7603, 0x02 }, +{ "linux/sonypi.h", "SONYPI_IOCGBAT2CAP", _IOC_READ, 0x7604, 0x02 }, +{ "linux/sonypi.h", "SONYPI_IOCGBAT2REM", _IOC_READ, 0x7605, 0x02 }, +{ "linux/sonypi.h", "SONYPI_IOCGBATFLAGS", _IOC_READ, 0x7607, 0x01 }, +{ "linux/sonypi.h", "SONYPI_IOCGBLUE", _IOC_READ, 0x7608, 0x01 }, +{ "linux/sonypi.h", "SONYPI_IOCGBRT", _IOC_READ, 0x7600, 0x01 }, +{ "linux/sonypi.h", "SONYPI_IOCGFAN", _IOC_READ, 0x760a, 0x01 }, +{ "linux/sonypi.h", "SONYPI_IOCGTEMP", _IOC_READ, 0x760c, 0x01 }, +{ "linux/sonypi.h", "SONYPI_IOCSBLUE", _IOC_WRITE, 0x7609, 0x01 }, +{ "linux/sonypi.h", "SONYPI_IOCSBRT", _IOC_WRITE, 0x7600, 0x01 }, +{ "linux/sonypi.h", "SONYPI_IOCSFAN", _IOC_WRITE, 0x760b, 0x01 }, +{ "linux/soundcard.h", "OSS_GETVERSION", _IOC_READ, 0x4d76, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_COPR_HALT", _IOC_READ|_IOC_WRITE, 0x4307, 0x14 }, +{ "linux/soundcard.h", "SNDCTL_COPR_LOAD", _IOC_READ|_IOC_WRITE, 0x4301, 0xfb0 }, +{ "linux/soundcard.h", "SNDCTL_COPR_RCODE", _IOC_READ|_IOC_WRITE, 0x4303, 0x14 }, +{ "linux/soundcard.h", "SNDCTL_COPR_RCVMSG", _IOC_READ, 0x4309, 0xfa4 }, +{ "linux/soundcard.h", "SNDCTL_COPR_RDATA", _IOC_READ|_IOC_WRITE, 0x4302, 0x14 }, +{ "linux/soundcard.h", "SNDCTL_COPR_RESET", _IOC_NONE, 0x4300, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_COPR_RUN", _IOC_READ|_IOC_WRITE, 0x4306, 0x14 }, +{ "linux/soundcard.h", "SNDCTL_COPR_SENDMSG", _IOC_READ|_IOC_WRITE, 0x4308, 0xfa4 }, +{ "linux/soundcard.h", "SNDCTL_COPR_WCODE", _IOC_WRITE, 0x4305, 0x14 }, +{ "linux/soundcard.h", "SNDCTL_COPR_WDATA", _IOC_WRITE, 0x4304, 0x14 }, +{ "linux/soundcard.h", "SNDCTL_DSP_BIND_CHANNEL", _IOC_READ|_IOC_WRITE, 0x5041, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_CHANNELS", _IOC_READ|_IOC_WRITE, 0x5006, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_GETBLKSIZE", _IOC_READ|_IOC_WRITE, 0x5004, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_GETCAPS", _IOC_READ, 0x500f, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_GETCHANNELMASK", _IOC_READ|_IOC_WRITE, 0x5040, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_GETFMTS", _IOC_READ, 0x500b, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_GETIPTR", _IOC_READ, 0x5011, 0x0c }, +{ "linux/soundcard.h", "SNDCTL_DSP_GETISPACE", _IOC_READ, 0x500d, 0x10 }, +{ "linux/soundcard.h", "SNDCTL_DSP_GETODELAY", _IOC_READ, 0x5017, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_GETOPTR", _IOC_READ, 0x5012, 0x0c }, +{ "linux/soundcard.h", "SNDCTL_DSP_GETOSPACE", _IOC_READ, 0x500c, 0x10 }, +{ "linux/soundcard.h", "SNDCTL_DSP_GETSPDIF", _IOC_READ, 0x5043, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_GETTRIGGER", _IOC_READ, 0x5010, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_MAPINBUF", _IOC_READ, 0x5013, 0x08 }, +{ "linux/soundcard.h", "SNDCTL_DSP_MAPOUTBUF", _IOC_READ, 0x5014, 0x08 }, +{ "linux/soundcard.h", "SNDCTL_DSP_NONBLOCK", _IOC_NONE, 0x500e, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_DSP_POST", _IOC_NONE, 0x5008, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_DSP_PROFILE", _IOC_WRITE, 0x5017, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_RESET", _IOC_NONE, 0x5000, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_DSP_SETDUPLEX", _IOC_NONE, 0x5016, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_DSP_SETFMT", _IOC_READ|_IOC_WRITE, 0x5005, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_SETFRAGMENT", _IOC_READ|_IOC_WRITE, 0x500a, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_SETSPDIF", _IOC_WRITE, 0x5042, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_SETSYNCRO", _IOC_NONE, 0x5015, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_DSP_SETTRIGGER", _IOC_WRITE, 0x5010, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_SPEED", _IOC_READ|_IOC_WRITE, 0x5002, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_STEREO", _IOC_READ|_IOC_WRITE, 0x5003, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_SUBDIVIDE", _IOC_READ|_IOC_WRITE, 0x5009, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_DSP_SYNC", _IOC_NONE, 0x5001, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_FM_4OP_ENABLE", _IOC_WRITE, 0x510f, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_FM_LOAD_INSTR", _IOC_WRITE, 0x5107, 0x28 }, +{ "linux/soundcard.h", "SNDCTL_MIDI_INFO", _IOC_READ|_IOC_WRITE, 0x510c, 0x72 }, +{ "linux/soundcard.h", "SNDCTL_MIDI_MPUCMD", _IOC_READ|_IOC_WRITE, 0x6d02, 0x21 }, +{ "linux/soundcard.h", "SNDCTL_MIDI_MPUMODE", _IOC_READ|_IOC_WRITE, 0x6d01, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_MIDI_PRETIME", _IOC_READ|_IOC_WRITE, 0x6d00, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_CTRLRATE", _IOC_READ|_IOC_WRITE, 0x5103, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_GETINCOUNT", _IOC_READ, 0x5105, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_GETOUTCOUNT", _IOC_READ, 0x5104, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_GETTIME", _IOC_READ, 0x5113, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_NRMIDIS", _IOC_READ, 0x510b, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_NRSYNTHS", _IOC_READ, 0x510a, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_OUTOFBAND", _IOC_WRITE, 0x5112, 0x08 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_PANIC", _IOC_NONE, 0x5111, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_PERCMODE", _IOC_WRITE, 0x5106, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_RESET", _IOC_NONE, 0x5100, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_RESETSAMPLES", _IOC_WRITE, 0x5109, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_SYNC", _IOC_NONE, 0x5101, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_TESTMIDI", _IOC_WRITE, 0x5108, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_SEQ_THRESHOLD", _IOC_WRITE, 0x510d, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_SYNTH_CONTROL", _IOC_READ|_IOC_WRITE, 0x5115, 0xfa4 }, +{ "linux/soundcard.h", "SNDCTL_SYNTH_ID", _IOC_READ|_IOC_WRITE, 0x5114, 0x8a }, +{ "linux/soundcard.h", "SNDCTL_SYNTH_INFO", _IOC_READ|_IOC_WRITE, 0x5102, 0x8a }, +{ "linux/soundcard.h", "SNDCTL_SYNTH_MEMAVL", _IOC_READ|_IOC_WRITE, 0x510e, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_SYNTH_REMOVESAMPLE", _IOC_READ|_IOC_WRITE, 0x5116, 0x0c }, +{ "linux/soundcard.h", "SNDCTL_TMR_CONTINUE", _IOC_NONE, 0x5404, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_TMR_METRONOME", _IOC_WRITE, 0x5407, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_TMR_SELECT", _IOC_WRITE, 0x5408, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_TMR_SOURCE", _IOC_READ|_IOC_WRITE, 0x5406, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_TMR_START", _IOC_NONE, 0x5402, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_TMR_STOP", _IOC_NONE, 0x5403, 0x00 }, +{ "linux/soundcard.h", "SNDCTL_TMR_TEMPO", _IOC_READ|_IOC_WRITE, 0x5405, 0x04 }, +{ "linux/soundcard.h", "SNDCTL_TMR_TIMEBASE", _IOC_READ|_IOC_WRITE, 0x5401, 0x04 }, +{ "linux/soundcard.h", "SOUND_MIXER_3DSE", _IOC_READ|_IOC_WRITE, 0x4d68, 0x04 }, +{ "linux/soundcard.h", "SOUND_MIXER_ACCESS", _IOC_READ|_IOC_WRITE, 0x4d66, 0x80 }, +{ "linux/soundcard.h", "SOUND_MIXER_AGC", _IOC_READ|_IOC_WRITE, 0x4d67, 0x04 }, +{ "linux/soundcard.h", "SOUND_MIXER_GETLEVELS", _IOC_READ|_IOC_WRITE, 0x4d74, 0xa4 }, +{ "linux/soundcard.h", "SOUND_MIXER_INFO", _IOC_READ, 0x4d65, 0x5c }, +{ "linux/soundcard.h", "SOUND_MIXER_PRIVATE1", _IOC_READ|_IOC_WRITE, 0x4d6f, 0x04 }, +{ "linux/soundcard.h", "SOUND_MIXER_PRIVATE2", _IOC_READ|_IOC_WRITE, 0x4d70, 0x04 }, +{ "linux/soundcard.h", "SOUND_MIXER_PRIVATE3", _IOC_READ|_IOC_WRITE, 0x4d71, 0x04 }, +{ "linux/soundcard.h", "SOUND_MIXER_PRIVATE4", _IOC_READ|_IOC_WRITE, 0x4d72, 0x04 }, +{ "linux/soundcard.h", "SOUND_MIXER_PRIVATE5", _IOC_READ|_IOC_WRITE, 0x4d73, 0x04 }, +{ "linux/soundcard.h", "SOUND_MIXER_SETLEVELS", _IOC_READ|_IOC_WRITE, 0x4d75, 0xa4 }, +{ "linux/soundcard.h", "SOUND_OLD_MIXER_INFO", _IOC_READ, 0x4d65, 0x30 }, +{ "linux/soundcard.h", "SOUND_PCM_READ_BITS", _IOC_READ, 0x5005, 0x04 }, +{ "linux/soundcard.h", "SOUND_PCM_READ_CHANNELS", _IOC_READ, 0x5006, 0x04 }, +{ "linux/soundcard.h", "SOUND_PCM_READ_FILTER", _IOC_READ, 0x5007, 0x04 }, +{ "linux/soundcard.h", "SOUND_PCM_READ_RATE", _IOC_READ, 0x5002, 0x04 }, +{ "linux/soundcard.h", "SOUND_PCM_WRITE_FILTER", _IOC_READ|_IOC_WRITE, 0x5007, 0x04 }, +{ "linux/spi/spidev.h", "SPI_IOC_RD_BITS_PER_WORD", _IOC_READ, 0x6b03, 0x01 }, +{ "linux/spi/spidev.h", "SPI_IOC_RD_LSB_FIRST", _IOC_READ, 0x6b02, 0x01 }, +{ "linux/spi/spidev.h", "SPI_IOC_RD_MAX_SPEED_HZ", _IOC_READ, 0x6b04, 0x04 }, +{ "linux/spi/spidev.h", "SPI_IOC_RD_MODE", _IOC_READ, 0x6b01, 0x01 }, +{ "linux/spi/spidev.h", "SPI_IOC_RD_MODE32", _IOC_READ, 0x6b05, 0x04 }, +{ "linux/spi/spidev.h", "SPI_IOC_WR_BITS_PER_WORD", _IOC_WRITE, 0x6b03, 0x01 }, +{ "linux/spi/spidev.h", "SPI_IOC_WR_LSB_FIRST", _IOC_WRITE, 0x6b02, 0x01 }, +{ "linux/spi/spidev.h", "SPI_IOC_WR_MAX_SPEED_HZ", _IOC_WRITE, 0x6b04, 0x04 }, +{ "linux/spi/spidev.h", "SPI_IOC_WR_MODE", _IOC_WRITE, 0x6b01, 0x01 }, +{ "linux/spi/spidev.h", "SPI_IOC_WR_MODE32", _IOC_WRITE, 0x6b05, 0x04 }, +{ "linux/stm.h", "STP_POLICY_ID_GET", _IOC_READ, 0x2501, 0x10 }, +{ "linux/stm.h", "STP_POLICY_ID_SET", _IOC_READ|_IOC_WRITE, 0x2500, 0x10 }, +{ "linux/stm.h", "STP_SET_OPTIONS", _IOC_WRITE, 0x2502, 0x08 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_ALLOC_SWAP_PAGE", _IOC_READ, 0x3314, 0x08 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_ATOMIC_RESTORE", _IOC_NONE, 0x3304, 0x00 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_AVAIL_SWAP_SIZE", _IOC_READ, 0x3313, 0x08 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_CREATE_IMAGE", _IOC_WRITE, 0x3311, 0x04 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_FREE", _IOC_NONE, 0x3305, 0x00 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_FREEZE", _IOC_NONE, 0x3301, 0x00 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_FREE_SWAP_PAGES", _IOC_NONE, 0x3309, 0x00 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_GET_IMAGE_SIZE", _IOC_READ, 0x330e, 0x08 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_PLATFORM_SUPPORT", _IOC_NONE, 0x330f, 0x00 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_POWER_OFF", _IOC_NONE, 0x3310, 0x00 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_PREF_IMAGE_SIZE", _IOC_NONE, 0x3312, 0x00 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_S2RAM", _IOC_NONE, 0x330b, 0x00 }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_SET_SWAP_AREA", _IOC_WRITE, 0x330d, 0x0c }, +{ "linux/suspend_ioctls.h", "SNAPSHOT_UNFREEZE", _IOC_NONE, 0x3302, 0x00 }, +{ "linux/sync_file.h", "SYNC_IOC_FILE_INFO", _IOC_READ|_IOC_WRITE, 0x3e04, 0x38 }, +{ "linux/sync_file.h", "SYNC_IOC_MERGE", _IOC_READ|_IOC_WRITE, 0x3e03, 0x30 }, +{ "linux/synclink.h", "MGSL_IOCCLRMODCOUNT", _IOC_NONE, 0x6d0f, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCGGPIO", _IOC_READ, 0x6d11, 0x10 }, +{ "linux/synclink.h", "MGSL_IOCGIF", _IOC_NONE, 0x6d0b, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCGPARAMS", _IOC_READ, 0x6d01, 0x1c }, +{ "linux/synclink.h", "MGSL_IOCGSTATS", _IOC_NONE, 0x6d07, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCGTXIDLE", _IOC_NONE, 0x6d03, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCGXCTRL", _IOC_NONE, 0x6d16, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCGXSYNC", _IOC_NONE, 0x6d14, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCLOOPTXDONE", _IOC_NONE, 0x6d09, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCRXENABLE", _IOC_NONE, 0x6d05, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCSGPIO", _IOC_WRITE, 0x6d10, 0x10 }, +{ "linux/synclink.h", "MGSL_IOCSIF", _IOC_NONE, 0x6d0a, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCSPARAMS", _IOC_WRITE, 0x6d00, 0x1c }, +{ "linux/synclink.h", "MGSL_IOCSTXIDLE", _IOC_NONE, 0x6d02, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCSXCTRL", _IOC_NONE, 0x6d15, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCSXSYNC", _IOC_NONE, 0x6d13, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCTXABORT", _IOC_NONE, 0x6d06, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCTXENABLE", _IOC_NONE, 0x6d04, 0x00 }, +{ "linux/synclink.h", "MGSL_IOCWAITEVENT", _IOC_READ|_IOC_WRITE, 0x6d08, 0x04 }, +{ "linux/synclink.h", "MGSL_IOCWAITGPIO", _IOC_READ|_IOC_WRITE, 0x6d12, 0x10 }, +{ "linux/telephony.h", "OLD_PHONE_RING_START", _IOC_NONE, 0x7187, 0x00 }, +{ "linux/telephony.h", "PHONE_BUSY", _IOC_NONE, 0x71a1, 0x00 }, +{ "linux/telephony.h", "PHONE_CAPABILITIES", _IOC_NONE, 0x7180, 0x00 }, +{ "linux/telephony.h", "PHONE_CAPABILITIES_CHECK", _IOC_WRITE, 0x7182, 0x04 }, +{ "linux/telephony.h", "PHONE_CAPABILITIES_LIST", _IOC_READ, 0x7181, 0x04 }, +{ "linux/telephony.h", "PHONE_CPT_STOP", _IOC_NONE, 0x71a4, 0x00 }, +{ "linux/telephony.h", "PHONE_DIALTONE", _IOC_NONE, 0x71a3, 0x00 }, +{ "linux/telephony.h", "PHONE_DTMF_OOB", _IOC_WRITE, 0x7199, 0x04 }, +{ "linux/telephony.h", "PHONE_DTMF_READY", _IOC_READ, 0x7196, 0x04 }, +{ "linux/telephony.h", "PHONE_EXCEPTION", _IOC_READ, 0x719a, 0x04 }, +{ "linux/telephony.h", "PHONE_FRAME", _IOC_WRITE, 0x718d, 0x04 }, +{ "linux/telephony.h", "PHONE_GET_DTMF", _IOC_READ, 0x7197, 0x04 }, +{ "linux/telephony.h", "PHONE_GET_DTMF_ASCII", _IOC_READ, 0x7198, 0x04 }, +{ "linux/telephony.h", "PHONE_GET_TONE_OFF_TIME", _IOC_NONE, 0x719f, 0x00 }, +{ "linux/telephony.h", "PHONE_GET_TONE_ON_TIME", _IOC_NONE, 0x719e, 0x00 }, +{ "linux/telephony.h", "PHONE_GET_TONE_STATE", _IOC_NONE, 0x71a0, 0x00 }, +{ "linux/telephony.h", "PHONE_HOOKSTATE", _IOC_NONE, 0x7184, 0x00 }, +{ "linux/telephony.h", "PHONE_MAXRINGS", _IOC_WRITE, 0x7185, 0x01 }, +{ "linux/telephony.h", "PHONE_PLAY_CODEC", _IOC_WRITE, 0x7190, 0x04 }, +{ "linux/telephony.h", "PHONE_PLAY_DEPTH", _IOC_WRITE, 0x7193, 0x04 }, +{ "linux/telephony.h", "PHONE_PLAY_LEVEL", _IOC_NONE, 0x7195, 0x00 }, +{ "linux/telephony.h", "PHONE_PLAY_START", _IOC_NONE, 0x7191, 0x00 }, +{ "linux/telephony.h", "PHONE_PLAY_STOP", _IOC_NONE, 0x7192, 0x00 }, +{ "linux/telephony.h", "PHONE_PLAY_TONE", _IOC_WRITE, 0x719b, 0x01 }, +{ "linux/telephony.h", "PHONE_PLAY_VOLUME", _IOC_WRITE, 0x7194, 0x04 }, +{ "linux/telephony.h", "PHONE_PLAY_VOLUME_LINEAR", _IOC_WRITE, 0x71dc, 0x04 }, +{ "linux/telephony.h", "PHONE_PSTN_GET_STATE", _IOC_NONE, 0x71a5, 0x00 }, +{ "linux/telephony.h", "PHONE_PSTN_LINETEST", _IOC_NONE, 0x71a8, 0x00 }, +{ "linux/telephony.h", "PHONE_PSTN_SET_STATE", _IOC_WRITE, 0x71a4, 0x04 }, +{ "linux/telephony.h", "PHONE_QUERY_CODEC", _IOC_READ|_IOC_WRITE, 0x71a7, 0x04 }, +{ "linux/telephony.h", "PHONE_REC_CODEC", _IOC_WRITE, 0x7189, 0x04 }, +{ "linux/telephony.h", "PHONE_REC_DEPTH", _IOC_WRITE, 0x718c, 0x04 }, +{ "linux/telephony.h", "PHONE_REC_LEVEL", _IOC_NONE, 0x718f, 0x00 }, +{ "linux/telephony.h", "PHONE_REC_START", _IOC_NONE, 0x718a, 0x00 }, +{ "linux/telephony.h", "PHONE_REC_STOP", _IOC_NONE, 0x718b, 0x00 }, +{ "linux/telephony.h", "PHONE_REC_VOLUME", _IOC_WRITE, 0x718e, 0x04 }, +{ "linux/telephony.h", "PHONE_REC_VOLUME_LINEAR", _IOC_WRITE, 0x71db, 0x04 }, +{ "linux/telephony.h", "PHONE_RING", _IOC_NONE, 0x7183, 0x00 }, +{ "linux/telephony.h", "PHONE_RINGBACK", _IOC_NONE, 0x71a2, 0x00 }, +{ "linux/telephony.h", "PHONE_RING_CADENCE", _IOC_WRITE, 0x7186, 0x02 }, +{ "linux/telephony.h", "PHONE_RING_START", _IOC_WRITE, 0x7187, 0x04 }, +{ "linux/telephony.h", "PHONE_RING_STOP", _IOC_NONE, 0x7188, 0x00 }, +{ "linux/telephony.h", "PHONE_SET_TONE_OFF_TIME", _IOC_WRITE, 0x719d, 0x04 }, +{ "linux/telephony.h", "PHONE_SET_TONE_ON_TIME", _IOC_WRITE, 0x719c, 0x04 }, +{ "linux/telephony.h", "PHONE_VAD", _IOC_WRITE, 0x71a9, 0x04 }, +{ "linux/telephony.h", "PHONE_WINK", _IOC_WRITE, 0x71aa, 0x04 }, +{ "linux/telephony.h", "PHONE_WINK_DURATION", _IOC_WRITE, 0x71a6, 0x04 }, +{ "linux/timerfd.h", "TFD_IOC_SET_TICKS", _IOC_WRITE, 0x5400, 0x08 }, +{ "linux/toshiba.h", "TOSHIBA_ACPI_SCI", _IOC_READ|_IOC_WRITE, 0x7491, 0x18 }, +{ "linux/toshiba.h", "TOSH_SMM", _IOC_READ|_IOC_WRITE, 0x7490, 0x18 }, +{ "linux/udf_fs_i.h", "UDF_GETEABLOCK", _IOC_READ, 0x6c41, 0x04 }, +{ "linux/udf_fs_i.h", "UDF_GETEASIZE", _IOC_READ, 0x6c40, 0x04 }, +{ "linux/udf_fs_i.h", "UDF_GETVOLIDENT", _IOC_READ, 0x6c42, 0x04 }, +{ "linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", _IOC_READ|_IOC_WRITE, 0x6c43, 0x04 }, +{ "linux/uinput.h", "UI_ABS_SETUP", _IOC_WRITE, 0x5504, 0x1a }, +{ "linux/uinput.h", "UI_BEGIN_FF_ERASE", _IOC_READ|_IOC_WRITE, 0x55ca, 0x0c }, +{ "linux/uinput.h", "UI_BEGIN_FF_UPLOAD", _IOC_READ|_IOC_WRITE, 0x55c8, 0x58 }, +{ "linux/uinput.h", "UI_DEV_CREATE", _IOC_NONE, 0x5501, 0x00 }, +{ "linux/uinput.h", "UI_DEV_DESTROY", _IOC_NONE, 0x5502, 0x00 }, +{ "linux/uinput.h", "UI_DEV_SETUP", _IOC_WRITE, 0x5503, 0x5c }, +{ "linux/uinput.h", "UI_END_FF_ERASE", _IOC_WRITE, 0x55cb, 0x0c }, +{ "linux/uinput.h", "UI_END_FF_UPLOAD", _IOC_WRITE, 0x55c9, 0x58 }, +{ "linux/uinput.h", "UI_GET_VERSION", _IOC_READ, 0x552d, 0x04 }, +{ "linux/uinput.h", "UI_SET_ABSBIT", _IOC_WRITE, 0x5567, 0x04 }, +{ "linux/uinput.h", "UI_SET_EVBIT", _IOC_WRITE, 0x5564, 0x04 }, +{ "linux/uinput.h", "UI_SET_FFBIT", _IOC_WRITE, 0x556b, 0x04 }, +{ "linux/uinput.h", "UI_SET_KEYBIT", _IOC_WRITE, 0x5565, 0x04 }, +{ "linux/uinput.h", "UI_SET_LEDBIT", _IOC_WRITE, 0x5569, 0x04 }, +{ "linux/uinput.h", "UI_SET_MSCBIT", _IOC_WRITE, 0x5568, 0x04 }, +{ "linux/uinput.h", "UI_SET_PHYS", _IOC_WRITE, 0x556c, 0x04 }, +{ "linux/uinput.h", "UI_SET_PROPBIT", _IOC_WRITE, 0x556e, 0x04 }, +{ "linux/uinput.h", "UI_SET_RELBIT", _IOC_WRITE, 0x5566, 0x04 }, +{ "linux/uinput.h", "UI_SET_SNDBIT", _IOC_WRITE, 0x556a, 0x04 }, +{ "linux/uinput.h", "UI_SET_SWBIT", _IOC_WRITE, 0x556d, 0x04 }, +{ "linux/usb/cdc-wdm.h", "IOCTL_WDM_MAX_COMMAND", _IOC_READ, 0x48a0, 0x02 }, +{ "linux/usb/functionfs.h", "FUNCTIONFS_CLEAR_HALT", _IOC_NONE, 0x6703, 0x00 }, +{ "linux/usb/functionfs.h", "FUNCTIONFS_ENDPOINT_DESC", _IOC_READ, 0x6782, 0x09 }, +{ "linux/usb/functionfs.h", "FUNCTIONFS_ENDPOINT_REVMAP", _IOC_NONE, 0x6781, 0x00 }, +{ "linux/usb/functionfs.h", "FUNCTIONFS_FIFO_FLUSH", _IOC_NONE, 0x6702, 0x00 }, +{ "linux/usb/functionfs.h", "FUNCTIONFS_FIFO_STATUS", _IOC_NONE, 0x6701, 0x00 }, +{ "linux/usb/functionfs.h", "FUNCTIONFS_INTERFACE_REVMAP", _IOC_NONE, 0x6780, 0x00 }, +{ "linux/usb/g_printer.h", "GADGET_GET_PRINTER_STATUS", _IOC_READ, 0x6721, 0x01 }, +{ "linux/usb/g_printer.h", "GADGET_SET_PRINTER_STATUS", _IOC_READ|_IOC_WRITE, 0x6722, 0x01 }, +{ "linux/usb/gadgetfs.h", "GADGETFS_CLEAR_HALT", _IOC_NONE, 0x6703, 0x00 }, +{ "linux/usb/gadgetfs.h", "GADGETFS_FIFO_FLUSH", _IOC_NONE, 0x6702, 0x00 }, +{ "linux/usb/gadgetfs.h", "GADGETFS_FIFO_STATUS", _IOC_NONE, 0x6701, 0x00 }, +{ "linux/usb/iowarrior.h", "IOW_GETINFO", _IOC_READ, 0xc003, 0x26 }, +{ "linux/usb/iowarrior.h", "IOW_READ", _IOC_WRITE, 0xc002, 0x04 }, +{ "linux/usb/iowarrior.h", "IOW_WRITE", _IOC_WRITE, 0xc001, 0x04 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_GET_CAPS", _IOC_READ, 0x5b11, 0x01 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_GOTO_LOCAL", _IOC_NONE, 0x5b14, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_LOCAL_LOCKOUT", _IOC_NONE, 0x5b15, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_READ_STB", _IOC_READ, 0x5b12, 0x01 }, +{ "linux/usb/tmc.h", "USBTMC488_IOCTL_REN_CONTROL", _IOC_WRITE, 0x5b13, 0x01 }, +{ "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_IN", _IOC_NONE, 0x5b04, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC_IOCTL_ABORT_BULK_OUT", _IOC_NONE, 0x5b03, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR", _IOC_NONE, 0x5b02, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_IN_HALT", _IOC_NONE, 0x5b07, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC_IOCTL_CLEAR_OUT_HALT", _IOC_NONE, 0x5b06, 0x00 }, +{ "linux/usb/tmc.h", "USBTMC_IOCTL_INDICATOR_PULSE", _IOC_NONE, 0x5b01, 0x00 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_ALLOC_STREAMS", _IOC_READ, 0x551c, 0x08 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_BULK", _IOC_READ|_IOC_WRITE, 0x5502, 0x10 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_BULK32", _IOC_READ|_IOC_WRITE, 0x5502, 0x10 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_CLAIMINTERFACE", _IOC_READ, 0x550f, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_CLAIM_PORT", _IOC_READ, 0x5518, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_CLEAR_HALT", _IOC_READ, 0x5515, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_CONNECT", _IOC_NONE, 0x5517, 0x00 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_CONNECTINFO", _IOC_WRITE, 0x5511, 0x06 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_CONTROL", _IOC_READ|_IOC_WRITE, 0x5500, 0x10 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_CONTROL32", _IOC_READ|_IOC_WRITE, 0x5500, 0x10 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_DISCARDURB", _IOC_NONE, 0x550b, 0x00 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_DISCONNECT", _IOC_NONE, 0x5516, 0x00 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_DISCONNECT_CLAIM", _IOC_READ, 0x551b, 0x108 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL", _IOC_READ, 0x550e, 0x08 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_DISCSIGNAL32", _IOC_READ, 0x550e, 0x08 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_DROP_PRIVILEGES", _IOC_WRITE, 0x551e, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_FREE_STREAMS", _IOC_READ, 0x551d, 0x08 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_GETDRIVER", _IOC_WRITE, 0x5508, 0x104 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_GET_CAPABILITIES", _IOC_READ, 0x551a, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_HUB_PORTINFO", _IOC_READ, 0x5513, 0x80 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_IOCTL", _IOC_READ|_IOC_WRITE, 0x5512, 0x0c }, +{ "linux/usbdevice_fs.h", "USBDEVFS_IOCTL32", _IOC_READ|_IOC_WRITE, 0x5512, 0x0c }, +{ "linux/usbdevice_fs.h", "USBDEVFS_REAPURB", _IOC_WRITE, 0x550c, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_REAPURB32", _IOC_WRITE, 0x550c, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_REAPURBNDELAY", _IOC_WRITE, 0x550d, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_REAPURBNDELAY32", _IOC_WRITE, 0x550d, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_RELEASEINTERFACE", _IOC_READ, 0x5510, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_RELEASE_PORT", _IOC_READ, 0x5519, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_RESET", _IOC_NONE, 0x5514, 0x00 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_RESETEP", _IOC_READ, 0x5503, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_SETCONFIGURATION", _IOC_READ, 0x5505, 0x04 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_SETINTERFACE", _IOC_READ, 0x5504, 0x08 }, +{ "linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB", _IOC_READ, 0x550a, 0x2a }, +{ "linux/usbdevice_fs.h", "USBDEVFS_SUBMITURB32", _IOC_READ, 0x550a, 0x2a }, +{ "linux/userfaultfd.h", "UFFDIO_API", _IOC_READ|_IOC_WRITE, 0xaa3f, 0x18 }, +{ "linux/userfaultfd.h", "UFFDIO_COPY", _IOC_READ|_IOC_WRITE, 0xaa03, 0x28 }, +{ "linux/userfaultfd.h", "UFFDIO_REGISTER", _IOC_READ|_IOC_WRITE, 0xaa00, 0x20 }, +{ "linux/userfaultfd.h", "UFFDIO_UNREGISTER", _IOC_READ, 0xaa01, 0x10 }, +{ "linux/userfaultfd.h", "UFFDIO_WAKE", _IOC_READ, 0xaa02, 0x10 }, +{ "linux/userfaultfd.h", "UFFDIO_ZEROPAGE", _IOC_READ|_IOC_WRITE, 0xaa04, 0x20 }, +{ "linux/uvcvideo.h", "UVCIOC_CTRL_MAP", _IOC_READ|_IOC_WRITE, 0x7520, 0x58 }, +{ "linux/uvcvideo.h", "UVCIOC_CTRL_QUERY", _IOC_READ|_IOC_WRITE, 0x7521, 0x0a }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_DV_TIMINGS_CAP", _IOC_READ|_IOC_WRITE, 0x5664, 0x90 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_ENUM_DV_TIMINGS", _IOC_READ|_IOC_WRITE, 0x5662, 0x94 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL", _IOC_READ|_IOC_WRITE, 0x564b, 0x40 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_ENUM_FRAME_SIZE", _IOC_READ|_IOC_WRITE, 0x564a, 0x40 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_ENUM_MBUS_CODE", _IOC_READ|_IOC_WRITE, 0x5602, 0x30 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_G_CROP", _IOC_READ|_IOC_WRITE, 0x563b, 0x38 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_G_DV_TIMINGS", _IOC_READ|_IOC_WRITE, 0x5658, 0x84 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_G_EDID", _IOC_READ|_IOC_WRITE, 0x5628, 0x24 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_G_FMT", _IOC_READ|_IOC_WRITE, 0x5604, 0x58 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_G_FRAME_INTERVAL", _IOC_READ|_IOC_WRITE, 0x5615, 0x30 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_G_SELECTION", _IOC_READ|_IOC_WRITE, 0x563d, 0x40 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_QUERY_DV_TIMINGS", _IOC_READ, 0x5663, 0x84 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_CROP", _IOC_READ|_IOC_WRITE, 0x563c, 0x38 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_DV_TIMINGS", _IOC_READ|_IOC_WRITE, 0x5657, 0x84 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_EDID", _IOC_READ|_IOC_WRITE, 0x5629, 0x24 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_FMT", _IOC_READ|_IOC_WRITE, 0x5605, 0x58 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_FRAME_INTERVAL", _IOC_READ|_IOC_WRITE, 0x5616, 0x30 }, +{ "linux/v4l2-subdev.h", "VIDIOC_SUBDEV_S_SELECTION", _IOC_READ|_IOC_WRITE, 0x563e, 0x40 }, +{ "linux/vfio.h", "VFIO_CHECK_EXTENSION", _IOC_NONE, 0x3b65, 0x00 }, +{ "linux/vfio.h", "VFIO_DEVICE_GET_INFO", _IOC_NONE, 0x3b6b, 0x00 }, +{ "linux/vfio.h", "VFIO_DEVICE_GET_IRQ_INFO", _IOC_NONE, 0x3b6d, 0x00 }, +{ "linux/vfio.h", "VFIO_DEVICE_GET_PCI_HOT_RESET_INFO", _IOC_NONE, 0x3b70, 0x00 }, +{ "linux/vfio.h", "VFIO_DEVICE_GET_REGION_INFO", _IOC_NONE, 0x3b6c, 0x00 }, +{ "linux/vfio.h", "VFIO_DEVICE_PCI_HOT_RESET", _IOC_NONE, 0x3b71, 0x00 }, +{ "linux/vfio.h", "VFIO_DEVICE_RESET", _IOC_NONE, 0x3b6f, 0x00 }, +{ "linux/vfio.h", "VFIO_DEVICE_SET_IRQS", _IOC_NONE, 0x3b6e, 0x00 }, +{ "linux/vfio.h", "VFIO_EEH_PE_OP", _IOC_NONE, 0x3b79, 0x00 }, +{ "linux/vfio.h", "VFIO_GET_API_VERSION", _IOC_NONE, 0x3b64, 0x00 }, +{ "linux/vfio.h", "VFIO_GROUP_GET_DEVICE_FD", _IOC_NONE, 0x3b6a, 0x00 }, +{ "linux/vfio.h", "VFIO_GROUP_GET_STATUS", _IOC_NONE, 0x3b67, 0x00 }, +{ "linux/vfio.h", "VFIO_GROUP_SET_CONTAINER", _IOC_NONE, 0x3b68, 0x00 }, +{ "linux/vfio.h", "VFIO_GROUP_UNSET_CONTAINER", _IOC_NONE, 0x3b69, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_DISABLE", _IOC_NONE, 0x3b74, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_ENABLE", _IOC_NONE, 0x3b73, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_GET_INFO", _IOC_NONE, 0x3b70, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_MAP_DMA", _IOC_NONE, 0x3b71, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_REGISTER_MEMORY", _IOC_NONE, 0x3b75, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_CREATE", _IOC_NONE, 0x3b77, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_GET_INFO", _IOC_NONE, 0x3b70, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_TCE_REMOVE", _IOC_NONE, 0x3b78, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY", _IOC_NONE, 0x3b76, 0x00 }, +{ "linux/vfio.h", "VFIO_IOMMU_UNMAP_DMA", _IOC_NONE, 0x3b72, 0x00 }, +{ "linux/vfio.h", "VFIO_SET_IOMMU", _IOC_NONE, 0x3b66, 0x00 }, +{ "linux/vhost.h", "VHOST_GET_FEATURES", _IOC_READ, 0xaf00, 0x08 }, +{ "linux/vhost.h", "VHOST_GET_VRING_BASE", _IOC_READ|_IOC_WRITE, 0xaf12, 0x08 }, +{ "linux/vhost.h", "VHOST_GET_VRING_BUSYLOOP_TIMEOUT", _IOC_WRITE, 0xaf24, 0x08 }, +{ "linux/vhost.h", "VHOST_GET_VRING_ENDIAN", _IOC_WRITE, 0xaf14, 0x08 }, +{ "linux/vhost.h", "VHOST_NET_SET_BACKEND", _IOC_WRITE, 0xaf30, 0x08 }, +{ "linux/vhost.h", "VHOST_RESET_OWNER", _IOC_NONE, 0xaf02, 0x00 }, +{ "linux/vhost.h", "VHOST_SCSI_CLEAR_ENDPOINT", _IOC_WRITE, 0xaf41, 0xe8 }, +{ "linux/vhost.h", "VHOST_SCSI_GET_ABI_VERSION", _IOC_WRITE, 0xaf42, 0x04 }, +{ "linux/vhost.h", "VHOST_SCSI_GET_EVENTS_MISSED", _IOC_WRITE, 0xaf44, 0x04 }, +{ "linux/vhost.h", "VHOST_SCSI_SET_ENDPOINT", _IOC_WRITE, 0xaf40, 0xe8 }, +{ "linux/vhost.h", "VHOST_SCSI_SET_EVENTS_MISSED", _IOC_WRITE, 0xaf43, 0x04 }, +{ "linux/vhost.h", "VHOST_SET_FEATURES", _IOC_WRITE, 0xaf00, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_LOG_BASE", _IOC_WRITE, 0xaf04, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_LOG_FD", _IOC_WRITE, 0xaf07, 0x04 }, +{ "linux/vhost.h", "VHOST_SET_MEM_TABLE", _IOC_WRITE, 0xaf03, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_OWNER", _IOC_NONE, 0xaf01, 0x00 }, +{ "linux/vhost.h", "VHOST_SET_VRING_ADDR", _IOC_WRITE, 0xaf11, 0x28 }, +{ "linux/vhost.h", "VHOST_SET_VRING_BASE", _IOC_WRITE, 0xaf12, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_BUSYLOOP_TIMEOUT", _IOC_WRITE, 0xaf23, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_CALL", _IOC_WRITE, 0xaf21, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_ENDIAN", _IOC_WRITE, 0xaf13, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_ERR", _IOC_WRITE, 0xaf22, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_KICK", _IOC_WRITE, 0xaf20, 0x08 }, +{ "linux/vhost.h", "VHOST_SET_VRING_NUM", _IOC_WRITE, 0xaf10, 0x08 }, +{ "linux/vhost.h", "VHOST_VSOCK_SET_GUEST_CID", _IOC_WRITE, 0xaf60, 0x08 }, +{ "linux/vhost.h", "VHOST_VSOCK_SET_RUNNING", _IOC_WRITE, 0xaf61, 0x04 }, +{ "linux/videodev2.h", "VIDIOC_CREATE_BUFS", _IOC_READ|_IOC_WRITE, 0x565c, 0xf8 }, +{ "linux/videodev2.h", "VIDIOC_CROPCAP", _IOC_READ|_IOC_WRITE, 0x563a, 0x2c }, +{ "linux/videodev2.h", "VIDIOC_DBG_G_CHIP_INFO", _IOC_READ|_IOC_WRITE, 0x5666, 0xc8 }, +{ "linux/videodev2.h", "VIDIOC_DBG_G_REGISTER", _IOC_READ|_IOC_WRITE, 0x5650, 0x38 }, +{ "linux/videodev2.h", "VIDIOC_DBG_S_REGISTER", _IOC_WRITE, 0x564f, 0x38 }, +{ "linux/videodev2.h", "VIDIOC_DECODER_CMD", _IOC_READ|_IOC_WRITE, 0x5660, 0x48 }, +{ "linux/videodev2.h", "VIDIOC_DQBUF", _IOC_READ|_IOC_WRITE, 0x5611, 0x44 }, +{ "linux/videodev2.h", "VIDIOC_DQEVENT", _IOC_READ, 0x5659, 0x78 }, +{ "linux/videodev2.h", "VIDIOC_DV_TIMINGS_CAP", _IOC_READ|_IOC_WRITE, 0x5664, 0x90 }, +{ "linux/videodev2.h", "VIDIOC_ENCODER_CMD", _IOC_READ|_IOC_WRITE, 0x564d, 0x28 }, +{ "linux/videodev2.h", "VIDIOC_ENUMAUDIO", _IOC_READ|_IOC_WRITE, 0x5641, 0x34 }, +{ "linux/videodev2.h", "VIDIOC_ENUMAUDOUT", _IOC_READ|_IOC_WRITE, 0x5642, 0x34 }, +{ "linux/videodev2.h", "VIDIOC_ENUMINPUT", _IOC_READ|_IOC_WRITE, 0x561a, 0x4c }, +{ "linux/videodev2.h", "VIDIOC_ENUMOUTPUT", _IOC_READ|_IOC_WRITE, 0x5630, 0x48 }, +{ "linux/videodev2.h", "VIDIOC_ENUMSTD", _IOC_READ|_IOC_WRITE, 0x5619, 0x40 }, +{ "linux/videodev2.h", "VIDIOC_ENUM_DV_TIMINGS", _IOC_READ|_IOC_WRITE, 0x5662, 0x94 }, +{ "linux/videodev2.h", "VIDIOC_ENUM_FMT", _IOC_READ|_IOC_WRITE, 0x5602, 0x40 }, +{ "linux/videodev2.h", "VIDIOC_ENUM_FRAMEINTERVALS", _IOC_READ|_IOC_WRITE, 0x564b, 0x34 }, +{ "linux/videodev2.h", "VIDIOC_ENUM_FRAMESIZES", _IOC_READ|_IOC_WRITE, 0x564a, 0x2c }, +{ "linux/videodev2.h", "VIDIOC_ENUM_FREQ_BANDS", _IOC_READ|_IOC_WRITE, 0x5665, 0x40 }, +{ "linux/videodev2.h", "VIDIOC_EXPBUF", _IOC_READ|_IOC_WRITE, 0x5610, 0x40 }, +{ "linux/videodev2.h", "VIDIOC_G_AUDIO", _IOC_READ, 0x5621, 0x34 }, +{ "linux/videodev2.h", "VIDIOC_G_AUDOUT", _IOC_READ, 0x5631, 0x34 }, +{ "linux/videodev2.h", "VIDIOC_G_CROP", _IOC_READ|_IOC_WRITE, 0x563b, 0x14 }, +{ "linux/videodev2.h", "VIDIOC_G_CTRL", _IOC_READ|_IOC_WRITE, 0x561b, 0x08 }, +{ "linux/videodev2.h", "VIDIOC_G_DV_TIMINGS", _IOC_READ|_IOC_WRITE, 0x5658, 0x84 }, +{ "linux/videodev2.h", "VIDIOC_G_EDID", _IOC_READ|_IOC_WRITE, 0x5628, 0x24 }, +{ "linux/videodev2.h", "VIDIOC_G_ENC_INDEX", _IOC_READ, 0x564c, 0x818 }, +{ "linux/videodev2.h", "VIDIOC_G_EXT_CTRLS", _IOC_READ|_IOC_WRITE, 0x5647, 0x18 }, +{ "linux/videodev2.h", "VIDIOC_G_FBUF", _IOC_READ, 0x560a, 0x2c }, +{ "linux/videodev2.h", "VIDIOC_G_FMT", _IOC_READ|_IOC_WRITE, 0x5604, 0xcc }, +{ "linux/videodev2.h", "VIDIOC_G_FREQUENCY", _IOC_READ|_IOC_WRITE, 0x5638, 0x2c }, +{ "linux/videodev2.h", "VIDIOC_G_INPUT", _IOC_READ, 0x5626, 0x04 }, +{ "linux/videodev2.h", "VIDIOC_G_JPEGCOMP", _IOC_READ, 0x563d, 0x8c }, +{ "linux/videodev2.h", "VIDIOC_G_MODULATOR", _IOC_READ|_IOC_WRITE, 0x5636, 0x44 }, +{ "linux/videodev2.h", "VIDIOC_G_OUTPUT", _IOC_READ, 0x562e, 0x04 }, +{ "linux/videodev2.h", "VIDIOC_G_PARM", _IOC_READ|_IOC_WRITE, 0x5615, 0xcc }, +{ "linux/videodev2.h", "VIDIOC_G_PRIORITY", _IOC_READ, 0x5643, 0x04 }, +{ "linux/videodev2.h", "VIDIOC_G_SELECTION", _IOC_READ|_IOC_WRITE, 0x565e, 0x40 }, +{ "linux/videodev2.h", "VIDIOC_G_SLICED_VBI_CAP", _IOC_READ|_IOC_WRITE, 0x5645, 0x72 }, +{ "linux/videodev2.h", "VIDIOC_G_STD", _IOC_READ, 0x5617, 0x08 }, +{ "linux/videodev2.h", "VIDIOC_G_TUNER", _IOC_READ|_IOC_WRITE, 0x561d, 0x54 }, +{ "linux/videodev2.h", "VIDIOC_LOG_STATUS", _IOC_NONE, 0x5646, 0x00 }, +{ "linux/videodev2.h", "VIDIOC_OVERLAY", _IOC_WRITE, 0x560e, 0x04 }, +{ "linux/videodev2.h", "VIDIOC_PREPARE_BUF", _IOC_READ|_IOC_WRITE, 0x565d, 0x44 }, +{ "linux/videodev2.h", "VIDIOC_QBUF", _IOC_READ|_IOC_WRITE, 0x560f, 0x44 }, +{ "linux/videodev2.h", "VIDIOC_QUERYBUF", _IOC_READ|_IOC_WRITE, 0x5609, 0x44 }, +{ "linux/videodev2.h", "VIDIOC_QUERYCAP", _IOC_READ, 0x5600, 0x68 }, +{ "linux/videodev2.h", "VIDIOC_QUERYCTRL", _IOC_READ|_IOC_WRITE, 0x5624, 0x44 }, +{ "linux/videodev2.h", "VIDIOC_QUERYMENU", _IOC_READ|_IOC_WRITE, 0x5625, 0x2c }, +{ "linux/videodev2.h", "VIDIOC_QUERYSTD", _IOC_READ, 0x563f, 0x08 }, +{ "linux/videodev2.h", "VIDIOC_QUERY_DV_TIMINGS", _IOC_READ, 0x5663, 0x84 }, +{ "linux/videodev2.h", "VIDIOC_QUERY_EXT_CTRL", _IOC_READ|_IOC_WRITE, 0x5667, 0xe8 }, +{ "linux/videodev2.h", "VIDIOC_REQBUFS", _IOC_READ|_IOC_WRITE, 0x5608, 0x14 }, +{ "linux/videodev2.h", "VIDIOC_RESERVED", _IOC_NONE, 0x5601, 0x00 }, +{ "linux/videodev2.h", "VIDIOC_STREAMOFF", _IOC_WRITE, 0x5613, 0x04 }, +{ "linux/videodev2.h", "VIDIOC_STREAMON", _IOC_WRITE, 0x5612, 0x04 }, +{ "linux/videodev2.h", "VIDIOC_SUBSCRIBE_EVENT", _IOC_WRITE, 0x565a, 0x20 }, +{ "linux/videodev2.h", "VIDIOC_S_AUDIO", _IOC_WRITE, 0x5622, 0x34 }, +{ "linux/videodev2.h", "VIDIOC_S_AUDOUT", _IOC_WRITE, 0x5632, 0x34 }, +{ "linux/videodev2.h", "VIDIOC_S_CROP", _IOC_WRITE, 0x563c, 0x14 }, +{ "linux/videodev2.h", "VIDIOC_S_CTRL", _IOC_READ|_IOC_WRITE, 0x561c, 0x08 }, +{ "linux/videodev2.h", "VIDIOC_S_DV_TIMINGS", _IOC_READ|_IOC_WRITE, 0x5657, 0x84 }, +{ "linux/videodev2.h", "VIDIOC_S_EDID", _IOC_READ|_IOC_WRITE, 0x5629, 0x24 }, +{ "linux/videodev2.h", "VIDIOC_S_EXT_CTRLS", _IOC_READ|_IOC_WRITE, 0x5648, 0x18 }, +{ "linux/videodev2.h", "VIDIOC_S_FBUF", _IOC_WRITE, 0x560b, 0x2c }, +{ "linux/videodev2.h", "VIDIOC_S_FMT", _IOC_READ|_IOC_WRITE, 0x5605, 0xcc }, +{ "linux/videodev2.h", "VIDIOC_S_FREQUENCY", _IOC_WRITE, 0x5639, 0x2c }, +{ "linux/videodev2.h", "VIDIOC_S_HW_FREQ_SEEK", _IOC_WRITE, 0x5652, 0x30 }, +{ "linux/videodev2.h", "VIDIOC_S_INPUT", _IOC_READ|_IOC_WRITE, 0x5627, 0x04 }, +{ "linux/videodev2.h", "VIDIOC_S_JPEGCOMP", _IOC_WRITE, 0x563e, 0x8c }, +{ "linux/videodev2.h", "VIDIOC_S_MODULATOR", _IOC_WRITE, 0x5637, 0x44 }, +{ "linux/videodev2.h", "VIDIOC_S_OUTPUT", _IOC_READ|_IOC_WRITE, 0x562f, 0x04 }, +{ "linux/videodev2.h", "VIDIOC_S_PARM", _IOC_READ|_IOC_WRITE, 0x5616, 0xcc }, +{ "linux/videodev2.h", "VIDIOC_S_PRIORITY", _IOC_WRITE, 0x5644, 0x04 }, +{ "linux/videodev2.h", "VIDIOC_S_SELECTION", _IOC_READ|_IOC_WRITE, 0x565f, 0x40 }, +{ "linux/videodev2.h", "VIDIOC_S_STD", _IOC_WRITE, 0x5618, 0x08 }, +{ "linux/videodev2.h", "VIDIOC_S_TUNER", _IOC_WRITE, 0x561e, 0x54 }, +{ "linux/videodev2.h", "VIDIOC_TRY_DECODER_CMD", _IOC_READ|_IOC_WRITE, 0x5661, 0x48 }, +{ "linux/videodev2.h", "VIDIOC_TRY_ENCODER_CMD", _IOC_READ|_IOC_WRITE, 0x564e, 0x28 }, +{ "linux/videodev2.h", "VIDIOC_TRY_EXT_CTRLS", _IOC_READ|_IOC_WRITE, 0x5649, 0x18 }, +{ "linux/videodev2.h", "VIDIOC_TRY_FMT", _IOC_READ|_IOC_WRITE, 0x5640, 0xcc }, +{ "linux/videodev2.h", "VIDIOC_UNSUBSCRIBE_EVENT", _IOC_WRITE, 0x565b, 0x20 }, +{ "linux/vm_sockets.h", "IOCTL_VM_SOCKETS_GET_LOCAL_CID", _IOC_NONE, 0x07b9, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_CTX_ADD_NOTIFICATION", _IOC_NONE, 0x07af, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_CTX_GET_CPT_STATE", _IOC_NONE, 0x07b1, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_CTX_REMOVE_NOTIFICATION", _IOC_NONE, 0x07b0, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_CTX_SET_CPT_STATE", _IOC_NONE, 0x07b2, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_DATAGRAM_RECEIVE", _IOC_NONE, 0x07ac, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_DATAGRAM_SEND", _IOC_NONE, 0x07ab, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_GET_CONTEXT_ID", _IOC_NONE, 0x07b3, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_INIT_CONTEXT", _IOC_NONE, 0x07a0, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_NOTIFICATIONS_RECEIVE", _IOC_NONE, 0x07a6, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_NOTIFY_RESOURCE", _IOC_NONE, 0x07a5, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_QUEUEPAIR_ALLOC", _IOC_NONE, 0x07a8, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_QUEUEPAIR_DETACH", _IOC_NONE, 0x07aa, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_QUEUEPAIR_SETPAGEFILE", _IOC_NONE, 0x07a9, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_QUEUEPAIR_SETVA", _IOC_NONE, 0x07a4, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_SET_NOTIFY", _IOC_NONE, 0x07cb, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_SOCKETS_GET_AF_VALUE", _IOC_NONE, 0x07b8, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_SOCKETS_GET_LOCAL_CID", _IOC_NONE, 0x07b9, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_SOCKETS_VERSION", _IOC_NONE, 0x07b4, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_VERSION", _IOC_NONE, 0x079f, 0x00 }, +{ "linux/vmw_vmci_defs.h", "IOCTL_VMCI_VERSION2", _IOC_NONE, 0x07a7, 0x00 }, +{ "linux/vt.h", "VT_ACTIVATE", 0, 0x5606, 0 }, +{ "linux/vt.h", "VT_DISALLOCATE", 0, 0x5608, 0 }, +{ "linux/vt.h", "VT_GETHIFONTMASK", 0, 0x560D, 0 }, +{ "linux/vt.h", "VT_GETMODE", 0, 0x5601, 0 }, +{ "linux/vt.h", "VT_GETSTATE", 0, 0x5603, 0 }, +{ "linux/vt.h", "VT_LOCKSWITCH", 0, 0x560B, 0 }, +{ "linux/vt.h", "VT_OPENQRY", 0, 0x5600, 0 }, +{ "linux/vt.h", "VT_RELDISP", 0, 0x5605, 0 }, +{ "linux/vt.h", "VT_RESIZE", 0, 0x5609, 0 }, +{ "linux/vt.h", "VT_RESIZEX", 0, 0x560A, 0 }, +{ "linux/vt.h", "VT_SENDSIG", 0, 0x5604, 0 }, +{ "linux/vt.h", "VT_SETACTIVATE", 0, 0x560F, 0 }, +{ "linux/vt.h", "VT_SETMODE", 0, 0x5602, 0 }, +{ "linux/vt.h", "VT_UNLOCKSWITCH", 0, 0x560C, 0 }, +{ "linux/vt.h", "VT_WAITACTIVE", 0, 0x5607, 0 }, +{ "linux/vt.h", "VT_WAITEVENT", 0, 0x560E, 0 }, +{ "linux/vtpm_proxy.h", "VTPM_PROXY_IOC_NEW_DEV", _IOC_READ|_IOC_WRITE, 0xa100, 0x14 }, +{ "linux/watchdog.h", "WDIOC_GETBOOTSTATUS", _IOC_READ, 0x5702, 0x04 }, +{ "linux/watchdog.h", "WDIOC_GETPRETIMEOUT", _IOC_READ, 0x5709, 0x04 }, +{ "linux/watchdog.h", "WDIOC_GETSTATUS", _IOC_READ, 0x5701, 0x04 }, +{ "linux/watchdog.h", "WDIOC_GETSUPPORT", _IOC_READ, 0x5700, 0x28 }, +{ "linux/watchdog.h", "WDIOC_GETTEMP", _IOC_READ, 0x5703, 0x04 }, +{ "linux/watchdog.h", "WDIOC_GETTIMELEFT", _IOC_READ, 0x570a, 0x04 }, +{ "linux/watchdog.h", "WDIOC_GETTIMEOUT", _IOC_READ, 0x5707, 0x04 }, +{ "linux/watchdog.h", "WDIOC_KEEPALIVE", _IOC_READ, 0x5705, 0x04 }, +{ "linux/watchdog.h", "WDIOC_SETOPTIONS", _IOC_READ, 0x5704, 0x04 }, +{ "linux/watchdog.h", "WDIOC_SETPRETIMEOUT", _IOC_READ|_IOC_WRITE, 0x5708, 0x04 }, +{ "linux/watchdog.h", "WDIOC_SETTIMEOUT", _IOC_READ|_IOC_WRITE, 0x5706, 0x04 }, +{ "linux/wireless.h", "SIOCGIWAP", 0, 0x8B15, 0 }, +{ "linux/wireless.h", "SIOCGIWAPLIST", 0, 0x8B17, 0 }, +{ "linux/wireless.h", "SIOCGIWAUTH", 0, 0x8B33, 0 }, +{ "linux/wireless.h", "SIOCGIWENCODE", 0, 0x8B2B, 0 }, +{ "linux/wireless.h", "SIOCGIWENCODEEXT", 0, 0x8B35, 0 }, +{ "linux/wireless.h", "SIOCGIWESSID", 0, 0x8B1B, 0 }, +{ "linux/wireless.h", "SIOCGIWFRAG", 0, 0x8B25, 0 }, +{ "linux/wireless.h", "SIOCGIWFREQ", 0, 0x8B05, 0 }, +{ "linux/wireless.h", "SIOCGIWGENIE", 0, 0x8B31, 0 }, +{ "linux/wireless.h", "SIOCGIWMODE", 0, 0x8B07, 0 }, +{ "linux/wireless.h", "SIOCGIWNAME", 0, 0x8B01, 0 }, +{ "linux/wireless.h", "SIOCGIWNICKN", 0, 0x8B1D, 0 }, +{ "linux/wireless.h", "SIOCGIWNWID", 0, 0x8B03, 0 }, +{ "linux/wireless.h", "SIOCGIWPOWER", 0, 0x8B2D, 0 }, +{ "linux/wireless.h", "SIOCGIWPRIV", 0, 0x8B0D, 0 }, +{ "linux/wireless.h", "SIOCGIWRANGE", 0, 0x8B0B, 0 }, +{ "linux/wireless.h", "SIOCGIWRATE", 0, 0x8B21, 0 }, +{ "linux/wireless.h", "SIOCGIWRETRY", 0, 0x8B29, 0 }, +{ "linux/wireless.h", "SIOCGIWRTS", 0, 0x8B23, 0 }, +{ "linux/wireless.h", "SIOCGIWSCAN", 0, 0x8B19, 0 }, +{ "linux/wireless.h", "SIOCGIWSENS", 0, 0x8B09, 0 }, +{ "linux/wireless.h", "SIOCGIWSPY", 0, 0x8B11, 0 }, +{ "linux/wireless.h", "SIOCGIWSTATS", 0, 0x8B0F, 0 }, +{ "linux/wireless.h", "SIOCGIWTHRSPY", 0, 0x8B13, 0 }, +{ "linux/wireless.h", "SIOCGIWTXPOW", 0, 0x8B27, 0 }, +{ "linux/wireless.h", "SIOCIWFIRST", 0, 0x8B00, 0 }, +{ "linux/wireless.h", "SIOCIWFIRSTPRIV", 0, 0x8BE0, 0 }, +{ "linux/wireless.h", "SIOCIWLASTPRIV", 0, 0x8BFF, 0 }, +{ "linux/wireless.h", "SIOCSIWAP", 0, 0x8B14, 0 }, +{ "linux/wireless.h", "SIOCSIWAUTH", 0, 0x8B32, 0 }, +{ "linux/wireless.h", "SIOCSIWCOMMIT", 0, 0x8B00, 0 }, +{ "linux/wireless.h", "SIOCSIWENCODE", 0, 0x8B2A, 0 }, +{ "linux/wireless.h", "SIOCSIWENCODEEXT", 0, 0x8B34, 0 }, +{ "linux/wireless.h", "SIOCSIWESSID", 0, 0x8B1A, 0 }, +{ "linux/wireless.h", "SIOCSIWFRAG", 0, 0x8B24, 0 }, +{ "linux/wireless.h", "SIOCSIWFREQ", 0, 0x8B04, 0 }, +{ "linux/wireless.h", "SIOCSIWGENIE", 0, 0x8B30, 0 }, +{ "linux/wireless.h", "SIOCSIWMLME", 0, 0x8B16, 0 }, +{ "linux/wireless.h", "SIOCSIWMODE", 0, 0x8B06, 0 }, +{ "linux/wireless.h", "SIOCSIWNICKN", 0, 0x8B1C, 0 }, +{ "linux/wireless.h", "SIOCSIWNWID", 0, 0x8B02, 0 }, +{ "linux/wireless.h", "SIOCSIWPMKSA", 0, 0x8B36, 0 }, +{ "linux/wireless.h", "SIOCSIWPOWER", 0, 0x8B2C, 0 }, +{ "linux/wireless.h", "SIOCSIWPRIV", 0, 0x8B0C, 0 }, +{ "linux/wireless.h", "SIOCSIWRANGE", 0, 0x8B0A, 0 }, +{ "linux/wireless.h", "SIOCSIWRATE", 0, 0x8B20, 0 }, +{ "linux/wireless.h", "SIOCSIWRETRY", 0, 0x8B28, 0 }, +{ "linux/wireless.h", "SIOCSIWRTS", 0, 0x8B22, 0 }, +{ "linux/wireless.h", "SIOCSIWSCAN", 0, 0x8B18, 0 }, +{ "linux/wireless.h", "SIOCSIWSENS", 0, 0x8B08, 0 }, +{ "linux/wireless.h", "SIOCSIWSPY", 0, 0x8B10, 0 }, +{ "linux/wireless.h", "SIOCSIWSTATS", 0, 0x8B0E, 0 }, +{ "linux/wireless.h", "SIOCSIWTHRSPY", 0, 0x8B12, 0 }, +{ "linux/wireless.h", "SIOCSIWTXPOW", 0, 0x8B26, 0 }, +{ "media/davinci/vpfe_capture.h", "VPFE_CMD_S_CCDC_RAW_PARAMS", _IOC_WRITE, 0x56c1, 0x04 }, +{ "media/drv-intf/exynos-fimc.h", "S5P_FIMC_TX_END_NOTIFY", _IOC_NONE, 0x6500, 0x00 }, +{ "media/i2c/adv7842.h", "ADV7842_CMD_RAM_TEST", _IOC_NONE, 0x56c0, 0x00 }, +{ "media/i2c/bt819.h", "BT819_FIFO_RESET_HIGH", _IOC_NONE, 0x6201, 0x00 }, +{ "media/i2c/bt819.h", "BT819_FIFO_RESET_LOW", _IOC_NONE, 0x6200, 0x00 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_CLOSE", _IOC_WRITE, 0x5202, 0x04 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_POLL", _IOC_READ, 0x5204, 0x04 }, +{ "media/i2c/saa6588.h", "SAA6588_CMD_READ", _IOC_READ, 0x5203, 0x04 }, +{ "media/v4l2-common.h", "TUNER_SET_CONFIG", _IOC_WRITE, 0x645c, 0x08 }, +{ "media/v4l2-common.h", "VIDIOC_INT_RESET", _IOC_WRITE, 0x6466, 0x04 }, +{ "media/v4l2-subdev.h", "V4L2_DEVICE_NOTIFY_EVENT", _IOC_WRITE, 0x7602, 0x78 }, +{ "media/v4l2-subdev.h", "V4L2_SUBDEV_IR_RX_NOTIFY", _IOC_WRITE, 0x7600, 0x04 }, +{ "media/v4l2-subdev.h", "V4L2_SUBDEV_IR_TX_NOTIFY", _IOC_WRITE, 0x7601, 0x04 }, +{ "misc/cxl.h", "CXL_IOCTL_DOWNLOAD_IMAGE", _IOC_WRITE, 0xca0a, 0x40 }, +{ "misc/cxl.h", "CXL_IOCTL_GET_AFU_ID", _IOC_READ, 0xca02, 0x40 }, +{ "misc/cxl.h", "CXL_IOCTL_GET_PROCESS_ELEMENT", _IOC_READ, 0xca01, 0x04 }, +{ "misc/cxl.h", "CXL_IOCTL_START_WORK", _IOC_WRITE, 0xca00, 0x40 }, +{ "misc/cxl.h", "CXL_IOCTL_VALIDATE_IMAGE", _IOC_WRITE, 0xca0b, 0x40 }, +{ "mtd/mtd-abi.h", "ECCGETLAYOUT", _IOC_READ, 0x4d11, 0x148 }, +{ "mtd/mtd-abi.h", "ECCGETSTATS", _IOC_READ, 0x4d12, 0x10 }, +{ "mtd/mtd-abi.h", "MEMERASE", _IOC_WRITE, 0x4d02, 0x08 }, +{ "mtd/mtd-abi.h", "MEMERASE64", _IOC_WRITE, 0x4d14, 0x10 }, +{ "mtd/mtd-abi.h", "MEMGETBADBLOCK", _IOC_WRITE, 0x4d0b, 0x08 }, +{ "mtd/mtd-abi.h", "MEMGETINFO", _IOC_READ, 0x4d01, 0x1e }, +{ "mtd/mtd-abi.h", "MEMGETOOBSEL", _IOC_READ, 0x4d0a, 0xc8 }, +{ "mtd/mtd-abi.h", "MEMGETREGIONCOUNT", _IOC_READ, 0x4d07, 0x04 }, +{ "mtd/mtd-abi.h", "MEMGETREGIONINFO", _IOC_READ|_IOC_WRITE, 0x4d08, 0x10 }, +{ "mtd/mtd-abi.h", "MEMISLOCKED", _IOC_READ, 0x4d17, 0x08 }, +{ "mtd/mtd-abi.h", "MEMLOCK", _IOC_WRITE, 0x4d05, 0x08 }, +{ "mtd/mtd-abi.h", "MEMREADOOB", _IOC_READ|_IOC_WRITE, 0x4d04, 0x0c }, +{ "mtd/mtd-abi.h", "MEMREADOOB64", _IOC_READ|_IOC_WRITE, 0x4d16, 0x18 }, +{ "mtd/mtd-abi.h", "MEMSETBADBLOCK", _IOC_WRITE, 0x4d0c, 0x08 }, +{ "mtd/mtd-abi.h", "MEMUNLOCK", _IOC_WRITE, 0x4d06, 0x08 }, +{ "mtd/mtd-abi.h", "MEMWRITE", _IOC_READ|_IOC_WRITE, 0x4d18, 0x30 }, +{ "mtd/mtd-abi.h", "MEMWRITEOOB", _IOC_READ|_IOC_WRITE, 0x4d03, 0x0c }, +{ "mtd/mtd-abi.h", "MEMWRITEOOB64", _IOC_READ|_IOC_WRITE, 0x4d15, 0x18 }, +{ "mtd/mtd-abi.h", "MTDFILEMODE", _IOC_NONE, 0x4d13, 0x00 }, +{ "mtd/mtd-abi.h", "OTPGETREGIONCOUNT", _IOC_WRITE, 0x4d0e, 0x04 }, +{ "mtd/mtd-abi.h", "OTPGETREGIONINFO", _IOC_WRITE, 0x4d0f, 0x0c }, +{ "mtd/mtd-abi.h", "OTPLOCK", _IOC_READ, 0x4d10, 0x0c }, +{ "mtd/mtd-abi.h", "OTPSELECT", _IOC_READ, 0x4d0d, 0x04 }, +{ "mtd/ubi-user.h", "UBI_IOCATT", _IOC_WRITE, 0x6f40, 0x18 }, +{ "mtd/ubi-user.h", "UBI_IOCDET", _IOC_WRITE, 0x6f41, 0x04 }, +{ "mtd/ubi-user.h", "UBI_IOCEBCH", _IOC_WRITE, 0x4f02, 0x04 }, +{ "mtd/ubi-user.h", "UBI_IOCEBER", _IOC_WRITE, 0x4f01, 0x04 }, +{ "mtd/ubi-user.h", "UBI_IOCEBISMAP", _IOC_READ, 0x4f05, 0x04 }, +{ "mtd/ubi-user.h", "UBI_IOCEBMAP", _IOC_WRITE, 0x4f03, 0x08 }, +{ "mtd/ubi-user.h", "UBI_IOCEBUNMAP", _IOC_WRITE, 0x4f04, 0x04 }, +{ "mtd/ubi-user.h", "UBI_IOCMKVOL", _IOC_WRITE, 0x6f00, 0x98 }, +{ "mtd/ubi-user.h", "UBI_IOCRMVOL", _IOC_WRITE, 0x6f01, 0x04 }, +{ "mtd/ubi-user.h", "UBI_IOCRNVOL", _IOC_WRITE, 0x6f03, 0x1110 }, +{ "mtd/ubi-user.h", "UBI_IOCRSVOL", _IOC_WRITE, 0x6f02, 0x0c }, +{ "mtd/ubi-user.h", "UBI_IOCSETVOLPROP", _IOC_WRITE, 0x4f06, 0x10 }, +{ "mtd/ubi-user.h", "UBI_IOCVOLCRBLK", _IOC_WRITE, 0x4f07, 0x80 }, +{ "mtd/ubi-user.h", "UBI_IOCVOLRMBLK", _IOC_NONE, 0x4f08, 0x00 }, +{ "mtd/ubi-user.h", "UBI_IOCVOLUP", _IOC_WRITE, 0x4f00, 0x08 }, +{ "net/bluetooth/hci_sock.h", "HCIBLOCKADDR", _IOC_WRITE, 0x48e6, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCIDEVDOWN", _IOC_WRITE, 0x48ca, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCIDEVRESET", _IOC_WRITE, 0x48cb, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCIDEVRESTAT", _IOC_WRITE, 0x48cc, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCIDEVUP", _IOC_WRITE, 0x48c9, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCIGETAUTHINFO", _IOC_READ, 0x48d7, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCIGETCONNINFO", _IOC_READ, 0x48d5, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCIGETCONNLIST", _IOC_READ, 0x48d4, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCIGETDEVINFO", _IOC_READ, 0x48d3, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCIGETDEVLIST", _IOC_READ, 0x48d2, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCIINQUIRY", _IOC_READ, 0x48f0, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCISETACLMTU", _IOC_WRITE, 0x48e3, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCISETAUTH", _IOC_WRITE, 0x48de, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCISETENCRYPT", _IOC_WRITE, 0x48df, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCISETLINKMODE", _IOC_WRITE, 0x48e2, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCISETLINKPOL", _IOC_WRITE, 0x48e1, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCISETPTYPE", _IOC_WRITE, 0x48e0, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCISETRAW", _IOC_WRITE, 0x48dc, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCISETSCAN", _IOC_WRITE, 0x48dd, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCISETSCOMTU", _IOC_WRITE, 0x48e4, 0x04 }, +{ "net/bluetooth/hci_sock.h", "HCIUNBLOCKADDR", _IOC_WRITE, 0x48e7, 0x04 }, +{ "net/bluetooth/rfcomm.h", "RFCOMMCREATEDEV", _IOC_WRITE, 0x52c8, 0x04 }, +{ "net/bluetooth/rfcomm.h", "RFCOMMGETDEVINFO", _IOC_READ, 0x52d3, 0x04 }, +{ "net/bluetooth/rfcomm.h", "RFCOMMGETDEVLIST", _IOC_READ, 0x52d2, 0x04 }, +{ "net/bluetooth/rfcomm.h", "RFCOMMRELEASEDEV", _IOC_WRITE, 0x52c9, 0x04 }, +{ "net/bluetooth/rfcomm.h", "RFCOMMSTEALDLC", _IOC_WRITE, 0x52dc, 0x04 }, +{ "net/nfc/nci_core.h", "NCIUARTSETDRIVER", _IOC_WRITE, 0x5500, 0x04 }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_ACK_EVENT", _IOC_WRITE, 0x1bea, 0x04 }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_ASSIGN_CTXT", _IOC_READ|_IOC_WRITE, 0x1be1, 0x1c }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_CREDIT_UPD", _IOC_NONE, 0x1be6, 0x00 }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_CTXT_INFO", _IOC_WRITE, 0x1be2, 0x26 }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_CTXT_RESET", _IOC_NONE, 0x1bec, 0x00 }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_GET_VERS", _IOC_READ, 0x1bee, 0x04 }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_POLL_TYPE", _IOC_WRITE, 0x1be9, 0x04 }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_RECV_CTRL", _IOC_WRITE, 0x1be8, 0x04 }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_SET_PKEY", _IOC_WRITE, 0x1beb, 0x02 }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_TID_FREE", _IOC_READ|_IOC_WRITE, 0x1be5, 0x18 }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_TID_INVAL_READ", _IOC_READ|_IOC_WRITE, 0x1bed, 0x18 }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_TID_UPDATE", _IOC_READ|_IOC_WRITE, 0x1be4, 0x18 }, +{ "rdma/hfi/hfi1_user.h", "HFI1_IOCTL_USER_INFO", _IOC_WRITE, 0x1be3, 0x78 }, +{ "rdma/ib_user_mad.h", "IB_USER_MAD_ENABLE_PKEY", _IOC_NONE, 0x1b03, 0x00 }, +{ "rdma/ib_user_mad.h", "IB_USER_MAD_REGISTER_AGENT", _IOC_READ|_IOC_WRITE, 0x1b01, 0x1c }, +{ "rdma/ib_user_mad.h", "IB_USER_MAD_REGISTER_AGENT2", _IOC_READ|_IOC_WRITE, 0x1b04, 0x28 }, +{ "rdma/ib_user_mad.h", "IB_USER_MAD_UNREGISTER_AGENT", _IOC_WRITE, 0x1b02, 0x04 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_ATTACH", _IOC_READ|_IOC_WRITE, 0xca80, 0x90 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_DETACH", _IOC_READ|_IOC_WRITE, 0xca83, 0x60 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_MANAGE_LUN", _IOC_READ|_IOC_WRITE, 0xca86, 0x68 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_RECOVER_AFU", _IOC_READ|_IOC_WRITE, 0xca85, 0x78 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_RELEASE", _IOC_READ|_IOC_WRITE, 0xca82, 0x68 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_USER_DIRECT", _IOC_READ|_IOC_WRITE, 0xca81, 0x70 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_USER_VIRTUAL", _IOC_READ|_IOC_WRITE, 0xca87, 0x78 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VERIFY", _IOC_READ|_IOC_WRITE, 0xca84, 0x90 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VLUN_CLONE", _IOC_READ|_IOC_WRITE, 0xca89, 0x70 }, +{ "scsi/cxlflash_ioctl.h", "DK_CXLFLASH_VLUN_RESIZE", _IOC_READ|_IOC_WRITE, 0xca88, 0x78 }, +{ "scsi/scsi.h", "SCSI_IOCTL_GET_BUS_NUMBER", 0, 0x5386, 0 }, +{ "scsi/scsi.h", "SCSI_IOCTL_GET_IDLUN", 0, 0x5382, 0 }, +{ "scsi/scsi.h", "SCSI_IOCTL_GET_PCI", 0, 0x5387, 0 }, +{ "scsi/scsi.h", "SCSI_IOCTL_PROBE_HOST", 0, 0x5385, 0 }, +{ "scsi/scsi_ioctl.h", "SCSI_IOCTL_DOORLOCK", 0, 0x5380, 0 }, +{ "scsi/scsi_ioctl.h", "SCSI_IOCTL_DOORUNLOCK", 0, 0x5381, 0 }, +{ "scsi/sg.h", "SG_EMULATED_HOST", 0, 0x2203, 0 }, +{ "scsi/sg.h", "SG_GET_ACCESS_COUNT", 0, 0x2289, 0 }, +{ "scsi/sg.h", "SG_GET_COMMAND_Q", 0, 0x2270, 0 }, +{ "scsi/sg.h", "SG_GET_KEEP_ORPHAN", 0, 0x2288, 0 }, +{ "scsi/sg.h", "SG_GET_LOW_DMA", 0, 0x227a, 0 }, +{ "scsi/sg.h", "SG_GET_NUM_WAITING", 0, 0x227d, 0 }, +{ "scsi/sg.h", "SG_GET_PACK_ID", 0, 0x227c, 0 }, +{ "scsi/sg.h", "SG_GET_REQUEST_TABLE", 0, 0x2286, 0 }, +{ "scsi/sg.h", "SG_GET_RESERVED_SIZE", 0, 0x2272, 0 }, +{ "scsi/sg.h", "SG_GET_SCSI_ID", 0, 0x2276, 0 }, +{ "scsi/sg.h", "SG_GET_SG_TABLESIZE", 0, 0x227F, 0 }, +{ "scsi/sg.h", "SG_GET_TIMEOUT", 0, 0x2202, 0 }, +{ "scsi/sg.h", "SG_GET_TRANSFORM", 0, 0x2205, 0 }, +{ "scsi/sg.h", "SG_GET_VERSION_NUM", 0, 0x2282, 0 }, +{ "scsi/sg.h", "SG_IO", 0, 0x2285, 0 }, +{ "scsi/sg.h", "SG_NEXT_CMD_LEN", 0, 0x2283, 0 }, +{ "scsi/sg.h", "SG_SCSI_RESET", 0, 0x2284, 0 }, +{ "scsi/sg.h", "SG_SET_COMMAND_Q", 0, 0x2271, 0 }, +{ "scsi/sg.h", "SG_SET_DEBUG", 0, 0x227e, 0 }, +{ "scsi/sg.h", "SG_SET_FORCE_LOW_DMA", 0, 0x2279, 0 }, +{ "scsi/sg.h", "SG_SET_FORCE_PACK_ID", 0, 0x227b, 0 }, +{ "scsi/sg.h", "SG_SET_KEEP_ORPHAN", 0, 0x2287, 0 }, +{ "scsi/sg.h", "SG_SET_RESERVED_SIZE", 0, 0x2275, 0 }, +{ "scsi/sg.h", "SG_SET_TIMEOUT", 0, 0x2201, 0 }, +{ "scsi/sg.h", "SG_SET_TRANSFORM", 0, 0x2204, 0 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_CLIENT_ID", _IOC_READ, 0x5301, 0x04 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_CREATE_PORT", _IOC_READ|_IOC_WRITE, 0x5320, 0xa2 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_CREATE_QUEUE", _IOC_READ|_IOC_WRITE, 0x5332, 0x8a }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_DELETE_PORT", _IOC_WRITE, 0x5321, 0xa2 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_DELETE_QUEUE", _IOC_WRITE, 0x5333, 0x8a }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_CLIENT_INFO", _IOC_READ|_IOC_WRITE, 0x5310, 0xbc }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_CLIENT_POOL", _IOC_READ|_IOC_WRITE, 0x534b, 0x58 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE", _IOC_READ|_IOC_WRITE, 0x5336, 0x8a }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_PORT_INFO", _IOC_READ|_IOC_WRITE, 0x5322, 0xa2 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT", _IOC_READ|_IOC_WRITE, 0x5349, 0x4c }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_INFO", _IOC_READ|_IOC_WRITE, 0x5334, 0x8a }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS", _IOC_READ|_IOC_WRITE, 0x5340, 0x5c }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO", _IOC_READ|_IOC_WRITE, 0x5341, 0x2c }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER", _IOC_READ|_IOC_WRITE, 0x5345, 0x60 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION", _IOC_READ|_IOC_WRITE, 0x5350, 0x50 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_PVERSION", _IOC_READ, 0x5300, 0x04 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT", _IOC_READ|_IOC_WRITE, 0x5351, 0xbc }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT", _IOC_READ|_IOC_WRITE, 0x5352, 0xa2 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_QUERY_SUBS", _IOC_READ|_IOC_WRITE, 0x534f, 0x56 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_REMOVE_EVENTS", _IOC_WRITE, 0x534e, 0x3e }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_RUNNING_MODE", _IOC_READ|_IOC_WRITE, 0x5303, 0x10 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_CLIENT_INFO", _IOC_WRITE, 0x5311, 0xbc }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_CLIENT_POOL", _IOC_WRITE, 0x534c, 0x58 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_PORT_INFO", _IOC_WRITE, 0x5323, 0xa2 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT", _IOC_WRITE, 0x534a, 0x4c }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_INFO", _IOC_READ|_IOC_WRITE, 0x5335, 0x8a }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO", _IOC_WRITE, 0x5342, 0x2c }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER", _IOC_WRITE, 0x5346, 0x60 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT", _IOC_WRITE, 0x5330, 0x50 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_SYSTEM_INFO", _IOC_READ|_IOC_WRITE, 0x5302, 0x30 }, +{ "sound/asequencer.h", "SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT", _IOC_WRITE, 0x5331, 0x50 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_CARD_INFO", _IOC_READ, 0x5501, 0x178 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_ADD", _IOC_READ|_IOC_WRITE, 0x5517, 0x110 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_INFO", _IOC_READ|_IOC_WRITE, 0x5511, 0x110 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_LIST", _IOC_READ|_IOC_WRITE, 0x5510, 0x46 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_LOCK", _IOC_WRITE, 0x5514, 0x40 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_READ", _IOC_READ|_IOC_WRITE, 0x5512, 0x2c2 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_REMOVE", _IOC_READ|_IOC_WRITE, 0x5519, 0x40 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_REPLACE", _IOC_READ|_IOC_WRITE, 0x5518, 0x110 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_UNLOCK", _IOC_WRITE, 0x5515, 0x40 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_ELEM_WRITE", _IOC_READ|_IOC_WRITE, 0x5513, 0x2c2 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_HWDEP_INFO", _IOC_READ, 0x5521, 0xdc }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE", _IOC_READ|_IOC_WRITE, 0x5520, 0x04 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_PCM_INFO", _IOC_READ|_IOC_WRITE, 0x5531, 0x120 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE", _IOC_READ, 0x5530, 0x04 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE", _IOC_WRITE, 0x5532, 0x04 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_POWER", _IOC_READ|_IOC_WRITE, 0x55d0, 0x04 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_POWER_STATE", _IOC_READ, 0x55d1, 0x04 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_PVERSION", _IOC_READ, 0x5500, 0x04 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_RAWMIDI_INFO", _IOC_READ|_IOC_WRITE, 0x5541, 0x10c }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE", _IOC_READ|_IOC_WRITE, 0x5540, 0x04 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE", _IOC_WRITE, 0x5542, 0x04 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS", _IOC_READ|_IOC_WRITE, 0x5516, 0x04 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_TLV_COMMAND", _IOC_READ|_IOC_WRITE, 0x551c, 0x08 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_TLV_READ", _IOC_READ|_IOC_WRITE, 0x551a, 0x08 }, +{ "sound/asound.h", "SNDRV_CTL_IOCTL_TLV_WRITE", _IOC_READ|_IOC_WRITE, 0x551b, 0x08 }, +{ "sound/asound.h", "SNDRV_HWDEP_IOCTL_DSP_LOAD", _IOC_WRITE, 0x4803, 0x50 }, +{ "sound/asound.h", "SNDRV_HWDEP_IOCTL_DSP_STATUS", _IOC_READ, 0x4802, 0x40 }, +{ "sound/asound.h", "SNDRV_HWDEP_IOCTL_INFO", _IOC_READ, 0x4801, 0xdc }, +{ "sound/asound.h", "SNDRV_HWDEP_IOCTL_PVERSION", _IOC_READ, 0x4800, 0x04 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_CHANNEL_INFO", _IOC_READ, 0x4132, 0x10 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_DELAY", _IOC_READ, 0x4121, 0x04 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_DRAIN", _IOC_NONE, 0x4144, 0x00 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_DROP", _IOC_NONE, 0x4143, 0x00 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_FORWARD", _IOC_WRITE, 0x4149, 0x04 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_HWSYNC", _IOC_NONE, 0x4122, 0x00 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_HW_FREE", _IOC_NONE, 0x4112, 0x00 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_HW_PARAMS", _IOC_READ|_IOC_WRITE, 0x4111, 0x232 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_HW_REFINE", _IOC_READ|_IOC_WRITE, 0x4110, 0x232 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_INFO", _IOC_READ, 0x4101, 0x120 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_LINK", _IOC_WRITE, 0x4160, 0x04 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_PAUSE", _IOC_WRITE, 0x4145, 0x04 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_PREPARE", _IOC_NONE, 0x4140, 0x00 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_PVERSION", _IOC_READ, 0x4100, 0x04 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_READI_FRAMES", _IOC_READ, 0x4151, 0x0c }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_READN_FRAMES", _IOC_READ, 0x4153, 0x0c }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_RESET", _IOC_NONE, 0x4141, 0x00 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_RESUME", _IOC_NONE, 0x4147, 0x00 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_REWIND", _IOC_WRITE, 0x4146, 0x04 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_START", _IOC_NONE, 0x4142, 0x00 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_STATUS", _IOC_READ, 0x4120, 0x6c }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_STATUS_EXT", _IOC_READ|_IOC_WRITE, 0x4124, 0x6c }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_SW_PARAMS", _IOC_READ|_IOC_WRITE, 0x4113, 0x68 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_SYNC_PTR", _IOC_READ|_IOC_WRITE, 0x4123, 0x84 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_TSTAMP", _IOC_WRITE, 0x4102, 0x04 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_TTSTAMP", _IOC_WRITE, 0x4103, 0x04 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_UNLINK", _IOC_NONE, 0x4161, 0x00 }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_WRITEI_FRAMES", _IOC_WRITE, 0x4150, 0x0c }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_WRITEN_FRAMES", _IOC_WRITE, 0x4152, 0x0c }, +{ "sound/asound.h", "SNDRV_PCM_IOCTL_XRUN", _IOC_NONE, 0x4148, 0x00 }, +{ "sound/asound.h", "SNDRV_RAWMIDI_IOCTL_DRAIN", _IOC_WRITE, 0x5731, 0x04 }, +{ "sound/asound.h", "SNDRV_RAWMIDI_IOCTL_DROP", _IOC_WRITE, 0x5730, 0x04 }, +{ "sound/asound.h", "SNDRV_RAWMIDI_IOCTL_INFO", _IOC_READ, 0x5701, 0x10c }, +{ "sound/asound.h", "SNDRV_RAWMIDI_IOCTL_PARAMS", _IOC_READ|_IOC_WRITE, 0x5710, 0x1e }, +{ "sound/asound.h", "SNDRV_RAWMIDI_IOCTL_PVERSION", _IOC_READ, 0x5700, 0x04 }, +{ "sound/asound.h", "SNDRV_RAWMIDI_IOCTL_STATUS", _IOC_READ|_IOC_WRITE, 0x5720, 0x24 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_CONTINUE", _IOC_NONE, 0x54a2, 0x00 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_GINFO", _IOC_READ|_IOC_WRITE, 0x5403, 0xe0 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_GPARAMS", _IOC_WRITE, 0x5404, 0x3c }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_GSTATUS", _IOC_READ|_IOC_WRITE, 0x5405, 0x40 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_INFO", _IOC_READ, 0x5411, 0xe0 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_NEXT_DEVICE", _IOC_READ|_IOC_WRITE, 0x5401, 0x14 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_PARAMS", _IOC_WRITE, 0x5412, 0x50 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_PAUSE", _IOC_NONE, 0x54a3, 0x00 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_PVERSION", _IOC_READ, 0x5400, 0x04 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_SELECT", _IOC_WRITE, 0x5410, 0x34 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_START", _IOC_NONE, 0x54a0, 0x00 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_STATUS", _IOC_READ, 0x5414, 0x58 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_STOP", _IOC_NONE, 0x54a1, 0x00 }, +{ "sound/asound.h", "SNDRV_TIMER_IOCTL_TREAD", _IOC_WRITE, 0x5402, 0x04 }, +{ "sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_CLEAR_PATCHES", _IOC_NONE, 0x4840, 0x00 }, +{ "sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_INFO", _IOC_READ, 0x4820, 0x02 }, +{ "sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_PLAY_NOTE", _IOC_WRITE, 0x4822, 0x08 }, +{ "sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_RESET", _IOC_NONE, 0x4821, 0x00 }, +{ "sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_SET_CONNECTION", _IOC_WRITE, 0x4826, 0x04 }, +{ "sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_SET_MODE", _IOC_WRITE, 0x4825, 0x04 }, +{ "sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_SET_PARAMS", _IOC_WRITE, 0x4824, 0x09 }, +{ "sound/asound_fm.h", "SNDRV_DM_FM_IOCTL_SET_VOICE", _IOC_WRITE, 0x4823, 0x12 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_AVAIL", _IOC_READ, 0x4321, 0x1c }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_DRAIN", _IOC_NONE, 0x4334, 0x00 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_GET_CAPS", _IOC_READ|_IOC_WRITE, 0x4310, 0xc4 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_GET_CODEC_CAPS", _IOC_READ|_IOC_WRITE, 0x4311, 0x2b88 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_GET_METADATA", _IOC_READ|_IOC_WRITE, 0x4315, 0x24 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_GET_PARAMS", _IOC_READ, 0x4313, 0x78 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_IOCTL_VERSION", _IOC_READ, 0x4300, 0x04 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_NEXT_TRACK", _IOC_NONE, 0x4335, 0x00 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_PARTIAL_DRAIN", _IOC_NONE, 0x4336, 0x00 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_PAUSE", _IOC_NONE, 0x4330, 0x00 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_RESUME", _IOC_NONE, 0x4331, 0x00 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_SET_METADATA", _IOC_WRITE, 0x4314, 0x24 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_SET_PARAMS", _IOC_WRITE, 0x4312, 0x84 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_START", _IOC_NONE, 0x4332, 0x00 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_STOP", _IOC_NONE, 0x4333, 0x00 }, +{ "sound/compress_offload.h", "SNDRV_COMPRESS_TSTAMP", _IOC_READ, 0x4320, 0x14 }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_CODE_PEEK", _IOC_READ|_IOC_WRITE, 0x4812, 0x18c }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_CODE_POKE", _IOC_WRITE, 0x4811, 0x18c }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_CONTINUE", _IOC_NONE, 0x4881, 0x00 }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_DBG_READ", _IOC_READ, 0x4884, 0x04 }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_INFO", _IOC_READ, 0x4810, 0x80c }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_PCM_PEEK", _IOC_READ|_IOC_WRITE, 0x4831, 0x46 }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_PCM_POKE", _IOC_WRITE, 0x4830, 0x46 }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_PVERSION", _IOC_READ, 0x4840, 0x04 }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_SINGLE_STEP", _IOC_WRITE, 0x4883, 0x04 }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_STOP", _IOC_NONE, 0x4880, 0x00 }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_TRAM_PEEK", _IOC_READ|_IOC_WRITE, 0x4822, 0x0c }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_TRAM_POKE", _IOC_WRITE, 0x4821, 0x0c }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_TRAM_SETUP", _IOC_WRITE, 0x4820, 0x04 }, +{ "sound/emu10k1.h", "SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER", _IOC_NONE, 0x4882, 0x00 }, +{ "sound/firewire.h", "SNDRV_FIREWIRE_IOCTL_GET_INFO", _IOC_READ, 0x48f8, 0x20 }, +{ "sound/firewire.h", "SNDRV_FIREWIRE_IOCTL_LOCK", _IOC_NONE, 0x48f9, 0x00 }, +{ "sound/firewire.h", "SNDRV_FIREWIRE_IOCTL_UNLOCK", _IOC_NONE, 0x48fa, 0x00 }, +{ "sound/hda_hwdep.h", "HDA_IOCTL_GET_WCAP", _IOC_READ|_IOC_WRITE, 0x4812, 0x08 }, +{ "sound/hda_hwdep.h", "HDA_IOCTL_PVERSION", _IOC_READ, 0x4810, 0x04 }, +{ "sound/hda_hwdep.h", "HDA_IOCTL_VERB_WRITE", _IOC_READ|_IOC_WRITE, 0x4811, 0x08 }, +{ "sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_9632_AEB", _IOC_READ, 0x4845, 0x08 }, +{ "sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_CONFIG_INFO", _IOC_READ, 0x4841, 0x22 }, +{ "sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_MIXER", _IOC_READ, 0x4844, 0x1000 }, +{ "sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_PEAK_RMS", _IOC_READ, 0x4840, 0x3b0 }, +{ "sound/hdsp.h", "SNDRV_HDSP_IOCTL_GET_VERSION", _IOC_READ, 0x4843, 0x06 }, +{ "sound/hdsp.h", "SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE", _IOC_WRITE, 0x4842, 0x04 }, +{ "sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_CONFIG", _IOC_READ, 0x4841, 0x18 }, +{ "sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_LTC", _IOC_READ, 0x4846, 0x10 }, +{ "sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_MIXER", _IOC_READ, 0x4844, 0x04 }, +{ "sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_PEAK_RMS", _IOC_READ, 0x4842, 0x906 }, +{ "sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_STATUS", _IOC_READ, 0x4847, 0x1a }, +{ "sound/hdspm.h", "SNDRV_HDSPM_IOCTL_GET_VERSION", _IOC_READ, 0x4848, 0x20 }, +{ "sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_INFO", _IOC_READ, 0x4810, 0x26 }, +{ "sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_LOAD_CODE", _IOC_WRITE, 0x4811, 0x3012 }, +{ "sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_PAUSE", _IOC_NONE, 0x4815, 0x00 }, +{ "sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_RESTART", _IOC_NONE, 0x4816, 0x00 }, +{ "sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_START", _IOC_WRITE, 0x4813, 0x08 }, +{ "sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_STOP", _IOC_NONE, 0x4814, 0x00 }, +{ "sound/sb16_csp.h", "SNDRV_SB_CSP_IOCTL_UNLOAD_CODE", _IOC_NONE, 0x4812, 0x00 }, +{ "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_LOAD_PATCH", _IOC_READ|_IOC_WRITE, 0x4881, 0x10 }, +{ "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_MEM_AVAIL", _IOC_WRITE, 0x4884, 0x04 }, +{ "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_MISC_MODE", _IOC_READ|_IOC_WRITE, 0x4884, 0x10 }, +{ "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES", _IOC_NONE, 0x4883, 0x00 }, +{ "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_RESET_SAMPLES", _IOC_NONE, 0x4882, 0x00 }, +{ "sound/sfnt_info.h", "SNDRV_EMUX_IOCTL_VERSION", _IOC_READ, 0x4880, 0x04 }, +{ "sound/usb_stream.h", "SNDRV_USB_STREAM_IOCTL_SET_PARAMS", _IOC_WRITE, 0x4890, 0x10 }, +{ "staging/android/ashmem.h", "ASHMEM_GET_NAME", _IOC_READ, 0x7702, 0x100 }, +{ "staging/android/ashmem.h", "ASHMEM_GET_PIN_STATUS", _IOC_NONE, 0x7709, 0x00 }, +{ "staging/android/ashmem.h", "ASHMEM_GET_PROT_MASK", _IOC_NONE, 0x7706, 0x00 }, +{ "staging/android/ashmem.h", "ASHMEM_GET_SIZE", _IOC_NONE, 0x7704, 0x00 }, +{ "staging/android/ashmem.h", "ASHMEM_PIN", _IOC_WRITE, 0x7707, 0x08 }, +{ "staging/android/ashmem.h", "ASHMEM_PURGE_ALL_CACHES", _IOC_NONE, 0x770a, 0x00 }, +{ "staging/android/ashmem.h", "ASHMEM_SET_NAME", _IOC_WRITE, 0x7701, 0x100 }, +{ "staging/android/ashmem.h", "ASHMEM_SET_PROT_MASK", _IOC_WRITE, 0x7705, 0x04 }, +{ "staging/android/ashmem.h", "ASHMEM_SET_SIZE", _IOC_WRITE, 0x7703, 0x04 }, +{ "staging/android/ashmem.h", "ASHMEM_UNPIN", _IOC_WRITE, 0x7708, 0x08 }, +{ "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x14 }, +{ "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x08 }, +{ "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 }, +{ "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 }, +{ "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 }, +{ "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 }, +{ "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 }, +{ "staging/android/ion.h", "ION_IOC_SYNC", _IOC_READ|_IOC_WRITE, 0x4907, 0x08 }, +{ "staging/android/ion_test.h", "ION_IOC_TEST_DMA_MAPPING", _IOC_WRITE, 0x49f1, 0x20 }, +{ "staging/android/ion_test.h", "ION_IOC_TEST_KERNEL_MAPPING", _IOC_WRITE, 0x49f2, 0x20 }, +{ "staging/android/ion_test.h", "ION_IOC_TEST_SET_FD", _IOC_NONE, 0x49f0, 0x00 }, +{ "video/da8xx-fb.h", "FBIGET_BRIGHTNESS", _IOC_READ, 0x4603, 0x04 }, +{ "video/da8xx-fb.h", "FBIGET_COLOR", _IOC_READ, 0x4605, 0x04 }, +{ "video/da8xx-fb.h", "FBIOGET_CONTRAST", _IOC_READ, 0x4601, 0x04 }, +{ "video/da8xx-fb.h", "FBIOPUT_CONTRAST", _IOC_WRITE, 0x4602, 0x04 }, +{ "video/da8xx-fb.h", "FBIPUT_BRIGHTNESS", _IOC_WRITE, 0x4603, 0x04 }, +{ "video/da8xx-fb.h", "FBIPUT_COLOR", _IOC_WRITE, 0x4606, 0x04 }, +{ "video/da8xx-fb.h", "FBIPUT_HSYNC", _IOC_WRITE, 0x4609, 0x04 }, +{ "video/da8xx-fb.h", "FBIPUT_VSYNC", _IOC_WRITE, 0x460a, 0x04 }, +{ "video/kyro.h", "KYRO_IOCTL_OVERLAY_CREATE", _IOC_NONE, 0x6b00, 0x00 }, +{ "video/kyro.h", "KYRO_IOCTL_OVERLAY_OFFSET", _IOC_NONE, 0x6b04, 0x00 }, +{ "video/kyro.h", "KYRO_IOCTL_OVERLAY_VIEWPORT_SET", _IOC_NONE, 0x6b01, 0x00 }, +{ "video/kyro.h", "KYRO_IOCTL_SET_VIDEO_MODE", _IOC_NONE, 0x6b02, 0x00 }, +{ "video/kyro.h", "KYRO_IOCTL_STRIDE", _IOC_NONE, 0x6b05, 0x00 }, +{ "video/kyro.h", "KYRO_IOCTL_UVSTRIDE", _IOC_NONE, 0x6b03, 0x00 }, +{ "video/mbxfb.h", "MBXFB_IOCG_ALPHA", _IOC_READ, 0xf401, 0x18 }, +{ "video/mbxfb.h", "MBXFB_IOCS_ALPHA", _IOC_WRITE, 0xf402, 0x18 }, +{ "video/mbxfb.h", "MBXFB_IOCS_PLANEORDER", _IOC_READ, 0xf403, 0x02 }, +{ "video/mbxfb.h", "MBXFB_IOCS_REG", _IOC_WRITE, 0xf404, 0x0c }, +{ "video/mbxfb.h", "MBXFB_IOCX_OVERLAY", _IOC_READ|_IOC_WRITE, 0xf400, 0x30 }, +{ "video/mbxfb.h", "MBXFB_IOCX_REG", _IOC_READ|_IOC_WRITE, 0xf405, 0x0c }, +{ "video/sisfb.h", "SISFB_COMMAND", _IOC_READ|_IOC_WRITE, 0xf305, 0x54 }, +{ "video/sisfb.h", "SISFB_GET_AUTOMAXIMIZE", _IOC_READ, 0xf303, 0x04 }, +{ "video/sisfb.h", "SISFB_GET_AUTOMAXIMIZE_OLD", _IOC_READ, 0x6efa, 0x04 }, +{ "video/sisfb.h", "SISFB_GET_INFO", _IOC_READ, 0xf301, 0x114 }, +{ "video/sisfb.h", "SISFB_GET_INFO_OLD", _IOC_READ, 0x6ef8, 0x04 }, +{ "video/sisfb.h", "SISFB_GET_INFO_SIZE", _IOC_READ, 0xf300, 0x04 }, +{ "video/sisfb.h", "SISFB_GET_TVPOSOFFSET", _IOC_READ, 0xf304, 0x04 }, +{ "video/sisfb.h", "SISFB_GET_VBRSTATUS", _IOC_READ, 0xf302, 0x04 }, +{ "video/sisfb.h", "SISFB_GET_VBRSTATUS_OLD", _IOC_READ, 0x6ef9, 0x04 }, +{ "video/sisfb.h", "SISFB_SET_AUTOMAXIMIZE", _IOC_WRITE, 0xf303, 0x04 }, +{ "video/sisfb.h", "SISFB_SET_AUTOMAXIMIZE_OLD", _IOC_WRITE, 0x6efa, 0x04 }, +{ "video/sisfb.h", "SISFB_SET_LOCK", _IOC_WRITE, 0xf306, 0x04 }, +{ "video/sisfb.h", "SISFB_SET_TVPOSOFFSET", _IOC_WRITE, 0xf304, 0x04 }, +{ "video/sstfb.h", "SSTFB_GET_VGAPASS", _IOC_READ, 0x46dd, 0x04 }, +{ "video/sstfb.h", "SSTFB_SET_VGAPASS", _IOC_WRITE, 0x46dd, 0x04 }, +{ "xen/evtchn.h", "IOCTL_EVTCHN_BIND_INTERDOMAIN", _IOC_NONE, 0x4501, 0x08 }, +{ "xen/evtchn.h", "IOCTL_EVTCHN_BIND_UNBOUND_PORT", _IOC_NONE, 0x4502, 0x04 }, +{ "xen/evtchn.h", "IOCTL_EVTCHN_BIND_VIRQ", _IOC_NONE, 0x4500, 0x04 }, +{ "xen/evtchn.h", "IOCTL_EVTCHN_NOTIFY", _IOC_NONE, 0x4504, 0x04 }, +{ "xen/evtchn.h", "IOCTL_EVTCHN_RESET", _IOC_NONE, 0x4505, 0x00 }, +{ "xen/evtchn.h", "IOCTL_EVTCHN_RESTRICT_DOMID", _IOC_NONE, 0x4506, 0x02 }, +{ "xen/evtchn.h", "IOCTL_EVTCHN_UNBIND", _IOC_NONE, 0x4503, 0x04 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR", _IOC_NONE, 0x4702, 0x18 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_GRANT_COPY", _IOC_NONE, 0x4708, 0x08 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_MAP_GRANT_REF", _IOC_NONE, 0x4700, 0x18 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_SET_MAX_GRANTS", _IOC_NONE, 0x4703, 0x04 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_SET_UNMAP_NOTIFY", _IOC_NONE, 0x4707, 0x10 }, +{ "xen/gntdev.h", "IOCTL_GNTDEV_UNMAP_GRANT_REF", _IOC_NONE, 0x4701, 0x10 }, +{ "xen/xenbus_dev.h", "IOCTL_XENBUS_BACKEND_EVTCHN", _IOC_NONE, 0x4200, 0x00 }, +{ "xen/xenbus_dev.h", "IOCTL_XENBUS_BACKEND_SETUP", _IOC_NONE, 0x4201, 0x00 }, diff --git a/linux/32/ioctls_inc_align32.h b/linux/32/ioctls_inc_align32.h index 9888ecaf6..699eb9054 100644 --- a/linux/32/ioctls_inc_align32.h +++ b/linux/32/ioctls_inc_align32.h @@ -93,6 +93,7 @@ { "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, { "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 }, { "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_FENCES", _IOC_READ|_IOC_WRITE, 0x6452, 0x18 }, { "drm/drm.h", "DRM_IOCTL_ADD_BUFS", _IOC_READ|_IOC_WRITE, 0x6416, 0x18 }, { "drm/drm.h", "DRM_IOCTL_ADD_CTX", _IOC_READ|_IOC_WRITE, 0x6420, 0x08 }, { "drm/drm.h", "DRM_IOCTL_ADD_DRAW", _IOC_READ|_IOC_WRITE, 0x6427, 0x04 }, @@ -286,7 +287,7 @@ { "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6448, 0x0c }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, -{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x20 }, +{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x24 }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x18 }, { "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_FINI", _IOC_WRITE, 0x6483, 0x04 }, @@ -557,6 +558,9 @@ { "linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", _IOC_WRITE, 0x9366, 0x04 }, { "linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", _IOC_READ, 0x9367, 0x04 }, { "linux/blkpg.h", "BLKPG", _IOC_NONE, 0x1269, 0x00 }, +{ "linux/blkzoned.h", "BLKREPORTZONE", _IOC_READ|_IOC_WRITE, 0x1282, 0x10 }, +{ "linux/blkzoned.h", "BLKRESETZONE", _IOC_WRITE, 0x1283, 0x10 }, +{ "linux/bt-bmc.h", "BT_BMC_IOCTL_SMS_ATN", _IOC_NONE, 0xb100, 0x00 }, { "linux/btrfs.h", "BTRFS_IOC_ADD_DEV", _IOC_WRITE, 0x940a, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_BALANCE", _IOC_WRITE, 0x940c, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_BALANCE_CTL", _IOC_WRITE, 0x9421, 0x04 }, @@ -1311,123 +1315,6 @@ { "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 }, -{ "linux/kvm.h", "KVM_ALLOCATE_RMA", _IOC_READ, 0xaea9, 0x08 }, -{ "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 }, -{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, -{ "linux/kvm.h", "KVM_ARM_VCPU_INIT", _IOC_WRITE, 0xaeae, 0x20 }, -{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 }, -{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 }, -{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 }, -{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 }, -{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 }, -{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c }, -{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, -{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE", _IOC_WRITE, 0xaea8, 0x0c }, -{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE_64", _IOC_WRITE, 0xaea8, 0x20 }, -{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, -{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, -{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 }, -{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x0c }, -{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 }, -{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 }, -{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 }, -{ "linux/kvm.h", "KVM_GET_CPUID2", _IOC_READ|_IOC_WRITE, 0xae91, 0x08 }, -{ "linux/kvm.h", "KVM_GET_DEBUGREGS", _IOC_READ, 0xaea1, 0x80 }, -{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 }, -{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 }, -{ "linux/kvm.h", "KVM_GET_EMULATED_CPUID", _IOC_READ|_IOC_WRITE, 0xae09, 0x08 }, -{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x1a0 }, -{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 }, -{ "linux/kvm.h", "KVM_GET_LAPIC", _IOC_READ, 0xae8e, 0x400 }, -{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 }, -{ "linux/kvm.h", "KVM_GET_MSRS", _IOC_READ|_IOC_WRITE, 0xae88, 0x08 }, -{ "linux/kvm.h", "KVM_GET_MSR_INDEX_LIST", _IOC_READ|_IOC_WRITE, 0xae02, 0x04 }, -{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 }, -{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 }, -{ "linux/kvm.h", "KVM_GET_PIT", _IOC_READ|_IOC_WRITE, 0xae65, 0x48 }, -{ "linux/kvm.h", "KVM_GET_PIT2", _IOC_READ, 0xae9f, 0x70 }, -{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x90 }, -{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 }, -{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x138 }, -{ "linux/kvm.h", "KVM_GET_SUPPORTED_CPUID", _IOC_READ|_IOC_WRITE, 0xae05, 0x08 }, -{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 }, -{ "linux/kvm.h", "KVM_GET_VCPU_EVENTS", _IOC_READ, 0xae9f, 0x40 }, -{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 }, -{ "linux/kvm.h", "KVM_GET_XCRS", _IOC_READ, 0xaea6, 0x188 }, -{ "linux/kvm.h", "KVM_GET_XSAVE", _IOC_READ, 0xaea4, 0x1000 }, -{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 }, -{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 }, -{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 }, -{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 }, -{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 }, -{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 }, -{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 }, -{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 }, -{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 }, -{ "linux/kvm.h", "KVM_PPC_GET_HTAB_FD", _IOC_WRITE, 0xaeaa, 0x20 }, -{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 }, -{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 }, -{ "linux/kvm.h", "KVM_PPC_RTAS_DEFINE_TOKEN", _IOC_WRITE, 0xaeac, 0x80 }, -{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 }, -{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, -{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, -{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, -{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, -{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, -{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, -{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, -{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, -{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, -{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, -{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, -{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, -{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 }, -{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, -{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, -{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x04 }, -{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 }, -{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 }, -{ "linux/kvm.h", "KVM_SET_CPUID", _IOC_WRITE, 0xae8a, 0x08 }, -{ "linux/kvm.h", "KVM_SET_CPUID2", _IOC_WRITE, 0xae90, 0x08 }, -{ "linux/kvm.h", "KVM_SET_DEBUGREGS", _IOC_WRITE, 0xaea2, 0x80 }, -{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 }, -{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x1a0 }, -{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 }, -{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x48 }, -{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 }, -{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 }, -{ "linux/kvm.h", "KVM_SET_LAPIC", _IOC_WRITE, 0xae8f, 0x400 }, -{ "linux/kvm.h", "KVM_SET_MEMORY_ALIAS", _IOC_WRITE, 0xae43, 0x20 }, -{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 }, -{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 }, -{ "linux/kvm.h", "KVM_SET_MSRS", _IOC_WRITE, 0xae89, 0x08 }, -{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 }, -{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 }, -{ "linux/kvm.h", "KVM_SET_PIT", _IOC_READ, 0xae66, 0x48 }, -{ "linux/kvm.h", "KVM_SET_PIT2", _IOC_WRITE, 0xaea0, 0x70 }, -{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x90 }, -{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 }, -{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x138 }, -{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 }, -{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 }, -{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 }, -{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 }, -{ "linux/kvm.h", "KVM_SET_VCPU_EVENTS", _IOC_WRITE, 0xaea0, 0x40 }, -{ "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 }, -{ "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 }, -{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, -{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, -{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, -{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, -{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, -{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 }, -{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, -{ "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 }, -{ "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 }, { "linux/lightnvm.h", "NVM_DEV_CREATE", _IOC_WRITE, 0x4c22, 0x80 }, { "linux/lightnvm.h", "NVM_DEV_FACTORY", _IOC_WRITE, 0x4c25, 0x24 }, { "linux/lightnvm.h", "NVM_DEV_INIT", _IOC_WRITE, 0x4c24, 0x2c }, @@ -1568,6 +1455,8 @@ { "linux/nilfs2_api.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 }, { "linux/nilfs2_api.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 }, { "linux/nilfs2_api.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 }, +{ "linux/nsfs.h", "NS_GET_PARENT", _IOC_NONE, 0xb702, 0x00 }, +{ "linux/nsfs.h", "NS_GET_USERNS", _IOC_NONE, 0xb701, 0x00 }, { "linux/nvme_ioctl.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, { "linux/nvme_ioctl.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, { "linux/nvme_ioctl.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, @@ -1862,6 +1751,7 @@ { "linux/sockios.h", "SIOCGMIIPHY", 0, 0x8947, 0 }, { "linux/sockios.h", "SIOCGMIIREG", 0, 0x8948, 0 }, { "linux/sockios.h", "SIOCGRARP", 0, 0x8961, 0 }, +{ "linux/sockios.h", "SIOCGSKNS", 0, 0x894C, 0 }, { "linux/sockios.h", "SIOCOUTQNSD", 0, 0x894B, 0 }, { "linux/sockios.h", "SIOCPROTOPRIVATE", 0, 0x89E0, 0 }, { "linux/sockios.h", "SIOCRTMSG", 0, 0x890D, 0 }, @@ -2779,6 +2669,7 @@ { "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x14 }, { "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x08 }, { "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 }, +{ "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 }, { "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 }, { "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 }, { "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 }, diff --git a/linux/32/ioctls_inc_align64.h b/linux/32/ioctls_inc_align64.h index da95c4063..fcd9d8c22 100644 --- a/linux/32/ioctls_inc_align64.h +++ b/linux/32/ioctls_inc_align64.h @@ -93,6 +93,7 @@ { "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, { "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 }, { "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_FENCES", _IOC_READ|_IOC_WRITE, 0x6452, 0x18 }, { "drm/drm.h", "DRM_IOCTL_ADD_BUFS", _IOC_READ|_IOC_WRITE, 0x6416, 0x18 }, { "drm/drm.h", "DRM_IOCTL_ADD_CTX", _IOC_READ|_IOC_WRITE, 0x6420, 0x08 }, { "drm/drm.h", "DRM_IOCTL_ADD_DRAW", _IOC_READ|_IOC_WRITE, 0x6427, 0x04 }, @@ -286,7 +287,7 @@ { "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6448, 0x0c }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, -{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x20 }, +{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x28 }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x18 }, { "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_FINI", _IOC_WRITE, 0x6483, 0x04 }, @@ -557,6 +558,9 @@ { "linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", _IOC_WRITE, 0x9366, 0x04 }, { "linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", _IOC_READ, 0x9367, 0x04 }, { "linux/blkpg.h", "BLKPG", _IOC_NONE, 0x1269, 0x00 }, +{ "linux/blkzoned.h", "BLKREPORTZONE", _IOC_READ|_IOC_WRITE, 0x1282, 0x10 }, +{ "linux/blkzoned.h", "BLKRESETZONE", _IOC_WRITE, 0x1283, 0x10 }, +{ "linux/bt-bmc.h", "BT_BMC_IOCTL_SMS_ATN", _IOC_NONE, 0xb100, 0x00 }, { "linux/btrfs.h", "BTRFS_IOC_ADD_DEV", _IOC_WRITE, 0x940a, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_BALANCE", _IOC_WRITE, 0x940c, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_BALANCE_CTL", _IOC_WRITE, 0x9421, 0x04 }, @@ -1311,123 +1315,6 @@ { "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 }, -{ "linux/kvm.h", "KVM_ALLOCATE_RMA", _IOC_READ, 0xaea9, 0x08 }, -{ "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 }, -{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, -{ "linux/kvm.h", "KVM_ARM_VCPU_INIT", _IOC_WRITE, 0xaeae, 0x20 }, -{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 }, -{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 }, -{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 }, -{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 }, -{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 }, -{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c }, -{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, -{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE", _IOC_WRITE, 0xaea8, 0x0c }, -{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE_64", _IOC_WRITE, 0xaea8, 0x20 }, -{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, -{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, -{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 }, -{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x10 }, -{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 }, -{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 }, -{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 }, -{ "linux/kvm.h", "KVM_GET_CPUID2", _IOC_READ|_IOC_WRITE, 0xae91, 0x08 }, -{ "linux/kvm.h", "KVM_GET_DEBUGREGS", _IOC_READ, 0xaea1, 0x80 }, -{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 }, -{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 }, -{ "linux/kvm.h", "KVM_GET_EMULATED_CPUID", _IOC_READ|_IOC_WRITE, 0xae09, 0x08 }, -{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x00 }, -{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 }, -{ "linux/kvm.h", "KVM_GET_LAPIC", _IOC_READ, 0xae8e, 0x400 }, -{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 }, -{ "linux/kvm.h", "KVM_GET_MSRS", _IOC_READ|_IOC_WRITE, 0xae88, 0x08 }, -{ "linux/kvm.h", "KVM_GET_MSR_INDEX_LIST", _IOC_READ|_IOC_WRITE, 0xae02, 0x04 }, -{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 }, -{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 }, -{ "linux/kvm.h", "KVM_GET_PIT", _IOC_READ|_IOC_WRITE, 0xae65, 0x48 }, -{ "linux/kvm.h", "KVM_GET_PIT2", _IOC_READ, 0xae9f, 0x70 }, -{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x98 }, -{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 }, -{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x00 }, -{ "linux/kvm.h", "KVM_GET_SUPPORTED_CPUID", _IOC_READ|_IOC_WRITE, 0xae05, 0x08 }, -{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 }, -{ "linux/kvm.h", "KVM_GET_VCPU_EVENTS", _IOC_READ, 0xae9f, 0x40 }, -{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 }, -{ "linux/kvm.h", "KVM_GET_XCRS", _IOC_READ, 0xaea6, 0x188 }, -{ "linux/kvm.h", "KVM_GET_XSAVE", _IOC_READ, 0xaea4, 0x1000 }, -{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 }, -{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 }, -{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 }, -{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 }, -{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 }, -{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 }, -{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 }, -{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 }, -{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 }, -{ "linux/kvm.h", "KVM_PPC_GET_HTAB_FD", _IOC_WRITE, 0xaeaa, 0x20 }, -{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 }, -{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 }, -{ "linux/kvm.h", "KVM_PPC_RTAS_DEFINE_TOKEN", _IOC_WRITE, 0xaeac, 0x80 }, -{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 }, -{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, -{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, -{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, -{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, -{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, -{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, -{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, -{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, -{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, -{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, -{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, -{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, -{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 }, -{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, -{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, -{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x04 }, -{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 }, -{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 }, -{ "linux/kvm.h", "KVM_SET_CPUID", _IOC_WRITE, 0xae8a, 0x08 }, -{ "linux/kvm.h", "KVM_SET_CPUID2", _IOC_WRITE, 0xae90, 0x08 }, -{ "linux/kvm.h", "KVM_SET_DEBUGREGS", _IOC_WRITE, 0xaea2, 0x80 }, -{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 }, -{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x00 }, -{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 }, -{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x08 }, -{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 }, -{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 }, -{ "linux/kvm.h", "KVM_SET_LAPIC", _IOC_WRITE, 0xae8f, 0x400 }, -{ "linux/kvm.h", "KVM_SET_MEMORY_ALIAS", _IOC_WRITE, 0xae43, 0x20 }, -{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 }, -{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 }, -{ "linux/kvm.h", "KVM_SET_MSRS", _IOC_WRITE, 0xae89, 0x08 }, -{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 }, -{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 }, -{ "linux/kvm.h", "KVM_SET_PIT", _IOC_READ, 0xae66, 0x48 }, -{ "linux/kvm.h", "KVM_SET_PIT2", _IOC_WRITE, 0xaea0, 0x70 }, -{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x98 }, -{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 }, -{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x00 }, -{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 }, -{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 }, -{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 }, -{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 }, -{ "linux/kvm.h", "KVM_SET_VCPU_EVENTS", _IOC_WRITE, 0xaea0, 0x40 }, -{ "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 }, -{ "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 }, -{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, -{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, -{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, -{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, -{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, -{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 }, -{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, -{ "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 }, -{ "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 }, { "linux/lightnvm.h", "NVM_DEV_CREATE", _IOC_WRITE, 0x4c22, 0x80 }, { "linux/lightnvm.h", "NVM_DEV_FACTORY", _IOC_WRITE, 0x4c25, 0x24 }, { "linux/lightnvm.h", "NVM_DEV_INIT", _IOC_WRITE, 0x4c24, 0x2c }, @@ -1568,6 +1455,8 @@ { "linux/nilfs2_api.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 }, { "linux/nilfs2_api.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 }, { "linux/nilfs2_api.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 }, +{ "linux/nsfs.h", "NS_GET_PARENT", _IOC_NONE, 0xb702, 0x00 }, +{ "linux/nsfs.h", "NS_GET_USERNS", _IOC_NONE, 0xb701, 0x00 }, { "linux/nvme_ioctl.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, { "linux/nvme_ioctl.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, { "linux/nvme_ioctl.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, @@ -1862,6 +1751,7 @@ { "linux/sockios.h", "SIOCGMIIPHY", 0, 0x8947, 0 }, { "linux/sockios.h", "SIOCGMIIREG", 0, 0x8948, 0 }, { "linux/sockios.h", "SIOCGRARP", 0, 0x8961, 0 }, +{ "linux/sockios.h", "SIOCGSKNS", 0, 0x894C, 0 }, { "linux/sockios.h", "SIOCOUTQNSD", 0, 0x894B, 0 }, { "linux/sockios.h", "SIOCPROTOPRIVATE", 0, 0x89E0, 0 }, { "linux/sockios.h", "SIOCRTMSG", 0, 0x890D, 0 }, @@ -2779,6 +2669,7 @@ { "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x14 }, { "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x08 }, { "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 }, +{ "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 }, { "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 }, { "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 }, { "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 }, diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h index 2295d1e89..631623563 100644 --- a/linux/32/syscallent.h +++ b/linux/32/syscallent.h @@ -267,17 +267,20 @@ [274] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [275] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [276] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[277] = { 3, 0, SEN(seccomp), "seccomp", }, -[278] = { 3, 0, SEN(getrandom), "getrandom", }, -[279] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[280] = { 3, TD, SEN(bpf), "bpf", }, -[281] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[282] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[283] = { 2, 0, SEN(membarrier), "membarrier", }, +[277] = { 3, 0, SEN(seccomp), "seccomp" }, +[278] = { 3, 0, SEN(getrandom), "getrandom" }, +[279] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[280] = { 3, TD, SEN(bpf), "bpf" }, +[281] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[282] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[283] = { 2, 0, SEN(membarrier), "membarrier" }, [284] = { 3, TM, SEN(mlock2), "mlock2" }, [285] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [286] = { 6, TD, SEN(preadv2), "preadv2" }, [287] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[288] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, +[289] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, +[290] = { 1, 0, SEN(pkey_free), "pkey_free" }, #undef sys_ARCH_mmap #undef ARCH_WANT_SYNC_FILE_RANGE2 diff --git a/linux/64/ioctls_inc.h b/linux/64/ioctls_inc.h index 3fc515c55..f59fe111a 100644 --- a/linux/64/ioctls_inc.h +++ b/linux/64/ioctls_inc.h @@ -93,6 +93,7 @@ { "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, { "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 }, { "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_FENCES", _IOC_READ|_IOC_WRITE, 0x6452, 0x18 }, { "drm/drm.h", "DRM_IOCTL_ADD_BUFS", _IOC_READ|_IOC_WRITE, 0x6416, 0x20 }, { "drm/drm.h", "DRM_IOCTL_ADD_CTX", _IOC_READ|_IOC_WRITE, 0x6420, 0x08 }, { "drm/drm.h", "DRM_IOCTL_ADD_DRAW", _IOC_READ|_IOC_WRITE, 0x6427, 0x04 }, @@ -286,7 +287,7 @@ { "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6448, 0x0c }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, -{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x20 }, +{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x28 }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x18 }, { "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_FINI", _IOC_WRITE, 0x6483, 0x04 }, @@ -557,6 +558,9 @@ { "linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", _IOC_WRITE, 0x9366, 0x04 }, { "linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", _IOC_READ, 0x9367, 0x04 }, { "linux/blkpg.h", "BLKPG", _IOC_NONE, 0x1269, 0x00 }, +{ "linux/blkzoned.h", "BLKREPORTZONE", _IOC_READ|_IOC_WRITE, 0x1282, 0x10 }, +{ "linux/blkzoned.h", "BLKRESETZONE", _IOC_WRITE, 0x1283, 0x10 }, +{ "linux/bt-bmc.h", "BT_BMC_IOCTL_SMS_ATN", _IOC_NONE, 0xb100, 0x00 }, { "linux/btrfs.h", "BTRFS_IOC_ADD_DEV", _IOC_WRITE, 0x940a, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_BALANCE", _IOC_WRITE, 0x940c, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_BALANCE_CTL", _IOC_WRITE, 0x9421, 0x04 }, @@ -1311,123 +1315,6 @@ { "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 }, -{ "linux/kvm.h", "KVM_ALLOCATE_RMA", _IOC_READ, 0xaea9, 0x08 }, -{ "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 }, -{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, -{ "linux/kvm.h", "KVM_ARM_VCPU_INIT", _IOC_WRITE, 0xaeae, 0x20 }, -{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 }, -{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 }, -{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 }, -{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 }, -{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 }, -{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c }, -{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, -{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE", _IOC_WRITE, 0xaea8, 0x0c }, -{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE_64", _IOC_WRITE, 0xaea8, 0x20 }, -{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, -{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, -{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 }, -{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x10 }, -{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 }, -{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 }, -{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 }, -{ "linux/kvm.h", "KVM_GET_CPUID2", _IOC_READ|_IOC_WRITE, 0xae91, 0x08 }, -{ "linux/kvm.h", "KVM_GET_DEBUGREGS", _IOC_READ, 0xaea1, 0x80 }, -{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 }, -{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 }, -{ "linux/kvm.h", "KVM_GET_EMULATED_CPUID", _IOC_READ|_IOC_WRITE, 0xae09, 0x08 }, -{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x1a0 }, -{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 }, -{ "linux/kvm.h", "KVM_GET_LAPIC", _IOC_READ, 0xae8e, 0x400 }, -{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 }, -{ "linux/kvm.h", "KVM_GET_MSRS", _IOC_READ|_IOC_WRITE, 0xae88, 0x08 }, -{ "linux/kvm.h", "KVM_GET_MSR_INDEX_LIST", _IOC_READ|_IOC_WRITE, 0xae02, 0x04 }, -{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 }, -{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 }, -{ "linux/kvm.h", "KVM_GET_PIT", _IOC_READ|_IOC_WRITE, 0xae65, 0x48 }, -{ "linux/kvm.h", "KVM_GET_PIT2", _IOC_READ, 0xae9f, 0x70 }, -{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x90 }, -{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 }, -{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x138 }, -{ "linux/kvm.h", "KVM_GET_SUPPORTED_CPUID", _IOC_READ|_IOC_WRITE, 0xae05, 0x08 }, -{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 }, -{ "linux/kvm.h", "KVM_GET_VCPU_EVENTS", _IOC_READ, 0xae9f, 0x40 }, -{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 }, -{ "linux/kvm.h", "KVM_GET_XCRS", _IOC_READ, 0xaea6, 0x188 }, -{ "linux/kvm.h", "KVM_GET_XSAVE", _IOC_READ, 0xaea4, 0x1000 }, -{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 }, -{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 }, -{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 }, -{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 }, -{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 }, -{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 }, -{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 }, -{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 }, -{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 }, -{ "linux/kvm.h", "KVM_PPC_GET_HTAB_FD", _IOC_WRITE, 0xaeaa, 0x20 }, -{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 }, -{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 }, -{ "linux/kvm.h", "KVM_PPC_RTAS_DEFINE_TOKEN", _IOC_WRITE, 0xaeac, 0x80 }, -{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 }, -{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, -{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, -{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, -{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, -{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, -{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, -{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, -{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, -{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, -{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, -{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, -{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, -{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x08 }, -{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, -{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, -{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x08 }, -{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 }, -{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 }, -{ "linux/kvm.h", "KVM_SET_CPUID", _IOC_WRITE, 0xae8a, 0x08 }, -{ "linux/kvm.h", "KVM_SET_CPUID2", _IOC_WRITE, 0xae90, 0x08 }, -{ "linux/kvm.h", "KVM_SET_DEBUGREGS", _IOC_WRITE, 0xaea2, 0x80 }, -{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 }, -{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x1a0 }, -{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 }, -{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x48 }, -{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 }, -{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 }, -{ "linux/kvm.h", "KVM_SET_LAPIC", _IOC_WRITE, 0xae8f, 0x400 }, -{ "linux/kvm.h", "KVM_SET_MEMORY_ALIAS", _IOC_WRITE, 0xae43, 0x20 }, -{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 }, -{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 }, -{ "linux/kvm.h", "KVM_SET_MSRS", _IOC_WRITE, 0xae89, 0x08 }, -{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 }, -{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 }, -{ "linux/kvm.h", "KVM_SET_PIT", _IOC_READ, 0xae66, 0x48 }, -{ "linux/kvm.h", "KVM_SET_PIT2", _IOC_WRITE, 0xaea0, 0x70 }, -{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x90 }, -{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 }, -{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x138 }, -{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 }, -{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 }, -{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 }, -{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 }, -{ "linux/kvm.h", "KVM_SET_VCPU_EVENTS", _IOC_WRITE, 0xaea0, 0x40 }, -{ "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 }, -{ "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 }, -{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, -{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, -{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, -{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, -{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, -{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 }, -{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, -{ "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 }, -{ "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 }, { "linux/lightnvm.h", "NVM_DEV_CREATE", _IOC_WRITE, 0x4c22, 0x80 }, { "linux/lightnvm.h", "NVM_DEV_FACTORY", _IOC_WRITE, 0x4c25, 0x24 }, { "linux/lightnvm.h", "NVM_DEV_INIT", _IOC_WRITE, 0x4c24, 0x2c }, @@ -1568,6 +1455,8 @@ { "linux/nilfs2_api.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 }, { "linux/nilfs2_api.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 }, { "linux/nilfs2_api.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 }, +{ "linux/nsfs.h", "NS_GET_PARENT", _IOC_NONE, 0xb702, 0x00 }, +{ "linux/nsfs.h", "NS_GET_USERNS", _IOC_NONE, 0xb701, 0x00 }, { "linux/nvme_ioctl.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, { "linux/nvme_ioctl.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, { "linux/nvme_ioctl.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, @@ -1862,6 +1751,7 @@ { "linux/sockios.h", "SIOCGMIIPHY", 0, 0x8947, 0 }, { "linux/sockios.h", "SIOCGMIIREG", 0, 0x8948, 0 }, { "linux/sockios.h", "SIOCGRARP", 0, 0x8961, 0 }, +{ "linux/sockios.h", "SIOCGSKNS", 0, 0x894C, 0 }, { "linux/sockios.h", "SIOCOUTQNSD", 0, 0x894B, 0 }, { "linux/sockios.h", "SIOCPROTOPRIVATE", 0, 0x89E0, 0 }, { "linux/sockios.h", "SIOCRTMSG", 0, 0x890D, 0 }, @@ -2779,6 +2669,7 @@ { "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x20 }, { "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x10 }, { "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 }, +{ "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 }, { "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 }, { "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 }, { "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 }, diff --git a/linux/64/syscallent.h b/linux/64/syscallent.h index 5bd6cb042..598d942c1 100644 --- a/linux/64/syscallent.h +++ b/linux/64/syscallent.h @@ -260,14 +260,17 @@ [274] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [275] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [276] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[277] = { 3, 0, SEN(seccomp), "seccomp", }, -[278] = { 3, 0, SEN(getrandom), "getrandom", }, -[279] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[280] = { 3, TD, SEN(bpf), "bpf", }, -[281] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[282] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[283] = { 2, 0, SEN(membarrier), "membarrier", }, +[277] = { 3, 0, SEN(seccomp), "seccomp" }, +[278] = { 3, 0, SEN(getrandom), "getrandom" }, +[279] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[280] = { 3, TD, SEN(bpf), "bpf" }, +[281] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[282] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[283] = { 2, 0, SEN(membarrier), "membarrier" }, [284] = { 3, TM, SEN(mlock2), "mlock2" }, [285] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [286] = { 6, TD, SEN(preadv2), "preadv2" }, [287] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[288] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, +[289] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, +[290] = { 1, 0, SEN(pkey_free), "pkey_free" }, diff --git a/linux/aarch64/arch_regs.c b/linux/aarch64/arch_regs.c index 8e18a71c8..4ccb1f5bf 100644 --- a/linux/aarch64/arch_regs.c +++ b/linux/aarch64/arch_regs.c @@ -28,7 +28,7 @@ static union { #define arm_regs arm_regs_union.arm_r uint64_t *const aarch64_sp_ptr = (uint64_t *) &aarch64_regs.sp; -uint32_t *const arm_sp_ptr = (uint32_t *) &arm_regs.ARM_sp; +uint32_t *const arm_sp_ptr = &arm_regs.ARM_sp; static struct iovec aarch64_io = { .iov_base = &arm_regs_union }; diff --git a/linux/aarch64/get_scno.c b/linux/aarch64/get_scno.c index c0fd48223..569aea091 100644 --- a/linux/aarch64/get_scno.c +++ b/linux/aarch64/get_scno.c @@ -2,7 +2,7 @@ static int arch_get_scno(struct tcb *tcp) { - long scno = 0; + kernel_ulong_t scno = 0; switch (aarch64_io.iov_len) { case sizeof(aarch64_regs): diff --git a/linux/aarch64/set_error.c b/linux/aarch64/set_error.c new file mode 100644 index 000000000..03686092b --- /dev/null +++ b/linux/aarch64/set_error.c @@ -0,0 +1,25 @@ +#define arch_set_error arm_set_error +#define arch_set_success arm_set_success +#include "arm/set_error.c" +#undef arch_set_success +#undef arch_set_error + +static int +arch_set_error(struct tcb *tcp) +{ + if (aarch64_io.iov_len == sizeof(arm_regs)) + return arm_set_error(tcp); + + aarch64_regs.regs[0] = -tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + if (aarch64_io.iov_len == sizeof(arm_regs)) + return arm_set_success(tcp); + + aarch64_regs.regs[0] = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/aarch64/set_scno.c b/linux/aarch64/set_scno.c new file mode 100644 index 000000000..fe44672bb --- /dev/null +++ b/linux/aarch64/set_scno.c @@ -0,0 +1,22 @@ +#ifndef NT_ARM_SYSTEM_CALL +# define NT_ARM_SYSTEM_CALL 0x404 +#endif +/* + * NT_ARM_SYSTEM_CALL regset is supported by linux kernel + * starting with commit v3.19-rc1~59^2~16. + */ + +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + unsigned int n = (uint16_t) scno; + const struct iovec io = { + .iov_base = &n, + .iov_len = sizeof(n) + }; + int rc = ptrace(PTRACE_SETREGSET, tcp->pid, NT_ARM_SYSTEM_CALL, &io); + if (rc && errno != ESRCH) + perror_msg("arch_set_scno: NT_ARM_SYSTEM_CALL pid:%d scno:%#x", + tcp->pid, n); + return rc; +} diff --git a/linux/alpha/arch_getrval2.c b/linux/alpha/arch_getrval2.c index 90ee392e5..f78a9f0ff 100644 --- a/linux/alpha/arch_getrval2.c +++ b/linux/alpha/arch_getrval2.c @@ -1,7 +1,7 @@ long getrval2(struct tcb *tcp) { - long r20; + unsigned long r20; if (upeek(tcp->pid, 20, &r20) < 0) return -1; return r20; diff --git a/linux/alpha/arch_regs.c b/linux/alpha/arch_regs.c index df1878e2d..4d3979962 100644 --- a/linux/alpha/arch_regs.c +++ b/linux/alpha/arch_regs.c @@ -1,3 +1,3 @@ -static long alpha_r0; -static long alpha_a3; +static unsigned long alpha_r0; +static unsigned long alpha_a3; #define ARCH_PC_PEEK_ADDR REG_PC diff --git a/linux/alpha/arch_sigreturn.c b/linux/alpha/arch_sigreturn.c index 71a84ef2e..3317a9544 100644 --- a/linux/alpha/arch_sigreturn.c +++ b/linux/alpha/arch_sigreturn.c @@ -1,13 +1,13 @@ static void arch_sigreturn(struct tcb *tcp) { - long addr; + unsigned long addr; if (upeek(tcp->pid, REG_FP, &addr) < 0) return; addr += offsetof(struct sigcontext, sc_mask); tprints("{mask="); - print_sigset_addr_len(tcp, addr, NSIG / 8); + print_sigset_addr_len(tcp, addr, NSIG_BYTES); tprints("}"); } diff --git a/linux/alpha/get_scno.c b/linux/alpha/get_scno.c index fc099216f..3ffd78a62 100644 --- a/linux/alpha/get_scno.c +++ b/linux/alpha/get_scno.c @@ -2,7 +2,7 @@ static int arch_get_scno(struct tcb *tcp) { - long scno = 0; + kernel_ulong_t scno = 0; if (upeek(tcp->pid, REG_A3, &alpha_a3) < 0) return -1; @@ -13,10 +13,10 @@ arch_get_scno(struct tcb *tcp) * Do some sanity checks to figure out if it's * really a syscall entry */ - if (!SCNO_IN_RANGE(scno)) { - if (alpha_a3 == 0 || alpha_a3 == -1) { + if (!scno_in_range(scno)) { + if (alpha_a3 == 0 || alpha_a3 == -1UL) { if (debug_flag) - error_msg("stray syscall exit: r0 = %ld", scno); + error_msg("stray syscall exit: r0 = %lu", scno); return 0; } } diff --git a/linux/alpha/set_error.c b/linux/alpha/set_error.c new file mode 100644 index 000000000..bcc5ff864 --- /dev/null +++ b/linux/alpha/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + alpha_r0 = tcp->u_error; + return upoke(tcp->pid, REG_R0, alpha_r0); +} + +static int +arch_set_success(struct tcb *tcp) +{ + return upoke(tcp->pid, REG_A3, (alpha_a3 = 0)) + || upoke(tcp->pid, REG_R0, (alpha_r0 = tcp->u_rval)); +} diff --git a/linux/alpha/set_scno.c b/linux/alpha/set_scno.c new file mode 100644 index 000000000..d5bcfb6de --- /dev/null +++ b/linux/alpha/set_scno.c @@ -0,0 +1,5 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + return upoke(tcp->pid, REG_R0, scno); +} diff --git a/linux/alpha/syscallent.h b/linux/alpha/syscallent.h index eab60a51b..b55f23ad6 100644 --- a/linux/alpha/syscallent.h +++ b/linux/alpha/syscallent.h @@ -473,6 +473,6 @@ [508] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [509] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [510] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[511] = { 3, 0, SEN(getrandom), "getrandom", }, -[512] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[513] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, +[511] = { 3, 0, SEN(getrandom), "getrandom" }, +[512] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[513] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, diff --git a/linux/arc/get_syscall_args.c b/linux/arc/get_syscall_args.c index 4d6ace5c3..85e867f0e 100644 --- a/linux/arc/get_syscall_args.c +++ b/linux/arc/get_syscall_args.c @@ -2,7 +2,7 @@ static int get_syscall_args(struct tcb *tcp) { - long *arc_args = &arc_regs.scratch.r0; + unsigned long *arc_args = &arc_regs.scratch.r0; unsigned int i; for (i = 0; i < MAX_ARGS; ++i) diff --git a/linux/arc/set_error.c b/linux/arc/set_error.c new file mode 100644 index 000000000..afc9bd504 --- /dev/null +++ b/linux/arc/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + arc_regs.scratch.r0 = -tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + arc_regs.scratch.r0 = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/arc/set_scno.c b/linux/arc/set_scno.c new file mode 100644 index 000000000..ea25d74d5 --- /dev/null +++ b/linux/arc/set_scno.c @@ -0,0 +1,6 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + arc_regs.scratch.r8 = scno; + return set_regs(tcp->pid); +} diff --git a/linux/arc/syscallent.h b/linux/arc/syscallent.h index c2db91a1a..edcdff2e4 100644 --- a/linux/arc/syscallent.h +++ b/linux/arc/syscallent.h @@ -1,6 +1,8 @@ #define sys_ARCH_mmap sys_mmap_pgoff #include "32/syscallent.h" /* [244 ... 259] are arch specific */ -[244] = { 3, 0, SEN(printargs), "arc_cacheflush"}, +[244] = { 3, 0, SEN(printargs), "cacheflush" }, [245] = { 1, 0, SEN(printargs), "arc_settls" }, [246] = { 0, 0, SEN(printargs), "arc_gettls" }, +[247] = { 3, 0, SEN(sysfs), "sysfs" }, +[248] = { 3, 0, SEN(printargs), "arc_usr_cmpxchg"}, diff --git a/linux/arm/arch_regs.c b/linux/arm/arch_regs.c index f5c02f0d7..8b73cb864 100644 --- a/linux/arm/arch_regs.c +++ b/linux/arm/arch_regs.c @@ -1,5 +1,5 @@ static struct pt_regs arm_regs; -long *const arm_sp_ptr = &arm_regs.ARM_sp; +unsigned long *const arm_sp_ptr = (unsigned long *) &arm_regs.ARM_sp; #define ARCH_REGS_FOR_GETREGS arm_regs #define ARCH_PC_REG arm_regs.ARM_pc diff --git a/linux/arm/arch_regs.h b/linux/arm/arch_regs.h index bdbc8e95d..4edd50c7e 100644 --- a/linux/arm/arch_regs.h +++ b/linux/arm/arch_regs.h @@ -1 +1 @@ -extern long *const arm_sp_ptr; +extern unsigned long *const arm_sp_ptr; diff --git a/linux/arm/arch_sigreturn.c b/linux/arm/arch_sigreturn.c index 28726a27f..378ba67f9 100644 --- a/linux/arm/arch_sigreturn.c +++ b/linux/arm/arch_sigreturn.c @@ -5,7 +5,7 @@ arch_sigreturn(struct tcb *tcp) #define SIZEOF_STRUCT_SIGCONTEXT (21 * 4) #define OFFSETOF_STRUCT_UCONTEXT_UC_SIGMASK (5 * 4 + SIZEOF_STRUCT_SIGCONTEXT) - const long addr = + const unsigned long addr = #ifdef AARCH64 tcp->currpers == 0 ? (*aarch64_sp_ptr + SIZEOF_STRUCT_SIGINFO + @@ -14,6 +14,6 @@ arch_sigreturn(struct tcb *tcp) (*arm_sp_ptr + OFFSETOF_STRUCT_UCONTEXT_UC_SIGMASK); tprints("{mask="); - print_sigset_addr_len(tcp, addr, NSIG / 8); + print_sigset_addr_len(tcp, addr, NSIG_BYTES); tprints("}"); } diff --git a/linux/arm/get_scno.c b/linux/arm/get_scno.c index 23a167c83..d2bc0682c 100644 --- a/linux/arm/get_scno.c +++ b/linux/arm/get_scno.c @@ -31,7 +31,7 @@ static int arch_get_scno(struct tcb *tcp) { - long scno = 0; + kernel_ulong_t scno = 0; /* Note: we support only 32-bit CPUs, not 26-bit */ @@ -47,7 +47,7 @@ arch_get_scno(struct tcb *tcp) if (errno) return -1; /* EABI syscall convention? */ - if ((unsigned long) scno != 0xef000000) { + if (scno != 0xef000000) { /* No, it's OABI */ if ((scno & 0x0ff00000) != 0x0f900000) { error_msg("pid %d unknown syscall trap 0x%08lx", @@ -72,7 +72,7 @@ arch_get_scno(struct tcb *tcp) * Do some sanity checks to figure out * whether it's really a syscall entry. */ - if (arm_regs.ARM_ip && !SCNO_IN_RANGE(scno)) { + if (arm_regs.ARM_ip && !scno_in_range(scno)) { if (debug_flag) error_msg("pid %d stray syscall exit:" " ARM_ip = %ld, scno = %ld", diff --git a/linux/arm/ioctls_arch0.h b/linux/arm/ioctls_arch0.h index f3cce0f11..f44b4a343 100644 --- a/linux/arm/ioctls_arch0.h +++ b/linux/arm/ioctls_arch0.h @@ -1,2 +1,89 @@ /* Generated by ioctls_gen.sh from definitions found in $linux/arch/arm/include/ tree. */ { "asm/ioctls.h", "FIOQSIZE", 0, 0x545E, 0 }, +{ "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 }, +{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, +{ "linux/kvm.h", "KVM_ARM_VCPU_INIT", _IOC_WRITE, 0xaeae, 0x20 }, +{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 }, +{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c }, +{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, +{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, +{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, +{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 }, +{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x10 }, +{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 }, +{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 }, +{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 }, +{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 }, +{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 }, +{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x00 }, +{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 }, +{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 }, +{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 }, +{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 }, +{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x98 }, +{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 }, +{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x00 }, +{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 }, +{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 }, +{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 }, +{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 }, +{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 }, +{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 }, +{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 }, +{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 }, +{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 }, +{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 }, +{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 }, +{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 }, +{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 }, +{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 }, +{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, +{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, +{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, +{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, +{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, +{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, +{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, +{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, +{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, +{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, +{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, +{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, +{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 }, +{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, +{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, +{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x04 }, +{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 }, +{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 }, +{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 }, +{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x00 }, +{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 }, +{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x08 }, +{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 }, +{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 }, +{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 }, +{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 }, +{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 }, +{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 }, +{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x98 }, +{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 }, +{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x00 }, +{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 }, +{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 }, +{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 }, +{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 }, +{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, +{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, +{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, +{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, +{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, +{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 }, +{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, diff --git a/linux/arm/set_error.c b/linux/arm/set_error.c new file mode 100644 index 000000000..9b303d5c5 --- /dev/null +++ b/linux/arm/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + arm_regs.ARM_r0 = -tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + arm_regs.ARM_r0 = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/arm/set_scno.c b/linux/arm/set_scno.c new file mode 100644 index 000000000..015ed0663 --- /dev/null +++ b/linux/arm/set_scno.c @@ -0,0 +1,18 @@ +#ifndef PTRACE_SET_SYSCALL +# define PTRACE_SET_SYSCALL 23 +#endif +/* + * PTRACE_SET_SYSCALL is supported by linux kernel + * starting with commit v2.6.16-rc1~107^2 + */ + +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + unsigned int n = (uint16_t) scno; + int rc = ptrace(PTRACE_SET_SYSCALL, tcp->pid, NULL, (unsigned long) n); + if (rc && errno != ESRCH) + perror_msg("arch_set_scno: PTRACE_SET_SYSCALL pid:%d scno:%#x", + tcp->pid, n); + return rc; +} diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h index 356468bd5..23e57f639 100644 --- a/linux/arm/syscallent.h +++ b/linux/arm/syscallent.h @@ -407,17 +407,20 @@ [380] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [381] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [382] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[383] = { 3, 0, SEN(seccomp), "seccomp", }, -[384] = { 3, 0, SEN(getrandom), "getrandom", }, -[385] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[386] = { 3, TD, SEN(bpf), "bpf", }, -[387] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[388] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[389] = { 2, 0, SEN(membarrier), "membarrier", }, +[383] = { 3, 0, SEN(seccomp), "seccomp" }, +[384] = { 3, 0, SEN(getrandom), "getrandom" }, +[385] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[386] = { 3, TD, SEN(bpf), "bpf" }, +[387] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[388] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[389] = { 2, 0, SEN(membarrier), "membarrier" }, [390] = { 3, TM, SEN(mlock2), "mlock2" }, [391] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [392] = { 6, TD, SEN(preadv2), "preadv2" }, [393] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[394] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, +[395] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, +[396] = { 1, 0, SEN(pkey_free), "pkey_free" }, #ifdef __ARM_EABI__ # define ARM_FIRST_SHUFFLED_SYSCALL 400 diff --git a/linux/asm_stat.h b/linux/asm_stat.h index 72a67e1d5..a92660202 100644 --- a/linux/asm_stat.h +++ b/linux/asm_stat.h @@ -1,8 +1,6 @@ #ifndef STRACE_ASM_STAT_H #define STRACE_ASM_STAT_H -# include "kernel_types.h" - # undef dev_t # undef gid_t # undef ino_t diff --git a/linux/avr32/set_error.c b/linux/avr32/set_error.c new file mode 100644 index 000000000..f4ef41d6b --- /dev/null +++ b/linux/avr32/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + avr32_regs.r12 = -tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + avr32_regs.r12 = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/avr32/set_scno.c b/linux/avr32/set_scno.c new file mode 100644 index 000000000..66c4db7e9 --- /dev/null +++ b/linux/avr32/set_scno.c @@ -0,0 +1,6 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + avr32_regs.r8 = scno; + return set_regs(tcp->pid); +} diff --git a/linux/avr32/syscallent.h b/linux/avr32/syscallent.h index fbf97922f..d18902f16 100644 --- a/linux/avr32/syscallent.h +++ b/linux/avr32/syscallent.h @@ -341,15 +341,18 @@ [313] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [314] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [315] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[316] = { 3, 0, SEN(seccomp), "seccomp", }, -[317] = { 3, 0, SEN(getrandom), "getrandom", }, -[318] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[319] = { 3, TD, SEN(bpf), "bpf", }, -[320] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, +[316] = { 3, 0, SEN(seccomp), "seccomp" }, +[317] = { 3, 0, SEN(getrandom), "getrandom" }, +[318] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[319] = { 3, TD, SEN(bpf), "bpf" }, +[320] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, [321] = { 4, TN, SEN(accept4), "accept4" }, -[322] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[323] = { 2, 0, SEN(membarrier), "membarrier", }, +[322] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[323] = { 2, 0, SEN(membarrier), "membarrier" }, [324] = { 3, TM, SEN(mlock2), "mlock2" }, [325] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [326] = { 6, TD, SEN(preadv2), "preadv2" }, [327] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[328] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, +[329] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, +[330] = { 1, 0, SEN(pkey_free), "pkey_free" }, diff --git a/linux/bfin/arch_regs.c b/linux/bfin/arch_regs.c index e1aa15e4f..ea76cb986 100644 --- a/linux/bfin/arch_regs.c +++ b/linux/bfin/arch_regs.c @@ -1,2 +1,2 @@ -static long bfin_r0; +static unsigned long bfin_r0; #define ARCH_PC_PEEK_ADDR PT_PC diff --git a/linux/bfin/set_error.c b/linux/bfin/set_error.c new file mode 100644 index 000000000..2bfecda08 --- /dev/null +++ b/linux/bfin/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + bfin_r0 = -tcp->u_error; + return upoke(tcp->pid, PT_R0, bfin_r0); +} + +static int +arch_set_success(struct tcb *tcp) +{ + bfin_r0 = tcp->u_rval; + return upoke(tcp->pid, PT_R0, bfin_r0); +} diff --git a/linux/bfin/set_scno.c b/linux/bfin/set_scno.c new file mode 100644 index 000000000..4508be1a8 --- /dev/null +++ b/linux/bfin/set_scno.c @@ -0,0 +1,5 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + return upoke(tcp->pid, PT_ORIG_P0, scno); +} diff --git a/linux/bfin/syscallent.h b/linux/bfin/syscallent.h index 1f905384b..f4b887165 100644 --- a/linux/bfin/syscallent.h +++ b/linux/bfin/syscallent.h @@ -413,8 +413,8 @@ [385] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [386] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [387] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[388] = { 3, 0, SEN(seccomp), "seccomp", }, -[389] = { 3, 0, SEN(getrandom), "getrandom", }, -[390] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[391] = { 3, TD, SEN(bpf), "bpf", }, -[392] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, +[388] = { 3, 0, SEN(seccomp), "seccomp" }, +[389] = { 3, 0, SEN(getrandom), "getrandom" }, +[390] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[391] = { 3, TD, SEN(bpf), "bpf" }, +[392] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, diff --git a/linux/crisv10/arch_regs.c b/linux/crisv10/arch_regs.c index 8f69b8738..9c372a361 100644 --- a/linux/crisv10/arch_regs.c +++ b/linux/crisv10/arch_regs.c @@ -1,2 +1,2 @@ -static long cris_r10; +static unsigned long cris_r10; #define ARCH_PC_PEEK_ADDR (4 * PT_IRP) diff --git a/linux/crisv10/arch_sigreturn.c b/linux/crisv10/arch_sigreturn.c index 9086d5336..b449d41ec 100644 --- a/linux/crisv10/arch_sigreturn.c +++ b/linux/crisv10/arch_sigreturn.c @@ -1,15 +1,16 @@ static void arch_sigreturn(struct tcb *tcp) { - long regs[PT_MAX + 1]; + unsigned long regs[PT_MAX + 1]; - if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long)regs) < 0) { + if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, regs) < 0) { perror_msg("sigreturn: PTRACE_GETREGS"); return; } - const long addr = regs[PT_USP] + offsetof(struct sigcontext, oldmask); + const unsigned long addr = + regs[PT_USP] + offsetof(struct sigcontext, oldmask); tprints("{mask="); - print_sigset_addr_len(tcp, addr, NSIG / 8); + print_sigset_addr_len(tcp, addr, NSIG_BYTES); tprints("}"); } diff --git a/linux/crisv10/set_error.c b/linux/crisv10/set_error.c new file mode 100644 index 000000000..3a14a87aa --- /dev/null +++ b/linux/crisv10/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + cris_r10 = -tcp->u_error; + return upoke(tcp->pid, 4 * PT_R10, cris_r10); +} + +static int +arch_set_success(struct tcb *tcp) +{ + cris_r10 = tcp->u_rval; + return upoke(tcp->pid, 4 * PT_R10, cris_r10); +} diff --git a/linux/crisv10/set_scno.c b/linux/crisv10/set_scno.c new file mode 100644 index 000000000..0de38fa7d --- /dev/null +++ b/linux/crisv10/set_scno.c @@ -0,0 +1,5 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + return upoke(tcp->pid, 4 * PT_R9, scno); +} diff --git a/linux/crisv10/syscallent.h b/linux/crisv10/syscallent.h new file mode 100644 index 000000000..d411fe718 --- /dev/null +++ b/linux/crisv10/syscallent.h @@ -0,0 +1,358 @@ +[ 0] = { 0, 0, SEN(restart_syscall), "restart_syscall" }, +[ 1] = { 1, TP|SE, SEN(exit), "exit" }, +[ 2] = { 0, TP, SEN(fork), "fork" }, +[ 3] = { 3, TD, SEN(read), "read" }, +[ 4] = { 3, TD, SEN(write), "write" }, +[ 5] = { 3, TD|TF, SEN(open), "open" }, +[ 6] = { 1, TD, SEN(close), "close" }, +[ 7] = { 3, TP, SEN(waitpid), "waitpid" }, +[ 8] = { 2, TD|TF, SEN(creat), "creat" }, +[ 9] = { 2, TF, SEN(link), "link" }, +[ 10] = { 1, TF, SEN(unlink), "unlink" }, +[ 11] = { 3, TF|TP|SE|SI, SEN(execve), "execve" }, +[ 12] = { 1, TF, SEN(chdir), "chdir" }, +[ 13] = { 1, 0, SEN(time), "time" }, +[ 14] = { 3, TF, SEN(mknod), "mknod" }, +[ 15] = { 2, TF, SEN(chmod), "chmod" }, +[ 16] = { 3, TF, SEN(chown16), "lchown" }, +[ 17] = { 0, TM, SEN(break), "break" }, +[ 18] = { 2, TF, SEN(oldstat), "oldstat" }, +[ 19] = { 3, TD, SEN(lseek), "lseek" }, +[ 20] = { 0, NF, SEN(getpid), "getpid" }, +[ 21] = { 5, TF, SEN(mount), "mount" }, +[ 22] = { 1, TF, SEN(umount), "umount" }, +[ 23] = { 1, 0, SEN(setuid16), "setuid" }, +[ 24] = { 0, NF, SEN(getuid16), "getuid" }, +[ 25] = { 1, 0, SEN(stime), "stime" }, +[ 26] = { 4, 0, SEN(ptrace), "ptrace" }, +[ 27] = { 1, 0, SEN(alarm), "alarm" }, +[ 28] = { 2, TD, SEN(oldfstat), "oldfstat" }, +[ 29] = { 0, TS, SEN(pause), "pause" }, +[ 30] = { 2, TF, SEN(utime), "utime" }, +[ 31] = { 2, 0, SEN(stty), "stty" }, +[ 32] = { 2, 0, SEN(gtty), "gtty" }, +[ 33] = { 2, TF, SEN(access), "access" }, +[ 34] = { 1, 0, SEN(nice), "nice" }, +[ 35] = { 0, 0, SEN(ftime), "ftime" }, +[ 36] = { 0, 0, SEN(sync), "sync" }, +[ 37] = { 2, TS, SEN(kill), "kill" }, +[ 38] = { 2, TF, SEN(rename), "rename" }, +[ 39] = { 2, TF, SEN(mkdir), "mkdir" }, +[ 40] = { 1, TF, SEN(rmdir), "rmdir" }, +[ 41] = { 1, TD, SEN(dup), "dup" }, +[ 42] = { 1, TD, SEN(pipe), "pipe" }, +[ 43] = { 1, 0, SEN(times), "times" }, +[ 44] = { 0, 0, SEN(prof), "prof" }, +[ 45] = { 1, TM|SI, SEN(brk), "brk" }, +[ 46] = { 1, 0, SEN(setgid16), "setgid" }, +[ 47] = { 0, NF, SEN(getgid16), "getgid" }, +[ 48] = { 2, TS, SEN(signal), "signal" }, +[ 49] = { 0, NF, SEN(geteuid16), "geteuid" }, +[ 50] = { 0, NF, SEN(getegid16), "getegid" }, +[ 51] = { 1, TF, SEN(acct), "acct" }, +[ 52] = { 2, TF, SEN(umount2), "umount2" }, +[ 53] = { 0, 0, SEN(lock), "lock" }, +[ 54] = { 3, TD, SEN(ioctl), "ioctl" }, +[ 55] = { 3, TD, SEN(fcntl), "fcntl" }, +[ 56] = { 0, 0, SEN(mpx), "mpx" }, +[ 57] = { 2, 0, SEN(setpgid), "setpgid" }, +[ 58] = { 2, 0, SEN(ulimit), "ulimit" }, +[ 59] = { 1, 0, SEN(oldolduname), "oldolduname" }, +[ 60] = { 1, NF, SEN(umask), "umask" }, +[ 61] = { 1, TF, SEN(chroot), "chroot" }, +[ 62] = { 2, 0, SEN(ustat), "ustat" }, +[ 63] = { 2, TD, SEN(dup2), "dup2" }, +[ 64] = { 0, NF, SEN(getppid), "getppid" }, +[ 65] = { 0, 0, SEN(getpgrp), "getpgrp" }, +[ 66] = { 0, 0, SEN(setsid), "setsid" }, +[ 67] = { 3, TS, SEN(sigaction), "sigaction" }, +[ 68] = { 0, TS, SEN(siggetmask), "sgetmask" }, +[ 69] = { 1, TS, SEN(sigsetmask), "ssetmask" }, +[ 70] = { 2, 0, SEN(setreuid16), "setreuid" }, +[ 71] = { 2, 0, SEN(setregid16), "setregid" }, +[ 72] = { 3, TS, SEN(sigsuspend), "sigsuspend" }, +[ 73] = { 1, TS, SEN(sigpending), "sigpending" }, +[ 74] = { 2, 0, SEN(sethostname), "sethostname" }, +[ 75] = { 2, 0, SEN(setrlimit), "setrlimit" }, +[ 76] = { 2, 0, SEN(getrlimit), "getrlimit" }, +[ 77] = { 2, 0, SEN(getrusage), "getrusage" }, +[ 78] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, +[ 79] = { 2, 0, SEN(settimeofday), "settimeofday" }, +[ 80] = { 2, 0, SEN(getgroups16), "getgroups" }, +[ 81] = { 2, 0, SEN(setgroups16), "setgroups" }, +[ 82] = { 1, TD, SEN(oldselect), "select" }, +[ 83] = { 2, TF, SEN(symlink), "symlink" }, +[ 84] = { 2, TF, SEN(oldlstat), "oldlstat" }, +[ 85] = { 3, TF, SEN(readlink), "readlink" }, +[ 86] = { 1, TF, SEN(uselib), "uselib" }, +[ 87] = { 2, TF, SEN(swapon), "swapon" }, +[ 88] = { 4, 0, SEN(reboot), "reboot" }, +[ 89] = { 3, TD, SEN(readdir), "readdir" }, +[ 90] = { 1, TD|TM|SI, SEN(old_mmap), "mmap" }, +[ 91] = { 2, TM|SI, SEN(munmap), "munmap" }, +[ 92] = { 2, TF, SEN(truncate), "truncate" }, +[ 93] = { 2, TD, SEN(ftruncate), "ftruncate" }, +[ 94] = { 2, TD, SEN(fchmod), "fchmod" }, +[ 95] = { 3, TD, SEN(fchown16), "fchown" }, +[ 96] = { 2, 0, SEN(getpriority), "getpriority" }, +[ 97] = { 3, 0, SEN(setpriority), "setpriority" }, +[ 98] = { 4, 0, SEN(profil), "profil" }, +[ 99] = { 2, TF, SEN(statfs), "statfs" }, +[100] = { 2, TD, SEN(fstatfs), "fstatfs" }, +[101] = { 3, 0, SEN(ioperm), "ioperm" }, +[102] = { 2, TD, SEN(socketcall), "socketcall" }, +[103] = { 3, 0, SEN(syslog), "syslog" }, +[104] = { 3, 0, SEN(setitimer), "setitimer" }, +[105] = { 2, 0, SEN(getitimer), "getitimer" }, +[106] = { 2, TF, SEN(stat), "stat" }, +[107] = { 2, TF, SEN(lstat), "lstat" }, +[108] = { 2, TD, SEN(fstat), "fstat" }, +[109] = { 1, 0, SEN(olduname), "olduname" }, +[110] = { 1, 0, SEN(iopl), "iopl" }, +[111] = { 0, 0, SEN(vhangup), "vhangup" }, +[112] = { 0, 0, SEN(idle), "idle" }, +[113] = { 5, 0, SEN(vm86), "vm86" }, +[114] = { 4, TP, SEN(wait4), "wait4" }, +[115] = { 1, TF, SEN(swapoff), "swapoff" }, +[116] = { 1, 0, SEN(sysinfo), "sysinfo" }, +[117] = { 6, TI, SEN(ipc), "ipc" }, +[118] = { 1, TD, SEN(fsync), "fsync" }, +[119] = { 0, TS, SEN(sigreturn), "sigreturn" }, +[120] = { 5, TP, SEN(clone), "clone" }, +[121] = { 2, 0, SEN(setdomainname), "setdomainname" }, +[122] = { 1, 0, SEN(uname), "uname" }, +[123] = { 3, 0, SEN(modify_ldt), "modify_ldt" }, +[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, +[126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, +[127] = { 2, 0, SEN(create_module), "create_module" }, +[128] = { 3, 0, SEN(init_module), "init_module" }, +[129] = { 2, 0, SEN(delete_module), "delete_module" }, +[130] = { 1, 0, SEN(get_kernel_syms), "get_kernel_syms" }, +[131] = { 4, TF, SEN(quotactl), "quotactl" }, +[132] = { 1, 0, SEN(getpgid), "getpgid" }, +[133] = { 1, TD, SEN(fchdir), "fchdir" }, +[134] = { 2, 0, SEN(bdflush), "bdflush" }, +[135] = { 3, 0, SEN(sysfs), "sysfs" }, +[136] = { 1, NF, SEN(personality), "personality" }, +[137] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, +[138] = { 1, NF, SEN(setfsuid16), "setfsuid" }, +[139] = { 1, NF, SEN(setfsgid16), "setfsgid" }, +[140] = { 5, TD, SEN(llseek), "_llseek" }, +[141] = { 3, TD, SEN(getdents), "getdents" }, +[142] = { 5, TD, SEN(select), "_newselect" }, +[143] = { 2, TD, SEN(flock), "flock" }, +[144] = { 3, TM, SEN(msync), "msync" }, +[145] = { 3, TD, SEN(readv), "readv" }, +[146] = { 3, TD, SEN(writev), "writev" }, +[147] = { 1, 0, SEN(getsid), "getsid" }, +[148] = { 1, TD, SEN(fdatasync), "fdatasync" }, +[149] = { 1, 0, SEN(sysctl), "_sysctl" }, +[150] = { 2, TM, SEN(mlock), "mlock" }, +[151] = { 2, TM, SEN(munlock), "munlock" }, +[152] = { 1, TM, SEN(mlockall), "mlockall" }, +[153] = { 0, TM, SEN(munlockall), "munlockall" }, +[154] = { 2, 0, SEN(sched_setparam), "sched_setparam" }, +[155] = { 2, 0, SEN(sched_getparam), "sched_getparam" }, +[156] = { 3, 0, SEN(sched_setscheduler), "sched_setscheduler" }, +[157] = { 1, 0, SEN(sched_getscheduler), "sched_getscheduler" }, +[158] = { 0, 0, SEN(sched_yield), "sched_yield" }, +[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"}, +[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"}, +[161] = { 2, 0, SEN(sched_rr_get_interval), "sched_rr_get_interval" }, +[162] = { 2, 0, SEN(nanosleep), "nanosleep" }, +[163] = { 5, TM|SI, SEN(mremap), "mremap" }, +[164] = { 3, 0, SEN(setresuid16), "setresuid" }, +[165] = { 3, 0, SEN(getresuid16), "getresuid" }, +[167] = { 5, 0, SEN(query_module), "query_module" }, +[168] = { 3, TD, SEN(poll), "poll" }, +[169] = { 3, 0, SEN(nfsservctl), "nfsservctl" }, +[170] = { 3, 0, SEN(setresgid16), "setresgid" }, +[171] = { 3, 0, SEN(getresgid16), "getresgid" }, +[172] = { 5, 0, SEN(prctl), "prctl" }, +[173] = { 0, TS, SEN(rt_sigreturn), "rt_sigreturn" }, +[174] = { 4, TS, SEN(rt_sigaction), "rt_sigaction" }, +[175] = { 4, TS, SEN(rt_sigprocmask), "rt_sigprocmask" }, +[176] = { 2, TS, SEN(rt_sigpending), "rt_sigpending" }, +[177] = { 4, TS, SEN(rt_sigtimedwait), "rt_sigtimedwait" }, +[178] = { 3, TS, SEN(rt_sigqueueinfo), "rt_sigqueueinfo" }, +[179] = { 2, TS, SEN(rt_sigsuspend), "rt_sigsuspend" }, +[180] = { 5, TD, SEN(pread), "pread64" }, +[181] = { 5, TD, SEN(pwrite), "pwrite64" }, +[182] = { 3, TF, SEN(chown16), "chown" }, +[183] = { 2, TF, SEN(getcwd), "getcwd" }, +[184] = { 2, 0, SEN(capget), "capget" }, +[185] = { 2, 0, SEN(capset), "capset" }, +[186] = { 2, TS, SEN(sigaltstack), "sigaltstack" }, +[187] = { 4, TD|TN, SEN(sendfile), "sendfile" }, +[188] = { 5, TN, SEN(getpmsg), "getpmsg" }, +[189] = { 5, TN, SEN(putpmsg), "putpmsg" }, +[190] = { 0, TP, SEN(vfork), "vfork" }, +[191] = { 2, 0, SEN(getrlimit), "ugetrlimit" }, +[192] = { 6, TD|TM|SI, SEN(mmap_pgoff), "mmap2" }, +[193] = { 3, TF, SEN(truncate64), "truncate64" }, +[194] = { 3, TD, SEN(ftruncate64), "ftruncate64" }, +[195] = { 2, TF, SEN(stat64), "stat64" }, +[196] = { 2, TF, SEN(lstat64), "lstat64" }, +[197] = { 2, TD, SEN(fstat64), "fstat64" }, +[198] = { 3, TF, SEN(chown), "lchown32" }, +[199] = { 0, NF, SEN(getuid), "getuid32" }, +[200] = { 0, NF, SEN(getgid), "getgid32" }, +[201] = { 0, NF, SEN(geteuid), "geteuid32" }, +[202] = { 0, NF, SEN(getegid), "getegid32" }, +[203] = { 2, 0, SEN(setreuid), "setreuid32" }, +[204] = { 2, 0, SEN(setregid), "setregid32" }, +[205] = { 2, 0, SEN(getgroups), "getgroups32" }, +[206] = { 2, 0, SEN(setgroups), "setgroups32" }, +[207] = { 3, TD, SEN(fchown), "fchown32" }, +[208] = { 3, 0, SEN(setresuid), "setresuid32" }, +[209] = { 3, 0, SEN(getresuid), "getresuid32" }, +[210] = { 3, 0, SEN(setresgid), "setresgid32" }, +[211] = { 3, 0, SEN(getresgid), "getresgid32" }, +[212] = { 3, TF, SEN(chown), "chown32" }, +[213] = { 1, 0, SEN(setuid), "setuid32" }, +[214] = { 1, 0, SEN(setgid), "setgid32" }, +[215] = { 1, NF, SEN(setfsuid), "setfsuid32" }, +[216] = { 1, NF, SEN(setfsgid), "setfsgid32" }, +[217] = { 2, TF, SEN(pivotroot), "pivot_root" }, +[218] = { 3, TM, SEN(mincore), "mincore" }, +[219] = { 3, TM, SEN(madvise), "madvise" }, +[220] = { 3, TD, SEN(getdents64), "getdents64" }, +[221] = { 3, TD, SEN(fcntl64), "fcntl64" }, +[224] = { 0, NF, SEN(gettid), "gettid" }, +[225] = { 4, TD, SEN(readahead), "readahead" }, +[226] = { 5, TF, SEN(setxattr), "setxattr" }, +[227] = { 5, TF, SEN(setxattr), "lsetxattr" }, +[228] = { 5, TD, SEN(fsetxattr), "fsetxattr" }, +[229] = { 4, TF, SEN(getxattr), "getxattr" }, +[230] = { 4, TF, SEN(getxattr), "lgetxattr" }, +[231] = { 4, TD, SEN(fgetxattr), "fgetxattr" }, +[232] = { 3, TF, SEN(listxattr), "listxattr" }, +[233] = { 3, TF, SEN(listxattr), "llistxattr" }, +[234] = { 3, TD, SEN(flistxattr), "flistxattr" }, +[235] = { 2, TF, SEN(removexattr), "removexattr" }, +[236] = { 2, TF, SEN(removexattr), "lremovexattr" }, +[237] = { 2, TD, SEN(fremovexattr), "fremovexattr" }, +[238] = { 2, TS, SEN(kill), "tkill" }, +[239] = { 4, TD|TN, SEN(sendfile64), "sendfile64" }, +[240] = { 6, 0, SEN(futex), "futex" }, +[241] = { 3, 0, SEN(sched_setaffinity), "sched_setaffinity" }, +[242] = { 3, 0, SEN(sched_getaffinity), "sched_getaffinity" }, +[243] = { 1, 0, SEN(set_thread_area), "set_thread_area" }, +[244] = { 1, 0, SEN(get_thread_area), "get_thread_area" }, +[245] = { 2, TM, SEN(io_setup), "io_setup" }, +[246] = { 1, TM, SEN(io_destroy), "io_destroy" }, +[247] = { 5, 0, SEN(io_getevents), "io_getevents" }, +[248] = { 3, 0, SEN(io_submit), "io_submit" }, +[249] = { 3, 0, SEN(io_cancel), "io_cancel" }, +[250] = { 5, TD, SEN(fadvise64), "fadvise64" }, +[252] = { 1, TP|SE, SEN(exit), "exit_group" }, +[253] = { 4, 0, SEN(lookup_dcookie), "lookup_dcookie" }, +[254] = { 1, TD, SEN(epoll_create), "epoll_create" }, +[255] = { 4, TD, SEN(epoll_ctl), "epoll_ctl" }, +[256] = { 4, TD, SEN(epoll_wait), "epoll_wait" }, +[257] = { 5, TM|SI, SEN(remap_file_pages), "remap_file_pages" }, +[258] = { 1, 0, SEN(set_tid_address), "set_tid_address" }, +[259] = { 3, 0, SEN(timer_create), "timer_create" }, +[260] = { 4, 0, SEN(timer_settime), "timer_settime" }, +[261] = { 2, 0, SEN(timer_gettime), "timer_gettime" }, +[262] = { 1, 0, SEN(timer_getoverrun), "timer_getoverrun" }, +[263] = { 1, 0, SEN(timer_delete), "timer_delete" }, +[264] = { 2, 0, SEN(clock_settime), "clock_settime" }, +[265] = { 2, 0, SEN(clock_gettime), "clock_gettime" }, +[266] = { 2, 0, SEN(clock_getres), "clock_getres" }, +[267] = { 4, 0, SEN(clock_nanosleep), "clock_nanosleep" }, +[268] = { 3, TF, SEN(statfs64), "statfs64" }, +[269] = { 3, TD, SEN(fstatfs64), "fstatfs64" }, +[270] = { 3, TS, SEN(tgkill), "tgkill" }, +[271] = { 2, TF, SEN(utimes), "utimes" }, +[272] = { 6, TD, SEN(fadvise64_64), "fadvise64_64" }, +[273] = { 5, 0, SEN(vserver), "vserver" }, +[274] = { 6, TM, SEN(mbind), "mbind" }, +[275] = { 5, TM, SEN(get_mempolicy), "get_mempolicy" }, +[276] = { 3, TM, SEN(set_mempolicy), "set_mempolicy" }, +[277] = { 4, 0, SEN(mq_open), "mq_open" }, +[278] = { 1, 0, SEN(mq_unlink), "mq_unlink" }, +[279] = { 5, 0, SEN(mq_timedsend), "mq_timedsend" }, +[280] = { 5, 0, SEN(mq_timedreceive), "mq_timedreceive" }, +[281] = { 2, 0, SEN(mq_notify), "mq_notify" }, +[282] = { 3, 0, SEN(mq_getsetattr), "mq_getsetattr" }, +[283] = { 4, 0, SEN(kexec_load), "kexec_load" }, +[284] = { 5, TP, SEN(waitid), "waitid" }, +[286] = { 5, 0, SEN(add_key), "add_key" }, +[287] = { 4, 0, SEN(request_key), "request_key" }, +[288] = { 5, 0, SEN(keyctl), "keyctl" }, +[289] = { 3, 0, SEN(ioprio_set), "ioprio_set" }, +[290] = { 2, 0, SEN(ioprio_get), "ioprio_get" }, +[291] = { 0, TD, SEN(inotify_init), "inotify_init" }, +[292] = { 3, TD, SEN(inotify_add_watch), "inotify_add_watch" }, +[293] = { 2, TD, SEN(inotify_rm_watch), "inotify_rm_watch" }, +[294] = { 4, TM, SEN(migrate_pages), "migrate_pages" }, +[295] = { 4, TD|TF, SEN(openat), "openat" }, +[296] = { 3, TD|TF, SEN(mkdirat), "mkdirat" }, +[297] = { 4, TD|TF, SEN(mknodat), "mknodat" }, +[298] = { 5, TD|TF, SEN(fchownat), "fchownat" }, +[299] = { 3, TD|TF, SEN(futimesat), "futimesat" }, +[300] = { 4, TD|TF, SEN(fstatat64), "fstatat64" }, +[301] = { 3, TD|TF, SEN(unlinkat), "unlinkat" }, +[302] = { 4, TD|TF, SEN(renameat), "renameat" }, +[303] = { 5, TD|TF, SEN(linkat), "linkat" }, +[304] = { 3, TD|TF, SEN(symlinkat), "symlinkat" }, +[305] = { 4, TD|TF, SEN(readlinkat), "readlinkat" }, +[306] = { 3, TD|TF, SEN(fchmodat), "fchmodat" }, +[307] = { 3, TD|TF, SEN(faccessat), "faccessat" }, +[308] = { 6, TD, SEN(pselect6), "pselect6" }, +[309] = { 5, TD, SEN(ppoll), "ppoll" }, +[310] = { 1, TP, SEN(unshare), "unshare" }, +[311] = { 2, 0, SEN(set_robust_list), "set_robust_list" }, +[312] = { 3, 0, SEN(get_robust_list), "get_robust_list" }, +[313] = { 6, TD, SEN(splice), "splice" }, +[314] = { 6, TD, SEN(sync_file_range), "sync_file_range" }, +[315] = { 4, TD, SEN(tee), "tee" }, +[316] = { 4, TD, SEN(vmsplice), "vmsplice" }, +[317] = { 6, TM, SEN(move_pages), "move_pages" }, +[318] = { 3, 0, SEN(getcpu), "getcpu" }, +[319] = { 6, TD, SEN(epoll_pwait), "epoll_pwait" }, +[320] = { 4, TD|TF, SEN(utimensat), "utimensat" }, +[321] = { 3, TD|TS, SEN(signalfd), "signalfd" }, +[322] = { 2, TD, SEN(timerfd_create), "timerfd_create" }, +[323] = { 1, TD, SEN(eventfd), "eventfd" }, +[324] = { 6, TD, SEN(fallocate), "fallocate" }, +[325] = { 4, TD, SEN(timerfd_settime), "timerfd_settime" }, +[326] = { 2, TD, SEN(timerfd_gettime), "timerfd_gettime" }, +[327] = { 4, TD|TS, SEN(signalfd4), "signalfd4" }, +[328] = { 2, TD, SEN(eventfd2), "eventfd2" }, +[329] = { 1, TD, SEN(epoll_create1), "epoll_create1" }, +[330] = { 3, TD, SEN(dup3), "dup3" }, +[331] = { 2, TD, SEN(pipe2), "pipe2" }, +[332] = { 1, TD, SEN(inotify_init1), "inotify_init1" }, +[333] = { 5, TD, SEN(preadv), "preadv" }, +[334] = { 5, TD, SEN(pwritev), "pwritev" }, +[335] = { 2, TD, SEN(setns), "setns" }, +[336] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, +[337] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, +[338] = { 4, TP|TS, SEN(rt_tgsigqueueinfo), "rt_tgsigqueueinfo" }, +[339] = { 5, TD, SEN(perf_event_open), "perf_event_open" }, +[340] = { 5, TN, SEN(recvmmsg), "recvmmsg" }, +[341] = { 4, TN, SEN(accept4), "accept4" }, +[342] = { 2, TD, SEN(fanotify_init), "fanotify_init" }, +[343] = { 6, TD|TF, SEN(fanotify_mark), "fanotify_mark" }, +[344] = { 4, 0, SEN(prlimit64), "prlimit64" }, +[345] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[346] = { 1, TD, SEN(syncfs), "syncfs" }, +[347] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, +[348] = { 6, 0, SEN(process_vm_readv), "process_vm_readv" }, +[349] = { 6, 0, SEN(process_vm_writev), "process_vm_writev" }, +[350] = { 5, 0, SEN(kcmp), "kcmp" }, +[351] = { 3, TD, SEN(finit_module), "finit_module" }, +[352] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, +[353] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, +[354] = { 5, TD|TF, SEN(renameat2), "renameat2" }, +[355] = { 3, 0, SEN(seccomp), "seccomp" }, +[356] = { 3, 0, SEN(getrandom), "getrandom" }, +[357] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[358] = { 3, TD, SEN(bpf), "bpf" }, +[359] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, + +#define SYS_socket_subcall 400 +#include "subcall.h" diff --git a/linux/crisv32/set_error.c b/linux/crisv32/set_error.c new file mode 100644 index 000000000..18a5ee8cc --- /dev/null +++ b/linux/crisv32/set_error.c @@ -0,0 +1 @@ +#include "crisv10/set_error.c" diff --git a/linux/crisv32/set_scno.c b/linux/crisv32/set_scno.c new file mode 100644 index 000000000..b021adf12 --- /dev/null +++ b/linux/crisv32/set_scno.c @@ -0,0 +1 @@ +#include "crisv10/set_scno.c" diff --git a/linux/crisv32/syscallent.h b/linux/crisv32/syscallent.h new file mode 100644 index 000000000..ce4e5284a --- /dev/null +++ b/linux/crisv32/syscallent.h @@ -0,0 +1 @@ +#include "crisv10/syscallent.h" diff --git a/linux/dummy.h b/linux/dummy.h index 87d21277a..2758cfb29 100644 --- a/linux/dummy.h +++ b/linux/dummy.h @@ -39,15 +39,18 @@ #define sys_vm86old printargs /* machine-specific */ -#if !(defined I386 || defined X86_64 || defined X32) +#ifndef HAVE_STRUCT_USER_DESC # define sys_modify_ldt printargs -# ifndef M68K -# define sys_get_thread_area printargs -# ifndef MIPS -# define sys_set_thread_area printargs -# endif -# endif #endif + +#if !(defined HAVE_STRUCT_USER_DESC || defined M68K || defined MIPS) +# define sys_set_thread_area printargs +#endif + +#if !(defined HAVE_STRUCT_USER_DESC || defined M68K) +# define sys_get_thread_area printargs +#endif + #ifdef ALPHA # define sys_getdtablesize printargs #endif @@ -123,6 +126,7 @@ #define sys_alarm printargs_u /* printargs_d does the right thing */ +#define sys_exit printargs_d #define sys_getpgid printargs_d #define sys_getsid printargs_d #define sys_nice printargs_d @@ -134,6 +138,7 @@ /* unimplemented */ #define sys_afs_syscall printargs #define sys_break printargs +#define sys_create_module printargs #define sys_ftime printargs #define sys_get_kernel_syms printargs #define sys_getpmsg printargs @@ -151,7 +156,6 @@ #define sys_timerfd printargs #define sys_tuxcall printargs #define sys_ulimit printargs -#define sys_ustat printargs #define sys_vserver printargs /* deprecated */ diff --git a/linux/getregs_old.h b/linux/getregs_old.h new file mode 100644 index 000000000..fd2c3a3d4 --- /dev/null +++ b/linux/getregs_old.h @@ -0,0 +1 @@ +#undef HAVE_GETREGS_OLD diff --git a/linux/hppa/arch_regs.c b/linux/hppa/arch_regs.c index 65432abb4..7113bdb68 100644 --- a/linux/hppa/arch_regs.c +++ b/linux/hppa/arch_regs.c @@ -1,2 +1,2 @@ -static long hppa_r28; +static unsigned long hppa_r28; #define ARCH_PC_PEEK_ADDR PT_IAOQ0 diff --git a/linux/hppa/set_error.c b/linux/hppa/set_error.c new file mode 100644 index 000000000..92a7979f8 --- /dev/null +++ b/linux/hppa/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + hppa_r28 = -tcp->u_error; + return upoke(tcp->pid, PT_GR28, hppa_r28); +} + +static int +arch_set_success(struct tcb *tcp) +{ + hppa_r28 = tcp->u_rval; + return upoke(tcp->pid, PT_GR28, hppa_r28); +} diff --git a/linux/hppa/set_scno.c b/linux/hppa/set_scno.c new file mode 100644 index 000000000..d4d873bee --- /dev/null +++ b/linux/hppa/set_scno.c @@ -0,0 +1,5 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + return upoke(tcp->pid, PT_GR20, scno); +} diff --git a/linux/hppa/syscallent.h b/linux/hppa/syscallent.h index de0e11d08..97e2a3273 100644 --- a/linux/hppa/syscallent.h +++ b/linux/hppa/syscallent.h @@ -340,13 +340,13 @@ [335] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [336] = { 2, TF, SEN(utimes), "utimes" }, [337] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[338] = { 3, 0, SEN(seccomp), "seccomp", }, -[339] = { 3, 0, SEN(getrandom), "getrandom", }, -[340] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[341] = { 3, TD, SEN(bpf), "bpf", }, -[342] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[343] = { 2, 0, SEN(membarrier), "membarrier", }, -[344] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, +[338] = { 3, 0, SEN(seccomp), "seccomp" }, +[339] = { 3, 0, SEN(getrandom), "getrandom" }, +[340] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[341] = { 3, TD, SEN(bpf), "bpf" }, +[342] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[343] = { 2, 0, SEN(membarrier), "membarrier" }, +[344] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, [345] = { 3, TM, SEN(mlock2), "mlock2" }, [346] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [347] = { 6, TD, SEN(preadv2), "preadv2" }, diff --git a/linux/i386/arch_regs.c b/linux/i386/arch_regs.c index ef3004654..0dcea1f05 100644 --- a/linux/i386/arch_regs.c +++ b/linux/i386/arch_regs.c @@ -1,5 +1,5 @@ static struct user_regs_struct i386_regs; -long *const i386_esp_ptr = &i386_regs.esp; +unsigned long *const i386_esp_ptr = (unsigned long *) &i386_regs.esp; #define ARCH_REGS_FOR_GETREGS i386_regs #define ARCH_PC_REG i386_regs.eip diff --git a/linux/i386/arch_regs.h b/linux/i386/arch_regs.h index 77984ff7c..6f6220920 100644 --- a/linux/i386/arch_regs.h +++ b/linux/i386/arch_regs.h @@ -1 +1 @@ -extern long *const i386_esp_ptr; +extern unsigned long *const i386_esp_ptr; diff --git a/linux/i386/ioctls_arch0.h b/linux/i386/ioctls_arch0.h index 0a359350f..e5b81a9d9 100644 --- a/linux/i386/ioctls_arch0.h +++ b/linux/i386/ioctls_arch0.h @@ -14,3 +14,113 @@ { "asm/mtrr.h", "MTRRIOC_KILL_PAGE_ENTRY", _IOC_WRITE, 0x4d09, 0x0c }, { "asm/mtrr.h", "MTRRIOC_SET_ENTRY", _IOC_WRITE, 0x4d01, 0x0c }, { "asm/mtrr.h", "MTRRIOC_SET_PAGE_ENTRY", _IOC_WRITE, 0x4d06, 0x0c }, +{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, +{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 }, +{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c }, +{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, +{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, +{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, +{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 }, +{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x0c }, +{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 }, +{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 }, +{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 }, +{ "linux/kvm.h", "KVM_GET_CPUID2", _IOC_READ|_IOC_WRITE, 0xae91, 0x08 }, +{ "linux/kvm.h", "KVM_GET_DEBUGREGS", _IOC_READ, 0xaea1, 0x80 }, +{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 }, +{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 }, +{ "linux/kvm.h", "KVM_GET_EMULATED_CPUID", _IOC_READ|_IOC_WRITE, 0xae09, 0x08 }, +{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x1a0 }, +{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 }, +{ "linux/kvm.h", "KVM_GET_LAPIC", _IOC_READ, 0xae8e, 0x400 }, +{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 }, +{ "linux/kvm.h", "KVM_GET_MSRS", _IOC_READ|_IOC_WRITE, 0xae88, 0x08 }, +{ "linux/kvm.h", "KVM_GET_MSR_INDEX_LIST", _IOC_READ|_IOC_WRITE, 0xae02, 0x04 }, +{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 }, +{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 }, +{ "linux/kvm.h", "KVM_GET_PIT", _IOC_READ|_IOC_WRITE, 0xae65, 0x48 }, +{ "linux/kvm.h", "KVM_GET_PIT2", _IOC_READ, 0xae9f, 0x70 }, +{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x90 }, +{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 }, +{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x138 }, +{ "linux/kvm.h", "KVM_GET_SUPPORTED_CPUID", _IOC_READ|_IOC_WRITE, 0xae05, 0x08 }, +{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 }, +{ "linux/kvm.h", "KVM_GET_VCPU_EVENTS", _IOC_READ, 0xae9f, 0x40 }, +{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 }, +{ "linux/kvm.h", "KVM_GET_XCRS", _IOC_READ, 0xaea6, 0x188 }, +{ "linux/kvm.h", "KVM_GET_XSAVE", _IOC_READ, 0xaea4, 0x1000 }, +{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 }, +{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 }, +{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 }, +{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 }, +{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 }, +{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 }, +{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 }, +{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 }, +{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 }, +{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 }, +{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 }, +{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 }, +{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, +{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, +{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, +{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, +{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, +{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, +{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, +{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, +{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, +{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, +{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, +{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, +{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 }, +{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, +{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, +{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x04 }, +{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 }, +{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 }, +{ "linux/kvm.h", "KVM_SET_CPUID", _IOC_WRITE, 0xae8a, 0x08 }, +{ "linux/kvm.h", "KVM_SET_CPUID2", _IOC_WRITE, 0xae90, 0x08 }, +{ "linux/kvm.h", "KVM_SET_DEBUGREGS", _IOC_WRITE, 0xaea2, 0x80 }, +{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 }, +{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x1a0 }, +{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 }, +{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x48 }, +{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 }, +{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 }, +{ "linux/kvm.h", "KVM_SET_LAPIC", _IOC_WRITE, 0xae8f, 0x400 }, +{ "linux/kvm.h", "KVM_SET_MEMORY_ALIAS", _IOC_WRITE, 0xae43, 0x20 }, +{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 }, +{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 }, +{ "linux/kvm.h", "KVM_SET_MSRS", _IOC_WRITE, 0xae89, 0x08 }, +{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 }, +{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 }, +{ "linux/kvm.h", "KVM_SET_PIT", _IOC_READ, 0xae66, 0x48 }, +{ "linux/kvm.h", "KVM_SET_PIT2", _IOC_WRITE, 0xaea0, 0x70 }, +{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x90 }, +{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 }, +{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x138 }, +{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 }, +{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 }, +{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 }, +{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 }, +{ "linux/kvm.h", "KVM_SET_VCPU_EVENTS", _IOC_WRITE, 0xaea0, 0x40 }, +{ "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 }, +{ "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 }, +{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, +{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, +{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, +{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, +{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, +{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 }, +{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, +{ "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 }, +{ "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 }, diff --git a/linux/i386/set_error.c b/linux/i386/set_error.c new file mode 100644 index 000000000..92b0a8d75 --- /dev/null +++ b/linux/i386/set_error.c @@ -0,0 +1,21 @@ +static int +arch_set_error(struct tcb *tcp) +{ + i386_regs.eax = -tcp->u_error; +#ifdef HAVE_GETREGS_OLD + return upoke(tcp->pid, 4 * EAX, i386_regs.eax); +#else + return set_regs(tcp->pid); +#endif +} + +static int +arch_set_success(struct tcb *tcp) +{ + i386_regs.eax = tcp->u_rval; +#ifdef HAVE_GETREGS_OLD + return upoke(tcp->pid, 4 * EAX, i386_regs.eax); +#else + return set_regs(tcp->pid); +#endif +} diff --git a/linux/i386/set_scno.c b/linux/i386/set_scno.c new file mode 100644 index 000000000..3abe7768b --- /dev/null +++ b/linux/i386/set_scno.c @@ -0,0 +1,10 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ +#ifdef HAVE_GETREGS_OLD + return upoke(tcp->pid, 4 * ORIG_EAX, scno); +#else + i386_regs.orig_eax = scno; + return set_regs(tcp->pid); +#endif +} diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h index 307f46ada..31023c20d 100644 --- a/linux/i386/syscallent.h +++ b/linux/i386/syscallent.h @@ -379,11 +379,11 @@ [351] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [352] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [353] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[354] = { 3, 0, SEN(seccomp), "seccomp", }, -[355] = { 3, 0, SEN(getrandom), "getrandom", }, -[356] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[357] = { 3, TD, SEN(bpf), "bpf", }, -[358] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, +[354] = { 3, 0, SEN(seccomp), "seccomp" }, +[355] = { 3, 0, SEN(getrandom), "getrandom" }, +[356] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[357] = { 3, TD, SEN(bpf), "bpf" }, +[358] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, [359] = { 3, TN, SEN(socket), "socket" }, [360] = { 4, TN, SEN(socketpair), "socketpair" }, [361] = { 3, TN, SEN(bind), "bind" }, @@ -399,12 +399,15 @@ [371] = { 6, TN, SEN(recvfrom), "recvfrom" }, [372] = { 3, TN, SEN(recvmsg), "recvmsg" }, [373] = { 2, TN, SEN(shutdown), "shutdown" }, -[374] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[375] = { 2, 0, SEN(membarrier), "membarrier", }, +[374] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[375] = { 2, 0, SEN(membarrier), "membarrier" }, [376] = { 3, TM, SEN(mlock2), "mlock2" }, [377] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [378] = { 6, TD, SEN(preadv2), "preadv2" }, [379] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[380] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, +[381] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, +[382] = { 1, 0, SEN(pkey_free), "pkey_free" }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/ia64/arch_regs.c b/linux/ia64/arch_regs.c index 14fffd5c4..deec1769d 100644 --- a/linux/ia64/arch_regs.c +++ b/linux/ia64/arch_regs.c @@ -1,7 +1,7 @@ static struct pt_all_user_regs ia64_regs; unsigned long *const ia64_frame_ptr = &ia64_regs.gr[12]; -#define IA64_PSR_IS ((long)1 << 34) +#define IA64_PSR_IS (1UL << 34) #define ia64_ia32mode (ia64_regs.cr_ipsr & IA64_PSR_IS) #define ARCH_REGS_FOR_GETREGS ia64_regs diff --git a/linux/ia64/arch_sigreturn.c b/linux/ia64/arch_sigreturn.c index 8b54d6c15..0c0034f9c 100644 --- a/linux/ia64/arch_sigreturn.c +++ b/linux/ia64/arch_sigreturn.c @@ -3,10 +3,10 @@ arch_sigreturn(struct tcb *tcp) { /* offsetof(struct sigframe, sc) */ #define OFFSETOF_STRUCT_SIGFRAME_SC 0xA0 - const long addr = *ia64_frame_ptr + 16 + - OFFSETOF_STRUCT_SIGFRAME_SC + - offsetof(struct sigcontext, sc_mask); + const unsigned long addr = *ia64_frame_ptr + 16 + + OFFSETOF_STRUCT_SIGFRAME_SC + + offsetof(struct sigcontext, sc_mask); tprints("{mask="); - print_sigset_addr_len(tcp, addr, NSIG / 8); + print_sigset_addr_len(tcp, addr, NSIG_BYTES); tprints("}"); } diff --git a/linux/ia64/get_syscall_args.c b/linux/ia64/get_syscall_args.c index 2295d08dc..1b942ebae 100644 --- a/linux/ia64/get_syscall_args.c +++ b/linux/ia64/get_syscall_args.c @@ -11,9 +11,9 @@ get_syscall_args(struct tcb *tcp) unsigned int i; for (i = 0; i < tcp->s_ent->nargs; ++i) { - if (umoven(tcp, - (unsigned long) ia64_rse_skip_regs(out0, i), - sizeof(long), &tcp->u_arg[i]) < 0) + if (umove(tcp, + (unsigned long) ia64_rse_skip_regs(out0, i), + &tcp->u_arg[i]) < 0) return -1; } } else { diff --git a/linux/ia64/set_error.c b/linux/ia64/set_error.c new file mode 100644 index 000000000..c566b6386 --- /dev/null +++ b/linux/ia64/set_error.c @@ -0,0 +1,21 @@ +static int +arch_set_error(struct tcb *tcp) +{ + if (ia64_ia32mode) { + ia64_regs.gr[8] = -tcp->u_error; + } else { + ia64_regs.gr[8] = tcp->u_error; + ia64_regs.gr[10] = -1; + } + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + ia64_regs.gr[8] = tcp->u_rval; + if (!ia64_ia32mode) { + ia64_regs.gr[10] = 0; + } + return set_regs(tcp->pid); +} diff --git a/linux/ia64/set_scno.c b/linux/ia64/set_scno.c new file mode 100644 index 000000000..1af7b025a --- /dev/null +++ b/linux/ia64/set_scno.c @@ -0,0 +1,10 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + if (ia64_ia32mode) + ia64_regs.gr[0] = scno; + else + ia64_regs.gr[15] = scno; + + return set_regs(tcp->pid); +} diff --git a/linux/ia64/syscallent.h b/linux/ia64/syscallent.h index 5ba6afb0c..97ecab9c7 100644 --- a/linux/ia64/syscallent.h +++ b/linux/ia64/syscallent.h @@ -30,16 +30,17 @@ * IA-32 syscalls that have pointer arguments which are incompatible * with 64-bit layout get redirected to printargs. */ -#undef SYS_FUNC_NAME -#define SYS_FUNC_NAME(syscall_name) printargs -#include "../i386/syscallent.h" -#undef SYS_FUNC_NAME -#define SYS_FUNC_NAME(syscall_name) MPERS_FUNC_NAME(syscall_name) +#if CST > 0 +# undef SYS_FUNC_NAME +# define SYS_FUNC_NAME(syscall_name) printargs +# include "../i386/syscallent.h" +# undef SYS_FUNC_NAME +# define SYS_FUNC_NAME(syscall_name) MPERS_FUNC_NAME(syscall_name) +#endif /* You must be careful to check ../i386/syscallent.h so that this table starts where that one leaves off. */ -[(SYS_ipc_subcall + SYS_ipc_nsubcalls) ... 1023] = { }, [1024] = { 0, 0, SEN(printargs), "ni_syscall" }, [1025] = { 1, TP|SE, SEN(exit), "exit" }, [1026] = { 3, TD, SEN(read), "read" }, @@ -355,12 +356,12 @@ [1336] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [1337] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [1338] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[1339] = { 3, 0, SEN(getrandom), "getrandom", }, -[1340] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[1341] = { 3, TD, SEN(bpf), "bpf", }, -[1342] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[1343] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[1344] = { 2, 0, SEN(membarrier), "membarrier", }, +[1339] = { 3, 0, SEN(getrandom), "getrandom" }, +[1340] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[1341] = { 3, TD, SEN(bpf), "bpf" }, +[1342] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[1343] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[1344] = { 2, 0, SEN(membarrier), "membarrier" }, [1345] = { 5, 0, SEN(kcmp), "kcmp" }, [1346] = { 3, TM, SEN(mlock2), "mlock2" }, [1347] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, diff --git a/linux/m68k/arch_regs.c b/linux/m68k/arch_regs.c index 8f0ab79ad..3d4c3d9e4 100644 --- a/linux/m68k/arch_regs.c +++ b/linux/m68k/arch_regs.c @@ -1,2 +1,4 @@ -static long m68k_d0; -#define ARCH_PC_PEEK_ADDR (4 * PT_PC) +static struct user_regs_struct m68k_regs; +unsigned long *const m68k_usp_ptr = (unsigned long *) &m68k_regs.usp; +#define ARCH_PC_REG m68k_regs.pc +#define ARCH_REGS_FOR_GETREGS m68k_regs diff --git a/linux/m68k/arch_regs.h b/linux/m68k/arch_regs.h new file mode 100644 index 000000000..424ec11cb --- /dev/null +++ b/linux/m68k/arch_regs.h @@ -0,0 +1 @@ +extern unsigned long *const m68k_usp_ptr; diff --git a/linux/m68k/arch_sigreturn.c b/linux/m68k/arch_sigreturn.c index 0011c1748..b14026839 100644 --- a/linux/m68k/arch_sigreturn.c +++ b/linux/m68k/arch_sigreturn.c @@ -1,15 +1,13 @@ static void arch_sigreturn(struct tcb *tcp) { - long addr; + unsigned long addr; - if (upeek(tcp->pid, 4*PT_USP, &addr) < 0) - return; /* Fetch pointer to struct sigcontext. */ - if (umove(tcp, addr + 2 * sizeof(int), &addr) < 0) + if (umove(tcp, *m68k_usp_ptr + 2 * sizeof(int), &addr) < 0) return; - unsigned long mask[NSIG / 8 / sizeof(long)]; + unsigned long mask[NSIG_BYTES / sizeof(long)]; /* Fetch first word of signal mask. */ if (umove(tcp, addr, &mask[0]) < 0) return; diff --git a/linux/m68k/get_error.c b/linux/m68k/get_error.c index a792835d4..3ad51a08d 100644 --- a/linux/m68k/get_error.c +++ b/linux/m68k/get_error.c @@ -1,10 +1,10 @@ static void get_error(struct tcb *tcp, const bool check_errno) { - if (check_errno && is_negated_errno(m68k_d0)) { + if (check_errno && is_negated_errno(m68k_regs.d0)) { tcp->u_rval = -1; - tcp->u_error = -m68k_d0; + tcp->u_error = -m68k_regs.d0; } else { - tcp->u_rval = m68k_d0; + tcp->u_rval = m68k_regs.d0; } } diff --git a/linux/m68k/get_scno.c b/linux/m68k/get_scno.c index 716a76161..829f3477c 100644 --- a/linux/m68k/get_scno.c +++ b/linux/m68k/get_scno.c @@ -2,5 +2,6 @@ static int arch_get_scno(struct tcb *tcp) { - return upeek(tcp->pid, 4 * PT_ORIG_D0, &tcp->scno) < 0 ? -1 : 1; + tcp->scno = m68k_regs.orig_d0; + return 1; } diff --git a/linux/m68k/get_syscall_args.c b/linux/m68k/get_syscall_args.c index bc69a1957..8ec3d2816 100644 --- a/linux/m68k/get_syscall_args.c +++ b/linux/m68k/get_syscall_args.c @@ -2,10 +2,11 @@ static int get_syscall_args(struct tcb *tcp) { - unsigned int i; - - for (i = 0; i < tcp->s_ent->nargs; ++i) - if (upeek(tcp->pid, (i < 5 ? i : i + 2)*4, &tcp->u_arg[i]) < 0) - return -1; + tcp->u_arg[0] = m68k_regs.d1; + tcp->u_arg[1] = m68k_regs.d2; + tcp->u_arg[2] = m68k_regs.d3; + tcp->u_arg[3] = m68k_regs.d4; + tcp->u_arg[4] = m68k_regs.d5; + tcp->u_arg[5] = m68k_regs.a0; return 1; } diff --git a/linux/m68k/get_syscall_result.c b/linux/m68k/get_syscall_result.c deleted file mode 100644 index 005cf60cd..000000000 --- a/linux/m68k/get_syscall_result.c +++ /dev/null @@ -1,5 +0,0 @@ -static int -get_syscall_result_regs(struct tcb *tcp) -{ - return upeek(tcp->pid, 4 * PT_D0, &m68k_d0) < 0 ? -1 : 0; -} diff --git a/linux/m68k/set_error.c b/linux/m68k/set_error.c new file mode 100644 index 000000000..1ce72abe2 --- /dev/null +++ b/linux/m68k/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + m68k_regs.d0 = -tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + m68k_regs.d0 = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/m68k/set_scno.c b/linux/m68k/set_scno.c new file mode 100644 index 000000000..b45e64856 --- /dev/null +++ b/linux/m68k/set_scno.c @@ -0,0 +1,6 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + m68k_regs.orig_d0 = scno; + return set_regs(tcp->pid); +} diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h index 6299a037e..1c33b0900 100644 --- a/linux/m68k/syscallent.h +++ b/linux/m68k/syscallent.h @@ -377,10 +377,10 @@ [349] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [350] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [351] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[352] = { 3, 0, SEN(getrandom), "getrandom", }, -[353] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[354] = { 3, TD, SEN(bpf), "bpf", }, -[355] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, +[352] = { 3, 0, SEN(getrandom), "getrandom" }, +[353] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[354] = { 3, TD, SEN(bpf), "bpf" }, +[355] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, [356] = { 3, TN, SEN(socket), "socket" }, [357] = { 4, TN, SEN(socketpair), "socketpair" }, [358] = { 3, TN, SEN(bind), "bind" }, @@ -398,8 +398,8 @@ [370] = { 2, TN, SEN(shutdown), "shutdown" }, [371] = { 5, TN, SEN(recvmmsg), "recvmmsg" }, [372] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, -[373] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[374] = { 2, 0, SEN(membarrier), "membarrier", }, +[373] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[374] = { 2, 0, SEN(membarrier), "membarrier" }, [375] = { 3, TM, SEN(mlock2), "mlock2" }, [376] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [377] = { 6, TD, SEN(preadv2), "preadv2" }, diff --git a/linux/metag/get_syscall_args.c b/linux/metag/get_syscall_args.c index b7c10f45f..4cae04f1d 100644 --- a/linux/metag/get_syscall_args.c +++ b/linux/metag/get_syscall_args.c @@ -6,7 +6,7 @@ get_syscall_args(struct tcb *tcp) for (i = 0; i < MAX_ARGS; i++) { /* arguments go backwards from D1Ar1 (D1.3) */ - tcp->u_arg[i] = ((unsigned long *)&metag_regs.dx[3][1])[-i]; + tcp->u_arg[i] = (&metag_regs.dx[3][1])[-i]; } return 1; } diff --git a/linux/metag/set_error.c b/linux/metag/set_error.c new file mode 100644 index 000000000..9e10d798e --- /dev/null +++ b/linux/metag/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + metag_regs.dx[0][0] = -tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + metag_regs.dx[0][0] = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/metag/set_scno.c b/linux/metag/set_scno.c new file mode 100644 index 000000000..c9b63c81a --- /dev/null +++ b/linux/metag/set_scno.c @@ -0,0 +1,6 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + metag_regs.dx[0][1] = scno; + return set_regs(tcp->pid); +} diff --git a/linux/microblaze/arch_regs.c b/linux/microblaze/arch_regs.c index c7bafabd2..a5fec6112 100644 --- a/linux/microblaze/arch_regs.c +++ b/linux/microblaze/arch_regs.c @@ -1,2 +1,2 @@ -static long microblaze_r3; +static unsigned long microblaze_r3; #define ARCH_PC_PEEK_ADDR PT_PC diff --git a/linux/microblaze/arch_sigreturn.c b/linux/microblaze/arch_sigreturn.c index 839c80578..6eb7cd8e8 100644 --- a/linux/microblaze/arch_sigreturn.c +++ b/linux/microblaze/arch_sigreturn.c @@ -3,7 +3,7 @@ arch_sigreturn(struct tcb *tcp) { /* TODO: Verify that this is correct... */ - long addr; + unsigned long addr; /* Read r1, the stack pointer. */ if (upeek(tcp->pid, 1 * 4, &addr) < 0) @@ -11,6 +11,6 @@ arch_sigreturn(struct tcb *tcp) addr += offsetof(struct sigcontext, oldmask); tprints("{mask="); - print_sigset_addr_len(tcp, addr, NSIG / 8); + print_sigset_addr_len(tcp, addr, NSIG_BYTES); tprints("}"); } diff --git a/linux/microblaze/set_error.c b/linux/microblaze/set_error.c new file mode 100644 index 000000000..46866719d --- /dev/null +++ b/linux/microblaze/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + microblaze_r3 = -tcp->u_error; + return upoke(tcp->pid, 3 * 4, microblaze_r3); +} + +static int +arch_set_success(struct tcb *tcp) +{ + microblaze_r3 = tcp->u_rval; + return upoke(tcp->pid, 3 * 4, microblaze_r3); +} diff --git a/linux/microblaze/set_scno.c b/linux/microblaze/set_scno.c new file mode 100644 index 000000000..b9cddefca --- /dev/null +++ b/linux/microblaze/set_scno.c @@ -0,0 +1,5 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + return upoke(tcp->pid, 0, scno); +} diff --git a/linux/microblaze/syscallent.h b/linux/microblaze/syscallent.h index 69748729f..d71e97acd 100644 --- a/linux/microblaze/syscallent.h +++ b/linux/microblaze/syscallent.h @@ -409,11 +409,17 @@ [381] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [382] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [383] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[384] = { 3, 0, SEN(seccomp), "seccomp", }, -[385] = { 3, 0, SEN(getrandom), "getrandom", }, -[386] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[387] = { 3, TD, SEN(bpf), "bpf", }, -[388] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[389] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[390] = { 2, 0, SEN(membarrier), "membarrier", }, +[384] = { 3, 0, SEN(seccomp), "seccomp" }, +[385] = { 3, 0, SEN(getrandom), "getrandom" }, +[386] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[387] = { 3, TD, SEN(bpf), "bpf" }, +[388] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[389] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[390] = { 2, 0, SEN(membarrier), "membarrier" }, [391] = { 3, TM, SEN(mlock2), "mlock2" }, +[392] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[393] = { 6, TD, SEN(preadv2), "preadv2" }, +[394] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[395] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, +[396] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, +[397] = { 1, 0, SEN(pkey_free), "pkey_free" }, diff --git a/linux/microblaze/userent.h b/linux/microblaze/userent.h index 5b378d25c..68710cf37 100644 --- a/linux/microblaze/userent.h +++ b/linux/microblaze/userent.h @@ -30,11 +30,11 @@ { PT_GPR(29), "r29" }, { PT_GPR(30), "r30" }, { PT_GPR(31), "r31" }, -{ PT_PC, "rpc", }, -{ PT_MSR, "rmsr", }, -{ PT_EAR, "rear", }, -{ PT_ESR, "resr", }, -{ PT_FSR, "rfsr", }, -{ PT_KERNEL_MODE, "kernel_mode", }, +{ PT_PC, "rpc" }, +{ PT_MSR, "rmsr" }, +{ PT_EAR, "rear" }, +{ PT_ESR, "resr" }, +{ PT_FSR, "rfsr" }, +{ PT_KERNEL_MODE, "kernel_mode" }, /* Other fields in "struct user" */ #include "../userent0.h" diff --git a/linux/mips/arch_sigreturn.c b/linux/mips/arch_sigreturn.c index 3095fe591..72f7619b4 100644 --- a/linux/mips/arch_sigreturn.c +++ b/linux/mips/arch_sigreturn.c @@ -6,8 +6,8 @@ arch_sigreturn(struct tcb *tcp) * offsetof(struct sigframe, sf_mask) == * sizeof(sf_ass) + sizeof(sf_pad) + sizeof(struct sigcontext) */ - const long addr = mips_REG_SP + 6 * 4 + - sizeof(struct sigcontext); + const kernel_ulong_t addr = mips_REG_SP + 6 * 4 + + sizeof(struct sigcontext); #else /* * This decodes rt_sigreturn. @@ -16,11 +16,11 @@ arch_sigreturn(struct tcb *tcp) * offsetof(struct rt_sigframe, rs_uc) == * sizeof(sf_ass) + sizeof(sf_pad) + sizeof(struct siginfo) */ - const long addr = mips_REG_SP + 6 * 4 + 128 + - offsetof(struct ucontext, uc_sigmask); + const kernel_ulong_t addr = mips_REG_SP + 6 * 4 + 128 + + offsetof(struct ucontext, uc_sigmask); #endif tprints("{mask="); - print_sigset_addr_len(tcp, addr, NSIG / 8); + print_sigset_addr_len(tcp, addr, NSIG_BYTES); tprints("}"); } diff --git a/linux/mips/get_error.c b/linux/mips/get_error.c index 42a282b45..4096de26a 100644 --- a/linux/mips/get_error.c +++ b/linux/mips/get_error.c @@ -6,9 +6,5 @@ get_error(struct tcb *tcp, const bool check_errno) tcp->u_error = mips_REG_V0; } else { tcp->u_rval = mips_REG_V0; -#ifdef LINUX_MIPSN32 - /* tcp->u_rval contains a truncated value */ - tcp->u_lrval = mips_REG_V0; -#endif } } diff --git a/linux/mips/get_scno.c b/linux/mips/get_scno.c index f9b5e7d71..9364f8173 100644 --- a/linux/mips/get_scno.c +++ b/linux/mips/get_scno.c @@ -4,7 +4,7 @@ arch_get_scno(struct tcb *tcp) { tcp->scno = mips_REG_V0; - if (!SCNO_IN_RANGE(tcp->scno)) { + if (!scno_in_range(tcp->scno)) { if (mips_REG_A3 == 0 || mips_REG_A3 == (uint64_t) -1) { if (debug_flag) error_msg("stray syscall exit: v0 = %ld", diff --git a/linux/mips/get_syscall_args.c b/linux/mips/get_syscall_args.c index a20be8dee..ca2819bf3 100644 --- a/linux/mips/get_syscall_args.c +++ b/linux/mips/get_syscall_args.c @@ -2,20 +2,13 @@ static int get_syscall_args(struct tcb *tcp) { -#if defined LINUX_MIPSN64 +#if defined LINUX_MIPSN64 || defined LINUX_MIPSN32 tcp->u_arg[0] = mips_REG_A0; tcp->u_arg[1] = mips_REG_A1; tcp->u_arg[2] = mips_REG_A2; tcp->u_arg[3] = mips_REG_A3; tcp->u_arg[4] = mips_REG_A4; tcp->u_arg[5] = mips_REG_A5; -#elif defined LINUX_MIPSN32 - tcp->u_arg[0] = tcp->ext_arg[0] = mips_REG_A0; - tcp->u_arg[1] = tcp->ext_arg[1] = mips_REG_A1; - tcp->u_arg[2] = tcp->ext_arg[2] = mips_REG_A2; - tcp->u_arg[3] = tcp->ext_arg[3] = mips_REG_A3; - tcp->u_arg[4] = tcp->ext_arg[4] = mips_REG_A4; - tcp->u_arg[5] = tcp->ext_arg[5] = mips_REG_A5; #elif defined LINUX_MIPSO32 tcp->u_arg[0] = mips_REG_A0; tcp->u_arg[1] = mips_REG_A1; diff --git a/linux/mips/set_error.c b/linux/mips/set_error.c new file mode 100644 index 000000000..89cf38ce3 --- /dev/null +++ b/linux/mips/set_error.c @@ -0,0 +1,15 @@ +static int +arch_set_error(struct tcb *tcp) +{ + mips_REG_V0 = tcp->u_error; + mips_REG_A3 = -1; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + mips_REG_V0 = tcp->u_rval; + mips_REG_A3 = 0; + return set_regs(tcp->pid); +} diff --git a/linux/mips/set_scno.c b/linux/mips/set_scno.c new file mode 100644 index 000000000..1eb456ccd --- /dev/null +++ b/linux/mips/set_scno.c @@ -0,0 +1,6 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + mips_REG_V0 = scno; + return set_regs(tcp->pid); +} diff --git a/linux/mips/syscallent-n32-stub.h b/linux/mips/syscallent-n32-stub.h deleted file mode 100644 index 184b19d62..000000000 --- a/linux/mips/syscallent-n32-stub.h +++ /dev/null @@ -1,322 +0,0 @@ -[6000] = { 3, TD, SEN(printargs), "n32_read" }, /* start of Linux N32 */ -[6001] = { 3, TD, SEN(printargs), "n32_write" }, -[6002] = { 3, TD|TF, SEN(printargs), "n32_open" }, -[6003] = { 1, TD, SEN(printargs), "n32_close" }, -[6004] = { 2, TF, SEN(printargs), "n32_stat" }, -[6005] = { 2, TD, SEN(printargs), "n32_fstat" }, -[6006] = { 2, TF, SEN(printargs), "n32_lstat" }, -[6007] = { 3, TD, SEN(printargs), "n32_poll" }, -[6008] = { 3, TD, SEN(printargs), "n32_lseek" }, -[6009] = { 6, TD|TM|SI, SEN(printargs), "n32_mmap" }, -[6010] = { 3, TM|SI, SEN(printargs), "n32_mprotect" }, -[6011] = { 2, TM|SI, SEN(printargs), "n32_munmap" }, -[6012] = { 1, TM|SI, SEN(printargs), "n32_brk" }, -[6013] = { 4, TS, SEN(printargs), "n32_rt_sigaction" }, -[6014] = { 4, TS, SEN(printargs), "n32_rt_sigprocmask" }, -[6015] = { 3, TD, SEN(printargs), "n32_ioctl" }, -[6016] = { 4, TD, SEN(printargs), "n32_pread64" }, -[6017] = { 4, TD, SEN(printargs), "n32_pwrite64" }, -[6018] = { 3, TD, SEN(printargs), "n32_readv" }, -[6019] = { 3, TD, SEN(printargs), "n32_writev" }, -[6020] = { 2, TF, SEN(printargs), "n32_access" }, -[6021] = { 1, TD, SEN(printargs), "n32_pipe" }, -[6022] = { 5, TD, SEN(printargs), "n32_select" }, -[6023] = { 0, 0, SEN(printargs), "n32_sched_yield" }, -[6024] = { 5, TM|SI, SEN(printargs), "n32_mremap" }, -[6025] = { 3, TM, SEN(printargs), "n32_msync" }, -[6026] = { 3, TM, SEN(printargs), "n32_mincore" }, -[6027] = { 3, TM, SEN(printargs), "n32_madvise" }, -[6028] = { 3, TI, SEN(printargs), "n32_shmget" }, -[6029] = { 3, TI|TM|SI, SEN(printargs), "n32_shmat" }, -[6030] = { 3, TI, SEN(printargs), "n32_shmctl" }, -[6031] = { 1, TD, SEN(printargs), "n32_dup" }, -[6032] = { 2, TD, SEN(printargs), "n32_dup2" }, -[6033] = { 0, TS, SEN(printargs), "n32_pause" }, -[6034] = { 2, 0, SEN(printargs), "n32_nanosleep" }, -[6035] = { 2, 0, SEN(printargs), "n32_getitimer" }, -[6036] = { 3, 0, SEN(printargs), "n32_setitimer" }, -[6037] = { 1, 0, SEN(printargs), "n32_alarm" }, -[6038] = { 0, 0, SEN(printargs), "n32_getpid" }, -[6039] = { 4, TD|TN, SEN(printargs), "n32_sendfile" }, -[6040] = { 3, TN, SEN(printargs), "n32_socket" }, -[6041] = { 3, TN, SEN(printargs), "n32_connect" }, -[6042] = { 3, TN, SEN(printargs), "n32_accept" }, -[6043] = { 6, TN, SEN(printargs), "n32_sendto" }, -[6044] = { 6, TN, SEN(printargs), "n32_recvfrom" }, -[6045] = { 3, TN, SEN(printargs), "n32_sendmsg" }, -[6046] = { 3, TN, SEN(printargs), "n32_recvmsg" }, -[6047] = { 2, TN, SEN(printargs), "n32_shutdown" }, -[6048] = { 3, TN, SEN(printargs), "n32_bind" }, -[6049] = { 2, TN, SEN(printargs), "n32_listen" }, -[6050] = { 3, TN, SEN(printargs), "n32_getsockname" }, -[6051] = { 3, TN, SEN(printargs), "n32_getpeername" }, -[6052] = { 4, TN, SEN(printargs), "n32_socketpair" }, -[6053] = { 5, TN, SEN(printargs), "n32_setsockopt" }, -[6054] = { 5, TN, SEN(printargs), "n32_getsockopt" }, -[6055] = { 5, TP, SEN(printargs), "n32_clone" }, -[6056] = { 0, TP, SEN(printargs), "n32_fork" }, -[6057] = { 3, TF|TP|SE|SI, SEN(printargs), "n32_execve" }, -[6058] = { 1, TP|SE, SEN(printargs), "n32_exit" }, -[6059] = { 4, TP, SEN(printargs), "n32_wait4" }, -[6060] = { 2, TS, SEN(printargs), "n32_kill" }, -[6061] = { 1, 0, SEN(printargs), "n32_uname" }, -[6062] = { 3, TI, SEN(printargs), "n32_semget" }, -[6063] = { 3, TI, SEN(printargs), "n32_semop" }, -[6064] = { 4, TI, SEN(printargs), "n32_semctl" }, -[6065] = { 1, TI|TM|SI, SEN(printargs), "n32_shmdt" }, -[6066] = { 2, TI, SEN(printargs), "n32_msgget" }, -[6067] = { 4, TI, SEN(printargs), "n32_msgsnd" }, -[6068] = { 5, TI, SEN(printargs), "n32_msgrcv" }, -[6069] = { 3, TI, SEN(printargs), "n32_msgctl" }, -[6070] = { 3, TD, SEN(printargs), "n32_fcntl" }, -[6071] = { 2, TD, SEN(printargs), "n32_flock" }, -[6072] = { 1, TD, SEN(printargs), "n32_fsync" }, -[6073] = { 1, TD, SEN(printargs), "n32_fdatasync" }, -[6074] = { 2, TF, SEN(printargs), "n32_truncate" }, -[6075] = { 2, TD, SEN(printargs), "n32_ftruncate" }, -[6076] = { 3, TD, SEN(printargs), "n32_getdents" }, -[6077] = { 2, TF, SEN(printargs), "n32_getcwd" }, -[6078] = { 1, TF, SEN(printargs), "n32_chdir" }, -[6079] = { 1, TD, SEN(printargs), "n32_fchdir" }, -[6080] = { 2, TF, SEN(printargs), "n32_rename" }, -[6081] = { 2, TF, SEN(printargs), "n32_mkdir" }, -[6082] = { 1, TF, SEN(printargs), "n32_rmdir" }, -[6083] = { 2, TD|TF, SEN(printargs), "n32_creat" }, -[6084] = { 2, TF, SEN(printargs), "n32_link" }, -[6085] = { 1, TF, SEN(printargs), "n32_unlink" }, -[6086] = { 2, TF, SEN(printargs), "n32_symlink" }, -[6087] = { 3, TF, SEN(printargs), "n32_readlink" }, -[6088] = { 2, TF, SEN(printargs), "n32_chmod" }, -[6089] = { 2, TD, SEN(printargs), "n32_fchmod" }, -[6090] = { 3, TF, SEN(printargs), "n32_chown" }, -[6091] = { 3, TD, SEN(printargs), "n32_fchown" }, -[6092] = { 3, TF, SEN(printargs), "n32_lchown" }, -[6093] = { 1, 0, SEN(printargs), "n32_umask" }, -[6094] = { 2, 0, SEN(printargs), "n32_gettimeofday" }, -[6095] = { 2, 0, SEN(printargs), "n32_getrlimit" }, -[6096] = { 2, 0, SEN(printargs), "n32_getrusage" }, -[6097] = { 1, 0, SEN(printargs), "n32_sysinfo" }, -[6098] = { 1, 0, SEN(printargs), "n32_times" }, -[6099] = { 4, 0, SEN(printargs), "n32_ptrace" }, -[6100] = { 0, NF, SEN(printargs), "n32_getuid" }, -[6101] = { 3, 0, SEN(printargs), "n32_syslog" }, -[6102] = { 0, NF, SEN(printargs), "n32_getgid" }, -[6103] = { 1, 0, SEN(printargs), "n32_setuid" }, -[6104] = { 1, 0, SEN(printargs), "n32_setgid" }, -[6105] = { 0, NF, SEN(printargs), "n32_geteuid" }, -[6106] = { 0, NF, SEN(printargs), "n32_getegid" }, -[6107] = { 2, 0, SEN(printargs), "n32_setpgid" }, -[6108] = { 0, 0, SEN(printargs), "n32_getppid" }, -[6109] = { 0, 0, SEN(printargs), "n32_getpgrp" }, -[6110] = { 0, 0, SEN(printargs), "n32_setsid" }, -[6111] = { 2, 0, SEN(printargs), "n32_setreuid" }, -[6112] = { 2, 0, SEN(printargs), "n32_setregid" }, -[6113] = { 2, 0, SEN(printargs), "n32_getgroups" }, -[6114] = { 2, 0, SEN(printargs), "n32_setgroups" }, -[6115] = { 3, 0, SEN(printargs), "n32_setresuid" }, -[6116] = { 3, 0, SEN(printargs), "n32_getresuid" }, -[6117] = { 3, 0, SEN(printargs), "n32_setresgid" }, -[6118] = { 3, 0, SEN(printargs), "n32_getresgid" }, -[6119] = { 0, 0, SEN(printargs), "n32_getpgid" }, -[6120] = { 1, NF, SEN(printargs), "n32_setfsuid" }, -[6121] = { 1, NF, SEN(printargs), "n32_setfsgid" }, -[6122] = { 1, 0, SEN(printargs), "n32_getsid" }, -[6123] = { 2, 0, SEN(printargs), "n32_capget" }, -[6124] = { 2, 0, SEN(printargs), "n32_capset" }, -[6125] = { 2, TS, SEN(printargs), "n32_rt_sigpending" }, -[6126] = { 4, TS, SEN(printargs), "n32_rt_sigtimedwait" }, -[6127] = { 3, TS, SEN(printargs), "n32_rt_sigqueueinfo" }, -[6128] = { 2, TS, SEN(printargs), "n32_rt_sigsuspend" }, -[6129] = { 2, TS, SEN(printargs), "n32_sigaltstack" }, -[6130] = { 2, TF, SEN(printargs), "n32_utime" }, -[6131] = { 3, TF, SEN(printargs), "n32_mknod" }, -[6132] = { 1, 0, SEN(printargs), "n32_personality" }, -[6133] = { 2, 0, SEN(printargs), "n32_ustat" }, -[6134] = { 3, TF, SEN(printargs), "n32_statfs" }, -[6135] = { 3, TD, SEN(printargs), "n32_fstatfs" }, -[6136] = { 5, 0, SEN(printargs), "n32_sysfs" }, -[6137] = { 2, 0, SEN(printargs), "n32_getpriority" }, -[6138] = { 3, 0, SEN(printargs), "n32_setpriority" }, -[6139] = { 2, 0, SEN(printargs), "n32_sched_setparam" }, -[6140] = { 2, 0, SEN(printargs), "n32_sched_getparam" }, -[6141] = { 3, 0, SEN(printargs), "n32_sched_setscheduler" }, -[6142] = { 1, 0, SEN(printargs), "n32_sched_getscheduler" }, -[6143] = { 1, 0, SEN(printargs), "n32_sched_get_priority_max"}, -[6144] = { 1, 0, SEN(printargs), "n32_sched_get_priority_min"}, -[6145] = { 2, 0, SEN(printargs), "n32_sched_rr_get_interval" }, -[6146] = { 2, TM, SEN(printargs), "n32_mlock" }, -[6147] = { 2, TM, SEN(printargs), "n32_munlock" }, -[6148] = { 1, TM, SEN(printargs), "n32_mlockall" }, -[6149] = { 0, TM, SEN(printargs), "n32_munlockall" }, -[6150] = { 0, 0, SEN(printargs), "n32_vhangup" }, -[6151] = { 2, TF, SEN(printargs), "n32_pivot_root" }, -[6152] = { 1, 0, SEN(printargs), "n32__sysctl" }, -[6153] = { 5, 0, SEN(printargs), "n32_prctl" }, -[6154] = { 1, 0, SEN(printargs), "n32_adjtimex" }, -[6155] = { 2, 0, SEN(printargs), "n32_setrlimit" }, -[6156] = { 1, TF, SEN(printargs), "n32_chroot" }, -[6157] = { 0, 0, SEN(printargs), "n32_sync" }, -[6158] = { 1, TF, SEN(printargs), "n32_acct" }, -[6159] = { 2, 0, SEN(printargs), "n32_settimeofday" }, -[6160] = { 5, TF, SEN(printargs), "n32_mount" }, -[6161] = { 2, TF, SEN(printargs), "n32_umount2" }, -[6162] = { 2, TF, SEN(printargs), "n32_swapon" }, -[6163] = { 1, TF, SEN(printargs), "n32_swapoff" }, -[6164] = { 4, 0, SEN(printargs), "n32_reboot" }, -[6165] = { 2, 0, SEN(printargs), "n32_sethostname" }, -[6166] = { 2, 0, SEN(printargs), "n32_setdomainname" }, -[6167] = { 2, 0, SEN(printargs), "n32_create_module" }, -[6168] = { 4, 0, SEN(printargs), "n32_init_module" }, -[6169] = { 1, 0, SEN(printargs), "n32_delete_module" }, -[6170] = { 1, 0, SEN(printargs), "n32_get_kernel_syms" }, -[6171] = { 5, 0, SEN(printargs), "n32_query_module" }, -[6172] = { 4, TF, SEN(printargs), "n32_quotactl" }, -[6173] = { 3, 0, SEN(printargs), "n32_nfsservctl" }, -[6174] = { 5, TN, SEN(printargs), "n32_getpmsg" }, -[6175] = { 5, TN, SEN(printargs), "n32_putpmsg" }, -[6176] = { 0, 0, SEN(printargs), "n32_afs_syscall" }, -[6177] = { 0, 0, SEN(printargs), "n32_reserved177" }, -[6178] = { 0, 0, SEN(printargs), "n32_gettid" }, -[6179] = { 3, TD, SEN(printargs), "n32_readahead" }, -[6180] = { 5, TF, SEN(printargs), "n32_setxattr" }, -[6181] = { 5, TF, SEN(printargs), "n32_lsetxattr" }, -[6182] = { 5, TD, SEN(printargs), "n32_fsetxattr" }, -[6183] = { 4, TF, SEN(printargs), "n32_getxattr" }, -[6184] = { 4, TF, SEN(printargs), "n32_lgetxattr" }, -[6185] = { 4, TD, SEN(printargs), "n32_fgetxattr" }, -[6186] = { 3, TF, SEN(printargs), "n32_listxattr" }, -[6187] = { 3, TF, SEN(printargs), "n32_llistxattr" }, -[6188] = { 3, TD, SEN(printargs), "n32_flistxattr" }, -[6189] = { 2, TF, SEN(printargs), "n32_removexattr" }, -[6190] = { 2, TF, SEN(printargs), "n32_lremovexattr" }, -[6191] = { 2, TD, SEN(printargs), "n32_fremovexattr" }, -[6192] = { 2, TS, SEN(printargs), "n32_tkill" }, -[6193] = { 1, 0, SEN(printargs), "n32_time" }, -[6194] = { 6, 0, SEN(printargs), "n32_futex" }, -[6195] = { 3, 0, SEN(printargs), "n32_sched_setaffinity" }, -[6196] = { 3, 0, SEN(printargs), "n32_sched_getaffinity" }, -[6197] = { 3, 0, SEN(printargs), "n32_cacheflush" }, -[6198] = { 3, 0, SEN(printargs), "n32_cachectl" }, -[6199] = { 4, 0, SEN(printargs), "n32_sysmips" }, -[6200] = { 2, 0, SEN(printargs), "n32_io_setup" }, -[6201] = { 1, 0, SEN(printargs), "n32_io_destroy" }, -[6202] = { 5, 0, SEN(printargs), "n32_io_getevents" }, -[6203] = { 3, 0, SEN(printargs), "n32_io_submit" }, -[6204] = { 3, 0, SEN(printargs), "n32_io_cancel" }, -[6205] = { 1, TP|SE, SEN(printargs), "n32_exit_group" }, -[6206] = { 3, 0, SEN(printargs), "n32_lookup_dcookie" }, -[6207] = { 1, TD, SEN(printargs), "n32_epoll_create" }, -[6208] = { 4, TD, SEN(printargs), "n32_epoll_ctl" }, -[6209] = { 4, TD, SEN(printargs), "n32_epoll_wait" }, -[6210] = { 5, TM|SI, SEN(printargs), "n32_remap_file_pages" }, -[6211] = { 0, TS, SEN(printargs), "n32_rt_sigreturn" }, -[6212] = { 3, TD, SEN(printargs), "n32_fcntl64" }, -[6213] = { 1, 0, SEN(printargs), "n32_set_tid_address" }, -[6214] = { 0, 0, SEN(printargs), "n32_restart_syscall" }, -[6215] = { 4, TI, SEN(printargs), "n32_semtimedop" }, -[6216] = { 4, TD, SEN(printargs), "n32_fadvise64" }, -[6217] = { 3, TF, SEN(printargs), "n32_statfs64" }, -[6218] = { 3, TD, SEN(printargs), "n32_fstatfs64" }, -[6219] = { 4, TD|TN, SEN(printargs), "n32_sendfile64" }, -[6220] = { 3, 0, SEN(printargs), "n32_timer_create" }, -[6221] = { 4, 0, SEN(printargs), "n32_timer_settime" }, -[6222] = { 2, 0, SEN(printargs), "n32_timer_gettime" }, -[6223] = { 1, 0, SEN(printargs), "n32_timer_getoverrun" }, -[6224] = { 1, 0, SEN(printargs), "n32_timer_delete" }, -[6225] = { 2, 0, SEN(printargs), "n32_clock_settime" }, -[6226] = { 2, 0, SEN(printargs), "n32_clock_gettime" }, -[6227] = { 2, 0, SEN(printargs), "n32_clock_getres" }, -[6228] = { 4, 0, SEN(printargs), "n32_clock_nanosleep" }, -[6229] = { 3, TS, SEN(printargs), "n32_tgkill" }, -[6230] = { 2, TF, SEN(printargs), "n32_utimes" }, -[6231] = { 6, TM, SEN(printargs), "n32_mbind" }, -[6232] = { 5, TM, SEN(printargs), "n32_get_mempolicy" }, -[6233] = { 3, TM, SEN(printargs), "n32_set_mempolicy" }, -[6234] = { 4, 0, SEN(printargs), "n32_mq_open" }, -[6235] = { 1, 0, SEN(printargs), "n32_mq_unlink" }, -[6236] = { 5, 0, SEN(printargs), "n32_mq_timedsend" }, -[6237] = { 5, 0, SEN(printargs), "n32_mq_timedreceive" }, -[6238] = { 2, 0, SEN(printargs), "n32_mq_notify" }, -[6239] = { 3, 0, SEN(printargs), "n32_mq_getsetattr" }, -[6240] = { 5, 0, SEN(printargs), "n32_vserver" }, -[6241] = { 5, TP, SEN(printargs), "n32_waitid" }, -[6242] = { }, -[6243] = { 5, 0, SEN(printargs), "n32_add_key" }, -[6244] = { 4, 0, SEN(printargs), "n32_request_key" }, -[6245] = { 5, 0, SEN(printargs), "n32_keyctl" }, -[6246] = { 1, 0, SEN(printargs), "n32_set_thread_area" }, -[6247] = { 0, TD, SEN(printargs), "n32_inotify_init" }, -[6248] = { 3, TD, SEN(printargs), "n32_inotify_add_watch" }, -[6249] = { 2, TD, SEN(printargs), "n32_inotify_rm_watch" }, -[6250] = { 4, TM, SEN(printargs), "n32_migrate_pages" }, -[6251] = { 4, TD|TF, SEN(printargs), "n32_openat" }, -[6252] = { 3, TD|TF, SEN(printargs), "n32_mkdirat" }, -[6253] = { 4, TD|TF, SEN(printargs), "n32_mknodat" }, -[6254] = { 5, TD|TF, SEN(printargs), "n32_fchownat" }, -[6255] = { 3, TD|TF, SEN(printargs), "n32_futimesat" }, -[6256] = { 4, TD|TF, SEN(printargs), "n32_newfstatat" }, -[6257] = { 3, TD|TF, SEN(printargs), "n32_unlinkat" }, -[6258] = { 4, TD|TF, SEN(printargs), "n32_renameat" }, -[6259] = { 5, TD|TF, SEN(printargs), "n32_linkat" }, -[6260] = { 3, TD|TF, SEN(printargs), "n32_symlinkat" }, -[6261] = { 4, TD|TF, SEN(printargs), "n32_readlinkat" }, -[6262] = { 3, TD|TF, SEN(printargs), "n32_fchmodat" }, -[6263] = { 3, TD|TF, SEN(printargs), "n32_faccessat" }, -[6264] = { 6, TD, SEN(printargs), "n32_pselect6" }, -[6265] = { 5, TD, SEN(printargs), "n32_ppoll" }, -[6266] = { 1, TP, SEN(printargs), "n32_unshare" }, -[6267] = { 6, TD, SEN(printargs), "n32_splice" }, -[6268] = { 4, TD, SEN(printargs), "n32_sync_file_range" }, -[6269] = { 4, TD, SEN(printargs), "n32_tee" }, -[6270] = { 4, TD, SEN(printargs), "n32_vmsplice" }, -[6271] = { 6, TM, SEN(printargs), "n32_move_pages" }, -[6272] = { 2, 0, SEN(printargs), "n32_set_robust_list" }, -[6273] = { 3, 0, SEN(printargs), "n32_get_robust_list" }, -[6274] = { 4, 0, SEN(printargs), "n32_kexec_load" }, -[6275] = { 3, 0, SEN(printargs), "n32_getcpu" }, -[6276] = { 6, TD, SEN(printargs), "n32_epoll_pwait" }, -[6277] = { 3, 0, SEN(printargs), "n32_ioprio_set" }, -[6278] = { 2, 0, SEN(printargs), "n32_ioprio_get" }, -[6279] = { 4, TD|TF, SEN(printargs), "n32_utimensat" }, -[6280] = { 3, TD|TS, SEN(printargs), "n32_signalfd" }, -[6281] = { 4, TD, SEN(printargs), "n32_timerfd" }, -[6282] = { 1, TD, SEN(printargs), "n32_eventfd" }, -[6283] = { 4, TD, SEN(printargs), "n32_fallocate" }, -[6284] = { 2, TD, SEN(printargs), "n32_timerfd_create" }, -[6285] = { 2, TD, SEN(printargs), "n32_timerfd_gettime" }, -[6286] = { 4, TD, SEN(printargs), "n32_timerfd_settime" }, -[6287] = { 4, TD|TS, SEN(printargs), "n32_signalfd4" }, -[6288] = { 2, TD, SEN(printargs), "n32_eventfd2" }, -[6289] = { 1, TD, SEN(printargs), "n32_epoll_create1" }, -[6290] = { 3, TD, SEN(printargs), "n32_dup3" }, -[6291] = { 2, TD, SEN(printargs), "n32_pipe2" }, -[6292] = { 1, TD, SEN(printargs), "n32_inotify_init1" }, -[6293] = { 4, TD, SEN(printargs), "n32_preadv" }, -[6294] = { 4, TD, SEN(printargs), "n32_pwritev" }, -[6295] = { 4, TP|TS, SEN(printargs), "n32_rt_tgsigqueueinfo" }, -[6296] = { 5, TD, SEN(printargs), "n32_perf_event_open" }, -[6297] = { 4, TN, SEN(printargs), "n32_accept4" }, -[6298] = { 5, TN, SEN(printargs), "n32_recvmmsg" }, -[6299] = { 3, TD, SEN(printargs), "n32_getdents64" }, -[6300] = { 2, TD, SEN(printargs), "n32_fanotify_init" }, -[6301] = { 5, TD|TF, SEN(printargs), "n32_fanotify_mark" }, -[6302] = { 4, 0, SEN(printargs), "n32_prlimit64" }, -[6303] = { 5, TD|TF, SEN(printargs), "n32_name_to_handle_at" }, -[6304] = { 3, TD, SEN(printargs), "n32_open_by_handle_at" }, -[6305] = { 2, 0, SEN(printargs), "n32_clock_adjtime" }, -[6306] = { 1, TD, SEN(printargs), "n32_syncfs" }, -[6307] = { 4, TN, SEN(printargs), "n32_sendmmsg" }, -[6308] = { 2, TD, SEN(printargs), "n32_setns" }, -[6309] = { 6, 0, SEN(printargs), "n32_process_vm_readv" }, -[6310] = { 6, 0, SEN(printargs), "n32_process_vm_writev" }, -[6311] = { 5, 0, SEN(printargs), "n32_kcmp" }, -[6312] = { 3, TD, SEN(printargs), "n32_finit_module" }, -[6313] = { 3, 0, SEN(printargs), "n32_sched_setattr" }, -[6314] = { 4, 0, SEN(printargs), "n32_sched_getattr" }, -[6315] = { 5, TD|TF, SEN(printargs), "n32_renameat2" }, -[6316] = { 3, 0, SEN(printargs), "n32_seccomp", }, -[6317] = { 3, 0, SEN(printargs), "n32_getrandom", }, -[6318] = { 2, TD, SEN(printargs), "n32_memfd_create", }, -[6319] = { 3, TD, SEN(printargs), "n32_bpf", }, -[6320] = { 5, TD|TF|TP|SE|SI, SEN(printargs), "n32_execveat", }, -[6321 ... 6399] = { }, diff --git a/linux/mips/syscallent-n32.h b/linux/mips/syscallent-n32.h index b061355db..c93c33bdc 100644 --- a/linux/mips/syscallent-n32.h +++ b/linux/mips/syscallent-n32.h @@ -316,17 +316,20 @@ [6313] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [6314] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [6315] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[6316] = { 3, 0, SEN(seccomp), "seccomp", }, -[6317] = { 3, 0, SEN(getrandom), "getrandom", }, -[6318] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[6319] = { 3, TD, SEN(bpf), "bpf", }, -[6320] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[6321] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[6322] = { 2, 0, SEN(membarrier), "membarrier", }, +[6316] = { 3, 0, SEN(seccomp), "seccomp" }, +[6317] = { 3, 0, SEN(getrandom), "getrandom" }, +[6318] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[6319] = { 3, TD, SEN(bpf), "bpf" }, +[6320] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[6321] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[6322] = { 2, 0, SEN(membarrier), "membarrier" }, [6323] = { 3, TM, SEN(mlock2), "mlock2" }, [6324] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [6325] = { 6, TD, SEN(preadv2), "preadv2" }, [6326] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[6327] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, +[6328] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, +[6329] = { 1, 0, SEN(pkey_free), "pkey_free" }, # define SYS_socket_subcall 6400 # include "subcall.h" diff --git a/linux/mips/syscallent-n64-stub.h b/linux/mips/syscallent-n64-stub.h deleted file mode 100644 index 0e923f13a..000000000 --- a/linux/mips/syscallent-n64-stub.h +++ /dev/null @@ -1,318 +0,0 @@ -[5000] = { 3, TD, SEN(printargs), "n64_read" }, /* start of Linux N64 */ -[5001] = { 3, TD, SEN(printargs), "n64_write" }, -[5002] = { 3, TD|TF, SEN(printargs), "n64_open" }, -[5003] = { 1, TD, SEN(printargs), "n64_close" }, -[5004] = { 2, TF, SEN(printargs), "n64_stat" }, -[5005] = { 2, TD, SEN(printargs), "n64_fstat" }, -[5006] = { 2, TF, SEN(printargs), "n64_lstat" }, -[5007] = { 3, TD, SEN(printargs), "n64_poll" }, -[5008] = { 3, TD, SEN(printargs), "n64_lseek" }, -[5009] = { 6, TD|TM|SI, SEN(printargs), "n64_mmap" }, -[5010] = { 3, TM|SI, SEN(printargs), "n64_mprotect" }, -[5011] = { 2, TM|SI, SEN(printargs), "n64_munmap" }, -[5012] = { 1, TM|SI, SEN(printargs), "n64_brk" }, -[5013] = { 4, TS, SEN(printargs), "n64_rt_sigaction" }, -[5014] = { 4, TS, SEN(printargs), "n64_rt_sigprocmask" }, -[5015] = { 3, TD, SEN(printargs), "n64_ioctl" }, -[5016] = { 4, TD, SEN(printargs), "n64_pread64" }, -[5017] = { 4, TD, SEN(printargs), "n64_pwrite64" }, -[5018] = { 3, TD, SEN(printargs), "n64_readv" }, -[5019] = { 3, TD, SEN(printargs), "n64_writev" }, -[5020] = { 2, TF, SEN(printargs), "n64_access" }, -[5021] = { 1, TD, SEN(printargs), "n64_pipe" }, -[5022] = { 5, TD, SEN(printargs), "n64_select" }, -[5023] = { 0, 0, SEN(printargs), "n64_sched_yield" }, -[5024] = { 5, TM|SI, SEN(printargs), "n64_mremap" }, -[5025] = { 3, TM, SEN(printargs), "n64_msync" }, -[5026] = { 3, TM, SEN(printargs), "n64_mincore" }, -[5027] = { 3, TM, SEN(printargs), "n64_madvise" }, -[5028] = { 3, TI, SEN(printargs), "n64_shmget" }, -[5029] = { 3, TI|TM|SI, SEN(printargs), "n64_shmat" }, -[5030] = { 3, TI, SEN(printargs), "n64_shmctl" }, -[5031] = { 1, TD, SEN(printargs), "n64_dup" }, -[5032] = { 2, TD, SEN(printargs), "n64_dup2" }, -[5033] = { 0, TS, SEN(printargs), "n64_pause" }, -[5034] = { 2, 0, SEN(printargs), "n64_nanosleep" }, -[5035] = { 2, 0, SEN(printargs), "n64_getitimer" }, -[5036] = { 3, 0, SEN(printargs), "n64_setitimer" }, -[5037] = { 1, 0, SEN(printargs), "n64_alarm" }, -[5038] = { 0, 0, SEN(printargs), "n64_getpid" }, -[5039] = { 4, TD|TN, SEN(printargs), "n64_sendfile" }, -[5040] = { 3, TN, SEN(printargs), "n64_socket" }, -[5041] = { 3, TN, SEN(printargs), "n64_connect" }, -[5042] = { 3, TN, SEN(printargs), "n64_accept" }, -[5043] = { 6, TN, SEN(printargs), "n64_sendto" }, -[5044] = { 6, TN, SEN(printargs), "n64_recvfrom" }, -[5045] = { 3, TN, SEN(printargs), "n64_sendmsg" }, -[5046] = { 3, TN, SEN(printargs), "n64_recvmsg" }, -[5047] = { 2, TN, SEN(printargs), "n64_shutdown" }, -[5048] = { 3, TN, SEN(printargs), "n64_bind" }, -[5049] = { 2, TN, SEN(printargs), "n64_listen" }, -[5050] = { 3, TN, SEN(printargs), "n64_getsockname" }, -[5051] = { 3, TN, SEN(printargs), "n64_getpeername" }, -[5052] = { 4, TN, SEN(printargs), "n64_socketpair" }, -[5053] = { 5, TN, SEN(printargs), "n64_setsockopt" }, -[5054] = { 5, TN, SEN(printargs), "n64_getsockopt" }, -[5055] = { 5, TP, SEN(printargs), "n64_clone" }, -[5056] = { 0, TP, SEN(printargs), "n64_fork" }, -[5057] = { 3, TF|TP|SE|SI, SEN(printargs), "n64_execve" }, -[5058] = { 1, TP|SE, SEN(printargs), "n64_exit" }, -[5059] = { 4, TP, SEN(printargs), "n64_wait4" }, -[5060] = { 2, TS, SEN(printargs), "n64_kill" }, -[5061] = { 1, 0, SEN(printargs), "n64_uname" }, -[5062] = { 3, TI, SEN(printargs), "n64_semget" }, -[5063] = { 3, TI, SEN(printargs), "n64_semop" }, -[5064] = { 4, TI, SEN(printargs), "n64_semctl" }, -[5065] = { 1, TI|TM|SI, SEN(printargs), "n64_shmdt" }, -[5066] = { 2, TI, SEN(printargs), "n64_msgget" }, -[5067] = { 4, TI, SEN(printargs), "n64_msgsnd" }, -[5068] = { 5, TI, SEN(printargs), "n64_msgrcv" }, -[5069] = { 3, TI, SEN(printargs), "n64_msgctl" }, -[5070] = { 3, TD, SEN(printargs), "n64_fcntl" }, -[5071] = { 2, TD, SEN(printargs), "n64_flock" }, -[5072] = { 1, TD, SEN(printargs), "n64_fsync" }, -[5073] = { 1, TD, SEN(printargs), "n64_fdatasync" }, -[5074] = { 2, TF, SEN(printargs), "n64_truncate" }, -[5075] = { 2, TD, SEN(printargs), "n64_ftruncate" }, -[5076] = { 3, TD, SEN(printargs), "n64_getdents" }, -[5077] = { 2, TF, SEN(printargs), "n64_getcwd" }, -[5078] = { 1, TF, SEN(printargs), "n64_chdir" }, -[5079] = { 1, TD, SEN(printargs), "n64_fchdir" }, -[5080] = { 2, TF, SEN(printargs), "n64_rename" }, -[5081] = { 2, TF, SEN(printargs), "n64_mkdir" }, -[5082] = { 1, TF, SEN(printargs), "n64_rmdir" }, -[5083] = { 2, TD|TF, SEN(printargs), "n64_creat" }, -[5084] = { 2, TF, SEN(printargs), "n64_link" }, -[5085] = { 1, TF, SEN(printargs), "n64_unlink" }, -[5086] = { 2, TF, SEN(printargs), "n64_symlink" }, -[5087] = { 3, TF, SEN(printargs), "n64_readlink" }, -[5088] = { 2, TF, SEN(printargs), "n64_chmod" }, -[5089] = { 2, TD, SEN(printargs), "n64_fchmod" }, -[5090] = { 3, TF, SEN(printargs), "n64_chown" }, -[5091] = { 3, TD, SEN(printargs), "n64_fchown" }, -[5092] = { 3, TF, SEN(printargs), "n64_lchown" }, -[5093] = { 1, 0, SEN(printargs), "n64_umask" }, -[5094] = { 2, 0, SEN(printargs), "n64_gettimeofday" }, -[5095] = { 2, 0, SEN(printargs), "n64_getrlimit" }, -[5096] = { 2, 0, SEN(printargs), "n64_getrusage" }, -[5097] = { 1, 0, SEN(printargs), "n64_sysinfo" }, -[5098] = { 1, 0, SEN(printargs), "n64_times" }, -[5099] = { 4, 0, SEN(printargs), "n64_ptrace" }, -[5100] = { 0, NF, SEN(printargs), "n64_getuid" }, -[5101] = { 3, 0, SEN(printargs), "n64_syslog" }, -[5102] = { 0, NF, SEN(printargs), "n64_getgid" }, -[5103] = { 1, 0, SEN(printargs), "n64_setuid" }, -[5104] = { 1, 0, SEN(printargs), "n64_setgid" }, -[5105] = { 0, NF, SEN(printargs), "n64_geteuid" }, -[5106] = { 0, NF, SEN(printargs), "n64_getegid" }, -[5107] = { 2, 0, SEN(printargs), "n64_setpgid" }, -[5108] = { 0, 0, SEN(printargs), "n64_getppid" }, -[5109] = { 0, 0, SEN(printargs), "n64_getpgrp" }, -[5110] = { 0, 0, SEN(printargs), "n64_setsid" }, -[5111] = { 2, 0, SEN(printargs), "n64_setreuid" }, -[5112] = { 2, 0, SEN(printargs), "n64_setregid" }, -[5113] = { 2, 0, SEN(printargs), "n64_getgroups" }, -[5114] = { 2, 0, SEN(printargs), "n64_setgroups" }, -[5115] = { 3, 0, SEN(printargs), "n64_setresuid" }, -[5116] = { 3, 0, SEN(printargs), "n64_getresuid" }, -[5117] = { 3, 0, SEN(printargs), "n64_setresgid" }, -[5118] = { 3, 0, SEN(printargs), "n64_getresgid" }, -[5119] = { 0, 0, SEN(printargs), "n64_getpgid" }, -[5120] = { 1, NF, SEN(printargs), "n64_setfsuid" }, -[5121] = { 1, NF, SEN(printargs), "n64_setfsgid" }, -[5122] = { 1, 0, SEN(printargs), "n64_getsid" }, -[5123] = { 2, 0, SEN(printargs), "n64_capget" }, -[5124] = { 2, 0, SEN(printargs), "n64_capset" }, -[5125] = { 2, TS, SEN(printargs), "n64_rt_sigpending" }, -[5126] = { 4, TS, SEN(printargs), "n64_rt_sigtimedwait" }, -[5127] = { 3, TS, SEN(printargs), "n64_rt_sigqueueinfo" }, -[5128] = { 2, TS, SEN(printargs), "n64_rt_sigsuspend" }, -[5129] = { 2, TS, SEN(printargs), "n64_sigaltstack" }, -[5130] = { 2, TF, SEN(printargs), "n64_utime" }, -[5131] = { 3, TF, SEN(printargs), "n64_mknod" }, -[5132] = { 1, 0, SEN(printargs), "n64_personality" }, -[5133] = { 2, 0, SEN(printargs), "n64_ustat" }, -[5134] = { 3, TF, SEN(printargs), "n64_statfs" }, -[5135] = { 3, TD, SEN(printargs), "n64_fstatfs" }, -[5136] = { 5, 0, SEN(printargs), "n64_sysfs" }, -[5137] = { 2, 0, SEN(printargs), "n64_getpriority" }, -[5138] = { 3, 0, SEN(printargs), "n64_setpriority" }, -[5139] = { 2, 0, SEN(printargs), "n64_sched_setparam" }, -[5140] = { 2, 0, SEN(printargs), "n64_sched_getparam" }, -[5141] = { 3, 0, SEN(printargs), "n64_sched_setscheduler" }, -[5142] = { 1, 0, SEN(printargs), "n64_sched_getscheduler" }, -[5143] = { 1, 0, SEN(printargs), "n64_sched_get_priority_max"}, -[5144] = { 1, 0, SEN(printargs), "n64_sched_get_priority_min"}, -[5145] = { 2, 0, SEN(printargs), "n64_sched_rr_get_interval" }, -[5146] = { 2, TM, SEN(printargs), "n64_mlock" }, -[5147] = { 2, TM, SEN(printargs), "n64_munlock" }, -[5148] = { 1, TM, SEN(printargs), "n64_mlockall" }, -[5149] = { 0, TM, SEN(printargs), "n64_munlockall" }, -[5150] = { 0, 0, SEN(printargs), "n64_vhangup" }, -[5151] = { 2, TF, SEN(printargs), "n64_pivot_root" }, -[5152] = { 1, 0, SEN(printargs), "n64__sysctl" }, -[5153] = { 5, 0, SEN(printargs), "n64_prctl" }, -[5154] = { 1, 0, SEN(printargs), "n64_adjtimex" }, -[5155] = { 2, 0, SEN(printargs), "n64_setrlimit" }, -[5156] = { 1, TF, SEN(printargs), "n64_chroot" }, -[5157] = { 0, 0, SEN(printargs), "n64_sync" }, -[5158] = { 1, TF, SEN(printargs), "n64_acct" }, -[5159] = { 2, 0, SEN(printargs), "n64_settimeofday" }, -[5160] = { 5, TF, SEN(printargs), "n64_mount" }, -[5161] = { 2, TF, SEN(printargs), "n64_umount2" }, -[5162] = { 2, TF, SEN(printargs), "n64_swapon" }, -[5163] = { 1, TF, SEN(printargs), "n64_swapoff" }, -[5164] = { 4, 0, SEN(printargs), "n64_reboot" }, -[5165] = { 2, 0, SEN(printargs), "n64_sethostname" }, -[5166] = { 2, 0, SEN(printargs), "n64_setdomainname" }, -[5167] = { 2, 0, SEN(printargs), "n64_create_module" }, -[5168] = { 4, 0, SEN(printargs), "n64_init_module" }, -[5169] = { 1, 0, SEN(printargs), "n64_delete_module" }, -[5170] = { 1, 0, SEN(printargs), "n64_get_kernel_syms" }, -[5171] = { 5, 0, SEN(printargs), "n64_query_module" }, -[5172] = { 4, TF, SEN(printargs), "n64_quotactl" }, -[5173] = { 3, 0, SEN(printargs), "n64_nfsservctl" }, -[5174] = { 5, TN, SEN(printargs), "n64_getpmsg" }, -[5175] = { 5, TN, SEN(printargs), "n64_putpmsg" }, -[5176] = { 0, 0, SEN(printargs), "n64_afs_syscall" }, -[5177] = { 0, 0, SEN(printargs), "n64_reserved177" }, -[5178] = { 0, 0, SEN(printargs), "n64_gettid" }, -[5179] = { 3, TD, SEN(printargs), "n64_readahead" }, -[5180] = { 5, TF, SEN(printargs), "n64_setxattr" }, -[5181] = { 5, TF, SEN(printargs), "n64_lsetxattr" }, -[5182] = { 5, TD, SEN(printargs), "n64_fsetxattr" }, -[5183] = { 4, TF, SEN(printargs), "n64_getxattr" }, -[5184] = { 4, TF, SEN(printargs), "n64_lgetxattr" }, -[5185] = { 4, TD, SEN(printargs), "n64_fgetxattr" }, -[5186] = { 3, TF, SEN(printargs), "n64_listxattr" }, -[5187] = { 3, TF, SEN(printargs), "n64_llistxattr" }, -[5188] = { 3, TD, SEN(printargs), "n64_flistxattr" }, -[5189] = { 2, TF, SEN(printargs), "n64_removexattr" }, -[5190] = { 2, TF, SEN(printargs), "n64_lremovexattr" }, -[5191] = { 2, TD, SEN(printargs), "n64_fremovexattr" }, -[5192] = { 2, TS, SEN(printargs), "n64_tkill" }, -[5193] = { 1, 0, SEN(printargs), "n64_time" }, -[5194] = { 6, 0, SEN(printargs), "n64_futex" }, -[5195] = { 3, 0, SEN(printargs), "n64_sched_setaffinity" }, -[5196] = { 3, 0, SEN(printargs), "n64_sched_getaffinity" }, -[5197] = { 3, 0, SEN(printargs), "n64_cacheflush" }, -[5198] = { 3, 0, SEN(printargs), "n64_cachectl" }, -[5199] = { 4, 0, SEN(printargs), "n64_sysmips" }, -[5200] = { 2, 0, SEN(printargs), "n64_io_setup" }, -[5201] = { 1, 0, SEN(printargs), "n64_io_destroy" }, -[5202] = { 5, 0, SEN(printargs), "n64_io_getevents" }, -[5203] = { 3, 0, SEN(printargs), "n64_io_submit" }, -[5204] = { 3, 0, SEN(printargs), "n64_io_cancel" }, -[5205] = { 1, TP|SE, SEN(printargs), "n64_exit_group" }, -[5206] = { 3, 0, SEN(printargs), "n64_lookup_dcookie" }, -[5207] = { 1, TD, SEN(printargs), "n64_epoll_create" }, -[5208] = { 4, TD, SEN(printargs), "n64_epoll_ctl" }, -[5209] = { 4, TD, SEN(printargs), "n64_epoll_wait" }, -[5210] = { 5, TM|SI, SEN(printargs), "n64_remap_file_pages" }, -[5211] = { 0, TS, SEN(printargs), "n64_rt_sigreturn" }, -[5212] = { 1, 0, SEN(printargs), "n64_set_tid_address" }, -[5213] = { 0, 0, SEN(printargs), "n64_restart_syscall" }, -[5214] = { 4, TI, SEN(printargs), "n64_semtimedop" }, -[5215] = { 4, TD, SEN(printargs), "n64_fadvise64_64" }, -[5216] = { 3, 0, SEN(printargs), "n64_timer_create" }, -[5217] = { 4, 0, SEN(printargs), "n64_timer_settime" }, -[5218] = { 2, 0, SEN(printargs), "n64_timer_gettime" }, -[5219] = { 1, 0, SEN(printargs), "n64_timer_getoverrun" }, -[5220] = { 1, 0, SEN(printargs), "n64_timer_delete" }, -[5221] = { 2, 0, SEN(printargs), "n64_clock_settime" }, -[5222] = { 2, 0, SEN(printargs), "n64_clock_gettime" }, -[5223] = { 2, 0, SEN(printargs), "n64_clock_getres" }, -[5224] = { 4, 0, SEN(printargs), "n64_clock_nanosleep" }, -[5225] = { 3, TS, SEN(printargs), "n64_tgkill" }, -[5226] = { 2, TF, SEN(printargs), "n64_utimes" }, -[5227] = { 6, TM, SEN(printargs), "n64_mbind" }, -[5228] = { 5, TM, SEN(printargs), "n64_get_mempolicy" }, -[5229] = { 3, TM, SEN(printargs), "n64_set_mempolicy" }, -[5230] = { 4, 0, SEN(printargs), "n64_mq_open" }, -[5231] = { 1, 0, SEN(printargs), "n64_mq_unlink" }, -[5232] = { 5, 0, SEN(printargs), "n64_mq_timedsend" }, -[5233] = { 5, 0, SEN(printargs), "n64_mq_timedreceive" }, -[5234] = { 2, 0, SEN(printargs), "n64_mq_notify" }, -[5235] = { 3, 0, SEN(printargs), "n64_mq_getsetattr" }, -[5236] = { 5, 0, SEN(printargs), "n64_vserver" }, -[5237] = { 5, TP, SEN(printargs), "n64_waitid" }, -[5238] = { }, -[5239] = { 5, 0, SEN(printargs), "n64_add_key" }, -[5240] = { 4, 0, SEN(printargs), "n64_request_key" }, -[5241] = { 5, 0, SEN(printargs), "n64_keyctl" }, -[5242] = { 1, 0, SEN(printargs), "n64_set_thread_area" }, -[5243] = { 0, TD, SEN(printargs), "n64_inotify_init" }, -[5244] = { 3, TD, SEN(printargs), "n64_inotify_add_watch" }, -[5245] = { 2, TD, SEN(printargs), "n64_inotify_rm_watch" }, -[5246] = { 4, TM, SEN(printargs), "n64_migrate_pages" }, -[5247] = { 4, TD|TF, SEN(printargs), "n64_openat" }, -[5248] = { 3, TD|TF, SEN(printargs), "n64_mkdirat" }, -[5249] = { 4, TD|TF, SEN(printargs), "n64_mknodat" }, -[5250] = { 5, TD|TF, SEN(printargs), "n64_fchownat" }, -[5251] = { 3, TD|TF, SEN(printargs), "n64_futimesat" }, -[5252] = { 4, TD|TF, SEN(printargs), "n64_newfstatat" }, -[5253] = { 3, TD|TF, SEN(printargs), "n64_unlinkat" }, -[5254] = { 4, TD|TF, SEN(printargs), "n64_renameat" }, -[5255] = { 5, TD|TF, SEN(printargs), "n64_linkat" }, -[5256] = { 3, TD|TF, SEN(printargs), "n64_symlinkat" }, -[5257] = { 4, TD|TF, SEN(printargs), "n64_readlinkat" }, -[5258] = { 3, TD|TF, SEN(printargs), "n64_fchmodat" }, -[5259] = { 3, TD|TF, SEN(printargs), "n64_faccessat" }, -[5260] = { 6, TD, SEN(printargs), "n64_pselect6" }, -[5261] = { 5, TD, SEN(printargs), "n64_ppoll" }, -[5262] = { 1, TP, SEN(printargs), "n64_unshare" }, -[5263] = { 6, TD, SEN(printargs), "n64_splice" }, -[5264] = { 4, TD, SEN(printargs), "n64_sync_file_range" }, -[5265] = { 4, TD, SEN(printargs), "n64_tee" }, -[5266] = { 4, TD, SEN(printargs), "n64_vmsplice" }, -[5267] = { 6, TM, SEN(printargs), "n64_move_pages" }, -[5268] = { 2, 0, SEN(printargs), "n64_set_robust_list" }, -[5269] = { 3, 0, SEN(printargs), "n64_get_robust_list" }, -[5270] = { 4, 0, SEN(printargs), "n64_kexec_load" }, -[5271] = { 3, 0, SEN(printargs), "n64_getcpu" }, -[5272] = { 6, TD, SEN(printargs), "n64_epoll_pwait" }, -[5273] = { 3, 0, SEN(printargs), "n64_ioprio_set" }, -[5274] = { 2, 0, SEN(printargs), "n64_ioprio_get" }, -[5275] = { 4, TD|TF, SEN(printargs), "n64_utimensat" }, -[5276] = { 3, TD|TS, SEN(printargs), "n64_signalfd" }, -[5277] = { 4, TD, SEN(printargs), "n64_timerfd" }, -[5278] = { 1, TD, SEN(printargs), "n64_eventfd" }, -[5279] = { 4, TD, SEN(printargs), "n64_fallocate" }, -[5280] = { 2, TD, SEN(printargs), "n64_timerfd_create" }, -[5281] = { 2, TD, SEN(printargs), "n64_timerfd_gettime" }, -[5282] = { 4, TD, SEN(printargs), "n64_timerfd_settime" }, -[5283] = { 4, TD|TS, SEN(printargs), "n64_signalfd4" }, -[5284] = { 2, TD, SEN(printargs), "n64_eventfd2" }, -[5285] = { 1, TD, SEN(printargs), "n64_epoll_create1" }, -[5286] = { 3, TD, SEN(printargs), "n64_dup3" }, -[5287] = { 2, TD, SEN(printargs), "n64_pipe2" }, -[5288] = { 1, TD, SEN(printargs), "n64_inotify_init1" }, -[5289] = { 4, TD, SEN(printargs), "n64_preadv" }, -[5290] = { 4, TD, SEN(printargs), "n64_pwritev" }, -[5291] = { 4, TP|TS, SEN(printargs), "n64_rt_tgsigqueueinfo" }, -[5292] = { 5, TD, SEN(printargs), "n64_perf_event_open" }, -[5293] = { 4, TN, SEN(printargs), "n64_accept4" }, -[5294] = { 5, TN, SEN(printargs), "n64_recvmmsg" }, -[5295] = { 2, TD, SEN(printargs), "n64_fanotify_init" }, -[5296] = { 5, TD|TF, SEN(printargs), "n64_fanotify_mark" }, -[5297] = { 4, 0, SEN(printargs), "n64_prlimit64" }, -[5298] = { 5, TD|TF, SEN(printargs), "n64_name_to_handle_at" }, -[5299] = { 3, TD, SEN(printargs), "n64_open_by_handle_at" }, -[5300] = { 2, 0, SEN(printargs), "n64_clock_adjtime" }, -[5301] = { 1, TD, SEN(printargs), "n64_syncfs" }, -[5302] = { 4, TN, SEN(printargs), "n64_sendmmsg" }, -[5303] = { 2, TD, SEN(printargs), "n64_setns" }, -[5304] = { 6, 0, SEN(printargs), "n64_process_vm_readv" }, -[5305] = { 6, 0, SEN(printargs), "n64_process_vm_writev" }, -[5306] = { 5, 0, SEN(printargs), "n64_kcmp" }, -[5307] = { 3, TD, SEN(printargs), "n64_finit_module" }, -[5308] = { 3, TD, SEN(printargs), "n64_getdents64" }, -[5309] = { 3, 0, SEN(printargs), "n64_sched_setattr" }, -[5310] = { 4, 0, SEN(printargs), "n64_sched_getattr" }, -[5311] = { 5, TD|TF, SEN(printargs), "n64_renameat2" }, -[5312] = { 3, 0, SEN(printargs), "n64_seccomp", }, -[5313] = { 3, 0, SEN(printargs), "n64_getrandom", }, -[5314] = { 2, TD, SEN(printargs), "n64_memfd_create", }, -[5315] = { 3, TD, SEN(printargs), "n64_bpf", }, -[5316] = { 5, TD|TF|TP|SE|SI, SEN(printargs), "n64_execveat", }, -[5317 ... 5399] = { }, diff --git a/linux/mips/syscallent-n64.h b/linux/mips/syscallent-n64.h index 42c1bfd43..f14eebfae 100644 --- a/linux/mips/syscallent-n64.h +++ b/linux/mips/syscallent-n64.h @@ -312,17 +312,20 @@ [5309] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [5310] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [5311] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[5312] = { 3, 0, SEN(seccomp), "seccomp", }, -[5313] = { 3, 0, SEN(getrandom), "getrandom", }, -[5314] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[5315] = { 3, TD, SEN(bpf), "bpf", }, -[5316] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[5317] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[5318] = { 2, 0, SEN(membarrier), "membarrier", }, +[5312] = { 3, 0, SEN(seccomp), "seccomp" }, +[5313] = { 3, 0, SEN(getrandom), "getrandom" }, +[5314] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[5315] = { 3, TD, SEN(bpf), "bpf" }, +[5316] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[5317] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[5318] = { 2, 0, SEN(membarrier), "membarrier" }, [5319] = { 3, TM, SEN(mlock2), "mlock2" }, [5320] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [5321] = { 6, TD, SEN(preadv2), "preadv2" }, [5322] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[5323] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, +[5324] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, +[5325] = { 1, 0, SEN(pkey_free), "pkey_free" }, # define SYS_socket_subcall 5400 # include "subcall.h" diff --git a/linux/mips/syscallent-o32-stub.h b/linux/mips/syscallent-o32-stub.h deleted file mode 100644 index 1409fedbc..000000000 --- a/linux/mips/syscallent-o32-stub.h +++ /dev/null @@ -1,358 +0,0 @@ -[4000] = { MA, 0, SEN(printargs), "o32_syscall" }, /* start of Linux o32 */ -[4001] = { 1, TP|SE, SEN(printargs), "o32_exit" }, -[4002] = { 0, TP, SEN(printargs), "o32_fork" }, -[4003] = { 3, TD, SEN(printargs), "o32_read" }, -[4004] = { 3, TD, SEN(printargs), "o32_write" }, -[4005] = { 3, TD|TF, SEN(printargs), "o32_open" }, -[4006] = { 1, TD, SEN(printargs), "o32_close" }, -[4007] = { 3, TP, SEN(printargs), "o32_waitpid" }, -[4008] = { 2, TD|TF, SEN(printargs), "o32_creat" }, -[4009] = { 2, TF, SEN(printargs), "o32_link" }, -[4010] = { 1, TF, SEN(printargs), "o32_unlink" }, -[4011] = { 3, TF|TP|SE|SI, SEN(printargs), "o32_execve" }, -[4012] = { 1, TF, SEN(printargs), "o32_chdir" }, -[4013] = { 1, 0, SEN(printargs), "o32_time" }, -[4014] = { 3, TF, SEN(printargs), "o32_mknod" }, -[4015] = { 2, TF, SEN(printargs), "o32_chmod" }, -[4016] = { 3, TF, SEN(printargs), "o32_lchown" }, -[4017] = { 0, TM, SEN(printargs), "o32_break" }, -[4018] = { 2, TF, SEN(printargs), "o32_oldstat" }, -[4019] = { 3, TD, SEN(printargs), "o32_lseek" }, -[4020] = { 0, 0, SEN(printargs), "o32_getpid" }, -[4021] = { 5, TF, SEN(printargs), "o32_mount" }, -[4022] = { 1, TF, SEN(printargs), "o32_umount" }, -[4023] = { 1, 0, SEN(printargs), "o32_setuid" }, -[4024] = { 0, NF, SEN(printargs), "o32_getuid" }, -[4025] = { 1, 0, SEN(printargs), "o32_stime" }, -[4026] = { 4, 0, SEN(printargs), "o32_ptrace" }, -[4027] = { 1, 0, SEN(printargs), "o32_alarm" }, -[4028] = { 2, TD, SEN(printargs), "o32_oldfstat" }, -[4029] = { 0, TS, SEN(printargs), "o32_pause" }, -[4030] = { 2, TF, SEN(printargs), "o32_utime" }, -[4031] = { 0, 0, SEN(printargs), "o32_stty" }, -[4032] = { 0, 0, SEN(printargs), "o32_gtty" }, -[4033] = { 2, TF, SEN(printargs), "o32_access" }, -[4034] = { 1, 0, SEN(printargs), "o32_nice" }, -[4035] = { 1, 0, SEN(printargs), "o32_ftime" }, -[4036] = { 0, 0, SEN(printargs), "o32_sync" }, -[4037] = { 2, TS, SEN(printargs), "o32_kill" }, -[4038] = { 2, TF, SEN(printargs), "o32_rename" }, -[4039] = { 2, TF, SEN(printargs), "o32_mkdir" }, -[4040] = { 1, TF, SEN(printargs), "o32_rmdir" }, -[4041] = { 1, TD, SEN(printargs), "o32_dup" }, -[4042] = { 1, TD, SEN(printargs), "o32_pipe" }, -[4043] = { 1, 0, SEN(printargs), "o32_times" }, -[4044] = { 0, 0, SEN(printargs), "o32_prof" }, -[4045] = { 1, TM|SI, SEN(printargs), "o32_brk" }, -[4046] = { 1, 0, SEN(printargs), "o32_setgid" }, -[4047] = { 0, NF, SEN(printargs), "o32_getgid" }, -[4048] = { 1, TS, SEN(printargs), "o32_signal" }, -[4049] = { 0, NF, SEN(printargs), "o32_geteuid" }, -[4050] = { 0, NF, SEN(printargs), "o32_getegid" }, -[4051] = { 1, TF, SEN(printargs), "o32_acct" }, -[4052] = { 2, TF, SEN(printargs), "o32_umount2" }, -[4053] = { 0, 0, SEN(printargs), "o32_lock" }, -[4054] = { 3, TD, SEN(printargs), "o32_ioctl" }, -[4055] = { 3, TD, SEN(printargs), "o32_fcntl" }, -[4056] = { 0, 0, SEN(printargs), "o32_mpx" }, -[4057] = { 2, 0, SEN(printargs), "o32_setpgid" }, -[4058] = { 0, 0, SEN(printargs), "o32_ulimit" }, -[4059] = { 1, 0, SEN(printargs), "o32_oldolduname" }, -[4060] = { 1, 0, SEN(printargs), "o32_umask" }, -[4061] = { 1, TF, SEN(printargs), "o32_chroot" }, -[4062] = { 2, 0, SEN(printargs), "o32_ustat" }, -[4063] = { 2, TD, SEN(printargs), "o32_dup2" }, -[4064] = { 0, 0, SEN(printargs), "o32_getppid" }, -[4065] = { 0, 0, SEN(printargs), "o32_getpgrp" }, -[4066] = { 0, 0, SEN(printargs), "o32_setsid" }, -[4067] = { 3, TS, SEN(printargs), "o32_sigaction" }, -[4068] = { 0, TS, SEN(printargs), "o32_sgetmask" }, -[4069] = { 1, TS, SEN(printargs), "o32_ssetmask" }, -[4070] = { 2, 0, SEN(printargs), "o32_setreuid" }, -[4071] = { 2, 0, SEN(printargs), "o32_setregid" }, -[4072] = { 3, TS, SEN(printargs), "o32_sigsuspend" }, -[4073] = { 1, TS, SEN(printargs), "o32_sigpending" }, -[4074] = { 2, 0, SEN(printargs), "o32_sethostname" }, -[4075] = { 2, 0, SEN(printargs), "o32_setrlimit" }, -[4076] = { 2, 0, SEN(printargs), "o32_getrlimit" }, -[4077] = { 2, 0, SEN(printargs), "o32_getrusage" }, -[4078] = { 2, 0, SEN(printargs), "o32_gettimeofday" }, -[4079] = { 2, 0, SEN(printargs), "o32_settimeofday" }, -[4080] = { 2, 0, SEN(printargs), "o32_getgroups" }, -[4081] = { 2, 0, SEN(printargs), "o32_setgroups" }, -[4082] = { 0, 0, SEN(printargs), "o32_reserved82" }, -[4083] = { 2, TF, SEN(printargs), "o32_symlink" }, -[4084] = { 2, TF, SEN(printargs), "o32_oldlstat" }, -[4085] = { 3, TF, SEN(printargs), "o32_readlink" }, -[4086] = { 1, TF, SEN(printargs), "o32_uselib" }, -[4087] = { 2, TF, SEN(printargs), "o32_swapon" }, -[4088] = { 4, 0, SEN(printargs), "o32_reboot" }, -[4089] = { 3, TD, SEN(printargs), "o32_readdir" }, -[4090] = { 6, TD|TM|SI, SEN(printargs), "o32_mmap" }, -[4091] = { 2, TM|SI, SEN(printargs), "o32_munmap" }, -[4092] = { 2, TF, SEN(printargs), "o32_truncate" }, -[4093] = { 2, TD, SEN(printargs), "o32_ftruncate" }, -[4094] = { 2, TD, SEN(printargs), "o32_fchmod" }, -[4095] = { 3, TD, SEN(printargs), "o32_fchown" }, -[4096] = { 2, 0, SEN(printargs), "o32_getpriority" }, -[4097] = { 3, 0, SEN(printargs), "o32_setpriority" }, -[4098] = { 0, 0, SEN(printargs), "o32_profil" }, -[4099] = { 3, TF, SEN(printargs), "o32_statfs" }, -[4100] = { 3, TD, SEN(printargs), "o32_fstatfs" }, -[4101] = { 0, 0, SEN(printargs), "o32_ioperm" }, -[4102] = { 2, TD, SEN(printargs), "o32_socketcall" }, -[4103] = { 3, 0, SEN(printargs), "o32_syslog" }, -[4104] = { 3, 0, SEN(printargs), "o32_setitimer" }, -[4105] = { 2, 0, SEN(printargs), "o32_getitimer" }, -[4106] = { 2, TF, SEN(printargs), "o32_stat" }, -[4107] = { 2, TF, SEN(printargs), "o32_lstat" }, -[4108] = { 2, TD, SEN(printargs), "o32_fstat" }, -[4109] = { 1, 0, SEN(printargs), "o32_olduname" }, -[4110] = { 0, 0, SEN(printargs), "o32_iopl" }, -[4111] = { 0, 0, SEN(printargs), "o32_vhangup" }, -[4112] = { 0, 0, SEN(printargs), "o32_idle" }, -[4113] = { 5, 0, SEN(printargs), "o32_vm86" }, -[4114] = { 4, TP, SEN(printargs), "o32_wait4" }, -[4115] = { 1, TF, SEN(printargs), "o32_swapoff" }, -[4116] = { 1, 0, SEN(printargs), "o32_sysinfo" }, -[4117] = { 6, TI, SEN(printargs), "o32_ipc" }, -[4118] = { 1, TD, SEN(printargs), "o32_fsync" }, -[4119] = { 0, TS, SEN(printargs), "o32_sigreturn" }, -[4120] = { 5, TP, SEN(printargs), "o32_clone" }, -[4121] = { 2, 0, SEN(printargs), "o32_setdomainname" }, -[4122] = { 1, 0, SEN(printargs), "o32_uname" }, -[4123] = { 0, 0, SEN(printargs), "o32_modify_ldt" }, -[4124] = { 1, 0, SEN(printargs), "o32_adjtimex" }, -[4125] = { 3, TM|SI, SEN(printargs), "o32_mprotect" }, -[4126] = { 3, TS, SEN(printargs), "o32_sigprocmask" }, -[4127] = { 2, 0, SEN(printargs), "o32_create_module" }, -[4128] = { 3, 0, SEN(printargs), "o32_init_module" }, -[4129] = { 2, 0, SEN(printargs), "o32_delete_module" }, -[4130] = { 1, 0, SEN(printargs), "o32_get_kernel_syms" }, -[4131] = { 4, TF, SEN(printargs), "o32_quotactl" }, -[4132] = { 1, 0, SEN(printargs), "o32_getpgid" }, -[4133] = { 1, TD, SEN(printargs), "o32_fchdir" }, -[4134] = { 2, 0, SEN(printargs), "o32_bdflush" }, -[4135] = { 3, 0, SEN(printargs), "o32_sysfs" }, -[4136] = { 1, 0, SEN(printargs), "o32_personality" }, -[4137] = { 0, 0, SEN(printargs), "o32_afs_syscall" }, -[4138] = { 1, NF, SEN(printargs), "o32_setfsuid" }, -[4139] = { 1, NF, SEN(printargs), "o32_setfsgid" }, -[4140] = { 5, TD, SEN(printargs), "o32__llseek" }, -[4141] = { 3, TD, SEN(printargs), "o32_getdents" }, -[4142] = { 5, TD, SEN(printargs), "o32_select" }, -[4143] = { 2, TD, SEN(printargs), "o32_flock" }, -[4144] = { 3, TM, SEN(printargs), "o32_msync" }, -[4145] = { 3, TD, SEN(printargs), "o32_readv" }, -[4146] = { 3, TD, SEN(printargs), "o32_writev" }, -[4147] = { 3, 0, SEN(printargs), "o32_cacheflush" }, -[4148] = { 3, 0, SEN(printargs), "o32_cachectl" }, -[4149] = { 4, 0, SEN(printargs), "o32_sysmips" }, -[4150] = { 0, 0, SEN(printargs), "o32_setup" }, -[4151] = { 1, 0, SEN(printargs), "o32_getsid" }, -[4152] = { 1, TD, SEN(printargs), "o32_fdatasync" }, -[4153] = { 1, 0, SEN(printargs), "o32__sysctl" }, -[4154] = { 2, TM, SEN(printargs), "o32_mlock" }, -[4155] = { 2, TM, SEN(printargs), "o32_munlock" }, -[4156] = { 1, TM, SEN(printargs), "o32_mlockall" }, -[4157] = { 0, TM, SEN(printargs), "o32_munlockall" }, -[4158] = { 2, 0, SEN(printargs), "o32_sched_setparam" }, -[4159] = { 2, 0, SEN(printargs), "o32_sched_getparam" }, -[4160] = { 3, 0, SEN(printargs), "o32_sched_setscheduler" }, -[4161] = { 1, 0, SEN(printargs), "o32_sched_getscheduler" }, -[4162] = { 0, 0, SEN(printargs), "o32_sched_yield" }, -[4163] = { 1, 0, SEN(printargs), "o32_sched_get_priority_max"}, -[4164] = { 1, 0, SEN(printargs), "o32_sched_get_priority_min"}, -[4165] = { 2, 0, SEN(printargs), "o32_sched_rr_get_interval" }, -[4166] = { 2, 0, SEN(printargs), "o32_nanosleep" }, -[4167] = { 5, TM|SI, SEN(printargs), "o32_mremap" }, -[4168] = { 3, TN, SEN(printargs), "o32_accept" }, -[4169] = { 3, TN, SEN(printargs), "o32_bind" }, -[4170] = { 3, TN, SEN(printargs), "o32_connect" }, -[4171] = { 3, TN, SEN(printargs), "o32_getpeername" }, -[4172] = { 3, TN, SEN(printargs), "o32_getsockname" }, -[4173] = { 5, TN, SEN(printargs), "o32_getsockopt" }, -[4174] = { 2, TN, SEN(printargs), "o32_listen" }, -[4175] = { 4, TN, SEN(printargs), "o32_recv" }, -[4176] = { 6, TN, SEN(printargs), "o32_recvfrom" }, -[4177] = { 3, TN, SEN(printargs), "o32_recvmsg" }, -[4178] = { 4, TN, SEN(printargs), "o32_send" }, -[4179] = { 3, TN, SEN(printargs), "o32_sendmsg" }, -[4180] = { 6, TN, SEN(printargs), "o32_sendto" }, -[4181] = { 5, TN, SEN(printargs), "o32_setsockopt" }, -[4182] = { 2, TN, SEN(printargs), "o32_shutdown" }, -[4183] = { 3, TN, SEN(printargs), "o32_socket" }, -[4184] = { 4, TN, SEN(printargs), "o32_socketpair" }, -[4185] = { 3, 0, SEN(printargs), "o32_setresuid" }, -[4186] = { 3, 0, SEN(printargs), "o32_getresuid" }, -[4187] = { 5, 0, SEN(printargs), "o32_query_module" }, -[4188] = { 3, TD, SEN(printargs), "o32_poll" }, -[4189] = { 3, 0, SEN(printargs), "o32_nfsservctl" }, -[4190] = { 3, 0, SEN(printargs), "o32_setresgid" }, -[4191] = { 3, 0, SEN(printargs), "o32_getresgid" }, -[4192] = { 5, 0, SEN(printargs), "o32_prctl" }, -[4193] = { 0, TS, SEN(printargs), "o32_rt_sigreturn" }, -[4194] = { 4, TS, SEN(printargs), "o32_rt_sigaction" }, -[4195] = { 4, TS, SEN(printargs), "o32_rt_sigprocmask" }, -[4196] = { 2, TS, SEN(printargs), "o32_rt_sigpending" }, -[4197] = { 4, TS, SEN(printargs), "o32_rt_sigtimedwait" }, -[4198] = { 3, TS, SEN(printargs), "o32_rt_sigqueueinfo" }, -[4199] = { 2, TS, SEN(printargs), "o32_rt_sigsuspend" }, -[4200] = { 6, TD, SEN(printargs), "o32_pread64" }, -[4201] = { 6, TD, SEN(printargs), "o32_pwrite64" }, -[4202] = { 3, TF, SEN(printargs), "o32_chown" }, -[4203] = { 2, TF, SEN(printargs), "o32_getcwd" }, -[4204] = { 2, 0, SEN(printargs), "o32_capget" }, -[4205] = { 2, 0, SEN(printargs), "o32_capset" }, -[4206] = { 2, TS, SEN(printargs), "o32_sigaltstack" }, -[4207] = { 4, TD|TN, SEN(printargs), "o32_sendfile" }, -[4208] = { 5, TN, SEN(printargs), "o32_getpmsg" }, -[4209] = { 5, TN, SEN(printargs), "o32_putpmsg" }, -[4210] = { 6, TD|TM|SI, SEN(printargs), "o32_mmap2" }, -[4211] = { 4, TF, SEN(printargs), "o32_truncate64" }, -[4212] = { 4, TD, SEN(printargs), "o32_ftruncate64" }, -[4213] = { 2, TF, SEN(printargs), "o32_stat64" }, -[4214] = { 2, TF, SEN(printargs), "o32_lstat64" }, -[4215] = { 2, TD, SEN(printargs), "o32_fstat64" }, -[4216] = { 2, TF, SEN(printargs), "o32_pivot_root" }, -[4217] = { 3, TM, SEN(printargs), "o32_mincore" }, -[4218] = { 3, TM, SEN(printargs), "o32_madvise" }, -[4219] = { 3, TD, SEN(printargs), "o32_getdents64" }, -[4220] = { 3, TD, SEN(printargs), "o32_fcntl64" }, -[4221] = { }, -[4222] = { 0, 0, SEN(printargs), "o32_gettid" }, -[4223] = { 5, TD, SEN(printargs), "o32_readahead" }, -[4224] = { 5, TF, SEN(printargs), "o32_setxattr" }, -[4225] = { 5, TF, SEN(printargs), "o32_lsetxattr" }, -[4226] = { 5, TD, SEN(printargs), "o32_fsetxattr" }, -[4227] = { 4, TF, SEN(printargs), "o32_getxattr" }, -[4228] = { 4, TF, SEN(printargs), "o32_lgetxattr" }, -[4229] = { 4, TD, SEN(printargs), "o32_fgetxattr" }, -[4230] = { 3, TF, SEN(printargs), "o32_listxattr" }, -[4231] = { 3, TF, SEN(printargs), "o32_llistxattr" }, -[4232] = { 3, TD, SEN(printargs), "o32_flistxattr" }, -[4233] = { 2, TF, SEN(printargs), "o32_removexattr" }, -[4234] = { 2, TF, SEN(printargs), "o32_lremovexattr" }, -[4235] = { 2, TD, SEN(printargs), "o32_fremovexattr" }, -[4236] = { 2, TS, SEN(printargs), "o32_tkill" }, -[4237] = { 4, TD|TN, SEN(printargs), "o32_sendfile64" }, -[4238] = { 6, 0, SEN(printargs), "o32_futex" }, -[4239] = { 3, 0, SEN(printargs), "o32_sched_setaffinity" }, -[4240] = { 3, 0, SEN(printargs), "o32_sched_getaffinity" }, -[4241] = { 2, 0, SEN(printargs), "o32_io_setup" }, -[4242] = { 1, 0, SEN(printargs), "o32_io_destroy" }, -[4243] = { 5, 0, SEN(printargs), "o32_io_getevents" }, -[4244] = { 3, 0, SEN(printargs), "o32_io_submit" }, -[4245] = { 3, 0, SEN(printargs), "o32_io_cancel" }, -[4246] = { 1, TP|SE, SEN(printargs), "o32_exit_group" }, -[4247] = { 4, 0, SEN(printargs), "o32_lookup_dcookie" }, -[4248] = { 1, TD, SEN(printargs), "o32_epoll_create" }, -[4249] = { 4, TD, SEN(printargs), "o32_epoll_ctl" }, -[4250] = { 4, TD, SEN(printargs), "o32_epoll_wait" }, -[4251] = { 5, TM|SI, SEN(printargs), "o32_remap_file_pages" }, -[4252] = { 1, 0, SEN(printargs), "o32_set_tid_address" }, -[4253] = { 0, 0, SEN(printargs), "o32_restart_syscall" }, -[4254] = { 7, TD, SEN(printargs), "o32_fadvise64_64" }, -[4255] = { 3, TF, SEN(printargs), "o32_statfs64" }, -[4256] = { 2, TD, SEN(printargs), "o32_fstatfs64" }, -[4257] = { 3, 0, SEN(printargs), "o32_timer_create" }, -[4258] = { 4, 0, SEN(printargs), "o32_timer_settime" }, -[4259] = { 2, 0, SEN(printargs), "o32_timer_gettime" }, -[4260] = { 1, 0, SEN(printargs), "o32_timer_getoverrun" }, -[4261] = { 1, 0, SEN(printargs), "o32_timer_delete" }, -[4262] = { 2, 0, SEN(printargs), "o32_clock_settime" }, -[4263] = { 2, 0, SEN(printargs), "o32_clock_gettime" }, -[4264] = { 2, 0, SEN(printargs), "o32_clock_getres" }, -[4265] = { 4, 0, SEN(printargs), "o32_clock_nanosleep" }, -[4266] = { 3, TS, SEN(printargs), "o32_tgkill" }, -[4267] = { 2, TF, SEN(printargs), "o32_utimes" }, -[4268] = { 6, TM, SEN(printargs), "o32_mbind" }, -[4269] = { 5, TM, SEN(printargs), "o32_get_mempolicy" }, -[4270] = { 3, TM, SEN(printargs), "o32_set_mempolicy" }, -[4271] = { 4, 0, SEN(printargs), "o32_mq_open" }, -[4272] = { 1, 0, SEN(printargs), "o32_mq_unlink" }, -[4273] = { 5, 0, SEN(printargs), "o32_mq_timedsend" }, -[4274] = { 5, 0, SEN(printargs), "o32_mq_timedreceive" }, -[4275] = { 2, 0, SEN(printargs), "o32_mq_notify" }, -[4276] = { 3, 0, SEN(printargs), "o32_mq_getsetattr" }, -[4277] = { 5, 0, SEN(printargs), "o32_vserver" }, -[4278] = { 5, TP, SEN(printargs), "o32_waitid" }, -[4279] = { }, -[4280] = { 5, 0, SEN(printargs), "o32_add_key" }, -[4281] = { 4, 0, SEN(printargs), "o32_request_key" }, -[4282] = { 5, 0, SEN(printargs), "o32_keyctl" }, -[4283] = { 1, 0, SEN(printargs), "o32_set_thread_area" }, -[4284] = { 0, TD, SEN(printargs), "o32_inotify_init" }, -[4285] = { 3, TD, SEN(printargs), "o32_inotify_add_watch" }, -[4286] = { 2, TD, SEN(printargs), "o32_inotify_rm_watch" }, -[4287] = { 4, TM, SEN(printargs), "o32_migrate_pages" }, -[4288] = { 4, TD|TF, SEN(printargs), "o32_openat" }, -[4289] = { 3, TD|TF, SEN(printargs), "o32_mkdirat" }, -[4290] = { 4, TD|TF, SEN(printargs), "o32_mknodat" }, -[4291] = { 5, TD|TF, SEN(printargs), "o32_fchownat" }, -[4292] = { 3, TD|TF, SEN(printargs), "o32_futimesat" }, -[4293] = { 4, TD|TF, SEN(printargs), "o32_fstatat64" }, -[4294] = { 3, TD|TF, SEN(printargs), "o32_unlinkat" }, -[4295] = { 4, TD|TF, SEN(printargs), "o32_renameat" }, -[4296] = { 5, TD|TF, SEN(printargs), "o32_linkat" }, -[4297] = { 3, TD|TF, SEN(printargs), "o32_symlinkat" }, -[4298] = { 4, TD|TF, SEN(printargs), "o32_readlinkat" }, -[4299] = { 3, TD|TF, SEN(printargs), "o32_fchmodat" }, -[4300] = { 3, TD|TF, SEN(printargs), "o32_faccessat" }, -[4301] = { 6, TD, SEN(printargs), "o32_pselect6" }, -[4302] = { 5, TD, SEN(printargs), "o32_ppoll" }, -[4303] = { 1, TP, SEN(printargs), "o32_unshare" }, -[4304] = { 6, TD, SEN(printargs), "o32_splice" }, -[4305] = { 7, TD, SEN(printargs), "o32_sync_file_range" }, -[4306] = { 4, TD, SEN(printargs), "o32_tee" }, -[4307] = { 4, TD, SEN(printargs), "o32_vmsplice" }, -[4308] = { 6, TM, SEN(printargs), "o32_move_pages" }, -[4309] = { 2, 0, SEN(printargs), "o32_set_robust_list" }, -[4310] = { 3, 0, SEN(printargs), "o32_get_robust_list" }, -[4311] = { 4, 0, SEN(printargs), "o32_kexec_load" }, -[4312] = { 3, 0, SEN(printargs), "o32_getcpu" }, -[4313] = { 6, TD, SEN(printargs), "o32_epoll_pwait" }, -[4314] = { 3, 0, SEN(printargs), "o32_ioprio_set" }, -[4315] = { 2, 0, SEN(printargs), "o32_ioprio_get" }, -[4316] = { 4, TD|TF, SEN(printargs), "o32_utimensat" }, -[4317] = { 3, TD|TS, SEN(printargs), "o32_signalfd" }, -[4318] = { 4, TD, SEN(printargs), "o32_timerfd" }, -[4319] = { 1, TD, SEN(printargs), "o32_eventfd" }, -[4320] = { 6, TD, SEN(printargs), "o32_fallocate" }, -[4321] = { 2, TD, SEN(printargs), "o32_timerfd_create" }, -[4322] = { 2, TD, SEN(printargs), "o32_timerfd_gettime" }, -[4323] = { 4, TD, SEN(printargs), "o32_timerfd_settime" }, -[4324] = { 4, TD|TS, SEN(printargs), "o32_signalfd4" }, -[4325] = { 2, TD, SEN(printargs), "o32_eventfd2" }, -[4326] = { 1, TD, SEN(printargs), "o32_epoll_create1" }, -[4327] = { 3, TD, SEN(printargs), "o32_dup3" }, -[4328] = { 2, TD, SEN(printargs), "o32_pipe2" }, -[4329] = { 1, TD, SEN(printargs), "o32_inotify_init1" }, -[4330] = { 5, TD, SEN(printargs), "o32_preadv" }, -[4331] = { 5, TD, SEN(printargs), "o32_pwritev" }, -[4332] = { 4, TP|TS, SEN(printargs), "o32_rt_tgsigqueueinfo" }, -[4333] = { 5, TD, SEN(printargs), "o32_perf_event_open" }, -[4334] = { 4, TN, SEN(printargs), "o32_accept4" }, -[4335] = { 5, TN, SEN(printargs), "o32_recvmmsg" }, -[4336] = { 2, TD, SEN(printargs), "o32_fanotify_init" }, -[4337] = { 6, TD|TF, SEN(printargs), "o32_fanotify_mark" }, -[4338] = { 4, 0, SEN(printargs), "o32_prlimit64" }, -[4339] = { 5, TD|TF, SEN(printargs), "o32_name_to_handle_at" }, -[4340] = { 3, TD, SEN(printargs), "o32_open_by_handle_at" }, -[4341] = { 2, 0, SEN(printargs), "o32_clock_adjtime" }, -[4342] = { 1, TD, SEN(printargs), "o32_syncfs" }, -[4343] = { 4, TN, SEN(printargs), "o32_sendmmsg" }, -[4344] = { 2, TD, SEN(printargs), "o32_setns" }, -[4345] = { 6, 0, SEN(printargs), "o32_process_vm_readv" }, -[4346] = { 6, 0, SEN(printargs), "o32_process_vm_writev" }, -[4347] = { 5, 0, SEN(printargs), "o32_kcmp" }, -[4348] = { 3, TD, SEN(printargs), "o32_finit_module" }, -[4349] = { 3, 0, SEN(printargs), "o32_sched_setattr" }, -[4350] = { 4, 0, SEN(printargs), "o32_sched_getattr" }, -[4351] = { 5, TD|TF, SEN(printargs), "o32_renameat2" }, -[4352] = { 3, 0, SEN(printargs), "o32_seccomp", }, -[4353] = { 3, 0, SEN(printargs), "o32_getrandom", }, -[4354] = { 2, TD, SEN(printargs), "o32_memfd_create", }, -[4355] = { 3, TD, SEN(printargs), "o32_bpf", }, -[4356] = { 5, TD|TF|TP|SE|SI, SEN(printargs), "o32_execveat", }, -[4357 ... 4399] = { }, diff --git a/linux/mips/syscallent-o32.h b/linux/mips/syscallent-o32.h index c92005fc6..780d3bc05 100644 --- a/linux/mips/syscallent-o32.h +++ b/linux/mips/syscallent-o32.h @@ -352,17 +352,20 @@ [4349] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [4350] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [4351] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[4352] = { 3, 0, SEN(seccomp), "seccomp", }, -[4353] = { 3, 0, SEN(getrandom), "getrandom", }, -[4354] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[4355] = { 3, TD, SEN(bpf), "bpf", }, -[4356] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[4357] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[4358] = { 2, 0, SEN(membarrier), "membarrier", }, +[4352] = { 3, 0, SEN(seccomp), "seccomp" }, +[4353] = { 3, 0, SEN(getrandom), "getrandom" }, +[4354] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[4355] = { 3, TD, SEN(bpf), "bpf" }, +[4356] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[4357] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[4358] = { 2, 0, SEN(membarrier), "membarrier" }, [4359] = { 3, TM, SEN(mlock2), "mlock2" }, [4360] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [4361] = { 6, TD, SEN(preadv2), "preadv2" }, [4362] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[4363] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, +[4364] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, +[4365] = { 1, 0, SEN(pkey_free), "pkey_free" }, # define SYS_socket_subcall 4400 # include "subcall.h" diff --git a/linux/nios2/set_error.c b/linux/nios2/set_error.c new file mode 100644 index 000000000..ecef8aa2f --- /dev/null +++ b/linux/nios2/set_error.c @@ -0,0 +1,15 @@ +static int +arch_set_error(struct tcb *tcp) +{ + nios2_regs.regs[7] = 1; + nios2_regs.regs[2] = -tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + nios2_regs.regs[7] = 0; + nios2_regs.regs[2] = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/nios2/set_scno.c b/linux/nios2/set_scno.c new file mode 100644 index 000000000..1f5051c23 --- /dev/null +++ b/linux/nios2/set_scno.c @@ -0,0 +1,6 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + nios2_regs.regs[2] = scno; + return set_regs(tcp->pid); +} diff --git a/linux/or1k/set_error.c b/linux/or1k/set_error.c new file mode 100644 index 000000000..179733878 --- /dev/null +++ b/linux/or1k/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + or1k_regs.gpr[11] = -tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + or1k_regs.gpr[11] = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/or1k/set_scno.c b/linux/or1k/set_scno.c new file mode 100644 index 000000000..269eeb5a2 --- /dev/null +++ b/linux/or1k/set_scno.c @@ -0,0 +1,6 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + or1k_regs.gpr[11] = scno; + return set_regs(tcp->pid); +} diff --git a/linux/powerpc/arch_sigreturn.c b/linux/powerpc/arch_sigreturn.c index c28a19621..4f68648d6 100644 --- a/linux/powerpc/arch_sigreturn.c +++ b/linux/powerpc/arch_sigreturn.c @@ -1,21 +1,21 @@ static void arch_sigreturn(struct tcb *tcp) { - long esp = ppc_regs.gpr[1]; + unsigned long addr = ppc_regs.gpr[1]; struct sigcontext sc; /* Skip dummy stack frame. */ #ifdef POWERPC64 if (current_personality == 0) - esp += 128; + addr += 128; else #endif - esp += 64; + addr += 64; - if (umove(tcp, esp, &sc) < 0) { - tprintf("{mask=%#lx}", esp); + if (umove(tcp, addr, &sc) < 0) { + tprintf("{mask=%#lx}", addr); } else { - unsigned long mask[NSIG / 8 / sizeof(long)]; + unsigned long mask[NSIG_BYTES / sizeof(long)]; #ifdef POWERPC64 mask[0] = sc.oldmask | (sc._unused[3] << 32); #else diff --git a/linux/powerpc/getregs_old.c b/linux/powerpc/getregs_old.c index 22167cb26..1730f033f 100644 --- a/linux/powerpc/getregs_old.c +++ b/linux/powerpc/getregs_old.c @@ -9,24 +9,24 @@ getregs_old(pid_t pid) long r; if (iflag) { - r = upeek(pid, sizeof(long) * PT_NIP, (long *)&ppc_regs.nip); + r = upeek(pid, sizeof(long) * PT_NIP, &ppc_regs.nip); if (r) goto out; } #ifdef POWERPC64 /* else we never use it */ - r = upeek(pid, sizeof(long) * PT_MSR, (long *)&ppc_regs.msr); + r = upeek(pid, sizeof(long) * PT_MSR, &ppc_regs.msr); if (r) goto out; #endif - r = upeek(pid, sizeof(long) * PT_CCR, (long *)&ppc_regs.ccr); + r = upeek(pid, sizeof(long) * PT_CCR, &ppc_regs.ccr); if (r) goto out; - r = upeek(pid, sizeof(long) * PT_ORIG_R3, (long *)&ppc_regs.orig_gpr3); + r = upeek(pid, sizeof(long) * PT_ORIG_R3, &ppc_regs.orig_gpr3); if (r) goto out; for (i = 0; i <= 8; i++) { r = upeek(pid, sizeof(long) * (PT_R0 + i), - (long *)&ppc_regs.gpr[i]); + &ppc_regs.gpr[i]); if (r) goto out; } diff --git a/linux/powerpc/getregs_old.h b/linux/powerpc/getregs_old.h new file mode 100644 index 000000000..31388e27d --- /dev/null +++ b/linux/powerpc/getregs_old.h @@ -0,0 +1 @@ +#include "x86_64/getregs_old.h" diff --git a/linux/powerpc/ioctls_arch0.h b/linux/powerpc/ioctls_arch0.h index 9b00dc3ba..6b429d30c 100644 --- a/linux/powerpc/ioctls_arch0.h +++ b/linux/powerpc/ioctls_arch0.h @@ -76,6 +76,9 @@ { "asm/nvram.h", "IOC_NVRAM_GET_OFFSET", _IOC_READ|_IOC_WRITE, 0x7042, 0x04 }, { "asm/nvram.h", "IOC_NVRAM_SYNC", _IOC_NONE, 0x7043, 0x00 }, { "asm/nvram.h", "OBSOLETE_PMAC_NVRAM_GET_OFFSET", _IOC_READ|_IOC_WRITE, 0x7040, 0x04 }, +{ "asm/opal-prd.h", "OPAL_PRD_GET_INFO", _IOC_READ, 0x6f01, 0x20 }, +{ "asm/opal-prd.h", "OPAL_PRD_SCOM_READ", _IOC_READ, 0x6f02, 0x20 }, +{ "asm/opal-prd.h", "OPAL_PRD_SCOM_WRITE", _IOC_WRITE, 0x6f03, 0x20 }, { "asm/ps3fb.h", "FBIO_WAITFORVSYNC", _IOC_WRITE, 0x4620, 0x04 }, { "asm/ps3fb.h", "PS3FB_IOCTL_FSEL", _IOC_WRITE, 0x7206, 0x04 }, { "asm/ps3fb.h", "PS3FB_IOCTL_GETMODE", _IOC_READ, 0x7202, 0x04 }, @@ -90,3 +93,93 @@ { "asm/sockios.h", "SIOCGSTAMP", 0, 0x8906, 0 }, { "asm/sockios.h", "SIOCGSTAMPNS", 0, 0x8907, 0 }, { "asm/sockios.h", "SIOCSPGRP", 0, 0x8902, 0 }, +{ "linux/kvm.h", "KVM_ALLOCATE_RMA", _IOC_READ, 0xaea9, 0x08 }, +{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, +{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 }, +{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c }, +{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, +{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE", _IOC_WRITE, 0xaea8, 0x10 }, +{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE_64", _IOC_WRITE, 0xaea8, 0x20 }, +{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, +{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, +{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 }, +{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x10 }, +{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 }, +{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 }, +{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 }, +{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 }, +{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 }, +{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x100 }, +{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 }, +{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 }, +{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 }, +{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 }, +{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x188 }, +{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 }, +{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x4d0 }, +{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 }, +{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 }, +{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 }, +{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 }, +{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 }, +{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 }, +{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 }, +{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 }, +{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 }, +{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 }, +{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 }, +{ "linux/kvm.h", "KVM_PPC_GET_HTAB_FD", _IOC_WRITE, 0xaeaa, 0x20 }, +{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 }, +{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 }, +{ "linux/kvm.h", "KVM_PPC_RTAS_DEFINE_TOKEN", _IOC_WRITE, 0xaeac, 0x80 }, +{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 }, +{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, +{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, +{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, +{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, +{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, +{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, +{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, +{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, +{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, +{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, +{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, +{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, +{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 }, +{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, +{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, +{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x04 }, +{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 }, +{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 }, +{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 }, +{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x100 }, +{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 }, +{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x108 }, +{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 }, +{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 }, +{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 }, +{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 }, +{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 }, +{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 }, +{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x188 }, +{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 }, +{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x4d0 }, +{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 }, +{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 }, +{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 }, +{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 }, +{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, +{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, +{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, +{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, +{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, +{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 }, +{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, diff --git a/linux/powerpc/set_error.c b/linux/powerpc/set_error.c new file mode 100644 index 000000000..7edabee59 --- /dev/null +++ b/linux/powerpc/set_error.c @@ -0,0 +1,23 @@ +static int +arch_set_error(struct tcb *tcp) +{ + ppc_regs.gpr[3] = tcp->u_error; +#ifdef HAVE_GETREGS_OLD + return upoke(tcp->pid, sizeof(long) * (PT_R0 + 3), ppc_regs.gpr[3]); +#else + return set_regs(tcp->pid); +#endif +} + +static int +arch_set_success(struct tcb *tcp) +{ + ppc_regs.gpr[3] = tcp->u_rval; + ppc_regs.ccr &= ~0x10000000; +#ifdef HAVE_GETREGS_OLD + return upoke(tcp->pid, sizeof(long) * PT_CCR, ppc_regs.ccr) || + upoke(tcp->pid, sizeof(long) * (PT_R0 + 3), ppc_regs.gpr[3]); +#else + return set_regs(tcp->pid); +#endif +} diff --git a/linux/powerpc/set_scno.c b/linux/powerpc/set_scno.c new file mode 100644 index 000000000..c5a04687d --- /dev/null +++ b/linux/powerpc/set_scno.c @@ -0,0 +1,10 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ +#ifdef HAVE_GETREGS_OLD + return upoke(tcp->pid, sizeof(long) * PT_R0, scno); +#else + ppc_regs.gpr[0] = scno; + return set_regs(tcp->pid); +#endif +} diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h index b10b83ecc..4e1eb8b79 100644 --- a/linux/powerpc/syscallent.h +++ b/linux/powerpc/syscallent.h @@ -384,14 +384,14 @@ [355] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [356] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [357] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[358] = { 3, 0, SEN(seccomp), "seccomp", }, -[359] = { 3, 0, SEN(getrandom), "getrandom", }, -[360] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[361] = { 3, TD, SEN(bpf), "bpf", }, -[362] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, +[358] = { 3, 0, SEN(seccomp), "seccomp" }, +[359] = { 3, 0, SEN(getrandom), "getrandom" }, +[360] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[361] = { 3, TD, SEN(bpf), "bpf" }, +[362] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, [363] = { 0, 0, SEN(printargs), "switch_endian" }, -[364] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[365] = { 2, 0, SEN(membarrier), "membarrier", }, +[364] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[365] = { 2, 0, SEN(membarrier), "membarrier" }, [366] = { 3, TI, SEN(semop), "semop" }, [367] = { 3, TI, SEN(semget), "semget" }, [368] = { 4, TI, SEN(semctl), "semctl" }, @@ -408,6 +408,7 @@ [379] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [380] = { 6, TD, SEN(preadv2), "preadv2" }, [381] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[382] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/powerpc64/getregs_old.h b/linux/powerpc64/getregs_old.h new file mode 100644 index 000000000..fdd98f9fb --- /dev/null +++ b/linux/powerpc64/getregs_old.h @@ -0,0 +1 @@ +#include "powerpc/getregs_old.h" diff --git a/linux/powerpc64/set_error.c b/linux/powerpc64/set_error.c new file mode 100644 index 000000000..b8dc768fc --- /dev/null +++ b/linux/powerpc64/set_error.c @@ -0,0 +1 @@ +#include "powerpc/set_error.c" diff --git a/linux/powerpc64/set_scno.c b/linux/powerpc64/set_scno.c new file mode 100644 index 000000000..c23bb83e9 --- /dev/null +++ b/linux/powerpc64/set_scno.c @@ -0,0 +1 @@ +#include "powerpc/set_scno.c" diff --git a/linux/powerpc64/syscallent.h b/linux/powerpc64/syscallent.h index ba22c3c10..e5263d4d7 100644 --- a/linux/powerpc64/syscallent.h +++ b/linux/powerpc64/syscallent.h @@ -379,14 +379,14 @@ [355] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [356] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [357] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[358] = { 3, 0, SEN(seccomp), "seccomp", }, -[359] = { 3, 0, SEN(getrandom), "getrandom", }, -[360] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[361] = { 3, TD, SEN(bpf), "bpf", }, -[362] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, +[358] = { 3, 0, SEN(seccomp), "seccomp" }, +[359] = { 3, 0, SEN(getrandom), "getrandom" }, +[360] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[361] = { 3, TD, SEN(bpf), "bpf" }, +[362] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, [363] = { 0, 0, SEN(printargs), "switch_endian" }, -[364] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[365] = { 2, 0, SEN(membarrier), "membarrier", }, +[364] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[365] = { 2, 0, SEN(membarrier), "membarrier" }, [366] = { 3, TI, SEN(semop), "semop" }, [367] = { 3, TI, SEN(semget), "semget" }, [368] = { 4, TI, SEN(semctl), "semctl" }, @@ -403,6 +403,7 @@ [379] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [380] = { 6, TD, SEN(preadv2), "preadv2" }, [381] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[382] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/riscv/set_error.c b/linux/riscv/set_error.c new file mode 100644 index 000000000..6d1eee4c0 --- /dev/null +++ b/linux/riscv/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + riscv_regs.a0 = -tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + riscv_regs.a0 = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/riscv/set_scno.c b/linux/riscv/set_scno.c new file mode 100644 index 000000000..64c7db763 --- /dev/null +++ b/linux/riscv/set_scno.c @@ -0,0 +1,6 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + riscv_regs.a7 = scno; + return set_regs(tcp->pid); +} diff --git a/linux/s390/arch_sigreturn.c b/linux/s390/arch_sigreturn.c index 00549ba87..d1b859865 100644 --- a/linux/s390/arch_sigreturn.c +++ b/linux/s390/arch_sigreturn.c @@ -1,8 +1,8 @@ static void arch_sigreturn(struct tcb *tcp) { - long mask[NSIG / 8 / sizeof(long)]; - const long addr = *s390_frame_ptr + __SIGNAL_FRAMESIZE; + unsigned long mask[NSIG_BYTES / sizeof(long)]; + const unsigned long addr = *s390_frame_ptr + __SIGNAL_FRAMESIZE; if (umove(tcp, addr, &mask) < 0) { tprintf("{mask=%#lx}", addr); diff --git a/linux/s390/ioctls_arch0.h b/linux/s390/ioctls_arch0.h index 4228f96c8..a287f0f87 100644 --- a/linux/s390/ioctls_arch0.h +++ b/linux/s390/ioctls_arch0.h @@ -10,11 +10,13 @@ { "asm/chsc.h", "CHSC_ON_CLOSE_SET", _IOC_READ|_IOC_WRITE, 0x638a, 0x1000 }, { "asm/chsc.h", "CHSC_START", _IOC_READ|_IOC_WRITE, 0x6381, 0x1000 }, { "asm/chsc.h", "CHSC_START_SYNC", _IOC_READ|_IOC_WRITE, 0x6389, 0x1000 }, +{ "asm/clp.h", "CLP_SYNC", _IOC_READ|_IOC_WRITE, 0x63c1, 0x10 }, { "asm/cmb.h", "BIODASDCMFDISABLE", _IOC_NONE, 0x4421, 0x00 }, { "asm/cmb.h", "BIODASDCMFENABLE", _IOC_NONE, 0x4420, 0x00 }, { "asm/cmb.h", "BIODASDREADALLCMB", _IOC_READ|_IOC_WRITE, 0x4421, 0x58 }, { "asm/dasd.h", "BIODASDABORTIO", _IOC_NONE, 0x44f0, 0x00 }, { "asm/dasd.h", "BIODASDALLOWIO", _IOC_NONE, 0x44f1, 0x00 }, +{ "asm/dasd.h", "BIODASDCHECKFMT", _IOC_READ|_IOC_WRITE, 0x4402, 0x28 }, { "asm/dasd.h", "BIODASDDISABLE", _IOC_NONE, 0x4400, 0x00 }, { "asm/dasd.h", "BIODASDENABLE", _IOC_NONE, 0x4401, 0x00 }, { "asm/dasd.h", "BIODASDFMT", _IOC_WRITE, 0x4401, 0x10 }, @@ -33,7 +35,9 @@ { "asm/dasd.h", "BIODASDSNID", _IOC_READ|_IOC_WRITE, 0x4401, 0x0d }, { "asm/dasd.h", "BIODASDSYMMIO", _IOC_READ|_IOC_WRITE, 0x44f0, 0x20 }, { "asm/dasd.h", "DASDAPIVER", _IOC_READ, 0x4400, 0x04 }, +{ "asm/hypfs.h", "HYPFS_DIAG304", _IOC_READ|_IOC_WRITE, 0x1020, 0x18 }, { "asm/ioctls.h", "FIOQSIZE", 0, 0x545E, 0 }, +{ "asm/sclp_ctl.h", "SCLP_CTL_SCCB", _IOC_READ|_IOC_WRITE, 0x1010, 0x0c }, { "asm/tape390.h", "TAPE390_CRYPT_QUERY", _IOC_READ, 0x6403, 0x03 }, { "asm/tape390.h", "TAPE390_CRYPT_SET", _IOC_WRITE, 0x6402, 0x03 }, { "asm/tape390.h", "TAPE390_DISPLAY", _IOC_WRITE, 0x6401, 0x11 }, @@ -57,3 +61,88 @@ { "asm/zcrypt.h", "Z90STAT_TOTALOPEN_COUNT", _IOC_READ, 0x7a46, 0x04 }, { "asm/zcrypt.h", "ZSECSENDCPRB", _IOC_READ|_IOC_WRITE, 0x7a81, 0x00 }, { "asm/zcrypt.h", "ZSENDEP11CPRB", _IOC_READ|_IOC_WRITE, 0x7a04, 0x00 }, +{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, +{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 }, +{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c }, +{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, +{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, +{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, +{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 }, +{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x10 }, +{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 }, +{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 }, +{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 }, +{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 }, +{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 }, +{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x88 }, +{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 }, +{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 }, +{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 }, +{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 }, +{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x80 }, +{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 }, +{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0xc0 }, +{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 }, +{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 }, +{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 }, +{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 }, +{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 }, +{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 }, +{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 }, +{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 }, +{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 }, +{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 }, +{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 }, +{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 }, +{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 }, +{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 }, +{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, +{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, +{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, +{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, +{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, +{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, +{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, +{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, +{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, +{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, +{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, +{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, +{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 }, +{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, +{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, +{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x04 }, +{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 }, +{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 }, +{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 }, +{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x88 }, +{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 }, +{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x14 }, +{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 }, +{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 }, +{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 }, +{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 }, +{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 }, +{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 }, +{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x80 }, +{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 }, +{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0xc0 }, +{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 }, +{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 }, +{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 }, +{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 }, +{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, +{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, +{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, +{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, +{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, +{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 }, +{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, diff --git a/linux/s390/set_error.c b/linux/s390/set_error.c new file mode 100644 index 000000000..7262e5ce8 --- /dev/null +++ b/linux/s390/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + s390_regset.gprs[2] = -tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + s390_regset.gprs[2] = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/s390/set_scno.c b/linux/s390/set_scno.c new file mode 100644 index 000000000..c7a311008 --- /dev/null +++ b/linux/s390/set_scno.c @@ -0,0 +1,6 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + s390_regset.gprs[2] = scno; + return set_regs(tcp->pid); +} diff --git a/linux/s390/syscallent.h b/linux/s390/syscallent.h index a7004ae7c..6f841c773 100644 --- a/linux/s390/syscallent.h +++ b/linux/s390/syscallent.h @@ -376,15 +376,15 @@ [345] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [346] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [347] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[348] = { 3, 0, SEN(seccomp), "seccomp", }, -[349] = { 3, 0, SEN(getrandom), "getrandom", }, -[350] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[351] = { 3, TD, SEN(bpf), "bpf", }, -[352] = { 3, 0, SEN(printargs), "s390_pci_mmio_write", }, -[353] = { 3, 0, SEN(printargs), "s390_pci_mmio_read", }, -[354] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[355] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[356] = { 2, 0, SEN(membarrier), "membarrier", }, +[348] = { 3, 0, SEN(seccomp), "seccomp" }, +[349] = { 3, 0, SEN(getrandom), "getrandom" }, +[350] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[351] = { 3, TD, SEN(bpf), "bpf" }, +[352] = { 3, 0, SEN(printargs), "s390_pci_mmio_write" }, +[353] = { 3, 0, SEN(printargs), "s390_pci_mmio_read" }, +[354] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[355] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[356] = { 2, 0, SEN(membarrier), "membarrier" }, [357] = { 5, TN, SEN(recvmmsg), "recvmmsg" }, [358] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [359] = { 3, TN, SEN(socket), "socket" }, diff --git a/linux/s390x/ioctls_arch0.h b/linux/s390x/ioctls_arch0.h index 4a16cb5cc..f7c3355e7 100644 --- a/linux/s390x/ioctls_arch0.h +++ b/linux/s390x/ioctls_arch0.h @@ -1 +1,148 @@ -#include "s390/ioctls_arch0.h" +/* Generated by ioctls_gen.sh from definitions found in $linux/arch/s390/include/ tree. */ +{ "asm/chsc.h", "CHSC_INFO_CCL", _IOC_READ|_IOC_WRITE, 0x6386, 0x1014 }, +{ "asm/chsc.h", "CHSC_INFO_CHANNEL_PATH", _IOC_READ|_IOC_WRITE, 0x6382, 0x100c }, +{ "asm/chsc.h", "CHSC_INFO_CI", _IOC_READ|_IOC_WRITE, 0x6385, 0x100c }, +{ "asm/chsc.h", "CHSC_INFO_CPD", _IOC_READ|_IOC_WRITE, 0x6387, 0x1014 }, +{ "asm/chsc.h", "CHSC_INFO_CU", _IOC_READ|_IOC_WRITE, 0x6383, 0x100c }, +{ "asm/chsc.h", "CHSC_INFO_DCAL", _IOC_READ|_IOC_WRITE, 0x6388, 0x1010 }, +{ "asm/chsc.h", "CHSC_INFO_SCH_CU", _IOC_READ|_IOC_WRITE, 0x6384, 0x1008 }, +{ "asm/chsc.h", "CHSC_ON_CLOSE_REMOVE", _IOC_NONE, 0x638b, 0x00 }, +{ "asm/chsc.h", "CHSC_ON_CLOSE_SET", _IOC_READ|_IOC_WRITE, 0x638a, 0x1000 }, +{ "asm/chsc.h", "CHSC_START", _IOC_READ|_IOC_WRITE, 0x6381, 0x1000 }, +{ "asm/chsc.h", "CHSC_START_SYNC", _IOC_READ|_IOC_WRITE, 0x6389, 0x1000 }, +{ "asm/clp.h", "CLP_SYNC", _IOC_READ|_IOC_WRITE, 0x63c1, 0x10 }, +{ "asm/cmb.h", "BIODASDCMFDISABLE", _IOC_NONE, 0x4421, 0x00 }, +{ "asm/cmb.h", "BIODASDCMFENABLE", _IOC_NONE, 0x4420, 0x00 }, +{ "asm/cmb.h", "BIODASDREADALLCMB", _IOC_READ|_IOC_WRITE, 0x4421, 0x58 }, +{ "asm/dasd.h", "BIODASDABORTIO", _IOC_NONE, 0x44f0, 0x00 }, +{ "asm/dasd.h", "BIODASDALLOWIO", _IOC_NONE, 0x44f1, 0x00 }, +{ "asm/dasd.h", "BIODASDCHECKFMT", _IOC_READ|_IOC_WRITE, 0x4402, 0x28 }, +{ "asm/dasd.h", "BIODASDDISABLE", _IOC_NONE, 0x4400, 0x00 }, +{ "asm/dasd.h", "BIODASDENABLE", _IOC_NONE, 0x4401, 0x00 }, +{ "asm/dasd.h", "BIODASDFMT", _IOC_WRITE, 0x4401, 0x10 }, +{ "asm/dasd.h", "BIODASDGATTR", _IOC_READ, 0x4405, 0x20 }, +{ "asm/dasd.h", "BIODASDINFO", _IOC_READ, 0x4401, 0x178 }, +{ "asm/dasd.h", "BIODASDINFO2", _IOC_READ, 0x4403, 0x1a0 }, +{ "asm/dasd.h", "BIODASDPRRD", _IOC_READ, 0x4402, 0x408 }, +{ "asm/dasd.h", "BIODASDPRRST", _IOC_NONE, 0x4405, 0x00 }, +{ "asm/dasd.h", "BIODASDPSRD", _IOC_READ, 0x4404, 0xc0 }, +{ "asm/dasd.h", "BIODASDQUIESCE", _IOC_NONE, 0x4406, 0x00 }, +{ "asm/dasd.h", "BIODASDRESUME", _IOC_NONE, 0x4407, 0x00 }, +{ "asm/dasd.h", "BIODASDRLSE", _IOC_NONE, 0x4403, 0x00 }, +{ "asm/dasd.h", "BIODASDRSRV", _IOC_NONE, 0x4402, 0x00 }, +{ "asm/dasd.h", "BIODASDSATTR", _IOC_WRITE, 0x4402, 0x20 }, +{ "asm/dasd.h", "BIODASDSLCK", _IOC_NONE, 0x4404, 0x00 }, +{ "asm/dasd.h", "BIODASDSNID", _IOC_READ|_IOC_WRITE, 0x4401, 0x0d }, +{ "asm/dasd.h", "BIODASDSYMMIO", _IOC_READ|_IOC_WRITE, 0x44f0, 0x20 }, +{ "asm/dasd.h", "DASDAPIVER", _IOC_READ, 0x4400, 0x04 }, +{ "asm/hypfs.h", "HYPFS_DIAG304", _IOC_READ|_IOC_WRITE, 0x1020, 0x18 }, +{ "asm/ioctls.h", "FIOQSIZE", 0, 0x545E, 0 }, +{ "asm/sclp_ctl.h", "SCLP_CTL_SCCB", _IOC_READ|_IOC_WRITE, 0x1010, 0x0c }, +{ "asm/tape390.h", "TAPE390_CRYPT_QUERY", _IOC_READ, 0x6403, 0x03 }, +{ "asm/tape390.h", "TAPE390_CRYPT_SET", _IOC_WRITE, 0x6402, 0x03 }, +{ "asm/tape390.h", "TAPE390_DISPLAY", _IOC_WRITE, 0x6401, 0x11 }, +{ "asm/tape390.h", "TAPE390_KEKL_QUERY", _IOC_READ, 0x6405, 0x86 }, +{ "asm/tape390.h", "TAPE390_KEKL_SET", _IOC_WRITE, 0x6404, 0x86 }, +{ "asm/zcrypt.h", "ICARSACRT", _IOC_READ|_IOC_WRITE, 0x7a06, 0x00 }, +{ "asm/zcrypt.h", "ICARSAMODEXPO", _IOC_READ|_IOC_WRITE, 0x7a05, 0x00 }, +{ "asm/zcrypt.h", "Z90STAT_CEX2ACOUNT", _IOC_READ, 0x7a4e, 0x04 }, +{ "asm/zcrypt.h", "Z90STAT_CEX2CCOUNT", _IOC_READ, 0x7a4d, 0x04 }, +{ "asm/zcrypt.h", "Z90STAT_DOMAIN_INDEX", _IOC_READ, 0x7a47, 0x04 }, +{ "asm/zcrypt.h", "Z90STAT_PCICACOUNT", _IOC_READ, 0x7a41, 0x04 }, +{ "asm/zcrypt.h", "Z90STAT_PCICCCOUNT", _IOC_READ, 0x7a42, 0x04 }, +{ "asm/zcrypt.h", "Z90STAT_PCIXCCMCL2COUNT", _IOC_READ, 0x7a4b, 0x04 }, +{ "asm/zcrypt.h", "Z90STAT_PCIXCCMCL3COUNT", _IOC_READ, 0x7a4c, 0x04 }, +{ "asm/zcrypt.h", "Z90STAT_PENDINGQ_COUNT", _IOC_READ, 0x7a45, 0x04 }, +{ "asm/zcrypt.h", "Z90STAT_PERDEV_REQCNT", _IOC_READ, 0x7a4a, 0x100 }, +{ "asm/zcrypt.h", "Z90STAT_QDEPTH_MASK", _IOC_READ, 0x7a49, 0x40 }, +{ "asm/zcrypt.h", "Z90STAT_REQUESTQ_COUNT", _IOC_READ, 0x7a44, 0x04 }, +{ "asm/zcrypt.h", "Z90STAT_STATUS_MASK", _IOC_READ, 0x7a48, 0x40 }, +{ "asm/zcrypt.h", "Z90STAT_TOTALCOUNT", _IOC_READ, 0x7a40, 0x04 }, +{ "asm/zcrypt.h", "Z90STAT_TOTALOPEN_COUNT", _IOC_READ, 0x7a46, 0x04 }, +{ "asm/zcrypt.h", "ZSECSENDCPRB", _IOC_READ|_IOC_WRITE, 0x7a81, 0x00 }, +{ "asm/zcrypt.h", "ZSENDEP11CPRB", _IOC_READ|_IOC_WRITE, 0x7a04, 0x00 }, +{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, +{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 }, +{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c }, +{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, +{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, +{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, +{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 }, +{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x10 }, +{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 }, +{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 }, +{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 }, +{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 }, +{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 }, +{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x88 }, +{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 }, +{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 }, +{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 }, +{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 }, +{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x80 }, +{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 }, +{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0xc0 }, +{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 }, +{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 }, +{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 }, +{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 }, +{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 }, +{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 }, +{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 }, +{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 }, +{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 }, +{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 }, +{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 }, +{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 }, +{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 }, +{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 }, +{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, +{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, +{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, +{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, +{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, +{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, +{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, +{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, +{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, +{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, +{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, +{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, +{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x08 }, +{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, +{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, +{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x08 }, +{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 }, +{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 }, +{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 }, +{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x88 }, +{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 }, +{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x18 }, +{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 }, +{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 }, +{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 }, +{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 }, +{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 }, +{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 }, +{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x80 }, +{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 }, +{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0xc0 }, +{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 }, +{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 }, +{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 }, +{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 }, +{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, +{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, +{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, +{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, +{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, +{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 }, +{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, diff --git a/linux/s390x/set_error.c b/linux/s390x/set_error.c new file mode 100644 index 000000000..737ddef7a --- /dev/null +++ b/linux/s390x/set_error.c @@ -0,0 +1 @@ +#include "s390/set_error.c" diff --git a/linux/s390x/set_scno.c b/linux/s390x/set_scno.c new file mode 100644 index 000000000..9cea4d10b --- /dev/null +++ b/linux/s390x/set_scno.c @@ -0,0 +1 @@ +#include "s390/set_scno.c" diff --git a/linux/s390x/syscallent.h b/linux/s390x/syscallent.h index 9d1e94400..ca67f4672 100644 --- a/linux/s390x/syscallent.h +++ b/linux/s390x/syscallent.h @@ -360,15 +360,15 @@ [345] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [346] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [347] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[348] = { 3, 0, SEN(seccomp), "seccomp", }, -[349] = { 3, 0, SEN(getrandom), "getrandom", }, -[350] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[351] = { 3, TD, SEN(bpf), "bpf", }, -[352] = { 3, 0, SEN(printargs), "s390_pci_mmio_write", }, -[353] = { 3, 0, SEN(printargs), "s390_pci_mmio_read", }, -[354] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[355] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[356] = { 2, 0, SEN(membarrier), "membarrier", }, +[348] = { 3, 0, SEN(seccomp), "seccomp" }, +[349] = { 3, 0, SEN(getrandom), "getrandom" }, +[350] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[351] = { 3, TD, SEN(bpf), "bpf" }, +[352] = { 3, 0, SEN(printargs), "s390_pci_mmio_write" }, +[353] = { 3, 0, SEN(printargs), "s390_pci_mmio_read" }, +[354] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[355] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[356] = { 2, 0, SEN(membarrier), "membarrier" }, [357] = { 5, TN, SEN(recvmmsg), "recvmmsg" }, [358] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [359] = { 3, TN, SEN(socket), "socket" }, diff --git a/linux/sh/arch_getrval2.c b/linux/sh/arch_getrval2.c index 8f60de740..27b7cdd07 100644 --- a/linux/sh/arch_getrval2.c +++ b/linux/sh/arch_getrval2.c @@ -1,7 +1,7 @@ long getrval2(struct tcb *tcp) { - long val; + unsigned long val; if (upeek(tcp->pid, 4*(REG_REG0+1), &val) < 0) return -1; return val; diff --git a/linux/sh/arch_regs.c b/linux/sh/arch_regs.c index 0ce81843e..5429b4f5c 100644 --- a/linux/sh/arch_regs.c +++ b/linux/sh/arch_regs.c @@ -1,2 +1,2 @@ -static long sh_r0; +static unsigned long sh_r0; #define ARCH_PC_PEEK_ADDR (4 * REG_PC) diff --git a/linux/sh/get_scno.c b/linux/sh/get_scno.c index a9bc5d8fc..45fc0b7b8 100644 --- a/linux/sh/get_scno.c +++ b/linux/sh/get_scno.c @@ -2,7 +2,7 @@ static int arch_get_scno(struct tcb *tcp) { - long scno = 0; + kernel_ulong_t scno = 0; /* * In the new syscall ABI, the system call number is in R3. @@ -10,11 +10,11 @@ arch_get_scno(struct tcb *tcp) if (upeek(tcp->pid, 4*(REG_REG0+3), &scno) < 0) return -1; - if (scno < 0) { + if ((long) scno < 0) { /* Odd as it may seem, a glibc bug has been known to cause glibc to issue bogus negative syscall numbers. So for our purposes, make strace print what it *should* have been */ - long correct_scno = (scno & 0xff); + kernel_ulong_t correct_scno = (scno & 0xff); if (debug_flag) error_msg("Detected glibc bug: bogus system call" " number = %ld, correcting to %ld", diff --git a/linux/sh/get_syscall_result.c b/linux/sh/get_syscall_result.c index 5db302548..f7b93b746 100644 --- a/linux/sh/get_syscall_result.c +++ b/linux/sh/get_syscall_result.c @@ -2,5 +2,5 @@ static int get_syscall_result_regs(struct tcb *tcp) { /* new syscall ABI returns result in R0 */ - return upeek(tcp->pid, 4 * REG_REG0, (long *)&sh_r0) < 0 ? -1 : 0; + return upeek(tcp->pid, 4 * REG_REG0, &sh_r0) < 0 ? -1 : 0; } diff --git a/linux/sh/set_error.c b/linux/sh/set_error.c new file mode 100644 index 000000000..cb093b640 --- /dev/null +++ b/linux/sh/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + sh_r0 = -tcp->u_error; + return upoke(tcp->pid, 4 * REG_REG0, sh_r0); +} + +static int +arch_set_success(struct tcb *tcp) +{ + sh_r0 = tcp->u_rval; + return upoke(tcp->pid, 4 * REG_REG0, sh_r0); +} diff --git a/linux/sh/set_scno.c b/linux/sh/set_scno.c new file mode 100644 index 000000000..5f71664a6 --- /dev/null +++ b/linux/sh/set_scno.c @@ -0,0 +1,5 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + return upoke(tcp->pid, 4 * (REG_REG0 + 3), scno); +} diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h index 5a0bef00f..758c7f19a 100644 --- a/linux/sh/syscallent.h +++ b/linux/sh/syscallent.h @@ -397,13 +397,13 @@ [369] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [370] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [371] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[372] = { 3, 0, SEN(seccomp), "seccomp", }, -[373] = { 3, 0, SEN(getrandom), "getrandom", }, -[374] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[375] = { 3, TD, SEN(bpf), "bpf", }, -[376] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[377] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[378] = { 2, 0, SEN(membarrier), "membarrier", }, +[372] = { 3, 0, SEN(seccomp), "seccomp" }, +[373] = { 3, 0, SEN(getrandom), "getrandom" }, +[374] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[375] = { 3, TD, SEN(bpf), "bpf" }, +[376] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[377] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[378] = { 2, 0, SEN(membarrier), "membarrier" }, [379] = { 3, TM, SEN(mlock2), "mlock2" }, [380] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [381] = { 6, TD, SEN(preadv2), "preadv2" }, diff --git a/linux/sh64/arch_regs.c b/linux/sh64/arch_regs.c index eb6701b95..8b3202a8a 100644 --- a/linux/sh64/arch_regs.c +++ b/linux/sh64/arch_regs.c @@ -1,2 +1,2 @@ -static long sh64_r9; +static unsigned long sh64_r9; #define ARCH_PC_PEEK_ADDR REG_PC diff --git a/linux/sh64/get_syscall_result.c b/linux/sh64/get_syscall_result.c index 93faf3dfc..4264dccc9 100644 --- a/linux/sh64/get_syscall_result.c +++ b/linux/sh64/get_syscall_result.c @@ -2,5 +2,5 @@ static int get_syscall_result_regs(struct tcb *tcp) { /* ABI defines result returned in r9 */ - return upeek(tcp->pid, REG_GENERAL(9), (long *)&sh64_r9) < 0 ? -1 : 0; + return upeek(tcp->pid, REG_GENERAL(9), &sh64_r9) < 0 ? -1 : 0; } diff --git a/linux/sh64/set_error.c b/linux/sh64/set_error.c new file mode 100644 index 000000000..35271fb52 --- /dev/null +++ b/linux/sh64/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + sh64_r9 = -tcp->u_error; + return upoke(tcp->pid, REG_GENERAL(9), sh64_r9); +} + +static int +arch_set_success(struct tcb *tcp) +{ + sh64_r9 = tcp->u_rval; + return upoke(tcp->pid, REG_GENERAL(9), sh64_r9); +} diff --git a/linux/sh64/set_scno.c b/linux/sh64/set_scno.c new file mode 100644 index 000000000..be4f1ed16 --- /dev/null +++ b/linux/sh64/set_scno.c @@ -0,0 +1,5 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + return upoke(tcp->pid, REG_SYSCALL, scno); +} diff --git a/linux/sh64/syscallent.h b/linux/sh64/syscallent.h index 5e4ee72bb..e35ef6f36 100644 --- a/linux/sh64/syscallent.h +++ b/linux/sh64/syscallent.h @@ -406,13 +406,13 @@ [380] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [381] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [382] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[383] = { 3, 0, SEN(seccomp), "seccomp", }, -[384] = { 3, 0, SEN(getrandom), "getrandom", }, -[385] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[386] = { 3, TD, SEN(bpf), "bpf", }, -[387] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[388] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[389] = { 2, 0, SEN(membarrier), "membarrier", }, +[383] = { 3, 0, SEN(seccomp), "seccomp" }, +[384] = { 3, 0, SEN(getrandom), "getrandom" }, +[385] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[386] = { 3, TD, SEN(bpf), "bpf" }, +[387] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[388] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[389] = { 2, 0, SEN(membarrier), "membarrier" }, [390] = { 3, TM, SEN(mlock2), "mlock2" }, [391] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [392] = { 6, TD, SEN(preadv2), "preadv2" }, diff --git a/linux/sparc/arch_sigreturn.c b/linux/sparc/arch_sigreturn.c index 0c0e5112e..2170a7baf 100644 --- a/linux/sparc/arch_sigreturn.c +++ b/linux/sparc/arch_sigreturn.c @@ -11,19 +11,19 @@ static void arch_sigreturn(struct tcb *tcp) { - long fp = sparc_regs.u_regs[U_REG_FP] + - SIZEOF_STRUCT_SPARC_STACKF + SIZEOF_STRUCT_PT_REGS; + unsigned long addr = sparc_regs.u_regs[U_REG_FP] + + SIZEOF_STRUCT_SPARC_STACKF + SIZEOF_STRUCT_PT_REGS; struct { unsigned int mask; char fpu_save[PERSONALITY_WORDSIZE]; char insns[PERSONALITY_WORDSIZE * 2] ATTRIBUTE_ALIGNED(8); - unsigned int extramask[NSIG / 8 / sizeof(int) - 1]; + unsigned int extramask[NSIG_BYTES / sizeof(int) - 1]; } frame; - if (umove(tcp, fp, &frame) < 0) { - tprintf("{mask=%#lx}", fp); + if (umove(tcp, addr, &frame) < 0) { + tprintf("{mask=%#lx}", addr); } else { - unsigned int mask[NSIG / 8 / sizeof(int)]; + unsigned int mask[NSIG_BYTES / sizeof(int)]; mask[0] = frame.mask; memcpy(mask + 1, frame.extramask, sizeof(frame.extramask)); diff --git a/linux/sparc/set_error.c b/linux/sparc/set_error.c new file mode 100644 index 000000000..d285b7cac --- /dev/null +++ b/linux/sparc/set_error.c @@ -0,0 +1,15 @@ +static int +arch_set_error(struct tcb *tcp) +{ + sparc_regs.psr |= PSR_C; + sparc_regs.u_regs[U_REG_O0] = tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + sparc_regs.psr &= ~PSR_C; + sparc_regs.u_regs[U_REG_O0] = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/sparc/set_scno.c b/linux/sparc/set_scno.c new file mode 100644 index 000000000..c891a0b59 --- /dev/null +++ b/linux/sparc/set_scno.c @@ -0,0 +1,11 @@ +/* + * Reloading the syscall number from %g1 register is supported + * by linux kernel starting with commit v4.5-rc7~35^2~3. + */ + +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + sparc_regs.u_regs[U_REG_G1] = scno; + return set_regs(tcp->pid); +} diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h index 69f5f4744..ab27a15a0 100644 --- a/linux/sparc/syscallent.h +++ b/linux/sparc/syscallent.h @@ -344,13 +344,13 @@ [343] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [344] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [345] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[346] = { 3, 0, SEN(seccomp), "seccomp", }, -[347] = { 3, 0, SEN(getrandom), "getrandom", }, -[348] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[349] = { 3, TD, SEN(bpf), "bpf", }, -[350] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[351] = { 2, 0, SEN(membarrier), "membarrier", }, -[352] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, +[346] = { 3, 0, SEN(seccomp), "seccomp" }, +[347] = { 3, 0, SEN(getrandom), "getrandom" }, +[348] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[349] = { 3, TD, SEN(bpf), "bpf" }, +[350] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[351] = { 2, 0, SEN(membarrier), "membarrier" }, +[352] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, [353] = { 3, TN, SEN(bind), "bind" }, [354] = { 2, TN, SEN(listen), "listen" }, [355] = { 5, TN, SEN(setsockopt), "setsockopt" }, diff --git a/linux/sparc64/get_syscall_args.c b/linux/sparc64/get_syscall_args.c index 8d29785fa..f5c1aa6f6 100644 --- a/linux/sparc64/get_syscall_args.c +++ b/linux/sparc64/get_syscall_args.c @@ -5,15 +5,16 @@ get_syscall_args(struct tcb *tcp) if (tcp->currpers == 1) { /* * Zero-extend from 32 bits. - * Use widen_to_long(tcp->u_arg[N]) in syscall handlers + * Use truncate_klong_to_current_wordsize(tcp->u_arg[N]) + * in syscall handlers * if you need to use *sign-extended* parameter. */ - tcp->u_arg[0] = (long) (uint32_t) sparc_regs.u_regs[U_REG_O0 + 0]; - tcp->u_arg[1] = (long) (uint32_t) sparc_regs.u_regs[U_REG_O0 + 1]; - tcp->u_arg[2] = (long) (uint32_t) sparc_regs.u_regs[U_REG_O0 + 2]; - tcp->u_arg[3] = (long) (uint32_t) sparc_regs.u_regs[U_REG_O0 + 3]; - tcp->u_arg[4] = (long) (uint32_t) sparc_regs.u_regs[U_REG_O0 + 4]; - tcp->u_arg[5] = (long) (uint32_t) sparc_regs.u_regs[U_REG_O0 + 5]; + tcp->u_arg[0] = (uint32_t) sparc_regs.u_regs[U_REG_O0 + 0]; + tcp->u_arg[1] = (uint32_t) sparc_regs.u_regs[U_REG_O0 + 1]; + tcp->u_arg[2] = (uint32_t) sparc_regs.u_regs[U_REG_O0 + 2]; + tcp->u_arg[3] = (uint32_t) sparc_regs.u_regs[U_REG_O0 + 3]; + tcp->u_arg[4] = (uint32_t) sparc_regs.u_regs[U_REG_O0 + 4]; + tcp->u_arg[5] = (uint32_t) sparc_regs.u_regs[U_REG_O0 + 5]; } else { tcp->u_arg[0] = sparc_regs.u_regs[U_REG_O0 + 0]; tcp->u_arg[1] = sparc_regs.u_regs[U_REG_O0 + 1]; diff --git a/linux/sparc64/set_error.c b/linux/sparc64/set_error.c new file mode 100644 index 000000000..6c266af9d --- /dev/null +++ b/linux/sparc64/set_error.c @@ -0,0 +1,15 @@ +static int +arch_set_error(struct tcb *tcp) +{ + sparc_regs.tstate |= 0x1100000000UL; + sparc_regs.u_regs[U_REG_O0] = tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + sparc_regs.tstate &= ~0x1100000000UL; + sparc_regs.u_regs[U_REG_O0] = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/sparc64/set_scno.c b/linux/sparc64/set_scno.c new file mode 100644 index 000000000..ae57cdfbd --- /dev/null +++ b/linux/sparc64/set_scno.c @@ -0,0 +1 @@ +#include "sparc/set_scno.c" diff --git a/linux/sparc64/syscallent.h b/linux/sparc64/syscallent.h index 0f245968d..ffc35a193 100644 --- a/linux/sparc64/syscallent.h +++ b/linux/sparc64/syscallent.h @@ -342,13 +342,13 @@ [343] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [344] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [345] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[346] = { 3, 0, SEN(seccomp), "seccomp", }, -[347] = { 3, 0, SEN(getrandom), "getrandom", }, -[348] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[349] = { 3, TD, SEN(bpf), "bpf", }, -[350] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[351] = { 2, 0, SEN(membarrier), "membarrier", }, -[352] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, +[346] = { 3, 0, SEN(seccomp), "seccomp" }, +[347] = { 3, 0, SEN(getrandom), "getrandom" }, +[348] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[349] = { 3, TD, SEN(bpf), "bpf" }, +[350] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[351] = { 2, 0, SEN(membarrier), "membarrier" }, +[352] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, [353] = { 3, TN, SEN(bind), "bind" }, [354] = { 2, TN, SEN(listen), "listen" }, [355] = { 5, TN, SEN(setsockopt), "setsockopt" }, diff --git a/linux/tile/arch_sigreturn.c b/linux/tile/arch_sigreturn.c index b1182fced..88e946f01 100644 --- a/linux/tile/arch_sigreturn.c +++ b/linux/tile/arch_sigreturn.c @@ -3,10 +3,10 @@ arch_sigreturn(struct tcb *tcp) { /* offset of ucontext in the kernel's sigframe structure */ #define SIGFRAME_UC_OFFSET C_ABI_SAVE_AREA_SIZE + sizeof(siginfo_t) - const long addr = tile_regs.sp + SIGFRAME_UC_OFFSET + - offsetof(struct ucontext, uc_sigmask); + const unsigned long addr = tile_regs.sp + SIGFRAME_UC_OFFSET + + offsetof(struct ucontext, uc_sigmask); tprints("{mask="); - print_sigset_addr_len(tcp, addr, NSIG / 8); + print_sigset_addr_len(tcp, addr, NSIG_BYTES); tprints("}"); } diff --git a/linux/tile/set_error.c b/linux/tile/set_error.c new file mode 100644 index 000000000..16d9b956a --- /dev/null +++ b/linux/tile/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + tile_regs.regs[0] = -tcp->u_error; + return set_regs(tcp->pid); +} + +static int +arch_set_success(struct tcb *tcp) +{ + tile_regs.regs[0] = tcp->u_rval; + return set_regs(tcp->pid); +} diff --git a/linux/tile/set_scno.c b/linux/tile/set_scno.c new file mode 100644 index 000000000..c28d88c3d --- /dev/null +++ b/linux/tile/set_scno.c @@ -0,0 +1,6 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + tile_regs.regs[10] = scno; + return set_regs(tcp->pid); +} diff --git a/linux/x32/ioctls_inc0.h b/linux/x32/ioctls_inc0.h index f41bd6eb6..46303d129 100644 --- a/linux/x32/ioctls_inc0.h +++ b/linux/x32/ioctls_inc0.h @@ -93,6 +93,7 @@ { "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE", _IOC_READ|_IOC_WRITE, 0x6447, 0x10 }, { "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_INFO", _IOC_WRITE, 0x6445, 0x20 }, { "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_CS", _IOC_READ|_IOC_WRITE, 0x6449, 0x20 }, +{ "drm/amdgpu_drm.h", "DRM_IOCTL_AMDGPU_WAIT_FENCES", _IOC_READ|_IOC_WRITE, 0x6452, 0x18 }, { "drm/drm.h", "DRM_IOCTL_ADD_BUFS", _IOC_READ|_IOC_WRITE, 0x6416, 0x18 }, { "drm/drm.h", "DRM_IOCTL_ADD_CTX", _IOC_READ|_IOC_WRITE, 0x6420, 0x08 }, { "drm/drm.h", "DRM_IOCTL_ADD_DRAW", _IOC_READ|_IOC_WRITE, 0x6427, 0x04 }, @@ -286,7 +287,7 @@ { "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_INFO", _IOC_READ|_IOC_WRITE, 0x6443, 0x10 }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_MADVISE", _IOC_READ|_IOC_WRITE, 0x6448, 0x0c }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_NEW", _IOC_READ|_IOC_WRITE, 0x6442, 0x10 }, -{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x20 }, +{ "drm/msm_drm.h", "DRM_IOCTL_MSM_GEM_SUBMIT", _IOC_READ|_IOC_WRITE, 0x6446, 0x28 }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_GET_PARAM", _IOC_READ|_IOC_WRITE, 0x6440, 0x10 }, { "drm/msm_drm.h", "DRM_IOCTL_MSM_WAIT_FENCE", _IOC_WRITE, 0x6447, 0x18 }, { "drm/nouveau_drm.h", "DRM_IOCTL_NOUVEAU_GEM_CPU_FINI", _IOC_WRITE, 0x6483, 0x04 }, @@ -557,6 +558,9 @@ { "linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", _IOC_WRITE, 0x9366, 0x04 }, { "linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", _IOC_READ, 0x9367, 0x04 }, { "linux/blkpg.h", "BLKPG", _IOC_NONE, 0x1269, 0x00 }, +{ "linux/blkzoned.h", "BLKREPORTZONE", _IOC_READ|_IOC_WRITE, 0x1282, 0x10 }, +{ "linux/blkzoned.h", "BLKRESETZONE", _IOC_WRITE, 0x1283, 0x10 }, +{ "linux/bt-bmc.h", "BT_BMC_IOCTL_SMS_ATN", _IOC_NONE, 0xb100, 0x00 }, { "linux/btrfs.h", "BTRFS_IOC_ADD_DEV", _IOC_WRITE, 0x940a, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_BALANCE", _IOC_WRITE, 0x940c, 0x1000 }, { "linux/btrfs.h", "BTRFS_IOC_BALANCE_CTL", _IOC_WRITE, 0x9421, 0x04 }, @@ -1311,123 +1315,6 @@ { "linux/kfd_ioctl.h", "AMDKFD_IOC_SET_MEMORY_POLICY", _IOC_WRITE, 0x4b04, 0x20 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_UPDATE_QUEUE", _IOC_WRITE, 0x4b07, 0x18 }, { "linux/kfd_ioctl.h", "AMDKFD_IOC_WAIT_EVENTS", _IOC_READ|_IOC_WRITE, 0x4b0c, 0x18 }, -{ "linux/kvm.h", "KVM_ALLOCATE_RMA", _IOC_READ, 0xaea9, 0x08 }, -{ "linux/kvm.h", "KVM_ARM_PREFERRED_TARGET", _IOC_READ, 0xaeaf, 0x20 }, -{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, -{ "linux/kvm.h", "KVM_ARM_VCPU_INIT", _IOC_WRITE, 0xaeae, 0x20 }, -{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 }, -{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 }, -{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 }, -{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 }, -{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 }, -{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c }, -{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, -{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE", _IOC_WRITE, 0xaea8, 0x0c }, -{ "linux/kvm.h", "KVM_CREATE_SPAPR_TCE_64", _IOC_WRITE, 0xaea8, 0x20 }, -{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, -{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, -{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, -{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 }, -{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x10 }, -{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 }, -{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 }, -{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 }, -{ "linux/kvm.h", "KVM_GET_CPUID2", _IOC_READ|_IOC_WRITE, 0xae91, 0x08 }, -{ "linux/kvm.h", "KVM_GET_DEBUGREGS", _IOC_READ, 0xaea1, 0x80 }, -{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 }, -{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 }, -{ "linux/kvm.h", "KVM_GET_EMULATED_CPUID", _IOC_READ|_IOC_WRITE, 0xae09, 0x08 }, -{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x1a0 }, -{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 }, -{ "linux/kvm.h", "KVM_GET_LAPIC", _IOC_READ, 0xae8e, 0x400 }, -{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 }, -{ "linux/kvm.h", "KVM_GET_MSRS", _IOC_READ|_IOC_WRITE, 0xae88, 0x08 }, -{ "linux/kvm.h", "KVM_GET_MSR_INDEX_LIST", _IOC_READ|_IOC_WRITE, 0xae02, 0x04 }, -{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 }, -{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 }, -{ "linux/kvm.h", "KVM_GET_PIT", _IOC_READ|_IOC_WRITE, 0xae65, 0x48 }, -{ "linux/kvm.h", "KVM_GET_PIT2", _IOC_READ, 0xae9f, 0x70 }, -{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x90 }, -{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 }, -{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x138 }, -{ "linux/kvm.h", "KVM_GET_SUPPORTED_CPUID", _IOC_READ|_IOC_WRITE, 0xae05, 0x08 }, -{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 }, -{ "linux/kvm.h", "KVM_GET_VCPU_EVENTS", _IOC_READ, 0xae9f, 0x40 }, -{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 }, -{ "linux/kvm.h", "KVM_GET_XCRS", _IOC_READ, 0xaea6, 0x188 }, -{ "linux/kvm.h", "KVM_GET_XSAVE", _IOC_READ, 0xaea4, 0x1000 }, -{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 }, -{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 }, -{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 }, -{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 }, -{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 }, -{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 }, -{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 }, -{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 }, -{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 }, -{ "linux/kvm.h", "KVM_PPC_GET_HTAB_FD", _IOC_WRITE, 0xaeaa, 0x20 }, -{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 }, -{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 }, -{ "linux/kvm.h", "KVM_PPC_RTAS_DEFINE_TOKEN", _IOC_WRITE, 0xaeac, 0x80 }, -{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 }, -{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, -{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, -{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, -{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, -{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, -{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, -{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, -{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, -{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, -{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, -{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, -{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, -{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x04 }, -{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, -{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, -{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x04 }, -{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 }, -{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 }, -{ "linux/kvm.h", "KVM_SET_CPUID", _IOC_WRITE, 0xae8a, 0x08 }, -{ "linux/kvm.h", "KVM_SET_CPUID2", _IOC_WRITE, 0xae90, 0x08 }, -{ "linux/kvm.h", "KVM_SET_DEBUGREGS", _IOC_WRITE, 0xaea2, 0x80 }, -{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 }, -{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x1a0 }, -{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 }, -{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x48 }, -{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 }, -{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 }, -{ "linux/kvm.h", "KVM_SET_LAPIC", _IOC_WRITE, 0xae8f, 0x400 }, -{ "linux/kvm.h", "KVM_SET_MEMORY_ALIAS", _IOC_WRITE, 0xae43, 0x20 }, -{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 }, -{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 }, -{ "linux/kvm.h", "KVM_SET_MSRS", _IOC_WRITE, 0xae89, 0x08 }, -{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 }, -{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 }, -{ "linux/kvm.h", "KVM_SET_PIT", _IOC_READ, 0xae66, 0x48 }, -{ "linux/kvm.h", "KVM_SET_PIT2", _IOC_WRITE, 0xaea0, 0x70 }, -{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x90 }, -{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 }, -{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x138 }, -{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 }, -{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 }, -{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 }, -{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 }, -{ "linux/kvm.h", "KVM_SET_VCPU_EVENTS", _IOC_WRITE, 0xaea0, 0x40 }, -{ "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 }, -{ "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 }, -{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, -{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, -{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, -{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, -{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, -{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 }, -{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, -{ "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 }, -{ "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 }, { "linux/lightnvm.h", "NVM_DEV_CREATE", _IOC_WRITE, 0x4c22, 0x80 }, { "linux/lightnvm.h", "NVM_DEV_FACTORY", _IOC_WRITE, 0x4c25, 0x24 }, { "linux/lightnvm.h", "NVM_DEV_INIT", _IOC_WRITE, 0x4c24, 0x2c }, @@ -1568,6 +1455,8 @@ { "linux/nilfs2_api.h", "NILFS_IOCTL_SET_ALLOC_RANGE", _IOC_WRITE, 0x6e8c, 0x10 }, { "linux/nilfs2_api.h", "NILFS_IOCTL_SET_SUINFO", _IOC_WRITE, 0x6e8d, 0x18 }, { "linux/nilfs2_api.h", "NILFS_IOCTL_SYNC", _IOC_READ, 0x6e8a, 0x08 }, +{ "linux/nsfs.h", "NS_GET_PARENT", _IOC_NONE, 0xb702, 0x00 }, +{ "linux/nsfs.h", "NS_GET_USERNS", _IOC_NONE, 0xb701, 0x00 }, { "linux/nvme_ioctl.h", "NVME_IOCTL_ADMIN_CMD", _IOC_READ|_IOC_WRITE, 0x4e41, 0x48 }, { "linux/nvme_ioctl.h", "NVME_IOCTL_ID", _IOC_NONE, 0x4e40, 0x00 }, { "linux/nvme_ioctl.h", "NVME_IOCTL_IO_CMD", _IOC_READ|_IOC_WRITE, 0x4e43, 0x48 }, @@ -1862,6 +1751,7 @@ { "linux/sockios.h", "SIOCGMIIPHY", 0, 0x8947, 0 }, { "linux/sockios.h", "SIOCGMIIREG", 0, 0x8948, 0 }, { "linux/sockios.h", "SIOCGRARP", 0, 0x8961, 0 }, +{ "linux/sockios.h", "SIOCGSKNS", 0, 0x894C, 0 }, { "linux/sockios.h", "SIOCOUTQNSD", 0, 0x894B, 0 }, { "linux/sockios.h", "SIOCPROTOPRIVATE", 0, 0x89E0, 0 }, { "linux/sockios.h", "SIOCRTMSG", 0, 0x890D, 0 }, @@ -2779,6 +2669,7 @@ { "staging/android/ion.h", "ION_IOC_ALLOC", _IOC_READ|_IOC_WRITE, 0x4900, 0x14 }, { "staging/android/ion.h", "ION_IOC_CUSTOM", _IOC_READ|_IOC_WRITE, 0x4906, 0x08 }, { "staging/android/ion.h", "ION_IOC_FREE", _IOC_READ|_IOC_WRITE, 0x4901, 0x04 }, +{ "staging/android/ion.h", "ION_IOC_HEAP_QUERY", _IOC_READ|_IOC_WRITE, 0x4908, 0x18 }, { "staging/android/ion.h", "ION_IOC_IMPORT", _IOC_READ|_IOC_WRITE, 0x4905, 0x08 }, { "staging/android/ion.h", "ION_IOC_MAP", _IOC_READ|_IOC_WRITE, 0x4902, 0x08 }, { "staging/android/ion.h", "ION_IOC_SHARE", _IOC_READ|_IOC_WRITE, 0x4904, 0x08 }, diff --git a/linux/x32/set_error.c b/linux/x32/set_error.c new file mode 100644 index 000000000..66a732718 --- /dev/null +++ b/linux/x32/set_error.c @@ -0,0 +1 @@ +#include "x86_64/set_error.c" diff --git a/linux/x32/set_scno.c b/linux/x32/set_scno.c new file mode 100644 index 000000000..5f7cdb4bc --- /dev/null +++ b/linux/x32/set_scno.c @@ -0,0 +1 @@ +#include "x86_64/set_scno.c" diff --git a/linux/x32/syscallent.h b/linux/x32/syscallent.h index 10443d38c..0cda1a65c 100644 --- a/linux/x32/syscallent.h +++ b/linux/x32/syscallent.h @@ -315,54 +315,59 @@ [314] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [315] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [316] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[317] = { 3, 0, SEN(seccomp), "seccomp", }, -[318] = { 3, 0, SEN(getrandom), "getrandom", }, -[319] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[320] = { 5, TD, SEN(kexec_file_load), "kexec_file_load", }, -[321] = { 3, TD, SEN(bpf), "bpf", }, -[322] = { 5, TD|TF|TP|SE|SI, SEN(printargs), "64:execveat", }, -[323] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[324] = { 2, 0, SEN(membarrier), "membarrier", }, +[317] = { 3, 0, SEN(seccomp), "seccomp" }, +[318] = { 3, 0, SEN(getrandom), "getrandom" }, +[319] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[320] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" }, +[321] = { 3, TD, SEN(bpf), "bpf" }, +[322] = { 5, TD|TF|TP|SE|SI, SEN(printargs), "64:execveat" }, +[323] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[324] = { 2, 0, SEN(membarrier), "membarrier" }, [325] = { 3, TM, SEN(mlock2), "mlock2" }, [326] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [327] = { 6, TD, SEN(printargs), "64:preadv2" }, [328] = { 6, TD, SEN(printargs), "64:pwritev2" }, -[327 ... 511] = { }, +[329] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, +[330] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, +[331] = { 1, 0, SEN(pkey_free), "pkey_free" }, +[332 ... 511] = { }, /* * x32-specific system call numbers start at 512 to avoid cache impact * for native 64-bit operation. */ -[512] = { 4, TS, SEN(rt_sigaction), "rt_sigaction" }, -[513] = { 0, TS, SEN(sigreturn), "rt_sigreturn" }, -[514] = { 3, TD, SEN(ioctl), "ioctl" }, -[515] = { 3, TD, SEN(readv), "readv" }, -[516] = { 3, TD, SEN(writev), "writev" }, -[517] = { 6, TN, SEN(recvfrom), "recvfrom" }, -[518] = { 3, TN, SEN(sendmsg), "sendmsg" }, -[519] = { 3, TN, SEN(recvmsg), "recvmsg" }, -[520] = { 3, TF|TP|SE|SI, SEN(execve), "execve" }, -[521] = { 4, 0, SEN(ptrace), "ptrace" }, -[522] = { 2, TS, SEN(rt_sigpending), "rt_sigpending" }, -[523] = { 4, TS, SEN(rt_sigtimedwait), "rt_sigtimedwait" }, -[524] = { 3, TS, SEN(rt_sigqueueinfo), "rt_sigqueueinfo" }, -[525] = { 2, TS, SEN(sigaltstack), "sigaltstack" }, -[526] = { 3, 0, SEN(timer_create), "timer_create" }, -[527] = { 2, 0, SEN(mq_notify), "mq_notify" }, -[528] = { 4, 0, SEN(kexec_load), "kexec_load" }, -[529] = { 5, TP, SEN(waitid), "waitid" }, -[530] = { 2, 0, SEN(set_robust_list), "set_robust_list" }, -[531] = { 3, 0, SEN(get_robust_list), "get_robust_list" }, -[532] = { 4, TD, SEN(vmsplice), "vmsplice" }, -[533] = { 6, TM, SEN(move_pages), "move_pages" }, +[512] = { 4, CST|TS, SEN(rt_sigaction), "rt_sigaction" }, +[513] = { 0, CST|TS, SEN(sigreturn), "rt_sigreturn" }, +[514] = { 3, CST|TD, SEN(ioctl), "ioctl" }, +[515] = { 3, CST|TD, SEN(readv), "readv" }, +[516] = { 3, CST|TD, SEN(writev), "writev" }, +[517] = { 6, CST|TN, SEN(recvfrom), "recvfrom" }, +[518] = { 3, CST|TN, SEN(sendmsg), "sendmsg" }, +[519] = { 3, CST|TN, SEN(recvmsg), "recvmsg" }, +[520] = { 3, CST|TF|TP|SE|SI,SEN(execve), "execve" }, +[521] = { 4, CST, SEN(ptrace), "ptrace" }, +[522] = { 2, CST|TS, SEN(rt_sigpending), "rt_sigpending" }, +[523] = { 4, CST|TS, SEN(rt_sigtimedwait), "rt_sigtimedwait" }, +[524] = { 3, CST|TS, SEN(rt_sigqueueinfo), "rt_sigqueueinfo" }, +[525] = { 2, CST|TS, SEN(sigaltstack), "sigaltstack" }, +[526] = { 3, CST, SEN(timer_create), "timer_create" }, +[527] = { 2, CST, SEN(mq_notify), "mq_notify" }, +[528] = { 4, CST, SEN(kexec_load), "kexec_load" }, +[529] = { 5, CST|TP, SEN(waitid), "waitid" }, +[530] = { 2, CST, SEN(set_robust_list), "set_robust_list" }, +[531] = { 3, CST, SEN(get_robust_list), "get_robust_list" }, +[532] = { 4, CST|TD, SEN(vmsplice), "vmsplice" }, +[533] = { 6, CST|TM, SEN(move_pages), "move_pages" }, [534] = { 4, TD, SEN(preadv), "preadv" }, [535] = { 4, TD, SEN(pwritev), "pwritev" }, -[536] = { 4, TP|TS, SEN(rt_tgsigqueueinfo), "rt_tgsigqueueinfo" }, -[537] = { 5, TN, SEN(recvmmsg), "recvmmsg" }, -[538] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, -[539] = { 6, 0, SEN(process_vm_readv), "process_vm_readv" }, -[540] = { 6, 0, SEN(process_vm_writev), "process_vm_writev" }, -[541] = { 5, TN, SEN(setsockopt), "setsockopt" }, -[542] = { 5, TN, SEN(getsockopt), "getsockopt" }, -[543] = { 2, TM, SEN(io_setup), "io_setup" }, -[544] = { 3, 0, SEN(io_submit), "io_submit" }, -[545] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, +[536] = { 4, CST|TP|TS, SEN(rt_tgsigqueueinfo), "rt_tgsigqueueinfo" }, +[537] = { 5, CST|TN, SEN(recvmmsg), "recvmmsg" }, +[538] = { 4, CST|TN, SEN(sendmmsg), "sendmmsg" }, +[539] = { 6, CST, SEN(process_vm_readv), "process_vm_readv" }, +[540] = { 6, CST, SEN(process_vm_writev), "process_vm_writev" }, +[541] = { 5, CST|TN, SEN(setsockopt), "setsockopt" }, +[542] = { 5, CST|TN, SEN(getsockopt), "getsockopt" }, +[543] = { 2, CST|TM, SEN(io_setup), "io_setup" }, +[544] = { 3, CST, SEN(io_submit), "io_submit" }, +[545] = { 5, CST|TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[546] = { 6, TD, SEN(preadv2), "preadv2" }, +[547] = { 6, TD, SEN(pwritev2), "pwritev2" }, diff --git a/linux/x86_64/arch_sigreturn.c b/linux/x86_64/arch_sigreturn.c index 1de0a0ad2..060b93a73 100644 --- a/linux/x86_64/arch_sigreturn.c +++ b/linux/x86_64/arch_sigreturn.c @@ -18,15 +18,15 @@ arch_sigreturn(struct tcb *tcp) #define X86_64_SIGMASK_OFFSET offsetof(struct ucontext, uc_sigmask) #define X32_SIGMASK_OFFSET sizeof(ucontext_x32_header) - const unsigned long offset = + const kernel_ulong_t offset = #ifdef X32 X32_SIGMASK_OFFSET; #else current_personality == 2 ? X32_SIGMASK_OFFSET : X86_64_SIGMASK_OFFSET; #endif - const unsigned long addr = (unsigned long) *x86_64_rsp_ptr + offset; + const kernel_ulong_t addr = (kernel_ulong_t) *x86_64_rsp_ptr + offset; tprints("{mask="); - print_sigset_addr_len(tcp, addr, NSIG / 8); + print_sigset_addr_len(tcp, addr, NSIG_BYTES); tprints("}"); } diff --git a/linux/x86_64/get_error.c b/linux/x86_64/get_error.c index ddf78b7ca..9411625b9 100644 --- a/linux/x86_64/get_error.c +++ b/linux/x86_64/get_error.c @@ -19,9 +19,5 @@ get_error(struct tcb *tcp, const bool check_errno) tcp->u_error = -rax; } else { tcp->u_rval = rax; -#ifdef X32 - /* tcp->u_rval contains a truncated value */ - tcp->u_lrval = rax; -#endif } } diff --git a/linux/x86_64/get_scno.c b/linux/x86_64/get_scno.c index af3329a10..b8c319480 100644 --- a/linux/x86_64/get_scno.c +++ b/linux/x86_64/get_scno.c @@ -30,11 +30,17 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifdef X86_64 +# define X32_PERSONALITY_NUMBER 2 +#else +# define X32_PERSONALITY_NUMBER 0 +#endif + /* Return codes: 1 - ok, 0 - ignore, other - error. */ static int arch_get_scno(struct tcb *tcp) { - long scno = 0; + kernel_ulong_t scno = 0; unsigned int currpers; #ifndef __X32_SYSCALL_BIT @@ -135,7 +141,7 @@ arch_get_scno(struct tcb *tcp) * Stracing of i386 apps is still supported. */ if (currpers == 0) { - error_msg("syscall_%lu(...) in unsupported " + error_msg("syscall_%" PRI_klu "(...) in unsupported " "64-bit mode of process PID=%d", scno, tcp->pid); return 0; } diff --git a/linux/x86_64/get_syscall_args.c b/linux/x86_64/get_syscall_args.c index fa591fb63..f285ac32e 100644 --- a/linux/x86_64/get_syscall_args.c +++ b/linux/x86_64/get_syscall_args.c @@ -4,32 +4,40 @@ get_syscall_args(struct tcb *tcp) { if (x86_io.iov_len != sizeof(i386_regs)) { /* x86-64 or x32 ABI */ - tcp->u_arg[0] = x86_64_regs.rdi; - tcp->u_arg[1] = x86_64_regs.rsi; - tcp->u_arg[2] = x86_64_regs.rdx; - tcp->u_arg[3] = x86_64_regs.r10; - tcp->u_arg[4] = x86_64_regs.r8; - tcp->u_arg[5] = x86_64_regs.r9; -#ifdef X32 - tcp->ext_arg[0] = x86_64_regs.rdi; - tcp->ext_arg[1] = x86_64_regs.rsi; - tcp->ext_arg[2] = x86_64_regs.rdx; - tcp->ext_arg[3] = x86_64_regs.r10; - tcp->ext_arg[4] = x86_64_regs.r8; - tcp->ext_arg[5] = x86_64_regs.r9; -#endif + if (tcp->s_ent->sys_flags & COMPAT_SYSCALL_TYPES) { + /* + * X32 compat syscall: zero-extend from 32 bits. + * Use truncate_klong_to_current_wordsize(tcp->u_arg[N]) + * in syscall handlers + * if you need to use *sign-extended* parameter. + */ + tcp->u_arg[0] = (uint32_t) x86_64_regs.rdi; + tcp->u_arg[1] = (uint32_t) x86_64_regs.rsi; + tcp->u_arg[2] = (uint32_t) x86_64_regs.rdx; + tcp->u_arg[3] = (uint32_t) x86_64_regs.r10; + tcp->u_arg[4] = (uint32_t) x86_64_regs.r8; + tcp->u_arg[5] = (uint32_t) x86_64_regs.r9; + } else { + tcp->u_arg[0] = x86_64_regs.rdi; + tcp->u_arg[1] = x86_64_regs.rsi; + tcp->u_arg[2] = x86_64_regs.rdx; + tcp->u_arg[3] = x86_64_regs.r10; + tcp->u_arg[4] = x86_64_regs.r8; + tcp->u_arg[5] = x86_64_regs.r9; + } } else { - /* i386 ABI */ - /* Zero-extend from 32 bits */ - /* Use widen_to_long(tcp->u_arg[N]) in syscall handlers + /* + * i386 ABI: zero-extend from 32 bits. + * Use truncate_klong_to_current_wordsize(tcp->u_arg[N]) + * in syscall handlers * if you need to use *sign-extended* parameter. */ - tcp->u_arg[0] = (long)(uint32_t)i386_regs.ebx; - tcp->u_arg[1] = (long)(uint32_t)i386_regs.ecx; - tcp->u_arg[2] = (long)(uint32_t)i386_regs.edx; - tcp->u_arg[3] = (long)(uint32_t)i386_regs.esi; - tcp->u_arg[4] = (long)(uint32_t)i386_regs.edi; - tcp->u_arg[5] = (long)(uint32_t)i386_regs.ebp; + tcp->u_arg[0] = (uint32_t) i386_regs.ebx; + tcp->u_arg[1] = (uint32_t) i386_regs.ecx; + tcp->u_arg[2] = (uint32_t) i386_regs.edx; + tcp->u_arg[3] = (uint32_t) i386_regs.esi; + tcp->u_arg[4] = (uint32_t) i386_regs.edi; + tcp->u_arg[5] = (uint32_t) i386_regs.ebp; } return 1; } diff --git a/linux/x86_64/getregs_old.h b/linux/x86_64/getregs_old.h new file mode 100644 index 000000000..80303016d --- /dev/null +++ b/linux/x86_64/getregs_old.h @@ -0,0 +1,2 @@ +#define HAVE_GETREGS_OLD +static int getregs_old(pid_t); diff --git a/linux/x86_64/ioctls_arch0.h b/linux/x86_64/ioctls_arch0.h index 3a978f0dc..d13cb4633 100644 --- a/linux/x86_64/ioctls_arch0.h +++ b/linux/x86_64/ioctls_arch0.h @@ -14,3 +14,113 @@ { "asm/mtrr.h", "MTRRIOC_KILL_PAGE_ENTRY", _IOC_WRITE, 0x4d09, 0x10 }, { "asm/mtrr.h", "MTRRIOC_SET_ENTRY", _IOC_WRITE, 0x4d01, 0x10 }, { "asm/mtrr.h", "MTRRIOC_SET_PAGE_ENTRY", _IOC_WRITE, 0x4d06, 0x10 }, +{ "linux/kvm.h", "KVM_ARM_SET_DEVICE_ADDR", _IOC_WRITE, 0xaeab, 0x10 }, +{ "linux/kvm.h", "KVM_ASSIGN_DEV_IRQ", _IOC_WRITE, 0xae70, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_PCI_DEVICE", _IOC_READ, 0xae69, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_INTX_MASK", _IOC_WRITE, 0xaea4, 0x40 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_ENTRY", _IOC_WRITE, 0xae74, 0x10 }, +{ "linux/kvm.h", "KVM_ASSIGN_SET_MSIX_NR", _IOC_WRITE, 0xae73, 0x08 }, +{ "linux/kvm.h", "KVM_CHECK_EXTENSION", _IOC_NONE, 0xae03, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_DEVICE", _IOC_READ|_IOC_WRITE, 0xaee0, 0x0c }, +{ "linux/kvm.h", "KVM_CREATE_IRQCHIP", _IOC_NONE, 0xae60, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_PIT", _IOC_NONE, 0xae64, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_PIT2", _IOC_WRITE, 0xae77, 0x40 }, +{ "linux/kvm.h", "KVM_CREATE_VCPU", _IOC_NONE, 0xae41, 0x00 }, +{ "linux/kvm.h", "KVM_CREATE_VM", _IOC_NONE, 0xae01, 0x00 }, +{ "linux/kvm.h", "KVM_DEASSIGN_DEV_IRQ", _IOC_WRITE, 0xae75, 0x40 }, +{ "linux/kvm.h", "KVM_DEASSIGN_PCI_DEVICE", _IOC_WRITE, 0xae72, 0x40 }, +{ "linux/kvm.h", "KVM_DIRTY_TLB", _IOC_WRITE, 0xaeaa, 0x10 }, +{ "linux/kvm.h", "KVM_ENABLE_CAP", _IOC_WRITE, 0xaea3, 0x68 }, +{ "linux/kvm.h", "KVM_GET_API_VERSION", _IOC_NONE, 0xae00, 0x00 }, +{ "linux/kvm.h", "KVM_GET_CLOCK", _IOC_READ, 0xae7c, 0x30 }, +{ "linux/kvm.h", "KVM_GET_CPUID2", _IOC_READ|_IOC_WRITE, 0xae91, 0x08 }, +{ "linux/kvm.h", "KVM_GET_DEBUGREGS", _IOC_READ, 0xaea1, 0x80 }, +{ "linux/kvm.h", "KVM_GET_DEVICE_ATTR", _IOC_WRITE, 0xaee2, 0x18 }, +{ "linux/kvm.h", "KVM_GET_DIRTY_LOG", _IOC_WRITE, 0xae42, 0x10 }, +{ "linux/kvm.h", "KVM_GET_EMULATED_CPUID", _IOC_READ|_IOC_WRITE, 0xae09, 0x08 }, +{ "linux/kvm.h", "KVM_GET_FPU", _IOC_READ, 0xae8c, 0x1a0 }, +{ "linux/kvm.h", "KVM_GET_IRQCHIP", _IOC_READ|_IOC_WRITE, 0xae62, 0x208 }, +{ "linux/kvm.h", "KVM_GET_LAPIC", _IOC_READ, 0xae8e, 0x400 }, +{ "linux/kvm.h", "KVM_GET_MP_STATE", _IOC_READ, 0xae98, 0x04 }, +{ "linux/kvm.h", "KVM_GET_MSRS", _IOC_READ|_IOC_WRITE, 0xae88, 0x08 }, +{ "linux/kvm.h", "KVM_GET_MSR_INDEX_LIST", _IOC_READ|_IOC_WRITE, 0xae02, 0x04 }, +{ "linux/kvm.h", "KVM_GET_NR_MMU_PAGES", _IOC_NONE, 0xae45, 0x00 }, +{ "linux/kvm.h", "KVM_GET_ONE_REG", _IOC_WRITE, 0xaeab, 0x10 }, +{ "linux/kvm.h", "KVM_GET_PIT", _IOC_READ|_IOC_WRITE, 0xae65, 0x48 }, +{ "linux/kvm.h", "KVM_GET_PIT2", _IOC_READ, 0xae9f, 0x70 }, +{ "linux/kvm.h", "KVM_GET_REGS", _IOC_READ, 0xae81, 0x90 }, +{ "linux/kvm.h", "KVM_GET_REG_LIST", _IOC_READ|_IOC_WRITE, 0xaeb0, 0x08 }, +{ "linux/kvm.h", "KVM_GET_SREGS", _IOC_READ, 0xae83, 0x138 }, +{ "linux/kvm.h", "KVM_GET_SUPPORTED_CPUID", _IOC_READ|_IOC_WRITE, 0xae05, 0x08 }, +{ "linux/kvm.h", "KVM_GET_TSC_KHZ", _IOC_NONE, 0xaea3, 0x00 }, +{ "linux/kvm.h", "KVM_GET_VCPU_EVENTS", _IOC_READ, 0xae9f, 0x40 }, +{ "linux/kvm.h", "KVM_GET_VCPU_MMAP_SIZE", _IOC_NONE, 0xae04, 0x00 }, +{ "linux/kvm.h", "KVM_GET_XCRS", _IOC_READ, 0xaea6, 0x188 }, +{ "linux/kvm.h", "KVM_GET_XSAVE", _IOC_READ, 0xaea4, 0x1000 }, +{ "linux/kvm.h", "KVM_HAS_DEVICE_ATTR", _IOC_WRITE, 0xaee3, 0x18 }, +{ "linux/kvm.h", "KVM_INTERRUPT", _IOC_WRITE, 0xae86, 0x04 }, +{ "linux/kvm.h", "KVM_IOEVENTFD", _IOC_WRITE, 0xae79, 0x40 }, +{ "linux/kvm.h", "KVM_IRQFD", _IOC_WRITE, 0xae76, 0x20 }, +{ "linux/kvm.h", "KVM_IRQ_LINE", _IOC_WRITE, 0xae61, 0x08 }, +{ "linux/kvm.h", "KVM_IRQ_LINE_STATUS", _IOC_READ|_IOC_WRITE, 0xae67, 0x08 }, +{ "linux/kvm.h", "KVM_KVMCLOCK_CTRL", _IOC_NONE, 0xaead, 0x00 }, +{ "linux/kvm.h", "KVM_NMI", _IOC_NONE, 0xae9a, 0x00 }, +{ "linux/kvm.h", "KVM_PPC_ALLOCATE_HTAB", _IOC_READ|_IOC_WRITE, 0xaea7, 0x04 }, +{ "linux/kvm.h", "KVM_PPC_GET_PVINFO", _IOC_WRITE, 0xaea1, 0x80 }, +{ "linux/kvm.h", "KVM_PPC_GET_SMMU_INFO", _IOC_READ, 0xaea6, 0x250 }, +{ "linux/kvm.h", "KVM_REGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae67, 0x10 }, +{ "linux/kvm.h", "KVM_REINJECT_CONTROL", _IOC_NONE, 0xae71, 0x00 }, +{ "linux/kvm.h", "KVM_RUN", _IOC_NONE, 0xae80, 0x00 }, +{ "linux/kvm.h", "KVM_S390_ENABLE_SIE", _IOC_NONE, 0xae06, 0x00 }, +{ "linux/kvm.h", "KVM_S390_GET_IRQ_STATE", _IOC_WRITE, 0xaeb6, 0x20 }, +{ "linux/kvm.h", "KVM_S390_GET_SKEYS", _IOC_WRITE, 0xaeb2, 0x40 }, +{ "linux/kvm.h", "KVM_S390_INITIAL_RESET", _IOC_NONE, 0xae97, 0x00 }, +{ "linux/kvm.h", "KVM_S390_INTERRUPT", _IOC_WRITE, 0xae94, 0x10 }, +{ "linux/kvm.h", "KVM_S390_IRQ", _IOC_WRITE, 0xaeb4, 0x48 }, +{ "linux/kvm.h", "KVM_S390_MEM_OP", _IOC_WRITE, 0xaeb1, 0x40 }, +{ "linux/kvm.h", "KVM_S390_SET_INITIAL_PSW", _IOC_WRITE, 0xae96, 0x10 }, +{ "linux/kvm.h", "KVM_S390_SET_IRQ_STATE", _IOC_WRITE, 0xaeb5, 0x20 }, +{ "linux/kvm.h", "KVM_S390_SET_SKEYS", _IOC_WRITE, 0xaeb3, 0x40 }, +{ "linux/kvm.h", "KVM_S390_STORE_STATUS", _IOC_WRITE, 0xae95, 0x08 }, +{ "linux/kvm.h", "KVM_S390_UCAS_MAP", _IOC_WRITE, 0xae50, 0x18 }, +{ "linux/kvm.h", "KVM_S390_UCAS_UNMAP", _IOC_WRITE, 0xae51, 0x18 }, +{ "linux/kvm.h", "KVM_S390_VCPU_FAULT", _IOC_WRITE, 0xae52, 0x08 }, +{ "linux/kvm.h", "KVM_SET_BOOT_CPU_ID", _IOC_NONE, 0xae78, 0x00 }, +{ "linux/kvm.h", "KVM_SET_CLOCK", _IOC_WRITE, 0xae7b, 0x30 }, +{ "linux/kvm.h", "KVM_SET_CPUID", _IOC_WRITE, 0xae8a, 0x08 }, +{ "linux/kvm.h", "KVM_SET_CPUID2", _IOC_WRITE, 0xae90, 0x08 }, +{ "linux/kvm.h", "KVM_SET_DEBUGREGS", _IOC_WRITE, 0xaea2, 0x80 }, +{ "linux/kvm.h", "KVM_SET_DEVICE_ATTR", _IOC_WRITE, 0xaee1, 0x18 }, +{ "linux/kvm.h", "KVM_SET_FPU", _IOC_WRITE, 0xae8d, 0x1a0 }, +{ "linux/kvm.h", "KVM_SET_GSI_ROUTING", _IOC_WRITE, 0xae6a, 0x08 }, +{ "linux/kvm.h", "KVM_SET_GUEST_DEBUG", _IOC_WRITE, 0xae9b, 0x48 }, +{ "linux/kvm.h", "KVM_SET_IDENTITY_MAP_ADDR", _IOC_WRITE, 0xae48, 0x08 }, +{ "linux/kvm.h", "KVM_SET_IRQCHIP", _IOC_READ, 0xae63, 0x208 }, +{ "linux/kvm.h", "KVM_SET_LAPIC", _IOC_WRITE, 0xae8f, 0x400 }, +{ "linux/kvm.h", "KVM_SET_MEMORY_ALIAS", _IOC_WRITE, 0xae43, 0x20 }, +{ "linux/kvm.h", "KVM_SET_MEMORY_REGION", _IOC_WRITE, 0xae40, 0x18 }, +{ "linux/kvm.h", "KVM_SET_MP_STATE", _IOC_WRITE, 0xae99, 0x04 }, +{ "linux/kvm.h", "KVM_SET_MSRS", _IOC_WRITE, 0xae89, 0x08 }, +{ "linux/kvm.h", "KVM_SET_NR_MMU_PAGES", _IOC_NONE, 0xae44, 0x00 }, +{ "linux/kvm.h", "KVM_SET_ONE_REG", _IOC_WRITE, 0xaeac, 0x10 }, +{ "linux/kvm.h", "KVM_SET_PIT", _IOC_READ, 0xae66, 0x48 }, +{ "linux/kvm.h", "KVM_SET_PIT2", _IOC_WRITE, 0xaea0, 0x70 }, +{ "linux/kvm.h", "KVM_SET_REGS", _IOC_WRITE, 0xae82, 0x90 }, +{ "linux/kvm.h", "KVM_SET_SIGNAL_MASK", _IOC_WRITE, 0xae8b, 0x04 }, +{ "linux/kvm.h", "KVM_SET_SREGS", _IOC_WRITE, 0xae84, 0x138 }, +{ "linux/kvm.h", "KVM_SET_TSC_KHZ", _IOC_NONE, 0xaea2, 0x00 }, +{ "linux/kvm.h", "KVM_SET_TSS_ADDR", _IOC_NONE, 0xae47, 0x00 }, +{ "linux/kvm.h", "KVM_SET_USER_MEMORY_REGION", _IOC_WRITE, 0xae46, 0x20 }, +{ "linux/kvm.h", "KVM_SET_VAPIC_ADDR", _IOC_WRITE, 0xae93, 0x08 }, +{ "linux/kvm.h", "KVM_SET_VCPU_EVENTS", _IOC_WRITE, 0xaea0, 0x40 }, +{ "linux/kvm.h", "KVM_SET_XCRS", _IOC_WRITE, 0xaea7, 0x188 }, +{ "linux/kvm.h", "KVM_SET_XSAVE", _IOC_WRITE, 0xaea5, 0x1000 }, +{ "linux/kvm.h", "KVM_SIGNAL_MSI", _IOC_WRITE, 0xaea5, 0x20 }, +{ "linux/kvm.h", "KVM_SMI", _IOC_NONE, 0xaeb7, 0x00 }, +{ "linux/kvm.h", "KVM_TPR_ACCESS_REPORTING", _IOC_READ|_IOC_WRITE, 0xae92, 0x28 }, +{ "linux/kvm.h", "KVM_TRANSLATE", _IOC_READ|_IOC_WRITE, 0xae85, 0x18 }, +{ "linux/kvm.h", "KVM_UNREGISTER_COALESCED_MMIO", _IOC_WRITE, 0xae68, 0x10 }, +{ "linux/kvm.h", "KVM_X86_GET_MCE_CAP_SUPPORTED", _IOC_READ, 0xae9d, 0x08 }, +{ "linux/kvm.h", "KVM_X86_SETUP_MCE", _IOC_WRITE, 0xae9c, 0x08 }, +{ "linux/kvm.h", "KVM_X86_SET_MCE", _IOC_WRITE, 0xae9e, 0x40 }, +{ "linux/kvm.h", "KVM_XEN_HVM_CONFIG", _IOC_WRITE, 0xae7a, 0x38 }, diff --git a/linux/x86_64/set_error.c b/linux/x86_64/set_error.c new file mode 100644 index 000000000..123c89517 --- /dev/null +++ b/linux/x86_64/set_error.c @@ -0,0 +1,37 @@ +#ifndef HAVE_GETREGS_OLD +# define arch_set_error i386_set_error +# define arch_set_success i386_set_success +# include "i386/set_error.c" +# undef arch_set_success +# undef arch_set_error +#endif /* !HAVE_GETREGS_OLD */ + +static int +arch_set_error(struct tcb *tcp) +{ +#ifdef HAVE_GETREGS_OLD + x86_64_regs.rax = - (long long) tcp->u_error; + return upoke(tcp->pid, 8 * RAX, x86_64_regs.rax); +#else + if (x86_io.iov_len == sizeof(i386_regs)) + return i386_set_error(tcp); + + x86_64_regs.rax = - (long long) tcp->u_error; + return set_regs(tcp->pid); +#endif +} + +static int +arch_set_success(struct tcb *tcp) +{ +#ifdef HAVE_GETREGS_OLD + x86_64_regs.rax = (long long) tcp->u_rval; + return upoke(tcp->pid, 8 * RAX, x86_64_regs.rax); +#else + if (x86_io.iov_len == sizeof(i386_regs)) + return i386_set_success(tcp); + + x86_64_regs.rax = (long long) tcp->u_rval; + return set_regs(tcp->pid); +#endif +} diff --git a/linux/x86_64/set_scno.c b/linux/x86_64/set_scno.c new file mode 100644 index 000000000..6438c5264 --- /dev/null +++ b/linux/x86_64/set_scno.c @@ -0,0 +1,19 @@ +#ifndef HAVE_GETREGS_OLD +# define arch_set_scno i386_set_scno +# include "i386/set_scno.c" +# undef arch_set_scno +#endif /* !HAVE_GETREGS_OLD */ + +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ +#ifdef HAVE_GETREGS_OLD + return upoke(tcp->pid, 8 * ORIG_RAX, scno); +#else + if (x86_io.iov_len == sizeof(i386_regs)) + return i386_set_scno(tcp, scno); + + x86_64_regs.orig_rax = scno; + return set_regs(tcp->pid); +#endif +} diff --git a/linux/x86_64/syscallent.h b/linux/x86_64/syscallent.h index 6e814ea01..fcabde743 100644 --- a/linux/x86_64/syscallent.h +++ b/linux/x86_64/syscallent.h @@ -315,15 +315,18 @@ [314] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [315] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [316] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[317] = { 3, 0, SEN(seccomp), "seccomp", }, -[318] = { 3, 0, SEN(getrandom), "getrandom", }, -[319] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[320] = { 5, TD, SEN(kexec_file_load), "kexec_file_load", }, -[321] = { 3, TD, SEN(bpf), "bpf", }, -[322] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, -[323] = { 1, TD, SEN(userfaultfd), "userfaultfd", }, -[324] = { 2, 0, SEN(membarrier), "membarrier", }, +[317] = { 3, 0, SEN(seccomp), "seccomp" }, +[318] = { 3, 0, SEN(getrandom), "getrandom" }, +[319] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[320] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" }, +[321] = { 3, TD, SEN(bpf), "bpf" }, +[322] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[323] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[324] = { 2, 0, SEN(membarrier), "membarrier" }, [325] = { 3, TM, SEN(mlock2), "mlock2" }, [326] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [327] = { 6, TD, SEN(preadv2), "preadv2" }, [328] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[329] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, +[330] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, +[331] = { 1, 0, SEN(pkey_free), "pkey_free" }, diff --git a/linux/xtensa/arch_regs.c b/linux/xtensa/arch_regs.c index d36f56a05..67e5f010f 100644 --- a/linux/xtensa/arch_regs.c +++ b/linux/xtensa/arch_regs.c @@ -1,2 +1,2 @@ -static long xtensa_a2; +static unsigned long xtensa_a2; #define ARCH_PC_PEEK_ADDR REG_PC diff --git a/linux/xtensa/set_error.c b/linux/xtensa/set_error.c new file mode 100644 index 000000000..4eb591717 --- /dev/null +++ b/linux/xtensa/set_error.c @@ -0,0 +1,13 @@ +static int +arch_set_error(struct tcb *tcp) +{ + xtensa_a2 = -tcp->u_error; + return upoke(tcp->pid, REG_A_BASE + 2, xtensa_a2); +} + +static int +arch_set_success(struct tcb *tcp) +{ + xtensa_a2 = tcp->u_rval; + return upoke(tcp->pid, REG_A_BASE + 2, xtensa_a2); +} diff --git a/linux/xtensa/set_scno.c b/linux/xtensa/set_scno.c new file mode 100644 index 000000000..54c948d36 --- /dev/null +++ b/linux/xtensa/set_scno.c @@ -0,0 +1,5 @@ +static int +arch_set_scno(struct tcb *tcp, kernel_ulong_t scno) +{ + return upoke(tcp->pid, SYSCALL_NR, scno); +} diff --git a/linux/xtensa/syscallent.h b/linux/xtensa/syscallent.h index 74eb5c380..a130d6e0f 100644 --- a/linux/xtensa/syscallent.h +++ b/linux/xtensa/syscallent.h @@ -325,8 +325,14 @@ [334] = { 3, 0, SEN(sched_setattr), "sched_setattr" }, [335] = { 4, 0, SEN(sched_getattr), "sched_getattr" }, [336] = { 5, TD|TF, SEN(renameat2), "renameat2" }, -[337] = { 3, 0, SEN(seccomp), "seccomp", }, -[338] = { 3, 0, SEN(getrandom), "getrandom", }, -[339] = { 2, TD, SEN(memfd_create), "memfd_create", }, -[340] = { 3, TD, SEN(bpf), "bpf", }, -[341] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat", }, +[337] = { 3, 0, SEN(seccomp), "seccomp" }, +[338] = { 3, 0, SEN(getrandom), "getrandom" }, +[339] = { 2, TD, SEN(memfd_create), "memfd_create" }, +[340] = { 3, TD, SEN(bpf), "bpf" }, +[341] = { 5, TD|TF|TP|SE|SI, SEN(execveat), "execveat" }, +[342] = { 1, TD, SEN(userfaultfd), "userfaultfd" }, +[343] = { 2, 0, SEN(membarrier), "membarrier" }, +[344] = { 3, TM, SEN(mlock2), "mlock2" }, +[345] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, +[346] = { 6, TD, SEN(preadv2), "preadv2" }, +[347] = { 6, TD, SEN(pwritev2), "pwritev2" }, diff --git a/lookup_dcookie.c b/lookup_dcookie.c index c95e59399..279694f17 100644 --- a/lookup_dcookie.c +++ b/lookup_dcookie.c @@ -40,10 +40,10 @@ SYS_FUNC(lookup_dcookie) if (syserror(tcp)) printaddr(tcp->u_arg[argn]); else - printstr(tcp, tcp->u_arg[argn], tcp->u_rval); + printstrn(tcp, tcp->u_arg[argn], tcp->u_rval); /* len */ - tprintf(", %lu", tcp->u_arg[argn + 1]); + tprintf(", %" PRI_klu, tcp->u_arg[argn + 1]); return 0; } diff --git a/loop.c b/loop.c index 2de33c5fd..f19ad928c 100644 --- a/loop.c +++ b/loop.c @@ -29,13 +29,20 @@ #include #include +typedef struct loop_info struct_loop_info; + +#include DEF_MPERS_TYPE(struct_loop_info) + +#include MPERS_DEFS + +#include "xlat/loop_cmds.h" #include "xlat/loop_flags_options.h" #include "xlat/loop_crypt_type_options.h" static void -decode_loop_info(struct tcb *tcp, const long addr) +decode_loop_info(struct tcb *const tcp, const kernel_ulong_t addr) { - struct loop_info info; + struct_loop_info info; tprints(", "); if (umove_or_printaddr(tcp, addr, &info)) @@ -44,10 +51,11 @@ decode_loop_info(struct tcb *tcp, const long addr) tprintf("{lo_number=%d", info.lo_number); if (!abbrev(tcp)) { - tprintf(", lo_device=%#lx, lo_inode=%lu, lo_rdevice=%#lx", - (unsigned long) info.lo_device, - info.lo_inode, - (unsigned long) info.lo_rdevice); + tprints(", lo_device="); + print_dev_t(info.lo_device); + tprintf(", lo_inode=%" PRI_klu, (kernel_ulong_t) info.lo_inode); + tprints(", lo_rdevice="); + print_dev_t(info.lo_rdevice); } tprintf(", lo_offset=%#x", info.lo_offset); @@ -56,7 +64,12 @@ decode_loop_info(struct tcb *tcp, const long addr) tprints(", lo_encrypt_type="); printxval(loop_crypt_type_options, info.lo_encrypt_type, "LO_CRYPT_???"); - tprintf(", lo_encrypt_key_size=%d", info.lo_encrypt_key_size); + /* + * It is converted to unsigned before use in kernel, see + * loop_info64_from_old in drivers/block/loop.c + */ + tprintf(", lo_encrypt_key_size=%" PRIu32, + (uint32_t) info.lo_encrypt_key_size); } tprints(", lo_flags="); @@ -69,13 +82,15 @@ decode_loop_info(struct tcb *tcp, const long addr) if (!abbrev(tcp) || info.lo_encrypt_type != LO_CRYPT_NONE) { tprints(", lo_encrypt_key="); print_quoted_string((void *) info.lo_encrypt_key, - LO_KEY_SIZE, 0); + MIN((uint32_t) info.lo_encrypt_key_size, + LO_KEY_SIZE), 0); } if (!abbrev(tcp)) - tprintf(", lo_init=[%#lx, %#lx]" - ", reserved=[%#x, %#x, %#x, %#x]}", - info.lo_init[0], info.lo_init[1], + tprintf(", lo_init=[%#" PRI_klx ", %#" PRI_klx "]" + ", reserved=[%#hhx, %#hhx, %#hhx, %#hhx]}", + (kernel_ulong_t) info.lo_init[0], + (kernel_ulong_t) info.lo_init[1], info.reserved[0], info.reserved[1], info.reserved[2], info.reserved[3]); else @@ -83,7 +98,7 @@ decode_loop_info(struct tcb *tcp, const long addr) } static void -decode_loop_info64(struct tcb *tcp, const long addr) +decode_loop_info64(struct tcb *const tcp, const kernel_ulong_t addr) { struct loop_info64 info64; @@ -92,12 +107,13 @@ decode_loop_info64(struct tcb *tcp, const long addr) return; if (!abbrev(tcp)) { - tprintf("{lo_device=%" PRIu64 ", lo_inode=%" PRIu64 - ", lo_rdevice=%" PRIu64 ", lo_offset=%#" PRIx64 - ", lo_sizelimit=%" PRIu64 ", lo_number=%" PRIu32, - (uint64_t) info64.lo_device, - (uint64_t) info64.lo_inode, - (uint64_t) info64.lo_rdevice, + tprints("{lo_device="); + print_dev_t(info64.lo_device); + tprintf(", lo_inode=%" PRIu64, (uint64_t) info64.lo_inode); + tprints(", lo_rdevice="); + print_dev_t(info64.lo_rdevice); + tprintf(", lo_offset=%#" PRIx64 ", lo_sizelimit=%" PRIu64 + ", lo_number=%" PRIu32, (uint64_t) info64.lo_offset, (uint64_t) info64.lo_sizelimit, (uint32_t) info64.lo_number); @@ -128,7 +144,8 @@ decode_loop_info64(struct tcb *tcp, const long addr) LO_NAME_SIZE, QUOTE_0_TERMINATED); tprints(", lo_encrypt_key="); print_quoted_string((void *) info64.lo_encrypt_key, - LO_KEY_SIZE, 0); + MIN(info64.lo_encrypt_key_size, + LO_KEY_SIZE), 0); } if (!abbrev(tcp)) @@ -139,12 +156,10 @@ decode_loop_info64(struct tcb *tcp, const long addr) tprints(", ...}"); } -int -loop_ioctl(struct tcb *tcp, const unsigned int code, long arg) +MPERS_PRINTER_DECL(int, loop_ioctl, + struct tcb *tcp, const unsigned int code, + const kernel_ulong_t arg) { - if (!verbose(tcp)) - return RVAL_DECODED; - switch (code) { case LOOP_GET_STATUS: if (entering(tcp)) @@ -163,13 +178,9 @@ loop_ioctl(struct tcb *tcp, const unsigned int code, long arg) break; case LOOP_CLR_FD: -#ifdef LOOP_SET_CAPACITY case LOOP_SET_CAPACITY: -#endif -#ifdef LOOP_CTL_GET_FREE /* newer loop-control stuff */ case LOOP_CTL_GET_FREE: -#endif /* Takes no arguments */ break; @@ -179,19 +190,15 @@ loop_ioctl(struct tcb *tcp, const unsigned int code, long arg) printfd(tcp, arg); break; -#ifdef LOOP_CTL_ADD /* newer loop-control stuff */ case LOOP_CTL_ADD: case LOOP_CTL_REMOVE: tprintf(", %d", (int) arg); break; -#endif -#ifdef LOOP_SET_DIRECT_IO case LOOP_SET_DIRECT_IO: - tprintf(", %lu", arg); + tprintf(", %" PRI_klu, arg); break; -#endif default: return RVAL_DECODED; diff --git a/lseek.c b/lseek.c index 1846abe46..18d847b68 100644 --- a/lseek.c +++ b/lseek.c @@ -40,60 +40,33 @@ /* Linux kernel has exactly one version of lseek: * fs/read_write.c::SYSCALL_DEFINE3(lseek, unsigned, fd, off_t, offset, unsigned, origin) * In kernel, off_t is always the same as (kernel's) long - * (see include/uapi/asm-generic/posix_types.h), - * which means that on x32 we need to use tcp->ext_arg[N] to get offset argument. + * (see include/uapi/asm-generic/posix_types.h). * Use test/x32_lseek.c to test lseek decoding. */ -#if HAVE_STRUCT_TCB_EXT_ARG SYS_FUNC(lseek) { printfd(tcp, tcp->u_arg[0]); - long long offset; -# if SUPPORTED_PERSONALITIES > 1 - /* tcp->ext_arg is not initialized for compat personality */ - if (current_personality == 1) { - offset = tcp->u_arg[1]; + kernel_long_t offset; + +# ifndef current_klongsize + if (current_klongsize < sizeof(kernel_long_t)) { + offset = (int) tcp->u_arg[1]; } else -# endif +# endif /* !current_klongsize */ { - offset = tcp->ext_arg[1]; + offset = tcp->u_arg[1]; } - int whence = tcp->u_arg[2]; - - tprintf(", %lld, ", offset); - printxval(whence_codes, whence, "SEEK_???"); - - return RVAL_DECODED | RVAL_LUDECIMAL; -} -#else -SYS_FUNC(lseek) -{ - printfd(tcp, tcp->u_arg[0]); - long offset = -# if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 -# ifdef X86_64 - current_personality == 1 ? - (long)(int) tcp->u_arg[1] : tcp->u_arg[1]; -# else - current_wordsize == 4 ? - (long)(int) tcp->u_arg[1] : tcp->u_arg[1]; -# endif -# else - tcp->u_arg[1]; -# endif - int whence = tcp->u_arg[2]; + tprintf(", %" PRI_kld ", ", offset); - tprintf(", %ld, ", offset); - printxval(whence_codes, whence, "SEEK_???"); + printxval(whence_codes, tcp->u_arg[2], "SEEK_???"); return RVAL_DECODED | RVAL_UDECIMAL; } -#endif /* llseek syscall takes explicitly two ulong arguments hi, lo, - * rather than one 64-bit argument for which LONG_LONG works + * rather than one 64-bit argument for which ULONG_LONG works * appropriate for the native byte order. * * See kernel's fs/read_write.c::SYSCALL_DEFINE5(llseek, ...) @@ -102,16 +75,15 @@ SYS_FUNC(lseek) * ((loff_t) hi << 32) | lo * Note that for architectures with kernel's long wider than userspace long * (such as x32), combining code will use *kernel's*, i.e. *wide* longs - * for hi and lo. We would need to use tcp->ext_arg[N] on x32... - * ...however, x32 (and x86_64) does not _have_ llseek syscall as such. + * for hi and lo. */ SYS_FUNC(llseek) { if (entering(tcp)) { printfd(tcp, tcp->u_arg[0]); tprintf(", %lld, ", - (zero_extend_signed_to_ull(tcp->u_arg[1]) << 32) - | zero_extend_signed_to_ull(tcp->u_arg[2])); + ((long long) tcp->u_arg[1] << 32) + | ((long long) tcp->u_arg[2])); } else { printnum_int64(tcp, tcp->u_arg[3], "%" PRIu64); tprints(", "); diff --git a/m32_funcs.h b/m32_funcs.h index f4b867268..9c4a53ac2 100644 --- a/m32_funcs.h +++ b/m32_funcs.h @@ -14,6 +14,8 @@ #define sys_sysinfo m32_sys_sysinfo #undef sys_times #define sys_times m32_sys_times +#undef sys_ustat +#define sys_ustat m32_sys_ustat #undef sys_utime #define sys_utime m32_sys_utime #include "sys_func.h" diff --git a/m32_printer_decls.h b/m32_printer_decls.h index c1b417701..c06f197ef 100644 --- a/m32_printer_decls.h +++ b/m32_printer_decls.h @@ -1,31 +1,38 @@ -/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sigaltstack.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ -extern int m32_block_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern int m32_btrfs_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern int m32_evdev_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern _Bool m32_fetch_seccomp_fprog(struct tcb *tcp, const long addr, void *p); -extern _Bool m32_fetch_struct_flock(struct tcb *tcp, const long addr, void *p); -extern _Bool m32_fetch_struct_flock64(struct tcb *tcp, const long addr, void *p); -extern int m32_fetch_struct_mmsghdr(struct tcb *tcp, const unsigned long addr, void *p); +/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_stat.c.mpers.i fetch_struct_stat64.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i loop.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sg_req_info.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timespec.c.mpers.i print_timeval.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sg_io_v3.c.mpers.i sigaltstack.c.mpers.i sock.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i ustat.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ +extern int m32_block_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern int m32_btrfs_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern int m32_evdev_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern _Bool m32_fetch_seccomp_fprog(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); +extern _Bool m32_fetch_struct_flock(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); +extern _Bool m32_fetch_struct_flock64(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); +extern int m32_fetch_struct_mmsghdr(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); extern unsigned int m32_sizeof_struct_mmsghdr(void); -extern int m32_fetch_struct_msghdr(struct tcb *tcp, const unsigned long addr, void *p); -extern _Bool m32_fetch_struct_statfs(struct tcb *tcp, const long addr, struct strace_statfs *p); -extern _Bool m32_fetch_struct_statfs64(struct tcb *tcp, const long addr, const unsigned long size, struct strace_statfs *p); -extern int m32_hdio_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern int m32_mtd_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern void m32_printmqattr(struct tcb *tcp, const long addr); -extern void m32_tprint_msgbuf(struct tcb *tcp, const long addr, const unsigned long count); -extern void m32_print_sigevent(struct tcb *tcp, const long addr); -extern void m32_print_timespec(struct tcb *tcp, const long addr); -extern const char * m32_sprint_timespec(struct tcb *tcp, const long addr); -extern void m32_print_timespec_utime_pair(struct tcb *tcp, const long addr); -extern void m32_print_itimerspec(struct tcb *tcp, const long addr); -extern void m32_print_timeval(struct tcb *tcp, const long addr); -extern void m32_print_timeval_pair(struct tcb *tcp, const long addr); -extern const char * m32_sprint_timeval(struct tcb *tcp, const long addr); -extern void m32_print_itimerval(struct tcb *tcp, const long addr); -extern int m32_print_timex(struct tcb *tcp, const long addr); -extern void m32_printrusage(struct tcb *tcp, long addr); -extern void m32_printsiginfo_at(struct tcb *tcp, long addr); -extern void m32_print_siginfo_array(struct tcb *tcp, unsigned long addr, unsigned long len); -extern int m32_rtc_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern int m32_v4l2_ioctl(struct tcb *tcp, const unsigned int code, const long arg); +extern int m32_fetch_struct_msghdr(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); +extern _Bool m32_fetch_struct_stat(struct tcb *const tcp, const kernel_ulong_t addr, struct strace_stat *const dst); +extern _Bool m32_fetch_struct_stat64(struct tcb *const tcp, const kernel_ulong_t addr, struct strace_stat *const dst); +extern _Bool m32_fetch_struct_statfs(struct tcb *const tcp, const kernel_ulong_t addr, struct strace_statfs *const p); +extern _Bool m32_fetch_struct_statfs64(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t size, struct strace_statfs *const p); +extern int m32_hdio_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern int m32_loop_ioctl(struct tcb *tcp, const unsigned int code, const kernel_ulong_t arg); +extern int m32_mtd_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern void m32_printmqattr(struct tcb *const tcp, const kernel_ulong_t addr, const _Bool decode_flags); +extern void m32_tprint_msgbuf(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t count); +extern int m32_decode_sg_req_info(struct tcb *const tcp, const kernel_ulong_t arg); +extern void m32_print_sigevent(struct tcb *const tcp, const kernel_ulong_t addr); +extern void m32_print_timespec(struct tcb *const tcp, const kernel_ulong_t addr); +extern const char * m32_sprint_timespec(struct tcb *const tcp, const kernel_ulong_t addr); +extern void m32_print_timespec_utime_pair(struct tcb *const tcp, const kernel_ulong_t addr); +extern void m32_print_itimerspec(struct tcb *const tcp, const kernel_ulong_t addr); +extern void m32_print_struct_timeval(const void *arg); +extern void m32_print_timeval(struct tcb *const tcp, const kernel_ulong_t addr); +extern void m32_print_timeval_pair(struct tcb *const tcp, const kernel_ulong_t addr); +extern const char * m32_sprint_timeval(struct tcb *const tcp, const kernel_ulong_t addr); +extern void m32_print_itimerval(struct tcb *const tcp, const kernel_ulong_t addr); +extern int m32_print_timex(struct tcb *const tcp, const kernel_ulong_t addr); +extern void m32_printrusage(struct tcb *const tcp, const kernel_ulong_t addr); +extern void m32_printsiginfo_at(struct tcb *const tcp, const kernel_ulong_t addr); +extern void m32_print_siginfo_array(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t len); +extern int m32_rtc_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern int m32_decode_sg_io_v3(struct tcb *const tcp, const kernel_ulong_t arg); +extern int m32_sock_ioctl(struct tcb *tcp, const unsigned int code, const kernel_ulong_t arg); +extern int m32_v4l2_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); diff --git a/m32_printer_defs.h b/m32_printer_defs.h index 2ca15f46a..3d2122c03 100644 --- a/m32_printer_defs.h +++ b/m32_printer_defs.h @@ -1,4 +1,4 @@ -/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sigaltstack.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ +/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_stat.c.mpers.i fetch_struct_stat64.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i loop.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sg_req_info.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timespec.c.mpers.i print_timeval.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sg_io_v3.c.mpers.i sigaltstack.c.mpers.i sock.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i ustat.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ .block_ioctl = m32_block_ioctl, .btrfs_ioctl = m32_btrfs_ioctl, .evdev_ioctl = m32_evdev_ioctl, @@ -8,17 +8,22 @@ .fetch_struct_mmsghdr = m32_fetch_struct_mmsghdr, .sizeof_struct_mmsghdr = m32_sizeof_struct_mmsghdr, .fetch_struct_msghdr = m32_fetch_struct_msghdr, +.fetch_struct_stat = m32_fetch_struct_stat, +.fetch_struct_stat64 = m32_fetch_struct_stat64, .fetch_struct_statfs = m32_fetch_struct_statfs, .fetch_struct_statfs64 = m32_fetch_struct_statfs64, .hdio_ioctl = m32_hdio_ioctl, +.loop_ioctl = m32_loop_ioctl, .mtd_ioctl = m32_mtd_ioctl, .printmqattr = m32_printmqattr, .tprint_msgbuf = m32_tprint_msgbuf, +.decode_sg_req_info = m32_decode_sg_req_info, .print_sigevent = m32_print_sigevent, .print_timespec = m32_print_timespec, .sprint_timespec = m32_sprint_timespec, .print_timespec_utime_pair = m32_print_timespec_utime_pair, .print_itimerspec = m32_print_itimerspec, +.print_struct_timeval = m32_print_struct_timeval, .print_timeval = m32_print_timeval, .print_timeval_pair = m32_print_timeval_pair, .sprint_timeval = m32_sprint_timeval, @@ -28,4 +33,6 @@ .printsiginfo_at = m32_printsiginfo_at, .print_siginfo_array = m32_print_siginfo_array, .rtc_ioctl = m32_rtc_ioctl, +.decode_sg_io_v3 = m32_decode_sg_io_v3, +.sock_ioctl = m32_sock_ioctl, .v4l2_ioctl = m32_v4l2_ioctl, diff --git a/m32_type_defs.h b/m32_type_defs.h index 0d7b17ecb..e8bc1bf0f 100644 --- a/m32_type_defs.h +++ b/m32_type_defs.h @@ -16,6 +16,9 @@ #ifdef MPERS_m32_struct_btrfs_ioctl_received_subvol_args # define struct_btrfs_ioctl_received_subvol_args MPERS_m32_struct_btrfs_ioctl_received_subvol_args #endif +#ifdef MPERS_m32_struct_btrfs_ioctl_vol_args_v2 +# define struct_btrfs_ioctl_vol_args_v2 MPERS_m32_struct_btrfs_ioctl_vol_args_v2 +#endif #ifdef MPERS_m32_kernel_dirent # define kernel_dirent MPERS_m32_kernel_dirent #endif @@ -37,6 +40,12 @@ #ifdef MPERS_m32_struct_msghdr # define struct_msghdr MPERS_m32_struct_msghdr #endif +#ifdef MPERS_m32_struct_stat +# define struct_stat MPERS_m32_struct_stat +#endif +#ifdef MPERS_m32_struct_stat64 +# define struct_stat64 MPERS_m32_struct_stat64 +#endif #ifdef MPERS_m32_struct_statfs # define struct_statfs MPERS_m32_struct_statfs #endif @@ -52,6 +61,9 @@ #ifdef MPERS_m32_shmid_ds_t # define shmid_ds_t MPERS_m32_shmid_ds_t #endif +#ifdef MPERS_m32_struct_loop_info +# define struct_loop_info MPERS_m32_struct_loop_info +#endif #ifdef MPERS_m32_struct_mtd_oob_buf # define struct_mtd_oob_buf MPERS_m32_struct_mtd_oob_buf #endif @@ -61,6 +73,9 @@ #ifdef MPERS_m32_msgbuf_t # define msgbuf_t MPERS_m32_msgbuf_t #endif +#ifdef MPERS_m32_struct_sg_req_info +# define struct_sg_req_info MPERS_m32_struct_sg_req_info +#endif #ifdef MPERS_m32_struct_sigevent # define struct_sigevent MPERS_m32_struct_sigevent #endif @@ -85,15 +100,27 @@ #ifdef MPERS_m32_struct_rtc_pll_info # define struct_rtc_pll_info MPERS_m32_struct_rtc_pll_info #endif +#ifdef MPERS_m32_struct_sg_io_hdr +# define struct_sg_io_hdr MPERS_m32_struct_sg_io_hdr +#endif #ifdef MPERS_m32_stack_t # define stack_t MPERS_m32_stack_t #endif +#ifdef MPERS_m32_struct_ifconf +# define struct_ifconf MPERS_m32_struct_ifconf +#endif +#ifdef MPERS_m32_struct_ifreq +# define struct_ifreq MPERS_m32_struct_ifreq +#endif #ifdef MPERS_m32_sysinfo_t # define sysinfo_t MPERS_m32_sysinfo_t #endif #ifdef MPERS_m32_tms_t # define tms_t MPERS_m32_tms_t #endif +#ifdef MPERS_m32_struct_ustat +# define struct_ustat MPERS_m32_struct_ustat +#endif #ifdef MPERS_m32_utimbuf_t # define utimbuf_t MPERS_m32_utimbuf_t #endif diff --git a/m4/ax_prog_cc_for_build.m4 b/m4/ax_prog_cc_for_build.m4 index 77fd346a7..9fddbf647 100644 --- a/m4/ax_prog_cc_for_build.m4 +++ b/m4/ax_prog_cc_for_build.m4 @@ -33,6 +33,7 @@ # warranty. #serial 8 +#modified for strace project AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD]) AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl @@ -48,6 +49,10 @@ pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl pushdef([ac_cv_prog_cc_g], ac_cv_build_prog_cc_g)dnl +pushdef([ac_cv_prog_cc_stdc], ac_cv_build_prog_cc_stdc)dnl +pushdef([ac_cv_prog_cc_c11], ac_cv_build_prog_cc_c11)dnl +pushdef([ac_cv_prog_cc_c99], ac_cv_build_prog_cc_c99)dnl +pushdef([ac_cv_prog_cc_c89], ac_cv_build_prog_cc_c89)dnl pushdef([ac_cv_exeext], ac_cv_build_exeext)dnl pushdef([ac_cv_objext], ac_cv_build_objext)dnl pushdef([ac_exeext], ac_build_exeext)dnl @@ -57,6 +62,7 @@ pushdef([CPP], CPP_FOR_BUILD)dnl pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl +pushdef([WARN_CFLAGS], WARN_CFLAGS_FOR_BUILD)dnl pushdef([host], build)dnl pushdef([host_alias], build_alias)dnl pushdef([host_cpu], build_cpu)dnl @@ -67,27 +73,47 @@ pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl pushdef([ac_cv_host_os], ac_cv_build_os)dnl -pushdef([ac_cpp], ac_build_cpp)dnl -pushdef([ac_compile], ac_build_compile)dnl -pushdef([ac_link], ac_build_link)dnl +pushdef([am_cv_prog_cc_c_o], am_cv_build_prog_cc_c_o)dnl +pushdef([am_cv_CC_dependencies_compiler_type], am_cv_build_CC_dependencies_compiler_type)dnl +pushdef([gl_unknown_warnings_are_errors], gl_build_unknown_warnings_are_errors)dnl -save_cross_compiling=$cross_compiling -save_ac_tool_prefix=$ac_tool_prefix +st_SAVE_VAR([ac_c_decl_warn_flag]) +st_SAVE_VAR([ac_c_preproc_warn_flag]) +st_SAVE_VAR([ac_c_werror_flag]) +st_SAVE_VAR([ac_compile]) +st_SAVE_VAR([ac_compiler_gnu]) +st_SAVE_VAR([ac_cpp]) +st_SAVE_VAR([ac_cv_c_compiler_gnu]) +st_SAVE_VAR([ac_cv_c_decl_report]) +st_SAVE_VAR([ac_link]) +st_SAVE_VAR([ac_tool_prefix]) +st_SAVE_VAR([cross_compiling]) cross_compiling=no -ac_tool_prefix= +AC_MSG_NOTICE([looking for a C compiler that generates native executables]) AC_PROG_CC AC_PROG_CPP AC_EXEEXT -ac_tool_prefix=$save_ac_tool_prefix -cross_compiling=$save_cross_compiling +st_WARN_CFLAGS + +st_RESTORE_VAR([cross_compiling]) +st_RESTORE_VAR([ac_tool_prefix]) +st_RESTORE_VAR([ac_link]) +st_RESTORE_VAR([ac_cv_c_decl_report]) +st_RESTORE_VAR([ac_cv_c_compiler_gnu]) +st_RESTORE_VAR([ac_cpp]) +st_RESTORE_VAR([ac_compiler_gnu]) +st_RESTORE_VAR([ac_compile]) +st_RESTORE_VAR([ac_c_werror_flag]) +st_RESTORE_VAR([ac_c_preproc_warn_flag]) +st_RESTORE_VAR([ac_c_decl_warn_flag]) dnl Restore the old definitions dnl -popdef([ac_link])dnl -popdef([ac_compile])dnl -popdef([ac_cpp])dnl +popdef([gl_unknown_warnings_are_errors])dnl +popdef([am_cv_CC_dependencies_compiler_type])dnl +popdef([am_cv_prog_cc_c_o])dnl popdef([ac_cv_host_os])dnl popdef([ac_cv_host_vendor])dnl popdef([ac_cv_host_cpu])dnl @@ -98,6 +124,7 @@ popdef([host_vendor])dnl popdef([host_cpu])dnl popdef([host_alias])dnl popdef([host])dnl +popdef([WARN_CFLAGS])dnl popdef([LDFLAGS])dnl popdef([CPPFLAGS])dnl popdef([CFLAGS])dnl @@ -107,6 +134,10 @@ popdef([ac_objext])dnl popdef([ac_exeext])dnl popdef([ac_cv_objext])dnl popdef([ac_cv_exeext])dnl +popdef([ac_cv_prog_cc_c89])dnl +popdef([ac_cv_prog_cc_c99])dnl +popdef([ac_cv_prog_cc_c11])dnl +popdef([ac_cv_prog_cc_stdc])dnl popdef([ac_cv_prog_cc_g])dnl popdef([ac_cv_prog_cc_cross])dnl popdef([ac_cv_prog_cc_works])dnl @@ -122,4 +153,5 @@ AC_SUBST(BUILD_OBJEXT)dnl AC_SUBST([CFLAGS_FOR_BUILD])dnl AC_SUBST([CPPFLAGS_FOR_BUILD])dnl AC_SUBST([LDFLAGS_FOR_BUILD])dnl +AC_SUBST([WARN_CFLAGS_FOR_BUILD])dnl ]) diff --git a/m4/ax_valgrind_check.m4 b/m4/ax_valgrind_check.m4 new file mode 100644 index 000000000..fa84a35e9 --- /dev/null +++ b/m4/ax_valgrind_check.m4 @@ -0,0 +1,237 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_VALGRIND_DFLT(memcheck|helgrind|drd|sgcheck, on|off) +# AX_VALGRIND_CHECK() +# +# DESCRIPTION +# +# AX_VALGRIND_CHECK checks whether Valgrind is present and, if so, allows +# running `make check` under a variety of Valgrind tools to check for +# memory and threading errors. +# +# Defines VALGRIND_CHECK_RULES which should be substituted in your +# Makefile; and $enable_valgrind which can be used in subsequent configure +# output. VALGRIND_ENABLED is defined and substituted, and corresponds to +# the value of the --enable-valgrind option, which defaults to being +# enabled if Valgrind is installed and disabled otherwise. Individual +# Valgrind tools can be disabled via --disable-valgrind-, the +# default is configurable via the AX_VALGRIND_DFLT command or is to use +# all commands not disabled via AX_VALGRIND_DFLT. All AX_VALGRIND_DFLT +# calls must be made before the call to AX_VALGRIND_CHECK. +# +# If unit tests are written using a shell script and automake's +# LOG_COMPILER system, the $(VALGRIND) variable can be used within the +# shell scripts to enable Valgrind, as described here: +# +# https://www.gnu.org/software/gnulib/manual/html_node/Running-self_002dtests-under-valgrind.html +# +# Usage example: +# +# configure.ac: +# +# AX_VALGRIND_DFLT([sgcheck], [off]) +# AX_VALGRIND_CHECK +# +# Makefile.am: +# +# @VALGRIND_CHECK_RULES@ +# VALGRIND_SUPPRESSIONS_FILES = my-project.supp +# EXTRA_DIST = my-project.supp +# +# This results in a "check-valgrind" rule being added to any Makefile.am +# which includes "@VALGRIND_CHECK_RULES@" (assuming the module has been +# configured with --enable-valgrind). Running `make check-valgrind` in +# that directory will run the module's test suite (`make check`) once for +# each of the available Valgrind tools (out of memcheck, helgrind and drd) +# while the sgcheck will be skipped unless enabled again on the +# commandline with --enable-valgrind-sgcheck. The results for each check +# will be output to test-suite-$toolname.log. The target will succeed if +# there are zero errors and fail otherwise. +# +# Alternatively, a "check-valgrind-$TOOL" rule will be added, for $TOOL in +# memcheck, helgrind, drd and sgcheck. These are useful because often only +# some of those tools can be ran cleanly on a codebase. +# +# The macro supports running with and without libtool. +# +# LICENSE +# +# Copyright (c) 2014, 2015, 2016 Philip Withnall +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 13 +#modified for strace project + +dnl Configured tools +m4_define([valgrind_tool_list], [[memcheck], [helgrind], [drd], [sgcheck]]) +m4_set_add_all([valgrind_exp_tool_set], [sgcheck]) +m4_foreach([vgtool], [valgrind_tool_list], + [m4_define([en_dflt_valgrind_]vgtool, [on])]) + +AC_DEFUN([AX_VALGRIND_DFLT],[ + m4_define([en_dflt_valgrind_$1], [$2]) +])dnl + +AC_DEFUN([AX_VALGRIND_CHECK],[ + dnl Check for --enable-valgrind + AC_ARG_ENABLE([valgrind], + [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests])], + [enable_valgrind=$enableval],[enable_valgrind=]) + + AS_IF([test "$enable_valgrind" != "no"],[ + # Check for Valgrind. + AC_CHECK_PROG([VALGRIND],[valgrind],[valgrind]) + AS_IF([test "$VALGRIND" = ""],[ + AS_IF([test "$enable_valgrind" = "yes"],[ + AC_MSG_ERROR([Could not find valgrind; either install it or reconfigure with --disable-valgrind]) + ],[ + enable_valgrind=no + ]) + ],[ + enable_valgrind=yes + ]) + ]) + + AM_CONDITIONAL([VALGRIND_ENABLED],[test "$enable_valgrind" = "yes"]) + AC_SUBST([VALGRIND_ENABLED],[$enable_valgrind]) + + # Check for Valgrind tools we care about. + [valgrind_enabled_tools=] + m4_foreach([vgtool],[valgrind_tool_list],[ + AC_ARG_ENABLE([valgrind-]vgtool, + m4_if(m4_defn([en_dflt_valgrind_]vgtool),[off],dnl +[AS_HELP_STRING([--enable-valgrind-]vgtool, [Whether to use ]vgtool[ during the Valgrind tests])],dnl +[AS_HELP_STRING([--disable-valgrind-]vgtool, [Whether to skip ]vgtool[ during the Valgrind tests])]), + [enable_valgrind_]vgtool[=$enableval], + [enable_valgrind_]vgtool[=]) + AS_IF([test "$enable_valgrind" = "no"],[ + enable_valgrind_]vgtool[=no], + [test "$enable_valgrind_]vgtool[" ]dnl +m4_if(m4_defn([en_dflt_valgrind_]vgtool), [off], [= "yes"], [!= "no"]),[ + AC_CACHE_CHECK([for Valgrind tool ]vgtool, + [ax_cv_valgrind_tool_]vgtool,[ + ax_cv_valgrind_tool_]vgtool[=no + m4_set_contains([valgrind_exp_tool_set],vgtool, + [m4_define([vgtoolx],[exp-]vgtool)], + [m4_define([vgtoolx],vgtool)]) + AS_IF([`$VALGRIND --tool=]vgtoolx[ --help >/dev/null 2>&1`],[ + ax_cv_valgrind_tool_]vgtool[=yes + ]) + ]) + AS_IF([test "$ax_cv_valgrind_tool_]vgtool[" = "no"],[ + AS_IF([test "$enable_valgrind_]vgtool[" = "yes"],[ + AC_MSG_ERROR([Valgrind does not support ]vgtool[; reconfigure with --disable-valgrind-]vgtool) + ],[ + enable_valgrind_]vgtool[=no + ]) + ],[ + enable_valgrind_]vgtool[=yes + ]) + ]) + AS_IF([test "$enable_valgrind_]vgtool[" = "yes"],[ + valgrind_enabled_tools="$valgrind_enabled_tools ]m4_bpatsubst(vgtool,[^exp-])[" + ]) + AC_SUBST([ENABLE_VALGRIND_]vgtool,[$enable_valgrind_]vgtool) + ]) + AC_SUBST([valgrind_tools],["]m4_join([ ], valgrind_tool_list)["]) + AC_SUBST([valgrind_enabled_tools],[$valgrind_enabled_tools]) + +[VALGRIND_CHECK_RULES=' +# Valgrind check +# +# Optional: +# - VALGRIND_SUPPRESSIONS_FILES: Space-separated list of Valgrind suppressions +# files to load. (Default: empty) +# - VALGRIND_FLAGS: General flags to pass to all Valgrind tools. +# (Default: --num-callers=30) +# - VALGRIND_$toolname_FLAGS: Flags to pass to Valgrind $toolname (one of: +# memcheck, helgrind, drd, sgcheck). (Default: various) + +# Optional variables +VALGRIND_SUPPRESSIONS ?= $(addprefix --suppressions=,$(VALGRIND_SUPPRESSIONS_FILES)) +VALGRIND_FLAGS ?= --num-callers=30 +VALGRIND_memcheck_FLAGS ?= --leak-check=full --show-reachable=no +VALGRIND_helgrind_FLAGS ?= --history-level=approx +VALGRIND_drd_FLAGS ?= +VALGRIND_sgcheck_FLAGS ?= + +# Internal use +valgrind_log_files = $(addprefix test-suite-,$(addsuffix .log,$(valgrind_tools))) + +valgrind_memcheck_flags = --tool=memcheck $(VALGRIND_memcheck_FLAGS) +valgrind_helgrind_flags = --tool=helgrind $(VALGRIND_helgrind_FLAGS) +valgrind_drd_flags = --tool=drd $(VALGRIND_drd_FLAGS) +valgrind_sgcheck_flags = --tool=exp-sgcheck $(VALGRIND_sgcheck_FLAGS) + +valgrind_quiet = $(valgrind_quiet_$(V)) +valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY)) +valgrind_quiet_0 = --quiet +valgrind_v_use = $(valgrind_v_use_$(V)) +valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY)) +valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):; + +# Support running with and without libtool. +ifneq ($(LIBTOOL),) +valgrind_lt = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=execute +else +valgrind_lt = +endif + +# Use recursive makes in order to ignore errors during check +check-valgrind: +ifeq ($(VALGRIND_ENABLED),yes) + -$(A''M_V_at)$(foreach tool,$(valgrind_enabled_tools), \ + $(MAKE) $(AM_MAKEFLAGS) -k check-valgrind-$(tool); \ + ) +else + @echo "Need to reconfigure with --enable-valgrind" +endif + +# Valgrind running +VALGRIND_TESTS_ENVIRONMENT = \ + $(TESTS_ENVIRONMENT) \ + env VALGRIND=$(VALGRIND) \ + G_SLICE=always-malloc,debug-blocks \ + G_DEBUG=fatal-warnings,fatal-criticals,gc-friendly + +VALGRIND_LOG_COMPILER = \ + $(valgrind_lt) \ + $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) + +define valgrind_tool_rule = +check-valgrind-$(1): $$(BUILT_SOURCES) +ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes) + $$(valgrind_v_use)$$(MAKE) $$(AM_MAKEFLAGS) check-am \ + TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \ + LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \ + LOG_FLAGS="$$(valgrind_$(1)_flags)" \ + TEST_SUITE_LOG=test-suite-$(1).log +else ifeq ($$(VALGRIND_ENABLED),yes) + @echo "Need to reconfigure with --enable-valgrind-$(1)" +else + @echo "Need to reconfigure with --enable-valgrind" +endif +endef + +$(foreach tool,$(valgrind_tools),$(eval $(call valgrind_tool_rule,$(tool)))) + +A''M_DISTCHECK_CONFIGURE_FLAGS ?= +A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind + +MOSTLYCLEANFILES ?= +MOSTLYCLEANFILES += $(valgrind_log_files) + +.PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools)) +'] + + AC_SUBST([VALGRIND_CHECK_RULES]) + m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([VALGRIND_CHECK_RULES])]) +]) diff --git a/m4/st_save_restore_var.m4 b/m4/st_save_restore_var.m4 new file mode 100644 index 000000000..2939380a7 --- /dev/null +++ b/m4/st_save_restore_var.m4 @@ -0,0 +1,7 @@ +AC_DEFUN([st_SAVE_VAR], [dnl +AS_IF([test -n "${$1+set}"], [st_saved_$1="${$1}"; unset $1]) +]) + +AC_DEFUN([st_RESTORE_VAR], [dnl +AS_IF([test -n "${st_saved_$1+set}"], [$1="${st_saved_$1}"; unset st_saved_$1]) +]) diff --git a/m4/st_warn_cflags.m4 b/m4/st_warn_cflags.m4 new file mode 100644 index 000000000..04d45442d --- /dev/null +++ b/m4/st_warn_cflags.m4 @@ -0,0 +1,24 @@ +AC_DEFUN([st_WARN_CFLAGS], [dnl +gl_WARN_ADD([-Wall]) +gl_WARN_ADD([-Wempty-body]) +gl_WARN_ADD([-Wformat-security]) +gl_WARN_ADD([-Wignored-qualifiers]) +gl_WARN_ADD([-Winit-self]) +gl_WARN_ADD([-Wlogical-op]) +gl_WARN_ADD([-Wmissing-parameter-type]) +gl_WARN_ADD([-Wnested-externs]) +gl_WARN_ADD([-Wold-style-declaration]) +gl_WARN_ADD([-Wold-style-definition]) +gl_WARN_ADD([-Wsign-compare]) +gl_WARN_ADD([-Wtype-limits]) +gl_WARN_ADD([-Wwrite-strings]) +AC_ARG_ENABLE([gcc-Werror], + [AS_HELP_STRING([--enable-gcc-Werror], [turn on gcc's -Werror option])], + [case $enableval in + yes) gl_WARN_ADD([-Werror]) ;; + no) ;; + *) AC_MSG_ERROR([bad value $enableval for gcc-Werror option]) ;; + esac] +) +AC_SUBST([WARN_CFLAGS]) +]) diff --git a/m4/warnings.m4 b/m4/warnings.m4 index e3d239b64..1917b5b93 100644 --- a/m4/warnings.m4 +++ b/m4/warnings.m4 @@ -1,4 +1,5 @@ # warnings.m4 serial 11 +# modified for strace project dnl Copyright (C) 2008-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -23,8 +24,8 @@ m4_ifdef([AS_VAR_APPEND], # FIXME: gl_Warn must be used unquoted until we can assume Autoconf # 2.64 or newer. AC_DEFUN([gl_COMPILER_OPTION_IF], -[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl -AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl +[AS_VAR_PUSHDEF([gl_Flags], _AC_LANG_PREFIX[]FLAGS)dnl +AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]gl_Flags[]_$1])dnl AS_LITERAL_IF([$1], [m4_pushdef([gl_Positive], m4_bpatsubst([$1], [^-Wno-], [-W]))], [gl_positive="$1" @@ -32,7 +33,7 @@ case $gl_positive in -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;; esac m4_pushdef([gl_Positive], [$gl_positive])])dnl -AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [ +AC_CACHE_CHECK([whether $[]_AC_CC[] handles $1], m4_defn([gl_Warn]), [ gl_save_compiler_FLAGS="$gl_Flags" gl_AS_VAR_APPEND(m4_defn([gl_Flags]), [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["]) @@ -52,9 +53,12 @@ AS_VAR_POPDEF([gl_Warn])dnl # Clang doesn't complain about unknown warning options unless one also # specifies -Wunknown-warning-option -Werror. Detect this. AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS], -[gl_COMPILER_OPTION_IF([-Werror -Wunknown-warning-option], - [gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'], - [gl_unknown_warnings_are_errors=])]) +[AS_IF([test x${gl_unknown_warnings_are_errors+set} = x], + [gl_COMPILER_OPTION_IF([-Werror -Wunknown-warning-option], + [gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'], + [gl_unknown_warnings_are_errors=]) + ]) +]) # gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS], # [PROGRAM = AC_LANG_PROGRAM()]) @@ -64,7 +68,7 @@ AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS], # # If VARIABLE is a variable name, AC_SUBST it. AC_DEFUN([gl_WARN_ADD], -[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS]) +[gl_UNKNOWN_WARNINGS_ARE_ERRORS gl_COMPILER_OPTION_IF([$1], [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])], [], diff --git a/maint/ioctls_gen.sh b/maint/ioctls_gen.sh index 90d7c1f6e..b20a0bd14 100755 --- a/maint/ioctls_gen.sh +++ b/maint/ioctls_gen.sh @@ -50,8 +50,13 @@ esac # Check and canonicalize include-directory and arch-include-directory. abs_inc_dir="$(cd "$inc_dir" && pwd -P)" -[ -z "$arch_dir" ] || +INCLUDES_inc="-I$abs_inc_dir/uapi -I$abs_inc_dir" +abs_arch_dir= +INCLUDES_arch= +[ -z "$arch_dir" ] || { abs_arch_dir="$(cd "$arch_dir" && pwd -P)" + INCLUDES_arch="-I$abs_arch_dir/uapi -I$abs_arch_dir" +} cleanup() { @@ -79,11 +84,18 @@ trap 'cleanup 1' HUP PIPE INT QUIT TERM msg "generated $(grep -c '^{' ioctls_hex.h) hex ioctls from $inc_dir" # Fetch ioctl commands defined in symbolic form. -"$mydir"/ioctls_sym.sh "$inc_dir" > ioctls_sym.h +INCLUDES="$INCLUDES_arch ${INCLUDES-}" \ + "$mydir"/ioctls_sym.sh "$inc_dir" > ioctls_sym.h + +# Move KVM_* constants from ioctls_inc.h to ioctls_arch.h. +grep -F 'linux/kvm.h' < ioctls_sym.h > ioctls_kvm.h ||: +grep -Fv 'linux/kvm.h' < ioctls_sym.h > ioctls_unkvm.h +mv ioctls_unkvm.h ioctls_sym.h # Part of android ioctl commands are defined elsewhere. android_dir="$inc_dir/../drivers/staging/android" if [ -d "$android_dir/uapi" ]; then + INCLUDES="$INCLUDES_inc $INCLUDES_arch ${INCLUDES-}" \ "$mydir"/ioctls_sym.sh "$android_dir" staging/android >> ioctls_sym.h fi msg "generated $(grep -c '^{' ioctls_sym.h) symbolic ioctls from $inc_dir" @@ -104,11 +116,11 @@ msg "generated $(grep -c '^{' ioctls_inc.h) ioctls from $inc_dir" msg "generated $(grep -c '^{' ioctls_hex.h) hex ioctls from $arch_dir" # Fetch ioctl commands defined in symbolic form. -INCLUDES="-I$abs_inc_dir/uapi -I$abs_inc_dir ${INCLUDES-}" \ - "${0%/*}"/ioctls_sym.sh "$arch_dir" > ioctls_sym.h +INCLUDES="$INCLUDES_inc ${INCLUDES-}" \ + "$mydir"/ioctls_sym.sh "$arch_dir" > ioctls_sym.h msg "generated $(grep -c '^{' ioctls_sym.h) symbolic ioctls from $arch_dir" # Output all ioctl definitions fetched from arch-include-directory. echo "/* Generated by $me from definitions found in ${arch_dir%%/}/ tree. */" > ioctls_arch.h -LC_COLLATE=C sort -u ioctls_hex.h ioctls_sym.h >> ioctls_arch.h +LC_COLLATE=C sort -u ioctls_hex.h ioctls_kvm.h ioctls_sym.h >> ioctls_arch.h msg "generated $(grep -c '^{' ioctls_arch.h) ioctls from $arch_dir" diff --git a/maint/ioctls_sym.sh b/maint/ioctls_sym.sh index 7a673393b..14d53c662 100755 --- a/maint/ioctls_sym.sh +++ b/maint/ioctls_sym.sh @@ -36,6 +36,7 @@ r_io='\([A-Z]\+\)\?_S\?\(IO\|IOW\|IOR\|IOWR\|IOC\)' r_value='[[:space:]]\+'"$r_io"'[[:space:]]*([^)]' regexp="${r_define}${r_cmd_name}${r_value}" +uname_m="$(uname -m)" me="${0##*/}" msg() { @@ -166,11 +167,17 @@ return 0; } __EOF__ - # Soft workarounds for some processed files. Fragile. + # Soft pre-include workarounds for some processed files. Fragile. case "$f" in + *asm/amigayle.h) + return 0 # false positive + ;; *asm/cmb.h) echo '#include ' ;; + *asm/core_*.h) + return 0 # false positives + ;; *asm/ioctls.h) cat <<'__EOF__' #include @@ -224,11 +231,7 @@ __EOF__ __EOF__ ;; *linux/if_pppox.h) - cat <<'__EOF__' -#include -#include -#include -__EOF__ + echo '#include ' ;; *linux/if_tun.h|*linux/ppp-ioctl.h) echo '#include ' @@ -243,36 +246,10 @@ __EOF__ echo '#include ' ;; *linux/kvm.h) - cat <<'__EOF__' -#if !(defined __powerpc__) -struct kvm_allocate_rma { __u32 unused[2]; }; -struct kvm_create_spapr_tce { __u32 unused[3]; }; -struct kvm_create_spapr_tce_64 { __u32 unused[8]; }; -struct kvm_get_htab_fd { __u32 unused[8]; }; -struct kvm_rtas_token_args { __u8 unused[128]; }; -#endif - -#if !(defined __arm64__ || defined __arm__) -struct kvm_vcpu_init { __u32 unused[8]; }; -#endif - -#if !(defined __x86_64__ || defined __i386__) -struct kvm_cpuid { __u32 unused[2]; }; -struct kvm_cpuid2 { __u32 unused[2]; }; -struct kvm_debugregs { __u32 unused[32]; }; -struct kvm_lapic_state { __u32 unused[256]; }; -struct kvm_memory_alias { __u32 unused[8]; }; -struct kvm_msr_list { __u32 unused[1]; }; -struct kvm_msrs { __u32 unused[2]; }; -struct kvm_pit_state { __u32 unused[18]; }; -struct kvm_pit_state2 { __u32 unused[28]; }; -struct kvm_vcpu_events { __u32 unused[16]; }; -struct kvm_x86_mce { __u32 unused[16]; }; -struct kvm_xcrs { __u32 unused[98]; }; -struct kvm_xen_hvm_config { __u32 unused[14]; }; -struct kvm_xsave { __u32 unused[1024]; }; -#endif -__EOF__ + case "$uname_m" in + i?86|x86_64|arm*|ppc*|s390*) ;; + *) return 0 ;; # not applicable + esac ;; *linux/sonet.h) echo '#include ' @@ -343,6 +320,14 @@ __EOF__ mkdir -p "$tmpdir/${f%/*}" # Hard workarounds for some processed files. Very fragile. case "$f" in + *asm-generic/ioctls.h) + # Filter out macros defined using unavailable types. + case "$uname_m" in + alpha*|ppc*) + grep -Fv 'struct termios2' < "$s" > "$tmpdir/$f" + ;; + esac + ;; *acpi/*|*linux/i2o.h|*media*/exynos-fimc.h|*media/v4l2-subdev.h|*net/bluetooth/*|net/nfc/nci_core.h) # Fetch macros only. grep "${r_define}${r_cmd_name}" < "$s" > "$tmpdir/$f" @@ -371,6 +356,10 @@ s/^\([[:space:]]\+[^),]\+)\),$/\1/' >> "$tmpdir/$f" # Filter out the code that references unknown types. sed '/^struct via_file_private/,/^}/d' < "$s" > "$tmpdir/$f" ;; + *linux/nilfs2_fs.h) + # Create the file it attempts to include. + touch "$tmpdir/asm/bug.h" + ;; *linux/vmw_vmci_defs.h) # Fetch ioctl macros only. grep "${r_define}I" < "$s" > "$tmpdir/$f" @@ -379,10 +368,6 @@ s/^\([[:space:]]\+[^),]\+)\),$/\1/' >> "$tmpdir/$f" # Fetch one piece of code containing ioctls definitions. sed -n '/ remaining ioctls/,/ ---/p' < "$s" > "$tmpdir/$f" ;; - *linux/nilfs2_fs.h) - # Create the file it attempts to include. - touch "$tmpdir/asm/bug.h" - ;; openpromio.h|*/openpromio.h|fbio.h|*/fbio.h) # Create the file it attempts to include. mkdir -p "$tmpdir/linux" @@ -397,6 +382,22 @@ s/^\([[:space:]]\+[^),]\+)\),$/\1/' >> "$tmpdir/$f" # and the result of preprocessing. $CPP $CPPFLAGS -dD $INCLUDES < "$tmpdir"/header.in > "$tmpdir"/header.out + # Soft post-preprocess workarounds. Fragile. + case "$f" in + *linux/kvm.h) + arm_list='KVM_ARM_PREFERRED_TARGET|KVM_ARM_VCPU_INIT' + ppc_list='KVM_ALLOCATE_RMA|KVM_CREATE_SPAPR_TCE|KVM_CREATE_SPAPR_TCE_64|KVM_PPC_GET_HTAB_FD|KVM_PPC_RTAS_DEFINE_TOKEN' + x86_list='KVM_GET_CPUID2|KVM_GET_DEBUGREGS|KVM_GET_EMULATED_CPUID|KVM_GET_LAPIC|KVM_GET_MSRS|KVM_GET_MSR_INDEX_LIST|KVM_GET_PIT|KVM_GET_PIT2|KVM_GET_SUPPORTED_CPUID|KVM_GET_VCPU_EVENTS|KVM_GET_XCRS|KVM_GET_XSAVE|KVM_SET_CPUID|KVM_SET_CPUID2|KVM_SET_DEBUGREGS|KVM_SET_LAPIC|KVM_SET_MEMORY_ALIAS|KVM_SET_MSRS|KVM_SET_PIT|KVM_SET_PIT2|KVM_SET_VCPU_EVENTS|KVM_SET_XCRS|KVM_SET_XSAVE|KVM_X86_SET_MCE|KVM_XEN_HVM_CONFIG' + case "$uname_m" in + arm*) list="$ppc_list|$x86_list" ;; + ppc*) list="$arm_list|$x86_list" ;; + i?86|x86_64*) list="$arm_list|$ppc_list" ;; + *) list="$arm_list|$ppc_list|$x86_list" ;; + esac + sed -r -i "/[[:space:]]($list)[[:space:]]/d" "$tmpdir"/header.out + ;; + esac + # Need to exclude ioctl commands defined elsewhere. local_defines='^[[:space:]]*#[[:space:]]*define[[:space:]]\+\('"$r_cmd_name"'\)[[:space:]]' sed -n 's/'"$local_defines"'.*/\1\\/p' "$s" > "$tmpdir"/local_names diff --git a/make-dist b/make-dist deleted file mode 100755 index 9accae760..000000000 --- a/make-dist +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -e - -tag="${1:-master}" - -j=-j`getconf _NPROCESSORS_ONLN 2> /dev/null` || j= - -distdir=strace-dist-$$ -abs_distdir="`pwd`/$distdir" -trap 'chmod -Rf u+w $abs_distdir; rm -rf $abs_distdir' 1 2 15 0 - -set -x -git clone -q -n -s .git "$distdir" - -cd $distdir -git checkout -f "$tag" - -./git-set-file-times - -./bootstrap - -./configure --enable-maintainer-mode - -make -s $j distcheck - -if git describe --exact-match --match='v*' >/dev/null; then - make -s $j news-check -else - echo 'SKIP: make news-check' -fi - -./make-dsc strace-*.tar.gz > ../strace.dsc - -cat strace.spec > ../strace.spec - -mv -f strace-*.tar.[gx]z .. diff --git a/make-dsc b/make-dsc deleted file mode 100755 index f0e958ad6..000000000 --- a/make-dsc +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -e - -exec < /dev/null - -cat <<__EOF__ -Format: 1.0 -$(sed '/^Source:[[:space:]]*/!d;q' debian/control) -Binary: $(sed '/^Package:[[:space:]]*/!d;s///' debian/control | - tr '\n' ' ' | sed 's/ ./,&/g') -$(sed '/^Architecture:[[:space:]]*/!d;q' debian/control) -Version: $(sed -r -n '1s/^[^(]*\(([^)]+)\).*/\1/p' debian/changelog) -$(sed '/^Maintainer:[[:space:]]*/!d;q' debian/control) -$(sed '/^Homepage:[[:space:]]*/!d;q' debian/control) -$(sed '/^Standards-Version:[[:space:]]*/!d;q' debian/control) -$(sed '/^Build-Depends:[[:space:]]*/!d;q' debian/control) -Package-List: - strace deb $( - sed '/^Section:[[:space:]]*/!d;s///;q' debian/control) $( - sed '/^Priority:[[:space:]]*/!d;s///;q' debian/control) arch=$( - sed -n "/^Package:[[:space:]]*strace\$/,/^\$/p" debian/control | - sed -e '/^Architecture:[[:space:]]*/!d;s///' -e 's/ /,/g') - strace64 deb $(sed '/^Section:[[:space:]]*/!d;s///;q' debian/control) $( - sed -n "/^Package:[[:space:]]*strace64\$/,/^\$/p" debian/control | - sed '/^Priority:[[:space:]]*/!d;s///;q') arch=$( - sed -n "/^Package:[[:space:]]*strace64\$/,/^\$/p" debian/control | - sed -e '/^Architecture:[[:space:]]*/!d;s///' -e 's/ /,/g') - strace-udeb udeb $( - sed -n "/^Package:[[:space:]]*strace-udeb\$/,/^\$/p" debian/control | - sed '/^Section:[[:space:]]*/!d;s///;q') $( - sed -n "/^Package:[[:space:]]*strace-udeb\$/,/^\$/p" debian/control | - sed '/^Priority:[[:space:]]*/!d;s///;q') arch=$( - sed -n "/^Package:[[:space:]]*strace-udeb\$/,/^\$/p" debian/control | - sed -e '/^Architecture:[[:space:]]*/!d;s///' -e 's/ /,/g') -Checksums-Sha1: -$(for f; do echo " $( - sha1sum -- "$f" | sed 's/ .*//') $( - stat -c %s -- "$f") $( - echo $f | sed 's/-/_/;s/\.tar/.orig&/')"; done) -Checksums-Sha256: -$(for f; do echo " $( - sha256sum -- "$f" | sed 's/ .*//') $( - stat -c %s -- "$f") $( - echo $f | sed 's/-/_/;s/\.tar/.orig&/')"; done) -Files: -$(for f; do echo " $( - md5sum -- "$f" | sed 's/ .*//') $( - stat -c %s -- "$f") $( - echo $f | sed 's/-/_/;s/\.tar/.orig&/')"; done) -__EOF__ diff --git a/mem.c b/mem.c index affc9355c..40ed707af 100644 --- a/mem.c +++ b/mem.c @@ -55,23 +55,23 @@ SYS_FUNC(brk) #include "xlat/mmap_flags.h" static void -print_mmap(struct tcb *tcp, long *u_arg, unsigned long long offset) +print_mmap(struct tcb *tcp, kernel_ulong_t *u_arg, unsigned long long offset) { - const unsigned long addr = u_arg[0]; - const unsigned long len = u_arg[1]; - const unsigned long prot = u_arg[2]; - const unsigned long flags = u_arg[3]; + const kernel_ulong_t addr = u_arg[0]; + const kernel_ulong_t len = u_arg[1]; + const kernel_ulong_t prot = u_arg[2]; + const kernel_ulong_t flags = u_arg[3]; const int fd = u_arg[4]; printaddr(addr); - tprintf(", %lu, ", len); - printflags_long(mmap_prot, prot, "PROT_???"); + tprintf(", %" PRI_klu ", ", len); + printflags64(mmap_prot, prot, "PROT_???"); tprints(", "); #ifdef MAP_TYPE - printxval_long(mmap_flags, flags & MAP_TYPE, "MAP_???"); + printxval64(mmap_flags, flags & MAP_TYPE, "MAP_???"); addflags(mmap_flags, flags & ~MAP_TYPE); #else - printflags_long(mmap_flags, flags, "MAP_???"); + printflags64(mmap_flags, flags, "MAP_???"); #endif tprints(", "); printfd(tcp, fd); @@ -93,8 +93,8 @@ print_mmap(struct tcb *tcp, long *u_arg, unsigned long long offset) /* Params are pointed to by u_arg[0], offset is in bytes */ SYS_FUNC(old_mmap) { - long u_arg[6]; -# if defined AARCH64 || defined X86_64 + kernel_ulong_t u_arg[6]; +# if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG /* We are here only in a 32-bit personality. */ unsigned int narrow_arg[6]; if (umove_or_printaddr(tcp, tcp->u_arg[0], &narrow_arg)) @@ -106,47 +106,41 @@ SYS_FUNC(old_mmap) if (umove_or_printaddr(tcp, tcp->u_arg[0], &u_arg)) return RVAL_DECODED | RVAL_HEX; # endif - print_mmap(tcp, u_arg, (unsigned long) u_arg[5]); + print_mmap(tcp, u_arg, u_arg[5]); return RVAL_DECODED | RVAL_HEX; } #endif /* old_mmap architectures */ -#if defined(S390) +#ifdef S390 /* Params are pointed to by u_arg[0], offset is in pages */ SYS_FUNC(old_mmap_pgoff) { - long u_arg[5]; + kernel_ulong_t u_arg[5]; int i; - unsigned narrow_arg[6]; + unsigned int narrow_arg[6]; unsigned long long offset; - if (umoven(tcp, tcp->u_arg[0], sizeof(narrow_arg), narrow_arg) == -1) - return 0; + if (umove_or_printaddr(tcp, tcp->u_arg[0], &narrow_arg)) + return RVAL_DECODED | RVAL_HEX; for (i = 0; i < 5; i++) - u_arg[i] = (unsigned long) narrow_arg[i]; + u_arg[i] = narrow_arg[i]; offset = narrow_arg[5]; offset *= get_pagesize(); print_mmap(tcp, u_arg, offset); return RVAL_DECODED | RVAL_HEX; } -#endif +#endif /* S390 */ /* Params are passed directly, offset is in bytes */ SYS_FUNC(mmap) { - unsigned long long offset = -#if HAVE_STRUCT_TCB_EXT_ARG - tcp->ext_arg[5]; /* try test/x32_mmap.c */ -#else - (unsigned long) tcp->u_arg[5]; -#endif /* Example of kernel-side handling of this variety of mmap: * arch/x86/kernel/sys_x86_64.c::SYSCALL_DEFINE6(mmap, ...) calls * sys_mmap_pgoff(..., off >> PAGE_SHIFT); i.e. off is in bytes, * since the above code converts off to pages. */ - print_mmap(tcp, tcp->u_arg, offset); + print_mmap(tcp, tcp->u_arg, tcp->u_arg[5]); return RVAL_DECODED | RVAL_HEX; } @@ -156,7 +150,7 @@ SYS_FUNC(mmap_pgoff) { /* Try test/mmap_offset_decode.c */ unsigned long long offset; - offset = (unsigned long) tcp->u_arg[5]; + offset = tcp->u_arg[5]; offset *= get_pagesize(); print_mmap(tcp, tcp->u_arg, offset); @@ -167,7 +161,7 @@ SYS_FUNC(mmap_pgoff) SYS_FUNC(mmap_4koff) { unsigned long long offset; - offset = (unsigned long) tcp->u_arg[5]; + offset = tcp->u_arg[5]; offset <<= 12; print_mmap(tcp, tcp->u_arg, offset); @@ -177,27 +171,41 @@ SYS_FUNC(mmap_4koff) SYS_FUNC(munmap) { printaddr(tcp->u_arg[0]); - tprintf(", %lu", tcp->u_arg[1]); + tprintf(", %" PRI_klu, tcp->u_arg[1]); return RVAL_DECODED; } -SYS_FUNC(mprotect) +static int +do_mprotect(struct tcb *tcp, bool has_pkey) { printaddr(tcp->u_arg[0]); - tprintf(", %lu, ", tcp->u_arg[1]); - printflags_long(mmap_prot, tcp->u_arg[2], "PROT_???"); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); + printflags64(mmap_prot, tcp->u_arg[2], "PROT_???"); + + if (has_pkey) + tprintf(", %d", (int) tcp->u_arg[3]); return RVAL_DECODED; } +SYS_FUNC(mprotect) +{ + return do_mprotect(tcp, false); +} + +SYS_FUNC(pkey_mprotect) +{ + return do_mprotect(tcp, true); +} + #include "xlat/mremap_flags.h" SYS_FUNC(mremap) { printaddr(tcp->u_arg[0]); - tprintf(", %lu, %lu, ", tcp->u_arg[1], tcp->u_arg[2]); - printflags_long(mremap_flags, tcp->u_arg[3], "MREMAP_???"); + tprintf(", %" PRI_klu ", %" PRI_klu ", ", tcp->u_arg[1], tcp->u_arg[2]); + printflags64(mremap_flags, tcp->u_arg[3], "MREMAP_???"); #ifdef MREMAP_FIXED if ((tcp->u_arg[3] & (MREMAP_MAYMOVE | MREMAP_FIXED)) == (MREMAP_MAYMOVE | MREMAP_FIXED)) { @@ -213,7 +221,7 @@ SYS_FUNC(mremap) SYS_FUNC(madvise) { printaddr(tcp->u_arg[0]); - tprintf(", %lu, ", tcp->u_arg[1]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); printxval(madvise_cmds, tcp->u_arg[2], "MADV_???"); return RVAL_DECODED; @@ -235,7 +243,7 @@ SYS_FUNC(msync) /* addr */ printaddr(tcp->u_arg[0]); /* len */ - tprintf(", %lu, ", tcp->u_arg[1]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); /* flags */ printflags(mctl_sync, tcp->u_arg[2], "MS_???"); @@ -247,7 +255,7 @@ SYS_FUNC(msync) SYS_FUNC(mlock2) { printaddr(tcp->u_arg[0]); - tprintf(", %lu, ", tcp->u_arg[1]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); printflags(mlock_flags, tcp->u_arg[2], "MLOCK_???"); return RVAL_DECODED; @@ -257,7 +265,7 @@ SYS_FUNC(mincore) { if (entering(tcp)) { printaddr(tcp->u_arg[0]); - tprintf(", %lu, ", tcp->u_arg[1]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); } else { const unsigned long page_size = get_pagesize(); const unsigned long page_mask = page_size - 1; @@ -273,6 +281,8 @@ SYS_FUNC(mincore) unsigned long i; tprints("["); for (i = 0; i < len; i++) { + if (i) + tprints(", "); if (abbrev(tcp) && i >= max_strlen) { tprints("..."); break; @@ -296,21 +306,21 @@ SYS_FUNC(getpagesize) SYS_FUNC(remap_file_pages) { - const unsigned long addr = tcp->u_arg[0]; - const unsigned long size = tcp->u_arg[1]; - const unsigned long prot = tcp->u_arg[2]; - const unsigned long pgoff = tcp->u_arg[3]; - const unsigned long flags = tcp->u_arg[4]; + const kernel_ulong_t addr = tcp->u_arg[0]; + const kernel_ulong_t size = tcp->u_arg[1]; + const kernel_ulong_t prot = tcp->u_arg[2]; + const kernel_ulong_t pgoff = tcp->u_arg[3]; + const kernel_ulong_t flags = tcp->u_arg[4]; printaddr(addr); - tprintf(", %lu, ", size); - printflags_long(mmap_prot, prot, "PROT_???"); - tprintf(", %lu, ", pgoff); + tprintf(", %" PRI_klu ", ", size); + printflags64(mmap_prot, prot, "PROT_???"); + tprintf(", %" PRI_klu ", ", pgoff); #ifdef MAP_TYPE - printxval_long(mmap_flags, flags & MAP_TYPE, "MAP_???"); + printxval64(mmap_flags, flags & MAP_TYPE, "MAP_???"); addflags(mmap_flags, flags & ~MAP_TYPE); #else - printflags_long(mmap_flags, flags, "MAP_???"); + printflags64(mmap_flags, flags, "MAP_???"); #endif return RVAL_DECODED; @@ -327,13 +337,13 @@ print_protmap_entry(struct tcb *tcp, void *elem_buf, size_t elem_size, void *dat SYS_FUNC(subpage_prot) { - unsigned long addr = tcp->u_arg[0]; - unsigned long len = tcp->u_arg[1]; - unsigned long nmemb = len >> 16; - unsigned long map = tcp->u_arg[2]; + kernel_ulong_t addr = tcp->u_arg[0]; + kernel_ulong_t len = tcp->u_arg[1]; + kernel_ulong_t nmemb = len >> 16; + kernel_ulong_t map = tcp->u_arg[2]; printaddr(addr); - tprintf(", %lu, ", len); + tprintf(", %" PRI_klu ", ", len); unsigned int entry; print_array(tcp, map, nmemb, &entry, sizeof(entry), diff --git a/membarrier.c b/membarrier.c index 3bc57648c..759b76f37 100644 --- a/membarrier.c +++ b/membarrier.c @@ -44,6 +44,6 @@ SYS_FUNC(membarrier) return 0; tcp->auxstr = sprintflags("", membarrier_cmds, - (unsigned long) tcp->u_rval); + (kernel_ulong_t) tcp->u_rval); return RVAL_HEX | RVAL_STR; } diff --git a/memfd_create.c b/memfd_create.c index 7c1407724..0101f061b 100644 --- a/memfd_create.c +++ b/memfd_create.c @@ -31,7 +31,7 @@ SYS_FUNC(memfd_create) { - printstr(tcp, tcp->u_arg[0], -1); + printstr(tcp, tcp->u_arg[0]); tprints(", "); printflags(memfd_create_flags, tcp->u_arg[1], "MFD_???"); diff --git a/missing b/missing new file mode 100755 index 000000000..db98974ff --- /dev/null +++ b/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2013-10-28.13; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/mknod.c b/mknod.c index 9b9031163..3edcd8480 100644 --- a/mknod.c +++ b/mknod.c @@ -35,7 +35,6 @@ #include #include -#include static void decode_mknod(struct tcb *tcp, int offset) @@ -50,7 +49,8 @@ decode_mknod(struct tcb *tcp, int offset) case S_IFCHR: case S_IFBLK: dev = tcp->u_arg[offset + 2]; - tprintf(", makedev(%u, %u)", major(dev), minor(dev)); + tprints(", "); + print_dev_t(dev); break; } } diff --git a/mmsghdr.c b/mmsghdr.c index 93e38897d..c9e6cf0b1 100644 --- a/mmsghdr.c +++ b/mmsghdr.c @@ -33,7 +33,8 @@ #include static int -fetch_struct_mmsghdr_or_printaddr(struct tcb *tcp, const long addr, +fetch_struct_mmsghdr_or_printaddr(struct tcb *const tcp, + const kernel_ulong_t addr, const unsigned int len, void *const mh) { if ((entering(tcp) || !syserror(tcp)) @@ -67,7 +68,7 @@ print_struct_mmsghdr(struct tcb *tcp, void *elem_buf, tprints("{msg_hdr="); print_struct_msghdr(tcp, &mmsg->msg_hdr, c->p_user_msg_namelen, - c->use_msg_len ? mmsg->msg_len : -1UL); + c->use_msg_len ? mmsg->msg_len : (kernel_ulong_t) -1); if (c->msg_len_vlen) { tprintf(", msg_len=%u", mmsg->msg_len); --c->msg_len_vlen; @@ -97,7 +98,7 @@ struct mmsgvec_data { }; static void -save_mmsgvec_namelen(struct tcb *tcp, unsigned long addr, +save_mmsgvec_namelen(struct tcb *const tcp, kernel_ulong_t addr, unsigned int len, const char *const timeout) { if (len > IOV_MAX) @@ -124,7 +125,7 @@ save_mmsgvec_namelen(struct tcb *tcp, unsigned long addr, } static void -decode_mmsgvec(struct tcb *tcp, const unsigned long addr, +decode_mmsgvec(struct tcb *const tcp, const kernel_ulong_t addr, const unsigned int vlen, const unsigned int msg_len_vlen, const bool use_msg_len) { @@ -148,7 +149,7 @@ decode_mmsgvec(struct tcb *tcp, const unsigned long addr, } void -dumpiov_in_mmsghdr(struct tcb *tcp, long addr) +dumpiov_in_mmsghdr(struct tcb *const tcp, kernel_ulong_t addr) { unsigned int len = tcp->u_rval; unsigned int i, fetched; @@ -158,10 +159,11 @@ dumpiov_in_mmsghdr(struct tcb *tcp, long addr) fetched = fetch_struct_mmsghdr(tcp, addr, &mmsg); if (!fetched) break; - tprintf(" = %lu buffers in vector %u\n", - (unsigned long) mmsg.msg_hdr.msg_iovlen, i); + tprintf(" = %" PRI_klu " buffers in vector %u\n", + (kernel_ulong_t) mmsg.msg_hdr.msg_iovlen, i); dumpiov_upto(tcp, mmsg.msg_hdr.msg_iovlen, - (long) mmsg.msg_hdr.msg_iov, mmsg.msg_len); + ptr_to_kulong(mmsg.msg_hdr.msg_iov), + mmsg.msg_len); } } diff --git a/mount.c b/mount.c index 1ae445dc6..997452cc7 100644 --- a/mount.c +++ b/mount.c @@ -42,7 +42,7 @@ SYS_FUNC(mount) bool ignore_type = false; bool ignore_data = false; bool old_magic = false; - unsigned long flags = tcp->u_arg[3]; + kernel_ulong_t flags = tcp->u_arg[3]; /* Discard magic */ if ((flags & MS_MGC_MSK) == MS_MGC_VAL) { @@ -65,7 +65,7 @@ SYS_FUNC(mount) if (ignore_type) printaddr(tcp->u_arg[2]); else - printstr(tcp, tcp->u_arg[2], -1); + printstr(tcp, tcp->u_arg[2]); tprints(", "); if (old_magic) { @@ -74,13 +74,13 @@ SYS_FUNC(mount) tprints("|"); } if (flags || !old_magic) - printflags_long(mount_flags, flags, "MS_???"); + printflags64(mount_flags, flags, "MS_???"); tprints(", "); if (ignore_data) printaddr(tcp->u_arg[4]); else - printstr(tcp, tcp->u_arg[4], -1); + printstr(tcp, tcp->u_arg[4]); return RVAL_DECODED; } diff --git a/linux/mips/.gitignore b/mpers-m32.stamp similarity index 100% rename from linux/mips/.gitignore rename to mpers-m32.stamp diff --git a/mpers-m32/kernel_dirent.c b/mpers-m32/kernel_dirent.c new file mode 100644 index 000000000..77ca7e677 --- /dev/null +++ b/mpers-m32/kernel_dirent.c @@ -0,0 +1,35 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +kernel_dirent mpers_target_var; diff --git a/mpers-m32/kernel_dirent.d1 b/mpers-m32/kernel_dirent.d1 new file mode 100644 index 000000000..d8b207dec --- /dev/null +++ b/mpers-m32/kernel_dirent.d1 @@ -0,0 +1,207 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1a8 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xa2): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x183): mpers-m32/kernel_dirent.c + <15> DW_AT_comp_dir : (indirect string, offset: 0xea): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1b5): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x179): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x165): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x64): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x6): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x121): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x44): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1ac): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x72): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x15c): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x13c): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_array_type) + <7d> DW_AT_type : <0x6a> + <81> DW_AT_sibling : <0x8c> + <2><85>: Abbrev Number: 7 (DW_TAG_subrange_type) + <86> DW_AT_type : <0x63> + <8a> DW_AT_upper_bound : 0 + <2><8b>: Abbrev Number: 0 + <1><8c>: Abbrev Number: 8 (DW_TAG_typedef) + <8d> DW_AT_name : (indirect string, offset: 0x141): __kernel_ulong_t + <91> DW_AT_decl_file : 1 + <92> DW_AT_decl_line : 15 + <93> DW_AT_type : <0x5c> + <1><97>: Abbrev Number: 8 (DW_TAG_typedef) + <98> DW_AT_name : (indirect string, offset: 0x19d): kernel_ulong_t + <9c> DW_AT_decl_file : 2 + <9d> DW_AT_decl_line : 36 + <9e> DW_AT_type : <0x8c> + <1>: Abbrev Number: 9 (DW_TAG_structure_type) + DW_AT_byte_size : 12 + DW_AT_decl_file : 2 + DW_AT_decl_line : 50 + DW_AT_sibling : <0xe3> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x173): d_ino + DW_AT_decl_file : 2 + DW_AT_decl_line : 51 + DW_AT_type : <0x97> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x11b): d_off + DW_AT_decl_file : 2 + DW_AT_decl_line : 52 + DW_AT_type : <0x97> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x5b): d_reclen + DW_AT_decl_file : 2 + DW_AT_decl_line : 53 + DW_AT_type : <0x40> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x22): d_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 54 + DW_AT_type : <0x7c> + DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 8 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1c1): kernel_dirent + DW_AT_decl_file : 2 + DW_AT_decl_line : 55 + DW_AT_type : <0xa2> + <1>: Abbrev Number: 11 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x84): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x141> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x9c): nargs + DW_AT_decl_file : 3 + <100> DW_AT_decl_line : 5 + <101> DW_AT_type : <0x47> + <105> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><108>: Abbrev Number: 10 (DW_TAG_member) + <109> DW_AT_name : (indirect string, offset: 0x3a): sys_flags + <10d> DW_AT_decl_file : 3 + <10e> DW_AT_decl_line : 6 + <10f> DW_AT_type : <0x2b> + <113> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><116>: Abbrev Number: 12 (DW_TAG_member) + <117> DW_AT_name : sen + <11b> DW_AT_decl_file : 3 + <11c> DW_AT_decl_line : 7 + <11d> DW_AT_type : <0x2b> + <121> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><124>: Abbrev Number: 10 (DW_TAG_member) + <125> DW_AT_name : (indirect string, offset: 0x1cf): sys_func + <129> DW_AT_decl_file : 3 + <12a> DW_AT_decl_line : 8 + <12b> DW_AT_type : <0x14c> + <12f> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><132>: Abbrev Number: 10 (DW_TAG_member) + <133> DW_AT_name : (indirect string, offset: 0x19): sys_name + <137> DW_AT_decl_file : 3 + <138> DW_AT_decl_line : 9 + <139> DW_AT_type : <0x71> + <13d> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><140>: Abbrev Number: 0 + <1><141>: Abbrev Number: 13 (DW_TAG_subroutine_type) + <142> DW_AT_type : <0x2b> + <146> DW_AT_sibling : <0x14c> + <2><14a>: Abbrev Number: 14 (DW_TAG_unspecified_parameters) + <2><14b>: Abbrev Number: 0 + <1><14c>: Abbrev Number: 4 (DW_TAG_pointer_type) + <14d> DW_AT_byte_size : 4 + <14e> DW_AT_type : <0x141> + <1><152>: Abbrev Number: 8 (DW_TAG_typedef) + <153> DW_AT_name : (indirect string, offset: 0x12e): struct_sysent + <157> DW_AT_decl_file : 3 + <158> DW_AT_decl_line : 10 + <159> DW_AT_type : <0xee> + <1><15d>: Abbrev Number: 4 (DW_TAG_pointer_type) + <15e> DW_AT_byte_size : 4 + <15f> DW_AT_type : <0x163> + <1><163>: Abbrev Number: 5 (DW_TAG_const_type) + <164> DW_AT_type : <0x152> + <1><168>: Abbrev Number: 2 (DW_TAG_base_type) + <169> DW_AT_byte_size : 1 + <16a> DW_AT_encoding : 2 (boolean) + <16b> DW_AT_name : (indirect string, offset: 0x0): _Bool + <1><16f>: Abbrev Number: 15 (DW_TAG_variable) + <170> DW_AT_name : (indirect string, offset: 0x8b): current_wordsize + <174> DW_AT_decl_file : 4 + <175> DW_AT_decl_line : 757 + <177> DW_AT_type : <0x47> + <17b> DW_AT_external : 1 + <17c> DW_AT_declaration : 1 + <1><17d>: Abbrev Number: 15 (DW_TAG_variable) + <17e> DW_AT_name : (indirect string, offset: 0x84): sysent + <182> DW_AT_decl_file : 4 + <183> DW_AT_decl_line : 892 + <185> DW_AT_type : <0x15d> + <189> DW_AT_external : 1 + <18a> DW_AT_declaration : 1 + <1><18b>: Abbrev Number: 15 (DW_TAG_variable) + <18c> DW_AT_name : (indirect string, offset: 0x152): nsyscalls + <190> DW_AT_decl_file : 4 + <191> DW_AT_decl_line : 903 + <193> DW_AT_type : <0x47> + <197> DW_AT_external : 1 + <198> DW_AT_declaration : 1 + <1><199>: Abbrev Number: 16 (DW_TAG_variable) + <19a> DW_AT_name : (indirect string, offset: 0x29): mpers_target_var + <19e> DW_AT_decl_file : 5 + <19f> DW_AT_decl_line : 35 + <1a0> DW_AT_type : <0xe3> + <1a4> DW_AT_external : 1 + <1a5> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><1ab>: Abbrev Number: 0 + diff --git a/mpers-m32/kernel_dirent.d2 b/mpers-m32/kernel_dirent.d2 new file mode 100644 index 000000000..2e4efc949 --- /dev/null +++ b/mpers-m32/kernel_dirent.d2 @@ -0,0 +1,229 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1b5): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x179): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x165): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x64): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x6): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x121): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x44): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1ac): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x72): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x15c): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x13c): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x8c> +<2><85> +Abbrev Number: 7 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 0 +<1><8c> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x141): __kernel_ulong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 15 +DW_AT_type : <0x5c> +<1><97> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x19d): kernel_ulong_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 36 +DW_AT_type : <0x8c> +<1> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_byte_size : 12 +DW_AT_decl_file : 2 +DW_AT_decl_line : 50 +DW_AT_sibling : <0xe3> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x173): d_ino +DW_AT_decl_file : 2 +DW_AT_decl_line : 51 +DW_AT_type : <0x97> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11b): d_off +DW_AT_decl_file : 2 +DW_AT_decl_line : 52 +DW_AT_type : <0x97> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5b): d_reclen +DW_AT_decl_file : 2 +DW_AT_decl_line : 53 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22): d_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 54 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<1> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1c1): kernel_dirent +DW_AT_decl_file : 2 +DW_AT_decl_line : 55 +DW_AT_type : <0xa2> +<1> +Abbrev Number: 11 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x84): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x141> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9c): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><108> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><116> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><124> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1cf): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x14c> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><132> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x19): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><141> +Abbrev Number: 13 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x14c> +<2><14a> +Abbrev Number: 14 (DW_TAG_unspecified_parameters) +<1><14c> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x141> +<1><152> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x12e): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xee> +<1><15d> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x163> +<1><163> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x152> +<1><168> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x0): _Bool +<1><16f> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x8b): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><17d> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x84): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0x15d> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><18b> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x152): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><199> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x29): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 35 +DW_AT_type : <0xe3> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/kernel_dirent.h b/mpers-m32/kernel_dirent.h new file mode 100644 index 000000000..371e7b162 --- /dev/null +++ b/mpers-m32/kernel_dirent.h @@ -0,0 +1,11 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t d_ino; +uint32_t d_off; +uint16_t d_reclen; +char d_name[1]; +unsigned char mpers_end_filler_1[1]; +} ATTRIBUTE_PACKED m32_kernel_dirent; +#define MPERS_m32_kernel_dirent m32_kernel_dirent diff --git a/mpers-m32/mq_attr_t.c b/mpers-m32/mq_attr_t.c new file mode 100644 index 000000000..2c31495d8 --- /dev/null +++ b/mpers-m32/mq_attr_t.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2004 Ulrich Drepper + * Copyright (c) 2005-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#ifdef HAVE_MQUEUE_H +# include +typedef struct mq_attr mq_attr_t; +#elif defined HAVE_LINUX_MQUEUE_H +# include +# include +typedef struct mq_attr mq_attr_t; +#endif + + +mq_attr_t mpers_target_var; diff --git a/mpers-m32/mq_attr_t.d1 b/mpers-m32/mq_attr_t.d1 new file mode 100644 index 000000000..f225e6c04 --- /dev/null +++ b/mpers-m32/mq_attr_t.d1 @@ -0,0 +1,209 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1af (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xb8): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x13c): mpers-m32/mq_attr_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x191): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x185): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x168): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x152): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x7a): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x27): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x100): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x63): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x172): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x88): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x133): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0x1cb): __syscall_slong_t + <6f> DW_AT_decl_file : 2 + <70> DW_AT_decl_line : 175 + <71> DW_AT_type : <0x55> + <1><75>: Abbrev Number: 2 (DW_TAG_base_type) + <76> DW_AT_byte_size : 1 + <77> DW_AT_encoding : 6 (signed char) + <78> DW_AT_name : (indirect string, offset: 0x11b): char + <1><7c>: Abbrev Number: 5 (DW_TAG_pointer_type) + <7d> DW_AT_byte_size : 4 + <7e> DW_AT_type : <0x82> + <1><82>: Abbrev Number: 6 (DW_TAG_const_type) + <83> DW_AT_type : <0x75> + <1><87>: Abbrev Number: 7 (DW_TAG_structure_type) + <88> DW_AT_name : (indirect string, offset: 0x9a): sysent + <8c> DW_AT_byte_size : 20 + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 4 + <8f> DW_AT_sibling : <0xda> + <2><93>: Abbrev Number: 8 (DW_TAG_member) + <94> DW_AT_name : (indirect string, offset: 0xb2): nargs + <98> DW_AT_decl_file : 1 + <99> DW_AT_decl_line : 5 + <9a> DW_AT_type : <0x47> + <9e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x59): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1c2): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xe5> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x45): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x7c> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xe5> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xda> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x10d): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x87> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xfc> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xeb> + <1><101>: Abbrev Number: 2 (DW_TAG_base_type) + <102> DW_AT_byte_size : 1 + <103> DW_AT_encoding : 2 (boolean) + <104> DW_AT_name : (indirect string, offset: 0x17): _Bool + <1><108>: Abbrev Number: 7 (DW_TAG_structure_type) + <109> DW_AT_name : (indirect string, offset: 0x160): mq_attr + <10d> DW_AT_byte_size : 32 + <10e> DW_AT_decl_file : 3 + <10f> DW_AT_decl_line : 26 + <110> DW_AT_sibling : <0x15b> + <2><114>: Abbrev Number: 8 (DW_TAG_member) + <115> DW_AT_name : (indirect string, offset: 0x120): mq_flags + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 28 + <11b> DW_AT_type : <0x6a> + <11f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><122>: Abbrev Number: 8 (DW_TAG_member) + <123> DW_AT_name : (indirect string, offset: 0x17b): mq_maxmsg + <127> DW_AT_decl_file : 3 + <128> DW_AT_decl_line : 29 + <129> DW_AT_type : <0x6a> + <12d> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><130>: Abbrev Number: 8 (DW_TAG_member) + <131> DW_AT_name : (indirect string, offset: 0x3a): mq_msgsize + <135> DW_AT_decl_file : 3 + <136> DW_AT_decl_line : 30 + <137> DW_AT_type : <0x6a> + <13b> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><13e>: Abbrev Number: 8 (DW_TAG_member) + <13f> DW_AT_name : (indirect string, offset: 0x4e): mq_curmsgs + <143> DW_AT_decl_file : 3 + <144> DW_AT_decl_line : 31 + <145> DW_AT_type : <0x6a> + <149> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><14c>: Abbrev Number: 8 (DW_TAG_member) + <14d> DW_AT_name : (indirect string, offset: 0x0): __pad + <151> DW_AT_decl_file : 3 + <152> DW_AT_decl_line : 32 + <153> DW_AT_type : <0x15b> + <157> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><15a>: Abbrev Number: 0 + <1><15b>: Abbrev Number: 12 (DW_TAG_array_type) + <15c> DW_AT_type : <0x6a> + <160> DW_AT_sibling : <0x16b> + <2><164>: Abbrev Number: 13 (DW_TAG_subrange_type) + <165> DW_AT_type : <0x63> + <169> DW_AT_upper_bound : 3 + <2><16a>: Abbrev Number: 0 + <1><16b>: Abbrev Number: 4 (DW_TAG_typedef) + <16c> DW_AT_name : (indirect string, offset: 0x1d): mq_attr_t + <170> DW_AT_decl_file : 4 + <171> DW_AT_decl_line : 34 + <172> DW_AT_type : <0x108> + <1><176>: Abbrev Number: 14 (DW_TAG_variable) + <177> DW_AT_name : (indirect string, offset: 0xa1): current_wordsize + <17b> DW_AT_decl_file : 5 + <17c> DW_AT_decl_line : 757 + <17e> DW_AT_type : <0x47> + <182> DW_AT_external : 1 + <183> DW_AT_declaration : 1 + <1><184>: Abbrev Number: 14 (DW_TAG_variable) + <185> DW_AT_name : (indirect string, offset: 0x9a): sysent + <189> DW_AT_decl_file : 5 + <18a> DW_AT_decl_line : 892 + <18c> DW_AT_type : <0xf6> + <190> DW_AT_external : 1 + <191> DW_AT_declaration : 1 + <1><192>: Abbrev Number: 14 (DW_TAG_variable) + <193> DW_AT_name : (indirect string, offset: 0x129): nsyscalls + <197> DW_AT_decl_file : 5 + <198> DW_AT_decl_line : 903 + <19a> DW_AT_type : <0x47> + <19e> DW_AT_external : 1 + <19f> DW_AT_declaration : 1 + <1><1a0>: Abbrev Number: 15 (DW_TAG_variable) + <1a1> DW_AT_name : (indirect string, offset: 0x6): mpers_target_var + <1a5> DW_AT_decl_file : 4 + <1a6> DW_AT_decl_line : 42 + <1a7> DW_AT_type : <0x16b> + <1ab> DW_AT_external : 1 + <1ac> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><1b2>: Abbrev Number: 0 + diff --git a/mpers-m32/mq_attr_t.d2 b/mpers-m32/mq_attr_t.d2 new file mode 100644 index 000000000..8097c3ffc --- /dev/null +++ b/mpers-m32/mq_attr_t.d2 @@ -0,0 +1,231 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x185): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x168): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x152): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x7a): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x27): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x100): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x63): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x172): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x88): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x133): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1cb): __syscall_slong_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 175 +DW_AT_type : <0x55> +<1><75> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x11b): char +<1><7c> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x82> +<1><82> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x75> +<1><87> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x9a): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xda> +<2><93> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb2): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x59): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c2): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xe5> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x45): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xe5> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xda> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x10d): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x87> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xfc> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xeb> +<1><101> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x17): _Bool +<1><108> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x160): mq_attr +DW_AT_byte_size : 32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 26 +DW_AT_sibling : <0x15b> +<2><114> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x120): mq_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 28 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><122> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x17b): mq_maxmsg +DW_AT_decl_file : 3 +DW_AT_decl_line : 29 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><130> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a): mq_msgsize +DW_AT_decl_file : 3 +DW_AT_decl_line : 30 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><13e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x4e): mq_curmsgs +DW_AT_decl_file : 3 +DW_AT_decl_line : 31 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><14c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): __pad +DW_AT_decl_file : 3 +DW_AT_decl_line : 32 +DW_AT_type : <0x15b> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><15b> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x16b> +<2><164> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 3 +<1><16b> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1d): mq_attr_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 34 +DW_AT_type : <0x108> +<1><176> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xa1): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><184> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x9a): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xf6> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><192> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x129): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1a0> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x6): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_type : <0x16b> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/mq_attr_t.h b/mpers-m32/mq_attr_t.h new file mode 100644 index 000000000..255d5cf44 --- /dev/null +++ b/mpers-m32/mq_attr_t.h @@ -0,0 +1,11 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t mq_flags; +int32_t mq_maxmsg; +int32_t mq_msgsize; +int32_t mq_curmsgs; +int32_t __pad[4]; +} ATTRIBUTE_PACKED m32_mq_attr_t; +#define MPERS_m32_mq_attr_t m32_mq_attr_t diff --git a/mpers-m32/msgbuf_t.c b/mpers-m32/msgbuf_t.c new file mode 100644 index 000000000..4b0d5a9b5 --- /dev/null +++ b/mpers-m32/msgbuf_t.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1993 Ulrich Pegelow + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2003-2006 Roland McGrath + * Copyright (c) 2006-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include + +typedef struct msgbuf msgbuf_t; +msgbuf_t mpers_target_var; diff --git a/mpers-m32/msgbuf_t.d1 b/mpers-m32/msgbuf_t.d1 new file mode 100644 index 000000000..6a3db5f43 --- /dev/null +++ b/mpers-m32/msgbuf_t.d1 @@ -0,0 +1,191 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x185 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xb4): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x5b): mpers-m32/msgbuf_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x11c): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x18a): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x177): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x160): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x70): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0xd): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0xfc): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x44): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x181): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x84): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x157): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0x1a5): __syscall_slong_t + <6f> DW_AT_decl_file : 2 + <70> DW_AT_decl_line : 175 + <71> DW_AT_type : <0x55> + <1><75>: Abbrev Number: 2 (DW_TAG_base_type) + <76> DW_AT_byte_size : 1 + <77> DW_AT_encoding : 6 (signed char) + <78> DW_AT_name : (indirect string, offset: 0x117): char + <1><7c>: Abbrev Number: 5 (DW_TAG_pointer_type) + <7d> DW_AT_byte_size : 4 + <7e> DW_AT_type : <0x82> + <1><82>: Abbrev Number: 6 (DW_TAG_const_type) + <83> DW_AT_type : <0x75> + <1><87>: Abbrev Number: 7 (DW_TAG_array_type) + <88> DW_AT_type : <0x75> + <8c> DW_AT_sibling : <0x97> + <2><90>: Abbrev Number: 8 (DW_TAG_subrange_type) + <91> DW_AT_type : <0x63> + <95> DW_AT_upper_bound : 0 + <2><96>: Abbrev Number: 0 + <1><97>: Abbrev Number: 9 (DW_TAG_structure_type) + <98> DW_AT_name : (indirect string, offset: 0x96): sysent + <9c> DW_AT_byte_size : 20 + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 4 + <9f> DW_AT_sibling : <0xea> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xae): nargs + DW_AT_decl_file : 1 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x3a): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 11 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x19c): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xf5> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x20): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x7c> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 12 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xf5> + <2>: Abbrev Number: 13 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xea> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x109): struct_sysent + <100> DW_AT_decl_file : 1 + <101> DW_AT_decl_line : 10 + <102> DW_AT_type : <0x97> + <1><106>: Abbrev Number: 5 (DW_TAG_pointer_type) + <107> DW_AT_byte_size : 4 + <108> DW_AT_type : <0x10c> + <1><10c>: Abbrev Number: 6 (DW_TAG_const_type) + <10d> DW_AT_type : <0xfb> + <1><111>: Abbrev Number: 2 (DW_TAG_base_type) + <112> DW_AT_byte_size : 1 + <113> DW_AT_encoding : 2 (boolean) + <114> DW_AT_name : (indirect string, offset: 0x7): _Bool + <1><118>: Abbrev Number: 9 (DW_TAG_structure_type) + <119> DW_AT_name : (indirect string, offset: 0x0): msgbuf + <11d> DW_AT_byte_size : 8 + <11e> DW_AT_decl_file : 3 + <11f> DW_AT_decl_line : 51 + <120> DW_AT_sibling : <0x141> + <2><124>: Abbrev Number: 10 (DW_TAG_member) + <125> DW_AT_name : (indirect string, offset: 0x196): mtype + <129> DW_AT_decl_file : 3 + <12a> DW_AT_decl_line : 53 + <12b> DW_AT_type : <0x6a> + <12f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><132>: Abbrev Number: 10 (DW_TAG_member) + <133> DW_AT_name : (indirect string, offset: 0x7e): mtext + <137> DW_AT_decl_file : 3 + <138> DW_AT_decl_line : 54 + <139> DW_AT_type : <0x87> + <13d> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><140>: Abbrev Number: 0 + <1><141>: Abbrev Number: 4 (DW_TAG_typedef) + <142> DW_AT_name : (indirect string, offset: 0x16e): msgbuf_t + <146> DW_AT_decl_file : 4 + <147> DW_AT_decl_line : 37 + <148> DW_AT_type : <0x118> + <1><14c>: Abbrev Number: 14 (DW_TAG_variable) + <14d> DW_AT_name : (indirect string, offset: 0x9d): current_wordsize + <151> DW_AT_decl_file : 5 + <152> DW_AT_decl_line : 757 + <154> DW_AT_type : <0x47> + <158> DW_AT_external : 1 + <159> DW_AT_declaration : 1 + <1><15a>: Abbrev Number: 14 (DW_TAG_variable) + <15b> DW_AT_name : (indirect string, offset: 0x96): sysent + <15f> DW_AT_decl_file : 5 + <160> DW_AT_decl_line : 892 + <162> DW_AT_type : <0x106> + <166> DW_AT_external : 1 + <167> DW_AT_declaration : 1 + <1><168>: Abbrev Number: 14 (DW_TAG_variable) + <169> DW_AT_name : (indirect string, offset: 0x14d): nsyscalls + <16d> DW_AT_decl_file : 5 + <16e> DW_AT_decl_line : 903 + <170> DW_AT_type : <0x47> + <174> DW_AT_external : 1 + <175> DW_AT_declaration : 1 + <1><176>: Abbrev Number: 15 (DW_TAG_variable) + <177> DW_AT_name : (indirect string, offset: 0x29): mpers_target_var + <17b> DW_AT_decl_file : 4 + <17c> DW_AT_decl_line : 38 + <17d> DW_AT_type : <0x141> + <181> DW_AT_external : 1 + <182> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><188>: Abbrev Number: 0 + diff --git a/mpers-m32/msgbuf_t.d2 b/mpers-m32/msgbuf_t.d2 new file mode 100644 index 000000000..feffd7c64 --- /dev/null +++ b/mpers-m32/msgbuf_t.d2 @@ -0,0 +1,210 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x18a): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x177): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x160): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x70): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xd): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xfc): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x44): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x181): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x84): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x157): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1a5): __syscall_slong_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 175 +DW_AT_type : <0x55> +<1><75> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x117): char +<1><7c> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x82> +<1><82> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x75> +<1><87> +Abbrev Number: 7 (DW_TAG_array_type) +DW_AT_type : <0x75> +DW_AT_sibling : <0x97> +<2><90> +Abbrev Number: 8 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 0 +<1><97> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x96): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xea> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xae): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x19c): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xf5> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x20): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 12 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xf5> +<2> +Abbrev Number: 13 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xea> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x109): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x97> +<1><106> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x10c> +<1><10c> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xfb> +<1><111> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x7): _Bool +<1><118> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): msgbuf +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 51 +DW_AT_sibling : <0x141> +<2><124> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x196): mtype +DW_AT_decl_file : 3 +DW_AT_decl_line : 53 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><132> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7e): mtext +DW_AT_decl_file : 3 +DW_AT_decl_line : 54 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><141> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x16e): msgbuf_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 37 +DW_AT_type : <0x118> +<1><14c> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x9d): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><15a> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x96): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x106> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><168> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x14d): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><176> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x29): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 38 +DW_AT_type : <0x141> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/msgbuf_t.h b/mpers-m32/msgbuf_t.h new file mode 100644 index 000000000..a83943673 --- /dev/null +++ b/mpers-m32/msgbuf_t.h @@ -0,0 +1,9 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t mtype; +char mtext[1]; +unsigned char mpers_end_filler_1[3]; +} ATTRIBUTE_PACKED m32_msgbuf_t; +#define MPERS_m32_msgbuf_t m32_msgbuf_t diff --git a/mpers-m32/msqid_ds_t.c b/mpers-m32/msqid_ds_t.c new file mode 100644 index 000000000..8e70ecb2b --- /dev/null +++ b/mpers-m32/msqid_ds_t.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 1993 Ulrich Pegelow + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2003-2006 Roland McGrath + * Copyright (c) 2006-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "ipc_defs.h" + +#ifdef HAVE_SYS_MSG_H +/* The C library generally exports the struct the current kernel expects. */ +# include +typedef struct msqid_ds msqid_ds_t; +#elif defined HAVE_LINUX_MSG_H +/* The linux header might provide the right struct. */ +# include +typedef struct msqid64_ds msqid_ds_t; +#endif + +msqid_ds_t mpers_target_var; diff --git a/mpers-m32/msqid_ds_t.d1 b/mpers-m32/msqid_ds_t.d1 new file mode 100644 index 000000000..4e8fb3f72 --- /dev/null +++ b/mpers-m32/msqid_ds_t.d1 @@ -0,0 +1,364 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x311 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x10a): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x1f1): mpers-m32/msqid_ds_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x287): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x269): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x208): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1e3): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x9d): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x35): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x170): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x86): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x258): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xab): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x2d): __uid_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 125 + <6a> DW_AT_type : <0x47> + <1><6e>: Abbrev Number: 4 (DW_TAG_typedef) + <6f> DW_AT_name : (indirect string, offset: 0x1c7): __gid_t + <73> DW_AT_decl_file : 1 + <74> DW_AT_decl_line : 126 + <75> DW_AT_type : <0x47> + <1><79>: Abbrev Number: 4 (DW_TAG_typedef) + <7a> DW_AT_name : (indirect string, offset: 0x261): __pid_t + <7e> DW_AT_decl_file : 1 + <7f> DW_AT_decl_line : 133 + <80> DW_AT_type : <0x2b> + <1><84>: Abbrev Number: 2 (DW_TAG_base_type) + <85> DW_AT_byte_size : 4 + <86> DW_AT_encoding : 7 (unsigned) + <87> DW_AT_name : (indirect string, offset: 0x1cf): sizetype + <1><8b>: Abbrev Number: 4 (DW_TAG_typedef) + <8c> DW_AT_name : (indirect string, offset: 0xf1): __time_t + <90> DW_AT_decl_file : 1 + <91> DW_AT_decl_line : 139 + <92> DW_AT_type : <0x55> + <1><96>: Abbrev Number: 4 (DW_TAG_typedef) + <97> DW_AT_name : (indirect string, offset: 0x19e): __key_t + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 144 + <9d> DW_AT_type : <0x2b> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x48): __syscall_ulong_t + DW_AT_decl_file : 1 + DW_AT_decl_line : 177 + DW_AT_type : <0x5c> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 6 (signed char) + DW_AT_name : (indirect string, offset: 0x194): char + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xb9> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xac> + <1>: Abbrev Number: 7 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xc2): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 2 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x111> + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xfa): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x7c): sys_flags +
DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x2b8): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0x11c> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><102>: Abbrev Number: 8 (DW_TAG_member) + <103> DW_AT_name : (indirect string, offset: 0x64): sys_name + <107> DW_AT_decl_file : 2 + <108> DW_AT_decl_line : 9 + <109> DW_AT_type : <0xb3> + <10d> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><110>: Abbrev Number: 0 + <1><111>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <112> DW_AT_type : <0x2b> + <116> DW_AT_sibling : <0x11c> + <2><11a>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><11b>: Abbrev Number: 0 + <1><11c>: Abbrev Number: 5 (DW_TAG_pointer_type) + <11d> DW_AT_byte_size : 4 + <11e> DW_AT_type : <0x111> + <1><122>: Abbrev Number: 4 (DW_TAG_typedef) + <123> DW_AT_name : (indirect string, offset: 0x186): struct_sysent + <127> DW_AT_decl_file : 2 + <128> DW_AT_decl_line : 10 + <129> DW_AT_type : <0xbe> + <1><12d>: Abbrev Number: 5 (DW_TAG_pointer_type) + <12e> DW_AT_byte_size : 4 + <12f> DW_AT_type : <0x133> + <1><133>: Abbrev Number: 6 (DW_TAG_const_type) + <134> DW_AT_type : <0x122> + <1><138>: Abbrev Number: 2 (DW_TAG_base_type) + <139> DW_AT_byte_size : 1 + <13a> DW_AT_encoding : 2 (boolean) + <13b> DW_AT_name : (indirect string, offset: 0x20): _Bool + <1><13f>: Abbrev Number: 7 (DW_TAG_structure_type) + <140> DW_AT_name : (indirect string, offset: 0x224): ipc_perm + <144> DW_AT_byte_size : 36 + <145> DW_AT_decl_file : 3 + <146> DW_AT_decl_line : 42 + <147> DW_AT_sibling : <0x1e6> + <2><14b>: Abbrev Number: 8 (DW_TAG_member) + <14c> DW_AT_name : (indirect string, offset: 0x9): __key + <150> DW_AT_decl_file : 3 + <151> DW_AT_decl_line : 44 + <152> DW_AT_type : <0x96> + <156> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><159>: Abbrev Number: 9 (DW_TAG_member) + <15a> DW_AT_name : uid + <15e> DW_AT_decl_file : 3 + <15f> DW_AT_decl_line : 45 + <160> DW_AT_type : <0x63> + <164> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><167>: Abbrev Number: 9 (DW_TAG_member) + <168> DW_AT_name : gid + <16c> DW_AT_decl_file : 3 + <16d> DW_AT_decl_line : 46 + <16e> DW_AT_type : <0x6e> + <172> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><175>: Abbrev Number: 8 (DW_TAG_member) + <176> DW_AT_name : (indirect string, offset: 0xc9): cuid + <17a> DW_AT_decl_file : 3 + <17b> DW_AT_decl_line : 47 + <17c> DW_AT_type : <0x63> + <180> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><183>: Abbrev Number: 8 (DW_TAG_member) + <184> DW_AT_name : (indirect string, offset: 0xbd): cgid + <188> DW_AT_decl_file : 3 + <189> DW_AT_decl_line : 48 + <18a> DW_AT_type : <0x6e> + <18e> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><191>: Abbrev Number: 8 (DW_TAG_member) + <192> DW_AT_name : (indirect string, offset: 0x199): mode + <196> DW_AT_decl_file : 3 + <197> DW_AT_decl_line : 49 + <198> DW_AT_type : <0x40> + <19c> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><19f>: Abbrev Number: 8 (DW_TAG_member) + <1a0> DW_AT_name : (indirect string, offset: 0x251): __pad1 + <1a4> DW_AT_decl_file : 3 + <1a5> DW_AT_decl_line : 50 + <1a6> DW_AT_type : <0x40> + <1aa> DW_AT_data_member_location: 2 byte block: 23 16 (DW_OP_plus_uconst: 22) + <2><1ad>: Abbrev Number: 8 (DW_TAG_member) + <1ae> DW_AT_name : (indirect string, offset: 0x76): __seq + <1b2> DW_AT_decl_file : 3 + <1b3> DW_AT_decl_line : 51 + <1b4> DW_AT_type : <0x40> + <1b8> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1bb>: Abbrev Number: 8 (DW_TAG_member) + <1bc> DW_AT_name : (indirect string, offset: 0x26): __pad2 + <1c0> DW_AT_decl_file : 3 + <1c1> DW_AT_decl_line : 52 + <1c2> DW_AT_type : <0x40> + <1c6> DW_AT_data_member_location: 2 byte block: 23 1a (DW_OP_plus_uconst: 26) + <2><1c9>: Abbrev Number: 8 (DW_TAG_member) + <1ca> DW_AT_name : (indirect string, offset: 0xce): __glibc_reserved1 + <1ce> DW_AT_decl_file : 3 + <1cf> DW_AT_decl_line : 53 + <1d0> DW_AT_type : <0xa1> + <1d4> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><1d7>: Abbrev Number: 8 (DW_TAG_member) + <1d8> DW_AT_name : (indirect string, offset: 0x212): __glibc_reserved2 + <1dc> DW_AT_decl_file : 3 + <1dd> DW_AT_decl_line : 54 + <1de> DW_AT_type : <0xa1> + <1e2> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1e5>: Abbrev Number: 0 + <1><1e6>: Abbrev Number: 4 (DW_TAG_typedef) + <1e7> DW_AT_name : (indirect string, offset: 0x15d): msgqnum_t + <1eb> DW_AT_decl_file : 4 + <1ec> DW_AT_decl_line : 32 + <1ed> DW_AT_type : <0xa1> + <1><1f1>: Abbrev Number: 4 (DW_TAG_typedef) + <1f2> DW_AT_name : (indirect string, offset: 0x167): msglen_t + <1f6> DW_AT_decl_file : 4 + <1f7> DW_AT_decl_line : 33 + <1f8> DW_AT_type : <0xa1> + <1><1fc>: Abbrev Number: 7 (DW_TAG_structure_type) + <1fd> DW_AT_name : (indirect string, offset: 0x0): msqid_ds + <201> DW_AT_byte_size : 88 + <202> DW_AT_decl_file : 4 + <203> DW_AT_decl_line : 37 + <204> DW_AT_sibling : <0x2cd> + <2><208>: Abbrev Number: 8 (DW_TAG_member) + <209> DW_AT_name : (indirect string, offset: 0x17d): msg_perm + <20d> DW_AT_decl_file : 4 + <20e> DW_AT_decl_line : 39 + <20f> DW_AT_type : <0x13f> + <213> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><216>: Abbrev Number: 8 (DW_TAG_member) + <217> DW_AT_name : (indirect string, offset: 0x2c1): msg_stime + <21b> DW_AT_decl_file : 4 + <21c> DW_AT_decl_line : 40 + <21d> DW_AT_type : <0x8b> + <221> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><224>: Abbrev Number: 8 (DW_TAG_member) + <225> DW_AT_name : (indirect string, offset: 0xce): __glibc_reserved1 + <229> DW_AT_decl_file : 4 + <22a> DW_AT_decl_line : 42 + <22b> DW_AT_type : <0x5c> + <22f> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><232>: Abbrev Number: 8 (DW_TAG_member) + <233> DW_AT_name : (indirect string, offset: 0x1b3): msg_rtime + <237> DW_AT_decl_file : 4 + <238> DW_AT_decl_line : 44 + <239> DW_AT_type : <0x8b> + <23d> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><240>: Abbrev Number: 8 (DW_TAG_member) + <241> DW_AT_name : (indirect string, offset: 0x212): __glibc_reserved2 + <245> DW_AT_decl_file : 4 + <246> DW_AT_decl_line : 46 + <247> DW_AT_type : <0x5c> + <24b> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><24e>: Abbrev Number: 8 (DW_TAG_member) + <24f> DW_AT_name : (indirect string, offset: 0x100): msg_ctime + <253> DW_AT_decl_file : 4 + <254> DW_AT_decl_line : 48 + <255> DW_AT_type : <0x8b> + <259> DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2><25c>: Abbrev Number: 8 (DW_TAG_member) + <25d> DW_AT_name : (indirect string, offset: 0x275): __glibc_reserved3 + <261> DW_AT_decl_file : 4 + <262> DW_AT_decl_line : 50 + <263> DW_AT_type : <0x5c> + <267> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><26a>: Abbrev Number: 8 (DW_TAG_member) + <26b> DW_AT_name : (indirect string, offset: 0x1a6): __msg_cbytes + <26f> DW_AT_decl_file : 4 + <270> DW_AT_decl_line : 52 + <271> DW_AT_type : <0xa1> + <275> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><278>: Abbrev Number: 8 (DW_TAG_member) + <279> DW_AT_name : (indirect string, offset: 0x6d): msg_qnum + <27d> DW_AT_decl_file : 4 + <27e> DW_AT_decl_line : 53 + <27f> DW_AT_type : <0x1e6> + <283> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><286>: Abbrev Number: 8 (DW_TAG_member) + <287> DW_AT_name : (indirect string, offset: 0x152): msg_qbytes + <28b> DW_AT_decl_file : 4 + <28c> DW_AT_decl_line : 54 + <28d> DW_AT_type : <0x1f1> + <291> DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) + <2><294>: Abbrev Number: 8 (DW_TAG_member) + <295> DW_AT_name : (indirect string, offset: 0x5a): msg_lspid + <299> DW_AT_decl_file : 4 + <29a> DW_AT_decl_line : 55 + <29b> DW_AT_type : <0x79> + <29f> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><2a2>: Abbrev Number: 8 (DW_TAG_member) + <2a3> DW_AT_name : (indirect string, offset: 0x2cb): msg_lrpid + <2a7> DW_AT_decl_file : 4 + <2a8> DW_AT_decl_line : 56 + <2a9> DW_AT_type : <0x79> + <2ad> DW_AT_data_member_location: 2 byte block: 23 4c (DW_OP_plus_uconst: 76) + <2><2b0>: Abbrev Number: 8 (DW_TAG_member) + <2b1> DW_AT_name : (indirect string, offset: 0x22d): __glibc_reserved4 + <2b5> DW_AT_decl_file : 4 + <2b6> DW_AT_decl_line : 57 + <2b7> DW_AT_type : <0xa1> + <2bb> DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) + <2><2be>: Abbrev Number: 8 (DW_TAG_member) + <2bf> DW_AT_name : (indirect string, offset: 0x23f): __glibc_reserved5 + <2c3> DW_AT_decl_file : 4 + <2c4> DW_AT_decl_line : 58 + <2c5> DW_AT_type : <0xa1> + <2c9> DW_AT_data_member_location: 2 byte block: 23 54 (DW_OP_plus_uconst: 84) + <2><2cc>: Abbrev Number: 0 + <1><2cd>: Abbrev Number: 4 (DW_TAG_typedef) + <2ce> DW_AT_name : (indirect string, offset: 0x1d8): msqid_ds_t + <2d2> DW_AT_decl_file : 5 + <2d3> DW_AT_decl_line : 41 + <2d4> DW_AT_type : <0x1fc> + <1><2d8>: Abbrev Number: 12 (DW_TAG_variable) + <2d9> DW_AT_name : (indirect string, offset: 0xe0): current_wordsize + <2dd> DW_AT_decl_file : 6 + <2de> DW_AT_decl_line : 757 + <2e0> DW_AT_type : <0x47> + <2e4> DW_AT_external : 1 + <2e5> DW_AT_declaration : 1 + <1><2e6>: Abbrev Number: 12 (DW_TAG_variable) + <2e7> DW_AT_name : (indirect string, offset: 0xc2): sysent + <2eb> DW_AT_decl_file : 6 + <2ec> DW_AT_decl_line : 892 + <2ee> DW_AT_type : <0x12d> + <2f2> DW_AT_external : 1 + <2f3> DW_AT_declaration : 1 + <1><2f4>: Abbrev Number: 12 (DW_TAG_variable) + <2f5> DW_AT_name : (indirect string, offset: 0x1bd): nsyscalls + <2f9> DW_AT_decl_file : 6 + <2fa> DW_AT_decl_line : 903 + <2fc> DW_AT_type : <0x47> + <300> DW_AT_external : 1 + <301> DW_AT_declaration : 1 + <1><302>: Abbrev Number: 13 (DW_TAG_variable) + <303> DW_AT_name : (indirect string, offset: 0xf): mpers_target_var + <307> DW_AT_decl_file : 5 + <308> DW_AT_decl_line : 48 + <309> DW_AT_type : <0x2cd> + <30d> DW_AT_external : 1 + <30e> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><314>: Abbrev Number: 0 + diff --git a/mpers-m32/msqid_ds_t.d2 b/mpers-m32/msqid_ds_t.d2 new file mode 100644 index 000000000..904d5e857 --- /dev/null +++ b/mpers-m32/msqid_ds_t.d2 @@ -0,0 +1,412 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x269): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x208): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1e3): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x9d): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x35): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x170): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x86): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x258): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xab): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2d): __uid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 125 +DW_AT_type : <0x47> +<1><6e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1c7): __gid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 126 +DW_AT_type : <0x47> +<1><79> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x261): __pid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 133 +DW_AT_type : <0x2b> +<1><84> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1cf): sizetype +<1><8b> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xf1): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x55> +<1><96> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x19e): __key_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 144 +DW_AT_type : <0x2b> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x48): __syscall_ulong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 177 +DW_AT_type : <0x5c> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x194): char +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xb9> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xac> +<1> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc2): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x111> +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xfa): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7c): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2b8): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0x11c> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><102> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x64): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0xb3> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><111> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x11c> +<2><11a> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><11c> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x111> +<1><122> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x186): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0xbe> +<1><12d> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x133> +<1><133> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x122> +<1><138> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x20): _Bool +<1><13f> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x224): ipc_perm +DW_AT_byte_size : 36 +DW_AT_decl_file : 3 +DW_AT_decl_line : 42 +DW_AT_sibling : <0x1e6> +<2><14b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9): __key +DW_AT_decl_file : 3 +DW_AT_decl_line : 44 +DW_AT_type : <0x96> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><159> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : uid +DW_AT_decl_file : 3 +DW_AT_decl_line : 45 +DW_AT_type : <0x63> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><167> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : gid +DW_AT_decl_file : 3 +DW_AT_decl_line : 46 +DW_AT_type : <0x6e> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><175> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc9): cuid +DW_AT_decl_file : 3 +DW_AT_decl_line : 47 +DW_AT_type : <0x63> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><183> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbd): cgid +DW_AT_decl_file : 3 +DW_AT_decl_line : 48 +DW_AT_type : <0x6e> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><191> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x199): mode +DW_AT_decl_file : 3 +DW_AT_decl_line : 49 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><19f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x251): __pad1 +DW_AT_decl_file : 3 +DW_AT_decl_line : 50 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 16 (DW_OP_plus_uconst: 22) +<2><1ad> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x76): __seq +DW_AT_decl_file : 3 +DW_AT_decl_line : 51 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1bb> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x26): __pad2 +DW_AT_decl_file : 3 +DW_AT_decl_line : 52 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 1a (DW_OP_plus_uconst: 26) +<2><1c9> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xce): __glibc_reserved1 +DW_AT_decl_file : 3 +DW_AT_decl_line : 53 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><1d7> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x212): __glibc_reserved2 +DW_AT_decl_file : 3 +DW_AT_decl_line : 54 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<1><1e6> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x15d): msgqnum_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 32 +DW_AT_type : <0xa1> +<1><1f1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x167): msglen_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 33 +DW_AT_type : <0xa1> +<1><1fc> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): msqid_ds +DW_AT_byte_size : 88 +DW_AT_decl_file : 4 +DW_AT_decl_line : 37 +DW_AT_sibling : <0x2cd> +<2><208> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x17d): msg_perm +DW_AT_decl_file : 4 +DW_AT_decl_line : 39 +DW_AT_type : <0x13f> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><216> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c1): msg_stime +DW_AT_decl_file : 4 +DW_AT_decl_line : 40 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><224> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xce): __glibc_reserved1 +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><232> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b3): msg_rtime +DW_AT_decl_file : 4 +DW_AT_decl_line : 44 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><240> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x212): __glibc_reserved2 +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><24e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x100): msg_ctime +DW_AT_decl_file : 4 +DW_AT_decl_line : 48 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2><25c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x275): __glibc_reserved3 +DW_AT_decl_file : 4 +DW_AT_decl_line : 50 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><26a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a6): __msg_cbytes +DW_AT_decl_file : 4 +DW_AT_decl_line : 52 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<2><278> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6d): msg_qnum +DW_AT_decl_file : 4 +DW_AT_decl_line : 53 +DW_AT_type : <0x1e6> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><286> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x152): msg_qbytes +DW_AT_decl_file : 4 +DW_AT_decl_line : 54 +DW_AT_type : <0x1f1> +DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) +<2><294> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5a): msg_lspid +DW_AT_decl_file : 4 +DW_AT_decl_line : 55 +DW_AT_type : <0x79> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><2a2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2cb): msg_lrpid +DW_AT_decl_file : 4 +DW_AT_decl_line : 56 +DW_AT_type : <0x79> +DW_AT_data_member_location: 2 byte block: 23 4c (DW_OP_plus_uconst: 76) +<2><2b0> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22d): __glibc_reserved4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 57 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) +<2><2be> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23f): __glibc_reserved5 +DW_AT_decl_file : 4 +DW_AT_decl_line : 58 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 54 (DW_OP_plus_uconst: 84) +<1><2cd> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1d8): msqid_ds_t +DW_AT_decl_file : 5 +DW_AT_decl_line : 41 +DW_AT_type : <0x1fc> +<1><2d8> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe0): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2e6> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc2): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x12d> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2f4> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1bd): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><302> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xf): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 48 +DW_AT_type : <0x2cd> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/msqid_ds_t.h b/mpers-m32/msqid_ds_t.h new file mode 100644 index 000000000..853bb5a9a --- /dev/null +++ b/mpers-m32/msqid_ds_t.h @@ -0,0 +1,32 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +struct { +int32_t __key; +uint32_t uid; +uint32_t gid; +uint32_t cuid; +uint32_t cgid; +uint16_t mode; +uint16_t __pad1; +uint16_t __seq; +uint16_t __pad2; +uint32_t __glibc_reserved1; +uint32_t __glibc_reserved2; +} ATTRIBUTE_PACKED msg_perm; +int32_t msg_stime; +uint32_t __glibc_reserved1; +int32_t msg_rtime; +uint32_t __glibc_reserved2; +int32_t msg_ctime; +uint32_t __glibc_reserved3; +uint32_t __msg_cbytes; +uint32_t msg_qnum; +uint32_t msg_qbytes; +int32_t msg_lspid; +int32_t msg_lrpid; +uint32_t __glibc_reserved4; +uint32_t __glibc_reserved5; +} ATTRIBUTE_PACKED m32_msqid_ds_t; +#define MPERS_m32_msqid_ds_t m32_msqid_ds_t diff --git a/mpers-m32/rusage_t.c b/mpers-m32/rusage_t.c new file mode 100644 index 000000000..f69a7ee9c --- /dev/null +++ b/mpers-m32/rusage_t.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include + + +typedef struct rusage rusage_t; + +rusage_t mpers_target_var; diff --git a/mpers-m32/rusage_t.d1 b/mpers-m32/rusage_t.d1 new file mode 100644 index 000000000..4452fc78d --- /dev/null +++ b/mpers-m32/rusage_t.d1 @@ -0,0 +1,479 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x3e2 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x0): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x313): mpers-m32/rusage_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x332): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x186): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x96): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x116): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x172): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x1e2): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1c1): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x1a3): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x124): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x266): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0xb0): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0x29a): __time_t + <6f> DW_AT_decl_file : 1 + <70> DW_AT_decl_line : 139 + <71> DW_AT_type : <0x55> + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x305): __suseconds_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 141 + <7c> DW_AT_type : <0x55> + <1><80>: Abbrev Number: 4 (DW_TAG_typedef) + <81> DW_AT_name : (indirect string, offset: 0xd6): __syscall_slong_t + <85> DW_AT_decl_file : 1 + <86> DW_AT_decl_line : 175 + <87> DW_AT_type : <0x55> + <1><8b>: Abbrev Number: 2 (DW_TAG_base_type) + <8c> DW_AT_byte_size : 1 + <8d> DW_AT_encoding : 6 (signed char) + <8e> DW_AT_name : (indirect string, offset: 0x20e): char + <1><92>: Abbrev Number: 5 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0x2a3): timeval + <97> DW_AT_byte_size : 8 + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 30 + <9a> DW_AT_sibling : <0xbb> + <2><9e>: Abbrev Number: 6 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0x16b): tv_sec + DW_AT_decl_file : 2 + DW_AT_decl_line : 32 + DW_AT_type : <0x6a> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x2c9): tv_usec + DW_AT_decl_file : 2 + DW_AT_decl_line : 33 + DW_AT_type : <0x75> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xc1> + <1>: Abbrev Number: 8 (DW_TAG_const_type) + DW_AT_type : <0x8b> + <1>: Abbrev Number: 5 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x2f5): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x119> + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x180): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> +
DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1ce): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x74): sys_func + <101> DW_AT_decl_file : 3 + <102> DW_AT_decl_line : 8 + <103> DW_AT_type : <0x124> + <107> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><10a>: Abbrev Number: 6 (DW_TAG_member) + <10b> DW_AT_name : (indirect string, offset: 0xcd): sys_name + <10f> DW_AT_decl_file : 3 + <110> DW_AT_decl_line : 9 + <111> DW_AT_type : <0xbb> + <115> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><118>: Abbrev Number: 0 + <1><119>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <11a> DW_AT_type : <0x2b> + <11e> DW_AT_sibling : <0x124> + <2><122>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><123>: Abbrev Number: 0 + <1><124>: Abbrev Number: 7 (DW_TAG_pointer_type) + <125> DW_AT_byte_size : 4 + <126> DW_AT_type : <0x119> + <1><12a>: Abbrev Number: 4 (DW_TAG_typedef) + <12b> DW_AT_name : (indirect string, offset: 0x2bb): struct_sysent + <12f> DW_AT_decl_file : 3 + <130> DW_AT_decl_line : 10 + <131> DW_AT_type : <0xc6> + <1><135>: Abbrev Number: 7 (DW_TAG_pointer_type) + <136> DW_AT_byte_size : 4 + <137> DW_AT_type : <0x13b> + <1><13b>: Abbrev Number: 8 (DW_TAG_const_type) + <13c> DW_AT_type : <0x12a> + <1><140>: Abbrev Number: 2 (DW_TAG_base_type) + <141> DW_AT_byte_size : 1 + <142> DW_AT_encoding : 2 (boolean) + <143> DW_AT_name : (indirect string, offset: 0x213): _Bool + <1><147>: Abbrev Number: 12 (DW_TAG_union_type) + <148> DW_AT_byte_size : 4 + <149> DW_AT_decl_file : 4 + <14a> DW_AT_decl_line : 194 + <14b> DW_AT_sibling : <0x166> + <2><14f>: Abbrev Number: 13 (DW_TAG_member) + <150> DW_AT_name : (indirect string, offset: 0xfb): ru_maxrss + <154> DW_AT_decl_file : 4 + <155> DW_AT_decl_line : 196 + <156> DW_AT_type : <0x55> + <2><15a>: Abbrev Number: 13 (DW_TAG_member) + <15b> DW_AT_name : (indirect string, offset: 0x13e): __ru_maxrss_word + <15f> DW_AT_decl_file : 4 + <160> DW_AT_decl_line : 197 + <161> DW_AT_type : <0x80> + <2><165>: Abbrev Number: 0 + <1><166>: Abbrev Number: 12 (DW_TAG_union_type) + <167> DW_AT_byte_size : 4 + <168> DW_AT_decl_file : 4 + <169> DW_AT_decl_line : 202 + <16a> DW_AT_sibling : <0x185> + <2><16e>: Abbrev Number: 13 (DW_TAG_member) + <16f> DW_AT_name : (indirect string, offset: 0x6b): ru_ixrss + <173> DW_AT_decl_file : 4 + <174> DW_AT_decl_line : 204 + <175> DW_AT_type : <0x55> + <2><179>: Abbrev Number: 13 (DW_TAG_member) + <17a> DW_AT_name : (indirect string, offset: 0x2ab): __ru_ixrss_word + <17e> DW_AT_decl_file : 4 + <17f> DW_AT_decl_line : 205 + <180> DW_AT_type : <0x80> + <2><184>: Abbrev Number: 0 + <1><185>: Abbrev Number: 12 (DW_TAG_union_type) + <186> DW_AT_byte_size : 4 + <187> DW_AT_decl_file : 4 + <188> DW_AT_decl_line : 208 + <189> DW_AT_sibling : <0x1a4> + <2><18d>: Abbrev Number: 13 (DW_TAG_member) + <18e> DW_AT_name : (indirect string, offset: 0x8d): ru_idrss + <192> DW_AT_decl_file : 4 + <193> DW_AT_decl_line : 210 + <194> DW_AT_type : <0x55> + <2><198>: Abbrev Number: 13 (DW_TAG_member) + <199> DW_AT_name : (indirect string, offset: 0x7d): __ru_idrss_word + <19d> DW_AT_decl_file : 4 + <19e> DW_AT_decl_line : 211 + <19f> DW_AT_type : <0x80> + <2><1a3>: Abbrev Number: 0 + <1><1a4>: Abbrev Number: 12 (DW_TAG_union_type) + <1a5> DW_AT_byte_size : 4 + <1a6> DW_AT_decl_file : 4 + <1a7> DW_AT_decl_line : 214 + <1a8> DW_AT_sibling : <0x1c3> + <2><1ac>: Abbrev Number: 13 (DW_TAG_member) + <1ad> DW_AT_name : (indirect string, offset: 0xf2): ru_isrss + <1b1> DW_AT_decl_file : 4 + <1b2> DW_AT_decl_line : 216 + <1b3> DW_AT_type : <0x55> + <2><1b7>: Abbrev Number: 13 (DW_TAG_member) + <1b8> DW_AT_name : (indirect string, offset: 0x1fe): __ru_isrss_word + <1bc> DW_AT_decl_file : 4 + <1bd> DW_AT_decl_line : 217 + <1be> DW_AT_type : <0x80> + <2><1c2>: Abbrev Number: 0 + <1><1c3>: Abbrev Number: 12 (DW_TAG_union_type) + <1c4> DW_AT_byte_size : 4 + <1c5> DW_AT_decl_file : 4 + <1c6> DW_AT_decl_line : 221 + <1c7> DW_AT_sibling : <0x1e2> + <2><1cb>: Abbrev Number: 13 (DW_TAG_member) + <1cc> DW_AT_name : (indirect string, offset: 0x48): ru_minflt + <1d0> DW_AT_decl_file : 4 + <1d1> DW_AT_decl_line : 223 + <1d2> DW_AT_type : <0x55> + <2><1d6>: Abbrev Number: 13 (DW_TAG_member) + <1d7> DW_AT_name : (indirect string, offset: 0x105): __ru_minflt_word + <1db> DW_AT_decl_file : 4 + <1dc> DW_AT_decl_line : 224 + <1dd> DW_AT_type : <0x80> + <2><1e1>: Abbrev Number: 0 + <1><1e2>: Abbrev Number: 12 (DW_TAG_union_type) + <1e3> DW_AT_byte_size : 4 + <1e4> DW_AT_decl_file : 4 + <1e5> DW_AT_decl_line : 227 + <1e6> DW_AT_sibling : <0x201> + <2><1ea>: Abbrev Number: 13 (DW_TAG_member) + <1eb> DW_AT_name : (indirect string, offset: 0xe8): ru_majflt + <1ef> DW_AT_decl_file : 4 + <1f0> DW_AT_decl_line : 229 + <1f1> DW_AT_type : <0x55> + <2><1f5>: Abbrev Number: 13 (DW_TAG_member) + <1f6> DW_AT_name : (indirect string, offset: 0x15a): __ru_majflt_word + <1fa> DW_AT_decl_file : 4 + <1fb> DW_AT_decl_line : 230 + <1fc> DW_AT_type : <0x80> + <2><200>: Abbrev Number: 0 + <1><201>: Abbrev Number: 12 (DW_TAG_union_type) + <202> DW_AT_byte_size : 4 + <203> DW_AT_decl_file : 4 + <204> DW_AT_decl_line : 233 + <205> DW_AT_sibling : <0x220> + <2><209>: Abbrev Number: 13 (DW_TAG_member) + <20a> DW_AT_name : (indirect string, offset: 0xb9): ru_nswap + <20e> DW_AT_decl_file : 4 + <20f> DW_AT_decl_line : 235 + <210> DW_AT_type : <0x55> + <2><214>: Abbrev Number: 13 (DW_TAG_member) + <215> DW_AT_name : (indirect string, offset: 0xa0): __ru_nswap_word + <219> DW_AT_decl_file : 4 + <21a> DW_AT_decl_line : 236 + <21b> DW_AT_type : <0x80> + <2><21f>: Abbrev Number: 0 + <1><220>: Abbrev Number: 12 (DW_TAG_union_type) + <221> DW_AT_byte_size : 4 + <222> DW_AT_decl_file : 4 + <223> DW_AT_decl_line : 240 + <224> DW_AT_sibling : <0x23f> + <2><228>: Abbrev Number: 13 (DW_TAG_member) + <229> DW_AT_name : (indirect string, offset: 0x14f): ru_inblock + <22d> DW_AT_decl_file : 4 + <22e> DW_AT_decl_line : 242 + <22f> DW_AT_type : <0x55> + <2><233>: Abbrev Number: 13 (DW_TAG_member) + <234> DW_AT_name : (indirect string, offset: 0x22f): __ru_inblock_word + <238> DW_AT_decl_file : 4 + <239> DW_AT_decl_line : 243 + <23a> DW_AT_type : <0x80> + <2><23e>: Abbrev Number: 0 + <1><23f>: Abbrev Number: 12 (DW_TAG_union_type) + <240> DW_AT_byte_size : 4 + <241> DW_AT_decl_file : 4 + <242> DW_AT_decl_line : 246 + <243> DW_AT_sibling : <0x25e> + <2><247>: Abbrev Number: 13 (DW_TAG_member) + <248> DW_AT_name : (indirect string, offset: 0xc2): ru_oublock + <24c> DW_AT_decl_file : 4 + <24d> DW_AT_decl_line : 248 + <24e> DW_AT_type : <0x55> + <2><252>: Abbrev Number: 13 (DW_TAG_member) + <253> DW_AT_name : (indirect string, offset: 0x254): __ru_oublock_word + <257> DW_AT_decl_file : 4 + <258> DW_AT_decl_line : 249 + <259> DW_AT_type : <0x80> + <2><25d>: Abbrev Number: 0 + <1><25e>: Abbrev Number: 12 (DW_TAG_union_type) + <25f> DW_AT_byte_size : 4 + <260> DW_AT_decl_file : 4 + <261> DW_AT_decl_line : 252 + <262> DW_AT_sibling : <0x27d> + <2><266>: Abbrev Number: 13 (DW_TAG_member) + <267> DW_AT_name : (indirect string, offset: 0x219): ru_msgsnd + <26b> DW_AT_decl_file : 4 + <26c> DW_AT_decl_line : 254 + <26d> DW_AT_type : <0x55> + <2><271>: Abbrev Number: 13 (DW_TAG_member) + <272> DW_AT_name : (indirect string, offset: 0x278): __ru_msgsnd_word + <276> DW_AT_decl_file : 4 + <277> DW_AT_decl_line : 255 + <278> DW_AT_type : <0x80> + <2><27c>: Abbrev Number: 0 + <1><27d>: Abbrev Number: 14 (DW_TAG_union_type) + <27e> DW_AT_byte_size : 4 + <27f> DW_AT_decl_file : 4 + <280> DW_AT_decl_line : 258 + <282> DW_AT_sibling : <0x29f> + <2><286>: Abbrev Number: 15 (DW_TAG_member) + <287> DW_AT_name : (indirect string, offset: 0x328): ru_msgrcv + <28b> DW_AT_decl_file : 4 + <28c> DW_AT_decl_line : 260 + <28e> DW_AT_type : <0x55> + <2><292>: Abbrev Number: 15 (DW_TAG_member) + <293> DW_AT_name : (indirect string, offset: 0x2d1): __ru_msgrcv_word + <297> DW_AT_decl_file : 4 + <298> DW_AT_decl_line : 261 + <29a> DW_AT_type : <0x80> + <2><29e>: Abbrev Number: 0 + <1><29f>: Abbrev Number: 14 (DW_TAG_union_type) + <2a0> DW_AT_byte_size : 4 + <2a1> DW_AT_decl_file : 4 + <2a2> DW_AT_decl_line : 264 + <2a4> DW_AT_sibling : <0x2c1> + <2><2a8>: Abbrev Number: 15 (DW_TAG_member) + <2a9> DW_AT_name : (indirect string, offset: 0x223): ru_nsignals + <2ad> DW_AT_decl_file : 4 + <2ae> DW_AT_decl_line : 266 + <2b0> DW_AT_type : <0x55> + <2><2b4>: Abbrev Number: 15 (DW_TAG_member) + <2b5> DW_AT_name : (indirect string, offset: 0x241): __ru_nsignals_word + <2b9> DW_AT_decl_file : 4 + <2ba> DW_AT_decl_line : 267 + <2bc> DW_AT_type : <0x80> + <2><2c0>: Abbrev Number: 0 + <1><2c1>: Abbrev Number: 14 (DW_TAG_union_type) + <2c2> DW_AT_byte_size : 4 + <2c3> DW_AT_decl_file : 4 + <2c4> DW_AT_decl_line : 272 + <2c6> DW_AT_sibling : <0x2e3> + <2><2ca>: Abbrev Number: 15 (DW_TAG_member) + <2cb> DW_AT_name : (indirect string, offset: 0x52): ru_nvcsw + <2cf> DW_AT_decl_file : 4 + <2d0> DW_AT_decl_line : 274 + <2d2> DW_AT_type : <0x55> + <2><2d6>: Abbrev Number: 15 (DW_TAG_member) + <2d7> DW_AT_name : (indirect string, offset: 0x5b): __ru_nvcsw_word + <2db> DW_AT_decl_file : 4 + <2dc> DW_AT_decl_line : 275 + <2de> DW_AT_type : <0x80> + <2><2e2>: Abbrev Number: 0 + <1><2e3>: Abbrev Number: 14 (DW_TAG_union_type) + <2e4> DW_AT_byte_size : 4 + <2e5> DW_AT_decl_file : 4 + <2e6> DW_AT_decl_line : 279 + <2e8> DW_AT_sibling : <0x305> + <2><2ec>: Abbrev Number: 15 (DW_TAG_member) + <2ed> DW_AT_name : (indirect string, offset: 0x2e2): ru_nivcsw + <2f1> DW_AT_decl_file : 4 + <2f2> DW_AT_decl_line : 281 + <2f4> DW_AT_type : <0x55> + <2><2f8>: Abbrev Number: 15 (DW_TAG_member) + <2f9> DW_AT_name : (indirect string, offset: 0x289): __ru_nivcsw_word + <2fd> DW_AT_decl_file : 4 + <2fe> DW_AT_decl_line : 282 + <300> DW_AT_type : <0x80> + <2><304>: Abbrev Number: 0 + <1><305>: Abbrev Number: 5 (DW_TAG_structure_type) + <306> DW_AT_name : (indirect string, offset: 0x1ba): rusage + <30a> DW_AT_byte_size : 72 + <30b> DW_AT_decl_file : 4 + <30c> DW_AT_decl_line : 187 + <30d> DW_AT_sibling : <0x39e> + <2><311>: Abbrev Number: 6 (DW_TAG_member) + <312> DW_AT_name : (indirect string, offset: 0x1f5): ru_utime + <316> DW_AT_decl_file : 4 + <317> DW_AT_decl_line : 190 + <318> DW_AT_type : <0x92> + <31c> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><31f>: Abbrev Number: 6 (DW_TAG_member) + <320> DW_AT_name : (indirect string, offset: 0x2fc): ru_stime + <324> DW_AT_decl_file : 4 + <325> DW_AT_decl_line : 192 + <326> DW_AT_type : <0x92> + <32a> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><32d>: Abbrev Number: 16 (DW_TAG_member) + <32e> DW_AT_type : <0x147> + <332> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><335>: Abbrev Number: 16 (DW_TAG_member) + <336> DW_AT_type : <0x166> + <33a> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><33d>: Abbrev Number: 16 (DW_TAG_member) + <33e> DW_AT_type : <0x185> + <342> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><345>: Abbrev Number: 16 (DW_TAG_member) + <346> DW_AT_type : <0x1a4> + <34a> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><34d>: Abbrev Number: 16 (DW_TAG_member) + <34e> DW_AT_type : <0x1c3> + <352> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><355>: Abbrev Number: 16 (DW_TAG_member) + <356> DW_AT_type : <0x1e2> + <35a> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><35d>: Abbrev Number: 16 (DW_TAG_member) + <35e> DW_AT_type : <0x201> + <362> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><365>: Abbrev Number: 16 (DW_TAG_member) + <366> DW_AT_type : <0x220> + <36a> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><36d>: Abbrev Number: 16 (DW_TAG_member) + <36e> DW_AT_type : <0x23f> + <372> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><375>: Abbrev Number: 16 (DW_TAG_member) + <376> DW_AT_type : <0x25e> + <37a> DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2><37d>: Abbrev Number: 16 (DW_TAG_member) + <37e> DW_AT_type : <0x27d> + <382> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><385>: Abbrev Number: 16 (DW_TAG_member) + <386> DW_AT_type : <0x29f> + <38a> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><38d>: Abbrev Number: 16 (DW_TAG_member) + <38e> DW_AT_type : <0x2c1> + <392> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><395>: Abbrev Number: 16 (DW_TAG_member) + <396> DW_AT_type : <0x2e3> + <39a> DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) + <2><39d>: Abbrev Number: 0 + <1><39e>: Abbrev Number: 4 (DW_TAG_typedef) + <39f> DW_AT_name : (indirect string, offset: 0x2ec): rusage_t + <3a3> DW_AT_decl_file : 5 + <3a4> DW_AT_decl_line : 35 + <3a5> DW_AT_type : <0x305> + <1><3a9>: Abbrev Number: 17 (DW_TAG_variable) + <3aa> DW_AT_name : (indirect string, offset: 0x192): current_wordsize + <3ae> DW_AT_decl_file : 6 + <3af> DW_AT_decl_line : 757 + <3b1> DW_AT_type : <0x47> + <3b5> DW_AT_external : 1 + <3b6> DW_AT_declaration : 1 + <1><3b7>: Abbrev Number: 17 (DW_TAG_variable) + <3b8> DW_AT_name : (indirect string, offset: 0x2f5): sysent + <3bc> DW_AT_decl_file : 6 + <3bd> DW_AT_decl_line : 892 + <3bf> DW_AT_type : <0x135> + <3c3> DW_AT_external : 1 + <3c4> DW_AT_declaration : 1 + <1><3c5>: Abbrev Number: 17 (DW_TAG_variable) + <3c6> DW_AT_name : (indirect string, offset: 0x1d8): nsyscalls + <3ca> DW_AT_decl_file : 6 + <3cb> DW_AT_decl_line : 903 + <3cd> DW_AT_type : <0x47> + <3d1> DW_AT_external : 1 + <3d2> DW_AT_declaration : 1 + <1><3d3>: Abbrev Number: 18 (DW_TAG_variable) + <3d4> DW_AT_name : (indirect string, offset: 0x12d): mpers_target_var + <3d8> DW_AT_decl_file : 5 + <3d9> DW_AT_decl_line : 37 + <3da> DW_AT_type : <0x39e> + <3de> DW_AT_external : 1 + <3df> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><3e5>: Abbrev Number: 0 + diff --git a/mpers-m32/rusage_t.d2 b/mpers-m32/rusage_t.d2 new file mode 100644 index 000000000..12e140be4 --- /dev/null +++ b/mpers-m32/rusage_t.d2 @@ -0,0 +1,543 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x186): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x96): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x116): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x172): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1e2): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c1): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1a3): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x124): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x266): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb0): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x29a): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x55> +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x305): __suseconds_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 141 +DW_AT_type : <0x55> +<1><80> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xd6): __syscall_slong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 175 +DW_AT_type : <0x55> +<1><8b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x20e): char +<1><92> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x2a3): timeval +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_sibling : <0xbb> +<2><9e> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16b): tv_sec +DW_AT_decl_file : 2 +DW_AT_decl_line : 32 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c9): tv_usec +DW_AT_decl_file : 2 +DW_AT_decl_line : 33 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xc1> +<1> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x8b> +<1> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x2f5): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x119> +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x180): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ce): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x74): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x124> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><10a> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xcd): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0xbb> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><119> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x124> +<2><122> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><124> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x119> +<1><12a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2bb): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xc6> +<1><135> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x13b> +<1><13b> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x12a> +<1><140> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x213): _Bool +<1><147> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 194 +DW_AT_sibling : <0x166> +<2><14f> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xfb): ru_maxrss +DW_AT_decl_file : 4 +DW_AT_decl_line : 196 +DW_AT_type : <0x55> +<2><15a> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x13e): __ru_maxrss_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 197 +DW_AT_type : <0x80> +<1><166> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 202 +DW_AT_sibling : <0x185> +<2><16e> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6b): ru_ixrss +DW_AT_decl_file : 4 +DW_AT_decl_line : 204 +DW_AT_type : <0x55> +<2><179> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2ab): __ru_ixrss_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 205 +DW_AT_type : <0x80> +<1><185> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 208 +DW_AT_sibling : <0x1a4> +<2><18d> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8d): ru_idrss +DW_AT_decl_file : 4 +DW_AT_decl_line : 210 +DW_AT_type : <0x55> +<2><198> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7d): __ru_idrss_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 211 +DW_AT_type : <0x80> +<1><1a4> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 214 +DW_AT_sibling : <0x1c3> +<2><1ac> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf2): ru_isrss +DW_AT_decl_file : 4 +DW_AT_decl_line : 216 +DW_AT_type : <0x55> +<2><1b7> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fe): __ru_isrss_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 217 +DW_AT_type : <0x80> +<1><1c3> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 221 +DW_AT_sibling : <0x1e2> +<2><1cb> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x48): ru_minflt +DW_AT_decl_file : 4 +DW_AT_decl_line : 223 +DW_AT_type : <0x55> +<2><1d6> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x105): __ru_minflt_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 224 +DW_AT_type : <0x80> +<1><1e2> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 227 +DW_AT_sibling : <0x201> +<2><1ea> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe8): ru_majflt +DW_AT_decl_file : 4 +DW_AT_decl_line : 229 +DW_AT_type : <0x55> +<2><1f5> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15a): __ru_majflt_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 230 +DW_AT_type : <0x80> +<1><201> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 233 +DW_AT_sibling : <0x220> +<2><209> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb9): ru_nswap +DW_AT_decl_file : 4 +DW_AT_decl_line : 235 +DW_AT_type : <0x55> +<2><214> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa0): __ru_nswap_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 236 +DW_AT_type : <0x80> +<1><220> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 240 +DW_AT_sibling : <0x23f> +<2><228> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14f): ru_inblock +DW_AT_decl_file : 4 +DW_AT_decl_line : 242 +DW_AT_type : <0x55> +<2><233> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22f): __ru_inblock_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 243 +DW_AT_type : <0x80> +<1><23f> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 246 +DW_AT_sibling : <0x25e> +<2><247> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc2): ru_oublock +DW_AT_decl_file : 4 +DW_AT_decl_line : 248 +DW_AT_type : <0x55> +<2><252> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x254): __ru_oublock_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 249 +DW_AT_type : <0x80> +<1><25e> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 252 +DW_AT_sibling : <0x27d> +<2><266> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x219): ru_msgsnd +DW_AT_decl_file : 4 +DW_AT_decl_line : 254 +DW_AT_type : <0x55> +<2><271> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x278): __ru_msgsnd_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 255 +DW_AT_type : <0x80> +<1><27d> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 258 +DW_AT_sibling : <0x29f> +<2><286> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x328): ru_msgrcv +DW_AT_decl_file : 4 +DW_AT_decl_line : 260 +DW_AT_type : <0x55> +<2><292> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d1): __ru_msgrcv_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 261 +DW_AT_type : <0x80> +<1><29f> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 264 +DW_AT_sibling : <0x2c1> +<2><2a8> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x223): ru_nsignals +DW_AT_decl_file : 4 +DW_AT_decl_line : 266 +DW_AT_type : <0x55> +<2><2b4> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x241): __ru_nsignals_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 267 +DW_AT_type : <0x80> +<1><2c1> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 272 +DW_AT_sibling : <0x2e3> +<2><2ca> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x52): ru_nvcsw +DW_AT_decl_file : 4 +DW_AT_decl_line : 274 +DW_AT_type : <0x55> +<2><2d6> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5b): __ru_nvcsw_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 275 +DW_AT_type : <0x80> +<1><2e3> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 279 +DW_AT_sibling : <0x305> +<2><2ec> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2e2): ru_nivcsw +DW_AT_decl_file : 4 +DW_AT_decl_line : 281 +DW_AT_type : <0x55> +<2><2f8> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x289): __ru_nivcsw_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 282 +DW_AT_type : <0x80> +<1><305> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1ba): rusage +DW_AT_byte_size : 72 +DW_AT_decl_file : 4 +DW_AT_decl_line : 187 +DW_AT_sibling : <0x39e> +<2><311> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f5): ru_utime +DW_AT_decl_file : 4 +DW_AT_decl_line : 190 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><31f> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2fc): ru_stime +DW_AT_decl_file : 4 +DW_AT_decl_line : 192 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><32d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x147> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><335> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x166> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><33d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x185> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><345> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x1a4> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><34d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x1c3> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><355> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x1e2> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><35d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x201> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><365> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x220> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><36d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x23f> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><375> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x25e> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2><37d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x27d> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><385> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x29f> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<2><38d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x2c1> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><395> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x2e3> +DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) +<1><39e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2ec): rusage_t +DW_AT_decl_file : 5 +DW_AT_decl_line : 35 +DW_AT_type : <0x305> +<1><3a9> +Abbrev Number: 17 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x192): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3b7> +Abbrev Number: 17 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x2f5): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x135> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3c5> +Abbrev Number: 17 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1d8): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3d3> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x12d): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 37 +DW_AT_type : <0x39e> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/rusage_t.h b/mpers-m32/rusage_t.h new file mode 100644 index 000000000..f3f849c00 --- /dev/null +++ b/mpers-m32/rusage_t.h @@ -0,0 +1,70 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +struct { +int32_t tv_sec; +int32_t tv_usec; +} ATTRIBUTE_PACKED ru_utime; +struct { +int32_t tv_sec; +int32_t tv_usec; +} ATTRIBUTE_PACKED ru_stime; +union { +int32_t ru_maxrss; +int32_t __ru_maxrss_word; +} ; +union { +int32_t ru_ixrss; +int32_t __ru_ixrss_word; +} ; +union { +int32_t ru_idrss; +int32_t __ru_idrss_word; +} ; +union { +int32_t ru_isrss; +int32_t __ru_isrss_word; +} ; +union { +int32_t ru_minflt; +int32_t __ru_minflt_word; +} ; +union { +int32_t ru_majflt; +int32_t __ru_majflt_word; +} ; +union { +int32_t ru_nswap; +int32_t __ru_nswap_word; +} ; +union { +int32_t ru_inblock; +int32_t __ru_inblock_word; +} ; +union { +int32_t ru_oublock; +int32_t __ru_oublock_word; +} ; +union { +int32_t ru_msgsnd; +int32_t __ru_msgsnd_word; +} ; +union { +int32_t ru_msgrcv; +int32_t __ru_msgrcv_word; +} ; +union { +int32_t ru_nsignals; +int32_t __ru_nsignals_word; +} ; +union { +int32_t ru_nvcsw; +int32_t __ru_nvcsw_word; +} ; +union { +int32_t ru_nivcsw; +int32_t __ru_nivcsw_word; +} ; +} ATTRIBUTE_PACKED m32_rusage_t; +#define MPERS_m32_rusage_t m32_rusage_t diff --git a/mpers-m32/sample.c b/mpers-m32/sample.c new file mode 100644 index 000000000..4c65608a3 --- /dev/null +++ b/mpers-m32/sample.c @@ -0,0 +1,38 @@ +#include "mpers_type.h" +#include DEF_MPERS_TYPE(sample_struct) +typedef struct { + struct { + void *p; + char sc; + /* unsigned char mpers_filler_1[1]; */ + short ss; + unsigned char uc; + /* unsigned char mpers_filler_2[3]; */ + int si; + unsigned ui; + long sl; + unsigned short us; + /* unsigned char mpers_filler_3[6]; */ + long long sll __attribute__((__aligned__(8))); + unsigned long long ull; + unsigned long ul; + long asl[3]; + char f; + /* unsigned char mpers_end_filler_4[7]; */ + } s; + union { + long long sll; + unsigned long long ull; + void *p; + long sl; + unsigned long ul; + int si; + unsigned ui; + short ss; + unsigned short us; + char sc; + unsigned char uc; + } u[3]; + short f[0]; +} sample_struct; +#include MPERS_DEFS diff --git a/mpers-m32/sample.expected b/mpers-m32/sample.expected new file mode 100644 index 000000000..4c8398452 --- /dev/null +++ b/mpers-m32/sample.expected @@ -0,0 +1,39 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +struct { +mpers_ptr_t p; +char sc; +unsigned char mpers_filler_1[1]; +int16_t ss; +unsigned char uc; +unsigned char mpers_filler_2[3]; +int32_t si; +uint32_t ui; +int32_t sl; +uint16_t us; +unsigned char mpers_filler_3[6]; +int64_t sll; +uint64_t ull; +uint32_t ul; +int32_t asl[3]; +char f; +unsigned char mpers_end_filler_4[7]; +} ATTRIBUTE_PACKED s; +union { +int64_t sll; +uint64_t ull; +mpers_ptr_t p; +int32_t sl; +uint32_t ul; +int32_t si; +uint32_t ui; +int16_t ss; +uint16_t us; +char sc; +unsigned char uc; +} u[3]; +int16_t f[0]; +} ATTRIBUTE_PACKED m32_sample_struct; +#define MPERS_m32_sample_struct m32_sample_struct diff --git a/mpers-m32/sample_struct.c b/mpers-m32/sample_struct.c new file mode 100644 index 000000000..6ebddcc9e --- /dev/null +++ b/mpers-m32/sample_struct.c @@ -0,0 +1,37 @@ +#include "mpers_type.h" +typedef struct { + struct { + void *p; + char sc; + /* unsigned char mpers_filler_1[1]; */ + short ss; + unsigned char uc; + /* unsigned char mpers_filler_2[3]; */ + int si; + unsigned ui; + long sl; + unsigned short us; + /* unsigned char mpers_filler_3[6]; */ + long long sll __attribute__((__aligned__(8))); + unsigned long long ull; + unsigned long ul; + long asl[3]; + char f; + /* unsigned char mpers_end_filler_4[7]; */ + } s; + union { + long long sll; + unsigned long long ull; + void *p; + long sl; + unsigned long ul; + int si; + unsigned ui; + short ss; + unsigned short us; + char sc; + unsigned char uc; + } u[3]; + short f[0]; +} sample_struct; +sample_struct mpers_target_var; diff --git a/mpers-m32/sample_struct.d1 b/mpers-m32/sample_struct.d1 new file mode 100644 index 000000000..72955d664 --- /dev/null +++ b/mpers-m32/sample_struct.d1 @@ -0,0 +1,262 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x20d (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xde): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x2c): mpers-m32/sample_struct.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x46): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_structure_type) + <1e> DW_AT_byte_size : 72 + <1f> DW_AT_decl_file : 1 + <20> DW_AT_decl_line : 3 + <21> DW_AT_sibling : <0xd0> + <2><25>: Abbrev Number: 3 (DW_TAG_member) + <26> DW_AT_name : p + <28> DW_AT_decl_file : 1 + <29> DW_AT_decl_line : 4 + <2a> DW_AT_type : <0xd0> + <2e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><31>: Abbrev Number: 3 (DW_TAG_member) + <32> DW_AT_name : sc + <35> DW_AT_decl_file : 1 + <36> DW_AT_decl_line : 5 + <37> DW_AT_type : <0xd2> + <3b> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><3e>: Abbrev Number: 3 (DW_TAG_member) + <3f> DW_AT_name : ss + <42> DW_AT_decl_file : 1 + <43> DW_AT_decl_line : 7 + <44> DW_AT_type : <0xd9> + <48> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><4b>: Abbrev Number: 3 (DW_TAG_member) + <4c> DW_AT_name : uc + <4f> DW_AT_decl_file : 1 + <50> DW_AT_decl_line : 8 + <51> DW_AT_type : <0xe0> + <55> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><58>: Abbrev Number: 3 (DW_TAG_member) + <59> DW_AT_name : si + <5c> DW_AT_decl_file : 1 + <5d> DW_AT_decl_line : 10 + <5e> DW_AT_type : <0xe7> + <62> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><65>: Abbrev Number: 3 (DW_TAG_member) + <66> DW_AT_name : ui + <69> DW_AT_decl_file : 1 + <6a> DW_AT_decl_line : 11 + <6b> DW_AT_type : <0xee> + <6f> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><72>: Abbrev Number: 3 (DW_TAG_member) + <73> DW_AT_name : sl + <76> DW_AT_decl_file : 1 + <77> DW_AT_decl_line : 12 + <78> DW_AT_type : <0xf5> + <7c> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><7f>: Abbrev Number: 3 (DW_TAG_member) + <80> DW_AT_name : us + <83> DW_AT_decl_file : 1 + <84> DW_AT_decl_line : 13 + <85> DW_AT_type : <0xfc> + <89> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><8c>: Abbrev Number: 3 (DW_TAG_member) + <8d> DW_AT_name : sll + <91> DW_AT_decl_file : 1 + <92> DW_AT_decl_line : 15 + <93> DW_AT_type : <0x103> + <97> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><9a>: Abbrev Number: 3 (DW_TAG_member) + <9b> DW_AT_name : ull + <9f> DW_AT_decl_file : 1 + DW_AT_decl_line : 16 + DW_AT_type : <0x10a> + DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2>: Abbrev Number: 3 (DW_TAG_member) + DW_AT_name : ul + DW_AT_decl_file : 1 + DW_AT_decl_line : 17 + DW_AT_type : <0x111> + DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2>: Abbrev Number: 3 (DW_TAG_member) + DW_AT_name : asl + DW_AT_decl_file : 1 + DW_AT_decl_line : 18 + DW_AT_type : <0x118> + DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2>: Abbrev Number: 3 (DW_TAG_member) + DW_AT_name : f + DW_AT_decl_file : 1 + DW_AT_decl_line : 19 + DW_AT_type : <0xd2> + DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + <1>: Abbrev Number: 5 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 6 (signed char) + DW_AT_name : (indirect string, offset: 0x85): char + <1>: Abbrev Number: 5 (DW_TAG_base_type) + DW_AT_byte_size : 2 + DW_AT_encoding : 5 (signed) + DW_AT_name : (indirect string, offset: 0xd4): short int + <1>: Abbrev Number: 5 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 8 (unsigned char) + DW_AT_name : (indirect string, offset: 0x77): unsigned char + <1>: Abbrev Number: 6 (DW_TAG_base_type) + DW_AT_byte_size : 4 + DW_AT_encoding : 5 (signed) + DW_AT_name : int + <1>: Abbrev Number: 5 (DW_TAG_base_type) + DW_AT_byte_size : 4 + DW_AT_encoding : 7 (unsigned) + DW_AT_name : (indirect string, offset: 0xe): unsigned int + <1>: Abbrev Number: 5 (DW_TAG_base_type) + DW_AT_byte_size : 4 + DW_AT_encoding : 5 (signed) + DW_AT_name : (indirect string, offset: 0x8a): long int + <1>: Abbrev Number: 5 (DW_TAG_base_type) + DW_AT_byte_size : 2 + DW_AT_encoding : 7 (unsigned) + DW_AT_name : (indirect string, offset: 0xb8): short unsigned int + <1><103>: Abbrev Number: 5 (DW_TAG_base_type) + <104> DW_AT_byte_size : 8 + <105> DW_AT_encoding : 5 (signed) + <106> DW_AT_name : (indirect string, offset: 0x0): long long int + <1><10a>: Abbrev Number: 5 (DW_TAG_base_type) + <10b> DW_AT_byte_size : 8 + <10c> DW_AT_encoding : 7 (unsigned) + <10d> DW_AT_name : (indirect string, offset: 0x93): long long unsigned int + <1><111>: Abbrev Number: 5 (DW_TAG_base_type) + <112> DW_AT_byte_size : 4 + <113> DW_AT_encoding : 7 (unsigned) + <114> DW_AT_name : (indirect string, offset: 0x126): long unsigned int + <1><118>: Abbrev Number: 7 (DW_TAG_array_type) + <119> DW_AT_type : <0xf5> + <11d> DW_AT_sibling : <0x128> + <2><121>: Abbrev Number: 8 (DW_TAG_subrange_type) + <122> DW_AT_type : <0x128> + <126> DW_AT_upper_bound : 2 + <2><127>: Abbrev Number: 0 + <1><128>: Abbrev Number: 5 (DW_TAG_base_type) + <129> DW_AT_byte_size : 4 + <12a> DW_AT_encoding : 7 (unsigned) + <12b> DW_AT_name : (indirect string, offset: 0xcb): sizetype + <1><12f>: Abbrev Number: 9 (DW_TAG_union_type) + <130> DW_AT_byte_size : 8 + <131> DW_AT_decl_file : 1 + <132> DW_AT_decl_line : 22 + <133> DW_AT_sibling : <0x1a7> + <2><137>: Abbrev Number: 10 (DW_TAG_member) + <138> DW_AT_name : sll + <13c> DW_AT_decl_file : 1 + <13d> DW_AT_decl_line : 23 + <13e> DW_AT_type : <0x103> + <2><142>: Abbrev Number: 10 (DW_TAG_member) + <143> DW_AT_name : ull + <147> DW_AT_decl_file : 1 + <148> DW_AT_decl_line : 24 + <149> DW_AT_type : <0x10a> + <2><14d>: Abbrev Number: 10 (DW_TAG_member) + <14e> DW_AT_name : p + <150> DW_AT_decl_file : 1 + <151> DW_AT_decl_line : 25 + <152> DW_AT_type : <0xd0> + <2><156>: Abbrev Number: 10 (DW_TAG_member) + <157> DW_AT_name : sl + <15a> DW_AT_decl_file : 1 + <15b> DW_AT_decl_line : 26 + <15c> DW_AT_type : <0xf5> + <2><160>: Abbrev Number: 10 (DW_TAG_member) + <161> DW_AT_name : ul + <164> DW_AT_decl_file : 1 + <165> DW_AT_decl_line : 27 + <166> DW_AT_type : <0x111> + <2><16a>: Abbrev Number: 10 (DW_TAG_member) + <16b> DW_AT_name : si + <16e> DW_AT_decl_file : 1 + <16f> DW_AT_decl_line : 28 + <170> DW_AT_type : <0xe7> + <2><174>: Abbrev Number: 10 (DW_TAG_member) + <175> DW_AT_name : ui + <178> DW_AT_decl_file : 1 + <179> DW_AT_decl_line : 29 + <17a> DW_AT_type : <0xee> + <2><17e>: Abbrev Number: 10 (DW_TAG_member) + <17f> DW_AT_name : ss + <182> DW_AT_decl_file : 1 + <183> DW_AT_decl_line : 30 + <184> DW_AT_type : <0xd9> + <2><188>: Abbrev Number: 10 (DW_TAG_member) + <189> DW_AT_name : us + <18c> DW_AT_decl_file : 1 + <18d> DW_AT_decl_line : 31 + <18e> DW_AT_type : <0xfc> + <2><192>: Abbrev Number: 10 (DW_TAG_member) + <193> DW_AT_name : sc + <196> DW_AT_decl_file : 1 + <197> DW_AT_decl_line : 32 + <198> DW_AT_type : <0xd2> + <2><19c>: Abbrev Number: 10 (DW_TAG_member) + <19d> DW_AT_name : uc + <1a0> DW_AT_decl_file : 1 + <1a1> DW_AT_decl_line : 33 + <1a2> DW_AT_type : <0xe0> + <2><1a6>: Abbrev Number: 0 + <1><1a7>: Abbrev Number: 2 (DW_TAG_structure_type) + <1a8> DW_AT_byte_size : 96 + <1a9> DW_AT_decl_file : 1 + <1aa> DW_AT_decl_line : 2 + <1ab> DW_AT_sibling : <0x1d4> + <2><1af>: Abbrev Number: 3 (DW_TAG_member) + <1b0> DW_AT_name : s + <1b2> DW_AT_decl_file : 1 + <1b3> DW_AT_decl_line : 21 + <1b4> DW_AT_type : <0x1d> + <1b8> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1bb>: Abbrev Number: 3 (DW_TAG_member) + <1bc> DW_AT_name : u + <1be> DW_AT_decl_file : 1 + <1bf> DW_AT_decl_line : 34 + <1c0> DW_AT_type : <0x1d4> + <1c4> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><1c7>: Abbrev Number: 3 (DW_TAG_member) + <1c8> DW_AT_name : f + <1ca> DW_AT_decl_file : 1 + <1cb> DW_AT_decl_line : 35 + <1cc> DW_AT_type : <0x1e4> + <1d0> DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) + <2><1d3>: Abbrev Number: 0 + <1><1d4>: Abbrev Number: 7 (DW_TAG_array_type) + <1d5> DW_AT_type : <0x12f> + <1d9> DW_AT_sibling : <0x1e4> + <2><1dd>: Abbrev Number: 8 (DW_TAG_subrange_type) + <1de> DW_AT_type : <0x128> + <1e2> DW_AT_upper_bound : 2 + <2><1e3>: Abbrev Number: 0 + <1><1e4>: Abbrev Number: 7 (DW_TAG_array_type) + <1e5> DW_AT_type : <0xd9> + <1e9> DW_AT_sibling : <0x1f3> + <2><1ed>: Abbrev Number: 11 (DW_TAG_subrange_type) + <1ee> DW_AT_type : <0x128> + <2><1f2>: Abbrev Number: 0 + <1><1f3>: Abbrev Number: 12 (DW_TAG_typedef) + <1f4> DW_AT_name : (indirect string, offset: 0xaa): sample_struct + <1f8> DW_AT_decl_file : 1 + <1f9> DW_AT_decl_line : 36 + <1fa> DW_AT_type : <0x1a7> + <1><1fe>: Abbrev Number: 13 (DW_TAG_variable) + <1ff> DW_AT_name : (indirect string, offset: 0x1b): mpers_target_var + <203> DW_AT_decl_file : 1 + <204> DW_AT_decl_line : 37 + <205> DW_AT_type : <0x1f3> + <209> DW_AT_external : 1 + <20a> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><210>: Abbrev Number: 0 + diff --git a/mpers-m32/sample_struct.d2 b/mpers-m32/sample_struct.d2 new file mode 100644 index 000000000..8b088b646 --- /dev/null +++ b/mpers-m32/sample_struct.d2 @@ -0,0 +1,291 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_structure_type) +DW_AT_byte_size : 72 +DW_AT_decl_file : 1 +DW_AT_decl_line : 3 +DW_AT_sibling : <0xd0> +<2><25> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : p +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_type : <0xd0> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><31> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : sc +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0xd2> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><3e> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : ss +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0xd9> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<2><4b> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : uc +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xe0> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><58> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : si +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0xe7> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><65> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : ui +DW_AT_decl_file : 1 +DW_AT_decl_line : 11 +DW_AT_type : <0xee> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><72> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : sl +DW_AT_decl_file : 1 +DW_AT_decl_line : 12 +DW_AT_type : <0xf5> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><7f> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : us +DW_AT_decl_file : 1 +DW_AT_decl_line : 13 +DW_AT_type : <0xfc> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><8c> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : sll +DW_AT_decl_file : 1 +DW_AT_decl_line : 15 +DW_AT_type : <0x103> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><9a> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : ull +DW_AT_decl_file : 1 +DW_AT_decl_line : 16 +DW_AT_type : <0x10a> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : ul +DW_AT_decl_file : 1 +DW_AT_decl_line : 17 +DW_AT_type : <0x111> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : asl +DW_AT_decl_file : 1 +DW_AT_decl_line : 18 +DW_AT_type : <0x118> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : f +DW_AT_decl_file : 1 +DW_AT_decl_line : 19 +DW_AT_type : <0xd2> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x85): char +<1> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0xd4): short int +<1> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x77): unsigned char +<1> +Abbrev Number: 6 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xe): unsigned int +<1> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x8a): long int +<1> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb8): short unsigned int +<1><103> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x0): long long int +<1><10a> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x93): long long unsigned int +<1><111> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x126): long unsigned int +<1><118> +Abbrev Number: 7 (DW_TAG_array_type) +DW_AT_type : <0xf5> +DW_AT_sibling : <0x128> +<2><121> +Abbrev Number: 8 (DW_TAG_subrange_type) +DW_AT_type : <0x128> +DW_AT_upper_bound : 2 +<1><128> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xcb): sizetype +<1><12f> +Abbrev Number: 9 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 1 +DW_AT_decl_line : 22 +DW_AT_sibling : <0x1a7> +<2><137> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : sll +DW_AT_decl_file : 1 +DW_AT_decl_line : 23 +DW_AT_type : <0x103> +<2><142> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : ull +DW_AT_decl_file : 1 +DW_AT_decl_line : 24 +DW_AT_type : <0x10a> +<2><14d> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : p +DW_AT_decl_file : 1 +DW_AT_decl_line : 25 +DW_AT_type : <0xd0> +<2><156> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : sl +DW_AT_decl_file : 1 +DW_AT_decl_line : 26 +DW_AT_type : <0xf5> +<2><160> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : ul +DW_AT_decl_file : 1 +DW_AT_decl_line : 27 +DW_AT_type : <0x111> +<2><16a> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : si +DW_AT_decl_file : 1 +DW_AT_decl_line : 28 +DW_AT_type : <0xe7> +<2><174> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : ui +DW_AT_decl_file : 1 +DW_AT_decl_line : 29 +DW_AT_type : <0xee> +<2><17e> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : ss +DW_AT_decl_file : 1 +DW_AT_decl_line : 30 +DW_AT_type : <0xd9> +<2><188> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : us +DW_AT_decl_file : 1 +DW_AT_decl_line : 31 +DW_AT_type : <0xfc> +<2><192> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : sc +DW_AT_decl_file : 1 +DW_AT_decl_line : 32 +DW_AT_type : <0xd2> +<2><19c> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : uc +DW_AT_decl_file : 1 +DW_AT_decl_line : 33 +DW_AT_type : <0xe0> +<1><1a7> +Abbrev Number: 2 (DW_TAG_structure_type) +DW_AT_byte_size : 96 +DW_AT_decl_file : 1 +DW_AT_decl_line : 2 +DW_AT_sibling : <0x1d4> +<2><1af> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : s +DW_AT_decl_file : 1 +DW_AT_decl_line : 21 +DW_AT_type : <0x1d> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1bb> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : u +DW_AT_decl_file : 1 +DW_AT_decl_line : 34 +DW_AT_type : <0x1d4> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><1c7> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : f +DW_AT_decl_file : 1 +DW_AT_decl_line : 35 +DW_AT_type : <0x1e4> +DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) +<1><1d4> +Abbrev Number: 7 (DW_TAG_array_type) +DW_AT_type : <0x12f> +DW_AT_sibling : <0x1e4> +<2><1dd> +Abbrev Number: 8 (DW_TAG_subrange_type) +DW_AT_type : <0x128> +DW_AT_upper_bound : 2 +<1><1e4> +Abbrev Number: 7 (DW_TAG_array_type) +DW_AT_type : <0xd9> +DW_AT_sibling : <0x1f3> +<2><1ed> +Abbrev Number: 11 (DW_TAG_subrange_type) +DW_AT_type : <0x128> +<1><1f3> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xaa): sample_struct +DW_AT_decl_file : 1 +DW_AT_decl_line : 36 +DW_AT_type : <0x1a7> +<1><1fe> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1b): mpers_target_var +DW_AT_decl_file : 1 +DW_AT_decl_line : 37 +DW_AT_type : <0x1f3> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/sample_struct.h b/mpers-m32/sample_struct.h new file mode 100644 index 000000000..4c8398452 --- /dev/null +++ b/mpers-m32/sample_struct.h @@ -0,0 +1,39 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +struct { +mpers_ptr_t p; +char sc; +unsigned char mpers_filler_1[1]; +int16_t ss; +unsigned char uc; +unsigned char mpers_filler_2[3]; +int32_t si; +uint32_t ui; +int32_t sl; +uint16_t us; +unsigned char mpers_filler_3[6]; +int64_t sll; +uint64_t ull; +uint32_t ul; +int32_t asl[3]; +char f; +unsigned char mpers_end_filler_4[7]; +} ATTRIBUTE_PACKED s; +union { +int64_t sll; +uint64_t ull; +mpers_ptr_t p; +int32_t sl; +uint32_t ul; +int32_t si; +uint32_t ui; +int16_t ss; +uint16_t us; +char sc; +unsigned char uc; +} u[3]; +int16_t f[0]; +} ATTRIBUTE_PACKED m32_sample_struct; +#define MPERS_m32_sample_struct m32_sample_struct diff --git a/mpers-m32/seccomp_fprog_t.c b/mpers-m32/seccomp_fprog_t.c new file mode 100644 index 000000000..7f2f131a1 --- /dev/null +++ b/mpers-m32/seccomp_fprog_t.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "seccomp_fprog.h" +typedef struct seccomp_fprog seccomp_fprog_t; + +seccomp_fprog_t mpers_target_var; diff --git a/mpers-m32/seccomp_fprog_t.d1 b/mpers-m32/seccomp_fprog_t.d1 new file mode 100644 index 000000000..ed12ff30a --- /dev/null +++ b/mpers-m32/seccomp_fprog_t.d1 @@ -0,0 +1,179 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x16a (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x16d): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xd4): mpers-m32/seccomp_fprog_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x80): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x141): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x156): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x109): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xb8): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x12e): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x160): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x69): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0xcb): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x57): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x14d): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0xc6): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x117): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x51): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0xf9): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xf0): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1f): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x11): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x103): _Bool + <1>: Abbrev Number: 6 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x28): seccomp_fprog + <102> DW_AT_byte_size : 8 + <103> DW_AT_decl_file : 2 + <104> DW_AT_decl_line : 4 + <105> DW_AT_sibling : <0x126> + <2><109>: Abbrev Number: 8 (DW_TAG_member) + <10a> DW_AT_name : len + <10e> DW_AT_decl_file : 2 + <10f> DW_AT_decl_line : 5 + <110> DW_AT_type : <0x40> + <114> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><117>: Abbrev Number: 7 (DW_TAG_member) + <118> DW_AT_name : (indirect string, offset: 0xb1): filter + <11c> DW_AT_decl_file : 2 + <11d> DW_AT_decl_line : 6 + <11e> DW_AT_type : <0x5c> + <122> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><125>: Abbrev Number: 0 + <1><126>: Abbrev Number: 11 (DW_TAG_typedef) + <127> DW_AT_name : (indirect string, offset: 0x11e): seccomp_fprog_t + <12b> DW_AT_decl_file : 3 + <12c> DW_AT_decl_line : 32 + <12d> DW_AT_type : <0xfd> + <1><131>: Abbrev Number: 12 (DW_TAG_variable) + <132> DW_AT_name : (indirect string, offset: 0x0): current_wordsize + <136> DW_AT_decl_file : 4 + <137> DW_AT_decl_line : 757 + <139> DW_AT_type : <0x47> + <13d> DW_AT_external : 1 + <13e> DW_AT_declaration : 1 + <1><13f>: Abbrev Number: 12 (DW_TAG_variable) + <140> DW_AT_name : (indirect string, offset: 0x117): sysent + <144> DW_AT_decl_file : 4 + <145> DW_AT_decl_line : 892 + <147> DW_AT_type : <0xeb> + <14b> DW_AT_external : 1 + <14c> DW_AT_declaration : 1 + <1><14d>: Abbrev Number: 12 (DW_TAG_variable) + <14e> DW_AT_name : (indirect string, offset: 0x36): nsyscalls + <152> DW_AT_decl_file : 4 + <153> DW_AT_decl_line : 903 + <155> DW_AT_type : <0x47> + <159> DW_AT_external : 1 + <15a> DW_AT_declaration : 1 + <1><15b>: Abbrev Number: 13 (DW_TAG_variable) + <15c> DW_AT_name : (indirect string, offset: 0x40): mpers_target_var + <160> DW_AT_decl_file : 3 + <161> DW_AT_decl_line : 34 + <162> DW_AT_type : <0x126> + <166> DW_AT_external : 1 + <167> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><16d>: Abbrev Number: 0 + diff --git a/mpers-m32/seccomp_fprog_t.d2 b/mpers-m32/seccomp_fprog_t.d2 new file mode 100644 index 000000000..d3ce1e2d1 --- /dev/null +++ b/mpers-m32/seccomp_fprog_t.d2 @@ -0,0 +1,196 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x141): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x156): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x109): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xb8): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x12e): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x160): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x69): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0xcb): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x57): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x14d): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0xc6): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x117): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x51): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf9): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf0): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x103): _Bool +<1> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x28): seccomp_fprog +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x126> +<2><109> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : len +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><117> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb1): filter +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><126> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11e): seccomp_fprog_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 32 +DW_AT_type : <0xfd> +<1><131> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x0): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><13f> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x117): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><14d> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x36): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><15b> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x40): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 34 +DW_AT_type : <0x126> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/seccomp_fprog_t.h b/mpers-m32/seccomp_fprog_t.h new file mode 100644 index 000000000..9c0847692 --- /dev/null +++ b/mpers-m32/seccomp_fprog_t.h @@ -0,0 +1,9 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint16_t len; +unsigned char mpers_filler_1[2]; +uint32_t filter; +} ATTRIBUTE_PACKED m32_seccomp_fprog_t; +#define MPERS_m32_seccomp_fprog_t m32_seccomp_fprog_t diff --git a/mpers-m32/shmid_ds_t.c b/mpers-m32/shmid_ds_t.c new file mode 100644 index 000000000..0d77b84be --- /dev/null +++ b/mpers-m32/shmid_ds_t.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 1993 Ulrich Pegelow + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2003-2006 Roland McGrath + * Copyright (c) 2006-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "ipc_defs.h" + +#ifdef HAVE_SYS_SHM_H +/* The C library generally exports the struct the current kernel expects. */ +# include +typedef struct shmid_ds shmid_ds_t; +#elif defined HAVE_LINUX_SHM_H +/* The linux header might provide the right struct. */ +# include +typedef struct shmid64_ds shmid_ds_t; +#endif + +shmid_ds_t mpers_target_var; diff --git a/mpers-m32/shmid_ds_t.d1 b/mpers-m32/shmid_ds_t.d1 new file mode 100644 index 000000000..e01ede7d8 --- /dev/null +++ b/mpers-m32/shmid_ds_t.d1 @@ -0,0 +1,358 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x303 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x11b): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xa4): mpers-m32/shmid_ds_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x19f): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x282): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x215): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1eb): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x96): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x41): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x172): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x7f): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x271): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xbb): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x39): __uid_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 125 + <6a> DW_AT_type : <0x47> + <1><6e>: Abbrev Number: 4 (DW_TAG_typedef) + <6f> DW_AT_name : (indirect string, offset: 0x1da): __gid_t + <73> DW_AT_decl_file : 1 + <74> DW_AT_decl_line : 126 + <75> DW_AT_type : <0x47> + <1><79>: Abbrev Number: 4 (DW_TAG_typedef) + <7a> DW_AT_name : (indirect string, offset: 0x27a): __pid_t + <7e> DW_AT_decl_file : 1 + <7f> DW_AT_decl_line : 133 + <80> DW_AT_type : <0x2b> + <1><84>: Abbrev Number: 2 (DW_TAG_base_type) + <85> DW_AT_byte_size : 4 + <86> DW_AT_encoding : 7 (unsigned) + <87> DW_AT_name : (indirect string, offset: 0x1e2): sizetype + <1><8b>: Abbrev Number: 4 (DW_TAG_typedef) + <8c> DW_AT_name : (indirect string, offset: 0x10c): __time_t + <90> DW_AT_decl_file : 1 + <91> DW_AT_decl_line : 139 + <92> DW_AT_type : <0x55> + <1><96>: Abbrev Number: 4 (DW_TAG_typedef) + <97> DW_AT_name : (indirect string, offset: 0x197): __key_t + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 144 + <9d> DW_AT_type : <0x2b> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x54): __syscall_ulong_t + DW_AT_decl_file : 1 + DW_AT_decl_line : 177 + DW_AT_type : <0x5c> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 6 (signed char) + DW_AT_name : (indirect string, offset: 0x18d): char + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x0): size_t + DW_AT_decl_file : 2 + DW_AT_decl_line : 212 + DW_AT_type : <0x47> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xc4> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xac> + <1>: Abbrev Number: 7 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xd2): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x11c> + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x115): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x75): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + <100> DW_AT_name : (indirect string, offset: 0x2bb): sys_func + <104> DW_AT_decl_file : 3 + <105> DW_AT_decl_line : 8 + <106> DW_AT_type : <0x127> + <10a> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><10d>: Abbrev Number: 8 (DW_TAG_member) + <10e> DW_AT_name : (indirect string, offset: 0x66): sys_name + <112> DW_AT_decl_file : 3 + <113> DW_AT_decl_line : 9 + <114> DW_AT_type : <0xbe> + <118> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><11b>: Abbrev Number: 0 + <1><11c>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <11d> DW_AT_type : <0x2b> + <121> DW_AT_sibling : <0x127> + <2><125>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><126>: Abbrev Number: 0 + <1><127>: Abbrev Number: 5 (DW_TAG_pointer_type) + <128> DW_AT_byte_size : 4 + <129> DW_AT_type : <0x11c> + <1><12d>: Abbrev Number: 4 (DW_TAG_typedef) + <12e> DW_AT_name : (indirect string, offset: 0x17f): struct_sysent + <132> DW_AT_decl_file : 3 + <133> DW_AT_decl_line : 10 + <134> DW_AT_type : <0xc9> + <1><138>: Abbrev Number: 5 (DW_TAG_pointer_type) + <139> DW_AT_byte_size : 4 + <13a> DW_AT_type : <0x13e> + <1><13e>: Abbrev Number: 6 (DW_TAG_const_type) + <13f> DW_AT_type : <0x12d> + <1><143>: Abbrev Number: 2 (DW_TAG_base_type) + <144> DW_AT_byte_size : 1 + <145> DW_AT_encoding : 2 (boolean) + <146> DW_AT_name : (indirect string, offset: 0x2c): _Bool + <1><14a>: Abbrev Number: 7 (DW_TAG_structure_type) + <14b> DW_AT_name : (indirect string, offset: 0x231): ipc_perm + <14f> DW_AT_byte_size : 36 + <150> DW_AT_decl_file : 4 + <151> DW_AT_decl_line : 42 + <152> DW_AT_sibling : <0x1f1> + <2><156>: Abbrev Number: 8 (DW_TAG_member) + <157> DW_AT_name : (indirect string, offset: 0x16c): __key + <15b> DW_AT_decl_file : 4 + <15c> DW_AT_decl_line : 44 + <15d> DW_AT_type : <0x96> + <161> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><164>: Abbrev Number: 9 (DW_TAG_member) + <165> DW_AT_name : uid + <169> DW_AT_decl_file : 4 + <16a> DW_AT_decl_line : 45 + <16b> DW_AT_type : <0x63> + <16f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><172>: Abbrev Number: 9 (DW_TAG_member) + <173> DW_AT_name : gid + <177> DW_AT_decl_file : 4 + <178> DW_AT_decl_line : 46 + <179> DW_AT_type : <0x6e> + <17d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><180>: Abbrev Number: 8 (DW_TAG_member) + <181> DW_AT_name : (indirect string, offset: 0xe4): cuid + <185> DW_AT_decl_file : 4 + <186> DW_AT_decl_line : 47 + <187> DW_AT_type : <0x63> + <18b> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><18e>: Abbrev Number: 8 (DW_TAG_member) + <18f> DW_AT_name : (indirect string, offset: 0xcd): cgid + <193> DW_AT_decl_file : 4 + <194> DW_AT_decl_line : 48 + <195> DW_AT_type : <0x6e> + <199> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><19c>: Abbrev Number: 8 (DW_TAG_member) + <19d> DW_AT_name : (indirect string, offset: 0x192): mode + <1a1> DW_AT_decl_file : 4 + <1a2> DW_AT_decl_line : 49 + <1a3> DW_AT_type : <0x40> + <1a7> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><1aa>: Abbrev Number: 8 (DW_TAG_member) + <1ab> DW_AT_name : (indirect string, offset: 0x26a): __pad1 + <1af> DW_AT_decl_file : 4 + <1b0> DW_AT_decl_line : 50 + <1b1> DW_AT_type : <0x40> + <1b5> DW_AT_data_member_location: 2 byte block: 23 16 (DW_OP_plus_uconst: 22) + <2><1b8>: Abbrev Number: 8 (DW_TAG_member) + <1b9> DW_AT_name : (indirect string, offset: 0x6f): __seq + <1bd> DW_AT_decl_file : 4 + <1be> DW_AT_decl_line : 51 + <1bf> DW_AT_type : <0x40> + <1c3> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1c6>: Abbrev Number: 8 (DW_TAG_member) + <1c7> DW_AT_name : (indirect string, offset: 0x32): __pad2 + <1cb> DW_AT_decl_file : 4 + <1cc> DW_AT_decl_line : 52 + <1cd> DW_AT_type : <0x40> + <1d1> DW_AT_data_member_location: 2 byte block: 23 1a (DW_OP_plus_uconst: 26) + <2><1d4>: Abbrev Number: 8 (DW_TAG_member) + <1d5> DW_AT_name : (indirect string, offset: 0xe9): __glibc_reserved1 + <1d9> DW_AT_decl_file : 4 + <1da> DW_AT_decl_line : 53 + <1db> DW_AT_type : <0xa1> + <1df> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><1e2>: Abbrev Number: 8 (DW_TAG_member) + <1e3> DW_AT_name : (indirect string, offset: 0x21f): __glibc_reserved2 + <1e7> DW_AT_decl_file : 4 + <1e8> DW_AT_decl_line : 54 + <1e9> DW_AT_type : <0xa1> + <1ed> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1f0>: Abbrev Number: 0 + <1><1f1>: Abbrev Number: 4 (DW_TAG_typedef) + <1f2> DW_AT_name : (indirect string, offset: 0x2a0): shmatt_t + <1f6> DW_AT_decl_file : 5 + <1f7> DW_AT_decl_line : 46 + <1f8> DW_AT_type : <0xa1> + <1><1fc>: Abbrev Number: 7 (DW_TAG_structure_type) + <1fd> DW_AT_name : (indirect string, offset: 0x256): shmid_ds + <201> DW_AT_byte_size : 84 + <202> DW_AT_decl_file : 5 + <203> DW_AT_decl_line : 49 + <204> DW_AT_sibling : <0x2bf> + <2><208>: Abbrev Number: 8 (DW_TAG_member) + <209> DW_AT_name : (indirect string, offset: 0x1f9): shm_perm + <20d> DW_AT_decl_file : 5 + <20e> DW_AT_decl_line : 51 + <20f> DW_AT_type : <0x14a> + <213> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><216>: Abbrev Number: 8 (DW_TAG_member) + <217> DW_AT_name : (indirect string, offset: 0x18): shm_segsz + <21b> DW_AT_decl_file : 5 + <21c> DW_AT_decl_line : 52 + <21d> DW_AT_type : <0xb3> + <221> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><224>: Abbrev Number: 8 (DW_TAG_member) + <225> DW_AT_name : (indirect string, offset: 0x202): shm_atime + <229> DW_AT_decl_file : 5 + <22a> DW_AT_decl_line : 53 + <22b> DW_AT_type : <0x8b> + <22f> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><232>: Abbrev Number: 8 (DW_TAG_member) + <233> DW_AT_name : (indirect string, offset: 0xe9): __glibc_reserved1 + <237> DW_AT_decl_file : 5 + <238> DW_AT_decl_line : 55 + <239> DW_AT_type : <0x5c> + <23d> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><240>: Abbrev Number: 8 (DW_TAG_member) + <241> DW_AT_name : (indirect string, offset: 0x22): shm_dtime + <245> DW_AT_decl_file : 5 + <246> DW_AT_decl_line : 57 + <247> DW_AT_type : <0x8b> + <24b> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><24e>: Abbrev Number: 8 (DW_TAG_member) + <24f> DW_AT_name : (indirect string, offset: 0x21f): __glibc_reserved2 + <253> DW_AT_decl_file : 5 + <254> DW_AT_decl_line : 59 + <255> DW_AT_type : <0x5c> + <259> DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2><25c>: Abbrev Number: 8 (DW_TAG_member) + <25d> DW_AT_name : (indirect string, offset: 0x23a): shm_ctime + <261> DW_AT_decl_file : 5 + <262> DW_AT_decl_line : 61 + <263> DW_AT_type : <0x8b> + <267> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><26a>: Abbrev Number: 8 (DW_TAG_member) + <26b> DW_AT_name : (indirect string, offset: 0x28e): __glibc_reserved3 + <26f> DW_AT_decl_file : 5 + <270> DW_AT_decl_line : 63 + <271> DW_AT_type : <0x5c> + <275> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><278>: Abbrev Number: 8 (DW_TAG_member) + <279> DW_AT_name : (indirect string, offset: 0x20c): shm_cpid + <27d> DW_AT_decl_file : 5 + <27e> DW_AT_decl_line : 65 + <27f> DW_AT_type : <0x79> + <283> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><286>: Abbrev Number: 8 (DW_TAG_member) + <287> DW_AT_name : (indirect string, offset: 0x163): shm_lpid + <28b> DW_AT_decl_file : 5 + <28c> DW_AT_decl_line : 66 + <28d> DW_AT_type : <0x79> + <291> DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) + <2><294>: Abbrev Number: 8 (DW_TAG_member) + <295> DW_AT_name : (indirect string, offset: 0x25f): shm_nattch + <299> DW_AT_decl_file : 5 + <29a> DW_AT_decl_line : 67 + <29b> DW_AT_type : <0x1f1> + <29f> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><2a2>: Abbrev Number: 8 (DW_TAG_member) + <2a3> DW_AT_name : (indirect string, offset: 0x2a9): __glibc_reserved4 + <2a7> DW_AT_decl_file : 5 + <2a8> DW_AT_decl_line : 68 + <2a9> DW_AT_type : <0xa1> + <2ad> DW_AT_data_member_location: 2 byte block: 23 4c (DW_OP_plus_uconst: 76) + <2><2b0>: Abbrev Number: 8 (DW_TAG_member) + <2b1> DW_AT_name : (indirect string, offset: 0x244): __glibc_reserved5 + <2b5> DW_AT_decl_file : 5 + <2b6> DW_AT_decl_line : 69 + <2b7> DW_AT_type : <0xa1> + <2bb> DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) + <2><2be>: Abbrev Number: 0 + <1><2bf>: Abbrev Number: 4 (DW_TAG_typedef) + <2c0> DW_AT_name : (indirect string, offset: 0xd9): shmid_ds_t + <2c4> DW_AT_decl_file : 6 + <2c5> DW_AT_decl_line : 41 + <2c6> DW_AT_type : <0x1fc> + <1><2ca>: Abbrev Number: 12 (DW_TAG_variable) + <2cb> DW_AT_name : (indirect string, offset: 0xfb): current_wordsize + <2cf> DW_AT_decl_file : 7 + <2d0> DW_AT_decl_line : 757 + <2d2> DW_AT_type : <0x47> + <2d6> DW_AT_external : 1 + <2d7> DW_AT_declaration : 1 + <1><2d8>: Abbrev Number: 12 (DW_TAG_variable) + <2d9> DW_AT_name : (indirect string, offset: 0xd2): sysent + <2dd> DW_AT_decl_file : 7 + <2de> DW_AT_decl_line : 892 + <2e0> DW_AT_type : <0x138> + <2e4> DW_AT_external : 1 + <2e5> DW_AT_declaration : 1 + <1><2e6>: Abbrev Number: 12 (DW_TAG_variable) + <2e7> DW_AT_name : (indirect string, offset: 0x1d0): nsyscalls + <2eb> DW_AT_decl_file : 7 + <2ec> DW_AT_decl_line : 903 + <2ee> DW_AT_type : <0x47> + <2f2> DW_AT_external : 1 + <2f3> DW_AT_declaration : 1 + <1><2f4>: Abbrev Number: 13 (DW_TAG_variable) + <2f5> DW_AT_name : (indirect string, offset: 0x7): mpers_target_var + <2f9> DW_AT_decl_file : 6 + <2fa> DW_AT_decl_line : 48 + <2fb> DW_AT_type : <0x2bf> + <2ff> DW_AT_external : 1 + <300> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><306>: Abbrev Number: 0 + diff --git a/mpers-m32/shmid_ds_t.d2 b/mpers-m32/shmid_ds_t.d2 new file mode 100644 index 000000000..ee44b07e9 --- /dev/null +++ b/mpers-m32/shmid_ds_t.d2 @@ -0,0 +1,405 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x282): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x215): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1eb): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x96): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x41): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x172): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x7f): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x271): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xbb): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x39): __uid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 125 +DW_AT_type : <0x47> +<1><6e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1da): __gid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 126 +DW_AT_type : <0x47> +<1><79> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x27a): __pid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 133 +DW_AT_type : <0x2b> +<1><84> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1e2): sizetype +<1><8b> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x10c): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x55> +<1><96> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x197): __key_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 144 +DW_AT_type : <0x2b> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x54): __syscall_ulong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 177 +DW_AT_type : <0x5c> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x18d): char +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): size_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 212 +DW_AT_type : <0x47> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xc4> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xac> +<1> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xd2): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x11c> +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x115): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x75): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2bb): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x127> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><10d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x66): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0xbe> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><11c> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x127> +<2><125> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><127> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x11c> +<1><12d> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x17f): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xc9> +<1><138> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x13e> +<1><13e> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x12d> +<1><143> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x2c): _Bool +<1><14a> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x231): ipc_perm +DW_AT_byte_size : 36 +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_sibling : <0x1f1> +<2><156> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16c): __key +DW_AT_decl_file : 4 +DW_AT_decl_line : 44 +DW_AT_type : <0x96> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><164> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : uid +DW_AT_decl_file : 4 +DW_AT_decl_line : 45 +DW_AT_type : <0x63> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><172> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : gid +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x6e> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><180> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe4): cuid +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x63> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><18e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xcd): cgid +DW_AT_decl_file : 4 +DW_AT_decl_line : 48 +DW_AT_type : <0x6e> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><19c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x192): mode +DW_AT_decl_file : 4 +DW_AT_decl_line : 49 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><1aa> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x26a): __pad1 +DW_AT_decl_file : 4 +DW_AT_decl_line : 50 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 16 (DW_OP_plus_uconst: 22) +<2><1b8> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6f): __seq +DW_AT_decl_file : 4 +DW_AT_decl_line : 51 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1c6> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x32): __pad2 +DW_AT_decl_file : 4 +DW_AT_decl_line : 52 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 1a (DW_OP_plus_uconst: 26) +<2><1d4> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe9): __glibc_reserved1 +DW_AT_decl_file : 4 +DW_AT_decl_line : 53 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><1e2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21f): __glibc_reserved2 +DW_AT_decl_file : 4 +DW_AT_decl_line : 54 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<1><1f1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2a0): shmatt_t +DW_AT_decl_file : 5 +DW_AT_decl_line : 46 +DW_AT_type : <0xa1> +<1><1fc> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x256): shmid_ds +DW_AT_byte_size : 84 +DW_AT_decl_file : 5 +DW_AT_decl_line : 49 +DW_AT_sibling : <0x2bf> +<2><208> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f9): shm_perm +DW_AT_decl_file : 5 +DW_AT_decl_line : 51 +DW_AT_type : <0x14a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><216> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18): shm_segsz +DW_AT_decl_file : 5 +DW_AT_decl_line : 52 +DW_AT_type : <0xb3> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><224> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x202): shm_atime +DW_AT_decl_file : 5 +DW_AT_decl_line : 53 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><232> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe9): __glibc_reserved1 +DW_AT_decl_file : 5 +DW_AT_decl_line : 55 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><240> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22): shm_dtime +DW_AT_decl_file : 5 +DW_AT_decl_line : 57 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><24e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21f): __glibc_reserved2 +DW_AT_decl_file : 5 +DW_AT_decl_line : 59 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2><25c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23a): shm_ctime +DW_AT_decl_file : 5 +DW_AT_decl_line : 61 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><26a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x28e): __glibc_reserved3 +DW_AT_decl_file : 5 +DW_AT_decl_line : 63 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<2><278> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x20c): shm_cpid +DW_AT_decl_file : 5 +DW_AT_decl_line : 65 +DW_AT_type : <0x79> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><286> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x163): shm_lpid +DW_AT_decl_file : 5 +DW_AT_decl_line : 66 +DW_AT_type : <0x79> +DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) +<2><294> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x25f): shm_nattch +DW_AT_decl_file : 5 +DW_AT_decl_line : 67 +DW_AT_type : <0x1f1> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><2a2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2a9): __glibc_reserved4 +DW_AT_decl_file : 5 +DW_AT_decl_line : 68 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 4c (DW_OP_plus_uconst: 76) +<2><2b0> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x244): __glibc_reserved5 +DW_AT_decl_file : 5 +DW_AT_decl_line : 69 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) +<1><2bf> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xd9): shmid_ds_t +DW_AT_decl_file : 6 +DW_AT_decl_line : 41 +DW_AT_type : <0x1fc> +<1><2ca> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xfb): current_wordsize +DW_AT_decl_file : 7 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2d8> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd2): sysent +DW_AT_decl_file : 7 +DW_AT_decl_line : 892 +DW_AT_type : <0x138> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2e6> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1d0): nsyscalls +DW_AT_decl_file : 7 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2f4> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x7): mpers_target_var +DW_AT_decl_file : 6 +DW_AT_decl_line : 48 +DW_AT_type : <0x2bf> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/shmid_ds_t.h b/mpers-m32/shmid_ds_t.h new file mode 100644 index 000000000..97bf2e1ff --- /dev/null +++ b/mpers-m32/shmid_ds_t.h @@ -0,0 +1,31 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +struct { +int32_t __key; +uint32_t uid; +uint32_t gid; +uint32_t cuid; +uint32_t cgid; +uint16_t mode; +uint16_t __pad1; +uint16_t __seq; +uint16_t __pad2; +uint32_t __glibc_reserved1; +uint32_t __glibc_reserved2; +} ATTRIBUTE_PACKED shm_perm; +uint32_t shm_segsz; +int32_t shm_atime; +uint32_t __glibc_reserved1; +int32_t shm_dtime; +uint32_t __glibc_reserved2; +int32_t shm_ctime; +uint32_t __glibc_reserved3; +int32_t shm_cpid; +int32_t shm_lpid; +uint32_t shm_nattch; +uint32_t __glibc_reserved4; +uint32_t __glibc_reserved5; +} ATTRIBUTE_PACKED m32_shmid_ds_t; +#define MPERS_m32_shmid_ds_t m32_shmid_ds_t diff --git a/mpers-m32/siginfo_t.c b/mpers-m32/siginfo_t.c new file mode 100644 index 000000000..b00fa38c8 --- /dev/null +++ b/mpers-m32/siginfo_t.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993-1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2001 John Hughes + * Copyright (c) 2013 Denys Vlasenko + * Copyright (c) 2011-2015 Dmitry V. Levin + * Copyright (c) 2015 Elvira Khabirova + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include + +siginfo_t mpers_target_var; diff --git a/mpers-m32/siginfo_t.d1 b/mpers-m32/siginfo_t.d1 new file mode 100644 index 000000000..c46c3c5a5 --- /dev/null +++ b/mpers-m32/siginfo_t.d1 @@ -0,0 +1,449 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x3a6 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x126): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x19e): mpers-m32/siginfo_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x254): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x240): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x213): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x9f): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xad): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x3b): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x59): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x297): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x22f): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xcc): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x33): __uid_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 125 + <6a> DW_AT_type : <0x47> + <1><6e>: Abbrev Number: 4 (DW_TAG_typedef) + <6f> DW_AT_name : (indirect string, offset: 0x238): __pid_t + <73> DW_AT_decl_file : 1 + <74> DW_AT_decl_line : 133 + <75> DW_AT_type : <0x2b> + <1><79>: Abbrev Number: 2 (DW_TAG_base_type) + <7a> DW_AT_byte_size : 4 + <7b> DW_AT_encoding : 7 (unsigned) + <7c> DW_AT_name : (indirect string, offset: 0x1d6): sizetype + <1><80>: Abbrev Number: 4 (DW_TAG_typedef) + <81> DW_AT_name : (indirect string, offset: 0x1ff): __clock_t + <85> DW_AT_decl_file : 1 + <86> DW_AT_decl_line : 135 + <87> DW_AT_type : <0x55> + <1><8b>: Abbrev Number: 5 (DW_TAG_pointer_type) + <8c> DW_AT_byte_size : 4 + <1><8d>: Abbrev Number: 2 (DW_TAG_base_type) + <8e> DW_AT_byte_size : 1 + <8f> DW_AT_encoding : 6 (signed char) + <90> DW_AT_name : (indirect string, offset: 0x199): char + <1><94>: Abbrev Number: 6 (DW_TAG_pointer_type) + <95> DW_AT_byte_size : 4 + <96> DW_AT_type : <0x9a> + <1><9a>: Abbrev Number: 7 (DW_TAG_const_type) + <9b> DW_AT_type : <0x8d> + <1><9f>: Abbrev Number: 8 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xde): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 2 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xf2> + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x10d): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x95): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x28e): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0xfd> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x6e): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 + DW_AT_type : <0x94> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 11 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xfd> + <2>: Abbrev Number: 12 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 6 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf2> + <1><103>: Abbrev Number: 4 (DW_TAG_typedef) + <104> DW_AT_name : (indirect string, offset: 0x181): struct_sysent + <108> DW_AT_decl_file : 2 + <109> DW_AT_decl_line : 10 + <10a> DW_AT_type : <0x9f> + <1><10e>: Abbrev Number: 6 (DW_TAG_pointer_type) + <10f> DW_AT_byte_size : 4 + <110> DW_AT_type : <0x114> + <1><114>: Abbrev Number: 7 (DW_TAG_const_type) + <115> DW_AT_type : <0x103> + <1><119>: Abbrev Number: 2 (DW_TAG_base_type) + <11a> DW_AT_byte_size : 1 + <11b> DW_AT_encoding : 2 (boolean) + <11c> DW_AT_name : (indirect string, offset: 0x26): _Bool + <1><120>: Abbrev Number: 13 (DW_TAG_union_type) + <121> DW_AT_name : (indirect string, offset: 0x1f8): sigval + <125> DW_AT_byte_size : 4 + <126> DW_AT_decl_file : 3 + <127> DW_AT_decl_line : 32 + <128> DW_AT_sibling : <0x143> + <2><12c>: Abbrev Number: 14 (DW_TAG_member) + <12d> DW_AT_name : (indirect string, offset: 0xbb): sival_int + <131> DW_AT_decl_file : 3 + <132> DW_AT_decl_line : 34 + <133> DW_AT_type : <0x2b> + <2><137>: Abbrev Number: 14 (DW_TAG_member) + <138> DW_AT_name : (indirect string, offset: 0x2b6): sival_ptr + <13c> DW_AT_decl_file : 3 + <13d> DW_AT_decl_line : 35 + <13e> DW_AT_type : <0x8b> + <2><142>: Abbrev Number: 0 + <1><143>: Abbrev Number: 4 (DW_TAG_typedef) + <144> DW_AT_name : (indirect string, offset: 0x113): sigval_t + <148> DW_AT_decl_file : 3 + <149> DW_AT_decl_line : 36 + <14a> DW_AT_type : <0x120> + <1><14e>: Abbrev Number: 4 (DW_TAG_typedef) + <14f> DW_AT_name : (indirect string, offset: 0x1c4): __sigchld_clock_t + <153> DW_AT_decl_file : 3 + <154> DW_AT_decl_line : 58 + <155> DW_AT_type : <0x80> + <1><159>: Abbrev Number: 15 (DW_TAG_structure_type) + <15a> DW_AT_byte_size : 8 + <15b> DW_AT_decl_file : 3 + <15c> DW_AT_decl_line : 74 + <15d> DW_AT_sibling : <0x17e> + <2><161>: Abbrev Number: 9 (DW_TAG_member) + <162> DW_AT_name : (indirect string, offset: 0x7d): si_pid + <166> DW_AT_decl_file : 3 + <167> DW_AT_decl_line : 76 + <168> DW_AT_type : <0x6e> + <16c> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><16f>: Abbrev Number: 9 (DW_TAG_member) + <170> DW_AT_name : (indirect string, offset: 0xc5): si_uid + <174> DW_AT_decl_file : 3 + <175> DW_AT_decl_line : 77 + <176> DW_AT_type : <0x63> + <17a> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><17d>: Abbrev Number: 0 + <1><17e>: Abbrev Number: 15 (DW_TAG_structure_type) + <17f> DW_AT_byte_size : 12 + <180> DW_AT_decl_file : 3 + <181> DW_AT_decl_line : 81 + <182> DW_AT_sibling : <0x1b1> + <2><186>: Abbrev Number: 9 (DW_TAG_member) + <187> DW_AT_name : (indirect string, offset: 0x2c): si_tid + <18b> DW_AT_decl_file : 3 + <18c> DW_AT_decl_line : 83 + <18d> DW_AT_type : <0x2b> + <191> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><194>: Abbrev Number: 9 (DW_TAG_member) + <195> DW_AT_name : (indirect string, offset: 0x4e): si_overrun + <199> DW_AT_decl_file : 3 + <19a> DW_AT_decl_line : 84 + <19b> DW_AT_type : <0x2b> + <19f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1a2>: Abbrev Number: 9 (DW_TAG_member) + <1a3> DW_AT_name : (indirect string, offset: 0x18f): si_sigval + <1a7> DW_AT_decl_file : 3 + <1a8> DW_AT_decl_line : 85 + <1a9> DW_AT_type : <0x143> + <1ad> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1b0>: Abbrev Number: 0 + <1><1b1>: Abbrev Number: 15 (DW_TAG_structure_type) + <1b2> DW_AT_byte_size : 12 + <1b3> DW_AT_decl_file : 3 + <1b4> DW_AT_decl_line : 89 + <1b5> DW_AT_sibling : <0x1e4> + <2><1b9>: Abbrev Number: 9 (DW_TAG_member) + <1ba> DW_AT_name : (indirect string, offset: 0x7d): si_pid + <1be> DW_AT_decl_file : 3 + <1bf> DW_AT_decl_line : 91 + <1c0> DW_AT_type : <0x6e> + <1c4> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1c7>: Abbrev Number: 9 (DW_TAG_member) + <1c8> DW_AT_name : (indirect string, offset: 0xc5): si_uid + <1cc> DW_AT_decl_file : 3 + <1cd> DW_AT_decl_line : 92 + <1ce> DW_AT_type : <0x63> + <1d2> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1d5>: Abbrev Number: 9 (DW_TAG_member) + <1d6> DW_AT_name : (indirect string, offset: 0x18f): si_sigval + <1da> DW_AT_decl_file : 3 + <1db> DW_AT_decl_line : 93 + <1dc> DW_AT_type : <0x143> + <1e0> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1e3>: Abbrev Number: 0 + <1><1e4>: Abbrev Number: 15 (DW_TAG_structure_type) + <1e5> DW_AT_byte_size : 20 + <1e6> DW_AT_decl_file : 3 + <1e7> DW_AT_decl_line : 97 + <1e8> DW_AT_sibling : <0x233> + <2><1ec>: Abbrev Number: 9 (DW_TAG_member) + <1ed> DW_AT_name : (indirect string, offset: 0x7d): si_pid + <1f1> DW_AT_decl_file : 3 + <1f2> DW_AT_decl_line : 99 + <1f3> DW_AT_type : <0x6e> + <1f7> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1fa>: Abbrev Number: 9 (DW_TAG_member) + <1fb> DW_AT_name : (indirect string, offset: 0xc5): si_uid + <1ff> DW_AT_decl_file : 3 + <200> DW_AT_decl_line : 100 + <201> DW_AT_type : <0x63> + <205> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><208>: Abbrev Number: 9 (DW_TAG_member) + <209> DW_AT_name : (indirect string, offset: 0x1e6): si_status + <20d> DW_AT_decl_file : 3 + <20e> DW_AT_decl_line : 101 + <20f> DW_AT_type : <0x2b> + <213> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><216>: Abbrev Number: 9 (DW_TAG_member) + <217> DW_AT_name : (indirect string, offset: 0x226): si_utime + <21b> DW_AT_decl_file : 3 + <21c> DW_AT_decl_line : 102 + <21d> DW_AT_type : <0x14e> + <221> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><224>: Abbrev Number: 9 (DW_TAG_member) + <225> DW_AT_name : (indirect string, offset: 0xfb): si_stime + <229> DW_AT_decl_file : 3 + <22a> DW_AT_decl_line : 103 + <22b> DW_AT_type : <0x14e> + <22f> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><232>: Abbrev Number: 0 + <1><233>: Abbrev Number: 15 (DW_TAG_structure_type) + <234> DW_AT_byte_size : 8 + <235> DW_AT_decl_file : 3 + <236> DW_AT_decl_line : 107 + <237> DW_AT_sibling : <0x258> + <2><23b>: Abbrev Number: 9 (DW_TAG_member) + <23c> DW_AT_name : (indirect string, offset: 0x66): si_addr + <240> DW_AT_decl_file : 3 + <241> DW_AT_decl_line : 109 + <242> DW_AT_type : <0x8b> + <246> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><249>: Abbrev Number: 9 (DW_TAG_member) + <24a> DW_AT_name : (indirect string, offset: 0xf): si_addr_lsb + <24e> DW_AT_decl_file : 3 + <24f> DW_AT_decl_line : 110 + <250> DW_AT_type : <0x24> + <254> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><257>: Abbrev Number: 0 + <1><258>: Abbrev Number: 15 (DW_TAG_structure_type) + <259> DW_AT_byte_size : 8 + <25a> DW_AT_decl_file : 3 + <25b> DW_AT_decl_line : 114 + <25c> DW_AT_sibling : <0x27d> + <2><260>: Abbrev Number: 9 (DW_TAG_member) + <261> DW_AT_name : (indirect string, offset: 0x24c): si_band + <265> DW_AT_decl_file : 3 + <266> DW_AT_decl_line : 116 + <267> DW_AT_type : <0x55> + <26b> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><26e>: Abbrev Number: 9 (DW_TAG_member) + <26f> DW_AT_name : (indirect string, offset: 0x1b4): si_fd + <273> DW_AT_decl_file : 3 + <274> DW_AT_decl_line : 117 + <275> DW_AT_type : <0x2b> + <279> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><27c>: Abbrev Number: 0 + <1><27d>: Abbrev Number: 15 (DW_TAG_structure_type) + <27e> DW_AT_byte_size : 12 + <27f> DW_AT_decl_file : 3 + <280> DW_AT_decl_line : 121 + <281> DW_AT_sibling : <0x2b0> + <2><285>: Abbrev Number: 9 (DW_TAG_member) + <286> DW_AT_name : (indirect string, offset: 0x1b): _call_addr + <28a> DW_AT_decl_file : 3 + <28b> DW_AT_decl_line : 123 + <28c> DW_AT_type : <0x8b> + <290> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><293>: Abbrev Number: 9 (DW_TAG_member) + <294> DW_AT_name : (indirect string, offset: 0x104): _syscall + <298> DW_AT_decl_file : 3 + <299> DW_AT_decl_line : 124 + <29a> DW_AT_type : <0x2b> + <29e> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><2a1>: Abbrev Number: 9 (DW_TAG_member) + <2a2> DW_AT_name : (indirect string, offset: 0x77): _arch + <2a6> DW_AT_decl_file : 3 + <2a7> DW_AT_decl_line : 125 + <2a8> DW_AT_type : <0x47> + <2ac> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><2af>: Abbrev Number: 0 + <1><2b0>: Abbrev Number: 16 (DW_TAG_union_type) + <2b1> DW_AT_byte_size : 116 + <2b2> DW_AT_decl_file : 3 + <2b3> DW_AT_decl_line : 69 + <2b4> DW_AT_sibling : <0x311> + <2><2b8>: Abbrev Number: 14 (DW_TAG_member) + <2b9> DW_AT_name : (indirect string, offset: 0xe5): _pad + <2bd> DW_AT_decl_file : 3 + <2be> DW_AT_decl_line : 71 + <2bf> DW_AT_type : <0x311> + <2><2c3>: Abbrev Number: 14 (DW_TAG_member) + <2c4> DW_AT_name : (indirect string, offset: 0x9): _kill + <2c8> DW_AT_decl_file : 3 + <2c9> DW_AT_decl_line : 78 + <2ca> DW_AT_type : <0x159> + <2><2ce>: Abbrev Number: 14 (DW_TAG_member) + <2cf> DW_AT_name : (indirect string, offset: 0x1df): _timer + <2d3> DW_AT_decl_file : 3 + <2d4> DW_AT_decl_line : 86 + <2d5> DW_AT_type : <0x17e> + <2><2d9>: Abbrev Number: 17 (DW_TAG_member) + <2da> DW_AT_name : _rt + <2de> DW_AT_decl_file : 3 + <2df> DW_AT_decl_line : 94 + <2e0> DW_AT_type : <0x1b1> + <2><2e4>: Abbrev Number: 14 (DW_TAG_member) + <2e5> DW_AT_name : (indirect string, offset: 0x21d): _sigchld + <2e9> DW_AT_decl_file : 3 + <2ea> DW_AT_decl_line : 104 + <2eb> DW_AT_type : <0x1e4> + <2><2ef>: Abbrev Number: 14 (DW_TAG_member) + <2f0> DW_AT_name : (indirect string, offset: 0x1ba): _sigfault + <2f4> DW_AT_decl_file : 3 + <2f5> DW_AT_decl_line : 111 + <2f6> DW_AT_type : <0x233> + <2><2fa>: Abbrev Number: 14 (DW_TAG_member) + <2fb> DW_AT_name : (indirect string, offset: 0x285): _sigpoll + <2ff> DW_AT_decl_file : 3 + <300> DW_AT_decl_line : 118 + <301> DW_AT_type : <0x258> + <2><305>: Abbrev Number: 14 (DW_TAG_member) + <306> DW_AT_name : (indirect string, offset: 0x2ae): _sigsys + <30a> DW_AT_decl_file : 3 + <30b> DW_AT_decl_line : 126 + <30c> DW_AT_type : <0x27d> + <2><310>: Abbrev Number: 0 + <1><311>: Abbrev Number: 18 (DW_TAG_array_type) + <312> DW_AT_type : <0x2b> + <316> DW_AT_sibling : <0x321> + <2><31a>: Abbrev Number: 19 (DW_TAG_subrange_type) + <31b> DW_AT_type : <0x79> + <31f> DW_AT_upper_bound : 28 + <2><320>: Abbrev Number: 0 + <1><321>: Abbrev Number: 15 (DW_TAG_structure_type) + <322> DW_AT_byte_size : 128 + <323> DW_AT_decl_file : 3 + <324> DW_AT_decl_line : 62 + <325> DW_AT_sibling : <0x362> + <2><329>: Abbrev Number: 9 (DW_TAG_member) + <32a> DW_AT_name : (indirect string, offset: 0x0): si_signo + <32e> DW_AT_decl_file : 3 + <32f> DW_AT_decl_line : 64 + <330> DW_AT_type : <0x2b> + <334> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><337>: Abbrev Number: 9 (DW_TAG_member) + <338> DW_AT_name : (indirect string, offset: 0x178): si_errno + <33c> DW_AT_decl_file : 3 + <33d> DW_AT_decl_line : 65 + <33e> DW_AT_type : <0x2b> + <342> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><345>: Abbrev Number: 9 (DW_TAG_member) + <346> DW_AT_name : (indirect string, offset: 0x1f0): si_code + <34a> DW_AT_decl_file : 3 + <34b> DW_AT_decl_line : 67 + <34c> DW_AT_type : <0x2b> + <350> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><353>: Abbrev Number: 9 (DW_TAG_member) + <354> DW_AT_name : (indirect string, offset: 0x11c): _sifields + <358> DW_AT_decl_file : 3 + <359> DW_AT_decl_line : 127 + <35a> DW_AT_type : <0x2b0> + <35e> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><361>: Abbrev Number: 0 + <1><362>: Abbrev Number: 4 (DW_TAG_typedef) + <363> DW_AT_name : (indirect string, offset: 0x209): siginfo_t + <367> DW_AT_decl_file : 3 + <368> DW_AT_decl_line : 128 + <369> DW_AT_type : <0x321> + <1><36d>: Abbrev Number: 20 (DW_TAG_variable) + <36e> DW_AT_name : (indirect string, offset: 0xea): current_wordsize + <372> DW_AT_decl_file : 4 + <373> DW_AT_decl_line : 757 + <375> DW_AT_type : <0x47> + <379> DW_AT_external : 1 + <37a> DW_AT_declaration : 1 + <1><37b>: Abbrev Number: 20 (DW_TAG_variable) + <37c> DW_AT_name : (indirect string, offset: 0xde): sysent + <380> DW_AT_decl_file : 4 + <381> DW_AT_decl_line : 892 + <383> DW_AT_type : <0x10e> + <387> DW_AT_external : 1 + <388> DW_AT_declaration : 1 + <1><389>: Abbrev Number: 20 (DW_TAG_variable) + <38a> DW_AT_name : (indirect string, offset: 0x16e): nsyscalls + <38e> DW_AT_decl_file : 4 + <38f> DW_AT_decl_line : 903 + <391> DW_AT_type : <0x47> + <395> DW_AT_external : 1 + <396> DW_AT_declaration : 1 + <1><397>: Abbrev Number: 21 (DW_TAG_variable) + <398> DW_AT_name : (indirect string, offset: 0x84): mpers_target_var + <39c> DW_AT_decl_file : 5 + <39d> DW_AT_decl_line : 41 + <39e> DW_AT_type : <0x362> + <3a2> DW_AT_external : 1 + <3a3> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><3a9>: Abbrev Number: 0 + diff --git a/mpers-m32/siginfo_t.d2 b/mpers-m32/siginfo_t.d2 new file mode 100644 index 000000000..5ccaa8958 --- /dev/null +++ b/mpers-m32/siginfo_t.d2 @@ -0,0 +1,505 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x240): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x213): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x9f): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xad): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x3b): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x59): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x297): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x22f): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xcc): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x33): __uid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 125 +DW_AT_type : <0x47> +<1><6e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x238): __pid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 133 +DW_AT_type : <0x2b> +<1><79> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1d6): sizetype +<1><80> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1ff): __clock_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 135 +DW_AT_type : <0x55> +<1><8b> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><8d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x199): char +<1><94> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x9a> +<1><9a> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x8d> +<1><9f> +Abbrev Number: 8 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xde): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xf2> +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10d): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x95): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x28e): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6e): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x94> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 11 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xfd> +<2> +Abbrev Number: 12 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf2> +<1><103> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x181): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0x9f> +<1><10e> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x114> +<1><114> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x103> +<1><119> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x26): _Bool +<1><120> +Abbrev Number: 13 (DW_TAG_union_type) +DW_AT_name : (indirect string, offset: 0x1f8): sigval +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 32 +DW_AT_sibling : <0x143> +<2><12c> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbb): sival_int +DW_AT_decl_file : 3 +DW_AT_decl_line : 34 +DW_AT_type : <0x2b> +<2><137> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2b6): sival_ptr +DW_AT_decl_file : 3 +DW_AT_decl_line : 35 +DW_AT_type : <0x8b> +<1><143> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x113): sigval_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 36 +DW_AT_type : <0x120> +<1><14e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1c4): __sigchld_clock_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 58 +DW_AT_type : <0x80> +<1><159> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 74 +DW_AT_sibling : <0x17e> +<2><161> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7d): si_pid +DW_AT_decl_file : 3 +DW_AT_decl_line : 76 +DW_AT_type : <0x6e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><16f> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc5): si_uid +DW_AT_decl_file : 3 +DW_AT_decl_line : 77 +DW_AT_type : <0x63> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><17e> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 81 +DW_AT_sibling : <0x1b1> +<2><186> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c): si_tid +DW_AT_decl_file : 3 +DW_AT_decl_line : 83 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><194> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x4e): si_overrun +DW_AT_decl_file : 3 +DW_AT_decl_line : 84 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1a2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18f): si_sigval +DW_AT_decl_file : 3 +DW_AT_decl_line : 85 +DW_AT_type : <0x143> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><1b1> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 89 +DW_AT_sibling : <0x1e4> +<2><1b9> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7d): si_pid +DW_AT_decl_file : 3 +DW_AT_decl_line : 91 +DW_AT_type : <0x6e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1c7> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc5): si_uid +DW_AT_decl_file : 3 +DW_AT_decl_line : 92 +DW_AT_type : <0x63> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1d5> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18f): si_sigval +DW_AT_decl_file : 3 +DW_AT_decl_line : 93 +DW_AT_type : <0x143> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><1e4> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 97 +DW_AT_sibling : <0x233> +<2><1ec> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7d): si_pid +DW_AT_decl_file : 3 +DW_AT_decl_line : 99 +DW_AT_type : <0x6e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1fa> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc5): si_uid +DW_AT_decl_file : 3 +DW_AT_decl_line : 100 +DW_AT_type : <0x63> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><208> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e6): si_status +DW_AT_decl_file : 3 +DW_AT_decl_line : 101 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><216> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x226): si_utime +DW_AT_decl_file : 3 +DW_AT_decl_line : 102 +DW_AT_type : <0x14e> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><224> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xfb): si_stime +DW_AT_decl_file : 3 +DW_AT_decl_line : 103 +DW_AT_type : <0x14e> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><233> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 107 +DW_AT_sibling : <0x258> +<2><23b> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x66): si_addr +DW_AT_decl_file : 3 +DW_AT_decl_line : 109 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><249> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf): si_addr_lsb +DW_AT_decl_file : 3 +DW_AT_decl_line : 110 +DW_AT_type : <0x24> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><258> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 114 +DW_AT_sibling : <0x27d> +<2><260> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x24c): si_band +DW_AT_decl_file : 3 +DW_AT_decl_line : 116 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><26e> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b4): si_fd +DW_AT_decl_file : 3 +DW_AT_decl_line : 117 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><27d> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 121 +DW_AT_sibling : <0x2b0> +<2><285> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b): _call_addr +DW_AT_decl_file : 3 +DW_AT_decl_line : 123 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><293> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x104): _syscall +DW_AT_decl_file : 3 +DW_AT_decl_line : 124 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><2a1> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x77): _arch +DW_AT_decl_file : 3 +DW_AT_decl_line : 125 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><2b0> +Abbrev Number: 16 (DW_TAG_union_type) +DW_AT_byte_size : 116 +DW_AT_decl_file : 3 +DW_AT_decl_line : 69 +DW_AT_sibling : <0x311> +<2><2b8> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe5): _pad +DW_AT_decl_file : 3 +DW_AT_decl_line : 71 +DW_AT_type : <0x311> +<2><2c3> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9): _kill +DW_AT_decl_file : 3 +DW_AT_decl_line : 78 +DW_AT_type : <0x159> +<2><2ce> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1df): _timer +DW_AT_decl_file : 3 +DW_AT_decl_line : 86 +DW_AT_type : <0x17e> +<2><2d9> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : _rt +DW_AT_decl_file : 3 +DW_AT_decl_line : 94 +DW_AT_type : <0x1b1> +<2><2e4> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21d): _sigchld +DW_AT_decl_file : 3 +DW_AT_decl_line : 104 +DW_AT_type : <0x1e4> +<2><2ef> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ba): _sigfault +DW_AT_decl_file : 3 +DW_AT_decl_line : 111 +DW_AT_type : <0x233> +<2><2fa> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x285): _sigpoll +DW_AT_decl_file : 3 +DW_AT_decl_line : 118 +DW_AT_type : <0x258> +<2><305> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2ae): _sigsys +DW_AT_decl_file : 3 +DW_AT_decl_line : 126 +DW_AT_type : <0x27d> +<1><311> +Abbrev Number: 18 (DW_TAG_array_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x321> +<2><31a> +Abbrev Number: 19 (DW_TAG_subrange_type) +DW_AT_type : <0x79> +DW_AT_upper_bound : 28 +<1><321> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 128 +DW_AT_decl_file : 3 +DW_AT_decl_line : 62 +DW_AT_sibling : <0x362> +<2><329> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): si_signo +DW_AT_decl_file : 3 +DW_AT_decl_line : 64 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><337> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x178): si_errno +DW_AT_decl_file : 3 +DW_AT_decl_line : 65 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><345> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f0): si_code +DW_AT_decl_file : 3 +DW_AT_decl_line : 67 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><353> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11c): _sifields +DW_AT_decl_file : 3 +DW_AT_decl_line : 127 +DW_AT_type : <0x2b0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><362> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x209): siginfo_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 128 +DW_AT_type : <0x321> +<1><36d> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xea): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><37b> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xde): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0x10e> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><389> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x16e): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><397> +Abbrev Number: 21 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x84): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 41 +DW_AT_type : <0x362> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/siginfo_t.h b/mpers-m32/siginfo_t.h new file mode 100644 index 000000000..e6989a274 --- /dev/null +++ b/mpers-m32/siginfo_t.h @@ -0,0 +1,53 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t si_signo; +int32_t si_errno; +int32_t si_code; +union { +int32_t _pad[29]; +struct { +int32_t si_pid; +uint32_t si_uid; +} ATTRIBUTE_PACKED _kill; +struct { +int32_t si_tid; +int32_t si_overrun; +union { +int32_t sival_int; +mpers_ptr_t sival_ptr; +} si_sigval; +} ATTRIBUTE_PACKED _timer; +struct { +int32_t si_pid; +uint32_t si_uid; +union { +int32_t sival_int; +mpers_ptr_t sival_ptr; +} si_sigval; +} ATTRIBUTE_PACKED _rt; +struct { +int32_t si_pid; +uint32_t si_uid; +int32_t si_status; +int32_t si_utime; +int32_t si_stime; +} ATTRIBUTE_PACKED _sigchld; +struct { +mpers_ptr_t si_addr; +int16_t si_addr_lsb; +unsigned char mpers_end_filler_1[2]; +} ATTRIBUTE_PACKED _sigfault; +struct { +int32_t si_band; +int32_t si_fd; +} ATTRIBUTE_PACKED _sigpoll; +struct { +mpers_ptr_t _call_addr; +int32_t _syscall; +uint32_t _arch; +} ATTRIBUTE_PACKED _sigsys; +} _sifields; +} ATTRIBUTE_PACKED m32_siginfo_t; +#define MPERS_m32_siginfo_t m32_siginfo_t diff --git a/mpers-m32/stack_t.c b/mpers-m32/stack_t.c new file mode 100644 index 000000000..2146a6638 --- /dev/null +++ b/mpers-m32/stack_t.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993-1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2015 Dmitry V. Levin + * Copyright (c) 2015 Elvira Khabirova + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include + +stack_t mpers_target_var; diff --git a/mpers-m32/stack_t.d1 b/mpers-m32/stack_t.d1 new file mode 100644 index 000000000..7ce31c607 --- /dev/null +++ b/mpers-m32/stack_t.d1 @@ -0,0 +1,192 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x185 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xb9): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xd): mpers-m32/stack_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x121): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1a5): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x182): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x16e): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x6f): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x21): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x101): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x58): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x19c): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x89): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x165): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x11c): char + <1><73>: Abbrev Number: 5 (DW_TAG_typedef) + <74> DW_AT_name : (indirect string, offset: 0x0): size_t + <78> DW_AT_decl_file : 2 + <79> DW_AT_decl_line : 212 + <7a> DW_AT_type : <0x47> + <1><7e>: Abbrev Number: 6 (DW_TAG_pointer_type) + <7f> DW_AT_byte_size : 4 + <80> DW_AT_type : <0x84> + <1><84>: Abbrev Number: 7 (DW_TAG_const_type) + <85> DW_AT_type : <0x6c> + <1><89>: Abbrev Number: 8 (DW_TAG_structure_type) + <8a> DW_AT_name : (indirect string, offset: 0x9b): sysent + <8e> DW_AT_byte_size : 20 + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 4 + <91> DW_AT_sibling : <0xdc> + <2><95>: Abbrev Number: 9 (DW_TAG_member) + <96> DW_AT_name : (indirect string, offset: 0xb3): nargs + <9a> DW_AT_decl_file : 1 + <9b> DW_AT_decl_line : 5 + <9c> DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x4e): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1b1): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xe7> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x34): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x7e> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 11 (DW_TAG_subroutine_type) +
DW_AT_type : <0x2b> + DW_AT_sibling : <0xe7> + <2>: Abbrev Number: 12 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 6 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xdc> + <1>: Abbrev Number: 5 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x10e): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x89> + <1>: Abbrev Number: 6 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xfe> + <1>: Abbrev Number: 7 (DW_TAG_const_type) + DW_AT_type : <0xed> + <1><103>: Abbrev Number: 2 (DW_TAG_base_type) + <104> DW_AT_byte_size : 1 + <105> DW_AT_encoding : 2 (boolean) + <106> DW_AT_name : (indirect string, offset: 0x7): _Bool + <1><10a>: Abbrev Number: 8 (DW_TAG_structure_type) + <10b> DW_AT_name : (indirect string, offset: 0x7d): sigaltstack + <10f> DW_AT_byte_size : 12 + <110> DW_AT_decl_file : 3 + <111> DW_AT_decl_line : 49 + <112> DW_AT_sibling : <0x141> + <2><116>: Abbrev Number: 9 (DW_TAG_member) + <117> DW_AT_name : (indirect string, offset: 0x17c): ss_sp + <11b> DW_AT_decl_file : 3 + <11c> DW_AT_decl_line : 51 + <11d> DW_AT_type : <0x6a> + <121> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><124>: Abbrev Number: 9 (DW_TAG_member) + <125> DW_AT_name : (indirect string, offset: 0x15c): ss_flags + <129> DW_AT_decl_file : 3 + <12a> DW_AT_decl_line : 52 + <12b> DW_AT_type : <0x2b> + <12f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><132>: Abbrev Number: 9 (DW_TAG_member) + <133> DW_AT_name : (indirect string, offset: 0x18c): ss_size + <137> DW_AT_decl_file : 3 + <138> DW_AT_decl_line : 53 + <139> DW_AT_type : <0x73> + <13d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><140>: Abbrev Number: 0 + <1><141>: Abbrev Number: 5 (DW_TAG_typedef) + <142> DW_AT_name : (indirect string, offset: 0x194): stack_t + <146> DW_AT_decl_file : 3 + <147> DW_AT_decl_line : 54 + <148> DW_AT_type : <0x10a> + <1><14c>: Abbrev Number: 13 (DW_TAG_variable) + <14d> DW_AT_name : (indirect string, offset: 0xa2): current_wordsize + <151> DW_AT_decl_file : 4 + <152> DW_AT_decl_line : 757 + <154> DW_AT_type : <0x47> + <158> DW_AT_external : 1 + <159> DW_AT_declaration : 1 + <1><15a>: Abbrev Number: 13 (DW_TAG_variable) + <15b> DW_AT_name : (indirect string, offset: 0x9b): sysent + <15f> DW_AT_decl_file : 4 + <160> DW_AT_decl_line : 892 + <162> DW_AT_type : <0xf8> + <166> DW_AT_external : 1 + <167> DW_AT_declaration : 1 + <1><168>: Abbrev Number: 13 (DW_TAG_variable) + <169> DW_AT_name : (indirect string, offset: 0x152): nsyscalls + <16d> DW_AT_decl_file : 4 + <16e> DW_AT_decl_line : 903 + <170> DW_AT_type : <0x47> + <174> DW_AT_external : 1 + <175> DW_AT_declaration : 1 + <1><176>: Abbrev Number: 14 (DW_TAG_variable) + <177> DW_AT_name : (indirect string, offset: 0x3d): mpers_target_var + <17b> DW_AT_decl_file : 5 + <17c> DW_AT_decl_line : 38 + <17d> DW_AT_type : <0x141> + <181> DW_AT_external : 1 + <182> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><188>: Abbrev Number: 0 + diff --git a/mpers-m32/stack_t.d2 b/mpers-m32/stack_t.d2 new file mode 100644 index 000000000..79bab58f7 --- /dev/null +++ b/mpers-m32/stack_t.d2 @@ -0,0 +1,212 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1a5): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x182): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x16e): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x6f): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x21): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x101): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x58): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x19c): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x89): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x165): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x11c): char +<1><73> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): size_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 212 +DW_AT_type : <0x47> +<1><7e> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x84> +<1><84> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><89> +Abbrev Number: 8 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x9b): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xdc> +<2><95> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb3): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x4e): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b1): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xe7> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x34): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 11 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xe7> +<2> +Abbrev Number: 12 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xdc> +<1> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x10e): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x89> +<1> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xfe> +<1> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0xed> +<1><103> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x7): _Bool +<1><10a> +Abbrev Number: 8 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x7d): sigaltstack +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 49 +DW_AT_sibling : <0x141> +<2><116> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x17c): ss_sp +DW_AT_decl_file : 3 +DW_AT_decl_line : 51 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><124> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15c): ss_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 52 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><132> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18c): ss_size +DW_AT_decl_file : 3 +DW_AT_decl_line : 53 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><141> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x194): stack_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 54 +DW_AT_type : <0x10a> +<1><14c> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xa2): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><15a> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x9b): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xf8> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><168> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x152): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><176> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x3d): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 38 +DW_AT_type : <0x141> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/stack_t.h b/mpers-m32/stack_t.h new file mode 100644 index 000000000..5b4a93a7d --- /dev/null +++ b/mpers-m32/stack_t.h @@ -0,0 +1,9 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +mpers_ptr_t ss_sp; +int32_t ss_flags; +uint32_t ss_size; +} ATTRIBUTE_PACKED m32_stack_t; +#define MPERS_m32_stack_t m32_stack_t diff --git a/mpers-m32/struct_blk_user_trace_setup.c b/mpers-m32/struct_blk_user_trace_setup.c new file mode 100644 index 000000000..273bae438 --- /dev/null +++ b/mpers-m32/struct_blk_user_trace_setup.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2009, 2010 Jeff Mahoney + * Copyright (c) 2011-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include + +typedef struct { + int op; + int flags; + int datalen; + void *data; +} struct_blkpg_ioctl_arg; + +#define BLKPG_DEVNAMELTH 64 +#define BLKPG_VOLNAMELTH 64 +typedef struct { + int64_t start; /* starting offset in bytes */ + int64_t length; /* length in bytes */ + int pno; /* partition number */ + char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2, + to be used in kernel messages */ + char volname[BLKPG_VOLNAMELTH]; /* volume label */ +} struct_blkpg_partition; + +#define BLKTRACE_BDEV_SIZE 32 +typedef struct blk_user_trace_setup { + char name[BLKTRACE_BDEV_SIZE]; /* output */ + uint16_t act_mask; /* input */ + uint32_t buf_size; /* input */ + uint32_t buf_nr; /* input */ + uint64_t start_lba; + uint64_t end_lba; + uint32_t pid; +} struct_blk_user_trace_setup; + +struct_blk_user_trace_setup mpers_target_var; diff --git a/mpers-m32/struct_blk_user_trace_setup.d1 b/mpers-m32/struct_blk_user_trace_setup.d1 new file mode 100644 index 000000000..f4f3f5cf9 --- /dev/null +++ b/mpers-m32/struct_blk_user_trace_setup.d1 @@ -0,0 +1,231 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1e1 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xf0): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x25): mpers-m32/struct_blk_user_trace_setup.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x158): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1e3): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1b8): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x19c): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x9c): unsigned char + <1><40>: Abbrev Number: 4 (DW_TAG_typedef) + <41> DW_AT_name : (indirect string, offset: 0x1c8): uint16_t + <45> DW_AT_decl_file : 1 + <46> DW_AT_decl_line : 49 + <47> DW_AT_type : <0x4b> + <1><4b>: Abbrev Number: 2 (DW_TAG_base_type) + <4c> DW_AT_byte_size : 2 + <4d> DW_AT_encoding : 7 (unsigned) + <4e> DW_AT_name : (indirect string, offset: 0x54): short unsigned int + <1><52>: Abbrev Number: 4 (DW_TAG_typedef) + <53> DW_AT_name : (indirect string, offset: 0x1d1): uint32_t + <57> DW_AT_decl_file : 1 + <58> DW_AT_decl_line : 51 + <59> DW_AT_type : <0x5d> + <1><5d>: Abbrev Number: 2 (DW_TAG_base_type) + <5e> DW_AT_byte_size : 4 + <5f> DW_AT_encoding : 7 (unsigned) + <60> DW_AT_name : (indirect string, offset: 0x138): unsigned int + <1><64>: Abbrev Number: 4 (DW_TAG_typedef) + <65> DW_AT_name : (indirect string, offset: 0x67): uint64_t + <69> DW_AT_decl_file : 1 + <6a> DW_AT_decl_line : 58 + <6b> DW_AT_type : <0x6f> + <1><6f>: Abbrev Number: 2 (DW_TAG_base_type) + <70> DW_AT_byte_size : 8 + <71> DW_AT_encoding : 7 (unsigned) + <72> DW_AT_name : (indirect string, offset: 0x1f8): long long unsigned int + <1><76>: Abbrev Number: 2 (DW_TAG_base_type) + <77> DW_AT_byte_size : 4 + <78> DW_AT_encoding : 5 (signed) + <79> DW_AT_name : (indirect string, offset: 0x1da): long int + <1><7d>: Abbrev Number: 2 (DW_TAG_base_type) + <7e> DW_AT_byte_size : 4 + <7f> DW_AT_encoding : 7 (unsigned) + <80> DW_AT_name : (indirect string, offset: 0xaa): long unsigned int + <1><84>: Abbrev Number: 2 (DW_TAG_base_type) + <85> DW_AT_byte_size : 4 + <86> DW_AT_encoding : 7 (unsigned) + <87> DW_AT_name : (indirect string, offset: 0x193): sizetype + <1><8b>: Abbrev Number: 2 (DW_TAG_base_type) + <8c> DW_AT_byte_size : 1 + <8d> DW_AT_encoding : 6 (signed char) + <8e> DW_AT_name : (indirect string, offset: 0x153): char + <1><92>: Abbrev Number: 5 (DW_TAG_array_type) + <93> DW_AT_type : <0x8b> + <97> DW_AT_sibling : <0xa2> + <2><9b>: Abbrev Number: 6 (DW_TAG_subrange_type) + <9c> DW_AT_type : <0x84> + DW_AT_upper_bound : 31 + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xa8> + <1>: Abbrev Number: 8 (DW_TAG_const_type) + DW_AT_type : <0x8b> + <1>: Abbrev Number: 9 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xbc): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 2 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x100> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1c2): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x5d> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x8a): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 11 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1ef): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0x10b> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x70): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 + DW_AT_type : <0xa2> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1><100>: Abbrev Number: 12 (DW_TAG_subroutine_type) + <101> DW_AT_type : <0x2b> + <105> DW_AT_sibling : <0x10b> + <2><109>: Abbrev Number: 13 (DW_TAG_unspecified_parameters) + <2><10a>: Abbrev Number: 0 + <1><10b>: Abbrev Number: 7 (DW_TAG_pointer_type) + <10c> DW_AT_byte_size : 4 + <10d> DW_AT_type : <0x100> + <1><111>: Abbrev Number: 4 (DW_TAG_typedef) + <112> DW_AT_name : (indirect string, offset: 0x145): struct_sysent + <116> DW_AT_decl_file : 2 + <117> DW_AT_decl_line : 10 + <118> DW_AT_type : <0xad> + <1><11c>: Abbrev Number: 7 (DW_TAG_pointer_type) + <11d> DW_AT_byte_size : 4 + <11e> DW_AT_type : <0x122> + <1><122>: Abbrev Number: 8 (DW_TAG_const_type) + <123> DW_AT_type : <0x111> + <1><127>: Abbrev Number: 2 (DW_TAG_base_type) + <128> DW_AT_byte_size : 1 + <129> DW_AT_encoding : 2 (boolean) + <12a> DW_AT_name : (indirect string, offset: 0x1f): _Bool + <1><12e>: Abbrev Number: 9 (DW_TAG_structure_type) + <12f> DW_AT_name : (indirect string, offset: 0x0): blk_user_trace_setup + <133> DW_AT_byte_size : 64 + <134> DW_AT_decl_file : 3 + <135> DW_AT_decl_line : 54 + <136> DW_AT_sibling : <0x19d> + <2><13a>: Abbrev Number: 10 (DW_TAG_member) + <13b> DW_AT_name : (indirect string, offset: 0x1aa): name + <13f> DW_AT_decl_file : 3 + <140> DW_AT_decl_line : 55 + <141> DW_AT_type : <0x92> + <145> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><148>: Abbrev Number: 10 (DW_TAG_member) + <149> DW_AT_name : (indirect string, offset: 0x20f): act_mask + <14d> DW_AT_decl_file : 3 + <14e> DW_AT_decl_line : 56 + <14f> DW_AT_type : <0x40> + <153> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><156>: Abbrev Number: 10 (DW_TAG_member) + <157> DW_AT_name : (indirect string, offset: 0x1af): buf_size + <15b> DW_AT_decl_file : 3 + <15c> DW_AT_decl_line : 57 + <15d> DW_AT_type : <0x52> + <161> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><164>: Abbrev Number: 10 (DW_TAG_member) + <165> DW_AT_name : (indirect string, offset: 0x4d): buf_nr + <169> DW_AT_decl_file : 3 + <16a> DW_AT_decl_line : 58 + <16b> DW_AT_type : <0x52> + <16f> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><172>: Abbrev Number: 10 (DW_TAG_member) + <173> DW_AT_name : (indirect string, offset: 0x15): start_lba + <177> DW_AT_decl_file : 3 + <178> DW_AT_decl_line : 59 + <179> DW_AT_type : <0x64> + <17d> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><180>: Abbrev Number: 10 (DW_TAG_member) + <181> DW_AT_name : (indirect string, offset: 0x94): end_lba + <185> DW_AT_decl_file : 3 + <186> DW_AT_decl_line : 60 + <187> DW_AT_type : <0x64> + <18b> DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2><18e>: Abbrev Number: 11 (DW_TAG_member) + <18f> DW_AT_name : pid + <193> DW_AT_decl_file : 3 + <194> DW_AT_decl_line : 61 + <195> DW_AT_type : <0x52> + <199> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><19c>: Abbrev Number: 0 + <1><19d>: Abbrev Number: 4 (DW_TAG_typedef) + <19e> DW_AT_name : (indirect string, offset: 0xd4): struct_blk_user_trace_setup + <1a2> DW_AT_decl_file : 3 + <1a3> DW_AT_decl_line : 62 + <1a4> DW_AT_type : <0x12e> + <1><1a8>: Abbrev Number: 14 (DW_TAG_variable) + <1a9> DW_AT_name : (indirect string, offset: 0xc3): current_wordsize + <1ad> DW_AT_decl_file : 4 + <1ae> DW_AT_decl_line : 757 + <1b0> DW_AT_type : <0x5d> + <1b4> DW_AT_external : 1 + <1b5> DW_AT_declaration : 1 + <1><1b6>: Abbrev Number: 14 (DW_TAG_variable) + <1b7> DW_AT_name : (indirect string, offset: 0xbc): sysent + <1bb> DW_AT_decl_file : 4 + <1bc> DW_AT_decl_line : 892 + <1be> DW_AT_type : <0x11c> + <1c2> DW_AT_external : 1 + <1c3> DW_AT_declaration : 1 + <1><1c4>: Abbrev Number: 14 (DW_TAG_variable) + <1c5> DW_AT_name : (indirect string, offset: 0x189): nsyscalls + <1c9> DW_AT_decl_file : 4 + <1ca> DW_AT_decl_line : 903 + <1cc> DW_AT_type : <0x5d> + <1d0> DW_AT_external : 1 + <1d1> DW_AT_declaration : 1 + <1><1d2>: Abbrev Number: 15 (DW_TAG_variable) + <1d3> DW_AT_name : (indirect string, offset: 0x79): mpers_target_var + <1d7> DW_AT_decl_file : 3 + <1d8> DW_AT_decl_line : 64 + <1d9> DW_AT_type : <0x19d> + <1dd> DW_AT_external : 1 + <1de> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><1e4>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_blk_user_trace_setup.d2 b/mpers-m32/struct_blk_user_trace_setup.d2 new file mode 100644 index 000000000..433a0fa20 --- /dev/null +++ b/mpers-m32/struct_blk_user_trace_setup.d2 @@ -0,0 +1,257 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1e3): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1b8): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x19c): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x9c): unsigned char +<1><40> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1c8): uint16_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 49 +DW_AT_type : <0x4b> +<1><4b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x54): short unsigned int +<1><52> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1d1): uint32_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 51 +DW_AT_type : <0x5d> +<1><5d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x138): unsigned int +<1><64> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x67): uint64_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 58 +DW_AT_type : <0x6f> +<1><6f> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1f8): long long unsigned int +<1><76> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1da): long int +<1><7d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xaa): long unsigned int +<1><84> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x193): sizetype +<1><8b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x153): char +<1><92> +Abbrev Number: 5 (DW_TAG_array_type) +DW_AT_type : <0x8b> +DW_AT_sibling : <0xa2> +<2><9b> +Abbrev Number: 6 (DW_TAG_subrange_type) +DW_AT_type : <0x84> +DW_AT_upper_bound : 31 +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xa8> +<1> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x8b> +<1> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xbc): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x100> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c2): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x5d> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8a): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ef): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0x10b> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x70): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0xa2> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><100> +Abbrev Number: 12 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x10b> +<2><109> +Abbrev Number: 13 (DW_TAG_unspecified_parameters) +<1><10b> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x100> +<1><111> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x145): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0xad> +<1><11c> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x122> +<1><122> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x111> +<1><127> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x1f): _Bool +<1><12e> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): blk_user_trace_setup +DW_AT_byte_size : 64 +DW_AT_decl_file : 3 +DW_AT_decl_line : 54 +DW_AT_sibling : <0x19d> +<2><13a> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1aa): name +DW_AT_decl_file : 3 +DW_AT_decl_line : 55 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><148> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x20f): act_mask +DW_AT_decl_file : 3 +DW_AT_decl_line : 56 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><156> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1af): buf_size +DW_AT_decl_file : 3 +DW_AT_decl_line : 57 +DW_AT_type : <0x52> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><164> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x4d): buf_nr +DW_AT_decl_file : 3 +DW_AT_decl_line : 58 +DW_AT_type : <0x52> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><172> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15): start_lba +DW_AT_decl_file : 3 +DW_AT_decl_line : 59 +DW_AT_type : <0x64> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><180> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x94): end_lba +DW_AT_decl_file : 3 +DW_AT_decl_line : 60 +DW_AT_type : <0x64> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2><18e> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : pid +DW_AT_decl_file : 3 +DW_AT_decl_line : 61 +DW_AT_type : <0x52> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<1><19d> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xd4): struct_blk_user_trace_setup +DW_AT_decl_file : 3 +DW_AT_decl_line : 62 +DW_AT_type : <0x12e> +<1><1a8> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc3): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x5d> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1b6> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xbc): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0x11c> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1c4> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x189): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x5d> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1d2> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x79): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 64 +DW_AT_type : <0x19d> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_blk_user_trace_setup.h b/mpers-m32/struct_blk_user_trace_setup.h new file mode 100644 index 000000000..8b699874b --- /dev/null +++ b/mpers-m32/struct_blk_user_trace_setup.h @@ -0,0 +1,14 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +char name[32]; +uint16_t act_mask; +unsigned char mpers_filler_1[2]; +uint32_t buf_size; +uint32_t buf_nr; +uint64_t start_lba; +uint64_t end_lba; +uint32_t pid; +} ATTRIBUTE_PACKED m32_struct_blk_user_trace_setup; +#define MPERS_m32_struct_blk_user_trace_setup m32_struct_blk_user_trace_setup diff --git a/mpers-m32/struct_blkpg_ioctl_arg.c b/mpers-m32/struct_blkpg_ioctl_arg.c new file mode 100644 index 000000000..46a4fa8cc --- /dev/null +++ b/mpers-m32/struct_blkpg_ioctl_arg.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2009, 2010 Jeff Mahoney + * Copyright (c) 2011-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include + +typedef struct { + int op; + int flags; + int datalen; + void *data; +} struct_blkpg_ioctl_arg; + +#define BLKPG_DEVNAMELTH 64 +#define BLKPG_VOLNAMELTH 64 +typedef struct { + int64_t start; /* starting offset in bytes */ + int64_t length; /* length in bytes */ + int pno; /* partition number */ + char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2, + to be used in kernel messages */ + char volname[BLKPG_VOLNAMELTH]; /* volume label */ +} struct_blkpg_partition; + +#define BLKTRACE_BDEV_SIZE 32 +typedef struct blk_user_trace_setup { + char name[BLKTRACE_BDEV_SIZE]; /* output */ + uint16_t act_mask; /* input */ + uint32_t buf_size; /* input */ + uint32_t buf_nr; /* input */ + uint64_t start_lba; + uint64_t end_lba; + uint32_t pid; +} struct_blk_user_trace_setup; + +struct_blkpg_ioctl_arg mpers_target_var; diff --git a/mpers-m32/struct_blkpg_ioctl_arg.d1 b/mpers-m32/struct_blkpg_ioctl_arg.d1 new file mode 100644 index 000000000..29de052ef --- /dev/null +++ b/mpers-m32/struct_blkpg_ioctl_arg.d1 @@ -0,0 +1,192 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x183 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xc2): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xe): mpers-m32/struct_blkpg_ioctl_arg.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x147): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1ac): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x199): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x18b): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x84): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x31): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x121): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x6d): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1a3): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x92): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x182): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x142): char + <1><73>: Abbrev Number: 5 (DW_TAG_pointer_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_type : <0x79> + <1><79>: Abbrev Number: 6 (DW_TAG_const_type) + <7a> DW_AT_type : <0x6c> + <1><7e>: Abbrev Number: 7 (DW_TAG_structure_type) + <7f> DW_AT_name : (indirect string, offset: 0xa4): sysent + <83> DW_AT_byte_size : 20 + <84> DW_AT_decl_file : 1 + <85> DW_AT_decl_line : 4 + <86> DW_AT_sibling : <0xd1> + <2><8a>: Abbrev Number: 8 (DW_TAG_member) + <8b> DW_AT_name : (indirect string, offset: 0xbc): nargs + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 5 + <91> DW_AT_type : <0x47> + <95> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><98>: Abbrev Number: 8 (DW_TAG_member) + <99> DW_AT_name : (indirect string, offset: 0x63): sys_flags + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 6 + <9f> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1b8): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xdc> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x49): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x73> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xdc> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) +
DW_AT_byte_size : 4 + DW_AT_type : <0xd1> + <1>: Abbrev Number: 12 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x134): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7e> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf3> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xe2> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x0): _Bool + <1>: Abbrev Number: 13 (DW_TAG_structure_type) + <100> DW_AT_byte_size : 16 + <101> DW_AT_decl_file : 2 + <102> DW_AT_decl_line : 35 + <103> DW_AT_sibling : <0x13f> + <2><107>: Abbrev Number: 9 (DW_TAG_member) + <108> DW_AT_name : op + <10b> DW_AT_decl_file : 2 + <10c> DW_AT_decl_line : 36 + <10d> DW_AT_type : <0x2b> + <111> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><114>: Abbrev Number: 8 (DW_TAG_member) + <115> DW_AT_name : (indirect string, offset: 0x12e): flags + <119> DW_AT_decl_file : 2 + <11a> DW_AT_decl_line : 37 + <11b> DW_AT_type : <0x2b> + <11f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><122>: Abbrev Number: 8 (DW_TAG_member) + <123> DW_AT_name : (indirect string, offset: 0x6): datalen + <127> DW_AT_decl_file : 2 + <128> DW_AT_decl_line : 38 + <129> DW_AT_type : <0x2b> + <12d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><130>: Abbrev Number: 8 (DW_TAG_member) + <131> DW_AT_name : (indirect string, offset: 0x44): data + <135> DW_AT_decl_file : 2 + <136> DW_AT_decl_line : 39 + <137> DW_AT_type : <0x6a> + <13b> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><13e>: Abbrev Number: 0 + <1><13f>: Abbrev Number: 12 (DW_TAG_typedef) + <140> DW_AT_name : (indirect string, offset: 0x10a): struct_blkpg_ioctl_arg + <144> DW_AT_decl_file : 2 + <145> DW_AT_decl_line : 40 + <146> DW_AT_type : <0xff> + <1><14a>: Abbrev Number: 14 (DW_TAG_variable) + <14b> DW_AT_name : (indirect string, offset: 0xab): current_wordsize + <14f> DW_AT_decl_file : 3 + <150> DW_AT_decl_line : 757 + <152> DW_AT_type : <0x47> + <156> DW_AT_external : 1 + <157> DW_AT_declaration : 1 + <1><158>: Abbrev Number: 14 (DW_TAG_variable) + <159> DW_AT_name : (indirect string, offset: 0xa4): sysent + <15d> DW_AT_decl_file : 3 + <15e> DW_AT_decl_line : 892 + <160> DW_AT_type : <0xed> + <164> DW_AT_external : 1 + <165> DW_AT_declaration : 1 + <1><166>: Abbrev Number: 14 (DW_TAG_variable) + <167> DW_AT_name : (indirect string, offset: 0x178): nsyscalls + <16b> DW_AT_decl_file : 3 + <16c> DW_AT_decl_line : 903 + <16e> DW_AT_type : <0x47> + <172> DW_AT_external : 1 + <173> DW_AT_declaration : 1 + <1><174>: Abbrev Number: 15 (DW_TAG_variable) + <175> DW_AT_name : (indirect string, offset: 0x52): mpers_target_var + <179> DW_AT_decl_file : 2 + <17a> DW_AT_decl_line : 64 + <17b> DW_AT_type : <0x13f> + <17f> DW_AT_external : 1 + <180> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><186>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_blkpg_ioctl_arg.d2 b/mpers-m32/struct_blkpg_ioctl_arg.d2 new file mode 100644 index 000000000..161c1e374 --- /dev/null +++ b/mpers-m32/struct_blkpg_ioctl_arg.d2 @@ -0,0 +1,212 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1ac): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x199): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x18b): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x84): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x31): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x121): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x6d): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a3): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x92): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x182): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x142): char +<1><73> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x79> +<1><79> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><7e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xa4): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd1> +<2><8a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbc): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><98> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x63): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b8): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xdc> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x49): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xdc> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd1> +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x134): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7e> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xe2> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x0): _Bool +<1> +Abbrev Number: 13 (DW_TAG_structure_type) +DW_AT_byte_size : 16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 35 +DW_AT_sibling : <0x13f> +<2><107> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : op +DW_AT_decl_file : 2 +DW_AT_decl_line : 36 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><114> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x12e): flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 37 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><122> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6): datalen +DW_AT_decl_file : 2 +DW_AT_decl_line : 38 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><130> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x44): data +DW_AT_decl_file : 2 +DW_AT_decl_line : 39 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><13f> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x10a): struct_blkpg_ioctl_arg +DW_AT_decl_file : 2 +DW_AT_decl_line : 40 +DW_AT_type : <0xff> +<1><14a> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xab): current_wordsize +DW_AT_decl_file : 3 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><158> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xa4): sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 892 +DW_AT_type : <0xed> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><166> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x178): nsyscalls +DW_AT_decl_file : 3 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><174> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x52): mpers_target_var +DW_AT_decl_file : 2 +DW_AT_decl_line : 64 +DW_AT_type : <0x13f> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/struct_blkpg_ioctl_arg.h b/mpers-m32/struct_blkpg_ioctl_arg.h new file mode 100644 index 000000000..e97ea0f8a --- /dev/null +++ b/mpers-m32/struct_blkpg_ioctl_arg.h @@ -0,0 +1,10 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t op; +int32_t flags; +int32_t datalen; +mpers_ptr_t data; +} ATTRIBUTE_PACKED m32_struct_blkpg_ioctl_arg; +#define MPERS_m32_struct_blkpg_ioctl_arg m32_struct_blkpg_ioctl_arg diff --git a/mpers-m32/struct_blkpg_partition.c b/mpers-m32/struct_blkpg_partition.c new file mode 100644 index 000000000..04a04ff41 --- /dev/null +++ b/mpers-m32/struct_blkpg_partition.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2009, 2010 Jeff Mahoney + * Copyright (c) 2011-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include + +typedef struct { + int op; + int flags; + int datalen; + void *data; +} struct_blkpg_ioctl_arg; + +#define BLKPG_DEVNAMELTH 64 +#define BLKPG_VOLNAMELTH 64 +typedef struct { + int64_t start; /* starting offset in bytes */ + int64_t length; /* length in bytes */ + int pno; /* partition number */ + char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2, + to be used in kernel messages */ + char volname[BLKPG_VOLNAMELTH]; /* volume label */ +} struct_blkpg_partition; + +#define BLKTRACE_BDEV_SIZE 32 +typedef struct blk_user_trace_setup { + char name[BLKTRACE_BDEV_SIZE]; /* output */ + uint16_t act_mask; /* input */ + uint32_t buf_size; /* input */ + uint32_t buf_nr; /* input */ + uint64_t start_lba; + uint64_t end_lba; + uint32_t pid; +} struct_blk_user_trace_setup; + +struct_blkpg_partition mpers_target_var; diff --git a/mpers-m32/struct_blkpg_partition.d1 b/mpers-m32/struct_blkpg_partition.d1 new file mode 100644 index 000000000..de26ee938 --- /dev/null +++ b/mpers-m32/struct_blkpg_partition.d1 @@ -0,0 +1,208 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1ab (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xa8): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x162): mpers-m32/struct_blkpg_partition.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x110): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x198): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x185): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 4 (DW_TAG_typedef) + <33> DW_AT_name : (indirect string, offset: 0x0): int64_t + <37> DW_AT_decl_file : 2 + <38> DW_AT_decl_line : 43 + <39> DW_AT_type : <0x3d> + <1><3d>: Abbrev Number: 2 (DW_TAG_base_type) + <3e> DW_AT_byte_size : 8 + <3f> DW_AT_encoding : 5 (signed) + <40> DW_AT_name : (indirect string, offset: 0x154): long long int + <1><44>: Abbrev Number: 2 (DW_TAG_base_type) + <45> DW_AT_byte_size : 1 + <46> DW_AT_encoding : 8 (unsigned char) + <47> DW_AT_name : (indirect string, offset: 0x6a): unsigned char + <1><4b>: Abbrev Number: 2 (DW_TAG_base_type) + <4c> DW_AT_byte_size : 2 + <4d> DW_AT_encoding : 7 (unsigned) + <4e> DW_AT_name : (indirect string, offset: 0x14): short unsigned int + <1><52>: Abbrev Number: 2 (DW_TAG_base_type) + <53> DW_AT_byte_size : 4 + <54> DW_AT_encoding : 7 (unsigned) + <55> DW_AT_name : (indirect string, offset: 0xf0): unsigned int + <1><59>: Abbrev Number: 2 (DW_TAG_base_type) + <5a> DW_AT_byte_size : 8 + <5b> DW_AT_encoding : 7 (unsigned) + <5c> DW_AT_name : (indirect string, offset: 0x1b4): long long unsigned int + <1><60>: Abbrev Number: 2 (DW_TAG_base_type) + <61> DW_AT_byte_size : 4 + <62> DW_AT_encoding : 5 (signed) + <63> DW_AT_name : (indirect string, offset: 0x18f): long int + <1><67>: Abbrev Number: 2 (DW_TAG_base_type) + <68> DW_AT_byte_size : 4 + <69> DW_AT_encoding : 7 (unsigned) + <6a> DW_AT_name : (indirect string, offset: 0x78): long unsigned int + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x14b): sizetype + <1><75>: Abbrev Number: 2 (DW_TAG_base_type) + <76> DW_AT_byte_size : 1 + <77> DW_AT_encoding : 6 (signed char) + <78> DW_AT_name : (indirect string, offset: 0x10b): char + <1><7c>: Abbrev Number: 5 (DW_TAG_pointer_type) + <7d> DW_AT_byte_size : 4 + <7e> DW_AT_type : <0x82> + <1><82>: Abbrev Number: 6 (DW_TAG_const_type) + <83> DW_AT_type : <0x75> + <1><87>: Abbrev Number: 7 (DW_TAG_structure_type) + <88> DW_AT_name : (indirect string, offset: 0x8a): sysent + <8c> DW_AT_byte_size : 20 + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 4 + <8f> DW_AT_sibling : <0xda> + <2><93>: Abbrev Number: 8 (DW_TAG_member) + <94> DW_AT_name : (indirect string, offset: 0xa2): nargs + <98> DW_AT_decl_file : 1 + <99> DW_AT_decl_line : 5 + <9a> DW_AT_type : <0x52> + <9e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x58): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1a4): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xe5> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x3e): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x7c> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xe5> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xda> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0xfd): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x87> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xfc> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xeb> + <1><101>: Abbrev Number: 2 (DW_TAG_base_type) + <102> DW_AT_byte_size : 1 + <103> DW_AT_encoding : 2 (boolean) + <104> DW_AT_name : (indirect string, offset: 0x8): _Bool + <1><108>: Abbrev Number: 12 (DW_TAG_structure_type) + <109> DW_AT_byte_size : 148 + <10a> DW_AT_decl_file : 3 + <10b> DW_AT_decl_line : 44 + <10c> DW_AT_sibling : <0x157> + <2><110>: Abbrev Number: 8 (DW_TAG_member) + <111> DW_AT_name : (indirect string, offset: 0xe): start + <115> DW_AT_decl_file : 3 + <116> DW_AT_decl_line : 45 + <117> DW_AT_type : <0x32> + <11b> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><11e>: Abbrev Number: 8 (DW_TAG_member) + <11f> DW_AT_name : (indirect string, offset: 0x1ad): length + <123> DW_AT_decl_file : 3 + <124> DW_AT_decl_line : 46 + <125> DW_AT_type : <0x32> + <129> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><12c>: Abbrev Number: 9 (DW_TAG_member) + <12d> DW_AT_name : pno + <131> DW_AT_decl_file : 3 + <132> DW_AT_decl_line : 47 + <133> DW_AT_type : <0x2b> + <137> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><13a>: Abbrev Number: 8 (DW_TAG_member) + <13b> DW_AT_name : (indirect string, offset: 0x1cb): devname + <13f> DW_AT_decl_file : 3 + <140> DW_AT_decl_line : 48 + <141> DW_AT_type : <0x157> + <145> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><148>: Abbrev Number: 8 (DW_TAG_member) + <149> DW_AT_name : (indirect string, offset: 0x62): volname + <14d> DW_AT_decl_file : 3 + <14e> DW_AT_decl_line : 50 + <14f> DW_AT_type : <0x157> + <153> DW_AT_data_member_location: 2 byte block: 23 54 (DW_OP_plus_uconst: 84) + <2><156>: Abbrev Number: 0 + <1><157>: Abbrev Number: 13 (DW_TAG_array_type) + <158> DW_AT_type : <0x75> + <15c> DW_AT_sibling : <0x167> + <2><160>: Abbrev Number: 14 (DW_TAG_subrange_type) + <161> DW_AT_type : <0x6e> + <165> DW_AT_upper_bound : 63 + <2><166>: Abbrev Number: 0 + <1><167>: Abbrev Number: 4 (DW_TAG_typedef) + <168> DW_AT_name : (indirect string, offset: 0x27): struct_blkpg_partition + <16c> DW_AT_decl_file : 3 + <16d> DW_AT_decl_line : 51 + <16e> DW_AT_type : <0x108> + <1><172>: Abbrev Number: 15 (DW_TAG_variable) + <173> DW_AT_name : (indirect string, offset: 0x91): current_wordsize + <177> DW_AT_decl_file : 4 + <178> DW_AT_decl_line : 757 + <17a> DW_AT_type : <0x52> + <17e> DW_AT_external : 1 + <17f> DW_AT_declaration : 1 + <1><180>: Abbrev Number: 15 (DW_TAG_variable) + <181> DW_AT_name : (indirect string, offset: 0x8a): sysent + <185> DW_AT_decl_file : 4 + <186> DW_AT_decl_line : 892 + <188> DW_AT_type : <0xf6> + <18c> DW_AT_external : 1 + <18d> DW_AT_declaration : 1 + <1><18e>: Abbrev Number: 15 (DW_TAG_variable) + <18f> DW_AT_name : (indirect string, offset: 0x141): nsyscalls + <193> DW_AT_decl_file : 4 + <194> DW_AT_decl_line : 903 + <196> DW_AT_type : <0x52> + <19a> DW_AT_external : 1 + <19b> DW_AT_declaration : 1 + <1><19c>: Abbrev Number: 16 (DW_TAG_variable) + <19d> DW_AT_name : (indirect string, offset: 0x47): mpers_target_var + <1a1> DW_AT_decl_file : 3 + <1a2> DW_AT_decl_line : 64 + <1a3> DW_AT_type : <0x167> + <1a7> DW_AT_external : 1 + <1a8> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><1ae>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_blkpg_partition.d2 b/mpers-m32/struct_blkpg_partition.d2 new file mode 100644 index 000000000..b5f8e80dd --- /dev/null +++ b/mpers-m32/struct_blkpg_partition.d2 @@ -0,0 +1,230 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x198): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x185): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): int64_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 43 +DW_AT_type : <0x3d> +<1><3d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x154): long long int +<1><44> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x6a): unsigned char +<1><4b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x14): short unsigned int +<1><52> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xf0): unsigned int +<1><59> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1b4): long long unsigned int +<1><60> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x18f): long int +<1><67> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x78): long unsigned int +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x14b): sizetype +<1><75> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x10b): char +<1><7c> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x82> +<1><82> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x75> +<1><87> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x8a): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xda> +<2><93> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa2): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x52> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x58): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a4): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xe5> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3e): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xe5> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xda> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xfd): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x87> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xfc> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xeb> +<1><101> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x8): _Bool +<1><108> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_byte_size : 148 +DW_AT_decl_file : 3 +DW_AT_decl_line : 44 +DW_AT_sibling : <0x157> +<2><110> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe): start +DW_AT_decl_file : 3 +DW_AT_decl_line : 45 +DW_AT_type : <0x32> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><11e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ad): length +DW_AT_decl_file : 3 +DW_AT_decl_line : 46 +DW_AT_type : <0x32> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><12c> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : pno +DW_AT_decl_file : 3 +DW_AT_decl_line : 47 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><13a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1cb): devname +DW_AT_decl_file : 3 +DW_AT_decl_line : 48 +DW_AT_type : <0x157> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><148> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x62): volname +DW_AT_decl_file : 3 +DW_AT_decl_line : 50 +DW_AT_type : <0x157> +DW_AT_data_member_location: 2 byte block: 23 54 (DW_OP_plus_uconst: 84) +<1><157> +Abbrev Number: 13 (DW_TAG_array_type) +DW_AT_type : <0x75> +DW_AT_sibling : <0x167> +<2><160> +Abbrev Number: 14 (DW_TAG_subrange_type) +DW_AT_type : <0x6e> +DW_AT_upper_bound : 63 +<1><167> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x27): struct_blkpg_partition +DW_AT_decl_file : 3 +DW_AT_decl_line : 51 +DW_AT_type : <0x108> +<1><172> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x91): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x52> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><180> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x8a): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xf6> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><18e> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x141): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x52> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><19c> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x47): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 64 +DW_AT_type : <0x167> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_blkpg_partition.h b/mpers-m32/struct_blkpg_partition.h new file mode 100644 index 000000000..8e34b8027 --- /dev/null +++ b/mpers-m32/struct_blkpg_partition.h @@ -0,0 +1,11 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t start; +int64_t length; +int32_t pno; +char devname[64]; +char volname[64]; +} ATTRIBUTE_PACKED m32_struct_blkpg_partition; +#define MPERS_m32_struct_blkpg_partition m32_struct_blkpg_partition diff --git a/mpers-m32/struct_btrfs_ioctl_dev_replace_args.c b/mpers-m32/struct_btrfs_ioctl_dev_replace_args.c new file mode 100644 index 000000000..c907ffb35 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_dev_replace_args.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2016 Jeff Mahoney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_BTRFS_H + + +# include + +typedef struct btrfs_ioctl_dev_replace_args + struct_btrfs_ioctl_dev_replace_args; +typedef struct btrfs_ioctl_send_args + struct_btrfs_ioctl_send_args; +typedef struct btrfs_ioctl_received_subvol_args + struct_btrfs_ioctl_received_subvol_args; +typedef struct btrfs_ioctl_vol_args_v2 + struct_btrfs_ioctl_vol_args_v2; + +#endif /* HAVE_LINUX_BTRFS_H */ + +struct_btrfs_ioctl_dev_replace_args mpers_target_var; diff --git a/mpers-m32/struct_btrfs_ioctl_dev_replace_args.d1 b/mpers-m32/struct_btrfs_ioctl_dev_replace_args.d1 new file mode 100644 index 000000000..dcd1744b2 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_dev_replace_args.d1 @@ -0,0 +1,327 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x2b3 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x159): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xec): mpers-m32/struct_btrfs_ioctl_dev_replace_args.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x24b): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x362): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x324): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x0): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xde): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x38c): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x20e): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xb9): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x334): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x11c): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x2a6): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x229): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x12e): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x153): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0xaf): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x39f): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x95): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x21b): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x36): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x2e2): __u8 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 20 + <104> DW_AT_type : <0x39> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x2a0): __u64 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 30 + <10f> DW_AT_type : <0x4e> + <1><113>: Abbrev Number: 12 (DW_TAG_structure_type) + <114> DW_AT_name : (indirect string, offset: 0x33d): btrfs_ioctl_dev_replace_start_params + <118> DW_AT_byte_size : 2068 + <11a> DW_AT_decl_file : 3 + <11b> DW_AT_decl_line : 131 + <11c> DW_AT_sibling : <0x15a> + <2><120>: Abbrev Number: 7 (DW_TAG_member) + <121> DW_AT_name : (indirect string, offset: 0x56): srcdevid + <125> DW_AT_decl_file : 3 + <126> DW_AT_decl_line : 132 + <127> DW_AT_type : <0x108> + <12b> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><12e>: Abbrev Number: 7 (DW_TAG_member) + <12f> DW_AT_name : (indirect string, offset: 0x36e): cont_reading_from_srcdev_mode + <133> DW_AT_decl_file : 3 + <134> DW_AT_decl_line : 133 + <135> DW_AT_type : <0x108> + <139> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><13c>: Abbrev Number: 7 (DW_TAG_member) + <13d> DW_AT_name : (indirect string, offset: 0x65): srcdev_name + <141> DW_AT_decl_file : 3 + <142> DW_AT_decl_line : 135 + <143> DW_AT_type : <0x15a> + <147> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><14a>: Abbrev Number: 7 (DW_TAG_member) + <14b> DW_AT_name : (indirect string, offset: 0x3a8): tgtdev_name + <14f> DW_AT_decl_file : 3 + <150> DW_AT_decl_line : 136 + <151> DW_AT_type : <0x15a> + <155> DW_AT_data_member_location: 3 byte block: 23 91 8 (DW_OP_plus_uconst: 1041) + <2><159>: Abbrev Number: 0 + <1><15a>: Abbrev Number: 13 (DW_TAG_array_type) + <15b> DW_AT_type : <0xfd> + <15f> DW_AT_sibling : <0x16b> + <2><163>: Abbrev Number: 14 (DW_TAG_subrange_type) + <164> DW_AT_type : <0x63> + <168> DW_AT_upper_bound : 1024 + <2><16a>: Abbrev Number: 0 + <1><16b>: Abbrev Number: 6 (DW_TAG_structure_type) + <16c> DW_AT_name : (indirect string, offset: 0x1c0): btrfs_ioctl_dev_replace_status_params + <170> DW_AT_byte_size : 48 + <171> DW_AT_decl_file : 3 + <172> DW_AT_decl_line : 144 + <173> DW_AT_sibling : <0x1cc> + <2><177>: Abbrev Number: 7 (DW_TAG_member) + <178> DW_AT_name : (indirect string, offset: 0xd0): replace_state + <17c> DW_AT_decl_file : 3 + <17d> DW_AT_decl_line : 145 + <17e> DW_AT_type : <0x108> + <182> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><185>: Abbrev Number: 7 (DW_TAG_member) + <186> DW_AT_name : (indirect string, offset: 0xe): progress_1000 + <18a> DW_AT_decl_file : 3 + <18b> DW_AT_decl_line : 146 + <18c> DW_AT_type : <0x108> + <190> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><193>: Abbrev Number: 7 (DW_TAG_member) + <194> DW_AT_name : (indirect string, offset: 0x135): time_started + <198> DW_AT_decl_file : 3 + <199> DW_AT_decl_line : 147 + <19a> DW_AT_type : <0x108> + <19e> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><1a1>: Abbrev Number: 7 (DW_TAG_member) + <1a2> DW_AT_name : (indirect string, offset: 0x2e7): time_stopped + <1a6> DW_AT_decl_file : 3 + <1a7> DW_AT_decl_line : 148 + <1a8> DW_AT_type : <0x108> + <1ac> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1af>: Abbrev Number: 7 (DW_TAG_member) + <1b0> DW_AT_name : (indirect string, offset: 0x313): num_write_errors + <1b4> DW_AT_decl_file : 3 + <1b5> DW_AT_decl_line : 149 + <1b6> DW_AT_type : <0x108> + <1ba> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1bd>: Abbrev Number: 7 (DW_TAG_member) + <1be> DW_AT_name : (indirect string, offset: 0x1f0): num_uncorrectable_read_errors + <1c2> DW_AT_decl_file : 3 + <1c3> DW_AT_decl_line : 150 + <1c4> DW_AT_type : <0x108> + <1c8> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1cb>: Abbrev Number: 0 + <1><1cc>: Abbrev Number: 15 (DW_TAG_union_type) + <1cd> DW_AT_byte_size : 2068 + <1cf> DW_AT_decl_file : 3 + <1d0> DW_AT_decl_line : 163 + <1d1> DW_AT_sibling : <0x1ec> + <2><1d5>: Abbrev Number: 16 (DW_TAG_member) + <1d6> DW_AT_name : (indirect string, offset: 0x5f): start + <1da> DW_AT_decl_file : 3 + <1db> DW_AT_decl_line : 164 + <1dc> DW_AT_type : <0x113> + <2><1e0>: Abbrev Number: 16 (DW_TAG_member) + <1e1> DW_AT_name : (indirect string, offset: 0x8e): status + <1e5> DW_AT_decl_file : 3 + <1e6> DW_AT_decl_line : 165 + <1e7> DW_AT_type : <0x16b> + <2><1eb>: Abbrev Number: 0 + <1><1ec>: Abbrev Number: 12 (DW_TAG_structure_type) + <1ed> DW_AT_name : (indirect string, offset: 0x71): btrfs_ioctl_dev_replace_args + <1f1> DW_AT_byte_size : 2596 + <1f3> DW_AT_decl_file : 3 + <1f4> DW_AT_decl_line : 159 + <1f5> DW_AT_sibling : <0x22d> + <2><1f9>: Abbrev Number: 8 (DW_TAG_member) + <1fa> DW_AT_name : cmd + <1fe> DW_AT_decl_file : 3 + <1ff> DW_AT_decl_line : 160 + <200> DW_AT_type : <0x108> + <204> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><207>: Abbrev Number: 7 (DW_TAG_member) + <208> DW_AT_name : (indirect string, offset: 0x244): result + <20c> DW_AT_decl_file : 3 + <20d> DW_AT_decl_line : 161 + <20e> DW_AT_type : <0x108> + <212> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><215>: Abbrev Number: 17 (DW_TAG_member) + <216> DW_AT_type : <0x1cc> + <21a> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><21d>: Abbrev Number: 7 (DW_TAG_member) + <21e> DW_AT_name : (indirect string, offset: 0x32e): spare + <222> DW_AT_decl_file : 3 + <223> DW_AT_decl_line : 168 + <224> DW_AT_type : <0x22d> + <228> DW_AT_data_member_location: 3 byte block: 23 a4 10 (DW_OP_plus_uconst: 2084) + <2><22c>: Abbrev Number: 0 + <1><22d>: Abbrev Number: 13 (DW_TAG_array_type) + <22e> DW_AT_type : <0x108> + <232> DW_AT_sibling : <0x23d> + <2><236>: Abbrev Number: 18 (DW_TAG_subrange_type) + <237> DW_AT_type : <0x63> + <23b> DW_AT_upper_bound : 63 + <2><23c>: Abbrev Number: 0 + <1><23d>: Abbrev Number: 19 (DW_TAG_enumeration_type) + <23e> DW_AT_name : (indirect string, offset: 0x22e): btrfs_dev_stat_values + <242> DW_AT_byte_size : 4 + <243> DW_AT_decl_file : 3 + <244> DW_AT_decl_line : 369 + <246> DW_AT_sibling : <0x26f> + <2><24a>: Abbrev Number: 20 (DW_TAG_enumerator) + <24b> DW_AT_name : (indirect string, offset: 0x3c): BTRFS_DEV_STAT_WRITE_ERRS + <24f> DW_AT_const_value : 0 + <2><250>: Abbrev Number: 20 (DW_TAG_enumerator) + <251> DW_AT_name : (indirect string, offset: 0x2c9): BTRFS_DEV_STAT_READ_ERRS + <255> DW_AT_const_value : 1 + <2><256>: Abbrev Number: 20 (DW_TAG_enumerator) + <257> DW_AT_name : (indirect string, offset: 0x2af): BTRFS_DEV_STAT_FLUSH_ERRS + <25b> DW_AT_const_value : 2 + <2><25c>: Abbrev Number: 20 (DW_TAG_enumerator) + <25d> DW_AT_name : (indirect string, offset: 0x1a1): BTRFS_DEV_STAT_CORRUPTION_ERRS + <261> DW_AT_const_value : 3 + <2><262>: Abbrev Number: 20 (DW_TAG_enumerator) + <263> DW_AT_name : (indirect string, offset: 0x2f4): BTRFS_DEV_STAT_GENERATION_ERRS + <267> DW_AT_const_value : 4 + <2><268>: Abbrev Number: 20 (DW_TAG_enumerator) + <269> DW_AT_name : (indirect string, offset: 0x1c): BTRFS_DEV_STAT_VALUES_MAX + <26d> DW_AT_const_value : 5 + <2><26e>: Abbrev Number: 0 + <1><26f>: Abbrev Number: 11 (DW_TAG_typedef) + <270> DW_AT_name : (indirect string, offset: 0x27c): struct_btrfs_ioctl_dev_replace_args + <274> DW_AT_decl_file : 4 + <275> DW_AT_decl_line : 36 + <276> DW_AT_type : <0x1ec> + <1><27a>: Abbrev Number: 21 (DW_TAG_variable) + <27b> DW_AT_name : (indirect string, offset: 0x142): current_wordsize + <27f> DW_AT_decl_file : 5 + <280> DW_AT_decl_line : 757 + <282> DW_AT_type : <0x47> + <286> DW_AT_external : 1 + <287> DW_AT_declaration : 1 + <1><288>: Abbrev Number: 21 (DW_TAG_variable) + <289> DW_AT_name : (indirect string, offset: 0x12e): sysent + <28d> DW_AT_decl_file : 5 + <28e> DW_AT_decl_line : 892 + <290> DW_AT_type : <0xeb> + <294> DW_AT_external : 1 + <295> DW_AT_declaration : 1 + <1><296>: Abbrev Number: 21 (DW_TAG_variable) + <297> DW_AT_name : (indirect string, offset: 0x1e6): nsyscalls + <29b> DW_AT_decl_file : 5 + <29c> DW_AT_decl_line : 903 + <29e> DW_AT_type : <0x47> + <2a2> DW_AT_external : 1 + <2a3> DW_AT_declaration : 1 + <1><2a4>: Abbrev Number: 22 (DW_TAG_variable) + <2a5> DW_AT_name : (indirect string, offset: 0x9e): mpers_target_var + <2a9> DW_AT_decl_file : 4 + <2aa> DW_AT_decl_line : 46 + <2ab> DW_AT_type : <0x26f> + <2af> DW_AT_external : 1 + <2b0> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><2b6>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_btrfs_ioctl_dev_replace_args.d2 b/mpers-m32/struct_btrfs_ioctl_dev_replace_args.d2 new file mode 100644 index 000000000..1e9b5f061 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_dev_replace_args.d2 @@ -0,0 +1,368 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x362): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x324): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x0): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xde): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x38c): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x20e): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb9): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x334): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x11c): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2a6): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x229): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x12e): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x153): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xaf): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x39f): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x95): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x21b): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x36): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2e2): __u8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 20 +DW_AT_type : <0x39> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2a0): __u64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><113> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x33d): btrfs_ioctl_dev_replace_start_params +DW_AT_byte_size : 2068 +DW_AT_decl_file : 3 +DW_AT_decl_line : 131 +DW_AT_sibling : <0x15a> +<2><120> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x56): srcdevid +DW_AT_decl_file : 3 +DW_AT_decl_line : 132 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><12e> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x36e): cont_reading_from_srcdev_mode +DW_AT_decl_file : 3 +DW_AT_decl_line : 133 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><13c> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x65): srcdev_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 135 +DW_AT_type : <0x15a> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><14a> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a8): tgtdev_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 136 +DW_AT_type : <0x15a> +DW_AT_data_member_location: 3 byte block: 23 91 8 (DW_OP_plus_uconst: 1041) +<1><15a> +Abbrev Number: 13 (DW_TAG_array_type) +DW_AT_type : <0xfd> +DW_AT_sibling : <0x16b> +<2><163> +Abbrev Number: 14 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1024 +<1><16b> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1c0): btrfs_ioctl_dev_replace_status_params +DW_AT_byte_size : 48 +DW_AT_decl_file : 3 +DW_AT_decl_line : 144 +DW_AT_sibling : <0x1cc> +<2><177> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd0): replace_state +DW_AT_decl_file : 3 +DW_AT_decl_line : 145 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><185> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe): progress_1000 +DW_AT_decl_file : 3 +DW_AT_decl_line : 146 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><193> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x135): time_started +DW_AT_decl_file : 3 +DW_AT_decl_line : 147 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><1a1> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2e7): time_stopped +DW_AT_decl_file : 3 +DW_AT_decl_line : 148 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1af> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x313): num_write_errors +DW_AT_decl_file : 3 +DW_AT_decl_line : 149 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1bd> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f0): num_uncorrectable_read_errors +DW_AT_decl_file : 3 +DW_AT_decl_line : 150 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<1><1cc> +Abbrev Number: 15 (DW_TAG_union_type) +DW_AT_byte_size : 2068 +DW_AT_decl_file : 3 +DW_AT_decl_line : 163 +DW_AT_sibling : <0x1ec> +<2><1d5> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5f): start +DW_AT_decl_file : 3 +DW_AT_decl_line : 164 +DW_AT_type : <0x113> +<2><1e0> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8e): status +DW_AT_decl_file : 3 +DW_AT_decl_line : 165 +DW_AT_type : <0x16b> +<1><1ec> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x71): btrfs_ioctl_dev_replace_args +DW_AT_byte_size : 2596 +DW_AT_decl_file : 3 +DW_AT_decl_line : 159 +DW_AT_sibling : <0x22d> +<2><1f9> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : cmd +DW_AT_decl_file : 3 +DW_AT_decl_line : 160 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><207> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x244): result +DW_AT_decl_file : 3 +DW_AT_decl_line : 161 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><215> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_type : <0x1cc> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><21d> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x32e): spare +DW_AT_decl_file : 3 +DW_AT_decl_line : 168 +DW_AT_type : <0x22d> +DW_AT_data_member_location: 3 byte block: 23 a4 10 (DW_OP_plus_uconst: 2084) +<1><22d> +Abbrev Number: 13 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x23d> +<2><236> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 63 +<1><23d> +Abbrev Number: 19 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x22e): btrfs_dev_stat_values +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 369 +DW_AT_sibling : <0x26f> +<2><24a> +Abbrev Number: 20 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x3c): BTRFS_DEV_STAT_WRITE_ERRS +DW_AT_const_value : 0 +<2><250> +Abbrev Number: 20 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x2c9): BTRFS_DEV_STAT_READ_ERRS +DW_AT_const_value : 1 +<2><256> +Abbrev Number: 20 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x2af): BTRFS_DEV_STAT_FLUSH_ERRS +DW_AT_const_value : 2 +<2><25c> +Abbrev Number: 20 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1a1): BTRFS_DEV_STAT_CORRUPTION_ERRS +DW_AT_const_value : 3 +<2><262> +Abbrev Number: 20 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x2f4): BTRFS_DEV_STAT_GENERATION_ERRS +DW_AT_const_value : 4 +<2><268> +Abbrev Number: 20 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1c): BTRFS_DEV_STAT_VALUES_MAX +DW_AT_const_value : 5 +<1><26f> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x27c): struct_btrfs_ioctl_dev_replace_args +DW_AT_decl_file : 4 +DW_AT_decl_line : 36 +DW_AT_type : <0x1ec> +<1><27a> +Abbrev Number: 21 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x142): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><288> +Abbrev Number: 21 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x12e): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><296> +Abbrev Number: 21 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1e6): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2a4> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x9e): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x26f> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_btrfs_ioctl_dev_replace_args.h b/mpers-m32/struct_btrfs_ioctl_dev_replace_args.h new file mode 100644 index 000000000..953f20389 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_dev_replace_args.h @@ -0,0 +1,26 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint64_t cmd; +uint64_t result; +union { +struct { +uint64_t srcdevid; +uint64_t cont_reading_from_srcdev_mode; +unsigned char srcdev_name[1025]; +unsigned char tgtdev_name[1025]; +unsigned char mpers_end_filler_1[2]; +} ATTRIBUTE_PACKED start; +struct { +uint64_t replace_state; +uint64_t progress_1000; +uint64_t time_started; +uint64_t time_stopped; +uint64_t num_write_errors; +uint64_t num_uncorrectable_read_errors; +} ATTRIBUTE_PACKED status; +} ; +uint64_t spare[64]; +} ATTRIBUTE_PACKED m32_struct_btrfs_ioctl_dev_replace_args; +#define MPERS_m32_struct_btrfs_ioctl_dev_replace_args m32_struct_btrfs_ioctl_dev_replace_args diff --git a/mpers-m32/struct_btrfs_ioctl_received_subvol_args.c b/mpers-m32/struct_btrfs_ioctl_received_subvol_args.c new file mode 100644 index 000000000..a62dfd3bb --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_received_subvol_args.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2016 Jeff Mahoney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_BTRFS_H + + +# include + +typedef struct btrfs_ioctl_dev_replace_args + struct_btrfs_ioctl_dev_replace_args; +typedef struct btrfs_ioctl_send_args + struct_btrfs_ioctl_send_args; +typedef struct btrfs_ioctl_received_subvol_args + struct_btrfs_ioctl_received_subvol_args; +typedef struct btrfs_ioctl_vol_args_v2 + struct_btrfs_ioctl_vol_args_v2; + +#endif /* HAVE_LINUX_BTRFS_H */ + +struct_btrfs_ioctl_received_subvol_args mpers_target_var; diff --git a/mpers-m32/struct_btrfs_ioctl_received_subvol_args.d1 b/mpers-m32/struct_btrfs_ioctl_received_subvol_args.d1 new file mode 100644 index 000000000..c1b20cab8 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_received_subvol_args.d1 @@ -0,0 +1,277 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x24c (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x154): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x270): mpers-m32/struct_btrfs_ioctl_received_subvol_args.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1ee): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x2dc): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x2c3): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x0): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xe7): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x2e8): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1bb): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xc7): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x2cd): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x10a): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x22f): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x1d3): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x11c): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x14e): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0xbd): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x2fb): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x82): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x6e): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x50): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x56): __u32 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 26 + <104> DW_AT_type : <0x47> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x229): __u64 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 30 + <10f> DW_AT_type : <0x4e> + <1><113>: Abbrev Number: 12 (DW_TAG_enumeration_type) + <114> DW_AT_name : (indirect string, offset: 0x1d8): btrfs_dev_stat_values + <118> DW_AT_byte_size : 4 + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 369 + <11c> DW_AT_sibling : <0x145> + <2><120>: Abbrev Number: 13 (DW_TAG_enumerator) + <121> DW_AT_name : (indirect string, offset: 0x123): BTRFS_DEV_STAT_WRITE_ERRS + <125> DW_AT_const_value : 0 + <2><126>: Abbrev Number: 13 (DW_TAG_enumerator) + <127> DW_AT_name : (indirect string, offset: 0x252): BTRFS_DEV_STAT_READ_ERRS + <12b> DW_AT_const_value : 1 + <2><12c>: Abbrev Number: 13 (DW_TAG_enumerator) + <12d> DW_AT_name : (indirect string, offset: 0x238): BTRFS_DEV_STAT_FLUSH_ERRS + <131> DW_AT_const_value : 2 + <2><132>: Abbrev Number: 13 (DW_TAG_enumerator) + <133> DW_AT_name : (indirect string, offset: 0x19c): BTRFS_DEV_STAT_CORRUPTION_ERRS + <137> DW_AT_const_value : 3 + <2><138>: Abbrev Number: 13 (DW_TAG_enumerator) + <139> DW_AT_name : (indirect string, offset: 0x2a4): BTRFS_DEV_STAT_GENERATION_ERRS + <13d> DW_AT_const_value : 4 + <2><13e>: Abbrev Number: 13 (DW_TAG_enumerator) + <13f> DW_AT_name : (indirect string, offset: 0xe): BTRFS_DEV_STAT_VALUES_MAX + <143> DW_AT_const_value : 5 + <2><144>: Abbrev Number: 0 + <1><145>: Abbrev Number: 14 (DW_TAG_structure_type) + <146> DW_AT_name : (indirect string, offset: 0xf5): btrfs_ioctl_timespec + <14a> DW_AT_byte_size : 12 + <14b> DW_AT_decl_file : 3 + <14c> DW_AT_decl_line : 426 + <14e> DW_AT_sibling : <0x171> + <2><152>: Abbrev Number: 15 (DW_TAG_member) + <153> DW_AT_name : sec + <157> DW_AT_decl_file : 3 + <158> DW_AT_decl_line : 427 + <15a> DW_AT_type : <0x108> + <15e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><161>: Abbrev Number: 16 (DW_TAG_member) + <162> DW_AT_name : (indirect string, offset: 0x26b): nsec + <166> DW_AT_decl_file : 3 + <167> DW_AT_decl_line : 428 + <169> DW_AT_type : <0xfd> + <16d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><170>: Abbrev Number: 0 + <1><171>: Abbrev Number: 14 (DW_TAG_structure_type) + <172> DW_AT_name : (indirect string, offset: 0x8b): btrfs_ioctl_received_subvol_args + <176> DW_AT_byte_size : 192 + <177> DW_AT_decl_file : 3 + <178> DW_AT_decl_line : 431 + <17a> DW_AT_sibling : <0x1e8> + <2><17e>: Abbrev Number: 16 (DW_TAG_member) + <17f> DW_AT_name : (indirect string, offset: 0x1ce): uuid + <183> DW_AT_decl_file : 3 + <184> DW_AT_decl_line : 432 + <186> DW_AT_type : <0x1e8> + <18a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><18d>: Abbrev Number: 16 (DW_TAG_member) + <18e> DW_AT_name : (indirect string, offset: 0x65): stransid + <192> DW_AT_decl_file : 3 + <193> DW_AT_decl_line : 433 + <195> DW_AT_type : <0x108> + <199> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><19c>: Abbrev Number: 16 (DW_TAG_member) + <19d> DW_AT_name : (indirect string, offset: 0xde): rtransid + <1a1> DW_AT_decl_file : 3 + <1a2> DW_AT_decl_line : 434 + <1a4> DW_AT_type : <0x108> + <1a8> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1ab>: Abbrev Number: 16 (DW_TAG_member) + <1ac> DW_AT_name : (indirect string, offset: 0x7c): stime + <1b0> DW_AT_decl_file : 3 + <1b1> DW_AT_decl_line : 435 + <1b3> DW_AT_type : <0x145> + <1b7> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1ba>: Abbrev Number: 16 (DW_TAG_member) + <1bb> DW_AT_name : (indirect string, offset: 0x2d6): rtime + <1bf> DW_AT_decl_file : 3 + <1c0> DW_AT_decl_line : 436 + <1c2> DW_AT_type : <0x145> + <1c6> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><1c9>: Abbrev Number: 16 (DW_TAG_member) + <1ca> DW_AT_name : (indirect string, offset: 0x1c8): flags + <1ce> DW_AT_decl_file : 3 + <1cf> DW_AT_decl_line : 437 + <1d1> DW_AT_type : <0x108> + <1d5> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><1d8>: Abbrev Number: 16 (DW_TAG_member) + <1d9> DW_AT_name : (indirect string, offset: 0x5c): reserved + <1dd> DW_AT_decl_file : 3 + <1de> DW_AT_decl_line : 438 + <1e0> DW_AT_type : <0x1f8> + <1e4> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><1e7>: Abbrev Number: 0 + <1><1e8>: Abbrev Number: 17 (DW_TAG_array_type) + <1e9> DW_AT_type : <0x6a> + <1ed> DW_AT_sibling : <0x1f8> + <2><1f1>: Abbrev Number: 18 (DW_TAG_subrange_type) + <1f2> DW_AT_type : <0x63> + <1f6> DW_AT_upper_bound : 15 + <2><1f7>: Abbrev Number: 0 + <1><1f8>: Abbrev Number: 17 (DW_TAG_array_type) + <1f9> DW_AT_type : <0x108> + <1fd> DW_AT_sibling : <0x208> + <2><201>: Abbrev Number: 18 (DW_TAG_subrange_type) + <202> DW_AT_type : <0x63> + <206> DW_AT_upper_bound : 15 + <2><207>: Abbrev Number: 0 + <1><208>: Abbrev Number: 11 (DW_TAG_typedef) + <209> DW_AT_name : (indirect string, offset: 0x28): struct_btrfs_ioctl_received_subvol_args + <20d> DW_AT_decl_file : 4 + <20e> DW_AT_decl_line : 40 + <20f> DW_AT_type : <0x171> + <1><213>: Abbrev Number: 19 (DW_TAG_variable) + <214> DW_AT_name : (indirect string, offset: 0x13d): current_wordsize + <218> DW_AT_decl_file : 5 + <219> DW_AT_decl_line : 757 + <21b> DW_AT_type : <0x47> + <21f> DW_AT_external : 1 + <220> DW_AT_declaration : 1 + <1><221>: Abbrev Number: 19 (DW_TAG_variable) + <222> DW_AT_name : (indirect string, offset: 0x11c): sysent + <226> DW_AT_decl_file : 5 + <227> DW_AT_decl_line : 892 + <229> DW_AT_type : <0xeb> + <22d> DW_AT_external : 1 + <22e> DW_AT_declaration : 1 + <1><22f>: Abbrev Number: 19 (DW_TAG_variable) + <230> DW_AT_name : (indirect string, offset: 0x21f): nsyscalls + <234> DW_AT_decl_file : 5 + <235> DW_AT_decl_line : 903 + <237> DW_AT_type : <0x47> + <23b> DW_AT_external : 1 + <23c> DW_AT_declaration : 1 + <1><23d>: Abbrev Number: 20 (DW_TAG_variable) + <23e> DW_AT_name : (indirect string, offset: 0xac): mpers_target_var + <242> DW_AT_decl_file : 4 + <243> DW_AT_decl_line : 46 + <244> DW_AT_type : <0x208> + <248> DW_AT_external : 1 + <249> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><24f>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_btrfs_ioctl_received_subvol_args.d2 b/mpers-m32/struct_btrfs_ioctl_received_subvol_args.d2 new file mode 100644 index 000000000..df06e8a4b --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_received_subvol_args.d2 @@ -0,0 +1,311 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x2dc): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x2c3): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x0): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xe7): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2e8): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1bb): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xc7): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x2cd): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x10a): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x22f): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1d3): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x11c): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14e): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbd): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2fb): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x82): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x6e): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x50): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x56): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x229): __u64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><113> +Abbrev Number: 12 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x1d8): btrfs_dev_stat_values +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 369 +DW_AT_sibling : <0x145> +<2><120> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x123): BTRFS_DEV_STAT_WRITE_ERRS +DW_AT_const_value : 0 +<2><126> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x252): BTRFS_DEV_STAT_READ_ERRS +DW_AT_const_value : 1 +<2><12c> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x238): BTRFS_DEV_STAT_FLUSH_ERRS +DW_AT_const_value : 2 +<2><132> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x19c): BTRFS_DEV_STAT_CORRUPTION_ERRS +DW_AT_const_value : 3 +<2><138> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x2a4): BTRFS_DEV_STAT_GENERATION_ERRS +DW_AT_const_value : 4 +<2><13e> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0xe): BTRFS_DEV_STAT_VALUES_MAX +DW_AT_const_value : 5 +<1><145> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xf5): btrfs_ioctl_timespec +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 426 +DW_AT_sibling : <0x171> +<2><152> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : sec +DW_AT_decl_file : 3 +DW_AT_decl_line : 427 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><161> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x26b): nsec +DW_AT_decl_file : 3 +DW_AT_decl_line : 428 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><171> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x8b): btrfs_ioctl_received_subvol_args +DW_AT_byte_size : 192 +DW_AT_decl_file : 3 +DW_AT_decl_line : 431 +DW_AT_sibling : <0x1e8> +<2><17e> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ce): uuid +DW_AT_decl_file : 3 +DW_AT_decl_line : 432 +DW_AT_type : <0x1e8> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><18d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x65): stransid +DW_AT_decl_file : 3 +DW_AT_decl_line : 433 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><19c> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xde): rtransid +DW_AT_decl_file : 3 +DW_AT_decl_line : 434 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1ab> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7c): stime +DW_AT_decl_file : 3 +DW_AT_decl_line : 435 +DW_AT_type : <0x145> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1ba> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d6): rtime +DW_AT_decl_file : 3 +DW_AT_decl_line : 436 +DW_AT_type : <0x145> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><1c9> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c8): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 437 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><1d8> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5c): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 438 +DW_AT_type : <0x1f8> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<1><1e8> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x1f8> +<2><1f1> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 15 +<1><1f8> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x208> +<2><201> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 15 +<1><208> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x28): struct_btrfs_ioctl_received_subvol_args +DW_AT_decl_file : 4 +DW_AT_decl_line : 40 +DW_AT_type : <0x171> +<1><213> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x13d): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><221> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x11c): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><22f> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x21f): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><23d> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xac): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x208> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_btrfs_ioctl_received_subvol_args.h b/mpers-m32/struct_btrfs_ioctl_received_subvol_args.h new file mode 100644 index 000000000..c94761919 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_received_subvol_args.h @@ -0,0 +1,19 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +char uuid[16]; +uint64_t stransid; +uint64_t rtransid; +struct { +uint64_t sec; +uint32_t nsec; +} ATTRIBUTE_PACKED stime; +struct { +uint64_t sec; +uint32_t nsec; +} ATTRIBUTE_PACKED rtime; +uint64_t flags; +uint64_t reserved[16]; +} ATTRIBUTE_PACKED m32_struct_btrfs_ioctl_received_subvol_args; +#define MPERS_m32_struct_btrfs_ioctl_received_subvol_args m32_struct_btrfs_ioctl_received_subvol_args diff --git a/mpers-m32/struct_btrfs_ioctl_send_args.c b/mpers-m32/struct_btrfs_ioctl_send_args.c new file mode 100644 index 000000000..6a8a43a25 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_send_args.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2016 Jeff Mahoney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_BTRFS_H + + +# include + +typedef struct btrfs_ioctl_dev_replace_args + struct_btrfs_ioctl_dev_replace_args; +typedef struct btrfs_ioctl_send_args + struct_btrfs_ioctl_send_args; +typedef struct btrfs_ioctl_received_subvol_args + struct_btrfs_ioctl_received_subvol_args; +typedef struct btrfs_ioctl_vol_args_v2 + struct_btrfs_ioctl_vol_args_v2; + +#endif /* HAVE_LINUX_BTRFS_H */ + +struct_btrfs_ioctl_send_args mpers_target_var; diff --git a/mpers-m32/struct_btrfs_ioctl_send_args.d1 b/mpers-m32/struct_btrfs_ioctl_send_args.d1 new file mode 100644 index 000000000..907455a60 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_send_args.d1 @@ -0,0 +1,248 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x207 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x138): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xf1): mpers-m32/struct_btrfs_ioctl_send_args.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1e9): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x2aa): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x62): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0xc3): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xd1): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x4f): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x19f): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x2bf): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x2a1): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xdf): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x22a): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x1c0): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x11a): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x132): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0xb9): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x2b6): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x6c): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1b2): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x26): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x2d6): __s64 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 29 + <104> DW_AT_type : <0x32> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x224): __u64 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 30 + <10f> DW_AT_type : <0x4e> + <1><113>: Abbrev Number: 12 (DW_TAG_array_type) + <114> DW_AT_type : <0x108> + <118> DW_AT_sibling : <0x123> + <2><11c>: Abbrev Number: 13 (DW_TAG_subrange_type) + <11d> DW_AT_type : <0x63> + <121> DW_AT_upper_bound : 3 + <2><122>: Abbrev Number: 0 + <1><123>: Abbrev Number: 14 (DW_TAG_enumeration_type) + <124> DW_AT_name : (indirect string, offset: 0x1c5): btrfs_dev_stat_values + <128> DW_AT_byte_size : 4 + <129> DW_AT_decl_file : 3 + <12a> DW_AT_decl_line : 369 + <12c> DW_AT_sibling : <0x155> + <2><130>: Abbrev Number: 15 (DW_TAG_enumerator) + <131> DW_AT_name : (indirect string, offset: 0x2c): BTRFS_DEV_STAT_WRITE_ERRS + <135> DW_AT_const_value : 0 + <2><136>: Abbrev Number: 15 (DW_TAG_enumerator) + <137> DW_AT_name : (indirect string, offset: 0x24d): BTRFS_DEV_STAT_READ_ERRS + <13b> DW_AT_const_value : 1 + <2><13c>: Abbrev Number: 15 (DW_TAG_enumerator) + <13d> DW_AT_name : (indirect string, offset: 0x233): BTRFS_DEV_STAT_FLUSH_ERRS + <141> DW_AT_const_value : 2 + <2><142>: Abbrev Number: 15 (DW_TAG_enumerator) + <143> DW_AT_name : (indirect string, offset: 0x180): BTRFS_DEV_STAT_CORRUPTION_ERRS + <147> DW_AT_const_value : 3 + <2><148>: Abbrev Number: 15 (DW_TAG_enumerator) + <149> DW_AT_name : (indirect string, offset: 0x266): BTRFS_DEV_STAT_GENERATION_ERRS + <14d> DW_AT_const_value : 4 + <2><14e>: Abbrev Number: 15 (DW_TAG_enumerator) + <14f> DW_AT_name : (indirect string, offset: 0xc): BTRFS_DEV_STAT_VALUES_MAX + <153> DW_AT_const_value : 5 + <2><154>: Abbrev Number: 0 + <1><155>: Abbrev Number: 16 (DW_TAG_structure_type) + <156> DW_AT_name : (indirect string, offset: 0x92): btrfs_ioctl_send_args + <15a> DW_AT_byte_size : 68 + <15b> DW_AT_decl_file : 3 + <15c> DW_AT_decl_line : 466 + <15e> DW_AT_sibling : <0x1bd> + <2><162>: Abbrev Number: 17 (DW_TAG_member) + <163> DW_AT_name : (indirect string, offset: 0x299): send_fd + <167> DW_AT_decl_file : 3 + <168> DW_AT_decl_line : 467 + <16a> DW_AT_type : <0xfd> + <16e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><171>: Abbrev Number: 17 (DW_TAG_member) + <172> DW_AT_name : (indirect string, offset: 0x285): clone_sources_count + <176> DW_AT_decl_file : 3 + <177> DW_AT_decl_line : 468 + <179> DW_AT_type : <0x108> + <17d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><180>: Abbrev Number: 17 (DW_TAG_member) + <181> DW_AT_name : (indirect string, offset: 0x1db): clone_sources + <185> DW_AT_decl_file : 3 + <186> DW_AT_decl_line : 469 + <188> DW_AT_type : <0x1bd> + <18c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><18f>: Abbrev Number: 17 (DW_TAG_member) + <190> DW_AT_name : (indirect string, offset: 0x0): parent_root + <194> DW_AT_decl_file : 3 + <195> DW_AT_decl_line : 470 + <197> DW_AT_type : <0x108> + <19b> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><19e>: Abbrev Number: 17 (DW_TAG_member) + <19f> DW_AT_name : (indirect string, offset: 0x1ac): flags + <1a3> DW_AT_decl_file : 3 + <1a4> DW_AT_decl_line : 471 + <1a6> DW_AT_type : <0x108> + <1aa> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><1ad>: Abbrev Number: 17 (DW_TAG_member) + <1ae> DW_AT_name : (indirect string, offset: 0x46): reserved + <1b2> DW_AT_decl_file : 3 + <1b3> DW_AT_decl_line : 472 + <1b5> DW_AT_type : <0x113> + <1b9> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><1bc>: Abbrev Number: 0 + <1><1bd>: Abbrev Number: 4 (DW_TAG_pointer_type) + <1be> DW_AT_byte_size : 4 + <1bf> DW_AT_type : <0x108> + <1><1c3>: Abbrev Number: 11 (DW_TAG_typedef) + <1c4> DW_AT_name : (indirect string, offset: 0x75): struct_btrfs_ioctl_send_args + <1c8> DW_AT_decl_file : 4 + <1c9> DW_AT_decl_line : 38 + <1ca> DW_AT_type : <0x155> + <1><1ce>: Abbrev Number: 18 (DW_TAG_variable) + <1cf> DW_AT_name : (indirect string, offset: 0x121): current_wordsize + <1d3> DW_AT_decl_file : 5 + <1d4> DW_AT_decl_line : 757 + <1d6> DW_AT_type : <0x47> + <1da> DW_AT_external : 1 + <1db> DW_AT_declaration : 1 + <1><1dc>: Abbrev Number: 18 (DW_TAG_variable) + <1dd> DW_AT_name : (indirect string, offset: 0x11a): sysent + <1e1> DW_AT_decl_file : 5 + <1e2> DW_AT_decl_line : 892 + <1e4> DW_AT_type : <0xeb> + <1e8> DW_AT_external : 1 + <1e9> DW_AT_declaration : 1 + <1><1ea>: Abbrev Number: 18 (DW_TAG_variable) + <1eb> DW_AT_name : (indirect string, offset: 0x21a): nsyscalls + <1ef> DW_AT_decl_file : 5 + <1f0> DW_AT_decl_line : 903 + <1f2> DW_AT_type : <0x47> + <1f6> DW_AT_external : 1 + <1f7> DW_AT_declaration : 1 + <1><1f8>: Abbrev Number: 19 (DW_TAG_variable) + <1f9> DW_AT_name : (indirect string, offset: 0xa8): mpers_target_var + <1fd> DW_AT_decl_file : 4 + <1fe> DW_AT_decl_line : 46 + <1ff> DW_AT_type : <0x1c3> + <203> DW_AT_external : 1 + <204> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><20a>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_btrfs_ioctl_send_args.d2 b/mpers-m32/struct_btrfs_ioctl_send_args.d2 new file mode 100644 index 000000000..7733f6110 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_send_args.d2 @@ -0,0 +1,279 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x2aa): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x62): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0xc3): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xd1): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x4f): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x19f): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2bf): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x2a1): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xdf): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x22a): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1c0): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x11a): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x132): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb9): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2b6): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6c): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b2): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x26): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2d6): __s64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 29 +DW_AT_type : <0x32> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x224): __u64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><113> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x123> +<2><11c> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 3 +<1><123> +Abbrev Number: 14 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x1c5): btrfs_dev_stat_values +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 369 +DW_AT_sibling : <0x155> +<2><130> +Abbrev Number: 15 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x2c): BTRFS_DEV_STAT_WRITE_ERRS +DW_AT_const_value : 0 +<2><136> +Abbrev Number: 15 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x24d): BTRFS_DEV_STAT_READ_ERRS +DW_AT_const_value : 1 +<2><13c> +Abbrev Number: 15 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x233): BTRFS_DEV_STAT_FLUSH_ERRS +DW_AT_const_value : 2 +<2><142> +Abbrev Number: 15 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x180): BTRFS_DEV_STAT_CORRUPTION_ERRS +DW_AT_const_value : 3 +<2><148> +Abbrev Number: 15 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x266): BTRFS_DEV_STAT_GENERATION_ERRS +DW_AT_const_value : 4 +<2><14e> +Abbrev Number: 15 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0xc): BTRFS_DEV_STAT_VALUES_MAX +DW_AT_const_value : 5 +<1><155> +Abbrev Number: 16 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x92): btrfs_ioctl_send_args +DW_AT_byte_size : 68 +DW_AT_decl_file : 3 +DW_AT_decl_line : 466 +DW_AT_sibling : <0x1bd> +<2><162> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x299): send_fd +DW_AT_decl_file : 3 +DW_AT_decl_line : 467 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><171> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x285): clone_sources_count +DW_AT_decl_file : 3 +DW_AT_decl_line : 468 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><180> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1db): clone_sources +DW_AT_decl_file : 3 +DW_AT_decl_line : 469 +DW_AT_type : <0x1bd> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><18f> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): parent_root +DW_AT_decl_file : 3 +DW_AT_decl_line : 470 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><19e> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ac): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 471 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><1ad> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x46): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 472 +DW_AT_type : <0x113> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<1><1bd> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x108> +<1><1c3> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x75): struct_btrfs_ioctl_send_args +DW_AT_decl_file : 4 +DW_AT_decl_line : 38 +DW_AT_type : <0x155> +<1><1ce> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x121): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1dc> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x11a): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1ea> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x21a): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1f8> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xa8): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x1c3> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_btrfs_ioctl_send_args.h b/mpers-m32/struct_btrfs_ioctl_send_args.h new file mode 100644 index 000000000..6547390d9 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_send_args.h @@ -0,0 +1,12 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t send_fd; +uint64_t clone_sources_count; +mpers_ptr_t clone_sources; +uint64_t parent_root; +uint64_t flags; +uint64_t reserved[4]; +} ATTRIBUTE_PACKED m32_struct_btrfs_ioctl_send_args; +#define MPERS_m32_struct_btrfs_ioctl_send_args m32_struct_btrfs_ioctl_send_args diff --git a/mpers-m32/struct_btrfs_ioctl_vol_args_v2.c b/mpers-m32/struct_btrfs_ioctl_vol_args_v2.c new file mode 100644 index 000000000..0229a3b84 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_vol_args_v2.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2016 Jeff Mahoney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_BTRFS_H + + +# include + +typedef struct btrfs_ioctl_dev_replace_args + struct_btrfs_ioctl_dev_replace_args; +typedef struct btrfs_ioctl_send_args + struct_btrfs_ioctl_send_args; +typedef struct btrfs_ioctl_received_subvol_args + struct_btrfs_ioctl_received_subvol_args; +typedef struct btrfs_ioctl_vol_args_v2 + struct_btrfs_ioctl_vol_args_v2; + +#endif /* HAVE_LINUX_BTRFS_H */ + +struct_btrfs_ioctl_vol_args_v2 mpers_target_var; diff --git a/mpers-m32/struct_btrfs_ioctl_vol_args_v2.d1 b/mpers-m32/struct_btrfs_ioctl_vol_args_v2.d1 new file mode 100644 index 000000000..9d444e220 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_vol_args_v2.d1 @@ -0,0 +1,363 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x2fe (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x145): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x6b): mpers-m32/struct_btrfs_ioctl_vol_args_v2.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x200): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x32a): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x2ce): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x0): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xe4): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x96): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1c4): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xcd): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x302): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xfb): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x250): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x1e5): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x10d): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x2e4): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0xc3): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x33b): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xa9): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1d7): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x4b): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x344): __s64 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 29 + <104> DW_AT_type : <0x32> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x24a): __u64 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 30 + <10f> DW_AT_type : <0x4e> + <1><113>: Abbrev Number: 6 (DW_TAG_structure_type) + <114> DW_AT_name : (indirect string, offset: 0x38): btrfs_qgroup_limit + <118> DW_AT_byte_size : 40 + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 44 + <11b> DW_AT_sibling : <0x166> + <2><11f>: Abbrev Number: 7 (DW_TAG_member) + <120> DW_AT_name : (indirect string, offset: 0x1d1): flags + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 45 + <126> DW_AT_type : <0x108> + <12a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><12d>: Abbrev Number: 7 (DW_TAG_member) + <12e> DW_AT_name : (indirect string, offset: 0xf2): max_rfer + <132> DW_AT_decl_file : 3 + <133> DW_AT_decl_line : 46 + <134> DW_AT_type : <0x108> + <138> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><13b>: Abbrev Number: 7 (DW_TAG_member) + <13c> DW_AT_name : (indirect string, offset: 0x1ac): max_excl + <140> DW_AT_decl_file : 3 + <141> DW_AT_decl_line : 47 + <142> DW_AT_type : <0x108> + <146> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><149>: Abbrev Number: 7 (DW_TAG_member) + <14a> DW_AT_name : (indirect string, offset: 0x2c5): rsv_rfer + <14e> DW_AT_decl_file : 3 + <14f> DW_AT_decl_line : 48 + <150> DW_AT_type : <0x108> + <154> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><157>: Abbrev Number: 7 (DW_TAG_member) + <158> DW_AT_name : (indirect string, offset: 0x114): rsv_excl + <15c> DW_AT_decl_file : 3 + <15d> DW_AT_decl_line : 49 + <15e> DW_AT_type : <0x108> + <162> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><165>: Abbrev Number: 0 + <1><166>: Abbrev Number: 6 (DW_TAG_structure_type) + <167> DW_AT_name : (indirect string, offset: 0x28c): btrfs_qgroup_inherit + <16b> DW_AT_byte_size : 72 + <16c> DW_AT_decl_file : 3 + <16d> DW_AT_decl_line : 52 + <16e> DW_AT_sibling : <0x1c7> + <2><172>: Abbrev Number: 7 (DW_TAG_member) + <173> DW_AT_name : (indirect string, offset: 0x1d1): flags + <177> DW_AT_decl_file : 3 + <178> DW_AT_decl_line : 53 + <179> DW_AT_type : <0x108> + <17d> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><180>: Abbrev Number: 7 (DW_TAG_member) + <181> DW_AT_name : (indirect string, offset: 0x2d8): num_qgroups + <185> DW_AT_decl_file : 3 + <186> DW_AT_decl_line : 54 + <187> DW_AT_type : <0x108> + <18b> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><18e>: Abbrev Number: 7 (DW_TAG_member) + <18f> DW_AT_name : (indirect string, offset: 0x12e): num_ref_copies + <193> DW_AT_decl_file : 3 + <194> DW_AT_decl_line : 55 + <195> DW_AT_type : <0x108> + <199> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><19c>: Abbrev Number: 7 (DW_TAG_member) + <19d> DW_AT_name : (indirect string, offset: 0xe): num_excl_copies + <1a1> DW_AT_decl_file : 3 + <1a2> DW_AT_decl_line : 56 + <1a3> DW_AT_type : <0x108> + <1a7> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1aa>: Abbrev Number: 8 (DW_TAG_member) + <1ab> DW_AT_name : lim + <1af> DW_AT_decl_file : 3 + <1b0> DW_AT_decl_line : 57 + <1b1> DW_AT_type : <0x113> + <1b5> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1b8>: Abbrev Number: 7 (DW_TAG_member) + <1b9> DW_AT_name : (indirect string, offset: 0x231): qgroups + <1bd> DW_AT_decl_file : 3 + <1be> DW_AT_decl_line : 58 + <1bf> DW_AT_type : <0x1c7> + <1c3> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><1c6>: Abbrev Number: 0 + <1><1c7>: Abbrev Number: 12 (DW_TAG_array_type) + <1c8> DW_AT_type : <0x108> + <1cc> DW_AT_sibling : <0x1d6> + <2><1d0>: Abbrev Number: 13 (DW_TAG_subrange_type) + <1d1> DW_AT_type : <0x63> + <2><1d5>: Abbrev Number: 0 + <1><1d6>: Abbrev Number: 14 (DW_TAG_structure_type) + <1d7> DW_AT_byte_size : 12 + <1d8> DW_AT_decl_file : 3 + <1d9> DW_AT_decl_line : 72 + <1da> DW_AT_sibling : <0x1fb> + <2><1de>: Abbrev Number: 7 (DW_TAG_member) + <1df> DW_AT_name : (indirect string, offset: 0x336): size + <1e3> DW_AT_decl_file : 3 + <1e4> DW_AT_decl_line : 73 + <1e5> DW_AT_type : <0x108> + <1e9> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1ec>: Abbrev Number: 7 (DW_TAG_member) + <1ed> DW_AT_name : (indirect string, offset: 0x1b5): qgroup_inherit + <1f1> DW_AT_decl_file : 3 + <1f2> DW_AT_decl_line : 74 + <1f3> DW_AT_type : <0x1fb> + <1f7> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1fa>: Abbrev Number: 0 + <1><1fb>: Abbrev Number: 4 (DW_TAG_pointer_type) + <1fc> DW_AT_byte_size : 4 + <1fd> DW_AT_type : <0x166> + <1><201>: Abbrev Number: 15 (DW_TAG_union_type) + <202> DW_AT_byte_size : 32 + <203> DW_AT_decl_file : 3 + <204> DW_AT_decl_line : 71 + <205> DW_AT_sibling : <0x21a> + <2><209>: Abbrev Number: 16 (DW_TAG_member) + <20a> DW_AT_type : <0x1d6> + <2><20e>: Abbrev Number: 17 (DW_TAG_member) + <20f> DW_AT_name : (indirect string, offset: 0x243): unused + <213> DW_AT_decl_file : 3 + <214> DW_AT_decl_line : 76 + <215> DW_AT_type : <0x21a> + <2><219>: Abbrev Number: 0 + <1><21a>: Abbrev Number: 12 (DW_TAG_array_type) + <21b> DW_AT_type : <0x108> + <21f> DW_AT_sibling : <0x22a> + <2><223>: Abbrev Number: 18 (DW_TAG_subrange_type) + <224> DW_AT_type : <0x63> + <228> DW_AT_upper_bound : 3 + <2><229>: Abbrev Number: 0 + <1><22a>: Abbrev Number: 19 (DW_TAG_structure_type) + <22b> DW_AT_name : (indirect string, offset: 0x2ea): btrfs_ioctl_vol_args_v2 + <22f> DW_AT_byte_size : 4096 + <231> DW_AT_decl_file : 3 + <232> DW_AT_decl_line : 67 + <233> DW_AT_sibling : <0x277> + <2><237>: Abbrev Number: 8 (DW_TAG_member) + <238> DW_AT_name : fd + <23b> DW_AT_decl_file : 3 + <23c> DW_AT_decl_line : 68 + <23d> DW_AT_type : <0xfd> + <241> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><244>: Abbrev Number: 7 (DW_TAG_member) + <245> DW_AT_name : (indirect string, offset: 0x13d): transid + <249> DW_AT_decl_file : 3 + <24a> DW_AT_decl_line : 69 + <24b> DW_AT_type : <0x108> + <24f> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><252>: Abbrev Number: 7 (DW_TAG_member) + <253> DW_AT_name : (indirect string, offset: 0x1d1): flags + <257> DW_AT_decl_file : 3 + <258> DW_AT_decl_line : 70 + <259> DW_AT_type : <0x108> + <25d> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><260>: Abbrev Number: 20 (DW_TAG_member) + <261> DW_AT_type : <0x201> + <265> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><268>: Abbrev Number: 7 (DW_TAG_member) + <269> DW_AT_name : (indirect string, offset: 0x2a1): name + <26d> DW_AT_decl_file : 3 + <26e> DW_AT_decl_line : 78 + <26f> DW_AT_type : <0x277> + <273> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><276>: Abbrev Number: 0 + <1><277>: Abbrev Number: 12 (DW_TAG_array_type) + <278> DW_AT_type : <0x6a> + <27c> DW_AT_sibling : <0x288> + <2><280>: Abbrev Number: 21 (DW_TAG_subrange_type) + <281> DW_AT_type : <0x63> + <285> DW_AT_upper_bound : 4039 + <2><287>: Abbrev Number: 0 + <1><288>: Abbrev Number: 22 (DW_TAG_enumeration_type) + <289> DW_AT_name : (indirect string, offset: 0x1ea): btrfs_dev_stat_values + <28d> DW_AT_byte_size : 4 + <28e> DW_AT_decl_file : 3 + <28f> DW_AT_decl_line : 369 + <291> DW_AT_sibling : <0x2ba> + <2><295>: Abbrev Number: 23 (DW_TAG_enumerator) + <296> DW_AT_name : (indirect string, offset: 0x51): BTRFS_DEV_STAT_WRITE_ERRS + <29a> DW_AT_const_value : 0 + <2><29b>: Abbrev Number: 23 (DW_TAG_enumerator) + <29c> DW_AT_name : (indirect string, offset: 0x273): BTRFS_DEV_STAT_READ_ERRS + <2a0> DW_AT_const_value : 1 + <2><2a1>: Abbrev Number: 23 (DW_TAG_enumerator) + <2a2> DW_AT_name : (indirect string, offset: 0x259): BTRFS_DEV_STAT_FLUSH_ERRS + <2a6> DW_AT_const_value : 2 + <2><2a7>: Abbrev Number: 23 (DW_TAG_enumerator) + <2a8> DW_AT_name : (indirect string, offset: 0x18d): BTRFS_DEV_STAT_CORRUPTION_ERRS + <2ac> DW_AT_const_value : 3 + <2><2ad>: Abbrev Number: 23 (DW_TAG_enumerator) + <2ae> DW_AT_name : (indirect string, offset: 0x2a6): BTRFS_DEV_STAT_GENERATION_ERRS + <2b2> DW_AT_const_value : 4 + <2><2b3>: Abbrev Number: 23 (DW_TAG_enumerator) + <2b4> DW_AT_name : (indirect string, offset: 0x1e): BTRFS_DEV_STAT_VALUES_MAX + <2b8> DW_AT_const_value : 5 + <2><2b9>: Abbrev Number: 0 + <1><2ba>: Abbrev Number: 11 (DW_TAG_typedef) + <2bb> DW_AT_name : (indirect string, offset: 0x30b): struct_btrfs_ioctl_vol_args_v2 + <2bf> DW_AT_decl_file : 4 + <2c0> DW_AT_decl_line : 42 + <2c1> DW_AT_type : <0x22a> + <1><2c5>: Abbrev Number: 24 (DW_TAG_variable) + <2c6> DW_AT_name : (indirect string, offset: 0x11d): current_wordsize + <2ca> DW_AT_decl_file : 5 + <2cb> DW_AT_decl_line : 757 + <2cd> DW_AT_type : <0x47> + <2d1> DW_AT_external : 1 + <2d2> DW_AT_declaration : 1 + <1><2d3>: Abbrev Number: 24 (DW_TAG_variable) + <2d4> DW_AT_name : (indirect string, offset: 0x10d): sysent + <2d8> DW_AT_decl_file : 5 + <2d9> DW_AT_decl_line : 892 + <2db> DW_AT_type : <0xeb> + <2df> DW_AT_external : 1 + <2e0> DW_AT_declaration : 1 + <1><2e1>: Abbrev Number: 24 (DW_TAG_variable) + <2e2> DW_AT_name : (indirect string, offset: 0x239): nsyscalls + <2e6> DW_AT_decl_file : 5 + <2e7> DW_AT_decl_line : 903 + <2e9> DW_AT_type : <0x47> + <2ed> DW_AT_external : 1 + <2ee> DW_AT_declaration : 1 + <1><2ef>: Abbrev Number: 25 (DW_TAG_variable) + <2f0> DW_AT_name : (indirect string, offset: 0xb2): mpers_target_var + <2f4> DW_AT_decl_file : 4 + <2f5> DW_AT_decl_line : 46 + <2f6> DW_AT_type : <0x2ba> + <2fa> DW_AT_external : 1 + <2fb> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><301>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_btrfs_ioctl_vol_args_v2.d2 b/mpers-m32/struct_btrfs_ioctl_vol_args_v2.d2 new file mode 100644 index 000000000..61020c61d --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_vol_args_v2.d2 @@ -0,0 +1,410 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x32a): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x2ce): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x0): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xe4): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x96): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c4): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xcd): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x302): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xfb): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x250): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1e5): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x10d): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2e4): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc3): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x33b): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa9): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1d7): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x4b): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x344): __s64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 29 +DW_AT_type : <0x32> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x24a): __u64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><113> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x38): btrfs_qgroup_limit +DW_AT_byte_size : 40 +DW_AT_decl_file : 3 +DW_AT_decl_line : 44 +DW_AT_sibling : <0x166> +<2><11f> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d1): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 45 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><12d> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf2): max_rfer +DW_AT_decl_file : 3 +DW_AT_decl_line : 46 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><13b> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ac): max_excl +DW_AT_decl_file : 3 +DW_AT_decl_line : 47 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><149> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c5): rsv_rfer +DW_AT_decl_file : 3 +DW_AT_decl_line : 48 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><157> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x114): rsv_excl +DW_AT_decl_file : 3 +DW_AT_decl_line : 49 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<1><166> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x28c): btrfs_qgroup_inherit +DW_AT_byte_size : 72 +DW_AT_decl_file : 3 +DW_AT_decl_line : 52 +DW_AT_sibling : <0x1c7> +<2><172> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d1): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 53 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><180> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d8): num_qgroups +DW_AT_decl_file : 3 +DW_AT_decl_line : 54 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><18e> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x12e): num_ref_copies +DW_AT_decl_file : 3 +DW_AT_decl_line : 55 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><19c> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe): num_excl_copies +DW_AT_decl_file : 3 +DW_AT_decl_line : 56 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1aa> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : lim +DW_AT_decl_file : 3 +DW_AT_decl_line : 57 +DW_AT_type : <0x113> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1b8> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x231): qgroups +DW_AT_decl_file : 3 +DW_AT_decl_line : 58 +DW_AT_type : <0x1c7> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<1><1c7> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x1d6> +<2><1d0> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +<1><1d6> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 72 +DW_AT_sibling : <0x1fb> +<2><1de> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x336): size +DW_AT_decl_file : 3 +DW_AT_decl_line : 73 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1ec> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b5): qgroup_inherit +DW_AT_decl_file : 3 +DW_AT_decl_line : 74 +DW_AT_type : <0x1fb> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><1fb> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x166> +<1><201> +Abbrev Number: 15 (DW_TAG_union_type) +DW_AT_byte_size : 32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 71 +DW_AT_sibling : <0x21a> +<2><209> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x1d6> +<2><20e> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x243): unused +DW_AT_decl_file : 3 +DW_AT_decl_line : 76 +DW_AT_type : <0x21a> +<1><21a> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x22a> +<2><223> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 3 +<1><22a> +Abbrev Number: 19 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x2ea): btrfs_ioctl_vol_args_v2 +DW_AT_byte_size : 4096 +DW_AT_decl_file : 3 +DW_AT_decl_line : 67 +DW_AT_sibling : <0x277> +<2><237> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : fd +DW_AT_decl_file : 3 +DW_AT_decl_line : 68 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><244> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x13d): transid +DW_AT_decl_file : 3 +DW_AT_decl_line : 69 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><252> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d1): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 70 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><260> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_type : <0x201> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><268> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2a1): name +DW_AT_decl_file : 3 +DW_AT_decl_line : 78 +DW_AT_type : <0x277> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<1><277> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x288> +<2><280> +Abbrev Number: 21 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 4039 +<1><288> +Abbrev Number: 22 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x1ea): btrfs_dev_stat_values +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 369 +DW_AT_sibling : <0x2ba> +<2><295> +Abbrev Number: 23 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x51): BTRFS_DEV_STAT_WRITE_ERRS +DW_AT_const_value : 0 +<2><29b> +Abbrev Number: 23 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x273): BTRFS_DEV_STAT_READ_ERRS +DW_AT_const_value : 1 +<2><2a1> +Abbrev Number: 23 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x259): BTRFS_DEV_STAT_FLUSH_ERRS +DW_AT_const_value : 2 +<2><2a7> +Abbrev Number: 23 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x18d): BTRFS_DEV_STAT_CORRUPTION_ERRS +DW_AT_const_value : 3 +<2><2ad> +Abbrev Number: 23 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x2a6): BTRFS_DEV_STAT_GENERATION_ERRS +DW_AT_const_value : 4 +<2><2b3> +Abbrev Number: 23 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1e): BTRFS_DEV_STAT_VALUES_MAX +DW_AT_const_value : 5 +<1><2ba> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x30b): struct_btrfs_ioctl_vol_args_v2 +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_type : <0x22a> +<1><2c5> +Abbrev Number: 24 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x11d): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2d3> +Abbrev Number: 24 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x10d): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2e1> +Abbrev Number: 24 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x239): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2ef> +Abbrev Number: 25 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xb2): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x2ba> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_btrfs_ioctl_vol_args_v2.h b/mpers-m32/struct_btrfs_ioctl_vol_args_v2.h new file mode 100644 index 000000000..2e2a26026 --- /dev/null +++ b/mpers-m32/struct_btrfs_ioctl_vol_args_v2.h @@ -0,0 +1,17 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t fd; +uint64_t transid; +uint64_t flags; +union { +struct { +uint64_t size; +mpers_ptr_t qgroup_inherit; +} ATTRIBUTE_PACKED ; +uint64_t unused[4]; +} ; +char name[4040]; +} ATTRIBUTE_PACKED m32_struct_btrfs_ioctl_vol_args_v2; +#define MPERS_m32_struct_btrfs_ioctl_vol_args_v2 m32_struct_btrfs_ioctl_vol_args_v2 diff --git a/mpers-m32/struct_ff_effect.c b/mpers-m32/struct_ff_effect.c new file mode 100644 index 000000000..6daa03283 --- /dev/null +++ b/mpers-m32/struct_ff_effect.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2015 Etienne Gemsa + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_INPUT_H + + +# include +# include + +typedef struct ff_effect struct_ff_effect; + +#endif /* HAVE_LINUX_INPUT_H */ + +struct_ff_effect mpers_target_var; diff --git a/mpers-m32/struct_ff_effect.d1 b/mpers-m32/struct_ff_effect.d1 new file mode 100644 index 000000000..bab888e07 --- /dev/null +++ b/mpers-m32/struct_ff_effect.d1 @@ -0,0 +1,489 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x446 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xb): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xd5): mpers-m32/struct_ff_effect.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x35f): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1ee): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x7b): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x140): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x1da): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x256): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x335): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x20b): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x166): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x2b0): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x85): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x27f): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x318): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x1e8): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x238): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x5f): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xc6): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x2da): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x2a4): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x2c2): __s16 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 22 + <104> DW_AT_type : <0x24> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x2aa): __u16 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 23 + <10f> DW_AT_type : <0x40> + <1><113>: Abbrev Number: 11 (DW_TAG_typedef) + <114> DW_AT_name : (indirect string, offset: 0x11d): __u32 + <118> DW_AT_decl_file : 2 + <119> DW_AT_decl_line : 26 + <11a> DW_AT_type : <0x47> + <1><11e>: Abbrev Number: 12 (DW_TAG_structure_type) + <11f> DW_AT_name : (indirect string, offset: 0x32b): ff_replay + <123> DW_AT_byte_size : 4 + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 974 + <127> DW_AT_sibling : <0x14a> + <2><12b>: Abbrev Number: 13 (DW_TAG_member) + <12c> DW_AT_name : (indirect string, offset: 0x1c8): length + <130> DW_AT_decl_file : 3 + <131> DW_AT_decl_line : 975 + <133> DW_AT_type : <0x108> + <137> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><13a>: Abbrev Number: 13 (DW_TAG_member) + <13b> DW_AT_name : (indirect string, offset: 0xcf): delay + <13f> DW_AT_decl_file : 3 + <140> DW_AT_decl_line : 976 + <142> DW_AT_type : <0x108> + <146> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><149>: Abbrev Number: 0 + <1><14a>: Abbrev Number: 12 (DW_TAG_structure_type) + <14b> DW_AT_name : (indirect string, offset: 0xf2): ff_trigger + <14f> DW_AT_byte_size : 4 + <150> DW_AT_decl_file : 3 + <151> DW_AT_decl_line : 984 + <153> DW_AT_sibling : <0x176> + <2><157>: Abbrev Number: 13 (DW_TAG_member) + <158> DW_AT_name : (indirect string, offset: 0x193): button + <15c> DW_AT_decl_file : 3 + <15d> DW_AT_decl_line : 985 + <15f> DW_AT_type : <0x108> + <163> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><166>: Abbrev Number: 13 (DW_TAG_member) + <167> DW_AT_name : (indirect string, offset: 0x2d1): interval + <16b> DW_AT_decl_file : 3 + <16c> DW_AT_decl_line : 986 + <16e> DW_AT_type : <0x108> + <172> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><175>: Abbrev Number: 0 + <1><176>: Abbrev Number: 12 (DW_TAG_structure_type) + <177> DW_AT_name : (indirect string, offset: 0x273): ff_envelope + <17b> DW_AT_byte_size : 8 + <17c> DW_AT_decl_file : 3 + <17d> DW_AT_decl_line : 1001 + <17f> DW_AT_sibling : <0x1c0> + <2><183>: Abbrev Number: 13 (DW_TAG_member) + <184> DW_AT_name : (indirect string, offset: 0x123): attack_length + <188> DW_AT_decl_file : 3 + <189> DW_AT_decl_line : 1002 + <18b> DW_AT_type : <0x108> + <18f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><192>: Abbrev Number: 13 (DW_TAG_member) + <193> DW_AT_name : (indirect string, offset: 0xfd): attack_level + <197> DW_AT_decl_file : 3 + <198> DW_AT_decl_line : 1003 + <19a> DW_AT_type : <0x108> + <19e> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><1a1>: Abbrev Number: 13 (DW_TAG_member) + <1a2> DW_AT_name : (indirect string, offset: 0x111): fade_length + <1a6> DW_AT_decl_file : 3 + <1a7> DW_AT_decl_line : 1004 + <1a9> DW_AT_type : <0x108> + <1ad> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1b0>: Abbrev Number: 13 (DW_TAG_member) + <1b1> DW_AT_name : (indirect string, offset: 0x1cf): fade_level + <1b5> DW_AT_decl_file : 3 + <1b6> DW_AT_decl_line : 1005 + <1b8> DW_AT_type : <0x108> + <1bc> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><1bf>: Abbrev Number: 0 + <1><1c0>: Abbrev Number: 12 (DW_TAG_structure_type) + <1c1> DW_AT_name : (indirect string, offset: 0x1a1): ff_constant_effect + <1c5> DW_AT_byte_size : 10 + <1c6> DW_AT_decl_file : 3 + <1c7> DW_AT_decl_line : 1013 + <1c9> DW_AT_sibling : <0x1ec> + <2><1cd>: Abbrev Number: 13 (DW_TAG_member) + <1ce> DW_AT_name : (indirect string, offset: 0x2e8): level + <1d2> DW_AT_decl_file : 3 + <1d3> DW_AT_decl_line : 1014 + <1d5> DW_AT_type : <0xfd> + <1d9> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1dc>: Abbrev Number: 13 (DW_TAG_member) + <1dd> DW_AT_name : (indirect string, offset: 0x30f): envelope + <1e1> DW_AT_decl_file : 3 + <1e2> DW_AT_decl_line : 1015 + <1e4> DW_AT_type : <0x176> + <1e8> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><1eb>: Abbrev Number: 0 + <1><1ec>: Abbrev Number: 12 (DW_TAG_structure_type) + <1ed> DW_AT_name : (indirect string, offset: 0x131): ff_ramp_effect + <1f1> DW_AT_byte_size : 12 + <1f2> DW_AT_decl_file : 3 + <1f3> DW_AT_decl_line : 1024 + <1f5> DW_AT_sibling : <0x227> + <2><1f9>: Abbrev Number: 13 (DW_TAG_member) + <1fa> DW_AT_name : (indirect string, offset: 0x16f): start_level + <1fe> DW_AT_decl_file : 3 + <1ff> DW_AT_decl_line : 1025 + <201> DW_AT_type : <0xfd> + <205> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><208>: Abbrev Number: 13 (DW_TAG_member) + <209> DW_AT_name : (indirect string, offset: 0x1be): end_level + <20d> DW_AT_decl_file : 3 + <20e> DW_AT_decl_line : 1026 + <210> DW_AT_type : <0xfd> + <214> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><217>: Abbrev Number: 13 (DW_TAG_member) + <218> DW_AT_name : (indirect string, offset: 0x30f): envelope + <21c> DW_AT_decl_file : 3 + <21d> DW_AT_decl_line : 1027 + <21f> DW_AT_type : <0x176> + <223> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><226>: Abbrev Number: 0 + <1><227>: Abbrev Number: 12 (DW_TAG_structure_type) + <228> DW_AT_name : (indirect string, offset: 0x97): ff_condition_effect + <22c> DW_AT_byte_size : 12 + <22d> DW_AT_decl_file : 3 + <22e> DW_AT_decl_line : 1040 + <230> DW_AT_sibling : <0x28f> + <2><234>: Abbrev Number: 13 (DW_TAG_member) + <235> DW_AT_name : (indirect string, offset: 0x2ee): right_saturation + <239> DW_AT_decl_file : 3 + <23a> DW_AT_decl_line : 1041 + <23c> DW_AT_type : <0x108> + <240> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><243>: Abbrev Number: 13 (DW_TAG_member) + <244> DW_AT_name : (indirect string, offset: 0x2ff): left_saturation + <248> DW_AT_decl_file : 3 + <249> DW_AT_decl_line : 1042 + <24b> DW_AT_type : <0x108> + <24f> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><252>: Abbrev Number: 13 (DW_TAG_member) + <253> DW_AT_name : (indirect string, offset: 0x342): right_coeff + <257> DW_AT_decl_file : 3 + <258> DW_AT_decl_line : 1044 + <25a> DW_AT_type : <0xfd> + <25e> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><261>: Abbrev Number: 13 (DW_TAG_member) + <262> DW_AT_name : (indirect string, offset: 0x0): left_coeff + <266> DW_AT_decl_file : 3 + <267> DW_AT_decl_line : 1045 + <269> DW_AT_type : <0xfd> + <26d> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><270>: Abbrev Number: 13 (DW_TAG_member) + <271> DW_AT_name : (indirect string, offset: 0x390): deadband + <275> DW_AT_decl_file : 3 + <276> DW_AT_decl_line : 1047 + <278> DW_AT_type : <0x108> + <27c> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><27f>: Abbrev Number: 13 (DW_TAG_member) + <280> DW_AT_name : (indirect string, offset: 0x58): center + <284> DW_AT_decl_file : 3 + <285> DW_AT_decl_line : 1048 + <287> DW_AT_type : <0xfd> + <28b> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><28e>: Abbrev Number: 0 + <1><28f>: Abbrev Number: 12 (DW_TAG_structure_type) + <290> DW_AT_name : (indirect string, offset: 0x68): ff_periodic_effect + <294> DW_AT_byte_size : 28 + <295> DW_AT_decl_file : 3 + <296> DW_AT_decl_line : 1069 + <298> DW_AT_sibling : <0x315> + <2><29c>: Abbrev Number: 13 (DW_TAG_member) + <29d> DW_AT_name : (indirect string, offset: 0x2c8): waveform + <2a1> DW_AT_decl_file : 3 + <2a2> DW_AT_decl_line : 1070 + <2a4> DW_AT_type : <0x108> + <2a8> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><2ab>: Abbrev Number: 13 (DW_TAG_member) + <2ac> DW_AT_name : (indirect string, offset: 0x19a): period + <2b0> DW_AT_decl_file : 3 + <2b1> DW_AT_decl_line : 1071 + <2b3> DW_AT_type : <0x108> + <2b7> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><2ba>: Abbrev Number: 13 (DW_TAG_member) + <2bb> DW_AT_name : (indirect string, offset: 0x1b4): magnitude + <2bf> DW_AT_decl_file : 3 + <2c0> DW_AT_decl_line : 1072 + <2c2> DW_AT_type : <0xfd> + <2c6> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><2c9>: Abbrev Number: 13 (DW_TAG_member) + <2ca> DW_AT_name : (indirect string, offset: 0x18c): offset + <2ce> DW_AT_decl_file : 3 + <2cf> DW_AT_decl_line : 1073 + <2d1> DW_AT_type : <0xfd> + <2d5> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><2d8>: Abbrev Number: 13 (DW_TAG_member) + <2d9> DW_AT_name : (indirect string, offset: 0xb6): phase + <2dd> DW_AT_decl_file : 3 + <2de> DW_AT_decl_line : 1074 + <2e0> DW_AT_type : <0x108> + <2e4> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><2e7>: Abbrev Number: 13 (DW_TAG_member) + <2e8> DW_AT_name : (indirect string, offset: 0x30f): envelope + <2ec> DW_AT_decl_file : 3 + <2ed> DW_AT_decl_line : 1076 + <2ef> DW_AT_type : <0x176> + <2f3> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><2f6>: Abbrev Number: 13 (DW_TAG_member) + <2f7> DW_AT_name : (indirect string, offset: 0xab): custom_len + <2fb> DW_AT_decl_file : 3 + <2fc> DW_AT_decl_line : 1078 + <2fe> DW_AT_type : <0x113> + <302> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><305>: Abbrev Number: 13 (DW_TAG_member) + <306> DW_AT_name : (indirect string, offset: 0x31f): custom_data + <30a> DW_AT_decl_file : 3 + <30b> DW_AT_decl_line : 1079 + <30d> DW_AT_type : <0x315> + <311> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><314>: Abbrev Number: 0 + <1><315>: Abbrev Number: 4 (DW_TAG_pointer_type) + <316> DW_AT_byte_size : 4 + <317> DW_AT_type : <0xfd> + <1><31b>: Abbrev Number: 12 (DW_TAG_structure_type) + <31c> DW_AT_name : (indirect string, offset: 0x227): ff_rumble_effect + <320> DW_AT_byte_size : 4 + <321> DW_AT_decl_file : 3 + <322> DW_AT_decl_line : 1090 + <324> DW_AT_sibling : <0x347> + <2><328>: Abbrev Number: 13 (DW_TAG_member) + <329> DW_AT_name : (indirect string, offset: 0x14e): strong_magnitude + <32d> DW_AT_decl_file : 3 + <32e> DW_AT_decl_line : 1091 + <330> DW_AT_type : <0x108> + <334> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><337>: Abbrev Number: 13 (DW_TAG_member) + <338> DW_AT_name : (indirect string, offset: 0x28d): weak_magnitude + <33c> DW_AT_decl_file : 3 + <33d> DW_AT_decl_line : 1092 + <33f> DW_AT_type : <0x108> + <343> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><346>: Abbrev Number: 0 + <1><347>: Abbrev Number: 14 (DW_TAG_union_type) + <348> DW_AT_byte_size : 28 + <349> DW_AT_decl_file : 3 + <34a> DW_AT_decl_line : 1125 + <34c> DW_AT_sibling : <0x38d> + <2><350>: Abbrev Number: 15 (DW_TAG_member) + <351> DW_AT_name : (indirect string, offset: 0x284): constant + <355> DW_AT_decl_file : 3 + <356> DW_AT_decl_line : 1126 + <358> DW_AT_type : <0x1c0> + <2><35c>: Abbrev Number: 15 (DW_TAG_member) + <35d> DW_AT_name : (indirect string, offset: 0x53): ramp + <361> DW_AT_decl_file : 3 + <362> DW_AT_decl_line : 1127 + <364> DW_AT_type : <0x1ec> + <2><368>: Abbrev Number: 15 (DW_TAG_member) + <369> DW_AT_name : (indirect string, offset: 0x8e): periodic + <36d> DW_AT_decl_file : 3 + <36e> DW_AT_decl_line : 1128 + <370> DW_AT_type : <0x28f> + <2><374>: Abbrev Number: 15 (DW_TAG_member) + <375> DW_AT_name : (indirect string, offset: 0x269): condition + <379> DW_AT_decl_file : 3 + <37a> DW_AT_decl_line : 1129 + <37c> DW_AT_type : <0x38d> + <2><380>: Abbrev Number: 15 (DW_TAG_member) + <381> DW_AT_name : (indirect string, offset: 0x10a): rumble + <385> DW_AT_decl_file : 3 + <386> DW_AT_decl_line : 1130 + <388> DW_AT_type : <0x31b> + <2><38c>: Abbrev Number: 0 + <1><38d>: Abbrev Number: 16 (DW_TAG_array_type) + <38e> DW_AT_type : <0x227> + <392> DW_AT_sibling : <0x39d> + <2><396>: Abbrev Number: 17 (DW_TAG_subrange_type) + <397> DW_AT_type : <0x63> + <39b> DW_AT_upper_bound : 1 + <2><39c>: Abbrev Number: 0 + <1><39d>: Abbrev Number: 12 (DW_TAG_structure_type) + <39e> DW_AT_name : (indirect string, offset: 0x242): ff_effect + <3a2> DW_AT_byte_size : 44 + <3a3> DW_AT_decl_file : 3 + <3a4> DW_AT_decl_line : 1118 + <3a6> DW_AT_sibling : <0x402> + <2><3aa>: Abbrev Number: 13 (DW_TAG_member) + <3ab> DW_AT_name : (indirect string, offset: 0x222): type + <3af> DW_AT_decl_file : 3 + <3b0> DW_AT_decl_line : 1119 + <3b2> DW_AT_type : <0x108> + <3b6> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><3b9>: Abbrev Number: 18 (DW_TAG_member) + <3ba> DW_AT_name : id + <3bd> DW_AT_decl_file : 3 + <3be> DW_AT_decl_line : 1120 + <3c0> DW_AT_type : <0xfd> + <3c4> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><3c7>: Abbrev Number: 13 (DW_TAG_member) + <3c8> DW_AT_name : (indirect string, offset: 0xbc): direction + <3cc> DW_AT_decl_file : 3 + <3cd> DW_AT_decl_line : 1121 + <3cf> DW_AT_type : <0x108> + <3d3> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><3d6>: Abbrev Number: 13 (DW_TAG_member) + <3d7> DW_AT_name : (indirect string, offset: 0x29c): trigger + <3db> DW_AT_decl_file : 3 + <3dc> DW_AT_decl_line : 1122 + <3de> DW_AT_type : <0x14a> + <3e2> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><3e5>: Abbrev Number: 13 (DW_TAG_member) + <3e6> DW_AT_name : (indirect string, offset: 0x15f): replay + <3ea> DW_AT_decl_file : 3 + <3eb> DW_AT_decl_line : 1123 + <3ed> DW_AT_type : <0x11e> + <3f1> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><3f4>: Abbrev Number: 18 (DW_TAG_member) + <3f5> DW_AT_name : u + <3f7> DW_AT_decl_file : 3 + <3f8> DW_AT_decl_line : 1131 + <3fa> DW_AT_type : <0x347> + <3fe> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><401>: Abbrev Number: 0 + <1><402>: Abbrev Number: 11 (DW_TAG_typedef) + <403> DW_AT_name : (indirect string, offset: 0x34e): struct_ff_effect + <407> DW_AT_decl_file : 4 + <408> DW_AT_decl_line : 37 + <409> DW_AT_type : <0x39d> + <1><40d>: Abbrev Number: 19 (DW_TAG_variable) + <40e> DW_AT_name : (indirect string, offset: 0x1fa): current_wordsize + <412> DW_AT_decl_file : 5 + <413> DW_AT_decl_line : 757 + <415> DW_AT_type : <0x47> + <419> DW_AT_external : 1 + <41a> DW_AT_declaration : 1 + <1><41b>: Abbrev Number: 19 (DW_TAG_variable) + <41c> DW_AT_name : (indirect string, offset: 0x318): sysent + <420> DW_AT_decl_file : 5 + <421> DW_AT_decl_line : 892 + <423> DW_AT_type : <0xeb> + <427> DW_AT_external : 1 + <428> DW_AT_declaration : 1 + <1><429>: Abbrev Number: 19 (DW_TAG_variable) + <42a> DW_AT_name : (indirect string, offset: 0x24c): nsyscalls + <42e> DW_AT_decl_file : 5 + <42f> DW_AT_decl_line : 903 + <431> DW_AT_type : <0x47> + <435> DW_AT_external : 1 + <436> DW_AT_declaration : 1 + <1><437>: Abbrev Number: 20 (DW_TAG_variable) + <438> DW_AT_name : (indirect string, offset: 0x17b): mpers_target_var + <43c> DW_AT_decl_file : 4 + <43d> DW_AT_decl_line : 41 + <43e> DW_AT_type : <0x402> + <442> DW_AT_external : 1 + <443> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><449>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_ff_effect.d2 b/mpers-m32/struct_ff_effect.d2 new file mode 100644 index 000000000..e9889484b --- /dev/null +++ b/mpers-m32/struct_ff_effect.d2 @@ -0,0 +1,549 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1ee): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x7b): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x140): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x1da): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x256): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x335): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x20b): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x166): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2b0): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x85): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x27f): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x318): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e8): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x238): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5f): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc6): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2da): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x2a4): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2c2): __s16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 22 +DW_AT_type : <0x24> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2aa): __u16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 23 +DW_AT_type : <0x40> +<1><113> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11d): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><11e> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x32b): ff_replay +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 974 +DW_AT_sibling : <0x14a> +<2><12b> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c8): length +DW_AT_decl_file : 3 +DW_AT_decl_line : 975 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><13a> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xcf): delay +DW_AT_decl_file : 3 +DW_AT_decl_line : 976 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<1><14a> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xf2): ff_trigger +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 984 +DW_AT_sibling : <0x176> +<2><157> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x193): button +DW_AT_decl_file : 3 +DW_AT_decl_line : 985 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><166> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d1): interval +DW_AT_decl_file : 3 +DW_AT_decl_line : 986 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<1><176> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x273): ff_envelope +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1001 +DW_AT_sibling : <0x1c0> +<2><183> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x123): attack_length +DW_AT_decl_file : 3 +DW_AT_decl_line : 1002 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><192> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xfd): attack_level +DW_AT_decl_file : 3 +DW_AT_decl_line : 1003 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><1a1> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x111): fade_length +DW_AT_decl_file : 3 +DW_AT_decl_line : 1004 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1b0> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1cf): fade_level +DW_AT_decl_file : 3 +DW_AT_decl_line : 1005 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<1><1c0> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1a1): ff_constant_effect +DW_AT_byte_size : 10 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1013 +DW_AT_sibling : <0x1ec> +<2><1cd> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2e8): level +DW_AT_decl_file : 3 +DW_AT_decl_line : 1014 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1dc> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x30f): envelope +DW_AT_decl_file : 3 +DW_AT_decl_line : 1015 +DW_AT_type : <0x176> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<1><1ec> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x131): ff_ramp_effect +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1024 +DW_AT_sibling : <0x227> +<2><1f9> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16f): start_level +DW_AT_decl_file : 3 +DW_AT_decl_line : 1025 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><208> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1be): end_level +DW_AT_decl_file : 3 +DW_AT_decl_line : 1026 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><217> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x30f): envelope +DW_AT_decl_file : 3 +DW_AT_decl_line : 1027 +DW_AT_type : <0x176> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><227> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x97): ff_condition_effect +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1040 +DW_AT_sibling : <0x28f> +<2><234> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2ee): right_saturation +DW_AT_decl_file : 3 +DW_AT_decl_line : 1041 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><243> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2ff): left_saturation +DW_AT_decl_file : 3 +DW_AT_decl_line : 1042 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><252> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x342): right_coeff +DW_AT_decl_file : 3 +DW_AT_decl_line : 1044 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><261> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): left_coeff +DW_AT_decl_file : 3 +DW_AT_decl_line : 1045 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<2><270> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x390): deadband +DW_AT_decl_file : 3 +DW_AT_decl_line : 1047 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><27f> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x58): center +DW_AT_decl_file : 3 +DW_AT_decl_line : 1048 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<1><28f> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x68): ff_periodic_effect +DW_AT_byte_size : 28 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1069 +DW_AT_sibling : <0x315> +<2><29c> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c8): waveform +DW_AT_decl_file : 3 +DW_AT_decl_line : 1070 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><2ab> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x19a): period +DW_AT_decl_file : 3 +DW_AT_decl_line : 1071 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><2ba> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b4): magnitude +DW_AT_decl_file : 3 +DW_AT_decl_line : 1072 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><2c9> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18c): offset +DW_AT_decl_file : 3 +DW_AT_decl_line : 1073 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<2><2d8> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb6): phase +DW_AT_decl_file : 3 +DW_AT_decl_line : 1074 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><2e7> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x30f): envelope +DW_AT_decl_file : 3 +DW_AT_decl_line : 1076 +DW_AT_type : <0x176> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><2f6> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xab): custom_len +DW_AT_decl_file : 3 +DW_AT_decl_line : 1078 +DW_AT_type : <0x113> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><305> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x31f): custom_data +DW_AT_decl_file : 3 +DW_AT_decl_line : 1079 +DW_AT_type : <0x315> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<1><315> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xfd> +<1><31b> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x227): ff_rumble_effect +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1090 +DW_AT_sibling : <0x347> +<2><328> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14e): strong_magnitude +DW_AT_decl_file : 3 +DW_AT_decl_line : 1091 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><337> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x28d): weak_magnitude +DW_AT_decl_file : 3 +DW_AT_decl_line : 1092 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<1><347> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 28 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1125 +DW_AT_sibling : <0x38d> +<2><350> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x284): constant +DW_AT_decl_file : 3 +DW_AT_decl_line : 1126 +DW_AT_type : <0x1c0> +<2><35c> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x53): ramp +DW_AT_decl_file : 3 +DW_AT_decl_line : 1127 +DW_AT_type : <0x1ec> +<2><368> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8e): periodic +DW_AT_decl_file : 3 +DW_AT_decl_line : 1128 +DW_AT_type : <0x28f> +<2><374> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x269): condition +DW_AT_decl_file : 3 +DW_AT_decl_line : 1129 +DW_AT_type : <0x38d> +<2><380> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10a): rumble +DW_AT_decl_file : 3 +DW_AT_decl_line : 1130 +DW_AT_type : <0x31b> +<1><38d> +Abbrev Number: 16 (DW_TAG_array_type) +DW_AT_type : <0x227> +DW_AT_sibling : <0x39d> +<2><396> +Abbrev Number: 17 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><39d> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x242): ff_effect +DW_AT_byte_size : 44 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1118 +DW_AT_sibling : <0x402> +<2><3aa> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x222): type +DW_AT_decl_file : 3 +DW_AT_decl_line : 1119 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><3b9> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : id +DW_AT_decl_file : 3 +DW_AT_decl_line : 1120 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><3c7> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbc): direction +DW_AT_decl_file : 3 +DW_AT_decl_line : 1121 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><3d6> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x29c): trigger +DW_AT_decl_file : 3 +DW_AT_decl_line : 1122 +DW_AT_type : <0x14a> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<2><3e5> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15f): replay +DW_AT_decl_file : 3 +DW_AT_decl_line : 1123 +DW_AT_type : <0x11e> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><3f4> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : u +DW_AT_decl_file : 3 +DW_AT_decl_line : 1131 +DW_AT_type : <0x347> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><402> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x34e): struct_ff_effect +DW_AT_decl_file : 4 +DW_AT_decl_line : 37 +DW_AT_type : <0x39d> +<1><40d> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1fa): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><41b> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x318): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><429> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x24c): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><437> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x17b): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 41 +DW_AT_type : <0x402> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_ff_effect.h b/mpers-m32/struct_ff_effect.h new file mode 100644 index 000000000..4574af159 --- /dev/null +++ b/mpers-m32/struct_ff_effect.h @@ -0,0 +1,67 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint16_t type; +int16_t id; +uint16_t direction; +struct { +uint16_t button; +uint16_t interval; +} ATTRIBUTE_PACKED trigger; +struct { +uint16_t length; +uint16_t delay; +} ATTRIBUTE_PACKED replay; +unsigned char mpers_filler_1[2]; +union { +struct { +int16_t level; +struct { +uint16_t attack_length; +uint16_t attack_level; +uint16_t fade_length; +uint16_t fade_level; +} ATTRIBUTE_PACKED envelope; +} ATTRIBUTE_PACKED constant; +struct { +int16_t start_level; +int16_t end_level; +struct { +uint16_t attack_length; +uint16_t attack_level; +uint16_t fade_length; +uint16_t fade_level; +} ATTRIBUTE_PACKED envelope; +} ATTRIBUTE_PACKED ramp; +struct { +uint16_t waveform; +uint16_t period; +int16_t magnitude; +int16_t offset; +uint16_t phase; +struct { +uint16_t attack_length; +uint16_t attack_level; +uint16_t fade_length; +uint16_t fade_level; +} ATTRIBUTE_PACKED envelope; +unsigned char mpers_filler_2[2]; +uint32_t custom_len; +mpers_ptr_t custom_data; +} ATTRIBUTE_PACKED periodic; +struct { +uint16_t right_saturation; +uint16_t left_saturation; +int16_t right_coeff; +int16_t left_coeff; +uint16_t deadband; +int16_t center; +} ATTRIBUTE_PACKED condition[2]; +struct { +uint16_t strong_magnitude; +uint16_t weak_magnitude; +} ATTRIBUTE_PACKED rumble; +} u; +} ATTRIBUTE_PACKED m32_struct_ff_effect; +#define MPERS_m32_struct_ff_effect m32_struct_ff_effect diff --git a/mpers-m32/struct_flock.c b/mpers-m32/struct_flock.c new file mode 100644 index 000000000..4859b6e82 --- /dev/null +++ b/mpers-m32/struct_flock.c @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "flock.h" +typedef struct_kernel_flock struct_flock; +typedef struct_kernel_flock64 struct_flock64; + +struct_flock mpers_target_var; diff --git a/mpers-m32/struct_flock.d1 b/mpers-m32/struct_flock.d1 new file mode 100644 index 000000000..28c220a7b --- /dev/null +++ b/mpers-m32/struct_flock.d1 @@ -0,0 +1,217 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1c0 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xfb): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x9e): mpers-m32/struct_flock.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x163): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1eb): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1c2): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1a7): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xb7): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x3a): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x143): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x87): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1cc): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xc5): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x19e): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x15e): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_typedef) + <7d> DW_AT_name : (indirect string, offset: 0x4d): __kernel_long_t + <81> DW_AT_decl_file : 1 + <82> DW_AT_decl_line : 14 + <83> DW_AT_type : <0x55> + <1><87>: Abbrev Number: 6 (DW_TAG_typedef) + <88> DW_AT_name : (indirect string, offset: 0x17): __kernel_pid_t + <8c> DW_AT_decl_file : 1 + <8d> DW_AT_decl_line : 27 + <8e> DW_AT_type : <0x2b> + <1><92>: Abbrev Number: 6 (DW_TAG_typedef) + <93> DW_AT_name : (indirect string, offset: 0x1dc): __kernel_off_t + <97> DW_AT_decl_file : 1 + <98> DW_AT_decl_line : 86 + <99> DW_AT_type : <0x7c> + <1><9d>: Abbrev Number: 7 (DW_TAG_structure_type) + <9e> DW_AT_name : (indirect string, offset: 0xd7): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 2 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xf5): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x7d): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1f7): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0xfb> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x5d): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xfb> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf0> + <1><101>: Abbrev Number: 6 (DW_TAG_typedef) + <102> DW_AT_name : (indirect string, offset: 0x150): struct_sysent + <106> DW_AT_decl_file : 2 + <107> DW_AT_decl_line : 10 + <108> DW_AT_type : <0x9d> + <1><10c>: Abbrev Number: 4 (DW_TAG_pointer_type) + <10d> DW_AT_byte_size : 4 + <10e> DW_AT_type : <0x112> + <1><112>: Abbrev Number: 5 (DW_TAG_const_type) + <113> DW_AT_type : <0x101> + <1><117>: Abbrev Number: 2 (DW_TAG_base_type) + <118> DW_AT_byte_size : 1 + <119> DW_AT_encoding : 2 (boolean) + <11a> DW_AT_name : (indirect string, offset: 0x11): _Bool + <1><11e>: Abbrev Number: 7 (DW_TAG_structure_type) + <11f> DW_AT_name : (indirect string, offset: 0x66): flock + <123> DW_AT_byte_size : 16 + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 179 + <126> DW_AT_sibling : <0x171> + <2><12a>: Abbrev Number: 8 (DW_TAG_member) + <12b> DW_AT_name : (indirect string, offset: 0x1d5): l_type + <12f> DW_AT_decl_file : 3 + <130> DW_AT_decl_line : 180 + <131> DW_AT_type : <0x24> + <135> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><138>: Abbrev Number: 8 (DW_TAG_member) + <139> DW_AT_name : (indirect string, offset: 0x0): l_whence + <13d> DW_AT_decl_file : 3 + <13e> DW_AT_decl_line : 181 + <13f> DW_AT_type : <0x24> + <143> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><146>: Abbrev Number: 8 (DW_TAG_member) + <147> DW_AT_name : (indirect string, offset: 0x9): l_start + <14b> DW_AT_decl_file : 3 + <14c> DW_AT_decl_line : 182 + <14d> DW_AT_type : <0x92> + <151> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><154>: Abbrev Number: 8 (DW_TAG_member) + <155> DW_AT_name : (indirect string, offset: 0x200): l_len + <159> DW_AT_decl_file : 3 + <15a> DW_AT_decl_line : 183 + <15b> DW_AT_type : <0x92> + <15f> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><162>: Abbrev Number: 8 (DW_TAG_member) + <163> DW_AT_name : (indirect string, offset: 0xde): l_pid + <167> DW_AT_decl_file : 3 + <168> DW_AT_decl_line : 184 + <169> DW_AT_type : <0x87> + <16d> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><170>: Abbrev Number: 0 + <1><171>: Abbrev Number: 6 (DW_TAG_typedef) + <172> DW_AT_name : (indirect string, offset: 0x26): struct_kernel_flock + <176> DW_AT_decl_file : 4 + <177> DW_AT_decl_line : 34 + <178> DW_AT_type : <0x11e> + <1><17c>: Abbrev Number: 6 (DW_TAG_typedef) + <17d> DW_AT_name : (indirect string, offset: 0x1b5): struct_flock + <181> DW_AT_decl_file : 5 + <182> DW_AT_decl_line : 32 + <183> DW_AT_type : <0x171> + <1><187>: Abbrev Number: 12 (DW_TAG_variable) + <188> DW_AT_name : (indirect string, offset: 0xe4): current_wordsize + <18c> DW_AT_decl_file : 6 + <18d> DW_AT_decl_line : 757 + <18f> DW_AT_type : <0x47> + <193> DW_AT_external : 1 + <194> DW_AT_declaration : 1 + <1><195>: Abbrev Number: 12 (DW_TAG_variable) + <196> DW_AT_name : (indirect string, offset: 0xd7): sysent + <19a> DW_AT_decl_file : 6 + <19b> DW_AT_decl_line : 892 + <19d> DW_AT_type : <0x10c> + <1a1> DW_AT_external : 1 + <1a2> DW_AT_declaration : 1 + <1><1a3>: Abbrev Number: 12 (DW_TAG_variable) + <1a4> DW_AT_name : (indirect string, offset: 0x194): nsyscalls + <1a8> DW_AT_decl_file : 6 + <1a9> DW_AT_decl_line : 903 + <1ab> DW_AT_type : <0x47> + <1af> DW_AT_external : 1 + <1b0> DW_AT_declaration : 1 + <1><1b1>: Abbrev Number: 13 (DW_TAG_variable) + <1b2> DW_AT_name : (indirect string, offset: 0x6c): mpers_target_var + <1b6> DW_AT_decl_file : 5 + <1b7> DW_AT_decl_line : 35 + <1b8> DW_AT_type : <0x17c> + <1bc> DW_AT_external : 1 + <1bd> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><1c3>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_flock.d2 b/mpers-m32/struct_flock.d2 new file mode 100644 index 000000000..c08b053e8 --- /dev/null +++ b/mpers-m32/struct_flock.d2 @@ -0,0 +1,241 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1eb): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1c2): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a7): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xb7): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x3a): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x143): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x87): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1cc): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xc5): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x19e): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x15e): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x4d): __kernel_long_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 14 +DW_AT_type : <0x55> +<1><87> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x17): __kernel_pid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 27 +DW_AT_type : <0x2b> +<1><92> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1dc): __kernel_off_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 86 +DW_AT_type : <0x7c> +<1><9d> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xd7): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf5): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7d): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f7): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0xfb> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5d): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xfb> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf0> +<1><101> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x150): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0x9d> +<1><10c> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x112> +<1><112> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x101> +<1><117> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x11): _Bool +<1><11e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x66): flock +DW_AT_byte_size : 16 +DW_AT_decl_file : 3 +DW_AT_decl_line : 179 +DW_AT_sibling : <0x171> +<2><12a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d5): l_type +DW_AT_decl_file : 3 +DW_AT_decl_line : 180 +DW_AT_type : <0x24> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><138> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): l_whence +DW_AT_decl_file : 3 +DW_AT_decl_line : 181 +DW_AT_type : <0x24> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><146> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9): l_start +DW_AT_decl_file : 3 +DW_AT_decl_line : 182 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><154> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x200): l_len +DW_AT_decl_file : 3 +DW_AT_decl_line : 183 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><162> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xde): l_pid +DW_AT_decl_file : 3 +DW_AT_decl_line : 184 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><171> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x26): struct_kernel_flock +DW_AT_decl_file : 4 +DW_AT_decl_line : 34 +DW_AT_type : <0x11e> +<1><17c> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b5): struct_flock +DW_AT_decl_file : 5 +DW_AT_decl_line : 32 +DW_AT_type : <0x171> +<1><187> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe4): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><195> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd7): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x10c> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1a3> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x194): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1b1> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x6c): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 35 +DW_AT_type : <0x17c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/struct_flock.h b/mpers-m32/struct_flock.h new file mode 100644 index 000000000..0acc9c197 --- /dev/null +++ b/mpers-m32/struct_flock.h @@ -0,0 +1,11 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int16_t l_type; +int16_t l_whence; +int32_t l_start; +int32_t l_len; +int32_t l_pid; +} ATTRIBUTE_PACKED m32_struct_flock; +#define MPERS_m32_struct_flock m32_struct_flock diff --git a/mpers-m32/struct_flock64.c b/mpers-m32/struct_flock64.c new file mode 100644 index 000000000..75f618903 --- /dev/null +++ b/mpers-m32/struct_flock64.c @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "flock.h" +typedef struct_kernel_flock struct_flock; +typedef struct_kernel_flock64 struct_flock64; + +struct_flock64 mpers_target_var; diff --git a/mpers-m32/struct_flock64.d1 b/mpers-m32/struct_flock64.d1 new file mode 100644 index 000000000..3eb88fc27 --- /dev/null +++ b/mpers-m32/struct_flock64.d1 @@ -0,0 +1,212 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1b5 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xfa): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x11): mpers-m32/struct_flock64.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x162): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1e4): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1ca): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1a6): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xae): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x41): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x142): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x97): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1d4): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xbc): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x19d): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x15d): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_typedef) + <7d> DW_AT_name : (indirect string, offset: 0x32): __kernel_pid_t + <81> DW_AT_decl_file : 1 + <82> DW_AT_decl_line : 27 + <83> DW_AT_type : <0x2b> + <1><87>: Abbrev Number: 6 (DW_TAG_typedef) + <88> DW_AT_name : (indirect string, offset: 0x54): __kernel_loff_t + <8c> DW_AT_decl_file : 1 + <8d> DW_AT_decl_line : 87 + <8e> DW_AT_type : <0x32> + <1><92>: Abbrev Number: 7 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0xce): sysent + <97> DW_AT_byte_size : 20 + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 4 + <9a> DW_AT_sibling : <0xe5> + <2><9e>: Abbrev Number: 8 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0xf4): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x8d): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1f0): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0xf0> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x73): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 +
DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xe5> + <1>: Abbrev Number: 6 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x14f): struct_sysent + DW_AT_decl_file : 2 + DW_AT_decl_line : 10 + DW_AT_type : <0x92> + <1><101>: Abbrev Number: 4 (DW_TAG_pointer_type) + <102> DW_AT_byte_size : 4 + <103> DW_AT_type : <0x107> + <1><107>: Abbrev Number: 5 (DW_TAG_const_type) + <108> DW_AT_type : <0xf6> + <1><10c>: Abbrev Number: 2 (DW_TAG_base_type) + <10d> DW_AT_byte_size : 1 + <10e> DW_AT_encoding : 2 (boolean) + <10f> DW_AT_name : (indirect string, offset: 0x2c): _Bool + <1><113>: Abbrev Number: 7 (DW_TAG_structure_type) + <114> DW_AT_name : (indirect string, offset: 0xdb): flock64 + <118> DW_AT_byte_size : 24 + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 196 + <11b> DW_AT_sibling : <0x166> + <2><11f>: Abbrev Number: 8 (DW_TAG_member) + <120> DW_AT_name : (indirect string, offset: 0x1dd): l_type + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 197 + <126> DW_AT_type : <0x24> + <12a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><12d>: Abbrev Number: 8 (DW_TAG_member) + <12e> DW_AT_name : (indirect string, offset: 0x0): l_whence + <132> DW_AT_decl_file : 3 + <133> DW_AT_decl_line : 198 + <134> DW_AT_type : <0x24> + <138> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><13b>: Abbrev Number: 8 (DW_TAG_member) + <13c> DW_AT_name : (indirect string, offset: 0x9): l_start + <140> DW_AT_decl_file : 3 + <141> DW_AT_decl_line : 199 + <142> DW_AT_type : <0x87> + <146> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><149>: Abbrev Number: 8 (DW_TAG_member) + <14a> DW_AT_name : (indirect string, offset: 0x1f9): l_len + <14e> DW_AT_decl_file : 3 + <14f> DW_AT_decl_line : 200 + <150> DW_AT_type : <0x87> + <154> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><157>: Abbrev Number: 8 (DW_TAG_member) + <158> DW_AT_name : (indirect string, offset: 0xd5): l_pid + <15c> DW_AT_decl_file : 3 + <15d> DW_AT_decl_line : 201 + <15e> DW_AT_type : <0x7c> + <162> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><165>: Abbrev Number: 0 + <1><166>: Abbrev Number: 6 (DW_TAG_typedef) + <167> DW_AT_name : (indirect string, offset: 0x1b4): struct_kernel_flock64 + <16b> DW_AT_decl_file : 4 + <16c> DW_AT_decl_line : 42 + <16d> DW_AT_type : <0x113> + <1><171>: Abbrev Number: 6 (DW_TAG_typedef) + <172> DW_AT_name : (indirect string, offset: 0x64): struct_flock64 + <176> DW_AT_decl_file : 5 + <177> DW_AT_decl_line : 33 + <178> DW_AT_type : <0x166> + <1><17c>: Abbrev Number: 12 (DW_TAG_variable) + <17d> DW_AT_name : (indirect string, offset: 0xe3): current_wordsize + <181> DW_AT_decl_file : 6 + <182> DW_AT_decl_line : 757 + <184> DW_AT_type : <0x47> + <188> DW_AT_external : 1 + <189> DW_AT_declaration : 1 + <1><18a>: Abbrev Number: 12 (DW_TAG_variable) + <18b> DW_AT_name : (indirect string, offset: 0xce): sysent + <18f> DW_AT_decl_file : 6 + <190> DW_AT_decl_line : 892 + <192> DW_AT_type : <0x101> + <196> DW_AT_external : 1 + <197> DW_AT_declaration : 1 + <1><198>: Abbrev Number: 12 (DW_TAG_variable) + <199> DW_AT_name : (indirect string, offset: 0x193): nsyscalls + <19d> DW_AT_decl_file : 6 + <19e> DW_AT_decl_line : 903 + <1a0> DW_AT_type : <0x47> + <1a4> DW_AT_external : 1 + <1a5> DW_AT_declaration : 1 + <1><1a6>: Abbrev Number: 13 (DW_TAG_variable) + <1a7> DW_AT_name : (indirect string, offset: 0x7c): mpers_target_var + <1ab> DW_AT_decl_file : 5 + <1ac> DW_AT_decl_line : 35 + <1ad> DW_AT_type : <0x171> + <1b1> DW_AT_external : 1 + <1b2> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><1b8>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_flock64.d2 b/mpers-m32/struct_flock64.d2 new file mode 100644 index 000000000..5e6f2a4a0 --- /dev/null +++ b/mpers-m32/struct_flock64.d2 @@ -0,0 +1,235 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1e4): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1ca): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a6): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xae): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x41): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x142): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x97): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1d4): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xbc): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x19d): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x15d): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x32): __kernel_pid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 27 +DW_AT_type : <0x2b> +<1><87> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x54): __kernel_loff_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 87 +DW_AT_type : <0x32> +<1><92> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xce): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xe5> +<2><9e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf4): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8d): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f0): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0xf0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x73): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xe5> +<1> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x14f): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0x92> +<1><101> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x107> +<1><107> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xf6> +<1><10c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x2c): _Bool +<1><113> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xdb): flock64 +DW_AT_byte_size : 24 +DW_AT_decl_file : 3 +DW_AT_decl_line : 196 +DW_AT_sibling : <0x166> +<2><11f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1dd): l_type +DW_AT_decl_file : 3 +DW_AT_decl_line : 197 +DW_AT_type : <0x24> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><12d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): l_whence +DW_AT_decl_file : 3 +DW_AT_decl_line : 198 +DW_AT_type : <0x24> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><13b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9): l_start +DW_AT_decl_file : 3 +DW_AT_decl_line : 199 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><149> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f9): l_len +DW_AT_decl_file : 3 +DW_AT_decl_line : 200 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><157> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd5): l_pid +DW_AT_decl_file : 3 +DW_AT_decl_line : 201 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<1><166> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b4): struct_kernel_flock64 +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_type : <0x113> +<1><171> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x64): struct_flock64 +DW_AT_decl_file : 5 +DW_AT_decl_line : 33 +DW_AT_type : <0x166> +<1><17c> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe3): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><18a> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xce): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x101> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><198> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x193): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1a6> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x7c): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 35 +DW_AT_type : <0x171> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/struct_flock64.h b/mpers-m32/struct_flock64.h new file mode 100644 index 000000000..9a2f03bfb --- /dev/null +++ b/mpers-m32/struct_flock64.h @@ -0,0 +1,11 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int16_t l_type; +int16_t l_whence; +int64_t l_start; +int64_t l_len; +int32_t l_pid; +} ATTRIBUTE_PACKED m32_struct_flock64; +#define MPERS_m32_struct_flock64 m32_struct_flock64 diff --git a/mpers-m32/struct_hd_geometry.c b/mpers-m32/struct_hd_geometry.c new file mode 100644 index 000000000..9a789511a --- /dev/null +++ b/mpers-m32/struct_hd_geometry.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2009, 2010 Jeff Mahoney + * Copyright (c) 2011-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include + +typedef struct hd_geometry struct_hd_geometry; + +struct_hd_geometry mpers_target_var; diff --git a/mpers-m32/struct_hd_geometry.d1 b/mpers-m32/struct_hd_geometry.d1 new file mode 100644 index 000000000..024c40a5f --- /dev/null +++ b/mpers-m32/struct_hd_geometry.d1 @@ -0,0 +1,191 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x18b (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xc1): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x183): mpers-m32/struct_hd_geometry.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x131): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1b5): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1a2): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x175): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x70): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x22): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x111): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x59): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1ac): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x7e): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x16c): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x12c): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x90): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0xa8): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x4f): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1c1): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x35): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x11e): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x16): _Bool + <1>: Abbrev Number: 12 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x0): hd_geometry + <102> DW_AT_byte_size : 8 + <103> DW_AT_decl_file : 2 + <104> DW_AT_decl_line : 313 + <106> DW_AT_sibling : <0x147> + <2><10a>: Abbrev Number: 13 (DW_TAG_member) + <10b> DW_AT_name : (indirect string, offset: 0x1ca): heads + <10f> DW_AT_decl_file : 2 + <110> DW_AT_decl_line : 314 + <112> DW_AT_type : <0x39> + <116> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><119>: Abbrev Number: 13 (DW_TAG_member) + <11a> DW_AT_name : (indirect string, offset: 0x109): sectors + <11e> DW_AT_decl_file : 2 + <11f> DW_AT_decl_line : 315 + <121> DW_AT_type : <0x39> + <125> DW_AT_data_member_location: 2 byte block: 23 1 (DW_OP_plus_uconst: 1) + <2><128>: Abbrev Number: 13 (DW_TAG_member) + <129> DW_AT_name : (indirect string, offset: 0xc): cylinders + <12d> DW_AT_decl_file : 2 + <12e> DW_AT_decl_line : 316 + <130> DW_AT_type : <0x40> + <134> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><137>: Abbrev Number: 13 (DW_TAG_member) + <138> DW_AT_name : (indirect string, offset: 0x1c): start + <13c> DW_AT_decl_file : 2 + <13d> DW_AT_decl_line : 317 + <13f> DW_AT_type : <0x5c> + <143> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><146>: Abbrev Number: 0 + <1><147>: Abbrev Number: 11 (DW_TAG_typedef) + <148> DW_AT_name : (indirect string, offset: 0xae): struct_hd_geometry + <14c> DW_AT_decl_file : 3 + <14d> DW_AT_decl_line : 34 + <14e> DW_AT_type : <0xfd> + <1><152>: Abbrev Number: 14 (DW_TAG_variable) + <153> DW_AT_name : (indirect string, offset: 0x97): current_wordsize + <157> DW_AT_decl_file : 4 + <158> DW_AT_decl_line : 757 + <15a> DW_AT_type : <0x47> + <15e> DW_AT_external : 1 + <15f> DW_AT_declaration : 1 + <1><160>: Abbrev Number: 14 (DW_TAG_variable) + <161> DW_AT_name : (indirect string, offset: 0x90): sysent + <165> DW_AT_decl_file : 4 + <166> DW_AT_decl_line : 892 + <168> DW_AT_type : <0xeb> + <16c> DW_AT_external : 1 + <16d> DW_AT_declaration : 1 + <1><16e>: Abbrev Number: 14 (DW_TAG_variable) + <16f> DW_AT_name : (indirect string, offset: 0x162): nsyscalls + <173> DW_AT_decl_file : 4 + <174> DW_AT_decl_line : 903 + <176> DW_AT_type : <0x47> + <17a> DW_AT_external : 1 + <17b> DW_AT_declaration : 1 + <1><17c>: Abbrev Number: 15 (DW_TAG_variable) + <17d> DW_AT_name : (indirect string, offset: 0x3e): mpers_target_var + <181> DW_AT_decl_file : 3 + <182> DW_AT_decl_line : 36 + <183> DW_AT_type : <0x147> + <187> DW_AT_external : 1 + <188> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><18e>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_hd_geometry.d2 b/mpers-m32/struct_hd_geometry.d2 new file mode 100644 index 000000000..11df87d95 --- /dev/null +++ b/mpers-m32/struct_hd_geometry.d2 @@ -0,0 +1,210 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1b5): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a2): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x175): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x70): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x22): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x111): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x59): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1ac): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x7e): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x16c): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x12c): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x90): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa8): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x4f): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c1): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x35): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11e): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x16): _Bool +<1> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): hd_geometry +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 313 +DW_AT_sibling : <0x147> +<2><10a> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ca): heads +DW_AT_decl_file : 2 +DW_AT_decl_line : 314 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><119> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x109): sectors +DW_AT_decl_file : 2 +DW_AT_decl_line : 315 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 1 (DW_OP_plus_uconst: 1) +<2><128> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc): cylinders +DW_AT_decl_file : 2 +DW_AT_decl_line : 316 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><137> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c): start +DW_AT_decl_file : 2 +DW_AT_decl_line : 317 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><147> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xae): struct_hd_geometry +DW_AT_decl_file : 3 +DW_AT_decl_line : 34 +DW_AT_type : <0xfd> +<1><152> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x97): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><160> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x90): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><16e> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x162): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><17c> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x3e): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 36 +DW_AT_type : <0x147> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/struct_hd_geometry.h b/mpers-m32/struct_hd_geometry.h new file mode 100644 index 000000000..6c4ec7abd --- /dev/null +++ b/mpers-m32/struct_hd_geometry.h @@ -0,0 +1,10 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +unsigned char heads; +unsigned char sectors; +uint16_t cylinders; +uint32_t start; +} ATTRIBUTE_PACKED m32_struct_hd_geometry; +#define MPERS_m32_struct_hd_geometry m32_struct_hd_geometry diff --git a/mpers-m32/struct_ifconf.c b/mpers-m32/struct_ifconf.c new file mode 100644 index 000000000..ef821f8a7 --- /dev/null +++ b/mpers-m32/struct_ifconf.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include +#if defined ALPHA || defined SH || defined SH64 +# include +#endif +#include +#include +#include + + +typedef struct ifconf struct_ifconf; +typedef struct ifreq struct_ifreq; + +struct_ifconf mpers_target_var; diff --git a/mpers-m32/struct_ifconf.d1 b/mpers-m32/struct_ifconf.d1 new file mode 100644 index 000000000..8d3d48718 --- /dev/null +++ b/mpers-m32/struct_ifconf.d1 @@ -0,0 +1,383 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x31f (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x118): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x2b0): mpers-m32/struct_ifconf.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1b5): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x278): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x22f): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x212): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xf7): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x2e): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x184): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x8c): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x25e): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xc1): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x209): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0x6f): __caddr_t + <6f> DW_AT_decl_file : 2 + <70> DW_AT_decl_line : 183 + <71> DW_AT_type : <0x75> + <1><75>: Abbrev Number: 5 (DW_TAG_pointer_type) + <76> DW_AT_byte_size : 4 + <77> DW_AT_type : <0x7b> + <1><7b>: Abbrev Number: 2 (DW_TAG_base_type) + <7c> DW_AT_byte_size : 1 + <7d> DW_AT_encoding : 6 (signed char) + <7e> DW_AT_name : (indirect string, offset: 0x19f): char + <1><82>: Abbrev Number: 5 (DW_TAG_pointer_type) + <83> DW_AT_byte_size : 4 + <84> DW_AT_type : <0x88> + <1><88>: Abbrev Number: 6 (DW_TAG_const_type) + <89> DW_AT_type : <0x7b> + <1><8d>: Abbrev Number: 7 (DW_TAG_structure_type) + <8e> DW_AT_name : (indirect string, offset: 0xd3): sysent + <92> DW_AT_byte_size : 20 + <93> DW_AT_decl_file : 1 + <94> DW_AT_decl_line : 4 + <95> DW_AT_sibling : <0xe0> + <2><99>: Abbrev Number: 8 (DW_TAG_member) + <9a> DW_AT_name : (indirect string, offset: 0x239): nargs + <9e> DW_AT_decl_file : 1 + <9f> DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x82): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x2a7): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xeb> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x4e): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x82> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xeb> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xe0> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x191): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x8d> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0x102> + <1><102>: Abbrev Number: 6 (DW_TAG_const_type) + <103> DW_AT_type : <0xf1> + <1><107>: Abbrev Number: 2 (DW_TAG_base_type) + <108> DW_AT_byte_size : 1 + <109> DW_AT_encoding : 2 (boolean) + <10a> DW_AT_name : (indirect string, offset: 0x28): _Bool + <1><10e>: Abbrev Number: 4 (DW_TAG_typedef) + <10f> DW_AT_name : (indirect string, offset: 0xeb): sa_family_t + <113> DW_AT_decl_file : 3 + <114> DW_AT_decl_line : 28 + <115> DW_AT_type : <0x40> + <1><119>: Abbrev Number: 7 (DW_TAG_structure_type) + <11a> DW_AT_name : (indirect string, offset: 0x267): sockaddr + <11e> DW_AT_byte_size : 16 + <11f> DW_AT_decl_file : 4 + <120> DW_AT_decl_line : 149 + <121> DW_AT_sibling : <0x142> + <2><125>: Abbrev Number: 8 (DW_TAG_member) + <126> DW_AT_name : (indirect string, offset: 0x220): sa_family + <12a> DW_AT_decl_file : 4 + <12b> DW_AT_decl_line : 151 + <12c> DW_AT_type : <0x10e> + <130> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><133>: Abbrev Number: 8 (DW_TAG_member) + <134> DW_AT_name : (indirect string, offset: 0x270): sa_data + <138> DW_AT_decl_file : 4 + <139> DW_AT_decl_line : 152 + <13a> DW_AT_type : <0x142> + <13e> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><141>: Abbrev Number: 0 + <1><142>: Abbrev Number: 12 (DW_TAG_array_type) + <143> DW_AT_type : <0x7b> + <147> DW_AT_sibling : <0x152> + <2><14b>: Abbrev Number: 13 (DW_TAG_subrange_type) + <14c> DW_AT_type : <0x63> + <150> DW_AT_upper_bound : 13 + <2><151>: Abbrev Number: 0 + <1><152>: Abbrev Number: 7 (DW_TAG_structure_type) + <153> DW_AT_name : (indirect string, offset: 0x0): ifmap + <157> DW_AT_byte_size : 16 + <158> DW_AT_decl_file : 5 + <159> DW_AT_decl_line : 111 + <15a> DW_AT_sibling : <0x1b3> + <2><15e>: Abbrev Number: 8 (DW_TAG_member) + <15f> DW_AT_name : (indirect string, offset: 0x284): mem_start + <163> DW_AT_decl_file : 5 + <164> DW_AT_decl_line : 113 + <165> DW_AT_type : <0x5c> + <169> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><16c>: Abbrev Number: 8 (DW_TAG_member) + <16d> DW_AT_name : (indirect string, offset: 0xf): mem_end + <171> DW_AT_decl_file : 5 + <172> DW_AT_decl_line : 114 + <173> DW_AT_type : <0x5c> + <177> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><17a>: Abbrev Number: 8 (DW_TAG_member) + <17b> DW_AT_name : (indirect string, offset: 0x171): base_addr + <17f> DW_AT_decl_file : 5 + <180> DW_AT_decl_line : 115 + <181> DW_AT_type : <0x40> + <185> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><188>: Abbrev Number: 9 (DW_TAG_member) + <189> DW_AT_name : irq + <18d> DW_AT_decl_file : 5 + <18e> DW_AT_decl_line : 116 + <18f> DW_AT_type : <0x39> + <193> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><196>: Abbrev Number: 9 (DW_TAG_member) + <197> DW_AT_name : dma + <19b> DW_AT_decl_file : 5 + <19c> DW_AT_decl_line : 117 + <19d> DW_AT_type : <0x39> + <1a1> DW_AT_data_member_location: 2 byte block: 23 b (DW_OP_plus_uconst: 11) + <2><1a4>: Abbrev Number: 8 (DW_TAG_member) + <1a5> DW_AT_name : (indirect string, offset: 0x22a): port + <1a9> DW_AT_decl_file : 5 + <1aa> DW_AT_decl_line : 118 + <1ab> DW_AT_type : <0x39> + <1af> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1b2>: Abbrev Number: 0 + <1><1b3>: Abbrev Number: 14 (DW_TAG_union_type) + <1b4> DW_AT_byte_size : 16 + <1b5> DW_AT_decl_file : 5 + <1b6> DW_AT_decl_line : 130 + <1b7> DW_AT_sibling : <0x1c7> + <2><1bb>: Abbrev Number: 15 (DW_TAG_member) + <1bc> DW_AT_name : (indirect string, offset: 0x105): ifrn_name + <1c0> DW_AT_decl_file : 5 + <1c1> DW_AT_decl_line : 132 + <1c2> DW_AT_type : <0x1c7> + <2><1c6>: Abbrev Number: 0 + <1><1c7>: Abbrev Number: 12 (DW_TAG_array_type) + <1c8> DW_AT_type : <0x7b> + <1cc> DW_AT_sibling : <0x1d7> + <2><1d0>: Abbrev Number: 13 (DW_TAG_subrange_type) + <1d1> DW_AT_type : <0x63> + <1d5> DW_AT_upper_bound : 15 + <2><1d6>: Abbrev Number: 0 + <1><1d7>: Abbrev Number: 14 (DW_TAG_union_type) + <1d8> DW_AT_byte_size : 16 + <1d9> DW_AT_decl_file : 5 + <1da> DW_AT_decl_line : 135 + <1db> DW_AT_sibling : <0x264> + <2><1df>: Abbrev Number: 15 (DW_TAG_member) + <1e0> DW_AT_name : (indirect string, offset: 0xa3): ifru_addr + <1e4> DW_AT_decl_file : 5 + <1e5> DW_AT_decl_line : 137 + <1e6> DW_AT_type : <0x119> + <2><1ea>: Abbrev Number: 15 (DW_TAG_member) + <1eb> DW_AT_name : (indirect string, offset: 0x41): ifru_dstaddr + <1ef> DW_AT_decl_file : 5 + <1f0> DW_AT_decl_line : 138 + <1f1> DW_AT_type : <0x119> + <2><1f5>: Abbrev Number: 15 (DW_TAG_member) + <1f6> DW_AT_name : (indirect string, offset: 0x57): ifru_broadaddr + <1fa> DW_AT_decl_file : 5 + <1fb> DW_AT_decl_line : 139 + <1fc> DW_AT_type : <0x119> + <2><200>: Abbrev Number: 15 (DW_TAG_member) + <201> DW_AT_name : (indirect string, offset: 0x29a): ifru_netmask + <205> DW_AT_decl_file : 5 + <206> DW_AT_decl_line : 140 + <207> DW_AT_type : <0x119> + <2><20b>: Abbrev Number: 15 (DW_TAG_member) + <20c> DW_AT_name : (indirect string, offset: 0x28e): ifru_hwaddr + <210> DW_AT_decl_file : 5 + <211> DW_AT_decl_line : 141 + <212> DW_AT_type : <0x119> + <2><216>: Abbrev Number: 15 (DW_TAG_member) + <217> DW_AT_name : (indirect string, offset: 0xad): ifru_flags + <21b> DW_AT_decl_file : 5 + <21c> DW_AT_decl_line : 142 + <21d> DW_AT_type : <0x24> + <2><221>: Abbrev Number: 15 (DW_TAG_member) + <222> DW_AT_name : (indirect string, offset: 0x1fd): ifru_ivalue + <226> DW_AT_decl_file : 5 + <227> DW_AT_decl_line : 143 + <228> DW_AT_type : <0x2b> + <2><22c>: Abbrev Number: 15 (DW_TAG_member) + <22d> DW_AT_name : (indirect string, offset: 0xb8): ifru_mtu + <231> DW_AT_decl_file : 5 + <232> DW_AT_decl_line : 144 + <233> DW_AT_type : <0x2b> + <2><237>: Abbrev Number: 15 (DW_TAG_member) + <238> DW_AT_name : (indirect string, offset: 0x79): ifru_map + <23c> DW_AT_decl_file : 5 + <23d> DW_AT_decl_line : 145 + <23e> DW_AT_type : <0x152> + <2><242>: Abbrev Number: 15 (DW_TAG_member) + <243> DW_AT_name : (indirect string, offset: 0x23f): ifru_slave + <247> DW_AT_decl_file : 5 + <248> DW_AT_decl_line : 146 + <249> DW_AT_type : <0x1c7> + <2><24d>: Abbrev Number: 15 (DW_TAG_member) + <24e> DW_AT_name : (indirect string, offset: 0x1f0): ifru_newname + <252> DW_AT_decl_file : 5 + <253> DW_AT_decl_line : 147 + <254> DW_AT_type : <0x1c7> + <2><258>: Abbrev Number: 15 (DW_TAG_member) + <259> DW_AT_name : (indirect string, offset: 0x160): ifru_data + <25d> DW_AT_decl_file : 5 + <25e> DW_AT_decl_line : 148 + <25f> DW_AT_type : <0x6a> + <2><263>: Abbrev Number: 0 + <1><264>: Abbrev Number: 7 (DW_TAG_structure_type) + <265> DW_AT_name : (indirect string, offset: 0x24a): ifreq + <269> DW_AT_byte_size : 32 + <26a> DW_AT_decl_file : 5 + <26b> DW_AT_decl_line : 126 + <26c> DW_AT_sibling : <0x28d> + <2><270>: Abbrev Number: 8 (DW_TAG_member) + <271> DW_AT_name : (indirect string, offset: 0x17b): ifr_ifrn + <275> DW_AT_decl_file : 5 + <276> DW_AT_decl_line : 133 + <277> DW_AT_type : <0x1b3> + <27b> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><27e>: Abbrev Number: 8 (DW_TAG_member) + <27f> DW_AT_name : (indirect string, offset: 0x1a4): ifr_ifru + <283> DW_AT_decl_file : 5 + <284> DW_AT_decl_line : 149 + <285> DW_AT_type : <0x1d7> + <289> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><28c>: Abbrev Number: 0 + <1><28d>: Abbrev Number: 14 (DW_TAG_union_type) + <28e> DW_AT_byte_size : 4 + <28f> DW_AT_decl_file : 5 + <290> DW_AT_decl_line : 179 + <291> DW_AT_sibling : <0x2ac> + <2><295>: Abbrev Number: 15 (DW_TAG_member) + <296> DW_AT_name : (indirect string, offset: 0x66): ifcu_buf + <29a> DW_AT_decl_file : 5 + <29b> DW_AT_decl_line : 181 + <29c> DW_AT_type : <0x6a> + <2><2a0>: Abbrev Number: 15 (DW_TAG_member) + <2a1> DW_AT_name : (indirect string, offset: 0x10f): ifcu_req + <2a5> DW_AT_decl_file : 5 + <2a6> DW_AT_decl_line : 182 + <2a7> DW_AT_type : <0x2ac> + <2><2ab>: Abbrev Number: 0 + <1><2ac>: Abbrev Number: 5 (DW_TAG_pointer_type) + <2ad> DW_AT_byte_size : 4 + <2ae> DW_AT_type : <0x264> + <1><2b2>: Abbrev Number: 7 (DW_TAG_structure_type) + <2b3> DW_AT_name : (indirect string, offset: 0x16a): ifconf + <2b7> DW_AT_byte_size : 8 + <2b8> DW_AT_decl_file : 5 + <2b9> DW_AT_decl_line : 176 + <2ba> DW_AT_sibling : <0x2db> + <2><2be>: Abbrev Number: 8 (DW_TAG_member) + <2bf> DW_AT_name : (indirect string, offset: 0x1ad): ifc_len + <2c3> DW_AT_decl_file : 5 + <2c4> DW_AT_decl_line : 178 + <2c5> DW_AT_type : <0x2b> + <2c9> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><2cc>: Abbrev Number: 8 (DW_TAG_member) + <2cd> DW_AT_name : (indirect string, offset: 0x6): ifc_ifcu + <2d1> DW_AT_decl_file : 5 + <2d2> DW_AT_decl_line : 183 + <2d3> DW_AT_type : <0x28d> + <2d7> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><2da>: Abbrev Number: 0 + <1><2db>: Abbrev Number: 4 (DW_TAG_typedef) + <2dc> DW_AT_name : (indirect string, offset: 0x250): struct_ifconf + <2e0> DW_AT_decl_file : 6 + <2e1> DW_AT_decl_line : 39 + <2e2> DW_AT_type : <0x2b2> + <1><2e6>: Abbrev Number: 16 (DW_TAG_variable) + <2e7> DW_AT_name : (indirect string, offset: 0xda): current_wordsize + <2eb> DW_AT_decl_file : 7 + <2ec> DW_AT_decl_line : 757 + <2ee> DW_AT_type : <0x47> + <2f2> DW_AT_external : 1 + <2f3> DW_AT_declaration : 1 + <1><2f4>: Abbrev Number: 16 (DW_TAG_variable) + <2f5> DW_AT_name : (indirect string, offset: 0xd3): sysent + <2f9> DW_AT_decl_file : 7 + <2fa> DW_AT_decl_line : 892 + <2fc> DW_AT_type : <0xfc> + <300> DW_AT_external : 1 + <301> DW_AT_declaration : 1 + <1><302>: Abbrev Number: 16 (DW_TAG_variable) + <303> DW_AT_name : (indirect string, offset: 0x1e6): nsyscalls + <307> DW_AT_decl_file : 7 + <308> DW_AT_decl_line : 903 + <30a> DW_AT_type : <0x47> + <30e> DW_AT_external : 1 + <30f> DW_AT_declaration : 1 + <1><310>: Abbrev Number: 17 (DW_TAG_variable) + <311> DW_AT_name : (indirect string, offset: 0x17): mpers_target_var + <315> DW_AT_decl_file : 6 + <316> DW_AT_decl_line : 42 + <317> DW_AT_type : <0x2db> + <31b> DW_AT_external : 1 + <31c> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><322>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_ifconf.d2 b/mpers-m32/struct_ifconf.d2 new file mode 100644 index 000000000..a099f7f5f --- /dev/null +++ b/mpers-m32/struct_ifconf.d2 @@ -0,0 +1,431 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x278): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x22f): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x212): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xf7): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2e): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x184): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x8c): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x25e): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xc1): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x209): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x6f): __caddr_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 183 +DW_AT_type : <0x75> +<1><75> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x7b> +<1><7b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x19f): char +<1><82> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x88> +<1><88> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x7b> +<1><8d> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xd3): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xe0> +<2><99> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x239): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x82): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2a7): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xeb> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x4e): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x82> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xeb> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xe0> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x191): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x8d> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x102> +<1><102> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xf1> +<1><107> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x28): _Bool +<1><10e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xeb): sa_family_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 28 +DW_AT_type : <0x40> +<1><119> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x267): sockaddr +DW_AT_byte_size : 16 +DW_AT_decl_file : 4 +DW_AT_decl_line : 149 +DW_AT_sibling : <0x142> +<2><125> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x220): sa_family +DW_AT_decl_file : 4 +DW_AT_decl_line : 151 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><133> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x270): sa_data +DW_AT_decl_file : 4 +DW_AT_decl_line : 152 +DW_AT_type : <0x142> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<1><142> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x7b> +DW_AT_sibling : <0x152> +<2><14b> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 13 +<1><152> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): ifmap +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 111 +DW_AT_sibling : <0x1b3> +<2><15e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x284): mem_start +DW_AT_decl_file : 5 +DW_AT_decl_line : 113 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><16c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf): mem_end +DW_AT_decl_file : 5 +DW_AT_decl_line : 114 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><17a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x171): base_addr +DW_AT_decl_file : 5 +DW_AT_decl_line : 115 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><188> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : irq +DW_AT_decl_file : 5 +DW_AT_decl_line : 116 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><196> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : dma +DW_AT_decl_file : 5 +DW_AT_decl_line : 117 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 b (DW_OP_plus_uconst: 11) +<2><1a4> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22a): port +DW_AT_decl_file : 5 +DW_AT_decl_line : 118 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1b3> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 130 +DW_AT_sibling : <0x1c7> +<2><1bb> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x105): ifrn_name +DW_AT_decl_file : 5 +DW_AT_decl_line : 132 +DW_AT_type : <0x1c7> +<1><1c7> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x7b> +DW_AT_sibling : <0x1d7> +<2><1d0> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 15 +<1><1d7> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 135 +DW_AT_sibling : <0x264> +<2><1df> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa3): ifru_addr +DW_AT_decl_file : 5 +DW_AT_decl_line : 137 +DW_AT_type : <0x119> +<2><1ea> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x41): ifru_dstaddr +DW_AT_decl_file : 5 +DW_AT_decl_line : 138 +DW_AT_type : <0x119> +<2><1f5> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x57): ifru_broadaddr +DW_AT_decl_file : 5 +DW_AT_decl_line : 139 +DW_AT_type : <0x119> +<2><200> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x29a): ifru_netmask +DW_AT_decl_file : 5 +DW_AT_decl_line : 140 +DW_AT_type : <0x119> +<2><20b> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x28e): ifru_hwaddr +DW_AT_decl_file : 5 +DW_AT_decl_line : 141 +DW_AT_type : <0x119> +<2><216> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xad): ifru_flags +DW_AT_decl_file : 5 +DW_AT_decl_line : 142 +DW_AT_type : <0x24> +<2><221> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fd): ifru_ivalue +DW_AT_decl_file : 5 +DW_AT_decl_line : 143 +DW_AT_type : <0x2b> +<2><22c> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb8): ifru_mtu +DW_AT_decl_file : 5 +DW_AT_decl_line : 144 +DW_AT_type : <0x2b> +<2><237> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x79): ifru_map +DW_AT_decl_file : 5 +DW_AT_decl_line : 145 +DW_AT_type : <0x152> +<2><242> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23f): ifru_slave +DW_AT_decl_file : 5 +DW_AT_decl_line : 146 +DW_AT_type : <0x1c7> +<2><24d> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f0): ifru_newname +DW_AT_decl_file : 5 +DW_AT_decl_line : 147 +DW_AT_type : <0x1c7> +<2><258> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x160): ifru_data +DW_AT_decl_file : 5 +DW_AT_decl_line : 148 +DW_AT_type : <0x6a> +<1><264> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x24a): ifreq +DW_AT_byte_size : 32 +DW_AT_decl_file : 5 +DW_AT_decl_line : 126 +DW_AT_sibling : <0x28d> +<2><270> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x17b): ifr_ifrn +DW_AT_decl_file : 5 +DW_AT_decl_line : 133 +DW_AT_type : <0x1b3> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><27e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a4): ifr_ifru +DW_AT_decl_file : 5 +DW_AT_decl_line : 149 +DW_AT_type : <0x1d7> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><28d> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 5 +DW_AT_decl_line : 179 +DW_AT_sibling : <0x2ac> +<2><295> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x66): ifcu_buf +DW_AT_decl_file : 5 +DW_AT_decl_line : 181 +DW_AT_type : <0x6a> +<2><2a0> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10f): ifcu_req +DW_AT_decl_file : 5 +DW_AT_decl_line : 182 +DW_AT_type : <0x2ac> +<1><2ac> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x264> +<1><2b2> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x16a): ifconf +DW_AT_byte_size : 8 +DW_AT_decl_file : 5 +DW_AT_decl_line : 176 +DW_AT_sibling : <0x2db> +<2><2be> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ad): ifc_len +DW_AT_decl_file : 5 +DW_AT_decl_line : 178 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><2cc> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6): ifc_ifcu +DW_AT_decl_file : 5 +DW_AT_decl_line : 183 +DW_AT_type : <0x28d> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><2db> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x250): struct_ifconf +DW_AT_decl_file : 6 +DW_AT_decl_line : 39 +DW_AT_type : <0x2b2> +<1><2e6> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xda): current_wordsize +DW_AT_decl_file : 7 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2f4> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd3): sysent +DW_AT_decl_file : 7 +DW_AT_decl_line : 892 +DW_AT_type : <0xfc> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><302> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1e6): nsyscalls +DW_AT_decl_file : 7 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><310> +Abbrev Number: 17 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x17): mpers_target_var +DW_AT_decl_file : 6 +DW_AT_decl_line : 42 +DW_AT_type : <0x2db> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/struct_ifconf.h b/mpers-m32/struct_ifconf.h new file mode 100644 index 000000000..67517921f --- /dev/null +++ b/mpers-m32/struct_ifconf.h @@ -0,0 +1,11 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t ifc_len; +union { +mpers_ptr_t ifcu_buf; +mpers_ptr_t ifcu_req; +} ifc_ifcu; +} ATTRIBUTE_PACKED m32_struct_ifconf; +#define MPERS_m32_struct_ifconf m32_struct_ifconf diff --git a/mpers-m32/struct_ifreq.c b/mpers-m32/struct_ifreq.c new file mode 100644 index 000000000..691cb13d2 --- /dev/null +++ b/mpers-m32/struct_ifreq.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include +#if defined ALPHA || defined SH || defined SH64 +# include +#endif +#include +#include +#include + + +typedef struct ifconf struct_ifconf; +typedef struct ifreq struct_ifreq; + +struct_ifreq mpers_target_var; diff --git a/mpers-m32/struct_ifreq.d1 b/mpers-m32/struct_ifreq.d1 new file mode 100644 index 000000000..3c8135bba --- /dev/null +++ b/mpers-m32/struct_ifreq.d1 @@ -0,0 +1,345 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x2d1 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xfb): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x27c): mpers-m32/struct_ifreq.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x189): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x24d): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x203): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1e6): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xe3): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x25): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x160): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x6b): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x233): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xa0): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1dd): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0x4e): __caddr_t + <6f> DW_AT_decl_file : 2 + <70> DW_AT_decl_line : 183 + <71> DW_AT_type : <0x75> + <1><75>: Abbrev Number: 5 (DW_TAG_pointer_type) + <76> DW_AT_byte_size : 4 + <77> DW_AT_type : <0x7b> + <1><7b>: Abbrev Number: 2 (DW_TAG_base_type) + <7c> DW_AT_byte_size : 1 + <7d> DW_AT_encoding : 6 (signed char) + <7e> DW_AT_name : (indirect string, offset: 0x17b): char + <1><82>: Abbrev Number: 5 (DW_TAG_pointer_type) + <83> DW_AT_byte_size : 4 + <84> DW_AT_type : <0x88> + <1><88>: Abbrev Number: 6 (DW_TAG_const_type) + <89> DW_AT_type : <0x7b> + <1><8d>: Abbrev Number: 7 (DW_TAG_structure_type) + <8e> DW_AT_name : (indirect string, offset: 0xbf): sysent + <92> DW_AT_byte_size : 20 + <93> DW_AT_decl_file : 1 + <94> DW_AT_decl_line : 4 + <95> DW_AT_sibling : <0xe0> + <2><99>: Abbrev Number: 8 (DW_TAG_member) + <9a> DW_AT_name : (indirect string, offset: 0x20d): nargs + <9e> DW_AT_decl_file : 1 + <9f> DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x61): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x295): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xeb> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x45): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x82> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xeb> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xe0> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x16d): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x8d> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0x102> + <1><102>: Abbrev Number: 6 (DW_TAG_const_type) + <103> DW_AT_type : <0xf1> + <1><107>: Abbrev Number: 2 (DW_TAG_base_type) + <108> DW_AT_byte_size : 1 + <109> DW_AT_encoding : 2 (boolean) + <10a> DW_AT_name : (indirect string, offset: 0x1f): _Bool + <1><10e>: Abbrev Number: 4 (DW_TAG_typedef) + <10f> DW_AT_name : (indirect string, offset: 0xd7): sa_family_t + <113> DW_AT_decl_file : 3 + <114> DW_AT_decl_line : 28 + <115> DW_AT_type : <0x40> + <1><119>: Abbrev Number: 7 (DW_TAG_structure_type) + <11a> DW_AT_name : (indirect string, offset: 0x23c): sockaddr + <11e> DW_AT_byte_size : 16 + <11f> DW_AT_decl_file : 4 + <120> DW_AT_decl_line : 149 + <121> DW_AT_sibling : <0x142> + <2><125>: Abbrev Number: 8 (DW_TAG_member) + <126> DW_AT_name : (indirect string, offset: 0x1f4): sa_family + <12a> DW_AT_decl_file : 4 + <12b> DW_AT_decl_line : 151 + <12c> DW_AT_type : <0x10e> + <130> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><133>: Abbrev Number: 8 (DW_TAG_member) + <134> DW_AT_name : (indirect string, offset: 0x245): sa_data + <138> DW_AT_decl_file : 4 + <139> DW_AT_decl_line : 152 + <13a> DW_AT_type : <0x142> + <13e> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><141>: Abbrev Number: 0 + <1><142>: Abbrev Number: 12 (DW_TAG_array_type) + <143> DW_AT_type : <0x7b> + <147> DW_AT_sibling : <0x152> + <2><14b>: Abbrev Number: 13 (DW_TAG_subrange_type) + <14c> DW_AT_type : <0x63> + <150> DW_AT_upper_bound : 13 + <2><151>: Abbrev Number: 0 + <1><152>: Abbrev Number: 7 (DW_TAG_structure_type) + <153> DW_AT_name : (indirect string, offset: 0x0): ifmap + <157> DW_AT_byte_size : 16 + <158> DW_AT_decl_file : 5 + <159> DW_AT_decl_line : 111 + <15a> DW_AT_sibling : <0x1b3> + <2><15e>: Abbrev Number: 8 (DW_TAG_member) + <15f> DW_AT_name : (indirect string, offset: 0x259): mem_start + <163> DW_AT_decl_file : 5 + <164> DW_AT_decl_line : 113 + <165> DW_AT_type : <0x5c> + <169> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><16c>: Abbrev Number: 8 (DW_TAG_member) + <16d> DW_AT_name : (indirect string, offset: 0x6): mem_end + <171> DW_AT_decl_file : 5 + <172> DW_AT_decl_line : 114 + <173> DW_AT_type : <0x5c> + <177> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><17a>: Abbrev Number: 8 (DW_TAG_member) + <17b> DW_AT_name : (indirect string, offset: 0x14d): base_addr + <17f> DW_AT_decl_file : 5 + <180> DW_AT_decl_line : 115 + <181> DW_AT_type : <0x40> + <185> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><188>: Abbrev Number: 9 (DW_TAG_member) + <189> DW_AT_name : irq + <18d> DW_AT_decl_file : 5 + <18e> DW_AT_decl_line : 116 + <18f> DW_AT_type : <0x39> + <193> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><196>: Abbrev Number: 9 (DW_TAG_member) + <197> DW_AT_name : dma + <19b> DW_AT_decl_file : 5 + <19c> DW_AT_decl_line : 117 + <19d> DW_AT_type : <0x39> + <1a1> DW_AT_data_member_location: 2 byte block: 23 b (DW_OP_plus_uconst: 11) + <2><1a4>: Abbrev Number: 8 (DW_TAG_member) + <1a5> DW_AT_name : (indirect string, offset: 0x1fe): port + <1a9> DW_AT_decl_file : 5 + <1aa> DW_AT_decl_line : 118 + <1ab> DW_AT_type : <0x39> + <1af> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1b2>: Abbrev Number: 0 + <1><1b3>: Abbrev Number: 14 (DW_TAG_union_type) + <1b4> DW_AT_byte_size : 16 + <1b5> DW_AT_decl_file : 5 + <1b6> DW_AT_decl_line : 130 + <1b7> DW_AT_sibling : <0x1c7> + <2><1bb>: Abbrev Number: 15 (DW_TAG_member) + <1bc> DW_AT_name : (indirect string, offset: 0xf1): ifrn_name + <1c0> DW_AT_decl_file : 5 + <1c1> DW_AT_decl_line : 132 + <1c2> DW_AT_type : <0x1c7> + <2><1c6>: Abbrev Number: 0 + <1><1c7>: Abbrev Number: 12 (DW_TAG_array_type) + <1c8> DW_AT_type : <0x7b> + <1cc> DW_AT_sibling : <0x1d7> + <2><1d0>: Abbrev Number: 13 (DW_TAG_subrange_type) + <1d1> DW_AT_type : <0x63> + <1d5> DW_AT_upper_bound : 15 + <2><1d6>: Abbrev Number: 0 + <1><1d7>: Abbrev Number: 14 (DW_TAG_union_type) + <1d8> DW_AT_byte_size : 16 + <1d9> DW_AT_decl_file : 5 + <1da> DW_AT_decl_line : 135 + <1db> DW_AT_sibling : <0x264> + <2><1df>: Abbrev Number: 15 (DW_TAG_member) + <1e0> DW_AT_name : (indirect string, offset: 0x82): ifru_addr + <1e4> DW_AT_decl_file : 5 + <1e5> DW_AT_decl_line : 137 + <1e6> DW_AT_type : <0x119> + <2><1ea>: Abbrev Number: 15 (DW_TAG_member) + <1eb> DW_AT_name : (indirect string, offset: 0x38): ifru_dstaddr + <1ef> DW_AT_decl_file : 5 + <1f0> DW_AT_decl_line : 138 + <1f1> DW_AT_type : <0x119> + <2><1f5>: Abbrev Number: 15 (DW_TAG_member) + <1f6> DW_AT_name : (indirect string, offset: 0x224): ifru_broadaddr + <1fa> DW_AT_decl_file : 5 + <1fb> DW_AT_decl_line : 139 + <1fc> DW_AT_type : <0x119> + <2><200>: Abbrev Number: 15 (DW_TAG_member) + <201> DW_AT_name : (indirect string, offset: 0x26f): ifru_netmask + <205> DW_AT_decl_file : 5 + <206> DW_AT_decl_line : 140 + <207> DW_AT_type : <0x119> + <2><20b>: Abbrev Number: 15 (DW_TAG_member) + <20c> DW_AT_name : (indirect string, offset: 0x263): ifru_hwaddr + <210> DW_AT_decl_file : 5 + <211> DW_AT_decl_line : 141 + <212> DW_AT_type : <0x119> + <2><216>: Abbrev Number: 15 (DW_TAG_member) + <217> DW_AT_name : (indirect string, offset: 0x8c): ifru_flags + <21b> DW_AT_decl_file : 5 + <21c> DW_AT_decl_line : 142 + <21d> DW_AT_type : <0x24> + <2><221>: Abbrev Number: 15 (DW_TAG_member) + <222> DW_AT_name : (indirect string, offset: 0x1d1): ifru_ivalue + <226> DW_AT_decl_file : 5 + <227> DW_AT_decl_line : 143 + <228> DW_AT_type : <0x2b> + <2><22c>: Abbrev Number: 15 (DW_TAG_member) + <22d> DW_AT_name : (indirect string, offset: 0x97): ifru_mtu + <231> DW_AT_decl_file : 5 + <232> DW_AT_decl_line : 144 + <233> DW_AT_type : <0x2b> + <2><237>: Abbrev Number: 15 (DW_TAG_member) + <238> DW_AT_name : (indirect string, offset: 0x58): ifru_map + <23c> DW_AT_decl_file : 5 + <23d> DW_AT_decl_line : 145 + <23e> DW_AT_type : <0x152> + <2><242>: Abbrev Number: 15 (DW_TAG_member) + <243> DW_AT_name : (indirect string, offset: 0x213): ifru_slave + <247> DW_AT_decl_file : 5 + <248> DW_AT_decl_line : 146 + <249> DW_AT_type : <0x1c7> + <2><24d>: Abbrev Number: 15 (DW_TAG_member) + <24e> DW_AT_name : (indirect string, offset: 0x1c4): ifru_newname + <252> DW_AT_decl_file : 5 + <253> DW_AT_decl_line : 147 + <254> DW_AT_type : <0x1c7> + <2><258>: Abbrev Number: 15 (DW_TAG_member) + <259> DW_AT_name : (indirect string, offset: 0x143): ifru_data + <25d> DW_AT_decl_file : 5 + <25e> DW_AT_decl_line : 148 + <25f> DW_AT_type : <0x6a> + <2><263>: Abbrev Number: 0 + <1><264>: Abbrev Number: 7 (DW_TAG_structure_type) + <265> DW_AT_name : (indirect string, offset: 0x21e): ifreq + <269> DW_AT_byte_size : 32 + <26a> DW_AT_decl_file : 5 + <26b> DW_AT_decl_line : 126 + <26c> DW_AT_sibling : <0x28d> + <2><270>: Abbrev Number: 8 (DW_TAG_member) + <271> DW_AT_name : (indirect string, offset: 0x157): ifr_ifrn + <275> DW_AT_decl_file : 5 + <276> DW_AT_decl_line : 133 + <277> DW_AT_type : <0x1b3> + <27b> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><27e>: Abbrev Number: 8 (DW_TAG_member) + <27f> DW_AT_name : (indirect string, offset: 0x180): ifr_ifru + <283> DW_AT_decl_file : 5 + <284> DW_AT_decl_line : 149 + <285> DW_AT_type : <0x1d7> + <289> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><28c>: Abbrev Number: 0 + <1><28d>: Abbrev Number: 4 (DW_TAG_typedef) + <28e> DW_AT_name : (indirect string, offset: 0xb2): struct_ifreq + <292> DW_AT_decl_file : 6 + <293> DW_AT_decl_line : 40 + <294> DW_AT_type : <0x264> + <1><298>: Abbrev Number: 16 (DW_TAG_variable) + <299> DW_AT_name : (indirect string, offset: 0xc6): current_wordsize + <29d> DW_AT_decl_file : 7 + <29e> DW_AT_decl_line : 757 + <2a0> DW_AT_type : <0x47> + <2a4> DW_AT_external : 1 + <2a5> DW_AT_declaration : 1 + <1><2a6>: Abbrev Number: 16 (DW_TAG_variable) + <2a7> DW_AT_name : (indirect string, offset: 0xbf): sysent + <2ab> DW_AT_decl_file : 7 + <2ac> DW_AT_decl_line : 892 + <2ae> DW_AT_type : <0xfc> + <2b2> DW_AT_external : 1 + <2b3> DW_AT_declaration : 1 + <1><2b4>: Abbrev Number: 16 (DW_TAG_variable) + <2b5> DW_AT_name : (indirect string, offset: 0x1ba): nsyscalls + <2b9> DW_AT_decl_file : 7 + <2ba> DW_AT_decl_line : 903 + <2bc> DW_AT_type : <0x47> + <2c0> DW_AT_external : 1 + <2c1> DW_AT_declaration : 1 + <1><2c2>: Abbrev Number: 17 (DW_TAG_variable) + <2c3> DW_AT_name : (indirect string, offset: 0xe): mpers_target_var + <2c7> DW_AT_decl_file : 6 + <2c8> DW_AT_decl_line : 42 + <2c9> DW_AT_type : <0x28d> + <2cd> DW_AT_external : 1 + <2ce> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><2d4>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_ifreq.d2 b/mpers-m32/struct_ifreq.d2 new file mode 100644 index 000000000..e8e690162 --- /dev/null +++ b/mpers-m32/struct_ifreq.d2 @@ -0,0 +1,388 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x24d): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x203): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1e6): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xe3): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x25): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x160): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x6b): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x233): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xa0): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1dd): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x4e): __caddr_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 183 +DW_AT_type : <0x75> +<1><75> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x7b> +<1><7b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x17b): char +<1><82> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x88> +<1><88> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x7b> +<1><8d> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xbf): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xe0> +<2><99> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x20d): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x61): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x295): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xeb> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x45): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x82> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xeb> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xe0> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x16d): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x8d> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x102> +<1><102> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xf1> +<1><107> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x1f): _Bool +<1><10e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xd7): sa_family_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 28 +DW_AT_type : <0x40> +<1><119> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x23c): sockaddr +DW_AT_byte_size : 16 +DW_AT_decl_file : 4 +DW_AT_decl_line : 149 +DW_AT_sibling : <0x142> +<2><125> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f4): sa_family +DW_AT_decl_file : 4 +DW_AT_decl_line : 151 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><133> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x245): sa_data +DW_AT_decl_file : 4 +DW_AT_decl_line : 152 +DW_AT_type : <0x142> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<1><142> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x7b> +DW_AT_sibling : <0x152> +<2><14b> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 13 +<1><152> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): ifmap +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 111 +DW_AT_sibling : <0x1b3> +<2><15e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x259): mem_start +DW_AT_decl_file : 5 +DW_AT_decl_line : 113 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><16c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6): mem_end +DW_AT_decl_file : 5 +DW_AT_decl_line : 114 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><17a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14d): base_addr +DW_AT_decl_file : 5 +DW_AT_decl_line : 115 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><188> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : irq +DW_AT_decl_file : 5 +DW_AT_decl_line : 116 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><196> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : dma +DW_AT_decl_file : 5 +DW_AT_decl_line : 117 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 b (DW_OP_plus_uconst: 11) +<2><1a4> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fe): port +DW_AT_decl_file : 5 +DW_AT_decl_line : 118 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1b3> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 130 +DW_AT_sibling : <0x1c7> +<2><1bb> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf1): ifrn_name +DW_AT_decl_file : 5 +DW_AT_decl_line : 132 +DW_AT_type : <0x1c7> +<1><1c7> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x7b> +DW_AT_sibling : <0x1d7> +<2><1d0> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 15 +<1><1d7> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 135 +DW_AT_sibling : <0x264> +<2><1df> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x82): ifru_addr +DW_AT_decl_file : 5 +DW_AT_decl_line : 137 +DW_AT_type : <0x119> +<2><1ea> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x38): ifru_dstaddr +DW_AT_decl_file : 5 +DW_AT_decl_line : 138 +DW_AT_type : <0x119> +<2><1f5> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x224): ifru_broadaddr +DW_AT_decl_file : 5 +DW_AT_decl_line : 139 +DW_AT_type : <0x119> +<2><200> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x26f): ifru_netmask +DW_AT_decl_file : 5 +DW_AT_decl_line : 140 +DW_AT_type : <0x119> +<2><20b> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x263): ifru_hwaddr +DW_AT_decl_file : 5 +DW_AT_decl_line : 141 +DW_AT_type : <0x119> +<2><216> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8c): ifru_flags +DW_AT_decl_file : 5 +DW_AT_decl_line : 142 +DW_AT_type : <0x24> +<2><221> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d1): ifru_ivalue +DW_AT_decl_file : 5 +DW_AT_decl_line : 143 +DW_AT_type : <0x2b> +<2><22c> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x97): ifru_mtu +DW_AT_decl_file : 5 +DW_AT_decl_line : 144 +DW_AT_type : <0x2b> +<2><237> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x58): ifru_map +DW_AT_decl_file : 5 +DW_AT_decl_line : 145 +DW_AT_type : <0x152> +<2><242> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x213): ifru_slave +DW_AT_decl_file : 5 +DW_AT_decl_line : 146 +DW_AT_type : <0x1c7> +<2><24d> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c4): ifru_newname +DW_AT_decl_file : 5 +DW_AT_decl_line : 147 +DW_AT_type : <0x1c7> +<2><258> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x143): ifru_data +DW_AT_decl_file : 5 +DW_AT_decl_line : 148 +DW_AT_type : <0x6a> +<1><264> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x21e): ifreq +DW_AT_byte_size : 32 +DW_AT_decl_file : 5 +DW_AT_decl_line : 126 +DW_AT_sibling : <0x28d> +<2><270> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x157): ifr_ifrn +DW_AT_decl_file : 5 +DW_AT_decl_line : 133 +DW_AT_type : <0x1b3> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><27e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x180): ifr_ifru +DW_AT_decl_file : 5 +DW_AT_decl_line : 149 +DW_AT_type : <0x1d7> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><28d> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xb2): struct_ifreq +DW_AT_decl_file : 6 +DW_AT_decl_line : 40 +DW_AT_type : <0x264> +<1><298> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc6): current_wordsize +DW_AT_decl_file : 7 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2a6> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xbf): sysent +DW_AT_decl_file : 7 +DW_AT_decl_line : 892 +DW_AT_type : <0xfc> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2b4> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1ba): nsyscalls +DW_AT_decl_file : 7 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2c2> +Abbrev Number: 17 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe): mpers_target_var +DW_AT_decl_file : 6 +DW_AT_decl_line : 42 +DW_AT_type : <0x28d> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_ifreq.h b/mpers-m32/struct_ifreq.h new file mode 100644 index 000000000..0250cbc4c --- /dev/null +++ b/mpers-m32/struct_ifreq.h @@ -0,0 +1,46 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +union { +char ifrn_name[16]; +} ifr_ifrn; +union { +struct { +uint16_t sa_family; +char sa_data[14]; +} ATTRIBUTE_PACKED ifru_addr; +struct { +uint16_t sa_family; +char sa_data[14]; +} ATTRIBUTE_PACKED ifru_dstaddr; +struct { +uint16_t sa_family; +char sa_data[14]; +} ATTRIBUTE_PACKED ifru_broadaddr; +struct { +uint16_t sa_family; +char sa_data[14]; +} ATTRIBUTE_PACKED ifru_netmask; +struct { +uint16_t sa_family; +char sa_data[14]; +} ATTRIBUTE_PACKED ifru_hwaddr; +int16_t ifru_flags; +int32_t ifru_ivalue; +int32_t ifru_mtu; +struct { +uint32_t mem_start; +uint32_t mem_end; +uint16_t base_addr; +unsigned char irq; +unsigned char dma; +unsigned char port; +unsigned char mpers_end_filler_1[3]; +} ATTRIBUTE_PACKED ifru_map; +char ifru_slave[16]; +char ifru_newname[16]; +mpers_ptr_t ifru_data; +} ifr_ifru; +} ATTRIBUTE_PACKED m32_struct_ifreq; +#define MPERS_m32_struct_ifreq m32_struct_ifreq diff --git a/mpers-m32/struct_loop_info.c b/mpers-m32/struct_loop_info.c new file mode 100644 index 000000000..25d76e1ba --- /dev/null +++ b/mpers-m32/struct_loop_info.c @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2012 The Chromium OS Authors. + * Written by Mike Frysinger . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include +#include + +typedef struct loop_info struct_loop_info; + + +struct_loop_info mpers_target_var; diff --git a/mpers-m32/struct_loop_info.d1 b/mpers-m32/struct_loop_info.d1 new file mode 100644 index 000000000..7213b1da3 --- /dev/null +++ b/mpers-m32/struct_loop_info.d1 @@ -0,0 +1,272 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x243 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xf6): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x229): mpers-m32/struct_loop_info.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x18a): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x20b): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1f8): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1ce): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x95): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x23): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x14d): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x76): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x202): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xa3): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1c5): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x168): char + <1><71>: Abbrev Number: 4 (DW_TAG_array_type) + <72> DW_AT_type : <0x6a> + <76> DW_AT_sibling : <0x81> + <2><7a>: Abbrev Number: 5 (DW_TAG_subrange_type) + <7b> DW_AT_type : <0x63> + <7f> DW_AT_upper_bound : 3 + <2><80>: Abbrev Number: 0 + <1><81>: Abbrev Number: 6 (DW_TAG_pointer_type) + <82> DW_AT_byte_size : 4 + <83> DW_AT_type : <0x87> + <1><87>: Abbrev Number: 7 (DW_TAG_const_type) + <88> DW_AT_type : <0x6a> + <1><8c>: Abbrev Number: 8 (DW_TAG_typedef) + <8d> DW_AT_name : (indirect string, offset: 0xbc): __kernel_old_dev_t + <91> DW_AT_decl_file : 2 + <92> DW_AT_decl_line : 20 + <93> DW_AT_type : <0x40> + <1><97>: Abbrev Number: 9 (DW_TAG_structure_type) + <98> DW_AT_name : (indirect string, offset: 0xb5): sysent + <9c> DW_AT_byte_size : 20 + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 4 + <9f> DW_AT_sibling : <0xea> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xf0): nargs + DW_AT_decl_file : 1 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x6c): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 11 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x220): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xf5> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x36): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x81> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 12 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xf5> + <2>: Abbrev Number: 13 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 6 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xea> + <1>: Abbrev Number: 8 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x15a): struct_sysent + <100> DW_AT_decl_file : 1 + <101> DW_AT_decl_line : 10 + <102> DW_AT_type : <0x97> + <1><106>: Abbrev Number: 6 (DW_TAG_pointer_type) + <107> DW_AT_byte_size : 4 + <108> DW_AT_type : <0x10c> + <1><10c>: Abbrev Number: 7 (DW_TAG_const_type) + <10d> DW_AT_type : <0xfb> + <1><111>: Abbrev Number: 2 (DW_TAG_base_type) + <112> DW_AT_byte_size : 1 + <113> DW_AT_encoding : 2 (boolean) + <114> DW_AT_name : (indirect string, offset: 0x14): _Bool + <1><118>: Abbrev Number: 9 (DW_TAG_structure_type) + <119> DW_AT_name : (indirect string, offset: 0xa): loop_info + <11d> DW_AT_byte_size : 140 + <11e> DW_AT_decl_file : 3 + <11f> DW_AT_decl_line : 30 + <120> DW_AT_sibling : <0x1cf> + <2><124>: Abbrev Number: 10 (DW_TAG_member) + <125> DW_AT_name : (indirect string, offset: 0x1ee): lo_number + <129> DW_AT_decl_file : 3 + <12a> DW_AT_decl_line : 31 + <12b> DW_AT_type : <0x2b> + <12f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><132>: Abbrev Number: 10 (DW_TAG_member) + <133> DW_AT_name : (indirect string, offset: 0x1e4): lo_device + <137> DW_AT_decl_file : 3 + <138> DW_AT_decl_line : 32 + <139> DW_AT_type : <0x8c> + <13d> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><140>: Abbrev Number: 10 (DW_TAG_member) + <141> DW_AT_name : (indirect string, offset: 0x217): lo_inode + <145> DW_AT_decl_file : 3 + <146> DW_AT_decl_line : 33 + <147> DW_AT_type : <0x5c> + <14b> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><14e>: Abbrev Number: 10 (DW_TAG_member) + <14f> DW_AT_name : (indirect string, offset: 0x3f): lo_rdevice + <153> DW_AT_decl_file : 3 + <154> DW_AT_decl_line : 34 + <155> DW_AT_type : <0x8c> + <159> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><15c>: Abbrev Number: 10 (DW_TAG_member) + <15d> DW_AT_name : (indirect string, offset: 0x0): lo_offset + <161> DW_AT_decl_file : 3 + <162> DW_AT_decl_line : 35 + <163> DW_AT_type : <0x2b> + <167> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><16a>: Abbrev Number: 10 (DW_TAG_member) + <16b> DW_AT_name : (indirect string, offset: 0xcf): lo_encrypt_type + <16f> DW_AT_decl_file : 3 + <170> DW_AT_decl_line : 36 + <171> DW_AT_type : <0x2b> + <175> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><178>: Abbrev Number: 10 (DW_TAG_member) + <179> DW_AT_name : (indirect string, offset: 0x176): lo_encrypt_key_size + <17d> DW_AT_decl_file : 3 + <17e> DW_AT_decl_line : 37 + <17f> DW_AT_type : <0x2b> + <183> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><186>: Abbrev Number: 10 (DW_TAG_member) + <187> DW_AT_name : (indirect string, offset: 0x16d): lo_flags + <18b> DW_AT_decl_file : 3 + <18c> DW_AT_decl_line : 38 + <18d> DW_AT_type : <0x2b> + <191> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><194>: Abbrev Number: 10 (DW_TAG_member) + <195> DW_AT_name : (indirect string, offset: 0x8d): lo_name + <199> DW_AT_decl_file : 3 + <19a> DW_AT_decl_line : 39 + <19b> DW_AT_type : <0x1cf> + <19f> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1a2>: Abbrev Number: 10 (DW_TAG_member) + <1a3> DW_AT_name : (indirect string, offset: 0x13e): lo_encrypt_key + <1a7> DW_AT_decl_file : 3 + <1a8> DW_AT_decl_line : 40 + <1a9> DW_AT_type : <0x1df> + <1ad> DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) + <2><1b0>: Abbrev Number: 10 (DW_TAG_member) + <1b1> DW_AT_name : (indirect string, offset: 0x1dc): lo_init + <1b5> DW_AT_decl_file : 3 + <1b6> DW_AT_decl_line : 41 + <1b7> DW_AT_type : <0x1ef> + <1bb> DW_AT_data_member_location: 3 byte block: 23 80 1 (DW_OP_plus_uconst: 128) + <2><1bf>: Abbrev Number: 10 (DW_TAG_member) + <1c0> DW_AT_name : (indirect string, offset: 0x1a): reserved + <1c4> DW_AT_decl_file : 3 + <1c5> DW_AT_decl_line : 42 + <1c6> DW_AT_type : <0x71> + <1ca> DW_AT_data_member_location: 3 byte block: 23 88 1 (DW_OP_plus_uconst: 136) + <2><1ce>: Abbrev Number: 0 + <1><1cf>: Abbrev Number: 4 (DW_TAG_array_type) + <1d0> DW_AT_type : <0x6a> + <1d4> DW_AT_sibling : <0x1df> + <2><1d8>: Abbrev Number: 5 (DW_TAG_subrange_type) + <1d9> DW_AT_type : <0x63> + <1dd> DW_AT_upper_bound : 63 + <2><1de>: Abbrev Number: 0 + <1><1df>: Abbrev Number: 4 (DW_TAG_array_type) + <1e0> DW_AT_type : <0x39> + <1e4> DW_AT_sibling : <0x1ef> + <2><1e8>: Abbrev Number: 5 (DW_TAG_subrange_type) + <1e9> DW_AT_type : <0x63> + <1ed> DW_AT_upper_bound : 31 + <2><1ee>: Abbrev Number: 0 + <1><1ef>: Abbrev Number: 4 (DW_TAG_array_type) + <1f0> DW_AT_type : <0x5c> + <1f4> DW_AT_sibling : <0x1ff> + <2><1f8>: Abbrev Number: 5 (DW_TAG_subrange_type) + <1f9> DW_AT_type : <0x63> + <1fd> DW_AT_upper_bound : 1 + <2><1fe>: Abbrev Number: 0 + <1><1ff>: Abbrev Number: 8 (DW_TAG_typedef) + <200> DW_AT_name : (indirect string, offset: 0x4a): struct_loop_info + <204> DW_AT_decl_file : 4 + <205> DW_AT_decl_line : 32 + <206> DW_AT_type : <0x118> + <1><20a>: Abbrev Number: 14 (DW_TAG_variable) + <20b> DW_AT_name : (indirect string, offset: 0xdf): current_wordsize + <20f> DW_AT_decl_file : 5 + <210> DW_AT_decl_line : 757 + <212> DW_AT_type : <0x47> + <216> DW_AT_external : 1 + <217> DW_AT_declaration : 1 + <1><218>: Abbrev Number: 14 (DW_TAG_variable) + <219> DW_AT_name : (indirect string, offset: 0xb5): sysent + <21d> DW_AT_decl_file : 5 + <21e> DW_AT_decl_line : 892 + <220> DW_AT_type : <0x106> + <224> DW_AT_external : 1 + <225> DW_AT_declaration : 1 + <1><226>: Abbrev Number: 14 (DW_TAG_variable) + <227> DW_AT_name : (indirect string, offset: 0x1bb): nsyscalls + <22b> DW_AT_decl_file : 5 + <22c> DW_AT_decl_line : 903 + <22e> DW_AT_type : <0x47> + <232> DW_AT_external : 1 + <233> DW_AT_declaration : 1 + <1><234>: Abbrev Number: 15 (DW_TAG_variable) + <235> DW_AT_name : (indirect string, offset: 0x5b): mpers_target_var + <239> DW_AT_decl_file : 4 + <23a> DW_AT_decl_line : 35 + <23b> DW_AT_type : <0x1ff> + <23f> DW_AT_external : 1 + <240> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><246>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_loop_info.d2 b/mpers-m32/struct_loop_info.d2 new file mode 100644 index 000000000..00b3dd639 --- /dev/null +++ b/mpers-m32/struct_loop_info.d2 @@ -0,0 +1,304 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x20b): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1f8): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1ce): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x95): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x23): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x14d): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x76): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x202): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xa3): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c5): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x168): char +<1><71> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x81> +<2><7a> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 3 +<1><81> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x87> +<1><87> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><8c> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xbc): __kernel_old_dev_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 20 +DW_AT_type : <0x40> +<1><97> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xb5): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xea> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf0): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6c): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x220): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xf5> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x36): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x81> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 12 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xf5> +<2> +Abbrev Number: 13 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xea> +<1> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x15a): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x97> +<1><106> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x10c> +<1><10c> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0xfb> +<1><111> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x14): _Bool +<1><118> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xa): loop_info +DW_AT_byte_size : 140 +DW_AT_decl_file : 3 +DW_AT_decl_line : 30 +DW_AT_sibling : <0x1cf> +<2><124> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ee): lo_number +DW_AT_decl_file : 3 +DW_AT_decl_line : 31 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><132> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e4): lo_device +DW_AT_decl_file : 3 +DW_AT_decl_line : 32 +DW_AT_type : <0x8c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><140> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x217): lo_inode +DW_AT_decl_file : 3 +DW_AT_decl_line : 33 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><14e> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3f): lo_rdevice +DW_AT_decl_file : 3 +DW_AT_decl_line : 34 +DW_AT_type : <0x8c> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><15c> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): lo_offset +DW_AT_decl_file : 3 +DW_AT_decl_line : 35 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><16a> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xcf): lo_encrypt_type +DW_AT_decl_file : 3 +DW_AT_decl_line : 36 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><178> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x176): lo_encrypt_key_size +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><186> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16d): lo_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 38 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><194> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8d): lo_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 39 +DW_AT_type : <0x1cf> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1a2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x13e): lo_encrypt_key +DW_AT_decl_file : 3 +DW_AT_decl_line : 40 +DW_AT_type : <0x1df> +DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) +<2><1b0> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1dc): lo_init +DW_AT_decl_file : 3 +DW_AT_decl_line : 41 +DW_AT_type : <0x1ef> +DW_AT_data_member_location: 3 byte block: 23 80 1 (DW_OP_plus_uconst: 128) +<2><1bf> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 42 +DW_AT_type : <0x71> +DW_AT_data_member_location: 3 byte block: 23 88 1 (DW_OP_plus_uconst: 136) +<1><1cf> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x1df> +<2><1d8> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 63 +<1><1df> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x39> +DW_AT_sibling : <0x1ef> +<2><1e8> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 31 +<1><1ef> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x5c> +DW_AT_sibling : <0x1ff> +<2><1f8> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><1ff> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x4a): struct_loop_info +DW_AT_decl_file : 4 +DW_AT_decl_line : 32 +DW_AT_type : <0x118> +<1><20a> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xdf): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><218> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xb5): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x106> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><226> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1bb): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><234> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x5b): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 35 +DW_AT_type : <0x1ff> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_loop_info.h b/mpers-m32/struct_loop_info.h new file mode 100644 index 000000000..3f9478555 --- /dev/null +++ b/mpers-m32/struct_loop_info.h @@ -0,0 +1,20 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t lo_number; +uint16_t lo_device; +unsigned char mpers_filler_1[2]; +uint32_t lo_inode; +uint16_t lo_rdevice; +unsigned char mpers_filler_2[2]; +int32_t lo_offset; +int32_t lo_encrypt_type; +int32_t lo_encrypt_key_size; +int32_t lo_flags; +char lo_name[64]; +unsigned char lo_encrypt_key[32]; +uint32_t lo_init[2]; +char reserved[4]; +} ATTRIBUTE_PACKED m32_struct_loop_info; +#define MPERS_m32_struct_loop_info m32_struct_loop_info diff --git a/mpers-m32/struct_mmsghdr.c b/mpers-m32/struct_mmsghdr.c new file mode 100644 index 000000000..73bc16522 --- /dev/null +++ b/mpers-m32/struct_mmsghdr.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "msghdr.h" +typedef struct mmsghdr struct_mmsghdr; + +struct_mmsghdr mpers_target_var; diff --git a/mpers-m32/struct_mmsghdr.d1 b/mpers-m32/struct_mmsghdr.d1 new file mode 100644 index 000000000..a469e06cb --- /dev/null +++ b/mpers-m32/struct_mmsghdr.d1 @@ -0,0 +1,267 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x22c (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xe4): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x1d5): mpers-m32/struct_mmsghdr.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x16c): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x221): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1f0): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1bb): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x94): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x3f): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x135): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x7d): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x202): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xa2): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1b2): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x150): char + <1><73>: Abbrev Number: 5 (DW_TAG_typedef) + <74> DW_AT_name : (indirect string, offset: 0x215): __socklen_t + <78> DW_AT_decl_file : 1 + <79> DW_AT_decl_line : 189 + <7a> DW_AT_type : <0x47> + <1><7e>: Abbrev Number: 5 (DW_TAG_typedef) + <7f> DW_AT_name : (indirect string, offset: 0xf): size_t + <83> DW_AT_decl_file : 2 + <84> DW_AT_decl_line : 212 + <85> DW_AT_type : <0x47> + <1><89>: Abbrev Number: 6 (DW_TAG_typedef) + <8a> DW_AT_name : (indirect string, offset: 0x20b): socklen_t + <8e> DW_AT_decl_file : 3 + <8f> DW_AT_decl_line : 274 + <91> DW_AT_type : <0x73> + <1><95>: Abbrev Number: 7 (DW_TAG_pointer_type) + <96> DW_AT_byte_size : 4 + <97> DW_AT_type : <0x9b> + <1><9b>: Abbrev Number: 8 (DW_TAG_const_type) + <9c> DW_AT_type : <0x6c> + <1>: Abbrev Number: 9 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xb4): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 4 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xf3> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xd8): nargs + DW_AT_decl_file : 4 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x73): sys_flags + DW_AT_decl_file : 4 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 11 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 4 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x22d): sys_func + DW_AT_decl_file : 4 + DW_AT_decl_line : 8 +
DW_AT_type : <0xfe> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x52): sys_name + DW_AT_decl_file : 4 + DW_AT_decl_line : 9 + DW_AT_type : <0x95> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 12 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xfe> + <2>: Abbrev Number: 13 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + <100> DW_AT_type : <0xf3> + <1><104>: Abbrev Number: 5 (DW_TAG_typedef) + <105> DW_AT_name : (indirect string, offset: 0x142): struct_sysent + <109> DW_AT_decl_file : 4 + <10a> DW_AT_decl_line : 10 + <10b> DW_AT_type : <0xa0> + <1><10f>: Abbrev Number: 7 (DW_TAG_pointer_type) + <110> DW_AT_byte_size : 4 + <111> DW_AT_type : <0x115> + <1><115>: Abbrev Number: 8 (DW_TAG_const_type) + <116> DW_AT_type : <0x104> + <1><11a>: Abbrev Number: 2 (DW_TAG_base_type) + <11b> DW_AT_byte_size : 1 + <11c> DW_AT_encoding : 2 (boolean) + <11d> DW_AT_name : (indirect string, offset: 0x27): _Bool + <1><121>: Abbrev Number: 9 (DW_TAG_structure_type) + <122> DW_AT_name : (indirect string, offset: 0xde): iovec + <126> DW_AT_byte_size : 8 + <127> DW_AT_decl_file : 5 + <128> DW_AT_decl_line : 43 + <129> DW_AT_sibling : <0x14a> + <2><12d>: Abbrev Number: 10 (DW_TAG_member) + <12e> DW_AT_name : (indirect string, offset: 0x12c): iov_base + <132> DW_AT_decl_file : 5 + <133> DW_AT_decl_line : 45 + <134> DW_AT_type : <0x6a> + <138> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><13b>: Abbrev Number: 10 (DW_TAG_member) + <13c> DW_AT_name : (indirect string, offset: 0x1f): iov_len + <140> DW_AT_decl_file : 5 + <141> DW_AT_decl_line : 46 + <142> DW_AT_type : <0x7e> + <146> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><149>: Abbrev Number: 0 + <1><14a>: Abbrev Number: 9 (DW_TAG_structure_type) + <14b> DW_AT_name : (indirect string, offset: 0x5b): msghdr + <14f> DW_AT_byte_size : 28 + <150> DW_AT_decl_file : 6 + <151> DW_AT_decl_line : 224 + <152> DW_AT_sibling : <0x1b9> + <2><156>: Abbrev Number: 10 (DW_TAG_member) + <157> DW_AT_name : (indirect string, offset: 0x16): msg_name + <15b> DW_AT_decl_file : 6 + <15c> DW_AT_decl_line : 226 + <15d> DW_AT_type : <0x6a> + <161> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><164>: Abbrev Number: 10 (DW_TAG_member) + <165> DW_AT_name : (indirect string, offset: 0x1c9): msg_namelen + <169> DW_AT_decl_file : 6 + <16a> DW_AT_decl_line : 227 + <16b> DW_AT_type : <0x89> + <16f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><172>: Abbrev Number: 10 (DW_TAG_member) + <173> DW_AT_name : (indirect string, offset: 0x155): msg_iov + <177> DW_AT_decl_file : 6 + <178> DW_AT_decl_line : 229 + <179> DW_AT_type : <0x1b9> + <17d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><180>: Abbrev Number: 10 (DW_TAG_member) + <181> DW_AT_name : (indirect string, offset: 0x1a7): msg_iovlen + <185> DW_AT_decl_file : 6 + <186> DW_AT_decl_line : 230 + <187> DW_AT_type : <0x7e> + <18b> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><18e>: Abbrev Number: 10 (DW_TAG_member) + <18f> DW_AT_name : (indirect string, offset: 0xcc): msg_control + <193> DW_AT_decl_file : 6 + <194> DW_AT_decl_line : 232 + <195> DW_AT_type : <0x6a> + <199> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><19c>: Abbrev Number: 10 (DW_TAG_member) + <19d> DW_AT_name : (indirect string, offset: 0x0): msg_controllen + <1a1> DW_AT_decl_file : 6 + <1a2> DW_AT_decl_line : 233 + <1a3> DW_AT_type : <0x7e> + <1a7> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><1aa>: Abbrev Number: 10 (DW_TAG_member) + <1ab> DW_AT_name : (indirect string, offset: 0x35): msg_flags + <1af> DW_AT_decl_file : 6 + <1b0> DW_AT_decl_line : 238 + <1b1> DW_AT_type : <0x2b> + <1b5> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1b8>: Abbrev Number: 0 + <1><1b9>: Abbrev Number: 7 (DW_TAG_pointer_type) + <1ba> DW_AT_byte_size : 4 + <1bb> DW_AT_type : <0x121> + <1><1bf>: Abbrev Number: 9 (DW_TAG_structure_type) + <1c0> DW_AT_name : (indirect string, offset: 0x1fa): mmsghdr + <1c4> DW_AT_byte_size : 32 + <1c5> DW_AT_decl_file : 7 + <1c6> DW_AT_decl_line : 101 + <1c7> DW_AT_sibling : <0x1e8> + <2><1cb>: Abbrev Number: 10 (DW_TAG_member) + <1cc> DW_AT_name : (indirect string, offset: 0x2d): msg_hdr + <1d0> DW_AT_decl_file : 7 + <1d1> DW_AT_decl_line : 103 + <1d2> DW_AT_type : <0x14a> + <1d6> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1d9>: Abbrev Number: 10 (DW_TAG_member) + <1da> DW_AT_name : (indirect string, offset: 0x236): msg_len + <1de> DW_AT_decl_file : 7 + <1df> DW_AT_decl_line : 104 + <1e0> DW_AT_type : <0x47> + <1e4> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><1e7>: Abbrev Number: 0 + <1><1e8>: Abbrev Number: 5 (DW_TAG_typedef) + <1e9> DW_AT_name : (indirect string, offset: 0x15d): struct_mmsghdr + <1ed> DW_AT_decl_file : 8 + <1ee> DW_AT_decl_line : 32 + <1ef> DW_AT_type : <0x1bf> + <1><1f3>: Abbrev Number: 14 (DW_TAG_variable) + <1f4> DW_AT_name : (indirect string, offset: 0xbb): current_wordsize + <1f8> DW_AT_decl_file : 9 + <1f9> DW_AT_decl_line : 757 + <1fb> DW_AT_type : <0x47> + <1ff> DW_AT_external : 1 + <200> DW_AT_declaration : 1 + <1><201>: Abbrev Number: 14 (DW_TAG_variable) + <202> DW_AT_name : (indirect string, offset: 0xb4): sysent + <206> DW_AT_decl_file : 9 + <207> DW_AT_decl_line : 892 + <209> DW_AT_type : <0x10f> + <20d> DW_AT_external : 1 + <20e> DW_AT_declaration : 1 + <1><20f>: Abbrev Number: 14 (DW_TAG_variable) + <210> DW_AT_name : (indirect string, offset: 0x19d): nsyscalls + <214> DW_AT_decl_file : 9 + <215> DW_AT_decl_line : 903 + <217> DW_AT_type : <0x47> + <21b> DW_AT_external : 1 + <21c> DW_AT_declaration : 1 + <1><21d>: Abbrev Number: 15 (DW_TAG_variable) + <21e> DW_AT_name : (indirect string, offset: 0x62): mpers_target_var + <222> DW_AT_decl_file : 8 + <223> DW_AT_decl_line : 34 + <224> DW_AT_type : <0x1e8> + <228> DW_AT_external : 1 + <229> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><22f>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_mmsghdr.d2 b/mpers-m32/struct_mmsghdr.d2 new file mode 100644 index 000000000..a082b707b --- /dev/null +++ b/mpers-m32/struct_mmsghdr.d2 @@ -0,0 +1,298 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x221): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1f0): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1bb): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x94): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x3f): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x135): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x7d): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x202): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xa2): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1b2): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x150): char +<1><73> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x215): __socklen_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 189 +DW_AT_type : <0x47> +<1><7e> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xf): size_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 212 +DW_AT_type : <0x47> +<1><89> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x20b): socklen_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 274 +DW_AT_type : <0x73> +<1><95> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x9b> +<1><9b> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xb4): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 4 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xf3> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd8): nargs +DW_AT_decl_file : 4 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x73): sys_flags +DW_AT_decl_file : 4 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 4 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22d): sys_func +DW_AT_decl_file : 4 +DW_AT_decl_line : 8 +DW_AT_type : <0xfe> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x52): sys_name +DW_AT_decl_file : 4 +DW_AT_decl_line : 9 +DW_AT_type : <0x95> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 12 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xfe> +<2> +Abbrev Number: 13 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1><104> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x142): struct_sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 10 +DW_AT_type : <0xa0> +<1><10f> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x115> +<1><115> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x104> +<1><11a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x27): _Bool +<1><121> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xde): iovec +DW_AT_byte_size : 8 +DW_AT_decl_file : 5 +DW_AT_decl_line : 43 +DW_AT_sibling : <0x14a> +<2><12d> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x12c): iov_base +DW_AT_decl_file : 5 +DW_AT_decl_line : 45 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><13b> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f): iov_len +DW_AT_decl_file : 5 +DW_AT_decl_line : 46 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><14a> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x5b): msghdr +DW_AT_byte_size : 28 +DW_AT_decl_file : 6 +DW_AT_decl_line : 224 +DW_AT_sibling : <0x1b9> +<2><156> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16): msg_name +DW_AT_decl_file : 6 +DW_AT_decl_line : 226 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><164> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c9): msg_namelen +DW_AT_decl_file : 6 +DW_AT_decl_line : 227 +DW_AT_type : <0x89> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><172> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x155): msg_iov +DW_AT_decl_file : 6 +DW_AT_decl_line : 229 +DW_AT_type : <0x1b9> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><180> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a7): msg_iovlen +DW_AT_decl_file : 6 +DW_AT_decl_line : 230 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><18e> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xcc): msg_control +DW_AT_decl_file : 6 +DW_AT_decl_line : 232 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><19c> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): msg_controllen +DW_AT_decl_file : 6 +DW_AT_decl_line : 233 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><1aa> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x35): msg_flags +DW_AT_decl_file : 6 +DW_AT_decl_line : 238 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<1><1b9> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x121> +<1><1bf> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1fa): mmsghdr +DW_AT_byte_size : 32 +DW_AT_decl_file : 7 +DW_AT_decl_line : 101 +DW_AT_sibling : <0x1e8> +<2><1cb> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d): msg_hdr +DW_AT_decl_file : 7 +DW_AT_decl_line : 103 +DW_AT_type : <0x14a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1d9> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x236): msg_len +DW_AT_decl_file : 7 +DW_AT_decl_line : 104 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<1><1e8> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x15d): struct_mmsghdr +DW_AT_decl_file : 8 +DW_AT_decl_line : 32 +DW_AT_type : <0x1bf> +<1><1f3> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xbb): current_wordsize +DW_AT_decl_file : 9 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><201> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xb4): sysent +DW_AT_decl_file : 9 +DW_AT_decl_line : 892 +DW_AT_type : <0x10f> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><20f> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x19d): nsyscalls +DW_AT_decl_file : 9 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><21d> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x62): mpers_target_var +DW_AT_decl_file : 8 +DW_AT_decl_line : 34 +DW_AT_type : <0x1e8> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_mmsghdr.h b/mpers-m32/struct_mmsghdr.h new file mode 100644 index 000000000..2fff8042b --- /dev/null +++ b/mpers-m32/struct_mmsghdr.h @@ -0,0 +1,16 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +struct { +mpers_ptr_t msg_name; +uint32_t msg_namelen; +mpers_ptr_t msg_iov; +uint32_t msg_iovlen; +mpers_ptr_t msg_control; +uint32_t msg_controllen; +int32_t msg_flags; +} ATTRIBUTE_PACKED msg_hdr; +uint32_t msg_len; +} ATTRIBUTE_PACKED m32_struct_mmsghdr; +#define MPERS_m32_struct_mmsghdr m32_struct_mmsghdr diff --git a/mpers-m32/struct_msghdr.c b/mpers-m32/struct_msghdr.c new file mode 100644 index 000000000..0100d7667 --- /dev/null +++ b/mpers-m32/struct_msghdr.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "msghdr.h" +typedef struct msghdr struct_msghdr; + +struct_msghdr mpers_target_var; diff --git a/mpers-m32/struct_msghdr.d1 b/mpers-m32/struct_msghdr.d1 new file mode 100644 index 000000000..b3a88be04 --- /dev/null +++ b/mpers-m32/struct_msghdr.d1 @@ -0,0 +1,248 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x203 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x104): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x2d): mpers-m32/struct_msghdr.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x17d): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x20f): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1e6): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1cc): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xa6): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x51): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x155): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x8f): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1f0): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xb4): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1c3): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x170): char + <1><73>: Abbrev Number: 5 (DW_TAG_typedef) + <74> DW_AT_name : (indirect string, offset: 0x203): __socklen_t + <78> DW_AT_decl_file : 1 + <79> DW_AT_decl_line : 189 + <7a> DW_AT_type : <0x47> + <1><7e>: Abbrev Number: 5 (DW_TAG_typedef) + <7f> DW_AT_name : (indirect string, offset: 0xf): size_t + <83> DW_AT_decl_file : 2 + <84> DW_AT_decl_line : 212 + <85> DW_AT_type : <0x47> + <1><89>: Abbrev Number: 6 (DW_TAG_typedef) + <8a> DW_AT_name : (indirect string, offset: 0x1f9): socklen_t + <8e> DW_AT_decl_file : 3 + <8f> DW_AT_decl_line : 274 + <91> DW_AT_type : <0x73> + <1><95>: Abbrev Number: 7 (DW_TAG_pointer_type) + <96> DW_AT_byte_size : 4 + <97> DW_AT_type : <0x9b> + <1><9b>: Abbrev Number: 8 (DW_TAG_const_type) + <9c> DW_AT_type : <0x6c> + <1>: Abbrev Number: 9 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xc6): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 4 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xf3> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xf8): nargs + DW_AT_decl_file : 4 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x85): sys_flags + DW_AT_decl_file : 4 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 11 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 4 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x21b): sys_func + DW_AT_decl_file : 4 + DW_AT_decl_line : 8 +
DW_AT_type : <0xfe> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x64): sys_name + DW_AT_decl_file : 4 + DW_AT_decl_line : 9 + DW_AT_type : <0x95> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 12 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xfe> + <2>: Abbrev Number: 13 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + <100> DW_AT_type : <0xf3> + <1><104>: Abbrev Number: 5 (DW_TAG_typedef) + <105> DW_AT_name : (indirect string, offset: 0x162): struct_sysent + <109> DW_AT_decl_file : 4 + <10a> DW_AT_decl_line : 10 + <10b> DW_AT_type : <0xa0> + <1><10f>: Abbrev Number: 7 (DW_TAG_pointer_type) + <110> DW_AT_byte_size : 4 + <111> DW_AT_type : <0x115> + <1><115>: Abbrev Number: 8 (DW_TAG_const_type) + <116> DW_AT_type : <0x104> + <1><11a>: Abbrev Number: 2 (DW_TAG_base_type) + <11b> DW_AT_byte_size : 1 + <11c> DW_AT_encoding : 2 (boolean) + <11d> DW_AT_name : (indirect string, offset: 0x1f): _Bool + <1><121>: Abbrev Number: 9 (DW_TAG_structure_type) + <122> DW_AT_name : (indirect string, offset: 0xfe): iovec + <126> DW_AT_byte_size : 8 + <127> DW_AT_decl_file : 5 + <128> DW_AT_decl_line : 43 + <129> DW_AT_sibling : <0x14a> + <2><12d>: Abbrev Number: 10 (DW_TAG_member) + <12e> DW_AT_name : (indirect string, offset: 0x14c): iov_base + <132> DW_AT_decl_file : 5 + <133> DW_AT_decl_line : 45 + <134> DW_AT_type : <0x6a> + <138> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><13b>: Abbrev Number: 10 (DW_TAG_member) + <13c> DW_AT_name : (indirect string, offset: 0x25): iov_len + <140> DW_AT_decl_file : 5 + <141> DW_AT_decl_line : 46 + <142> DW_AT_type : <0x7e> + <146> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><149>: Abbrev Number: 0 + <1><14a>: Abbrev Number: 9 (DW_TAG_structure_type) + <14b> DW_AT_name : (indirect string, offset: 0x6d): msghdr + <14f> DW_AT_byte_size : 28 + <150> DW_AT_decl_file : 6 + <151> DW_AT_decl_line : 224 + <152> DW_AT_sibling : <0x1b9> + <2><156>: Abbrev Number: 10 (DW_TAG_member) + <157> DW_AT_name : (indirect string, offset: 0x16): msg_name + <15b> DW_AT_decl_file : 6 + <15c> DW_AT_decl_line : 226 + <15d> DW_AT_type : <0x6a> + <161> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><164>: Abbrev Number: 10 (DW_TAG_member) + <165> DW_AT_name : (indirect string, offset: 0x1da): msg_namelen + <169> DW_AT_decl_file : 6 + <16a> DW_AT_decl_line : 227 + <16b> DW_AT_type : <0x89> + <16f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><172>: Abbrev Number: 10 (DW_TAG_member) + <173> DW_AT_name : (indirect string, offset: 0x175): msg_iov + <177> DW_AT_decl_file : 6 + <178> DW_AT_decl_line : 229 + <179> DW_AT_type : <0x1b9> + <17d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><180>: Abbrev Number: 10 (DW_TAG_member) + <181> DW_AT_name : (indirect string, offset: 0x1b8): msg_iovlen + <185> DW_AT_decl_file : 6 + <186> DW_AT_decl_line : 230 + <187> DW_AT_type : <0x7e> + <18b> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><18e>: Abbrev Number: 10 (DW_TAG_member) + <18f> DW_AT_name : (indirect string, offset: 0xde): msg_control + <193> DW_AT_decl_file : 6 + <194> DW_AT_decl_line : 232 + <195> DW_AT_type : <0x6a> + <199> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><19c>: Abbrev Number: 10 (DW_TAG_member) + <19d> DW_AT_name : (indirect string, offset: 0x0): msg_controllen + <1a1> DW_AT_decl_file : 6 + <1a2> DW_AT_decl_line : 233 + <1a3> DW_AT_type : <0x7e> + <1a7> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><1aa>: Abbrev Number: 10 (DW_TAG_member) + <1ab> DW_AT_name : (indirect string, offset: 0x47): msg_flags + <1af> DW_AT_decl_file : 6 + <1b0> DW_AT_decl_line : 238 + <1b1> DW_AT_type : <0x2b> + <1b5> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1b8>: Abbrev Number: 0 + <1><1b9>: Abbrev Number: 7 (DW_TAG_pointer_type) + <1ba> DW_AT_byte_size : 4 + <1bb> DW_AT_type : <0x121> + <1><1bf>: Abbrev Number: 5 (DW_TAG_typedef) + <1c0> DW_AT_name : (indirect string, offset: 0xea): struct_msghdr + <1c4> DW_AT_decl_file : 7 + <1c5> DW_AT_decl_line : 32 + <1c6> DW_AT_type : <0x14a> + <1><1ca>: Abbrev Number: 14 (DW_TAG_variable) + <1cb> DW_AT_name : (indirect string, offset: 0xcd): current_wordsize + <1cf> DW_AT_decl_file : 8 + <1d0> DW_AT_decl_line : 757 + <1d2> DW_AT_type : <0x47> + <1d6> DW_AT_external : 1 + <1d7> DW_AT_declaration : 1 + <1><1d8>: Abbrev Number: 14 (DW_TAG_variable) + <1d9> DW_AT_name : (indirect string, offset: 0xc6): sysent + <1dd> DW_AT_decl_file : 8 + <1de> DW_AT_decl_line : 892 + <1e0> DW_AT_type : <0x10f> + <1e4> DW_AT_external : 1 + <1e5> DW_AT_declaration : 1 + <1><1e6>: Abbrev Number: 14 (DW_TAG_variable) + <1e7> DW_AT_name : (indirect string, offset: 0x1ae): nsyscalls + <1eb> DW_AT_decl_file : 8 + <1ec> DW_AT_decl_line : 903 + <1ee> DW_AT_type : <0x47> + <1f2> DW_AT_external : 1 + <1f3> DW_AT_declaration : 1 + <1><1f4>: Abbrev Number: 15 (DW_TAG_variable) + <1f5> DW_AT_name : (indirect string, offset: 0x74): mpers_target_var + <1f9> DW_AT_decl_file : 7 + <1fa> DW_AT_decl_line : 34 + <1fb> DW_AT_type : <0x1bf> + <1ff> DW_AT_external : 1 + <200> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><206>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_msghdr.d2 b/mpers-m32/struct_msghdr.d2 new file mode 100644 index 000000000..3f8f98491 --- /dev/null +++ b/mpers-m32/struct_msghdr.d2 @@ -0,0 +1,277 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x20f): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1e6): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1cc): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xa6): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x51): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x155): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x8f): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1f0): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb4): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c3): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x170): char +<1><73> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x203): __socklen_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 189 +DW_AT_type : <0x47> +<1><7e> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xf): size_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 212 +DW_AT_type : <0x47> +<1><89> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1f9): socklen_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 274 +DW_AT_type : <0x73> +<1><95> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x9b> +<1><9b> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc6): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 4 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xf3> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf8): nargs +DW_AT_decl_file : 4 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x85): sys_flags +DW_AT_decl_file : 4 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 4 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21b): sys_func +DW_AT_decl_file : 4 +DW_AT_decl_line : 8 +DW_AT_type : <0xfe> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x64): sys_name +DW_AT_decl_file : 4 +DW_AT_decl_line : 9 +DW_AT_type : <0x95> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 12 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xfe> +<2> +Abbrev Number: 13 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1><104> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x162): struct_sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 10 +DW_AT_type : <0xa0> +<1><10f> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x115> +<1><115> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x104> +<1><11a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x1f): _Bool +<1><121> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xfe): iovec +DW_AT_byte_size : 8 +DW_AT_decl_file : 5 +DW_AT_decl_line : 43 +DW_AT_sibling : <0x14a> +<2><12d> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14c): iov_base +DW_AT_decl_file : 5 +DW_AT_decl_line : 45 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><13b> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x25): iov_len +DW_AT_decl_file : 5 +DW_AT_decl_line : 46 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><14a> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x6d): msghdr +DW_AT_byte_size : 28 +DW_AT_decl_file : 6 +DW_AT_decl_line : 224 +DW_AT_sibling : <0x1b9> +<2><156> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16): msg_name +DW_AT_decl_file : 6 +DW_AT_decl_line : 226 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><164> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1da): msg_namelen +DW_AT_decl_file : 6 +DW_AT_decl_line : 227 +DW_AT_type : <0x89> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><172> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x175): msg_iov +DW_AT_decl_file : 6 +DW_AT_decl_line : 229 +DW_AT_type : <0x1b9> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><180> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b8): msg_iovlen +DW_AT_decl_file : 6 +DW_AT_decl_line : 230 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><18e> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xde): msg_control +DW_AT_decl_file : 6 +DW_AT_decl_line : 232 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><19c> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): msg_controllen +DW_AT_decl_file : 6 +DW_AT_decl_line : 233 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><1aa> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x47): msg_flags +DW_AT_decl_file : 6 +DW_AT_decl_line : 238 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<1><1b9> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x121> +<1><1bf> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xea): struct_msghdr +DW_AT_decl_file : 7 +DW_AT_decl_line : 32 +DW_AT_type : <0x14a> +<1><1ca> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xcd): current_wordsize +DW_AT_decl_file : 8 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1d8> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc6): sysent +DW_AT_decl_file : 8 +DW_AT_decl_line : 892 +DW_AT_type : <0x10f> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1e6> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1ae): nsyscalls +DW_AT_decl_file : 8 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1f4> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x74): mpers_target_var +DW_AT_decl_file : 7 +DW_AT_decl_line : 34 +DW_AT_type : <0x1bf> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/struct_msghdr.h b/mpers-m32/struct_msghdr.h new file mode 100644 index 000000000..fc171c0a3 --- /dev/null +++ b/mpers-m32/struct_msghdr.h @@ -0,0 +1,13 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +mpers_ptr_t msg_name; +uint32_t msg_namelen; +mpers_ptr_t msg_iov; +uint32_t msg_iovlen; +mpers_ptr_t msg_control; +uint32_t msg_controllen; +int32_t msg_flags; +} ATTRIBUTE_PACKED m32_struct_msghdr; +#define MPERS_m32_struct_msghdr m32_struct_msghdr diff --git a/mpers-m32/struct_mtd_oob_buf.c b/mpers-m32/struct_mtd_oob_buf.c new file mode 100644 index 000000000..f781ae5a4 --- /dev/null +++ b/mpers-m32/struct_mtd_oob_buf.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2012 Mike Frysinger + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include + +/* The mtd api changes quickly, so we have to keep a local copy */ +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) +# include "mtd-abi.h" +#else +# include +#endif + +typedef struct mtd_oob_buf struct_mtd_oob_buf; + +struct_mtd_oob_buf mpers_target_var; diff --git a/mpers-m32/struct_mtd_oob_buf.d1 b/mpers-m32/struct_mtd_oob_buf.d1 new file mode 100644 index 000000000..012c13628 --- /dev/null +++ b/mpers-m32/struct_mtd_oob_buf.d1 @@ -0,0 +1,193 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x189 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xab): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xf3): mpers-m32/struct_mtd_oob_buf.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x132): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1a9): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x190): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x176): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x73): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x12): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x112): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x5c): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1a0): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x81): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x16d): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x12d): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x93): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x19a): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x52): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1b5): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x25): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x11f): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x0): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x6): __u32 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 26 + <104> DW_AT_type : <0x47> + <1><108>: Abbrev Number: 6 (DW_TAG_structure_type) + <109> DW_AT_name : (indirect string, offset: 0x184): mtd_oob_buf + <10d> DW_AT_byte_size : 12 + <10e> DW_AT_decl_file : 3 + <10f> DW_AT_decl_line : 35 + <110> DW_AT_sibling : <0x13f> + <2><114>: Abbrev Number: 7 (DW_TAG_member) + <115> DW_AT_name : (indirect string, offset: 0xc): start + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 36 + <11b> DW_AT_type : <0xfd> + <11f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><122>: Abbrev Number: 7 (DW_TAG_member) + <123> DW_AT_name : (indirect string, offset: 0x1be): length + <127> DW_AT_decl_file : 3 + <128> DW_AT_decl_line : 37 + <129> DW_AT_type : <0xfd> + <12d> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><130>: Abbrev Number: 8 (DW_TAG_member) + <131> DW_AT_name : ptr + <135> DW_AT_decl_file : 3 + <136> DW_AT_decl_line : 38 + <137> DW_AT_type : <0x13f> + <13b> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><13e>: Abbrev Number: 0 + <1><13f>: Abbrev Number: 4 (DW_TAG_pointer_type) + <140> DW_AT_byte_size : 4 + <141> DW_AT_type : <0x39> + <1><145>: Abbrev Number: 11 (DW_TAG_typedef) + <146> DW_AT_name : (indirect string, offset: 0x2e): struct_mtd_oob_buf + <14a> DW_AT_decl_file : 4 + <14b> DW_AT_decl_line : 40 + <14c> DW_AT_type : <0x108> + <1><150>: Abbrev Number: 12 (DW_TAG_variable) + <151> DW_AT_name : (indirect string, offset: 0x9a): current_wordsize + <155> DW_AT_decl_file : 5 + <156> DW_AT_decl_line : 757 + <158> DW_AT_type : <0x47> + <15c> DW_AT_external : 1 + <15d> DW_AT_declaration : 1 + <1><15e>: Abbrev Number: 12 (DW_TAG_variable) + <15f> DW_AT_name : (indirect string, offset: 0x93): sysent + <163> DW_AT_decl_file : 5 + <164> DW_AT_decl_line : 892 + <166> DW_AT_type : <0xeb> + <16a> DW_AT_external : 1 + <16b> DW_AT_declaration : 1 + <1><16c>: Abbrev Number: 12 (DW_TAG_variable) + <16d> DW_AT_name : (indirect string, offset: 0x163): nsyscalls + <171> DW_AT_decl_file : 5 + <172> DW_AT_decl_line : 903 + <174> DW_AT_type : <0x47> + <178> DW_AT_external : 1 + <179> DW_AT_declaration : 1 + <1><17a>: Abbrev Number: 13 (DW_TAG_variable) + <17b> DW_AT_name : (indirect string, offset: 0x41): mpers_target_var + <17f> DW_AT_decl_file : 4 + <180> DW_AT_decl_line : 42 + <181> DW_AT_type : <0x145> + <185> DW_AT_external : 1 + <186> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><18c>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_mtd_oob_buf.d2 b/mpers-m32/struct_mtd_oob_buf.d2 new file mode 100644 index 000000000..45c4194b1 --- /dev/null +++ b/mpers-m32/struct_mtd_oob_buf.d2 @@ -0,0 +1,213 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1a9): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x190): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x176): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x73): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x12): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x112): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x5c): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a0): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x81): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x16d): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x12d): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x93): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x19a): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x52): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b5): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x25): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11f): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x0): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x6): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><108> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x184): mtd_oob_buf +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 35 +DW_AT_sibling : <0x13f> +<2><114> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc): start +DW_AT_decl_file : 3 +DW_AT_decl_line : 36 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><122> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1be): length +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><130> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : ptr +DW_AT_decl_file : 3 +DW_AT_decl_line : 38 +DW_AT_type : <0x13f> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><13f> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x39> +<1><145> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2e): struct_mtd_oob_buf +DW_AT_decl_file : 4 +DW_AT_decl_line : 40 +DW_AT_type : <0x108> +<1><150> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x9a): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><15e> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x93): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><16c> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x163): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><17a> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x41): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_type : <0x145> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/struct_mtd_oob_buf.h b/mpers-m32/struct_mtd_oob_buf.h new file mode 100644 index 000000000..c6a1b1eec --- /dev/null +++ b/mpers-m32/struct_mtd_oob_buf.h @@ -0,0 +1,9 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t start; +uint32_t length; +mpers_ptr_t ptr; +} ATTRIBUTE_PACKED m32_struct_mtd_oob_buf; +#define MPERS_m32_struct_mtd_oob_buf m32_struct_mtd_oob_buf diff --git a/mpers-m32/struct_rtc_pll_info.c b/mpers-m32/struct_rtc_pll_info.c new file mode 100644 index 000000000..1ae0b09f8 --- /dev/null +++ b/mpers-m32/struct_rtc_pll_info.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2004 Ulrich Drepper + * Copyright (c) 2004-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include + +typedef struct rtc_pll_info struct_rtc_pll_info; + +struct_rtc_pll_info mpers_target_var; diff --git a/mpers-m32/struct_rtc_pll_info.d1 b/mpers-m32/struct_rtc_pll_info.d1 new file mode 100644 index 000000000..1266d069e --- /dev/null +++ b/mpers-m32/struct_rtc_pll_info.d1 @@ -0,0 +1,209 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1b0 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xc7): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x141): mpers-m32/struct_rtc_pll_info.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x161): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1e5): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1bb): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1ad): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x80): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x26): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x121): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x69): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1d2): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x8e): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x19c): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x13c): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xa0): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0xb8): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x5f): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1f1): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x45): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x12e): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x20): _Bool + <1>: Abbrev Number: 6 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x1c5): rtc_pll_info + <102> DW_AT_byte_size : 28 + <103> DW_AT_decl_file : 2 + <104> DW_AT_decl_line : 55 + <105> DW_AT_sibling : <0x16c> + <2><109>: Abbrev Number: 7 (DW_TAG_member) + <10a> DW_AT_name : (indirect string, offset: 0xbe): pll_ctrl + <10e> DW_AT_decl_file : 2 + <10f> DW_AT_decl_line : 56 + <110> DW_AT_type : <0x2b> + <114> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><117>: Abbrev Number: 7 (DW_TAG_member) + <118> DW_AT_name : (indirect string, offset: 0x117): pll_value + <11c> DW_AT_decl_file : 2 + <11d> DW_AT_decl_line : 57 + <11e> DW_AT_type : <0x2b> + <122> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><125>: Abbrev Number: 7 (DW_TAG_member) + <126> DW_AT_name : (indirect string, offset: 0x10f): pll_max + <12a> DW_AT_decl_file : 2 + <12b> DW_AT_decl_line : 58 + <12c> DW_AT_type : <0x2b> + <130> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><133>: Abbrev Number: 7 (DW_TAG_member) + <134> DW_AT_name : (indirect string, offset: 0x1a5): pll_min + <138> DW_AT_decl_file : 2 + <139> DW_AT_decl_line : 59 + <13a> DW_AT_type : <0x2b> + <13e> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><141>: Abbrev Number: 7 (DW_TAG_member) + <142> DW_AT_name : (indirect string, offset: 0x39): pll_posmult + <146> DW_AT_decl_file : 2 + <147> DW_AT_decl_line : 60 + <148> DW_AT_type : <0x2b> + <14c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><14f>: Abbrev Number: 7 (DW_TAG_member) + <150> DW_AT_name : (indirect string, offset: 0x0): pll_negmult + <154> DW_AT_decl_file : 2 + <155> DW_AT_decl_line : 61 + <156> DW_AT_type : <0x2b> + <15a> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><15d>: Abbrev Number: 7 (DW_TAG_member) + <15e> DW_AT_name : (indirect string, offset: 0x1db): pll_clock + <162> DW_AT_decl_file : 2 + <163> DW_AT_decl_line : 62 + <164> DW_AT_type : <0x55> + <168> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><16b>: Abbrev Number: 0 + <1><16c>: Abbrev Number: 11 (DW_TAG_typedef) + <16d> DW_AT_name : (indirect string, offset: 0xc): struct_rtc_pll_info + <171> DW_AT_decl_file : 3 + <172> DW_AT_decl_line : 35 + <173> DW_AT_type : <0xfd> + <1><177>: Abbrev Number: 12 (DW_TAG_variable) + <178> DW_AT_name : (indirect string, offset: 0xa7): current_wordsize + <17c> DW_AT_decl_file : 4 + <17d> DW_AT_decl_line : 757 + <17f> DW_AT_type : <0x47> + <183> DW_AT_external : 1 + <184> DW_AT_declaration : 1 + <1><185>: Abbrev Number: 12 (DW_TAG_variable) + <186> DW_AT_name : (indirect string, offset: 0xa0): sysent + <18a> DW_AT_decl_file : 4 + <18b> DW_AT_decl_line : 892 + <18d> DW_AT_type : <0xeb> + <191> DW_AT_external : 1 + <192> DW_AT_declaration : 1 + <1><193>: Abbrev Number: 12 (DW_TAG_variable) + <194> DW_AT_name : (indirect string, offset: 0x192): nsyscalls + <198> DW_AT_decl_file : 4 + <199> DW_AT_decl_line : 903 + <19b> DW_AT_type : <0x47> + <19f> DW_AT_external : 1 + <1a0> DW_AT_declaration : 1 + <1><1a1>: Abbrev Number: 13 (DW_TAG_variable) + <1a2> DW_AT_name : (indirect string, offset: 0x4e): mpers_target_var + <1a6> DW_AT_decl_file : 3 + <1a7> DW_AT_decl_line : 37 + <1a8> DW_AT_type : <0x16c> + <1ac> DW_AT_external : 1 + <1ad> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><1b3>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_rtc_pll_info.d2 b/mpers-m32/struct_rtc_pll_info.d2 new file mode 100644 index 000000000..0b5079b70 --- /dev/null +++ b/mpers-m32/struct_rtc_pll_info.d2 @@ -0,0 +1,231 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1e5): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1bb): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1ad): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x80): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x26): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x121): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x69): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1d2): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x8e): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x19c): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x13c): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xa0): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb8): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5f): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f1): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x45): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x12e): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x20): _Bool +<1> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1c5): rtc_pll_info +DW_AT_byte_size : 28 +DW_AT_decl_file : 2 +DW_AT_decl_line : 55 +DW_AT_sibling : <0x16c> +<2><109> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbe): pll_ctrl +DW_AT_decl_file : 2 +DW_AT_decl_line : 56 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><117> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x117): pll_value +DW_AT_decl_file : 2 +DW_AT_decl_line : 57 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><125> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10f): pll_max +DW_AT_decl_file : 2 +DW_AT_decl_line : 58 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><133> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a5): pll_min +DW_AT_decl_file : 2 +DW_AT_decl_line : 59 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><141> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x39): pll_posmult +DW_AT_decl_file : 2 +DW_AT_decl_line : 60 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><14f> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): pll_negmult +DW_AT_decl_file : 2 +DW_AT_decl_line : 61 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><15d> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1db): pll_clock +DW_AT_decl_file : 2 +DW_AT_decl_line : 62 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<1><16c> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xc): struct_rtc_pll_info +DW_AT_decl_file : 3 +DW_AT_decl_line : 35 +DW_AT_type : <0xfd> +<1><177> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xa7): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><185> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xa0): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><193> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x192): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1a1> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x4e): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_type : <0x16c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/struct_rtc_pll_info.h b/mpers-m32/struct_rtc_pll_info.h new file mode 100644 index 000000000..778c80f25 --- /dev/null +++ b/mpers-m32/struct_rtc_pll_info.h @@ -0,0 +1,13 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t pll_ctrl; +int32_t pll_value; +int32_t pll_max; +int32_t pll_min; +int32_t pll_posmult; +int32_t pll_negmult; +int32_t pll_clock; +} ATTRIBUTE_PACKED m32_struct_rtc_pll_info; +#define MPERS_m32_struct_rtc_pll_info m32_struct_rtc_pll_info diff --git a/mpers-m32/struct_sg_io_hdr.c b/mpers-m32/struct_sg_io_hdr.c new file mode 100644 index 000000000..385818277 --- /dev/null +++ b/mpers-m32/struct_sg_io_hdr.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2007 Vladimir Nadvornik + * Copyright (c) 2007-2017 Dmitry V. Levin + * Copyright (c) 2015 Bart Van Assche + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_SCSI_SG_H + + +# include + +typedef struct sg_io_hdr struct_sg_io_hdr; + +#endif /* HAVE_SCSI_SG_H */ + +struct_sg_io_hdr mpers_target_var; diff --git a/mpers-m32/struct_sg_io_hdr.d1 b/mpers-m32/struct_sg_io_hdr.d1 new file mode 100644 index 000000000..2703ada25 --- /dev/null +++ b/mpers-m32/struct_sg_io_hdr.d1 @@ -0,0 +1,304 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x28a (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xea): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x14b): mpers-m32/struct_sg_io_hdr.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x181): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x7b): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x20b): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1d9): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x87): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x1d): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x30): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x25c): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x232): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xab): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1c6): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x17c): char + <1><73>: Abbrev Number: 5 (DW_TAG_pointer_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_type : <0x79> + <1><79>: Abbrev Number: 6 (DW_TAG_const_type) + <7a> DW_AT_type : <0x6c> + <1><7e>: Abbrev Number: 7 (DW_TAG_structure_type) + <7f> DW_AT_name : (indirect string, offset: 0xbd): sysent + <83> DW_AT_byte_size : 20 + <84> DW_AT_decl_file : 1 + <85> DW_AT_decl_line : 4 + <86> DW_AT_sibling : <0xd1> + <2><8a>: Abbrev Number: 8 (DW_TAG_member) + <8b> DW_AT_name : (indirect string, offset: 0x215): nargs + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 5 + <91> DW_AT_type : <0x47> + <95> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><98>: Abbrev Number: 8 (DW_TAG_member) + <99> DW_AT_name : (indirect string, offset: 0x71): sys_flags + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 6 + <9f> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x253): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xdc> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x49): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x73> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xdc> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) +
DW_AT_byte_size : 4 + DW_AT_type : <0xd1> + <1>: Abbrev Number: 12 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x16e): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7e> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf3> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xe2> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x6): _Bool + <1>: Abbrev Number: 7 (DW_TAG_structure_type) + <100> DW_AT_name : (indirect string, offset: 0x95): sg_io_hdr + <104> DW_AT_byte_size : 64 + <105> DW_AT_decl_file : 2 + <106> DW_AT_decl_line : 44 + <107> DW_AT_sibling : <0x240> + <2><10b>: Abbrev Number: 8 (DW_TAG_member) + <10c> DW_AT_name : (indirect string, offset: 0x1e7): interface_id + <110> DW_AT_decl_file : 2 + <111> DW_AT_decl_line : 46 + <112> DW_AT_type : <0x2b> + <116> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><119>: Abbrev Number: 8 (DW_TAG_member) + <11a> DW_AT_name : (indirect string, offset: 0xc4): dxfer_direction + <11e> DW_AT_decl_file : 2 + <11f> DW_AT_decl_line : 47 + <120> DW_AT_type : <0x2b> + <124> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><127>: Abbrev Number: 8 (DW_TAG_member) + <128> DW_AT_name : (indirect string, offset: 0x143): cmd_len + <12c> DW_AT_decl_file : 2 + <12d> DW_AT_decl_line : 48 + <12e> DW_AT_type : <0x39> + <132> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><135>: Abbrev Number: 8 (DW_TAG_member) + <136> DW_AT_name : (indirect string, offset: 0x1bc): mx_sb_len + <13a> DW_AT_decl_file : 2 + <13b> DW_AT_decl_line : 49 + <13c> DW_AT_type : <0x39> + <140> DW_AT_data_member_location: 2 byte block: 23 9 (DW_OP_plus_uconst: 9) + <2><143>: Abbrev Number: 8 (DW_TAG_member) + <144> DW_AT_name : (indirect string, offset: 0x9f): iovec_count + <148> DW_AT_decl_file : 2 + <149> DW_AT_decl_line : 50 + <14a> DW_AT_type : <0x40> + <14e> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><151>: Abbrev Number: 8 (DW_TAG_member) + <152> DW_AT_name : (indirect string, offset: 0x1cf): dxfer_len + <156> DW_AT_decl_file : 2 + <157> DW_AT_decl_line : 51 + <158> DW_AT_type : <0x47> + <15c> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><15f>: Abbrev Number: 8 (DW_TAG_member) + <160> DW_AT_name : (indirect string, offset: 0x204): dxferp + <164> DW_AT_decl_file : 2 + <165> DW_AT_decl_line : 52 + <166> DW_AT_type : <0x6a> + <16a> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><16d>: Abbrev Number: 8 (DW_TAG_member) + <16e> DW_AT_name : (indirect string, offset: 0x3d): cmdp + <172> DW_AT_decl_file : 2 + <173> DW_AT_decl_line : 54 + <174> DW_AT_type : <0x240> + <178> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><17b>: Abbrev Number: 9 (DW_TAG_member) + <17c> DW_AT_name : sbp + <180> DW_AT_decl_file : 2 + <181> DW_AT_decl_line : 55 + <182> DW_AT_type : <0x240> + <186> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><189>: Abbrev Number: 8 (DW_TAG_member) + <18a> DW_AT_name : (indirect string, offset: 0xc): timeout + <18e> DW_AT_decl_file : 2 + <18f> DW_AT_decl_line : 56 + <190> DW_AT_type : <0x47> + <194> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><197>: Abbrev Number: 8 (DW_TAG_member) + <198> DW_AT_name : (indirect string, offset: 0x168): flags + <19c> DW_AT_decl_file : 2 + <19d> DW_AT_decl_line : 57 + <19e> DW_AT_type : <0x47> + <1a2> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1a5>: Abbrev Number: 8 (DW_TAG_member) + <1a6> DW_AT_name : (indirect string, offset: 0x1f4): pack_id + <1aa> DW_AT_decl_file : 2 + <1ab> DW_AT_decl_line : 58 + <1ac> DW_AT_type : <0x2b> + <1b0> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><1b3>: Abbrev Number: 8 (DW_TAG_member) + <1b4> DW_AT_name : (indirect string, offset: 0x1fc): usr_ptr + <1b8> DW_AT_decl_file : 2 + <1b9> DW_AT_decl_line : 59 + <1ba> DW_AT_type : <0x6a> + <1be> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1c1>: Abbrev Number: 8 (DW_TAG_member) + <1c2> DW_AT_name : (indirect string, offset: 0x42): status + <1c6> DW_AT_decl_file : 2 + <1c7> DW_AT_decl_line : 60 + <1c8> DW_AT_type : <0x39> + <1cc> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><1cf>: Abbrev Number: 8 (DW_TAG_member) + <1d0> DW_AT_name : (indirect string, offset: 0x245): masked_status + <1d4> DW_AT_decl_file : 2 + <1d5> DW_AT_decl_line : 61 + <1d6> DW_AT_type : <0x39> + <1da> DW_AT_data_member_location: 2 byte block: 23 2d (DW_OP_plus_uconst: 45) + <2><1dd>: Abbrev Number: 8 (DW_TAG_member) + <1de> DW_AT_name : (indirect string, offset: 0x227): msg_status + <1e2> DW_AT_decl_file : 2 + <1e3> DW_AT_decl_line : 62 + <1e4> DW_AT_type : <0x39> + <1e8> DW_AT_data_member_location: 2 byte block: 23 2e (DW_OP_plus_uconst: 46) + <2><1eb>: Abbrev Number: 8 (DW_TAG_member) + <1ec> DW_AT_name : (indirect string, offset: 0x23b): sb_len_wr + <1f0> DW_AT_decl_file : 2 + <1f1> DW_AT_decl_line : 63 + <1f2> DW_AT_type : <0x39> + <1f6> DW_AT_data_member_location: 2 byte block: 23 2f (DW_OP_plus_uconst: 47) + <2><1f9>: Abbrev Number: 8 (DW_TAG_member) + <1fa> DW_AT_name : (indirect string, offset: 0x21b): host_status + <1fe> DW_AT_decl_file : 2 + <1ff> DW_AT_decl_line : 64 + <200> DW_AT_type : <0x40> + <204> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><207>: Abbrev Number: 8 (DW_TAG_member) + <208> DW_AT_name : (indirect string, offset: 0x52): driver_status + <20c> DW_AT_decl_file : 2 + <20d> DW_AT_decl_line : 65 + <20e> DW_AT_type : <0x40> + <212> DW_AT_data_member_location: 2 byte block: 23 32 (DW_OP_plus_uconst: 50) + <2><215>: Abbrev Number: 8 (DW_TAG_member) + <216> DW_AT_name : (indirect string, offset: 0x0): resid + <21a> DW_AT_decl_file : 2 + <21b> DW_AT_decl_line : 66 + <21c> DW_AT_type : <0x2b> + <220> DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2><223>: Abbrev Number: 8 (DW_TAG_member) + <224> DW_AT_name : (indirect string, offset: 0x14): duration + <228> DW_AT_decl_file : 2 + <229> DW_AT_decl_line : 67 + <22a> DW_AT_type : <0x47> + <22e> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><231>: Abbrev Number: 8 (DW_TAG_member) + <232> DW_AT_name : (indirect string, offset: 0xe5): info + <236> DW_AT_decl_file : 2 + <237> DW_AT_decl_line : 68 + <238> DW_AT_type : <0x47> + <23c> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><23f>: Abbrev Number: 0 + <1><240>: Abbrev Number: 5 (DW_TAG_pointer_type) + <241> DW_AT_byte_size : 4 + <242> DW_AT_type : <0x39> + <1><246>: Abbrev Number: 12 (DW_TAG_typedef) + <247> DW_AT_name : (indirect string, offset: 0x132): struct_sg_io_hdr + <24b> DW_AT_decl_file : 3 + <24c> DW_AT_decl_line : 37 + <24d> DW_AT_type : <0xff> + <1><251>: Abbrev Number: 13 (DW_TAG_variable) + <252> DW_AT_name : (indirect string, offset: 0xd4): current_wordsize + <256> DW_AT_decl_file : 4 + <257> DW_AT_decl_line : 757 + <259> DW_AT_type : <0x47> + <25d> DW_AT_external : 1 + <25e> DW_AT_declaration : 1 + <1><25f>: Abbrev Number: 13 (DW_TAG_variable) + <260> DW_AT_name : (indirect string, offset: 0xbd): sysent + <264> DW_AT_decl_file : 4 + <265> DW_AT_decl_line : 892 + <267> DW_AT_type : <0xed> + <26b> DW_AT_external : 1 + <26c> DW_AT_declaration : 1 + <1><26d>: Abbrev Number: 13 (DW_TAG_variable) + <26e> DW_AT_name : (indirect string, offset: 0x1b2): nsyscalls + <272> DW_AT_decl_file : 4 + <273> DW_AT_decl_line : 903 + <275> DW_AT_type : <0x47> + <279> DW_AT_external : 1 + <27a> DW_AT_declaration : 1 + <1><27b>: Abbrev Number: 14 (DW_TAG_variable) + <27c> DW_AT_name : (indirect string, offset: 0x60): mpers_target_var + <280> DW_AT_decl_file : 3 + <281> DW_AT_decl_line : 41 + <282> DW_AT_type : <0x246> + <286> DW_AT_external : 1 + <287> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><28d>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_sg_io_hdr.d2 b/mpers-m32/struct_sg_io_hdr.d2 new file mode 100644 index 000000000..79115fa2a --- /dev/null +++ b/mpers-m32/struct_sg_io_hdr.d2 @@ -0,0 +1,343 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x7b): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x20b): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1d9): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x87): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1d): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x30): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x25c): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x232): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xab): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c6): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x17c): char +<1><73> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x79> +<1><79> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><7e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xbd): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd1> +<2><8a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x215): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><98> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x71): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x253): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xdc> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x49): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xdc> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd1> +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x16e): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7e> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xe2> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x6): _Bool +<1> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x95): sg_io_hdr +DW_AT_byte_size : 64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 44 +DW_AT_sibling : <0x240> +<2><10b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e7): interface_id +DW_AT_decl_file : 2 +DW_AT_decl_line : 46 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><119> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc4): dxfer_direction +DW_AT_decl_file : 2 +DW_AT_decl_line : 47 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><127> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x143): cmd_len +DW_AT_decl_file : 2 +DW_AT_decl_line : 48 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><135> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1bc): mx_sb_len +DW_AT_decl_file : 2 +DW_AT_decl_line : 49 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 9 (DW_OP_plus_uconst: 9) +<2><143> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9f): iovec_count +DW_AT_decl_file : 2 +DW_AT_decl_line : 50 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><151> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1cf): dxfer_len +DW_AT_decl_file : 2 +DW_AT_decl_line : 51 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><15f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x204): dxferp +DW_AT_decl_file : 2 +DW_AT_decl_line : 52 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><16d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3d): cmdp +DW_AT_decl_file : 2 +DW_AT_decl_line : 54 +DW_AT_type : <0x240> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><17b> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sbp +DW_AT_decl_file : 2 +DW_AT_decl_line : 55 +DW_AT_type : <0x240> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><189> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc): timeout +DW_AT_decl_file : 2 +DW_AT_decl_line : 56 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><197> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x168): flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 57 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1a5> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f4): pack_id +DW_AT_decl_file : 2 +DW_AT_decl_line : 58 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><1b3> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fc): usr_ptr +DW_AT_decl_file : 2 +DW_AT_decl_line : 59 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><1c1> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x42): status +DW_AT_decl_file : 2 +DW_AT_decl_line : 60 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><1cf> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x245): masked_status +DW_AT_decl_file : 2 +DW_AT_decl_line : 61 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 2d (DW_OP_plus_uconst: 45) +<2><1dd> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x227): msg_status +DW_AT_decl_file : 2 +DW_AT_decl_line : 62 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 2e (DW_OP_plus_uconst: 46) +<2><1eb> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23b): sb_len_wr +DW_AT_decl_file : 2 +DW_AT_decl_line : 63 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 2f (DW_OP_plus_uconst: 47) +<2><1f9> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21b): host_status +DW_AT_decl_file : 2 +DW_AT_decl_line : 64 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><207> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x52): driver_status +DW_AT_decl_file : 2 +DW_AT_decl_line : 65 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 32 (DW_OP_plus_uconst: 50) +<2><215> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): resid +DW_AT_decl_file : 2 +DW_AT_decl_line : 66 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2><223> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14): duration +DW_AT_decl_file : 2 +DW_AT_decl_line : 67 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><231> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe5): info +DW_AT_decl_file : 2 +DW_AT_decl_line : 68 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<1><240> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x39> +<1><246> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x132): struct_sg_io_hdr +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_type : <0xff> +<1><251> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd4): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><25f> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xbd): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xed> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><26d> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1b2): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><27b> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x60): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 41 +DW_AT_type : <0x246> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_sg_io_hdr.h b/mpers-m32/struct_sg_io_hdr.h new file mode 100644 index 000000000..9322e924c --- /dev/null +++ b/mpers-m32/struct_sg_io_hdr.h @@ -0,0 +1,28 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t interface_id; +int32_t dxfer_direction; +unsigned char cmd_len; +unsigned char mx_sb_len; +uint16_t iovec_count; +uint32_t dxfer_len; +mpers_ptr_t dxferp; +mpers_ptr_t cmdp; +mpers_ptr_t sbp; +uint32_t timeout; +uint32_t flags; +int32_t pack_id; +mpers_ptr_t usr_ptr; +unsigned char status; +unsigned char masked_status; +unsigned char msg_status; +unsigned char sb_len_wr; +uint16_t host_status; +uint16_t driver_status; +int32_t resid; +uint32_t duration; +uint32_t info; +} ATTRIBUTE_PACKED m32_struct_sg_io_hdr; +#define MPERS_m32_struct_sg_io_hdr m32_struct_sg_io_hdr diff --git a/mpers-m32/struct_sg_req_info.c b/mpers-m32/struct_sg_req_info.c new file mode 100644 index 000000000..26bddb3ca --- /dev/null +++ b/mpers-m32/struct_sg_req_info.c @@ -0,0 +1,41 @@ +/* + * Decode struct sg_req_info. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_SCSI_SG_H + + +# include + +typedef struct sg_req_info struct_sg_req_info; + +#endif /* HAVE_SCSI_SG_H */ + +struct_sg_req_info mpers_target_var; diff --git a/mpers-m32/struct_sg_req_info.d1 b/mpers-m32/struct_sg_req_info.d1 new file mode 100644 index 000000000..93e39c573 --- /dev/null +++ b/mpers-m32/struct_sg_req_info.d1 @@ -0,0 +1,217 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1c0 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xe3): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x48): mpers-m32/struct_sg_req_info.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x14b): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1e2): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1c0): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x196): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x99): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0xf): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x12b): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x82): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1d1): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xb3): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x18d): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x146): char + <1><73>: Abbrev Number: 5 (DW_TAG_pointer_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_type : <0x79> + <1><79>: Abbrev Number: 6 (DW_TAG_const_type) + <7a> DW_AT_type : <0x6c> + <1><7e>: Abbrev Number: 7 (DW_TAG_structure_type) + <7f> DW_AT_name : (indirect string, offset: 0xc5): sysent + <83> DW_AT_byte_size : 20 + <84> DW_AT_decl_file : 1 + <85> DW_AT_decl_line : 4 + <86> DW_AT_sibling : <0xd1> + <2><8a>: Abbrev Number: 8 (DW_TAG_member) + <8b> DW_AT_name : (indirect string, offset: 0xdd): nargs + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 5 + <91> DW_AT_type : <0x47> + <95> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><98>: Abbrev Number: 8 (DW_TAG_member) + <99> DW_AT_name : (indirect string, offset: 0x78): sys_flags + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 6 + <9f> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1ee): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xdc> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x3f): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x73> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xdc> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) +
DW_AT_byte_size : 4 + DW_AT_type : <0xd1> + <1>: Abbrev Number: 12 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x138): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7e> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf3> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xe2> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x0): _Bool + <1>: Abbrev Number: 7 (DW_TAG_structure_type) + <100> DW_AT_name : (indirect string, offset: 0x1b4): sg_req_info + <104> DW_AT_byte_size : 20 + <105> DW_AT_decl_file : 2 + <106> DW_AT_decl_line : 120 + <107> DW_AT_sibling : <0x17c> + <2><10b>: Abbrev Number: 8 (DW_TAG_member) + <10c> DW_AT_name : (indirect string, offset: 0x22): req_state + <110> DW_AT_decl_file : 2 + <111> DW_AT_decl_line : 121 + <112> DW_AT_type : <0x6c> + <116> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><119>: Abbrev Number: 8 (DW_TAG_member) + <11a> DW_AT_name : (indirect string, offset: 0x1ca): orphan + <11e> DW_AT_decl_file : 2 + <11f> DW_AT_decl_line : 122 + <120> DW_AT_type : <0x6c> + <124> DW_AT_data_member_location: 2 byte block: 23 1 (DW_OP_plus_uconst: 1) + <2><127>: Abbrev Number: 8 (DW_TAG_member) + <128> DW_AT_name : (indirect string, offset: 0xa7): sg_io_owned + <12c> DW_AT_decl_file : 2 + <12d> DW_AT_decl_line : 123 + <12e> DW_AT_type : <0x6c> + <132> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><135>: Abbrev Number: 8 (DW_TAG_member) + <136> DW_AT_name : (indirect string, offset: 0x1da): problem + <13a> DW_AT_decl_file : 2 + <13b> DW_AT_decl_line : 124 + <13c> DW_AT_type : <0x6c> + <140> DW_AT_data_member_location: 2 byte block: 23 3 (DW_OP_plus_uconst: 3) + <2><143>: Abbrev Number: 8 (DW_TAG_member) + <144> DW_AT_name : (indirect string, offset: 0x1a4): pack_id + <148> DW_AT_decl_file : 2 + <149> DW_AT_decl_line : 125 + <14a> DW_AT_type : <0x2b> + <14e> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><151>: Abbrev Number: 8 (DW_TAG_member) + <152> DW_AT_name : (indirect string, offset: 0x1ac): usr_ptr + <156> DW_AT_decl_file : 2 + <157> DW_AT_decl_line : 126 + <158> DW_AT_type : <0x6a> + <15c> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><15f>: Abbrev Number: 8 (DW_TAG_member) + <160> DW_AT_name : (indirect string, offset: 0x6): duration + <164> DW_AT_decl_file : 2 + <165> DW_AT_decl_line : 127 + <166> DW_AT_type : <0x47> + <16a> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><16d>: Abbrev Number: 8 (DW_TAG_member) + <16e> DW_AT_name : (indirect string, offset: 0x186): unused + <172> DW_AT_decl_file : 2 + <173> DW_AT_decl_line : 129 + <174> DW_AT_type : <0x2b> + <178> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><17b>: Abbrev Number: 0 + <1><17c>: Abbrev Number: 12 (DW_TAG_typedef) + <17d> DW_AT_name : (indirect string, offset: 0x2c): struct_sg_req_info + <181> DW_AT_decl_file : 3 + <182> DW_AT_decl_line : 37 + <183> DW_AT_type : <0xff> + <1><187>: Abbrev Number: 13 (DW_TAG_variable) + <188> DW_AT_name : (indirect string, offset: 0xcc): current_wordsize + <18c> DW_AT_decl_file : 4 + <18d> DW_AT_decl_line : 757 + <18f> DW_AT_type : <0x47> + <193> DW_AT_external : 1 + <194> DW_AT_declaration : 1 + <1><195>: Abbrev Number: 13 (DW_TAG_variable) + <196> DW_AT_name : (indirect string, offset: 0xc5): sysent + <19a> DW_AT_decl_file : 4 + <19b> DW_AT_decl_line : 892 + <19d> DW_AT_type : <0xed> + <1a1> DW_AT_external : 1 + <1a2> DW_AT_declaration : 1 + <1><1a3>: Abbrev Number: 13 (DW_TAG_variable) + <1a4> DW_AT_name : (indirect string, offset: 0x17c): nsyscalls + <1a8> DW_AT_decl_file : 4 + <1a9> DW_AT_decl_line : 903 + <1ab> DW_AT_type : <0x47> + <1af> DW_AT_external : 1 + <1b0> DW_AT_declaration : 1 + <1><1b1>: Abbrev Number: 14 (DW_TAG_variable) + <1b2> DW_AT_name : (indirect string, offset: 0x67): mpers_target_var + <1b6> DW_AT_decl_file : 3 + <1b7> DW_AT_decl_line : 41 + <1b8> DW_AT_type : <0x17c> + <1bc> DW_AT_external : 1 + <1bd> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><1c3>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_sg_req_info.d2 b/mpers-m32/struct_sg_req_info.d2 new file mode 100644 index 000000000..f9e7702fa --- /dev/null +++ b/mpers-m32/struct_sg_req_info.d2 @@ -0,0 +1,241 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1e2): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1c0): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x196): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x99): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xf): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x12b): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x82): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1d1): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb3): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x18d): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x146): char +<1><73> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x79> +<1><79> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><7e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc5): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd1> +<2><8a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xdd): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><98> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x78): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ee): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xdc> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3f): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xdc> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd1> +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x138): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7e> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xe2> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x0): _Bool +<1> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1b4): sg_req_info +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 120 +DW_AT_sibling : <0x17c> +<2><10b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22): req_state +DW_AT_decl_file : 2 +DW_AT_decl_line : 121 +DW_AT_type : <0x6c> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><119> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ca): orphan +DW_AT_decl_file : 2 +DW_AT_decl_line : 122 +DW_AT_type : <0x6c> +DW_AT_data_member_location: 2 byte block: 23 1 (DW_OP_plus_uconst: 1) +<2><127> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa7): sg_io_owned +DW_AT_decl_file : 2 +DW_AT_decl_line : 123 +DW_AT_type : <0x6c> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><135> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1da): problem +DW_AT_decl_file : 2 +DW_AT_decl_line : 124 +DW_AT_type : <0x6c> +DW_AT_data_member_location: 2 byte block: 23 3 (DW_OP_plus_uconst: 3) +<2><143> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a4): pack_id +DW_AT_decl_file : 2 +DW_AT_decl_line : 125 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><151> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ac): usr_ptr +DW_AT_decl_file : 2 +DW_AT_decl_line : 126 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><15f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6): duration +DW_AT_decl_file : 2 +DW_AT_decl_line : 127 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><16d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x186): unused +DW_AT_decl_file : 2 +DW_AT_decl_line : 129 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><17c> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2c): struct_sg_req_info +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_type : <0xff> +<1><187> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xcc): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><195> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc5): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xed> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1a3> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x17c): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1b1> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x67): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 41 +DW_AT_type : <0x17c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/struct_sg_req_info.h b/mpers-m32/struct_sg_req_info.h new file mode 100644 index 000000000..f2d5a6d56 --- /dev/null +++ b/mpers-m32/struct_sg_req_info.h @@ -0,0 +1,14 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +char req_state; +char orphan; +char sg_io_owned; +char problem; +int32_t pack_id; +mpers_ptr_t usr_ptr; +uint32_t duration; +int32_t unused; +} ATTRIBUTE_PACKED m32_struct_sg_req_info; +#define MPERS_m32_struct_sg_req_info m32_struct_sg_req_info diff --git a/mpers-m32/struct_sigevent.c b/mpers-m32/struct_sigevent.c new file mode 100644 index 000000000..e5294a265 --- /dev/null +++ b/mpers-m32/struct_sigevent.c @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2003, 2004 Ulrich Drepper + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include "sigevent.h" +struct_sigevent mpers_target_var; diff --git a/mpers-m32/struct_sigevent.d1 b/mpers-m32/struct_sigevent.d1 new file mode 100644 index 000000000..46ec7aeab --- /dev/null +++ b/mpers-m32/struct_sigevent.d1 @@ -0,0 +1,240 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1e5 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xd3): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x27): mpers-m32/struct_sigevent.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x14d): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1da): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x19b): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x0): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x8e): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x14): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x12d): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x67): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1c4): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x11b): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x192): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x148): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xa9): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0xc1): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x5d): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1e6): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x43): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x13a): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0xe): _Bool + <1>: Abbrev Number: 12 (DW_TAG_union_type) + DW_AT_byte_size : 4 + DW_AT_decl_file : 2 + <100> DW_AT_decl_line : 32 + <101> DW_AT_sibling : <0x11c> + <2><105>: Abbrev Number: 13 (DW_TAG_member) + <106> DW_AT_name : (indirect string, offset: 0x1a5): sival_int + <10a> DW_AT_decl_file : 2 + <10b> DW_AT_decl_line : 33 + <10c> DW_AT_type : <0x2b> + <2><110>: Abbrev Number: 13 (DW_TAG_member) + <111> DW_AT_name : (indirect string, offset: 0x1f8): sival_ptr + <115> DW_AT_decl_file : 2 + <116> DW_AT_decl_line : 34 + <117> DW_AT_type : <0x5c> + <2><11b>: Abbrev Number: 0 + <1><11c>: Abbrev Number: 14 (DW_TAG_structure_type) + <11d> DW_AT_byte_size : 8 + <11e> DW_AT_decl_file : 2 + <11f> DW_AT_decl_line : 40 + <120> DW_AT_sibling : <0x141> + <2><124>: Abbrev Number: 7 (DW_TAG_member) + <125> DW_AT_name : (indirect string, offset: 0x1ef): function + <129> DW_AT_decl_file : 2 + <12a> DW_AT_decl_line : 41 + <12b> DW_AT_type : <0x5c> + <12f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><132>: Abbrev Number: 7 (DW_TAG_member) + <133> DW_AT_name : (indirect string, offset: 0x188): attribute + <137> DW_AT_decl_file : 2 + <138> DW_AT_decl_line : 42 + <139> DW_AT_type : <0x5c> + <13d> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><140>: Abbrev Number: 0 + <1><141>: Abbrev Number: 12 (DW_TAG_union_type) + <142> DW_AT_byte_size : 8 + <143> DW_AT_decl_file : 2 + <144> DW_AT_decl_line : 38 + <145> DW_AT_sibling : <0x160> + <2><149>: Abbrev Number: 15 (DW_TAG_member) + <14a> DW_AT_name : tid + <14e> DW_AT_decl_file : 2 + <14f> DW_AT_decl_line : 39 + <150> DW_AT_type : <0x2b> + <2><154>: Abbrev Number: 13 (DW_TAG_member) + <155> DW_AT_name : (indirect string, offset: 0x1cd): sigev_thread + <159> DW_AT_decl_file : 2 + <15a> DW_AT_decl_line : 43 + <15b> DW_AT_type : <0x11c> + <2><15f>: Abbrev Number: 0 + <1><160>: Abbrev Number: 14 (DW_TAG_structure_type) + <161> DW_AT_byte_size : 20 + <162> DW_AT_decl_file : 2 + <163> DW_AT_decl_line : 31 + <164> DW_AT_sibling : <0x1a1> + <2><168>: Abbrev Number: 7 (DW_TAG_member) + <169> DW_AT_name : (indirect string, offset: 0x1af): sigev_value + <16d> DW_AT_decl_file : 2 + <16e> DW_AT_decl_line : 35 + <16f> DW_AT_type : <0xfd> + <173> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><176>: Abbrev Number: 7 (DW_TAG_member) + <177> DW_AT_name : (indirect string, offset: 0xc7): sigev_signo + <17b> DW_AT_decl_file : 2 + <17c> DW_AT_decl_line : 36 + <17d> DW_AT_type : <0x2b> + <181> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><184>: Abbrev Number: 7 (DW_TAG_member) + <185> DW_AT_name : (indirect string, offset: 0x9c): sigev_notify + <189> DW_AT_decl_file : 2 + <18a> DW_AT_decl_line : 37 + <18b> DW_AT_type : <0x2b> + <18f> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><192>: Abbrev Number: 7 (DW_TAG_member) + <193> DW_AT_name : (indirect string, offset: 0x1bb): sigev_un + <197> DW_AT_decl_file : 2 + <198> DW_AT_decl_line : 44 + <199> DW_AT_type : <0x141> + <19d> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1a0>: Abbrev Number: 0 + <1><1a1>: Abbrev Number: 11 (DW_TAG_typedef) + <1a2> DW_AT_name : (indirect string, offset: 0x7e): struct_sigevent + <1a6> DW_AT_decl_file : 2 + <1a7> DW_AT_decl_line : 45 + <1a8> DW_AT_type : <0x160> + <1><1ac>: Abbrev Number: 16 (DW_TAG_variable) + <1ad> DW_AT_name : (indirect string, offset: 0xb0): current_wordsize + <1b1> DW_AT_decl_file : 3 + <1b2> DW_AT_decl_line : 757 + <1b4> DW_AT_type : <0x47> + <1b8> DW_AT_external : 1 + <1b9> DW_AT_declaration : 1 + <1><1ba>: Abbrev Number: 16 (DW_TAG_variable) + <1bb> DW_AT_name : (indirect string, offset: 0xa9): sysent + <1bf> DW_AT_decl_file : 3 + <1c0> DW_AT_decl_line : 892 + <1c2> DW_AT_type : <0xeb> + <1c6> DW_AT_external : 1 + <1c7> DW_AT_declaration : 1 + <1><1c8>: Abbrev Number: 16 (DW_TAG_variable) + <1c9> DW_AT_name : (indirect string, offset: 0x17e): nsyscalls + <1cd> DW_AT_decl_file : 3 + <1ce> DW_AT_decl_line : 903 + <1d0> DW_AT_type : <0x47> + <1d4> DW_AT_external : 1 + <1d5> DW_AT_declaration : 1 + <1><1d6>: Abbrev Number: 17 (DW_TAG_variable) + <1d7> DW_AT_name : (indirect string, offset: 0x4c): mpers_target_var + <1db> DW_AT_decl_file : 4 + <1dc> DW_AT_decl_line : 32 + <1dd> DW_AT_type : <0x1a1> + <1e1> DW_AT_external : 1 + <1e2> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><1e8>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_sigevent.d2 b/mpers-m32/struct_sigevent.d2 new file mode 100644 index 000000000..4b92f8634 --- /dev/null +++ b/mpers-m32/struct_sigevent.d2 @@ -0,0 +1,265 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1da): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x19b): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x0): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x8e): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x14): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x12d): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x67): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1c4): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x11b): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x192): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x148): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xa9): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc1): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5d): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e6): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x43): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x13a): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xe): _Bool +<1> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 2 +DW_AT_decl_line : 32 +DW_AT_sibling : <0x11c> +<2><105> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a5): sival_int +DW_AT_decl_file : 2 +DW_AT_decl_line : 33 +DW_AT_type : <0x2b> +<2><110> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f8): sival_ptr +DW_AT_decl_file : 2 +DW_AT_decl_line : 34 +DW_AT_type : <0x5c> +<1><11c> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 40 +DW_AT_sibling : <0x141> +<2><124> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ef): function +DW_AT_decl_file : 2 +DW_AT_decl_line : 41 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><132> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x188): attribute +DW_AT_decl_file : 2 +DW_AT_decl_line : 42 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><141> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 38 +DW_AT_sibling : <0x160> +<2><149> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : tid +DW_AT_decl_file : 2 +DW_AT_decl_line : 39 +DW_AT_type : <0x2b> +<2><154> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1cd): sigev_thread +DW_AT_decl_file : 2 +DW_AT_decl_line : 43 +DW_AT_type : <0x11c> +<1><160> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 31 +DW_AT_sibling : <0x1a1> +<2><168> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1af): sigev_value +DW_AT_decl_file : 2 +DW_AT_decl_line : 35 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><176> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc7): sigev_signo +DW_AT_decl_file : 2 +DW_AT_decl_line : 36 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><184> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9c): sigev_notify +DW_AT_decl_file : 2 +DW_AT_decl_line : 37 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><192> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1bb): sigev_un +DW_AT_decl_file : 2 +DW_AT_decl_line : 44 +DW_AT_type : <0x141> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1a1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x7e): struct_sigevent +DW_AT_decl_file : 2 +DW_AT_decl_line : 45 +DW_AT_type : <0x160> +<1><1ac> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xb0): current_wordsize +DW_AT_decl_file : 3 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1ba> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xa9): sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1c8> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x17e): nsyscalls +DW_AT_decl_file : 3 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1d6> +Abbrev Number: 17 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x4c): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 32 +DW_AT_type : <0x1a1> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/struct_sigevent.h b/mpers-m32/struct_sigevent.h new file mode 100644 index 000000000..dbe82fec9 --- /dev/null +++ b/mpers-m32/struct_sigevent.h @@ -0,0 +1,19 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +union { +int32_t sival_int; +uint32_t sival_ptr; +} sigev_value; +int32_t sigev_signo; +int32_t sigev_notify; +union { +int32_t tid; +struct { +uint32_t function; +uint32_t attribute; +} ATTRIBUTE_PACKED sigev_thread; +} sigev_un; +} ATTRIBUTE_PACKED m32_struct_sigevent; +#define MPERS_m32_struct_sigevent m32_struct_sigevent diff --git a/mpers-m32/struct_stat.c b/mpers-m32/struct_stat.c new file mode 100644 index 000000000..80d1412c2 --- /dev/null +++ b/mpers-m32/struct_stat.c @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "asm_stat.h" + +#if defined MPERS_IS_m32 +# undef HAVE_STRUCT_STAT +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# ifdef HAVE_M32_STRUCT_STAT +# define HAVE_STRUCT_STAT 1 +# ifdef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif /* HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC */ +# endif /* HAVE_M32_STRUCT_STAT */ +#elif defined MPERS_IS_mx32 +# undef HAVE_STRUCT_STAT +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# ifdef HAVE_MX32_STRUCT_STAT +# define HAVE_STRUCT_STAT 1 +# ifdef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif /* HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC */ +# endif /* HAVE_MX32_STRUCT_STAT */ +#else /* !MPERS_IS_m32 && !MPERS_IS_mx32 */ +# define HAVE_STRUCT_STAT 1 +#endif + +#ifndef HAVE_STRUCT_STAT +struct stat {}; +#endif + +typedef struct stat struct_stat; + +struct_stat mpers_target_var; diff --git a/mpers-m32/struct_stat.d1 b/mpers-m32/struct_stat.d1 new file mode 100644 index 000000000..fd56e7a95 --- /dev/null +++ b/mpers-m32/struct_stat.d1 @@ -0,0 +1,275 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x24a (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x10f): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x1c): mpers-m32/struct_stat.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x18e): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x233): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x212): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1f0): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xb5): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x4f): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x160): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x9e): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x22a): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xcd): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1d0): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x17b): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xe7): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0xff): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x105): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x23f): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x6a): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x16d): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x34): _Bool + <1>: Abbrev Number: 6 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x17): stat + <102> DW_AT_byte_size : 64 + <103> DW_AT_decl_file : 2 + <104> DW_AT_decl_line : 7 + <105> DW_AT_sibling : <0x206> + <2><109>: Abbrev Number: 7 (DW_TAG_member) + <10a> DW_AT_name : (indirect string, offset: 0x21c): st_dev + <10e> DW_AT_decl_file : 2 + <10f> DW_AT_decl_line : 8 + <110> DW_AT_type : <0x5c> + <114> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><117>: Abbrev Number: 7 (DW_TAG_member) + <118> DW_AT_name : (indirect string, offset: 0x73): st_ino + <11c> DW_AT_decl_file : 2 + <11d> DW_AT_decl_line : 9 + <11e> DW_AT_type : <0x5c> + <122> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><125>: Abbrev Number: 7 (DW_TAG_member) + <126> DW_AT_name : (indirect string, offset: 0xdf): st_mode + <12a> DW_AT_decl_file : 2 + <12b> DW_AT_decl_line : 10 + <12c> DW_AT_type : <0x40> + <130> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><133>: Abbrev Number: 7 (DW_TAG_member) + <134> DW_AT_name : (indirect string, offset: 0x46): st_nlink + <138> DW_AT_decl_file : 2 + <139> DW_AT_decl_line : 11 + <13a> DW_AT_type : <0x40> + <13e> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><141>: Abbrev Number: 7 (DW_TAG_member) + <142> DW_AT_name : (indirect string, offset: 0x1c9): st_uid + <146> DW_AT_decl_file : 2 + <147> DW_AT_decl_line : 12 + <148> DW_AT_type : <0x40> + <14c> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><14f>: Abbrev Number: 7 (DW_TAG_member) + <150> DW_AT_name : (indirect string, offset: 0x223): st_gid + <154> DW_AT_decl_file : 2 + <155> DW_AT_decl_line : 13 + <156> DW_AT_type : <0x40> + <15a> DW_AT_data_member_location: 2 byte block: 23 e (DW_OP_plus_uconst: 14) + <2><15d>: Abbrev Number: 7 (DW_TAG_member) + <15e> DW_AT_name : (indirect string, offset: 0x96): st_rdev + <162> DW_AT_decl_file : 2 + <163> DW_AT_decl_line : 14 + <164> DW_AT_type : <0x5c> + <168> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><16b>: Abbrev Number: 7 (DW_TAG_member) + <16c> DW_AT_name : (indirect string, offset: 0x62): st_size + <170> DW_AT_decl_file : 2 + <171> DW_AT_decl_line : 15 + <172> DW_AT_type : <0x5c> + <176> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><179>: Abbrev Number: 7 (DW_TAG_member) + <17a> DW_AT_name : (indirect string, offset: 0x7a): st_blksize + <17e> DW_AT_decl_file : 2 + <17f> DW_AT_decl_line : 16 + <180> DW_AT_type : <0x5c> + <184> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><187>: Abbrev Number: 7 (DW_TAG_member) + <188> DW_AT_name : (indirect string, offset: 0xc3): st_blocks + <18c> DW_AT_decl_file : 2 + <18d> DW_AT_decl_line : 17 + <18e> DW_AT_type : <0x5c> + <192> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><195>: Abbrev Number: 7 (DW_TAG_member) + <196> DW_AT_name : (indirect string, offset: 0x1d9): st_atime + <19a> DW_AT_decl_file : 2 + <19b> DW_AT_decl_line : 18 + <19c> DW_AT_type : <0x5c> + <1a0> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1a3>: Abbrev Number: 7 (DW_TAG_member) + <1a4> DW_AT_name : (indirect string, offset: 0x1e2): st_atime_nsec + <1a8> DW_AT_decl_file : 2 + <1a9> DW_AT_decl_line : 19 + <1aa> DW_AT_type : <0x5c> + <1ae> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><1b1>: Abbrev Number: 7 (DW_TAG_member) + <1b2> DW_AT_name : (indirect string, offset: 0x0): st_mtime + <1b6> DW_AT_decl_file : 2 + <1b7> DW_AT_decl_line : 20 + <1b8> DW_AT_type : <0x5c> + <1bc> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1bf>: Abbrev Number: 7 (DW_TAG_member) + <1c0> DW_AT_name : (indirect string, offset: 0x180): st_mtime_nsec + <1c4> DW_AT_decl_file : 2 + <1c5> DW_AT_decl_line : 21 + <1c6> DW_AT_type : <0x5c> + <1ca> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><1cd>: Abbrev Number: 7 (DW_TAG_member) + <1ce> DW_AT_name : (indirect string, offset: 0x157): st_ctime + <1d2> DW_AT_decl_file : 2 + <1d3> DW_AT_decl_line : 22 + <1d4> DW_AT_type : <0x5c> + <1d8> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><1db>: Abbrev Number: 7 (DW_TAG_member) + <1dc> DW_AT_name : (indirect string, offset: 0x9): st_ctime_nsec + <1e0> DW_AT_decl_file : 2 + <1e1> DW_AT_decl_line : 23 + <1e2> DW_AT_type : <0x5c> + <1e6> DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2><1e9>: Abbrev Number: 7 (DW_TAG_member) + <1ea> DW_AT_name : (indirect string, offset: 0x1fe): __unused4 + <1ee> DW_AT_decl_file : 2 + <1ef> DW_AT_decl_line : 24 + <1f0> DW_AT_type : <0x5c> + <1f4> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><1f7>: Abbrev Number: 7 (DW_TAG_member) + <1f8> DW_AT_name : (indirect string, offset: 0x208): __unused5 + <1fc> DW_AT_decl_file : 2 + <1fd> DW_AT_decl_line : 25 + <1fe> DW_AT_type : <0x5c> + <202> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><205>: Abbrev Number: 0 + <1><206>: Abbrev Number: 11 (DW_TAG_typedef) + <207> DW_AT_name : (indirect string, offset: 0x3a): struct_stat + <20b> DW_AT_decl_file : 3 + <20c> DW_AT_decl_line : 59 + <20d> DW_AT_type : <0xfd> + <1><211>: Abbrev Number: 12 (DW_TAG_variable) + <212> DW_AT_name : (indirect string, offset: 0xee): current_wordsize + <216> DW_AT_decl_file : 4 + <217> DW_AT_decl_line : 757 + <219> DW_AT_type : <0x47> + <21d> DW_AT_external : 1 + <21e> DW_AT_declaration : 1 + <1><21f>: Abbrev Number: 12 (DW_TAG_variable) + <220> DW_AT_name : (indirect string, offset: 0xe7): sysent + <224> DW_AT_decl_file : 4 + <225> DW_AT_decl_line : 892 + <227> DW_AT_type : <0xeb> + <22b> DW_AT_external : 1 + <22c> DW_AT_declaration : 1 + <1><22d>: Abbrev Number: 12 (DW_TAG_variable) + <22e> DW_AT_name : (indirect string, offset: 0x1bf): nsyscalls + <232> DW_AT_decl_file : 4 + <233> DW_AT_decl_line : 903 + <235> DW_AT_type : <0x47> + <239> DW_AT_external : 1 + <23a> DW_AT_declaration : 1 + <1><23b>: Abbrev Number: 13 (DW_TAG_variable) + <23c> DW_AT_name : (indirect string, offset: 0x85): mpers_target_var + <240> DW_AT_decl_file : 3 + <241> DW_AT_decl_line : 61 + <242> DW_AT_type : <0x206> + <246> DW_AT_external : 1 + <247> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><24d>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_stat.d2 b/mpers-m32/struct_stat.d2 new file mode 100644 index 000000000..0914b735f --- /dev/null +++ b/mpers-m32/struct_stat.d2 @@ -0,0 +1,308 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x233): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x212): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1f0): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xb5): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x4f): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x160): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x9e): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x22a): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xcd): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1d0): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x17b): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xe7): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xff): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x105): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23f): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6a): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x16d): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x34): _Bool +<1> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x17): stat +DW_AT_byte_size : 64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_sibling : <0x206> +<2><109> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21c): st_dev +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><117> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x73): st_ino +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><125> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xdf): st_mode +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><133> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x46): st_nlink +DW_AT_decl_file : 2 +DW_AT_decl_line : 11 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><141> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c9): st_uid +DW_AT_decl_file : 2 +DW_AT_decl_line : 12 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><14f> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x223): st_gid +DW_AT_decl_file : 2 +DW_AT_decl_line : 13 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 e (DW_OP_plus_uconst: 14) +<2><15d> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x96): st_rdev +DW_AT_decl_file : 2 +DW_AT_decl_line : 14 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><16b> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x62): st_size +DW_AT_decl_file : 2 +DW_AT_decl_line : 15 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><179> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7a): st_blksize +DW_AT_decl_file : 2 +DW_AT_decl_line : 16 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><187> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc3): st_blocks +DW_AT_decl_file : 2 +DW_AT_decl_line : 17 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><195> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d9): st_atime +DW_AT_decl_file : 2 +DW_AT_decl_line : 18 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1a3> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e2): st_atime_nsec +DW_AT_decl_file : 2 +DW_AT_decl_line : 19 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><1b1> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): st_mtime +DW_AT_decl_file : 2 +DW_AT_decl_line : 20 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><1bf> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x180): st_mtime_nsec +DW_AT_decl_file : 2 +DW_AT_decl_line : 21 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><1cd> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x157): st_ctime +DW_AT_decl_file : 2 +DW_AT_decl_line : 22 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><1db> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9): st_ctime_nsec +DW_AT_decl_file : 2 +DW_AT_decl_line : 23 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2><1e9> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fe): __unused4 +DW_AT_decl_file : 2 +DW_AT_decl_line : 24 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><1f7> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x208): __unused5 +DW_AT_decl_file : 2 +DW_AT_decl_line : 25 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<1><206> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x3a): struct_stat +DW_AT_decl_file : 3 +DW_AT_decl_line : 59 +DW_AT_type : <0xfd> +<1><211> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xee): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><21f> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe7): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><22d> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1bf): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><23b> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x85): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 61 +DW_AT_type : <0x206> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_stat.h b/mpers-m32/struct_stat.h new file mode 100644 index 000000000..141cb6170 --- /dev/null +++ b/mpers-m32/struct_stat.h @@ -0,0 +1,24 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t st_dev; +uint32_t st_ino; +uint16_t st_mode; +uint16_t st_nlink; +uint16_t st_uid; +uint16_t st_gid; +uint32_t st_rdev; +uint32_t st_size; +uint32_t st_blksize; +uint32_t st_blocks; +uint32_t st_atime; +uint32_t st_atime_nsec; +uint32_t st_mtime; +uint32_t st_mtime_nsec; +uint32_t st_ctime; +uint32_t st_ctime_nsec; +uint32_t __unused4; +uint32_t __unused5; +} ATTRIBUTE_PACKED m32_struct_stat; +#define MPERS_m32_struct_stat m32_struct_stat diff --git a/mpers-m32/struct_stat64.c b/mpers-m32/struct_stat64.c new file mode 100644 index 000000000..cfececcda --- /dev/null +++ b/mpers-m32/struct_stat64.c @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "asm_stat.h" + +#if defined MPERS_IS_m32 +# undef HAVE_STRUCT_STAT64 +# undef HAVE_STRUCT_STAT64_ST_MTIME_NSEC +# ifdef HAVE_M32_STRUCT_STAT64 +# define HAVE_STRUCT_STAT64 1 +# ifdef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT64_ST_MTIME_NSEC 1 +# endif /* HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC */ +# endif /* HAVE_M32_STRUCT_STAT64 */ +#elif defined MPERS_IS_mx32 +# undef HAVE_STRUCT_STAT64 +# undef HAVE_STRUCT_STAT64_ST_MTIME_NSEC +# ifdef HAVE_MX32_STRUCT_STAT64 +# define HAVE_STRUCT_STAT64 1 +# ifdef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT64_ST_MTIME_NSEC 1 +# endif /* HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC */ +# endif /* HAVE_MX32_STRUCT_STAT64 */ +#endif /* MPERS_IS_m32 || MPERS_IS_mx32 */ + +#ifndef HAVE_STRUCT_STAT64 +struct stat64 {}; +#endif + +typedef struct stat64 struct_stat64; + +struct_stat64 mpers_target_var; diff --git a/mpers-m32/struct_stat64.d1 b/mpers-m32/struct_stat64.d1 new file mode 100644 index 000000000..731b8ca20 --- /dev/null +++ b/mpers-m32/struct_stat64.d1 @@ -0,0 +1,288 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x268 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xff): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x20b): mpers-m32/struct_stat64.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x17e): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x23c): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1e5): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1d7): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x9e): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x38): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x150): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x87): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x22c): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xb6): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1c0): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x16b): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xd0): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0xe8): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0xf5): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x248): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x53): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x15d): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x29): _Bool + <1>: Abbrev Number: 6 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xee): stat64 + <102> DW_AT_byte_size : 96 + <103> DW_AT_decl_file : 2 + <104> DW_AT_decl_line : 39 + <105> DW_AT_sibling : <0x214> + <2><109>: Abbrev Number: 7 (DW_TAG_member) + <10a> DW_AT_name : (indirect string, offset: 0x1fd): st_dev + <10e> DW_AT_decl_file : 2 + <10f> DW_AT_decl_line : 40 + <110> DW_AT_type : <0x4e> + <114> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><117>: Abbrev Number: 7 (DW_TAG_member) + <118> DW_AT_name : (indirect string, offset: 0x225): __pad0 + <11c> DW_AT_decl_file : 2 + <11d> DW_AT_decl_line : 41 + <11e> DW_AT_type : <0x214> + <122> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><125>: Abbrev Number: 7 (DW_TAG_member) + <126> DW_AT_name : (indirect string, offset: 0x17): __st_ino + <12a> DW_AT_decl_file : 2 + <12b> DW_AT_decl_line : 43 + <12c> DW_AT_type : <0x5c> + <130> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><133>: Abbrev Number: 7 (DW_TAG_member) + <134> DW_AT_name : (indirect string, offset: 0xc8): st_mode + <138> DW_AT_decl_file : 2 + <139> DW_AT_decl_line : 45 + <13a> DW_AT_type : <0x47> + <13e> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><141>: Abbrev Number: 7 (DW_TAG_member) + <142> DW_AT_name : (indirect string, offset: 0x2f): st_nlink + <146> DW_AT_decl_file : 2 + <147> DW_AT_decl_line : 46 + <148> DW_AT_type : <0x47> + <14c> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><14f>: Abbrev Number: 7 (DW_TAG_member) + <150> DW_AT_name : (indirect string, offset: 0x1b9): st_uid + <154> DW_AT_decl_file : 2 + <155> DW_AT_decl_line : 48 + <156> DW_AT_type : <0x5c> + <15a> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><15d>: Abbrev Number: 7 (DW_TAG_member) + <15e> DW_AT_name : (indirect string, offset: 0x204): st_gid + <162> DW_AT_decl_file : 2 + <163> DW_AT_decl_line : 49 + <164> DW_AT_type : <0x5c> + <168> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><16b>: Abbrev Number: 7 (DW_TAG_member) + <16c> DW_AT_name : (indirect string, offset: 0x7f): st_rdev + <170> DW_AT_decl_file : 2 + <171> DW_AT_decl_line : 51 + <172> DW_AT_type : <0x4e> + <176> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><179>: Abbrev Number: 7 (DW_TAG_member) + <17a> DW_AT_name : (indirect string, offset: 0x235): __pad3 + <17e> DW_AT_decl_file : 2 + <17f> DW_AT_decl_line : 52 + <180> DW_AT_type : <0x214> + <184> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><187>: Abbrev Number: 7 (DW_TAG_member) + <188> DW_AT_name : (indirect string, offset: 0x4b): st_size + <18c> DW_AT_decl_file : 2 + <18d> DW_AT_decl_line : 54 + <18e> DW_AT_type : <0x32> + <192> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><195>: Abbrev Number: 7 (DW_TAG_member) + <196> DW_AT_name : (indirect string, offset: 0x63): st_blksize + <19a> DW_AT_decl_file : 2 + <19b> DW_AT_decl_line : 55 + <19c> DW_AT_type : <0x5c> + <1a0> DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2><1a3>: Abbrev Number: 7 (DW_TAG_member) + <1a4> DW_AT_name : (indirect string, offset: 0xac): st_blocks + <1a8> DW_AT_decl_file : 2 + <1a9> DW_AT_decl_line : 58 + <1aa> DW_AT_type : <0x4e> + <1ae> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><1b1>: Abbrev Number: 7 (DW_TAG_member) + <1b2> DW_AT_name : (indirect string, offset: 0x20): st_atime + <1b6> DW_AT_decl_file : 2 + <1b7> DW_AT_decl_line : 60 + <1b8> DW_AT_type : <0x5c> + <1bc> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><1bf>: Abbrev Number: 7 (DW_TAG_member) + <1c0> DW_AT_name : (indirect string, offset: 0x1c9): st_atime_nsec + <1c4> DW_AT_decl_file : 2 + <1c5> DW_AT_decl_line : 61 + <1c6> DW_AT_type : <0x5c> + <1ca> DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) + <2><1cd>: Abbrev Number: 7 (DW_TAG_member) + <1ce> DW_AT_name : (indirect string, offset: 0x0): st_mtime + <1d2> DW_AT_decl_file : 2 + <1d3> DW_AT_decl_line : 63 + <1d4> DW_AT_type : <0x5c> + <1d8> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><1db>: Abbrev Number: 7 (DW_TAG_member) + <1dc> DW_AT_name : (indirect string, offset: 0x170): st_mtime_nsec + <1e0> DW_AT_decl_file : 2 + <1e1> DW_AT_decl_line : 64 + <1e2> DW_AT_type : <0x47> + <1e6> DW_AT_data_member_location: 2 byte block: 23 4c (DW_OP_plus_uconst: 76) + <2><1e9>: Abbrev Number: 7 (DW_TAG_member) + <1ea> DW_AT_name : (indirect string, offset: 0x147): st_ctime + <1ee> DW_AT_decl_file : 2 + <1ef> DW_AT_decl_line : 66 + <1f0> DW_AT_type : <0x5c> + <1f4> DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) + <2><1f7>: Abbrev Number: 7 (DW_TAG_member) + <1f8> DW_AT_name : (indirect string, offset: 0x9): st_ctime_nsec + <1fc> DW_AT_decl_file : 2 + <1fd> DW_AT_decl_line : 67 + <1fe> DW_AT_type : <0x5c> + <202> DW_AT_data_member_location: 2 byte block: 23 54 (DW_OP_plus_uconst: 84) + <2><205>: Abbrev Number: 7 (DW_TAG_member) + <206> DW_AT_name : (indirect string, offset: 0x5c): st_ino + <20a> DW_AT_decl_file : 2 + <20b> DW_AT_decl_line : 69 + <20c> DW_AT_type : <0x4e> + <210> DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) + <2><213>: Abbrev Number: 0 + <1><214>: Abbrev Number: 12 (DW_TAG_array_type) + <215> DW_AT_type : <0x39> + <219> DW_AT_sibling : <0x224> + <2><21d>: Abbrev Number: 13 (DW_TAG_subrange_type) + <21e> DW_AT_type : <0x63> + <222> DW_AT_upper_bound : 3 + <2><223>: Abbrev Number: 0 + <1><224>: Abbrev Number: 11 (DW_TAG_typedef) + <225> DW_AT_name : (indirect string, offset: 0x1ef): struct_stat64 + <229> DW_AT_decl_file : 3 + <22a> DW_AT_decl_line : 57 + <22b> DW_AT_type : <0xfd> + <1><22f>: Abbrev Number: 14 (DW_TAG_variable) + <230> DW_AT_name : (indirect string, offset: 0xd7): current_wordsize + <234> DW_AT_decl_file : 4 + <235> DW_AT_decl_line : 757 + <237> DW_AT_type : <0x47> + <23b> DW_AT_external : 1 + <23c> DW_AT_declaration : 1 + <1><23d>: Abbrev Number: 14 (DW_TAG_variable) + <23e> DW_AT_name : (indirect string, offset: 0xd0): sysent + <242> DW_AT_decl_file : 4 + <243> DW_AT_decl_line : 892 + <245> DW_AT_type : <0xeb> + <249> DW_AT_external : 1 + <24a> DW_AT_declaration : 1 + <1><24b>: Abbrev Number: 14 (DW_TAG_variable) + <24c> DW_AT_name : (indirect string, offset: 0x1af): nsyscalls + <250> DW_AT_decl_file : 4 + <251> DW_AT_decl_line : 903 + <253> DW_AT_type : <0x47> + <257> DW_AT_external : 1 + <258> DW_AT_declaration : 1 + <1><259>: Abbrev Number: 15 (DW_TAG_variable) + <25a> DW_AT_name : (indirect string, offset: 0x6e): mpers_target_var + <25e> DW_AT_decl_file : 3 + <25f> DW_AT_decl_line : 59 + <260> DW_AT_type : <0x224> + <264> DW_AT_external : 1 + <265> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><26b>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_stat64.d2 b/mpers-m32/struct_stat64.d2 new file mode 100644 index 000000000..5bef1177a --- /dev/null +++ b/mpers-m32/struct_stat64.d2 @@ -0,0 +1,323 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x23c): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1e5): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1d7): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x9e): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x38): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x150): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x87): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x22c): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb6): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c0): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x16b): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xd0): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe8): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf5): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x248): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x53): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x15d): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x29): _Bool +<1> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xee): stat64 +DW_AT_byte_size : 96 +DW_AT_decl_file : 2 +DW_AT_decl_line : 39 +DW_AT_sibling : <0x214> +<2><109> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fd): st_dev +DW_AT_decl_file : 2 +DW_AT_decl_line : 40 +DW_AT_type : <0x4e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><117> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x225): __pad0 +DW_AT_decl_file : 2 +DW_AT_decl_line : 41 +DW_AT_type : <0x214> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><125> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x17): __st_ino +DW_AT_decl_file : 2 +DW_AT_decl_line : 43 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><133> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc8): st_mode +DW_AT_decl_file : 2 +DW_AT_decl_line : 45 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><141> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2f): st_nlink +DW_AT_decl_file : 2 +DW_AT_decl_line : 46 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><14f> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b9): st_uid +DW_AT_decl_file : 2 +DW_AT_decl_line : 48 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><15d> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x204): st_gid +DW_AT_decl_file : 2 +DW_AT_decl_line : 49 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><16b> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7f): st_rdev +DW_AT_decl_file : 2 +DW_AT_decl_line : 51 +DW_AT_type : <0x4e> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><179> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x235): __pad3 +DW_AT_decl_file : 2 +DW_AT_decl_line : 52 +DW_AT_type : <0x214> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><187> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x4b): st_size +DW_AT_decl_file : 2 +DW_AT_decl_line : 54 +DW_AT_type : <0x32> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><195> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x63): st_blksize +DW_AT_decl_file : 2 +DW_AT_decl_line : 55 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2><1a3> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xac): st_blocks +DW_AT_decl_file : 2 +DW_AT_decl_line : 58 +DW_AT_type : <0x4e> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><1b1> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x20): st_atime +DW_AT_decl_file : 2 +DW_AT_decl_line : 60 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><1bf> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c9): st_atime_nsec +DW_AT_decl_file : 2 +DW_AT_decl_line : 61 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) +<2><1cd> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): st_mtime +DW_AT_decl_file : 2 +DW_AT_decl_line : 63 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><1db> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x170): st_mtime_nsec +DW_AT_decl_file : 2 +DW_AT_decl_line : 64 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 4c (DW_OP_plus_uconst: 76) +<2><1e9> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x147): st_ctime +DW_AT_decl_file : 2 +DW_AT_decl_line : 66 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) +<2><1f7> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9): st_ctime_nsec +DW_AT_decl_file : 2 +DW_AT_decl_line : 67 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 54 (DW_OP_plus_uconst: 84) +<2><205> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5c): st_ino +DW_AT_decl_file : 2 +DW_AT_decl_line : 69 +DW_AT_type : <0x4e> +DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) +<1><214> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x39> +DW_AT_sibling : <0x224> +<2><21d> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 3 +<1><224> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1ef): struct_stat64 +DW_AT_decl_file : 3 +DW_AT_decl_line : 57 +DW_AT_type : <0xfd> +<1><22f> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd7): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><23d> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd0): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><24b> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1af): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><259> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x6e): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 59 +DW_AT_type : <0x224> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_stat64.h b/mpers-m32/struct_stat64.h new file mode 100644 index 000000000..073029035 --- /dev/null +++ b/mpers-m32/struct_stat64.h @@ -0,0 +1,25 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint64_t st_dev; +unsigned char __pad0[4]; +uint32_t __st_ino; +uint32_t st_mode; +uint32_t st_nlink; +uint32_t st_uid; +uint32_t st_gid; +uint64_t st_rdev; +unsigned char __pad3[4]; +int64_t st_size; +uint32_t st_blksize; +uint64_t st_blocks; +uint32_t st_atime; +uint32_t st_atime_nsec; +uint32_t st_mtime; +uint32_t st_mtime_nsec; +uint32_t st_ctime; +uint32_t st_ctime_nsec; +uint64_t st_ino; +} ATTRIBUTE_PACKED m32_struct_stat64; +#define MPERS_m32_struct_stat64 m32_struct_stat64 diff --git a/mpers-m32/struct_statfs.c b/mpers-m32/struct_statfs.c new file mode 100644 index 000000000..0c0589068 --- /dev/null +++ b/mpers-m32/struct_statfs.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +typedef struct statfs struct_statfs; +typedef struct statfs64 struct_statfs64; + +struct_statfs mpers_target_var; diff --git a/mpers-m32/struct_statfs.d1 b/mpers-m32/struct_statfs.d1 new file mode 100644 index 000000000..88d986929 --- /dev/null +++ b/mpers-m32/struct_statfs.d1 @@ -0,0 +1,275 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x243 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x106): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x1e4): mpers-m32/struct_statfs.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x188): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x207): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1da): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1cc): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x9e): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x2b): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x157): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x80): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1fe): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xb6): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_array_type) + <64> DW_AT_type : <0x2b> + <68> DW_AT_sibling : <0x73> + <2><6c>: Abbrev Number: 5 (DW_TAG_subrange_type) + <6d> DW_AT_type : <0x73> + <71> DW_AT_upper_bound : 1 + <2><72>: Abbrev Number: 0 + <1><73>: Abbrev Number: 2 (DW_TAG_base_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_encoding : 7 (unsigned) + <76> DW_AT_name : (indirect string, offset: 0x1c3): sizetype + <1><7a>: Abbrev Number: 2 (DW_TAG_base_type) + <7b> DW_AT_byte_size : 1 + <7c> DW_AT_encoding : 6 (signed char) + <7d> DW_AT_name : (indirect string, offset: 0x172): char + <1><81>: Abbrev Number: 6 (DW_TAG_pointer_type) + <82> DW_AT_byte_size : 4 + <83> DW_AT_type : <0x87> + <1><87>: Abbrev Number: 7 (DW_TAG_const_type) + <88> DW_AT_type : <0x7a> + <1><8c>: Abbrev Number: 8 (DW_TAG_structure_type) + <8d> DW_AT_byte_size : 8 + <8e> DW_AT_decl_file : 2 + <8f> DW_AT_decl_line : 78 + <90> DW_AT_sibling : <0xa3> + <2><94>: Abbrev Number: 9 (DW_TAG_member) + <95> DW_AT_name : val + <99> DW_AT_decl_file : 2 + <9a> DW_AT_decl_line : 79 + <9b> DW_AT_type : <0x63> + <9f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0xdf): __kernel_fsid_t + DW_AT_decl_file : 2 + DW_AT_decl_line : 80 + DW_AT_type : <0x8c> + <1>: Abbrev Number: 11 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xd0): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 1 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x101> + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x100): nargs + DW_AT_decl_file : 1 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x76): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 +
DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x213): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0x10c> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x3e): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x81> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><100>: Abbrev Number: 0 + <1><101>: Abbrev Number: 13 (DW_TAG_subroutine_type) + <102> DW_AT_type : <0x2b> + <106> DW_AT_sibling : <0x10c> + <2><10a>: Abbrev Number: 14 (DW_TAG_unspecified_parameters) + <2><10b>: Abbrev Number: 0 + <1><10c>: Abbrev Number: 6 (DW_TAG_pointer_type) + <10d> DW_AT_byte_size : 4 + <10e> DW_AT_type : <0x101> + <1><112>: Abbrev Number: 10 (DW_TAG_typedef) + <113> DW_AT_name : (indirect string, offset: 0x164): struct_sysent + <117> DW_AT_decl_file : 1 + <118> DW_AT_decl_line : 10 + <119> DW_AT_type : <0xae> + <1><11d>: Abbrev Number: 6 (DW_TAG_pointer_type) + <11e> DW_AT_byte_size : 4 + <11f> DW_AT_type : <0x123> + <1><123>: Abbrev Number: 7 (DW_TAG_const_type) + <124> DW_AT_type : <0x112> + <1><128>: Abbrev Number: 2 (DW_TAG_base_type) + <129> DW_AT_byte_size : 1 + <12a> DW_AT_encoding : 2 (boolean) + <12b> DW_AT_name : (indirect string, offset: 0xf): _Bool + <1><12f>: Abbrev Number: 10 (DW_TAG_typedef) + <130> DW_AT_name : (indirect string, offset: 0x15): __u32 + <134> DW_AT_decl_file : 3 + <135> DW_AT_decl_line : 26 + <136> DW_AT_type : <0x47> + <1><13a>: Abbrev Number: 11 (DW_TAG_structure_type) + <13b> DW_AT_name : (indirect string, offset: 0x97): statfs + <13f> DW_AT_byte_size : 64 + <140> DW_AT_decl_file : 4 + <141> DW_AT_decl_line : 22 + <142> DW_AT_sibling : <0x1ef> + <2><146>: Abbrev Number: 12 (DW_TAG_member) + <147> DW_AT_name : (indirect string, offset: 0x0): f_type + <14b> DW_AT_decl_file : 4 + <14c> DW_AT_decl_line : 23 + <14d> DW_AT_type : <0x12f> + <151> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><154>: Abbrev Number: 12 (DW_TAG_member) + <155> DW_AT_name : (indirect string, offset: 0x1b): f_bsize + <159> DW_AT_decl_file : 4 + <15a> DW_AT_decl_line : 24 + <15b> DW_AT_type : <0x12f> + <15f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><162>: Abbrev Number: 12 (DW_TAG_member) + <163> DW_AT_name : (indirect string, offset: 0x5c): f_blocks + <167> DW_AT_decl_file : 4 + <168> DW_AT_decl_line : 25 + <169> DW_AT_type : <0x12f> + <16d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><170>: Abbrev Number: 12 (DW_TAG_member) + <171> DW_AT_name : (indirect string, offset: 0xd7): f_bfree + <175> DW_AT_decl_file : 4 + <176> DW_AT_decl_line : 26 + <177> DW_AT_type : <0x12f> + <17b> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><17e>: Abbrev Number: 12 (DW_TAG_member) + <17f> DW_AT_name : (indirect string, offset: 0x14e): f_bavail + <183> DW_AT_decl_file : 4 + <184> DW_AT_decl_line : 27 + <185> DW_AT_type : <0x12f> + <189> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><18c>: Abbrev Number: 12 (DW_TAG_member) + <18d> DW_AT_name : (indirect string, offset: 0x7): f_files + <191> DW_AT_decl_file : 4 + <192> DW_AT_decl_line : 28 + <193> DW_AT_type : <0x12f> + <197> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><19a>: Abbrev Number: 12 (DW_TAG_member) + <19b> DW_AT_name : (indirect string, offset: 0xc8): f_ffree + <19f> DW_AT_decl_file : 4 + <1a0> DW_AT_decl_line : 29 + <1a1> DW_AT_type : <0x12f> + <1a5> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1a8>: Abbrev Number: 12 (DW_TAG_member) + <1a9> DW_AT_name : (indirect string, offset: 0x55): f_fsid + <1ad> DW_AT_decl_file : 4 + <1ae> DW_AT_decl_line : 30 + <1af> DW_AT_type : <0xa3> + <1b3> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><1b6>: Abbrev Number: 12 (DW_TAG_member) + <1b7> DW_AT_name : (indirect string, offset: 0xac): f_namelen + <1bb> DW_AT_decl_file : 4 + <1bc> DW_AT_decl_line : 31 + <1bd> DW_AT_type : <0x12f> + <1c1> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><1c4>: Abbrev Number: 12 (DW_TAG_member) + <1c5> DW_AT_name : (indirect string, offset: 0x177): f_frsize + <1c9> DW_AT_decl_file : 4 + <1ca> DW_AT_decl_line : 32 + <1cb> DW_AT_type : <0x12f> + <1cf> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1d2>: Abbrev Number: 12 (DW_TAG_member) + <1d3> DW_AT_name : (indirect string, offset: 0x23): f_flags + <1d7> DW_AT_decl_file : 4 + <1d8> DW_AT_decl_line : 33 + <1d9> DW_AT_type : <0x12f> + <1dd> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><1e0>: Abbrev Number: 12 (DW_TAG_member) + <1e1> DW_AT_name : (indirect string, offset: 0x180): f_spare + <1e5> DW_AT_decl_file : 4 + <1e6> DW_AT_decl_line : 34 + <1e7> DW_AT_type : <0x1ef> + <1eb> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><1ee>: Abbrev Number: 0 + <1><1ef>: Abbrev Number: 4 (DW_TAG_array_type) + <1f0> DW_AT_type : <0x12f> + <1f4> DW_AT_sibling : <0x1ff> + <2><1f8>: Abbrev Number: 5 (DW_TAG_subrange_type) + <1f9> DW_AT_type : <0x73> + <1fd> DW_AT_upper_bound : 3 + <2><1fe>: Abbrev Number: 0 + <1><1ff>: Abbrev Number: 10 (DW_TAG_typedef) + <200> DW_AT_name : (indirect string, offset: 0x47): struct_statfs + <204> DW_AT_decl_file : 5 + <205> DW_AT_decl_line : 33 + <206> DW_AT_type : <0x13a> + <1><20a>: Abbrev Number: 15 (DW_TAG_variable) + <20b> DW_AT_name : (indirect string, offset: 0xef): current_wordsize + <20f> DW_AT_decl_file : 6 + <210> DW_AT_decl_line : 757 + <212> DW_AT_type : <0x47> + <216> DW_AT_external : 1 + <217> DW_AT_declaration : 1 + <1><218>: Abbrev Number: 15 (DW_TAG_variable) + <219> DW_AT_name : (indirect string, offset: 0xd0): sysent + <21d> DW_AT_decl_file : 6 + <21e> DW_AT_decl_line : 892 + <220> DW_AT_type : <0x11d> + <224> DW_AT_external : 1 + <225> DW_AT_declaration : 1 + <1><226>: Abbrev Number: 15 (DW_TAG_variable) + <227> DW_AT_name : (indirect string, offset: 0x1b9): nsyscalls + <22b> DW_AT_decl_file : 6 + <22c> DW_AT_decl_line : 903 + <22e> DW_AT_type : <0x47> + <232> DW_AT_external : 1 + <233> DW_AT_declaration : 1 + <1><234>: Abbrev Number: 16 (DW_TAG_variable) + <235> DW_AT_name : (indirect string, offset: 0x65): mpers_target_var + <239> DW_AT_decl_file : 5 + <23a> DW_AT_decl_line : 36 + <23b> DW_AT_type : <0x1ff> + <23f> DW_AT_external : 1 + <240> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><246>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_statfs.d2 b/mpers-m32/struct_statfs.d2 new file mode 100644 index 000000000..e40cb1b3f --- /dev/null +++ b/mpers-m32/struct_statfs.d2 @@ -0,0 +1,307 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x207): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1da): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1cc): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x9e): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2b): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x157): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x80): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1fe): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb6): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x73> +<2><6c> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x73> +DW_AT_upper_bound : 1 +<1><73> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c3): sizetype +<1><7a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x172): char +<1><81> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x87> +<1><87> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x7a> +<1><8c> +Abbrev Number: 8 (DW_TAG_structure_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 78 +DW_AT_sibling : <0xa3> +<2><94> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : val +DW_AT_decl_file : 2 +DW_AT_decl_line : 79 +DW_AT_type : <0x63> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<1> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xdf): __kernel_fsid_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 80 +DW_AT_type : <0x8c> +<1> +Abbrev Number: 11 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xd0): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x101> +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x100): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x76): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x213): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0x10c> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3e): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x81> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><101> +Abbrev Number: 13 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x10c> +<2><10a> +Abbrev Number: 14 (DW_TAG_unspecified_parameters) +<1><10c> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x101> +<1><112> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x164): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0xae> +<1><11d> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x123> +<1><123> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x112> +<1><128> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xf): _Bool +<1><12f> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x15): __u32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><13a> +Abbrev Number: 11 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x97): statfs +DW_AT_byte_size : 64 +DW_AT_decl_file : 4 +DW_AT_decl_line : 22 +DW_AT_sibling : <0x1ef> +<2><146> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): f_type +DW_AT_decl_file : 4 +DW_AT_decl_line : 23 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><154> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b): f_bsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 24 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><162> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5c): f_blocks +DW_AT_decl_file : 4 +DW_AT_decl_line : 25 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><170> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd7): f_bfree +DW_AT_decl_file : 4 +DW_AT_decl_line : 26 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><17e> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14e): f_bavail +DW_AT_decl_file : 4 +DW_AT_decl_line : 27 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><18c> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7): f_files +DW_AT_decl_file : 4 +DW_AT_decl_line : 28 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><19a> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc8): f_ffree +DW_AT_decl_file : 4 +DW_AT_decl_line : 29 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1a8> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x55): f_fsid +DW_AT_decl_file : 4 +DW_AT_decl_line : 30 +DW_AT_type : <0xa3> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><1b6> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xac): f_namelen +DW_AT_decl_file : 4 +DW_AT_decl_line : 31 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><1c4> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x177): f_frsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 32 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><1d2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23): f_flags +DW_AT_decl_file : 4 +DW_AT_decl_line : 33 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><1e0> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x180): f_spare +DW_AT_decl_file : 4 +DW_AT_decl_line : 34 +DW_AT_type : <0x1ef> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<1><1ef> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x12f> +DW_AT_sibling : <0x1ff> +<2><1f8> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x73> +DW_AT_upper_bound : 3 +<1><1ff> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x47): struct_statfs +DW_AT_decl_file : 5 +DW_AT_decl_line : 33 +DW_AT_type : <0x13a> +<1><20a> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xef): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><218> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd0): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x11d> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><226> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1b9): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><234> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x65): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 36 +DW_AT_type : <0x1ff> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_statfs.h b/mpers-m32/struct_statfs.h new file mode 100644 index 000000000..768554586 --- /dev/null +++ b/mpers-m32/struct_statfs.h @@ -0,0 +1,20 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t f_type; +uint32_t f_bsize; +uint32_t f_blocks; +uint32_t f_bfree; +uint32_t f_bavail; +uint32_t f_files; +uint32_t f_ffree; +struct { +int32_t val[2]; +} ATTRIBUTE_PACKED f_fsid; +uint32_t f_namelen; +uint32_t f_frsize; +uint32_t f_flags; +uint32_t f_spare[4]; +} ATTRIBUTE_PACKED m32_struct_statfs; +#define MPERS_m32_struct_statfs m32_struct_statfs diff --git a/mpers-m32/struct_statfs64.c b/mpers-m32/struct_statfs64.c new file mode 100644 index 000000000..2b287cbb5 --- /dev/null +++ b/mpers-m32/struct_statfs64.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +typedef struct statfs struct_statfs; +typedef struct statfs64 struct_statfs64; + +struct_statfs64 mpers_target_var; diff --git a/mpers-m32/struct_statfs64.d1 b/mpers-m32/struct_statfs64.d1 new file mode 100644 index 000000000..7c32a6836 --- /dev/null +++ b/mpers-m32/struct_statfs64.d1 @@ -0,0 +1,280 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x24e (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x116): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x3e): mpers-m32/struct_statfs64.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x198): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x213): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x200): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1e2): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xa5): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x2b): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x167): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x8e): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x20a): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xbd): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_array_type) + <64> DW_AT_type : <0x2b> + <68> DW_AT_sibling : <0x73> + <2><6c>: Abbrev Number: 5 (DW_TAG_subrange_type) + <6d> DW_AT_type : <0x73> + <71> DW_AT_upper_bound : 1 + <2><72>: Abbrev Number: 0 + <1><73>: Abbrev Number: 2 (DW_TAG_base_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_encoding : 7 (unsigned) + <76> DW_AT_name : (indirect string, offset: 0x1d9): sizetype + <1><7a>: Abbrev Number: 2 (DW_TAG_base_type) + <7b> DW_AT_byte_size : 1 + <7c> DW_AT_encoding : 6 (signed char) + <7d> DW_AT_name : (indirect string, offset: 0x182): char + <1><81>: Abbrev Number: 6 (DW_TAG_pointer_type) + <82> DW_AT_byte_size : 4 + <83> DW_AT_type : <0x87> + <1><87>: Abbrev Number: 7 (DW_TAG_const_type) + <88> DW_AT_type : <0x7a> + <1><8c>: Abbrev Number: 8 (DW_TAG_structure_type) + <8d> DW_AT_byte_size : 8 + <8e> DW_AT_decl_file : 2 + <8f> DW_AT_decl_line : 78 + <90> DW_AT_sibling : <0xa3> + <2><94>: Abbrev Number: 9 (DW_TAG_member) + <95> DW_AT_name : val + <99> DW_AT_decl_file : 2 + <9a> DW_AT_decl_line : 79 + <9b> DW_AT_type : <0x63> + <9f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1f0): __kernel_fsid_t + DW_AT_decl_file : 2 + DW_AT_decl_line : 80 + DW_AT_type : <0x8c> + <1>: Abbrev Number: 11 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xd7): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 1 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x101> + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x110): nargs + DW_AT_decl_file : 1 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x84): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 +
DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x21f): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0x10c> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x5a): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x81> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><100>: Abbrev Number: 0 + <1><101>: Abbrev Number: 13 (DW_TAG_subroutine_type) + <102> DW_AT_type : <0x2b> + <106> DW_AT_sibling : <0x10c> + <2><10a>: Abbrev Number: 14 (DW_TAG_unspecified_parameters) + <2><10b>: Abbrev Number: 0 + <1><10c>: Abbrev Number: 6 (DW_TAG_pointer_type) + <10d> DW_AT_byte_size : 4 + <10e> DW_AT_type : <0x101> + <1><112>: Abbrev Number: 10 (DW_TAG_typedef) + <113> DW_AT_name : (indirect string, offset: 0x174): struct_sysent + <117> DW_AT_decl_file : 1 + <118> DW_AT_decl_line : 10 + <119> DW_AT_type : <0xae> + <1><11d>: Abbrev Number: 6 (DW_TAG_pointer_type) + <11e> DW_AT_byte_size : 4 + <11f> DW_AT_type : <0x123> + <1><123>: Abbrev Number: 7 (DW_TAG_const_type) + <124> DW_AT_type : <0x112> + <1><128>: Abbrev Number: 2 (DW_TAG_base_type) + <129> DW_AT_byte_size : 1 + <12a> DW_AT_encoding : 2 (boolean) + <12b> DW_AT_name : (indirect string, offset: 0xf): _Bool + <1><12f>: Abbrev Number: 10 (DW_TAG_typedef) + <130> DW_AT_name : (indirect string, offset: 0x15): __u32 + <134> DW_AT_decl_file : 3 + <135> DW_AT_decl_line : 26 + <136> DW_AT_type : <0x47> + <1><13a>: Abbrev Number: 10 (DW_TAG_typedef) + <13b> DW_AT_name : (indirect string, offset: 0x1d3): __u64 + <13f> DW_AT_decl_file : 3 + <140> DW_AT_decl_line : 30 + <141> DW_AT_type : <0x4e> + <1><145>: Abbrev Number: 4 (DW_TAG_array_type) + <146> DW_AT_type : <0x12f> + <14a> DW_AT_sibling : <0x155> + <2><14e>: Abbrev Number: 5 (DW_TAG_subrange_type) + <14f> DW_AT_type : <0x73> + <153> DW_AT_upper_bound : 3 + <2><154>: Abbrev Number: 0 + <1><155>: Abbrev Number: 11 (DW_TAG_structure_type) + <156> DW_AT_name : (indirect string, offset: 0xde): statfs64 + <15a> DW_AT_byte_size : 84 + <15b> DW_AT_decl_file : 4 + <15c> DW_AT_decl_line : 45 + <15d> DW_AT_sibling : <0x20a> + <2><161>: Abbrev Number: 12 (DW_TAG_member) + <162> DW_AT_name : (indirect string, offset: 0x0): f_type + <166> DW_AT_decl_file : 4 + <167> DW_AT_decl_line : 46 + <168> DW_AT_type : <0x12f> + <16c> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><16f>: Abbrev Number: 12 (DW_TAG_member) + <170> DW_AT_name : (indirect string, offset: 0x1b): f_bsize + <174> DW_AT_decl_file : 4 + <175> DW_AT_decl_line : 47 + <176> DW_AT_type : <0x12f> + <17a> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><17d>: Abbrev Number: 12 (DW_TAG_member) + <17e> DW_AT_name : (indirect string, offset: 0x6a): f_blocks + <182> DW_AT_decl_file : 4 + <183> DW_AT_decl_line : 48 + <184> DW_AT_type : <0x13a> + <188> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><18b>: Abbrev Number: 12 (DW_TAG_member) + <18c> DW_AT_name : (indirect string, offset: 0xe7): f_bfree + <190> DW_AT_decl_file : 4 + <191> DW_AT_decl_line : 49 + <192> DW_AT_type : <0x13a> + <196> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><199>: Abbrev Number: 12 (DW_TAG_member) + <19a> DW_AT_name : (indirect string, offset: 0x15e): f_bavail + <19e> DW_AT_decl_file : 4 + <19f> DW_AT_decl_line : 50 + <1a0> DW_AT_type : <0x13a> + <1a4> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1a7>: Abbrev Number: 12 (DW_TAG_member) + <1a8> DW_AT_name : (indirect string, offset: 0x7): f_files + <1ac> DW_AT_decl_file : 4 + <1ad> DW_AT_decl_line : 51 + <1ae> DW_AT_type : <0x13a> + <1b2> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1b5>: Abbrev Number: 12 (DW_TAG_member) + <1b6> DW_AT_name : (indirect string, offset: 0xcf): f_ffree + <1ba> DW_AT_decl_file : 4 + <1bb> DW_AT_decl_line : 52 + <1bc> DW_AT_type : <0x13a> + <1c0> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1c3>: Abbrev Number: 12 (DW_TAG_member) + <1c4> DW_AT_name : (indirect string, offset: 0x63): f_fsid + <1c8> DW_AT_decl_file : 4 + <1c9> DW_AT_decl_line : 53 + <1ca> DW_AT_type : <0xa3> + <1ce> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><1d1>: Abbrev Number: 12 (DW_TAG_member) + <1d2> DW_AT_name : (indirect string, offset: 0xb3): f_namelen + <1d6> DW_AT_decl_file : 4 + <1d7> DW_AT_decl_line : 54 + <1d8> DW_AT_type : <0x12f> + <1dc> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><1df>: Abbrev Number: 12 (DW_TAG_member) + <1e0> DW_AT_name : (indirect string, offset: 0x187): f_frsize + <1e4> DW_AT_decl_file : 4 + <1e5> DW_AT_decl_line : 55 + <1e6> DW_AT_type : <0x12f> + <1ea> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><1ed>: Abbrev Number: 12 (DW_TAG_member) + <1ee> DW_AT_name : (indirect string, offset: 0x23): f_flags + <1f2> DW_AT_decl_file : 4 + <1f3> DW_AT_decl_line : 56 + <1f4> DW_AT_type : <0x12f> + <1f8> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><1fb>: Abbrev Number: 12 (DW_TAG_member) + <1fc> DW_AT_name : (indirect string, offset: 0x190): f_spare + <200> DW_AT_decl_file : 4 + <201> DW_AT_decl_line : 57 + <202> DW_AT_type : <0x145> + <206> DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) + <2><209>: Abbrev Number: 0 + <1><20a>: Abbrev Number: 10 (DW_TAG_typedef) + <20b> DW_AT_name : (indirect string, offset: 0xef): struct_statfs64 + <20f> DW_AT_decl_file : 5 + <210> DW_AT_decl_line : 34 + <211> DW_AT_type : <0x155> + <1><215>: Abbrev Number: 15 (DW_TAG_variable) + <216> DW_AT_name : (indirect string, offset: 0xff): current_wordsize + <21a> DW_AT_decl_file : 6 + <21b> DW_AT_decl_line : 757 + <21d> DW_AT_type : <0x47> + <221> DW_AT_external : 1 + <222> DW_AT_declaration : 1 + <1><223>: Abbrev Number: 15 (DW_TAG_variable) + <224> DW_AT_name : (indirect string, offset: 0xd7): sysent + <228> DW_AT_decl_file : 6 + <229> DW_AT_decl_line : 892 + <22b> DW_AT_type : <0x11d> + <22f> DW_AT_external : 1 + <230> DW_AT_declaration : 1 + <1><231>: Abbrev Number: 15 (DW_TAG_variable) + <232> DW_AT_name : (indirect string, offset: 0x1c9): nsyscalls + <236> DW_AT_decl_file : 6 + <237> DW_AT_decl_line : 903 + <239> DW_AT_type : <0x47> + <23d> DW_AT_external : 1 + <23e> DW_AT_declaration : 1 + <1><23f>: Abbrev Number: 16 (DW_TAG_variable) + <240> DW_AT_name : (indirect string, offset: 0x73): mpers_target_var + <244> DW_AT_decl_file : 5 + <245> DW_AT_decl_line : 36 + <246> DW_AT_type : <0x20a> + <24a> DW_AT_external : 1 + <24b> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><251>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_statfs64.d2 b/mpers-m32/struct_statfs64.d2 new file mode 100644 index 000000000..a477d15ed --- /dev/null +++ b/mpers-m32/struct_statfs64.d2 @@ -0,0 +1,313 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x213): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x200): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1e2): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xa5): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2b): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x167): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x8e): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x20a): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xbd): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x73> +<2><6c> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x73> +DW_AT_upper_bound : 1 +<1><73> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1d9): sizetype +<1><7a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x182): char +<1><81> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x87> +<1><87> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x7a> +<1><8c> +Abbrev Number: 8 (DW_TAG_structure_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 78 +DW_AT_sibling : <0xa3> +<2><94> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : val +DW_AT_decl_file : 2 +DW_AT_decl_line : 79 +DW_AT_type : <0x63> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<1> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1f0): __kernel_fsid_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 80 +DW_AT_type : <0x8c> +<1> +Abbrev Number: 11 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xd7): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x101> +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x110): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x84): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21f): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0x10c> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5a): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x81> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><101> +Abbrev Number: 13 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x10c> +<2><10a> +Abbrev Number: 14 (DW_TAG_unspecified_parameters) +<1><10c> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x101> +<1><112> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x174): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0xae> +<1><11d> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x123> +<1><123> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x112> +<1><128> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xf): _Bool +<1><12f> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x15): __u32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><13a> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1d3): __u64 +DW_AT_decl_file : 3 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><145> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x12f> +DW_AT_sibling : <0x155> +<2><14e> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x73> +DW_AT_upper_bound : 3 +<1><155> +Abbrev Number: 11 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xde): statfs64 +DW_AT_byte_size : 84 +DW_AT_decl_file : 4 +DW_AT_decl_line : 45 +DW_AT_sibling : <0x20a> +<2><161> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): f_type +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><16f> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b): f_bsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><17d> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6a): f_blocks +DW_AT_decl_file : 4 +DW_AT_decl_line : 48 +DW_AT_type : <0x13a> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><18b> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe7): f_bfree +DW_AT_decl_file : 4 +DW_AT_decl_line : 49 +DW_AT_type : <0x13a> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><199> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15e): f_bavail +DW_AT_decl_file : 4 +DW_AT_decl_line : 50 +DW_AT_type : <0x13a> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1a7> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7): f_files +DW_AT_decl_file : 4 +DW_AT_decl_line : 51 +DW_AT_type : <0x13a> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1b5> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xcf): f_ffree +DW_AT_decl_file : 4 +DW_AT_decl_line : 52 +DW_AT_type : <0x13a> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><1c3> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x63): f_fsid +DW_AT_decl_file : 4 +DW_AT_decl_line : 53 +DW_AT_type : <0xa3> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><1d1> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb3): f_namelen +DW_AT_decl_file : 4 +DW_AT_decl_line : 54 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><1df> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x187): f_frsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 55 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<2><1ed> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23): f_flags +DW_AT_decl_file : 4 +DW_AT_decl_line : 56 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><1fb> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x190): f_spare +DW_AT_decl_file : 4 +DW_AT_decl_line : 57 +DW_AT_type : <0x145> +DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) +<1><20a> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xef): struct_statfs64 +DW_AT_decl_file : 5 +DW_AT_decl_line : 34 +DW_AT_type : <0x155> +<1><215> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xff): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><223> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd7): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x11d> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><231> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1c9): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><23f> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x73): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 36 +DW_AT_type : <0x20a> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_statfs64.h b/mpers-m32/struct_statfs64.h new file mode 100644 index 000000000..7f19207b8 --- /dev/null +++ b/mpers-m32/struct_statfs64.h @@ -0,0 +1,20 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t f_type; +uint32_t f_bsize; +uint64_t f_blocks; +uint64_t f_bfree; +uint64_t f_bavail; +uint64_t f_files; +uint64_t f_ffree; +struct { +int32_t val[2]; +} ATTRIBUTE_PACKED f_fsid; +uint32_t f_namelen; +uint32_t f_frsize; +uint32_t f_flags; +uint32_t f_spare[4]; +} ATTRIBUTE_PACKED m32_struct_statfs64; +#define MPERS_m32_struct_statfs64 m32_struct_statfs64 diff --git a/mpers-m32/struct_timex.c b/mpers-m32/struct_timex.c new file mode 100644 index 000000000..d66cba460 --- /dev/null +++ b/mpers-m32/struct_timex.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 2006-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +typedef struct timex struct_timex; + +struct_timex mpers_target_var; diff --git a/mpers-m32/struct_timex.d1 b/mpers-m32/struct_timex.d1 new file mode 100644 index 000000000..d3df4560a --- /dev/null +++ b/mpers-m32/struct_timex.d1 @@ -0,0 +1,321 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x2b0 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x10e): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x0): mpers-m32/struct_timex.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1a2): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x23e): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x21e): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1f5): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xc3): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x50): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x16a): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x9e): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x22f): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xd1): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1e5): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0xfa): __time_t + <6f> DW_AT_decl_file : 1 + <70> DW_AT_decl_line : 139 + <71> DW_AT_type : <0x55> + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x18c): __suseconds_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 141 + <7c> DW_AT_type : <0x55> + <1><80>: Abbrev Number: 4 (DW_TAG_typedef) + <81> DW_AT_name : (indirect string, offset: 0x253): __syscall_slong_t + <85> DW_AT_decl_file : 1 + <86> DW_AT_decl_line : 175 + <87> DW_AT_type : <0x55> + <1><8b>: Abbrev Number: 2 (DW_TAG_base_type) + <8c> DW_AT_byte_size : 1 + <8d> DW_AT_encoding : 6 (signed char) + <8e> DW_AT_name : (indirect string, offset: 0x187): char + <1><92>: Abbrev Number: 5 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0x162): timeval + <97> DW_AT_byte_size : 8 + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 30 + <9a> DW_AT_sibling : <0xbb> + <2><9e>: Abbrev Number: 6 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0x1ee): tv_sec + DW_AT_decl_file : 2 + DW_AT_decl_line : 32 + DW_AT_type : <0x6a> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x19a): tv_usec + DW_AT_decl_file : 2 + DW_AT_decl_line : 33 + DW_AT_type : <0x75> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xc1> + <1>: Abbrev Number: 8 (DW_TAG_const_type) + DW_AT_type : <0x8b> + <1>: Abbrev Number: 5 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xe3): timex + DW_AT_byte_size : 128 + DW_AT_decl_file : 3 + DW_AT_decl_line : 25 + DW_AT_sibling : <0x1eb> + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x238): modes + DW_AT_decl_file : 3 + DW_AT_decl_line : 27 + DW_AT_type : <0x47> +
DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x217): offset + DW_AT_decl_file : 3 + DW_AT_decl_line : 28 + DW_AT_type : <0x80> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x156): freq + DW_AT_decl_file : 3 + DW_AT_decl_line : 29 + DW_AT_type : <0x80> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x7a): maxerror + <101> DW_AT_decl_file : 3 + <102> DW_AT_decl_line : 30 + <103> DW_AT_type : <0x80> + <107> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><10a>: Abbrev Number: 6 (DW_TAG_member) + <10b> DW_AT_name : (indirect string, offset: 0x2c): esterror + <10f> DW_AT_decl_file : 3 + <110> DW_AT_decl_line : 31 + <111> DW_AT_type : <0x80> + <115> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><118>: Abbrev Number: 6 (DW_TAG_member) + <119> DW_AT_name : (indirect string, offset: 0x6a): status + <11d> DW_AT_decl_file : 3 + <11e> DW_AT_decl_line : 32 + <11f> DW_AT_type : <0x2b> + <123> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><126>: Abbrev Number: 6 (DW_TAG_member) + <127> DW_AT_name : (indirect string, offset: 0x177): constant + <12b> DW_AT_decl_file : 3 + <12c> DW_AT_decl_line : 33 + <12d> DW_AT_type : <0x80> + <131> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><134>: Abbrev Number: 6 (DW_TAG_member) + <135> DW_AT_name : (indirect string, offset: 0x203): precision + <139> DW_AT_decl_file : 3 + <13a> DW_AT_decl_line : 34 + <13b> DW_AT_type : <0x80> + <13f> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><142>: Abbrev Number: 6 (DW_TAG_member) + <143> DW_AT_name : (indirect string, offset: 0x20d): tolerance + <147> DW_AT_decl_file : 3 + <148> DW_AT_decl_line : 35 + <149> DW_AT_type : <0x80> + <14d> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><150>: Abbrev Number: 6 (DW_TAG_member) + <151> DW_AT_name : (indirect string, offset: 0x265): time + <155> DW_AT_decl_file : 3 + <156> DW_AT_decl_line : 36 + <157> DW_AT_type : <0x92> + <15b> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><15e>: Abbrev Number: 6 (DW_TAG_member) + <15f> DW_AT_name : (indirect string, offset: 0x103): tick + <163> DW_AT_decl_file : 3 + <164> DW_AT_decl_line : 37 + <165> DW_AT_type : <0x80> + <169> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><16c>: Abbrev Number: 6 (DW_TAG_member) + <16d> DW_AT_name : (indirect string, offset: 0x1dd): ppsfreq + <171> DW_AT_decl_file : 3 + <172> DW_AT_decl_line : 38 + <173> DW_AT_type : <0x80> + <177> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><17a>: Abbrev Number: 6 (DW_TAG_member) + <17b> DW_AT_name : (indirect string, offset: 0xbc): jitter + <17f> DW_AT_decl_file : 3 + <180> DW_AT_decl_line : 39 + <181> DW_AT_type : <0x80> + <185> DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2><188>: Abbrev Number: 6 (DW_TAG_member) + <189> DW_AT_name : (indirect string, offset: 0x26): shift + <18d> DW_AT_decl_file : 3 + <18e> DW_AT_decl_line : 40 + <18f> DW_AT_type : <0x2b> + <193> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><196>: Abbrev Number: 6 (DW_TAG_member) + <197> DW_AT_name : (indirect string, offset: 0x180): stabil + <19b> DW_AT_decl_file : 3 + <19c> DW_AT_decl_line : 41 + <19d> DW_AT_type : <0x80> + <1a1> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><1a4>: Abbrev Number: 6 (DW_TAG_member) + <1a5> DW_AT_name : (indirect string, offset: 0x63): jitcnt + <1a9> DW_AT_decl_file : 3 + <1aa> DW_AT_decl_line : 42 + <1ab> DW_AT_type : <0x80> + <1af> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><1b2>: Abbrev Number: 6 (DW_TAG_member) + <1b3> DW_AT_name : (indirect string, offset: 0xb5): calcnt + <1b7> DW_AT_decl_file : 3 + <1b8> DW_AT_decl_line : 43 + <1b9> DW_AT_type : <0x80> + <1bd> DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) + <2><1c0>: Abbrev Number: 6 (DW_TAG_member) + <1c1> DW_AT_name : (indirect string, offset: 0x3b): errcnt + <1c5> DW_AT_decl_file : 3 + <1c6> DW_AT_decl_line : 44 + <1c7> DW_AT_type : <0x80> + <1cb> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><1ce>: Abbrev Number: 6 (DW_TAG_member) + <1cf> DW_AT_name : (indirect string, offset: 0x228): stbcnt + <1d3> DW_AT_decl_file : 3 + <1d4> DW_AT_decl_line : 45 + <1d5> DW_AT_type : <0x80> + <1d9> DW_AT_data_member_location: 2 byte block: 23 4c (DW_OP_plus_uconst: 76) + <2><1dc>: Abbrev Number: 9 (DW_TAG_member) + <1dd> DW_AT_name : tai + <1e1> DW_AT_decl_file : 3 + <1e2> DW_AT_decl_line : 47 + <1e3> DW_AT_type : <0x2b> + <1e7> DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) + <2><1ea>: Abbrev Number: 0 + <1><1eb>: Abbrev Number: 5 (DW_TAG_structure_type) + <1ec> DW_AT_name : (indirect string, offset: 0x15b): sysent + <1f0> DW_AT_byte_size : 20 + <1f1> DW_AT_decl_file : 4 + <1f2> DW_AT_decl_line : 4 + <1f3> DW_AT_sibling : <0x23e> + <2><1f7>: Abbrev Number: 6 (DW_TAG_member) + <1f8> DW_AT_name : (indirect string, offset: 0x108): nargs + <1fc> DW_AT_decl_file : 4 + <1fd> DW_AT_decl_line : 5 + <1fe> DW_AT_type : <0x47> + <202> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><205>: Abbrev Number: 6 (DW_TAG_member) + <206> DW_AT_name : (indirect string, offset: 0x94): sys_flags + <20a> DW_AT_decl_file : 4 + <20b> DW_AT_decl_line : 6 + <20c> DW_AT_type : <0x2b> + <210> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><213>: Abbrev Number: 9 (DW_TAG_member) + <214> DW_AT_name : sen + <218> DW_AT_decl_file : 4 + <219> DW_AT_decl_line : 7 + <21a> DW_AT_type : <0x2b> + <21e> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><221>: Abbrev Number: 6 (DW_TAG_member) + <222> DW_AT_name : (indirect string, offset: 0x24a): sys_func + <226> DW_AT_decl_file : 4 + <227> DW_AT_decl_line : 8 + <228> DW_AT_type : <0x249> + <22c> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><22f>: Abbrev Number: 6 (DW_TAG_member) + <230> DW_AT_name : (indirect string, offset: 0x71): sys_name + <234> DW_AT_decl_file : 4 + <235> DW_AT_decl_line : 9 + <236> DW_AT_type : <0xbb> + <23a> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><23d>: Abbrev Number: 0 + <1><23e>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <23f> DW_AT_type : <0x2b> + <243> DW_AT_sibling : <0x249> + <2><247>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><248>: Abbrev Number: 0 + <1><249>: Abbrev Number: 7 (DW_TAG_pointer_type) + <24a> DW_AT_byte_size : 4 + <24b> DW_AT_type : <0x23e> + <1><24f>: Abbrev Number: 4 (DW_TAG_typedef) + <250> DW_AT_name : (indirect string, offset: 0x42): struct_sysent + <254> DW_AT_decl_file : 4 + <255> DW_AT_decl_line : 10 + <256> DW_AT_type : <0x1eb> + <1><25a>: Abbrev Number: 7 (DW_TAG_pointer_type) + <25b> DW_AT_byte_size : 4 + <25c> DW_AT_type : <0x260> + <1><260>: Abbrev Number: 8 (DW_TAG_const_type) + <261> DW_AT_type : <0x24f> + <1><265>: Abbrev Number: 2 (DW_TAG_base_type) + <266> DW_AT_byte_size : 1 + <267> DW_AT_encoding : 2 (boolean) + <268> DW_AT_name : (indirect string, offset: 0x35): _Bool + <1><26c>: Abbrev Number: 4 (DW_TAG_typedef) + <26d> DW_AT_name : (indirect string, offset: 0x19): struct_timex + <271> DW_AT_decl_file : 5 + <272> DW_AT_decl_line : 35 + <273> DW_AT_type : <0xc6> + <1><277>: Abbrev Number: 12 (DW_TAG_variable) + <278> DW_AT_name : (indirect string, offset: 0xe9): current_wordsize + <27c> DW_AT_decl_file : 6 + <27d> DW_AT_decl_line : 757 + <27f> DW_AT_type : <0x47> + <283> DW_AT_external : 1 + <284> DW_AT_declaration : 1 + <1><285>: Abbrev Number: 12 (DW_TAG_variable) + <286> DW_AT_name : (indirect string, offset: 0x15b): sysent + <28a> DW_AT_decl_file : 6 + <28b> DW_AT_decl_line : 892 + <28d> DW_AT_type : <0x25a> + <291> DW_AT_external : 1 + <292> DW_AT_declaration : 1 + <1><293>: Abbrev Number: 12 (DW_TAG_variable) + <294> DW_AT_name : (indirect string, offset: 0x1d3): nsyscalls + <298> DW_AT_decl_file : 6 + <299> DW_AT_decl_line : 903 + <29b> DW_AT_type : <0x47> + <29f> DW_AT_external : 1 + <2a0> DW_AT_declaration : 1 + <1><2a1>: Abbrev Number: 13 (DW_TAG_variable) + <2a2> DW_AT_name : (indirect string, offset: 0x83): mpers_target_var + <2a6> DW_AT_decl_file : 5 + <2a7> DW_AT_decl_line : 37 + <2a8> DW_AT_type : <0x26c> + <2ac> DW_AT_external : 1 + <2ad> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><2b3>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_timex.d2 b/mpers-m32/struct_timex.d2 new file mode 100644 index 000000000..cad701069 --- /dev/null +++ b/mpers-m32/struct_timex.d2 @@ -0,0 +1,361 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x23e): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x21e): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1f5): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xc3): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x50): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x16a): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x9e): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x22f): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xd1): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1e5): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xfa): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x55> +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x18c): __suseconds_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 141 +DW_AT_type : <0x55> +<1><80> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x253): __syscall_slong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 175 +DW_AT_type : <0x55> +<1><8b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x187): char +<1><92> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x162): timeval +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_sibling : <0xbb> +<2><9e> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ee): tv_sec +DW_AT_decl_file : 2 +DW_AT_decl_line : 32 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x19a): tv_usec +DW_AT_decl_file : 2 +DW_AT_decl_line : 33 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xc1> +<1> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x8b> +<1> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xe3): timex +DW_AT_byte_size : 128 +DW_AT_decl_file : 3 +DW_AT_decl_line : 25 +DW_AT_sibling : <0x1eb> +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x238): modes +DW_AT_decl_file : 3 +DW_AT_decl_line : 27 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x217): offset +DW_AT_decl_file : 3 +DW_AT_decl_line : 28 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x156): freq +DW_AT_decl_file : 3 +DW_AT_decl_line : 29 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7a): maxerror +DW_AT_decl_file : 3 +DW_AT_decl_line : 30 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><10a> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c): esterror +DW_AT_decl_file : 3 +DW_AT_decl_line : 31 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><118> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6a): status +DW_AT_decl_file : 3 +DW_AT_decl_line : 32 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><126> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x177): constant +DW_AT_decl_file : 3 +DW_AT_decl_line : 33 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><134> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x203): precision +DW_AT_decl_file : 3 +DW_AT_decl_line : 34 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><142> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x20d): tolerance +DW_AT_decl_file : 3 +DW_AT_decl_line : 35 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><150> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x265): time +DW_AT_decl_file : 3 +DW_AT_decl_line : 36 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><15e> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x103): tick +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><16c> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1dd): ppsfreq +DW_AT_decl_file : 3 +DW_AT_decl_line : 38 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><17a> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbc): jitter +DW_AT_decl_file : 3 +DW_AT_decl_line : 39 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2><188> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x26): shift +DW_AT_decl_file : 3 +DW_AT_decl_line : 40 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><196> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x180): stabil +DW_AT_decl_file : 3 +DW_AT_decl_line : 41 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<2><1a4> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x63): jitcnt +DW_AT_decl_file : 3 +DW_AT_decl_line : 42 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><1b2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb5): calcnt +DW_AT_decl_file : 3 +DW_AT_decl_line : 43 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) +<2><1c0> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3b): errcnt +DW_AT_decl_file : 3 +DW_AT_decl_line : 44 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><1ce> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x228): stbcnt +DW_AT_decl_file : 3 +DW_AT_decl_line : 45 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 4c (DW_OP_plus_uconst: 76) +<2><1dc> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : tai +DW_AT_decl_file : 3 +DW_AT_decl_line : 47 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) +<1><1eb> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x15b): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 4 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x23e> +<2><1f7> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x108): nargs +DW_AT_decl_file : 4 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><205> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x94): sys_flags +DW_AT_decl_file : 4 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><213> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 4 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><221> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x24a): sys_func +DW_AT_decl_file : 4 +DW_AT_decl_line : 8 +DW_AT_type : <0x249> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><22f> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x71): sys_name +DW_AT_decl_file : 4 +DW_AT_decl_line : 9 +DW_AT_type : <0xbb> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><23e> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x249> +<2><247> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><249> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x23e> +<1><24f> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x42): struct_sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 10 +DW_AT_type : <0x1eb> +<1><25a> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x260> +<1><260> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x24f> +<1><265> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x35): _Bool +<1><26c> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x19): struct_timex +DW_AT_decl_file : 5 +DW_AT_decl_line : 35 +DW_AT_type : <0xc6> +<1><277> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe9): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><285> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x15b): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x25a> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><293> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1d3): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2a1> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x83): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 37 +DW_AT_type : <0x26c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_timex.h b/mpers-m32/struct_timex.h new file mode 100644 index 000000000..144259b4c --- /dev/null +++ b/mpers-m32/struct_timex.h @@ -0,0 +1,30 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t modes; +int32_t offset; +int32_t freq; +int32_t maxerror; +int32_t esterror; +int32_t status; +int32_t constant; +int32_t precision; +int32_t tolerance; +struct { +int32_t tv_sec; +int32_t tv_usec; +} ATTRIBUTE_PACKED time; +int32_t tick; +int32_t ppsfreq; +int32_t jitter; +int32_t shift; +int32_t stabil; +int32_t jitcnt; +int32_t calcnt; +int32_t errcnt; +int32_t stbcnt; +int32_t tai; +unsigned char mpers_end_filler_1[44]; +} ATTRIBUTE_PACKED m32_struct_timex; +#define MPERS_m32_struct_timex m32_struct_timex diff --git a/mpers-m32/struct_ustat.c b/mpers-m32/struct_ustat.c new file mode 100644 index 000000000..af87064de --- /dev/null +++ b/mpers-m32/struct_ustat.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2017 JingPiao Chen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#ifdef HAVE_USTAT_H +# include +typedef struct ustat struct_ustat; +#endif /* HAVE_USTAT_H */ + +struct_ustat mpers_target_var; diff --git a/mpers-m32/struct_ustat.d1 b/mpers-m32/struct_ustat.d1 new file mode 100644 index 000000000..5d6ae4835 --- /dev/null +++ b/mpers-m32/struct_ustat.d1 @@ -0,0 +1,208 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1ac (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xa4): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x173): mpers-m32/struct_ustat.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x121): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1a7): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x194): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x165): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x54): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x14): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0xec): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x1bc): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x19e): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x6c): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x6): __ino_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 127 + <6a> DW_AT_type : <0x5c> + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x15c): sizetype + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x62): __daddr_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 143 + <7c> DW_AT_type : <0x2b> + <1><80>: Abbrev Number: 2 (DW_TAG_base_type) + <81> DW_AT_byte_size : 1 + <82> DW_AT_encoding : 6 (signed char) + <83> DW_AT_name : (indirect string, offset: 0x10f): char + <1><87>: Abbrev Number: 5 (DW_TAG_pointer_type) + <88> DW_AT_byte_size : 4 + <89> DW_AT_type : <0x8d> + <1><8d>: Abbrev Number: 6 (DW_TAG_const_type) + <8e> DW_AT_type : <0x80> + <1><92>: Abbrev Number: 7 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0x7e): sysent + <97> DW_AT_byte_size : 20 + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 4 + <9a> DW_AT_sibling : <0xe5> + <2><9e>: Abbrev Number: 8 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0x9e): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x41): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1b3): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0xf0> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x27): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 +
DW_AT_type : <0x87> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xe5> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0xf9): struct_sysent + DW_AT_decl_file : 2 + DW_AT_decl_line : 10 + DW_AT_type : <0x92> + <1><101>: Abbrev Number: 5 (DW_TAG_pointer_type) + <102> DW_AT_byte_size : 4 + <103> DW_AT_type : <0x107> + <1><107>: Abbrev Number: 6 (DW_TAG_const_type) + <108> DW_AT_type : <0xf6> + <1><10c>: Abbrev Number: 2 (DW_TAG_base_type) + <10d> DW_AT_byte_size : 1 + <10e> DW_AT_encoding : 2 (boolean) + <10f> DW_AT_name : (indirect string, offset: 0xe): _Bool + <1><113>: Abbrev Number: 7 (DW_TAG_structure_type) + <114> DW_AT_name : (indirect string, offset: 0x0): ustat + <118> DW_AT_byte_size : 20 + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 24 + <11b> DW_AT_sibling : <0x158> + <2><11f>: Abbrev Number: 8 (DW_TAG_member) + <120> DW_AT_name : (indirect string, offset: 0x18c): f_tfree + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 26 + <126> DW_AT_type : <0x75> + <12a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><12d>: Abbrev Number: 8 (DW_TAG_member) + <12e> DW_AT_name : (indirect string, offset: 0x4b): f_tinode + <132> DW_AT_decl_file : 3 + <133> DW_AT_decl_line : 27 + <134> DW_AT_type : <0x63> + <138> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><13b>: Abbrev Number: 8 (DW_TAG_member) + <13c> DW_AT_name : (indirect string, offset: 0x85): f_fname + <140> DW_AT_decl_file : 3 + <141> DW_AT_decl_line : 28 + <142> DW_AT_type : <0x158> + <146> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><149>: Abbrev Number: 8 (DW_TAG_member) + <14a> DW_AT_name : (indirect string, offset: 0x107): f_fpack + <14e> DW_AT_decl_file : 3 + <14f> DW_AT_decl_line : 29 + <150> DW_AT_type : <0x158> + <154> DW_AT_data_member_location: 2 byte block: 23 e (DW_OP_plus_uconst: 14) + <2><157>: Abbrev Number: 0 + <1><158>: Abbrev Number: 12 (DW_TAG_array_type) + <159> DW_AT_type : <0x80> + <15d> DW_AT_sibling : <0x168> + <2><161>: Abbrev Number: 13 (DW_TAG_subrange_type) + <162> DW_AT_type : <0x6e> + <166> DW_AT_upper_bound : 5 + <2><167>: Abbrev Number: 0 + <1><168>: Abbrev Number: 4 (DW_TAG_typedef) + <169> DW_AT_name : (indirect string, offset: 0x114): struct_ustat + <16d> DW_AT_decl_file : 4 + <16e> DW_AT_decl_line : 31 + <16f> DW_AT_type : <0x113> + <1><173>: Abbrev Number: 14 (DW_TAG_variable) + <174> DW_AT_name : (indirect string, offset: 0x8d): current_wordsize + <178> DW_AT_decl_file : 5 + <179> DW_AT_decl_line : 757 + <17b> DW_AT_type : <0x47> + <17f> DW_AT_external : 1 + <180> DW_AT_declaration : 1 + <1><181>: Abbrev Number: 14 (DW_TAG_variable) + <182> DW_AT_name : (indirect string, offset: 0x7e): sysent + <186> DW_AT_decl_file : 5 + <187> DW_AT_decl_line : 892 + <189> DW_AT_type : <0x101> + <18d> DW_AT_external : 1 + <18e> DW_AT_declaration : 1 + <1><18f>: Abbrev Number: 14 (DW_TAG_variable) + <190> DW_AT_name : (indirect string, offset: 0x152): nsyscalls + <194> DW_AT_decl_file : 5 + <195> DW_AT_decl_line : 903 + <197> DW_AT_type : <0x47> + <19b> DW_AT_external : 1 + <19c> DW_AT_declaration : 1 + <1><19d>: Abbrev Number: 15 (DW_TAG_variable) + <19e> DW_AT_name : (indirect string, offset: 0x30): mpers_target_var + <1a2> DW_AT_decl_file : 4 + <1a3> DW_AT_decl_line : 34 + <1a4> DW_AT_type : <0x168> + <1a8> DW_AT_external : 1 + <1a9> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><1af>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_ustat.d2 b/mpers-m32/struct_ustat.d2 new file mode 100644 index 000000000..ca887672f --- /dev/null +++ b/mpers-m32/struct_ustat.d2 @@ -0,0 +1,230 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1a7): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x194): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x165): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x54): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x14): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xec): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1bc): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x19e): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x6c): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x6): __ino_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 127 +DW_AT_type : <0x5c> +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x15c): sizetype +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x62): __daddr_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 143 +DW_AT_type : <0x2b> +<1><80> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x10f): char +<1><87> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x8d> +<1><8d> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x80> +<1><92> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x7e): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xe5> +<2><9e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9e): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x41): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b3): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0xf0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x27): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xe5> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xf9): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0x92> +<1><101> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x107> +<1><107> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xf6> +<1><10c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xe): _Bool +<1><113> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): ustat +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 24 +DW_AT_sibling : <0x158> +<2><11f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18c): f_tfree +DW_AT_decl_file : 3 +DW_AT_decl_line : 26 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><12d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x4b): f_tinode +DW_AT_decl_file : 3 +DW_AT_decl_line : 27 +DW_AT_type : <0x63> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><13b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x85): f_fname +DW_AT_decl_file : 3 +DW_AT_decl_line : 28 +DW_AT_type : <0x158> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><149> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x107): f_fpack +DW_AT_decl_file : 3 +DW_AT_decl_line : 29 +DW_AT_type : <0x158> +DW_AT_data_member_location: 2 byte block: 23 e (DW_OP_plus_uconst: 14) +<1><158> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x80> +DW_AT_sibling : <0x168> +<2><161> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x6e> +DW_AT_upper_bound : 5 +<1><168> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x114): struct_ustat +DW_AT_decl_file : 4 +DW_AT_decl_line : 31 +DW_AT_type : <0x113> +<1><173> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x8d): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><181> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x7e): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x101> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><18f> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x152): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><19d> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x30): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 34 +DW_AT_type : <0x168> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/struct_ustat.h b/mpers-m32/struct_ustat.h new file mode 100644 index 000000000..615a4c885 --- /dev/null +++ b/mpers-m32/struct_ustat.h @@ -0,0 +1,10 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t f_tfree; +uint32_t f_tinode; +char f_fname[6]; +char f_fpack[6]; +} ATTRIBUTE_PACKED m32_struct_ustat; +#define MPERS_m32_struct_ustat m32_struct_ustat diff --git a/mpers-m32/struct_v4l2_buffer.c b/mpers-m32/struct_v4l2_buffer.c new file mode 100644 index 000000000..d2d5cf1c6 --- /dev/null +++ b/mpers-m32/struct_v4l2_buffer.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_buffer mpers_target_var; diff --git a/mpers-m32/struct_v4l2_buffer.d1 b/mpers-m32/struct_v4l2_buffer.d1 new file mode 100644 index 000000000..68f644184 --- /dev/null +++ b/mpers-m32/struct_v4l2_buffer.d1 @@ -0,0 +1,455 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x3ea (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x1b): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x92): mpers-m32/struct_v4l2_buffer.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x2e3): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x197): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x7f): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x104): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x170): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x20d): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1bf): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x112): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x129): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x25c): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x89): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0x26e): __time_t + <6f> DW_AT_decl_file : 1 + <70> DW_AT_decl_line : 139 + <71> DW_AT_type : <0x55> + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x2cc): __suseconds_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 141 + <7c> DW_AT_type : <0x55> + <1><80>: Abbrev Number: 2 (DW_TAG_base_type) + <81> DW_AT_byte_size : 1 + <82> DW_AT_encoding : 6 (signed char) + <83> DW_AT_name : (indirect string, offset: 0x22e): char + <1><87>: Abbrev Number: 5 (DW_TAG_structure_type) + <88> DW_AT_name : (indirect string, offset: 0x277): timeval + <8c> DW_AT_byte_size : 8 + <8d> DW_AT_decl_file : 2 + <8e> DW_AT_decl_line : 30 + <8f> DW_AT_sibling : <0xb0> + <2><93>: Abbrev Number: 6 (DW_TAG_member) + <94> DW_AT_name : (indirect string, offset: 0x169): tv_sec + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 32 + <9a> DW_AT_type : <0x6a> + <9e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x29e): tv_usec + DW_AT_decl_file : 2 + DW_AT_decl_line : 33 + DW_AT_type : <0x75> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xb6> + <1>: Abbrev Number: 8 (DW_TAG_const_type) + DW_AT_type : <0x80> + <1>: Abbrev Number: 5 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x2bf): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x10e> + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x191): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xe0): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x76): sys_func + DW_AT_decl_file : 3 + DW_AT_decl_line : 8 + DW_AT_type : <0x119> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 6 (DW_TAG_member) + <100> DW_AT_name : (indirect string, offset: 0xd7): sys_name + <104> DW_AT_decl_file : 3 + <105> DW_AT_decl_line : 9 + <106> DW_AT_type : <0xb0> + <10a> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><10d>: Abbrev Number: 0 + <1><10e>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <10f> DW_AT_type : <0x2b> + <113> DW_AT_sibling : <0x119> + <2><117>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><118>: Abbrev Number: 0 + <1><119>: Abbrev Number: 7 (DW_TAG_pointer_type) + <11a> DW_AT_byte_size : 4 + <11b> DW_AT_type : <0x10e> + <1><11f>: Abbrev Number: 4 (DW_TAG_typedef) + <120> DW_AT_name : (indirect string, offset: 0x290): struct_sysent + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 10 + <126> DW_AT_type : <0xbb> + <1><12a>: Abbrev Number: 7 (DW_TAG_pointer_type) + <12b> DW_AT_byte_size : 4 + <12c> DW_AT_type : <0x130> + <1><130>: Abbrev Number: 8 (DW_TAG_const_type) + <131> DW_AT_type : <0x11f> + <1><135>: Abbrev Number: 2 (DW_TAG_base_type) + <136> DW_AT_byte_size : 1 + <137> DW_AT_encoding : 2 (boolean) + <138> DW_AT_name : (indirect string, offset: 0x23d): _Bool + <1><13c>: Abbrev Number: 4 (DW_TAG_typedef) + <13d> DW_AT_name : (indirect string, offset: 0x257): __u8 + <141> DW_AT_decl_file : 4 + <142> DW_AT_decl_line : 20 + <143> DW_AT_type : <0x39> + <1><147>: Abbrev Number: 4 (DW_TAG_typedef) + <148> DW_AT_name : (indirect string, offset: 0x27f): __s32 + <14c> DW_AT_decl_file : 4 + <14d> DW_AT_decl_line : 25 + <14e> DW_AT_type : <0x2b> + <1><152>: Abbrev Number: 4 (DW_TAG_typedef) + <153> DW_AT_name : (indirect string, offset: 0xf0): __u32 + <157> DW_AT_decl_file : 4 + <158> DW_AT_decl_line : 26 + <159> DW_AT_type : <0x47> + <1><15d>: Abbrev Number: 12 (DW_TAG_enumeration_type) + <15e> DW_AT_name : (indirect string, offset: 0x2ae): v4l2_preemphasis + <162> DW_AT_byte_size : 4 + <163> DW_AT_decl_file : 8 + <164> DW_AT_decl_line : 763 + <166> DW_AT_sibling : <0x17d> + <2><16a>: Abbrev Number: 13 (DW_TAG_enumerator) + <16b> DW_AT_name : (indirect string, offset: 0xbd): V4L2_PREEMPHASIS_DISABLED + <16f> DW_AT_const_value : 0 + <2><170>: Abbrev Number: 13 (DW_TAG_enumerator) + <171> DW_AT_name : (indirect string, offset: 0x1e3): V4L2_PREEMPHASIS_50_uS + <175> DW_AT_const_value : 1 + <2><176>: Abbrev Number: 13 (DW_TAG_enumerator) + <177> DW_AT_name : (indirect string, offset: 0x1cc): V4L2_PREEMPHASIS_75_uS + <17b> DW_AT_const_value : 2 + <2><17c>: Abbrev Number: 0 + <1><17d>: Abbrev Number: 14 (DW_TAG_structure_type) + <17e> DW_AT_name : (indirect string, offset: 0x143): v4l2_timecode + <182> DW_AT_byte_size : 16 + <183> DW_AT_decl_file : 5 + <184> DW_AT_decl_line : 519 + <186> DW_AT_sibling : <0x1f4> + <2><18a>: Abbrev Number: 15 (DW_TAG_member) + <18b> DW_AT_name : (indirect string, offset: 0x1b2): type + <18f> DW_AT_decl_file : 5 + <190> DW_AT_decl_line : 520 + <192> DW_AT_type : <0x152> + <196> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><199>: Abbrev Number: 15 (DW_TAG_member) + <19a> DW_AT_name : (indirect string, offset: 0x1a3): flags + <19e> DW_AT_decl_file : 5 + <19f> DW_AT_decl_line : 521 + <1a1> DW_AT_type : <0x152> + <1a5> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1a8>: Abbrev Number: 15 (DW_TAG_member) + <1a9> DW_AT_name : (indirect string, offset: 0x63): frames + <1ad> DW_AT_decl_file : 5 + <1ae> DW_AT_decl_line : 522 + <1b0> DW_AT_type : <0x13c> + <1b4> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1b7>: Abbrev Number: 15 (DW_TAG_member) + <1b8> DW_AT_name : (indirect string, offset: 0x220): seconds + <1bc> DW_AT_decl_file : 5 + <1bd> DW_AT_decl_line : 523 + <1bf> DW_AT_type : <0x13c> + <1c3> DW_AT_data_member_location: 2 byte block: 23 9 (DW_OP_plus_uconst: 9) + <2><1c6>: Abbrev Number: 15 (DW_TAG_member) + <1c7> DW_AT_name : (indirect string, offset: 0x2a6): minutes + <1cb> DW_AT_decl_file : 5 + <1cc> DW_AT_decl_line : 524 + <1ce> DW_AT_type : <0x13c> + <1d2> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><1d5>: Abbrev Number: 15 (DW_TAG_member) + <1d6> DW_AT_name : (indirect string, offset: 0x228): hours + <1da> DW_AT_decl_file : 5 + <1db> DW_AT_decl_line : 525 + <1dd> DW_AT_type : <0x13c> + <1e1> DW_AT_data_member_location: 2 byte block: 23 b (DW_OP_plus_uconst: 11) + <2><1e4>: Abbrev Number: 15 (DW_TAG_member) + <1e5> DW_AT_name : (indirect string, offset: 0x24e): userbits + <1e9> DW_AT_decl_file : 5 + <1ea> DW_AT_decl_line : 526 + <1ec> DW_AT_type : <0x1f4> + <1f0> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1f3>: Abbrev Number: 0 + <1><1f4>: Abbrev Number: 16 (DW_TAG_array_type) + <1f5> DW_AT_type : <0x13c> + <1f9> DW_AT_sibling : <0x204> + <2><1fd>: Abbrev Number: 17 (DW_TAG_subrange_type) + <1fe> DW_AT_type : <0x63> + <202> DW_AT_upper_bound : 3 + <2><203>: Abbrev Number: 0 + <1><204>: Abbrev Number: 18 (DW_TAG_union_type) + <205> DW_AT_byte_size : 4 + <206> DW_AT_decl_file : 5 + <207> DW_AT_decl_line : 606 + <209> DW_AT_sibling : <0x231> + <2><20d>: Abbrev Number: 19 (DW_TAG_member) + <20e> DW_AT_name : (indirect string, offset: 0x243): mem_offset + <212> DW_AT_decl_file : 5 + <213> DW_AT_decl_line : 607 + <215> DW_AT_type : <0x152> + <2><219>: Abbrev Number: 19 (DW_TAG_member) + <21a> DW_AT_name : (indirect string, offset: 0x1b7): userptr + <21e> DW_AT_decl_file : 5 + <21f> DW_AT_decl_line : 608 + <221> DW_AT_type : <0x5c> + <2><225>: Abbrev Number: 20 (DW_TAG_member) + <226> DW_AT_name : fd + <229> DW_AT_decl_file : 5 + <22a> DW_AT_decl_line : 609 + <22c> DW_AT_type : <0x147> + <2><230>: Abbrev Number: 0 + <1><231>: Abbrev Number: 14 (DW_TAG_structure_type) + <232> DW_AT_name : (indirect string, offset: 0x285): v4l2_plane + <236> DW_AT_byte_size : 60 + <237> DW_AT_decl_file : 5 + <238> DW_AT_decl_line : 603 + <23a> DW_AT_sibling : <0x288> + <2><23e>: Abbrev Number: 15 (DW_TAG_member) + <23f> DW_AT_name : (indirect string, offset: 0x233): bytesused + <243> DW_AT_decl_file : 5 + <244> DW_AT_decl_line : 604 + <246> DW_AT_type : <0x152> + <24a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><24d>: Abbrev Number: 15 (DW_TAG_member) + <24e> DW_AT_name : (indirect string, offset: 0x162): length + <252> DW_AT_decl_file : 5 + <253> DW_AT_decl_line : 605 + <255> DW_AT_type : <0x152> + <259> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><25c>: Abbrev Number: 21 (DW_TAG_member) + <25d> DW_AT_name : m + <25f> DW_AT_decl_file : 5 + <260> DW_AT_decl_line : 610 + <262> DW_AT_type : <0x204> + <266> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><269>: Abbrev Number: 15 (DW_TAG_member) + <26a> DW_AT_name : (indirect string, offset: 0x6a): data_offset + <26e> DW_AT_decl_file : 5 + <26f> DW_AT_decl_line : 611 + <271> DW_AT_type : <0x152> + <275> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><278>: Abbrev Number: 15 (DW_TAG_member) + <279> DW_AT_name : (indirect string, offset: 0x2da): reserved + <27d> DW_AT_decl_file : 5 + <27e> DW_AT_decl_line : 612 + <280> DW_AT_type : <0x288> + <284> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><287>: Abbrev Number: 0 + <1><288>: Abbrev Number: 16 (DW_TAG_array_type) + <289> DW_AT_type : <0x152> + <28d> DW_AT_sibling : <0x298> + <2><291>: Abbrev Number: 17 (DW_TAG_subrange_type) + <292> DW_AT_type : <0x63> + <296> DW_AT_upper_bound : 10 + <2><297>: Abbrev Number: 0 + <1><298>: Abbrev Number: 18 (DW_TAG_union_type) + <299> DW_AT_byte_size : 4 + <29a> DW_AT_decl_file : 5 + <29b> DW_AT_decl_line : 658 + <29d> DW_AT_sibling : <0x2d1> + <2><2a1>: Abbrev Number: 19 (DW_TAG_member) + <2a2> DW_AT_name : (indirect string, offset: 0x13c): offset + <2a6> DW_AT_decl_file : 5 + <2a7> DW_AT_decl_line : 659 + <2a9> DW_AT_type : <0x152> + <2><2ad>: Abbrev Number: 19 (DW_TAG_member) + <2ae> DW_AT_name : (indirect string, offset: 0x1b7): userptr + <2b2> DW_AT_decl_file : 5 + <2b3> DW_AT_decl_line : 660 + <2b5> DW_AT_type : <0x5c> + <2><2b9>: Abbrev Number: 19 (DW_TAG_member) + <2ba> DW_AT_name : (indirect string, offset: 0xf6): planes + <2be> DW_AT_decl_file : 5 + <2bf> DW_AT_decl_line : 661 + <2c1> DW_AT_type : <0x2d1> + <2><2c5>: Abbrev Number: 20 (DW_TAG_member) + <2c6> DW_AT_name : fd + <2c9> DW_AT_decl_file : 5 + <2ca> DW_AT_decl_line : 662 + <2cc> DW_AT_type : <0x147> + <2><2d0>: Abbrev Number: 0 + <1><2d1>: Abbrev Number: 7 (DW_TAG_pointer_type) + <2d2> DW_AT_byte_size : 4 + <2d3> DW_AT_type : <0x231> + <1><2d7>: Abbrev Number: 14 (DW_TAG_structure_type) + <2d8> DW_AT_name : (indirect string, offset: 0xb1): v4l2_buffer + <2dc> DW_AT_byte_size : 68 + <2dd> DW_AT_decl_file : 5 + <2de> DW_AT_decl_line : 646 + <2e0> DW_AT_sibling : <0x3a6> + <2><2e4>: Abbrev Number: 15 (DW_TAG_member) + <2e5> DW_AT_name : (indirect string, offset: 0xea): index + <2e9> DW_AT_decl_file : 5 + <2ea> DW_AT_decl_line : 647 + <2ec> DW_AT_type : <0x152> + <2f0> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><2f3>: Abbrev Number: 15 (DW_TAG_member) + <2f4> DW_AT_name : (indirect string, offset: 0x1b2): type + <2f8> DW_AT_decl_file : 5 + <2f9> DW_AT_decl_line : 648 + <2fb> DW_AT_type : <0x152> + <2ff> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><302>: Abbrev Number: 15 (DW_TAG_member) + <303> DW_AT_name : (indirect string, offset: 0x233): bytesused + <307> DW_AT_decl_file : 5 + <308> DW_AT_decl_line : 649 + <30a> DW_AT_type : <0x152> + <30e> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><311>: Abbrev Number: 15 (DW_TAG_member) + <312> DW_AT_name : (indirect string, offset: 0x1a3): flags + <316> DW_AT_decl_file : 5 + <317> DW_AT_decl_line : 650 + <319> DW_AT_type : <0x152> + <31d> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><320>: Abbrev Number: 15 (DW_TAG_member) + <321> DW_AT_name : (indirect string, offset: 0x2c6): field + <325> DW_AT_decl_file : 5 + <326> DW_AT_decl_line : 651 + <328> DW_AT_type : <0x152> + <32c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><32f>: Abbrev Number: 15 (DW_TAG_member) + <330> DW_AT_name : (indirect string, offset: 0x11): timestamp + <334> DW_AT_decl_file : 5 + <335> DW_AT_decl_line : 652 + <337> DW_AT_type : <0x87> + <33b> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><33e>: Abbrev Number: 15 (DW_TAG_member) + <33f> DW_AT_name : (indirect string, offset: 0x1fa): timecode + <343> DW_AT_decl_file : 5 + <344> DW_AT_decl_line : 653 + <346> DW_AT_type : <0x17d> + <34a> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><34d>: Abbrev Number: 15 (DW_TAG_member) + <34e> DW_AT_name : (indirect string, offset: 0x1a9): sequence + <352> DW_AT_decl_file : 5 + <353> DW_AT_decl_line : 654 + <355> DW_AT_type : <0x152> + <359> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><35c>: Abbrev Number: 15 (DW_TAG_member) + <35d> DW_AT_name : (indirect string, offset: 0xfd): memory + <361> DW_AT_decl_file : 5 + <362> DW_AT_decl_line : 657 + <364> DW_AT_type : <0x152> + <368> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><36b>: Abbrev Number: 21 (DW_TAG_member) + <36c> DW_AT_name : m + <36e> DW_AT_decl_file : 5 + <36f> DW_AT_decl_line : 663 + <371> DW_AT_type : <0x298> + <375> DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2><378>: Abbrev Number: 15 (DW_TAG_member) + <379> DW_AT_name : (indirect string, offset: 0x162): length + <37d> DW_AT_decl_file : 5 + <37e> DW_AT_decl_line : 664 + <380> DW_AT_type : <0x152> + <384> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><387>: Abbrev Number: 15 (DW_TAG_member) + <388> DW_AT_name : (indirect string, offset: 0x132): reserved2 + <38c> DW_AT_decl_file : 5 + <38d> DW_AT_decl_line : 665 + <38f> DW_AT_type : <0x152> + <393> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><396>: Abbrev Number: 15 (DW_TAG_member) + <397> DW_AT_name : (indirect string, offset: 0x2da): reserved + <39b> DW_AT_decl_file : 5 + <39c> DW_AT_decl_line : 666 + <39e> DW_AT_type : <0x152> + <3a2> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><3a5>: Abbrev Number: 0 + <1><3a6>: Abbrev Number: 4 (DW_TAG_typedef) + <3a7> DW_AT_name : (indirect string, offset: 0x17e): struct_v4l2_buffer + <3ab> DW_AT_decl_file : 6 + <3ac> DW_AT_decl_line : 38 + <3ad> DW_AT_type : <0x2d7> + <1><3b1>: Abbrev Number: 22 (DW_TAG_variable) + <3b2> DW_AT_name : (indirect string, offset: 0x151): current_wordsize + <3b6> DW_AT_decl_file : 7 + <3b7> DW_AT_decl_line : 757 + <3b9> DW_AT_type : <0x47> + <3bd> DW_AT_external : 1 + <3be> DW_AT_declaration : 1 + <1><3bf>: Abbrev Number: 22 (DW_TAG_variable) + <3c0> DW_AT_name : (indirect string, offset: 0x2bf): sysent + <3c4> DW_AT_decl_file : 7 + <3c5> DW_AT_decl_line : 892 + <3c7> DW_AT_type : <0x12a> + <3cb> DW_AT_external : 1 + <3cc> DW_AT_declaration : 1 + <1><3cd>: Abbrev Number: 22 (DW_TAG_variable) + <3ce> DW_AT_name : (indirect string, offset: 0x203): nsyscalls + <3d2> DW_AT_decl_file : 7 + <3d3> DW_AT_decl_line : 903 + <3d5> DW_AT_type : <0x47> + <3d9> DW_AT_external : 1 + <3da> DW_AT_declaration : 1 + <1><3db>: Abbrev Number: 23 (DW_TAG_variable) + <3dc> DW_AT_name : (indirect string, offset: 0x0): mpers_target_var + <3e0> DW_AT_decl_file : 6 + <3e1> DW_AT_decl_line : 47 + <3e2> DW_AT_type : <0x3a6> + <3e6> DW_AT_external : 1 + <3e7> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><3ed>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_v4l2_buffer.d2 b/mpers-m32/struct_v4l2_buffer.d2 new file mode 100644 index 000000000..0587f4891 --- /dev/null +++ b/mpers-m32/struct_v4l2_buffer.d2 @@ -0,0 +1,515 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x197): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x7f): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x104): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x170): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x20d): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1bf): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x112): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x129): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x25c): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x89): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x26e): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x55> +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2cc): __suseconds_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 141 +DW_AT_type : <0x55> +<1><80> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x22e): char +<1><87> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x277): timeval +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_sibling : <0xb0> +<2><93> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x169): tv_sec +DW_AT_decl_file : 2 +DW_AT_decl_line : 32 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x29e): tv_usec +DW_AT_decl_file : 2 +DW_AT_decl_line : 33 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xb6> +<1> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x80> +<1> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x2bf): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x10e> +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x191): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe0): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x76): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x119> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd7): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0xb0> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><10e> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x119> +<2><117> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><119> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x10e> +<1><11f> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x290): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xbb> +<1><12a> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x130> +<1><130> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x11f> +<1><135> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x23d): _Bool +<1><13c> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x257): __u8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 20 +DW_AT_type : <0x39> +<1><147> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x27f): __s32 +DW_AT_decl_file : 4 +DW_AT_decl_line : 25 +DW_AT_type : <0x2b> +<1><152> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xf0): __u32 +DW_AT_decl_file : 4 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><15d> +Abbrev Number: 12 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x2ae): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 8 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x17d> +<2><16a> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0xbd): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><170> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1e3): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><176> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1cc): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><17d> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x143): v4l2_timecode +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 519 +DW_AT_sibling : <0x1f4> +<2><18a> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b2): type +DW_AT_decl_file : 5 +DW_AT_decl_line : 520 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><199> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a3): flags +DW_AT_decl_file : 5 +DW_AT_decl_line : 521 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1a8> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x63): frames +DW_AT_decl_file : 5 +DW_AT_decl_line : 522 +DW_AT_type : <0x13c> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1b7> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x220): seconds +DW_AT_decl_file : 5 +DW_AT_decl_line : 523 +DW_AT_type : <0x13c> +DW_AT_data_member_location: 2 byte block: 23 9 (DW_OP_plus_uconst: 9) +<2><1c6> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2a6): minutes +DW_AT_decl_file : 5 +DW_AT_decl_line : 524 +DW_AT_type : <0x13c> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><1d5> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x228): hours +DW_AT_decl_file : 5 +DW_AT_decl_line : 525 +DW_AT_type : <0x13c> +DW_AT_data_member_location: 2 byte block: 23 b (DW_OP_plus_uconst: 11) +<2><1e4> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x24e): userbits +DW_AT_decl_file : 5 +DW_AT_decl_line : 526 +DW_AT_type : <0x1f4> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1f4> +Abbrev Number: 16 (DW_TAG_array_type) +DW_AT_type : <0x13c> +DW_AT_sibling : <0x204> +<2><1fd> +Abbrev Number: 17 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 3 +<1><204> +Abbrev Number: 18 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 5 +DW_AT_decl_line : 606 +DW_AT_sibling : <0x231> +<2><20d> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x243): mem_offset +DW_AT_decl_file : 5 +DW_AT_decl_line : 607 +DW_AT_type : <0x152> +<2><219> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b7): userptr +DW_AT_decl_file : 5 +DW_AT_decl_line : 608 +DW_AT_type : <0x5c> +<2><225> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : fd +DW_AT_decl_file : 5 +DW_AT_decl_line : 609 +DW_AT_type : <0x147> +<1><231> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x285): v4l2_plane +DW_AT_byte_size : 60 +DW_AT_decl_file : 5 +DW_AT_decl_line : 603 +DW_AT_sibling : <0x288> +<2><23e> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x233): bytesused +DW_AT_decl_file : 5 +DW_AT_decl_line : 604 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><24d> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x162): length +DW_AT_decl_file : 5 +DW_AT_decl_line : 605 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><25c> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : m +DW_AT_decl_file : 5 +DW_AT_decl_line : 610 +DW_AT_type : <0x204> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><269> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6a): data_offset +DW_AT_decl_file : 5 +DW_AT_decl_line : 611 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><278> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2da): reserved +DW_AT_decl_file : 5 +DW_AT_decl_line : 612 +DW_AT_type : <0x288> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><288> +Abbrev Number: 16 (DW_TAG_array_type) +DW_AT_type : <0x152> +DW_AT_sibling : <0x298> +<2><291> +Abbrev Number: 17 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 10 +<1><298> +Abbrev Number: 18 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 5 +DW_AT_decl_line : 658 +DW_AT_sibling : <0x2d1> +<2><2a1> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x13c): offset +DW_AT_decl_file : 5 +DW_AT_decl_line : 659 +DW_AT_type : <0x152> +<2><2ad> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b7): userptr +DW_AT_decl_file : 5 +DW_AT_decl_line : 660 +DW_AT_type : <0x5c> +<2><2b9> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf6): planes +DW_AT_decl_file : 5 +DW_AT_decl_line : 661 +DW_AT_type : <0x2d1> +<2><2c5> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : fd +DW_AT_decl_file : 5 +DW_AT_decl_line : 662 +DW_AT_type : <0x147> +<1><2d1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x231> +<1><2d7> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xb1): v4l2_buffer +DW_AT_byte_size : 68 +DW_AT_decl_file : 5 +DW_AT_decl_line : 646 +DW_AT_sibling : <0x3a6> +<2><2e4> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xea): index +DW_AT_decl_file : 5 +DW_AT_decl_line : 647 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><2f3> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b2): type +DW_AT_decl_file : 5 +DW_AT_decl_line : 648 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><302> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x233): bytesused +DW_AT_decl_file : 5 +DW_AT_decl_line : 649 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><311> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a3): flags +DW_AT_decl_file : 5 +DW_AT_decl_line : 650 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><320> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c6): field +DW_AT_decl_file : 5 +DW_AT_decl_line : 651 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><32f> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11): timestamp +DW_AT_decl_file : 5 +DW_AT_decl_line : 652 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><33e> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fa): timecode +DW_AT_decl_file : 5 +DW_AT_decl_line : 653 +DW_AT_type : <0x17d> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><34d> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a9): sequence +DW_AT_decl_file : 5 +DW_AT_decl_line : 654 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><35c> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xfd): memory +DW_AT_decl_file : 5 +DW_AT_decl_line : 657 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><36b> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : m +DW_AT_decl_file : 5 +DW_AT_decl_line : 663 +DW_AT_type : <0x298> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2><378> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x162): length +DW_AT_decl_file : 5 +DW_AT_decl_line : 664 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><387> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x132): reserved2 +DW_AT_decl_file : 5 +DW_AT_decl_line : 665 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<2><396> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2da): reserved +DW_AT_decl_file : 5 +DW_AT_decl_line : 666 +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<1><3a6> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x17e): struct_v4l2_buffer +DW_AT_decl_file : 6 +DW_AT_decl_line : 38 +DW_AT_type : <0x2d7> +<1><3b1> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x151): current_wordsize +DW_AT_decl_file : 7 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3bf> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x2bf): sysent +DW_AT_decl_file : 7 +DW_AT_decl_line : 892 +DW_AT_type : <0x12a> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3cd> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x203): nsyscalls +DW_AT_decl_file : 7 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3db> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x0): mpers_target_var +DW_AT_decl_file : 6 +DW_AT_decl_line : 47 +DW_AT_type : <0x3a6> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_v4l2_buffer.h b/mpers-m32/struct_v4l2_buffer.h new file mode 100644 index 000000000..6da200d50 --- /dev/null +++ b/mpers-m32/struct_v4l2_buffer.h @@ -0,0 +1,35 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t index; +uint32_t type; +uint32_t bytesused; +uint32_t flags; +uint32_t field; +struct { +int32_t tv_sec; +int32_t tv_usec; +} ATTRIBUTE_PACKED timestamp; +struct { +uint32_t type; +uint32_t flags; +unsigned char frames; +unsigned char seconds; +unsigned char minutes; +unsigned char hours; +unsigned char userbits[4]; +} ATTRIBUTE_PACKED timecode; +uint32_t sequence; +uint32_t memory; +union { +uint32_t offset; +uint32_t userptr; +mpers_ptr_t planes; +int32_t fd; +} m; +uint32_t length; +uint32_t reserved2; +uint32_t reserved; +} ATTRIBUTE_PACKED m32_struct_v4l2_buffer; +#define MPERS_m32_struct_v4l2_buffer m32_struct_v4l2_buffer diff --git a/mpers-m32/struct_v4l2_create_buffers.c b/mpers-m32/struct_v4l2_create_buffers.c new file mode 100644 index 000000000..7ecdafd7e --- /dev/null +++ b/mpers-m32/struct_v4l2_create_buffers.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_create_buffers mpers_target_var; diff --git a/mpers-m32/struct_v4l2_create_buffers.d1 b/mpers-m32/struct_v4l2_create_buffers.d1 new file mode 100644 index 000000000..393053088 --- /dev/null +++ b/mpers-m32/struct_v4l2_create_buffers.d1 @@ -0,0 +1,672 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x5f0 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x16): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x2b2): mpers-m32/struct_v4l2_create_buffers.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x3cd): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1f2): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x76): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x3b1): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x1b0): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x28c): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x227): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x204): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x13b): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x30b): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x80): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x2ad): char + <1><73>: Abbrev Number: 5 (DW_TAG_pointer_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_type : <0x79> + <1><79>: Abbrev Number: 6 (DW_TAG_const_type) + <7a> DW_AT_type : <0x6c> + <1><7e>: Abbrev Number: 7 (DW_TAG_structure_type) + <7f> DW_AT_name : (indirect string, offset: 0x377): sysent + <83> DW_AT_byte_size : 20 + <84> DW_AT_decl_file : 1 + <85> DW_AT_decl_line : 4 + <86> DW_AT_sibling : <0xd1> + <2><8a>: Abbrev Number: 8 (DW_TAG_member) + <8b> DW_AT_name : (indirect string, offset: 0x31d): nargs + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 5 + <91> DW_AT_type : <0x47> + <95> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><98>: Abbrev Number: 8 (DW_TAG_member) + <99> DW_AT_name : (indirect string, offset: 0xb7): sys_flags + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 6 + <9f> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x68): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xdc> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x9d): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x73> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xdc> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) +
DW_AT_byte_size : 4 + DW_AT_type : <0xd1> + <1>: Abbrev Number: 12 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x32f): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7e> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf3> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xe2> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x2de): _Bool + <1>: Abbrev Number: 12 (DW_TAG_typedef) + <100> DW_AT_name : (indirect string, offset: 0x306): __u8 + <104> DW_AT_decl_file : 2 + <105> DW_AT_decl_line : 20 + <106> DW_AT_type : <0x39> + <1><10a>: Abbrev Number: 12 (DW_TAG_typedef) + <10b> DW_AT_name : (indirect string, offset: 0x300): __u16 + <10f> DW_AT_decl_file : 2 + <110> DW_AT_decl_line : 23 + <111> DW_AT_type : <0x40> + <1><115>: Abbrev Number: 12 (DW_TAG_typedef) + <116> DW_AT_name : (indirect string, offset: 0x323): __s32 + <11a> DW_AT_decl_file : 2 + <11b> DW_AT_decl_line : 25 + <11c> DW_AT_type : <0x2b> + <1><120>: Abbrev Number: 12 (DW_TAG_typedef) + <121> DW_AT_name : (indirect string, offset: 0xf7): __u32 + <125> DW_AT_decl_file : 2 + <126> DW_AT_decl_line : 26 + <127> DW_AT_type : <0x47> + <1><12b>: Abbrev Number: 13 (DW_TAG_enumeration_type) + <12c> DW_AT_name : (indirect string, offset: 0x358): v4l2_preemphasis + <130> DW_AT_byte_size : 4 + <131> DW_AT_decl_file : 6 + <132> DW_AT_decl_line : 763 + <134> DW_AT_sibling : <0x14b> + <2><138>: Abbrev Number: 14 (DW_TAG_enumerator) + <139> DW_AT_name : (indirect string, offset: 0x262): V4L2_PREEMPHASIS_DISABLED + <13d> DW_AT_const_value : 0 + <2><13e>: Abbrev Number: 14 (DW_TAG_enumerator) + <13f> DW_AT_name : (indirect string, offset: 0x23f): V4L2_PREEMPHASIS_50_uS + <143> DW_AT_const_value : 1 + <2><144>: Abbrev Number: 14 (DW_TAG_enumerator) + <145> DW_AT_name : (indirect string, offset: 0xd1): V4L2_PREEMPHASIS_75_uS + <149> DW_AT_const_value : 2 + <2><14a>: Abbrev Number: 0 + <1><14b>: Abbrev Number: 7 (DW_TAG_structure_type) + <14c> DW_AT_name : (indirect string, offset: 0xc): v4l2_rect + <150> DW_AT_byte_size : 16 + <151> DW_AT_decl_file : 3 + <152> DW_AT_decl_line : 205 + <153> DW_AT_sibling : <0x190> + <2><157>: Abbrev Number: 8 (DW_TAG_member) + <158> DW_AT_name : (indirect string, offset: 0x2d9): left + <15c> DW_AT_decl_file : 3 + <15d> DW_AT_decl_line : 206 + <15e> DW_AT_type : <0x115> + <162> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><165>: Abbrev Number: 9 (DW_TAG_member) + <166> DW_AT_name : top + <16a> DW_AT_decl_file : 3 + <16b> DW_AT_decl_line : 207 + <16c> DW_AT_type : <0x115> + <170> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><173>: Abbrev Number: 8 (DW_TAG_member) + <174> DW_AT_name : (indirect string, offset: 0x11a): width + <178> DW_AT_decl_file : 3 + <179> DW_AT_decl_line : 208 + <17a> DW_AT_type : <0x115> + <17e> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><181>: Abbrev Number: 8 (DW_TAG_member) + <182> DW_AT_name : (indirect string, offset: 0x220): height + <186> DW_AT_decl_file : 3 + <187> DW_AT_decl_line : 209 + <188> DW_AT_type : <0x115> + <18c> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><18f>: Abbrev Number: 0 + <1><190>: Abbrev Number: 15 (DW_TAG_structure_type) + <191> DW_AT_name : (indirect string, offset: 0x2f0): v4l2_pix_format + <195> DW_AT_byte_size : 32 + <196> DW_AT_decl_file : 3 + <197> DW_AT_decl_line : 274 + <199> DW_AT_sibling : <0x216> + <2><19d>: Abbrev Number: 16 (DW_TAG_member) + <19e> DW_AT_name : (indirect string, offset: 0x11a): width + <1a2> DW_AT_decl_file : 3 + <1a3> DW_AT_decl_line : 275 + <1a5> DW_AT_type : <0x120> + <1a9> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1ac>: Abbrev Number: 16 (DW_TAG_member) + <1ad> DW_AT_name : (indirect string, offset: 0x220): height + <1b1> DW_AT_decl_file : 3 + <1b2> DW_AT_decl_line : 276 + <1b4> DW_AT_type : <0x120> + <1b8> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1bb>: Abbrev Number: 16 (DW_TAG_member) + <1bc> DW_AT_name : (indirect string, offset: 0x89): pixelformat + <1c0> DW_AT_decl_file : 3 + <1c1> DW_AT_decl_line : 277 + <1c3> DW_AT_type : <0x120> + <1c7> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1ca>: Abbrev Number: 16 (DW_TAG_member) + <1cb> DW_AT_name : (indirect string, offset: 0x37e): field + <1cf> DW_AT_decl_file : 3 + <1d0> DW_AT_decl_line : 278 + <1d2> DW_AT_type : <0x120> + <1d6> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1d9>: Abbrev Number: 16 (DW_TAG_member) + <1da> DW_AT_name : (indirect string, offset: 0x12e): bytesperline + <1de> DW_AT_decl_file : 3 + <1df> DW_AT_decl_line : 279 + <1e1> DW_AT_type : <0x120> + <1e5> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><1e8>: Abbrev Number: 16 (DW_TAG_member) + <1e9> DW_AT_name : (indirect string, offset: 0x5e): sizeimage + <1ed> DW_AT_decl_file : 3 + <1ee> DW_AT_decl_line : 280 + <1f0> DW_AT_type : <0x120> + <1f4> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><1f7>: Abbrev Number: 16 (DW_TAG_member) + <1f8> DW_AT_name : (indirect string, offset: 0x16d): colorspace + <1fc> DW_AT_decl_file : 3 + <1fd> DW_AT_decl_line : 281 + <1ff> DW_AT_type : <0x120> + <203> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><206>: Abbrev Number: 16 (DW_TAG_member) + <207> DW_AT_name : (indirect string, offset: 0x0): priv + <20b> DW_AT_decl_file : 3 + <20c> DW_AT_decl_line : 282 + <20e> DW_AT_type : <0x120> + <212> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><215>: Abbrev Number: 0 + <1><216>: Abbrev Number: 17 (DW_TAG_array_type) + <217> DW_AT_type : <0x120> + <21b> DW_AT_sibling : <0x226> + <2><21f>: Abbrev Number: 18 (DW_TAG_subrange_type) + <220> DW_AT_type : <0x63> + <224> DW_AT_upper_bound : 1 + <2><225>: Abbrev Number: 0 + <1><226>: Abbrev Number: 15 (DW_TAG_structure_type) + <227> DW_AT_name : (indirect string, offset: 0x384): v4l2_clip + <22b> DW_AT_byte_size : 20 + <22c> DW_AT_decl_file : 3 + <22d> DW_AT_decl_line : 745 + <22f> DW_AT_sibling : <0x250> + <2><233>: Abbrev Number: 19 (DW_TAG_member) + <234> DW_AT_name : c + <236> DW_AT_decl_file : 3 + <237> DW_AT_decl_line : 746 + <239> DW_AT_type : <0x14b> + <23d> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><240>: Abbrev Number: 16 (DW_TAG_member) + <241> DW_AT_name : (indirect string, offset: 0x71): next + <245> DW_AT_decl_file : 3 + <246> DW_AT_decl_line : 747 + <248> DW_AT_type : <0x250> + <24c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><24f>: Abbrev Number: 0 + <1><250>: Abbrev Number: 5 (DW_TAG_pointer_type) + <251> DW_AT_byte_size : 4 + <252> DW_AT_type : <0x226> + <1><256>: Abbrev Number: 15 (DW_TAG_structure_type) + <257> DW_AT_name : (indirect string, offset: 0x10e): v4l2_window + <25b> DW_AT_byte_size : 40 + <25c> DW_AT_decl_file : 3 + <25d> DW_AT_decl_line : 750 + <25f> DW_AT_sibling : <0x2cb> + <2><263>: Abbrev Number: 19 (DW_TAG_member) + <264> DW_AT_name : w + <266> DW_AT_decl_file : 3 + <267> DW_AT_decl_line : 751 + <269> DW_AT_type : <0x14b> + <26d> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><270>: Abbrev Number: 16 (DW_TAG_member) + <271> DW_AT_name : (indirect string, offset: 0x37e): field + <275> DW_AT_decl_file : 3 + <276> DW_AT_decl_line : 752 + <278> DW_AT_type : <0x120> + <27c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><27f>: Abbrev Number: 16 (DW_TAG_member) + <280> DW_AT_name : (indirect string, offset: 0x398): chromakey + <284> DW_AT_decl_file : 3 + <285> DW_AT_decl_line : 753 + <287> DW_AT_type : <0x120> + <28b> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><28e>: Abbrev Number: 16 (DW_TAG_member) + <28f> DW_AT_name : (indirect string, offset: 0x3ab): clips + <293> DW_AT_decl_file : 3 + <294> DW_AT_decl_line : 754 + <296> DW_AT_type : <0x250> + <29a> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><29d>: Abbrev Number: 16 (DW_TAG_member) + <29e> DW_AT_name : (indirect string, offset: 0x104): clipcount + <2a2> DW_AT_decl_file : 3 + <2a3> DW_AT_decl_line : 755 + <2a5> DW_AT_type : <0x120> + <2a9> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><2ac>: Abbrev Number: 16 (DW_TAG_member) + <2ad> DW_AT_name : (indirect string, offset: 0xfd): bitmap + <2b1> DW_AT_decl_file : 3 + <2b2> DW_AT_decl_line : 756 + <2b4> DW_AT_type : <0x6a> + <2b8> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><2bb>: Abbrev Number: 16 (DW_TAG_member) + <2bc> DW_AT_name : (indirect string, offset: 0x178): global_alpha + <2c0> DW_AT_decl_file : 3 + <2c1> DW_AT_decl_line : 757 + <2c3> DW_AT_type : <0xff> + <2c7> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><2ca>: Abbrev Number: 0 + <1><2cb>: Abbrev Number: 17 (DW_TAG_array_type) + <2cc> DW_AT_type : <0x120> + <2d0> DW_AT_sibling : <0x2db> + <2><2d4>: Abbrev Number: 18 (DW_TAG_subrange_type) + <2d5> DW_AT_type : <0x63> + <2d9> DW_AT_upper_bound : 7 + <2><2da>: Abbrev Number: 0 + <1><2db>: Abbrev Number: 15 (DW_TAG_structure_type) + <2dc> DW_AT_name : (indirect string, offset: 0xc1): v4l2_vbi_format + <2e0> DW_AT_byte_size : 44 + <2e1> DW_AT_decl_file : 3 + <2e2> DW_AT_decl_line : 1541 + <2e4> DW_AT_sibling : <0x361> + <2><2e8>: Abbrev Number: 16 (DW_TAG_member) + <2e9> DW_AT_name : (indirect string, offset: 0x29f): sampling_rate + <2ed> DW_AT_decl_file : 3 + <2ee> DW_AT_decl_line : 1542 + <2f0> DW_AT_type : <0x120> + <2f4> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><2f7>: Abbrev Number: 16 (DW_TAG_member) + <2f8> DW_AT_name : (indirect string, offset: 0x155): offset + <2fc> DW_AT_decl_file : 3 + <2fd> DW_AT_decl_line : 1543 + <2ff> DW_AT_type : <0x120> + <303> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><306>: Abbrev Number: 16 (DW_TAG_member) + <307> DW_AT_name : (indirect string, offset: 0xa6): samples_per_line + <30b> DW_AT_decl_file : 3 + <30c> DW_AT_decl_line : 1544 + <30e> DW_AT_type : <0x120> + <312> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><315>: Abbrev Number: 16 (DW_TAG_member) + <316> DW_AT_name : (indirect string, offset: 0x3bf): sample_format + <31a> DW_AT_decl_file : 3 + <31b> DW_AT_decl_line : 1545 + <31d> DW_AT_type : <0x120> + <321> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><324>: Abbrev Number: 16 (DW_TAG_member) + <325> DW_AT_name : (indirect string, offset: 0x286): start + <329> DW_AT_decl_file : 3 + <32a> DW_AT_decl_line : 1546 + <32c> DW_AT_type : <0x361> + <330> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><333>: Abbrev Number: 16 (DW_TAG_member) + <334> DW_AT_name : (indirect string, offset: 0x329): count + <338> DW_AT_decl_file : 3 + <339> DW_AT_decl_line : 1547 + <33b> DW_AT_type : <0x216> + <33f> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><342>: Abbrev Number: 16 (DW_TAG_member) + <343> DW_AT_name : (indirect string, offset: 0x1fe): flags + <347> DW_AT_decl_file : 3 + <348> DW_AT_decl_line : 1548 + <34a> DW_AT_type : <0x120> + <34e> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><351>: Abbrev Number: 16 (DW_TAG_member) + <352> DW_AT_name : (indirect string, offset: 0x3a2): reserved + <356> DW_AT_decl_file : 3 + <357> DW_AT_decl_line : 1549 + <359> DW_AT_type : <0x216> + <35d> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><360>: Abbrev Number: 0 + <1><361>: Abbrev Number: 17 (DW_TAG_array_type) + <362> DW_AT_type : <0x115> + <366> DW_AT_sibling : <0x371> + <2><36a>: Abbrev Number: 18 (DW_TAG_subrange_type) + <36b> DW_AT_type : <0x63> + <36f> DW_AT_upper_bound : 1 + <2><370>: Abbrev Number: 0 + <1><371>: Abbrev Number: 15 (DW_TAG_structure_type) + <372> DW_AT_name : (indirect string, offset: 0x1d4): v4l2_sliced_vbi_format + <376> DW_AT_byte_size : 112 + <377> DW_AT_decl_file : 3 + <378> DW_AT_decl_line : 1563 + <37a> DW_AT_sibling : <0x3bb> + <2><37e>: Abbrev Number: 16 (DW_TAG_member) + <37f> DW_AT_name : (indirect string, offset: 0x2e4): service_set + <383> DW_AT_decl_file : 3 + <384> DW_AT_decl_line : 1564 + <386> DW_AT_type : <0x10a> + <38a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><38d>: Abbrev Number: 16 (DW_TAG_member) + <38e> DW_AT_name : (indirect string, offset: 0x369): service_lines + <392> DW_AT_decl_file : 3 + <393> DW_AT_decl_line : 1569 + <395> DW_AT_type : <0x3bb> + <399> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><39c>: Abbrev Number: 16 (DW_TAG_member) + <39d> DW_AT_name : (indirect string, offset: 0x95): io_size + <3a1> DW_AT_decl_file : 3 + <3a2> DW_AT_decl_line : 1570 + <3a4> DW_AT_type : <0x120> + <3a8> DW_AT_data_member_location: 2 byte block: 23 64 (DW_OP_plus_uconst: 100) + <2><3ab>: Abbrev Number: 16 (DW_TAG_member) + <3ac> DW_AT_name : (indirect string, offset: 0x3a2): reserved + <3b0> DW_AT_decl_file : 3 + <3b1> DW_AT_decl_line : 1571 + <3b3> DW_AT_type : <0x216> + <3b7> DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) + <2><3ba>: Abbrev Number: 0 + <1><3bb>: Abbrev Number: 17 (DW_TAG_array_type) + <3bc> DW_AT_type : <0x10a> + <3c0> DW_AT_sibling : <0x3d1> + <2><3c4>: Abbrev Number: 18 (DW_TAG_subrange_type) + <3c5> DW_AT_type : <0x63> + <3c9> DW_AT_upper_bound : 1 + <2><3ca>: Abbrev Number: 18 (DW_TAG_subrange_type) + <3cb> DW_AT_type : <0x63> + <3cf> DW_AT_upper_bound : 23 + <2><3d0>: Abbrev Number: 0 + <1><3d1>: Abbrev Number: 15 (DW_TAG_structure_type) + <3d2> DW_AT_name : (indirect string, offset: 0x1be): v4l2_plane_pix_format + <3d6> DW_AT_byte_size : 20 + <3d7> DW_AT_decl_file : 3 + <3d8> DW_AT_decl_line : 1664 + <3da> DW_AT_sibling : <0x40c> + <2><3de>: Abbrev Number: 16 (DW_TAG_member) + <3df> DW_AT_name : (indirect string, offset: 0x5e): sizeimage + <3e3> DW_AT_decl_file : 3 + <3e4> DW_AT_decl_line : 1665 + <3e6> DW_AT_type : <0x120> + <3ea> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><3ed>: Abbrev Number: 16 (DW_TAG_member) + <3ee> DW_AT_name : (indirect string, offset: 0x12e): bytesperline + <3f2> DW_AT_decl_file : 3 + <3f3> DW_AT_decl_line : 1666 + <3f5> DW_AT_type : <0x10a> + <3f9> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><3fc>: Abbrev Number: 16 (DW_TAG_member) + <3fd> DW_AT_name : (indirect string, offset: 0x3a2): reserved + <401> DW_AT_decl_file : 3 + <402> DW_AT_decl_line : 1667 + <404> DW_AT_type : <0x40c> + <408> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><40b>: Abbrev Number: 0 + <1><40c>: Abbrev Number: 17 (DW_TAG_array_type) + <40d> DW_AT_type : <0x10a> + <411> DW_AT_sibling : <0x41c> + <2><415>: Abbrev Number: 18 (DW_TAG_subrange_type) + <416> DW_AT_type : <0x63> + <41a> DW_AT_upper_bound : 6 + <2><41b>: Abbrev Number: 0 + <1><41c>: Abbrev Number: 15 (DW_TAG_structure_type) + <41d> DW_AT_name : (indirect string, offset: 0x199): v4l2_pix_format_mplane + <421> DW_AT_byte_size : 192 + <422> DW_AT_decl_file : 3 + <423> DW_AT_decl_line : 1680 + <425> DW_AT_sibling : <0x4a4> + <2><429>: Abbrev Number: 16 (DW_TAG_member) + <42a> DW_AT_name : (indirect string, offset: 0x11a): width + <42e> DW_AT_decl_file : 3 + <42f> DW_AT_decl_line : 1681 + <431> DW_AT_type : <0x120> + <435> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><438>: Abbrev Number: 16 (DW_TAG_member) + <439> DW_AT_name : (indirect string, offset: 0x220): height + <43d> DW_AT_decl_file : 3 + <43e> DW_AT_decl_line : 1682 + <440> DW_AT_type : <0x120> + <444> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><447>: Abbrev Number: 16 (DW_TAG_member) + <448> DW_AT_name : (indirect string, offset: 0x89): pixelformat + <44c> DW_AT_decl_file : 3 + <44d> DW_AT_decl_line : 1683 + <44f> DW_AT_type : <0x120> + <453> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><456>: Abbrev Number: 16 (DW_TAG_member) + <457> DW_AT_name : (indirect string, offset: 0x37e): field + <45b> DW_AT_decl_file : 3 + <45c> DW_AT_decl_line : 1684 + <45e> DW_AT_type : <0x120> + <462> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><465>: Abbrev Number: 16 (DW_TAG_member) + <466> DW_AT_name : (indirect string, offset: 0x16d): colorspace + <46a> DW_AT_decl_file : 3 + <46b> DW_AT_decl_line : 1685 + <46d> DW_AT_type : <0x120> + <471> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><474>: Abbrev Number: 16 (DW_TAG_member) + <475> DW_AT_name : (indirect string, offset: 0x38e): plane_fmt + <479> DW_AT_decl_file : 3 + <47a> DW_AT_decl_line : 1687 + <47c> DW_AT_type : <0x4a4> + <480> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><483>: Abbrev Number: 16 (DW_TAG_member) + <484> DW_AT_name : (indirect string, offset: 0x234): num_planes + <488> DW_AT_decl_file : 3 + <489> DW_AT_decl_line : 1688 + <48b> DW_AT_type : <0xff> + <48f> DW_AT_data_member_location: 3 byte block: 23 b4 1 (DW_OP_plus_uconst: 180) + <2><493>: Abbrev Number: 16 (DW_TAG_member) + <494> DW_AT_name : (indirect string, offset: 0x3a2): reserved + <498> DW_AT_decl_file : 3 + <499> DW_AT_decl_line : 1689 + <49b> DW_AT_type : <0x4b4> + <49f> DW_AT_data_member_location: 3 byte block: 23 b5 1 (DW_OP_plus_uconst: 181) + <2><4a3>: Abbrev Number: 0 + <1><4a4>: Abbrev Number: 17 (DW_TAG_array_type) + <4a5> DW_AT_type : <0x3d1> + <4a9> DW_AT_sibling : <0x4b4> + <2><4ad>: Abbrev Number: 18 (DW_TAG_subrange_type) + <4ae> DW_AT_type : <0x63> + <4b2> DW_AT_upper_bound : 7 + <2><4b3>: Abbrev Number: 0 + <1><4b4>: Abbrev Number: 17 (DW_TAG_array_type) + <4b5> DW_AT_type : <0xff> + <4b9> DW_AT_sibling : <0x4c4> + <2><4bd>: Abbrev Number: 18 (DW_TAG_subrange_type) + <4be> DW_AT_type : <0x63> + <4c2> DW_AT_upper_bound : 10 + <2><4c3>: Abbrev Number: 0 + <1><4c4>: Abbrev Number: 20 (DW_TAG_union_type) + <4c5> DW_AT_byte_size : 200 + <4c6> DW_AT_decl_file : 3 + <4c7> DW_AT_decl_line : 1704 + <4c9> DW_AT_sibling : <0x516> + <2><4cd>: Abbrev Number: 21 (DW_TAG_member) + <4ce> DW_AT_name : pix + <4d2> DW_AT_decl_file : 3 + <4d3> DW_AT_decl_line : 1705 + <4d5> DW_AT_type : <0x190> + <2><4d9>: Abbrev Number: 22 (DW_TAG_member) + <4da> DW_AT_name : (indirect string, offset: 0x5): pix_mp + <4de> DW_AT_decl_file : 3 + <4df> DW_AT_decl_line : 1706 + <4e1> DW_AT_type : <0x41c> + <2><4e5>: Abbrev Number: 21 (DW_TAG_member) + <4e6> DW_AT_name : win + <4ea> DW_AT_decl_file : 3 + <4eb> DW_AT_decl_line : 1707 + <4ed> DW_AT_type : <0x256> + <2><4f1>: Abbrev Number: 21 (DW_TAG_member) + <4f2> DW_AT_name : vbi + <4f6> DW_AT_decl_file : 3 + <4f7> DW_AT_decl_line : 1708 + <4f9> DW_AT_type : <0x2db> + <2><4fd>: Abbrev Number: 22 (DW_TAG_member) + <4fe> DW_AT_name : (indirect string, offset: 0x1eb): sliced + <502> DW_AT_decl_file : 3 + <503> DW_AT_decl_line : 1709 + <505> DW_AT_type : <0x371> + <2><509>: Abbrev Number: 22 (DW_TAG_member) + <50a> DW_AT_name : (indirect string, offset: 0xee): raw_data + <50e> DW_AT_decl_file : 3 + <50f> DW_AT_decl_line : 1710 + <511> DW_AT_type : <0x516> + <2><515>: Abbrev Number: 0 + <1><516>: Abbrev Number: 17 (DW_TAG_array_type) + <517> DW_AT_type : <0xff> + <51b> DW_AT_sibling : <0x526> + <2><51f>: Abbrev Number: 18 (DW_TAG_subrange_type) + <520> DW_AT_type : <0x63> + <524> DW_AT_upper_bound : 199 + <2><525>: Abbrev Number: 0 + <1><526>: Abbrev Number: 15 (DW_TAG_structure_type) + <527> DW_AT_name : (indirect string, offset: 0x256): v4l2_format + <52b> DW_AT_byte_size : 204 + <52c> DW_AT_decl_file : 3 + <52d> DW_AT_decl_line : 1702 + <52f> DW_AT_sibling : <0x552> + <2><533>: Abbrev Number: 16 (DW_TAG_member) + <534> DW_AT_name : (indirect string, offset: 0x21b): type + <538> DW_AT_decl_file : 3 + <539> DW_AT_decl_line : 1703 + <53b> DW_AT_type : <0x120> + <53f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><542>: Abbrev Number: 19 (DW_TAG_member) + <543> DW_AT_name : fmt + <547> DW_AT_decl_file : 3 + <548> DW_AT_decl_line : 1711 + <54a> DW_AT_type : <0x4c4> + <54e> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><551>: Abbrev Number: 0 + <1><552>: Abbrev Number: 15 (DW_TAG_structure_type) + <553> DW_AT_name : (indirect string, offset: 0x185): v4l2_create_buffers + <557> DW_AT_byte_size : 248 + <558> DW_AT_decl_file : 3 + <559> DW_AT_decl_line : 1843 + <55b> DW_AT_sibling : <0x5ac> + <2><55f>: Abbrev Number: 16 (DW_TAG_member) + <560> DW_AT_name : (indirect string, offset: 0xe8): index + <564> DW_AT_decl_file : 3 + <565> DW_AT_decl_line : 1844 + <567> DW_AT_type : <0x120> + <56b> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><56e>: Abbrev Number: 16 (DW_TAG_member) + <56f> DW_AT_name : (indirect string, offset: 0x329): count + <573> DW_AT_decl_file : 3 + <574> DW_AT_decl_line : 1845 + <576> DW_AT_type : <0x120> + <57a> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><57d>: Abbrev Number: 16 (DW_TAG_member) + <57e> DW_AT_name : (indirect string, offset: 0x120): memory + <582> DW_AT_decl_file : 3 + <583> DW_AT_decl_line : 1846 + <585> DW_AT_type : <0x120> + <589> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><58c>: Abbrev Number: 16 (DW_TAG_member) + <58d> DW_AT_name : (indirect string, offset: 0x127): format + <591> DW_AT_decl_file : 3 + <592> DW_AT_decl_line : 1847 + <594> DW_AT_type : <0x526> + <598> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><59b>: Abbrev Number: 16 (DW_TAG_member) + <59c> DW_AT_name : (indirect string, offset: 0x3a2): reserved + <5a0> DW_AT_decl_file : 3 + <5a1> DW_AT_decl_line : 1848 + <5a3> DW_AT_type : <0x2cb> + <5a7> DW_AT_data_member_location: 3 byte block: 23 d8 1 (DW_OP_plus_uconst: 216) + <2><5ab>: Abbrev Number: 0 + <1><5ac>: Abbrev Number: 12 (DW_TAG_typedef) + <5ad> DW_AT_name : (indirect string, offset: 0x33d): struct_v4l2_create_buffers + <5b1> DW_AT_decl_file : 4 + <5b2> DW_AT_decl_line : 39 + <5b3> DW_AT_type : <0x552> + <1><5b7>: Abbrev Number: 23 (DW_TAG_variable) + <5b8> DW_AT_name : (indirect string, offset: 0x15c): current_wordsize + <5bc> DW_AT_decl_file : 5 + <5bd> DW_AT_decl_line : 757 + <5bf> DW_AT_type : <0x47> + <5c3> DW_AT_external : 1 + <5c4> DW_AT_declaration : 1 + <1><5c5>: Abbrev Number: 23 (DW_TAG_variable) + <5c6> DW_AT_name : (indirect string, offset: 0x377): sysent + <5ca> DW_AT_decl_file : 5 + <5cb> DW_AT_decl_line : 892 + <5cd> DW_AT_type : <0xed> + <5d1> DW_AT_external : 1 + <5d2> DW_AT_declaration : 1 + <1><5d3>: Abbrev Number: 23 (DW_TAG_variable) + <5d4> DW_AT_name : (indirect string, offset: 0x27c): nsyscalls + <5d8> DW_AT_decl_file : 5 + <5d9> DW_AT_decl_line : 903 + <5db> DW_AT_type : <0x47> + <5df> DW_AT_external : 1 + <5e0> DW_AT_declaration : 1 + <1><5e1>: Abbrev Number: 24 (DW_TAG_variable) + <5e2> DW_AT_name : (indirect string, offset: 0x144): mpers_target_var + <5e6> DW_AT_decl_file : 4 + <5e7> DW_AT_decl_line : 47 + <5e8> DW_AT_type : <0x5ac> + <5ec> DW_AT_external : 1 + <5ed> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><5f3>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_v4l2_create_buffers.d2 b/mpers-m32/struct_v4l2_create_buffers.d2 new file mode 100644 index 000000000..4c4f105ab --- /dev/null +++ b/mpers-m32/struct_v4l2_create_buffers.d2 @@ -0,0 +1,762 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1f2): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x76): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x3b1): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x1b0): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x28c): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x227): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x204): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x13b): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x30b): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x80): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x2ad): char +<1><73> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x79> +<1><79> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><7e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x377): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd1> +<2><8a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x31d): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><98> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb7): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x68): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xdc> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9d): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xdc> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd1> +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x32f): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7e> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xe2> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x2de): _Bool +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x306): __u8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 20 +DW_AT_type : <0x39> +<1><10a> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x300): __u16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 23 +DW_AT_type : <0x40> +<1><115> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x323): __s32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 25 +DW_AT_type : <0x2b> +<1><120> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xf7): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><12b> +Abbrev Number: 13 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x358): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x14b> +<2><138> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x262): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><13e> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x23f): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><144> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0xd1): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><14b> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc): v4l2_rect +DW_AT_byte_size : 16 +DW_AT_decl_file : 3 +DW_AT_decl_line : 205 +DW_AT_sibling : <0x190> +<2><157> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d9): left +DW_AT_decl_file : 3 +DW_AT_decl_line : 206 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><165> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : top +DW_AT_decl_file : 3 +DW_AT_decl_line : 207 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><173> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11a): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 208 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><181> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x220): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 209 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><190> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x2f0): v4l2_pix_format +DW_AT_byte_size : 32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 274 +DW_AT_sibling : <0x216> +<2><19d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11a): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 275 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1ac> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x220): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 276 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1bb> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x89): pixelformat +DW_AT_decl_file : 3 +DW_AT_decl_line : 277 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1ca> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x37e): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 278 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><1d9> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x12e): bytesperline +DW_AT_decl_file : 3 +DW_AT_decl_line : 279 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><1e8> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5e): sizeimage +DW_AT_decl_file : 3 +DW_AT_decl_line : 280 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><1f7> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16d): colorspace +DW_AT_decl_file : 3 +DW_AT_decl_line : 281 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><206> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): priv +DW_AT_decl_file : 3 +DW_AT_decl_line : 282 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<1><216> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x120> +DW_AT_sibling : <0x226> +<2><21f> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><226> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x384): v4l2_clip +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 745 +DW_AT_sibling : <0x250> +<2><233> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : c +DW_AT_decl_file : 3 +DW_AT_decl_line : 746 +DW_AT_type : <0x14b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><240> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x71): next +DW_AT_decl_file : 3 +DW_AT_decl_line : 747 +DW_AT_type : <0x250> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><250> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x226> +<1><256> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x10e): v4l2_window +DW_AT_byte_size : 40 +DW_AT_decl_file : 3 +DW_AT_decl_line : 750 +DW_AT_sibling : <0x2cb> +<2><263> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : w +DW_AT_decl_file : 3 +DW_AT_decl_line : 751 +DW_AT_type : <0x14b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><270> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x37e): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 752 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><27f> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x398): chromakey +DW_AT_decl_file : 3 +DW_AT_decl_line : 753 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><28e> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3ab): clips +DW_AT_decl_file : 3 +DW_AT_decl_line : 754 +DW_AT_type : <0x250> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><29d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x104): clipcount +DW_AT_decl_file : 3 +DW_AT_decl_line : 755 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><2ac> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xfd): bitmap +DW_AT_decl_file : 3 +DW_AT_decl_line : 756 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><2bb> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x178): global_alpha +DW_AT_decl_file : 3 +DW_AT_decl_line : 757 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<1><2cb> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x120> +DW_AT_sibling : <0x2db> +<2><2d4> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 7 +<1><2db> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc1): v4l2_vbi_format +DW_AT_byte_size : 44 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1541 +DW_AT_sibling : <0x361> +<2><2e8> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x29f): sampling_rate +DW_AT_decl_file : 3 +DW_AT_decl_line : 1542 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><2f7> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x155): offset +DW_AT_decl_file : 3 +DW_AT_decl_line : 1543 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><306> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa6): samples_per_line +DW_AT_decl_file : 3 +DW_AT_decl_line : 1544 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><315> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3bf): sample_format +DW_AT_decl_file : 3 +DW_AT_decl_line : 1545 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><324> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x286): start +DW_AT_decl_file : 3 +DW_AT_decl_line : 1546 +DW_AT_type : <0x361> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><333> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x329): count +DW_AT_decl_file : 3 +DW_AT_decl_line : 1547 +DW_AT_type : <0x216> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><342> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fe): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 1548 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><351> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a2): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1549 +DW_AT_type : <0x216> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<1><361> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x115> +DW_AT_sibling : <0x371> +<2><36a> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><371> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1d4): v4l2_sliced_vbi_format +DW_AT_byte_size : 112 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1563 +DW_AT_sibling : <0x3bb> +<2><37e> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2e4): service_set +DW_AT_decl_file : 3 +DW_AT_decl_line : 1564 +DW_AT_type : <0x10a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><38d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x369): service_lines +DW_AT_decl_file : 3 +DW_AT_decl_line : 1569 +DW_AT_type : <0x3bb> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><39c> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x95): io_size +DW_AT_decl_file : 3 +DW_AT_decl_line : 1570 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 64 (DW_OP_plus_uconst: 100) +<2><3ab> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a2): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1571 +DW_AT_type : <0x216> +DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) +<1><3bb> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x10a> +DW_AT_sibling : <0x3d1> +<2><3c4> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<2><3ca> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 23 +<1><3d1> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1be): v4l2_plane_pix_format +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1664 +DW_AT_sibling : <0x40c> +<2><3de> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5e): sizeimage +DW_AT_decl_file : 3 +DW_AT_decl_line : 1665 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><3ed> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x12e): bytesperline +DW_AT_decl_file : 3 +DW_AT_decl_line : 1666 +DW_AT_type : <0x10a> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><3fc> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a2): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1667 +DW_AT_type : <0x40c> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<1><40c> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x10a> +DW_AT_sibling : <0x41c> +<2><415> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 6 +<1><41c> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x199): v4l2_pix_format_mplane +DW_AT_byte_size : 192 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1680 +DW_AT_sibling : <0x4a4> +<2><429> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11a): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 1681 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><438> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x220): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 1682 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><447> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x89): pixelformat +DW_AT_decl_file : 3 +DW_AT_decl_line : 1683 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><456> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x37e): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 1684 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><465> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16d): colorspace +DW_AT_decl_file : 3 +DW_AT_decl_line : 1685 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><474> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x38e): plane_fmt +DW_AT_decl_file : 3 +DW_AT_decl_line : 1687 +DW_AT_type : <0x4a4> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><483> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x234): num_planes +DW_AT_decl_file : 3 +DW_AT_decl_line : 1688 +DW_AT_type : <0xff> +DW_AT_data_member_location: 3 byte block: 23 b4 1 (DW_OP_plus_uconst: 180) +<2><493> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a2): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1689 +DW_AT_type : <0x4b4> +DW_AT_data_member_location: 3 byte block: 23 b5 1 (DW_OP_plus_uconst: 181) +<1><4a4> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x3d1> +DW_AT_sibling : <0x4b4> +<2><4ad> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 7 +<1><4b4> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0xff> +DW_AT_sibling : <0x4c4> +<2><4bd> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 10 +<1><4c4> +Abbrev Number: 20 (DW_TAG_union_type) +DW_AT_byte_size : 200 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1704 +DW_AT_sibling : <0x516> +<2><4cd> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : pix +DW_AT_decl_file : 3 +DW_AT_decl_line : 1705 +DW_AT_type : <0x190> +<2><4d9> +Abbrev Number: 22 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5): pix_mp +DW_AT_decl_file : 3 +DW_AT_decl_line : 1706 +DW_AT_type : <0x41c> +<2><4e5> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : win +DW_AT_decl_file : 3 +DW_AT_decl_line : 1707 +DW_AT_type : <0x256> +<2><4f1> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : vbi +DW_AT_decl_file : 3 +DW_AT_decl_line : 1708 +DW_AT_type : <0x2db> +<2><4fd> +Abbrev Number: 22 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1eb): sliced +DW_AT_decl_file : 3 +DW_AT_decl_line : 1709 +DW_AT_type : <0x371> +<2><509> +Abbrev Number: 22 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xee): raw_data +DW_AT_decl_file : 3 +DW_AT_decl_line : 1710 +DW_AT_type : <0x516> +<1><516> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0xff> +DW_AT_sibling : <0x526> +<2><51f> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 199 +<1><526> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x256): v4l2_format +DW_AT_byte_size : 204 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1702 +DW_AT_sibling : <0x552> +<2><533> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21b): type +DW_AT_decl_file : 3 +DW_AT_decl_line : 1703 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><542> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : fmt +DW_AT_decl_file : 3 +DW_AT_decl_line : 1711 +DW_AT_type : <0x4c4> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><552> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x185): v4l2_create_buffers +DW_AT_byte_size : 248 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1843 +DW_AT_sibling : <0x5ac> +<2><55f> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe8): index +DW_AT_decl_file : 3 +DW_AT_decl_line : 1844 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><56e> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x329): count +DW_AT_decl_file : 3 +DW_AT_decl_line : 1845 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><57d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x120): memory +DW_AT_decl_file : 3 +DW_AT_decl_line : 1846 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><58c> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x127): format +DW_AT_decl_file : 3 +DW_AT_decl_line : 1847 +DW_AT_type : <0x526> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><59b> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a2): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1848 +DW_AT_type : <0x2cb> +DW_AT_data_member_location: 3 byte block: 23 d8 1 (DW_OP_plus_uconst: 216) +<1><5ac> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x33d): struct_v4l2_create_buffers +DW_AT_decl_file : 4 +DW_AT_decl_line : 39 +DW_AT_type : <0x552> +<1><5b7> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x15c): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><5c5> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x377): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xed> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><5d3> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x27c): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><5e1> +Abbrev Number: 24 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x144): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x5ac> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_v4l2_create_buffers.h b/mpers-m32/struct_v4l2_create_buffers.h new file mode 100644 index 000000000..f85f054d6 --- /dev/null +++ b/mpers-m32/struct_v4l2_create_buffers.h @@ -0,0 +1,72 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t index; +uint32_t count; +uint32_t memory; +struct { +uint32_t type; +union { +struct { +uint32_t width; +uint32_t height; +uint32_t pixelformat; +uint32_t field; +uint32_t bytesperline; +uint32_t sizeimage; +uint32_t colorspace; +uint32_t priv; +} ATTRIBUTE_PACKED pix; +struct { +uint32_t width; +uint32_t height; +uint32_t pixelformat; +uint32_t field; +uint32_t colorspace; +struct { +uint32_t sizeimage; +uint16_t bytesperline; +uint16_t reserved[7]; +} ATTRIBUTE_PACKED plane_fmt[8]; +unsigned char num_planes; +unsigned char reserved[11]; +} ATTRIBUTE_PACKED pix_mp; +struct { +struct { +int32_t left; +int32_t top; +int32_t width; +int32_t height; +} ATTRIBUTE_PACKED w; +uint32_t field; +uint32_t chromakey; +mpers_ptr_t clips; +uint32_t clipcount; +mpers_ptr_t bitmap; +unsigned char global_alpha; +unsigned char mpers_end_filler_1[3]; +} ATTRIBUTE_PACKED win; +struct { +uint32_t sampling_rate; +uint32_t offset; +uint32_t samples_per_line; +uint32_t sample_format; +int32_t start[2]; +uint32_t count[2]; +uint32_t flags; +uint32_t reserved[2]; +} ATTRIBUTE_PACKED vbi; +struct { +uint16_t service_set; +uint16_t service_lines[24]; +unsigned char mpers_filler_2[50]; +uint32_t io_size; +uint32_t reserved[2]; +} ATTRIBUTE_PACKED sliced; +unsigned char raw_data[200]; +} fmt; +} ATTRIBUTE_PACKED format; +uint32_t reserved[8]; +} ATTRIBUTE_PACKED m32_struct_v4l2_create_buffers; +#define MPERS_m32_struct_v4l2_create_buffers m32_struct_v4l2_create_buffers diff --git a/mpers-m32/struct_v4l2_ext_control.c b/mpers-m32/struct_v4l2_ext_control.c new file mode 100644 index 000000000..d5365dd24 --- /dev/null +++ b/mpers-m32/struct_v4l2_ext_control.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_ext_control mpers_target_var; diff --git a/mpers-m32/struct_v4l2_ext_control.d1 b/mpers-m32/struct_v4l2_ext_control.d1 new file mode 100644 index 000000000..f9867f060 --- /dev/null +++ b/mpers-m32/struct_v4l2_ext_control.d1 @@ -0,0 +1,250 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x208 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x13b): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x82): mpers-m32/struct_v4l2_ext_control.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1cb): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x230): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x62): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x20f): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xe0): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x4f): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x194): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xc1): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x227): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xee): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x206): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <6c> DW_AT_type : <0x70> + <1><70>: Abbrev Number: 2 (DW_TAG_base_type) + <71> DW_AT_byte_size : 1 + <72> DW_AT_encoding : 6 (signed char) + <73> DW_AT_name : (indirect string, offset: 0x1c6): char + <1><77>: Abbrev Number: 4 (DW_TAG_pointer_type) + <78> DW_AT_byte_size : 4 + <79> DW_AT_type : <0x7d> + <1><7d>: Abbrev Number: 5 (DW_TAG_const_type) + <7e> DW_AT_type : <0x70> + <1><82>: Abbrev Number: 6 (DW_TAG_structure_type) + <83> DW_AT_name : (indirect string, offset: 0x100): sysent + <87> DW_AT_byte_size : 20 + <88> DW_AT_decl_file : 1 + <89> DW_AT_decl_line : 4 + <8a> DW_AT_sibling : <0xd5> + <2><8e>: Abbrev Number: 7 (DW_TAG_member) + <8f> DW_AT_name : (indirect string, offset: 0x135): nargs + <93> DW_AT_decl_file : 1 + <94> DW_AT_decl_line : 5 + <95> DW_AT_type : <0x47> + <99> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><9c>: Abbrev Number: 7 (DW_TAG_member) + <9d> DW_AT_name : (indirect string, offset: 0xb7): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x241): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xe0> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x72): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x77> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xe0> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xd5> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1b8): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x82> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf7> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe6> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x6c): _Bool + <1><103>: Abbrev Number: 11 (DW_TAG_typedef) + <104> DW_AT_name : (indirect string, offset: 0x107): __s32 + <108> DW_AT_decl_file : 2 + <109> DW_AT_decl_line : 25 + <10a> DW_AT_type : <0x2b> + <1><10e>: Abbrev Number: 11 (DW_TAG_typedef) + <10f> DW_AT_name : (indirect string, offset: 0x32): __u32 + <113> DW_AT_decl_file : 2 + <114> DW_AT_decl_line : 26 + <115> DW_AT_type : <0x47> + <1><119>: Abbrev Number: 11 (DW_TAG_typedef) + <11a> DW_AT_name : (indirect string, offset: 0x24a): __s64 + <11e> DW_AT_decl_file : 2 + <11f> DW_AT_decl_line : 29 + <120> DW_AT_type : <0x32> + <1><124>: Abbrev Number: 12 (DW_TAG_enumeration_type) + <125> DW_AT_name : (indirect string, offset: 0x183): v4l2_preemphasis + <129> DW_AT_byte_size : 4 + <12a> DW_AT_decl_file : 6 + <12b> DW_AT_decl_line : 763 + <12d> DW_AT_sibling : <0x144> + <2><131>: Abbrev Number: 13 (DW_TAG_enumerator) + <132> DW_AT_name : (indirect string, offset: 0x0): V4L2_PREEMPHASIS_DISABLED + <136> DW_AT_const_value : 0 + <2><137>: Abbrev Number: 13 (DW_TAG_enumerator) + <138> DW_AT_name : (indirect string, offset: 0x1a1): V4L2_PREEMPHASIS_50_uS + <13c> DW_AT_const_value : 1 + <2><13d>: Abbrev Number: 13 (DW_TAG_enumerator) + <13e> DW_AT_name : (indirect string, offset: 0x11e): V4L2_PREEMPHASIS_75_uS + <142> DW_AT_const_value : 2 + <2><143>: Abbrev Number: 0 + <1><144>: Abbrev Number: 14 (DW_TAG_union_type) + <145> DW_AT_byte_size : 8 + <146> DW_AT_decl_file : 3 + <147> DW_AT_decl_line : 1225 + <149> DW_AT_sibling : <0x172> + <2><14d>: Abbrev Number: 15 (DW_TAG_member) + <14e> DW_AT_name : (indirect string, offset: 0x38): value + <152> DW_AT_decl_file : 3 + <153> DW_AT_decl_line : 1226 + <155> DW_AT_type : <0x103> + <2><159>: Abbrev Number: 15 (DW_TAG_member) + <15a> DW_AT_name : (indirect string, offset: 0xd8): value64 + <15e> DW_AT_decl_file : 3 + <15f> DW_AT_decl_line : 1227 + <161> DW_AT_type : <0x119> + <2><165>: Abbrev Number: 15 (DW_TAG_member) + <166> DW_AT_name : (indirect string, offset: 0x7b): string + <16a> DW_AT_decl_file : 3 + <16b> DW_AT_decl_line : 1228 + <16d> DW_AT_type : <0x6a> + <2><171>: Abbrev Number: 0 + <1><172>: Abbrev Number: 16 (DW_TAG_structure_type) + <173> DW_AT_name : (indirect string, offset: 0x3e): v4l2_ext_control + <177> DW_AT_byte_size : 20 + <178> DW_AT_decl_file : 3 + <179> DW_AT_decl_line : 1221 + <17b> DW_AT_sibling : <0x1b4> + <2><17f>: Abbrev Number: 17 (DW_TAG_member) + <180> DW_AT_name : id + <183> DW_AT_decl_file : 3 + <184> DW_AT_decl_line : 1222 + <186> DW_AT_type : <0x10e> + <18a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><18d>: Abbrev Number: 18 (DW_TAG_member) + <18e> DW_AT_name : (indirect string, offset: 0x23c): size + <192> DW_AT_decl_file : 3 + <193> DW_AT_decl_line : 1223 + <195> DW_AT_type : <0x10e> + <199> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><19c>: Abbrev Number: 18 (DW_TAG_member) + <19d> DW_AT_name : (indirect string, offset: 0x21d): reserved2 + <1a1> DW_AT_decl_file : 3 + <1a2> DW_AT_decl_line : 1224 + <1a4> DW_AT_type : <0x1b4> + <1a8> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1ab>: Abbrev Number: 19 (DW_TAG_member) + <1ac> DW_AT_type : <0x144> + <1b0> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1b3>: Abbrev Number: 0 + <1><1b4>: Abbrev Number: 20 (DW_TAG_array_type) + <1b5> DW_AT_type : <0x10e> + <1b9> DW_AT_sibling : <0x1c4> + <2><1bd>: Abbrev Number: 21 (DW_TAG_subrange_type) + <1be> DW_AT_type : <0x63> + <1c2> DW_AT_upper_bound : 0 + <2><1c3>: Abbrev Number: 0 + <1><1c4>: Abbrev Number: 11 (DW_TAG_typedef) + <1c5> DW_AT_name : (indirect string, offset: 0x1a): struct_v4l2_ext_control + <1c9> DW_AT_decl_file : 4 + <1ca> DW_AT_decl_line : 40 + <1cb> DW_AT_type : <0x172> + <1><1cf>: Abbrev Number: 22 (DW_TAG_variable) + <1d0> DW_AT_name : (indirect string, offset: 0x10d): current_wordsize + <1d4> DW_AT_decl_file : 5 + <1d5> DW_AT_decl_line : 757 + <1d7> DW_AT_type : <0x47> + <1db> DW_AT_external : 1 + <1dc> DW_AT_declaration : 1 + <1><1dd>: Abbrev Number: 22 (DW_TAG_variable) + <1de> DW_AT_name : (indirect string, offset: 0x100): sysent + <1e2> DW_AT_decl_file : 5 + <1e3> DW_AT_decl_line : 892 + <1e5> DW_AT_type : <0xf1> + <1e9> DW_AT_external : 1 + <1ea> DW_AT_declaration : 1 + <1><1eb>: Abbrev Number: 22 (DW_TAG_variable) + <1ec> DW_AT_name : (indirect string, offset: 0x1fc): nsyscalls + <1f0> DW_AT_decl_file : 5 + <1f1> DW_AT_decl_line : 903 + <1f3> DW_AT_type : <0x47> + <1f7> DW_AT_external : 1 + <1f8> DW_AT_declaration : 1 + <1><1f9>: Abbrev Number: 23 (DW_TAG_variable) + <1fa> DW_AT_name : (indirect string, offset: 0xa6): mpers_target_var + <1fe> DW_AT_decl_file : 4 + <1ff> DW_AT_decl_line : 47 + <200> DW_AT_type : <0x1c4> + <204> DW_AT_external : 1 + <205> DW_AT_location : 5 byte block: 3 1 0 0 0 (DW_OP_addr: 1) + <1><20b>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_v4l2_ext_control.d2 b/mpers-m32/struct_v4l2_ext_control.d2 new file mode 100644 index 000000000..7ad2394a9 --- /dev/null +++ b/mpers-m32/struct_v4l2_ext_control.d2 @@ -0,0 +1,280 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x230): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x62): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x20f): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xe0): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x4f): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x194): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xc1): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x227): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xee): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x206): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x70> +<1><70> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1c6): char +<1><77> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x7d> +<1><7d> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x70> +<1><82> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x100): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd5> +<2><8e> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x135): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><9c> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb7): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x241): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xe0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x72): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x77> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xe0> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd5> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b8): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x82> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf7> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe6> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x6c): _Bool +<1><103> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x107): __s32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 25 +DW_AT_type : <0x2b> +<1><10e> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x32): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><119> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x24a): __s64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 29 +DW_AT_type : <0x32> +<1><124> +Abbrev Number: 12 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x183): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x144> +<2><131> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x0): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><137> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1a1): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><13d> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x11e): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><144> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1225 +DW_AT_sibling : <0x172> +<2><14d> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x38): value +DW_AT_decl_file : 3 +DW_AT_decl_line : 1226 +DW_AT_type : <0x103> +<2><159> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd8): value64 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1227 +DW_AT_type : <0x119> +<2><165> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7b): string +DW_AT_decl_file : 3 +DW_AT_decl_line : 1228 +DW_AT_type : <0x6a> +<1><172> +Abbrev Number: 16 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x3e): v4l2_ext_control +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1221 +DW_AT_sibling : <0x1b4> +<2><17f> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : id +DW_AT_decl_file : 3 +DW_AT_decl_line : 1222 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><18d> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23c): size +DW_AT_decl_file : 3 +DW_AT_decl_line : 1223 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><19c> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21d): reserved2 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1224 +DW_AT_type : <0x1b4> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1ab> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_type : <0x144> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1b4> +Abbrev Number: 20 (DW_TAG_array_type) +DW_AT_type : <0x10e> +DW_AT_sibling : <0x1c4> +<2><1bd> +Abbrev Number: 21 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 0 +<1><1c4> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1a): struct_v4l2_ext_control +DW_AT_decl_file : 4 +DW_AT_decl_line : 40 +DW_AT_type : <0x172> +<1><1cf> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x10d): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1dd> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x100): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xf1> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1eb> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1fc): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1f9> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xa6): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x1c4> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 1 0 0 0 (DW_OP_addr: 1) diff --git a/mpers-m32/struct_v4l2_ext_control.h b/mpers-m32/struct_v4l2_ext_control.h new file mode 100644 index 000000000..42a343eff --- /dev/null +++ b/mpers-m32/struct_v4l2_ext_control.h @@ -0,0 +1,14 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t id; +uint32_t size; +uint32_t reserved2[1]; +union { +int32_t value; +int64_t value64; +mpers_ptr_t string; +} ; +} ATTRIBUTE_PACKED m32_struct_v4l2_ext_control; +#define MPERS_m32_struct_v4l2_ext_control m32_struct_v4l2_ext_control diff --git a/mpers-m32/struct_v4l2_ext_controls.c b/mpers-m32/struct_v4l2_ext_controls.c new file mode 100644 index 000000000..626f230e2 --- /dev/null +++ b/mpers-m32/struct_v4l2_ext_controls.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_ext_controls mpers_target_var; diff --git a/mpers-m32/struct_v4l2_ext_controls.d1 b/mpers-m32/struct_v4l2_ext_controls.d1 new file mode 100644 index 000000000..3cc4f901e --- /dev/null +++ b/mpers-m32/struct_v4l2_ext_controls.d1 @@ -0,0 +1,297 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x277 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x142): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x1d7): mpers-m32/struct_v4l2_ext_controls.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x201): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x271): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x56): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x245): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xc5): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x43): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1a5): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x94): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x25d): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xd3): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x23c): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <6c> DW_AT_type : <0x70> + <1><70>: Abbrev Number: 2 (DW_TAG_base_type) + <71> DW_AT_byte_size : 1 + <72> DW_AT_encoding : 6 (signed char) + <73> DW_AT_name : (indirect string, offset: 0x1fc): char + <1><77>: Abbrev Number: 4 (DW_TAG_pointer_type) + <78> DW_AT_byte_size : 4 + <79> DW_AT_type : <0x7d> + <1><7d>: Abbrev Number: 5 (DW_TAG_const_type) + <7e> DW_AT_type : <0x70> + <1><82>: Abbrev Number: 6 (DW_TAG_structure_type) + <83> DW_AT_name : (indirect string, offset: 0xe5): sysent + <87> DW_AT_byte_size : 20 + <88> DW_AT_decl_file : 1 + <89> DW_AT_decl_line : 4 + <8a> DW_AT_sibling : <0xd5> + <2><8e>: Abbrev Number: 7 (DW_TAG_member) + <8f> DW_AT_name : (indirect string, offset: 0x13c): nargs + <93> DW_AT_decl_file : 1 + <94> DW_AT_decl_line : 5 + <95> DW_AT_type : <0x47> + <99> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><9c>: Abbrev Number: 7 (DW_TAG_member) + <9d> DW_AT_name : (indirect string, offset: 0x8a): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x282): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xe0> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x69): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x77> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xe0> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xd5> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1c9): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x82> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf7> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe6> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x1a): _Bool + <1><103>: Abbrev Number: 11 (DW_TAG_typedef) + <104> DW_AT_name : (indirect string, offset: 0x105): __s32 + <108> DW_AT_decl_file : 2 + <109> DW_AT_decl_line : 25 + <10a> DW_AT_type : <0x2b> + <1><10e>: Abbrev Number: 11 (DW_TAG_typedef) + <10f> DW_AT_name : (indirect string, offset: 0x20): __u32 + <113> DW_AT_decl_file : 2 + <114> DW_AT_decl_line : 26 + <115> DW_AT_type : <0x47> + <1><119>: Abbrev Number: 11 (DW_TAG_typedef) + <11a> DW_AT_name : (indirect string, offset: 0x28b): __s64 + <11e> DW_AT_decl_file : 2 + <11f> DW_AT_decl_line : 29 + <120> DW_AT_type : <0x32> + <1><124>: Abbrev Number: 12 (DW_TAG_enumeration_type) + <125> DW_AT_name : (indirect string, offset: 0x18a): v4l2_preemphasis + <129> DW_AT_byte_size : 4 + <12a> DW_AT_decl_file : 6 + <12b> DW_AT_decl_line : 763 + <12d> DW_AT_sibling : <0x144> + <2><131>: Abbrev Number: 13 (DW_TAG_enumerator) + <132> DW_AT_name : (indirect string, offset: 0x0): V4L2_PREEMPHASIS_DISABLED + <136> DW_AT_const_value : 0 + <2><137>: Abbrev Number: 13 (DW_TAG_enumerator) + <138> DW_AT_name : (indirect string, offset: 0x1b2): V4L2_PREEMPHASIS_50_uS + <13c> DW_AT_const_value : 1 + <2><13d>: Abbrev Number: 13 (DW_TAG_enumerator) + <13e> DW_AT_name : (indirect string, offset: 0x11c): V4L2_PREEMPHASIS_75_uS + <142> DW_AT_const_value : 2 + <2><143>: Abbrev Number: 0 + <1><144>: Abbrev Number: 14 (DW_TAG_array_type) + <145> DW_AT_type : <0x10e> + <149> DW_AT_sibling : <0x154> + <2><14d>: Abbrev Number: 15 (DW_TAG_subrange_type) + <14e> DW_AT_type : <0x63> + <152> DW_AT_upper_bound : 1 + <2><153>: Abbrev Number: 0 + <1><154>: Abbrev Number: 16 (DW_TAG_union_type) + <155> DW_AT_byte_size : 8 + <156> DW_AT_decl_file : 3 + <157> DW_AT_decl_line : 1225 + <159> DW_AT_sibling : <0x182> + <2><15d>: Abbrev Number: 17 (DW_TAG_member) + <15e> DW_AT_name : (indirect string, offset: 0x26): value + <162> DW_AT_decl_file : 3 + <163> DW_AT_decl_line : 1226 + <165> DW_AT_type : <0x103> + <2><169>: Abbrev Number: 17 (DW_TAG_member) + <16a> DW_AT_name : (indirect string, offset: 0xbd): value64 + <16e> DW_AT_decl_file : 3 + <16f> DW_AT_decl_line : 1227 + <171> DW_AT_type : <0x119> + <2><175>: Abbrev Number: 17 (DW_TAG_member) + <176> DW_AT_name : (indirect string, offset: 0x72): string + <17a> DW_AT_decl_file : 3 + <17b> DW_AT_decl_line : 1228 + <17d> DW_AT_type : <0x6a> + <2><181>: Abbrev Number: 0 + <1><182>: Abbrev Number: 18 (DW_TAG_structure_type) + <183> DW_AT_name : (indirect string, offset: 0x32): v4l2_ext_control + <187> DW_AT_byte_size : 20 + <188> DW_AT_decl_file : 3 + <189> DW_AT_decl_line : 1221 + <18b> DW_AT_sibling : <0x1c4> + <2><18f>: Abbrev Number: 19 (DW_TAG_member) + <190> DW_AT_name : id + <193> DW_AT_decl_file : 3 + <194> DW_AT_decl_line : 1222 + <196> DW_AT_type : <0x10e> + <19a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><19d>: Abbrev Number: 20 (DW_TAG_member) + <19e> DW_AT_name : (indirect string, offset: 0x27d): size + <1a2> DW_AT_decl_file : 3 + <1a3> DW_AT_decl_line : 1223 + <1a5> DW_AT_type : <0x10e> + <1a9> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1ac>: Abbrev Number: 20 (DW_TAG_member) + <1ad> DW_AT_name : (indirect string, offset: 0x253): reserved2 + <1b1> DW_AT_decl_file : 3 + <1b2> DW_AT_decl_line : 1224 + <1b4> DW_AT_type : <0x1c4> + <1b8> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1bb>: Abbrev Number: 21 (DW_TAG_member) + <1bc> DW_AT_type : <0x154> + <1c0> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1c3>: Abbrev Number: 0 + <1><1c4>: Abbrev Number: 14 (DW_TAG_array_type) + <1c5> DW_AT_type : <0x10e> + <1c9> DW_AT_sibling : <0x1d4> + <2><1cd>: Abbrev Number: 15 (DW_TAG_subrange_type) + <1ce> DW_AT_type : <0x63> + <1d2> DW_AT_upper_bound : 0 + <2><1d3>: Abbrev Number: 0 + <1><1d4>: Abbrev Number: 18 (DW_TAG_structure_type) + <1d5> DW_AT_name : (indirect string, offset: 0xab): v4l2_ext_controls + <1d9> DW_AT_byte_size : 24 + <1da> DW_AT_decl_file : 3 + <1db> DW_AT_decl_line : 1232 + <1dd> DW_AT_sibling : <0x22d> + <2><1e1>: Abbrev Number: 20 (DW_TAG_member) + <1e2> DW_AT_name : (indirect string, offset: 0x266): ctrl_class + <1e6> DW_AT_decl_file : 3 + <1e7> DW_AT_decl_line : 1233 + <1e9> DW_AT_type : <0x10e> + <1ed> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1f0>: Abbrev Number: 20 (DW_TAG_member) + <1f1> DW_AT_name : (indirect string, offset: 0x2c): count + <1f5> DW_AT_decl_file : 3 + <1f6> DW_AT_decl_line : 1234 + <1f8> DW_AT_type : <0x10e> + <1fc> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1ff>: Abbrev Number: 20 (DW_TAG_member) + <200> DW_AT_name : (indirect string, offset: 0x19b): error_idx + <204> DW_AT_decl_file : 3 + <205> DW_AT_decl_line : 1235 + <207> DW_AT_type : <0x10e> + <20b> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><20e>: Abbrev Number: 20 (DW_TAG_member) + <20f> DW_AT_name : (indirect string, offset: 0x133): reserved + <213> DW_AT_decl_file : 3 + <214> DW_AT_decl_line : 1236 + <216> DW_AT_type : <0x144> + <21a> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><21d>: Abbrev Number: 20 (DW_TAG_member) + <21e> DW_AT_name : (indirect string, offset: 0x60): controls + <222> DW_AT_decl_file : 3 + <223> DW_AT_decl_line : 1237 + <225> DW_AT_type : <0x22d> + <229> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><22c>: Abbrev Number: 0 + <1><22d>: Abbrev Number: 4 (DW_TAG_pointer_type) + <22e> DW_AT_byte_size : 4 + <22f> DW_AT_type : <0x182> + <1><233>: Abbrev Number: 11 (DW_TAG_typedef) + <234> DW_AT_name : (indirect string, offset: 0xec): struct_v4l2_ext_controls + <238> DW_AT_decl_file : 4 + <239> DW_AT_decl_line : 41 + <23a> DW_AT_type : <0x1d4> + <1><23e>: Abbrev Number: 22 (DW_TAG_variable) + <23f> DW_AT_name : (indirect string, offset: 0x10b): current_wordsize + <243> DW_AT_decl_file : 5 + <244> DW_AT_decl_line : 757 + <246> DW_AT_type : <0x47> + <24a> DW_AT_external : 1 + <24b> DW_AT_declaration : 1 + <1><24c>: Abbrev Number: 22 (DW_TAG_variable) + <24d> DW_AT_name : (indirect string, offset: 0xe5): sysent + <251> DW_AT_decl_file : 5 + <252> DW_AT_decl_line : 892 + <254> DW_AT_type : <0xf1> + <258> DW_AT_external : 1 + <259> DW_AT_declaration : 1 + <1><25a>: Abbrev Number: 22 (DW_TAG_variable) + <25b> DW_AT_name : (indirect string, offset: 0x232): nsyscalls + <25f> DW_AT_decl_file : 5 + <260> DW_AT_decl_line : 903 + <262> DW_AT_type : <0x47> + <266> DW_AT_external : 1 + <267> DW_AT_declaration : 1 + <1><268>: Abbrev Number: 23 (DW_TAG_variable) + <269> DW_AT_name : (indirect string, offset: 0x79): mpers_target_var + <26d> DW_AT_decl_file : 4 + <26e> DW_AT_decl_line : 47 + <26f> DW_AT_type : <0x233> + <273> DW_AT_external : 1 + <274> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><27a>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_v4l2_ext_controls.d2 b/mpers-m32/struct_v4l2_ext_controls.d2 new file mode 100644 index 000000000..5870f8dbc --- /dev/null +++ b/mpers-m32/struct_v4l2_ext_controls.d2 @@ -0,0 +1,334 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x271): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x56): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x245): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xc5): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x43): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1a5): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x94): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x25d): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xd3): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x23c): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x70> +<1><70> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1fc): char +<1><77> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x7d> +<1><7d> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x70> +<1><82> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xe5): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd5> +<2><8e> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x13c): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><9c> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8a): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x282): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xe0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x69): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x77> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xe0> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd5> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1c9): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x82> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf7> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe6> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x1a): _Bool +<1><103> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x105): __s32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 25 +DW_AT_type : <0x2b> +<1><10e> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x20): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><119> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x28b): __s64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 29 +DW_AT_type : <0x32> +<1><124> +Abbrev Number: 12 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x18a): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x144> +<2><131> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x0): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><137> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1b2): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><13d> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x11c): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><144> +Abbrev Number: 14 (DW_TAG_array_type) +DW_AT_type : <0x10e> +DW_AT_sibling : <0x154> +<2><14d> +Abbrev Number: 15 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><154> +Abbrev Number: 16 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1225 +DW_AT_sibling : <0x182> +<2><15d> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x26): value +DW_AT_decl_file : 3 +DW_AT_decl_line : 1226 +DW_AT_type : <0x103> +<2><169> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbd): value64 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1227 +DW_AT_type : <0x119> +<2><175> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x72): string +DW_AT_decl_file : 3 +DW_AT_decl_line : 1228 +DW_AT_type : <0x6a> +<1><182> +Abbrev Number: 18 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x32): v4l2_ext_control +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1221 +DW_AT_sibling : <0x1c4> +<2><18f> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : id +DW_AT_decl_file : 3 +DW_AT_decl_line : 1222 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><19d> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x27d): size +DW_AT_decl_file : 3 +DW_AT_decl_line : 1223 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1ac> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x253): reserved2 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1224 +DW_AT_type : <0x1c4> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1bb> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_type : <0x154> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1c4> +Abbrev Number: 14 (DW_TAG_array_type) +DW_AT_type : <0x10e> +DW_AT_sibling : <0x1d4> +<2><1cd> +Abbrev Number: 15 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 0 +<1><1d4> +Abbrev Number: 18 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xab): v4l2_ext_controls +DW_AT_byte_size : 24 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1232 +DW_AT_sibling : <0x22d> +<2><1e1> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x266): ctrl_class +DW_AT_decl_file : 3 +DW_AT_decl_line : 1233 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1f0> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c): count +DW_AT_decl_file : 3 +DW_AT_decl_line : 1234 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1ff> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x19b): error_idx +DW_AT_decl_file : 3 +DW_AT_decl_line : 1235 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><20e> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x133): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1236 +DW_AT_type : <0x144> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><21d> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x60): controls +DW_AT_decl_file : 3 +DW_AT_decl_line : 1237 +DW_AT_type : <0x22d> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<1><22d> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x182> +<1><233> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xec): struct_v4l2_ext_controls +DW_AT_decl_file : 4 +DW_AT_decl_line : 41 +DW_AT_type : <0x1d4> +<1><23e> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x10b): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><24c> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe5): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xf1> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><25a> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x232): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><268> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x79): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x233> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/struct_v4l2_ext_controls.h b/mpers-m32/struct_v4l2_ext_controls.h new file mode 100644 index 000000000..eccff7203 --- /dev/null +++ b/mpers-m32/struct_v4l2_ext_controls.h @@ -0,0 +1,11 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t ctrl_class; +uint32_t count; +uint32_t error_idx; +uint32_t reserved[2]; +mpers_ptr_t controls; +} ATTRIBUTE_PACKED m32_struct_v4l2_ext_controls; +#define MPERS_m32_struct_v4l2_ext_controls m32_struct_v4l2_ext_controls diff --git a/mpers-m32/struct_v4l2_format.c b/mpers-m32/struct_v4l2_format.c new file mode 100644 index 000000000..fd7973f54 --- /dev/null +++ b/mpers-m32/struct_v4l2_format.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_format mpers_target_var; diff --git a/mpers-m32/struct_v4l2_format.d1 b/mpers-m32/struct_v4l2_format.d1 new file mode 100644 index 000000000..fc530af5f --- /dev/null +++ b/mpers-m32/struct_v4l2_format.d1 @@ -0,0 +1,628 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x586 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x16): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x136): mpers-m32/struct_v4l2_format.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x395): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1f8): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x71): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x128): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x1b6): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x292): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x22d): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x20a): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x155): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x2fd): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x7b): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x2c6): char + <1><73>: Abbrev Number: 5 (DW_TAG_pointer_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_type : <0x79> + <1><79>: Abbrev Number: 6 (DW_TAG_const_type) + <7a> DW_AT_type : <0x6c> + <1><7e>: Abbrev Number: 7 (DW_TAG_structure_type) + <7f> DW_AT_name : (indirect string, offset: 0x34e): sysent + <83> DW_AT_byte_size : 20 + <84> DW_AT_decl_file : 1 + <85> DW_AT_decl_line : 4 + <86> DW_AT_sibling : <0xd1> + <2><8a>: Abbrev Number: 8 (DW_TAG_member) + <8b> DW_AT_name : (indirect string, offset: 0x30f): nargs + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 5 + <91> DW_AT_type : <0x47> + <95> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><98>: Abbrev Number: 8 (DW_TAG_member) + <99> DW_AT_name : (indirect string, offset: 0xbf): sys_flags + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 6 + <9f> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x68): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xdc> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xa5): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x73> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xdc> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) +
DW_AT_byte_size : 4 + DW_AT_type : <0xd1> + <1>: Abbrev Number: 12 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x321): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7e> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf3> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xe2> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x2d0): _Bool + <1>: Abbrev Number: 12 (DW_TAG_typedef) + <100> DW_AT_name : (indirect string, offset: 0x2f8): __u8 + <104> DW_AT_decl_file : 2 + <105> DW_AT_decl_line : 20 + <106> DW_AT_type : <0x39> + <1><10a>: Abbrev Number: 12 (DW_TAG_typedef) + <10b> DW_AT_name : (indirect string, offset: 0x2f2): __u16 + <10f> DW_AT_decl_file : 2 + <110> DW_AT_decl_line : 23 + <111> DW_AT_type : <0x40> + <1><115>: Abbrev Number: 12 (DW_TAG_typedef) + <116> DW_AT_name : (indirect string, offset: 0x315): __s32 + <11a> DW_AT_decl_file : 2 + <11b> DW_AT_decl_line : 25 + <11c> DW_AT_type : <0x2b> + <1><120>: Abbrev Number: 12 (DW_TAG_typedef) + <121> DW_AT_name : (indirect string, offset: 0xff): __u32 + <125> DW_AT_decl_file : 2 + <126> DW_AT_decl_line : 26 + <127> DW_AT_type : <0x47> + <1><12b>: Abbrev Number: 13 (DW_TAG_enumeration_type) + <12c> DW_AT_name : (indirect string, offset: 0x32f): v4l2_preemphasis + <130> DW_AT_byte_size : 4 + <131> DW_AT_decl_file : 6 + <132> DW_AT_decl_line : 763 + <134> DW_AT_sibling : <0x14b> + <2><138>: Abbrev Number: 14 (DW_TAG_enumerator) + <139> DW_AT_name : (indirect string, offset: 0x268): V4L2_PREEMPHASIS_DISABLED + <13d> DW_AT_const_value : 0 + <2><13e>: Abbrev Number: 14 (DW_TAG_enumerator) + <13f> DW_AT_name : (indirect string, offset: 0x245): V4L2_PREEMPHASIS_50_uS + <143> DW_AT_const_value : 1 + <2><144>: Abbrev Number: 14 (DW_TAG_enumerator) + <145> DW_AT_name : (indirect string, offset: 0xd9): V4L2_PREEMPHASIS_75_uS + <149> DW_AT_const_value : 2 + <2><14a>: Abbrev Number: 0 + <1><14b>: Abbrev Number: 7 (DW_TAG_structure_type) + <14c> DW_AT_name : (indirect string, offset: 0xc): v4l2_rect + <150> DW_AT_byte_size : 16 + <151> DW_AT_decl_file : 3 + <152> DW_AT_decl_line : 205 + <153> DW_AT_sibling : <0x190> + <2><157>: Abbrev Number: 8 (DW_TAG_member) + <158> DW_AT_name : (indirect string, offset: 0x2cb): left + <15c> DW_AT_decl_file : 3 + <15d> DW_AT_decl_line : 206 + <15e> DW_AT_type : <0x115> + <162> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><165>: Abbrev Number: 9 (DW_TAG_member) + <166> DW_AT_name : top + <16a> DW_AT_decl_file : 3 + <16b> DW_AT_decl_line : 207 + <16c> DW_AT_type : <0x115> + <170> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><173>: Abbrev Number: 8 (DW_TAG_member) + <174> DW_AT_name : (indirect string, offset: 0x122): width + <178> DW_AT_decl_file : 3 + <179> DW_AT_decl_line : 208 + <17a> DW_AT_type : <0x115> + <17e> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><181>: Abbrev Number: 8 (DW_TAG_member) + <182> DW_AT_name : (indirect string, offset: 0x226): height + <186> DW_AT_decl_file : 3 + <187> DW_AT_decl_line : 209 + <188> DW_AT_type : <0x115> + <18c> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><18f>: Abbrev Number: 0 + <1><190>: Abbrev Number: 15 (DW_TAG_structure_type) + <191> DW_AT_name : (indirect string, offset: 0x2e2): v4l2_pix_format + <195> DW_AT_byte_size : 32 + <196> DW_AT_decl_file : 3 + <197> DW_AT_decl_line : 274 + <199> DW_AT_sibling : <0x216> + <2><19d>: Abbrev Number: 16 (DW_TAG_member) + <19e> DW_AT_name : (indirect string, offset: 0x122): width + <1a2> DW_AT_decl_file : 3 + <1a3> DW_AT_decl_line : 275 + <1a5> DW_AT_type : <0x120> + <1a9> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1ac>: Abbrev Number: 16 (DW_TAG_member) + <1ad> DW_AT_name : (indirect string, offset: 0x226): height + <1b1> DW_AT_decl_file : 3 + <1b2> DW_AT_decl_line : 276 + <1b4> DW_AT_type : <0x120> + <1b8> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1bb>: Abbrev Number: 16 (DW_TAG_member) + <1bc> DW_AT_name : (indirect string, offset: 0x84): pixelformat + <1c0> DW_AT_decl_file : 3 + <1c1> DW_AT_decl_line : 277 + <1c3> DW_AT_type : <0x120> + <1c7> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1ca>: Abbrev Number: 16 (DW_TAG_member) + <1cb> DW_AT_name : (indirect string, offset: 0xf0): field + <1cf> DW_AT_decl_file : 3 + <1d0> DW_AT_decl_line : 278 + <1d2> DW_AT_type : <0x120> + <1d6> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1d9>: Abbrev Number: 16 (DW_TAG_member) + <1da> DW_AT_name : (indirect string, offset: 0x90): bytesperline + <1de> DW_AT_decl_file : 3 + <1df> DW_AT_decl_line : 279 + <1e1> DW_AT_type : <0x120> + <1e5> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><1e8>: Abbrev Number: 16 (DW_TAG_member) + <1e9> DW_AT_name : (indirect string, offset: 0x5e): sizeimage + <1ed> DW_AT_decl_file : 3 + <1ee> DW_AT_decl_line : 280 + <1f0> DW_AT_type : <0x120> + <1f4> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><1f7>: Abbrev Number: 16 (DW_TAG_member) + <1f8> DW_AT_name : (indirect string, offset: 0x187): colorspace + <1fc> DW_AT_decl_file : 3 + <1fd> DW_AT_decl_line : 281 + <1ff> DW_AT_type : <0x120> + <203> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><206>: Abbrev Number: 16 (DW_TAG_member) + <207> DW_AT_name : (indirect string, offset: 0x0): priv + <20b> DW_AT_decl_file : 3 + <20c> DW_AT_decl_line : 282 + <20e> DW_AT_type : <0x120> + <212> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><215>: Abbrev Number: 0 + <1><216>: Abbrev Number: 17 (DW_TAG_array_type) + <217> DW_AT_type : <0x120> + <21b> DW_AT_sibling : <0x226> + <2><21f>: Abbrev Number: 18 (DW_TAG_subrange_type) + <220> DW_AT_type : <0x63> + <224> DW_AT_upper_bound : 1 + <2><225>: Abbrev Number: 0 + <1><226>: Abbrev Number: 15 (DW_TAG_structure_type) + <227> DW_AT_name : (indirect string, offset: 0x355): v4l2_clip + <22b> DW_AT_byte_size : 20 + <22c> DW_AT_decl_file : 3 + <22d> DW_AT_decl_line : 745 + <22f> DW_AT_sibling : <0x250> + <2><233>: Abbrev Number: 19 (DW_TAG_member) + <234> DW_AT_name : c + <236> DW_AT_decl_file : 3 + <237> DW_AT_decl_line : 746 + <239> DW_AT_type : <0x14b> + <23d> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><240>: Abbrev Number: 16 (DW_TAG_member) + <241> DW_AT_name : (indirect string, offset: 0x382): next + <245> DW_AT_decl_file : 3 + <246> DW_AT_decl_line : 747 + <248> DW_AT_type : <0x250> + <24c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><24f>: Abbrev Number: 0 + <1><250>: Abbrev Number: 5 (DW_TAG_pointer_type) + <251> DW_AT_byte_size : 4 + <252> DW_AT_type : <0x226> + <1><256>: Abbrev Number: 15 (DW_TAG_structure_type) + <257> DW_AT_name : (indirect string, offset: 0x116): v4l2_window + <25b> DW_AT_byte_size : 40 + <25c> DW_AT_decl_file : 3 + <25d> DW_AT_decl_line : 750 + <25f> DW_AT_sibling : <0x2cb> + <2><263>: Abbrev Number: 19 (DW_TAG_member) + <264> DW_AT_name : w + <266> DW_AT_decl_file : 3 + <267> DW_AT_decl_line : 751 + <269> DW_AT_type : <0x14b> + <26d> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><270>: Abbrev Number: 16 (DW_TAG_member) + <271> DW_AT_name : (indirect string, offset: 0xf0): field + <275> DW_AT_decl_file : 3 + <276> DW_AT_decl_line : 752 + <278> DW_AT_type : <0x120> + <27c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><27f>: Abbrev Number: 16 (DW_TAG_member) + <280> DW_AT_name : (indirect string, offset: 0x369): chromakey + <284> DW_AT_decl_file : 3 + <285> DW_AT_decl_line : 753 + <287> DW_AT_type : <0x120> + <28b> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><28e>: Abbrev Number: 16 (DW_TAG_member) + <28f> DW_AT_name : (indirect string, offset: 0x37c): clips + <293> DW_AT_decl_file : 3 + <294> DW_AT_decl_line : 754 + <296> DW_AT_type : <0x250> + <29a> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><29d>: Abbrev Number: 16 (DW_TAG_member) + <29e> DW_AT_name : (indirect string, offset: 0x10c): clipcount + <2a2> DW_AT_decl_file : 3 + <2a3> DW_AT_decl_line : 755 + <2a5> DW_AT_type : <0x120> + <2a9> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><2ac>: Abbrev Number: 16 (DW_TAG_member) + <2ad> DW_AT_name : (indirect string, offset: 0x105): bitmap + <2b1> DW_AT_decl_file : 3 + <2b2> DW_AT_decl_line : 756 + <2b4> DW_AT_type : <0x6a> + <2b8> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><2bb>: Abbrev Number: 16 (DW_TAG_member) + <2bc> DW_AT_name : (indirect string, offset: 0x192): global_alpha + <2c0> DW_AT_decl_file : 3 + <2c1> DW_AT_decl_line : 757 + <2c3> DW_AT_type : <0xff> + <2c7> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><2ca>: Abbrev Number: 0 + <1><2cb>: Abbrev Number: 15 (DW_TAG_structure_type) + <2cc> DW_AT_name : (indirect string, offset: 0xc9): v4l2_vbi_format + <2d0> DW_AT_byte_size : 44 + <2d1> DW_AT_decl_file : 3 + <2d2> DW_AT_decl_line : 1541 + <2d4> DW_AT_sibling : <0x351> + <2><2d8>: Abbrev Number: 16 (DW_TAG_member) + <2d9> DW_AT_name : (indirect string, offset: 0x2b8): sampling_rate + <2dd> DW_AT_decl_file : 3 + <2de> DW_AT_decl_line : 1542 + <2e0> DW_AT_type : <0x120> + <2e4> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><2e7>: Abbrev Number: 16 (DW_TAG_member) + <2e8> DW_AT_name : (indirect string, offset: 0x16f): offset + <2ec> DW_AT_decl_file : 3 + <2ed> DW_AT_decl_line : 1543 + <2ef> DW_AT_type : <0x120> + <2f3> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><2f6>: Abbrev Number: 16 (DW_TAG_member) + <2f7> DW_AT_name : (indirect string, offset: 0xae): samples_per_line + <2fb> DW_AT_decl_file : 3 + <2fc> DW_AT_decl_line : 1544 + <2fe> DW_AT_type : <0x120> + <302> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><305>: Abbrev Number: 16 (DW_TAG_member) + <306> DW_AT_name : (indirect string, offset: 0x387): sample_format + <30a> DW_AT_decl_file : 3 + <30b> DW_AT_decl_line : 1545 + <30d> DW_AT_type : <0x120> + <311> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><314>: Abbrev Number: 16 (DW_TAG_member) + <315> DW_AT_name : (indirect string, offset: 0x28c): start + <319> DW_AT_decl_file : 3 + <31a> DW_AT_decl_line : 1546 + <31c> DW_AT_type : <0x351> + <320> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><323>: Abbrev Number: 16 (DW_TAG_member) + <324> DW_AT_name : (indirect string, offset: 0x31b): count + <328> DW_AT_decl_file : 3 + <329> DW_AT_decl_line : 1547 + <32b> DW_AT_type : <0x216> + <32f> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><332>: Abbrev Number: 16 (DW_TAG_member) + <333> DW_AT_name : (indirect string, offset: 0x204): flags + <337> DW_AT_decl_file : 3 + <338> DW_AT_decl_line : 1548 + <33a> DW_AT_type : <0x120> + <33e> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><341>: Abbrev Number: 16 (DW_TAG_member) + <342> DW_AT_name : (indirect string, offset: 0x373): reserved + <346> DW_AT_decl_file : 3 + <347> DW_AT_decl_line : 1549 + <349> DW_AT_type : <0x216> + <34d> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><350>: Abbrev Number: 0 + <1><351>: Abbrev Number: 17 (DW_TAG_array_type) + <352> DW_AT_type : <0x115> + <356> DW_AT_sibling : <0x361> + <2><35a>: Abbrev Number: 18 (DW_TAG_subrange_type) + <35b> DW_AT_type : <0x63> + <35f> DW_AT_upper_bound : 1 + <2><360>: Abbrev Number: 0 + <1><361>: Abbrev Number: 15 (DW_TAG_structure_type) + <362> DW_AT_name : (indirect string, offset: 0x1da): v4l2_sliced_vbi_format + <366> DW_AT_byte_size : 112 + <367> DW_AT_decl_file : 3 + <368> DW_AT_decl_line : 1563 + <36a> DW_AT_sibling : <0x3ab> + <2><36e>: Abbrev Number: 16 (DW_TAG_member) + <36f> DW_AT_name : (indirect string, offset: 0x2d6): service_set + <373> DW_AT_decl_file : 3 + <374> DW_AT_decl_line : 1564 + <376> DW_AT_type : <0x10a> + <37a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><37d>: Abbrev Number: 16 (DW_TAG_member) + <37e> DW_AT_name : (indirect string, offset: 0x340): service_lines + <382> DW_AT_decl_file : 3 + <383> DW_AT_decl_line : 1569 + <385> DW_AT_type : <0x3ab> + <389> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><38c>: Abbrev Number: 16 (DW_TAG_member) + <38d> DW_AT_name : (indirect string, offset: 0x9d): io_size + <391> DW_AT_decl_file : 3 + <392> DW_AT_decl_line : 1570 + <394> DW_AT_type : <0x120> + <398> DW_AT_data_member_location: 2 byte block: 23 64 (DW_OP_plus_uconst: 100) + <2><39b>: Abbrev Number: 16 (DW_TAG_member) + <39c> DW_AT_name : (indirect string, offset: 0x373): reserved + <3a0> DW_AT_decl_file : 3 + <3a1> DW_AT_decl_line : 1571 + <3a3> DW_AT_type : <0x216> + <3a7> DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) + <2><3aa>: Abbrev Number: 0 + <1><3ab>: Abbrev Number: 17 (DW_TAG_array_type) + <3ac> DW_AT_type : <0x10a> + <3b0> DW_AT_sibling : <0x3c1> + <2><3b4>: Abbrev Number: 18 (DW_TAG_subrange_type) + <3b5> DW_AT_type : <0x63> + <3b9> DW_AT_upper_bound : 1 + <2><3ba>: Abbrev Number: 18 (DW_TAG_subrange_type) + <3bb> DW_AT_type : <0x63> + <3bf> DW_AT_upper_bound : 23 + <2><3c0>: Abbrev Number: 0 + <1><3c1>: Abbrev Number: 15 (DW_TAG_structure_type) + <3c2> DW_AT_name : (indirect string, offset: 0x1c4): v4l2_plane_pix_format + <3c6> DW_AT_byte_size : 20 + <3c7> DW_AT_decl_file : 3 + <3c8> DW_AT_decl_line : 1664 + <3ca> DW_AT_sibling : <0x3fc> + <2><3ce>: Abbrev Number: 16 (DW_TAG_member) + <3cf> DW_AT_name : (indirect string, offset: 0x5e): sizeimage + <3d3> DW_AT_decl_file : 3 + <3d4> DW_AT_decl_line : 1665 + <3d6> DW_AT_type : <0x120> + <3da> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><3dd>: Abbrev Number: 16 (DW_TAG_member) + <3de> DW_AT_name : (indirect string, offset: 0x90): bytesperline + <3e2> DW_AT_decl_file : 3 + <3e3> DW_AT_decl_line : 1666 + <3e5> DW_AT_type : <0x10a> + <3e9> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><3ec>: Abbrev Number: 16 (DW_TAG_member) + <3ed> DW_AT_name : (indirect string, offset: 0x373): reserved + <3f1> DW_AT_decl_file : 3 + <3f2> DW_AT_decl_line : 1667 + <3f4> DW_AT_type : <0x3fc> + <3f8> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><3fb>: Abbrev Number: 0 + <1><3fc>: Abbrev Number: 17 (DW_TAG_array_type) + <3fd> DW_AT_type : <0x10a> + <401> DW_AT_sibling : <0x40c> + <2><405>: Abbrev Number: 18 (DW_TAG_subrange_type) + <406> DW_AT_type : <0x63> + <40a> DW_AT_upper_bound : 6 + <2><40b>: Abbrev Number: 0 + <1><40c>: Abbrev Number: 15 (DW_TAG_structure_type) + <40d> DW_AT_name : (indirect string, offset: 0x19f): v4l2_pix_format_mplane + <411> DW_AT_byte_size : 192 + <412> DW_AT_decl_file : 3 + <413> DW_AT_decl_line : 1680 + <415> DW_AT_sibling : <0x494> + <2><419>: Abbrev Number: 16 (DW_TAG_member) + <41a> DW_AT_name : (indirect string, offset: 0x122): width + <41e> DW_AT_decl_file : 3 + <41f> DW_AT_decl_line : 1681 + <421> DW_AT_type : <0x120> + <425> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><428>: Abbrev Number: 16 (DW_TAG_member) + <429> DW_AT_name : (indirect string, offset: 0x226): height + <42d> DW_AT_decl_file : 3 + <42e> DW_AT_decl_line : 1682 + <430> DW_AT_type : <0x120> + <434> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><437>: Abbrev Number: 16 (DW_TAG_member) + <438> DW_AT_name : (indirect string, offset: 0x84): pixelformat + <43c> DW_AT_decl_file : 3 + <43d> DW_AT_decl_line : 1683 + <43f> DW_AT_type : <0x120> + <443> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><446>: Abbrev Number: 16 (DW_TAG_member) + <447> DW_AT_name : (indirect string, offset: 0xf0): field + <44b> DW_AT_decl_file : 3 + <44c> DW_AT_decl_line : 1684 + <44e> DW_AT_type : <0x120> + <452> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><455>: Abbrev Number: 16 (DW_TAG_member) + <456> DW_AT_name : (indirect string, offset: 0x187): colorspace + <45a> DW_AT_decl_file : 3 + <45b> DW_AT_decl_line : 1685 + <45d> DW_AT_type : <0x120> + <461> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><464>: Abbrev Number: 16 (DW_TAG_member) + <465> DW_AT_name : (indirect string, offset: 0x35f): plane_fmt + <469> DW_AT_decl_file : 3 + <46a> DW_AT_decl_line : 1687 + <46c> DW_AT_type : <0x494> + <470> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><473>: Abbrev Number: 16 (DW_TAG_member) + <474> DW_AT_name : (indirect string, offset: 0x23a): num_planes + <478> DW_AT_decl_file : 3 + <479> DW_AT_decl_line : 1688 + <47b> DW_AT_type : <0xff> + <47f> DW_AT_data_member_location: 3 byte block: 23 b4 1 (DW_OP_plus_uconst: 180) + <2><483>: Abbrev Number: 16 (DW_TAG_member) + <484> DW_AT_name : (indirect string, offset: 0x373): reserved + <488> DW_AT_decl_file : 3 + <489> DW_AT_decl_line : 1689 + <48b> DW_AT_type : <0x4a4> + <48f> DW_AT_data_member_location: 3 byte block: 23 b5 1 (DW_OP_plus_uconst: 181) + <2><493>: Abbrev Number: 0 + <1><494>: Abbrev Number: 17 (DW_TAG_array_type) + <495> DW_AT_type : <0x3c1> + <499> DW_AT_sibling : <0x4a4> + <2><49d>: Abbrev Number: 18 (DW_TAG_subrange_type) + <49e> DW_AT_type : <0x63> + <4a2> DW_AT_upper_bound : 7 + <2><4a3>: Abbrev Number: 0 + <1><4a4>: Abbrev Number: 17 (DW_TAG_array_type) + <4a5> DW_AT_type : <0xff> + <4a9> DW_AT_sibling : <0x4b4> + <2><4ad>: Abbrev Number: 18 (DW_TAG_subrange_type) + <4ae> DW_AT_type : <0x63> + <4b2> DW_AT_upper_bound : 10 + <2><4b3>: Abbrev Number: 0 + <1><4b4>: Abbrev Number: 20 (DW_TAG_union_type) + <4b5> DW_AT_byte_size : 200 + <4b6> DW_AT_decl_file : 3 + <4b7> DW_AT_decl_line : 1704 + <4b9> DW_AT_sibling : <0x506> + <2><4bd>: Abbrev Number: 21 (DW_TAG_member) + <4be> DW_AT_name : pix + <4c2> DW_AT_decl_file : 3 + <4c3> DW_AT_decl_line : 1705 + <4c5> DW_AT_type : <0x190> + <2><4c9>: Abbrev Number: 22 (DW_TAG_member) + <4ca> DW_AT_name : (indirect string, offset: 0x5): pix_mp + <4ce> DW_AT_decl_file : 3 + <4cf> DW_AT_decl_line : 1706 + <4d1> DW_AT_type : <0x40c> + <2><4d5>: Abbrev Number: 21 (DW_TAG_member) + <4d6> DW_AT_name : win + <4da> DW_AT_decl_file : 3 + <4db> DW_AT_decl_line : 1707 + <4dd> DW_AT_type : <0x256> + <2><4e1>: Abbrev Number: 21 (DW_TAG_member) + <4e2> DW_AT_name : vbi + <4e6> DW_AT_decl_file : 3 + <4e7> DW_AT_decl_line : 1708 + <4e9> DW_AT_type : <0x2cb> + <2><4ed>: Abbrev Number: 22 (DW_TAG_member) + <4ee> DW_AT_name : (indirect string, offset: 0x1f1): sliced + <4f2> DW_AT_decl_file : 3 + <4f3> DW_AT_decl_line : 1709 + <4f5> DW_AT_type : <0x361> + <2><4f9>: Abbrev Number: 22 (DW_TAG_member) + <4fa> DW_AT_name : (indirect string, offset: 0xf6): raw_data + <4fe> DW_AT_decl_file : 3 + <4ff> DW_AT_decl_line : 1710 + <501> DW_AT_type : <0x506> + <2><505>: Abbrev Number: 0 + <1><506>: Abbrev Number: 17 (DW_TAG_array_type) + <507> DW_AT_type : <0xff> + <50b> DW_AT_sibling : <0x516> + <2><50f>: Abbrev Number: 18 (DW_TAG_subrange_type) + <510> DW_AT_type : <0x63> + <514> DW_AT_upper_bound : 199 + <2><515>: Abbrev Number: 0 + <1><516>: Abbrev Number: 15 (DW_TAG_structure_type) + <517> DW_AT_name : (indirect string, offset: 0x25c): v4l2_format + <51b> DW_AT_byte_size : 204 + <51c> DW_AT_decl_file : 3 + <51d> DW_AT_decl_line : 1702 + <51f> DW_AT_sibling : <0x542> + <2><523>: Abbrev Number: 16 (DW_TAG_member) + <524> DW_AT_name : (indirect string, offset: 0x221): type + <528> DW_AT_decl_file : 3 + <529> DW_AT_decl_line : 1703 + <52b> DW_AT_type : <0x120> + <52f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><532>: Abbrev Number: 19 (DW_TAG_member) + <533> DW_AT_name : fmt + <537> DW_AT_decl_file : 3 + <538> DW_AT_decl_line : 1711 + <53a> DW_AT_type : <0x4b4> + <53e> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><541>: Abbrev Number: 0 + <1><542>: Abbrev Number: 12 (DW_TAG_typedef) + <543> DW_AT_name : (indirect string, offset: 0x2a5): struct_v4l2_format + <547> DW_AT_decl_file : 4 + <548> DW_AT_decl_line : 42 + <549> DW_AT_type : <0x516> + <1><54d>: Abbrev Number: 23 (DW_TAG_variable) + <54e> DW_AT_name : (indirect string, offset: 0x176): current_wordsize + <552> DW_AT_decl_file : 5 + <553> DW_AT_decl_line : 757 + <555> DW_AT_type : <0x47> + <559> DW_AT_external : 1 + <55a> DW_AT_declaration : 1 + <1><55b>: Abbrev Number: 23 (DW_TAG_variable) + <55c> DW_AT_name : (indirect string, offset: 0x34e): sysent + <560> DW_AT_decl_file : 5 + <561> DW_AT_decl_line : 892 + <563> DW_AT_type : <0xed> + <567> DW_AT_external : 1 + <568> DW_AT_declaration : 1 + <1><569>: Abbrev Number: 23 (DW_TAG_variable) + <56a> DW_AT_name : (indirect string, offset: 0x282): nsyscalls + <56e> DW_AT_decl_file : 5 + <56f> DW_AT_decl_line : 903 + <571> DW_AT_type : <0x47> + <575> DW_AT_external : 1 + <576> DW_AT_declaration : 1 + <1><577>: Abbrev Number: 24 (DW_TAG_variable) + <578> DW_AT_name : (indirect string, offset: 0x15e): mpers_target_var + <57c> DW_AT_decl_file : 4 + <57d> DW_AT_decl_line : 47 + <57e> DW_AT_type : <0x542> + <582> DW_AT_external : 1 + <583> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><589>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_v4l2_format.d2 b/mpers-m32/struct_v4l2_format.d2 new file mode 100644 index 000000000..7da0e0e1d --- /dev/null +++ b/mpers-m32/struct_v4l2_format.d2 @@ -0,0 +1,712 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1f8): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x71): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x128): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x1b6): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x292): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x22d): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x20a): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x155): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2fd): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x7b): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x2c6): char +<1><73> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x79> +<1><79> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><7e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x34e): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd1> +<2><8a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x30f): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><98> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbf): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x68): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xdc> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa5): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xdc> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd1> +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x321): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7e> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xe2> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x2d0): _Bool +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2f8): __u8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 20 +DW_AT_type : <0x39> +<1><10a> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2f2): __u16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 23 +DW_AT_type : <0x40> +<1><115> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x315): __s32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 25 +DW_AT_type : <0x2b> +<1><120> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xff): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><12b> +Abbrev Number: 13 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x32f): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x14b> +<2><138> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x268): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><13e> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x245): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><144> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0xd9): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><14b> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc): v4l2_rect +DW_AT_byte_size : 16 +DW_AT_decl_file : 3 +DW_AT_decl_line : 205 +DW_AT_sibling : <0x190> +<2><157> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2cb): left +DW_AT_decl_file : 3 +DW_AT_decl_line : 206 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><165> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : top +DW_AT_decl_file : 3 +DW_AT_decl_line : 207 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><173> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x122): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 208 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><181> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x226): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 209 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><190> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x2e2): v4l2_pix_format +DW_AT_byte_size : 32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 274 +DW_AT_sibling : <0x216> +<2><19d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x122): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 275 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1ac> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x226): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 276 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1bb> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x84): pixelformat +DW_AT_decl_file : 3 +DW_AT_decl_line : 277 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1ca> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf0): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 278 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><1d9> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x90): bytesperline +DW_AT_decl_file : 3 +DW_AT_decl_line : 279 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><1e8> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5e): sizeimage +DW_AT_decl_file : 3 +DW_AT_decl_line : 280 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><1f7> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x187): colorspace +DW_AT_decl_file : 3 +DW_AT_decl_line : 281 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><206> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): priv +DW_AT_decl_file : 3 +DW_AT_decl_line : 282 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<1><216> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x120> +DW_AT_sibling : <0x226> +<2><21f> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><226> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x355): v4l2_clip +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 745 +DW_AT_sibling : <0x250> +<2><233> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : c +DW_AT_decl_file : 3 +DW_AT_decl_line : 746 +DW_AT_type : <0x14b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><240> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x382): next +DW_AT_decl_file : 3 +DW_AT_decl_line : 747 +DW_AT_type : <0x250> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><250> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x226> +<1><256> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x116): v4l2_window +DW_AT_byte_size : 40 +DW_AT_decl_file : 3 +DW_AT_decl_line : 750 +DW_AT_sibling : <0x2cb> +<2><263> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : w +DW_AT_decl_file : 3 +DW_AT_decl_line : 751 +DW_AT_type : <0x14b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><270> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf0): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 752 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><27f> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x369): chromakey +DW_AT_decl_file : 3 +DW_AT_decl_line : 753 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><28e> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x37c): clips +DW_AT_decl_file : 3 +DW_AT_decl_line : 754 +DW_AT_type : <0x250> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><29d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10c): clipcount +DW_AT_decl_file : 3 +DW_AT_decl_line : 755 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><2ac> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x105): bitmap +DW_AT_decl_file : 3 +DW_AT_decl_line : 756 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><2bb> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x192): global_alpha +DW_AT_decl_file : 3 +DW_AT_decl_line : 757 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<1><2cb> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc9): v4l2_vbi_format +DW_AT_byte_size : 44 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1541 +DW_AT_sibling : <0x351> +<2><2d8> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2b8): sampling_rate +DW_AT_decl_file : 3 +DW_AT_decl_line : 1542 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><2e7> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16f): offset +DW_AT_decl_file : 3 +DW_AT_decl_line : 1543 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><2f6> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xae): samples_per_line +DW_AT_decl_file : 3 +DW_AT_decl_line : 1544 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><305> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x387): sample_format +DW_AT_decl_file : 3 +DW_AT_decl_line : 1545 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><314> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x28c): start +DW_AT_decl_file : 3 +DW_AT_decl_line : 1546 +DW_AT_type : <0x351> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><323> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x31b): count +DW_AT_decl_file : 3 +DW_AT_decl_line : 1547 +DW_AT_type : <0x216> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><332> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x204): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 1548 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><341> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x373): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1549 +DW_AT_type : <0x216> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<1><351> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x115> +DW_AT_sibling : <0x361> +<2><35a> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><361> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1da): v4l2_sliced_vbi_format +DW_AT_byte_size : 112 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1563 +DW_AT_sibling : <0x3ab> +<2><36e> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d6): service_set +DW_AT_decl_file : 3 +DW_AT_decl_line : 1564 +DW_AT_type : <0x10a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><37d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x340): service_lines +DW_AT_decl_file : 3 +DW_AT_decl_line : 1569 +DW_AT_type : <0x3ab> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><38c> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9d): io_size +DW_AT_decl_file : 3 +DW_AT_decl_line : 1570 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 64 (DW_OP_plus_uconst: 100) +<2><39b> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x373): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1571 +DW_AT_type : <0x216> +DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) +<1><3ab> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x10a> +DW_AT_sibling : <0x3c1> +<2><3b4> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<2><3ba> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 23 +<1><3c1> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1c4): v4l2_plane_pix_format +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1664 +DW_AT_sibling : <0x3fc> +<2><3ce> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5e): sizeimage +DW_AT_decl_file : 3 +DW_AT_decl_line : 1665 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><3dd> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x90): bytesperline +DW_AT_decl_file : 3 +DW_AT_decl_line : 1666 +DW_AT_type : <0x10a> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><3ec> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x373): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1667 +DW_AT_type : <0x3fc> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<1><3fc> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x10a> +DW_AT_sibling : <0x40c> +<2><405> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 6 +<1><40c> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x19f): v4l2_pix_format_mplane +DW_AT_byte_size : 192 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1680 +DW_AT_sibling : <0x494> +<2><419> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x122): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 1681 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><428> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x226): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 1682 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><437> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x84): pixelformat +DW_AT_decl_file : 3 +DW_AT_decl_line : 1683 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><446> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf0): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 1684 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><455> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x187): colorspace +DW_AT_decl_file : 3 +DW_AT_decl_line : 1685 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><464> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x35f): plane_fmt +DW_AT_decl_file : 3 +DW_AT_decl_line : 1687 +DW_AT_type : <0x494> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><473> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23a): num_planes +DW_AT_decl_file : 3 +DW_AT_decl_line : 1688 +DW_AT_type : <0xff> +DW_AT_data_member_location: 3 byte block: 23 b4 1 (DW_OP_plus_uconst: 180) +<2><483> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x373): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1689 +DW_AT_type : <0x4a4> +DW_AT_data_member_location: 3 byte block: 23 b5 1 (DW_OP_plus_uconst: 181) +<1><494> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x3c1> +DW_AT_sibling : <0x4a4> +<2><49d> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 7 +<1><4a4> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0xff> +DW_AT_sibling : <0x4b4> +<2><4ad> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 10 +<1><4b4> +Abbrev Number: 20 (DW_TAG_union_type) +DW_AT_byte_size : 200 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1704 +DW_AT_sibling : <0x506> +<2><4bd> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : pix +DW_AT_decl_file : 3 +DW_AT_decl_line : 1705 +DW_AT_type : <0x190> +<2><4c9> +Abbrev Number: 22 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5): pix_mp +DW_AT_decl_file : 3 +DW_AT_decl_line : 1706 +DW_AT_type : <0x40c> +<2><4d5> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : win +DW_AT_decl_file : 3 +DW_AT_decl_line : 1707 +DW_AT_type : <0x256> +<2><4e1> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : vbi +DW_AT_decl_file : 3 +DW_AT_decl_line : 1708 +DW_AT_type : <0x2cb> +<2><4ed> +Abbrev Number: 22 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f1): sliced +DW_AT_decl_file : 3 +DW_AT_decl_line : 1709 +DW_AT_type : <0x361> +<2><4f9> +Abbrev Number: 22 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf6): raw_data +DW_AT_decl_file : 3 +DW_AT_decl_line : 1710 +DW_AT_type : <0x506> +<1><506> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0xff> +DW_AT_sibling : <0x516> +<2><50f> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 199 +<1><516> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x25c): v4l2_format +DW_AT_byte_size : 204 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1702 +DW_AT_sibling : <0x542> +<2><523> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x221): type +DW_AT_decl_file : 3 +DW_AT_decl_line : 1703 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><532> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : fmt +DW_AT_decl_file : 3 +DW_AT_decl_line : 1711 +DW_AT_type : <0x4b4> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><542> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2a5): struct_v4l2_format +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_type : <0x516> +<1><54d> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x176): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><55b> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x34e): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xed> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><569> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x282): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><577> +Abbrev Number: 24 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x15e): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x542> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_v4l2_format.h b/mpers-m32/struct_v4l2_format.h new file mode 100644 index 000000000..303e6262a --- /dev/null +++ b/mpers-m32/struct_v4l2_format.h @@ -0,0 +1,66 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t type; +union { +struct { +uint32_t width; +uint32_t height; +uint32_t pixelformat; +uint32_t field; +uint32_t bytesperline; +uint32_t sizeimage; +uint32_t colorspace; +uint32_t priv; +} ATTRIBUTE_PACKED pix; +struct { +uint32_t width; +uint32_t height; +uint32_t pixelformat; +uint32_t field; +uint32_t colorspace; +struct { +uint32_t sizeimage; +uint16_t bytesperline; +uint16_t reserved[7]; +} ATTRIBUTE_PACKED plane_fmt[8]; +unsigned char num_planes; +unsigned char reserved[11]; +} ATTRIBUTE_PACKED pix_mp; +struct { +struct { +int32_t left; +int32_t top; +int32_t width; +int32_t height; +} ATTRIBUTE_PACKED w; +uint32_t field; +uint32_t chromakey; +mpers_ptr_t clips; +uint32_t clipcount; +mpers_ptr_t bitmap; +unsigned char global_alpha; +unsigned char mpers_end_filler_1[3]; +} ATTRIBUTE_PACKED win; +struct { +uint32_t sampling_rate; +uint32_t offset; +uint32_t samples_per_line; +uint32_t sample_format; +int32_t start[2]; +uint32_t count[2]; +uint32_t flags; +uint32_t reserved[2]; +} ATTRIBUTE_PACKED vbi; +struct { +uint16_t service_set; +uint16_t service_lines[24]; +unsigned char mpers_filler_2[50]; +uint32_t io_size; +uint32_t reserved[2]; +} ATTRIBUTE_PACKED sliced; +unsigned char raw_data[200]; +} fmt; +} ATTRIBUTE_PACKED m32_struct_v4l2_format; +#define MPERS_m32_struct_v4l2_format m32_struct_v4l2_format diff --git a/mpers-m32/struct_v4l2_framebuffer.c b/mpers-m32/struct_v4l2_framebuffer.c new file mode 100644 index 000000000..c6f7e3eca --- /dev/null +++ b/mpers-m32/struct_v4l2_framebuffer.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_framebuffer mpers_target_var; diff --git a/mpers-m32/struct_v4l2_framebuffer.d1 b/mpers-m32/struct_v4l2_framebuffer.d1 new file mode 100644 index 000000000..c1fd329b1 --- /dev/null +++ b/mpers-m32/struct_v4l2_framebuffer.d1 @@ -0,0 +1,269 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x23e (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x11d): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x229): mpers-m32/struct_v4l2_framebuffer.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1c3): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x277): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x25e): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x21b): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xbf): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x5e): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x17b): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xa8): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x26e): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xcd): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x212): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x1b3): char + <1><73>: Abbrev Number: 5 (DW_TAG_pointer_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_type : <0x79> + <1><79>: Abbrev Number: 6 (DW_TAG_const_type) + <7a> DW_AT_type : <0x6c> + <1><7e>: Abbrev Number: 7 (DW_TAG_structure_type) + <7f> DW_AT_name : (indirect string, offset: 0xdf): sysent + <83> DW_AT_byte_size : 20 + <84> DW_AT_decl_file : 1 + <85> DW_AT_decl_line : 4 + <86> DW_AT_sibling : <0xd1> + <2><8a>: Abbrev Number: 8 (DW_TAG_member) + <8b> DW_AT_name : (indirect string, offset: 0x117): nargs + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 5 + <91> DW_AT_type : <0x47> + <95> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><98>: Abbrev Number: 8 (DW_TAG_member) + <99> DW_AT_name : (indirect string, offset: 0x208): sys_flags + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 6 + <9f> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x283): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xdc> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x77): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x73> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xdc> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) +
DW_AT_byte_size : 4 + DW_AT_type : <0xd1> + <1>: Abbrev Number: 12 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x18e): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7e> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf3> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xe2> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x71): _Bool + <1>: Abbrev Number: 12 (DW_TAG_typedef) + <100> DW_AT_name : (indirect string, offset: 0x48): __u32 + <104> DW_AT_decl_file : 2 + <105> DW_AT_decl_line : 26 + <106> DW_AT_type : <0x47> + <1><10a>: Abbrev Number: 13 (DW_TAG_enumeration_type) + <10b> DW_AT_name : (indirect string, offset: 0x165): v4l2_preemphasis + <10f> DW_AT_byte_size : 4 + <110> DW_AT_decl_file : 6 + <111> DW_AT_decl_line : 763 + <113> DW_AT_sibling : <0x12a> + <2><117>: Abbrev Number: 14 (DW_TAG_enumerator) + <118> DW_AT_name : (indirect string, offset: 0x18): V4L2_PREEMPHASIS_DISABLED + <11c> DW_AT_const_value : 0 + <2><11d>: Abbrev Number: 14 (DW_TAG_enumerator) + <11e> DW_AT_name : (indirect string, offset: 0x91): V4L2_PREEMPHASIS_50_uS + <122> DW_AT_const_value : 1 + <2><123>: Abbrev Number: 14 (DW_TAG_enumerator) + <124> DW_AT_name : (indirect string, offset: 0x19c): V4L2_PREEMPHASIS_75_uS + <128> DW_AT_const_value : 2 + <2><129>: Abbrev Number: 0 + <1><12a>: Abbrev Number: 15 (DW_TAG_structure_type) + <12b> DW_AT_name : (indirect string, offset: 0x4e): v4l2_pix_format + <12f> DW_AT_byte_size : 32 + <130> DW_AT_decl_file : 3 + <131> DW_AT_decl_line : 274 + <133> DW_AT_sibling : <0x1b0> + <2><137>: Abbrev Number: 16 (DW_TAG_member) + <138> DW_AT_name : (indirect string, offset: 0x258): width + <13c> DW_AT_decl_file : 3 + <13d> DW_AT_decl_line : 275 + <13f> DW_AT_type : <0xff> + <143> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><146>: Abbrev Number: 16 (DW_TAG_member) + <147> DW_AT_name : (indirect string, offset: 0xe6): height + <14b> DW_AT_decl_file : 3 + <14c> DW_AT_decl_line : 276 + <14e> DW_AT_type : <0xff> + <152> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><155>: Abbrev Number: 16 (DW_TAG_member) + <156> DW_AT_name : (indirect string, offset: 0xfe): pixelformat + <15a> DW_AT_decl_file : 3 + <15b> DW_AT_decl_line : 277 + <15d> DW_AT_type : <0xff> + <161> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><164>: Abbrev Number: 16 (DW_TAG_member) + <165> DW_AT_name : (indirect string, offset: 0x268): field + <169> DW_AT_decl_file : 3 + <16a> DW_AT_decl_line : 278 + <16c> DW_AT_type : <0xff> + <170> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><173>: Abbrev Number: 16 (DW_TAG_member) + <174> DW_AT_name : (indirect string, offset: 0x10a): bytesperline + <178> DW_AT_decl_file : 3 + <179> DW_AT_decl_line : 279 + <17b> DW_AT_type : <0xff> + <17f> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><182>: Abbrev Number: 16 (DW_TAG_member) + <183> DW_AT_name : (indirect string, offset: 0x1fe): sizeimage + <187> DW_AT_decl_file : 3 + <188> DW_AT_decl_line : 280 + <18a> DW_AT_type : <0xff> + <18e> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><191>: Abbrev Number: 16 (DW_TAG_member) + <192> DW_AT_name : (indirect string, offset: 0x1b8): colorspace + <196> DW_AT_decl_file : 3 + <197> DW_AT_decl_line : 281 + <199> DW_AT_type : <0xff> + <19d> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1a0>: Abbrev Number: 16 (DW_TAG_member) + <1a1> DW_AT_name : (indirect string, offset: 0x43): priv + <1a5> DW_AT_decl_file : 3 + <1a6> DW_AT_decl_line : 282 + <1a8> DW_AT_type : <0xff> + <1ac> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><1af>: Abbrev Number: 0 + <1><1b0>: Abbrev Number: 15 (DW_TAG_structure_type) + <1b1> DW_AT_name : (indirect string, offset: 0x32): v4l2_framebuffer + <1b5> DW_AT_byte_size : 44 + <1b6> DW_AT_decl_file : 3 + <1b7> DW_AT_decl_line : 719 + <1b9> DW_AT_sibling : <0x1fa> + <2><1bd>: Abbrev Number: 16 (DW_TAG_member) + <1be> DW_AT_name : (indirect string, offset: 0x24d): capability + <1c2> DW_AT_decl_file : 3 + <1c3> DW_AT_decl_line : 720 + <1c5> DW_AT_type : <0xff> + <1c9> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1cc>: Abbrev Number: 16 (DW_TAG_member) + <1cd> DW_AT_name : (indirect string, offset: 0x188): flags + <1d1> DW_AT_decl_file : 3 + <1d2> DW_AT_decl_line : 721 + <1d4> DW_AT_type : <0xff> + <1d8> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1db>: Abbrev Number: 16 (DW_TAG_member) + <1dc> DW_AT_name : (indirect string, offset: 0x176): base + <1e0> DW_AT_decl_file : 3 + <1e1> DW_AT_decl_line : 724 + <1e3> DW_AT_type : <0x6a> + <1e7> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1ea>: Abbrev Number: 17 (DW_TAG_member) + <1eb> DW_AT_name : fmt + <1ef> DW_AT_decl_file : 3 + <1f0> DW_AT_decl_line : 725 + <1f2> DW_AT_type : <0x12a> + <1f6> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1f9>: Abbrev Number: 0 + <1><1fa>: Abbrev Number: 12 (DW_TAG_typedef) + <1fb> DW_AT_name : (indirect string, offset: 0x0): struct_v4l2_framebuffer + <1ff> DW_AT_decl_file : 4 + <200> DW_AT_decl_line : 43 + <201> DW_AT_type : <0x1b0> + <1><205>: Abbrev Number: 18 (DW_TAG_variable) + <206> DW_AT_name : (indirect string, offset: 0xed): current_wordsize + <20a> DW_AT_decl_file : 5 + <20b> DW_AT_decl_line : 757 + <20d> DW_AT_type : <0x47> + <211> DW_AT_external : 1 + <212> DW_AT_declaration : 1 + <1><213>: Abbrev Number: 18 (DW_TAG_variable) + <214> DW_AT_name : (indirect string, offset: 0xdf): sysent + <218> DW_AT_decl_file : 5 + <219> DW_AT_decl_line : 892 + <21b> DW_AT_type : <0xed> + <21f> DW_AT_external : 1 + <220> DW_AT_declaration : 1 + <1><221>: Abbrev Number: 18 (DW_TAG_variable) + <222> DW_AT_name : (indirect string, offset: 0x1f4): nsyscalls + <226> DW_AT_decl_file : 5 + <227> DW_AT_decl_line : 903 + <229> DW_AT_type : <0x47> + <22d> DW_AT_external : 1 + <22e> DW_AT_declaration : 1 + <1><22f>: Abbrev Number: 19 (DW_TAG_variable) + <230> DW_AT_name : (indirect string, offset: 0x80): mpers_target_var + <234> DW_AT_decl_file : 4 + <235> DW_AT_decl_line : 47 + <236> DW_AT_type : <0x1fa> + <23a> DW_AT_external : 1 + <23b> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><241>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_v4l2_framebuffer.d2 b/mpers-m32/struct_v4l2_framebuffer.d2 new file mode 100644 index 000000000..905a179ff --- /dev/null +++ b/mpers-m32/struct_v4l2_framebuffer.d2 @@ -0,0 +1,301 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x277): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x25e): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x21b): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xbf): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x5e): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x17b): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xa8): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x26e): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xcd): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x212): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1b3): char +<1><73> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x79> +<1><79> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><7e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xdf): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd1> +<2><8a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x117): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><98> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x208): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x283): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xdc> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x77): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xdc> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd1> +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x18e): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7e> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xe2> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x71): _Bool +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x48): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><10a> +Abbrev Number: 13 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x165): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x12a> +<2><117> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x18): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><11d> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x91): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><123> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x19c): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><12a> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x4e): v4l2_pix_format +DW_AT_byte_size : 32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 274 +DW_AT_sibling : <0x1b0> +<2><137> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x258): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 275 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><146> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe6): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 276 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><155> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xfe): pixelformat +DW_AT_decl_file : 3 +DW_AT_decl_line : 277 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><164> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x268): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 278 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><173> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10a): bytesperline +DW_AT_decl_file : 3 +DW_AT_decl_line : 279 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><182> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fe): sizeimage +DW_AT_decl_file : 3 +DW_AT_decl_line : 280 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><191> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b8): colorspace +DW_AT_decl_file : 3 +DW_AT_decl_line : 281 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1a0> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x43): priv +DW_AT_decl_file : 3 +DW_AT_decl_line : 282 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<1><1b0> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x32): v4l2_framebuffer +DW_AT_byte_size : 44 +DW_AT_decl_file : 3 +DW_AT_decl_line : 719 +DW_AT_sibling : <0x1fa> +<2><1bd> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x24d): capability +DW_AT_decl_file : 3 +DW_AT_decl_line : 720 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1cc> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x188): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 721 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1db> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x176): base +DW_AT_decl_file : 3 +DW_AT_decl_line : 724 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1ea> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : fmt +DW_AT_decl_file : 3 +DW_AT_decl_line : 725 +DW_AT_type : <0x12a> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1fa> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): struct_v4l2_framebuffer +DW_AT_decl_file : 4 +DW_AT_decl_line : 43 +DW_AT_type : <0x1b0> +<1><205> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xed): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><213> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xdf): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xed> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><221> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1f4): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><22f> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x80): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x1fa> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_v4l2_framebuffer.h b/mpers-m32/struct_v4l2_framebuffer.h new file mode 100644 index 000000000..3fae478c6 --- /dev/null +++ b/mpers-m32/struct_v4l2_framebuffer.h @@ -0,0 +1,19 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t capability; +uint32_t flags; +mpers_ptr_t base; +struct { +uint32_t width; +uint32_t height; +uint32_t pixelformat; +uint32_t field; +uint32_t bytesperline; +uint32_t sizeimage; +uint32_t colorspace; +uint32_t priv; +} ATTRIBUTE_PACKED fmt; +} ATTRIBUTE_PACKED m32_struct_v4l2_framebuffer; +#define MPERS_m32_struct_v4l2_framebuffer m32_struct_v4l2_framebuffer diff --git a/mpers-m32/struct_v4l2_input.c b/mpers-m32/struct_v4l2_input.c new file mode 100644 index 000000000..fe0ffcdcc --- /dev/null +++ b/mpers-m32/struct_v4l2_input.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_input mpers_target_var; diff --git a/mpers-m32/struct_v4l2_input.d1 b/mpers-m32/struct_v4l2_input.d1 new file mode 100644 index 000000000..e276cb1ee --- /dev/null +++ b/mpers-m32/struct_v4l2_input.d1 @@ -0,0 +1,271 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x243 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x108): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x41): mpers-m32/struct_v4l2_input.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x198): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x230): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x205): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1e2): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xa7): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x23c): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x161): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x90): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x227): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xb5): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1d9): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x193): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xc7): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x102): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x86): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x24f): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x66): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x185): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x2c): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1f0): __u8 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 20 + <104> DW_AT_type : <0x39> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x32): __u32 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 26 + <10f> DW_AT_type : <0x47> + <1><113>: Abbrev Number: 11 (DW_TAG_typedef) + <114> DW_AT_name : (indirect string, offset: 0x1d3): __u64 + <118> DW_AT_decl_file : 2 + <119> DW_AT_decl_line : 30 + <11a> DW_AT_type : <0x4e> + <1><11e>: Abbrev Number: 12 (DW_TAG_enumeration_type) + <11f> DW_AT_name : (indirect string, offset: 0x150): v4l2_preemphasis + <123> DW_AT_byte_size : 4 + <124> DW_AT_decl_file : 6 + <125> DW_AT_decl_line : 763 + <127> DW_AT_sibling : <0x13e> + <2><12b>: Abbrev Number: 13 (DW_TAG_enumerator) + <12c> DW_AT_name : (indirect string, offset: 0x12): V4L2_PREEMPHASIS_DISABLED + <130> DW_AT_const_value : 0 + <2><131>: Abbrev Number: 13 (DW_TAG_enumerator) + <132> DW_AT_name : (indirect string, offset: 0x16e): V4L2_PREEMPHASIS_50_uS + <136> DW_AT_const_value : 1 + <2><137>: Abbrev Number: 13 (DW_TAG_enumerator) + <138> DW_AT_name : (indirect string, offset: 0xdf): V4L2_PREEMPHASIS_75_uS + <13c> DW_AT_const_value : 2 + <2><13d>: Abbrev Number: 0 + <1><13e>: Abbrev Number: 14 (DW_TAG_array_type) + <13f> DW_AT_type : <0xfd> + <143> DW_AT_sibling : <0x14e> + <2><147>: Abbrev Number: 15 (DW_TAG_subrange_type) + <148> DW_AT_type : <0x63> + <14c> DW_AT_upper_bound : 31 + <2><14d>: Abbrev Number: 0 + <1><14e>: Abbrev Number: 14 (DW_TAG_array_type) + <14f> DW_AT_type : <0x108> + <153> DW_AT_sibling : <0x15e> + <2><157>: Abbrev Number: 15 (DW_TAG_subrange_type) + <158> DW_AT_type : <0x63> + <15c> DW_AT_upper_bound : 2 + <2><15d>: Abbrev Number: 0 + <1><15e>: Abbrev Number: 16 (DW_TAG_typedef) + <15f> DW_AT_name : (indirect string, offset: 0xf6): v4l2_std_id + <163> DW_AT_decl_file : 3 + <164> DW_AT_decl_line : 826 + <166> DW_AT_type : <0x113> + <1><16a>: Abbrev Number: 17 (DW_TAG_structure_type) + <16b> DW_AT_name : (indirect string, offset: 0x20f): v4l2_input + <16f> DW_AT_byte_size : 76 + <170> DW_AT_decl_file : 3 + <171> DW_AT_decl_line : 1145 + <173> DW_AT_sibling : <0x1ff> + <2><177>: Abbrev Number: 18 (DW_TAG_member) + <178> DW_AT_name : (indirect string, offset: 0x1fa): index + <17c> DW_AT_decl_file : 3 + <17d> DW_AT_decl_line : 1146 + <17f> DW_AT_type : <0x108> + <183> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><186>: Abbrev Number: 18 (DW_TAG_member) + <187> DW_AT_name : (indirect string, offset: 0x1f5): name + <18b> DW_AT_decl_file : 3 + <18c> DW_AT_decl_line : 1147 + <18e> DW_AT_type : <0x13e> + <192> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><195>: Abbrev Number: 18 (DW_TAG_member) + <196> DW_AT_name : (indirect string, offset: 0x200): type + <19a> DW_AT_decl_file : 3 + <19b> DW_AT_decl_line : 1148 + <19d> DW_AT_type : <0x108> + <1a1> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><1a4>: Abbrev Number: 18 (DW_TAG_member) + <1a5> DW_AT_name : (indirect string, offset: 0x258): audioset + <1a9> DW_AT_decl_file : 3 + <1aa> DW_AT_decl_line : 1149 + <1ac> DW_AT_type : <0x108> + <1b0> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1b3>: Abbrev Number: 18 (DW_TAG_member) + <1b4> DW_AT_name : (indirect string, offset: 0x6f): tuner + <1b8> DW_AT_decl_file : 3 + <1b9> DW_AT_decl_line : 1150 + <1bb> DW_AT_type : <0x108> + <1bf> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><1c2>: Abbrev Number: 19 (DW_TAG_member) + <1c3> DW_AT_name : std + <1c7> DW_AT_decl_file : 3 + <1c8> DW_AT_decl_line : 1151 + <1ca> DW_AT_type : <0x15e> + <1ce> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><1d1>: Abbrev Number: 18 (DW_TAG_member) + <1d2> DW_AT_name : (indirect string, offset: 0x5f): status + <1d6> DW_AT_decl_file : 3 + <1d7> DW_AT_decl_line : 1152 + <1d9> DW_AT_type : <0x108> + <1dd> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><1e0>: Abbrev Number: 18 (DW_TAG_member) + <1e1> DW_AT_name : (indirect string, offset: 0x21a): capabilities + <1e5> DW_AT_decl_file : 3 + <1e6> DW_AT_decl_line : 1153 + <1e8> DW_AT_type : <0x108> + <1ec> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><1ef>: Abbrev Number: 18 (DW_TAG_member) + <1f0> DW_AT_name : (indirect string, offset: 0x38): reserved + <1f4> DW_AT_decl_file : 3 + <1f5> DW_AT_decl_line : 1154 + <1f7> DW_AT_type : <0x14e> + <1fb> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><1fe>: Abbrev Number: 0 + <1><1ff>: Abbrev Number: 11 (DW_TAG_typedef) + <200> DW_AT_name : (indirect string, offset: 0x0): struct_v4l2_input + <204> DW_AT_decl_file : 4 + <205> DW_AT_decl_line : 44 + <206> DW_AT_type : <0x16a> + <1><20a>: Abbrev Number: 20 (DW_TAG_variable) + <20b> DW_AT_name : (indirect string, offset: 0xce): current_wordsize + <20f> DW_AT_decl_file : 5 + <210> DW_AT_decl_line : 757 + <212> DW_AT_type : <0x47> + <216> DW_AT_external : 1 + <217> DW_AT_declaration : 1 + <1><218>: Abbrev Number: 20 (DW_TAG_variable) + <219> DW_AT_name : (indirect string, offset: 0xc7): sysent + <21d> DW_AT_decl_file : 5 + <21e> DW_AT_decl_line : 892 + <220> DW_AT_type : <0xeb> + <224> DW_AT_external : 1 + <225> DW_AT_declaration : 1 + <1><226>: Abbrev Number: 20 (DW_TAG_variable) + <227> DW_AT_name : (indirect string, offset: 0x1c9): nsyscalls + <22b> DW_AT_decl_file : 5 + <22c> DW_AT_decl_line : 903 + <22e> DW_AT_type : <0x47> + <232> DW_AT_external : 1 + <233> DW_AT_declaration : 1 + <1><234>: Abbrev Number: 21 (DW_TAG_variable) + <235> DW_AT_name : (indirect string, offset: 0x75): mpers_target_var + <239> DW_AT_decl_file : 4 + <23a> DW_AT_decl_line : 47 + <23b> DW_AT_type : <0x1ff> + <23f> DW_AT_external : 1 + <240> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><246>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_v4l2_input.d2 b/mpers-m32/struct_v4l2_input.d2 new file mode 100644 index 000000000..b4d121dc1 --- /dev/null +++ b/mpers-m32/struct_v4l2_input.d2 @@ -0,0 +1,304 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x230): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x205): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1e2): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xa7): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x23c): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x161): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x90): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x227): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb5): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1d9): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x193): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc7): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x102): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x86): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x24f): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x66): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x185): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x2c): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1f0): __u8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 20 +DW_AT_type : <0x39> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x32): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><113> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1d3): __u64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><11e> +Abbrev Number: 12 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x150): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x13e> +<2><12b> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x12): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><131> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x16e): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><137> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0xdf): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><13e> +Abbrev Number: 14 (DW_TAG_array_type) +DW_AT_type : <0xfd> +DW_AT_sibling : <0x14e> +<2><147> +Abbrev Number: 15 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 31 +<1><14e> +Abbrev Number: 14 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x15e> +<2><157> +Abbrev Number: 15 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 2 +<1><15e> +Abbrev Number: 16 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xf6): v4l2_std_id +DW_AT_decl_file : 3 +DW_AT_decl_line : 826 +DW_AT_type : <0x113> +<1><16a> +Abbrev Number: 17 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x20f): v4l2_input +DW_AT_byte_size : 76 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1145 +DW_AT_sibling : <0x1ff> +<2><177> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fa): index +DW_AT_decl_file : 3 +DW_AT_decl_line : 1146 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><186> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f5): name +DW_AT_decl_file : 3 +DW_AT_decl_line : 1147 +DW_AT_type : <0x13e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><195> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x200): type +DW_AT_decl_file : 3 +DW_AT_decl_line : 1148 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><1a4> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x258): audioset +DW_AT_decl_file : 3 +DW_AT_decl_line : 1149 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><1b3> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6f): tuner +DW_AT_decl_file : 3 +DW_AT_decl_line : 1150 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><1c2> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : std +DW_AT_decl_file : 3 +DW_AT_decl_line : 1151 +DW_AT_type : <0x15e> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><1d1> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5f): status +DW_AT_decl_file : 3 +DW_AT_decl_line : 1152 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><1e0> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21a): capabilities +DW_AT_decl_file : 3 +DW_AT_decl_line : 1153 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<2><1ef> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x38): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1154 +DW_AT_type : <0x14e> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<1><1ff> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): struct_v4l2_input +DW_AT_decl_file : 4 +DW_AT_decl_line : 44 +DW_AT_type : <0x16a> +<1><20a> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xce): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><218> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc7): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><226> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1c9): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><234> +Abbrev Number: 21 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x75): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x1ff> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_v4l2_input.h b/mpers-m32/struct_v4l2_input.h new file mode 100644 index 000000000..b880ffe52 --- /dev/null +++ b/mpers-m32/struct_v4l2_input.h @@ -0,0 +1,15 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t index; +unsigned char name[32]; +uint32_t type; +uint32_t audioset; +uint32_t tuner; +uint64_t std; +uint32_t status; +uint32_t capabilities; +uint32_t reserved[3]; +} ATTRIBUTE_PACKED m32_struct_v4l2_input; +#define MPERS_m32_struct_v4l2_input m32_struct_v4l2_input diff --git a/mpers-m32/struct_v4l2_standard.c b/mpers-m32/struct_v4l2_standard.c new file mode 100644 index 000000000..3e4dbc41f --- /dev/null +++ b/mpers-m32/struct_v4l2_standard.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_standard mpers_target_var; diff --git a/mpers-m32/struct_v4l2_standard.d1 b/mpers-m32/struct_v4l2_standard.d1 new file mode 100644 index 000000000..7dbc1da56 --- /dev/null +++ b/mpers-m32/struct_v4l2_standard.d1 @@ -0,0 +1,272 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x23e (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x137): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x3d): mpers-m32/struct_v4l2_standard.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1c7): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x24d): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x71): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x21c): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xd6): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x5e): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x190): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xbf): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x244): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xe4): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x213): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x1c2): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xf6): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x131): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0xb5): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x265): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x90): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1b4): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x28): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x22a): __u8 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 20 + <104> DW_AT_type : <0x39> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x2e): __u32 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 26 + <10f> DW_AT_type : <0x47> + <1><113>: Abbrev Number: 11 (DW_TAG_typedef) + <114> DW_AT_name : (indirect string, offset: 0x20d): __u64 + <118> DW_AT_decl_file : 2 + <119> DW_AT_decl_line : 30 + <11a> DW_AT_type : <0x4e> + <1><11e>: Abbrev Number: 12 (DW_TAG_enumeration_type) + <11f> DW_AT_name : (indirect string, offset: 0x17f): v4l2_preemphasis + <123> DW_AT_byte_size : 4 + <124> DW_AT_decl_file : 6 + <125> DW_AT_decl_line : 763 + <127> DW_AT_sibling : <0x13e> + <2><12b>: Abbrev Number: 13 (DW_TAG_enumerator) + <12c> DW_AT_name : (indirect string, offset: 0xe): V4L2_PREEMPHASIS_DISABLED + <130> DW_AT_const_value : 0 + <2><131>: Abbrev Number: 13 (DW_TAG_enumerator) + <132> DW_AT_name : (indirect string, offset: 0x19d): V4L2_PREEMPHASIS_50_uS + <136> DW_AT_const_value : 1 + <2><137>: Abbrev Number: 13 (DW_TAG_enumerator) + <138> DW_AT_name : (indirect string, offset: 0x10e): V4L2_PREEMPHASIS_75_uS + <13c> DW_AT_const_value : 2 + <2><13d>: Abbrev Number: 0 + <1><13e>: Abbrev Number: 6 (DW_TAG_structure_type) + <13f> DW_AT_name : (indirect string, offset: 0x99): v4l2_fract + <143> DW_AT_byte_size : 8 + <144> DW_AT_decl_file : 3 + <145> DW_AT_decl_line : 212 + <146> DW_AT_sibling : <0x167> + <2><14a>: Abbrev Number: 7 (DW_TAG_member) + <14b> DW_AT_name : (indirect string, offset: 0x23a): numerator + <14f> DW_AT_decl_file : 3 + <150> DW_AT_decl_line : 213 + <151> DW_AT_type : <0x108> + <155> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><158>: Abbrev Number: 7 (DW_TAG_member) + <159> DW_AT_name : (indirect string, offset: 0x26e): denominator + <15d> DW_AT_decl_file : 3 + <15e> DW_AT_decl_line : 214 + <15f> DW_AT_type : <0x108> + <163> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><166>: Abbrev Number: 0 + <1><167>: Abbrev Number: 14 (DW_TAG_array_type) + <168> DW_AT_type : <0x108> + <16c> DW_AT_sibling : <0x177> + <2><170>: Abbrev Number: 15 (DW_TAG_subrange_type) + <171> DW_AT_type : <0x63> + <175> DW_AT_upper_bound : 3 + <2><176>: Abbrev Number: 0 + <1><177>: Abbrev Number: 16 (DW_TAG_typedef) + <178> DW_AT_name : (indirect string, offset: 0x125): v4l2_std_id + <17c> DW_AT_decl_file : 3 + <17d> DW_AT_decl_line : 826 + <17f> DW_AT_type : <0x113> + <1><183>: Abbrev Number: 17 (DW_TAG_structure_type) + <184> DW_AT_name : (indirect string, offset: 0x0): v4l2_standard + <188> DW_AT_byte_size : 64 + <189> DW_AT_decl_file : 3 + <18a> DW_AT_decl_line : 954 + <18c> DW_AT_sibling : <0x1ea> + <2><190>: Abbrev Number: 18 (DW_TAG_member) + <191> DW_AT_name : (indirect string, offset: 0x234): index + <195> DW_AT_decl_file : 3 + <196> DW_AT_decl_line : 955 + <198> DW_AT_type : <0x108> + <19c> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><19f>: Abbrev Number: 19 (DW_TAG_member) + <1a0> DW_AT_name : id + <1a3> DW_AT_decl_file : 3 + <1a4> DW_AT_decl_line : 956 + <1a6> DW_AT_type : <0x177> + <1aa> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1ad>: Abbrev Number: 18 (DW_TAG_member) + <1ae> DW_AT_name : (indirect string, offset: 0x22f): name + <1b2> DW_AT_decl_file : 3 + <1b3> DW_AT_decl_line : 957 + <1b5> DW_AT_type : <0x1ea> + <1b9> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1bc>: Abbrev Number: 18 (DW_TAG_member) + <1bd> DW_AT_name : (indirect string, offset: 0x259): frameperiod + <1c1> DW_AT_decl_file : 3 + <1c2> DW_AT_decl_line : 958 + <1c4> DW_AT_type : <0x13e> + <1c8> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><1cb>: Abbrev Number: 18 (DW_TAG_member) + <1cc> DW_AT_name : (indirect string, offset: 0x1f8): framelines + <1d0> DW_AT_decl_file : 3 + <1d1> DW_AT_decl_line : 959 + <1d3> DW_AT_type : <0x108> + <1d7> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><1da>: Abbrev Number: 18 (DW_TAG_member) + <1db> DW_AT_name : (indirect string, offset: 0x34): reserved + <1df> DW_AT_decl_file : 3 + <1e0> DW_AT_decl_line : 960 + <1e2> DW_AT_type : <0x167> + <1e6> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><1e9>: Abbrev Number: 0 + <1><1ea>: Abbrev Number: 14 (DW_TAG_array_type) + <1eb> DW_AT_type : <0xfd> + <1ef> DW_AT_sibling : <0x1fa> + <2><1f3>: Abbrev Number: 15 (DW_TAG_subrange_type) + <1f4> DW_AT_type : <0x63> + <1f8> DW_AT_upper_bound : 23 + <2><1f9>: Abbrev Number: 0 + <1><1fa>: Abbrev Number: 11 (DW_TAG_typedef) + <1fb> DW_AT_name : (indirect string, offset: 0x7b): struct_v4l2_standard + <1ff> DW_AT_decl_file : 4 + <200> DW_AT_decl_line : 45 + <201> DW_AT_type : <0x183> + <1><205>: Abbrev Number: 20 (DW_TAG_variable) + <206> DW_AT_name : (indirect string, offset: 0xfd): current_wordsize + <20a> DW_AT_decl_file : 5 + <20b> DW_AT_decl_line : 757 + <20d> DW_AT_type : <0x47> + <211> DW_AT_external : 1 + <212> DW_AT_declaration : 1 + <1><213>: Abbrev Number: 20 (DW_TAG_variable) + <214> DW_AT_name : (indirect string, offset: 0xf6): sysent + <218> DW_AT_decl_file : 5 + <219> DW_AT_decl_line : 892 + <21b> DW_AT_type : <0xeb> + <21f> DW_AT_external : 1 + <220> DW_AT_declaration : 1 + <1><221>: Abbrev Number: 20 (DW_TAG_variable) + <222> DW_AT_name : (indirect string, offset: 0x203): nsyscalls + <226> DW_AT_decl_file : 5 + <227> DW_AT_decl_line : 903 + <229> DW_AT_type : <0x47> + <22d> DW_AT_external : 1 + <22e> DW_AT_declaration : 1 + <1><22f>: Abbrev Number: 21 (DW_TAG_variable) + <230> DW_AT_name : (indirect string, offset: 0xa4): mpers_target_var + <234> DW_AT_decl_file : 4 + <235> DW_AT_decl_line : 47 + <236> DW_AT_type : <0x1fa> + <23a> DW_AT_external : 1 + <23b> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><241>: Abbrev Number: 0 + diff --git a/mpers-m32/struct_v4l2_standard.d2 b/mpers-m32/struct_v4l2_standard.d2 new file mode 100644 index 000000000..795216995 --- /dev/null +++ b/mpers-m32/struct_v4l2_standard.d2 @@ -0,0 +1,304 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x24d): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x71): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x21c): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xd6): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x5e): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x190): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xbf): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x244): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xe4): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x213): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1c2): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xf6): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x131): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb5): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x265): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x90): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b4): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x28): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x22a): __u8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 20 +DW_AT_type : <0x39> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2e): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><113> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x20d): __u64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><11e> +Abbrev Number: 12 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x17f): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x13e> +<2><12b> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0xe): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><131> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x19d): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><137> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x10e): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><13e> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x99): v4l2_fract +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 212 +DW_AT_sibling : <0x167> +<2><14a> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23a): numerator +DW_AT_decl_file : 3 +DW_AT_decl_line : 213 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><158> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x26e): denominator +DW_AT_decl_file : 3 +DW_AT_decl_line : 214 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><167> +Abbrev Number: 14 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x177> +<2><170> +Abbrev Number: 15 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 3 +<1><177> +Abbrev Number: 16 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x125): v4l2_std_id +DW_AT_decl_file : 3 +DW_AT_decl_line : 826 +DW_AT_type : <0x113> +<1><183> +Abbrev Number: 17 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): v4l2_standard +DW_AT_byte_size : 64 +DW_AT_decl_file : 3 +DW_AT_decl_line : 954 +DW_AT_sibling : <0x1ea> +<2><190> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x234): index +DW_AT_decl_file : 3 +DW_AT_decl_line : 955 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><19f> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : id +DW_AT_decl_file : 3 +DW_AT_decl_line : 956 +DW_AT_type : <0x177> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1ad> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22f): name +DW_AT_decl_file : 3 +DW_AT_decl_line : 957 +DW_AT_type : <0x1ea> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><1bc> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x259): frameperiod +DW_AT_decl_file : 3 +DW_AT_decl_line : 958 +DW_AT_type : <0x13e> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><1cb> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f8): framelines +DW_AT_decl_file : 3 +DW_AT_decl_line : 959 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><1da> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x34): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 960 +DW_AT_type : <0x167> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<1><1ea> +Abbrev Number: 14 (DW_TAG_array_type) +DW_AT_type : <0xfd> +DW_AT_sibling : <0x1fa> +<2><1f3> +Abbrev Number: 15 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 23 +<1><1fa> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x7b): struct_v4l2_standard +DW_AT_decl_file : 4 +DW_AT_decl_line : 45 +DW_AT_type : <0x183> +<1><205> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xfd): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><213> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xf6): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><221> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x203): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><22f> +Abbrev Number: 21 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xa4): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x1fa> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/struct_v4l2_standard.h b/mpers-m32/struct_v4l2_standard.h new file mode 100644 index 000000000..8f91ba9f5 --- /dev/null +++ b/mpers-m32/struct_v4l2_standard.h @@ -0,0 +1,15 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t index; +uint64_t id; +unsigned char name[24]; +struct { +uint32_t numerator; +uint32_t denominator; +} ATTRIBUTE_PACKED frameperiod; +uint32_t framelines; +uint32_t reserved[4]; +} ATTRIBUTE_PACKED m32_struct_v4l2_standard; +#define MPERS_m32_struct_v4l2_standard m32_struct_v4l2_standard diff --git a/mpers-m32/sysinfo_t.c b/mpers-m32/sysinfo_t.c new file mode 100644 index 000000000..6e656cfb2 --- /dev/null +++ b/mpers-m32/sysinfo_t.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993-1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2012 H.J. Lu + * Copyright (c) 2012 Denys Vlasenko + * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2015 Elvira Khabirova + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include +typedef struct sysinfo sysinfo_t; +sysinfo_t mpers_target_var; diff --git a/mpers-m32/sysinfo_t.d1 b/mpers-m32/sysinfo_t.d1 new file mode 100644 index 000000000..a873cdc59 --- /dev/null +++ b/mpers-m32/sysinfo_t.d1 @@ -0,0 +1,285 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x25d (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xf3): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xb8): mpers-m32/sysinfo_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1f6): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1ea): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1cf): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1ae): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x98): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x30): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x13b): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x81): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1e1): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xa6): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x193): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x156): char + <1><71>: Abbrev Number: 4 (DW_TAG_array_type) + <72> DW_AT_type : <0x6a> + <76> DW_AT_sibling : <0x81> + <2><7a>: Abbrev Number: 5 (DW_TAG_subrange_type) + <7b> DW_AT_type : <0x63> + <7f> DW_AT_upper_bound : 7 + <2><80>: Abbrev Number: 0 + <1><81>: Abbrev Number: 6 (DW_TAG_pointer_type) + <82> DW_AT_byte_size : 4 + <83> DW_AT_type : <0x87> + <1><87>: Abbrev Number: 7 (DW_TAG_const_type) + <88> DW_AT_type : <0x6a> + <1><8c>: Abbrev Number: 8 (DW_TAG_typedef) + <8d> DW_AT_name : (indirect string, offset: 0x43): __kernel_long_t + <91> DW_AT_decl_file : 1 + <92> DW_AT_decl_line : 14 + <93> DW_AT_type : <0x55> + <1><97>: Abbrev Number: 8 (DW_TAG_typedef) + <98> DW_AT_name : (indirect string, offset: 0x178): __kernel_ulong_t + <9c> DW_AT_decl_file : 1 + <9d> DW_AT_decl_line : 15 + <9e> DW_AT_type : <0x5c> + <1>: Abbrev Number: 9 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xce): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 2 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xf5> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xed): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x77): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 11 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x227): sys_func +
DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0x100> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x53): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 + DW_AT_type : <0x81> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 12 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0x100> + <2>: Abbrev Number: 13 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1><100>: Abbrev Number: 6 (DW_TAG_pointer_type) + <101> DW_AT_byte_size : 4 + <102> DW_AT_type : <0xf5> + <1><106>: Abbrev Number: 8 (DW_TAG_typedef) + <107> DW_AT_name : (indirect string, offset: 0x148): struct_sysent + <10b> DW_AT_decl_file : 2 + <10c> DW_AT_decl_line : 10 + <10d> DW_AT_type : <0xa2> + <1><111>: Abbrev Number: 6 (DW_TAG_pointer_type) + <112> DW_AT_byte_size : 4 + <113> DW_AT_type : <0x117> + <1><117>: Abbrev Number: 7 (DW_TAG_const_type) + <118> DW_AT_type : <0x106> + <1><11c>: Abbrev Number: 2 (DW_TAG_base_type) + <11d> DW_AT_byte_size : 1 + <11e> DW_AT_encoding : 2 (boolean) + <11f> DW_AT_name : (indirect string, offset: 0xc): _Bool + <1><123>: Abbrev Number: 8 (DW_TAG_typedef) + <124> DW_AT_name : (indirect string, offset: 0x6): __u16 + <128> DW_AT_decl_file : 3 + <129> DW_AT_decl_line : 23 + <12a> DW_AT_type : <0x40> + <1><12e>: Abbrev Number: 8 (DW_TAG_typedef) + <12f> DW_AT_name : (indirect string, offset: 0x12): __u32 + <133> DW_AT_decl_file : 3 + <134> DW_AT_decl_line : 26 + <135> DW_AT_type : <0x47> + <1><139>: Abbrev Number: 9 (DW_TAG_structure_type) + <13a> DW_AT_name : (indirect string, offset: 0x19c): sysinfo + <13e> DW_AT_byte_size : 64 + <13f> DW_AT_decl_file : 4 + <140> DW_AT_decl_line : 7 + <141> DW_AT_sibling : <0x209> + <2><145>: Abbrev Number: 10 (DW_TAG_member) + <146> DW_AT_name : (indirect string, offset: 0xe6): uptime + <14a> DW_AT_decl_file : 4 + <14b> DW_AT_decl_line : 8 + <14c> DW_AT_type : <0x8c> + <150> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><153>: Abbrev Number: 10 (DW_TAG_member) + <154> DW_AT_name : (indirect string, offset: 0x18): loads + <158> DW_AT_decl_file : 4 + <159> DW_AT_decl_line : 9 + <15a> DW_AT_type : <0x209> + <15e> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><161>: Abbrev Number: 10 (DW_TAG_member) + <162> DW_AT_name : (indirect string, offset: 0x27): totalram + <166> DW_AT_decl_file : 4 + <167> DW_AT_decl_line : 10 + <168> DW_AT_type : <0x97> + <16c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><16f>: Abbrev Number: 10 (DW_TAG_member) + <170> DW_AT_name : (indirect string, offset: 0x1d9): freeram + <174> DW_AT_decl_file : 4 + <175> DW_AT_decl_line : 11 + <176> DW_AT_type : <0x97> + <17a> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><17d>: Abbrev Number: 10 (DW_TAG_member) + <17e> DW_AT_name : (indirect string, offset: 0x15b): sharedram + <182> DW_AT_decl_file : 4 + <183> DW_AT_decl_line : 12 + <184> DW_AT_type : <0x97> + <188> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><18b>: Abbrev Number: 10 (DW_TAG_member) + <18c> DW_AT_name : (indirect string, offset: 0x5c): bufferram + <190> DW_AT_decl_file : 4 + <191> DW_AT_decl_line : 13 + <192> DW_AT_type : <0x97> + <196> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><199>: Abbrev Number: 10 (DW_TAG_member) + <19a> DW_AT_name : (indirect string, offset: 0x1a4): totalswap + <19e> DW_AT_decl_file : 4 + <19f> DW_AT_decl_line : 14 + <1a0> DW_AT_type : <0x97> + <1a4> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1a7>: Abbrev Number: 10 (DW_TAG_member) + <1a8> DW_AT_name : (indirect string, offset: 0x16f): freeswap + <1ac> DW_AT_decl_file : 4 + <1ad> DW_AT_decl_line : 15 + <1ae> DW_AT_type : <0x97> + <1b2> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><1b5>: Abbrev Number: 10 (DW_TAG_member) + <1b6> DW_AT_name : (indirect string, offset: 0x0): procs + <1ba> DW_AT_decl_file : 4 + <1bb> DW_AT_decl_line : 16 + <1bc> DW_AT_type : <0x123> + <1c0> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1c3>: Abbrev Number: 11 (DW_TAG_member) + <1c4> DW_AT_name : pad + <1c8> DW_AT_decl_file : 4 + <1c9> DW_AT_decl_line : 17 + <1ca> DW_AT_type : <0x123> + <1ce> DW_AT_data_member_location: 2 byte block: 23 2a (DW_OP_plus_uconst: 42) + <2><1d1>: Abbrev Number: 10 (DW_TAG_member) + <1d2> DW_AT_name : (indirect string, offset: 0x165): totalhigh + <1d6> DW_AT_decl_file : 4 + <1d7> DW_AT_decl_line : 18 + <1d8> DW_AT_type : <0x97> + <1dc> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><1df>: Abbrev Number: 10 (DW_TAG_member) + <1e0> DW_AT_name : (indirect string, offset: 0x1e): freehigh + <1e4> DW_AT_decl_file : 4 + <1e5> DW_AT_decl_line : 19 + <1e6> DW_AT_type : <0x97> + <1ea> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><1ed>: Abbrev Number: 10 (DW_TAG_member) + <1ee> DW_AT_name : (indirect string, offset: 0x1bc): mem_unit + <1f2> DW_AT_decl_file : 4 + <1f3> DW_AT_decl_line : 20 + <1f4> DW_AT_type : <0x12e> + <1f8> DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2><1fb>: Abbrev Number: 11 (DW_TAG_member) + <1fc> DW_AT_name : _f + <1ff> DW_AT_decl_file : 4 + <200> DW_AT_decl_line : 21 + <201> DW_AT_type : <0x71> + <205> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><208>: Abbrev Number: 0 + <1><209>: Abbrev Number: 4 (DW_TAG_array_type) + <20a> DW_AT_type : <0x97> + <20e> DW_AT_sibling : <0x219> + <2><212>: Abbrev Number: 5 (DW_TAG_subrange_type) + <213> DW_AT_type : <0x63> + <217> DW_AT_upper_bound : 2 + <2><218>: Abbrev Number: 0 + <1><219>: Abbrev Number: 8 (DW_TAG_typedef) + <21a> DW_AT_name : (indirect string, offset: 0x1c5): sysinfo_t + <21e> DW_AT_decl_file : 5 + <21f> DW_AT_decl_line : 37 + <220> DW_AT_type : <0x139> + <1><224>: Abbrev Number: 14 (DW_TAG_variable) + <225> DW_AT_name : (indirect string, offset: 0xd5): current_wordsize + <229> DW_AT_decl_file : 6 + <22a> DW_AT_decl_line : 757 + <22c> DW_AT_type : <0x47> + <230> DW_AT_external : 1 + <231> DW_AT_declaration : 1 + <1><232>: Abbrev Number: 14 (DW_TAG_variable) + <233> DW_AT_name : (indirect string, offset: 0xce): sysent + <237> DW_AT_decl_file : 6 + <238> DW_AT_decl_line : 892 + <23a> DW_AT_type : <0x111> + <23e> DW_AT_external : 1 + <23f> DW_AT_declaration : 1 + <1><240>: Abbrev Number: 14 (DW_TAG_variable) + <241> DW_AT_name : (indirect string, offset: 0x189): nsyscalls + <245> DW_AT_decl_file : 6 + <246> DW_AT_decl_line : 903 + <248> DW_AT_type : <0x47> + <24c> DW_AT_external : 1 + <24d> DW_AT_declaration : 1 + <1><24e>: Abbrev Number: 15 (DW_TAG_variable) + <24f> DW_AT_name : (indirect string, offset: 0x66): mpers_target_var + <253> DW_AT_decl_file : 5 + <254> DW_AT_decl_line : 38 + <255> DW_AT_type : <0x219> + <259> DW_AT_external : 1 + <25a> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><260>: Abbrev Number: 0 + diff --git a/mpers-m32/sysinfo_t.d2 b/mpers-m32/sysinfo_t.d2 new file mode 100644 index 000000000..a3c16b3ef --- /dev/null +++ b/mpers-m32/sysinfo_t.d2 @@ -0,0 +1,320 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1ea): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1cf): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1ae): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x98): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x30): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x13b): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x81): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1e1): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xa6): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x193): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x156): char +<1><71> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x81> +<2><7a> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 7 +<1><81> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x87> +<1><87> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><8c> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x43): __kernel_long_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 14 +DW_AT_type : <0x55> +<1><97> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x178): __kernel_ulong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 15 +DW_AT_type : <0x5c> +<1> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xce): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xf5> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xed): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x77): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x227): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0x100> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x53): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x81> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 12 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x100> +<2> +Abbrev Number: 13 (DW_TAG_unspecified_parameters) +<1><100> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf5> +<1><106> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x148): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0xa2> +<1><111> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x117> +<1><117> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x106> +<1><11c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xc): _Bool +<1><123> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x6): __u16 +DW_AT_decl_file : 3 +DW_AT_decl_line : 23 +DW_AT_type : <0x40> +<1><12e> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x12): __u32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><139> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x19c): sysinfo +DW_AT_byte_size : 64 +DW_AT_decl_file : 4 +DW_AT_decl_line : 7 +DW_AT_sibling : <0x209> +<2><145> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe6): uptime +DW_AT_decl_file : 4 +DW_AT_decl_line : 8 +DW_AT_type : <0x8c> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><153> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18): loads +DW_AT_decl_file : 4 +DW_AT_decl_line : 9 +DW_AT_type : <0x209> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><161> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x27): totalram +DW_AT_decl_file : 4 +DW_AT_decl_line : 10 +DW_AT_type : <0x97> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><16f> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d9): freeram +DW_AT_decl_file : 4 +DW_AT_decl_line : 11 +DW_AT_type : <0x97> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><17d> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15b): sharedram +DW_AT_decl_file : 4 +DW_AT_decl_line : 12 +DW_AT_type : <0x97> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><18b> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5c): bufferram +DW_AT_decl_file : 4 +DW_AT_decl_line : 13 +DW_AT_type : <0x97> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><199> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a4): totalswap +DW_AT_decl_file : 4 +DW_AT_decl_line : 14 +DW_AT_type : <0x97> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1a7> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16f): freeswap +DW_AT_decl_file : 4 +DW_AT_decl_line : 15 +DW_AT_type : <0x97> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><1b5> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): procs +DW_AT_decl_file : 4 +DW_AT_decl_line : 16 +DW_AT_type : <0x123> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><1c3> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : pad +DW_AT_decl_file : 4 +DW_AT_decl_line : 17 +DW_AT_type : <0x123> +DW_AT_data_member_location: 2 byte block: 23 2a (DW_OP_plus_uconst: 42) +<2><1d1> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x165): totalhigh +DW_AT_decl_file : 4 +DW_AT_decl_line : 18 +DW_AT_type : <0x97> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><1df> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e): freehigh +DW_AT_decl_file : 4 +DW_AT_decl_line : 19 +DW_AT_type : <0x97> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><1ed> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1bc): mem_unit +DW_AT_decl_file : 4 +DW_AT_decl_line : 20 +DW_AT_type : <0x12e> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2><1fb> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : _f +DW_AT_decl_file : 4 +DW_AT_decl_line : 21 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<1><209> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x97> +DW_AT_sibling : <0x219> +<2><212> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 2 +<1><219> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1c5): sysinfo_t +DW_AT_decl_file : 5 +DW_AT_decl_line : 37 +DW_AT_type : <0x139> +<1><224> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd5): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><232> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xce): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x111> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><240> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x189): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><24e> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x66): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 38 +DW_AT_type : <0x219> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-m32/sysinfo_t.h b/mpers-m32/sysinfo_t.h new file mode 100644 index 000000000..f8984eacc --- /dev/null +++ b/mpers-m32/sysinfo_t.h @@ -0,0 +1,20 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t uptime; +uint32_t loads[3]; +uint32_t totalram; +uint32_t freeram; +uint32_t sharedram; +uint32_t bufferram; +uint32_t totalswap; +uint32_t freeswap; +uint16_t procs; +uint16_t pad; +uint32_t totalhigh; +uint32_t freehigh; +uint32_t mem_unit; +char _f[8]; +} ATTRIBUTE_PACKED m32_sysinfo_t; +#define MPERS_m32_sysinfo_t m32_sysinfo_t diff --git a/mpers-m32/time_t.c b/mpers-m32/time_t.c new file mode 100644 index 000000000..f2a0e4054 --- /dev/null +++ b/mpers-m32/time_t.c @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +time_t mpers_target_var; diff --git a/mpers-m32/time_t.d1 b/mpers-m32/time_t.d1 new file mode 100644 index 000000000..41aef14b8 --- /dev/null +++ b/mpers-m32/time_t.d1 @@ -0,0 +1,165 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x14c (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x14f): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x32): mpers-m32/time_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x7f): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x123): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x138): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0xec): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xb5): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x110): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x142): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x68): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0xca): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x56): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x12f): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0xfa): __time_t + <6f> DW_AT_decl_file : 1 + <70> DW_AT_decl_line : 139 + <71> DW_AT_type : <0x55> + <1><75>: Abbrev Number: 2 (DW_TAG_base_type) + <76> DW_AT_byte_size : 1 + <77> DW_AT_encoding : 6 (signed char) + <78> DW_AT_name : (indirect string, offset: 0xb0): char + <1><7c>: Abbrev Number: 4 (DW_TAG_typedef) + <7d> DW_AT_name : (indirect string, offset: 0xc3): time_t + <81> DW_AT_decl_file : 2 + <82> DW_AT_decl_line : 75 + <83> DW_AT_type : <0x6a> + <1><87>: Abbrev Number: 5 (DW_TAG_pointer_type) + <88> DW_AT_byte_size : 4 + <89> DW_AT_type : <0x8d> + <1><8d>: Abbrev Number: 6 (DW_TAG_const_type) + <8e> DW_AT_type : <0x75> + <1><92>: Abbrev Number: 7 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0x103): sysent + <97> DW_AT_byte_size : 20 + <98> DW_AT_decl_file : 3 + <99> DW_AT_decl_line : 4 + <9a> DW_AT_sibling : <0xe5> + <2><9e>: Abbrev Number: 8 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0x10a): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xdc): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xd3): sys_func + DW_AT_decl_file : 3 + DW_AT_decl_line : 8 + DW_AT_type : <0xf0> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x11): sys_name + DW_AT_decl_file : 3 + DW_AT_decl_line : 9 +
DW_AT_type : <0x87> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xe5> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1a): struct_sysent + DW_AT_decl_file : 3 + DW_AT_decl_line : 10 + DW_AT_type : <0x92> + <1><101>: Abbrev Number: 5 (DW_TAG_pointer_type) + <102> DW_AT_byte_size : 4 + <103> DW_AT_type : <0x107> + <1><107>: Abbrev Number: 6 (DW_TAG_const_type) + <108> DW_AT_type : <0xf6> + <1><10c>: Abbrev Number: 2 (DW_TAG_base_type) + <10d> DW_AT_byte_size : 1 + <10e> DW_AT_encoding : 2 (boolean) + <10f> DW_AT_name : (indirect string, offset: 0xe6): _Bool + <1><113>: Abbrev Number: 12 (DW_TAG_variable) + <114> DW_AT_name : (indirect string, offset: 0x0): current_wordsize + <118> DW_AT_decl_file : 4 + <119> DW_AT_decl_line : 757 + <11b> DW_AT_type : <0x47> + <11f> DW_AT_external : 1 + <120> DW_AT_declaration : 1 + <1><121>: Abbrev Number: 12 (DW_TAG_variable) + <122> DW_AT_name : (indirect string, offset: 0x103): sysent + <126> DW_AT_decl_file : 4 + <127> DW_AT_decl_line : 892 + <129> DW_AT_type : <0x101> + <12d> DW_AT_external : 1 + <12e> DW_AT_declaration : 1 + <1><12f>: Abbrev Number: 12 (DW_TAG_variable) + <130> DW_AT_name : (indirect string, offset: 0x28): nsyscalls + <134> DW_AT_decl_file : 4 + <135> DW_AT_decl_line : 903 + <137> DW_AT_type : <0x47> + <13b> DW_AT_external : 1 + <13c> DW_AT_declaration : 1 + <1><13d>: Abbrev Number: 13 (DW_TAG_variable) + <13e> DW_AT_name : (indirect string, offset: 0x45): mpers_target_var + <142> DW_AT_decl_file : 5 + <143> DW_AT_decl_line : 31 + <144> DW_AT_type : <0x7c> + <148> DW_AT_external : 1 + <149> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><14f>: Abbrev Number: 0 + diff --git a/mpers-m32/time_t.d2 b/mpers-m32/time_t.d2 new file mode 100644 index 000000000..476aa5e8c --- /dev/null +++ b/mpers-m32/time_t.d2 @@ -0,0 +1,181 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x123): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x138): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0xec): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xb5): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x110): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x142): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x68): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0xca): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x56): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x12f): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xfa): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x55> +<1><75> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0xb0): char +<1><7c> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xc3): time_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 75 +DW_AT_type : <0x6a> +<1><87> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x8d> +<1><8d> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x75> +<1><92> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x103): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xe5> +<2><9e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10a): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xdc): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd3): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0xf0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xe5> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1a): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0x92> +<1><101> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x107> +<1><107> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xf6> +<1><10c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xe6): _Bool +<1><113> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x0): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><121> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x103): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0x101> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><12f> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x28): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><13d> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x45): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 31 +DW_AT_type : <0x7c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/time_t.h b/mpers-m32/time_t.h new file mode 100644 index 000000000..d9dd1d612 --- /dev/null +++ b/mpers-m32/time_t.h @@ -0,0 +1,5 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +int32_t m32_time_t; +#define MPERS_m32_time_t m32_time_t diff --git a/mpers-m32/timespec_t.c b/mpers-m32/timespec_t.c new file mode 100644 index 000000000..c5171fdad --- /dev/null +++ b/mpers-m32/timespec_t.c @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +typedef struct timespec timespec_t; + +timespec_t mpers_target_var; diff --git a/mpers-m32/timespec_t.d1 b/mpers-m32/timespec_t.d1 new file mode 100644 index 000000000..96885df9e --- /dev/null +++ b/mpers-m32/timespec_t.d1 @@ -0,0 +1,189 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x180 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xb0): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x0): mpers-m32/timespec_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x118): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x18f): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x17c): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x163): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x69): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x19b): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0xf8): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x52): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x186): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x77): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x153): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0xa1): __time_t + <6f> DW_AT_decl_file : 1 + <70> DW_AT_decl_line : 139 + <71> DW_AT_type : <0x55> + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x1b7): __syscall_slong_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 175 + <7c> DW_AT_type : <0x55> + <1><80>: Abbrev Number: 2 (DW_TAG_base_type) + <81> DW_AT_byte_size : 1 + <82> DW_AT_encoding : 6 (signed char) + <83> DW_AT_name : (indirect string, offset: 0x113): char + <1><87>: Abbrev Number: 5 (DW_TAG_structure_type) + <88> DW_AT_name : (indirect string, offset: 0x3f): timespec + <8c> DW_AT_byte_size : 8 + <8d> DW_AT_decl_file : 2 + <8e> DW_AT_decl_line : 120 + <8f> DW_AT_sibling : <0xb0> + <2><93>: Abbrev Number: 6 (DW_TAG_member) + <94> DW_AT_name : (indirect string, offset: 0x15c): tv_sec + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 122 + <9a> DW_AT_type : <0x6a> + <9e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x2e): tv_nsec + DW_AT_decl_file : 2 + DW_AT_decl_line : 123 + DW_AT_type : <0x75> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xb6> + <1>: Abbrev Number: 8 (DW_TAG_const_type) + DW_AT_type : <0x80> + <1>: Abbrev Number: 5 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x89): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x10e> + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xaa): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x48): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1ae): sys_func + DW_AT_decl_file : 3 + DW_AT_decl_line : 8 + DW_AT_type : <0x119> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 6 (DW_TAG_member) + <100> DW_AT_name : (indirect string, offset: 0x36): sys_name + <104> DW_AT_decl_file : 3 + <105> DW_AT_decl_line : 9 + <106> DW_AT_type : <0xb0> + <10a> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><10d>: Abbrev Number: 0 + <1><10e>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <10f> DW_AT_type : <0x2b> + <113> DW_AT_sibling : <0x119> + <2><117>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><118>: Abbrev Number: 0 + <1><119>: Abbrev Number: 7 (DW_TAG_pointer_type) + <11a> DW_AT_byte_size : 4 + <11b> DW_AT_type : <0x10e> + <1><11f>: Abbrev Number: 4 (DW_TAG_typedef) + <120> DW_AT_name : (indirect string, offset: 0x105): struct_sysent + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 10 + <126> DW_AT_type : <0xbb> + <1><12a>: Abbrev Number: 7 (DW_TAG_pointer_type) + <12b> DW_AT_byte_size : 4 + <12c> DW_AT_type : <0x130> + <1><130>: Abbrev Number: 8 (DW_TAG_const_type) + <131> DW_AT_type : <0x11f> + <1><135>: Abbrev Number: 2 (DW_TAG_base_type) + <136> DW_AT_byte_size : 1 + <137> DW_AT_encoding : 2 (boolean) + <138> DW_AT_name : (indirect string, offset: 0x28): _Bool + <1><13c>: Abbrev Number: 4 (DW_TAG_typedef) + <13d> DW_AT_name : (indirect string, offset: 0x171): timespec_t + <141> DW_AT_decl_file : 4 + <142> DW_AT_decl_line : 31 + <143> DW_AT_type : <0x87> + <1><147>: Abbrev Number: 12 (DW_TAG_variable) + <148> DW_AT_name : (indirect string, offset: 0x90): current_wordsize + <14c> DW_AT_decl_file : 5 + <14d> DW_AT_decl_line : 757 + <14f> DW_AT_type : <0x47> + <153> DW_AT_external : 1 + <154> DW_AT_declaration : 1 + <1><155>: Abbrev Number: 12 (DW_TAG_variable) + <156> DW_AT_name : (indirect string, offset: 0x89): sysent + <15a> DW_AT_decl_file : 5 + <15b> DW_AT_decl_line : 892 + <15d> DW_AT_type : <0x12a> + <161> DW_AT_external : 1 + <162> DW_AT_declaration : 1 + <1><163>: Abbrev Number: 12 (DW_TAG_variable) + <164> DW_AT_name : (indirect string, offset: 0x149): nsyscalls + <168> DW_AT_decl_file : 5 + <169> DW_AT_decl_line : 903 + <16b> DW_AT_type : <0x47> + <16f> DW_AT_external : 1 + <170> DW_AT_declaration : 1 + <1><171>: Abbrev Number: 13 (DW_TAG_variable) + <172> DW_AT_name : (indirect string, offset: 0x17): mpers_target_var + <176> DW_AT_decl_file : 4 + <177> DW_AT_decl_line : 33 + <178> DW_AT_type : <0x13c> + <17c> DW_AT_external : 1 + <17d> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><183>: Abbrev Number: 0 + diff --git a/mpers-m32/timespec_t.d2 b/mpers-m32/timespec_t.d2 new file mode 100644 index 000000000..6e0b859f5 --- /dev/null +++ b/mpers-m32/timespec_t.d2 @@ -0,0 +1,208 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x18f): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x17c): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x163): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x69): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x19b): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xf8): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x52): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x186): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x77): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x153): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xa1): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x55> +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b7): __syscall_slong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 175 +DW_AT_type : <0x55> +<1><80> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x113): char +<1><87> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x3f): timespec +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 120 +DW_AT_sibling : <0xb0> +<2><93> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15c): tv_sec +DW_AT_decl_file : 2 +DW_AT_decl_line : 122 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2e): tv_nsec +DW_AT_decl_file : 2 +DW_AT_decl_line : 123 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xb6> +<1> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x80> +<1> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x89): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x10e> +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xaa): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x48): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ae): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x119> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x36): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0xb0> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><10e> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x119> +<2><117> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><119> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x10e> +<1><11f> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x105): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xbb> +<1><12a> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x130> +<1><130> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x11f> +<1><135> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x28): _Bool +<1><13c> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x171): timespec_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 31 +DW_AT_type : <0x87> +<1><147> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x90): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><155> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x89): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x12a> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><163> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x149): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><171> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x17): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 33 +DW_AT_type : <0x13c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/timespec_t.h b/mpers-m32/timespec_t.h new file mode 100644 index 000000000..5d71eb767 --- /dev/null +++ b/mpers-m32/timespec_t.h @@ -0,0 +1,8 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t tv_sec; +int32_t tv_nsec; +} ATTRIBUTE_PACKED m32_timespec_t; +#define MPERS_m32_timespec_t m32_timespec_t diff --git a/mpers-m32/timeval_t.c b/mpers-m32/timeval_t.c new file mode 100644 index 000000000..5d867b5a0 --- /dev/null +++ b/mpers-m32/timeval_t.c @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +typedef struct timeval timeval_t; + +timeval_t mpers_target_var; diff --git a/mpers-m32/timeval_t.d1 b/mpers-m32/timeval_t.d1 new file mode 100644 index 000000000..3472dfbd2 --- /dev/null +++ b/mpers-m32/timeval_t.d1 @@ -0,0 +1,189 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x180 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xbb): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x6): mpers-m32/timeval_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x141): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1ad): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x19a): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x18c): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x74): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x1c): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x10b): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x5d): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1a4): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x82): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x17c): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0xac): __time_t + <6f> DW_AT_decl_file : 1 + <70> DW_AT_decl_line : 139 + <71> DW_AT_type : <0x55> + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x12b): __suseconds_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 141 + <7c> DW_AT_type : <0x55> + <1><80>: Abbrev Number: 2 (DW_TAG_base_type) + <81> DW_AT_byte_size : 1 + <82> DW_AT_encoding : 6 (signed char) + <83> DW_AT_name : (indirect string, offset: 0x126): char + <1><87>: Abbrev Number: 5 (DW_TAG_structure_type) + <88> DW_AT_name : (indirect string, offset: 0x103): timeval + <8c> DW_AT_byte_size : 8 + <8d> DW_AT_decl_file : 2 + <8e> DW_AT_decl_line : 30 + <8f> DW_AT_sibling : <0xb0> + <2><93>: Abbrev Number: 6 (DW_TAG_member) + <94> DW_AT_name : (indirect string, offset: 0x185): tv_sec + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 32 + <9a> DW_AT_type : <0x6a> + <9e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x139): tv_usec + DW_AT_decl_file : 2 + DW_AT_decl_line : 33 + DW_AT_type : <0x75> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xb6> + <1>: Abbrev Number: 8 (DW_TAG_const_type) + DW_AT_type : <0x80> + <1>: Abbrev Number: 5 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x94): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x10e> + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb5): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x53): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1b9): sys_func + DW_AT_decl_file : 3 + DW_AT_decl_line : 8 + DW_AT_type : <0x119> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 6 (DW_TAG_member) + <100> DW_AT_name : (indirect string, offset: 0x39): sys_name + <104> DW_AT_decl_file : 3 + <105> DW_AT_decl_line : 9 + <106> DW_AT_type : <0xb0> + <10a> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><10d>: Abbrev Number: 0 + <1><10e>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <10f> DW_AT_type : <0x2b> + <113> DW_AT_sibling : <0x119> + <2><117>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><118>: Abbrev Number: 0 + <1><119>: Abbrev Number: 7 (DW_TAG_pointer_type) + <11a> DW_AT_byte_size : 4 + <11b> DW_AT_type : <0x10e> + <1><11f>: Abbrev Number: 4 (DW_TAG_typedef) + <120> DW_AT_name : (indirect string, offset: 0x118): struct_sysent + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 10 + <126> DW_AT_type : <0xbb> + <1><12a>: Abbrev Number: 7 (DW_TAG_pointer_type) + <12b> DW_AT_byte_size : 4 + <12c> DW_AT_type : <0x130> + <1><130>: Abbrev Number: 8 (DW_TAG_const_type) + <131> DW_AT_type : <0x11f> + <1><135>: Abbrev Number: 2 (DW_TAG_base_type) + <136> DW_AT_byte_size : 1 + <137> DW_AT_encoding : 2 (boolean) + <138> DW_AT_name : (indirect string, offset: 0x0): _Bool + <1><13c>: Abbrev Number: 4 (DW_TAG_typedef) + <13d> DW_AT_name : (indirect string, offset: 0x2f): timeval_t + <141> DW_AT_decl_file : 4 + <142> DW_AT_decl_line : 31 + <143> DW_AT_type : <0x87> + <1><147>: Abbrev Number: 12 (DW_TAG_variable) + <148> DW_AT_name : (indirect string, offset: 0x9b): current_wordsize + <14c> DW_AT_decl_file : 5 + <14d> DW_AT_decl_line : 757 + <14f> DW_AT_type : <0x47> + <153> DW_AT_external : 1 + <154> DW_AT_declaration : 1 + <1><155>: Abbrev Number: 12 (DW_TAG_variable) + <156> DW_AT_name : (indirect string, offset: 0x94): sysent + <15a> DW_AT_decl_file : 5 + <15b> DW_AT_decl_line : 892 + <15d> DW_AT_type : <0x12a> + <161> DW_AT_external : 1 + <162> DW_AT_declaration : 1 + <1><163>: Abbrev Number: 12 (DW_TAG_variable) + <164> DW_AT_name : (indirect string, offset: 0x172): nsyscalls + <168> DW_AT_decl_file : 5 + <169> DW_AT_decl_line : 903 + <16b> DW_AT_type : <0x47> + <16f> DW_AT_external : 1 + <170> DW_AT_declaration : 1 + <1><171>: Abbrev Number: 13 (DW_TAG_variable) + <172> DW_AT_name : (indirect string, offset: 0x42): mpers_target_var + <176> DW_AT_decl_file : 4 + <177> DW_AT_decl_line : 33 + <178> DW_AT_type : <0x13c> + <17c> DW_AT_external : 1 + <17d> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><183>: Abbrev Number: 0 + diff --git a/mpers-m32/timeval_t.d2 b/mpers-m32/timeval_t.d2 new file mode 100644 index 000000000..5f2ac0e0e --- /dev/null +++ b/mpers-m32/timeval_t.d2 @@ -0,0 +1,208 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1ad): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x19a): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x18c): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x74): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x10b): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x5d): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a4): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x82): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x17c): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xac): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x55> +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x12b): __suseconds_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 141 +DW_AT_type : <0x55> +<1><80> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x126): char +<1><87> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x103): timeval +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_sibling : <0xb0> +<2><93> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x185): tv_sec +DW_AT_decl_file : 2 +DW_AT_decl_line : 32 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x139): tv_usec +DW_AT_decl_file : 2 +DW_AT_decl_line : 33 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xb6> +<1> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x80> +<1> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x94): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x10e> +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb5): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x53): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b9): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x119> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x39): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0xb0> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><10e> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x119> +<2><117> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><119> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x10e> +<1><11f> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x118): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xbb> +<1><12a> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x130> +<1><130> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x11f> +<1><135> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x0): _Bool +<1><13c> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2f): timeval_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 31 +DW_AT_type : <0x87> +<1><147> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x9b): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><155> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x94): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x12a> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><163> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x172): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><171> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x42): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 33 +DW_AT_type : <0x13c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/timeval_t.h b/mpers-m32/timeval_t.h new file mode 100644 index 000000000..89a268e4a --- /dev/null +++ b/mpers-m32/timeval_t.h @@ -0,0 +1,8 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t tv_sec; +int32_t tv_usec; +} ATTRIBUTE_PACKED m32_timeval_t; +#define MPERS_m32_timeval_t m32_timeval_t diff --git a/mpers-m32/tms_t.c b/mpers-m32/tms_t.c new file mode 100644 index 000000000..7af2d32ac --- /dev/null +++ b/mpers-m32/tms_t.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993-1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2012 H.J. Lu + * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include +typedef struct tms tms_t; +tms_t mpers_target_var; diff --git a/mpers-m32/tms_t.d1 b/mpers-m32/tms_t.d1 new file mode 100644 index 000000000..10dfe81af --- /dev/null +++ b/mpers-m32/tms_t.d1 @@ -0,0 +1,201 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x19c (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xd1): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x27): mpers-m32/tms_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x139): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1b3): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x195): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x17d): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x88): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x39): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x119): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x71): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x19f): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x96): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x174): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0x18b): __clock_t + <6f> DW_AT_decl_file : 1 + <70> DW_AT_decl_line : 135 + <71> DW_AT_type : <0x55> + <1><75>: Abbrev Number: 2 (DW_TAG_base_type) + <76> DW_AT_byte_size : 1 + <77> DW_AT_encoding : 6 (signed char) + <78> DW_AT_name : (indirect string, offset: 0x134): char + <1><7c>: Abbrev Number: 4 (DW_TAG_typedef) + <7d> DW_AT_name : (indirect string, offset: 0x5f): clock_t + <81> DW_AT_decl_file : 2 + <82> DW_AT_decl_line : 59 + <83> DW_AT_type : <0x6a> + <1><87>: Abbrev Number: 5 (DW_TAG_pointer_type) + <88> DW_AT_byte_size : 4 + <89> DW_AT_type : <0x8d> + <1><8d>: Abbrev Number: 6 (DW_TAG_const_type) + <8e> DW_AT_type : <0x75> + <1><92>: Abbrev Number: 7 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0xa8): sysent + <97> DW_AT_byte_size : 20 + <98> DW_AT_decl_file : 3 + <99> DW_AT_decl_line : 4 + <9a> DW_AT_sibling : <0xe5> + <2><9e>: Abbrev Number: 8 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0xcb): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x67): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1bf): sys_func + DW_AT_decl_file : 3 + DW_AT_decl_line : 8 + DW_AT_type : <0xf0> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x56): sys_name + DW_AT_decl_file : 3 + DW_AT_decl_line : 9 +
DW_AT_type : <0x87> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xe5> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x126): struct_sysent + DW_AT_decl_file : 3 + DW_AT_decl_line : 10 + DW_AT_type : <0x92> + <1><101>: Abbrev Number: 5 (DW_TAG_pointer_type) + <102> DW_AT_byte_size : 4 + <103> DW_AT_type : <0x107> + <1><107>: Abbrev Number: 6 (DW_TAG_const_type) + <108> DW_AT_type : <0xf6> + <1><10c>: Abbrev Number: 2 (DW_TAG_base_type) + <10d> DW_AT_byte_size : 1 + <10e> DW_AT_encoding : 2 (boolean) + <10f> DW_AT_name : (indirect string, offset: 0x1b): _Bool + <1><113>: Abbrev Number: 12 (DW_TAG_structure_type) + <114> DW_AT_name : tms + <118> DW_AT_byte_size : 16 + <119> DW_AT_decl_file : 4 + <11a> DW_AT_decl_line : 34 + <11b> DW_AT_sibling : <0x158> + <2><11f>: Abbrev Number: 8 (DW_TAG_member) + <120> DW_AT_name : (indirect string, offset: 0x11): tms_utime + <124> DW_AT_decl_file : 4 + <125> DW_AT_decl_line : 36 + <126> DW_AT_type : <0x7c> + <12a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><12d>: Abbrev Number: 8 (DW_TAG_member) + <12e> DW_AT_name : (indirect string, offset: 0x4c): tms_stime + <132> DW_AT_decl_file : 4 + <133> DW_AT_decl_line : 37 + <134> DW_AT_type : <0x7c> + <138> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><13b>: Abbrev Number: 8 (DW_TAG_member) + <13c> DW_AT_name : (indirect string, offset: 0xaf): tms_cutime + <140> DW_AT_decl_file : 4 + <141> DW_AT_decl_line : 39 + <142> DW_AT_type : <0x7c> + <146> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><149>: Abbrev Number: 8 (DW_TAG_member) + <14a> DW_AT_name : (indirect string, offset: 0x1a8): tms_cstime + <14e> DW_AT_decl_file : 4 + <14f> DW_AT_decl_line : 40 + <150> DW_AT_type : <0x7c> + <154> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><157>: Abbrev Number: 0 + <1><158>: Abbrev Number: 4 (DW_TAG_typedef) + <159> DW_AT_name : (indirect string, offset: 0x21): tms_t + <15d> DW_AT_decl_file : 5 + <15e> DW_AT_decl_line : 36 + <15f> DW_AT_type : <0x113> + <1><163>: Abbrev Number: 13 (DW_TAG_variable) + <164> DW_AT_name : (indirect string, offset: 0xba): current_wordsize + <168> DW_AT_decl_file : 6 + <169> DW_AT_decl_line : 757 + <16b> DW_AT_type : <0x47> + <16f> DW_AT_external : 1 + <170> DW_AT_declaration : 1 + <1><171>: Abbrev Number: 13 (DW_TAG_variable) + <172> DW_AT_name : (indirect string, offset: 0xa8): sysent + <176> DW_AT_decl_file : 6 + <177> DW_AT_decl_line : 892 + <179> DW_AT_type : <0x101> + <17d> DW_AT_external : 1 + <17e> DW_AT_declaration : 1 + <1><17f>: Abbrev Number: 13 (DW_TAG_variable) + <180> DW_AT_name : (indirect string, offset: 0x16a): nsyscalls + <184> DW_AT_decl_file : 6 + <185> DW_AT_decl_line : 903 + <187> DW_AT_type : <0x47> + <18b> DW_AT_external : 1 + <18c> DW_AT_declaration : 1 + <1><18d>: Abbrev Number: 14 (DW_TAG_variable) + <18e> DW_AT_name : (indirect string, offset: 0x0): mpers_target_var + <192> DW_AT_decl_file : 5 + <193> DW_AT_decl_line : 37 + <194> DW_AT_type : <0x158> + <198> DW_AT_external : 1 + <199> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><19f>: Abbrev Number: 0 + diff --git a/mpers-m32/tms_t.d2 b/mpers-m32/tms_t.d2 new file mode 100644 index 000000000..96c62f81a --- /dev/null +++ b/mpers-m32/tms_t.d2 @@ -0,0 +1,222 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1b3): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x195): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x17d): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x88): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x39): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x119): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x71): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x19f): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x96): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x174): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x18b): __clock_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 135 +DW_AT_type : <0x55> +<1><75> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x134): char +<1><7c> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x5f): clock_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 59 +DW_AT_type : <0x6a> +<1><87> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x8d> +<1><8d> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x75> +<1><92> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xa8): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xe5> +<2><9e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xcb): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x67): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1bf): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0xf0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x56): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xe5> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x126): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0x92> +<1><101> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x107> +<1><107> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xf6> +<1><10c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x1b): _Bool +<1><113> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : tms +DW_AT_byte_size : 16 +DW_AT_decl_file : 4 +DW_AT_decl_line : 34 +DW_AT_sibling : <0x158> +<2><11f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11): tms_utime +DW_AT_decl_file : 4 +DW_AT_decl_line : 36 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><12d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x4c): tms_stime +DW_AT_decl_file : 4 +DW_AT_decl_line : 37 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><13b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xaf): tms_cutime +DW_AT_decl_file : 4 +DW_AT_decl_line : 39 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><149> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a8): tms_cstime +DW_AT_decl_file : 4 +DW_AT_decl_line : 40 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><158> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x21): tms_t +DW_AT_decl_file : 5 +DW_AT_decl_line : 36 +DW_AT_type : <0x113> +<1><163> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xba): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><171> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xa8): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x101> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><17f> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x16a): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><18d> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x0): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 37 +DW_AT_type : <0x158> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/tms_t.h b/mpers-m32/tms_t.h new file mode 100644 index 000000000..da69dd77d --- /dev/null +++ b/mpers-m32/tms_t.h @@ -0,0 +1,10 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t tms_utime; +int32_t tms_stime; +int32_t tms_cutime; +int32_t tms_cstime; +} ATTRIBUTE_PACKED m32_tms_t; +#define MPERS_m32_tms_t m32_tms_t diff --git a/mpers-m32/utimbuf_t.c b/mpers-m32/utimbuf_t.c new file mode 100644 index 000000000..bb8a34a5f --- /dev/null +++ b/mpers-m32/utimbuf_t.c @@ -0,0 +1,8 @@ +#include "defs.h" + + +#include + +typedef struct utimbuf utimbuf_t; + +utimbuf_t mpers_target_var; diff --git a/mpers-m32/utimbuf_t.d1 b/mpers-m32/utimbuf_t.d1 new file mode 100644 index 000000000..3bcf6aa15 --- /dev/null +++ b/mpers-m32/utimbuf_t.d1 @@ -0,0 +1,184 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x175 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xca): GNU C 4.8.4 -m32 -mtune=generic -march=i686 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x94): mpers-m32/utimbuf_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x13a): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x19f): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x18c): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x17e): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x66): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x10): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x11a): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x4f): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x196): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x7b): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x175): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0xbb): __time_t + <6f> DW_AT_decl_file : 2 + <70> DW_AT_decl_line : 139 + <71> DW_AT_type : <0x55> + <1><75>: Abbrev Number: 2 (DW_TAG_base_type) + <76> DW_AT_byte_size : 1 + <77> DW_AT_encoding : 6 (signed char) + <78> DW_AT_name : (indirect string, offset: 0x135): char + <1><7c>: Abbrev Number: 5 (DW_TAG_pointer_type) + <7d> DW_AT_byte_size : 4 + <7e> DW_AT_type : <0x82> + <1><82>: Abbrev Number: 6 (DW_TAG_const_type) + <83> DW_AT_type : <0x75> + <1><87>: Abbrev Number: 7 (DW_TAG_structure_type) + <88> DW_AT_name : (indirect string, offset: 0x8d): sysent + <8c> DW_AT_byte_size : 20 + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 4 + <8f> DW_AT_sibling : <0xda> + <2><93>: Abbrev Number: 8 (DW_TAG_member) + <94> DW_AT_name : (indirect string, offset: 0xc4): nargs + <98> DW_AT_decl_file : 1 + <99> DW_AT_decl_line : 5 + <9a> DW_AT_type : <0x47> + <9e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x45): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1ab): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xe5> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x23): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x7c> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xe5> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xda> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x127): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x87> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xfc> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xeb> + <1><101>: Abbrev Number: 2 (DW_TAG_base_type) + <102> DW_AT_byte_size : 1 + <103> DW_AT_encoding : 2 (boolean) + <104> DW_AT_name : (indirect string, offset: 0xa): _Bool + <1><108>: Abbrev Number: 7 (DW_TAG_structure_type) + <109> DW_AT_name : (indirect string, offset: 0x2c): utimbuf + <10d> DW_AT_byte_size : 8 + <10e> DW_AT_decl_file : 3 + <10f> DW_AT_decl_line : 37 + <110> DW_AT_sibling : <0x131> + <2><114>: Abbrev Number: 8 (DW_TAG_member) + <115> DW_AT_name : (indirect string, offset: 0x74): actime + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 39 + <11b> DW_AT_type : <0x6a> + <11f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><122>: Abbrev Number: 8 (DW_TAG_member) + <123> DW_AT_name : (indirect string, offset: 0x112): modtime + <127> DW_AT_decl_file : 3 + <128> DW_AT_decl_line : 40 + <129> DW_AT_type : <0x6a> + <12d> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><130>: Abbrev Number: 0 + <1><131>: Abbrev Number: 4 (DW_TAG_typedef) + <132> DW_AT_name : (indirect string, offset: 0x0): utimbuf_t + <136> DW_AT_decl_file : 4 + <137> DW_AT_decl_line : 6 + <138> DW_AT_type : <0x108> + <1><13c>: Abbrev Number: 12 (DW_TAG_variable) + <13d> DW_AT_name : (indirect string, offset: 0xaa): current_wordsize + <141> DW_AT_decl_file : 5 + <142> DW_AT_decl_line : 757 + <144> DW_AT_type : <0x47> + <148> DW_AT_external : 1 + <149> DW_AT_declaration : 1 + <1><14a>: Abbrev Number: 12 (DW_TAG_variable) + <14b> DW_AT_name : (indirect string, offset: 0x8d): sysent + <14f> DW_AT_decl_file : 5 + <150> DW_AT_decl_line : 892 + <152> DW_AT_type : <0xf6> + <156> DW_AT_external : 1 + <157> DW_AT_declaration : 1 + <1><158>: Abbrev Number: 12 (DW_TAG_variable) + <159> DW_AT_name : (indirect string, offset: 0x16b): nsyscalls + <15d> DW_AT_decl_file : 5 + <15e> DW_AT_decl_line : 903 + <160> DW_AT_type : <0x47> + <164> DW_AT_external : 1 + <165> DW_AT_declaration : 1 + <1><166>: Abbrev Number: 13 (DW_TAG_variable) + <167> DW_AT_name : (indirect string, offset: 0x34): mpers_target_var + <16b> DW_AT_decl_file : 4 + <16c> DW_AT_decl_line : 8 + <16d> DW_AT_type : <0x131> + <171> DW_AT_external : 1 + <172> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><178>: Abbrev Number: 0 + diff --git a/mpers-m32/utimbuf_t.d2 b/mpers-m32/utimbuf_t.d2 new file mode 100644 index 000000000..e3ee7ad44 --- /dev/null +++ b/mpers-m32/utimbuf_t.d2 @@ -0,0 +1,202 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x19f): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x18c): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x17e): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x66): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x10): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x11a): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x4f): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x196): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x7b): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x175): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xbb): __time_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 139 +DW_AT_type : <0x55> +<1><75> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x135): char +<1><7c> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x82> +<1><82> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x75> +<1><87> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x8d): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xda> +<2><93> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc4): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x45): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ab): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xe5> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xe5> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xda> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x127): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x87> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xfc> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xeb> +<1><101> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xa): _Bool +<1><108> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x2c): utimbuf +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_sibling : <0x131> +<2><114> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x74): actime +DW_AT_decl_file : 3 +DW_AT_decl_line : 39 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><122> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x112): modtime +DW_AT_decl_file : 3 +DW_AT_decl_line : 40 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><131> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): utimbuf_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 6 +DW_AT_type : <0x108> +<1><13c> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xaa): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><14a> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x8d): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xf6> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><158> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x16b): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><166> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x34): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 8 +DW_AT_type : <0x131> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-m32/utimbuf_t.h b/mpers-m32/utimbuf_t.h new file mode 100644 index 000000000..ff0fc87f0 --- /dev/null +++ b/mpers-m32/utimbuf_t.h @@ -0,0 +1,8 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t actime; +int32_t modtime; +} ATTRIBUTE_PACKED m32_utimbuf_t; +#define MPERS_m32_utimbuf_t m32_utimbuf_t diff --git a/mpers-mx32.stamp b/mpers-mx32.stamp new file mode 100644 index 000000000..e69de29bb diff --git a/mpers-mx32/kernel_dirent.c b/mpers-mx32/kernel_dirent.c new file mode 100644 index 000000000..77ca7e677 --- /dev/null +++ b/mpers-mx32/kernel_dirent.c @@ -0,0 +1,35 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +kernel_dirent mpers_target_var; diff --git a/mpers-mx32/kernel_dirent.d1 b/mpers-mx32/kernel_dirent.d1 new file mode 100644 index 000000000..9b7a8bbab --- /dev/null +++ b/mpers-mx32/kernel_dirent.d1 @@ -0,0 +1,207 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1a8 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x6): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x19e): mpers-mx32/kernel_dirent.c + <15> DW_AT_comp_dir : (indirect string, offset: 0xed): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1b9): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x17c): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x168): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x9e): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x51): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x124): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x7e): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x195): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xac): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x15f): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x13f): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_array_type) + <7d> DW_AT_type : <0x6a> + <81> DW_AT_sibling : <0x8c> + <2><85>: Abbrev Number: 7 (DW_TAG_subrange_type) + <86> DW_AT_type : <0x63> + <8a> DW_AT_upper_bound : 0 + <2><8b>: Abbrev Number: 0 + <1><8c>: Abbrev Number: 8 (DW_TAG_typedef) + <8d> DW_AT_name : (indirect string, offset: 0x144): __kernel_ulong_t + <91> DW_AT_decl_file : 1 + <92> DW_AT_decl_line : 14 + <93> DW_AT_type : <0x4e> + <1><97>: Abbrev Number: 8 (DW_TAG_typedef) + <98> DW_AT_name : (indirect string, offset: 0x186): kernel_ulong_t + <9c> DW_AT_decl_file : 2 + <9d> DW_AT_decl_line : 36 + <9e> DW_AT_type : <0x8c> + <1>: Abbrev Number: 9 (DW_TAG_structure_type) + DW_AT_byte_size : 24 + DW_AT_decl_file : 2 + DW_AT_decl_line : 50 + DW_AT_sibling : <0xe3> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x176): d_ino + DW_AT_decl_file : 2 + DW_AT_decl_line : 51 + DW_AT_type : <0x97> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x11e): d_off + DW_AT_decl_file : 2 + DW_AT_decl_line : 52 + DW_AT_type : <0x97> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x95): d_reclen + DW_AT_decl_file : 2 + DW_AT_decl_line : 53 + DW_AT_type : <0x40> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x6d): d_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 54 + DW_AT_type : <0x7c> + DW_AT_data_member_location: 2 byte block: 23 12 (DW_OP_plus_uconst: 18) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 8 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1c5): kernel_dirent + DW_AT_decl_file : 2 + DW_AT_decl_line : 55 + DW_AT_type : <0xa2> + <1>: Abbrev Number: 11 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xbe): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x141> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xd6): nargs + DW_AT_decl_file : 3 + <100> DW_AT_decl_line : 5 + <101> DW_AT_type : <0x47> + <105> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><108>: Abbrev Number: 10 (DW_TAG_member) + <109> DW_AT_name : (indirect string, offset: 0x74): sys_flags + <10d> DW_AT_decl_file : 3 + <10e> DW_AT_decl_line : 6 + <10f> DW_AT_type : <0x2b> + <113> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><116>: Abbrev Number: 12 (DW_TAG_member) + <117> DW_AT_name : sen + <11b> DW_AT_decl_file : 3 + <11c> DW_AT_decl_line : 7 + <11d> DW_AT_type : <0x2b> + <121> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><124>: Abbrev Number: 10 (DW_TAG_member) + <125> DW_AT_name : (indirect string, offset: 0x1d3): sys_func + <129> DW_AT_decl_file : 3 + <12a> DW_AT_decl_line : 8 + <12b> DW_AT_type : <0x14c> + <12f> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><132>: Abbrev Number: 10 (DW_TAG_member) + <133> DW_AT_name : (indirect string, offset: 0x64): sys_name + <137> DW_AT_decl_file : 3 + <138> DW_AT_decl_line : 9 + <139> DW_AT_type : <0x71> + <13d> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><140>: Abbrev Number: 0 + <1><141>: Abbrev Number: 13 (DW_TAG_subroutine_type) + <142> DW_AT_type : <0x2b> + <146> DW_AT_sibling : <0x14c> + <2><14a>: Abbrev Number: 14 (DW_TAG_unspecified_parameters) + <2><14b>: Abbrev Number: 0 + <1><14c>: Abbrev Number: 4 (DW_TAG_pointer_type) + <14d> DW_AT_byte_size : 4 + <14e> DW_AT_type : <0x141> + <1><152>: Abbrev Number: 8 (DW_TAG_typedef) + <153> DW_AT_name : (indirect string, offset: 0x131): struct_sysent + <157> DW_AT_decl_file : 3 + <158> DW_AT_decl_line : 10 + <159> DW_AT_type : <0xee> + <1><15d>: Abbrev Number: 4 (DW_TAG_pointer_type) + <15e> DW_AT_byte_size : 4 + <15f> DW_AT_type : <0x163> + <1><163>: Abbrev Number: 5 (DW_TAG_const_type) + <164> DW_AT_type : <0x152> + <1><168>: Abbrev Number: 2 (DW_TAG_base_type) + <169> DW_AT_byte_size : 1 + <16a> DW_AT_encoding : 2 (boolean) + <16b> DW_AT_name : (indirect string, offset: 0x0): _Bool + <1><16f>: Abbrev Number: 15 (DW_TAG_variable) + <170> DW_AT_name : (indirect string, offset: 0xc5): current_wordsize + <174> DW_AT_decl_file : 4 + <175> DW_AT_decl_line : 757 + <177> DW_AT_type : <0x47> + <17b> DW_AT_external : 1 + <17c> DW_AT_declaration : 1 + <1><17d>: Abbrev Number: 15 (DW_TAG_variable) + <17e> DW_AT_name : (indirect string, offset: 0xbe): sysent + <182> DW_AT_decl_file : 4 + <183> DW_AT_decl_line : 892 + <185> DW_AT_type : <0x15d> + <189> DW_AT_external : 1 + <18a> DW_AT_declaration : 1 + <1><18b>: Abbrev Number: 15 (DW_TAG_variable) + <18c> DW_AT_name : (indirect string, offset: 0x155): nsyscalls + <190> DW_AT_decl_file : 4 + <191> DW_AT_decl_line : 903 + <193> DW_AT_type : <0x47> + <197> DW_AT_external : 1 + <198> DW_AT_declaration : 1 + <1><199>: Abbrev Number: 16 (DW_TAG_variable) + <19a> DW_AT_name : (indirect string, offset: 0xdc): mpers_target_var + <19e> DW_AT_decl_file : 5 + <19f> DW_AT_decl_line : 35 + <1a0> DW_AT_type : <0xe3> + <1a4> DW_AT_external : 1 + <1a5> DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) + <1><1ab>: Abbrev Number: 0 + diff --git a/mpers-mx32/kernel_dirent.d2 b/mpers-mx32/kernel_dirent.d2 new file mode 100644 index 000000000..d246d2e72 --- /dev/null +++ b/mpers-mx32/kernel_dirent.d2 @@ -0,0 +1,229 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1b9): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x17c): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x168): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x9e): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x51): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x124): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x7e): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x195): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xac): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x15f): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x13f): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x8c> +<2><85> +Abbrev Number: 7 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 0 +<1><8c> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x144): __kernel_ulong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 14 +DW_AT_type : <0x4e> +<1><97> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x186): kernel_ulong_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 36 +DW_AT_type : <0x8c> +<1> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_byte_size : 24 +DW_AT_decl_file : 2 +DW_AT_decl_line : 50 +DW_AT_sibling : <0xe3> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x176): d_ino +DW_AT_decl_file : 2 +DW_AT_decl_line : 51 +DW_AT_type : <0x97> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11e): d_off +DW_AT_decl_file : 2 +DW_AT_decl_line : 52 +DW_AT_type : <0x97> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x95): d_reclen +DW_AT_decl_file : 2 +DW_AT_decl_line : 53 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6d): d_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 54 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 12 (DW_OP_plus_uconst: 18) +<1> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1c5): kernel_dirent +DW_AT_decl_file : 2 +DW_AT_decl_line : 55 +DW_AT_type : <0xa2> +<1> +Abbrev Number: 11 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xbe): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x141> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd6): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><108> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x74): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><116> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><124> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d3): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x14c> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><132> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x64): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><141> +Abbrev Number: 13 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x14c> +<2><14a> +Abbrev Number: 14 (DW_TAG_unspecified_parameters) +<1><14c> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x141> +<1><152> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x131): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xee> +<1><15d> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x163> +<1><163> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x152> +<1><168> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x0): _Bool +<1><16f> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc5): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><17d> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xbe): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0x15d> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><18b> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x155): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><199> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xdc): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 35 +DW_AT_type : <0xe3> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) diff --git a/mpers-mx32/kernel_dirent.h b/mpers-mx32/kernel_dirent.h new file mode 100644 index 000000000..6561d8a42 --- /dev/null +++ b/mpers-mx32/kernel_dirent.h @@ -0,0 +1,11 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint64_t d_ino; +uint64_t d_off; +uint16_t d_reclen; +char d_name[1]; +unsigned char mpers_end_filler_1[5]; +} ATTRIBUTE_PACKED mx32_kernel_dirent; +#define MPERS_mx32_kernel_dirent mx32_kernel_dirent diff --git a/mpers-mx32/mq_attr_t.c b/mpers-mx32/mq_attr_t.c new file mode 100644 index 000000000..2c31495d8 --- /dev/null +++ b/mpers-mx32/mq_attr_t.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2004 Ulrich Drepper + * Copyright (c) 2005-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#ifdef HAVE_MQUEUE_H +# include +typedef struct mq_attr mq_attr_t; +#elif defined HAVE_LINUX_MQUEUE_H +# include +# include +typedef struct mq_attr mq_attr_t; +#endif + + +mq_attr_t mpers_target_var; diff --git a/mpers-mx32/mq_attr_t.d1 b/mpers-mx32/mq_attr_t.d1 new file mode 100644 index 000000000..f0bf8d694 --- /dev/null +++ b/mpers-mx32/mq_attr_t.d1 @@ -0,0 +1,214 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1ba (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x16): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xb4): mpers-mx32/mq_attr_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x19e): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x192): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x175): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x15f): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xcb): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x61): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x123): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x9d): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x17f): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xd9): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x11a): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x156): sizetype + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x1d8): __syscall_slong_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 175 + <7c> DW_AT_type : <0x63> + <1><80>: Abbrev Number: 2 (DW_TAG_base_type) + <81> DW_AT_byte_size : 1 + <82> DW_AT_encoding : 6 (signed char) + <83> DW_AT_name : (indirect string, offset: 0x13e): char + <1><87>: Abbrev Number: 5 (DW_TAG_pointer_type) + <88> DW_AT_byte_size : 4 + <89> DW_AT_type : <0x8d> + <1><8d>: Abbrev Number: 6 (DW_TAG_const_type) + <8e> DW_AT_type : <0x80> + <1><92>: Abbrev Number: 7 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0xeb): sysent + <97> DW_AT_byte_size : 20 + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 4 + <9a> DW_AT_sibling : <0xe5> + <2><9e>: Abbrev Number: 8 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0x103): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x93): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1cf): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0xf0> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x7f): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 +
DW_AT_type : <0x87> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xe5> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x130): struct_sysent + DW_AT_decl_file : 2 + DW_AT_decl_line : 10 + DW_AT_type : <0x92> + <1><101>: Abbrev Number: 5 (DW_TAG_pointer_type) + <102> DW_AT_byte_size : 4 + <103> DW_AT_type : <0x107> + <1><107>: Abbrev Number: 6 (DW_TAG_const_type) + <108> DW_AT_type : <0xf6> + <1><10c>: Abbrev Number: 2 (DW_TAG_base_type) + <10d> DW_AT_byte_size : 1 + <10e> DW_AT_encoding : 2 (boolean) + <10f> DW_AT_name : (indirect string, offset: 0x6): _Bool + <1><113>: Abbrev Number: 7 (DW_TAG_structure_type) + <114> DW_AT_name : (indirect string, offset: 0x16d): mq_attr + <118> DW_AT_byte_size : 64 + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 26 + <11b> DW_AT_sibling : <0x166> + <2><11f>: Abbrev Number: 8 (DW_TAG_member) + <120> DW_AT_name : (indirect string, offset: 0x143): mq_flags + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 28 + <126> DW_AT_type : <0x75> + <12a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><12d>: Abbrev Number: 8 (DW_TAG_member) + <12e> DW_AT_name : (indirect string, offset: 0x188): mq_maxmsg + <132> DW_AT_decl_file : 3 + <133> DW_AT_decl_line : 29 + <134> DW_AT_type : <0x75> + <138> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><13b>: Abbrev Number: 8 (DW_TAG_member) + <13c> DW_AT_name : (indirect string, offset: 0x74): mq_msgsize + <140> DW_AT_decl_file : 3 + <141> DW_AT_decl_line : 30 + <142> DW_AT_type : <0x75> + <146> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><149>: Abbrev Number: 8 (DW_TAG_member) + <14a> DW_AT_name : (indirect string, offset: 0x88): mq_curmsgs + <14e> DW_AT_decl_file : 3 + <14f> DW_AT_decl_line : 31 + <150> DW_AT_type : <0x75> + <154> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><157>: Abbrev Number: 8 (DW_TAG_member) + <158> DW_AT_name : (indirect string, offset: 0x0): __pad + <15c> DW_AT_decl_file : 3 + <15d> DW_AT_decl_line : 32 + <15e> DW_AT_type : <0x166> + <162> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><165>: Abbrev Number: 0 + <1><166>: Abbrev Number: 12 (DW_TAG_array_type) + <167> DW_AT_type : <0x75> + <16b> DW_AT_sibling : <0x176> + <2><16f>: Abbrev Number: 13 (DW_TAG_subrange_type) + <170> DW_AT_type : <0x6e> + <174> DW_AT_upper_bound : 3 + <2><175>: Abbrev Number: 0 + <1><176>: Abbrev Number: 4 (DW_TAG_typedef) + <177> DW_AT_name : (indirect string, offset: 0xc): mq_attr_t + <17b> DW_AT_decl_file : 4 + <17c> DW_AT_decl_line : 34 + <17d> DW_AT_type : <0x113> + <1><181>: Abbrev Number: 14 (DW_TAG_variable) + <182> DW_AT_name : (indirect string, offset: 0xf2): current_wordsize + <186> DW_AT_decl_file : 5 + <187> DW_AT_decl_line : 757 + <189> DW_AT_type : <0x47> + <18d> DW_AT_external : 1 + <18e> DW_AT_declaration : 1 + <1><18f>: Abbrev Number: 14 (DW_TAG_variable) + <190> DW_AT_name : (indirect string, offset: 0xeb): sysent + <194> DW_AT_decl_file : 5 + <195> DW_AT_decl_line : 892 + <197> DW_AT_type : <0x101> + <19b> DW_AT_external : 1 + <19c> DW_AT_declaration : 1 + <1><19d>: Abbrev Number: 14 (DW_TAG_variable) + <19e> DW_AT_name : (indirect string, offset: 0x14c): nsyscalls + <1a2> DW_AT_decl_file : 5 + <1a3> DW_AT_decl_line : 903 + <1a5> DW_AT_type : <0x47> + <1a9> DW_AT_external : 1 + <1aa> DW_AT_declaration : 1 + <1><1ab>: Abbrev Number: 15 (DW_TAG_variable) + <1ac> DW_AT_name : (indirect string, offset: 0x109): mpers_target_var + <1b0> DW_AT_decl_file : 4 + <1b1> DW_AT_decl_line : 42 + <1b2> DW_AT_type : <0x176> + <1b6> DW_AT_external : 1 + <1b7> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><1bd>: Abbrev Number: 0 + diff --git a/mpers-mx32/mq_attr_t.d2 b/mpers-mx32/mq_attr_t.d2 new file mode 100644 index 000000000..c233bb777 --- /dev/null +++ b/mpers-mx32/mq_attr_t.d2 @@ -0,0 +1,237 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x192): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x175): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x15f): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xcb): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x61): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x123): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x9d): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x17f): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xd9): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11a): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x156): sizetype +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1d8): __syscall_slong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 175 +DW_AT_type : <0x63> +<1><80> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x13e): char +<1><87> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x8d> +<1><8d> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x80> +<1><92> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xeb): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xe5> +<2><9e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x103): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x93): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1cf): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0xf0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7f): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xe5> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x130): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0x92> +<1><101> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x107> +<1><107> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xf6> +<1><10c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x6): _Bool +<1><113> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x16d): mq_attr +DW_AT_byte_size : 64 +DW_AT_decl_file : 3 +DW_AT_decl_line : 26 +DW_AT_sibling : <0x166> +<2><11f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x143): mq_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 28 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><12d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x188): mq_maxmsg +DW_AT_decl_file : 3 +DW_AT_decl_line : 29 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><13b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x74): mq_msgsize +DW_AT_decl_file : 3 +DW_AT_decl_line : 30 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><149> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x88): mq_curmsgs +DW_AT_decl_file : 3 +DW_AT_decl_line : 31 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><157> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): __pad +DW_AT_decl_file : 3 +DW_AT_decl_line : 32 +DW_AT_type : <0x166> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<1><166> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x75> +DW_AT_sibling : <0x176> +<2><16f> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x6e> +DW_AT_upper_bound : 3 +<1><176> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xc): mq_attr_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 34 +DW_AT_type : <0x113> +<1><181> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xf2): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><18f> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xeb): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x101> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><19d> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x14c): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1ab> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x109): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_type : <0x176> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/mq_attr_t.h b/mpers-mx32/mq_attr_t.h new file mode 100644 index 000000000..6b3174f7f --- /dev/null +++ b/mpers-mx32/mq_attr_t.h @@ -0,0 +1,11 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t mq_flags; +int64_t mq_maxmsg; +int64_t mq_msgsize; +int64_t mq_curmsgs; +int64_t __pad[4]; +} ATTRIBUTE_PACKED mx32_mq_attr_t; +#define MPERS_mx32_mq_attr_t mx32_mq_attr_t diff --git a/mpers-mx32/msgbuf_t.c b/mpers-mx32/msgbuf_t.c new file mode 100644 index 000000000..4b0d5a9b5 --- /dev/null +++ b/mpers-mx32/msgbuf_t.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1993 Ulrich Pegelow + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2003-2006 Roland McGrath + * Copyright (c) 2006-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include + +typedef struct msgbuf msgbuf_t; +msgbuf_t mpers_target_var; diff --git a/mpers-mx32/msgbuf_t.d1 b/mpers-mx32/msgbuf_t.d1 new file mode 100644 index 000000000..778846264 --- /dev/null +++ b/mpers-mx32/msgbuf_t.d1 @@ -0,0 +1,196 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x190 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xd): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x181): mpers-mx32/msgbuf_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x113): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x197): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x16e): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x157): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x95): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x58): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0xf3): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x7e): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x178): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xa9): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0xea): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x14e): sizetype + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x1b2): __syscall_slong_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 175 + <7c> DW_AT_type : <0x63> + <1><80>: Abbrev Number: 2 (DW_TAG_base_type) + <81> DW_AT_byte_size : 1 + <82> DW_AT_encoding : 6 (signed char) + <83> DW_AT_name : (indirect string, offset: 0x10e): char + <1><87>: Abbrev Number: 5 (DW_TAG_pointer_type) + <88> DW_AT_byte_size : 4 + <89> DW_AT_type : <0x8d> + <1><8d>: Abbrev Number: 6 (DW_TAG_const_type) + <8e> DW_AT_type : <0x80> + <1><92>: Abbrev Number: 7 (DW_TAG_array_type) + <93> DW_AT_type : <0x80> + <97> DW_AT_sibling : <0xa2> + <2><9b>: Abbrev Number: 8 (DW_TAG_subrange_type) + <9c> DW_AT_type : <0x6e> + DW_AT_upper_bound : 0 + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xbb): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 2 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xf5> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xd3): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x74): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 11 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1a9): sys_func +
DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0x100> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x6b): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 + DW_AT_type : <0x87> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 12 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0x100> + <2>: Abbrev Number: 13 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1><100>: Abbrev Number: 5 (DW_TAG_pointer_type) + <101> DW_AT_byte_size : 4 + <102> DW_AT_type : <0xf5> + <1><106>: Abbrev Number: 4 (DW_TAG_typedef) + <107> DW_AT_name : (indirect string, offset: 0x100): struct_sysent + <10b> DW_AT_decl_file : 2 + <10c> DW_AT_decl_line : 10 + <10d> DW_AT_type : <0xa2> + <1><111>: Abbrev Number: 5 (DW_TAG_pointer_type) + <112> DW_AT_byte_size : 4 + <113> DW_AT_type : <0x117> + <1><117>: Abbrev Number: 6 (DW_TAG_const_type) + <118> DW_AT_type : <0x106> + <1><11c>: Abbrev Number: 2 (DW_TAG_base_type) + <11d> DW_AT_byte_size : 1 + <11e> DW_AT_encoding : 2 (boolean) + <11f> DW_AT_name : (indirect string, offset: 0x7): _Bool + <1><123>: Abbrev Number: 9 (DW_TAG_structure_type) + <124> DW_AT_name : (indirect string, offset: 0x0): msgbuf + <128> DW_AT_byte_size : 16 + <129> DW_AT_decl_file : 3 + <12a> DW_AT_decl_line : 51 + <12b> DW_AT_sibling : <0x14c> + <2><12f>: Abbrev Number: 10 (DW_TAG_member) + <130> DW_AT_name : (indirect string, offset: 0x1a3): mtype + <134> DW_AT_decl_file : 3 + <135> DW_AT_decl_line : 53 + <136> DW_AT_type : <0x75> + <13a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><13d>: Abbrev Number: 10 (DW_TAG_member) + <13e> DW_AT_name : (indirect string, offset: 0xa3): mtext + <142> DW_AT_decl_file : 3 + <143> DW_AT_decl_line : 54 + <144> DW_AT_type : <0x92> + <148> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><14b>: Abbrev Number: 0 + <1><14c>: Abbrev Number: 4 (DW_TAG_typedef) + <14d> DW_AT_name : (indirect string, offset: 0x165): msgbuf_t + <151> DW_AT_decl_file : 4 + <152> DW_AT_decl_line : 37 + <153> DW_AT_type : <0x123> + <1><157>: Abbrev Number: 14 (DW_TAG_variable) + <158> DW_AT_name : (indirect string, offset: 0xc2): current_wordsize + <15c> DW_AT_decl_file : 5 + <15d> DW_AT_decl_line : 757 + <15f> DW_AT_type : <0x47> + <163> DW_AT_external : 1 + <164> DW_AT_declaration : 1 + <1><165>: Abbrev Number: 14 (DW_TAG_variable) + <166> DW_AT_name : (indirect string, offset: 0xbb): sysent + <16a> DW_AT_decl_file : 5 + <16b> DW_AT_decl_line : 892 + <16d> DW_AT_type : <0x111> + <171> DW_AT_external : 1 + <172> DW_AT_declaration : 1 + <1><173>: Abbrev Number: 14 (DW_TAG_variable) + <174> DW_AT_name : (indirect string, offset: 0x144): nsyscalls + <178> DW_AT_decl_file : 5 + <179> DW_AT_decl_line : 903 + <17b> DW_AT_type : <0x47> + <17f> DW_AT_external : 1 + <180> DW_AT_declaration : 1 + <1><181>: Abbrev Number: 15 (DW_TAG_variable) + <182> DW_AT_name : (indirect string, offset: 0xd9): mpers_target_var + <186> DW_AT_decl_file : 4 + <187> DW_AT_decl_line : 38 + <188> DW_AT_type : <0x14c> + <18c> DW_AT_external : 1 + <18d> DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) + <1><193>: Abbrev Number: 0 + diff --git a/mpers-mx32/msgbuf_t.d2 b/mpers-mx32/msgbuf_t.d2 new file mode 100644 index 000000000..7db9689e7 --- /dev/null +++ b/mpers-mx32/msgbuf_t.d2 @@ -0,0 +1,216 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x197): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x16e): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x157): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x95): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x58): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xf3): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x7e): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x178): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xa9): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xea): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x14e): sizetype +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b2): __syscall_slong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 175 +DW_AT_type : <0x63> +<1><80> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x10e): char +<1><87> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x8d> +<1><8d> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x80> +<1><92> +Abbrev Number: 7 (DW_TAG_array_type) +DW_AT_type : <0x80> +DW_AT_sibling : <0xa2> +<2><9b> +Abbrev Number: 8 (DW_TAG_subrange_type) +DW_AT_type : <0x6e> +DW_AT_upper_bound : 0 +<1> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xbb): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xf5> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd3): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x74): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a9): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0x100> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6b): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 12 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x100> +<2> +Abbrev Number: 13 (DW_TAG_unspecified_parameters) +<1><100> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf5> +<1><106> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x100): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0xa2> +<1><111> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x117> +<1><117> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x106> +<1><11c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x7): _Bool +<1><123> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): msgbuf +DW_AT_byte_size : 16 +DW_AT_decl_file : 3 +DW_AT_decl_line : 51 +DW_AT_sibling : <0x14c> +<2><12f> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a3): mtype +DW_AT_decl_file : 3 +DW_AT_decl_line : 53 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><13d> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa3): mtext +DW_AT_decl_file : 3 +DW_AT_decl_line : 54 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><14c> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x165): msgbuf_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 37 +DW_AT_type : <0x123> +<1><157> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc2): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><165> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xbb): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x111> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><173> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x144): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><181> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd9): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 38 +DW_AT_type : <0x14c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) diff --git a/mpers-mx32/msgbuf_t.h b/mpers-mx32/msgbuf_t.h new file mode 100644 index 000000000..cfd1d12a9 --- /dev/null +++ b/mpers-mx32/msgbuf_t.h @@ -0,0 +1,9 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t mtype; +char mtext[1]; +unsigned char mpers_end_filler_1[7]; +} ATTRIBUTE_PACKED mx32_msgbuf_t; +#define MPERS_mx32_msgbuf_t mx32_msgbuf_t diff --git a/mpers-mx32/msqid_ds_t.c b/mpers-mx32/msqid_ds_t.c new file mode 100644 index 000000000..8e70ecb2b --- /dev/null +++ b/mpers-mx32/msqid_ds_t.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 1993 Ulrich Pegelow + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2003-2006 Roland McGrath + * Copyright (c) 2006-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "ipc_defs.h" + +#ifdef HAVE_SYS_MSG_H +/* The C library generally exports the struct the current kernel expects. */ +# include +typedef struct msqid_ds msqid_ds_t; +#elif defined HAVE_LINUX_MSG_H +/* The linux header might provide the right struct. */ +# include +typedef struct msqid64_ds msqid_ds_t; +#endif + +msqid_ds_t mpers_target_var; diff --git a/mpers-mx32/msqid_ds_t.d1 b/mpers-mx32/msqid_ds_t.d1 new file mode 100644 index 000000000..12ea43adc --- /dev/null +++ b/mpers-mx32/msqid_ds_t.d1 @@ -0,0 +1,356 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x2fd (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x2f): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x200): mpers-mx32/msqid_ds_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x28b): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x27f): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x21e): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1f2): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xd9): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x7a): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x188): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xc2): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x26e): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xf0): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x161): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 4 (DW_TAG_typedef) + <6f> DW_AT_name : (indirect string, offset: 0x2bc): __u_quad_t + <73> DW_AT_decl_file : 1 + <74> DW_AT_decl_line : 56 + <75> DW_AT_type : <0x4e> + <1><79>: Abbrev Number: 4 (DW_TAG_typedef) + <7a> DW_AT_name : (indirect string, offset: 0x27): __uid_t + <7e> DW_AT_decl_file : 1 + <7f> DW_AT_decl_line : 125 + <80> DW_AT_type : <0x47> + <1><84>: Abbrev Number: 4 (DW_TAG_typedef) + <85> DW_AT_name : (indirect string, offset: 0x1d6): __gid_t + <89> DW_AT_decl_file : 1 + <8a> DW_AT_decl_line : 126 + <8b> DW_AT_type : <0x47> + <1><8f>: Abbrev Number: 4 (DW_TAG_typedef) + <90> DW_AT_name : (indirect string, offset: 0x277): __pid_t + <94> DW_AT_decl_file : 1 + <95> DW_AT_decl_line : 133 + <96> DW_AT_type : <0x2b> + <1><9a>: Abbrev Number: 2 (DW_TAG_base_type) + <9b> DW_AT_byte_size : 4 + <9c> DW_AT_encoding : 7 (unsigned) + <9d> DW_AT_name : (indirect string, offset: 0x1de): sizetype + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x12e): __time_t + DW_AT_decl_file : 1 + DW_AT_decl_line : 139 + DW_AT_type : <0x63> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1b7): __key_t + DW_AT_decl_file : 1 + DW_AT_decl_line : 144 + DW_AT_type : <0x2b> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x8d): __syscall_ulong_t + DW_AT_decl_file : 1 + DW_AT_decl_line : 177 + DW_AT_type : <0x6e> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 6 (signed char) + DW_AT_name : (indirect string, offset: 0x1ad): char + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xc2> + <1>: Abbrev Number: 7 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x107): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 2 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x127> + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x148): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb8): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + <101> DW_AT_decl_file : 2 + <102> DW_AT_decl_line : 7 + <103> DW_AT_type : <0x2b> + <107> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><10a>: Abbrev Number: 8 (DW_TAG_member) + <10b> DW_AT_name : (indirect string, offset: 0xe7): sys_func + <10f> DW_AT_decl_file : 2 + <110> DW_AT_decl_line : 8 + <111> DW_AT_type : <0x132> + <115> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><118>: Abbrev Number: 8 (DW_TAG_member) + <119> DW_AT_name : (indirect string, offset: 0xa9): sys_name + <11d> DW_AT_decl_file : 2 + <11e> DW_AT_decl_line : 9 + <11f> DW_AT_type : <0xc9> + <123> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><126>: Abbrev Number: 0 + <1><127>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <128> DW_AT_type : <0x2b> + <12c> DW_AT_sibling : <0x132> + <2><130>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><131>: Abbrev Number: 0 + <1><132>: Abbrev Number: 5 (DW_TAG_pointer_type) + <133> DW_AT_byte_size : 4 + <134> DW_AT_type : <0x127> + <1><138>: Abbrev Number: 4 (DW_TAG_typedef) + <139> DW_AT_name : (indirect string, offset: 0x19f): struct_sysent + <13d> DW_AT_decl_file : 2 + <13e> DW_AT_decl_line : 10 + <13f> DW_AT_type : <0xd4> + <1><143>: Abbrev Number: 5 (DW_TAG_pointer_type) + <144> DW_AT_byte_size : 4 + <145> DW_AT_type : <0x149> + <1><149>: Abbrev Number: 6 (DW_TAG_const_type) + <14a> DW_AT_type : <0x138> + <1><14e>: Abbrev Number: 2 (DW_TAG_base_type) + <14f> DW_AT_byte_size : 1 + <150> DW_AT_encoding : 2 (boolean) + <151> DW_AT_name : (indirect string, offset: 0x1a): _Bool + <1><155>: Abbrev Number: 7 (DW_TAG_structure_type) + <156> DW_AT_name : (indirect string, offset: 0x23a): ipc_perm + <15a> DW_AT_byte_size : 48 + <15b> DW_AT_decl_file : 3 + <15c> DW_AT_decl_line : 42 + <15d> DW_AT_sibling : <0x1fc> + <2><161>: Abbrev Number: 8 (DW_TAG_member) + <162> DW_AT_name : (indirect string, offset: 0x218): __key + <166> DW_AT_decl_file : 3 + <167> DW_AT_decl_line : 44 + <168> DW_AT_type : <0xac> + <16c> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><16f>: Abbrev Number: 9 (DW_TAG_member) + <170> DW_AT_name : uid + <174> DW_AT_decl_file : 3 + <175> DW_AT_decl_line : 45 + <176> DW_AT_type : <0x79> + <17a> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><17d>: Abbrev Number: 9 (DW_TAG_member) + <17e> DW_AT_name : gid + <182> DW_AT_decl_file : 3 + <183> DW_AT_decl_line : 46 + <184> DW_AT_type : <0x84> + <188> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><18b>: Abbrev Number: 8 (DW_TAG_member) + <18c> DW_AT_name : (indirect string, offset: 0x10e): cuid + <190> DW_AT_decl_file : 3 + <191> DW_AT_decl_line : 47 + <192> DW_AT_type : <0x79> + <196> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><199>: Abbrev Number: 8 (DW_TAG_member) + <19a> DW_AT_name : (indirect string, offset: 0x102): cgid + <19e> DW_AT_decl_file : 3 + <19f> DW_AT_decl_line : 48 + <1a0> DW_AT_type : <0x84> + <1a4> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><1a7>: Abbrev Number: 8 (DW_TAG_member) + <1a8> DW_AT_name : (indirect string, offset: 0x1b2): mode + <1ac> DW_AT_decl_file : 3 + <1ad> DW_AT_decl_line : 49 + <1ae> DW_AT_type : <0x40> + <1b2> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><1b5>: Abbrev Number: 8 (DW_TAG_member) + <1b6> DW_AT_name : (indirect string, offset: 0x267): __pad1 + <1ba> DW_AT_decl_file : 3 + <1bb> DW_AT_decl_line : 50 + <1bc> DW_AT_type : <0x40> + <1c0> DW_AT_data_member_location: 2 byte block: 23 16 (DW_OP_plus_uconst: 22) + <2><1c3>: Abbrev Number: 8 (DW_TAG_member) + <1c4> DW_AT_name : (indirect string, offset: 0xb2): __seq + <1c8> DW_AT_decl_file : 3 + <1c9> DW_AT_decl_line : 51 + <1ca> DW_AT_type : <0x40> + <1ce> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1d1>: Abbrev Number: 8 (DW_TAG_member) + <1d2> DW_AT_name : (indirect string, offset: 0x20): __pad2 + <1d6> DW_AT_decl_file : 3 + <1d7> DW_AT_decl_line : 52 + <1d8> DW_AT_type : <0x40> + <1dc> DW_AT_data_member_location: 2 byte block: 23 1a (DW_OP_plus_uconst: 26) + <2><1df>: Abbrev Number: 8 (DW_TAG_member) + <1e0> DW_AT_name : (indirect string, offset: 0x113): __glibc_reserved1 + <1e4> DW_AT_decl_file : 3 + <1e5> DW_AT_decl_line : 53 + <1e6> DW_AT_type : <0xb7> + <1ea> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1ed>: Abbrev Number: 8 (DW_TAG_member) + <1ee> DW_AT_name : (indirect string, offset: 0x228): __glibc_reserved2 + <1f2> DW_AT_decl_file : 3 + <1f3> DW_AT_decl_line : 54 + <1f4> DW_AT_type : <0xb7> + <1f8> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1fb>: Abbrev Number: 0 + <1><1fc>: Abbrev Number: 4 (DW_TAG_typedef) + <1fd> DW_AT_name : (indirect string, offset: 0x175): msgqnum_t + <201> DW_AT_decl_file : 4 + <202> DW_AT_decl_line : 32 + <203> DW_AT_type : <0xb7> + <1><207>: Abbrev Number: 4 (DW_TAG_typedef) + <208> DW_AT_name : (indirect string, offset: 0x17f): msglen_t + <20c> DW_AT_decl_file : 4 + <20d> DW_AT_decl_line : 33 + <20e> DW_AT_type : <0xb7> + <1><212>: Abbrev Number: 7 (DW_TAG_structure_type) + <213> DW_AT_name : (indirect string, offset: 0x0): msqid_ds + <217> DW_AT_byte_size : 120 + <218> DW_AT_decl_file : 4 + <219> DW_AT_decl_line : 37 + <21a> DW_AT_sibling : <0x2b9> + <2><21e>: Abbrev Number: 8 (DW_TAG_member) + <21f> DW_AT_name : (indirect string, offset: 0x125): msg_perm + <223> DW_AT_decl_file : 4 + <224> DW_AT_decl_line : 39 + <225> DW_AT_type : <0x155> + <229> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><22c>: Abbrev Number: 8 (DW_TAG_member) + <22d> DW_AT_name : (indirect string, offset: 0x2c7): msg_stime + <231> DW_AT_decl_file : 4 + <232> DW_AT_decl_line : 40 + <233> DW_AT_type : <0xa1> + <237> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><23a>: Abbrev Number: 8 (DW_TAG_member) + <23b> DW_AT_name : (indirect string, offset: 0x195): msg_rtime + <23f> DW_AT_decl_file : 4 + <240> DW_AT_decl_line : 44 + <241> DW_AT_type : <0xa1> + <245> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><248>: Abbrev Number: 8 (DW_TAG_member) + <249> DW_AT_name : (indirect string, offset: 0x14e): msg_ctime + <24d> DW_AT_decl_file : 4 + <24e> DW_AT_decl_line : 48 + <24f> DW_AT_type : <0xa1> + <253> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><256>: Abbrev Number: 8 (DW_TAG_member) + <257> DW_AT_name : (indirect string, offset: 0x1bf): __msg_cbytes + <25b> DW_AT_decl_file : 4 + <25c> DW_AT_decl_line : 52 + <25d> DW_AT_type : <0xb7> + <261> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><264>: Abbrev Number: 8 (DW_TAG_member) + <265> DW_AT_name : (indirect string, offset: 0x158): msg_qnum + <269> DW_AT_decl_file : 4 + <26a> DW_AT_decl_line : 53 + <26b> DW_AT_type : <0x1fc> + <26f> DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) + <2><272>: Abbrev Number: 8 (DW_TAG_member) + <273> DW_AT_name : (indirect string, offset: 0x16a): msg_qbytes + <277> DW_AT_decl_file : 4 + <278> DW_AT_decl_line : 54 + <279> DW_AT_type : <0x207> + <27d> DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) + <2><280>: Abbrev Number: 8 (DW_TAG_member) + <281> DW_AT_name : (indirect string, offset: 0x9f): msg_lspid + <285> DW_AT_decl_file : 4 + <286> DW_AT_decl_line : 55 + <287> DW_AT_type : <0x8f> + <28b> DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) + <2><28e>: Abbrev Number: 8 (DW_TAG_member) + <28f> DW_AT_name : (indirect string, offset: 0x2d1): msg_lrpid + <293> DW_AT_decl_file : 4 + <294> DW_AT_decl_line : 56 + <295> DW_AT_type : <0x8f> + <299> DW_AT_data_member_location: 2 byte block: 23 64 (DW_OP_plus_uconst: 100) + <2><29c>: Abbrev Number: 8 (DW_TAG_member) + <29d> DW_AT_name : (indirect string, offset: 0x243): __glibc_reserved4 + <2a1> DW_AT_decl_file : 4 + <2a2> DW_AT_decl_line : 57 + <2a3> DW_AT_type : <0xb7> + <2a7> DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) + <2><2aa>: Abbrev Number: 8 (DW_TAG_member) + <2ab> DW_AT_name : (indirect string, offset: 0x255): __glibc_reserved5 + <2af> DW_AT_decl_file : 4 + <2b0> DW_AT_decl_line : 58 + <2b1> DW_AT_type : <0xb7> + <2b5> DW_AT_data_member_location: 2 byte block: 23 70 (DW_OP_plus_uconst: 112) + <2><2b8>: Abbrev Number: 0 + <1><2b9>: Abbrev Number: 4 (DW_TAG_typedef) + <2ba> DW_AT_name : (indirect string, offset: 0x1e7): msqid_ds_t + <2be> DW_AT_decl_file : 5 + <2bf> DW_AT_decl_line : 41 + <2c0> DW_AT_type : <0x212> + <1><2c4>: Abbrev Number: 12 (DW_TAG_variable) + <2c5> DW_AT_name : (indirect string, offset: 0x137): current_wordsize + <2c9> DW_AT_decl_file : 6 + <2ca> DW_AT_decl_line : 757 + <2cc> DW_AT_type : <0x47> + <2d0> DW_AT_external : 1 + <2d1> DW_AT_declaration : 1 + <1><2d2>: Abbrev Number: 12 (DW_TAG_variable) + <2d3> DW_AT_name : (indirect string, offset: 0x107): sysent + <2d7> DW_AT_decl_file : 6 + <2d8> DW_AT_decl_line : 892 + <2da> DW_AT_type : <0x143> + <2de> DW_AT_external : 1 + <2df> DW_AT_declaration : 1 + <1><2e0>: Abbrev Number: 12 (DW_TAG_variable) + <2e1> DW_AT_name : (indirect string, offset: 0x1cc): nsyscalls + <2e5> DW_AT_decl_file : 6 + <2e6> DW_AT_decl_line : 903 + <2e8> DW_AT_type : <0x47> + <2ec> DW_AT_external : 1 + <2ed> DW_AT_declaration : 1 + <1><2ee>: Abbrev Number: 13 (DW_TAG_variable) + <2ef> DW_AT_name : (indirect string, offset: 0x9): mpers_target_var + <2f3> DW_AT_decl_file : 5 + <2f4> DW_AT_decl_line : 48 + <2f5> DW_AT_type : <0x2b9> + <2f9> DW_AT_external : 1 + <2fa> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><300>: Abbrev Number: 0 + diff --git a/mpers-mx32/msqid_ds_t.d2 b/mpers-mx32/msqid_ds_t.d2 new file mode 100644 index 000000000..1855344c7 --- /dev/null +++ b/mpers-mx32/msqid_ds_t.d2 @@ -0,0 +1,403 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x27f): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x21e): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1f2): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xd9): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x7a): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x188): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xc2): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x26e): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xf0): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x161): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2bc): __u_quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 56 +DW_AT_type : <0x4e> +<1><79> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x27): __uid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 125 +DW_AT_type : <0x47> +<1><84> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1d6): __gid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 126 +DW_AT_type : <0x47> +<1><8f> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x277): __pid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 133 +DW_AT_type : <0x2b> +<1><9a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1de): sizetype +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x12e): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x63> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b7): __key_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 144 +DW_AT_type : <0x2b> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x8d): __syscall_ulong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 177 +DW_AT_type : <0x6e> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1ad): char +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xc2> +<1> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x107): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x127> +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x148): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb8): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><10a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe7): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0x132> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><118> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa9): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0xc9> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><127> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x132> +<2><130> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><132> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x127> +<1><138> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x19f): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0xd4> +<1><143> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x149> +<1><149> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x138> +<1><14e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x1a): _Bool +<1><155> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x23a): ipc_perm +DW_AT_byte_size : 48 +DW_AT_decl_file : 3 +DW_AT_decl_line : 42 +DW_AT_sibling : <0x1fc> +<2><161> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x218): __key +DW_AT_decl_file : 3 +DW_AT_decl_line : 44 +DW_AT_type : <0xac> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><16f> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : uid +DW_AT_decl_file : 3 +DW_AT_decl_line : 45 +DW_AT_type : <0x79> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><17d> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : gid +DW_AT_decl_file : 3 +DW_AT_decl_line : 46 +DW_AT_type : <0x84> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><18b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10e): cuid +DW_AT_decl_file : 3 +DW_AT_decl_line : 47 +DW_AT_type : <0x79> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><199> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x102): cgid +DW_AT_decl_file : 3 +DW_AT_decl_line : 48 +DW_AT_type : <0x84> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><1a7> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b2): mode +DW_AT_decl_file : 3 +DW_AT_decl_line : 49 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><1b5> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x267): __pad1 +DW_AT_decl_file : 3 +DW_AT_decl_line : 50 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 16 (DW_OP_plus_uconst: 22) +<2><1c3> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb2): __seq +DW_AT_decl_file : 3 +DW_AT_decl_line : 51 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1d1> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x20): __pad2 +DW_AT_decl_file : 3 +DW_AT_decl_line : 52 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 1a (DW_OP_plus_uconst: 26) +<2><1df> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x113): __glibc_reserved1 +DW_AT_decl_file : 3 +DW_AT_decl_line : 53 +DW_AT_type : <0xb7> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1ed> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x228): __glibc_reserved2 +DW_AT_decl_file : 3 +DW_AT_decl_line : 54 +DW_AT_type : <0xb7> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<1><1fc> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x175): msgqnum_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 32 +DW_AT_type : <0xb7> +<1><207> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x17f): msglen_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 33 +DW_AT_type : <0xb7> +<1><212> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): msqid_ds +DW_AT_byte_size : 120 +DW_AT_decl_file : 4 +DW_AT_decl_line : 37 +DW_AT_sibling : <0x2b9> +<2><21e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x125): msg_perm +DW_AT_decl_file : 4 +DW_AT_decl_line : 39 +DW_AT_type : <0x155> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><22c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c7): msg_stime +DW_AT_decl_file : 4 +DW_AT_decl_line : 40 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><23a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x195): msg_rtime +DW_AT_decl_file : 4 +DW_AT_decl_line : 44 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><248> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14e): msg_ctime +DW_AT_decl_file : 4 +DW_AT_decl_line : 48 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><256> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1bf): __msg_cbytes +DW_AT_decl_file : 4 +DW_AT_decl_line : 52 +DW_AT_type : <0xb7> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><264> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x158): msg_qnum +DW_AT_decl_file : 4 +DW_AT_decl_line : 53 +DW_AT_type : <0x1fc> +DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) +<2><272> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16a): msg_qbytes +DW_AT_decl_file : 4 +DW_AT_decl_line : 54 +DW_AT_type : <0x207> +DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) +<2><280> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9f): msg_lspid +DW_AT_decl_file : 4 +DW_AT_decl_line : 55 +DW_AT_type : <0x8f> +DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) +<2><28e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d1): msg_lrpid +DW_AT_decl_file : 4 +DW_AT_decl_line : 56 +DW_AT_type : <0x8f> +DW_AT_data_member_location: 2 byte block: 23 64 (DW_OP_plus_uconst: 100) +<2><29c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x243): __glibc_reserved4 +DW_AT_decl_file : 4 +DW_AT_decl_line : 57 +DW_AT_type : <0xb7> +DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) +<2><2aa> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x255): __glibc_reserved5 +DW_AT_decl_file : 4 +DW_AT_decl_line : 58 +DW_AT_type : <0xb7> +DW_AT_data_member_location: 2 byte block: 23 70 (DW_OP_plus_uconst: 112) +<1><2b9> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1e7): msqid_ds_t +DW_AT_decl_file : 5 +DW_AT_decl_line : 41 +DW_AT_type : <0x212> +<1><2c4> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x137): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2d2> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x107): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x143> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2e0> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1cc): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2ee> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x9): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 48 +DW_AT_type : <0x2b9> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/msqid_ds_t.h b/mpers-mx32/msqid_ds_t.h new file mode 100644 index 000000000..6bbd2759c --- /dev/null +++ b/mpers-mx32/msqid_ds_t.h @@ -0,0 +1,30 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +struct { +int32_t __key; +uint32_t uid; +uint32_t gid; +uint32_t cuid; +uint32_t cgid; +uint16_t mode; +uint16_t __pad1; +uint16_t __seq; +uint16_t __pad2; +unsigned char mpers_filler_1[4]; +uint64_t __glibc_reserved1; +uint64_t __glibc_reserved2; +} ATTRIBUTE_PACKED msg_perm; +int64_t msg_stime; +int64_t msg_rtime; +int64_t msg_ctime; +uint64_t __msg_cbytes; +uint64_t msg_qnum; +uint64_t msg_qbytes; +int32_t msg_lspid; +int32_t msg_lrpid; +uint64_t __glibc_reserved4; +uint64_t __glibc_reserved5; +} ATTRIBUTE_PACKED mx32_msqid_ds_t; +#define MPERS_mx32_msqid_ds_t mx32_msqid_ds_t diff --git a/mpers-mx32/rusage_t.c b/mpers-mx32/rusage_t.c new file mode 100644 index 000000000..f69a7ee9c --- /dev/null +++ b/mpers-mx32/rusage_t.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include + + +typedef struct rusage rusage_t; + +rusage_t mpers_target_var; diff --git a/mpers-mx32/rusage_t.d1 b/mpers-mx32/rusage_t.d1 new file mode 100644 index 000000000..cc73bf74a --- /dev/null +++ b/mpers-mx32/rusage_t.d1 @@ -0,0 +1,484 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x3ef (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xc3): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x16d): mpers-mx32/rusage_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x33f): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1a8): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x5e): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x129): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x194): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x204): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1e3): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x1c5): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x137): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x288): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x0): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x78): sizetype + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x2bc): __time_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 139 + <7c> DW_AT_type : <0x63> + <1><80>: Abbrev Number: 4 (DW_TAG_typedef) + <81> DW_AT_name : (indirect string, offset: 0x327): __suseconds_t + <85> DW_AT_decl_file : 1 + <86> DW_AT_decl_line : 141 + <87> DW_AT_type : <0x63> + <1><8b>: Abbrev Number: 4 (DW_TAG_typedef) + <8c> DW_AT_name : (indirect string, offset: 0x9e): __syscall_slong_t + <90> DW_AT_decl_file : 1 + <91> DW_AT_decl_line : 175 + <92> DW_AT_type : <0x63> + <1><96>: Abbrev Number: 2 (DW_TAG_base_type) + <97> DW_AT_byte_size : 1 + <98> DW_AT_encoding : 6 (signed char) + <99> DW_AT_name : (indirect string, offset: 0x230): char + <1><9d>: Abbrev Number: 5 (DW_TAG_structure_type) + <9e> DW_AT_name : (indirect string, offset: 0x2c5): timeval + DW_AT_byte_size : 16 + DW_AT_decl_file : 2 + DW_AT_decl_line : 30 + DW_AT_sibling : <0xc6> + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x3e): tv_sec + DW_AT_decl_file : 2 + DW_AT_decl_line : 32 + DW_AT_type : <0x75> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x2eb): tv_usec + DW_AT_decl_file : 2 + DW_AT_decl_line : 33 + DW_AT_type : <0x80> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcc> + <1>: Abbrev Number: 8 (DW_TAG_const_type) + DW_AT_type : <0x96> + <1>: Abbrev Number: 5 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x317): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x124> + <2>
: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1a2): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1f0): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + <100> DW_AT_type : <0x2b> + <104> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><107>: Abbrev Number: 6 (DW_TAG_member) + <108> DW_AT_name : (indirect string, offset: 0x9): sys_func + <10c> DW_AT_decl_file : 3 + <10d> DW_AT_decl_line : 8 + <10e> DW_AT_type : <0x12f> + <112> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><115>: Abbrev Number: 6 (DW_TAG_member) + <116> DW_AT_name : (indirect string, offset: 0x95): sys_name + <11a> DW_AT_decl_file : 3 + <11b> DW_AT_decl_line : 9 + <11c> DW_AT_type : <0xc6> + <120> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><123>: Abbrev Number: 0 + <1><124>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <125> DW_AT_type : <0x2b> + <129> DW_AT_sibling : <0x12f> + <2><12d>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><12e>: Abbrev Number: 0 + <1><12f>: Abbrev Number: 7 (DW_TAG_pointer_type) + <130> DW_AT_byte_size : 4 + <131> DW_AT_type : <0x124> + <1><135>: Abbrev Number: 4 (DW_TAG_typedef) + <136> DW_AT_name : (indirect string, offset: 0x2dd): struct_sysent + <13a> DW_AT_decl_file : 3 + <13b> DW_AT_decl_line : 10 + <13c> DW_AT_type : <0xd1> + <1><140>: Abbrev Number: 7 (DW_TAG_pointer_type) + <141> DW_AT_byte_size : 4 + <142> DW_AT_type : <0x146> + <1><146>: Abbrev Number: 8 (DW_TAG_const_type) + <147> DW_AT_type : <0x135> + <1><14b>: Abbrev Number: 2 (DW_TAG_base_type) + <14c> DW_AT_byte_size : 1 + <14d> DW_AT_encoding : 2 (boolean) + <14e> DW_AT_name : (indirect string, offset: 0x235): _Bool + <1><152>: Abbrev Number: 12 (DW_TAG_union_type) + <153> DW_AT_byte_size : 8 + <154> DW_AT_decl_file : 4 + <155> DW_AT_decl_line : 194 + <156> DW_AT_sibling : <0x171> + <2><15a>: Abbrev Number: 13 (DW_TAG_member) + <15b> DW_AT_name : (indirect string, offset: 0x10e): ru_maxrss + <15f> DW_AT_decl_file : 4 + <160> DW_AT_decl_line : 196 + <161> DW_AT_type : <0x55> + <2><165>: Abbrev Number: 13 (DW_TAG_member) + <166> DW_AT_name : (indirect string, offset: 0x151): __ru_maxrss_word + <16a> DW_AT_decl_file : 4 + <16b> DW_AT_decl_line : 197 + <16c> DW_AT_type : <0x8b> + <2><170>: Abbrev Number: 0 + <1><171>: Abbrev Number: 12 (DW_TAG_union_type) + <172> DW_AT_byte_size : 8 + <173> DW_AT_decl_file : 4 + <174> DW_AT_decl_line : 202 + <175> DW_AT_sibling : <0x190> + <2><179>: Abbrev Number: 13 (DW_TAG_member) + <17a> DW_AT_name : (indirect string, offset: 0x35): ru_ixrss + <17e> DW_AT_decl_file : 4 + <17f> DW_AT_decl_line : 204 + <180> DW_AT_type : <0x55> + <2><184>: Abbrev Number: 13 (DW_TAG_member) + <185> DW_AT_name : (indirect string, offset: 0x2cd): __ru_ixrss_word + <189> DW_AT_decl_file : 4 + <18a> DW_AT_decl_line : 205 + <18b> DW_AT_type : <0x8b> + <2><18f>: Abbrev Number: 0 + <1><190>: Abbrev Number: 12 (DW_TAG_union_type) + <191> DW_AT_byte_size : 8 + <192> DW_AT_decl_file : 4 + <193> DW_AT_decl_line : 208 + <194> DW_AT_sibling : <0x1af> + <2><198>: Abbrev Number: 13 (DW_TAG_member) + <199> DW_AT_name : (indirect string, offset: 0x55): ru_idrss + <19d> DW_AT_decl_file : 4 + <19e> DW_AT_decl_line : 210 + <19f> DW_AT_type : <0x55> + <2><1a3>: Abbrev Number: 13 (DW_TAG_member) + <1a4> DW_AT_name : (indirect string, offset: 0x45): __ru_idrss_word + <1a8> DW_AT_decl_file : 4 + <1a9> DW_AT_decl_line : 211 + <1aa> DW_AT_type : <0x8b> + <2><1ae>: Abbrev Number: 0 + <1><1af>: Abbrev Number: 12 (DW_TAG_union_type) + <1b0> DW_AT_byte_size : 8 + <1b1> DW_AT_decl_file : 4 + <1b2> DW_AT_decl_line : 214 + <1b3> DW_AT_sibling : <0x1ce> + <2><1b7>: Abbrev Number: 13 (DW_TAG_member) + <1b8> DW_AT_name : (indirect string, offset: 0xba): ru_isrss + <1bc> DW_AT_decl_file : 4 + <1bd> DW_AT_decl_line : 216 + <1be> DW_AT_type : <0x55> + <2><1c2>: Abbrev Number: 13 (DW_TAG_member) + <1c3> DW_AT_name : (indirect string, offset: 0x220): __ru_isrss_word + <1c7> DW_AT_decl_file : 4 + <1c8> DW_AT_decl_line : 217 + <1c9> DW_AT_type : <0x8b> + <2><1cd>: Abbrev Number: 0 + <1><1ce>: Abbrev Number: 12 (DW_TAG_union_type) + <1cf> DW_AT_byte_size : 8 + <1d0> DW_AT_decl_file : 4 + <1d1> DW_AT_decl_line : 221 + <1d2> DW_AT_sibling : <0x1ed> + <2><1d6>: Abbrev Number: 13 (DW_TAG_member) + <1d7> DW_AT_name : (indirect string, offset: 0x12): ru_minflt + <1db> DW_AT_decl_file : 4 + <1dc> DW_AT_decl_line : 223 + <1dd> DW_AT_type : <0x55> + <2><1e1>: Abbrev Number: 13 (DW_TAG_member) + <1e2> DW_AT_name : (indirect string, offset: 0x118): __ru_minflt_word + <1e6> DW_AT_decl_file : 4 + <1e7> DW_AT_decl_line : 224 + <1e8> DW_AT_type : <0x8b> + <2><1ec>: Abbrev Number: 0 + <1><1ed>: Abbrev Number: 12 (DW_TAG_union_type) + <1ee> DW_AT_byte_size : 8 + <1ef> DW_AT_decl_file : 4 + <1f0> DW_AT_decl_line : 227 + <1f1> DW_AT_sibling : <0x20c> + <2><1f5>: Abbrev Number: 13 (DW_TAG_member) + <1f6> DW_AT_name : (indirect string, offset: 0xb0): ru_majflt + <1fa> DW_AT_decl_file : 4 + <1fb> DW_AT_decl_line : 229 + <1fc> DW_AT_type : <0x55> + <2><200>: Abbrev Number: 13 (DW_TAG_member) + <201> DW_AT_name : (indirect string, offset: 0x183): __ru_majflt_word + <205> DW_AT_decl_file : 4 + <206> DW_AT_decl_line : 230 + <207> DW_AT_type : <0x8b> + <2><20b>: Abbrev Number: 0 + <1><20c>: Abbrev Number: 12 (DW_TAG_union_type) + <20d> DW_AT_byte_size : 8 + <20e> DW_AT_decl_file : 4 + <20f> DW_AT_decl_line : 233 + <210> DW_AT_sibling : <0x22b> + <2><214>: Abbrev Number: 13 (DW_TAG_member) + <215> DW_AT_name : (indirect string, offset: 0x81): ru_nswap + <219> DW_AT_decl_file : 4 + <21a> DW_AT_decl_line : 235 + <21b> DW_AT_type : <0x55> + <2><21f>: Abbrev Number: 13 (DW_TAG_member) + <220> DW_AT_name : (indirect string, offset: 0x68): __ru_nswap_word + <224> DW_AT_decl_file : 4 + <225> DW_AT_decl_line : 236 + <226> DW_AT_type : <0x8b> + <2><22a>: Abbrev Number: 0 + <1><22b>: Abbrev Number: 12 (DW_TAG_union_type) + <22c> DW_AT_byte_size : 8 + <22d> DW_AT_decl_file : 4 + <22e> DW_AT_decl_line : 240 + <22f> DW_AT_sibling : <0x24a> + <2><233>: Abbrev Number: 13 (DW_TAG_member) + <234> DW_AT_name : (indirect string, offset: 0x162): ru_inblock + <238> DW_AT_decl_file : 4 + <239> DW_AT_decl_line : 242 + <23a> DW_AT_type : <0x55> + <2><23e>: Abbrev Number: 13 (DW_TAG_member) + <23f> DW_AT_name : (indirect string, offset: 0x251): __ru_inblock_word + <243> DW_AT_decl_file : 4 + <244> DW_AT_decl_line : 243 + <245> DW_AT_type : <0x8b> + <2><249>: Abbrev Number: 0 + <1><24a>: Abbrev Number: 12 (DW_TAG_union_type) + <24b> DW_AT_byte_size : 8 + <24c> DW_AT_decl_file : 4 + <24d> DW_AT_decl_line : 246 + <24e> DW_AT_sibling : <0x269> + <2><252>: Abbrev Number: 13 (DW_TAG_member) + <253> DW_AT_name : (indirect string, offset: 0x8a): ru_oublock + <257> DW_AT_decl_file : 4 + <258> DW_AT_decl_line : 248 + <259> DW_AT_type : <0x55> + <2><25d>: Abbrev Number: 13 (DW_TAG_member) + <25e> DW_AT_name : (indirect string, offset: 0x276): __ru_oublock_word + <262> DW_AT_decl_file : 4 + <263> DW_AT_decl_line : 249 + <264> DW_AT_type : <0x8b> + <2><268>: Abbrev Number: 0 + <1><269>: Abbrev Number: 12 (DW_TAG_union_type) + <26a> DW_AT_byte_size : 8 + <26b> DW_AT_decl_file : 4 + <26c> DW_AT_decl_line : 252 + <26d> DW_AT_sibling : <0x288> + <2><271>: Abbrev Number: 13 (DW_TAG_member) + <272> DW_AT_name : (indirect string, offset: 0x23b): ru_msgsnd + <276> DW_AT_decl_file : 4 + <277> DW_AT_decl_line : 254 + <278> DW_AT_type : <0x55> + <2><27c>: Abbrev Number: 13 (DW_TAG_member) + <27d> DW_AT_name : (indirect string, offset: 0x29a): __ru_msgsnd_word + <281> DW_AT_decl_file : 4 + <282> DW_AT_decl_line : 255 + <283> DW_AT_type : <0x8b> + <2><287>: Abbrev Number: 0 + <1><288>: Abbrev Number: 14 (DW_TAG_union_type) + <289> DW_AT_byte_size : 8 + <28a> DW_AT_decl_file : 4 + <28b> DW_AT_decl_line : 258 + <28d> DW_AT_sibling : <0x2aa> + <2><291>: Abbrev Number: 15 (DW_TAG_member) + <292> DW_AT_name : (indirect string, offset: 0x335): ru_msgrcv + <296> DW_AT_decl_file : 4 + <297> DW_AT_decl_line : 260 + <299> DW_AT_type : <0x55> + <2><29d>: Abbrev Number: 15 (DW_TAG_member) + <29e> DW_AT_name : (indirect string, offset: 0x2f3): __ru_msgrcv_word + <2a2> DW_AT_decl_file : 4 + <2a3> DW_AT_decl_line : 261 + <2a5> DW_AT_type : <0x8b> + <2><2a9>: Abbrev Number: 0 + <1><2aa>: Abbrev Number: 14 (DW_TAG_union_type) + <2ab> DW_AT_byte_size : 8 + <2ac> DW_AT_decl_file : 4 + <2ad> DW_AT_decl_line : 264 + <2af> DW_AT_sibling : <0x2cc> + <2><2b3>: Abbrev Number: 15 (DW_TAG_member) + <2b4> DW_AT_name : (indirect string, offset: 0x245): ru_nsignals + <2b8> DW_AT_decl_file : 4 + <2b9> DW_AT_decl_line : 266 + <2bb> DW_AT_type : <0x55> + <2><2bf>: Abbrev Number: 15 (DW_TAG_member) + <2c0> DW_AT_name : (indirect string, offset: 0x263): __ru_nsignals_word + <2c4> DW_AT_decl_file : 4 + <2c5> DW_AT_decl_line : 267 + <2c7> DW_AT_type : <0x8b> + <2><2cb>: Abbrev Number: 0 + <1><2cc>: Abbrev Number: 14 (DW_TAG_union_type) + <2cd> DW_AT_byte_size : 8 + <2ce> DW_AT_decl_file : 4 + <2cf> DW_AT_decl_line : 272 + <2d1> DW_AT_sibling : <0x2ee> + <2><2d5>: Abbrev Number: 15 (DW_TAG_member) + <2d6> DW_AT_name : (indirect string, offset: 0x1c): ru_nvcsw + <2da> DW_AT_decl_file : 4 + <2db> DW_AT_decl_line : 274 + <2dd> DW_AT_type : <0x55> + <2><2e1>: Abbrev Number: 15 (DW_TAG_member) + <2e2> DW_AT_name : (indirect string, offset: 0x25): __ru_nvcsw_word + <2e6> DW_AT_decl_file : 4 + <2e7> DW_AT_decl_line : 275 + <2e9> DW_AT_type : <0x8b> + <2><2ed>: Abbrev Number: 0 + <1><2ee>: Abbrev Number: 14 (DW_TAG_union_type) + <2ef> DW_AT_byte_size : 8 + <2f0> DW_AT_decl_file : 4 + <2f1> DW_AT_decl_line : 279 + <2f3> DW_AT_sibling : <0x310> + <2><2f7>: Abbrev Number: 15 (DW_TAG_member) + <2f8> DW_AT_name : (indirect string, offset: 0x304): ru_nivcsw + <2fc> DW_AT_decl_file : 4 + <2fd> DW_AT_decl_line : 281 + <2ff> DW_AT_type : <0x55> + <2><303>: Abbrev Number: 15 (DW_TAG_member) + <304> DW_AT_name : (indirect string, offset: 0x2ab): __ru_nivcsw_word + <308> DW_AT_decl_file : 4 + <309> DW_AT_decl_line : 282 + <30b> DW_AT_type : <0x8b> + <2><30f>: Abbrev Number: 0 + <1><310>: Abbrev Number: 5 (DW_TAG_structure_type) + <311> DW_AT_name : (indirect string, offset: 0x1dc): rusage + <315> DW_AT_byte_size : 144 + <316> DW_AT_decl_file : 4 + <317> DW_AT_decl_line : 187 + <318> DW_AT_sibling : <0x3ab> + <2><31c>: Abbrev Number: 6 (DW_TAG_member) + <31d> DW_AT_name : (indirect string, offset: 0x217): ru_utime + <321> DW_AT_decl_file : 4 + <322> DW_AT_decl_line : 190 + <323> DW_AT_type : <0x9d> + <327> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><32a>: Abbrev Number: 6 (DW_TAG_member) + <32b> DW_AT_name : (indirect string, offset: 0x31e): ru_stime + <32f> DW_AT_decl_file : 4 + <330> DW_AT_decl_line : 192 + <331> DW_AT_type : <0x9d> + <335> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><338>: Abbrev Number: 16 (DW_TAG_member) + <339> DW_AT_type : <0x152> + <33d> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><340>: Abbrev Number: 16 (DW_TAG_member) + <341> DW_AT_type : <0x171> + <345> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><348>: Abbrev Number: 16 (DW_TAG_member) + <349> DW_AT_type : <0x190> + <34d> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><350>: Abbrev Number: 16 (DW_TAG_member) + <351> DW_AT_type : <0x1af> + <355> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><358>: Abbrev Number: 16 (DW_TAG_member) + <359> DW_AT_type : <0x1ce> + <35d> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><360>: Abbrev Number: 16 (DW_TAG_member) + <361> DW_AT_type : <0x1ed> + <365> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><368>: Abbrev Number: 16 (DW_TAG_member) + <369> DW_AT_type : <0x20c> + <36d> DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) + <2><370>: Abbrev Number: 16 (DW_TAG_member) + <371> DW_AT_type : <0x22b> + <375> DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) + <2><378>: Abbrev Number: 16 (DW_TAG_member) + <379> DW_AT_type : <0x24a> + <37d> DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) + <2><380>: Abbrev Number: 16 (DW_TAG_member) + <381> DW_AT_type : <0x269> + <385> DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) + <2><388>: Abbrev Number: 16 (DW_TAG_member) + <389> DW_AT_type : <0x288> + <38d> DW_AT_data_member_location: 2 byte block: 23 70 (DW_OP_plus_uconst: 112) + <2><390>: Abbrev Number: 16 (DW_TAG_member) + <391> DW_AT_type : <0x2aa> + <395> DW_AT_data_member_location: 2 byte block: 23 78 (DW_OP_plus_uconst: 120) + <2><398>: Abbrev Number: 16 (DW_TAG_member) + <399> DW_AT_type : <0x2cc> + <39d> DW_AT_data_member_location: 3 byte block: 23 80 1 (DW_OP_plus_uconst: 128) + <2><3a1>: Abbrev Number: 16 (DW_TAG_member) + <3a2> DW_AT_type : <0x2ee> + <3a6> DW_AT_data_member_location: 3 byte block: 23 88 1 (DW_OP_plus_uconst: 136) + <2><3aa>: Abbrev Number: 0 + <1><3ab>: Abbrev Number: 4 (DW_TAG_typedef) + <3ac> DW_AT_name : (indirect string, offset: 0x30e): rusage_t + <3b0> DW_AT_decl_file : 5 + <3b1> DW_AT_decl_line : 35 + <3b2> DW_AT_type : <0x310> + <1><3b6>: Abbrev Number: 17 (DW_TAG_variable) + <3b7> DW_AT_name : (indirect string, offset: 0x1b4): current_wordsize + <3bb> DW_AT_decl_file : 6 + <3bc> DW_AT_decl_line : 757 + <3be> DW_AT_type : <0x47> + <3c2> DW_AT_external : 1 + <3c3> DW_AT_declaration : 1 + <1><3c4>: Abbrev Number: 17 (DW_TAG_variable) + <3c5> DW_AT_name : (indirect string, offset: 0x317): sysent + <3c9> DW_AT_decl_file : 6 + <3ca> DW_AT_decl_line : 892 + <3cc> DW_AT_type : <0x140> + <3d0> DW_AT_external : 1 + <3d1> DW_AT_declaration : 1 + <1><3d2>: Abbrev Number: 17 (DW_TAG_variable) + <3d3> DW_AT_name : (indirect string, offset: 0x1fa): nsyscalls + <3d7> DW_AT_decl_file : 6 + <3d8> DW_AT_decl_line : 903 + <3da> DW_AT_type : <0x47> + <3de> DW_AT_external : 1 + <3df> DW_AT_declaration : 1 + <1><3e0>: Abbrev Number: 18 (DW_TAG_variable) + <3e1> DW_AT_name : (indirect string, offset: 0x140): mpers_target_var + <3e5> DW_AT_decl_file : 5 + <3e6> DW_AT_decl_line : 37 + <3e7> DW_AT_type : <0x3ab> + <3eb> DW_AT_external : 1 + <3ec> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><3f2>: Abbrev Number: 0 + diff --git a/mpers-mx32/rusage_t.d2 b/mpers-mx32/rusage_t.d2 new file mode 100644 index 000000000..801e8927a --- /dev/null +++ b/mpers-mx32/rusage_t.d2 @@ -0,0 +1,549 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1a8): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x5e): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x129): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x194): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x204): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1e3): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c5): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x137): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x288): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x78): sizetype +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2bc): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x63> +<1><80> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x327): __suseconds_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 141 +DW_AT_type : <0x63> +<1><8b> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x9e): __syscall_slong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 175 +DW_AT_type : <0x63> +<1><96> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x230): char +<1><9d> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x2c5): timeval +DW_AT_byte_size : 16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_sibling : <0xc6> +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3e): tv_sec +DW_AT_decl_file : 2 +DW_AT_decl_line : 32 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2eb): tv_usec +DW_AT_decl_file : 2 +DW_AT_decl_line : 33 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcc> +<1> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x96> +<1> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x317): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x124> +<2>
+Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a2): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f0): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><107> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><115> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x95): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0xc6> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><124> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x12f> +<2><12d> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><12f> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x124> +<1><135> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2dd): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xd1> +<1><140> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x146> +<1><146> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x135> +<1><14b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x235): _Bool +<1><152> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 194 +DW_AT_sibling : <0x171> +<2><15a> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10e): ru_maxrss +DW_AT_decl_file : 4 +DW_AT_decl_line : 196 +DW_AT_type : <0x55> +<2><165> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x151): __ru_maxrss_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 197 +DW_AT_type : <0x8b> +<1><171> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 202 +DW_AT_sibling : <0x190> +<2><179> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x35): ru_ixrss +DW_AT_decl_file : 4 +DW_AT_decl_line : 204 +DW_AT_type : <0x55> +<2><184> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2cd): __ru_ixrss_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 205 +DW_AT_type : <0x8b> +<1><190> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 208 +DW_AT_sibling : <0x1af> +<2><198> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x55): ru_idrss +DW_AT_decl_file : 4 +DW_AT_decl_line : 210 +DW_AT_type : <0x55> +<2><1a3> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x45): __ru_idrss_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 211 +DW_AT_type : <0x8b> +<1><1af> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 214 +DW_AT_sibling : <0x1ce> +<2><1b7> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xba): ru_isrss +DW_AT_decl_file : 4 +DW_AT_decl_line : 216 +DW_AT_type : <0x55> +<2><1c2> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x220): __ru_isrss_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 217 +DW_AT_type : <0x8b> +<1><1ce> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 221 +DW_AT_sibling : <0x1ed> +<2><1d6> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x12): ru_minflt +DW_AT_decl_file : 4 +DW_AT_decl_line : 223 +DW_AT_type : <0x55> +<2><1e1> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x118): __ru_minflt_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 224 +DW_AT_type : <0x8b> +<1><1ed> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 227 +DW_AT_sibling : <0x20c> +<2><1f5> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb0): ru_majflt +DW_AT_decl_file : 4 +DW_AT_decl_line : 229 +DW_AT_type : <0x55> +<2><200> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x183): __ru_majflt_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 230 +DW_AT_type : <0x8b> +<1><20c> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 233 +DW_AT_sibling : <0x22b> +<2><214> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x81): ru_nswap +DW_AT_decl_file : 4 +DW_AT_decl_line : 235 +DW_AT_type : <0x55> +<2><21f> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x68): __ru_nswap_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 236 +DW_AT_type : <0x8b> +<1><22b> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 240 +DW_AT_sibling : <0x24a> +<2><233> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x162): ru_inblock +DW_AT_decl_file : 4 +DW_AT_decl_line : 242 +DW_AT_type : <0x55> +<2><23e> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x251): __ru_inblock_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 243 +DW_AT_type : <0x8b> +<1><24a> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 246 +DW_AT_sibling : <0x269> +<2><252> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8a): ru_oublock +DW_AT_decl_file : 4 +DW_AT_decl_line : 248 +DW_AT_type : <0x55> +<2><25d> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x276): __ru_oublock_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 249 +DW_AT_type : <0x8b> +<1><269> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 252 +DW_AT_sibling : <0x288> +<2><271> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23b): ru_msgsnd +DW_AT_decl_file : 4 +DW_AT_decl_line : 254 +DW_AT_type : <0x55> +<2><27c> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x29a): __ru_msgsnd_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 255 +DW_AT_type : <0x8b> +<1><288> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 258 +DW_AT_sibling : <0x2aa> +<2><291> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x335): ru_msgrcv +DW_AT_decl_file : 4 +DW_AT_decl_line : 260 +DW_AT_type : <0x55> +<2><29d> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2f3): __ru_msgrcv_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 261 +DW_AT_type : <0x8b> +<1><2aa> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 264 +DW_AT_sibling : <0x2cc> +<2><2b3> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x245): ru_nsignals +DW_AT_decl_file : 4 +DW_AT_decl_line : 266 +DW_AT_type : <0x55> +<2><2bf> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x263): __ru_nsignals_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 267 +DW_AT_type : <0x8b> +<1><2cc> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 272 +DW_AT_sibling : <0x2ee> +<2><2d5> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c): ru_nvcsw +DW_AT_decl_file : 4 +DW_AT_decl_line : 274 +DW_AT_type : <0x55> +<2><2e1> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x25): __ru_nvcsw_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 275 +DW_AT_type : <0x8b> +<1><2ee> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 279 +DW_AT_sibling : <0x310> +<2><2f7> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x304): ru_nivcsw +DW_AT_decl_file : 4 +DW_AT_decl_line : 281 +DW_AT_type : <0x55> +<2><303> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2ab): __ru_nivcsw_word +DW_AT_decl_file : 4 +DW_AT_decl_line : 282 +DW_AT_type : <0x8b> +<1><310> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1dc): rusage +DW_AT_byte_size : 144 +DW_AT_decl_file : 4 +DW_AT_decl_line : 187 +DW_AT_sibling : <0x3ab> +<2><31c> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x217): ru_utime +DW_AT_decl_file : 4 +DW_AT_decl_line : 190 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><32a> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x31e): ru_stime +DW_AT_decl_file : 4 +DW_AT_decl_line : 192 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><338> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x152> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><340> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x171> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><348> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x190> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><350> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x1af> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><358> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x1ce> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><360> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x1ed> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><368> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x20c> +DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) +<2><370> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x22b> +DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) +<2><378> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x24a> +DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) +<2><380> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x269> +DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) +<2><388> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x288> +DW_AT_data_member_location: 2 byte block: 23 70 (DW_OP_plus_uconst: 112) +<2><390> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x2aa> +DW_AT_data_member_location: 2 byte block: 23 78 (DW_OP_plus_uconst: 120) +<2><398> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x2cc> +DW_AT_data_member_location: 3 byte block: 23 80 1 (DW_OP_plus_uconst: 128) +<2><3a1> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x2ee> +DW_AT_data_member_location: 3 byte block: 23 88 1 (DW_OP_plus_uconst: 136) +<1><3ab> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x30e): rusage_t +DW_AT_decl_file : 5 +DW_AT_decl_line : 35 +DW_AT_type : <0x310> +<1><3b6> +Abbrev Number: 17 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1b4): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3c4> +Abbrev Number: 17 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x317): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x140> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3d2> +Abbrev Number: 17 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1fa): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3e0> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x140): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 37 +DW_AT_type : <0x3ab> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/rusage_t.h b/mpers-mx32/rusage_t.h new file mode 100644 index 000000000..dd261ed35 --- /dev/null +++ b/mpers-mx32/rusage_t.h @@ -0,0 +1,70 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +struct { +int64_t tv_sec; +int64_t tv_usec; +} ATTRIBUTE_PACKED ru_utime; +struct { +int64_t tv_sec; +int64_t tv_usec; +} ATTRIBUTE_PACKED ru_stime; +union { +int32_t ru_maxrss; +int64_t __ru_maxrss_word; +} ; +union { +int32_t ru_ixrss; +int64_t __ru_ixrss_word; +} ; +union { +int32_t ru_idrss; +int64_t __ru_idrss_word; +} ; +union { +int32_t ru_isrss; +int64_t __ru_isrss_word; +} ; +union { +int32_t ru_minflt; +int64_t __ru_minflt_word; +} ; +union { +int32_t ru_majflt; +int64_t __ru_majflt_word; +} ; +union { +int32_t ru_nswap; +int64_t __ru_nswap_word; +} ; +union { +int32_t ru_inblock; +int64_t __ru_inblock_word; +} ; +union { +int32_t ru_oublock; +int64_t __ru_oublock_word; +} ; +union { +int32_t ru_msgsnd; +int64_t __ru_msgsnd_word; +} ; +union { +int32_t ru_msgrcv; +int64_t __ru_msgrcv_word; +} ; +union { +int32_t ru_nsignals; +int64_t __ru_nsignals_word; +} ; +union { +int32_t ru_nvcsw; +int64_t __ru_nvcsw_word; +} ; +union { +int32_t ru_nivcsw; +int64_t __ru_nivcsw_word; +} ; +} ATTRIBUTE_PACKED mx32_rusage_t; +#define MPERS_mx32_rusage_t mx32_rusage_t diff --git a/mpers-mx32/sample.c b/mpers-mx32/sample.c new file mode 100644 index 000000000..4c65608a3 --- /dev/null +++ b/mpers-mx32/sample.c @@ -0,0 +1,38 @@ +#include "mpers_type.h" +#include DEF_MPERS_TYPE(sample_struct) +typedef struct { + struct { + void *p; + char sc; + /* unsigned char mpers_filler_1[1]; */ + short ss; + unsigned char uc; + /* unsigned char mpers_filler_2[3]; */ + int si; + unsigned ui; + long sl; + unsigned short us; + /* unsigned char mpers_filler_3[6]; */ + long long sll __attribute__((__aligned__(8))); + unsigned long long ull; + unsigned long ul; + long asl[3]; + char f; + /* unsigned char mpers_end_filler_4[7]; */ + } s; + union { + long long sll; + unsigned long long ull; + void *p; + long sl; + unsigned long ul; + int si; + unsigned ui; + short ss; + unsigned short us; + char sc; + unsigned char uc; + } u[3]; + short f[0]; +} sample_struct; +#include MPERS_DEFS diff --git a/mpers-mx32/sample.expected b/mpers-mx32/sample.expected new file mode 100644 index 000000000..557ab6902 --- /dev/null +++ b/mpers-mx32/sample.expected @@ -0,0 +1,39 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +struct { +mpers_ptr_t p; +char sc; +unsigned char mpers_filler_1[1]; +int16_t ss; +unsigned char uc; +unsigned char mpers_filler_2[3]; +int32_t si; +uint32_t ui; +int32_t sl; +uint16_t us; +unsigned char mpers_filler_3[6]; +int64_t sll; +uint64_t ull; +uint32_t ul; +int32_t asl[3]; +char f; +unsigned char mpers_end_filler_4[7]; +} ATTRIBUTE_PACKED s; +union { +int64_t sll; +uint64_t ull; +mpers_ptr_t p; +int32_t sl; +uint32_t ul; +int32_t si; +uint32_t ui; +int16_t ss; +uint16_t us; +char sc; +unsigned char uc; +} u[3]; +int16_t f[0]; +} ATTRIBUTE_PACKED mx32_sample_struct; +#define MPERS_mx32_sample_struct mx32_sample_struct diff --git a/mpers-mx32/sample_struct.c b/mpers-mx32/sample_struct.c new file mode 100644 index 000000000..6ebddcc9e --- /dev/null +++ b/mpers-mx32/sample_struct.c @@ -0,0 +1,37 @@ +#include "mpers_type.h" +typedef struct { + struct { + void *p; + char sc; + /* unsigned char mpers_filler_1[1]; */ + short ss; + unsigned char uc; + /* unsigned char mpers_filler_2[3]; */ + int si; + unsigned ui; + long sl; + unsigned short us; + /* unsigned char mpers_filler_3[6]; */ + long long sll __attribute__((__aligned__(8))); + unsigned long long ull; + unsigned long ul; + long asl[3]; + char f; + /* unsigned char mpers_end_filler_4[7]; */ + } s; + union { + long long sll; + unsigned long long ull; + void *p; + long sl; + unsigned long ul; + int si; + unsigned ui; + short ss; + unsigned short us; + char sc; + unsigned char uc; + } u[3]; + short f[0]; +} sample_struct; +sample_struct mpers_target_var; diff --git a/mpers-mx32/sample_struct.d1 b/mpers-mx32/sample_struct.d1 new file mode 100644 index 000000000..0b8ee9a4f --- /dev/null +++ b/mpers-mx32/sample_struct.d1 @@ -0,0 +1,262 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x20d (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x1b): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x10f): mpers-mx32/sample_struct.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x77): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_structure_type) + <1e> DW_AT_byte_size : 72 + <1f> DW_AT_decl_file : 1 + <20> DW_AT_decl_line : 3 + <21> DW_AT_sibling : <0xd0> + <2><25>: Abbrev Number: 3 (DW_TAG_member) + <26> DW_AT_name : p + <28> DW_AT_decl_file : 1 + <29> DW_AT_decl_line : 4 + <2a> DW_AT_type : <0xd0> + <2e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><31>: Abbrev Number: 3 (DW_TAG_member) + <32> DW_AT_name : sc + <35> DW_AT_decl_file : 1 + <36> DW_AT_decl_line : 5 + <37> DW_AT_type : <0xd2> + <3b> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><3e>: Abbrev Number: 3 (DW_TAG_member) + <3f> DW_AT_name : ss + <42> DW_AT_decl_file : 1 + <43> DW_AT_decl_line : 7 + <44> DW_AT_type : <0xd9> + <48> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><4b>: Abbrev Number: 3 (DW_TAG_member) + <4c> DW_AT_name : uc + <4f> DW_AT_decl_file : 1 + <50> DW_AT_decl_line : 8 + <51> DW_AT_type : <0xe0> + <55> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><58>: Abbrev Number: 3 (DW_TAG_member) + <59> DW_AT_name : si + <5c> DW_AT_decl_file : 1 + <5d> DW_AT_decl_line : 10 + <5e> DW_AT_type : <0xe7> + <62> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><65>: Abbrev Number: 3 (DW_TAG_member) + <66> DW_AT_name : ui + <69> DW_AT_decl_file : 1 + <6a> DW_AT_decl_line : 11 + <6b> DW_AT_type : <0xee> + <6f> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><72>: Abbrev Number: 3 (DW_TAG_member) + <73> DW_AT_name : sl + <76> DW_AT_decl_file : 1 + <77> DW_AT_decl_line : 12 + <78> DW_AT_type : <0xf5> + <7c> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><7f>: Abbrev Number: 3 (DW_TAG_member) + <80> DW_AT_name : us + <83> DW_AT_decl_file : 1 + <84> DW_AT_decl_line : 13 + <85> DW_AT_type : <0xfc> + <89> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><8c>: Abbrev Number: 3 (DW_TAG_member) + <8d> DW_AT_name : sll + <91> DW_AT_decl_file : 1 + <92> DW_AT_decl_line : 15 + <93> DW_AT_type : <0x103> + <97> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><9a>: Abbrev Number: 3 (DW_TAG_member) + <9b> DW_AT_name : ull + <9f> DW_AT_decl_file : 1 + DW_AT_decl_line : 16 + DW_AT_type : <0x10a> + DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2>: Abbrev Number: 3 (DW_TAG_member) + DW_AT_name : ul + DW_AT_decl_file : 1 + DW_AT_decl_line : 17 + DW_AT_type : <0x111> + DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2>: Abbrev Number: 3 (DW_TAG_member) + DW_AT_name : asl + DW_AT_decl_file : 1 + DW_AT_decl_line : 18 + DW_AT_type : <0x118> + DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2>: Abbrev Number: 3 (DW_TAG_member) + DW_AT_name : f + DW_AT_decl_file : 1 + DW_AT_decl_line : 19 + DW_AT_type : <0xd2> + DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + <1>: Abbrev Number: 5 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 6 (signed char) + DW_AT_name : (indirect string, offset: 0xb6): char + <1>: Abbrev Number: 5 (DW_TAG_base_type) + DW_AT_byte_size : 2 + DW_AT_encoding : 5 (signed) + DW_AT_name : (indirect string, offset: 0x105): short int + <1>: Abbrev Number: 5 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 8 (unsigned char) + DW_AT_name : (indirect string, offset: 0xa8): unsigned char + <1>: Abbrev Number: 6 (DW_TAG_base_type) + DW_AT_byte_size : 4 + DW_AT_encoding : 5 (signed) + DW_AT_name : int + <1>: Abbrev Number: 5 (DW_TAG_base_type) + DW_AT_byte_size : 4 + DW_AT_encoding : 7 (unsigned) + DW_AT_name : (indirect string, offset: 0xe): unsigned int + <1>: Abbrev Number: 5 (DW_TAG_base_type) + DW_AT_byte_size : 4 + DW_AT_encoding : 5 (signed) + DW_AT_name : (indirect string, offset: 0xbb): long int + <1>: Abbrev Number: 5 (DW_TAG_base_type) + DW_AT_byte_size : 2 + DW_AT_encoding : 7 (unsigned) + DW_AT_name : (indirect string, offset: 0xe9): short unsigned int + <1><103>: Abbrev Number: 5 (DW_TAG_base_type) + <104> DW_AT_byte_size : 8 + <105> DW_AT_encoding : 5 (signed) + <106> DW_AT_name : (indirect string, offset: 0x0): long long int + <1><10a>: Abbrev Number: 5 (DW_TAG_base_type) + <10b> DW_AT_byte_size : 8 + <10c> DW_AT_encoding : 7 (unsigned) + <10d> DW_AT_name : (indirect string, offset: 0xc4): long long unsigned int + <1><111>: Abbrev Number: 5 (DW_TAG_base_type) + <112> DW_AT_byte_size : 4 + <113> DW_AT_encoding : 7 (unsigned) + <114> DW_AT_name : (indirect string, offset: 0x12a): long unsigned int + <1><118>: Abbrev Number: 7 (DW_TAG_array_type) + <119> DW_AT_type : <0xf5> + <11d> DW_AT_sibling : <0x128> + <2><121>: Abbrev Number: 8 (DW_TAG_subrange_type) + <122> DW_AT_type : <0x128> + <126> DW_AT_upper_bound : 2 + <2><127>: Abbrev Number: 0 + <1><128>: Abbrev Number: 5 (DW_TAG_base_type) + <129> DW_AT_byte_size : 4 + <12a> DW_AT_encoding : 7 (unsigned) + <12b> DW_AT_name : (indirect string, offset: 0xfc): sizetype + <1><12f>: Abbrev Number: 9 (DW_TAG_union_type) + <130> DW_AT_byte_size : 8 + <131> DW_AT_decl_file : 1 + <132> DW_AT_decl_line : 22 + <133> DW_AT_sibling : <0x1a7> + <2><137>: Abbrev Number: 10 (DW_TAG_member) + <138> DW_AT_name : sll + <13c> DW_AT_decl_file : 1 + <13d> DW_AT_decl_line : 23 + <13e> DW_AT_type : <0x103> + <2><142>: Abbrev Number: 10 (DW_TAG_member) + <143> DW_AT_name : ull + <147> DW_AT_decl_file : 1 + <148> DW_AT_decl_line : 24 + <149> DW_AT_type : <0x10a> + <2><14d>: Abbrev Number: 10 (DW_TAG_member) + <14e> DW_AT_name : p + <150> DW_AT_decl_file : 1 + <151> DW_AT_decl_line : 25 + <152> DW_AT_type : <0xd0> + <2><156>: Abbrev Number: 10 (DW_TAG_member) + <157> DW_AT_name : sl + <15a> DW_AT_decl_file : 1 + <15b> DW_AT_decl_line : 26 + <15c> DW_AT_type : <0xf5> + <2><160>: Abbrev Number: 10 (DW_TAG_member) + <161> DW_AT_name : ul + <164> DW_AT_decl_file : 1 + <165> DW_AT_decl_line : 27 + <166> DW_AT_type : <0x111> + <2><16a>: Abbrev Number: 10 (DW_TAG_member) + <16b> DW_AT_name : si + <16e> DW_AT_decl_file : 1 + <16f> DW_AT_decl_line : 28 + <170> DW_AT_type : <0xe7> + <2><174>: Abbrev Number: 10 (DW_TAG_member) + <175> DW_AT_name : ui + <178> DW_AT_decl_file : 1 + <179> DW_AT_decl_line : 29 + <17a> DW_AT_type : <0xee> + <2><17e>: Abbrev Number: 10 (DW_TAG_member) + <17f> DW_AT_name : ss + <182> DW_AT_decl_file : 1 + <183> DW_AT_decl_line : 30 + <184> DW_AT_type : <0xd9> + <2><188>: Abbrev Number: 10 (DW_TAG_member) + <189> DW_AT_name : us + <18c> DW_AT_decl_file : 1 + <18d> DW_AT_decl_line : 31 + <18e> DW_AT_type : <0xfc> + <2><192>: Abbrev Number: 10 (DW_TAG_member) + <193> DW_AT_name : sc + <196> DW_AT_decl_file : 1 + <197> DW_AT_decl_line : 32 + <198> DW_AT_type : <0xd2> + <2><19c>: Abbrev Number: 10 (DW_TAG_member) + <19d> DW_AT_name : uc + <1a0> DW_AT_decl_file : 1 + <1a1> DW_AT_decl_line : 33 + <1a2> DW_AT_type : <0xe0> + <2><1a6>: Abbrev Number: 0 + <1><1a7>: Abbrev Number: 2 (DW_TAG_structure_type) + <1a8> DW_AT_byte_size : 96 + <1a9> DW_AT_decl_file : 1 + <1aa> DW_AT_decl_line : 2 + <1ab> DW_AT_sibling : <0x1d4> + <2><1af>: Abbrev Number: 3 (DW_TAG_member) + <1b0> DW_AT_name : s + <1b2> DW_AT_decl_file : 1 + <1b3> DW_AT_decl_line : 21 + <1b4> DW_AT_type : <0x1d> + <1b8> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1bb>: Abbrev Number: 3 (DW_TAG_member) + <1bc> DW_AT_name : u + <1be> DW_AT_decl_file : 1 + <1bf> DW_AT_decl_line : 34 + <1c0> DW_AT_type : <0x1d4> + <1c4> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><1c7>: Abbrev Number: 3 (DW_TAG_member) + <1c8> DW_AT_name : f + <1ca> DW_AT_decl_file : 1 + <1cb> DW_AT_decl_line : 35 + <1cc> DW_AT_type : <0x1e4> + <1d0> DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) + <2><1d3>: Abbrev Number: 0 + <1><1d4>: Abbrev Number: 7 (DW_TAG_array_type) + <1d5> DW_AT_type : <0x12f> + <1d9> DW_AT_sibling : <0x1e4> + <2><1dd>: Abbrev Number: 8 (DW_TAG_subrange_type) + <1de> DW_AT_type : <0x128> + <1e2> DW_AT_upper_bound : 2 + <2><1e3>: Abbrev Number: 0 + <1><1e4>: Abbrev Number: 7 (DW_TAG_array_type) + <1e5> DW_AT_type : <0xd9> + <1e9> DW_AT_sibling : <0x1f3> + <2><1ed>: Abbrev Number: 11 (DW_TAG_subrange_type) + <1ee> DW_AT_type : <0x128> + <2><1f2>: Abbrev Number: 0 + <1><1f3>: Abbrev Number: 12 (DW_TAG_typedef) + <1f4> DW_AT_name : (indirect string, offset: 0xdb): sample_struct + <1f8> DW_AT_decl_file : 1 + <1f9> DW_AT_decl_line : 36 + <1fa> DW_AT_type : <0x1a7> + <1><1fe>: Abbrev Number: 13 (DW_TAG_variable) + <1ff> DW_AT_name : (indirect string, offset: 0x66): mpers_target_var + <203> DW_AT_decl_file : 1 + <204> DW_AT_decl_line : 37 + <205> DW_AT_type : <0x1f3> + <209> DW_AT_external : 1 + <20a> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><210>: Abbrev Number: 0 + diff --git a/mpers-mx32/sample_struct.d2 b/mpers-mx32/sample_struct.d2 new file mode 100644 index 000000000..336bee51a --- /dev/null +++ b/mpers-mx32/sample_struct.d2 @@ -0,0 +1,291 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_structure_type) +DW_AT_byte_size : 72 +DW_AT_decl_file : 1 +DW_AT_decl_line : 3 +DW_AT_sibling : <0xd0> +<2><25> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : p +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_type : <0xd0> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><31> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : sc +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0xd2> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><3e> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : ss +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0xd9> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<2><4b> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : uc +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xe0> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><58> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : si +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0xe7> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><65> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : ui +DW_AT_decl_file : 1 +DW_AT_decl_line : 11 +DW_AT_type : <0xee> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><72> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : sl +DW_AT_decl_file : 1 +DW_AT_decl_line : 12 +DW_AT_type : <0xf5> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><7f> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : us +DW_AT_decl_file : 1 +DW_AT_decl_line : 13 +DW_AT_type : <0xfc> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><8c> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : sll +DW_AT_decl_file : 1 +DW_AT_decl_line : 15 +DW_AT_type : <0x103> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><9a> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : ull +DW_AT_decl_file : 1 +DW_AT_decl_line : 16 +DW_AT_type : <0x10a> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : ul +DW_AT_decl_file : 1 +DW_AT_decl_line : 17 +DW_AT_type : <0x111> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : asl +DW_AT_decl_file : 1 +DW_AT_decl_line : 18 +DW_AT_type : <0x118> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : f +DW_AT_decl_file : 1 +DW_AT_decl_line : 19 +DW_AT_type : <0xd2> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0xb6): char +<1> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x105): short int +<1> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xa8): unsigned char +<1> +Abbrev Number: 6 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xe): unsigned int +<1> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0xbb): long int +<1> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xe9): short unsigned int +<1><103> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x0): long long int +<1><10a> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xc4): long long unsigned int +<1><111> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x12a): long unsigned int +<1><118> +Abbrev Number: 7 (DW_TAG_array_type) +DW_AT_type : <0xf5> +DW_AT_sibling : <0x128> +<2><121> +Abbrev Number: 8 (DW_TAG_subrange_type) +DW_AT_type : <0x128> +DW_AT_upper_bound : 2 +<1><128> +Abbrev Number: 5 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xfc): sizetype +<1><12f> +Abbrev Number: 9 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 1 +DW_AT_decl_line : 22 +DW_AT_sibling : <0x1a7> +<2><137> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : sll +DW_AT_decl_file : 1 +DW_AT_decl_line : 23 +DW_AT_type : <0x103> +<2><142> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : ull +DW_AT_decl_file : 1 +DW_AT_decl_line : 24 +DW_AT_type : <0x10a> +<2><14d> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : p +DW_AT_decl_file : 1 +DW_AT_decl_line : 25 +DW_AT_type : <0xd0> +<2><156> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : sl +DW_AT_decl_file : 1 +DW_AT_decl_line : 26 +DW_AT_type : <0xf5> +<2><160> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : ul +DW_AT_decl_file : 1 +DW_AT_decl_line : 27 +DW_AT_type : <0x111> +<2><16a> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : si +DW_AT_decl_file : 1 +DW_AT_decl_line : 28 +DW_AT_type : <0xe7> +<2><174> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : ui +DW_AT_decl_file : 1 +DW_AT_decl_line : 29 +DW_AT_type : <0xee> +<2><17e> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : ss +DW_AT_decl_file : 1 +DW_AT_decl_line : 30 +DW_AT_type : <0xd9> +<2><188> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : us +DW_AT_decl_file : 1 +DW_AT_decl_line : 31 +DW_AT_type : <0xfc> +<2><192> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : sc +DW_AT_decl_file : 1 +DW_AT_decl_line : 32 +DW_AT_type : <0xd2> +<2><19c> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : uc +DW_AT_decl_file : 1 +DW_AT_decl_line : 33 +DW_AT_type : <0xe0> +<1><1a7> +Abbrev Number: 2 (DW_TAG_structure_type) +DW_AT_byte_size : 96 +DW_AT_decl_file : 1 +DW_AT_decl_line : 2 +DW_AT_sibling : <0x1d4> +<2><1af> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : s +DW_AT_decl_file : 1 +DW_AT_decl_line : 21 +DW_AT_type : <0x1d> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1bb> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : u +DW_AT_decl_file : 1 +DW_AT_decl_line : 34 +DW_AT_type : <0x1d4> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><1c7> +Abbrev Number: 3 (DW_TAG_member) +DW_AT_name : f +DW_AT_decl_file : 1 +DW_AT_decl_line : 35 +DW_AT_type : <0x1e4> +DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) +<1><1d4> +Abbrev Number: 7 (DW_TAG_array_type) +DW_AT_type : <0x12f> +DW_AT_sibling : <0x1e4> +<2><1dd> +Abbrev Number: 8 (DW_TAG_subrange_type) +DW_AT_type : <0x128> +DW_AT_upper_bound : 2 +<1><1e4> +Abbrev Number: 7 (DW_TAG_array_type) +DW_AT_type : <0xd9> +DW_AT_sibling : <0x1f3> +<2><1ed> +Abbrev Number: 11 (DW_TAG_subrange_type) +DW_AT_type : <0x128> +<1><1f3> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xdb): sample_struct +DW_AT_decl_file : 1 +DW_AT_decl_line : 36 +DW_AT_type : <0x1a7> +<1><1fe> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x66): mpers_target_var +DW_AT_decl_file : 1 +DW_AT_decl_line : 37 +DW_AT_type : <0x1f3> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/sample_struct.h b/mpers-mx32/sample_struct.h new file mode 100644 index 000000000..557ab6902 --- /dev/null +++ b/mpers-mx32/sample_struct.h @@ -0,0 +1,39 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +struct { +mpers_ptr_t p; +char sc; +unsigned char mpers_filler_1[1]; +int16_t ss; +unsigned char uc; +unsigned char mpers_filler_2[3]; +int32_t si; +uint32_t ui; +int32_t sl; +uint16_t us; +unsigned char mpers_filler_3[6]; +int64_t sll; +uint64_t ull; +uint32_t ul; +int32_t asl[3]; +char f; +unsigned char mpers_end_filler_4[7]; +} ATTRIBUTE_PACKED s; +union { +int64_t sll; +uint64_t ull; +mpers_ptr_t p; +int32_t sl; +uint32_t ul; +int32_t si; +uint32_t ui; +int16_t ss; +uint16_t us; +char sc; +unsigned char uc; +} u[3]; +int16_t f[0]; +} ATTRIBUTE_PACKED mx32_sample_struct; +#define MPERS_mx32_sample_struct mx32_sample_struct diff --git a/mpers-mx32/seccomp_fprog_t.c b/mpers-mx32/seccomp_fprog_t.c new file mode 100644 index 000000000..7f2f131a1 --- /dev/null +++ b/mpers-mx32/seccomp_fprog_t.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "seccomp_fprog.h" +typedef struct seccomp_fprog seccomp_fprog_t; + +seccomp_fprog_t mpers_target_var; diff --git a/mpers-mx32/seccomp_fprog_t.d1 b/mpers-mx32/seccomp_fprog_t.d1 new file mode 100644 index 000000000..db1cefc07 --- /dev/null +++ b/mpers-mx32/seccomp_fprog_t.d1 @@ -0,0 +1,179 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x16a (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x40): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x138): mpers-mx32/seccomp_fprog_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0xba): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x18d): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1a2): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x155): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x109): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x17a): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1ac): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xeb): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x11c): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xa2): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x199): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x117): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x163): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x9c): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x12e): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x125): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1f): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x11): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0xb4): _Bool + <1>: Abbrev Number: 6 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x28): seccomp_fprog + <102> DW_AT_byte_size : 8 + <103> DW_AT_decl_file : 2 + <104> DW_AT_decl_line : 4 + <105> DW_AT_sibling : <0x126> + <2><109>: Abbrev Number: 8 (DW_TAG_member) + <10a> DW_AT_name : len + <10e> DW_AT_decl_file : 2 + <10f> DW_AT_decl_line : 5 + <110> DW_AT_type : <0x40> + <114> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><117>: Abbrev Number: 7 (DW_TAG_member) + <118> DW_AT_name : (indirect string, offset: 0x102): filter + <11c> DW_AT_decl_file : 2 + <11d> DW_AT_decl_line : 6 + <11e> DW_AT_type : <0x5c> + <122> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><125>: Abbrev Number: 0 + <1><126>: Abbrev Number: 11 (DW_TAG_typedef) + <127> DW_AT_name : (indirect string, offset: 0x16a): seccomp_fprog_t + <12b> DW_AT_decl_file : 3 + <12c> DW_AT_decl_line : 32 + <12d> DW_AT_type : <0xfd> + <1><131>: Abbrev Number: 12 (DW_TAG_variable) + <132> DW_AT_name : (indirect string, offset: 0x0): current_wordsize + <136> DW_AT_decl_file : 4 + <137> DW_AT_decl_line : 757 + <139> DW_AT_type : <0x47> + <13d> DW_AT_external : 1 + <13e> DW_AT_declaration : 1 + <1><13f>: Abbrev Number: 12 (DW_TAG_variable) + <140> DW_AT_name : (indirect string, offset: 0x163): sysent + <144> DW_AT_decl_file : 4 + <145> DW_AT_decl_line : 892 + <147> DW_AT_type : <0xeb> + <14b> DW_AT_external : 1 + <14c> DW_AT_declaration : 1 + <1><14d>: Abbrev Number: 12 (DW_TAG_variable) + <14e> DW_AT_name : (indirect string, offset: 0x36): nsyscalls + <152> DW_AT_decl_file : 4 + <153> DW_AT_decl_line : 903 + <155> DW_AT_type : <0x47> + <159> DW_AT_external : 1 + <15a> DW_AT_declaration : 1 + <1><15b>: Abbrev Number: 13 (DW_TAG_variable) + <15c> DW_AT_name : (indirect string, offset: 0x8b): mpers_target_var + <160> DW_AT_decl_file : 3 + <161> DW_AT_decl_line : 34 + <162> DW_AT_type : <0x126> + <166> DW_AT_external : 1 + <167> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><16d>: Abbrev Number: 0 + diff --git a/mpers-mx32/seccomp_fprog_t.d2 b/mpers-mx32/seccomp_fprog_t.d2 new file mode 100644 index 000000000..c6b3cc37f --- /dev/null +++ b/mpers-mx32/seccomp_fprog_t.d2 @@ -0,0 +1,196 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x18d): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a2): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x155): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x109): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x17a): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1ac): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xeb): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x11c): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xa2): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x199): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x117): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x163): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9c): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x12e): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x125): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xb4): _Bool +<1> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x28): seccomp_fprog +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x126> +<2><109> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : len +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><117> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x102): filter +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><126> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x16a): seccomp_fprog_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 32 +DW_AT_type : <0xfd> +<1><131> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x0): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><13f> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x163): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><14d> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x36): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><15b> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x8b): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 34 +DW_AT_type : <0x126> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-mx32/seccomp_fprog_t.h b/mpers-mx32/seccomp_fprog_t.h new file mode 100644 index 000000000..128cf860f --- /dev/null +++ b/mpers-mx32/seccomp_fprog_t.h @@ -0,0 +1,9 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint16_t len; +unsigned char mpers_filler_1[2]; +uint32_t filter; +} ATTRIBUTE_PACKED mx32_seccomp_fprog_t; +#define MPERS_mx32_seccomp_fprog_t mx32_seccomp_fprog_t diff --git a/mpers-mx32/shmid_ds_t.c b/mpers-mx32/shmid_ds_t.c new file mode 100644 index 000000000..0d77b84be --- /dev/null +++ b/mpers-mx32/shmid_ds_t.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 1993 Ulrich Pegelow + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2003-2006 Roland McGrath + * Copyright (c) 2006-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "ipc_defs.h" + +#ifdef HAVE_SYS_SHM_H +/* The C library generally exports the struct the current kernel expects. */ +# include +typedef struct shmid_ds shmid_ds_t; +#elif defined HAVE_LINUX_SHM_H +/* The linux header might provide the right struct. */ +# include +typedef struct shmid64_ds shmid_ds_t; +#endif + +shmid_ds_t mpers_target_var; diff --git a/mpers-mx32/shmid_ds_t.d1 b/mpers-mx32/shmid_ds_t.d1 new file mode 100644 index 000000000..30a417112 --- /dev/null +++ b/mpers-mx32/shmid_ds_t.d1 @@ -0,0 +1,350 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x2ef (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x30): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xde): mpers-mx32/shmid_ds_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1b5): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x298): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x22b): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x201): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xd0): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x7b): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x188): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xb9): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x287): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xff): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x179): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 4 (DW_TAG_typedef) + <6f> DW_AT_name : (indirect string, offset: 0x2bf): __u_quad_t + <73> DW_AT_decl_file : 1 + <74> DW_AT_decl_line : 56 + <75> DW_AT_type : <0x4e> + <1><79>: Abbrev Number: 4 (DW_TAG_typedef) + <7a> DW_AT_name : (indirect string, offset: 0x28): __uid_t + <7e> DW_AT_decl_file : 1 + <7f> DW_AT_decl_line : 125 + <80> DW_AT_type : <0x47> + <1><84>: Abbrev Number: 4 (DW_TAG_typedef) + <85> DW_AT_name : (indirect string, offset: 0x1f0): __gid_t + <89> DW_AT_decl_file : 1 + <8a> DW_AT_decl_line : 126 + <8b> DW_AT_type : <0x47> + <1><8f>: Abbrev Number: 4 (DW_TAG_typedef) + <90> DW_AT_name : (indirect string, offset: 0x290): __pid_t + <94> DW_AT_decl_file : 1 + <95> DW_AT_decl_line : 133 + <96> DW_AT_type : <0x2b> + <1><9a>: Abbrev Number: 2 (DW_TAG_base_type) + <9b> DW_AT_byte_size : 4 + <9c> DW_AT_encoding : 7 (unsigned) + <9d> DW_AT_name : (indirect string, offset: 0x1f8): sizetype + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x150): __time_t + DW_AT_decl_file : 1 + DW_AT_decl_line : 139 + DW_AT_type : <0x63> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1ad): __key_t + DW_AT_decl_file : 1 + DW_AT_decl_line : 144 + DW_AT_type : <0x2b> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x8e): __syscall_ulong_t + DW_AT_decl_file : 1 + DW_AT_decl_line : 177 + DW_AT_type : <0x6e> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 6 (signed char) + DW_AT_name : (indirect string, offset: 0x1a3): char + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x0): size_t + DW_AT_decl_file : 2 + DW_AT_decl_line : 212 + DW_AT_type : <0x47> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xda> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xc2> + <1>: Abbrev Number: 7 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x116): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x132> + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x159): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xaf): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + <100> DW_AT_type : <0x2b> + <104> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><107>: Abbrev Number: 9 (DW_TAG_member) + <108> DW_AT_name : sen + <10c> DW_AT_decl_file : 3 + <10d> DW_AT_decl_line : 7 + <10e> DW_AT_type : <0x2b> + <112> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><115>: Abbrev Number: 8 (DW_TAG_member) + <116> DW_AT_name : (indirect string, offset: 0xf6): sys_func + <11a> DW_AT_decl_file : 3 + <11b> DW_AT_decl_line : 8 + <11c> DW_AT_type : <0x13d> + <120> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><123>: Abbrev Number: 8 (DW_TAG_member) + <124> DW_AT_name : (indirect string, offset: 0xa0): sys_name + <128> DW_AT_decl_file : 3 + <129> DW_AT_decl_line : 9 + <12a> DW_AT_type : <0xd4> + <12e> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><131>: Abbrev Number: 0 + <1><132>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <133> DW_AT_type : <0x2b> + <137> DW_AT_sibling : <0x13d> + <2><13b>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><13c>: Abbrev Number: 0 + <1><13d>: Abbrev Number: 5 (DW_TAG_pointer_type) + <13e> DW_AT_byte_size : 4 + <13f> DW_AT_type : <0x132> + <1><143>: Abbrev Number: 4 (DW_TAG_typedef) + <144> DW_AT_name : (indirect string, offset: 0x195): struct_sysent + <148> DW_AT_decl_file : 3 + <149> DW_AT_decl_line : 10 + <14a> DW_AT_type : <0xdf> + <1><14e>: Abbrev Number: 5 (DW_TAG_pointer_type) + <14f> DW_AT_byte_size : 4 + <150> DW_AT_type : <0x154> + <1><154>: Abbrev Number: 6 (DW_TAG_const_type) + <155> DW_AT_type : <0x143> + <1><159>: Abbrev Number: 2 (DW_TAG_base_type) + <15a> DW_AT_byte_size : 1 + <15b> DW_AT_encoding : 2 (boolean) + <15c> DW_AT_name : (indirect string, offset: 0x1b): _Bool + <1><160>: Abbrev Number: 7 (DW_TAG_structure_type) + <161> DW_AT_name : (indirect string, offset: 0x247): ipc_perm + <165> DW_AT_byte_size : 48 + <166> DW_AT_decl_file : 4 + <167> DW_AT_decl_line : 42 + <168> DW_AT_sibling : <0x207> + <2><16c>: Abbrev Number: 8 (DW_TAG_member) + <16d> DW_AT_name : (indirect string, offset: 0x182): __key + <171> DW_AT_decl_file : 4 + <172> DW_AT_decl_line : 44 + <173> DW_AT_type : <0xac> + <177> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><17a>: Abbrev Number: 9 (DW_TAG_member) + <17b> DW_AT_name : uid + <17f> DW_AT_decl_file : 4 + <180> DW_AT_decl_line : 45 + <181> DW_AT_type : <0x79> + <185> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><188>: Abbrev Number: 9 (DW_TAG_member) + <189> DW_AT_name : gid + <18d> DW_AT_decl_file : 4 + <18e> DW_AT_decl_line : 46 + <18f> DW_AT_type : <0x84> + <193> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><196>: Abbrev Number: 8 (DW_TAG_member) + <197> DW_AT_name : (indirect string, offset: 0x128): cuid + <19b> DW_AT_decl_file : 4 + <19c> DW_AT_decl_line : 47 + <19d> DW_AT_type : <0x79> + <1a1> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1a4>: Abbrev Number: 8 (DW_TAG_member) + <1a5> DW_AT_name : (indirect string, offset: 0x111): cgid + <1a9> DW_AT_decl_file : 4 + <1aa> DW_AT_decl_line : 48 + <1ab> DW_AT_type : <0x84> + <1af> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><1b2>: Abbrev Number: 8 (DW_TAG_member) + <1b3> DW_AT_name : (indirect string, offset: 0x1a8): mode + <1b7> DW_AT_decl_file : 4 + <1b8> DW_AT_decl_line : 49 + <1b9> DW_AT_type : <0x40> + <1bd> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><1c0>: Abbrev Number: 8 (DW_TAG_member) + <1c1> DW_AT_name : (indirect string, offset: 0x280): __pad1 + <1c5> DW_AT_decl_file : 4 + <1c6> DW_AT_decl_line : 50 + <1c7> DW_AT_type : <0x40> + <1cb> DW_AT_data_member_location: 2 byte block: 23 16 (DW_OP_plus_uconst: 22) + <2><1ce>: Abbrev Number: 8 (DW_TAG_member) + <1cf> DW_AT_name : (indirect string, offset: 0xa9): __seq + <1d3> DW_AT_decl_file : 4 + <1d4> DW_AT_decl_line : 51 + <1d5> DW_AT_type : <0x40> + <1d9> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1dc>: Abbrev Number: 8 (DW_TAG_member) + <1dd> DW_AT_name : (indirect string, offset: 0x21): __pad2 + <1e1> DW_AT_decl_file : 4 + <1e2> DW_AT_decl_line : 52 + <1e3> DW_AT_type : <0x40> + <1e7> DW_AT_data_member_location: 2 byte block: 23 1a (DW_OP_plus_uconst: 26) + <2><1ea>: Abbrev Number: 8 (DW_TAG_member) + <1eb> DW_AT_name : (indirect string, offset: 0x12d): __glibc_reserved1 + <1ef> DW_AT_decl_file : 4 + <1f0> DW_AT_decl_line : 53 + <1f1> DW_AT_type : <0xb7> + <1f5> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1f8>: Abbrev Number: 8 (DW_TAG_member) + <1f9> DW_AT_name : (indirect string, offset: 0x235): __glibc_reserved2 + <1fd> DW_AT_decl_file : 4 + <1fe> DW_AT_decl_line : 54 + <1ff> DW_AT_type : <0xb7> + <203> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><206>: Abbrev Number: 0 + <1><207>: Abbrev Number: 4 (DW_TAG_typedef) + <208> DW_AT_name : (indirect string, offset: 0x2a4): shmatt_t + <20c> DW_AT_decl_file : 5 + <20d> DW_AT_decl_line : 46 + <20e> DW_AT_type : <0xb7> + <1><212>: Abbrev Number: 7 (DW_TAG_structure_type) + <213> DW_AT_name : (indirect string, offset: 0x26c): shmid_ds + <217> DW_AT_byte_size : 112 + <218> DW_AT_decl_file : 5 + <219> DW_AT_decl_line : 49 + <21a> DW_AT_sibling : <0x2ab> + <2><21e>: Abbrev Number: 8 (DW_TAG_member) + <21f> DW_AT_name : (indirect string, offset: 0x20f): shm_perm + <223> DW_AT_decl_file : 5 + <224> DW_AT_decl_line : 51 + <225> DW_AT_type : <0x160> + <229> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><22c>: Abbrev Number: 8 (DW_TAG_member) + <22d> DW_AT_name : (indirect string, offset: 0x7): shm_segsz + <231> DW_AT_decl_file : 5 + <232> DW_AT_decl_line : 52 + <233> DW_AT_type : <0xc9> + <237> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><23a>: Abbrev Number: 8 (DW_TAG_member) + <23b> DW_AT_name : (indirect string, offset: 0x218): shm_atime + <23f> DW_AT_decl_file : 5 + <240> DW_AT_decl_line : 53 + <241> DW_AT_type : <0xa1> + <245> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><248>: Abbrev Number: 8 (DW_TAG_member) + <249> DW_AT_name : (indirect string, offset: 0x11): shm_dtime + <24d> DW_AT_decl_file : 5 + <24e> DW_AT_decl_line : 57 + <24f> DW_AT_type : <0xa1> + <253> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><256>: Abbrev Number: 8 (DW_TAG_member) + <257> DW_AT_name : (indirect string, offset: 0x250): shm_ctime + <25b> DW_AT_decl_file : 5 + <25c> DW_AT_decl_line : 61 + <25d> DW_AT_type : <0xa1> + <261> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><264>: Abbrev Number: 8 (DW_TAG_member) + <265> DW_AT_name : (indirect string, offset: 0x222): shm_cpid + <269> DW_AT_decl_file : 5 + <26a> DW_AT_decl_line : 65 + <26b> DW_AT_type : <0x8f> + <26f> DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) + <2><272>: Abbrev Number: 8 (DW_TAG_member) + <273> DW_AT_name : (indirect string, offset: 0x170): shm_lpid + <277> DW_AT_decl_file : 5 + <278> DW_AT_decl_line : 66 + <279> DW_AT_type : <0x8f> + <27d> DW_AT_data_member_location: 2 byte block: 23 54 (DW_OP_plus_uconst: 84) + <2><280>: Abbrev Number: 8 (DW_TAG_member) + <281> DW_AT_name : (indirect string, offset: 0x275): shm_nattch + <285> DW_AT_decl_file : 5 + <286> DW_AT_decl_line : 67 + <287> DW_AT_type : <0x207> + <28b> DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) + <2><28e>: Abbrev Number: 8 (DW_TAG_member) + <28f> DW_AT_name : (indirect string, offset: 0x2ad): __glibc_reserved4 + <293> DW_AT_decl_file : 5 + <294> DW_AT_decl_line : 68 + <295> DW_AT_type : <0xb7> + <299> DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) + <2><29c>: Abbrev Number: 8 (DW_TAG_member) + <29d> DW_AT_name : (indirect string, offset: 0x25a): __glibc_reserved5 + <2a1> DW_AT_decl_file : 5 + <2a2> DW_AT_decl_line : 69 + <2a3> DW_AT_type : <0xb7> + <2a7> DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) + <2><2aa>: Abbrev Number: 0 + <1><2ab>: Abbrev Number: 4 (DW_TAG_typedef) + <2ac> DW_AT_name : (indirect string, offset: 0x11d): shmid_ds_t + <2b0> DW_AT_decl_file : 6 + <2b1> DW_AT_decl_line : 41 + <2b2> DW_AT_type : <0x212> + <1><2b6>: Abbrev Number: 12 (DW_TAG_variable) + <2b7> DW_AT_name : (indirect string, offset: 0x13f): current_wordsize + <2bb> DW_AT_decl_file : 7 + <2bc> DW_AT_decl_line : 757 + <2be> DW_AT_type : <0x47> + <2c2> DW_AT_external : 1 + <2c3> DW_AT_declaration : 1 + <1><2c4>: Abbrev Number: 12 (DW_TAG_variable) + <2c5> DW_AT_name : (indirect string, offset: 0x116): sysent + <2c9> DW_AT_decl_file : 7 + <2ca> DW_AT_decl_line : 892 + <2cc> DW_AT_type : <0x14e> + <2d0> DW_AT_external : 1 + <2d1> DW_AT_declaration : 1 + <1><2d2>: Abbrev Number: 12 (DW_TAG_variable) + <2d3> DW_AT_name : (indirect string, offset: 0x1e6): nsyscalls + <2d7> DW_AT_decl_file : 7 + <2d8> DW_AT_decl_line : 903 + <2da> DW_AT_type : <0x47> + <2de> DW_AT_external : 1 + <2df> DW_AT_declaration : 1 + <1><2e0>: Abbrev Number: 13 (DW_TAG_variable) + <2e1> DW_AT_name : (indirect string, offset: 0x15f): mpers_target_var + <2e5> DW_AT_decl_file : 6 + <2e6> DW_AT_decl_line : 48 + <2e7> DW_AT_type : <0x2ab> + <2eb> DW_AT_external : 1 + <2ec> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><2f2>: Abbrev Number: 0 + diff --git a/mpers-mx32/shmid_ds_t.d2 b/mpers-mx32/shmid_ds_t.d2 new file mode 100644 index 000000000..e9f7feb96 --- /dev/null +++ b/mpers-mx32/shmid_ds_t.d2 @@ -0,0 +1,396 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x298): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x22b): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x201): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xd0): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x7b): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x188): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb9): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x287): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xff): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x179): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2bf): __u_quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 56 +DW_AT_type : <0x4e> +<1><79> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x28): __uid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 125 +DW_AT_type : <0x47> +<1><84> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1f0): __gid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 126 +DW_AT_type : <0x47> +<1><8f> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x290): __pid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 133 +DW_AT_type : <0x2b> +<1><9a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1f8): sizetype +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x150): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x63> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1ad): __key_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 144 +DW_AT_type : <0x2b> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x8e): __syscall_ulong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 177 +DW_AT_type : <0x6e> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1a3): char +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): size_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 212 +DW_AT_type : <0x47> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xda> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xc2> +<1> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x116): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x132> +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x159): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xaf): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><107> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><115> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf6): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x13d> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><123> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa0): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0xd4> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><132> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x13d> +<2><13b> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><13d> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x132> +<1><143> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x195): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xdf> +<1><14e> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x154> +<1><154> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x143> +<1><159> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x1b): _Bool +<1><160> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x247): ipc_perm +DW_AT_byte_size : 48 +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_sibling : <0x207> +<2><16c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x182): __key +DW_AT_decl_file : 4 +DW_AT_decl_line : 44 +DW_AT_type : <0xac> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><17a> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : uid +DW_AT_decl_file : 4 +DW_AT_decl_line : 45 +DW_AT_type : <0x79> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><188> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : gid +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x84> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><196> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x128): cuid +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x79> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><1a4> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x111): cgid +DW_AT_decl_file : 4 +DW_AT_decl_line : 48 +DW_AT_type : <0x84> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><1b2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a8): mode +DW_AT_decl_file : 4 +DW_AT_decl_line : 49 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><1c0> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x280): __pad1 +DW_AT_decl_file : 4 +DW_AT_decl_line : 50 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 16 (DW_OP_plus_uconst: 22) +<2><1ce> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa9): __seq +DW_AT_decl_file : 4 +DW_AT_decl_line : 51 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1dc> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21): __pad2 +DW_AT_decl_file : 4 +DW_AT_decl_line : 52 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 1a (DW_OP_plus_uconst: 26) +<2><1ea> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x12d): __glibc_reserved1 +DW_AT_decl_file : 4 +DW_AT_decl_line : 53 +DW_AT_type : <0xb7> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1f8> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x235): __glibc_reserved2 +DW_AT_decl_file : 4 +DW_AT_decl_line : 54 +DW_AT_type : <0xb7> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<1><207> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2a4): shmatt_t +DW_AT_decl_file : 5 +DW_AT_decl_line : 46 +DW_AT_type : <0xb7> +<1><212> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x26c): shmid_ds +DW_AT_byte_size : 112 +DW_AT_decl_file : 5 +DW_AT_decl_line : 49 +DW_AT_sibling : <0x2ab> +<2><21e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x20f): shm_perm +DW_AT_decl_file : 5 +DW_AT_decl_line : 51 +DW_AT_type : <0x160> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><22c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7): shm_segsz +DW_AT_decl_file : 5 +DW_AT_decl_line : 52 +DW_AT_type : <0xc9> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><23a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x218): shm_atime +DW_AT_decl_file : 5 +DW_AT_decl_line : 53 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><248> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11): shm_dtime +DW_AT_decl_file : 5 +DW_AT_decl_line : 57 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><256> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x250): shm_ctime +DW_AT_decl_file : 5 +DW_AT_decl_line : 61 +DW_AT_type : <0xa1> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><264> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x222): shm_cpid +DW_AT_decl_file : 5 +DW_AT_decl_line : 65 +DW_AT_type : <0x8f> +DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) +<2><272> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x170): shm_lpid +DW_AT_decl_file : 5 +DW_AT_decl_line : 66 +DW_AT_type : <0x8f> +DW_AT_data_member_location: 2 byte block: 23 54 (DW_OP_plus_uconst: 84) +<2><280> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x275): shm_nattch +DW_AT_decl_file : 5 +DW_AT_decl_line : 67 +DW_AT_type : <0x207> +DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) +<2><28e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2ad): __glibc_reserved4 +DW_AT_decl_file : 5 +DW_AT_decl_line : 68 +DW_AT_type : <0xb7> +DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) +<2><29c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x25a): __glibc_reserved5 +DW_AT_decl_file : 5 +DW_AT_decl_line : 69 +DW_AT_type : <0xb7> +DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) +<1><2ab> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11d): shmid_ds_t +DW_AT_decl_file : 6 +DW_AT_decl_line : 41 +DW_AT_type : <0x212> +<1><2b6> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x13f): current_wordsize +DW_AT_decl_file : 7 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2c4> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x116): sysent +DW_AT_decl_file : 7 +DW_AT_decl_line : 892 +DW_AT_type : <0x14e> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2d2> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1e6): nsyscalls +DW_AT_decl_file : 7 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2e0> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x15f): mpers_target_var +DW_AT_decl_file : 6 +DW_AT_decl_line : 48 +DW_AT_type : <0x2ab> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/shmid_ds_t.h b/mpers-mx32/shmid_ds_t.h new file mode 100644 index 000000000..37489e8c5 --- /dev/null +++ b/mpers-mx32/shmid_ds_t.h @@ -0,0 +1,30 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +struct { +int32_t __key; +uint32_t uid; +uint32_t gid; +uint32_t cuid; +uint32_t cgid; +uint16_t mode; +uint16_t __pad1; +uint16_t __seq; +uint16_t __pad2; +unsigned char mpers_filler_1[4]; +uint64_t __glibc_reserved1; +uint64_t __glibc_reserved2; +} ATTRIBUTE_PACKED shm_perm; +uint32_t shm_segsz; +unsigned char mpers_filler_2[4]; +int64_t shm_atime; +int64_t shm_dtime; +int64_t shm_ctime; +int32_t shm_cpid; +int32_t shm_lpid; +uint64_t shm_nattch; +uint64_t __glibc_reserved4; +uint64_t __glibc_reserved5; +} ATTRIBUTE_PACKED mx32_shmid_ds_t; +#define MPERS_mx32_shmid_ds_t mx32_shmid_ds_t diff --git a/mpers-mx32/siginfo_t.c b/mpers-mx32/siginfo_t.c new file mode 100644 index 000000000..b00fa38c8 --- /dev/null +++ b/mpers-mx32/siginfo_t.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993-1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2001 John Hughes + * Copyright (c) 2013 Denys Vlasenko + * Copyright (c) 2011-2015 Dmitry V. Levin + * Copyright (c) 2015 Elvira Khabirova + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include + +siginfo_t mpers_target_var; diff --git a/mpers-mx32/siginfo_t.d1 b/mpers-mx32/siginfo_t.d1 new file mode 100644 index 000000000..fb8eed3d6 --- /dev/null +++ b/mpers-mx32/siginfo_t.d1 @@ -0,0 +1,454 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x3b1 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x3b): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x151): mpers-mx32/siginfo_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x261): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x24d): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x21a): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0xd9): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xe7): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x86): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0xa4): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x2a4): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x23c): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x106): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x18c): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 4 (DW_TAG_typedef) + <6f> DW_AT_name : (indirect string, offset: 0x33): __uid_t + <73> DW_AT_decl_file : 1 + <74> DW_AT_decl_line : 125 + <75> DW_AT_type : <0x47> + <1><79>: Abbrev Number: 4 (DW_TAG_typedef) + <7a> DW_AT_name : (indirect string, offset: 0x245): __pid_t + <7e> DW_AT_decl_file : 1 + <7f> DW_AT_decl_line : 133 + <80> DW_AT_type : <0x2b> + <1><84>: Abbrev Number: 2 (DW_TAG_base_type) + <85> DW_AT_byte_size : 4 + <86> DW_AT_encoding : 7 (unsigned) + <87> DW_AT_name : (indirect string, offset: 0x1dd): sizetype + <1><8b>: Abbrev Number: 4 (DW_TAG_typedef) + <8c> DW_AT_name : (indirect string, offset: 0x206): __clock_t + <90> DW_AT_decl_file : 1 + <91> DW_AT_decl_line : 135 + <92> DW_AT_type : <0x63> + <1><96>: Abbrev Number: 5 (DW_TAG_pointer_type) + <97> DW_AT_byte_size : 4 + <1><98>: Abbrev Number: 2 (DW_TAG_base_type) + <99> DW_AT_byte_size : 1 + <9a> DW_AT_encoding : 6 (signed char) + <9b> DW_AT_name : (indirect string, offset: 0x1b6): char + <1><9f>: Abbrev Number: 6 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xa5> + <1>: Abbrev Number: 7 (DW_TAG_const_type) + DW_AT_type : <0x98> + <1>: Abbrev Number: 8 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x118): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 2 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xfd> + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x224): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xcf): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> +
DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x29b): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0x108> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb9): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 + DW_AT_type : <0x9f> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 11 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + <102> DW_AT_sibling : <0x108> + <2><106>: Abbrev Number: 12 (DW_TAG_unspecified_parameters) + <2><107>: Abbrev Number: 0 + <1><108>: Abbrev Number: 6 (DW_TAG_pointer_type) + <109> DW_AT_byte_size : 4 + <10a> DW_AT_type : <0xfd> + <1><10e>: Abbrev Number: 4 (DW_TAG_typedef) + <10f> DW_AT_name : (indirect string, offset: 0x19e): struct_sysent + <113> DW_AT_decl_file : 2 + <114> DW_AT_decl_line : 10 + <115> DW_AT_type : <0xaa> + <1><119>: Abbrev Number: 6 (DW_TAG_pointer_type) + <11a> DW_AT_byte_size : 4 + <11b> DW_AT_type : <0x11f> + <1><11f>: Abbrev Number: 7 (DW_TAG_const_type) + <120> DW_AT_type : <0x10e> + <1><124>: Abbrev Number: 2 (DW_TAG_base_type) + <125> DW_AT_byte_size : 1 + <126> DW_AT_encoding : 2 (boolean) + <127> DW_AT_name : (indirect string, offset: 0x26): _Bool + <1><12b>: Abbrev Number: 13 (DW_TAG_union_type) + <12c> DW_AT_name : (indirect string, offset: 0x1ff): sigval + <130> DW_AT_byte_size : 4 + <131> DW_AT_decl_file : 3 + <132> DW_AT_decl_line : 32 + <133> DW_AT_sibling : <0x14e> + <2><137>: Abbrev Number: 14 (DW_TAG_member) + <138> DW_AT_name : (indirect string, offset: 0xf5): sival_int + <13c> DW_AT_decl_file : 3 + <13d> DW_AT_decl_line : 34 + <13e> DW_AT_type : <0x2b> + <2><142>: Abbrev Number: 14 (DW_TAG_member) + <143> DW_AT_name : (indirect string, offset: 0x2c3): sival_ptr + <147> DW_AT_decl_file : 3 + <148> DW_AT_decl_line : 35 + <149> DW_AT_type : <0x96> + <2><14d>: Abbrev Number: 0 + <1><14e>: Abbrev Number: 4 (DW_TAG_typedef) + <14f> DW_AT_name : (indirect string, offset: 0x168): sigval_t + <153> DW_AT_decl_file : 3 + <154> DW_AT_decl_line : 36 + <155> DW_AT_type : <0x12b> + <1><159>: Abbrev Number: 4 (DW_TAG_typedef) + <15a> DW_AT_name : (indirect string, offset: 0x1cb): __sigchld_clock_t + <15e> DW_AT_decl_file : 3 + <15f> DW_AT_decl_line : 55 + <160> DW_AT_type : <0x8b> + <1><164>: Abbrev Number: 15 (DW_TAG_structure_type) + <165> DW_AT_byte_size : 8 + <166> DW_AT_decl_file : 3 + <167> DW_AT_decl_line : 74 + <168> DW_AT_sibling : <0x189> + <2><16c>: Abbrev Number: 9 (DW_TAG_member) + <16d> DW_AT_name : (indirect string, offset: 0xc8): si_pid + <171> DW_AT_decl_file : 3 + <172> DW_AT_decl_line : 76 + <173> DW_AT_type : <0x79> + <177> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><17a>: Abbrev Number: 9 (DW_TAG_member) + <17b> DW_AT_name : (indirect string, offset: 0xff): si_uid + <17f> DW_AT_decl_file : 3 + <180> DW_AT_decl_line : 77 + <181> DW_AT_type : <0x6e> + <185> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><188>: Abbrev Number: 0 + <1><189>: Abbrev Number: 15 (DW_TAG_structure_type) + <18a> DW_AT_byte_size : 12 + <18b> DW_AT_decl_file : 3 + <18c> DW_AT_decl_line : 81 + <18d> DW_AT_sibling : <0x1bc> + <2><191>: Abbrev Number: 9 (DW_TAG_member) + <192> DW_AT_name : (indirect string, offset: 0x2c): si_tid + <196> DW_AT_decl_file : 3 + <197> DW_AT_decl_line : 83 + <198> DW_AT_type : <0x2b> + <19c> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><19f>: Abbrev Number: 9 (DW_TAG_member) + <1a0> DW_AT_name : (indirect string, offset: 0x99): si_overrun + <1a4> DW_AT_decl_file : 3 + <1a5> DW_AT_decl_line : 84 + <1a6> DW_AT_type : <0x2b> + <1aa> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1ad>: Abbrev Number: 9 (DW_TAG_member) + <1ae> DW_AT_name : (indirect string, offset: 0x1ac): si_sigval + <1b2> DW_AT_decl_file : 3 + <1b3> DW_AT_decl_line : 85 + <1b4> DW_AT_type : <0x14e> + <1b8> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1bb>: Abbrev Number: 0 + <1><1bc>: Abbrev Number: 15 (DW_TAG_structure_type) + <1bd> DW_AT_byte_size : 12 + <1be> DW_AT_decl_file : 3 + <1bf> DW_AT_decl_line : 89 + <1c0> DW_AT_sibling : <0x1ef> + <2><1c4>: Abbrev Number: 9 (DW_TAG_member) + <1c5> DW_AT_name : (indirect string, offset: 0xc8): si_pid + <1c9> DW_AT_decl_file : 3 + <1ca> DW_AT_decl_line : 91 + <1cb> DW_AT_type : <0x79> + <1cf> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1d2>: Abbrev Number: 9 (DW_TAG_member) + <1d3> DW_AT_name : (indirect string, offset: 0xff): si_uid + <1d7> DW_AT_decl_file : 3 + <1d8> DW_AT_decl_line : 92 + <1d9> DW_AT_type : <0x6e> + <1dd> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1e0>: Abbrev Number: 9 (DW_TAG_member) + <1e1> DW_AT_name : (indirect string, offset: 0x1ac): si_sigval + <1e5> DW_AT_decl_file : 3 + <1e6> DW_AT_decl_line : 93 + <1e7> DW_AT_type : <0x14e> + <1eb> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1ee>: Abbrev Number: 0 + <1><1ef>: Abbrev Number: 15 (DW_TAG_structure_type) + <1f0> DW_AT_byte_size : 28 + <1f1> DW_AT_decl_file : 3 + <1f2> DW_AT_decl_line : 97 + <1f3> DW_AT_sibling : <0x23e> + <2><1f7>: Abbrev Number: 9 (DW_TAG_member) + <1f8> DW_AT_name : (indirect string, offset: 0xc8): si_pid + <1fc> DW_AT_decl_file : 3 + <1fd> DW_AT_decl_line : 99 + <1fe> DW_AT_type : <0x79> + <202> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><205>: Abbrev Number: 9 (DW_TAG_member) + <206> DW_AT_name : (indirect string, offset: 0xff): si_uid + <20a> DW_AT_decl_file : 3 + <20b> DW_AT_decl_line : 100 + <20c> DW_AT_type : <0x6e> + <210> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><213>: Abbrev Number: 9 (DW_TAG_member) + <214> DW_AT_name : (indirect string, offset: 0x1ed): si_status + <218> DW_AT_decl_file : 3 + <219> DW_AT_decl_line : 101 + <21a> DW_AT_type : <0x2b> + <21e> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><221>: Abbrev Number: 9 (DW_TAG_member) + <222> DW_AT_name : (indirect string, offset: 0x233): si_utime + <226> DW_AT_decl_file : 3 + <227> DW_AT_decl_line : 102 + <228> DW_AT_type : <0x159> + <22c> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><22f>: Abbrev Number: 9 (DW_TAG_member) + <230> DW_AT_name : (indirect string, offset: 0x13f): si_stime + <234> DW_AT_decl_file : 3 + <235> DW_AT_decl_line : 103 + <236> DW_AT_type : <0x159> + <23a> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><23d>: Abbrev Number: 0 + <1><23e>: Abbrev Number: 15 (DW_TAG_structure_type) + <23f> DW_AT_byte_size : 8 + <240> DW_AT_decl_file : 3 + <241> DW_AT_decl_line : 107 + <242> DW_AT_sibling : <0x263> + <2><246>: Abbrev Number: 9 (DW_TAG_member) + <247> DW_AT_name : (indirect string, offset: 0xb1): si_addr + <24b> DW_AT_decl_file : 3 + <24c> DW_AT_decl_line : 109 + <24d> DW_AT_type : <0x96> + <251> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><254>: Abbrev Number: 9 (DW_TAG_member) + <255> DW_AT_name : (indirect string, offset: 0xf): si_addr_lsb + <259> DW_AT_decl_file : 3 + <25a> DW_AT_decl_line : 110 + <25b> DW_AT_type : <0x24> + <25f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><262>: Abbrev Number: 0 + <1><263>: Abbrev Number: 15 (DW_TAG_structure_type) + <264> DW_AT_byte_size : 8 + <265> DW_AT_decl_file : 3 + <266> DW_AT_decl_line : 114 + <267> DW_AT_sibling : <0x288> + <2><26b>: Abbrev Number: 9 (DW_TAG_member) + <26c> DW_AT_name : (indirect string, offset: 0x259): si_band + <270> DW_AT_decl_file : 3 + <271> DW_AT_decl_line : 116 + <272> DW_AT_type : <0x55> + <276> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><279>: Abbrev Number: 9 (DW_TAG_member) + <27a> DW_AT_name : (indirect string, offset: 0x1bb): si_fd + <27e> DW_AT_decl_file : 3 + <27f> DW_AT_decl_line : 117 + <280> DW_AT_type : <0x2b> + <284> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><287>: Abbrev Number: 0 + <1><288>: Abbrev Number: 15 (DW_TAG_structure_type) + <289> DW_AT_byte_size : 12 + <28a> DW_AT_decl_file : 3 + <28b> DW_AT_decl_line : 121 + <28c> DW_AT_sibling : <0x2bb> + <2><290>: Abbrev Number: 9 (DW_TAG_member) + <291> DW_AT_name : (indirect string, offset: 0x1b): _call_addr + <295> DW_AT_decl_file : 3 + <296> DW_AT_decl_line : 123 + <297> DW_AT_type : <0x96> + <29b> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><29e>: Abbrev Number: 9 (DW_TAG_member) + <29f> DW_AT_name : (indirect string, offset: 0x148): _syscall + <2a3> DW_AT_decl_file : 3 + <2a4> DW_AT_decl_line : 124 + <2a5> DW_AT_type : <0x2b> + <2a9> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><2ac>: Abbrev Number: 9 (DW_TAG_member) + <2ad> DW_AT_name : (indirect string, offset: 0xc2): _arch + <2b1> DW_AT_decl_file : 3 + <2b2> DW_AT_decl_line : 125 + <2b3> DW_AT_type : <0x47> + <2b7> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><2ba>: Abbrev Number: 0 + <1><2bb>: Abbrev Number: 16 (DW_TAG_union_type) + <2bc> DW_AT_byte_size : 116 + <2bd> DW_AT_decl_file : 3 + <2be> DW_AT_decl_line : 69 + <2bf> DW_AT_sibling : <0x31c> + <2><2c3>: Abbrev Number: 14 (DW_TAG_member) + <2c4> DW_AT_name : (indirect string, offset: 0x129): _pad + <2c8> DW_AT_decl_file : 3 + <2c9> DW_AT_decl_line : 71 + <2ca> DW_AT_type : <0x31c> + <2><2ce>: Abbrev Number: 14 (DW_TAG_member) + <2cf> DW_AT_name : (indirect string, offset: 0x9): _kill + <2d3> DW_AT_decl_file : 3 + <2d4> DW_AT_decl_line : 78 + <2d5> DW_AT_type : <0x164> + <2><2d9>: Abbrev Number: 14 (DW_TAG_member) + <2da> DW_AT_name : (indirect string, offset: 0x1e6): _timer + <2de> DW_AT_decl_file : 3 + <2df> DW_AT_decl_line : 86 + <2e0> DW_AT_type : <0x189> + <2><2e4>: Abbrev Number: 17 (DW_TAG_member) + <2e5> DW_AT_name : _rt + <2e9> DW_AT_decl_file : 3 + <2ea> DW_AT_decl_line : 94 + <2eb> DW_AT_type : <0x1bc> + <2><2ef>: Abbrev Number: 14 (DW_TAG_member) + <2f0> DW_AT_name : (indirect string, offset: 0x22a): _sigchld + <2f4> DW_AT_decl_file : 3 + <2f5> DW_AT_decl_line : 104 + <2f6> DW_AT_type : <0x1ef> + <2><2fa>: Abbrev Number: 14 (DW_TAG_member) + <2fb> DW_AT_name : (indirect string, offset: 0x1c1): _sigfault + <2ff> DW_AT_decl_file : 3 + <300> DW_AT_decl_line : 111 + <301> DW_AT_type : <0x23e> + <2><305>: Abbrev Number: 14 (DW_TAG_member) + <306> DW_AT_name : (indirect string, offset: 0x292): _sigpoll + <30a> DW_AT_decl_file : 3 + <30b> DW_AT_decl_line : 118 + <30c> DW_AT_type : <0x263> + <2><310>: Abbrev Number: 14 (DW_TAG_member) + <311> DW_AT_name : (indirect string, offset: 0x2bb): _sigsys + <315> DW_AT_decl_file : 3 + <316> DW_AT_decl_line : 126 + <317> DW_AT_type : <0x288> + <2><31b>: Abbrev Number: 0 + <1><31c>: Abbrev Number: 18 (DW_TAG_array_type) + <31d> DW_AT_type : <0x2b> + <321> DW_AT_sibling : <0x32c> + <2><325>: Abbrev Number: 19 (DW_TAG_subrange_type) + <326> DW_AT_type : <0x84> + <32a> DW_AT_upper_bound : 28 + <2><32b>: Abbrev Number: 0 + <1><32c>: Abbrev Number: 15 (DW_TAG_structure_type) + <32d> DW_AT_byte_size : 128 + <32e> DW_AT_decl_file : 3 + <32f> DW_AT_decl_line : 62 + <330> DW_AT_sibling : <0x36d> + <2><334>: Abbrev Number: 9 (DW_TAG_member) + <335> DW_AT_name : (indirect string, offset: 0x0): si_signo + <339> DW_AT_decl_file : 3 + <33a> DW_AT_decl_line : 64 + <33b> DW_AT_type : <0x2b> + <33f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><342>: Abbrev Number: 9 (DW_TAG_member) + <343> DW_AT_name : (indirect string, offset: 0x195): si_errno + <347> DW_AT_decl_file : 3 + <348> DW_AT_decl_line : 65 + <349> DW_AT_type : <0x2b> + <34d> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><350>: Abbrev Number: 9 (DW_TAG_member) + <351> DW_AT_name : (indirect string, offset: 0x1f7): si_code + <355> DW_AT_decl_file : 3 + <356> DW_AT_decl_line : 67 + <357> DW_AT_type : <0x2b> + <35b> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><35e>: Abbrev Number: 9 (DW_TAG_member) + <35f> DW_AT_name : (indirect string, offset: 0x171): _sifields + <363> DW_AT_decl_file : 3 + <364> DW_AT_decl_line : 127 + <365> DW_AT_type : <0x2bb> + <369> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><36c>: Abbrev Number: 0 + <1><36d>: Abbrev Number: 4 (DW_TAG_typedef) + <36e> DW_AT_name : (indirect string, offset: 0x210): siginfo_t + <372> DW_AT_decl_file : 3 + <373> DW_AT_decl_line : 128 + <374> DW_AT_type : <0x32c> + <1><378>: Abbrev Number: 20 (DW_TAG_variable) + <379> DW_AT_name : (indirect string, offset: 0x12e): current_wordsize + <37d> DW_AT_decl_file : 4 + <37e> DW_AT_decl_line : 757 + <380> DW_AT_type : <0x47> + <384> DW_AT_external : 1 + <385> DW_AT_declaration : 1 + <1><386>: Abbrev Number: 20 (DW_TAG_variable) + <387> DW_AT_name : (indirect string, offset: 0x118): sysent + <38b> DW_AT_decl_file : 4 + <38c> DW_AT_decl_line : 892 + <38e> DW_AT_type : <0x119> + <392> DW_AT_external : 1 + <393> DW_AT_declaration : 1 + <1><394>: Abbrev Number: 20 (DW_TAG_variable) + <395> DW_AT_name : (indirect string, offset: 0x11f): nsyscalls + <399> DW_AT_decl_file : 4 + <39a> DW_AT_decl_line : 903 + <39c> DW_AT_type : <0x47> + <3a0> DW_AT_external : 1 + <3a1> DW_AT_declaration : 1 + <1><3a2>: Abbrev Number: 21 (DW_TAG_variable) + <3a3> DW_AT_name : (indirect string, offset: 0x17b): mpers_target_var + <3a7> DW_AT_decl_file : 5 + <3a8> DW_AT_decl_line : 41 + <3a9> DW_AT_type : <0x36d> + <3ad> DW_AT_external : 1 + <3ae> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><3b4>: Abbrev Number: 0 + diff --git a/mpers-mx32/siginfo_t.d2 b/mpers-mx32/siginfo_t.d2 new file mode 100644 index 000000000..56e1552c8 --- /dev/null +++ b/mpers-mx32/siginfo_t.d2 @@ -0,0 +1,511 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x24d): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x21a): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0xd9): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xe7): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x86): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xa4): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2a4): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x23c): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x106): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x18c): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x33): __uid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 125 +DW_AT_type : <0x47> +<1><79> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x245): __pid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 133 +DW_AT_type : <0x2b> +<1><84> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1dd): sizetype +<1><8b> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x206): __clock_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 135 +DW_AT_type : <0x63> +<1><96> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><98> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1b6): char +<1><9f> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xa5> +<1> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x98> +<1> +Abbrev Number: 8 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x118): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xfd> +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x224): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xcf): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x29b): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb9): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x9f> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 11 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x108> +<2><106> +Abbrev Number: 12 (DW_TAG_unspecified_parameters) +<1><108> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xfd> +<1><10e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x19e): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0xaa> +<1><119> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x11f> +<1><11f> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x10e> +<1><124> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x26): _Bool +<1><12b> +Abbrev Number: 13 (DW_TAG_union_type) +DW_AT_name : (indirect string, offset: 0x1ff): sigval +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 32 +DW_AT_sibling : <0x14e> +<2><137> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf5): sival_int +DW_AT_decl_file : 3 +DW_AT_decl_line : 34 +DW_AT_type : <0x2b> +<2><142> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c3): sival_ptr +DW_AT_decl_file : 3 +DW_AT_decl_line : 35 +DW_AT_type : <0x96> +<1><14e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x168): sigval_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 36 +DW_AT_type : <0x12b> +<1><159> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1cb): __sigchld_clock_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 55 +DW_AT_type : <0x8b> +<1><164> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 74 +DW_AT_sibling : <0x189> +<2><16c> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc8): si_pid +DW_AT_decl_file : 3 +DW_AT_decl_line : 76 +DW_AT_type : <0x79> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><17a> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xff): si_uid +DW_AT_decl_file : 3 +DW_AT_decl_line : 77 +DW_AT_type : <0x6e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><189> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 81 +DW_AT_sibling : <0x1bc> +<2><191> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c): si_tid +DW_AT_decl_file : 3 +DW_AT_decl_line : 83 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><19f> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x99): si_overrun +DW_AT_decl_file : 3 +DW_AT_decl_line : 84 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1ad> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ac): si_sigval +DW_AT_decl_file : 3 +DW_AT_decl_line : 85 +DW_AT_type : <0x14e> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><1bc> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 89 +DW_AT_sibling : <0x1ef> +<2><1c4> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc8): si_pid +DW_AT_decl_file : 3 +DW_AT_decl_line : 91 +DW_AT_type : <0x79> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1d2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xff): si_uid +DW_AT_decl_file : 3 +DW_AT_decl_line : 92 +DW_AT_type : <0x6e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1e0> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ac): si_sigval +DW_AT_decl_file : 3 +DW_AT_decl_line : 93 +DW_AT_type : <0x14e> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><1ef> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 28 +DW_AT_decl_file : 3 +DW_AT_decl_line : 97 +DW_AT_sibling : <0x23e> +<2><1f7> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc8): si_pid +DW_AT_decl_file : 3 +DW_AT_decl_line : 99 +DW_AT_type : <0x79> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><205> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xff): si_uid +DW_AT_decl_file : 3 +DW_AT_decl_line : 100 +DW_AT_type : <0x6e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><213> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ed): si_status +DW_AT_decl_file : 3 +DW_AT_decl_line : 101 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><221> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x233): si_utime +DW_AT_decl_file : 3 +DW_AT_decl_line : 102 +DW_AT_type : <0x159> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><22f> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x13f): si_stime +DW_AT_decl_file : 3 +DW_AT_decl_line : 103 +DW_AT_type : <0x159> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<1><23e> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 107 +DW_AT_sibling : <0x263> +<2><246> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb1): si_addr +DW_AT_decl_file : 3 +DW_AT_decl_line : 109 +DW_AT_type : <0x96> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><254> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf): si_addr_lsb +DW_AT_decl_file : 3 +DW_AT_decl_line : 110 +DW_AT_type : <0x24> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><263> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 114 +DW_AT_sibling : <0x288> +<2><26b> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x259): si_band +DW_AT_decl_file : 3 +DW_AT_decl_line : 116 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><279> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1bb): si_fd +DW_AT_decl_file : 3 +DW_AT_decl_line : 117 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><288> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 121 +DW_AT_sibling : <0x2bb> +<2><290> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b): _call_addr +DW_AT_decl_file : 3 +DW_AT_decl_line : 123 +DW_AT_type : <0x96> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><29e> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x148): _syscall +DW_AT_decl_file : 3 +DW_AT_decl_line : 124 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><2ac> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc2): _arch +DW_AT_decl_file : 3 +DW_AT_decl_line : 125 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><2bb> +Abbrev Number: 16 (DW_TAG_union_type) +DW_AT_byte_size : 116 +DW_AT_decl_file : 3 +DW_AT_decl_line : 69 +DW_AT_sibling : <0x31c> +<2><2c3> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x129): _pad +DW_AT_decl_file : 3 +DW_AT_decl_line : 71 +DW_AT_type : <0x31c> +<2><2ce> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9): _kill +DW_AT_decl_file : 3 +DW_AT_decl_line : 78 +DW_AT_type : <0x164> +<2><2d9> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e6): _timer +DW_AT_decl_file : 3 +DW_AT_decl_line : 86 +DW_AT_type : <0x189> +<2><2e4> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : _rt +DW_AT_decl_file : 3 +DW_AT_decl_line : 94 +DW_AT_type : <0x1bc> +<2><2ef> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22a): _sigchld +DW_AT_decl_file : 3 +DW_AT_decl_line : 104 +DW_AT_type : <0x1ef> +<2><2fa> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c1): _sigfault +DW_AT_decl_file : 3 +DW_AT_decl_line : 111 +DW_AT_type : <0x23e> +<2><305> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x292): _sigpoll +DW_AT_decl_file : 3 +DW_AT_decl_line : 118 +DW_AT_type : <0x263> +<2><310> +Abbrev Number: 14 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2bb): _sigsys +DW_AT_decl_file : 3 +DW_AT_decl_line : 126 +DW_AT_type : <0x288> +<1><31c> +Abbrev Number: 18 (DW_TAG_array_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x32c> +<2><325> +Abbrev Number: 19 (DW_TAG_subrange_type) +DW_AT_type : <0x84> +DW_AT_upper_bound : 28 +<1><32c> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_byte_size : 128 +DW_AT_decl_file : 3 +DW_AT_decl_line : 62 +DW_AT_sibling : <0x36d> +<2><334> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): si_signo +DW_AT_decl_file : 3 +DW_AT_decl_line : 64 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><342> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x195): si_errno +DW_AT_decl_file : 3 +DW_AT_decl_line : 65 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><350> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f7): si_code +DW_AT_decl_file : 3 +DW_AT_decl_line : 67 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><35e> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x171): _sifields +DW_AT_decl_file : 3 +DW_AT_decl_line : 127 +DW_AT_type : <0x2bb> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><36d> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x210): siginfo_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 128 +DW_AT_type : <0x32c> +<1><378> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x12e): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><386> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x118): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0x119> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><394> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x11f): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3a2> +Abbrev Number: 21 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x17b): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 41 +DW_AT_type : <0x36d> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/siginfo_t.h b/mpers-mx32/siginfo_t.h new file mode 100644 index 000000000..60df0818b --- /dev/null +++ b/mpers-mx32/siginfo_t.h @@ -0,0 +1,53 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t si_signo; +int32_t si_errno; +int32_t si_code; +union { +int32_t _pad[29]; +struct { +int32_t si_pid; +uint32_t si_uid; +} ATTRIBUTE_PACKED _kill; +struct { +int32_t si_tid; +int32_t si_overrun; +union { +int32_t sival_int; +mpers_ptr_t sival_ptr; +} si_sigval; +} ATTRIBUTE_PACKED _timer; +struct { +int32_t si_pid; +uint32_t si_uid; +union { +int32_t sival_int; +mpers_ptr_t sival_ptr; +} si_sigval; +} ATTRIBUTE_PACKED _rt; +struct { +int32_t si_pid; +uint32_t si_uid; +int32_t si_status; +int64_t si_utime; +int64_t si_stime; +} ATTRIBUTE_PACKED _sigchld; +struct { +mpers_ptr_t si_addr; +int16_t si_addr_lsb; +unsigned char mpers_end_filler_1[2]; +} ATTRIBUTE_PACKED _sigfault; +struct { +int32_t si_band; +int32_t si_fd; +} ATTRIBUTE_PACKED _sigpoll; +struct { +mpers_ptr_t _call_addr; +int32_t _syscall; +uint32_t _arch; +} ATTRIBUTE_PACKED _sigsys; +} _sifields; +} ATTRIBUTE_PACKED mx32_siginfo_t; +#define MPERS_mx32_siginfo_t mx32_siginfo_t diff --git a/mpers-mx32/stack_t.c b/mpers-mx32/stack_t.c new file mode 100644 index 000000000..2146a6638 --- /dev/null +++ b/mpers-mx32/stack_t.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993-1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2015 Dmitry V. Levin + * Copyright (c) 2015 Elvira Khabirova + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include + +stack_t mpers_target_var; diff --git a/mpers-mx32/stack_t.d1 b/mpers-mx32/stack_t.d1 new file mode 100644 index 000000000..647990036 --- /dev/null +++ b/mpers-mx32/stack_t.d1 @@ -0,0 +1,192 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x185 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xd): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x74): mpers-mx32/stack_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x125): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1a9): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x186): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x172): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xaa): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x58): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x105): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x93): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1a0): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xc4): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x169): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x120): char + <1><73>: Abbrev Number: 5 (DW_TAG_typedef) + <74> DW_AT_name : (indirect string, offset: 0x0): size_t + <78> DW_AT_decl_file : 2 + <79> DW_AT_decl_line : 212 + <7a> DW_AT_type : <0x47> + <1><7e>: Abbrev Number: 6 (DW_TAG_pointer_type) + <7f> DW_AT_byte_size : 4 + <80> DW_AT_type : <0x84> + <1><84>: Abbrev Number: 7 (DW_TAG_const_type) + <85> DW_AT_type : <0x6c> + <1><89>: Abbrev Number: 8 (DW_TAG_structure_type) + <8a> DW_AT_name : (indirect string, offset: 0xd6): sysent + <8e> DW_AT_byte_size : 20 + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 4 + <91> DW_AT_sibling : <0xdc> + <2><95>: Abbrev Number: 9 (DW_TAG_member) + <96> DW_AT_name : (indirect string, offset: 0xee): nargs + <9a> DW_AT_decl_file : 1 + <9b> DW_AT_decl_line : 5 + <9c> DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x89): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1b5): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xe7> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x6b): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x7e> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 11 (DW_TAG_subroutine_type) +
DW_AT_type : <0x2b> + DW_AT_sibling : <0xe7> + <2>: Abbrev Number: 12 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 6 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xdc> + <1>: Abbrev Number: 5 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x112): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x89> + <1>: Abbrev Number: 6 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xfe> + <1>: Abbrev Number: 7 (DW_TAG_const_type) + DW_AT_type : <0xed> + <1><103>: Abbrev Number: 2 (DW_TAG_base_type) + <104> DW_AT_byte_size : 1 + <105> DW_AT_encoding : 2 (boolean) + <106> DW_AT_name : (indirect string, offset: 0x7): _Bool + <1><10a>: Abbrev Number: 8 (DW_TAG_structure_type) + <10b> DW_AT_name : (indirect string, offset: 0xb8): sigaltstack + <10f> DW_AT_byte_size : 12 + <110> DW_AT_decl_file : 3 + <111> DW_AT_decl_line : 49 + <112> DW_AT_sibling : <0x141> + <2><116>: Abbrev Number: 9 (DW_TAG_member) + <117> DW_AT_name : (indirect string, offset: 0x180): ss_sp + <11b> DW_AT_decl_file : 3 + <11c> DW_AT_decl_line : 51 + <11d> DW_AT_type : <0x6a> + <121> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><124>: Abbrev Number: 9 (DW_TAG_member) + <125> DW_AT_name : (indirect string, offset: 0x160): ss_flags + <129> DW_AT_decl_file : 3 + <12a> DW_AT_decl_line : 52 + <12b> DW_AT_type : <0x2b> + <12f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><132>: Abbrev Number: 9 (DW_TAG_member) + <133> DW_AT_name : (indirect string, offset: 0x190): ss_size + <137> DW_AT_decl_file : 3 + <138> DW_AT_decl_line : 53 + <139> DW_AT_type : <0x73> + <13d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><140>: Abbrev Number: 0 + <1><141>: Abbrev Number: 5 (DW_TAG_typedef) + <142> DW_AT_name : (indirect string, offset: 0x198): stack_t + <146> DW_AT_decl_file : 3 + <147> DW_AT_decl_line : 54 + <148> DW_AT_type : <0x10a> + <1><14c>: Abbrev Number: 13 (DW_TAG_variable) + <14d> DW_AT_name : (indirect string, offset: 0xdd): current_wordsize + <151> DW_AT_decl_file : 4 + <152> DW_AT_decl_line : 757 + <154> DW_AT_type : <0x47> + <158> DW_AT_external : 1 + <159> DW_AT_declaration : 1 + <1><15a>: Abbrev Number: 13 (DW_TAG_variable) + <15b> DW_AT_name : (indirect string, offset: 0xd6): sysent + <15f> DW_AT_decl_file : 4 + <160> DW_AT_decl_line : 892 + <162> DW_AT_type : <0xf8> + <166> DW_AT_external : 1 + <167> DW_AT_declaration : 1 + <1><168>: Abbrev Number: 13 (DW_TAG_variable) + <169> DW_AT_name : (indirect string, offset: 0x156): nsyscalls + <16d> DW_AT_decl_file : 4 + <16e> DW_AT_decl_line : 903 + <170> DW_AT_type : <0x47> + <174> DW_AT_external : 1 + <175> DW_AT_declaration : 1 + <1><176>: Abbrev Number: 14 (DW_TAG_variable) + <177> DW_AT_name : (indirect string, offset: 0xf4): mpers_target_var + <17b> DW_AT_decl_file : 5 + <17c> DW_AT_decl_line : 38 + <17d> DW_AT_type : <0x141> + <181> DW_AT_external : 1 + <182> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><188>: Abbrev Number: 0 + diff --git a/mpers-mx32/stack_t.d2 b/mpers-mx32/stack_t.d2 new file mode 100644 index 000000000..50bf25934 --- /dev/null +++ b/mpers-mx32/stack_t.d2 @@ -0,0 +1,212 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1a9): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x186): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x172): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xaa): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x58): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x105): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x93): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a0): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xc4): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x169): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x120): char +<1><73> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): size_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 212 +DW_AT_type : <0x47> +<1><7e> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x84> +<1><84> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><89> +Abbrev Number: 8 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xd6): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xdc> +<2><95> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xee): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x89): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b5): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xe7> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6b): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 11 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xe7> +<2> +Abbrev Number: 12 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xdc> +<1> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x112): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x89> +<1> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xfe> +<1> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0xed> +<1><103> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x7): _Bool +<1><10a> +Abbrev Number: 8 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xb8): sigaltstack +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 49 +DW_AT_sibling : <0x141> +<2><116> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x180): ss_sp +DW_AT_decl_file : 3 +DW_AT_decl_line : 51 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><124> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x160): ss_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 52 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><132> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x190): ss_size +DW_AT_decl_file : 3 +DW_AT_decl_line : 53 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><141> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x198): stack_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 54 +DW_AT_type : <0x10a> +<1><14c> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xdd): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><15a> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd6): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xf8> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><168> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x156): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><176> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xf4): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 38 +DW_AT_type : <0x141> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-mx32/stack_t.h b/mpers-mx32/stack_t.h new file mode 100644 index 000000000..c9791b24b --- /dev/null +++ b/mpers-mx32/stack_t.h @@ -0,0 +1,9 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +mpers_ptr_t ss_sp; +int32_t ss_flags; +uint32_t ss_size; +} ATTRIBUTE_PACKED mx32_stack_t; +#define MPERS_mx32_stack_t mx32_stack_t diff --git a/mpers-mx32/struct_blk_user_trace_setup.c b/mpers-mx32/struct_blk_user_trace_setup.c new file mode 100644 index 000000000..273bae438 --- /dev/null +++ b/mpers-mx32/struct_blk_user_trace_setup.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2009, 2010 Jeff Mahoney + * Copyright (c) 2011-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include + +typedef struct { + int op; + int flags; + int datalen; + void *data; +} struct_blkpg_ioctl_arg; + +#define BLKPG_DEVNAMELTH 64 +#define BLKPG_VOLNAMELTH 64 +typedef struct { + int64_t start; /* starting offset in bytes */ + int64_t length; /* length in bytes */ + int pno; /* partition number */ + char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2, + to be used in kernel messages */ + char volname[BLKPG_VOLNAMELTH]; /* volume label */ +} struct_blkpg_partition; + +#define BLKTRACE_BDEV_SIZE 32 +typedef struct blk_user_trace_setup { + char name[BLKTRACE_BDEV_SIZE]; /* output */ + uint16_t act_mask; /* input */ + uint32_t buf_size; /* input */ + uint32_t buf_nr; /* input */ + uint64_t start_lba; + uint64_t end_lba; + uint32_t pid; +} struct_blk_user_trace_setup; + +struct_blk_user_trace_setup mpers_target_var; diff --git a/mpers-mx32/struct_blk_user_trace_setup.d1 b/mpers-mx32/struct_blk_user_trace_setup.d1 new file mode 100644 index 000000000..8f08e47a6 --- /dev/null +++ b/mpers-mx32/struct_blk_user_trace_setup.d1 @@ -0,0 +1,231 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1e1 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x1f): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x12e): mpers-mx32/struct_blk_user_trace_setup.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x15c): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1e7): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1bc): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1a0): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xbc): unsigned char + <1><40>: Abbrev Number: 4 (DW_TAG_typedef) + <41> DW_AT_name : (indirect string, offset: 0x1cc): uint16_t + <45> DW_AT_decl_file : 1 + <46> DW_AT_decl_line : 49 + <47> DW_AT_type : <0x4b> + <1><4b>: Abbrev Number: 2 (DW_TAG_base_type) + <4c> DW_AT_byte_size : 2 + <4d> DW_AT_encoding : 7 (unsigned) + <4e> DW_AT_name : (indirect string, offset: 0x85): short unsigned int + <1><52>: Abbrev Number: 4 (DW_TAG_typedef) + <53> DW_AT_name : (indirect string, offset: 0x1d5): uint32_t + <57> DW_AT_decl_file : 1 + <58> DW_AT_decl_line : 51 + <59> DW_AT_type : <0x5d> + <1><5d>: Abbrev Number: 2 (DW_TAG_base_type) + <5e> DW_AT_byte_size : 4 + <5f> DW_AT_encoding : 7 (unsigned) + <60> DW_AT_name : (indirect string, offset: 0x121): unsigned int + <1><64>: Abbrev Number: 4 (DW_TAG_typedef) + <65> DW_AT_name : (indirect string, offset: 0x98): uint64_t + <69> DW_AT_decl_file : 1 + <6a> DW_AT_decl_line : 58 + <6b> DW_AT_type : <0x6f> + <1><6f>: Abbrev Number: 2 (DW_TAG_base_type) + <70> DW_AT_byte_size : 8 + <71> DW_AT_encoding : 7 (unsigned) + <72> DW_AT_name : (indirect string, offset: 0x1fc): long long unsigned int + <1><76>: Abbrev Number: 2 (DW_TAG_base_type) + <77> DW_AT_byte_size : 4 + <78> DW_AT_encoding : 5 (signed) + <79> DW_AT_name : (indirect string, offset: 0x1de): long int + <1><7d>: Abbrev Number: 2 (DW_TAG_base_type) + <7e> DW_AT_byte_size : 4 + <7f> DW_AT_encoding : 7 (unsigned) + <80> DW_AT_name : (indirect string, offset: 0xca): long unsigned int + <1><84>: Abbrev Number: 2 (DW_TAG_base_type) + <85> DW_AT_byte_size : 4 + <86> DW_AT_encoding : 7 (unsigned) + <87> DW_AT_name : (indirect string, offset: 0x197): sizetype + <1><8b>: Abbrev Number: 2 (DW_TAG_base_type) + <8c> DW_AT_byte_size : 1 + <8d> DW_AT_encoding : 6 (signed char) + <8e> DW_AT_name : (indirect string, offset: 0x157): char + <1><92>: Abbrev Number: 5 (DW_TAG_array_type) + <93> DW_AT_type : <0x8b> + <97> DW_AT_sibling : <0xa2> + <2><9b>: Abbrev Number: 6 (DW_TAG_subrange_type) + <9c> DW_AT_type : <0x84> + DW_AT_upper_bound : 31 + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xa8> + <1>: Abbrev Number: 8 (DW_TAG_const_type) + DW_AT_type : <0x8b> + <1>: Abbrev Number: 9 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xdc): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 2 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x100> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1c6): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x5d> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xaa): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 11 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1f3): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0x10b> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xa1): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 + DW_AT_type : <0xa2> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1><100>: Abbrev Number: 12 (DW_TAG_subroutine_type) + <101> DW_AT_type : <0x2b> + <105> DW_AT_sibling : <0x10b> + <2><109>: Abbrev Number: 13 (DW_TAG_unspecified_parameters) + <2><10a>: Abbrev Number: 0 + <1><10b>: Abbrev Number: 7 (DW_TAG_pointer_type) + <10c> DW_AT_byte_size : 4 + <10d> DW_AT_type : <0x100> + <1><111>: Abbrev Number: 4 (DW_TAG_typedef) + <112> DW_AT_name : (indirect string, offset: 0x70): struct_sysent + <116> DW_AT_decl_file : 2 + <117> DW_AT_decl_line : 10 + <118> DW_AT_type : <0xad> + <1><11c>: Abbrev Number: 7 (DW_TAG_pointer_type) + <11d> DW_AT_byte_size : 4 + <11e> DW_AT_type : <0x122> + <1><122>: Abbrev Number: 8 (DW_TAG_const_type) + <123> DW_AT_type : <0x111> + <1><127>: Abbrev Number: 2 (DW_TAG_base_type) + <128> DW_AT_byte_size : 1 + <129> DW_AT_encoding : 2 (boolean) + <12a> DW_AT_name : (indirect string, offset: 0x6a): _Bool + <1><12e>: Abbrev Number: 9 (DW_TAG_structure_type) + <12f> DW_AT_name : (indirect string, offset: 0x0): blk_user_trace_setup + <133> DW_AT_byte_size : 72 + <134> DW_AT_decl_file : 3 + <135> DW_AT_decl_line : 54 + <136> DW_AT_sibling : <0x19d> + <2><13a>: Abbrev Number: 10 (DW_TAG_member) + <13b> DW_AT_name : (indirect string, offset: 0x1ae): name + <13f> DW_AT_decl_file : 3 + <140> DW_AT_decl_line : 55 + <141> DW_AT_type : <0x92> + <145> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><148>: Abbrev Number: 10 (DW_TAG_member) + <149> DW_AT_name : (indirect string, offset: 0x213): act_mask + <14d> DW_AT_decl_file : 3 + <14e> DW_AT_decl_line : 56 + <14f> DW_AT_type : <0x40> + <153> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><156>: Abbrev Number: 10 (DW_TAG_member) + <157> DW_AT_name : (indirect string, offset: 0x1b3): buf_size + <15b> DW_AT_decl_file : 3 + <15c> DW_AT_decl_line : 57 + <15d> DW_AT_type : <0x52> + <161> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><164>: Abbrev Number: 10 (DW_TAG_member) + <165> DW_AT_name : (indirect string, offset: 0x7e): buf_nr + <169> DW_AT_decl_file : 3 + <16a> DW_AT_decl_line : 58 + <16b> DW_AT_type : <0x52> + <16f> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><172>: Abbrev Number: 10 (DW_TAG_member) + <173> DW_AT_name : (indirect string, offset: 0x15): start_lba + <177> DW_AT_decl_file : 3 + <178> DW_AT_decl_line : 59 + <179> DW_AT_type : <0x64> + <17d> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><180>: Abbrev Number: 10 (DW_TAG_member) + <181> DW_AT_name : (indirect string, offset: 0xb4): end_lba + <185> DW_AT_decl_file : 3 + <186> DW_AT_decl_line : 60 + <187> DW_AT_type : <0x64> + <18b> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><18e>: Abbrev Number: 11 (DW_TAG_member) + <18f> DW_AT_name : pid + <193> DW_AT_decl_file : 3 + <194> DW_AT_decl_line : 61 + <195> DW_AT_type : <0x52> + <199> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><19c>: Abbrev Number: 0 + <1><19d>: Abbrev Number: 4 (DW_TAG_typedef) + <19e> DW_AT_name : (indirect string, offset: 0xf4): struct_blk_user_trace_setup + <1a2> DW_AT_decl_file : 3 + <1a3> DW_AT_decl_line : 62 + <1a4> DW_AT_type : <0x12e> + <1><1a8>: Abbrev Number: 14 (DW_TAG_variable) + <1a9> DW_AT_name : (indirect string, offset: 0xe3): current_wordsize + <1ad> DW_AT_decl_file : 4 + <1ae> DW_AT_decl_line : 757 + <1b0> DW_AT_type : <0x5d> + <1b4> DW_AT_external : 1 + <1b5> DW_AT_declaration : 1 + <1><1b6>: Abbrev Number: 14 (DW_TAG_variable) + <1b7> DW_AT_name : (indirect string, offset: 0xdc): sysent + <1bb> DW_AT_decl_file : 4 + <1bc> DW_AT_decl_line : 892 + <1be> DW_AT_type : <0x11c> + <1c2> DW_AT_external : 1 + <1c3> DW_AT_declaration : 1 + <1><1c4>: Abbrev Number: 14 (DW_TAG_variable) + <1c5> DW_AT_name : (indirect string, offset: 0x18d): nsyscalls + <1c9> DW_AT_decl_file : 4 + <1ca> DW_AT_decl_line : 903 + <1cc> DW_AT_type : <0x5d> + <1d0> DW_AT_external : 1 + <1d1> DW_AT_declaration : 1 + <1><1d2>: Abbrev Number: 15 (DW_TAG_variable) + <1d3> DW_AT_name : (indirect string, offset: 0x110): mpers_target_var + <1d7> DW_AT_decl_file : 3 + <1d8> DW_AT_decl_line : 64 + <1d9> DW_AT_type : <0x19d> + <1dd> DW_AT_external : 1 + <1de> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><1e4>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_blk_user_trace_setup.d2 b/mpers-mx32/struct_blk_user_trace_setup.d2 new file mode 100644 index 000000000..c426ba2e1 --- /dev/null +++ b/mpers-mx32/struct_blk_user_trace_setup.d2 @@ -0,0 +1,257 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1e7): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1bc): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a0): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xbc): unsigned char +<1><40> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1cc): uint16_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 49 +DW_AT_type : <0x4b> +<1><4b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x85): short unsigned int +<1><52> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1d5): uint32_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 51 +DW_AT_type : <0x5d> +<1><5d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x121): unsigned int +<1><64> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x98): uint64_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 58 +DW_AT_type : <0x6f> +<1><6f> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1fc): long long unsigned int +<1><76> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1de): long int +<1><7d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xca): long unsigned int +<1><84> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x197): sizetype +<1><8b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x157): char +<1><92> +Abbrev Number: 5 (DW_TAG_array_type) +DW_AT_type : <0x8b> +DW_AT_sibling : <0xa2> +<2><9b> +Abbrev Number: 6 (DW_TAG_subrange_type) +DW_AT_type : <0x84> +DW_AT_upper_bound : 31 +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xa8> +<1> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x8b> +<1> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xdc): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x100> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c6): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x5d> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xaa): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f3): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0x10b> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa1): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0xa2> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><100> +Abbrev Number: 12 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x10b> +<2><109> +Abbrev Number: 13 (DW_TAG_unspecified_parameters) +<1><10b> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x100> +<1><111> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x70): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0xad> +<1><11c> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x122> +<1><122> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x111> +<1><127> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x6a): _Bool +<1><12e> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): blk_user_trace_setup +DW_AT_byte_size : 72 +DW_AT_decl_file : 3 +DW_AT_decl_line : 54 +DW_AT_sibling : <0x19d> +<2><13a> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ae): name +DW_AT_decl_file : 3 +DW_AT_decl_line : 55 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><148> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x213): act_mask +DW_AT_decl_file : 3 +DW_AT_decl_line : 56 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><156> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b3): buf_size +DW_AT_decl_file : 3 +DW_AT_decl_line : 57 +DW_AT_type : <0x52> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><164> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7e): buf_nr +DW_AT_decl_file : 3 +DW_AT_decl_line : 58 +DW_AT_type : <0x52> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><172> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15): start_lba +DW_AT_decl_file : 3 +DW_AT_decl_line : 59 +DW_AT_type : <0x64> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><180> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb4): end_lba +DW_AT_decl_file : 3 +DW_AT_decl_line : 60 +DW_AT_type : <0x64> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><18e> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : pid +DW_AT_decl_file : 3 +DW_AT_decl_line : 61 +DW_AT_type : <0x52> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<1><19d> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xf4): struct_blk_user_trace_setup +DW_AT_decl_file : 3 +DW_AT_decl_line : 62 +DW_AT_type : <0x12e> +<1><1a8> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe3): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x5d> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1b6> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xdc): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0x11c> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1c4> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x18d): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x5d> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1d2> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x110): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 64 +DW_AT_type : <0x19d> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_blk_user_trace_setup.h b/mpers-mx32/struct_blk_user_trace_setup.h new file mode 100644 index 000000000..63ab60b41 --- /dev/null +++ b/mpers-mx32/struct_blk_user_trace_setup.h @@ -0,0 +1,16 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +char name[32]; +uint16_t act_mask; +unsigned char mpers_filler_1[2]; +uint32_t buf_size; +uint32_t buf_nr; +unsigned char mpers_filler_2[4]; +uint64_t start_lba; +uint64_t end_lba; +uint32_t pid; +unsigned char mpers_end_filler_3[4]; +} ATTRIBUTE_PACKED mx32_struct_blk_user_trace_setup; +#define MPERS_mx32_struct_blk_user_trace_setup mx32_struct_blk_user_trace_setup diff --git a/mpers-mx32/struct_blkpg_ioctl_arg.c b/mpers-mx32/struct_blkpg_ioctl_arg.c new file mode 100644 index 000000000..46a4fa8cc --- /dev/null +++ b/mpers-mx32/struct_blkpg_ioctl_arg.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2009, 2010 Jeff Mahoney + * Copyright (c) 2011-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include + +typedef struct { + int op; + int flags; + int datalen; + void *data; +} struct_blkpg_ioctl_arg; + +#define BLKPG_DEVNAMELTH 64 +#define BLKPG_VOLNAMELTH 64 +typedef struct { + int64_t start; /* starting offset in bytes */ + int64_t length; /* length in bytes */ + int pno; /* partition number */ + char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2, + to be used in kernel messages */ + char volname[BLKPG_VOLNAMELTH]; /* volume label */ +} struct_blkpg_partition; + +#define BLKTRACE_BDEV_SIZE 32 +typedef struct blk_user_trace_setup { + char name[BLKTRACE_BDEV_SIZE]; /* output */ + uint16_t act_mask; /* input */ + uint32_t buf_size; /* input */ + uint32_t buf_nr; /* input */ + uint64_t start_lba; + uint64_t end_lba; + uint32_t pid; +} struct_blk_user_trace_setup; + +struct_blkpg_ioctl_arg mpers_target_var; diff --git a/mpers-mx32/struct_blkpg_ioctl_arg.d1 b/mpers-mx32/struct_blkpg_ioctl_arg.d1 new file mode 100644 index 000000000..5adeb520e --- /dev/null +++ b/mpers-mx32/struct_blkpg_ioctl_arg.d1 @@ -0,0 +1,192 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x183 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xe): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x162): mpers-mx32/struct_blkpg_ioctl_arg.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x127): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1b0): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x19d): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x18f): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x9b): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x59): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x101): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x84): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1a7): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xa9): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x186): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x122): char + <1><73>: Abbrev Number: 5 (DW_TAG_pointer_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_type : <0x79> + <1><79>: Abbrev Number: 6 (DW_TAG_const_type) + <7a> DW_AT_type : <0x6c> + <1><7e>: Abbrev Number: 7 (DW_TAG_structure_type) + <7f> DW_AT_name : (indirect string, offset: 0xbb): sysent + <83> DW_AT_byte_size : 20 + <84> DW_AT_decl_file : 1 + <85> DW_AT_decl_line : 4 + <86> DW_AT_sibling : <0xd1> + <2><8a>: Abbrev Number: 8 (DW_TAG_member) + <8b> DW_AT_name : (indirect string, offset: 0xd3): nargs + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 5 + <91> DW_AT_type : <0x47> + <95> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><98>: Abbrev Number: 8 (DW_TAG_member) + <99> DW_AT_name : (indirect string, offset: 0x7a): sys_flags + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 6 + <9f> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1bc): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xdc> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x71): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x73> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xdc> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) +
DW_AT_byte_size : 4 + DW_AT_type : <0xd1> + <1>: Abbrev Number: 12 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x114): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7e> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf3> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xe2> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x0): _Bool + <1>: Abbrev Number: 13 (DW_TAG_structure_type) + <100> DW_AT_byte_size : 16 + <101> DW_AT_decl_file : 2 + <102> DW_AT_decl_line : 35 + <103> DW_AT_sibling : <0x13f> + <2><107>: Abbrev Number: 9 (DW_TAG_member) + <108> DW_AT_name : op + <10b> DW_AT_decl_file : 2 + <10c> DW_AT_decl_line : 36 + <10d> DW_AT_type : <0x2b> + <111> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><114>: Abbrev Number: 8 (DW_TAG_member) + <115> DW_AT_name : (indirect string, offset: 0x10e): flags + <119> DW_AT_decl_file : 2 + <11a> DW_AT_decl_line : 37 + <11b> DW_AT_type : <0x2b> + <11f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><122>: Abbrev Number: 8 (DW_TAG_member) + <123> DW_AT_name : (indirect string, offset: 0x6): datalen + <127> DW_AT_decl_file : 2 + <128> DW_AT_decl_line : 38 + <129> DW_AT_type : <0x2b> + <12d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><130>: Abbrev Number: 8 (DW_TAG_member) + <131> DW_AT_name : (indirect string, offset: 0x6c): data + <135> DW_AT_decl_file : 2 + <136> DW_AT_decl_line : 39 + <137> DW_AT_type : <0x6a> + <13b> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><13e>: Abbrev Number: 0 + <1><13f>: Abbrev Number: 12 (DW_TAG_typedef) + <140> DW_AT_name : (indirect string, offset: 0xea): struct_blkpg_ioctl_arg + <144> DW_AT_decl_file : 2 + <145> DW_AT_decl_line : 40 + <146> DW_AT_type : <0xff> + <1><14a>: Abbrev Number: 14 (DW_TAG_variable) + <14b> DW_AT_name : (indirect string, offset: 0xc2): current_wordsize + <14f> DW_AT_decl_file : 3 + <150> DW_AT_decl_line : 757 + <152> DW_AT_type : <0x47> + <156> DW_AT_external : 1 + <157> DW_AT_declaration : 1 + <1><158>: Abbrev Number: 14 (DW_TAG_variable) + <159> DW_AT_name : (indirect string, offset: 0xbb): sysent + <15d> DW_AT_decl_file : 3 + <15e> DW_AT_decl_line : 892 + <160> DW_AT_type : <0xed> + <164> DW_AT_external : 1 + <165> DW_AT_declaration : 1 + <1><166>: Abbrev Number: 14 (DW_TAG_variable) + <167> DW_AT_name : (indirect string, offset: 0x158): nsyscalls + <16b> DW_AT_decl_file : 3 + <16c> DW_AT_decl_line : 903 + <16e> DW_AT_type : <0x47> + <172> DW_AT_external : 1 + <173> DW_AT_declaration : 1 + <1><174>: Abbrev Number: 15 (DW_TAG_variable) + <175> DW_AT_name : (indirect string, offset: 0xd9): mpers_target_var + <179> DW_AT_decl_file : 2 + <17a> DW_AT_decl_line : 64 + <17b> DW_AT_type : <0x13f> + <17f> DW_AT_external : 1 + <180> DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) + <1><186>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_blkpg_ioctl_arg.d2 b/mpers-mx32/struct_blkpg_ioctl_arg.d2 new file mode 100644 index 000000000..bfbc25f19 --- /dev/null +++ b/mpers-mx32/struct_blkpg_ioctl_arg.d2 @@ -0,0 +1,212 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1b0): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x19d): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x18f): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x9b): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x59): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x101): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x84): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a7): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xa9): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x186): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x122): char +<1><73> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x79> +<1><79> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><7e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xbb): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd1> +<2><8a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd3): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><98> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7a): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1bc): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xdc> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x71): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xdc> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd1> +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x114): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7e> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xe2> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x0): _Bool +<1> +Abbrev Number: 13 (DW_TAG_structure_type) +DW_AT_byte_size : 16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 35 +DW_AT_sibling : <0x13f> +<2><107> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : op +DW_AT_decl_file : 2 +DW_AT_decl_line : 36 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><114> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10e): flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 37 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><122> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6): datalen +DW_AT_decl_file : 2 +DW_AT_decl_line : 38 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><130> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6c): data +DW_AT_decl_file : 2 +DW_AT_decl_line : 39 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><13f> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xea): struct_blkpg_ioctl_arg +DW_AT_decl_file : 2 +DW_AT_decl_line : 40 +DW_AT_type : <0xff> +<1><14a> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc2): current_wordsize +DW_AT_decl_file : 3 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><158> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xbb): sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 892 +DW_AT_type : <0xed> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><166> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x158): nsyscalls +DW_AT_decl_file : 3 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><174> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd9): mpers_target_var +DW_AT_decl_file : 2 +DW_AT_decl_line : 64 +DW_AT_type : <0x13f> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) diff --git a/mpers-mx32/struct_blkpg_ioctl_arg.h b/mpers-mx32/struct_blkpg_ioctl_arg.h new file mode 100644 index 000000000..c5166ba53 --- /dev/null +++ b/mpers-mx32/struct_blkpg_ioctl_arg.h @@ -0,0 +1,10 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t op; +int32_t flags; +int32_t datalen; +mpers_ptr_t data; +} ATTRIBUTE_PACKED mx32_struct_blkpg_ioctl_arg; +#define MPERS_mx32_struct_blkpg_ioctl_arg mx32_struct_blkpg_ioctl_arg diff --git a/mpers-mx32/struct_blkpg_partition.c b/mpers-mx32/struct_blkpg_partition.c new file mode 100644 index 000000000..04a04ff41 --- /dev/null +++ b/mpers-mx32/struct_blkpg_partition.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2009, 2010 Jeff Mahoney + * Copyright (c) 2011-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include + +typedef struct { + int op; + int flags; + int datalen; + void *data; +} struct_blkpg_ioctl_arg; + +#define BLKPG_DEVNAMELTH 64 +#define BLKPG_VOLNAMELTH 64 +typedef struct { + int64_t start; /* starting offset in bytes */ + int64_t length; /* length in bytes */ + int pno; /* partition number */ + char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2, + to be used in kernel messages */ + char volname[BLKPG_VOLNAMELTH]; /* volume label */ +} struct_blkpg_partition; + +#define BLKTRACE_BDEV_SIZE 32 +typedef struct blk_user_trace_setup { + char name[BLKTRACE_BDEV_SIZE]; /* output */ + uint16_t act_mask; /* input */ + uint32_t buf_size; /* input */ + uint32_t buf_nr; /* input */ + uint64_t start_lba; + uint64_t end_lba; + uint32_t pid; +} struct_blk_user_trace_setup; + +struct_blkpg_partition mpers_target_var; diff --git a/mpers-mx32/struct_blkpg_partition.d1 b/mpers-mx32/struct_blkpg_partition.d1 new file mode 100644 index 000000000..aaf6cb121 --- /dev/null +++ b/mpers-mx32/struct_blkpg_partition.d1 @@ -0,0 +1,208 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1ab (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x38): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x0): mpers-mx32/struct_blkpg_partition.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x137): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x19c): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x189): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 4 (DW_TAG_typedef) + <33> DW_AT_name : (indirect string, offset: 0x24): int64_t + <37> DW_AT_decl_file : 2 + <38> DW_AT_decl_line : 43 + <39> DW_AT_type : <0x3d> + <1><3d>: Abbrev Number: 2 (DW_TAG_base_type) + <3e> DW_AT_byte_size : 8 + <3f> DW_AT_encoding : 5 (signed) + <40> DW_AT_name : (indirect string, offset: 0x17b): long long int + <1><44>: Abbrev Number: 2 (DW_TAG_base_type) + <45> DW_AT_byte_size : 1 + <46> DW_AT_encoding : 8 (unsigned char) + <47> DW_AT_name : (indirect string, offset: 0xc8): unsigned char + <1><4b>: Abbrev Number: 2 (DW_TAG_base_type) + <4c> DW_AT_byte_size : 2 + <4d> DW_AT_encoding : 7 (unsigned) + <4e> DW_AT_name : (indirect string, offset: 0x83): short unsigned int + <1><52>: Abbrev Number: 2 (DW_TAG_base_type) + <53> DW_AT_byte_size : 4 + <54> DW_AT_encoding : 7 (unsigned) + <55> DW_AT_name : (indirect string, offset: 0x117): unsigned int + <1><59>: Abbrev Number: 2 (DW_TAG_base_type) + <5a> DW_AT_byte_size : 8 + <5b> DW_AT_encoding : 7 (unsigned) + <5c> DW_AT_name : (indirect string, offset: 0x1b8): long long unsigned int + <1><60>: Abbrev Number: 2 (DW_TAG_base_type) + <61> DW_AT_byte_size : 4 + <62> DW_AT_encoding : 5 (signed) + <63> DW_AT_name : (indirect string, offset: 0x193): long int + <1><67>: Abbrev Number: 2 (DW_TAG_base_type) + <68> DW_AT_byte_size : 4 + <69> DW_AT_encoding : 7 (unsigned) + <6a> DW_AT_name : (indirect string, offset: 0xd6): long unsigned int + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x172): sizetype + <1><75>: Abbrev Number: 2 (DW_TAG_base_type) + <76> DW_AT_byte_size : 1 + <77> DW_AT_encoding : 6 (signed char) + <78> DW_AT_name : (indirect string, offset: 0x132): char + <1><7c>: Abbrev Number: 5 (DW_TAG_pointer_type) + <7d> DW_AT_byte_size : 4 + <7e> DW_AT_type : <0x82> + <1><82>: Abbrev Number: 6 (DW_TAG_const_type) + <83> DW_AT_type : <0x75> + <1><87>: Abbrev Number: 7 (DW_TAG_structure_type) + <88> DW_AT_name : (indirect string, offset: 0xe8): sysent + <8c> DW_AT_byte_size : 20 + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 4 + <8f> DW_AT_sibling : <0xda> + <2><93>: Abbrev Number: 8 (DW_TAG_member) + <94> DW_AT_name : (indirect string, offset: 0x100): nargs + <98> DW_AT_decl_file : 1 + <99> DW_AT_decl_line : 5 + <9a> DW_AT_type : <0x52> + <9e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb6): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1a8): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xe5> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xad): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x7c> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xe5> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xda> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x124): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x87> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xfc> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xeb> + <1><101>: Abbrev Number: 2 (DW_TAG_base_type) + <102> DW_AT_byte_size : 1 + <103> DW_AT_encoding : 2 (boolean) + <104> DW_AT_name : (indirect string, offset: 0x2c): _Bool + <1><108>: Abbrev Number: 12 (DW_TAG_structure_type) + <109> DW_AT_byte_size : 152 + <10a> DW_AT_decl_file : 3 + <10b> DW_AT_decl_line : 44 + <10c> DW_AT_sibling : <0x157> + <2><110>: Abbrev Number: 8 (DW_TAG_member) + <111> DW_AT_name : (indirect string, offset: 0x32): start + <115> DW_AT_decl_file : 3 + <116> DW_AT_decl_line : 45 + <117> DW_AT_type : <0x32> + <11b> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><11e>: Abbrev Number: 8 (DW_TAG_member) + <11f> DW_AT_name : (indirect string, offset: 0x1b1): length + <123> DW_AT_decl_file : 3 + <124> DW_AT_decl_line : 46 + <125> DW_AT_type : <0x32> + <129> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><12c>: Abbrev Number: 9 (DW_TAG_member) + <12d> DW_AT_name : pno + <131> DW_AT_decl_file : 3 + <132> DW_AT_decl_line : 47 + <133> DW_AT_type : <0x2b> + <137> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><13a>: Abbrev Number: 8 (DW_TAG_member) + <13b> DW_AT_name : (indirect string, offset: 0x1cf): devname + <13f> DW_AT_decl_file : 3 + <140> DW_AT_decl_line : 48 + <141> DW_AT_type : <0x157> + <145> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><148>: Abbrev Number: 8 (DW_TAG_member) + <149> DW_AT_name : (indirect string, offset: 0xc0): volname + <14d> DW_AT_decl_file : 3 + <14e> DW_AT_decl_line : 50 + <14f> DW_AT_type : <0x157> + <153> DW_AT_data_member_location: 2 byte block: 23 54 (DW_OP_plus_uconst: 84) + <2><156>: Abbrev Number: 0 + <1><157>: Abbrev Number: 13 (DW_TAG_array_type) + <158> DW_AT_type : <0x75> + <15c> DW_AT_sibling : <0x167> + <2><160>: Abbrev Number: 14 (DW_TAG_subrange_type) + <161> DW_AT_type : <0x6e> + <165> DW_AT_upper_bound : 63 + <2><166>: Abbrev Number: 0 + <1><167>: Abbrev Number: 4 (DW_TAG_typedef) + <168> DW_AT_name : (indirect string, offset: 0x96): struct_blkpg_partition + <16c> DW_AT_decl_file : 3 + <16d> DW_AT_decl_line : 51 + <16e> DW_AT_type : <0x108> + <1><172>: Abbrev Number: 15 (DW_TAG_variable) + <173> DW_AT_name : (indirect string, offset: 0xef): current_wordsize + <177> DW_AT_decl_file : 4 + <178> DW_AT_decl_line : 757 + <17a> DW_AT_type : <0x52> + <17e> DW_AT_external : 1 + <17f> DW_AT_declaration : 1 + <1><180>: Abbrev Number: 15 (DW_TAG_variable) + <181> DW_AT_name : (indirect string, offset: 0xe8): sysent + <185> DW_AT_decl_file : 4 + <186> DW_AT_decl_line : 892 + <188> DW_AT_type : <0xf6> + <18c> DW_AT_external : 1 + <18d> DW_AT_declaration : 1 + <1><18e>: Abbrev Number: 15 (DW_TAG_variable) + <18f> DW_AT_name : (indirect string, offset: 0x168): nsyscalls + <193> DW_AT_decl_file : 4 + <194> DW_AT_decl_line : 903 + <196> DW_AT_type : <0x52> + <19a> DW_AT_external : 1 + <19b> DW_AT_declaration : 1 + <1><19c>: Abbrev Number: 16 (DW_TAG_variable) + <19d> DW_AT_name : (indirect string, offset: 0x106): mpers_target_var + <1a1> DW_AT_decl_file : 3 + <1a2> DW_AT_decl_line : 64 + <1a3> DW_AT_type : <0x167> + <1a7> DW_AT_external : 1 + <1a8> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><1ae>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_blkpg_partition.d2 b/mpers-mx32/struct_blkpg_partition.d2 new file mode 100644 index 000000000..2f00af5ae --- /dev/null +++ b/mpers-mx32/struct_blkpg_partition.d2 @@ -0,0 +1,230 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x19c): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x189): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x24): int64_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 43 +DW_AT_type : <0x3d> +<1><3d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x17b): long long int +<1><44> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xc8): unsigned char +<1><4b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x83): short unsigned int +<1><52> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x117): unsigned int +<1><59> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1b8): long long unsigned int +<1><60> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x193): long int +<1><67> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xd6): long unsigned int +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x172): sizetype +<1><75> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x132): char +<1><7c> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x82> +<1><82> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x75> +<1><87> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xe8): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xda> +<2><93> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x100): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x52> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb6): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a8): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xe5> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xad): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xe5> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xda> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x124): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x87> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xfc> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xeb> +<1><101> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x2c): _Bool +<1><108> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_byte_size : 152 +DW_AT_decl_file : 3 +DW_AT_decl_line : 44 +DW_AT_sibling : <0x157> +<2><110> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x32): start +DW_AT_decl_file : 3 +DW_AT_decl_line : 45 +DW_AT_type : <0x32> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><11e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b1): length +DW_AT_decl_file : 3 +DW_AT_decl_line : 46 +DW_AT_type : <0x32> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><12c> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : pno +DW_AT_decl_file : 3 +DW_AT_decl_line : 47 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><13a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1cf): devname +DW_AT_decl_file : 3 +DW_AT_decl_line : 48 +DW_AT_type : <0x157> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><148> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc0): volname +DW_AT_decl_file : 3 +DW_AT_decl_line : 50 +DW_AT_type : <0x157> +DW_AT_data_member_location: 2 byte block: 23 54 (DW_OP_plus_uconst: 84) +<1><157> +Abbrev Number: 13 (DW_TAG_array_type) +DW_AT_type : <0x75> +DW_AT_sibling : <0x167> +<2><160> +Abbrev Number: 14 (DW_TAG_subrange_type) +DW_AT_type : <0x6e> +DW_AT_upper_bound : 63 +<1><167> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x96): struct_blkpg_partition +DW_AT_decl_file : 3 +DW_AT_decl_line : 51 +DW_AT_type : <0x108> +<1><172> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xef): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x52> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><180> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe8): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xf6> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><18e> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x168): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x52> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><19c> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x106): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 64 +DW_AT_type : <0x167> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_blkpg_partition.h b/mpers-mx32/struct_blkpg_partition.h new file mode 100644 index 000000000..494d8b374 --- /dev/null +++ b/mpers-mx32/struct_blkpg_partition.h @@ -0,0 +1,12 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t start; +int64_t length; +int32_t pno; +char devname[64]; +char volname[64]; +unsigned char mpers_end_filler_1[4]; +} ATTRIBUTE_PACKED mx32_struct_blkpg_partition; +#define MPERS_mx32_struct_blkpg_partition mx32_struct_blkpg_partition diff --git a/mpers-mx32/struct_btrfs_ioctl_dev_replace_args.c b/mpers-mx32/struct_btrfs_ioctl_dev_replace_args.c new file mode 100644 index 000000000..c907ffb35 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_dev_replace_args.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2016 Jeff Mahoney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_BTRFS_H + + +# include + +typedef struct btrfs_ioctl_dev_replace_args + struct_btrfs_ioctl_dev_replace_args; +typedef struct btrfs_ioctl_send_args + struct_btrfs_ioctl_send_args; +typedef struct btrfs_ioctl_received_subvol_args + struct_btrfs_ioctl_received_subvol_args; +typedef struct btrfs_ioctl_vol_args_v2 + struct_btrfs_ioctl_vol_args_v2; + +#endif /* HAVE_LINUX_BTRFS_H */ + +struct_btrfs_ioctl_dev_replace_args mpers_target_var; diff --git a/mpers-mx32/struct_btrfs_ioctl_dev_replace_args.d1 b/mpers-mx32/struct_btrfs_ioctl_dev_replace_args.d1 new file mode 100644 index 000000000..600bdc5a5 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_dev_replace_args.d1 @@ -0,0 +1,327 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x2b3 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x7f): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x29c): mpers-mx32/struct_btrfs_ioctl_dev_replace_args.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x238): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x366): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x328): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x0): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x13f): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x390): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1fb): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x11a): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x338): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x14d): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x293): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x216): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x15f): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x177): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x110): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x3a3): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xfa): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x208): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x50): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x2e6): __u8 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 20 + <104> DW_AT_type : <0x39> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x28d): __u64 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 30 + <10f> DW_AT_type : <0x4e> + <1><113>: Abbrev Number: 12 (DW_TAG_structure_type) + <114> DW_AT_name : (indirect string, offset: 0x341): btrfs_ioctl_dev_replace_start_params + <118> DW_AT_byte_size : 2072 + <11a> DW_AT_decl_file : 3 + <11b> DW_AT_decl_line : 131 + <11c> DW_AT_sibling : <0x15a> + <2><120>: Abbrev Number: 7 (DW_TAG_member) + <121> DW_AT_name : (indirect string, offset: 0x70): srcdevid + <125> DW_AT_decl_file : 3 + <126> DW_AT_decl_line : 132 + <127> DW_AT_type : <0x108> + <12b> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><12e>: Abbrev Number: 7 (DW_TAG_member) + <12f> DW_AT_name : (indirect string, offset: 0x372): cont_reading_from_srcdev_mode + <133> DW_AT_decl_file : 3 + <134> DW_AT_decl_line : 133 + <135> DW_AT_type : <0x108> + <139> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><13c>: Abbrev Number: 7 (DW_TAG_member) + <13d> DW_AT_name : (indirect string, offset: 0xca): srcdev_name + <141> DW_AT_decl_file : 3 + <142> DW_AT_decl_line : 135 + <143> DW_AT_type : <0x15a> + <147> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><14a>: Abbrev Number: 7 (DW_TAG_member) + <14b> DW_AT_name : (indirect string, offset: 0x3ac): tgtdev_name + <14f> DW_AT_decl_file : 3 + <150> DW_AT_decl_line : 136 + <151> DW_AT_type : <0x15a> + <155> DW_AT_data_member_location: 3 byte block: 23 91 8 (DW_OP_plus_uconst: 1041) + <2><159>: Abbrev Number: 0 + <1><15a>: Abbrev Number: 13 (DW_TAG_array_type) + <15b> DW_AT_type : <0xfd> + <15f> DW_AT_sibling : <0x16b> + <2><163>: Abbrev Number: 14 (DW_TAG_subrange_type) + <164> DW_AT_type : <0x63> + <168> DW_AT_upper_bound : 1024 + <2><16a>: Abbrev Number: 0 + <1><16b>: Abbrev Number: 6 (DW_TAG_structure_type) + <16c> DW_AT_name : (indirect string, offset: 0x1ad): btrfs_ioctl_dev_replace_status_params + <170> DW_AT_byte_size : 48 + <171> DW_AT_decl_file : 3 + <172> DW_AT_decl_line : 144 + <173> DW_AT_sibling : <0x1cc> + <2><177>: Abbrev Number: 7 (DW_TAG_member) + <178> DW_AT_name : (indirect string, offset: 0x131): replace_state + <17c> DW_AT_decl_file : 3 + <17d> DW_AT_decl_line : 145 + <17e> DW_AT_type : <0x108> + <182> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><185>: Abbrev Number: 7 (DW_TAG_member) + <186> DW_AT_name : (indirect string, offset: 0xe): progress_1000 + <18a> DW_AT_decl_file : 3 + <18b> DW_AT_decl_line : 146 + <18c> DW_AT_type : <0x108> + <190> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><193>: Abbrev Number: 7 (DW_TAG_member) + <194> DW_AT_name : (indirect string, offset: 0x103): time_started + <198> DW_AT_decl_file : 3 + <199> DW_AT_decl_line : 147 + <19a> DW_AT_type : <0x108> + <19e> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><1a1>: Abbrev Number: 7 (DW_TAG_member) + <1a2> DW_AT_name : (indirect string, offset: 0x2eb): time_stopped + <1a6> DW_AT_decl_file : 3 + <1a7> DW_AT_decl_line : 148 + <1a8> DW_AT_type : <0x108> + <1ac> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1af>: Abbrev Number: 7 (DW_TAG_member) + <1b0> DW_AT_name : (indirect string, offset: 0x317): num_write_errors + <1b4> DW_AT_decl_file : 3 + <1b5> DW_AT_decl_line : 149 + <1b6> DW_AT_type : <0x108> + <1ba> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1bd>: Abbrev Number: 7 (DW_TAG_member) + <1be> DW_AT_name : (indirect string, offset: 0x1dd): num_uncorrectable_read_errors + <1c2> DW_AT_decl_file : 3 + <1c3> DW_AT_decl_line : 150 + <1c4> DW_AT_type : <0x108> + <1c8> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1cb>: Abbrev Number: 0 + <1><1cc>: Abbrev Number: 15 (DW_TAG_union_type) + <1cd> DW_AT_byte_size : 2072 + <1cf> DW_AT_decl_file : 3 + <1d0> DW_AT_decl_line : 163 + <1d1> DW_AT_sibling : <0x1ec> + <2><1d5>: Abbrev Number: 16 (DW_TAG_member) + <1d6> DW_AT_name : (indirect string, offset: 0x79): start + <1da> DW_AT_decl_file : 3 + <1db> DW_AT_decl_line : 164 + <1dc> DW_AT_type : <0x113> + <2><1e0>: Abbrev Number: 16 (DW_TAG_member) + <1e1> DW_AT_name : (indirect string, offset: 0xf3): status + <1e5> DW_AT_decl_file : 3 + <1e6> DW_AT_decl_line : 165 + <1e7> DW_AT_type : <0x16b> + <2><1eb>: Abbrev Number: 0 + <1><1ec>: Abbrev Number: 12 (DW_TAG_structure_type) + <1ed> DW_AT_name : (indirect string, offset: 0xd6): btrfs_ioctl_dev_replace_args + <1f1> DW_AT_byte_size : 2600 + <1f3> DW_AT_decl_file : 3 + <1f4> DW_AT_decl_line : 159 + <1f5> DW_AT_sibling : <0x22d> + <2><1f9>: Abbrev Number: 8 (DW_TAG_member) + <1fa> DW_AT_name : cmd + <1fe> DW_AT_decl_file : 3 + <1ff> DW_AT_decl_line : 160 + <200> DW_AT_type : <0x108> + <204> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><207>: Abbrev Number: 7 (DW_TAG_member) + <208> DW_AT_name : (indirect string, offset: 0x231): result + <20c> DW_AT_decl_file : 3 + <20d> DW_AT_decl_line : 161 + <20e> DW_AT_type : <0x108> + <212> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><215>: Abbrev Number: 17 (DW_TAG_member) + <216> DW_AT_type : <0x1cc> + <21a> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><21d>: Abbrev Number: 7 (DW_TAG_member) + <21e> DW_AT_name : (indirect string, offset: 0x332): spare + <222> DW_AT_decl_file : 3 + <223> DW_AT_decl_line : 168 + <224> DW_AT_type : <0x22d> + <228> DW_AT_data_member_location: 3 byte block: 23 a8 10 (DW_OP_plus_uconst: 2088) + <2><22c>: Abbrev Number: 0 + <1><22d>: Abbrev Number: 13 (DW_TAG_array_type) + <22e> DW_AT_type : <0x108> + <232> DW_AT_sibling : <0x23d> + <2><236>: Abbrev Number: 18 (DW_TAG_subrange_type) + <237> DW_AT_type : <0x63> + <23b> DW_AT_upper_bound : 63 + <2><23c>: Abbrev Number: 0 + <1><23d>: Abbrev Number: 19 (DW_TAG_enumeration_type) + <23e> DW_AT_name : (indirect string, offset: 0x21b): btrfs_dev_stat_values + <242> DW_AT_byte_size : 4 + <243> DW_AT_decl_file : 3 + <244> DW_AT_decl_line : 369 + <246> DW_AT_sibling : <0x26f> + <2><24a>: Abbrev Number: 20 (DW_TAG_enumerator) + <24b> DW_AT_name : (indirect string, offset: 0x56): BTRFS_DEV_STAT_WRITE_ERRS + <24f> DW_AT_const_value : 0 + <2><250>: Abbrev Number: 20 (DW_TAG_enumerator) + <251> DW_AT_name : (indirect string, offset: 0x2cd): BTRFS_DEV_STAT_READ_ERRS + <255> DW_AT_const_value : 1 + <2><256>: Abbrev Number: 20 (DW_TAG_enumerator) + <257> DW_AT_name : (indirect string, offset: 0x1c): BTRFS_DEV_STAT_FLUSH_ERRS + <25b> DW_AT_const_value : 2 + <2><25c>: Abbrev Number: 20 (DW_TAG_enumerator) + <25d> DW_AT_name : (indirect string, offset: 0x18e): BTRFS_DEV_STAT_CORRUPTION_ERRS + <261> DW_AT_const_value : 3 + <2><262>: Abbrev Number: 20 (DW_TAG_enumerator) + <263> DW_AT_name : (indirect string, offset: 0x2f8): BTRFS_DEV_STAT_GENERATION_ERRS + <267> DW_AT_const_value : 4 + <2><268>: Abbrev Number: 20 (DW_TAG_enumerator) + <269> DW_AT_name : (indirect string, offset: 0x36): BTRFS_DEV_STAT_VALUES_MAX + <26d> DW_AT_const_value : 5 + <2><26e>: Abbrev Number: 0 + <1><26f>: Abbrev Number: 11 (DW_TAG_typedef) + <270> DW_AT_name : (indirect string, offset: 0x269): struct_btrfs_ioctl_dev_replace_args + <274> DW_AT_decl_file : 4 + <275> DW_AT_decl_line : 36 + <276> DW_AT_type : <0x1ec> + <1><27a>: Abbrev Number: 21 (DW_TAG_variable) + <27b> DW_AT_name : (indirect string, offset: 0x166): current_wordsize + <27f> DW_AT_decl_file : 5 + <280> DW_AT_decl_line : 757 + <282> DW_AT_type : <0x47> + <286> DW_AT_external : 1 + <287> DW_AT_declaration : 1 + <1><288>: Abbrev Number: 21 (DW_TAG_variable) + <289> DW_AT_name : (indirect string, offset: 0x15f): sysent + <28d> DW_AT_decl_file : 5 + <28e> DW_AT_decl_line : 892 + <290> DW_AT_type : <0xeb> + <294> DW_AT_external : 1 + <295> DW_AT_declaration : 1 + <1><296>: Abbrev Number: 21 (DW_TAG_variable) + <297> DW_AT_name : (indirect string, offset: 0x1d3): nsyscalls + <29b> DW_AT_decl_file : 5 + <29c> DW_AT_decl_line : 903 + <29e> DW_AT_type : <0x47> + <2a2> DW_AT_external : 1 + <2a3> DW_AT_declaration : 1 + <1><2a4>: Abbrev Number: 22 (DW_TAG_variable) + <2a5> DW_AT_name : (indirect string, offset: 0x17d): mpers_target_var + <2a9> DW_AT_decl_file : 4 + <2aa> DW_AT_decl_line : 46 + <2ab> DW_AT_type : <0x26f> + <2af> DW_AT_external : 1 + <2b0> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><2b6>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_btrfs_ioctl_dev_replace_args.d2 b/mpers-mx32/struct_btrfs_ioctl_dev_replace_args.d2 new file mode 100644 index 000000000..5018cb68f --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_dev_replace_args.d2 @@ -0,0 +1,368 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x366): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x328): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x0): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x13f): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x390): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1fb): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x11a): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x338): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x14d): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x293): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x216): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x15f): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x177): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x110): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a3): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xfa): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x208): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x50): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2e6): __u8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 20 +DW_AT_type : <0x39> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x28d): __u64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><113> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x341): btrfs_ioctl_dev_replace_start_params +DW_AT_byte_size : 2072 +DW_AT_decl_file : 3 +DW_AT_decl_line : 131 +DW_AT_sibling : <0x15a> +<2><120> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x70): srcdevid +DW_AT_decl_file : 3 +DW_AT_decl_line : 132 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><12e> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x372): cont_reading_from_srcdev_mode +DW_AT_decl_file : 3 +DW_AT_decl_line : 133 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><13c> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xca): srcdev_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 135 +DW_AT_type : <0x15a> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><14a> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3ac): tgtdev_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 136 +DW_AT_type : <0x15a> +DW_AT_data_member_location: 3 byte block: 23 91 8 (DW_OP_plus_uconst: 1041) +<1><15a> +Abbrev Number: 13 (DW_TAG_array_type) +DW_AT_type : <0xfd> +DW_AT_sibling : <0x16b> +<2><163> +Abbrev Number: 14 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1024 +<1><16b> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1ad): btrfs_ioctl_dev_replace_status_params +DW_AT_byte_size : 48 +DW_AT_decl_file : 3 +DW_AT_decl_line : 144 +DW_AT_sibling : <0x1cc> +<2><177> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x131): replace_state +DW_AT_decl_file : 3 +DW_AT_decl_line : 145 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><185> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe): progress_1000 +DW_AT_decl_file : 3 +DW_AT_decl_line : 146 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><193> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x103): time_started +DW_AT_decl_file : 3 +DW_AT_decl_line : 147 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><1a1> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2eb): time_stopped +DW_AT_decl_file : 3 +DW_AT_decl_line : 148 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1af> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x317): num_write_errors +DW_AT_decl_file : 3 +DW_AT_decl_line : 149 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1bd> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1dd): num_uncorrectable_read_errors +DW_AT_decl_file : 3 +DW_AT_decl_line : 150 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<1><1cc> +Abbrev Number: 15 (DW_TAG_union_type) +DW_AT_byte_size : 2072 +DW_AT_decl_file : 3 +DW_AT_decl_line : 163 +DW_AT_sibling : <0x1ec> +<2><1d5> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x79): start +DW_AT_decl_file : 3 +DW_AT_decl_line : 164 +DW_AT_type : <0x113> +<2><1e0> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf3): status +DW_AT_decl_file : 3 +DW_AT_decl_line : 165 +DW_AT_type : <0x16b> +<1><1ec> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xd6): btrfs_ioctl_dev_replace_args +DW_AT_byte_size : 2600 +DW_AT_decl_file : 3 +DW_AT_decl_line : 159 +DW_AT_sibling : <0x22d> +<2><1f9> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : cmd +DW_AT_decl_file : 3 +DW_AT_decl_line : 160 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><207> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x231): result +DW_AT_decl_file : 3 +DW_AT_decl_line : 161 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><215> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_type : <0x1cc> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><21d> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x332): spare +DW_AT_decl_file : 3 +DW_AT_decl_line : 168 +DW_AT_type : <0x22d> +DW_AT_data_member_location: 3 byte block: 23 a8 10 (DW_OP_plus_uconst: 2088) +<1><22d> +Abbrev Number: 13 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x23d> +<2><236> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 63 +<1><23d> +Abbrev Number: 19 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x21b): btrfs_dev_stat_values +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 369 +DW_AT_sibling : <0x26f> +<2><24a> +Abbrev Number: 20 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x56): BTRFS_DEV_STAT_WRITE_ERRS +DW_AT_const_value : 0 +<2><250> +Abbrev Number: 20 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x2cd): BTRFS_DEV_STAT_READ_ERRS +DW_AT_const_value : 1 +<2><256> +Abbrev Number: 20 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1c): BTRFS_DEV_STAT_FLUSH_ERRS +DW_AT_const_value : 2 +<2><25c> +Abbrev Number: 20 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x18e): BTRFS_DEV_STAT_CORRUPTION_ERRS +DW_AT_const_value : 3 +<2><262> +Abbrev Number: 20 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x2f8): BTRFS_DEV_STAT_GENERATION_ERRS +DW_AT_const_value : 4 +<2><268> +Abbrev Number: 20 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x36): BTRFS_DEV_STAT_VALUES_MAX +DW_AT_const_value : 5 +<1><26f> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x269): struct_btrfs_ioctl_dev_replace_args +DW_AT_decl_file : 4 +DW_AT_decl_line : 36 +DW_AT_type : <0x1ec> +<1><27a> +Abbrev Number: 21 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x166): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><288> +Abbrev Number: 21 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x15f): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><296> +Abbrev Number: 21 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1d3): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2a4> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x17d): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x26f> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_btrfs_ioctl_dev_replace_args.h b/mpers-mx32/struct_btrfs_ioctl_dev_replace_args.h new file mode 100644 index 000000000..b9775fed5 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_dev_replace_args.h @@ -0,0 +1,26 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint64_t cmd; +uint64_t result; +union { +struct { +uint64_t srcdevid; +uint64_t cont_reading_from_srcdev_mode; +unsigned char srcdev_name[1025]; +unsigned char tgtdev_name[1025]; +unsigned char mpers_end_filler_1[6]; +} ATTRIBUTE_PACKED start; +struct { +uint64_t replace_state; +uint64_t progress_1000; +uint64_t time_started; +uint64_t time_stopped; +uint64_t num_write_errors; +uint64_t num_uncorrectable_read_errors; +} ATTRIBUTE_PACKED status; +} ; +uint64_t spare[64]; +} ATTRIBUTE_PACKED mx32_struct_btrfs_ioctl_dev_replace_args; +#define MPERS_mx32_struct_btrfs_ioctl_dev_replace_args mx32_struct_btrfs_ioctl_dev_replace_args diff --git a/mpers-mx32/struct_btrfs_ioctl_received_subvol_args.c b/mpers-mx32/struct_btrfs_ioctl_received_subvol_args.c new file mode 100644 index 000000000..a62dfd3bb --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_received_subvol_args.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2016 Jeff Mahoney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_BTRFS_H + + +# include + +typedef struct btrfs_ioctl_dev_replace_args + struct_btrfs_ioctl_dev_replace_args; +typedef struct btrfs_ioctl_send_args + struct_btrfs_ioctl_send_args; +typedef struct btrfs_ioctl_received_subvol_args + struct_btrfs_ioctl_received_subvol_args; +typedef struct btrfs_ioctl_vol_args_v2 + struct_btrfs_ioctl_vol_args_v2; + +#endif /* HAVE_LINUX_BTRFS_H */ + +struct_btrfs_ioctl_received_subvol_args mpers_target_var; diff --git a/mpers-mx32/struct_btrfs_ioctl_received_subvol_args.d1 b/mpers-mx32/struct_btrfs_ioctl_received_subvol_args.d1 new file mode 100644 index 000000000..fcd884683 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_received_subvol_args.d1 @@ -0,0 +1,277 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x24c (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x7c): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x292): mpers-mx32/struct_btrfs_ioctl_received_subvol_args.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1f1): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x2e0): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x2c7): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x0): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x121): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x2ec): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1be): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x101): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x2d1): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x144): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x232): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x1d6): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x156): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x188): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0xf7): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x2ff): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xcd): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x6e): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x50): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x56): __u32 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 26 + <104> DW_AT_type : <0x47> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x22c): __u64 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 30 + <10f> DW_AT_type : <0x4e> + <1><113>: Abbrev Number: 12 (DW_TAG_enumeration_type) + <114> DW_AT_name : (indirect string, offset: 0x1db): btrfs_dev_stat_values + <118> DW_AT_byte_size : 4 + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 369 + <11c> DW_AT_sibling : <0x145> + <2><120>: Abbrev Number: 13 (DW_TAG_enumerator) + <121> DW_AT_name : (indirect string, offset: 0x15d): BTRFS_DEV_STAT_WRITE_ERRS + <125> DW_AT_const_value : 0 + <2><126>: Abbrev Number: 13 (DW_TAG_enumerator) + <127> DW_AT_name : (indirect string, offset: 0x255): BTRFS_DEV_STAT_READ_ERRS + <12b> DW_AT_const_value : 1 + <2><12c>: Abbrev Number: 13 (DW_TAG_enumerator) + <12d> DW_AT_name : (indirect string, offset: 0x23b): BTRFS_DEV_STAT_FLUSH_ERRS + <131> DW_AT_const_value : 2 + <2><132>: Abbrev Number: 13 (DW_TAG_enumerator) + <133> DW_AT_name : (indirect string, offset: 0x19f): BTRFS_DEV_STAT_CORRUPTION_ERRS + <137> DW_AT_const_value : 3 + <2><138>: Abbrev Number: 13 (DW_TAG_enumerator) + <139> DW_AT_name : (indirect string, offset: 0x273): BTRFS_DEV_STAT_GENERATION_ERRS + <13d> DW_AT_const_value : 4 + <2><13e>: Abbrev Number: 13 (DW_TAG_enumerator) + <13f> DW_AT_name : (indirect string, offset: 0xe): BTRFS_DEV_STAT_VALUES_MAX + <143> DW_AT_const_value : 5 + <2><144>: Abbrev Number: 0 + <1><145>: Abbrev Number: 14 (DW_TAG_structure_type) + <146> DW_AT_name : (indirect string, offset: 0x12f): btrfs_ioctl_timespec + <14a> DW_AT_byte_size : 16 + <14b> DW_AT_decl_file : 3 + <14c> DW_AT_decl_line : 426 + <14e> DW_AT_sibling : <0x171> + <2><152>: Abbrev Number: 15 (DW_TAG_member) + <153> DW_AT_name : sec + <157> DW_AT_decl_file : 3 + <158> DW_AT_decl_line : 427 + <15a> DW_AT_type : <0x108> + <15e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><161>: Abbrev Number: 16 (DW_TAG_member) + <162> DW_AT_name : (indirect string, offset: 0x26e): nsec + <166> DW_AT_decl_file : 3 + <167> DW_AT_decl_line : 428 + <169> DW_AT_type : <0xfd> + <16d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><170>: Abbrev Number: 0 + <1><171>: Abbrev Number: 14 (DW_TAG_structure_type) + <172> DW_AT_name : (indirect string, offset: 0xd6): btrfs_ioctl_received_subvol_args + <176> DW_AT_byte_size : 200 + <177> DW_AT_decl_file : 3 + <178> DW_AT_decl_line : 431 + <17a> DW_AT_sibling : <0x1e8> + <2><17e>: Abbrev Number: 16 (DW_TAG_member) + <17f> DW_AT_name : (indirect string, offset: 0x1d1): uuid + <183> DW_AT_decl_file : 3 + <184> DW_AT_decl_line : 432 + <186> DW_AT_type : <0x1e8> + <18a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><18d>: Abbrev Number: 16 (DW_TAG_member) + <18e> DW_AT_name : (indirect string, offset: 0x65): stransid + <192> DW_AT_decl_file : 3 + <193> DW_AT_decl_line : 433 + <195> DW_AT_type : <0x108> + <199> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><19c>: Abbrev Number: 16 (DW_TAG_member) + <19d> DW_AT_name : (indirect string, offset: 0x118): rtransid + <1a1> DW_AT_decl_file : 3 + <1a2> DW_AT_decl_line : 434 + <1a4> DW_AT_type : <0x108> + <1a8> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1ab>: Abbrev Number: 16 (DW_TAG_member) + <1ac> DW_AT_name : (indirect string, offset: 0xc7): stime + <1b0> DW_AT_decl_file : 3 + <1b1> DW_AT_decl_line : 435 + <1b3> DW_AT_type : <0x145> + <1b7> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1ba>: Abbrev Number: 16 (DW_TAG_member) + <1bb> DW_AT_name : (indirect string, offset: 0x2da): rtime + <1bf> DW_AT_decl_file : 3 + <1c0> DW_AT_decl_line : 436 + <1c2> DW_AT_type : <0x145> + <1c6> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><1c9>: Abbrev Number: 16 (DW_TAG_member) + <1ca> DW_AT_name : (indirect string, offset: 0x1cb): flags + <1ce> DW_AT_decl_file : 3 + <1cf> DW_AT_decl_line : 437 + <1d1> DW_AT_type : <0x108> + <1d5> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><1d8>: Abbrev Number: 16 (DW_TAG_member) + <1d9> DW_AT_name : (indirect string, offset: 0x5c): reserved + <1dd> DW_AT_decl_file : 3 + <1de> DW_AT_decl_line : 438 + <1e0> DW_AT_type : <0x1f8> + <1e4> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><1e7>: Abbrev Number: 0 + <1><1e8>: Abbrev Number: 17 (DW_TAG_array_type) + <1e9> DW_AT_type : <0x6a> + <1ed> DW_AT_sibling : <0x1f8> + <2><1f1>: Abbrev Number: 18 (DW_TAG_subrange_type) + <1f2> DW_AT_type : <0x63> + <1f6> DW_AT_upper_bound : 15 + <2><1f7>: Abbrev Number: 0 + <1><1f8>: Abbrev Number: 17 (DW_TAG_array_type) + <1f9> DW_AT_type : <0x108> + <1fd> DW_AT_sibling : <0x208> + <2><201>: Abbrev Number: 18 (DW_TAG_subrange_type) + <202> DW_AT_type : <0x63> + <206> DW_AT_upper_bound : 15 + <2><207>: Abbrev Number: 0 + <1><208>: Abbrev Number: 11 (DW_TAG_typedef) + <209> DW_AT_name : (indirect string, offset: 0x28): struct_btrfs_ioctl_received_subvol_args + <20d> DW_AT_decl_file : 4 + <20e> DW_AT_decl_line : 40 + <20f> DW_AT_type : <0x171> + <1><213>: Abbrev Number: 19 (DW_TAG_variable) + <214> DW_AT_name : (indirect string, offset: 0x177): current_wordsize + <218> DW_AT_decl_file : 5 + <219> DW_AT_decl_line : 757 + <21b> DW_AT_type : <0x47> + <21f> DW_AT_external : 1 + <220> DW_AT_declaration : 1 + <1><221>: Abbrev Number: 19 (DW_TAG_variable) + <222> DW_AT_name : (indirect string, offset: 0x156): sysent + <226> DW_AT_decl_file : 5 + <227> DW_AT_decl_line : 892 + <229> DW_AT_type : <0xeb> + <22d> DW_AT_external : 1 + <22e> DW_AT_declaration : 1 + <1><22f>: Abbrev Number: 19 (DW_TAG_variable) + <230> DW_AT_name : (indirect string, offset: 0x222): nsyscalls + <234> DW_AT_decl_file : 5 + <235> DW_AT_decl_line : 903 + <237> DW_AT_type : <0x47> + <23b> DW_AT_external : 1 + <23c> DW_AT_declaration : 1 + <1><23d>: Abbrev Number: 20 (DW_TAG_variable) + <23e> DW_AT_name : (indirect string, offset: 0x18e): mpers_target_var + <242> DW_AT_decl_file : 4 + <243> DW_AT_decl_line : 46 + <244> DW_AT_type : <0x208> + <248> DW_AT_external : 1 + <249> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><24f>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_btrfs_ioctl_received_subvol_args.d2 b/mpers-mx32/struct_btrfs_ioctl_received_subvol_args.d2 new file mode 100644 index 000000000..fe6cf7fe6 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_received_subvol_args.d2 @@ -0,0 +1,311 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x2e0): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x2c7): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x0): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x121): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2ec): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1be): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x101): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x2d1): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x144): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x232): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1d6): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x156): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x188): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf7): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2ff): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xcd): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x6e): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x50): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x56): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x22c): __u64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><113> +Abbrev Number: 12 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x1db): btrfs_dev_stat_values +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 369 +DW_AT_sibling : <0x145> +<2><120> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x15d): BTRFS_DEV_STAT_WRITE_ERRS +DW_AT_const_value : 0 +<2><126> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x255): BTRFS_DEV_STAT_READ_ERRS +DW_AT_const_value : 1 +<2><12c> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x23b): BTRFS_DEV_STAT_FLUSH_ERRS +DW_AT_const_value : 2 +<2><132> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x19f): BTRFS_DEV_STAT_CORRUPTION_ERRS +DW_AT_const_value : 3 +<2><138> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x273): BTRFS_DEV_STAT_GENERATION_ERRS +DW_AT_const_value : 4 +<2><13e> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0xe): BTRFS_DEV_STAT_VALUES_MAX +DW_AT_const_value : 5 +<1><145> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x12f): btrfs_ioctl_timespec +DW_AT_byte_size : 16 +DW_AT_decl_file : 3 +DW_AT_decl_line : 426 +DW_AT_sibling : <0x171> +<2><152> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : sec +DW_AT_decl_file : 3 +DW_AT_decl_line : 427 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><161> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x26e): nsec +DW_AT_decl_file : 3 +DW_AT_decl_line : 428 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><171> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xd6): btrfs_ioctl_received_subvol_args +DW_AT_byte_size : 200 +DW_AT_decl_file : 3 +DW_AT_decl_line : 431 +DW_AT_sibling : <0x1e8> +<2><17e> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d1): uuid +DW_AT_decl_file : 3 +DW_AT_decl_line : 432 +DW_AT_type : <0x1e8> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><18d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x65): stransid +DW_AT_decl_file : 3 +DW_AT_decl_line : 433 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><19c> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x118): rtransid +DW_AT_decl_file : 3 +DW_AT_decl_line : 434 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1ab> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc7): stime +DW_AT_decl_file : 3 +DW_AT_decl_line : 435 +DW_AT_type : <0x145> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1ba> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2da): rtime +DW_AT_decl_file : 3 +DW_AT_decl_line : 436 +DW_AT_type : <0x145> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><1c9> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1cb): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 437 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><1d8> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5c): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 438 +DW_AT_type : <0x1f8> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<1><1e8> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x1f8> +<2><1f1> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 15 +<1><1f8> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x208> +<2><201> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 15 +<1><208> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x28): struct_btrfs_ioctl_received_subvol_args +DW_AT_decl_file : 4 +DW_AT_decl_line : 40 +DW_AT_type : <0x171> +<1><213> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x177): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><221> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x156): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><22f> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x222): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><23d> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x18e): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x208> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_btrfs_ioctl_received_subvol_args.h b/mpers-mx32/struct_btrfs_ioctl_received_subvol_args.h new file mode 100644 index 000000000..ec51a9bf6 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_received_subvol_args.h @@ -0,0 +1,21 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +char uuid[16]; +uint64_t stransid; +uint64_t rtransid; +struct { +uint64_t sec; +uint32_t nsec; +unsigned char mpers_end_filler_1[4]; +} ATTRIBUTE_PACKED stime; +struct { +uint64_t sec; +uint32_t nsec; +unsigned char mpers_end_filler_1[4]; +} ATTRIBUTE_PACKED rtime; +uint64_t flags; +uint64_t reserved[16]; +} ATTRIBUTE_PACKED mx32_struct_btrfs_ioctl_received_subvol_args; +#define MPERS_mx32_struct_btrfs_ioctl_received_subvol_args mx32_struct_btrfs_ioctl_received_subvol_args diff --git a/mpers-mx32/struct_btrfs_ioctl_send_args.c b/mpers-mx32/struct_btrfs_ioctl_send_args.c new file mode 100644 index 000000000..6a8a43a25 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_send_args.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2016 Jeff Mahoney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_BTRFS_H + + +# include + +typedef struct btrfs_ioctl_dev_replace_args + struct_btrfs_ioctl_dev_replace_args; +typedef struct btrfs_ioctl_send_args + struct_btrfs_ioctl_send_args; +typedef struct btrfs_ioctl_received_subvol_args + struct_btrfs_ioctl_received_subvol_args; +typedef struct btrfs_ioctl_vol_args_v2 + struct_btrfs_ioctl_vol_args_v2; + +#endif /* HAVE_LINUX_BTRFS_H */ + +struct_btrfs_ioctl_send_args mpers_target_var; diff --git a/mpers-mx32/struct_btrfs_ioctl_send_args.d1 b/mpers-mx32/struct_btrfs_ioctl_send_args.d1 new file mode 100644 index 000000000..636484555 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_send_args.d1 @@ -0,0 +1,248 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x207 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x4f): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x27b): mpers-mx32/struct_btrfs_ioctl_send_args.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1c3): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x2ae): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x150): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x104): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x112): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x9a): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x179): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x2c3): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x2a5): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x120): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x204): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x19a): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x132): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x14a): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0xfa): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x2ba): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xad): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x18c): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x26): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x2da): __s64 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 29 + <104> DW_AT_type : <0x32> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x1fe): __u64 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 30 + <10f> DW_AT_type : <0x4e> + <1><113>: Abbrev Number: 12 (DW_TAG_array_type) + <114> DW_AT_type : <0x108> + <118> DW_AT_sibling : <0x123> + <2><11c>: Abbrev Number: 13 (DW_TAG_subrange_type) + <11d> DW_AT_type : <0x63> + <121> DW_AT_upper_bound : 3 + <2><122>: Abbrev Number: 0 + <1><123>: Abbrev Number: 14 (DW_TAG_enumeration_type) + <124> DW_AT_name : (indirect string, offset: 0x19f): btrfs_dev_stat_values + <128> DW_AT_byte_size : 4 + <129> DW_AT_decl_file : 3 + <12a> DW_AT_decl_line : 369 + <12c> DW_AT_sibling : <0x155> + <2><130>: Abbrev Number: 15 (DW_TAG_enumerator) + <131> DW_AT_name : (indirect string, offset: 0x2c): BTRFS_DEV_STAT_WRITE_ERRS + <135> DW_AT_const_value : 0 + <2><136>: Abbrev Number: 15 (DW_TAG_enumerator) + <137> DW_AT_name : (indirect string, offset: 0x227): BTRFS_DEV_STAT_READ_ERRS + <13b> DW_AT_const_value : 1 + <2><13c>: Abbrev Number: 15 (DW_TAG_enumerator) + <13d> DW_AT_name : (indirect string, offset: 0x20d): BTRFS_DEV_STAT_FLUSH_ERRS + <141> DW_AT_const_value : 2 + <2><142>: Abbrev Number: 15 (DW_TAG_enumerator) + <143> DW_AT_name : (indirect string, offset: 0x15a): BTRFS_DEV_STAT_CORRUPTION_ERRS + <147> DW_AT_const_value : 3 + <2><148>: Abbrev Number: 15 (DW_TAG_enumerator) + <149> DW_AT_name : (indirect string, offset: 0x240): BTRFS_DEV_STAT_GENERATION_ERRS + <14d> DW_AT_const_value : 4 + <2><14e>: Abbrev Number: 15 (DW_TAG_enumerator) + <14f> DW_AT_name : (indirect string, offset: 0xc): BTRFS_DEV_STAT_VALUES_MAX + <153> DW_AT_const_value : 5 + <2><154>: Abbrev Number: 0 + <1><155>: Abbrev Number: 16 (DW_TAG_structure_type) + <156> DW_AT_name : (indirect string, offset: 0xd3): btrfs_ioctl_send_args + <15a> DW_AT_byte_size : 72 + <15b> DW_AT_decl_file : 3 + <15c> DW_AT_decl_line : 466 + <15e> DW_AT_sibling : <0x1bd> + <2><162>: Abbrev Number: 17 (DW_TAG_member) + <163> DW_AT_name : (indirect string, offset: 0x273): send_fd + <167> DW_AT_decl_file : 3 + <168> DW_AT_decl_line : 467 + <16a> DW_AT_type : <0xfd> + <16e> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><171>: Abbrev Number: 17 (DW_TAG_member) + <172> DW_AT_name : (indirect string, offset: 0x25f): clone_sources_count + <176> DW_AT_decl_file : 3 + <177> DW_AT_decl_line : 468 + <179> DW_AT_type : <0x108> + <17d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><180>: Abbrev Number: 17 (DW_TAG_member) + <181> DW_AT_name : (indirect string, offset: 0x1b5): clone_sources + <185> DW_AT_decl_file : 3 + <186> DW_AT_decl_line : 469 + <188> DW_AT_type : <0x1bd> + <18c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><18f>: Abbrev Number: 17 (DW_TAG_member) + <190> DW_AT_name : (indirect string, offset: 0x0): parent_root + <194> DW_AT_decl_file : 3 + <195> DW_AT_decl_line : 470 + <197> DW_AT_type : <0x108> + <19b> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><19e>: Abbrev Number: 17 (DW_TAG_member) + <19f> DW_AT_name : (indirect string, offset: 0x186): flags + <1a3> DW_AT_decl_file : 3 + <1a4> DW_AT_decl_line : 471 + <1a6> DW_AT_type : <0x108> + <1aa> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1ad>: Abbrev Number: 17 (DW_TAG_member) + <1ae> DW_AT_name : (indirect string, offset: 0x46): reserved + <1b2> DW_AT_decl_file : 3 + <1b3> DW_AT_decl_line : 472 + <1b5> DW_AT_type : <0x113> + <1b9> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1bc>: Abbrev Number: 0 + <1><1bd>: Abbrev Number: 4 (DW_TAG_pointer_type) + <1be> DW_AT_byte_size : 4 + <1bf> DW_AT_type : <0x108> + <1><1c3>: Abbrev Number: 11 (DW_TAG_typedef) + <1c4> DW_AT_name : (indirect string, offset: 0xb6): struct_btrfs_ioctl_send_args + <1c8> DW_AT_decl_file : 4 + <1c9> DW_AT_decl_line : 38 + <1ca> DW_AT_type : <0x155> + <1><1ce>: Abbrev Number: 18 (DW_TAG_variable) + <1cf> DW_AT_name : (indirect string, offset: 0x139): current_wordsize + <1d3> DW_AT_decl_file : 5 + <1d4> DW_AT_decl_line : 757 + <1d6> DW_AT_type : <0x47> + <1da> DW_AT_external : 1 + <1db> DW_AT_declaration : 1 + <1><1dc>: Abbrev Number: 18 (DW_TAG_variable) + <1dd> DW_AT_name : (indirect string, offset: 0x132): sysent + <1e1> DW_AT_decl_file : 5 + <1e2> DW_AT_decl_line : 892 + <1e4> DW_AT_type : <0xeb> + <1e8> DW_AT_external : 1 + <1e9> DW_AT_declaration : 1 + <1><1ea>: Abbrev Number: 18 (DW_TAG_variable) + <1eb> DW_AT_name : (indirect string, offset: 0x1f4): nsyscalls + <1ef> DW_AT_decl_file : 5 + <1f0> DW_AT_decl_line : 903 + <1f2> DW_AT_type : <0x47> + <1f6> DW_AT_external : 1 + <1f7> DW_AT_declaration : 1 + <1><1f8>: Abbrev Number: 19 (DW_TAG_variable) + <1f9> DW_AT_name : (indirect string, offset: 0xe9): mpers_target_var + <1fd> DW_AT_decl_file : 4 + <1fe> DW_AT_decl_line : 46 + <1ff> DW_AT_type : <0x1c3> + <203> DW_AT_external : 1 + <204> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><20a>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_btrfs_ioctl_send_args.d2 b/mpers-mx32/struct_btrfs_ioctl_send_args.d2 new file mode 100644 index 000000000..f124cae23 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_send_args.d2 @@ -0,0 +1,279 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x2ae): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x150): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x104): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x112): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x9a): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x179): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2c3): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x2a5): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x120): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x204): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x19a): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x132): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14a): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xfa): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2ba): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xad): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x18c): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x26): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2da): __s64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 29 +DW_AT_type : <0x32> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1fe): __u64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><113> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x123> +<2><11c> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 3 +<1><123> +Abbrev Number: 14 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x19f): btrfs_dev_stat_values +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 369 +DW_AT_sibling : <0x155> +<2><130> +Abbrev Number: 15 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x2c): BTRFS_DEV_STAT_WRITE_ERRS +DW_AT_const_value : 0 +<2><136> +Abbrev Number: 15 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x227): BTRFS_DEV_STAT_READ_ERRS +DW_AT_const_value : 1 +<2><13c> +Abbrev Number: 15 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x20d): BTRFS_DEV_STAT_FLUSH_ERRS +DW_AT_const_value : 2 +<2><142> +Abbrev Number: 15 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x15a): BTRFS_DEV_STAT_CORRUPTION_ERRS +DW_AT_const_value : 3 +<2><148> +Abbrev Number: 15 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x240): BTRFS_DEV_STAT_GENERATION_ERRS +DW_AT_const_value : 4 +<2><14e> +Abbrev Number: 15 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0xc): BTRFS_DEV_STAT_VALUES_MAX +DW_AT_const_value : 5 +<1><155> +Abbrev Number: 16 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xd3): btrfs_ioctl_send_args +DW_AT_byte_size : 72 +DW_AT_decl_file : 3 +DW_AT_decl_line : 466 +DW_AT_sibling : <0x1bd> +<2><162> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x273): send_fd +DW_AT_decl_file : 3 +DW_AT_decl_line : 467 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><171> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x25f): clone_sources_count +DW_AT_decl_file : 3 +DW_AT_decl_line : 468 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><180> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b5): clone_sources +DW_AT_decl_file : 3 +DW_AT_decl_line : 469 +DW_AT_type : <0x1bd> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><18f> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): parent_root +DW_AT_decl_file : 3 +DW_AT_decl_line : 470 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><19e> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x186): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 471 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1ad> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x46): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 472 +DW_AT_type : <0x113> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<1><1bd> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x108> +<1><1c3> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xb6): struct_btrfs_ioctl_send_args +DW_AT_decl_file : 4 +DW_AT_decl_line : 38 +DW_AT_type : <0x155> +<1><1ce> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x139): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1dc> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x132): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1ea> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1f4): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1f8> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe9): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x1c3> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_btrfs_ioctl_send_args.h b/mpers-mx32/struct_btrfs_ioctl_send_args.h new file mode 100644 index 000000000..877a42ca6 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_send_args.h @@ -0,0 +1,13 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t send_fd; +uint64_t clone_sources_count; +mpers_ptr_t clone_sources; +unsigned char mpers_filler_1[4]; +uint64_t parent_root; +uint64_t flags; +uint64_t reserved[4]; +} ATTRIBUTE_PACKED mx32_struct_btrfs_ioctl_send_args; +#define MPERS_mx32_struct_btrfs_ioctl_send_args mx32_struct_btrfs_ioctl_send_args diff --git a/mpers-mx32/struct_btrfs_ioctl_vol_args_v2.c b/mpers-mx32/struct_btrfs_ioctl_vol_args_v2.c new file mode 100644 index 000000000..0229a3b84 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_vol_args_v2.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2016 Jeff Mahoney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_BTRFS_H + + +# include + +typedef struct btrfs_ioctl_dev_replace_args + struct_btrfs_ioctl_dev_replace_args; +typedef struct btrfs_ioctl_send_args + struct_btrfs_ioctl_send_args; +typedef struct btrfs_ioctl_received_subvol_args + struct_btrfs_ioctl_received_subvol_args; +typedef struct btrfs_ioctl_vol_args_v2 + struct_btrfs_ioctl_vol_args_v2; + +#endif /* HAVE_LINUX_BTRFS_H */ + +struct_btrfs_ioctl_vol_args_v2 mpers_target_var; diff --git a/mpers-mx32/struct_btrfs_ioctl_vol_args_v2.d1 b/mpers-mx32/struct_btrfs_ioctl_vol_args_v2.d1 new file mode 100644 index 000000000..07499281c --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_vol_args_v2.d1 @@ -0,0 +1,363 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x2fe (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x2a3): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xb6): mpers-mx32/struct_btrfs_ioctl_vol_args_v2.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1b9): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x32e): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x287): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x0): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xa8): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x6b): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x17d): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x91): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x306): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xeb): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x209): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x19e): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xfd): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x29d): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x87): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x33f): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x7e): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x190): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x4b): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x348): __s64 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 29 + <104> DW_AT_type : <0x32> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x203): __u64 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 30 + <10f> DW_AT_type : <0x4e> + <1><113>: Abbrev Number: 6 (DW_TAG_structure_type) + <114> DW_AT_name : (indirect string, offset: 0x38): btrfs_qgroup_limit + <118> DW_AT_byte_size : 40 + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 44 + <11b> DW_AT_sibling : <0x166> + <2><11f>: Abbrev Number: 7 (DW_TAG_member) + <120> DW_AT_name : (indirect string, offset: 0x18a): flags + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 45 + <126> DW_AT_type : <0x108> + <12a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><12d>: Abbrev Number: 7 (DW_TAG_member) + <12e> DW_AT_name : (indirect string, offset: 0xe2): max_rfer + <132> DW_AT_decl_file : 3 + <133> DW_AT_decl_line : 46 + <134> DW_AT_type : <0x108> + <138> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><13b>: Abbrev Number: 7 (DW_TAG_member) + <13c> DW_AT_name : (indirect string, offset: 0x165): max_excl + <140> DW_AT_decl_file : 3 + <141> DW_AT_decl_line : 47 + <142> DW_AT_type : <0x108> + <146> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><149>: Abbrev Number: 7 (DW_TAG_member) + <14a> DW_AT_name : (indirect string, offset: 0x27e): rsv_rfer + <14e> DW_AT_decl_file : 3 + <14f> DW_AT_decl_line : 48 + <150> DW_AT_type : <0x108> + <154> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><157>: Abbrev Number: 7 (DW_TAG_member) + <158> DW_AT_name : (indirect string, offset: 0x104): rsv_excl + <15c> DW_AT_decl_file : 3 + <15d> DW_AT_decl_line : 49 + <15e> DW_AT_type : <0x108> + <162> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><165>: Abbrev Number: 0 + <1><166>: Abbrev Number: 6 (DW_TAG_structure_type) + <167> DW_AT_name : (indirect string, offset: 0x245): btrfs_qgroup_inherit + <16b> DW_AT_byte_size : 72 + <16c> DW_AT_decl_file : 3 + <16d> DW_AT_decl_line : 52 + <16e> DW_AT_sibling : <0x1c7> + <2><172>: Abbrev Number: 7 (DW_TAG_member) + <173> DW_AT_name : (indirect string, offset: 0x18a): flags + <177> DW_AT_decl_file : 3 + <178> DW_AT_decl_line : 53 + <179> DW_AT_type : <0x108> + <17d> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><180>: Abbrev Number: 7 (DW_TAG_member) + <181> DW_AT_name : (indirect string, offset: 0x291): num_qgroups + <185> DW_AT_decl_file : 3 + <186> DW_AT_decl_line : 54 + <187> DW_AT_type : <0x108> + <18b> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><18e>: Abbrev Number: 7 (DW_TAG_member) + <18f> DW_AT_name : (indirect string, offset: 0x11e): num_ref_copies + <193> DW_AT_decl_file : 3 + <194> DW_AT_decl_line : 55 + <195> DW_AT_type : <0x108> + <199> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><19c>: Abbrev Number: 7 (DW_TAG_member) + <19d> DW_AT_name : (indirect string, offset: 0xe): num_excl_copies + <1a1> DW_AT_decl_file : 3 + <1a2> DW_AT_decl_line : 56 + <1a3> DW_AT_type : <0x108> + <1a7> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1aa>: Abbrev Number: 8 (DW_TAG_member) + <1ab> DW_AT_name : lim + <1af> DW_AT_decl_file : 3 + <1b0> DW_AT_decl_line : 57 + <1b1> DW_AT_type : <0x113> + <1b5> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1b8>: Abbrev Number: 7 (DW_TAG_member) + <1b9> DW_AT_name : (indirect string, offset: 0x1ea): qgroups + <1bd> DW_AT_decl_file : 3 + <1be> DW_AT_decl_line : 58 + <1bf> DW_AT_type : <0x1c7> + <1c3> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><1c6>: Abbrev Number: 0 + <1><1c7>: Abbrev Number: 12 (DW_TAG_array_type) + <1c8> DW_AT_type : <0x108> + <1cc> DW_AT_sibling : <0x1d6> + <2><1d0>: Abbrev Number: 13 (DW_TAG_subrange_type) + <1d1> DW_AT_type : <0x63> + <2><1d5>: Abbrev Number: 0 + <1><1d6>: Abbrev Number: 14 (DW_TAG_structure_type) + <1d7> DW_AT_byte_size : 16 + <1d8> DW_AT_decl_file : 3 + <1d9> DW_AT_decl_line : 72 + <1da> DW_AT_sibling : <0x1fb> + <2><1de>: Abbrev Number: 7 (DW_TAG_member) + <1df> DW_AT_name : (indirect string, offset: 0x33a): size + <1e3> DW_AT_decl_file : 3 + <1e4> DW_AT_decl_line : 73 + <1e5> DW_AT_type : <0x108> + <1e9> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1ec>: Abbrev Number: 7 (DW_TAG_member) + <1ed> DW_AT_name : (indirect string, offset: 0x16e): qgroup_inherit + <1f1> DW_AT_decl_file : 3 + <1f2> DW_AT_decl_line : 74 + <1f3> DW_AT_type : <0x1fb> + <1f7> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1fa>: Abbrev Number: 0 + <1><1fb>: Abbrev Number: 4 (DW_TAG_pointer_type) + <1fc> DW_AT_byte_size : 4 + <1fd> DW_AT_type : <0x166> + <1><201>: Abbrev Number: 15 (DW_TAG_union_type) + <202> DW_AT_byte_size : 32 + <203> DW_AT_decl_file : 3 + <204> DW_AT_decl_line : 71 + <205> DW_AT_sibling : <0x21a> + <2><209>: Abbrev Number: 16 (DW_TAG_member) + <20a> DW_AT_type : <0x1d6> + <2><20e>: Abbrev Number: 17 (DW_TAG_member) + <20f> DW_AT_name : (indirect string, offset: 0x1fc): unused + <213> DW_AT_decl_file : 3 + <214> DW_AT_decl_line : 76 + <215> DW_AT_type : <0x21a> + <2><219>: Abbrev Number: 0 + <1><21a>: Abbrev Number: 12 (DW_TAG_array_type) + <21b> DW_AT_type : <0x108> + <21f> DW_AT_sibling : <0x22a> + <2><223>: Abbrev Number: 18 (DW_TAG_subrange_type) + <224> DW_AT_type : <0x63> + <228> DW_AT_upper_bound : 3 + <2><229>: Abbrev Number: 0 + <1><22a>: Abbrev Number: 19 (DW_TAG_structure_type) + <22b> DW_AT_name : (indirect string, offset: 0x2ee): btrfs_ioctl_vol_args_v2 + <22f> DW_AT_byte_size : 4096 + <231> DW_AT_decl_file : 3 + <232> DW_AT_decl_line : 67 + <233> DW_AT_sibling : <0x277> + <2><237>: Abbrev Number: 8 (DW_TAG_member) + <238> DW_AT_name : fd + <23b> DW_AT_decl_file : 3 + <23c> DW_AT_decl_line : 68 + <23d> DW_AT_type : <0xfd> + <241> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><244>: Abbrev Number: 7 (DW_TAG_member) + <245> DW_AT_name : (indirect string, offset: 0x12d): transid + <249> DW_AT_decl_file : 3 + <24a> DW_AT_decl_line : 69 + <24b> DW_AT_type : <0x108> + <24f> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><252>: Abbrev Number: 7 (DW_TAG_member) + <253> DW_AT_name : (indirect string, offset: 0x18a): flags + <257> DW_AT_decl_file : 3 + <258> DW_AT_decl_line : 70 + <259> DW_AT_type : <0x108> + <25d> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><260>: Abbrev Number: 20 (DW_TAG_member) + <261> DW_AT_type : <0x201> + <265> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><268>: Abbrev Number: 7 (DW_TAG_member) + <269> DW_AT_name : (indirect string, offset: 0x25a): name + <26d> DW_AT_decl_file : 3 + <26e> DW_AT_decl_line : 78 + <26f> DW_AT_type : <0x277> + <273> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><276>: Abbrev Number: 0 + <1><277>: Abbrev Number: 12 (DW_TAG_array_type) + <278> DW_AT_type : <0x6a> + <27c> DW_AT_sibling : <0x288> + <2><280>: Abbrev Number: 21 (DW_TAG_subrange_type) + <281> DW_AT_type : <0x63> + <285> DW_AT_upper_bound : 4039 + <2><287>: Abbrev Number: 0 + <1><288>: Abbrev Number: 22 (DW_TAG_enumeration_type) + <289> DW_AT_name : (indirect string, offset: 0x1a3): btrfs_dev_stat_values + <28d> DW_AT_byte_size : 4 + <28e> DW_AT_decl_file : 3 + <28f> DW_AT_decl_line : 369 + <291> DW_AT_sibling : <0x2ba> + <2><295>: Abbrev Number: 23 (DW_TAG_enumerator) + <296> DW_AT_name : (indirect string, offset: 0x51): BTRFS_DEV_STAT_WRITE_ERRS + <29a> DW_AT_const_value : 0 + <2><29b>: Abbrev Number: 23 (DW_TAG_enumerator) + <29c> DW_AT_name : (indirect string, offset: 0x22c): BTRFS_DEV_STAT_READ_ERRS + <2a0> DW_AT_const_value : 1 + <2><2a1>: Abbrev Number: 23 (DW_TAG_enumerator) + <2a2> DW_AT_name : (indirect string, offset: 0x212): BTRFS_DEV_STAT_FLUSH_ERRS + <2a6> DW_AT_const_value : 2 + <2><2a7>: Abbrev Number: 23 (DW_TAG_enumerator) + <2a8> DW_AT_name : (indirect string, offset: 0x146): BTRFS_DEV_STAT_CORRUPTION_ERRS + <2ac> DW_AT_const_value : 3 + <2><2ad>: Abbrev Number: 23 (DW_TAG_enumerator) + <2ae> DW_AT_name : (indirect string, offset: 0x25f): BTRFS_DEV_STAT_GENERATION_ERRS + <2b2> DW_AT_const_value : 4 + <2><2b3>: Abbrev Number: 23 (DW_TAG_enumerator) + <2b4> DW_AT_name : (indirect string, offset: 0x1e): BTRFS_DEV_STAT_VALUES_MAX + <2b8> DW_AT_const_value : 5 + <2><2b9>: Abbrev Number: 0 + <1><2ba>: Abbrev Number: 11 (DW_TAG_typedef) + <2bb> DW_AT_name : (indirect string, offset: 0x30f): struct_btrfs_ioctl_vol_args_v2 + <2bf> DW_AT_decl_file : 4 + <2c0> DW_AT_decl_line : 42 + <2c1> DW_AT_type : <0x22a> + <1><2c5>: Abbrev Number: 24 (DW_TAG_variable) + <2c6> DW_AT_name : (indirect string, offset: 0x10d): current_wordsize + <2ca> DW_AT_decl_file : 5 + <2cb> DW_AT_decl_line : 757 + <2cd> DW_AT_type : <0x47> + <2d1> DW_AT_external : 1 + <2d2> DW_AT_declaration : 1 + <1><2d3>: Abbrev Number: 24 (DW_TAG_variable) + <2d4> DW_AT_name : (indirect string, offset: 0xfd): sysent + <2d8> DW_AT_decl_file : 5 + <2d9> DW_AT_decl_line : 892 + <2db> DW_AT_type : <0xeb> + <2df> DW_AT_external : 1 + <2e0> DW_AT_declaration : 1 + <1><2e1>: Abbrev Number: 24 (DW_TAG_variable) + <2e2> DW_AT_name : (indirect string, offset: 0x1f2): nsyscalls + <2e6> DW_AT_decl_file : 5 + <2e7> DW_AT_decl_line : 903 + <2e9> DW_AT_type : <0x47> + <2ed> DW_AT_external : 1 + <2ee> DW_AT_declaration : 1 + <1><2ef>: Abbrev Number: 25 (DW_TAG_variable) + <2f0> DW_AT_name : (indirect string, offset: 0x135): mpers_target_var + <2f4> DW_AT_decl_file : 4 + <2f5> DW_AT_decl_line : 46 + <2f6> DW_AT_type : <0x2ba> + <2fa> DW_AT_external : 1 + <2fb> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><301>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_btrfs_ioctl_vol_args_v2.d2 b/mpers-mx32/struct_btrfs_ioctl_vol_args_v2.d2 new file mode 100644 index 000000000..1144adab6 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_vol_args_v2.d2 @@ -0,0 +1,410 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x32e): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x287): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x0): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xa8): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x6b): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x17d): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x91): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x306): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xeb): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x209): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x19e): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xfd): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x29d): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x87): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x33f): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7e): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x190): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x4b): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x348): __s64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 29 +DW_AT_type : <0x32> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x203): __u64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><113> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x38): btrfs_qgroup_limit +DW_AT_byte_size : 40 +DW_AT_decl_file : 3 +DW_AT_decl_line : 44 +DW_AT_sibling : <0x166> +<2><11f> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18a): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 45 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><12d> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe2): max_rfer +DW_AT_decl_file : 3 +DW_AT_decl_line : 46 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><13b> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x165): max_excl +DW_AT_decl_file : 3 +DW_AT_decl_line : 47 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><149> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x27e): rsv_rfer +DW_AT_decl_file : 3 +DW_AT_decl_line : 48 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><157> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x104): rsv_excl +DW_AT_decl_file : 3 +DW_AT_decl_line : 49 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<1><166> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x245): btrfs_qgroup_inherit +DW_AT_byte_size : 72 +DW_AT_decl_file : 3 +DW_AT_decl_line : 52 +DW_AT_sibling : <0x1c7> +<2><172> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18a): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 53 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><180> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x291): num_qgroups +DW_AT_decl_file : 3 +DW_AT_decl_line : 54 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><18e> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11e): num_ref_copies +DW_AT_decl_file : 3 +DW_AT_decl_line : 55 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><19c> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe): num_excl_copies +DW_AT_decl_file : 3 +DW_AT_decl_line : 56 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1aa> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : lim +DW_AT_decl_file : 3 +DW_AT_decl_line : 57 +DW_AT_type : <0x113> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1b8> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ea): qgroups +DW_AT_decl_file : 3 +DW_AT_decl_line : 58 +DW_AT_type : <0x1c7> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<1><1c7> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x1d6> +<2><1d0> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +<1><1d6> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_byte_size : 16 +DW_AT_decl_file : 3 +DW_AT_decl_line : 72 +DW_AT_sibling : <0x1fb> +<2><1de> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x33a): size +DW_AT_decl_file : 3 +DW_AT_decl_line : 73 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1ec> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16e): qgroup_inherit +DW_AT_decl_file : 3 +DW_AT_decl_line : 74 +DW_AT_type : <0x1fb> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><1fb> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x166> +<1><201> +Abbrev Number: 15 (DW_TAG_union_type) +DW_AT_byte_size : 32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 71 +DW_AT_sibling : <0x21a> +<2><209> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_type : <0x1d6> +<2><20e> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fc): unused +DW_AT_decl_file : 3 +DW_AT_decl_line : 76 +DW_AT_type : <0x21a> +<1><21a> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x22a> +<2><223> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 3 +<1><22a> +Abbrev Number: 19 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x2ee): btrfs_ioctl_vol_args_v2 +DW_AT_byte_size : 4096 +DW_AT_decl_file : 3 +DW_AT_decl_line : 67 +DW_AT_sibling : <0x277> +<2><237> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : fd +DW_AT_decl_file : 3 +DW_AT_decl_line : 68 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><244> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x12d): transid +DW_AT_decl_file : 3 +DW_AT_decl_line : 69 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><252> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18a): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 70 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><260> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_type : <0x201> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><268> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x25a): name +DW_AT_decl_file : 3 +DW_AT_decl_line : 78 +DW_AT_type : <0x277> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<1><277> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x288> +<2><280> +Abbrev Number: 21 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 4039 +<1><288> +Abbrev Number: 22 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x1a3): btrfs_dev_stat_values +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 369 +DW_AT_sibling : <0x2ba> +<2><295> +Abbrev Number: 23 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x51): BTRFS_DEV_STAT_WRITE_ERRS +DW_AT_const_value : 0 +<2><29b> +Abbrev Number: 23 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x22c): BTRFS_DEV_STAT_READ_ERRS +DW_AT_const_value : 1 +<2><2a1> +Abbrev Number: 23 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x212): BTRFS_DEV_STAT_FLUSH_ERRS +DW_AT_const_value : 2 +<2><2a7> +Abbrev Number: 23 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x146): BTRFS_DEV_STAT_CORRUPTION_ERRS +DW_AT_const_value : 3 +<2><2ad> +Abbrev Number: 23 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x25f): BTRFS_DEV_STAT_GENERATION_ERRS +DW_AT_const_value : 4 +<2><2b3> +Abbrev Number: 23 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1e): BTRFS_DEV_STAT_VALUES_MAX +DW_AT_const_value : 5 +<1><2ba> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x30f): struct_btrfs_ioctl_vol_args_v2 +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_type : <0x22a> +<1><2c5> +Abbrev Number: 24 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x10d): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2d3> +Abbrev Number: 24 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xfd): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2e1> +Abbrev Number: 24 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1f2): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2ef> +Abbrev Number: 25 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x135): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x2ba> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_btrfs_ioctl_vol_args_v2.h b/mpers-mx32/struct_btrfs_ioctl_vol_args_v2.h new file mode 100644 index 000000000..aca6029f1 --- /dev/null +++ b/mpers-mx32/struct_btrfs_ioctl_vol_args_v2.h @@ -0,0 +1,18 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t fd; +uint64_t transid; +uint64_t flags; +union { +struct { +uint64_t size; +mpers_ptr_t qgroup_inherit; +unsigned char mpers_end_filler_1[4]; +} ATTRIBUTE_PACKED ; +uint64_t unused[4]; +} ; +char name[4040]; +} ATTRIBUTE_PACKED mx32_struct_btrfs_ioctl_vol_args_v2; +#define MPERS_mx32_struct_btrfs_ioctl_vol_args_v2 mx32_struct_btrfs_ioctl_vol_args_v2 diff --git a/mpers-mx32/struct_ff_effect.c b/mpers-mx32/struct_ff_effect.c new file mode 100644 index 000000000..6daa03283 --- /dev/null +++ b/mpers-mx32/struct_ff_effect.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2015 Etienne Gemsa + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_INPUT_H + + +# include +# include + +typedef struct ff_effect struct_ff_effect; + +#endif /* HAVE_LINUX_INPUT_H */ + +struct_ff_effect mpers_target_var; diff --git a/mpers-mx32/struct_ff_effect.d1 b/mpers-mx32/struct_ff_effect.d1 new file mode 100644 index 000000000..73a6ac66a --- /dev/null +++ b/mpers-mx32/struct_ff_effect.d1 @@ -0,0 +1,489 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x446 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x269): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xfa): mpers-mx32/struct_ff_effect.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x363): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1a7): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x33): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0xdb): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x193): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x20f): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x339): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x1c4): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x11f): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x2b4): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x3d): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x238): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x31c): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x1a1): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x1f1): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x7e): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x2de): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x25d): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x2c6): __s16 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 22 + <104> DW_AT_type : <0x24> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x263): __u16 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 23 + <10f> DW_AT_type : <0x40> + <1><113>: Abbrev Number: 11 (DW_TAG_typedef) + <114> DW_AT_name : (indirect string, offset: 0xb8): __u32 + <118> DW_AT_decl_file : 2 + <119> DW_AT_decl_line : 26 + <11a> DW_AT_type : <0x47> + <1><11e>: Abbrev Number: 12 (DW_TAG_structure_type) + <11f> DW_AT_name : (indirect string, offset: 0x32f): ff_replay + <123> DW_AT_byte_size : 4 + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 974 + <127> DW_AT_sibling : <0x14a> + <2><12b>: Abbrev Number: 13 (DW_TAG_member) + <12c> DW_AT_name : (indirect string, offset: 0x181): length + <130> DW_AT_decl_file : 3 + <131> DW_AT_decl_line : 975 + <133> DW_AT_type : <0x108> + <137> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><13a>: Abbrev Number: 13 (DW_TAG_member) + <13b> DW_AT_name : (indirect string, offset: 0x87): delay + <13f> DW_AT_decl_file : 3 + <140> DW_AT_decl_line : 976 + <142> DW_AT_type : <0x108> + <146> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><149>: Abbrev Number: 0 + <1><14a>: Abbrev Number: 12 (DW_TAG_structure_type) + <14b> DW_AT_name : (indirect string, offset: 0x8d): ff_trigger + <14f> DW_AT_byte_size : 4 + <150> DW_AT_decl_file : 3 + <151> DW_AT_decl_line : 984 + <153> DW_AT_sibling : <0x176> + <2><157>: Abbrev Number: 13 (DW_TAG_member) + <158> DW_AT_name : (indirect string, offset: 0x14c): button + <15c> DW_AT_decl_file : 3 + <15d> DW_AT_decl_line : 985 + <15f> DW_AT_type : <0x108> + <163> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><166>: Abbrev Number: 13 (DW_TAG_member) + <167> DW_AT_name : (indirect string, offset: 0x2d5): interval + <16b> DW_AT_decl_file : 3 + <16c> DW_AT_decl_line : 986 + <16e> DW_AT_type : <0x108> + <172> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><175>: Abbrev Number: 0 + <1><176>: Abbrev Number: 12 (DW_TAG_structure_type) + <177> DW_AT_name : (indirect string, offset: 0x22c): ff_envelope + <17b> DW_AT_byte_size : 8 + <17c> DW_AT_decl_file : 3 + <17d> DW_AT_decl_line : 1001 + <17f> DW_AT_sibling : <0x1c0> + <2><183>: Abbrev Number: 13 (DW_TAG_member) + <184> DW_AT_name : (indirect string, offset: 0xbe): attack_length + <188> DW_AT_decl_file : 3 + <189> DW_AT_decl_line : 1002 + <18b> DW_AT_type : <0x108> + <18f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><192>: Abbrev Number: 13 (DW_TAG_member) + <193> DW_AT_name : (indirect string, offset: 0x98): attack_level + <197> DW_AT_decl_file : 3 + <198> DW_AT_decl_line : 1003 + <19a> DW_AT_type : <0x108> + <19e> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><1a1>: Abbrev Number: 13 (DW_TAG_member) + <1a2> DW_AT_name : (indirect string, offset: 0xac): fade_length + <1a6> DW_AT_decl_file : 3 + <1a7> DW_AT_decl_line : 1004 + <1a9> DW_AT_type : <0x108> + <1ad> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1b0>: Abbrev Number: 13 (DW_TAG_member) + <1b1> DW_AT_name : (indirect string, offset: 0x188): fade_level + <1b5> DW_AT_decl_file : 3 + <1b6> DW_AT_decl_line : 1005 + <1b8> DW_AT_type : <0x108> + <1bc> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><1bf>: Abbrev Number: 0 + <1><1c0>: Abbrev Number: 12 (DW_TAG_structure_type) + <1c1> DW_AT_name : (indirect string, offset: 0x15a): ff_constant_effect + <1c5> DW_AT_byte_size : 10 + <1c6> DW_AT_decl_file : 3 + <1c7> DW_AT_decl_line : 1013 + <1c9> DW_AT_sibling : <0x1ec> + <2><1cd>: Abbrev Number: 13 (DW_TAG_member) + <1ce> DW_AT_name : (indirect string, offset: 0x2ec): level + <1d2> DW_AT_decl_file : 3 + <1d3> DW_AT_decl_line : 1014 + <1d5> DW_AT_type : <0xfd> + <1d9> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1dc>: Abbrev Number: 13 (DW_TAG_member) + <1dd> DW_AT_name : (indirect string, offset: 0x313): envelope + <1e1> DW_AT_decl_file : 3 + <1e2> DW_AT_decl_line : 1015 + <1e4> DW_AT_type : <0x176> + <1e8> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><1eb>: Abbrev Number: 0 + <1><1ec>: Abbrev Number: 12 (DW_TAG_structure_type) + <1ed> DW_AT_name : (indirect string, offset: 0xcc): ff_ramp_effect + <1f1> DW_AT_byte_size : 12 + <1f2> DW_AT_decl_file : 3 + <1f3> DW_AT_decl_line : 1024 + <1f5> DW_AT_sibling : <0x227> + <2><1f9>: Abbrev Number: 13 (DW_TAG_member) + <1fa> DW_AT_name : (indirect string, offset: 0x128): start_level + <1fe> DW_AT_decl_file : 3 + <1ff> DW_AT_decl_line : 1025 + <201> DW_AT_type : <0xfd> + <205> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><208>: Abbrev Number: 13 (DW_TAG_member) + <209> DW_AT_name : (indirect string, offset: 0x177): end_level + <20d> DW_AT_decl_file : 3 + <20e> DW_AT_decl_line : 1026 + <210> DW_AT_type : <0xfd> + <214> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><217>: Abbrev Number: 13 (DW_TAG_member) + <218> DW_AT_name : (indirect string, offset: 0x313): envelope + <21c> DW_AT_decl_file : 3 + <21d> DW_AT_decl_line : 1027 + <21f> DW_AT_type : <0x176> + <223> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><226>: Abbrev Number: 0 + <1><227>: Abbrev Number: 12 (DW_TAG_structure_type) + <228> DW_AT_name : (indirect string, offset: 0x4f): ff_condition_effect + <22c> DW_AT_byte_size : 12 + <22d> DW_AT_decl_file : 3 + <22e> DW_AT_decl_line : 1040 + <230> DW_AT_sibling : <0x28f> + <2><234>: Abbrev Number: 13 (DW_TAG_member) + <235> DW_AT_name : (indirect string, offset: 0x2f2): right_saturation + <239> DW_AT_decl_file : 3 + <23a> DW_AT_decl_line : 1041 + <23c> DW_AT_type : <0x108> + <240> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><243>: Abbrev Number: 13 (DW_TAG_member) + <244> DW_AT_name : (indirect string, offset: 0x303): left_saturation + <248> DW_AT_decl_file : 3 + <249> DW_AT_decl_line : 1042 + <24b> DW_AT_type : <0x108> + <24f> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><252>: Abbrev Number: 13 (DW_TAG_member) + <253> DW_AT_name : (indirect string, offset: 0x346): right_coeff + <257> DW_AT_decl_file : 3 + <258> DW_AT_decl_line : 1044 + <25a> DW_AT_type : <0xfd> + <25e> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><261>: Abbrev Number: 13 (DW_TAG_member) + <262> DW_AT_name : (indirect string, offset: 0x0): left_coeff + <266> DW_AT_decl_file : 3 + <267> DW_AT_decl_line : 1045 + <269> DW_AT_type : <0xfd> + <26d> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><270>: Abbrev Number: 13 (DW_TAG_member) + <271> DW_AT_name : (indirect string, offset: 0x394): deadband + <275> DW_AT_decl_file : 3 + <276> DW_AT_decl_line : 1047 + <278> DW_AT_type : <0x108> + <27c> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><27f>: Abbrev Number: 13 (DW_TAG_member) + <280> DW_AT_name : (indirect string, offset: 0x19): center + <284> DW_AT_decl_file : 3 + <285> DW_AT_decl_line : 1048 + <287> DW_AT_type : <0xfd> + <28b> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><28e>: Abbrev Number: 0 + <1><28f>: Abbrev Number: 12 (DW_TAG_structure_type) + <290> DW_AT_name : (indirect string, offset: 0x20): ff_periodic_effect + <294> DW_AT_byte_size : 28 + <295> DW_AT_decl_file : 3 + <296> DW_AT_decl_line : 1069 + <298> DW_AT_sibling : <0x315> + <2><29c>: Abbrev Number: 13 (DW_TAG_member) + <29d> DW_AT_name : (indirect string, offset: 0x2cc): waveform + <2a1> DW_AT_decl_file : 3 + <2a2> DW_AT_decl_line : 1070 + <2a4> DW_AT_type : <0x108> + <2a8> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><2ab>: Abbrev Number: 13 (DW_TAG_member) + <2ac> DW_AT_name : (indirect string, offset: 0x153): period + <2b0> DW_AT_decl_file : 3 + <2b1> DW_AT_decl_line : 1071 + <2b3> DW_AT_type : <0x108> + <2b7> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><2ba>: Abbrev Number: 13 (DW_TAG_member) + <2bb> DW_AT_name : (indirect string, offset: 0x16d): magnitude + <2bf> DW_AT_decl_file : 3 + <2c0> DW_AT_decl_line : 1072 + <2c2> DW_AT_type : <0xfd> + <2c6> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><2c9>: Abbrev Number: 13 (DW_TAG_member) + <2ca> DW_AT_name : (indirect string, offset: 0x145): offset + <2ce> DW_AT_decl_file : 3 + <2cf> DW_AT_decl_line : 1073 + <2d1> DW_AT_type : <0xfd> + <2d5> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><2d8>: Abbrev Number: 13 (DW_TAG_member) + <2d9> DW_AT_name : (indirect string, offset: 0x6e): phase + <2dd> DW_AT_decl_file : 3 + <2de> DW_AT_decl_line : 1074 + <2e0> DW_AT_type : <0x108> + <2e4> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><2e7>: Abbrev Number: 13 (DW_TAG_member) + <2e8> DW_AT_name : (indirect string, offset: 0x313): envelope + <2ec> DW_AT_decl_file : 3 + <2ed> DW_AT_decl_line : 1076 + <2ef> DW_AT_type : <0x176> + <2f3> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><2f6>: Abbrev Number: 13 (DW_TAG_member) + <2f7> DW_AT_name : (indirect string, offset: 0x63): custom_len + <2fb> DW_AT_decl_file : 3 + <2fc> DW_AT_decl_line : 1078 + <2fe> DW_AT_type : <0x113> + <302> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><305>: Abbrev Number: 13 (DW_TAG_member) + <306> DW_AT_name : (indirect string, offset: 0x323): custom_data + <30a> DW_AT_decl_file : 3 + <30b> DW_AT_decl_line : 1079 + <30d> DW_AT_type : <0x315> + <311> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><314>: Abbrev Number: 0 + <1><315>: Abbrev Number: 4 (DW_TAG_pointer_type) + <316> DW_AT_byte_size : 4 + <317> DW_AT_type : <0xfd> + <1><31b>: Abbrev Number: 12 (DW_TAG_structure_type) + <31c> DW_AT_name : (indirect string, offset: 0x1e0): ff_rumble_effect + <320> DW_AT_byte_size : 4 + <321> DW_AT_decl_file : 3 + <322> DW_AT_decl_line : 1090 + <324> DW_AT_sibling : <0x347> + <2><328>: Abbrev Number: 13 (DW_TAG_member) + <329> DW_AT_name : (indirect string, offset: 0xe9): strong_magnitude + <32d> DW_AT_decl_file : 3 + <32e> DW_AT_decl_line : 1091 + <330> DW_AT_type : <0x108> + <334> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><337>: Abbrev Number: 13 (DW_TAG_member) + <338> DW_AT_name : (indirect string, offset: 0x246): weak_magnitude + <33c> DW_AT_decl_file : 3 + <33d> DW_AT_decl_line : 1092 + <33f> DW_AT_type : <0x108> + <343> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><346>: Abbrev Number: 0 + <1><347>: Abbrev Number: 14 (DW_TAG_union_type) + <348> DW_AT_byte_size : 28 + <349> DW_AT_decl_file : 3 + <34a> DW_AT_decl_line : 1125 + <34c> DW_AT_sibling : <0x38d> + <2><350>: Abbrev Number: 15 (DW_TAG_member) + <351> DW_AT_name : (indirect string, offset: 0x23d): constant + <355> DW_AT_decl_file : 3 + <356> DW_AT_decl_line : 1126 + <358> DW_AT_type : <0x1c0> + <2><35c>: Abbrev Number: 15 (DW_TAG_member) + <35d> DW_AT_name : (indirect string, offset: 0x14): ramp + <361> DW_AT_decl_file : 3 + <362> DW_AT_decl_line : 1127 + <364> DW_AT_type : <0x1ec> + <2><368>: Abbrev Number: 15 (DW_TAG_member) + <369> DW_AT_name : (indirect string, offset: 0x46): periodic + <36d> DW_AT_decl_file : 3 + <36e> DW_AT_decl_line : 1128 + <370> DW_AT_type : <0x28f> + <2><374>: Abbrev Number: 15 (DW_TAG_member) + <375> DW_AT_name : (indirect string, offset: 0x222): condition + <379> DW_AT_decl_file : 3 + <37a> DW_AT_decl_line : 1129 + <37c> DW_AT_type : <0x38d> + <2><380>: Abbrev Number: 15 (DW_TAG_member) + <381> DW_AT_name : (indirect string, offset: 0xa5): rumble + <385> DW_AT_decl_file : 3 + <386> DW_AT_decl_line : 1130 + <388> DW_AT_type : <0x31b> + <2><38c>: Abbrev Number: 0 + <1><38d>: Abbrev Number: 16 (DW_TAG_array_type) + <38e> DW_AT_type : <0x227> + <392> DW_AT_sibling : <0x39d> + <2><396>: Abbrev Number: 17 (DW_TAG_subrange_type) + <397> DW_AT_type : <0x63> + <39b> DW_AT_upper_bound : 1 + <2><39c>: Abbrev Number: 0 + <1><39d>: Abbrev Number: 12 (DW_TAG_structure_type) + <39e> DW_AT_name : (indirect string, offset: 0x1fb): ff_effect + <3a2> DW_AT_byte_size : 44 + <3a3> DW_AT_decl_file : 3 + <3a4> DW_AT_decl_line : 1118 + <3a6> DW_AT_sibling : <0x402> + <2><3aa>: Abbrev Number: 13 (DW_TAG_member) + <3ab> DW_AT_name : (indirect string, offset: 0x1db): type + <3af> DW_AT_decl_file : 3 + <3b0> DW_AT_decl_line : 1119 + <3b2> DW_AT_type : <0x108> + <3b6> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><3b9>: Abbrev Number: 18 (DW_TAG_member) + <3ba> DW_AT_name : id + <3bd> DW_AT_decl_file : 3 + <3be> DW_AT_decl_line : 1120 + <3c0> DW_AT_type : <0xfd> + <3c4> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><3c7>: Abbrev Number: 13 (DW_TAG_member) + <3c8> DW_AT_name : (indirect string, offset: 0x74): direction + <3cc> DW_AT_decl_file : 3 + <3cd> DW_AT_decl_line : 1121 + <3cf> DW_AT_type : <0x108> + <3d3> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><3d6>: Abbrev Number: 13 (DW_TAG_member) + <3d7> DW_AT_name : (indirect string, offset: 0x255): trigger + <3db> DW_AT_decl_file : 3 + <3dc> DW_AT_decl_line : 1122 + <3de> DW_AT_type : <0x14a> + <3e2> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><3e5>: Abbrev Number: 13 (DW_TAG_member) + <3e6> DW_AT_name : (indirect string, offset: 0x118): replay + <3ea> DW_AT_decl_file : 3 + <3eb> DW_AT_decl_line : 1123 + <3ed> DW_AT_type : <0x11e> + <3f1> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><3f4>: Abbrev Number: 18 (DW_TAG_member) + <3f5> DW_AT_name : u + <3f7> DW_AT_decl_file : 3 + <3f8> DW_AT_decl_line : 1131 + <3fa> DW_AT_type : <0x347> + <3fe> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><401>: Abbrev Number: 0 + <1><402>: Abbrev Number: 11 (DW_TAG_typedef) + <403> DW_AT_name : (indirect string, offset: 0x352): struct_ff_effect + <407> DW_AT_decl_file : 4 + <408> DW_AT_decl_line : 37 + <409> DW_AT_type : <0x39d> + <1><40d>: Abbrev Number: 19 (DW_TAG_variable) + <40e> DW_AT_name : (indirect string, offset: 0x1b3): current_wordsize + <412> DW_AT_decl_file : 5 + <413> DW_AT_decl_line : 757 + <415> DW_AT_type : <0x47> + <419> DW_AT_external : 1 + <41a> DW_AT_declaration : 1 + <1><41b>: Abbrev Number: 19 (DW_TAG_variable) + <41c> DW_AT_name : (indirect string, offset: 0x31c): sysent + <420> DW_AT_decl_file : 5 + <421> DW_AT_decl_line : 892 + <423> DW_AT_type : <0xeb> + <427> DW_AT_external : 1 + <428> DW_AT_declaration : 1 + <1><429>: Abbrev Number: 19 (DW_TAG_variable) + <42a> DW_AT_name : (indirect string, offset: 0x205): nsyscalls + <42e> DW_AT_decl_file : 5 + <42f> DW_AT_decl_line : 903 + <431> DW_AT_type : <0x47> + <435> DW_AT_external : 1 + <436> DW_AT_declaration : 1 + <1><437>: Abbrev Number: 20 (DW_TAG_variable) + <438> DW_AT_name : (indirect string, offset: 0x134): mpers_target_var + <43c> DW_AT_decl_file : 4 + <43d> DW_AT_decl_line : 41 + <43e> DW_AT_type : <0x402> + <442> DW_AT_external : 1 + <443> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><449>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_ff_effect.d2 b/mpers-mx32/struct_ff_effect.d2 new file mode 100644 index 000000000..2f7d8a4df --- /dev/null +++ b/mpers-mx32/struct_ff_effect.d2 @@ -0,0 +1,549 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1a7): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x33): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0xdb): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x193): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x20f): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x339): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c4): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x11f): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2b4): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x3d): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x238): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x31c): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a1): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f1): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7e): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2de): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x25d): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2c6): __s16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 22 +DW_AT_type : <0x24> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x263): __u16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 23 +DW_AT_type : <0x40> +<1><113> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xb8): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><11e> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x32f): ff_replay +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 974 +DW_AT_sibling : <0x14a> +<2><12b> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x181): length +DW_AT_decl_file : 3 +DW_AT_decl_line : 975 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><13a> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x87): delay +DW_AT_decl_file : 3 +DW_AT_decl_line : 976 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<1><14a> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x8d): ff_trigger +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 984 +DW_AT_sibling : <0x176> +<2><157> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14c): button +DW_AT_decl_file : 3 +DW_AT_decl_line : 985 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><166> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d5): interval +DW_AT_decl_file : 3 +DW_AT_decl_line : 986 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<1><176> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x22c): ff_envelope +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1001 +DW_AT_sibling : <0x1c0> +<2><183> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbe): attack_length +DW_AT_decl_file : 3 +DW_AT_decl_line : 1002 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><192> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x98): attack_level +DW_AT_decl_file : 3 +DW_AT_decl_line : 1003 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><1a1> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xac): fade_length +DW_AT_decl_file : 3 +DW_AT_decl_line : 1004 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1b0> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x188): fade_level +DW_AT_decl_file : 3 +DW_AT_decl_line : 1005 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<1><1c0> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x15a): ff_constant_effect +DW_AT_byte_size : 10 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1013 +DW_AT_sibling : <0x1ec> +<2><1cd> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2ec): level +DW_AT_decl_file : 3 +DW_AT_decl_line : 1014 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1dc> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x313): envelope +DW_AT_decl_file : 3 +DW_AT_decl_line : 1015 +DW_AT_type : <0x176> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<1><1ec> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xcc): ff_ramp_effect +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1024 +DW_AT_sibling : <0x227> +<2><1f9> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x128): start_level +DW_AT_decl_file : 3 +DW_AT_decl_line : 1025 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><208> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x177): end_level +DW_AT_decl_file : 3 +DW_AT_decl_line : 1026 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><217> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x313): envelope +DW_AT_decl_file : 3 +DW_AT_decl_line : 1027 +DW_AT_type : <0x176> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><227> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x4f): ff_condition_effect +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1040 +DW_AT_sibling : <0x28f> +<2><234> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2f2): right_saturation +DW_AT_decl_file : 3 +DW_AT_decl_line : 1041 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><243> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x303): left_saturation +DW_AT_decl_file : 3 +DW_AT_decl_line : 1042 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><252> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x346): right_coeff +DW_AT_decl_file : 3 +DW_AT_decl_line : 1044 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><261> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): left_coeff +DW_AT_decl_file : 3 +DW_AT_decl_line : 1045 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<2><270> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x394): deadband +DW_AT_decl_file : 3 +DW_AT_decl_line : 1047 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><27f> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x19): center +DW_AT_decl_file : 3 +DW_AT_decl_line : 1048 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<1><28f> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x20): ff_periodic_effect +DW_AT_byte_size : 28 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1069 +DW_AT_sibling : <0x315> +<2><29c> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2cc): waveform +DW_AT_decl_file : 3 +DW_AT_decl_line : 1070 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><2ab> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x153): period +DW_AT_decl_file : 3 +DW_AT_decl_line : 1071 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><2ba> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16d): magnitude +DW_AT_decl_file : 3 +DW_AT_decl_line : 1072 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><2c9> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x145): offset +DW_AT_decl_file : 3 +DW_AT_decl_line : 1073 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<2><2d8> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6e): phase +DW_AT_decl_file : 3 +DW_AT_decl_line : 1074 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><2e7> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x313): envelope +DW_AT_decl_file : 3 +DW_AT_decl_line : 1076 +DW_AT_type : <0x176> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><2f6> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x63): custom_len +DW_AT_decl_file : 3 +DW_AT_decl_line : 1078 +DW_AT_type : <0x113> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><305> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x323): custom_data +DW_AT_decl_file : 3 +DW_AT_decl_line : 1079 +DW_AT_type : <0x315> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<1><315> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xfd> +<1><31b> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1e0): ff_rumble_effect +DW_AT_byte_size : 4 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1090 +DW_AT_sibling : <0x347> +<2><328> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe9): strong_magnitude +DW_AT_decl_file : 3 +DW_AT_decl_line : 1091 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><337> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x246): weak_magnitude +DW_AT_decl_file : 3 +DW_AT_decl_line : 1092 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<1><347> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 28 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1125 +DW_AT_sibling : <0x38d> +<2><350> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23d): constant +DW_AT_decl_file : 3 +DW_AT_decl_line : 1126 +DW_AT_type : <0x1c0> +<2><35c> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14): ramp +DW_AT_decl_file : 3 +DW_AT_decl_line : 1127 +DW_AT_type : <0x1ec> +<2><368> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x46): periodic +DW_AT_decl_file : 3 +DW_AT_decl_line : 1128 +DW_AT_type : <0x28f> +<2><374> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x222): condition +DW_AT_decl_file : 3 +DW_AT_decl_line : 1129 +DW_AT_type : <0x38d> +<2><380> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa5): rumble +DW_AT_decl_file : 3 +DW_AT_decl_line : 1130 +DW_AT_type : <0x31b> +<1><38d> +Abbrev Number: 16 (DW_TAG_array_type) +DW_AT_type : <0x227> +DW_AT_sibling : <0x39d> +<2><396> +Abbrev Number: 17 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><39d> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1fb): ff_effect +DW_AT_byte_size : 44 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1118 +DW_AT_sibling : <0x402> +<2><3aa> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1db): type +DW_AT_decl_file : 3 +DW_AT_decl_line : 1119 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><3b9> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : id +DW_AT_decl_file : 3 +DW_AT_decl_line : 1120 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><3c7> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x74): direction +DW_AT_decl_file : 3 +DW_AT_decl_line : 1121 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><3d6> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x255): trigger +DW_AT_decl_file : 3 +DW_AT_decl_line : 1122 +DW_AT_type : <0x14a> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<2><3e5> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x118): replay +DW_AT_decl_file : 3 +DW_AT_decl_line : 1123 +DW_AT_type : <0x11e> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><3f4> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : u +DW_AT_decl_file : 3 +DW_AT_decl_line : 1131 +DW_AT_type : <0x347> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><402> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x352): struct_ff_effect +DW_AT_decl_file : 4 +DW_AT_decl_line : 37 +DW_AT_type : <0x39d> +<1><40d> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1b3): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><41b> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x31c): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><429> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x205): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><437> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x134): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 41 +DW_AT_type : <0x402> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_ff_effect.h b/mpers-mx32/struct_ff_effect.h new file mode 100644 index 000000000..179d66ab3 --- /dev/null +++ b/mpers-mx32/struct_ff_effect.h @@ -0,0 +1,67 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint16_t type; +int16_t id; +uint16_t direction; +struct { +uint16_t button; +uint16_t interval; +} ATTRIBUTE_PACKED trigger; +struct { +uint16_t length; +uint16_t delay; +} ATTRIBUTE_PACKED replay; +unsigned char mpers_filler_1[2]; +union { +struct { +int16_t level; +struct { +uint16_t attack_length; +uint16_t attack_level; +uint16_t fade_length; +uint16_t fade_level; +} ATTRIBUTE_PACKED envelope; +} ATTRIBUTE_PACKED constant; +struct { +int16_t start_level; +int16_t end_level; +struct { +uint16_t attack_length; +uint16_t attack_level; +uint16_t fade_length; +uint16_t fade_level; +} ATTRIBUTE_PACKED envelope; +} ATTRIBUTE_PACKED ramp; +struct { +uint16_t waveform; +uint16_t period; +int16_t magnitude; +int16_t offset; +uint16_t phase; +struct { +uint16_t attack_length; +uint16_t attack_level; +uint16_t fade_length; +uint16_t fade_level; +} ATTRIBUTE_PACKED envelope; +unsigned char mpers_filler_2[2]; +uint32_t custom_len; +mpers_ptr_t custom_data; +} ATTRIBUTE_PACKED periodic; +struct { +uint16_t right_saturation; +uint16_t left_saturation; +int16_t right_coeff; +int16_t left_coeff; +uint16_t deadband; +int16_t center; +} ATTRIBUTE_PACKED condition[2]; +struct { +uint16_t strong_magnitude; +uint16_t weak_magnitude; +} ATTRIBUTE_PACKED rumble; +} u; +} ATTRIBUTE_PACKED mx32_struct_ff_effect; +#define MPERS_mx32_struct_ff_effect mx32_struct_ff_effect diff --git a/mpers-mx32/struct_flock.c b/mpers-mx32/struct_flock.c new file mode 100644 index 000000000..4859b6e82 --- /dev/null +++ b/mpers-mx32/struct_flock.c @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "flock.h" +typedef struct_kernel_flock struct_flock; +typedef struct_kernel_flock64 struct_flock64; + +struct_flock mpers_target_var; diff --git a/mpers-mx32/struct_flock.d1 b/mpers-mx32/struct_flock.d1 new file mode 100644 index 000000000..f26593939 --- /dev/null +++ b/mpers-mx32/struct_flock.d1 @@ -0,0 +1,217 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1c0 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x3a): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x148): mpers-mx32/struct_flock.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x162): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1ef): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1c6): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1a6): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xd8): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x85): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x12d): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xc1): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1d0): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xe6): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x19d): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x1b4): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_typedef) + <7d> DW_AT_name : (indirect string, offset: 0x98): __kernel_long_t + <81> DW_AT_decl_file : 1 + <82> DW_AT_decl_line : 13 + <83> DW_AT_type : <0x32> + <1><87>: Abbrev Number: 6 (DW_TAG_typedef) + <88> DW_AT_name : (indirect string, offset: 0x17): __kernel_pid_t + <8c> DW_AT_decl_file : 2 + <8d> DW_AT_decl_line : 27 + <8e> DW_AT_type : <0x2b> + <1><92>: Abbrev Number: 6 (DW_TAG_typedef) + <93> DW_AT_name : (indirect string, offset: 0x1e0): __kernel_off_t + <97> DW_AT_decl_file : 2 + <98> DW_AT_decl_line : 86 + <99> DW_AT_type : <0x7c> + <1><9d>: Abbrev Number: 7 (DW_TAG_structure_type) + <9e> DW_AT_name : (indirect string, offset: 0xf8): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x116): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb7): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1fb): sys_func + DW_AT_decl_file : 3 + DW_AT_decl_line : 8 + DW_AT_type : <0xfb> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xa8): sys_name + DW_AT_decl_file : 3 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xfb> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf0> + <1><101>: Abbrev Number: 6 (DW_TAG_typedef) + <102> DW_AT_name : (indirect string, offset: 0x13a): struct_sysent + <106> DW_AT_decl_file : 3 + <107> DW_AT_decl_line : 10 + <108> DW_AT_type : <0x9d> + <1><10c>: Abbrev Number: 4 (DW_TAG_pointer_type) + <10d> DW_AT_byte_size : 4 + <10e> DW_AT_type : <0x112> + <1><112>: Abbrev Number: 5 (DW_TAG_const_type) + <113> DW_AT_type : <0x101> + <1><117>: Abbrev Number: 2 (DW_TAG_base_type) + <118> DW_AT_byte_size : 1 + <119> DW_AT_encoding : 2 (boolean) + <11a> DW_AT_name : (indirect string, offset: 0x11): _Bool + <1><11e>: Abbrev Number: 7 (DW_TAG_structure_type) + <11f> DW_AT_name : (indirect string, offset: 0xb1): flock + <123> DW_AT_byte_size : 32 + <124> DW_AT_decl_file : 4 + <125> DW_AT_decl_line : 179 + <126> DW_AT_sibling : <0x171> + <2><12a>: Abbrev Number: 8 (DW_TAG_member) + <12b> DW_AT_name : (indirect string, offset: 0x1d9): l_type + <12f> DW_AT_decl_file : 4 + <130> DW_AT_decl_line : 180 + <131> DW_AT_type : <0x24> + <135> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><138>: Abbrev Number: 8 (DW_TAG_member) + <139> DW_AT_name : (indirect string, offset: 0x0): l_whence + <13d> DW_AT_decl_file : 4 + <13e> DW_AT_decl_line : 181 + <13f> DW_AT_type : <0x24> + <143> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><146>: Abbrev Number: 8 (DW_TAG_member) + <147> DW_AT_name : (indirect string, offset: 0x9): l_start + <14b> DW_AT_decl_file : 4 + <14c> DW_AT_decl_line : 182 + <14d> DW_AT_type : <0x92> + <151> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><154>: Abbrev Number: 8 (DW_TAG_member) + <155> DW_AT_name : (indirect string, offset: 0x204): l_len + <159> DW_AT_decl_file : 4 + <15a> DW_AT_decl_line : 183 + <15b> DW_AT_type : <0x92> + <15f> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><162>: Abbrev Number: 8 (DW_TAG_member) + <163> DW_AT_name : (indirect string, offset: 0xff): l_pid + <167> DW_AT_decl_file : 4 + <168> DW_AT_decl_line : 184 + <169> DW_AT_type : <0x87> + <16d> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><170>: Abbrev Number: 0 + <1><171>: Abbrev Number: 6 (DW_TAG_typedef) + <172> DW_AT_name : (indirect string, offset: 0x26): struct_kernel_flock + <176> DW_AT_decl_file : 5 + <177> DW_AT_decl_line : 34 + <178> DW_AT_type : <0x11e> + <1><17c>: Abbrev Number: 6 (DW_TAG_typedef) + <17d> DW_AT_name : (indirect string, offset: 0x1b9): struct_flock + <181> DW_AT_decl_file : 6 + <182> DW_AT_decl_line : 32 + <183> DW_AT_type : <0x171> + <1><187>: Abbrev Number: 12 (DW_TAG_variable) + <188> DW_AT_name : (indirect string, offset: 0x105): current_wordsize + <18c> DW_AT_decl_file : 7 + <18d> DW_AT_decl_line : 757 + <18f> DW_AT_type : <0x47> + <193> DW_AT_external : 1 + <194> DW_AT_declaration : 1 + <1><195>: Abbrev Number: 12 (DW_TAG_variable) + <196> DW_AT_name : (indirect string, offset: 0xf8): sysent + <19a> DW_AT_decl_file : 7 + <19b> DW_AT_decl_line : 892 + <19d> DW_AT_type : <0x10c> + <1a1> DW_AT_external : 1 + <1a2> DW_AT_declaration : 1 + <1><1a3>: Abbrev Number: 12 (DW_TAG_variable) + <1a4> DW_AT_name : (indirect string, offset: 0x193): nsyscalls + <1a8> DW_AT_decl_file : 7 + <1a9> DW_AT_decl_line : 903 + <1ab> DW_AT_type : <0x47> + <1af> DW_AT_external : 1 + <1b0> DW_AT_declaration : 1 + <1><1b1>: Abbrev Number: 13 (DW_TAG_variable) + <1b2> DW_AT_name : (indirect string, offset: 0x11c): mpers_target_var + <1b6> DW_AT_decl_file : 6 + <1b7> DW_AT_decl_line : 35 + <1b8> DW_AT_type : <0x17c> + <1bc> DW_AT_external : 1 + <1bd> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><1c3>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_flock.d2 b/mpers-mx32/struct_flock.d2 new file mode 100644 index 000000000..b72ffafa5 --- /dev/null +++ b/mpers-mx32/struct_flock.d2 @@ -0,0 +1,241 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1ef): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1c6): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a6): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xd8): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x85): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x12d): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xc1): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1d0): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xe6): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x19d): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1b4): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x98): __kernel_long_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 13 +DW_AT_type : <0x32> +<1><87> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x17): __kernel_pid_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 27 +DW_AT_type : <0x2b> +<1><92> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1e0): __kernel_off_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 86 +DW_AT_type : <0x7c> +<1><9d> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xf8): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x116): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb7): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fb): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0xfb> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa8): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xfb> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf0> +<1><101> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x13a): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0x9d> +<1><10c> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x112> +<1><112> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x101> +<1><117> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x11): _Bool +<1><11e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xb1): flock +DW_AT_byte_size : 32 +DW_AT_decl_file : 4 +DW_AT_decl_line : 179 +DW_AT_sibling : <0x171> +<2><12a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d9): l_type +DW_AT_decl_file : 4 +DW_AT_decl_line : 180 +DW_AT_type : <0x24> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><138> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): l_whence +DW_AT_decl_file : 4 +DW_AT_decl_line : 181 +DW_AT_type : <0x24> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><146> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9): l_start +DW_AT_decl_file : 4 +DW_AT_decl_line : 182 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><154> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x204): l_len +DW_AT_decl_file : 4 +DW_AT_decl_line : 183 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><162> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xff): l_pid +DW_AT_decl_file : 4 +DW_AT_decl_line : 184 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<1><171> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x26): struct_kernel_flock +DW_AT_decl_file : 5 +DW_AT_decl_line : 34 +DW_AT_type : <0x11e> +<1><17c> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b9): struct_flock +DW_AT_decl_file : 6 +DW_AT_decl_line : 32 +DW_AT_type : <0x171> +<1><187> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x105): current_wordsize +DW_AT_decl_file : 7 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><195> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xf8): sysent +DW_AT_decl_file : 7 +DW_AT_decl_line : 892 +DW_AT_type : <0x10c> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1a3> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x193): nsyscalls +DW_AT_decl_file : 7 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1b1> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x11c): mpers_target_var +DW_AT_decl_file : 6 +DW_AT_decl_line : 35 +DW_AT_type : <0x17c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_flock.h b/mpers-mx32/struct_flock.h new file mode 100644 index 000000000..c51f10b0d --- /dev/null +++ b/mpers-mx32/struct_flock.h @@ -0,0 +1,13 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int16_t l_type; +int16_t l_whence; +unsigned char mpers_filler_1[4]; +int64_t l_start; +int64_t l_len; +int32_t l_pid; +unsigned char mpers_end_filler_2[4]; +} ATTRIBUTE_PACKED mx32_struct_flock; +#define MPERS_mx32_struct_flock mx32_struct_flock diff --git a/mpers-mx32/struct_flock64.c b/mpers-mx32/struct_flock64.c new file mode 100644 index 000000000..75f618903 --- /dev/null +++ b/mpers-mx32/struct_flock64.c @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "flock.h" +typedef struct_kernel_flock struct_flock; +typedef struct_kernel_flock64 struct_flock64; + +struct_flock64 mpers_target_var; diff --git a/mpers-mx32/struct_flock64.d1 b/mpers-mx32/struct_flock64.d1 new file mode 100644 index 000000000..c535f7d55 --- /dev/null +++ b/mpers-mx32/struct_flock64.d1 @@ -0,0 +1,212 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1b5 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x26): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x1b2): mpers-mx32/struct_flock64.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x14a): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1e8): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1ce): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x18e): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xcd): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x71): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x12a): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xb6): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1d8): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xdb): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x185): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x145): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_typedef) + <7d> DW_AT_name : (indirect string, offset: 0x17): __kernel_pid_t + <81> DW_AT_decl_file : 1 + <82> DW_AT_decl_line : 27 + <83> DW_AT_type : <0x2b> + <1><87>: Abbrev Number: 6 (DW_TAG_typedef) + <88> DW_AT_name : (indirect string, offset: 0x84): __kernel_loff_t + <8c> DW_AT_decl_file : 1 + <8d> DW_AT_decl_line : 87 + <8e> DW_AT_type : <0x32> + <1><92>: Abbrev Number: 7 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0xed): sysent + <97> DW_AT_byte_size : 20 + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 4 + <9a> DW_AT_sibling : <0xe5> + <2><9e>: Abbrev Number: 8 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0x113): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xac): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1f4): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0xf0> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xa3): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 +
DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xe5> + <1>: Abbrev Number: 6 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x137): struct_sysent + DW_AT_decl_file : 2 + DW_AT_decl_line : 10 + DW_AT_type : <0x92> + <1><101>: Abbrev Number: 4 (DW_TAG_pointer_type) + <102> DW_AT_byte_size : 4 + <103> DW_AT_type : <0x107> + <1><107>: Abbrev Number: 5 (DW_TAG_const_type) + <108> DW_AT_type : <0xf6> + <1><10c>: Abbrev Number: 2 (DW_TAG_base_type) + <10d> DW_AT_byte_size : 1 + <10e> DW_AT_encoding : 2 (boolean) + <10f> DW_AT_name : (indirect string, offset: 0x11): _Bool + <1><113>: Abbrev Number: 7 (DW_TAG_structure_type) + <114> DW_AT_name : (indirect string, offset: 0xfa): flock64 + <118> DW_AT_byte_size : 32 + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 196 + <11b> DW_AT_sibling : <0x166> + <2><11f>: Abbrev Number: 8 (DW_TAG_member) + <120> DW_AT_name : (indirect string, offset: 0x1e1): l_type + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 197 + <126> DW_AT_type : <0x24> + <12a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><12d>: Abbrev Number: 8 (DW_TAG_member) + <12e> DW_AT_name : (indirect string, offset: 0x0): l_whence + <132> DW_AT_decl_file : 3 + <133> DW_AT_decl_line : 198 + <134> DW_AT_type : <0x24> + <138> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><13b>: Abbrev Number: 8 (DW_TAG_member) + <13c> DW_AT_name : (indirect string, offset: 0x9): l_start + <140> DW_AT_decl_file : 3 + <141> DW_AT_decl_line : 199 + <142> DW_AT_type : <0x87> + <146> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><149>: Abbrev Number: 8 (DW_TAG_member) + <14a> DW_AT_name : (indirect string, offset: 0x1fd): l_len + <14e> DW_AT_decl_file : 3 + <14f> DW_AT_decl_line : 200 + <150> DW_AT_type : <0x87> + <154> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><157>: Abbrev Number: 8 (DW_TAG_member) + <158> DW_AT_name : (indirect string, offset: 0xf4): l_pid + <15c> DW_AT_decl_file : 3 + <15d> DW_AT_decl_line : 201 + <15e> DW_AT_type : <0x7c> + <162> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><165>: Abbrev Number: 0 + <1><166>: Abbrev Number: 6 (DW_TAG_typedef) + <167> DW_AT_name : (indirect string, offset: 0x19c): struct_kernel_flock64 + <16b> DW_AT_decl_file : 4 + <16c> DW_AT_decl_line : 42 + <16d> DW_AT_type : <0x113> + <1><171>: Abbrev Number: 6 (DW_TAG_typedef) + <172> DW_AT_name : (indirect string, offset: 0x94): struct_flock64 + <176> DW_AT_decl_file : 5 + <177> DW_AT_decl_line : 33 + <178> DW_AT_type : <0x166> + <1><17c>: Abbrev Number: 12 (DW_TAG_variable) + <17d> DW_AT_name : (indirect string, offset: 0x102): current_wordsize + <181> DW_AT_decl_file : 6 + <182> DW_AT_decl_line : 757 + <184> DW_AT_type : <0x47> + <188> DW_AT_external : 1 + <189> DW_AT_declaration : 1 + <1><18a>: Abbrev Number: 12 (DW_TAG_variable) + <18b> DW_AT_name : (indirect string, offset: 0xed): sysent + <18f> DW_AT_decl_file : 6 + <190> DW_AT_decl_line : 892 + <192> DW_AT_type : <0x101> + <196> DW_AT_external : 1 + <197> DW_AT_declaration : 1 + <1><198>: Abbrev Number: 12 (DW_TAG_variable) + <199> DW_AT_name : (indirect string, offset: 0x17b): nsyscalls + <19d> DW_AT_decl_file : 6 + <19e> DW_AT_decl_line : 903 + <1a0> DW_AT_type : <0x47> + <1a4> DW_AT_external : 1 + <1a5> DW_AT_declaration : 1 + <1><1a6>: Abbrev Number: 13 (DW_TAG_variable) + <1a7> DW_AT_name : (indirect string, offset: 0x119): mpers_target_var + <1ab> DW_AT_decl_file : 5 + <1ac> DW_AT_decl_line : 35 + <1ad> DW_AT_type : <0x171> + <1b1> DW_AT_external : 1 + <1b2> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><1b8>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_flock64.d2 b/mpers-mx32/struct_flock64.d2 new file mode 100644 index 000000000..9b1eb3970 --- /dev/null +++ b/mpers-mx32/struct_flock64.d2 @@ -0,0 +1,235 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1e8): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1ce): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x18e): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xcd): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x71): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x12a): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb6): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1d8): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xdb): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x185): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x145): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x17): __kernel_pid_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 27 +DW_AT_type : <0x2b> +<1><87> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x84): __kernel_loff_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 87 +DW_AT_type : <0x32> +<1><92> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xed): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xe5> +<2><9e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x113): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xac): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f4): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0xf0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa3): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xe5> +<1> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x137): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0x92> +<1><101> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x107> +<1><107> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xf6> +<1><10c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x11): _Bool +<1><113> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xfa): flock64 +DW_AT_byte_size : 32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 196 +DW_AT_sibling : <0x166> +<2><11f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e1): l_type +DW_AT_decl_file : 3 +DW_AT_decl_line : 197 +DW_AT_type : <0x24> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><12d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): l_whence +DW_AT_decl_file : 3 +DW_AT_decl_line : 198 +DW_AT_type : <0x24> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><13b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9): l_start +DW_AT_decl_file : 3 +DW_AT_decl_line : 199 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><149> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fd): l_len +DW_AT_decl_file : 3 +DW_AT_decl_line : 200 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><157> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf4): l_pid +DW_AT_decl_file : 3 +DW_AT_decl_line : 201 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<1><166> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x19c): struct_kernel_flock64 +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_type : <0x113> +<1><171> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x94): struct_flock64 +DW_AT_decl_file : 5 +DW_AT_decl_line : 33 +DW_AT_type : <0x166> +<1><17c> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x102): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><18a> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xed): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x101> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><198> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x17b): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1a6> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x119): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 35 +DW_AT_type : <0x171> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_flock64.h b/mpers-mx32/struct_flock64.h new file mode 100644 index 000000000..d28a6d413 --- /dev/null +++ b/mpers-mx32/struct_flock64.h @@ -0,0 +1,13 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int16_t l_type; +int16_t l_whence; +unsigned char mpers_filler_1[4]; +int64_t l_start; +int64_t l_len; +int32_t l_pid; +unsigned char mpers_end_filler_2[4]; +} ATTRIBUTE_PACKED mx32_struct_flock64; +#define MPERS_mx32_struct_flock64 mx32_struct_flock64 diff --git a/mpers-mx32/struct_hd_geometry.c b/mpers-mx32/struct_hd_geometry.c new file mode 100644 index 000000000..9a789511a --- /dev/null +++ b/mpers-mx32/struct_hd_geometry.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2009, 2010 Jeff Mahoney + * Copyright (c) 2011-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include + +typedef struct hd_geometry struct_hd_geometry; + +struct_hd_geometry mpers_target_var; diff --git a/mpers-mx32/struct_hd_geometry.d1 b/mpers-mx32/struct_hd_geometry.d1 new file mode 100644 index 000000000..776ac6690 --- /dev/null +++ b/mpers-mx32/struct_hd_geometry.d1 @@ -0,0 +1,191 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x18b (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x22): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x1ae): mpers-mx32/struct_hd_geometry.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x134): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x199): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x186): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x178): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xaa): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x6d): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x114): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x93): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x190): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xb8): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x16f): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x12f): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xca): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0xe2): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x89): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1a5): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x80): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x121): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x16): _Bool + <1>: Abbrev Number: 12 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x0): hd_geometry + <102> DW_AT_byte_size : 8 + <103> DW_AT_decl_file : 2 + <104> DW_AT_decl_line : 313 + <106> DW_AT_sibling : <0x147> + <2><10a>: Abbrev Number: 13 (DW_TAG_member) + <10b> DW_AT_name : (indirect string, offset: 0x1ce): heads + <10f> DW_AT_decl_file : 2 + <110> DW_AT_decl_line : 314 + <112> DW_AT_type : <0x39> + <116> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><119>: Abbrev Number: 13 (DW_TAG_member) + <11a> DW_AT_name : (indirect string, offset: 0x10c): sectors + <11e> DW_AT_decl_file : 2 + <11f> DW_AT_decl_line : 315 + <121> DW_AT_type : <0x39> + <125> DW_AT_data_member_location: 2 byte block: 23 1 (DW_OP_plus_uconst: 1) + <2><128>: Abbrev Number: 13 (DW_TAG_member) + <129> DW_AT_name : (indirect string, offset: 0xc): cylinders + <12d> DW_AT_decl_file : 2 + <12e> DW_AT_decl_line : 316 + <130> DW_AT_type : <0x40> + <134> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><137>: Abbrev Number: 13 (DW_TAG_member) + <138> DW_AT_name : (indirect string, offset: 0x1c): start + <13c> DW_AT_decl_file : 2 + <13d> DW_AT_decl_line : 317 + <13f> DW_AT_type : <0x5c> + <143> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><146>: Abbrev Number: 0 + <1><147>: Abbrev Number: 11 (DW_TAG_typedef) + <148> DW_AT_name : (indirect string, offset: 0xe8): struct_hd_geometry + <14c> DW_AT_decl_file : 3 + <14d> DW_AT_decl_line : 34 + <14e> DW_AT_type : <0xfd> + <1><152>: Abbrev Number: 14 (DW_TAG_variable) + <153> DW_AT_name : (indirect string, offset: 0xd1): current_wordsize + <157> DW_AT_decl_file : 4 + <158> DW_AT_decl_line : 757 + <15a> DW_AT_type : <0x47> + <15e> DW_AT_external : 1 + <15f> DW_AT_declaration : 1 + <1><160>: Abbrev Number: 14 (DW_TAG_variable) + <161> DW_AT_name : (indirect string, offset: 0xca): sysent + <165> DW_AT_decl_file : 4 + <166> DW_AT_decl_line : 892 + <168> DW_AT_type : <0xeb> + <16c> DW_AT_external : 1 + <16d> DW_AT_declaration : 1 + <1><16e>: Abbrev Number: 14 (DW_TAG_variable) + <16f> DW_AT_name : (indirect string, offset: 0x165): nsyscalls + <173> DW_AT_decl_file : 4 + <174> DW_AT_decl_line : 903 + <176> DW_AT_type : <0x47> + <17a> DW_AT_external : 1 + <17b> DW_AT_declaration : 1 + <1><17c>: Abbrev Number: 15 (DW_TAG_variable) + <17d> DW_AT_name : (indirect string, offset: 0xfb): mpers_target_var + <181> DW_AT_decl_file : 3 + <182> DW_AT_decl_line : 36 + <183> DW_AT_type : <0x147> + <187> DW_AT_external : 1 + <188> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><18e>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_hd_geometry.d2 b/mpers-mx32/struct_hd_geometry.d2 new file mode 100644 index 000000000..5a7dd9121 --- /dev/null +++ b/mpers-mx32/struct_hd_geometry.d2 @@ -0,0 +1,210 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x199): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x186): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x178): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xaa): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x6d): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x114): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x93): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x190): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb8): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x16f): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x12f): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xca): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe2): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x89): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a5): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x80): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x121): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x16): _Bool +<1> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): hd_geometry +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 313 +DW_AT_sibling : <0x147> +<2><10a> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ce): heads +DW_AT_decl_file : 2 +DW_AT_decl_line : 314 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><119> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10c): sectors +DW_AT_decl_file : 2 +DW_AT_decl_line : 315 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 1 (DW_OP_plus_uconst: 1) +<2><128> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc): cylinders +DW_AT_decl_file : 2 +DW_AT_decl_line : 316 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><137> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c): start +DW_AT_decl_file : 2 +DW_AT_decl_line : 317 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><147> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xe8): struct_hd_geometry +DW_AT_decl_file : 3 +DW_AT_decl_line : 34 +DW_AT_type : <0xfd> +<1><152> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd1): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><160> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xca): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><16e> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x165): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><17c> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xfb): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 36 +DW_AT_type : <0x147> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-mx32/struct_hd_geometry.h b/mpers-mx32/struct_hd_geometry.h new file mode 100644 index 000000000..039d161f1 --- /dev/null +++ b/mpers-mx32/struct_hd_geometry.h @@ -0,0 +1,10 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +unsigned char heads; +unsigned char sectors; +uint16_t cylinders; +uint32_t start; +} ATTRIBUTE_PACKED mx32_struct_hd_geometry; +#define MPERS_mx32_struct_hd_geometry mx32_struct_hd_geometry diff --git a/mpers-mx32/struct_ifconf.c b/mpers-mx32/struct_ifconf.c new file mode 100644 index 000000000..ef821f8a7 --- /dev/null +++ b/mpers-mx32/struct_ifconf.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include +#if defined ALPHA || defined SH || defined SH64 +# include +#endif +#include +#include +#include + + +typedef struct ifconf struct_ifconf; +typedef struct ifreq struct_ifreq; + +struct_ifconf mpers_target_var; diff --git a/mpers-mx32/struct_ifconf.d1 b/mpers-mx32/struct_ifconf.d1 new file mode 100644 index 000000000..258bb9290 --- /dev/null +++ b/mpers-mx32/struct_ifconf.d1 @@ -0,0 +1,383 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x31f (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x26): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xbc): mpers-mx32/struct_ifconf.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1d3): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x296): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x24d): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x230): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x14c): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x71): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1a2): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xe1): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x27c): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x116): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x227): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0xb2): __caddr_t + <6f> DW_AT_decl_file : 2 + <70> DW_AT_decl_line : 183 + <71> DW_AT_type : <0x75> + <1><75>: Abbrev Number: 5 (DW_TAG_pointer_type) + <76> DW_AT_byte_size : 4 + <77> DW_AT_type : <0x7b> + <1><7b>: Abbrev Number: 2 (DW_TAG_base_type) + <7c> DW_AT_byte_size : 1 + <7d> DW_AT_encoding : 6 (signed char) + <7e> DW_AT_name : (indirect string, offset: 0x1bd): char + <1><82>: Abbrev Number: 5 (DW_TAG_pointer_type) + <83> DW_AT_byte_size : 4 + <84> DW_AT_type : <0x88> + <1><88>: Abbrev Number: 6 (DW_TAG_const_type) + <89> DW_AT_type : <0x7b> + <1><8d>: Abbrev Number: 7 (DW_TAG_structure_type) + <8e> DW_AT_name : (indirect string, offset: 0x128): sysent + <92> DW_AT_byte_size : 20 + <93> DW_AT_decl_file : 1 + <94> DW_AT_decl_line : 4 + <95> DW_AT_sibling : <0xe0> + <2><99>: Abbrev Number: 8 (DW_TAG_member) + <9a> DW_AT_name : (indirect string, offset: 0x257): nargs + <9e> DW_AT_decl_file : 1 + <9f> DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xd7): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x2c5): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xeb> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x91): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x82> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xeb> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xe0> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1af): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x8d> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0x102> + <1><102>: Abbrev Number: 6 (DW_TAG_const_type) + <103> DW_AT_type : <0xf1> + <1><107>: Abbrev Number: 2 (DW_TAG_base_type) + <108> DW_AT_byte_size : 1 + <109> DW_AT_encoding : 2 (boolean) + <10a> DW_AT_name : (indirect string, offset: 0x20): _Bool + <1><10e>: Abbrev Number: 4 (DW_TAG_typedef) + <10f> DW_AT_name : (indirect string, offset: 0x140): sa_family_t + <113> DW_AT_decl_file : 3 + <114> DW_AT_decl_line : 28 + <115> DW_AT_type : <0x40> + <1><119>: Abbrev Number: 7 (DW_TAG_structure_type) + <11a> DW_AT_name : (indirect string, offset: 0x285): sockaddr + <11e> DW_AT_byte_size : 16 + <11f> DW_AT_decl_file : 4 + <120> DW_AT_decl_line : 149 + <121> DW_AT_sibling : <0x142> + <2><125>: Abbrev Number: 8 (DW_TAG_member) + <126> DW_AT_name : (indirect string, offset: 0x23e): sa_family + <12a> DW_AT_decl_file : 4 + <12b> DW_AT_decl_line : 151 + <12c> DW_AT_type : <0x10e> + <130> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><133>: Abbrev Number: 8 (DW_TAG_member) + <134> DW_AT_name : (indirect string, offset: 0x28e): sa_data + <138> DW_AT_decl_file : 4 + <139> DW_AT_decl_line : 152 + <13a> DW_AT_type : <0x142> + <13e> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><141>: Abbrev Number: 0 + <1><142>: Abbrev Number: 12 (DW_TAG_array_type) + <143> DW_AT_type : <0x7b> + <147> DW_AT_sibling : <0x152> + <2><14b>: Abbrev Number: 13 (DW_TAG_subrange_type) + <14c> DW_AT_type : <0x63> + <150> DW_AT_upper_bound : 13 + <2><151>: Abbrev Number: 0 + <1><152>: Abbrev Number: 7 (DW_TAG_structure_type) + <153> DW_AT_name : (indirect string, offset: 0x0): ifmap + <157> DW_AT_byte_size : 16 + <158> DW_AT_decl_file : 5 + <159> DW_AT_decl_line : 111 + <15a> DW_AT_sibling : <0x1b3> + <2><15e>: Abbrev Number: 8 (DW_TAG_member) + <15f> DW_AT_name : (indirect string, offset: 0x2a2): mem_start + <163> DW_AT_decl_file : 5 + <164> DW_AT_decl_line : 113 + <165> DW_AT_type : <0x5c> + <169> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><16c>: Abbrev Number: 8 (DW_TAG_member) + <16d> DW_AT_name : (indirect string, offset: 0xf): mem_end + <171> DW_AT_decl_file : 5 + <172> DW_AT_decl_line : 114 + <173> DW_AT_type : <0x5c> + <177> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><17a>: Abbrev Number: 8 (DW_TAG_member) + <17b> DW_AT_name : (indirect string, offset: 0x18f): base_addr + <17f> DW_AT_decl_file : 5 + <180> DW_AT_decl_line : 115 + <181> DW_AT_type : <0x40> + <185> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><188>: Abbrev Number: 9 (DW_TAG_member) + <189> DW_AT_name : irq + <18d> DW_AT_decl_file : 5 + <18e> DW_AT_decl_line : 116 + <18f> DW_AT_type : <0x39> + <193> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><196>: Abbrev Number: 9 (DW_TAG_member) + <197> DW_AT_name : dma + <19b> DW_AT_decl_file : 5 + <19c> DW_AT_decl_line : 117 + <19d> DW_AT_type : <0x39> + <1a1> DW_AT_data_member_location: 2 byte block: 23 b (DW_OP_plus_uconst: 11) + <2><1a4>: Abbrev Number: 8 (DW_TAG_member) + <1a5> DW_AT_name : (indirect string, offset: 0x248): port + <1a9> DW_AT_decl_file : 5 + <1aa> DW_AT_decl_line : 118 + <1ab> DW_AT_type : <0x39> + <1af> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1b2>: Abbrev Number: 0 + <1><1b3>: Abbrev Number: 14 (DW_TAG_union_type) + <1b4> DW_AT_byte_size : 16 + <1b5> DW_AT_decl_file : 5 + <1b6> DW_AT_decl_line : 130 + <1b7> DW_AT_sibling : <0x1c7> + <2><1bb>: Abbrev Number: 15 (DW_TAG_member) + <1bc> DW_AT_name : (indirect string, offset: 0x15a): ifrn_name + <1c0> DW_AT_decl_file : 5 + <1c1> DW_AT_decl_line : 132 + <1c2> DW_AT_type : <0x1c7> + <2><1c6>: Abbrev Number: 0 + <1><1c7>: Abbrev Number: 12 (DW_TAG_array_type) + <1c8> DW_AT_type : <0x7b> + <1cc> DW_AT_sibling : <0x1d7> + <2><1d0>: Abbrev Number: 13 (DW_TAG_subrange_type) + <1d1> DW_AT_type : <0x63> + <1d5> DW_AT_upper_bound : 15 + <2><1d6>: Abbrev Number: 0 + <1><1d7>: Abbrev Number: 14 (DW_TAG_union_type) + <1d8> DW_AT_byte_size : 16 + <1d9> DW_AT_decl_file : 5 + <1da> DW_AT_decl_line : 135 + <1db> DW_AT_sibling : <0x264> + <2><1df>: Abbrev Number: 15 (DW_TAG_member) + <1e0> DW_AT_name : (indirect string, offset: 0xf8): ifru_addr + <1e4> DW_AT_decl_file : 5 + <1e5> DW_AT_decl_line : 137 + <1e6> DW_AT_type : <0x119> + <2><1ea>: Abbrev Number: 15 (DW_TAG_member) + <1eb> DW_AT_name : (indirect string, offset: 0x84): ifru_dstaddr + <1ef> DW_AT_decl_file : 5 + <1f0> DW_AT_decl_line : 138 + <1f1> DW_AT_type : <0x119> + <2><1f5>: Abbrev Number: 15 (DW_TAG_member) + <1f6> DW_AT_name : (indirect string, offset: 0x9a): ifru_broadaddr + <1fa> DW_AT_decl_file : 5 + <1fb> DW_AT_decl_line : 139 + <1fc> DW_AT_type : <0x119> + <2><200>: Abbrev Number: 15 (DW_TAG_member) + <201> DW_AT_name : (indirect string, offset: 0x2b8): ifru_netmask + <205> DW_AT_decl_file : 5 + <206> DW_AT_decl_line : 140 + <207> DW_AT_type : <0x119> + <2><20b>: Abbrev Number: 15 (DW_TAG_member) + <20c> DW_AT_name : (indirect string, offset: 0x2ac): ifru_hwaddr + <210> DW_AT_decl_file : 5 + <211> DW_AT_decl_line : 141 + <212> DW_AT_type : <0x119> + <2><216>: Abbrev Number: 15 (DW_TAG_member) + <217> DW_AT_name : (indirect string, offset: 0x102): ifru_flags + <21b> DW_AT_decl_file : 5 + <21c> DW_AT_decl_line : 142 + <21d> DW_AT_type : <0x24> + <2><221>: Abbrev Number: 15 (DW_TAG_member) + <222> DW_AT_name : (indirect string, offset: 0x21b): ifru_ivalue + <226> DW_AT_decl_file : 5 + <227> DW_AT_decl_line : 143 + <228> DW_AT_type : <0x2b> + <2><22c>: Abbrev Number: 15 (DW_TAG_member) + <22d> DW_AT_name : (indirect string, offset: 0x10d): ifru_mtu + <231> DW_AT_decl_file : 5 + <232> DW_AT_decl_line : 144 + <233> DW_AT_type : <0x2b> + <2><237>: Abbrev Number: 15 (DW_TAG_member) + <238> DW_AT_name : (indirect string, offset: 0x17): ifru_map + <23c> DW_AT_decl_file : 5 + <23d> DW_AT_decl_line : 145 + <23e> DW_AT_type : <0x152> + <2><242>: Abbrev Number: 15 (DW_TAG_member) + <243> DW_AT_name : (indirect string, offset: 0x25d): ifru_slave + <247> DW_AT_decl_file : 5 + <248> DW_AT_decl_line : 146 + <249> DW_AT_type : <0x1c7> + <2><24d>: Abbrev Number: 15 (DW_TAG_member) + <24e> DW_AT_name : (indirect string, offset: 0x20e): ifru_newname + <252> DW_AT_decl_file : 5 + <253> DW_AT_decl_line : 147 + <254> DW_AT_type : <0x1c7> + <2><258>: Abbrev Number: 15 (DW_TAG_member) + <259> DW_AT_name : (indirect string, offset: 0x17e): ifru_data + <25d> DW_AT_decl_file : 5 + <25e> DW_AT_decl_line : 148 + <25f> DW_AT_type : <0x6a> + <2><263>: Abbrev Number: 0 + <1><264>: Abbrev Number: 7 (DW_TAG_structure_type) + <265> DW_AT_name : (indirect string, offset: 0x268): ifreq + <269> DW_AT_byte_size : 32 + <26a> DW_AT_decl_file : 5 + <26b> DW_AT_decl_line : 126 + <26c> DW_AT_sibling : <0x28d> + <2><270>: Abbrev Number: 8 (DW_TAG_member) + <271> DW_AT_name : (indirect string, offset: 0x199): ifr_ifrn + <275> DW_AT_decl_file : 5 + <276> DW_AT_decl_line : 133 + <277> DW_AT_type : <0x1b3> + <27b> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><27e>: Abbrev Number: 8 (DW_TAG_member) + <27f> DW_AT_name : (indirect string, offset: 0x1c2): ifr_ifru + <283> DW_AT_decl_file : 5 + <284> DW_AT_decl_line : 149 + <285> DW_AT_type : <0x1d7> + <289> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><28c>: Abbrev Number: 0 + <1><28d>: Abbrev Number: 14 (DW_TAG_union_type) + <28e> DW_AT_byte_size : 4 + <28f> DW_AT_decl_file : 5 + <290> DW_AT_decl_line : 179 + <291> DW_AT_sibling : <0x2ac> + <2><295>: Abbrev Number: 15 (DW_TAG_member) + <296> DW_AT_name : (indirect string, offset: 0xa9): ifcu_buf + <29a> DW_AT_decl_file : 5 + <29b> DW_AT_decl_line : 181 + <29c> DW_AT_type : <0x6a> + <2><2a0>: Abbrev Number: 15 (DW_TAG_member) + <2a1> DW_AT_name : (indirect string, offset: 0x164): ifcu_req + <2a5> DW_AT_decl_file : 5 + <2a6> DW_AT_decl_line : 182 + <2a7> DW_AT_type : <0x2ac> + <2><2ab>: Abbrev Number: 0 + <1><2ac>: Abbrev Number: 5 (DW_TAG_pointer_type) + <2ad> DW_AT_byte_size : 4 + <2ae> DW_AT_type : <0x264> + <1><2b2>: Abbrev Number: 7 (DW_TAG_structure_type) + <2b3> DW_AT_name : (indirect string, offset: 0x188): ifconf + <2b7> DW_AT_byte_size : 8 + <2b8> DW_AT_decl_file : 5 + <2b9> DW_AT_decl_line : 176 + <2ba> DW_AT_sibling : <0x2db> + <2><2be>: Abbrev Number: 8 (DW_TAG_member) + <2bf> DW_AT_name : (indirect string, offset: 0x1cb): ifc_len + <2c3> DW_AT_decl_file : 5 + <2c4> DW_AT_decl_line : 178 + <2c5> DW_AT_type : <0x2b> + <2c9> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><2cc>: Abbrev Number: 8 (DW_TAG_member) + <2cd> DW_AT_name : (indirect string, offset: 0x6): ifc_ifcu + <2d1> DW_AT_decl_file : 5 + <2d2> DW_AT_decl_line : 183 + <2d3> DW_AT_type : <0x28d> + <2d7> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><2da>: Abbrev Number: 0 + <1><2db>: Abbrev Number: 4 (DW_TAG_typedef) + <2dc> DW_AT_name : (indirect string, offset: 0x26e): struct_ifconf + <2e0> DW_AT_decl_file : 6 + <2e1> DW_AT_decl_line : 39 + <2e2> DW_AT_type : <0x2b2> + <1><2e6>: Abbrev Number: 16 (DW_TAG_variable) + <2e7> DW_AT_name : (indirect string, offset: 0x12f): current_wordsize + <2eb> DW_AT_decl_file : 7 + <2ec> DW_AT_decl_line : 757 + <2ee> DW_AT_type : <0x47> + <2f2> DW_AT_external : 1 + <2f3> DW_AT_declaration : 1 + <1><2f4>: Abbrev Number: 16 (DW_TAG_variable) + <2f5> DW_AT_name : (indirect string, offset: 0x128): sysent + <2f9> DW_AT_decl_file : 7 + <2fa> DW_AT_decl_line : 892 + <2fc> DW_AT_type : <0xfc> + <300> DW_AT_external : 1 + <301> DW_AT_declaration : 1 + <1><302>: Abbrev Number: 16 (DW_TAG_variable) + <303> DW_AT_name : (indirect string, offset: 0x204): nsyscalls + <307> DW_AT_decl_file : 7 + <308> DW_AT_decl_line : 903 + <30a> DW_AT_type : <0x47> + <30e> DW_AT_external : 1 + <30f> DW_AT_declaration : 1 + <1><310>: Abbrev Number: 17 (DW_TAG_variable) + <311> DW_AT_name : (indirect string, offset: 0x16d): mpers_target_var + <315> DW_AT_decl_file : 6 + <316> DW_AT_decl_line : 42 + <317> DW_AT_type : <0x2db> + <31b> DW_AT_external : 1 + <31c> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><322>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_ifconf.d2 b/mpers-mx32/struct_ifconf.d2 new file mode 100644 index 000000000..3b6733123 --- /dev/null +++ b/mpers-mx32/struct_ifconf.d2 @@ -0,0 +1,431 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x296): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x24d): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x230): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x14c): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x71): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1a2): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xe1): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x27c): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x116): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x227): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xb2): __caddr_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 183 +DW_AT_type : <0x75> +<1><75> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x7b> +<1><7b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1bd): char +<1><82> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x88> +<1><88> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x7b> +<1><8d> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x128): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xe0> +<2><99> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x257): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd7): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c5): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xeb> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x91): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x82> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xeb> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xe0> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1af): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x8d> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x102> +<1><102> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xf1> +<1><107> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x20): _Bool +<1><10e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x140): sa_family_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 28 +DW_AT_type : <0x40> +<1><119> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x285): sockaddr +DW_AT_byte_size : 16 +DW_AT_decl_file : 4 +DW_AT_decl_line : 149 +DW_AT_sibling : <0x142> +<2><125> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23e): sa_family +DW_AT_decl_file : 4 +DW_AT_decl_line : 151 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><133> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x28e): sa_data +DW_AT_decl_file : 4 +DW_AT_decl_line : 152 +DW_AT_type : <0x142> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<1><142> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x7b> +DW_AT_sibling : <0x152> +<2><14b> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 13 +<1><152> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): ifmap +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 111 +DW_AT_sibling : <0x1b3> +<2><15e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2a2): mem_start +DW_AT_decl_file : 5 +DW_AT_decl_line : 113 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><16c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf): mem_end +DW_AT_decl_file : 5 +DW_AT_decl_line : 114 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><17a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18f): base_addr +DW_AT_decl_file : 5 +DW_AT_decl_line : 115 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><188> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : irq +DW_AT_decl_file : 5 +DW_AT_decl_line : 116 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><196> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : dma +DW_AT_decl_file : 5 +DW_AT_decl_line : 117 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 b (DW_OP_plus_uconst: 11) +<2><1a4> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x248): port +DW_AT_decl_file : 5 +DW_AT_decl_line : 118 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1b3> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 130 +DW_AT_sibling : <0x1c7> +<2><1bb> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15a): ifrn_name +DW_AT_decl_file : 5 +DW_AT_decl_line : 132 +DW_AT_type : <0x1c7> +<1><1c7> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x7b> +DW_AT_sibling : <0x1d7> +<2><1d0> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 15 +<1><1d7> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 135 +DW_AT_sibling : <0x264> +<2><1df> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf8): ifru_addr +DW_AT_decl_file : 5 +DW_AT_decl_line : 137 +DW_AT_type : <0x119> +<2><1ea> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x84): ifru_dstaddr +DW_AT_decl_file : 5 +DW_AT_decl_line : 138 +DW_AT_type : <0x119> +<2><1f5> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9a): ifru_broadaddr +DW_AT_decl_file : 5 +DW_AT_decl_line : 139 +DW_AT_type : <0x119> +<2><200> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2b8): ifru_netmask +DW_AT_decl_file : 5 +DW_AT_decl_line : 140 +DW_AT_type : <0x119> +<2><20b> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2ac): ifru_hwaddr +DW_AT_decl_file : 5 +DW_AT_decl_line : 141 +DW_AT_type : <0x119> +<2><216> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x102): ifru_flags +DW_AT_decl_file : 5 +DW_AT_decl_line : 142 +DW_AT_type : <0x24> +<2><221> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21b): ifru_ivalue +DW_AT_decl_file : 5 +DW_AT_decl_line : 143 +DW_AT_type : <0x2b> +<2><22c> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10d): ifru_mtu +DW_AT_decl_file : 5 +DW_AT_decl_line : 144 +DW_AT_type : <0x2b> +<2><237> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x17): ifru_map +DW_AT_decl_file : 5 +DW_AT_decl_line : 145 +DW_AT_type : <0x152> +<2><242> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x25d): ifru_slave +DW_AT_decl_file : 5 +DW_AT_decl_line : 146 +DW_AT_type : <0x1c7> +<2><24d> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x20e): ifru_newname +DW_AT_decl_file : 5 +DW_AT_decl_line : 147 +DW_AT_type : <0x1c7> +<2><258> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x17e): ifru_data +DW_AT_decl_file : 5 +DW_AT_decl_line : 148 +DW_AT_type : <0x6a> +<1><264> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x268): ifreq +DW_AT_byte_size : 32 +DW_AT_decl_file : 5 +DW_AT_decl_line : 126 +DW_AT_sibling : <0x28d> +<2><270> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x199): ifr_ifrn +DW_AT_decl_file : 5 +DW_AT_decl_line : 133 +DW_AT_type : <0x1b3> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><27e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c2): ifr_ifru +DW_AT_decl_file : 5 +DW_AT_decl_line : 149 +DW_AT_type : <0x1d7> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><28d> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 5 +DW_AT_decl_line : 179 +DW_AT_sibling : <0x2ac> +<2><295> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa9): ifcu_buf +DW_AT_decl_file : 5 +DW_AT_decl_line : 181 +DW_AT_type : <0x6a> +<2><2a0> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x164): ifcu_req +DW_AT_decl_file : 5 +DW_AT_decl_line : 182 +DW_AT_type : <0x2ac> +<1><2ac> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x264> +<1><2b2> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x188): ifconf +DW_AT_byte_size : 8 +DW_AT_decl_file : 5 +DW_AT_decl_line : 176 +DW_AT_sibling : <0x2db> +<2><2be> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1cb): ifc_len +DW_AT_decl_file : 5 +DW_AT_decl_line : 178 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><2cc> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6): ifc_ifcu +DW_AT_decl_file : 5 +DW_AT_decl_line : 183 +DW_AT_type : <0x28d> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><2db> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x26e): struct_ifconf +DW_AT_decl_file : 6 +DW_AT_decl_line : 39 +DW_AT_type : <0x2b2> +<1><2e6> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x12f): current_wordsize +DW_AT_decl_file : 7 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2f4> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x128): sysent +DW_AT_decl_file : 7 +DW_AT_decl_line : 892 +DW_AT_type : <0xfc> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><302> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x204): nsyscalls +DW_AT_decl_file : 7 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><310> +Abbrev Number: 17 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x16d): mpers_target_var +DW_AT_decl_file : 6 +DW_AT_decl_line : 42 +DW_AT_type : <0x2db> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-mx32/struct_ifconf.h b/mpers-mx32/struct_ifconf.h new file mode 100644 index 000000000..a10baa8e6 --- /dev/null +++ b/mpers-mx32/struct_ifconf.h @@ -0,0 +1,11 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t ifc_len; +union { +mpers_ptr_t ifcu_buf; +mpers_ptr_t ifcu_req; +} ifc_ifcu; +} ATTRIBUTE_PACKED mx32_struct_ifconf; +#define MPERS_mx32_struct_ifconf mx32_struct_ifconf diff --git a/mpers-mx32/struct_ifreq.c b/mpers-mx32/struct_ifreq.c new file mode 100644 index 000000000..691cb13d2 --- /dev/null +++ b/mpers-mx32/struct_ifreq.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include +#if defined ALPHA || defined SH || defined SH64 +# include +#endif +#include +#include +#include + + +typedef struct ifconf struct_ifconf; +typedef struct ifreq struct_ifreq; + +struct_ifreq mpers_target_var; diff --git a/mpers-mx32/struct_ifreq.d1 b/mpers-mx32/struct_ifreq.d1 new file mode 100644 index 000000000..4c6529208 --- /dev/null +++ b/mpers-mx32/struct_ifreq.d1 @@ -0,0 +1,345 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x2d1 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x14): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x88): mpers-mx32/struct_ifreq.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1a6): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x26a): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x220): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x203): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x137): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x5f): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x17d): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xbf): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x250): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xf4): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1fa): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_typedef) + <6b> DW_AT_name : (indirect string, offset: 0xa2): __caddr_t + <6f> DW_AT_decl_file : 2 + <70> DW_AT_decl_line : 183 + <71> DW_AT_type : <0x75> + <1><75>: Abbrev Number: 5 (DW_TAG_pointer_type) + <76> DW_AT_byte_size : 4 + <77> DW_AT_type : <0x7b> + <1><7b>: Abbrev Number: 2 (DW_TAG_base_type) + <7c> DW_AT_byte_size : 1 + <7d> DW_AT_encoding : 6 (signed char) + <7e> DW_AT_name : (indirect string, offset: 0x198): char + <1><82>: Abbrev Number: 5 (DW_TAG_pointer_type) + <83> DW_AT_byte_size : 4 + <84> DW_AT_type : <0x88> + <1><88>: Abbrev Number: 6 (DW_TAG_const_type) + <89> DW_AT_type : <0x7b> + <1><8d>: Abbrev Number: 7 (DW_TAG_structure_type) + <8e> DW_AT_name : (indirect string, offset: 0x113): sysent + <92> DW_AT_byte_size : 20 + <93> DW_AT_decl_file : 1 + <94> DW_AT_decl_line : 4 + <95> DW_AT_sibling : <0xe0> + <2><99>: Abbrev Number: 8 (DW_TAG_member) + <9a> DW_AT_name : (indirect string, offset: 0x22a): nargs + <9e> DW_AT_decl_file : 1 + <9f> DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb5): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x299): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xeb> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x7f): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x82> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xeb> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xe0> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x18a): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x8d> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0x102> + <1><102>: Abbrev Number: 6 (DW_TAG_const_type) + <103> DW_AT_type : <0xf1> + <1><107>: Abbrev Number: 2 (DW_TAG_base_type) + <108> DW_AT_byte_size : 1 + <109> DW_AT_encoding : 2 (boolean) + <10a> DW_AT_name : (indirect string, offset: 0xe): _Bool + <1><10e>: Abbrev Number: 4 (DW_TAG_typedef) + <10f> DW_AT_name : (indirect string, offset: 0x12b): sa_family_t + <113> DW_AT_decl_file : 3 + <114> DW_AT_decl_line : 28 + <115> DW_AT_type : <0x40> + <1><119>: Abbrev Number: 7 (DW_TAG_structure_type) + <11a> DW_AT_name : (indirect string, offset: 0x259): sockaddr + <11e> DW_AT_byte_size : 16 + <11f> DW_AT_decl_file : 4 + <120> DW_AT_decl_line : 149 + <121> DW_AT_sibling : <0x142> + <2><125>: Abbrev Number: 8 (DW_TAG_member) + <126> DW_AT_name : (indirect string, offset: 0x211): sa_family + <12a> DW_AT_decl_file : 4 + <12b> DW_AT_decl_line : 151 + <12c> DW_AT_type : <0x10e> + <130> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><133>: Abbrev Number: 8 (DW_TAG_member) + <134> DW_AT_name : (indirect string, offset: 0x262): sa_data + <138> DW_AT_decl_file : 4 + <139> DW_AT_decl_line : 152 + <13a> DW_AT_type : <0x142> + <13e> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><141>: Abbrev Number: 0 + <1><142>: Abbrev Number: 12 (DW_TAG_array_type) + <143> DW_AT_type : <0x7b> + <147> DW_AT_sibling : <0x152> + <2><14b>: Abbrev Number: 13 (DW_TAG_subrange_type) + <14c> DW_AT_type : <0x63> + <150> DW_AT_upper_bound : 13 + <2><151>: Abbrev Number: 0 + <1><152>: Abbrev Number: 7 (DW_TAG_structure_type) + <153> DW_AT_name : (indirect string, offset: 0x0): ifmap + <157> DW_AT_byte_size : 16 + <158> DW_AT_decl_file : 5 + <159> DW_AT_decl_line : 111 + <15a> DW_AT_sibling : <0x1b3> + <2><15e>: Abbrev Number: 8 (DW_TAG_member) + <15f> DW_AT_name : (indirect string, offset: 0x276): mem_start + <163> DW_AT_decl_file : 5 + <164> DW_AT_decl_line : 113 + <165> DW_AT_type : <0x5c> + <169> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><16c>: Abbrev Number: 8 (DW_TAG_member) + <16d> DW_AT_name : (indirect string, offset: 0x6): mem_end + <171> DW_AT_decl_file : 5 + <172> DW_AT_decl_line : 114 + <173> DW_AT_type : <0x5c> + <177> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><17a>: Abbrev Number: 8 (DW_TAG_member) + <17b> DW_AT_name : (indirect string, offset: 0x16a): base_addr + <17f> DW_AT_decl_file : 5 + <180> DW_AT_decl_line : 115 + <181> DW_AT_type : <0x40> + <185> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><188>: Abbrev Number: 9 (DW_TAG_member) + <189> DW_AT_name : irq + <18d> DW_AT_decl_file : 5 + <18e> DW_AT_decl_line : 116 + <18f> DW_AT_type : <0x39> + <193> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><196>: Abbrev Number: 9 (DW_TAG_member) + <197> DW_AT_name : dma + <19b> DW_AT_decl_file : 5 + <19c> DW_AT_decl_line : 117 + <19d> DW_AT_type : <0x39> + <1a1> DW_AT_data_member_location: 2 byte block: 23 b (DW_OP_plus_uconst: 11) + <2><1a4>: Abbrev Number: 8 (DW_TAG_member) + <1a5> DW_AT_name : (indirect string, offset: 0x21b): port + <1a9> DW_AT_decl_file : 5 + <1aa> DW_AT_decl_line : 118 + <1ab> DW_AT_type : <0x39> + <1af> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1b2>: Abbrev Number: 0 + <1><1b3>: Abbrev Number: 14 (DW_TAG_union_type) + <1b4> DW_AT_byte_size : 16 + <1b5> DW_AT_decl_file : 5 + <1b6> DW_AT_decl_line : 130 + <1b7> DW_AT_sibling : <0x1c7> + <2><1bb>: Abbrev Number: 15 (DW_TAG_member) + <1bc> DW_AT_name : (indirect string, offset: 0x145): ifrn_name + <1c0> DW_AT_decl_file : 5 + <1c1> DW_AT_decl_line : 132 + <1c2> DW_AT_type : <0x1c7> + <2><1c6>: Abbrev Number: 0 + <1><1c7>: Abbrev Number: 12 (DW_TAG_array_type) + <1c8> DW_AT_type : <0x7b> + <1cc> DW_AT_sibling : <0x1d7> + <2><1d0>: Abbrev Number: 13 (DW_TAG_subrange_type) + <1d1> DW_AT_type : <0x63> + <1d5> DW_AT_upper_bound : 15 + <2><1d6>: Abbrev Number: 0 + <1><1d7>: Abbrev Number: 14 (DW_TAG_union_type) + <1d8> DW_AT_byte_size : 16 + <1d9> DW_AT_decl_file : 5 + <1da> DW_AT_decl_line : 135 + <1db> DW_AT_sibling : <0x264> + <2><1df>: Abbrev Number: 15 (DW_TAG_member) + <1e0> DW_AT_name : (indirect string, offset: 0xd6): ifru_addr + <1e4> DW_AT_decl_file : 5 + <1e5> DW_AT_decl_line : 137 + <1e6> DW_AT_type : <0x119> + <2><1ea>: Abbrev Number: 15 (DW_TAG_member) + <1eb> DW_AT_name : (indirect string, offset: 0x72): ifru_dstaddr + <1ef> DW_AT_decl_file : 5 + <1f0> DW_AT_decl_line : 138 + <1f1> DW_AT_type : <0x119> + <2><1f5>: Abbrev Number: 15 (DW_TAG_member) + <1f6> DW_AT_name : (indirect string, offset: 0x241): ifru_broadaddr + <1fa> DW_AT_decl_file : 5 + <1fb> DW_AT_decl_line : 139 + <1fc> DW_AT_type : <0x119> + <2><200>: Abbrev Number: 15 (DW_TAG_member) + <201> DW_AT_name : (indirect string, offset: 0x28c): ifru_netmask + <205> DW_AT_decl_file : 5 + <206> DW_AT_decl_line : 140 + <207> DW_AT_type : <0x119> + <2><20b>: Abbrev Number: 15 (DW_TAG_member) + <20c> DW_AT_name : (indirect string, offset: 0x280): ifru_hwaddr + <210> DW_AT_decl_file : 5 + <211> DW_AT_decl_line : 141 + <212> DW_AT_type : <0x119> + <2><216>: Abbrev Number: 15 (DW_TAG_member) + <217> DW_AT_name : (indirect string, offset: 0xe0): ifru_flags + <21b> DW_AT_decl_file : 5 + <21c> DW_AT_decl_line : 142 + <21d> DW_AT_type : <0x24> + <2><221>: Abbrev Number: 15 (DW_TAG_member) + <222> DW_AT_name : (indirect string, offset: 0x1ee): ifru_ivalue + <226> DW_AT_decl_file : 5 + <227> DW_AT_decl_line : 143 + <228> DW_AT_type : <0x2b> + <2><22c>: Abbrev Number: 15 (DW_TAG_member) + <22d> DW_AT_name : (indirect string, offset: 0xeb): ifru_mtu + <231> DW_AT_decl_file : 5 + <232> DW_AT_decl_line : 144 + <233> DW_AT_type : <0x2b> + <2><237>: Abbrev Number: 15 (DW_TAG_member) + <238> DW_AT_name : (indirect string, offset: 0xac): ifru_map + <23c> DW_AT_decl_file : 5 + <23d> DW_AT_decl_line : 145 + <23e> DW_AT_type : <0x152> + <2><242>: Abbrev Number: 15 (DW_TAG_member) + <243> DW_AT_name : (indirect string, offset: 0x230): ifru_slave + <247> DW_AT_decl_file : 5 + <248> DW_AT_decl_line : 146 + <249> DW_AT_type : <0x1c7> + <2><24d>: Abbrev Number: 15 (DW_TAG_member) + <24e> DW_AT_name : (indirect string, offset: 0x1e1): ifru_newname + <252> DW_AT_decl_file : 5 + <253> DW_AT_decl_line : 147 + <254> DW_AT_type : <0x1c7> + <2><258>: Abbrev Number: 15 (DW_TAG_member) + <259> DW_AT_name : (indirect string, offset: 0x160): ifru_data + <25d> DW_AT_decl_file : 5 + <25e> DW_AT_decl_line : 148 + <25f> DW_AT_type : <0x6a> + <2><263>: Abbrev Number: 0 + <1><264>: Abbrev Number: 7 (DW_TAG_structure_type) + <265> DW_AT_name : (indirect string, offset: 0x23b): ifreq + <269> DW_AT_byte_size : 32 + <26a> DW_AT_decl_file : 5 + <26b> DW_AT_decl_line : 126 + <26c> DW_AT_sibling : <0x28d> + <2><270>: Abbrev Number: 8 (DW_TAG_member) + <271> DW_AT_name : (indirect string, offset: 0x174): ifr_ifrn + <275> DW_AT_decl_file : 5 + <276> DW_AT_decl_line : 133 + <277> DW_AT_type : <0x1b3> + <27b> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><27e>: Abbrev Number: 8 (DW_TAG_member) + <27f> DW_AT_name : (indirect string, offset: 0x19d): ifr_ifru + <283> DW_AT_decl_file : 5 + <284> DW_AT_decl_line : 149 + <285> DW_AT_type : <0x1d7> + <289> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><28c>: Abbrev Number: 0 + <1><28d>: Abbrev Number: 4 (DW_TAG_typedef) + <28e> DW_AT_name : (indirect string, offset: 0x106): struct_ifreq + <292> DW_AT_decl_file : 6 + <293> DW_AT_decl_line : 40 + <294> DW_AT_type : <0x264> + <1><298>: Abbrev Number: 16 (DW_TAG_variable) + <299> DW_AT_name : (indirect string, offset: 0x11a): current_wordsize + <29d> DW_AT_decl_file : 7 + <29e> DW_AT_decl_line : 757 + <2a0> DW_AT_type : <0x47> + <2a4> DW_AT_external : 1 + <2a5> DW_AT_declaration : 1 + <1><2a6>: Abbrev Number: 16 (DW_TAG_variable) + <2a7> DW_AT_name : (indirect string, offset: 0x113): sysent + <2ab> DW_AT_decl_file : 7 + <2ac> DW_AT_decl_line : 892 + <2ae> DW_AT_type : <0xfc> + <2b2> DW_AT_external : 1 + <2b3> DW_AT_declaration : 1 + <1><2b4>: Abbrev Number: 16 (DW_TAG_variable) + <2b5> DW_AT_name : (indirect string, offset: 0x1d7): nsyscalls + <2b9> DW_AT_decl_file : 7 + <2ba> DW_AT_decl_line : 903 + <2bc> DW_AT_type : <0x47> + <2c0> DW_AT_external : 1 + <2c1> DW_AT_declaration : 1 + <1><2c2>: Abbrev Number: 17 (DW_TAG_variable) + <2c3> DW_AT_name : (indirect string, offset: 0x14f): mpers_target_var + <2c7> DW_AT_decl_file : 6 + <2c8> DW_AT_decl_line : 42 + <2c9> DW_AT_type : <0x28d> + <2cd> DW_AT_external : 1 + <2ce> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><2d4>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_ifreq.d2 b/mpers-mx32/struct_ifreq.d2 new file mode 100644 index 000000000..d5e0e5509 --- /dev/null +++ b/mpers-mx32/struct_ifreq.d2 @@ -0,0 +1,388 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x26a): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x220): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x203): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x137): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x5f): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x17d): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xbf): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x250): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xf4): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1fa): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xa2): __caddr_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 183 +DW_AT_type : <0x75> +<1><75> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x7b> +<1><7b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x198): char +<1><82> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x88> +<1><88> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x7b> +<1><8d> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x113): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xe0> +<2><99> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22a): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb5): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x299): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xeb> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7f): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x82> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xeb> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xe0> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x18a): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x8d> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x102> +<1><102> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xf1> +<1><107> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xe): _Bool +<1><10e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x12b): sa_family_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 28 +DW_AT_type : <0x40> +<1><119> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x259): sockaddr +DW_AT_byte_size : 16 +DW_AT_decl_file : 4 +DW_AT_decl_line : 149 +DW_AT_sibling : <0x142> +<2><125> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x211): sa_family +DW_AT_decl_file : 4 +DW_AT_decl_line : 151 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><133> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x262): sa_data +DW_AT_decl_file : 4 +DW_AT_decl_line : 152 +DW_AT_type : <0x142> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<1><142> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x7b> +DW_AT_sibling : <0x152> +<2><14b> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 13 +<1><152> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): ifmap +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 111 +DW_AT_sibling : <0x1b3> +<2><15e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x276): mem_start +DW_AT_decl_file : 5 +DW_AT_decl_line : 113 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><16c> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6): mem_end +DW_AT_decl_file : 5 +DW_AT_decl_line : 114 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><17a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16a): base_addr +DW_AT_decl_file : 5 +DW_AT_decl_line : 115 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><188> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : irq +DW_AT_decl_file : 5 +DW_AT_decl_line : 116 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><196> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : dma +DW_AT_decl_file : 5 +DW_AT_decl_line : 117 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 b (DW_OP_plus_uconst: 11) +<2><1a4> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21b): port +DW_AT_decl_file : 5 +DW_AT_decl_line : 118 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1b3> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 130 +DW_AT_sibling : <0x1c7> +<2><1bb> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x145): ifrn_name +DW_AT_decl_file : 5 +DW_AT_decl_line : 132 +DW_AT_type : <0x1c7> +<1><1c7> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x7b> +DW_AT_sibling : <0x1d7> +<2><1d0> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 15 +<1><1d7> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 135 +DW_AT_sibling : <0x264> +<2><1df> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd6): ifru_addr +DW_AT_decl_file : 5 +DW_AT_decl_line : 137 +DW_AT_type : <0x119> +<2><1ea> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x72): ifru_dstaddr +DW_AT_decl_file : 5 +DW_AT_decl_line : 138 +DW_AT_type : <0x119> +<2><1f5> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x241): ifru_broadaddr +DW_AT_decl_file : 5 +DW_AT_decl_line : 139 +DW_AT_type : <0x119> +<2><200> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x28c): ifru_netmask +DW_AT_decl_file : 5 +DW_AT_decl_line : 140 +DW_AT_type : <0x119> +<2><20b> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x280): ifru_hwaddr +DW_AT_decl_file : 5 +DW_AT_decl_line : 141 +DW_AT_type : <0x119> +<2><216> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe0): ifru_flags +DW_AT_decl_file : 5 +DW_AT_decl_line : 142 +DW_AT_type : <0x24> +<2><221> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ee): ifru_ivalue +DW_AT_decl_file : 5 +DW_AT_decl_line : 143 +DW_AT_type : <0x2b> +<2><22c> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xeb): ifru_mtu +DW_AT_decl_file : 5 +DW_AT_decl_line : 144 +DW_AT_type : <0x2b> +<2><237> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xac): ifru_map +DW_AT_decl_file : 5 +DW_AT_decl_line : 145 +DW_AT_type : <0x152> +<2><242> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x230): ifru_slave +DW_AT_decl_file : 5 +DW_AT_decl_line : 146 +DW_AT_type : <0x1c7> +<2><24d> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e1): ifru_newname +DW_AT_decl_file : 5 +DW_AT_decl_line : 147 +DW_AT_type : <0x1c7> +<2><258> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x160): ifru_data +DW_AT_decl_file : 5 +DW_AT_decl_line : 148 +DW_AT_type : <0x6a> +<1><264> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x23b): ifreq +DW_AT_byte_size : 32 +DW_AT_decl_file : 5 +DW_AT_decl_line : 126 +DW_AT_sibling : <0x28d> +<2><270> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x174): ifr_ifrn +DW_AT_decl_file : 5 +DW_AT_decl_line : 133 +DW_AT_type : <0x1b3> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><27e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x19d): ifr_ifru +DW_AT_decl_file : 5 +DW_AT_decl_line : 149 +DW_AT_type : <0x1d7> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><28d> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x106): struct_ifreq +DW_AT_decl_file : 6 +DW_AT_decl_line : 40 +DW_AT_type : <0x264> +<1><298> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x11a): current_wordsize +DW_AT_decl_file : 7 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2a6> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x113): sysent +DW_AT_decl_file : 7 +DW_AT_decl_line : 892 +DW_AT_type : <0xfc> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2b4> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1d7): nsyscalls +DW_AT_decl_file : 7 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2c2> +Abbrev Number: 17 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x14f): mpers_target_var +DW_AT_decl_file : 6 +DW_AT_decl_line : 42 +DW_AT_type : <0x28d> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_ifreq.h b/mpers-mx32/struct_ifreq.h new file mode 100644 index 000000000..6aa7184d7 --- /dev/null +++ b/mpers-mx32/struct_ifreq.h @@ -0,0 +1,46 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +union { +char ifrn_name[16]; +} ifr_ifrn; +union { +struct { +uint16_t sa_family; +char sa_data[14]; +} ATTRIBUTE_PACKED ifru_addr; +struct { +uint16_t sa_family; +char sa_data[14]; +} ATTRIBUTE_PACKED ifru_dstaddr; +struct { +uint16_t sa_family; +char sa_data[14]; +} ATTRIBUTE_PACKED ifru_broadaddr; +struct { +uint16_t sa_family; +char sa_data[14]; +} ATTRIBUTE_PACKED ifru_netmask; +struct { +uint16_t sa_family; +char sa_data[14]; +} ATTRIBUTE_PACKED ifru_hwaddr; +int16_t ifru_flags; +int32_t ifru_ivalue; +int32_t ifru_mtu; +struct { +uint32_t mem_start; +uint32_t mem_end; +uint16_t base_addr; +unsigned char irq; +unsigned char dma; +unsigned char port; +unsigned char mpers_end_filler_1[3]; +} ATTRIBUTE_PACKED ifru_map; +char ifru_slave[16]; +char ifru_newname[16]; +mpers_ptr_t ifru_data; +} ifr_ifru; +} ATTRIBUTE_PACKED mx32_struct_ifreq; +#define MPERS_mx32_struct_ifreq mx32_struct_ifreq diff --git a/mpers-mx32/struct_loop_info.c b/mpers-mx32/struct_loop_info.c new file mode 100644 index 000000000..25d76e1ba --- /dev/null +++ b/mpers-mx32/struct_loop_info.c @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2012 The Chromium OS Authors. + * Written by Mike Frysinger . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include +#include + +typedef struct loop_info struct_loop_info; + + +struct_loop_info mpers_target_var; diff --git a/mpers-mx32/struct_loop_info.d1 b/mpers-mx32/struct_loop_info.d1 new file mode 100644 index 000000000..498ab5563 --- /dev/null +++ b/mpers-mx32/struct_loop_info.d1 @@ -0,0 +1,272 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x243 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x23): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x1e9): mpers-mx32/struct_loop_info.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x197): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x22c): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x219): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1db): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xe0): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x6e): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x164): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xc1): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x223): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xee): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1d2): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x17f): char + <1><71>: Abbrev Number: 4 (DW_TAG_array_type) + <72> DW_AT_type : <0x6a> + <76> DW_AT_sibling : <0x81> + <2><7a>: Abbrev Number: 5 (DW_TAG_subrange_type) + <7b> DW_AT_type : <0x63> + <7f> DW_AT_upper_bound : 3 + <2><80>: Abbrev Number: 0 + <1><81>: Abbrev Number: 6 (DW_TAG_pointer_type) + <82> DW_AT_byte_size : 4 + <83> DW_AT_type : <0x87> + <1><87>: Abbrev Number: 7 (DW_TAG_const_type) + <88> DW_AT_type : <0x6a> + <1><8c>: Abbrev Number: 8 (DW_TAG_typedef) + <8d> DW_AT_name : (indirect string, offset: 0x107): __kernel_old_dev_t + <91> DW_AT_decl_file : 2 + <92> DW_AT_decl_line : 14 + <93> DW_AT_type : <0x5c> + <1><97>: Abbrev Number: 9 (DW_TAG_structure_type) + <98> DW_AT_name : (indirect string, offset: 0x100): sysent + <9c> DW_AT_byte_size : 20 + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 4 + <9f> DW_AT_sibling : <0xea> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x13b): nargs + DW_AT_decl_file : 1 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb7): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 11 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x241): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xf5> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x81): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x81> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 12 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xf5> + <2>: Abbrev Number: 13 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 6 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xea> + <1>: Abbrev Number: 8 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x171): struct_sysent + <100> DW_AT_decl_file : 1 + <101> DW_AT_decl_line : 10 + <102> DW_AT_type : <0x97> + <1><106>: Abbrev Number: 6 (DW_TAG_pointer_type) + <107> DW_AT_byte_size : 4 + <108> DW_AT_type : <0x10c> + <1><10c>: Abbrev Number: 7 (DW_TAG_const_type) + <10d> DW_AT_type : <0xfb> + <1><111>: Abbrev Number: 2 (DW_TAG_base_type) + <112> DW_AT_byte_size : 1 + <113> DW_AT_encoding : 2 (boolean) + <114> DW_AT_name : (indirect string, offset: 0x14): _Bool + <1><118>: Abbrev Number: 9 (DW_TAG_structure_type) + <119> DW_AT_name : (indirect string, offset: 0xa): loop_info + <11d> DW_AT_byte_size : 140 + <11e> DW_AT_decl_file : 3 + <11f> DW_AT_decl_line : 30 + <120> DW_AT_sibling : <0x1cf> + <2><124>: Abbrev Number: 10 (DW_TAG_member) + <125> DW_AT_name : (indirect string, offset: 0x18d): lo_number + <129> DW_AT_decl_file : 3 + <12a> DW_AT_decl_line : 31 + <12b> DW_AT_type : <0x2b> + <12f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><132>: Abbrev Number: 10 (DW_TAG_member) + <133> DW_AT_name : (indirect string, offset: 0x20f): lo_device + <137> DW_AT_decl_file : 3 + <138> DW_AT_decl_line : 32 + <139> DW_AT_type : <0x8c> + <13d> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><140>: Abbrev Number: 10 (DW_TAG_member) + <141> DW_AT_name : (indirect string, offset: 0x238): lo_inode + <145> DW_AT_decl_file : 3 + <146> DW_AT_decl_line : 33 + <147> DW_AT_type : <0x5c> + <14b> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><14e>: Abbrev Number: 10 (DW_TAG_member) + <14f> DW_AT_name : (indirect string, offset: 0x8a): lo_rdevice + <153> DW_AT_decl_file : 3 + <154> DW_AT_decl_line : 34 + <155> DW_AT_type : <0x8c> + <159> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><15c>: Abbrev Number: 10 (DW_TAG_member) + <15d> DW_AT_name : (indirect string, offset: 0x0): lo_offset + <161> DW_AT_decl_file : 3 + <162> DW_AT_decl_line : 35 + <163> DW_AT_type : <0x2b> + <167> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><16a>: Abbrev Number: 10 (DW_TAG_member) + <16b> DW_AT_name : (indirect string, offset: 0x11a): lo_encrypt_type + <16f> DW_AT_decl_file : 3 + <170> DW_AT_decl_line : 36 + <171> DW_AT_type : <0x2b> + <175> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><178>: Abbrev Number: 10 (DW_TAG_member) + <179> DW_AT_name : (indirect string, offset: 0x141): lo_encrypt_key_size + <17d> DW_AT_decl_file : 3 + <17e> DW_AT_decl_line : 37 + <17f> DW_AT_type : <0x2b> + <183> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><186>: Abbrev Number: 10 (DW_TAG_member) + <187> DW_AT_name : (indirect string, offset: 0x184): lo_flags + <18b> DW_AT_decl_file : 3 + <18c> DW_AT_decl_line : 38 + <18d> DW_AT_type : <0x2b> + <191> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><194>: Abbrev Number: 10 (DW_TAG_member) + <195> DW_AT_name : (indirect string, offset: 0xd8): lo_name + <199> DW_AT_decl_file : 3 + <19a> DW_AT_decl_line : 39 + <19b> DW_AT_type : <0x1cf> + <19f> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1a2>: Abbrev Number: 10 (DW_TAG_member) + <1a3> DW_AT_name : (indirect string, offset: 0x155): lo_encrypt_key + <1a7> DW_AT_decl_file : 3 + <1a8> DW_AT_decl_line : 40 + <1a9> DW_AT_type : <0x1df> + <1ad> DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) + <2><1b0>: Abbrev Number: 10 (DW_TAG_member) + <1b1> DW_AT_name : (indirect string, offset: 0x207): lo_init + <1b5> DW_AT_decl_file : 3 + <1b6> DW_AT_decl_line : 41 + <1b7> DW_AT_type : <0x1ef> + <1bb> DW_AT_data_member_location: 3 byte block: 23 80 1 (DW_OP_plus_uconst: 128) + <2><1bf>: Abbrev Number: 10 (DW_TAG_member) + <1c0> DW_AT_name : (indirect string, offset: 0x1a): reserved + <1c4> DW_AT_decl_file : 3 + <1c5> DW_AT_decl_line : 42 + <1c6> DW_AT_type : <0x71> + <1ca> DW_AT_data_member_location: 3 byte block: 23 88 1 (DW_OP_plus_uconst: 136) + <2><1ce>: Abbrev Number: 0 + <1><1cf>: Abbrev Number: 4 (DW_TAG_array_type) + <1d0> DW_AT_type : <0x6a> + <1d4> DW_AT_sibling : <0x1df> + <2><1d8>: Abbrev Number: 5 (DW_TAG_subrange_type) + <1d9> DW_AT_type : <0x63> + <1dd> DW_AT_upper_bound : 63 + <2><1de>: Abbrev Number: 0 + <1><1df>: Abbrev Number: 4 (DW_TAG_array_type) + <1e0> DW_AT_type : <0x39> + <1e4> DW_AT_sibling : <0x1ef> + <2><1e8>: Abbrev Number: 5 (DW_TAG_subrange_type) + <1e9> DW_AT_type : <0x63> + <1ed> DW_AT_upper_bound : 31 + <2><1ee>: Abbrev Number: 0 + <1><1ef>: Abbrev Number: 4 (DW_TAG_array_type) + <1f0> DW_AT_type : <0x5c> + <1f4> DW_AT_sibling : <0x1ff> + <2><1f8>: Abbrev Number: 5 (DW_TAG_subrange_type) + <1f9> DW_AT_type : <0x63> + <1fd> DW_AT_upper_bound : 1 + <2><1fe>: Abbrev Number: 0 + <1><1ff>: Abbrev Number: 8 (DW_TAG_typedef) + <200> DW_AT_name : (indirect string, offset: 0x95): struct_loop_info + <204> DW_AT_decl_file : 4 + <205> DW_AT_decl_line : 32 + <206> DW_AT_type : <0x118> + <1><20a>: Abbrev Number: 14 (DW_TAG_variable) + <20b> DW_AT_name : (indirect string, offset: 0x12a): current_wordsize + <20f> DW_AT_decl_file : 5 + <210> DW_AT_decl_line : 757 + <212> DW_AT_type : <0x47> + <216> DW_AT_external : 1 + <217> DW_AT_declaration : 1 + <1><218>: Abbrev Number: 14 (DW_TAG_variable) + <219> DW_AT_name : (indirect string, offset: 0x100): sysent + <21d> DW_AT_decl_file : 5 + <21e> DW_AT_decl_line : 892 + <220> DW_AT_type : <0x106> + <224> DW_AT_external : 1 + <225> DW_AT_declaration : 1 + <1><226>: Abbrev Number: 14 (DW_TAG_variable) + <227> DW_AT_name : (indirect string, offset: 0x1c8): nsyscalls + <22b> DW_AT_decl_file : 5 + <22c> DW_AT_decl_line : 903 + <22e> DW_AT_type : <0x47> + <232> DW_AT_external : 1 + <233> DW_AT_declaration : 1 + <1><234>: Abbrev Number: 15 (DW_TAG_variable) + <235> DW_AT_name : (indirect string, offset: 0xa6): mpers_target_var + <239> DW_AT_decl_file : 4 + <23a> DW_AT_decl_line : 35 + <23b> DW_AT_type : <0x1ff> + <23f> DW_AT_external : 1 + <240> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><246>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_loop_info.d2 b/mpers-mx32/struct_loop_info.d2 new file mode 100644 index 000000000..0b6e073a4 --- /dev/null +++ b/mpers-mx32/struct_loop_info.d2 @@ -0,0 +1,304 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x22c): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x219): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1db): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xe0): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x6e): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x164): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xc1): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x223): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xee): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1d2): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x17f): char +<1><71> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x81> +<2><7a> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 3 +<1><81> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x87> +<1><87> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><8c> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x107): __kernel_old_dev_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 14 +DW_AT_type : <0x5c> +<1><97> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x100): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xea> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x13b): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb7): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x241): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xf5> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x81): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x81> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 12 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xf5> +<2> +Abbrev Number: 13 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xea> +<1> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x171): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x97> +<1><106> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x10c> +<1><10c> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0xfb> +<1><111> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x14): _Bool +<1><118> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xa): loop_info +DW_AT_byte_size : 140 +DW_AT_decl_file : 3 +DW_AT_decl_line : 30 +DW_AT_sibling : <0x1cf> +<2><124> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18d): lo_number +DW_AT_decl_file : 3 +DW_AT_decl_line : 31 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><132> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x20f): lo_device +DW_AT_decl_file : 3 +DW_AT_decl_line : 32 +DW_AT_type : <0x8c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><140> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x238): lo_inode +DW_AT_decl_file : 3 +DW_AT_decl_line : 33 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><14e> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8a): lo_rdevice +DW_AT_decl_file : 3 +DW_AT_decl_line : 34 +DW_AT_type : <0x8c> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><15c> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): lo_offset +DW_AT_decl_file : 3 +DW_AT_decl_line : 35 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><16a> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11a): lo_encrypt_type +DW_AT_decl_file : 3 +DW_AT_decl_line : 36 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><178> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x141): lo_encrypt_key_size +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><186> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x184): lo_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 38 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><194> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd8): lo_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 39 +DW_AT_type : <0x1cf> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1a2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x155): lo_encrypt_key +DW_AT_decl_file : 3 +DW_AT_decl_line : 40 +DW_AT_type : <0x1df> +DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) +<2><1b0> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x207): lo_init +DW_AT_decl_file : 3 +DW_AT_decl_line : 41 +DW_AT_type : <0x1ef> +DW_AT_data_member_location: 3 byte block: 23 80 1 (DW_OP_plus_uconst: 128) +<2><1bf> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 42 +DW_AT_type : <0x71> +DW_AT_data_member_location: 3 byte block: 23 88 1 (DW_OP_plus_uconst: 136) +<1><1cf> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x1df> +<2><1d8> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 63 +<1><1df> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x39> +DW_AT_sibling : <0x1ef> +<2><1e8> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 31 +<1><1ef> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x5c> +DW_AT_sibling : <0x1ff> +<2><1f8> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><1ff> +Abbrev Number: 8 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x95): struct_loop_info +DW_AT_decl_file : 4 +DW_AT_decl_line : 32 +DW_AT_type : <0x118> +<1><20a> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x12a): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><218> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x100): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x106> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><226> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1c8): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><234> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xa6): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 35 +DW_AT_type : <0x1ff> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_loop_info.h b/mpers-mx32/struct_loop_info.h new file mode 100644 index 000000000..78d7e664b --- /dev/null +++ b/mpers-mx32/struct_loop_info.h @@ -0,0 +1,18 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t lo_number; +uint32_t lo_device; +uint32_t lo_inode; +uint32_t lo_rdevice; +int32_t lo_offset; +int32_t lo_encrypt_type; +int32_t lo_encrypt_key_size; +int32_t lo_flags; +char lo_name[64]; +unsigned char lo_encrypt_key[32]; +uint32_t lo_init[2]; +char reserved[4]; +} ATTRIBUTE_PACKED mx32_struct_loop_info; +#define MPERS_mx32_struct_loop_info mx32_struct_loop_info diff --git a/mpers-mx32/struct_mmsghdr.c b/mpers-mx32/struct_mmsghdr.c new file mode 100644 index 000000000..73bc16522 --- /dev/null +++ b/mpers-mx32/struct_mmsghdr.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "msghdr.h" +typedef struct mmsghdr struct_mmsghdr; + +struct_mmsghdr mpers_target_var; diff --git a/mpers-mx32/struct_mmsghdr.d1 b/mpers-mx32/struct_mmsghdr.d1 new file mode 100644 index 000000000..5c785e9ad --- /dev/null +++ b/mpers-mx32/struct_mmsghdr.d1 @@ -0,0 +1,267 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x22c (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x3f): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x11e): mpers-mx32/struct_mmsghdr.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x18b): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x225): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1f4): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1da): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xce): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x8a): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x154): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xb7): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x206): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xdc): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1d1): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x16f): char + <1><73>: Abbrev Number: 5 (DW_TAG_typedef) + <74> DW_AT_name : (indirect string, offset: 0x219): __socklen_t + <78> DW_AT_decl_file : 1 + <79> DW_AT_decl_line : 189 + <7a> DW_AT_type : <0x47> + <1><7e>: Abbrev Number: 5 (DW_TAG_typedef) + <7f> DW_AT_name : (indirect string, offset: 0xf): size_t + <83> DW_AT_decl_file : 2 + <84> DW_AT_decl_line : 212 + <85> DW_AT_type : <0x47> + <1><89>: Abbrev Number: 6 (DW_TAG_typedef) + <8a> DW_AT_name : (indirect string, offset: 0x20f): socklen_t + <8e> DW_AT_decl_file : 3 + <8f> DW_AT_decl_line : 274 + <91> DW_AT_type : <0x73> + <1><95>: Abbrev Number: 7 (DW_TAG_pointer_type) + <96> DW_AT_byte_size : 4 + <97> DW_AT_type : <0x9b> + <1><9b>: Abbrev Number: 8 (DW_TAG_const_type) + <9c> DW_AT_type : <0x6c> + <1>: Abbrev Number: 9 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xee): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 4 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xf3> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x112): nargs + DW_AT_decl_file : 4 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xad): sys_flags + DW_AT_decl_file : 4 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 11 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 4 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x231): sys_func + DW_AT_decl_file : 4 + DW_AT_decl_line : 8 +
DW_AT_type : <0xfe> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x9d): sys_name + DW_AT_decl_file : 4 + DW_AT_decl_line : 9 + DW_AT_type : <0x95> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 12 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xfe> + <2>: Abbrev Number: 13 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + <100> DW_AT_type : <0xf3> + <1><104>: Abbrev Number: 5 (DW_TAG_typedef) + <105> DW_AT_name : (indirect string, offset: 0x161): struct_sysent + <109> DW_AT_decl_file : 4 + <10a> DW_AT_decl_line : 10 + <10b> DW_AT_type : <0xa0> + <1><10f>: Abbrev Number: 7 (DW_TAG_pointer_type) + <110> DW_AT_byte_size : 4 + <111> DW_AT_type : <0x115> + <1><115>: Abbrev Number: 8 (DW_TAG_const_type) + <116> DW_AT_type : <0x104> + <1><11a>: Abbrev Number: 2 (DW_TAG_base_type) + <11b> DW_AT_byte_size : 1 + <11c> DW_AT_encoding : 2 (boolean) + <11d> DW_AT_name : (indirect string, offset: 0x27): _Bool + <1><121>: Abbrev Number: 9 (DW_TAG_structure_type) + <122> DW_AT_name : (indirect string, offset: 0x118): iovec + <126> DW_AT_byte_size : 8 + <127> DW_AT_decl_file : 5 + <128> DW_AT_decl_line : 43 + <129> DW_AT_sibling : <0x14a> + <2><12d>: Abbrev Number: 10 (DW_TAG_member) + <12e> DW_AT_name : (indirect string, offset: 0x14b): iov_base + <132> DW_AT_decl_file : 5 + <133> DW_AT_decl_line : 45 + <134> DW_AT_type : <0x6a> + <138> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><13b>: Abbrev Number: 10 (DW_TAG_member) + <13c> DW_AT_name : (indirect string, offset: 0x1f): iov_len + <140> DW_AT_decl_file : 5 + <141> DW_AT_decl_line : 46 + <142> DW_AT_type : <0x7e> + <146> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><149>: Abbrev Number: 0 + <1><14a>: Abbrev Number: 9 (DW_TAG_structure_type) + <14b> DW_AT_name : (indirect string, offset: 0xa6): msghdr + <14f> DW_AT_byte_size : 28 + <150> DW_AT_decl_file : 6 + <151> DW_AT_decl_line : 224 + <152> DW_AT_sibling : <0x1b9> + <2><156>: Abbrev Number: 10 (DW_TAG_member) + <157> DW_AT_name : (indirect string, offset: 0x16): msg_name + <15b> DW_AT_decl_file : 6 + <15c> DW_AT_decl_line : 226 + <15d> DW_AT_type : <0x6a> + <161> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><164>: Abbrev Number: 10 (DW_TAG_member) + <165> DW_AT_name : (indirect string, offset: 0x1e8): msg_namelen + <169> DW_AT_decl_file : 6 + <16a> DW_AT_decl_line : 227 + <16b> DW_AT_type : <0x89> + <16f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><172>: Abbrev Number: 10 (DW_TAG_member) + <173> DW_AT_name : (indirect string, offset: 0x174): msg_iov + <177> DW_AT_decl_file : 6 + <178> DW_AT_decl_line : 229 + <179> DW_AT_type : <0x1b9> + <17d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><180>: Abbrev Number: 10 (DW_TAG_member) + <181> DW_AT_name : (indirect string, offset: 0x1c6): msg_iovlen + <185> DW_AT_decl_file : 6 + <186> DW_AT_decl_line : 230 + <187> DW_AT_type : <0x7e> + <18b> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><18e>: Abbrev Number: 10 (DW_TAG_member) + <18f> DW_AT_name : (indirect string, offset: 0x106): msg_control + <193> DW_AT_decl_file : 6 + <194> DW_AT_decl_line : 232 + <195> DW_AT_type : <0x6a> + <199> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><19c>: Abbrev Number: 10 (DW_TAG_member) + <19d> DW_AT_name : (indirect string, offset: 0x0): msg_controllen + <1a1> DW_AT_decl_file : 6 + <1a2> DW_AT_decl_line : 233 + <1a3> DW_AT_type : <0x7e> + <1a7> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><1aa>: Abbrev Number: 10 (DW_TAG_member) + <1ab> DW_AT_name : (indirect string, offset: 0x35): msg_flags + <1af> DW_AT_decl_file : 6 + <1b0> DW_AT_decl_line : 238 + <1b1> DW_AT_type : <0x2b> + <1b5> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1b8>: Abbrev Number: 0 + <1><1b9>: Abbrev Number: 7 (DW_TAG_pointer_type) + <1ba> DW_AT_byte_size : 4 + <1bb> DW_AT_type : <0x121> + <1><1bf>: Abbrev Number: 9 (DW_TAG_structure_type) + <1c0> DW_AT_name : (indirect string, offset: 0x1fe): mmsghdr + <1c4> DW_AT_byte_size : 32 + <1c5> DW_AT_decl_file : 7 + <1c6> DW_AT_decl_line : 101 + <1c7> DW_AT_sibling : <0x1e8> + <2><1cb>: Abbrev Number: 10 (DW_TAG_member) + <1cc> DW_AT_name : (indirect string, offset: 0x2d): msg_hdr + <1d0> DW_AT_decl_file : 7 + <1d1> DW_AT_decl_line : 103 + <1d2> DW_AT_type : <0x14a> + <1d6> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1d9>: Abbrev Number: 10 (DW_TAG_member) + <1da> DW_AT_name : (indirect string, offset: 0x23a): msg_len + <1de> DW_AT_decl_file : 7 + <1df> DW_AT_decl_line : 104 + <1e0> DW_AT_type : <0x47> + <1e4> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><1e7>: Abbrev Number: 0 + <1><1e8>: Abbrev Number: 5 (DW_TAG_typedef) + <1e9> DW_AT_name : (indirect string, offset: 0x17c): struct_mmsghdr + <1ed> DW_AT_decl_file : 8 + <1ee> DW_AT_decl_line : 32 + <1ef> DW_AT_type : <0x1bf> + <1><1f3>: Abbrev Number: 14 (DW_TAG_variable) + <1f4> DW_AT_name : (indirect string, offset: 0xf5): current_wordsize + <1f8> DW_AT_decl_file : 9 + <1f9> DW_AT_decl_line : 757 + <1fb> DW_AT_type : <0x47> + <1ff> DW_AT_external : 1 + <200> DW_AT_declaration : 1 + <1><201>: Abbrev Number: 14 (DW_TAG_variable) + <202> DW_AT_name : (indirect string, offset: 0xee): sysent + <206> DW_AT_decl_file : 9 + <207> DW_AT_decl_line : 892 + <209> DW_AT_type : <0x10f> + <20d> DW_AT_external : 1 + <20e> DW_AT_declaration : 1 + <1><20f>: Abbrev Number: 14 (DW_TAG_variable) + <210> DW_AT_name : (indirect string, offset: 0x1bc): nsyscalls + <214> DW_AT_decl_file : 9 + <215> DW_AT_decl_line : 903 + <217> DW_AT_type : <0x47> + <21b> DW_AT_external : 1 + <21c> DW_AT_declaration : 1 + <1><21d>: Abbrev Number: 15 (DW_TAG_variable) + <21e> DW_AT_name : (indirect string, offset: 0x13a): mpers_target_var + <222> DW_AT_decl_file : 8 + <223> DW_AT_decl_line : 34 + <224> DW_AT_type : <0x1e8> + <228> DW_AT_external : 1 + <229> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><22f>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_mmsghdr.d2 b/mpers-mx32/struct_mmsghdr.d2 new file mode 100644 index 000000000..d5045a932 --- /dev/null +++ b/mpers-mx32/struct_mmsghdr.d2 @@ -0,0 +1,298 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x225): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1f4): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1da): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xce): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x8a): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x154): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb7): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x206): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xdc): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1d1): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x16f): char +<1><73> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x219): __socklen_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 189 +DW_AT_type : <0x47> +<1><7e> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xf): size_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 212 +DW_AT_type : <0x47> +<1><89> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x20f): socklen_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 274 +DW_AT_type : <0x73> +<1><95> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x9b> +<1><9b> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xee): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 4 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xf3> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x112): nargs +DW_AT_decl_file : 4 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xad): sys_flags +DW_AT_decl_file : 4 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 4 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x231): sys_func +DW_AT_decl_file : 4 +DW_AT_decl_line : 8 +DW_AT_type : <0xfe> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9d): sys_name +DW_AT_decl_file : 4 +DW_AT_decl_line : 9 +DW_AT_type : <0x95> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 12 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xfe> +<2> +Abbrev Number: 13 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1><104> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x161): struct_sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 10 +DW_AT_type : <0xa0> +<1><10f> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x115> +<1><115> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x104> +<1><11a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x27): _Bool +<1><121> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x118): iovec +DW_AT_byte_size : 8 +DW_AT_decl_file : 5 +DW_AT_decl_line : 43 +DW_AT_sibling : <0x14a> +<2><12d> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14b): iov_base +DW_AT_decl_file : 5 +DW_AT_decl_line : 45 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><13b> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f): iov_len +DW_AT_decl_file : 5 +DW_AT_decl_line : 46 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><14a> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xa6): msghdr +DW_AT_byte_size : 28 +DW_AT_decl_file : 6 +DW_AT_decl_line : 224 +DW_AT_sibling : <0x1b9> +<2><156> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16): msg_name +DW_AT_decl_file : 6 +DW_AT_decl_line : 226 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><164> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e8): msg_namelen +DW_AT_decl_file : 6 +DW_AT_decl_line : 227 +DW_AT_type : <0x89> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><172> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x174): msg_iov +DW_AT_decl_file : 6 +DW_AT_decl_line : 229 +DW_AT_type : <0x1b9> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><180> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c6): msg_iovlen +DW_AT_decl_file : 6 +DW_AT_decl_line : 230 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><18e> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x106): msg_control +DW_AT_decl_file : 6 +DW_AT_decl_line : 232 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><19c> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): msg_controllen +DW_AT_decl_file : 6 +DW_AT_decl_line : 233 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><1aa> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x35): msg_flags +DW_AT_decl_file : 6 +DW_AT_decl_line : 238 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<1><1b9> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x121> +<1><1bf> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1fe): mmsghdr +DW_AT_byte_size : 32 +DW_AT_decl_file : 7 +DW_AT_decl_line : 101 +DW_AT_sibling : <0x1e8> +<2><1cb> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d): msg_hdr +DW_AT_decl_file : 7 +DW_AT_decl_line : 103 +DW_AT_type : <0x14a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1d9> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23a): msg_len +DW_AT_decl_file : 7 +DW_AT_decl_line : 104 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<1><1e8> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x17c): struct_mmsghdr +DW_AT_decl_file : 8 +DW_AT_decl_line : 32 +DW_AT_type : <0x1bf> +<1><1f3> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xf5): current_wordsize +DW_AT_decl_file : 9 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><201> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xee): sysent +DW_AT_decl_file : 9 +DW_AT_decl_line : 892 +DW_AT_type : <0x10f> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><20f> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1bc): nsyscalls +DW_AT_decl_file : 9 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><21d> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x13a): mpers_target_var +DW_AT_decl_file : 8 +DW_AT_decl_line : 34 +DW_AT_type : <0x1e8> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_mmsghdr.h b/mpers-mx32/struct_mmsghdr.h new file mode 100644 index 000000000..199586906 --- /dev/null +++ b/mpers-mx32/struct_mmsghdr.h @@ -0,0 +1,16 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +struct { +mpers_ptr_t msg_name; +uint32_t msg_namelen; +mpers_ptr_t msg_iov; +uint32_t msg_iovlen; +mpers_ptr_t msg_control; +uint32_t msg_controllen; +int32_t msg_flags; +} ATTRIBUTE_PACKED msg_hdr; +uint32_t msg_len; +} ATTRIBUTE_PACKED mx32_struct_mmsghdr; +#define MPERS_mx32_struct_mmsghdr mx32_struct_mmsghdr diff --git a/mpers-mx32/struct_msghdr.c b/mpers-mx32/struct_msghdr.c new file mode 100644 index 000000000..0100d7667 --- /dev/null +++ b/mpers-mx32/struct_msghdr.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "msghdr.h" +typedef struct msghdr struct_msghdr; + +struct_msghdr mpers_target_var; diff --git a/mpers-mx32/struct_msghdr.d1 b/mpers-mx32/struct_msghdr.d1 new file mode 100644 index 000000000..8ec48e72d --- /dev/null +++ b/mpers-mx32/struct_msghdr.d1 @@ -0,0 +1,248 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x203 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x37): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x95): mpers-mx32/struct_msghdr.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x181): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x213): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1ea): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1d0): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xe1): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x82): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x159): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xca): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1f4): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xef): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1c7): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x174): char + <1><73>: Abbrev Number: 5 (DW_TAG_typedef) + <74> DW_AT_name : (indirect string, offset: 0x207): __socklen_t + <78> DW_AT_decl_file : 1 + <79> DW_AT_decl_line : 189 + <7a> DW_AT_type : <0x47> + <1><7e>: Abbrev Number: 5 (DW_TAG_typedef) + <7f> DW_AT_name : (indirect string, offset: 0xf): size_t + <83> DW_AT_decl_file : 2 + <84> DW_AT_decl_line : 212 + <85> DW_AT_type : <0x47> + <1><89>: Abbrev Number: 6 (DW_TAG_typedef) + <8a> DW_AT_name : (indirect string, offset: 0x1fd): socklen_t + <8e> DW_AT_decl_file : 3 + <8f> DW_AT_decl_line : 274 + <91> DW_AT_type : <0x73> + <1><95>: Abbrev Number: 7 (DW_TAG_pointer_type) + <96> DW_AT_byte_size : 4 + <97> DW_AT_type : <0x9b> + <1><9b>: Abbrev Number: 8 (DW_TAG_const_type) + <9c> DW_AT_type : <0x6c> + <1>: Abbrev Number: 9 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x101): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 4 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xf3> + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x133): nargs + DW_AT_decl_file : 4 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xc0): sys_flags + DW_AT_decl_file : 4 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 11 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 4 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x21f): sys_func + DW_AT_decl_file : 4 + DW_AT_decl_line : 8 +
DW_AT_type : <0xfe> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 10 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb0): sys_name + DW_AT_decl_file : 4 + DW_AT_decl_line : 9 + DW_AT_type : <0x95> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 12 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xfe> + <2>: Abbrev Number: 13 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + <100> DW_AT_type : <0xf3> + <1><104>: Abbrev Number: 5 (DW_TAG_typedef) + <105> DW_AT_name : (indirect string, offset: 0x166): struct_sysent + <109> DW_AT_decl_file : 4 + <10a> DW_AT_decl_line : 10 + <10b> DW_AT_type : <0xa0> + <1><10f>: Abbrev Number: 7 (DW_TAG_pointer_type) + <110> DW_AT_byte_size : 4 + <111> DW_AT_type : <0x115> + <1><115>: Abbrev Number: 8 (DW_TAG_const_type) + <116> DW_AT_type : <0x104> + <1><11a>: Abbrev Number: 2 (DW_TAG_base_type) + <11b> DW_AT_byte_size : 1 + <11c> DW_AT_encoding : 2 (boolean) + <11d> DW_AT_name : (indirect string, offset: 0x1f): _Bool + <1><121>: Abbrev Number: 9 (DW_TAG_structure_type) + <122> DW_AT_name : (indirect string, offset: 0x139): iovec + <126> DW_AT_byte_size : 8 + <127> DW_AT_decl_file : 5 + <128> DW_AT_decl_line : 43 + <129> DW_AT_sibling : <0x14a> + <2><12d>: Abbrev Number: 10 (DW_TAG_member) + <12e> DW_AT_name : (indirect string, offset: 0x150): iov_base + <132> DW_AT_decl_file : 5 + <133> DW_AT_decl_line : 45 + <134> DW_AT_type : <0x6a> + <138> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><13b>: Abbrev Number: 10 (DW_TAG_member) + <13c> DW_AT_name : (indirect string, offset: 0x25): iov_len + <140> DW_AT_decl_file : 5 + <141> DW_AT_decl_line : 46 + <142> DW_AT_type : <0x7e> + <146> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><149>: Abbrev Number: 0 + <1><14a>: Abbrev Number: 9 (DW_TAG_structure_type) + <14b> DW_AT_name : (indirect string, offset: 0xb9): msghdr + <14f> DW_AT_byte_size : 28 + <150> DW_AT_decl_file : 6 + <151> DW_AT_decl_line : 224 + <152> DW_AT_sibling : <0x1b9> + <2><156>: Abbrev Number: 10 (DW_TAG_member) + <157> DW_AT_name : (indirect string, offset: 0x16): msg_name + <15b> DW_AT_decl_file : 6 + <15c> DW_AT_decl_line : 226 + <15d> DW_AT_type : <0x6a> + <161> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><164>: Abbrev Number: 10 (DW_TAG_member) + <165> DW_AT_name : (indirect string, offset: 0x1de): msg_namelen + <169> DW_AT_decl_file : 6 + <16a> DW_AT_decl_line : 227 + <16b> DW_AT_type : <0x89> + <16f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><172>: Abbrev Number: 10 (DW_TAG_member) + <173> DW_AT_name : (indirect string, offset: 0x179): msg_iov + <177> DW_AT_decl_file : 6 + <178> DW_AT_decl_line : 229 + <179> DW_AT_type : <0x1b9> + <17d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><180>: Abbrev Number: 10 (DW_TAG_member) + <181> DW_AT_name : (indirect string, offset: 0x1bc): msg_iovlen + <185> DW_AT_decl_file : 6 + <186> DW_AT_decl_line : 230 + <187> DW_AT_type : <0x7e> + <18b> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><18e>: Abbrev Number: 10 (DW_TAG_member) + <18f> DW_AT_name : (indirect string, offset: 0x119): msg_control + <193> DW_AT_decl_file : 6 + <194> DW_AT_decl_line : 232 + <195> DW_AT_type : <0x6a> + <199> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><19c>: Abbrev Number: 10 (DW_TAG_member) + <19d> DW_AT_name : (indirect string, offset: 0x0): msg_controllen + <1a1> DW_AT_decl_file : 6 + <1a2> DW_AT_decl_line : 233 + <1a3> DW_AT_type : <0x7e> + <1a7> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><1aa>: Abbrev Number: 10 (DW_TAG_member) + <1ab> DW_AT_name : (indirect string, offset: 0x2d): msg_flags + <1af> DW_AT_decl_file : 6 + <1b0> DW_AT_decl_line : 238 + <1b1> DW_AT_type : <0x2b> + <1b5> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1b8>: Abbrev Number: 0 + <1><1b9>: Abbrev Number: 7 (DW_TAG_pointer_type) + <1ba> DW_AT_byte_size : 4 + <1bb> DW_AT_type : <0x121> + <1><1bf>: Abbrev Number: 5 (DW_TAG_typedef) + <1c0> DW_AT_name : (indirect string, offset: 0x125): struct_msghdr + <1c4> DW_AT_decl_file : 7 + <1c5> DW_AT_decl_line : 32 + <1c6> DW_AT_type : <0x14a> + <1><1ca>: Abbrev Number: 14 (DW_TAG_variable) + <1cb> DW_AT_name : (indirect string, offset: 0x108): current_wordsize + <1cf> DW_AT_decl_file : 8 + <1d0> DW_AT_decl_line : 757 + <1d2> DW_AT_type : <0x47> + <1d6> DW_AT_external : 1 + <1d7> DW_AT_declaration : 1 + <1><1d8>: Abbrev Number: 14 (DW_TAG_variable) + <1d9> DW_AT_name : (indirect string, offset: 0x101): sysent + <1dd> DW_AT_decl_file : 8 + <1de> DW_AT_decl_line : 892 + <1e0> DW_AT_type : <0x10f> + <1e4> DW_AT_external : 1 + <1e5> DW_AT_declaration : 1 + <1><1e6>: Abbrev Number: 14 (DW_TAG_variable) + <1e7> DW_AT_name : (indirect string, offset: 0x1b2): nsyscalls + <1eb> DW_AT_decl_file : 8 + <1ec> DW_AT_decl_line : 903 + <1ee> DW_AT_type : <0x47> + <1f2> DW_AT_external : 1 + <1f3> DW_AT_declaration : 1 + <1><1f4>: Abbrev Number: 15 (DW_TAG_variable) + <1f5> DW_AT_name : (indirect string, offset: 0x13f): mpers_target_var + <1f9> DW_AT_decl_file : 7 + <1fa> DW_AT_decl_line : 34 + <1fb> DW_AT_type : <0x1bf> + <1ff> DW_AT_external : 1 + <200> DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) + <1><206>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_msghdr.d2 b/mpers-mx32/struct_msghdr.d2 new file mode 100644 index 000000000..eed616833 --- /dev/null +++ b/mpers-mx32/struct_msghdr.d2 @@ -0,0 +1,277 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x213): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1ea): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1d0): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xe1): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x82): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x159): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xca): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1f4): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xef): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c7): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x174): char +<1><73> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x207): __socklen_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 189 +DW_AT_type : <0x47> +<1><7e> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xf): size_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 212 +DW_AT_type : <0x47> +<1><89> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1fd): socklen_t +DW_AT_decl_file : 3 +DW_AT_decl_line : 274 +DW_AT_type : <0x73> +<1><95> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x9b> +<1><9b> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x101): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 4 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xf3> +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x133): nargs +DW_AT_decl_file : 4 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc0): sys_flags +DW_AT_decl_file : 4 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 11 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 4 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21f): sys_func +DW_AT_decl_file : 4 +DW_AT_decl_line : 8 +DW_AT_type : <0xfe> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb0): sys_name +DW_AT_decl_file : 4 +DW_AT_decl_line : 9 +DW_AT_type : <0x95> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 12 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xfe> +<2> +Abbrev Number: 13 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1><104> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x166): struct_sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 10 +DW_AT_type : <0xa0> +<1><10f> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x115> +<1><115> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x104> +<1><11a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x1f): _Bool +<1><121> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x139): iovec +DW_AT_byte_size : 8 +DW_AT_decl_file : 5 +DW_AT_decl_line : 43 +DW_AT_sibling : <0x14a> +<2><12d> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x150): iov_base +DW_AT_decl_file : 5 +DW_AT_decl_line : 45 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><13b> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x25): iov_len +DW_AT_decl_file : 5 +DW_AT_decl_line : 46 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><14a> +Abbrev Number: 9 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xb9): msghdr +DW_AT_byte_size : 28 +DW_AT_decl_file : 6 +DW_AT_decl_line : 224 +DW_AT_sibling : <0x1b9> +<2><156> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16): msg_name +DW_AT_decl_file : 6 +DW_AT_decl_line : 226 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><164> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1de): msg_namelen +DW_AT_decl_file : 6 +DW_AT_decl_line : 227 +DW_AT_type : <0x89> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><172> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x179): msg_iov +DW_AT_decl_file : 6 +DW_AT_decl_line : 229 +DW_AT_type : <0x1b9> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><180> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1bc): msg_iovlen +DW_AT_decl_file : 6 +DW_AT_decl_line : 230 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><18e> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x119): msg_control +DW_AT_decl_file : 6 +DW_AT_decl_line : 232 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><19c> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): msg_controllen +DW_AT_decl_file : 6 +DW_AT_decl_line : 233 +DW_AT_type : <0x7e> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><1aa> +Abbrev Number: 10 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d): msg_flags +DW_AT_decl_file : 6 +DW_AT_decl_line : 238 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<1><1b9> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x121> +<1><1bf> +Abbrev Number: 5 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x125): struct_msghdr +DW_AT_decl_file : 7 +DW_AT_decl_line : 32 +DW_AT_type : <0x14a> +<1><1ca> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x108): current_wordsize +DW_AT_decl_file : 8 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1d8> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x101): sysent +DW_AT_decl_file : 8 +DW_AT_decl_line : 892 +DW_AT_type : <0x10f> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1e6> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1b2): nsyscalls +DW_AT_decl_file : 8 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1f4> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x13f): mpers_target_var +DW_AT_decl_file : 7 +DW_AT_decl_line : 34 +DW_AT_type : <0x1bf> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) diff --git a/mpers-mx32/struct_msghdr.h b/mpers-mx32/struct_msghdr.h new file mode 100644 index 000000000..d7a5330bf --- /dev/null +++ b/mpers-mx32/struct_msghdr.h @@ -0,0 +1,13 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +mpers_ptr_t msg_name; +uint32_t msg_namelen; +mpers_ptr_t msg_iov; +uint32_t msg_iovlen; +mpers_ptr_t msg_control; +uint32_t msg_controllen; +int32_t msg_flags; +} ATTRIBUTE_PACKED mx32_struct_msghdr; +#define MPERS_mx32_struct_msghdr mx32_struct_msghdr diff --git a/mpers-mx32/struct_mtd_oob_buf.c b/mpers-mx32/struct_mtd_oob_buf.c new file mode 100644 index 000000000..f781ae5a4 --- /dev/null +++ b/mpers-mx32/struct_mtd_oob_buf.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2012 Mike Frysinger + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include + +/* The mtd api changes quickly, so we have to keep a local copy */ +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) +# include "mtd-abi.h" +#else +# include +#endif + +typedef struct mtd_oob_buf struct_mtd_oob_buf; + +struct_mtd_oob_buf mpers_target_var; diff --git a/mpers-mx32/struct_mtd_oob_buf.d1 b/mpers-mx32/struct_mtd_oob_buf.d1 new file mode 100644 index 000000000..cd327b9d2 --- /dev/null +++ b/mpers-mx32/struct_mtd_oob_buf.d1 @@ -0,0 +1,193 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x189 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x12): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x116): mpers-mx32/struct_mtd_oob_buf.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x136): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1ad): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x194): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x17a): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xad): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x5d): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0xf6): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x96): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1a4): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xbb): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x171): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x111): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xcd): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x19e): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x8c): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1b9): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x70): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x103): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x0): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x6): __u32 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 26 + <104> DW_AT_type : <0x47> + <1><108>: Abbrev Number: 6 (DW_TAG_structure_type) + <109> DW_AT_name : (indirect string, offset: 0x188): mtd_oob_buf + <10d> DW_AT_byte_size : 12 + <10e> DW_AT_decl_file : 3 + <10f> DW_AT_decl_line : 35 + <110> DW_AT_sibling : <0x13f> + <2><114>: Abbrev Number: 7 (DW_TAG_member) + <115> DW_AT_name : (indirect string, offset: 0xc): start + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 36 + <11b> DW_AT_type : <0xfd> + <11f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><122>: Abbrev Number: 7 (DW_TAG_member) + <123> DW_AT_name : (indirect string, offset: 0x1c2): length + <127> DW_AT_decl_file : 3 + <128> DW_AT_decl_line : 37 + <129> DW_AT_type : <0xfd> + <12d> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><130>: Abbrev Number: 8 (DW_TAG_member) + <131> DW_AT_name : ptr + <135> DW_AT_decl_file : 3 + <136> DW_AT_decl_line : 38 + <137> DW_AT_type : <0x13f> + <13b> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><13e>: Abbrev Number: 0 + <1><13f>: Abbrev Number: 4 (DW_TAG_pointer_type) + <140> DW_AT_byte_size : 4 + <141> DW_AT_type : <0x39> + <1><145>: Abbrev Number: 11 (DW_TAG_typedef) + <146> DW_AT_name : (indirect string, offset: 0x79): struct_mtd_oob_buf + <14a> DW_AT_decl_file : 4 + <14b> DW_AT_decl_line : 40 + <14c> DW_AT_type : <0x108> + <1><150>: Abbrev Number: 12 (DW_TAG_variable) + <151> DW_AT_name : (indirect string, offset: 0xd4): current_wordsize + <155> DW_AT_decl_file : 5 + <156> DW_AT_decl_line : 757 + <158> DW_AT_type : <0x47> + <15c> DW_AT_external : 1 + <15d> DW_AT_declaration : 1 + <1><15e>: Abbrev Number: 12 (DW_TAG_variable) + <15f> DW_AT_name : (indirect string, offset: 0xcd): sysent + <163> DW_AT_decl_file : 5 + <164> DW_AT_decl_line : 892 + <166> DW_AT_type : <0xeb> + <16a> DW_AT_external : 1 + <16b> DW_AT_declaration : 1 + <1><16c>: Abbrev Number: 12 (DW_TAG_variable) + <16d> DW_AT_name : (indirect string, offset: 0x167): nsyscalls + <171> DW_AT_decl_file : 5 + <172> DW_AT_decl_line : 903 + <174> DW_AT_type : <0x47> + <178> DW_AT_external : 1 + <179> DW_AT_declaration : 1 + <1><17a>: Abbrev Number: 13 (DW_TAG_variable) + <17b> DW_AT_name : (indirect string, offset: 0xe5): mpers_target_var + <17f> DW_AT_decl_file : 4 + <180> DW_AT_decl_line : 42 + <181> DW_AT_type : <0x145> + <185> DW_AT_external : 1 + <186> DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) + <1><18c>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_mtd_oob_buf.d2 b/mpers-mx32/struct_mtd_oob_buf.d2 new file mode 100644 index 000000000..733de15f8 --- /dev/null +++ b/mpers-mx32/struct_mtd_oob_buf.d2 @@ -0,0 +1,213 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1ad): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x194): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x17a): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xad): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x5d): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xf6): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x96): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a4): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xbb): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x171): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x111): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xcd): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x19e): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8c): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b9): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x70): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x103): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x0): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x6): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><108> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x188): mtd_oob_buf +DW_AT_byte_size : 12 +DW_AT_decl_file : 3 +DW_AT_decl_line : 35 +DW_AT_sibling : <0x13f> +<2><114> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc): start +DW_AT_decl_file : 3 +DW_AT_decl_line : 36 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><122> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c2): length +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><130> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : ptr +DW_AT_decl_file : 3 +DW_AT_decl_line : 38 +DW_AT_type : <0x13f> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><13f> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x39> +<1><145> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x79): struct_mtd_oob_buf +DW_AT_decl_file : 4 +DW_AT_decl_line : 40 +DW_AT_type : <0x108> +<1><150> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xd4): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><15e> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xcd): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><16c> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x167): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><17a> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe5): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_type : <0x145> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 4 0 0 0 (DW_OP_addr: 4) diff --git a/mpers-mx32/struct_mtd_oob_buf.h b/mpers-mx32/struct_mtd_oob_buf.h new file mode 100644 index 000000000..45ee6e915 --- /dev/null +++ b/mpers-mx32/struct_mtd_oob_buf.h @@ -0,0 +1,9 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t start; +uint32_t length; +mpers_ptr_t ptr; +} ATTRIBUTE_PACKED mx32_struct_mtd_oob_buf; +#define MPERS_mx32_struct_mtd_oob_buf mx32_struct_mtd_oob_buf diff --git a/mpers-mx32/struct_rtc_pll_info.c b/mpers-mx32/struct_rtc_pll_info.c new file mode 100644 index 000000000..1ae0b09f8 --- /dev/null +++ b/mpers-mx32/struct_rtc_pll_info.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2004 Ulrich Drepper + * Copyright (c) 2004-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include + +typedef struct rtc_pll_info struct_rtc_pll_info; + +struct_rtc_pll_info mpers_target_var; diff --git a/mpers-mx32/struct_rtc_pll_info.d1 b/mpers-mx32/struct_rtc_pll_info.d1 new file mode 100644 index 000000000..033071ff4 --- /dev/null +++ b/mpers-mx32/struct_rtc_pll_info.d1 @@ -0,0 +1,209 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1b0 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x26): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x127): mpers-mx32/struct_rtc_pll_info.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x165): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1e9): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1bf): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1b1): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xc7): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x71): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x84): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xb0): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1d6): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xd5): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1a0): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x156): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xe7): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0xff): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0xa6): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1f5): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x9d): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x148): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x20): _Bool + <1>: Abbrev Number: 6 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x1c9): rtc_pll_info + <102> DW_AT_byte_size : 28 + <103> DW_AT_decl_file : 2 + <104> DW_AT_decl_line : 55 + <105> DW_AT_sibling : <0x16c> + <2><109>: Abbrev Number: 7 (DW_TAG_member) + <10a> DW_AT_name : (indirect string, offset: 0x105): pll_ctrl + <10e> DW_AT_decl_file : 2 + <10f> DW_AT_decl_line : 56 + <110> DW_AT_type : <0x2b> + <114> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><117>: Abbrev Number: 7 (DW_TAG_member) + <118> DW_AT_name : (indirect string, offset: 0x15b): pll_value + <11c> DW_AT_decl_file : 2 + <11d> DW_AT_decl_line : 57 + <11e> DW_AT_type : <0x2b> + <122> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><125>: Abbrev Number: 7 (DW_TAG_member) + <126> DW_AT_name : (indirect string, offset: 0x11f): pll_max + <12a> DW_AT_decl_file : 2 + <12b> DW_AT_decl_line : 58 + <12c> DW_AT_type : <0x2b> + <130> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><133>: Abbrev Number: 7 (DW_TAG_member) + <134> DW_AT_name : (indirect string, offset: 0x1a9): pll_min + <138> DW_AT_decl_file : 2 + <139> DW_AT_decl_line : 59 + <13a> DW_AT_type : <0x2b> + <13e> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><141>: Abbrev Number: 7 (DW_TAG_member) + <142> DW_AT_name : (indirect string, offset: 0x91): pll_posmult + <146> DW_AT_decl_file : 2 + <147> DW_AT_decl_line : 60 + <148> DW_AT_type : <0x2b> + <14c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><14f>: Abbrev Number: 7 (DW_TAG_member) + <150> DW_AT_name : (indirect string, offset: 0x0): pll_negmult + <154> DW_AT_decl_file : 2 + <155> DW_AT_decl_line : 61 + <156> DW_AT_type : <0x2b> + <15a> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><15d>: Abbrev Number: 7 (DW_TAG_member) + <15e> DW_AT_name : (indirect string, offset: 0x1df): pll_clock + <162> DW_AT_decl_file : 2 + <163> DW_AT_decl_line : 62 + <164> DW_AT_type : <0x55> + <168> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><16b>: Abbrev Number: 0 + <1><16c>: Abbrev Number: 11 (DW_TAG_typedef) + <16d> DW_AT_name : (indirect string, offset: 0xc): struct_rtc_pll_info + <171> DW_AT_decl_file : 3 + <172> DW_AT_decl_line : 35 + <173> DW_AT_type : <0xfd> + <1><177>: Abbrev Number: 12 (DW_TAG_variable) + <178> DW_AT_name : (indirect string, offset: 0xee): current_wordsize + <17c> DW_AT_decl_file : 4 + <17d> DW_AT_decl_line : 757 + <17f> DW_AT_type : <0x47> + <183> DW_AT_external : 1 + <184> DW_AT_declaration : 1 + <1><185>: Abbrev Number: 12 (DW_TAG_variable) + <186> DW_AT_name : (indirect string, offset: 0xe7): sysent + <18a> DW_AT_decl_file : 4 + <18b> DW_AT_decl_line : 892 + <18d> DW_AT_type : <0xeb> + <191> DW_AT_external : 1 + <192> DW_AT_declaration : 1 + <1><193>: Abbrev Number: 12 (DW_TAG_variable) + <194> DW_AT_name : (indirect string, offset: 0x196): nsyscalls + <198> DW_AT_decl_file : 4 + <199> DW_AT_decl_line : 903 + <19b> DW_AT_type : <0x47> + <19f> DW_AT_external : 1 + <1a0> DW_AT_declaration : 1 + <1><1a1>: Abbrev Number: 13 (DW_TAG_variable) + <1a2> DW_AT_name : (indirect string, offset: 0x10e): mpers_target_var + <1a6> DW_AT_decl_file : 3 + <1a7> DW_AT_decl_line : 37 + <1a8> DW_AT_type : <0x16c> + <1ac> DW_AT_external : 1 + <1ad> DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) + <1><1b3>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_rtc_pll_info.d2 b/mpers-mx32/struct_rtc_pll_info.d2 new file mode 100644 index 000000000..64c048bc6 --- /dev/null +++ b/mpers-mx32/struct_rtc_pll_info.d2 @@ -0,0 +1,231 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1e9): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1bf): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1b1): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xc7): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x71): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x84): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb0): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1d6): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xd5): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1a0): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x156): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xe7): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xff): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa6): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f5): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9d): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x148): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x20): _Bool +<1> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1c9): rtc_pll_info +DW_AT_byte_size : 28 +DW_AT_decl_file : 2 +DW_AT_decl_line : 55 +DW_AT_sibling : <0x16c> +<2><109> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x105): pll_ctrl +DW_AT_decl_file : 2 +DW_AT_decl_line : 56 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><117> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15b): pll_value +DW_AT_decl_file : 2 +DW_AT_decl_line : 57 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><125> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11f): pll_max +DW_AT_decl_file : 2 +DW_AT_decl_line : 58 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><133> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a9): pll_min +DW_AT_decl_file : 2 +DW_AT_decl_line : 59 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><141> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x91): pll_posmult +DW_AT_decl_file : 2 +DW_AT_decl_line : 60 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><14f> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): pll_negmult +DW_AT_decl_file : 2 +DW_AT_decl_line : 61 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><15d> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1df): pll_clock +DW_AT_decl_file : 2 +DW_AT_decl_line : 62 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<1><16c> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xc): struct_rtc_pll_info +DW_AT_decl_file : 3 +DW_AT_decl_line : 35 +DW_AT_type : <0xfd> +<1><177> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xee): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><185> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe7): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><193> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x196): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1a1> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x10e): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_type : <0x16c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) diff --git a/mpers-mx32/struct_rtc_pll_info.h b/mpers-mx32/struct_rtc_pll_info.h new file mode 100644 index 000000000..5e27645e4 --- /dev/null +++ b/mpers-mx32/struct_rtc_pll_info.h @@ -0,0 +1,13 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t pll_ctrl; +int32_t pll_value; +int32_t pll_max; +int32_t pll_min; +int32_t pll_posmult; +int32_t pll_negmult; +int32_t pll_clock; +} ATTRIBUTE_PACKED mx32_struct_rtc_pll_info; +#define MPERS_mx32_struct_rtc_pll_info mx32_struct_rtc_pll_info diff --git a/mpers-mx32/struct_sg_io_hdr.c b/mpers-mx32/struct_sg_io_hdr.c new file mode 100644 index 000000000..385818277 --- /dev/null +++ b/mpers-mx32/struct_sg_io_hdr.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2007 Vladimir Nadvornik + * Copyright (c) 2007-2017 Dmitry V. Levin + * Copyright (c) 2015 Bart Van Assche + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_SCSI_SG_H + + +# include + +typedef struct sg_io_hdr struct_sg_io_hdr; + +#endif /* HAVE_SCSI_SG_H */ + +struct_sg_io_hdr mpers_target_var; diff --git a/mpers-mx32/struct_sg_io_hdr.d1 b/mpers-mx32/struct_sg_io_hdr.d1 new file mode 100644 index 000000000..d7283b11e --- /dev/null +++ b/mpers-mx32/struct_sg_io_hdr.d1 @@ -0,0 +1,304 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x28a (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x1d): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xcc): mpers-mx32/struct_sg_io_hdr.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x185): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0xa8): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x20f): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1dd): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xb4): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x68): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x15f): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x260): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x236): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xf6): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1ca): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x180): char + <1><73>: Abbrev Number: 5 (DW_TAG_pointer_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_type : <0x79> + <1><79>: Abbrev Number: 6 (DW_TAG_const_type) + <7a> DW_AT_type : <0x6c> + <1><7e>: Abbrev Number: 7 (DW_TAG_structure_type) + <7f> DW_AT_name : (indirect string, offset: 0x108): sysent + <83> DW_AT_byte_size : 20 + <84> DW_AT_decl_file : 1 + <85> DW_AT_decl_line : 4 + <86> DW_AT_sibling : <0xd1> + <2><8a>: Abbrev Number: 8 (DW_TAG_member) + <8b> DW_AT_name : (indirect string, offset: 0x219): nargs + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 5 + <91> DW_AT_type : <0x47> + <95> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><98>: Abbrev Number: 8 (DW_TAG_member) + <99> DW_AT_name : (indirect string, offset: 0x9e): sys_flags + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 6 + <9f> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x257): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xdc> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x87): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x73> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xdc> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) +
DW_AT_byte_size : 4 + DW_AT_type : <0xd1> + <1>: Abbrev Number: 12 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x172): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7e> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf3> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xe2> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x6): _Bool + <1>: Abbrev Number: 7 (DW_TAG_structure_type) + <100> DW_AT_name : (indirect string, offset: 0xc2): sg_io_hdr + <104> DW_AT_byte_size : 64 + <105> DW_AT_decl_file : 2 + <106> DW_AT_decl_line : 44 + <107> DW_AT_sibling : <0x240> + <2><10b>: Abbrev Number: 8 (DW_TAG_member) + <10c> DW_AT_name : (indirect string, offset: 0x1eb): interface_id + <110> DW_AT_decl_file : 2 + <111> DW_AT_decl_line : 46 + <112> DW_AT_type : <0x2b> + <116> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><119>: Abbrev Number: 8 (DW_TAG_member) + <11a> DW_AT_name : (indirect string, offset: 0x10f): dxfer_direction + <11e> DW_AT_decl_file : 2 + <11f> DW_AT_decl_line : 47 + <120> DW_AT_type : <0x2b> + <124> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><127>: Abbrev Number: 8 (DW_TAG_member) + <128> DW_AT_name : (indirect string, offset: 0x157): cmd_len + <12c> DW_AT_decl_file : 2 + <12d> DW_AT_decl_line : 48 + <12e> DW_AT_type : <0x39> + <132> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><135>: Abbrev Number: 8 (DW_TAG_member) + <136> DW_AT_name : (indirect string, offset: 0x1c0): mx_sb_len + <13a> DW_AT_decl_file : 2 + <13b> DW_AT_decl_line : 49 + <13c> DW_AT_type : <0x39> + <140> DW_AT_data_member_location: 2 byte block: 23 9 (DW_OP_plus_uconst: 9) + <2><143>: Abbrev Number: 8 (DW_TAG_member) + <144> DW_AT_name : (indirect string, offset: 0xea): iovec_count + <148> DW_AT_decl_file : 2 + <149> DW_AT_decl_line : 50 + <14a> DW_AT_type : <0x40> + <14e> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><151>: Abbrev Number: 8 (DW_TAG_member) + <152> DW_AT_name : (indirect string, offset: 0x1d3): dxfer_len + <156> DW_AT_decl_file : 2 + <157> DW_AT_decl_line : 51 + <158> DW_AT_type : <0x47> + <15c> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><15f>: Abbrev Number: 8 (DW_TAG_member) + <160> DW_AT_name : (indirect string, offset: 0x208): dxferp + <164> DW_AT_decl_file : 2 + <165> DW_AT_decl_line : 52 + <166> DW_AT_type : <0x6a> + <16a> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><16d>: Abbrev Number: 8 (DW_TAG_member) + <16e> DW_AT_name : (indirect string, offset: 0x7b): cmdp + <172> DW_AT_decl_file : 2 + <173> DW_AT_decl_line : 54 + <174> DW_AT_type : <0x240> + <178> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><17b>: Abbrev Number: 9 (DW_TAG_member) + <17c> DW_AT_name : sbp + <180> DW_AT_decl_file : 2 + <181> DW_AT_decl_line : 55 + <182> DW_AT_type : <0x240> + <186> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><189>: Abbrev Number: 8 (DW_TAG_member) + <18a> DW_AT_name : (indirect string, offset: 0xc): timeout + <18e> DW_AT_decl_file : 2 + <18f> DW_AT_decl_line : 56 + <190> DW_AT_type : <0x47> + <194> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><197>: Abbrev Number: 8 (DW_TAG_member) + <198> DW_AT_name : (indirect string, offset: 0x16c): flags + <19c> DW_AT_decl_file : 2 + <19d> DW_AT_decl_line : 57 + <19e> DW_AT_type : <0x47> + <1a2> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1a5>: Abbrev Number: 8 (DW_TAG_member) + <1a6> DW_AT_name : (indirect string, offset: 0x1f8): pack_id + <1aa> DW_AT_decl_file : 2 + <1ab> DW_AT_decl_line : 58 + <1ac> DW_AT_type : <0x2b> + <1b0> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><1b3>: Abbrev Number: 8 (DW_TAG_member) + <1b4> DW_AT_name : (indirect string, offset: 0x200): usr_ptr + <1b8> DW_AT_decl_file : 2 + <1b9> DW_AT_decl_line : 59 + <1ba> DW_AT_type : <0x6a> + <1be> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1c1>: Abbrev Number: 8 (DW_TAG_member) + <1c2> DW_AT_name : (indirect string, offset: 0x80): status + <1c6> DW_AT_decl_file : 2 + <1c7> DW_AT_decl_line : 60 + <1c8> DW_AT_type : <0x39> + <1cc> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><1cf>: Abbrev Number: 8 (DW_TAG_member) + <1d0> DW_AT_name : (indirect string, offset: 0x249): masked_status + <1d4> DW_AT_decl_file : 2 + <1d5> DW_AT_decl_line : 61 + <1d6> DW_AT_type : <0x39> + <1da> DW_AT_data_member_location: 2 byte block: 23 2d (DW_OP_plus_uconst: 45) + <2><1dd>: Abbrev Number: 8 (DW_TAG_member) + <1de> DW_AT_name : (indirect string, offset: 0x22b): msg_status + <1e2> DW_AT_decl_file : 2 + <1e3> DW_AT_decl_line : 62 + <1e4> DW_AT_type : <0x39> + <1e8> DW_AT_data_member_location: 2 byte block: 23 2e (DW_OP_plus_uconst: 46) + <2><1eb>: Abbrev Number: 8 (DW_TAG_member) + <1ec> DW_AT_name : (indirect string, offset: 0x23f): sb_len_wr + <1f0> DW_AT_decl_file : 2 + <1f1> DW_AT_decl_line : 63 + <1f2> DW_AT_type : <0x39> + <1f6> DW_AT_data_member_location: 2 byte block: 23 2f (DW_OP_plus_uconst: 47) + <2><1f9>: Abbrev Number: 8 (DW_TAG_member) + <1fa> DW_AT_name : (indirect string, offset: 0x21f): host_status + <1fe> DW_AT_decl_file : 2 + <1ff> DW_AT_decl_line : 64 + <200> DW_AT_type : <0x40> + <204> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><207>: Abbrev Number: 8 (DW_TAG_member) + <208> DW_AT_name : (indirect string, offset: 0x90): driver_status + <20c> DW_AT_decl_file : 2 + <20d> DW_AT_decl_line : 65 + <20e> DW_AT_type : <0x40> + <212> DW_AT_data_member_location: 2 byte block: 23 32 (DW_OP_plus_uconst: 50) + <2><215>: Abbrev Number: 8 (DW_TAG_member) + <216> DW_AT_name : (indirect string, offset: 0x0): resid + <21a> DW_AT_decl_file : 2 + <21b> DW_AT_decl_line : 66 + <21c> DW_AT_type : <0x2b> + <220> DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2><223>: Abbrev Number: 8 (DW_TAG_member) + <224> DW_AT_name : (indirect string, offset: 0x14): duration + <228> DW_AT_decl_file : 2 + <229> DW_AT_decl_line : 67 + <22a> DW_AT_type : <0x47> + <22e> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><231>: Abbrev Number: 8 (DW_TAG_member) + <232> DW_AT_name : (indirect string, offset: 0x130): info + <236> DW_AT_decl_file : 2 + <237> DW_AT_decl_line : 68 + <238> DW_AT_type : <0x47> + <23c> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><23f>: Abbrev Number: 0 + <1><240>: Abbrev Number: 5 (DW_TAG_pointer_type) + <241> DW_AT_byte_size : 4 + <242> DW_AT_type : <0x39> + <1><246>: Abbrev Number: 12 (DW_TAG_typedef) + <247> DW_AT_name : (indirect string, offset: 0x146): struct_sg_io_hdr + <24b> DW_AT_decl_file : 3 + <24c> DW_AT_decl_line : 37 + <24d> DW_AT_type : <0xff> + <1><251>: Abbrev Number: 13 (DW_TAG_variable) + <252> DW_AT_name : (indirect string, offset: 0x11f): current_wordsize + <256> DW_AT_decl_file : 4 + <257> DW_AT_decl_line : 757 + <259> DW_AT_type : <0x47> + <25d> DW_AT_external : 1 + <25e> DW_AT_declaration : 1 + <1><25f>: Abbrev Number: 13 (DW_TAG_variable) + <260> DW_AT_name : (indirect string, offset: 0x108): sysent + <264> DW_AT_decl_file : 4 + <265> DW_AT_decl_line : 892 + <267> DW_AT_type : <0xed> + <26b> DW_AT_external : 1 + <26c> DW_AT_declaration : 1 + <1><26d>: Abbrev Number: 13 (DW_TAG_variable) + <26e> DW_AT_name : (indirect string, offset: 0x1b6): nsyscalls + <272> DW_AT_decl_file : 4 + <273> DW_AT_decl_line : 903 + <275> DW_AT_type : <0x47> + <279> DW_AT_external : 1 + <27a> DW_AT_declaration : 1 + <1><27b>: Abbrev Number: 14 (DW_TAG_variable) + <27c> DW_AT_name : (indirect string, offset: 0x135): mpers_target_var + <280> DW_AT_decl_file : 3 + <281> DW_AT_decl_line : 41 + <282> DW_AT_type : <0x246> + <286> DW_AT_external : 1 + <287> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><28d>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_sg_io_hdr.d2 b/mpers-mx32/struct_sg_io_hdr.d2 new file mode 100644 index 000000000..b0dc22a5f --- /dev/null +++ b/mpers-mx32/struct_sg_io_hdr.d2 @@ -0,0 +1,343 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0xa8): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x20f): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1dd): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xb4): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x68): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x15f): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x260): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x236): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xf6): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1ca): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x180): char +<1><73> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x79> +<1><79> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><7e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x108): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd1> +<2><8a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x219): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><98> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9e): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x257): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xdc> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x87): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xdc> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd1> +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x172): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7e> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xe2> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x6): _Bool +<1> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc2): sg_io_hdr +DW_AT_byte_size : 64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 44 +DW_AT_sibling : <0x240> +<2><10b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1eb): interface_id +DW_AT_decl_file : 2 +DW_AT_decl_line : 46 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><119> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10f): dxfer_direction +DW_AT_decl_file : 2 +DW_AT_decl_line : 47 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><127> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x157): cmd_len +DW_AT_decl_file : 2 +DW_AT_decl_line : 48 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><135> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c0): mx_sb_len +DW_AT_decl_file : 2 +DW_AT_decl_line : 49 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 9 (DW_OP_plus_uconst: 9) +<2><143> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xea): iovec_count +DW_AT_decl_file : 2 +DW_AT_decl_line : 50 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><151> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d3): dxfer_len +DW_AT_decl_file : 2 +DW_AT_decl_line : 51 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><15f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x208): dxferp +DW_AT_decl_file : 2 +DW_AT_decl_line : 52 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><16d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7b): cmdp +DW_AT_decl_file : 2 +DW_AT_decl_line : 54 +DW_AT_type : <0x240> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><17b> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sbp +DW_AT_decl_file : 2 +DW_AT_decl_line : 55 +DW_AT_type : <0x240> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><189> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc): timeout +DW_AT_decl_file : 2 +DW_AT_decl_line : 56 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><197> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16c): flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 57 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1a5> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f8): pack_id +DW_AT_decl_file : 2 +DW_AT_decl_line : 58 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><1b3> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x200): usr_ptr +DW_AT_decl_file : 2 +DW_AT_decl_line : 59 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><1c1> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x80): status +DW_AT_decl_file : 2 +DW_AT_decl_line : 60 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><1cf> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x249): masked_status +DW_AT_decl_file : 2 +DW_AT_decl_line : 61 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 2d (DW_OP_plus_uconst: 45) +<2><1dd> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22b): msg_status +DW_AT_decl_file : 2 +DW_AT_decl_line : 62 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 2e (DW_OP_plus_uconst: 46) +<2><1eb> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23f): sb_len_wr +DW_AT_decl_file : 2 +DW_AT_decl_line : 63 +DW_AT_type : <0x39> +DW_AT_data_member_location: 2 byte block: 23 2f (DW_OP_plus_uconst: 47) +<2><1f9> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21f): host_status +DW_AT_decl_file : 2 +DW_AT_decl_line : 64 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><207> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x90): driver_status +DW_AT_decl_file : 2 +DW_AT_decl_line : 65 +DW_AT_type : <0x40> +DW_AT_data_member_location: 2 byte block: 23 32 (DW_OP_plus_uconst: 50) +<2><215> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): resid +DW_AT_decl_file : 2 +DW_AT_decl_line : 66 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<2><223> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14): duration +DW_AT_decl_file : 2 +DW_AT_decl_line : 67 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><231> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x130): info +DW_AT_decl_file : 2 +DW_AT_decl_line : 68 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<1><240> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x39> +<1><246> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x146): struct_sg_io_hdr +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_type : <0xff> +<1><251> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x11f): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><25f> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x108): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xed> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><26d> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1b6): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><27b> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x135): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 41 +DW_AT_type : <0x246> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_sg_io_hdr.h b/mpers-mx32/struct_sg_io_hdr.h new file mode 100644 index 000000000..afb981e99 --- /dev/null +++ b/mpers-mx32/struct_sg_io_hdr.h @@ -0,0 +1,28 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t interface_id; +int32_t dxfer_direction; +unsigned char cmd_len; +unsigned char mx_sb_len; +uint16_t iovec_count; +uint32_t dxfer_len; +mpers_ptr_t dxferp; +mpers_ptr_t cmdp; +mpers_ptr_t sbp; +uint32_t timeout; +uint32_t flags; +int32_t pack_id; +mpers_ptr_t usr_ptr; +unsigned char status; +unsigned char masked_status; +unsigned char msg_status; +unsigned char sb_len_wr; +uint16_t host_status; +uint16_t driver_status; +int32_t resid; +uint32_t duration; +uint32_t info; +} ATTRIBUTE_PACKED mx32_struct_sg_io_hdr; +#define MPERS_mx32_struct_sg_io_hdr mx32_struct_sg_io_hdr diff --git a/mpers-mx32/struct_sg_req_info.c b/mpers-mx32/struct_sg_req_info.c new file mode 100644 index 000000000..26bddb3ca --- /dev/null +++ b/mpers-mx32/struct_sg_req_info.c @@ -0,0 +1,41 @@ +/* + * Decode struct sg_req_info. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_SCSI_SG_H + + +# include + +typedef struct sg_req_info struct_sg_req_info; + +#endif /* HAVE_SCSI_SG_H */ + +struct_sg_req_info mpers_target_var; diff --git a/mpers-mx32/struct_sg_req_info.d1 b/mpers-mx32/struct_sg_req_info.d1 new file mode 100644 index 000000000..64e80e798 --- /dev/null +++ b/mpers-mx32/struct_sg_req_info.d1 @@ -0,0 +1,217 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1c0 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0xf): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xf8): mpers-mx32/struct_sg_req_info.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x14f): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1e6): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1c4): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x19a): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xb4): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x5a): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x12f): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x9d): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1d5): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xce): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x191): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x14a): char + <1><73>: Abbrev Number: 5 (DW_TAG_pointer_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_type : <0x79> + <1><79>: Abbrev Number: 6 (DW_TAG_const_type) + <7a> DW_AT_type : <0x6c> + <1><7e>: Abbrev Number: 7 (DW_TAG_structure_type) + <7f> DW_AT_name : (indirect string, offset: 0xe0): sysent + <83> DW_AT_byte_size : 20 + <84> DW_AT_decl_file : 1 + <85> DW_AT_decl_line : 4 + <86> DW_AT_sibling : <0xd1> + <2><8a>: Abbrev Number: 8 (DW_TAG_member) + <8b> DW_AT_name : (indirect string, offset: 0x118): nargs + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 5 + <91> DW_AT_type : <0x47> + <95> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><98>: Abbrev Number: 8 (DW_TAG_member) + <99> DW_AT_name : (indirect string, offset: 0x93): sys_flags + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 6 + <9f> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1f2): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xdc> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x8a): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x73> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xdc> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) +
DW_AT_byte_size : 4 + DW_AT_type : <0xd1> + <1>: Abbrev Number: 12 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x13c): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7e> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf3> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xe2> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x0): _Bool + <1>: Abbrev Number: 7 (DW_TAG_structure_type) + <100> DW_AT_name : (indirect string, offset: 0x1b8): sg_req_info + <104> DW_AT_byte_size : 20 + <105> DW_AT_decl_file : 2 + <106> DW_AT_decl_line : 120 + <107> DW_AT_sibling : <0x17c> + <2><10b>: Abbrev Number: 8 (DW_TAG_member) + <10c> DW_AT_name : (indirect string, offset: 0x6d): req_state + <110> DW_AT_decl_file : 2 + <111> DW_AT_decl_line : 121 + <112> DW_AT_type : <0x6c> + <116> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><119>: Abbrev Number: 8 (DW_TAG_member) + <11a> DW_AT_name : (indirect string, offset: 0x1ce): orphan + <11e> DW_AT_decl_file : 2 + <11f> DW_AT_decl_line : 122 + <120> DW_AT_type : <0x6c> + <124> DW_AT_data_member_location: 2 byte block: 23 1 (DW_OP_plus_uconst: 1) + <2><127>: Abbrev Number: 8 (DW_TAG_member) + <128> DW_AT_name : (indirect string, offset: 0xc2): sg_io_owned + <12c> DW_AT_decl_file : 2 + <12d> DW_AT_decl_line : 123 + <12e> DW_AT_type : <0x6c> + <132> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><135>: Abbrev Number: 8 (DW_TAG_member) + <136> DW_AT_name : (indirect string, offset: 0x1de): problem + <13a> DW_AT_decl_file : 2 + <13b> DW_AT_decl_line : 124 + <13c> DW_AT_type : <0x6c> + <140> DW_AT_data_member_location: 2 byte block: 23 3 (DW_OP_plus_uconst: 3) + <2><143>: Abbrev Number: 8 (DW_TAG_member) + <144> DW_AT_name : (indirect string, offset: 0x1a8): pack_id + <148> DW_AT_decl_file : 2 + <149> DW_AT_decl_line : 125 + <14a> DW_AT_type : <0x2b> + <14e> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><151>: Abbrev Number: 8 (DW_TAG_member) + <152> DW_AT_name : (indirect string, offset: 0x1b0): usr_ptr + <156> DW_AT_decl_file : 2 + <157> DW_AT_decl_line : 126 + <158> DW_AT_type : <0x6a> + <15c> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><15f>: Abbrev Number: 8 (DW_TAG_member) + <160> DW_AT_name : (indirect string, offset: 0x6): duration + <164> DW_AT_decl_file : 2 + <165> DW_AT_decl_line : 127 + <166> DW_AT_type : <0x47> + <16a> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><16d>: Abbrev Number: 8 (DW_TAG_member) + <16e> DW_AT_name : (indirect string, offset: 0x18a): unused + <172> DW_AT_decl_file : 2 + <173> DW_AT_decl_line : 129 + <174> DW_AT_type : <0x2b> + <178> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><17b>: Abbrev Number: 0 + <1><17c>: Abbrev Number: 12 (DW_TAG_typedef) + <17d> DW_AT_name : (indirect string, offset: 0x77): struct_sg_req_info + <181> DW_AT_decl_file : 3 + <182> DW_AT_decl_line : 37 + <183> DW_AT_type : <0xff> + <1><187>: Abbrev Number: 13 (DW_TAG_variable) + <188> DW_AT_name : (indirect string, offset: 0xe7): current_wordsize + <18c> DW_AT_decl_file : 4 + <18d> DW_AT_decl_line : 757 + <18f> DW_AT_type : <0x47> + <193> DW_AT_external : 1 + <194> DW_AT_declaration : 1 + <1><195>: Abbrev Number: 13 (DW_TAG_variable) + <196> DW_AT_name : (indirect string, offset: 0xe0): sysent + <19a> DW_AT_decl_file : 4 + <19b> DW_AT_decl_line : 892 + <19d> DW_AT_type : <0xed> + <1a1> DW_AT_external : 1 + <1a2> DW_AT_declaration : 1 + <1><1a3>: Abbrev Number: 13 (DW_TAG_variable) + <1a4> DW_AT_name : (indirect string, offset: 0x180): nsyscalls + <1a8> DW_AT_decl_file : 4 + <1a9> DW_AT_decl_line : 903 + <1ab> DW_AT_type : <0x47> + <1af> DW_AT_external : 1 + <1b0> DW_AT_declaration : 1 + <1><1b1>: Abbrev Number: 14 (DW_TAG_variable) + <1b2> DW_AT_name : (indirect string, offset: 0x11e): mpers_target_var + <1b6> DW_AT_decl_file : 3 + <1b7> DW_AT_decl_line : 41 + <1b8> DW_AT_type : <0x17c> + <1bc> DW_AT_external : 1 + <1bd> DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) + <1><1c3>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_sg_req_info.d2 b/mpers-mx32/struct_sg_req_info.d2 new file mode 100644 index 000000000..eef79c9da --- /dev/null +++ b/mpers-mx32/struct_sg_req_info.d2 @@ -0,0 +1,241 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1e6): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1c4): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x19a): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xb4): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x5a): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x12f): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x9d): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1d5): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xce): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x191): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x14a): char +<1><73> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x79> +<1><79> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><7e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xe0): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd1> +<2><8a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x118): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><98> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x93): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f2): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xdc> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8a): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xdc> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd1> +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x13c): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7e> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xe2> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x0): _Bool +<1> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x1b8): sg_req_info +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 120 +DW_AT_sibling : <0x17c> +<2><10b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6d): req_state +DW_AT_decl_file : 2 +DW_AT_decl_line : 121 +DW_AT_type : <0x6c> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><119> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ce): orphan +DW_AT_decl_file : 2 +DW_AT_decl_line : 122 +DW_AT_type : <0x6c> +DW_AT_data_member_location: 2 byte block: 23 1 (DW_OP_plus_uconst: 1) +<2><127> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc2): sg_io_owned +DW_AT_decl_file : 2 +DW_AT_decl_line : 123 +DW_AT_type : <0x6c> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><135> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1de): problem +DW_AT_decl_file : 2 +DW_AT_decl_line : 124 +DW_AT_type : <0x6c> +DW_AT_data_member_location: 2 byte block: 23 3 (DW_OP_plus_uconst: 3) +<2><143> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a8): pack_id +DW_AT_decl_file : 2 +DW_AT_decl_line : 125 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><151> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b0): usr_ptr +DW_AT_decl_file : 2 +DW_AT_decl_line : 126 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><15f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6): duration +DW_AT_decl_file : 2 +DW_AT_decl_line : 127 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><16d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18a): unused +DW_AT_decl_file : 2 +DW_AT_decl_line : 129 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><17c> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x77): struct_sg_req_info +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_type : <0xff> +<1><187> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe7): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><195> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe0): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0xed> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1a3> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x180): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1b1> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x11e): mpers_target_var +DW_AT_decl_file : 3 +DW_AT_decl_line : 41 +DW_AT_type : <0x17c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) diff --git a/mpers-mx32/struct_sg_req_info.h b/mpers-mx32/struct_sg_req_info.h new file mode 100644 index 000000000..78846a498 --- /dev/null +++ b/mpers-mx32/struct_sg_req_info.h @@ -0,0 +1,14 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +char req_state; +char orphan; +char sg_io_owned; +char problem; +int32_t pack_id; +mpers_ptr_t usr_ptr; +uint32_t duration; +int32_t unused; +} ATTRIBUTE_PACKED mx32_struct_sg_req_info; +#define MPERS_mx32_struct_sg_req_info mx32_struct_sg_req_info diff --git a/mpers-mx32/struct_sigevent.c b/mpers-mx32/struct_sigevent.c new file mode 100644 index 000000000..e5294a265 --- /dev/null +++ b/mpers-mx32/struct_sigevent.c @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2003, 2004 Ulrich Drepper + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include "sigevent.h" +struct_sigevent mpers_target_var; diff --git a/mpers-mx32/struct_sigevent.d1 b/mpers-mx32/struct_sigevent.d1 new file mode 100644 index 000000000..55d755852 --- /dev/null +++ b/mpers-mx32/struct_sigevent.d1 @@ -0,0 +1,240 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1e5 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x14): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x1ab): mpers-mx32/struct_sigevent.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x134): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1de): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x182): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x0): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xac): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x5f): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x114): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x85): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1c8): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x102): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x179): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x12f): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xc7): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0xdf): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x7b): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1ea): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x72): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x121): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0xe): _Bool + <1>: Abbrev Number: 12 (DW_TAG_union_type) + DW_AT_byte_size : 4 + DW_AT_decl_file : 2 + <100> DW_AT_decl_line : 32 + <101> DW_AT_sibling : <0x11c> + <2><105>: Abbrev Number: 13 (DW_TAG_member) + <106> DW_AT_name : (indirect string, offset: 0x18c): sival_int + <10a> DW_AT_decl_file : 2 + <10b> DW_AT_decl_line : 33 + <10c> DW_AT_type : <0x2b> + <2><110>: Abbrev Number: 13 (DW_TAG_member) + <111> DW_AT_name : (indirect string, offset: 0x1fc): sival_ptr + <115> DW_AT_decl_file : 2 + <116> DW_AT_decl_line : 34 + <117> DW_AT_type : <0x5c> + <2><11b>: Abbrev Number: 0 + <1><11c>: Abbrev Number: 14 (DW_TAG_structure_type) + <11d> DW_AT_byte_size : 8 + <11e> DW_AT_decl_file : 2 + <11f> DW_AT_decl_line : 40 + <120> DW_AT_sibling : <0x141> + <2><124>: Abbrev Number: 7 (DW_TAG_member) + <125> DW_AT_name : (indirect string, offset: 0x1f3): function + <129> DW_AT_decl_file : 2 + <12a> DW_AT_decl_line : 41 + <12b> DW_AT_type : <0x5c> + <12f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><132>: Abbrev Number: 7 (DW_TAG_member) + <133> DW_AT_name : (indirect string, offset: 0x16f): attribute + <137> DW_AT_decl_file : 2 + <138> DW_AT_decl_line : 42 + <139> DW_AT_type : <0x5c> + <13d> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><140>: Abbrev Number: 0 + <1><141>: Abbrev Number: 12 (DW_TAG_union_type) + <142> DW_AT_byte_size : 8 + <143> DW_AT_decl_file : 2 + <144> DW_AT_decl_line : 38 + <145> DW_AT_sibling : <0x160> + <2><149>: Abbrev Number: 15 (DW_TAG_member) + <14a> DW_AT_name : tid + <14e> DW_AT_decl_file : 2 + <14f> DW_AT_decl_line : 39 + <150> DW_AT_type : <0x2b> + <2><154>: Abbrev Number: 13 (DW_TAG_member) + <155> DW_AT_name : (indirect string, offset: 0x1d1): sigev_thread + <159> DW_AT_decl_file : 2 + <15a> DW_AT_decl_line : 43 + <15b> DW_AT_type : <0x11c> + <2><15f>: Abbrev Number: 0 + <1><160>: Abbrev Number: 14 (DW_TAG_structure_type) + <161> DW_AT_byte_size : 20 + <162> DW_AT_decl_file : 2 + <163> DW_AT_decl_line : 31 + <164> DW_AT_sibling : <0x1a1> + <2><168>: Abbrev Number: 7 (DW_TAG_member) + <169> DW_AT_name : (indirect string, offset: 0x196): sigev_value + <16d> DW_AT_decl_file : 2 + <16e> DW_AT_decl_line : 35 + <16f> DW_AT_type : <0xfd> + <173> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><176>: Abbrev Number: 7 (DW_TAG_member) + <177> DW_AT_name : (indirect string, offset: 0xe5): sigev_signo + <17b> DW_AT_decl_file : 2 + <17c> DW_AT_decl_line : 36 + <17d> DW_AT_type : <0x2b> + <181> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><184>: Abbrev Number: 7 (DW_TAG_member) + <185> DW_AT_name : (indirect string, offset: 0xba): sigev_notify + <189> DW_AT_decl_file : 2 + <18a> DW_AT_decl_line : 37 + <18b> DW_AT_type : <0x2b> + <18f> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><192>: Abbrev Number: 7 (DW_TAG_member) + <193> DW_AT_name : (indirect string, offset: 0x1a2): sigev_un + <197> DW_AT_decl_file : 2 + <198> DW_AT_decl_line : 44 + <199> DW_AT_type : <0x141> + <19d> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1a0>: Abbrev Number: 0 + <1><1a1>: Abbrev Number: 11 (DW_TAG_typedef) + <1a2> DW_AT_name : (indirect string, offset: 0x9c): struct_sigevent + <1a6> DW_AT_decl_file : 2 + <1a7> DW_AT_decl_line : 45 + <1a8> DW_AT_type : <0x160> + <1><1ac>: Abbrev Number: 16 (DW_TAG_variable) + <1ad> DW_AT_name : (indirect string, offset: 0xce): current_wordsize + <1b1> DW_AT_decl_file : 3 + <1b2> DW_AT_decl_line : 757 + <1b4> DW_AT_type : <0x47> + <1b8> DW_AT_external : 1 + <1b9> DW_AT_declaration : 1 + <1><1ba>: Abbrev Number: 16 (DW_TAG_variable) + <1bb> DW_AT_name : (indirect string, offset: 0xc7): sysent + <1bf> DW_AT_decl_file : 3 + <1c0> DW_AT_decl_line : 892 + <1c2> DW_AT_type : <0xeb> + <1c6> DW_AT_external : 1 + <1c7> DW_AT_declaration : 1 + <1><1c8>: Abbrev Number: 16 (DW_TAG_variable) + <1c9> DW_AT_name : (indirect string, offset: 0x165): nsyscalls + <1cd> DW_AT_decl_file : 3 + <1ce> DW_AT_decl_line : 903 + <1d0> DW_AT_type : <0x47> + <1d4> DW_AT_external : 1 + <1d5> DW_AT_declaration : 1 + <1><1d6>: Abbrev Number: 17 (DW_TAG_variable) + <1d7> DW_AT_name : (indirect string, offset: 0xf1): mpers_target_var + <1db> DW_AT_decl_file : 4 + <1dc> DW_AT_decl_line : 32 + <1dd> DW_AT_type : <0x1a1> + <1e1> DW_AT_external : 1 + <1e2> DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) + <1><1e8>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_sigevent.d2 b/mpers-mx32/struct_sigevent.d2 new file mode 100644 index 000000000..7b9ac4871 --- /dev/null +++ b/mpers-mx32/struct_sigevent.d2 @@ -0,0 +1,265 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1de): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x182): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x0): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xac): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x5f): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x114): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x85): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1c8): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x102): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x179): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x12f): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc7): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xdf): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7b): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ea): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x72): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x121): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xe): _Bool +<1> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 2 +DW_AT_decl_line : 32 +DW_AT_sibling : <0x11c> +<2><105> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18c): sival_int +DW_AT_decl_file : 2 +DW_AT_decl_line : 33 +DW_AT_type : <0x2b> +<2><110> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fc): sival_ptr +DW_AT_decl_file : 2 +DW_AT_decl_line : 34 +DW_AT_type : <0x5c> +<1><11c> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 40 +DW_AT_sibling : <0x141> +<2><124> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f3): function +DW_AT_decl_file : 2 +DW_AT_decl_line : 41 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><132> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16f): attribute +DW_AT_decl_file : 2 +DW_AT_decl_line : 42 +DW_AT_type : <0x5c> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><141> +Abbrev Number: 12 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 38 +DW_AT_sibling : <0x160> +<2><149> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : tid +DW_AT_decl_file : 2 +DW_AT_decl_line : 39 +DW_AT_type : <0x2b> +<2><154> +Abbrev Number: 13 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d1): sigev_thread +DW_AT_decl_file : 2 +DW_AT_decl_line : 43 +DW_AT_type : <0x11c> +<1><160> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 31 +DW_AT_sibling : <0x1a1> +<2><168> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x196): sigev_value +DW_AT_decl_file : 2 +DW_AT_decl_line : 35 +DW_AT_type : <0xfd> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><176> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe5): sigev_signo +DW_AT_decl_file : 2 +DW_AT_decl_line : 36 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><184> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xba): sigev_notify +DW_AT_decl_file : 2 +DW_AT_decl_line : 37 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><192> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a2): sigev_un +DW_AT_decl_file : 2 +DW_AT_decl_line : 44 +DW_AT_type : <0x141> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1a1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x9c): struct_sigevent +DW_AT_decl_file : 2 +DW_AT_decl_line : 45 +DW_AT_type : <0x160> +<1><1ac> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xce): current_wordsize +DW_AT_decl_file : 3 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1ba> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc7): sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1c8> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x165): nsyscalls +DW_AT_decl_file : 3 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1d6> +Abbrev Number: 17 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xf1): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 32 +DW_AT_type : <0x1a1> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) diff --git a/mpers-mx32/struct_sigevent.h b/mpers-mx32/struct_sigevent.h new file mode 100644 index 000000000..09bbb8ac0 --- /dev/null +++ b/mpers-mx32/struct_sigevent.h @@ -0,0 +1,19 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +union { +int32_t sival_int; +uint32_t sival_ptr; +} sigev_value; +int32_t sigev_signo; +int32_t sigev_notify; +union { +int32_t tid; +struct { +uint32_t function; +uint32_t attribute; +} ATTRIBUTE_PACKED sigev_thread; +} sigev_un; +} ATTRIBUTE_PACKED mx32_struct_sigevent; +#define MPERS_mx32_struct_sigevent mx32_struct_sigevent diff --git a/mpers-mx32/struct_stat.c b/mpers-mx32/struct_stat.c new file mode 100644 index 000000000..80d1412c2 --- /dev/null +++ b/mpers-mx32/struct_stat.c @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "asm_stat.h" + +#if defined MPERS_IS_m32 +# undef HAVE_STRUCT_STAT +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# ifdef HAVE_M32_STRUCT_STAT +# define HAVE_STRUCT_STAT 1 +# ifdef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif /* HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC */ +# endif /* HAVE_M32_STRUCT_STAT */ +#elif defined MPERS_IS_mx32 +# undef HAVE_STRUCT_STAT +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# ifdef HAVE_MX32_STRUCT_STAT +# define HAVE_STRUCT_STAT 1 +# ifdef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif /* HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC */ +# endif /* HAVE_MX32_STRUCT_STAT */ +#else /* !MPERS_IS_m32 && !MPERS_IS_mx32 */ +# define HAVE_STRUCT_STAT 1 +#endif + +#ifndef HAVE_STRUCT_STAT +struct stat {}; +#endif + +typedef struct stat struct_stat; + +struct_stat mpers_target_var; diff --git a/mpers-mx32/struct_stat.d1 b/mpers-mx32/struct_stat.d1 new file mode 100644 index 000000000..1f7173b05 --- /dev/null +++ b/mpers-mx32/struct_stat.d1 @@ -0,0 +1,302 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x286 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x40): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x147): mpers-mx32/struct_stat.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x243): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x237): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1f9): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1eb): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xf7): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x8b): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x184): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xd9): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x220): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x10f): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1d4): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x19f): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_typedef) + <7d> DW_AT_name : (indirect string, offset: 0xa6): __kernel_long_t + <81> DW_AT_decl_file : 1 + <82> DW_AT_decl_line : 13 + <83> DW_AT_type : <0x32> + <1><87>: Abbrev Number: 6 (DW_TAG_typedef) + <88> DW_AT_name : (indirect string, offset: 0x1b2): __kernel_ulong_t + <8c> DW_AT_decl_file : 1 + <8d> DW_AT_decl_line : 14 + <8e> DW_AT_type : <0x4e> + <1><92>: Abbrev Number: 6 (DW_TAG_typedef) + <93> DW_AT_name : (indirect string, offset: 0x229): kernel_long_t + <97> DW_AT_decl_file : 2 + <98> DW_AT_decl_line : 35 + <99> DW_AT_type : <0x7c> + <1><9d>: Abbrev Number: 6 (DW_TAG_typedef) + <9e> DW_AT_name : (indirect string, offset: 0x211): kernel_ulong_t + DW_AT_decl_file : 2 + DW_AT_decl_line : 36 + DW_AT_type : <0x87> + <1>: Abbrev Number: 7 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x129): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xfb> + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x141): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x160): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x27b): sys_func + DW_AT_decl_file : 3 + DW_AT_decl_line : 8 + DW_AT_type : <0x106> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb6): sys_name + DW_AT_decl_file : 3 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + <100> DW_AT_sibling : <0x106> + <2><104>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><105>: Abbrev Number: 0 + <1><106>: Abbrev Number: 4 (DW_TAG_pointer_type) + <107> DW_AT_byte_size : 4 + <108> DW_AT_type : <0xfb> + <1><10c>: Abbrev Number: 6 (DW_TAG_typedef) + <10d> DW_AT_name : (indirect string, offset: 0x191): struct_sysent + <111> DW_AT_decl_file : 3 + <112> DW_AT_decl_line : 10 + <113> DW_AT_type : <0xa8> + <1><117>: Abbrev Number: 4 (DW_TAG_pointer_type) + <118> DW_AT_byte_size : 4 + <119> DW_AT_type : <0x11d> + <1><11d>: Abbrev Number: 5 (DW_TAG_const_type) + <11e> DW_AT_type : <0x10c> + <1><122>: Abbrev Number: 2 (DW_TAG_base_type) + <123> DW_AT_byte_size : 1 + <124> DW_AT_encoding : 2 (boolean) + <125> DW_AT_name : (indirect string, offset: 0x25): _Bool + <1><129>: Abbrev Number: 7 (DW_TAG_structure_type) + <12a> DW_AT_name : (indirect string, offset: 0x17): stat + <12e> DW_AT_byte_size : 144 + <12f> DW_AT_decl_file : 4 + <130> DW_AT_decl_line : 16 + <131> DW_AT_sibling : <0x232> + <2><135>: Abbrev Number: 8 (DW_TAG_member) + <136> DW_AT_name : (indirect string, offset: 0x203): st_dev + <13a> DW_AT_decl_file : 4 + <13b> DW_AT_decl_line : 17 + <13c> DW_AT_type : <0x9d> + <140> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><143>: Abbrev Number: 8 (DW_TAG_member) + <144> DW_AT_name : (indirect string, offset: 0xbf): st_ino + <148> DW_AT_decl_file : 4 + <149> DW_AT_decl_line : 18 + <14a> DW_AT_type : <0x9d> + <14e> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><151>: Abbrev Number: 8 (DW_TAG_member) + <152> DW_AT_name : (indirect string, offset: 0x37): st_nlink + <156> DW_AT_decl_file : 4 + <157> DW_AT_decl_line : 19 + <158> DW_AT_type : <0x9d> + <15c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><15f>: Abbrev Number: 8 (DW_TAG_member) + <160> DW_AT_name : (indirect string, offset: 0x121): st_mode + <164> DW_AT_decl_file : 4 + <165> DW_AT_decl_line : 20 + <166> DW_AT_type : <0x47> + <16a> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><16d>: Abbrev Number: 8 (DW_TAG_member) + <16e> DW_AT_name : (indirect string, offset: 0x1cd): st_uid + <172> DW_AT_decl_file : 4 + <173> DW_AT_decl_line : 21 + <174> DW_AT_type : <0x47> + <178> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><17b>: Abbrev Number: 8 (DW_TAG_member) + <17c> DW_AT_name : (indirect string, offset: 0x20a): st_gid + <180> DW_AT_decl_file : 4 + <181> DW_AT_decl_line : 22 + <182> DW_AT_type : <0x47> + <186> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><189>: Abbrev Number: 8 (DW_TAG_member) + <18a> DW_AT_name : (indirect string, offset: 0x274): pad0__ + <18e> DW_AT_decl_file : 4 + <18f> DW_AT_decl_line : 23 + <190> DW_AT_type : <0x47> + <194> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><197>: Abbrev Number: 8 (DW_TAG_member) + <198> DW_AT_name : (indirect string, offset: 0xd1): st_rdev + <19c> DW_AT_decl_file : 4 + <19d> DW_AT_decl_line : 24 + <19e> DW_AT_type : <0x9d> + <1a2> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1a5>: Abbrev Number: 8 (DW_TAG_member) + <1a6> DW_AT_name : (indirect string, offset: 0x9e): st_size + <1aa> DW_AT_decl_file : 4 + <1ab> DW_AT_decl_line : 25 + <1ac> DW_AT_type : <0x92> + <1b0> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><1b3>: Abbrev Number: 8 (DW_TAG_member) + <1b4> DW_AT_name : (indirect string, offset: 0xc6): st_blksize + <1b8> DW_AT_decl_file : 4 + <1b9> DW_AT_decl_line : 26 + <1ba> DW_AT_type : <0x92> + <1be> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><1c1>: Abbrev Number: 8 (DW_TAG_member) + <1c2> DW_AT_name : (indirect string, offset: 0x105): st_blocks + <1c6> DW_AT_decl_file : 4 + <1c7> DW_AT_decl_line : 27 + <1c8> DW_AT_type : <0x92> + <1cc> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><1cf>: Abbrev Number: 8 (DW_TAG_member) + <1d0> DW_AT_name : (indirect string, offset: 0x1c): st_atime + <1d4> DW_AT_decl_file : 4 + <1d5> DW_AT_decl_line : 28 + <1d6> DW_AT_type : <0x9d> + <1da> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><1dd>: Abbrev Number: 8 (DW_TAG_member) + <1de> DW_AT_name : (indirect string, offset: 0x1dd): st_atime_nsec + <1e2> DW_AT_decl_file : 4 + <1e3> DW_AT_decl_line : 29 + <1e4> DW_AT_type : <0x9d> + <1e8> DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) + <2><1eb>: Abbrev Number: 8 (DW_TAG_member) + <1ec> DW_AT_name : (indirect string, offset: 0x0): st_mtime + <1f0> DW_AT_decl_file : 4 + <1f1> DW_AT_decl_line : 30 + <1f2> DW_AT_type : <0x9d> + <1f6> DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) + <2><1f9>: Abbrev Number: 8 (DW_TAG_member) + <1fa> DW_AT_name : (indirect string, offset: 0x1a4): st_mtime_nsec + <1fe> DW_AT_decl_file : 4 + <1ff> DW_AT_decl_line : 31 + <200> DW_AT_type : <0x9d> + <204> DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) + <2><207>: Abbrev Number: 8 (DW_TAG_member) + <208> DW_AT_name : (indirect string, offset: 0x17b): st_ctime + <20c> DW_AT_decl_file : 4 + <20d> DW_AT_decl_line : 32 + <20e> DW_AT_type : <0x9d> + <212> DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) + <2><215>: Abbrev Number: 8 (DW_TAG_member) + <216> DW_AT_name : (indirect string, offset: 0x9): st_ctime_nsec + <21a> DW_AT_decl_file : 4 + <21b> DW_AT_decl_line : 33 + <21c> DW_AT_type : <0x9d> + <220> DW_AT_data_member_location: 2 byte block: 23 70 (DW_OP_plus_uconst: 112) + <2><223>: Abbrev Number: 8 (DW_TAG_member) + <224> DW_AT_name : (indirect string, offset: 0xf0): pad1__ + <228> DW_AT_decl_file : 4 + <229> DW_AT_decl_line : 34 + <22a> DW_AT_type : <0x232> + <22e> DW_AT_data_member_location: 2 byte block: 23 78 (DW_OP_plus_uconst: 120) + <2><231>: Abbrev Number: 0 + <1><232>: Abbrev Number: 12 (DW_TAG_array_type) + <233> DW_AT_type : <0x92> + <237> DW_AT_sibling : <0x242> + <2><23b>: Abbrev Number: 13 (DW_TAG_subrange_type) + <23c> DW_AT_type : <0x63> + <240> DW_AT_upper_bound : 2 + <2><241>: Abbrev Number: 0 + <1><242>: Abbrev Number: 6 (DW_TAG_typedef) + <243> DW_AT_name : (indirect string, offset: 0x2b): struct_stat + <247> DW_AT_decl_file : 5 + <248> DW_AT_decl_line : 59 + <249> DW_AT_type : <0x129> + <1><24d>: Abbrev Number: 14 (DW_TAG_variable) + <24e> DW_AT_name : (indirect string, offset: 0x130): current_wordsize + <252> DW_AT_decl_file : 6 + <253> DW_AT_decl_line : 757 + <255> DW_AT_type : <0x47> + <259> DW_AT_external : 1 + <25a> DW_AT_declaration : 1 + <1><25b>: Abbrev Number: 14 (DW_TAG_variable) + <25c> DW_AT_name : (indirect string, offset: 0x129): sysent + <260> DW_AT_decl_file : 6 + <261> DW_AT_decl_line : 892 + <263> DW_AT_type : <0x117> + <267> DW_AT_external : 1 + <268> DW_AT_declaration : 1 + <1><269>: Abbrev Number: 14 (DW_TAG_variable) + <26a> DW_AT_name : (indirect string, offset: 0x1c3): nsyscalls + <26e> DW_AT_decl_file : 6 + <26f> DW_AT_decl_line : 903 + <271> DW_AT_type : <0x47> + <275> DW_AT_external : 1 + <276> DW_AT_declaration : 1 + <1><277>: Abbrev Number: 15 (DW_TAG_variable) + <278> DW_AT_name : (indirect string, offset: 0x16a): mpers_target_var + <27c> DW_AT_decl_file : 5 + <27d> DW_AT_decl_line : 61 + <27e> DW_AT_type : <0x242> + <282> DW_AT_external : 1 + <283> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><289>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_stat.d2 b/mpers-mx32/struct_stat.d2 new file mode 100644 index 000000000..a05036f4d --- /dev/null +++ b/mpers-mx32/struct_stat.d2 @@ -0,0 +1,340 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x237): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1f9): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1eb): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xf7): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x8b): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x184): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xd9): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x220): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x10f): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1d4): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x19f): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xa6): __kernel_long_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 13 +DW_AT_type : <0x32> +<1><87> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b2): __kernel_ulong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 14 +DW_AT_type : <0x4e> +<1><92> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x229): kernel_long_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 35 +DW_AT_type : <0x7c> +<1><9d> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x211): kernel_ulong_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 36 +DW_AT_type : <0x87> +<1> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x129): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xfb> +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x141): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x160): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x27b): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x106> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb6): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x106> +<2><104> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><106> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xfb> +<1><10c> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x191): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xa8> +<1><117> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x11d> +<1><11d> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x10c> +<1><122> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x25): _Bool +<1><129> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x17): stat +DW_AT_byte_size : 144 +DW_AT_decl_file : 4 +DW_AT_decl_line : 16 +DW_AT_sibling : <0x232> +<2><135> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x203): st_dev +DW_AT_decl_file : 4 +DW_AT_decl_line : 17 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><143> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbf): st_ino +DW_AT_decl_file : 4 +DW_AT_decl_line : 18 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><151> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x37): st_nlink +DW_AT_decl_file : 4 +DW_AT_decl_line : 19 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><15f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x121): st_mode +DW_AT_decl_file : 4 +DW_AT_decl_line : 20 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><16d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1cd): st_uid +DW_AT_decl_file : 4 +DW_AT_decl_line : 21 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><17b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x20a): st_gid +DW_AT_decl_file : 4 +DW_AT_decl_line : 22 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><189> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x274): pad0__ +DW_AT_decl_file : 4 +DW_AT_decl_line : 23 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><197> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd1): st_rdev +DW_AT_decl_file : 4 +DW_AT_decl_line : 24 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><1a5> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9e): st_size +DW_AT_decl_file : 4 +DW_AT_decl_line : 25 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><1b3> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc6): st_blksize +DW_AT_decl_file : 4 +DW_AT_decl_line : 26 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><1c1> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x105): st_blocks +DW_AT_decl_file : 4 +DW_AT_decl_line : 27 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><1cf> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c): st_atime +DW_AT_decl_file : 4 +DW_AT_decl_line : 28 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><1dd> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1dd): st_atime_nsec +DW_AT_decl_file : 4 +DW_AT_decl_line : 29 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) +<2><1eb> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): st_mtime +DW_AT_decl_file : 4 +DW_AT_decl_line : 30 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) +<2><1f9> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a4): st_mtime_nsec +DW_AT_decl_file : 4 +DW_AT_decl_line : 31 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) +<2><207> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x17b): st_ctime +DW_AT_decl_file : 4 +DW_AT_decl_line : 32 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) +<2><215> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9): st_ctime_nsec +DW_AT_decl_file : 4 +DW_AT_decl_line : 33 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 70 (DW_OP_plus_uconst: 112) +<2><223> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf0): pad1__ +DW_AT_decl_file : 4 +DW_AT_decl_line : 34 +DW_AT_type : <0x232> +DW_AT_data_member_location: 2 byte block: 23 78 (DW_OP_plus_uconst: 120) +<1><232> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x92> +DW_AT_sibling : <0x242> +<2><23b> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 2 +<1><242> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2b): struct_stat +DW_AT_decl_file : 5 +DW_AT_decl_line : 59 +DW_AT_type : <0x129> +<1><24d> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x130): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><25b> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x129): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x117> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><269> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1c3): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><277> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x16a): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 61 +DW_AT_type : <0x242> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_stat.h b/mpers-mx32/struct_stat.h new file mode 100644 index 000000000..b06adb37c --- /dev/null +++ b/mpers-mx32/struct_stat.h @@ -0,0 +1,24 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint64_t st_dev; +uint64_t st_ino; +uint64_t st_nlink; +uint32_t st_mode; +uint32_t st_uid; +uint32_t st_gid; +uint32_t pad0__; +uint64_t st_rdev; +int64_t st_size; +int64_t st_blksize; +int64_t st_blocks; +uint64_t st_atime; +uint64_t st_atime_nsec; +uint64_t st_mtime; +uint64_t st_mtime_nsec; +uint64_t st_ctime; +uint64_t st_ctime_nsec; +int64_t pad1__[3]; +} ATTRIBUTE_PACKED mx32_struct_stat; +#define MPERS_mx32_struct_stat mx32_struct_stat diff --git a/mpers-mx32/struct_stat64.c b/mpers-mx32/struct_stat64.c new file mode 100644 index 000000000..cfececcda --- /dev/null +++ b/mpers-mx32/struct_stat64.c @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include "asm_stat.h" + +#if defined MPERS_IS_m32 +# undef HAVE_STRUCT_STAT64 +# undef HAVE_STRUCT_STAT64_ST_MTIME_NSEC +# ifdef HAVE_M32_STRUCT_STAT64 +# define HAVE_STRUCT_STAT64 1 +# ifdef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT64_ST_MTIME_NSEC 1 +# endif /* HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC */ +# endif /* HAVE_M32_STRUCT_STAT64 */ +#elif defined MPERS_IS_mx32 +# undef HAVE_STRUCT_STAT64 +# undef HAVE_STRUCT_STAT64_ST_MTIME_NSEC +# ifdef HAVE_MX32_STRUCT_STAT64 +# define HAVE_STRUCT_STAT64 1 +# ifdef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT64_ST_MTIME_NSEC 1 +# endif /* HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC */ +# endif /* HAVE_MX32_STRUCT_STAT64 */ +#endif /* MPERS_IS_m32 || MPERS_IS_mx32 */ + +#ifndef HAVE_STRUCT_STAT64 +struct stat64 {}; +#endif + +typedef struct stat64 struct_stat64; + +struct_stat64 mpers_target_var; diff --git a/mpers-mx32/struct_stat64.d1 b/mpers-mx32/struct_stat64.d1 new file mode 100644 index 000000000..9e12e5f14 --- /dev/null +++ b/mpers-mx32/struct_stat64.d1 @@ -0,0 +1,165 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x149 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x28): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x18c): mpers-mx32/struct_stat64.c + <15> DW_AT_comp_dir : (indirect string, offset: 0xbe): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x152): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x182): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x124): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xef): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x13f): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x15e): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xa7): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x102): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x84): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x16b): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0xfd): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0x132): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x139): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0x114): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x10b): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x7): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x10): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x11e): _Bool + <1>: Abbrev Number: 12 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x0): stat64 + <102> DW_AT_byte_size : 0 + <103> DW_AT_decl_file : 2 + <104> DW_AT_decl_line : 54 + <1><105>: Abbrev Number: 11 (DW_TAG_typedef) + <106> DW_AT_name : (indirect string, offset: 0x174): struct_stat64 + <10a> DW_AT_decl_file : 2 + <10b> DW_AT_decl_line : 57 + <10c> DW_AT_type : <0xfd> + <1><110>: Abbrev Number: 13 (DW_TAG_variable) + <111> DW_AT_name : (indirect string, offset: 0x96): current_wordsize + <115> DW_AT_decl_file : 3 + <116> DW_AT_decl_line : 757 + <118> DW_AT_type : <0x47> + <11c> DW_AT_external : 1 + <11d> DW_AT_declaration : 1 + <1><11e>: Abbrev Number: 13 (DW_TAG_variable) + <11f> DW_AT_name : (indirect string, offset: 0x132): sysent + <123> DW_AT_decl_file : 3 + <124> DW_AT_decl_line : 892 + <126> DW_AT_type : <0xeb> + <12a> DW_AT_external : 1 + <12b> DW_AT_declaration : 1 + <1><12c>: Abbrev Number: 13 (DW_TAG_variable) + <12d> DW_AT_name : (indirect string, offset: 0x1e): nsyscalls + <131> DW_AT_decl_file : 3 + <132> DW_AT_decl_line : 903 + <134> DW_AT_type : <0x47> + <138> DW_AT_external : 1 + <139> DW_AT_declaration : 1 + <1><13a>: Abbrev Number: 14 (DW_TAG_variable) + <13b> DW_AT_name : (indirect string, offset: 0x73): mpers_target_var + <13f> DW_AT_decl_file : 2 + <140> DW_AT_decl_line : 59 + <141> DW_AT_type : <0x105> + <145> DW_AT_external : 1 + <146> DW_AT_location : 5 byte block: 3 1 0 0 0 (DW_OP_addr: 1) + <1><14c>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_stat64.d2 b/mpers-mx32/struct_stat64.d2 new file mode 100644 index 000000000..746114eef --- /dev/null +++ b/mpers-mx32/struct_stat64.d2 @@ -0,0 +1,181 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x152): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x182): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x124): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xef): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x13f): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x15e): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xa7): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x102): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x84): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x16b): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0xfd): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x132): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x139): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x114): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10b): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x10): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x11e): _Bool +<1> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): stat64 +DW_AT_byte_size : 0 +DW_AT_decl_file : 2 +DW_AT_decl_line : 54 +<1><105> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x174): struct_stat64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 57 +DW_AT_type : <0xfd> +<1><110> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x96): current_wordsize +DW_AT_decl_file : 3 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><11e> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x132): sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><12c> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1e): nsyscalls +DW_AT_decl_file : 3 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><13a> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x73): mpers_target_var +DW_AT_decl_file : 2 +DW_AT_decl_line : 59 +DW_AT_type : <0x105> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 1 0 0 0 (DW_OP_addr: 1) diff --git a/mpers-mx32/struct_stat64.h b/mpers-mx32/struct_stat64.h new file mode 100644 index 000000000..645de64d2 --- /dev/null +++ b/mpers-mx32/struct_stat64.h @@ -0,0 +1,6 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +} ATTRIBUTE_PACKED mx32_struct_stat64; +#define MPERS_mx32_struct_stat64 mx32_struct_stat64 diff --git a/mpers-mx32/struct_statfs.c b/mpers-mx32/struct_statfs.c new file mode 100644 index 000000000..0c0589068 --- /dev/null +++ b/mpers-mx32/struct_statfs.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +typedef struct statfs struct_statfs; +typedef struct statfs64 struct_statfs64; + +struct_statfs mpers_target_var; diff --git a/mpers-mx32/struct_statfs.d1 b/mpers-mx32/struct_statfs.d1 new file mode 100644 index 000000000..685802a60 --- /dev/null +++ b/mpers-mx32/struct_statfs.d1 @@ -0,0 +1,270 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x238 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x25): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x1f6): mpers-mx32/struct_statfs.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x185): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1ea): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1d7): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1c9): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xd2): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x70): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x154): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xb4): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1e1): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xea): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_array_type) + <64> DW_AT_type : <0x2b> + <68> DW_AT_sibling : <0x73> + <2><6c>: Abbrev Number: 5 (DW_TAG_subrange_type) + <6d> DW_AT_type : <0x73> + <71> DW_AT_upper_bound : 1 + <2><72>: Abbrev Number: 0 + <1><73>: Abbrev Number: 2 (DW_TAG_base_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_encoding : 7 (unsigned) + <76> DW_AT_name : (indirect string, offset: 0x1c0): sizetype + <1><7a>: Abbrev Number: 2 (DW_TAG_base_type) + <7b> DW_AT_byte_size : 1 + <7c> DW_AT_encoding : 6 (signed char) + <7d> DW_AT_name : (indirect string, offset: 0x16f): char + <1><81>: Abbrev Number: 6 (DW_TAG_pointer_type) + <82> DW_AT_byte_size : 4 + <83> DW_AT_type : <0x87> + <1><87>: Abbrev Number: 7 (DW_TAG_const_type) + <88> DW_AT_type : <0x7a> + <1><8c>: Abbrev Number: 8 (DW_TAG_structure_type) + <8d> DW_AT_byte_size : 8 + <8e> DW_AT_decl_file : 2 + <8f> DW_AT_decl_line : 78 + <90> DW_AT_sibling : <0xa3> + <2><94>: Abbrev Number: 9 (DW_TAG_member) + <95> DW_AT_name : val + <99> DW_AT_decl_file : 2 + <9a> DW_AT_decl_line : 79 + <9b> DW_AT_type : <0x63> + <9f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x113): __kernel_fsid_t + DW_AT_decl_file : 2 + DW_AT_decl_line : 80 + DW_AT_type : <0x8c> + <1>: Abbrev Number: 11 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x104): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 1 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x101> + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x134): nargs + DW_AT_decl_file : 1 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xaa): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 +
DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x211): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0x10c> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x83): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x81> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><100>: Abbrev Number: 0 + <1><101>: Abbrev Number: 13 (DW_TAG_subroutine_type) + <102> DW_AT_type : <0x2b> + <106> DW_AT_sibling : <0x10c> + <2><10a>: Abbrev Number: 14 (DW_TAG_unspecified_parameters) + <2><10b>: Abbrev Number: 0 + <1><10c>: Abbrev Number: 6 (DW_TAG_pointer_type) + <10d> DW_AT_byte_size : 4 + <10e> DW_AT_type : <0x101> + <1><112>: Abbrev Number: 10 (DW_TAG_typedef) + <113> DW_AT_name : (indirect string, offset: 0x161): struct_sysent + <117> DW_AT_decl_file : 1 + <118> DW_AT_decl_line : 10 + <119> DW_AT_type : <0xae> + <1><11d>: Abbrev Number: 6 (DW_TAG_pointer_type) + <11e> DW_AT_byte_size : 4 + <11f> DW_AT_type : <0x123> + <1><123>: Abbrev Number: 7 (DW_TAG_const_type) + <124> DW_AT_type : <0x112> + <1><128>: Abbrev Number: 2 (DW_TAG_base_type) + <129> DW_AT_byte_size : 1 + <12a> DW_AT_encoding : 2 (boolean) + <12b> DW_AT_name : (indirect string, offset: 0xf): _Bool + <1><12f>: Abbrev Number: 11 (DW_TAG_structure_type) + <130> DW_AT_name : (indirect string, offset: 0xcb): statfs + <134> DW_AT_byte_size : 64 + <135> DW_AT_decl_file : 3 + <136> DW_AT_decl_line : 22 + <137> DW_AT_sibling : <0x1e4> + <2><13b>: Abbrev Number: 12 (DW_TAG_member) + <13c> DW_AT_name : (indirect string, offset: 0x0): f_type + <140> DW_AT_decl_file : 3 + <141> DW_AT_decl_line : 23 + <142> DW_AT_type : <0x55> + <146> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><149>: Abbrev Number: 12 (DW_TAG_member) + <14a> DW_AT_name : (indirect string, offset: 0x15): f_bsize + <14e> DW_AT_decl_file : 3 + <14f> DW_AT_decl_line : 24 + <150> DW_AT_type : <0x55> + <154> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><157>: Abbrev Number: 12 (DW_TAG_member) + <158> DW_AT_name : (indirect string, offset: 0xa1): f_blocks + <15c> DW_AT_decl_file : 3 + <15d> DW_AT_decl_line : 25 + <15e> DW_AT_type : <0x55> + <162> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><165>: Abbrev Number: 12 (DW_TAG_member) + <166> DW_AT_name : (indirect string, offset: 0x10b): f_bfree + <16a> DW_AT_decl_file : 3 + <16b> DW_AT_decl_line : 26 + <16c> DW_AT_type : <0x55> + <170> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><173>: Abbrev Number: 12 (DW_TAG_member) + <174> DW_AT_name : (indirect string, offset: 0x14b): f_bavail + <178> DW_AT_decl_file : 3 + <179> DW_AT_decl_line : 27 + <17a> DW_AT_type : <0x55> + <17e> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><181>: Abbrev Number: 12 (DW_TAG_member) + <182> DW_AT_name : (indirect string, offset: 0x7): f_files + <186> DW_AT_decl_file : 3 + <187> DW_AT_decl_line : 28 + <188> DW_AT_type : <0x55> + <18c> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><18f>: Abbrev Number: 12 (DW_TAG_member) + <190> DW_AT_name : (indirect string, offset: 0xfc): f_ffree + <194> DW_AT_decl_file : 3 + <195> DW_AT_decl_line : 29 + <196> DW_AT_type : <0x55> + <19a> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><19d>: Abbrev Number: 12 (DW_TAG_member) + <19e> DW_AT_name : (indirect string, offset: 0x9a): f_fsid + <1a2> DW_AT_decl_file : 3 + <1a3> DW_AT_decl_line : 30 + <1a4> DW_AT_type : <0xa3> + <1a8> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><1ab>: Abbrev Number: 12 (DW_TAG_member) + <1ac> DW_AT_name : (indirect string, offset: 0xe0): f_namelen + <1b0> DW_AT_decl_file : 3 + <1b1> DW_AT_decl_line : 31 + <1b2> DW_AT_type : <0x55> + <1b6> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><1b9>: Abbrev Number: 12 (DW_TAG_member) + <1ba> DW_AT_name : (indirect string, offset: 0x174): f_frsize + <1be> DW_AT_decl_file : 3 + <1bf> DW_AT_decl_line : 32 + <1c0> DW_AT_type : <0x55> + <1c4> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1c7>: Abbrev Number: 12 (DW_TAG_member) + <1c8> DW_AT_name : (indirect string, offset: 0x1d): f_flags + <1cc> DW_AT_decl_file : 3 + <1cd> DW_AT_decl_line : 33 + <1ce> DW_AT_type : <0x55> + <1d2> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><1d5>: Abbrev Number: 12 (DW_TAG_member) + <1d6> DW_AT_name : (indirect string, offset: 0x17d): f_spare + <1da> DW_AT_decl_file : 3 + <1db> DW_AT_decl_line : 34 + <1dc> DW_AT_type : <0x1e4> + <1e0> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><1e3>: Abbrev Number: 0 + <1><1e4>: Abbrev Number: 4 (DW_TAG_array_type) + <1e5> DW_AT_type : <0x55> + <1e9> DW_AT_sibling : <0x1f4> + <2><1ed>: Abbrev Number: 5 (DW_TAG_subrange_type) + <1ee> DW_AT_type : <0x73> + <1f2> DW_AT_upper_bound : 3 + <2><1f3>: Abbrev Number: 0 + <1><1f4>: Abbrev Number: 10 (DW_TAG_typedef) + <1f5> DW_AT_name : (indirect string, offset: 0x8c): struct_statfs + <1f9> DW_AT_decl_file : 4 + <1fa> DW_AT_decl_line : 33 + <1fb> DW_AT_type : <0x12f> + <1><1ff>: Abbrev Number: 15 (DW_TAG_variable) + <200> DW_AT_name : (indirect string, offset: 0x123): current_wordsize + <204> DW_AT_decl_file : 5 + <205> DW_AT_decl_line : 757 + <207> DW_AT_type : <0x47> + <20b> DW_AT_external : 1 + <20c> DW_AT_declaration : 1 + <1><20d>: Abbrev Number: 15 (DW_TAG_variable) + <20e> DW_AT_name : (indirect string, offset: 0x104): sysent + <212> DW_AT_decl_file : 5 + <213> DW_AT_decl_line : 892 + <215> DW_AT_type : <0x11d> + <219> DW_AT_external : 1 + <21a> DW_AT_declaration : 1 + <1><21b>: Abbrev Number: 15 (DW_TAG_variable) + <21c> DW_AT_name : (indirect string, offset: 0x1b6): nsyscalls + <220> DW_AT_decl_file : 5 + <221> DW_AT_decl_line : 903 + <223> DW_AT_type : <0x47> + <227> DW_AT_external : 1 + <228> DW_AT_declaration : 1 + <1><229>: Abbrev Number: 16 (DW_TAG_variable) + <22a> DW_AT_name : (indirect string, offset: 0x13a): mpers_target_var + <22e> DW_AT_decl_file : 4 + <22f> DW_AT_decl_line : 36 + <230> DW_AT_type : <0x1f4> + <234> DW_AT_external : 1 + <235> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><23b>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_statfs.d2 b/mpers-mx32/struct_statfs.d2 new file mode 100644 index 000000000..a8c4b6836 --- /dev/null +++ b/mpers-mx32/struct_statfs.d2 @@ -0,0 +1,301 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1ea): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1d7): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1c9): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xd2): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x70): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x154): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb4): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1e1): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xea): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x73> +<2><6c> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x73> +DW_AT_upper_bound : 1 +<1><73> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c0): sizetype +<1><7a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x16f): char +<1><81> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x87> +<1><87> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x7a> +<1><8c> +Abbrev Number: 8 (DW_TAG_structure_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 78 +DW_AT_sibling : <0xa3> +<2><94> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : val +DW_AT_decl_file : 2 +DW_AT_decl_line : 79 +DW_AT_type : <0x63> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<1> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x113): __kernel_fsid_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 80 +DW_AT_type : <0x8c> +<1> +Abbrev Number: 11 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x104): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x101> +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x134): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xaa): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x211): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0x10c> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x83): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x81> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><101> +Abbrev Number: 13 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x10c> +<2><10a> +Abbrev Number: 14 (DW_TAG_unspecified_parameters) +<1><10c> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x101> +<1><112> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x161): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0xae> +<1><11d> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x123> +<1><123> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x112> +<1><128> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xf): _Bool +<1><12f> +Abbrev Number: 11 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xcb): statfs +DW_AT_byte_size : 64 +DW_AT_decl_file : 3 +DW_AT_decl_line : 22 +DW_AT_sibling : <0x1e4> +<2><13b> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): f_type +DW_AT_decl_file : 3 +DW_AT_decl_line : 23 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><149> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15): f_bsize +DW_AT_decl_file : 3 +DW_AT_decl_line : 24 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><157> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa1): f_blocks +DW_AT_decl_file : 3 +DW_AT_decl_line : 25 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><165> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10b): f_bfree +DW_AT_decl_file : 3 +DW_AT_decl_line : 26 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><173> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14b): f_bavail +DW_AT_decl_file : 3 +DW_AT_decl_line : 27 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><181> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7): f_files +DW_AT_decl_file : 3 +DW_AT_decl_line : 28 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><18f> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xfc): f_ffree +DW_AT_decl_file : 3 +DW_AT_decl_line : 29 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><19d> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9a): f_fsid +DW_AT_decl_file : 3 +DW_AT_decl_line : 30 +DW_AT_type : <0xa3> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><1ab> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe0): f_namelen +DW_AT_decl_file : 3 +DW_AT_decl_line : 31 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><1b9> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x174): f_frsize +DW_AT_decl_file : 3 +DW_AT_decl_line : 32 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><1c7> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d): f_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 33 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><1d5> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x17d): f_spare +DW_AT_decl_file : 3 +DW_AT_decl_line : 34 +DW_AT_type : <0x1e4> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<1><1e4> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x55> +DW_AT_sibling : <0x1f4> +<2><1ed> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x73> +DW_AT_upper_bound : 3 +<1><1f4> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x8c): struct_statfs +DW_AT_decl_file : 4 +DW_AT_decl_line : 33 +DW_AT_type : <0x12f> +<1><1ff> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x123): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><20d> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x104): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x11d> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><21b> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1b6): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><229> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x13a): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 36 +DW_AT_type : <0x1f4> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_statfs.h b/mpers-mx32/struct_statfs.h new file mode 100644 index 000000000..45f2ddd63 --- /dev/null +++ b/mpers-mx32/struct_statfs.h @@ -0,0 +1,20 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t f_type; +int32_t f_bsize; +int32_t f_blocks; +int32_t f_bfree; +int32_t f_bavail; +int32_t f_files; +int32_t f_ffree; +struct { +int32_t val[2]; +} ATTRIBUTE_PACKED f_fsid; +int32_t f_namelen; +int32_t f_frsize; +int32_t f_flags; +int32_t f_spare[4]; +} ATTRIBUTE_PACKED mx32_struct_statfs; +#define MPERS_mx32_struct_statfs mx32_struct_statfs diff --git a/mpers-mx32/struct_statfs64.c b/mpers-mx32/struct_statfs64.c new file mode 100644 index 000000000..2b287cbb5 --- /dev/null +++ b/mpers-mx32/struct_statfs64.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +typedef struct statfs struct_statfs; +typedef struct statfs64 struct_statfs64; + +struct_statfs64 mpers_target_var; diff --git a/mpers-mx32/struct_statfs64.d1 b/mpers-mx32/struct_statfs64.d1 new file mode 100644 index 000000000..b593c98d1 --- /dev/null +++ b/mpers-mx32/struct_statfs64.d1 @@ -0,0 +1,275 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x243 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x25): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x1eb): mpers-mx32/struct_statfs64.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x179): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x211): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1e1): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1c3): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xbd): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x70): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x148): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xa6): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x208): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xd5): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_array_type) + <64> DW_AT_type : <0x2b> + <68> DW_AT_sibling : <0x73> + <2><6c>: Abbrev Number: 5 (DW_TAG_subrange_type) + <6d> DW_AT_type : <0x73> + <71> DW_AT_upper_bound : 1 + <2><72>: Abbrev Number: 0 + <1><73>: Abbrev Number: 2 (DW_TAG_base_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_encoding : 7 (unsigned) + <76> DW_AT_name : (indirect string, offset: 0x1ba): sizetype + <1><7a>: Abbrev Number: 2 (DW_TAG_base_type) + <7b> DW_AT_byte_size : 1 + <7c> DW_AT_encoding : 6 (signed char) + <7d> DW_AT_name : (indirect string, offset: 0x163): char + <1><81>: Abbrev Number: 6 (DW_TAG_pointer_type) + <82> DW_AT_byte_size : 4 + <83> DW_AT_type : <0x87> + <1><87>: Abbrev Number: 7 (DW_TAG_const_type) + <88> DW_AT_type : <0x7a> + <1><8c>: Abbrev Number: 8 (DW_TAG_structure_type) + <8d> DW_AT_byte_size : 8 + <8e> DW_AT_decl_file : 2 + <8f> DW_AT_decl_line : 78 + <90> DW_AT_sibling : <0xa3> + <2><94>: Abbrev Number: 9 (DW_TAG_member) + <95> DW_AT_name : val + <99> DW_AT_decl_file : 2 + <9a> DW_AT_decl_line : 79 + <9b> DW_AT_type : <0x63> + <9f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1d1): __kernel_fsid_t + DW_AT_decl_file : 2 + DW_AT_decl_line : 80 + DW_AT_type : <0x8c> + <1>: Abbrev Number: 11 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xef): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 1 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x101> + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x128): nargs + DW_AT_decl_file : 1 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x9c): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 +
DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x21d): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0x10c> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 12 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x83): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x81> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><100>: Abbrev Number: 0 + <1><101>: Abbrev Number: 13 (DW_TAG_subroutine_type) + <102> DW_AT_type : <0x2b> + <106> DW_AT_sibling : <0x10c> + <2><10a>: Abbrev Number: 14 (DW_TAG_unspecified_parameters) + <2><10b>: Abbrev Number: 0 + <1><10c>: Abbrev Number: 6 (DW_TAG_pointer_type) + <10d> DW_AT_byte_size : 4 + <10e> DW_AT_type : <0x101> + <1><112>: Abbrev Number: 10 (DW_TAG_typedef) + <113> DW_AT_name : (indirect string, offset: 0x155): struct_sysent + <117> DW_AT_decl_file : 1 + <118> DW_AT_decl_line : 10 + <119> DW_AT_type : <0xae> + <1><11d>: Abbrev Number: 6 (DW_TAG_pointer_type) + <11e> DW_AT_byte_size : 4 + <11f> DW_AT_type : <0x123> + <1><123>: Abbrev Number: 7 (DW_TAG_const_type) + <124> DW_AT_type : <0x112> + <1><128>: Abbrev Number: 2 (DW_TAG_base_type) + <129> DW_AT_byte_size : 1 + <12a> DW_AT_encoding : 2 (boolean) + <12b> DW_AT_name : (indirect string, offset: 0xf): _Bool + <1><12f>: Abbrev Number: 10 (DW_TAG_typedef) + <130> DW_AT_name : (indirect string, offset: 0x1b4): __u64 + <134> DW_AT_decl_file : 3 + <135> DW_AT_decl_line : 30 + <136> DW_AT_type : <0x4e> + <1><13a>: Abbrev Number: 4 (DW_TAG_array_type) + <13b> DW_AT_type : <0x55> + <13f> DW_AT_sibling : <0x14a> + <2><143>: Abbrev Number: 5 (DW_TAG_subrange_type) + <144> DW_AT_type : <0x73> + <148> DW_AT_upper_bound : 3 + <2><149>: Abbrev Number: 0 + <1><14a>: Abbrev Number: 11 (DW_TAG_structure_type) + <14b> DW_AT_name : (indirect string, offset: 0xf6): statfs64 + <14f> DW_AT_byte_size : 88 + <150> DW_AT_decl_file : 4 + <151> DW_AT_decl_line : 45 + <152> DW_AT_sibling : <0x1ff> + <2><156>: Abbrev Number: 12 (DW_TAG_member) + <157> DW_AT_name : (indirect string, offset: 0x0): f_type + <15b> DW_AT_decl_file : 4 + <15c> DW_AT_decl_line : 46 + <15d> DW_AT_type : <0x55> + <161> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><164>: Abbrev Number: 12 (DW_TAG_member) + <165> DW_AT_name : (indirect string, offset: 0x15): f_bsize + <169> DW_AT_decl_file : 4 + <16a> DW_AT_decl_line : 47 + <16b> DW_AT_type : <0x55> + <16f> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><172>: Abbrev Number: 12 (DW_TAG_member) + <173> DW_AT_name : (indirect string, offset: 0x93): f_blocks + <177> DW_AT_decl_file : 4 + <178> DW_AT_decl_line : 48 + <179> DW_AT_type : <0x12f> + <17d> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><180>: Abbrev Number: 12 (DW_TAG_member) + <181> DW_AT_name : (indirect string, offset: 0xff): f_bfree + <185> DW_AT_decl_file : 4 + <186> DW_AT_decl_line : 49 + <187> DW_AT_type : <0x12f> + <18b> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><18e>: Abbrev Number: 12 (DW_TAG_member) + <18f> DW_AT_name : (indirect string, offset: 0x13f): f_bavail + <193> DW_AT_decl_file : 4 + <194> DW_AT_decl_line : 50 + <195> DW_AT_type : <0x12f> + <199> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><19c>: Abbrev Number: 12 (DW_TAG_member) + <19d> DW_AT_name : (indirect string, offset: 0x7): f_files + <1a1> DW_AT_decl_file : 4 + <1a2> DW_AT_decl_line : 51 + <1a3> DW_AT_type : <0x12f> + <1a7> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><1aa>: Abbrev Number: 12 (DW_TAG_member) + <1ab> DW_AT_name : (indirect string, offset: 0xe7): f_ffree + <1af> DW_AT_decl_file : 4 + <1b0> DW_AT_decl_line : 52 + <1b1> DW_AT_type : <0x12f> + <1b5> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1b8>: Abbrev Number: 12 (DW_TAG_member) + <1b9> DW_AT_name : (indirect string, offset: 0x8c): f_fsid + <1bd> DW_AT_decl_file : 4 + <1be> DW_AT_decl_line : 53 + <1bf> DW_AT_type : <0xa3> + <1c3> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><1c6>: Abbrev Number: 12 (DW_TAG_member) + <1c7> DW_AT_name : (indirect string, offset: 0xcb): f_namelen + <1cb> DW_AT_decl_file : 4 + <1cc> DW_AT_decl_line : 54 + <1cd> DW_AT_type : <0x55> + <1d1> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><1d4>: Abbrev Number: 12 (DW_TAG_member) + <1d5> DW_AT_name : (indirect string, offset: 0x168): f_frsize + <1d9> DW_AT_decl_file : 4 + <1da> DW_AT_decl_line : 55 + <1db> DW_AT_type : <0x55> + <1df> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><1e2>: Abbrev Number: 12 (DW_TAG_member) + <1e3> DW_AT_name : (indirect string, offset: 0x1d): f_flags + <1e7> DW_AT_decl_file : 4 + <1e8> DW_AT_decl_line : 56 + <1e9> DW_AT_type : <0x55> + <1ed> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><1f0>: Abbrev Number: 12 (DW_TAG_member) + <1f1> DW_AT_name : (indirect string, offset: 0x171): f_spare + <1f5> DW_AT_decl_file : 4 + <1f6> DW_AT_decl_line : 57 + <1f7> DW_AT_type : <0x13a> + <1fb> DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) + <2><1fe>: Abbrev Number: 0 + <1><1ff>: Abbrev Number: 10 (DW_TAG_typedef) + <200> DW_AT_name : (indirect string, offset: 0x107): struct_statfs64 + <204> DW_AT_decl_file : 5 + <205> DW_AT_decl_line : 34 + <206> DW_AT_type : <0x14a> + <1><20a>: Abbrev Number: 15 (DW_TAG_variable) + <20b> DW_AT_name : (indirect string, offset: 0x117): current_wordsize + <20f> DW_AT_decl_file : 6 + <210> DW_AT_decl_line : 757 + <212> DW_AT_type : <0x47> + <216> DW_AT_external : 1 + <217> DW_AT_declaration : 1 + <1><218>: Abbrev Number: 15 (DW_TAG_variable) + <219> DW_AT_name : (indirect string, offset: 0xef): sysent + <21d> DW_AT_decl_file : 6 + <21e> DW_AT_decl_line : 892 + <220> DW_AT_type : <0x11d> + <224> DW_AT_external : 1 + <225> DW_AT_declaration : 1 + <1><226>: Abbrev Number: 15 (DW_TAG_variable) + <227> DW_AT_name : (indirect string, offset: 0x1aa): nsyscalls + <22b> DW_AT_decl_file : 6 + <22c> DW_AT_decl_line : 903 + <22e> DW_AT_type : <0x47> + <232> DW_AT_external : 1 + <233> DW_AT_declaration : 1 + <1><234>: Abbrev Number: 16 (DW_TAG_variable) + <235> DW_AT_name : (indirect string, offset: 0x12e): mpers_target_var + <239> DW_AT_decl_file : 5 + <23a> DW_AT_decl_line : 36 + <23b> DW_AT_type : <0x1ff> + <23f> DW_AT_external : 1 + <240> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><246>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_statfs64.d2 b/mpers-mx32/struct_statfs64.d2 new file mode 100644 index 000000000..7ceffe048 --- /dev/null +++ b/mpers-mx32/struct_statfs64.d2 @@ -0,0 +1,307 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x211): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1e1): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1c3): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xbd): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x70): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x148): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xa6): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x208): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xd5): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x73> +<2><6c> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x73> +DW_AT_upper_bound : 1 +<1><73> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1ba): sizetype +<1><7a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x163): char +<1><81> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x87> +<1><87> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x7a> +<1><8c> +Abbrev Number: 8 (DW_TAG_structure_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 78 +DW_AT_sibling : <0xa3> +<2><94> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : val +DW_AT_decl_file : 2 +DW_AT_decl_line : 79 +DW_AT_type : <0x63> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<1> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1d1): __kernel_fsid_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 80 +DW_AT_type : <0x8c> +<1> +Abbrev Number: 11 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xef): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x101> +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x128): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9c): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21d): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0x10c> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x83): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x81> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><101> +Abbrev Number: 13 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x10c> +<2><10a> +Abbrev Number: 14 (DW_TAG_unspecified_parameters) +<1><10c> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x101> +<1><112> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x155): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0xae> +<1><11d> +Abbrev Number: 6 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x123> +<1><123> +Abbrev Number: 7 (DW_TAG_const_type) +DW_AT_type : <0x112> +<1><128> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xf): _Bool +<1><12f> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b4): __u64 +DW_AT_decl_file : 3 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><13a> +Abbrev Number: 4 (DW_TAG_array_type) +DW_AT_type : <0x55> +DW_AT_sibling : <0x14a> +<2><143> +Abbrev Number: 5 (DW_TAG_subrange_type) +DW_AT_type : <0x73> +DW_AT_upper_bound : 3 +<1><14a> +Abbrev Number: 11 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xf6): statfs64 +DW_AT_byte_size : 88 +DW_AT_decl_file : 4 +DW_AT_decl_line : 45 +DW_AT_sibling : <0x1ff> +<2><156> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): f_type +DW_AT_decl_file : 4 +DW_AT_decl_line : 46 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><164> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15): f_bsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><172> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x93): f_blocks +DW_AT_decl_file : 4 +DW_AT_decl_line : 48 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><180> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xff): f_bfree +DW_AT_decl_file : 4 +DW_AT_decl_line : 49 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><18e> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x13f): f_bavail +DW_AT_decl_file : 4 +DW_AT_decl_line : 50 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><19c> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7): f_files +DW_AT_decl_file : 4 +DW_AT_decl_line : 51 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><1aa> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe7): f_ffree +DW_AT_decl_file : 4 +DW_AT_decl_line : 52 +DW_AT_type : <0x12f> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><1b8> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8c): f_fsid +DW_AT_decl_file : 4 +DW_AT_decl_line : 53 +DW_AT_type : <0xa3> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><1c6> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xcb): f_namelen +DW_AT_decl_file : 4 +DW_AT_decl_line : 54 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><1d4> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x168): f_frsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 55 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<2><1e2> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d): f_flags +DW_AT_decl_file : 4 +DW_AT_decl_line : 56 +DW_AT_type : <0x55> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><1f0> +Abbrev Number: 12 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x171): f_spare +DW_AT_decl_file : 4 +DW_AT_decl_line : 57 +DW_AT_type : <0x13a> +DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) +<1><1ff> +Abbrev Number: 10 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x107): struct_statfs64 +DW_AT_decl_file : 5 +DW_AT_decl_line : 34 +DW_AT_type : <0x14a> +<1><20a> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x117): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><218> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xef): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x11d> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><226> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1aa): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><234> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x12e): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 36 +DW_AT_type : <0x1ff> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_statfs64.h b/mpers-mx32/struct_statfs64.h new file mode 100644 index 000000000..338d4f4d5 --- /dev/null +++ b/mpers-mx32/struct_statfs64.h @@ -0,0 +1,21 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t f_type; +int32_t f_bsize; +uint64_t f_blocks; +uint64_t f_bfree; +uint64_t f_bavail; +uint64_t f_files; +uint64_t f_ffree; +struct { +int32_t val[2]; +} ATTRIBUTE_PACKED f_fsid; +int32_t f_namelen; +int32_t f_frsize; +int32_t f_flags; +int32_t f_spare[4]; +unsigned char mpers_end_filler_1[4]; +} ATTRIBUTE_PACKED mx32_struct_statfs64; +#define MPERS_mx32_struct_statfs64 mx32_struct_statfs64 diff --git a/mpers-mx32/struct_timex.c b/mpers-mx32/struct_timex.c new file mode 100644 index 000000000..d66cba460 --- /dev/null +++ b/mpers-mx32/struct_timex.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 2006-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +typedef struct timex struct_timex; + +struct_timex mpers_target_var; diff --git a/mpers-mx32/struct_timex.d1 b/mpers-mx32/struct_timex.d1 new file mode 100644 index 000000000..e32023a54 --- /dev/null +++ b/mpers-mx32/struct_timex.d1 @@ -0,0 +1,326 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x2c0 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x37): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x20a): mpers-mx32/struct_timex.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x195): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x24b): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x22b): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1e8): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xe4): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x82): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x15d): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xbf): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x23c): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xf2): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x14c): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x1d8): sizetype + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x11b): __time_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 139 + <7c> DW_AT_type : <0x63> + <1><80>: Abbrev Number: 4 (DW_TAG_typedef) + <81> DW_AT_name : (indirect string, offset: 0x17f): __suseconds_t + <85> DW_AT_decl_file : 1 + <86> DW_AT_decl_line : 141 + <87> DW_AT_type : <0x63> + <1><8b>: Abbrev Number: 4 (DW_TAG_typedef) + <8c> DW_AT_name : (indirect string, offset: 0x260): __syscall_slong_t + <90> DW_AT_decl_file : 1 + <91> DW_AT_decl_line : 175 + <92> DW_AT_type : <0x63> + <1><96>: Abbrev Number: 2 (DW_TAG_base_type) + <97> DW_AT_byte_size : 1 + <98> DW_AT_encoding : 6 (signed char) + <99> DW_AT_name : (indirect string, offset: 0x17a): char + <1><9d>: Abbrev Number: 5 (DW_TAG_structure_type) + <9e> DW_AT_name : (indirect string, offset: 0x155): timeval + DW_AT_byte_size : 16 + DW_AT_decl_file : 2 + DW_AT_decl_line : 30 + DW_AT_sibling : <0xc6> + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1e1): tv_sec + DW_AT_decl_file : 2 + DW_AT_decl_line : 32 + DW_AT_type : <0x75> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x18d): tv_usec + DW_AT_decl_file : 2 + DW_AT_decl_line : 33 + DW_AT_type : <0x80> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcc> + <1>: Abbrev Number: 8 (DW_TAG_const_type) + DW_AT_type : <0x96> + <1>: Abbrev Number: 5 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x104): timex + DW_AT_byte_size : 208 + DW_AT_decl_file : 3 + DW_AT_decl_line : 25 + DW_AT_sibling : <0x1fb> + <2>
: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x245): modes + DW_AT_decl_file : 3 + DW_AT_decl_line : 27 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x224): offset + DW_AT_decl_file : 3 + DW_AT_decl_line : 28 + DW_AT_type : <0x8b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x140): freq + DW_AT_decl_file : 3 + DW_AT_decl_line : 29 + <100> DW_AT_type : <0x8b> + <104> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><107>: Abbrev Number: 6 (DW_TAG_member) + <108> DW_AT_name : (indirect string, offset: 0xac): maxerror + <10c> DW_AT_decl_file : 3 + <10d> DW_AT_decl_line : 30 + <10e> DW_AT_type : <0x8b> + <112> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><115>: Abbrev Number: 6 (DW_TAG_member) + <116> DW_AT_name : (indirect string, offset: 0x13): esterror + <11a> DW_AT_decl_file : 3 + <11b> DW_AT_decl_line : 31 + <11c> DW_AT_type : <0x8b> + <120> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><123>: Abbrev Number: 6 (DW_TAG_member) + <124> DW_AT_name : (indirect string, offset: 0x9c): status + <128> DW_AT_decl_file : 3 + <129> DW_AT_decl_line : 32 + <12a> DW_AT_type : <0x2b> + <12e> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><131>: Abbrev Number: 6 (DW_TAG_member) + <132> DW_AT_name : (indirect string, offset: 0x16a): constant + <136> DW_AT_decl_file : 3 + <137> DW_AT_decl_line : 33 + <138> DW_AT_type : <0x8b> + <13c> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><13f>: Abbrev Number: 6 (DW_TAG_member) + <140> DW_AT_name : (indirect string, offset: 0x1f6): precision + <144> DW_AT_decl_file : 3 + <145> DW_AT_decl_line : 34 + <146> DW_AT_type : <0x8b> + <14a> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><14d>: Abbrev Number: 6 (DW_TAG_member) + <14e> DW_AT_name : (indirect string, offset: 0x200): tolerance + <152> DW_AT_decl_file : 3 + <153> DW_AT_decl_line : 35 + <154> DW_AT_type : <0x8b> + <158> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><15b>: Abbrev Number: 6 (DW_TAG_member) + <15c> DW_AT_name : (indirect string, offset: 0x272): time + <160> DW_AT_decl_file : 3 + <161> DW_AT_decl_line : 36 + <162> DW_AT_type : <0x9d> + <166> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><169>: Abbrev Number: 6 (DW_TAG_member) + <16a> DW_AT_name : (indirect string, offset: 0x124): tick + <16e> DW_AT_decl_file : 3 + <16f> DW_AT_decl_line : 37 + <170> DW_AT_type : <0x8b> + <174> DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) + <2><177>: Abbrev Number: 6 (DW_TAG_member) + <178> DW_AT_name : (indirect string, offset: 0x1d0): ppsfreq + <17c> DW_AT_decl_file : 3 + <17d> DW_AT_decl_line : 38 + <17e> DW_AT_type : <0x8b> + <182> DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) + <2><185>: Abbrev Number: 6 (DW_TAG_member) + <186> DW_AT_name : (indirect string, offset: 0xdd): jitter + <18a> DW_AT_decl_file : 3 + <18b> DW_AT_decl_line : 39 + <18c> DW_AT_type : <0x8b> + <190> DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) + <2><193>: Abbrev Number: 6 (DW_TAG_member) + <194> DW_AT_name : (indirect string, offset: 0xd): shift + <198> DW_AT_decl_file : 3 + <199> DW_AT_decl_line : 40 + <19a> DW_AT_type : <0x2b> + <19e> DW_AT_data_member_location: 2 byte block: 23 70 (DW_OP_plus_uconst: 112) + <2><1a1>: Abbrev Number: 6 (DW_TAG_member) + <1a2> DW_AT_name : (indirect string, offset: 0x173): stabil + <1a6> DW_AT_decl_file : 3 + <1a7> DW_AT_decl_line : 41 + <1a8> DW_AT_type : <0x8b> + <1ac> DW_AT_data_member_location: 2 byte block: 23 78 (DW_OP_plus_uconst: 120) + <2><1af>: Abbrev Number: 6 (DW_TAG_member) + <1b0> DW_AT_name : (indirect string, offset: 0x95): jitcnt + <1b4> DW_AT_decl_file : 3 + <1b5> DW_AT_decl_line : 42 + <1b6> DW_AT_type : <0x8b> + <1ba> DW_AT_data_member_location: 3 byte block: 23 80 1 (DW_OP_plus_uconst: 128) + <2><1be>: Abbrev Number: 6 (DW_TAG_member) + <1bf> DW_AT_name : (indirect string, offset: 0xd6): calcnt + <1c3> DW_AT_decl_file : 3 + <1c4> DW_AT_decl_line : 43 + <1c5> DW_AT_type : <0x8b> + <1c9> DW_AT_data_member_location: 3 byte block: 23 88 1 (DW_OP_plus_uconst: 136) + <2><1cd>: Abbrev Number: 6 (DW_TAG_member) + <1ce> DW_AT_name : (indirect string, offset: 0x22): errcnt + <1d2> DW_AT_decl_file : 3 + <1d3> DW_AT_decl_line : 44 + <1d4> DW_AT_type : <0x8b> + <1d8> DW_AT_data_member_location: 3 byte block: 23 90 1 (DW_OP_plus_uconst: 144) + <2><1dc>: Abbrev Number: 6 (DW_TAG_member) + <1dd> DW_AT_name : (indirect string, offset: 0x235): stbcnt + <1e1> DW_AT_decl_file : 3 + <1e2> DW_AT_decl_line : 45 + <1e3> DW_AT_type : <0x8b> + <1e7> DW_AT_data_member_location: 3 byte block: 23 98 1 (DW_OP_plus_uconst: 152) + <2><1eb>: Abbrev Number: 9 (DW_TAG_member) + <1ec> DW_AT_name : tai + <1f0> DW_AT_decl_file : 3 + <1f1> DW_AT_decl_line : 47 + <1f2> DW_AT_type : <0x2b> + <1f6> DW_AT_data_member_location: 3 byte block: 23 a0 1 (DW_OP_plus_uconst: 160) + <2><1fa>: Abbrev Number: 0 + <1><1fb>: Abbrev Number: 5 (DW_TAG_structure_type) + <1fc> DW_AT_name : (indirect string, offset: 0x145): sysent + <200> DW_AT_byte_size : 20 + <201> DW_AT_decl_file : 4 + <202> DW_AT_decl_line : 4 + <203> DW_AT_sibling : <0x24e> + <2><207>: Abbrev Number: 6 (DW_TAG_member) + <208> DW_AT_name : (indirect string, offset: 0x129): nargs + <20c> DW_AT_decl_file : 4 + <20d> DW_AT_decl_line : 5 + <20e> DW_AT_type : <0x47> + <212> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><215>: Abbrev Number: 6 (DW_TAG_member) + <216> DW_AT_name : (indirect string, offset: 0xb5): sys_flags + <21a> DW_AT_decl_file : 4 + <21b> DW_AT_decl_line : 6 + <21c> DW_AT_type : <0x2b> + <220> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><223>: Abbrev Number: 9 (DW_TAG_member) + <224> DW_AT_name : sen + <228> DW_AT_decl_file : 4 + <229> DW_AT_decl_line : 7 + <22a> DW_AT_type : <0x2b> + <22e> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><231>: Abbrev Number: 6 (DW_TAG_member) + <232> DW_AT_name : (indirect string, offset: 0x257): sys_func + <236> DW_AT_decl_file : 4 + <237> DW_AT_decl_line : 8 + <238> DW_AT_type : <0x259> + <23c> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><23f>: Abbrev Number: 6 (DW_TAG_member) + <240> DW_AT_name : (indirect string, offset: 0xa3): sys_name + <244> DW_AT_decl_file : 4 + <245> DW_AT_decl_line : 9 + <246> DW_AT_type : <0xc6> + <24a> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><24d>: Abbrev Number: 0 + <1><24e>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <24f> DW_AT_type : <0x2b> + <253> DW_AT_sibling : <0x259> + <2><257>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><258>: Abbrev Number: 0 + <1><259>: Abbrev Number: 7 (DW_TAG_pointer_type) + <25a> DW_AT_byte_size : 4 + <25b> DW_AT_type : <0x24e> + <1><25f>: Abbrev Number: 4 (DW_TAG_typedef) + <260> DW_AT_name : (indirect string, offset: 0x29): struct_sysent + <264> DW_AT_decl_file : 4 + <265> DW_AT_decl_line : 10 + <266> DW_AT_type : <0x1fb> + <1><26a>: Abbrev Number: 7 (DW_TAG_pointer_type) + <26b> DW_AT_byte_size : 4 + <26c> DW_AT_type : <0x270> + <1><270>: Abbrev Number: 8 (DW_TAG_const_type) + <271> DW_AT_type : <0x25f> + <1><275>: Abbrev Number: 2 (DW_TAG_base_type) + <276> DW_AT_byte_size : 1 + <277> DW_AT_encoding : 2 (boolean) + <278> DW_AT_name : (indirect string, offset: 0x1c): _Bool + <1><27c>: Abbrev Number: 4 (DW_TAG_typedef) + <27d> DW_AT_name : (indirect string, offset: 0x0): struct_timex + <281> DW_AT_decl_file : 5 + <282> DW_AT_decl_line : 35 + <283> DW_AT_type : <0xd1> + <1><287>: Abbrev Number: 12 (DW_TAG_variable) + <288> DW_AT_name : (indirect string, offset: 0x10a): current_wordsize + <28c> DW_AT_decl_file : 6 + <28d> DW_AT_decl_line : 757 + <28f> DW_AT_type : <0x47> + <293> DW_AT_external : 1 + <294> DW_AT_declaration : 1 + <1><295>: Abbrev Number: 12 (DW_TAG_variable) + <296> DW_AT_name : (indirect string, offset: 0x145): sysent + <29a> DW_AT_decl_file : 6 + <29b> DW_AT_decl_line : 892 + <29d> DW_AT_type : <0x26a> + <2a1> DW_AT_external : 1 + <2a2> DW_AT_declaration : 1 + <1><2a3>: Abbrev Number: 12 (DW_TAG_variable) + <2a4> DW_AT_name : (indirect string, offset: 0x1c6): nsyscalls + <2a8> DW_AT_decl_file : 6 + <2a9> DW_AT_decl_line : 903 + <2ab> DW_AT_type : <0x47> + <2af> DW_AT_external : 1 + <2b0> DW_AT_declaration : 1 + <1><2b1>: Abbrev Number: 13 (DW_TAG_variable) + <2b2> DW_AT_name : (indirect string, offset: 0x12f): mpers_target_var + <2b6> DW_AT_decl_file : 5 + <2b7> DW_AT_decl_line : 37 + <2b8> DW_AT_type : <0x27c> + <2bc> DW_AT_external : 1 + <2bd> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><2c3>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_timex.d2 b/mpers-mx32/struct_timex.d2 new file mode 100644 index 000000000..94fb80167 --- /dev/null +++ b/mpers-mx32/struct_timex.d2 @@ -0,0 +1,367 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x24b): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x22b): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1e8): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xe4): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x82): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x15d): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xbf): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x23c): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xf2): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x14c): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1d8): sizetype +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11b): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x63> +<1><80> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x17f): __suseconds_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 141 +DW_AT_type : <0x63> +<1><8b> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x260): __syscall_slong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 175 +DW_AT_type : <0x63> +<1><96> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x17a): char +<1><9d> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x155): timeval +DW_AT_byte_size : 16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_sibling : <0xc6> +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e1): tv_sec +DW_AT_decl_file : 2 +DW_AT_decl_line : 32 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18d): tv_usec +DW_AT_decl_file : 2 +DW_AT_decl_line : 33 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcc> +<1> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x96> +<1> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x104): timex +DW_AT_byte_size : 208 +DW_AT_decl_file : 3 +DW_AT_decl_line : 25 +DW_AT_sibling : <0x1fb> +<2>
+Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x245): modes +DW_AT_decl_file : 3 +DW_AT_decl_line : 27 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x224): offset +DW_AT_decl_file : 3 +DW_AT_decl_line : 28 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x140): freq +DW_AT_decl_file : 3 +DW_AT_decl_line : 29 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><107> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xac): maxerror +DW_AT_decl_file : 3 +DW_AT_decl_line : 30 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><115> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x13): esterror +DW_AT_decl_file : 3 +DW_AT_decl_line : 31 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><123> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9c): status +DW_AT_decl_file : 3 +DW_AT_decl_line : 32 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><131> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16a): constant +DW_AT_decl_file : 3 +DW_AT_decl_line : 33 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><13f> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f6): precision +DW_AT_decl_file : 3 +DW_AT_decl_line : 34 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><14d> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x200): tolerance +DW_AT_decl_file : 3 +DW_AT_decl_line : 35 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><15b> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x272): time +DW_AT_decl_file : 3 +DW_AT_decl_line : 36 +DW_AT_type : <0x9d> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><169> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x124): tick +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) +<2><177> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d0): ppsfreq +DW_AT_decl_file : 3 +DW_AT_decl_line : 38 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) +<2><185> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xdd): jitter +DW_AT_decl_file : 3 +DW_AT_decl_line : 39 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) +<2><193> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd): shift +DW_AT_decl_file : 3 +DW_AT_decl_line : 40 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 70 (DW_OP_plus_uconst: 112) +<2><1a1> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x173): stabil +DW_AT_decl_file : 3 +DW_AT_decl_line : 41 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 2 byte block: 23 78 (DW_OP_plus_uconst: 120) +<2><1af> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x95): jitcnt +DW_AT_decl_file : 3 +DW_AT_decl_line : 42 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 3 byte block: 23 80 1 (DW_OP_plus_uconst: 128) +<2><1be> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd6): calcnt +DW_AT_decl_file : 3 +DW_AT_decl_line : 43 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 3 byte block: 23 88 1 (DW_OP_plus_uconst: 136) +<2><1cd> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22): errcnt +DW_AT_decl_file : 3 +DW_AT_decl_line : 44 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 3 byte block: 23 90 1 (DW_OP_plus_uconst: 144) +<2><1dc> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x235): stbcnt +DW_AT_decl_file : 3 +DW_AT_decl_line : 45 +DW_AT_type : <0x8b> +DW_AT_data_member_location: 3 byte block: 23 98 1 (DW_OP_plus_uconst: 152) +<2><1eb> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : tai +DW_AT_decl_file : 3 +DW_AT_decl_line : 47 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 3 byte block: 23 a0 1 (DW_OP_plus_uconst: 160) +<1><1fb> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x145): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 4 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x24e> +<2><207> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x129): nargs +DW_AT_decl_file : 4 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><215> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb5): sys_flags +DW_AT_decl_file : 4 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><223> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 4 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><231> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x257): sys_func +DW_AT_decl_file : 4 +DW_AT_decl_line : 8 +DW_AT_type : <0x259> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><23f> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa3): sys_name +DW_AT_decl_file : 4 +DW_AT_decl_line : 9 +DW_AT_type : <0xc6> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><24e> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x259> +<2><257> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><259> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x24e> +<1><25f> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x29): struct_sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 10 +DW_AT_type : <0x1fb> +<1><26a> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x270> +<1><270> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x25f> +<1><275> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x1c): _Bool +<1><27c> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): struct_timex +DW_AT_decl_file : 5 +DW_AT_decl_line : 35 +DW_AT_type : <0xd1> +<1><287> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x10a): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><295> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x145): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x26a> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2a3> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1c6): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><2b1> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x12f): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 37 +DW_AT_type : <0x27c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_timex.h b/mpers-mx32/struct_timex.h new file mode 100644 index 000000000..c62029654 --- /dev/null +++ b/mpers-mx32/struct_timex.h @@ -0,0 +1,33 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t modes; +unsigned char mpers_filler_1[4]; +int64_t offset; +int64_t freq; +int64_t maxerror; +int64_t esterror; +int32_t status; +unsigned char mpers_filler_2[4]; +int64_t constant; +int64_t precision; +int64_t tolerance; +struct { +int64_t tv_sec; +int64_t tv_usec; +} ATTRIBUTE_PACKED time; +int64_t tick; +int64_t ppsfreq; +int64_t jitter; +int32_t shift; +unsigned char mpers_filler_3[4]; +int64_t stabil; +int64_t jitcnt; +int64_t calcnt; +int64_t errcnt; +int64_t stbcnt; +int32_t tai; +unsigned char mpers_end_filler_4[44]; +} ATTRIBUTE_PACKED mx32_struct_timex; +#define MPERS_mx32_struct_timex mx32_struct_timex diff --git a/mpers-mx32/struct_ustat.c b/mpers-mx32/struct_ustat.c new file mode 100644 index 000000000..af87064de --- /dev/null +++ b/mpers-mx32/struct_ustat.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2017 JingPiao Chen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#ifdef HAVE_USTAT_H +# include +typedef struct ustat struct_ustat; +#endif /* HAVE_USTAT_H */ + +struct_ustat mpers_target_var; diff --git a/mpers-mx32/struct_ustat.d1 b/mpers-mx32/struct_ustat.d1 new file mode 100644 index 000000000..26d6f6c4d --- /dev/null +++ b/mpers-mx32/struct_ustat.d1 @@ -0,0 +1,213 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1b7 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x2e): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x6): mpers-mx32/struct_ustat.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x147): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1b4): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1a1): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x18b): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xa8): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x79): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x112): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x1cb): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1ab): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xc9): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x1c0): __u_quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 56 + <6a> DW_AT_type : <0x4e> + <1><6e>: Abbrev Number: 4 (DW_TAG_typedef) + <6f> DW_AT_name : (indirect string, offset: 0x20): __ino_t + <73> DW_AT_decl_file : 1 + <74> DW_AT_decl_line : 127 + <75> DW_AT_type : <0x63> + <1><79>: Abbrev Number: 2 (DW_TAG_base_type) + <7a> DW_AT_byte_size : 4 + <7b> DW_AT_encoding : 7 (unsigned) + <7c> DW_AT_name : (indirect string, offset: 0x182): sizetype + <1><80>: Abbrev Number: 4 (DW_TAG_typedef) + <81> DW_AT_name : (indirect string, offset: 0xbf): __daddr_t + <85> DW_AT_decl_file : 1 + <86> DW_AT_decl_line : 143 + <87> DW_AT_type : <0x2b> + <1><8b>: Abbrev Number: 2 (DW_TAG_base_type) + <8c> DW_AT_byte_size : 1 + <8d> DW_AT_encoding : 6 (signed char) + <8e> DW_AT_name : (indirect string, offset: 0x135): char + <1><92>: Abbrev Number: 5 (DW_TAG_pointer_type) + <93> DW_AT_byte_size : 4 + <94> DW_AT_type : <0x98> + <1><98>: Abbrev Number: 6 (DW_TAG_const_type) + <99> DW_AT_type : <0x8b> + <1><9d>: Abbrev Number: 7 (DW_TAG_structure_type) + <9e> DW_AT_name : (indirect string, offset: 0xdb): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 2 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xfb): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x95): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb6): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0xfb> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x8c): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 + DW_AT_type : <0x92> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xfb> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf0> + <1><101>: Abbrev Number: 4 (DW_TAG_typedef) + <102> DW_AT_name : (indirect string, offset: 0x11f): struct_sysent + <106> DW_AT_decl_file : 2 + <107> DW_AT_decl_line : 10 + <108> DW_AT_type : <0x9d> + <1><10c>: Abbrev Number: 5 (DW_TAG_pointer_type) + <10d> DW_AT_byte_size : 4 + <10e> DW_AT_type : <0x112> + <1><112>: Abbrev Number: 6 (DW_TAG_const_type) + <113> DW_AT_type : <0x101> + <1><117>: Abbrev Number: 2 (DW_TAG_base_type) + <118> DW_AT_byte_size : 1 + <119> DW_AT_encoding : 2 (boolean) + <11a> DW_AT_name : (indirect string, offset: 0x28): _Bool + <1><11e>: Abbrev Number: 7 (DW_TAG_structure_type) + <11f> DW_AT_name : (indirect string, offset: 0x0): ustat + <123> DW_AT_byte_size : 32 + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 24 + <126> DW_AT_sibling : <0x163> + <2><12a>: Abbrev Number: 8 (DW_TAG_member) + <12b> DW_AT_name : (indirect string, offset: 0x199): f_tfree + <12f> DW_AT_decl_file : 3 + <130> DW_AT_decl_line : 26 + <131> DW_AT_type : <0x80> + <135> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><138>: Abbrev Number: 8 (DW_TAG_member) + <139> DW_AT_name : (indirect string, offset: 0x9f): f_tinode + <13d> DW_AT_decl_file : 3 + <13e> DW_AT_decl_line : 27 + <13f> DW_AT_type : <0x6e> + <143> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><146>: Abbrev Number: 8 (DW_TAG_member) + <147> DW_AT_name : (indirect string, offset: 0xe2): f_fname + <14b> DW_AT_decl_file : 3 + <14c> DW_AT_decl_line : 28 + <14d> DW_AT_type : <0x163> + <151> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><154>: Abbrev Number: 8 (DW_TAG_member) + <155> DW_AT_name : (indirect string, offset: 0x12d): f_fpack + <159> DW_AT_decl_file : 3 + <15a> DW_AT_decl_line : 29 + <15b> DW_AT_type : <0x163> + <15f> DW_AT_data_member_location: 2 byte block: 23 16 (DW_OP_plus_uconst: 22) + <2><162>: Abbrev Number: 0 + <1><163>: Abbrev Number: 12 (DW_TAG_array_type) + <164> DW_AT_type : <0x8b> + <168> DW_AT_sibling : <0x173> + <2><16c>: Abbrev Number: 13 (DW_TAG_subrange_type) + <16d> DW_AT_type : <0x79> + <171> DW_AT_upper_bound : 5 + <2><172>: Abbrev Number: 0 + <1><173>: Abbrev Number: 4 (DW_TAG_typedef) + <174> DW_AT_name : (indirect string, offset: 0x13a): struct_ustat + <178> DW_AT_decl_file : 4 + <179> DW_AT_decl_line : 31 + <17a> DW_AT_type : <0x11e> + <1><17e>: Abbrev Number: 14 (DW_TAG_variable) + <17f> DW_AT_name : (indirect string, offset: 0xea): current_wordsize + <183> DW_AT_decl_file : 5 + <184> DW_AT_decl_line : 757 + <186> DW_AT_type : <0x47> + <18a> DW_AT_external : 1 + <18b> DW_AT_declaration : 1 + <1><18c>: Abbrev Number: 14 (DW_TAG_variable) + <18d> DW_AT_name : (indirect string, offset: 0xdb): sysent + <191> DW_AT_decl_file : 5 + <192> DW_AT_decl_line : 892 + <194> DW_AT_type : <0x10c> + <198> DW_AT_external : 1 + <199> DW_AT_declaration : 1 + <1><19a>: Abbrev Number: 14 (DW_TAG_variable) + <19b> DW_AT_name : (indirect string, offset: 0x178): nsyscalls + <19f> DW_AT_decl_file : 5 + <1a0> DW_AT_decl_line : 903 + <1a2> DW_AT_type : <0x47> + <1a6> DW_AT_external : 1 + <1a7> DW_AT_declaration : 1 + <1><1a8>: Abbrev Number: 15 (DW_TAG_variable) + <1a9> DW_AT_name : (indirect string, offset: 0x101): mpers_target_var + <1ad> DW_AT_decl_file : 4 + <1ae> DW_AT_decl_line : 34 + <1af> DW_AT_type : <0x173> + <1b3> DW_AT_external : 1 + <1b4> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><1ba>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_ustat.d2 b/mpers-mx32/struct_ustat.d2 new file mode 100644 index 000000000..af6f99c4b --- /dev/null +++ b/mpers-mx32/struct_ustat.d2 @@ -0,0 +1,236 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1b4): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a1): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x18b): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xa8): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x79): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x112): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1cb): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1ab): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xc9): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1c0): __u_quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 56 +DW_AT_type : <0x4e> +<1><6e> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x20): __ino_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 127 +DW_AT_type : <0x63> +<1><79> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x182): sizetype +<1><80> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xbf): __daddr_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 143 +DW_AT_type : <0x2b> +<1><8b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x135): char +<1><92> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x98> +<1><98> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x8b> +<1><9d> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xdb): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xfb): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x95): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb6): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0xfb> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x8c): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xfb> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf0> +<1><101> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11f): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0x9d> +<1><10c> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x112> +<1><112> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x101> +<1><117> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x28): _Bool +<1><11e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): ustat +DW_AT_byte_size : 32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 24 +DW_AT_sibling : <0x163> +<2><12a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x199): f_tfree +DW_AT_decl_file : 3 +DW_AT_decl_line : 26 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><138> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9f): f_tinode +DW_AT_decl_file : 3 +DW_AT_decl_line : 27 +DW_AT_type : <0x6e> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><146> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe2): f_fname +DW_AT_decl_file : 3 +DW_AT_decl_line : 28 +DW_AT_type : <0x163> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><154> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x12d): f_fpack +DW_AT_decl_file : 3 +DW_AT_decl_line : 29 +DW_AT_type : <0x163> +DW_AT_data_member_location: 2 byte block: 23 16 (DW_OP_plus_uconst: 22) +<1><163> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x8b> +DW_AT_sibling : <0x173> +<2><16c> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x79> +DW_AT_upper_bound : 5 +<1><173> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x13a): struct_ustat +DW_AT_decl_file : 4 +DW_AT_decl_line : 31 +DW_AT_type : <0x11e> +<1><17e> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xea): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><18c> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xdb): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x10c> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><19a> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x178): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1a8> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x101): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 34 +DW_AT_type : <0x173> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_ustat.h b/mpers-mx32/struct_ustat.h new file mode 100644 index 000000000..30e675de1 --- /dev/null +++ b/mpers-mx32/struct_ustat.h @@ -0,0 +1,12 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int32_t f_tfree; +unsigned char mpers_filler_1[4]; +uint64_t f_tinode; +char f_fname[6]; +char f_fpack[6]; +unsigned char mpers_end_filler_2[4]; +} ATTRIBUTE_PACKED mx32_struct_ustat; +#define MPERS_mx32_struct_ustat mx32_struct_ustat diff --git a/mpers-mx32/struct_v4l2_buffer.c b/mpers-mx32/struct_v4l2_buffer.c new file mode 100644 index 000000000..d2d5cf1c6 --- /dev/null +++ b/mpers-mx32/struct_v4l2_buffer.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_buffer mpers_target_var; diff --git a/mpers-mx32/struct_v4l2_buffer.d1 b/mpers-mx32/struct_v4l2_buffer.d1 new file mode 100644 index 000000000..3409b307f --- /dev/null +++ b/mpers-mx32/struct_v4l2_buffer.d1 @@ -0,0 +1,460 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x3f5 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x1f9): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x25b): mpers-mx32/struct_v4l2_buffer.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x2f0): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x141): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x47): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0xb5): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x11a): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x1af): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x161): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xc3): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0xda): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x249): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x11): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x51): sizetype + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x27b): __time_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 139 + <7c> DW_AT_type : <0x63> + <1><80>: Abbrev Number: 4 (DW_TAG_typedef) + <81> DW_AT_name : (indirect string, offset: 0x2d9): __suseconds_t + <85> DW_AT_decl_file : 1 + <86> DW_AT_decl_line : 141 + <87> DW_AT_type : <0x63> + <1><8b>: Abbrev Number: 2 (DW_TAG_base_type) + <8c> DW_AT_byte_size : 1 + <8d> DW_AT_encoding : 6 (signed char) + <8e> DW_AT_name : (indirect string, offset: 0x1d0): char + <1><92>: Abbrev Number: 5 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0x284): timeval + <97> DW_AT_byte_size : 16 + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 30 + <9a> DW_AT_sibling : <0xbb> + <2><9e>: Abbrev Number: 6 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0x40): tv_sec + DW_AT_decl_file : 2 + DW_AT_decl_line : 32 + DW_AT_type : <0x75> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x2ab): tv_usec + DW_AT_decl_file : 2 + DW_AT_decl_line : 33 + DW_AT_type : <0x80> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xc1> + <1>: Abbrev Number: 8 (DW_TAG_const_type) + DW_AT_type : <0x8b> + <1>: Abbrev Number: 5 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0x2cc): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x119> + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x13b): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> +
DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x91): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x24): sys_func + <101> DW_AT_decl_file : 3 + <102> DW_AT_decl_line : 8 + <103> DW_AT_type : <0x124> + <107> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><10a>: Abbrev Number: 6 (DW_TAG_member) + <10b> DW_AT_name : (indirect string, offset: 0x88): sys_name + <10f> DW_AT_decl_file : 3 + <110> DW_AT_decl_line : 9 + <111> DW_AT_type : <0xbb> + <115> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><118>: Abbrev Number: 0 + <1><119>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <11a> DW_AT_type : <0x2b> + <11e> DW_AT_sibling : <0x124> + <2><122>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><123>: Abbrev Number: 0 + <1><124>: Abbrev Number: 7 (DW_TAG_pointer_type) + <125> DW_AT_byte_size : 4 + <126> DW_AT_type : <0x119> + <1><12a>: Abbrev Number: 4 (DW_TAG_typedef) + <12b> DW_AT_name : (indirect string, offset: 0x29d): struct_sysent + <12f> DW_AT_decl_file : 3 + <130> DW_AT_decl_line : 10 + <131> DW_AT_type : <0xc6> + <1><135>: Abbrev Number: 7 (DW_TAG_pointer_type) + <136> DW_AT_byte_size : 4 + <137> DW_AT_type : <0x13b> + <1><13b>: Abbrev Number: 8 (DW_TAG_const_type) + <13c> DW_AT_type : <0x12a> + <1><140>: Abbrev Number: 2 (DW_TAG_base_type) + <141> DW_AT_byte_size : 1 + <142> DW_AT_encoding : 2 (boolean) + <143> DW_AT_name : (indirect string, offset: 0x1df): _Bool + <1><147>: Abbrev Number: 4 (DW_TAG_typedef) + <148> DW_AT_name : (indirect string, offset: 0x244): __u8 + <14c> DW_AT_decl_file : 4 + <14d> DW_AT_decl_line : 20 + <14e> DW_AT_type : <0x39> + <1><152>: Abbrev Number: 4 (DW_TAG_typedef) + <153> DW_AT_name : (indirect string, offset: 0x28c): __s32 + <157> DW_AT_decl_file : 4 + <158> DW_AT_decl_line : 25 + <159> DW_AT_type : <0x2b> + <1><15d>: Abbrev Number: 4 (DW_TAG_typedef) + <15e> DW_AT_name : (indirect string, offset: 0xa1): __u32 + <162> DW_AT_decl_file : 4 + <163> DW_AT_decl_line : 26 + <164> DW_AT_type : <0x47> + <1><168>: Abbrev Number: 12 (DW_TAG_enumeration_type) + <169> DW_AT_name : (indirect string, offset: 0x2bb): v4l2_preemphasis + <16d> DW_AT_byte_size : 4 + <16e> DW_AT_decl_file : 8 + <16f> DW_AT_decl_line : 763 + <171> DW_AT_sibling : <0x188> + <2><175>: Abbrev Number: 13 (DW_TAG_enumerator) + <176> DW_AT_name : (indirect string, offset: 0x6e): V4L2_PREEMPHASIS_DISABLED + <17a> DW_AT_const_value : 0 + <2><17b>: Abbrev Number: 13 (DW_TAG_enumerator) + <17c> DW_AT_name : (indirect string, offset: 0x185): V4L2_PREEMPHASIS_50_uS + <180> DW_AT_const_value : 1 + <2><181>: Abbrev Number: 13 (DW_TAG_enumerator) + <182> DW_AT_name : (indirect string, offset: 0x16e): V4L2_PREEMPHASIS_75_uS + <186> DW_AT_const_value : 2 + <2><187>: Abbrev Number: 0 + <1><188>: Abbrev Number: 14 (DW_TAG_structure_type) + <189> DW_AT_name : (indirect string, offset: 0xf4): v4l2_timecode + <18d> DW_AT_byte_size : 16 + <18e> DW_AT_decl_file : 5 + <18f> DW_AT_decl_line : 519 + <191> DW_AT_sibling : <0x1ff> + <2><195>: Abbrev Number: 15 (DW_TAG_member) + <196> DW_AT_name : (indirect string, offset: 0x15c): type + <19a> DW_AT_decl_file : 5 + <19b> DW_AT_decl_line : 520 + <19d> DW_AT_type : <0x15d> + <1a1> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1a4>: Abbrev Number: 15 (DW_TAG_member) + <1a5> DW_AT_name : (indirect string, offset: 0x14d): flags + <1a9> DW_AT_decl_file : 5 + <1aa> DW_AT_decl_line : 521 + <1ac> DW_AT_type : <0x15d> + <1b0> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1b3>: Abbrev Number: 15 (DW_TAG_member) + <1b4> DW_AT_name : (indirect string, offset: 0x2d): frames + <1b8> DW_AT_decl_file : 5 + <1b9> DW_AT_decl_line : 522 + <1bb> DW_AT_type : <0x147> + <1bf> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1c2>: Abbrev Number: 15 (DW_TAG_member) + <1c3> DW_AT_name : (indirect string, offset: 0x1c2): seconds + <1c7> DW_AT_decl_file : 5 + <1c8> DW_AT_decl_line : 523 + <1ca> DW_AT_type : <0x147> + <1ce> DW_AT_data_member_location: 2 byte block: 23 9 (DW_OP_plus_uconst: 9) + <2><1d1>: Abbrev Number: 15 (DW_TAG_member) + <1d2> DW_AT_name : (indirect string, offset: 0x2b3): minutes + <1d6> DW_AT_decl_file : 5 + <1d7> DW_AT_decl_line : 524 + <1d9> DW_AT_type : <0x147> + <1dd> DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) + <2><1e0>: Abbrev Number: 15 (DW_TAG_member) + <1e1> DW_AT_name : (indirect string, offset: 0x1ca): hours + <1e5> DW_AT_decl_file : 5 + <1e6> DW_AT_decl_line : 525 + <1e8> DW_AT_type : <0x147> + <1ec> DW_AT_data_member_location: 2 byte block: 23 b (DW_OP_plus_uconst: 11) + <2><1ef>: Abbrev Number: 15 (DW_TAG_member) + <1f0> DW_AT_name : (indirect string, offset: 0x1f0): userbits + <1f4> DW_AT_decl_file : 5 + <1f5> DW_AT_decl_line : 526 + <1f7> DW_AT_type : <0x1ff> + <1fb> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1fe>: Abbrev Number: 0 + <1><1ff>: Abbrev Number: 16 (DW_TAG_array_type) + <200> DW_AT_type : <0x147> + <204> DW_AT_sibling : <0x20f> + <2><208>: Abbrev Number: 17 (DW_TAG_subrange_type) + <209> DW_AT_type : <0x6e> + <20d> DW_AT_upper_bound : 3 + <2><20e>: Abbrev Number: 0 + <1><20f>: Abbrev Number: 18 (DW_TAG_union_type) + <210> DW_AT_byte_size : 4 + <211> DW_AT_decl_file : 5 + <212> DW_AT_decl_line : 606 + <214> DW_AT_sibling : <0x23c> + <2><218>: Abbrev Number: 19 (DW_TAG_member) + <219> DW_AT_name : (indirect string, offset: 0x1e5): mem_offset + <21d> DW_AT_decl_file : 5 + <21e> DW_AT_decl_line : 607 + <220> DW_AT_type : <0x15d> + <2><224>: Abbrev Number: 19 (DW_TAG_member) + <225> DW_AT_name : (indirect string, offset: 0x5a): userptr + <229> DW_AT_decl_file : 5 + <22a> DW_AT_decl_line : 608 + <22c> DW_AT_type : <0x5c> + <2><230>: Abbrev Number: 20 (DW_TAG_member) + <231> DW_AT_name : fd + <234> DW_AT_decl_file : 5 + <235> DW_AT_decl_line : 609 + <237> DW_AT_type : <0x152> + <2><23b>: Abbrev Number: 0 + <1><23c>: Abbrev Number: 14 (DW_TAG_structure_type) + <23d> DW_AT_name : (indirect string, offset: 0x292): v4l2_plane + <241> DW_AT_byte_size : 60 + <242> DW_AT_decl_file : 5 + <243> DW_AT_decl_line : 603 + <245> DW_AT_sibling : <0x293> + <2><249>: Abbrev Number: 15 (DW_TAG_member) + <24a> DW_AT_name : (indirect string, offset: 0x1d5): bytesused + <24e> DW_AT_decl_file : 5 + <24f> DW_AT_decl_line : 604 + <251> DW_AT_type : <0x15d> + <255> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><258>: Abbrev Number: 15 (DW_TAG_member) + <259> DW_AT_name : (indirect string, offset: 0x113): length + <25d> DW_AT_decl_file : 5 + <25e> DW_AT_decl_line : 605 + <260> DW_AT_type : <0x15d> + <264> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><267>: Abbrev Number: 21 (DW_TAG_member) + <268> DW_AT_name : m + <26a> DW_AT_decl_file : 5 + <26b> DW_AT_decl_line : 610 + <26d> DW_AT_type : <0x20f> + <271> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><274>: Abbrev Number: 15 (DW_TAG_member) + <275> DW_AT_name : (indirect string, offset: 0x34): data_offset + <279> DW_AT_decl_file : 5 + <27a> DW_AT_decl_line : 611 + <27c> DW_AT_type : <0x15d> + <280> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><283>: Abbrev Number: 15 (DW_TAG_member) + <284> DW_AT_name : (indirect string, offset: 0x2e7): reserved + <288> DW_AT_decl_file : 5 + <289> DW_AT_decl_line : 612 + <28b> DW_AT_type : <0x293> + <28f> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><292>: Abbrev Number: 0 + <1><293>: Abbrev Number: 16 (DW_TAG_array_type) + <294> DW_AT_type : <0x15d> + <298> DW_AT_sibling : <0x2a3> + <2><29c>: Abbrev Number: 17 (DW_TAG_subrange_type) + <29d> DW_AT_type : <0x6e> + <2a1> DW_AT_upper_bound : 10 + <2><2a2>: Abbrev Number: 0 + <1><2a3>: Abbrev Number: 18 (DW_TAG_union_type) + <2a4> DW_AT_byte_size : 4 + <2a5> DW_AT_decl_file : 5 + <2a6> DW_AT_decl_line : 658 + <2a8> DW_AT_sibling : <0x2dc> + <2><2ac>: Abbrev Number: 19 (DW_TAG_member) + <2ad> DW_AT_name : (indirect string, offset: 0xed): offset + <2b1> DW_AT_decl_file : 5 + <2b2> DW_AT_decl_line : 659 + <2b4> DW_AT_type : <0x15d> + <2><2b8>: Abbrev Number: 19 (DW_TAG_member) + <2b9> DW_AT_name : (indirect string, offset: 0x5a): userptr + <2bd> DW_AT_decl_file : 5 + <2be> DW_AT_decl_line : 660 + <2c0> DW_AT_type : <0x5c> + <2><2c4>: Abbrev Number: 19 (DW_TAG_member) + <2c5> DW_AT_name : (indirect string, offset: 0xa7): planes + <2c9> DW_AT_decl_file : 5 + <2ca> DW_AT_decl_line : 661 + <2cc> DW_AT_type : <0x2dc> + <2><2d0>: Abbrev Number: 20 (DW_TAG_member) + <2d1> DW_AT_name : fd + <2d4> DW_AT_decl_file : 5 + <2d5> DW_AT_decl_line : 662 + <2d7> DW_AT_type : <0x152> + <2><2db>: Abbrev Number: 0 + <1><2dc>: Abbrev Number: 7 (DW_TAG_pointer_type) + <2dd> DW_AT_byte_size : 4 + <2de> DW_AT_type : <0x23c> + <1><2e2>: Abbrev Number: 14 (DW_TAG_structure_type) + <2e3> DW_AT_name : (indirect string, offset: 0x62): v4l2_buffer + <2e7> DW_AT_byte_size : 80 + <2e8> DW_AT_decl_file : 5 + <2e9> DW_AT_decl_line : 646 + <2eb> DW_AT_sibling : <0x3b1> + <2><2ef>: Abbrev Number: 15 (DW_TAG_member) + <2f0> DW_AT_name : (indirect string, offset: 0x9b): index + <2f4> DW_AT_decl_file : 5 + <2f5> DW_AT_decl_line : 647 + <2f7> DW_AT_type : <0x15d> + <2fb> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><2fe>: Abbrev Number: 15 (DW_TAG_member) + <2ff> DW_AT_name : (indirect string, offset: 0x15c): type + <303> DW_AT_decl_file : 5 + <304> DW_AT_decl_line : 648 + <306> DW_AT_type : <0x15d> + <30a> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><30d>: Abbrev Number: 15 (DW_TAG_member) + <30e> DW_AT_name : (indirect string, offset: 0x1d5): bytesused + <312> DW_AT_decl_file : 5 + <313> DW_AT_decl_line : 649 + <315> DW_AT_type : <0x15d> + <319> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><31c>: Abbrev Number: 15 (DW_TAG_member) + <31d> DW_AT_name : (indirect string, offset: 0x14d): flags + <321> DW_AT_decl_file : 5 + <322> DW_AT_decl_line : 650 + <324> DW_AT_type : <0x15d> + <328> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><32b>: Abbrev Number: 15 (DW_TAG_member) + <32c> DW_AT_name : (indirect string, offset: 0x2d3): field + <330> DW_AT_decl_file : 5 + <331> DW_AT_decl_line : 651 + <333> DW_AT_type : <0x15d> + <337> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><33a>: Abbrev Number: 15 (DW_TAG_member) + <33b> DW_AT_name : (indirect string, offset: 0x1a): timestamp + <33f> DW_AT_decl_file : 5 + <340> DW_AT_decl_line : 652 + <342> DW_AT_type : <0x92> + <346> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><349>: Abbrev Number: 15 (DW_TAG_member) + <34a> DW_AT_name : (indirect string, offset: 0x19c): timecode + <34e> DW_AT_decl_file : 5 + <34f> DW_AT_decl_line : 653 + <351> DW_AT_type : <0x188> + <355> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><358>: Abbrev Number: 15 (DW_TAG_member) + <359> DW_AT_name : (indirect string, offset: 0x153): sequence + <35d> DW_AT_decl_file : 5 + <35e> DW_AT_decl_line : 654 + <360> DW_AT_type : <0x15d> + <364> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><367>: Abbrev Number: 15 (DW_TAG_member) + <368> DW_AT_name : (indirect string, offset: 0xae): memory + <36c> DW_AT_decl_file : 5 + <36d> DW_AT_decl_line : 657 + <36f> DW_AT_type : <0x15d> + <373> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><376>: Abbrev Number: 21 (DW_TAG_member) + <377> DW_AT_name : m + <379> DW_AT_decl_file : 5 + <37a> DW_AT_decl_line : 663 + <37c> DW_AT_type : <0x2a3> + <380> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><383>: Abbrev Number: 15 (DW_TAG_member) + <384> DW_AT_name : (indirect string, offset: 0x113): length + <388> DW_AT_decl_file : 5 + <389> DW_AT_decl_line : 664 + <38b> DW_AT_type : <0x15d> + <38f> DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) + <2><392>: Abbrev Number: 15 (DW_TAG_member) + <393> DW_AT_name : (indirect string, offset: 0xe3): reserved2 + <397> DW_AT_decl_file : 5 + <398> DW_AT_decl_line : 665 + <39a> DW_AT_type : <0x15d> + <39e> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><3a1>: Abbrev Number: 15 (DW_TAG_member) + <3a2> DW_AT_name : (indirect string, offset: 0x2e7): reserved + <3a6> DW_AT_decl_file : 5 + <3a7> DW_AT_decl_line : 666 + <3a9> DW_AT_type : <0x15d> + <3ad> DW_AT_data_member_location: 2 byte block: 23 4c (DW_OP_plus_uconst: 76) + <2><3b0>: Abbrev Number: 0 + <1><3b1>: Abbrev Number: 4 (DW_TAG_typedef) + <3b2> DW_AT_name : (indirect string, offset: 0x128): struct_v4l2_buffer + <3b6> DW_AT_decl_file : 6 + <3b7> DW_AT_decl_line : 38 + <3b8> DW_AT_type : <0x2e2> + <1><3bc>: Abbrev Number: 22 (DW_TAG_variable) + <3bd> DW_AT_name : (indirect string, offset: 0x102): current_wordsize + <3c1> DW_AT_decl_file : 7 + <3c2> DW_AT_decl_line : 757 + <3c4> DW_AT_type : <0x47> + <3c8> DW_AT_external : 1 + <3c9> DW_AT_declaration : 1 + <1><3ca>: Abbrev Number: 22 (DW_TAG_variable) + <3cb> DW_AT_name : (indirect string, offset: 0x2cc): sysent + <3cf> DW_AT_decl_file : 7 + <3d0> DW_AT_decl_line : 892 + <3d2> DW_AT_type : <0x135> + <3d6> DW_AT_external : 1 + <3d7> DW_AT_declaration : 1 + <1><3d8>: Abbrev Number: 22 (DW_TAG_variable) + <3d9> DW_AT_name : (indirect string, offset: 0x1a5): nsyscalls + <3dd> DW_AT_decl_file : 7 + <3de> DW_AT_decl_line : 903 + <3e0> DW_AT_type : <0x47> + <3e4> DW_AT_external : 1 + <3e5> DW_AT_declaration : 1 + <1><3e6>: Abbrev Number: 23 (DW_TAG_variable) + <3e7> DW_AT_name : (indirect string, offset: 0x0): mpers_target_var + <3eb> DW_AT_decl_file : 6 + <3ec> DW_AT_decl_line : 47 + <3ed> DW_AT_type : <0x3b1> + <3f1> DW_AT_external : 1 + <3f2> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><3f8>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_v4l2_buffer.d2 b/mpers-mx32/struct_v4l2_buffer.d2 new file mode 100644 index 000000000..9f4a98004 --- /dev/null +++ b/mpers-mx32/struct_v4l2_buffer.d2 @@ -0,0 +1,521 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x141): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x47): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0xb5): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x11a): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1af): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x161): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xc3): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0xda): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x249): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x51): sizetype +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x27b): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x63> +<1><80> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2d9): __suseconds_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 141 +DW_AT_type : <0x63> +<1><8b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1d0): char +<1><92> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x284): timeval +DW_AT_byte_size : 16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_sibling : <0xbb> +<2><9e> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x40): tv_sec +DW_AT_decl_file : 2 +DW_AT_decl_line : 32 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2ab): tv_usec +DW_AT_decl_file : 2 +DW_AT_decl_line : 33 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xc1> +<1> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x8b> +<1> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x2cc): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x119> +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x13b): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x91): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x24): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x124> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><10a> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x88): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0xbb> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><119> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x124> +<2><122> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><124> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x119> +<1><12a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x29d): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xc6> +<1><135> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x13b> +<1><13b> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x12a> +<1><140> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x1df): _Bool +<1><147> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x244): __u8 +DW_AT_decl_file : 4 +DW_AT_decl_line : 20 +DW_AT_type : <0x39> +<1><152> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x28c): __s32 +DW_AT_decl_file : 4 +DW_AT_decl_line : 25 +DW_AT_type : <0x2b> +<1><15d> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xa1): __u32 +DW_AT_decl_file : 4 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><168> +Abbrev Number: 12 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x2bb): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 8 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x188> +<2><175> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x6e): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><17b> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x185): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><181> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x16e): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><188> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xf4): v4l2_timecode +DW_AT_byte_size : 16 +DW_AT_decl_file : 5 +DW_AT_decl_line : 519 +DW_AT_sibling : <0x1ff> +<2><195> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15c): type +DW_AT_decl_file : 5 +DW_AT_decl_line : 520 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1a4> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14d): flags +DW_AT_decl_file : 5 +DW_AT_decl_line : 521 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1b3> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d): frames +DW_AT_decl_file : 5 +DW_AT_decl_line : 522 +DW_AT_type : <0x147> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1c2> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c2): seconds +DW_AT_decl_file : 5 +DW_AT_decl_line : 523 +DW_AT_type : <0x147> +DW_AT_data_member_location: 2 byte block: 23 9 (DW_OP_plus_uconst: 9) +<2><1d1> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2b3): minutes +DW_AT_decl_file : 5 +DW_AT_decl_line : 524 +DW_AT_type : <0x147> +DW_AT_data_member_location: 2 byte block: 23 a (DW_OP_plus_uconst: 10) +<2><1e0> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ca): hours +DW_AT_decl_file : 5 +DW_AT_decl_line : 525 +DW_AT_type : <0x147> +DW_AT_data_member_location: 2 byte block: 23 b (DW_OP_plus_uconst: 11) +<2><1ef> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f0): userbits +DW_AT_decl_file : 5 +DW_AT_decl_line : 526 +DW_AT_type : <0x1ff> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1ff> +Abbrev Number: 16 (DW_TAG_array_type) +DW_AT_type : <0x147> +DW_AT_sibling : <0x20f> +<2><208> +Abbrev Number: 17 (DW_TAG_subrange_type) +DW_AT_type : <0x6e> +DW_AT_upper_bound : 3 +<1><20f> +Abbrev Number: 18 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 5 +DW_AT_decl_line : 606 +DW_AT_sibling : <0x23c> +<2><218> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e5): mem_offset +DW_AT_decl_file : 5 +DW_AT_decl_line : 607 +DW_AT_type : <0x15d> +<2><224> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5a): userptr +DW_AT_decl_file : 5 +DW_AT_decl_line : 608 +DW_AT_type : <0x5c> +<2><230> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : fd +DW_AT_decl_file : 5 +DW_AT_decl_line : 609 +DW_AT_type : <0x152> +<1><23c> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x292): v4l2_plane +DW_AT_byte_size : 60 +DW_AT_decl_file : 5 +DW_AT_decl_line : 603 +DW_AT_sibling : <0x293> +<2><249> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d5): bytesused +DW_AT_decl_file : 5 +DW_AT_decl_line : 604 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><258> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x113): length +DW_AT_decl_file : 5 +DW_AT_decl_line : 605 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><267> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : m +DW_AT_decl_file : 5 +DW_AT_decl_line : 610 +DW_AT_type : <0x20f> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><274> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x34): data_offset +DW_AT_decl_file : 5 +DW_AT_decl_line : 611 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><283> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2e7): reserved +DW_AT_decl_file : 5 +DW_AT_decl_line : 612 +DW_AT_type : <0x293> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><293> +Abbrev Number: 16 (DW_TAG_array_type) +DW_AT_type : <0x15d> +DW_AT_sibling : <0x2a3> +<2><29c> +Abbrev Number: 17 (DW_TAG_subrange_type) +DW_AT_type : <0x6e> +DW_AT_upper_bound : 10 +<1><2a3> +Abbrev Number: 18 (DW_TAG_union_type) +DW_AT_byte_size : 4 +DW_AT_decl_file : 5 +DW_AT_decl_line : 658 +DW_AT_sibling : <0x2dc> +<2><2ac> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xed): offset +DW_AT_decl_file : 5 +DW_AT_decl_line : 659 +DW_AT_type : <0x15d> +<2><2b8> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5a): userptr +DW_AT_decl_file : 5 +DW_AT_decl_line : 660 +DW_AT_type : <0x5c> +<2><2c4> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa7): planes +DW_AT_decl_file : 5 +DW_AT_decl_line : 661 +DW_AT_type : <0x2dc> +<2><2d0> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : fd +DW_AT_decl_file : 5 +DW_AT_decl_line : 662 +DW_AT_type : <0x152> +<1><2dc> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x23c> +<1><2e2> +Abbrev Number: 14 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x62): v4l2_buffer +DW_AT_byte_size : 80 +DW_AT_decl_file : 5 +DW_AT_decl_line : 646 +DW_AT_sibling : <0x3b1> +<2><2ef> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9b): index +DW_AT_decl_file : 5 +DW_AT_decl_line : 647 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><2fe> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15c): type +DW_AT_decl_file : 5 +DW_AT_decl_line : 648 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><30d> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d5): bytesused +DW_AT_decl_file : 5 +DW_AT_decl_line : 649 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><31c> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14d): flags +DW_AT_decl_file : 5 +DW_AT_decl_line : 650 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><32b> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2d3): field +DW_AT_decl_file : 5 +DW_AT_decl_line : 651 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><33a> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a): timestamp +DW_AT_decl_file : 5 +DW_AT_decl_line : 652 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><349> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x19c): timecode +DW_AT_decl_file : 5 +DW_AT_decl_line : 653 +DW_AT_type : <0x188> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><358> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x153): sequence +DW_AT_decl_file : 5 +DW_AT_decl_line : 654 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><367> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xae): memory +DW_AT_decl_file : 5 +DW_AT_decl_line : 657 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<2><376> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : m +DW_AT_decl_file : 5 +DW_AT_decl_line : 663 +DW_AT_type : <0x2a3> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><383> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x113): length +DW_AT_decl_file : 5 +DW_AT_decl_line : 664 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 44 (DW_OP_plus_uconst: 68) +<2><392> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe3): reserved2 +DW_AT_decl_file : 5 +DW_AT_decl_line : 665 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><3a1> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2e7): reserved +DW_AT_decl_file : 5 +DW_AT_decl_line : 666 +DW_AT_type : <0x15d> +DW_AT_data_member_location: 2 byte block: 23 4c (DW_OP_plus_uconst: 76) +<1><3b1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x128): struct_v4l2_buffer +DW_AT_decl_file : 6 +DW_AT_decl_line : 38 +DW_AT_type : <0x2e2> +<1><3bc> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x102): current_wordsize +DW_AT_decl_file : 7 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3ca> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x2cc): sysent +DW_AT_decl_file : 7 +DW_AT_decl_line : 892 +DW_AT_type : <0x135> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3d8> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1a5): nsyscalls +DW_AT_decl_file : 7 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><3e6> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x0): mpers_target_var +DW_AT_decl_file : 6 +DW_AT_decl_line : 47 +DW_AT_type : <0x3b1> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_v4l2_buffer.h b/mpers-mx32/struct_v4l2_buffer.h new file mode 100644 index 000000000..0a71b3206 --- /dev/null +++ b/mpers-mx32/struct_v4l2_buffer.h @@ -0,0 +1,36 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t index; +uint32_t type; +uint32_t bytesused; +uint32_t flags; +uint32_t field; +unsigned char mpers_filler_1[4]; +struct { +int64_t tv_sec; +int64_t tv_usec; +} ATTRIBUTE_PACKED timestamp; +struct { +uint32_t type; +uint32_t flags; +unsigned char frames; +unsigned char seconds; +unsigned char minutes; +unsigned char hours; +unsigned char userbits[4]; +} ATTRIBUTE_PACKED timecode; +uint32_t sequence; +uint32_t memory; +union { +uint32_t offset; +uint32_t userptr; +mpers_ptr_t planes; +int32_t fd; +} m; +uint32_t length; +uint32_t reserved2; +uint32_t reserved; +} ATTRIBUTE_PACKED mx32_struct_v4l2_buffer; +#define MPERS_mx32_struct_v4l2_buffer mx32_struct_v4l2_buffer diff --git a/mpers-mx32/struct_v4l2_create_buffers.c b/mpers-mx32/struct_v4l2_create_buffers.c new file mode 100644 index 000000000..7ecdafd7e --- /dev/null +++ b/mpers-mx32/struct_v4l2_create_buffers.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_create_buffers mpers_target_var; diff --git a/mpers-mx32/struct_v4l2_create_buffers.d1 b/mpers-mx32/struct_v4l2_create_buffers.d1 new file mode 100644 index 000000000..66c63fcfa --- /dev/null +++ b/mpers-mx32/struct_v4l2_create_buffers.d1 @@ -0,0 +1,672 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x5f0 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x297): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x2f9): mpers-mx32/struct_v4l2_create_buffers.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x3d1): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1aa): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x2e): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x3b5): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x168): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x244): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1df): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x1bc): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0xf3): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x2e7): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x38): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x265): char + <1><73>: Abbrev Number: 5 (DW_TAG_pointer_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_type : <0x79> + <1><79>: Abbrev Number: 6 (DW_TAG_const_type) + <7a> DW_AT_type : <0x6c> + <1><7e>: Abbrev Number: 7 (DW_TAG_structure_type) + <7f> DW_AT_name : (indirect string, offset: 0x37b): sysent + <83> DW_AT_byte_size : 20 + <84> DW_AT_decl_file : 1 + <85> DW_AT_decl_line : 4 + <86> DW_AT_sibling : <0xd1> + <2><8a>: Abbrev Number: 8 (DW_TAG_member) + <8b> DW_AT_name : (indirect string, offset: 0x321): nargs + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 5 + <91> DW_AT_type : <0x47> + <95> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><98>: Abbrev Number: 8 (DW_TAG_member) + <99> DW_AT_name : (indirect string, offset: 0x6f): sys_flags + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 6 + <9f> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x16): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xdc> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x55): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x73> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xdc> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) +
DW_AT_byte_size : 4 + DW_AT_type : <0xd1> + <1>: Abbrev Number: 12 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x333): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7e> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf3> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xe2> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x26f): _Bool + <1>: Abbrev Number: 12 (DW_TAG_typedef) + <100> DW_AT_name : (indirect string, offset: 0x2e2): __u8 + <104> DW_AT_decl_file : 2 + <105> DW_AT_decl_line : 20 + <106> DW_AT_type : <0x39> + <1><10a>: Abbrev Number: 12 (DW_TAG_typedef) + <10b> DW_AT_name : (indirect string, offset: 0x291): __u16 + <10f> DW_AT_decl_file : 2 + <110> DW_AT_decl_line : 23 + <111> DW_AT_type : <0x40> + <1><115>: Abbrev Number: 12 (DW_TAG_typedef) + <116> DW_AT_name : (indirect string, offset: 0x327): __s32 + <11a> DW_AT_decl_file : 2 + <11b> DW_AT_decl_line : 25 + <11c> DW_AT_type : <0x2b> + <1><120>: Abbrev Number: 12 (DW_TAG_typedef) + <121> DW_AT_name : (indirect string, offset: 0xaf): __u32 + <125> DW_AT_decl_file : 2 + <126> DW_AT_decl_line : 26 + <127> DW_AT_type : <0x47> + <1><12b>: Abbrev Number: 13 (DW_TAG_enumeration_type) + <12c> DW_AT_name : (indirect string, offset: 0x35c): v4l2_preemphasis + <130> DW_AT_byte_size : 4 + <131> DW_AT_decl_file : 6 + <132> DW_AT_decl_line : 763 + <134> DW_AT_sibling : <0x14b> + <2><138>: Abbrev Number: 14 (DW_TAG_enumerator) + <139> DW_AT_name : (indirect string, offset: 0x21a): V4L2_PREEMPHASIS_DISABLED + <13d> DW_AT_const_value : 0 + <2><13e>: Abbrev Number: 14 (DW_TAG_enumerator) + <13f> DW_AT_name : (indirect string, offset: 0x1f7): V4L2_PREEMPHASIS_50_uS + <143> DW_AT_const_value : 1 + <2><144>: Abbrev Number: 14 (DW_TAG_enumerator) + <145> DW_AT_name : (indirect string, offset: 0x89): V4L2_PREEMPHASIS_75_uS + <149> DW_AT_const_value : 2 + <2><14a>: Abbrev Number: 0 + <1><14b>: Abbrev Number: 7 (DW_TAG_structure_type) + <14c> DW_AT_name : (indirect string, offset: 0xc): v4l2_rect + <150> DW_AT_byte_size : 16 + <151> DW_AT_decl_file : 3 + <152> DW_AT_decl_line : 205 + <153> DW_AT_sibling : <0x190> + <2><157>: Abbrev Number: 8 (DW_TAG_member) + <158> DW_AT_name : (indirect string, offset: 0x26a): left + <15c> DW_AT_decl_file : 3 + <15d> DW_AT_decl_line : 206 + <15e> DW_AT_type : <0x115> + <162> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><165>: Abbrev Number: 9 (DW_TAG_member) + <166> DW_AT_name : top + <16a> DW_AT_decl_file : 3 + <16b> DW_AT_decl_line : 207 + <16c> DW_AT_type : <0x115> + <170> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><173>: Abbrev Number: 8 (DW_TAG_member) + <174> DW_AT_name : (indirect string, offset: 0xd2): width + <178> DW_AT_decl_file : 3 + <179> DW_AT_decl_line : 208 + <17a> DW_AT_type : <0x115> + <17e> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><181>: Abbrev Number: 8 (DW_TAG_member) + <182> DW_AT_name : (indirect string, offset: 0x1d8): height + <186> DW_AT_decl_file : 3 + <187> DW_AT_decl_line : 209 + <188> DW_AT_type : <0x115> + <18c> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><18f>: Abbrev Number: 0 + <1><190>: Abbrev Number: 15 (DW_TAG_structure_type) + <191> DW_AT_name : (indirect string, offset: 0x281): v4l2_pix_format + <195> DW_AT_byte_size : 32 + <196> DW_AT_decl_file : 3 + <197> DW_AT_decl_line : 274 + <199> DW_AT_sibling : <0x216> + <2><19d>: Abbrev Number: 16 (DW_TAG_member) + <19e> DW_AT_name : (indirect string, offset: 0xd2): width + <1a2> DW_AT_decl_file : 3 + <1a3> DW_AT_decl_line : 275 + <1a5> DW_AT_type : <0x120> + <1a9> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1ac>: Abbrev Number: 16 (DW_TAG_member) + <1ad> DW_AT_name : (indirect string, offset: 0x1d8): height + <1b1> DW_AT_decl_file : 3 + <1b2> DW_AT_decl_line : 276 + <1b4> DW_AT_type : <0x120> + <1b8> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1bb>: Abbrev Number: 16 (DW_TAG_member) + <1bc> DW_AT_name : (indirect string, offset: 0x41): pixelformat + <1c0> DW_AT_decl_file : 3 + <1c1> DW_AT_decl_line : 277 + <1c3> DW_AT_type : <0x120> + <1c7> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1ca>: Abbrev Number: 16 (DW_TAG_member) + <1cb> DW_AT_name : (indirect string, offset: 0x382): field + <1cf> DW_AT_decl_file : 3 + <1d0> DW_AT_decl_line : 278 + <1d2> DW_AT_type : <0x120> + <1d6> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1d9>: Abbrev Number: 16 (DW_TAG_member) + <1da> DW_AT_name : (indirect string, offset: 0xe6): bytesperline + <1de> DW_AT_decl_file : 3 + <1df> DW_AT_decl_line : 279 + <1e1> DW_AT_type : <0x120> + <1e5> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><1e8>: Abbrev Number: 16 (DW_TAG_member) + <1e9> DW_AT_name : (indirect string, offset: 0x1f): sizeimage + <1ed> DW_AT_decl_file : 3 + <1ee> DW_AT_decl_line : 280 + <1f0> DW_AT_type : <0x120> + <1f4> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><1f7>: Abbrev Number: 16 (DW_TAG_member) + <1f8> DW_AT_name : (indirect string, offset: 0x125): colorspace + <1fc> DW_AT_decl_file : 3 + <1fd> DW_AT_decl_line : 281 + <1ff> DW_AT_type : <0x120> + <203> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><206>: Abbrev Number: 16 (DW_TAG_member) + <207> DW_AT_name : (indirect string, offset: 0x0): priv + <20b> DW_AT_decl_file : 3 + <20c> DW_AT_decl_line : 282 + <20e> DW_AT_type : <0x120> + <212> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><215>: Abbrev Number: 0 + <1><216>: Abbrev Number: 17 (DW_TAG_array_type) + <217> DW_AT_type : <0x120> + <21b> DW_AT_sibling : <0x226> + <2><21f>: Abbrev Number: 18 (DW_TAG_subrange_type) + <220> DW_AT_type : <0x63> + <224> DW_AT_upper_bound : 1 + <2><225>: Abbrev Number: 0 + <1><226>: Abbrev Number: 15 (DW_TAG_structure_type) + <227> DW_AT_name : (indirect string, offset: 0x388): v4l2_clip + <22b> DW_AT_byte_size : 20 + <22c> DW_AT_decl_file : 3 + <22d> DW_AT_decl_line : 745 + <22f> DW_AT_sibling : <0x250> + <2><233>: Abbrev Number: 19 (DW_TAG_member) + <234> DW_AT_name : c + <236> DW_AT_decl_file : 3 + <237> DW_AT_decl_line : 746 + <239> DW_AT_type : <0x14b> + <23d> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><240>: Abbrev Number: 16 (DW_TAG_member) + <241> DW_AT_name : (indirect string, offset: 0x29): next + <245> DW_AT_decl_file : 3 + <246> DW_AT_decl_line : 747 + <248> DW_AT_type : <0x250> + <24c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><24f>: Abbrev Number: 0 + <1><250>: Abbrev Number: 5 (DW_TAG_pointer_type) + <251> DW_AT_byte_size : 4 + <252> DW_AT_type : <0x226> + <1><256>: Abbrev Number: 15 (DW_TAG_structure_type) + <257> DW_AT_name : (indirect string, offset: 0xc6): v4l2_window + <25b> DW_AT_byte_size : 40 + <25c> DW_AT_decl_file : 3 + <25d> DW_AT_decl_line : 750 + <25f> DW_AT_sibling : <0x2cb> + <2><263>: Abbrev Number: 19 (DW_TAG_member) + <264> DW_AT_name : w + <266> DW_AT_decl_file : 3 + <267> DW_AT_decl_line : 751 + <269> DW_AT_type : <0x14b> + <26d> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><270>: Abbrev Number: 16 (DW_TAG_member) + <271> DW_AT_name : (indirect string, offset: 0x382): field + <275> DW_AT_decl_file : 3 + <276> DW_AT_decl_line : 752 + <278> DW_AT_type : <0x120> + <27c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><27f>: Abbrev Number: 16 (DW_TAG_member) + <280> DW_AT_name : (indirect string, offset: 0x39c): chromakey + <284> DW_AT_decl_file : 3 + <285> DW_AT_decl_line : 753 + <287> DW_AT_type : <0x120> + <28b> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><28e>: Abbrev Number: 16 (DW_TAG_member) + <28f> DW_AT_name : (indirect string, offset: 0x3af): clips + <293> DW_AT_decl_file : 3 + <294> DW_AT_decl_line : 754 + <296> DW_AT_type : <0x250> + <29a> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><29d>: Abbrev Number: 16 (DW_TAG_member) + <29e> DW_AT_name : (indirect string, offset: 0xbc): clipcount + <2a2> DW_AT_decl_file : 3 + <2a3> DW_AT_decl_line : 755 + <2a5> DW_AT_type : <0x120> + <2a9> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><2ac>: Abbrev Number: 16 (DW_TAG_member) + <2ad> DW_AT_name : (indirect string, offset: 0xb5): bitmap + <2b1> DW_AT_decl_file : 3 + <2b2> DW_AT_decl_line : 756 + <2b4> DW_AT_type : <0x6a> + <2b8> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><2bb>: Abbrev Number: 16 (DW_TAG_member) + <2bc> DW_AT_name : (indirect string, offset: 0x130): global_alpha + <2c0> DW_AT_decl_file : 3 + <2c1> DW_AT_decl_line : 757 + <2c3> DW_AT_type : <0xff> + <2c7> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><2ca>: Abbrev Number: 0 + <1><2cb>: Abbrev Number: 17 (DW_TAG_array_type) + <2cc> DW_AT_type : <0x120> + <2d0> DW_AT_sibling : <0x2db> + <2><2d4>: Abbrev Number: 18 (DW_TAG_subrange_type) + <2d5> DW_AT_type : <0x63> + <2d9> DW_AT_upper_bound : 7 + <2><2da>: Abbrev Number: 0 + <1><2db>: Abbrev Number: 15 (DW_TAG_structure_type) + <2dc> DW_AT_name : (indirect string, offset: 0x79): v4l2_vbi_format + <2e0> DW_AT_byte_size : 44 + <2e1> DW_AT_decl_file : 3 + <2e2> DW_AT_decl_line : 1541 + <2e4> DW_AT_sibling : <0x361> + <2><2e8>: Abbrev Number: 16 (DW_TAG_member) + <2e9> DW_AT_name : (indirect string, offset: 0x257): sampling_rate + <2ed> DW_AT_decl_file : 3 + <2ee> DW_AT_decl_line : 1542 + <2f0> DW_AT_type : <0x120> + <2f4> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><2f7>: Abbrev Number: 16 (DW_TAG_member) + <2f8> DW_AT_name : (indirect string, offset: 0x10d): offset + <2fc> DW_AT_decl_file : 3 + <2fd> DW_AT_decl_line : 1543 + <2ff> DW_AT_type : <0x120> + <303> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><306>: Abbrev Number: 16 (DW_TAG_member) + <307> DW_AT_name : (indirect string, offset: 0x5e): samples_per_line + <30b> DW_AT_decl_file : 3 + <30c> DW_AT_decl_line : 1544 + <30e> DW_AT_type : <0x120> + <312> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><315>: Abbrev Number: 16 (DW_TAG_member) + <316> DW_AT_name : (indirect string, offset: 0x3c3): sample_format + <31a> DW_AT_decl_file : 3 + <31b> DW_AT_decl_line : 1545 + <31d> DW_AT_type : <0x120> + <321> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><324>: Abbrev Number: 16 (DW_TAG_member) + <325> DW_AT_name : (indirect string, offset: 0x23e): start + <329> DW_AT_decl_file : 3 + <32a> DW_AT_decl_line : 1546 + <32c> DW_AT_type : <0x361> + <330> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><333>: Abbrev Number: 16 (DW_TAG_member) + <334> DW_AT_name : (indirect string, offset: 0x32d): count + <338> DW_AT_decl_file : 3 + <339> DW_AT_decl_line : 1547 + <33b> DW_AT_type : <0x216> + <33f> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><342>: Abbrev Number: 16 (DW_TAG_member) + <343> DW_AT_name : (indirect string, offset: 0x1b6): flags + <347> DW_AT_decl_file : 3 + <348> DW_AT_decl_line : 1548 + <34a> DW_AT_type : <0x120> + <34e> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><351>: Abbrev Number: 16 (DW_TAG_member) + <352> DW_AT_name : (indirect string, offset: 0x3a6): reserved + <356> DW_AT_decl_file : 3 + <357> DW_AT_decl_line : 1549 + <359> DW_AT_type : <0x216> + <35d> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><360>: Abbrev Number: 0 + <1><361>: Abbrev Number: 17 (DW_TAG_array_type) + <362> DW_AT_type : <0x115> + <366> DW_AT_sibling : <0x371> + <2><36a>: Abbrev Number: 18 (DW_TAG_subrange_type) + <36b> DW_AT_type : <0x63> + <36f> DW_AT_upper_bound : 1 + <2><370>: Abbrev Number: 0 + <1><371>: Abbrev Number: 15 (DW_TAG_structure_type) + <372> DW_AT_name : (indirect string, offset: 0x18c): v4l2_sliced_vbi_format + <376> DW_AT_byte_size : 112 + <377> DW_AT_decl_file : 3 + <378> DW_AT_decl_line : 1563 + <37a> DW_AT_sibling : <0x3bb> + <2><37e>: Abbrev Number: 16 (DW_TAG_member) + <37f> DW_AT_name : (indirect string, offset: 0x275): service_set + <383> DW_AT_decl_file : 3 + <384> DW_AT_decl_line : 1564 + <386> DW_AT_type : <0x10a> + <38a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><38d>: Abbrev Number: 16 (DW_TAG_member) + <38e> DW_AT_name : (indirect string, offset: 0x36d): service_lines + <392> DW_AT_decl_file : 3 + <393> DW_AT_decl_line : 1569 + <395> DW_AT_type : <0x3bb> + <399> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><39c>: Abbrev Number: 16 (DW_TAG_member) + <39d> DW_AT_name : (indirect string, offset: 0x4d): io_size + <3a1> DW_AT_decl_file : 3 + <3a2> DW_AT_decl_line : 1570 + <3a4> DW_AT_type : <0x120> + <3a8> DW_AT_data_member_location: 2 byte block: 23 64 (DW_OP_plus_uconst: 100) + <2><3ab>: Abbrev Number: 16 (DW_TAG_member) + <3ac> DW_AT_name : (indirect string, offset: 0x3a6): reserved + <3b0> DW_AT_decl_file : 3 + <3b1> DW_AT_decl_line : 1571 + <3b3> DW_AT_type : <0x216> + <3b7> DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) + <2><3ba>: Abbrev Number: 0 + <1><3bb>: Abbrev Number: 17 (DW_TAG_array_type) + <3bc> DW_AT_type : <0x10a> + <3c0> DW_AT_sibling : <0x3d1> + <2><3c4>: Abbrev Number: 18 (DW_TAG_subrange_type) + <3c5> DW_AT_type : <0x63> + <3c9> DW_AT_upper_bound : 1 + <2><3ca>: Abbrev Number: 18 (DW_TAG_subrange_type) + <3cb> DW_AT_type : <0x63> + <3cf> DW_AT_upper_bound : 23 + <2><3d0>: Abbrev Number: 0 + <1><3d1>: Abbrev Number: 15 (DW_TAG_structure_type) + <3d2> DW_AT_name : (indirect string, offset: 0x176): v4l2_plane_pix_format + <3d6> DW_AT_byte_size : 20 + <3d7> DW_AT_decl_file : 3 + <3d8> DW_AT_decl_line : 1664 + <3da> DW_AT_sibling : <0x40c> + <2><3de>: Abbrev Number: 16 (DW_TAG_member) + <3df> DW_AT_name : (indirect string, offset: 0x1f): sizeimage + <3e3> DW_AT_decl_file : 3 + <3e4> DW_AT_decl_line : 1665 + <3e6> DW_AT_type : <0x120> + <3ea> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><3ed>: Abbrev Number: 16 (DW_TAG_member) + <3ee> DW_AT_name : (indirect string, offset: 0xe6): bytesperline + <3f2> DW_AT_decl_file : 3 + <3f3> DW_AT_decl_line : 1666 + <3f5> DW_AT_type : <0x10a> + <3f9> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><3fc>: Abbrev Number: 16 (DW_TAG_member) + <3fd> DW_AT_name : (indirect string, offset: 0x3a6): reserved + <401> DW_AT_decl_file : 3 + <402> DW_AT_decl_line : 1667 + <404> DW_AT_type : <0x40c> + <408> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><40b>: Abbrev Number: 0 + <1><40c>: Abbrev Number: 17 (DW_TAG_array_type) + <40d> DW_AT_type : <0x10a> + <411> DW_AT_sibling : <0x41c> + <2><415>: Abbrev Number: 18 (DW_TAG_subrange_type) + <416> DW_AT_type : <0x63> + <41a> DW_AT_upper_bound : 6 + <2><41b>: Abbrev Number: 0 + <1><41c>: Abbrev Number: 15 (DW_TAG_structure_type) + <41d> DW_AT_name : (indirect string, offset: 0x151): v4l2_pix_format_mplane + <421> DW_AT_byte_size : 192 + <422> DW_AT_decl_file : 3 + <423> DW_AT_decl_line : 1680 + <425> DW_AT_sibling : <0x4a4> + <2><429>: Abbrev Number: 16 (DW_TAG_member) + <42a> DW_AT_name : (indirect string, offset: 0xd2): width + <42e> DW_AT_decl_file : 3 + <42f> DW_AT_decl_line : 1681 + <431> DW_AT_type : <0x120> + <435> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><438>: Abbrev Number: 16 (DW_TAG_member) + <439> DW_AT_name : (indirect string, offset: 0x1d8): height + <43d> DW_AT_decl_file : 3 + <43e> DW_AT_decl_line : 1682 + <440> DW_AT_type : <0x120> + <444> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><447>: Abbrev Number: 16 (DW_TAG_member) + <448> DW_AT_name : (indirect string, offset: 0x41): pixelformat + <44c> DW_AT_decl_file : 3 + <44d> DW_AT_decl_line : 1683 + <44f> DW_AT_type : <0x120> + <453> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><456>: Abbrev Number: 16 (DW_TAG_member) + <457> DW_AT_name : (indirect string, offset: 0x382): field + <45b> DW_AT_decl_file : 3 + <45c> DW_AT_decl_line : 1684 + <45e> DW_AT_type : <0x120> + <462> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><465>: Abbrev Number: 16 (DW_TAG_member) + <466> DW_AT_name : (indirect string, offset: 0x125): colorspace + <46a> DW_AT_decl_file : 3 + <46b> DW_AT_decl_line : 1685 + <46d> DW_AT_type : <0x120> + <471> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><474>: Abbrev Number: 16 (DW_TAG_member) + <475> DW_AT_name : (indirect string, offset: 0x392): plane_fmt + <479> DW_AT_decl_file : 3 + <47a> DW_AT_decl_line : 1687 + <47c> DW_AT_type : <0x4a4> + <480> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><483>: Abbrev Number: 16 (DW_TAG_member) + <484> DW_AT_name : (indirect string, offset: 0x1ec): num_planes + <488> DW_AT_decl_file : 3 + <489> DW_AT_decl_line : 1688 + <48b> DW_AT_type : <0xff> + <48f> DW_AT_data_member_location: 3 byte block: 23 b4 1 (DW_OP_plus_uconst: 180) + <2><493>: Abbrev Number: 16 (DW_TAG_member) + <494> DW_AT_name : (indirect string, offset: 0x3a6): reserved + <498> DW_AT_decl_file : 3 + <499> DW_AT_decl_line : 1689 + <49b> DW_AT_type : <0x4b4> + <49f> DW_AT_data_member_location: 3 byte block: 23 b5 1 (DW_OP_plus_uconst: 181) + <2><4a3>: Abbrev Number: 0 + <1><4a4>: Abbrev Number: 17 (DW_TAG_array_type) + <4a5> DW_AT_type : <0x3d1> + <4a9> DW_AT_sibling : <0x4b4> + <2><4ad>: Abbrev Number: 18 (DW_TAG_subrange_type) + <4ae> DW_AT_type : <0x63> + <4b2> DW_AT_upper_bound : 7 + <2><4b3>: Abbrev Number: 0 + <1><4b4>: Abbrev Number: 17 (DW_TAG_array_type) + <4b5> DW_AT_type : <0xff> + <4b9> DW_AT_sibling : <0x4c4> + <2><4bd>: Abbrev Number: 18 (DW_TAG_subrange_type) + <4be> DW_AT_type : <0x63> + <4c2> DW_AT_upper_bound : 10 + <2><4c3>: Abbrev Number: 0 + <1><4c4>: Abbrev Number: 20 (DW_TAG_union_type) + <4c5> DW_AT_byte_size : 200 + <4c6> DW_AT_decl_file : 3 + <4c7> DW_AT_decl_line : 1704 + <4c9> DW_AT_sibling : <0x516> + <2><4cd>: Abbrev Number: 21 (DW_TAG_member) + <4ce> DW_AT_name : pix + <4d2> DW_AT_decl_file : 3 + <4d3> DW_AT_decl_line : 1705 + <4d5> DW_AT_type : <0x190> + <2><4d9>: Abbrev Number: 22 (DW_TAG_member) + <4da> DW_AT_name : (indirect string, offset: 0x5): pix_mp + <4de> DW_AT_decl_file : 3 + <4df> DW_AT_decl_line : 1706 + <4e1> DW_AT_type : <0x41c> + <2><4e5>: Abbrev Number: 21 (DW_TAG_member) + <4e6> DW_AT_name : win + <4ea> DW_AT_decl_file : 3 + <4eb> DW_AT_decl_line : 1707 + <4ed> DW_AT_type : <0x256> + <2><4f1>: Abbrev Number: 21 (DW_TAG_member) + <4f2> DW_AT_name : vbi + <4f6> DW_AT_decl_file : 3 + <4f7> DW_AT_decl_line : 1708 + <4f9> DW_AT_type : <0x2db> + <2><4fd>: Abbrev Number: 22 (DW_TAG_member) + <4fe> DW_AT_name : (indirect string, offset: 0x1a3): sliced + <502> DW_AT_decl_file : 3 + <503> DW_AT_decl_line : 1709 + <505> DW_AT_type : <0x371> + <2><509>: Abbrev Number: 22 (DW_TAG_member) + <50a> DW_AT_name : (indirect string, offset: 0xa6): raw_data + <50e> DW_AT_decl_file : 3 + <50f> DW_AT_decl_line : 1710 + <511> DW_AT_type : <0x516> + <2><515>: Abbrev Number: 0 + <1><516>: Abbrev Number: 17 (DW_TAG_array_type) + <517> DW_AT_type : <0xff> + <51b> DW_AT_sibling : <0x526> + <2><51f>: Abbrev Number: 18 (DW_TAG_subrange_type) + <520> DW_AT_type : <0x63> + <524> DW_AT_upper_bound : 199 + <2><525>: Abbrev Number: 0 + <1><526>: Abbrev Number: 15 (DW_TAG_structure_type) + <527> DW_AT_name : (indirect string, offset: 0x20e): v4l2_format + <52b> DW_AT_byte_size : 204 + <52c> DW_AT_decl_file : 3 + <52d> DW_AT_decl_line : 1702 + <52f> DW_AT_sibling : <0x552> + <2><533>: Abbrev Number: 16 (DW_TAG_member) + <534> DW_AT_name : (indirect string, offset: 0x1d3): type + <538> DW_AT_decl_file : 3 + <539> DW_AT_decl_line : 1703 + <53b> DW_AT_type : <0x120> + <53f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><542>: Abbrev Number: 19 (DW_TAG_member) + <543> DW_AT_name : fmt + <547> DW_AT_decl_file : 3 + <548> DW_AT_decl_line : 1711 + <54a> DW_AT_type : <0x4c4> + <54e> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><551>: Abbrev Number: 0 + <1><552>: Abbrev Number: 15 (DW_TAG_structure_type) + <553> DW_AT_name : (indirect string, offset: 0x13d): v4l2_create_buffers + <557> DW_AT_byte_size : 248 + <558> DW_AT_decl_file : 3 + <559> DW_AT_decl_line : 1843 + <55b> DW_AT_sibling : <0x5ac> + <2><55f>: Abbrev Number: 16 (DW_TAG_member) + <560> DW_AT_name : (indirect string, offset: 0xa0): index + <564> DW_AT_decl_file : 3 + <565> DW_AT_decl_line : 1844 + <567> DW_AT_type : <0x120> + <56b> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><56e>: Abbrev Number: 16 (DW_TAG_member) + <56f> DW_AT_name : (indirect string, offset: 0x32d): count + <573> DW_AT_decl_file : 3 + <574> DW_AT_decl_line : 1845 + <576> DW_AT_type : <0x120> + <57a> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><57d>: Abbrev Number: 16 (DW_TAG_member) + <57e> DW_AT_name : (indirect string, offset: 0xd8): memory + <582> DW_AT_decl_file : 3 + <583> DW_AT_decl_line : 1846 + <585> DW_AT_type : <0x120> + <589> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><58c>: Abbrev Number: 16 (DW_TAG_member) + <58d> DW_AT_name : (indirect string, offset: 0xdf): format + <591> DW_AT_decl_file : 3 + <592> DW_AT_decl_line : 1847 + <594> DW_AT_type : <0x526> + <598> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><59b>: Abbrev Number: 16 (DW_TAG_member) + <59c> DW_AT_name : (indirect string, offset: 0x3a6): reserved + <5a0> DW_AT_decl_file : 3 + <5a1> DW_AT_decl_line : 1848 + <5a3> DW_AT_type : <0x2cb> + <5a7> DW_AT_data_member_location: 3 byte block: 23 d8 1 (DW_OP_plus_uconst: 216) + <2><5ab>: Abbrev Number: 0 + <1><5ac>: Abbrev Number: 12 (DW_TAG_typedef) + <5ad> DW_AT_name : (indirect string, offset: 0x341): struct_v4l2_create_buffers + <5b1> DW_AT_decl_file : 4 + <5b2> DW_AT_decl_line : 39 + <5b3> DW_AT_type : <0x552> + <1><5b7>: Abbrev Number: 23 (DW_TAG_variable) + <5b8> DW_AT_name : (indirect string, offset: 0x114): current_wordsize + <5bc> DW_AT_decl_file : 5 + <5bd> DW_AT_decl_line : 757 + <5bf> DW_AT_type : <0x47> + <5c3> DW_AT_external : 1 + <5c4> DW_AT_declaration : 1 + <1><5c5>: Abbrev Number: 23 (DW_TAG_variable) + <5c6> DW_AT_name : (indirect string, offset: 0x37b): sysent + <5ca> DW_AT_decl_file : 5 + <5cb> DW_AT_decl_line : 892 + <5cd> DW_AT_type : <0xed> + <5d1> DW_AT_external : 1 + <5d2> DW_AT_declaration : 1 + <1><5d3>: Abbrev Number: 23 (DW_TAG_variable) + <5d4> DW_AT_name : (indirect string, offset: 0x234): nsyscalls + <5d8> DW_AT_decl_file : 5 + <5d9> DW_AT_decl_line : 903 + <5db> DW_AT_type : <0x47> + <5df> DW_AT_external : 1 + <5e0> DW_AT_declaration : 1 + <1><5e1>: Abbrev Number: 24 (DW_TAG_variable) + <5e2> DW_AT_name : (indirect string, offset: 0xfc): mpers_target_var + <5e6> DW_AT_decl_file : 4 + <5e7> DW_AT_decl_line : 47 + <5e8> DW_AT_type : <0x5ac> + <5ec> DW_AT_external : 1 + <5ed> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><5f3>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_v4l2_create_buffers.d2 b/mpers-mx32/struct_v4l2_create_buffers.d2 new file mode 100644 index 000000000..a3ef10a86 --- /dev/null +++ b/mpers-mx32/struct_v4l2_create_buffers.d2 @@ -0,0 +1,762 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1aa): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x2e): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x3b5): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x168): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x244): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1df): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1bc): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0xf3): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x2e7): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x38): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x265): char +<1><73> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x79> +<1><79> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><7e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x37b): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd1> +<2><8a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x321): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><98> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6f): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xdc> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x55): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xdc> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd1> +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x333): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7e> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xe2> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x26f): _Bool +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2e2): __u8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 20 +DW_AT_type : <0x39> +<1><10a> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x291): __u16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 23 +DW_AT_type : <0x40> +<1><115> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x327): __s32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 25 +DW_AT_type : <0x2b> +<1><120> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xaf): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><12b> +Abbrev Number: 13 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x35c): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x14b> +<2><138> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x21a): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><13e> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1f7): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><144> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x89): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><14b> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc): v4l2_rect +DW_AT_byte_size : 16 +DW_AT_decl_file : 3 +DW_AT_decl_line : 205 +DW_AT_sibling : <0x190> +<2><157> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x26a): left +DW_AT_decl_file : 3 +DW_AT_decl_line : 206 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><165> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : top +DW_AT_decl_file : 3 +DW_AT_decl_line : 207 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><173> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd2): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 208 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><181> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d8): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 209 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><190> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x281): v4l2_pix_format +DW_AT_byte_size : 32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 274 +DW_AT_sibling : <0x216> +<2><19d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd2): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 275 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1ac> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d8): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 276 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1bb> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x41): pixelformat +DW_AT_decl_file : 3 +DW_AT_decl_line : 277 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1ca> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x382): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 278 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><1d9> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe6): bytesperline +DW_AT_decl_file : 3 +DW_AT_decl_line : 279 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><1e8> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f): sizeimage +DW_AT_decl_file : 3 +DW_AT_decl_line : 280 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><1f7> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x125): colorspace +DW_AT_decl_file : 3 +DW_AT_decl_line : 281 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><206> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): priv +DW_AT_decl_file : 3 +DW_AT_decl_line : 282 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<1><216> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x120> +DW_AT_sibling : <0x226> +<2><21f> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><226> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x388): v4l2_clip +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 745 +DW_AT_sibling : <0x250> +<2><233> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : c +DW_AT_decl_file : 3 +DW_AT_decl_line : 746 +DW_AT_type : <0x14b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><240> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x29): next +DW_AT_decl_file : 3 +DW_AT_decl_line : 747 +DW_AT_type : <0x250> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><250> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x226> +<1><256> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc6): v4l2_window +DW_AT_byte_size : 40 +DW_AT_decl_file : 3 +DW_AT_decl_line : 750 +DW_AT_sibling : <0x2cb> +<2><263> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : w +DW_AT_decl_file : 3 +DW_AT_decl_line : 751 +DW_AT_type : <0x14b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><270> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x382): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 752 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><27f> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x39c): chromakey +DW_AT_decl_file : 3 +DW_AT_decl_line : 753 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><28e> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3af): clips +DW_AT_decl_file : 3 +DW_AT_decl_line : 754 +DW_AT_type : <0x250> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><29d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbc): clipcount +DW_AT_decl_file : 3 +DW_AT_decl_line : 755 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><2ac> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb5): bitmap +DW_AT_decl_file : 3 +DW_AT_decl_line : 756 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><2bb> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x130): global_alpha +DW_AT_decl_file : 3 +DW_AT_decl_line : 757 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<1><2cb> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x120> +DW_AT_sibling : <0x2db> +<2><2d4> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 7 +<1><2db> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x79): v4l2_vbi_format +DW_AT_byte_size : 44 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1541 +DW_AT_sibling : <0x361> +<2><2e8> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x257): sampling_rate +DW_AT_decl_file : 3 +DW_AT_decl_line : 1542 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><2f7> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10d): offset +DW_AT_decl_file : 3 +DW_AT_decl_line : 1543 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><306> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5e): samples_per_line +DW_AT_decl_file : 3 +DW_AT_decl_line : 1544 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><315> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3c3): sample_format +DW_AT_decl_file : 3 +DW_AT_decl_line : 1545 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><324> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23e): start +DW_AT_decl_file : 3 +DW_AT_decl_line : 1546 +DW_AT_type : <0x361> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><333> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x32d): count +DW_AT_decl_file : 3 +DW_AT_decl_line : 1547 +DW_AT_type : <0x216> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><342> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b6): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 1548 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><351> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a6): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1549 +DW_AT_type : <0x216> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<1><361> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x115> +DW_AT_sibling : <0x371> +<2><36a> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><371> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x18c): v4l2_sliced_vbi_format +DW_AT_byte_size : 112 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1563 +DW_AT_sibling : <0x3bb> +<2><37e> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x275): service_set +DW_AT_decl_file : 3 +DW_AT_decl_line : 1564 +DW_AT_type : <0x10a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><38d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x36d): service_lines +DW_AT_decl_file : 3 +DW_AT_decl_line : 1569 +DW_AT_type : <0x3bb> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><39c> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x4d): io_size +DW_AT_decl_file : 3 +DW_AT_decl_line : 1570 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 64 (DW_OP_plus_uconst: 100) +<2><3ab> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a6): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1571 +DW_AT_type : <0x216> +DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) +<1><3bb> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x10a> +DW_AT_sibling : <0x3d1> +<2><3c4> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<2><3ca> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 23 +<1><3d1> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x176): v4l2_plane_pix_format +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1664 +DW_AT_sibling : <0x40c> +<2><3de> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f): sizeimage +DW_AT_decl_file : 3 +DW_AT_decl_line : 1665 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><3ed> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe6): bytesperline +DW_AT_decl_file : 3 +DW_AT_decl_line : 1666 +DW_AT_type : <0x10a> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><3fc> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a6): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1667 +DW_AT_type : <0x40c> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<1><40c> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x10a> +DW_AT_sibling : <0x41c> +<2><415> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 6 +<1><41c> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x151): v4l2_pix_format_mplane +DW_AT_byte_size : 192 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1680 +DW_AT_sibling : <0x4a4> +<2><429> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd2): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 1681 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><438> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d8): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 1682 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><447> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x41): pixelformat +DW_AT_decl_file : 3 +DW_AT_decl_line : 1683 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><456> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x382): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 1684 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><465> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x125): colorspace +DW_AT_decl_file : 3 +DW_AT_decl_line : 1685 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><474> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x392): plane_fmt +DW_AT_decl_file : 3 +DW_AT_decl_line : 1687 +DW_AT_type : <0x4a4> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><483> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ec): num_planes +DW_AT_decl_file : 3 +DW_AT_decl_line : 1688 +DW_AT_type : <0xff> +DW_AT_data_member_location: 3 byte block: 23 b4 1 (DW_OP_plus_uconst: 180) +<2><493> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a6): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1689 +DW_AT_type : <0x4b4> +DW_AT_data_member_location: 3 byte block: 23 b5 1 (DW_OP_plus_uconst: 181) +<1><4a4> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x3d1> +DW_AT_sibling : <0x4b4> +<2><4ad> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 7 +<1><4b4> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0xff> +DW_AT_sibling : <0x4c4> +<2><4bd> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 10 +<1><4c4> +Abbrev Number: 20 (DW_TAG_union_type) +DW_AT_byte_size : 200 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1704 +DW_AT_sibling : <0x516> +<2><4cd> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : pix +DW_AT_decl_file : 3 +DW_AT_decl_line : 1705 +DW_AT_type : <0x190> +<2><4d9> +Abbrev Number: 22 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5): pix_mp +DW_AT_decl_file : 3 +DW_AT_decl_line : 1706 +DW_AT_type : <0x41c> +<2><4e5> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : win +DW_AT_decl_file : 3 +DW_AT_decl_line : 1707 +DW_AT_type : <0x256> +<2><4f1> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : vbi +DW_AT_decl_file : 3 +DW_AT_decl_line : 1708 +DW_AT_type : <0x2db> +<2><4fd> +Abbrev Number: 22 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a3): sliced +DW_AT_decl_file : 3 +DW_AT_decl_line : 1709 +DW_AT_type : <0x371> +<2><509> +Abbrev Number: 22 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa6): raw_data +DW_AT_decl_file : 3 +DW_AT_decl_line : 1710 +DW_AT_type : <0x516> +<1><516> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0xff> +DW_AT_sibling : <0x526> +<2><51f> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 199 +<1><526> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x20e): v4l2_format +DW_AT_byte_size : 204 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1702 +DW_AT_sibling : <0x552> +<2><533> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1d3): type +DW_AT_decl_file : 3 +DW_AT_decl_line : 1703 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><542> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : fmt +DW_AT_decl_file : 3 +DW_AT_decl_line : 1711 +DW_AT_type : <0x4c4> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><552> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x13d): v4l2_create_buffers +DW_AT_byte_size : 248 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1843 +DW_AT_sibling : <0x5ac> +<2><55f> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa0): index +DW_AT_decl_file : 3 +DW_AT_decl_line : 1844 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><56e> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x32d): count +DW_AT_decl_file : 3 +DW_AT_decl_line : 1845 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><57d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd8): memory +DW_AT_decl_file : 3 +DW_AT_decl_line : 1846 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><58c> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xdf): format +DW_AT_decl_file : 3 +DW_AT_decl_line : 1847 +DW_AT_type : <0x526> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><59b> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3a6): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1848 +DW_AT_type : <0x2cb> +DW_AT_data_member_location: 3 byte block: 23 d8 1 (DW_OP_plus_uconst: 216) +<1><5ac> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x341): struct_v4l2_create_buffers +DW_AT_decl_file : 4 +DW_AT_decl_line : 39 +DW_AT_type : <0x552> +<1><5b7> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x114): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><5c5> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x37b): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xed> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><5d3> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x234): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><5e1> +Abbrev Number: 24 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xfc): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x5ac> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_v4l2_create_buffers.h b/mpers-mx32/struct_v4l2_create_buffers.h new file mode 100644 index 000000000..e1c078438 --- /dev/null +++ b/mpers-mx32/struct_v4l2_create_buffers.h @@ -0,0 +1,72 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t index; +uint32_t count; +uint32_t memory; +struct { +uint32_t type; +union { +struct { +uint32_t width; +uint32_t height; +uint32_t pixelformat; +uint32_t field; +uint32_t bytesperline; +uint32_t sizeimage; +uint32_t colorspace; +uint32_t priv; +} ATTRIBUTE_PACKED pix; +struct { +uint32_t width; +uint32_t height; +uint32_t pixelformat; +uint32_t field; +uint32_t colorspace; +struct { +uint32_t sizeimage; +uint16_t bytesperline; +uint16_t reserved[7]; +} ATTRIBUTE_PACKED plane_fmt[8]; +unsigned char num_planes; +unsigned char reserved[11]; +} ATTRIBUTE_PACKED pix_mp; +struct { +struct { +int32_t left; +int32_t top; +int32_t width; +int32_t height; +} ATTRIBUTE_PACKED w; +uint32_t field; +uint32_t chromakey; +mpers_ptr_t clips; +uint32_t clipcount; +mpers_ptr_t bitmap; +unsigned char global_alpha; +unsigned char mpers_end_filler_1[3]; +} ATTRIBUTE_PACKED win; +struct { +uint32_t sampling_rate; +uint32_t offset; +uint32_t samples_per_line; +uint32_t sample_format; +int32_t start[2]; +uint32_t count[2]; +uint32_t flags; +uint32_t reserved[2]; +} ATTRIBUTE_PACKED vbi; +struct { +uint16_t service_set; +uint16_t service_lines[24]; +unsigned char mpers_filler_2[50]; +uint32_t io_size; +uint32_t reserved[2]; +} ATTRIBUTE_PACKED sliced; +unsigned char raw_data[200]; +} fmt; +} ATTRIBUTE_PACKED format; +uint32_t reserved[8]; +} ATTRIBUTE_PACKED mx32_struct_v4l2_create_buffers; +#define MPERS_mx32_struct_v4l2_create_buffers mx32_struct_v4l2_create_buffers diff --git a/mpers-mx32/struct_v4l2_ext_control.c b/mpers-mx32/struct_v4l2_ext_control.c new file mode 100644 index 000000000..d5365dd24 --- /dev/null +++ b/mpers-mx32/struct_v4l2_ext_control.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_ext_control mpers_target_var; diff --git a/mpers-mx32/struct_v4l2_ext_control.d1 b/mpers-mx32/struct_v4l2_ext_control.d1 new file mode 100644 index 000000000..9c38b0dbd --- /dev/null +++ b/mpers-mx32/struct_v4l2_ext_control.d1 @@ -0,0 +1,250 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x208 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x4f): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x229): mpers-mx32/struct_v4l2_ext_control.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1aa): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x20f): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x158): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1ee): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xfd): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x9a): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x173): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xde): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x206): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x10b): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1e5): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <6c> DW_AT_type : <0x70> + <1><70>: Abbrev Number: 2 (DW_TAG_base_type) + <71> DW_AT_byte_size : 1 + <72> DW_AT_encoding : 6 (signed char) + <73> DW_AT_name : (indirect string, offset: 0x1a5): char + <1><77>: Abbrev Number: 4 (DW_TAG_pointer_type) + <78> DW_AT_byte_size : 4 + <79> DW_AT_type : <0x7d> + <1><7d>: Abbrev Number: 5 (DW_TAG_const_type) + <7e> DW_AT_type : <0x70> + <1><82>: Abbrev Number: 6 (DW_TAG_structure_type) + <83> DW_AT_name : (indirect string, offset: 0x11d): sysent + <87> DW_AT_byte_size : 20 + <88> DW_AT_decl_file : 1 + <89> DW_AT_decl_line : 4 + <8a> DW_AT_sibling : <0xd5> + <2><8e>: Abbrev Number: 7 (DW_TAG_member) + <8f> DW_AT_name : (indirect string, offset: 0x152): nargs + <93> DW_AT_decl_file : 1 + <94> DW_AT_decl_line : 5 + <95> DW_AT_type : <0x47> + <99> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><9c>: Abbrev Number: 7 (DW_TAG_member) + <9d> DW_AT_name : (indirect string, offset: 0xd4): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x220): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xe0> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb3): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x77> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xe0> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xd5> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x197): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x82> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf7> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe6> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0xad): _Bool + <1><103>: Abbrev Number: 11 (DW_TAG_typedef) + <104> DW_AT_name : (indirect string, offset: 0x124): __s32 + <108> DW_AT_decl_file : 2 + <109> DW_AT_decl_line : 25 + <10a> DW_AT_type : <0x2b> + <1><10e>: Abbrev Number: 11 (DW_TAG_typedef) + <10f> DW_AT_name : (indirect string, offset: 0x32): __u32 + <113> DW_AT_decl_file : 2 + <114> DW_AT_decl_line : 26 + <115> DW_AT_type : <0x47> + <1><119>: Abbrev Number: 11 (DW_TAG_typedef) + <11a> DW_AT_name : (indirect string, offset: 0x24e): __s64 + <11e> DW_AT_decl_file : 2 + <11f> DW_AT_decl_line : 29 + <120> DW_AT_type : <0x32> + <1><124>: Abbrev Number: 12 (DW_TAG_enumeration_type) + <125> DW_AT_name : (indirect string, offset: 0x162): v4l2_preemphasis + <129> DW_AT_byte_size : 4 + <12a> DW_AT_decl_file : 6 + <12b> DW_AT_decl_line : 763 + <12d> DW_AT_sibling : <0x144> + <2><131>: Abbrev Number: 13 (DW_TAG_enumerator) + <132> DW_AT_name : (indirect string, offset: 0x0): V4L2_PREEMPHASIS_DISABLED + <136> DW_AT_const_value : 0 + <2><137>: Abbrev Number: 13 (DW_TAG_enumerator) + <138> DW_AT_name : (indirect string, offset: 0x180): V4L2_PREEMPHASIS_50_uS + <13c> DW_AT_const_value : 1 + <2><13d>: Abbrev Number: 13 (DW_TAG_enumerator) + <13e> DW_AT_name : (indirect string, offset: 0x13b): V4L2_PREEMPHASIS_75_uS + <142> DW_AT_const_value : 2 + <2><143>: Abbrev Number: 0 + <1><144>: Abbrev Number: 14 (DW_TAG_union_type) + <145> DW_AT_byte_size : 8 + <146> DW_AT_decl_file : 3 + <147> DW_AT_decl_line : 1225 + <149> DW_AT_sibling : <0x172> + <2><14d>: Abbrev Number: 15 (DW_TAG_member) + <14e> DW_AT_name : (indirect string, offset: 0x38): value + <152> DW_AT_decl_file : 3 + <153> DW_AT_decl_line : 1226 + <155> DW_AT_type : <0x103> + <2><159>: Abbrev Number: 15 (DW_TAG_member) + <15a> DW_AT_name : (indirect string, offset: 0xf5): value64 + <15e> DW_AT_decl_file : 3 + <15f> DW_AT_decl_line : 1227 + <161> DW_AT_type : <0x119> + <2><165>: Abbrev Number: 15 (DW_TAG_member) + <166> DW_AT_name : (indirect string, offset: 0xbc): string + <16a> DW_AT_decl_file : 3 + <16b> DW_AT_decl_line : 1228 + <16d> DW_AT_type : <0x6a> + <2><171>: Abbrev Number: 0 + <1><172>: Abbrev Number: 16 (DW_TAG_structure_type) + <173> DW_AT_name : (indirect string, offset: 0x3e): v4l2_ext_control + <177> DW_AT_byte_size : 20 + <178> DW_AT_decl_file : 3 + <179> DW_AT_decl_line : 1221 + <17b> DW_AT_sibling : <0x1b4> + <2><17f>: Abbrev Number: 17 (DW_TAG_member) + <180> DW_AT_name : id + <183> DW_AT_decl_file : 3 + <184> DW_AT_decl_line : 1222 + <186> DW_AT_type : <0x10e> + <18a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><18d>: Abbrev Number: 18 (DW_TAG_member) + <18e> DW_AT_name : (indirect string, offset: 0x21b): size + <192> DW_AT_decl_file : 3 + <193> DW_AT_decl_line : 1223 + <195> DW_AT_type : <0x10e> + <199> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><19c>: Abbrev Number: 18 (DW_TAG_member) + <19d> DW_AT_name : (indirect string, offset: 0x1fc): reserved2 + <1a1> DW_AT_decl_file : 3 + <1a2> DW_AT_decl_line : 1224 + <1a4> DW_AT_type : <0x1b4> + <1a8> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1ab>: Abbrev Number: 19 (DW_TAG_member) + <1ac> DW_AT_type : <0x144> + <1b0> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1b3>: Abbrev Number: 0 + <1><1b4>: Abbrev Number: 20 (DW_TAG_array_type) + <1b5> DW_AT_type : <0x10e> + <1b9> DW_AT_sibling : <0x1c4> + <2><1bd>: Abbrev Number: 21 (DW_TAG_subrange_type) + <1be> DW_AT_type : <0x63> + <1c2> DW_AT_upper_bound : 0 + <2><1c3>: Abbrev Number: 0 + <1><1c4>: Abbrev Number: 11 (DW_TAG_typedef) + <1c5> DW_AT_name : (indirect string, offset: 0x1a): struct_v4l2_ext_control + <1c9> DW_AT_decl_file : 4 + <1ca> DW_AT_decl_line : 40 + <1cb> DW_AT_type : <0x172> + <1><1cf>: Abbrev Number: 22 (DW_TAG_variable) + <1d0> DW_AT_name : (indirect string, offset: 0x12a): current_wordsize + <1d4> DW_AT_decl_file : 5 + <1d5> DW_AT_decl_line : 757 + <1d7> DW_AT_type : <0x47> + <1db> DW_AT_external : 1 + <1dc> DW_AT_declaration : 1 + <1><1dd>: Abbrev Number: 22 (DW_TAG_variable) + <1de> DW_AT_name : (indirect string, offset: 0x11d): sysent + <1e2> DW_AT_decl_file : 5 + <1e3> DW_AT_decl_line : 892 + <1e5> DW_AT_type : <0xf1> + <1e9> DW_AT_external : 1 + <1ea> DW_AT_declaration : 1 + <1><1eb>: Abbrev Number: 22 (DW_TAG_variable) + <1ec> DW_AT_name : (indirect string, offset: 0x1db): nsyscalls + <1f0> DW_AT_decl_file : 5 + <1f1> DW_AT_decl_line : 903 + <1f3> DW_AT_type : <0x47> + <1f7> DW_AT_external : 1 + <1f8> DW_AT_declaration : 1 + <1><1f9>: Abbrev Number: 23 (DW_TAG_variable) + <1fa> DW_AT_name : (indirect string, offset: 0xc3): mpers_target_var + <1fe> DW_AT_decl_file : 4 + <1ff> DW_AT_decl_line : 47 + <200> DW_AT_type : <0x1c4> + <204> DW_AT_external : 1 + <205> DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) + <1><20b>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_v4l2_ext_control.d2 b/mpers-mx32/struct_v4l2_ext_control.d2 new file mode 100644 index 000000000..e1cf5f02f --- /dev/null +++ b/mpers-mx32/struct_v4l2_ext_control.d2 @@ -0,0 +1,280 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x20f): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x158): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1ee): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xfd): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x9a): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x173): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xde): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x206): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x10b): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1e5): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x70> +<1><70> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1a5): char +<1><77> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x7d> +<1><7d> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x70> +<1><82> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x11d): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd5> +<2><8e> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x152): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><9c> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd4): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x220): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xe0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb3): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x77> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xe0> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd5> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x197): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x82> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf7> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe6> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xad): _Bool +<1><103> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x124): __s32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 25 +DW_AT_type : <0x2b> +<1><10e> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x32): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><119> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x24e): __s64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 29 +DW_AT_type : <0x32> +<1><124> +Abbrev Number: 12 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x162): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x144> +<2><131> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x0): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><137> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x180): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><13d> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x13b): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><144> +Abbrev Number: 14 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1225 +DW_AT_sibling : <0x172> +<2><14d> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x38): value +DW_AT_decl_file : 3 +DW_AT_decl_line : 1226 +DW_AT_type : <0x103> +<2><159> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf5): value64 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1227 +DW_AT_type : <0x119> +<2><165> +Abbrev Number: 15 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xbc): string +DW_AT_decl_file : 3 +DW_AT_decl_line : 1228 +DW_AT_type : <0x6a> +<1><172> +Abbrev Number: 16 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x3e): v4l2_ext_control +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1221 +DW_AT_sibling : <0x1b4> +<2><17f> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : id +DW_AT_decl_file : 3 +DW_AT_decl_line : 1222 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><18d> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x21b): size +DW_AT_decl_file : 3 +DW_AT_decl_line : 1223 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><19c> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1fc): reserved2 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1224 +DW_AT_type : <0x1b4> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1ab> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_type : <0x144> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1b4> +Abbrev Number: 20 (DW_TAG_array_type) +DW_AT_type : <0x10e> +DW_AT_sibling : <0x1c4> +<2><1bd> +Abbrev Number: 21 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 0 +<1><1c4> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1a): struct_v4l2_ext_control +DW_AT_decl_file : 4 +DW_AT_decl_line : 40 +DW_AT_type : <0x172> +<1><1cf> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x12a): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1dd> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x11d): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xf1> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1eb> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1db): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><1f9> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc3): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x1c4> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) diff --git a/mpers-mx32/struct_v4l2_ext_control.h b/mpers-mx32/struct_v4l2_ext_control.h new file mode 100644 index 000000000..8316c9a9d --- /dev/null +++ b/mpers-mx32/struct_v4l2_ext_control.h @@ -0,0 +1,14 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t id; +uint32_t size; +uint32_t reserved2[1]; +union { +int32_t value; +int64_t value64; +mpers_ptr_t string; +} ; +} ATTRIBUTE_PACKED mx32_struct_v4l2_ext_control; +#define MPERS_mx32_struct_v4l2_ext_control mx32_struct_v4l2_ext_control diff --git a/mpers-mx32/struct_v4l2_ext_controls.c b/mpers-mx32/struct_v4l2_ext_controls.c new file mode 100644 index 000000000..626f230e2 --- /dev/null +++ b/mpers-mx32/struct_v4l2_ext_controls.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_ext_controls mpers_target_var; diff --git a/mpers-mx32/struct_v4l2_ext_controls.d1 b/mpers-mx32/struct_v4l2_ext_controls.d1 new file mode 100644 index 000000000..2cf9e8e71 --- /dev/null +++ b/mpers-mx32/struct_v4l2_ext_controls.d1 @@ -0,0 +1,297 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x277 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x69): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x43): mpers-mx32/struct_v4l2_ext_controls.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x205): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x275): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1a9): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x249): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x12c): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0xb4): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1ce): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xfb): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x261): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x13a): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x240): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <6c> DW_AT_type : <0x70> + <1><70>: Abbrev Number: 2 (DW_TAG_base_type) + <71> DW_AT_byte_size : 1 + <72> DW_AT_encoding : 6 (signed char) + <73> DW_AT_name : (indirect string, offset: 0x200): char + <1><77>: Abbrev Number: 4 (DW_TAG_pointer_type) + <78> DW_AT_byte_size : 4 + <79> DW_AT_type : <0x7d> + <1><7d>: Abbrev Number: 5 (DW_TAG_const_type) + <7e> DW_AT_type : <0x70> + <1><82>: Abbrev Number: 6 (DW_TAG_structure_type) + <83> DW_AT_name : (indirect string, offset: 0x14c): sysent + <87> DW_AT_byte_size : 20 + <88> DW_AT_decl_file : 1 + <89> DW_AT_decl_line : 4 + <8a> DW_AT_sibling : <0xd5> + <2><8e>: Abbrev Number: 7 (DW_TAG_member) + <8f> DW_AT_name : (indirect string, offset: 0x1a3): nargs + <93> DW_AT_decl_file : 1 + <94> DW_AT_decl_line : 5 + <95> DW_AT_type : <0x47> + <99> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><9c>: Abbrev Number: 7 (DW_TAG_member) + <9d> DW_AT_name : (indirect string, offset: 0xf1): sys_flags + DW_AT_decl_file : 1 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x286): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xe0> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xd0): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x77> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xe0> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xd5> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1f2): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x82> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf7> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe6> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x1a): _Bool + <1><103>: Abbrev Number: 11 (DW_TAG_typedef) + <104> DW_AT_name : (indirect string, offset: 0x16c): __s32 + <108> DW_AT_decl_file : 2 + <109> DW_AT_decl_line : 25 + <10a> DW_AT_type : <0x2b> + <1><10e>: Abbrev Number: 11 (DW_TAG_typedef) + <10f> DW_AT_name : (indirect string, offset: 0x20): __u32 + <113> DW_AT_decl_file : 2 + <114> DW_AT_decl_line : 26 + <115> DW_AT_type : <0x47> + <1><119>: Abbrev Number: 11 (DW_TAG_typedef) + <11a> DW_AT_name : (indirect string, offset: 0x28f): __s64 + <11e> DW_AT_decl_file : 2 + <11f> DW_AT_decl_line : 29 + <120> DW_AT_type : <0x32> + <1><124>: Abbrev Number: 12 (DW_TAG_enumeration_type) + <125> DW_AT_name : (indirect string, offset: 0x1b3): v4l2_preemphasis + <129> DW_AT_byte_size : 4 + <12a> DW_AT_decl_file : 6 + <12b> DW_AT_decl_line : 763 + <12d> DW_AT_sibling : <0x144> + <2><131>: Abbrev Number: 13 (DW_TAG_enumerator) + <132> DW_AT_name : (indirect string, offset: 0x0): V4L2_PREEMPHASIS_DISABLED + <136> DW_AT_const_value : 0 + <2><137>: Abbrev Number: 13 (DW_TAG_enumerator) + <138> DW_AT_name : (indirect string, offset: 0x1db): V4L2_PREEMPHASIS_50_uS + <13c> DW_AT_const_value : 1 + <2><13d>: Abbrev Number: 13 (DW_TAG_enumerator) + <13e> DW_AT_name : (indirect string, offset: 0x183): V4L2_PREEMPHASIS_75_uS + <142> DW_AT_const_value : 2 + <2><143>: Abbrev Number: 0 + <1><144>: Abbrev Number: 14 (DW_TAG_array_type) + <145> DW_AT_type : <0x10e> + <149> DW_AT_sibling : <0x154> + <2><14d>: Abbrev Number: 15 (DW_TAG_subrange_type) + <14e> DW_AT_type : <0x63> + <152> DW_AT_upper_bound : 1 + <2><153>: Abbrev Number: 0 + <1><154>: Abbrev Number: 16 (DW_TAG_union_type) + <155> DW_AT_byte_size : 8 + <156> DW_AT_decl_file : 3 + <157> DW_AT_decl_line : 1225 + <159> DW_AT_sibling : <0x182> + <2><15d>: Abbrev Number: 17 (DW_TAG_member) + <15e> DW_AT_name : (indirect string, offset: 0x26): value + <162> DW_AT_decl_file : 3 + <163> DW_AT_decl_line : 1226 + <165> DW_AT_type : <0x103> + <2><169>: Abbrev Number: 17 (DW_TAG_member) + <16a> DW_AT_name : (indirect string, offset: 0x124): value64 + <16e> DW_AT_decl_file : 3 + <16f> DW_AT_decl_line : 1227 + <171> DW_AT_type : <0x119> + <2><175>: Abbrev Number: 17 (DW_TAG_member) + <176> DW_AT_name : (indirect string, offset: 0xd9): string + <17a> DW_AT_decl_file : 3 + <17b> DW_AT_decl_line : 1228 + <17d> DW_AT_type : <0x6a> + <2><181>: Abbrev Number: 0 + <1><182>: Abbrev Number: 18 (DW_TAG_structure_type) + <183> DW_AT_name : (indirect string, offset: 0x32): v4l2_ext_control + <187> DW_AT_byte_size : 20 + <188> DW_AT_decl_file : 3 + <189> DW_AT_decl_line : 1221 + <18b> DW_AT_sibling : <0x1c4> + <2><18f>: Abbrev Number: 19 (DW_TAG_member) + <190> DW_AT_name : id + <193> DW_AT_decl_file : 3 + <194> DW_AT_decl_line : 1222 + <196> DW_AT_type : <0x10e> + <19a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><19d>: Abbrev Number: 20 (DW_TAG_member) + <19e> DW_AT_name : (indirect string, offset: 0x281): size + <1a2> DW_AT_decl_file : 3 + <1a3> DW_AT_decl_line : 1223 + <1a5> DW_AT_type : <0x10e> + <1a9> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1ac>: Abbrev Number: 20 (DW_TAG_member) + <1ad> DW_AT_name : (indirect string, offset: 0x257): reserved2 + <1b1> DW_AT_decl_file : 3 + <1b2> DW_AT_decl_line : 1224 + <1b4> DW_AT_type : <0x1c4> + <1b8> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1bb>: Abbrev Number: 21 (DW_TAG_member) + <1bc> DW_AT_type : <0x154> + <1c0> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1c3>: Abbrev Number: 0 + <1><1c4>: Abbrev Number: 14 (DW_TAG_array_type) + <1c5> DW_AT_type : <0x10e> + <1c9> DW_AT_sibling : <0x1d4> + <2><1cd>: Abbrev Number: 15 (DW_TAG_subrange_type) + <1ce> DW_AT_type : <0x63> + <1d2> DW_AT_upper_bound : 0 + <2><1d3>: Abbrev Number: 0 + <1><1d4>: Abbrev Number: 18 (DW_TAG_structure_type) + <1d5> DW_AT_name : (indirect string, offset: 0x112): v4l2_ext_controls + <1d9> DW_AT_byte_size : 24 + <1da> DW_AT_decl_file : 3 + <1db> DW_AT_decl_line : 1232 + <1dd> DW_AT_sibling : <0x22d> + <2><1e1>: Abbrev Number: 20 (DW_TAG_member) + <1e2> DW_AT_name : (indirect string, offset: 0x26a): ctrl_class + <1e6> DW_AT_decl_file : 3 + <1e7> DW_AT_decl_line : 1233 + <1e9> DW_AT_type : <0x10e> + <1ed> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1f0>: Abbrev Number: 20 (DW_TAG_member) + <1f1> DW_AT_name : (indirect string, offset: 0x2c): count + <1f5> DW_AT_decl_file : 3 + <1f6> DW_AT_decl_line : 1234 + <1f8> DW_AT_type : <0x10e> + <1fc> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1ff>: Abbrev Number: 20 (DW_TAG_member) + <200> DW_AT_name : (indirect string, offset: 0x1c4): error_idx + <204> DW_AT_decl_file : 3 + <205> DW_AT_decl_line : 1235 + <207> DW_AT_type : <0x10e> + <20b> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><20e>: Abbrev Number: 20 (DW_TAG_member) + <20f> DW_AT_name : (indirect string, offset: 0x19a): reserved + <213> DW_AT_decl_file : 3 + <214> DW_AT_decl_line : 1236 + <216> DW_AT_type : <0x144> + <21a> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><21d>: Abbrev Number: 20 (DW_TAG_member) + <21e> DW_AT_name : (indirect string, offset: 0xc7): controls + <222> DW_AT_decl_file : 3 + <223> DW_AT_decl_line : 1237 + <225> DW_AT_type : <0x22d> + <229> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><22c>: Abbrev Number: 0 + <1><22d>: Abbrev Number: 4 (DW_TAG_pointer_type) + <22e> DW_AT_byte_size : 4 + <22f> DW_AT_type : <0x182> + <1><233>: Abbrev Number: 11 (DW_TAG_typedef) + <234> DW_AT_name : (indirect string, offset: 0x153): struct_v4l2_ext_controls + <238> DW_AT_decl_file : 4 + <239> DW_AT_decl_line : 41 + <23a> DW_AT_type : <0x1d4> + <1><23e>: Abbrev Number: 22 (DW_TAG_variable) + <23f> DW_AT_name : (indirect string, offset: 0x172): current_wordsize + <243> DW_AT_decl_file : 5 + <244> DW_AT_decl_line : 757 + <246> DW_AT_type : <0x47> + <24a> DW_AT_external : 1 + <24b> DW_AT_declaration : 1 + <1><24c>: Abbrev Number: 22 (DW_TAG_variable) + <24d> DW_AT_name : (indirect string, offset: 0x14c): sysent + <251> DW_AT_decl_file : 5 + <252> DW_AT_decl_line : 892 + <254> DW_AT_type : <0xf1> + <258> DW_AT_external : 1 + <259> DW_AT_declaration : 1 + <1><25a>: Abbrev Number: 22 (DW_TAG_variable) + <25b> DW_AT_name : (indirect string, offset: 0x236): nsyscalls + <25f> DW_AT_decl_file : 5 + <260> DW_AT_decl_line : 903 + <262> DW_AT_type : <0x47> + <266> DW_AT_external : 1 + <267> DW_AT_declaration : 1 + <1><268>: Abbrev Number: 23 (DW_TAG_variable) + <269> DW_AT_name : (indirect string, offset: 0xe0): mpers_target_var + <26d> DW_AT_decl_file : 4 + <26e> DW_AT_decl_line : 47 + <26f> DW_AT_type : <0x233> + <273> DW_AT_external : 1 + <274> DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) + <1><27a>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_v4l2_ext_controls.d2 b/mpers-mx32/struct_v4l2_ext_controls.d2 new file mode 100644 index 000000000..376d827a9 --- /dev/null +++ b/mpers-mx32/struct_v4l2_ext_controls.d2 @@ -0,0 +1,334 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x275): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a9): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x249): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x12c): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb4): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1ce): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xfb): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x261): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x13a): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x240): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x70> +<1><70> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x200): char +<1><77> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x7d> +<1><7d> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x70> +<1><82> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x14c): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd5> +<2><8e> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a3): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><9c> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xf1): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x286): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xe0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd0): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x77> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xe0> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd5> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1f2): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x82> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf7> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe6> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x1a): _Bool +<1><103> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x16c): __s32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 25 +DW_AT_type : <0x2b> +<1><10e> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x20): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><119> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x28f): __s64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 29 +DW_AT_type : <0x32> +<1><124> +Abbrev Number: 12 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x1b3): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x144> +<2><131> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x0): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><137> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1db): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><13d> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x183): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><144> +Abbrev Number: 14 (DW_TAG_array_type) +DW_AT_type : <0x10e> +DW_AT_sibling : <0x154> +<2><14d> +Abbrev Number: 15 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><154> +Abbrev Number: 16 (DW_TAG_union_type) +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1225 +DW_AT_sibling : <0x182> +<2><15d> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x26): value +DW_AT_decl_file : 3 +DW_AT_decl_line : 1226 +DW_AT_type : <0x103> +<2><169> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x124): value64 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1227 +DW_AT_type : <0x119> +<2><175> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xd9): string +DW_AT_decl_file : 3 +DW_AT_decl_line : 1228 +DW_AT_type : <0x6a> +<1><182> +Abbrev Number: 18 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x32): v4l2_ext_control +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1221 +DW_AT_sibling : <0x1c4> +<2><18f> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : id +DW_AT_decl_file : 3 +DW_AT_decl_line : 1222 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><19d> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x281): size +DW_AT_decl_file : 3 +DW_AT_decl_line : 1223 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1ac> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x257): reserved2 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1224 +DW_AT_type : <0x1c4> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1bb> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_type : <0x154> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1c4> +Abbrev Number: 14 (DW_TAG_array_type) +DW_AT_type : <0x10e> +DW_AT_sibling : <0x1d4> +<2><1cd> +Abbrev Number: 15 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 0 +<1><1d4> +Abbrev Number: 18 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x112): v4l2_ext_controls +DW_AT_byte_size : 24 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1232 +DW_AT_sibling : <0x22d> +<2><1e1> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x26a): ctrl_class +DW_AT_decl_file : 3 +DW_AT_decl_line : 1233 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1f0> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x2c): count +DW_AT_decl_file : 3 +DW_AT_decl_line : 1234 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1ff> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c4): error_idx +DW_AT_decl_file : 3 +DW_AT_decl_line : 1235 +DW_AT_type : <0x10e> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><20e> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x19a): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1236 +DW_AT_type : <0x144> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><21d> +Abbrev Number: 20 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc7): controls +DW_AT_decl_file : 3 +DW_AT_decl_line : 1237 +DW_AT_type : <0x22d> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<1><22d> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x182> +<1><233> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x153): struct_v4l2_ext_controls +DW_AT_decl_file : 4 +DW_AT_decl_line : 41 +DW_AT_type : <0x1d4> +<1><23e> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x172): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><24c> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x14c): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xf1> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><25a> +Abbrev Number: 22 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x236): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><268> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe0): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x233> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) diff --git a/mpers-mx32/struct_v4l2_ext_controls.h b/mpers-mx32/struct_v4l2_ext_controls.h new file mode 100644 index 000000000..7d6a22e2e --- /dev/null +++ b/mpers-mx32/struct_v4l2_ext_controls.h @@ -0,0 +1,11 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t ctrl_class; +uint32_t count; +uint32_t error_idx; +uint32_t reserved[2]; +mpers_ptr_t controls; +} ATTRIBUTE_PACKED mx32_struct_v4l2_ext_controls; +#define MPERS_mx32_struct_v4l2_ext_controls mx32_struct_v4l2_ext_controls diff --git a/mpers-mx32/struct_v4l2_format.c b/mpers-mx32/struct_v4l2_format.c new file mode 100644 index 000000000..fd7973f54 --- /dev/null +++ b/mpers-mx32/struct_v4l2_format.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_format mpers_target_var; diff --git a/mpers-mx32/struct_v4l2_format.d1 b/mpers-mx32/struct_v4l2_format.d1 new file mode 100644 index 000000000..d06e1c427 --- /dev/null +++ b/mpers-mx32/struct_v4l2_format.d1 @@ -0,0 +1,628 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x586 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x2b1): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0xc1): mpers-mx32/struct_v4l2_format.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x399): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1b1): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x29): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0xf3): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0x16f): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x24b): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1e6): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x1c3): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x10e): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x301): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x33): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x27f): char + <1><73>: Abbrev Number: 5 (DW_TAG_pointer_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_type : <0x79> + <1><79>: Abbrev Number: 6 (DW_TAG_const_type) + <7a> DW_AT_type : <0x6c> + <1><7e>: Abbrev Number: 7 (DW_TAG_structure_type) + <7f> DW_AT_name : (indirect string, offset: 0x352): sysent + <83> DW_AT_byte_size : 20 + <84> DW_AT_decl_file : 1 + <85> DW_AT_decl_line : 4 + <86> DW_AT_sibling : <0xd1> + <2><8a>: Abbrev Number: 8 (DW_TAG_member) + <8b> DW_AT_name : (indirect string, offset: 0x313): nargs + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 5 + <91> DW_AT_type : <0x47> + <95> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><98>: Abbrev Number: 8 (DW_TAG_member) + <99> DW_AT_name : (indirect string, offset: 0x6a): sys_flags + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 6 + <9f> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x16): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xdc> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x50): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x73> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xdc> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) +
DW_AT_byte_size : 4 + DW_AT_type : <0xd1> + <1>: Abbrev Number: 12 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x325): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7e> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf3> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xe2> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x289): _Bool + <1>: Abbrev Number: 12 (DW_TAG_typedef) + <100> DW_AT_name : (indirect string, offset: 0x2fc): __u8 + <104> DW_AT_decl_file : 2 + <105> DW_AT_decl_line : 20 + <106> DW_AT_type : <0x39> + <1><10a>: Abbrev Number: 12 (DW_TAG_typedef) + <10b> DW_AT_name : (indirect string, offset: 0x2ab): __u16 + <10f> DW_AT_decl_file : 2 + <110> DW_AT_decl_line : 23 + <111> DW_AT_type : <0x40> + <1><115>: Abbrev Number: 12 (DW_TAG_typedef) + <116> DW_AT_name : (indirect string, offset: 0x319): __s32 + <11a> DW_AT_decl_file : 2 + <11b> DW_AT_decl_line : 25 + <11c> DW_AT_type : <0x2b> + <1><120>: Abbrev Number: 12 (DW_TAG_typedef) + <121> DW_AT_name : (indirect string, offset: 0xaa): __u32 + <125> DW_AT_decl_file : 2 + <126> DW_AT_decl_line : 26 + <127> DW_AT_type : <0x47> + <1><12b>: Abbrev Number: 13 (DW_TAG_enumeration_type) + <12c> DW_AT_name : (indirect string, offset: 0x333): v4l2_preemphasis + <130> DW_AT_byte_size : 4 + <131> DW_AT_decl_file : 6 + <132> DW_AT_decl_line : 763 + <134> DW_AT_sibling : <0x14b> + <2><138>: Abbrev Number: 14 (DW_TAG_enumerator) + <139> DW_AT_name : (indirect string, offset: 0x221): V4L2_PREEMPHASIS_DISABLED + <13d> DW_AT_const_value : 0 + <2><13e>: Abbrev Number: 14 (DW_TAG_enumerator) + <13f> DW_AT_name : (indirect string, offset: 0x1fe): V4L2_PREEMPHASIS_50_uS + <143> DW_AT_const_value : 1 + <2><144>: Abbrev Number: 14 (DW_TAG_enumerator) + <145> DW_AT_name : (indirect string, offset: 0x84): V4L2_PREEMPHASIS_75_uS + <149> DW_AT_const_value : 2 + <2><14a>: Abbrev Number: 0 + <1><14b>: Abbrev Number: 7 (DW_TAG_structure_type) + <14c> DW_AT_name : (indirect string, offset: 0xc): v4l2_rect + <150> DW_AT_byte_size : 16 + <151> DW_AT_decl_file : 3 + <152> DW_AT_decl_line : 205 + <153> DW_AT_sibling : <0x190> + <2><157>: Abbrev Number: 8 (DW_TAG_member) + <158> DW_AT_name : (indirect string, offset: 0x284): left + <15c> DW_AT_decl_file : 3 + <15d> DW_AT_decl_line : 206 + <15e> DW_AT_type : <0x115> + <162> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><165>: Abbrev Number: 9 (DW_TAG_member) + <166> DW_AT_name : top + <16a> DW_AT_decl_file : 3 + <16b> DW_AT_decl_line : 207 + <16c> DW_AT_type : <0x115> + <170> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><173>: Abbrev Number: 8 (DW_TAG_member) + <174> DW_AT_name : (indirect string, offset: 0xed): width + <178> DW_AT_decl_file : 3 + <179> DW_AT_decl_line : 208 + <17a> DW_AT_type : <0x115> + <17e> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><181>: Abbrev Number: 8 (DW_TAG_member) + <182> DW_AT_name : (indirect string, offset: 0x1df): height + <186> DW_AT_decl_file : 3 + <187> DW_AT_decl_line : 209 + <188> DW_AT_type : <0x115> + <18c> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><18f>: Abbrev Number: 0 + <1><190>: Abbrev Number: 15 (DW_TAG_structure_type) + <191> DW_AT_name : (indirect string, offset: 0x29b): v4l2_pix_format + <195> DW_AT_byte_size : 32 + <196> DW_AT_decl_file : 3 + <197> DW_AT_decl_line : 274 + <199> DW_AT_sibling : <0x216> + <2><19d>: Abbrev Number: 16 (DW_TAG_member) + <19e> DW_AT_name : (indirect string, offset: 0xed): width + <1a2> DW_AT_decl_file : 3 + <1a3> DW_AT_decl_line : 275 + <1a5> DW_AT_type : <0x120> + <1a9> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1ac>: Abbrev Number: 16 (DW_TAG_member) + <1ad> DW_AT_name : (indirect string, offset: 0x1df): height + <1b1> DW_AT_decl_file : 3 + <1b2> DW_AT_decl_line : 276 + <1b4> DW_AT_type : <0x120> + <1b8> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1bb>: Abbrev Number: 16 (DW_TAG_member) + <1bc> DW_AT_name : (indirect string, offset: 0x3c): pixelformat + <1c0> DW_AT_decl_file : 3 + <1c1> DW_AT_decl_line : 277 + <1c3> DW_AT_type : <0x120> + <1c7> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1ca>: Abbrev Number: 16 (DW_TAG_member) + <1cb> DW_AT_name : (indirect string, offset: 0x9b): field + <1cf> DW_AT_decl_file : 3 + <1d0> DW_AT_decl_line : 278 + <1d2> DW_AT_type : <0x120> + <1d6> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1d9>: Abbrev Number: 16 (DW_TAG_member) + <1da> DW_AT_name : (indirect string, offset: 0x101): bytesperline + <1de> DW_AT_decl_file : 3 + <1df> DW_AT_decl_line : 279 + <1e1> DW_AT_type : <0x120> + <1e5> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><1e8>: Abbrev Number: 16 (DW_TAG_member) + <1e9> DW_AT_name : (indirect string, offset: 0x1f): sizeimage + <1ed> DW_AT_decl_file : 3 + <1ee> DW_AT_decl_line : 280 + <1f0> DW_AT_type : <0x120> + <1f4> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><1f7>: Abbrev Number: 16 (DW_TAG_member) + <1f8> DW_AT_name : (indirect string, offset: 0x140): colorspace + <1fc> DW_AT_decl_file : 3 + <1fd> DW_AT_decl_line : 281 + <1ff> DW_AT_type : <0x120> + <203> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><206>: Abbrev Number: 16 (DW_TAG_member) + <207> DW_AT_name : (indirect string, offset: 0x0): priv + <20b> DW_AT_decl_file : 3 + <20c> DW_AT_decl_line : 282 + <20e> DW_AT_type : <0x120> + <212> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><215>: Abbrev Number: 0 + <1><216>: Abbrev Number: 17 (DW_TAG_array_type) + <217> DW_AT_type : <0x120> + <21b> DW_AT_sibling : <0x226> + <2><21f>: Abbrev Number: 18 (DW_TAG_subrange_type) + <220> DW_AT_type : <0x63> + <224> DW_AT_upper_bound : 1 + <2><225>: Abbrev Number: 0 + <1><226>: Abbrev Number: 15 (DW_TAG_structure_type) + <227> DW_AT_name : (indirect string, offset: 0x359): v4l2_clip + <22b> DW_AT_byte_size : 20 + <22c> DW_AT_decl_file : 3 + <22d> DW_AT_decl_line : 745 + <22f> DW_AT_sibling : <0x250> + <2><233>: Abbrev Number: 19 (DW_TAG_member) + <234> DW_AT_name : c + <236> DW_AT_decl_file : 3 + <237> DW_AT_decl_line : 746 + <239> DW_AT_type : <0x14b> + <23d> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><240>: Abbrev Number: 16 (DW_TAG_member) + <241> DW_AT_name : (indirect string, offset: 0x386): next + <245> DW_AT_decl_file : 3 + <246> DW_AT_decl_line : 747 + <248> DW_AT_type : <0x250> + <24c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><24f>: Abbrev Number: 0 + <1><250>: Abbrev Number: 5 (DW_TAG_pointer_type) + <251> DW_AT_byte_size : 4 + <252> DW_AT_type : <0x226> + <1><256>: Abbrev Number: 15 (DW_TAG_structure_type) + <257> DW_AT_name : (indirect string, offset: 0xe1): v4l2_window + <25b> DW_AT_byte_size : 40 + <25c> DW_AT_decl_file : 3 + <25d> DW_AT_decl_line : 750 + <25f> DW_AT_sibling : <0x2cb> + <2><263>: Abbrev Number: 19 (DW_TAG_member) + <264> DW_AT_name : w + <266> DW_AT_decl_file : 3 + <267> DW_AT_decl_line : 751 + <269> DW_AT_type : <0x14b> + <26d> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><270>: Abbrev Number: 16 (DW_TAG_member) + <271> DW_AT_name : (indirect string, offset: 0x9b): field + <275> DW_AT_decl_file : 3 + <276> DW_AT_decl_line : 752 + <278> DW_AT_type : <0x120> + <27c> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><27f>: Abbrev Number: 16 (DW_TAG_member) + <280> DW_AT_name : (indirect string, offset: 0x36d): chromakey + <284> DW_AT_decl_file : 3 + <285> DW_AT_decl_line : 753 + <287> DW_AT_type : <0x120> + <28b> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><28e>: Abbrev Number: 16 (DW_TAG_member) + <28f> DW_AT_name : (indirect string, offset: 0x380): clips + <293> DW_AT_decl_file : 3 + <294> DW_AT_decl_line : 754 + <296> DW_AT_type : <0x250> + <29a> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><29d>: Abbrev Number: 16 (DW_TAG_member) + <29e> DW_AT_name : (indirect string, offset: 0xb7): clipcount + <2a2> DW_AT_decl_file : 3 + <2a3> DW_AT_decl_line : 755 + <2a5> DW_AT_type : <0x120> + <2a9> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><2ac>: Abbrev Number: 16 (DW_TAG_member) + <2ad> DW_AT_name : (indirect string, offset: 0xb0): bitmap + <2b1> DW_AT_decl_file : 3 + <2b2> DW_AT_decl_line : 756 + <2b4> DW_AT_type : <0x6a> + <2b8> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><2bb>: Abbrev Number: 16 (DW_TAG_member) + <2bc> DW_AT_name : (indirect string, offset: 0x14b): global_alpha + <2c0> DW_AT_decl_file : 3 + <2c1> DW_AT_decl_line : 757 + <2c3> DW_AT_type : <0xff> + <2c7> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><2ca>: Abbrev Number: 0 + <1><2cb>: Abbrev Number: 15 (DW_TAG_structure_type) + <2cc> DW_AT_name : (indirect string, offset: 0x74): v4l2_vbi_format + <2d0> DW_AT_byte_size : 44 + <2d1> DW_AT_decl_file : 3 + <2d2> DW_AT_decl_line : 1541 + <2d4> DW_AT_sibling : <0x351> + <2><2d8>: Abbrev Number: 16 (DW_TAG_member) + <2d9> DW_AT_name : (indirect string, offset: 0x271): sampling_rate + <2dd> DW_AT_decl_file : 3 + <2de> DW_AT_decl_line : 1542 + <2e0> DW_AT_type : <0x120> + <2e4> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><2e7>: Abbrev Number: 16 (DW_TAG_member) + <2e8> DW_AT_name : (indirect string, offset: 0x128): offset + <2ec> DW_AT_decl_file : 3 + <2ed> DW_AT_decl_line : 1543 + <2ef> DW_AT_type : <0x120> + <2f3> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><2f6>: Abbrev Number: 16 (DW_TAG_member) + <2f7> DW_AT_name : (indirect string, offset: 0x59): samples_per_line + <2fb> DW_AT_decl_file : 3 + <2fc> DW_AT_decl_line : 1544 + <2fe> DW_AT_type : <0x120> + <302> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><305>: Abbrev Number: 16 (DW_TAG_member) + <306> DW_AT_name : (indirect string, offset: 0x38b): sample_format + <30a> DW_AT_decl_file : 3 + <30b> DW_AT_decl_line : 1545 + <30d> DW_AT_type : <0x120> + <311> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><314>: Abbrev Number: 16 (DW_TAG_member) + <315> DW_AT_name : (indirect string, offset: 0x245): start + <319> DW_AT_decl_file : 3 + <31a> DW_AT_decl_line : 1546 + <31c> DW_AT_type : <0x351> + <320> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><323>: Abbrev Number: 16 (DW_TAG_member) + <324> DW_AT_name : (indirect string, offset: 0x31f): count + <328> DW_AT_decl_file : 3 + <329> DW_AT_decl_line : 1547 + <32b> DW_AT_type : <0x216> + <32f> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><332>: Abbrev Number: 16 (DW_TAG_member) + <333> DW_AT_name : (indirect string, offset: 0x1bd): flags + <337> DW_AT_decl_file : 3 + <338> DW_AT_decl_line : 1548 + <33a> DW_AT_type : <0x120> + <33e> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><341>: Abbrev Number: 16 (DW_TAG_member) + <342> DW_AT_name : (indirect string, offset: 0x377): reserved + <346> DW_AT_decl_file : 3 + <347> DW_AT_decl_line : 1549 + <349> DW_AT_type : <0x216> + <34d> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><350>: Abbrev Number: 0 + <1><351>: Abbrev Number: 17 (DW_TAG_array_type) + <352> DW_AT_type : <0x115> + <356> DW_AT_sibling : <0x361> + <2><35a>: Abbrev Number: 18 (DW_TAG_subrange_type) + <35b> DW_AT_type : <0x63> + <35f> DW_AT_upper_bound : 1 + <2><360>: Abbrev Number: 0 + <1><361>: Abbrev Number: 15 (DW_TAG_structure_type) + <362> DW_AT_name : (indirect string, offset: 0x193): v4l2_sliced_vbi_format + <366> DW_AT_byte_size : 112 + <367> DW_AT_decl_file : 3 + <368> DW_AT_decl_line : 1563 + <36a> DW_AT_sibling : <0x3ab> + <2><36e>: Abbrev Number: 16 (DW_TAG_member) + <36f> DW_AT_name : (indirect string, offset: 0x28f): service_set + <373> DW_AT_decl_file : 3 + <374> DW_AT_decl_line : 1564 + <376> DW_AT_type : <0x10a> + <37a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><37d>: Abbrev Number: 16 (DW_TAG_member) + <37e> DW_AT_name : (indirect string, offset: 0x344): service_lines + <382> DW_AT_decl_file : 3 + <383> DW_AT_decl_line : 1569 + <385> DW_AT_type : <0x3ab> + <389> DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) + <2><38c>: Abbrev Number: 16 (DW_TAG_member) + <38d> DW_AT_name : (indirect string, offset: 0x48): io_size + <391> DW_AT_decl_file : 3 + <392> DW_AT_decl_line : 1570 + <394> DW_AT_type : <0x120> + <398> DW_AT_data_member_location: 2 byte block: 23 64 (DW_OP_plus_uconst: 100) + <2><39b>: Abbrev Number: 16 (DW_TAG_member) + <39c> DW_AT_name : (indirect string, offset: 0x377): reserved + <3a0> DW_AT_decl_file : 3 + <3a1> DW_AT_decl_line : 1571 + <3a3> DW_AT_type : <0x216> + <3a7> DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) + <2><3aa>: Abbrev Number: 0 + <1><3ab>: Abbrev Number: 17 (DW_TAG_array_type) + <3ac> DW_AT_type : <0x10a> + <3b0> DW_AT_sibling : <0x3c1> + <2><3b4>: Abbrev Number: 18 (DW_TAG_subrange_type) + <3b5> DW_AT_type : <0x63> + <3b9> DW_AT_upper_bound : 1 + <2><3ba>: Abbrev Number: 18 (DW_TAG_subrange_type) + <3bb> DW_AT_type : <0x63> + <3bf> DW_AT_upper_bound : 23 + <2><3c0>: Abbrev Number: 0 + <1><3c1>: Abbrev Number: 15 (DW_TAG_structure_type) + <3c2> DW_AT_name : (indirect string, offset: 0x17d): v4l2_plane_pix_format + <3c6> DW_AT_byte_size : 20 + <3c7> DW_AT_decl_file : 3 + <3c8> DW_AT_decl_line : 1664 + <3ca> DW_AT_sibling : <0x3fc> + <2><3ce>: Abbrev Number: 16 (DW_TAG_member) + <3cf> DW_AT_name : (indirect string, offset: 0x1f): sizeimage + <3d3> DW_AT_decl_file : 3 + <3d4> DW_AT_decl_line : 1665 + <3d6> DW_AT_type : <0x120> + <3da> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><3dd>: Abbrev Number: 16 (DW_TAG_member) + <3de> DW_AT_name : (indirect string, offset: 0x101): bytesperline + <3e2> DW_AT_decl_file : 3 + <3e3> DW_AT_decl_line : 1666 + <3e5> DW_AT_type : <0x10a> + <3e9> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><3ec>: Abbrev Number: 16 (DW_TAG_member) + <3ed> DW_AT_name : (indirect string, offset: 0x377): reserved + <3f1> DW_AT_decl_file : 3 + <3f2> DW_AT_decl_line : 1667 + <3f4> DW_AT_type : <0x3fc> + <3f8> DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) + <2><3fb>: Abbrev Number: 0 + <1><3fc>: Abbrev Number: 17 (DW_TAG_array_type) + <3fd> DW_AT_type : <0x10a> + <401> DW_AT_sibling : <0x40c> + <2><405>: Abbrev Number: 18 (DW_TAG_subrange_type) + <406> DW_AT_type : <0x63> + <40a> DW_AT_upper_bound : 6 + <2><40b>: Abbrev Number: 0 + <1><40c>: Abbrev Number: 15 (DW_TAG_structure_type) + <40d> DW_AT_name : (indirect string, offset: 0x158): v4l2_pix_format_mplane + <411> DW_AT_byte_size : 192 + <412> DW_AT_decl_file : 3 + <413> DW_AT_decl_line : 1680 + <415> DW_AT_sibling : <0x494> + <2><419>: Abbrev Number: 16 (DW_TAG_member) + <41a> DW_AT_name : (indirect string, offset: 0xed): width + <41e> DW_AT_decl_file : 3 + <41f> DW_AT_decl_line : 1681 + <421> DW_AT_type : <0x120> + <425> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><428>: Abbrev Number: 16 (DW_TAG_member) + <429> DW_AT_name : (indirect string, offset: 0x1df): height + <42d> DW_AT_decl_file : 3 + <42e> DW_AT_decl_line : 1682 + <430> DW_AT_type : <0x120> + <434> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><437>: Abbrev Number: 16 (DW_TAG_member) + <438> DW_AT_name : (indirect string, offset: 0x3c): pixelformat + <43c> DW_AT_decl_file : 3 + <43d> DW_AT_decl_line : 1683 + <43f> DW_AT_type : <0x120> + <443> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><446>: Abbrev Number: 16 (DW_TAG_member) + <447> DW_AT_name : (indirect string, offset: 0x9b): field + <44b> DW_AT_decl_file : 3 + <44c> DW_AT_decl_line : 1684 + <44e> DW_AT_type : <0x120> + <452> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><455>: Abbrev Number: 16 (DW_TAG_member) + <456> DW_AT_name : (indirect string, offset: 0x140): colorspace + <45a> DW_AT_decl_file : 3 + <45b> DW_AT_decl_line : 1685 + <45d> DW_AT_type : <0x120> + <461> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><464>: Abbrev Number: 16 (DW_TAG_member) + <465> DW_AT_name : (indirect string, offset: 0x363): plane_fmt + <469> DW_AT_decl_file : 3 + <46a> DW_AT_decl_line : 1687 + <46c> DW_AT_type : <0x494> + <470> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><473>: Abbrev Number: 16 (DW_TAG_member) + <474> DW_AT_name : (indirect string, offset: 0x1f3): num_planes + <478> DW_AT_decl_file : 3 + <479> DW_AT_decl_line : 1688 + <47b> DW_AT_type : <0xff> + <47f> DW_AT_data_member_location: 3 byte block: 23 b4 1 (DW_OP_plus_uconst: 180) + <2><483>: Abbrev Number: 16 (DW_TAG_member) + <484> DW_AT_name : (indirect string, offset: 0x377): reserved + <488> DW_AT_decl_file : 3 + <489> DW_AT_decl_line : 1689 + <48b> DW_AT_type : <0x4a4> + <48f> DW_AT_data_member_location: 3 byte block: 23 b5 1 (DW_OP_plus_uconst: 181) + <2><493>: Abbrev Number: 0 + <1><494>: Abbrev Number: 17 (DW_TAG_array_type) + <495> DW_AT_type : <0x3c1> + <499> DW_AT_sibling : <0x4a4> + <2><49d>: Abbrev Number: 18 (DW_TAG_subrange_type) + <49e> DW_AT_type : <0x63> + <4a2> DW_AT_upper_bound : 7 + <2><4a3>: Abbrev Number: 0 + <1><4a4>: Abbrev Number: 17 (DW_TAG_array_type) + <4a5> DW_AT_type : <0xff> + <4a9> DW_AT_sibling : <0x4b4> + <2><4ad>: Abbrev Number: 18 (DW_TAG_subrange_type) + <4ae> DW_AT_type : <0x63> + <4b2> DW_AT_upper_bound : 10 + <2><4b3>: Abbrev Number: 0 + <1><4b4>: Abbrev Number: 20 (DW_TAG_union_type) + <4b5> DW_AT_byte_size : 200 + <4b6> DW_AT_decl_file : 3 + <4b7> DW_AT_decl_line : 1704 + <4b9> DW_AT_sibling : <0x506> + <2><4bd>: Abbrev Number: 21 (DW_TAG_member) + <4be> DW_AT_name : pix + <4c2> DW_AT_decl_file : 3 + <4c3> DW_AT_decl_line : 1705 + <4c5> DW_AT_type : <0x190> + <2><4c9>: Abbrev Number: 22 (DW_TAG_member) + <4ca> DW_AT_name : (indirect string, offset: 0x5): pix_mp + <4ce> DW_AT_decl_file : 3 + <4cf> DW_AT_decl_line : 1706 + <4d1> DW_AT_type : <0x40c> + <2><4d5>: Abbrev Number: 21 (DW_TAG_member) + <4d6> DW_AT_name : win + <4da> DW_AT_decl_file : 3 + <4db> DW_AT_decl_line : 1707 + <4dd> DW_AT_type : <0x256> + <2><4e1>: Abbrev Number: 21 (DW_TAG_member) + <4e2> DW_AT_name : vbi + <4e6> DW_AT_decl_file : 3 + <4e7> DW_AT_decl_line : 1708 + <4e9> DW_AT_type : <0x2cb> + <2><4ed>: Abbrev Number: 22 (DW_TAG_member) + <4ee> DW_AT_name : (indirect string, offset: 0x1aa): sliced + <4f2> DW_AT_decl_file : 3 + <4f3> DW_AT_decl_line : 1709 + <4f5> DW_AT_type : <0x361> + <2><4f9>: Abbrev Number: 22 (DW_TAG_member) + <4fa> DW_AT_name : (indirect string, offset: 0xa1): raw_data + <4fe> DW_AT_decl_file : 3 + <4ff> DW_AT_decl_line : 1710 + <501> DW_AT_type : <0x506> + <2><505>: Abbrev Number: 0 + <1><506>: Abbrev Number: 17 (DW_TAG_array_type) + <507> DW_AT_type : <0xff> + <50b> DW_AT_sibling : <0x516> + <2><50f>: Abbrev Number: 18 (DW_TAG_subrange_type) + <510> DW_AT_type : <0x63> + <514> DW_AT_upper_bound : 199 + <2><515>: Abbrev Number: 0 + <1><516>: Abbrev Number: 15 (DW_TAG_structure_type) + <517> DW_AT_name : (indirect string, offset: 0x215): v4l2_format + <51b> DW_AT_byte_size : 204 + <51c> DW_AT_decl_file : 3 + <51d> DW_AT_decl_line : 1702 + <51f> DW_AT_sibling : <0x542> + <2><523>: Abbrev Number: 16 (DW_TAG_member) + <524> DW_AT_name : (indirect string, offset: 0x1da): type + <528> DW_AT_decl_file : 3 + <529> DW_AT_decl_line : 1703 + <52b> DW_AT_type : <0x120> + <52f> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><532>: Abbrev Number: 19 (DW_TAG_member) + <533> DW_AT_name : fmt + <537> DW_AT_decl_file : 3 + <538> DW_AT_decl_line : 1711 + <53a> DW_AT_type : <0x4b4> + <53e> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><541>: Abbrev Number: 0 + <1><542>: Abbrev Number: 12 (DW_TAG_typedef) + <543> DW_AT_name : (indirect string, offset: 0x25e): struct_v4l2_format + <547> DW_AT_decl_file : 4 + <548> DW_AT_decl_line : 42 + <549> DW_AT_type : <0x516> + <1><54d>: Abbrev Number: 23 (DW_TAG_variable) + <54e> DW_AT_name : (indirect string, offset: 0x12f): current_wordsize + <552> DW_AT_decl_file : 5 + <553> DW_AT_decl_line : 757 + <555> DW_AT_type : <0x47> + <559> DW_AT_external : 1 + <55a> DW_AT_declaration : 1 + <1><55b>: Abbrev Number: 23 (DW_TAG_variable) + <55c> DW_AT_name : (indirect string, offset: 0x352): sysent + <560> DW_AT_decl_file : 5 + <561> DW_AT_decl_line : 892 + <563> DW_AT_type : <0xed> + <567> DW_AT_external : 1 + <568> DW_AT_declaration : 1 + <1><569>: Abbrev Number: 23 (DW_TAG_variable) + <56a> DW_AT_name : (indirect string, offset: 0x23b): nsyscalls + <56e> DW_AT_decl_file : 5 + <56f> DW_AT_decl_line : 903 + <571> DW_AT_type : <0x47> + <575> DW_AT_external : 1 + <576> DW_AT_declaration : 1 + <1><577>: Abbrev Number: 24 (DW_TAG_variable) + <578> DW_AT_name : (indirect string, offset: 0x117): mpers_target_var + <57c> DW_AT_decl_file : 4 + <57d> DW_AT_decl_line : 47 + <57e> DW_AT_type : <0x542> + <582> DW_AT_external : 1 + <583> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><589>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_v4l2_format.d2 b/mpers-mx32/struct_v4l2_format.d2 new file mode 100644 index 000000000..ec3f238cf --- /dev/null +++ b/mpers-mx32/struct_v4l2_format.d2 @@ -0,0 +1,712 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1b1): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x29): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0xf3): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0x16f): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x24b): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1e6): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1c3): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x10e): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x301): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x33): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x27f): char +<1><73> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x79> +<1><79> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><7e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x352): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd1> +<2><8a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x313): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><98> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6a): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x16): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xdc> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x50): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xdc> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd1> +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x325): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7e> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xe2> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x289): _Bool +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2fc): __u8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 20 +DW_AT_type : <0x39> +<1><10a> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2ab): __u16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 23 +DW_AT_type : <0x40> +<1><115> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x319): __s32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 25 +DW_AT_type : <0x2b> +<1><120> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xaa): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><12b> +Abbrev Number: 13 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x333): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x14b> +<2><138> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x221): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><13e> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1fe): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><144> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x84): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><14b> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc): v4l2_rect +DW_AT_byte_size : 16 +DW_AT_decl_file : 3 +DW_AT_decl_line : 205 +DW_AT_sibling : <0x190> +<2><157> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x284): left +DW_AT_decl_file : 3 +DW_AT_decl_line : 206 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><165> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : top +DW_AT_decl_file : 3 +DW_AT_decl_line : 207 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><173> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xed): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 208 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><181> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1df): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 209 +DW_AT_type : <0x115> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><190> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x29b): v4l2_pix_format +DW_AT_byte_size : 32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 274 +DW_AT_sibling : <0x216> +<2><19d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xed): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 275 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1ac> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1df): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 276 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1bb> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3c): pixelformat +DW_AT_decl_file : 3 +DW_AT_decl_line : 277 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1ca> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9b): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 278 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><1d9> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x101): bytesperline +DW_AT_decl_file : 3 +DW_AT_decl_line : 279 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><1e8> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f): sizeimage +DW_AT_decl_file : 3 +DW_AT_decl_line : 280 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><1f7> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x140): colorspace +DW_AT_decl_file : 3 +DW_AT_decl_line : 281 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><206> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): priv +DW_AT_decl_file : 3 +DW_AT_decl_line : 282 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<1><216> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x120> +DW_AT_sibling : <0x226> +<2><21f> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><226> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x359): v4l2_clip +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 745 +DW_AT_sibling : <0x250> +<2><233> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : c +DW_AT_decl_file : 3 +DW_AT_decl_line : 746 +DW_AT_type : <0x14b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><240> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x386): next +DW_AT_decl_file : 3 +DW_AT_decl_line : 747 +DW_AT_type : <0x250> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><250> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x226> +<1><256> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xe1): v4l2_window +DW_AT_byte_size : 40 +DW_AT_decl_file : 3 +DW_AT_decl_line : 750 +DW_AT_sibling : <0x2cb> +<2><263> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : w +DW_AT_decl_file : 3 +DW_AT_decl_line : 751 +DW_AT_type : <0x14b> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><270> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9b): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 752 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><27f> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x36d): chromakey +DW_AT_decl_file : 3 +DW_AT_decl_line : 753 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><28e> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x380): clips +DW_AT_decl_file : 3 +DW_AT_decl_line : 754 +DW_AT_type : <0x250> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><29d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb7): clipcount +DW_AT_decl_file : 3 +DW_AT_decl_line : 755 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<2><2ac> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb0): bitmap +DW_AT_decl_file : 3 +DW_AT_decl_line : 756 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><2bb> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x14b): global_alpha +DW_AT_decl_file : 3 +DW_AT_decl_line : 757 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<1><2cb> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x74): v4l2_vbi_format +DW_AT_byte_size : 44 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1541 +DW_AT_sibling : <0x351> +<2><2d8> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x271): sampling_rate +DW_AT_decl_file : 3 +DW_AT_decl_line : 1542 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><2e7> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x128): offset +DW_AT_decl_file : 3 +DW_AT_decl_line : 1543 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><2f6> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x59): samples_per_line +DW_AT_decl_file : 3 +DW_AT_decl_line : 1544 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><305> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x38b): sample_format +DW_AT_decl_file : 3 +DW_AT_decl_line : 1545 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><314> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x245): start +DW_AT_decl_file : 3 +DW_AT_decl_line : 1546 +DW_AT_type : <0x351> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><323> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x31f): count +DW_AT_decl_file : 3 +DW_AT_decl_line : 1547 +DW_AT_type : <0x216> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><332> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1bd): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 1548 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><341> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x377): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1549 +DW_AT_type : <0x216> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<1><351> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x115> +DW_AT_sibling : <0x361> +<2><35a> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<1><361> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x193): v4l2_sliced_vbi_format +DW_AT_byte_size : 112 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1563 +DW_AT_sibling : <0x3ab> +<2><36e> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x28f): service_set +DW_AT_decl_file : 3 +DW_AT_decl_line : 1564 +DW_AT_type : <0x10a> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><37d> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x344): service_lines +DW_AT_decl_file : 3 +DW_AT_decl_line : 1569 +DW_AT_type : <0x3ab> +DW_AT_data_member_location: 2 byte block: 23 2 (DW_OP_plus_uconst: 2) +<2><38c> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x48): io_size +DW_AT_decl_file : 3 +DW_AT_decl_line : 1570 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 64 (DW_OP_plus_uconst: 100) +<2><39b> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x377): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1571 +DW_AT_type : <0x216> +DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) +<1><3ab> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x10a> +DW_AT_sibling : <0x3c1> +<2><3b4> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 1 +<2><3ba> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 23 +<1><3c1> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x17d): v4l2_plane_pix_format +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1664 +DW_AT_sibling : <0x3fc> +<2><3ce> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f): sizeimage +DW_AT_decl_file : 3 +DW_AT_decl_line : 1665 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><3dd> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x101): bytesperline +DW_AT_decl_file : 3 +DW_AT_decl_line : 1666 +DW_AT_type : <0x10a> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><3ec> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x377): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1667 +DW_AT_type : <0x3fc> +DW_AT_data_member_location: 2 byte block: 23 6 (DW_OP_plus_uconst: 6) +<1><3fc> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x10a> +DW_AT_sibling : <0x40c> +<2><405> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 6 +<1><40c> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x158): v4l2_pix_format_mplane +DW_AT_byte_size : 192 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1680 +DW_AT_sibling : <0x494> +<2><419> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xed): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 1681 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><428> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1df): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 1682 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><437> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x3c): pixelformat +DW_AT_decl_file : 3 +DW_AT_decl_line : 1683 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><446> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9b): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 1684 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><455> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x140): colorspace +DW_AT_decl_file : 3 +DW_AT_decl_line : 1685 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><464> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x363): plane_fmt +DW_AT_decl_file : 3 +DW_AT_decl_line : 1687 +DW_AT_type : <0x494> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><473> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f3): num_planes +DW_AT_decl_file : 3 +DW_AT_decl_line : 1688 +DW_AT_type : <0xff> +DW_AT_data_member_location: 3 byte block: 23 b4 1 (DW_OP_plus_uconst: 180) +<2><483> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x377): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1689 +DW_AT_type : <0x4a4> +DW_AT_data_member_location: 3 byte block: 23 b5 1 (DW_OP_plus_uconst: 181) +<1><494> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0x3c1> +DW_AT_sibling : <0x4a4> +<2><49d> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 7 +<1><4a4> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0xff> +DW_AT_sibling : <0x4b4> +<2><4ad> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 10 +<1><4b4> +Abbrev Number: 20 (DW_TAG_union_type) +DW_AT_byte_size : 200 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1704 +DW_AT_sibling : <0x506> +<2><4bd> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : pix +DW_AT_decl_file : 3 +DW_AT_decl_line : 1705 +DW_AT_type : <0x190> +<2><4c9> +Abbrev Number: 22 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x5): pix_mp +DW_AT_decl_file : 3 +DW_AT_decl_line : 1706 +DW_AT_type : <0x40c> +<2><4d5> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : win +DW_AT_decl_file : 3 +DW_AT_decl_line : 1707 +DW_AT_type : <0x256> +<2><4e1> +Abbrev Number: 21 (DW_TAG_member) +DW_AT_name : vbi +DW_AT_decl_file : 3 +DW_AT_decl_line : 1708 +DW_AT_type : <0x2cb> +<2><4ed> +Abbrev Number: 22 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1aa): sliced +DW_AT_decl_file : 3 +DW_AT_decl_line : 1709 +DW_AT_type : <0x361> +<2><4f9> +Abbrev Number: 22 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa1): raw_data +DW_AT_decl_file : 3 +DW_AT_decl_line : 1710 +DW_AT_type : <0x506> +<1><506> +Abbrev Number: 17 (DW_TAG_array_type) +DW_AT_type : <0xff> +DW_AT_sibling : <0x516> +<2><50f> +Abbrev Number: 18 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 199 +<1><516> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x215): v4l2_format +DW_AT_byte_size : 204 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1702 +DW_AT_sibling : <0x542> +<2><523> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1da): type +DW_AT_decl_file : 3 +DW_AT_decl_line : 1703 +DW_AT_type : <0x120> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><532> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : fmt +DW_AT_decl_file : 3 +DW_AT_decl_line : 1711 +DW_AT_type : <0x4b4> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><542> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x25e): struct_v4l2_format +DW_AT_decl_file : 4 +DW_AT_decl_line : 42 +DW_AT_type : <0x516> +<1><54d> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x12f): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><55b> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x352): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xed> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><569> +Abbrev Number: 23 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x23b): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><577> +Abbrev Number: 24 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x117): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x542> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_v4l2_format.h b/mpers-mx32/struct_v4l2_format.h new file mode 100644 index 000000000..237f2ca3a --- /dev/null +++ b/mpers-mx32/struct_v4l2_format.h @@ -0,0 +1,66 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t type; +union { +struct { +uint32_t width; +uint32_t height; +uint32_t pixelformat; +uint32_t field; +uint32_t bytesperline; +uint32_t sizeimage; +uint32_t colorspace; +uint32_t priv; +} ATTRIBUTE_PACKED pix; +struct { +uint32_t width; +uint32_t height; +uint32_t pixelformat; +uint32_t field; +uint32_t colorspace; +struct { +uint32_t sizeimage; +uint16_t bytesperline; +uint16_t reserved[7]; +} ATTRIBUTE_PACKED plane_fmt[8]; +unsigned char num_planes; +unsigned char reserved[11]; +} ATTRIBUTE_PACKED pix_mp; +struct { +struct { +int32_t left; +int32_t top; +int32_t width; +int32_t height; +} ATTRIBUTE_PACKED w; +uint32_t field; +uint32_t chromakey; +mpers_ptr_t clips; +uint32_t clipcount; +mpers_ptr_t bitmap; +unsigned char global_alpha; +unsigned char mpers_end_filler_1[3]; +} ATTRIBUTE_PACKED win; +struct { +uint32_t sampling_rate; +uint32_t offset; +uint32_t samples_per_line; +uint32_t sample_format; +int32_t start[2]; +uint32_t count[2]; +uint32_t flags; +uint32_t reserved[2]; +} ATTRIBUTE_PACKED vbi; +struct { +uint16_t service_set; +uint16_t service_lines[24]; +unsigned char mpers_filler_2[50]; +uint32_t io_size; +uint32_t reserved[2]; +} ATTRIBUTE_PACKED sliced; +unsigned char raw_data[200]; +} fmt; +} ATTRIBUTE_PACKED mx32_struct_v4l2_format; +#define MPERS_mx32_struct_v4l2_format mx32_struct_v4l2_format diff --git a/mpers-mx32/struct_v4l2_framebuffer.c b/mpers-mx32/struct_v4l2_framebuffer.c new file mode 100644 index 000000000..c6f7e3eca --- /dev/null +++ b/mpers-mx32/struct_v4l2_framebuffer.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_framebuffer mpers_target_var; diff --git a/mpers-mx32/struct_v4l2_framebuffer.d1 b/mpers-mx32/struct_v4l2_framebuffer.d1 new file mode 100644 index 000000000..bd3ccd5f4 --- /dev/null +++ b/mpers-mx32/struct_v4l2_framebuffer.d1 @@ -0,0 +1,269 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x23e (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x5e): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x107): mpers-mx32/struct_v4l2_framebuffer.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1eb): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x27b): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x262): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x243): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xf9): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0xa9): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x1a3): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xe2): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x272): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x12c): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x23a): sizetype + <1><6a>: Abbrev Number: 4 (DW_TAG_pointer_type) + <6b> DW_AT_byte_size : 4 + <1><6c>: Abbrev Number: 2 (DW_TAG_base_type) + <6d> DW_AT_byte_size : 1 + <6e> DW_AT_encoding : 6 (signed char) + <6f> DW_AT_name : (indirect string, offset: 0x1db): char + <1><73>: Abbrev Number: 5 (DW_TAG_pointer_type) + <74> DW_AT_byte_size : 4 + <75> DW_AT_type : <0x79> + <1><79>: Abbrev Number: 6 (DW_TAG_const_type) + <7a> DW_AT_type : <0x6c> + <1><7e>: Abbrev Number: 7 (DW_TAG_structure_type) + <7f> DW_AT_name : (indirect string, offset: 0x13e): sysent + <83> DW_AT_byte_size : 20 + <84> DW_AT_decl_file : 1 + <85> DW_AT_decl_line : 4 + <86> DW_AT_sibling : <0xd1> + <2><8a>: Abbrev Number: 8 (DW_TAG_member) + <8b> DW_AT_name : (indirect string, offset: 0x176): nargs + <8f> DW_AT_decl_file : 1 + <90> DW_AT_decl_line : 5 + <91> DW_AT_type : <0x47> + <95> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><98>: Abbrev Number: 8 (DW_TAG_member) + <99> DW_AT_name : (indirect string, offset: 0x230): sys_flags + <9d> DW_AT_decl_file : 1 + <9e> DW_AT_decl_line : 6 + <9f> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x287): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xdc> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xc2): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x73> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xdc> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) +
DW_AT_byte_size : 4 + DW_AT_type : <0xd1> + <1>: Abbrev Number: 12 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1b6): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7e> + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf3> + <1>: Abbrev Number: 6 (DW_TAG_const_type) + DW_AT_type : <0xe2> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0xbc): _Bool + <1>: Abbrev Number: 12 (DW_TAG_typedef) + <100> DW_AT_name : (indirect string, offset: 0x48): __u32 + <104> DW_AT_decl_file : 2 + <105> DW_AT_decl_line : 26 + <106> DW_AT_type : <0x47> + <1><10a>: Abbrev Number: 13 (DW_TAG_enumeration_type) + <10b> DW_AT_name : (indirect string, offset: 0x18d): v4l2_preemphasis + <10f> DW_AT_byte_size : 4 + <110> DW_AT_decl_file : 6 + <111> DW_AT_decl_line : 763 + <113> DW_AT_sibling : <0x12a> + <2><117>: Abbrev Number: 14 (DW_TAG_enumerator) + <118> DW_AT_name : (indirect string, offset: 0x18): V4L2_PREEMPHASIS_DISABLED + <11c> DW_AT_const_value : 0 + <2><11d>: Abbrev Number: 14 (DW_TAG_enumerator) + <11e> DW_AT_name : (indirect string, offset: 0xcb): V4L2_PREEMPHASIS_50_uS + <122> DW_AT_const_value : 1 + <2><123>: Abbrev Number: 14 (DW_TAG_enumerator) + <124> DW_AT_name : (indirect string, offset: 0x1c4): V4L2_PREEMPHASIS_75_uS + <128> DW_AT_const_value : 2 + <2><129>: Abbrev Number: 0 + <1><12a>: Abbrev Number: 15 (DW_TAG_structure_type) + <12b> DW_AT_name : (indirect string, offset: 0x4e): v4l2_pix_format + <12f> DW_AT_byte_size : 32 + <130> DW_AT_decl_file : 3 + <131> DW_AT_decl_line : 274 + <133> DW_AT_sibling : <0x1b0> + <2><137>: Abbrev Number: 16 (DW_TAG_member) + <138> DW_AT_name : (indirect string, offset: 0x25c): width + <13c> DW_AT_decl_file : 3 + <13d> DW_AT_decl_line : 275 + <13f> DW_AT_type : <0xff> + <143> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><146>: Abbrev Number: 16 (DW_TAG_member) + <147> DW_AT_name : (indirect string, offset: 0x145): height + <14b> DW_AT_decl_file : 3 + <14c> DW_AT_decl_line : 276 + <14e> DW_AT_type : <0xff> + <152> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><155>: Abbrev Number: 16 (DW_TAG_member) + <156> DW_AT_name : (indirect string, offset: 0x15d): pixelformat + <15a> DW_AT_decl_file : 3 + <15b> DW_AT_decl_line : 277 + <15d> DW_AT_type : <0xff> + <161> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><164>: Abbrev Number: 16 (DW_TAG_member) + <165> DW_AT_name : (indirect string, offset: 0x26c): field + <169> DW_AT_decl_file : 3 + <16a> DW_AT_decl_line : 278 + <16c> DW_AT_type : <0xff> + <170> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><173>: Abbrev Number: 16 (DW_TAG_member) + <174> DW_AT_name : (indirect string, offset: 0x169): bytesperline + <178> DW_AT_decl_file : 3 + <179> DW_AT_decl_line : 279 + <17b> DW_AT_type : <0xff> + <17f> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><182>: Abbrev Number: 16 (DW_TAG_member) + <183> DW_AT_name : (indirect string, offset: 0x226): sizeimage + <187> DW_AT_decl_file : 3 + <188> DW_AT_decl_line : 280 + <18a> DW_AT_type : <0xff> + <18e> DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) + <2><191>: Abbrev Number: 16 (DW_TAG_member) + <192> DW_AT_name : (indirect string, offset: 0x1e0): colorspace + <196> DW_AT_decl_file : 3 + <197> DW_AT_decl_line : 281 + <199> DW_AT_type : <0xff> + <19d> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><1a0>: Abbrev Number: 16 (DW_TAG_member) + <1a1> DW_AT_name : (indirect string, offset: 0x43): priv + <1a5> DW_AT_decl_file : 3 + <1a6> DW_AT_decl_line : 282 + <1a8> DW_AT_type : <0xff> + <1ac> DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) + <2><1af>: Abbrev Number: 0 + <1><1b0>: Abbrev Number: 15 (DW_TAG_structure_type) + <1b1> DW_AT_name : (indirect string, offset: 0x32): v4l2_framebuffer + <1b5> DW_AT_byte_size : 44 + <1b6> DW_AT_decl_file : 3 + <1b7> DW_AT_decl_line : 719 + <1b9> DW_AT_sibling : <0x1fa> + <2><1bd>: Abbrev Number: 16 (DW_TAG_member) + <1be> DW_AT_name : (indirect string, offset: 0x251): capability + <1c2> DW_AT_decl_file : 3 + <1c3> DW_AT_decl_line : 720 + <1c5> DW_AT_type : <0xff> + <1c9> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><1cc>: Abbrev Number: 16 (DW_TAG_member) + <1cd> DW_AT_name : (indirect string, offset: 0x1b0): flags + <1d1> DW_AT_decl_file : 3 + <1d2> DW_AT_decl_line : 721 + <1d4> DW_AT_type : <0xff> + <1d8> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><1db>: Abbrev Number: 16 (DW_TAG_member) + <1dc> DW_AT_name : (indirect string, offset: 0x19e): base + <1e0> DW_AT_decl_file : 3 + <1e1> DW_AT_decl_line : 724 + <1e3> DW_AT_type : <0x6a> + <1e7> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1ea>: Abbrev Number: 17 (DW_TAG_member) + <1eb> DW_AT_name : fmt + <1ef> DW_AT_decl_file : 3 + <1f0> DW_AT_decl_line : 725 + <1f2> DW_AT_type : <0x12a> + <1f6> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><1f9>: Abbrev Number: 0 + <1><1fa>: Abbrev Number: 12 (DW_TAG_typedef) + <1fb> DW_AT_name : (indirect string, offset: 0x0): struct_v4l2_framebuffer + <1ff> DW_AT_decl_file : 4 + <200> DW_AT_decl_line : 43 + <201> DW_AT_type : <0x1b0> + <1><205>: Abbrev Number: 18 (DW_TAG_variable) + <206> DW_AT_name : (indirect string, offset: 0x14c): current_wordsize + <20a> DW_AT_decl_file : 5 + <20b> DW_AT_decl_line : 757 + <20d> DW_AT_type : <0x47> + <211> DW_AT_external : 1 + <212> DW_AT_declaration : 1 + <1><213>: Abbrev Number: 18 (DW_TAG_variable) + <214> DW_AT_name : (indirect string, offset: 0x13e): sysent + <218> DW_AT_decl_file : 5 + <219> DW_AT_decl_line : 892 + <21b> DW_AT_type : <0xed> + <21f> DW_AT_external : 1 + <220> DW_AT_declaration : 1 + <1><221>: Abbrev Number: 18 (DW_TAG_variable) + <222> DW_AT_name : (indirect string, offset: 0x21c): nsyscalls + <226> DW_AT_decl_file : 5 + <227> DW_AT_decl_line : 903 + <229> DW_AT_type : <0x47> + <22d> DW_AT_external : 1 + <22e> DW_AT_declaration : 1 + <1><22f>: Abbrev Number: 19 (DW_TAG_variable) + <230> DW_AT_name : (indirect string, offset: 0x17c): mpers_target_var + <234> DW_AT_decl_file : 4 + <235> DW_AT_decl_line : 47 + <236> DW_AT_type : <0x1fa> + <23a> DW_AT_external : 1 + <23b> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><241>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_v4l2_framebuffer.d2 b/mpers-mx32/struct_v4l2_framebuffer.d2 new file mode 100644 index 000000000..814702cab --- /dev/null +++ b/mpers-mx32/struct_v4l2_framebuffer.d2 @@ -0,0 +1,301 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x27b): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x262): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x243): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xf9): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xa9): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1a3): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xe2): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x272): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x12c): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x23a): sizetype +<1><6a> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +<1><6c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1db): char +<1><73> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x79> +<1><79> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x6c> +<1><7e> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x13e): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xd1> +<2><8a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x176): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><98> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x230): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x287): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xdc> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xc2): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x73> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xdc> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xd1> +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b6): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7e> +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf3> +<1> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xe2> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xbc): _Bool +<1> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x48): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><10a> +Abbrev Number: 13 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x18d): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x12a> +<2><117> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x18): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><11d> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0xcb): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><123> +Abbrev Number: 14 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x1c4): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><12a> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x4e): v4l2_pix_format +DW_AT_byte_size : 32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 274 +DW_AT_sibling : <0x1b0> +<2><137> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x25c): width +DW_AT_decl_file : 3 +DW_AT_decl_line : 275 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><146> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x145): height +DW_AT_decl_file : 3 +DW_AT_decl_line : 276 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><155> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15d): pixelformat +DW_AT_decl_file : 3 +DW_AT_decl_line : 277 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><164> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x26c): field +DW_AT_decl_file : 3 +DW_AT_decl_line : 278 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><173> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x169): bytesperline +DW_AT_decl_file : 3 +DW_AT_decl_line : 279 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><182> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x226): sizeimage +DW_AT_decl_file : 3 +DW_AT_decl_line : 280 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 14 (DW_OP_plus_uconst: 20) +<2><191> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e0): colorspace +DW_AT_decl_file : 3 +DW_AT_decl_line : 281 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<2><1a0> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x43): priv +DW_AT_decl_file : 3 +DW_AT_decl_line : 282 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 1c (DW_OP_plus_uconst: 28) +<1><1b0> +Abbrev Number: 15 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x32): v4l2_framebuffer +DW_AT_byte_size : 44 +DW_AT_decl_file : 3 +DW_AT_decl_line : 719 +DW_AT_sibling : <0x1fa> +<2><1bd> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x251): capability +DW_AT_decl_file : 3 +DW_AT_decl_line : 720 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><1cc> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b0): flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 721 +DW_AT_type : <0xff> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><1db> +Abbrev Number: 16 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x19e): base +DW_AT_decl_file : 3 +DW_AT_decl_line : 724 +DW_AT_type : <0x6a> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1ea> +Abbrev Number: 17 (DW_TAG_member) +DW_AT_name : fmt +DW_AT_decl_file : 3 +DW_AT_decl_line : 725 +DW_AT_type : <0x12a> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<1><1fa> +Abbrev Number: 12 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): struct_v4l2_framebuffer +DW_AT_decl_file : 4 +DW_AT_decl_line : 43 +DW_AT_type : <0x1b0> +<1><205> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x14c): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><213> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x13e): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xed> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><221> +Abbrev Number: 18 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x21c): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><22f> +Abbrev Number: 19 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x17c): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x1fa> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_v4l2_framebuffer.h b/mpers-mx32/struct_v4l2_framebuffer.h new file mode 100644 index 000000000..780777ee4 --- /dev/null +++ b/mpers-mx32/struct_v4l2_framebuffer.h @@ -0,0 +1,19 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t capability; +uint32_t flags; +mpers_ptr_t base; +struct { +uint32_t width; +uint32_t height; +uint32_t pixelformat; +uint32_t field; +uint32_t bytesperline; +uint32_t sizeimage; +uint32_t colorspace; +uint32_t priv; +} ATTRIBUTE_PACKED fmt; +} ATTRIBUTE_PACKED mx32_struct_v4l2_framebuffer; +#define MPERS_mx32_struct_v4l2_framebuffer mx32_struct_v4l2_framebuffer diff --git a/mpers-mx32/struct_v4l2_input.c b/mpers-mx32/struct_v4l2_input.c new file mode 100644 index 000000000..fe0ffcdcc --- /dev/null +++ b/mpers-mx32/struct_v4l2_input.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_input mpers_target_var; diff --git a/mpers-mx32/struct_v4l2_input.d1 b/mpers-mx32/struct_v4l2_input.d1 new file mode 100644 index 000000000..b71f209db --- /dev/null +++ b/mpers-mx32/struct_v4l2_input.d1 @@ -0,0 +1,271 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x243 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x41): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x207): mpers-mx32/struct_v4l2_input.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x190): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x247): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1fd): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1da): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xd6): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x8c): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x159): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xbf): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x23e): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xe4): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1d1): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x18b): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xf6): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x131): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0xb5): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x253): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xa6): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x17d): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x2c): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1e8): __u8 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 20 + <104> DW_AT_type : <0x39> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x32): __u32 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 26 + <10f> DW_AT_type : <0x47> + <1><113>: Abbrev Number: 11 (DW_TAG_typedef) + <114> DW_AT_name : (indirect string, offset: 0x1cb): __u64 + <118> DW_AT_decl_file : 2 + <119> DW_AT_decl_line : 30 + <11a> DW_AT_type : <0x4e> + <1><11e>: Abbrev Number: 12 (DW_TAG_enumeration_type) + <11f> DW_AT_name : (indirect string, offset: 0x148): v4l2_preemphasis + <123> DW_AT_byte_size : 4 + <124> DW_AT_decl_file : 6 + <125> DW_AT_decl_line : 763 + <127> DW_AT_sibling : <0x13e> + <2><12b>: Abbrev Number: 13 (DW_TAG_enumerator) + <12c> DW_AT_name : (indirect string, offset: 0x12): V4L2_PREEMPHASIS_DISABLED + <130> DW_AT_const_value : 0 + <2><131>: Abbrev Number: 13 (DW_TAG_enumerator) + <132> DW_AT_name : (indirect string, offset: 0x166): V4L2_PREEMPHASIS_50_uS + <136> DW_AT_const_value : 1 + <2><137>: Abbrev Number: 13 (DW_TAG_enumerator) + <138> DW_AT_name : (indirect string, offset: 0x10e): V4L2_PREEMPHASIS_75_uS + <13c> DW_AT_const_value : 2 + <2><13d>: Abbrev Number: 0 + <1><13e>: Abbrev Number: 14 (DW_TAG_array_type) + <13f> DW_AT_type : <0xfd> + <143> DW_AT_sibling : <0x14e> + <2><147>: Abbrev Number: 15 (DW_TAG_subrange_type) + <148> DW_AT_type : <0x63> + <14c> DW_AT_upper_bound : 31 + <2><14d>: Abbrev Number: 0 + <1><14e>: Abbrev Number: 14 (DW_TAG_array_type) + <14f> DW_AT_type : <0x108> + <153> DW_AT_sibling : <0x15e> + <2><157>: Abbrev Number: 15 (DW_TAG_subrange_type) + <158> DW_AT_type : <0x63> + <15c> DW_AT_upper_bound : 2 + <2><15d>: Abbrev Number: 0 + <1><15e>: Abbrev Number: 16 (DW_TAG_typedef) + <15f> DW_AT_name : (indirect string, offset: 0x125): v4l2_std_id + <163> DW_AT_decl_file : 3 + <164> DW_AT_decl_line : 826 + <166> DW_AT_type : <0x113> + <1><16a>: Abbrev Number: 17 (DW_TAG_structure_type) + <16b> DW_AT_name : (indirect string, offset: 0x226): v4l2_input + <16f> DW_AT_byte_size : 80 + <170> DW_AT_decl_file : 3 + <171> DW_AT_decl_line : 1145 + <173> DW_AT_sibling : <0x1ff> + <2><177>: Abbrev Number: 18 (DW_TAG_member) + <178> DW_AT_name : (indirect string, offset: 0x1f2): index + <17c> DW_AT_decl_file : 3 + <17d> DW_AT_decl_line : 1146 + <17f> DW_AT_type : <0x108> + <183> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><186>: Abbrev Number: 18 (DW_TAG_member) + <187> DW_AT_name : (indirect string, offset: 0x1ed): name + <18b> DW_AT_decl_file : 3 + <18c> DW_AT_decl_line : 1147 + <18e> DW_AT_type : <0x13e> + <192> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><195>: Abbrev Number: 18 (DW_TAG_member) + <196> DW_AT_name : (indirect string, offset: 0x1f8): type + <19a> DW_AT_decl_file : 3 + <19b> DW_AT_decl_line : 1148 + <19d> DW_AT_type : <0x108> + <1a1> DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) + <2><1a4>: Abbrev Number: 18 (DW_TAG_member) + <1a5> DW_AT_name : (indirect string, offset: 0x25c): audioset + <1a9> DW_AT_decl_file : 3 + <1aa> DW_AT_decl_line : 1149 + <1ac> DW_AT_type : <0x108> + <1b0> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1b3>: Abbrev Number: 18 (DW_TAG_member) + <1b4> DW_AT_name : (indirect string, offset: 0xaf): tuner + <1b8> DW_AT_decl_file : 3 + <1b9> DW_AT_decl_line : 1150 + <1bb> DW_AT_type : <0x108> + <1bf> DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) + <2><1c2>: Abbrev Number: 19 (DW_TAG_member) + <1c3> DW_AT_name : std + <1c7> DW_AT_decl_file : 3 + <1c8> DW_AT_decl_line : 1151 + <1ca> DW_AT_type : <0x15e> + <1ce> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><1d1>: Abbrev Number: 18 (DW_TAG_member) + <1d2> DW_AT_name : (indirect string, offset: 0x9f): status + <1d6> DW_AT_decl_file : 3 + <1d7> DW_AT_decl_line : 1152 + <1d9> DW_AT_type : <0x108> + <1dd> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><1e0>: Abbrev Number: 18 (DW_TAG_member) + <1e1> DW_AT_name : (indirect string, offset: 0x231): capabilities + <1e5> DW_AT_decl_file : 3 + <1e6> DW_AT_decl_line : 1153 + <1e8> DW_AT_type : <0x108> + <1ec> DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) + <2><1ef>: Abbrev Number: 18 (DW_TAG_member) + <1f0> DW_AT_name : (indirect string, offset: 0x38): reserved + <1f4> DW_AT_decl_file : 3 + <1f5> DW_AT_decl_line : 1154 + <1f7> DW_AT_type : <0x14e> + <1fb> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><1fe>: Abbrev Number: 0 + <1><1ff>: Abbrev Number: 11 (DW_TAG_typedef) + <200> DW_AT_name : (indirect string, offset: 0x0): struct_v4l2_input + <204> DW_AT_decl_file : 4 + <205> DW_AT_decl_line : 44 + <206> DW_AT_type : <0x16a> + <1><20a>: Abbrev Number: 20 (DW_TAG_variable) + <20b> DW_AT_name : (indirect string, offset: 0xfd): current_wordsize + <20f> DW_AT_decl_file : 5 + <210> DW_AT_decl_line : 757 + <212> DW_AT_type : <0x47> + <216> DW_AT_external : 1 + <217> DW_AT_declaration : 1 + <1><218>: Abbrev Number: 20 (DW_TAG_variable) + <219> DW_AT_name : (indirect string, offset: 0xf6): sysent + <21d> DW_AT_decl_file : 5 + <21e> DW_AT_decl_line : 892 + <220> DW_AT_type : <0xeb> + <224> DW_AT_external : 1 + <225> DW_AT_declaration : 1 + <1><226>: Abbrev Number: 20 (DW_TAG_variable) + <227> DW_AT_name : (indirect string, offset: 0x1c1): nsyscalls + <22b> DW_AT_decl_file : 5 + <22c> DW_AT_decl_line : 903 + <22e> DW_AT_type : <0x47> + <232> DW_AT_external : 1 + <233> DW_AT_declaration : 1 + <1><234>: Abbrev Number: 21 (DW_TAG_variable) + <235> DW_AT_name : (indirect string, offset: 0x137): mpers_target_var + <239> DW_AT_decl_file : 4 + <23a> DW_AT_decl_line : 47 + <23b> DW_AT_type : <0x1ff> + <23f> DW_AT_external : 1 + <240> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><246>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_v4l2_input.d2 b/mpers-mx32/struct_v4l2_input.d2 new file mode 100644 index 000000000..9d6372923 --- /dev/null +++ b/mpers-mx32/struct_v4l2_input.d2 @@ -0,0 +1,304 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x247): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1fd): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1da): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xd6): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x8c): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x159): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xbf): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x23e): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xe4): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1d1): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x18b): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xf6): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x131): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb5): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x253): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa6): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x17d): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x2c): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1e8): __u8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 20 +DW_AT_type : <0x39> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x32): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><113> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1cb): __u64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><11e> +Abbrev Number: 12 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x148): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x13e> +<2><12b> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x12): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><131> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x166): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><137> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x10e): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><13e> +Abbrev Number: 14 (DW_TAG_array_type) +DW_AT_type : <0xfd> +DW_AT_sibling : <0x14e> +<2><147> +Abbrev Number: 15 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 31 +<1><14e> +Abbrev Number: 14 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x15e> +<2><157> +Abbrev Number: 15 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 2 +<1><15e> +Abbrev Number: 16 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x125): v4l2_std_id +DW_AT_decl_file : 3 +DW_AT_decl_line : 826 +DW_AT_type : <0x113> +<1><16a> +Abbrev Number: 17 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x226): v4l2_input +DW_AT_byte_size : 80 +DW_AT_decl_file : 3 +DW_AT_decl_line : 1145 +DW_AT_sibling : <0x1ff> +<2><177> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f2): index +DW_AT_decl_file : 3 +DW_AT_decl_line : 1146 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><186> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ed): name +DW_AT_decl_file : 3 +DW_AT_decl_line : 1147 +DW_AT_type : <0x13e> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2><195> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1f8): type +DW_AT_decl_file : 3 +DW_AT_decl_line : 1148 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 24 (DW_OP_plus_uconst: 36) +<2><1a4> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x25c): audioset +DW_AT_decl_file : 3 +DW_AT_decl_line : 1149 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><1b3> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xaf): tuner +DW_AT_decl_file : 3 +DW_AT_decl_line : 1150 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 2c (DW_OP_plus_uconst: 44) +<2><1c2> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : std +DW_AT_decl_file : 3 +DW_AT_decl_line : 1151 +DW_AT_type : <0x15e> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><1d1> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9f): status +DW_AT_decl_file : 3 +DW_AT_decl_line : 1152 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><1e0> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x231): capabilities +DW_AT_decl_file : 3 +DW_AT_decl_line : 1153 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 3c (DW_OP_plus_uconst: 60) +<2><1ef> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x38): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 1154 +DW_AT_type : <0x14e> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<1><1ff> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): struct_v4l2_input +DW_AT_decl_file : 4 +DW_AT_decl_line : 44 +DW_AT_type : <0x16a> +<1><20a> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xfd): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><218> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xf6): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><226> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1c1): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><234> +Abbrev Number: 21 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x137): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x1ff> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_v4l2_input.h b/mpers-mx32/struct_v4l2_input.h new file mode 100644 index 000000000..d5d3121b5 --- /dev/null +++ b/mpers-mx32/struct_v4l2_input.h @@ -0,0 +1,16 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t index; +unsigned char name[32]; +uint32_t type; +uint32_t audioset; +uint32_t tuner; +uint64_t std; +uint32_t status; +uint32_t capabilities; +uint32_t reserved[3]; +unsigned char mpers_end_filler_1[4]; +} ATTRIBUTE_PACKED mx32_struct_v4l2_input; +#define MPERS_mx32_struct_v4l2_input mx32_struct_v4l2_input diff --git a/mpers-mx32/struct_v4l2_standard.c b/mpers-mx32/struct_v4l2_standard.c new file mode 100644 index 000000000..3e4dbc41f --- /dev/null +++ b/mpers-mx32/struct_v4l2_standard.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014 Philippe De Muyter + * Copyright (c) 2014 William Manley + * Copyright (c) 2011 Peter Zotov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +#include +#include +#include +#include + +typedef struct v4l2_buffer struct_v4l2_buffer; +typedef struct v4l2_create_buffers struct_v4l2_create_buffers; +typedef struct v4l2_ext_control struct_v4l2_ext_control; +typedef struct v4l2_ext_controls struct_v4l2_ext_controls; +typedef struct v4l2_format struct_v4l2_format; +typedef struct v4l2_framebuffer struct_v4l2_framebuffer; +typedef struct v4l2_input struct_v4l2_input; +typedef struct v4l2_standard struct_v4l2_standard; + +struct_v4l2_standard mpers_target_var; diff --git a/mpers-mx32/struct_v4l2_standard.d1 b/mpers-mx32/struct_v4l2_standard.d1 new file mode 100644 index 000000000..c76c464f6 --- /dev/null +++ b/mpers-mx32/struct_v4l2_standard.d1 @@ -0,0 +1,272 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x23e (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x1f3): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x3d): mpers-mx32/struct_v4l2_standard.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x180): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x251): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x12e): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x1d5): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xcd): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x5f): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x149): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xb6): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x248): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xdb): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x1cc): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x17b): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_structure_type) + <7d> DW_AT_name : (indirect string, offset: 0xed): sysent + <81> DW_AT_byte_size : 20 + <82> DW_AT_decl_file : 1 + <83> DW_AT_decl_line : 4 + <84> DW_AT_sibling : <0xcf> + <2><88>: Abbrev Number: 7 (DW_TAG_member) + <89> DW_AT_name : (indirect string, offset: 0x128): nargs + <8d> DW_AT_decl_file : 1 + <8e> DW_AT_decl_line : 5 + <8f> DW_AT_type : <0x47> + <93> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><96>: Abbrev Number: 7 (DW_TAG_member) + <97> DW_AT_name : (indirect string, offset: 0xac): sys_flags + <9b> DW_AT_decl_file : 1 + <9c> DW_AT_decl_line : 6 + <9d> DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 1 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x269): sys_func + DW_AT_decl_file : 1 + DW_AT_decl_line : 8 + DW_AT_type : <0xda> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 7 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x87): sys_name + DW_AT_decl_file : 1 + DW_AT_decl_line : 9 + DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 9 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xda> + <2>: Abbrev Number: 10 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xcf> + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x16d): struct_sysent + DW_AT_decl_file : 1 + DW_AT_decl_line : 10 + DW_AT_type : <0x7c> + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf1> + <1>: Abbrev Number: 5 (DW_TAG_const_type) + DW_AT_type : <0xe0> + <1>: Abbrev Number: 2 (DW_TAG_base_type) + DW_AT_byte_size : 1 + DW_AT_encoding : 2 (boolean) + DW_AT_name : (indirect string, offset: 0x28): _Bool + <1>: Abbrev Number: 11 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x1e3): __u8 + <102> DW_AT_decl_file : 2 + <103> DW_AT_decl_line : 20 + <104> DW_AT_type : <0x39> + <1><108>: Abbrev Number: 11 (DW_TAG_typedef) + <109> DW_AT_name : (indirect string, offset: 0x2e): __u32 + <10d> DW_AT_decl_file : 2 + <10e> DW_AT_decl_line : 26 + <10f> DW_AT_type : <0x47> + <1><113>: Abbrev Number: 11 (DW_TAG_typedef) + <114> DW_AT_name : (indirect string, offset: 0x1c6): __u64 + <118> DW_AT_decl_file : 2 + <119> DW_AT_decl_line : 30 + <11a> DW_AT_type : <0x4e> + <1><11e>: Abbrev Number: 12 (DW_TAG_enumeration_type) + <11f> DW_AT_name : (indirect string, offset: 0x138): v4l2_preemphasis + <123> DW_AT_byte_size : 4 + <124> DW_AT_decl_file : 6 + <125> DW_AT_decl_line : 763 + <127> DW_AT_sibling : <0x13e> + <2><12b>: Abbrev Number: 13 (DW_TAG_enumerator) + <12c> DW_AT_name : (indirect string, offset: 0xe): V4L2_PREEMPHASIS_DISABLED + <130> DW_AT_const_value : 0 + <2><131>: Abbrev Number: 13 (DW_TAG_enumerator) + <132> DW_AT_name : (indirect string, offset: 0x156): V4L2_PREEMPHASIS_50_uS + <136> DW_AT_const_value : 1 + <2><137>: Abbrev Number: 13 (DW_TAG_enumerator) + <138> DW_AT_name : (indirect string, offset: 0x105): V4L2_PREEMPHASIS_75_uS + <13c> DW_AT_const_value : 2 + <2><13d>: Abbrev Number: 0 + <1><13e>: Abbrev Number: 6 (DW_TAG_structure_type) + <13f> DW_AT_name : (indirect string, offset: 0x90): v4l2_fract + <143> DW_AT_byte_size : 8 + <144> DW_AT_decl_file : 3 + <145> DW_AT_decl_line : 212 + <146> DW_AT_sibling : <0x167> + <2><14a>: Abbrev Number: 7 (DW_TAG_member) + <14b> DW_AT_name : (indirect string, offset: 0x23e): numerator + <14f> DW_AT_decl_file : 3 + <150> DW_AT_decl_line : 213 + <151> DW_AT_type : <0x108> + <155> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><158>: Abbrev Number: 7 (DW_TAG_member) + <159> DW_AT_name : (indirect string, offset: 0x272): denominator + <15d> DW_AT_decl_file : 3 + <15e> DW_AT_decl_line : 214 + <15f> DW_AT_type : <0x108> + <163> DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2><166>: Abbrev Number: 0 + <1><167>: Abbrev Number: 14 (DW_TAG_array_type) + <168> DW_AT_type : <0x108> + <16c> DW_AT_sibling : <0x177> + <2><170>: Abbrev Number: 15 (DW_TAG_subrange_type) + <171> DW_AT_type : <0x63> + <175> DW_AT_upper_bound : 3 + <2><176>: Abbrev Number: 0 + <1><177>: Abbrev Number: 16 (DW_TAG_typedef) + <178> DW_AT_name : (indirect string, offset: 0x11c): v4l2_std_id + <17c> DW_AT_decl_file : 3 + <17d> DW_AT_decl_line : 826 + <17f> DW_AT_type : <0x113> + <1><183>: Abbrev Number: 17 (DW_TAG_structure_type) + <184> DW_AT_name : (indirect string, offset: 0x0): v4l2_standard + <188> DW_AT_byte_size : 72 + <189> DW_AT_decl_file : 3 + <18a> DW_AT_decl_line : 954 + <18c> DW_AT_sibling : <0x1ea> + <2><190>: Abbrev Number: 18 (DW_TAG_member) + <191> DW_AT_name : (indirect string, offset: 0x1ed): index + <195> DW_AT_decl_file : 3 + <196> DW_AT_decl_line : 955 + <198> DW_AT_type : <0x108> + <19c> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><19f>: Abbrev Number: 19 (DW_TAG_member) + <1a0> DW_AT_name : id + <1a3> DW_AT_decl_file : 3 + <1a4> DW_AT_decl_line : 956 + <1a6> DW_AT_type : <0x177> + <1aa> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><1ad>: Abbrev Number: 18 (DW_TAG_member) + <1ae> DW_AT_name : (indirect string, offset: 0x1e8): name + <1b2> DW_AT_decl_file : 3 + <1b3> DW_AT_decl_line : 957 + <1b5> DW_AT_type : <0x1ea> + <1b9> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><1bc>: Abbrev Number: 18 (DW_TAG_member) + <1bd> DW_AT_name : (indirect string, offset: 0x25d): frameperiod + <1c1> DW_AT_decl_file : 3 + <1c2> DW_AT_decl_line : 958 + <1c4> DW_AT_type : <0x13e> + <1c8> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><1cb>: Abbrev Number: 18 (DW_TAG_member) + <1cc> DW_AT_name : (indirect string, offset: 0x1b1): framelines + <1d0> DW_AT_decl_file : 3 + <1d1> DW_AT_decl_line : 959 + <1d3> DW_AT_type : <0x108> + <1d7> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><1da>: Abbrev Number: 18 (DW_TAG_member) + <1db> DW_AT_name : (indirect string, offset: 0x34): reserved + <1df> DW_AT_decl_file : 3 + <1e0> DW_AT_decl_line : 960 + <1e2> DW_AT_type : <0x167> + <1e6> DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) + <2><1e9>: Abbrev Number: 0 + <1><1ea>: Abbrev Number: 14 (DW_TAG_array_type) + <1eb> DW_AT_type : <0xfd> + <1ef> DW_AT_sibling : <0x1fa> + <2><1f3>: Abbrev Number: 15 (DW_TAG_subrange_type) + <1f4> DW_AT_type : <0x63> + <1f8> DW_AT_upper_bound : 23 + <2><1f9>: Abbrev Number: 0 + <1><1fa>: Abbrev Number: 11 (DW_TAG_typedef) + <1fb> DW_AT_name : (indirect string, offset: 0x72): struct_v4l2_standard + <1ff> DW_AT_decl_file : 4 + <200> DW_AT_decl_line : 45 + <201> DW_AT_type : <0x183> + <1><205>: Abbrev Number: 20 (DW_TAG_variable) + <206> DW_AT_name : (indirect string, offset: 0xf4): current_wordsize + <20a> DW_AT_decl_file : 5 + <20b> DW_AT_decl_line : 757 + <20d> DW_AT_type : <0x47> + <211> DW_AT_external : 1 + <212> DW_AT_declaration : 1 + <1><213>: Abbrev Number: 20 (DW_TAG_variable) + <214> DW_AT_name : (indirect string, offset: 0xed): sysent + <218> DW_AT_decl_file : 5 + <219> DW_AT_decl_line : 892 + <21b> DW_AT_type : <0xeb> + <21f> DW_AT_external : 1 + <220> DW_AT_declaration : 1 + <1><221>: Abbrev Number: 20 (DW_TAG_variable) + <222> DW_AT_name : (indirect string, offset: 0x1bc): nsyscalls + <226> DW_AT_decl_file : 5 + <227> DW_AT_decl_line : 903 + <229> DW_AT_type : <0x47> + <22d> DW_AT_external : 1 + <22e> DW_AT_declaration : 1 + <1><22f>: Abbrev Number: 21 (DW_TAG_variable) + <230> DW_AT_name : (indirect string, offset: 0x9b): mpers_target_var + <234> DW_AT_decl_file : 4 + <235> DW_AT_decl_line : 47 + <236> DW_AT_type : <0x1fa> + <23a> DW_AT_external : 1 + <23b> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><241>: Abbrev Number: 0 + diff --git a/mpers-mx32/struct_v4l2_standard.d2 b/mpers-mx32/struct_v4l2_standard.d2 new file mode 100644 index 000000000..0e0b13b9c --- /dev/null +++ b/mpers-mx32/struct_v4l2_standard.d2 @@ -0,0 +1,304 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x251): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x12e): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1d5): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xcd): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x5f): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x149): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb6): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x248): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xdb): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1cc): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x17b): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xed): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 1 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xcf> +<2><88> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x128): nargs +DW_AT_decl_file : 1 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><96> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xac): sys_flags +DW_AT_decl_file : 1 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 1 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x269): sys_func +DW_AT_decl_file : 1 +DW_AT_decl_line : 8 +DW_AT_type : <0xda> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x87): sys_name +DW_AT_decl_file : 1 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 9 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xda> +<2> +Abbrev Number: 10 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xcf> +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x16d): struct_sysent +DW_AT_decl_file : 1 +DW_AT_decl_line : 10 +DW_AT_type : <0x7c> +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf1> +<1> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xe0> +<1> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x28): _Bool +<1> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1e3): __u8 +DW_AT_decl_file : 2 +DW_AT_decl_line : 20 +DW_AT_type : <0x39> +<1><108> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x2e): __u32 +DW_AT_decl_file : 2 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><113> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1c6): __u64 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_type : <0x4e> +<1><11e> +Abbrev Number: 12 (DW_TAG_enumeration_type) +DW_AT_name : (indirect string, offset: 0x138): v4l2_preemphasis +DW_AT_byte_size : 4 +DW_AT_decl_file : 6 +DW_AT_decl_line : 763 +DW_AT_sibling : <0x13e> +<2><12b> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0xe): V4L2_PREEMPHASIS_DISABLED +DW_AT_const_value : 0 +<2><131> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x156): V4L2_PREEMPHASIS_50_uS +DW_AT_const_value : 1 +<2><137> +Abbrev Number: 13 (DW_TAG_enumerator) +DW_AT_name : (indirect string, offset: 0x105): V4L2_PREEMPHASIS_75_uS +DW_AT_const_value : 2 +<1><13e> +Abbrev Number: 6 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x90): v4l2_fract +DW_AT_byte_size : 8 +DW_AT_decl_file : 3 +DW_AT_decl_line : 212 +DW_AT_sibling : <0x167> +<2><14a> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x23e): numerator +DW_AT_decl_file : 3 +DW_AT_decl_line : 213 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><158> +Abbrev Number: 7 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x272): denominator +DW_AT_decl_file : 3 +DW_AT_decl_line : 214 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<1><167> +Abbrev Number: 14 (DW_TAG_array_type) +DW_AT_type : <0x108> +DW_AT_sibling : <0x177> +<2><170> +Abbrev Number: 15 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 3 +<1><177> +Abbrev Number: 16 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11c): v4l2_std_id +DW_AT_decl_file : 3 +DW_AT_decl_line : 826 +DW_AT_type : <0x113> +<1><183> +Abbrev Number: 17 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x0): v4l2_standard +DW_AT_byte_size : 72 +DW_AT_decl_file : 3 +DW_AT_decl_line : 954 +DW_AT_sibling : <0x1ea> +<2><190> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1ed): index +DW_AT_decl_file : 3 +DW_AT_decl_line : 955 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><19f> +Abbrev Number: 19 (DW_TAG_member) +DW_AT_name : id +DW_AT_decl_file : 3 +DW_AT_decl_line : 956 +DW_AT_type : <0x177> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><1ad> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e8): name +DW_AT_decl_file : 3 +DW_AT_decl_line : 957 +DW_AT_type : <0x1ea> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><1bc> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x25d): frameperiod +DW_AT_decl_file : 3 +DW_AT_decl_line : 958 +DW_AT_type : <0x13e> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><1cb> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b1): framelines +DW_AT_decl_file : 3 +DW_AT_decl_line : 959 +DW_AT_type : <0x108> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><1da> +Abbrev Number: 18 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x34): reserved +DW_AT_decl_file : 3 +DW_AT_decl_line : 960 +DW_AT_type : <0x167> +DW_AT_data_member_location: 2 byte block: 23 34 (DW_OP_plus_uconst: 52) +<1><1ea> +Abbrev Number: 14 (DW_TAG_array_type) +DW_AT_type : <0xfd> +DW_AT_sibling : <0x1fa> +<2><1f3> +Abbrev Number: 15 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 23 +<1><1fa> +Abbrev Number: 11 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x72): struct_v4l2_standard +DW_AT_decl_file : 4 +DW_AT_decl_line : 45 +DW_AT_type : <0x183> +<1><205> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xf4): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><213> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xed): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0xeb> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><221> +Abbrev Number: 20 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x1bc): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><22f> +Abbrev Number: 21 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x9b): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 47 +DW_AT_type : <0x1fa> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/struct_v4l2_standard.h b/mpers-mx32/struct_v4l2_standard.h new file mode 100644 index 000000000..abfe5ad10 --- /dev/null +++ b/mpers-mx32/struct_v4l2_standard.h @@ -0,0 +1,17 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +uint32_t index; +unsigned char mpers_filler_1[4]; +uint64_t id; +unsigned char name[24]; +struct { +uint32_t numerator; +uint32_t denominator; +} ATTRIBUTE_PACKED frameperiod; +uint32_t framelines; +uint32_t reserved[4]; +unsigned char mpers_end_filler_2[4]; +} ATTRIBUTE_PACKED mx32_struct_v4l2_standard; +#define MPERS_mx32_struct_v4l2_standard mx32_struct_v4l2_standard diff --git a/mpers-mx32/sysinfo_t.c b/mpers-mx32/sysinfo_t.c new file mode 100644 index 000000000..6e656cfb2 --- /dev/null +++ b/mpers-mx32/sysinfo_t.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993-1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2012 H.J. Lu + * Copyright (c) 2012 Denys Vlasenko + * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2015 Elvira Khabirova + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include +typedef struct sysinfo sysinfo_t; +sysinfo_t mpers_target_var; diff --git a/mpers-mx32/sysinfo_t.d1 b/mpers-mx32/sysinfo_t.d1 new file mode 100644 index 000000000..e7aeef69a --- /dev/null +++ b/mpers-mx32/sysinfo_t.d1 @@ -0,0 +1,284 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x25c (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x30): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x1c6): mpers-mx32/sysinfo_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x1fa): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1ee): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1bc): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x19b): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xd2): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x7b): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x128): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xbb): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1e5): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xe0): long unsigned int + <1><63>: Abbrev Number: 2 (DW_TAG_base_type) + <64> DW_AT_byte_size : 4 + <65> DW_AT_encoding : 7 (unsigned) + <66> DW_AT_name : (indirect string, offset: 0x180): sizetype + <1><6a>: Abbrev Number: 2 (DW_TAG_base_type) + <6b> DW_AT_byte_size : 1 + <6c> DW_AT_encoding : 6 (signed char) + <6d> DW_AT_name : (indirect string, offset: 0x143): char + <1><71>: Abbrev Number: 4 (DW_TAG_pointer_type) + <72> DW_AT_byte_size : 4 + <73> DW_AT_type : <0x77> + <1><77>: Abbrev Number: 5 (DW_TAG_const_type) + <78> DW_AT_type : <0x6a> + <1><7c>: Abbrev Number: 6 (DW_TAG_typedef) + <7d> DW_AT_name : (indirect string, offset: 0x8e): __kernel_long_t + <81> DW_AT_decl_file : 1 + <82> DW_AT_decl_line : 13 + <83> DW_AT_type : <0x32> + <1><87>: Abbrev Number: 6 (DW_TAG_typedef) + <88> DW_AT_name : (indirect string, offset: 0x165): __kernel_ulong_t + <8c> DW_AT_decl_file : 1 + <8d> DW_AT_decl_line : 14 + <8e> DW_AT_type : <0x4e> + <1><92>: Abbrev Number: 7 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0xf2): sysent + <97> DW_AT_byte_size : 20 + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 4 + <9a> DW_AT_sibling : <0xe5> + <2><9e>: Abbrev Number: 8 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0x111): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xb1): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x22b): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0xf0> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x9e): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 +
DW_AT_type : <0x71> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 4 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xe5> + <1>: Abbrev Number: 6 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x135): struct_sysent + DW_AT_decl_file : 2 + DW_AT_decl_line : 10 + DW_AT_type : <0x92> + <1><101>: Abbrev Number: 4 (DW_TAG_pointer_type) + <102> DW_AT_byte_size : 4 + <103> DW_AT_type : <0x107> + <1><107>: Abbrev Number: 5 (DW_TAG_const_type) + <108> DW_AT_type : <0xf6> + <1><10c>: Abbrev Number: 2 (DW_TAG_base_type) + <10d> DW_AT_byte_size : 1 + <10e> DW_AT_encoding : 2 (boolean) + <10f> DW_AT_name : (indirect string, offset: 0xc): _Bool + <1><113>: Abbrev Number: 6 (DW_TAG_typedef) + <114> DW_AT_name : (indirect string, offset: 0x6): __u16 + <118> DW_AT_decl_file : 3 + <119> DW_AT_decl_line : 23 + <11a> DW_AT_type : <0x40> + <1><11e>: Abbrev Number: 6 (DW_TAG_typedef) + <11f> DW_AT_name : (indirect string, offset: 0x12): __u32 + <123> DW_AT_decl_file : 3 + <124> DW_AT_decl_line : 26 + <125> DW_AT_type : <0x47> + <1><129>: Abbrev Number: 7 (DW_TAG_structure_type) + <12a> DW_AT_name : (indirect string, offset: 0x189): sysinfo + <12e> DW_AT_byte_size : 112 + <12f> DW_AT_decl_file : 4 + <130> DW_AT_decl_line : 7 + <131> DW_AT_sibling : <0x1f9> + <2><135>: Abbrev Number: 8 (DW_TAG_member) + <136> DW_AT_name : (indirect string, offset: 0x10a): uptime + <13a> DW_AT_decl_file : 4 + <13b> DW_AT_decl_line : 8 + <13c> DW_AT_type : <0x7c> + <140> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><143>: Abbrev Number: 8 (DW_TAG_member) + <144> DW_AT_name : (indirect string, offset: 0x18): loads + <148> DW_AT_decl_file : 4 + <149> DW_AT_decl_line : 9 + <14a> DW_AT_type : <0x1f9> + <14e> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><151>: Abbrev Number: 8 (DW_TAG_member) + <152> DW_AT_name : (indirect string, offset: 0x27): totalram + <156> DW_AT_decl_file : 4 + <157> DW_AT_decl_line : 10 + <158> DW_AT_type : <0x87> + <15c> DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) + <2><15f>: Abbrev Number: 8 (DW_TAG_member) + <160> DW_AT_name : (indirect string, offset: 0x1dd): freeram + <164> DW_AT_decl_file : 4 + <165> DW_AT_decl_line : 11 + <166> DW_AT_type : <0x87> + <16a> DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) + <2><16d>: Abbrev Number: 8 (DW_TAG_member) + <16e> DW_AT_name : (indirect string, offset: 0x148): sharedram + <172> DW_AT_decl_file : 4 + <173> DW_AT_decl_line : 12 + <174> DW_AT_type : <0x87> + <178> DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) + <2><17b>: Abbrev Number: 8 (DW_TAG_member) + <17c> DW_AT_name : (indirect string, offset: 0xa7): bufferram + <180> DW_AT_decl_file : 4 + <181> DW_AT_decl_line : 13 + <182> DW_AT_type : <0x87> + <186> DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) + <2><189>: Abbrev Number: 8 (DW_TAG_member) + <18a> DW_AT_name : (indirect string, offset: 0x191): totalswap + <18e> DW_AT_decl_file : 4 + <18f> DW_AT_decl_line : 14 + <190> DW_AT_type : <0x87> + <194> DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) + <2><197>: Abbrev Number: 8 (DW_TAG_member) + <198> DW_AT_name : (indirect string, offset: 0x15c): freeswap + <19c> DW_AT_decl_file : 4 + <19d> DW_AT_decl_line : 15 + <19e> DW_AT_type : <0x87> + <1a2> DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) + <2><1a5>: Abbrev Number: 8 (DW_TAG_member) + <1a6> DW_AT_name : (indirect string, offset: 0x0): procs + <1aa> DW_AT_decl_file : 4 + <1ab> DW_AT_decl_line : 16 + <1ac> DW_AT_type : <0x113> + <1b0> DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) + <2><1b3>: Abbrev Number: 9 (DW_TAG_member) + <1b4> DW_AT_name : pad + <1b8> DW_AT_decl_file : 4 + <1b9> DW_AT_decl_line : 17 + <1ba> DW_AT_type : <0x113> + <1be> DW_AT_data_member_location: 2 byte block: 23 52 (DW_OP_plus_uconst: 82) + <2><1c1>: Abbrev Number: 8 (DW_TAG_member) + <1c2> DW_AT_name : (indirect string, offset: 0x152): totalhigh + <1c6> DW_AT_decl_file : 4 + <1c7> DW_AT_decl_line : 18 + <1c8> DW_AT_type : <0x87> + <1cc> DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) + <2><1cf>: Abbrev Number: 8 (DW_TAG_member) + <1d0> DW_AT_name : (indirect string, offset: 0x1e): freehigh + <1d4> DW_AT_decl_file : 4 + <1d5> DW_AT_decl_line : 19 + <1d6> DW_AT_type : <0x87> + <1da> DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) + <2><1dd>: Abbrev Number: 8 (DW_TAG_member) + <1de> DW_AT_name : (indirect string, offset: 0x1a9): mem_unit + <1e2> DW_AT_decl_file : 4 + <1e3> DW_AT_decl_line : 20 + <1e4> DW_AT_type : <0x11e> + <1e8> DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) + <2><1eb>: Abbrev Number: 9 (DW_TAG_member) + <1ec> DW_AT_name : _f + <1ef> DW_AT_decl_file : 4 + <1f0> DW_AT_decl_line : 21 + <1f1> DW_AT_type : <0x209> + <1f5> DW_AT_data_member_location: 2 byte block: 23 6c (DW_OP_plus_uconst: 108) + <2><1f8>: Abbrev Number: 0 + <1><1f9>: Abbrev Number: 12 (DW_TAG_array_type) + <1fa> DW_AT_type : <0x87> + <1fe> DW_AT_sibling : <0x209> + <2><202>: Abbrev Number: 13 (DW_TAG_subrange_type) + <203> DW_AT_type : <0x63> + <207> DW_AT_upper_bound : 2 + <2><208>: Abbrev Number: 0 + <1><209>: Abbrev Number: 12 (DW_TAG_array_type) + <20a> DW_AT_type : <0x6a> + <20e> DW_AT_sibling : <0x218> + <2><212>: Abbrev Number: 14 (DW_TAG_subrange_type) + <213> DW_AT_type : <0x63> + <2><217>: Abbrev Number: 0 + <1><218>: Abbrev Number: 6 (DW_TAG_typedef) + <219> DW_AT_name : (indirect string, offset: 0x1b2): sysinfo_t + <21d> DW_AT_decl_file : 5 + <21e> DW_AT_decl_line : 37 + <21f> DW_AT_type : <0x129> + <1><223>: Abbrev Number: 15 (DW_TAG_variable) + <224> DW_AT_name : (indirect string, offset: 0xf9): current_wordsize + <228> DW_AT_decl_file : 6 + <229> DW_AT_decl_line : 757 + <22b> DW_AT_type : <0x47> + <22f> DW_AT_external : 1 + <230> DW_AT_declaration : 1 + <1><231>: Abbrev Number: 15 (DW_TAG_variable) + <232> DW_AT_name : (indirect string, offset: 0xf2): sysent + <236> DW_AT_decl_file : 6 + <237> DW_AT_decl_line : 892 + <239> DW_AT_type : <0x101> + <23d> DW_AT_external : 1 + <23e> DW_AT_declaration : 1 + <1><23f>: Abbrev Number: 15 (DW_TAG_variable) + <240> DW_AT_name : (indirect string, offset: 0x176): nsyscalls + <244> DW_AT_decl_file : 6 + <245> DW_AT_decl_line : 903 + <247> DW_AT_type : <0x47> + <24b> DW_AT_external : 1 + <24c> DW_AT_declaration : 1 + <1><24d>: Abbrev Number: 16 (DW_TAG_variable) + <24e> DW_AT_name : (indirect string, offset: 0x117): mpers_target_var + <252> DW_AT_decl_file : 5 + <253> DW_AT_decl_line : 38 + <254> DW_AT_type : <0x218> + <258> DW_AT_external : 1 + <259> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><25f>: Abbrev Number: 0 + diff --git a/mpers-mx32/sysinfo_t.d2 b/mpers-mx32/sysinfo_t.d2 new file mode 100644 index 000000000..e69796153 --- /dev/null +++ b/mpers-mx32/sysinfo_t.d2 @@ -0,0 +1,319 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1ee): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1bc): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x19b): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xd2): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x7b): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x128): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xbb): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1e5): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xe0): long unsigned int +<1><63> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x180): sizetype +<1><6a> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x143): char +<1><71> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x77> +<1><77> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0x6a> +<1><7c> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x8e): __kernel_long_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 13 +DW_AT_type : <0x32> +<1><87> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x165): __kernel_ulong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 14 +DW_AT_type : <0x4e> +<1><92> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xf2): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xe5> +<2><9e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x111): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xb1): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x22b): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0xf0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x9e): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x71> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xe5> +<1> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x135): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0x92> +<1><101> +Abbrev Number: 4 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x107> +<1><107> +Abbrev Number: 5 (DW_TAG_const_type) +DW_AT_type : <0xf6> +<1><10c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xc): _Bool +<1><113> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x6): __u16 +DW_AT_decl_file : 3 +DW_AT_decl_line : 23 +DW_AT_type : <0x40> +<1><11e> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x12): __u32 +DW_AT_decl_file : 3 +DW_AT_decl_line : 26 +DW_AT_type : <0x47> +<1><129> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x189): sysinfo +DW_AT_byte_size : 112 +DW_AT_decl_file : 4 +DW_AT_decl_line : 7 +DW_AT_sibling : <0x1f9> +<2><135> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x10a): uptime +DW_AT_decl_file : 4 +DW_AT_decl_line : 8 +DW_AT_type : <0x7c> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><143> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x18): loads +DW_AT_decl_file : 4 +DW_AT_decl_line : 9 +DW_AT_type : <0x1f9> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><151> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x27): totalram +DW_AT_decl_file : 4 +DW_AT_decl_line : 10 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 20 (DW_OP_plus_uconst: 32) +<2><15f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1dd): freeram +DW_AT_decl_file : 4 +DW_AT_decl_line : 11 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 28 (DW_OP_plus_uconst: 40) +<2><16d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x148): sharedram +DW_AT_decl_file : 4 +DW_AT_decl_line : 12 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 30 (DW_OP_plus_uconst: 48) +<2><17b> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa7): bufferram +DW_AT_decl_file : 4 +DW_AT_decl_line : 13 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 38 (DW_OP_plus_uconst: 56) +<2><189> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x191): totalswap +DW_AT_decl_file : 4 +DW_AT_decl_line : 14 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 40 (DW_OP_plus_uconst: 64) +<2><197> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x15c): freeswap +DW_AT_decl_file : 4 +DW_AT_decl_line : 15 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 48 (DW_OP_plus_uconst: 72) +<2><1a5> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x0): procs +DW_AT_decl_file : 4 +DW_AT_decl_line : 16 +DW_AT_type : <0x113> +DW_AT_data_member_location: 2 byte block: 23 50 (DW_OP_plus_uconst: 80) +<2><1b3> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : pad +DW_AT_decl_file : 4 +DW_AT_decl_line : 17 +DW_AT_type : <0x113> +DW_AT_data_member_location: 2 byte block: 23 52 (DW_OP_plus_uconst: 82) +<2><1c1> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x152): totalhigh +DW_AT_decl_file : 4 +DW_AT_decl_line : 18 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 58 (DW_OP_plus_uconst: 88) +<2><1cf> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1e): freehigh +DW_AT_decl_file : 4 +DW_AT_decl_line : 19 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 60 (DW_OP_plus_uconst: 96) +<2><1dd> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a9): mem_unit +DW_AT_decl_file : 4 +DW_AT_decl_line : 20 +DW_AT_type : <0x11e> +DW_AT_data_member_location: 2 byte block: 23 68 (DW_OP_plus_uconst: 104) +<2><1eb> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : _f +DW_AT_decl_file : 4 +DW_AT_decl_line : 21 +DW_AT_type : <0x209> +DW_AT_data_member_location: 2 byte block: 23 6c (DW_OP_plus_uconst: 108) +<1><1f9> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x87> +DW_AT_sibling : <0x209> +<2><202> +Abbrev Number: 13 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +DW_AT_upper_bound : 2 +<1><209> +Abbrev Number: 12 (DW_TAG_array_type) +DW_AT_type : <0x6a> +DW_AT_sibling : <0x218> +<2><212> +Abbrev Number: 14 (DW_TAG_subrange_type) +DW_AT_type : <0x63> +<1><218> +Abbrev Number: 6 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1b2): sysinfo_t +DW_AT_decl_file : 5 +DW_AT_decl_line : 37 +DW_AT_type : <0x129> +<1><223> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xf9): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><231> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xf2): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x101> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><23f> +Abbrev Number: 15 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x176): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><24d> +Abbrev Number: 16 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x117): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 38 +DW_AT_type : <0x218> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/sysinfo_t.h b/mpers-mx32/sysinfo_t.h new file mode 100644 index 000000000..15604062e --- /dev/null +++ b/mpers-mx32/sysinfo_t.h @@ -0,0 +1,22 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t uptime; +uint64_t loads[3]; +uint64_t totalram; +uint64_t freeram; +uint64_t sharedram; +uint64_t bufferram; +uint64_t totalswap; +uint64_t freeswap; +uint16_t procs; +uint16_t pad; +unsigned char mpers_filler_1[4]; +uint64_t totalhigh; +uint64_t freehigh; +uint32_t mem_unit; +char _f[0]; +unsigned char mpers_end_filler_2[4]; +} ATTRIBUTE_PACKED mx32_sysinfo_t; +#define MPERS_mx32_sysinfo_t mx32_sysinfo_t diff --git a/mpers-mx32/time_t.c b/mpers-mx32/time_t.c new file mode 100644 index 000000000..f2a0e4054 --- /dev/null +++ b/mpers-mx32/time_t.c @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +time_t mpers_target_var; diff --git a/mpers-mx32/time_t.d1 b/mpers-mx32/time_t.d1 new file mode 100644 index 000000000..eaac3b17b --- /dev/null +++ b/mpers-mx32/time_t.d1 @@ -0,0 +1,170 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x157 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x3b): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x151): mpers-mx32/time_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0xc6): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x178): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x18d): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x133): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xfc): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x165): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x197): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xaf): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x111): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0x9d): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x11): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x184): sizetype + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x141): __time_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 139 + <7c> DW_AT_type : <0x63> + <1><80>: Abbrev Number: 2 (DW_TAG_base_type) + <81> DW_AT_byte_size : 1 + <82> DW_AT_encoding : 6 (signed char) + <83> DW_AT_name : (indirect string, offset: 0xf7): char + <1><87>: Abbrev Number: 4 (DW_TAG_typedef) + <88> DW_AT_name : (indirect string, offset: 0x10a): time_t + <8c> DW_AT_decl_file : 2 + <8d> DW_AT_decl_line : 75 + <8e> DW_AT_type : <0x75> + <1><92>: Abbrev Number: 5 (DW_TAG_pointer_type) + <93> DW_AT_byte_size : 4 + <94> DW_AT_type : <0x98> + <1><98>: Abbrev Number: 6 (DW_TAG_const_type) + <99> DW_AT_type : <0x80> + <1><9d>: Abbrev Number: 7 (DW_TAG_structure_type) + <9e> DW_AT_name : (indirect string, offset: 0x14a): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x97): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x123): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x11a): sys_func + DW_AT_decl_file : 3 + DW_AT_decl_line : 8 + DW_AT_type : <0xfb> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1a): sys_name + DW_AT_decl_file : 3 + DW_AT_decl_line : 9 + DW_AT_type : <0x92> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xfb> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf0> + <1><101>: Abbrev Number: 4 (DW_TAG_typedef) + <102> DW_AT_name : (indirect string, offset: 0x23): struct_sysent + <106> DW_AT_decl_file : 3 + <107> DW_AT_decl_line : 10 + <108> DW_AT_type : <0x9d> + <1><10c>: Abbrev Number: 5 (DW_TAG_pointer_type) + <10d> DW_AT_byte_size : 4 + <10e> DW_AT_type : <0x112> + <1><112>: Abbrev Number: 6 (DW_TAG_const_type) + <113> DW_AT_type : <0x101> + <1><117>: Abbrev Number: 2 (DW_TAG_base_type) + <118> DW_AT_byte_size : 1 + <119> DW_AT_encoding : 2 (boolean) + <11a> DW_AT_name : (indirect string, offset: 0x12d): _Bool + <1><11e>: Abbrev Number: 12 (DW_TAG_variable) + <11f> DW_AT_name : (indirect string, offset: 0x0): current_wordsize + <123> DW_AT_decl_file : 4 + <124> DW_AT_decl_line : 757 + <126> DW_AT_type : <0x47> + <12a> DW_AT_external : 1 + <12b> DW_AT_declaration : 1 + <1><12c>: Abbrev Number: 12 (DW_TAG_variable) + <12d> DW_AT_name : (indirect string, offset: 0x14a): sysent + <131> DW_AT_decl_file : 4 + <132> DW_AT_decl_line : 892 + <134> DW_AT_type : <0x10c> + <138> DW_AT_external : 1 + <139> DW_AT_declaration : 1 + <1><13a>: Abbrev Number: 12 (DW_TAG_variable) + <13b> DW_AT_name : (indirect string, offset: 0x31): nsyscalls + <13f> DW_AT_decl_file : 4 + <140> DW_AT_decl_line : 903 + <142> DW_AT_type : <0x47> + <146> DW_AT_external : 1 + <147> DW_AT_declaration : 1 + <1><148>: Abbrev Number: 13 (DW_TAG_variable) + <149> DW_AT_name : (indirect string, offset: 0x86): mpers_target_var + <14d> DW_AT_decl_file : 5 + <14e> DW_AT_decl_line : 31 + <14f> DW_AT_type : <0x87> + <153> DW_AT_external : 1 + <154> DW_AT_location : 5 byte block: 3 8 0 0 0 (DW_OP_addr: 8) + <1><15a>: Abbrev Number: 0 + diff --git a/mpers-mx32/time_t.d2 b/mpers-mx32/time_t.d2 new file mode 100644 index 000000000..8651d26d2 --- /dev/null +++ b/mpers-mx32/time_t.d2 @@ -0,0 +1,187 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x178): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x18d): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x133): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xfc): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x165): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x197): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xaf): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x111): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x9d): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x184): sizetype +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x141): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x63> +<1><80> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0xf7): char +<1><87> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x10a): time_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 75 +DW_AT_type : <0x75> +<1><92> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x98> +<1><98> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x80> +<1><9d> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x14a): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x97): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x123): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x11a): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0xfb> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1a): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xfb> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf0> +<1><101> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x23): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0x9d> +<1><10c> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x112> +<1><112> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x101> +<1><117> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x12d): _Bool +<1><11e> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x0): current_wordsize +DW_AT_decl_file : 4 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><12c> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x14a): sysent +DW_AT_decl_file : 4 +DW_AT_decl_line : 892 +DW_AT_type : <0x10c> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><13a> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x31): nsyscalls +DW_AT_decl_file : 4 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><148> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x86): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 31 +DW_AT_type : <0x87> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 8 0 0 0 (DW_OP_addr: 8) diff --git a/mpers-mx32/time_t.h b/mpers-mx32/time_t.h new file mode 100644 index 000000000..ac7ad26f3 --- /dev/null +++ b/mpers-mx32/time_t.h @@ -0,0 +1,5 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +int64_t mx32_time_t; +#define MPERS_mx32_time_t mx32_time_t diff --git a/mpers-mx32/timespec_t.c b/mpers-mx32/timespec_t.c new file mode 100644 index 000000000..c5171fdad --- /dev/null +++ b/mpers-mx32/timespec_t.c @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +typedef struct timespec timespec_t; + +timespec_t mpers_target_var; diff --git a/mpers-mx32/timespec_t.d1 b/mpers-mx32/timespec_t.d1 new file mode 100644 index 000000000..70bdb1add --- /dev/null +++ b/mpers-mx32/timespec_t.d1 @@ -0,0 +1,194 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x18b (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x1e): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x0): mpers-mx32/timespec_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x125): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x19c): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x189): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x170): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xa4): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x1a8): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x105): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x8d): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x193): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xb2): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0xfc): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x160): sizetype + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0xdc): __time_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 139 + <7c> DW_AT_type : <0x63> + <1><80>: Abbrev Number: 4 (DW_TAG_typedef) + <81> DW_AT_name : (indirect string, offset: 0x1c4): __syscall_slong_t + <85> DW_AT_decl_file : 1 + <86> DW_AT_decl_line : 175 + <87> DW_AT_type : <0x63> + <1><8b>: Abbrev Number: 2 (DW_TAG_base_type) + <8c> DW_AT_byte_size : 1 + <8d> DW_AT_encoding : 6 (signed char) + <8e> DW_AT_name : (indirect string, offset: 0x120): char + <1><92>: Abbrev Number: 5 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0x7a): timespec + <97> DW_AT_byte_size : 16 + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 120 + <9a> DW_AT_sibling : <0xbb> + <2><9e>: Abbrev Number: 6 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0x169): tv_sec + DW_AT_decl_file : 2 + DW_AT_decl_line : 122 + DW_AT_type : <0x75> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x69): tv_nsec + DW_AT_decl_file : 2 + DW_AT_decl_line : 123 + DW_AT_type : <0x80> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xc1> + <1>: Abbrev Number: 8 (DW_TAG_const_type) + DW_AT_type : <0x8b> + <1>: Abbrev Number: 5 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xc4): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x119> + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xe5): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> +
DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x83): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1bb): sys_func + <101> DW_AT_decl_file : 3 + <102> DW_AT_decl_line : 8 + <103> DW_AT_type : <0x124> + <107> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><10a>: Abbrev Number: 6 (DW_TAG_member) + <10b> DW_AT_name : (indirect string, offset: 0x71): sys_name + <10f> DW_AT_decl_file : 3 + <110> DW_AT_decl_line : 9 + <111> DW_AT_type : <0xbb> + <115> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><118>: Abbrev Number: 0 + <1><119>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <11a> DW_AT_type : <0x2b> + <11e> DW_AT_sibling : <0x124> + <2><122>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><123>: Abbrev Number: 0 + <1><124>: Abbrev Number: 7 (DW_TAG_pointer_type) + <125> DW_AT_byte_size : 4 + <126> DW_AT_type : <0x119> + <1><12a>: Abbrev Number: 4 (DW_TAG_typedef) + <12b> DW_AT_name : (indirect string, offset: 0x112): struct_sysent + <12f> DW_AT_decl_file : 3 + <130> DW_AT_decl_line : 10 + <131> DW_AT_type : <0xc6> + <1><135>: Abbrev Number: 7 (DW_TAG_pointer_type) + <136> DW_AT_byte_size : 4 + <137> DW_AT_type : <0x13b> + <1><13b>: Abbrev Number: 8 (DW_TAG_const_type) + <13c> DW_AT_type : <0x12a> + <1><140>: Abbrev Number: 2 (DW_TAG_base_type) + <141> DW_AT_byte_size : 1 + <142> DW_AT_encoding : 2 (boolean) + <143> DW_AT_name : (indirect string, offset: 0x18): _Bool + <1><147>: Abbrev Number: 4 (DW_TAG_typedef) + <148> DW_AT_name : (indirect string, offset: 0x17e): timespec_t + <14c> DW_AT_decl_file : 4 + <14d> DW_AT_decl_line : 31 + <14e> DW_AT_type : <0x92> + <1><152>: Abbrev Number: 12 (DW_TAG_variable) + <153> DW_AT_name : (indirect string, offset: 0xcb): current_wordsize + <157> DW_AT_decl_file : 5 + <158> DW_AT_decl_line : 757 + <15a> DW_AT_type : <0x47> + <15e> DW_AT_external : 1 + <15f> DW_AT_declaration : 1 + <1><160>: Abbrev Number: 12 (DW_TAG_variable) + <161> DW_AT_name : (indirect string, offset: 0xc4): sysent + <165> DW_AT_decl_file : 5 + <166> DW_AT_decl_line : 892 + <168> DW_AT_type : <0x135> + <16c> DW_AT_external : 1 + <16d> DW_AT_declaration : 1 + <1><16e>: Abbrev Number: 12 (DW_TAG_variable) + <16f> DW_AT_name : (indirect string, offset: 0x156): nsyscalls + <173> DW_AT_decl_file : 5 + <174> DW_AT_decl_line : 903 + <176> DW_AT_type : <0x47> + <17a> DW_AT_external : 1 + <17b> DW_AT_declaration : 1 + <1><17c>: Abbrev Number: 13 (DW_TAG_variable) + <17d> DW_AT_name : (indirect string, offset: 0xeb): mpers_target_var + <181> DW_AT_decl_file : 4 + <182> DW_AT_decl_line : 33 + <183> DW_AT_type : <0x147> + <187> DW_AT_external : 1 + <188> DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) + <1><18e>: Abbrev Number: 0 + diff --git a/mpers-mx32/timespec_t.d2 b/mpers-mx32/timespec_t.d2 new file mode 100644 index 000000000..15208eba0 --- /dev/null +++ b/mpers-mx32/timespec_t.d2 @@ -0,0 +1,214 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x19c): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x189): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x170): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xa4): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x1a8): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x105): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x8d): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x193): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb2): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xfc): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x160): sizetype +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xdc): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x63> +<1><80> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x1c4): __syscall_slong_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 175 +DW_AT_type : <0x63> +<1><8b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x120): char +<1><92> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x7a): timespec +DW_AT_byte_size : 16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 120 +DW_AT_sibling : <0xbb> +<2><9e> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x169): tv_sec +DW_AT_decl_file : 2 +DW_AT_decl_line : 122 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x69): tv_nsec +DW_AT_decl_file : 2 +DW_AT_decl_line : 123 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xc1> +<1> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x8b> +<1> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc4): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x119> +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe5): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x83): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1bb): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x124> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><10a> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x71): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0xbb> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><119> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x124> +<2><122> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><124> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x119> +<1><12a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x112): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xc6> +<1><135> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x13b> +<1><13b> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x12a> +<1><140> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x18): _Bool +<1><147> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x17e): timespec_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 31 +DW_AT_type : <0x92> +<1><152> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xcb): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><160> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc4): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x135> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><16e> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x156): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><17c> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xeb): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 33 +DW_AT_type : <0x147> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) diff --git a/mpers-mx32/timespec_t.h b/mpers-mx32/timespec_t.h new file mode 100644 index 000000000..6bb8363a8 --- /dev/null +++ b/mpers-mx32/timespec_t.h @@ -0,0 +1,8 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t tv_sec; +int64_t tv_nsec; +} ATTRIBUTE_PACKED mx32_timespec_t; +#define MPERS_mx32_timespec_t mx32_timespec_t diff --git a/mpers-mx32/timeval_t.c b/mpers-mx32/timeval_t.c new file mode 100644 index 000000000..5d867b5a0 --- /dev/null +++ b/mpers-mx32/timeval_t.c @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + + +typedef struct timeval timeval_t; + +timeval_t mpers_target_var; diff --git a/mpers-mx32/timeval_t.d1 b/mpers-mx32/timeval_t.d1 new file mode 100644 index 000000000..399b670c8 --- /dev/null +++ b/mpers-mx32/timeval_t.d1 @@ -0,0 +1,194 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x18b (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x6): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x10e): mpers-mx32/timeval_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x14e): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1ba): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1a7): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x199): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xa5): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x51): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x6e): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x8e): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1b1): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xb3): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0xfd): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x189): sizetype + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0xdd): __time_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 139 + <7c> DW_AT_type : <0x63> + <1><80>: Abbrev Number: 4 (DW_TAG_typedef) + <81> DW_AT_name : (indirect string, offset: 0x138): __suseconds_t + <85> DW_AT_decl_file : 1 + <86> DW_AT_decl_line : 141 + <87> DW_AT_type : <0x63> + <1><8b>: Abbrev Number: 2 (DW_TAG_base_type) + <8c> DW_AT_byte_size : 1 + <8d> DW_AT_encoding : 6 (signed char) + <8e> DW_AT_name : (indirect string, offset: 0x133): char + <1><92>: Abbrev Number: 5 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0x106): timeval + <97> DW_AT_byte_size : 16 + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 30 + <9a> DW_AT_sibling : <0xbb> + <2><9e>: Abbrev Number: 6 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0x192): tv_sec + DW_AT_decl_file : 2 + DW_AT_decl_line : 32 + DW_AT_type : <0x75> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x146): tv_usec + DW_AT_decl_file : 2 + DW_AT_decl_line : 33 + DW_AT_type : <0x80> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 7 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xc1> + <1>: Abbrev Number: 8 (DW_TAG_const_type) + DW_AT_type : <0x8b> + <1>: Abbrev Number: 5 (DW_TAG_structure_type) + DW_AT_name : (indirect string, offset: 0xc5): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0x119> + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xe6): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> +
DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x84): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 6 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1c6): sys_func + <101> DW_AT_decl_file : 3 + <102> DW_AT_decl_line : 8 + <103> DW_AT_type : <0x124> + <107> DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2><10a>: Abbrev Number: 6 (DW_TAG_member) + <10b> DW_AT_name : (indirect string, offset: 0x7b): sys_name + <10f> DW_AT_decl_file : 3 + <110> DW_AT_decl_line : 9 + <111> DW_AT_type : <0xbb> + <115> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><118>: Abbrev Number: 0 + <1><119>: Abbrev Number: 10 (DW_TAG_subroutine_type) + <11a> DW_AT_type : <0x2b> + <11e> DW_AT_sibling : <0x124> + <2><122>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2><123>: Abbrev Number: 0 + <1><124>: Abbrev Number: 7 (DW_TAG_pointer_type) + <125> DW_AT_byte_size : 4 + <126> DW_AT_type : <0x119> + <1><12a>: Abbrev Number: 4 (DW_TAG_typedef) + <12b> DW_AT_name : (indirect string, offset: 0x125): struct_sysent + <12f> DW_AT_decl_file : 3 + <130> DW_AT_decl_line : 10 + <131> DW_AT_type : <0xc6> + <1><135>: Abbrev Number: 7 (DW_TAG_pointer_type) + <136> DW_AT_byte_size : 4 + <137> DW_AT_type : <0x13b> + <1><13b>: Abbrev Number: 8 (DW_TAG_const_type) + <13c> DW_AT_type : <0x12a> + <1><140>: Abbrev Number: 2 (DW_TAG_base_type) + <141> DW_AT_byte_size : 1 + <142> DW_AT_encoding : 2 (boolean) + <143> DW_AT_name : (indirect string, offset: 0x0): _Bool + <1><147>: Abbrev Number: 4 (DW_TAG_typedef) + <148> DW_AT_name : (indirect string, offset: 0x64): timeval_t + <14c> DW_AT_decl_file : 4 + <14d> DW_AT_decl_line : 31 + <14e> DW_AT_type : <0x92> + <1><152>: Abbrev Number: 12 (DW_TAG_variable) + <153> DW_AT_name : (indirect string, offset: 0xcc): current_wordsize + <157> DW_AT_decl_file : 5 + <158> DW_AT_decl_line : 757 + <15a> DW_AT_type : <0x47> + <15e> DW_AT_external : 1 + <15f> DW_AT_declaration : 1 + <1><160>: Abbrev Number: 12 (DW_TAG_variable) + <161> DW_AT_name : (indirect string, offset: 0xc5): sysent + <165> DW_AT_decl_file : 5 + <166> DW_AT_decl_line : 892 + <168> DW_AT_type : <0x135> + <16c> DW_AT_external : 1 + <16d> DW_AT_declaration : 1 + <1><16e>: Abbrev Number: 12 (DW_TAG_variable) + <16f> DW_AT_name : (indirect string, offset: 0x17f): nsyscalls + <173> DW_AT_decl_file : 5 + <174> DW_AT_decl_line : 903 + <176> DW_AT_type : <0x47> + <17a> DW_AT_external : 1 + <17b> DW_AT_declaration : 1 + <1><17c>: Abbrev Number: 13 (DW_TAG_variable) + <17d> DW_AT_name : (indirect string, offset: 0xec): mpers_target_var + <181> DW_AT_decl_file : 4 + <182> DW_AT_decl_line : 33 + <183> DW_AT_type : <0x147> + <187> DW_AT_external : 1 + <188> DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) + <1><18e>: Abbrev Number: 0 + diff --git a/mpers-mx32/timeval_t.d2 b/mpers-mx32/timeval_t.d2 new file mode 100644 index 000000000..e5ea8d051 --- /dev/null +++ b/mpers-mx32/timeval_t.d2 @@ -0,0 +1,214 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1ba): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a7): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x199): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xa5): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x51): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x6e): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x8e): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1b1): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb3): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xfd): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x189): sizetype +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xdd): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x63> +<1><80> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x138): __suseconds_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 141 +DW_AT_type : <0x63> +<1><8b> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x133): char +<1><92> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x106): timeval +DW_AT_byte_size : 16 +DW_AT_decl_file : 2 +DW_AT_decl_line : 30 +DW_AT_sibling : <0xbb> +<2><9e> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x192): tv_sec +DW_AT_decl_file : 2 +DW_AT_decl_line : 32 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x146): tv_usec +DW_AT_decl_file : 2 +DW_AT_decl_line : 33 +DW_AT_type : <0x80> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xc1> +<1> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x8b> +<1> +Abbrev Number: 5 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc5): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0x119> +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe6): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x84): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1c6): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0x124> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2><10a> +Abbrev Number: 6 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7b): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0xbb> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1><119> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0x124> +<2><122> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1><124> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x119> +<1><12a> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x125): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0xc6> +<1><135> +Abbrev Number: 7 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x13b> +<1><13b> +Abbrev Number: 8 (DW_TAG_const_type) +DW_AT_type : <0x12a> +<1><140> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x0): _Bool +<1><147> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x64): timeval_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 31 +DW_AT_type : <0x92> +<1><152> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xcc): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><160> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc5): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x135> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><16e> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x17f): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><17c> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xec): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 33 +DW_AT_type : <0x147> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) diff --git a/mpers-mx32/timeval_t.h b/mpers-mx32/timeval_t.h new file mode 100644 index 000000000..d0e484509 --- /dev/null +++ b/mpers-mx32/timeval_t.h @@ -0,0 +1,8 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t tv_sec; +int64_t tv_usec; +} ATTRIBUTE_PACKED mx32_timeval_t; +#define MPERS_mx32_timeval_t mx32_timeval_t diff --git a/mpers-mx32/tms_t.c b/mpers-mx32/tms_t.c new file mode 100644 index 000000000..7af2d32ac --- /dev/null +++ b/mpers-mx32/tms_t.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993-1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2012 H.J. Lu + * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include +typedef struct tms tms_t; +tms_t mpers_target_var; diff --git a/mpers-mx32/tms_t.d1 b/mpers-mx32/tms_t.d1 new file mode 100644 index 000000000..e4aed808c --- /dev/null +++ b/mpers-mx32/tms_t.d1 @@ -0,0 +1,206 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x1a7 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x29): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x0): mpers-mx32/tms_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x146): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1c0): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x1a2): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x18a): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xc3): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x74): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x126): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0xac): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1ac): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xd1): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0x11d): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x181): sizetype + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0x198): __clock_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 135 + <7c> DW_AT_type : <0x63> + <1><80>: Abbrev Number: 2 (DW_TAG_base_type) + <81> DW_AT_byte_size : 1 + <82> DW_AT_encoding : 6 (signed char) + <83> DW_AT_name : (indirect string, offset: 0x141): char + <1><87>: Abbrev Number: 4 (DW_TAG_typedef) + <88> DW_AT_name : (indirect string, offset: 0x9a): clock_t + <8c> DW_AT_decl_file : 2 + <8d> DW_AT_decl_line : 59 + <8e> DW_AT_type : <0x75> + <1><92>: Abbrev Number: 5 (DW_TAG_pointer_type) + <93> DW_AT_byte_size : 4 + <94> DW_AT_type : <0x98> + <1><98>: Abbrev Number: 6 (DW_TAG_const_type) + <99> DW_AT_type : <0x80> + <1><9d>: Abbrev Number: 7 (DW_TAG_structure_type) + <9e> DW_AT_name : (indirect string, offset: 0xe3): sysent + DW_AT_byte_size : 20 + DW_AT_decl_file : 3 + DW_AT_decl_line : 4 + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x106): nargs + DW_AT_decl_file : 3 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0xa2): sys_flags + DW_AT_decl_file : 3 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 3 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1cc): sys_func + DW_AT_decl_file : 3 + DW_AT_decl_line : 8 + DW_AT_type : <0xfb> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x91): sys_name + DW_AT_decl_file : 3 + DW_AT_decl_line : 9 + DW_AT_type : <0x92> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xfb> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xf0> + <1><101>: Abbrev Number: 4 (DW_TAG_typedef) + <102> DW_AT_name : (indirect string, offset: 0x133): struct_sysent + <106> DW_AT_decl_file : 3 + <107> DW_AT_decl_line : 10 + <108> DW_AT_type : <0x9d> + <1><10c>: Abbrev Number: 5 (DW_TAG_pointer_type) + <10d> DW_AT_byte_size : 4 + <10e> DW_AT_type : <0x112> + <1><112>: Abbrev Number: 6 (DW_TAG_const_type) + <113> DW_AT_type : <0x101> + <1><117>: Abbrev Number: 2 (DW_TAG_base_type) + <118> DW_AT_byte_size : 1 + <119> DW_AT_encoding : 2 (boolean) + <11a> DW_AT_name : (indirect string, offset: 0x1d): _Bool + <1><11e>: Abbrev Number: 12 (DW_TAG_structure_type) + <11f> DW_AT_name : tms + <123> DW_AT_byte_size : 32 + <124> DW_AT_decl_file : 4 + <125> DW_AT_decl_line : 34 + <126> DW_AT_sibling : <0x163> + <2><12a>: Abbrev Number: 8 (DW_TAG_member) + <12b> DW_AT_name : (indirect string, offset: 0x13): tms_utime + <12f> DW_AT_decl_file : 4 + <130> DW_AT_decl_line : 36 + <131> DW_AT_type : <0x87> + <135> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><138>: Abbrev Number: 8 (DW_TAG_member) + <139> DW_AT_name : (indirect string, offset: 0x87): tms_stime + <13d> DW_AT_decl_file : 4 + <13e> DW_AT_decl_line : 37 + <13f> DW_AT_type : <0x87> + <143> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><146>: Abbrev Number: 8 (DW_TAG_member) + <147> DW_AT_name : (indirect string, offset: 0xea): tms_cutime + <14b> DW_AT_decl_file : 4 + <14c> DW_AT_decl_line : 39 + <14d> DW_AT_type : <0x87> + <151> DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2><154>: Abbrev Number: 8 (DW_TAG_member) + <155> DW_AT_name : (indirect string, offset: 0x1b5): tms_cstime + <159> DW_AT_decl_file : 4 + <15a> DW_AT_decl_line : 40 + <15b> DW_AT_type : <0x87> + <15f> DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) + <2><162>: Abbrev Number: 0 + <1><163>: Abbrev Number: 4 (DW_TAG_typedef) + <164> DW_AT_name : (indirect string, offset: 0x23): tms_t + <168> DW_AT_decl_file : 5 + <169> DW_AT_decl_line : 36 + <16a> DW_AT_type : <0x11e> + <1><16e>: Abbrev Number: 13 (DW_TAG_variable) + <16f> DW_AT_name : (indirect string, offset: 0xf5): current_wordsize + <173> DW_AT_decl_file : 6 + <174> DW_AT_decl_line : 757 + <176> DW_AT_type : <0x47> + <17a> DW_AT_external : 1 + <17b> DW_AT_declaration : 1 + <1><17c>: Abbrev Number: 13 (DW_TAG_variable) + <17d> DW_AT_name : (indirect string, offset: 0xe3): sysent + <181> DW_AT_decl_file : 6 + <182> DW_AT_decl_line : 892 + <184> DW_AT_type : <0x10c> + <188> DW_AT_external : 1 + <189> DW_AT_declaration : 1 + <1><18a>: Abbrev Number: 13 (DW_TAG_variable) + <18b> DW_AT_name : (indirect string, offset: 0x177): nsyscalls + <18f> DW_AT_decl_file : 6 + <190> DW_AT_decl_line : 903 + <192> DW_AT_type : <0x47> + <196> DW_AT_external : 1 + <197> DW_AT_declaration : 1 + <1><198>: Abbrev Number: 14 (DW_TAG_variable) + <199> DW_AT_name : (indirect string, offset: 0x10c): mpers_target_var + <19d> DW_AT_decl_file : 5 + <19e> DW_AT_decl_line : 37 + <19f> DW_AT_type : <0x163> + <1a3> DW_AT_external : 1 + <1a4> DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) + <1><1aa>: Abbrev Number: 0 + diff --git a/mpers-mx32/tms_t.d2 b/mpers-mx32/tms_t.d2 new file mode 100644 index 000000000..61fc336d6 --- /dev/null +++ b/mpers-mx32/tms_t.d2 @@ -0,0 +1,228 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1c0): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a2): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x18a): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xc3): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x74): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x126): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xac): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1ac): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xd1): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11d): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x181): sizetype +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x198): __clock_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 135 +DW_AT_type : <0x63> +<1><80> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x141): char +<1><87> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x9a): clock_t +DW_AT_decl_file : 2 +DW_AT_decl_line : 59 +DW_AT_type : <0x75> +<1><92> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x98> +<1><98> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x80> +<1><9d> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xe3): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 3 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x106): nargs +DW_AT_decl_file : 3 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xa2): sys_flags +DW_AT_decl_file : 3 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 3 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1cc): sys_func +DW_AT_decl_file : 3 +DW_AT_decl_line : 8 +DW_AT_type : <0xfb> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x91): sys_name +DW_AT_decl_file : 3 +DW_AT_decl_line : 9 +DW_AT_type : <0x92> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xfb> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xf0> +<1><101> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x133): struct_sysent +DW_AT_decl_file : 3 +DW_AT_decl_line : 10 +DW_AT_type : <0x9d> +<1><10c> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x112> +<1><112> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x101> +<1><117> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0x1d): _Bool +<1><11e> +Abbrev Number: 12 (DW_TAG_structure_type) +DW_AT_name : tms +DW_AT_byte_size : 32 +DW_AT_decl_file : 4 +DW_AT_decl_line : 34 +DW_AT_sibling : <0x163> +<2><12a> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x13): tms_utime +DW_AT_decl_file : 4 +DW_AT_decl_line : 36 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><138> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x87): tms_stime +DW_AT_decl_file : 4 +DW_AT_decl_line : 37 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2><146> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xea): tms_cutime +DW_AT_decl_file : 4 +DW_AT_decl_line : 39 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<2><154> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b5): tms_cstime +DW_AT_decl_file : 4 +DW_AT_decl_line : 40 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 18 (DW_OP_plus_uconst: 24) +<1><163> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x23): tms_t +DW_AT_decl_file : 5 +DW_AT_decl_line : 36 +DW_AT_type : <0x11e> +<1><16e> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xf5): current_wordsize +DW_AT_decl_file : 6 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><17c> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xe3): sysent +DW_AT_decl_file : 6 +DW_AT_decl_line : 892 +DW_AT_type : <0x10c> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><18a> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x177): nsyscalls +DW_AT_decl_file : 6 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><198> +Abbrev Number: 14 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x10c): mpers_target_var +DW_AT_decl_file : 5 +DW_AT_decl_line : 37 +DW_AT_type : <0x163> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 20 0 0 0 (DW_OP_addr: 20) diff --git a/mpers-mx32/tms_t.h b/mpers-mx32/tms_t.h new file mode 100644 index 000000000..c1a9ff72b --- /dev/null +++ b/mpers-mx32/tms_t.h @@ -0,0 +1,10 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t tms_utime; +int64_t tms_stime; +int64_t tms_cutime; +int64_t tms_cstime; +} ATTRIBUTE_PACKED mx32_tms_t; +#define MPERS_mx32_tms_t mx32_tms_t diff --git a/mpers-mx32/utimbuf_t.c b/mpers-mx32/utimbuf_t.c new file mode 100644 index 000000000..bb8a34a5f --- /dev/null +++ b/mpers-mx32/utimbuf_t.c @@ -0,0 +1,8 @@ +#include "defs.h" + + +#include + +typedef struct utimbuf utimbuf_t; + +utimbuf_t mpers_target_var; diff --git a/mpers-mx32/utimbuf_t.d1 b/mpers-mx32/utimbuf_t.d1 new file mode 100644 index 000000000..47e297b74 --- /dev/null +++ b/mpers-mx32/utimbuf_t.d1 @@ -0,0 +1,189 @@ +Contents of the .debug_info section: + + Compilation Unit @ offset 0x0: + Length: 0x180 (32-bit) + Version: 2 + Abbrev Offset: 0x0 + Pointer Size: 4 + <0>: Abbrev Number: 1 (DW_TAG_compile_unit) + DW_AT_producer : (indirect string, offset: 0x10): GNU C 4.8.4 -mx32 -mtune=generic -march=x86-64 -gdwarf-2 -fstack-protector + <10> DW_AT_language : 1 (ANSI C) + <11> DW_AT_name : (indirect string, offset: 0x18c): mpers-mx32/utimbuf_t.c + <15> DW_AT_comp_dir : (indirect string, offset: 0x130): /usr/local/google/home/enh/Downloads/strace-4.16 + <19> DW_AT_stmt_list : 0x0 + <1><1d>: Abbrev Number: 2 (DW_TAG_base_type) + <1e> DW_AT_byte_size : 1 + <1f> DW_AT_encoding : 6 (signed char) + <20> DW_AT_name : (indirect string, offset: 0x1ac): signed char + <1><24>: Abbrev Number: 2 (DW_TAG_base_type) + <25> DW_AT_byte_size : 2 + <26> DW_AT_encoding : 5 (signed) + <27> DW_AT_name : (indirect string, offset: 0x182): short int + <1><2b>: Abbrev Number: 3 (DW_TAG_base_type) + <2c> DW_AT_byte_size : 4 + <2d> DW_AT_encoding : 5 (signed) + <2e> DW_AT_name : int + <1><32>: Abbrev Number: 2 (DW_TAG_base_type) + <33> DW_AT_byte_size : 8 + <34> DW_AT_encoding : 5 (signed) + <35> DW_AT_name : (indirect string, offset: 0x174): long long int + <1><39>: Abbrev Number: 2 (DW_TAG_base_type) + <3a> DW_AT_byte_size : 1 + <3b> DW_AT_encoding : 8 (unsigned char) + <3c> DW_AT_name : (indirect string, offset: 0xa0): unsigned char + <1><40>: Abbrev Number: 2 (DW_TAG_base_type) + <41> DW_AT_byte_size : 2 + <42> DW_AT_encoding : 7 (unsigned) + <43> DW_AT_name : (indirect string, offset: 0x5b): short unsigned int + <1><47>: Abbrev Number: 2 (DW_TAG_base_type) + <48> DW_AT_byte_size : 4 + <49> DW_AT_encoding : 7 (unsigned) + <4a> DW_AT_name : (indirect string, offset: 0x110): unsigned int + <1><4e>: Abbrev Number: 2 (DW_TAG_base_type) + <4f> DW_AT_byte_size : 8 + <50> DW_AT_encoding : 7 (unsigned) + <51> DW_AT_name : (indirect string, offset: 0x89): long long unsigned int + <1><55>: Abbrev Number: 2 (DW_TAG_base_type) + <56> DW_AT_byte_size : 4 + <57> DW_AT_encoding : 5 (signed) + <58> DW_AT_name : (indirect string, offset: 0x1a3): long int + <1><5c>: Abbrev Number: 2 (DW_TAG_base_type) + <5d> DW_AT_byte_size : 4 + <5e> DW_AT_encoding : 7 (unsigned) + <5f> DW_AT_name : (indirect string, offset: 0xb5): long unsigned int + <1><63>: Abbrev Number: 4 (DW_TAG_typedef) + <64> DW_AT_name : (indirect string, offset: 0xff): __quad_t + <68> DW_AT_decl_file : 1 + <69> DW_AT_decl_line : 55 + <6a> DW_AT_type : <0x32> + <1><6e>: Abbrev Number: 2 (DW_TAG_base_type) + <6f> DW_AT_byte_size : 4 + <70> DW_AT_encoding : 7 (unsigned) + <71> DW_AT_name : (indirect string, offset: 0x16b): sizetype + <1><75>: Abbrev Number: 4 (DW_TAG_typedef) + <76> DW_AT_name : (indirect string, offset: 0xdf): __time_t + <7a> DW_AT_decl_file : 1 + <7b> DW_AT_decl_line : 139 + <7c> DW_AT_type : <0x63> + <1><80>: Abbrev Number: 2 (DW_TAG_base_type) + <81> DW_AT_byte_size : 1 + <82> DW_AT_encoding : 6 (signed char) + <83> DW_AT_name : (indirect string, offset: 0x12b): char + <1><87>: Abbrev Number: 5 (DW_TAG_pointer_type) + <88> DW_AT_byte_size : 4 + <89> DW_AT_type : <0x8d> + <1><8d>: Abbrev Number: 6 (DW_TAG_const_type) + <8e> DW_AT_type : <0x80> + <1><92>: Abbrev Number: 7 (DW_TAG_structure_type) + <93> DW_AT_name : (indirect string, offset: 0xc7): sysent + <97> DW_AT_byte_size : 20 + <98> DW_AT_decl_file : 2 + <99> DW_AT_decl_line : 4 + <9a> DW_AT_sibling : <0xe5> + <2><9e>: Abbrev Number: 8 (DW_TAG_member) + <9f> DW_AT_name : (indirect string, offset: 0xe8): nargs + DW_AT_decl_file : 2 + DW_AT_decl_line : 5 + DW_AT_type : <0x47> + DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x7f): sys_flags + DW_AT_decl_file : 2 + DW_AT_decl_line : 6 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) + <2>: Abbrev Number: 9 (DW_TAG_member) + DW_AT_name : sen + DW_AT_decl_file : 2 + DW_AT_decl_line : 7 + DW_AT_type : <0x2b> + DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x1b8): sys_func + DW_AT_decl_file : 2 + DW_AT_decl_line : 8 + DW_AT_type : <0xf0> + DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) + <2>: Abbrev Number: 8 (DW_TAG_member) + DW_AT_name : (indirect string, offset: 0x6e): sys_name + DW_AT_decl_file : 2 + DW_AT_decl_line : 9 +
DW_AT_type : <0x87> + DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 10 (DW_TAG_subroutine_type) + DW_AT_type : <0x2b> + DW_AT_sibling : <0xf0> + <2>: Abbrev Number: 11 (DW_TAG_unspecified_parameters) + <2>: Abbrev Number: 0 + <1>: Abbrev Number: 5 (DW_TAG_pointer_type) + DW_AT_byte_size : 4 + DW_AT_type : <0xe5> + <1>: Abbrev Number: 4 (DW_TAG_typedef) + DW_AT_name : (indirect string, offset: 0x11d): struct_sysent + DW_AT_decl_file : 2 + DW_AT_decl_line : 10 + DW_AT_type : <0x92> + <1><101>: Abbrev Number: 5 (DW_TAG_pointer_type) + <102> DW_AT_byte_size : 4 + <103> DW_AT_type : <0x107> + <1><107>: Abbrev Number: 6 (DW_TAG_const_type) + <108> DW_AT_type : <0xf6> + <1><10c>: Abbrev Number: 2 (DW_TAG_base_type) + <10d> DW_AT_byte_size : 1 + <10e> DW_AT_encoding : 2 (boolean) + <10f> DW_AT_name : (indirect string, offset: 0xa): _Bool + <1><113>: Abbrev Number: 7 (DW_TAG_structure_type) + <114> DW_AT_name : (indirect string, offset: 0x77): utimbuf + <118> DW_AT_byte_size : 16 + <119> DW_AT_decl_file : 3 + <11a> DW_AT_decl_line : 37 + <11b> DW_AT_sibling : <0x13c> + <2><11f>: Abbrev Number: 8 (DW_TAG_member) + <120> DW_AT_name : (indirect string, offset: 0xae): actime + <124> DW_AT_decl_file : 3 + <125> DW_AT_decl_line : 39 + <126> DW_AT_type : <0x75> + <12a> DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) + <2><12d>: Abbrev Number: 8 (DW_TAG_member) + <12e> DW_AT_name : (indirect string, offset: 0x108): modtime + <132> DW_AT_decl_file : 3 + <133> DW_AT_decl_line : 40 + <134> DW_AT_type : <0x75> + <138> DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) + <2><13b>: Abbrev Number: 0 + <1><13c>: Abbrev Number: 4 (DW_TAG_typedef) + <13d> DW_AT_name : (indirect string, offset: 0x0): utimbuf_t + <141> DW_AT_decl_file : 4 + <142> DW_AT_decl_line : 6 + <143> DW_AT_type : <0x113> + <1><147>: Abbrev Number: 12 (DW_TAG_variable) + <148> DW_AT_name : (indirect string, offset: 0xce): current_wordsize + <14c> DW_AT_decl_file : 5 + <14d> DW_AT_decl_line : 757 + <14f> DW_AT_type : <0x47> + <153> DW_AT_external : 1 + <154> DW_AT_declaration : 1 + <1><155>: Abbrev Number: 12 (DW_TAG_variable) + <156> DW_AT_name : (indirect string, offset: 0xc7): sysent + <15a> DW_AT_decl_file : 5 + <15b> DW_AT_decl_line : 892 + <15d> DW_AT_type : <0x101> + <161> DW_AT_external : 1 + <162> DW_AT_declaration : 1 + <1><163>: Abbrev Number: 12 (DW_TAG_variable) + <164> DW_AT_name : (indirect string, offset: 0x161): nsyscalls + <168> DW_AT_decl_file : 5 + <169> DW_AT_decl_line : 903 + <16b> DW_AT_type : <0x47> + <16f> DW_AT_external : 1 + <170> DW_AT_declaration : 1 + <1><171>: Abbrev Number: 13 (DW_TAG_variable) + <172> DW_AT_name : (indirect string, offset: 0xee): mpers_target_var + <176> DW_AT_decl_file : 4 + <177> DW_AT_decl_line : 8 + <178> DW_AT_type : <0x13c> + <17c> DW_AT_external : 1 + <17d> DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) + <1><183>: Abbrev Number: 0 + diff --git a/mpers-mx32/utimbuf_t.d2 b/mpers-mx32/utimbuf_t.d2 new file mode 100644 index 000000000..4158a10d9 --- /dev/null +++ b/mpers-mx32/utimbuf_t.d2 @@ -0,0 +1,208 @@ +<1><1d> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x1ac): signed char +<1><24> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x182): short int +<1><2b> +Abbrev Number: 3 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : int +<1><32> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x174): long long int +<1><39> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 8 (unsigned char) +DW_AT_name : (indirect string, offset: 0xa0): unsigned char +<1><40> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 2 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x5b): short unsigned int +<1><47> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x110): unsigned int +<1><4e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 8 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x89): long long unsigned int +<1><55> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 5 (signed) +DW_AT_name : (indirect string, offset: 0x1a3): long int +<1><5c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0xb5): long unsigned int +<1><63> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xff): __quad_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 55 +DW_AT_type : <0x32> +<1><6e> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 4 +DW_AT_encoding : 7 (unsigned) +DW_AT_name : (indirect string, offset: 0x16b): sizetype +<1><75> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0xdf): __time_t +DW_AT_decl_file : 1 +DW_AT_decl_line : 139 +DW_AT_type : <0x63> +<1><80> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 6 (signed char) +DW_AT_name : (indirect string, offset: 0x12b): char +<1><87> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x8d> +<1><8d> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0x80> +<1><92> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0xc7): sysent +DW_AT_byte_size : 20 +DW_AT_decl_file : 2 +DW_AT_decl_line : 4 +DW_AT_sibling : <0xe5> +<2><9e> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xe8): nargs +DW_AT_decl_file : 2 +DW_AT_decl_line : 5 +DW_AT_type : <0x47> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x7f): sys_flags +DW_AT_decl_file : 2 +DW_AT_decl_line : 6 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 4 (DW_OP_plus_uconst: 4) +<2> +Abbrev Number: 9 (DW_TAG_member) +DW_AT_name : sen +DW_AT_decl_file : 2 +DW_AT_decl_line : 7 +DW_AT_type : <0x2b> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x1b8): sys_func +DW_AT_decl_file : 2 +DW_AT_decl_line : 8 +DW_AT_type : <0xf0> +DW_AT_data_member_location: 2 byte block: 23 c (DW_OP_plus_uconst: 12) +<2> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x6e): sys_name +DW_AT_decl_file : 2 +DW_AT_decl_line : 9 +DW_AT_type : <0x87> +DW_AT_data_member_location: 2 byte block: 23 10 (DW_OP_plus_uconst: 16) +<1> +Abbrev Number: 10 (DW_TAG_subroutine_type) +DW_AT_type : <0x2b> +DW_AT_sibling : <0xf0> +<2> +Abbrev Number: 11 (DW_TAG_unspecified_parameters) +<1> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0xe5> +<1> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x11d): struct_sysent +DW_AT_decl_file : 2 +DW_AT_decl_line : 10 +DW_AT_type : <0x92> +<1><101> +Abbrev Number: 5 (DW_TAG_pointer_type) +DW_AT_byte_size : 4 +DW_AT_type : <0x107> +<1><107> +Abbrev Number: 6 (DW_TAG_const_type) +DW_AT_type : <0xf6> +<1><10c> +Abbrev Number: 2 (DW_TAG_base_type) +DW_AT_byte_size : 1 +DW_AT_encoding : 2 (boolean) +DW_AT_name : (indirect string, offset: 0xa): _Bool +<1><113> +Abbrev Number: 7 (DW_TAG_structure_type) +DW_AT_name : (indirect string, offset: 0x77): utimbuf +DW_AT_byte_size : 16 +DW_AT_decl_file : 3 +DW_AT_decl_line : 37 +DW_AT_sibling : <0x13c> +<2><11f> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0xae): actime +DW_AT_decl_file : 3 +DW_AT_decl_line : 39 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 0 (DW_OP_plus_uconst: 0) +<2><12d> +Abbrev Number: 8 (DW_TAG_member) +DW_AT_name : (indirect string, offset: 0x108): modtime +DW_AT_decl_file : 3 +DW_AT_decl_line : 40 +DW_AT_type : <0x75> +DW_AT_data_member_location: 2 byte block: 23 8 (DW_OP_plus_uconst: 8) +<1><13c> +Abbrev Number: 4 (DW_TAG_typedef) +DW_AT_name : (indirect string, offset: 0x0): utimbuf_t +DW_AT_decl_file : 4 +DW_AT_decl_line : 6 +DW_AT_type : <0x113> +<1><147> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xce): current_wordsize +DW_AT_decl_file : 5 +DW_AT_decl_line : 757 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><155> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xc7): sysent +DW_AT_decl_file : 5 +DW_AT_decl_line : 892 +DW_AT_type : <0x101> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><163> +Abbrev Number: 12 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0x161): nsyscalls +DW_AT_decl_file : 5 +DW_AT_decl_line : 903 +DW_AT_type : <0x47> +DW_AT_external : 1 +DW_AT_declaration : 1 +<1><171> +Abbrev Number: 13 (DW_TAG_variable) +DW_AT_name : (indirect string, offset: 0xee): mpers_target_var +DW_AT_decl_file : 4 +DW_AT_decl_line : 8 +DW_AT_type : <0x13c> +DW_AT_external : 1 +DW_AT_location : 5 byte block: 3 10 0 0 0 (DW_OP_addr: 10) diff --git a/mpers-mx32/utimbuf_t.h b/mpers-mx32/utimbuf_t.h new file mode 100644 index 000000000..6c48cc816 --- /dev/null +++ b/mpers-mx32/utimbuf_t.h @@ -0,0 +1,8 @@ +#include +typedef uint32_t mpers_ptr_t; +typedef +struct { +int64_t actime; +int64_t modtime; +} ATTRIBUTE_PACKED mx32_utimbuf_t; +#define MPERS_mx32_utimbuf_t mx32_utimbuf_t diff --git a/mpers.am b/mpers.am new file mode 100644 index 000000000..1e3c7506f --- /dev/null +++ b/mpers.am @@ -0,0 +1,2 @@ +# Generated by ./generate_mpers_am.sh; do not edit. +mpers_source_files = 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/mpers_xlat.h b/mpers_xlat.h index 266faec49..52f49641d 100644 --- a/mpers_xlat.h +++ b/mpers_xlat.h @@ -37,12 +37,16 @@ extern const struct xlat evdev_switch[]; extern const struct xlat evdev_sync[]; extern const struct xlat msgctl_flags[]; extern const struct xlat shmctl_flags[]; +extern const struct xlat loop_cmds[]; +extern const struct xlat loop_flags_options[]; +extern const struct xlat loop_crypt_type_options[]; extern const struct xlat mtd_mode_options[]; extern const struct xlat mtd_file_mode_options[]; extern const struct xlat mtd_type_options[]; extern const struct xlat mtd_flags_options[]; extern const struct xlat mtd_otp_options[]; extern const struct xlat mtd_nandecc_options[]; +extern const struct xlat mq_attr_flags[]; extern const struct xlat sigev_value[]; extern const struct xlat adjtimex_modes[]; extern const struct xlat adjtimex_status[]; @@ -58,7 +62,11 @@ extern const struct xlat sigsegv_codes[]; extern const struct xlat sigsys_codes[]; extern const struct xlat sigtrap_codes[]; extern const struct xlat sigemt_codes[]; +extern const struct xlat sg_io_info[]; +extern const struct xlat sg_io_dxfer_direction[]; +extern const struct xlat sg_io_flags[]; extern const struct xlat sigaltstack_flags[]; +extern const struct xlat iffflags[]; extern const struct xlat v4l2_device_capabilities_flags[]; extern const struct xlat v4l2_buf_types[]; extern const struct xlat v4l2_format_description_flags[]; diff --git a/mq.c b/mq.c index 1df2aa1f9..5b46d4782 100644 --- a/mq.c +++ b/mq.c @@ -40,27 +40,33 @@ SYS_FUNC(mq_open) tprints(", "); print_numeric_umode_t(tcp->u_arg[2]); tprints(", "); - printmqattr(tcp, tcp->u_arg[3]); + printmqattr(tcp, tcp->u_arg[3], false); } return RVAL_DECODED; } SYS_FUNC(mq_timedsend) { - tprintf("%ld, ", tcp->u_arg[0]); - printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); - tprintf(", %lu, %ld, ", tcp->u_arg[2], tcp->u_arg[3]); + tprintf("%d, ", (int) tcp->u_arg[0]); + printstrn(tcp, tcp->u_arg[1], tcp->u_arg[2]); + tprintf(", %" PRI_klu ", %u, ", tcp->u_arg[2], + (unsigned int) tcp->u_arg[3]); print_timespec(tcp, tcp->u_arg[4]); return RVAL_DECODED; } SYS_FUNC(mq_timedreceive) { - if (entering(tcp)) - tprintf("%ld, ", tcp->u_arg[0]); - else { - printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); - tprintf(", %lu, %ld, ", tcp->u_arg[2], tcp->u_arg[3]); + if (entering(tcp)) { + tprintf("%d, ", (int) tcp->u_arg[0]); + } else { + if (syserror(tcp)) + printaddr(tcp->u_arg[1]); + else + printstrn(tcp, tcp->u_arg[1], tcp->u_rval); + tprintf(", %" PRI_klu ", ", tcp->u_arg[2]); + printnum_int(tcp, tcp->u_arg[3], "%u"); + tprintf(", "); /* * Since the timeout parameter is read by the kernel * on entering syscall, it has to be decoded the same way @@ -75,7 +81,7 @@ SYS_FUNC(mq_timedreceive) SYS_FUNC(mq_notify) { - tprintf("%ld, ", tcp->u_arg[0]); + tprintf("%d, ", (int) tcp->u_arg[0]); print_sigevent(tcp, tcp->u_arg[1]); return RVAL_DECODED; } @@ -83,10 +89,11 @@ SYS_FUNC(mq_notify) SYS_FUNC(mq_getsetattr) { if (entering(tcp)) { - tprintf("%ld, ", tcp->u_arg[0]); - printmqattr(tcp, tcp->u_arg[1]); + tprintf("%d, ", (int) tcp->u_arg[0]); + printmqattr(tcp, tcp->u_arg[1], true); tprints(", "); - } else - printmqattr(tcp, tcp->u_arg[2]); + } else { + printmqattr(tcp, tcp->u_arg[2], true); + } return 0; } diff --git a/msghdr.c b/msghdr.c index 63f517145..56ba54983 100644 --- a/msghdr.c +++ b/msghdr.c @@ -39,7 +39,7 @@ #include "xlat/scmvals.h" #include "xlat/ip_cmsg_types.h" -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 +#ifndef current_wordsize struct cmsghdr32 { uint32_t cmsg_len; int cmsg_level; @@ -50,17 +50,18 @@ struct cmsghdr32 { typedef union { char *ptr; struct cmsghdr *cmsg; -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 +#ifndef current_wordsize struct cmsghdr32 *cmsg32; #endif } union_cmsghdr; static void -print_scm_rights(struct tcb *tcp, const void *cmsg_data, const size_t data_len) +print_scm_rights(struct tcb *tcp, const void *cmsg_data, + const unsigned int data_len) { const int *fds = cmsg_data; - const size_t nfds = data_len / sizeof(*fds); - size_t i; + const unsigned int nfds = data_len / sizeof(*fds); + unsigned int i; tprints("["); @@ -78,7 +79,8 @@ print_scm_rights(struct tcb *tcp, const void *cmsg_data, const size_t data_len) } static void -print_scm_creds(struct tcb *tcp, const void *cmsg_data, const size_t data_len) +print_scm_creds(struct tcb *tcp, const void *cmsg_data, + const unsigned int data_len) { const struct ucred *uc = cmsg_data; @@ -88,14 +90,14 @@ print_scm_creds(struct tcb *tcp, const void *cmsg_data, const size_t data_len) static void print_scm_security(struct tcb *tcp, const void *cmsg_data, - const size_t data_len) + const unsigned int data_len) { print_quoted_string(cmsg_data, data_len, 0); } static void print_cmsg_ip_pktinfo(struct tcb *tcp, const void *cmsg_data, - const size_t data_len) + const unsigned int data_len) { const struct in_pktinfo *info = cmsg_data; @@ -108,7 +110,8 @@ print_cmsg_ip_pktinfo(struct tcb *tcp, const void *cmsg_data, } static void -print_cmsg_uint(struct tcb *tcp, const void *cmsg_data, const size_t data_len) +print_cmsg_uint(struct tcb *tcp, const void *cmsg_data, + const unsigned int data_len) { const unsigned int *p = cmsg_data; @@ -117,7 +120,7 @@ print_cmsg_uint(struct tcb *tcp, const void *cmsg_data, const size_t data_len) static void print_cmsg_uint8_t(struct tcb *tcp, const void *cmsg_data, - const size_t data_len) + const unsigned int data_len) { const uint8_t *p = cmsg_data; @@ -126,10 +129,10 @@ print_cmsg_uint8_t(struct tcb *tcp, const void *cmsg_data, static void print_cmsg_ip_opts(struct tcb *tcp, const void *cmsg_data, - const size_t data_len) + const unsigned int data_len) { const unsigned char *opts = cmsg_data; - size_t i; + unsigned int i; tprints("["); for (i = 0; i < data_len; ++i) { @@ -157,7 +160,7 @@ struct sock_ee { static void print_cmsg_ip_recverr(struct tcb *tcp, const void *cmsg_data, - const size_t data_len) + const unsigned int data_len) { const struct sock_ee *const err = cmsg_data; @@ -171,20 +174,20 @@ print_cmsg_ip_recverr(struct tcb *tcp, const void *cmsg_data, static void print_cmsg_ip_origdstaddr(struct tcb *tcp, const void *cmsg_data, - const size_t data_len) + const unsigned int data_len) { - const int addr_len = + const unsigned int addr_len = data_len > sizeof(struct sockaddr_storage) ? sizeof(struct sockaddr_storage) : data_len; print_sockaddr(tcp, cmsg_data, addr_len); } -typedef void (* const cmsg_printer)(struct tcb *, const void *, size_t); +typedef void (* const cmsg_printer)(struct tcb *, const void *, unsigned int); static const struct { const cmsg_printer printer; - const size_t min_len; + const unsigned int min_len; } cmsg_socket_printers[] = { [SCM_RIGHTS] = { print_scm_rights, sizeof(int) }, [SCM_CREDENTIALS] = { print_scm_creds, sizeof(struct ucred) }, @@ -203,7 +206,7 @@ static const struct { static void print_cmsg_type_data(struct tcb *tcp, const int cmsg_level, const int cmsg_type, - const void *cmsg_data, const size_t data_len) + const void *cmsg_data, const unsigned int data_len) { const unsigned int utype = cmsg_type; switch (cmsg_level) { @@ -249,23 +252,22 @@ get_optmem_max(void) } static void -decode_msg_control(struct tcb *tcp, unsigned long addr, - const size_t in_control_len) +decode_msg_control(struct tcb *const tcp, const kernel_ulong_t addr, + const kernel_ulong_t in_control_len) { if (!in_control_len) return; tprints(", msg_control="); - const size_t cmsg_size = -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 + const unsigned int cmsg_size = +#ifndef current_wordsize (current_wordsize < sizeof(long)) ? sizeof(struct cmsghdr32) : #endif sizeof(struct cmsghdr); - size_t control_len = - in_control_len > get_optmem_max() - ? get_optmem_max() : in_control_len; - size_t buf_len = control_len; + unsigned int control_len = in_control_len > get_optmem_max() + ? get_optmem_max() : in_control_len; + unsigned int buf_len = control_len; char *buf = buf_len < cmsg_size ? NULL : malloc(buf_len); if (!buf || umoven(tcp, addr, buf_len, buf) < 0) { printaddr(addr); @@ -277,29 +279,29 @@ decode_msg_control(struct tcb *tcp, unsigned long addr, tprints("["); while (buf_len >= cmsg_size) { - const size_t cmsg_len = -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 + const kernel_ulong_t cmsg_len = +#ifndef current_wordsize (current_wordsize < sizeof(long)) ? u.cmsg32->cmsg_len : #endif u.cmsg->cmsg_len; const int cmsg_level = -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 +#ifndef current_wordsize (current_wordsize < sizeof(long)) ? u.cmsg32->cmsg_level : #endif u.cmsg->cmsg_level; const int cmsg_type = -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 +#ifndef current_wordsize (current_wordsize < sizeof(long)) ? u.cmsg32->cmsg_type : #endif u.cmsg->cmsg_type; if (u.ptr != buf) tprints(", "); - tprintf("{cmsg_len=%lu, cmsg_level=", (unsigned long) cmsg_len); + tprintf("{cmsg_len=%" PRI_klu ", cmsg_level=", cmsg_len); printxval(socketlayers, cmsg_level, "SOL_???"); tprints(", cmsg_type="); - size_t len = cmsg_len > buf_len ? buf_len : cmsg_len; + kernel_ulong_t len = cmsg_len > buf_len ? buf_len : cmsg_len; print_cmsg_type_data(tcp, cmsg_level, cmsg_type, (const void *) (u.ptr + cmsg_size), @@ -311,7 +313,7 @@ decode_msg_control(struct tcb *tcp, unsigned long addr, break; } len = (cmsg_len + current_wordsize - 1) & - (size_t) ~(current_wordsize - 1); + ~((kernel_ulong_t) current_wordsize - 1); if (len >= buf_len) { buf_len = 0; break; @@ -332,7 +334,7 @@ decode_msg_control(struct tcb *tcp, unsigned long addr, void print_struct_msghdr(struct tcb *tcp, const struct msghdr *msg, const int *const p_user_msg_namelen, - const unsigned long data_size) + const kernel_ulong_t data_size) { const int msg_namelen = p_user_msg_namelen && (int) msg->msg_namelen > *p_user_msg_namelen @@ -340,7 +342,7 @@ print_struct_msghdr(struct tcb *tcp, const struct msghdr *msg, tprints("{msg_name="); const int family = - decode_sockaddr(tcp, (long) msg->msg_name, msg_namelen); + decode_sockaddr(tcp, ptr_to_kulong(msg->msg_name), msg_namelen); const enum iov_decode decode = (family == AF_NETLINK) ? IOV_DECODE_NETLINK : IOV_DECODE_STR; @@ -351,13 +353,13 @@ print_struct_msghdr(struct tcb *tcp, const struct msghdr *msg, tprints(", msg_iov="); - tprint_iov_upto(tcp, (unsigned long) msg->msg_iovlen, - (unsigned long) msg->msg_iov, decode, data_size); - tprintf(", msg_iovlen=%lu", (unsigned long) msg->msg_iovlen); + tprint_iov_upto(tcp, msg->msg_iovlen, + ptr_to_kulong(msg->msg_iov), decode, data_size); + tprintf(", msg_iovlen=%" PRI_klu, (kernel_ulong_t) msg->msg_iovlen); - decode_msg_control(tcp, (unsigned long) msg->msg_control, + decode_msg_control(tcp, ptr_to_kulong(msg->msg_control), msg->msg_controllen); - tprintf(", msg_controllen=%lu", (unsigned long) msg->msg_controllen); + tprintf(", msg_controllen=%" PRI_klu, (kernel_ulong_t) msg->msg_controllen); tprints(", msg_flags="); printflags(msg_flags, msg->msg_flags, "MSG_???"); @@ -365,7 +367,8 @@ print_struct_msghdr(struct tcb *tcp, const struct msghdr *msg, } static bool -fetch_msghdr_namelen(struct tcb *tcp, const long addr, int *const p_msg_namelen) +fetch_msghdr_namelen(struct tcb *const tcp, const kernel_ulong_t addr, + int *const p_msg_namelen) { struct msghdr msg; @@ -378,8 +381,8 @@ fetch_msghdr_namelen(struct tcb *tcp, const long addr, int *const p_msg_namelen) } static void -decode_msghdr(struct tcb *tcp, const int *const p_user_msg_namelen, - const long addr, const unsigned long data_size) +decode_msghdr(struct tcb *const tcp, const int *const p_user_msg_namelen, + const kernel_ulong_t addr, const kernel_ulong_t data_size) { struct msghdr msg; @@ -390,19 +393,22 @@ decode_msghdr(struct tcb *tcp, const int *const p_user_msg_namelen, } void -dumpiov_in_msghdr(struct tcb *tcp, long addr, unsigned long data_size) +dumpiov_in_msghdr(struct tcb *const tcp, const kernel_ulong_t addr, + const kernel_ulong_t data_size) { struct msghdr msg; - if (fetch_struct_msghdr(tcp, addr, &msg)) - dumpiov_upto(tcp, msg.msg_iovlen, (long)msg.msg_iov, data_size); + if (fetch_struct_msghdr(tcp, addr, &msg)) { + dumpiov_upto(tcp, msg.msg_iovlen, + ptr_to_kulong(msg.msg_iov), data_size); + } } SYS_FUNC(sendmsg) { printfd(tcp, tcp->u_arg[0]); tprints(", "); - decode_msghdr(tcp, 0, tcp->u_arg[1], (unsigned long) -1L); + decode_msghdr(tcp, 0, tcp->u_arg[1], -1); /* flags */ tprints(", "); printflags(msg_flags, tcp->u_arg[2], "MSG_???"); diff --git a/msghdr.h b/msghdr.h index 41dfd8cae..9e458fec0 100644 --- a/msghdr.h +++ b/msghdr.h @@ -12,6 +12,9 @@ struct mmsghdr { # endif struct tcb; -extern void print_struct_msghdr(struct tcb *, const struct msghdr *, const int *, unsigned long); + +extern void +print_struct_msghdr(struct tcb *, const struct msghdr *, + const int *p_user_msg_namelen, kernel_ulong_t data_size); #endif /* !STRACE_MSGHDR_H */ diff --git a/mtd.c b/mtd.c index 4442b1cc7..954a08b7d 100644 --- a/mtd.c +++ b/mtd.c @@ -50,7 +50,7 @@ typedef struct mtd_oob_buf struct_mtd_oob_buf; #include "xlat/mtd_nandecc_options.h" static void -decode_erase_info_user(struct tcb *tcp, const long addr) +decode_erase_info_user(struct tcb *const tcp, const kernel_ulong_t addr) { struct erase_info_user einfo; @@ -62,7 +62,7 @@ decode_erase_info_user(struct tcb *tcp, const long addr) } static void -decode_erase_info_user64(struct tcb *tcp, const long addr) +decode_erase_info_user64(struct tcb *const tcp, const kernel_ulong_t addr) { struct erase_info_user64 einfo64; @@ -75,7 +75,7 @@ decode_erase_info_user64(struct tcb *tcp, const long addr) } static void -decode_mtd_oob_buf(struct tcb *tcp, const long addr) +decode_mtd_oob_buf(struct tcb *const tcp, const kernel_ulong_t addr) { struct_mtd_oob_buf mbuf; @@ -84,12 +84,12 @@ decode_mtd_oob_buf(struct tcb *tcp, const long addr) return; tprintf("{start=%#x, length=%#x, ptr=", mbuf.start, mbuf.length); - printaddr((unsigned long) mbuf.ptr); + printaddr(ptr_to_kulong(mbuf.ptr)); tprints("}"); } static void -decode_mtd_oob_buf64(struct tcb *tcp, const long addr) +decode_mtd_oob_buf64(struct tcb *const tcp, const kernel_ulong_t addr) { struct mtd_oob_buf64 mbuf64; @@ -103,7 +103,7 @@ decode_mtd_oob_buf64(struct tcb *tcp, const long addr) } static void -decode_otp_info(struct tcb *tcp, const long addr) +decode_otp_info(struct tcb *const tcp, const kernel_ulong_t addr) { struct otp_info oinfo; @@ -116,7 +116,7 @@ decode_otp_info(struct tcb *tcp, const long addr) } static void -decode_otp_select(struct tcb *tcp, const long addr) +decode_otp_select(struct tcb *const tcp, const kernel_ulong_t addr) { unsigned int i; @@ -130,7 +130,7 @@ decode_otp_select(struct tcb *tcp, const long addr) } static void -decode_mtd_write_req(struct tcb *tcp, const long addr) +decode_mtd_write_req(struct tcb *const tcp, const kernel_ulong_t addr) { struct mtd_write_req mreq; @@ -149,7 +149,7 @@ decode_mtd_write_req(struct tcb *tcp, const long addr) } static void -decode_mtd_info_user(struct tcb *tcp, const long addr) +decode_mtd_info_user(struct tcb *const tcp, const kernel_ulong_t addr) { struct mtd_info_user minfo; @@ -168,7 +168,7 @@ decode_mtd_info_user(struct tcb *tcp, const long addr) } static void -decode_nand_oobinfo(struct tcb *tcp, const long addr) +decode_nand_oobinfo(struct tcb *const tcp, const kernel_ulong_t addr) { struct nand_oobinfo ninfo; unsigned int i, j; @@ -204,7 +204,7 @@ decode_nand_oobinfo(struct tcb *tcp, const long addr) } static void -decode_nand_ecclayout_user(struct tcb *tcp, const long addr) +decode_nand_ecclayout_user(struct tcb *const tcp, const kernel_ulong_t addr) { struct nand_ecclayout_user nlay; unsigned int i; @@ -230,7 +230,7 @@ decode_nand_ecclayout_user(struct tcb *tcp, const long addr) } static void -decode_mtd_ecc_stats(struct tcb *tcp, const long addr) +decode_mtd_ecc_stats(struct tcb *const tcp, const kernel_ulong_t addr) { struct mtd_ecc_stats es; @@ -242,8 +242,8 @@ decode_mtd_ecc_stats(struct tcb *tcp, const long addr) es.corrected, es.failed, es.badblocks, es.bbtblocks); } -MPERS_PRINTER_DECL(int, mtd_ioctl, struct tcb *tcp, - const unsigned int code, const long arg) +MPERS_PRINTER_DECL(int, mtd_ioctl, struct tcb *const tcp, + const unsigned int code, const kernel_ulong_t arg) { switch (code) { case MEMERASE: @@ -285,7 +285,7 @@ MPERS_PRINTER_DECL(int, mtd_ioctl, struct tcb *tcp, case MTDFILEMODE: tprints(", "); - printxval_long(mtd_file_mode_options, arg, "MTD_FILE_MODE_???"); + printxval64(mtd_file_mode_options, arg, "MTD_FILE_MODE_???"); break; case MEMGETBADBLOCK: diff --git a/mx32_funcs.h b/mx32_funcs.h index 9cea9adf8..d90715fcf 100644 --- a/mx32_funcs.h +++ b/mx32_funcs.h @@ -14,6 +14,8 @@ #define sys_sysinfo mx32_sys_sysinfo #undef sys_times #define sys_times mx32_sys_times +#undef sys_ustat +#define sys_ustat mx32_sys_ustat #undef sys_utime #define sys_utime mx32_sys_utime #include "sys_func.h" diff --git a/mx32_printer_decls.h b/mx32_printer_decls.h index 7463ec8a2..5f27eda1b 100644 --- a/mx32_printer_decls.h +++ b/mx32_printer_decls.h @@ -1,31 +1,38 @@ -/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sigaltstack.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ -extern int mx32_block_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern int mx32_btrfs_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern int mx32_evdev_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern _Bool mx32_fetch_seccomp_fprog(struct tcb *tcp, const long addr, void *p); -extern _Bool mx32_fetch_struct_flock(struct tcb *tcp, const long addr, void *p); -extern _Bool mx32_fetch_struct_flock64(struct tcb *tcp, const long addr, void *p); -extern int mx32_fetch_struct_mmsghdr(struct tcb *tcp, const unsigned long addr, void *p); +/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_stat.c.mpers.i fetch_struct_stat64.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i loop.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sg_req_info.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timespec.c.mpers.i print_timeval.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sg_io_v3.c.mpers.i sigaltstack.c.mpers.i sock.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i ustat.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ +extern int mx32_block_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern int mx32_btrfs_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern int mx32_evdev_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern _Bool mx32_fetch_seccomp_fprog(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); +extern _Bool mx32_fetch_struct_flock(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); +extern _Bool mx32_fetch_struct_flock64(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); +extern int mx32_fetch_struct_mmsghdr(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); extern unsigned int mx32_sizeof_struct_mmsghdr(void); -extern int mx32_fetch_struct_msghdr(struct tcb *tcp, const unsigned long addr, void *p); -extern _Bool mx32_fetch_struct_statfs(struct tcb *tcp, const long addr, struct strace_statfs *p); -extern _Bool mx32_fetch_struct_statfs64(struct tcb *tcp, const long addr, const unsigned long size, struct strace_statfs *p); -extern int mx32_hdio_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern int mx32_mtd_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern void mx32_printmqattr(struct tcb *tcp, const long addr); -extern void mx32_tprint_msgbuf(struct tcb *tcp, const long addr, const unsigned long count); -extern void mx32_print_sigevent(struct tcb *tcp, const long addr); -extern void mx32_print_timespec(struct tcb *tcp, const long addr); -extern const char * mx32_sprint_timespec(struct tcb *tcp, const long addr); -extern void mx32_print_timespec_utime_pair(struct tcb *tcp, const long addr); -extern void mx32_print_itimerspec(struct tcb *tcp, const long addr); -extern void mx32_print_timeval(struct tcb *tcp, const long addr); -extern void mx32_print_timeval_pair(struct tcb *tcp, const long addr); -extern const char * mx32_sprint_timeval(struct tcb *tcp, const long addr); -extern void mx32_print_itimerval(struct tcb *tcp, const long addr); -extern int mx32_print_timex(struct tcb *tcp, const long addr); -extern void mx32_printrusage(struct tcb *tcp, long addr); -extern void mx32_printsiginfo_at(struct tcb *tcp, long addr); -extern void mx32_print_siginfo_array(struct tcb *tcp, unsigned long addr, unsigned long len); -extern int mx32_rtc_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern int mx32_v4l2_ioctl(struct tcb *tcp, const unsigned int code, const long arg); +extern int mx32_fetch_struct_msghdr(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); +extern _Bool mx32_fetch_struct_stat(struct tcb *const tcp, const kernel_ulong_t addr, struct strace_stat *const dst); +extern _Bool mx32_fetch_struct_stat64(struct tcb *const tcp, const kernel_ulong_t addr, struct strace_stat *const dst); +extern _Bool mx32_fetch_struct_statfs(struct tcb *const tcp, const kernel_ulong_t addr, struct strace_statfs *const p); +extern _Bool mx32_fetch_struct_statfs64(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t size, struct strace_statfs *const p); +extern int mx32_hdio_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern int mx32_loop_ioctl(struct tcb *tcp, const unsigned int code, const kernel_ulong_t arg); +extern int mx32_mtd_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern void mx32_printmqattr(struct tcb *const tcp, const kernel_ulong_t addr, const _Bool decode_flags); +extern void mx32_tprint_msgbuf(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t count); +extern int mx32_decode_sg_req_info(struct tcb *const tcp, const kernel_ulong_t arg); +extern void mx32_print_sigevent(struct tcb *const tcp, const kernel_ulong_t addr); +extern void mx32_print_timespec(struct tcb *const tcp, const kernel_ulong_t addr); +extern const char * mx32_sprint_timespec(struct tcb *const tcp, const kernel_ulong_t addr); +extern void mx32_print_timespec_utime_pair(struct tcb *const tcp, const kernel_ulong_t addr); +extern void mx32_print_itimerspec(struct tcb *const tcp, const kernel_ulong_t addr); +extern void mx32_print_struct_timeval(const void *arg); +extern void mx32_print_timeval(struct tcb *const tcp, const kernel_ulong_t addr); +extern void mx32_print_timeval_pair(struct tcb *const tcp, const kernel_ulong_t addr); +extern const char * mx32_sprint_timeval(struct tcb *const tcp, const kernel_ulong_t addr); +extern void mx32_print_itimerval(struct tcb *const tcp, const kernel_ulong_t addr); +extern int mx32_print_timex(struct tcb *const tcp, const kernel_ulong_t addr); +extern void mx32_printrusage(struct tcb *const tcp, const kernel_ulong_t addr); +extern void mx32_printsiginfo_at(struct tcb *const tcp, const kernel_ulong_t addr); +extern void mx32_print_siginfo_array(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t len); +extern int mx32_rtc_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern int mx32_decode_sg_io_v3(struct tcb *const tcp, const kernel_ulong_t arg); +extern int mx32_sock_ioctl(struct tcb *tcp, const unsigned int code, const kernel_ulong_t arg); +extern int mx32_v4l2_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); diff --git a/mx32_printer_defs.h b/mx32_printer_defs.h index eb34dd661..306d80221 100644 --- a/mx32_printer_defs.h +++ b/mx32_printer_defs.h @@ -1,4 +1,4 @@ -/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sigaltstack.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ +/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_stat.c.mpers.i fetch_struct_stat64.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i loop.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sg_req_info.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timespec.c.mpers.i print_timeval.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sg_io_v3.c.mpers.i sigaltstack.c.mpers.i sock.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i ustat.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ .block_ioctl = mx32_block_ioctl, .btrfs_ioctl = mx32_btrfs_ioctl, .evdev_ioctl = mx32_evdev_ioctl, @@ -8,17 +8,22 @@ .fetch_struct_mmsghdr = mx32_fetch_struct_mmsghdr, .sizeof_struct_mmsghdr = mx32_sizeof_struct_mmsghdr, .fetch_struct_msghdr = mx32_fetch_struct_msghdr, +.fetch_struct_stat = mx32_fetch_struct_stat, +.fetch_struct_stat64 = mx32_fetch_struct_stat64, .fetch_struct_statfs = mx32_fetch_struct_statfs, .fetch_struct_statfs64 = mx32_fetch_struct_statfs64, .hdio_ioctl = mx32_hdio_ioctl, +.loop_ioctl = mx32_loop_ioctl, .mtd_ioctl = mx32_mtd_ioctl, .printmqattr = mx32_printmqattr, .tprint_msgbuf = mx32_tprint_msgbuf, +.decode_sg_req_info = mx32_decode_sg_req_info, .print_sigevent = mx32_print_sigevent, .print_timespec = mx32_print_timespec, .sprint_timespec = mx32_sprint_timespec, .print_timespec_utime_pair = mx32_print_timespec_utime_pair, .print_itimerspec = mx32_print_itimerspec, +.print_struct_timeval = mx32_print_struct_timeval, .print_timeval = mx32_print_timeval, .print_timeval_pair = mx32_print_timeval_pair, .sprint_timeval = mx32_sprint_timeval, @@ -28,4 +33,6 @@ .printsiginfo_at = mx32_printsiginfo_at, .print_siginfo_array = mx32_print_siginfo_array, .rtc_ioctl = mx32_rtc_ioctl, +.decode_sg_io_v3 = mx32_decode_sg_io_v3, +.sock_ioctl = mx32_sock_ioctl, .v4l2_ioctl = mx32_v4l2_ioctl, diff --git a/mx32_type_defs.h b/mx32_type_defs.h index 31f10a8df..61cb66b01 100644 --- a/mx32_type_defs.h +++ b/mx32_type_defs.h @@ -16,6 +16,9 @@ #ifdef MPERS_mx32_struct_btrfs_ioctl_received_subvol_args # define struct_btrfs_ioctl_received_subvol_args MPERS_mx32_struct_btrfs_ioctl_received_subvol_args #endif +#ifdef MPERS_mx32_struct_btrfs_ioctl_vol_args_v2 +# define struct_btrfs_ioctl_vol_args_v2 MPERS_mx32_struct_btrfs_ioctl_vol_args_v2 +#endif #ifdef MPERS_mx32_kernel_dirent # define kernel_dirent MPERS_mx32_kernel_dirent #endif @@ -37,6 +40,12 @@ #ifdef MPERS_mx32_struct_msghdr # define struct_msghdr MPERS_mx32_struct_msghdr #endif +#ifdef MPERS_mx32_struct_stat +# define struct_stat MPERS_mx32_struct_stat +#endif +#ifdef MPERS_mx32_struct_stat64 +# define struct_stat64 MPERS_mx32_struct_stat64 +#endif #ifdef MPERS_mx32_struct_statfs # define struct_statfs MPERS_mx32_struct_statfs #endif @@ -52,6 +61,9 @@ #ifdef MPERS_mx32_shmid_ds_t # define shmid_ds_t MPERS_mx32_shmid_ds_t #endif +#ifdef MPERS_mx32_struct_loop_info +# define struct_loop_info MPERS_mx32_struct_loop_info +#endif #ifdef MPERS_mx32_struct_mtd_oob_buf # define struct_mtd_oob_buf MPERS_mx32_struct_mtd_oob_buf #endif @@ -61,6 +73,9 @@ #ifdef MPERS_mx32_msgbuf_t # define msgbuf_t MPERS_mx32_msgbuf_t #endif +#ifdef MPERS_mx32_struct_sg_req_info +# define struct_sg_req_info MPERS_mx32_struct_sg_req_info +#endif #ifdef MPERS_mx32_struct_sigevent # define struct_sigevent MPERS_mx32_struct_sigevent #endif @@ -85,15 +100,27 @@ #ifdef MPERS_mx32_struct_rtc_pll_info # define struct_rtc_pll_info MPERS_mx32_struct_rtc_pll_info #endif +#ifdef MPERS_mx32_struct_sg_io_hdr +# define struct_sg_io_hdr MPERS_mx32_struct_sg_io_hdr +#endif #ifdef MPERS_mx32_stack_t # define stack_t MPERS_mx32_stack_t #endif +#ifdef MPERS_mx32_struct_ifconf +# define struct_ifconf MPERS_mx32_struct_ifconf +#endif +#ifdef MPERS_mx32_struct_ifreq +# define struct_ifreq MPERS_mx32_struct_ifreq +#endif #ifdef MPERS_mx32_sysinfo_t # define sysinfo_t MPERS_mx32_sysinfo_t #endif #ifdef MPERS_mx32_tms_t # define tms_t MPERS_mx32_tms_t #endif +#ifdef MPERS_mx32_struct_ustat +# define struct_ustat MPERS_mx32_struct_ustat +#endif #ifdef MPERS_mx32_utimbuf_t # define utimbuf_t MPERS_mx32_utimbuf_t #endif diff --git a/native_printer_decls.h b/native_printer_decls.h index b0b480b01..06b1f7cc2 100644 --- a/native_printer_decls.h +++ b/native_printer_decls.h @@ -1,33 +1,38 @@ -/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_stat.c.mpers.i fetch_struct_stat64.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sigaltstack.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ -extern int block_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern int btrfs_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern int evdev_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern _Bool fetch_seccomp_fprog(struct tcb *tcp, const long addr, void *p); -extern _Bool fetch_struct_flock(struct tcb *tcp, const long addr, void *p); -extern _Bool fetch_struct_flock64(struct tcb *tcp, const long addr, void *p); -extern int fetch_struct_mmsghdr(struct tcb *tcp, const unsigned long addr, void *p); +/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_stat.c.mpers.i fetch_struct_stat64.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i loop.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sg_req_info.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timespec.c.mpers.i print_timeval.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sg_io_v3.c.mpers.i sigaltstack.c.mpers.i sock.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i ustat.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ +extern int block_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern int btrfs_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern int evdev_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern _Bool fetch_seccomp_fprog(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); +extern _Bool fetch_struct_flock(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); +extern _Bool fetch_struct_flock64(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); +extern int fetch_struct_mmsghdr(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); extern unsigned int sizeof_struct_mmsghdr(void); -extern int fetch_struct_msghdr(struct tcb *tcp, const unsigned long addr, void *p); -extern _Bool fetch_struct_stat(struct tcb *tcp, const unsigned long addr, struct strace_stat *const dst); -extern _Bool fetch_struct_stat64(struct tcb *tcp, const unsigned long addr, struct strace_stat *const dst); -extern _Bool fetch_struct_statfs(struct tcb *tcp, const long addr, struct strace_statfs *p); -extern _Bool fetch_struct_statfs64(struct tcb *tcp, const long addr, const unsigned long size, struct strace_statfs *p); -extern int hdio_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern int mtd_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern void printmqattr(struct tcb *tcp, const long addr); -extern void tprint_msgbuf(struct tcb *tcp, const long addr, const unsigned long count); -extern void print_sigevent(struct tcb *tcp, const long addr); -extern void print_timespec(struct tcb *tcp, const long addr); -extern const char * sprint_timespec(struct tcb *tcp, const long addr); -extern void print_timespec_utime_pair(struct tcb *tcp, const long addr); -extern void print_itimerspec(struct tcb *tcp, const long addr); -extern void print_timeval(struct tcb *tcp, const long addr); -extern void print_timeval_pair(struct tcb *tcp, const long addr); -extern const char * sprint_timeval(struct tcb *tcp, const long addr); -extern void print_itimerval(struct tcb *tcp, const long addr); -extern int print_timex(struct tcb *tcp, const long addr); -extern void printrusage(struct tcb *tcp, long addr); -extern void printsiginfo_at(struct tcb *tcp, long addr); -extern void print_siginfo_array(struct tcb *tcp, unsigned long addr, unsigned long len); -extern int rtc_ioctl(struct tcb *tcp, const unsigned int code, const long arg); -extern int v4l2_ioctl(struct tcb *tcp, const unsigned int code, const long arg); +extern int fetch_struct_msghdr(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); +extern _Bool fetch_struct_stat(struct tcb *const tcp, const kernel_ulong_t addr, struct strace_stat *const dst); +extern _Bool fetch_struct_stat64(struct tcb *const tcp, const kernel_ulong_t addr, struct strace_stat *const dst); +extern _Bool fetch_struct_statfs(struct tcb *const tcp, const kernel_ulong_t addr, struct strace_statfs *const p); +extern _Bool fetch_struct_statfs64(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t size, struct strace_statfs *const p); +extern int hdio_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern int loop_ioctl(struct tcb *tcp, const unsigned int code, const kernel_ulong_t arg); +extern int mtd_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern void printmqattr(struct tcb *const tcp, const kernel_ulong_t addr, const _Bool decode_flags); +extern void tprint_msgbuf(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t count); +extern int decode_sg_req_info(struct tcb *const tcp, const kernel_ulong_t arg); +extern void print_sigevent(struct tcb *const tcp, const kernel_ulong_t addr); +extern void print_timespec(struct tcb *const tcp, const kernel_ulong_t addr); +extern const char * sprint_timespec(struct tcb *const tcp, const kernel_ulong_t addr); +extern void print_timespec_utime_pair(struct tcb *const tcp, const kernel_ulong_t addr); +extern void print_itimerspec(struct tcb *const tcp, const kernel_ulong_t addr); +extern void print_struct_timeval(const void *arg); +extern void print_timeval(struct tcb *const tcp, const kernel_ulong_t addr); +extern void print_timeval_pair(struct tcb *const tcp, const kernel_ulong_t addr); +extern const char * sprint_timeval(struct tcb *const tcp, const kernel_ulong_t addr); +extern void print_itimerval(struct tcb *const tcp, const kernel_ulong_t addr); +extern int print_timex(struct tcb *const tcp, const kernel_ulong_t addr); +extern void printrusage(struct tcb *const tcp, const kernel_ulong_t addr); +extern void printsiginfo_at(struct tcb *const tcp, const kernel_ulong_t addr); +extern void print_siginfo_array(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t len); +extern int rtc_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); +extern int decode_sg_io_v3(struct tcb *const tcp, const kernel_ulong_t arg); +extern int sock_ioctl(struct tcb *tcp, const unsigned int code, const kernel_ulong_t arg); +extern int v4l2_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); diff --git a/native_printer_defs.h b/native_printer_defs.h index 5d64250c5..e5d977ddf 100644 --- a/native_printer_defs.h +++ b/native_printer_defs.h @@ -1,4 +1,4 @@ -/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_stat.c.mpers.i fetch_struct_stat64.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sigaltstack.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ +/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_stat.c.mpers.i fetch_struct_stat64.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i loop.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sg_req_info.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timespec.c.mpers.i print_timeval.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sg_io_v3.c.mpers.i sigaltstack.c.mpers.i sock.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i ustat.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ .block_ioctl = block_ioctl, .btrfs_ioctl = btrfs_ioctl, .evdev_ioctl = evdev_ioctl, @@ -13,14 +13,17 @@ .fetch_struct_statfs = fetch_struct_statfs, .fetch_struct_statfs64 = fetch_struct_statfs64, .hdio_ioctl = hdio_ioctl, +.loop_ioctl = loop_ioctl, .mtd_ioctl = mtd_ioctl, .printmqattr = printmqattr, .tprint_msgbuf = tprint_msgbuf, +.decode_sg_req_info = NULL, .print_sigevent = print_sigevent, .print_timespec = print_timespec, .sprint_timespec = sprint_timespec, .print_timespec_utime_pair = print_timespec_utime_pair, .print_itimerspec = print_itimerspec, +.print_struct_timeval = print_struct_timeval, .print_timeval = print_timeval, .print_timeval_pair = print_timeval_pair, .sprint_timeval = sprint_timeval, @@ -30,4 +33,6 @@ .printsiginfo_at = printsiginfo_at, .print_siginfo_array = print_siginfo_array, .rtc_ioctl = rtc_ioctl, +.decode_sg_io_v3 = decode_sg_io_v3, +.sock_ioctl = sock_ioctl, .v4l2_ioctl = v4l2_ioctl, diff --git a/net.c b/net.c index b0394630a..314e02abc 100644 --- a/net.c +++ b/net.c @@ -80,10 +80,6 @@ #include "xlat/socketlayers.h" #include "xlat/inet_protocols.h" - -#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG -# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG -#endif #include "xlat/netlink_protocols.h" #ifdef HAVE_BLUETOOTH_BLUETOOTH_H @@ -108,7 +104,8 @@ print_ifindex(unsigned int ifindex) } static void -decode_sockbuf(struct tcb *tcp, int fd, long addr, long addrlen) +decode_sockbuf(struct tcb *const tcp, const int fd, const kernel_ulong_t addr, + const kernel_ulong_t addrlen) { switch (verbose(tcp) ? getfdproto(tcp, fd) : SOCK_PROTO_UNKNOWN) { @@ -116,7 +113,7 @@ decode_sockbuf(struct tcb *tcp, int fd, long addr, long addrlen) decode_netlink(tcp, addr, addrlen); break; default: - printstr(tcp, addr, addrlen); + printstrn(tcp, addr, addrlen); } } @@ -162,7 +159,7 @@ SYS_FUNC(socket) #endif default: - tprintf("%lu", tcp->u_arg[2]); + tprintf("%" PRI_klu, tcp->u_arg[2]); break; } @@ -184,14 +181,14 @@ SYS_FUNC(listen) { printfd(tcp, tcp->u_arg[0]); tprints(", "); - tprintf("%lu", tcp->u_arg[1]); + tprintf("%" PRI_klu, tcp->u_arg[1]); return RVAL_DECODED; } static bool -fetch_socklen(struct tcb *tcp, int *plen, - const unsigned long sockaddr, const unsigned long socklen) +fetch_socklen(struct tcb *const tcp, int *const plen, + const kernel_ulong_t sockaddr, const kernel_ulong_t socklen) { return verbose(tcp) && sockaddr && socklen && umove(tcp, socklen, plen) == 0; @@ -254,7 +251,7 @@ SYS_FUNC(send) printfd(tcp, tcp->u_arg[0]); tprints(", "); decode_sockbuf(tcp, tcp->u_arg[0], tcp->u_arg[1], tcp->u_arg[2]); - tprintf(", %lu, ", tcp->u_arg[2]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[2]); /* flags */ printflags(msg_flags, tcp->u_arg[3], "MSG_???"); @@ -266,7 +263,7 @@ SYS_FUNC(sendto) printfd(tcp, tcp->u_arg[0]); tprints(", "); decode_sockbuf(tcp, tcp->u_arg[0], tcp->u_arg[1], tcp->u_arg[2]); - tprintf(", %lu, ", tcp->u_arg[2]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[2]); /* flags */ printflags(msg_flags, tcp->u_arg[3], "MSG_???"); /* to address */ @@ -292,7 +289,7 @@ SYS_FUNC(recv) tcp->u_rval); } - tprintf(", %lu, ", tcp->u_arg[2]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[2]); printflags(msg_flags, tcp->u_arg[3], "MSG_???"); } return 0; @@ -317,7 +314,7 @@ SYS_FUNC(recvfrom) tcp->u_rval); } /* size */ - tprintf(", %lu, ", tcp->u_arg[2]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[2]); /* flags */ printflags(msg_flags, tcp->u_arg[3], "MSG_???"); tprints(", "); @@ -377,7 +374,7 @@ printpair_fd(struct tcb *tcp, const int i0, const int i1) } static void -decode_pair_fd(struct tcb *tcp, const long addr) +decode_pair_fd(struct tcb *const tcp, const kernel_ulong_t addr) { int pair[2]; @@ -422,7 +419,7 @@ SYS_FUNC(socketpair) printxval(addrfams, tcp->u_arg[0], "AF_???"); tprints(", "); tprint_sock_type(tcp->u_arg[1]); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %" PRI_klu, tcp->u_arg[2]); } else { tprints(", "); decode_pair_fd(tcp, tcp->u_arg[3]); @@ -490,7 +487,7 @@ print_sockopt_fd_level_name(struct tcb *tcp, int fd, unsigned int level, } static void -print_linger(struct tcb *tcp, long addr, int len) +print_linger(struct tcb *const tcp, const kernel_ulong_t addr, const int len) { struct linger linger; @@ -507,7 +504,7 @@ print_linger(struct tcb *tcp, long addr, int len) #ifdef SO_PEERCRED static void -print_ucred(struct tcb *tcp, long addr, int len) +print_ucred(struct tcb *const tcp, const kernel_ulong_t addr, const int len) { struct ucred uc; @@ -525,7 +522,8 @@ print_ucred(struct tcb *tcp, long addr, int len) #ifdef PACKET_STATISTICS static void -print_tpacket_stats(struct tcb *tcp, long addr, int len) +print_tpacket_stats(struct tcb *const tcp, const kernel_ulong_t addr, + const int len) { struct tpacket_stats stats; @@ -543,7 +541,7 @@ print_tpacket_stats(struct tcb *tcp, long addr, int len) #include "xlat/icmpfilterflags.h" static void -print_icmp_filter(struct tcb *tcp, const long addr, int len) +print_icmp_filter(struct tcb *const tcp, const kernel_ulong_t addr, int len) { struct icmp_filter filter = {}; @@ -563,8 +561,9 @@ print_icmp_filter(struct tcb *tcp, const long addr, int len) } static void -print_getsockopt(struct tcb *tcp, unsigned int level, unsigned int name, - long addr, int len) +print_getsockopt(struct tcb *const tcp, const unsigned int level, + const unsigned int name, const kernel_ulong_t addr, + const int len) { if (addr && verbose(tcp)) switch (level) { @@ -606,7 +605,7 @@ print_getsockopt(struct tcb *tcp, unsigned int level, unsigned int name, if (len == sizeof(int)) { printnum_int(tcp, addr, "%d"); } else { - printstr(tcp, addr, len); + printstrn(tcp, addr, len); } } else { printaddr(addr); @@ -637,12 +636,13 @@ SYS_FUNC(getsockopt) #ifdef IP_ADD_MEMBERSHIP static void -print_mreq(struct tcb *tcp, long addr, unsigned int len) +print_mreq(struct tcb *const tcp, const kernel_ulong_t addr, + const unsigned int len) { struct ip_mreq mreq; if (len < sizeof(mreq)) { - printstr(tcp, addr, len); + printstrn(tcp, addr, len); return; } if (umove_or_printaddr(tcp, addr, &mreq)) @@ -660,7 +660,8 @@ print_mreq(struct tcb *tcp, long addr, unsigned int len) #ifdef IPV6_ADD_MEMBERSHIP static void -print_mreq6(struct tcb *tcp, long addr, unsigned int len) +print_mreq6(struct tcb *const tcp, const kernel_ulong_t addr, + const unsigned int len) { struct ipv6_mreq mreq; @@ -684,13 +685,13 @@ print_mreq6(struct tcb *tcp, long addr, unsigned int len) return; fail: - printstr(tcp, addr, len); + printstrn(tcp, addr, len); } #endif /* IPV6_ADD_MEMBERSHIP */ #ifdef MCAST_JOIN_GROUP static void -print_group_req(struct tcb *tcp, long addr, int len) +print_group_req(struct tcb *const tcp, const kernel_ulong_t addr, const int len) { struct group_req greq; @@ -709,7 +710,7 @@ print_group_req(struct tcb *tcp, long addr, int len) #ifdef PACKET_RX_RING static void -print_tpacket_req(struct tcb *tcp, long addr, int len) +print_tpacket_req(struct tcb *const tcp, const kernel_ulong_t addr, const int len) { struct tpacket_req req; @@ -731,7 +732,7 @@ print_tpacket_req(struct tcb *tcp, long addr, int len) # include "xlat/packet_mreq_type.h" static void -print_packet_mreq(struct tcb *tcp, long addr, int len) +print_packet_mreq(struct tcb *const tcp, const kernel_ulong_t addr, const int len) { struct packet_mreq mreq; @@ -754,8 +755,9 @@ print_packet_mreq(struct tcb *tcp, long addr, int len) #endif /* PACKET_ADD_MEMBERSHIP */ static void -print_setsockopt(struct tcb *tcp, unsigned int level, unsigned int name, - long addr, int len) +print_setsockopt(struct tcb *const tcp, const unsigned int level, + const unsigned int name, const kernel_ulong_t addr, + const int len) { if (addr && verbose(tcp)) switch (level) { @@ -835,7 +837,7 @@ print_setsockopt(struct tcb *tcp, unsigned int level, unsigned int name, if (len == sizeof(int)) { printnum_int(tcp, addr, "%d"); } else { - printstr(tcp, addr, len); + printstrn(tcp, addr, len); } } else { printaddr(addr); diff --git a/netlink.c b/netlink.c index 71573d474..db6e43f80 100644 --- a/netlink.c +++ b/netlink.c @@ -36,11 +36,11 @@ * Fetch a struct nlmsghdr from the given address. */ static bool -fetch_nlmsghdr(struct tcb *tcp, struct nlmsghdr *nlmsghdr, - const unsigned long addr, const unsigned long len) +fetch_nlmsghdr(struct tcb *const tcp, struct nlmsghdr *const nlmsghdr, + const kernel_ulong_t addr, const kernel_ulong_t len) { if (len < sizeof(struct nlmsghdr)) { - printstr(tcp, addr, len); + printstrn(tcp, addr, len); return false; } @@ -67,29 +67,29 @@ print_nlmsghdr(struct tcb *tcp, const struct nlmsghdr *const nlmsghdr) } static void -decode_nlmsghdr_with_payload(struct tcb *tcp, +decode_nlmsghdr_with_payload(struct tcb *const tcp, const struct nlmsghdr *const nlmsghdr, - const unsigned long addr, - const unsigned long len) + const kernel_ulong_t addr, + const kernel_ulong_t len) { tprints("{"); print_nlmsghdr(tcp, nlmsghdr); - unsigned long nlmsg_len = + unsigned int nlmsg_len = nlmsghdr->nlmsg_len > len ? len : nlmsghdr->nlmsg_len; if (nlmsg_len > sizeof(struct nlmsghdr)) { tprints(", "); - printstr(tcp, addr + sizeof(struct nlmsghdr), - nlmsg_len - sizeof(struct nlmsghdr)); + printstrn(tcp, addr + sizeof(struct nlmsghdr), + nlmsg_len - sizeof(struct nlmsghdr)); } tprints("}"); } void -decode_netlink(struct tcb *tcp, unsigned long addr, unsigned long len) +decode_netlink(struct tcb *const tcp, kernel_ulong_t addr, kernel_ulong_t len) { struct nlmsghdr nlmsghdr; bool print_array = false; @@ -101,8 +101,9 @@ decode_netlink(struct tcb *tcp, unsigned long addr, unsigned long len) break; } - unsigned long nlmsg_len = NLMSG_ALIGN(nlmsghdr.nlmsg_len); - unsigned long next_addr = 0, next_len = 0; + unsigned int nlmsg_len = NLMSG_ALIGN(nlmsghdr.nlmsg_len); + kernel_ulong_t next_addr = 0; + kernel_ulong_t next_len = 0; if (nlmsghdr.nlmsg_len >= sizeof(struct nlmsghdr)) { next_len = (len >= nlmsg_len) ? len - nlmsg_len : 0; diff --git a/nsig.h b/nsig.h new file mode 100644 index 000000000..528f7033b --- /dev/null +++ b/nsig.h @@ -0,0 +1,15 @@ +#ifndef STRACE_NSIG_H +#define STRACE_NSIG_H + +#include + +#ifndef NSIG +# warning NSIG is not defined, using 32 +# define NSIG 32 +#elif NSIG < 32 +# error NSIG < 32 +#endif + +#define NSIG_BYTES (NSIG / 8) + +#endif /* !STRACE_NSIG_H */ diff --git a/numa.c b/numa.c index b46fc7fc4..c2cd143ae 100644 --- a/numa.c +++ b/numa.c @@ -31,37 +31,39 @@ static bool print_node(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { - if (elem_size < sizeof(long)) { + if (elem_size < sizeof(kernel_ulong_t)) { tprintf("%#0*x", (int) elem_size * 2 + 2, * (unsigned int *) elem_buf); } else { - tprintf("%#0*lx", (int) elem_size * 2 + 2, - * (unsigned long *) elem_buf); + tprintf("%#0*" PRI_klx, (int) elem_size * 2 + 2, + * (kernel_ulong_t *) elem_buf); } return true; } static void -print_nodemask(struct tcb *tcp, unsigned long addr, unsigned long maxnodes) +print_nodemask(struct tcb *const tcp, const kernel_ulong_t addr, + const kernel_ulong_t maxnodes) { - const unsigned long nmemb = - (maxnodes + 8 * current_wordsize - 2) / (8 * current_wordsize); + const unsigned int bits_per_long = 8 * current_wordsize; + const kernel_ulong_t nmemb = + (maxnodes + bits_per_long - 2) / bits_per_long; - if (nmemb < maxnodes / (8 * current_wordsize) || + if (nmemb < maxnodes / bits_per_long || (maxnodes && !nmemb)) { printaddr(addr); return; } - unsigned long buf; + kernel_ulong_t buf; print_array(tcp, addr, nmemb, &buf, current_wordsize, umoven_or_printaddr, print_node, 0); } SYS_FUNC(migrate_pages) { - tprintf("%d, %lu, ", (int) tcp->u_arg[0], tcp->u_arg[1]); + tprintf("%d, %" PRI_klu ", ", (int) tcp->u_arg[0], tcp->u_arg[1]); print_nodemask(tcp, tcp->u_arg[2], tcp->u_arg[1]); tprints(", "); print_nodemask(tcp, tcp->u_arg[3], tcp->u_arg[1]); @@ -75,11 +77,11 @@ SYS_FUNC(migrate_pages) SYS_FUNC(mbind) { printaddr(tcp->u_arg[0]); - tprintf(", %lu, ", tcp->u_arg[1]); - printxval_long(policies, tcp->u_arg[2], "MPOL_???"); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); + printxval64(policies, tcp->u_arg[2], "MPOL_???"); tprints(", "); print_nodemask(tcp, tcp->u_arg[3], tcp->u_arg[4]); - tprintf(", %lu, ", tcp->u_arg[4]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[4]); printflags(mbindflags, tcp->u_arg[5], "MPOL_???"); return RVAL_DECODED; @@ -90,7 +92,7 @@ SYS_FUNC(set_mempolicy) printxval(policies, tcp->u_arg[0], "MPOL_???"); tprints(", "); print_nodemask(tcp, tcp->u_arg[1], tcp->u_arg[2]); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %" PRI_klu, tcp->u_arg[2]); return RVAL_DECODED; } @@ -108,10 +110,10 @@ SYS_FUNC(get_mempolicy) } tprints(", "); print_nodemask(tcp, tcp->u_arg[1], tcp->u_arg[2]); - tprintf(", %lu, ", tcp->u_arg[2]); + tprintf(", %" PRI_klu ", ", tcp->u_arg[2]); printaddr(tcp->u_arg[3]); tprints(", "); - printflags_long(mempolicyflags, tcp->u_arg[4], "MPOL_???"); + printflags64(mempolicyflags, tcp->u_arg[4], "MPOL_???"); } return 0; } @@ -121,12 +123,12 @@ SYS_FUNC(get_mempolicy) static bool print_addr(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { - unsigned long addr; + kernel_ulong_t addr; - if (elem_size < sizeof(long)) { + if (elem_size < sizeof(addr)) { addr = * (unsigned int *) elem_buf; } else { - addr = * (unsigned long *) elem_buf; + addr = * (kernel_ulong_t *) elem_buf; } printaddr(addr); @@ -157,11 +159,11 @@ print_int(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) SYS_FUNC(move_pages) { - const unsigned long npages = tcp->u_arg[1]; - long buf; + const kernel_ulong_t npages = tcp->u_arg[1]; + kernel_ulong_t buf; if (entering(tcp)) { - tprintf("%d, %lu, ", (int) tcp->u_arg[0], npages); + tprintf("%d, %" PRI_klu ", ", (int) tcp->u_arg[0], npages); print_array(tcp, tcp->u_arg[2], npages, &buf, current_wordsize, umoven_or_printaddr, print_addr, 0); tprints(", "); diff --git a/oldstat.c b/oldstat.c index a5dd17722..5535310ec 100644 --- a/oldstat.c +++ b/oldstat.c @@ -36,7 +36,7 @@ #ifdef HAVE_STRUCT___OLD_KERNEL_STAT static void -print_old_kernel_stat(struct tcb *tcp, const unsigned long addr) +print_old_kernel_stat(struct tcb *const tcp, const kernel_ulong_t addr) { struct __old_kernel_stat buf; if (umove_or_printaddr(tcp, addr, &buf)) diff --git a/open.c b/open.c index 6128fb005..2944d55c4 100644 --- a/open.c +++ b/open.c @@ -36,6 +36,10 @@ #include +/* some libcs are guilty of messing up with O_ACCMODE */ +#undef O_ACCMODE +#define O_ACCMODE 03 + #ifdef O_LARGEFILE # if O_LARGEFILE == 0 /* biarch platforms in 64-bit mode */ # undef O_LARGEFILE diff --git a/or1k_atomic.c b/or1k_atomic.c index 54d3a0d9b..bb02e0e4c 100644 --- a/or1k_atomic.c +++ b/or1k_atomic.c @@ -44,7 +44,7 @@ SYS_FUNC(or1k_atomic) { - printxval_long(atomic_ops, tcp->u_arg[0], "???"); + printxval64(atomic_ops, tcp->u_arg[0], "???"); switch(tcp->u_arg[0]) { case OR1K_ATOMIC_SWAP: tprintf(", 0x%lx, 0x%lx", tcp->u_arg[1], tcp->u_arg[2]); diff --git a/pathtrace.c b/pathtrace.c index 398fb287a..d991aeda4 100644 --- a/pathtrace.c +++ b/pathtrace.c @@ -54,7 +54,7 @@ pathmatch(const char *path) * Return true if specified path (in user-space) matches. */ static int -upathmatch(struct tcb *tcp, unsigned long upath) +upathmatch(struct tcb *const tcp, const kernel_ulong_t upath) { char path[PATH_MAX + 1]; @@ -248,19 +248,31 @@ pathtrace_match(struct tcb *tcp) { int i, j; int nfds; - long *args, oldargs[5]; - unsigned fdsize; + kernel_ulong_t *args; + kernel_ulong_t select_args[5]; + unsigned int oldselect_args[5]; + unsigned int fdsize; fd_set *fds; - args = tcp->u_arg; if (SEN_oldselect == s->sen) { - if (umoven(tcp, tcp->u_arg[0], sizeof oldargs, - oldargs) < 0) - { - error_msg("umoven() failed"); - return 0; + if (sizeof(*select_args) == sizeof(*oldselect_args)) { + if (umove(tcp, tcp->u_arg[0], &select_args)) { + return 0; + } + } else { + unsigned int n; + + if (umove(tcp, tcp->u_arg[0], &oldselect_args)) { + return 0; + } + + for (n = 0; n < 5; ++n) { + select_args[n] = oldselect_args[n]; + } } - args = oldargs; + args = select_args; + } else { + args = tcp->u_arg; } /* Kernel truncates arg[0] to int, we do the same. */ @@ -278,7 +290,6 @@ pathtrace_match(struct tcb *tcp) if (args[i] == 0) continue; if (umoven(tcp, args[i], fdsize, fds) < 0) { - error_msg("umoven() failed"); continue; } for (j = 0;; j++) { @@ -300,7 +311,7 @@ pathtrace_match(struct tcb *tcp) { struct pollfd fds; unsigned nfds; - unsigned long start, cur, end; + kernel_ulong_t start, cur, end; start = tcp->u_arg[0]; nfds = tcp->u_arg[1]; @@ -311,7 +322,7 @@ pathtrace_match(struct tcb *tcp) return 0; for (cur = start; cur < end; cur += sizeof(fds)) - if ((umoven(tcp, cur, sizeof fds, &fds) == 0) + if ((umove(tcp, cur, &fds) == 0) && fdmatch(tcp, fds.fd)) return 1; diff --git a/perf.c b/perf.c index 8ab58a0e8..f151c198f 100644 --- a/perf.c +++ b/perf.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2013 Ben Noordhuis * Copyright (c) 2013-2015 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,20 +29,401 @@ #include "defs.h" -#ifdef HAVE_LINUX_PERF_EVENT_H -# include -#endif +#include "perf_event_struct.h" +#include "xlat/clocknames.h" +#include "xlat/hw_breakpoint_len.h" +#include "xlat/hw_breakpoint_type.h" +#include "xlat/perf_attr_size.h" +#include "xlat/perf_branch_sample_type.h" #include "xlat/perf_event_open_flags.h" +#include "xlat/perf_event_read_format.h" +#include "xlat/perf_event_sample_format.h" +#include "xlat/perf_hw_cache_id.h" +#include "xlat/perf_hw_cache_op_id.h" +#include "xlat/perf_hw_cache_op_result_id.h" +#include "xlat/perf_hw_id.h" +#include "xlat/perf_sw_ids.h" +#include "xlat/perf_type_id.h" + +struct pea_desc { + struct perf_event_attr *attr; + uint32_t size; +}; + +static void +free_pea_desc(void *pea_desc_ptr) +{ + struct pea_desc *desc = pea_desc_ptr; + + free(desc->attr); + free(desc); +} + +static int +fetch_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr) +{ + struct pea_desc *desc; + struct perf_event_attr *attr; + uint32_t size; + + if (umove(tcp, addr + offsetof(struct perf_event_attr, size), &size)) { + printaddr(addr); + return 1; + } + + if (size > sizeof(*attr)) + size = sizeof(*attr); + + if (!size) + size = PERF_ATTR_SIZE_VER0; + + /* + * Kernel (rightfully) deems invalid attribute structures with size less + * than first published format size, and we do the same. + */ + if (size < PERF_ATTR_SIZE_VER0) { + printaddr(addr); + return 1; + } + + if (abbrev(tcp)) + size = offsetofend(struct perf_event_attr, config); + + /* Size should be multiple of 8, but kernel doesn't check for it */ + /* size &= ~7; */ + + attr = xcalloc(1, sizeof(*attr)); + + if (umoven_or_printaddr(tcp, addr, size, attr)) { + free(attr); + + return 1; + } + + desc = xmalloc(sizeof(*desc)); + + desc->attr = attr; + desc->size = size; + + set_tcb_priv_data(tcp, desc, free_pea_desc); + + return 0; +} + +#define PRINT_XLAT(prefix, xlat, x, dflt) \ + do { \ + tprints(prefix); \ + printxval_search(xlat, x, dflt); \ + } while (0) + +static void +print_perf_event_attr(struct tcb *const tcp, const kernel_ulong_t addr) +{ + static const char *precise_ip_desc[] = { + "arbitrary skid", + "constant skid", + "requested to have 0 skid", + "must have 0 skid", + }; + + struct pea_desc *desc; + struct perf_event_attr *attr; + uint32_t size; + uint32_t new_size; + int use_new_size = 0; + + /* + * Amusingly, kernel accepts structures with only part of the field + * present, so we making check like this (instead of checking + * offsetofend against size) in order to print fields as kernel sees + * them. This also should work great on big endian architectures. + */ + #define _PERF_CHECK_FIELD(_field) \ + do { \ + if (offsetof(struct perf_event_attr, _field) >= size) \ + goto print_perf_event_attr_out; \ + } while (0) + + desc = get_tcb_priv_data(tcp); + + attr = desc->attr; + size = desc->size; + + /* The only error which expected to change size field currently */ + if (tcp->u_error == E2BIG) { + if (umove(tcp, addr + offsetof(struct perf_event_attr, size), + &new_size)) + use_new_size = -1; + else + use_new_size = 1; + } + + PRINT_XLAT("{type=", perf_type_id, attr->type, "PERF_TYPE_???"); + tprintf(", size="); + printxval(perf_attr_size, attr->size, "PERF_ATTR_SIZE_???"); + + if (use_new_size) { + tprints(" => "); + + if (use_new_size > 0) + printxval(perf_attr_size, new_size, + "PERF_ATTR_SIZE_???"); + else + tprints("???"); + } + + switch (attr->type) { + case PERF_TYPE_HARDWARE: + PRINT_XLAT(", config=", perf_hw_id, attr->config, + "PERF_COUNT_HW_???"); + break; + case PERF_TYPE_SOFTWARE: + PRINT_XLAT(", config=", perf_sw_ids, attr->config, + "PERF_COUNT_SW_???"); + break; + case PERF_TYPE_TRACEPOINT: + /* + * "The value to use in config can be obtained from under + * debugfs tracing/events/../../id if ftrace is enabled in the + * kernel." + */ + tprintf(", config=%" PRIu64, attr->config); + break; + case PERF_TYPE_HW_CACHE: + /* + * (perf_hw_cache_id) | (perf_hw_cache_op_id << 8) | + * (perf_hw_cache_op_result_id << 16) + */ + PRINT_XLAT(", config=", perf_hw_cache_id, attr->config & 0xFF, + "PERF_COUNT_HW_CACHE_???"); + PRINT_XLAT("|", perf_hw_cache_op_id, (attr->config >> 8) & 0xFF, + "PERF_COUNT_HW_CACHE_OP_???"); + /* + * Current code (see set_ext_hw_attr in arch/x86/events/core.c, + * tile_map_cache_event in arch/tile/kernel/perf_event.c, + * arc_pmu_cache_event in arch/arc/kernel/perf_event.c, + * hw_perf_cache_event in arch/blackfin/kernel/perf_event.c, + * _hw_perf_cache_event in arch/metag/kernel/perf/perf_event.c, + * mipspmu_map_cache_event in arch/mips/kernel/perf_event_mipsxx.c, + * hw_perf_cache_event in arch/powerpc/perf/core-book3s.c, + * hw_perf_cache_event in arch/powerpc/perf/core-fsl-emb.c, + * hw_perf_cache_event in arch/sh/kernel/perf_event.c, + * sparc_map_cache_event in arch/sparc/kernel/perf_event.c, + * xtensa_pmu_cache_event in arch/xtensa/kernel/perf_event.c, + * armpmu_map_cache_event in drivers/perf/arm_pmu.c) assumes + * that cache result is 8 bits in size. + */ + PRINT_XLAT("<<8|", perf_hw_cache_op_result_id, + (attr->config >> 16) & 0xFF, + "PERF_COUNT_HW_CACHE_RESULT_???"); + tprintf("<<16"); + if (attr->config >> 24) + tprintf("|%#" PRIx64 "<<24 " + "/* PERF_COUNT_HW_CACHE_??? */", + attr->config >> 24); + break; + case PERF_TYPE_RAW: + /* + * "If type is PERF_TYPE_RAW, then a custom "raw" config + * value is needed. Most CPUs support events that are not + * covered by the "generalized" events. These are + * implementation defined; see your CPU manual (for example the + * Intel Volume 3B documentation or the AMD BIOS and Kernel + * Developer Guide). The libpfm4 library can be used to + * translate from the name in the architectural manuals + * to the raw hex value perf_event_open() expects in this + * field." + */ + case PERF_TYPE_BREAKPOINT: + /* + * "If type is PERF_TYPE_BREAKPOINT, then leave config set + * to zero. Its parameters are set in other places." + */ + default: + tprintf(", config=%#" PRIx64, attr->config); + break; + } + + if (abbrev(tcp)) + goto print_perf_event_attr_out; + + if (attr->freq) + tprintf(", sample_freq=%" PRIu64, attr->sample_freq); + else + tprintf(", sample_period=%" PRIu64, attr->sample_period); + + tprintf(", sample_type="); + printflags64(perf_event_sample_format, attr->sample_type, + "PERF_SAMPLE_???"); + + tprintf(", read_format="); + printflags64(perf_event_read_format, attr->read_format, + "PERF_FORMAT_???"); + + tprintf(", disabled=%u" + ", inherit=%u" + ", pinned=%u" + ", exclusive=%u" + ", exclusive_user=%u" + ", exclude_kernel=%u" + ", exclude_hv=%u" + ", exclude_idle=%u" + ", mmap=%u" + ", comm=%u" + ", freq=%u" + ", inherit_stat=%u" + ", enable_on_exec=%u" + ", task=%u" + ", watermark=%u" + ", precise_ip=%u /* %s */" + ", mmap_data=%u" + ", sample_id_all=%u" + ", exclude_host=%u" + ", exclude_guest=%u" + ", exclude_callchain_kernel=%u" + ", exclude_callchain_user=%u" + ", mmap2=%u" + ", comm_exec=%u" + ", use_clockid=%u" + ", context_switch=%u" + ", write_backward=%u", + attr->disabled, + attr->inherit, + attr->pinned, + attr->exclusive, + attr->exclude_user, + attr->exclude_kernel, + attr->exclude_hv, + attr->exclude_idle, + attr->mmap, + attr->comm, + attr->freq, + attr->inherit_stat, + attr->enable_on_exec, + attr->task, + attr->watermark, + attr->precise_ip, precise_ip_desc[attr->precise_ip], + attr->mmap_data, + attr->sample_id_all, + attr->exclude_host, + attr->exclude_guest, + attr->exclude_callchain_kernel, + attr->exclude_callchain_user, + attr->mmap2, + attr->comm_exec, + attr->use_clockid, + attr->context_switch, + attr->write_backward); + + /* + * Print it only in case it is non-zero, since it may contain flags we + * are not aware about. + */ + if (attr->__reserved_1) + tprintf(", __reserved_1=%#" PRIx64 " /* Bits 63..28 */", + (uint64_t) attr->__reserved_1); + + if (attr->watermark) + tprintf(", wakeup_watermark=%u", attr->wakeup_watermark); + else + tprintf(", wakeup_events=%u", attr->wakeup_events); + + if (attr->type == PERF_TYPE_BREAKPOINT) + /* Any combination of R/W with X is deemed invalid */ + PRINT_XLAT(", bp_type=", hw_breakpoint_type, attr->bp_type, + (attr->bp_type <= + (HW_BREAKPOINT_X | HW_BREAKPOINT_RW)) ? + "HW_BREAKPOINT_INVALID" : + "HW_BREAKPOINT_???"); + + if (attr->type == PERF_TYPE_BREAKPOINT) + tprintf(", bp_addr=%#" PRIx64, attr->bp_addr); + else + tprintf(", config1=%#" PRIx64, attr->config1); + + /* + * Fields after bp_addr/config1 are optional and may not present; check + * against size is needed. + */ + + _PERF_CHECK_FIELD(bp_len); + if (attr->type == PERF_TYPE_BREAKPOINT) + tprintf(", bp_len=%" PRIu64, attr->bp_len); + else + tprintf(", config2=%#" PRIx64, attr->config2); + + _PERF_CHECK_FIELD(branch_sample_type); + if (attr->sample_type & PERF_SAMPLE_BRANCH_STACK) { + tprintf(", branch_sample_type="); + printflags64(perf_branch_sample_type, attr->branch_sample_type, + "PERF_SAMPLE_BRANCH_???"); + } + + _PERF_CHECK_FIELD(sample_regs_user); + /* + * "This bit mask defines the set of user CPU registers to dump on + * samples. The layout of the register mask is architecture-specific and + * described in the kernel header + * arch/ARCH/include/uapi/asm/perf_regs.h." + */ + tprintf(", sample_regs_user=%#" PRIx64, attr->sample_regs_user); + + _PERF_CHECK_FIELD(sample_stack_user); + /* + * "size of the user stack to dump if PERF_SAMPLE_STACK_USER is + * specified." + */ + if (attr->sample_type & PERF_SAMPLE_STACK_USER) + tprintf(", sample_stack_user=%#" PRIx32, + attr->sample_stack_user); + + if (attr->use_clockid) { + _PERF_CHECK_FIELD(clockid); + tprintf(", clockid="); + printxval(clocknames, attr->clockid, "CLOCK_???"); + } + + _PERF_CHECK_FIELD(sample_regs_intr); + tprintf(", sample_regs_intr=%#" PRIx64, attr->sample_regs_intr); + + _PERF_CHECK_FIELD(aux_watermark); + tprintf(", aux_watermark=%" PRIu32, attr->aux_watermark); + + _PERF_CHECK_FIELD(sample_max_stack); + tprintf(", sample_max_stack=%" PRIu16, attr->sample_max_stack); + + /* _PERF_CHECK_FIELD(__reserved_2); + tprintf(", __reserved2=%" PRIu16, attr->__reserved_2); */ + +print_perf_event_attr_out: + if ((attr->size && (attr->size > size)) || + (!attr->size && (size < PERF_ATTR_SIZE_VER0))) + tprintf(", ..."); + + tprintf("}"); +} SYS_FUNC(perf_event_open) { - printaddr(tcp->u_arg[0]); + /* + * We try to copy out the whole structure on entering in order to check + * size value on exiting. We do not check the rest of the fields because + * they shouldn't be changed, but copy the whole structure instead + * of just size field because they could. + */ + if (entering(tcp)) { + if (!fetch_perf_event_attr(tcp, tcp->u_arg[0])) + return 0; + } else { + print_perf_event_attr(tcp, tcp->u_arg[0]); + } + tprintf(", %d, %d, %d, ", (int) tcp->u_arg[1], (int) tcp->u_arg[2], (int) tcp->u_arg[3]); - printflags_long(perf_event_open_flags, tcp->u_arg[4], "PERF_FLAG_???"); + printflags64(perf_event_open_flags, tcp->u_arg[4], "PERF_FLAG_???"); return RVAL_DECODED | RVAL_FD; } diff --git a/perf_event_struct.h b/perf_event_struct.h new file mode 100644 index 000000000..161f6383b --- /dev/null +++ b/perf_event_struct.h @@ -0,0 +1,73 @@ +#ifndef STRACE_LINUX_PERF_EVENT_STRUCT_H +#define STRACE_LINUX_PERF_EVENT_STRUCT_H + +#include + +struct perf_event_attr { + uint32_t type; + uint32_t size; + uint64_t config; + union { + uint64_t sample_period; + uint64_t sample_freq; + }; + uint64_t sample_type; + uint64_t read_format; + uint64_t disabled :1, + inherit :1, + pinned :1, + exclusive :1, + exclude_user :1, + exclude_kernel :1, + exclude_hv :1, + exclude_idle :1, + mmap :1, + comm :1, + freq :1, + inherit_stat :1, + enable_on_exec :1, + task :1, + watermark :1, + precise_ip :2, + mmap_data :1, + sample_id_all :1, + exclude_host :1, + exclude_guest :1, + exclude_callchain_kernel :1, + exclude_callchain_user :1, + mmap2 :1, + comm_exec :1, + use_clockid :1, + context_switch :1, + write_backward :1, + __reserved_1 :36; + union { + uint32_t wakeup_events; + uint32_t wakeup_watermark; + }; + uint32_t bp_type; + union { + uint64_t bp_addr; + uint64_t config1; + }; + /* End of ver 0 - 64 bytes */ + union { + uint64_t bp_len; + uint64_t config2; + }; + /* End of ver 1 - 72 bytes */ + uint64_t branch_sample_type; + /* End of ver 2 - 80 bytes */ + uint64_t sample_regs_user; + uint32_t sample_stack_user; + int32_t clockid; + /* End of ver 3 - 96 bytes */ + uint64_t sample_regs_intr; + /* End of ver 4 - 104 bytes */ + uint32_t aux_watermark; + uint16_t sample_max_stack; + uint16_t __reserved_2; + /* End of ver 5 - 112 bytes */ +}; + +#endif /* !STRACE_LINUX_PERF_EVENT_STRUCT_H */ diff --git a/pkeys.c b/pkeys.c new file mode 100644 index 000000000..f5338ab85 --- /dev/null +++ b/pkeys.c @@ -0,0 +1,18 @@ +#include "defs.h" + +#include "xlat/pkey_access.h" + +SYS_FUNC(pkey_alloc) +{ + tprintf("%#" PRI_klx ", ", tcp->u_arg[0]); + printflags64(pkey_access, tcp->u_arg[1], "PKEY_???"); + + return RVAL_DECODED; +} + +SYS_FUNC(pkey_free) +{ + tprintf("%d", (int) tcp->u_arg[0]); + + return RVAL_DECODED; +} diff --git a/poll.c b/poll.c index b66c46d8a..f2a238148 100644 --- a/poll.c +++ b/poll.c @@ -50,7 +50,7 @@ print_pollfd(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) static void decode_poll_entering(struct tcb *tcp) { - const unsigned long addr = tcp->u_arg[0]; + const kernel_ulong_t addr = tcp->u_arg[0]; const unsigned int nfds = tcp->u_arg[1]; struct pollfd fds; @@ -60,16 +60,17 @@ decode_poll_entering(struct tcb *tcp) } static int -decode_poll_exiting(struct tcb *tcp, const long pts) +decode_poll_exiting(struct tcb *const tcp, const kernel_ulong_t pts) { struct pollfd fds; const unsigned int nfds = tcp->u_arg[1]; const unsigned long size = sizeof(fds) * nfds; - const unsigned long start = tcp->u_arg[0]; - const unsigned long end = start + size; - const unsigned long max_printed = - abbrev(tcp) ? max_strlen : (unsigned int) -1; - unsigned long printed, cur; + const kernel_ulong_t start = tcp->u_arg[0]; + const kernel_ulong_t end = start + size; + kernel_ulong_t cur; + const unsigned int max_printed = + abbrev(tcp) ? max_strlen : -1U; + unsigned int printed; static char outstr[1024]; char *outptr; @@ -94,7 +95,7 @@ decode_poll_exiting(struct tcb *tcp, const long pts) *outptr++ = '['; else outptr = stpcpy(outptr, ", "); - outptr += sprintf(outptr, "%#lx", cur); + outptr += sprintf(outptr, "%#" PRI_klx, cur); break; } if (!fds.revents) @@ -175,9 +176,9 @@ SYS_FUNC(ppoll) print_timespec(tcp, tcp->u_arg[2]); tprints(", "); - /* NB: kernel requires arg[4] == NSIG / 8 */ + /* NB: kernel requires arg[4] == NSIG_BYTES */ print_sigset_addr_len(tcp, tcp->u_arg[3], tcp->u_arg[4]); - tprintf(", %lu", tcp->u_arg[4]); + tprintf(", %" PRI_klu, tcp->u_arg[4]); return 0; } else { diff --git a/prctl.c b/prctl.c index cd51d4c0c..6779ad510 100644 --- a/prctl.c +++ b/prctl.c @@ -30,10 +30,12 @@ #include "defs.h" -#include +#include #include "xlat/prctl_options.h" #include "xlat/pr_cap_ambient.h" +#include "xlat/pr_dumpable.h" +#include "xlat/pr_fp_mode.h" #include "xlat/pr_mce_kill.h" #include "xlat/pr_mce_kill_policy.h" #include "xlat/pr_set_mm.h" @@ -68,19 +70,28 @@ print_prctl_args(struct tcb *tcp, const unsigned int first) unsigned int i; for (i = first; i < tcp->s_ent->nargs; ++i) - tprintf(", %#lx", tcp->u_arg[i]); + tprintf(", %#" PRI_klx, tcp->u_arg[i]); } SYS_FUNC(prctl) { const unsigned int option = tcp->u_arg[0]; + const kernel_ulong_t arg2 = tcp->u_arg[1]; + const kernel_ulong_t arg3 = tcp->u_arg[2]; + /* + * PR_SET_VMA is the only command which actually uses these arguments + * currently, and it is available only on Android for now. + */ +#ifdef __ANDROID__ + const kernel_ulong_t arg4 = tcp->u_arg[3]; + const kernel_ulong_t arg5 = tcp->u_arg[4]; +#endif unsigned int i; if (entering(tcp)) printxval(prctl_options, option, "PR_???"); switch (option) { - case PR_GET_DUMPABLE: case PR_GET_KEEPCAPS: case PR_GET_SECCOMP: case PR_GET_TIMERSLACK: @@ -94,24 +105,33 @@ SYS_FUNC(prctl) if (entering(tcp)) tprints(", "); else - printnum_int(tcp, tcp->u_arg[1], "%u"); + printnum_int(tcp, arg2, "%u"); break; - case PR_GET_NAME: + case PR_GET_DUMPABLE: if (entering(tcp)) + break; + if (syserror(tcp)) + return 0; + tcp->auxstr = xlookup(pr_dumpable, (kernel_ulong_t) tcp->u_rval); + return RVAL_STR; + + case PR_GET_NAME: + if (entering(tcp)) { tprints(", "); - else { + } else { if (syserror(tcp)) - printaddr(tcp->u_arg[1]); + printaddr(arg2); else - printstr(tcp, tcp->u_arg[1], -1); + printstr_ex(tcp, arg2, TASK_COMM_LEN, + QUOTE_0_TERMINATED); } break; case PR_GET_PDEATHSIG: - if (entering(tcp)) + if (entering(tcp)) { tprints(", "); - else if (!umove_or_printaddr(tcp, tcp->u_arg[1], &i)) { + } else if (!umove_or_printaddr(tcp, arg2, &i)) { tprints("["); tprints(signame(i)); tprints("]"); @@ -124,20 +144,20 @@ SYS_FUNC(prctl) if (syserror(tcp) || tcp->u_rval == 0) return 0; tcp->auxstr = sprintflags("", secbits, - (unsigned long) tcp->u_rval); + (kernel_ulong_t) tcp->u_rval); return RVAL_STR; case PR_GET_TID_ADDRESS: if (entering(tcp)) tprints(", "); else - printnum_ptr(tcp, tcp->u_arg[1]); + printnum_kptr(tcp, arg2); break; case PR_GET_TSC: - if (entering(tcp)) + if (entering(tcp)) { tprints(", "); - else if (!umove_or_printaddr(tcp, tcp->u_arg[1], &i)) { + } else if (!umove_or_printaddr(tcp, arg2, &i)) { tprints("["); printxval(pr_tsc, i, "PR_TSC_???"); tprints("]"); @@ -145,46 +165,59 @@ SYS_FUNC(prctl) break; case PR_GET_UNALIGN: - if (entering(tcp)) + if (entering(tcp)) { tprints(", "); - else if (!umove_or_printaddr(tcp, tcp->u_arg[1], &i)) { + } else if (!umove_or_printaddr(tcp, arg2, &i)) { tprints("["); printflags(pr_unalign_flags, i, "PR_UNALIGN_???"); tprints("]"); } break; + case PR_GET_FP_MODE: + if (entering(tcp)) + break; + if (syserror(tcp) || tcp->u_rval == 0) + return 0; + tcp->auxstr = sprintflags("", pr_fp_mode, + (kernel_ulong_t) tcp->u_rval); + return RVAL_STR; + /* PR_TASK_PERF_EVENTS_* take no arguments. */ case PR_TASK_PERF_EVENTS_DISABLE: case PR_TASK_PERF_EVENTS_ENABLE: return RVAL_DECODED; case PR_SET_CHILD_SUBREAPER: - case PR_SET_DUMPABLE: case PR_SET_ENDIAN: case PR_SET_FPEMU: case PR_SET_FPEXC: case PR_SET_KEEPCAPS: case PR_SET_TIMING: - tprintf(", %lu", tcp->u_arg[1]); + tprintf(", %" PRI_klu, arg2); + return RVAL_DECODED; + + case PR_SET_DUMPABLE: + tprints(", "); + printxval64(pr_dumpable, arg2, "SUID_DUMP_???"); return RVAL_DECODED; case PR_CAPBSET_DROP: case PR_CAPBSET_READ: tprints(", "); - printxval_long(cap, tcp->u_arg[1], "CAP_???"); + printxval64(cap, arg2, "CAP_???"); return RVAL_DECODED; case PR_CAP_AMBIENT: tprints(", "); - printxval_long(pr_cap_ambient, tcp->u_arg[1], + printxval64(pr_cap_ambient, arg2, "PR_CAP_AMBIENT_???"); - switch (tcp->u_arg[1]) { + switch (arg2) { case PR_CAP_AMBIENT_RAISE: case PR_CAP_AMBIENT_LOWER: case PR_CAP_AMBIENT_IS_SET: tprints(", "); - printxval_long(cap, tcp->u_arg[2], "CAP_???"); + printxval64(cap, arg3, "CAP_???"); print_prctl_args(tcp, 3); break; default: @@ -195,19 +228,20 @@ SYS_FUNC(prctl) case PR_MCE_KILL: tprints(", "); - printxval_long(pr_mce_kill, tcp->u_arg[1], "PR_MCE_KILL_???"); + printxval64(pr_mce_kill, arg2, "PR_MCE_KILL_???"); tprints(", "); - if (PR_MCE_KILL_SET == tcp->u_arg[1]) - printxval_long(pr_mce_kill_policy, tcp->u_arg[2], - "PR_MCE_KILL_???"); + if (PR_MCE_KILL_SET == arg2) + printxval64(pr_mce_kill_policy, arg3, + "PR_MCE_KILL_???"); else - tprintf("%#lx", tcp->u_arg[2]); + tprintf("%#" PRI_klx, arg3); print_prctl_args(tcp, 3); return RVAL_DECODED; case PR_SET_NAME: tprints(", "); - printstr(tcp, tcp->u_arg[1], TASK_COMM_LEN); + printstr_ex(tcp, arg2, TASK_COMM_LEN - 1, + QUOTE_0_TERMINATED); return RVAL_DECODED; #ifdef __ANDROID__ @@ -215,10 +249,10 @@ SYS_FUNC(prctl) # define PR_SET_VMA_ANON_NAME 0 # endif case PR_SET_VMA: - if (tcp->u_arg[1] == PR_SET_VMA_ANON_NAME) { - tprintf(", PR_SET_VMA_ANON_NAME, %#lx", tcp->u_arg[2]); - tprintf(", %lu, ", tcp->u_arg[3]); - printstr(tcp, tcp->u_arg[4], -1); + if (arg2 == PR_SET_VMA_ANON_NAME) { + tprintf(", PR_SET_VMA_ANON_NAME, %#" PRI_klx, arg3); + tprintf(", %" PRI_klu ", ", arg4); + printstr(tcp, arg5); } else { /* There are no other sub-options now, but there * might be in future... */ @@ -229,35 +263,35 @@ SYS_FUNC(prctl) case PR_SET_MM: tprints(", "); - printxval(pr_set_mm, tcp->u_arg[1], "PR_SET_MM_???"); + printxval(pr_set_mm, arg2, "PR_SET_MM_???"); print_prctl_args(tcp, 2); return RVAL_DECODED; case PR_SET_PDEATHSIG: tprints(", "); - if ((unsigned long) tcp->u_arg[1] > 128) - tprintf("%lu", tcp->u_arg[1]); + if (arg2 > 128) + tprintf("%" PRI_klu, arg2); else - tprints(signame(tcp->u_arg[1])); + tprints(signame(arg2)); return RVAL_DECODED; case PR_SET_PTRACER: tprints(", "); - if (tcp->u_arg[1] == -1) + if ((int) arg2 == -1) tprints("PR_SET_PTRACER_ANY"); else - tprintf("%lu", tcp->u_arg[1]); + tprintf("%" PRI_klu, arg2); return RVAL_DECODED; case PR_SET_SECCOMP: tprints(", "); - printxval_long(seccomp_mode, tcp->u_arg[1], - "SECCOMP_MODE_???"); - if (SECCOMP_MODE_STRICT == tcp->u_arg[1]) + printxval64(seccomp_mode, arg2, + "SECCOMP_MODE_???"); + if (SECCOMP_MODE_STRICT == arg2) return RVAL_DECODED; - if (SECCOMP_MODE_FILTER == tcp->u_arg[1]) { + if (SECCOMP_MODE_FILTER == arg2) { tprints(", "); - print_seccomp_filter(tcp, tcp->u_arg[2]); + print_seccomp_filter(tcp, arg3); return RVAL_DECODED; } print_prctl_args(tcp, 2); @@ -265,26 +299,26 @@ SYS_FUNC(prctl) case PR_SET_SECUREBITS: tprints(", "); - printflags_long(secbits, tcp->u_arg[1], "SECBIT_???"); + printflags64(secbits, arg2, "SECBIT_???"); return RVAL_DECODED; case PR_SET_TIMERSLACK: - tprintf(", %ld", tcp->u_arg[1]); + tprintf(", %" PRI_kld, arg2); return RVAL_DECODED; case PR_SET_TSC: tprints(", "); - printxval(pr_tsc, tcp->u_arg[1], "PR_TSC_???"); + printxval(pr_tsc, arg2, "PR_TSC_???"); return RVAL_DECODED; case PR_SET_UNALIGN: tprints(", "); - printflags(pr_unalign_flags, tcp->u_arg[1], "PR_UNALIGN_???"); + printflags(pr_unalign_flags, arg2, "PR_UNALIGN_???"); return RVAL_DECODED; case PR_SET_NO_NEW_PRIVS: case PR_SET_THP_DISABLE: - tprintf(", %lu", tcp->u_arg[1]); + tprintf(", %" PRI_klu, arg2); print_prctl_args(tcp, 2); return RVAL_DECODED; @@ -296,9 +330,14 @@ SYS_FUNC(prctl) if (syserror(tcp)) return 0; tcp->auxstr = xlookup(pr_mce_kill_policy, - (unsigned long) tcp->u_rval); + (kernel_ulong_t) tcp->u_rval); return tcp->auxstr ? RVAL_STR : RVAL_UDECIMAL; + case PR_SET_FP_MODE: + tprints(", "); + printflags(pr_fp_mode, arg2, "PR_FP_MODE_???"); + return RVAL_DECODED; + case PR_GET_NO_NEW_PRIVS: case PR_GET_THP_DISABLE: case PR_MPX_DISABLE_MANAGEMENT: @@ -317,6 +356,7 @@ SYS_FUNC(prctl) SYS_FUNC(arch_prctl) { const unsigned int option = tcp->u_arg[0]; + const kernel_ulong_t addr = tcp->u_arg[1]; if (entering(tcp)) printxval(archvals, option, "ARCH_???"); @@ -327,11 +367,11 @@ SYS_FUNC(arch_prctl) if (entering(tcp)) tprints(", "); else - printnum_ptr(tcp, tcp->u_arg[1]); + printnum_ptr(tcp, addr); return 0; } - tprintf(", %#lx", tcp->u_arg[1]); + tprintf(", %#" PRI_klx, addr); return RVAL_DECODED; } #endif /* X86_64 || X32 */ diff --git a/print_dev_t.c b/print_dev_t.c new file mode 100644 index 000000000..9b62f8421 --- /dev/null +++ b/print_dev_t.c @@ -0,0 +1,37 @@ +/* + * Device number printing routine. + * + * Copyright (c) 2016 The strace developers. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include + +void +print_dev_t(const unsigned long long dev) +{ + tprintf("makedev(%u, %u)", major(dev), minor(dev)); +} diff --git a/print_mq_attr.c b/print_mq_attr.c index 18078346a..b5f9c1349 100644 --- a/print_mq_attr.c +++ b/print_mq_attr.c @@ -39,19 +39,28 @@ typedef struct mq_attr mq_attr_t; typedef struct mq_attr mq_attr_t; #endif +#include "xlat/mq_attr_flags.h" + #include MPERS_DEFS -MPERS_PRINTER_DECL(void, printmqattr, struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(void, printmqattr, struct tcb *const tcp, + const kernel_ulong_t addr, const bool decode_flags) { #if defined HAVE_MQUEUE_H || defined HAVE_LINUX_MQUEUE_H mq_attr_t attr; if (umove_or_printaddr(tcp, addr, &attr)) return; tprints("{mq_flags="); - tprint_open_modes(attr.mq_flags); - tprintf(", mq_maxmsg=%ld, mq_msgsize=%ld, mq_curmsg=%ld}", - (long) attr.mq_maxmsg, (long) attr.mq_msgsize, - (long) attr.mq_curmsgs); + if (decode_flags) + printflags64(mq_attr_flags, + zero_extend_signed_to_ull(attr.mq_flags), + "/* O_??? */"); + else + tprintf("%#llx", zero_extend_signed_to_ull(attr.mq_flags)); + tprintf(", mq_maxmsg=%lld, mq_msgsize=%lld, mq_curmsgs=%lld}", + sign_extend_unsigned_to_ll(attr.mq_maxmsg), + sign_extend_unsigned_to_ll(attr.mq_msgsize), + sign_extend_unsigned_to_ll(attr.mq_curmsgs)); #else printaddr(addr); #endif diff --git a/print_msgbuf.c b/print_msgbuf.c index 68d8741be..348a89143 100644 --- a/print_msgbuf.c +++ b/print_msgbuf.c @@ -38,15 +38,15 @@ typedef struct msgbuf msgbuf_t; #include MPERS_DEFS -MPERS_PRINTER_DECL(void, tprint_msgbuf, - struct tcb *tcp, const long addr, const unsigned long count) +MPERS_PRINTER_DECL(void, tprint_msgbuf, struct tcb *const tcp, + const kernel_ulong_t addr, const kernel_ulong_t count) { msgbuf_t msg; if (!umove_or_printaddr(tcp, addr, &msg)) { - tprintf("{%lu, ", (long) msg.mtype); - printstr(tcp, addr + sizeof(msg.mtype), count); + tprintf("{%" PRI_kld ", ", (kernel_long_t) msg.mtype); + printstrn(tcp, addr + sizeof(msg.mtype), count); tprints("}"); } - tprintf(", %lu, ", count); + tprintf(", %" PRI_klu ", ", count); } diff --git a/print_sg_req_info.c b/print_sg_req_info.c new file mode 100644 index 000000000..9f0249ec5 --- /dev/null +++ b/print_sg_req_info.c @@ -0,0 +1,74 @@ +/* + * Decode struct sg_req_info. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_SCSI_SG_H + +#include DEF_MPERS_TYPE(struct_sg_req_info) + +# include + +typedef struct sg_req_info struct_sg_req_info; + +#endif /* HAVE_SCSI_SG_H */ + +#include MPERS_DEFS + +#ifdef HAVE_SCSI_SG_H + +MPERS_PRINTER_DECL(int, decode_sg_req_info, + struct tcb *const tcp, const kernel_ulong_t arg) +{ + struct_sg_req_info info; + + if (entering(tcp)) + return 0; + + tprints(", "); + if (!umove_or_printaddr(tcp, arg, &info)) { + tprintf("{req_state=%hhd" + ", orphan=%hhd" + ", sg_io_owned=%hhd" + ", problem=%hhd" + ", pack_id=%d" + ", usr_ptr=", + info.req_state, + info.orphan, + info.sg_io_owned, + info.problem, + info.pack_id); + printaddr(ptr_to_kulong(info.usr_ptr)); + tprintf(", duration=%u}", info.duration); + } + + return RVAL_DECODED | 1; +} + +#endif /* HAVE_SCSI_SG_H */ diff --git a/print_sigevent.c b/print_sigevent.c index caf1fdfe2..cfdbc087c 100644 --- a/print_sigevent.c +++ b/print_sigevent.c @@ -35,7 +35,8 @@ #include #include "xlat/sigev_value.h" -MPERS_PRINTER_DECL(void, print_sigevent, struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(void, print_sigevent, + struct tcb *const tcp, const kernel_ulong_t addr) { struct_sigevent sev; @@ -44,9 +45,9 @@ MPERS_PRINTER_DECL(void, print_sigevent, struct tcb *tcp, const long addr) tprints("{"); if (sev.sigev_value.sival_ptr) { - tprintf("sigev_value={int=%d, ptr=", + tprintf("sigev_value={sival_int=%d, sival_ptr=", sev.sigev_value.sival_int); - printaddr((unsigned long) sev.sigev_value.sival_ptr); + printaddr(sev.sigev_value.sival_ptr); tprints("}, "); } diff --git a/print_statfs.c b/print_statfs.c index 2661d0784..c98ff8fed 100644 --- a/print_statfs.c +++ b/print_statfs.c @@ -34,11 +34,7 @@ static void print_statfs_type(const char *const prefix, const unsigned long long magic) { tprints(prefix); - const char *s = xlat_search(fsmagic, ARRAY_SIZE(fsmagic), magic); - if (s) - tprints(s); - else - tprintf("%#llx", magic); + printxval_search(fsmagic, magic, NULL); } #if defined HAVE_STRUCT_STATFS_F_FLAGS || defined HAVE_STRUCT_STATFS64_F_FLAGS @@ -60,7 +56,7 @@ print_statfs_number(const char *const prefix, const unsigned long long number) } void -print_struct_statfs(struct tcb *tcp, const long addr) +print_struct_statfs(struct tcb *const tcp, const kernel_ulong_t addr) { #ifdef HAVE_STRUCT_STATFS struct strace_statfs b; @@ -77,9 +73,9 @@ print_struct_statfs(struct tcb *tcp, const long addr) print_statfs_number(", f_ffree=", b.f_ffree); # if defined HAVE_STRUCT_STATFS_F_FSID_VAL \ || defined HAVE_STRUCT_STATFS_F_FSID___VAL - print_statfs_number(", f_fsid={", b.f_fsid[0]); + print_statfs_number(", f_fsid={val=[", b.f_fsid[0]); print_statfs_number(", ", b.f_fsid[1]); - tprints("}"); + tprints("]}"); # endif print_statfs_number(", f_namelen=", b.f_namelen); # ifdef HAVE_STRUCT_STATFS_F_FRSIZE @@ -95,7 +91,8 @@ print_struct_statfs(struct tcb *tcp, const long addr) } void -print_struct_statfs64(struct tcb *tcp, const long addr, const unsigned long size) +print_struct_statfs64(struct tcb *const tcp, const kernel_ulong_t addr, + const kernel_ulong_t size) { #ifdef HAVE_STRUCT_STATFS64 struct strace_statfs b; @@ -112,9 +109,9 @@ print_struct_statfs64(struct tcb *tcp, const long addr, const unsigned long size print_statfs_number(", f_ffree=", b.f_ffree); # if defined HAVE_STRUCT_STATFS64_F_FSID_VAL \ || defined HAVE_STRUCT_STATFS64_F_FSID___VAL - print_statfs_number(", f_fsid={", b.f_fsid[0]); + print_statfs_number(", f_fsid={val=[", b.f_fsid[0]); print_statfs_number(", ", b.f_fsid[1]); - tprints("}"); + tprints("]}"); # endif print_statfs_number(", f_namelen=", b.f_namelen); # ifdef HAVE_STRUCT_STATFS64_F_FRSIZE diff --git a/print_struct_stat.c b/print_struct_stat.c index 7b23ec8a8..7e9e23380 100644 --- a/print_struct_stat.c +++ b/print_struct_stat.c @@ -34,7 +34,6 @@ #include "defs.h" #include -#include #include "stat.h" void @@ -42,10 +41,9 @@ print_struct_stat(struct tcb *tcp, const struct strace_stat *const st) { tprints("{"); if (!abbrev(tcp)) { - tprintf("st_dev=makedev(%u, %u), st_ino=%llu, st_mode=", - (unsigned int) major(st->dev), - (unsigned int) minor(st->dev), - st->ino); + tprints("st_dev="); + print_dev_t(st->dev); + tprintf(", st_ino=%llu, st_mode=", st->ino); print_symbolic_mode_t(st->mode); tprintf(", st_nlink=%llu, st_uid=%llu, st_gid=%llu", st->nlink, st->uid, st->gid); @@ -58,9 +56,8 @@ print_struct_stat(struct tcb *tcp, const struct strace_stat *const st) switch (st->mode & S_IFMT) { case S_IFCHR: case S_IFBLK: - tprintf(", st_rdev=makedev(%u, %u)", - (unsigned int) major(st->rdev), - (unsigned int) minor(st->rdev)); + tprints(", st_rdev="); + print_dev_t(st->rdev); break; default: tprintf(", st_size=%llu", st->size); diff --git a/print_time.c b/print_time.c index 500ce8e5b..82d64fa20 100644 --- a/print_time.c +++ b/print_time.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,171 +28,9 @@ #include "defs.h" #include DEF_MPERS_TYPE(time_t) -#include DEF_MPERS_TYPE(timespec_t) -#include DEF_MPERS_TYPE(timeval_t) - -typedef struct timespec timespec_t; -typedef struct timeval timeval_t; #include MPERS_DEFS -#ifndef UTIME_NOW -# define UTIME_NOW ((1l << 30) - 1l) -#endif -#ifndef UTIME_OMIT -# define UTIME_OMIT ((1l << 30) - 2l) -#endif - -static const char time_fmt[] = "{%jd, %jd}"; - -static void -print_timespec_t(const timespec_t *t) -{ - tprintf(time_fmt, (intmax_t) t->tv_sec, (intmax_t) t->tv_nsec); -} - -static void -print_timespec_t_utime(const timespec_t *t) -{ - switch (t->tv_nsec) { - case UTIME_NOW: - tprints("UTIME_NOW"); - break; - case UTIME_OMIT: - tprints("UTIME_OMIT"); - break; - default: - print_timespec_t(t); - break; - } -} - -static void -print_timeval_t(const timeval_t *t) -{ - tprintf(time_fmt, (intmax_t) t->tv_sec, (intmax_t) t->tv_usec); -} - -MPERS_PRINTER_DECL(void, print_timespec, - struct tcb *tcp, const long addr) -{ - timespec_t t; - - if (umove_or_printaddr(tcp, addr, &t)) - return; - - print_timespec_t(&t); -} - -MPERS_PRINTER_DECL(const char *, sprint_timespec, - struct tcb *tcp, const long addr) -{ - timespec_t t; - static char buf[sizeof(time_fmt) + 3 * sizeof(t)]; - - if (!addr) { - strcpy(buf, "NULL"); - } else if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)) || - umove(tcp, addr, &t)) { - snprintf(buf, sizeof(buf), "%#lx", addr); - } else { - snprintf(buf, sizeof(buf), time_fmt, - (intmax_t) t.tv_sec, (intmax_t) t.tv_nsec); - } - - return buf; -} - -MPERS_PRINTER_DECL(void, print_timespec_utime_pair, - struct tcb *tcp, const long addr) -{ - timespec_t t[2]; - - if (umove_or_printaddr(tcp, addr, &t)) - return; - - tprints("["); - print_timespec_t_utime(&t[0]); - tprints(", "); - print_timespec_t_utime(&t[1]); - tprints("]"); -} - -MPERS_PRINTER_DECL(void, print_itimerspec, - struct tcb *tcp, const long addr) -{ - timespec_t t[2]; - - if (umove_or_printaddr(tcp, addr, &t)) - return; - - tprints("{it_interval="); - print_timespec_t(&t[0]); - tprints(", it_value="); - print_timespec_t(&t[1]); - tprints("}"); -} - -MPERS_PRINTER_DECL(void, print_timeval, - struct tcb *tcp, const long addr) -{ - timeval_t t; - - if (umove_or_printaddr(tcp, addr, &t)) - return; - - print_timeval_t(&t); -} - -MPERS_PRINTER_DECL(void, print_timeval_pair, - struct tcb *tcp, const long addr) -{ - timeval_t t[2]; - - if (umove_or_printaddr(tcp, addr, &t)) - return; - - tprints("["); - print_timeval_t(&t[0]); - tprints(", "); - print_timeval_t(&t[1]); - tprints("]"); -} - -MPERS_PRINTER_DECL(const char *, sprint_timeval, - struct tcb *tcp, const long addr) -{ - timeval_t t; - static char buf[sizeof(time_fmt) + 3 * sizeof(t)]; - - if (!addr) { - strcpy(buf, "NULL"); - } else if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)) || - umove(tcp, addr, &t)) { - snprintf(buf, sizeof(buf), "%#lx", addr); - } else { - snprintf(buf, sizeof(buf), time_fmt, - (intmax_t) t.tv_sec, (intmax_t) t.tv_usec); - } - - return buf; -} - -MPERS_PRINTER_DECL(void, print_itimerval, - struct tcb *tcp, const long addr) -{ - timeval_t t[2]; - - if (umove_or_printaddr(tcp, addr, &t)) - return; - - tprints("{it_interval="); - print_timeval_t(&t[0]); - tprints(", it_value="); - print_timeval_t(&t[1]); - tprints("}"); -} - SYS_FUNC(time) { if (exiting(tcp)) { @@ -204,77 +42,3 @@ SYS_FUNC(time) return 0; } - -#ifdef ALPHA - -typedef struct { - int tv_sec, tv_usec; -} timeval32_t; - -static void -print_timeval32_t(const timeval32_t *t) -{ - tprintf(time_fmt, (intmax_t) t->tv_sec, (intmax_t) t->tv_usec); -} - -void -print_timeval32(struct tcb *tcp, const long addr) -{ - timeval32_t t; - - if (umove_or_printaddr(tcp, addr, &t)) - return; - - print_timeval32_t(&t); -} - -void -print_timeval32_pair(struct tcb *tcp, const long addr) -{ - timeval32_t t[2]; - - if (umove_or_printaddr(tcp, addr, &t)) - return; - - tprints("["); - print_timeval32_t(&t[0]); - tprints(", "); - print_timeval32_t(&t[1]); - tprints("]"); -} - -void -print_itimerval32(struct tcb *tcp, const long addr) -{ - timeval32_t t[2]; - - if (umove_or_printaddr(tcp, addr, &t)) - return; - - tprints("{it_interval="); - print_timeval32_t(&t[0]); - tprints(", it_value="); - print_timeval32_t(&t[1]); - tprints("}"); -} - -const char * -sprint_timeval32(struct tcb *tcp, const long addr) -{ - timeval32_t t; - static char buf[sizeof(time_fmt) + 3 * sizeof(t)]; - - if (!addr) { - strcpy(buf, "NULL"); - } else if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)) || - umove(tcp, addr, &t)) { - snprintf(buf, sizeof(buf), "%#lx", addr); - } else { - snprintf(buf, sizeof(buf), time_fmt, - (intmax_t) t.tv_sec, (intmax_t) t.tv_usec); - } - - return buf; -} - -#endif /* ALPHA */ diff --git a/print_timespec.c b/print_timespec.c new file mode 100644 index 000000000..76c70edbe --- /dev/null +++ b/print_timespec.c @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include DEF_MPERS_TYPE(timespec_t) + +typedef struct timespec timespec_t; + +#include MPERS_DEFS + +#ifndef UTIME_NOW +# define UTIME_NOW ((1l << 30) - 1l) +#endif +#ifndef UTIME_OMIT +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +static const char timespec_fmt[] = "{tv_sec=%jd, tv_nsec=%jd}"; + +static void +print_timespec_t(const timespec_t *t) +{ + tprintf(timespec_fmt, (intmax_t) t->tv_sec, (intmax_t) t->tv_nsec); +} + +static void +print_timespec_t_utime(const timespec_t *t) +{ + switch (t->tv_nsec) { + case UTIME_NOW: + tprints("UTIME_NOW"); + break; + case UTIME_OMIT: + tprints("UTIME_OMIT"); + break; + default: + print_timespec_t(t); + break; + } +} + +MPERS_PRINTER_DECL(void, print_timespec, + struct tcb *const tcp, const kernel_ulong_t addr) +{ + timespec_t t; + + if (umove_or_printaddr(tcp, addr, &t)) + return; + + print_timespec_t(&t); +} + +MPERS_PRINTER_DECL(const char *, sprint_timespec, + struct tcb *const tcp, const kernel_ulong_t addr) +{ + timespec_t t; + static char buf[sizeof(timespec_fmt) + 3 * sizeof(t)]; + + if (!addr) { + strcpy(buf, "NULL"); + } else if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)) || + umove(tcp, addr, &t)) { + snprintf(buf, sizeof(buf), "%#" PRI_klx, addr); + } else { + snprintf(buf, sizeof(buf), timespec_fmt, + (intmax_t) t.tv_sec, (intmax_t) t.tv_nsec); + } + + return buf; +} + +MPERS_PRINTER_DECL(void, print_timespec_utime_pair, + struct tcb *const tcp, const kernel_ulong_t addr) +{ + timespec_t t[2]; + + if (umove_or_printaddr(tcp, addr, &t)) + return; + + tprints("["); + print_timespec_t_utime(&t[0]); + tprints(", "); + print_timespec_t_utime(&t[1]); + tprints("]"); +} + +MPERS_PRINTER_DECL(void, print_itimerspec, + struct tcb *const tcp, const kernel_ulong_t addr) +{ + timespec_t t[2]; + + if (umove_or_printaddr(tcp, addr, &t)) + return; + + tprints("{it_interval="); + print_timespec_t(&t[0]); + tprints(", it_value="); + print_timespec_t(&t[1]); + tprints("}"); +} diff --git a/print_timeval.c b/print_timeval.c new file mode 100644 index 000000000..5c2867541 --- /dev/null +++ b/print_timeval.c @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#include DEF_MPERS_TYPE(timeval_t) + +typedef struct timeval timeval_t; + +#include MPERS_DEFS + +static const char timeval_fmt[] = "{tv_sec=%jd, tv_usec=%jd}"; + +static void +print_timeval_t(const timeval_t *t) +{ + tprintf(timeval_fmt, (intmax_t) t->tv_sec, (intmax_t) t->tv_usec); +} + +MPERS_PRINTER_DECL(void, print_struct_timeval, const void *arg) +{ + print_timeval_t(arg); +} + +MPERS_PRINTER_DECL(void, print_timeval, + struct tcb *const tcp, const kernel_ulong_t addr) +{ + timeval_t t; + + if (umove_or_printaddr(tcp, addr, &t)) + return; + + print_timeval_t(&t); +} + +static bool +print_timeval_item(struct tcb *tcp, void *elem_buf, size_t size, void *data) +{ + timeval_t *t = elem_buf; + + print_timeval_t(t); + + return true; +} + +MPERS_PRINTER_DECL(void, print_timeval_pair, + struct tcb *const tcp, const kernel_ulong_t addr) +{ + timeval_t t; + + print_array(tcp, addr, 2, &t, sizeof(t), umoven_or_printaddr, + print_timeval_item, NULL); +} + +MPERS_PRINTER_DECL(const char *, sprint_timeval, + struct tcb *const tcp, const kernel_ulong_t addr) +{ + timeval_t t; + static char buf[sizeof(timeval_fmt) + 3 * sizeof(t)]; + + if (!addr) { + strcpy(buf, "NULL"); + } else if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)) || + umove(tcp, addr, &t)) { + snprintf(buf, sizeof(buf), "%#" PRI_klx, addr); + } else { + snprintf(buf, sizeof(buf), timeval_fmt, + (intmax_t) t.tv_sec, (intmax_t) t.tv_usec); + } + + return buf; +} + +MPERS_PRINTER_DECL(void, print_itimerval, + struct tcb *const tcp, const kernel_ulong_t addr) +{ + timeval_t t[2]; + + if (umove_or_printaddr(tcp, addr, &t)) + return; + + tprints("{it_interval="); + print_timeval_t(&t[0]); + tprints(", it_value="); + print_timeval_t(&t[1]); + tprints("}"); +} + +#ifdef ALPHA + +void +print_timeval32_t(const timeval32_t *t) +{ + tprintf(timeval_fmt, (intmax_t) t->tv_sec, (intmax_t) t->tv_usec); +} + +void +print_timeval32(struct tcb *const tcp, const kernel_ulong_t addr) +{ + timeval32_t t; + + if (umove_or_printaddr(tcp, addr, &t)) + return; + + print_timeval32_t(&t); +} + +void +print_timeval32_pair(struct tcb *const tcp, const kernel_ulong_t addr) +{ + timeval32_t t[2]; + + if (umove_or_printaddr(tcp, addr, &t)) + return; + + tprints("["); + print_timeval32_t(&t[0]); + tprints(", "); + print_timeval32_t(&t[1]); + tprints("]"); +} + +void +print_itimerval32(struct tcb *const tcp, const kernel_ulong_t addr) +{ + timeval32_t t[2]; + + if (umove_or_printaddr(tcp, addr, &t)) + return; + + tprints("{it_interval="); + print_timeval32_t(&t[0]); + tprints(", it_value="); + print_timeval32_t(&t[1]); + tprints("}"); +} + +const char * +sprint_timeval32(struct tcb *const tcp, const kernel_ulong_t addr) +{ + timeval32_t t; + static char buf[sizeof(timeval_fmt) + 3 * sizeof(t)]; + + if (!addr) { + strcpy(buf, "NULL"); + } else if (!verbose(tcp) || (exiting(tcp) && syserror(tcp)) || + umove(tcp, addr, &t)) { + snprintf(buf, sizeof(buf), "%#" PRI_klx, addr); + } else { + snprintf(buf, sizeof(buf), timeval_fmt, + (intmax_t) t.tv_sec, (intmax_t) t.tv_usec); + } + + return buf; +} + +#endif /* ALPHA */ diff --git a/print_timex.c b/print_timex.c index ad6a7114c..5d0c478e6 100644 --- a/print_timex.c +++ b/print_timex.c @@ -40,7 +40,8 @@ typedef struct timex struct_timex; #include "xlat/adjtimex_modes.h" #include "xlat/adjtimex_status.h" -MPERS_PRINTER_DECL(int, print_timex, struct tcb *tcp, const long addr) +MPERS_PRINTER_DECL(int, print_timex, + struct tcb *const tcp, const kernel_ulong_t addr) { struct_timex tx; @@ -53,11 +54,10 @@ MPERS_PRINTER_DECL(int, print_timex, struct tcb *tcp, const long addr) (intmax_t) tx.offset, (intmax_t) tx.freq, (uintmax_t) tx.maxerror, (uintmax_t) tx.esterror); printflags(adjtimex_status, tx.status, "STA_???"); - tprintf(", constant=%jd, precision=%ju, tolerance=%jd", + tprintf(", constant=%jd, precision=%ju, tolerance=%jd, time=", (intmax_t) tx.constant, (uintmax_t) tx.precision, (intmax_t) tx.tolerance); - tprintf(", time={%jd, %jd}", - (intmax_t) tx.time.tv_sec, (intmax_t) tx.time.tv_usec); + MPERS_FUNC_NAME(print_struct_timeval)(&tx.time); tprintf(", tick=%jd, ppsfreq=%jd, jitter=%jd", (intmax_t) tx.tick, (intmax_t) tx.ppsfreq, (intmax_t) tx.jitter); tprintf(", shift=%d, stabil=%jd, jitcnt=%jd", diff --git a/printers.h b/printers.h index 5e3c84b1d..7e67adea1 100644 --- a/printers.h +++ b/printers.h @@ -1,99 +1,114 @@ -/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_stat.c.mpers.i fetch_struct_stat64.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sigaltstack.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ +/* Generated by Makefile from block.c.mpers.i btrfs.c.mpers.i dirent.c.mpers.i evdev.c.mpers.i fetch_seccomp_fprog.c.mpers.i fetch_struct_flock.c.mpers.i fetch_struct_mmsghdr.c.mpers.i fetch_struct_msghdr.c.mpers.i fetch_struct_stat.c.mpers.i fetch_struct_stat64.c.mpers.i fetch_struct_statfs.c.mpers.i hdio.c.mpers.i ipc_msgctl.c.mpers.i ipc_shmctl.c.mpers.i loop.c.mpers.i mtd.c.mpers.i print_mq_attr.c.mpers.i print_msgbuf.c.mpers.i print_sg_req_info.c.mpers.i print_sigevent.c.mpers.i print_time.c.mpers.i print_timespec.c.mpers.i print_timeval.c.mpers.i print_timex.c.mpers.i printrusage.c.mpers.i printsiginfo.c.mpers.i rtc.c.mpers.i sg_io_v3.c.mpers.i sigaltstack.c.mpers.i sock.c.mpers.i sysinfo.c.mpers.i times.c.mpers.i ustat.c.mpers.i utime.c.mpers.i v4l2.c.mpers.i; do not edit. */ typedef struct { - int (*block_ioctl)(struct tcb *tcp, const unsigned int code, const long arg); + int (*block_ioctl)(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); #define block_ioctl MPERS_PRINTER_NAME(block_ioctl) - int (*btrfs_ioctl)(struct tcb *tcp, const unsigned int code, const long arg); + int (*btrfs_ioctl)(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); #define btrfs_ioctl MPERS_PRINTER_NAME(btrfs_ioctl) - int (*evdev_ioctl)(struct tcb *tcp, const unsigned int code, const long arg); + int (*evdev_ioctl)(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); #define evdev_ioctl MPERS_PRINTER_NAME(evdev_ioctl) - _Bool (*fetch_seccomp_fprog)(struct tcb *tcp, const long addr, void *p); + _Bool (*fetch_seccomp_fprog)(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); #define fetch_seccomp_fprog MPERS_PRINTER_NAME(fetch_seccomp_fprog) - _Bool (*fetch_struct_flock)(struct tcb *tcp, const long addr, void *p); + _Bool (*fetch_struct_flock)(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); #define fetch_struct_flock MPERS_PRINTER_NAME(fetch_struct_flock) - _Bool (*fetch_struct_flock64)(struct tcb *tcp, const long addr, void *p); + _Bool (*fetch_struct_flock64)(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); #define fetch_struct_flock64 MPERS_PRINTER_NAME(fetch_struct_flock64) - int (*fetch_struct_mmsghdr)(struct tcb *tcp, const unsigned long addr, void *p); + int (*fetch_struct_mmsghdr)(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); #define fetch_struct_mmsghdr MPERS_PRINTER_NAME(fetch_struct_mmsghdr) unsigned int (*sizeof_struct_mmsghdr)(void); #define sizeof_struct_mmsghdr MPERS_PRINTER_NAME(sizeof_struct_mmsghdr) - int (*fetch_struct_msghdr)(struct tcb *tcp, const unsigned long addr, void *p); + int (*fetch_struct_msghdr)(struct tcb *const tcp, const kernel_ulong_t addr, void *const p); #define fetch_struct_msghdr MPERS_PRINTER_NAME(fetch_struct_msghdr) - _Bool (*fetch_struct_stat)(struct tcb *tcp, const unsigned long addr, struct strace_stat *const dst); + _Bool (*fetch_struct_stat)(struct tcb *const tcp, const kernel_ulong_t addr, struct strace_stat *const dst); #define fetch_struct_stat MPERS_PRINTER_NAME(fetch_struct_stat) - _Bool (*fetch_struct_stat64)(struct tcb *tcp, const unsigned long addr, struct strace_stat *const dst); + _Bool (*fetch_struct_stat64)(struct tcb *const tcp, const kernel_ulong_t addr, struct strace_stat *const dst); #define fetch_struct_stat64 MPERS_PRINTER_NAME(fetch_struct_stat64) - _Bool (*fetch_struct_statfs)(struct tcb *tcp, const long addr, struct strace_statfs *p); + _Bool (*fetch_struct_statfs)(struct tcb *const tcp, const kernel_ulong_t addr, struct strace_statfs *const p); #define fetch_struct_statfs MPERS_PRINTER_NAME(fetch_struct_statfs) - _Bool (*fetch_struct_statfs64)(struct tcb *tcp, const long addr, const unsigned long size, struct strace_statfs *p); + _Bool (*fetch_struct_statfs64)(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t size, struct strace_statfs *const p); #define fetch_struct_statfs64 MPERS_PRINTER_NAME(fetch_struct_statfs64) - int (*hdio_ioctl)(struct tcb *tcp, const unsigned int code, const long arg); + int (*hdio_ioctl)(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); #define hdio_ioctl MPERS_PRINTER_NAME(hdio_ioctl) - int (*mtd_ioctl)(struct tcb *tcp, const unsigned int code, const long arg); + int (*loop_ioctl)(struct tcb *tcp, const unsigned int code, const kernel_ulong_t arg); +#define loop_ioctl MPERS_PRINTER_NAME(loop_ioctl) + + int (*mtd_ioctl)(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); #define mtd_ioctl MPERS_PRINTER_NAME(mtd_ioctl) - void (*printmqattr)(struct tcb *tcp, const long addr); + void (*printmqattr)(struct tcb *const tcp, const kernel_ulong_t addr, const _Bool decode_flags); #define printmqattr MPERS_PRINTER_NAME(printmqattr) - void (*tprint_msgbuf)(struct tcb *tcp, const long addr, const unsigned long count); + void (*tprint_msgbuf)(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t count); #define tprint_msgbuf MPERS_PRINTER_NAME(tprint_msgbuf) - void (*print_sigevent)(struct tcb *tcp, const long addr); + int (*decode_sg_req_info)(struct tcb *const tcp, const kernel_ulong_t arg); +#define decode_sg_req_info MPERS_PRINTER_NAME(decode_sg_req_info) + + void (*print_sigevent)(struct tcb *const tcp, const kernel_ulong_t addr); #define print_sigevent MPERS_PRINTER_NAME(print_sigevent) - void (*print_timespec)(struct tcb *tcp, const long addr); + void (*print_timespec)(struct tcb *const tcp, const kernel_ulong_t addr); #define print_timespec MPERS_PRINTER_NAME(print_timespec) - const char * (*sprint_timespec)(struct tcb *tcp, const long addr); + const char * (*sprint_timespec)(struct tcb *const tcp, const kernel_ulong_t addr); #define sprint_timespec MPERS_PRINTER_NAME(sprint_timespec) - void (*print_timespec_utime_pair)(struct tcb *tcp, const long addr); + void (*print_timespec_utime_pair)(struct tcb *const tcp, const kernel_ulong_t addr); #define print_timespec_utime_pair MPERS_PRINTER_NAME(print_timespec_utime_pair) - void (*print_itimerspec)(struct tcb *tcp, const long addr); + void (*print_itimerspec)(struct tcb *const tcp, const kernel_ulong_t addr); #define print_itimerspec MPERS_PRINTER_NAME(print_itimerspec) - void (*print_timeval)(struct tcb *tcp, const long addr); + void (*print_struct_timeval)(const void *arg); +#define print_struct_timeval MPERS_PRINTER_NAME(print_struct_timeval) + + void (*print_timeval)(struct tcb *const tcp, const kernel_ulong_t addr); #define print_timeval MPERS_PRINTER_NAME(print_timeval) - void (*print_timeval_pair)(struct tcb *tcp, const long addr); + void (*print_timeval_pair)(struct tcb *const tcp, const kernel_ulong_t addr); #define print_timeval_pair MPERS_PRINTER_NAME(print_timeval_pair) - const char * (*sprint_timeval)(struct tcb *tcp, const long addr); + const char * (*sprint_timeval)(struct tcb *const tcp, const kernel_ulong_t addr); #define sprint_timeval MPERS_PRINTER_NAME(sprint_timeval) - void (*print_itimerval)(struct tcb *tcp, const long addr); + void (*print_itimerval)(struct tcb *const tcp, const kernel_ulong_t addr); #define print_itimerval MPERS_PRINTER_NAME(print_itimerval) - int (*print_timex)(struct tcb *tcp, const long addr); + int (*print_timex)(struct tcb *const tcp, const kernel_ulong_t addr); #define print_timex MPERS_PRINTER_NAME(print_timex) - void (*printrusage)(struct tcb *tcp, long addr); + void (*printrusage)(struct tcb *const tcp, const kernel_ulong_t addr); #define printrusage MPERS_PRINTER_NAME(printrusage) - void (*printsiginfo_at)(struct tcb *tcp, long addr); + void (*printsiginfo_at)(struct tcb *const tcp, const kernel_ulong_t addr); #define printsiginfo_at MPERS_PRINTER_NAME(printsiginfo_at) - void (*print_siginfo_array)(struct tcb *tcp, unsigned long addr, unsigned long len); + void (*print_siginfo_array)(struct tcb *const tcp, const kernel_ulong_t addr, const kernel_ulong_t len); #define print_siginfo_array MPERS_PRINTER_NAME(print_siginfo_array) - int (*rtc_ioctl)(struct tcb *tcp, const unsigned int code, const long arg); + int (*rtc_ioctl)(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); #define rtc_ioctl MPERS_PRINTER_NAME(rtc_ioctl) - int (*v4l2_ioctl)(struct tcb *tcp, const unsigned int code, const long arg); + int (*decode_sg_io_v3)(struct tcb *const tcp, const kernel_ulong_t arg); +#define decode_sg_io_v3 MPERS_PRINTER_NAME(decode_sg_io_v3) + + int (*sock_ioctl)(struct tcb *tcp, const unsigned int code, const kernel_ulong_t arg); +#define sock_ioctl MPERS_PRINTER_NAME(sock_ioctl) + + int (*v4l2_ioctl)(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg); #define v4l2_ioctl MPERS_PRINTER_NAME(v4l2_ioctl) } struct_printers; diff --git a/printrusage.c b/printrusage.c index 548af828b..0a6a3c34e 100644 --- a/printrusage.c +++ b/printrusage.c @@ -37,49 +37,49 @@ typedef struct rusage rusage_t; #include MPERS_DEFS -MPERS_PRINTER_DECL(void, printrusage, struct tcb *tcp, long addr) +MPERS_PRINTER_DECL(void, printrusage, + struct tcb *const tcp, const kernel_ulong_t addr) { rusage_t ru; if (umove_or_printaddr(tcp, addr, &ru)) return; - tprintf("{ru_utime={%llu, %llu}, ru_stime={%llu, %llu}, ", - zero_extend_signed_to_ull(ru.ru_utime.tv_sec), - zero_extend_signed_to_ull(ru.ru_utime.tv_usec), - zero_extend_signed_to_ull(ru.ru_stime.tv_sec), - zero_extend_signed_to_ull(ru.ru_stime.tv_usec)); + tprints("{ru_utime="); + MPERS_FUNC_NAME(print_struct_timeval)(&ru.ru_utime); + tprints(", ru_stime="); + MPERS_FUNC_NAME(print_struct_timeval)(&ru.ru_stime); if (abbrev(tcp)) - tprints("...}"); + tprints(", ..."); else { - tprintf("ru_maxrss=%llu, ", zero_extend_signed_to_ull(ru.ru_maxrss)); - tprintf("ru_ixrss=%llu, ", zero_extend_signed_to_ull(ru.ru_ixrss)); - tprintf("ru_idrss=%llu, ", zero_extend_signed_to_ull(ru.ru_idrss)); - tprintf("ru_isrss=%llu, ", zero_extend_signed_to_ull(ru.ru_isrss)); - tprintf("ru_minflt=%llu, ", zero_extend_signed_to_ull(ru.ru_minflt)); - tprintf("ru_majflt=%llu, ", zero_extend_signed_to_ull(ru.ru_majflt)); - tprintf("ru_nswap=%llu, ", zero_extend_signed_to_ull(ru.ru_nswap)); - tprintf("ru_inblock=%llu, ", zero_extend_signed_to_ull(ru.ru_inblock)); - tprintf("ru_oublock=%llu, ", zero_extend_signed_to_ull(ru.ru_oublock)); - tprintf("ru_msgsnd=%llu, ", zero_extend_signed_to_ull(ru.ru_msgsnd)); - tprintf("ru_msgrcv=%llu, ", zero_extend_signed_to_ull(ru.ru_msgrcv)); - tprintf("ru_nsignals=%llu, ", zero_extend_signed_to_ull(ru.ru_nsignals)); - tprintf("ru_nvcsw=%llu, ", zero_extend_signed_to_ull(ru.ru_nvcsw)); - tprintf("ru_nivcsw=%llu}", zero_extend_signed_to_ull(ru.ru_nivcsw)); +#define PRINT_RUSAGE_MEMBER(member) \ + tprintf(", " #member "=%llu", zero_extend_signed_to_ull(ru.member)) + PRINT_RUSAGE_MEMBER(ru_maxrss); + PRINT_RUSAGE_MEMBER(ru_ixrss); + PRINT_RUSAGE_MEMBER(ru_idrss); + PRINT_RUSAGE_MEMBER(ru_isrss); + PRINT_RUSAGE_MEMBER(ru_minflt); + PRINT_RUSAGE_MEMBER(ru_majflt); + PRINT_RUSAGE_MEMBER(ru_nswap); + PRINT_RUSAGE_MEMBER(ru_inblock); + PRINT_RUSAGE_MEMBER(ru_oublock); + PRINT_RUSAGE_MEMBER(ru_msgsnd); + PRINT_RUSAGE_MEMBER(ru_msgrcv); + PRINT_RUSAGE_MEMBER(ru_nsignals); + PRINT_RUSAGE_MEMBER(ru_nvcsw); + PRINT_RUSAGE_MEMBER(ru_nivcsw); +#undef PRINT_RUSAGE_MEMBER } + tprints("}"); } #ifdef ALPHA void -printrusage32(struct tcb *tcp, long addr) +printrusage32(struct tcb *const tcp, const kernel_ulong_t addr) { - struct timeval32 { - unsigned tv_sec; - unsigned tv_usec; - }; struct rusage32 { - struct timeval32 ru_utime; /* user time used */ - struct timeval32 ru_stime; /* system time used */ + timeval32_t ru_utime; /* user time used */ + timeval32_t ru_stime; /* system time used */ long ru_maxrss; /* maximum resident set size */ long ru_ixrss; /* integral shared memory size */ long ru_idrss; /* integral unshared data size */ @@ -99,26 +99,31 @@ printrusage32(struct tcb *tcp, long addr) if (umove_or_printaddr(tcp, addr, &ru)) return; - tprintf("{ru_utime={%lu, %lu}, ru_stime={%lu, %lu}, ", - (long) ru.ru_utime.tv_sec, (long) ru.ru_utime.tv_usec, - (long) ru.ru_stime.tv_sec, (long) ru.ru_stime.tv_usec); + tprints("{ru_utime="); + print_timeval32_t(&ru.ru_utime); + tprints(", ru_stime="); + print_timeval32_t(&ru.ru_stime); if (abbrev(tcp)) - tprints("...}"); + tprints(", ..."); else { - tprintf("ru_maxrss=%lu, ", ru.ru_maxrss); - tprintf("ru_ixrss=%lu, ", ru.ru_ixrss); - tprintf("ru_idrss=%lu, ", ru.ru_idrss); - tprintf("ru_isrss=%lu, ", ru.ru_isrss); - tprintf("ru_minflt=%lu, ", ru.ru_minflt); - tprintf("ru_majflt=%lu, ", ru.ru_majflt); - tprintf("ru_nswap=%lu, ", ru.ru_nswap); - tprintf("ru_inblock=%lu, ", ru.ru_inblock); - tprintf("ru_oublock=%lu, ", ru.ru_oublock); - tprintf("ru_msgsnd=%lu, ", ru.ru_msgsnd); - tprintf("ru_msgrcv=%lu, ", ru.ru_msgrcv); - tprintf("ru_nsignals=%lu, ", ru.ru_nsignals); - tprintf("ru_nvcsw=%lu, ", ru.ru_nvcsw); - tprintf("ru_nivcsw=%lu}", ru.ru_nivcsw); +# define PRINT_RUSAGE_MEMBER(member) \ + tprintf(", " #member "=%lu", ru.member) + PRINT_RUSAGE_MEMBER(ru_maxrss); + PRINT_RUSAGE_MEMBER(ru_ixrss); + PRINT_RUSAGE_MEMBER(ru_idrss); + PRINT_RUSAGE_MEMBER(ru_isrss); + PRINT_RUSAGE_MEMBER(ru_minflt); + PRINT_RUSAGE_MEMBER(ru_majflt); + PRINT_RUSAGE_MEMBER(ru_nswap); + PRINT_RUSAGE_MEMBER(ru_inblock); + PRINT_RUSAGE_MEMBER(ru_oublock); + PRINT_RUSAGE_MEMBER(ru_msgsnd); + PRINT_RUSAGE_MEMBER(ru_msgrcv); + PRINT_RUSAGE_MEMBER(ru_nsignals); + PRINT_RUSAGE_MEMBER(ru_nvcsw); + PRINT_RUSAGE_MEMBER(ru_nivcsw); +# undef PRINT_RUSAGE_MEMBER } + tprints("}"); } #endif diff --git a/printsiginfo.c b/printsiginfo.c index 1f4a82586..7bbb42148 100644 --- a/printsiginfo.c +++ b/printsiginfo.c @@ -77,7 +77,7 @@ static void printsigval(const siginfo_t *sip) { tprintf(", si_value={int=%d, ptr=", sip->si_int); - printaddr((unsigned long) sip->si_ptr); + printaddr(ptr_to_kulong(sip->si_ptr)); tprints("}"); } @@ -178,7 +178,7 @@ print_si_info(const siginfo_t *sip) case SIGILL: case SIGFPE: case SIGSEGV: case SIGBUS: tprints(", si_addr="); - printaddr((unsigned long) sip->si_addr); + printaddr(ptr_to_kulong(sip->si_addr)); break; case SIGPOLL: switch (sip->si_code) { @@ -189,13 +189,21 @@ print_si_info(const siginfo_t *sip) } break; #ifdef HAVE_SIGINFO_T_SI_SYSCALL - case SIGSYS: + case SIGSYS: { + const char *scname = + syscall_name((unsigned) sip->si_syscall); + tprints(", si_call_addr="); - printaddr((unsigned long) sip->si_call_addr); - tprintf(", si_syscall=__NR_%s, si_arch=", - syscall_name((unsigned) sip->si_syscall)); + printaddr(ptr_to_kulong(sip->si_call_addr)); + tprints(", si_syscall="); + if (scname) + tprintf("__NR_%s", scname); + else + tprintf("%u", (unsigned) sip->si_syscall); + tprints(", si_arch="); printxval(audit_arch, sip->si_arch, "AUDIT_ARCH_???"); break; + } #endif default: if (sip->si_pid || sip->si_uid) @@ -231,7 +239,7 @@ printsiginfo(const siginfo_t *sip) } MPERS_PRINTER_DECL(void, printsiginfo_at, - struct tcb *tcp, long addr) + struct tcb *const tcp, const kernel_ulong_t addr) { siginfo_t si; @@ -246,8 +254,8 @@ print_siginfo_t(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) return true; } -MPERS_PRINTER_DECL(void, print_siginfo_array, - struct tcb *tcp, unsigned long addr, unsigned long len) +MPERS_PRINTER_DECL(void, print_siginfo_array, struct tcb *const tcp, + const kernel_ulong_t addr, const kernel_ulong_t len) { siginfo_t si; diff --git a/process.c b/process.c index 32dcfe253..6928fb927 100644 --- a/process.c +++ b/process.c @@ -57,7 +57,7 @@ static const struct xlat struct_user_offsets[] = { }; static void -print_user_offset_addr(const unsigned long addr) +print_user_offset_addr(const kernel_ulong_t addr) { const struct xlat *x; @@ -73,8 +73,8 @@ print_user_offset_addr(const unsigned long addr) printaddr(addr); } else { --x; - tprintf("%s + %lu", - x->str, addr - (unsigned long) x->val); + tprintf("%s + %" PRI_klu, + x->str, addr - (kernel_ulong_t) x->val); } } else { tprints(x->str); @@ -83,10 +83,10 @@ print_user_offset_addr(const unsigned long addr) SYS_FUNC(ptrace) { - const unsigned long request = tcp->u_arg[0]; + const kernel_ulong_t request = tcp->u_arg[0]; const int pid = tcp->u_arg[1]; - const unsigned long addr = tcp->u_arg[2]; - const unsigned long data = tcp->u_arg[3]; + const kernel_ulong_t addr = tcp->u_arg[2]; + const kernel_ulong_t data = tcp->u_arg[3]; if (entering(tcp)) { /* request */ @@ -121,7 +121,7 @@ SYS_FUNC(ptrace) case PTRACE_GETSIGMASK: case PTRACE_SETSIGMASK: case PTRACE_SECCOMP_GET_FILTER: - tprintf(", %lu", addr); + tprintf(", %" PRI_klu, addr); break; case PTRACE_PEEKSIGINFO: { tprints(", "); @@ -247,16 +247,10 @@ SYS_FUNC(ptrace) print_sigset_addr_len(tcp, data, addr); break; case PTRACE_PEEKSIGINFO: - if (syserror(tcp)) - printaddr(data); - else - print_siginfo_array(tcp, data, tcp->u_rval); + print_siginfo_array(tcp, data, tcp->u_rval); break; case PTRACE_SECCOMP_GET_FILTER: - if (syserror(tcp)) - printaddr(data); - else - print_seccomp_fprog(tcp, data, tcp->u_rval); + print_seccomp_fprog(tcp, data, tcp->u_rval); break; } } diff --git a/process_vm.c b/process_vm.c index 0a9dcd21d..f63b91730 100644 --- a/process_vm.c +++ b/process_vm.c @@ -32,44 +32,45 @@ SYS_FUNC(process_vm_readv) { if (entering(tcp)) { /* arg 1: pid */ - tprintf("%ld, ", tcp->u_arg[0]); + tprintf("%d, ", (int) tcp->u_arg[0]); } else { + kernel_ulong_t local_iovcnt = tcp->u_arg[2]; + kernel_ulong_t remote_iovcnt = tcp->u_arg[4]; + kernel_ulong_t flags = tcp->u_arg[5]; + /* arg 2: local iov */ - if (syserror(tcp)) { - printaddr(tcp->u_arg[1]); - } else { - tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], - IOV_DECODE_STR); - } + tprint_iov_upto(tcp, local_iovcnt, tcp->u_arg[1], + syserror(tcp) ? IOV_DECODE_ADDR : IOV_DECODE_STR, + tcp->u_rval); /* arg 3: local iovcnt */ - tprintf(", %lu, ", tcp->u_arg[2]); + tprintf(", %" PRI_klu ", ", local_iovcnt); /* arg 4: remote iov */ - if (syserror(tcp)) { - printaddr(tcp->u_arg[3]); - } else { - tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], - IOV_DECODE_ADDR); - } + tprint_iov(tcp, remote_iovcnt, tcp->u_arg[3], + IOV_DECODE_ADDR); /* arg 5: remote iovcnt */ /* arg 6: flags */ - tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]); + tprintf(", %" PRI_klu ", %" PRI_klu, remote_iovcnt, flags); } return 0; } SYS_FUNC(process_vm_writev) { + kernel_ulong_t local_iovcnt = tcp->u_arg[2]; + kernel_ulong_t remote_iovcnt = tcp->u_arg[4]; + kernel_ulong_t flags = tcp->u_arg[5]; + /* arg 1: pid */ - tprintf("%ld, ", tcp->u_arg[0]); + tprintf("%d, ", (int) tcp->u_arg[0]); /* arg 2: local iov */ - tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], IOV_DECODE_STR); + tprint_iov(tcp, local_iovcnt, tcp->u_arg[1], IOV_DECODE_STR); /* arg 3: local iovcnt */ - tprintf(", %lu, ", tcp->u_arg[2]); + tprintf(", %" PRI_klu ", ", local_iovcnt); /* arg 4: remote iov */ - tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], IOV_DECODE_ADDR); + tprint_iov(tcp, remote_iovcnt, tcp->u_arg[3], IOV_DECODE_ADDR); /* arg 5: remote iovcnt */ /* arg 6: flags */ - tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]); + tprintf(", %" PRI_klu ", %" PRI_klu, remote_iovcnt, flags); return RVAL_DECODED; } diff --git a/ptp.c b/ptp.c index 69880e14e..e2a720bac 100644 --- a/ptp.c +++ b/ptp.c @@ -33,7 +33,8 @@ #include "xlat/ptp_flags_options.h" int -ptp_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +ptp_ioctl(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) { if (!verbose(tcp)) return RVAL_DECODED; @@ -71,7 +72,7 @@ ptp_ioctl(struct tcb *tcp, const unsigned int code, const long arg) } case PTP_ENABLE_PPS: - tprintf(", %ld", arg); + tprintf(", %" PRI_kld, arg); break; case PTP_SYS_OFFSET: { diff --git a/ptrace.h b/ptrace.h index ddb46cb40..ce4fd9af3 100644 --- a/ptrace.h +++ b/ptrace.h @@ -36,14 +36,7 @@ #ifndef STRACE_PTRACE_H #define STRACE_PTRACE_H -#ifdef NEED_PTRACE_PROTOTYPE_WORKAROUND -# define ptrace xptrace -# include -# undef ptrace -extern long ptrace(int, int, char *, long); -#else -# include -#endif +#include #ifdef HAVE_STRUCT_IA64_FPREG # define ia64_fpreg XXX_ia64_fpreg diff --git a/qemu_multiarch_testing/.gitignore b/qemu_multiarch_testing/.gitignore deleted file mode 100644 index 9ba3a0a9b..000000000 --- a/qemu_multiarch_testing/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -hdc.dir/strace -hdc.img diff --git a/qemu_multiarch_testing/README b/qemu_multiarch_testing/README deleted file mode 100644 index 9e4ef0069..000000000 --- a/qemu_multiarch_testing/README +++ /dev/null @@ -1,49 +0,0 @@ -How to test strace build using Aboriginal Linux's system images. - -* Put a autoconf'ed strace source tree into hdc.dir/strace dir. -For example, this should work: -git clone git://strace.git.sourceforge.net/gitroot/strace/strace && -cd strace && ./bootstrap - -* Run ./make-hdc-img.sh: it will generate ext2 image file, -hdc.img, from hdc.dir/* data. This requires root for loop mount. - -* Download and unpack, or build from source and unpack -one or more system-image-ARCH directories into this directory -(the one which contains this README). - -* Run: ./parallel-build-hdc-img.sh system-image-DIR1 system-image-DIR2... -(background it if you don't want to see "Waiting to finish" thing). -This runs a strace build in several qemu virtual machines in parallel. - -* Observe system-image-*.log file(s) with growing log of strace build. - -There is no automated detection of errors for now: you need to examine -logs yourself. - -For me, the following system images worked (tests passed/skipped/failed): -system-image-armv4l - 14/14/1 (failed: stat32-v.test - wrong stat decoding, sun_path.test - libc error) -system-image-armv4tl - 15/14/0 -system-image-armv5l - 15/14/0 -system-image-armv6l - 15/14/0 -system-image-i486 - 14/14/1 (failed: count.test - grep segfault) -system-image-i586 - 14/14/1 (failed: count.test - grep segfault) -system-image-i686 - 14/14/1 (failed: count.test - grep segfault) -system-image-mips - 15/14/0 -system-image-mipsel - 15/14/0 -system-image-powerpc - 13/14/2 (failed: ipc_sem.test - ipc_sem segfault) -system-image-sparc - 13/14/2 (failed: ipc_sem.test - ipc_sem segfault) -system-image-x86_64 - 14/15/0 - -And these did not: -system-image-m68k - qemu-system-m68k: -M q800: Unsupported machine type -system-image-mips64 - init dies before reaching /mnt/init -system-image-sh4 - hdc does not mount (no support for 2 disks) - - -To debug a build problem in one of sandboxes, change keep_hdb -to "keep_hdb=true" in parallel-build-hdc-img.sh - -This preserves system-image-DIR1/hdb.img after the build, -so you can go into system-image-DIR1 and run -"HDB=hdb.img ./dev-environment.sh" to debug the problem. diff --git a/qemu_multiarch_testing/hdc.dir/init b/qemu_multiarch_testing/hdc.dir/init deleted file mode 100755 index ea905abbb..000000000 --- a/qemu_multiarch_testing/hdc.dir/init +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# Emit a msg to let user know this place was reached -echo "Copying to /home" -# Had a case where cp SEGVs, let's have diagnostics for it -cp -a /mnt /home || { echo "cp: $?"; exit 1; } -cd /home/mnt || exit $? -exec ./init2 -echo "Failed to exec ./init2" diff --git a/qemu_multiarch_testing/hdc.dir/init2 b/qemu_multiarch_testing/hdc.dir/init2 deleted file mode 100755 index 8c0200afc..000000000 --- a/qemu_multiarch_testing/hdc.dir/init2 +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -umount /mnt # optional -( - set -e -x - cd strace - ./configure - make - size strace - make check VERBOSE=1 && - cat tests/test-suite.log ||: - test "x$FTP_PORT" = x || - ftpput -P "$FTP_PORT" "$FTP_SERVER" strace -) 2>&1 | tee strace_build.log -mount -o remount,ro /home -sync -sleep 1 diff --git a/qemu_multiarch_testing/make-hdc-img.sh b/qemu_multiarch_testing/make-hdc-img.sh deleted file mode 100755 index 3c35f4ead..000000000 --- a/qemu_multiarch_testing/make-hdc-img.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -ex - -mountpoint -q / -[ ! -e hdc.img.dir ] - -cleanup() -{ - trap - EXIT - if mountpoint -q hdc.img.dir; then - umount -d hdc.img.dir - fi - mountpoint -q hdc.img.dir || - rm -rf hdc.img.dir - exit $@ -} - -trap 'cleanup $?' EXIT -trap 'cleanup 1' HUP PIPE INT QUIT TERM - -size=$(du -ks hdc.dir | sed -rn 's/^([0-9]+).*/\1/p') -[ "$size" -gt 0 ] - -rm -f hdc.img -dd if=/dev/zero of=hdc.img count=1 bs=1024 seek=$(($size*2)) -mkfs.ext3 -q -F -b 1024 -i 4096 hdc.img -tune2fs -c 0 -i 0 hdc.img -mkdir hdc.img.dir -mount -o loop hdc.img hdc.img.dir -cp -a hdc.dir/* hdc.img.dir/ -umount -d hdc.img.dir diff --git a/qemu_multiarch_testing/parallel-build-hdc-img.sh b/qemu_multiarch_testing/parallel-build-hdc-img.sh deleted file mode 100755 index 8d2736732..000000000 --- a/qemu_multiarch_testing/parallel-build-hdc-img.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -export HDBMEGS=64 -keep_hdb=false - -build_in_dir() -{ - cd "$1" || exit 1 - rm -f hdb.img - nice -n10 time ./native-build.sh ../hdc.img - $keep_hdb || rm -f hdb.img - echo >&3 "Finished: $1" -} - -started=false -for dir; do - test -d "$dir" || continue - test -e "$dir/native-build.sh" || continue - echo "Starting: $dir" - build_in_dir "$dir" 3>&1 "$dir.log" 2>&1 & - started=true -done - -$started || { - echo "Give me system-image-ARCH directories on command line" - exit 1 -} - -echo "Waiting to finish" -wait -echo "Done, check the logs" diff --git a/qualify.c b/qualify.c new file mode 100644 index 000000000..bb4aefe38 --- /dev/null +++ b/qualify.c @@ -0,0 +1,640 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include "nsig.h" + +typedef unsigned int number_slot_t; +#define BITS_PER_SLOT (sizeof(number_slot_t) * 8) + +struct number_set { + number_slot_t *vec; + unsigned int nslots; + bool not; +}; + +struct number_set read_set; +struct number_set write_set; +struct number_set signal_set; + +static struct number_set abbrev_set[SUPPORTED_PERSONALITIES]; +static struct number_set inject_set[SUPPORTED_PERSONALITIES]; +static struct number_set raw_set[SUPPORTED_PERSONALITIES]; +static struct number_set trace_set[SUPPORTED_PERSONALITIES]; +static struct number_set verbose_set[SUPPORTED_PERSONALITIES]; + +static void +number_setbit(const unsigned int i, number_slot_t *const vec) +{ + vec[i / BITS_PER_SLOT] |= (number_slot_t) 1 << (i % BITS_PER_SLOT); +} + +static bool +number_isset(const unsigned int i, const number_slot_t *const vec) +{ + return vec[i / BITS_PER_SLOT] & ((number_slot_t) 1 << (i % BITS_PER_SLOT)); +} + +static void +reallocate_number_set(struct number_set *const set, const unsigned int new_nslots) +{ + if (new_nslots <= set->nslots) + return; + set->vec = xreallocarray(set->vec, new_nslots, sizeof(*set->vec)); + memset(set->vec + set->nslots, 0, + sizeof(*set->vec) * (new_nslots - set->nslots)); + set->nslots = new_nslots; +} + +static void +add_number_to_set(const unsigned int number, struct number_set *const set) +{ + reallocate_number_set(set, number / BITS_PER_SLOT + 1); + number_setbit(number, set->vec); +} + +bool +is_number_in_set(const unsigned int number, const struct number_set *const set) +{ + return ((number / BITS_PER_SLOT < set->nslots) + && number_isset(number, set->vec)) ^ set->not; +} + +typedef int (*string_to_uint_func)(const char *); + +/* + * Add numbers to SET according to STR specification. + */ +static void +qualify_tokens(const char *const str, struct number_set *const set, + string_to_uint_func func, const char *const name) +{ + /* Clear the set. */ + if (set->nslots) + memset(set->vec, 0, sizeof(*set->vec) * set->nslots); + set->not = false; + + /* + * Each leading ! character means inversion + * of the remaining specification. + */ + const char *s = str; +handle_inversion: + while (*s == '!') { + set->not = !set->not; + ++s; + } + + if (strcmp(s, "none") == 0) { + /* + * No numbers are added to the set. + * Subsequent is_number_in_set invocations will return set->not. + */ + return; + } else if (strcmp(s, "all") == 0) { + s = "!none"; + goto handle_inversion; + } + + /* + * Split the string into comma separated tokens. + * For each token, find out the corresponding number + * by calling FUNC, and add that number to the set. + * The absence of tokens or a negative answer + * from FUNC is a fatal error. + */ + char *copy = xstrdup(s); + char *saveptr = NULL; + const char *token; + int number = -1; + + for (token = strtok_r(copy, ",", &saveptr); token; + token = strtok_r(NULL, ",", &saveptr)) { + number = func(token); + if (number < 0) { + error_msg_and_die("invalid %s '%s'", name, token); + } + + add_number_to_set(number, set); + } + + free(copy); + + if (number < 0) { + error_msg_and_die("invalid %s '%s'", name, str); + } +} + +static int +sigstr_to_uint(const char *s) +{ + int i; + + if (*s >= '0' && *s <= '9') + return string_to_uint_upto(s, 255); + + if (strncasecmp(s, "SIG", 3) == 0) + s += 3; + + for (i = 0; i <= 255; ++i) { + const char *name = signame(i); + + if (strncasecmp(name, "SIG", 3) != 0) + continue; + + name += 3; + + if (strcasecmp(name, s) != 0) + continue; + + return i; + } + + return -1; +} + +static bool +qualify_syscall_number(const char *s, struct number_set *set) +{ + int n = string_to_uint(s); + if (n < 0) + return false; + + unsigned int p; + bool done = false; + + for (p = 0; p < SUPPORTED_PERSONALITIES; ++p) { + if ((unsigned) n >= nsyscall_vec[p]) { + continue; + } + add_number_to_set(n, &set[p]); + done = true; + } + + return done; +} + +static unsigned int +lookup_class(const char *s) +{ + static const struct { + const char *name; + unsigned int value; + } syscall_class[] = { + { "desc", TRACE_DESC }, + { "file", TRACE_FILE }, + { "memory", TRACE_MEMORY }, + { "process", TRACE_PROCESS }, + { "signal", TRACE_SIGNAL }, + { "ipc", TRACE_IPC }, + { "network", TRACE_NETWORK }, + }; + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(syscall_class); ++i) { + if (strcmp(s, syscall_class[i].name) == 0) { + return syscall_class[i].value; + } + } + + return 0; +} + +static bool +qualify_syscall_class(const char *s, struct number_set *set) +{ + const unsigned int n = lookup_class(s); + if (!n) + return false; + + unsigned int p; + for (p = 0; p < SUPPORTED_PERSONALITIES; ++p) { + unsigned int i; + + for (i = 0; i < nsyscall_vec[p]; ++i) { + if (!sysent_vec[p][i].sys_name + || (sysent_vec[p][i].sys_flags & n) != n) { + continue; + } + add_number_to_set(i, &set[p]); + } + } + + return true; +} + +static bool +qualify_syscall_name(const char *s, struct number_set *set) +{ + unsigned int p; + bool found = false; + + for (p = 0; p < SUPPORTED_PERSONALITIES; ++p) { + unsigned int i; + + for (i = 0; i < nsyscall_vec[p]; ++i) { + if (!sysent_vec[p][i].sys_name + || strcmp(s, sysent_vec[p][i].sys_name)) { + continue; + } + add_number_to_set(i, &set[p]); + found = true; + } + } + + return found; +} + +static bool +qualify_syscall(const char *token, struct number_set *set) +{ + if (*token >= '0' && *token <= '9') + return qualify_syscall_number(token, set); + return qualify_syscall_class(token, set) + || qualify_syscall_name(token, set); +} + +/* + * Add syscall numbers to SETs for each supported personality + * according to STR specification. + */ +static void +qualify_syscall_tokens(const char *const str, struct number_set *const set, + const char *const name) +{ + /* Clear all sets. */ + unsigned int p; + for (p = 0; p < SUPPORTED_PERSONALITIES; ++p) { + if (set[p].nslots) + memset(set[p].vec, 0, + sizeof(*set[p].vec) * set[p].nslots); + set[p].not = false; + } + + /* + * Each leading ! character means inversion + * of the remaining specification. + */ + const char *s = str; +handle_inversion: + while (*s == '!') { + for (p = 0; p < SUPPORTED_PERSONALITIES; ++p) { + set[p].not = !set[p].not; + } + ++s; + } + + if (strcmp(s, "none") == 0) { + /* + * No syscall numbers are added to sets. + * Subsequent is_number_in_set invocations + * will return set[p]->not. + */ + return; + } else if (strcmp(s, "all") == 0) { + s = "!none"; + goto handle_inversion; + } + + /* + * Split the string into comma separated tokens. + * For each token, call qualify_syscall that will take care + * if adding appropriate syscall numbers to sets. + * The absence of tokens or a negative return code + * from qualify_syscall is a fatal error. + */ + char *copy = xstrdup(s); + char *saveptr = NULL; + const char *token; + bool done = false; + + for (token = strtok_r(copy, ",", &saveptr); token; + token = strtok_r(NULL, ",", &saveptr)) { + done = qualify_syscall(token, set); + if (!done) { + error_msg_and_die("invalid %s '%s'", name, token); + } + } + + free(copy); + + if (!done) { + error_msg_and_die("invalid %s '%s'", name, str); + } +} + +/* + * Returns NULL if STR does not start with PREFIX, + * or a pointer to the first char in STR after PREFIX. + */ +static const char * +strip_prefix(const char *prefix, const char *str) +{ + size_t len = strlen(prefix); + + return strncmp(prefix, str, len) ? NULL : str + len; +} + +static int +find_errno_by_name(const char *name) +{ + unsigned int i; + + for (i = 1; i < nerrnos; ++i) { + if (errnoent[i] && (strcasecmp(name, errnoent[i]) == 0)) + return i; + } + + return -1; +} + +static bool +parse_inject_token(const char *const token, struct inject_opts *const fopts, + const bool fault_tokens_only) +{ + const char *val; + int intval; + + if ((val = strip_prefix("when=", token))) { + /* + * == 1+1 + * F == F+0 + * F+ == F+1 + * F+S + */ + char *end; + intval = string_to_uint_ex(val, &end, 0xffff, "+"); + if (intval < 1) + return false; + + fopts->first = intval; + + if (*end) { + val = end + 1; + if (*val) { + /* F+S */ + intval = string_to_uint_upto(val, 0xffff); + if (intval < 1) + return false; + fopts->step = intval; + } else { + /* F+ == F+1 */ + fopts->step = 1; + } + } else { + /* F == F+0 */ + fopts->step = 0; + } + } else if ((val = strip_prefix("error=", token))) { + if (fopts->rval != INJECT_OPTS_RVAL_DEFAULT) + return false; + intval = string_to_uint_upto(val, MAX_ERRNO_VALUE); + if (intval < 0) + intval = find_errno_by_name(val); + if (intval < 1) + return false; + fopts->rval = -intval; + } else if (!fault_tokens_only && (val = strip_prefix("retval=", token))) { + if (fopts->rval != INJECT_OPTS_RVAL_DEFAULT) + return false; + intval = string_to_uint(val); + if (intval < 0) + return false; + fopts->rval = intval; + } else if (!fault_tokens_only && (val = strip_prefix("signal=", token))) { + intval = sigstr_to_uint(val); + if (intval < 1 || intval > NSIG_BYTES * 8) + return false; + fopts->signo = intval; + } else { + return false; + } + + return true; +} + +static char * +parse_inject_expression(const char *const s, char **buf, + struct inject_opts *const fopts, + const bool fault_tokens_only) +{ + char *saveptr = NULL; + char *name = NULL; + char *token; + + *buf = xstrdup(s); + for (token = strtok_r(*buf, ":", &saveptr); token; + token = strtok_r(NULL, ":", &saveptr)) { + if (!name) + name = token; + else if (!parse_inject_token(token, fopts, fault_tokens_only)) + goto parse_error; + } + + if (name) + return name; + +parse_error: + free(*buf); + return *buf = NULL; +} + +static void +qualify_read(const char *const str) +{ + qualify_tokens(str, &read_set, string_to_uint, "descriptor"); +} + +static void +qualify_write(const char *const str) +{ + qualify_tokens(str, &write_set, string_to_uint, "descriptor"); +} + +static void +qualify_signals(const char *const str) +{ + qualify_tokens(str, &signal_set, sigstr_to_uint, "signal"); +} + +static void +qualify_trace(const char *const str) +{ + qualify_syscall_tokens(str, trace_set, "system call"); +} + +static void +qualify_abbrev(const char *const str) +{ + qualify_syscall_tokens(str, abbrev_set, "system call"); +} + +static void +qualify_verbose(const char *const str) +{ + qualify_syscall_tokens(str, verbose_set, "system call"); +} + +static void +qualify_raw(const char *const str) +{ + qualify_syscall_tokens(str, raw_set, "system call"); +} + +static void +qualify_inject_common(const char *const str, + const bool fault_tokens_only, + const char *const description) +{ + struct inject_opts opts = { + .first = 1, + .step = 1, + .rval = INJECT_OPTS_RVAL_DEFAULT, + .signo = 0 + }; + char *buf = NULL; + char *name = parse_inject_expression(str, &buf, &opts, fault_tokens_only); + if (!name) { + error_msg_and_die("invalid %s '%s'", description, str); + } + + /* If neither of retval, error, or signal is specified, then ... */ + if (opts.rval == INJECT_OPTS_RVAL_DEFAULT && !opts.signo) { + if (fault_tokens_only) { + /* in fault= syntax the default error code is ENOSYS. */ + opts.rval = -ENOSYS; + } else { + /* in inject= syntax this is not allowed. */ + error_msg_and_die("invalid %s '%s'", description, str); + } + } + + struct number_set tmp_set[SUPPORTED_PERSONALITIES]; + memset(tmp_set, 0, sizeof(tmp_set)); + qualify_syscall_tokens(name, tmp_set, description); + + free(buf); + + /* + * Initialize inject_vec accourding to tmp_set. + * Merge tmp_set into inject_set. + */ + unsigned int p; + for (p = 0; p < SUPPORTED_PERSONALITIES; ++p) { + if (!tmp_set[p].nslots && !tmp_set[p].not) { + continue; + } + + if (!inject_vec[p]) { + inject_vec[p] = xcalloc(nsyscall_vec[p], + sizeof(*inject_vec[p])); + } + + unsigned int i; + for (i = 0; i < nsyscall_vec[p]; ++i) { + if (is_number_in_set(i, &tmp_set[p])) { + add_number_to_set(i, &inject_set[p]); + inject_vec[p][i] = opts; + } + } + + free(tmp_set[p].vec); + } +} + +static void +qualify_fault(const char *const str) +{ + qualify_inject_common(str, true, "fault argument"); +} + +static void +qualify_inject(const char *const str) +{ + qualify_inject_common(str, false, "inject argument"); +} + +static const struct qual_options { + const char *name; + void (*qualify)(const char *); +} qual_options[] = { + { "trace", qualify_trace }, + { "t", qualify_trace }, + { "abbrev", qualify_abbrev }, + { "a", qualify_abbrev }, + { "verbose", qualify_verbose }, + { "v", qualify_verbose }, + { "raw", qualify_raw }, + { "x", qualify_raw }, + { "signal", qualify_signals }, + { "signals", qualify_signals }, + { "s", qualify_signals }, + { "read", qualify_read }, + { "reads", qualify_read }, + { "r", qualify_read }, + { "write", qualify_write }, + { "writes", qualify_write }, + { "w", qualify_write }, + { "fault", qualify_fault }, + { "inject", qualify_inject }, +}; + +void +qualify(const char *str) +{ + const struct qual_options *opt = qual_options; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(qual_options); ++i) { + const char *p = qual_options[i].name; + unsigned int len = strlen(p); + + if (strncmp(str, p, len) || str[len] != '=') + continue; + + opt = &qual_options[i]; + str += len + 1; + break; + } + + opt->qualify(str); +} + +unsigned int +qual_flags(const unsigned int scno) +{ + return (is_number_in_set(scno, &trace_set[current_personality]) + ? QUAL_TRACE : 0) + | (is_number_in_set(scno, &abbrev_set[current_personality]) + ? QUAL_ABBREV : 0) + | (is_number_in_set(scno, &verbose_set[current_personality]) + ? QUAL_VERBOSE : 0) + | (is_number_in_set(scno, &raw_set[current_personality]) + ? QUAL_RAW : 0) + | (is_number_in_set(scno, &inject_set[current_personality]) + ? QUAL_INJECT : 0); +} diff --git a/quota.c b/quota.c index 7dd01f9ed..19f391f76 100644 --- a/quota.c +++ b/quota.c @@ -171,7 +171,7 @@ struct fs_quota_statv { zero_extend_signed_to_ull((where).field)) static int -decode_cmd_data(struct tcb *tcp, uint32_t id, uint32_t cmd, unsigned long data) +decode_cmd_data(struct tcb *tcp, uint32_t id, uint32_t cmd, kernel_ulong_t data) { switch (cmd) { case Q_QUOTAOFF: diff --git a/readahead.c b/readahead.c index f2b9c8021..d6caac330 100644 --- a/readahead.c +++ b/readahead.c @@ -6,7 +6,7 @@ SYS_FUNC(readahead) printfd(tcp, tcp->u_arg[0]); argn = printllval(tcp, ", %lld", 1); - tprintf(", %lu", tcp->u_arg[argn]); + tprintf(", %" PRI_klu, tcp->u_arg[argn]); return RVAL_DECODED; } diff --git a/readlink.c b/readlink.c index 299b083b0..fd65b2539 100644 --- a/readlink.c +++ b/readlink.c @@ -50,8 +50,8 @@ decode_readlink(struct tcb *tcp, int offset) * "..." continuation based on garbage * past return buffer's end. */ - printstr(tcp, tcp->u_arg[offset + 1], tcp->u_rval); - tprintf(", %lu", tcp->u_arg[offset + 2]); + printstrn(tcp, tcp->u_arg[offset + 1], tcp->u_rval); + tprintf(", %" PRI_klu, tcp->u_arg[offset + 2]); } return 0; } diff --git a/reboot.c b/reboot.c index 1669a3d16..381e4e895 100644 --- a/reboot.c +++ b/reboot.c @@ -17,7 +17,7 @@ SYS_FUNC(reboot) printflags(bootflags3, cmd, "LINUX_REBOOT_CMD_???"); if (cmd == LINUX_REBOOT_CMD_RESTART2) { tprints(", "); - printstr(tcp, tcp->u_arg[3], -1); + printstr(tcp, tcp->u_arg[3]); } return RVAL_DECODED; } diff --git a/resource.c b/resource.c index 475afc26e..61c877e4c 100644 --- a/resource.c +++ b/resource.c @@ -49,7 +49,7 @@ sprint_rlim64(uint64_t lim) } static void -print_rlimit64(struct tcb *tcp, unsigned long addr) +print_rlimit64(struct tcb *const tcp, const kernel_ulong_t addr) { struct rlimit_64 { uint64_t rlim_cur; @@ -80,7 +80,7 @@ sprint_rlim32(uint32_t lim) } static void -print_rlimit32(struct tcb *tcp, unsigned long addr) +print_rlimit32(struct tcb *const tcp, const kernel_ulong_t addr) { struct rlimit_32 { uint32_t rlim_cur; @@ -94,19 +94,15 @@ print_rlimit32(struct tcb *tcp, unsigned long addr) } static void -decode_rlimit(struct tcb *tcp, unsigned long addr) +decode_rlimit(struct tcb *const tcp, const kernel_ulong_t addr) { -# if defined(X86_64) || defined(X32) /* * i386 is the only personality on X86_64 and X32 * with 32-bit rlim_t. * When current_personality is X32, current_wordsize * equals to 4 but rlim_t is 64-bit. */ - if (current_personality == 1) -# else - if (current_wordsize == 4) -# endif + if (current_klongsize == 4) print_rlimit32(tcp, addr); else print_rlimit64(tcp, addr); diff --git a/rtc.c b/rtc.c index 7f123e487..43ea94665 100644 --- a/rtc.c +++ b/rtc.c @@ -52,7 +52,7 @@ print_rtc_time(struct tcb *tcp, const struct rtc_time *rt) } static void -decode_rtc_time(struct tcb *tcp, const long addr) +decode_rtc_time(struct tcb *const tcp, const kernel_ulong_t addr) { struct rtc_time rt; @@ -61,7 +61,7 @@ decode_rtc_time(struct tcb *tcp, const long addr) } static void -decode_rtc_wkalrm(struct tcb *tcp, const long addr) +decode_rtc_wkalrm(struct tcb *const tcp, const kernel_ulong_t addr) { struct rtc_wkalrm wk; @@ -73,7 +73,7 @@ decode_rtc_wkalrm(struct tcb *tcp, const long addr) } static void -decode_rtc_pll_info(struct tcb *tcp, const long addr) +decode_rtc_pll_info(struct tcb *const tcp, const kernel_ulong_t addr) { struct_rtc_pll_info pll; @@ -84,8 +84,8 @@ decode_rtc_pll_info(struct tcb *tcp, const long addr) pll.pll_posmult, pll.pll_negmult, (long) pll.pll_clock); } -MPERS_PRINTER_DECL(int, rtc_ioctl, struct tcb *tcp, - const unsigned int code, const long arg) +MPERS_PRINTER_DECL(int, rtc_ioctl, struct tcb *const tcp, + const unsigned int code, const kernel_ulong_t arg) { switch (code) { case RTC_ALM_READ: @@ -100,7 +100,7 @@ MPERS_PRINTER_DECL(int, rtc_ioctl, struct tcb *tcp, break; case RTC_IRQP_SET: case RTC_EPOCH_SET: - tprintf(", %lu", arg); + tprintf(", %" PRI_klu, arg); break; case RTC_IRQP_READ: case RTC_EPOCH_READ: diff --git a/sched.c b/sched.c index 86d4c2228..90242615e 100644 --- a/sched.c +++ b/sched.c @@ -39,7 +39,7 @@ SYS_FUNC(sched_getscheduler) if (entering(tcp)) { tprintf("%d", (int) tcp->u_arg[0]); } else if (!syserror(tcp)) { - tcp->auxstr = xlookup(schedulers, (unsigned long) tcp->u_rval); + tcp->auxstr = xlookup(schedulers, (kernel_ulong_t) tcp->u_rval); if (tcp->auxstr != NULL) return RVAL_STR; } @@ -94,7 +94,8 @@ SYS_FUNC(sched_rr_get_interval) } static void -print_sched_attr(struct tcb *tcp, const long addr, unsigned int size) +print_sched_attr(struct tcb *const tcp, const kernel_ulong_t addr, + unsigned int size) { struct { uint32_t size; diff --git a/scno.am b/scno.am new file mode 100644 index 000000000..12745f12d --- /dev/null +++ b/scno.am @@ -0,0 +1,44 @@ +# scno.h make rules for strace. +# +# Copyright (c) 2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +SCNO_CPPFLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(ARCH_MFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) + +syscallent.i: $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h + $(CPP) -P $(SCNO_CPPFLAGS) $^ -o $@ + +digits = [[:digit:]][[:digit:]]* +al_nums = [[:alnum:]_][[:alnum:]_]* +SCNO_SED = /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 + +scno.h: $(top_srcdir)/scno.head syscallent.i + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + cat $< >> $@-t + LC_ALL=C sed -n '$(SCNO_SED)' $(filter-out $<,$^) >> $@-t + mv $@-t $@ + +CLEANFILES += syscallent.i scno.h diff --git a/scno.h b/scno.h new file mode 100644 index 000000000..9004580d9 --- /dev/null +++ b/scno.h @@ -0,0 +1,1003 @@ +/* Generated by Makefile from scno.head syscallent.i; do not edit. */ +#if defined __X32_SYSCALL_BIT && defined __NR_read \ + && (__X32_SYSCALL_BIT & __NR_read) == __X32_SYSCALL_BIT +# define SYSCALL_BIT __X32_SYSCALL_BIT +#else +# define SYSCALL_BIT 0 +#endif +#ifndef __NR_read +# define __NR_read (SYSCALL_BIT | 0) +#endif +#ifndef __NR_write +# define __NR_write (SYSCALL_BIT | 1) +#endif +#ifndef __NR_open +# define __NR_open (SYSCALL_BIT | 2) +#endif +#ifndef __NR_close +# define __NR_close (SYSCALL_BIT | 3) +#endif +#ifndef __NR_stat +# define __NR_stat (SYSCALL_BIT | 4) +#endif +#ifndef __NR_fstat +# define __NR_fstat (SYSCALL_BIT | 5) +#endif +#ifndef __NR_lstat +# define __NR_lstat (SYSCALL_BIT | 6) +#endif +#ifndef __NR_poll +# define __NR_poll (SYSCALL_BIT | 7) +#endif +#ifndef __NR_lseek +# define __NR_lseek (SYSCALL_BIT | 8) +#endif +#ifndef __NR_mmap +# define __NR_mmap (SYSCALL_BIT | 9) +#endif +#ifndef __NR_mprotect +# define __NR_mprotect (SYSCALL_BIT | 10) +#endif +#ifndef __NR_munmap +# define __NR_munmap (SYSCALL_BIT | 11) +#endif +#ifndef __NR_brk +# define __NR_brk (SYSCALL_BIT | 12) +#endif +#ifndef __NR_rt_sigaction +# define __NR_rt_sigaction (SYSCALL_BIT | 13) +#endif +#ifndef __NR_rt_sigprocmask +# define __NR_rt_sigprocmask (SYSCALL_BIT | 14) +#endif +#ifndef __NR_rt_sigreturn +# define __NR_rt_sigreturn (SYSCALL_BIT | 15) +#endif +#ifndef __NR_ioctl +# define __NR_ioctl (SYSCALL_BIT | 16) +#endif +#ifndef __NR_pread64 +# define __NR_pread64 (SYSCALL_BIT | 17) +#endif +#ifndef __NR_pwrite64 +# define __NR_pwrite64 (SYSCALL_BIT | 18) +#endif +#ifndef __NR_readv +# define __NR_readv (SYSCALL_BIT | 19) +#endif +#ifndef __NR_writev +# define __NR_writev (SYSCALL_BIT | 20) +#endif +#ifndef __NR_access +# define __NR_access (SYSCALL_BIT | 21) +#endif +#ifndef __NR_pipe +# define __NR_pipe (SYSCALL_BIT | 22) +#endif +#ifndef __NR_select +# define __NR_select (SYSCALL_BIT | 23) +#endif +#ifndef __NR_sched_yield +# define __NR_sched_yield (SYSCALL_BIT | 24) +#endif +#ifndef __NR_mremap +# define __NR_mremap (SYSCALL_BIT | 25) +#endif +#ifndef __NR_msync +# define __NR_msync (SYSCALL_BIT | 26) +#endif +#ifndef __NR_mincore +# define __NR_mincore (SYSCALL_BIT | 27) +#endif +#ifndef __NR_madvise +# define __NR_madvise (SYSCALL_BIT | 28) +#endif +#ifndef __NR_shmget +# define __NR_shmget (SYSCALL_BIT | 29) +#endif +#ifndef __NR_shmat +# define __NR_shmat (SYSCALL_BIT | 30) +#endif +#ifndef __NR_shmctl +# define __NR_shmctl (SYSCALL_BIT | 31) +#endif +#ifndef __NR_dup +# define __NR_dup (SYSCALL_BIT | 32) +#endif +#ifndef __NR_dup2 +# define __NR_dup2 (SYSCALL_BIT | 33) +#endif +#ifndef __NR_pause +# define __NR_pause (SYSCALL_BIT | 34) +#endif +#ifndef __NR_nanosleep +# define __NR_nanosleep (SYSCALL_BIT | 35) +#endif +#ifndef __NR_getitimer +# define __NR_getitimer (SYSCALL_BIT | 36) +#endif +#ifndef __NR_alarm +# define __NR_alarm (SYSCALL_BIT | 37) +#endif +#ifndef __NR_setitimer +# define __NR_setitimer (SYSCALL_BIT | 38) +#endif +#ifndef __NR_getpid +# define __NR_getpid (SYSCALL_BIT | 39) +#endif +#ifndef __NR_sendfile +# define __NR_sendfile (SYSCALL_BIT | 40) +#endif +#ifndef __NR_socket +# define __NR_socket (SYSCALL_BIT | 41) +#endif +#ifndef __NR_connect +# define __NR_connect (SYSCALL_BIT | 42) +#endif +#ifndef __NR_accept +# define __NR_accept (SYSCALL_BIT | 43) +#endif +#ifndef __NR_sendto +# define __NR_sendto (SYSCALL_BIT | 44) +#endif +#ifndef __NR_recvfrom +# define __NR_recvfrom (SYSCALL_BIT | 45) +#endif +#ifndef __NR_sendmsg +# define __NR_sendmsg (SYSCALL_BIT | 46) +#endif +#ifndef __NR_recvmsg +# define __NR_recvmsg (SYSCALL_BIT | 47) +#endif +#ifndef __NR_shutdown +# define __NR_shutdown (SYSCALL_BIT | 48) +#endif +#ifndef __NR_bind +# define __NR_bind (SYSCALL_BIT | 49) +#endif +#ifndef __NR_listen +# define __NR_listen (SYSCALL_BIT | 50) +#endif +#ifndef __NR_getsockname +# define __NR_getsockname (SYSCALL_BIT | 51) +#endif +#ifndef __NR_getpeername +# define __NR_getpeername (SYSCALL_BIT | 52) +#endif +#ifndef __NR_socketpair +# define __NR_socketpair (SYSCALL_BIT | 53) +#endif +#ifndef __NR_setsockopt +# define __NR_setsockopt (SYSCALL_BIT | 54) +#endif +#ifndef __NR_getsockopt +# define __NR_getsockopt (SYSCALL_BIT | 55) +#endif +#ifndef __NR_clone +# define __NR_clone (SYSCALL_BIT | 56) +#endif +#ifndef __NR_fork +# define __NR_fork (SYSCALL_BIT | 57) +#endif +#ifndef __NR_vfork +# define __NR_vfork (SYSCALL_BIT | 58) +#endif +#ifndef __NR_execve +# define __NR_execve (SYSCALL_BIT | 59) +#endif +#ifndef __NR_exit +# define __NR_exit (SYSCALL_BIT | 60) +#endif +#ifndef __NR_wait4 +# define __NR_wait4 (SYSCALL_BIT | 61) +#endif +#ifndef __NR_kill +# define __NR_kill (SYSCALL_BIT | 62) +#endif +#ifndef __NR_uname +# define __NR_uname (SYSCALL_BIT | 63) +#endif +#ifndef __NR_semget +# define __NR_semget (SYSCALL_BIT | 64) +#endif +#ifndef __NR_semop +# define __NR_semop (SYSCALL_BIT | 65) +#endif +#ifndef __NR_semctl +# define __NR_semctl (SYSCALL_BIT | 66) +#endif +#ifndef __NR_shmdt +# define __NR_shmdt (SYSCALL_BIT | 67) +#endif +#ifndef __NR_msgget +# define __NR_msgget (SYSCALL_BIT | 68) +#endif +#ifndef __NR_msgsnd +# define __NR_msgsnd (SYSCALL_BIT | 69) +#endif +#ifndef __NR_msgrcv +# define __NR_msgrcv (SYSCALL_BIT | 70) +#endif +#ifndef __NR_msgctl +# define __NR_msgctl (SYSCALL_BIT | 71) +#endif +#ifndef __NR_fcntl +# define __NR_fcntl (SYSCALL_BIT | 72) +#endif +#ifndef __NR_flock +# define __NR_flock (SYSCALL_BIT | 73) +#endif +#ifndef __NR_fsync +# define __NR_fsync (SYSCALL_BIT | 74) +#endif +#ifndef __NR_fdatasync +# define __NR_fdatasync (SYSCALL_BIT | 75) +#endif +#ifndef __NR_truncate +# define __NR_truncate (SYSCALL_BIT | 76) +#endif +#ifndef __NR_ftruncate +# define __NR_ftruncate (SYSCALL_BIT | 77) +#endif +#ifndef __NR_getdents +# define __NR_getdents (SYSCALL_BIT | 78) +#endif +#ifndef __NR_getcwd +# define __NR_getcwd (SYSCALL_BIT | 79) +#endif +#ifndef __NR_chdir +# define __NR_chdir (SYSCALL_BIT | 80) +#endif +#ifndef __NR_fchdir +# define __NR_fchdir (SYSCALL_BIT | 81) +#endif +#ifndef __NR_rename +# define __NR_rename (SYSCALL_BIT | 82) +#endif +#ifndef __NR_mkdir +# define __NR_mkdir (SYSCALL_BIT | 83) +#endif +#ifndef __NR_rmdir +# define __NR_rmdir (SYSCALL_BIT | 84) +#endif +#ifndef __NR_creat +# define __NR_creat (SYSCALL_BIT | 85) +#endif +#ifndef __NR_link +# define __NR_link (SYSCALL_BIT | 86) +#endif +#ifndef __NR_unlink +# define __NR_unlink (SYSCALL_BIT | 87) +#endif +#ifndef __NR_symlink +# define __NR_symlink (SYSCALL_BIT | 88) +#endif +#ifndef __NR_readlink +# define __NR_readlink (SYSCALL_BIT | 89) +#endif +#ifndef __NR_chmod +# define __NR_chmod (SYSCALL_BIT | 90) +#endif +#ifndef __NR_fchmod +# define __NR_fchmod (SYSCALL_BIT | 91) +#endif +#ifndef __NR_chown +# define __NR_chown (SYSCALL_BIT | 92) +#endif +#ifndef __NR_fchown +# define __NR_fchown (SYSCALL_BIT | 93) +#endif +#ifndef __NR_lchown +# define __NR_lchown (SYSCALL_BIT | 94) +#endif +#ifndef __NR_umask +# define __NR_umask (SYSCALL_BIT | 95) +#endif +#ifndef __NR_gettimeofday +# define __NR_gettimeofday (SYSCALL_BIT | 96) +#endif +#ifndef __NR_getrlimit +# define __NR_getrlimit (SYSCALL_BIT | 97) +#endif +#ifndef __NR_getrusage +# define __NR_getrusage (SYSCALL_BIT | 98) +#endif +#ifndef __NR_sysinfo +# define __NR_sysinfo (SYSCALL_BIT | 99) +#endif +#ifndef __NR_times +# define __NR_times (SYSCALL_BIT | 100) +#endif +#ifndef __NR_ptrace +# define __NR_ptrace (SYSCALL_BIT | 101) +#endif +#ifndef __NR_getuid +# define __NR_getuid (SYSCALL_BIT | 102) +#endif +#ifndef __NR_syslog +# define __NR_syslog (SYSCALL_BIT | 103) +#endif +#ifndef __NR_getgid +# define __NR_getgid (SYSCALL_BIT | 104) +#endif +#ifndef __NR_setuid +# define __NR_setuid (SYSCALL_BIT | 105) +#endif +#ifndef __NR_setgid +# define __NR_setgid (SYSCALL_BIT | 106) +#endif +#ifndef __NR_geteuid +# define __NR_geteuid (SYSCALL_BIT | 107) +#endif +#ifndef __NR_getegid +# define __NR_getegid (SYSCALL_BIT | 108) +#endif +#ifndef __NR_setpgid +# define __NR_setpgid (SYSCALL_BIT | 109) +#endif +#ifndef __NR_getppid +# define __NR_getppid (SYSCALL_BIT | 110) +#endif +#ifndef __NR_getpgrp +# define __NR_getpgrp (SYSCALL_BIT | 111) +#endif +#ifndef __NR_setsid +# define __NR_setsid (SYSCALL_BIT | 112) +#endif +#ifndef __NR_setreuid +# define __NR_setreuid (SYSCALL_BIT | 113) +#endif +#ifndef __NR_setregid +# define __NR_setregid (SYSCALL_BIT | 114) +#endif +#ifndef __NR_getgroups +# define __NR_getgroups (SYSCALL_BIT | 115) +#endif +#ifndef __NR_setgroups +# define __NR_setgroups (SYSCALL_BIT | 116) +#endif +#ifndef __NR_setresuid +# define __NR_setresuid (SYSCALL_BIT | 117) +#endif +#ifndef __NR_getresuid +# define __NR_getresuid (SYSCALL_BIT | 118) +#endif +#ifndef __NR_setresgid +# define __NR_setresgid (SYSCALL_BIT | 119) +#endif +#ifndef __NR_getresgid +# define __NR_getresgid (SYSCALL_BIT | 120) +#endif +#ifndef __NR_getpgid +# define __NR_getpgid (SYSCALL_BIT | 121) +#endif +#ifndef __NR_setfsuid +# define __NR_setfsuid (SYSCALL_BIT | 122) +#endif +#ifndef __NR_setfsgid +# define __NR_setfsgid (SYSCALL_BIT | 123) +#endif +#ifndef __NR_getsid +# define __NR_getsid (SYSCALL_BIT | 124) +#endif +#ifndef __NR_capget +# define __NR_capget (SYSCALL_BIT | 125) +#endif +#ifndef __NR_capset +# define __NR_capset (SYSCALL_BIT | 126) +#endif +#ifndef __NR_rt_sigpending +# define __NR_rt_sigpending (SYSCALL_BIT | 127) +#endif +#ifndef __NR_rt_sigtimedwait +# define __NR_rt_sigtimedwait (SYSCALL_BIT | 128) +#endif +#ifndef __NR_rt_sigqueueinfo +# define __NR_rt_sigqueueinfo (SYSCALL_BIT | 129) +#endif +#ifndef __NR_rt_sigsuspend +# define __NR_rt_sigsuspend (SYSCALL_BIT | 130) +#endif +#ifndef __NR_sigaltstack +# define __NR_sigaltstack (SYSCALL_BIT | 131) +#endif +#ifndef __NR_utime +# define __NR_utime (SYSCALL_BIT | 132) +#endif +#ifndef __NR_mknod +# define __NR_mknod (SYSCALL_BIT | 133) +#endif +#ifndef __NR_uselib +# define __NR_uselib (SYSCALL_BIT | 134) +#endif +#ifndef __NR_personality +# define __NR_personality (SYSCALL_BIT | 135) +#endif +#ifndef __NR_ustat +# define __NR_ustat (SYSCALL_BIT | 136) +#endif +#ifndef __NR_statfs +# define __NR_statfs (SYSCALL_BIT | 137) +#endif +#ifndef __NR_fstatfs +# define __NR_fstatfs (SYSCALL_BIT | 138) +#endif +#ifndef __NR_sysfs +# define __NR_sysfs (SYSCALL_BIT | 139) +#endif +#ifndef __NR_getpriority +# define __NR_getpriority (SYSCALL_BIT | 140) +#endif +#ifndef __NR_setpriority +# define __NR_setpriority (SYSCALL_BIT | 141) +#endif +#ifndef __NR_sched_setparam +# define __NR_sched_setparam (SYSCALL_BIT | 142) +#endif +#ifndef __NR_sched_getparam +# define __NR_sched_getparam (SYSCALL_BIT | 143) +#endif +#ifndef __NR_sched_setscheduler +# define __NR_sched_setscheduler (SYSCALL_BIT | 144) +#endif +#ifndef __NR_sched_getscheduler +# define __NR_sched_getscheduler (SYSCALL_BIT | 145) +#endif +#ifndef __NR_sched_get_priority_max +# define __NR_sched_get_priority_max (SYSCALL_BIT | 146) +#endif +#ifndef __NR_sched_get_priority_min +# define __NR_sched_get_priority_min (SYSCALL_BIT | 147) +#endif +#ifndef __NR_sched_rr_get_interval +# define __NR_sched_rr_get_interval (SYSCALL_BIT | 148) +#endif +#ifndef __NR_mlock +# define __NR_mlock (SYSCALL_BIT | 149) +#endif +#ifndef __NR_munlock +# define __NR_munlock (SYSCALL_BIT | 150) +#endif +#ifndef __NR_mlockall +# define __NR_mlockall (SYSCALL_BIT | 151) +#endif +#ifndef __NR_munlockall +# define __NR_munlockall (SYSCALL_BIT | 152) +#endif +#ifndef __NR_vhangup +# define __NR_vhangup (SYSCALL_BIT | 153) +#endif +#ifndef __NR_modify_ldt +# define __NR_modify_ldt (SYSCALL_BIT | 154) +#endif +#ifndef __NR_pivot_root +# define __NR_pivot_root (SYSCALL_BIT | 155) +#endif +#ifndef __NR__sysctl +# define __NR__sysctl (SYSCALL_BIT | 156) +#endif +#ifndef __NR_prctl +# define __NR_prctl (SYSCALL_BIT | 157) +#endif +#ifndef __NR_arch_prctl +# define __NR_arch_prctl (SYSCALL_BIT | 158) +#endif +#ifndef __NR_adjtimex +# define __NR_adjtimex (SYSCALL_BIT | 159) +#endif +#ifndef __NR_setrlimit +# define __NR_setrlimit (SYSCALL_BIT | 160) +#endif +#ifndef __NR_chroot +# define __NR_chroot (SYSCALL_BIT | 161) +#endif +#ifndef __NR_sync +# define __NR_sync (SYSCALL_BIT | 162) +#endif +#ifndef __NR_acct +# define __NR_acct (SYSCALL_BIT | 163) +#endif +#ifndef __NR_settimeofday +# define __NR_settimeofday (SYSCALL_BIT | 164) +#endif +#ifndef __NR_mount +# define __NR_mount (SYSCALL_BIT | 165) +#endif +#ifndef __NR_umount2 +# define __NR_umount2 (SYSCALL_BIT | 166) +#endif +#ifndef __NR_swapon +# define __NR_swapon (SYSCALL_BIT | 167) +#endif +#ifndef __NR_swapoff +# define __NR_swapoff (SYSCALL_BIT | 168) +#endif +#ifndef __NR_reboot +# define __NR_reboot (SYSCALL_BIT | 169) +#endif +#ifndef __NR_sethostname +# define __NR_sethostname (SYSCALL_BIT | 170) +#endif +#ifndef __NR_setdomainname +# define __NR_setdomainname (SYSCALL_BIT | 171) +#endif +#ifndef __NR_iopl +# define __NR_iopl (SYSCALL_BIT | 172) +#endif +#ifndef __NR_ioperm +# define __NR_ioperm (SYSCALL_BIT | 173) +#endif +#ifndef __NR_create_module +# define __NR_create_module (SYSCALL_BIT | 174) +#endif +#ifndef __NR_init_module +# define __NR_init_module (SYSCALL_BIT | 175) +#endif +#ifndef __NR_delete_module +# define __NR_delete_module (SYSCALL_BIT | 176) +#endif +#ifndef __NR_get_kernel_syms +# define __NR_get_kernel_syms (SYSCALL_BIT | 177) +#endif +#ifndef __NR_query_module +# define __NR_query_module (SYSCALL_BIT | 178) +#endif +#ifndef __NR_quotactl +# define __NR_quotactl (SYSCALL_BIT | 179) +#endif +#ifndef __NR_nfsservctl +# define __NR_nfsservctl (SYSCALL_BIT | 180) +#endif +#ifndef __NR_getpmsg +# define __NR_getpmsg (SYSCALL_BIT | 181) +#endif +#ifndef __NR_putpmsg +# define __NR_putpmsg (SYSCALL_BIT | 182) +#endif +#ifndef __NR_afs_syscall +# define __NR_afs_syscall (SYSCALL_BIT | 183) +#endif +#ifndef __NR_tuxcall +# define __NR_tuxcall (SYSCALL_BIT | 184) +#endif +#ifndef __NR_security +# define __NR_security (SYSCALL_BIT | 185) +#endif +#ifndef __NR_gettid +# define __NR_gettid (SYSCALL_BIT | 186) +#endif +#ifndef __NR_readahead +# define __NR_readahead (SYSCALL_BIT | 187) +#endif +#ifndef __NR_setxattr +# define __NR_setxattr (SYSCALL_BIT | 188) +#endif +#ifndef __NR_lsetxattr +# define __NR_lsetxattr (SYSCALL_BIT | 189) +#endif +#ifndef __NR_fsetxattr +# define __NR_fsetxattr (SYSCALL_BIT | 190) +#endif +#ifndef __NR_getxattr +# define __NR_getxattr (SYSCALL_BIT | 191) +#endif +#ifndef __NR_lgetxattr +# define __NR_lgetxattr (SYSCALL_BIT | 192) +#endif +#ifndef __NR_fgetxattr +# define __NR_fgetxattr (SYSCALL_BIT | 193) +#endif +#ifndef __NR_listxattr +# define __NR_listxattr (SYSCALL_BIT | 194) +#endif +#ifndef __NR_llistxattr +# define __NR_llistxattr (SYSCALL_BIT | 195) +#endif +#ifndef __NR_flistxattr +# define __NR_flistxattr (SYSCALL_BIT | 196) +#endif +#ifndef __NR_removexattr +# define __NR_removexattr (SYSCALL_BIT | 197) +#endif +#ifndef __NR_lremovexattr +# define __NR_lremovexattr (SYSCALL_BIT | 198) +#endif +#ifndef __NR_fremovexattr +# define __NR_fremovexattr (SYSCALL_BIT | 199) +#endif +#ifndef __NR_tkill +# define __NR_tkill (SYSCALL_BIT | 200) +#endif +#ifndef __NR_time +# define __NR_time (SYSCALL_BIT | 201) +#endif +#ifndef __NR_futex +# define __NR_futex (SYSCALL_BIT | 202) +#endif +#ifndef __NR_sched_setaffinity +# define __NR_sched_setaffinity (SYSCALL_BIT | 203) +#endif +#ifndef __NR_sched_getaffinity +# define __NR_sched_getaffinity (SYSCALL_BIT | 204) +#endif +#ifndef __NR_set_thread_area +# define __NR_set_thread_area (SYSCALL_BIT | 205) +#endif +#ifndef __NR_io_setup +# define __NR_io_setup (SYSCALL_BIT | 206) +#endif +#ifndef __NR_io_destroy +# define __NR_io_destroy (SYSCALL_BIT | 207) +#endif +#ifndef __NR_io_getevents +# define __NR_io_getevents (SYSCALL_BIT | 208) +#endif +#ifndef __NR_io_submit +# define __NR_io_submit (SYSCALL_BIT | 209) +#endif +#ifndef __NR_io_cancel +# define __NR_io_cancel (SYSCALL_BIT | 210) +#endif +#ifndef __NR_get_thread_area +# define __NR_get_thread_area (SYSCALL_BIT | 211) +#endif +#ifndef __NR_lookup_dcookie +# define __NR_lookup_dcookie (SYSCALL_BIT | 212) +#endif +#ifndef __NR_epoll_create +# define __NR_epoll_create (SYSCALL_BIT | 213) +#endif +#ifndef __NR_epoll_ctl_old +# define __NR_epoll_ctl_old (SYSCALL_BIT | 214) +#endif +#ifndef __NR_epoll_wait_old +# define __NR_epoll_wait_old (SYSCALL_BIT | 215) +#endif +#ifndef __NR_remap_file_pages +# define __NR_remap_file_pages (SYSCALL_BIT | 216) +#endif +#ifndef __NR_getdents64 +# define __NR_getdents64 (SYSCALL_BIT | 217) +#endif +#ifndef __NR_set_tid_address +# define __NR_set_tid_address (SYSCALL_BIT | 218) +#endif +#ifndef __NR_restart_syscall +# define __NR_restart_syscall (SYSCALL_BIT | 219) +#endif +#ifndef __NR_semtimedop +# define __NR_semtimedop (SYSCALL_BIT | 220) +#endif +#ifndef __NR_fadvise64 +# define __NR_fadvise64 (SYSCALL_BIT | 221) +#endif +#ifndef __NR_timer_create +# define __NR_timer_create (SYSCALL_BIT | 222) +#endif +#ifndef __NR_timer_settime +# define __NR_timer_settime (SYSCALL_BIT | 223) +#endif +#ifndef __NR_timer_gettime +# define __NR_timer_gettime (SYSCALL_BIT | 224) +#endif +#ifndef __NR_timer_getoverrun +# define __NR_timer_getoverrun (SYSCALL_BIT | 225) +#endif +#ifndef __NR_timer_delete +# define __NR_timer_delete (SYSCALL_BIT | 226) +#endif +#ifndef __NR_clock_settime +# define __NR_clock_settime (SYSCALL_BIT | 227) +#endif +#ifndef __NR_clock_gettime +# define __NR_clock_gettime (SYSCALL_BIT | 228) +#endif +#ifndef __NR_clock_getres +# define __NR_clock_getres (SYSCALL_BIT | 229) +#endif +#ifndef __NR_clock_nanosleep +# define __NR_clock_nanosleep (SYSCALL_BIT | 230) +#endif +#ifndef __NR_exit_group +# define __NR_exit_group (SYSCALL_BIT | 231) +#endif +#ifndef __NR_epoll_wait +# define __NR_epoll_wait (SYSCALL_BIT | 232) +#endif +#ifndef __NR_epoll_ctl +# define __NR_epoll_ctl (SYSCALL_BIT | 233) +#endif +#ifndef __NR_tgkill +# define __NR_tgkill (SYSCALL_BIT | 234) +#endif +#ifndef __NR_utimes +# define __NR_utimes (SYSCALL_BIT | 235) +#endif +#ifndef __NR_vserver +# define __NR_vserver (SYSCALL_BIT | 236) +#endif +#ifndef __NR_mbind +# define __NR_mbind (SYSCALL_BIT | 237) +#endif +#ifndef __NR_set_mempolicy +# define __NR_set_mempolicy (SYSCALL_BIT | 238) +#endif +#ifndef __NR_get_mempolicy +# define __NR_get_mempolicy (SYSCALL_BIT | 239) +#endif +#ifndef __NR_mq_open +# define __NR_mq_open (SYSCALL_BIT | 240) +#endif +#ifndef __NR_mq_unlink +# define __NR_mq_unlink (SYSCALL_BIT | 241) +#endif +#ifndef __NR_mq_timedsend +# define __NR_mq_timedsend (SYSCALL_BIT | 242) +#endif +#ifndef __NR_mq_timedreceive +# define __NR_mq_timedreceive (SYSCALL_BIT | 243) +#endif +#ifndef __NR_mq_notify +# define __NR_mq_notify (SYSCALL_BIT | 244) +#endif +#ifndef __NR_mq_getsetattr +# define __NR_mq_getsetattr (SYSCALL_BIT | 245) +#endif +#ifndef __NR_kexec_load +# define __NR_kexec_load (SYSCALL_BIT | 246) +#endif +#ifndef __NR_waitid +# define __NR_waitid (SYSCALL_BIT | 247) +#endif +#ifndef __NR_add_key +# define __NR_add_key (SYSCALL_BIT | 248) +#endif +#ifndef __NR_request_key +# define __NR_request_key (SYSCALL_BIT | 249) +#endif +#ifndef __NR_keyctl +# define __NR_keyctl (SYSCALL_BIT | 250) +#endif +#ifndef __NR_ioprio_set +# define __NR_ioprio_set (SYSCALL_BIT | 251) +#endif +#ifndef __NR_ioprio_get +# define __NR_ioprio_get (SYSCALL_BIT | 252) +#endif +#ifndef __NR_inotify_init +# define __NR_inotify_init (SYSCALL_BIT | 253) +#endif +#ifndef __NR_inotify_add_watch +# define __NR_inotify_add_watch (SYSCALL_BIT | 254) +#endif +#ifndef __NR_inotify_rm_watch +# define __NR_inotify_rm_watch (SYSCALL_BIT | 255) +#endif +#ifndef __NR_migrate_pages +# define __NR_migrate_pages (SYSCALL_BIT | 256) +#endif +#ifndef __NR_openat +# define __NR_openat (SYSCALL_BIT | 257) +#endif +#ifndef __NR_mkdirat +# define __NR_mkdirat (SYSCALL_BIT | 258) +#endif +#ifndef __NR_mknodat +# define __NR_mknodat (SYSCALL_BIT | 259) +#endif +#ifndef __NR_fchownat +# define __NR_fchownat (SYSCALL_BIT | 260) +#endif +#ifndef __NR_futimesat +# define __NR_futimesat (SYSCALL_BIT | 261) +#endif +#ifndef __NR_newfstatat +# define __NR_newfstatat (SYSCALL_BIT | 262) +#endif +#ifndef __NR_unlinkat +# define __NR_unlinkat (SYSCALL_BIT | 263) +#endif +#ifndef __NR_renameat +# define __NR_renameat (SYSCALL_BIT | 264) +#endif +#ifndef __NR_linkat +# define __NR_linkat (SYSCALL_BIT | 265) +#endif +#ifndef __NR_symlinkat +# define __NR_symlinkat (SYSCALL_BIT | 266) +#endif +#ifndef __NR_readlinkat +# define __NR_readlinkat (SYSCALL_BIT | 267) +#endif +#ifndef __NR_fchmodat +# define __NR_fchmodat (SYSCALL_BIT | 268) +#endif +#ifndef __NR_faccessat +# define __NR_faccessat (SYSCALL_BIT | 269) +#endif +#ifndef __NR_pselect6 +# define __NR_pselect6 (SYSCALL_BIT | 270) +#endif +#ifndef __NR_ppoll +# define __NR_ppoll (SYSCALL_BIT | 271) +#endif +#ifndef __NR_unshare +# define __NR_unshare (SYSCALL_BIT | 272) +#endif +#ifndef __NR_set_robust_list +# define __NR_set_robust_list (SYSCALL_BIT | 273) +#endif +#ifndef __NR_get_robust_list +# define __NR_get_robust_list (SYSCALL_BIT | 274) +#endif +#ifndef __NR_splice +# define __NR_splice (SYSCALL_BIT | 275) +#endif +#ifndef __NR_tee +# define __NR_tee (SYSCALL_BIT | 276) +#endif +#ifndef __NR_sync_file_range +# define __NR_sync_file_range (SYSCALL_BIT | 277) +#endif +#ifndef __NR_vmsplice +# define __NR_vmsplice (SYSCALL_BIT | 278) +#endif +#ifndef __NR_move_pages +# define __NR_move_pages (SYSCALL_BIT | 279) +#endif +#ifndef __NR_utimensat +# define __NR_utimensat (SYSCALL_BIT | 280) +#endif +#ifndef __NR_epoll_pwait +# define __NR_epoll_pwait (SYSCALL_BIT | 281) +#endif +#ifndef __NR_signalfd +# define __NR_signalfd (SYSCALL_BIT | 282) +#endif +#ifndef __NR_timerfd_create +# define __NR_timerfd_create (SYSCALL_BIT | 283) +#endif +#ifndef __NR_eventfd +# define __NR_eventfd (SYSCALL_BIT | 284) +#endif +#ifndef __NR_fallocate +# define __NR_fallocate (SYSCALL_BIT | 285) +#endif +#ifndef __NR_timerfd_settime +# define __NR_timerfd_settime (SYSCALL_BIT | 286) +#endif +#ifndef __NR_timerfd_gettime +# define __NR_timerfd_gettime (SYSCALL_BIT | 287) +#endif +#ifndef __NR_accept4 +# define __NR_accept4 (SYSCALL_BIT | 288) +#endif +#ifndef __NR_signalfd4 +# define __NR_signalfd4 (SYSCALL_BIT | 289) +#endif +#ifndef __NR_eventfd2 +# define __NR_eventfd2 (SYSCALL_BIT | 290) +#endif +#ifndef __NR_epoll_create1 +# define __NR_epoll_create1 (SYSCALL_BIT | 291) +#endif +#ifndef __NR_dup3 +# define __NR_dup3 (SYSCALL_BIT | 292) +#endif +#ifndef __NR_pipe2 +# define __NR_pipe2 (SYSCALL_BIT | 293) +#endif +#ifndef __NR_inotify_init1 +# define __NR_inotify_init1 (SYSCALL_BIT | 294) +#endif +#ifndef __NR_preadv +# define __NR_preadv (SYSCALL_BIT | 295) +#endif +#ifndef __NR_pwritev +# define __NR_pwritev (SYSCALL_BIT | 296) +#endif +#ifndef __NR_rt_tgsigqueueinfo +# define __NR_rt_tgsigqueueinfo (SYSCALL_BIT | 297) +#endif +#ifndef __NR_perf_event_open +# define __NR_perf_event_open (SYSCALL_BIT | 298) +#endif +#ifndef __NR_recvmmsg +# define __NR_recvmmsg (SYSCALL_BIT | 299) +#endif +#ifndef __NR_fanotify_init +# define __NR_fanotify_init (SYSCALL_BIT | 300) +#endif +#ifndef __NR_fanotify_mark +# define __NR_fanotify_mark (SYSCALL_BIT | 301) +#endif +#ifndef __NR_prlimit64 +# define __NR_prlimit64 (SYSCALL_BIT | 302) +#endif +#ifndef __NR_name_to_handle_at +# define __NR_name_to_handle_at (SYSCALL_BIT | 303) +#endif +#ifndef __NR_open_by_handle_at +# define __NR_open_by_handle_at (SYSCALL_BIT | 304) +#endif +#ifndef __NR_clock_adjtime +# define __NR_clock_adjtime (SYSCALL_BIT | 305) +#endif +#ifndef __NR_syncfs +# define __NR_syncfs (SYSCALL_BIT | 306) +#endif +#ifndef __NR_sendmmsg +# define __NR_sendmmsg (SYSCALL_BIT | 307) +#endif +#ifndef __NR_setns +# define __NR_setns (SYSCALL_BIT | 308) +#endif +#ifndef __NR_getcpu +# define __NR_getcpu (SYSCALL_BIT | 309) +#endif +#ifndef __NR_process_vm_readv +# define __NR_process_vm_readv (SYSCALL_BIT | 310) +#endif +#ifndef __NR_process_vm_writev +# define __NR_process_vm_writev (SYSCALL_BIT | 311) +#endif +#ifndef __NR_kcmp +# define __NR_kcmp (SYSCALL_BIT | 312) +#endif +#ifndef __NR_finit_module +# define __NR_finit_module (SYSCALL_BIT | 313) +#endif +#ifndef __NR_sched_setattr +# define __NR_sched_setattr (SYSCALL_BIT | 314) +#endif +#ifndef __NR_sched_getattr +# define __NR_sched_getattr (SYSCALL_BIT | 315) +#endif +#ifndef __NR_renameat2 +# define __NR_renameat2 (SYSCALL_BIT | 316) +#endif +#ifndef __NR_seccomp +# define __NR_seccomp (SYSCALL_BIT | 317) +#endif +#ifndef __NR_getrandom +# define __NR_getrandom (SYSCALL_BIT | 318) +#endif +#ifndef __NR_memfd_create +# define __NR_memfd_create (SYSCALL_BIT | 319) +#endif +#ifndef __NR_kexec_file_load +# define __NR_kexec_file_load (SYSCALL_BIT | 320) +#endif +#ifndef __NR_bpf +# define __NR_bpf (SYSCALL_BIT | 321) +#endif +#ifndef __NR_execveat +# define __NR_execveat (SYSCALL_BIT | 322) +#endif +#ifndef __NR_userfaultfd +# define __NR_userfaultfd (SYSCALL_BIT | 323) +#endif +#ifndef __NR_membarrier +# define __NR_membarrier (SYSCALL_BIT | 324) +#endif +#ifndef __NR_mlock2 +# define __NR_mlock2 (SYSCALL_BIT | 325) +#endif +#ifndef __NR_copy_file_range +# define __NR_copy_file_range (SYSCALL_BIT | 326) +#endif +#ifndef __NR_preadv2 +# define __NR_preadv2 (SYSCALL_BIT | 327) +#endif +#ifndef __NR_pwritev2 +# define __NR_pwritev2 (SYSCALL_BIT | 328) +#endif +#ifndef __NR_pkey_mprotect +# define __NR_pkey_mprotect (SYSCALL_BIT | 329) +#endif +#ifndef __NR_pkey_alloc +# define __NR_pkey_alloc (SYSCALL_BIT | 330) +#endif +#ifndef __NR_pkey_free +# define __NR_pkey_free (SYSCALL_BIT | 331) +#endif diff --git a/scno.head b/scno.head new file mode 100644 index 000000000..a640102f2 --- /dev/null +++ b/scno.head @@ -0,0 +1,6 @@ +#if defined __X32_SYSCALL_BIT && defined __NR_read \ + && (__X32_SYSCALL_BIT & __NR_read) == __X32_SYSCALL_BIT +# define SYSCALL_BIT __X32_SYSCALL_BIT +#else +# define SYSCALL_BIT 0 +#endif diff --git a/scsi.c b/scsi.c index 979c3428d..357962011 100644 --- a/scsi.c +++ b/scsi.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2007 Vladimir Nadvornik - * Copyright (c) 2007 Dmitry V. Levin + * Copyright (c) 2007-2017 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,255 +29,155 @@ #include "defs.h" #ifdef HAVE_SCSI_SG_H - -# include # include +#endif -# include "xlat/sg_io_dxfer_direction.h" - -# ifdef HAVE_LINUX_BSG_H -# include -# include -# include "xlat/bsg_protocol.h" -# include "xlat/bsg_subprotocol.h" -# endif - -static bool -print_uchar(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) -{ - tprintf("%02x", (unsigned int) (* (unsigned char *) elem_buf)); - - return true; -} - -static void -print_sg_io_buffer(struct tcb *tcp, const unsigned long addr, const unsigned int len) -{ - unsigned char buf; - - print_array(tcp, addr, len, &buf, sizeof(buf), - umoven_or_printaddr, print_uchar, 0); -} +#include "xlat/scsi_sg_commands.h" +#include "xlat/sg_scsi_reset.h" static int -print_sg_io_v3_req(struct tcb *tcp, const long arg) -{ - struct sg_io_hdr sg_io; - - if (umove(tcp, arg, &sg_io) < 0) { - tprints("???}"); - return RVAL_DECODED | 1; - } - - printxval(sg_io_dxfer_direction, sg_io.dxfer_direction, - "SG_DXFER_???"); - tprintf(", cmd[%u]=", sg_io.cmd_len); - print_sg_io_buffer(tcp, (unsigned long) sg_io.cmdp, sg_io.cmd_len); - tprintf(", mx_sb_len=%d", sg_io.mx_sb_len); - tprintf(", iovec_count=%d", sg_io.iovec_count); - tprintf(", dxfer_len=%u", sg_io.dxfer_len); - tprintf(", timeout=%u", sg_io.timeout); - tprintf(", flags=%#x", sg_io.flags); - - if (sg_io.dxfer_direction == SG_DXFER_TO_DEV || - sg_io.dxfer_direction == SG_DXFER_TO_FROM_DEV) { - tprintf(", data[%u]=", sg_io.dxfer_len); - if (sg_io.iovec_count) - tprint_iov_upto(tcp, sg_io.iovec_count, - (unsigned long) sg_io.dxferp, - IOV_DECODE_STR, - sg_io.dxfer_len); - else - print_sg_io_buffer(tcp, (unsigned long) sg_io.dxferp, - sg_io.dxfer_len); - } - return 1; -} - -static void -print_sg_io_v3_res(struct tcb *tcp, const long arg) +decode_sg_io(struct tcb *const tcp, const uint32_t iid, + const kernel_ulong_t arg) { - struct sg_io_hdr sg_io; - - if (umove(tcp, arg, &sg_io) < 0) { - tprints(", ???"); - return; + switch (iid) { + case 'S': + return decode_sg_io_v3(tcp, arg); + case 'Q': + return decode_sg_io_v4(tcp, arg); + default: + tprintf("[%u]", iid); + return RVAL_DECODED | 1; } - if (sg_io.dxfer_direction == SG_DXFER_FROM_DEV || - sg_io.dxfer_direction == SG_DXFER_TO_FROM_DEV) { - uint32_t din_len = sg_io.dxfer_len; - - if (sg_io.resid > 0) - din_len -= sg_io.resid; - tprintf(", data[%u]=", din_len); - if (sg_io.iovec_count) - tprint_iov_upto(tcp, sg_io.iovec_count, - (unsigned long) sg_io.dxferp, - IOV_DECODE_STR, - din_len); - else - print_sg_io_buffer(tcp, (unsigned long) sg_io.dxferp, - din_len); - } - tprintf(", status=%02x", sg_io.status); - tprintf(", masked_status=%02x", sg_io.masked_status); - tprintf(", sb[%u]=", sg_io.sb_len_wr); - print_sg_io_buffer(tcp, (unsigned long) sg_io.sbp, sg_io.sb_len_wr); - tprintf(", host_status=%#x", sg_io.host_status); - tprintf(", driver_status=%#x", sg_io.driver_status); - tprintf(", resid=%d", sg_io.resid); - tprintf(", duration=%d", sg_io.duration); - tprintf(", info=%#x", sg_io.info); } -#ifdef HAVE_LINUX_BSG_H +#ifdef HAVE_SCSI_SG_H static int -print_sg_io_v4_req(struct tcb *tcp, const long arg) +decode_sg_scsi_id(struct tcb *const tcp, const kernel_ulong_t arg) { - struct sg_io_v4 sg_io; + struct sg_scsi_id id; - if (umove(tcp, arg, &sg_io) < 0) { - tprints("???}"); - return RVAL_DECODED | 1; - } + if (entering(tcp)) + return 0; - printxval(bsg_protocol, sg_io.protocol, "BSG_PROTOCOL_???"); tprints(", "); - printxval(bsg_subprotocol, sg_io.subprotocol, "BSG_SUB_PROTOCOL_???"); - tprintf(", request[%u]=", sg_io.request_len); - print_sg_io_buffer(tcp, sg_io.request, sg_io.request_len); - tprintf(", request_tag=%" PRI__u64, sg_io.request_tag); - tprintf(", request_attr=%u", sg_io.request_attr); - tprintf(", request_priority=%u", sg_io.request_priority); - tprintf(", request_extra=%u", sg_io.request_extra); - tprintf(", max_response_len=%u", sg_io.max_response_len); - - tprintf(", dout_iovec_count=%u", sg_io.dout_iovec_count); - tprintf(", dout_xfer_len=%u", sg_io.dout_xfer_len); - tprintf(", din_iovec_count=%u", sg_io.din_iovec_count); - tprintf(", din_xfer_len=%u", sg_io.din_xfer_len); - tprintf(", timeout=%u", sg_io.timeout); - tprintf(", flags=%u", sg_io.flags); - tprintf(", usr_ptr=%" PRI__u64, sg_io.usr_ptr); - tprintf(", spare_in=%u", sg_io.spare_in); - tprintf(", dout[%u]=", sg_io.dout_xfer_len); - if (sg_io.dout_iovec_count) - tprint_iov_upto(tcp, sg_io.dout_iovec_count, sg_io.dout_xferp, - IOV_DECODE_STR, sg_io.dout_xfer_len); - else - print_sg_io_buffer(tcp, sg_io.dout_xferp, sg_io.dout_xfer_len); - return 1; -} - -static void -print_sg_io_v4_res(struct tcb *tcp, const long arg) -{ - struct sg_io_v4 sg_io; - uint32_t din_len; - - if (umove(tcp, arg, &sg_io) < 0) { - tprints(", ???"); - return; + if (!umove_or_printaddr(tcp, arg, &id)) { + tprintf("{host_no=%d" + ", channel=%d" + ", scsi_id=%#x" + ", lun=%d" + ", scsi_type=%#x" + ", h_cmd_per_lun=%hd" + ", d_queue_depth=%hd}", + id.host_no, + id.channel, + id.scsi_id, + id.lun, + id.scsi_type, + id.h_cmd_per_lun, + id.d_queue_depth); } - - tprintf(", response[%u]=", sg_io.response_len); - print_sg_io_buffer(tcp, sg_io.response, sg_io.response_len); - din_len = sg_io.din_xfer_len; - if (sg_io.din_resid > 0) - din_len -= sg_io.din_resid; - tprintf(", din[%u]=", din_len); - if (sg_io.din_iovec_count) - tprint_iov_upto(tcp, sg_io.din_iovec_count, sg_io.din_xferp, - IOV_DECODE_STR, din_len); - else - print_sg_io_buffer(tcp, sg_io.din_xferp, din_len); - tprintf(", driver_status=%u", sg_io.driver_status); - tprintf(", transport_status=%u", sg_io.transport_status); - tprintf(", device_status=%u", sg_io.device_status); - tprintf(", retry_delay=%u", sg_io.retry_delay); - tprintf(", info=%u", sg_io.info); - tprintf(", duration=%u", sg_io.duration); - tprintf(", response_len=%u", sg_io.response_len); - tprintf(", din_resid=%u", sg_io.din_resid); - tprintf(", dout_resid=%u", sg_io.dout_resid); - tprintf(", generated_tag=%" PRI__u64, sg_io.generated_tag); - tprintf(", spare_out=%u", sg_io.spare_out); -} - -#else /* !HAVE_LINUX_BSG_H */ - -static int -print_sg_io_v4_req(struct tcb *tcp, const long arg) -{ - tprints("...}"); return RVAL_DECODED | 1; } -static void -print_sg_io_v4_res(struct tcb *tcp, const long arg) +#endif /* HAVE_SCSI_SG_H */ + +int +scsi_ioctl(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) { -} + switch (code) { + case SG_IO: + if (entering(tcp)) { + uint32_t iid; + + tprints(", "); + if (umove_or_printaddr(tcp, arg, &iid)) { + break; + } else { + return decode_sg_io(tcp, iid, arg); + } + } else { + uint32_t *piid = get_tcb_priv_data(tcp); + if (piid) + decode_sg_io(tcp, *piid, arg); + tprints("}"); + break; + } -#endif +#ifdef HAVE_SCSI_SG_H + /* returns struct sg_scsi_id */ + case SG_GET_SCSI_ID: + return decode_sg_scsi_id(tcp, arg); + /* returns struct sg_req_info */ + case SG_GET_REQUEST_TABLE: + return decode_sg_req_info(tcp, arg); +#endif /* HAVE_SCSI_SG_H */ -static int -print_sg_io_req(struct tcb *tcp, uint32_t iid, const long arg) -{ - tprintf("{'%c', ", iid); + /* takes a value by pointer */ + case SG_SCSI_RESET: { + unsigned int val; + tprints(", "); + if (!umove_or_printaddr(tcp, arg, &val)) { + tprints("["); + if (val & SG_SCSI_RESET_NO_ESCALATE) { + printxval(sg_scsi_reset, + SG_SCSI_RESET_NO_ESCALATE, 0); + tprints("|"); + } + printxval(sg_scsi_reset, + val & ~SG_SCSI_RESET_NO_ESCALATE, + "SG_SCSI_RESET_???"); + tprints("]"); - switch (iid) { - case 'S': - return print_sg_io_v3_req(tcp, arg); - case 'Q': - return print_sg_io_v4_req(tcp, arg); - default: - tprints("...}"); - return RVAL_DECODED | 1; + } + break; } -} + /* takes a signed int by pointer */ + case SG_NEXT_CMD_LEN: + case SG_SET_COMMAND_Q: + case SG_SET_DEBUG: + case SG_SET_FORCE_LOW_DMA: + case SG_SET_FORCE_PACK_ID: + case SG_SET_KEEP_ORPHAN: + case SG_SET_RESERVED_SIZE: + case SG_SET_TIMEOUT: + tprints(", "); + printnum_int(tcp, arg, "%d"); + break; -static void -print_sg_io_res(struct tcb *tcp, uint32_t iid, const long arg) -{ - switch (iid) { - case 'S': - print_sg_io_v3_res(tcp, arg); + /* returns a signed int by pointer */ + case SG_EMULATED_HOST: + case SG_GET_ACCESS_COUNT: + case SG_GET_COMMAND_Q: + case SG_GET_KEEP_ORPHAN: + case SG_GET_LOW_DMA: + case SG_GET_NUM_WAITING: + case SG_GET_PACK_ID: + case SG_GET_RESERVED_SIZE: + case SG_GET_SG_TABLESIZE: + case SG_GET_TRANSFORM: + case SG_GET_VERSION_NUM: + if (entering(tcp)) + return 0; + tprints(", "); + printnum_int(tcp, arg, "%d"); break; - case 'Q': - print_sg_io_v4_res(tcp, arg); + + /* takes an integer by value */ + case SG_SET_TRANSFORM: + tprintf(", %#x", (unsigned int) arg); break; - } -} -int -scsi_ioctl(struct tcb *tcp, const unsigned int code, const long arg) -{ - uint32_t iid; + /* no arguments */ + case SG_GET_TIMEOUT: + break; - if (SG_IO != code) + default: return RVAL_DECODED; - - if (entering(tcp)) { - tprints(", "); - if (!arg || umove(tcp, arg, &iid) < 0) { - printaddr(arg); - return RVAL_DECODED | 1; - } else { - return print_sg_io_req(tcp, iid, arg); - } - } else { - if (!syserror(tcp)) { - if (umove(tcp, arg, &iid) < 0) - tprints(", ???"); - else - print_sg_io_res(tcp, iid, arg); - } - tprints("}"); - return RVAL_DECODED | 1; } -} -#endif /* HAVE_SCSI_SG_H */ + return RVAL_DECODED | 1; +} diff --git a/seccomp.c b/seccomp.c index 4d8d7e4b2..f778a6c4e 100644 --- a/seccomp.c +++ b/seccomp.c @@ -172,7 +172,8 @@ print_bpf_filter(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) } void -print_seccomp_fprog(struct tcb *tcp, unsigned long addr, unsigned short len) +print_seccomp_fprog(struct tcb *const tcp, const kernel_ulong_t addr, + const unsigned short len) { if (abbrev(tcp)) { printaddr(addr); @@ -188,7 +189,7 @@ print_seccomp_fprog(struct tcb *tcp, unsigned long addr, unsigned short len) #include "seccomp_fprog.h" void -print_seccomp_filter(struct tcb *tcp, unsigned long addr) +print_seccomp_filter(struct tcb *const tcp, const kernel_ulong_t addr) { struct seccomp_fprog fprog; @@ -200,7 +201,8 @@ print_seccomp_filter(struct tcb *tcp, unsigned long addr) } static void -decode_seccomp_set_mode_strict(unsigned int flags, unsigned long addr) +decode_seccomp_set_mode_strict(const unsigned int flags, + const kernel_ulong_t addr) { tprintf("%u, ", flags); printaddr(addr); diff --git a/sen.h b/sen.h index f30034408..7cee717ff 100644 --- a/sen.h +++ b/sen.h @@ -229,6 +229,9 @@ SEN_personality, SEN_pipe, SEN_pipe2, SEN_pivotroot, +SEN_pkey_alloc, +SEN_pkey_free, +SEN_pkey_mprotect, SEN_poll, SEN_ppoll, SEN_prctl, diff --git a/sendfile.c b/sendfile.c index 97fd7c50a..7faf1ca27 100644 --- a/sendfile.c +++ b/sendfile.c @@ -35,7 +35,7 @@ SYS_FUNC(sendfile64) printfd(tcp, tcp->u_arg[1]); tprints(", "); if (!printnum_int64(tcp, tcp->u_arg[2], "%" PRIu64)) { - tprintf(", %lu", tcp->u_arg[3]); + tprintf(", %" PRI_klu, tcp->u_arg[3]); return RVAL_DECODED; } } else { @@ -43,7 +43,7 @@ SYS_FUNC(sendfile64) tprints(" => "); printnum_int64(tcp, tcp->u_arg[2], "%" PRIu64); } - tprintf(", %lu", tcp->u_arg[3]); + tprintf(", %" PRI_klu, tcp->u_arg[3]); } return 0; @@ -58,7 +58,7 @@ SYS_FUNC(sendfile) tprints(", "); if (!printnum_ulong(tcp, tcp->u_arg[2]) || !tcp->u_arg[3]) { - tprintf(", %lu", tcp->u_arg[3]); + tprintf(", %" PRI_klu, tcp->u_arg[3]); return RVAL_DECODED; } } else { @@ -66,7 +66,7 @@ SYS_FUNC(sendfile) tprints(" => "); printnum_ulong(tcp, tcp->u_arg[2]); } - tprintf(", %lu", tcp->u_arg[3]); + tprintf(", %" PRI_klu, tcp->u_arg[3]); } return 0; diff --git a/sg_io_v3.c b/sg_io_v3.c new file mode 100644 index 000000000..33aff5066 --- /dev/null +++ b/sg_io_v3.c @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2007 Vladimir Nadvornik + * Copyright (c) 2007-2017 Dmitry V. Levin + * Copyright (c) 2015 Bart Van Assche + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_SCSI_SG_H + +#include DEF_MPERS_TYPE(struct_sg_io_hdr) + +# include + +typedef struct sg_io_hdr struct_sg_io_hdr; + +#endif /* HAVE_SCSI_SG_H */ + +#include MPERS_DEFS + +#include "xlat/sg_io_info.h" + +#ifdef HAVE_SCSI_SG_H +# include "xlat/sg_io_dxfer_direction.h" +# include "xlat/sg_io_flags.h" + +static void +print_sg_io_buffer(struct tcb *const tcp, const kernel_ulong_t addr, + const unsigned int data_size, const unsigned int iovec_count) +{ + if (iovec_count) { + tprint_iov_upto(tcp, iovec_count, addr, IOV_DECODE_STR, + data_size); + } else { + printstr_ex(tcp, addr, data_size, QUOTE_FORCE_HEX); + } +} + +static int +decode_request(struct tcb *const tcp, const kernel_ulong_t arg) +{ + struct_sg_io_hdr sg_io; + static const size_t skip_iid = + offsetof(struct_sg_io_hdr, dxfer_direction); + + tprints("{interface_id='S', "); + if (umoven_or_printaddr(tcp, arg + skip_iid, sizeof(sg_io) - skip_iid, + &sg_io.dxfer_direction)) { + tprints("}"); + return RVAL_DECODED | 1; + } + + tprints("dxfer_direction="); + printxval(sg_io_dxfer_direction, sg_io.dxfer_direction, + "SG_DXFER_???"); + tprintf(", cmd_len=%u, cmdp=", sg_io.cmd_len); + print_sg_io_buffer(tcp, ptr_to_kulong(sg_io.cmdp), sg_io.cmd_len, 0); + tprintf(", mx_sb_len=%d", sg_io.mx_sb_len); + tprintf(", iovec_count=%d", sg_io.iovec_count); + tprintf(", dxfer_len=%u", sg_io.dxfer_len); + tprintf(", timeout=%u", sg_io.timeout); + tprints(", flags="); + printflags(sg_io_flags, sg_io.flags, "SG_FLAG_???"); + + if (sg_io.dxfer_direction == SG_DXFER_TO_DEV || + sg_io.dxfer_direction == SG_DXFER_TO_FROM_DEV) { + tprints(", dxferp="); + print_sg_io_buffer(tcp, ptr_to_kulong(sg_io.dxferp), + sg_io.dxfer_len, sg_io.iovec_count); + } + + struct_sg_io_hdr *entering_sg_io = malloc(sizeof(*entering_sg_io)); + if (entering_sg_io) { + memcpy(entering_sg_io, &sg_io, sizeof(sg_io)); + entering_sg_io->interface_id = (unsigned char) 'S'; + set_tcb_priv_data(tcp, entering_sg_io, free); + } + + return 1; +} + +static int +decode_response(struct tcb *const tcp, const kernel_ulong_t arg) +{ + struct_sg_io_hdr *entering_sg_io = get_tcb_priv_data(tcp); + struct_sg_io_hdr sg_io; + + if (umove(tcp, arg, &sg_io) < 0) { + /* print i/o fields fetched on entering syscall */ + if (entering_sg_io->dxfer_direction == SG_DXFER_FROM_DEV) { + tprints(", dxferp="); + printaddr(ptr_to_kulong(entering_sg_io->dxferp)); + } + tprints(", sbp="); + printaddr(ptr_to_kulong(entering_sg_io->sbp)); + return RVAL_DECODED | 1; + } + + if (sg_io.interface_id != entering_sg_io->interface_id) { + tprintf(" => interface_id=%u", sg_io.interface_id); + return RVAL_DECODED | 1; + } + + if (sg_io.dxfer_direction == SG_DXFER_FROM_DEV || + sg_io.dxfer_direction == SG_DXFER_TO_FROM_DEV) { + uint32_t din_len = sg_io.dxfer_len; + + if (sg_io.resid > 0 && (unsigned int) sg_io.resid <= din_len) + din_len -= sg_io.resid; + if (sg_io.dxfer_direction == SG_DXFER_FROM_DEV) { + tprints(", dxferp="); + } else if (din_len) { + tprints(" => dxferp="); + } + if (sg_io.dxfer_direction == SG_DXFER_FROM_DEV || din_len) { + print_sg_io_buffer(tcp, ptr_to_kulong(sg_io.dxferp), + din_len, sg_io.iovec_count); + } + } + tprintf(", status=%#x", sg_io.status); + tprintf(", masked_status=%#x", sg_io.masked_status); + tprintf(", msg_status=%#x", sg_io.msg_status); + tprintf(", sb_len_wr=%u, sbp=", sg_io.sb_len_wr); + print_sg_io_buffer(tcp, ptr_to_kulong(sg_io.sbp), sg_io.sb_len_wr, 0); + tprintf(", host_status=%#x", sg_io.host_status); + tprintf(", driver_status=%#x", sg_io.driver_status); + tprintf(", resid=%d", sg_io.resid); + tprintf(", duration=%u", sg_io.duration); + tprints(", info="); + printflags(sg_io_info, sg_io.info, "SG_INFO_???"); + + return RVAL_DECODED | 1; +} + +#else /* !HAVE_SCSI_SG_H */ + +static int +decode_request(struct tcb *const tcp, const kernel_ulong_t arg) +{ + tprints("{interface_id='S', ...}"); + return RVAL_DECODED | 1; +} + +static int +decode_response(struct tcb *const tcp, const kernel_ulong_t arg) +{ + return 0; +} + +#endif + +MPERS_PRINTER_DECL(int, decode_sg_io_v3, + struct tcb *const tcp, const kernel_ulong_t arg) +{ + return entering(tcp) ? decode_request(tcp, arg) + : decode_response(tcp, arg); +} diff --git a/sg_io_v4.c b/sg_io_v4.c new file mode 100644 index 000000000..1ae8814d8 --- /dev/null +++ b/sg_io_v4.c @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2015 Bart Van Assche + * Copyright (c) 2015-2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" + +#ifdef HAVE_LINUX_BSG_H + +# include +# include "xlat/bsg_protocol.h" +# include "xlat/bsg_subprotocol.h" +# include "xlat/bsg_flags.h" + +static void +print_sg_io_buffer(struct tcb *const tcp, const kernel_ulong_t addr, + const unsigned int data_size, const unsigned int iovec_count) +{ + if (iovec_count) { + tprint_iov_upto(tcp, iovec_count, addr, IOV_DECODE_STR, + data_size); + } else { + printstr_ex(tcp, addr, data_size, QUOTE_FORCE_HEX); + } +} + +static int +decode_request(struct tcb *const tcp, const kernel_ulong_t arg) +{ + struct sg_io_v4 sg_io; + static const size_t skip_iid = offsetof(struct sg_io_v4, protocol); + + tprints("{guard='Q', "); + if (umoven_or_printaddr(tcp, arg + skip_iid, sizeof(sg_io) - skip_iid, + &sg_io.protocol)) { + tprints("}"); + return RVAL_DECODED | 1; + } + + tprints("protocol="); + printxval(bsg_protocol, sg_io.protocol, "BSG_PROTOCOL_???"); + tprints(", subprotocol="); + printxval(bsg_subprotocol, sg_io.subprotocol, "BSG_SUB_PROTOCOL_???"); + tprintf(", request_len=%u, request=", sg_io.request_len); + print_sg_io_buffer(tcp, sg_io.request, sg_io.request_len, 0); + tprintf(", request_tag=%#" PRI__x64, sg_io.request_tag); + tprintf(", request_attr=%u", sg_io.request_attr); + tprintf(", request_priority=%u", sg_io.request_priority); + tprintf(", request_extra=%u", sg_io.request_extra); + tprintf(", max_response_len=%u", sg_io.max_response_len); + + tprintf(", dout_iovec_count=%u", sg_io.dout_iovec_count); + tprintf(", dout_xfer_len=%u", sg_io.dout_xfer_len); + tprintf(", din_iovec_count=%u", sg_io.din_iovec_count); + tprintf(", din_xfer_len=%u", sg_io.din_xfer_len); + tprints(", dout_xferp="); + print_sg_io_buffer(tcp, sg_io.dout_xferp, sg_io.dout_xfer_len, + sg_io.dout_iovec_count); + + tprintf(", timeout=%u", sg_io.timeout); + tprints(", flags="); + printflags(bsg_flags, sg_io.flags, "BSG_FLAG_???"); + tprintf(", usr_ptr=%#" PRI__x64, sg_io.usr_ptr); + + struct sg_io_v4 *entering_sg_io = malloc(sizeof(*entering_sg_io)); + if (entering_sg_io) { + memcpy(entering_sg_io, &sg_io, sizeof(sg_io)); + entering_sg_io->guard = (unsigned char) 'Q'; + set_tcb_priv_data(tcp, entering_sg_io, free); + } + + return 1; +} + +static int +decode_response(struct tcb *const tcp, const kernel_ulong_t arg) +{ + struct sg_io_v4 *entering_sg_io = get_tcb_priv_data(tcp); + struct sg_io_v4 sg_io; + uint32_t din_len; + + if (umove(tcp, arg, &sg_io) < 0) { + /* print i/o fields fetched on entering syscall */ + tprints(", response="); + printaddr(entering_sg_io->response); + tprints(", din_xferp="); + printaddr(entering_sg_io->din_xferp); + return RVAL_DECODED | 1; + } + + if (sg_io.guard != entering_sg_io->guard) { + tprintf(" => guard=%u", sg_io.guard); + return RVAL_DECODED | 1; + } + + tprintf(", response_len=%u, response=", sg_io.response_len); + print_sg_io_buffer(tcp, sg_io.response, sg_io.response_len, 0); + din_len = sg_io.din_xfer_len; + if (sg_io.din_resid > 0 && (unsigned int) sg_io.din_resid <= din_len) + din_len -= sg_io.din_resid; + tprints(", din_xferp="); + print_sg_io_buffer(tcp, sg_io.din_xferp, din_len, + sg_io.din_iovec_count); + tprintf(", driver_status=%#x", sg_io.driver_status); + tprintf(", transport_status=%#x", sg_io.transport_status); + tprintf(", device_status=%#x", sg_io.device_status); + tprintf(", retry_delay=%u", sg_io.retry_delay); + tprints(", info="); + printflags(sg_io_info, sg_io.info, "SG_INFO_???"); + tprintf(", duration=%u", sg_io.duration); + tprintf(", response_len=%u", sg_io.response_len); + tprintf(", din_resid=%d", sg_io.din_resid); + tprintf(", dout_resid=%d", sg_io.dout_resid); + tprintf(", generated_tag=%#" PRI__x64, sg_io.generated_tag); + + return RVAL_DECODED | 1; +} + +#else /* !HAVE_LINUX_BSG_H */ + +static int +decode_request(struct tcb *const tcp, const kernel_ulong_t arg) +{ + tprints("{guard='Q', ...}"); + return RVAL_DECODED | 1; +} + +static int +decode_response(struct tcb *const tcp, const kernel_ulong_t arg) +{ + return 0; +} + +#endif + +int +decode_sg_io_v4(struct tcb *const tcp, const kernel_ulong_t arg) +{ + return entering(tcp) ? decode_request(tcp, arg) + : decode_response(tcp, arg); +} diff --git a/sigaltstack.c b/sigaltstack.c index b3e435789..7b624c979 100644 --- a/sigaltstack.c +++ b/sigaltstack.c @@ -41,7 +41,7 @@ #include "xlat/sigaltstack_flags.h" static void -print_stack_t(struct tcb *tcp, unsigned long addr) +print_stack_t(struct tcb *const tcp, const kernel_ulong_t addr) { stack_t ss; @@ -49,10 +49,10 @@ print_stack_t(struct tcb *tcp, unsigned long addr) return; tprints("{ss_sp="); - printaddr((unsigned long) ss.ss_sp); + printaddr(ptr_to_kulong(ss.ss_sp)); tprints(", ss_flags="); printflags(sigaltstack_flags, ss.ss_flags, "SS_???"); - tprintf(", ss_size=%lu}", (unsigned long) ss.ss_size); + tprintf(", ss_size=%" PRI_klu "}", (kernel_ulong_t) ss.ss_size); } SYS_FUNC(sigaltstack) diff --git a/signal.c b/signal.c index b483ce08c..25329d3ee 100644 --- a/signal.c +++ b/signal.c @@ -32,14 +32,7 @@ */ #include "defs.h" -#include - -#ifndef NSIG -# warning NSIG is not defined, using 32 -# define NSIG 32 -#elif NSIG < 32 -# error NSIG < 32 -#endif +#include "nsig.h" /* The libc headers do not define this constant since it should only be used by the implementation. So we define it here. */ @@ -111,17 +104,17 @@ * umoven(tcp, addr, sizeof(sigset_t), &sigset) * may be a bad idea: it'll try to read much more data than needed * to fetch a sigset_t. - * Use (NSIG / 8) as a size instead. + * Use NSIG_BYTES as a size instead. */ static const char * -get_sa_handler_str(unsigned long handler) +get_sa_handler_str(kernel_ulong_t handler) { return xlookup(sa_handler_values, handler); } static void -print_sa_handler(unsigned long handler) +print_sa_handler(kernel_ulong_t handler) { const char *sa_handler_str = get_sa_handler_str(handler); @@ -175,16 +168,17 @@ const char * sprintsigmask_n(const char *prefix, const void *sig_mask, unsigned int bytes) { /* - * The maximum number of signal names to be printed is NSIG * 2 / 3. + * The maximum number of signal names to be printed + * is NSIG_BYTES * 8 * 2 / 3. * Most of signal names have length 7, * average length of signal names is less than 7. * The length of prefix string does not exceed 16. */ - static char outstr[128 + 8 * (NSIG * 2 / 3)]; + static char outstr[128 + 8 * (NSIG_BYTES * 8 * 2 / 3)]; char *s; const uint32_t *mask; - uint32_t inverted_mask[NSIG / 32]; + uint32_t inverted_mask[NSIG_BYTES / 4]; unsigned int size; int i; char sep; @@ -193,10 +187,10 @@ sprintsigmask_n(const char *prefix, const void *sig_mask, unsigned int bytes) mask = sig_mask; /* length of signal mask in 4-byte words */ - size = (bytes >= NSIG / 8) ? NSIG / 32 : (bytes + 3) / 4; + size = (bytes >= NSIG_BYTES) ? NSIG_BYTES / 4 : (bytes + 3) / 4; /* check whether 2/3 or more bits are set */ - if (popcount32(mask, size) >= size * 32 * 2 / 3) { + if (popcount32(mask, size) >= size * (4 * 8) * 2 / 3) { /* show those signals that are NOT in the mask */ unsigned int j; for (j = 0; j < size; ++j) @@ -206,7 +200,7 @@ sprintsigmask_n(const char *prefix, const void *sig_mask, unsigned int bytes) } sep = '['; - for (i = 0; (i = next_set_bit(mask, i, size * 32)) >= 0; ) { + for (i = 0; (i = next_set_bit(mask, i, size * (4 * 8))) >= 0; ) { ++i; *s++ = sep; if ((unsigned) i < nsignals) { @@ -242,24 +236,26 @@ printsignal(int nr) } static void -print_sigset_addr_len_limit(struct tcb *tcp, long addr, long len, long min_len) +print_sigset_addr_len_limit(struct tcb *const tcp, const kernel_ulong_t addr, + const kernel_ulong_t len, const unsigned int min_len) { /* - * Here len is usually equal to NSIG / 8 or current_wordsize. + * Here len is usually equal to NSIG_BYTES or current_wordsize. * But we code this defensively: */ - if (len < min_len || len > NSIG / 8) { + if (len < min_len || len > NSIG_BYTES) { printaddr(addr); return; } - int mask[NSIG / 8 / sizeof(int)] = {}; + int mask[NSIG_BYTES / sizeof(int)] = {}; if (umoven_or_printaddr(tcp, addr, len, mask)) return; tprints(sprintsigmask_n("", mask, len)); } void -print_sigset_addr_len(struct tcb *tcp, long addr, long len) +print_sigset_addr_len(struct tcb *const tcp, const kernel_ulong_t addr, + const kernel_ulong_t len) { print_sigset_addr_len_limit(tcp, addr, len, current_wordsize); } @@ -280,22 +276,22 @@ struct old_sigaction { /* sa_handler may be a libc #define, need to use other name: */ #ifdef MIPS unsigned int sa_flags; - void (*__sa_handler)(int); + unsigned long sa_handler__; /* Kernel treats sa_mask as an array of longs. */ - unsigned long sa_mask[NSIG / sizeof(long) ? NSIG / sizeof(long) : 1]; + unsigned long sa_mask[NSIG / sizeof(long)]; #else - void (*__sa_handler)(int); + unsigned long sa_handler__; unsigned long sa_mask; unsigned long sa_flags; #endif /* !MIPS */ #if HAVE_SA_RESTORER - void (*sa_restorer)(void); + unsigned long sa_restorer; #endif }; struct old_sigaction32 { /* sa_handler may be a libc #define, need to use other name: */ - uint32_t __sa_handler; + uint32_t sa_handler__; uint32_t sa_mask; uint32_t sa_flags; #if HAVE_SA_RESTORER @@ -304,22 +300,22 @@ struct old_sigaction32 { }; static void -decode_old_sigaction(struct tcb *tcp, long addr) +decode_old_sigaction(struct tcb *const tcp, const kernel_ulong_t addr) { struct old_sigaction sa; -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 - if (current_wordsize != sizeof(sa.__sa_handler) && current_wordsize == 4) { +#ifndef current_wordsize + if (current_wordsize < sizeof(sa.sa_handler__)) { struct old_sigaction32 sa32; if (umove_or_printaddr(tcp, addr, &sa32)) return; memset(&sa, 0, sizeof(sa)); - sa.__sa_handler = (void*)(uintptr_t)sa32.__sa_handler; + sa.sa_handler__ = sa32.sa_handler__; sa.sa_flags = sa32.sa_flags; #if HAVE_SA_RESTORER && defined SA_RESTORER - sa.sa_restorer = (void*)(uintptr_t)sa32.sa_restorer; + sa.sa_restorer = sa32.sa_restorer; #endif sa.sa_mask = sa32.sa_mask; } else @@ -327,27 +323,21 @@ decode_old_sigaction(struct tcb *tcp, long addr) if (umove_or_printaddr(tcp, addr, &sa)) return; - /* Architectures using function pointers, like - * hppa, may need to manipulate the function pointer - * to compute the result of a comparison. However, - * the __sa_handler function pointer exists only in - * the address space of the traced process, and can't - * be manipulated by strace. In order to prevent the - * compiler from generating code to manipulate - * __sa_handler we cast the function pointers to long. */ - tprints("{"); - print_sa_handler((unsigned long) sa.__sa_handler); - tprints(", "); + tprints("{sa_handler="); + print_sa_handler(sa.sa_handler__); + tprints(", sa_mask="); #ifdef MIPS tprintsigmask_addr("", sa.sa_mask); #else tprintsigmask_val("", sa.sa_mask); #endif - tprints(", "); + tprints(", sa_flags="); printflags(sigact_flags, sa.sa_flags, "SA_???"); #if HAVE_SA_RESTORER && defined SA_RESTORER - if (sa.sa_flags & SA_RESTORER) - tprintf(", %p", sa.sa_restorer); + if (sa.sa_flags & SA_RESTORER) { + tprints(", sa_restorer="); + printaddr(sa.sa_restorer); + } #endif tprints("}"); } @@ -458,7 +448,7 @@ SYS_FUNC(sigpending) SYS_FUNC(rt_sigprocmask) { - /* Note: arg[3] is the length of the sigset. Kernel requires NSIG / 8 */ + /* Note: arg[3] is the length of the sigset. Kernel requires NSIG_BYTES */ if (entering(tcp)) { printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???"); tprints(", "); @@ -467,7 +457,7 @@ SYS_FUNC(rt_sigprocmask) } else { print_sigset_addr_len(tcp, tcp->u_arg[2], tcp->u_arg[3]); - tprintf(", %lu", tcp->u_arg[3]); + tprintf(", %" PRI_klu, tcp->u_arg[3]); } return 0; } @@ -478,45 +468,45 @@ struct new_sigaction /* sa_handler may be a libc #define, need to use other name: */ #ifdef MIPS unsigned int sa_flags; - void (*__sa_handler)(int); + unsigned long sa_handler__; #else - void (*__sa_handler)(int); + unsigned long sa_handler__; unsigned long sa_flags; #endif /* !MIPS */ #if HAVE_SA_RESTORER - void (*sa_restorer)(void); + unsigned long sa_restorer; #endif /* Kernel treats sa_mask as an array of longs. */ - unsigned long sa_mask[NSIG / sizeof(long) ? NSIG / sizeof(long) : 1]; + unsigned long sa_mask[NSIG / sizeof(long)]; }; /* Same for i386-on-x86_64 and similar cases */ struct new_sigaction32 { - uint32_t __sa_handler; + uint32_t sa_handler__; uint32_t sa_flags; #if HAVE_SA_RESTORER uint32_t sa_restorer; #endif - uint32_t sa_mask[2 * (NSIG / sizeof(long) ? NSIG / sizeof(long) : 1)]; + uint32_t sa_mask[2 * (NSIG / sizeof(long))]; }; static void -decode_new_sigaction(struct tcb *tcp, long addr) +decode_new_sigaction(struct tcb *const tcp, const kernel_ulong_t addr) { struct new_sigaction sa; -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 - if (current_wordsize != sizeof(sa.sa_flags) && current_wordsize == 4) { +#ifndef current_wordsize + if (current_wordsize < sizeof(sa.sa_handler__)) { struct new_sigaction32 sa32; if (umove_or_printaddr(tcp, addr, &sa32)) return; memset(&sa, 0, sizeof(sa)); - sa.__sa_handler = (void*)(unsigned long)sa32.__sa_handler; + sa.sa_handler__ = sa32.sa_handler__; sa.sa_flags = sa32.sa_flags; #if HAVE_SA_RESTORER && defined SA_RESTORER - sa.sa_restorer = (void*)(unsigned long)sa32.sa_restorer; + sa.sa_restorer = sa32.sa_restorer; #endif /* Kernel treats sa_mask as an array of longs. * For 32-bit process, "long" is uint32_t, thus, for example, @@ -526,37 +516,31 @@ decode_new_sigaction(struct tcb *tcp, long addr) * For little-endian, it's the same. * For big-endian, we swap 32-bit words. */ - sa.sa_mask[0] = LONG_LONG(sa32.sa_mask[0], sa32.sa_mask[1]); + sa.sa_mask[0] = ULONG_LONG(sa32.sa_mask[0], sa32.sa_mask[1]); } else #endif if (umove_or_printaddr(tcp, addr, &sa)) return; - /* Architectures using function pointers, like - * hppa, may need to manipulate the function pointer - * to compute the result of a comparison. However, - * the __sa_handler function pointer exists only in - * the address space of the traced process, and can't - * be manipulated by strace. In order to prevent the - * compiler from generating code to manipulate - * __sa_handler we cast the function pointers to long. */ - tprints("{"); - print_sa_handler((unsigned long) sa.__sa_handler); - tprints(", "); + tprints("{sa_handler="); + print_sa_handler(sa.sa_handler__); + tprints(", sa_mask="); /* * Sigset size is in tcp->u_arg[4] (SPARC) * or in tcp->u_arg[3] (all other), * but kernel won't handle sys_rt_sigaction * with wrong sigset size (just returns EINVAL instead). - * We just fetch the right size, which is NSIG / 8. + * We just fetch the right size, which is NSIG_BYTES. */ tprintsigmask_val("", sa.sa_mask); - tprints(", "); + tprints(", sa_flags="); printflags(sigact_flags, sa.sa_flags, "SA_???"); #if HAVE_SA_RESTORER && defined SA_RESTORER - if (sa.sa_flags & SA_RESTORER) - tprintf(", %p", sa.sa_restorer); + if (sa.sa_flags & SA_RESTORER) { + tprints(", sa_restorer="); + printaddr(sa.sa_restorer); + } #endif tprints("}"); } @@ -571,11 +555,11 @@ SYS_FUNC(rt_sigaction) } else { decode_new_sigaction(tcp, tcp->u_arg[2]); #if defined(SPARC) || defined(SPARC64) - tprintf(", %#lx, %lu", tcp->u_arg[3], tcp->u_arg[4]); + tprintf(", %#" PRI_klx ", %" PRI_klu, tcp->u_arg[3], tcp->u_arg[4]); #elif defined(ALPHA) - tprintf(", %lu, %#lx", tcp->u_arg[3], tcp->u_arg[4]); + tprintf(", %" PRI_klu ", %#" PRI_klx, tcp->u_arg[3], tcp->u_arg[4]); #else - tprintf(", %lu", tcp->u_arg[3]); + tprintf(", %" PRI_klu, tcp->u_arg[3]); #endif } return 0; @@ -586,32 +570,33 @@ SYS_FUNC(rt_sigpending) if (exiting(tcp)) { /* * One of the few syscalls where sigset size (arg[1]) - * is allowed to be <= NSIG / 8, not strictly ==. + * is allowed to be <= NSIG_BYTES, not strictly ==. * This allows non-rt sigpending() syscall * to reuse rt_sigpending() code in kernel. */ print_sigset_addr_len_limit(tcp, tcp->u_arg[0], tcp->u_arg[1], 1); - tprintf(", %lu", tcp->u_arg[1]); + tprintf(", %" PRI_klu, tcp->u_arg[1]); } return 0; } SYS_FUNC(rt_sigsuspend) { - /* NB: kernel requires arg[1] == NSIG / 8 */ + /* NB: kernel requires arg[1] == NSIG_BYTES */ print_sigset_addr_len(tcp, tcp->u_arg[0], tcp->u_arg[1]); - tprintf(", %lu", tcp->u_arg[1]); + tprintf(", %" PRI_klu, tcp->u_arg[1]); return RVAL_DECODED; } static void -print_sigqueueinfo(struct tcb *tcp, int sig, unsigned long uinfo) +print_sigqueueinfo(struct tcb *const tcp, const int sig, + const kernel_ulong_t addr) { printsignal(sig); tprints(", "); - printsiginfo_at(tcp, uinfo); + printsiginfo_at(tcp, addr); } SYS_FUNC(rt_sigqueueinfo) @@ -632,7 +617,7 @@ SYS_FUNC(rt_tgsigqueueinfo) SYS_FUNC(rt_sigtimedwait) { - /* NB: kernel requires arg[3] == NSIG / 8 */ + /* NB: kernel requires arg[3] == NSIG_BYTES */ if (entering(tcp)) { print_sigset_addr_len(tcp, tcp->u_arg[0], tcp->u_arg[3]); tprints(", "); @@ -645,7 +630,7 @@ SYS_FUNC(rt_sigtimedwait) printaddr(tcp->u_arg[1]); tprints(", "); print_timespec(tcp, tcp->u_arg[2]); - tprintf(", %lu", tcp->u_arg[3]); + tprintf(", %" PRI_klu, tcp->u_arg[3]); } else { char *sts = xstrdup(sprint_timespec(tcp, tcp->u_arg[2])); set_tcb_priv_data(tcp, sts, free); @@ -655,7 +640,7 @@ SYS_FUNC(rt_sigtimedwait) printsiginfo_at(tcp, tcp->u_arg[1]); tprints(", "); tprints(get_tcb_priv_data(tcp)); - tprintf(", %lu", tcp->u_arg[3]); + tprintf(", %" PRI_klu, tcp->u_arg[3]); } if (!syserror(tcp) && tcp->u_rval) { diff --git a/signalfd.c b/signalfd.c index 8ddf871ab..3895c7663 100644 --- a/signalfd.c +++ b/signalfd.c @@ -36,11 +36,11 @@ static int do_signalfd(struct tcb *tcp, int flags_arg) { - /* NB: kernel requires arg[2] == NSIG / 8 */ + /* NB: kernel requires arg[2] == NSIG_BYTES */ printfd(tcp, tcp->u_arg[0]); tprints(", "); print_sigset_addr_len(tcp, tcp->u_arg[1], tcp->u_arg[2]); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %" PRI_klu, tcp->u_arg[2]); if (flags_arg >= 0) { tprints(", "); printflags(sfd_flags, tcp->u_arg[flags_arg], "SFD_???"); diff --git a/sigreturn.c b/sigreturn.c index f0dab0da9..b2eeb7a4a 100644 --- a/sigreturn.c +++ b/sigreturn.c @@ -1,5 +1,5 @@ #include "defs.h" -#include +#include "nsig.h" #include "regs.h" #include "ptrace.h" @@ -7,13 +7,6 @@ # include #endif -#ifndef NSIG -# warning NSIG is not defined, using 32 -# define NSIG 32 -#elif NSIG < 32 -# error NSIG < 32 -#endif - #include "arch_sigreturn.c" SYS_FUNC(sigreturn) diff --git a/sock.c b/sock.c index cf13896bd..9dd247cce 100644 --- a/sock.c +++ b/sock.c @@ -26,6 +26,7 @@ */ #include "defs.h" + #include #if defined ALPHA || defined SH || defined SH64 # include @@ -34,6 +35,14 @@ #include #include +#include DEF_MPERS_TYPE(struct_ifconf) +#include DEF_MPERS_TYPE(struct_ifreq) + +typedef struct ifconf struct_ifconf; +typedef struct ifreq struct_ifreq; + +#include MPERS_DEFS + #include "xlat/iffflags.h" #define PRINT_IFREQ_ADDR(tcp, ifr, sockaddr) \ @@ -50,8 +59,8 @@ print_ifname(const char *ifname) } static void -print_ifreq(struct tcb *tcp, const unsigned int code, const long arg, - const struct ifreq *ifr) +print_ifreq(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg, const struct_ifreq *const ifr) { switch (code) { case SIOCSIFADDR: @@ -105,11 +114,11 @@ print_ifreq(struct tcb *tcp, const unsigned int code, const long arg, break; case SIOCSIFMAP: case SIOCGIFMAP: - tprintf("ifr_map={mem_start=%#lx, " - "mem_end=%#lx, base_addr=%#x, " + tprintf("ifr_map={mem_start=%#" PRI_klx ", " + "mem_end=%#" PRI_klx ", base_addr=%#x, " "irq=%u, dma=%u, port=%u}", - ifr->ifr_map.mem_start, - ifr->ifr_map.mem_end, + (kernel_ulong_t) ifr->ifr_map.mem_start, + (kernel_ulong_t) ifr->ifr_map.mem_end, (unsigned) ifr->ifr_map.base_addr, (unsigned) ifr->ifr_map.irq, (unsigned) ifr->ifr_map.dma, @@ -121,9 +130,9 @@ print_ifreq(struct tcb *tcp, const unsigned int code, const long arg, static unsigned int print_ifc_len(int len) { - const unsigned int n = (unsigned int) len / sizeof(struct ifreq); + const unsigned int n = (unsigned int) len / sizeof(struct_ifreq); - if (len < 0 || n * sizeof(struct ifreq) != (unsigned int) len) + if (len < 0 || n * sizeof(struct_ifreq) != (unsigned int) len) tprintf("%d", len); else tprintf("%u * sizeof(struct ifreq)", n); @@ -131,73 +140,117 @@ print_ifc_len(int len) return n; } +static bool +print_ifconf_ifreq(struct tcb *tcp, void *elem_buf, size_t elem_size, + void *dummy) +{ + struct_ifreq *ifr = elem_buf; + + tprints("{ifr_name="); + print_ifname(ifr->ifr_name); + tprints(", "); + PRINT_IFREQ_ADDR(tcp, ifr, ifr_addr); + tprints("}"); + + return true; +} + +/* + * There are two different modes of operation: + * + * - Get buffer size. In this case, the callee sets ifc_buf to NULL, + * and the kernel returns the buffer size in ifc_len. + * - Get actual data. In this case, the callee specifies the buffer address + * in ifc_buf and its size in ifc_len. The kernel fills the buffer with + * the data, and its amount is returned in ifc_len. + * + * Note that, technically, the whole struct ifconf is overwritten, + * so ifc_buf could be different on exit, but current ioctl handler + * implementation does not touch it. + */ static int -decode_ifconf(struct tcb *tcp, const long addr) +decode_ifconf(struct tcb *const tcp, const kernel_ulong_t addr) { - struct ifconf ifc; + struct_ifconf *entering_ifc = NULL; + struct_ifconf *ifc = + entering(tcp) ? malloc(sizeof(*ifc)) : alloca(sizeof(*ifc)); - if (entering(tcp)) { - tprints(", "); - if (umove_or_printaddr(tcp, addr, &ifc)) - return RVAL_DECODED | 1; - if (ifc.ifc_buf) { - tprints("{"); - print_ifc_len(ifc.ifc_len); + if (exiting(tcp)) { + entering_ifc = get_tcb_priv_data(tcp); + + if (!entering_ifc) { + error_msg("decode_ifconf: where is my ifconf?"); + return 0; } - return 1; } - if (syserror(tcp) || umove(tcp, addr, &ifc) < 0) { - if (ifc.ifc_buf) - tprints("}"); - else + if (!ifc || umove(tcp, addr, ifc) < 0) { + if (entering(tcp)) { + free(ifc); + + tprints(", "); printaddr(addr); - return RVAL_DECODED | 1; - } + } else { + /* + * We failed to fetch the structure on exiting syscall, + * print whatever was fetched on entering syscall. + */ + if (!entering_ifc->ifc_buf) + print_ifc_len(entering_ifc->ifc_len); - if (!ifc.ifc_buf) { - tprints("{"); - print_ifc_len(ifc.ifc_len); - tprints(", NULL}"); - return RVAL_DECODED | 1; - } + tprints(", ifc_buf="); + printaddr(ptr_to_kulong(entering_ifc->ifc_buf)); + + tprints("}"); + } - tprints(" => "); - const unsigned int nifra = print_ifc_len(ifc.ifc_len); - if (!nifra) { - tprints("}"); return RVAL_DECODED | 1; } - struct ifreq ifra[nifra > max_strlen ? max_strlen : nifra]; - tprints(", "); - if (umove_or_printaddr(tcp, (unsigned long) ifc.ifc_buf, &ifra)) { - tprints("}"); - return RVAL_DECODED | 1; + if (entering(tcp)) { + tprints(", {ifc_len="); + if (ifc->ifc_buf) + print_ifc_len(ifc->ifc_len); + + set_tcb_priv_data(tcp, ifc, free); + + return 1; } - tprints("["); - unsigned int i; - for (i = 0; i < ARRAY_SIZE(ifra); ++i) { - if (i > 0) - tprints(", "); - tprints("{ifr_name="); - print_ifname(ifra[i].ifr_name); - tprints(", "); - PRINT_IFREQ_ADDR(tcp, &ifra[i], ifr_addr); - tprints("}"); + /* exiting */ + + if (entering_ifc->ifc_buf && (entering_ifc->ifc_len != ifc->ifc_len)) + tprints(" => "); + if (!entering_ifc->ifc_buf || (entering_ifc->ifc_len != ifc->ifc_len)) + print_ifc_len(ifc->ifc_len); + + tprints(", ifc_buf="); + + if (!entering_ifc->ifc_buf || syserror(tcp)) { + printaddr(ptr_to_kulong(entering_ifc->ifc_buf)); + if (entering_ifc->ifc_buf != ifc->ifc_buf) { + tprints(" => "); + printaddr(ptr_to_kulong(ifc->ifc_buf)); + } + } else { + struct_ifreq ifr; + + print_array(tcp, ptr_to_kulong(ifc->ifc_buf), + ifc->ifc_len / sizeof(struct_ifreq), + &ifr, sizeof(ifr), + umoven_or_printaddr, print_ifconf_ifreq, NULL); } - if (i < nifra) - tprints(", ..."); - tprints("]}"); + + tprints("}"); return RVAL_DECODED | 1; } -int -sock_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +MPERS_PRINTER_DECL(int, sock_ioctl, + struct tcb *tcp, const unsigned int code, + const kernel_ulong_t arg) { - struct ifreq ifr; + struct_ifreq ifr; switch (code) { case SIOCGIFCONF: @@ -207,7 +260,7 @@ sock_ioctl(struct tcb *tcp, const unsigned int code, const long arg) case SIOCBRADDBR: case SIOCBRDELBR: tprints(", "); - printstr(tcp, arg, -1); + printstr(tcp, arg); break; #endif diff --git a/sockaddr.c b/sockaddr.c index 412396b71..174108ca9 100644 --- a/sockaddr.c +++ b/sockaddr.c @@ -279,7 +279,7 @@ print_sockaddr(struct tcb *tcp, const void *const buf, const int addrlen) } int -decode_sockaddr(struct tcb *tcp, long addr, int addrlen) +decode_sockaddr(struct tcb *const tcp, const kernel_ulong_t addr, int addrlen) { if (addrlen < 2) { printaddr(addr); diff --git a/socketutils.c b/socketutils.c index ff0255941..d50ef831f 100644 --- a/socketutils.c +++ b/socketutils.c @@ -38,10 +38,6 @@ #include #include "xlat/netlink_protocols.h" -#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG -# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG -#endif - #include #ifndef UNIX_PATH_MAX # define UNIX_PATH_MAX sizeof(((struct sockaddr_un *) 0)->sun_path) diff --git a/sram_alloc.c b/sram_alloc.c index 969e10eeb..922746bbc 100644 --- a/sram_alloc.c +++ b/sram_alloc.c @@ -11,7 +11,7 @@ SYS_FUNC(sram_alloc) /* size */ tprintf("%lu, ", tcp->u_arg[0]); /* flags */ - printflags_long(sram_alloc_flags, tcp->u_arg[1], "???_SRAM"); + printflags64(sram_alloc_flags, tcp->u_arg[1], "???_SRAM"); return RVAL_DECODED | RVAL_HEX; } diff --git a/stamp-h1 b/stamp-h1 new file mode 100644 index 000000000..4547fe1b5 --- /dev/null +++ b/stamp-h1 @@ -0,0 +1 @@ +timestamp for config.h diff --git a/stat.c b/stat.c index 2143819f2..28bd15ef0 100644 --- a/stat.c +++ b/stat.c @@ -29,7 +29,7 @@ #include "stat.h" static void -decode_struct_stat(struct tcb *tcp, const unsigned long addr) +decode_struct_stat(struct tcb *const tcp, const kernel_ulong_t addr) { struct strace_stat st; diff --git a/stat64.c b/stat64.c index 3c816cd0d..09d203dc3 100644 --- a/stat64.c +++ b/stat64.c @@ -29,7 +29,7 @@ #include "stat.h" static void -decode_struct_stat64(struct tcb *tcp, const unsigned long addr) +decode_struct_stat64(struct tcb *const tcp, const kernel_ulong_t addr) { struct strace_stat st; diff --git a/statfs64.c b/statfs64.c index f45983176..cd433d51a 100644 --- a/statfs64.c +++ b/statfs64.c @@ -2,13 +2,11 @@ SYS_FUNC(statfs64) { - const unsigned long size = tcp->u_arg[1]; - if (entering(tcp)) { printpath(tcp, tcp->u_arg[0]); - tprintf(", %lu, ", size); + tprintf(", %" PRI_klu ", ", tcp->u_arg[1]); } else { - print_struct_statfs64(tcp, tcp->u_arg[2], size); + print_struct_statfs64(tcp, tcp->u_arg[2], tcp->u_arg[1]); } return 0; } diff --git a/strace.1 b/strace.1 index 6cc17c5cc..9230766e3 100644 --- a/strace.1 +++ b/strace.1 @@ -203,66 +203,10 @@ sigprocmask(SIG_UNBLOCK, ~[], NULL) = 0 .CE Here the second argument represents the full set of all signals. .SH OPTIONS +.SS Output format .TP 12 -.TP -.B \-c -Count time, calls, and errors for each system call and report a summary on -program exit. On Linux, this attempts to show system time (CPU time spent -running in the kernel) independent of wall clock time. If -.B \-c -is used with -.B \-f -or -.B \-F -(below), only aggregate totals for all traced processes are kept. -.TP -.B \-C -Like -.B \-c -but also print regular output while processes are running. -.TP -.B \-D -Run tracer process as a detached grandchild, not as parent of the -tracee. This reduces the visible effect of -.B strace -by keeping the tracee a direct child of the calling process. -.TP -.B \-d -Show some debugging output of -.B strace -itself on the standard error. -.TP -.B \-f -Trace child processes as they are created by currently traced -processes as a result of the -.BR fork (2), -.BR vfork (2) -and -.BR clone (2) -system calls. Note that -.B \-p -.I PID -.B \-f -will attach all threads of process PID if it is multi-threaded, -not only thread with thread_id = PID. -.TP -.B \-ff -If the -.B \-o -.I filename -option is in effect, each processes trace is written to -.I filename.pid -where pid is the numeric process id of each process. -This is incompatible with -.BR \-c , -since no per-process counts are kept. -.TP -.B \-F -This option is now obsolete and it has the same functionality as -.BR \-f . -.TP -.B \-h -Print the help summary. +.BI "\-a " column +Align return values in a specific column (default column 40). .TP .B \-i Print the instruction pointer at the time of the system call. @@ -273,6 +217,20 @@ This option is available only if .B strace is built with libunwind. .TP +.BI "\-o " filename +Write the trace output to the file +.I filename +rather than to stderr. +Use +.I filename.pid +if +.B \-ff +is used. +If the argument begins with '|' or with '!' then the rest of the +argument is treated as a command and all output is piped to it. +This is convenient for piping the debugging output to a program +without affecting the redirections of executed programs. +.TP .B \-q Suppress messages about attaching, detaching etc. This happens automatically when output is redirected to a file and the command @@ -286,6 +244,11 @@ Print a relative timestamp upon entry to each system call. This records the time difference between the beginning of successive system calls. .TP +.BI "\-s " strsize +Specify the maximum string size to print (the default is 32). Note +that filenames are not considered strings and are always printed in +full. +.TP .B \-t Prefix each line of the trace with the time of day. .TP @@ -301,20 +264,6 @@ of seconds since the epoch. Show the time spent in system calls. This records the time difference between the beginning and the end of each system call. .TP -.B \-w -Summarise the time difference between the beginning and end of -each system call. The default is to summarise the system time. -.TP -.B \-v -Print unabbreviated versions of environment, stat, termios, etc. -calls. These structures are very common in calls and so the default -behavior displays a reasonable subset of structure members. Use -this option to get all of the gory details. -.TP -.B \-V -Print the version number of -.BR strace . -.TP .B \-x Print all non-ASCII strings in hexadecimal string format. .TP @@ -326,18 +275,56 @@ Print paths associated with file descriptor arguments. .TP .B \-yy Print protocol specific information associated with socket file descriptors. +.SS Statistics +.TP 12 +.B \-c +Count time, calls, and errors for each system call and report a summary on +program exit. On Linux, this attempts to show system time (CPU time spent +running in the kernel) independent of wall clock time. If +.B \-c +is used with +.B \-f +or +.B \-F +, only aggregate totals for all traced processes are kept. .TP -.BI "\-a " column -Align return values in a specific column (default column 40). +.B \-C +Like +.B \-c +but also print regular output while processes are running. .TP -.BI "\-b " syscall -If specified syscall is reached, detach from traced process. -Currently, only -.I execve -syscall is supported. This option is useful if you want to trace -multi-threaded process and therefore require -f, but don't want -to trace its (potentially very complex) children. +.BI "\-O " overhead +Set the overhead for tracing system calls to +.I overhead +microseconds. +This is useful for overriding the default heuristic for guessing +how much time is spent in mere measuring when timing system calls using +the +.B \-c +option. The accuracy of the heuristic can be gauged by timing a given +program run without tracing (using +.BR time (1)) +and comparing the accumulated +system call time to the total produced using +.BR \-c . +.TP +.BI "\-S " sortby +Sort the output of the histogram printed by the +.B \-c +option by the specified criterion. Legal values are +.BR time , +.BR calls , +.BR name , +and +.B nothing +(default is +.BR time ). .TP +.B \-w +Summarise the time difference between the beginning and end of +each system call. The default is to summarise the system time. +.SS Filtering +.TP 12 .BI "\-e " expr A qualifying expression which modifies which events to trace or how to trace them. The format of the expression is: @@ -355,8 +342,10 @@ is one of .BR raw , .BR signal , .BR read , +.BR write , +.BR fault , or -.B write +.B inject and .I value is a qualifier-dependent symbol or number. The default @@ -481,41 +470,199 @@ Note that this is independent from the normal tracing of the system call which is controlled by the option .BR -e "\ " trace = write . .TP +\fB\-e\ inject\fR=\,\fIset\/\fR[:\fBerror\fR=\,\fIerrno\/\fR|:\fBretval\fR=\,\fIvalue\/\fR][:\fBsignal\fR=\,\fIsig\/\fR][:\fBwhen\fR=\,\fIexpr\/\fR] +Perform syscall tampering for the specified set of syscalls. + +At least one of +.BR error , +.BR retval , +or +.B signal +options has to be specified. +.B error +and +.B retval +are mutually exclusive. + +If :\fBerror\fR=\,\fIerrno\/\fR option is specified, +a fault is injected into a syscall invocation: +the syscall number is replaced by -1 which corresponds to an invalid syscall, +and the error code is specified using a symbolic +.I errno +value like +.B ENOSYS +or a numeric value within 1..4095 range. + +If :\fBretval\fR=\,\fIvalue\/\fR option is specified, +success injection is performed: the syscall number is replaced by -1, +but a bogus success value is returned to the callee. + +If :\fBsignal\fR=\,\fIsig\/\fR option is specified with either a symbolic value +like +.B SIGSEGV +or a numeric value within 1..\fBSIGRTMAX\fR range, +that signal is delivered on entering every syscall specified by the +.IR set . + +If :\fBsignal\fR=\,\fIsig\/\fR option is specified without +:\fBerror\fR=\,\fIerrno\/\fR or :\fBretval\fR=\,\fIvalue\/\fR options, +then only a signal +.I sig +is delivered without a syscall fault injection. +Conversely, :\fBerror\fR=\,\fIerrno\/\fR or +:\fBretval\fR=\,\fIvalue\/\fR option without +:\fBsignal\fR=\,\fIsig\/\fR option injects a fault without delivering a signal. + +If both :\fBerror\fR=\,\fIerrno\/\fR or :\fBretval\fR=\,\fIvalue\/\fR +and :\fBsignal\fR=\,\fIsig\/\fR options are specified, then both +a fault or success is injected and a signal is delivered. + +Unless a :\fBwhen\fR=\,\fIexpr\fR subexpression is specified, +an injection is being made into every invocation of each syscall from the +.IR set . + +The format of the subexpression is one of the following: +.RS +.IP "" 2 +.I first +.RS 4 +For every syscall from the +.IR set , +perform an injection for the syscall invocation number +.I first +only. +.RE +.IP "" 2 +\fIfirst\/\fB+\fR +.RS 4 +For every syscall from the +.IR set , +perform injections for the syscall invocation number +.I first +and all subsequent invocations. +.RE +.IP "" 2 +\fIfirst\/\fB+\fIstep\fR +.RS 4 +For every syscall from the +.IR set , +perform injections for syscall invocations number +.IR first , +.IR first + step , +.IR first + step + step , +and so on. +.RE +.RE +.IP +For example, to fail each third and subsequent chdir syscalls with +.BR ENOENT , +use +\fB\-e\ inject\fR=\,\fIchdir\/\fR:\fBerror\fR=\,\fIENOENT\/\fR:\fBwhen\fR=\,\fI3\/\fB+\fR. + +The valid range for numbers +.I first +and +.I step +is 1..65535. + +An injection expression can contain only one +.BR error = +or +.BR retval = +specification. +If an injection expression contains multiple +.BR when = +specifications, the last one takes precedence. + +Accounting of syscalls that are subject to injection +is done per syscall and per tracee. + +Specification of syscall injection can be combined +with other syscall filtering options, for example, +\fB\-P \fI/dev/urandom \fB\-e inject\fR=\,\fIfile\/\fR:\fBerror\fR=\,\fIENOENT\fR. + +.TP +\fB\-e\ fault\fR=\,\fIset\/\fR[:\fBerror\fR=\,\fIerrno\/\fR][:\fBwhen\fR=\,\fIexpr\/\fR] +Perform syscall fault injection for the specified set of syscalls. + +This is equivalent to more generic +\fB\-e\ inject\fR= expression with default value of +.I errno +option set to +.IR ENOSYS . + +.TP +.BI "\-P " path +Trace only system calls accessing +.IR path . +Multiple +.B \-P +options can be used to specify several paths. +.TP +.B \-v +Print unabbreviated versions of environment, stat, termios, etc. +calls. These structures are very common in calls and so the default +behavior displays a reasonable subset of structure members. Use +this option to get all of the gory details. +.SS Tracing +.TP 12 +.BI "\-b " syscall +If specified syscall is reached, detach from traced process. +Currently, only +.I execve +syscall is supported. This option is useful if you want to trace +multi-threaded process and therefore require -f, but don't want +to trace its (potentially very complex) children. +.TP +.B \-D +Run tracer process as a detached grandchild, not as parent of the +tracee. This reduces the visible effect of +.B strace +by keeping the tracee a direct child of the calling process. +.TP +.B \-f +Trace child processes as they are created by currently traced +processes as a result of the +.BR fork (2), +.BR vfork (2) +and +.BR clone (2) +system calls. Note that +.B \-p +.I PID +.B \-f +will attach all threads of process PID if it is multi-threaded, +not only thread with thread_id = PID. +.TP +.B \-ff +If the +.B \-o +.I filename +option is in effect, each processes trace is written to +.I filename.pid +where pid is the numeric process id of each process. +This is incompatible with +.BR \-c , +since no per-process counts are kept. +.TP .BI "\-I " interruptible When strace can be interrupted by signals (such as pressing ^C). 1: no signals are blocked; 2: fatal signals are blocked while decoding syscall (default); 3: fatal signals are always blocked (default if '-o FILE PROG'); 4: fatal signals and SIGTSTP (^Z) are always blocked (useful to make strace -o FILE PROG not stop on ^Z). +.SS Startup +.TP 12 +\fB\-E\ \fIvar\fR=\,\fIval\fR +Run command with +.IR var = val +in its list of environment variables. .TP -.BI "\-o " filename -Write the trace output to the file -.I filename -rather than to stderr. -Use -.I filename.pid -if -.B \-ff -is used. -If the argument begins with '|' or with '!' then the rest of the -argument is treated as a command and all output is piped to it. -This is convenient for piping the debugging output to a program -without affecting the redirections of executed programs. -.TP -.BI "\-O " overhead -Set the overhead for tracing system calls to -.I overhead -microseconds. -This is useful for overriding the default heuristic for guessing -how much time is spent in mere measuring when timing system calls using -the -.B \-c -option. The accuracy of the heuristic can be gauged by timing a given -program run without tracing (using -.BR time (1)) -and comparing the accumulated -system call time to the total produced using -.BR \-c . +.BI "\-E " var +Remove +.IR var +from the inherited list of environment variables before passing it on to +the command. .TP .BI "\-p " pid Attach to the process with the process @@ -538,30 +685,6 @@ option is given). .B \-p "`pidof PROG`" syntax is supported. .TP -.BI "\-P " path -Trace only system calls accessing -.IR path . -Multiple -.B \-P -options can be used to specify several paths. -.TP -.BI "\-s " strsize -Specify the maximum string size to print (the default is 32). Note -that filenames are not considered strings and are always printed in -full. -.TP -.BI "\-S " sortby -Sort the output of the histogram printed by the -.B \-c -option by the specified criterion. Legal values are -.BR time , -.BR calls , -.BR name , -and -.B nothing -(default is -.BR time ). -.TP .BI "\-u " username Run command with the user \s-1ID\s0, group \s-2ID\s0, and supplementary groups of @@ -570,17 +693,23 @@ This option is only useful when running as root and enables the correct execution of setuid and/or setgid binaries. Unless this option is used setuid and setgid programs are executed without effective privileges. +.SS Miscellaneous +.TP 12 +.B \-d +Show some debugging output of +.B strace +itself on the standard error. .TP -\fB\-E\ \fIvar\fR=\,\fIval\fR -Run command with -.IR var = val -in its list of environment variables. +.B \-F +This option is now obsolete and it has the same functionality as +.BR \-f . .TP -.BI "\-E " var -Remove -.IR var -from the inherited list of environment variables before passing it on to -the command. +.B \-h +Print the help summary. +.TP +.B \-V +Print the version number of +.BR strace . .SH DIAGNOSTICS When .I command @@ -634,11 +763,6 @@ If you do use this feature, please remember to install a non-setuid version of .B strace for ordinary lusers to use. -.SH "SEE ALSO" -.BR ltrace (1), -.BR time (1), -.BR ptrace (2), -.BR proc (5) .SH NOTES It is a pity that so much tracing clutter is produced by systems employing shared libraries. @@ -731,9 +855,14 @@ automatic configuration support. In 1995 he ported .B strace to Irix and tired of writing about himself in the third person. -.SH PROBLEMS +.SH REPORTING BUGS Problems with .B strace should be reported to the .B strace mailing list at . +.SH "SEE ALSO" +.BR ltrace (1), +.BR time (1), +.BR ptrace (2), +.BR proc (5) diff --git a/strace.c b/strace.c index ffb6baec2..7214e6efe 100644 --- a/strace.c +++ b/strace.c @@ -43,7 +43,9 @@ #ifdef HAVE_PRCTL # include #endif +#include +#include "scno.h" #include "ptrace.h" #include "printsiginfo.h" @@ -57,15 +59,7 @@ extern char *optarg; bool stack_trace_enabled = false; #endif -#if defined __NR_tkill -# define my_tkill(tid, sig) syscall(__NR_tkill, (tid), (sig)) -#else - /* kill() may choose arbitrarily the target task of the process group - while we later wait on a that specific TID. PID process waits become - TID task specific waits for a process under ptrace(2). */ -# warning "tkill(2) not available, risk of strace hangs!" -# define my_tkill(tid, sig) kill((tid), (sig)) -#endif +#define my_tkill(tid, sig) syscall(__NR_tkill, (tid), (sig)) /* Glue for systems without a MMU that cannot provide fork() */ #if !defined(HAVE_FORK) @@ -80,7 +74,8 @@ const unsigned int syscall_trap_sig = SIGTRAP | 0x80; cflag_t cflag = CFLAG_NONE; unsigned int followfork = 0; -unsigned int ptrace_setoptions = PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXEC; +unsigned int ptrace_setoptions = PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXEC + | PTRACE_O_TRACEEXIT; unsigned int xflag = 0; bool debug_flag = 0; bool Tflag = 0; @@ -133,10 +128,6 @@ bool not_failing_only = 0; unsigned int show_fd_path = 0; static bool detach_on_execve = 0; -/* Are we "strace PROG" and need to skip detach on first execve? */ -static bool skip_one_b_execve = 0; -/* Are we "strace PROG" and need to hide everything until execve? */ -bool hide_log_until_execve = 0; static int exit_code; static int strace_child = 0; @@ -195,6 +186,16 @@ strerror(int err_no) #endif /* HAVE_STERRROR */ +static void +print_version(void) +{ + printf("%s -- version %s\n" + "Copyright (C) %s The strace developers <%s>.\n" + "This is free software; see the source for copying conditions. There is NO\n" + "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n", + PACKAGE_NAME, PACKAGE_VERSION, "1991-2017", PACKAGE_URL); +} + static void usage(void) { @@ -208,6 +209,13 @@ usage: strace [-CdffhiqrtttTvVwxxy] [-I n] [-e expr]...\n\ Output format:\n\ -a column alignment COLUMN for printing syscall results (default %d)\n\ -i print instruction pointer at time of syscall\n\ +" +#ifdef USE_LIBUNWIND +"\ + -k obtain stack trace between each syscall (experimental)\n\ +" +#endif +"\ -o file send trace output to FILE instead of stderr\n\ -q suppress messages about attaching, detaching, etc.\n\ -r print relative timestamp\n\ @@ -229,7 +237,7 @@ Statistics:\n\ \n\ Filtering:\n\ -e expr a qualifying expression: option=[!]all or option=[!]val1[,val2]...\n\ - options: trace, abbrev, verbose, raw, signal, read, write\n\ + options: trace, abbrev, verbose, raw, signal, read, write, fault\n\ -P path trace accesses to path\n\ \n\ Tracing:\n\ @@ -256,10 +264,6 @@ Miscellaneous:\n\ -h print help message\n\ -V print version\n\ " -#ifdef USE_LIBUNWIND -" -k obtain stack trace between each syscall (experimental)\n\ -" -#endif /* ancient, no one should use it -F -- attempt to follow vforks (deprecated, use -f)\n\ */ @@ -389,24 +393,31 @@ ptrace_attach_or_seize(int pid) * Otherwise prints error message and returns -1. */ static int -ptrace_restart(int op, struct tcb *tcp, int sig) +ptrace_restart(const unsigned int op, struct tcb *const tcp, unsigned int sig) { int err; const char *msg; errno = 0; - ptrace(op, tcp->pid, (void *) 0, (long) sig); + ptrace(op, tcp->pid, 0L, (unsigned long) sig); err = errno; if (!err) return 0; - msg = "SYSCALL"; - if (op == PTRACE_CONT) - msg = "CONT"; - if (op == PTRACE_DETACH) - msg = "DETACH"; - if (op == PTRACE_LISTEN) - msg = "LISTEN"; + switch (op) { + case PTRACE_CONT: + msg = "CONT"; + break; + case PTRACE_DETACH: + msg = "DETACH"; + break; + case PTRACE_LISTEN: + msg = "LISTEN"; + break; + default: + msg = "SYSCALL"; + } + /* * Why curcol != 0? Otherwise sometimes we get this: * @@ -423,7 +434,7 @@ ptrace_restart(int op, struct tcb *tcp, int sig) if (err == ESRCH) return 0; errno = err; - perror_msg("ptrace(PTRACE_%s,pid:%d,sig:%d)", msg, tcp->pid, sig); + perror_msg("ptrace(PTRACE_%s,pid:%d,sig:%u)", msg, tcp->pid, sig); return -1; } @@ -565,7 +576,7 @@ tprintf(const char *fmt, ...) va_start(args, fmt); if (current_tcp) { - int n = strace_vfprintf(current_tcp->outf, fmt, args); + int n = vfprintf(current_tcp->outf, fmt, args); if (n < 0) { if (current_tcp->outf != stderr) perror_msg("%s", outfname); @@ -785,6 +796,10 @@ droptcb(struct tcb *tcp) if (tcp->pid == 0) return; + int p; + for (p = 0; p < SUPPORTED_PERSONALITIES; ++p) + free(tcp->inject_vec[p]); + free_tcb_priv_data(tcp); #ifdef USE_LIBUNWIND @@ -1397,7 +1412,8 @@ startup_child(char **argv) } if (!WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP) { kill_save_errno(pid, SIGKILL); - perror_msg_and_die("Unexpected wait status %x", status); + perror_msg_and_die("Unexpected wait status %#x", + status); } } /* Else: NOMMU case, we have no way to sync. @@ -1414,17 +1430,17 @@ startup_child(char **argv) kill(pid, SIGCONT); } tcp = alloctcb(pid); - if (!NOMMU_SYSTEM) - tcp->flags |= TCB_ATTACHED | TCB_STARTUP | post_attach_sigstop; - else - tcp->flags |= TCB_ATTACHED | TCB_STARTUP; + tcp->flags |= TCB_ATTACHED | TCB_STARTUP + | TCB_SKIP_DETACH_ON_FIRST_EXEC + | (NOMMU_SYSTEM ? 0 : (TCB_HIDE_LOG | post_attach_sigstop)); newoutf(tcp); } else { /* With -D, we are *child* here, the tracee is our parent. */ strace_child = strace_tracer_pid; strace_tracer_pid = getpid(); - alloctcb(strace_child); + tcp = alloctcb(strace_child); + tcp->flags |= TCB_SKIP_DETACH_ON_FIRST_EXEC | TCB_HIDE_LOG; /* attaching will be done later, by startup_attach */ /* note: we don't do newoutf(tcp) here either! */ @@ -1510,8 +1526,8 @@ test_ptrace_seize(void) if (WIFSIGNALED(status)) { return; } - error_msg_and_die("%s: unexpected wait status %x", - __func__, status); + error_msg_and_die("%s: unexpected wait status %#x", + __func__, status); } } #else /* !USE_SEIZE */ @@ -1638,7 +1654,7 @@ init(int argc, char *argv[]) break; case 'r': rflag = 1; - /* fall through to tflag++ */ + break; case 't': tflag++; break; @@ -1658,7 +1674,7 @@ init(int argc, char *argv[]) qualify("abbrev=none"); break; case 'V': - printf("%s -- version %s\n", PACKAGE_NAME, VERSION); + print_version(); exit(0); break; case 'z': @@ -1709,8 +1725,8 @@ init(int argc, char *argv[]) die_out_of_memory(); break; case 'I': - opt_intr = string_to_uint(optarg); - if (opt_intr <= 0 || opt_intr >= NUM_INTR_OPTS) + opt_intr = string_to_uint_upto(optarg, NUM_INTR_OPTS - 1); + if (opt_intr <= 0) error_opt_arg(c, optarg); break; default: @@ -1761,9 +1777,21 @@ init(int argc, char *argv[]) error_msg("-%c has no effect with -c", 'y'); } + if (rflag) { + if (tflag > 1) + error_msg("-tt has no effect with -r"); + tflag = 1; + } + #ifdef USE_LIBUNWIND - if (stack_trace_enabled) + if (stack_trace_enabled) { + unsigned int tcbi; + unwind_init(); + for (tcbi = 0; tcbi < tcbtabsize; ++tcbi) { + unwind_tcb_init(tcbtab[tcbi]); + } + } #endif /* See if they want to run as another user. */ @@ -1827,8 +1855,7 @@ init(int argc, char *argv[]) } if (!outfname || outfname[0] == '|' || outfname[0] == '!') { - char *buf = xmalloc(BUFSIZ); - setvbuf(shared_log, buf, _IOLBF, BUFSIZ); + setvbuf(shared_log, NULL, _IOLBF, 0); } if (outfname && argv[0]) { if (!opt_intr) @@ -1855,9 +1882,6 @@ init(int argc, char *argv[]) * in the startup_child() mode we kill the spawned process anyway. */ if (argv[0]) { - if (!NOMMU_SYSTEM || daemonized_tracer) - hide_log_until_execve = 1; - skip_one_b_execve = 1; startup_child(argv); } @@ -2040,7 +2064,7 @@ maybe_switch_tcbs(struct tcb *tcp, const int pid) struct tcb *execve_thread; long old_pid = 0; - if (ptrace(PTRACE_GETEVENTMSG, pid, NULL, (long) &old_pid) < 0) + if (ptrace(PTRACE_GETEVENTMSG, pid, NULL, &old_pid) < 0) return tcp; /* Avoid truncation in pid2tcb() param passing */ if (old_pid <= 0 || old_pid == pid) @@ -2091,8 +2115,7 @@ print_signalled(struct tcb *tcp, const int pid, int status) } if (cflag != CFLAG_ONLY_STATS - && (qual_flags[WTERMSIG(status)] & QUAL_SIGNAL) - ) { + && is_number_in_set(WTERMSIG(status), &signal_set)) { printleader(tcp); #ifdef WCOREDUMP tprintf("+++ killed by %s %s+++\n", @@ -2126,9 +2149,8 @@ static void print_stopped(struct tcb *tcp, const siginfo_t *si, const unsigned int sig) { if (cflag != CFLAG_ONLY_STATS - && !hide_log_until_execve - && (qual_flags[sig] & QUAL_SIGNAL) - ) { + && !hide_log(tcp) + && is_number_in_set(sig, &signal_set)) { printleader(tcp); if (si) { tprintf("--- %s ", signame(sig)); @@ -2161,6 +2183,43 @@ startup_tcb(struct tcb *tcp) } } +static void +print_event_exit(struct tcb *tcp) +{ + if (entering(tcp) || filtered(tcp) || hide_log(tcp) + || cflag == CFLAG_ONLY_STATS) { + return; + } + + if (followfork < 2 && printing_tcp && printing_tcp != tcp + && printing_tcp->curcol != 0) { + current_tcp = printing_tcp; + tprints(" \n"); + fflush(printing_tcp->outf); + printing_tcp->curcol = 0; + current_tcp = tcp; + } + + if ((followfork < 2 && printing_tcp != tcp) + || (tcp->flags & TCB_REPRINT)) { + tcp->flags &= ~TCB_REPRINT; + printleader(tcp); + tprintf("<... %s resumed>", tcp->s_ent->sys_name); + } + + if (!(tcp->sys_func_rval & RVAL_DECODED)) { + /* + * The decoder has probably decided to print something + * on exiting syscall which is not going to happen. + */ + tprints(" "); + } + tprints(") "); + tabto(); + tprints("= ?\n"); + line_ended(); +} + /* Returns true iff the main trace loop has to continue. */ static bool trace(void) @@ -2262,11 +2321,14 @@ trace(void) if (os_release >= KERNEL_VERSION(3,0,0)) tcp = maybe_switch_tcbs(tcp, pid); - if (detach_on_execve && !skip_one_b_execve) { - detach(tcp); /* do "-b execve" thingy */ - return true; + if (detach_on_execve) { + if (tcp->flags & TCB_SKIP_DETACH_ON_FIRST_EXEC) { + tcp->flags &= ~TCB_SKIP_DETACH_ON_FIRST_EXEC; + } else { + detach(tcp); /* do "-b execve" thingy */ + return true; + } } - skip_one_b_execve = 0; } /* Set current output file */ @@ -2308,10 +2370,14 @@ trace(void) sig = WSTOPSIG(status); - if (event != 0) { - /* Ptrace event */ + switch (event) { + case 0: + break; + case PTRACE_EVENT_EXIT: + print_event_exit(tcp); + goto restart_tracee_with_sig_0; #if USE_SEIZE - if (event == PTRACE_EVENT_STOP) { + case PTRACE_EVENT_STOP: /* * PTRACE_INTERRUPT-stop or group-stop. * PTRACE_INTERRUPT-stop has sig == SIGTRAP here. @@ -2324,9 +2390,10 @@ trace(void) stopped = true; goto show_stopsig; } - } + /* fall through */ #endif - goto restart_tracee_with_sig_0; + default: + goto restart_tracee_with_sig_0; } /* @@ -2352,7 +2419,7 @@ trace(void) * TODO: shouldn't we check for errno == EINVAL too? * We can get ESRCH instead, you know... */ - stopped = ptrace(PTRACE_GETSIGINFO, pid, 0, (long) &si) < 0; + stopped = ptrace(PTRACE_GETSIGINFO, pid, 0, &si) < 0; #if USE_SEIZE show_stopsig: #endif @@ -2388,7 +2455,8 @@ trace(void) * This should be syscall entry or exit. * Handle it. */ - if (trace_syscall(tcp) < 0) { + sig = 0; + if (trace_syscall(tcp, &sig) < 0) { /* * ptrace() failed in trace_syscall(). * Likely a result of process disappearing mid-flight. @@ -2402,6 +2470,7 @@ trace(void) */ return true; } + goto restart_tracee; restart_tracee_with_sig_0: sig = 0; diff --git a/strace.spec b/strace.spec new file mode 100644 index 000000000..6389fb9b9 --- /dev/null +++ b/strace.spec @@ -0,0 +1,575 @@ +Summary: Tracks and displays system calls associated with a running process +Name: strace +Version: 4.16 +Release: 1%{?dist} +License: BSD +Group: Development/Debuggers +URL: http://sourceforge.net/projects/strace/ +Source: http://downloads.sourceforge.net/strace/%{name}-%{version}.tar.xz +%if 0%{?fedora} >= 20 || 0%{?centos} >= 8 || 0%{?rhel} >= 8 || 0%{?suse_version} >= 1300 +%define buildrequires_libunwind_devel BuildRequires: libunwind-devel +%endif +%ifarch x86_64 +# for experimental -k option +%{?buildrequires_libunwind_devel} +%endif +%define strace64_arches ppc64 sparc64 +%{?!buildroot:BuildRoot: %_tmppath/buildroot-%name-%version-%release} + +%description +The strace program intercepts and records the system calls called and +received by a running process. Strace can print a record of each +system call, its arguments and its return value. Strace is useful for +diagnosing problems and debugging, as well as for instructional +purposes. + +Install strace if you need a tool to track the system calls made and +received by a process. + +%ifarch %{strace64_arches} +%package -n strace64 +Summary: Tracks and displays system calls associated with a running process. +Group: Development/Debuggers + +%description -n strace64 +The strace program intercepts and records the system calls called and +received by a running process. Strace can print a record of each +system call, its arguments and its return value. Strace is useful for +diagnosing problems and debugging, as well as for instructional +purposes. + +Install strace if you need a tool to track the system calls made and +received by a process. + +This package provides the `strace64' program to trace 64-bit processes. +The `strace' program in the `strace' package is for 32-bit processes. +%endif + +%prep +%setup -q +echo -n %version-%release > .tarball-version + +%build +echo 'BEGIN OF BUILD ENVIRONMENT INFORMATION' +uname -a |head -1 +libc="$(ldd /bin/sh |sed -n 's|^[^/]*\(/[^ ]*/libc\.so[^ ]*\).*|\1|p' |head -1)" +$libc |head -1 +file -L /bin/sh +gcc --version |head -1 +kver="$(echo -e '#include \nLINUX_VERSION_CODE' | gcc -E -P -)" +printf 'kernel-headers %%s.%%s.%%s\n' $(($kver/65536)) $(($kver/256%%256)) $(($kver%%256)) +echo 'END OF BUILD ENVIRONMENT INFORMATION' + +%configure +make %{?_smp_mflags} + +%install +make DESTDIR=%{buildroot} install + +# remove unpackaged files from the buildroot +rm -f %{buildroot}%{_bindir}/strace-graph + +%define copy64 ln +%if 0%{?rhel} +%if 0%{?rhel} < 6 +%endif +%define copy64 cp -p +%endif + +%ifarch %{strace64_arches} +%{copy64} %{buildroot}%{_bindir}/strace %{buildroot}%{_bindir}/strace64 +%endif + +%check +make %{?_smp_mflags} -k check VERBOSE=1 +echo 'BEGIN OF TEST SUITE INFORMATION' +tail -n 99999 -- tests*/test-suite.log tests*/ksysent.log +echo 'END OF TEST SUITE INFORMATION' + +%files +%{?suse_version:%defattr(-,root,root)} +%doc CREDITS ChangeLog ChangeLog-CVS COPYING NEWS README +%{_bindir}/strace +%{_bindir}/strace-log-merge +%{_mandir}/man1/* + +%ifarch %{strace64_arches} +%files -n strace64 +%{?suse_version:%defattr(-,root,root)} +%{_bindir}/strace64 +%endif + +%changelog +* Wed Feb 15 2017 strace-devel@lists.sourceforge.net - 4.16-1 +- strace 4.16 snapshot. + +* Wed Dec 14 2016 Dmitry V. Levin - 4.15-1 +- v4.14-100-g622af42 -> v4.15. + +* Wed Nov 16 2016 Dmitry V. Levin - 4.14.0.100.622a-1 +- v4.14 -> v4.14-100-g622af42: + + implemented syscall fault injection. + +* Tue Oct 04 2016 Dmitry V. Levin - 4.14-1 +- v4.13 -> v4.14: + + added printing of the mode argument of open and openat syscalls + when O_TMPFILE flag is set (#1377846). + +* Tue Jul 26 2016 Dmitry V. Levin - 4.13-1 +- v4.12 -> v4.13. + +* Tue May 31 2016 Dmitry V. Levin - 4.12-1 +- v4.11-163-g972018f -> v4.12. + +* Fri Feb 05 2016 Fedora Release Engineering - 4.11.0.163.9720-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 15 2016 Dmitry V. Levin - 4.11.0.163.9720-1 +- New upstream snapshot v4.11-163-g972018f: + + fixed decoding of syscalls unknown to the kernel on s390/s390x (#1298294). + +* Wed Dec 23 2015 Dmitry V. Levin - 4.11-2 +- Enabled experimental -k option on x86_64 (#1170296). + +* Mon Dec 21 2015 Dmitry V. Levin - 4.11-1 +- New upstream release: + + print nanoseconds along with seconds in stat family syscalls (#1251176). + +* Fri Jun 19 2015 Fedora Release Engineering - 4.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon May 11 2015 Marcin Juszkiewicz - 4.10-2 +- Backport set of upstream patches to get it buildable on AArch64 + +* Fri Mar 06 2015 Dmitry V. Levin - 4.10-1 +- New upstream release: + + enhanced ioctl decoding (#902788). + +* Mon Nov 03 2014 Lubomir Rintel - 4.9-3 +- Regenerate ioctl entries with proper kernel headers + +* Mon Aug 18 2014 Fedora Release Engineering - 4.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Aug 15 2014 Dmitry V. Levin - 4.9-1 +- New upstream release: + + fixed build when and conflict (#993384); + + updated CLOCK_* constants (#1088455); + + enabled ppc64le support (#1122323); + + fixed attach to a process on ppc64le (#1129569). + +* Fri Jul 25 2014 Dan Horák - 4.8-5 +- update for ppc64 + +* Sun Jun 08 2014 Fedora Release Engineering - 4.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri Dec 6 2013 Peter Robinson 4.8-3 +- Fix FTBFS + +* Sun Aug 04 2013 Fedora Release Engineering - 4.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Jun 03 2013 Dmitry V. Levin - 4.8-1 +- New upstream release: + + fixed ERESTARTNOINTR leaking to userspace on ancient kernels (#659382); + + fixed decoding of *xattr syscalls (#885233); + + fixed handling of files with 64-bit inode numbers by 32-bit strace (#912790); + + added aarch64 support (#969858). + +* Fri Feb 15 2013 Fedora Release Engineering - 4.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 4.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed May 02 2012 Dmitry V. Levin 4.7-1 +- New upstream release. + + implemented proper handling of real SIGTRAPs (#162774). + +* Sat Jan 14 2012 Fedora Release Engineering - 4.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Mar 14 2011 Dmitry V. Levin - 4.6-1 +- New upstream release. + + fixed a corner case in waitpid handling (#663547). + +* Wed Feb 09 2011 Fedora Release Engineering - 4.5.20-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Apr 13 2010 Roland McGrath - 4.5.20-1 +- New upstream release, work mostly by Andreas Schwab and Dmitry V. Levin. + + fixed potential stack buffer overflow in select decoder (#556678); + + fixed FTBFS (#539044). + +* Wed Oct 21 2009 Roland McGrath - 4.5.19-1 +- New upstream release, work mostly by Dmitry V. Levin + + exit/kill strace with traced process exitcode/signal (#105371); + + fixed build on ARM EABI (#507576); + + fixed display of 32-bit argv array on 64-bit architectures (#519480); + + fixed display of 32-bit fcntl(F_SETLK) on 64-bit architectures (#471169); + + fixed several bugs in strings decoder, including potential heap + memory corruption (#470529, #478324, #511035). + +* Thu Aug 28 2008 Roland McGrath - 4.5.18-1 +- build fix for newer kernel headers (#457291) +- fix CLONE_VFORK handling (#455078) +- Support new Linux/PPC system call subpage_prot and PROT_SAO flag. +- In sigaction system call, display sa_flags value along with SIG_DFL/SIG_IGN. + +* Mon Jul 21 2008 Roland McGrath - 4.5.17-1 +- handle O_CLOEXEC, MSG_CMSG_CLOEXEC (#365781) +- fix biarch stat64 decoding (#222275) +- fix spurious "..." in printing of environment strings (#358241) +- improve prctl decoding (#364401) +- fix hang wait on exited child with exited child (#354261) +- fix biarch fork/vfork (-f) tracing (#447475) +- fix biarch printing of negative argument kill (#430585) +- fix biarch decoding of error return values (#447587) +- fix -f tracing of CLONE_VFORK (#455078) +- fix ia64 register clobberation in -f tracing (#453438) +- print SO_NODEFER, SA_RESETHAND instead of SA_NOMASK, SA_ONESHOT (#455821) +- fix futex argument decoding (#448628, #448629) + +* Fri Aug 3 2007 Roland McGrath - 4.5.16-1 +- fix multithread issues (#240962, #240961, #247907) +- fix spurious SIGSTOP on early interrupt (#240986) +- fix utime for biarch (#247185) +- fix -u error message (#247170) +- better futex syscall printing (##241467) +- fix argv/envp printing with small -s settings, and for biarch +- new syscalls: getcpu, eventfd, timerfd, signalfd, epoll_pwait, + move_pages, utimensat + +* Tue Jan 16 2007 Roland McGrath - 4.5.15-1 +- biarch fixes (#179740, #192193, #171626, #173050, #218433, #218043) +- fix -ff -o behavior (#204950, #218435, #193808, #219423) +- better quotactl printing (#118696) +- *at, inotify*, pselect6, ppoll and unshare syscalls (#178633, #191275) +- glibc-2.5 build fixes (#209856) +- memory corruption fixes (#200621 +- fix race in child setup under -f (#180293) +- show ipc key values in hex (#198179, #192182) +- disallow -c with -ff (#187847) +- Resolves: RHBZ #179740, RHBZ #192193, RHBZ #204950, RHBZ #218435 +- Resolves: RHBZ #193808, RHBZ #219423, RHBZ #171626, RHBZ #173050 +- Resolves: RHBZ #218433, RHBZ #218043, RHBZ #118696, RHBZ #178633 +- Resolves: RHBZ #191275, RHBZ #209856, RHBZ #200621, RHBZ #180293 +- Resolves: RHBZ #198179, RHBZ #198182, RHBZ #187847 + +* Mon Nov 20 2006 Jakub Jelinek - 4.5.14-4 +- Fix ia64 syscall decoding (#206768) +- Fix build with glibc-2.4.90-33 and up on all arches but ia64 +- Fix build against 2.6.18+ headers + +* Tue Aug 22 2006 Roland McGrath - 4.5.14-3 +- Fix bogus decoding of syscalls >= 300 (#201462, #202620). + +* Fri Jul 14 2006 Jesse Keating - 4.5.14-2 +- rebuild + +* Fri Feb 10 2006 Jesse Keating - 4.5.14-1.2 +- bump again for long double bug on ppc{,64} + +* Tue Feb 07 2006 Jesse Keating - 4.5.14-1.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Mon Jan 16 2006 Roland McGrath - 4.5.14-1 +- Fix biarch decoding of socket syscalls (#174354). +- Fix biarch -e support (#173986). +- Accept numeric syscalls in -e (#174798). +- Fix ipc syscall decoding (#164755). +- Improve msgrcv printing (#164757). +- Man page updates (#165375). +- Improve mount syscall printing (#165377). +- Correct printing of restarting syscalls (#165469). + +* Wed Aug 3 2005 Roland McGrath - 4.5.13-1 +- Fix setsockopt decoding on 64-bit (#162449). +- Fix typos in socket option name strings (#161578). +- Display more IPV6 socket options by name (#162450). +- Don't display inappropriate syscalls for -e trace=file (#159340). +- New selector type -e trace=desc for file-descriptor using calls (#159400). +- Fix 32-bit old_mmap syscall decoding on x86-64 (#162467, #164215). +- Fix errors detaching from multithreaded process on interrupt (#161919). +- Note 4.5.12 fix for crash handling bad signal numbers (#162739). + +* Wed Jun 8 2005 Roland McGrath - 4.5.12-1 +- Fix known syscall recognition for IA32 processes on x86-64 (#158934). +- Fix bad output for ptrace on x86-64 (#159787). +- Fix potential buffer overruns (#151570, #159196). +- Make some diagnostics more consistent (#159308). +- Update PowerPC system calls. +- Better printing for Linux aio system calls. +- Don't truncate statfs64 fields to 32 bits in output (#158243). +- Cosmetic code cleanups (#159688). + +* Tue Mar 22 2005 Roland McGrath - 4.5.11-1 +- Build tweaks. +- Note 4.5.10 select fix (#151570). + +* Mon Mar 14 2005 Roland McGrath - 4.5.10-1 +- Fix select handling on nonstandard fd_set sizes. +- Don't print errors for null file name pointers. +- Fix initial execve output with -i (#143365). + +* Fri Feb 4 2005 Roland McGrath - 4.5.9-2 +- update ia64 syscall list (#146245) +- fix x86_64 syscall argument extraction for 32-bit processes (#146093) +- fix -e signal=NAME parsing (#143362) +- fix x86_64 exit_group syscall handling +- improve socket ioctl printing (#138223) +- code cleanups (#143369, #143370) +- improve mount flags printing (#141932) +- support symbolic printing of x86_64 arch_prctl parameters (#142667) +- fix potential crash in getxattr printing + +* Tue Oct 19 2004 Roland McGrath - 4.5.8-1 +- fix multithreaded exit handling (#132150, #135254) +- fix ioctl name matching (#129808) +- print RTC_* ioctl structure contents (#58606) +- grok epoll_* syscalls (#134463) +- grok new RLIMIT_* values (#133594) +- print struct cmsghdr contents for sendmsg (#131689) +- fix clock_* and timer_* argument output (#131420) + +* Tue Aug 31 2004 Roland McGrath - 4.5.7-2 +- new upstream version, misc fixes and updates (#128091, #129166, #128391, #129378, #130965, #131177) + +* Mon Jul 12 2004 Roland McGrath 4.5.6-1 +- new upstream version, updates ioctl lists (#127398), fixes quotactl (#127393), more ioctl decoding (#126917) + +* Sun Jun 27 2004 Roland McGrath 4.5.5-1 +- new upstream version, fixes x86-64 biarch support (#126547) + +* Tue Jun 15 2004 Elliot Lee 4.5.4-2 +- rebuilt + +* Thu Jun 3 2004 Roland McGrath 4.5.4-0.FC1 +- rebuilt for FC1 update + +* Thu Jun 3 2004 Roland McGrath 4.5.4-1 +- new upstream version, more ioctls (#122257), minor fixes + +* Fri Apr 16 2004 Roland McGrath 4.5.3-1 +- new upstream version, mq_* calls (#120701), -p vs NPTL (#120462), more fixes (#118694, #120541, #118685) + +* Tue Mar 02 2004 Elliot Lee 4.5.2-1.1 +- rebuilt + +* Mon Mar 1 2004 Roland McGrath 4.5.2-1 +- new upstream version, sched_* calls (#116990), show core flag (#112117) + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Thu Nov 13 2003 Roland McGrath 4.5.1-1 +- new upstream version, more fixes (#108012, #105366, #105359, #105358) + +* Tue Sep 30 2003 Roland McGrath 4.5-3 +- revert bogus s390 fix + +* Thu Sep 25 2003 Roland McGrath 4.5-1.2.1AS +- rebuilt for 2.1AS erratum + +* Wed Sep 24 2003 Roland McGrath 4.5-2 +- rebuilt + +* Wed Sep 24 2003 Roland McGrath 4.5-1 +- new upstream version, more fixes (#101499, #104365) + +* Thu Jul 17 2003 Roland McGrath 4.4.99-2 +- rebuilt + +* Thu Jul 17 2003 Roland McGrath 4.4.99-1 +- new upstream version, groks more new system calls, PF_INET6 sockets + +* Tue Jun 10 2003 Roland McGrath 4.4.98-1 +- new upstream version, more fixes (#90754, #91085) + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Sun Mar 30 2003 Roland McGrath 4.4.96-1 +- new upstream version, handles yet more 2.5 syscalls, x86_64 & ia64 fixes + +* Mon Feb 24 2003 Elliot Lee 4.4.95-2 +- rebuilt + +* Mon Feb 24 2003 Roland McGrath 4.4.95-1 +- new upstream version, fixed getresuid/getresgid (#84959) + +* Wed Feb 19 2003 Roland McGrath 4.4.94-1 +- new upstream version, new option -E to set environment variables (#82392) + +* Wed Jan 22 2003 Tim Powers 4.4.93-2 +- rebuilt + +* Tue Jan 21 2003 Roland McGrath 4.4.93-1 +- new upstream version, fixes ppc and s390 bugs, adds missing ptrace requests + +* Fri Jan 10 2003 Roland McGrath 4.4.91-1 +- new upstream version, fixes -f on x86-64 + +* Fri Jan 10 2003 Roland McGrath 4.4.90-1 +- new upstream version, fixes all known bugs modulo ia64 and s390 issues + +* Fri Jan 03 2003 Florian La Roche 4.4-11 +- add further s390 patch from IBM + +* Wed Nov 27 2002 Tim Powers 4.4-10 +- remove unpackaged files from the buildroot + +* Mon Oct 07 2002 Phil Knirsch 4.4-9.1 +- Added latest s390(x) patch. + +* Fri Sep 06 2002 Karsten Hopp 4.4-9 +- preliminary x86_64 support with an ugly patch to help + debugging. Needs cleanup! + +* Mon Sep 2 2002 Jakub Jelinek 4.4-8 +- newer version of the clone fixing patch (Roland McGrath) +- aio syscalls for i386/ia64/ppc (Ben LaHaise) + +* Wed Aug 28 2002 Jakub Jelinek 4.4-7 +- fix strace -f (Roland McGrath, #68994) +- handle ?et_thread_area, SA_RESTORER (Ulrich Drepper) + +* Fri Jun 21 2002 Jakub Jelinek 4.4-6 +- handle futexes, *xattr, sendfile64, etc. (Ulrich Drepper) +- handle modify_ldt (#66894) + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Tue Apr 16 2002 Jakub Jelinek 4.4-4 +- fix for the last patch by Jeff Law (#62591) + +* Mon Mar 4 2002 Preston Brown 4.4-3 +- integrate patch from Jeff Law to eliminate hang tracing threads + +* Sat Feb 23 2002 Florian La Roche +- minor update from debian tar-ball + +* Wed Jan 02 2002 Florian La Roche +- update to 4.4 + +* Sun Jul 22 2001 Florian La Roche +- disable s390 patches, they are already included + +* Wed Jul 18 2001 Preston Brown 4.3-1 +- new upstream version. Seems to have integrated most new syscalls +- tracing threaded programs is now functional. + +* Mon Jun 11 2001 Than Ngo +- port s390 patches from IBM + +* Wed May 16 2001 Nalin Dahyabhai +- modify new syscall patch to allocate enough heap space in setgroups32() + +* Wed Feb 14 2001 Jakub Jelinek +- #include in addition to + +* Fri Jan 26 2001 Karsten Hopp +- clean up conflicting patches. This happened only + when building on S390 + +* Fri Jan 19 2001 Bill Nottingham +- update to CVS, reintegrate ia64 support + +* Fri Dec 8 2000 Bernhard Rosenkraenzer +- Get S/390 support into the normal package + +* Sat Nov 18 2000 Florian La Roche +- added S/390 patch from IBM, adapting it to not conflict with + IA64 patch + +* Sat Aug 19 2000 Jakub Jelinek +- doh, actually apply the 2.4 syscalls patch +- make it compile with 2.4.0-test7-pre4+ headers, add + getdents64 and fcntl64 + +* Thu Aug 3 2000 Jakub Jelinek +- add a bunch of new 2.4 syscalls (#14036) + +* Wed Jul 12 2000 Prospector +- automatic rebuild +- excludearch ia64 + +* Fri Jun 2 2000 Matt Wilson +- use buildinstall for FHS + +* Wed May 24 2000 Jakub Jelinek +- make things compile on sparc +- fix sigreturn on sparc + +* Fri Mar 31 2000 Bill Nottingham +- fix stat64 misdef (#10485) + +* Tue Mar 21 2000 Michael K. Johnson +- added ia64 patch + +* Thu Feb 03 2000 Cristian Gafton +- man pages are compressed +- version 4.2 (why are we keeping all these patches around?) + +* Sat Nov 27 1999 Jeff Johnson +- update to 4.1 (with sparc socketcall patch). + +* Fri Nov 12 1999 Jakub Jelinek +- fix socketcall on sparc. + +* Thu Sep 02 1999 Cristian Gafton +- fix KERN_SECURELVL compile problem + +* Tue Aug 31 1999 Cristian Gafton +- added alpha patch from HJLu to fix the osf_sigprocmask interpretation + +* Sat Jun 12 1999 Jeff Johnson +- update to 3.99.1. + +* Wed Jun 2 1999 Jeff Johnson +- add (the other :-) jj's sparc patch. + +* Wed May 26 1999 Jeff Johnson +- upgrade to 3.99 in order to +- add new 2.2.x open flags (#2955). +- add new 2.2.x syscalls (#2866). +- strace 3.1 patches carried along for now. + +* Sun May 16 1999 Jeff Johnson +- don't rely on (broken!) rpm %%patch (#2735) + +* Tue Apr 06 1999 Preston Brown +- strip binary + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 16) + +* Tue Feb 9 1999 Jeff Johnson +- vfork est arrive! + +* Tue Feb 9 1999 Christopher Blizzard +- Add patch to follow clone() syscalls, too. + +* Sun Jan 17 1999 Jeff Johnson +- patch to build alpha/sparc with glibc 2.1. + +* Thu Dec 03 1998 Cristian Gafton +- patch to build on ARM + +* Wed Sep 30 1998 Jeff Johnson +- fix typo (printf, not tprintf). + +* Sat Sep 19 1998 Jeff Johnson +- fix compile problem on sparc. + +* Tue Aug 18 1998 Cristian Gafton +- buildroot + +* Mon Jul 20 1998 Cristian Gafton +- added the umoven patch from James Youngman +- fixed build problems on newer glibc releases + +* Mon Jun 08 1998 Prospector System +- translations modified for de, fr, tr diff --git a/strace.spec.in b/strace.spec.in index 0e1364012..b94517875 100644 --- a/strace.spec.in +++ b/strace.spec.in @@ -6,7 +6,7 @@ License: BSD Group: Development/Debuggers URL: http://sourceforge.net/projects/strace/ Source: http://downloads.sourceforge.net/strace/%{name}-%{version}.tar.xz -%if 0%{?fedora_version} >= 20 || 0%{?centos_version} >= 800 || 0%{?rhel_version} >= 800 || 0%{?scientificlinux_version} >= 800 || 0%{?suse_version} >= 1300 +%if 0%{?fedora} >= 20 || 0%{?centos} >= 8 || 0%{?rhel} >= 8 || 0%{?suse_version} >= 1300 %define buildrequires_libunwind_devel BuildRequires: libunwind-devel %endif %ifarch x86_64 @@ -103,6 +103,18 @@ echo 'END OF TEST SUITE INFORMATION' * @RPM_CHANGELOGTIME@ @PACKAGE_BUGREPORT@ - @PACKAGE_VERSION@-1 - @PACKAGE_STRING@ snapshot. +* Wed Dec 14 2016 Dmitry V. Levin - 4.15-1 +- v4.14-100-g622af42 -> v4.15. + +* Wed Nov 16 2016 Dmitry V. Levin - 4.14.0.100.622a-1 +- v4.14 -> v4.14-100-g622af42: + + implemented syscall fault injection. + +* Tue Oct 04 2016 Dmitry V. Levin - 4.14-1 +- v4.13 -> v4.14: + + added printing of the mode argument of open and openat syscalls + when O_TMPFILE flag is set (#1377846). + * Tue Jul 26 2016 Dmitry V. Levin - 4.13-1 - v4.12 -> v4.13. diff --git a/swapon.c b/swapon.c index ef88b1ceb..e5ebd0fa7 100644 --- a/swapon.c +++ b/swapon.c @@ -14,8 +14,7 @@ SYS_FUNC(swapon) tprints(", "); if (flags) { printflags(swap_flags, flags, "SWAP_FLAG_???"); - if (prio) - tprintf("|%u", prio); + tprintf("|%u", prio); } else { tprintf("%u", prio); } diff --git a/sys_func.h b/sys_func.h index 614a18727..a97626515 100644 --- a/sys_func.h +++ b/sys_func.h @@ -21,7 +21,6 @@ extern SYS_FUNC(clone); extern SYS_FUNC(close); extern SYS_FUNC(copy_file_range); extern SYS_FUNC(creat); -extern SYS_FUNC(create_module); extern SYS_FUNC(delete_module); extern SYS_FUNC(dup); extern SYS_FUNC(dup2); @@ -36,7 +35,6 @@ extern SYS_FUNC(eventfd2); extern SYS_FUNC(execv); extern SYS_FUNC(execve); extern SYS_FUNC(execveat); -extern SYS_FUNC(exit); extern SYS_FUNC(faccessat); extern SYS_FUNC(fadvise64); extern SYS_FUNC(fadvise64_64); @@ -171,6 +169,9 @@ extern SYS_FUNC(perf_event_open); extern SYS_FUNC(personality); extern SYS_FUNC(pipe); extern SYS_FUNC(pipe2); +extern SYS_FUNC(pkey_alloc); +extern SYS_FUNC(pkey_free); +extern SYS_FUNC(pkey_mprotect); extern SYS_FUNC(poll); extern SYS_FUNC(ppoll); extern SYS_FUNC(prctl); @@ -299,6 +300,7 @@ extern SYS_FUNC(uname); extern SYS_FUNC(unlinkat); extern SYS_FUNC(unshare); extern SYS_FUNC(userfaultfd); +extern SYS_FUNC(ustat); extern SYS_FUNC(utime); extern SYS_FUNC(utimensat); extern SYS_FUNC(utimes); diff --git a/syscall.c b/syscall.c index 0894733e3..c0407ed50 100644 --- a/syscall.c +++ b/syscall.c @@ -33,12 +33,15 @@ #include "defs.h" #include "native_defs.h" +#include "nsig.h" #include -#include /* for struct iovec */ #include +/* for __X32_SYSCALL_BIT */ +#include + #include "regs.h" #include "ptrace.h" @@ -63,11 +66,6 @@ # define NT_PRSTATUS 1 #endif -#ifndef NSIG -# warning: NSIG is not defined, using 32 -# define NSIG 32 -#endif - #include "syscall.h" /* Define these shorthand notations to simplify the syscallent files. */ @@ -82,6 +80,7 @@ #define MA MAX_ARGS #define SI STACKTRACE_INVALIDATE_CACHE #define SE STACKTRACE_CAPTURE_ON_ENTER +#define CST COMPAT_SYSCALL_TYPES #define SEN(syscall_name) SEN_ ## syscall_name, SYS_FUNC_NAME(sys_ ## syscall_name) @@ -116,6 +115,7 @@ static const struct_sysent sysent2[] = { #undef MA #undef SI #undef SE +#undef CST /* * `ioctlent[012].h' files are automatically generated by the auxiliary @@ -224,10 +224,7 @@ unsigned nerrnos = nerrnos0; unsigned nsignals = nsignals0; unsigned nioctlents = nioctlents0; -unsigned num_quals; -qualbits_t *qual_vec[SUPPORTED_PERSONALITIES]; - -static const unsigned nsyscall_vec[SUPPORTED_PERSONALITIES] = { +const unsigned int nsyscall_vec[SUPPORTED_PERSONALITIES] = { nsyscalls0, #if SUPPORTED_PERSONALITIES > 1 nsyscalls1, @@ -236,7 +233,7 @@ static const unsigned nsyscall_vec[SUPPORTED_PERSONALITIES] = { nsyscalls2, #endif }; -static const struct_sysent *const sysent_vec[SUPPORTED_PERSONALITIES] = { +const struct_sysent *const sysent_vec[SUPPORTED_PERSONALITIES] = { sysent0, #if SUPPORTED_PERSONALITIES > 1 sysent1, @@ -246,26 +243,6 @@ static const struct_sysent *const sysent_vec[SUPPORTED_PERSONALITIES] = { #endif }; -enum { - MAX_NSYSCALLS1 = (nsyscalls0 -#if SUPPORTED_PERSONALITIES > 1 - > nsyscalls1 ? nsyscalls0 : nsyscalls1 -#endif - ), - MAX_NSYSCALLS2 = (MAX_NSYSCALLS1 -#if SUPPORTED_PERSONALITIES > 2 - > nsyscalls2 ? MAX_NSYSCALLS1 : nsyscalls2 -#endif - ), - MAX_NSYSCALLS = MAX_NSYSCALLS2, - /* We are ready for arches with up to 255 signals, - * even though the largest known signo is on MIPS and it is 128. - * The number of existing syscalls on all arches is - * larger that 255 anyway, so it is just a pedantic matter. - */ - MIN_QUALS = MAX_NSYSCALLS > 255 ? MAX_NSYSCALLS : 255 -}; - #if SUPPORTED_PERSONALITIES > 1 unsigned current_personality; @@ -280,6 +257,17 @@ static const int personality_wordsize[SUPPORTED_PERSONALITIES] = { }; # endif +# ifndef current_klongsize +unsigned current_klongsize; +static const int personality_klongsize[SUPPORTED_PERSONALITIES] = { + PERSONALITY0_KLONGSIZE, + PERSONALITY1_KLONGSIZE, +# if SUPPORTED_PERSONALITIES > 2 + PERSONALITY2_KLONGSIZE, +# endif +}; +# endif + void set_personality(int personality) { @@ -324,6 +312,9 @@ set_personality(int personality) # ifndef current_wordsize current_wordsize = personality_wordsize[personality]; # endif +# ifndef current_klongsize + current_klongsize = personality_klongsize[personality]; +# endif } static void @@ -359,212 +350,6 @@ update_personality(struct tcb *tcp, unsigned int personality) } #endif -static int qual_syscall(), qual_signal(), qual_desc(); - -static const struct qual_options { - unsigned int bitflag; - const char *option_name; - int (*qualify)(const char *, int, int); - const char *argument_name; -} qual_options[] = { - { QUAL_TRACE, "trace", qual_syscall, "system call" }, - { QUAL_TRACE, "t", qual_syscall, "system call" }, - { QUAL_ABBREV, "abbrev", qual_syscall, "system call" }, - { QUAL_ABBREV, "a", qual_syscall, "system call" }, - { QUAL_VERBOSE, "verbose", qual_syscall, "system call" }, - { QUAL_VERBOSE, "v", qual_syscall, "system call" }, - { QUAL_RAW, "raw", qual_syscall, "system call" }, - { QUAL_RAW, "x", qual_syscall, "system call" }, - { QUAL_SIGNAL, "signal", qual_signal, "signal" }, - { QUAL_SIGNAL, "signals", qual_signal, "signal" }, - { QUAL_SIGNAL, "s", qual_signal, "signal" }, - { QUAL_READ, "read", qual_desc, "descriptor" }, - { QUAL_READ, "reads", qual_desc, "descriptor" }, - { QUAL_READ, "r", qual_desc, "descriptor" }, - { QUAL_WRITE, "write", qual_desc, "descriptor" }, - { QUAL_WRITE, "writes", qual_desc, "descriptor" }, - { QUAL_WRITE, "w", qual_desc, "descriptor" }, - { 0, NULL, NULL, NULL }, -}; - -static void -reallocate_qual(const unsigned int n) -{ - unsigned p; - qualbits_t *qp; - for (p = 0; p < SUPPORTED_PERSONALITIES; p++) { - qp = qual_vec[p] = xreallocarray(qual_vec[p], n, - sizeof(qualbits_t)); - memset(&qp[num_quals], 0, (n - num_quals) * sizeof(qualbits_t)); - } - num_quals = n; -} - -static void -qualify_one(const unsigned int n, unsigned int bitflag, const int not, const int pers) -{ - int p; - - if (num_quals <= n) - reallocate_qual(n + 1); - - for (p = 0; p < SUPPORTED_PERSONALITIES; p++) { - if (pers == p || pers < 0) { - if (not) - qual_vec[p][n] &= ~bitflag; - else - qual_vec[p][n] |= bitflag; - } - } -} - -static int -lookup_class(const char *s) -{ - if (strcmp(s, "file") == 0) - return TRACE_FILE; - if (strcmp(s, "ipc") == 0) - return TRACE_IPC; - if (strcmp(s, "network") == 0) - return TRACE_NETWORK; - if (strcmp(s, "process") == 0) - return TRACE_PROCESS; - if (strcmp(s, "signal") == 0) - return TRACE_SIGNAL; - if (strcmp(s, "desc") == 0) - return TRACE_DESC; - if (strcmp(s, "memory") == 0) - return TRACE_MEMORY; - return -1; -} - -static int -qual_syscall(const char *s, const unsigned int bitflag, const int not) -{ - unsigned int p; - unsigned int i; - int n; - int rc = -1; - - if ((n = lookup_class(s)) >= 0) { - for (p = 0; p < SUPPORTED_PERSONALITIES; ++p) { - for (i = 0; i < nsyscall_vec[p]; ++i) { - if ((sysent_vec[p][i].sys_flags & n) == n) { - qualify_one(i, bitflag, not, p); - } - } - } - return 0; - } - - if (*s >= '0' && *s <= '9') { - i = string_to_uint(s); - if (i >= MAX_NSYSCALLS) - return -1; - qualify_one(i, bitflag, not, -1); - return 0; - } - - for (p = 0; p < SUPPORTED_PERSONALITIES; p++) { - for (i = 0; i < nsyscall_vec[p]; i++) { - if (sysent_vec[p][i].sys_name - && strcmp(s, sysent_vec[p][i].sys_name) == 0 - ) { - qualify_one(i, bitflag, not, p); - rc = 0; - } - } - } - - return rc; -} - -static int -qual_signal(const char *s, const unsigned int bitflag, const int not) -{ - unsigned int i; - - if (*s >= '0' && *s <= '9') { - int signo = string_to_uint(s); - if (signo < 0 || signo > 255) - return -1; - qualify_one(signo, bitflag, not, -1); - return 0; - } - if (strncasecmp(s, "SIG", 3) == 0) - s += 3; - for (i = 0; i <= NSIG; i++) { - if (strcasecmp(s, signame(i) + 3) == 0) { - qualify_one(i, bitflag, not, -1); - return 0; - } - } - return -1; -} - -static int -qual_desc(const char *s, const unsigned int bitflag, const int not) -{ - if (*s >= '0' && *s <= '9') { - int desc = string_to_uint(s); - if (desc < 0 || desc > 0x7fff) /* paranoia */ - return -1; - qualify_one(desc, bitflag, not, -1); - return 0; - } - return -1; -} - -void -qualify(const char *s) -{ - const struct qual_options *opt; - char *copy; - const char *p; - int not; - unsigned int i; - - if (num_quals == 0) - reallocate_qual(MIN_QUALS); - - opt = &qual_options[0]; - for (i = 0; (p = qual_options[i].option_name); i++) { - unsigned int len = strlen(p); - if (strncmp(s, p, len) == 0 && s[len] == '=') { - opt = &qual_options[i]; - s += len + 1; - break; - } - } - not = 0; - if (*s == '!') { - not = 1; - s++; - } - if (strcmp(s, "none") == 0) { - not = 1 - not; - s = "all"; - } - if (strcmp(s, "all") == 0) { - for (i = 0; i < num_quals; i++) { - qualify_one(i, opt->bitflag, not, -1); - } - return; - } - for (i = 0; i < num_quals; i++) { - qualify_one(i, opt->bitflag, !not, -1); - } - copy = xstrdup(s); - for (p = strtok(copy, ","); p; p = strtok(NULL, ",")) { - if (opt->qualify(p, opt->bitflag, not)) { - error_msg_and_die("invalid %s '%s'", - opt->argument_name, p); - } - } - free(copy); - return; -} - #ifdef SYS_socket_subcall static void decode_socket_subcall(struct tcb *tcp) @@ -574,7 +359,7 @@ decode_socket_subcall(struct tcb *tcp) if (call < 1 || call >= SYS_socket_nsubcalls) return; - const unsigned long scno = SYS_socket_subcall + call; + const kernel_ulong_t scno = SYS_socket_subcall + call; const unsigned int nargs = sysent[scno].nargs; uint64_t buf[nargs]; @@ -582,7 +367,7 @@ decode_socket_subcall(struct tcb *tcp) return; tcp->scno = scno; - tcp->qual_flg = qual_flags[scno]; + tcp->qual_flg = qual_flags(scno); tcp->s_ent = &sysent[scno]; unsigned int i; @@ -622,7 +407,7 @@ decode_ipc_subcall(struct tcb *tcp) } tcp->scno = SYS_ipc_subcall + call; - tcp->qual_flg = qual_flags[tcp->scno]; + tcp->qual_flg = qual_flags(tcp->scno); tcp->s_ent = &sysent[tcp->scno]; const unsigned int n = tcp->s_ent->nargs; @@ -636,10 +421,10 @@ decode_ipc_subcall(struct tcb *tcp) static void decode_mips_subcall(struct tcb *tcp) { - if (!SCNO_IS_VALID(tcp->u_arg[0])) + if (!scno_is_valid(tcp->u_arg[0])) return; tcp->scno = tcp->u_arg[0]; - tcp->qual_flg = qual_flags[tcp->scno]; + tcp->qual_flg = qual_flags(tcp->scno); tcp->s_ent = &sysent[tcp->scno]; memmove(&tcp->u_arg[0], &tcp->u_arg[1], sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0])); @@ -661,21 +446,20 @@ decode_mips_subcall(struct tcb *tcp) static void dumpio(struct tcb *tcp) { - int sen; - if (syserror(tcp)) return; - if ((unsigned long) tcp->u_arg[0] >= num_quals) - return; - sen = tcp->s_ent->sen; - if (SEN_printargs == sen) + + int fd = tcp->u_arg[0]; + if (fd < 0) return; - if (qual_flags[tcp->u_arg[0]] & QUAL_READ) { - switch (sen) { + + if (is_number_in_set(fd, &read_set)) { + switch (tcp->s_ent->sen) { case SEN_read: case SEN_pread: case SEN_recv: case SEN_recvfrom: + case SEN_mq_timedreceive: dumpstr(tcp, tcp->u_arg[1], tcp->u_rval); return; case SEN_readv: @@ -692,23 +476,23 @@ dumpio(struct tcb *tcp) return; } } - if (qual_flags[tcp->u_arg[0]] & QUAL_WRITE) { - switch (sen) { + if (is_number_in_set(fd, &write_set)) { + switch (tcp->s_ent->sen) { case SEN_write: case SEN_pwrite: case SEN_send: case SEN_sendto: + case SEN_mq_timedsend: dumpstr(tcp, tcp->u_arg[1], tcp->u_arg[2]); break; case SEN_writev: case SEN_pwritev: case SEN_pwritev2: case SEN_vmsplice: - dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]); + dumpiov_upto(tcp, tcp->u_arg[2], tcp->u_arg[1], -1); break; case SEN_sendmsg: - dumpiov_in_msghdr(tcp, tcp->u_arg[1], - (unsigned long) -1L); + dumpiov_in_msghdr(tcp, tcp->u_arg[1], -1); break; case SEN_sendmmsg: dumpiov_in_mmsghdr(tcp, tcp->u_arg[1]); @@ -721,10 +505,10 @@ dumpio(struct tcb *tcp) * Shuffle syscall numbers so that we don't have huge gaps in syscall table. * The shuffling should be an involution: shuffle_scno(shuffle_scno(n)) == n. */ -#if defined(ARM) || defined(AARCH64) /* So far only 32-bit ARM needs this */ -static long -shuffle_scno(unsigned long scno) +static kernel_ulong_t +shuffle_scno(kernel_ulong_t scno) { +#if defined(ARM) || defined(AARCH64) /* So far only 32-bit ARM needs this */ if (scno < ARM_FIRST_SHUFFLED_SYSCALL) return scno; @@ -734,7 +518,7 @@ shuffle_scno(unsigned long scno) if (scno == 0x000ffff0) return ARM_FIRST_SHUFFLED_SYSCALL; -#define ARM_SECOND_SHUFFLED_SYSCALL (ARM_FIRST_SHUFFLED_SYSCALL + 1) +# define ARM_SECOND_SHUFFLED_SYSCALL (ARM_FIRST_SHUFFLED_SYSCALL + 1) /* * Is it ARM specific syscall? * Swap [0x000f0000, 0x000f0000 + LAST_SPECIAL] range @@ -747,25 +531,10 @@ shuffle_scno(unsigned long scno) if (scno <= ARM_SECOND_SHUFFLED_SYSCALL + ARM_LAST_SPECIAL_SYSCALL) { return scno + 0x000f0000 - ARM_SECOND_SHUFFLED_SYSCALL; } +#endif /* ARM || AARCH64 */ return scno; } -#else -# define shuffle_scno(scno) ((long)(scno)) -#endif - -const char * -syscall_name(long scno) -{ - static char buf[sizeof("syscall_%lu") + sizeof(long)*3]; - - if (SCNO_IS_VALID(scno)) - return sysent[scno].sys_name; - else { - sprintf(buf, "syscall_%lu", scno); - return buf; - } -} const char * err_name(unsigned long err) @@ -787,13 +556,87 @@ clear_regs(void) static int get_syscall_args(struct tcb *); static int get_syscall_result(struct tcb *); static int arch_get_scno(struct tcb *tcp); +static int arch_set_scno(struct tcb *, kernel_ulong_t); static void get_error(struct tcb *, const bool); -#if defined X86_64 || defined POWERPC -static int getregs_old(pid_t); -#endif +static int arch_set_error(struct tcb *); +static int arch_set_success(struct tcb *); + +struct inject_opts *inject_vec[SUPPORTED_PERSONALITIES]; + +static struct inject_opts * +tcb_inject_opts(struct tcb *tcp) +{ + return (scno_in_range(tcp->scno) && tcp->inject_vec[current_personality]) + ? &tcp->inject_vec[current_personality][tcp->scno] : NULL; +} + + +static long +tamper_with_syscall_entering(struct tcb *tcp, unsigned int *signo) +{ + if (!tcp->inject_vec[current_personality]) { + tcp->inject_vec[current_personality] = + xcalloc(nsyscalls, sizeof(**inject_vec)); + memcpy(tcp->inject_vec[current_personality], + inject_vec[current_personality], + nsyscalls * sizeof(**inject_vec)); + } + + struct inject_opts *opts = tcb_inject_opts(tcp); + + if (!opts || opts->first == 0) + return 0; + + --opts->first; + + if (opts->first != 0) + return 0; + + opts->first = opts->step; + + if (opts->signo > 0) + *signo = opts->signo; + if (opts->rval != INJECT_OPTS_RVAL_DEFAULT && !arch_set_scno(tcp, -1)) + tcp->flags |= TCB_TAMPERED; + + return 0; +} + +static long +tamper_with_syscall_exiting(struct tcb *tcp) +{ + struct inject_opts *opts = tcb_inject_opts(tcp); + + if (!opts) + return 0; + + if (opts->rval >= 0) { + kernel_long_t u_rval = tcp->u_rval; + + tcp->u_rval = opts->rval; + if (arch_set_success(tcp)) { + tcp->u_rval = u_rval; + } else { + tcp->u_error = 0; + } + } else { + unsigned long new_error = -opts->rval; + + if (new_error != tcp->u_error && new_error <= MAX_ERRNO_VALUE) { + unsigned long u_error = tcp->u_error; + + tcp->u_error = new_error; + if (arch_set_error(tcp)) { + tcp->u_error = u_error; + } + } + } + + return 0; +} static int -trace_syscall_entering(struct tcb *tcp) +trace_syscall_entering(struct tcb *tcp, unsigned int *sig) { int res, scno_good; @@ -818,14 +661,6 @@ trace_syscall_entering(struct tcb *tcp) decode_mips_subcall(tcp); #endif - if ( SEN_execve == tcp->s_ent->sen -# if defined(SPARC) || defined(SPARC64) - || SEN_execv == tcp->s_ent->sen -# endif - ) { - hide_log_until_execve = 0; - } - #if defined(SYS_socket_subcall) || defined(SYS_ipc_subcall) switch (tcp->s_ent->sen) { # ifdef SYS_socket_subcall @@ -841,6 +676,21 @@ trace_syscall_entering(struct tcb *tcp) } #endif + /* Restrain from fault injection while the trace executes strace code. */ + if (hide_log(tcp)) { + tcp->qual_flg &= ~QUAL_INJECT; + } + + switch (tcp->s_ent->sen) { + case SEN_execve: + case SEN_execveat: +#if defined SPARC || defined SPARC64 + case SEN_execv: +#endif + tcp->flags &= ~TCB_HIDE_LOG; + break; + } + if (!(tcp->qual_flg & QUAL_TRACE) || (tracing_paths && !pathtrace_match(tcp)) ) { @@ -851,7 +701,15 @@ trace_syscall_entering(struct tcb *tcp) tcp->flags &= ~TCB_FILTERED; - if (cflag == CFLAG_ONLY_STATS || hide_log_until_execve) { + if (hide_log(tcp)) { + res = 0; + goto ret; + } + + if (tcp->qual_flg & QUAL_INJECT) + tamper_with_syscall_entering(tcp, sig); + + if (cflag == CFLAG_ONLY_STATS) { res = 0; goto ret; } @@ -865,7 +723,7 @@ trace_syscall_entering(struct tcb *tcp) printleader(tcp); tprintf("%s(", tcp->s_ent->sys_name); - if ((tcp->qual_flg & QUAL_RAW) && SEN_exit != tcp->s_ent->sen) + if (tcp->qual_flg & QUAL_RAW) res = printargs(tcp); else res = tcp->s_ent->sys_func(tcp); @@ -880,6 +738,12 @@ trace_syscall_entering(struct tcb *tcp) return res; } +static bool +syscall_tampered(struct tcb *tcp) +{ + return tcp->flags & TCB_TAMPERED; +} + static int trace_syscall_exiting(struct tcb *tcp) { @@ -904,9 +768,12 @@ trace_syscall_exiting(struct tcb *tcp) update_personality(tcp, tcp->currpers); #endif res = (get_regs_error ? -1 : get_syscall_result(tcp)); - if (filtered(tcp) || hide_log_until_execve) + if (filtered(tcp) || hide_log(tcp)) goto ret; + if (syserror(tcp) && syscall_tampered(tcp)) + tamper_with_syscall_exiting(tcp); + if (cflag) { count_syscall(tcp, &tv); if (cflag == CFLAG_ONLY_STATS) { @@ -937,7 +804,7 @@ trace_syscall_exiting(struct tcb *tcp) tabto(); tprints("= ? \n"); line_ended(); - tcp->flags &= ~TCB_INSYSCALL; + tcp->flags &= ~(TCB_INSYSCALL | TCB_TAMPERED); tcp->sys_func_rval = 0; free_tcb_priv_data(tcp); return res; @@ -967,11 +834,15 @@ trace_syscall_exiting(struct tcb *tcp) tprints(") "); tabto(); u_error = tcp->u_error; + if (tcp->qual_flg & QUAL_RAW) { - if (u_error) + if (u_error) { tprintf("= -1 (errno %lu)", u_error); - else - tprintf("= %#lx", tcp->u_rval); + } else { + tprintf("= %#" PRI_klx, tcp->u_rval); + } + if (syscall_tampered(tcp)) + tprints(" (INJECTED)"); } else if (!(sys_res & RVAL_NONE) && u_error) { switch (u_error) { @@ -1038,6 +909,8 @@ trace_syscall_exiting(struct tcb *tcp) u_error, strerror(u_error)); break; } + if (syscall_tampered(tcp)) + tprintf(" (INJECTED)"); if ((sys_res & RVAL_STR) && tcp->auxstr) tprintf(" (%s)", tcp->auxstr); } @@ -1047,29 +920,33 @@ trace_syscall_exiting(struct tcb *tcp) else { switch (sys_res & RVAL_MASK) { case RVAL_HEX: -#if SUPPORTED_PERSONALITIES > 1 - if (current_wordsize < sizeof(long)) +#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG + if (current_wordsize < sizeof(tcp->u_rval)) { tprintf("= %#x", (unsigned int) tcp->u_rval); - else + } else #endif - tprintf("= %#lx", tcp->u_rval); + { + tprintf("= %#" PRI_klx, tcp->u_rval); + } break; case RVAL_OCTAL: tprints("= "); print_numeric_long_umask(tcp->u_rval); break; case RVAL_UDECIMAL: -#if SUPPORTED_PERSONALITIES > 1 - if (current_wordsize < sizeof(long)) +#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG + if (current_wordsize < sizeof(tcp->u_rval)) { tprintf("= %u", (unsigned int) tcp->u_rval); - else + } else #endif - tprintf("= %lu", tcp->u_rval); + { + tprintf("= %" PRI_klu, tcp->u_rval); + } break; case RVAL_DECIMAL: - tprintf("= %ld", tcp->u_rval); + tprintf("= %" PRI_kld, tcp->u_rval); break; case RVAL_FD: if (show_fd_path) { @@ -1077,26 +954,8 @@ trace_syscall_exiting(struct tcb *tcp) printfd(tcp, tcp->u_rval); } else - tprintf("= %ld", tcp->u_rval); - break; -#if HAVE_STRUCT_TCB_EXT_ARG - /* - case RVAL_LHEX: - tprintf("= %#llx", tcp->u_lrval); + tprintf("= %" PRI_kld, tcp->u_rval); break; - case RVAL_LOCTAL: - tprintf("= %#llo", tcp->u_lrval); - break; - */ - case RVAL_LUDECIMAL: - tprintf("= %llu", tcp->u_lrval); - break; - /* - case RVAL_LDECIMAL: - tprintf("= %lld", tcp->u_lrval); - break; - */ -#endif /* HAVE_STRUCT_TCB_EXT_ARG */ default: error_msg("invalid rval format"); break; @@ -1104,6 +963,8 @@ trace_syscall_exiting(struct tcb *tcp) } if ((sys_res & RVAL_STR) && tcp->auxstr) tprintf(" (%s)", tcp->auxstr); + if (syscall_tampered(tcp)) + tprints(" (INJECTED)"); } if (Tflag) { tv_sub(&tv, &tv, &tcp->etime); @@ -1120,17 +981,17 @@ trace_syscall_exiting(struct tcb *tcp) #endif ret: - tcp->flags &= ~TCB_INSYSCALL; + tcp->flags &= ~(TCB_INSYSCALL | TCB_TAMPERED); tcp->sys_func_rval = 0; free_tcb_priv_data(tcp); return 0; } int -trace_syscall(struct tcb *tcp) +trace_syscall(struct tcb *tcp, unsigned int *signo) { return exiting(tcp) ? - trace_syscall_exiting(tcp) : trace_syscall_entering(tcp); + trace_syscall_exiting(tcp) : trace_syscall_entering(tcp, signo); } bool @@ -1162,8 +1023,6 @@ restore_cleared_syserror(struct tcb *tcp) tcp->u_error = saved_u_error; } -#include "kernel_types.h" - /* * Check the syscall return value register value for whether it is * a negated errno code indicating an error, or a success return value. @@ -1174,22 +1033,12 @@ is_negated_errno(kernel_ulong_t val) /* Linux kernel defines MAX_ERRNO to 4095. */ kernel_ulong_t max = -(kernel_long_t) 4095; -#if defined X86_64 || defined X32 - /* - * current_wordsize is 4 for x32 personality - * but truncation _must not_ be done in it, so - * check current_personality instead. - */ - if (current_personality == 1) { +#ifndef current_klongsize + if (current_klongsize < sizeof(val)) { val = (uint32_t) val; max = (uint32_t) max; } -#elif SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 - if (current_wordsize < sizeof(val)) { - val = (uint32_t) val; - max = (uint32_t) max; - } -#endif +#endif /* !current_klongsize */ return val >= max; } @@ -1206,7 +1055,7 @@ print_pc(struct tcb *tcp) #if defined ARCH_PC_REG # define ARCH_GET_PC 0 #elif defined ARCH_PC_PEEK_ADDR - long pc; + kernel_ulong_t pc; # define ARCH_PC_REG pc # define ARCH_GET_PC upeek(tcp->pid, ARCH_PC_PEEK_ADDR, &pc) #else @@ -1216,13 +1065,20 @@ print_pc(struct tcb *tcp) tprints(current_wordsize == 4 ? "[????????] " : "[????????????????] "); else - tprintf(current_wordsize == 4 ? "[%08lx] " : "[%016lx] ", - (unsigned long) ARCH_PC_REG); + tprintf(current_wordsize == 4 + ? "[%08" PRI_klx "] " : "[%016" PRI_klx "] ", + (kernel_ulong_t) ARCH_PC_REG); } -#if defined ARCH_REGS_FOR_GETREGSET +#include "getregs_old.h" + +#undef ptrace_getregset_or_getregs +#undef ptrace_setregset_or_setregs +#ifdef ARCH_REGS_FOR_GETREGSET + +# define ptrace_getregset_or_getregs ptrace_getregset static long -get_regset(pid_t pid) +ptrace_getregset(pid_t pid) { # ifdef ARCH_IOVEC_FOR_GETREGSET /* variable iovec */ @@ -1239,65 +1095,109 @@ get_regset(pid_t pid) # endif } -#endif /* ARCH_REGS_FOR_GETREGSET */ + +# ifndef HAVE_GETREGS_OLD +# define ptrace_setregset_or_setregs ptrace_setregset +static int +ptrace_setregset(pid_t pid) +{ +# ifdef ARCH_IOVEC_FOR_GETREGSET + /* variable iovec */ + return ptrace(PTRACE_SETREGSET, pid, NT_PRSTATUS, + &ARCH_IOVEC_FOR_GETREGSET); +# else + /* constant iovec */ + static struct iovec io = { + .iov_base = &ARCH_REGS_FOR_GETREGSET, + .iov_len = sizeof(ARCH_REGS_FOR_GETREGSET) + }; + return ptrace(PTRACE_SETREGSET, pid, NT_PRSTATUS, &io); +# endif +} +# endif /* !HAVE_GETREGS_OLD */ + +#elif defined ARCH_REGS_FOR_GETREGS + +# define ptrace_getregset_or_getregs ptrace_getregs +static long +ptrace_getregs(pid_t pid) +{ +# if defined SPARC || defined SPARC64 + /* SPARC systems have the meaning of data and addr reversed */ + return ptrace(PTRACE_GETREGS, pid, (void *) &ARCH_REGS_FOR_GETREGS, 0); +# else + return ptrace(PTRACE_GETREGS, pid, NULL, &ARCH_REGS_FOR_GETREGS); +# endif +} + +# ifndef HAVE_GETREGS_OLD +# define ptrace_setregset_or_setregs ptrace_setregs +static int +ptrace_setregs(pid_t pid) +{ +# if defined SPARC || defined SPARC64 + /* SPARC systems have the meaning of data and addr reversed */ + return ptrace(PTRACE_SETREGS, pid, (void *) &ARCH_REGS_FOR_GETREGS, 0); +# else + return ptrace(PTRACE_SETREGS, pid, NULL, &ARCH_REGS_FOR_GETREGS); +# endif +} +# endif /* !HAVE_GETREGS_OLD */ + +#endif /* ARCH_REGS_FOR_GETREGSET || ARCH_REGS_FOR_GETREGS */ void get_regs(pid_t pid) { #undef USE_GET_SYSCALL_RESULT_REGS -#ifdef ARCH_REGS_FOR_GETREGSET -# ifdef X86_64 - /* Try PTRACE_GETREGSET first, fallback to PTRACE_GETREGS. */ - static int getregset_support; +#ifdef ptrace_getregset_or_getregs - if (getregset_support >= 0) { - get_regs_error = get_regset(pid); - if (getregset_support > 0) - return; +# ifdef HAVE_GETREGS_OLD + /* + * Try PTRACE_GETREGSET/PTRACE_GETREGS first, + * fallback to getregs_old. + */ + static int use_getregs_old; + if (use_getregs_old < 0) { + get_regs_error = ptrace_getregset_or_getregs(pid); + return; + } else if (use_getregs_old == 0) { + get_regs_error = ptrace_getregset_or_getregs(pid); if (get_regs_error >= 0) { - getregset_support = 1; + use_getregs_old = -1; return; } if (errno == EPERM || errno == ESRCH) return; - getregset_support = -1; + use_getregs_old = 1; } get_regs_error = getregs_old(pid); -# else /* !X86_64 */ - /* Assume that PTRACE_GETREGSET works. */ - get_regs_error = get_regset(pid); -# endif -#elif defined ARCH_REGS_FOR_GETREGS -# if defined SPARC || defined SPARC64 - /* SPARC systems have the meaning of data and addr reversed */ - get_regs_error = - ptrace(PTRACE_GETREGS, pid, (void *) &ARCH_REGS_FOR_GETREGS, 0); -# elif defined POWERPC - static bool old_kernel = 0; - if (old_kernel) - goto old; - get_regs_error = ptrace(PTRACE_GETREGS, pid, NULL, &ARCH_REGS_FOR_GETREGS); - if (get_regs_error && errno == EIO) { - old_kernel = 1; - old: - get_regs_error = getregs_old(pid); - } -# else - /* Assume that PTRACE_GETREGS works. */ - get_regs_error = ptrace(PTRACE_GETREGS, pid, NULL, &ARCH_REGS_FOR_GETREGS); -# endif +# else /* !HAVE_GETREGS_OLD */ + /* Assume that PTRACE_GETREGSET/PTRACE_GETREGS works. */ + get_regs_error = ptrace_getregset_or_getregs(pid); +# endif /* !HAVE_GETREGS_OLD */ + +#else /* !ptrace_getregset_or_getregs */ -#else /* !ARCH_REGS_FOR_GETREGSET && !ARCH_REGS_FOR_GETREGS */ # define USE_GET_SYSCALL_RESULT_REGS 1 # warning get_regs is not implemented for this architecture yet get_regs_error = 0; -#endif + +#endif /* !ptrace_getregset_or_getregs */ +} + +#ifdef ptrace_setregset_or_setregs +static int +set_regs(pid_t pid) +{ + return ptrace_setregset_or_setregs(pid); } +#endif /* ptrace_setregset_or_setregs */ struct sysent_buf { struct tcb *tcp; struct_sysent ent; - char buf[sizeof("syscall_%lu") + sizeof(long) * 3]; + char buf[sizeof("syscall_%lu") + sizeof(kernel_ulong_t) * 3]; }; static void @@ -1325,9 +1225,9 @@ get_scno(struct tcb *tcp) if (rc != 1) return rc; - if (SCNO_IS_VALID(tcp->scno)) { + if (scno_is_valid(tcp->scno)) { tcp->s_ent = &sysent[tcp->scno]; - tcp->qual_flg = qual_flags[tcp->scno]; + tcp->qual_flg = qual_flags(tcp->scno); } else { struct sysent_buf *s = xcalloc(1, sizeof(*s)); @@ -1336,7 +1236,7 @@ get_scno(struct tcb *tcp) s->ent.sen = SEN_printargs; s->ent.sys_func = printargs; s->ent.sys_name = s->buf; - sprintf(s->buf, "syscall_%lu", shuffle_scno(tcp->scno)); + sprintf(s->buf, "syscall_%" PRI_klu, shuffle_scno(tcp->scno)); tcp->s_ent = &s->ent; tcp->qual_flg = QUAL_RAW | DEFAULT_QUAL_FLAGS; @@ -1344,7 +1244,8 @@ get_scno(struct tcb *tcp) set_tcb_priv_data(tcp, s, free_sysent_buf); if (debug_flag) - error_msg("pid %d invalid syscall %ld", tcp->pid, tcp->scno); + error_msg("pid %d invalid syscall %" PRI_kld, + tcp->pid, tcp->scno); } return 1; } @@ -1372,11 +1273,23 @@ get_syscall_result(struct tcb *tcp) } #include "get_scno.c" +#include "set_scno.c" #include "get_syscall_args.c" #ifdef USE_GET_SYSCALL_RESULT_REGS # include "get_syscall_result.c" #endif #include "get_error.c" -#if defined X86_64 || defined POWERPC +#include "set_error.c" +#ifdef HAVE_GETREGS_OLD # include "getregs_old.c" #endif + +const char * +syscall_name(kernel_ulong_t scno) +{ +#if defined X32_PERSONALITY_NUMBER && defined __X32_SYSCALL_BIT + if (current_personality == X32_PERSONALITY_NUMBER) + scno &= ~__X32_SYSCALL_BIT; +#endif + return scno_is_valid(scno) ? sysent[scno].sys_name: NULL; +} diff --git a/sysctl.c b/sysctl.c index 03e98c195..38436931c 100644 --- a/sysctl.c +++ b/sysctl.c @@ -167,13 +167,13 @@ SYS_FUNC(sysctl) size_t oldlen = 0; if (info.oldval == NULL) { tprints("NULL"); - } else if (umove(tcp, (long)info.oldlenp, &oldlen) >= 0 + } else if (umove(tcp, ptr_to_kulong(info.oldlenp), &oldlen) >= 0 && info.nlen >= 2 && ((name[0] == CTL_KERN && (name[1] == KERN_OSRELEASE || name[1] == KERN_OSTYPE )))) { - printpath(tcp, (size_t)info.oldval); + printpath(tcp, ptr_to_kulong(info.oldval)); } else { tprintf("%p", info.oldval); } @@ -183,7 +183,7 @@ SYS_FUNC(sysctl) else if (syserror(tcp)) tprintf("%p", info.newval); else - printpath(tcp, (size_t)info.newval); + printpath(tcp, ptr_to_kulong(info.newval)); tprintf(", %lu", (unsigned long)info.newlen); } diff --git a/sysent.h b/sysent.h new file mode 100644 index 000000000..aa93bcb8a --- /dev/null +++ b/sysent.h @@ -0,0 +1,25 @@ +#ifndef STRACE_SYSENT_H +#define STRACE_SYSENT_H + +typedef struct sysent { + unsigned nargs; + int sys_flags; + int sen; + int (*sys_func)(); + const char *sys_name; +} struct_sysent; + +#define TRACE_FILE 001 /* Trace file-related syscalls. */ +#define TRACE_IPC 002 /* Trace IPC-related syscalls. */ +#define TRACE_NETWORK 004 /* Trace network-related syscalls. */ +#define TRACE_PROCESS 010 /* Trace process-related syscalls. */ +#define TRACE_SIGNAL 020 /* Trace signal-related syscalls. */ +#define TRACE_DESC 040 /* Trace file descriptor-related syscalls. */ +#define TRACE_MEMORY 0100 /* Trace memory mapping-related syscalls. */ +#define SYSCALL_NEVER_FAILS 0200 /* Syscall is always successful. */ +#define STACKTRACE_INVALIDATE_CACHE 0400 /* Trigger proc/maps cache updating */ +#define STACKTRACE_CAPTURE_ON_ENTER 01000 /* Capture stacktrace on "entering" stage */ +#define TRACE_INDIRECT_SUBCALL 02000 /* Syscall is an indirect socket/ipc subcall. */ +#define COMPAT_SYSCALL_TYPES 04000 /* A compat syscall that uses compat types. */ + +#endif /* !STRACE_SYSENT_H */ diff --git a/syslog.c b/syslog.c index 6be941c66..990630605 100644 --- a/syslog.c +++ b/syslog.c @@ -62,7 +62,7 @@ SYS_FUNC(syslog) break; default: printaddr(tcp->u_arg[1]); - tprintf(", %lu", tcp->u_arg[2]); + tprintf(", %" PRI_klu, tcp->u_arg[2]); return RVAL_DECODED; } @@ -70,7 +70,7 @@ SYS_FUNC(syslog) if (syserror(tcp)) printaddr(tcp->u_arg[1]); else - printstr(tcp, tcp->u_arg[1], tcp->u_rval); + printstrn(tcp, tcp->u_arg[1], tcp->u_rval); /* len */ tprintf(", %d", (int) tcp->u_arg[2]); diff --git a/sysmips.c b/sysmips.c index 47acfec76..af5ffba0c 100644 --- a/sysmips.c +++ b/sysmips.c @@ -45,7 +45,7 @@ SYS_FUNC(sysmips) { - printxval_long(sysmips_operations, tcp->u_arg[0], "???"); + printxval64(sysmips_operations, tcp->u_arg[0], "???"); tprints(", "); switch (tcp->u_arg[0]) { @@ -65,14 +65,15 @@ SYS_FUNC(sysmips) } case MIPS_ATOMIC_SET: printaddr(tcp->u_arg[1]); - tprintf(", %#lx", tcp->u_arg[2]); + tprintf(", %#" PRI_klx, tcp->u_arg[2]); return RVAL_DECODED; case MIPS_FIXADE: - tprintf("%#lx", tcp->u_arg[1]); + tprintf("%#" PRI_klx, tcp->u_arg[1]); return RVAL_DECODED; } - tprintf("%ld, %ld, %ld", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]); + tprintf("%" PRI_kld ", %" PRI_kld ", %" PRI_kld, + tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]); return RVAL_DECODED; } diff --git a/term.c b/term.c index 2b0be68eb..d083cdd54 100644 --- a/term.c +++ b/term.c @@ -38,14 +38,11 @@ #include "xlat/modem_flags.h" static void -decode_termios(struct tcb *tcp, const long addr) +decode_termios(struct tcb *const tcp, const kernel_ulong_t addr) { struct termios tios; int i; - if (!verbose(tcp)) - return; - tprints(", "); if (umove_or_printaddr(tcp, addr, &tios)) return; @@ -74,14 +71,11 @@ decode_termios(struct tcb *tcp, const long addr) } static void -decode_termio(struct tcb *tcp, const long addr) +decode_termio(struct tcb *const tcp, const kernel_ulong_t addr) { struct termio tio; int i; - if (!verbose(tcp)) - return; - tprints(", "); if (umove_or_printaddr(tcp, addr, &tio)) return; @@ -116,13 +110,10 @@ decode_termio(struct tcb *tcp, const long addr) } static void -decode_winsize(struct tcb *tcp, const long addr) +decode_winsize(struct tcb *const tcp, const kernel_ulong_t addr) { struct winsize ws; - if (!verbose(tcp)) - return; - tprints(", "); if (umove_or_printaddr(tcp, addr, &ws)) return; @@ -132,13 +123,10 @@ decode_winsize(struct tcb *tcp, const long addr) #ifdef TIOCGSIZE static void -decode_ttysize(struct tcb *tcp, const long addr) +decode_ttysize(struct tcb *const tcp, const kernel_ulong_t addr) { struct ttysize ts; - if (!verbose(tcp)) - return; - tprints(", "); if (umove_or_printaddr(tcp, addr, &ts)) return; @@ -148,13 +136,10 @@ decode_ttysize(struct tcb *tcp, const long addr) #endif static void -decode_modem_flags(struct tcb *tcp, const long addr) +decode_modem_flags(struct tcb *const tcp, const kernel_ulong_t addr) { int i; - if (!verbose(tcp)) - return; - tprints(", "); if (umove_or_printaddr(tcp, addr, &i)) return; @@ -164,7 +149,8 @@ decode_modem_flags(struct tcb *tcp, const long addr) } int -term_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +term_ioctl(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) { switch (code) { /* struct termios */ @@ -222,11 +208,11 @@ term_ioctl(struct tcb *tcp, const unsigned int code, const long arg) /* ioctls with a direct decodable arg */ case TCXONC: tprints(", "); - printxval_long(tcxonc_options, arg, "TC???"); + printxval64(tcxonc_options, arg, "TC???"); break; case TCFLSH: tprints(", "); - printxval_long(tcflsh_options, arg, "TC???"); + printxval64(tcflsh_options, arg, "TC???"); break; case TCSBRK: case TCSBRKP: @@ -274,7 +260,7 @@ term_ioctl(struct tcb *tcp, const unsigned int code, const long arg) /* ioctls with an indirect parameter displayed as a char */ case TIOCSTI: tprints(", "); - printstr(tcp, arg, 1); + printstrn(tcp, arg, 1); break; /* ioctls with no parameters */ diff --git a/test-driver b/test-driver new file mode 100755 index 000000000..d30605660 --- /dev/null +++ b/test-driver @@ -0,0 +1,139 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2013-07-13.22; # UTC + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/test/.gitignore b/test/.gitignore deleted file mode 100644 index 34d37bf39..000000000 --- a/test/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -childthread -clone -leaderkill -many_looping_threads -mmap_offset_decode -mtd -seccomp -sfd -sig -sigkill_rain -skodic -threaded_execve -ubi -wait_must_be_interruptible -x32_lseek -x32_mmap diff --git a/test/Makefile b/test/Makefile deleted file mode 100644 index ad727fcbf..000000000 --- a/test/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -CFLAGS += -Wall - -PROGS = \ - sig skodic clone leaderkill childthread \ - sigkill_rain wait_must_be_interruptible threaded_execve \ - mtd ubi seccomp sfd mmap_offset_decode x32_lseek x32_mmap \ - many_looping_threads - -all: $(PROGS) - -leaderkill: LDFLAGS += -pthread - -childthread: LDFLAGS += -pthread - -many_looping_threads: LDFLAGS += -pthread - -clean distclean: - rm -f *.o core $(PROGS) *.gdb - -.PHONY: all clean distclean diff --git a/test/many_looping_threads.c b/test/many_looping_threads.c deleted file mode 100644 index 918bd9d92..000000000 --- a/test/many_looping_threads.c +++ /dev/null @@ -1,49 +0,0 @@ -// This testcase, when run with large number of threads -// under stace -f, may never finish because strace does not -// ensure any fairness in thread scheduling: -// it restarts threads as they stop. If daughter threads crowd out -// the "mother" and _they_ get continually restarted by strace, -// the end of spawning loop will never be reached. -// -// Also, it is a testcase which triggers the -// "strace: Exit of unknown pid 32457 seen" -// message when on testcase exit, strace sees deaths of newly-attached -// threads _before_ their first syscall stop. -// -#include -#include -#include -#include -#include -#include - -static int thd_no; - -static void *sub_thd(void *c) -{ - dprintf(1, "sub-thread %d created\n", ++thd_no); - for (;;) - getuid(); - return NULL; -} - -int main(int argc, char *argv[]) -{ - int i; - pthread_t *thd; - int num_threads = 1; - - if (argv[1]) - num_threads = atoi(argv[1]); - - thd = malloc(num_threads * sizeof(thd[0])); - dprintf(1, "test start, num_threads:%d...\n", num_threads); - - for (i = 0; i < num_threads; i++) { - pthread_create(&thd[i], NULL, sub_thd, NULL); - dprintf(1, "after pthread_create\n"); - } - - /* Exit. This kills all threads */ - return 0; -} diff --git a/test/seccomp.c b/test/seccomp.c deleted file mode 100644 index 00e6cca5c..000000000 --- a/test/seccomp.c +++ /dev/null @@ -1,93 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined __i386__ -# define SECCOMP_ARCH AUDIT_ARCH_I386 -#elif defined __x86_64__ -# define SECCOMP_ARCH AUDIT_ARCH_X86_64 -#elif defined __arm__ -# define SECCOMP_ARCH AUDIT_ARCH_ARM -#elif defined __arm64__ || defined __aarch64__ -# define SECCOMP_ARCH AUDIT_ARCH_AARCH64 -#else -# error unsupported architecture -#endif - -#define SOCK_FILTER_KILL_PROCESS \ - BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL) - -#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ - BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, __NR_ ## nr, 0, 1), \ - BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ERRNO | (SECCOMP_RET_DATA & (err))) - -#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ - BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, __NR_ ## nr, 0, 1), \ - BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW) - -static const struct sock_filter filter[] = { - /* load architecture */ - BPF_STMT(BPF_LD | BPF_W | BPF_ABS, (offsetof (struct seccomp_data, arch))), - /* jump forward 1 instruction if architecture matches */ - BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, SECCOMP_ARCH, 1, 0), - /* kill process */ - SOCK_FILTER_KILL_PROCESS, - - /* load syscall number */ - BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, nr)), - - /* allow syscalls */ - SOCK_FILTER_ALLOW_SYSCALL(close), - SOCK_FILTER_ALLOW_SYSCALL(exit), - SOCK_FILTER_ALLOW_SYSCALL(exit_group), - - /* deny syscalls */ - SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), - SOCK_FILTER_DENY_SYSCALL(setsid, EACCES), - SOCK_FILTER_DENY_SYSCALL(getpid, EPERM), - SOCK_FILTER_DENY_SYSCALL(munlockall, SECCOMP_RET_DATA), - - /* kill process */ - SOCK_FILTER_KILL_PROCESS -}; - -static const struct sock_fprog prog = { - .len = sizeof(filter) / sizeof(filter[0]), - .filter = (struct sock_filter *) filter, -}; - -int -main(void) -{ - int fds[2]; - - close(0); - close(1); - if (pipe(fds)) - return 77; - - if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) - return 77; - - if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) - return 77; - - if (close(0) || close(1)) - _exit(1); - -#define TEST_DENIED_SYSCALL(nr, err, fail) \ - if (errno = 0, syscall(__NR_ ## nr, 0xbad, 0xf00d, 0xdead, 0xbeef, err, fail) != -1 || err != errno) \ - close(-fail) - - TEST_DENIED_SYSCALL(sync, EBUSY, 2); - TEST_DENIED_SYSCALL(setsid, EACCES, 3); - TEST_DENIED_SYSCALL(getpid, EPERM, 4); - TEST_DENIED_SYSCALL(munlockall, SECCOMP_RET_DATA, 5); - - _exit(0); -} diff --git a/test/threaded_execve.c b/test/threaded_execve.c deleted file mode 100644 index d1d22083c..000000000 --- a/test/threaded_execve.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Create NUM_THREADS threads which print "1" and sleep in pause(). - * Then create another thread which prints "2", and re-execs the program. - * The leader then either sleeps in pause(), or exits if $LEADER_EXIT is set. - * This triggers "execve'ed thread replaces thread leader" case. - * - * gcc -Wall -Os -o threaded_execve threaded_execve.c - * - * Try running it under strace like this: - * - * # Should not be confused by traced execve-ing thread - * # replacing traced leader: - * strace -oLOG -f ./threaded_execve - * - * # Same, but different output mode. Output after execve - * # should go into leader's LOG. file, not into execve'ed - * # thread's log file: - * strace -oLOG -ff ./threaded_execve - * - * # Should not be confused by non-traced execve-ing thread - * # replacing traced leader: - * strace -oLOG ./threaded_execve - * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - * In Linux 3.2, non-traced execve-ing thread does not - * become traced after execve, even though it has pid == leader's pid - * after execve. And yet, strace's waitpid doesn't return ECHILD. - * - * # Run for NUM seconds, not just one second. - * # Watch top to check for memory leaks in strace: - * strace -oLOG -f ./threaded_execve - * - */ -#define NUM_THREADS 1 - -#define _GNU_SOURCE 1 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* Define clone2 for all arches */ -#ifdef __ia64__ -extern int __clone2(int (*fn) (void *), void *child_stack_base, - size_t stack_size, int flags, void *arg, ...); -#define clone2 __clone2 -#elif defined(__metag__) -#define clone2(func, stack_base, size, flags, arg...) \ - clone(func, stack_base, flags, arg) -#else -#define clone2(func, stack_base, size, flags, arg...) \ - clone(func, (stack_base) + (size), flags, arg) -#endif -/* Direct calls to syscalls, avoiding libc wrappers */ -#define syscall_tgkill(pid, tid, sig) syscall(__NR_tgkill, (pid), (tid), (sig)) -#define syscall_getpid() syscall(__NR_getpid) -#define syscall_gettid() syscall(__NR_gettid) -#define syscall_exit(v) syscall(__NR_exit, (v)); - -static char my_name[PATH_MAX]; -static int leader_final_action; - -static int -thread1(void *unused) -{ - write(1, "1", 1); - for(;;) pause(); - return 0; -} - -static int -thread2(void *unused) -{ - char buf[64]; - sprintf(buf, "%d", leader_final_action); - write(1, "2", 1); - usleep(20*1000); - /* This fails with ENOENT if leader has exited by now! :) */ - execl("/proc/self/exe", "exe", "exe", buf, NULL); - /* So fall back to resolved name */ - execl(my_name, "exe", "exe", buf, NULL); - for(;;) pause(); - return 0; -} - -static void -thread_leader(void) -{ - /* malloc gives sufficiently aligned buffer. - * long buf[] does not! (on ia64). - */ - int cnt = NUM_THREADS; - while (--cnt >= 0) { - /* As seen in pthread_create(): */ - clone2(thread1, malloc(16 * 1024), 16 * 1024, 0 - | CLONE_VM - | CLONE_FS - | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD | CLONE_SYSVSEM - | 0 /* no signal to send on death */ - , NULL); - usleep(20*1000); - } - clone2(thread2, malloc(16 * 1024), 16 * 1024, 0 - | CLONE_VM - | CLONE_FS - | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD | CLONE_SYSVSEM - | 0 /* no signal to send on death */ - , NULL); - - /* Various states leader can be while other thread execve's: */ - switch (leader_final_action % 3) { - case 0: syscall_exit(42); /* leader is dead */ - case 1: for(;;) pause(); /* leader is in syscall */ - default: for(;;) continue; /* leader is in userspace */ - } -} - -int -main(int argc, char **argv) -{ - if (readlink("/proc/self/exe", my_name, sizeof(my_name)-1) <= 0) - return 1; - - setbuf(stdout, NULL); - - if (argv[1] && strcmp(argv[1], "exe") == 0) { - leader_final_action = atoi(argv[2]) + 1; - thread_leader(); - } - - printf("%d: thread leader\n", getpid()); - - alarm(argv[1] ? atoi(argv[1]) : 1); - thread_leader(); - - return 0; -} diff --git a/test/x32_lseek.c b/test/x32_lseek.c deleted file mode 100644 index f95b1a11a..000000000 --- a/test/x32_lseek.c +++ /dev/null @@ -1,38 +0,0 @@ -// Test program which explores whether lseek syscall (not llseek!) -// on x32 uses 64-bit offset argument. -// IOW: does _kernel_ truncate it on entry? -// The answer appears to be "no, full 64-bit offset is used". -// strace must show it correctly too - tricky if strace itself is x32 one! -// -// Build: x86_64-gcc -static -Wall -ox32_lseek x32_lseek.c -// Run: $ strace ./x32_lseek 2>&1 | grep lseek | grep 1250999896321 -// lseek(0, 1250999896321, SEEK_SET) = 1250999896321 -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include -#include -// Ensure we are compiling to 64 bits -struct bug { int t[sizeof(long) > 4 ? 1 : -1]; }; -int main(int argc, char **argv) -{ - long ofs = 0x12345678901; - errno = 0; - close(0); - if (open("/etc/passwd", O_RDONLY)) - return 1; - long r = syscall( - (long) (__NR_lseek | 0x40000000), // make x32 call - (long) (0), - (long) (ofs), - (long) (SEEK_SET) - ); - printf("pos:%ld(0x%lx) errno:%m\n", r, r); - if (!errno) - printf((r == ofs) ? "64-bit offset used\n" : "Kernel truncated offset\n"); - return 0; -} diff --git a/test/x32_mmap.c b/test/x32_mmap.c deleted file mode 100644 index f7f3ed345..000000000 --- a/test/x32_mmap.c +++ /dev/null @@ -1,49 +0,0 @@ -// Test program which explores whether mmap's ofs parameter -// is 64-bit, and whether it needs to be shifted << PAGE_SHIFT. -// Apparently it is 64-bit and isn't shifted. -// -// Build: x86_64-gcc -static -Wall -ox32_mmap x32_mmap.c -// Typical output: -// 7f9390696000-7f93906a6000 r--s 12345670000 08:06 2224545 /etc/passwd -// ^^^^^^^^^^^ -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include -#include -#include -// Ensure we are compiling to 64 bits -struct bug { int t[sizeof(long) > 4 ? 1 : -1]; }; -int main(int argc, char **argv) -{ - long ofs = 0x12345670000; // fails if not page-aligned - errno = 0; - close(0); - if (open("/etc/passwd", O_RDONLY)) - return 1; - long r = syscall( - (long) (__NR_mmap | 0x40000000), // make x32 call - (long) (0), // start - (long) (0x10000), // len - (long) (PROT_READ), // prot - (long) (MAP_SHARED), // flags - (long) (0), // fd - (long) (ofs) // ofs - ); - printf("ret:0x%lx errno:%m\n", r); - - char buf[16*1024]; - sprintf(buf, "/proc/%d/maps", getpid()); - int fd = open(buf, O_RDONLY); - if (fd > 0) { - int sz = read(fd, buf, sizeof(buf)); - if (sz > 0) - write(1, buf, sz); - } - - return 0; -} diff --git a/tests-m32/Makefile b/tests-m32/Makefile new file mode 100644 index 000000000..56b329756 --- /dev/null +++ b/tests-m32/Makefile @@ -0,0 +1,5800 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# tests-m32/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# Automake input for strace tests. +# +# Copyright (c) 2011-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# scno.h make rules for strace. +# +# Copyright (c) 2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/strace +pkgincludedir = $(includedir)/strace +pkglibdir = $(libdir)/strace +pkglibexecdir = $(libexecdir)/strace +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-pc-linux-gnu +host_triplet = x86_64-pc-linux-gnu +check_PROGRAMS = _newselect$(EXEEXT) accept$(EXEEXT) accept4$(EXEEXT) \ + access$(EXEEXT) acct$(EXEEXT) add_key$(EXEEXT) \ + adjtimex$(EXEEXT) aio$(EXEEXT) alarm$(EXEEXT) answer$(EXEEXT) \ + attach-f-p$(EXEEXT) attach-f-p-cmd$(EXEEXT) \ + attach-p-cmd-cmd$(EXEEXT) attach-p-cmd-p$(EXEEXT) bpf$(EXEEXT) \ + brk$(EXEEXT) btrfs$(EXEEXT) caps$(EXEEXT) caps-abbrev$(EXEEXT) \ + chmod$(EXEEXT) chown$(EXEEXT) chown32$(EXEEXT) chroot$(EXEEXT) \ + clock_adjtime$(EXEEXT) clock_nanosleep$(EXEEXT) \ + clock_xettime$(EXEEXT) copy_file_range$(EXEEXT) \ + count-f$(EXEEXT) creat$(EXEEXT) delete_module$(EXEEXT) \ + dup$(EXEEXT) dup2$(EXEEXT) dup3$(EXEEXT) epoll_create$(EXEEXT) \ + epoll_create1$(EXEEXT) epoll_ctl$(EXEEXT) epoll_pwait$(EXEEXT) \ + epoll_wait$(EXEEXT) erestartsys$(EXEEXT) eventfd$(EXEEXT) \ + execve$(EXEEXT) execve-v$(EXEEXT) execveat$(EXEEXT) \ + execveat-v$(EXEEXT) faccessat$(EXEEXT) fadvise64$(EXEEXT) \ + fadvise64_64$(EXEEXT) fallocate$(EXEEXT) \ + fanotify_init$(EXEEXT) fanotify_mark$(EXEEXT) fchdir$(EXEEXT) \ + fchmod$(EXEEXT) fchmodat$(EXEEXT) fchown$(EXEEXT) \ + fchown32$(EXEEXT) fchownat$(EXEEXT) fcntl$(EXEEXT) \ + fcntl64$(EXEEXT) fdatasync$(EXEEXT) file_handle$(EXEEXT) \ + file_ioctl$(EXEEXT) filter-unavailable$(EXEEXT) \ + finit_module$(EXEEXT) flock$(EXEEXT) fork-f$(EXEEXT) \ + fstat$(EXEEXT) fstat64$(EXEEXT) fstatat64$(EXEEXT) \ + fstatfs$(EXEEXT) fstatfs64$(EXEEXT) fsync$(EXEEXT) \ + ftruncate$(EXEEXT) ftruncate64$(EXEEXT) futex$(EXEEXT) \ + futimesat$(EXEEXT) get_mempolicy$(EXEEXT) getcpu$(EXEEXT) \ + getcwd$(EXEEXT) getdents$(EXEEXT) getdents64$(EXEEXT) \ + getegid$(EXEEXT) getegid32$(EXEEXT) geteuid$(EXEEXT) \ + geteuid32$(EXEEXT) getgid$(EXEEXT) getgid32$(EXEEXT) \ + getgroups$(EXEEXT) getgroups32$(EXEEXT) getpeername$(EXEEXT) \ + getpgrp$(EXEEXT) getrandom$(EXEEXT) getresgid$(EXEEXT) \ + getresgid32$(EXEEXT) getresuid$(EXEEXT) getresuid32$(EXEEXT) \ + getrlimit$(EXEEXT) getrusage$(EXEEXT) getsid$(EXEEXT) \ + getsockname$(EXEEXT) getuid$(EXEEXT) getuid32$(EXEEXT) \ + getxxid$(EXEEXT) inet-cmsg$(EXEEXT) init_module$(EXEEXT) \ + inotify$(EXEEXT) inotify_init1$(EXEEXT) ioctl$(EXEEXT) \ + ioctl_block$(EXEEXT) ioctl_dm$(EXEEXT) ioctl_dm-v$(EXEEXT) \ + ioctl_evdev$(EXEEXT) ioctl_evdev-v$(EXEEXT) \ + ioctl_loop$(EXEEXT) ioctl_loop-nv$(EXEEXT) \ + ioctl_loop-v$(EXEEXT) ioctl_mtd$(EXEEXT) ioctl_rtc$(EXEEXT) \ + ioctl_rtc-v$(EXEEXT) ioctl_scsi$(EXEEXT) \ + ioctl_sg_io_v3$(EXEEXT) ioctl_sg_io_v4$(EXEEXT) \ + ioctl_sock_gifconf$(EXEEXT) ioctl_uffdio$(EXEEXT) \ + ioctl_v4l2$(EXEEXT) ioperm$(EXEEXT) iopl$(EXEEXT) \ + ioprio$(EXEEXT) ip_mreq$(EXEEXT) ipc$(EXEEXT) ipc_msg$(EXEEXT) \ + ipc_msgbuf$(EXEEXT) ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) \ + kcmp$(EXEEXT) kexec_file_load$(EXEEXT) kexec_load$(EXEEXT) \ + keyctl$(EXEEXT) kill$(EXEEXT) ksysent$(EXEEXT) lchown$(EXEEXT) \ + lchown32$(EXEEXT) link$(EXEEXT) linkat$(EXEEXT) \ + llseek$(EXEEXT) lookup_dcookie$(EXEEXT) lseek$(EXEEXT) \ + lstat$(EXEEXT) lstat64$(EXEEXT) mbind$(EXEEXT) \ + membarrier$(EXEEXT) memfd_create$(EXEEXT) \ + migrate_pages$(EXEEXT) mincore$(EXEEXT) mkdir$(EXEEXT) \ + mkdirat$(EXEEXT) mknod$(EXEEXT) mknodat$(EXEEXT) \ + mlock$(EXEEXT) mlock2$(EXEEXT) mlockall$(EXEEXT) mmap$(EXEEXT) \ + mmap64$(EXEEXT) mmsg$(EXEEXT) mmsg-silent$(EXEEXT) \ + mmsg_name$(EXEEXT) mmsg_name-v$(EXEEXT) mount$(EXEEXT) \ + move_pages$(EXEEXT) mq$(EXEEXT) mq_sendrecv$(EXEEXT) \ + mq_sendrecv-read$(EXEEXT) mq_sendrecv-write$(EXEEXT) \ + msg_control$(EXEEXT) msg_control-v$(EXEEXT) msg_name$(EXEEXT) \ + munlockall$(EXEEXT) nanosleep$(EXEEXT) \ + net-accept-connect$(EXEEXT) net-icmp_filter$(EXEEXT) \ + net-sockaddr$(EXEEXT) net-y-unix$(EXEEXT) net-yy-inet$(EXEEXT) \ + net-yy-netlink$(EXEEXT) net-yy-unix$(EXEEXT) \ + netlink_inet_diag$(EXEEXT) netlink_netlink_diag$(EXEEXT) \ + netlink_protocol$(EXEEXT) netlink_unix_diag$(EXEEXT) \ + newfstatat$(EXEEXT) nsyscalls$(EXEEXT) old_mmap$(EXEEXT) \ + oldfstat$(EXEEXT) oldlstat$(EXEEXT) oldselect$(EXEEXT) \ + oldstat$(EXEEXT) open$(EXEEXT) openat$(EXEEXT) pause$(EXEEXT) \ + pc$(EXEEXT) perf_event_open$(EXEEXT) \ + perf_event_open_nonverbose$(EXEEXT) \ + perf_event_open_unabbrev$(EXEEXT) personality$(EXEEXT) \ + pipe$(EXEEXT) pipe2$(EXEEXT) pkey_alloc$(EXEEXT) \ + pkey_free$(EXEEXT) pkey_mprotect$(EXEEXT) poll$(EXEEXT) \ + ppoll$(EXEEXT) prctl-arg2-intptr$(EXEEXT) \ + prctl-dumpable$(EXEEXT) prctl-name$(EXEEXT) \ + prctl-no-args$(EXEEXT) prctl-pdeathsig$(EXEEXT) \ + prctl-seccomp-filter-v$(EXEEXT) prctl-seccomp-strict$(EXEEXT) \ + prctl-securebits$(EXEEXT) prctl-tid_address$(EXEEXT) \ + prctl-tsc$(EXEEXT) pread64-pwrite64$(EXEEXT) preadv$(EXEEXT) \ + preadv-pwritev$(EXEEXT) preadv2-pwritev2$(EXEEXT) \ + print_maxfd$(EXEEXT) printstr$(EXEEXT) prlimit64$(EXEEXT) \ + process_vm_readv$(EXEEXT) process_vm_writev$(EXEEXT) \ + pselect6$(EXEEXT) ptrace$(EXEEXT) pwritev$(EXEEXT) \ + qual_fault$(EXEEXT) qual_inject-error-signal$(EXEEXT) \ + qual_inject-retval$(EXEEXT) qual_inject-signal$(EXEEXT) \ + qual_signal$(EXEEXT) quotactl$(EXEEXT) quotactl-v$(EXEEXT) \ + quotactl-xfs$(EXEEXT) quotactl-xfs-v$(EXEEXT) \ + read-write$(EXEEXT) readahead$(EXEEXT) readdir$(EXEEXT) \ + readlink$(EXEEXT) readlinkat$(EXEEXT) readv$(EXEEXT) \ + reboot$(EXEEXT) recvfrom$(EXEEXT) recvmmsg-timeout$(EXEEXT) \ + recvmsg$(EXEEXT) redirect-fds$(EXEEXT) \ + remap_file_pages$(EXEEXT) rename$(EXEEXT) renameat$(EXEEXT) \ + renameat2$(EXEEXT) request_key$(EXEEXT) \ + restart_syscall$(EXEEXT) rmdir$(EXEEXT) rt_sigpending$(EXEEXT) \ + rt_sigprocmask$(EXEEXT) rt_sigqueueinfo$(EXEEXT) \ + rt_sigsuspend$(EXEEXT) rt_sigtimedwait$(EXEEXT) \ + rt_tgsigqueueinfo$(EXEEXT) sched_get_priority_mxx$(EXEEXT) \ + sched_rr_get_interval$(EXEEXT) sched_xetaffinity$(EXEEXT) \ + sched_xetattr$(EXEEXT) sched_xetparam$(EXEEXT) \ + sched_xetscheduler$(EXEEXT) sched_yield$(EXEEXT) \ + scm_rights$(EXEEXT) seccomp-filter$(EXEEXT) \ + seccomp-filter-v$(EXEEXT) seccomp-strict$(EXEEXT) \ + select$(EXEEXT) semop$(EXEEXT) sendfile$(EXEEXT) \ + sendfile64$(EXEEXT) set_mempolicy$(EXEEXT) \ + set_ptracer_any$(EXEEXT) setdomainname$(EXEEXT) \ + setfsgid$(EXEEXT) setfsgid32$(EXEEXT) setfsuid$(EXEEXT) \ + setfsuid32$(EXEEXT) setgid$(EXEEXT) setgid32$(EXEEXT) \ + setgroups$(EXEEXT) setgroups32$(EXEEXT) sethostname$(EXEEXT) \ + setns$(EXEEXT) setregid$(EXEEXT) setregid32$(EXEEXT) \ + setresgid$(EXEEXT) setresgid32$(EXEEXT) setresuid$(EXEEXT) \ + setresuid32$(EXEEXT) setreuid$(EXEEXT) setreuid32$(EXEEXT) \ + setrlimit$(EXEEXT) setuid$(EXEEXT) setuid32$(EXEEXT) \ + shmxt$(EXEEXT) shutdown$(EXEEXT) sigaction$(EXEEXT) \ + sigaltstack$(EXEEXT) siginfo$(EXEEXT) signal_receive$(EXEEXT) \ + signalfd4$(EXEEXT) sigreturn$(EXEEXT) sleep$(EXEEXT) \ + socketcall$(EXEEXT) splice$(EXEEXT) stack-fcall$(EXEEXT) \ + stat$(EXEEXT) stat64$(EXEEXT) statfs$(EXEEXT) \ + statfs64$(EXEEXT) swap$(EXEEXT) symlink$(EXEEXT) \ + symlinkat$(EXEEXT) sync$(EXEEXT) sync_file_range$(EXEEXT) \ + sync_file_range2$(EXEEXT) sysinfo$(EXEEXT) syslog$(EXEEXT) \ + tee$(EXEEXT) threads-execve$(EXEEXT) time$(EXEEXT) \ + timer_create$(EXEEXT) timer_xettime$(EXEEXT) \ + timerfd_xettime$(EXEEXT) times$(EXEEXT) times-fail$(EXEEXT) \ + truncate$(EXEEXT) truncate64$(EXEEXT) ugetrlimit$(EXEEXT) \ + uio$(EXEEXT) umask$(EXEEXT) umount$(EXEEXT) umount2$(EXEEXT) \ + umoven-illptr$(EXEEXT) umovestr$(EXEEXT) \ + umovestr-illptr$(EXEEXT) umovestr2$(EXEEXT) umovestr3$(EXEEXT) \ + uname$(EXEEXT) unix-pair-send-recv$(EXEEXT) \ + unix-pair-sendto-recvfrom$(EXEEXT) unlink$(EXEEXT) \ + unlinkat$(EXEEXT) unshare$(EXEEXT) userfaultfd$(EXEEXT) \ + ustat$(EXEEXT) utime$(EXEEXT) utimensat$(EXEEXT) \ + utimes$(EXEEXT) vfork-f$(EXEEXT) vhangup$(EXEEXT) \ + vmsplice$(EXEEXT) wait4$(EXEEXT) wait4-v$(EXEEXT) \ + waitid$(EXEEXT) waitid-v$(EXEEXT) waitpid$(EXEEXT) \ + xattr$(EXEEXT) xattr-strings$(EXEEXT) xet_robust_list$(EXEEXT) \ + xetitimer$(EXEEXT) xetpgid$(EXEEXT) xetpriority$(EXEEXT) \ + xettimeofday$(EXEEXT) +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(am__EXEEXT_1) +DIST_COMMON = $(srcdir)/../scno.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ + $(top_srcdir)/test-driver +subdir = tests-m32 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/ax_valgrind_check.m4 \ + $(top_srcdir)/m4/mpers.m4 \ + $(top_srcdir)/m4/st_save_restore_var.m4 \ + $(top_srcdir)/m4/st_warn_cflags.m4 \ + $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AR = ar +ARFLAGS = cru +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libtests_a_AR = $(AR) $(ARFLAGS) +libtests_a_LIBADD = +am_libtests_a_OBJECTS = libtests_a-errno2name.$(OBJEXT) \ + libtests_a-error_msg.$(OBJEXT) \ + libtests_a-fill_memory.$(OBJEXT) \ + libtests_a-get_page_size.$(OBJEXT) \ + libtests_a-hexdump_strdup.$(OBJEXT) \ + libtests_a-hexquote_strndup.$(OBJEXT) \ + libtests_a-inode_of_sockfd.$(OBJEXT) \ + libtests_a-libmmsg.$(OBJEXT) \ + libtests_a-libsocketcall.$(OBJEXT) \ + libtests_a-overflowuid.$(OBJEXT) \ + libtests_a-pipe_maxfd.$(OBJEXT) \ + libtests_a-print_quoted_string.$(OBJEXT) \ + libtests_a-printflags.$(OBJEXT) libtests_a-printxval.$(OBJEXT) \ + libtests_a-signal2name.$(OBJEXT) libtests_a-sprintrc.$(OBJEXT) \ + libtests_a-tail_alloc.$(OBJEXT) libtests_a-tprintf.$(OBJEXT) +libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) +_newselect_SOURCES = _newselect.c +_newselect_OBJECTS = _newselect.$(OBJEXT) +_newselect_LDADD = $(LDADD) +_newselect_DEPENDENCIES = libtests.a +accept_SOURCES = accept.c +accept_OBJECTS = accept.$(OBJEXT) +accept_LDADD = $(LDADD) +accept_DEPENDENCIES = libtests.a +accept4_SOURCES = accept4.c +accept4_OBJECTS = accept4.$(OBJEXT) +accept4_LDADD = $(LDADD) +accept4_DEPENDENCIES = libtests.a +access_SOURCES = access.c +access_OBJECTS = access.$(OBJEXT) +access_LDADD = $(LDADD) +access_DEPENDENCIES = libtests.a +acct_SOURCES = acct.c +acct_OBJECTS = acct.$(OBJEXT) +acct_LDADD = $(LDADD) +acct_DEPENDENCIES = libtests.a +add_key_SOURCES = add_key.c +add_key_OBJECTS = add_key.$(OBJEXT) +add_key_LDADD = $(LDADD) +add_key_DEPENDENCIES = libtests.a +adjtimex_SOURCES = adjtimex.c +adjtimex_OBJECTS = adjtimex.$(OBJEXT) +adjtimex_LDADD = $(LDADD) +adjtimex_DEPENDENCIES = libtests.a +aio_SOURCES = aio.c +aio_OBJECTS = aio.$(OBJEXT) +aio_LDADD = $(LDADD) +aio_DEPENDENCIES = libtests.a +alarm_SOURCES = alarm.c +alarm_OBJECTS = alarm.$(OBJEXT) +alarm_LDADD = $(LDADD) +alarm_DEPENDENCIES = libtests.a +answer_SOURCES = answer.c +answer_OBJECTS = answer.$(OBJEXT) +answer_LDADD = $(LDADD) +answer_DEPENDENCIES = libtests.a +attach_f_p_SOURCES = attach-f-p.c +attach_f_p_OBJECTS = attach-f-p.$(OBJEXT) +attach_f_p_DEPENDENCIES = $(LDADD) +attach_f_p_cmd_SOURCES = attach-f-p-cmd.c +attach_f_p_cmd_OBJECTS = attach-f-p-cmd.$(OBJEXT) +attach_f_p_cmd_LDADD = $(LDADD) +attach_f_p_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_cmd_SOURCES = attach-p-cmd-cmd.c +attach_p_cmd_cmd_OBJECTS = attach-p-cmd-cmd.$(OBJEXT) +attach_p_cmd_cmd_LDADD = $(LDADD) +attach_p_cmd_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_p_SOURCES = attach-p-cmd-p.c +attach_p_cmd_p_OBJECTS = attach-p-cmd-p.$(OBJEXT) +attach_p_cmd_p_LDADD = $(LDADD) +attach_p_cmd_p_DEPENDENCIES = libtests.a +bpf_SOURCES = bpf.c +bpf_OBJECTS = bpf.$(OBJEXT) +bpf_LDADD = $(LDADD) +bpf_DEPENDENCIES = libtests.a +brk_SOURCES = brk.c +brk_OBJECTS = brk.$(OBJEXT) +brk_LDADD = $(LDADD) +brk_DEPENDENCIES = libtests.a +btrfs_SOURCES = btrfs.c +btrfs_OBJECTS = btrfs.$(OBJEXT) +btrfs_LDADD = $(LDADD) +btrfs_DEPENDENCIES = libtests.a +caps_SOURCES = caps.c +caps_OBJECTS = caps.$(OBJEXT) +caps_LDADD = $(LDADD) +caps_DEPENDENCIES = libtests.a +caps_abbrev_SOURCES = caps-abbrev.c +caps_abbrev_OBJECTS = caps-abbrev.$(OBJEXT) +caps_abbrev_LDADD = $(LDADD) +caps_abbrev_DEPENDENCIES = libtests.a +chmod_SOURCES = chmod.c +chmod_OBJECTS = chmod.$(OBJEXT) +chmod_LDADD = $(LDADD) +chmod_DEPENDENCIES = libtests.a +chown_SOURCES = chown.c +chown_OBJECTS = chown.$(OBJEXT) +chown_LDADD = $(LDADD) +chown_DEPENDENCIES = libtests.a +chown32_SOURCES = chown32.c +chown32_OBJECTS = chown32.$(OBJEXT) +chown32_LDADD = $(LDADD) +chown32_DEPENDENCIES = libtests.a +chroot_SOURCES = chroot.c +chroot_OBJECTS = chroot.$(OBJEXT) +chroot_LDADD = $(LDADD) +chroot_DEPENDENCIES = libtests.a +clock_adjtime_SOURCES = clock_adjtime.c +clock_adjtime_OBJECTS = clock_adjtime.$(OBJEXT) +clock_adjtime_LDADD = $(LDADD) +clock_adjtime_DEPENDENCIES = libtests.a +clock_nanosleep_SOURCES = clock_nanosleep.c +clock_nanosleep_OBJECTS = clock_nanosleep.$(OBJEXT) +clock_nanosleep_LDADD = $(LDADD) +clock_nanosleep_DEPENDENCIES = libtests.a +clock_xettime_SOURCES = clock_xettime.c +clock_xettime_OBJECTS = clock_xettime.$(OBJEXT) +clock_xettime_DEPENDENCIES = $(LDADD) +copy_file_range_SOURCES = copy_file_range.c +copy_file_range_OBJECTS = copy_file_range.$(OBJEXT) +copy_file_range_LDADD = $(LDADD) +copy_file_range_DEPENDENCIES = libtests.a +count_f_SOURCES = count-f.c +count_f_OBJECTS = count-f.$(OBJEXT) +count_f_DEPENDENCIES = $(LDADD) +creat_SOURCES = creat.c +creat_OBJECTS = creat.$(OBJEXT) +creat_LDADD = $(LDADD) +creat_DEPENDENCIES = libtests.a +delete_module_SOURCES = delete_module.c +delete_module_OBJECTS = delete_module.$(OBJEXT) +delete_module_LDADD = $(LDADD) +delete_module_DEPENDENCIES = libtests.a +dup_SOURCES = dup.c +dup_OBJECTS = dup.$(OBJEXT) +dup_LDADD = $(LDADD) +dup_DEPENDENCIES = libtests.a +dup2_SOURCES = dup2.c +dup2_OBJECTS = dup2.$(OBJEXT) +dup2_LDADD = $(LDADD) +dup2_DEPENDENCIES = libtests.a +dup3_SOURCES = dup3.c +dup3_OBJECTS = dup3.$(OBJEXT) +dup3_LDADD = $(LDADD) +dup3_DEPENDENCIES = libtests.a +epoll_create_SOURCES = epoll_create.c +epoll_create_OBJECTS = epoll_create.$(OBJEXT) +epoll_create_LDADD = $(LDADD) +epoll_create_DEPENDENCIES = libtests.a +epoll_create1_SOURCES = epoll_create1.c +epoll_create1_OBJECTS = epoll_create1.$(OBJEXT) +epoll_create1_LDADD = $(LDADD) +epoll_create1_DEPENDENCIES = libtests.a +epoll_ctl_SOURCES = epoll_ctl.c +epoll_ctl_OBJECTS = epoll_ctl.$(OBJEXT) +epoll_ctl_LDADD = $(LDADD) +epoll_ctl_DEPENDENCIES = libtests.a +epoll_pwait_SOURCES = epoll_pwait.c +epoll_pwait_OBJECTS = epoll_pwait.$(OBJEXT) +epoll_pwait_LDADD = $(LDADD) +epoll_pwait_DEPENDENCIES = libtests.a +epoll_wait_SOURCES = epoll_wait.c +epoll_wait_OBJECTS = epoll_wait.$(OBJEXT) +epoll_wait_LDADD = $(LDADD) +epoll_wait_DEPENDENCIES = libtests.a +erestartsys_SOURCES = erestartsys.c +erestartsys_OBJECTS = erestartsys.$(OBJEXT) +erestartsys_LDADD = $(LDADD) +erestartsys_DEPENDENCIES = libtests.a +eventfd_SOURCES = eventfd.c +eventfd_OBJECTS = eventfd.$(OBJEXT) +eventfd_LDADD = $(LDADD) +eventfd_DEPENDENCIES = libtests.a +execve_SOURCES = execve.c +execve_OBJECTS = execve.$(OBJEXT) +execve_LDADD = $(LDADD) +execve_DEPENDENCIES = libtests.a +execve_v_SOURCES = execve-v.c +execve_v_OBJECTS = execve-v.$(OBJEXT) +execve_v_LDADD = $(LDADD) +execve_v_DEPENDENCIES = libtests.a +execveat_SOURCES = execveat.c +execveat_OBJECTS = execveat.$(OBJEXT) +execveat_LDADD = $(LDADD) +execveat_DEPENDENCIES = libtests.a +execveat_v_SOURCES = execveat-v.c +execveat_v_OBJECTS = execveat-v.$(OBJEXT) +execveat_v_LDADD = $(LDADD) +execveat_v_DEPENDENCIES = libtests.a +faccessat_SOURCES = faccessat.c +faccessat_OBJECTS = faccessat.$(OBJEXT) +faccessat_LDADD = $(LDADD) +faccessat_DEPENDENCIES = libtests.a +fadvise64_SOURCES = fadvise64.c +fadvise64_OBJECTS = fadvise64.$(OBJEXT) +fadvise64_LDADD = $(LDADD) +fadvise64_DEPENDENCIES = libtests.a +fadvise64_64_SOURCES = fadvise64_64.c +fadvise64_64_OBJECTS = fadvise64_64.$(OBJEXT) +fadvise64_64_LDADD = $(LDADD) +fadvise64_64_DEPENDENCIES = libtests.a +fallocate_SOURCES = fallocate.c +fallocate_OBJECTS = fallocate.$(OBJEXT) +fallocate_LDADD = $(LDADD) +fallocate_DEPENDENCIES = libtests.a +fanotify_init_SOURCES = fanotify_init.c +fanotify_init_OBJECTS = fanotify_init.$(OBJEXT) +fanotify_init_LDADD = $(LDADD) +fanotify_init_DEPENDENCIES = libtests.a +fanotify_mark_SOURCES = fanotify_mark.c +fanotify_mark_OBJECTS = fanotify_mark.$(OBJEXT) +fanotify_mark_LDADD = $(LDADD) +fanotify_mark_DEPENDENCIES = libtests.a +fchdir_SOURCES = fchdir.c +fchdir_OBJECTS = fchdir.$(OBJEXT) +fchdir_LDADD = $(LDADD) +fchdir_DEPENDENCIES = libtests.a +fchmod_SOURCES = fchmod.c +fchmod_OBJECTS = fchmod.$(OBJEXT) +fchmod_LDADD = $(LDADD) +fchmod_DEPENDENCIES = libtests.a +fchmodat_SOURCES = fchmodat.c +fchmodat_OBJECTS = fchmodat.$(OBJEXT) +fchmodat_LDADD = $(LDADD) +fchmodat_DEPENDENCIES = libtests.a +fchown_SOURCES = fchown.c +fchown_OBJECTS = fchown.$(OBJEXT) +fchown_LDADD = $(LDADD) +fchown_DEPENDENCIES = libtests.a +fchown32_SOURCES = fchown32.c +fchown32_OBJECTS = fchown32.$(OBJEXT) +fchown32_LDADD = $(LDADD) +fchown32_DEPENDENCIES = libtests.a +fchownat_SOURCES = fchownat.c +fchownat_OBJECTS = fchownat.$(OBJEXT) +fchownat_LDADD = $(LDADD) +fchownat_DEPENDENCIES = libtests.a +fcntl_SOURCES = fcntl.c +fcntl_OBJECTS = fcntl.$(OBJEXT) +fcntl_LDADD = $(LDADD) +fcntl_DEPENDENCIES = libtests.a +fcntl64_SOURCES = fcntl64.c +fcntl64_OBJECTS = fcntl64.$(OBJEXT) +fcntl64_LDADD = $(LDADD) +fcntl64_DEPENDENCIES = libtests.a +fdatasync_SOURCES = fdatasync.c +fdatasync_OBJECTS = fdatasync.$(OBJEXT) +fdatasync_LDADD = $(LDADD) +fdatasync_DEPENDENCIES = libtests.a +file_handle_SOURCES = file_handle.c +file_handle_OBJECTS = file_handle.$(OBJEXT) +file_handle_LDADD = $(LDADD) +file_handle_DEPENDENCIES = libtests.a +file_ioctl_SOURCES = file_ioctl.c +file_ioctl_OBJECTS = file_ioctl.$(OBJEXT) +file_ioctl_LDADD = $(LDADD) +file_ioctl_DEPENDENCIES = libtests.a +filter_unavailable_SOURCES = filter-unavailable.c +filter_unavailable_OBJECTS = filter-unavailable.$(OBJEXT) +filter_unavailable_DEPENDENCIES = $(LDADD) +finit_module_SOURCES = finit_module.c +finit_module_OBJECTS = finit_module.$(OBJEXT) +finit_module_LDADD = $(LDADD) +finit_module_DEPENDENCIES = libtests.a +flock_SOURCES = flock.c +flock_OBJECTS = flock.$(OBJEXT) +flock_LDADD = $(LDADD) +flock_DEPENDENCIES = libtests.a +fork_f_SOURCES = fork-f.c +fork_f_OBJECTS = fork-f.$(OBJEXT) +fork_f_LDADD = $(LDADD) +fork_f_DEPENDENCIES = libtests.a +fstat_SOURCES = fstat.c +fstat_OBJECTS = fstat.$(OBJEXT) +fstat_LDADD = $(LDADD) +fstat_DEPENDENCIES = libtests.a +fstat64_SOURCES = fstat64.c +fstat64_OBJECTS = fstat64-fstat64.$(OBJEXT) +fstat64_LDADD = $(LDADD) +fstat64_DEPENDENCIES = libtests.a +fstatat64_SOURCES = fstatat64.c +fstatat64_OBJECTS = fstatat64-fstatat64.$(OBJEXT) +fstatat64_LDADD = $(LDADD) +fstatat64_DEPENDENCIES = libtests.a +fstatfs_SOURCES = fstatfs.c +fstatfs_OBJECTS = fstatfs.$(OBJEXT) +fstatfs_LDADD = $(LDADD) +fstatfs_DEPENDENCIES = libtests.a +fstatfs64_SOURCES = fstatfs64.c +fstatfs64_OBJECTS = fstatfs64.$(OBJEXT) +fstatfs64_LDADD = $(LDADD) +fstatfs64_DEPENDENCIES = libtests.a +fsync_SOURCES = fsync.c +fsync_OBJECTS = fsync.$(OBJEXT) +fsync_LDADD = $(LDADD) +fsync_DEPENDENCIES = libtests.a +ftruncate_SOURCES = ftruncate.c +ftruncate_OBJECTS = ftruncate.$(OBJEXT) +ftruncate_LDADD = $(LDADD) +ftruncate_DEPENDENCIES = libtests.a +ftruncate64_SOURCES = ftruncate64.c +ftruncate64_OBJECTS = ftruncate64-ftruncate64.$(OBJEXT) +ftruncate64_LDADD = $(LDADD) +ftruncate64_DEPENDENCIES = libtests.a +futex_SOURCES = futex.c +futex_OBJECTS = futex.$(OBJEXT) +futex_LDADD = $(LDADD) +futex_DEPENDENCIES = libtests.a +futimesat_SOURCES = futimesat.c +futimesat_OBJECTS = futimesat.$(OBJEXT) +futimesat_LDADD = $(LDADD) +futimesat_DEPENDENCIES = libtests.a +get_mempolicy_SOURCES = get_mempolicy.c +get_mempolicy_OBJECTS = get_mempolicy.$(OBJEXT) +get_mempolicy_LDADD = $(LDADD) +get_mempolicy_DEPENDENCIES = libtests.a +getcpu_SOURCES = getcpu.c +getcpu_OBJECTS = getcpu.$(OBJEXT) +getcpu_LDADD = $(LDADD) +getcpu_DEPENDENCIES = libtests.a +getcwd_SOURCES = getcwd.c +getcwd_OBJECTS = getcwd.$(OBJEXT) +getcwd_LDADD = $(LDADD) +getcwd_DEPENDENCIES = libtests.a +getdents_SOURCES = getdents.c +getdents_OBJECTS = getdents.$(OBJEXT) +getdents_LDADD = $(LDADD) +getdents_DEPENDENCIES = libtests.a +getdents64_SOURCES = getdents64.c +getdents64_OBJECTS = getdents64.$(OBJEXT) +getdents64_LDADD = $(LDADD) +getdents64_DEPENDENCIES = libtests.a +getegid_SOURCES = getegid.c +getegid_OBJECTS = getegid.$(OBJEXT) +getegid_LDADD = $(LDADD) +getegid_DEPENDENCIES = libtests.a +getegid32_SOURCES = getegid32.c +getegid32_OBJECTS = getegid32.$(OBJEXT) +getegid32_LDADD = $(LDADD) +getegid32_DEPENDENCIES = libtests.a +geteuid_SOURCES = geteuid.c +geteuid_OBJECTS = geteuid.$(OBJEXT) +geteuid_LDADD = $(LDADD) +geteuid_DEPENDENCIES = libtests.a +geteuid32_SOURCES = geteuid32.c +geteuid32_OBJECTS = geteuid32.$(OBJEXT) +geteuid32_LDADD = $(LDADD) +geteuid32_DEPENDENCIES = libtests.a +getgid_SOURCES = getgid.c +getgid_OBJECTS = getgid.$(OBJEXT) +getgid_LDADD = $(LDADD) +getgid_DEPENDENCIES = libtests.a +getgid32_SOURCES = getgid32.c +getgid32_OBJECTS = getgid32.$(OBJEXT) +getgid32_LDADD = $(LDADD) +getgid32_DEPENDENCIES = libtests.a +getgroups_SOURCES = getgroups.c +getgroups_OBJECTS = getgroups.$(OBJEXT) +getgroups_LDADD = $(LDADD) +getgroups_DEPENDENCIES = libtests.a +getgroups32_SOURCES = getgroups32.c +getgroups32_OBJECTS = getgroups32.$(OBJEXT) +getgroups32_LDADD = $(LDADD) +getgroups32_DEPENDENCIES = libtests.a +getpeername_SOURCES = getpeername.c +getpeername_OBJECTS = getpeername.$(OBJEXT) +getpeername_LDADD = $(LDADD) +getpeername_DEPENDENCIES = libtests.a +getpgrp_SOURCES = getpgrp.c +getpgrp_OBJECTS = getpgrp.$(OBJEXT) +getpgrp_LDADD = $(LDADD) +getpgrp_DEPENDENCIES = libtests.a +getrandom_SOURCES = getrandom.c +getrandom_OBJECTS = getrandom.$(OBJEXT) +getrandom_LDADD = $(LDADD) +getrandom_DEPENDENCIES = libtests.a +getresgid_SOURCES = getresgid.c +getresgid_OBJECTS = getresgid.$(OBJEXT) +getresgid_LDADD = $(LDADD) +getresgid_DEPENDENCIES = libtests.a +getresgid32_SOURCES = getresgid32.c +getresgid32_OBJECTS = getresgid32.$(OBJEXT) +getresgid32_LDADD = $(LDADD) +getresgid32_DEPENDENCIES = libtests.a +getresuid_SOURCES = getresuid.c +getresuid_OBJECTS = getresuid.$(OBJEXT) +getresuid_LDADD = $(LDADD) +getresuid_DEPENDENCIES = libtests.a +getresuid32_SOURCES = getresuid32.c +getresuid32_OBJECTS = getresuid32.$(OBJEXT) +getresuid32_LDADD = $(LDADD) +getresuid32_DEPENDENCIES = libtests.a +getrlimit_SOURCES = getrlimit.c +getrlimit_OBJECTS = getrlimit.$(OBJEXT) +getrlimit_LDADD = $(LDADD) +getrlimit_DEPENDENCIES = libtests.a +getrusage_SOURCES = getrusage.c +getrusage_OBJECTS = getrusage.$(OBJEXT) +getrusage_LDADD = $(LDADD) +getrusage_DEPENDENCIES = libtests.a +getsid_SOURCES = getsid.c +getsid_OBJECTS = getsid.$(OBJEXT) +getsid_LDADD = $(LDADD) +getsid_DEPENDENCIES = libtests.a +getsockname_SOURCES = getsockname.c +getsockname_OBJECTS = getsockname.$(OBJEXT) +getsockname_LDADD = $(LDADD) +getsockname_DEPENDENCIES = libtests.a +getuid_SOURCES = getuid.c +getuid_OBJECTS = getuid.$(OBJEXT) +getuid_LDADD = $(LDADD) +getuid_DEPENDENCIES = libtests.a +getuid32_SOURCES = getuid32.c +getuid32_OBJECTS = getuid32.$(OBJEXT) +getuid32_LDADD = $(LDADD) +getuid32_DEPENDENCIES = libtests.a +getxxid_SOURCES = getxxid.c +getxxid_OBJECTS = getxxid.$(OBJEXT) +getxxid_LDADD = $(LDADD) +getxxid_DEPENDENCIES = libtests.a +inet_cmsg_SOURCES = inet-cmsg.c +inet_cmsg_OBJECTS = inet-cmsg.$(OBJEXT) +inet_cmsg_LDADD = $(LDADD) +inet_cmsg_DEPENDENCIES = libtests.a +init_module_SOURCES = init_module.c +init_module_OBJECTS = init_module.$(OBJEXT) +init_module_LDADD = $(LDADD) +init_module_DEPENDENCIES = libtests.a +inotify_SOURCES = inotify.c +inotify_OBJECTS = inotify.$(OBJEXT) +inotify_LDADD = $(LDADD) +inotify_DEPENDENCIES = libtests.a +inotify_init1_SOURCES = inotify_init1.c +inotify_init1_OBJECTS = inotify_init1.$(OBJEXT) +inotify_init1_LDADD = $(LDADD) +inotify_init1_DEPENDENCIES = libtests.a +ioctl_SOURCES = ioctl.c +ioctl_OBJECTS = ioctl.$(OBJEXT) +ioctl_LDADD = $(LDADD) +ioctl_DEPENDENCIES = libtests.a +ioctl_block_SOURCES = ioctl_block.c +ioctl_block_OBJECTS = ioctl_block.$(OBJEXT) +ioctl_block_LDADD = $(LDADD) +ioctl_block_DEPENDENCIES = libtests.a +ioctl_dm_SOURCES = ioctl_dm.c +ioctl_dm_OBJECTS = ioctl_dm.$(OBJEXT) +ioctl_dm_LDADD = $(LDADD) +ioctl_dm_DEPENDENCIES = libtests.a +ioctl_dm_v_SOURCES = ioctl_dm-v.c +ioctl_dm_v_OBJECTS = ioctl_dm-v.$(OBJEXT) +ioctl_dm_v_LDADD = $(LDADD) +ioctl_dm_v_DEPENDENCIES = libtests.a +ioctl_evdev_SOURCES = ioctl_evdev.c +ioctl_evdev_OBJECTS = ioctl_evdev.$(OBJEXT) +ioctl_evdev_LDADD = $(LDADD) +ioctl_evdev_DEPENDENCIES = libtests.a +ioctl_evdev_v_SOURCES = ioctl_evdev-v.c +ioctl_evdev_v_OBJECTS = ioctl_evdev-v.$(OBJEXT) +ioctl_evdev_v_LDADD = $(LDADD) +ioctl_evdev_v_DEPENDENCIES = libtests.a +ioctl_loop_SOURCES = ioctl_loop.c +ioctl_loop_OBJECTS = ioctl_loop.$(OBJEXT) +ioctl_loop_LDADD = $(LDADD) +ioctl_loop_DEPENDENCIES = libtests.a +ioctl_loop_nv_SOURCES = ioctl_loop-nv.c +ioctl_loop_nv_OBJECTS = ioctl_loop-nv.$(OBJEXT) +ioctl_loop_nv_LDADD = $(LDADD) +ioctl_loop_nv_DEPENDENCIES = libtests.a +ioctl_loop_v_SOURCES = ioctl_loop-v.c +ioctl_loop_v_OBJECTS = ioctl_loop-v.$(OBJEXT) +ioctl_loop_v_LDADD = $(LDADD) +ioctl_loop_v_DEPENDENCIES = libtests.a +ioctl_mtd_SOURCES = ioctl_mtd.c +ioctl_mtd_OBJECTS = ioctl_mtd.$(OBJEXT) +ioctl_mtd_LDADD = $(LDADD) +ioctl_mtd_DEPENDENCIES = libtests.a +ioctl_rtc_SOURCES = ioctl_rtc.c +ioctl_rtc_OBJECTS = ioctl_rtc.$(OBJEXT) +ioctl_rtc_LDADD = $(LDADD) +ioctl_rtc_DEPENDENCIES = libtests.a +ioctl_rtc_v_SOURCES = ioctl_rtc-v.c +ioctl_rtc_v_OBJECTS = ioctl_rtc-v.$(OBJEXT) +ioctl_rtc_v_LDADD = $(LDADD) +ioctl_rtc_v_DEPENDENCIES = libtests.a +ioctl_scsi_SOURCES = ioctl_scsi.c +ioctl_scsi_OBJECTS = ioctl_scsi.$(OBJEXT) +ioctl_scsi_LDADD = $(LDADD) +ioctl_scsi_DEPENDENCIES = libtests.a +ioctl_sg_io_v3_SOURCES = ioctl_sg_io_v3.c +ioctl_sg_io_v3_OBJECTS = ioctl_sg_io_v3.$(OBJEXT) +ioctl_sg_io_v3_LDADD = $(LDADD) +ioctl_sg_io_v3_DEPENDENCIES = libtests.a +ioctl_sg_io_v4_SOURCES = ioctl_sg_io_v4.c +ioctl_sg_io_v4_OBJECTS = ioctl_sg_io_v4.$(OBJEXT) +ioctl_sg_io_v4_LDADD = $(LDADD) +ioctl_sg_io_v4_DEPENDENCIES = libtests.a +ioctl_sock_gifconf_SOURCES = ioctl_sock_gifconf.c +ioctl_sock_gifconf_OBJECTS = ioctl_sock_gifconf.$(OBJEXT) +ioctl_sock_gifconf_LDADD = $(LDADD) +ioctl_sock_gifconf_DEPENDENCIES = libtests.a +ioctl_uffdio_SOURCES = ioctl_uffdio.c +ioctl_uffdio_OBJECTS = ioctl_uffdio.$(OBJEXT) +ioctl_uffdio_LDADD = $(LDADD) +ioctl_uffdio_DEPENDENCIES = libtests.a +ioctl_v4l2_SOURCES = ioctl_v4l2.c +ioctl_v4l2_OBJECTS = ioctl_v4l2.$(OBJEXT) +ioctl_v4l2_LDADD = $(LDADD) +ioctl_v4l2_DEPENDENCIES = libtests.a +ioperm_SOURCES = ioperm.c +ioperm_OBJECTS = ioperm.$(OBJEXT) +ioperm_LDADD = $(LDADD) +ioperm_DEPENDENCIES = libtests.a +iopl_SOURCES = iopl.c +iopl_OBJECTS = iopl.$(OBJEXT) +iopl_LDADD = $(LDADD) +iopl_DEPENDENCIES = libtests.a +ioprio_SOURCES = ioprio.c +ioprio_OBJECTS = ioprio.$(OBJEXT) +ioprio_LDADD = $(LDADD) +ioprio_DEPENDENCIES = libtests.a +ip_mreq_SOURCES = ip_mreq.c +ip_mreq_OBJECTS = ip_mreq.$(OBJEXT) +ip_mreq_LDADD = $(LDADD) +ip_mreq_DEPENDENCIES = libtests.a +ipc_SOURCES = ipc.c +ipc_OBJECTS = ipc.$(OBJEXT) +ipc_LDADD = $(LDADD) +ipc_DEPENDENCIES = libtests.a +ipc_msg_SOURCES = ipc_msg.c +ipc_msg_OBJECTS = ipc_msg.$(OBJEXT) +ipc_msg_LDADD = $(LDADD) +ipc_msg_DEPENDENCIES = libtests.a +ipc_msgbuf_SOURCES = ipc_msgbuf.c +ipc_msgbuf_OBJECTS = ipc_msgbuf.$(OBJEXT) +ipc_msgbuf_LDADD = $(LDADD) +ipc_msgbuf_DEPENDENCIES = libtests.a +ipc_sem_SOURCES = ipc_sem.c +ipc_sem_OBJECTS = ipc_sem.$(OBJEXT) +ipc_sem_LDADD = $(LDADD) +ipc_sem_DEPENDENCIES = libtests.a +ipc_shm_SOURCES = ipc_shm.c +ipc_shm_OBJECTS = ipc_shm.$(OBJEXT) +ipc_shm_LDADD = $(LDADD) +ipc_shm_DEPENDENCIES = libtests.a +kcmp_SOURCES = kcmp.c +kcmp_OBJECTS = kcmp.$(OBJEXT) +kcmp_LDADD = $(LDADD) +kcmp_DEPENDENCIES = libtests.a +kexec_file_load_SOURCES = kexec_file_load.c +kexec_file_load_OBJECTS = kexec_file_load.$(OBJEXT) +kexec_file_load_LDADD = $(LDADD) +kexec_file_load_DEPENDENCIES = libtests.a +kexec_load_SOURCES = kexec_load.c +kexec_load_OBJECTS = kexec_load.$(OBJEXT) +kexec_load_LDADD = $(LDADD) +kexec_load_DEPENDENCIES = libtests.a +keyctl_SOURCES = keyctl.c +keyctl_OBJECTS = keyctl.$(OBJEXT) +keyctl_LDADD = $(LDADD) +keyctl_DEPENDENCIES = libtests.a +kill_SOURCES = kill.c +kill_OBJECTS = kill.$(OBJEXT) +kill_LDADD = $(LDADD) +kill_DEPENDENCIES = libtests.a +ksysent_SOURCES = ksysent.c +ksysent_OBJECTS = ksysent.$(OBJEXT) +ksysent_LDADD = $(LDADD) +ksysent_DEPENDENCIES = libtests.a +lchown_SOURCES = lchown.c +lchown_OBJECTS = lchown.$(OBJEXT) +lchown_LDADD = $(LDADD) +lchown_DEPENDENCIES = libtests.a +lchown32_SOURCES = lchown32.c +lchown32_OBJECTS = lchown32.$(OBJEXT) +lchown32_LDADD = $(LDADD) +lchown32_DEPENDENCIES = libtests.a +link_SOURCES = link.c +link_OBJECTS = link.$(OBJEXT) +link_LDADD = $(LDADD) +link_DEPENDENCIES = libtests.a +linkat_SOURCES = linkat.c +linkat_OBJECTS = linkat.$(OBJEXT) +linkat_LDADD = $(LDADD) +linkat_DEPENDENCIES = libtests.a +llseek_SOURCES = llseek.c +llseek_OBJECTS = llseek.$(OBJEXT) +llseek_LDADD = $(LDADD) +llseek_DEPENDENCIES = libtests.a +lookup_dcookie_SOURCES = lookup_dcookie.c +lookup_dcookie_OBJECTS = lookup_dcookie.$(OBJEXT) +lookup_dcookie_LDADD = $(LDADD) +lookup_dcookie_DEPENDENCIES = libtests.a +lseek_SOURCES = lseek.c +lseek_OBJECTS = lseek.$(OBJEXT) +lseek_LDADD = $(LDADD) +lseek_DEPENDENCIES = libtests.a +lstat_SOURCES = lstat.c +lstat_OBJECTS = lstat.$(OBJEXT) +lstat_LDADD = $(LDADD) +lstat_DEPENDENCIES = libtests.a +lstat64_SOURCES = lstat64.c +lstat64_OBJECTS = lstat64-lstat64.$(OBJEXT) +lstat64_LDADD = $(LDADD) +lstat64_DEPENDENCIES = libtests.a +mbind_SOURCES = mbind.c +mbind_OBJECTS = mbind.$(OBJEXT) +mbind_LDADD = $(LDADD) +mbind_DEPENDENCIES = libtests.a +membarrier_SOURCES = membarrier.c +membarrier_OBJECTS = membarrier.$(OBJEXT) +membarrier_LDADD = $(LDADD) +membarrier_DEPENDENCIES = libtests.a +memfd_create_SOURCES = memfd_create.c +memfd_create_OBJECTS = memfd_create.$(OBJEXT) +memfd_create_LDADD = $(LDADD) +memfd_create_DEPENDENCIES = libtests.a +migrate_pages_SOURCES = migrate_pages.c +migrate_pages_OBJECTS = migrate_pages.$(OBJEXT) +migrate_pages_LDADD = $(LDADD) +migrate_pages_DEPENDENCIES = libtests.a +mincore_SOURCES = mincore.c +mincore_OBJECTS = mincore.$(OBJEXT) +mincore_LDADD = $(LDADD) +mincore_DEPENDENCIES = libtests.a +mkdir_SOURCES = mkdir.c +mkdir_OBJECTS = mkdir.$(OBJEXT) +mkdir_LDADD = $(LDADD) +mkdir_DEPENDENCIES = libtests.a +mkdirat_SOURCES = mkdirat.c +mkdirat_OBJECTS = mkdirat.$(OBJEXT) +mkdirat_LDADD = $(LDADD) +mkdirat_DEPENDENCIES = libtests.a +mknod_SOURCES = mknod.c +mknod_OBJECTS = mknod.$(OBJEXT) +mknod_LDADD = $(LDADD) +mknod_DEPENDENCIES = libtests.a +mknodat_SOURCES = mknodat.c +mknodat_OBJECTS = mknodat.$(OBJEXT) +mknodat_LDADD = $(LDADD) +mknodat_DEPENDENCIES = libtests.a +mlock_SOURCES = mlock.c +mlock_OBJECTS = mlock.$(OBJEXT) +mlock_LDADD = $(LDADD) +mlock_DEPENDENCIES = libtests.a +mlock2_SOURCES = mlock2.c +mlock2_OBJECTS = mlock2.$(OBJEXT) +mlock2_LDADD = $(LDADD) +mlock2_DEPENDENCIES = libtests.a +mlockall_SOURCES = mlockall.c +mlockall_OBJECTS = mlockall.$(OBJEXT) +mlockall_LDADD = $(LDADD) +mlockall_DEPENDENCIES = libtests.a +mmap_SOURCES = mmap.c +mmap_OBJECTS = mmap.$(OBJEXT) +mmap_LDADD = $(LDADD) +mmap_DEPENDENCIES = libtests.a +mmap64_SOURCES = mmap64.c +mmap64_OBJECTS = mmap64-mmap64.$(OBJEXT) +mmap64_LDADD = $(LDADD) +mmap64_DEPENDENCIES = libtests.a +mmsg_SOURCES = mmsg.c +mmsg_OBJECTS = mmsg.$(OBJEXT) +mmsg_LDADD = $(LDADD) +mmsg_DEPENDENCIES = libtests.a +mmsg_silent_SOURCES = mmsg-silent.c +mmsg_silent_OBJECTS = mmsg-silent.$(OBJEXT) +mmsg_silent_LDADD = $(LDADD) +mmsg_silent_DEPENDENCIES = libtests.a +mmsg_name_SOURCES = mmsg_name.c +mmsg_name_OBJECTS = mmsg_name.$(OBJEXT) +mmsg_name_LDADD = $(LDADD) +mmsg_name_DEPENDENCIES = libtests.a +mmsg_name_v_SOURCES = mmsg_name-v.c +mmsg_name_v_OBJECTS = mmsg_name-v.$(OBJEXT) +mmsg_name_v_LDADD = $(LDADD) +mmsg_name_v_DEPENDENCIES = libtests.a +mount_SOURCES = mount.c +mount_OBJECTS = mount.$(OBJEXT) +mount_LDADD = $(LDADD) +mount_DEPENDENCIES = libtests.a +move_pages_SOURCES = move_pages.c +move_pages_OBJECTS = move_pages.$(OBJEXT) +move_pages_LDADD = $(LDADD) +move_pages_DEPENDENCIES = libtests.a +mq_SOURCES = mq.c +mq_OBJECTS = mq.$(OBJEXT) +mq_DEPENDENCIES = $(LDADD) +mq_sendrecv_SOURCES = mq_sendrecv.c +mq_sendrecv_OBJECTS = mq_sendrecv.$(OBJEXT) +mq_sendrecv_DEPENDENCIES = $(LDADD) +mq_sendrecv_read_SOURCES = mq_sendrecv-read.c +mq_sendrecv_read_OBJECTS = mq_sendrecv-read.$(OBJEXT) +mq_sendrecv_read_DEPENDENCIES = $(LDADD) +mq_sendrecv_write_SOURCES = mq_sendrecv-write.c +mq_sendrecv_write_OBJECTS = mq_sendrecv-write.$(OBJEXT) +mq_sendrecv_write_DEPENDENCIES = $(LDADD) +msg_control_SOURCES = msg_control.c +msg_control_OBJECTS = msg_control.$(OBJEXT) +msg_control_LDADD = $(LDADD) +msg_control_DEPENDENCIES = libtests.a +msg_control_v_SOURCES = msg_control-v.c +msg_control_v_OBJECTS = msg_control-v.$(OBJEXT) +msg_control_v_LDADD = $(LDADD) +msg_control_v_DEPENDENCIES = libtests.a +msg_name_SOURCES = msg_name.c +msg_name_OBJECTS = msg_name.$(OBJEXT) +msg_name_LDADD = $(LDADD) +msg_name_DEPENDENCIES = libtests.a +munlockall_SOURCES = munlockall.c +munlockall_OBJECTS = munlockall.$(OBJEXT) +munlockall_LDADD = $(LDADD) +munlockall_DEPENDENCIES = libtests.a +nanosleep_SOURCES = nanosleep.c +nanosleep_OBJECTS = nanosleep.$(OBJEXT) +nanosleep_LDADD = $(LDADD) +nanosleep_DEPENDENCIES = libtests.a +net_accept_connect_SOURCES = net-accept-connect.c +net_accept_connect_OBJECTS = net-accept-connect.$(OBJEXT) +net_accept_connect_LDADD = $(LDADD) +net_accept_connect_DEPENDENCIES = libtests.a +net_icmp_filter_SOURCES = net-icmp_filter.c +net_icmp_filter_OBJECTS = net-icmp_filter.$(OBJEXT) +net_icmp_filter_LDADD = $(LDADD) +net_icmp_filter_DEPENDENCIES = libtests.a +net_sockaddr_SOURCES = net-sockaddr.c +net_sockaddr_OBJECTS = net-sockaddr.$(OBJEXT) +net_sockaddr_LDADD = $(LDADD) +net_sockaddr_DEPENDENCIES = libtests.a +net_y_unix_SOURCES = net-y-unix.c +net_y_unix_OBJECTS = net-y-unix.$(OBJEXT) +net_y_unix_LDADD = $(LDADD) +net_y_unix_DEPENDENCIES = libtests.a +net_yy_inet_SOURCES = net-yy-inet.c +net_yy_inet_OBJECTS = net-yy-inet.$(OBJEXT) +net_yy_inet_LDADD = $(LDADD) +net_yy_inet_DEPENDENCIES = libtests.a +net_yy_netlink_SOURCES = net-yy-netlink.c +net_yy_netlink_OBJECTS = net-yy-netlink.$(OBJEXT) +net_yy_netlink_LDADD = $(LDADD) +net_yy_netlink_DEPENDENCIES = libtests.a +net_yy_unix_SOURCES = net-yy-unix.c +net_yy_unix_OBJECTS = net-yy-unix.$(OBJEXT) +net_yy_unix_LDADD = $(LDADD) +net_yy_unix_DEPENDENCIES = libtests.a +netlink_inet_diag_SOURCES = netlink_inet_diag.c +netlink_inet_diag_OBJECTS = netlink_inet_diag.$(OBJEXT) +netlink_inet_diag_LDADD = $(LDADD) +netlink_inet_diag_DEPENDENCIES = libtests.a +netlink_netlink_diag_SOURCES = netlink_netlink_diag.c +netlink_netlink_diag_OBJECTS = netlink_netlink_diag.$(OBJEXT) +netlink_netlink_diag_LDADD = $(LDADD) +netlink_netlink_diag_DEPENDENCIES = libtests.a +netlink_protocol_SOURCES = netlink_protocol.c +netlink_protocol_OBJECTS = netlink_protocol.$(OBJEXT) +netlink_protocol_LDADD = $(LDADD) +netlink_protocol_DEPENDENCIES = libtests.a +netlink_unix_diag_SOURCES = netlink_unix_diag.c +netlink_unix_diag_OBJECTS = netlink_unix_diag.$(OBJEXT) +netlink_unix_diag_LDADD = $(LDADD) +netlink_unix_diag_DEPENDENCIES = libtests.a +newfstatat_SOURCES = newfstatat.c +newfstatat_OBJECTS = newfstatat-newfstatat.$(OBJEXT) +newfstatat_LDADD = $(LDADD) +newfstatat_DEPENDENCIES = libtests.a +nsyscalls_SOURCES = nsyscalls.c +nsyscalls_OBJECTS = nsyscalls.$(OBJEXT) +nsyscalls_LDADD = $(LDADD) +nsyscalls_DEPENDENCIES = libtests.a +old_mmap_SOURCES = old_mmap.c +old_mmap_OBJECTS = old_mmap.$(OBJEXT) +old_mmap_LDADD = $(LDADD) +old_mmap_DEPENDENCIES = libtests.a +oldfstat_SOURCES = oldfstat.c +oldfstat_OBJECTS = oldfstat.$(OBJEXT) +oldfstat_LDADD = $(LDADD) +oldfstat_DEPENDENCIES = libtests.a +oldlstat_SOURCES = oldlstat.c +oldlstat_OBJECTS = oldlstat.$(OBJEXT) +oldlstat_LDADD = $(LDADD) +oldlstat_DEPENDENCIES = libtests.a +oldselect_SOURCES = oldselect.c +oldselect_OBJECTS = oldselect.$(OBJEXT) +oldselect_LDADD = $(LDADD) +oldselect_DEPENDENCIES = libtests.a +oldstat_SOURCES = oldstat.c +oldstat_OBJECTS = oldstat.$(OBJEXT) +oldstat_LDADD = $(LDADD) +oldstat_DEPENDENCIES = libtests.a +open_SOURCES = open.c +open_OBJECTS = open.$(OBJEXT) +open_LDADD = $(LDADD) +open_DEPENDENCIES = libtests.a +openat_SOURCES = openat.c +openat_OBJECTS = openat.$(OBJEXT) +openat_LDADD = $(LDADD) +openat_DEPENDENCIES = libtests.a +pause_SOURCES = pause.c +pause_OBJECTS = pause.$(OBJEXT) +pause_LDADD = $(LDADD) +pause_DEPENDENCIES = libtests.a +pc_SOURCES = pc.c +pc_OBJECTS = pc.$(OBJEXT) +am__DEPENDENCIES_1 = +pc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(LDADD) +perf_event_open_SOURCES = perf_event_open.c +perf_event_open_OBJECTS = perf_event_open.$(OBJEXT) +perf_event_open_LDADD = $(LDADD) +perf_event_open_DEPENDENCIES = libtests.a +perf_event_open_nonverbose_SOURCES = perf_event_open_nonverbose.c +perf_event_open_nonverbose_OBJECTS = \ + perf_event_open_nonverbose.$(OBJEXT) +perf_event_open_nonverbose_LDADD = $(LDADD) +perf_event_open_nonverbose_DEPENDENCIES = libtests.a +perf_event_open_unabbrev_SOURCES = perf_event_open_unabbrev.c +perf_event_open_unabbrev_OBJECTS = perf_event_open_unabbrev.$(OBJEXT) +perf_event_open_unabbrev_LDADD = $(LDADD) +perf_event_open_unabbrev_DEPENDENCIES = libtests.a +personality_SOURCES = personality.c +personality_OBJECTS = personality.$(OBJEXT) +personality_LDADD = $(LDADD) +personality_DEPENDENCIES = libtests.a +pipe_SOURCES = pipe.c +pipe_OBJECTS = pipe.$(OBJEXT) +pipe_LDADD = $(LDADD) +pipe_DEPENDENCIES = libtests.a +pipe2_SOURCES = pipe2.c +pipe2_OBJECTS = pipe2.$(OBJEXT) +pipe2_LDADD = $(LDADD) +pipe2_DEPENDENCIES = libtests.a +pkey_alloc_SOURCES = pkey_alloc.c +pkey_alloc_OBJECTS = pkey_alloc.$(OBJEXT) +pkey_alloc_LDADD = $(LDADD) +pkey_alloc_DEPENDENCIES = libtests.a +pkey_free_SOURCES = pkey_free.c +pkey_free_OBJECTS = pkey_free.$(OBJEXT) +pkey_free_LDADD = $(LDADD) +pkey_free_DEPENDENCIES = libtests.a +pkey_mprotect_SOURCES = pkey_mprotect.c +pkey_mprotect_OBJECTS = pkey_mprotect.$(OBJEXT) +pkey_mprotect_LDADD = $(LDADD) +pkey_mprotect_DEPENDENCIES = libtests.a +poll_SOURCES = poll.c +poll_OBJECTS = poll.$(OBJEXT) +poll_LDADD = $(LDADD) +poll_DEPENDENCIES = libtests.a +ppoll_SOURCES = ppoll.c +ppoll_OBJECTS = ppoll.$(OBJEXT) +ppoll_LDADD = $(LDADD) +ppoll_DEPENDENCIES = libtests.a +prctl_arg2_intptr_SOURCES = prctl-arg2-intptr.c +prctl_arg2_intptr_OBJECTS = prctl-arg2-intptr.$(OBJEXT) +prctl_arg2_intptr_LDADD = $(LDADD) +prctl_arg2_intptr_DEPENDENCIES = libtests.a +prctl_dumpable_SOURCES = prctl-dumpable.c +prctl_dumpable_OBJECTS = prctl-dumpable.$(OBJEXT) +prctl_dumpable_LDADD = $(LDADD) +prctl_dumpable_DEPENDENCIES = libtests.a +prctl_name_SOURCES = prctl-name.c +prctl_name_OBJECTS = prctl-name.$(OBJEXT) +prctl_name_LDADD = $(LDADD) +prctl_name_DEPENDENCIES = libtests.a +prctl_no_args_SOURCES = prctl-no-args.c +prctl_no_args_OBJECTS = prctl-no-args.$(OBJEXT) +prctl_no_args_LDADD = $(LDADD) +prctl_no_args_DEPENDENCIES = libtests.a +prctl_pdeathsig_SOURCES = prctl-pdeathsig.c +prctl_pdeathsig_OBJECTS = prctl-pdeathsig.$(OBJEXT) +prctl_pdeathsig_LDADD = $(LDADD) +prctl_pdeathsig_DEPENDENCIES = libtests.a +prctl_seccomp_filter_v_SOURCES = prctl-seccomp-filter-v.c +prctl_seccomp_filter_v_OBJECTS = prctl-seccomp-filter-v.$(OBJEXT) +prctl_seccomp_filter_v_LDADD = $(LDADD) +prctl_seccomp_filter_v_DEPENDENCIES = libtests.a +prctl_seccomp_strict_SOURCES = prctl-seccomp-strict.c +prctl_seccomp_strict_OBJECTS = prctl-seccomp-strict.$(OBJEXT) +prctl_seccomp_strict_LDADD = $(LDADD) +prctl_seccomp_strict_DEPENDENCIES = libtests.a +prctl_securebits_SOURCES = prctl-securebits.c +prctl_securebits_OBJECTS = prctl-securebits.$(OBJEXT) +prctl_securebits_LDADD = $(LDADD) +prctl_securebits_DEPENDENCIES = libtests.a +prctl_tid_address_SOURCES = prctl-tid_address.c +prctl_tid_address_OBJECTS = prctl-tid_address.$(OBJEXT) +prctl_tid_address_LDADD = $(LDADD) +prctl_tid_address_DEPENDENCIES = libtests.a +prctl_tsc_SOURCES = prctl-tsc.c +prctl_tsc_OBJECTS = prctl-tsc.$(OBJEXT) +prctl_tsc_LDADD = $(LDADD) +prctl_tsc_DEPENDENCIES = libtests.a +pread64_pwrite64_SOURCES = pread64-pwrite64.c +pread64_pwrite64_OBJECTS = \ + pread64_pwrite64-pread64-pwrite64.$(OBJEXT) +pread64_pwrite64_LDADD = $(LDADD) +pread64_pwrite64_DEPENDENCIES = libtests.a +preadv_SOURCES = preadv.c +preadv_OBJECTS = preadv-preadv.$(OBJEXT) +preadv_LDADD = $(LDADD) +preadv_DEPENDENCIES = libtests.a +preadv_pwritev_SOURCES = preadv-pwritev.c +preadv_pwritev_OBJECTS = preadv_pwritev-preadv-pwritev.$(OBJEXT) +preadv_pwritev_LDADD = $(LDADD) +preadv_pwritev_DEPENDENCIES = libtests.a +preadv2_pwritev2_SOURCES = preadv2-pwritev2.c +preadv2_pwritev2_OBJECTS = preadv2-pwritev2.$(OBJEXT) +preadv2_pwritev2_LDADD = $(LDADD) +preadv2_pwritev2_DEPENDENCIES = libtests.a +print_maxfd_SOURCES = print_maxfd.c +print_maxfd_OBJECTS = print_maxfd.$(OBJEXT) +print_maxfd_LDADD = $(LDADD) +print_maxfd_DEPENDENCIES = libtests.a +printstr_SOURCES = printstr.c +printstr_OBJECTS = printstr.$(OBJEXT) +printstr_LDADD = $(LDADD) +printstr_DEPENDENCIES = libtests.a +prlimit64_SOURCES = prlimit64.c +prlimit64_OBJECTS = prlimit64.$(OBJEXT) +prlimit64_LDADD = $(LDADD) +prlimit64_DEPENDENCIES = libtests.a +process_vm_readv_SOURCES = process_vm_readv.c +process_vm_readv_OBJECTS = process_vm_readv.$(OBJEXT) +process_vm_readv_LDADD = $(LDADD) +process_vm_readv_DEPENDENCIES = libtests.a +process_vm_writev_SOURCES = process_vm_writev.c +process_vm_writev_OBJECTS = process_vm_writev.$(OBJEXT) +process_vm_writev_LDADD = $(LDADD) +process_vm_writev_DEPENDENCIES = libtests.a +pselect6_SOURCES = pselect6.c +pselect6_OBJECTS = pselect6.$(OBJEXT) +pselect6_LDADD = $(LDADD) +pselect6_DEPENDENCIES = libtests.a +ptrace_SOURCES = ptrace.c +ptrace_OBJECTS = ptrace.$(OBJEXT) +ptrace_LDADD = $(LDADD) +ptrace_DEPENDENCIES = libtests.a +pwritev_SOURCES = pwritev.c +pwritev_OBJECTS = pwritev-pwritev.$(OBJEXT) +pwritev_LDADD = $(LDADD) +pwritev_DEPENDENCIES = libtests.a +qual_fault_SOURCES = qual_fault.c +qual_fault_OBJECTS = qual_fault.$(OBJEXT) +qual_fault_LDADD = $(LDADD) +qual_fault_DEPENDENCIES = libtests.a +qual_inject_error_signal_SOURCES = qual_inject-error-signal.c +qual_inject_error_signal_OBJECTS = qual_inject-error-signal.$(OBJEXT) +qual_inject_error_signal_LDADD = $(LDADD) +qual_inject_error_signal_DEPENDENCIES = libtests.a +qual_inject_retval_SOURCES = qual_inject-retval.c +qual_inject_retval_OBJECTS = qual_inject-retval.$(OBJEXT) +qual_inject_retval_LDADD = $(LDADD) +qual_inject_retval_DEPENDENCIES = libtests.a +qual_inject_signal_SOURCES = qual_inject-signal.c +qual_inject_signal_OBJECTS = qual_inject-signal.$(OBJEXT) +qual_inject_signal_LDADD = $(LDADD) +qual_inject_signal_DEPENDENCIES = libtests.a +qual_signal_SOURCES = qual_signal.c +qual_signal_OBJECTS = qual_signal.$(OBJEXT) +qual_signal_LDADD = $(LDADD) +qual_signal_DEPENDENCIES = libtests.a +quotactl_SOURCES = quotactl.c +quotactl_OBJECTS = quotactl.$(OBJEXT) +quotactl_LDADD = $(LDADD) +quotactl_DEPENDENCIES = libtests.a +quotactl_v_SOURCES = quotactl-v.c +quotactl_v_OBJECTS = quotactl-v.$(OBJEXT) +quotactl_v_LDADD = $(LDADD) +quotactl_v_DEPENDENCIES = libtests.a +quotactl_xfs_SOURCES = quotactl-xfs.c +quotactl_xfs_OBJECTS = quotactl-xfs.$(OBJEXT) +quotactl_xfs_LDADD = $(LDADD) +quotactl_xfs_DEPENDENCIES = libtests.a +quotactl_xfs_v_SOURCES = quotactl-xfs-v.c +quotactl_xfs_v_OBJECTS = quotactl-xfs-v.$(OBJEXT) +quotactl_xfs_v_LDADD = $(LDADD) +quotactl_xfs_v_DEPENDENCIES = libtests.a +read_write_SOURCES = read-write.c +read_write_OBJECTS = read-write.$(OBJEXT) +read_write_LDADD = $(LDADD) +read_write_DEPENDENCIES = libtests.a +readahead_SOURCES = readahead.c +readahead_OBJECTS = readahead.$(OBJEXT) +readahead_LDADD = $(LDADD) +readahead_DEPENDENCIES = libtests.a +readdir_SOURCES = readdir.c +readdir_OBJECTS = readdir.$(OBJEXT) +readdir_LDADD = $(LDADD) +readdir_DEPENDENCIES = libtests.a +readlink_SOURCES = readlink.c +readlink_OBJECTS = readlink.$(OBJEXT) +readlink_LDADD = $(LDADD) +readlink_DEPENDENCIES = libtests.a +readlinkat_SOURCES = readlinkat.c +readlinkat_OBJECTS = readlinkat.$(OBJEXT) +readlinkat_LDADD = $(LDADD) +readlinkat_DEPENDENCIES = libtests.a +readv_SOURCES = readv.c +readv_OBJECTS = readv.$(OBJEXT) +readv_LDADD = $(LDADD) +readv_DEPENDENCIES = libtests.a +reboot_SOURCES = reboot.c +reboot_OBJECTS = reboot.$(OBJEXT) +reboot_LDADD = $(LDADD) +reboot_DEPENDENCIES = libtests.a +recvfrom_SOURCES = recvfrom.c +recvfrom_OBJECTS = recvfrom.$(OBJEXT) +recvfrom_LDADD = $(LDADD) +recvfrom_DEPENDENCIES = libtests.a +recvmmsg_timeout_SOURCES = recvmmsg-timeout.c +recvmmsg_timeout_OBJECTS = recvmmsg-timeout.$(OBJEXT) +recvmmsg_timeout_LDADD = $(LDADD) +recvmmsg_timeout_DEPENDENCIES = libtests.a +recvmsg_SOURCES = recvmsg.c +recvmsg_OBJECTS = recvmsg.$(OBJEXT) +recvmsg_LDADD = $(LDADD) +recvmsg_DEPENDENCIES = libtests.a +redirect_fds_SOURCES = redirect-fds.c +redirect_fds_OBJECTS = redirect-fds.$(OBJEXT) +redirect_fds_LDADD = $(LDADD) +redirect_fds_DEPENDENCIES = libtests.a +remap_file_pages_SOURCES = remap_file_pages.c +remap_file_pages_OBJECTS = remap_file_pages.$(OBJEXT) +remap_file_pages_LDADD = $(LDADD) +remap_file_pages_DEPENDENCIES = libtests.a +rename_SOURCES = rename.c +rename_OBJECTS = rename.$(OBJEXT) +rename_LDADD = $(LDADD) +rename_DEPENDENCIES = libtests.a +renameat_SOURCES = renameat.c +renameat_OBJECTS = renameat.$(OBJEXT) +renameat_LDADD = $(LDADD) +renameat_DEPENDENCIES = libtests.a +renameat2_SOURCES = renameat2.c +renameat2_OBJECTS = renameat2.$(OBJEXT) +renameat2_LDADD = $(LDADD) +renameat2_DEPENDENCIES = libtests.a +request_key_SOURCES = request_key.c +request_key_OBJECTS = request_key.$(OBJEXT) +request_key_LDADD = $(LDADD) +request_key_DEPENDENCIES = libtests.a +restart_syscall_SOURCES = restart_syscall.c +restart_syscall_OBJECTS = restart_syscall.$(OBJEXT) +restart_syscall_LDADD = $(LDADD) +restart_syscall_DEPENDENCIES = libtests.a +rmdir_SOURCES = rmdir.c +rmdir_OBJECTS = rmdir.$(OBJEXT) +rmdir_LDADD = $(LDADD) +rmdir_DEPENDENCIES = libtests.a +rt_sigpending_SOURCES = rt_sigpending.c +rt_sigpending_OBJECTS = rt_sigpending.$(OBJEXT) +rt_sigpending_LDADD = $(LDADD) +rt_sigpending_DEPENDENCIES = libtests.a +rt_sigprocmask_SOURCES = rt_sigprocmask.c +rt_sigprocmask_OBJECTS = rt_sigprocmask.$(OBJEXT) +rt_sigprocmask_LDADD = $(LDADD) +rt_sigprocmask_DEPENDENCIES = libtests.a +rt_sigqueueinfo_SOURCES = rt_sigqueueinfo.c +rt_sigqueueinfo_OBJECTS = rt_sigqueueinfo.$(OBJEXT) +rt_sigqueueinfo_LDADD = $(LDADD) +rt_sigqueueinfo_DEPENDENCIES = libtests.a +rt_sigsuspend_SOURCES = rt_sigsuspend.c +rt_sigsuspend_OBJECTS = rt_sigsuspend.$(OBJEXT) +rt_sigsuspend_LDADD = $(LDADD) +rt_sigsuspend_DEPENDENCIES = libtests.a +rt_sigtimedwait_SOURCES = rt_sigtimedwait.c +rt_sigtimedwait_OBJECTS = rt_sigtimedwait.$(OBJEXT) +rt_sigtimedwait_LDADD = $(LDADD) +rt_sigtimedwait_DEPENDENCIES = libtests.a +rt_tgsigqueueinfo_SOURCES = rt_tgsigqueueinfo.c +rt_tgsigqueueinfo_OBJECTS = rt_tgsigqueueinfo.$(OBJEXT) +rt_tgsigqueueinfo_LDADD = $(LDADD) +rt_tgsigqueueinfo_DEPENDENCIES = libtests.a +sched_get_priority_mxx_SOURCES = sched_get_priority_mxx.c +sched_get_priority_mxx_OBJECTS = sched_get_priority_mxx.$(OBJEXT) +sched_get_priority_mxx_LDADD = $(LDADD) +sched_get_priority_mxx_DEPENDENCIES = libtests.a +sched_rr_get_interval_SOURCES = sched_rr_get_interval.c +sched_rr_get_interval_OBJECTS = sched_rr_get_interval.$(OBJEXT) +sched_rr_get_interval_LDADD = $(LDADD) +sched_rr_get_interval_DEPENDENCIES = libtests.a +sched_xetaffinity_SOURCES = sched_xetaffinity.c +sched_xetaffinity_OBJECTS = sched_xetaffinity.$(OBJEXT) +sched_xetaffinity_LDADD = $(LDADD) +sched_xetaffinity_DEPENDENCIES = libtests.a +sched_xetattr_SOURCES = sched_xetattr.c +sched_xetattr_OBJECTS = sched_xetattr.$(OBJEXT) +sched_xetattr_LDADD = $(LDADD) +sched_xetattr_DEPENDENCIES = libtests.a +sched_xetparam_SOURCES = sched_xetparam.c +sched_xetparam_OBJECTS = sched_xetparam.$(OBJEXT) +sched_xetparam_LDADD = $(LDADD) +sched_xetparam_DEPENDENCIES = libtests.a +sched_xetscheduler_SOURCES = sched_xetscheduler.c +sched_xetscheduler_OBJECTS = sched_xetscheduler.$(OBJEXT) +sched_xetscheduler_LDADD = $(LDADD) +sched_xetscheduler_DEPENDENCIES = libtests.a +sched_yield_SOURCES = sched_yield.c +sched_yield_OBJECTS = sched_yield.$(OBJEXT) +sched_yield_LDADD = $(LDADD) +sched_yield_DEPENDENCIES = libtests.a +scm_rights_SOURCES = scm_rights.c +scm_rights_OBJECTS = scm_rights.$(OBJEXT) +scm_rights_LDADD = $(LDADD) +scm_rights_DEPENDENCIES = libtests.a +seccomp_filter_SOURCES = seccomp-filter.c +seccomp_filter_OBJECTS = seccomp-filter.$(OBJEXT) +seccomp_filter_LDADD = $(LDADD) +seccomp_filter_DEPENDENCIES = libtests.a +seccomp_filter_v_SOURCES = seccomp-filter-v.c +seccomp_filter_v_OBJECTS = seccomp-filter-v.$(OBJEXT) +seccomp_filter_v_LDADD = $(LDADD) +seccomp_filter_v_DEPENDENCIES = libtests.a +seccomp_strict_SOURCES = seccomp-strict.c +seccomp_strict_OBJECTS = seccomp-strict.$(OBJEXT) +seccomp_strict_LDADD = $(LDADD) +seccomp_strict_DEPENDENCIES = libtests.a +select_SOURCES = select.c +select_OBJECTS = select.$(OBJEXT) +select_LDADD = $(LDADD) +select_DEPENDENCIES = libtests.a +semop_SOURCES = semop.c +semop_OBJECTS = semop.$(OBJEXT) +semop_LDADD = $(LDADD) +semop_DEPENDENCIES = libtests.a +sendfile_SOURCES = sendfile.c +sendfile_OBJECTS = sendfile.$(OBJEXT) +sendfile_LDADD = $(LDADD) +sendfile_DEPENDENCIES = libtests.a +sendfile64_SOURCES = sendfile64.c +sendfile64_OBJECTS = sendfile64.$(OBJEXT) +sendfile64_LDADD = $(LDADD) +sendfile64_DEPENDENCIES = libtests.a +set_mempolicy_SOURCES = set_mempolicy.c +set_mempolicy_OBJECTS = set_mempolicy.$(OBJEXT) +set_mempolicy_LDADD = $(LDADD) +set_mempolicy_DEPENDENCIES = libtests.a +set_ptracer_any_SOURCES = set_ptracer_any.c +set_ptracer_any_OBJECTS = set_ptracer_any.$(OBJEXT) +set_ptracer_any_LDADD = $(LDADD) +set_ptracer_any_DEPENDENCIES = libtests.a +setdomainname_SOURCES = setdomainname.c +setdomainname_OBJECTS = setdomainname.$(OBJEXT) +setdomainname_LDADD = $(LDADD) +setdomainname_DEPENDENCIES = libtests.a +setfsgid_SOURCES = setfsgid.c +setfsgid_OBJECTS = setfsgid.$(OBJEXT) +setfsgid_LDADD = $(LDADD) +setfsgid_DEPENDENCIES = libtests.a +setfsgid32_SOURCES = setfsgid32.c +setfsgid32_OBJECTS = setfsgid32.$(OBJEXT) +setfsgid32_LDADD = $(LDADD) +setfsgid32_DEPENDENCIES = libtests.a +setfsuid_SOURCES = setfsuid.c +setfsuid_OBJECTS = setfsuid.$(OBJEXT) +setfsuid_LDADD = $(LDADD) +setfsuid_DEPENDENCIES = libtests.a +setfsuid32_SOURCES = setfsuid32.c +setfsuid32_OBJECTS = setfsuid32.$(OBJEXT) +setfsuid32_LDADD = $(LDADD) +setfsuid32_DEPENDENCIES = libtests.a +setgid_SOURCES = setgid.c +setgid_OBJECTS = setgid.$(OBJEXT) +setgid_LDADD = $(LDADD) +setgid_DEPENDENCIES = libtests.a +setgid32_SOURCES = setgid32.c +setgid32_OBJECTS = setgid32.$(OBJEXT) +setgid32_LDADD = $(LDADD) +setgid32_DEPENDENCIES = libtests.a +setgroups_SOURCES = setgroups.c +setgroups_OBJECTS = setgroups.$(OBJEXT) +setgroups_LDADD = $(LDADD) +setgroups_DEPENDENCIES = libtests.a +setgroups32_SOURCES = setgroups32.c +setgroups32_OBJECTS = setgroups32.$(OBJEXT) +setgroups32_LDADD = $(LDADD) +setgroups32_DEPENDENCIES = libtests.a +sethostname_SOURCES = sethostname.c +sethostname_OBJECTS = sethostname.$(OBJEXT) +sethostname_LDADD = $(LDADD) +sethostname_DEPENDENCIES = libtests.a +setns_SOURCES = setns.c +setns_OBJECTS = setns.$(OBJEXT) +setns_LDADD = $(LDADD) +setns_DEPENDENCIES = libtests.a +setregid_SOURCES = setregid.c +setregid_OBJECTS = setregid.$(OBJEXT) +setregid_LDADD = $(LDADD) +setregid_DEPENDENCIES = libtests.a +setregid32_SOURCES = setregid32.c +setregid32_OBJECTS = setregid32.$(OBJEXT) +setregid32_LDADD = $(LDADD) +setregid32_DEPENDENCIES = libtests.a +setresgid_SOURCES = setresgid.c +setresgid_OBJECTS = setresgid.$(OBJEXT) +setresgid_LDADD = $(LDADD) +setresgid_DEPENDENCIES = libtests.a +setresgid32_SOURCES = setresgid32.c +setresgid32_OBJECTS = setresgid32.$(OBJEXT) +setresgid32_LDADD = $(LDADD) +setresgid32_DEPENDENCIES = libtests.a +setresuid_SOURCES = setresuid.c +setresuid_OBJECTS = setresuid.$(OBJEXT) +setresuid_LDADD = $(LDADD) +setresuid_DEPENDENCIES = libtests.a +setresuid32_SOURCES = setresuid32.c +setresuid32_OBJECTS = setresuid32.$(OBJEXT) +setresuid32_LDADD = $(LDADD) +setresuid32_DEPENDENCIES = libtests.a +setreuid_SOURCES = setreuid.c +setreuid_OBJECTS = setreuid.$(OBJEXT) +setreuid_LDADD = $(LDADD) +setreuid_DEPENDENCIES = libtests.a +setreuid32_SOURCES = setreuid32.c +setreuid32_OBJECTS = setreuid32.$(OBJEXT) +setreuid32_LDADD = $(LDADD) +setreuid32_DEPENDENCIES = libtests.a +setrlimit_SOURCES = setrlimit.c +setrlimit_OBJECTS = setrlimit.$(OBJEXT) +setrlimit_LDADD = $(LDADD) +setrlimit_DEPENDENCIES = libtests.a +setuid_SOURCES = setuid.c +setuid_OBJECTS = setuid.$(OBJEXT) +setuid_LDADD = $(LDADD) +setuid_DEPENDENCIES = libtests.a +setuid32_SOURCES = setuid32.c +setuid32_OBJECTS = setuid32.$(OBJEXT) +setuid32_LDADD = $(LDADD) +setuid32_DEPENDENCIES = libtests.a +shmxt_SOURCES = shmxt.c +shmxt_OBJECTS = shmxt.$(OBJEXT) +shmxt_LDADD = $(LDADD) +shmxt_DEPENDENCIES = libtests.a +shutdown_SOURCES = shutdown.c +shutdown_OBJECTS = shutdown.$(OBJEXT) +shutdown_LDADD = $(LDADD) +shutdown_DEPENDENCIES = libtests.a +sigaction_SOURCES = sigaction.c +sigaction_OBJECTS = sigaction.$(OBJEXT) +sigaction_LDADD = $(LDADD) +sigaction_DEPENDENCIES = libtests.a +sigaltstack_SOURCES = sigaltstack.c +sigaltstack_OBJECTS = sigaltstack.$(OBJEXT) +sigaltstack_LDADD = $(LDADD) +sigaltstack_DEPENDENCIES = libtests.a +siginfo_SOURCES = siginfo.c +siginfo_OBJECTS = siginfo.$(OBJEXT) +siginfo_LDADD = $(LDADD) +siginfo_DEPENDENCIES = libtests.a +signal_receive_SOURCES = signal_receive.c +signal_receive_OBJECTS = signal_receive.$(OBJEXT) +signal_receive_LDADD = $(LDADD) +signal_receive_DEPENDENCIES = libtests.a +signalfd4_SOURCES = signalfd4.c +signalfd4_OBJECTS = signalfd4.$(OBJEXT) +signalfd4_LDADD = $(LDADD) +signalfd4_DEPENDENCIES = libtests.a +sigreturn_SOURCES = sigreturn.c +sigreturn_OBJECTS = sigreturn.$(OBJEXT) +sigreturn_LDADD = $(LDADD) +sigreturn_DEPENDENCIES = libtests.a +sleep_SOURCES = sleep.c +sleep_OBJECTS = sleep.$(OBJEXT) +sleep_LDADD = $(LDADD) +sleep_DEPENDENCIES = libtests.a +socketcall_SOURCES = socketcall.c +socketcall_OBJECTS = socketcall.$(OBJEXT) +socketcall_LDADD = $(LDADD) +socketcall_DEPENDENCIES = libtests.a +splice_SOURCES = splice.c +splice_OBJECTS = splice.$(OBJEXT) +splice_LDADD = $(LDADD) +splice_DEPENDENCIES = libtests.a +am_stack_fcall_OBJECTS = stack-fcall.$(OBJEXT) stack-fcall-0.$(OBJEXT) \ + stack-fcall-1.$(OBJEXT) stack-fcall-2.$(OBJEXT) \ + stack-fcall-3.$(OBJEXT) +stack_fcall_OBJECTS = $(am_stack_fcall_OBJECTS) +stack_fcall_LDADD = $(LDADD) +stack_fcall_DEPENDENCIES = libtests.a +stat_SOURCES = stat.c +stat_OBJECTS = stat.$(OBJEXT) +stat_LDADD = $(LDADD) +stat_DEPENDENCIES = libtests.a +stat64_SOURCES = stat64.c +stat64_OBJECTS = stat64-stat64.$(OBJEXT) +stat64_LDADD = $(LDADD) +stat64_DEPENDENCIES = libtests.a +statfs_SOURCES = statfs.c +statfs_OBJECTS = statfs-statfs.$(OBJEXT) +statfs_LDADD = $(LDADD) +statfs_DEPENDENCIES = libtests.a +statfs64_SOURCES = statfs64.c +statfs64_OBJECTS = statfs64.$(OBJEXT) +statfs64_LDADD = $(LDADD) +statfs64_DEPENDENCIES = libtests.a +swap_SOURCES = swap.c +swap_OBJECTS = swap.$(OBJEXT) +swap_LDADD = $(LDADD) +swap_DEPENDENCIES = libtests.a +symlink_SOURCES = symlink.c +symlink_OBJECTS = symlink.$(OBJEXT) +symlink_LDADD = $(LDADD) +symlink_DEPENDENCIES = libtests.a +symlinkat_SOURCES = symlinkat.c +symlinkat_OBJECTS = symlinkat.$(OBJEXT) +symlinkat_LDADD = $(LDADD) +symlinkat_DEPENDENCIES = libtests.a +sync_SOURCES = sync.c +sync_OBJECTS = sync.$(OBJEXT) +sync_LDADD = $(LDADD) +sync_DEPENDENCIES = libtests.a +sync_file_range_SOURCES = sync_file_range.c +sync_file_range_OBJECTS = sync_file_range.$(OBJEXT) +sync_file_range_LDADD = $(LDADD) +sync_file_range_DEPENDENCIES = libtests.a +sync_file_range2_SOURCES = sync_file_range2.c +sync_file_range2_OBJECTS = sync_file_range2.$(OBJEXT) +sync_file_range2_LDADD = $(LDADD) +sync_file_range2_DEPENDENCIES = libtests.a +sysinfo_SOURCES = sysinfo.c +sysinfo_OBJECTS = sysinfo.$(OBJEXT) +sysinfo_LDADD = $(LDADD) +sysinfo_DEPENDENCIES = libtests.a +syslog_SOURCES = syslog.c +syslog_OBJECTS = syslog.$(OBJEXT) +syslog_LDADD = $(LDADD) +syslog_DEPENDENCIES = libtests.a +tee_SOURCES = tee.c +tee_OBJECTS = tee.$(OBJEXT) +tee_LDADD = $(LDADD) +tee_DEPENDENCIES = libtests.a +threads_execve_SOURCES = threads-execve.c +threads_execve_OBJECTS = threads-execve.$(OBJEXT) +threads_execve_DEPENDENCIES = $(LDADD) +time_SOURCES = time.c +time_OBJECTS = time.$(OBJEXT) +time_LDADD = $(LDADD) +time_DEPENDENCIES = libtests.a +timer_create_SOURCES = timer_create.c +timer_create_OBJECTS = timer_create.$(OBJEXT) +timer_create_LDADD = $(LDADD) +timer_create_DEPENDENCIES = libtests.a +timer_xettime_SOURCES = timer_xettime.c +timer_xettime_OBJECTS = timer_xettime.$(OBJEXT) +timer_xettime_LDADD = $(LDADD) +timer_xettime_DEPENDENCIES = libtests.a +timerfd_xettime_SOURCES = timerfd_xettime.c +timerfd_xettime_OBJECTS = timerfd_xettime.$(OBJEXT) +timerfd_xettime_LDADD = $(LDADD) +timerfd_xettime_DEPENDENCIES = libtests.a +times_SOURCES = times.c +times_OBJECTS = times.$(OBJEXT) +times_DEPENDENCIES = $(LDADD) +times_fail_SOURCES = times-fail.c +times_fail_OBJECTS = times-fail.$(OBJEXT) +times_fail_LDADD = $(LDADD) +times_fail_DEPENDENCIES = libtests.a +truncate_SOURCES = truncate.c +truncate_OBJECTS = truncate.$(OBJEXT) +truncate_LDADD = $(LDADD) +truncate_DEPENDENCIES = libtests.a +truncate64_SOURCES = truncate64.c +truncate64_OBJECTS = truncate64-truncate64.$(OBJEXT) +truncate64_LDADD = $(LDADD) +truncate64_DEPENDENCIES = libtests.a +ugetrlimit_SOURCES = ugetrlimit.c +ugetrlimit_OBJECTS = ugetrlimit.$(OBJEXT) +ugetrlimit_LDADD = $(LDADD) +ugetrlimit_DEPENDENCIES = libtests.a +uio_SOURCES = uio.c +uio_OBJECTS = uio-uio.$(OBJEXT) +uio_LDADD = $(LDADD) +uio_DEPENDENCIES = libtests.a +umask_SOURCES = umask.c +umask_OBJECTS = umask.$(OBJEXT) +umask_LDADD = $(LDADD) +umask_DEPENDENCIES = libtests.a +umount_SOURCES = umount.c +umount_OBJECTS = umount.$(OBJEXT) +umount_LDADD = $(LDADD) +umount_DEPENDENCIES = libtests.a +umount2_SOURCES = umount2.c +umount2_OBJECTS = umount2.$(OBJEXT) +umount2_LDADD = $(LDADD) +umount2_DEPENDENCIES = libtests.a +umoven_illptr_SOURCES = umoven-illptr.c +umoven_illptr_OBJECTS = umoven-illptr.$(OBJEXT) +umoven_illptr_LDADD = $(LDADD) +umoven_illptr_DEPENDENCIES = libtests.a +umovestr_SOURCES = umovestr.c +umovestr_OBJECTS = umovestr.$(OBJEXT) +umovestr_LDADD = $(LDADD) +umovestr_DEPENDENCIES = libtests.a +umovestr_illptr_SOURCES = umovestr-illptr.c +umovestr_illptr_OBJECTS = umovestr-illptr.$(OBJEXT) +umovestr_illptr_LDADD = $(LDADD) +umovestr_illptr_DEPENDENCIES = libtests.a +umovestr2_SOURCES = umovestr2.c +umovestr2_OBJECTS = umovestr2.$(OBJEXT) +umovestr2_LDADD = $(LDADD) +umovestr2_DEPENDENCIES = libtests.a +umovestr3_SOURCES = umovestr3.c +umovestr3_OBJECTS = umovestr3.$(OBJEXT) +umovestr3_LDADD = $(LDADD) +umovestr3_DEPENDENCIES = libtests.a +uname_SOURCES = uname.c +uname_OBJECTS = uname.$(OBJEXT) +uname_LDADD = $(LDADD) +uname_DEPENDENCIES = libtests.a +unix_pair_send_recv_SOURCES = unix-pair-send-recv.c +unix_pair_send_recv_OBJECTS = unix-pair-send-recv.$(OBJEXT) +unix_pair_send_recv_LDADD = $(LDADD) +unix_pair_send_recv_DEPENDENCIES = libtests.a +unix_pair_sendto_recvfrom_SOURCES = unix-pair-sendto-recvfrom.c +unix_pair_sendto_recvfrom_OBJECTS = \ + unix-pair-sendto-recvfrom.$(OBJEXT) +unix_pair_sendto_recvfrom_LDADD = $(LDADD) +unix_pair_sendto_recvfrom_DEPENDENCIES = libtests.a +unlink_SOURCES = unlink.c +unlink_OBJECTS = unlink.$(OBJEXT) +unlink_LDADD = $(LDADD) +unlink_DEPENDENCIES = libtests.a +unlinkat_SOURCES = unlinkat.c +unlinkat_OBJECTS = unlinkat.$(OBJEXT) +unlinkat_LDADD = $(LDADD) +unlinkat_DEPENDENCIES = libtests.a +unshare_SOURCES = unshare.c +unshare_OBJECTS = unshare.$(OBJEXT) +unshare_LDADD = $(LDADD) +unshare_DEPENDENCIES = libtests.a +userfaultfd_SOURCES = userfaultfd.c +userfaultfd_OBJECTS = userfaultfd.$(OBJEXT) +userfaultfd_LDADD = $(LDADD) +userfaultfd_DEPENDENCIES = libtests.a +ustat_SOURCES = ustat.c +ustat_OBJECTS = ustat.$(OBJEXT) +ustat_LDADD = $(LDADD) +ustat_DEPENDENCIES = libtests.a +utime_SOURCES = utime.c +utime_OBJECTS = utime.$(OBJEXT) +utime_LDADD = $(LDADD) +utime_DEPENDENCIES = libtests.a +utimensat_SOURCES = utimensat.c +utimensat_OBJECTS = utimensat.$(OBJEXT) +utimensat_LDADD = $(LDADD) +utimensat_DEPENDENCIES = libtests.a +utimes_SOURCES = utimes.c +utimes_OBJECTS = utimes.$(OBJEXT) +utimes_LDADD = $(LDADD) +utimes_DEPENDENCIES = libtests.a +vfork_f_SOURCES = vfork-f.c +vfork_f_OBJECTS = vfork-f.$(OBJEXT) +vfork_f_LDADD = $(LDADD) +vfork_f_DEPENDENCIES = libtests.a +vhangup_SOURCES = vhangup.c +vhangup_OBJECTS = vhangup.$(OBJEXT) +vhangup_LDADD = $(LDADD) +vhangup_DEPENDENCIES = libtests.a +vmsplice_SOURCES = vmsplice.c +vmsplice_OBJECTS = vmsplice.$(OBJEXT) +vmsplice_LDADD = $(LDADD) +vmsplice_DEPENDENCIES = libtests.a +wait4_SOURCES = wait4.c +wait4_OBJECTS = wait4.$(OBJEXT) +wait4_LDADD = $(LDADD) +wait4_DEPENDENCIES = libtests.a +wait4_v_SOURCES = wait4-v.c +wait4_v_OBJECTS = wait4-v.$(OBJEXT) +wait4_v_LDADD = $(LDADD) +wait4_v_DEPENDENCIES = libtests.a +waitid_SOURCES = waitid.c +waitid_OBJECTS = waitid.$(OBJEXT) +waitid_LDADD = $(LDADD) +waitid_DEPENDENCIES = libtests.a +waitid_v_SOURCES = waitid-v.c +waitid_v_OBJECTS = waitid-v.$(OBJEXT) +waitid_v_LDADD = $(LDADD) +waitid_v_DEPENDENCIES = libtests.a +waitpid_SOURCES = waitpid.c +waitpid_OBJECTS = waitpid.$(OBJEXT) +waitpid_LDADD = $(LDADD) +waitpid_DEPENDENCIES = libtests.a +xattr_SOURCES = xattr.c +xattr_OBJECTS = xattr.$(OBJEXT) +xattr_LDADD = $(LDADD) +xattr_DEPENDENCIES = libtests.a +xattr_strings_SOURCES = xattr-strings.c +xattr_strings_OBJECTS = xattr-strings.$(OBJEXT) +xattr_strings_LDADD = $(LDADD) +xattr_strings_DEPENDENCIES = libtests.a +xet_robust_list_SOURCES = xet_robust_list.c +xet_robust_list_OBJECTS = xet_robust_list.$(OBJEXT) +xet_robust_list_LDADD = $(LDADD) +xet_robust_list_DEPENDENCIES = libtests.a +xetitimer_SOURCES = xetitimer.c +xetitimer_OBJECTS = xetitimer.$(OBJEXT) +xetitimer_LDADD = $(LDADD) +xetitimer_DEPENDENCIES = libtests.a +xetpgid_SOURCES = xetpgid.c +xetpgid_OBJECTS = xetpgid.$(OBJEXT) +xetpgid_LDADD = $(LDADD) +xetpgid_DEPENDENCIES = libtests.a +xetpriority_SOURCES = xetpriority.c +xetpriority_OBJECTS = xetpriority.$(OBJEXT) +xetpriority_LDADD = $(LDADD) +xetpriority_DEPENDENCIES = libtests.a +xettimeofday_SOURCES = xettimeofday.c +xettimeofday_OBJECTS = xettimeofday.$(OBJEXT) +xettimeofday_LDADD = $(LDADD) +xettimeofday_DEPENDENCIES = libtests.a +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libtests_a_SOURCES) _newselect.c accept.c accept4.c \ + access.c acct.c add_key.c adjtimex.c aio.c alarm.c answer.c \ + attach-f-p.c attach-f-p-cmd.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c caps-abbrev.c \ + chmod.c chown.c chown32.c chroot.c clock_adjtime.c \ + clock_nanosleep.c clock_xettime.c copy_file_range.c count-f.c \ + creat.c delete_module.c dup.c dup2.c dup3.c epoll_create.c \ + epoll_create1.c epoll_ctl.c epoll_pwait.c epoll_wait.c \ + erestartsys.c eventfd.c execve.c execve-v.c execveat.c \ + execveat-v.c faccessat.c fadvise64.c fadvise64_64.c \ + fallocate.c fanotify_init.c fanotify_mark.c fchdir.c fchmod.c \ + fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c fcntl64.c \ + fdatasync.c file_handle.c file_ioctl.c filter-unavailable.c \ + finit_module.c flock.c fork-f.c fstat.c fstat64.c fstatat64.c \ + fstatfs.c fstatfs64.c fsync.c ftruncate.c ftruncate64.c \ + futex.c futimesat.c get_mempolicy.c getcpu.c getcwd.c \ + getdents.c getdents64.c getegid.c getegid32.c geteuid.c \ + geteuid32.c getgid.c getgid32.c getgroups.c getgroups32.c \ + getpeername.c getpgrp.c getrandom.c getresgid.c getresgid32.c \ + getresuid.c getresuid32.c getrlimit.c getrusage.c getsid.c \ + getsockname.c getuid.c getuid32.c getxxid.c inet-cmsg.c \ + init_module.c inotify.c inotify_init1.c ioctl.c ioctl_block.c \ + ioctl_dm.c ioctl_dm-v.c ioctl_evdev.c ioctl_evdev-v.c \ + ioctl_loop.c ioctl_loop-nv.c ioctl_loop-v.c ioctl_mtd.c \ + ioctl_rtc.c ioctl_rtc-v.c ioctl_scsi.c ioctl_sg_io_v3.c \ + ioctl_sg_io_v4.c ioctl_sock_gifconf.c ioctl_uffdio.c \ + ioctl_v4l2.c ioperm.c iopl.c ioprio.c ip_mreq.c ipc.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kcmp.c \ + kexec_file_load.c kexec_load.c keyctl.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lookup_dcookie.c \ + lseek.c lstat.c lstat64.c mbind.c membarrier.c memfd_create.c \ + migrate_pages.c mincore.c mkdir.c mkdirat.c mknod.c mknodat.c \ + mlock.c mlock2.c mlockall.c mmap.c mmap64.c mmsg.c \ + mmsg-silent.c mmsg_name.c mmsg_name-v.c mount.c move_pages.c \ + mq.c mq_sendrecv.c mq_sendrecv-read.c mq_sendrecv-write.c \ + msg_control.c msg_control-v.c msg_name.c munlockall.c \ + nanosleep.c net-accept-connect.c net-icmp_filter.c \ + net-sockaddr.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_protocol.c netlink_unix_diag.c newfstatat.c \ + nsyscalls.c old_mmap.c oldfstat.c oldlstat.c oldselect.c \ + oldstat.c open.c openat.c pause.c pc.c perf_event_open.c \ + perf_event_open_nonverbose.c perf_event_open_unabbrev.c \ + personality.c pipe.c pipe2.c pkey_alloc.c pkey_free.c \ + pkey_mprotect.c poll.c ppoll.c prctl-arg2-intptr.c \ + prctl-dumpable.c prctl-name.c prctl-no-args.c \ + prctl-pdeathsig.c prctl-seccomp-filter-v.c \ + prctl-seccomp-strict.c prctl-securebits.c prctl-tid_address.c \ + prctl-tsc.c pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c print_maxfd.c printstr.c prlimit64.c \ + process_vm_readv.c process_vm_writev.c pselect6.c ptrace.c \ + pwritev.c qual_fault.c qual_inject-error-signal.c \ + qual_inject-retval.c qual_inject-signal.c qual_signal.c \ + quotactl.c quotactl-v.c quotactl-xfs.c quotactl-xfs-v.c \ + read-write.c readahead.c readdir.c readlink.c readlinkat.c \ + readv.c reboot.c recvfrom.c recvmmsg-timeout.c recvmsg.c \ + redirect-fds.c remap_file_pages.c rename.c renameat.c \ + renameat2.c request_key.c restart_syscall.c rmdir.c \ + rt_sigpending.c rt_sigprocmask.c rt_sigqueueinfo.c \ + rt_sigsuspend.c rt_sigtimedwait.c rt_tgsigqueueinfo.c \ + sched_get_priority_mxx.c sched_rr_get_interval.c \ + sched_xetaffinity.c sched_xetattr.c sched_xetparam.c \ + sched_xetscheduler.c sched_yield.c scm_rights.c \ + seccomp-filter.c seccomp-filter-v.c seccomp-strict.c select.c \ + semop.c sendfile.c sendfile64.c set_mempolicy.c \ + set_ptracer_any.c setdomainname.c setfsgid.c setfsgid32.c \ + setfsuid.c setfsuid32.c setgid.c setgid32.c setgroups.c \ + setgroups32.c sethostname.c setns.c setregid.c setregid32.c \ + setresgid.c setresgid32.c setresuid.c setresuid32.c setreuid.c \ + setreuid32.c setrlimit.c setuid.c setuid32.c shmxt.c \ + shutdown.c sigaction.c sigaltstack.c siginfo.c \ + signal_receive.c signalfd4.c sigreturn.c sleep.c socketcall.c \ + splice.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ + statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + threads-execve.c time.c timer_create.c timer_xettime.c \ + timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ + ugetrlimit.c uio.c umask.c umount.c umount2.c umoven-illptr.c \ + umovestr.c umovestr-illptr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unix-pair-sendto-recvfrom.c unlink.c \ + unlinkat.c unshare.c userfaultfd.c ustat.c utime.c utimensat.c \ + utimes.c vfork-f.c vhangup.c vmsplice.c wait4.c wait4-v.c \ + waitid.c waitid-v.c waitpid.c xattr.c xattr-strings.c \ + xet_robust_list.c xetitimer.c xetpgid.c xetpriority.c \ + xettimeofday.c +DIST_SOURCES = $(libtests_a_SOURCES) _newselect.c accept.c accept4.c \ + access.c acct.c add_key.c adjtimex.c aio.c alarm.c answer.c \ + attach-f-p.c attach-f-p-cmd.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c caps-abbrev.c \ + chmod.c chown.c chown32.c chroot.c clock_adjtime.c \ + clock_nanosleep.c clock_xettime.c copy_file_range.c count-f.c \ + creat.c delete_module.c dup.c dup2.c dup3.c epoll_create.c \ + epoll_create1.c epoll_ctl.c epoll_pwait.c epoll_wait.c \ + erestartsys.c eventfd.c execve.c execve-v.c execveat.c \ + execveat-v.c faccessat.c fadvise64.c fadvise64_64.c \ + fallocate.c fanotify_init.c fanotify_mark.c fchdir.c fchmod.c \ + fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c fcntl64.c \ + fdatasync.c file_handle.c file_ioctl.c filter-unavailable.c \ + finit_module.c flock.c fork-f.c fstat.c fstat64.c fstatat64.c \ + fstatfs.c fstatfs64.c fsync.c ftruncate.c ftruncate64.c \ + futex.c futimesat.c get_mempolicy.c getcpu.c getcwd.c \ + getdents.c getdents64.c getegid.c getegid32.c geteuid.c \ + geteuid32.c getgid.c getgid32.c getgroups.c getgroups32.c \ + getpeername.c getpgrp.c getrandom.c getresgid.c getresgid32.c \ + getresuid.c getresuid32.c getrlimit.c getrusage.c getsid.c \ + getsockname.c getuid.c getuid32.c getxxid.c inet-cmsg.c \ + init_module.c inotify.c inotify_init1.c ioctl.c ioctl_block.c \ + ioctl_dm.c ioctl_dm-v.c ioctl_evdev.c ioctl_evdev-v.c \ + ioctl_loop.c ioctl_loop-nv.c ioctl_loop-v.c ioctl_mtd.c \ + ioctl_rtc.c ioctl_rtc-v.c ioctl_scsi.c ioctl_sg_io_v3.c \ + ioctl_sg_io_v4.c ioctl_sock_gifconf.c ioctl_uffdio.c \ + ioctl_v4l2.c ioperm.c iopl.c ioprio.c ip_mreq.c ipc.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kcmp.c \ + kexec_file_load.c kexec_load.c keyctl.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lookup_dcookie.c \ + lseek.c lstat.c lstat64.c mbind.c membarrier.c memfd_create.c \ + migrate_pages.c mincore.c mkdir.c mkdirat.c mknod.c mknodat.c \ + mlock.c mlock2.c mlockall.c mmap.c mmap64.c mmsg.c \ + mmsg-silent.c mmsg_name.c mmsg_name-v.c mount.c move_pages.c \ + mq.c mq_sendrecv.c mq_sendrecv-read.c mq_sendrecv-write.c \ + msg_control.c msg_control-v.c msg_name.c munlockall.c \ + nanosleep.c net-accept-connect.c net-icmp_filter.c \ + net-sockaddr.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_protocol.c netlink_unix_diag.c newfstatat.c \ + nsyscalls.c old_mmap.c oldfstat.c oldlstat.c oldselect.c \ + oldstat.c open.c openat.c pause.c pc.c perf_event_open.c \ + perf_event_open_nonverbose.c perf_event_open_unabbrev.c \ + personality.c pipe.c pipe2.c pkey_alloc.c pkey_free.c \ + pkey_mprotect.c poll.c ppoll.c prctl-arg2-intptr.c \ + prctl-dumpable.c prctl-name.c prctl-no-args.c \ + prctl-pdeathsig.c prctl-seccomp-filter-v.c \ + prctl-seccomp-strict.c prctl-securebits.c prctl-tid_address.c \ + prctl-tsc.c pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c print_maxfd.c printstr.c prlimit64.c \ + process_vm_readv.c process_vm_writev.c pselect6.c ptrace.c \ + pwritev.c qual_fault.c qual_inject-error-signal.c \ + qual_inject-retval.c qual_inject-signal.c qual_signal.c \ + quotactl.c quotactl-v.c quotactl-xfs.c quotactl-xfs-v.c \ + read-write.c readahead.c readdir.c readlink.c readlinkat.c \ + readv.c reboot.c recvfrom.c recvmmsg-timeout.c recvmsg.c \ + redirect-fds.c remap_file_pages.c rename.c renameat.c \ + renameat2.c request_key.c restart_syscall.c rmdir.c \ + rt_sigpending.c rt_sigprocmask.c rt_sigqueueinfo.c \ + rt_sigsuspend.c rt_sigtimedwait.c rt_tgsigqueueinfo.c \ + sched_get_priority_mxx.c sched_rr_get_interval.c \ + sched_xetaffinity.c sched_xetattr.c sched_xetparam.c \ + sched_xetscheduler.c sched_yield.c scm_rights.c \ + seccomp-filter.c seccomp-filter-v.c seccomp-strict.c select.c \ + semop.c sendfile.c sendfile64.c set_mempolicy.c \ + set_ptracer_any.c setdomainname.c setfsgid.c setfsgid32.c \ + setfsuid.c setfsuid32.c setgid.c setgid32.c setgroups.c \ + setgroups32.c sethostname.c setns.c setregid.c setregid32.c \ + setresgid.c setresgid32.c setresuid.c setresuid32.c setreuid.c \ + setreuid32.c setrlimit.c setuid.c setuid32.c shmxt.c \ + shutdown.c sigaction.c sigaltstack.c siginfo.c \ + signal_receive.c signalfd4.c sigreturn.c sleep.c socketcall.c \ + splice.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ + statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + threads-execve.c time.c timer_create.c timer_xettime.c \ + timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ + ugetrlimit.c uio.c umask.c umount.c umount2.c umoven-illptr.c \ + umovestr.c umovestr-illptr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unix-pair-sendto-recvfrom.c unlink.c \ + unlinkat.c unshare.c userfaultfd.c ustat.c utime.c utimensat.c \ + utimes.c vfork-f.c vhangup.c vmsplice.c wait4.c wait4-v.c \ + waitid.c waitid-v.c waitpid.c xattr.c xattr-strings.c \ + xet_robust_list.c xetitimer.c xetpgid.c xetpriority.c \ + xettimeofday.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__extra_recursive_targets = check-valgrind-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +#am__EXEEXT_1 = strace-k.test +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = .test +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing aclocal-1.14 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AUTOCONF = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing autoconf +AUTOHEADER = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing autoheader +AUTOMAKE = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing automake-1.14 +AWK = gawk +BUILD_EXEEXT = +BUILD_OBJEXT = +CC = gcc +CCDEPMODE = depmode=gcc3 +CC_FOR_BUILD = gcc +CFLAGS = -g -O2 +CFLAGS_FOR_BUILD = -g -O2 +CODE_COVERAGE_CFLAGS = +CODE_COVERAGE_CPPFLAGS = +CODE_COVERAGE_CXXFLAGS = +CODE_COVERAGE_ENABLED = no +CODE_COVERAGE_LDFLAGS = +CPP = gcc -E +CPPFLAGS = +CPPFLAGS_FOR_BUILD = +CPP_FOR_BUILD = gcc -E +CYGPATH_W = echo +DEB_CHANGELOGTIME = Wed, 15 Feb 2017 11:38:25 -0800 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +ENABLE_VALGRIND_drd = no +ENABLE_VALGRIND_helgrind = no +ENABLE_VALGRIND_memcheck = yes +ENABLE_VALGRIND_sgcheck = +EXEEXT = +GCOV = +GENHTML = +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LCOV = +LDFLAGS = +LDFLAGS_FOR_BUILD = +LIBOBJS = +LIBS = +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing makeinfo +MIPS_ABI = +MKDIR_P = /bin/mkdir -p +OBJEXT = o +PACKAGE = strace +PACKAGE_BUGREPORT = strace-devel@lists.sourceforge.net +PACKAGE_NAME = strace +PACKAGE_STRING = strace 4.16 +PACKAGE_TARNAME = strace +PACKAGE_URL = https://strace.io +PACKAGE_VERSION = 4.16 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +RANLIB = ranlib +RPM_CHANGELOGTIME = Wed Feb 15 2017 +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +VALGRIND = valgrind +VALGRIND_ENABLED = yes +VERSION = 4.16 +WARN_CFLAGS = -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings +WARN_CFLAGS_FOR_BUILD = -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings +abs_builddir = /usr/local/google/home/enh/Downloads/strace-4.16/tests-m32 +abs_srcdir = /usr/local/google/home/enh/Downloads/strace-4.16/tests-m32 +abs_top_builddir = /usr/local/google/home/enh/Downloads/strace-4.16 +abs_top_srcdir = /usr/local/google/home/enh/Downloads/strace-4.16 +ac_ct_CC = gcc +ac_ct_CC_FOR_BUILD = gcc +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +arch = x86_64 +arch_m32 = i386 +arch_mx32 = x32 +bindir = ${exec_prefix}/bin +build = x86_64-pc-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = pc +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +dl_LIBS = -ldl +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-pc-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +libunwind_CPPFLAGS = +libunwind_LDFLAGS = +libunwind_LIBS = +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +valgrind_enabled_tools = memcheck +valgrind_tools = memcheck helgrind drd sgcheck +OS = linux +ARCH = i386 +MPERS_NAME = m32 +ARCH_MFLAGS = -DMPERS_IS_$(MPERS_NAME) -m32 +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = $(ARCH_MFLAGS) \ + -I$(builddir) \ + -I$(top_builddir)/$(OS)/$(ARCH) \ + -I$(top_srcdir)/$(OS)/$(ARCH) \ + -I$(top_builddir)/$(OS) \ + -I$(top_srcdir)/$(OS) \ + -I$(top_builddir) \ + -I$(top_srcdir) + +AM_LDFLAGS = $(ARCH_MFLAGS) +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + fill_memory.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + libmmsg.c \ + libsocketcall.c \ + overflowuid.c \ + pipe_maxfd.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + signal2name.c \ + sprintrc.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES + +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) +fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mq_LDADD = -lrt $(LDADD) +mq_sendrecv_LDADD = -lrt $(LDADD) +mq_sendrecv_read_LDADD = -lrt $(LDADD) +mq_sendrecv_write_LDADD = -lrt $(LDADD) +newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +threads_execve_LDADD = -lrt -lpthread $(LDADD) +times_LDADD = -lrt $(LDADD) +truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stack_fcall_SOURCES = stack-fcall.c \ + stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c + +LIBUNWIND_TESTS = +#LIBUNWIND_TESTS = strace-k.test +DECODER_TESTS = \ + _newselect.test \ + accept.test \ + accept4.test \ + access.test \ + acct.test \ + add_key.test \ + adjtimex.test \ + aio.test \ + alarm.test \ + bpf.test \ + brk.test \ + btrfs-v.test \ + btrfs-vw.test \ + btrfs-w.test \ + btrfs.test \ + caps-abbrev.test \ + caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ + clock_nanosleep.test \ + clock_xettime.test \ + copy_file_range.test \ + creat.test \ + delete_module.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ + epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ + erestartsys.test \ + eventfd.test \ + execve-v.test \ + execve.test \ + execveat-v.test \ + execveat.test \ + faccessat.test \ + fadvise64.test \ + fadvise64_64.test \ + fallocate.test \ + fanotify_init.test \ + fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ + fcntl.test \ + fcntl64.test \ + fdatasync.test \ + file_handle.test \ + file_ioctl.test \ + finit_module.test \ + flock.test \ + fstat.test \ + fstat64.test \ + fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ + ftruncate.test \ + ftruncate64.test \ + futex.test \ + futimesat.test \ + get_mempolicy.test \ + getcpu.test \ + getcwd.test \ + getdents.test \ + getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpeername.test \ + getpgrp.test \ + getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrlimit.test \ + getrusage.test \ + getsid.test \ + getsockname.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ + inet-cmsg.test \ + init_module.test \ + inotify.test \ + inotify_init1.test \ + ioctl.test \ + ioctl_block.test \ + ioctl_dm-v.test \ + ioctl_dm.test \ + ioctl_evdev-v.test \ + ioctl_evdev.test \ + ioctl_loop-nv.test \ + ioctl_loop-v.test \ + ioctl_loop.test \ + ioctl_mtd.test \ + ioctl_rtc-v.test \ + ioctl_rtc.test \ + ioctl_scsi.test \ + ioctl_sg_io_v3.test \ + ioctl_sg_io_v4.test \ + ioctl_sock_gifconf.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ + ioprio.test \ + ip_mreq.test \ + ipc.test \ + ipc_msg.test \ + ipc_msgbuf.test \ + ipc_sem.test \ + ipc_shm.test \ + kcmp.test \ + kexec_file_load.test \ + kexec_load.test \ + keyctl.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ + llseek.test \ + lookup_dcookie.test \ + lseek.test \ + lstat.test \ + lstat64.test \ + mbind.test \ + membarrier.test \ + memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ + mlock2.test \ + mlockall.test \ + mmap.test \ + mmap64.test \ + mmsg-silent.test \ + mmsg.test \ + mmsg_name-v.test \ + mmsg_name.test \ + mount.test \ + move_pages.test \ + mq.test \ + mq_sendrecv-read.test \ + mq_sendrecv-write.test \ + mq_sendrecv.test \ + msg_control-v.test \ + msg_control.test \ + msg_name.test \ + munlockall.test \ + nanosleep.test \ + net-icmp_filter.test \ + net-sockaddr.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ + net.test \ + netlink_protocol.test \ + newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ + oldfstat.test \ + oldlstat.test \ + oldselect.test \ + oldstat.test \ + open.test \ + openat.test \ + pause.test \ + perf_event_open.test \ + perf_event_open_nonverbose.test \ + perf_event_open_unabbrev.test \ + personality.test \ + pipe.test \ + pipe2.test \ + pkey_alloc.test \ + pkey_free.test \ + pkey_mprotect.test \ + poll.test \ + ppoll.test \ + prctl-arg2-intptr.test \ + prctl-dumpable.test \ + prctl-name.test \ + prctl-no-args.test \ + prctl-pdeathsig.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + prctl-securebits.test \ + prctl-tid_address.test \ + prctl-tsc.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv.test \ + preadv2-pwritev2.test \ + printstr.test \ + prlimit64.test \ + process_vm_readv.test \ + process_vm_writev.test \ + pselect6.test \ + ptrace.test \ + pwritev.test \ + qual_fault-exit_group.test \ + quotactl-v.test \ + quotactl-xfs-v.test \ + quotactl-xfs.test \ + quotactl.test \ + read-write.test \ + readahead.test \ + readdir.test \ + readlink.test \ + readlinkat.test \ + readv.test \ + reboot.test \ + recvfrom.test \ + recvmmsg-timeout.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + request_key.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ + rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ + sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ + scm_rights-fd.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ + select.test \ + semop.test \ + sendfile.test \ + sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setns.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setrlimit.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ + shutdown.test \ + sigaction.test \ + sigaltstack.test \ + siginfo.test \ + signalfd4.test \ + sigreturn.test \ + socketcall.test \ + splice.test \ + stat.test \ + stat64.test \ + statfs.test \ + statfs64.test \ + sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ + sysinfo.test \ + syslog.test \ + tee.test \ + time.test \ + timer_create.test \ + timer_xettime.test \ + timerfd_xettime.test \ + times-fail.test \ + times.test \ + truncate.test \ + truncate64.test \ + ugetrlimit.test \ + uio.test \ + umask.test \ + umount.test \ + umount2.test \ + umoven-illptr.test \ + umovestr-illptr.test \ + umovestr.test \ + umovestr2.test \ + umovestr3.test \ + uname.test \ + unix-pair-send-recv.test \ + unix-pair-sendto-recvfrom.test \ + unlink.test \ + unlinkat.test \ + unshare.test \ + userfaultfd.test \ + ustat.test \ + utime.test \ + utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ + wait4-v.test \ + wait4.test \ + waitid-v.test \ + waitid.test \ + waitpid.test \ + xattr-strings.test \ + xattr.test \ + xet_robust_list.test \ + xetitimer.test \ + xetpgid.test \ + xetpriority.test \ + xettimeofday.test \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ + count.test \ + detach-running.test \ + detach-sleeping.test \ + detach-stopped.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + options-syntax.test \ + pc.test \ + qual_fault-syntax.test \ + qual_fault.test \ + qual_inject-error-signal.test \ + qual_inject-retval.test \ + qual_inject-signal.test \ + qual_inject-syntax.test \ + qual_signal.test \ + qual_syscall.test \ + redirect-fds.test \ + redirect.test \ + restart_syscall.test \ + signal_receive.test \ + strace-C.test \ + strace-E.test \ + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + threads-execve.test \ + vfork-f.test \ + # end of MISC_TESTS + +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) +TEST_LOG_COMPILER = env +AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh +VALGRIND_FLAGS = --quiet +VALGRIND_SUPPRESSIONS_FILES = $(srcdir)/strace.supp +EXTRA_DIST = init.sh run.sh match.awk \ + caps-abbrev.awk \ + caps.awk \ + count-f.expected \ + eventfd.expected \ + fadvise.h \ + filter-unavailable.expected \ + fstatat.c \ + fstatx.c \ + getresugid.c \ + init_delete_module.h \ + ipc.sh \ + ipc_msgbuf.expected \ + ksysent.sed \ + lstatx.c \ + net.expected \ + oldselect.expected \ + pipe.expected \ + ppoll-v.expected \ + ppoll.expected \ + process_vm_readv_writev.c \ + qual_fault-exit_group.expected \ + qual_inject-error-signal.expected \ + qual_inject-signal.expected \ + quotactl.h \ + scno_tampering.sh \ + setfsugid.c \ + setresugid.c \ + setreugid.c \ + setugid.c \ + sigaction.awk \ + sigaltstack.expected \ + sockname.c \ + statfs.expected \ + statx.sh \ + strace-C.expected \ + strace-E.expected \ + strace-T.expected \ + strace-ff.expected \ + strace-k.test \ + strace-r.expected \ + strace.supp \ + struct_flock.c \ + sun_path.expected \ + uio.expected \ + umode_t.c \ + umovestr.expected \ + unix-pair-send-recv.expected \ + unix-pair-sendto-recvfrom.expected \ + xchownx.c \ + xgetrlimit.c \ + xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ + xstatx.c \ + $(TESTS) + +objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT))) +CLEANFILES = ksysent.h $(TESTS:=.tmp) syscallent.i scno.h +SCNO_CPPFLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(ARCH_MFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) + +digits = [[:digit:]][[:digit:]]* +al_nums = [[:alnum:]_][[:alnum:]_]* +SCNO_SED = /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 +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(srcdir)/../scno.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests-m32/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests-m32/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/../scno.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkLIBRARIES: + -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) + +libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtests.a + $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) + $(AM_V_at)$(RANLIB) libtests.a + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) + +_newselect$(EXEEXT): $(_newselect_OBJECTS) $(_newselect_DEPENDENCIES) $(EXTRA__newselect_DEPENDENCIES) + @rm -f _newselect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(_newselect_OBJECTS) $(_newselect_LDADD) $(LIBS) + +accept$(EXEEXT): $(accept_OBJECTS) $(accept_DEPENDENCIES) $(EXTRA_accept_DEPENDENCIES) + @rm -f accept$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(accept_OBJECTS) $(accept_LDADD) $(LIBS) + +accept4$(EXEEXT): $(accept4_OBJECTS) $(accept4_DEPENDENCIES) $(EXTRA_accept4_DEPENDENCIES) + @rm -f accept4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(accept4_OBJECTS) $(accept4_LDADD) $(LIBS) + +access$(EXEEXT): $(access_OBJECTS) $(access_DEPENDENCIES) $(EXTRA_access_DEPENDENCIES) + @rm -f access$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(access_OBJECTS) $(access_LDADD) $(LIBS) + +acct$(EXEEXT): $(acct_OBJECTS) $(acct_DEPENDENCIES) $(EXTRA_acct_DEPENDENCIES) + @rm -f acct$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(acct_OBJECTS) $(acct_LDADD) $(LIBS) + +add_key$(EXEEXT): $(add_key_OBJECTS) $(add_key_DEPENDENCIES) $(EXTRA_add_key_DEPENDENCIES) + @rm -f add_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(add_key_OBJECTS) $(add_key_LDADD) $(LIBS) + +adjtimex$(EXEEXT): $(adjtimex_OBJECTS) $(adjtimex_DEPENDENCIES) $(EXTRA_adjtimex_DEPENDENCIES) + @rm -f adjtimex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(adjtimex_OBJECTS) $(adjtimex_LDADD) $(LIBS) + +aio$(EXEEXT): $(aio_OBJECTS) $(aio_DEPENDENCIES) $(EXTRA_aio_DEPENDENCIES) + @rm -f aio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(aio_OBJECTS) $(aio_LDADD) $(LIBS) + +alarm$(EXEEXT): $(alarm_OBJECTS) $(alarm_DEPENDENCIES) $(EXTRA_alarm_DEPENDENCIES) + @rm -f alarm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(alarm_OBJECTS) $(alarm_LDADD) $(LIBS) + +answer$(EXEEXT): $(answer_OBJECTS) $(answer_DEPENDENCIES) $(EXTRA_answer_DEPENDENCIES) + @rm -f answer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(answer_OBJECTS) $(answer_LDADD) $(LIBS) + +attach-f-p$(EXEEXT): $(attach_f_p_OBJECTS) $(attach_f_p_DEPENDENCIES) $(EXTRA_attach_f_p_DEPENDENCIES) + @rm -f attach-f-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_OBJECTS) $(attach_f_p_LDADD) $(LIBS) + +attach-f-p-cmd$(EXEEXT): $(attach_f_p_cmd_OBJECTS) $(attach_f_p_cmd_DEPENDENCIES) $(EXTRA_attach_f_p_cmd_DEPENDENCIES) + @rm -f attach-f-p-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_cmd_OBJECTS) $(attach_f_p_cmd_LDADD) $(LIBS) + +attach-p-cmd-cmd$(EXEEXT): $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_DEPENDENCIES) $(EXTRA_attach_p_cmd_cmd_DEPENDENCIES) + @rm -f attach-p-cmd-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_LDADD) $(LIBS) + +attach-p-cmd-p$(EXEEXT): $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_DEPENDENCIES) $(EXTRA_attach_p_cmd_p_DEPENDENCIES) + @rm -f attach-p-cmd-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_LDADD) $(LIBS) + +bpf$(EXEEXT): $(bpf_OBJECTS) $(bpf_DEPENDENCIES) $(EXTRA_bpf_DEPENDENCIES) + @rm -f bpf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(bpf_OBJECTS) $(bpf_LDADD) $(LIBS) + +brk$(EXEEXT): $(brk_OBJECTS) $(brk_DEPENDENCIES) $(EXTRA_brk_DEPENDENCIES) + @rm -f brk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(brk_OBJECTS) $(brk_LDADD) $(LIBS) + +btrfs$(EXEEXT): $(btrfs_OBJECTS) $(btrfs_DEPENDENCIES) $(EXTRA_btrfs_DEPENDENCIES) + @rm -f btrfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(btrfs_OBJECTS) $(btrfs_LDADD) $(LIBS) + +caps$(EXEEXT): $(caps_OBJECTS) $(caps_DEPENDENCIES) $(EXTRA_caps_DEPENDENCIES) + @rm -f caps$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(caps_OBJECTS) $(caps_LDADD) $(LIBS) + +caps-abbrev$(EXEEXT): $(caps_abbrev_OBJECTS) $(caps_abbrev_DEPENDENCIES) $(EXTRA_caps_abbrev_DEPENDENCIES) + @rm -f caps-abbrev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(caps_abbrev_OBJECTS) $(caps_abbrev_LDADD) $(LIBS) + +chmod$(EXEEXT): $(chmod_OBJECTS) $(chmod_DEPENDENCIES) $(EXTRA_chmod_DEPENDENCIES) + @rm -f chmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chmod_OBJECTS) $(chmod_LDADD) $(LIBS) + +chown$(EXEEXT): $(chown_OBJECTS) $(chown_DEPENDENCIES) $(EXTRA_chown_DEPENDENCIES) + @rm -f chown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown_OBJECTS) $(chown_LDADD) $(LIBS) + +chown32$(EXEEXT): $(chown32_OBJECTS) $(chown32_DEPENDENCIES) $(EXTRA_chown32_DEPENDENCIES) + @rm -f chown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown32_OBJECTS) $(chown32_LDADD) $(LIBS) + +chroot$(EXEEXT): $(chroot_OBJECTS) $(chroot_DEPENDENCIES) $(EXTRA_chroot_DEPENDENCIES) + @rm -f chroot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chroot_OBJECTS) $(chroot_LDADD) $(LIBS) + +clock_adjtime$(EXEEXT): $(clock_adjtime_OBJECTS) $(clock_adjtime_DEPENDENCIES) $(EXTRA_clock_adjtime_DEPENDENCIES) + @rm -f clock_adjtime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_adjtime_OBJECTS) $(clock_adjtime_LDADD) $(LIBS) + +clock_nanosleep$(EXEEXT): $(clock_nanosleep_OBJECTS) $(clock_nanosleep_DEPENDENCIES) $(EXTRA_clock_nanosleep_DEPENDENCIES) + @rm -f clock_nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_nanosleep_OBJECTS) $(clock_nanosleep_LDADD) $(LIBS) + +clock_xettime$(EXEEXT): $(clock_xettime_OBJECTS) $(clock_xettime_DEPENDENCIES) $(EXTRA_clock_xettime_DEPENDENCIES) + @rm -f clock_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_xettime_OBJECTS) $(clock_xettime_LDADD) $(LIBS) + +copy_file_range$(EXEEXT): $(copy_file_range_OBJECTS) $(copy_file_range_DEPENDENCIES) $(EXTRA_copy_file_range_DEPENDENCIES) + @rm -f copy_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(copy_file_range_OBJECTS) $(copy_file_range_LDADD) $(LIBS) + +count-f$(EXEEXT): $(count_f_OBJECTS) $(count_f_DEPENDENCIES) $(EXTRA_count_f_DEPENDENCIES) + @rm -f count-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(count_f_OBJECTS) $(count_f_LDADD) $(LIBS) + +creat$(EXEEXT): $(creat_OBJECTS) $(creat_DEPENDENCIES) $(EXTRA_creat_DEPENDENCIES) + @rm -f creat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(creat_OBJECTS) $(creat_LDADD) $(LIBS) + +delete_module$(EXEEXT): $(delete_module_OBJECTS) $(delete_module_DEPENDENCIES) $(EXTRA_delete_module_DEPENDENCIES) + @rm -f delete_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(delete_module_OBJECTS) $(delete_module_LDADD) $(LIBS) + +dup$(EXEEXT): $(dup_OBJECTS) $(dup_DEPENDENCIES) $(EXTRA_dup_DEPENDENCIES) + @rm -f dup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup_OBJECTS) $(dup_LDADD) $(LIBS) + +dup2$(EXEEXT): $(dup2_OBJECTS) $(dup2_DEPENDENCIES) $(EXTRA_dup2_DEPENDENCIES) + @rm -f dup2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup2_OBJECTS) $(dup2_LDADD) $(LIBS) + +dup3$(EXEEXT): $(dup3_OBJECTS) $(dup3_DEPENDENCIES) $(EXTRA_dup3_DEPENDENCIES) + @rm -f dup3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup3_OBJECTS) $(dup3_LDADD) $(LIBS) + +epoll_create$(EXEEXT): $(epoll_create_OBJECTS) $(epoll_create_DEPENDENCIES) $(EXTRA_epoll_create_DEPENDENCIES) + @rm -f epoll_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create_OBJECTS) $(epoll_create_LDADD) $(LIBS) + +epoll_create1$(EXEEXT): $(epoll_create1_OBJECTS) $(epoll_create1_DEPENDENCIES) $(EXTRA_epoll_create1_DEPENDENCIES) + @rm -f epoll_create1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create1_OBJECTS) $(epoll_create1_LDADD) $(LIBS) + +epoll_ctl$(EXEEXT): $(epoll_ctl_OBJECTS) $(epoll_ctl_DEPENDENCIES) $(EXTRA_epoll_ctl_DEPENDENCIES) + @rm -f epoll_ctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_ctl_OBJECTS) $(epoll_ctl_LDADD) $(LIBS) + +epoll_pwait$(EXEEXT): $(epoll_pwait_OBJECTS) $(epoll_pwait_DEPENDENCIES) $(EXTRA_epoll_pwait_DEPENDENCIES) + @rm -f epoll_pwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_pwait_OBJECTS) $(epoll_pwait_LDADD) $(LIBS) + +epoll_wait$(EXEEXT): $(epoll_wait_OBJECTS) $(epoll_wait_DEPENDENCIES) $(EXTRA_epoll_wait_DEPENDENCIES) + @rm -f epoll_wait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_wait_OBJECTS) $(epoll_wait_LDADD) $(LIBS) + +erestartsys$(EXEEXT): $(erestartsys_OBJECTS) $(erestartsys_DEPENDENCIES) $(EXTRA_erestartsys_DEPENDENCIES) + @rm -f erestartsys$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(erestartsys_OBJECTS) $(erestartsys_LDADD) $(LIBS) + +eventfd$(EXEEXT): $(eventfd_OBJECTS) $(eventfd_DEPENDENCIES) $(EXTRA_eventfd_DEPENDENCIES) + @rm -f eventfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(eventfd_OBJECTS) $(eventfd_LDADD) $(LIBS) + +execve$(EXEEXT): $(execve_OBJECTS) $(execve_DEPENDENCIES) $(EXTRA_execve_DEPENDENCIES) + @rm -f execve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_OBJECTS) $(execve_LDADD) $(LIBS) + +execve-v$(EXEEXT): $(execve_v_OBJECTS) $(execve_v_DEPENDENCIES) $(EXTRA_execve_v_DEPENDENCIES) + @rm -f execve-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_v_OBJECTS) $(execve_v_LDADD) $(LIBS) + +execveat$(EXEEXT): $(execveat_OBJECTS) $(execveat_DEPENDENCIES) $(EXTRA_execveat_DEPENDENCIES) + @rm -f execveat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_OBJECTS) $(execveat_LDADD) $(LIBS) + +execveat-v$(EXEEXT): $(execveat_v_OBJECTS) $(execveat_v_DEPENDENCIES) $(EXTRA_execveat_v_DEPENDENCIES) + @rm -f execveat-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_v_OBJECTS) $(execveat_v_LDADD) $(LIBS) + +faccessat$(EXEEXT): $(faccessat_OBJECTS) $(faccessat_DEPENDENCIES) $(EXTRA_faccessat_DEPENDENCIES) + @rm -f faccessat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(faccessat_OBJECTS) $(faccessat_LDADD) $(LIBS) + +fadvise64$(EXEEXT): $(fadvise64_OBJECTS) $(fadvise64_DEPENDENCIES) $(EXTRA_fadvise64_DEPENDENCIES) + @rm -f fadvise64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fadvise64_OBJECTS) $(fadvise64_LDADD) $(LIBS) + +fadvise64_64$(EXEEXT): $(fadvise64_64_OBJECTS) $(fadvise64_64_DEPENDENCIES) $(EXTRA_fadvise64_64_DEPENDENCIES) + @rm -f fadvise64_64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fadvise64_64_OBJECTS) $(fadvise64_64_LDADD) $(LIBS) + +fallocate$(EXEEXT): $(fallocate_OBJECTS) $(fallocate_DEPENDENCIES) $(EXTRA_fallocate_DEPENDENCIES) + @rm -f fallocate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fallocate_OBJECTS) $(fallocate_LDADD) $(LIBS) + +fanotify_init$(EXEEXT): $(fanotify_init_OBJECTS) $(fanotify_init_DEPENDENCIES) $(EXTRA_fanotify_init_DEPENDENCIES) + @rm -f fanotify_init$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fanotify_init_OBJECTS) $(fanotify_init_LDADD) $(LIBS) + +fanotify_mark$(EXEEXT): $(fanotify_mark_OBJECTS) $(fanotify_mark_DEPENDENCIES) $(EXTRA_fanotify_mark_DEPENDENCIES) + @rm -f fanotify_mark$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fanotify_mark_OBJECTS) $(fanotify_mark_LDADD) $(LIBS) + +fchdir$(EXEEXT): $(fchdir_OBJECTS) $(fchdir_DEPENDENCIES) $(EXTRA_fchdir_DEPENDENCIES) + @rm -f fchdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchdir_OBJECTS) $(fchdir_LDADD) $(LIBS) + +fchmod$(EXEEXT): $(fchmod_OBJECTS) $(fchmod_DEPENDENCIES) $(EXTRA_fchmod_DEPENDENCIES) + @rm -f fchmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmod_OBJECTS) $(fchmod_LDADD) $(LIBS) + +fchmodat$(EXEEXT): $(fchmodat_OBJECTS) $(fchmodat_DEPENDENCIES) $(EXTRA_fchmodat_DEPENDENCIES) + @rm -f fchmodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmodat_OBJECTS) $(fchmodat_LDADD) $(LIBS) + +fchown$(EXEEXT): $(fchown_OBJECTS) $(fchown_DEPENDENCIES) $(EXTRA_fchown_DEPENDENCIES) + @rm -f fchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown_OBJECTS) $(fchown_LDADD) $(LIBS) + +fchown32$(EXEEXT): $(fchown32_OBJECTS) $(fchown32_DEPENDENCIES) $(EXTRA_fchown32_DEPENDENCIES) + @rm -f fchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown32_OBJECTS) $(fchown32_LDADD) $(LIBS) + +fchownat$(EXEEXT): $(fchownat_OBJECTS) $(fchownat_DEPENDENCIES) $(EXTRA_fchownat_DEPENDENCIES) + @rm -f fchownat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchownat_OBJECTS) $(fchownat_LDADD) $(LIBS) + +fcntl$(EXEEXT): $(fcntl_OBJECTS) $(fcntl_DEPENDENCIES) $(EXTRA_fcntl_DEPENDENCIES) + @rm -f fcntl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcntl_OBJECTS) $(fcntl_LDADD) $(LIBS) + +fcntl64$(EXEEXT): $(fcntl64_OBJECTS) $(fcntl64_DEPENDENCIES) $(EXTRA_fcntl64_DEPENDENCIES) + @rm -f fcntl64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcntl64_OBJECTS) $(fcntl64_LDADD) $(LIBS) + +fdatasync$(EXEEXT): $(fdatasync_OBJECTS) $(fdatasync_DEPENDENCIES) $(EXTRA_fdatasync_DEPENDENCIES) + @rm -f fdatasync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fdatasync_OBJECTS) $(fdatasync_LDADD) $(LIBS) + +file_handle$(EXEEXT): $(file_handle_OBJECTS) $(file_handle_DEPENDENCIES) $(EXTRA_file_handle_DEPENDENCIES) + @rm -f file_handle$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_handle_OBJECTS) $(file_handle_LDADD) $(LIBS) + +file_ioctl$(EXEEXT): $(file_ioctl_OBJECTS) $(file_ioctl_DEPENDENCIES) $(EXTRA_file_ioctl_DEPENDENCIES) + @rm -f file_ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_ioctl_OBJECTS) $(file_ioctl_LDADD) $(LIBS) + +filter-unavailable$(EXEEXT): $(filter_unavailable_OBJECTS) $(filter_unavailable_DEPENDENCIES) $(EXTRA_filter_unavailable_DEPENDENCIES) + @rm -f filter-unavailable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(filter_unavailable_OBJECTS) $(filter_unavailable_LDADD) $(LIBS) + +finit_module$(EXEEXT): $(finit_module_OBJECTS) $(finit_module_DEPENDENCIES) $(EXTRA_finit_module_DEPENDENCIES) + @rm -f finit_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(finit_module_OBJECTS) $(finit_module_LDADD) $(LIBS) + +flock$(EXEEXT): $(flock_OBJECTS) $(flock_DEPENDENCIES) $(EXTRA_flock_DEPENDENCIES) + @rm -f flock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(flock_OBJECTS) $(flock_LDADD) $(LIBS) + +fork-f$(EXEEXT): $(fork_f_OBJECTS) $(fork_f_DEPENDENCIES) $(EXTRA_fork_f_DEPENDENCIES) + @rm -f fork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fork_f_OBJECTS) $(fork_f_LDADD) $(LIBS) + +fstat$(EXEEXT): $(fstat_OBJECTS) $(fstat_DEPENDENCIES) $(EXTRA_fstat_DEPENDENCIES) + @rm -f fstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstat_OBJECTS) $(fstat_LDADD) $(LIBS) + +fstat64$(EXEEXT): $(fstat64_OBJECTS) $(fstat64_DEPENDENCIES) $(EXTRA_fstat64_DEPENDENCIES) + @rm -f fstat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstat64_OBJECTS) $(fstat64_LDADD) $(LIBS) + +fstatat64$(EXEEXT): $(fstatat64_OBJECTS) $(fstatat64_DEPENDENCIES) $(EXTRA_fstatat64_DEPENDENCIES) + @rm -f fstatat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatat64_OBJECTS) $(fstatat64_LDADD) $(LIBS) + +fstatfs$(EXEEXT): $(fstatfs_OBJECTS) $(fstatfs_DEPENDENCIES) $(EXTRA_fstatfs_DEPENDENCIES) + @rm -f fstatfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs_OBJECTS) $(fstatfs_LDADD) $(LIBS) + +fstatfs64$(EXEEXT): $(fstatfs64_OBJECTS) $(fstatfs64_DEPENDENCIES) $(EXTRA_fstatfs64_DEPENDENCIES) + @rm -f fstatfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs64_OBJECTS) $(fstatfs64_LDADD) $(LIBS) + +fsync$(EXEEXT): $(fsync_OBJECTS) $(fsync_DEPENDENCIES) $(EXTRA_fsync_DEPENDENCIES) + @rm -f fsync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fsync_OBJECTS) $(fsync_LDADD) $(LIBS) + +ftruncate$(EXEEXT): $(ftruncate_OBJECTS) $(ftruncate_DEPENDENCIES) $(EXTRA_ftruncate_DEPENDENCIES) + @rm -f ftruncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftruncate_OBJECTS) $(ftruncate_LDADD) $(LIBS) + +ftruncate64$(EXEEXT): $(ftruncate64_OBJECTS) $(ftruncate64_DEPENDENCIES) $(EXTRA_ftruncate64_DEPENDENCIES) + @rm -f ftruncate64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftruncate64_OBJECTS) $(ftruncate64_LDADD) $(LIBS) + +futex$(EXEEXT): $(futex_OBJECTS) $(futex_DEPENDENCIES) $(EXTRA_futex_DEPENDENCIES) + @rm -f futex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futex_OBJECTS) $(futex_LDADD) $(LIBS) + +futimesat$(EXEEXT): $(futimesat_OBJECTS) $(futimesat_DEPENDENCIES) $(EXTRA_futimesat_DEPENDENCIES) + @rm -f futimesat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futimesat_OBJECTS) $(futimesat_LDADD) $(LIBS) + +get_mempolicy$(EXEEXT): $(get_mempolicy_OBJECTS) $(get_mempolicy_DEPENDENCIES) $(EXTRA_get_mempolicy_DEPENDENCIES) + @rm -f get_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(get_mempolicy_OBJECTS) $(get_mempolicy_LDADD) $(LIBS) + +getcpu$(EXEEXT): $(getcpu_OBJECTS) $(getcpu_DEPENDENCIES) $(EXTRA_getcpu_DEPENDENCIES) + @rm -f getcpu$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcpu_OBJECTS) $(getcpu_LDADD) $(LIBS) + +getcwd$(EXEEXT): $(getcwd_OBJECTS) $(getcwd_DEPENDENCIES) $(EXTRA_getcwd_DEPENDENCIES) + @rm -f getcwd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcwd_OBJECTS) $(getcwd_LDADD) $(LIBS) + +getdents$(EXEEXT): $(getdents_OBJECTS) $(getdents_DEPENDENCIES) $(EXTRA_getdents_DEPENDENCIES) + @rm -f getdents$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getdents_OBJECTS) $(getdents_LDADD) $(LIBS) + +getdents64$(EXEEXT): $(getdents64_OBJECTS) $(getdents64_DEPENDENCIES) $(EXTRA_getdents64_DEPENDENCIES) + @rm -f getdents64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getdents64_OBJECTS) $(getdents64_LDADD) $(LIBS) + +getegid$(EXEEXT): $(getegid_OBJECTS) $(getegid_DEPENDENCIES) $(EXTRA_getegid_DEPENDENCIES) + @rm -f getegid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid_OBJECTS) $(getegid_LDADD) $(LIBS) + +getegid32$(EXEEXT): $(getegid32_OBJECTS) $(getegid32_DEPENDENCIES) $(EXTRA_getegid32_DEPENDENCIES) + @rm -f getegid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid32_OBJECTS) $(getegid32_LDADD) $(LIBS) + +geteuid$(EXEEXT): $(geteuid_OBJECTS) $(geteuid_DEPENDENCIES) $(EXTRA_geteuid_DEPENDENCIES) + @rm -f geteuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid_OBJECTS) $(geteuid_LDADD) $(LIBS) + +geteuid32$(EXEEXT): $(geteuid32_OBJECTS) $(geteuid32_DEPENDENCIES) $(EXTRA_geteuid32_DEPENDENCIES) + @rm -f geteuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid32_OBJECTS) $(geteuid32_LDADD) $(LIBS) + +getgid$(EXEEXT): $(getgid_OBJECTS) $(getgid_DEPENDENCIES) $(EXTRA_getgid_DEPENDENCIES) + @rm -f getgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid_OBJECTS) $(getgid_LDADD) $(LIBS) + +getgid32$(EXEEXT): $(getgid32_OBJECTS) $(getgid32_DEPENDENCIES) $(EXTRA_getgid32_DEPENDENCIES) + @rm -f getgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid32_OBJECTS) $(getgid32_LDADD) $(LIBS) + +getgroups$(EXEEXT): $(getgroups_OBJECTS) $(getgroups_DEPENDENCIES) $(EXTRA_getgroups_DEPENDENCIES) + @rm -f getgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups_OBJECTS) $(getgroups_LDADD) $(LIBS) + +getgroups32$(EXEEXT): $(getgroups32_OBJECTS) $(getgroups32_DEPENDENCIES) $(EXTRA_getgroups32_DEPENDENCIES) + @rm -f getgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups32_OBJECTS) $(getgroups32_LDADD) $(LIBS) + +getpeername$(EXEEXT): $(getpeername_OBJECTS) $(getpeername_DEPENDENCIES) $(EXTRA_getpeername_DEPENDENCIES) + @rm -f getpeername$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpeername_OBJECTS) $(getpeername_LDADD) $(LIBS) + +getpgrp$(EXEEXT): $(getpgrp_OBJECTS) $(getpgrp_DEPENDENCIES) $(EXTRA_getpgrp_DEPENDENCIES) + @rm -f getpgrp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpgrp_OBJECTS) $(getpgrp_LDADD) $(LIBS) + +getrandom$(EXEEXT): $(getrandom_OBJECTS) $(getrandom_DEPENDENCIES) $(EXTRA_getrandom_DEPENDENCIES) + @rm -f getrandom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrandom_OBJECTS) $(getrandom_LDADD) $(LIBS) + +getresgid$(EXEEXT): $(getresgid_OBJECTS) $(getresgid_DEPENDENCIES) $(EXTRA_getresgid_DEPENDENCIES) + @rm -f getresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid_OBJECTS) $(getresgid_LDADD) $(LIBS) + +getresgid32$(EXEEXT): $(getresgid32_OBJECTS) $(getresgid32_DEPENDENCIES) $(EXTRA_getresgid32_DEPENDENCIES) + @rm -f getresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid32_OBJECTS) $(getresgid32_LDADD) $(LIBS) + +getresuid$(EXEEXT): $(getresuid_OBJECTS) $(getresuid_DEPENDENCIES) $(EXTRA_getresuid_DEPENDENCIES) + @rm -f getresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid_OBJECTS) $(getresuid_LDADD) $(LIBS) + +getresuid32$(EXEEXT): $(getresuid32_OBJECTS) $(getresuid32_DEPENDENCIES) $(EXTRA_getresuid32_DEPENDENCIES) + @rm -f getresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid32_OBJECTS) $(getresuid32_LDADD) $(LIBS) + +getrlimit$(EXEEXT): $(getrlimit_OBJECTS) $(getrlimit_DEPENDENCIES) $(EXTRA_getrlimit_DEPENDENCIES) + @rm -f getrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrlimit_OBJECTS) $(getrlimit_LDADD) $(LIBS) + +getrusage$(EXEEXT): $(getrusage_OBJECTS) $(getrusage_DEPENDENCIES) $(EXTRA_getrusage_DEPENDENCIES) + @rm -f getrusage$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrusage_OBJECTS) $(getrusage_LDADD) $(LIBS) + +getsid$(EXEEXT): $(getsid_OBJECTS) $(getsid_DEPENDENCIES) $(EXTRA_getsid_DEPENDENCIES) + @rm -f getsid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsid_OBJECTS) $(getsid_LDADD) $(LIBS) + +getsockname$(EXEEXT): $(getsockname_OBJECTS) $(getsockname_DEPENDENCIES) $(EXTRA_getsockname_DEPENDENCIES) + @rm -f getsockname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsockname_OBJECTS) $(getsockname_LDADD) $(LIBS) + +getuid$(EXEEXT): $(getuid_OBJECTS) $(getuid_DEPENDENCIES) $(EXTRA_getuid_DEPENDENCIES) + @rm -f getuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid_OBJECTS) $(getuid_LDADD) $(LIBS) + +getuid32$(EXEEXT): $(getuid32_OBJECTS) $(getuid32_DEPENDENCIES) $(EXTRA_getuid32_DEPENDENCIES) + @rm -f getuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid32_OBJECTS) $(getuid32_LDADD) $(LIBS) + +getxxid$(EXEEXT): $(getxxid_OBJECTS) $(getxxid_DEPENDENCIES) $(EXTRA_getxxid_DEPENDENCIES) + @rm -f getxxid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getxxid_OBJECTS) $(getxxid_LDADD) $(LIBS) + +inet-cmsg$(EXEEXT): $(inet_cmsg_OBJECTS) $(inet_cmsg_DEPENDENCIES) $(EXTRA_inet_cmsg_DEPENDENCIES) + @rm -f inet-cmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inet_cmsg_OBJECTS) $(inet_cmsg_LDADD) $(LIBS) + +init_module$(EXEEXT): $(init_module_OBJECTS) $(init_module_DEPENDENCIES) $(EXTRA_init_module_DEPENDENCIES) + @rm -f init_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(init_module_OBJECTS) $(init_module_LDADD) $(LIBS) + +inotify$(EXEEXT): $(inotify_OBJECTS) $(inotify_DEPENDENCIES) $(EXTRA_inotify_DEPENDENCIES) + @rm -f inotify$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inotify_OBJECTS) $(inotify_LDADD) $(LIBS) + +inotify_init1$(EXEEXT): $(inotify_init1_OBJECTS) $(inotify_init1_DEPENDENCIES) $(EXTRA_inotify_init1_DEPENDENCIES) + @rm -f inotify_init1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inotify_init1_OBJECTS) $(inotify_init1_LDADD) $(LIBS) + +ioctl$(EXEEXT): $(ioctl_OBJECTS) $(ioctl_DEPENDENCIES) $(EXTRA_ioctl_DEPENDENCIES) + @rm -f ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_OBJECTS) $(ioctl_LDADD) $(LIBS) + +ioctl_block$(EXEEXT): $(ioctl_block_OBJECTS) $(ioctl_block_DEPENDENCIES) $(EXTRA_ioctl_block_DEPENDENCIES) + @rm -f ioctl_block$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_block_OBJECTS) $(ioctl_block_LDADD) $(LIBS) + +ioctl_dm$(EXEEXT): $(ioctl_dm_OBJECTS) $(ioctl_dm_DEPENDENCIES) $(EXTRA_ioctl_dm_DEPENDENCIES) + @rm -f ioctl_dm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_dm_OBJECTS) $(ioctl_dm_LDADD) $(LIBS) + +ioctl_dm-v$(EXEEXT): $(ioctl_dm_v_OBJECTS) $(ioctl_dm_v_DEPENDENCIES) $(EXTRA_ioctl_dm_v_DEPENDENCIES) + @rm -f ioctl_dm-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_dm_v_OBJECTS) $(ioctl_dm_v_LDADD) $(LIBS) + +ioctl_evdev$(EXEEXT): $(ioctl_evdev_OBJECTS) $(ioctl_evdev_DEPENDENCIES) $(EXTRA_ioctl_evdev_DEPENDENCIES) + @rm -f ioctl_evdev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_OBJECTS) $(ioctl_evdev_LDADD) $(LIBS) + +ioctl_evdev-v$(EXEEXT): $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_DEPENDENCIES) $(EXTRA_ioctl_evdev_v_DEPENDENCIES) + @rm -f ioctl_evdev-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_LDADD) $(LIBS) + +ioctl_loop$(EXEEXT): $(ioctl_loop_OBJECTS) $(ioctl_loop_DEPENDENCIES) $(EXTRA_ioctl_loop_DEPENDENCIES) + @rm -f ioctl_loop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_OBJECTS) $(ioctl_loop_LDADD) $(LIBS) + +ioctl_loop-nv$(EXEEXT): $(ioctl_loop_nv_OBJECTS) $(ioctl_loop_nv_DEPENDENCIES) $(EXTRA_ioctl_loop_nv_DEPENDENCIES) + @rm -f ioctl_loop-nv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_nv_OBJECTS) $(ioctl_loop_nv_LDADD) $(LIBS) + +ioctl_loop-v$(EXEEXT): $(ioctl_loop_v_OBJECTS) $(ioctl_loop_v_DEPENDENCIES) $(EXTRA_ioctl_loop_v_DEPENDENCIES) + @rm -f ioctl_loop-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_v_OBJECTS) $(ioctl_loop_v_LDADD) $(LIBS) + +ioctl_mtd$(EXEEXT): $(ioctl_mtd_OBJECTS) $(ioctl_mtd_DEPENDENCIES) $(EXTRA_ioctl_mtd_DEPENDENCIES) + @rm -f ioctl_mtd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_mtd_OBJECTS) $(ioctl_mtd_LDADD) $(LIBS) + +ioctl_rtc$(EXEEXT): $(ioctl_rtc_OBJECTS) $(ioctl_rtc_DEPENDENCIES) $(EXTRA_ioctl_rtc_DEPENDENCIES) + @rm -f ioctl_rtc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_OBJECTS) $(ioctl_rtc_LDADD) $(LIBS) + +ioctl_rtc-v$(EXEEXT): $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_DEPENDENCIES) $(EXTRA_ioctl_rtc_v_DEPENDENCIES) + @rm -f ioctl_rtc-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_LDADD) $(LIBS) + +ioctl_scsi$(EXEEXT): $(ioctl_scsi_OBJECTS) $(ioctl_scsi_DEPENDENCIES) $(EXTRA_ioctl_scsi_DEPENDENCIES) + @rm -f ioctl_scsi$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_scsi_OBJECTS) $(ioctl_scsi_LDADD) $(LIBS) + +ioctl_sg_io_v3$(EXEEXT): $(ioctl_sg_io_v3_OBJECTS) $(ioctl_sg_io_v3_DEPENDENCIES) $(EXTRA_ioctl_sg_io_v3_DEPENDENCIES) + @rm -f ioctl_sg_io_v3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sg_io_v3_OBJECTS) $(ioctl_sg_io_v3_LDADD) $(LIBS) + +ioctl_sg_io_v4$(EXEEXT): $(ioctl_sg_io_v4_OBJECTS) $(ioctl_sg_io_v4_DEPENDENCIES) $(EXTRA_ioctl_sg_io_v4_DEPENDENCIES) + @rm -f ioctl_sg_io_v4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sg_io_v4_OBJECTS) $(ioctl_sg_io_v4_LDADD) $(LIBS) + +ioctl_sock_gifconf$(EXEEXT): $(ioctl_sock_gifconf_OBJECTS) $(ioctl_sock_gifconf_DEPENDENCIES) $(EXTRA_ioctl_sock_gifconf_DEPENDENCIES) + @rm -f ioctl_sock_gifconf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sock_gifconf_OBJECTS) $(ioctl_sock_gifconf_LDADD) $(LIBS) + +ioctl_uffdio$(EXEEXT): $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_DEPENDENCIES) $(EXTRA_ioctl_uffdio_DEPENDENCIES) + @rm -f ioctl_uffdio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_LDADD) $(LIBS) + +ioctl_v4l2$(EXEEXT): $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_DEPENDENCIES) $(EXTRA_ioctl_v4l2_DEPENDENCIES) + @rm -f ioctl_v4l2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_LDADD) $(LIBS) + +ioperm$(EXEEXT): $(ioperm_OBJECTS) $(ioperm_DEPENDENCIES) $(EXTRA_ioperm_DEPENDENCIES) + @rm -f ioperm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioperm_OBJECTS) $(ioperm_LDADD) $(LIBS) + +iopl$(EXEEXT): $(iopl_OBJECTS) $(iopl_DEPENDENCIES) $(EXTRA_iopl_DEPENDENCIES) + @rm -f iopl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(iopl_OBJECTS) $(iopl_LDADD) $(LIBS) + +ioprio$(EXEEXT): $(ioprio_OBJECTS) $(ioprio_DEPENDENCIES) $(EXTRA_ioprio_DEPENDENCIES) + @rm -f ioprio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioprio_OBJECTS) $(ioprio_LDADD) $(LIBS) + +ip_mreq$(EXEEXT): $(ip_mreq_OBJECTS) $(ip_mreq_DEPENDENCIES) $(EXTRA_ip_mreq_DEPENDENCIES) + @rm -f ip_mreq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ip_mreq_OBJECTS) $(ip_mreq_LDADD) $(LIBS) + +ipc$(EXEEXT): $(ipc_OBJECTS) $(ipc_DEPENDENCIES) $(EXTRA_ipc_DEPENDENCIES) + @rm -f ipc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_OBJECTS) $(ipc_LDADD) $(LIBS) + +ipc_msg$(EXEEXT): $(ipc_msg_OBJECTS) $(ipc_msg_DEPENDENCIES) $(EXTRA_ipc_msg_DEPENDENCIES) + @rm -f ipc_msg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_msg_OBJECTS) $(ipc_msg_LDADD) $(LIBS) + +ipc_msgbuf$(EXEEXT): $(ipc_msgbuf_OBJECTS) $(ipc_msgbuf_DEPENDENCIES) $(EXTRA_ipc_msgbuf_DEPENDENCIES) + @rm -f ipc_msgbuf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_msgbuf_OBJECTS) $(ipc_msgbuf_LDADD) $(LIBS) + +ipc_sem$(EXEEXT): $(ipc_sem_OBJECTS) $(ipc_sem_DEPENDENCIES) $(EXTRA_ipc_sem_DEPENDENCIES) + @rm -f ipc_sem$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_sem_OBJECTS) $(ipc_sem_LDADD) $(LIBS) + +ipc_shm$(EXEEXT): $(ipc_shm_OBJECTS) $(ipc_shm_DEPENDENCIES) $(EXTRA_ipc_shm_DEPENDENCIES) + @rm -f ipc_shm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_shm_OBJECTS) $(ipc_shm_LDADD) $(LIBS) + +kcmp$(EXEEXT): $(kcmp_OBJECTS) $(kcmp_DEPENDENCIES) $(EXTRA_kcmp_DEPENDENCIES) + @rm -f kcmp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kcmp_OBJECTS) $(kcmp_LDADD) $(LIBS) + +kexec_file_load$(EXEEXT): $(kexec_file_load_OBJECTS) $(kexec_file_load_DEPENDENCIES) $(EXTRA_kexec_file_load_DEPENDENCIES) + @rm -f kexec_file_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kexec_file_load_OBJECTS) $(kexec_file_load_LDADD) $(LIBS) + +kexec_load$(EXEEXT): $(kexec_load_OBJECTS) $(kexec_load_DEPENDENCIES) $(EXTRA_kexec_load_DEPENDENCIES) + @rm -f kexec_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kexec_load_OBJECTS) $(kexec_load_LDADD) $(LIBS) + +keyctl$(EXEEXT): $(keyctl_OBJECTS) $(keyctl_DEPENDENCIES) $(EXTRA_keyctl_DEPENDENCIES) + @rm -f keyctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(keyctl_OBJECTS) $(keyctl_LDADD) $(LIBS) + +kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES) $(EXTRA_kill_DEPENDENCIES) + @rm -f kill$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kill_OBJECTS) $(kill_LDADD) $(LIBS) + +ksysent$(EXEEXT): $(ksysent_OBJECTS) $(ksysent_DEPENDENCIES) $(EXTRA_ksysent_DEPENDENCIES) + @rm -f ksysent$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ksysent_OBJECTS) $(ksysent_LDADD) $(LIBS) + +lchown$(EXEEXT): $(lchown_OBJECTS) $(lchown_DEPENDENCIES) $(EXTRA_lchown_DEPENDENCIES) + @rm -f lchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown_OBJECTS) $(lchown_LDADD) $(LIBS) + +lchown32$(EXEEXT): $(lchown32_OBJECTS) $(lchown32_DEPENDENCIES) $(EXTRA_lchown32_DEPENDENCIES) + @rm -f lchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown32_OBJECTS) $(lchown32_LDADD) $(LIBS) + +link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES) $(EXTRA_link_DEPENDENCIES) + @rm -f link$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(link_OBJECTS) $(link_LDADD) $(LIBS) + +linkat$(EXEEXT): $(linkat_OBJECTS) $(linkat_DEPENDENCIES) $(EXTRA_linkat_DEPENDENCIES) + @rm -f linkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(linkat_OBJECTS) $(linkat_LDADD) $(LIBS) + +llseek$(EXEEXT): $(llseek_OBJECTS) $(llseek_DEPENDENCIES) $(EXTRA_llseek_DEPENDENCIES) + @rm -f llseek$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(llseek_OBJECTS) $(llseek_LDADD) $(LIBS) + +lookup_dcookie$(EXEEXT): $(lookup_dcookie_OBJECTS) $(lookup_dcookie_DEPENDENCIES) $(EXTRA_lookup_dcookie_DEPENDENCIES) + @rm -f lookup_dcookie$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lookup_dcookie_OBJECTS) $(lookup_dcookie_LDADD) $(LIBS) + +lseek$(EXEEXT): $(lseek_OBJECTS) $(lseek_DEPENDENCIES) $(EXTRA_lseek_DEPENDENCIES) + @rm -f lseek$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lseek_OBJECTS) $(lseek_LDADD) $(LIBS) + +lstat$(EXEEXT): $(lstat_OBJECTS) $(lstat_DEPENDENCIES) $(EXTRA_lstat_DEPENDENCIES) + @rm -f lstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lstat_OBJECTS) $(lstat_LDADD) $(LIBS) + +lstat64$(EXEEXT): $(lstat64_OBJECTS) $(lstat64_DEPENDENCIES) $(EXTRA_lstat64_DEPENDENCIES) + @rm -f lstat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lstat64_OBJECTS) $(lstat64_LDADD) $(LIBS) + +mbind$(EXEEXT): $(mbind_OBJECTS) $(mbind_DEPENDENCIES) $(EXTRA_mbind_DEPENDENCIES) + @rm -f mbind$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mbind_OBJECTS) $(mbind_LDADD) $(LIBS) + +membarrier$(EXEEXT): $(membarrier_OBJECTS) $(membarrier_DEPENDENCIES) $(EXTRA_membarrier_DEPENDENCIES) + @rm -f membarrier$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(membarrier_OBJECTS) $(membarrier_LDADD) $(LIBS) + +memfd_create$(EXEEXT): $(memfd_create_OBJECTS) $(memfd_create_DEPENDENCIES) $(EXTRA_memfd_create_DEPENDENCIES) + @rm -f memfd_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(memfd_create_OBJECTS) $(memfd_create_LDADD) $(LIBS) + +migrate_pages$(EXEEXT): $(migrate_pages_OBJECTS) $(migrate_pages_DEPENDENCIES) $(EXTRA_migrate_pages_DEPENDENCIES) + @rm -f migrate_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(migrate_pages_OBJECTS) $(migrate_pages_LDADD) $(LIBS) + +mincore$(EXEEXT): $(mincore_OBJECTS) $(mincore_DEPENDENCIES) $(EXTRA_mincore_DEPENDENCIES) + @rm -f mincore$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mincore_OBJECTS) $(mincore_LDADD) $(LIBS) + +mkdir$(EXEEXT): $(mkdir_OBJECTS) $(mkdir_DEPENDENCIES) $(EXTRA_mkdir_DEPENDENCIES) + @rm -f mkdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdir_OBJECTS) $(mkdir_LDADD) $(LIBS) + +mkdirat$(EXEEXT): $(mkdirat_OBJECTS) $(mkdirat_DEPENDENCIES) $(EXTRA_mkdirat_DEPENDENCIES) + @rm -f mkdirat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdirat_OBJECTS) $(mkdirat_LDADD) $(LIBS) + +mknod$(EXEEXT): $(mknod_OBJECTS) $(mknod_DEPENDENCIES) $(EXTRA_mknod_DEPENDENCIES) + @rm -f mknod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknod_OBJECTS) $(mknod_LDADD) $(LIBS) + +mknodat$(EXEEXT): $(mknodat_OBJECTS) $(mknodat_DEPENDENCIES) $(EXTRA_mknodat_DEPENDENCIES) + @rm -f mknodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknodat_OBJECTS) $(mknodat_LDADD) $(LIBS) + +mlock$(EXEEXT): $(mlock_OBJECTS) $(mlock_DEPENDENCIES) $(EXTRA_mlock_DEPENDENCIES) + @rm -f mlock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock_OBJECTS) $(mlock_LDADD) $(LIBS) + +mlock2$(EXEEXT): $(mlock2_OBJECTS) $(mlock2_DEPENDENCIES) $(EXTRA_mlock2_DEPENDENCIES) + @rm -f mlock2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock2_OBJECTS) $(mlock2_LDADD) $(LIBS) + +mlockall$(EXEEXT): $(mlockall_OBJECTS) $(mlockall_DEPENDENCIES) $(EXTRA_mlockall_DEPENDENCIES) + @rm -f mlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlockall_OBJECTS) $(mlockall_LDADD) $(LIBS) + +mmap$(EXEEXT): $(mmap_OBJECTS) $(mmap_DEPENDENCIES) $(EXTRA_mmap_DEPENDENCIES) + @rm -f mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmap_OBJECTS) $(mmap_LDADD) $(LIBS) + +mmap64$(EXEEXT): $(mmap64_OBJECTS) $(mmap64_DEPENDENCIES) $(EXTRA_mmap64_DEPENDENCIES) + @rm -f mmap64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmap64_OBJECTS) $(mmap64_LDADD) $(LIBS) + +mmsg$(EXEEXT): $(mmsg_OBJECTS) $(mmsg_DEPENDENCIES) $(EXTRA_mmsg_DEPENDENCIES) + @rm -f mmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_OBJECTS) $(mmsg_LDADD) $(LIBS) + +mmsg-silent$(EXEEXT): $(mmsg_silent_OBJECTS) $(mmsg_silent_DEPENDENCIES) $(EXTRA_mmsg_silent_DEPENDENCIES) + @rm -f mmsg-silent$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_silent_OBJECTS) $(mmsg_silent_LDADD) $(LIBS) + +mmsg_name$(EXEEXT): $(mmsg_name_OBJECTS) $(mmsg_name_DEPENDENCIES) $(EXTRA_mmsg_name_DEPENDENCIES) + @rm -f mmsg_name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_name_OBJECTS) $(mmsg_name_LDADD) $(LIBS) + +mmsg_name-v$(EXEEXT): $(mmsg_name_v_OBJECTS) $(mmsg_name_v_DEPENDENCIES) $(EXTRA_mmsg_name_v_DEPENDENCIES) + @rm -f mmsg_name-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_name_v_OBJECTS) $(mmsg_name_v_LDADD) $(LIBS) + +mount$(EXEEXT): $(mount_OBJECTS) $(mount_DEPENDENCIES) $(EXTRA_mount_DEPENDENCIES) + @rm -f mount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mount_OBJECTS) $(mount_LDADD) $(LIBS) + +move_pages$(EXEEXT): $(move_pages_OBJECTS) $(move_pages_DEPENDENCIES) $(EXTRA_move_pages_DEPENDENCIES) + @rm -f move_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(move_pages_OBJECTS) $(move_pages_LDADD) $(LIBS) + +mq$(EXEEXT): $(mq_OBJECTS) $(mq_DEPENDENCIES) $(EXTRA_mq_DEPENDENCIES) + @rm -f mq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_OBJECTS) $(mq_LDADD) $(LIBS) + +mq_sendrecv$(EXEEXT): $(mq_sendrecv_OBJECTS) $(mq_sendrecv_DEPENDENCIES) $(EXTRA_mq_sendrecv_DEPENDENCIES) + @rm -f mq_sendrecv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_OBJECTS) $(mq_sendrecv_LDADD) $(LIBS) + +mq_sendrecv-read$(EXEEXT): $(mq_sendrecv_read_OBJECTS) $(mq_sendrecv_read_DEPENDENCIES) $(EXTRA_mq_sendrecv_read_DEPENDENCIES) + @rm -f mq_sendrecv-read$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_read_OBJECTS) $(mq_sendrecv_read_LDADD) $(LIBS) + +mq_sendrecv-write$(EXEEXT): $(mq_sendrecv_write_OBJECTS) $(mq_sendrecv_write_DEPENDENCIES) $(EXTRA_mq_sendrecv_write_DEPENDENCIES) + @rm -f mq_sendrecv-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_write_OBJECTS) $(mq_sendrecv_write_LDADD) $(LIBS) + +msg_control$(EXEEXT): $(msg_control_OBJECTS) $(msg_control_DEPENDENCIES) $(EXTRA_msg_control_DEPENDENCIES) + @rm -f msg_control$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_control_OBJECTS) $(msg_control_LDADD) $(LIBS) + +msg_control-v$(EXEEXT): $(msg_control_v_OBJECTS) $(msg_control_v_DEPENDENCIES) $(EXTRA_msg_control_v_DEPENDENCIES) + @rm -f msg_control-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_control_v_OBJECTS) $(msg_control_v_LDADD) $(LIBS) + +msg_name$(EXEEXT): $(msg_name_OBJECTS) $(msg_name_DEPENDENCIES) $(EXTRA_msg_name_DEPENDENCIES) + @rm -f msg_name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_name_OBJECTS) $(msg_name_LDADD) $(LIBS) + +munlockall$(EXEEXT): $(munlockall_OBJECTS) $(munlockall_DEPENDENCIES) $(EXTRA_munlockall_DEPENDENCIES) + @rm -f munlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(munlockall_OBJECTS) $(munlockall_LDADD) $(LIBS) + +nanosleep$(EXEEXT): $(nanosleep_OBJECTS) $(nanosleep_DEPENDENCIES) $(EXTRA_nanosleep_DEPENDENCIES) + @rm -f nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nanosleep_OBJECTS) $(nanosleep_LDADD) $(LIBS) + +net-accept-connect$(EXEEXT): $(net_accept_connect_OBJECTS) $(net_accept_connect_DEPENDENCIES) $(EXTRA_net_accept_connect_DEPENDENCIES) + @rm -f net-accept-connect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_accept_connect_OBJECTS) $(net_accept_connect_LDADD) $(LIBS) + +net-icmp_filter$(EXEEXT): $(net_icmp_filter_OBJECTS) $(net_icmp_filter_DEPENDENCIES) $(EXTRA_net_icmp_filter_DEPENDENCIES) + @rm -f net-icmp_filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_icmp_filter_OBJECTS) $(net_icmp_filter_LDADD) $(LIBS) + +net-sockaddr$(EXEEXT): $(net_sockaddr_OBJECTS) $(net_sockaddr_DEPENDENCIES) $(EXTRA_net_sockaddr_DEPENDENCIES) + @rm -f net-sockaddr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_sockaddr_OBJECTS) $(net_sockaddr_LDADD) $(LIBS) + +net-y-unix$(EXEEXT): $(net_y_unix_OBJECTS) $(net_y_unix_DEPENDENCIES) $(EXTRA_net_y_unix_DEPENDENCIES) + @rm -f net-y-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_y_unix_OBJECTS) $(net_y_unix_LDADD) $(LIBS) + +net-yy-inet$(EXEEXT): $(net_yy_inet_OBJECTS) $(net_yy_inet_DEPENDENCIES) $(EXTRA_net_yy_inet_DEPENDENCIES) + @rm -f net-yy-inet$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_inet_OBJECTS) $(net_yy_inet_LDADD) $(LIBS) + +net-yy-netlink$(EXEEXT): $(net_yy_netlink_OBJECTS) $(net_yy_netlink_DEPENDENCIES) $(EXTRA_net_yy_netlink_DEPENDENCIES) + @rm -f net-yy-netlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_netlink_OBJECTS) $(net_yy_netlink_LDADD) $(LIBS) + +net-yy-unix$(EXEEXT): $(net_yy_unix_OBJECTS) $(net_yy_unix_DEPENDENCIES) $(EXTRA_net_yy_unix_DEPENDENCIES) + @rm -f net-yy-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_unix_OBJECTS) $(net_yy_unix_LDADD) $(LIBS) + +netlink_inet_diag$(EXEEXT): $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_DEPENDENCIES) $(EXTRA_netlink_inet_diag_DEPENDENCIES) + @rm -f netlink_inet_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_LDADD) $(LIBS) + +netlink_netlink_diag$(EXEEXT): $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_DEPENDENCIES) $(EXTRA_netlink_netlink_diag_DEPENDENCIES) + @rm -f netlink_netlink_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_LDADD) $(LIBS) + +netlink_protocol$(EXEEXT): $(netlink_protocol_OBJECTS) $(netlink_protocol_DEPENDENCIES) $(EXTRA_netlink_protocol_DEPENDENCIES) + @rm -f netlink_protocol$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_protocol_OBJECTS) $(netlink_protocol_LDADD) $(LIBS) + +netlink_unix_diag$(EXEEXT): $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_DEPENDENCIES) $(EXTRA_netlink_unix_diag_DEPENDENCIES) + @rm -f netlink_unix_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_LDADD) $(LIBS) + +newfstatat$(EXEEXT): $(newfstatat_OBJECTS) $(newfstatat_DEPENDENCIES) $(EXTRA_newfstatat_DEPENDENCIES) + @rm -f newfstatat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(newfstatat_OBJECTS) $(newfstatat_LDADD) $(LIBS) + +nsyscalls$(EXEEXT): $(nsyscalls_OBJECTS) $(nsyscalls_DEPENDENCIES) $(EXTRA_nsyscalls_DEPENDENCIES) + @rm -f nsyscalls$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nsyscalls_OBJECTS) $(nsyscalls_LDADD) $(LIBS) + +old_mmap$(EXEEXT): $(old_mmap_OBJECTS) $(old_mmap_DEPENDENCIES) $(EXTRA_old_mmap_DEPENDENCIES) + @rm -f old_mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(old_mmap_OBJECTS) $(old_mmap_LDADD) $(LIBS) + +oldfstat$(EXEEXT): $(oldfstat_OBJECTS) $(oldfstat_DEPENDENCIES) $(EXTRA_oldfstat_DEPENDENCIES) + @rm -f oldfstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldfstat_OBJECTS) $(oldfstat_LDADD) $(LIBS) + +oldlstat$(EXEEXT): $(oldlstat_OBJECTS) $(oldlstat_DEPENDENCIES) $(EXTRA_oldlstat_DEPENDENCIES) + @rm -f oldlstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldlstat_OBJECTS) $(oldlstat_LDADD) $(LIBS) + +oldselect$(EXEEXT): $(oldselect_OBJECTS) $(oldselect_DEPENDENCIES) $(EXTRA_oldselect_DEPENDENCIES) + @rm -f oldselect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldselect_OBJECTS) $(oldselect_LDADD) $(LIBS) + +oldstat$(EXEEXT): $(oldstat_OBJECTS) $(oldstat_DEPENDENCIES) $(EXTRA_oldstat_DEPENDENCIES) + @rm -f oldstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldstat_OBJECTS) $(oldstat_LDADD) $(LIBS) + +open$(EXEEXT): $(open_OBJECTS) $(open_DEPENDENCIES) $(EXTRA_open_DEPENDENCIES) + @rm -f open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(open_OBJECTS) $(open_LDADD) $(LIBS) + +openat$(EXEEXT): $(openat_OBJECTS) $(openat_DEPENDENCIES) $(EXTRA_openat_DEPENDENCIES) + @rm -f openat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(openat_OBJECTS) $(openat_LDADD) $(LIBS) + +pause$(EXEEXT): $(pause_OBJECTS) $(pause_DEPENDENCIES) $(EXTRA_pause_DEPENDENCIES) + @rm -f pause$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pause_OBJECTS) $(pause_LDADD) $(LIBS) + +pc$(EXEEXT): $(pc_OBJECTS) $(pc_DEPENDENCIES) $(EXTRA_pc_DEPENDENCIES) + @rm -f pc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pc_OBJECTS) $(pc_LDADD) $(LIBS) + +perf_event_open$(EXEEXT): $(perf_event_open_OBJECTS) $(perf_event_open_DEPENDENCIES) $(EXTRA_perf_event_open_DEPENDENCIES) + @rm -f perf_event_open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_OBJECTS) $(perf_event_open_LDADD) $(LIBS) + +perf_event_open_nonverbose$(EXEEXT): $(perf_event_open_nonverbose_OBJECTS) $(perf_event_open_nonverbose_DEPENDENCIES) $(EXTRA_perf_event_open_nonverbose_DEPENDENCIES) + @rm -f perf_event_open_nonverbose$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_nonverbose_OBJECTS) $(perf_event_open_nonverbose_LDADD) $(LIBS) + +perf_event_open_unabbrev$(EXEEXT): $(perf_event_open_unabbrev_OBJECTS) $(perf_event_open_unabbrev_DEPENDENCIES) $(EXTRA_perf_event_open_unabbrev_DEPENDENCIES) + @rm -f perf_event_open_unabbrev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_unabbrev_OBJECTS) $(perf_event_open_unabbrev_LDADD) $(LIBS) + +personality$(EXEEXT): $(personality_OBJECTS) $(personality_DEPENDENCIES) $(EXTRA_personality_DEPENDENCIES) + @rm -f personality$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(personality_OBJECTS) $(personality_LDADD) $(LIBS) + +pipe$(EXEEXT): $(pipe_OBJECTS) $(pipe_DEPENDENCIES) $(EXTRA_pipe_DEPENDENCIES) + @rm -f pipe$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pipe_OBJECTS) $(pipe_LDADD) $(LIBS) + +pipe2$(EXEEXT): $(pipe2_OBJECTS) $(pipe2_DEPENDENCIES) $(EXTRA_pipe2_DEPENDENCIES) + @rm -f pipe2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pipe2_OBJECTS) $(pipe2_LDADD) $(LIBS) + +pkey_alloc$(EXEEXT): $(pkey_alloc_OBJECTS) $(pkey_alloc_DEPENDENCIES) $(EXTRA_pkey_alloc_DEPENDENCIES) + @rm -f pkey_alloc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_alloc_OBJECTS) $(pkey_alloc_LDADD) $(LIBS) + +pkey_free$(EXEEXT): $(pkey_free_OBJECTS) $(pkey_free_DEPENDENCIES) $(EXTRA_pkey_free_DEPENDENCIES) + @rm -f pkey_free$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_free_OBJECTS) $(pkey_free_LDADD) $(LIBS) + +pkey_mprotect$(EXEEXT): $(pkey_mprotect_OBJECTS) $(pkey_mprotect_DEPENDENCIES) $(EXTRA_pkey_mprotect_DEPENDENCIES) + @rm -f pkey_mprotect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_mprotect_OBJECTS) $(pkey_mprotect_LDADD) $(LIBS) + +poll$(EXEEXT): $(poll_OBJECTS) $(poll_DEPENDENCIES) $(EXTRA_poll_DEPENDENCIES) + @rm -f poll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(poll_OBJECTS) $(poll_LDADD) $(LIBS) + +ppoll$(EXEEXT): $(ppoll_OBJECTS) $(ppoll_DEPENDENCIES) $(EXTRA_ppoll_DEPENDENCIES) + @rm -f ppoll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ppoll_OBJECTS) $(ppoll_LDADD) $(LIBS) + +prctl-arg2-intptr$(EXEEXT): $(prctl_arg2_intptr_OBJECTS) $(prctl_arg2_intptr_DEPENDENCIES) $(EXTRA_prctl_arg2_intptr_DEPENDENCIES) + @rm -f prctl-arg2-intptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_arg2_intptr_OBJECTS) $(prctl_arg2_intptr_LDADD) $(LIBS) + +prctl-dumpable$(EXEEXT): $(prctl_dumpable_OBJECTS) $(prctl_dumpable_DEPENDENCIES) $(EXTRA_prctl_dumpable_DEPENDENCIES) + @rm -f prctl-dumpable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_dumpable_OBJECTS) $(prctl_dumpable_LDADD) $(LIBS) + +prctl-name$(EXEEXT): $(prctl_name_OBJECTS) $(prctl_name_DEPENDENCIES) $(EXTRA_prctl_name_DEPENDENCIES) + @rm -f prctl-name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_name_OBJECTS) $(prctl_name_LDADD) $(LIBS) + +prctl-no-args$(EXEEXT): $(prctl_no_args_OBJECTS) $(prctl_no_args_DEPENDENCIES) $(EXTRA_prctl_no_args_DEPENDENCIES) + @rm -f prctl-no-args$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_no_args_OBJECTS) $(prctl_no_args_LDADD) $(LIBS) + +prctl-pdeathsig$(EXEEXT): $(prctl_pdeathsig_OBJECTS) $(prctl_pdeathsig_DEPENDENCIES) $(EXTRA_prctl_pdeathsig_DEPENDENCIES) + @rm -f prctl-pdeathsig$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_pdeathsig_OBJECTS) $(prctl_pdeathsig_LDADD) $(LIBS) + +prctl-seccomp-filter-v$(EXEEXT): $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_DEPENDENCIES) $(EXTRA_prctl_seccomp_filter_v_DEPENDENCIES) + @rm -f prctl-seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_LDADD) $(LIBS) + +prctl-seccomp-strict$(EXEEXT): $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_DEPENDENCIES) $(EXTRA_prctl_seccomp_strict_DEPENDENCIES) + @rm -f prctl-seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_LDADD) $(LIBS) + +prctl-securebits$(EXEEXT): $(prctl_securebits_OBJECTS) $(prctl_securebits_DEPENDENCIES) $(EXTRA_prctl_securebits_DEPENDENCIES) + @rm -f prctl-securebits$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_securebits_OBJECTS) $(prctl_securebits_LDADD) $(LIBS) + +prctl-tid_address$(EXEEXT): $(prctl_tid_address_OBJECTS) $(prctl_tid_address_DEPENDENCIES) $(EXTRA_prctl_tid_address_DEPENDENCIES) + @rm -f prctl-tid_address$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_tid_address_OBJECTS) $(prctl_tid_address_LDADD) $(LIBS) + +prctl-tsc$(EXEEXT): $(prctl_tsc_OBJECTS) $(prctl_tsc_DEPENDENCIES) $(EXTRA_prctl_tsc_DEPENDENCIES) + @rm -f prctl-tsc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_tsc_OBJECTS) $(prctl_tsc_LDADD) $(LIBS) + +pread64-pwrite64$(EXEEXT): $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_DEPENDENCIES) $(EXTRA_pread64_pwrite64_DEPENDENCIES) + @rm -f pread64-pwrite64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_LDADD) $(LIBS) + +preadv$(EXEEXT): $(preadv_OBJECTS) $(preadv_DEPENDENCIES) $(EXTRA_preadv_DEPENDENCIES) + @rm -f preadv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_OBJECTS) $(preadv_LDADD) $(LIBS) + +preadv-pwritev$(EXEEXT): $(preadv_pwritev_OBJECTS) $(preadv_pwritev_DEPENDENCIES) $(EXTRA_preadv_pwritev_DEPENDENCIES) + @rm -f preadv-pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_pwritev_OBJECTS) $(preadv_pwritev_LDADD) $(LIBS) + +preadv2-pwritev2$(EXEEXT): $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_DEPENDENCIES) $(EXTRA_preadv2_pwritev2_DEPENDENCIES) + @rm -f preadv2-pwritev2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_LDADD) $(LIBS) + +print_maxfd$(EXEEXT): $(print_maxfd_OBJECTS) $(print_maxfd_DEPENDENCIES) $(EXTRA_print_maxfd_DEPENDENCIES) + @rm -f print_maxfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(print_maxfd_OBJECTS) $(print_maxfd_LDADD) $(LIBS) + +printstr$(EXEEXT): $(printstr_OBJECTS) $(printstr_DEPENDENCIES) $(EXTRA_printstr_DEPENDENCIES) + @rm -f printstr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(printstr_OBJECTS) $(printstr_LDADD) $(LIBS) + +prlimit64$(EXEEXT): $(prlimit64_OBJECTS) $(prlimit64_DEPENDENCIES) $(EXTRA_prlimit64_DEPENDENCIES) + @rm -f prlimit64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prlimit64_OBJECTS) $(prlimit64_LDADD) $(LIBS) + +process_vm_readv$(EXEEXT): $(process_vm_readv_OBJECTS) $(process_vm_readv_DEPENDENCIES) $(EXTRA_process_vm_readv_DEPENDENCIES) + @rm -f process_vm_readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(process_vm_readv_OBJECTS) $(process_vm_readv_LDADD) $(LIBS) + +process_vm_writev$(EXEEXT): $(process_vm_writev_OBJECTS) $(process_vm_writev_DEPENDENCIES) $(EXTRA_process_vm_writev_DEPENDENCIES) + @rm -f process_vm_writev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(process_vm_writev_OBJECTS) $(process_vm_writev_LDADD) $(LIBS) + +pselect6$(EXEEXT): $(pselect6_OBJECTS) $(pselect6_DEPENDENCIES) $(EXTRA_pselect6_DEPENDENCIES) + @rm -f pselect6$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pselect6_OBJECTS) $(pselect6_LDADD) $(LIBS) + +ptrace$(EXEEXT): $(ptrace_OBJECTS) $(ptrace_DEPENDENCIES) $(EXTRA_ptrace_DEPENDENCIES) + @rm -f ptrace$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ptrace_OBJECTS) $(ptrace_LDADD) $(LIBS) + +pwritev$(EXEEXT): $(pwritev_OBJECTS) $(pwritev_DEPENDENCIES) $(EXTRA_pwritev_DEPENDENCIES) + @rm -f pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pwritev_OBJECTS) $(pwritev_LDADD) $(LIBS) + +qual_fault$(EXEEXT): $(qual_fault_OBJECTS) $(qual_fault_DEPENDENCIES) $(EXTRA_qual_fault_DEPENDENCIES) + @rm -f qual_fault$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_fault_OBJECTS) $(qual_fault_LDADD) $(LIBS) + +qual_inject-error-signal$(EXEEXT): $(qual_inject_error_signal_OBJECTS) $(qual_inject_error_signal_DEPENDENCIES) $(EXTRA_qual_inject_error_signal_DEPENDENCIES) + @rm -f qual_inject-error-signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_error_signal_OBJECTS) $(qual_inject_error_signal_LDADD) $(LIBS) + +qual_inject-retval$(EXEEXT): $(qual_inject_retval_OBJECTS) $(qual_inject_retval_DEPENDENCIES) $(EXTRA_qual_inject_retval_DEPENDENCIES) + @rm -f qual_inject-retval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_retval_OBJECTS) $(qual_inject_retval_LDADD) $(LIBS) + +qual_inject-signal$(EXEEXT): $(qual_inject_signal_OBJECTS) $(qual_inject_signal_DEPENDENCIES) $(EXTRA_qual_inject_signal_DEPENDENCIES) + @rm -f qual_inject-signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_signal_OBJECTS) $(qual_inject_signal_LDADD) $(LIBS) + +qual_signal$(EXEEXT): $(qual_signal_OBJECTS) $(qual_signal_DEPENDENCIES) $(EXTRA_qual_signal_DEPENDENCIES) + @rm -f qual_signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_signal_OBJECTS) $(qual_signal_LDADD) $(LIBS) + +quotactl$(EXEEXT): $(quotactl_OBJECTS) $(quotactl_DEPENDENCIES) $(EXTRA_quotactl_DEPENDENCIES) + @rm -f quotactl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_OBJECTS) $(quotactl_LDADD) $(LIBS) + +quotactl-v$(EXEEXT): $(quotactl_v_OBJECTS) $(quotactl_v_DEPENDENCIES) $(EXTRA_quotactl_v_DEPENDENCIES) + @rm -f quotactl-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_v_OBJECTS) $(quotactl_v_LDADD) $(LIBS) + +quotactl-xfs$(EXEEXT): $(quotactl_xfs_OBJECTS) $(quotactl_xfs_DEPENDENCIES) $(EXTRA_quotactl_xfs_DEPENDENCIES) + @rm -f quotactl-xfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_xfs_OBJECTS) $(quotactl_xfs_LDADD) $(LIBS) + +quotactl-xfs-v$(EXEEXT): $(quotactl_xfs_v_OBJECTS) $(quotactl_xfs_v_DEPENDENCIES) $(EXTRA_quotactl_xfs_v_DEPENDENCIES) + @rm -f quotactl-xfs-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_xfs_v_OBJECTS) $(quotactl_xfs_v_LDADD) $(LIBS) + +read-write$(EXEEXT): $(read_write_OBJECTS) $(read_write_DEPENDENCIES) $(EXTRA_read_write_DEPENDENCIES) + @rm -f read-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(read_write_OBJECTS) $(read_write_LDADD) $(LIBS) + +readahead$(EXEEXT): $(readahead_OBJECTS) $(readahead_DEPENDENCIES) $(EXTRA_readahead_DEPENDENCIES) + @rm -f readahead$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readahead_OBJECTS) $(readahead_LDADD) $(LIBS) + +readdir$(EXEEXT): $(readdir_OBJECTS) $(readdir_DEPENDENCIES) $(EXTRA_readdir_DEPENDENCIES) + @rm -f readdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readdir_OBJECTS) $(readdir_LDADD) $(LIBS) + +readlink$(EXEEXT): $(readlink_OBJECTS) $(readlink_DEPENDENCIES) $(EXTRA_readlink_DEPENDENCIES) + @rm -f readlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readlink_OBJECTS) $(readlink_LDADD) $(LIBS) + +readlinkat$(EXEEXT): $(readlinkat_OBJECTS) $(readlinkat_DEPENDENCIES) $(EXTRA_readlinkat_DEPENDENCIES) + @rm -f readlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readlinkat_OBJECTS) $(readlinkat_LDADD) $(LIBS) + +readv$(EXEEXT): $(readv_OBJECTS) $(readv_DEPENDENCIES) $(EXTRA_readv_DEPENDENCIES) + @rm -f readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readv_OBJECTS) $(readv_LDADD) $(LIBS) + +reboot$(EXEEXT): $(reboot_OBJECTS) $(reboot_DEPENDENCIES) $(EXTRA_reboot_DEPENDENCIES) + @rm -f reboot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(reboot_OBJECTS) $(reboot_LDADD) $(LIBS) + +recvfrom$(EXEEXT): $(recvfrom_OBJECTS) $(recvfrom_DEPENDENCIES) $(EXTRA_recvfrom_DEPENDENCIES) + @rm -f recvfrom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvfrom_OBJECTS) $(recvfrom_LDADD) $(LIBS) + +recvmmsg-timeout$(EXEEXT): $(recvmmsg_timeout_OBJECTS) $(recvmmsg_timeout_DEPENDENCIES) $(EXTRA_recvmmsg_timeout_DEPENDENCIES) + @rm -f recvmmsg-timeout$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmmsg_timeout_OBJECTS) $(recvmmsg_timeout_LDADD) $(LIBS) + +recvmsg$(EXEEXT): $(recvmsg_OBJECTS) $(recvmsg_DEPENDENCIES) $(EXTRA_recvmsg_DEPENDENCIES) + @rm -f recvmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmsg_OBJECTS) $(recvmsg_LDADD) $(LIBS) + +redirect-fds$(EXEEXT): $(redirect_fds_OBJECTS) $(redirect_fds_DEPENDENCIES) $(EXTRA_redirect_fds_DEPENDENCIES) + @rm -f redirect-fds$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(redirect_fds_OBJECTS) $(redirect_fds_LDADD) $(LIBS) + +remap_file_pages$(EXEEXT): $(remap_file_pages_OBJECTS) $(remap_file_pages_DEPENDENCIES) $(EXTRA_remap_file_pages_DEPENDENCIES) + @rm -f remap_file_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(remap_file_pages_OBJECTS) $(remap_file_pages_LDADD) $(LIBS) + +rename$(EXEEXT): $(rename_OBJECTS) $(rename_DEPENDENCIES) $(EXTRA_rename_DEPENDENCIES) + @rm -f rename$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rename_OBJECTS) $(rename_LDADD) $(LIBS) + +renameat$(EXEEXT): $(renameat_OBJECTS) $(renameat_DEPENDENCIES) $(EXTRA_renameat_DEPENDENCIES) + @rm -f renameat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat_OBJECTS) $(renameat_LDADD) $(LIBS) + +renameat2$(EXEEXT): $(renameat2_OBJECTS) $(renameat2_DEPENDENCIES) $(EXTRA_renameat2_DEPENDENCIES) + @rm -f renameat2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat2_OBJECTS) $(renameat2_LDADD) $(LIBS) + +request_key$(EXEEXT): $(request_key_OBJECTS) $(request_key_DEPENDENCIES) $(EXTRA_request_key_DEPENDENCIES) + @rm -f request_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(request_key_OBJECTS) $(request_key_LDADD) $(LIBS) + +restart_syscall$(EXEEXT): $(restart_syscall_OBJECTS) $(restart_syscall_DEPENDENCIES) $(EXTRA_restart_syscall_DEPENDENCIES) + @rm -f restart_syscall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(restart_syscall_OBJECTS) $(restart_syscall_LDADD) $(LIBS) + +rmdir$(EXEEXT): $(rmdir_OBJECTS) $(rmdir_DEPENDENCIES) $(EXTRA_rmdir_DEPENDENCIES) + @rm -f rmdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rmdir_OBJECTS) $(rmdir_LDADD) $(LIBS) + +rt_sigpending$(EXEEXT): $(rt_sigpending_OBJECTS) $(rt_sigpending_DEPENDENCIES) $(EXTRA_rt_sigpending_DEPENDENCIES) + @rm -f rt_sigpending$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigpending_OBJECTS) $(rt_sigpending_LDADD) $(LIBS) + +rt_sigprocmask$(EXEEXT): $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_DEPENDENCIES) $(EXTRA_rt_sigprocmask_DEPENDENCIES) + @rm -f rt_sigprocmask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_LDADD) $(LIBS) + +rt_sigqueueinfo$(EXEEXT): $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_DEPENDENCIES) $(EXTRA_rt_sigqueueinfo_DEPENDENCIES) + @rm -f rt_sigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_LDADD) $(LIBS) + +rt_sigsuspend$(EXEEXT): $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_DEPENDENCIES) $(EXTRA_rt_sigsuspend_DEPENDENCIES) + @rm -f rt_sigsuspend$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_LDADD) $(LIBS) + +rt_sigtimedwait$(EXEEXT): $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_DEPENDENCIES) $(EXTRA_rt_sigtimedwait_DEPENDENCIES) + @rm -f rt_sigtimedwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_LDADD) $(LIBS) + +rt_tgsigqueueinfo$(EXEEXT): $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_DEPENDENCIES) $(EXTRA_rt_tgsigqueueinfo_DEPENDENCIES) + @rm -f rt_tgsigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_LDADD) $(LIBS) + +sched_get_priority_mxx$(EXEEXT): $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_DEPENDENCIES) $(EXTRA_sched_get_priority_mxx_DEPENDENCIES) + @rm -f sched_get_priority_mxx$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_LDADD) $(LIBS) + +sched_rr_get_interval$(EXEEXT): $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_DEPENDENCIES) $(EXTRA_sched_rr_get_interval_DEPENDENCIES) + @rm -f sched_rr_get_interval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_LDADD) $(LIBS) + +sched_xetaffinity$(EXEEXT): $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_DEPENDENCIES) $(EXTRA_sched_xetaffinity_DEPENDENCIES) + @rm -f sched_xetaffinity$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_LDADD) $(LIBS) + +sched_xetattr$(EXEEXT): $(sched_xetattr_OBJECTS) $(sched_xetattr_DEPENDENCIES) $(EXTRA_sched_xetattr_DEPENDENCIES) + @rm -f sched_xetattr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetattr_OBJECTS) $(sched_xetattr_LDADD) $(LIBS) + +sched_xetparam$(EXEEXT): $(sched_xetparam_OBJECTS) $(sched_xetparam_DEPENDENCIES) $(EXTRA_sched_xetparam_DEPENDENCIES) + @rm -f sched_xetparam$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetparam_OBJECTS) $(sched_xetparam_LDADD) $(LIBS) + +sched_xetscheduler$(EXEEXT): $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_DEPENDENCIES) $(EXTRA_sched_xetscheduler_DEPENDENCIES) + @rm -f sched_xetscheduler$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_LDADD) $(LIBS) + +sched_yield$(EXEEXT): $(sched_yield_OBJECTS) $(sched_yield_DEPENDENCIES) $(EXTRA_sched_yield_DEPENDENCIES) + @rm -f sched_yield$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_yield_OBJECTS) $(sched_yield_LDADD) $(LIBS) + +scm_rights$(EXEEXT): $(scm_rights_OBJECTS) $(scm_rights_DEPENDENCIES) $(EXTRA_scm_rights_DEPENDENCIES) + @rm -f scm_rights$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(scm_rights_OBJECTS) $(scm_rights_LDADD) $(LIBS) + +seccomp-filter$(EXEEXT): $(seccomp_filter_OBJECTS) $(seccomp_filter_DEPENDENCIES) $(EXTRA_seccomp_filter_DEPENDENCIES) + @rm -f seccomp-filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_OBJECTS) $(seccomp_filter_LDADD) $(LIBS) + +seccomp-filter-v$(EXEEXT): $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_DEPENDENCIES) $(EXTRA_seccomp_filter_v_DEPENDENCIES) + @rm -f seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_LDADD) $(LIBS) + +seccomp-strict$(EXEEXT): $(seccomp_strict_OBJECTS) $(seccomp_strict_DEPENDENCIES) $(EXTRA_seccomp_strict_DEPENDENCIES) + @rm -f seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_strict_OBJECTS) $(seccomp_strict_LDADD) $(LIBS) + +select$(EXEEXT): $(select_OBJECTS) $(select_DEPENDENCIES) $(EXTRA_select_DEPENDENCIES) + @rm -f select$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(select_OBJECTS) $(select_LDADD) $(LIBS) + +semop$(EXEEXT): $(semop_OBJECTS) $(semop_DEPENDENCIES) $(EXTRA_semop_DEPENDENCIES) + @rm -f semop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(semop_OBJECTS) $(semop_LDADD) $(LIBS) + +sendfile$(EXEEXT): $(sendfile_OBJECTS) $(sendfile_DEPENDENCIES) $(EXTRA_sendfile_DEPENDENCIES) + @rm -f sendfile$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sendfile_OBJECTS) $(sendfile_LDADD) $(LIBS) + +sendfile64$(EXEEXT): $(sendfile64_OBJECTS) $(sendfile64_DEPENDENCIES) $(EXTRA_sendfile64_DEPENDENCIES) + @rm -f sendfile64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sendfile64_OBJECTS) $(sendfile64_LDADD) $(LIBS) + +set_mempolicy$(EXEEXT): $(set_mempolicy_OBJECTS) $(set_mempolicy_DEPENDENCIES) $(EXTRA_set_mempolicy_DEPENDENCIES) + @rm -f set_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_mempolicy_OBJECTS) $(set_mempolicy_LDADD) $(LIBS) + +set_ptracer_any$(EXEEXT): $(set_ptracer_any_OBJECTS) $(set_ptracer_any_DEPENDENCIES) $(EXTRA_set_ptracer_any_DEPENDENCIES) + @rm -f set_ptracer_any$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_ptracer_any_OBJECTS) $(set_ptracer_any_LDADD) $(LIBS) + +setdomainname$(EXEEXT): $(setdomainname_OBJECTS) $(setdomainname_DEPENDENCIES) $(EXTRA_setdomainname_DEPENDENCIES) + @rm -f setdomainname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setdomainname_OBJECTS) $(setdomainname_LDADD) $(LIBS) + +setfsgid$(EXEEXT): $(setfsgid_OBJECTS) $(setfsgid_DEPENDENCIES) $(EXTRA_setfsgid_DEPENDENCIES) + @rm -f setfsgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid_OBJECTS) $(setfsgid_LDADD) $(LIBS) + +setfsgid32$(EXEEXT): $(setfsgid32_OBJECTS) $(setfsgid32_DEPENDENCIES) $(EXTRA_setfsgid32_DEPENDENCIES) + @rm -f setfsgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid32_OBJECTS) $(setfsgid32_LDADD) $(LIBS) + +setfsuid$(EXEEXT): $(setfsuid_OBJECTS) $(setfsuid_DEPENDENCIES) $(EXTRA_setfsuid_DEPENDENCIES) + @rm -f setfsuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid_OBJECTS) $(setfsuid_LDADD) $(LIBS) + +setfsuid32$(EXEEXT): $(setfsuid32_OBJECTS) $(setfsuid32_DEPENDENCIES) $(EXTRA_setfsuid32_DEPENDENCIES) + @rm -f setfsuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid32_OBJECTS) $(setfsuid32_LDADD) $(LIBS) + +setgid$(EXEEXT): $(setgid_OBJECTS) $(setgid_DEPENDENCIES) $(EXTRA_setgid_DEPENDENCIES) + @rm -f setgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid_OBJECTS) $(setgid_LDADD) $(LIBS) + +setgid32$(EXEEXT): $(setgid32_OBJECTS) $(setgid32_DEPENDENCIES) $(EXTRA_setgid32_DEPENDENCIES) + @rm -f setgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid32_OBJECTS) $(setgid32_LDADD) $(LIBS) + +setgroups$(EXEEXT): $(setgroups_OBJECTS) $(setgroups_DEPENDENCIES) $(EXTRA_setgroups_DEPENDENCIES) + @rm -f setgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups_OBJECTS) $(setgroups_LDADD) $(LIBS) + +setgroups32$(EXEEXT): $(setgroups32_OBJECTS) $(setgroups32_DEPENDENCIES) $(EXTRA_setgroups32_DEPENDENCIES) + @rm -f setgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups32_OBJECTS) $(setgroups32_LDADD) $(LIBS) + +sethostname$(EXEEXT): $(sethostname_OBJECTS) $(sethostname_DEPENDENCIES) $(EXTRA_sethostname_DEPENDENCIES) + @rm -f sethostname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sethostname_OBJECTS) $(sethostname_LDADD) $(LIBS) + +setns$(EXEEXT): $(setns_OBJECTS) $(setns_DEPENDENCIES) $(EXTRA_setns_DEPENDENCIES) + @rm -f setns$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setns_OBJECTS) $(setns_LDADD) $(LIBS) + +setregid$(EXEEXT): $(setregid_OBJECTS) $(setregid_DEPENDENCIES) $(EXTRA_setregid_DEPENDENCIES) + @rm -f setregid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid_OBJECTS) $(setregid_LDADD) $(LIBS) + +setregid32$(EXEEXT): $(setregid32_OBJECTS) $(setregid32_DEPENDENCIES) $(EXTRA_setregid32_DEPENDENCIES) + @rm -f setregid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid32_OBJECTS) $(setregid32_LDADD) $(LIBS) + +setresgid$(EXEEXT): $(setresgid_OBJECTS) $(setresgid_DEPENDENCIES) $(EXTRA_setresgid_DEPENDENCIES) + @rm -f setresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid_OBJECTS) $(setresgid_LDADD) $(LIBS) + +setresgid32$(EXEEXT): $(setresgid32_OBJECTS) $(setresgid32_DEPENDENCIES) $(EXTRA_setresgid32_DEPENDENCIES) + @rm -f setresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid32_OBJECTS) $(setresgid32_LDADD) $(LIBS) + +setresuid$(EXEEXT): $(setresuid_OBJECTS) $(setresuid_DEPENDENCIES) $(EXTRA_setresuid_DEPENDENCIES) + @rm -f setresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid_OBJECTS) $(setresuid_LDADD) $(LIBS) + +setresuid32$(EXEEXT): $(setresuid32_OBJECTS) $(setresuid32_DEPENDENCIES) $(EXTRA_setresuid32_DEPENDENCIES) + @rm -f setresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid32_OBJECTS) $(setresuid32_LDADD) $(LIBS) + +setreuid$(EXEEXT): $(setreuid_OBJECTS) $(setreuid_DEPENDENCIES) $(EXTRA_setreuid_DEPENDENCIES) + @rm -f setreuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid_OBJECTS) $(setreuid_LDADD) $(LIBS) + +setreuid32$(EXEEXT): $(setreuid32_OBJECTS) $(setreuid32_DEPENDENCIES) $(EXTRA_setreuid32_DEPENDENCIES) + @rm -f setreuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid32_OBJECTS) $(setreuid32_LDADD) $(LIBS) + +setrlimit$(EXEEXT): $(setrlimit_OBJECTS) $(setrlimit_DEPENDENCIES) $(EXTRA_setrlimit_DEPENDENCIES) + @rm -f setrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setrlimit_OBJECTS) $(setrlimit_LDADD) $(LIBS) + +setuid$(EXEEXT): $(setuid_OBJECTS) $(setuid_DEPENDENCIES) $(EXTRA_setuid_DEPENDENCIES) + @rm -f setuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid_OBJECTS) $(setuid_LDADD) $(LIBS) + +setuid32$(EXEEXT): $(setuid32_OBJECTS) $(setuid32_DEPENDENCIES) $(EXTRA_setuid32_DEPENDENCIES) + @rm -f setuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid32_OBJECTS) $(setuid32_LDADD) $(LIBS) + +shmxt$(EXEEXT): $(shmxt_OBJECTS) $(shmxt_DEPENDENCIES) $(EXTRA_shmxt_DEPENDENCIES) + @rm -f shmxt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shmxt_OBJECTS) $(shmxt_LDADD) $(LIBS) + +shutdown$(EXEEXT): $(shutdown_OBJECTS) $(shutdown_DEPENDENCIES) $(EXTRA_shutdown_DEPENDENCIES) + @rm -f shutdown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shutdown_OBJECTS) $(shutdown_LDADD) $(LIBS) + +sigaction$(EXEEXT): $(sigaction_OBJECTS) $(sigaction_DEPENDENCIES) $(EXTRA_sigaction_DEPENDENCIES) + @rm -f sigaction$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigaction_OBJECTS) $(sigaction_LDADD) $(LIBS) + +sigaltstack$(EXEEXT): $(sigaltstack_OBJECTS) $(sigaltstack_DEPENDENCIES) $(EXTRA_sigaltstack_DEPENDENCIES) + @rm -f sigaltstack$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigaltstack_OBJECTS) $(sigaltstack_LDADD) $(LIBS) + +siginfo$(EXEEXT): $(siginfo_OBJECTS) $(siginfo_DEPENDENCIES) $(EXTRA_siginfo_DEPENDENCIES) + @rm -f siginfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(siginfo_OBJECTS) $(siginfo_LDADD) $(LIBS) + +signal_receive$(EXEEXT): $(signal_receive_OBJECTS) $(signal_receive_DEPENDENCIES) $(EXTRA_signal_receive_DEPENDENCIES) + @rm -f signal_receive$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(signal_receive_OBJECTS) $(signal_receive_LDADD) $(LIBS) + +signalfd4$(EXEEXT): $(signalfd4_OBJECTS) $(signalfd4_DEPENDENCIES) $(EXTRA_signalfd4_DEPENDENCIES) + @rm -f signalfd4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(signalfd4_OBJECTS) $(signalfd4_LDADD) $(LIBS) + +sigreturn$(EXEEXT): $(sigreturn_OBJECTS) $(sigreturn_DEPENDENCIES) $(EXTRA_sigreturn_DEPENDENCIES) + @rm -f sigreturn$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigreturn_OBJECTS) $(sigreturn_LDADD) $(LIBS) + +sleep$(EXEEXT): $(sleep_OBJECTS) $(sleep_DEPENDENCIES) $(EXTRA_sleep_DEPENDENCIES) + @rm -f sleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sleep_OBJECTS) $(sleep_LDADD) $(LIBS) + +socketcall$(EXEEXT): $(socketcall_OBJECTS) $(socketcall_DEPENDENCIES) $(EXTRA_socketcall_DEPENDENCIES) + @rm -f socketcall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(socketcall_OBJECTS) $(socketcall_LDADD) $(LIBS) + +splice$(EXEEXT): $(splice_OBJECTS) $(splice_DEPENDENCIES) $(EXTRA_splice_DEPENDENCIES) + @rm -f splice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(splice_OBJECTS) $(splice_LDADD) $(LIBS) + +stack-fcall$(EXEEXT): $(stack_fcall_OBJECTS) $(stack_fcall_DEPENDENCIES) $(EXTRA_stack_fcall_DEPENDENCIES) + @rm -f stack-fcall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stack_fcall_OBJECTS) $(stack_fcall_LDADD) $(LIBS) + +stat$(EXEEXT): $(stat_OBJECTS) $(stat_DEPENDENCIES) $(EXTRA_stat_DEPENDENCIES) + @rm -f stat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stat_OBJECTS) $(stat_LDADD) $(LIBS) + +stat64$(EXEEXT): $(stat64_OBJECTS) $(stat64_DEPENDENCIES) $(EXTRA_stat64_DEPENDENCIES) + @rm -f stat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stat64_OBJECTS) $(stat64_LDADD) $(LIBS) + +statfs$(EXEEXT): $(statfs_OBJECTS) $(statfs_DEPENDENCIES) $(EXTRA_statfs_DEPENDENCIES) + @rm -f statfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs_OBJECTS) $(statfs_LDADD) $(LIBS) + +statfs64$(EXEEXT): $(statfs64_OBJECTS) $(statfs64_DEPENDENCIES) $(EXTRA_statfs64_DEPENDENCIES) + @rm -f statfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs64_OBJECTS) $(statfs64_LDADD) $(LIBS) + +swap$(EXEEXT): $(swap_OBJECTS) $(swap_DEPENDENCIES) $(EXTRA_swap_DEPENDENCIES) + @rm -f swap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(swap_OBJECTS) $(swap_LDADD) $(LIBS) + +symlink$(EXEEXT): $(symlink_OBJECTS) $(symlink_DEPENDENCIES) $(EXTRA_symlink_DEPENDENCIES) + @rm -f symlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlink_OBJECTS) $(symlink_LDADD) $(LIBS) + +symlinkat$(EXEEXT): $(symlinkat_OBJECTS) $(symlinkat_DEPENDENCIES) $(EXTRA_symlinkat_DEPENDENCIES) + @rm -f symlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlinkat_OBJECTS) $(symlinkat_LDADD) $(LIBS) + +sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES) $(EXTRA_sync_DEPENDENCIES) + @rm -f sync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_OBJECTS) $(sync_LDADD) $(LIBS) + +sync_file_range$(EXEEXT): $(sync_file_range_OBJECTS) $(sync_file_range_DEPENDENCIES) $(EXTRA_sync_file_range_DEPENDENCIES) + @rm -f sync_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range_OBJECTS) $(sync_file_range_LDADD) $(LIBS) + +sync_file_range2$(EXEEXT): $(sync_file_range2_OBJECTS) $(sync_file_range2_DEPENDENCIES) $(EXTRA_sync_file_range2_DEPENDENCIES) + @rm -f sync_file_range2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range2_OBJECTS) $(sync_file_range2_LDADD) $(LIBS) + +sysinfo$(EXEEXT): $(sysinfo_OBJECTS) $(sysinfo_DEPENDENCIES) $(EXTRA_sysinfo_DEPENDENCIES) + @rm -f sysinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sysinfo_OBJECTS) $(sysinfo_LDADD) $(LIBS) + +syslog$(EXEEXT): $(syslog_OBJECTS) $(syslog_DEPENDENCIES) $(EXTRA_syslog_DEPENDENCIES) + @rm -f syslog$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(syslog_OBJECTS) $(syslog_LDADD) $(LIBS) + +tee$(EXEEXT): $(tee_OBJECTS) $(tee_DEPENDENCIES) $(EXTRA_tee_DEPENDENCIES) + @rm -f tee$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tee_OBJECTS) $(tee_LDADD) $(LIBS) + +threads-execve$(EXEEXT): $(threads_execve_OBJECTS) $(threads_execve_DEPENDENCIES) $(EXTRA_threads_execve_DEPENDENCIES) + @rm -f threads-execve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(threads_execve_OBJECTS) $(threads_execve_LDADD) $(LIBS) + +time$(EXEEXT): $(time_OBJECTS) $(time_DEPENDENCIES) $(EXTRA_time_DEPENDENCIES) + @rm -f time$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(time_OBJECTS) $(time_LDADD) $(LIBS) + +timer_create$(EXEEXT): $(timer_create_OBJECTS) $(timer_create_DEPENDENCIES) $(EXTRA_timer_create_DEPENDENCIES) + @rm -f timer_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timer_create_OBJECTS) $(timer_create_LDADD) $(LIBS) + +timer_xettime$(EXEEXT): $(timer_xettime_OBJECTS) $(timer_xettime_DEPENDENCIES) $(EXTRA_timer_xettime_DEPENDENCIES) + @rm -f timer_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timer_xettime_OBJECTS) $(timer_xettime_LDADD) $(LIBS) + +timerfd_xettime$(EXEEXT): $(timerfd_xettime_OBJECTS) $(timerfd_xettime_DEPENDENCIES) $(EXTRA_timerfd_xettime_DEPENDENCIES) + @rm -f timerfd_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timerfd_xettime_OBJECTS) $(timerfd_xettime_LDADD) $(LIBS) + +times$(EXEEXT): $(times_OBJECTS) $(times_DEPENDENCIES) $(EXTRA_times_DEPENDENCIES) + @rm -f times$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(times_OBJECTS) $(times_LDADD) $(LIBS) + +times-fail$(EXEEXT): $(times_fail_OBJECTS) $(times_fail_DEPENDENCIES) $(EXTRA_times_fail_DEPENDENCIES) + @rm -f times-fail$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(times_fail_OBJECTS) $(times_fail_LDADD) $(LIBS) + +truncate$(EXEEXT): $(truncate_OBJECTS) $(truncate_DEPENDENCIES) $(EXTRA_truncate_DEPENDENCIES) + @rm -f truncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(truncate_OBJECTS) $(truncate_LDADD) $(LIBS) + +truncate64$(EXEEXT): $(truncate64_OBJECTS) $(truncate64_DEPENDENCIES) $(EXTRA_truncate64_DEPENDENCIES) + @rm -f truncate64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(truncate64_OBJECTS) $(truncate64_LDADD) $(LIBS) + +ugetrlimit$(EXEEXT): $(ugetrlimit_OBJECTS) $(ugetrlimit_DEPENDENCIES) $(EXTRA_ugetrlimit_DEPENDENCIES) + @rm -f ugetrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ugetrlimit_OBJECTS) $(ugetrlimit_LDADD) $(LIBS) + +uio$(EXEEXT): $(uio_OBJECTS) $(uio_DEPENDENCIES) $(EXTRA_uio_DEPENDENCIES) + @rm -f uio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uio_OBJECTS) $(uio_LDADD) $(LIBS) + +umask$(EXEEXT): $(umask_OBJECTS) $(umask_DEPENDENCIES) $(EXTRA_umask_DEPENDENCIES) + @rm -f umask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umask_OBJECTS) $(umask_LDADD) $(LIBS) + +umount$(EXEEXT): $(umount_OBJECTS) $(umount_DEPENDENCIES) $(EXTRA_umount_DEPENDENCIES) + @rm -f umount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umount_OBJECTS) $(umount_LDADD) $(LIBS) + +umount2$(EXEEXT): $(umount2_OBJECTS) $(umount2_DEPENDENCIES) $(EXTRA_umount2_DEPENDENCIES) + @rm -f umount2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umount2_OBJECTS) $(umount2_LDADD) $(LIBS) + +umoven-illptr$(EXEEXT): $(umoven_illptr_OBJECTS) $(umoven_illptr_DEPENDENCIES) $(EXTRA_umoven_illptr_DEPENDENCIES) + @rm -f umoven-illptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umoven_illptr_OBJECTS) $(umoven_illptr_LDADD) $(LIBS) + +umovestr$(EXEEXT): $(umovestr_OBJECTS) $(umovestr_DEPENDENCIES) $(EXTRA_umovestr_DEPENDENCIES) + @rm -f umovestr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr_OBJECTS) $(umovestr_LDADD) $(LIBS) + +umovestr-illptr$(EXEEXT): $(umovestr_illptr_OBJECTS) $(umovestr_illptr_DEPENDENCIES) $(EXTRA_umovestr_illptr_DEPENDENCIES) + @rm -f umovestr-illptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr_illptr_OBJECTS) $(umovestr_illptr_LDADD) $(LIBS) + +umovestr2$(EXEEXT): $(umovestr2_OBJECTS) $(umovestr2_DEPENDENCIES) $(EXTRA_umovestr2_DEPENDENCIES) + @rm -f umovestr2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr2_OBJECTS) $(umovestr2_LDADD) $(LIBS) + +umovestr3$(EXEEXT): $(umovestr3_OBJECTS) $(umovestr3_DEPENDENCIES) $(EXTRA_umovestr3_DEPENDENCIES) + @rm -f umovestr3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr3_OBJECTS) $(umovestr3_LDADD) $(LIBS) + +uname$(EXEEXT): $(uname_OBJECTS) $(uname_DEPENDENCIES) $(EXTRA_uname_DEPENDENCIES) + @rm -f uname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uname_OBJECTS) $(uname_LDADD) $(LIBS) + +unix-pair-send-recv$(EXEEXT): $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_DEPENDENCIES) $(EXTRA_unix_pair_send_recv_DEPENDENCIES) + @rm -f unix-pair-send-recv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_LDADD) $(LIBS) + +unix-pair-sendto-recvfrom$(EXEEXT): $(unix_pair_sendto_recvfrom_OBJECTS) $(unix_pair_sendto_recvfrom_DEPENDENCIES) $(EXTRA_unix_pair_sendto_recvfrom_DEPENDENCIES) + @rm -f unix-pair-sendto-recvfrom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unix_pair_sendto_recvfrom_OBJECTS) $(unix_pair_sendto_recvfrom_LDADD) $(LIBS) + +unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) $(EXTRA_unlink_DEPENDENCIES) + @rm -f unlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS) + +unlinkat$(EXEEXT): $(unlinkat_OBJECTS) $(unlinkat_DEPENDENCIES) $(EXTRA_unlinkat_DEPENDENCIES) + @rm -f unlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlinkat_OBJECTS) $(unlinkat_LDADD) $(LIBS) + +unshare$(EXEEXT): $(unshare_OBJECTS) $(unshare_DEPENDENCIES) $(EXTRA_unshare_DEPENDENCIES) + @rm -f unshare$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unshare_OBJECTS) $(unshare_LDADD) $(LIBS) + +userfaultfd$(EXEEXT): $(userfaultfd_OBJECTS) $(userfaultfd_DEPENDENCIES) $(EXTRA_userfaultfd_DEPENDENCIES) + @rm -f userfaultfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(userfaultfd_OBJECTS) $(userfaultfd_LDADD) $(LIBS) + +ustat$(EXEEXT): $(ustat_OBJECTS) $(ustat_DEPENDENCIES) $(EXTRA_ustat_DEPENDENCIES) + @rm -f ustat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ustat_OBJECTS) $(ustat_LDADD) $(LIBS) + +utime$(EXEEXT): $(utime_OBJECTS) $(utime_DEPENDENCIES) $(EXTRA_utime_DEPENDENCIES) + @rm -f utime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utime_OBJECTS) $(utime_LDADD) $(LIBS) + +utimensat$(EXEEXT): $(utimensat_OBJECTS) $(utimensat_DEPENDENCIES) $(EXTRA_utimensat_DEPENDENCIES) + @rm -f utimensat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimensat_OBJECTS) $(utimensat_LDADD) $(LIBS) + +utimes$(EXEEXT): $(utimes_OBJECTS) $(utimes_DEPENDENCIES) $(EXTRA_utimes_DEPENDENCIES) + @rm -f utimes$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimes_OBJECTS) $(utimes_LDADD) $(LIBS) + +vfork-f$(EXEEXT): $(vfork_f_OBJECTS) $(vfork_f_DEPENDENCIES) $(EXTRA_vfork_f_DEPENDENCIES) + @rm -f vfork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfork_f_OBJECTS) $(vfork_f_LDADD) $(LIBS) + +vhangup$(EXEEXT): $(vhangup_OBJECTS) $(vhangup_DEPENDENCIES) $(EXTRA_vhangup_DEPENDENCIES) + @rm -f vhangup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vhangup_OBJECTS) $(vhangup_LDADD) $(LIBS) + +vmsplice$(EXEEXT): $(vmsplice_OBJECTS) $(vmsplice_DEPENDENCIES) $(EXTRA_vmsplice_DEPENDENCIES) + @rm -f vmsplice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vmsplice_OBJECTS) $(vmsplice_LDADD) $(LIBS) + +wait4$(EXEEXT): $(wait4_OBJECTS) $(wait4_DEPENDENCIES) $(EXTRA_wait4_DEPENDENCIES) + @rm -f wait4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wait4_OBJECTS) $(wait4_LDADD) $(LIBS) + +wait4-v$(EXEEXT): $(wait4_v_OBJECTS) $(wait4_v_DEPENDENCIES) $(EXTRA_wait4_v_DEPENDENCIES) + @rm -f wait4-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wait4_v_OBJECTS) $(wait4_v_LDADD) $(LIBS) + +waitid$(EXEEXT): $(waitid_OBJECTS) $(waitid_DEPENDENCIES) $(EXTRA_waitid_DEPENDENCIES) + @rm -f waitid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitid_OBJECTS) $(waitid_LDADD) $(LIBS) + +waitid-v$(EXEEXT): $(waitid_v_OBJECTS) $(waitid_v_DEPENDENCIES) $(EXTRA_waitid_v_DEPENDENCIES) + @rm -f waitid-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitid_v_OBJECTS) $(waitid_v_LDADD) $(LIBS) + +waitpid$(EXEEXT): $(waitpid_OBJECTS) $(waitpid_DEPENDENCIES) $(EXTRA_waitpid_DEPENDENCIES) + @rm -f waitpid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitpid_OBJECTS) $(waitpid_LDADD) $(LIBS) + +xattr$(EXEEXT): $(xattr_OBJECTS) $(xattr_DEPENDENCIES) $(EXTRA_xattr_DEPENDENCIES) + @rm -f xattr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xattr_OBJECTS) $(xattr_LDADD) $(LIBS) + +xattr-strings$(EXEEXT): $(xattr_strings_OBJECTS) $(xattr_strings_DEPENDENCIES) $(EXTRA_xattr_strings_DEPENDENCIES) + @rm -f xattr-strings$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xattr_strings_OBJECTS) $(xattr_strings_LDADD) $(LIBS) + +xet_robust_list$(EXEEXT): $(xet_robust_list_OBJECTS) $(xet_robust_list_DEPENDENCIES) $(EXTRA_xet_robust_list_DEPENDENCIES) + @rm -f xet_robust_list$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xet_robust_list_OBJECTS) $(xet_robust_list_LDADD) $(LIBS) + +xetitimer$(EXEEXT): $(xetitimer_OBJECTS) $(xetitimer_DEPENDENCIES) $(EXTRA_xetitimer_DEPENDENCIES) + @rm -f xetitimer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetitimer_OBJECTS) $(xetitimer_LDADD) $(LIBS) + +xetpgid$(EXEEXT): $(xetpgid_OBJECTS) $(xetpgid_DEPENDENCIES) $(EXTRA_xetpgid_DEPENDENCIES) + @rm -f xetpgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpgid_OBJECTS) $(xetpgid_LDADD) $(LIBS) + +xetpriority$(EXEEXT): $(xetpriority_OBJECTS) $(xetpriority_DEPENDENCIES) $(EXTRA_xetpriority_DEPENDENCIES) + @rm -f xetpriority$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpriority_OBJECTS) $(xetpriority_LDADD) $(LIBS) + +xettimeofday$(EXEEXT): $(xettimeofday_OBJECTS) $(xettimeofday_DEPENDENCIES) $(EXTRA_xettimeofday_DEPENDENCIES) + @rm -f xettimeofday$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xettimeofday_OBJECTS) $(xettimeofday_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/_newselect.Po +include ./$(DEPDIR)/accept.Po +include ./$(DEPDIR)/accept4.Po +include ./$(DEPDIR)/access.Po +include ./$(DEPDIR)/acct.Po +include ./$(DEPDIR)/add_key.Po +include ./$(DEPDIR)/adjtimex.Po +include ./$(DEPDIR)/aio.Po +include ./$(DEPDIR)/alarm.Po +include ./$(DEPDIR)/answer.Po +include ./$(DEPDIR)/attach-f-p-cmd.Po +include ./$(DEPDIR)/attach-f-p.Po +include ./$(DEPDIR)/attach-p-cmd-cmd.Po +include ./$(DEPDIR)/attach-p-cmd-p.Po +include ./$(DEPDIR)/bpf.Po +include ./$(DEPDIR)/brk.Po +include ./$(DEPDIR)/btrfs.Po +include ./$(DEPDIR)/caps-abbrev.Po +include ./$(DEPDIR)/caps.Po +include ./$(DEPDIR)/chmod.Po +include ./$(DEPDIR)/chown.Po +include ./$(DEPDIR)/chown32.Po +include ./$(DEPDIR)/chroot.Po +include ./$(DEPDIR)/clock_adjtime.Po +include ./$(DEPDIR)/clock_nanosleep.Po +include ./$(DEPDIR)/clock_xettime.Po +include ./$(DEPDIR)/copy_file_range.Po +include ./$(DEPDIR)/count-f.Po +include ./$(DEPDIR)/creat.Po +include ./$(DEPDIR)/delete_module.Po +include ./$(DEPDIR)/dup.Po +include ./$(DEPDIR)/dup2.Po +include ./$(DEPDIR)/dup3.Po +include ./$(DEPDIR)/epoll_create.Po +include ./$(DEPDIR)/epoll_create1.Po +include ./$(DEPDIR)/epoll_ctl.Po +include ./$(DEPDIR)/epoll_pwait.Po +include ./$(DEPDIR)/epoll_wait.Po +include ./$(DEPDIR)/erestartsys.Po +include ./$(DEPDIR)/eventfd.Po +include ./$(DEPDIR)/execve-v.Po +include ./$(DEPDIR)/execve.Po +include ./$(DEPDIR)/execveat-v.Po +include ./$(DEPDIR)/execveat.Po +include ./$(DEPDIR)/faccessat.Po +include ./$(DEPDIR)/fadvise64.Po +include ./$(DEPDIR)/fadvise64_64.Po +include ./$(DEPDIR)/fallocate.Po +include ./$(DEPDIR)/fanotify_init.Po +include ./$(DEPDIR)/fanotify_mark.Po +include ./$(DEPDIR)/fchdir.Po +include ./$(DEPDIR)/fchmod.Po +include ./$(DEPDIR)/fchmodat.Po +include ./$(DEPDIR)/fchown.Po +include ./$(DEPDIR)/fchown32.Po +include ./$(DEPDIR)/fchownat.Po +include ./$(DEPDIR)/fcntl.Po +include ./$(DEPDIR)/fcntl64.Po +include ./$(DEPDIR)/fdatasync.Po +include ./$(DEPDIR)/file_handle.Po +include ./$(DEPDIR)/file_ioctl.Po +include ./$(DEPDIR)/filter-unavailable.Po +include ./$(DEPDIR)/finit_module.Po +include ./$(DEPDIR)/flock.Po +include ./$(DEPDIR)/fork-f.Po +include ./$(DEPDIR)/fstat.Po +include ./$(DEPDIR)/fstat64-fstat64.Po +include ./$(DEPDIR)/fstatat64-fstatat64.Po +include ./$(DEPDIR)/fstatfs.Po +include ./$(DEPDIR)/fstatfs64.Po +include ./$(DEPDIR)/fsync.Po +include ./$(DEPDIR)/ftruncate.Po +include ./$(DEPDIR)/ftruncate64-ftruncate64.Po +include ./$(DEPDIR)/futex.Po +include ./$(DEPDIR)/futimesat.Po +include ./$(DEPDIR)/get_mempolicy.Po +include ./$(DEPDIR)/getcpu.Po +include ./$(DEPDIR)/getcwd.Po +include ./$(DEPDIR)/getdents.Po +include ./$(DEPDIR)/getdents64.Po +include ./$(DEPDIR)/getegid.Po +include ./$(DEPDIR)/getegid32.Po +include ./$(DEPDIR)/geteuid.Po +include ./$(DEPDIR)/geteuid32.Po +include ./$(DEPDIR)/getgid.Po +include ./$(DEPDIR)/getgid32.Po +include ./$(DEPDIR)/getgroups.Po +include ./$(DEPDIR)/getgroups32.Po +include ./$(DEPDIR)/getpeername.Po +include ./$(DEPDIR)/getpgrp.Po +include ./$(DEPDIR)/getrandom.Po +include ./$(DEPDIR)/getresgid.Po +include ./$(DEPDIR)/getresgid32.Po +include ./$(DEPDIR)/getresuid.Po +include ./$(DEPDIR)/getresuid32.Po +include ./$(DEPDIR)/getrlimit.Po +include ./$(DEPDIR)/getrusage.Po +include ./$(DEPDIR)/getsid.Po +include ./$(DEPDIR)/getsockname.Po +include ./$(DEPDIR)/getuid.Po +include ./$(DEPDIR)/getuid32.Po +include ./$(DEPDIR)/getxxid.Po +include ./$(DEPDIR)/inet-cmsg.Po +include ./$(DEPDIR)/init_module.Po +include ./$(DEPDIR)/inotify.Po +include ./$(DEPDIR)/inotify_init1.Po +include ./$(DEPDIR)/ioctl.Po +include ./$(DEPDIR)/ioctl_block.Po +include ./$(DEPDIR)/ioctl_dm-v.Po +include ./$(DEPDIR)/ioctl_dm.Po +include ./$(DEPDIR)/ioctl_evdev-v.Po +include ./$(DEPDIR)/ioctl_evdev.Po +include ./$(DEPDIR)/ioctl_loop-nv.Po +include ./$(DEPDIR)/ioctl_loop-v.Po +include ./$(DEPDIR)/ioctl_loop.Po +include ./$(DEPDIR)/ioctl_mtd.Po +include ./$(DEPDIR)/ioctl_rtc-v.Po +include ./$(DEPDIR)/ioctl_rtc.Po +include ./$(DEPDIR)/ioctl_scsi.Po +include ./$(DEPDIR)/ioctl_sg_io_v3.Po +include ./$(DEPDIR)/ioctl_sg_io_v4.Po +include ./$(DEPDIR)/ioctl_sock_gifconf.Po +include ./$(DEPDIR)/ioctl_uffdio.Po +include ./$(DEPDIR)/ioctl_v4l2.Po +include ./$(DEPDIR)/ioperm.Po +include ./$(DEPDIR)/iopl.Po +include ./$(DEPDIR)/ioprio.Po +include ./$(DEPDIR)/ip_mreq.Po +include ./$(DEPDIR)/ipc.Po +include ./$(DEPDIR)/ipc_msg.Po +include ./$(DEPDIR)/ipc_msgbuf.Po +include ./$(DEPDIR)/ipc_sem.Po +include ./$(DEPDIR)/ipc_shm.Po +include ./$(DEPDIR)/kcmp.Po +include ./$(DEPDIR)/kexec_file_load.Po +include ./$(DEPDIR)/kexec_load.Po +include ./$(DEPDIR)/keyctl.Po +include ./$(DEPDIR)/kill.Po +include ./$(DEPDIR)/ksysent.Po +include ./$(DEPDIR)/lchown.Po +include ./$(DEPDIR)/lchown32.Po +include ./$(DEPDIR)/libtests_a-errno2name.Po +include ./$(DEPDIR)/libtests_a-error_msg.Po +include ./$(DEPDIR)/libtests_a-fill_memory.Po +include ./$(DEPDIR)/libtests_a-get_page_size.Po +include ./$(DEPDIR)/libtests_a-hexdump_strdup.Po +include ./$(DEPDIR)/libtests_a-hexquote_strndup.Po +include ./$(DEPDIR)/libtests_a-inode_of_sockfd.Po +include ./$(DEPDIR)/libtests_a-libmmsg.Po +include ./$(DEPDIR)/libtests_a-libsocketcall.Po +include ./$(DEPDIR)/libtests_a-overflowuid.Po +include ./$(DEPDIR)/libtests_a-pipe_maxfd.Po +include ./$(DEPDIR)/libtests_a-print_quoted_string.Po +include ./$(DEPDIR)/libtests_a-printflags.Po +include ./$(DEPDIR)/libtests_a-printxval.Po +include ./$(DEPDIR)/libtests_a-signal2name.Po +include ./$(DEPDIR)/libtests_a-sprintrc.Po +include ./$(DEPDIR)/libtests_a-tail_alloc.Po +include ./$(DEPDIR)/libtests_a-tprintf.Po +include ./$(DEPDIR)/link.Po +include ./$(DEPDIR)/linkat.Po +include ./$(DEPDIR)/llseek.Po +include ./$(DEPDIR)/lookup_dcookie.Po +include ./$(DEPDIR)/lseek.Po +include ./$(DEPDIR)/lstat.Po +include ./$(DEPDIR)/lstat64-lstat64.Po +include ./$(DEPDIR)/mbind.Po +include ./$(DEPDIR)/membarrier.Po +include ./$(DEPDIR)/memfd_create.Po +include ./$(DEPDIR)/migrate_pages.Po +include ./$(DEPDIR)/mincore.Po +include ./$(DEPDIR)/mkdir.Po +include ./$(DEPDIR)/mkdirat.Po +include ./$(DEPDIR)/mknod.Po +include ./$(DEPDIR)/mknodat.Po +include ./$(DEPDIR)/mlock.Po +include ./$(DEPDIR)/mlock2.Po +include ./$(DEPDIR)/mlockall.Po +include ./$(DEPDIR)/mmap.Po +include ./$(DEPDIR)/mmap64-mmap64.Po +include ./$(DEPDIR)/mmsg-silent.Po +include ./$(DEPDIR)/mmsg.Po +include ./$(DEPDIR)/mmsg_name-v.Po +include ./$(DEPDIR)/mmsg_name.Po +include ./$(DEPDIR)/mount.Po +include ./$(DEPDIR)/move_pages.Po +include ./$(DEPDIR)/mq.Po +include ./$(DEPDIR)/mq_sendrecv-read.Po +include ./$(DEPDIR)/mq_sendrecv-write.Po +include ./$(DEPDIR)/mq_sendrecv.Po +include ./$(DEPDIR)/msg_control-v.Po +include ./$(DEPDIR)/msg_control.Po +include ./$(DEPDIR)/msg_name.Po +include ./$(DEPDIR)/munlockall.Po +include ./$(DEPDIR)/nanosleep.Po +include ./$(DEPDIR)/net-accept-connect.Po +include ./$(DEPDIR)/net-icmp_filter.Po +include ./$(DEPDIR)/net-sockaddr.Po +include ./$(DEPDIR)/net-y-unix.Po +include ./$(DEPDIR)/net-yy-inet.Po +include ./$(DEPDIR)/net-yy-netlink.Po +include ./$(DEPDIR)/net-yy-unix.Po +include ./$(DEPDIR)/netlink_inet_diag.Po +include ./$(DEPDIR)/netlink_netlink_diag.Po +include ./$(DEPDIR)/netlink_protocol.Po +include ./$(DEPDIR)/netlink_unix_diag.Po +include ./$(DEPDIR)/newfstatat-newfstatat.Po +include ./$(DEPDIR)/nsyscalls.Po +include ./$(DEPDIR)/old_mmap.Po +include ./$(DEPDIR)/oldfstat.Po +include ./$(DEPDIR)/oldlstat.Po +include ./$(DEPDIR)/oldselect.Po +include ./$(DEPDIR)/oldstat.Po +include ./$(DEPDIR)/open.Po +include ./$(DEPDIR)/openat.Po +include ./$(DEPDIR)/pause.Po +include ./$(DEPDIR)/pc.Po +include ./$(DEPDIR)/perf_event_open.Po +include ./$(DEPDIR)/perf_event_open_nonverbose.Po +include ./$(DEPDIR)/perf_event_open_unabbrev.Po +include ./$(DEPDIR)/personality.Po +include ./$(DEPDIR)/pipe.Po +include ./$(DEPDIR)/pipe2.Po +include ./$(DEPDIR)/pkey_alloc.Po +include ./$(DEPDIR)/pkey_free.Po +include ./$(DEPDIR)/pkey_mprotect.Po +include ./$(DEPDIR)/poll.Po +include ./$(DEPDIR)/ppoll.Po +include ./$(DEPDIR)/prctl-arg2-intptr.Po +include ./$(DEPDIR)/prctl-dumpable.Po +include ./$(DEPDIR)/prctl-name.Po +include ./$(DEPDIR)/prctl-no-args.Po +include ./$(DEPDIR)/prctl-pdeathsig.Po +include ./$(DEPDIR)/prctl-seccomp-filter-v.Po +include ./$(DEPDIR)/prctl-seccomp-strict.Po +include ./$(DEPDIR)/prctl-securebits.Po +include ./$(DEPDIR)/prctl-tid_address.Po +include ./$(DEPDIR)/prctl-tsc.Po +include ./$(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +include ./$(DEPDIR)/preadv-preadv.Po +include ./$(DEPDIR)/preadv2-pwritev2.Po +include ./$(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +include ./$(DEPDIR)/print_maxfd.Po +include ./$(DEPDIR)/printstr.Po +include ./$(DEPDIR)/prlimit64.Po +include ./$(DEPDIR)/process_vm_readv.Po +include ./$(DEPDIR)/process_vm_writev.Po +include ./$(DEPDIR)/pselect6.Po +include ./$(DEPDIR)/ptrace.Po +include ./$(DEPDIR)/pwritev-pwritev.Po +include ./$(DEPDIR)/qual_fault.Po +include ./$(DEPDIR)/qual_inject-error-signal.Po +include ./$(DEPDIR)/qual_inject-retval.Po +include ./$(DEPDIR)/qual_inject-signal.Po +include ./$(DEPDIR)/qual_signal.Po +include ./$(DEPDIR)/quotactl-v.Po +include ./$(DEPDIR)/quotactl-xfs-v.Po +include ./$(DEPDIR)/quotactl-xfs.Po +include ./$(DEPDIR)/quotactl.Po +include ./$(DEPDIR)/read-write.Po +include ./$(DEPDIR)/readahead.Po +include ./$(DEPDIR)/readdir.Po +include ./$(DEPDIR)/readlink.Po +include ./$(DEPDIR)/readlinkat.Po +include ./$(DEPDIR)/readv.Po +include ./$(DEPDIR)/reboot.Po +include ./$(DEPDIR)/recvfrom.Po +include ./$(DEPDIR)/recvmmsg-timeout.Po +include ./$(DEPDIR)/recvmsg.Po +include ./$(DEPDIR)/redirect-fds.Po +include ./$(DEPDIR)/remap_file_pages.Po +include ./$(DEPDIR)/rename.Po +include ./$(DEPDIR)/renameat.Po +include ./$(DEPDIR)/renameat2.Po +include ./$(DEPDIR)/request_key.Po +include ./$(DEPDIR)/restart_syscall.Po +include ./$(DEPDIR)/rmdir.Po +include ./$(DEPDIR)/rt_sigpending.Po +include ./$(DEPDIR)/rt_sigprocmask.Po +include ./$(DEPDIR)/rt_sigqueueinfo.Po +include ./$(DEPDIR)/rt_sigsuspend.Po +include ./$(DEPDIR)/rt_sigtimedwait.Po +include ./$(DEPDIR)/rt_tgsigqueueinfo.Po +include ./$(DEPDIR)/sched_get_priority_mxx.Po +include ./$(DEPDIR)/sched_rr_get_interval.Po +include ./$(DEPDIR)/sched_xetaffinity.Po +include ./$(DEPDIR)/sched_xetattr.Po +include ./$(DEPDIR)/sched_xetparam.Po +include ./$(DEPDIR)/sched_xetscheduler.Po +include ./$(DEPDIR)/sched_yield.Po +include ./$(DEPDIR)/scm_rights.Po +include ./$(DEPDIR)/seccomp-filter-v.Po +include ./$(DEPDIR)/seccomp-filter.Po +include ./$(DEPDIR)/seccomp-strict.Po +include ./$(DEPDIR)/select.Po +include ./$(DEPDIR)/semop.Po +include ./$(DEPDIR)/sendfile.Po +include ./$(DEPDIR)/sendfile64.Po +include ./$(DEPDIR)/set_mempolicy.Po +include ./$(DEPDIR)/set_ptracer_any.Po +include ./$(DEPDIR)/setdomainname.Po +include ./$(DEPDIR)/setfsgid.Po +include ./$(DEPDIR)/setfsgid32.Po +include ./$(DEPDIR)/setfsuid.Po +include ./$(DEPDIR)/setfsuid32.Po +include ./$(DEPDIR)/setgid.Po +include ./$(DEPDIR)/setgid32.Po +include ./$(DEPDIR)/setgroups.Po +include ./$(DEPDIR)/setgroups32.Po +include ./$(DEPDIR)/sethostname.Po +include ./$(DEPDIR)/setns.Po +include ./$(DEPDIR)/setregid.Po +include ./$(DEPDIR)/setregid32.Po +include ./$(DEPDIR)/setresgid.Po +include ./$(DEPDIR)/setresgid32.Po +include ./$(DEPDIR)/setresuid.Po +include ./$(DEPDIR)/setresuid32.Po +include ./$(DEPDIR)/setreuid.Po +include ./$(DEPDIR)/setreuid32.Po +include ./$(DEPDIR)/setrlimit.Po +include ./$(DEPDIR)/setuid.Po +include ./$(DEPDIR)/setuid32.Po +include ./$(DEPDIR)/shmxt.Po +include ./$(DEPDIR)/shutdown.Po +include ./$(DEPDIR)/sigaction.Po +include ./$(DEPDIR)/sigaltstack.Po +include ./$(DEPDIR)/siginfo.Po +include ./$(DEPDIR)/signal_receive.Po +include ./$(DEPDIR)/signalfd4.Po +include ./$(DEPDIR)/sigreturn.Po +include ./$(DEPDIR)/sleep.Po +include ./$(DEPDIR)/socketcall.Po +include ./$(DEPDIR)/splice.Po +include ./$(DEPDIR)/stack-fcall-0.Po +include ./$(DEPDIR)/stack-fcall-1.Po +include ./$(DEPDIR)/stack-fcall-2.Po +include ./$(DEPDIR)/stack-fcall-3.Po +include ./$(DEPDIR)/stack-fcall.Po +include ./$(DEPDIR)/stat.Po +include ./$(DEPDIR)/stat64-stat64.Po +include ./$(DEPDIR)/statfs-statfs.Po +include ./$(DEPDIR)/statfs64.Po +include ./$(DEPDIR)/swap.Po +include ./$(DEPDIR)/symlink.Po +include ./$(DEPDIR)/symlinkat.Po +include ./$(DEPDIR)/sync.Po +include ./$(DEPDIR)/sync_file_range.Po +include ./$(DEPDIR)/sync_file_range2.Po +include ./$(DEPDIR)/sysinfo.Po +include ./$(DEPDIR)/syslog.Po +include ./$(DEPDIR)/tee.Po +include ./$(DEPDIR)/threads-execve.Po +include ./$(DEPDIR)/time.Po +include ./$(DEPDIR)/timer_create.Po +include ./$(DEPDIR)/timer_xettime.Po +include ./$(DEPDIR)/timerfd_xettime.Po +include ./$(DEPDIR)/times-fail.Po +include ./$(DEPDIR)/times.Po +include ./$(DEPDIR)/truncate.Po +include ./$(DEPDIR)/truncate64-truncate64.Po +include ./$(DEPDIR)/ugetrlimit.Po +include ./$(DEPDIR)/uio-uio.Po +include ./$(DEPDIR)/umask.Po +include ./$(DEPDIR)/umount.Po +include ./$(DEPDIR)/umount2.Po +include ./$(DEPDIR)/umoven-illptr.Po +include ./$(DEPDIR)/umovestr-illptr.Po +include ./$(DEPDIR)/umovestr.Po +include ./$(DEPDIR)/umovestr2.Po +include ./$(DEPDIR)/umovestr3.Po +include ./$(DEPDIR)/uname.Po +include ./$(DEPDIR)/unix-pair-send-recv.Po +include ./$(DEPDIR)/unix-pair-sendto-recvfrom.Po +include ./$(DEPDIR)/unlink.Po +include ./$(DEPDIR)/unlinkat.Po +include ./$(DEPDIR)/unshare.Po +include ./$(DEPDIR)/userfaultfd.Po +include ./$(DEPDIR)/ustat.Po +include ./$(DEPDIR)/utime.Po +include ./$(DEPDIR)/utimensat.Po +include ./$(DEPDIR)/utimes.Po +include ./$(DEPDIR)/vfork-f.Po +include ./$(DEPDIR)/vhangup.Po +include ./$(DEPDIR)/vmsplice.Po +include ./$(DEPDIR)/wait4-v.Po +include ./$(DEPDIR)/wait4.Po +include ./$(DEPDIR)/waitid-v.Po +include ./$(DEPDIR)/waitid.Po +include ./$(DEPDIR)/waitpid.Po +include ./$(DEPDIR)/xattr-strings.Po +include ./$(DEPDIR)/xattr.Po +include ./$(DEPDIR)/xet_robust_list.Po +include ./$(DEPDIR)/xetitimer.Po +include ./$(DEPDIR)/xetpgid.Po +include ./$(DEPDIR)/xetpriority.Po +include ./$(DEPDIR)/xettimeofday.Po + +.c.o: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +libtests_a-errno2name.o: errno2name.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.o -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +# $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c + +libtests_a-errno2name.obj: errno2name.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +# $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` + +libtests_a-error_msg.o: error_msg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.o -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +# $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c + +libtests_a-error_msg.obj: error_msg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.obj -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +# $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` + +libtests_a-fill_memory.o: fill_memory.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-fill_memory.o -MD -MP -MF $(DEPDIR)/libtests_a-fill_memory.Tpo -c -o libtests_a-fill_memory.o `test -f 'fill_memory.c' || echo '$(srcdir)/'`fill_memory.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-fill_memory.Tpo $(DEPDIR)/libtests_a-fill_memory.Po +# $(AM_V_CC)source='fill_memory.c' object='libtests_a-fill_memory.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-fill_memory.o `test -f 'fill_memory.c' || echo '$(srcdir)/'`fill_memory.c + +libtests_a-fill_memory.obj: fill_memory.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-fill_memory.obj -MD -MP -MF $(DEPDIR)/libtests_a-fill_memory.Tpo -c -o libtests_a-fill_memory.obj `if test -f 'fill_memory.c'; then $(CYGPATH_W) 'fill_memory.c'; else $(CYGPATH_W) '$(srcdir)/fill_memory.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-fill_memory.Tpo $(DEPDIR)/libtests_a-fill_memory.Po +# $(AM_V_CC)source='fill_memory.c' object='libtests_a-fill_memory.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-fill_memory.obj `if test -f 'fill_memory.c'; then $(CYGPATH_W) 'fill_memory.c'; else $(CYGPATH_W) '$(srcdir)/fill_memory.c'; fi` + +libtests_a-get_page_size.o: get_page_size.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.o -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +# $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c + +libtests_a-get_page_size.obj: get_page_size.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.obj -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +# $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` + +libtests_a-hexdump_strdup.o: hexdump_strdup.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +# $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c + +libtests_a-hexdump_strdup.obj: hexdump_strdup.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +# $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` + +libtests_a-hexquote_strndup.o: hexquote_strndup.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +# $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c + +libtests_a-hexquote_strndup.obj: hexquote_strndup.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +# $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` + +libtests_a-inode_of_sockfd.o: inode_of_sockfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.o -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +# $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c + +libtests_a-inode_of_sockfd.obj: inode_of_sockfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +# $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` + +libtests_a-libmmsg.o: libmmsg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libmmsg.o -MD -MP -MF $(DEPDIR)/libtests_a-libmmsg.Tpo -c -o libtests_a-libmmsg.o `test -f 'libmmsg.c' || echo '$(srcdir)/'`libmmsg.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libmmsg.Tpo $(DEPDIR)/libtests_a-libmmsg.Po +# $(AM_V_CC)source='libmmsg.c' object='libtests_a-libmmsg.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libmmsg.o `test -f 'libmmsg.c' || echo '$(srcdir)/'`libmmsg.c + +libtests_a-libmmsg.obj: libmmsg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libmmsg.obj -MD -MP -MF $(DEPDIR)/libtests_a-libmmsg.Tpo -c -o libtests_a-libmmsg.obj `if test -f 'libmmsg.c'; then $(CYGPATH_W) 'libmmsg.c'; else $(CYGPATH_W) '$(srcdir)/libmmsg.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libmmsg.Tpo $(DEPDIR)/libtests_a-libmmsg.Po +# $(AM_V_CC)source='libmmsg.c' object='libtests_a-libmmsg.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libmmsg.obj `if test -f 'libmmsg.c'; then $(CYGPATH_W) 'libmmsg.c'; else $(CYGPATH_W) '$(srcdir)/libmmsg.c'; fi` + +libtests_a-libsocketcall.o: libsocketcall.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libsocketcall.o -MD -MP -MF $(DEPDIR)/libtests_a-libsocketcall.Tpo -c -o libtests_a-libsocketcall.o `test -f 'libsocketcall.c' || echo '$(srcdir)/'`libsocketcall.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libsocketcall.Tpo $(DEPDIR)/libtests_a-libsocketcall.Po +# $(AM_V_CC)source='libsocketcall.c' object='libtests_a-libsocketcall.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libsocketcall.o `test -f 'libsocketcall.c' || echo '$(srcdir)/'`libsocketcall.c + +libtests_a-libsocketcall.obj: libsocketcall.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libsocketcall.obj -MD -MP -MF $(DEPDIR)/libtests_a-libsocketcall.Tpo -c -o libtests_a-libsocketcall.obj `if test -f 'libsocketcall.c'; then $(CYGPATH_W) 'libsocketcall.c'; else $(CYGPATH_W) '$(srcdir)/libsocketcall.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libsocketcall.Tpo $(DEPDIR)/libtests_a-libsocketcall.Po +# $(AM_V_CC)source='libsocketcall.c' object='libtests_a-libsocketcall.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libsocketcall.obj `if test -f 'libsocketcall.c'; then $(CYGPATH_W) 'libsocketcall.c'; else $(CYGPATH_W) '$(srcdir)/libsocketcall.c'; fi` + +libtests_a-overflowuid.o: overflowuid.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.o -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +# $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c + +libtests_a-overflowuid.obj: overflowuid.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.obj -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +# $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` + +libtests_a-pipe_maxfd.o: pipe_maxfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-pipe_maxfd.o -MD -MP -MF $(DEPDIR)/libtests_a-pipe_maxfd.Tpo -c -o libtests_a-pipe_maxfd.o `test -f 'pipe_maxfd.c' || echo '$(srcdir)/'`pipe_maxfd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-pipe_maxfd.Tpo $(DEPDIR)/libtests_a-pipe_maxfd.Po +# $(AM_V_CC)source='pipe_maxfd.c' object='libtests_a-pipe_maxfd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-pipe_maxfd.o `test -f 'pipe_maxfd.c' || echo '$(srcdir)/'`pipe_maxfd.c + +libtests_a-pipe_maxfd.obj: pipe_maxfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-pipe_maxfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-pipe_maxfd.Tpo -c -o libtests_a-pipe_maxfd.obj `if test -f 'pipe_maxfd.c'; then $(CYGPATH_W) 'pipe_maxfd.c'; else $(CYGPATH_W) '$(srcdir)/pipe_maxfd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-pipe_maxfd.Tpo $(DEPDIR)/libtests_a-pipe_maxfd.Po +# $(AM_V_CC)source='pipe_maxfd.c' object='libtests_a-pipe_maxfd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-pipe_maxfd.obj `if test -f 'pipe_maxfd.c'; then $(CYGPATH_W) 'pipe_maxfd.c'; else $(CYGPATH_W) '$(srcdir)/pipe_maxfd.c'; fi` + +libtests_a-print_quoted_string.o: print_quoted_string.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.o -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +# $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c + +libtests_a-print_quoted_string.obj: print_quoted_string.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.obj -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +# $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` + +libtests_a-printflags.o: printflags.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.o -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +# $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c + +libtests_a-printflags.obj: printflags.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.obj -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +# $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` + +libtests_a-printxval.o: printxval.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.o -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +# $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c + +libtests_a-printxval.obj: printxval.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.obj -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +# $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` + +libtests_a-signal2name.o: signal2name.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-signal2name.o -MD -MP -MF $(DEPDIR)/libtests_a-signal2name.Tpo -c -o libtests_a-signal2name.o `test -f 'signal2name.c' || echo '$(srcdir)/'`signal2name.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-signal2name.Tpo $(DEPDIR)/libtests_a-signal2name.Po +# $(AM_V_CC)source='signal2name.c' object='libtests_a-signal2name.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-signal2name.o `test -f 'signal2name.c' || echo '$(srcdir)/'`signal2name.c + +libtests_a-signal2name.obj: signal2name.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-signal2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-signal2name.Tpo -c -o libtests_a-signal2name.obj `if test -f 'signal2name.c'; then $(CYGPATH_W) 'signal2name.c'; else $(CYGPATH_W) '$(srcdir)/signal2name.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-signal2name.Tpo $(DEPDIR)/libtests_a-signal2name.Po +# $(AM_V_CC)source='signal2name.c' object='libtests_a-signal2name.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-signal2name.obj `if test -f 'signal2name.c'; then $(CYGPATH_W) 'signal2name.c'; else $(CYGPATH_W) '$(srcdir)/signal2name.c'; fi` + +libtests_a-sprintrc.o: sprintrc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-sprintrc.o -MD -MP -MF $(DEPDIR)/libtests_a-sprintrc.Tpo -c -o libtests_a-sprintrc.o `test -f 'sprintrc.c' || echo '$(srcdir)/'`sprintrc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-sprintrc.Tpo $(DEPDIR)/libtests_a-sprintrc.Po +# $(AM_V_CC)source='sprintrc.c' object='libtests_a-sprintrc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-sprintrc.o `test -f 'sprintrc.c' || echo '$(srcdir)/'`sprintrc.c + +libtests_a-sprintrc.obj: sprintrc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-sprintrc.obj -MD -MP -MF $(DEPDIR)/libtests_a-sprintrc.Tpo -c -o libtests_a-sprintrc.obj `if test -f 'sprintrc.c'; then $(CYGPATH_W) 'sprintrc.c'; else $(CYGPATH_W) '$(srcdir)/sprintrc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-sprintrc.Tpo $(DEPDIR)/libtests_a-sprintrc.Po +# $(AM_V_CC)source='sprintrc.c' object='libtests_a-sprintrc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-sprintrc.obj `if test -f 'sprintrc.c'; then $(CYGPATH_W) 'sprintrc.c'; else $(CYGPATH_W) '$(srcdir)/sprintrc.c'; fi` + +libtests_a-tail_alloc.o: tail_alloc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.o -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +# $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c + +libtests_a-tail_alloc.obj: tail_alloc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.obj -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +# $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` + +libtests_a-tprintf.o: tprintf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.o -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +# $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c + +libtests_a-tprintf.obj: tprintf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.obj -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +# $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` + +fstat64-fstat64.o: fstat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.o -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po +# $(AM_V_CC)source='fstat64.c' object='fstat64-fstat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c + +fstat64-fstat64.obj: fstat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.obj -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.obj `if test -f 'fstat64.c'; then $(CYGPATH_W) 'fstat64.c'; else $(CYGPATH_W) '$(srcdir)/fstat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po +# $(AM_V_CC)source='fstat64.c' object='fstat64-fstat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstat64-fstat64.obj `if test -f 'fstat64.c'; then $(CYGPATH_W) 'fstat64.c'; else $(CYGPATH_W) '$(srcdir)/fstat64.c'; fi` + +fstatat64-fstatat64.o: fstatat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstatat64-fstatat64.o -MD -MP -MF $(DEPDIR)/fstatat64-fstatat64.Tpo -c -o fstatat64-fstatat64.o `test -f 'fstatat64.c' || echo '$(srcdir)/'`fstatat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/fstatat64-fstatat64.Tpo $(DEPDIR)/fstatat64-fstatat64.Po +# $(AM_V_CC)source='fstatat64.c' object='fstatat64-fstatat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstatat64-fstatat64.o `test -f 'fstatat64.c' || echo '$(srcdir)/'`fstatat64.c + +fstatat64-fstatat64.obj: fstatat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstatat64-fstatat64.obj -MD -MP -MF $(DEPDIR)/fstatat64-fstatat64.Tpo -c -o fstatat64-fstatat64.obj `if test -f 'fstatat64.c'; then $(CYGPATH_W) 'fstatat64.c'; else $(CYGPATH_W) '$(srcdir)/fstatat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/fstatat64-fstatat64.Tpo $(DEPDIR)/fstatat64-fstatat64.Po +# $(AM_V_CC)source='fstatat64.c' object='fstatat64-fstatat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstatat64-fstatat64.obj `if test -f 'fstatat64.c'; then $(CYGPATH_W) 'fstatat64.c'; else $(CYGPATH_W) '$(srcdir)/fstatat64.c'; fi` + +ftruncate64-ftruncate64.o: ftruncate64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftruncate64-ftruncate64.o -MD -MP -MF $(DEPDIR)/ftruncate64-ftruncate64.Tpo -c -o ftruncate64-ftruncate64.o `test -f 'ftruncate64.c' || echo '$(srcdir)/'`ftruncate64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/ftruncate64-ftruncate64.Tpo $(DEPDIR)/ftruncate64-ftruncate64.Po +# $(AM_V_CC)source='ftruncate64.c' object='ftruncate64-ftruncate64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftruncate64-ftruncate64.o `test -f 'ftruncate64.c' || echo '$(srcdir)/'`ftruncate64.c + +ftruncate64-ftruncate64.obj: ftruncate64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftruncate64-ftruncate64.obj -MD -MP -MF $(DEPDIR)/ftruncate64-ftruncate64.Tpo -c -o ftruncate64-ftruncate64.obj `if test -f 'ftruncate64.c'; then $(CYGPATH_W) 'ftruncate64.c'; else $(CYGPATH_W) '$(srcdir)/ftruncate64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/ftruncate64-ftruncate64.Tpo $(DEPDIR)/ftruncate64-ftruncate64.Po +# $(AM_V_CC)source='ftruncate64.c' object='ftruncate64-ftruncate64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftruncate64-ftruncate64.obj `if test -f 'ftruncate64.c'; then $(CYGPATH_W) 'ftruncate64.c'; else $(CYGPATH_W) '$(srcdir)/ftruncate64.c'; fi` + +lstat64-lstat64.o: lstat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lstat64-lstat64.o -MD -MP -MF $(DEPDIR)/lstat64-lstat64.Tpo -c -o lstat64-lstat64.o `test -f 'lstat64.c' || echo '$(srcdir)/'`lstat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/lstat64-lstat64.Tpo $(DEPDIR)/lstat64-lstat64.Po +# $(AM_V_CC)source='lstat64.c' object='lstat64-lstat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lstat64-lstat64.o `test -f 'lstat64.c' || echo '$(srcdir)/'`lstat64.c + +lstat64-lstat64.obj: lstat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lstat64-lstat64.obj -MD -MP -MF $(DEPDIR)/lstat64-lstat64.Tpo -c -o lstat64-lstat64.obj `if test -f 'lstat64.c'; then $(CYGPATH_W) 'lstat64.c'; else $(CYGPATH_W) '$(srcdir)/lstat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/lstat64-lstat64.Tpo $(DEPDIR)/lstat64-lstat64.Po +# $(AM_V_CC)source='lstat64.c' object='lstat64-lstat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lstat64-lstat64.obj `if test -f 'lstat64.c'; then $(CYGPATH_W) 'lstat64.c'; else $(CYGPATH_W) '$(srcdir)/lstat64.c'; fi` + +mmap64-mmap64.o: mmap64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmap64-mmap64.o -MD -MP -MF $(DEPDIR)/mmap64-mmap64.Tpo -c -o mmap64-mmap64.o `test -f 'mmap64.c' || echo '$(srcdir)/'`mmap64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/mmap64-mmap64.Tpo $(DEPDIR)/mmap64-mmap64.Po +# $(AM_V_CC)source='mmap64.c' object='mmap64-mmap64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap64-mmap64.o `test -f 'mmap64.c' || echo '$(srcdir)/'`mmap64.c + +mmap64-mmap64.obj: mmap64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmap64-mmap64.obj -MD -MP -MF $(DEPDIR)/mmap64-mmap64.Tpo -c -o mmap64-mmap64.obj `if test -f 'mmap64.c'; then $(CYGPATH_W) 'mmap64.c'; else $(CYGPATH_W) '$(srcdir)/mmap64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/mmap64-mmap64.Tpo $(DEPDIR)/mmap64-mmap64.Po +# $(AM_V_CC)source='mmap64.c' object='mmap64-mmap64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap64-mmap64.obj `if test -f 'mmap64.c'; then $(CYGPATH_W) 'mmap64.c'; else $(CYGPATH_W) '$(srcdir)/mmap64.c'; fi` + +newfstatat-newfstatat.o: newfstatat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT newfstatat-newfstatat.o -MD -MP -MF $(DEPDIR)/newfstatat-newfstatat.Tpo -c -o newfstatat-newfstatat.o `test -f 'newfstatat.c' || echo '$(srcdir)/'`newfstatat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/newfstatat-newfstatat.Tpo $(DEPDIR)/newfstatat-newfstatat.Po +# $(AM_V_CC)source='newfstatat.c' object='newfstatat-newfstatat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.o `test -f 'newfstatat.c' || echo '$(srcdir)/'`newfstatat.c + +newfstatat-newfstatat.obj: newfstatat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT newfstatat-newfstatat.obj -MD -MP -MF $(DEPDIR)/newfstatat-newfstatat.Tpo -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/newfstatat-newfstatat.Tpo $(DEPDIR)/newfstatat-newfstatat.Po +# $(AM_V_CC)source='newfstatat.c' object='newfstatat-newfstatat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` + +pread64_pwrite64-pread64-pwrite64.o: pread64-pwrite64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.o -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +# $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c + +pread64_pwrite64-pread64-pwrite64.obj: pread64-pwrite64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.obj -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +# $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` + +preadv-preadv.o: preadv.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.o -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c + $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +# $(AM_V_CC)source='preadv.c' object='preadv-preadv.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c + +preadv-preadv.obj: preadv.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.obj -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +# $(AM_V_CC)source='preadv.c' object='preadv-preadv.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` + +preadv_pwritev-preadv-pwritev.o: preadv-pwritev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.o -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c + $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +# $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c + +preadv_pwritev-preadv-pwritev.obj: preadv-pwritev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.obj -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +# $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` + +pwritev-pwritev.o: pwritev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.o -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c + $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +# $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c + +pwritev-pwritev.obj: pwritev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.obj -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +# $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` + +stat64-stat64.o: stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.o -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po +# $(AM_V_CC)source='stat64.c' object='stat64-stat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c + +stat64-stat64.obj: stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.obj -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po +# $(AM_V_CC)source='stat64.c' object='stat64-stat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat64-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` + +statfs-statfs.o: statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT statfs-statfs.o -MD -MP -MF $(DEPDIR)/statfs-statfs.Tpo -c -o statfs-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/statfs-statfs.Tpo $(DEPDIR)/statfs-statfs.Po +# $(AM_V_CC)source='statfs.c' object='statfs-statfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o statfs-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + +statfs-statfs.obj: statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT statfs-statfs.obj -MD -MP -MF $(DEPDIR)/statfs-statfs.Tpo -c -o statfs-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/statfs-statfs.Tpo $(DEPDIR)/statfs-statfs.Po +# $(AM_V_CC)source='statfs.c' object='statfs-statfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o statfs-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + +truncate64-truncate64.o: truncate64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT truncate64-truncate64.o -MD -MP -MF $(DEPDIR)/truncate64-truncate64.Tpo -c -o truncate64-truncate64.o `test -f 'truncate64.c' || echo '$(srcdir)/'`truncate64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/truncate64-truncate64.Tpo $(DEPDIR)/truncate64-truncate64.Po +# $(AM_V_CC)source='truncate64.c' object='truncate64-truncate64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o truncate64-truncate64.o `test -f 'truncate64.c' || echo '$(srcdir)/'`truncate64.c + +truncate64-truncate64.obj: truncate64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT truncate64-truncate64.obj -MD -MP -MF $(DEPDIR)/truncate64-truncate64.Tpo -c -o truncate64-truncate64.obj `if test -f 'truncate64.c'; then $(CYGPATH_W) 'truncate64.c'; else $(CYGPATH_W) '$(srcdir)/truncate64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/truncate64-truncate64.Tpo $(DEPDIR)/truncate64-truncate64.Po +# $(AM_V_CC)source='truncate64.c' object='truncate64-truncate64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o truncate64-truncate64.obj `if test -f 'truncate64.c'; then $(CYGPATH_W) 'truncate64.c'; else $(CYGPATH_W) '$(srcdir)/truncate64.c'; fi` + +uio-uio.o: uio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uio-uio.o -MD -MP -MF $(DEPDIR)/uio-uio.Tpo -c -o uio-uio.o `test -f 'uio.c' || echo '$(srcdir)/'`uio.c + $(AM_V_at)$(am__mv) $(DEPDIR)/uio-uio.Tpo $(DEPDIR)/uio-uio.Po +# $(AM_V_CC)source='uio.c' object='uio-uio.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uio-uio.o `test -f 'uio.c' || echo '$(srcdir)/'`uio.c + +uio-uio.obj: uio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uio-uio.obj -MD -MP -MF $(DEPDIR)/uio-uio.Tpo -c -o uio-uio.obj `if test -f 'uio.c'; then $(CYGPATH_W) 'uio.c'; else $(CYGPATH_W) '$(srcdir)/uio.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/uio-uio.Tpo $(DEPDIR)/uio-uio.Po +# $(AM_V_CC)source='uio.c' object='uio-uio.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uio-uio.obj `if test -f 'uio.c'; then $(CYGPATH_W) 'uio.c'; else $(CYGPATH_W) '$(srcdir)/uio.c'; fi` +check-valgrind-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_LIBRARIES) $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +#.test$(EXEEXT).log: +# @p='$<'; \ +# $(am__set_b); \ +# $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +# --log-file $$b.log --trs-file $$b.trs \ +# $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +# "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-am + +check-valgrind-am: check-valgrind-local + +clean: clean-am + +clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am \ + check-valgrind-am check-valgrind-local clean \ + clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am + + + +# Valgrind check +# +# Optional: +# - VALGRIND_SUPPRESSIONS_FILES: Space-separated list of Valgrind suppressions +# files to load. (Default: empty) +# - VALGRIND_FLAGS: General flags to pass to all Valgrind tools. +# (Default: --num-callers=30) +# - VALGRIND_$toolname_FLAGS: Flags to pass to Valgrind $toolname (one of: +# memcheck, helgrind, drd, sgcheck). (Default: various) + +# Optional variables +VALGRIND_SUPPRESSIONS ?= $(addprefix --suppressions=,$(VALGRIND_SUPPRESSIONS_FILES)) +VALGRIND_FLAGS ?= --num-callers=30 +VALGRIND_memcheck_FLAGS ?= --leak-check=full --show-reachable=no +VALGRIND_helgrind_FLAGS ?= --history-level=approx +VALGRIND_drd_FLAGS ?= +VALGRIND_sgcheck_FLAGS ?= + +# Internal use +valgrind_log_files = $(addprefix test-suite-,$(addsuffix .log,$(valgrind_tools))) + +valgrind_memcheck_flags = --tool=memcheck $(VALGRIND_memcheck_FLAGS) +valgrind_helgrind_flags = --tool=helgrind $(VALGRIND_helgrind_FLAGS) +valgrind_drd_flags = --tool=drd $(VALGRIND_drd_FLAGS) +valgrind_sgcheck_flags = --tool=exp-sgcheck $(VALGRIND_sgcheck_FLAGS) + +valgrind_quiet = $(valgrind_quiet_$(V)) +valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY)) +valgrind_quiet_0 = --quiet +valgrind_v_use = $(valgrind_v_use_$(V)) +valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY)) +valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$@):; + +# Support running with and without libtool. +ifneq ($(LIBTOOL),) +valgrind_lt = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=execute +else +valgrind_lt = +endif + +# Use recursive makes in order to ignore errors during check +check-valgrind: +ifeq ($(VALGRIND_ENABLED),yes) + -$(AM_V_at)$(foreach tool,$(valgrind_enabled_tools), \ + $(MAKE) $(AM_MAKEFLAGS) -k check-valgrind-$(tool); \ + ) +else + @echo "Need to reconfigure with --enable-valgrind" +endif + +# Valgrind running +VALGRIND_TESTS_ENVIRONMENT = \ + $(TESTS_ENVIRONMENT) \ + env VALGRIND=$(VALGRIND) \ + G_SLICE=always-malloc,debug-blocks \ + G_DEBUG=fatal-warnings,fatal-criticals,gc-friendly + +VALGRIND_LOG_COMPILER = \ + $(valgrind_lt) \ + $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) + +define valgrind_tool_rule = +check-valgrind-$(1): $$(BUILT_SOURCES) +ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes) + $$(valgrind_v_use)$$(MAKE) $$(AM_MAKEFLAGS) check-am \ + TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \ + LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \ + LOG_FLAGS="$$(valgrind_$(1)_flags)" \ + TEST_SUITE_LOG=test-suite-$(1).log +else ifeq ($$(VALGRIND_ENABLED),yes) + @echo "Need to reconfigure with --enable-valgrind-$(1)" +else + @echo "Need to reconfigure with --enable-valgrind" +endif +endef + +$(foreach tool,$(valgrind_tools),$(eval $(call valgrind_tool_rule,$(tool)))) + +AM_DISTCHECK_CONFIGURE_FLAGS ?= +AM_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind + +MOSTLYCLEANFILES ?= +MOSTLYCLEANFILES += $(valgrind_log_files) + +.PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools)) + + +ksysent.h: $(srcdir)/ksysent.sed + echo '#include ' | \ + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 + LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 + mv -f $@.t2 $@ + rm -f $@.t1 + +ksysent.$(OBJEXT): ksysent.h +$(objects): scno.h + +syscallent.i: $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h + $(CPP) -P $(SCNO_CPPFLAGS) $^ -o $@ + +scno.h: $(top_srcdir)/scno.head syscallent.i + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + cat $< >> $@-t + LC_ALL=C sed -n '$(SCNO_SED)' $(filter-out $<,$^) >> $@-t + mv $@-t $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests-m32/Makefile.am b/tests-m32/Makefile.am new file mode 100644 index 000000000..8d10878bd --- /dev/null +++ b/tests-m32/Makefile.am @@ -0,0 +1,962 @@ +# Automake input for strace tests. +# +# Copyright (c) 2011-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +OS = linux +ARCH = @arch_m32@ +MPERS_NAME = m32 +ARCH_MFLAGS = -DMPERS_IS_$(MPERS_NAME) -m32 +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = $(ARCH_MFLAGS) \ + -I$(builddir) \ + -I$(top_builddir)/$(OS)/$(ARCH) \ + -I$(top_srcdir)/$(OS)/$(ARCH) \ + -I$(top_builddir)/$(OS) \ + -I$(top_srcdir)/$(OS) \ + -I$(top_builddir) \ + -I$(top_srcdir) +AM_LDFLAGS = $(ARCH_MFLAGS) + +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + fill_memory.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + libmmsg.c \ + libsocketcall.c \ + overflowuid.c \ + pipe_maxfd.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + signal2name.c \ + sprintrc.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a + +check_PROGRAMS = \ + _newselect \ + accept \ + accept4 \ + access \ + acct \ + add_key \ + adjtimex \ + aio \ + alarm \ + answer \ + attach-f-p \ + attach-f-p-cmd \ + attach-p-cmd-cmd \ + attach-p-cmd-p \ + bpf \ + brk \ + btrfs \ + caps \ + caps-abbrev \ + chmod \ + chown \ + chown32 \ + chroot \ + clock_adjtime \ + clock_nanosleep \ + clock_xettime \ + copy_file_range \ + count-f \ + creat \ + delete_module \ + dup \ + dup2 \ + dup3 \ + epoll_create \ + epoll_create1 \ + epoll_ctl \ + epoll_pwait \ + epoll_wait \ + erestartsys \ + eventfd \ + execve \ + execve-v \ + execveat \ + execveat-v \ + faccessat \ + fadvise64 \ + fadvise64_64 \ + fallocate \ + fanotify_init \ + fanotify_mark \ + fchdir \ + fchmod \ + fchmodat \ + fchown \ + fchown32 \ + fchownat \ + fcntl \ + fcntl64 \ + fdatasync \ + file_handle \ + file_ioctl \ + filter-unavailable \ + finit_module \ + flock \ + fork-f \ + fstat \ + fstat64 \ + fstatat64 \ + fstatfs \ + fstatfs64 \ + fsync \ + ftruncate \ + ftruncate64 \ + futex \ + futimesat \ + get_mempolicy \ + getcpu \ + getcwd \ + getdents \ + getdents64 \ + getegid \ + getegid32 \ + geteuid \ + geteuid32 \ + getgid \ + getgid32 \ + getgroups \ + getgroups32 \ + getpeername \ + getpgrp \ + getrandom \ + getresgid \ + getresgid32 \ + getresuid \ + getresuid32 \ + getrlimit \ + getrusage \ + getsid \ + getsockname \ + getuid \ + getuid32 \ + getxxid \ + inet-cmsg \ + init_module \ + inotify \ + inotify_init1 \ + ioctl \ + ioctl_block \ + ioctl_dm \ + ioctl_dm-v \ + ioctl_evdev \ + ioctl_evdev-v \ + ioctl_loop \ + ioctl_loop-nv \ + ioctl_loop-v \ + ioctl_mtd \ + ioctl_rtc \ + ioctl_rtc-v \ + ioctl_scsi \ + ioctl_sg_io_v3 \ + ioctl_sg_io_v4 \ + ioctl_sock_gifconf \ + ioctl_uffdio \ + ioctl_v4l2 \ + ioperm \ + iopl \ + ioprio \ + ip_mreq \ + ipc \ + ipc_msg \ + ipc_msgbuf \ + ipc_sem \ + ipc_shm \ + kcmp \ + kexec_file_load \ + kexec_load \ + keyctl \ + kill \ + ksysent \ + lchown \ + lchown32 \ + link \ + linkat \ + llseek \ + lookup_dcookie \ + lseek \ + lstat \ + lstat64 \ + mbind \ + membarrier \ + memfd_create \ + migrate_pages \ + mincore \ + mkdir \ + mkdirat \ + mknod \ + mknodat \ + mlock \ + mlock2 \ + mlockall \ + mmap \ + mmap64 \ + mmsg \ + mmsg-silent \ + mmsg_name \ + mmsg_name-v \ + mount \ + move_pages \ + mq \ + mq_sendrecv \ + mq_sendrecv-read \ + mq_sendrecv-write \ + msg_control \ + msg_control-v \ + msg_name \ + munlockall \ + nanosleep \ + net-accept-connect \ + net-icmp_filter \ + net-sockaddr \ + net-y-unix \ + net-yy-inet \ + net-yy-netlink \ + net-yy-unix \ + netlink_inet_diag \ + netlink_netlink_diag \ + netlink_protocol \ + netlink_unix_diag \ + newfstatat \ + nsyscalls \ + old_mmap \ + oldfstat \ + oldlstat \ + oldselect \ + oldstat \ + open \ + openat \ + pause \ + pc \ + perf_event_open \ + perf_event_open_nonverbose \ + perf_event_open_unabbrev \ + personality \ + pipe \ + pipe2 \ + pkey_alloc \ + pkey_free \ + pkey_mprotect \ + poll \ + ppoll \ + prctl-arg2-intptr \ + prctl-dumpable \ + prctl-name \ + prctl-no-args \ + prctl-pdeathsig \ + prctl-seccomp-filter-v \ + prctl-seccomp-strict \ + prctl-securebits \ + prctl-tid_address \ + prctl-tsc \ + pread64-pwrite64 \ + preadv \ + preadv-pwritev \ + preadv2-pwritev2 \ + print_maxfd \ + printstr \ + prlimit64 \ + process_vm_readv \ + process_vm_writev \ + pselect6 \ + ptrace \ + pwritev \ + qual_fault \ + qual_inject-error-signal \ + qual_inject-retval \ + qual_inject-signal \ + qual_signal \ + quotactl \ + quotactl-v \ + quotactl-xfs \ + quotactl-xfs-v \ + read-write \ + readahead \ + readdir \ + readlink \ + readlinkat \ + readv \ + reboot \ + recvfrom \ + recvmmsg-timeout \ + recvmsg \ + redirect-fds \ + remap_file_pages \ + rename \ + renameat \ + renameat2 \ + request_key \ + restart_syscall \ + rmdir \ + rt_sigpending \ + rt_sigprocmask \ + rt_sigqueueinfo \ + rt_sigsuspend \ + rt_sigtimedwait \ + rt_tgsigqueueinfo \ + sched_get_priority_mxx \ + sched_rr_get_interval \ + sched_xetaffinity \ + sched_xetattr \ + sched_xetparam \ + sched_xetscheduler \ + sched_yield \ + scm_rights \ + seccomp-filter \ + seccomp-filter-v \ + seccomp-strict \ + select \ + semop \ + sendfile \ + sendfile64 \ + set_mempolicy \ + set_ptracer_any \ + setdomainname \ + setfsgid \ + setfsgid32 \ + setfsuid \ + setfsuid32 \ + setgid \ + setgid32 \ + setgroups \ + setgroups32 \ + sethostname \ + setns \ + setregid \ + setregid32 \ + setresgid \ + setresgid32 \ + setresuid \ + setresuid32 \ + setreuid \ + setreuid32 \ + setrlimit \ + setuid \ + setuid32 \ + shmxt \ + shutdown \ + sigaction \ + sigaltstack \ + siginfo \ + signal_receive \ + signalfd4 \ + sigreturn \ + sleep \ + socketcall \ + splice \ + stack-fcall \ + stat \ + stat64 \ + statfs \ + statfs64 \ + swap \ + symlink \ + symlinkat \ + sync \ + sync_file_range \ + sync_file_range2 \ + sysinfo \ + syslog \ + tee \ + threads-execve \ + time \ + timer_create \ + timer_xettime \ + timerfd_xettime \ + times \ + times-fail \ + truncate \ + truncate64 \ + ugetrlimit \ + uio \ + umask \ + umount \ + umount2 \ + umoven-illptr \ + umovestr \ + umovestr-illptr \ + umovestr2 \ + umovestr3 \ + uname \ + unix-pair-send-recv \ + unix-pair-sendto-recvfrom \ + unlink \ + unlinkat \ + unshare \ + userfaultfd \ + ustat \ + utime \ + utimensat \ + utimes \ + vfork-f \ + vhangup \ + vmsplice \ + wait4 \ + wait4-v \ + waitid \ + waitid-v \ + waitpid \ + xattr \ + xattr-strings \ + xet_robust_list \ + xetitimer \ + xetpgid \ + xetpriority \ + xettimeofday \ + # end of check_PROGRAMS + +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) +fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mq_LDADD = -lrt $(LDADD) +mq_sendrecv_LDADD = -lrt $(LDADD) +mq_sendrecv_read_LDADD = -lrt $(LDADD) +mq_sendrecv_write_LDADD = -lrt $(LDADD) +newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +threads_execve_LDADD = -lrt -lpthread $(LDADD) +times_LDADD = -lrt $(LDADD) +truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 + +stack_fcall_SOURCES = stack-fcall.c \ + stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c + +if USE_LIBUNWIND +LIBUNWIND_TESTS = strace-k.test +else +LIBUNWIND_TESTS = +endif + +DECODER_TESTS = \ + _newselect.test \ + accept.test \ + accept4.test \ + access.test \ + acct.test \ + add_key.test \ + adjtimex.test \ + aio.test \ + alarm.test \ + bpf.test \ + brk.test \ + btrfs-v.test \ + btrfs-vw.test \ + btrfs-w.test \ + btrfs.test \ + caps-abbrev.test \ + caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ + clock_nanosleep.test \ + clock_xettime.test \ + copy_file_range.test \ + creat.test \ + delete_module.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ + epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ + erestartsys.test \ + eventfd.test \ + execve-v.test \ + execve.test \ + execveat-v.test \ + execveat.test \ + faccessat.test \ + fadvise64.test \ + fadvise64_64.test \ + fallocate.test \ + fanotify_init.test \ + fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ + fcntl.test \ + fcntl64.test \ + fdatasync.test \ + file_handle.test \ + file_ioctl.test \ + finit_module.test \ + flock.test \ + fstat.test \ + fstat64.test \ + fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ + ftruncate.test \ + ftruncate64.test \ + futex.test \ + futimesat.test \ + get_mempolicy.test \ + getcpu.test \ + getcwd.test \ + getdents.test \ + getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpeername.test \ + getpgrp.test \ + getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrlimit.test \ + getrusage.test \ + getsid.test \ + getsockname.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ + inet-cmsg.test \ + init_module.test \ + inotify.test \ + inotify_init1.test \ + ioctl.test \ + ioctl_block.test \ + ioctl_dm-v.test \ + ioctl_dm.test \ + ioctl_evdev-v.test \ + ioctl_evdev.test \ + ioctl_loop-nv.test \ + ioctl_loop-v.test \ + ioctl_loop.test \ + ioctl_mtd.test \ + ioctl_rtc-v.test \ + ioctl_rtc.test \ + ioctl_scsi.test \ + ioctl_sg_io_v3.test \ + ioctl_sg_io_v4.test \ + ioctl_sock_gifconf.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ + ioprio.test \ + ip_mreq.test \ + ipc.test \ + ipc_msg.test \ + ipc_msgbuf.test \ + ipc_sem.test \ + ipc_shm.test \ + kcmp.test \ + kexec_file_load.test \ + kexec_load.test \ + keyctl.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ + llseek.test \ + lookup_dcookie.test \ + lseek.test \ + lstat.test \ + lstat64.test \ + mbind.test \ + membarrier.test \ + memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ + mlock2.test \ + mlockall.test \ + mmap.test \ + mmap64.test \ + mmsg-silent.test \ + mmsg.test \ + mmsg_name-v.test \ + mmsg_name.test \ + mount.test \ + move_pages.test \ + mq.test \ + mq_sendrecv-read.test \ + mq_sendrecv-write.test \ + mq_sendrecv.test \ + msg_control-v.test \ + msg_control.test \ + msg_name.test \ + munlockall.test \ + nanosleep.test \ + net-icmp_filter.test \ + net-sockaddr.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ + net.test \ + netlink_protocol.test \ + newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ + oldfstat.test \ + oldlstat.test \ + oldselect.test \ + oldstat.test \ + open.test \ + openat.test \ + pause.test \ + perf_event_open.test \ + perf_event_open_nonverbose.test \ + perf_event_open_unabbrev.test \ + personality.test \ + pipe.test \ + pipe2.test \ + pkey_alloc.test \ + pkey_free.test \ + pkey_mprotect.test \ + poll.test \ + ppoll.test \ + prctl-arg2-intptr.test \ + prctl-dumpable.test \ + prctl-name.test \ + prctl-no-args.test \ + prctl-pdeathsig.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + prctl-securebits.test \ + prctl-tid_address.test \ + prctl-tsc.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv.test \ + preadv2-pwritev2.test \ + printstr.test \ + prlimit64.test \ + process_vm_readv.test \ + process_vm_writev.test \ + pselect6.test \ + ptrace.test \ + pwritev.test \ + qual_fault-exit_group.test \ + quotactl-v.test \ + quotactl-xfs-v.test \ + quotactl-xfs.test \ + quotactl.test \ + read-write.test \ + readahead.test \ + readdir.test \ + readlink.test \ + readlinkat.test \ + readv.test \ + reboot.test \ + recvfrom.test \ + recvmmsg-timeout.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + request_key.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ + rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ + sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ + scm_rights-fd.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ + select.test \ + semop.test \ + sendfile.test \ + sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setns.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setrlimit.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ + shutdown.test \ + sigaction.test \ + sigaltstack.test \ + siginfo.test \ + signalfd4.test \ + sigreturn.test \ + socketcall.test \ + splice.test \ + stat.test \ + stat64.test \ + statfs.test \ + statfs64.test \ + sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ + sysinfo.test \ + syslog.test \ + tee.test \ + time.test \ + timer_create.test \ + timer_xettime.test \ + timerfd_xettime.test \ + times-fail.test \ + times.test \ + truncate.test \ + truncate64.test \ + ugetrlimit.test \ + uio.test \ + umask.test \ + umount.test \ + umount2.test \ + umoven-illptr.test \ + umovestr-illptr.test \ + umovestr.test \ + umovestr2.test \ + umovestr3.test \ + uname.test \ + unix-pair-send-recv.test \ + unix-pair-sendto-recvfrom.test \ + unlink.test \ + unlinkat.test \ + unshare.test \ + userfaultfd.test \ + ustat.test \ + utime.test \ + utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ + wait4-v.test \ + wait4.test \ + waitid-v.test \ + waitid.test \ + waitpid.test \ + xattr-strings.test \ + xattr.test \ + xet_robust_list.test \ + xetitimer.test \ + xetpgid.test \ + xetpriority.test \ + xettimeofday.test \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ + count.test \ + detach-running.test \ + detach-sleeping.test \ + detach-stopped.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + options-syntax.test \ + pc.test \ + qual_fault-syntax.test \ + qual_fault.test \ + qual_inject-error-signal.test \ + qual_inject-retval.test \ + qual_inject-signal.test \ + qual_inject-syntax.test \ + qual_signal.test \ + qual_syscall.test \ + redirect-fds.test \ + redirect.test \ + restart_syscall.test \ + signal_receive.test \ + strace-C.test \ + strace-E.test \ + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + threads-execve.test \ + vfork-f.test \ + # end of MISC_TESTS + +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS) + +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) + +TEST_LOG_COMPILER = env +AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh + +@VALGRIND_CHECK_RULES@ +VALGRIND_FLAGS = --quiet +VALGRIND_SUPPRESSIONS_FILES = $(srcdir)/strace.supp + +EXTRA_DIST = init.sh run.sh match.awk \ + caps-abbrev.awk \ + caps.awk \ + count-f.expected \ + eventfd.expected \ + fadvise.h \ + filter-unavailable.expected \ + fstatat.c \ + fstatx.c \ + getresugid.c \ + init_delete_module.h \ + ipc.sh \ + ipc_msgbuf.expected \ + ksysent.sed \ + lstatx.c \ + net.expected \ + oldselect.expected \ + pipe.expected \ + ppoll-v.expected \ + ppoll.expected \ + process_vm_readv_writev.c \ + qual_fault-exit_group.expected \ + qual_inject-error-signal.expected \ + qual_inject-signal.expected \ + quotactl.h \ + scno_tampering.sh \ + setfsugid.c \ + setresugid.c \ + setreugid.c \ + setugid.c \ + sigaction.awk \ + sigaltstack.expected \ + sockname.c \ + statfs.expected \ + statx.sh \ + strace-C.expected \ + strace-E.expected \ + strace-T.expected \ + strace-ff.expected \ + strace-k.test \ + strace-r.expected \ + strace.supp \ + struct_flock.c \ + sun_path.expected \ + uio.expected \ + umode_t.c \ + umovestr.expected \ + unix-pair-send-recv.expected \ + unix-pair-sendto-recvfrom.expected \ + xchownx.c \ + xgetrlimit.c \ + xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ + xstatx.c \ + $(TESTS) + +ksysent.h: $(srcdir)/ksysent.sed + echo '#include ' | \ + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 + LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 + mv -f $@.t2 $@ + rm -f $@.t1 + +ksysent.$(OBJEXT): ksysent.h + +objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT))) +$(objects): scno.h + +CLEANFILES = ksysent.h $(TESTS:=.tmp) + +include ../scno.am diff --git a/tests-m32/Makefile.in b/tests-m32/Makefile.in new file mode 100644 index 000000000..77d11da56 --- /dev/null +++ b/tests-m32/Makefile.in @@ -0,0 +1,5714 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Automake input for strace tests. +# +# Copyright (c) 2011-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# scno.h make rules for strace. +# +# Copyright (c) 2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = _newselect$(EXEEXT) accept$(EXEEXT) accept4$(EXEEXT) \ + access$(EXEEXT) acct$(EXEEXT) add_key$(EXEEXT) \ + adjtimex$(EXEEXT) aio$(EXEEXT) alarm$(EXEEXT) answer$(EXEEXT) \ + attach-f-p$(EXEEXT) attach-f-p-cmd$(EXEEXT) \ + attach-p-cmd-cmd$(EXEEXT) attach-p-cmd-p$(EXEEXT) bpf$(EXEEXT) \ + brk$(EXEEXT) btrfs$(EXEEXT) caps$(EXEEXT) caps-abbrev$(EXEEXT) \ + chmod$(EXEEXT) chown$(EXEEXT) chown32$(EXEEXT) chroot$(EXEEXT) \ + clock_adjtime$(EXEEXT) clock_nanosleep$(EXEEXT) \ + clock_xettime$(EXEEXT) copy_file_range$(EXEEXT) \ + count-f$(EXEEXT) creat$(EXEEXT) delete_module$(EXEEXT) \ + dup$(EXEEXT) dup2$(EXEEXT) dup3$(EXEEXT) epoll_create$(EXEEXT) \ + epoll_create1$(EXEEXT) epoll_ctl$(EXEEXT) epoll_pwait$(EXEEXT) \ + epoll_wait$(EXEEXT) erestartsys$(EXEEXT) eventfd$(EXEEXT) \ + execve$(EXEEXT) execve-v$(EXEEXT) execveat$(EXEEXT) \ + execveat-v$(EXEEXT) faccessat$(EXEEXT) fadvise64$(EXEEXT) \ + fadvise64_64$(EXEEXT) fallocate$(EXEEXT) \ + fanotify_init$(EXEEXT) fanotify_mark$(EXEEXT) fchdir$(EXEEXT) \ + fchmod$(EXEEXT) fchmodat$(EXEEXT) fchown$(EXEEXT) \ + fchown32$(EXEEXT) fchownat$(EXEEXT) fcntl$(EXEEXT) \ + fcntl64$(EXEEXT) fdatasync$(EXEEXT) file_handle$(EXEEXT) \ + file_ioctl$(EXEEXT) filter-unavailable$(EXEEXT) \ + finit_module$(EXEEXT) flock$(EXEEXT) fork-f$(EXEEXT) \ + fstat$(EXEEXT) fstat64$(EXEEXT) fstatat64$(EXEEXT) \ + fstatfs$(EXEEXT) fstatfs64$(EXEEXT) fsync$(EXEEXT) \ + ftruncate$(EXEEXT) ftruncate64$(EXEEXT) futex$(EXEEXT) \ + futimesat$(EXEEXT) get_mempolicy$(EXEEXT) getcpu$(EXEEXT) \ + getcwd$(EXEEXT) getdents$(EXEEXT) getdents64$(EXEEXT) \ + getegid$(EXEEXT) getegid32$(EXEEXT) geteuid$(EXEEXT) \ + geteuid32$(EXEEXT) getgid$(EXEEXT) getgid32$(EXEEXT) \ + getgroups$(EXEEXT) getgroups32$(EXEEXT) getpeername$(EXEEXT) \ + getpgrp$(EXEEXT) getrandom$(EXEEXT) getresgid$(EXEEXT) \ + getresgid32$(EXEEXT) getresuid$(EXEEXT) getresuid32$(EXEEXT) \ + getrlimit$(EXEEXT) getrusage$(EXEEXT) getsid$(EXEEXT) \ + getsockname$(EXEEXT) getuid$(EXEEXT) getuid32$(EXEEXT) \ + getxxid$(EXEEXT) inet-cmsg$(EXEEXT) init_module$(EXEEXT) \ + inotify$(EXEEXT) inotify_init1$(EXEEXT) ioctl$(EXEEXT) \ + ioctl_block$(EXEEXT) ioctl_dm$(EXEEXT) ioctl_dm-v$(EXEEXT) \ + ioctl_evdev$(EXEEXT) ioctl_evdev-v$(EXEEXT) \ + ioctl_loop$(EXEEXT) ioctl_loop-nv$(EXEEXT) \ + ioctl_loop-v$(EXEEXT) ioctl_mtd$(EXEEXT) ioctl_rtc$(EXEEXT) \ + ioctl_rtc-v$(EXEEXT) ioctl_scsi$(EXEEXT) \ + ioctl_sg_io_v3$(EXEEXT) ioctl_sg_io_v4$(EXEEXT) \ + ioctl_sock_gifconf$(EXEEXT) ioctl_uffdio$(EXEEXT) \ + ioctl_v4l2$(EXEEXT) ioperm$(EXEEXT) iopl$(EXEEXT) \ + ioprio$(EXEEXT) ip_mreq$(EXEEXT) ipc$(EXEEXT) ipc_msg$(EXEEXT) \ + ipc_msgbuf$(EXEEXT) ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) \ + kcmp$(EXEEXT) kexec_file_load$(EXEEXT) kexec_load$(EXEEXT) \ + keyctl$(EXEEXT) kill$(EXEEXT) ksysent$(EXEEXT) lchown$(EXEEXT) \ + lchown32$(EXEEXT) link$(EXEEXT) linkat$(EXEEXT) \ + llseek$(EXEEXT) lookup_dcookie$(EXEEXT) lseek$(EXEEXT) \ + lstat$(EXEEXT) lstat64$(EXEEXT) mbind$(EXEEXT) \ + membarrier$(EXEEXT) memfd_create$(EXEEXT) \ + migrate_pages$(EXEEXT) mincore$(EXEEXT) mkdir$(EXEEXT) \ + mkdirat$(EXEEXT) mknod$(EXEEXT) mknodat$(EXEEXT) \ + mlock$(EXEEXT) mlock2$(EXEEXT) mlockall$(EXEEXT) mmap$(EXEEXT) \ + mmap64$(EXEEXT) mmsg$(EXEEXT) mmsg-silent$(EXEEXT) \ + mmsg_name$(EXEEXT) mmsg_name-v$(EXEEXT) mount$(EXEEXT) \ + move_pages$(EXEEXT) mq$(EXEEXT) mq_sendrecv$(EXEEXT) \ + mq_sendrecv-read$(EXEEXT) mq_sendrecv-write$(EXEEXT) \ + msg_control$(EXEEXT) msg_control-v$(EXEEXT) msg_name$(EXEEXT) \ + munlockall$(EXEEXT) nanosleep$(EXEEXT) \ + net-accept-connect$(EXEEXT) net-icmp_filter$(EXEEXT) \ + net-sockaddr$(EXEEXT) net-y-unix$(EXEEXT) net-yy-inet$(EXEEXT) \ + net-yy-netlink$(EXEEXT) net-yy-unix$(EXEEXT) \ + netlink_inet_diag$(EXEEXT) netlink_netlink_diag$(EXEEXT) \ + netlink_protocol$(EXEEXT) netlink_unix_diag$(EXEEXT) \ + newfstatat$(EXEEXT) nsyscalls$(EXEEXT) old_mmap$(EXEEXT) \ + oldfstat$(EXEEXT) oldlstat$(EXEEXT) oldselect$(EXEEXT) \ + oldstat$(EXEEXT) open$(EXEEXT) openat$(EXEEXT) pause$(EXEEXT) \ + pc$(EXEEXT) perf_event_open$(EXEEXT) \ + perf_event_open_nonverbose$(EXEEXT) \ + perf_event_open_unabbrev$(EXEEXT) personality$(EXEEXT) \ + pipe$(EXEEXT) pipe2$(EXEEXT) pkey_alloc$(EXEEXT) \ + pkey_free$(EXEEXT) pkey_mprotect$(EXEEXT) poll$(EXEEXT) \ + ppoll$(EXEEXT) prctl-arg2-intptr$(EXEEXT) \ + prctl-dumpable$(EXEEXT) prctl-name$(EXEEXT) \ + prctl-no-args$(EXEEXT) prctl-pdeathsig$(EXEEXT) \ + prctl-seccomp-filter-v$(EXEEXT) prctl-seccomp-strict$(EXEEXT) \ + prctl-securebits$(EXEEXT) prctl-tid_address$(EXEEXT) \ + prctl-tsc$(EXEEXT) pread64-pwrite64$(EXEEXT) preadv$(EXEEXT) \ + preadv-pwritev$(EXEEXT) preadv2-pwritev2$(EXEEXT) \ + print_maxfd$(EXEEXT) printstr$(EXEEXT) prlimit64$(EXEEXT) \ + process_vm_readv$(EXEEXT) process_vm_writev$(EXEEXT) \ + pselect6$(EXEEXT) ptrace$(EXEEXT) pwritev$(EXEEXT) \ + qual_fault$(EXEEXT) qual_inject-error-signal$(EXEEXT) \ + qual_inject-retval$(EXEEXT) qual_inject-signal$(EXEEXT) \ + qual_signal$(EXEEXT) quotactl$(EXEEXT) quotactl-v$(EXEEXT) \ + quotactl-xfs$(EXEEXT) quotactl-xfs-v$(EXEEXT) \ + read-write$(EXEEXT) readahead$(EXEEXT) readdir$(EXEEXT) \ + readlink$(EXEEXT) readlinkat$(EXEEXT) readv$(EXEEXT) \ + reboot$(EXEEXT) recvfrom$(EXEEXT) recvmmsg-timeout$(EXEEXT) \ + recvmsg$(EXEEXT) redirect-fds$(EXEEXT) \ + remap_file_pages$(EXEEXT) rename$(EXEEXT) renameat$(EXEEXT) \ + renameat2$(EXEEXT) request_key$(EXEEXT) \ + restart_syscall$(EXEEXT) rmdir$(EXEEXT) rt_sigpending$(EXEEXT) \ + rt_sigprocmask$(EXEEXT) rt_sigqueueinfo$(EXEEXT) \ + rt_sigsuspend$(EXEEXT) rt_sigtimedwait$(EXEEXT) \ + rt_tgsigqueueinfo$(EXEEXT) sched_get_priority_mxx$(EXEEXT) \ + sched_rr_get_interval$(EXEEXT) sched_xetaffinity$(EXEEXT) \ + sched_xetattr$(EXEEXT) sched_xetparam$(EXEEXT) \ + sched_xetscheduler$(EXEEXT) sched_yield$(EXEEXT) \ + scm_rights$(EXEEXT) seccomp-filter$(EXEEXT) \ + seccomp-filter-v$(EXEEXT) seccomp-strict$(EXEEXT) \ + select$(EXEEXT) semop$(EXEEXT) sendfile$(EXEEXT) \ + sendfile64$(EXEEXT) set_mempolicy$(EXEEXT) \ + set_ptracer_any$(EXEEXT) setdomainname$(EXEEXT) \ + setfsgid$(EXEEXT) setfsgid32$(EXEEXT) setfsuid$(EXEEXT) \ + setfsuid32$(EXEEXT) setgid$(EXEEXT) setgid32$(EXEEXT) \ + setgroups$(EXEEXT) setgroups32$(EXEEXT) sethostname$(EXEEXT) \ + setns$(EXEEXT) setregid$(EXEEXT) setregid32$(EXEEXT) \ + setresgid$(EXEEXT) setresgid32$(EXEEXT) setresuid$(EXEEXT) \ + setresuid32$(EXEEXT) setreuid$(EXEEXT) setreuid32$(EXEEXT) \ + setrlimit$(EXEEXT) setuid$(EXEEXT) setuid32$(EXEEXT) \ + shmxt$(EXEEXT) shutdown$(EXEEXT) sigaction$(EXEEXT) \ + sigaltstack$(EXEEXT) siginfo$(EXEEXT) signal_receive$(EXEEXT) \ + signalfd4$(EXEEXT) sigreturn$(EXEEXT) sleep$(EXEEXT) \ + socketcall$(EXEEXT) splice$(EXEEXT) stack-fcall$(EXEEXT) \ + stat$(EXEEXT) stat64$(EXEEXT) statfs$(EXEEXT) \ + statfs64$(EXEEXT) swap$(EXEEXT) symlink$(EXEEXT) \ + symlinkat$(EXEEXT) sync$(EXEEXT) sync_file_range$(EXEEXT) \ + sync_file_range2$(EXEEXT) sysinfo$(EXEEXT) syslog$(EXEEXT) \ + tee$(EXEEXT) threads-execve$(EXEEXT) time$(EXEEXT) \ + timer_create$(EXEEXT) timer_xettime$(EXEEXT) \ + timerfd_xettime$(EXEEXT) times$(EXEEXT) times-fail$(EXEEXT) \ + truncate$(EXEEXT) truncate64$(EXEEXT) ugetrlimit$(EXEEXT) \ + uio$(EXEEXT) umask$(EXEEXT) umount$(EXEEXT) umount2$(EXEEXT) \ + umoven-illptr$(EXEEXT) umovestr$(EXEEXT) \ + umovestr-illptr$(EXEEXT) umovestr2$(EXEEXT) umovestr3$(EXEEXT) \ + uname$(EXEEXT) unix-pair-send-recv$(EXEEXT) \ + unix-pair-sendto-recvfrom$(EXEEXT) unlink$(EXEEXT) \ + unlinkat$(EXEEXT) unshare$(EXEEXT) userfaultfd$(EXEEXT) \ + ustat$(EXEEXT) utime$(EXEEXT) utimensat$(EXEEXT) \ + utimes$(EXEEXT) vfork-f$(EXEEXT) vhangup$(EXEEXT) \ + vmsplice$(EXEEXT) wait4$(EXEEXT) wait4-v$(EXEEXT) \ + waitid$(EXEEXT) waitid-v$(EXEEXT) waitpid$(EXEEXT) \ + xattr$(EXEEXT) xattr-strings$(EXEEXT) xet_robust_list$(EXEEXT) \ + xetitimer$(EXEEXT) xetpgid$(EXEEXT) xetpriority$(EXEEXT) \ + xettimeofday$(EXEEXT) +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(am__EXEEXT_1) +DIST_COMMON = $(srcdir)/../scno.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ + $(top_srcdir)/test-driver +subdir = tests-m32 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/ax_valgrind_check.m4 \ + $(top_srcdir)/m4/mpers.m4 \ + $(top_srcdir)/m4/st_save_restore_var.m4 \ + $(top_srcdir)/m4/st_warn_cflags.m4 \ + $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AR = ar +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libtests_a_AR = $(AR) $(ARFLAGS) +libtests_a_LIBADD = +am_libtests_a_OBJECTS = libtests_a-errno2name.$(OBJEXT) \ + libtests_a-error_msg.$(OBJEXT) \ + libtests_a-fill_memory.$(OBJEXT) \ + libtests_a-get_page_size.$(OBJEXT) \ + libtests_a-hexdump_strdup.$(OBJEXT) \ + libtests_a-hexquote_strndup.$(OBJEXT) \ + libtests_a-inode_of_sockfd.$(OBJEXT) \ + libtests_a-libmmsg.$(OBJEXT) \ + libtests_a-libsocketcall.$(OBJEXT) \ + libtests_a-overflowuid.$(OBJEXT) \ + libtests_a-pipe_maxfd.$(OBJEXT) \ + libtests_a-print_quoted_string.$(OBJEXT) \ + libtests_a-printflags.$(OBJEXT) libtests_a-printxval.$(OBJEXT) \ + libtests_a-signal2name.$(OBJEXT) libtests_a-sprintrc.$(OBJEXT) \ + libtests_a-tail_alloc.$(OBJEXT) libtests_a-tprintf.$(OBJEXT) +libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) +_newselect_SOURCES = _newselect.c +_newselect_OBJECTS = _newselect.$(OBJEXT) +_newselect_LDADD = $(LDADD) +_newselect_DEPENDENCIES = libtests.a +accept_SOURCES = accept.c +accept_OBJECTS = accept.$(OBJEXT) +accept_LDADD = $(LDADD) +accept_DEPENDENCIES = libtests.a +accept4_SOURCES = accept4.c +accept4_OBJECTS = accept4.$(OBJEXT) +accept4_LDADD = $(LDADD) +accept4_DEPENDENCIES = libtests.a +access_SOURCES = access.c +access_OBJECTS = access.$(OBJEXT) +access_LDADD = $(LDADD) +access_DEPENDENCIES = libtests.a +acct_SOURCES = acct.c +acct_OBJECTS = acct.$(OBJEXT) +acct_LDADD = $(LDADD) +acct_DEPENDENCIES = libtests.a +add_key_SOURCES = add_key.c +add_key_OBJECTS = add_key.$(OBJEXT) +add_key_LDADD = $(LDADD) +add_key_DEPENDENCIES = libtests.a +adjtimex_SOURCES = adjtimex.c +adjtimex_OBJECTS = adjtimex.$(OBJEXT) +adjtimex_LDADD = $(LDADD) +adjtimex_DEPENDENCIES = libtests.a +aio_SOURCES = aio.c +aio_OBJECTS = aio.$(OBJEXT) +aio_LDADD = $(LDADD) +aio_DEPENDENCIES = libtests.a +alarm_SOURCES = alarm.c +alarm_OBJECTS = alarm.$(OBJEXT) +alarm_LDADD = $(LDADD) +alarm_DEPENDENCIES = libtests.a +answer_SOURCES = answer.c +answer_OBJECTS = answer.$(OBJEXT) +answer_LDADD = $(LDADD) +answer_DEPENDENCIES = libtests.a +attach_f_p_SOURCES = attach-f-p.c +attach_f_p_OBJECTS = attach-f-p.$(OBJEXT) +attach_f_p_DEPENDENCIES = $(LDADD) +attach_f_p_cmd_SOURCES = attach-f-p-cmd.c +attach_f_p_cmd_OBJECTS = attach-f-p-cmd.$(OBJEXT) +attach_f_p_cmd_LDADD = $(LDADD) +attach_f_p_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_cmd_SOURCES = attach-p-cmd-cmd.c +attach_p_cmd_cmd_OBJECTS = attach-p-cmd-cmd.$(OBJEXT) +attach_p_cmd_cmd_LDADD = $(LDADD) +attach_p_cmd_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_p_SOURCES = attach-p-cmd-p.c +attach_p_cmd_p_OBJECTS = attach-p-cmd-p.$(OBJEXT) +attach_p_cmd_p_LDADD = $(LDADD) +attach_p_cmd_p_DEPENDENCIES = libtests.a +bpf_SOURCES = bpf.c +bpf_OBJECTS = bpf.$(OBJEXT) +bpf_LDADD = $(LDADD) +bpf_DEPENDENCIES = libtests.a +brk_SOURCES = brk.c +brk_OBJECTS = brk.$(OBJEXT) +brk_LDADD = $(LDADD) +brk_DEPENDENCIES = libtests.a +btrfs_SOURCES = btrfs.c +btrfs_OBJECTS = btrfs.$(OBJEXT) +btrfs_LDADD = $(LDADD) +btrfs_DEPENDENCIES = libtests.a +caps_SOURCES = caps.c +caps_OBJECTS = caps.$(OBJEXT) +caps_LDADD = $(LDADD) +caps_DEPENDENCIES = libtests.a +caps_abbrev_SOURCES = caps-abbrev.c +caps_abbrev_OBJECTS = caps-abbrev.$(OBJEXT) +caps_abbrev_LDADD = $(LDADD) +caps_abbrev_DEPENDENCIES = libtests.a +chmod_SOURCES = chmod.c +chmod_OBJECTS = chmod.$(OBJEXT) +chmod_LDADD = $(LDADD) +chmod_DEPENDENCIES = libtests.a +chown_SOURCES = chown.c +chown_OBJECTS = chown.$(OBJEXT) +chown_LDADD = $(LDADD) +chown_DEPENDENCIES = libtests.a +chown32_SOURCES = chown32.c +chown32_OBJECTS = chown32.$(OBJEXT) +chown32_LDADD = $(LDADD) +chown32_DEPENDENCIES = libtests.a +chroot_SOURCES = chroot.c +chroot_OBJECTS = chroot.$(OBJEXT) +chroot_LDADD = $(LDADD) +chroot_DEPENDENCIES = libtests.a +clock_adjtime_SOURCES = clock_adjtime.c +clock_adjtime_OBJECTS = clock_adjtime.$(OBJEXT) +clock_adjtime_LDADD = $(LDADD) +clock_adjtime_DEPENDENCIES = libtests.a +clock_nanosleep_SOURCES = clock_nanosleep.c +clock_nanosleep_OBJECTS = clock_nanosleep.$(OBJEXT) +clock_nanosleep_LDADD = $(LDADD) +clock_nanosleep_DEPENDENCIES = libtests.a +clock_xettime_SOURCES = clock_xettime.c +clock_xettime_OBJECTS = clock_xettime.$(OBJEXT) +clock_xettime_DEPENDENCIES = $(LDADD) +copy_file_range_SOURCES = copy_file_range.c +copy_file_range_OBJECTS = copy_file_range.$(OBJEXT) +copy_file_range_LDADD = $(LDADD) +copy_file_range_DEPENDENCIES = libtests.a +count_f_SOURCES = count-f.c +count_f_OBJECTS = count-f.$(OBJEXT) +count_f_DEPENDENCIES = $(LDADD) +creat_SOURCES = creat.c +creat_OBJECTS = creat.$(OBJEXT) +creat_LDADD = $(LDADD) +creat_DEPENDENCIES = libtests.a +delete_module_SOURCES = delete_module.c +delete_module_OBJECTS = delete_module.$(OBJEXT) +delete_module_LDADD = $(LDADD) +delete_module_DEPENDENCIES = libtests.a +dup_SOURCES = dup.c +dup_OBJECTS = dup.$(OBJEXT) +dup_LDADD = $(LDADD) +dup_DEPENDENCIES = libtests.a +dup2_SOURCES = dup2.c +dup2_OBJECTS = dup2.$(OBJEXT) +dup2_LDADD = $(LDADD) +dup2_DEPENDENCIES = libtests.a +dup3_SOURCES = dup3.c +dup3_OBJECTS = dup3.$(OBJEXT) +dup3_LDADD = $(LDADD) +dup3_DEPENDENCIES = libtests.a +epoll_create_SOURCES = epoll_create.c +epoll_create_OBJECTS = epoll_create.$(OBJEXT) +epoll_create_LDADD = $(LDADD) +epoll_create_DEPENDENCIES = libtests.a +epoll_create1_SOURCES = epoll_create1.c +epoll_create1_OBJECTS = epoll_create1.$(OBJEXT) +epoll_create1_LDADD = $(LDADD) +epoll_create1_DEPENDENCIES = libtests.a +epoll_ctl_SOURCES = epoll_ctl.c +epoll_ctl_OBJECTS = epoll_ctl.$(OBJEXT) +epoll_ctl_LDADD = $(LDADD) +epoll_ctl_DEPENDENCIES = libtests.a +epoll_pwait_SOURCES = epoll_pwait.c +epoll_pwait_OBJECTS = epoll_pwait.$(OBJEXT) +epoll_pwait_LDADD = $(LDADD) +epoll_pwait_DEPENDENCIES = libtests.a +epoll_wait_SOURCES = epoll_wait.c +epoll_wait_OBJECTS = epoll_wait.$(OBJEXT) +epoll_wait_LDADD = $(LDADD) +epoll_wait_DEPENDENCIES = libtests.a +erestartsys_SOURCES = erestartsys.c +erestartsys_OBJECTS = erestartsys.$(OBJEXT) +erestartsys_LDADD = $(LDADD) +erestartsys_DEPENDENCIES = libtests.a +eventfd_SOURCES = eventfd.c +eventfd_OBJECTS = eventfd.$(OBJEXT) +eventfd_LDADD = $(LDADD) +eventfd_DEPENDENCIES = libtests.a +execve_SOURCES = execve.c +execve_OBJECTS = execve.$(OBJEXT) +execve_LDADD = $(LDADD) +execve_DEPENDENCIES = libtests.a +execve_v_SOURCES = execve-v.c +execve_v_OBJECTS = execve-v.$(OBJEXT) +execve_v_LDADD = $(LDADD) +execve_v_DEPENDENCIES = libtests.a +execveat_SOURCES = execveat.c +execveat_OBJECTS = execveat.$(OBJEXT) +execveat_LDADD = $(LDADD) +execveat_DEPENDENCIES = libtests.a +execveat_v_SOURCES = execveat-v.c +execveat_v_OBJECTS = execveat-v.$(OBJEXT) +execveat_v_LDADD = $(LDADD) +execveat_v_DEPENDENCIES = libtests.a +faccessat_SOURCES = faccessat.c +faccessat_OBJECTS = faccessat.$(OBJEXT) +faccessat_LDADD = $(LDADD) +faccessat_DEPENDENCIES = libtests.a +fadvise64_SOURCES = fadvise64.c +fadvise64_OBJECTS = fadvise64.$(OBJEXT) +fadvise64_LDADD = $(LDADD) +fadvise64_DEPENDENCIES = libtests.a +fadvise64_64_SOURCES = fadvise64_64.c +fadvise64_64_OBJECTS = fadvise64_64.$(OBJEXT) +fadvise64_64_LDADD = $(LDADD) +fadvise64_64_DEPENDENCIES = libtests.a +fallocate_SOURCES = fallocate.c +fallocate_OBJECTS = fallocate.$(OBJEXT) +fallocate_LDADD = $(LDADD) +fallocate_DEPENDENCIES = libtests.a +fanotify_init_SOURCES = fanotify_init.c +fanotify_init_OBJECTS = fanotify_init.$(OBJEXT) +fanotify_init_LDADD = $(LDADD) +fanotify_init_DEPENDENCIES = libtests.a +fanotify_mark_SOURCES = fanotify_mark.c +fanotify_mark_OBJECTS = fanotify_mark.$(OBJEXT) +fanotify_mark_LDADD = $(LDADD) +fanotify_mark_DEPENDENCIES = libtests.a +fchdir_SOURCES = fchdir.c +fchdir_OBJECTS = fchdir.$(OBJEXT) +fchdir_LDADD = $(LDADD) +fchdir_DEPENDENCIES = libtests.a +fchmod_SOURCES = fchmod.c +fchmod_OBJECTS = fchmod.$(OBJEXT) +fchmod_LDADD = $(LDADD) +fchmod_DEPENDENCIES = libtests.a +fchmodat_SOURCES = fchmodat.c +fchmodat_OBJECTS = fchmodat.$(OBJEXT) +fchmodat_LDADD = $(LDADD) +fchmodat_DEPENDENCIES = libtests.a +fchown_SOURCES = fchown.c +fchown_OBJECTS = fchown.$(OBJEXT) +fchown_LDADD = $(LDADD) +fchown_DEPENDENCIES = libtests.a +fchown32_SOURCES = fchown32.c +fchown32_OBJECTS = fchown32.$(OBJEXT) +fchown32_LDADD = $(LDADD) +fchown32_DEPENDENCIES = libtests.a +fchownat_SOURCES = fchownat.c +fchownat_OBJECTS = fchownat.$(OBJEXT) +fchownat_LDADD = $(LDADD) +fchownat_DEPENDENCIES = libtests.a +fcntl_SOURCES = fcntl.c +fcntl_OBJECTS = fcntl.$(OBJEXT) +fcntl_LDADD = $(LDADD) +fcntl_DEPENDENCIES = libtests.a +fcntl64_SOURCES = fcntl64.c +fcntl64_OBJECTS = fcntl64.$(OBJEXT) +fcntl64_LDADD = $(LDADD) +fcntl64_DEPENDENCIES = libtests.a +fdatasync_SOURCES = fdatasync.c +fdatasync_OBJECTS = fdatasync.$(OBJEXT) +fdatasync_LDADD = $(LDADD) +fdatasync_DEPENDENCIES = libtests.a +file_handle_SOURCES = file_handle.c +file_handle_OBJECTS = file_handle.$(OBJEXT) +file_handle_LDADD = $(LDADD) +file_handle_DEPENDENCIES = libtests.a +file_ioctl_SOURCES = file_ioctl.c +file_ioctl_OBJECTS = file_ioctl.$(OBJEXT) +file_ioctl_LDADD = $(LDADD) +file_ioctl_DEPENDENCIES = libtests.a +filter_unavailable_SOURCES = filter-unavailable.c +filter_unavailable_OBJECTS = filter-unavailable.$(OBJEXT) +filter_unavailable_DEPENDENCIES = $(LDADD) +finit_module_SOURCES = finit_module.c +finit_module_OBJECTS = finit_module.$(OBJEXT) +finit_module_LDADD = $(LDADD) +finit_module_DEPENDENCIES = libtests.a +flock_SOURCES = flock.c +flock_OBJECTS = flock.$(OBJEXT) +flock_LDADD = $(LDADD) +flock_DEPENDENCIES = libtests.a +fork_f_SOURCES = fork-f.c +fork_f_OBJECTS = fork-f.$(OBJEXT) +fork_f_LDADD = $(LDADD) +fork_f_DEPENDENCIES = libtests.a +fstat_SOURCES = fstat.c +fstat_OBJECTS = fstat.$(OBJEXT) +fstat_LDADD = $(LDADD) +fstat_DEPENDENCIES = libtests.a +fstat64_SOURCES = fstat64.c +fstat64_OBJECTS = fstat64-fstat64.$(OBJEXT) +fstat64_LDADD = $(LDADD) +fstat64_DEPENDENCIES = libtests.a +fstatat64_SOURCES = fstatat64.c +fstatat64_OBJECTS = fstatat64-fstatat64.$(OBJEXT) +fstatat64_LDADD = $(LDADD) +fstatat64_DEPENDENCIES = libtests.a +fstatfs_SOURCES = fstatfs.c +fstatfs_OBJECTS = fstatfs.$(OBJEXT) +fstatfs_LDADD = $(LDADD) +fstatfs_DEPENDENCIES = libtests.a +fstatfs64_SOURCES = fstatfs64.c +fstatfs64_OBJECTS = fstatfs64.$(OBJEXT) +fstatfs64_LDADD = $(LDADD) +fstatfs64_DEPENDENCIES = libtests.a +fsync_SOURCES = fsync.c +fsync_OBJECTS = fsync.$(OBJEXT) +fsync_LDADD = $(LDADD) +fsync_DEPENDENCIES = libtests.a +ftruncate_SOURCES = ftruncate.c +ftruncate_OBJECTS = ftruncate.$(OBJEXT) +ftruncate_LDADD = $(LDADD) +ftruncate_DEPENDENCIES = libtests.a +ftruncate64_SOURCES = ftruncate64.c +ftruncate64_OBJECTS = ftruncate64-ftruncate64.$(OBJEXT) +ftruncate64_LDADD = $(LDADD) +ftruncate64_DEPENDENCIES = libtests.a +futex_SOURCES = futex.c +futex_OBJECTS = futex.$(OBJEXT) +futex_LDADD = $(LDADD) +futex_DEPENDENCIES = libtests.a +futimesat_SOURCES = futimesat.c +futimesat_OBJECTS = futimesat.$(OBJEXT) +futimesat_LDADD = $(LDADD) +futimesat_DEPENDENCIES = libtests.a +get_mempolicy_SOURCES = get_mempolicy.c +get_mempolicy_OBJECTS = get_mempolicy.$(OBJEXT) +get_mempolicy_LDADD = $(LDADD) +get_mempolicy_DEPENDENCIES = libtests.a +getcpu_SOURCES = getcpu.c +getcpu_OBJECTS = getcpu.$(OBJEXT) +getcpu_LDADD = $(LDADD) +getcpu_DEPENDENCIES = libtests.a +getcwd_SOURCES = getcwd.c +getcwd_OBJECTS = getcwd.$(OBJEXT) +getcwd_LDADD = $(LDADD) +getcwd_DEPENDENCIES = libtests.a +getdents_SOURCES = getdents.c +getdents_OBJECTS = getdents.$(OBJEXT) +getdents_LDADD = $(LDADD) +getdents_DEPENDENCIES = libtests.a +getdents64_SOURCES = getdents64.c +getdents64_OBJECTS = getdents64.$(OBJEXT) +getdents64_LDADD = $(LDADD) +getdents64_DEPENDENCIES = libtests.a +getegid_SOURCES = getegid.c +getegid_OBJECTS = getegid.$(OBJEXT) +getegid_LDADD = $(LDADD) +getegid_DEPENDENCIES = libtests.a +getegid32_SOURCES = getegid32.c +getegid32_OBJECTS = getegid32.$(OBJEXT) +getegid32_LDADD = $(LDADD) +getegid32_DEPENDENCIES = libtests.a +geteuid_SOURCES = geteuid.c +geteuid_OBJECTS = geteuid.$(OBJEXT) +geteuid_LDADD = $(LDADD) +geteuid_DEPENDENCIES = libtests.a +geteuid32_SOURCES = geteuid32.c +geteuid32_OBJECTS = geteuid32.$(OBJEXT) +geteuid32_LDADD = $(LDADD) +geteuid32_DEPENDENCIES = libtests.a +getgid_SOURCES = getgid.c +getgid_OBJECTS = getgid.$(OBJEXT) +getgid_LDADD = $(LDADD) +getgid_DEPENDENCIES = libtests.a +getgid32_SOURCES = getgid32.c +getgid32_OBJECTS = getgid32.$(OBJEXT) +getgid32_LDADD = $(LDADD) +getgid32_DEPENDENCIES = libtests.a +getgroups_SOURCES = getgroups.c +getgroups_OBJECTS = getgroups.$(OBJEXT) +getgroups_LDADD = $(LDADD) +getgroups_DEPENDENCIES = libtests.a +getgroups32_SOURCES = getgroups32.c +getgroups32_OBJECTS = getgroups32.$(OBJEXT) +getgroups32_LDADD = $(LDADD) +getgroups32_DEPENDENCIES = libtests.a +getpeername_SOURCES = getpeername.c +getpeername_OBJECTS = getpeername.$(OBJEXT) +getpeername_LDADD = $(LDADD) +getpeername_DEPENDENCIES = libtests.a +getpgrp_SOURCES = getpgrp.c +getpgrp_OBJECTS = getpgrp.$(OBJEXT) +getpgrp_LDADD = $(LDADD) +getpgrp_DEPENDENCIES = libtests.a +getrandom_SOURCES = getrandom.c +getrandom_OBJECTS = getrandom.$(OBJEXT) +getrandom_LDADD = $(LDADD) +getrandom_DEPENDENCIES = libtests.a +getresgid_SOURCES = getresgid.c +getresgid_OBJECTS = getresgid.$(OBJEXT) +getresgid_LDADD = $(LDADD) +getresgid_DEPENDENCIES = libtests.a +getresgid32_SOURCES = getresgid32.c +getresgid32_OBJECTS = getresgid32.$(OBJEXT) +getresgid32_LDADD = $(LDADD) +getresgid32_DEPENDENCIES = libtests.a +getresuid_SOURCES = getresuid.c +getresuid_OBJECTS = getresuid.$(OBJEXT) +getresuid_LDADD = $(LDADD) +getresuid_DEPENDENCIES = libtests.a +getresuid32_SOURCES = getresuid32.c +getresuid32_OBJECTS = getresuid32.$(OBJEXT) +getresuid32_LDADD = $(LDADD) +getresuid32_DEPENDENCIES = libtests.a +getrlimit_SOURCES = getrlimit.c +getrlimit_OBJECTS = getrlimit.$(OBJEXT) +getrlimit_LDADD = $(LDADD) +getrlimit_DEPENDENCIES = libtests.a +getrusage_SOURCES = getrusage.c +getrusage_OBJECTS = getrusage.$(OBJEXT) +getrusage_LDADD = $(LDADD) +getrusage_DEPENDENCIES = libtests.a +getsid_SOURCES = getsid.c +getsid_OBJECTS = getsid.$(OBJEXT) +getsid_LDADD = $(LDADD) +getsid_DEPENDENCIES = libtests.a +getsockname_SOURCES = getsockname.c +getsockname_OBJECTS = getsockname.$(OBJEXT) +getsockname_LDADD = $(LDADD) +getsockname_DEPENDENCIES = libtests.a +getuid_SOURCES = getuid.c +getuid_OBJECTS = getuid.$(OBJEXT) +getuid_LDADD = $(LDADD) +getuid_DEPENDENCIES = libtests.a +getuid32_SOURCES = getuid32.c +getuid32_OBJECTS = getuid32.$(OBJEXT) +getuid32_LDADD = $(LDADD) +getuid32_DEPENDENCIES = libtests.a +getxxid_SOURCES = getxxid.c +getxxid_OBJECTS = getxxid.$(OBJEXT) +getxxid_LDADD = $(LDADD) +getxxid_DEPENDENCIES = libtests.a +inet_cmsg_SOURCES = inet-cmsg.c +inet_cmsg_OBJECTS = inet-cmsg.$(OBJEXT) +inet_cmsg_LDADD = $(LDADD) +inet_cmsg_DEPENDENCIES = libtests.a +init_module_SOURCES = init_module.c +init_module_OBJECTS = init_module.$(OBJEXT) +init_module_LDADD = $(LDADD) +init_module_DEPENDENCIES = libtests.a +inotify_SOURCES = inotify.c +inotify_OBJECTS = inotify.$(OBJEXT) +inotify_LDADD = $(LDADD) +inotify_DEPENDENCIES = libtests.a +inotify_init1_SOURCES = inotify_init1.c +inotify_init1_OBJECTS = inotify_init1.$(OBJEXT) +inotify_init1_LDADD = $(LDADD) +inotify_init1_DEPENDENCIES = libtests.a +ioctl_SOURCES = ioctl.c +ioctl_OBJECTS = ioctl.$(OBJEXT) +ioctl_LDADD = $(LDADD) +ioctl_DEPENDENCIES = libtests.a +ioctl_block_SOURCES = ioctl_block.c +ioctl_block_OBJECTS = ioctl_block.$(OBJEXT) +ioctl_block_LDADD = $(LDADD) +ioctl_block_DEPENDENCIES = libtests.a +ioctl_dm_SOURCES = ioctl_dm.c +ioctl_dm_OBJECTS = ioctl_dm.$(OBJEXT) +ioctl_dm_LDADD = $(LDADD) +ioctl_dm_DEPENDENCIES = libtests.a +ioctl_dm_v_SOURCES = ioctl_dm-v.c +ioctl_dm_v_OBJECTS = ioctl_dm-v.$(OBJEXT) +ioctl_dm_v_LDADD = $(LDADD) +ioctl_dm_v_DEPENDENCIES = libtests.a +ioctl_evdev_SOURCES = ioctl_evdev.c +ioctl_evdev_OBJECTS = ioctl_evdev.$(OBJEXT) +ioctl_evdev_LDADD = $(LDADD) +ioctl_evdev_DEPENDENCIES = libtests.a +ioctl_evdev_v_SOURCES = ioctl_evdev-v.c +ioctl_evdev_v_OBJECTS = ioctl_evdev-v.$(OBJEXT) +ioctl_evdev_v_LDADD = $(LDADD) +ioctl_evdev_v_DEPENDENCIES = libtests.a +ioctl_loop_SOURCES = ioctl_loop.c +ioctl_loop_OBJECTS = ioctl_loop.$(OBJEXT) +ioctl_loop_LDADD = $(LDADD) +ioctl_loop_DEPENDENCIES = libtests.a +ioctl_loop_nv_SOURCES = ioctl_loop-nv.c +ioctl_loop_nv_OBJECTS = ioctl_loop-nv.$(OBJEXT) +ioctl_loop_nv_LDADD = $(LDADD) +ioctl_loop_nv_DEPENDENCIES = libtests.a +ioctl_loop_v_SOURCES = ioctl_loop-v.c +ioctl_loop_v_OBJECTS = ioctl_loop-v.$(OBJEXT) +ioctl_loop_v_LDADD = $(LDADD) +ioctl_loop_v_DEPENDENCIES = libtests.a +ioctl_mtd_SOURCES = ioctl_mtd.c +ioctl_mtd_OBJECTS = ioctl_mtd.$(OBJEXT) +ioctl_mtd_LDADD = $(LDADD) +ioctl_mtd_DEPENDENCIES = libtests.a +ioctl_rtc_SOURCES = ioctl_rtc.c +ioctl_rtc_OBJECTS = ioctl_rtc.$(OBJEXT) +ioctl_rtc_LDADD = $(LDADD) +ioctl_rtc_DEPENDENCIES = libtests.a +ioctl_rtc_v_SOURCES = ioctl_rtc-v.c +ioctl_rtc_v_OBJECTS = ioctl_rtc-v.$(OBJEXT) +ioctl_rtc_v_LDADD = $(LDADD) +ioctl_rtc_v_DEPENDENCIES = libtests.a +ioctl_scsi_SOURCES = ioctl_scsi.c +ioctl_scsi_OBJECTS = ioctl_scsi.$(OBJEXT) +ioctl_scsi_LDADD = $(LDADD) +ioctl_scsi_DEPENDENCIES = libtests.a +ioctl_sg_io_v3_SOURCES = ioctl_sg_io_v3.c +ioctl_sg_io_v3_OBJECTS = ioctl_sg_io_v3.$(OBJEXT) +ioctl_sg_io_v3_LDADD = $(LDADD) +ioctl_sg_io_v3_DEPENDENCIES = libtests.a +ioctl_sg_io_v4_SOURCES = ioctl_sg_io_v4.c +ioctl_sg_io_v4_OBJECTS = ioctl_sg_io_v4.$(OBJEXT) +ioctl_sg_io_v4_LDADD = $(LDADD) +ioctl_sg_io_v4_DEPENDENCIES = libtests.a +ioctl_sock_gifconf_SOURCES = ioctl_sock_gifconf.c +ioctl_sock_gifconf_OBJECTS = ioctl_sock_gifconf.$(OBJEXT) +ioctl_sock_gifconf_LDADD = $(LDADD) +ioctl_sock_gifconf_DEPENDENCIES = libtests.a +ioctl_uffdio_SOURCES = ioctl_uffdio.c +ioctl_uffdio_OBJECTS = ioctl_uffdio.$(OBJEXT) +ioctl_uffdio_LDADD = $(LDADD) +ioctl_uffdio_DEPENDENCIES = libtests.a +ioctl_v4l2_SOURCES = ioctl_v4l2.c +ioctl_v4l2_OBJECTS = ioctl_v4l2.$(OBJEXT) +ioctl_v4l2_LDADD = $(LDADD) +ioctl_v4l2_DEPENDENCIES = libtests.a +ioperm_SOURCES = ioperm.c +ioperm_OBJECTS = ioperm.$(OBJEXT) +ioperm_LDADD = $(LDADD) +ioperm_DEPENDENCIES = libtests.a +iopl_SOURCES = iopl.c +iopl_OBJECTS = iopl.$(OBJEXT) +iopl_LDADD = $(LDADD) +iopl_DEPENDENCIES = libtests.a +ioprio_SOURCES = ioprio.c +ioprio_OBJECTS = ioprio.$(OBJEXT) +ioprio_LDADD = $(LDADD) +ioprio_DEPENDENCIES = libtests.a +ip_mreq_SOURCES = ip_mreq.c +ip_mreq_OBJECTS = ip_mreq.$(OBJEXT) +ip_mreq_LDADD = $(LDADD) +ip_mreq_DEPENDENCIES = libtests.a +ipc_SOURCES = ipc.c +ipc_OBJECTS = ipc.$(OBJEXT) +ipc_LDADD = $(LDADD) +ipc_DEPENDENCIES = libtests.a +ipc_msg_SOURCES = ipc_msg.c +ipc_msg_OBJECTS = ipc_msg.$(OBJEXT) +ipc_msg_LDADD = $(LDADD) +ipc_msg_DEPENDENCIES = libtests.a +ipc_msgbuf_SOURCES = ipc_msgbuf.c +ipc_msgbuf_OBJECTS = ipc_msgbuf.$(OBJEXT) +ipc_msgbuf_LDADD = $(LDADD) +ipc_msgbuf_DEPENDENCIES = libtests.a +ipc_sem_SOURCES = ipc_sem.c +ipc_sem_OBJECTS = ipc_sem.$(OBJEXT) +ipc_sem_LDADD = $(LDADD) +ipc_sem_DEPENDENCIES = libtests.a +ipc_shm_SOURCES = ipc_shm.c +ipc_shm_OBJECTS = ipc_shm.$(OBJEXT) +ipc_shm_LDADD = $(LDADD) +ipc_shm_DEPENDENCIES = libtests.a +kcmp_SOURCES = kcmp.c +kcmp_OBJECTS = kcmp.$(OBJEXT) +kcmp_LDADD = $(LDADD) +kcmp_DEPENDENCIES = libtests.a +kexec_file_load_SOURCES = kexec_file_load.c +kexec_file_load_OBJECTS = kexec_file_load.$(OBJEXT) +kexec_file_load_LDADD = $(LDADD) +kexec_file_load_DEPENDENCIES = libtests.a +kexec_load_SOURCES = kexec_load.c +kexec_load_OBJECTS = kexec_load.$(OBJEXT) +kexec_load_LDADD = $(LDADD) +kexec_load_DEPENDENCIES = libtests.a +keyctl_SOURCES = keyctl.c +keyctl_OBJECTS = keyctl.$(OBJEXT) +keyctl_LDADD = $(LDADD) +keyctl_DEPENDENCIES = libtests.a +kill_SOURCES = kill.c +kill_OBJECTS = kill.$(OBJEXT) +kill_LDADD = $(LDADD) +kill_DEPENDENCIES = libtests.a +ksysent_SOURCES = ksysent.c +ksysent_OBJECTS = ksysent.$(OBJEXT) +ksysent_LDADD = $(LDADD) +ksysent_DEPENDENCIES = libtests.a +lchown_SOURCES = lchown.c +lchown_OBJECTS = lchown.$(OBJEXT) +lchown_LDADD = $(LDADD) +lchown_DEPENDENCIES = libtests.a +lchown32_SOURCES = lchown32.c +lchown32_OBJECTS = lchown32.$(OBJEXT) +lchown32_LDADD = $(LDADD) +lchown32_DEPENDENCIES = libtests.a +link_SOURCES = link.c +link_OBJECTS = link.$(OBJEXT) +link_LDADD = $(LDADD) +link_DEPENDENCIES = libtests.a +linkat_SOURCES = linkat.c +linkat_OBJECTS = linkat.$(OBJEXT) +linkat_LDADD = $(LDADD) +linkat_DEPENDENCIES = libtests.a +llseek_SOURCES = llseek.c +llseek_OBJECTS = llseek.$(OBJEXT) +llseek_LDADD = $(LDADD) +llseek_DEPENDENCIES = libtests.a +lookup_dcookie_SOURCES = lookup_dcookie.c +lookup_dcookie_OBJECTS = lookup_dcookie.$(OBJEXT) +lookup_dcookie_LDADD = $(LDADD) +lookup_dcookie_DEPENDENCIES = libtests.a +lseek_SOURCES = lseek.c +lseek_OBJECTS = lseek.$(OBJEXT) +lseek_LDADD = $(LDADD) +lseek_DEPENDENCIES = libtests.a +lstat_SOURCES = lstat.c +lstat_OBJECTS = lstat.$(OBJEXT) +lstat_LDADD = $(LDADD) +lstat_DEPENDENCIES = libtests.a +lstat64_SOURCES = lstat64.c +lstat64_OBJECTS = lstat64-lstat64.$(OBJEXT) +lstat64_LDADD = $(LDADD) +lstat64_DEPENDENCIES = libtests.a +mbind_SOURCES = mbind.c +mbind_OBJECTS = mbind.$(OBJEXT) +mbind_LDADD = $(LDADD) +mbind_DEPENDENCIES = libtests.a +membarrier_SOURCES = membarrier.c +membarrier_OBJECTS = membarrier.$(OBJEXT) +membarrier_LDADD = $(LDADD) +membarrier_DEPENDENCIES = libtests.a +memfd_create_SOURCES = memfd_create.c +memfd_create_OBJECTS = memfd_create.$(OBJEXT) +memfd_create_LDADD = $(LDADD) +memfd_create_DEPENDENCIES = libtests.a +migrate_pages_SOURCES = migrate_pages.c +migrate_pages_OBJECTS = migrate_pages.$(OBJEXT) +migrate_pages_LDADD = $(LDADD) +migrate_pages_DEPENDENCIES = libtests.a +mincore_SOURCES = mincore.c +mincore_OBJECTS = mincore.$(OBJEXT) +mincore_LDADD = $(LDADD) +mincore_DEPENDENCIES = libtests.a +mkdir_SOURCES = mkdir.c +mkdir_OBJECTS = mkdir.$(OBJEXT) +mkdir_LDADD = $(LDADD) +mkdir_DEPENDENCIES = libtests.a +mkdirat_SOURCES = mkdirat.c +mkdirat_OBJECTS = mkdirat.$(OBJEXT) +mkdirat_LDADD = $(LDADD) +mkdirat_DEPENDENCIES = libtests.a +mknod_SOURCES = mknod.c +mknod_OBJECTS = mknod.$(OBJEXT) +mknod_LDADD = $(LDADD) +mknod_DEPENDENCIES = libtests.a +mknodat_SOURCES = mknodat.c +mknodat_OBJECTS = mknodat.$(OBJEXT) +mknodat_LDADD = $(LDADD) +mknodat_DEPENDENCIES = libtests.a +mlock_SOURCES = mlock.c +mlock_OBJECTS = mlock.$(OBJEXT) +mlock_LDADD = $(LDADD) +mlock_DEPENDENCIES = libtests.a +mlock2_SOURCES = mlock2.c +mlock2_OBJECTS = mlock2.$(OBJEXT) +mlock2_LDADD = $(LDADD) +mlock2_DEPENDENCIES = libtests.a +mlockall_SOURCES = mlockall.c +mlockall_OBJECTS = mlockall.$(OBJEXT) +mlockall_LDADD = $(LDADD) +mlockall_DEPENDENCIES = libtests.a +mmap_SOURCES = mmap.c +mmap_OBJECTS = mmap.$(OBJEXT) +mmap_LDADD = $(LDADD) +mmap_DEPENDENCIES = libtests.a +mmap64_SOURCES = mmap64.c +mmap64_OBJECTS = mmap64-mmap64.$(OBJEXT) +mmap64_LDADD = $(LDADD) +mmap64_DEPENDENCIES = libtests.a +mmsg_SOURCES = mmsg.c +mmsg_OBJECTS = mmsg.$(OBJEXT) +mmsg_LDADD = $(LDADD) +mmsg_DEPENDENCIES = libtests.a +mmsg_silent_SOURCES = mmsg-silent.c +mmsg_silent_OBJECTS = mmsg-silent.$(OBJEXT) +mmsg_silent_LDADD = $(LDADD) +mmsg_silent_DEPENDENCIES = libtests.a +mmsg_name_SOURCES = mmsg_name.c +mmsg_name_OBJECTS = mmsg_name.$(OBJEXT) +mmsg_name_LDADD = $(LDADD) +mmsg_name_DEPENDENCIES = libtests.a +mmsg_name_v_SOURCES = mmsg_name-v.c +mmsg_name_v_OBJECTS = mmsg_name-v.$(OBJEXT) +mmsg_name_v_LDADD = $(LDADD) +mmsg_name_v_DEPENDENCIES = libtests.a +mount_SOURCES = mount.c +mount_OBJECTS = mount.$(OBJEXT) +mount_LDADD = $(LDADD) +mount_DEPENDENCIES = libtests.a +move_pages_SOURCES = move_pages.c +move_pages_OBJECTS = move_pages.$(OBJEXT) +move_pages_LDADD = $(LDADD) +move_pages_DEPENDENCIES = libtests.a +mq_SOURCES = mq.c +mq_OBJECTS = mq.$(OBJEXT) +mq_DEPENDENCIES = $(LDADD) +mq_sendrecv_SOURCES = mq_sendrecv.c +mq_sendrecv_OBJECTS = mq_sendrecv.$(OBJEXT) +mq_sendrecv_DEPENDENCIES = $(LDADD) +mq_sendrecv_read_SOURCES = mq_sendrecv-read.c +mq_sendrecv_read_OBJECTS = mq_sendrecv-read.$(OBJEXT) +mq_sendrecv_read_DEPENDENCIES = $(LDADD) +mq_sendrecv_write_SOURCES = mq_sendrecv-write.c +mq_sendrecv_write_OBJECTS = mq_sendrecv-write.$(OBJEXT) +mq_sendrecv_write_DEPENDENCIES = $(LDADD) +msg_control_SOURCES = msg_control.c +msg_control_OBJECTS = msg_control.$(OBJEXT) +msg_control_LDADD = $(LDADD) +msg_control_DEPENDENCIES = libtests.a +msg_control_v_SOURCES = msg_control-v.c +msg_control_v_OBJECTS = msg_control-v.$(OBJEXT) +msg_control_v_LDADD = $(LDADD) +msg_control_v_DEPENDENCIES = libtests.a +msg_name_SOURCES = msg_name.c +msg_name_OBJECTS = msg_name.$(OBJEXT) +msg_name_LDADD = $(LDADD) +msg_name_DEPENDENCIES = libtests.a +munlockall_SOURCES = munlockall.c +munlockall_OBJECTS = munlockall.$(OBJEXT) +munlockall_LDADD = $(LDADD) +munlockall_DEPENDENCIES = libtests.a +nanosleep_SOURCES = nanosleep.c +nanosleep_OBJECTS = nanosleep.$(OBJEXT) +nanosleep_LDADD = $(LDADD) +nanosleep_DEPENDENCIES = libtests.a +net_accept_connect_SOURCES = net-accept-connect.c +net_accept_connect_OBJECTS = net-accept-connect.$(OBJEXT) +net_accept_connect_LDADD = $(LDADD) +net_accept_connect_DEPENDENCIES = libtests.a +net_icmp_filter_SOURCES = net-icmp_filter.c +net_icmp_filter_OBJECTS = net-icmp_filter.$(OBJEXT) +net_icmp_filter_LDADD = $(LDADD) +net_icmp_filter_DEPENDENCIES = libtests.a +net_sockaddr_SOURCES = net-sockaddr.c +net_sockaddr_OBJECTS = net-sockaddr.$(OBJEXT) +net_sockaddr_LDADD = $(LDADD) +net_sockaddr_DEPENDENCIES = libtests.a +net_y_unix_SOURCES = net-y-unix.c +net_y_unix_OBJECTS = net-y-unix.$(OBJEXT) +net_y_unix_LDADD = $(LDADD) +net_y_unix_DEPENDENCIES = libtests.a +net_yy_inet_SOURCES = net-yy-inet.c +net_yy_inet_OBJECTS = net-yy-inet.$(OBJEXT) +net_yy_inet_LDADD = $(LDADD) +net_yy_inet_DEPENDENCIES = libtests.a +net_yy_netlink_SOURCES = net-yy-netlink.c +net_yy_netlink_OBJECTS = net-yy-netlink.$(OBJEXT) +net_yy_netlink_LDADD = $(LDADD) +net_yy_netlink_DEPENDENCIES = libtests.a +net_yy_unix_SOURCES = net-yy-unix.c +net_yy_unix_OBJECTS = net-yy-unix.$(OBJEXT) +net_yy_unix_LDADD = $(LDADD) +net_yy_unix_DEPENDENCIES = libtests.a +netlink_inet_diag_SOURCES = netlink_inet_diag.c +netlink_inet_diag_OBJECTS = netlink_inet_diag.$(OBJEXT) +netlink_inet_diag_LDADD = $(LDADD) +netlink_inet_diag_DEPENDENCIES = libtests.a +netlink_netlink_diag_SOURCES = netlink_netlink_diag.c +netlink_netlink_diag_OBJECTS = netlink_netlink_diag.$(OBJEXT) +netlink_netlink_diag_LDADD = $(LDADD) +netlink_netlink_diag_DEPENDENCIES = libtests.a +netlink_protocol_SOURCES = netlink_protocol.c +netlink_protocol_OBJECTS = netlink_protocol.$(OBJEXT) +netlink_protocol_LDADD = $(LDADD) +netlink_protocol_DEPENDENCIES = libtests.a +netlink_unix_diag_SOURCES = netlink_unix_diag.c +netlink_unix_diag_OBJECTS = netlink_unix_diag.$(OBJEXT) +netlink_unix_diag_LDADD = $(LDADD) +netlink_unix_diag_DEPENDENCIES = libtests.a +newfstatat_SOURCES = newfstatat.c +newfstatat_OBJECTS = newfstatat-newfstatat.$(OBJEXT) +newfstatat_LDADD = $(LDADD) +newfstatat_DEPENDENCIES = libtests.a +nsyscalls_SOURCES = nsyscalls.c +nsyscalls_OBJECTS = nsyscalls.$(OBJEXT) +nsyscalls_LDADD = $(LDADD) +nsyscalls_DEPENDENCIES = libtests.a +old_mmap_SOURCES = old_mmap.c +old_mmap_OBJECTS = old_mmap.$(OBJEXT) +old_mmap_LDADD = $(LDADD) +old_mmap_DEPENDENCIES = libtests.a +oldfstat_SOURCES = oldfstat.c +oldfstat_OBJECTS = oldfstat.$(OBJEXT) +oldfstat_LDADD = $(LDADD) +oldfstat_DEPENDENCIES = libtests.a +oldlstat_SOURCES = oldlstat.c +oldlstat_OBJECTS = oldlstat.$(OBJEXT) +oldlstat_LDADD = $(LDADD) +oldlstat_DEPENDENCIES = libtests.a +oldselect_SOURCES = oldselect.c +oldselect_OBJECTS = oldselect.$(OBJEXT) +oldselect_LDADD = $(LDADD) +oldselect_DEPENDENCIES = libtests.a +oldstat_SOURCES = oldstat.c +oldstat_OBJECTS = oldstat.$(OBJEXT) +oldstat_LDADD = $(LDADD) +oldstat_DEPENDENCIES = libtests.a +open_SOURCES = open.c +open_OBJECTS = open.$(OBJEXT) +open_LDADD = $(LDADD) +open_DEPENDENCIES = libtests.a +openat_SOURCES = openat.c +openat_OBJECTS = openat.$(OBJEXT) +openat_LDADD = $(LDADD) +openat_DEPENDENCIES = libtests.a +pause_SOURCES = pause.c +pause_OBJECTS = pause.$(OBJEXT) +pause_LDADD = $(LDADD) +pause_DEPENDENCIES = libtests.a +pc_SOURCES = pc.c +pc_OBJECTS = pc.$(OBJEXT) +am__DEPENDENCIES_1 = +pc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(LDADD) +perf_event_open_SOURCES = perf_event_open.c +perf_event_open_OBJECTS = perf_event_open.$(OBJEXT) +perf_event_open_LDADD = $(LDADD) +perf_event_open_DEPENDENCIES = libtests.a +perf_event_open_nonverbose_SOURCES = perf_event_open_nonverbose.c +perf_event_open_nonverbose_OBJECTS = \ + perf_event_open_nonverbose.$(OBJEXT) +perf_event_open_nonverbose_LDADD = $(LDADD) +perf_event_open_nonverbose_DEPENDENCIES = libtests.a +perf_event_open_unabbrev_SOURCES = perf_event_open_unabbrev.c +perf_event_open_unabbrev_OBJECTS = perf_event_open_unabbrev.$(OBJEXT) +perf_event_open_unabbrev_LDADD = $(LDADD) +perf_event_open_unabbrev_DEPENDENCIES = libtests.a +personality_SOURCES = personality.c +personality_OBJECTS = personality.$(OBJEXT) +personality_LDADD = $(LDADD) +personality_DEPENDENCIES = libtests.a +pipe_SOURCES = pipe.c +pipe_OBJECTS = pipe.$(OBJEXT) +pipe_LDADD = $(LDADD) +pipe_DEPENDENCIES = libtests.a +pipe2_SOURCES = pipe2.c +pipe2_OBJECTS = pipe2.$(OBJEXT) +pipe2_LDADD = $(LDADD) +pipe2_DEPENDENCIES = libtests.a +pkey_alloc_SOURCES = pkey_alloc.c +pkey_alloc_OBJECTS = pkey_alloc.$(OBJEXT) +pkey_alloc_LDADD = $(LDADD) +pkey_alloc_DEPENDENCIES = libtests.a +pkey_free_SOURCES = pkey_free.c +pkey_free_OBJECTS = pkey_free.$(OBJEXT) +pkey_free_LDADD = $(LDADD) +pkey_free_DEPENDENCIES = libtests.a +pkey_mprotect_SOURCES = pkey_mprotect.c +pkey_mprotect_OBJECTS = pkey_mprotect.$(OBJEXT) +pkey_mprotect_LDADD = $(LDADD) +pkey_mprotect_DEPENDENCIES = libtests.a +poll_SOURCES = poll.c +poll_OBJECTS = poll.$(OBJEXT) +poll_LDADD = $(LDADD) +poll_DEPENDENCIES = libtests.a +ppoll_SOURCES = ppoll.c +ppoll_OBJECTS = ppoll.$(OBJEXT) +ppoll_LDADD = $(LDADD) +ppoll_DEPENDENCIES = libtests.a +prctl_arg2_intptr_SOURCES = prctl-arg2-intptr.c +prctl_arg2_intptr_OBJECTS = prctl-arg2-intptr.$(OBJEXT) +prctl_arg2_intptr_LDADD = $(LDADD) +prctl_arg2_intptr_DEPENDENCIES = libtests.a +prctl_dumpable_SOURCES = prctl-dumpable.c +prctl_dumpable_OBJECTS = prctl-dumpable.$(OBJEXT) +prctl_dumpable_LDADD = $(LDADD) +prctl_dumpable_DEPENDENCIES = libtests.a +prctl_name_SOURCES = prctl-name.c +prctl_name_OBJECTS = prctl-name.$(OBJEXT) +prctl_name_LDADD = $(LDADD) +prctl_name_DEPENDENCIES = libtests.a +prctl_no_args_SOURCES = prctl-no-args.c +prctl_no_args_OBJECTS = prctl-no-args.$(OBJEXT) +prctl_no_args_LDADD = $(LDADD) +prctl_no_args_DEPENDENCIES = libtests.a +prctl_pdeathsig_SOURCES = prctl-pdeathsig.c +prctl_pdeathsig_OBJECTS = prctl-pdeathsig.$(OBJEXT) +prctl_pdeathsig_LDADD = $(LDADD) +prctl_pdeathsig_DEPENDENCIES = libtests.a +prctl_seccomp_filter_v_SOURCES = prctl-seccomp-filter-v.c +prctl_seccomp_filter_v_OBJECTS = prctl-seccomp-filter-v.$(OBJEXT) +prctl_seccomp_filter_v_LDADD = $(LDADD) +prctl_seccomp_filter_v_DEPENDENCIES = libtests.a +prctl_seccomp_strict_SOURCES = prctl-seccomp-strict.c +prctl_seccomp_strict_OBJECTS = prctl-seccomp-strict.$(OBJEXT) +prctl_seccomp_strict_LDADD = $(LDADD) +prctl_seccomp_strict_DEPENDENCIES = libtests.a +prctl_securebits_SOURCES = prctl-securebits.c +prctl_securebits_OBJECTS = prctl-securebits.$(OBJEXT) +prctl_securebits_LDADD = $(LDADD) +prctl_securebits_DEPENDENCIES = libtests.a +prctl_tid_address_SOURCES = prctl-tid_address.c +prctl_tid_address_OBJECTS = prctl-tid_address.$(OBJEXT) +prctl_tid_address_LDADD = $(LDADD) +prctl_tid_address_DEPENDENCIES = libtests.a +prctl_tsc_SOURCES = prctl-tsc.c +prctl_tsc_OBJECTS = prctl-tsc.$(OBJEXT) +prctl_tsc_LDADD = $(LDADD) +prctl_tsc_DEPENDENCIES = libtests.a +pread64_pwrite64_SOURCES = pread64-pwrite64.c +pread64_pwrite64_OBJECTS = \ + pread64_pwrite64-pread64-pwrite64.$(OBJEXT) +pread64_pwrite64_LDADD = $(LDADD) +pread64_pwrite64_DEPENDENCIES = libtests.a +preadv_SOURCES = preadv.c +preadv_OBJECTS = preadv-preadv.$(OBJEXT) +preadv_LDADD = $(LDADD) +preadv_DEPENDENCIES = libtests.a +preadv_pwritev_SOURCES = preadv-pwritev.c +preadv_pwritev_OBJECTS = preadv_pwritev-preadv-pwritev.$(OBJEXT) +preadv_pwritev_LDADD = $(LDADD) +preadv_pwritev_DEPENDENCIES = libtests.a +preadv2_pwritev2_SOURCES = preadv2-pwritev2.c +preadv2_pwritev2_OBJECTS = preadv2-pwritev2.$(OBJEXT) +preadv2_pwritev2_LDADD = $(LDADD) +preadv2_pwritev2_DEPENDENCIES = libtests.a +print_maxfd_SOURCES = print_maxfd.c +print_maxfd_OBJECTS = print_maxfd.$(OBJEXT) +print_maxfd_LDADD = $(LDADD) +print_maxfd_DEPENDENCIES = libtests.a +printstr_SOURCES = printstr.c +printstr_OBJECTS = printstr.$(OBJEXT) +printstr_LDADD = $(LDADD) +printstr_DEPENDENCIES = libtests.a +prlimit64_SOURCES = prlimit64.c +prlimit64_OBJECTS = prlimit64.$(OBJEXT) +prlimit64_LDADD = $(LDADD) +prlimit64_DEPENDENCIES = libtests.a +process_vm_readv_SOURCES = process_vm_readv.c +process_vm_readv_OBJECTS = process_vm_readv.$(OBJEXT) +process_vm_readv_LDADD = $(LDADD) +process_vm_readv_DEPENDENCIES = libtests.a +process_vm_writev_SOURCES = process_vm_writev.c +process_vm_writev_OBJECTS = process_vm_writev.$(OBJEXT) +process_vm_writev_LDADD = $(LDADD) +process_vm_writev_DEPENDENCIES = libtests.a +pselect6_SOURCES = pselect6.c +pselect6_OBJECTS = pselect6.$(OBJEXT) +pselect6_LDADD = $(LDADD) +pselect6_DEPENDENCIES = libtests.a +ptrace_SOURCES = ptrace.c +ptrace_OBJECTS = ptrace.$(OBJEXT) +ptrace_LDADD = $(LDADD) +ptrace_DEPENDENCIES = libtests.a +pwritev_SOURCES = pwritev.c +pwritev_OBJECTS = pwritev-pwritev.$(OBJEXT) +pwritev_LDADD = $(LDADD) +pwritev_DEPENDENCIES = libtests.a +qual_fault_SOURCES = qual_fault.c +qual_fault_OBJECTS = qual_fault.$(OBJEXT) +qual_fault_LDADD = $(LDADD) +qual_fault_DEPENDENCIES = libtests.a +qual_inject_error_signal_SOURCES = qual_inject-error-signal.c +qual_inject_error_signal_OBJECTS = qual_inject-error-signal.$(OBJEXT) +qual_inject_error_signal_LDADD = $(LDADD) +qual_inject_error_signal_DEPENDENCIES = libtests.a +qual_inject_retval_SOURCES = qual_inject-retval.c +qual_inject_retval_OBJECTS = qual_inject-retval.$(OBJEXT) +qual_inject_retval_LDADD = $(LDADD) +qual_inject_retval_DEPENDENCIES = libtests.a +qual_inject_signal_SOURCES = qual_inject-signal.c +qual_inject_signal_OBJECTS = qual_inject-signal.$(OBJEXT) +qual_inject_signal_LDADD = $(LDADD) +qual_inject_signal_DEPENDENCIES = libtests.a +qual_signal_SOURCES = qual_signal.c +qual_signal_OBJECTS = qual_signal.$(OBJEXT) +qual_signal_LDADD = $(LDADD) +qual_signal_DEPENDENCIES = libtests.a +quotactl_SOURCES = quotactl.c +quotactl_OBJECTS = quotactl.$(OBJEXT) +quotactl_LDADD = $(LDADD) +quotactl_DEPENDENCIES = libtests.a +quotactl_v_SOURCES = quotactl-v.c +quotactl_v_OBJECTS = quotactl-v.$(OBJEXT) +quotactl_v_LDADD = $(LDADD) +quotactl_v_DEPENDENCIES = libtests.a +quotactl_xfs_SOURCES = quotactl-xfs.c +quotactl_xfs_OBJECTS = quotactl-xfs.$(OBJEXT) +quotactl_xfs_LDADD = $(LDADD) +quotactl_xfs_DEPENDENCIES = libtests.a +quotactl_xfs_v_SOURCES = quotactl-xfs-v.c +quotactl_xfs_v_OBJECTS = quotactl-xfs-v.$(OBJEXT) +quotactl_xfs_v_LDADD = $(LDADD) +quotactl_xfs_v_DEPENDENCIES = libtests.a +read_write_SOURCES = read-write.c +read_write_OBJECTS = read-write.$(OBJEXT) +read_write_LDADD = $(LDADD) +read_write_DEPENDENCIES = libtests.a +readahead_SOURCES = readahead.c +readahead_OBJECTS = readahead.$(OBJEXT) +readahead_LDADD = $(LDADD) +readahead_DEPENDENCIES = libtests.a +readdir_SOURCES = readdir.c +readdir_OBJECTS = readdir.$(OBJEXT) +readdir_LDADD = $(LDADD) +readdir_DEPENDENCIES = libtests.a +readlink_SOURCES = readlink.c +readlink_OBJECTS = readlink.$(OBJEXT) +readlink_LDADD = $(LDADD) +readlink_DEPENDENCIES = libtests.a +readlinkat_SOURCES = readlinkat.c +readlinkat_OBJECTS = readlinkat.$(OBJEXT) +readlinkat_LDADD = $(LDADD) +readlinkat_DEPENDENCIES = libtests.a +readv_SOURCES = readv.c +readv_OBJECTS = readv.$(OBJEXT) +readv_LDADD = $(LDADD) +readv_DEPENDENCIES = libtests.a +reboot_SOURCES = reboot.c +reboot_OBJECTS = reboot.$(OBJEXT) +reboot_LDADD = $(LDADD) +reboot_DEPENDENCIES = libtests.a +recvfrom_SOURCES = recvfrom.c +recvfrom_OBJECTS = recvfrom.$(OBJEXT) +recvfrom_LDADD = $(LDADD) +recvfrom_DEPENDENCIES = libtests.a +recvmmsg_timeout_SOURCES = recvmmsg-timeout.c +recvmmsg_timeout_OBJECTS = recvmmsg-timeout.$(OBJEXT) +recvmmsg_timeout_LDADD = $(LDADD) +recvmmsg_timeout_DEPENDENCIES = libtests.a +recvmsg_SOURCES = recvmsg.c +recvmsg_OBJECTS = recvmsg.$(OBJEXT) +recvmsg_LDADD = $(LDADD) +recvmsg_DEPENDENCIES = libtests.a +redirect_fds_SOURCES = redirect-fds.c +redirect_fds_OBJECTS = redirect-fds.$(OBJEXT) +redirect_fds_LDADD = $(LDADD) +redirect_fds_DEPENDENCIES = libtests.a +remap_file_pages_SOURCES = remap_file_pages.c +remap_file_pages_OBJECTS = remap_file_pages.$(OBJEXT) +remap_file_pages_LDADD = $(LDADD) +remap_file_pages_DEPENDENCIES = libtests.a +rename_SOURCES = rename.c +rename_OBJECTS = rename.$(OBJEXT) +rename_LDADD = $(LDADD) +rename_DEPENDENCIES = libtests.a +renameat_SOURCES = renameat.c +renameat_OBJECTS = renameat.$(OBJEXT) +renameat_LDADD = $(LDADD) +renameat_DEPENDENCIES = libtests.a +renameat2_SOURCES = renameat2.c +renameat2_OBJECTS = renameat2.$(OBJEXT) +renameat2_LDADD = $(LDADD) +renameat2_DEPENDENCIES = libtests.a +request_key_SOURCES = request_key.c +request_key_OBJECTS = request_key.$(OBJEXT) +request_key_LDADD = $(LDADD) +request_key_DEPENDENCIES = libtests.a +restart_syscall_SOURCES = restart_syscall.c +restart_syscall_OBJECTS = restart_syscall.$(OBJEXT) +restart_syscall_LDADD = $(LDADD) +restart_syscall_DEPENDENCIES = libtests.a +rmdir_SOURCES = rmdir.c +rmdir_OBJECTS = rmdir.$(OBJEXT) +rmdir_LDADD = $(LDADD) +rmdir_DEPENDENCIES = libtests.a +rt_sigpending_SOURCES = rt_sigpending.c +rt_sigpending_OBJECTS = rt_sigpending.$(OBJEXT) +rt_sigpending_LDADD = $(LDADD) +rt_sigpending_DEPENDENCIES = libtests.a +rt_sigprocmask_SOURCES = rt_sigprocmask.c +rt_sigprocmask_OBJECTS = rt_sigprocmask.$(OBJEXT) +rt_sigprocmask_LDADD = $(LDADD) +rt_sigprocmask_DEPENDENCIES = libtests.a +rt_sigqueueinfo_SOURCES = rt_sigqueueinfo.c +rt_sigqueueinfo_OBJECTS = rt_sigqueueinfo.$(OBJEXT) +rt_sigqueueinfo_LDADD = $(LDADD) +rt_sigqueueinfo_DEPENDENCIES = libtests.a +rt_sigsuspend_SOURCES = rt_sigsuspend.c +rt_sigsuspend_OBJECTS = rt_sigsuspend.$(OBJEXT) +rt_sigsuspend_LDADD = $(LDADD) +rt_sigsuspend_DEPENDENCIES = libtests.a +rt_sigtimedwait_SOURCES = rt_sigtimedwait.c +rt_sigtimedwait_OBJECTS = rt_sigtimedwait.$(OBJEXT) +rt_sigtimedwait_LDADD = $(LDADD) +rt_sigtimedwait_DEPENDENCIES = libtests.a +rt_tgsigqueueinfo_SOURCES = rt_tgsigqueueinfo.c +rt_tgsigqueueinfo_OBJECTS = rt_tgsigqueueinfo.$(OBJEXT) +rt_tgsigqueueinfo_LDADD = $(LDADD) +rt_tgsigqueueinfo_DEPENDENCIES = libtests.a +sched_get_priority_mxx_SOURCES = sched_get_priority_mxx.c +sched_get_priority_mxx_OBJECTS = sched_get_priority_mxx.$(OBJEXT) +sched_get_priority_mxx_LDADD = $(LDADD) +sched_get_priority_mxx_DEPENDENCIES = libtests.a +sched_rr_get_interval_SOURCES = sched_rr_get_interval.c +sched_rr_get_interval_OBJECTS = sched_rr_get_interval.$(OBJEXT) +sched_rr_get_interval_LDADD = $(LDADD) +sched_rr_get_interval_DEPENDENCIES = libtests.a +sched_xetaffinity_SOURCES = sched_xetaffinity.c +sched_xetaffinity_OBJECTS = sched_xetaffinity.$(OBJEXT) +sched_xetaffinity_LDADD = $(LDADD) +sched_xetaffinity_DEPENDENCIES = libtests.a +sched_xetattr_SOURCES = sched_xetattr.c +sched_xetattr_OBJECTS = sched_xetattr.$(OBJEXT) +sched_xetattr_LDADD = $(LDADD) +sched_xetattr_DEPENDENCIES = libtests.a +sched_xetparam_SOURCES = sched_xetparam.c +sched_xetparam_OBJECTS = sched_xetparam.$(OBJEXT) +sched_xetparam_LDADD = $(LDADD) +sched_xetparam_DEPENDENCIES = libtests.a +sched_xetscheduler_SOURCES = sched_xetscheduler.c +sched_xetscheduler_OBJECTS = sched_xetscheduler.$(OBJEXT) +sched_xetscheduler_LDADD = $(LDADD) +sched_xetscheduler_DEPENDENCIES = libtests.a +sched_yield_SOURCES = sched_yield.c +sched_yield_OBJECTS = sched_yield.$(OBJEXT) +sched_yield_LDADD = $(LDADD) +sched_yield_DEPENDENCIES = libtests.a +scm_rights_SOURCES = scm_rights.c +scm_rights_OBJECTS = scm_rights.$(OBJEXT) +scm_rights_LDADD = $(LDADD) +scm_rights_DEPENDENCIES = libtests.a +seccomp_filter_SOURCES = seccomp-filter.c +seccomp_filter_OBJECTS = seccomp-filter.$(OBJEXT) +seccomp_filter_LDADD = $(LDADD) +seccomp_filter_DEPENDENCIES = libtests.a +seccomp_filter_v_SOURCES = seccomp-filter-v.c +seccomp_filter_v_OBJECTS = seccomp-filter-v.$(OBJEXT) +seccomp_filter_v_LDADD = $(LDADD) +seccomp_filter_v_DEPENDENCIES = libtests.a +seccomp_strict_SOURCES = seccomp-strict.c +seccomp_strict_OBJECTS = seccomp-strict.$(OBJEXT) +seccomp_strict_LDADD = $(LDADD) +seccomp_strict_DEPENDENCIES = libtests.a +select_SOURCES = select.c +select_OBJECTS = select.$(OBJEXT) +select_LDADD = $(LDADD) +select_DEPENDENCIES = libtests.a +semop_SOURCES = semop.c +semop_OBJECTS = semop.$(OBJEXT) +semop_LDADD = $(LDADD) +semop_DEPENDENCIES = libtests.a +sendfile_SOURCES = sendfile.c +sendfile_OBJECTS = sendfile.$(OBJEXT) +sendfile_LDADD = $(LDADD) +sendfile_DEPENDENCIES = libtests.a +sendfile64_SOURCES = sendfile64.c +sendfile64_OBJECTS = sendfile64.$(OBJEXT) +sendfile64_LDADD = $(LDADD) +sendfile64_DEPENDENCIES = libtests.a +set_mempolicy_SOURCES = set_mempolicy.c +set_mempolicy_OBJECTS = set_mempolicy.$(OBJEXT) +set_mempolicy_LDADD = $(LDADD) +set_mempolicy_DEPENDENCIES = libtests.a +set_ptracer_any_SOURCES = set_ptracer_any.c +set_ptracer_any_OBJECTS = set_ptracer_any.$(OBJEXT) +set_ptracer_any_LDADD = $(LDADD) +set_ptracer_any_DEPENDENCIES = libtests.a +setdomainname_SOURCES = setdomainname.c +setdomainname_OBJECTS = setdomainname.$(OBJEXT) +setdomainname_LDADD = $(LDADD) +setdomainname_DEPENDENCIES = libtests.a +setfsgid_SOURCES = setfsgid.c +setfsgid_OBJECTS = setfsgid.$(OBJEXT) +setfsgid_LDADD = $(LDADD) +setfsgid_DEPENDENCIES = libtests.a +setfsgid32_SOURCES = setfsgid32.c +setfsgid32_OBJECTS = setfsgid32.$(OBJEXT) +setfsgid32_LDADD = $(LDADD) +setfsgid32_DEPENDENCIES = libtests.a +setfsuid_SOURCES = setfsuid.c +setfsuid_OBJECTS = setfsuid.$(OBJEXT) +setfsuid_LDADD = $(LDADD) +setfsuid_DEPENDENCIES = libtests.a +setfsuid32_SOURCES = setfsuid32.c +setfsuid32_OBJECTS = setfsuid32.$(OBJEXT) +setfsuid32_LDADD = $(LDADD) +setfsuid32_DEPENDENCIES = libtests.a +setgid_SOURCES = setgid.c +setgid_OBJECTS = setgid.$(OBJEXT) +setgid_LDADD = $(LDADD) +setgid_DEPENDENCIES = libtests.a +setgid32_SOURCES = setgid32.c +setgid32_OBJECTS = setgid32.$(OBJEXT) +setgid32_LDADD = $(LDADD) +setgid32_DEPENDENCIES = libtests.a +setgroups_SOURCES = setgroups.c +setgroups_OBJECTS = setgroups.$(OBJEXT) +setgroups_LDADD = $(LDADD) +setgroups_DEPENDENCIES = libtests.a +setgroups32_SOURCES = setgroups32.c +setgroups32_OBJECTS = setgroups32.$(OBJEXT) +setgroups32_LDADD = $(LDADD) +setgroups32_DEPENDENCIES = libtests.a +sethostname_SOURCES = sethostname.c +sethostname_OBJECTS = sethostname.$(OBJEXT) +sethostname_LDADD = $(LDADD) +sethostname_DEPENDENCIES = libtests.a +setns_SOURCES = setns.c +setns_OBJECTS = setns.$(OBJEXT) +setns_LDADD = $(LDADD) +setns_DEPENDENCIES = libtests.a +setregid_SOURCES = setregid.c +setregid_OBJECTS = setregid.$(OBJEXT) +setregid_LDADD = $(LDADD) +setregid_DEPENDENCIES = libtests.a +setregid32_SOURCES = setregid32.c +setregid32_OBJECTS = setregid32.$(OBJEXT) +setregid32_LDADD = $(LDADD) +setregid32_DEPENDENCIES = libtests.a +setresgid_SOURCES = setresgid.c +setresgid_OBJECTS = setresgid.$(OBJEXT) +setresgid_LDADD = $(LDADD) +setresgid_DEPENDENCIES = libtests.a +setresgid32_SOURCES = setresgid32.c +setresgid32_OBJECTS = setresgid32.$(OBJEXT) +setresgid32_LDADD = $(LDADD) +setresgid32_DEPENDENCIES = libtests.a +setresuid_SOURCES = setresuid.c +setresuid_OBJECTS = setresuid.$(OBJEXT) +setresuid_LDADD = $(LDADD) +setresuid_DEPENDENCIES = libtests.a +setresuid32_SOURCES = setresuid32.c +setresuid32_OBJECTS = setresuid32.$(OBJEXT) +setresuid32_LDADD = $(LDADD) +setresuid32_DEPENDENCIES = libtests.a +setreuid_SOURCES = setreuid.c +setreuid_OBJECTS = setreuid.$(OBJEXT) +setreuid_LDADD = $(LDADD) +setreuid_DEPENDENCIES = libtests.a +setreuid32_SOURCES = setreuid32.c +setreuid32_OBJECTS = setreuid32.$(OBJEXT) +setreuid32_LDADD = $(LDADD) +setreuid32_DEPENDENCIES = libtests.a +setrlimit_SOURCES = setrlimit.c +setrlimit_OBJECTS = setrlimit.$(OBJEXT) +setrlimit_LDADD = $(LDADD) +setrlimit_DEPENDENCIES = libtests.a +setuid_SOURCES = setuid.c +setuid_OBJECTS = setuid.$(OBJEXT) +setuid_LDADD = $(LDADD) +setuid_DEPENDENCIES = libtests.a +setuid32_SOURCES = setuid32.c +setuid32_OBJECTS = setuid32.$(OBJEXT) +setuid32_LDADD = $(LDADD) +setuid32_DEPENDENCIES = libtests.a +shmxt_SOURCES = shmxt.c +shmxt_OBJECTS = shmxt.$(OBJEXT) +shmxt_LDADD = $(LDADD) +shmxt_DEPENDENCIES = libtests.a +shutdown_SOURCES = shutdown.c +shutdown_OBJECTS = shutdown.$(OBJEXT) +shutdown_LDADD = $(LDADD) +shutdown_DEPENDENCIES = libtests.a +sigaction_SOURCES = sigaction.c +sigaction_OBJECTS = sigaction.$(OBJEXT) +sigaction_LDADD = $(LDADD) +sigaction_DEPENDENCIES = libtests.a +sigaltstack_SOURCES = sigaltstack.c +sigaltstack_OBJECTS = sigaltstack.$(OBJEXT) +sigaltstack_LDADD = $(LDADD) +sigaltstack_DEPENDENCIES = libtests.a +siginfo_SOURCES = siginfo.c +siginfo_OBJECTS = siginfo.$(OBJEXT) +siginfo_LDADD = $(LDADD) +siginfo_DEPENDENCIES = libtests.a +signal_receive_SOURCES = signal_receive.c +signal_receive_OBJECTS = signal_receive.$(OBJEXT) +signal_receive_LDADD = $(LDADD) +signal_receive_DEPENDENCIES = libtests.a +signalfd4_SOURCES = signalfd4.c +signalfd4_OBJECTS = signalfd4.$(OBJEXT) +signalfd4_LDADD = $(LDADD) +signalfd4_DEPENDENCIES = libtests.a +sigreturn_SOURCES = sigreturn.c +sigreturn_OBJECTS = sigreturn.$(OBJEXT) +sigreturn_LDADD = $(LDADD) +sigreturn_DEPENDENCIES = libtests.a +sleep_SOURCES = sleep.c +sleep_OBJECTS = sleep.$(OBJEXT) +sleep_LDADD = $(LDADD) +sleep_DEPENDENCIES = libtests.a +socketcall_SOURCES = socketcall.c +socketcall_OBJECTS = socketcall.$(OBJEXT) +socketcall_LDADD = $(LDADD) +socketcall_DEPENDENCIES = libtests.a +splice_SOURCES = splice.c +splice_OBJECTS = splice.$(OBJEXT) +splice_LDADD = $(LDADD) +splice_DEPENDENCIES = libtests.a +am_stack_fcall_OBJECTS = stack-fcall.$(OBJEXT) stack-fcall-0.$(OBJEXT) \ + stack-fcall-1.$(OBJEXT) stack-fcall-2.$(OBJEXT) \ + stack-fcall-3.$(OBJEXT) +stack_fcall_OBJECTS = $(am_stack_fcall_OBJECTS) +stack_fcall_LDADD = $(LDADD) +stack_fcall_DEPENDENCIES = libtests.a +stat_SOURCES = stat.c +stat_OBJECTS = stat.$(OBJEXT) +stat_LDADD = $(LDADD) +stat_DEPENDENCIES = libtests.a +stat64_SOURCES = stat64.c +stat64_OBJECTS = stat64-stat64.$(OBJEXT) +stat64_LDADD = $(LDADD) +stat64_DEPENDENCIES = libtests.a +statfs_SOURCES = statfs.c +statfs_OBJECTS = statfs-statfs.$(OBJEXT) +statfs_LDADD = $(LDADD) +statfs_DEPENDENCIES = libtests.a +statfs64_SOURCES = statfs64.c +statfs64_OBJECTS = statfs64.$(OBJEXT) +statfs64_LDADD = $(LDADD) +statfs64_DEPENDENCIES = libtests.a +swap_SOURCES = swap.c +swap_OBJECTS = swap.$(OBJEXT) +swap_LDADD = $(LDADD) +swap_DEPENDENCIES = libtests.a +symlink_SOURCES = symlink.c +symlink_OBJECTS = symlink.$(OBJEXT) +symlink_LDADD = $(LDADD) +symlink_DEPENDENCIES = libtests.a +symlinkat_SOURCES = symlinkat.c +symlinkat_OBJECTS = symlinkat.$(OBJEXT) +symlinkat_LDADD = $(LDADD) +symlinkat_DEPENDENCIES = libtests.a +sync_SOURCES = sync.c +sync_OBJECTS = sync.$(OBJEXT) +sync_LDADD = $(LDADD) +sync_DEPENDENCIES = libtests.a +sync_file_range_SOURCES = sync_file_range.c +sync_file_range_OBJECTS = sync_file_range.$(OBJEXT) +sync_file_range_LDADD = $(LDADD) +sync_file_range_DEPENDENCIES = libtests.a +sync_file_range2_SOURCES = sync_file_range2.c +sync_file_range2_OBJECTS = sync_file_range2.$(OBJEXT) +sync_file_range2_LDADD = $(LDADD) +sync_file_range2_DEPENDENCIES = libtests.a +sysinfo_SOURCES = sysinfo.c +sysinfo_OBJECTS = sysinfo.$(OBJEXT) +sysinfo_LDADD = $(LDADD) +sysinfo_DEPENDENCIES = libtests.a +syslog_SOURCES = syslog.c +syslog_OBJECTS = syslog.$(OBJEXT) +syslog_LDADD = $(LDADD) +syslog_DEPENDENCIES = libtests.a +tee_SOURCES = tee.c +tee_OBJECTS = tee.$(OBJEXT) +tee_LDADD = $(LDADD) +tee_DEPENDENCIES = libtests.a +threads_execve_SOURCES = threads-execve.c +threads_execve_OBJECTS = threads-execve.$(OBJEXT) +threads_execve_DEPENDENCIES = $(LDADD) +time_SOURCES = time.c +time_OBJECTS = time.$(OBJEXT) +time_LDADD = $(LDADD) +time_DEPENDENCIES = libtests.a +timer_create_SOURCES = timer_create.c +timer_create_OBJECTS = timer_create.$(OBJEXT) +timer_create_LDADD = $(LDADD) +timer_create_DEPENDENCIES = libtests.a +timer_xettime_SOURCES = timer_xettime.c +timer_xettime_OBJECTS = timer_xettime.$(OBJEXT) +timer_xettime_LDADD = $(LDADD) +timer_xettime_DEPENDENCIES = libtests.a +timerfd_xettime_SOURCES = timerfd_xettime.c +timerfd_xettime_OBJECTS = timerfd_xettime.$(OBJEXT) +timerfd_xettime_LDADD = $(LDADD) +timerfd_xettime_DEPENDENCIES = libtests.a +times_SOURCES = times.c +times_OBJECTS = times.$(OBJEXT) +times_DEPENDENCIES = $(LDADD) +times_fail_SOURCES = times-fail.c +times_fail_OBJECTS = times-fail.$(OBJEXT) +times_fail_LDADD = $(LDADD) +times_fail_DEPENDENCIES = libtests.a +truncate_SOURCES = truncate.c +truncate_OBJECTS = truncate.$(OBJEXT) +truncate_LDADD = $(LDADD) +truncate_DEPENDENCIES = libtests.a +truncate64_SOURCES = truncate64.c +truncate64_OBJECTS = truncate64-truncate64.$(OBJEXT) +truncate64_LDADD = $(LDADD) +truncate64_DEPENDENCIES = libtests.a +ugetrlimit_SOURCES = ugetrlimit.c +ugetrlimit_OBJECTS = ugetrlimit.$(OBJEXT) +ugetrlimit_LDADD = $(LDADD) +ugetrlimit_DEPENDENCIES = libtests.a +uio_SOURCES = uio.c +uio_OBJECTS = uio-uio.$(OBJEXT) +uio_LDADD = $(LDADD) +uio_DEPENDENCIES = libtests.a +umask_SOURCES = umask.c +umask_OBJECTS = umask.$(OBJEXT) +umask_LDADD = $(LDADD) +umask_DEPENDENCIES = libtests.a +umount_SOURCES = umount.c +umount_OBJECTS = umount.$(OBJEXT) +umount_LDADD = $(LDADD) +umount_DEPENDENCIES = libtests.a +umount2_SOURCES = umount2.c +umount2_OBJECTS = umount2.$(OBJEXT) +umount2_LDADD = $(LDADD) +umount2_DEPENDENCIES = libtests.a +umoven_illptr_SOURCES = umoven-illptr.c +umoven_illptr_OBJECTS = umoven-illptr.$(OBJEXT) +umoven_illptr_LDADD = $(LDADD) +umoven_illptr_DEPENDENCIES = libtests.a +umovestr_SOURCES = umovestr.c +umovestr_OBJECTS = umovestr.$(OBJEXT) +umovestr_LDADD = $(LDADD) +umovestr_DEPENDENCIES = libtests.a +umovestr_illptr_SOURCES = umovestr-illptr.c +umovestr_illptr_OBJECTS = umovestr-illptr.$(OBJEXT) +umovestr_illptr_LDADD = $(LDADD) +umovestr_illptr_DEPENDENCIES = libtests.a +umovestr2_SOURCES = umovestr2.c +umovestr2_OBJECTS = umovestr2.$(OBJEXT) +umovestr2_LDADD = $(LDADD) +umovestr2_DEPENDENCIES = libtests.a +umovestr3_SOURCES = umovestr3.c +umovestr3_OBJECTS = umovestr3.$(OBJEXT) +umovestr3_LDADD = $(LDADD) +umovestr3_DEPENDENCIES = libtests.a +uname_SOURCES = uname.c +uname_OBJECTS = uname.$(OBJEXT) +uname_LDADD = $(LDADD) +uname_DEPENDENCIES = libtests.a +unix_pair_send_recv_SOURCES = unix-pair-send-recv.c +unix_pair_send_recv_OBJECTS = unix-pair-send-recv.$(OBJEXT) +unix_pair_send_recv_LDADD = $(LDADD) +unix_pair_send_recv_DEPENDENCIES = libtests.a +unix_pair_sendto_recvfrom_SOURCES = unix-pair-sendto-recvfrom.c +unix_pair_sendto_recvfrom_OBJECTS = \ + unix-pair-sendto-recvfrom.$(OBJEXT) +unix_pair_sendto_recvfrom_LDADD = $(LDADD) +unix_pair_sendto_recvfrom_DEPENDENCIES = libtests.a +unlink_SOURCES = unlink.c +unlink_OBJECTS = unlink.$(OBJEXT) +unlink_LDADD = $(LDADD) +unlink_DEPENDENCIES = libtests.a +unlinkat_SOURCES = unlinkat.c +unlinkat_OBJECTS = unlinkat.$(OBJEXT) +unlinkat_LDADD = $(LDADD) +unlinkat_DEPENDENCIES = libtests.a +unshare_SOURCES = unshare.c +unshare_OBJECTS = unshare.$(OBJEXT) +unshare_LDADD = $(LDADD) +unshare_DEPENDENCIES = libtests.a +userfaultfd_SOURCES = userfaultfd.c +userfaultfd_OBJECTS = userfaultfd.$(OBJEXT) +userfaultfd_LDADD = $(LDADD) +userfaultfd_DEPENDENCIES = libtests.a +ustat_SOURCES = ustat.c +ustat_OBJECTS = ustat.$(OBJEXT) +ustat_LDADD = $(LDADD) +ustat_DEPENDENCIES = libtests.a +utime_SOURCES = utime.c +utime_OBJECTS = utime.$(OBJEXT) +utime_LDADD = $(LDADD) +utime_DEPENDENCIES = libtests.a +utimensat_SOURCES = utimensat.c +utimensat_OBJECTS = utimensat.$(OBJEXT) +utimensat_LDADD = $(LDADD) +utimensat_DEPENDENCIES = libtests.a +utimes_SOURCES = utimes.c +utimes_OBJECTS = utimes.$(OBJEXT) +utimes_LDADD = $(LDADD) +utimes_DEPENDENCIES = libtests.a +vfork_f_SOURCES = vfork-f.c +vfork_f_OBJECTS = vfork-f.$(OBJEXT) +vfork_f_LDADD = $(LDADD) +vfork_f_DEPENDENCIES = libtests.a +vhangup_SOURCES = vhangup.c +vhangup_OBJECTS = vhangup.$(OBJEXT) +vhangup_LDADD = $(LDADD) +vhangup_DEPENDENCIES = libtests.a +vmsplice_SOURCES = vmsplice.c +vmsplice_OBJECTS = vmsplice.$(OBJEXT) +vmsplice_LDADD = $(LDADD) +vmsplice_DEPENDENCIES = libtests.a +wait4_SOURCES = wait4.c +wait4_OBJECTS = wait4.$(OBJEXT) +wait4_LDADD = $(LDADD) +wait4_DEPENDENCIES = libtests.a +wait4_v_SOURCES = wait4-v.c +wait4_v_OBJECTS = wait4-v.$(OBJEXT) +wait4_v_LDADD = $(LDADD) +wait4_v_DEPENDENCIES = libtests.a +waitid_SOURCES = waitid.c +waitid_OBJECTS = waitid.$(OBJEXT) +waitid_LDADD = $(LDADD) +waitid_DEPENDENCIES = libtests.a +waitid_v_SOURCES = waitid-v.c +waitid_v_OBJECTS = waitid-v.$(OBJEXT) +waitid_v_LDADD = $(LDADD) +waitid_v_DEPENDENCIES = libtests.a +waitpid_SOURCES = waitpid.c +waitpid_OBJECTS = waitpid.$(OBJEXT) +waitpid_LDADD = $(LDADD) +waitpid_DEPENDENCIES = libtests.a +xattr_SOURCES = xattr.c +xattr_OBJECTS = xattr.$(OBJEXT) +xattr_LDADD = $(LDADD) +xattr_DEPENDENCIES = libtests.a +xattr_strings_SOURCES = xattr-strings.c +xattr_strings_OBJECTS = xattr-strings.$(OBJEXT) +xattr_strings_LDADD = $(LDADD) +xattr_strings_DEPENDENCIES = libtests.a +xet_robust_list_SOURCES = xet_robust_list.c +xet_robust_list_OBJECTS = xet_robust_list.$(OBJEXT) +xet_robust_list_LDADD = $(LDADD) +xet_robust_list_DEPENDENCIES = libtests.a +xetitimer_SOURCES = xetitimer.c +xetitimer_OBJECTS = xetitimer.$(OBJEXT) +xetitimer_LDADD = $(LDADD) +xetitimer_DEPENDENCIES = libtests.a +xetpgid_SOURCES = xetpgid.c +xetpgid_OBJECTS = xetpgid.$(OBJEXT) +xetpgid_LDADD = $(LDADD) +xetpgid_DEPENDENCIES = libtests.a +xetpriority_SOURCES = xetpriority.c +xetpriority_OBJECTS = xetpriority.$(OBJEXT) +xetpriority_LDADD = $(LDADD) +xetpriority_DEPENDENCIES = libtests.a +xettimeofday_SOURCES = xettimeofday.c +xettimeofday_OBJECTS = xettimeofday.$(OBJEXT) +xettimeofday_LDADD = $(LDADD) +xettimeofday_DEPENDENCIES = libtests.a +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libtests_a_SOURCES) _newselect.c accept.c accept4.c \ + access.c acct.c add_key.c adjtimex.c aio.c alarm.c answer.c \ + attach-f-p.c attach-f-p-cmd.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c caps-abbrev.c \ + chmod.c chown.c chown32.c chroot.c clock_adjtime.c \ + clock_nanosleep.c clock_xettime.c copy_file_range.c count-f.c \ + creat.c delete_module.c dup.c dup2.c dup3.c epoll_create.c \ + epoll_create1.c epoll_ctl.c epoll_pwait.c epoll_wait.c \ + erestartsys.c eventfd.c execve.c execve-v.c execveat.c \ + execveat-v.c faccessat.c fadvise64.c fadvise64_64.c \ + fallocate.c fanotify_init.c fanotify_mark.c fchdir.c fchmod.c \ + fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c fcntl64.c \ + fdatasync.c file_handle.c file_ioctl.c filter-unavailable.c \ + finit_module.c flock.c fork-f.c fstat.c fstat64.c fstatat64.c \ + fstatfs.c fstatfs64.c fsync.c ftruncate.c ftruncate64.c \ + futex.c futimesat.c get_mempolicy.c getcpu.c getcwd.c \ + getdents.c getdents64.c getegid.c getegid32.c geteuid.c \ + geteuid32.c getgid.c getgid32.c getgroups.c getgroups32.c \ + getpeername.c getpgrp.c getrandom.c getresgid.c getresgid32.c \ + getresuid.c getresuid32.c getrlimit.c getrusage.c getsid.c \ + getsockname.c getuid.c getuid32.c getxxid.c inet-cmsg.c \ + init_module.c inotify.c inotify_init1.c ioctl.c ioctl_block.c \ + ioctl_dm.c ioctl_dm-v.c ioctl_evdev.c ioctl_evdev-v.c \ + ioctl_loop.c ioctl_loop-nv.c ioctl_loop-v.c ioctl_mtd.c \ + ioctl_rtc.c ioctl_rtc-v.c ioctl_scsi.c ioctl_sg_io_v3.c \ + ioctl_sg_io_v4.c ioctl_sock_gifconf.c ioctl_uffdio.c \ + ioctl_v4l2.c ioperm.c iopl.c ioprio.c ip_mreq.c ipc.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kcmp.c \ + kexec_file_load.c kexec_load.c keyctl.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lookup_dcookie.c \ + lseek.c lstat.c lstat64.c mbind.c membarrier.c memfd_create.c \ + migrate_pages.c mincore.c mkdir.c mkdirat.c mknod.c mknodat.c \ + mlock.c mlock2.c mlockall.c mmap.c mmap64.c mmsg.c \ + mmsg-silent.c mmsg_name.c mmsg_name-v.c mount.c move_pages.c \ + mq.c mq_sendrecv.c mq_sendrecv-read.c mq_sendrecv-write.c \ + msg_control.c msg_control-v.c msg_name.c munlockall.c \ + nanosleep.c net-accept-connect.c net-icmp_filter.c \ + net-sockaddr.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_protocol.c netlink_unix_diag.c newfstatat.c \ + nsyscalls.c old_mmap.c oldfstat.c oldlstat.c oldselect.c \ + oldstat.c open.c openat.c pause.c pc.c perf_event_open.c \ + perf_event_open_nonverbose.c perf_event_open_unabbrev.c \ + personality.c pipe.c pipe2.c pkey_alloc.c pkey_free.c \ + pkey_mprotect.c poll.c ppoll.c prctl-arg2-intptr.c \ + prctl-dumpable.c prctl-name.c prctl-no-args.c \ + prctl-pdeathsig.c prctl-seccomp-filter-v.c \ + prctl-seccomp-strict.c prctl-securebits.c prctl-tid_address.c \ + prctl-tsc.c pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c print_maxfd.c printstr.c prlimit64.c \ + process_vm_readv.c process_vm_writev.c pselect6.c ptrace.c \ + pwritev.c qual_fault.c qual_inject-error-signal.c \ + qual_inject-retval.c qual_inject-signal.c qual_signal.c \ + quotactl.c quotactl-v.c quotactl-xfs.c quotactl-xfs-v.c \ + read-write.c readahead.c readdir.c readlink.c readlinkat.c \ + readv.c reboot.c recvfrom.c recvmmsg-timeout.c recvmsg.c \ + redirect-fds.c remap_file_pages.c rename.c renameat.c \ + renameat2.c request_key.c restart_syscall.c rmdir.c \ + rt_sigpending.c rt_sigprocmask.c rt_sigqueueinfo.c \ + rt_sigsuspend.c rt_sigtimedwait.c rt_tgsigqueueinfo.c \ + sched_get_priority_mxx.c sched_rr_get_interval.c \ + sched_xetaffinity.c sched_xetattr.c sched_xetparam.c \ + sched_xetscheduler.c sched_yield.c scm_rights.c \ + seccomp-filter.c seccomp-filter-v.c seccomp-strict.c select.c \ + semop.c sendfile.c sendfile64.c set_mempolicy.c \ + set_ptracer_any.c setdomainname.c setfsgid.c setfsgid32.c \ + setfsuid.c setfsuid32.c setgid.c setgid32.c setgroups.c \ + setgroups32.c sethostname.c setns.c setregid.c setregid32.c \ + setresgid.c setresgid32.c setresuid.c setresuid32.c setreuid.c \ + setreuid32.c setrlimit.c setuid.c setuid32.c shmxt.c \ + shutdown.c sigaction.c sigaltstack.c siginfo.c \ + signal_receive.c signalfd4.c sigreturn.c sleep.c socketcall.c \ + splice.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ + statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + threads-execve.c time.c timer_create.c timer_xettime.c \ + timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ + ugetrlimit.c uio.c umask.c umount.c umount2.c umoven-illptr.c \ + umovestr.c umovestr-illptr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unix-pair-sendto-recvfrom.c unlink.c \ + unlinkat.c unshare.c userfaultfd.c ustat.c utime.c utimensat.c \ + utimes.c vfork-f.c vhangup.c vmsplice.c wait4.c wait4-v.c \ + waitid.c waitid-v.c waitpid.c xattr.c xattr-strings.c \ + xet_robust_list.c xetitimer.c xetpgid.c xetpriority.c \ + xettimeofday.c +DIST_SOURCES = $(libtests_a_SOURCES) _newselect.c accept.c accept4.c \ + access.c acct.c add_key.c adjtimex.c aio.c alarm.c answer.c \ + attach-f-p.c attach-f-p-cmd.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c caps-abbrev.c \ + chmod.c chown.c chown32.c chroot.c clock_adjtime.c \ + clock_nanosleep.c clock_xettime.c copy_file_range.c count-f.c \ + creat.c delete_module.c dup.c dup2.c dup3.c epoll_create.c \ + epoll_create1.c epoll_ctl.c epoll_pwait.c epoll_wait.c \ + erestartsys.c eventfd.c execve.c execve-v.c execveat.c \ + execveat-v.c faccessat.c fadvise64.c fadvise64_64.c \ + fallocate.c fanotify_init.c fanotify_mark.c fchdir.c fchmod.c \ + fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c fcntl64.c \ + fdatasync.c file_handle.c file_ioctl.c filter-unavailable.c \ + finit_module.c flock.c fork-f.c fstat.c fstat64.c fstatat64.c \ + fstatfs.c fstatfs64.c fsync.c ftruncate.c ftruncate64.c \ + futex.c futimesat.c get_mempolicy.c getcpu.c getcwd.c \ + getdents.c getdents64.c getegid.c getegid32.c geteuid.c \ + geteuid32.c getgid.c getgid32.c getgroups.c getgroups32.c \ + getpeername.c getpgrp.c getrandom.c getresgid.c getresgid32.c \ + getresuid.c getresuid32.c getrlimit.c getrusage.c getsid.c \ + getsockname.c getuid.c getuid32.c getxxid.c inet-cmsg.c \ + init_module.c inotify.c inotify_init1.c ioctl.c ioctl_block.c \ + ioctl_dm.c ioctl_dm-v.c ioctl_evdev.c ioctl_evdev-v.c \ + ioctl_loop.c ioctl_loop-nv.c ioctl_loop-v.c ioctl_mtd.c \ + ioctl_rtc.c ioctl_rtc-v.c ioctl_scsi.c ioctl_sg_io_v3.c \ + ioctl_sg_io_v4.c ioctl_sock_gifconf.c ioctl_uffdio.c \ + ioctl_v4l2.c ioperm.c iopl.c ioprio.c ip_mreq.c ipc.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kcmp.c \ + kexec_file_load.c kexec_load.c keyctl.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lookup_dcookie.c \ + lseek.c lstat.c lstat64.c mbind.c membarrier.c memfd_create.c \ + migrate_pages.c mincore.c mkdir.c mkdirat.c mknod.c mknodat.c \ + mlock.c mlock2.c mlockall.c mmap.c mmap64.c mmsg.c \ + mmsg-silent.c mmsg_name.c mmsg_name-v.c mount.c move_pages.c \ + mq.c mq_sendrecv.c mq_sendrecv-read.c mq_sendrecv-write.c \ + msg_control.c msg_control-v.c msg_name.c munlockall.c \ + nanosleep.c net-accept-connect.c net-icmp_filter.c \ + net-sockaddr.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_protocol.c netlink_unix_diag.c newfstatat.c \ + nsyscalls.c old_mmap.c oldfstat.c oldlstat.c oldselect.c \ + oldstat.c open.c openat.c pause.c pc.c perf_event_open.c \ + perf_event_open_nonverbose.c perf_event_open_unabbrev.c \ + personality.c pipe.c pipe2.c pkey_alloc.c pkey_free.c \ + pkey_mprotect.c poll.c ppoll.c prctl-arg2-intptr.c \ + prctl-dumpable.c prctl-name.c prctl-no-args.c \ + prctl-pdeathsig.c prctl-seccomp-filter-v.c \ + prctl-seccomp-strict.c prctl-securebits.c prctl-tid_address.c \ + prctl-tsc.c pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c print_maxfd.c printstr.c prlimit64.c \ + process_vm_readv.c process_vm_writev.c pselect6.c ptrace.c \ + pwritev.c qual_fault.c qual_inject-error-signal.c \ + qual_inject-retval.c qual_inject-signal.c qual_signal.c \ + quotactl.c quotactl-v.c quotactl-xfs.c quotactl-xfs-v.c \ + read-write.c readahead.c readdir.c readlink.c readlinkat.c \ + readv.c reboot.c recvfrom.c recvmmsg-timeout.c recvmsg.c \ + redirect-fds.c remap_file_pages.c rename.c renameat.c \ + renameat2.c request_key.c restart_syscall.c rmdir.c \ + rt_sigpending.c rt_sigprocmask.c rt_sigqueueinfo.c \ + rt_sigsuspend.c rt_sigtimedwait.c rt_tgsigqueueinfo.c \ + sched_get_priority_mxx.c sched_rr_get_interval.c \ + sched_xetaffinity.c sched_xetattr.c sched_xetparam.c \ + sched_xetscheduler.c sched_yield.c scm_rights.c \ + seccomp-filter.c seccomp-filter-v.c seccomp-strict.c select.c \ + semop.c sendfile.c sendfile64.c set_mempolicy.c \ + set_ptracer_any.c setdomainname.c setfsgid.c setfsgid32.c \ + setfsuid.c setfsuid32.c setgid.c setgid32.c setgroups.c \ + setgroups32.c sethostname.c setns.c setregid.c setregid32.c \ + setresgid.c setresgid32.c setresuid.c setresuid32.c setreuid.c \ + setreuid32.c setrlimit.c setuid.c setuid32.c shmxt.c \ + shutdown.c sigaction.c sigaltstack.c siginfo.c \ + signal_receive.c signalfd4.c sigreturn.c sleep.c socketcall.c \ + splice.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ + statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + threads-execve.c time.c timer_create.c timer_xettime.c \ + timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ + ugetrlimit.c uio.c umask.c umount.c umount2.c umoven-illptr.c \ + umovestr.c umovestr-illptr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unix-pair-sendto-recvfrom.c unlink.c \ + unlinkat.c unshare.c userfaultfd.c ustat.c utime.c utimensat.c \ + utimes.c vfork-f.c vhangup.c vmsplice.c wait4.c wait4-v.c \ + waitid.c waitid-v.c waitpid.c xattr.c xattr-strings.c \ + xet_robust_list.c xetitimer.c xetpgid.c xetpriority.c \ + xettimeofday.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__extra_recursive_targets = check-valgrind-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +@USE_LIBUNWIND_TRUE@am__EXEEXT_1 = strace-k.test +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CYGPATH_W = @CYGPATH_W@ +DEB_CHANGELOGTIME = @DEB_CHANGELOGTIME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ +ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ +ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ +ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ +EXEEXT = @EXEEXT@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LCOV = @LCOV@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MIPS_ABI = @MIPS_ABI@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +RPM_CHANGELOGTIME = @RPM_CHANGELOGTIME@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VALGRIND = @VALGRIND@ +VALGRIND_ENABLED = @VALGRIND_ENABLED@ +VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +arch = @arch@ +arch_m32 = @arch_m32@ +arch_mx32 = @arch_mx32@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dl_LIBS = @dl_LIBS@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libunwind_CPPFLAGS = @libunwind_CPPFLAGS@ +libunwind_LDFLAGS = @libunwind_LDFLAGS@ +libunwind_LIBS = @libunwind_LIBS@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +valgrind_enabled_tools = @valgrind_enabled_tools@ +valgrind_tools = @valgrind_tools@ +OS = linux +ARCH = @arch_m32@ +MPERS_NAME = m32 +ARCH_MFLAGS = -DMPERS_IS_$(MPERS_NAME) -m32 +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = $(ARCH_MFLAGS) \ + -I$(builddir) \ + -I$(top_builddir)/$(OS)/$(ARCH) \ + -I$(top_srcdir)/$(OS)/$(ARCH) \ + -I$(top_builddir)/$(OS) \ + -I$(top_srcdir)/$(OS) \ + -I$(top_builddir) \ + -I$(top_srcdir) + +AM_LDFLAGS = $(ARCH_MFLAGS) +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + fill_memory.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + libmmsg.c \ + libsocketcall.c \ + overflowuid.c \ + pipe_maxfd.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + signal2name.c \ + sprintrc.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES + +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) +fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mq_LDADD = -lrt $(LDADD) +mq_sendrecv_LDADD = -lrt $(LDADD) +mq_sendrecv_read_LDADD = -lrt $(LDADD) +mq_sendrecv_write_LDADD = -lrt $(LDADD) +newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +threads_execve_LDADD = -lrt -lpthread $(LDADD) +times_LDADD = -lrt $(LDADD) +truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stack_fcall_SOURCES = stack-fcall.c \ + stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c + +@USE_LIBUNWIND_FALSE@LIBUNWIND_TESTS = +@USE_LIBUNWIND_TRUE@LIBUNWIND_TESTS = strace-k.test +DECODER_TESTS = \ + _newselect.test \ + accept.test \ + accept4.test \ + access.test \ + acct.test \ + add_key.test \ + adjtimex.test \ + aio.test \ + alarm.test \ + bpf.test \ + brk.test \ + btrfs-v.test \ + btrfs-vw.test \ + btrfs-w.test \ + btrfs.test \ + caps-abbrev.test \ + caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ + clock_nanosleep.test \ + clock_xettime.test \ + copy_file_range.test \ + creat.test \ + delete_module.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ + epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ + erestartsys.test \ + eventfd.test \ + execve-v.test \ + execve.test \ + execveat-v.test \ + execveat.test \ + faccessat.test \ + fadvise64.test \ + fadvise64_64.test \ + fallocate.test \ + fanotify_init.test \ + fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ + fcntl.test \ + fcntl64.test \ + fdatasync.test \ + file_handle.test \ + file_ioctl.test \ + finit_module.test \ + flock.test \ + fstat.test \ + fstat64.test \ + fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ + ftruncate.test \ + ftruncate64.test \ + futex.test \ + futimesat.test \ + get_mempolicy.test \ + getcpu.test \ + getcwd.test \ + getdents.test \ + getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpeername.test \ + getpgrp.test \ + getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrlimit.test \ + getrusage.test \ + getsid.test \ + getsockname.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ + inet-cmsg.test \ + init_module.test \ + inotify.test \ + inotify_init1.test \ + ioctl.test \ + ioctl_block.test \ + ioctl_dm-v.test \ + ioctl_dm.test \ + ioctl_evdev-v.test \ + ioctl_evdev.test \ + ioctl_loop-nv.test \ + ioctl_loop-v.test \ + ioctl_loop.test \ + ioctl_mtd.test \ + ioctl_rtc-v.test \ + ioctl_rtc.test \ + ioctl_scsi.test \ + ioctl_sg_io_v3.test \ + ioctl_sg_io_v4.test \ + ioctl_sock_gifconf.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ + ioprio.test \ + ip_mreq.test \ + ipc.test \ + ipc_msg.test \ + ipc_msgbuf.test \ + ipc_sem.test \ + ipc_shm.test \ + kcmp.test \ + kexec_file_load.test \ + kexec_load.test \ + keyctl.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ + llseek.test \ + lookup_dcookie.test \ + lseek.test \ + lstat.test \ + lstat64.test \ + mbind.test \ + membarrier.test \ + memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ + mlock2.test \ + mlockall.test \ + mmap.test \ + mmap64.test \ + mmsg-silent.test \ + mmsg.test \ + mmsg_name-v.test \ + mmsg_name.test \ + mount.test \ + move_pages.test \ + mq.test \ + mq_sendrecv-read.test \ + mq_sendrecv-write.test \ + mq_sendrecv.test \ + msg_control-v.test \ + msg_control.test \ + msg_name.test \ + munlockall.test \ + nanosleep.test \ + net-icmp_filter.test \ + net-sockaddr.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ + net.test \ + netlink_protocol.test \ + newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ + oldfstat.test \ + oldlstat.test \ + oldselect.test \ + oldstat.test \ + open.test \ + openat.test \ + pause.test \ + perf_event_open.test \ + perf_event_open_nonverbose.test \ + perf_event_open_unabbrev.test \ + personality.test \ + pipe.test \ + pipe2.test \ + pkey_alloc.test \ + pkey_free.test \ + pkey_mprotect.test \ + poll.test \ + ppoll.test \ + prctl-arg2-intptr.test \ + prctl-dumpable.test \ + prctl-name.test \ + prctl-no-args.test \ + prctl-pdeathsig.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + prctl-securebits.test \ + prctl-tid_address.test \ + prctl-tsc.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv.test \ + preadv2-pwritev2.test \ + printstr.test \ + prlimit64.test \ + process_vm_readv.test \ + process_vm_writev.test \ + pselect6.test \ + ptrace.test \ + pwritev.test \ + qual_fault-exit_group.test \ + quotactl-v.test \ + quotactl-xfs-v.test \ + quotactl-xfs.test \ + quotactl.test \ + read-write.test \ + readahead.test \ + readdir.test \ + readlink.test \ + readlinkat.test \ + readv.test \ + reboot.test \ + recvfrom.test \ + recvmmsg-timeout.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + request_key.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ + rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ + sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ + scm_rights-fd.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ + select.test \ + semop.test \ + sendfile.test \ + sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setns.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setrlimit.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ + shutdown.test \ + sigaction.test \ + sigaltstack.test \ + siginfo.test \ + signalfd4.test \ + sigreturn.test \ + socketcall.test \ + splice.test \ + stat.test \ + stat64.test \ + statfs.test \ + statfs64.test \ + sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ + sysinfo.test \ + syslog.test \ + tee.test \ + time.test \ + timer_create.test \ + timer_xettime.test \ + timerfd_xettime.test \ + times-fail.test \ + times.test \ + truncate.test \ + truncate64.test \ + ugetrlimit.test \ + uio.test \ + umask.test \ + umount.test \ + umount2.test \ + umoven-illptr.test \ + umovestr-illptr.test \ + umovestr.test \ + umovestr2.test \ + umovestr3.test \ + uname.test \ + unix-pair-send-recv.test \ + unix-pair-sendto-recvfrom.test \ + unlink.test \ + unlinkat.test \ + unshare.test \ + userfaultfd.test \ + ustat.test \ + utime.test \ + utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ + wait4-v.test \ + wait4.test \ + waitid-v.test \ + waitid.test \ + waitpid.test \ + xattr-strings.test \ + xattr.test \ + xet_robust_list.test \ + xetitimer.test \ + xetpgid.test \ + xetpriority.test \ + xettimeofday.test \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ + count.test \ + detach-running.test \ + detach-sleeping.test \ + detach-stopped.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + options-syntax.test \ + pc.test \ + qual_fault-syntax.test \ + qual_fault.test \ + qual_inject-error-signal.test \ + qual_inject-retval.test \ + qual_inject-signal.test \ + qual_inject-syntax.test \ + qual_signal.test \ + qual_syscall.test \ + redirect-fds.test \ + redirect.test \ + restart_syscall.test \ + signal_receive.test \ + strace-C.test \ + strace-E.test \ + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + threads-execve.test \ + vfork-f.test \ + # end of MISC_TESTS + +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) +TEST_LOG_COMPILER = env +AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh +VALGRIND_FLAGS = --quiet +VALGRIND_SUPPRESSIONS_FILES = $(srcdir)/strace.supp +EXTRA_DIST = init.sh run.sh match.awk \ + caps-abbrev.awk \ + caps.awk \ + count-f.expected \ + eventfd.expected \ + fadvise.h \ + filter-unavailable.expected \ + fstatat.c \ + fstatx.c \ + getresugid.c \ + init_delete_module.h \ + ipc.sh \ + ipc_msgbuf.expected \ + ksysent.sed \ + lstatx.c \ + net.expected \ + oldselect.expected \ + pipe.expected \ + ppoll-v.expected \ + ppoll.expected \ + process_vm_readv_writev.c \ + qual_fault-exit_group.expected \ + qual_inject-error-signal.expected \ + qual_inject-signal.expected \ + quotactl.h \ + scno_tampering.sh \ + setfsugid.c \ + setresugid.c \ + setreugid.c \ + setugid.c \ + sigaction.awk \ + sigaltstack.expected \ + sockname.c \ + statfs.expected \ + statx.sh \ + strace-C.expected \ + strace-E.expected \ + strace-T.expected \ + strace-ff.expected \ + strace-k.test \ + strace-r.expected \ + strace.supp \ + struct_flock.c \ + sun_path.expected \ + uio.expected \ + umode_t.c \ + umovestr.expected \ + unix-pair-send-recv.expected \ + unix-pair-sendto-recvfrom.expected \ + xchownx.c \ + xgetrlimit.c \ + xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ + xstatx.c \ + $(TESTS) + +objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT))) +CLEANFILES = ksysent.h $(TESTS:=.tmp) syscallent.i scno.h +SCNO_CPPFLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(ARCH_MFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) + +digits = [[:digit:]][[:digit:]]* +al_nums = [[:alnum:]_][[:alnum:]_]* +SCNO_SED = /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 +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../scno.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests-m32/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests-m32/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/../scno.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkLIBRARIES: + -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) + +libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtests.a + $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) + $(AM_V_at)$(RANLIB) libtests.a + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) + +_newselect$(EXEEXT): $(_newselect_OBJECTS) $(_newselect_DEPENDENCIES) $(EXTRA__newselect_DEPENDENCIES) + @rm -f _newselect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(_newselect_OBJECTS) $(_newselect_LDADD) $(LIBS) + +accept$(EXEEXT): $(accept_OBJECTS) $(accept_DEPENDENCIES) $(EXTRA_accept_DEPENDENCIES) + @rm -f accept$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(accept_OBJECTS) $(accept_LDADD) $(LIBS) + +accept4$(EXEEXT): $(accept4_OBJECTS) $(accept4_DEPENDENCIES) $(EXTRA_accept4_DEPENDENCIES) + @rm -f accept4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(accept4_OBJECTS) $(accept4_LDADD) $(LIBS) + +access$(EXEEXT): $(access_OBJECTS) $(access_DEPENDENCIES) $(EXTRA_access_DEPENDENCIES) + @rm -f access$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(access_OBJECTS) $(access_LDADD) $(LIBS) + +acct$(EXEEXT): $(acct_OBJECTS) $(acct_DEPENDENCIES) $(EXTRA_acct_DEPENDENCIES) + @rm -f acct$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(acct_OBJECTS) $(acct_LDADD) $(LIBS) + +add_key$(EXEEXT): $(add_key_OBJECTS) $(add_key_DEPENDENCIES) $(EXTRA_add_key_DEPENDENCIES) + @rm -f add_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(add_key_OBJECTS) $(add_key_LDADD) $(LIBS) + +adjtimex$(EXEEXT): $(adjtimex_OBJECTS) $(adjtimex_DEPENDENCIES) $(EXTRA_adjtimex_DEPENDENCIES) + @rm -f adjtimex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(adjtimex_OBJECTS) $(adjtimex_LDADD) $(LIBS) + +aio$(EXEEXT): $(aio_OBJECTS) $(aio_DEPENDENCIES) $(EXTRA_aio_DEPENDENCIES) + @rm -f aio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(aio_OBJECTS) $(aio_LDADD) $(LIBS) + +alarm$(EXEEXT): $(alarm_OBJECTS) $(alarm_DEPENDENCIES) $(EXTRA_alarm_DEPENDENCIES) + @rm -f alarm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(alarm_OBJECTS) $(alarm_LDADD) $(LIBS) + +answer$(EXEEXT): $(answer_OBJECTS) $(answer_DEPENDENCIES) $(EXTRA_answer_DEPENDENCIES) + @rm -f answer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(answer_OBJECTS) $(answer_LDADD) $(LIBS) + +attach-f-p$(EXEEXT): $(attach_f_p_OBJECTS) $(attach_f_p_DEPENDENCIES) $(EXTRA_attach_f_p_DEPENDENCIES) + @rm -f attach-f-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_OBJECTS) $(attach_f_p_LDADD) $(LIBS) + +attach-f-p-cmd$(EXEEXT): $(attach_f_p_cmd_OBJECTS) $(attach_f_p_cmd_DEPENDENCIES) $(EXTRA_attach_f_p_cmd_DEPENDENCIES) + @rm -f attach-f-p-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_cmd_OBJECTS) $(attach_f_p_cmd_LDADD) $(LIBS) + +attach-p-cmd-cmd$(EXEEXT): $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_DEPENDENCIES) $(EXTRA_attach_p_cmd_cmd_DEPENDENCIES) + @rm -f attach-p-cmd-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_LDADD) $(LIBS) + +attach-p-cmd-p$(EXEEXT): $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_DEPENDENCIES) $(EXTRA_attach_p_cmd_p_DEPENDENCIES) + @rm -f attach-p-cmd-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_LDADD) $(LIBS) + +bpf$(EXEEXT): $(bpf_OBJECTS) $(bpf_DEPENDENCIES) $(EXTRA_bpf_DEPENDENCIES) + @rm -f bpf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(bpf_OBJECTS) $(bpf_LDADD) $(LIBS) + +brk$(EXEEXT): $(brk_OBJECTS) $(brk_DEPENDENCIES) $(EXTRA_brk_DEPENDENCIES) + @rm -f brk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(brk_OBJECTS) $(brk_LDADD) $(LIBS) + +btrfs$(EXEEXT): $(btrfs_OBJECTS) $(btrfs_DEPENDENCIES) $(EXTRA_btrfs_DEPENDENCIES) + @rm -f btrfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(btrfs_OBJECTS) $(btrfs_LDADD) $(LIBS) + +caps$(EXEEXT): $(caps_OBJECTS) $(caps_DEPENDENCIES) $(EXTRA_caps_DEPENDENCIES) + @rm -f caps$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(caps_OBJECTS) $(caps_LDADD) $(LIBS) + +caps-abbrev$(EXEEXT): $(caps_abbrev_OBJECTS) $(caps_abbrev_DEPENDENCIES) $(EXTRA_caps_abbrev_DEPENDENCIES) + @rm -f caps-abbrev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(caps_abbrev_OBJECTS) $(caps_abbrev_LDADD) $(LIBS) + +chmod$(EXEEXT): $(chmod_OBJECTS) $(chmod_DEPENDENCIES) $(EXTRA_chmod_DEPENDENCIES) + @rm -f chmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chmod_OBJECTS) $(chmod_LDADD) $(LIBS) + +chown$(EXEEXT): $(chown_OBJECTS) $(chown_DEPENDENCIES) $(EXTRA_chown_DEPENDENCIES) + @rm -f chown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown_OBJECTS) $(chown_LDADD) $(LIBS) + +chown32$(EXEEXT): $(chown32_OBJECTS) $(chown32_DEPENDENCIES) $(EXTRA_chown32_DEPENDENCIES) + @rm -f chown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown32_OBJECTS) $(chown32_LDADD) $(LIBS) + +chroot$(EXEEXT): $(chroot_OBJECTS) $(chroot_DEPENDENCIES) $(EXTRA_chroot_DEPENDENCIES) + @rm -f chroot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chroot_OBJECTS) $(chroot_LDADD) $(LIBS) + +clock_adjtime$(EXEEXT): $(clock_adjtime_OBJECTS) $(clock_adjtime_DEPENDENCIES) $(EXTRA_clock_adjtime_DEPENDENCIES) + @rm -f clock_adjtime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_adjtime_OBJECTS) $(clock_adjtime_LDADD) $(LIBS) + +clock_nanosleep$(EXEEXT): $(clock_nanosleep_OBJECTS) $(clock_nanosleep_DEPENDENCIES) $(EXTRA_clock_nanosleep_DEPENDENCIES) + @rm -f clock_nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_nanosleep_OBJECTS) $(clock_nanosleep_LDADD) $(LIBS) + +clock_xettime$(EXEEXT): $(clock_xettime_OBJECTS) $(clock_xettime_DEPENDENCIES) $(EXTRA_clock_xettime_DEPENDENCIES) + @rm -f clock_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_xettime_OBJECTS) $(clock_xettime_LDADD) $(LIBS) + +copy_file_range$(EXEEXT): $(copy_file_range_OBJECTS) $(copy_file_range_DEPENDENCIES) $(EXTRA_copy_file_range_DEPENDENCIES) + @rm -f copy_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(copy_file_range_OBJECTS) $(copy_file_range_LDADD) $(LIBS) + +count-f$(EXEEXT): $(count_f_OBJECTS) $(count_f_DEPENDENCIES) $(EXTRA_count_f_DEPENDENCIES) + @rm -f count-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(count_f_OBJECTS) $(count_f_LDADD) $(LIBS) + +creat$(EXEEXT): $(creat_OBJECTS) $(creat_DEPENDENCIES) $(EXTRA_creat_DEPENDENCIES) + @rm -f creat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(creat_OBJECTS) $(creat_LDADD) $(LIBS) + +delete_module$(EXEEXT): $(delete_module_OBJECTS) $(delete_module_DEPENDENCIES) $(EXTRA_delete_module_DEPENDENCIES) + @rm -f delete_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(delete_module_OBJECTS) $(delete_module_LDADD) $(LIBS) + +dup$(EXEEXT): $(dup_OBJECTS) $(dup_DEPENDENCIES) $(EXTRA_dup_DEPENDENCIES) + @rm -f dup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup_OBJECTS) $(dup_LDADD) $(LIBS) + +dup2$(EXEEXT): $(dup2_OBJECTS) $(dup2_DEPENDENCIES) $(EXTRA_dup2_DEPENDENCIES) + @rm -f dup2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup2_OBJECTS) $(dup2_LDADD) $(LIBS) + +dup3$(EXEEXT): $(dup3_OBJECTS) $(dup3_DEPENDENCIES) $(EXTRA_dup3_DEPENDENCIES) + @rm -f dup3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup3_OBJECTS) $(dup3_LDADD) $(LIBS) + +epoll_create$(EXEEXT): $(epoll_create_OBJECTS) $(epoll_create_DEPENDENCIES) $(EXTRA_epoll_create_DEPENDENCIES) + @rm -f epoll_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create_OBJECTS) $(epoll_create_LDADD) $(LIBS) + +epoll_create1$(EXEEXT): $(epoll_create1_OBJECTS) $(epoll_create1_DEPENDENCIES) $(EXTRA_epoll_create1_DEPENDENCIES) + @rm -f epoll_create1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create1_OBJECTS) $(epoll_create1_LDADD) $(LIBS) + +epoll_ctl$(EXEEXT): $(epoll_ctl_OBJECTS) $(epoll_ctl_DEPENDENCIES) $(EXTRA_epoll_ctl_DEPENDENCIES) + @rm -f epoll_ctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_ctl_OBJECTS) $(epoll_ctl_LDADD) $(LIBS) + +epoll_pwait$(EXEEXT): $(epoll_pwait_OBJECTS) $(epoll_pwait_DEPENDENCIES) $(EXTRA_epoll_pwait_DEPENDENCIES) + @rm -f epoll_pwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_pwait_OBJECTS) $(epoll_pwait_LDADD) $(LIBS) + +epoll_wait$(EXEEXT): $(epoll_wait_OBJECTS) $(epoll_wait_DEPENDENCIES) $(EXTRA_epoll_wait_DEPENDENCIES) + @rm -f epoll_wait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_wait_OBJECTS) $(epoll_wait_LDADD) $(LIBS) + +erestartsys$(EXEEXT): $(erestartsys_OBJECTS) $(erestartsys_DEPENDENCIES) $(EXTRA_erestartsys_DEPENDENCIES) + @rm -f erestartsys$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(erestartsys_OBJECTS) $(erestartsys_LDADD) $(LIBS) + +eventfd$(EXEEXT): $(eventfd_OBJECTS) $(eventfd_DEPENDENCIES) $(EXTRA_eventfd_DEPENDENCIES) + @rm -f eventfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(eventfd_OBJECTS) $(eventfd_LDADD) $(LIBS) + +execve$(EXEEXT): $(execve_OBJECTS) $(execve_DEPENDENCIES) $(EXTRA_execve_DEPENDENCIES) + @rm -f execve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_OBJECTS) $(execve_LDADD) $(LIBS) + +execve-v$(EXEEXT): $(execve_v_OBJECTS) $(execve_v_DEPENDENCIES) $(EXTRA_execve_v_DEPENDENCIES) + @rm -f execve-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_v_OBJECTS) $(execve_v_LDADD) $(LIBS) + +execveat$(EXEEXT): $(execveat_OBJECTS) $(execveat_DEPENDENCIES) $(EXTRA_execveat_DEPENDENCIES) + @rm -f execveat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_OBJECTS) $(execveat_LDADD) $(LIBS) + +execveat-v$(EXEEXT): $(execveat_v_OBJECTS) $(execveat_v_DEPENDENCIES) $(EXTRA_execveat_v_DEPENDENCIES) + @rm -f execveat-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_v_OBJECTS) $(execveat_v_LDADD) $(LIBS) + +faccessat$(EXEEXT): $(faccessat_OBJECTS) $(faccessat_DEPENDENCIES) $(EXTRA_faccessat_DEPENDENCIES) + @rm -f faccessat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(faccessat_OBJECTS) $(faccessat_LDADD) $(LIBS) + +fadvise64$(EXEEXT): $(fadvise64_OBJECTS) $(fadvise64_DEPENDENCIES) $(EXTRA_fadvise64_DEPENDENCIES) + @rm -f fadvise64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fadvise64_OBJECTS) $(fadvise64_LDADD) $(LIBS) + +fadvise64_64$(EXEEXT): $(fadvise64_64_OBJECTS) $(fadvise64_64_DEPENDENCIES) $(EXTRA_fadvise64_64_DEPENDENCIES) + @rm -f fadvise64_64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fadvise64_64_OBJECTS) $(fadvise64_64_LDADD) $(LIBS) + +fallocate$(EXEEXT): $(fallocate_OBJECTS) $(fallocate_DEPENDENCIES) $(EXTRA_fallocate_DEPENDENCIES) + @rm -f fallocate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fallocate_OBJECTS) $(fallocate_LDADD) $(LIBS) + +fanotify_init$(EXEEXT): $(fanotify_init_OBJECTS) $(fanotify_init_DEPENDENCIES) $(EXTRA_fanotify_init_DEPENDENCIES) + @rm -f fanotify_init$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fanotify_init_OBJECTS) $(fanotify_init_LDADD) $(LIBS) + +fanotify_mark$(EXEEXT): $(fanotify_mark_OBJECTS) $(fanotify_mark_DEPENDENCIES) $(EXTRA_fanotify_mark_DEPENDENCIES) + @rm -f fanotify_mark$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fanotify_mark_OBJECTS) $(fanotify_mark_LDADD) $(LIBS) + +fchdir$(EXEEXT): $(fchdir_OBJECTS) $(fchdir_DEPENDENCIES) $(EXTRA_fchdir_DEPENDENCIES) + @rm -f fchdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchdir_OBJECTS) $(fchdir_LDADD) $(LIBS) + +fchmod$(EXEEXT): $(fchmod_OBJECTS) $(fchmod_DEPENDENCIES) $(EXTRA_fchmod_DEPENDENCIES) + @rm -f fchmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmod_OBJECTS) $(fchmod_LDADD) $(LIBS) + +fchmodat$(EXEEXT): $(fchmodat_OBJECTS) $(fchmodat_DEPENDENCIES) $(EXTRA_fchmodat_DEPENDENCIES) + @rm -f fchmodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmodat_OBJECTS) $(fchmodat_LDADD) $(LIBS) + +fchown$(EXEEXT): $(fchown_OBJECTS) $(fchown_DEPENDENCIES) $(EXTRA_fchown_DEPENDENCIES) + @rm -f fchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown_OBJECTS) $(fchown_LDADD) $(LIBS) + +fchown32$(EXEEXT): $(fchown32_OBJECTS) $(fchown32_DEPENDENCIES) $(EXTRA_fchown32_DEPENDENCIES) + @rm -f fchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown32_OBJECTS) $(fchown32_LDADD) $(LIBS) + +fchownat$(EXEEXT): $(fchownat_OBJECTS) $(fchownat_DEPENDENCIES) $(EXTRA_fchownat_DEPENDENCIES) + @rm -f fchownat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchownat_OBJECTS) $(fchownat_LDADD) $(LIBS) + +fcntl$(EXEEXT): $(fcntl_OBJECTS) $(fcntl_DEPENDENCIES) $(EXTRA_fcntl_DEPENDENCIES) + @rm -f fcntl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcntl_OBJECTS) $(fcntl_LDADD) $(LIBS) + +fcntl64$(EXEEXT): $(fcntl64_OBJECTS) $(fcntl64_DEPENDENCIES) $(EXTRA_fcntl64_DEPENDENCIES) + @rm -f fcntl64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcntl64_OBJECTS) $(fcntl64_LDADD) $(LIBS) + +fdatasync$(EXEEXT): $(fdatasync_OBJECTS) $(fdatasync_DEPENDENCIES) $(EXTRA_fdatasync_DEPENDENCIES) + @rm -f fdatasync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fdatasync_OBJECTS) $(fdatasync_LDADD) $(LIBS) + +file_handle$(EXEEXT): $(file_handle_OBJECTS) $(file_handle_DEPENDENCIES) $(EXTRA_file_handle_DEPENDENCIES) + @rm -f file_handle$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_handle_OBJECTS) $(file_handle_LDADD) $(LIBS) + +file_ioctl$(EXEEXT): $(file_ioctl_OBJECTS) $(file_ioctl_DEPENDENCIES) $(EXTRA_file_ioctl_DEPENDENCIES) + @rm -f file_ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_ioctl_OBJECTS) $(file_ioctl_LDADD) $(LIBS) + +filter-unavailable$(EXEEXT): $(filter_unavailable_OBJECTS) $(filter_unavailable_DEPENDENCIES) $(EXTRA_filter_unavailable_DEPENDENCIES) + @rm -f filter-unavailable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(filter_unavailable_OBJECTS) $(filter_unavailable_LDADD) $(LIBS) + +finit_module$(EXEEXT): $(finit_module_OBJECTS) $(finit_module_DEPENDENCIES) $(EXTRA_finit_module_DEPENDENCIES) + @rm -f finit_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(finit_module_OBJECTS) $(finit_module_LDADD) $(LIBS) + +flock$(EXEEXT): $(flock_OBJECTS) $(flock_DEPENDENCIES) $(EXTRA_flock_DEPENDENCIES) + @rm -f flock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(flock_OBJECTS) $(flock_LDADD) $(LIBS) + +fork-f$(EXEEXT): $(fork_f_OBJECTS) $(fork_f_DEPENDENCIES) $(EXTRA_fork_f_DEPENDENCIES) + @rm -f fork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fork_f_OBJECTS) $(fork_f_LDADD) $(LIBS) + +fstat$(EXEEXT): $(fstat_OBJECTS) $(fstat_DEPENDENCIES) $(EXTRA_fstat_DEPENDENCIES) + @rm -f fstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstat_OBJECTS) $(fstat_LDADD) $(LIBS) + +fstat64$(EXEEXT): $(fstat64_OBJECTS) $(fstat64_DEPENDENCIES) $(EXTRA_fstat64_DEPENDENCIES) + @rm -f fstat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstat64_OBJECTS) $(fstat64_LDADD) $(LIBS) + +fstatat64$(EXEEXT): $(fstatat64_OBJECTS) $(fstatat64_DEPENDENCIES) $(EXTRA_fstatat64_DEPENDENCIES) + @rm -f fstatat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatat64_OBJECTS) $(fstatat64_LDADD) $(LIBS) + +fstatfs$(EXEEXT): $(fstatfs_OBJECTS) $(fstatfs_DEPENDENCIES) $(EXTRA_fstatfs_DEPENDENCIES) + @rm -f fstatfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs_OBJECTS) $(fstatfs_LDADD) $(LIBS) + +fstatfs64$(EXEEXT): $(fstatfs64_OBJECTS) $(fstatfs64_DEPENDENCIES) $(EXTRA_fstatfs64_DEPENDENCIES) + @rm -f fstatfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs64_OBJECTS) $(fstatfs64_LDADD) $(LIBS) + +fsync$(EXEEXT): $(fsync_OBJECTS) $(fsync_DEPENDENCIES) $(EXTRA_fsync_DEPENDENCIES) + @rm -f fsync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fsync_OBJECTS) $(fsync_LDADD) $(LIBS) + +ftruncate$(EXEEXT): $(ftruncate_OBJECTS) $(ftruncate_DEPENDENCIES) $(EXTRA_ftruncate_DEPENDENCIES) + @rm -f ftruncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftruncate_OBJECTS) $(ftruncate_LDADD) $(LIBS) + +ftruncate64$(EXEEXT): $(ftruncate64_OBJECTS) $(ftruncate64_DEPENDENCIES) $(EXTRA_ftruncate64_DEPENDENCIES) + @rm -f ftruncate64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftruncate64_OBJECTS) $(ftruncate64_LDADD) $(LIBS) + +futex$(EXEEXT): $(futex_OBJECTS) $(futex_DEPENDENCIES) $(EXTRA_futex_DEPENDENCIES) + @rm -f futex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futex_OBJECTS) $(futex_LDADD) $(LIBS) + +futimesat$(EXEEXT): $(futimesat_OBJECTS) $(futimesat_DEPENDENCIES) $(EXTRA_futimesat_DEPENDENCIES) + @rm -f futimesat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futimesat_OBJECTS) $(futimesat_LDADD) $(LIBS) + +get_mempolicy$(EXEEXT): $(get_mempolicy_OBJECTS) $(get_mempolicy_DEPENDENCIES) $(EXTRA_get_mempolicy_DEPENDENCIES) + @rm -f get_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(get_mempolicy_OBJECTS) $(get_mempolicy_LDADD) $(LIBS) + +getcpu$(EXEEXT): $(getcpu_OBJECTS) $(getcpu_DEPENDENCIES) $(EXTRA_getcpu_DEPENDENCIES) + @rm -f getcpu$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcpu_OBJECTS) $(getcpu_LDADD) $(LIBS) + +getcwd$(EXEEXT): $(getcwd_OBJECTS) $(getcwd_DEPENDENCIES) $(EXTRA_getcwd_DEPENDENCIES) + @rm -f getcwd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcwd_OBJECTS) $(getcwd_LDADD) $(LIBS) + +getdents$(EXEEXT): $(getdents_OBJECTS) $(getdents_DEPENDENCIES) $(EXTRA_getdents_DEPENDENCIES) + @rm -f getdents$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getdents_OBJECTS) $(getdents_LDADD) $(LIBS) + +getdents64$(EXEEXT): $(getdents64_OBJECTS) $(getdents64_DEPENDENCIES) $(EXTRA_getdents64_DEPENDENCIES) + @rm -f getdents64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getdents64_OBJECTS) $(getdents64_LDADD) $(LIBS) + +getegid$(EXEEXT): $(getegid_OBJECTS) $(getegid_DEPENDENCIES) $(EXTRA_getegid_DEPENDENCIES) + @rm -f getegid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid_OBJECTS) $(getegid_LDADD) $(LIBS) + +getegid32$(EXEEXT): $(getegid32_OBJECTS) $(getegid32_DEPENDENCIES) $(EXTRA_getegid32_DEPENDENCIES) + @rm -f getegid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid32_OBJECTS) $(getegid32_LDADD) $(LIBS) + +geteuid$(EXEEXT): $(geteuid_OBJECTS) $(geteuid_DEPENDENCIES) $(EXTRA_geteuid_DEPENDENCIES) + @rm -f geteuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid_OBJECTS) $(geteuid_LDADD) $(LIBS) + +geteuid32$(EXEEXT): $(geteuid32_OBJECTS) $(geteuid32_DEPENDENCIES) $(EXTRA_geteuid32_DEPENDENCIES) + @rm -f geteuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid32_OBJECTS) $(geteuid32_LDADD) $(LIBS) + +getgid$(EXEEXT): $(getgid_OBJECTS) $(getgid_DEPENDENCIES) $(EXTRA_getgid_DEPENDENCIES) + @rm -f getgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid_OBJECTS) $(getgid_LDADD) $(LIBS) + +getgid32$(EXEEXT): $(getgid32_OBJECTS) $(getgid32_DEPENDENCIES) $(EXTRA_getgid32_DEPENDENCIES) + @rm -f getgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid32_OBJECTS) $(getgid32_LDADD) $(LIBS) + +getgroups$(EXEEXT): $(getgroups_OBJECTS) $(getgroups_DEPENDENCIES) $(EXTRA_getgroups_DEPENDENCIES) + @rm -f getgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups_OBJECTS) $(getgroups_LDADD) $(LIBS) + +getgroups32$(EXEEXT): $(getgroups32_OBJECTS) $(getgroups32_DEPENDENCIES) $(EXTRA_getgroups32_DEPENDENCIES) + @rm -f getgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups32_OBJECTS) $(getgroups32_LDADD) $(LIBS) + +getpeername$(EXEEXT): $(getpeername_OBJECTS) $(getpeername_DEPENDENCIES) $(EXTRA_getpeername_DEPENDENCIES) + @rm -f getpeername$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpeername_OBJECTS) $(getpeername_LDADD) $(LIBS) + +getpgrp$(EXEEXT): $(getpgrp_OBJECTS) $(getpgrp_DEPENDENCIES) $(EXTRA_getpgrp_DEPENDENCIES) + @rm -f getpgrp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpgrp_OBJECTS) $(getpgrp_LDADD) $(LIBS) + +getrandom$(EXEEXT): $(getrandom_OBJECTS) $(getrandom_DEPENDENCIES) $(EXTRA_getrandom_DEPENDENCIES) + @rm -f getrandom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrandom_OBJECTS) $(getrandom_LDADD) $(LIBS) + +getresgid$(EXEEXT): $(getresgid_OBJECTS) $(getresgid_DEPENDENCIES) $(EXTRA_getresgid_DEPENDENCIES) + @rm -f getresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid_OBJECTS) $(getresgid_LDADD) $(LIBS) + +getresgid32$(EXEEXT): $(getresgid32_OBJECTS) $(getresgid32_DEPENDENCIES) $(EXTRA_getresgid32_DEPENDENCIES) + @rm -f getresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid32_OBJECTS) $(getresgid32_LDADD) $(LIBS) + +getresuid$(EXEEXT): $(getresuid_OBJECTS) $(getresuid_DEPENDENCIES) $(EXTRA_getresuid_DEPENDENCIES) + @rm -f getresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid_OBJECTS) $(getresuid_LDADD) $(LIBS) + +getresuid32$(EXEEXT): $(getresuid32_OBJECTS) $(getresuid32_DEPENDENCIES) $(EXTRA_getresuid32_DEPENDENCIES) + @rm -f getresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid32_OBJECTS) $(getresuid32_LDADD) $(LIBS) + +getrlimit$(EXEEXT): $(getrlimit_OBJECTS) $(getrlimit_DEPENDENCIES) $(EXTRA_getrlimit_DEPENDENCIES) + @rm -f getrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrlimit_OBJECTS) $(getrlimit_LDADD) $(LIBS) + +getrusage$(EXEEXT): $(getrusage_OBJECTS) $(getrusage_DEPENDENCIES) $(EXTRA_getrusage_DEPENDENCIES) + @rm -f getrusage$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrusage_OBJECTS) $(getrusage_LDADD) $(LIBS) + +getsid$(EXEEXT): $(getsid_OBJECTS) $(getsid_DEPENDENCIES) $(EXTRA_getsid_DEPENDENCIES) + @rm -f getsid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsid_OBJECTS) $(getsid_LDADD) $(LIBS) + +getsockname$(EXEEXT): $(getsockname_OBJECTS) $(getsockname_DEPENDENCIES) $(EXTRA_getsockname_DEPENDENCIES) + @rm -f getsockname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsockname_OBJECTS) $(getsockname_LDADD) $(LIBS) + +getuid$(EXEEXT): $(getuid_OBJECTS) $(getuid_DEPENDENCIES) $(EXTRA_getuid_DEPENDENCIES) + @rm -f getuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid_OBJECTS) $(getuid_LDADD) $(LIBS) + +getuid32$(EXEEXT): $(getuid32_OBJECTS) $(getuid32_DEPENDENCIES) $(EXTRA_getuid32_DEPENDENCIES) + @rm -f getuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid32_OBJECTS) $(getuid32_LDADD) $(LIBS) + +getxxid$(EXEEXT): $(getxxid_OBJECTS) $(getxxid_DEPENDENCIES) $(EXTRA_getxxid_DEPENDENCIES) + @rm -f getxxid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getxxid_OBJECTS) $(getxxid_LDADD) $(LIBS) + +inet-cmsg$(EXEEXT): $(inet_cmsg_OBJECTS) $(inet_cmsg_DEPENDENCIES) $(EXTRA_inet_cmsg_DEPENDENCIES) + @rm -f inet-cmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inet_cmsg_OBJECTS) $(inet_cmsg_LDADD) $(LIBS) + +init_module$(EXEEXT): $(init_module_OBJECTS) $(init_module_DEPENDENCIES) $(EXTRA_init_module_DEPENDENCIES) + @rm -f init_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(init_module_OBJECTS) $(init_module_LDADD) $(LIBS) + +inotify$(EXEEXT): $(inotify_OBJECTS) $(inotify_DEPENDENCIES) $(EXTRA_inotify_DEPENDENCIES) + @rm -f inotify$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inotify_OBJECTS) $(inotify_LDADD) $(LIBS) + +inotify_init1$(EXEEXT): $(inotify_init1_OBJECTS) $(inotify_init1_DEPENDENCIES) $(EXTRA_inotify_init1_DEPENDENCIES) + @rm -f inotify_init1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inotify_init1_OBJECTS) $(inotify_init1_LDADD) $(LIBS) + +ioctl$(EXEEXT): $(ioctl_OBJECTS) $(ioctl_DEPENDENCIES) $(EXTRA_ioctl_DEPENDENCIES) + @rm -f ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_OBJECTS) $(ioctl_LDADD) $(LIBS) + +ioctl_block$(EXEEXT): $(ioctl_block_OBJECTS) $(ioctl_block_DEPENDENCIES) $(EXTRA_ioctl_block_DEPENDENCIES) + @rm -f ioctl_block$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_block_OBJECTS) $(ioctl_block_LDADD) $(LIBS) + +ioctl_dm$(EXEEXT): $(ioctl_dm_OBJECTS) $(ioctl_dm_DEPENDENCIES) $(EXTRA_ioctl_dm_DEPENDENCIES) + @rm -f ioctl_dm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_dm_OBJECTS) $(ioctl_dm_LDADD) $(LIBS) + +ioctl_dm-v$(EXEEXT): $(ioctl_dm_v_OBJECTS) $(ioctl_dm_v_DEPENDENCIES) $(EXTRA_ioctl_dm_v_DEPENDENCIES) + @rm -f ioctl_dm-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_dm_v_OBJECTS) $(ioctl_dm_v_LDADD) $(LIBS) + +ioctl_evdev$(EXEEXT): $(ioctl_evdev_OBJECTS) $(ioctl_evdev_DEPENDENCIES) $(EXTRA_ioctl_evdev_DEPENDENCIES) + @rm -f ioctl_evdev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_OBJECTS) $(ioctl_evdev_LDADD) $(LIBS) + +ioctl_evdev-v$(EXEEXT): $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_DEPENDENCIES) $(EXTRA_ioctl_evdev_v_DEPENDENCIES) + @rm -f ioctl_evdev-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_LDADD) $(LIBS) + +ioctl_loop$(EXEEXT): $(ioctl_loop_OBJECTS) $(ioctl_loop_DEPENDENCIES) $(EXTRA_ioctl_loop_DEPENDENCIES) + @rm -f ioctl_loop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_OBJECTS) $(ioctl_loop_LDADD) $(LIBS) + +ioctl_loop-nv$(EXEEXT): $(ioctl_loop_nv_OBJECTS) $(ioctl_loop_nv_DEPENDENCIES) $(EXTRA_ioctl_loop_nv_DEPENDENCIES) + @rm -f ioctl_loop-nv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_nv_OBJECTS) $(ioctl_loop_nv_LDADD) $(LIBS) + +ioctl_loop-v$(EXEEXT): $(ioctl_loop_v_OBJECTS) $(ioctl_loop_v_DEPENDENCIES) $(EXTRA_ioctl_loop_v_DEPENDENCIES) + @rm -f ioctl_loop-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_v_OBJECTS) $(ioctl_loop_v_LDADD) $(LIBS) + +ioctl_mtd$(EXEEXT): $(ioctl_mtd_OBJECTS) $(ioctl_mtd_DEPENDENCIES) $(EXTRA_ioctl_mtd_DEPENDENCIES) + @rm -f ioctl_mtd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_mtd_OBJECTS) $(ioctl_mtd_LDADD) $(LIBS) + +ioctl_rtc$(EXEEXT): $(ioctl_rtc_OBJECTS) $(ioctl_rtc_DEPENDENCIES) $(EXTRA_ioctl_rtc_DEPENDENCIES) + @rm -f ioctl_rtc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_OBJECTS) $(ioctl_rtc_LDADD) $(LIBS) + +ioctl_rtc-v$(EXEEXT): $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_DEPENDENCIES) $(EXTRA_ioctl_rtc_v_DEPENDENCIES) + @rm -f ioctl_rtc-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_LDADD) $(LIBS) + +ioctl_scsi$(EXEEXT): $(ioctl_scsi_OBJECTS) $(ioctl_scsi_DEPENDENCIES) $(EXTRA_ioctl_scsi_DEPENDENCIES) + @rm -f ioctl_scsi$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_scsi_OBJECTS) $(ioctl_scsi_LDADD) $(LIBS) + +ioctl_sg_io_v3$(EXEEXT): $(ioctl_sg_io_v3_OBJECTS) $(ioctl_sg_io_v3_DEPENDENCIES) $(EXTRA_ioctl_sg_io_v3_DEPENDENCIES) + @rm -f ioctl_sg_io_v3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sg_io_v3_OBJECTS) $(ioctl_sg_io_v3_LDADD) $(LIBS) + +ioctl_sg_io_v4$(EXEEXT): $(ioctl_sg_io_v4_OBJECTS) $(ioctl_sg_io_v4_DEPENDENCIES) $(EXTRA_ioctl_sg_io_v4_DEPENDENCIES) + @rm -f ioctl_sg_io_v4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sg_io_v4_OBJECTS) $(ioctl_sg_io_v4_LDADD) $(LIBS) + +ioctl_sock_gifconf$(EXEEXT): $(ioctl_sock_gifconf_OBJECTS) $(ioctl_sock_gifconf_DEPENDENCIES) $(EXTRA_ioctl_sock_gifconf_DEPENDENCIES) + @rm -f ioctl_sock_gifconf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sock_gifconf_OBJECTS) $(ioctl_sock_gifconf_LDADD) $(LIBS) + +ioctl_uffdio$(EXEEXT): $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_DEPENDENCIES) $(EXTRA_ioctl_uffdio_DEPENDENCIES) + @rm -f ioctl_uffdio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_LDADD) $(LIBS) + +ioctl_v4l2$(EXEEXT): $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_DEPENDENCIES) $(EXTRA_ioctl_v4l2_DEPENDENCIES) + @rm -f ioctl_v4l2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_LDADD) $(LIBS) + +ioperm$(EXEEXT): $(ioperm_OBJECTS) $(ioperm_DEPENDENCIES) $(EXTRA_ioperm_DEPENDENCIES) + @rm -f ioperm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioperm_OBJECTS) $(ioperm_LDADD) $(LIBS) + +iopl$(EXEEXT): $(iopl_OBJECTS) $(iopl_DEPENDENCIES) $(EXTRA_iopl_DEPENDENCIES) + @rm -f iopl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(iopl_OBJECTS) $(iopl_LDADD) $(LIBS) + +ioprio$(EXEEXT): $(ioprio_OBJECTS) $(ioprio_DEPENDENCIES) $(EXTRA_ioprio_DEPENDENCIES) + @rm -f ioprio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioprio_OBJECTS) $(ioprio_LDADD) $(LIBS) + +ip_mreq$(EXEEXT): $(ip_mreq_OBJECTS) $(ip_mreq_DEPENDENCIES) $(EXTRA_ip_mreq_DEPENDENCIES) + @rm -f ip_mreq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ip_mreq_OBJECTS) $(ip_mreq_LDADD) $(LIBS) + +ipc$(EXEEXT): $(ipc_OBJECTS) $(ipc_DEPENDENCIES) $(EXTRA_ipc_DEPENDENCIES) + @rm -f ipc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_OBJECTS) $(ipc_LDADD) $(LIBS) + +ipc_msg$(EXEEXT): $(ipc_msg_OBJECTS) $(ipc_msg_DEPENDENCIES) $(EXTRA_ipc_msg_DEPENDENCIES) + @rm -f ipc_msg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_msg_OBJECTS) $(ipc_msg_LDADD) $(LIBS) + +ipc_msgbuf$(EXEEXT): $(ipc_msgbuf_OBJECTS) $(ipc_msgbuf_DEPENDENCIES) $(EXTRA_ipc_msgbuf_DEPENDENCIES) + @rm -f ipc_msgbuf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_msgbuf_OBJECTS) $(ipc_msgbuf_LDADD) $(LIBS) + +ipc_sem$(EXEEXT): $(ipc_sem_OBJECTS) $(ipc_sem_DEPENDENCIES) $(EXTRA_ipc_sem_DEPENDENCIES) + @rm -f ipc_sem$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_sem_OBJECTS) $(ipc_sem_LDADD) $(LIBS) + +ipc_shm$(EXEEXT): $(ipc_shm_OBJECTS) $(ipc_shm_DEPENDENCIES) $(EXTRA_ipc_shm_DEPENDENCIES) + @rm -f ipc_shm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_shm_OBJECTS) $(ipc_shm_LDADD) $(LIBS) + +kcmp$(EXEEXT): $(kcmp_OBJECTS) $(kcmp_DEPENDENCIES) $(EXTRA_kcmp_DEPENDENCIES) + @rm -f kcmp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kcmp_OBJECTS) $(kcmp_LDADD) $(LIBS) + +kexec_file_load$(EXEEXT): $(kexec_file_load_OBJECTS) $(kexec_file_load_DEPENDENCIES) $(EXTRA_kexec_file_load_DEPENDENCIES) + @rm -f kexec_file_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kexec_file_load_OBJECTS) $(kexec_file_load_LDADD) $(LIBS) + +kexec_load$(EXEEXT): $(kexec_load_OBJECTS) $(kexec_load_DEPENDENCIES) $(EXTRA_kexec_load_DEPENDENCIES) + @rm -f kexec_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kexec_load_OBJECTS) $(kexec_load_LDADD) $(LIBS) + +keyctl$(EXEEXT): $(keyctl_OBJECTS) $(keyctl_DEPENDENCIES) $(EXTRA_keyctl_DEPENDENCIES) + @rm -f keyctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(keyctl_OBJECTS) $(keyctl_LDADD) $(LIBS) + +kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES) $(EXTRA_kill_DEPENDENCIES) + @rm -f kill$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kill_OBJECTS) $(kill_LDADD) $(LIBS) + +ksysent$(EXEEXT): $(ksysent_OBJECTS) $(ksysent_DEPENDENCIES) $(EXTRA_ksysent_DEPENDENCIES) + @rm -f ksysent$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ksysent_OBJECTS) $(ksysent_LDADD) $(LIBS) + +lchown$(EXEEXT): $(lchown_OBJECTS) $(lchown_DEPENDENCIES) $(EXTRA_lchown_DEPENDENCIES) + @rm -f lchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown_OBJECTS) $(lchown_LDADD) $(LIBS) + +lchown32$(EXEEXT): $(lchown32_OBJECTS) $(lchown32_DEPENDENCIES) $(EXTRA_lchown32_DEPENDENCIES) + @rm -f lchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown32_OBJECTS) $(lchown32_LDADD) $(LIBS) + +link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES) $(EXTRA_link_DEPENDENCIES) + @rm -f link$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(link_OBJECTS) $(link_LDADD) $(LIBS) + +linkat$(EXEEXT): $(linkat_OBJECTS) $(linkat_DEPENDENCIES) $(EXTRA_linkat_DEPENDENCIES) + @rm -f linkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(linkat_OBJECTS) $(linkat_LDADD) $(LIBS) + +llseek$(EXEEXT): $(llseek_OBJECTS) $(llseek_DEPENDENCIES) $(EXTRA_llseek_DEPENDENCIES) + @rm -f llseek$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(llseek_OBJECTS) $(llseek_LDADD) $(LIBS) + +lookup_dcookie$(EXEEXT): $(lookup_dcookie_OBJECTS) $(lookup_dcookie_DEPENDENCIES) $(EXTRA_lookup_dcookie_DEPENDENCIES) + @rm -f lookup_dcookie$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lookup_dcookie_OBJECTS) $(lookup_dcookie_LDADD) $(LIBS) + +lseek$(EXEEXT): $(lseek_OBJECTS) $(lseek_DEPENDENCIES) $(EXTRA_lseek_DEPENDENCIES) + @rm -f lseek$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lseek_OBJECTS) $(lseek_LDADD) $(LIBS) + +lstat$(EXEEXT): $(lstat_OBJECTS) $(lstat_DEPENDENCIES) $(EXTRA_lstat_DEPENDENCIES) + @rm -f lstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lstat_OBJECTS) $(lstat_LDADD) $(LIBS) + +lstat64$(EXEEXT): $(lstat64_OBJECTS) $(lstat64_DEPENDENCIES) $(EXTRA_lstat64_DEPENDENCIES) + @rm -f lstat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lstat64_OBJECTS) $(lstat64_LDADD) $(LIBS) + +mbind$(EXEEXT): $(mbind_OBJECTS) $(mbind_DEPENDENCIES) $(EXTRA_mbind_DEPENDENCIES) + @rm -f mbind$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mbind_OBJECTS) $(mbind_LDADD) $(LIBS) + +membarrier$(EXEEXT): $(membarrier_OBJECTS) $(membarrier_DEPENDENCIES) $(EXTRA_membarrier_DEPENDENCIES) + @rm -f membarrier$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(membarrier_OBJECTS) $(membarrier_LDADD) $(LIBS) + +memfd_create$(EXEEXT): $(memfd_create_OBJECTS) $(memfd_create_DEPENDENCIES) $(EXTRA_memfd_create_DEPENDENCIES) + @rm -f memfd_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(memfd_create_OBJECTS) $(memfd_create_LDADD) $(LIBS) + +migrate_pages$(EXEEXT): $(migrate_pages_OBJECTS) $(migrate_pages_DEPENDENCIES) $(EXTRA_migrate_pages_DEPENDENCIES) + @rm -f migrate_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(migrate_pages_OBJECTS) $(migrate_pages_LDADD) $(LIBS) + +mincore$(EXEEXT): $(mincore_OBJECTS) $(mincore_DEPENDENCIES) $(EXTRA_mincore_DEPENDENCIES) + @rm -f mincore$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mincore_OBJECTS) $(mincore_LDADD) $(LIBS) + +mkdir$(EXEEXT): $(mkdir_OBJECTS) $(mkdir_DEPENDENCIES) $(EXTRA_mkdir_DEPENDENCIES) + @rm -f mkdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdir_OBJECTS) $(mkdir_LDADD) $(LIBS) + +mkdirat$(EXEEXT): $(mkdirat_OBJECTS) $(mkdirat_DEPENDENCIES) $(EXTRA_mkdirat_DEPENDENCIES) + @rm -f mkdirat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdirat_OBJECTS) $(mkdirat_LDADD) $(LIBS) + +mknod$(EXEEXT): $(mknod_OBJECTS) $(mknod_DEPENDENCIES) $(EXTRA_mknod_DEPENDENCIES) + @rm -f mknod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknod_OBJECTS) $(mknod_LDADD) $(LIBS) + +mknodat$(EXEEXT): $(mknodat_OBJECTS) $(mknodat_DEPENDENCIES) $(EXTRA_mknodat_DEPENDENCIES) + @rm -f mknodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknodat_OBJECTS) $(mknodat_LDADD) $(LIBS) + +mlock$(EXEEXT): $(mlock_OBJECTS) $(mlock_DEPENDENCIES) $(EXTRA_mlock_DEPENDENCIES) + @rm -f mlock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock_OBJECTS) $(mlock_LDADD) $(LIBS) + +mlock2$(EXEEXT): $(mlock2_OBJECTS) $(mlock2_DEPENDENCIES) $(EXTRA_mlock2_DEPENDENCIES) + @rm -f mlock2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock2_OBJECTS) $(mlock2_LDADD) $(LIBS) + +mlockall$(EXEEXT): $(mlockall_OBJECTS) $(mlockall_DEPENDENCIES) $(EXTRA_mlockall_DEPENDENCIES) + @rm -f mlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlockall_OBJECTS) $(mlockall_LDADD) $(LIBS) + +mmap$(EXEEXT): $(mmap_OBJECTS) $(mmap_DEPENDENCIES) $(EXTRA_mmap_DEPENDENCIES) + @rm -f mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmap_OBJECTS) $(mmap_LDADD) $(LIBS) + +mmap64$(EXEEXT): $(mmap64_OBJECTS) $(mmap64_DEPENDENCIES) $(EXTRA_mmap64_DEPENDENCIES) + @rm -f mmap64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmap64_OBJECTS) $(mmap64_LDADD) $(LIBS) + +mmsg$(EXEEXT): $(mmsg_OBJECTS) $(mmsg_DEPENDENCIES) $(EXTRA_mmsg_DEPENDENCIES) + @rm -f mmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_OBJECTS) $(mmsg_LDADD) $(LIBS) + +mmsg-silent$(EXEEXT): $(mmsg_silent_OBJECTS) $(mmsg_silent_DEPENDENCIES) $(EXTRA_mmsg_silent_DEPENDENCIES) + @rm -f mmsg-silent$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_silent_OBJECTS) $(mmsg_silent_LDADD) $(LIBS) + +mmsg_name$(EXEEXT): $(mmsg_name_OBJECTS) $(mmsg_name_DEPENDENCIES) $(EXTRA_mmsg_name_DEPENDENCIES) + @rm -f mmsg_name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_name_OBJECTS) $(mmsg_name_LDADD) $(LIBS) + +mmsg_name-v$(EXEEXT): $(mmsg_name_v_OBJECTS) $(mmsg_name_v_DEPENDENCIES) $(EXTRA_mmsg_name_v_DEPENDENCIES) + @rm -f mmsg_name-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_name_v_OBJECTS) $(mmsg_name_v_LDADD) $(LIBS) + +mount$(EXEEXT): $(mount_OBJECTS) $(mount_DEPENDENCIES) $(EXTRA_mount_DEPENDENCIES) + @rm -f mount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mount_OBJECTS) $(mount_LDADD) $(LIBS) + +move_pages$(EXEEXT): $(move_pages_OBJECTS) $(move_pages_DEPENDENCIES) $(EXTRA_move_pages_DEPENDENCIES) + @rm -f move_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(move_pages_OBJECTS) $(move_pages_LDADD) $(LIBS) + +mq$(EXEEXT): $(mq_OBJECTS) $(mq_DEPENDENCIES) $(EXTRA_mq_DEPENDENCIES) + @rm -f mq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_OBJECTS) $(mq_LDADD) $(LIBS) + +mq_sendrecv$(EXEEXT): $(mq_sendrecv_OBJECTS) $(mq_sendrecv_DEPENDENCIES) $(EXTRA_mq_sendrecv_DEPENDENCIES) + @rm -f mq_sendrecv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_OBJECTS) $(mq_sendrecv_LDADD) $(LIBS) + +mq_sendrecv-read$(EXEEXT): $(mq_sendrecv_read_OBJECTS) $(mq_sendrecv_read_DEPENDENCIES) $(EXTRA_mq_sendrecv_read_DEPENDENCIES) + @rm -f mq_sendrecv-read$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_read_OBJECTS) $(mq_sendrecv_read_LDADD) $(LIBS) + +mq_sendrecv-write$(EXEEXT): $(mq_sendrecv_write_OBJECTS) $(mq_sendrecv_write_DEPENDENCIES) $(EXTRA_mq_sendrecv_write_DEPENDENCIES) + @rm -f mq_sendrecv-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_write_OBJECTS) $(mq_sendrecv_write_LDADD) $(LIBS) + +msg_control$(EXEEXT): $(msg_control_OBJECTS) $(msg_control_DEPENDENCIES) $(EXTRA_msg_control_DEPENDENCIES) + @rm -f msg_control$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_control_OBJECTS) $(msg_control_LDADD) $(LIBS) + +msg_control-v$(EXEEXT): $(msg_control_v_OBJECTS) $(msg_control_v_DEPENDENCIES) $(EXTRA_msg_control_v_DEPENDENCIES) + @rm -f msg_control-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_control_v_OBJECTS) $(msg_control_v_LDADD) $(LIBS) + +msg_name$(EXEEXT): $(msg_name_OBJECTS) $(msg_name_DEPENDENCIES) $(EXTRA_msg_name_DEPENDENCIES) + @rm -f msg_name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_name_OBJECTS) $(msg_name_LDADD) $(LIBS) + +munlockall$(EXEEXT): $(munlockall_OBJECTS) $(munlockall_DEPENDENCIES) $(EXTRA_munlockall_DEPENDENCIES) + @rm -f munlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(munlockall_OBJECTS) $(munlockall_LDADD) $(LIBS) + +nanosleep$(EXEEXT): $(nanosleep_OBJECTS) $(nanosleep_DEPENDENCIES) $(EXTRA_nanosleep_DEPENDENCIES) + @rm -f nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nanosleep_OBJECTS) $(nanosleep_LDADD) $(LIBS) + +net-accept-connect$(EXEEXT): $(net_accept_connect_OBJECTS) $(net_accept_connect_DEPENDENCIES) $(EXTRA_net_accept_connect_DEPENDENCIES) + @rm -f net-accept-connect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_accept_connect_OBJECTS) $(net_accept_connect_LDADD) $(LIBS) + +net-icmp_filter$(EXEEXT): $(net_icmp_filter_OBJECTS) $(net_icmp_filter_DEPENDENCIES) $(EXTRA_net_icmp_filter_DEPENDENCIES) + @rm -f net-icmp_filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_icmp_filter_OBJECTS) $(net_icmp_filter_LDADD) $(LIBS) + +net-sockaddr$(EXEEXT): $(net_sockaddr_OBJECTS) $(net_sockaddr_DEPENDENCIES) $(EXTRA_net_sockaddr_DEPENDENCIES) + @rm -f net-sockaddr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_sockaddr_OBJECTS) $(net_sockaddr_LDADD) $(LIBS) + +net-y-unix$(EXEEXT): $(net_y_unix_OBJECTS) $(net_y_unix_DEPENDENCIES) $(EXTRA_net_y_unix_DEPENDENCIES) + @rm -f net-y-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_y_unix_OBJECTS) $(net_y_unix_LDADD) $(LIBS) + +net-yy-inet$(EXEEXT): $(net_yy_inet_OBJECTS) $(net_yy_inet_DEPENDENCIES) $(EXTRA_net_yy_inet_DEPENDENCIES) + @rm -f net-yy-inet$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_inet_OBJECTS) $(net_yy_inet_LDADD) $(LIBS) + +net-yy-netlink$(EXEEXT): $(net_yy_netlink_OBJECTS) $(net_yy_netlink_DEPENDENCIES) $(EXTRA_net_yy_netlink_DEPENDENCIES) + @rm -f net-yy-netlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_netlink_OBJECTS) $(net_yy_netlink_LDADD) $(LIBS) + +net-yy-unix$(EXEEXT): $(net_yy_unix_OBJECTS) $(net_yy_unix_DEPENDENCIES) $(EXTRA_net_yy_unix_DEPENDENCIES) + @rm -f net-yy-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_unix_OBJECTS) $(net_yy_unix_LDADD) $(LIBS) + +netlink_inet_diag$(EXEEXT): $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_DEPENDENCIES) $(EXTRA_netlink_inet_diag_DEPENDENCIES) + @rm -f netlink_inet_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_LDADD) $(LIBS) + +netlink_netlink_diag$(EXEEXT): $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_DEPENDENCIES) $(EXTRA_netlink_netlink_diag_DEPENDENCIES) + @rm -f netlink_netlink_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_LDADD) $(LIBS) + +netlink_protocol$(EXEEXT): $(netlink_protocol_OBJECTS) $(netlink_protocol_DEPENDENCIES) $(EXTRA_netlink_protocol_DEPENDENCIES) + @rm -f netlink_protocol$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_protocol_OBJECTS) $(netlink_protocol_LDADD) $(LIBS) + +netlink_unix_diag$(EXEEXT): $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_DEPENDENCIES) $(EXTRA_netlink_unix_diag_DEPENDENCIES) + @rm -f netlink_unix_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_LDADD) $(LIBS) + +newfstatat$(EXEEXT): $(newfstatat_OBJECTS) $(newfstatat_DEPENDENCIES) $(EXTRA_newfstatat_DEPENDENCIES) + @rm -f newfstatat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(newfstatat_OBJECTS) $(newfstatat_LDADD) $(LIBS) + +nsyscalls$(EXEEXT): $(nsyscalls_OBJECTS) $(nsyscalls_DEPENDENCIES) $(EXTRA_nsyscalls_DEPENDENCIES) + @rm -f nsyscalls$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nsyscalls_OBJECTS) $(nsyscalls_LDADD) $(LIBS) + +old_mmap$(EXEEXT): $(old_mmap_OBJECTS) $(old_mmap_DEPENDENCIES) $(EXTRA_old_mmap_DEPENDENCIES) + @rm -f old_mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(old_mmap_OBJECTS) $(old_mmap_LDADD) $(LIBS) + +oldfstat$(EXEEXT): $(oldfstat_OBJECTS) $(oldfstat_DEPENDENCIES) $(EXTRA_oldfstat_DEPENDENCIES) + @rm -f oldfstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldfstat_OBJECTS) $(oldfstat_LDADD) $(LIBS) + +oldlstat$(EXEEXT): $(oldlstat_OBJECTS) $(oldlstat_DEPENDENCIES) $(EXTRA_oldlstat_DEPENDENCIES) + @rm -f oldlstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldlstat_OBJECTS) $(oldlstat_LDADD) $(LIBS) + +oldselect$(EXEEXT): $(oldselect_OBJECTS) $(oldselect_DEPENDENCIES) $(EXTRA_oldselect_DEPENDENCIES) + @rm -f oldselect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldselect_OBJECTS) $(oldselect_LDADD) $(LIBS) + +oldstat$(EXEEXT): $(oldstat_OBJECTS) $(oldstat_DEPENDENCIES) $(EXTRA_oldstat_DEPENDENCIES) + @rm -f oldstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldstat_OBJECTS) $(oldstat_LDADD) $(LIBS) + +open$(EXEEXT): $(open_OBJECTS) $(open_DEPENDENCIES) $(EXTRA_open_DEPENDENCIES) + @rm -f open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(open_OBJECTS) $(open_LDADD) $(LIBS) + +openat$(EXEEXT): $(openat_OBJECTS) $(openat_DEPENDENCIES) $(EXTRA_openat_DEPENDENCIES) + @rm -f openat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(openat_OBJECTS) $(openat_LDADD) $(LIBS) + +pause$(EXEEXT): $(pause_OBJECTS) $(pause_DEPENDENCIES) $(EXTRA_pause_DEPENDENCIES) + @rm -f pause$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pause_OBJECTS) $(pause_LDADD) $(LIBS) + +pc$(EXEEXT): $(pc_OBJECTS) $(pc_DEPENDENCIES) $(EXTRA_pc_DEPENDENCIES) + @rm -f pc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pc_OBJECTS) $(pc_LDADD) $(LIBS) + +perf_event_open$(EXEEXT): $(perf_event_open_OBJECTS) $(perf_event_open_DEPENDENCIES) $(EXTRA_perf_event_open_DEPENDENCIES) + @rm -f perf_event_open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_OBJECTS) $(perf_event_open_LDADD) $(LIBS) + +perf_event_open_nonverbose$(EXEEXT): $(perf_event_open_nonverbose_OBJECTS) $(perf_event_open_nonverbose_DEPENDENCIES) $(EXTRA_perf_event_open_nonverbose_DEPENDENCIES) + @rm -f perf_event_open_nonverbose$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_nonverbose_OBJECTS) $(perf_event_open_nonverbose_LDADD) $(LIBS) + +perf_event_open_unabbrev$(EXEEXT): $(perf_event_open_unabbrev_OBJECTS) $(perf_event_open_unabbrev_DEPENDENCIES) $(EXTRA_perf_event_open_unabbrev_DEPENDENCIES) + @rm -f perf_event_open_unabbrev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_unabbrev_OBJECTS) $(perf_event_open_unabbrev_LDADD) $(LIBS) + +personality$(EXEEXT): $(personality_OBJECTS) $(personality_DEPENDENCIES) $(EXTRA_personality_DEPENDENCIES) + @rm -f personality$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(personality_OBJECTS) $(personality_LDADD) $(LIBS) + +pipe$(EXEEXT): $(pipe_OBJECTS) $(pipe_DEPENDENCIES) $(EXTRA_pipe_DEPENDENCIES) + @rm -f pipe$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pipe_OBJECTS) $(pipe_LDADD) $(LIBS) + +pipe2$(EXEEXT): $(pipe2_OBJECTS) $(pipe2_DEPENDENCIES) $(EXTRA_pipe2_DEPENDENCIES) + @rm -f pipe2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pipe2_OBJECTS) $(pipe2_LDADD) $(LIBS) + +pkey_alloc$(EXEEXT): $(pkey_alloc_OBJECTS) $(pkey_alloc_DEPENDENCIES) $(EXTRA_pkey_alloc_DEPENDENCIES) + @rm -f pkey_alloc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_alloc_OBJECTS) $(pkey_alloc_LDADD) $(LIBS) + +pkey_free$(EXEEXT): $(pkey_free_OBJECTS) $(pkey_free_DEPENDENCIES) $(EXTRA_pkey_free_DEPENDENCIES) + @rm -f pkey_free$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_free_OBJECTS) $(pkey_free_LDADD) $(LIBS) + +pkey_mprotect$(EXEEXT): $(pkey_mprotect_OBJECTS) $(pkey_mprotect_DEPENDENCIES) $(EXTRA_pkey_mprotect_DEPENDENCIES) + @rm -f pkey_mprotect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_mprotect_OBJECTS) $(pkey_mprotect_LDADD) $(LIBS) + +poll$(EXEEXT): $(poll_OBJECTS) $(poll_DEPENDENCIES) $(EXTRA_poll_DEPENDENCIES) + @rm -f poll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(poll_OBJECTS) $(poll_LDADD) $(LIBS) + +ppoll$(EXEEXT): $(ppoll_OBJECTS) $(ppoll_DEPENDENCIES) $(EXTRA_ppoll_DEPENDENCIES) + @rm -f ppoll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ppoll_OBJECTS) $(ppoll_LDADD) $(LIBS) + +prctl-arg2-intptr$(EXEEXT): $(prctl_arg2_intptr_OBJECTS) $(prctl_arg2_intptr_DEPENDENCIES) $(EXTRA_prctl_arg2_intptr_DEPENDENCIES) + @rm -f prctl-arg2-intptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_arg2_intptr_OBJECTS) $(prctl_arg2_intptr_LDADD) $(LIBS) + +prctl-dumpable$(EXEEXT): $(prctl_dumpable_OBJECTS) $(prctl_dumpable_DEPENDENCIES) $(EXTRA_prctl_dumpable_DEPENDENCIES) + @rm -f prctl-dumpable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_dumpable_OBJECTS) $(prctl_dumpable_LDADD) $(LIBS) + +prctl-name$(EXEEXT): $(prctl_name_OBJECTS) $(prctl_name_DEPENDENCIES) $(EXTRA_prctl_name_DEPENDENCIES) + @rm -f prctl-name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_name_OBJECTS) $(prctl_name_LDADD) $(LIBS) + +prctl-no-args$(EXEEXT): $(prctl_no_args_OBJECTS) $(prctl_no_args_DEPENDENCIES) $(EXTRA_prctl_no_args_DEPENDENCIES) + @rm -f prctl-no-args$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_no_args_OBJECTS) $(prctl_no_args_LDADD) $(LIBS) + +prctl-pdeathsig$(EXEEXT): $(prctl_pdeathsig_OBJECTS) $(prctl_pdeathsig_DEPENDENCIES) $(EXTRA_prctl_pdeathsig_DEPENDENCIES) + @rm -f prctl-pdeathsig$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_pdeathsig_OBJECTS) $(prctl_pdeathsig_LDADD) $(LIBS) + +prctl-seccomp-filter-v$(EXEEXT): $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_DEPENDENCIES) $(EXTRA_prctl_seccomp_filter_v_DEPENDENCIES) + @rm -f prctl-seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_LDADD) $(LIBS) + +prctl-seccomp-strict$(EXEEXT): $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_DEPENDENCIES) $(EXTRA_prctl_seccomp_strict_DEPENDENCIES) + @rm -f prctl-seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_LDADD) $(LIBS) + +prctl-securebits$(EXEEXT): $(prctl_securebits_OBJECTS) $(prctl_securebits_DEPENDENCIES) $(EXTRA_prctl_securebits_DEPENDENCIES) + @rm -f prctl-securebits$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_securebits_OBJECTS) $(prctl_securebits_LDADD) $(LIBS) + +prctl-tid_address$(EXEEXT): $(prctl_tid_address_OBJECTS) $(prctl_tid_address_DEPENDENCIES) $(EXTRA_prctl_tid_address_DEPENDENCIES) + @rm -f prctl-tid_address$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_tid_address_OBJECTS) $(prctl_tid_address_LDADD) $(LIBS) + +prctl-tsc$(EXEEXT): $(prctl_tsc_OBJECTS) $(prctl_tsc_DEPENDENCIES) $(EXTRA_prctl_tsc_DEPENDENCIES) + @rm -f prctl-tsc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_tsc_OBJECTS) $(prctl_tsc_LDADD) $(LIBS) + +pread64-pwrite64$(EXEEXT): $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_DEPENDENCIES) $(EXTRA_pread64_pwrite64_DEPENDENCIES) + @rm -f pread64-pwrite64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_LDADD) $(LIBS) + +preadv$(EXEEXT): $(preadv_OBJECTS) $(preadv_DEPENDENCIES) $(EXTRA_preadv_DEPENDENCIES) + @rm -f preadv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_OBJECTS) $(preadv_LDADD) $(LIBS) + +preadv-pwritev$(EXEEXT): $(preadv_pwritev_OBJECTS) $(preadv_pwritev_DEPENDENCIES) $(EXTRA_preadv_pwritev_DEPENDENCIES) + @rm -f preadv-pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_pwritev_OBJECTS) $(preadv_pwritev_LDADD) $(LIBS) + +preadv2-pwritev2$(EXEEXT): $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_DEPENDENCIES) $(EXTRA_preadv2_pwritev2_DEPENDENCIES) + @rm -f preadv2-pwritev2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_LDADD) $(LIBS) + +print_maxfd$(EXEEXT): $(print_maxfd_OBJECTS) $(print_maxfd_DEPENDENCIES) $(EXTRA_print_maxfd_DEPENDENCIES) + @rm -f print_maxfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(print_maxfd_OBJECTS) $(print_maxfd_LDADD) $(LIBS) + +printstr$(EXEEXT): $(printstr_OBJECTS) $(printstr_DEPENDENCIES) $(EXTRA_printstr_DEPENDENCIES) + @rm -f printstr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(printstr_OBJECTS) $(printstr_LDADD) $(LIBS) + +prlimit64$(EXEEXT): $(prlimit64_OBJECTS) $(prlimit64_DEPENDENCIES) $(EXTRA_prlimit64_DEPENDENCIES) + @rm -f prlimit64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prlimit64_OBJECTS) $(prlimit64_LDADD) $(LIBS) + +process_vm_readv$(EXEEXT): $(process_vm_readv_OBJECTS) $(process_vm_readv_DEPENDENCIES) $(EXTRA_process_vm_readv_DEPENDENCIES) + @rm -f process_vm_readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(process_vm_readv_OBJECTS) $(process_vm_readv_LDADD) $(LIBS) + +process_vm_writev$(EXEEXT): $(process_vm_writev_OBJECTS) $(process_vm_writev_DEPENDENCIES) $(EXTRA_process_vm_writev_DEPENDENCIES) + @rm -f process_vm_writev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(process_vm_writev_OBJECTS) $(process_vm_writev_LDADD) $(LIBS) + +pselect6$(EXEEXT): $(pselect6_OBJECTS) $(pselect6_DEPENDENCIES) $(EXTRA_pselect6_DEPENDENCIES) + @rm -f pselect6$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pselect6_OBJECTS) $(pselect6_LDADD) $(LIBS) + +ptrace$(EXEEXT): $(ptrace_OBJECTS) $(ptrace_DEPENDENCIES) $(EXTRA_ptrace_DEPENDENCIES) + @rm -f ptrace$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ptrace_OBJECTS) $(ptrace_LDADD) $(LIBS) + +pwritev$(EXEEXT): $(pwritev_OBJECTS) $(pwritev_DEPENDENCIES) $(EXTRA_pwritev_DEPENDENCIES) + @rm -f pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pwritev_OBJECTS) $(pwritev_LDADD) $(LIBS) + +qual_fault$(EXEEXT): $(qual_fault_OBJECTS) $(qual_fault_DEPENDENCIES) $(EXTRA_qual_fault_DEPENDENCIES) + @rm -f qual_fault$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_fault_OBJECTS) $(qual_fault_LDADD) $(LIBS) + +qual_inject-error-signal$(EXEEXT): $(qual_inject_error_signal_OBJECTS) $(qual_inject_error_signal_DEPENDENCIES) $(EXTRA_qual_inject_error_signal_DEPENDENCIES) + @rm -f qual_inject-error-signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_error_signal_OBJECTS) $(qual_inject_error_signal_LDADD) $(LIBS) + +qual_inject-retval$(EXEEXT): $(qual_inject_retval_OBJECTS) $(qual_inject_retval_DEPENDENCIES) $(EXTRA_qual_inject_retval_DEPENDENCIES) + @rm -f qual_inject-retval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_retval_OBJECTS) $(qual_inject_retval_LDADD) $(LIBS) + +qual_inject-signal$(EXEEXT): $(qual_inject_signal_OBJECTS) $(qual_inject_signal_DEPENDENCIES) $(EXTRA_qual_inject_signal_DEPENDENCIES) + @rm -f qual_inject-signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_signal_OBJECTS) $(qual_inject_signal_LDADD) $(LIBS) + +qual_signal$(EXEEXT): $(qual_signal_OBJECTS) $(qual_signal_DEPENDENCIES) $(EXTRA_qual_signal_DEPENDENCIES) + @rm -f qual_signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_signal_OBJECTS) $(qual_signal_LDADD) $(LIBS) + +quotactl$(EXEEXT): $(quotactl_OBJECTS) $(quotactl_DEPENDENCIES) $(EXTRA_quotactl_DEPENDENCIES) + @rm -f quotactl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_OBJECTS) $(quotactl_LDADD) $(LIBS) + +quotactl-v$(EXEEXT): $(quotactl_v_OBJECTS) $(quotactl_v_DEPENDENCIES) $(EXTRA_quotactl_v_DEPENDENCIES) + @rm -f quotactl-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_v_OBJECTS) $(quotactl_v_LDADD) $(LIBS) + +quotactl-xfs$(EXEEXT): $(quotactl_xfs_OBJECTS) $(quotactl_xfs_DEPENDENCIES) $(EXTRA_quotactl_xfs_DEPENDENCIES) + @rm -f quotactl-xfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_xfs_OBJECTS) $(quotactl_xfs_LDADD) $(LIBS) + +quotactl-xfs-v$(EXEEXT): $(quotactl_xfs_v_OBJECTS) $(quotactl_xfs_v_DEPENDENCIES) $(EXTRA_quotactl_xfs_v_DEPENDENCIES) + @rm -f quotactl-xfs-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_xfs_v_OBJECTS) $(quotactl_xfs_v_LDADD) $(LIBS) + +read-write$(EXEEXT): $(read_write_OBJECTS) $(read_write_DEPENDENCIES) $(EXTRA_read_write_DEPENDENCIES) + @rm -f read-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(read_write_OBJECTS) $(read_write_LDADD) $(LIBS) + +readahead$(EXEEXT): $(readahead_OBJECTS) $(readahead_DEPENDENCIES) $(EXTRA_readahead_DEPENDENCIES) + @rm -f readahead$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readahead_OBJECTS) $(readahead_LDADD) $(LIBS) + +readdir$(EXEEXT): $(readdir_OBJECTS) $(readdir_DEPENDENCIES) $(EXTRA_readdir_DEPENDENCIES) + @rm -f readdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readdir_OBJECTS) $(readdir_LDADD) $(LIBS) + +readlink$(EXEEXT): $(readlink_OBJECTS) $(readlink_DEPENDENCIES) $(EXTRA_readlink_DEPENDENCIES) + @rm -f readlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readlink_OBJECTS) $(readlink_LDADD) $(LIBS) + +readlinkat$(EXEEXT): $(readlinkat_OBJECTS) $(readlinkat_DEPENDENCIES) $(EXTRA_readlinkat_DEPENDENCIES) + @rm -f readlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readlinkat_OBJECTS) $(readlinkat_LDADD) $(LIBS) + +readv$(EXEEXT): $(readv_OBJECTS) $(readv_DEPENDENCIES) $(EXTRA_readv_DEPENDENCIES) + @rm -f readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readv_OBJECTS) $(readv_LDADD) $(LIBS) + +reboot$(EXEEXT): $(reboot_OBJECTS) $(reboot_DEPENDENCIES) $(EXTRA_reboot_DEPENDENCIES) + @rm -f reboot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(reboot_OBJECTS) $(reboot_LDADD) $(LIBS) + +recvfrom$(EXEEXT): $(recvfrom_OBJECTS) $(recvfrom_DEPENDENCIES) $(EXTRA_recvfrom_DEPENDENCIES) + @rm -f recvfrom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvfrom_OBJECTS) $(recvfrom_LDADD) $(LIBS) + +recvmmsg-timeout$(EXEEXT): $(recvmmsg_timeout_OBJECTS) $(recvmmsg_timeout_DEPENDENCIES) $(EXTRA_recvmmsg_timeout_DEPENDENCIES) + @rm -f recvmmsg-timeout$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmmsg_timeout_OBJECTS) $(recvmmsg_timeout_LDADD) $(LIBS) + +recvmsg$(EXEEXT): $(recvmsg_OBJECTS) $(recvmsg_DEPENDENCIES) $(EXTRA_recvmsg_DEPENDENCIES) + @rm -f recvmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmsg_OBJECTS) $(recvmsg_LDADD) $(LIBS) + +redirect-fds$(EXEEXT): $(redirect_fds_OBJECTS) $(redirect_fds_DEPENDENCIES) $(EXTRA_redirect_fds_DEPENDENCIES) + @rm -f redirect-fds$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(redirect_fds_OBJECTS) $(redirect_fds_LDADD) $(LIBS) + +remap_file_pages$(EXEEXT): $(remap_file_pages_OBJECTS) $(remap_file_pages_DEPENDENCIES) $(EXTRA_remap_file_pages_DEPENDENCIES) + @rm -f remap_file_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(remap_file_pages_OBJECTS) $(remap_file_pages_LDADD) $(LIBS) + +rename$(EXEEXT): $(rename_OBJECTS) $(rename_DEPENDENCIES) $(EXTRA_rename_DEPENDENCIES) + @rm -f rename$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rename_OBJECTS) $(rename_LDADD) $(LIBS) + +renameat$(EXEEXT): $(renameat_OBJECTS) $(renameat_DEPENDENCIES) $(EXTRA_renameat_DEPENDENCIES) + @rm -f renameat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat_OBJECTS) $(renameat_LDADD) $(LIBS) + +renameat2$(EXEEXT): $(renameat2_OBJECTS) $(renameat2_DEPENDENCIES) $(EXTRA_renameat2_DEPENDENCIES) + @rm -f renameat2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat2_OBJECTS) $(renameat2_LDADD) $(LIBS) + +request_key$(EXEEXT): $(request_key_OBJECTS) $(request_key_DEPENDENCIES) $(EXTRA_request_key_DEPENDENCIES) + @rm -f request_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(request_key_OBJECTS) $(request_key_LDADD) $(LIBS) + +restart_syscall$(EXEEXT): $(restart_syscall_OBJECTS) $(restart_syscall_DEPENDENCIES) $(EXTRA_restart_syscall_DEPENDENCIES) + @rm -f restart_syscall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(restart_syscall_OBJECTS) $(restart_syscall_LDADD) $(LIBS) + +rmdir$(EXEEXT): $(rmdir_OBJECTS) $(rmdir_DEPENDENCIES) $(EXTRA_rmdir_DEPENDENCIES) + @rm -f rmdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rmdir_OBJECTS) $(rmdir_LDADD) $(LIBS) + +rt_sigpending$(EXEEXT): $(rt_sigpending_OBJECTS) $(rt_sigpending_DEPENDENCIES) $(EXTRA_rt_sigpending_DEPENDENCIES) + @rm -f rt_sigpending$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigpending_OBJECTS) $(rt_sigpending_LDADD) $(LIBS) + +rt_sigprocmask$(EXEEXT): $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_DEPENDENCIES) $(EXTRA_rt_sigprocmask_DEPENDENCIES) + @rm -f rt_sigprocmask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_LDADD) $(LIBS) + +rt_sigqueueinfo$(EXEEXT): $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_DEPENDENCIES) $(EXTRA_rt_sigqueueinfo_DEPENDENCIES) + @rm -f rt_sigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_LDADD) $(LIBS) + +rt_sigsuspend$(EXEEXT): $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_DEPENDENCIES) $(EXTRA_rt_sigsuspend_DEPENDENCIES) + @rm -f rt_sigsuspend$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_LDADD) $(LIBS) + +rt_sigtimedwait$(EXEEXT): $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_DEPENDENCIES) $(EXTRA_rt_sigtimedwait_DEPENDENCIES) + @rm -f rt_sigtimedwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_LDADD) $(LIBS) + +rt_tgsigqueueinfo$(EXEEXT): $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_DEPENDENCIES) $(EXTRA_rt_tgsigqueueinfo_DEPENDENCIES) + @rm -f rt_tgsigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_LDADD) $(LIBS) + +sched_get_priority_mxx$(EXEEXT): $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_DEPENDENCIES) $(EXTRA_sched_get_priority_mxx_DEPENDENCIES) + @rm -f sched_get_priority_mxx$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_LDADD) $(LIBS) + +sched_rr_get_interval$(EXEEXT): $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_DEPENDENCIES) $(EXTRA_sched_rr_get_interval_DEPENDENCIES) + @rm -f sched_rr_get_interval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_LDADD) $(LIBS) + +sched_xetaffinity$(EXEEXT): $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_DEPENDENCIES) $(EXTRA_sched_xetaffinity_DEPENDENCIES) + @rm -f sched_xetaffinity$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_LDADD) $(LIBS) + +sched_xetattr$(EXEEXT): $(sched_xetattr_OBJECTS) $(sched_xetattr_DEPENDENCIES) $(EXTRA_sched_xetattr_DEPENDENCIES) + @rm -f sched_xetattr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetattr_OBJECTS) $(sched_xetattr_LDADD) $(LIBS) + +sched_xetparam$(EXEEXT): $(sched_xetparam_OBJECTS) $(sched_xetparam_DEPENDENCIES) $(EXTRA_sched_xetparam_DEPENDENCIES) + @rm -f sched_xetparam$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetparam_OBJECTS) $(sched_xetparam_LDADD) $(LIBS) + +sched_xetscheduler$(EXEEXT): $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_DEPENDENCIES) $(EXTRA_sched_xetscheduler_DEPENDENCIES) + @rm -f sched_xetscheduler$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_LDADD) $(LIBS) + +sched_yield$(EXEEXT): $(sched_yield_OBJECTS) $(sched_yield_DEPENDENCIES) $(EXTRA_sched_yield_DEPENDENCIES) + @rm -f sched_yield$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_yield_OBJECTS) $(sched_yield_LDADD) $(LIBS) + +scm_rights$(EXEEXT): $(scm_rights_OBJECTS) $(scm_rights_DEPENDENCIES) $(EXTRA_scm_rights_DEPENDENCIES) + @rm -f scm_rights$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(scm_rights_OBJECTS) $(scm_rights_LDADD) $(LIBS) + +seccomp-filter$(EXEEXT): $(seccomp_filter_OBJECTS) $(seccomp_filter_DEPENDENCIES) $(EXTRA_seccomp_filter_DEPENDENCIES) + @rm -f seccomp-filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_OBJECTS) $(seccomp_filter_LDADD) $(LIBS) + +seccomp-filter-v$(EXEEXT): $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_DEPENDENCIES) $(EXTRA_seccomp_filter_v_DEPENDENCIES) + @rm -f seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_LDADD) $(LIBS) + +seccomp-strict$(EXEEXT): $(seccomp_strict_OBJECTS) $(seccomp_strict_DEPENDENCIES) $(EXTRA_seccomp_strict_DEPENDENCIES) + @rm -f seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_strict_OBJECTS) $(seccomp_strict_LDADD) $(LIBS) + +select$(EXEEXT): $(select_OBJECTS) $(select_DEPENDENCIES) $(EXTRA_select_DEPENDENCIES) + @rm -f select$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(select_OBJECTS) $(select_LDADD) $(LIBS) + +semop$(EXEEXT): $(semop_OBJECTS) $(semop_DEPENDENCIES) $(EXTRA_semop_DEPENDENCIES) + @rm -f semop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(semop_OBJECTS) $(semop_LDADD) $(LIBS) + +sendfile$(EXEEXT): $(sendfile_OBJECTS) $(sendfile_DEPENDENCIES) $(EXTRA_sendfile_DEPENDENCIES) + @rm -f sendfile$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sendfile_OBJECTS) $(sendfile_LDADD) $(LIBS) + +sendfile64$(EXEEXT): $(sendfile64_OBJECTS) $(sendfile64_DEPENDENCIES) $(EXTRA_sendfile64_DEPENDENCIES) + @rm -f sendfile64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sendfile64_OBJECTS) $(sendfile64_LDADD) $(LIBS) + +set_mempolicy$(EXEEXT): $(set_mempolicy_OBJECTS) $(set_mempolicy_DEPENDENCIES) $(EXTRA_set_mempolicy_DEPENDENCIES) + @rm -f set_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_mempolicy_OBJECTS) $(set_mempolicy_LDADD) $(LIBS) + +set_ptracer_any$(EXEEXT): $(set_ptracer_any_OBJECTS) $(set_ptracer_any_DEPENDENCIES) $(EXTRA_set_ptracer_any_DEPENDENCIES) + @rm -f set_ptracer_any$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_ptracer_any_OBJECTS) $(set_ptracer_any_LDADD) $(LIBS) + +setdomainname$(EXEEXT): $(setdomainname_OBJECTS) $(setdomainname_DEPENDENCIES) $(EXTRA_setdomainname_DEPENDENCIES) + @rm -f setdomainname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setdomainname_OBJECTS) $(setdomainname_LDADD) $(LIBS) + +setfsgid$(EXEEXT): $(setfsgid_OBJECTS) $(setfsgid_DEPENDENCIES) $(EXTRA_setfsgid_DEPENDENCIES) + @rm -f setfsgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid_OBJECTS) $(setfsgid_LDADD) $(LIBS) + +setfsgid32$(EXEEXT): $(setfsgid32_OBJECTS) $(setfsgid32_DEPENDENCIES) $(EXTRA_setfsgid32_DEPENDENCIES) + @rm -f setfsgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid32_OBJECTS) $(setfsgid32_LDADD) $(LIBS) + +setfsuid$(EXEEXT): $(setfsuid_OBJECTS) $(setfsuid_DEPENDENCIES) $(EXTRA_setfsuid_DEPENDENCIES) + @rm -f setfsuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid_OBJECTS) $(setfsuid_LDADD) $(LIBS) + +setfsuid32$(EXEEXT): $(setfsuid32_OBJECTS) $(setfsuid32_DEPENDENCIES) $(EXTRA_setfsuid32_DEPENDENCIES) + @rm -f setfsuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid32_OBJECTS) $(setfsuid32_LDADD) $(LIBS) + +setgid$(EXEEXT): $(setgid_OBJECTS) $(setgid_DEPENDENCIES) $(EXTRA_setgid_DEPENDENCIES) + @rm -f setgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid_OBJECTS) $(setgid_LDADD) $(LIBS) + +setgid32$(EXEEXT): $(setgid32_OBJECTS) $(setgid32_DEPENDENCIES) $(EXTRA_setgid32_DEPENDENCIES) + @rm -f setgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid32_OBJECTS) $(setgid32_LDADD) $(LIBS) + +setgroups$(EXEEXT): $(setgroups_OBJECTS) $(setgroups_DEPENDENCIES) $(EXTRA_setgroups_DEPENDENCIES) + @rm -f setgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups_OBJECTS) $(setgroups_LDADD) $(LIBS) + +setgroups32$(EXEEXT): $(setgroups32_OBJECTS) $(setgroups32_DEPENDENCIES) $(EXTRA_setgroups32_DEPENDENCIES) + @rm -f setgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups32_OBJECTS) $(setgroups32_LDADD) $(LIBS) + +sethostname$(EXEEXT): $(sethostname_OBJECTS) $(sethostname_DEPENDENCIES) $(EXTRA_sethostname_DEPENDENCIES) + @rm -f sethostname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sethostname_OBJECTS) $(sethostname_LDADD) $(LIBS) + +setns$(EXEEXT): $(setns_OBJECTS) $(setns_DEPENDENCIES) $(EXTRA_setns_DEPENDENCIES) + @rm -f setns$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setns_OBJECTS) $(setns_LDADD) $(LIBS) + +setregid$(EXEEXT): $(setregid_OBJECTS) $(setregid_DEPENDENCIES) $(EXTRA_setregid_DEPENDENCIES) + @rm -f setregid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid_OBJECTS) $(setregid_LDADD) $(LIBS) + +setregid32$(EXEEXT): $(setregid32_OBJECTS) $(setregid32_DEPENDENCIES) $(EXTRA_setregid32_DEPENDENCIES) + @rm -f setregid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid32_OBJECTS) $(setregid32_LDADD) $(LIBS) + +setresgid$(EXEEXT): $(setresgid_OBJECTS) $(setresgid_DEPENDENCIES) $(EXTRA_setresgid_DEPENDENCIES) + @rm -f setresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid_OBJECTS) $(setresgid_LDADD) $(LIBS) + +setresgid32$(EXEEXT): $(setresgid32_OBJECTS) $(setresgid32_DEPENDENCIES) $(EXTRA_setresgid32_DEPENDENCIES) + @rm -f setresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid32_OBJECTS) $(setresgid32_LDADD) $(LIBS) + +setresuid$(EXEEXT): $(setresuid_OBJECTS) $(setresuid_DEPENDENCIES) $(EXTRA_setresuid_DEPENDENCIES) + @rm -f setresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid_OBJECTS) $(setresuid_LDADD) $(LIBS) + +setresuid32$(EXEEXT): $(setresuid32_OBJECTS) $(setresuid32_DEPENDENCIES) $(EXTRA_setresuid32_DEPENDENCIES) + @rm -f setresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid32_OBJECTS) $(setresuid32_LDADD) $(LIBS) + +setreuid$(EXEEXT): $(setreuid_OBJECTS) $(setreuid_DEPENDENCIES) $(EXTRA_setreuid_DEPENDENCIES) + @rm -f setreuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid_OBJECTS) $(setreuid_LDADD) $(LIBS) + +setreuid32$(EXEEXT): $(setreuid32_OBJECTS) $(setreuid32_DEPENDENCIES) $(EXTRA_setreuid32_DEPENDENCIES) + @rm -f setreuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid32_OBJECTS) $(setreuid32_LDADD) $(LIBS) + +setrlimit$(EXEEXT): $(setrlimit_OBJECTS) $(setrlimit_DEPENDENCIES) $(EXTRA_setrlimit_DEPENDENCIES) + @rm -f setrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setrlimit_OBJECTS) $(setrlimit_LDADD) $(LIBS) + +setuid$(EXEEXT): $(setuid_OBJECTS) $(setuid_DEPENDENCIES) $(EXTRA_setuid_DEPENDENCIES) + @rm -f setuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid_OBJECTS) $(setuid_LDADD) $(LIBS) + +setuid32$(EXEEXT): $(setuid32_OBJECTS) $(setuid32_DEPENDENCIES) $(EXTRA_setuid32_DEPENDENCIES) + @rm -f setuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid32_OBJECTS) $(setuid32_LDADD) $(LIBS) + +shmxt$(EXEEXT): $(shmxt_OBJECTS) $(shmxt_DEPENDENCIES) $(EXTRA_shmxt_DEPENDENCIES) + @rm -f shmxt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shmxt_OBJECTS) $(shmxt_LDADD) $(LIBS) + +shutdown$(EXEEXT): $(shutdown_OBJECTS) $(shutdown_DEPENDENCIES) $(EXTRA_shutdown_DEPENDENCIES) + @rm -f shutdown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shutdown_OBJECTS) $(shutdown_LDADD) $(LIBS) + +sigaction$(EXEEXT): $(sigaction_OBJECTS) $(sigaction_DEPENDENCIES) $(EXTRA_sigaction_DEPENDENCIES) + @rm -f sigaction$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigaction_OBJECTS) $(sigaction_LDADD) $(LIBS) + +sigaltstack$(EXEEXT): $(sigaltstack_OBJECTS) $(sigaltstack_DEPENDENCIES) $(EXTRA_sigaltstack_DEPENDENCIES) + @rm -f sigaltstack$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigaltstack_OBJECTS) $(sigaltstack_LDADD) $(LIBS) + +siginfo$(EXEEXT): $(siginfo_OBJECTS) $(siginfo_DEPENDENCIES) $(EXTRA_siginfo_DEPENDENCIES) + @rm -f siginfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(siginfo_OBJECTS) $(siginfo_LDADD) $(LIBS) + +signal_receive$(EXEEXT): $(signal_receive_OBJECTS) $(signal_receive_DEPENDENCIES) $(EXTRA_signal_receive_DEPENDENCIES) + @rm -f signal_receive$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(signal_receive_OBJECTS) $(signal_receive_LDADD) $(LIBS) + +signalfd4$(EXEEXT): $(signalfd4_OBJECTS) $(signalfd4_DEPENDENCIES) $(EXTRA_signalfd4_DEPENDENCIES) + @rm -f signalfd4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(signalfd4_OBJECTS) $(signalfd4_LDADD) $(LIBS) + +sigreturn$(EXEEXT): $(sigreturn_OBJECTS) $(sigreturn_DEPENDENCIES) $(EXTRA_sigreturn_DEPENDENCIES) + @rm -f sigreturn$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigreturn_OBJECTS) $(sigreturn_LDADD) $(LIBS) + +sleep$(EXEEXT): $(sleep_OBJECTS) $(sleep_DEPENDENCIES) $(EXTRA_sleep_DEPENDENCIES) + @rm -f sleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sleep_OBJECTS) $(sleep_LDADD) $(LIBS) + +socketcall$(EXEEXT): $(socketcall_OBJECTS) $(socketcall_DEPENDENCIES) $(EXTRA_socketcall_DEPENDENCIES) + @rm -f socketcall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(socketcall_OBJECTS) $(socketcall_LDADD) $(LIBS) + +splice$(EXEEXT): $(splice_OBJECTS) $(splice_DEPENDENCIES) $(EXTRA_splice_DEPENDENCIES) + @rm -f splice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(splice_OBJECTS) $(splice_LDADD) $(LIBS) + +stack-fcall$(EXEEXT): $(stack_fcall_OBJECTS) $(stack_fcall_DEPENDENCIES) $(EXTRA_stack_fcall_DEPENDENCIES) + @rm -f stack-fcall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stack_fcall_OBJECTS) $(stack_fcall_LDADD) $(LIBS) + +stat$(EXEEXT): $(stat_OBJECTS) $(stat_DEPENDENCIES) $(EXTRA_stat_DEPENDENCIES) + @rm -f stat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stat_OBJECTS) $(stat_LDADD) $(LIBS) + +stat64$(EXEEXT): $(stat64_OBJECTS) $(stat64_DEPENDENCIES) $(EXTRA_stat64_DEPENDENCIES) + @rm -f stat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stat64_OBJECTS) $(stat64_LDADD) $(LIBS) + +statfs$(EXEEXT): $(statfs_OBJECTS) $(statfs_DEPENDENCIES) $(EXTRA_statfs_DEPENDENCIES) + @rm -f statfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs_OBJECTS) $(statfs_LDADD) $(LIBS) + +statfs64$(EXEEXT): $(statfs64_OBJECTS) $(statfs64_DEPENDENCIES) $(EXTRA_statfs64_DEPENDENCIES) + @rm -f statfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs64_OBJECTS) $(statfs64_LDADD) $(LIBS) + +swap$(EXEEXT): $(swap_OBJECTS) $(swap_DEPENDENCIES) $(EXTRA_swap_DEPENDENCIES) + @rm -f swap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(swap_OBJECTS) $(swap_LDADD) $(LIBS) + +symlink$(EXEEXT): $(symlink_OBJECTS) $(symlink_DEPENDENCIES) $(EXTRA_symlink_DEPENDENCIES) + @rm -f symlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlink_OBJECTS) $(symlink_LDADD) $(LIBS) + +symlinkat$(EXEEXT): $(symlinkat_OBJECTS) $(symlinkat_DEPENDENCIES) $(EXTRA_symlinkat_DEPENDENCIES) + @rm -f symlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlinkat_OBJECTS) $(symlinkat_LDADD) $(LIBS) + +sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES) $(EXTRA_sync_DEPENDENCIES) + @rm -f sync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_OBJECTS) $(sync_LDADD) $(LIBS) + +sync_file_range$(EXEEXT): $(sync_file_range_OBJECTS) $(sync_file_range_DEPENDENCIES) $(EXTRA_sync_file_range_DEPENDENCIES) + @rm -f sync_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range_OBJECTS) $(sync_file_range_LDADD) $(LIBS) + +sync_file_range2$(EXEEXT): $(sync_file_range2_OBJECTS) $(sync_file_range2_DEPENDENCIES) $(EXTRA_sync_file_range2_DEPENDENCIES) + @rm -f sync_file_range2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range2_OBJECTS) $(sync_file_range2_LDADD) $(LIBS) + +sysinfo$(EXEEXT): $(sysinfo_OBJECTS) $(sysinfo_DEPENDENCIES) $(EXTRA_sysinfo_DEPENDENCIES) + @rm -f sysinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sysinfo_OBJECTS) $(sysinfo_LDADD) $(LIBS) + +syslog$(EXEEXT): $(syslog_OBJECTS) $(syslog_DEPENDENCIES) $(EXTRA_syslog_DEPENDENCIES) + @rm -f syslog$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(syslog_OBJECTS) $(syslog_LDADD) $(LIBS) + +tee$(EXEEXT): $(tee_OBJECTS) $(tee_DEPENDENCIES) $(EXTRA_tee_DEPENDENCIES) + @rm -f tee$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tee_OBJECTS) $(tee_LDADD) $(LIBS) + +threads-execve$(EXEEXT): $(threads_execve_OBJECTS) $(threads_execve_DEPENDENCIES) $(EXTRA_threads_execve_DEPENDENCIES) + @rm -f threads-execve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(threads_execve_OBJECTS) $(threads_execve_LDADD) $(LIBS) + +time$(EXEEXT): $(time_OBJECTS) $(time_DEPENDENCIES) $(EXTRA_time_DEPENDENCIES) + @rm -f time$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(time_OBJECTS) $(time_LDADD) $(LIBS) + +timer_create$(EXEEXT): $(timer_create_OBJECTS) $(timer_create_DEPENDENCIES) $(EXTRA_timer_create_DEPENDENCIES) + @rm -f timer_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timer_create_OBJECTS) $(timer_create_LDADD) $(LIBS) + +timer_xettime$(EXEEXT): $(timer_xettime_OBJECTS) $(timer_xettime_DEPENDENCIES) $(EXTRA_timer_xettime_DEPENDENCIES) + @rm -f timer_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timer_xettime_OBJECTS) $(timer_xettime_LDADD) $(LIBS) + +timerfd_xettime$(EXEEXT): $(timerfd_xettime_OBJECTS) $(timerfd_xettime_DEPENDENCIES) $(EXTRA_timerfd_xettime_DEPENDENCIES) + @rm -f timerfd_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timerfd_xettime_OBJECTS) $(timerfd_xettime_LDADD) $(LIBS) + +times$(EXEEXT): $(times_OBJECTS) $(times_DEPENDENCIES) $(EXTRA_times_DEPENDENCIES) + @rm -f times$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(times_OBJECTS) $(times_LDADD) $(LIBS) + +times-fail$(EXEEXT): $(times_fail_OBJECTS) $(times_fail_DEPENDENCIES) $(EXTRA_times_fail_DEPENDENCIES) + @rm -f times-fail$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(times_fail_OBJECTS) $(times_fail_LDADD) $(LIBS) + +truncate$(EXEEXT): $(truncate_OBJECTS) $(truncate_DEPENDENCIES) $(EXTRA_truncate_DEPENDENCIES) + @rm -f truncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(truncate_OBJECTS) $(truncate_LDADD) $(LIBS) + +truncate64$(EXEEXT): $(truncate64_OBJECTS) $(truncate64_DEPENDENCIES) $(EXTRA_truncate64_DEPENDENCIES) + @rm -f truncate64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(truncate64_OBJECTS) $(truncate64_LDADD) $(LIBS) + +ugetrlimit$(EXEEXT): $(ugetrlimit_OBJECTS) $(ugetrlimit_DEPENDENCIES) $(EXTRA_ugetrlimit_DEPENDENCIES) + @rm -f ugetrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ugetrlimit_OBJECTS) $(ugetrlimit_LDADD) $(LIBS) + +uio$(EXEEXT): $(uio_OBJECTS) $(uio_DEPENDENCIES) $(EXTRA_uio_DEPENDENCIES) + @rm -f uio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uio_OBJECTS) $(uio_LDADD) $(LIBS) + +umask$(EXEEXT): $(umask_OBJECTS) $(umask_DEPENDENCIES) $(EXTRA_umask_DEPENDENCIES) + @rm -f umask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umask_OBJECTS) $(umask_LDADD) $(LIBS) + +umount$(EXEEXT): $(umount_OBJECTS) $(umount_DEPENDENCIES) $(EXTRA_umount_DEPENDENCIES) + @rm -f umount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umount_OBJECTS) $(umount_LDADD) $(LIBS) + +umount2$(EXEEXT): $(umount2_OBJECTS) $(umount2_DEPENDENCIES) $(EXTRA_umount2_DEPENDENCIES) + @rm -f umount2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umount2_OBJECTS) $(umount2_LDADD) $(LIBS) + +umoven-illptr$(EXEEXT): $(umoven_illptr_OBJECTS) $(umoven_illptr_DEPENDENCIES) $(EXTRA_umoven_illptr_DEPENDENCIES) + @rm -f umoven-illptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umoven_illptr_OBJECTS) $(umoven_illptr_LDADD) $(LIBS) + +umovestr$(EXEEXT): $(umovestr_OBJECTS) $(umovestr_DEPENDENCIES) $(EXTRA_umovestr_DEPENDENCIES) + @rm -f umovestr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr_OBJECTS) $(umovestr_LDADD) $(LIBS) + +umovestr-illptr$(EXEEXT): $(umovestr_illptr_OBJECTS) $(umovestr_illptr_DEPENDENCIES) $(EXTRA_umovestr_illptr_DEPENDENCIES) + @rm -f umovestr-illptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr_illptr_OBJECTS) $(umovestr_illptr_LDADD) $(LIBS) + +umovestr2$(EXEEXT): $(umovestr2_OBJECTS) $(umovestr2_DEPENDENCIES) $(EXTRA_umovestr2_DEPENDENCIES) + @rm -f umovestr2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr2_OBJECTS) $(umovestr2_LDADD) $(LIBS) + +umovestr3$(EXEEXT): $(umovestr3_OBJECTS) $(umovestr3_DEPENDENCIES) $(EXTRA_umovestr3_DEPENDENCIES) + @rm -f umovestr3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr3_OBJECTS) $(umovestr3_LDADD) $(LIBS) + +uname$(EXEEXT): $(uname_OBJECTS) $(uname_DEPENDENCIES) $(EXTRA_uname_DEPENDENCIES) + @rm -f uname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uname_OBJECTS) $(uname_LDADD) $(LIBS) + +unix-pair-send-recv$(EXEEXT): $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_DEPENDENCIES) $(EXTRA_unix_pair_send_recv_DEPENDENCIES) + @rm -f unix-pair-send-recv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_LDADD) $(LIBS) + +unix-pair-sendto-recvfrom$(EXEEXT): $(unix_pair_sendto_recvfrom_OBJECTS) $(unix_pair_sendto_recvfrom_DEPENDENCIES) $(EXTRA_unix_pair_sendto_recvfrom_DEPENDENCIES) + @rm -f unix-pair-sendto-recvfrom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unix_pair_sendto_recvfrom_OBJECTS) $(unix_pair_sendto_recvfrom_LDADD) $(LIBS) + +unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) $(EXTRA_unlink_DEPENDENCIES) + @rm -f unlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS) + +unlinkat$(EXEEXT): $(unlinkat_OBJECTS) $(unlinkat_DEPENDENCIES) $(EXTRA_unlinkat_DEPENDENCIES) + @rm -f unlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlinkat_OBJECTS) $(unlinkat_LDADD) $(LIBS) + +unshare$(EXEEXT): $(unshare_OBJECTS) $(unshare_DEPENDENCIES) $(EXTRA_unshare_DEPENDENCIES) + @rm -f unshare$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unshare_OBJECTS) $(unshare_LDADD) $(LIBS) + +userfaultfd$(EXEEXT): $(userfaultfd_OBJECTS) $(userfaultfd_DEPENDENCIES) $(EXTRA_userfaultfd_DEPENDENCIES) + @rm -f userfaultfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(userfaultfd_OBJECTS) $(userfaultfd_LDADD) $(LIBS) + +ustat$(EXEEXT): $(ustat_OBJECTS) $(ustat_DEPENDENCIES) $(EXTRA_ustat_DEPENDENCIES) + @rm -f ustat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ustat_OBJECTS) $(ustat_LDADD) $(LIBS) + +utime$(EXEEXT): $(utime_OBJECTS) $(utime_DEPENDENCIES) $(EXTRA_utime_DEPENDENCIES) + @rm -f utime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utime_OBJECTS) $(utime_LDADD) $(LIBS) + +utimensat$(EXEEXT): $(utimensat_OBJECTS) $(utimensat_DEPENDENCIES) $(EXTRA_utimensat_DEPENDENCIES) + @rm -f utimensat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimensat_OBJECTS) $(utimensat_LDADD) $(LIBS) + +utimes$(EXEEXT): $(utimes_OBJECTS) $(utimes_DEPENDENCIES) $(EXTRA_utimes_DEPENDENCIES) + @rm -f utimes$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimes_OBJECTS) $(utimes_LDADD) $(LIBS) + +vfork-f$(EXEEXT): $(vfork_f_OBJECTS) $(vfork_f_DEPENDENCIES) $(EXTRA_vfork_f_DEPENDENCIES) + @rm -f vfork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfork_f_OBJECTS) $(vfork_f_LDADD) $(LIBS) + +vhangup$(EXEEXT): $(vhangup_OBJECTS) $(vhangup_DEPENDENCIES) $(EXTRA_vhangup_DEPENDENCIES) + @rm -f vhangup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vhangup_OBJECTS) $(vhangup_LDADD) $(LIBS) + +vmsplice$(EXEEXT): $(vmsplice_OBJECTS) $(vmsplice_DEPENDENCIES) $(EXTRA_vmsplice_DEPENDENCIES) + @rm -f vmsplice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vmsplice_OBJECTS) $(vmsplice_LDADD) $(LIBS) + +wait4$(EXEEXT): $(wait4_OBJECTS) $(wait4_DEPENDENCIES) $(EXTRA_wait4_DEPENDENCIES) + @rm -f wait4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wait4_OBJECTS) $(wait4_LDADD) $(LIBS) + +wait4-v$(EXEEXT): $(wait4_v_OBJECTS) $(wait4_v_DEPENDENCIES) $(EXTRA_wait4_v_DEPENDENCIES) + @rm -f wait4-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wait4_v_OBJECTS) $(wait4_v_LDADD) $(LIBS) + +waitid$(EXEEXT): $(waitid_OBJECTS) $(waitid_DEPENDENCIES) $(EXTRA_waitid_DEPENDENCIES) + @rm -f waitid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitid_OBJECTS) $(waitid_LDADD) $(LIBS) + +waitid-v$(EXEEXT): $(waitid_v_OBJECTS) $(waitid_v_DEPENDENCIES) $(EXTRA_waitid_v_DEPENDENCIES) + @rm -f waitid-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitid_v_OBJECTS) $(waitid_v_LDADD) $(LIBS) + +waitpid$(EXEEXT): $(waitpid_OBJECTS) $(waitpid_DEPENDENCIES) $(EXTRA_waitpid_DEPENDENCIES) + @rm -f waitpid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitpid_OBJECTS) $(waitpid_LDADD) $(LIBS) + +xattr$(EXEEXT): $(xattr_OBJECTS) $(xattr_DEPENDENCIES) $(EXTRA_xattr_DEPENDENCIES) + @rm -f xattr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xattr_OBJECTS) $(xattr_LDADD) $(LIBS) + +xattr-strings$(EXEEXT): $(xattr_strings_OBJECTS) $(xattr_strings_DEPENDENCIES) $(EXTRA_xattr_strings_DEPENDENCIES) + @rm -f xattr-strings$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xattr_strings_OBJECTS) $(xattr_strings_LDADD) $(LIBS) + +xet_robust_list$(EXEEXT): $(xet_robust_list_OBJECTS) $(xet_robust_list_DEPENDENCIES) $(EXTRA_xet_robust_list_DEPENDENCIES) + @rm -f xet_robust_list$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xet_robust_list_OBJECTS) $(xet_robust_list_LDADD) $(LIBS) + +xetitimer$(EXEEXT): $(xetitimer_OBJECTS) $(xetitimer_DEPENDENCIES) $(EXTRA_xetitimer_DEPENDENCIES) + @rm -f xetitimer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetitimer_OBJECTS) $(xetitimer_LDADD) $(LIBS) + +xetpgid$(EXEEXT): $(xetpgid_OBJECTS) $(xetpgid_DEPENDENCIES) $(EXTRA_xetpgid_DEPENDENCIES) + @rm -f xetpgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpgid_OBJECTS) $(xetpgid_LDADD) $(LIBS) + +xetpriority$(EXEEXT): $(xetpriority_OBJECTS) $(xetpriority_DEPENDENCIES) $(EXTRA_xetpriority_DEPENDENCIES) + @rm -f xetpriority$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpriority_OBJECTS) $(xetpriority_LDADD) $(LIBS) + +xettimeofday$(EXEEXT): $(xettimeofday_OBJECTS) $(xettimeofday_DEPENDENCIES) $(EXTRA_xettimeofday_DEPENDENCIES) + @rm -f xettimeofday$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xettimeofday_OBJECTS) $(xettimeofday_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_newselect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accept.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accept4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/access.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acct.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_key.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alarm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/answer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-f-p-cmd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-f-p.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-p-cmd-cmd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-p-cmd-p.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bpf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/brk.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btrfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caps-abbrev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caps.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chroot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_adjtime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_nanosleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_xettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/creat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delete_module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_create1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_ctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_pwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_wait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erestartsys.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execveat-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execveat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fadvise64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fadvise64_64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fallocate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fanotify_init.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fanotify_mark.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchownat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdatasync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_handle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter-unavailable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/finit_module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fork-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat64-fstat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat64-fstatat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate64-ftruncate64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/futex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/futimesat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_mempolicy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcpu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdents.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdents64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getegid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getegid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geteuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geteuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpeername.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpgrp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrandom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrlimit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrusage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getsid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getsockname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getxxid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet-cmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init_module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inotify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inotify_init1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_block.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_dm-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_dm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_evdev-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_evdev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_loop-nv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_loop-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_loop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_mtd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_rtc-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_rtc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_scsi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_sg_io_v3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_sg_io_v4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_sock_gifconf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_uffdio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_v4l2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioperm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iopl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioprio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip_mreq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_msg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_msgbuf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_sem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_shm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kcmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kexec_file_load.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kexec_load.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kill.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ksysent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-errno2name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-error_msg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-fill_memory.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-get_page_size.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-hexdump_strdup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-hexquote_strndup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-inode_of_sockfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-libmmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-libsocketcall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-overflowuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-pipe_maxfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-print_quoted_string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-printflags.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-printxval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-signal2name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-sprintrc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-tail_alloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-tprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llseek.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup_dcookie.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat64-lstat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbind.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/membarrier.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memfd_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/migrate_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mincore.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdirat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlock2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlockall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap64-mmap64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg-silent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg_name-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg_name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/move_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq_sendrecv-read.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq_sendrecv-write.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq_sendrecv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_control-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_control.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/munlockall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-accept-connect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-icmp_filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-sockaddr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-y-unix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-inet.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-netlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-unix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_inet_diag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_netlink_diag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_protocol.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_unix_diag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newfstatat-newfstatat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsyscalls.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/old_mmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldfstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldlstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldselect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pause.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_event_open.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_event_open_nonverbose.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_event_open_unabbrev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/personality.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkey_alloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkey_free.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkey_mprotect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppoll.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-arg2-intptr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-dumpable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-no-args.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-pdeathsig.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-seccomp-filter-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-seccomp-strict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-securebits.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-tid_address.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-tsc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv-preadv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv2-pwritev2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv_pwritev-preadv-pwritev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_maxfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printstr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prlimit64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process_vm_readv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process_vm_writev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pselect6.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptrace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwritev-pwritev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_fault.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_inject-error-signal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_inject-retval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_inject-signal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_signal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotactl-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotactl-xfs-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotactl-xfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotactl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read-write.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readahead.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reboot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvfrom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvmmsg-timeout.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/redirect-fds.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remap_file_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renameat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renameat2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/request_key.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/restart_syscall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigpending.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigprocmask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigqueueinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigsuspend.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigtimedwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_tgsigqueueinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_get_priority_mxx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_rr_get_interval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetaffinity.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetattr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetparam.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetscheduler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_yield.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scm_rights.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-filter-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-strict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/semop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendfile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendfile64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_mempolicy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_ptracer_any.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setdomainname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgroups32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sethostname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setns.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setregid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setregid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setreuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setreuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setrlimit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shmxt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shutdown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaltstack.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/siginfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal_receive.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signalfd4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigreturn.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socketcall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splice.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-0.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat64-stat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs-statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_file_range2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syslog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tee.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threads-execve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_xettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timerfd_xettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/times-fail.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/times.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate64-truncate64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ugetrlimit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uio-uio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umoven-illptr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr-illptr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix-pair-send-recv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix-pair-sendto-recvfrom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unshare.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userfaultfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ustat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimensat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfork-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vhangup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmsplice.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wait4-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wait4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/waitid-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/waitid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/waitpid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattr-strings.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xet_robust_list.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetitimer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetpgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetpriority.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xettimeofday.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +libtests_a-errno2name.o: errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.o -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c + +libtests_a-errno2name.obj: errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` + +libtests_a-error_msg.o: error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.o -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c + +libtests_a-error_msg.obj: error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.obj -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` + +libtests_a-fill_memory.o: fill_memory.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-fill_memory.o -MD -MP -MF $(DEPDIR)/libtests_a-fill_memory.Tpo -c -o libtests_a-fill_memory.o `test -f 'fill_memory.c' || echo '$(srcdir)/'`fill_memory.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-fill_memory.Tpo $(DEPDIR)/libtests_a-fill_memory.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fill_memory.c' object='libtests_a-fill_memory.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-fill_memory.o `test -f 'fill_memory.c' || echo '$(srcdir)/'`fill_memory.c + +libtests_a-fill_memory.obj: fill_memory.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-fill_memory.obj -MD -MP -MF $(DEPDIR)/libtests_a-fill_memory.Tpo -c -o libtests_a-fill_memory.obj `if test -f 'fill_memory.c'; then $(CYGPATH_W) 'fill_memory.c'; else $(CYGPATH_W) '$(srcdir)/fill_memory.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-fill_memory.Tpo $(DEPDIR)/libtests_a-fill_memory.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fill_memory.c' object='libtests_a-fill_memory.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-fill_memory.obj `if test -f 'fill_memory.c'; then $(CYGPATH_W) 'fill_memory.c'; else $(CYGPATH_W) '$(srcdir)/fill_memory.c'; fi` + +libtests_a-get_page_size.o: get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.o -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c + +libtests_a-get_page_size.obj: get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.obj -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` + +libtests_a-hexdump_strdup.o: hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c + +libtests_a-hexdump_strdup.obj: hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` + +libtests_a-hexquote_strndup.o: hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c + +libtests_a-hexquote_strndup.obj: hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` + +libtests_a-inode_of_sockfd.o: inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.o -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c + +libtests_a-inode_of_sockfd.obj: inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` + +libtests_a-libmmsg.o: libmmsg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libmmsg.o -MD -MP -MF $(DEPDIR)/libtests_a-libmmsg.Tpo -c -o libtests_a-libmmsg.o `test -f 'libmmsg.c' || echo '$(srcdir)/'`libmmsg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libmmsg.Tpo $(DEPDIR)/libtests_a-libmmsg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmmsg.c' object='libtests_a-libmmsg.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libmmsg.o `test -f 'libmmsg.c' || echo '$(srcdir)/'`libmmsg.c + +libtests_a-libmmsg.obj: libmmsg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libmmsg.obj -MD -MP -MF $(DEPDIR)/libtests_a-libmmsg.Tpo -c -o libtests_a-libmmsg.obj `if test -f 'libmmsg.c'; then $(CYGPATH_W) 'libmmsg.c'; else $(CYGPATH_W) '$(srcdir)/libmmsg.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libmmsg.Tpo $(DEPDIR)/libtests_a-libmmsg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmmsg.c' object='libtests_a-libmmsg.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libmmsg.obj `if test -f 'libmmsg.c'; then $(CYGPATH_W) 'libmmsg.c'; else $(CYGPATH_W) '$(srcdir)/libmmsg.c'; fi` + +libtests_a-libsocketcall.o: libsocketcall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libsocketcall.o -MD -MP -MF $(DEPDIR)/libtests_a-libsocketcall.Tpo -c -o libtests_a-libsocketcall.o `test -f 'libsocketcall.c' || echo '$(srcdir)/'`libsocketcall.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libsocketcall.Tpo $(DEPDIR)/libtests_a-libsocketcall.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libsocketcall.c' object='libtests_a-libsocketcall.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libsocketcall.o `test -f 'libsocketcall.c' || echo '$(srcdir)/'`libsocketcall.c + +libtests_a-libsocketcall.obj: libsocketcall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libsocketcall.obj -MD -MP -MF $(DEPDIR)/libtests_a-libsocketcall.Tpo -c -o libtests_a-libsocketcall.obj `if test -f 'libsocketcall.c'; then $(CYGPATH_W) 'libsocketcall.c'; else $(CYGPATH_W) '$(srcdir)/libsocketcall.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libsocketcall.Tpo $(DEPDIR)/libtests_a-libsocketcall.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libsocketcall.c' object='libtests_a-libsocketcall.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libsocketcall.obj `if test -f 'libsocketcall.c'; then $(CYGPATH_W) 'libsocketcall.c'; else $(CYGPATH_W) '$(srcdir)/libsocketcall.c'; fi` + +libtests_a-overflowuid.o: overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.o -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c + +libtests_a-overflowuid.obj: overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.obj -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` + +libtests_a-pipe_maxfd.o: pipe_maxfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-pipe_maxfd.o -MD -MP -MF $(DEPDIR)/libtests_a-pipe_maxfd.Tpo -c -o libtests_a-pipe_maxfd.o `test -f 'pipe_maxfd.c' || echo '$(srcdir)/'`pipe_maxfd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-pipe_maxfd.Tpo $(DEPDIR)/libtests_a-pipe_maxfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipe_maxfd.c' object='libtests_a-pipe_maxfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-pipe_maxfd.o `test -f 'pipe_maxfd.c' || echo '$(srcdir)/'`pipe_maxfd.c + +libtests_a-pipe_maxfd.obj: pipe_maxfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-pipe_maxfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-pipe_maxfd.Tpo -c -o libtests_a-pipe_maxfd.obj `if test -f 'pipe_maxfd.c'; then $(CYGPATH_W) 'pipe_maxfd.c'; else $(CYGPATH_W) '$(srcdir)/pipe_maxfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-pipe_maxfd.Tpo $(DEPDIR)/libtests_a-pipe_maxfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipe_maxfd.c' object='libtests_a-pipe_maxfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-pipe_maxfd.obj `if test -f 'pipe_maxfd.c'; then $(CYGPATH_W) 'pipe_maxfd.c'; else $(CYGPATH_W) '$(srcdir)/pipe_maxfd.c'; fi` + +libtests_a-print_quoted_string.o: print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.o -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c + +libtests_a-print_quoted_string.obj: print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.obj -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` + +libtests_a-printflags.o: printflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.o -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c + +libtests_a-printflags.obj: printflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.obj -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` + +libtests_a-printxval.o: printxval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.o -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c + +libtests_a-printxval.obj: printxval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.obj -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` + +libtests_a-signal2name.o: signal2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-signal2name.o -MD -MP -MF $(DEPDIR)/libtests_a-signal2name.Tpo -c -o libtests_a-signal2name.o `test -f 'signal2name.c' || echo '$(srcdir)/'`signal2name.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-signal2name.Tpo $(DEPDIR)/libtests_a-signal2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signal2name.c' object='libtests_a-signal2name.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-signal2name.o `test -f 'signal2name.c' || echo '$(srcdir)/'`signal2name.c + +libtests_a-signal2name.obj: signal2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-signal2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-signal2name.Tpo -c -o libtests_a-signal2name.obj `if test -f 'signal2name.c'; then $(CYGPATH_W) 'signal2name.c'; else $(CYGPATH_W) '$(srcdir)/signal2name.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-signal2name.Tpo $(DEPDIR)/libtests_a-signal2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signal2name.c' object='libtests_a-signal2name.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-signal2name.obj `if test -f 'signal2name.c'; then $(CYGPATH_W) 'signal2name.c'; else $(CYGPATH_W) '$(srcdir)/signal2name.c'; fi` + +libtests_a-sprintrc.o: sprintrc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-sprintrc.o -MD -MP -MF $(DEPDIR)/libtests_a-sprintrc.Tpo -c -o libtests_a-sprintrc.o `test -f 'sprintrc.c' || echo '$(srcdir)/'`sprintrc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-sprintrc.Tpo $(DEPDIR)/libtests_a-sprintrc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sprintrc.c' object='libtests_a-sprintrc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-sprintrc.o `test -f 'sprintrc.c' || echo '$(srcdir)/'`sprintrc.c + +libtests_a-sprintrc.obj: sprintrc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-sprintrc.obj -MD -MP -MF $(DEPDIR)/libtests_a-sprintrc.Tpo -c -o libtests_a-sprintrc.obj `if test -f 'sprintrc.c'; then $(CYGPATH_W) 'sprintrc.c'; else $(CYGPATH_W) '$(srcdir)/sprintrc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-sprintrc.Tpo $(DEPDIR)/libtests_a-sprintrc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sprintrc.c' object='libtests_a-sprintrc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-sprintrc.obj `if test -f 'sprintrc.c'; then $(CYGPATH_W) 'sprintrc.c'; else $(CYGPATH_W) '$(srcdir)/sprintrc.c'; fi` + +libtests_a-tail_alloc.o: tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.o -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c + +libtests_a-tail_alloc.obj: tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.obj -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` + +libtests_a-tprintf.o: tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.o -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c + +libtests_a-tprintf.obj: tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.obj -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` + +fstat64-fstat64.o: fstat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.o -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstat64.c' object='fstat64-fstat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c + +fstat64-fstat64.obj: fstat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.obj -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.obj `if test -f 'fstat64.c'; then $(CYGPATH_W) 'fstat64.c'; else $(CYGPATH_W) '$(srcdir)/fstat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstat64.c' object='fstat64-fstat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstat64-fstat64.obj `if test -f 'fstat64.c'; then $(CYGPATH_W) 'fstat64.c'; else $(CYGPATH_W) '$(srcdir)/fstat64.c'; fi` + +fstatat64-fstatat64.o: fstatat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstatat64-fstatat64.o -MD -MP -MF $(DEPDIR)/fstatat64-fstatat64.Tpo -c -o fstatat64-fstatat64.o `test -f 'fstatat64.c' || echo '$(srcdir)/'`fstatat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstatat64-fstatat64.Tpo $(DEPDIR)/fstatat64-fstatat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatat64.c' object='fstatat64-fstatat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstatat64-fstatat64.o `test -f 'fstatat64.c' || echo '$(srcdir)/'`fstatat64.c + +fstatat64-fstatat64.obj: fstatat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstatat64-fstatat64.obj -MD -MP -MF $(DEPDIR)/fstatat64-fstatat64.Tpo -c -o fstatat64-fstatat64.obj `if test -f 'fstatat64.c'; then $(CYGPATH_W) 'fstatat64.c'; else $(CYGPATH_W) '$(srcdir)/fstatat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstatat64-fstatat64.Tpo $(DEPDIR)/fstatat64-fstatat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatat64.c' object='fstatat64-fstatat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstatat64-fstatat64.obj `if test -f 'fstatat64.c'; then $(CYGPATH_W) 'fstatat64.c'; else $(CYGPATH_W) '$(srcdir)/fstatat64.c'; fi` + +ftruncate64-ftruncate64.o: ftruncate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftruncate64-ftruncate64.o -MD -MP -MF $(DEPDIR)/ftruncate64-ftruncate64.Tpo -c -o ftruncate64-ftruncate64.o `test -f 'ftruncate64.c' || echo '$(srcdir)/'`ftruncate64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ftruncate64-ftruncate64.Tpo $(DEPDIR)/ftruncate64-ftruncate64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ftruncate64.c' object='ftruncate64-ftruncate64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftruncate64-ftruncate64.o `test -f 'ftruncate64.c' || echo '$(srcdir)/'`ftruncate64.c + +ftruncate64-ftruncate64.obj: ftruncate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftruncate64-ftruncate64.obj -MD -MP -MF $(DEPDIR)/ftruncate64-ftruncate64.Tpo -c -o ftruncate64-ftruncate64.obj `if test -f 'ftruncate64.c'; then $(CYGPATH_W) 'ftruncate64.c'; else $(CYGPATH_W) '$(srcdir)/ftruncate64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ftruncate64-ftruncate64.Tpo $(DEPDIR)/ftruncate64-ftruncate64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ftruncate64.c' object='ftruncate64-ftruncate64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftruncate64-ftruncate64.obj `if test -f 'ftruncate64.c'; then $(CYGPATH_W) 'ftruncate64.c'; else $(CYGPATH_W) '$(srcdir)/ftruncate64.c'; fi` + +lstat64-lstat64.o: lstat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lstat64-lstat64.o -MD -MP -MF $(DEPDIR)/lstat64-lstat64.Tpo -c -o lstat64-lstat64.o `test -f 'lstat64.c' || echo '$(srcdir)/'`lstat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lstat64-lstat64.Tpo $(DEPDIR)/lstat64-lstat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lstat64.c' object='lstat64-lstat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lstat64-lstat64.o `test -f 'lstat64.c' || echo '$(srcdir)/'`lstat64.c + +lstat64-lstat64.obj: lstat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lstat64-lstat64.obj -MD -MP -MF $(DEPDIR)/lstat64-lstat64.Tpo -c -o lstat64-lstat64.obj `if test -f 'lstat64.c'; then $(CYGPATH_W) 'lstat64.c'; else $(CYGPATH_W) '$(srcdir)/lstat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lstat64-lstat64.Tpo $(DEPDIR)/lstat64-lstat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lstat64.c' object='lstat64-lstat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lstat64-lstat64.obj `if test -f 'lstat64.c'; then $(CYGPATH_W) 'lstat64.c'; else $(CYGPATH_W) '$(srcdir)/lstat64.c'; fi` + +mmap64-mmap64.o: mmap64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmap64-mmap64.o -MD -MP -MF $(DEPDIR)/mmap64-mmap64.Tpo -c -o mmap64-mmap64.o `test -f 'mmap64.c' || echo '$(srcdir)/'`mmap64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mmap64-mmap64.Tpo $(DEPDIR)/mmap64-mmap64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mmap64.c' object='mmap64-mmap64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap64-mmap64.o `test -f 'mmap64.c' || echo '$(srcdir)/'`mmap64.c + +mmap64-mmap64.obj: mmap64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmap64-mmap64.obj -MD -MP -MF $(DEPDIR)/mmap64-mmap64.Tpo -c -o mmap64-mmap64.obj `if test -f 'mmap64.c'; then $(CYGPATH_W) 'mmap64.c'; else $(CYGPATH_W) '$(srcdir)/mmap64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mmap64-mmap64.Tpo $(DEPDIR)/mmap64-mmap64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mmap64.c' object='mmap64-mmap64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap64-mmap64.obj `if test -f 'mmap64.c'; then $(CYGPATH_W) 'mmap64.c'; else $(CYGPATH_W) '$(srcdir)/mmap64.c'; fi` + +newfstatat-newfstatat.o: newfstatat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT newfstatat-newfstatat.o -MD -MP -MF $(DEPDIR)/newfstatat-newfstatat.Tpo -c -o newfstatat-newfstatat.o `test -f 'newfstatat.c' || echo '$(srcdir)/'`newfstatat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/newfstatat-newfstatat.Tpo $(DEPDIR)/newfstatat-newfstatat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='newfstatat.c' object='newfstatat-newfstatat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.o `test -f 'newfstatat.c' || echo '$(srcdir)/'`newfstatat.c + +newfstatat-newfstatat.obj: newfstatat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT newfstatat-newfstatat.obj -MD -MP -MF $(DEPDIR)/newfstatat-newfstatat.Tpo -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/newfstatat-newfstatat.Tpo $(DEPDIR)/newfstatat-newfstatat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='newfstatat.c' object='newfstatat-newfstatat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` + +pread64_pwrite64-pread64-pwrite64.o: pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.o -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c + +pread64_pwrite64-pread64-pwrite64.obj: pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.obj -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` + +preadv-preadv.o: preadv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.o -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv.c' object='preadv-preadv.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c + +preadv-preadv.obj: preadv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.obj -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv.c' object='preadv-preadv.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` + +preadv_pwritev-preadv-pwritev.o: preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.o -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c + +preadv_pwritev-preadv-pwritev.obj: preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.obj -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` + +pwritev-pwritev.o: pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.o -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c + +pwritev-pwritev.obj: pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.obj -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` + +stat64-stat64.o: stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.o -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stat64.c' object='stat64-stat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c + +stat64-stat64.obj: stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.obj -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stat64.c' object='stat64-stat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat64-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` + +statfs-statfs.o: statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT statfs-statfs.o -MD -MP -MF $(DEPDIR)/statfs-statfs.Tpo -c -o statfs-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/statfs-statfs.Tpo $(DEPDIR)/statfs-statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='statfs-statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o statfs-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + +statfs-statfs.obj: statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT statfs-statfs.obj -MD -MP -MF $(DEPDIR)/statfs-statfs.Tpo -c -o statfs-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/statfs-statfs.Tpo $(DEPDIR)/statfs-statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='statfs-statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o statfs-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + +truncate64-truncate64.o: truncate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT truncate64-truncate64.o -MD -MP -MF $(DEPDIR)/truncate64-truncate64.Tpo -c -o truncate64-truncate64.o `test -f 'truncate64.c' || echo '$(srcdir)/'`truncate64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/truncate64-truncate64.Tpo $(DEPDIR)/truncate64-truncate64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='truncate64.c' object='truncate64-truncate64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o truncate64-truncate64.o `test -f 'truncate64.c' || echo '$(srcdir)/'`truncate64.c + +truncate64-truncate64.obj: truncate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT truncate64-truncate64.obj -MD -MP -MF $(DEPDIR)/truncate64-truncate64.Tpo -c -o truncate64-truncate64.obj `if test -f 'truncate64.c'; then $(CYGPATH_W) 'truncate64.c'; else $(CYGPATH_W) '$(srcdir)/truncate64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/truncate64-truncate64.Tpo $(DEPDIR)/truncate64-truncate64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='truncate64.c' object='truncate64-truncate64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o truncate64-truncate64.obj `if test -f 'truncate64.c'; then $(CYGPATH_W) 'truncate64.c'; else $(CYGPATH_W) '$(srcdir)/truncate64.c'; fi` + +uio-uio.o: uio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uio-uio.o -MD -MP -MF $(DEPDIR)/uio-uio.Tpo -c -o uio-uio.o `test -f 'uio.c' || echo '$(srcdir)/'`uio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uio-uio.Tpo $(DEPDIR)/uio-uio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uio.c' object='uio-uio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uio-uio.o `test -f 'uio.c' || echo '$(srcdir)/'`uio.c + +uio-uio.obj: uio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uio-uio.obj -MD -MP -MF $(DEPDIR)/uio-uio.Tpo -c -o uio-uio.obj `if test -f 'uio.c'; then $(CYGPATH_W) 'uio.c'; else $(CYGPATH_W) '$(srcdir)/uio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uio-uio.Tpo $(DEPDIR)/uio-uio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uio.c' object='uio-uio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uio-uio.obj `if test -f 'uio.c'; then $(CYGPATH_W) 'uio.c'; else $(CYGPATH_W) '$(srcdir)/uio.c'; fi` +check-valgrind-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_LIBRARIES) $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-am + +check-valgrind-am: check-valgrind-local + +clean: clean-am + +clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am \ + check-valgrind-am check-valgrind-local clean \ + clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am + + +@VALGRIND_CHECK_RULES@ + +ksysent.h: $(srcdir)/ksysent.sed + echo '#include ' | \ + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 + LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 + mv -f $@.t2 $@ + rm -f $@.t1 + +ksysent.$(OBJEXT): ksysent.h +$(objects): scno.h + +syscallent.i: $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h + $(CPP) -P $(SCNO_CPPFLAGS) $^ -o $@ + +scno.h: $(top_srcdir)/scno.head syscallent.i + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + cat $< >> $@-t + LC_ALL=C sed -n '$(SCNO_SED)' $(filter-out $<,$^) >> $@-t + mv $@-t $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests-m32/_newselect.c b/tests-m32/_newselect.c new file mode 100644 index 000000000..ae2bc51af --- /dev/null +++ b/tests-m32/_newselect.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR__newselect + +# define TEST_SYSCALL_NR __NR__newselect +# define TEST_SYSCALL_STR "_newselect" +# include "xselect.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR__newselect") + +#endif diff --git a/tests-m32/_newselect.test b/tests-m32/_newselect.test new file mode 100755 index 000000000..3371d4dbc --- /dev/null +++ b/tests-m32/_newselect.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check _newselect syscall decoding. + +. "${srcdir=.}/select.test" diff --git a/tests-m32/accept.c b/tests-m32/accept.c new file mode 100644 index 000000000..8d42ba156 --- /dev/null +++ b/tests-m32/accept.c @@ -0,0 +1,85 @@ +/* + * Check decoding of accept syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TEST_SYSCALL_NAME +# define TEST_SYSCALL_NAME accept +#endif + +#define TEST_SYSCALL_PREPARE connect_un() +static void connect_un(void); +#include "sockname.c" + +static void +connect_un(void) +{ + int cfd = socket(AF_UNIX, SOCK_STREAM, 0); + if (cfd < 0) + perror_msg_and_skip("socket"); + + struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = TEST_SOCKET ".connect" + }; + + (void) unlink(un.sun_path); + if (bind(cfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + (void) unlink(un.sun_path); + + un.sun_path[sizeof(TEST_SOCKET) - 1] = '\0'; + if (connect(cfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("connect"); +} + +int +main(void) +{ + int lfd = socket(AF_UNIX, SOCK_STREAM, 0); + if (lfd < 0) + perror_msg_and_skip("socket"); + + (void) unlink(TEST_SOCKET); + + const struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = TEST_SOCKET + }; + + if (bind(lfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + if (listen(lfd, 16)) + perror_msg_and_skip("listen"); + + test_sockname_syscall(lfd); + + (void) unlink(TEST_SOCKET); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/accept.test b/tests-m32/accept.test new file mode 100755 index 000000000..b5e07904d --- /dev/null +++ b/tests-m32/accept.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of accept syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff --git a/tests-m32/accept4.c b/tests-m32/accept4.c new file mode 100644 index 000000000..d26e15c5c --- /dev/null +++ b/tests-m32/accept4.c @@ -0,0 +1,44 @@ +/* + * Check decoding of accept4 syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined HAVE_ACCEPT4 && defined O_CLOEXEC + +# define TEST_SYSCALL_NAME accept4 +# define SUFFIX_ARGS , O_CLOEXEC +# define SUFFIX_STR ", SOCK_CLOEXEC" +# include "accept.c" + +#else + +SKIP_MAIN_UNDEFINED("HAVE_ACCEPT4 && O_CLOEXEC") + +#endif diff --git a/tests-m32/accept4.test b/tests-m32/accept4.test new file mode 100755 index 000000000..722f25a55 --- /dev/null +++ b/tests-m32/accept4.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of accept4 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a37 diff --git a/tests-m32/access.c b/tests-m32/access.c new file mode 100644 index 000000000..e6f169b26 --- /dev/null +++ b/tests-m32/access.c @@ -0,0 +1,29 @@ +#include "tests.h" +#include + +#ifdef __NR_access + +# include +# include + +int +main(void) +{ + static const char sample[] = "access_sample"; + + long rc = syscall(__NR_access, sample, F_OK); + printf("access(\"%s\", F_OK) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = syscall(__NR_access, sample, R_OK|W_OK|X_OK); + printf("access(\"%s\", R_OK|W_OK|X_OK) = %ld %s (%m)\n", + sample, rc, errno2name()); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_access") + +#endif diff --git a/tests-m32/access.test b/tests-m32/access.test new file mode 100755 index 000000000..3ab2eb4ba --- /dev/null +++ b/tests-m32/access.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check access syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -eaccess -a30 $args > "$EXP" + +# Filter out access() calls made by libc. +grep -F access_sample < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/acct.c b/tests-m32/acct.c new file mode 100644 index 000000000..1cc3fa56e --- /dev/null +++ b/tests-m32/acct.c @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_acct + +# include +# include + +int +main(void) +{ + const char sample[] = "acct_sample"; + + long rc = syscall(__NR_acct, sample); + printf("acct(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR__acct") + +#endif diff --git a/tests-m32/acct.test b/tests-m32/acct.test new file mode 100755 index 000000000..b9bca7544 --- /dev/null +++ b/tests-m32/acct.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check acct syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff --git a/tests-m32/add_key.c b/tests-m32/add_key.c new file mode 100644 index 000000000..d2696f9bc --- /dev/null +++ b/tests-m32/add_key.c @@ -0,0 +1,153 @@ +/* + * Check decoding of add_key syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_add_key + +# include +# include +# include + +void +print_val_str(const void *ptr, const char *str) +{ + if (str) + printf("%s, ", str); + else + printf("%p, ", ptr); +} + +void +do_add_key(const char *type, const char *type_str, const char *desc, + const char *desc_str, const char *payload, const char *payload_str, + size_t plen, int32_t keyring, const char *keyring_str) +{ + long rc = syscall(__NR_add_key, type, desc, payload, plen, keyring); + const char *errstr = sprintrc(rc); + printf("add_key("); + print_val_str(type, type_str); + print_val_str(desc, desc_str); + print_val_str(payload, payload_str); + printf("%zu, ", plen); + if (keyring_str) + printf("%s", keyring_str); + else + printf("%d", keyring); + printf(") = %s\n", errstr); +} + +int +main(void) +{ + static const char unterminated1[] = { '\1', '\2', '\3', '\4', '\5' }; + static const char unterminated2[] = { '\6', '\7', '\10', '\11', '\12' }; + static const char unterminated3[] = + { '\16', '\17', '\20', '\21', '\22' }; + + char *bogus_type = tail_memdup(unterminated1, sizeof(unterminated1)); + char *bogus_desc = tail_memdup(unterminated2, sizeof(unterminated2)); + char *bogus_payload = tail_memdup(unterminated3, sizeof(unterminated3)); + + unsigned i; + unsigned j; + unsigned k; + unsigned l; + + struct { + const char *type; + const char *str; + } types[] = { + { ARG_STR(NULL) }, + { bogus_type + sizeof(unterminated1), NULL }, + { bogus_type, NULL }, + { ARG_STR("\20\21\22\23\24") }, + { ARG_STR("user") }, + }; + + struct { + const char *desc; + const char *str; + } descs[] = { + { ARG_STR(NULL) }, + { bogus_desc + sizeof(unterminated2), NULL }, + { bogus_desc, NULL }, + { ARG_STR("\25\26\27\30\31") }, + { ARG_STR("desc") }, + { "overly long description", _STR("overly long ") "..." }, + }; + + struct { + const char *pload; + const char *str; + size_t plen; + } payloads[] = { + { ARG_STR(NULL), 0 }, + { bogus_payload + sizeof(unterminated3), NULL, + (size_t) 0xdeadbeefbadc0dedULL }, + { bogus_payload, _STR(""), 0 }, + { bogus_payload, _STR("\16\17\20\21\22"), 5 }, + { bogus_payload, NULL, 10 }, + { "overly long payload", _STR("overly long ") "...", 15 }, + }; + + struct { + uint32_t keyring; + const char *str; + } keyrings[] = { + { ARG_STR(0) }, + { ARG_STR(1234567890) }, + { ARG_STR(-1234567890) }, + { -1, "KEY_SPEC_THREAD_KEYRING" }, + }; + + for (i = 0; i < ARRAY_SIZE(types); i++) + for (j = 0; j < ARRAY_SIZE(descs); j++) + for (k = 0; k < ARRAY_SIZE(payloads); k++) + for (l = 0; l < ARRAY_SIZE(keyrings); l++) + do_add_key(types[i].type, types[i].str, + descs[j].desc, descs[j].str, + payloads[k].pload, + payloads[k].str, + payloads[k].plen, + keyrings[l].keyring, + keyrings[l].str); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_add_key"); + +#endif diff --git a/tests-m32/add_key.test b/tests-m32/add_key.test new file mode 100755 index 000000000..eadd8c2b8 --- /dev/null +++ b/tests-m32/add_key.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of add_key syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a30 -s12 diff --git a/tests-m32/adjtimex.c b/tests-m32/adjtimex.c new file mode 100644 index 000000000..1638b5356 --- /dev/null +++ b/tests-m32/adjtimex.c @@ -0,0 +1,83 @@ +/* + * This file is part of adjtimex strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +int +main(void) +{ + adjtimex(NULL); + printf("adjtimex\\(NULL\\) = -1 EFAULT \\(%m\\)\n"); + + struct timex * const tx = tail_alloc(sizeof(*tx)); + memset(tx, 0, sizeof(*tx)); + + int state = adjtimex(tx); + if (state < 0) + perror_msg_and_skip("adjtimex"); + + printf("adjtimex\\(\\{modes=0, offset=%jd, freq=%jd, maxerror=%jd" + ", esterror=%jd, status=%s, constant=%jd, precision=%jd" + ", tolerance=%jd, time=\\{tv_sec=%jd, tv_usec=%jd\\}, tick=%jd, " + "ppsfreq=%jd, jitter=%jd, shift=%d, stabil=%jd, jitcnt=%jd, " + "calcnt=%jd, errcnt=%jd, stbcnt=%jd" +#ifdef HAVE_STRUCT_TIMEX_TAI + ", tai=%d" +#endif + "\\}\\) = %d \\(TIME_[A-Z]+\\)\n", + (intmax_t) tx->offset, + (intmax_t) tx->freq, + (intmax_t) tx->maxerror, + (intmax_t) tx->esterror, + tx->status ? "STA_[A-Z]+(\\|STA_[A-Z]+)*" : "0", + (intmax_t) tx->constant, + (intmax_t) tx->precision, + (intmax_t) tx->tolerance, + (intmax_t) tx->time.tv_sec, + (intmax_t) tx->time.tv_usec, + (intmax_t) tx->tick, + (intmax_t) tx->ppsfreq, + (intmax_t) tx->jitter, + tx->shift, + (intmax_t) tx->stabil, + (intmax_t) tx->jitcnt, + (intmax_t) tx->calcnt, + (intmax_t) tx->errcnt, + (intmax_t) tx->stbcnt, +#ifdef HAVE_STRUCT_TIMEX_TAI + tx->tai, +#endif + state); + + return 0; +} diff --git a/tests-m32/adjtimex.test b/tests-m32/adjtimex.test new file mode 100755 index 000000000..014055011 --- /dev/null +++ b/tests-m32/adjtimex.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check adjtimex syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a 15 -e adjtimex $args > "$OUT" +match_grep "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests-m32/aio.c b/tests-m32/aio.c new file mode 100644 index 000000000..0766d23a7 --- /dev/null +++ b/tests-m32/aio.c @@ -0,0 +1,368 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +#if defined __NR_io_setup \ + && defined __NR_io_submit \ + && defined __NR_io_getevents \ + && defined __NR_io_cancel \ + && defined __NR_io_destroy +# include + +int +main(void) +{ + static const long bogus_ctx = + (long) 0xface1e55deadbeefLL; + + static const char data2[] = + "\0\1\2\3cat test test test 0123456789abcdef"; + + const unsigned int sizeof_data0 = 4096; + const unsigned int sizeof_data1 = 8192; + void *data0 = tail_alloc(sizeof_data0); + void *data1 = tail_alloc(sizeof_data1); + + const struct iocb proto_cb[] = { + { + .aio_data = (unsigned long) 0xfeedface11111111ULL, + .aio_reqprio = 11, + .aio_buf = (unsigned long) data0, + .aio_offset = (unsigned long) 0xdeface1facefeedULL, + .aio_nbytes = sizeof_data0 + }, + { + .aio_data = (unsigned long) 0xfeedface22222222ULL, + .aio_reqprio = 22, + .aio_buf = (unsigned long) data1, + .aio_offset = (unsigned long) 0xdeface2cafef00dULL, + .aio_nbytes = sizeof_data1 + } + }; + const struct iocb *cb = tail_memdup(proto_cb, sizeof(proto_cb)); + + const struct iovec proto_iov0[] = { + { + .iov_base = data0, + .iov_len = sizeof_data0 / 4 + }, + { + .iov_base = data0 + sizeof_data0 / 4, + .iov_len = sizeof_data0 / 4 * 3 + }, + }; + const struct iovec *iov0 = tail_memdup(proto_iov0, sizeof(proto_iov0)); + + const struct iovec proto_iov1[] = { + { + .iov_base = data1, + .iov_len = sizeof_data1 / 4 + }, + { + .iov_base = data1 + sizeof_data1 / 4, + .iov_len = sizeof_data1 / 4 * 3 + }, + }; + const struct iovec *iov1 = tail_memdup(proto_iov1, sizeof(proto_iov1)); + + const struct iocb proto_cbv[] = { + { + .aio_data = (unsigned long) 0xfeed11111111faceULL, + .aio_lio_opcode = 7, + .aio_reqprio = 111, + .aio_buf = (unsigned long) iov0, + .aio_offset = (unsigned long) 0xdeface1facefeedULL, + .aio_nbytes = ARRAY_SIZE(proto_iov0) + }, + { + .aio_data = (unsigned long) 0xfeed22222222faceULL, + .aio_lio_opcode = 7, + .aio_reqprio = 222, + .aio_buf = (unsigned long) iov1, + .aio_offset = (unsigned long) 0xdeface2cafef00dULL, + .aio_nbytes = ARRAY_SIZE(proto_iov1) + } + }; + const struct iocb *cbv = tail_memdup(proto_cbv, sizeof(proto_cbv)); + + /* For additional decoder testing */ + const struct iocb proto_cbv2[] = { + { + .aio_data = 0xbadfacedc0ffeeedULL, + .aio_key = 0xdefaced0, + .aio_lio_opcode = 0xf00d, + .aio_reqprio = 0, + .aio_fildes = 0xdefaced1, + .aio_buf = 0, + }, + { + .aio_data = 0, + .aio_key = 0xdefaced0, + .aio_lio_opcode = 1, + .aio_reqprio = 0xbeef, + .aio_fildes = 0xdefaced1, + .aio_buf = 0, + /* In order to make record valid */ + .aio_nbytes = (size_t) 0x1020304050607080ULL, + .aio_offset = 0xdeadda7abadc0dedULL, +# ifdef IOCB_FLAG_RESFD + .aio_flags = 0xfacef157, + .aio_resfd = 0xded1ca7e, +# endif + }, + { + .aio_data = 0, + .aio_key = 0xdefaced0, + .aio_lio_opcode = 1, + .aio_reqprio = 0xbeef, + .aio_fildes = 0xdefaced1, + .aio_buf = 0xbadc0ffeedefacedULL, + .aio_nbytes = 0x8090a0b0c0d0e0f0ULL, + .aio_offset = 0xdeadda7abadc0dedULL, + }, + { + .aio_data = 0, + .aio_key = 0xdefaced0, + .aio_lio_opcode = 1, + .aio_reqprio = 0xbeef, + .aio_fildes = 0xdefaced1, + .aio_buf = (unsigned long)data2, + .aio_nbytes = sizeof(data2), + .aio_offset = 0xdeadda7abadc0dedULL, + }, + { + .aio_data = 0, + .aio_key = 0xdefaced0, + .aio_lio_opcode = 8, + .aio_reqprio = 0xbeef, + .aio_fildes = 0xdefaced1, + .aio_buf = 0, + .aio_nbytes = 0x8090a0b0c0d0e0f0ULL, + .aio_offset = 0xdeadda7abadc0dedULL, + }, + }; + const struct iocb *cbv2 = tail_memdup(proto_cbv2, sizeof(proto_cbv2)); + + const struct iocb proto_cbc = { + .aio_data = (unsigned long) 0xdeadbeefbadc0dedULL, + .aio_reqprio = 99, + .aio_fildes = -42 + }; + const struct iocb *cbc = tail_memdup(&proto_cbc, sizeof(proto_cbc)); + + const long proto_cbs[] = { + (long) &cb[0], (long) &cb[1] + }; + const long *cbs = tail_memdup(proto_cbs, sizeof(proto_cbs)); + + const long proto_cbvs[] = { + (long) &cbv[0], (long) &cbv[1], + }; + const long *cbvs = tail_memdup(proto_cbvs, sizeof(proto_cbvs)); + + const long proto_cbvs2[] = { + (long) &cbv2[0], (long) &cbv2[1], (long) &cbv2[2], + (long) &cbv2[3], (long) &cbv2[4], + (long) NULL, (long) 0xffffffffffffffffLL, + }; + const long *cbvs2 = tail_memdup(proto_cbvs2, sizeof(proto_cbvs2)); + + unsigned long *ctx = tail_alloc(sizeof(unsigned long)); + *ctx = 0; + + const unsigned int nr = ARRAY_SIZE(proto_cb); + const unsigned long lnr = (unsigned long) (0xdeadbeef00000000ULL | nr); + + const struct io_event *ev = tail_alloc(nr * sizeof(struct io_event)); + const struct timespec proto_ts = { .tv_nsec = 123456789 }; + const struct timespec *ts = tail_memdup(&proto_ts, sizeof(proto_ts)); + + (void) close(0); + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_skip("open: %s", "/dev/zero"); + + long rc = syscall(__NR_io_setup, 0xdeadbeef, NULL); + printf("io_setup(%u, NULL) = %s\n", 0xdeadbeef, sprintrc(rc)); + + rc = syscall(__NR_io_setup, lnr, ctx + 1); + printf("io_setup(%u, %p) = %s\n", nr, ctx + 1, sprintrc(rc)); + + if (syscall(__NR_io_setup, lnr, ctx)) + perror_msg_and_skip("io_setup"); + printf("io_setup(%u, [%#lx]) = 0\n", nr, *ctx); + + rc = syscall(__NR_io_submit, bogus_ctx, (long) 0xca7faceddeadf00dLL, + NULL); + printf("io_submit(%#lx, %ld, NULL) = %s\n", + bogus_ctx, (long) 0xca7faceddeadf00dLL, sprintrc(rc)); + + rc = syscall(__NR_io_submit, *ctx, nr, cbs + nr); + printf("io_submit(%#lx, %ld, %p) = %s\n", + *ctx, (long) nr, cbs + nr, sprintrc(rc)); + + rc = syscall(__NR_io_submit, *ctx, -1L, cbs); + printf("io_submit(%#lx, -1, %p) = %s\n", + *ctx, cbs, sprintrc(rc)); + + rc = syscall(__NR_io_submit, *ctx, nr, cbs); + if (rc != (long) nr) + perror_msg_and_skip("io_submit"); + printf("io_submit(%#lx, %u, [" + "{data=%#" PRI__x64 ", pread, reqprio=11, fildes=0, " + "buf=%p, nbytes=%u, offset=%" PRI__d64 "}, " + "{data=%#" PRI__x64 ", pread, reqprio=22, fildes=0, " + "buf=%p, nbytes=%u, offset=%" PRI__d64 "}" + "]) = %s\n", + *ctx, nr, + cb[0].aio_data, data0, sizeof_data0, cb[0].aio_offset, + cb[1].aio_data, data1, sizeof_data1, cb[1].aio_offset, + sprintrc(rc)); + + rc = syscall(__NR_io_getevents, bogus_ctx, + (long) 0xca7faceddeadf00dLL, (long) 0xba5e1e505ca571e0LL, + ev + 1, NULL); + printf("io_getevents(%#lx, %ld, %ld, %p, NULL) = %s\n", + bogus_ctx, (long) 0xca7faceddeadf00dLL, + (long) 0xba5e1e505ca571e0LL, ev + 1, sprintrc(rc)); + + rc = syscall(__NR_io_getevents, bogus_ctx, + (long) 0xca7faceddeadf00dLL, (long) 0xba5e1e505ca571e0LL, + NULL, ts + 1); + printf("io_getevents(%#lx, %ld, %ld, NULL, %p) = %s\n", + bogus_ctx, (long) 0xca7faceddeadf00dLL, + (long) 0xba5e1e505ca571e0LL, ts + 1, sprintrc(rc)); + + rc = syscall(__NR_io_getevents, *ctx, nr, nr + 1, ev, ts); + printf("io_getevents(%#lx, %ld, %ld, [" + "{data=%#" PRI__x64 ", obj=%p, res=%u, res2=0}, " + "{data=%#" PRI__x64 ", obj=%p, res=%u, res2=0}" + "], {tv_sec=0, tv_nsec=123456789}) = %s\n", + *ctx, (long) nr, (long) (nr + 1), + cb[0].aio_data, &cb[0], sizeof_data0, + cb[1].aio_data, &cb[1], sizeof_data1, + sprintrc(rc)); + + rc = syscall(__NR_io_cancel, bogus_ctx, NULL, NULL); + printf("io_cancel(%#lx, NULL, NULL) = %s\n", bogus_ctx, sprintrc(rc)); + + rc = syscall(__NR_io_cancel, *ctx, cbc + 1, ev); + printf("io_cancel(%#lx, %p, %p) = %s\n", *ctx, cbc + 1, ev, + sprintrc(rc)); + + rc = syscall(__NR_io_cancel, *ctx, cbc, ev); + printf("io_cancel(%#lx, {data=%#" PRI__x64 + ", pread, reqprio=99, fildes=-42}, %p) = %s\n", + *ctx, cbc->aio_data, ev, sprintrc(rc)); + + rc = syscall(__NR_io_submit, (unsigned long) 0xfacef157beeff00dULL, + (long) 0xdeadc0defacefeedLL, NULL); + printf("io_submit(%#lx, %ld, NULL) = %s\n", + (long) 0xfacef157beeff00dULL, + (long) 0xdeadc0defacefeedLL, sprintrc(rc)); + + rc = syscall(__NR_io_submit, *ctx, -1L, cbvs + nr); + printf("io_submit(%#lx, %ld, %p) = %s\n", + *ctx, -1L, cbvs + nr, sprintrc(rc)); + + rc = syscall(__NR_io_submit, *ctx, 1057L, cbvs2); + printf("io_submit(%#lx, %ld, [" + "{data=%#" PRI__x64 ", key=%u, %hu /* SUB_??? */, fildes=%d}, " + "{key=%u, pwrite, reqprio=%hd, fildes=%d, str=NULL" + ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 +# ifdef IOCB_FLAG_RESFD + ", resfd=%d, flags=%#x" +# endif + "}, " + "{key=%u, pwrite, reqprio=%hd, fildes=%d, buf=%#" PRI__x64 + ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 "}, " + "{key=%u, pwrite, reqprio=%hd, fildes=%d" + ", str=\"\\0\\1\\2\\3%.28s\"..." + ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 "}, " + "{key=%u, pwritev, reqprio=%hd, fildes=%d, buf=%#" PRI__x64 + ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 "}" + ", {NULL}, {%#lx}, %p]) = %s\n", + *ctx, 1057L, + cbv2[0].aio_data, cbv2[0].aio_key, + cbv2[0].aio_lio_opcode, cbv2[0].aio_fildes, + cbv2[1].aio_key, cbv2[1].aio_reqprio, cbv2[1].aio_fildes, + cbv2[1].aio_nbytes, cbv2[1].aio_offset, +# ifdef IOCB_FLAG_RESFD + cbv2[1].aio_resfd, cbv2[1].aio_flags, +# endif + cbv2[2].aio_key, cbv2[2].aio_reqprio, cbv2[2].aio_fildes, + cbv2[2].aio_buf, cbv2[2].aio_nbytes, cbv2[2].aio_offset, + cbv2[3].aio_key, cbv2[3].aio_reqprio, cbv2[3].aio_fildes, + data2 + 4, cbv2[3].aio_nbytes, cbv2[3].aio_offset, + cbv2[4].aio_key, cbv2[4].aio_reqprio, cbv2[4].aio_fildes, + cbv2[4].aio_buf, cbv2[4].aio_nbytes, cbv2[4].aio_offset, + cbvs2[6], cbvs2 + 7, sprintrc(rc)); + + rc = syscall(__NR_io_submit, *ctx, nr, cbvs); + if (rc != (long) nr) + perror_msg_and_skip("io_submit"); + printf("io_submit(%#lx, %u, [" + "{data=%#" PRI__x64 ", preadv, reqprio=%hd, fildes=0, " + "iovec=[{iov_base=%p, iov_len=%u}" + ", {iov_base=%p, iov_len=%u}], offset=%" PRI__d64 "}, " + "{data=%#" PRI__x64 ", preadv, reqprio=%hd, fildes=0, " + "iovec=[{iov_base=%p, iov_len=%u}" + ", {iov_base=%p, iov_len=%u}], offset=%" PRI__d64 "}" + "]) = %s\n", + *ctx, nr, + cbv[0].aio_data, cbv[0].aio_reqprio, + iov0[0].iov_base, (unsigned int) iov0[0].iov_len, + iov0[1].iov_base, (unsigned int) iov0[1].iov_len, + cbv[0].aio_offset, + cbv[1].aio_data, cbv[1].aio_reqprio, + iov1[0].iov_base, (unsigned int) iov1[0].iov_len, + iov1[1].iov_base, (unsigned int) iov1[1].iov_len, + cbv[1].aio_offset, + sprintrc(rc)); + + rc = syscall(__NR_io_destroy, bogus_ctx); + printf("io_destroy(%#lx) = %s\n", + bogus_ctx, sprintrc(rc)); + + rc = syscall(__NR_io_destroy, *ctx); + printf("io_destroy(%#lx) = %s\n", *ctx, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_io_*") + +#endif diff --git a/tests-m32/aio.test b/tests-m32/aio.test new file mode 100755 index 000000000..2ba90da8d --- /dev/null +++ b/tests-m32/aio.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check io_* syscalls decoding. + +. "${srcdir=.}/init.sh" + +syscalls=io_setup,io_submit,io_getevents,io_cancel,io_destroy +run_strace_match_diff -a14 -e trace=$syscalls diff --git a/tests-m32/alarm.c b/tests-m32/alarm.c new file mode 100644 index 000000000..291b26ad9 --- /dev/null +++ b/tests-m32/alarm.c @@ -0,0 +1,52 @@ +/* + * This file is part of alarm strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_alarm + +# include +# include + +int +main(void) +{ + int rc = syscall(__NR_alarm, (unsigned long) 0xffffffff0000002aULL); + printf("alarm(%u) = %d\n", 42, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_alarm") + +#endif diff --git a/tests-m32/alarm.test b/tests-m32/alarm.test new file mode 100755 index 000000000..267b22393 --- /dev/null +++ b/tests-m32/alarm.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check alarm syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-m32/answer.c b/tests-m32/answer.c new file mode 100644 index 000000000..ae3059a48 --- /dev/null +++ b/tests-m32/answer.c @@ -0,0 +1,44 @@ +/* + * Check decoding of fault injected exit_group syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + static const kernel_ulong_t answer = + (kernel_ulong_t) 0xbadc0ded0000002aULL; + + syscall(__NR_exit_group, answer); + syscall(__NR_exit, answer); + + return 1; +} diff --git a/tests-m32/attach-f-p-cmd.c b/tests-m32/attach-f-p-cmd.c new file mode 100644 index 000000000..77594bebb --- /dev/null +++ b/tests-m32/attach-f-p-cmd.c @@ -0,0 +1,46 @@ +/* + * This file is part of attach-f-p strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + static const char dir[] = "attach-f-p.test cmd"; + pid_t pid = getpid(); + int rc = chdir(dir); + + printf("%-5d chdir(\"%s\") = %s\n" + "%-5d +++ exited with 0 +++\n", + pid, dir, sprintrc(rc), pid); + + return 0; +} diff --git a/tests-m32/attach-f-p.c b/tests-m32/attach-f-p.c new file mode 100644 index 000000000..3f9a7e3e0 --- /dev/null +++ b/tests-m32/attach-f-p.c @@ -0,0 +1,124 @@ +/* + * This file is part of attach-f-p strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#define N 3 + +typedef union { + void *ptr; + pid_t pid; +} retval_t; + +static const char text_parent[] = "attach-f-p.test parent"; +static const char *child[N] = { + "attach-f-p.test child 0", + "attach-f-p.test child 1", + "attach-f-p.test child 2" +}; +typedef int pipefd[2]; +static pipefd pipes[N]; + +static void * +thread(void *a) +{ + unsigned int no = (long) a; + int i; + + if (read(pipes[no][0], &i, sizeof(i)) != (int) sizeof(i)) + perror_msg_and_fail("read[%u]", no); + assert(chdir(child[no]) == -1); + retval_t retval = { .pid = syscall(__NR_gettid) }; + return retval.ptr; +} + +int +main(void) +{ + pthread_t t[N]; + unsigned int i; + + if (write(1, "", 0) != 0) + perror_msg_and_fail("write"); + + for (i = 0; i < N; ++i) { + if (pipe(pipes[i])) + perror_msg_and_fail("pipe"); + + errno = pthread_create(&t[i], NULL, thread, (void *) (long) i); + if (errno) + perror_msg_and_fail("pthread_create"); + } + + if (write(1, "\n", 1) != 1) + perror_msg_and_fail("write"); + + /* wait for the peer to write to stdout */ + struct stat st; + for (;;) { + if (fstat(1, &st)) + perror_msg_and_fail("fstat"); + if (st.st_size >= 103) + break; + } + + for (i = 0; i < N; ++i) { + /* sleep a bit to let the tracer catch up */ + sleep(1); + if (write(pipes[i][1], &i, sizeof(i)) != (int) sizeof(i)) + perror_msg_and_fail("write[%u]", i); + retval_t retval; + errno = pthread_join(t[i], &retval.ptr); + if (errno) + perror_msg_and_fail("pthread_join"); + errno = ENOENT; + printf("%-5d chdir(\"%s\") = %s\n" + "%-5d +++ exited with 0 +++\n", + retval.pid, child[i], sprintrc(-1), retval.pid); + } + + /* sleep a bit more to let the tracer catch up */ + sleep(1); + + pid_t pid = getpid(); + assert(chdir(text_parent) == -1); + + printf("%-5d chdir(\"%s\") = -1 ENOENT (%m)\n" + "%-5d +++ exited with 0 +++\n", pid, text_parent, pid); + + return 0; +} diff --git a/tests-m32/attach-f-p.test b/tests-m32/attach-f-p.test new file mode 100755 index 000000000..f41707409 --- /dev/null +++ b/tests-m32/attach-f-p.test @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Check that -f -p attaches to threads properly. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -f -p is implemented using /proc/$pid/task/ +[ -d /proc/self/task/ ] || + framework_skip_ '/proc/self/task/ is not available' +run_prog_skip_if_failed \ + kill -0 $$ +run_prog ./attach-f-p-cmd > /dev/null + +rm -f "$OUT" +./set_ptracer_any sh -c "exec ./attach-f-p >> $OUT" > /dev/null & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sh failed' +done + +run_strace -a32 -f -echdir -p $tracee_pid ./attach-f-p-cmd > "$OUT" +match_diff "$LOG" "$OUT" +rm -f "$OUT" diff --git a/tests-m32/attach-p-cmd-cmd.c b/tests-m32/attach-p-cmd-cmd.c new file mode 100644 index 000000000..d0f824e95 --- /dev/null +++ b/tests-m32/attach-p-cmd-cmd.c @@ -0,0 +1,55 @@ +/* + * This file is part of attach-p-cmd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +int +main(void) +{ + static const char lockdir[] = "attach-p-cmd.test-lock"; + /* wait for the lock directory to be created by peer */ + while (rmdir(lockdir)) { + if (ENOENT != errno) + perror_msg_and_fail("rmdir: %s", lockdir); + } + + static const char dir[] = "attach-p-cmd.test cmd"; + pid_t pid = getpid(); + int rc = chdir(dir); + + printf("%-5d chdir(\"%s\") = %s\n" + "%-5d +++ exited with 0 +++\n", + pid, dir, sprintrc(rc), pid); + + return 0; +} diff --git a/tests-m32/attach-p-cmd-p.c b/tests-m32/attach-p-cmd-p.c new file mode 100644 index 000000000..254d19ae0 --- /dev/null +++ b/tests-m32/attach-p-cmd-p.c @@ -0,0 +1,83 @@ +/* + * This file is part of attach-p-cmd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static void +handler(int signo) +{ +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask = {}; + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + static const char lockdir[] = "attach-p-cmd.test-lock"; + /* create a lock directory */ + if (mkdir(lockdir, 0700)) + perror_msg_and_fail("mkdir: %s", lockdir); + + /* wait for the lock directory to be removed by peer */ + while (mkdir(lockdir, 0700)) { + if (EEXIST != errno) + perror_msg_and_fail("mkdir: %s", lockdir); + } + + /* remove the lock directory */ + if (rmdir(lockdir)) + perror_msg_and_fail("rmdir: %s", lockdir); + + alarm(1); + pause(); + + static const char dir[] = "attach-p-cmd.test -p"; + pid_t pid = getpid(); + int rc = chdir(dir); + + printf("%-5d --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---\n" + "%-5d chdir(\"%s\") = %d %s (%m)\n" + "%-5d +++ exited with 0 +++\n", + pid, pid, dir, rc, errno2name(), pid); + + return 0; +} diff --git a/tests-m32/attach-p-cmd.test b/tests-m32/attach-p-cmd.test new file mode 100755 index 000000000..2068cf1d2 --- /dev/null +++ b/tests-m32/attach-p-cmd.test @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Check that simultaneous use of -p option and tracing of a command works. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +rm -rf attach-p-cmd.test-lock +rm -f "$OUT" +./set_ptracer_any ./attach-p-cmd-p >> "$OUT" & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any ./attach-p-cmd-p failed' +done + +run_strace -a30 -echdir -p $tracee_pid ./attach-p-cmd-cmd > "$OUT" +match_diff "$LOG" "$OUT" +rm -f "$OUT" diff --git a/tests-m32/bexecve.test b/tests-m32/bexecve.test new file mode 100755 index 000000000..f1ab04f1f --- /dev/null +++ b/tests-m32/bexecve.test @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Check -bexecve behavior. +# +# Copyright (c) 2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_strace_redir() +{ + args="$*" + $STRACE "$@" 2> "$LOG" +} + +run_strace_redir -enone ./set_ptracer_any true || + dump_log_and_fail_with "$STRACE $args: unexpected exit status" + +run_strace_redir -enone ./set_ptracer_any false +[ $? -eq 1 ] || + dump_log_and_fail_with "$STRACE $args: unexpected exit status" + +run_strace_redir -bexecve -enone ./set_ptracer_any false || + dump_log_and_fail_with "$STRACE $args: unexpected exit status" + +pattern_detached='[^:]*strace: Process [1-9][0-9]* detached' +pattern_personality='[^:]*strace: \[ Process PID=[1-9][0-9]* runs in .* mode. \]' + +LC_ALL=C grep -x "$pattern_detached" "$LOG" > /dev/null || + dump_log_and_fail_with "$STRACE $args: output mismatch" + +if LC_ALL=C grep -E -v -x "($pattern_detached|$pattern_personality)" "$LOG" > /dev/null; then + dump_log_and_fail_with "$STRACE $args: unexpected output" +fi + +exit 0 diff --git a/tests-m32/bpf.c b/tests-m32/bpf.c new file mode 100644 index 000000000..7ef16c9f2 --- /dev/null +++ b/tests-m32/bpf.c @@ -0,0 +1,234 @@ +/* + * Copyright (c) 2015-2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined HAVE_UNION_BPF_ATTR_LOG_BUF && defined __NR_bpf +# include +# include +# include +# include + +static const struct bpf_insn insns[] = { + { .code = BPF_JMP | BPF_EXIT } +}; + +static const char *errstr; +static char log_buf[4096]; + +static long +sys_bpf(kernel_ulong_t cmd, kernel_ulong_t attr, kernel_ulong_t size) +{ + long rc = syscall(__NR_bpf, cmd, attr, size); + errstr = sprintrc(rc); + return rc; +} + +static int +map_create(void) +{ + union bpf_attr attr = { + .key_size = 4, + .value_size = 8, + .max_entries = 256 + }; + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(BPF_MAP_CREATE, (unsigned long) t_attr, sizeof(attr)); +} + +static int +map_any(int cmd) +{ + union bpf_attr attr = { + .map_fd = -1, + .key = 0xdeadbeef, + .value = 0xbadc0ded + }; + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(cmd, (unsigned long) t_attr, sizeof(attr)); +} + +static int +prog_load(void) +{ + union bpf_attr attr = { + .insn_cnt = sizeof(insns) / sizeof(insns[0]), + .insns = (unsigned long) insns, + .license = (unsigned long) "GPL", + .log_level = 42, + .log_size = sizeof(log_buf), + .log_buf = (unsigned long) log_buf + }; + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(BPF_PROG_LOAD, (unsigned long) t_attr, sizeof(attr)); +} + +/* + * bpf() syscall and its first six commands were introduced in Linux kernel + * 3.18. Some additional commands were added afterwards, so we need to take + * precautions to make sure the tests compile. + * + * BPF_OBJ_PIN and BPF_OBJ_GET commands appear in kernel 4.4. + */ +# ifdef HAVE_UNION_BPF_ATTR_BPF_FD +static int +obj_manage(int cmd) +{ + union bpf_attr attr = { + .pathname = (unsigned long) "/sys/fs/bpf/foo/bar", + .bpf_fd = -1 + }; + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(cmd, (unsigned long) t_attr, sizeof(attr)); +} +# endif + +/* BPF_PROG_ATTACH and BPF_PROG_DETACH commands appear in kernel 4.10. */ +# ifdef HAVE_UNION_BPF_ATTR_ATTACH_TYPE +static int +prog_cgroup(int cmd) +{ + union bpf_attr attr = { + .target_fd = -1, + .attach_bpf_fd = -1, + .attach_type = 0 + }; + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(cmd, (unsigned long) t_attr, sizeof(attr)); +} +# endif + +static unsigned long efault; + +static void +bogus_bpf(int cmd, const char *name) +{ + const unsigned long bogus_size = 1024; + const unsigned long bogus_addr = efault - bogus_size; + + sys_bpf(cmd, efault, 4); + printf("bpf(%s, %#lx, %lu) = %s\n", + name, efault, 4UL, errstr); + + sys_bpf(cmd, efault, bogus_size); + printf("bpf(%s, %#lx, %lu) = %s\n", + name, efault, bogus_size, errstr); + + sys_bpf(cmd, bogus_addr, 0); + printf("bpf(%s, %#lx, %lu) = %s\n", + name, bogus_addr, 0UL, errstr); +} + +#define BOGUS_BPF(cmd) bogus_bpf(cmd, #cmd) + +int +main(void) +{ + efault = (unsigned long) tail_alloc(1) + 1; + + map_create(); + printf("bpf(BPF_MAP_CREATE" + ", {map_type=BPF_MAP_TYPE_UNSPEC, key_size=4" + ", value_size=8, max_entries=256}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_CREATE); + + map_any(BPF_MAP_LOOKUP_ELEM); + printf("bpf(BPF_MAP_LOOKUP_ELEM" + ", {map_fd=-1, key=0xdeadbeef}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_LOOKUP_ELEM); + + map_any(BPF_MAP_UPDATE_ELEM); + printf("bpf(BPF_MAP_UPDATE_ELEM" + ", {map_fd=-1, key=0xdeadbeef" + ", value=0xbadc0ded, flags=BPF_ANY}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_UPDATE_ELEM); + + map_any(BPF_MAP_DELETE_ELEM); + printf("bpf(BPF_MAP_DELETE_ELEM" + ", {map_fd=-1, key=0xdeadbeef}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_DELETE_ELEM); + + map_any(BPF_MAP_GET_NEXT_KEY); + printf("bpf(BPF_MAP_GET_NEXT_KEY" + ", {map_fd=-1, key=0xdeadbeef}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_GET_NEXT_KEY); + + prog_load(); + printf("bpf(BPF_PROG_LOAD" + ", {prog_type=BPF_PROG_TYPE_UNSPEC, insn_cnt=1, insns=%p" + ", license=\"GPL\", log_level=42, log_size=4096, log_buf=%p" + ", kern_version=0}, %u) = %s\n", + insns, log_buf, (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_PROG_LOAD); + +# ifdef HAVE_UNION_BPF_ATTR_BPF_FD + obj_manage(BPF_OBJ_PIN); + printf("bpf(BPF_OBJ_PIN" + ", {pathname=\"/sys/fs/bpf/foo/bar\", bpf_fd=-1}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_OBJ_PIN); + + obj_manage(BPF_OBJ_GET); + printf("bpf(BPF_OBJ_GET" + ", {pathname=\"/sys/fs/bpf/foo/bar\", bpf_fd=-1}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_OBJ_GET); +# endif + +# ifdef HAVE_UNION_BPF_ATTR_ATTACH_TYPE + prog_cgroup(BPF_PROG_ATTACH); + printf("bpf(BPF_PROG_ATTACH" + ", {target_fd=-1, attach_bpf_fd=-1" + ", attach_type=BPF_CGROUP_INET_INGRESS}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_PROG_ATTACH); + + prog_cgroup(BPF_PROG_DETACH); + printf("bpf(BPF_PROG_DETACH" + ", {target_fd=-1, attach_type=BPF_CGROUP_INET_INGRESS}, %u)" + " = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_PROG_DETACH); +# endif + + bogus_bpf(0xfacefeed, "0xfacefeed /* BPF_??? */"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_bpf") + +#endif diff --git a/tests-m32/bpf.test b/tests-m32/bpf.test new file mode 100755 index 000000000..adf0d576c --- /dev/null +++ b/tests-m32/bpf.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check bpf syscall decoding. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a20 diff --git a/tests-m32/brk.c b/tests-m32/brk.c new file mode 100644 index 000000000..572ebd61f --- /dev/null +++ b/tests-m32/brk.c @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_brk + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_brk, NULL); + printf("brk\\(NULL\\) = %#lx\n", rc); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_brk") + +#endif diff --git a/tests-m32/brk.test b/tests-m32/brk.test new file mode 100755 index 000000000..8c0e2e49b --- /dev/null +++ b/tests-m32/brk.test @@ -0,0 +1,10 @@ +#!/bin/sh + +# Check brk syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a10 -ebrk $args > "$EXP" +match_grep "$LOG" "$EXP" +rm -f "$EXP" diff --git a/tests-m32/btrfs-v.test b/tests-m32/btrfs-v.test new file mode 100755 index 000000000..1ee17b4b0 --- /dev/null +++ b/tests-m32/btrfs-v.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check verbose decoding of btrfs ioctl + +. "${srcdir=.}/init.sh" + +run_prog ./btrfs -v > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-m32/btrfs-vw.test b/tests-m32/btrfs-vw.test new file mode 100755 index 000000000..c7e40ad71 --- /dev/null +++ b/tests-m32/btrfs-vw.test @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check verbose decoding of btrfs ioctl w/ live ioctls. + +# WARNING: USE OF THIS TEST WILL MODIFY AN EXISTING BTRFS FILE SYSTEM + +# Typical usage: +# mkfs.btrfs +# mount /mnt +# BTRFS_MOUNTPOINT=/mnt make check TESTS="btrfs-vw" +# umount /mnt + +. "${srcdir=.}/init.sh" + +if [ -z "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT not set" +elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT does not point to a directory" +fi + +run_prog ./btrfs -v -w "${BTRFS_MOUNTPOINT}" > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-m32/btrfs-w.test b/tests-m32/btrfs-w.test new file mode 100755 index 000000000..6238dca80 --- /dev/null +++ b/tests-m32/btrfs-w.test @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check decoding of btrfs ioctl w/ live ioctls. + +# WARNING: USE OF THIS TEST WILL MODIFY AN EXISTING BTRFS FILE SYSTEM + +# Typical usage: +# mkfs.btrfs +# mount /mnt +# BTRFS_MOUNTPOINT=/mnt make check TESTS="btrfs-w" +# umount /mnt + +. "${srcdir=.}/init.sh" + +if [ -z "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT not set" +elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT does not point to a directory" +fi + +run_prog ./btrfs -w "${BTRFS_MOUNTPOINT}" > /dev/null +run_strace -a16 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-m32/btrfs.c b/tests-m32/btrfs.c new file mode 100644 index 000000000..b3e23f80c --- /dev/null +++ b/tests-m32/btrfs.c @@ -0,0 +1,1932 @@ +#include "tests.h" + +#ifdef HAVE_LINUX_BTRFS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "xlat.h" + +#include "xlat/btrfs_balance_args.h" +#include "xlat/btrfs_balance_flags.h" +#include "xlat/btrfs_balance_state.h" +#include "xlat/btrfs_compress_types.h" +#include "xlat/btrfs_defrag_flags.h" +#include "xlat/btrfs_dev_stats_values.h" +#include "xlat/btrfs_dev_stats_flags.h" +#include "xlat/btrfs_qgroup_inherit_flags.h" +#include "xlat/btrfs_qgroup_limit_flags.h" +#include "xlat/btrfs_scrub_flags.h" +#include "xlat/btrfs_send_flags.h" +#include "xlat/btrfs_space_info_flags.h" +#include "xlat/btrfs_snap_flags_v2.h" +#include "xlat/btrfs_tree_objectids.h" +#include "xlat/btrfs_features_compat.h" +#include "xlat/btrfs_features_compat_ro.h" +#include "xlat/btrfs_features_incompat.h" +#include "xlat/btrfs_key_types.h" + +#ifdef HAVE_LINUX_FIEMAP_H +# include +# include "xlat/fiemap_flags.h" +# include "xlat/fiemap_extent_flags.h" +#endif + +#ifndef BTRFS_LABEL_SIZE +# define BTRFS_LABEL_SIZE 256 +#endif + +#ifndef BTRFS_NAME_LEN +# define BTRFS_NAME_LEN 255 +#endif + +/* + * Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in + * its definition, which isn't exported by the kernel. + */ +typedef __u64 u64; + +static const char *btrfs_test_root; +static int btrfs_test_dir_fd; +static bool verbose = false; +static bool write_ok = false; + +const unsigned char uuid_reference[BTRFS_UUID_SIZE] = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, +}; + +const char uuid_reference_string[] = "01234567-89ab-cdef-fedc-ba9876543210"; + +#ifndef BTRFS_IOC_QUOTA_RESCAN +struct btrfs_ioctl_quota_rescan_args { + uint64_t flags, progress, reserved[6]; +}; +# define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \ + struct btrfs_ioctl_quota_rescan_args) +# define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \ + struct btrfs_ioctl_quota_rescan_args) +#endif + +#ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT +# define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46) +#endif + +#ifndef BTRFS_IOC_GET_FEATURES +# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags) +# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags[2]) +# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags[3]) +#endif + +#ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS +struct btrfs_ioctl_feature_flags { + uint64_t compat_flags; + uint64_t compat_ro_flags; + uint64_t incompat_flags; +}; +#endif + +#ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START +struct btrfs_ioctl_defrag_range_args { + uint64_t start; + uint64_t len; + uint64_t flags; + uint32_t extent_thresh; + uint32_t compress_type; + uint32_t unused[4]; +}; +#endif + +#ifndef FIDEDUPERANGE +# define FIDEDUPERANGE _IOWR(0x94, 54, struct file_dedupe_range) +struct file_dedupe_range_info { + int64_t dest_fd; /* in - destination file */ + uint64_t dest_offset; /* in - start of extent in destination */ + uint64_t bytes_deduped; /* out - total # of bytes we were able + * to dedupe from this file. */ + /* status of this dedupe operation: + * < 0 for error + * == FILE_DEDUPE_RANGE_SAME if dedupe succeeds + * == FILE_DEDUPE_RANGE_DIFFERS if data differs + */ + int32_t status; /* out - see above description */ + uint32_t reserved; /* must be zero */ +}; + +struct file_dedupe_range { + uint64_t src_offset; /* in - start of extent in source */ + uint64_t src_length; /* in - length of extent */ + uint16_t dest_count; /* in - total elements in info array */ + uint16_t reserved1; /* must be zero */ + uint32_t reserved2; /* must be zero */ + struct file_dedupe_range_info info[0]; +}; +#endif + +#ifndef BTRFS_IOC_TREE_SEARCH_V2 +# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \ + struct btrfs_ioctl_search_args_v2) +struct btrfs_ioctl_search_args_v2 { + struct btrfs_ioctl_search_key key; /* in/out - search parameters */ + uint64_t buf_size; /* in - size of buffer + * out - on EOVERFLOW: needed size + * to store item */ + uint64_t buf[0]; /* out - found items */ +}; +#endif + + +static const char * +maybe_print_uint64max(uint64_t val) +{ + if (val == UINT64_MAX) + return " /* UINT64_MAX */"; + return ""; +} + +/* takes highest valid flag bit */ +static uint64_t +max_flags_plus_one(int bit) +{ + int i; + uint64_t val = 0; + if (bit == -1) + return 1; + for (i = 0; i <= bit + 1 && i < 64; i++) + val |= (1ULL << i); + return val; +} + +/* + * Consumes no arguments, returns nothing: + * + * - BTRFS_IOC_TRANS_START + * - BTRFS_IOC_TRANS_END + */ +static void +btrfs_test_trans_ioctls(void) +{ + ioctl(-1, BTRFS_IOC_TRANS_START, NULL); + printf("ioctl(-1, BTRFS_IOC_TRANS_START) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_TRANS_END, NULL); + printf("ioctl(-1, BTRFS_IOC_TRANS_END) = -1 EBADF (%m)\n"); +} + +/* + * Consumes no arguments, returns nothing: + * - BTRFS_IOC_SYNC + * + * Consumes argument, returns nothing + * - BTRFS_IOC_WAIT_SYNC + */ +static void +btrfs_test_sync_ioctls(void) +{ + uint64_t u64val = 0xdeadbeefbadc0dedULL; + + ioctl(-1, BTRFS_IOC_SYNC, NULL); + printf("ioctl(-1, BTRFS_IOC_SYNC) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_WAIT_SYNC, NULL); + printf("ioctl(-1, BTRFS_IOC_WAIT_SYNC, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_WAIT_SYNC, &u64val); + printf("ioctl(-1, BTRFS_IOC_WAIT_SYNC, [%" PRIu64 + "]) = -1 EBADF (%m)\n", u64val); + + /* + * The live test of BTRFS_IOC_SYNC happens as a part of the test + * for BTRFS_IOC_LOGICAL_INO + */ +} + +static void +btrfs_print_qgroup_inherit(struct btrfs_qgroup_inherit *inherit) +{ + printf("{flags="); + printflags(btrfs_qgroup_inherit_flags, inherit->flags, + "BTRFS_QGROUP_INHERIT_???"); + printf(", num_qgroups=%" PRI__u64 + ", num_ref_copies=%" PRI__u64 + ", num_excl_copies=%" PRI__u64", lim={flags=", + inherit->num_qgroups, inherit->num_ref_copies, + inherit->num_excl_copies); + printflags(btrfs_qgroup_limit_flags, + inherit->lim.flags, + "BTRFS_QGROUP_LIMIT_???"); + printf(", max_rfer=%" PRI__u64 ", max_excl=%" PRI__u64 + ", rsv_rfer=%" PRI__u64 ", rsv_excl=%" PRI__u64 + "}, qgroups=", + inherit->lim.max_rfer, inherit->lim.max_excl, + inherit->lim.rsv_rfer, inherit->lim.rsv_excl); + if (verbose) { + unsigned int i; + printf("["); + for (i = 0; i < inherit->num_qgroups; i++) { + if (i > 0) + printf(", "); + printf("%" PRI__u64, inherit->qgroups[i]); + } + printf("]"); + } else + printf("..."); + printf("}"); +} + + +static void +btrfs_print_vol_args_v2(struct btrfs_ioctl_vol_args_v2 *args, int print_qgroups) +{ + printf("{fd=%d, flags=", (int) args->fd); + printflags(btrfs_snap_flags_v2, args->flags, "BTRFS_SUBVOL_???"); + + if (args->flags & BTRFS_SUBVOL_QGROUP_INHERIT) { + printf(", size=%" PRI__u64 ", qgroup_inherit=", args->size); + if (args->qgroup_inherit && print_qgroups) + btrfs_print_qgroup_inherit(args->qgroup_inherit); + else if (args->qgroup_inherit) + printf("%p", args->qgroup_inherit); + else + printf("NULL"); + } + printf(", name=\"%s\"}", args->name); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SNAP_CREATE + * - BTRFS_IOC_SUBVOL_CREATE + * - BTRFS_IOC_SNAP_DESTROY + * - BTRFS_IOC_DEFAULT_SUBVOL + * + * Consumes argument, returns u64: + * - BTRFS_IOC_SNAP_CREATE_V2 + * - BTRFS_IOC_SUBVOL_CREATE_V2 + */ + +static void +btrfs_test_subvol_ioctls(void) +{ + const char *subvol_name = "subvol-name"; + char *long_subvol_name; + void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeedULL; + uint64_t u64val = 0xdeadbeefbadc0dedULL; + struct btrfs_ioctl_vol_args vol_args = {}; + struct btrfs_ioctl_vol_args_v2 vol_args_v2 = { + .fd = 2, + .flags = max_flags_plus_one(2), + }; + + long_subvol_name = malloc(BTRFS_PATH_NAME_MAX); + if (!long_subvol_name) + perror_msg_and_fail("malloc failed"); + memset(long_subvol_name, 'f', BTRFS_PATH_NAME_MAX); + long_subvol_name[BTRFS_PATH_NAME_MAX - 1] = '\0'; + + strcpy(vol_args.name, subvol_name); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE, NULL); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE, " + "{fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, " + "{fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_DESTROY," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + strncpy(vol_args.name, long_subvol_name, BTRFS_PATH_NAME_MAX); + ioctl(-1, BTRFS_IOC_SNAP_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_DESTROY," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + long_subvol_name = realloc(long_subvol_name, BTRFS_SUBVOL_NAME_MAX); + if (!long_subvol_name) + perror_msg_and_fail("realloc failed"); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, NULL) = -1 EBADF (%m)\n"); + + strcpy(vol_args_v2.name, subvol_name); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + strncpy(vol_args_v2.name, long_subvol_name, BTRFS_SUBVOL_NAME_MAX); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + strcpy(vol_args_v2.name, subvol_name); + vol_args_v2.qgroup_inherit = bad_pointer; + + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 0); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 0); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + const unsigned int n_qgroups = 8; + unsigned int i; + struct btrfs_qgroup_inherit *inherit; + vol_args_v2.size = + sizeof(*inherit) + n_qgroups * sizeof(inherit->qgroups[0]); + inherit = tail_alloc(vol_args_v2.size); + + inherit->flags = 0x3; + inherit->num_ref_copies = 0; + inherit->num_excl_copies = 0; + inherit->num_qgroups = n_qgroups; + for (i = 0; i < n_qgroups; i++) + inherit->qgroups[i] = 1ULL << i; + inherit->lim.flags = 0x7f; + inherit->lim.max_rfer = u64val; + inherit->lim.max_excl = u64val; + inherit->lim.rsv_rfer = u64val; + inherit->lim.rsv_excl = u64val; + vol_args_v2.qgroup_inherit = inherit; + + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, &u64val); + printf("ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, [%" + PRIu64 "]) = -1 EBADF (%m)\n", u64val); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_SETFLAGS, "); + printflags(btrfs_snap_flags_v2, vol_args_v2.flags, + "BTRFS_SUBVOL_???"); + ioctl(-1, BTRFS_IOC_SUBVOL_SETFLAGS, &vol_args_v2.flags); + printf(") = -1 EBADF (%m)\n"); + + if (write_ok) { + struct btrfs_ioctl_vol_args_v2 args_passed; + /* + * Returns transid if flags & BTRFS_SUBVOL_CREATE_ASYNC + * - BTRFS_IOC_SNAP_CREATE_V2 + * - BTRFS_IOC_SUBVOL_CREATE_V2 + */ + int subvolfd; + + strncpy(vol_args_v2.name, subvol_name, + sizeof(vol_args_v2.name)); + vol_args_v2.flags = BTRFS_SUBVOL_CREATE_ASYNC; + vol_args_v2.size = 0; + vol_args_v2.qgroup_inherit = NULL; + args_passed = vol_args_v2; + printf("ioctl(%d, BTRFS_IOC_SUBVOL_CREATE_V2, ", + btrfs_test_dir_fd); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SUBVOL_CREATE_V2, + &args_passed); + printf(" => {transid=%" PRI__u64"}) = 0\n", + args_passed.transid); + + subvolfd = openat(btrfs_test_dir_fd, subvol_name, + O_RDONLY|O_DIRECTORY); + if (subvolfd < 0) + perror_msg_and_fail("openat(%s) failed", subvol_name); + + strncpy(vol_args_v2.name, long_subvol_name, BTRFS_NAME_LEN); + vol_args_v2.fd = subvolfd; + args_passed = vol_args_v2; + printf("ioctl(%d, BTRFS_IOC_SNAP_CREATE_V2, ", + btrfs_test_dir_fd); + btrfs_print_vol_args_v2(&args_passed, 1); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_CREATE_V2, + &args_passed); + printf(" => {transid=%" PRI__u64"}) = 0\n", + args_passed.transid); + + /* This only works when mounted w/ -ouser_subvol_rm_allowed */ + strncpy(vol_args.name, long_subvol_name, 255); + vol_args.name[255] = 0; + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(%d, BTRFS_IOC_SNAP_DESTROY, " + "{fd=%d, name=\"%.*s\"}) = 0\n", + btrfs_test_dir_fd, (int) vol_args.fd, 255, long_subvol_name); + + strcpy(vol_args.name, subvol_name); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(%d, BTRFS_IOC_SNAP_DESTROY, " + "{fd=%d, name=\"%s\"}) = 0\n", + btrfs_test_dir_fd, (int) vol_args.fd, subvol_name); + + close(subvolfd); + } + free(long_subvol_name); +} + +static void +btrfs_print_balance_args(struct btrfs_balance_args *args) +{ + printf("{profiles="); + printflags(btrfs_space_info_flags, args->profiles, + "BTRFS_BLOCK_GROUP_???"); + printf(", usage=%"PRI__u64 "%s, devid=%"PRI__u64 "%s, pstart=%"PRI__u64 + "%s, pend=%"PRI__u64 "%s, vstart=%"PRI__u64 "%s, vend=%"PRI__u64 + "%s, target=%"PRI__u64 "%s, flags=", + args->usage, maybe_print_uint64max(args->usage), + args->devid, maybe_print_uint64max(args->devid), + args->pstart, maybe_print_uint64max(args->pstart), + args->pend, maybe_print_uint64max(args->pend), + args->vstart, maybe_print_uint64max(args->vstart), + args->vend, maybe_print_uint64max(args->vend), + args->target, maybe_print_uint64max(args->target)); + printflags(btrfs_balance_args, args->flags, "BTRFS_BALANCE_ARGS_???"); + printf("}"); +} + +/* + * Accepts argument, returns nothing + * - BTRFS_IOC_BALANCE + * - BTRFS_IOC_BALANCE_CTL + * + * Accepts argument, returns argument + * - BTRFS_IOC_BALANCE_V2 + */ +static void +btrfs_test_balance_ioctls(void) +{ + struct btrfs_ioctl_balance_args args = { + .flags = 0x3f, + .data = { + .profiles = 0x7, + .flags = 0x7, + .devid = 1, + .pend = -1ULL, + .vend = -1ULL, + }, + + .meta = { + .profiles = 0x38, + .flags = 0x38, + .devid = 1, + }, + + .sys = { + .profiles = 0x1c0 | (1ULL << 48), + .flags = 0x4c0, + .devid = 1, + }, + }; + struct btrfs_ioctl_vol_args vol_args = {}; + + ioctl(-1, BTRFS_IOC_BALANCE_CTL, 1); + printf("ioctl(-1, BTRFS_IOC_BALANCE_CTL, " + "BTRFS_BALANCE_CTL_PAUSE) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE_CTL, 2); + printf("ioctl(-1, BTRFS_IOC_BALANCE_CTL, " + "BTRFS_BALANCE_CTL_CANCEL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE, NULL); + printf("ioctl(-1, BTRFS_IOC_BALANCE) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_BALANCE) = -1 EBADF (%m)\n"); + + /* struct btrfs_ioctl_balance_args */ + ioctl(-1, BTRFS_IOC_BALANCE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_BALANCE_V2, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_BALANCE_V2, {flags="); + printflags(btrfs_balance_flags, args.flags, "BTRFS_BALANCE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + ioctl(-1, BTRFS_IOC_BALANCE_V2, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + args.flags = BTRFS_BALANCE_DATA | BTRFS_BALANCE_METADATA | + BTRFS_BALANCE_SYSTEM; + args.data.flags = 0; + args.data.profiles = 0; + args.meta.flags = 0; + args.meta.profiles = 0; + args.sys.flags = 0; + args.sys.profiles = 0; + printf("ioctl(%d, BTRFS_IOC_BALANCE_V2, {flags=", + btrfs_test_dir_fd); + + printflags(btrfs_balance_flags, args.flags, + "BTRFS_BALANCE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_BALANCE_V2, &args); + printf("} => {flags="); + printflags(btrfs_balance_flags, args.flags, + "BTRFS_BALANCE_???"); + printf(", state="); + printflags(btrfs_balance_state, args.state, + "BTRFS_BALANCE_STATE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + printf("}) = 0\n"); + } +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_RESIZE + * + * Requires /dev/btrfs-control, consumes argument, returns nothing: + * - BTRFS_IOC_SCAN_DEV + * - BTRFS_IOC_DEVICES_READY + * + */ +static void +btrfs_test_device_ioctls(void) +{ + const char *devid = "1"; + const char *devname = "/dev/sda1"; + struct btrfs_ioctl_vol_args args = { + .fd = 2, + }; + + ioctl(-1, BTRFS_IOC_RESIZE, NULL); + printf("ioctl(-1, BTRFS_IOC_RESIZE, NULL) = -1 EBADF (%m)\n"); + + strcpy(args.name, devid); + ioctl(-1, BTRFS_IOC_RESIZE, &args); + printf("ioctl(-1, BTRFS_IOC_RESIZE, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_SCAN_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_SCAN_DEV, NULL) = -1 EBADF (%m)\n"); + + strcpy(args.name, devname); + ioctl(-1, BTRFS_IOC_SCAN_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_SCAN_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_ADD_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_ADD_DEV, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_ADD_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_ADD_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_RM_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_RM_DEV, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_RM_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_RM_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_CLONE + * - BTRFS_IOC_CLONE_RANGE + */ +static void +btrfs_test_clone_ioctls(void) +{ + int clone_fd = 4; + struct btrfs_ioctl_clone_range_args args = { + .src_fd = clone_fd, + .src_offset = 4096, + .src_length = 16384, + .dest_offset = 128 * 1024, + }; + + ioctl(-1, BTRFS_IOC_CLONE, clone_fd); + printf("ioctl(-1, BTRFS_IOC_CLONE or FICLONE, %x) = -1 EBADF (%m)\n", + clone_fd); + + ioctl(-1, BTRFS_IOC_CLONE_RANGE, NULL); + printf("ioctl(-1, BTRFS_IOC_CLONE_RANGE or FICLONERANGE, " + "NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_CLONE_RANGE, &args); + printf("ioctl(-1, BTRFS_IOC_CLONE_RANGE or FICLONERANGE, " + "{src_fd=%d, src_offset=%" PRI__u64 ", src_length=%" PRI__u64 + ", dest_offset=%" PRI__u64 "}) = -1 EBADF (%m)\n", + (int) args.src_fd, args.src_offset, args.src_length, + args.dest_offset); +} + +#define BTRFS_COMPRESS_TYPES 2 +#define BTRFS_INVALID_COMPRESS (BTRFS_COMPRESS_TYPES + 1) + +static void +btrfs_print_defrag_range_args(struct btrfs_ioctl_defrag_range_args *args) +{ + printf("{start=%" PRIu64", len=%" PRIu64 "%s, flags=", + (uint64_t) args->start, (uint64_t) args->len, + maybe_print_uint64max(args->len)); + + printflags(btrfs_defrag_flags, args->flags, "BTRFS_DEFRAG_RANGE_???"); + printf(", extent_thresh=%u, compress_type=", args->extent_thresh); + printxval(btrfs_compress_types, args->compress_type, + "BTRFS_COMPRESS_???"); + printf("}"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_DEFRAG + * - BTRFS_DEFRAG_RANGE + */ +static void +btrfs_test_defrag_ioctls(void) +{ + struct btrfs_ioctl_vol_args vol_args = {}; + struct btrfs_ioctl_defrag_range_args args = { + .start = 0, + .len = -1ULL, + .flags = max_flags_plus_one(1), + .extent_thresh = 128 * 1024, + .compress_type = 2, /* BTRFS_COMPRESS_LZO */ + }; + + /* + * These are documented as using vol_args but don't + * actually consume it. + */ + ioctl(-1, BTRFS_IOC_DEFRAG, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFRAG) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFRAG, &vol_args); + printf("ioctl(-1, BTRFS_IOC_DEFRAG) = -1 EBADF (%m)\n"); + + /* struct btrfs_ioctl_defrag_range_args */ + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); + + args.compress_type = BTRFS_INVALID_COMPRESS; + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); + + args.len--; + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); +} + +static const char * +xlookup(const struct xlat *xlat, const uint64_t val) +{ + for (; xlat->str != NULL; xlat++) + if (xlat->val == val) + return xlat->str; + return NULL; +} + +static void +btrfs_print_objectid(uint64_t objectid) +{ + const char *str = xlookup(btrfs_tree_objectids, objectid); + printf("%" PRIu64, objectid); + if (str) + printf(" /* %s */", str); +} + +static void +btrfs_print_key_type(uint32_t type) +{ + const char *str = xlookup(btrfs_key_types, type); + printf("%u", type); + if (str) + printf(" /* %s */", str); +} + +static void +btrfs_print_search_key(struct btrfs_ioctl_search_key *key) +{ + printf("key={tree_id="); + btrfs_print_objectid(key->tree_id); + if (verbose || key->min_objectid != 256) { + printf(", min_objectid="); + btrfs_print_objectid(key->min_objectid); + } + if (verbose || key->max_objectid != -256ULL) { + printf(", max_objectid="); + btrfs_print_objectid(key->max_objectid); + } + if (key->min_offset) + printf(", min_offset=%" PRI__u64 "%s", + key->min_offset, maybe_print_uint64max(key->min_offset)); + if (key->max_offset) + printf(", max_offset=%" PRI__u64 "%s", + key->max_offset, maybe_print_uint64max(key->max_offset)); + if (key->min_transid) + printf(", min_transid=%" PRI__u64"%s", key->min_transid, + maybe_print_uint64max(key->min_transid)); + if (key->max_transid) + printf(", max_transid=%" PRI__u64"%s", key->max_transid, + maybe_print_uint64max(key->max_transid)); + printf(", min_type="); + btrfs_print_key_type(key->min_type); + printf(", max_type="); + btrfs_print_key_type(key->max_type); + printf(", nr_items=%u}", key->nr_items); +} + +static void +btrfs_print_tree_search_buf(struct btrfs_ioctl_search_key *key, + void *buf, uint64_t buf_size) +{ + if (verbose) { + uint64_t i; + uint64_t off = 0; + printf("["); + for (i = 0; i < key->nr_items; i++) { + struct btrfs_ioctl_search_header *sh; + sh = (typeof(sh))(buf + off); + if (i) + printf(", "); + printf("{transid=%" PRI__u64 ", objectid=", + sh->transid); + btrfs_print_objectid(sh->objectid); + printf(", offset=%" PRI__u64 ", type=", sh->offset); + btrfs_print_key_type(sh->type); + printf(", len=%u}", sh->len); + off += sizeof(*sh) + sh->len; + } + printf("]"); + } else + printf("..."); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_TREE_SEARCH + * - BTRFS_IOC_TREE_SEARCH_V2 + */ +static void +btrfs_test_search_ioctls(void) +{ + struct btrfs_ioctl_search_key key_reference = { + .tree_id = 5, + .min_objectid = 256, + .max_objectid = -1ULL, + .min_offset = 0, + .max_offset = -1ULL, + .min_transid = 0, + .max_transid = -1ULL, + .min_type = 0, + .max_type = -1U, + .nr_items = 10, + }; + struct btrfs_ioctl_search_args search_args; + struct btrfs_ioctl_search_args_v2 search_args_v2 = { + .buf_size = 4096, + }; + + ioctl(-1, BTRFS_IOC_TREE_SEARCH, NULL); + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, NULL) = -1 EBADF (%m)\n"); + + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_objectid = 6; + key_reference.max_objectid = 7; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_offset++; + key_reference.max_offset--; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_transid++; + key_reference.max_transid--; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_type = 1; + key_reference.max_type = 12; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + if (btrfs_test_root) { + struct btrfs_ioctl_search_args_v2 *args; + int bufsize = 4096; + + key_reference.tree_id = 5; + key_reference.min_type = 1; + key_reference.max_type = 1; + key_reference.min_objectid = 256; + key_reference.max_objectid = 357; + key_reference.min_offset = 0; + key_reference.max_offset = -1ULL; + + search_args.key = key_reference; + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&search_args.key); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("} => {key={nr_items=%u}, buf=", + search_args.key.nr_items); + btrfs_print_tree_search_buf(&search_args.key, search_args.buf, + sizeof(search_args.buf)); + printf("}) = 0\n"); + + args = malloc(sizeof(*args) + bufsize); + if (!args) + perror_msg_and_fail("malloc failed"); + + args->key = key_reference; + args->buf_size = bufsize; + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH_V2, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&key_reference); + printf(", buf_size=%" PRIu64 "}", (uint64_t) args->buf_size); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH_V2, args); + printf(" => {key={nr_items=%u}, buf_size=%" PRIu64 ", buf=", + args->key.nr_items, (uint64_t)args->buf_size); + btrfs_print_tree_search_buf(&args->key, args->buf, + args->buf_size); + printf("}) = 0\n"); + + args->key = key_reference; + args->buf_size = sizeof(struct btrfs_ioctl_search_header); + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH_V2, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&args->key); + printf(", buf_size=%" PRIu64 "}", (uint64_t)args->buf_size); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH_V2, args); + printf(" => {buf_size=%" PRIu64 "}) = -1 EOVERFLOW (%m)\n", + (uint64_t)args->buf_size); + free(args); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_INO_LOOKUP + */ +static void +btrfs_test_ino_lookup_ioctl(void) +{ + struct btrfs_ioctl_ino_lookup_args args = { + .treeid = 5, + .objectid = 256, + }; + + ioctl(-1, BTRFS_IOC_INO_LOOKUP, NULL); + printf("ioctl(-1, BTRFS_IOC_INO_LOOKUP, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_INO_LOOKUP, {treeid="); + btrfs_print_objectid(args.treeid); + printf(", objectid="); + btrfs_print_objectid(args.objectid); + ioctl(-1, BTRFS_IOC_INO_LOOKUP, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (btrfs_test_root) { + printf("ioctl(%d, BTRFS_IOC_INO_LOOKUP, {treeid=", + btrfs_test_dir_fd); + btrfs_print_objectid(args.treeid); + printf(", objectid="); + btrfs_print_objectid(args.objectid); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_INO_LOOKUP, &args); + printf("} => {name=\"%s\"}) = 0\n", args.name); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_SPACE_INFO + */ +static void +btrfs_test_space_info_ioctl(void) +{ + struct btrfs_ioctl_space_args args = {}; + + ioctl(-1, BTRFS_IOC_SPACE_INFO, NULL); + printf("ioctl(-1, BTRFS_IOC_SPACE_INFO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SPACE_INFO, &args); + printf("ioctl(-1, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}) = -1 EBADF (%m)\n", + args.space_slots); + + if (btrfs_test_root) { + struct btrfs_ioctl_space_args args_passed; + struct btrfs_ioctl_space_args *argsp; + args_passed = args; + printf("ioctl(%d, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}", + btrfs_test_dir_fd, args_passed.space_slots); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SPACE_INFO, &args_passed); + printf(" => {total_spaces=%" PRI__u64 "}) = 0\n", + args_passed.total_spaces); + + argsp = malloc(sizeof(args) + + args_passed.total_spaces * sizeof(args.spaces[0])); + if (!argsp) + perror_msg_and_fail("malloc failed"); + + *argsp = args; + argsp->space_slots = args_passed.total_spaces; + printf("ioctl(%d, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}", + btrfs_test_dir_fd, argsp->space_slots); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SPACE_INFO, argsp); + printf(" => {total_spaces=%" PRI__u64 ", spaces=", + argsp->total_spaces); + if (verbose) { + unsigned int i; + printf("["); + for (i = 0; i < argsp->total_spaces; i++) { + struct btrfs_ioctl_space_info *info; + info = &argsp->spaces[i]; + if (i) + printf(", "); + printf("{flags="); + printflags(btrfs_space_info_flags, info->flags, + "BTRFS_SPACE_INFO_???"); + printf(", total_bytes=%" PRI__u64 + ", used_bytes=%" PRI__u64 "}", + info->total_bytes, info->used_bytes); + } + + printf("]"); + } else + printf("..."); + printf("}) = 0\n"); + free(argsp); + } +} + +/* + * Consumes no arguments, returns nothing: + * - BTRFS_IOC_SCRUB_CANCEL + * Consumes argument, returns argument: + - * BTRFS_IOC_SCRUB + - * BTRFS_IOC_SCRUB_PROGRESS + */ +static void +btrfs_test_scrub_ioctls(void) +{ + struct btrfs_ioctl_scrub_args args = { + .devid = 1, + .start = 0, + .end = -1ULL, + .flags = max_flags_plus_one(0), + }; + + ioctl(-1, BTRFS_IOC_SCRUB, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_CANCEL, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB_CANCEL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SCRUB, {devid=%" PRI__u64 ", start=%" + PRI__u64 "%s, end=%" PRI__u64"%s, flags=", + args.devid, args.start, maybe_print_uint64max(args.start), + args.end, maybe_print_uint64max(args.end)); + printflags(btrfs_scrub_flags, args.flags, "BTRFS_SCRUB_???"); + ioctl(-1, BTRFS_IOC_SCRUB, &args); + printf("}) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, &args); + printf("ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, " + "{devid=%" PRI__u64 "}) = -1 EBADF (%m)\n", args.devid); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_DEV_INFO + */ +static void +btrfs_test_dev_info_ioctl(void) +{ + struct btrfs_ioctl_dev_info_args args = { + .devid = 1, + }; + memcpy(&args.uuid, uuid_reference, BTRFS_UUID_SIZE); + + ioctl(-1, BTRFS_IOC_DEV_INFO, NULL); + printf("ioctl(-1, BTRFS_IOC_DEV_INFO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEV_INFO, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_INFO, " + "{devid=%" PRI__u64", uuid=%s}) = -1 EBADF (%m)\n", + args.devid, uuid_reference_string); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_INO_PATHS + * - BTRFS_IOC_LOGICAL_INO + */ +static void +btrfs_test_ino_path_ioctls(void) +{ + char buf[16384]; + struct btrfs_ioctl_ino_path_args args = { + .inum = 256, + .size = sizeof(buf), + .fspath = (unsigned long)buf, + }; + + ioctl(-1, BTRFS_IOC_INO_PATHS, NULL); + printf("ioctl(-1, BTRFS_IOC_INO_PATHS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_LOGICAL_INO, NULL); + printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_INO_PATHS, &args); + printf("ioctl(-1, BTRFS_IOC_INO_PATHS, " + "{inum=%" PRI__u64", size=%" PRI__u64 + ", fspath=0x%" PRI__x64 "}) = -1 EBADF (%m)\n", + args.inum, args.size, args.fspath); + + ioctl(-1, BTRFS_IOC_LOGICAL_INO, &args); + printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64 + ", size=%" PRI__u64", inodes=0x%" PRI__x64 + "}) = -1 EBADF (%m)\n", args.inum, args.size, args.fspath); + +#ifdef HAVE_LINUX_FIEMAP_H + if (btrfs_test_root) { + int size; + struct stat si; + int ret; + struct btrfs_data_container *data = (void *)buf; + struct fiemap *fiemap; + int fd; + + ret = fstat(btrfs_test_dir_fd, &si); + if (ret) + perror_msg_and_fail("fstat failed"); + + args.inum = si.st_ino; + printf("ioctl(%d, BTRFS_IOC_INO_PATHS, " + "{inum=%" PRI__u64", size=%" PRI__u64 + ", fspath=0x%" PRI__x64"}", + btrfs_test_dir_fd, args.inum, args.size, + args.fspath); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_INO_PATHS, &args); + printf(" => {fspath={bytes_left=%u, bytes_missing=%u, elem_cnt=%u, elem_missed=%u, val=", + data->bytes_left, data->bytes_missing, data->elem_cnt, + data->elem_missed); + if (verbose) { + printf("[\"strace-test\"]"); + } else + printf("..."); + printf("}}) = 0\n"); + + fd = openat(btrfs_test_dir_fd, "file1", O_RDWR|O_CREAT, 0600); + if (fd < 0) + perror_msg_and_fail("openat(file1) failed"); + + ret = fstat(fd, &si); + if (ret) + perror_msg_and_fail("fstat failed"); + + if (write(fd, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd"); + + /* + * Force delalloc so we can actually + * search for the extent. + */ + fsync(fd); + ioctl(fd, BTRFS_IOC_SYNC, NULL); + printf("ioctl(%d, BTRFS_IOC_SYNC) = 0\n", fd); + + size = sizeof(*fiemap) + 2 * sizeof(fiemap->fm_extents[0]); + fiemap = malloc(size); + if (!fiemap) + perror_msg_and_fail("malloc failed"); + memset(fiemap, 0, size); + + fiemap->fm_length = sizeof(buf); + fiemap->fm_extent_count = 2; + + /* This is also a live test for FIEMAP */ + printf("ioctl(%d, FS_IOC_FIEMAP, {fm_start=%" PRI__u64 + ", fm_length=%" PRI__u64", fm_flags=", + fd, fiemap->fm_start, fiemap->fm_length); + printflags(fiemap_flags, fiemap->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_extent_count=%u}", fiemap->fm_extent_count); + ioctl(fd, FS_IOC_FIEMAP, fiemap); + printf(" => {fm_flags="); + printflags(fiemap_flags, fiemap->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_mapped_extents=%u, fm_extents=", + fiemap->fm_mapped_extents); + if (verbose) { + printf("["); + unsigned int i; + for (i = 0; i < fiemap->fm_mapped_extents; i++) { + struct fiemap_extent *fe; + fe = &fiemap->fm_extents[i]; + if (i) + printf(", "); + printf("{fe_logical=%" PRI__u64 + ", fe_physical=%" PRI__u64 + ", fe_length=%" PRI__u64 + ", ", + fe->fe_logical, fe->fe_physical, + fe->fe_length); + printflags(fiemap_extent_flags, fe->fe_flags, + "FIEMAP_EXTENT_???"); + printf("}"); + } + printf("]"); + } else + printf("..."); + printf("}) = 0\n"); + + args.inum = fiemap->fm_extents[0].fe_physical; + printf("ioctl(%d, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64 + ", size=%" PRI__u64", inodes=0x%" PRI__x64"}", + fd, args.inum, args.size, args.fspath); + ioctl(fd, BTRFS_IOC_LOGICAL_INO, &args); + printf(" => {inodes={bytes_left=%u, bytes_missing=%u, elem_cnt=%u, elem_missed=%u, val=", + data->bytes_left, data->bytes_missing, data->elem_cnt, + data->elem_missed); + if (verbose) { + printf("[{inum=%llu, offset=0, root=5}]", + (unsigned long long) si.st_ino); + } else + printf("..."); + printf("}}) = 0\n"); + close(fd); + free(fiemap); + } +#endif /* HAVE_LINUX_FIEMAP_H */ +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_SET_RECEIVED_SUBVOL + */ +static void +btrfs_test_set_received_subvol_ioctl(void) +{ + struct btrfs_ioctl_received_subvol_args args = { + .stransid = 0x12345, + .stime = { + .sec = 1463193386, + .nsec = 12345, + }, + }; + memcpy(&args.uuid, uuid_reference, BTRFS_UUID_SIZE); + + ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, " + "NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, &args); + printf("ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, " + "{uuid=%s, stransid=%" PRI__u64", stime=%" PRI__u64 + ".%u, flags=0}) = -1 EBADF (%m)\n", + uuid_reference_string, args.stransid, args.stime.sec, + args.stime.nsec); +} + +/* + * Consumes argument, returns nothing (output is via send_fd) + * - BTRFS_IOC_SEND + */ +static void +btrfs_test_send_ioctl(void) +{ + uint64_t u64_array[2] = { 256, 257 }; + struct btrfs_ioctl_send_args args = { + .send_fd = 4, + .parent_root = 257, + .flags = max_flags_plus_one(2), + }; + + ioctl(-1, BTRFS_IOC_SEND, NULL); + printf("ioctl(-1, BTRFS_IOC_SEND, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SEND, " + "{send_fd=%d, clone_sources_count=%" PRI__u64 + ", clone_sources=", + (int) args.send_fd, args.clone_sources_count); + if (verbose) + printf("NULL"); + else + printf("..."); + printf(", parent_root="); + btrfs_print_objectid(args.parent_root); + printf(", flags="); + printflags(btrfs_send_flags, args.flags, "BTRFS_SEND_FLAGS_???"); + ioctl(-1, BTRFS_IOC_SEND, &args); + printf("}) = -1 EBADF (%m)\n"); + + args.clone_sources_count = 2; + args.clone_sources = (__u64 *) (void *) u64_array; + + printf("ioctl(-1, BTRFS_IOC_SEND, " + "{send_fd=%d, clone_sources_count=%" PRI__u64 + ", clone_sources=", + (int) args.send_fd, args.clone_sources_count); + if (verbose) { + printf("["); + btrfs_print_objectid(u64_array[0]); + printf(", "); + btrfs_print_objectid(u64_array[1]); + printf("]"); + } else + printf("..."); + printf(", parent_root="); + btrfs_print_objectid(args.parent_root); + printf(", flags="); + printflags(btrfs_send_flags, args.flags, "BTRFS_SEND_FLAGS_???"); + ioctl(-1, BTRFS_IOC_SEND, &args); + printf("}) = -1 EBADF (%m)\n"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QUOTA_CTL + */ +static void +btrfs_test_quota_ctl_ioctl(void) +{ + struct btrfs_ioctl_quota_ctl_args args = { + .cmd = 1, + }; + + ioctl(-1, BTRFS_IOC_QUOTA_CTL, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_ENABLE}) = -1 EBADF (%m)\n"); + + args.cmd = 2; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_DISABLE}) = -1 EBADF (%m)\n"); + + args.cmd = 3; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_RESCAN__NOTUSED}) = -1 EBADF (%m)\n"); + + args.cmd = 4; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "0x4 /* BTRFS_QUOTA_CTL_??? */}) = -1 EBADF (%m)\n"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QGROUP_ASSIGN + */ +static void +btrfs_test_qgroup_assign_ioctl(void) +{ + struct btrfs_ioctl_qgroup_assign_args args = { + .assign = 1, + .src = 257, + .dst = 258, + }; + + ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, NULL); + printf("ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, &args); + printf("ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, " + "{assign=%" PRI__u64", src=%" PRI__u64", dst=%" PRI__u64 + "}) = -1 EBADF (%m)\n", args.assign, args.src, args.dst); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QGROUP_CREATE + */ +static void +btrfs_test_qgroup_create_ioctl(void) +{ + struct btrfs_ioctl_qgroup_create_args args = { + .create = 1, + .qgroupid = 257, + }; + + ioctl(-1, BTRFS_IOC_QGROUP_CREATE, NULL); + printf("ioctl(-1, BTRFS_IOC_QGROUP_CREATE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QGROUP_CREATE, &args); + printf("ioctl(-1, BTRFS_IOC_QGROUP_CREATE, " + "{create=%" PRI__u64", qgroupid=%" PRI__u64 + "}) = -1 EBADF (%m)\n", args.create, args.qgroupid); +} + +/* + * Consumes nothing, returns nothing: + * - BTRFS_IOC_QUOTA_RESCAN_WAIT + * Consumes argument, returns nothing: + * - BTRFS_IOC_QUOTA_RESCAN + */ +static void +btrfs_test_quota_rescan_ioctl(void) +{ + struct btrfs_ioctl_quota_rescan_args args = { + .progress = 1, + }; + + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, " + "{flags=0}) = -1 EBADF (%m)\n"); + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN_WAIT, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN_WAIT) = -1 EBADF (%m)\n"); + +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SET_FSLABEL + * + * Consumes no argument, returns argument: + * - BTRFS_IOC_GET_FS_LABEL + */ +static void +btrfs_test_label_ioctls(void) +{ + char label[BTRFS_LABEL_SIZE] = "btrfs-label"; + + ioctl(-1, BTRFS_IOC_SET_FSLABEL, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_FSLABEL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SET_FSLABEL, label); + printf("ioctl(-1, BTRFS_IOC_SET_FSLABEL, \"%s\") = -1 EBADF (%m)\n", + label); + + if (write_ok) { + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SET_FSLABEL, label); + printf("ioctl(%d, BTRFS_IOC_SET_FSLABEL, \"%s\") = 0\n", + btrfs_test_dir_fd, label); + + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_FSLABEL, label); + printf("ioctl(%d, BTRFS_IOC_GET_FSLABEL, \"%s\") = 0\n", + btrfs_test_dir_fd, label); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_GET_DEV_STATS + */ +static void +btrfs_test_get_dev_stats_ioctl(void) +{ + struct btrfs_ioctl_get_dev_stats args = { + .devid = 1, + .nr_items = 5, + .flags = max_flags_plus_one(0), + }; + + ioctl(-1, BTRFS_IOC_GET_DEV_STATS, NULL); + printf("ioctl(-1, BTRFS_IOC_GET_DEV_STATS, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_GET_DEV_STATS, {devid=%" PRI__u64 + ", nr_items=%" PRI__u64", flags=", + args.devid, args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + ioctl(-1, BTRFS_IOC_GET_DEV_STATS, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + unsigned int i; + args.flags = BTRFS_DEV_STATS_RESET; + printf("ioctl(%d, BTRFS_IOC_GET_DEV_STATS, {devid=%" PRI__u64 + ", nr_items=%" PRI__u64", flags=", + btrfs_test_dir_fd, args.devid, args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_DEV_STATS, &args); + printf("} => {nr_items=%" PRI__u64 ", flags=", + args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + printf(", ["); + for (i = 0; i < args.nr_items; i++) { + const char *name = xlookup(btrfs_dev_stats_values, i); + if (i) + printf(", "); + if (name) + printf("/* %s */ ", name); + printf("%" PRI__u64, args.values[i]); + } + printf("]}) = 0\n"); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_DEV_REPLACE + * + * Test environment for this is more difficult; It's better to do it by hand. + */ +static void +btrfs_test_dev_replace_ioctl(void) +{ + struct btrfs_ioctl_dev_replace_args args = { + .cmd = BTRFS_IOCTL_DEV_REPLACE_CMD_START, + }; + args.start.srcdevid = 1; + strcpy((char *)args.start.srcdev_name, "/dev/sda1"); + strcpy((char *)args.start.tgtdev_name, "/dev/sdb1"); + + /* struct btrfs_ioctl_dev_replace_args */ + ioctl(-1, BTRFS_IOC_DEV_REPLACE, NULL); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEV_REPLACE, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, " + "{cmd=BTRFS_IOCTL_DEV_REPLACE_CMD_START, start={srcdevid=%" + PRI__u64", cont_reading_from_srcdev_mode=%" PRI__u64 + ", srcdev_name=\"%s\", tgtdev_name=\"%s\"}}) = -1 EBADF (%m)\n", + args.start.srcdevid, + args.start.cont_reading_from_srcdev_mode, + (char *)args.start.srcdev_name, + (char *)args.start.tgtdev_name); + + args.cmd = 1; + ioctl(-1, BTRFS_IOC_DEV_REPLACE, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, " + "{cmd=BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS}) = -1 EBADF (%m)\n"); +} + +static void +btrfs_test_extent_same_ioctl(void) +{ +#ifdef BTRFS_IOC_FILE_EXTENT_SAME + struct file_dedupe_range args = { + .src_offset = 1024, + .src_length = 10240, + }; + struct file_dedupe_range *argsp; + + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, NULL); + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 + ", src_length=%" PRIu64 + ", dest_count=%hu, info=[]", + (uint64_t)args.src_offset, + (uint64_t)args.src_length, args.dest_count); + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, &args); + printf("}) = -1 EBADF (%m)\n"); + + argsp = malloc(sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + if (!argsp) + perror_msg_and_fail("malloc failed"); + memset(argsp, 0, sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + + *argsp = args; + argsp->dest_count = 3; + argsp->info[0].dest_fd = 2; + argsp->info[0].dest_offset = 0; + argsp->info[1].dest_fd = 2; + argsp->info[1].dest_offset = 10240; + argsp->info[2].dest_fd = 2; + argsp->info[2].dest_offset = 20480; + + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 + ", src_length=%" PRIu64 + ", dest_count=%hu, info=", + (int64_t)argsp->src_offset, + (uint64_t)argsp->src_length, argsp->dest_count); + printf("[{dest_fd=%" PRId64 ", dest_offset=%" PRIu64 + "}, {dest_fd=%" PRId64 ", dest_offset=%"PRIu64 "}", + (int64_t)argsp->info[0].dest_fd, + (uint64_t)argsp->info[0].dest_offset, + (int64_t)argsp->info[1].dest_fd, + (uint64_t)argsp->info[1].dest_offset); + if (verbose) + printf(", {dest_fd=%" PRId64 ", dest_offset=%" PRIu64 "}", + (int64_t)argsp->info[2].dest_fd, + (uint64_t)argsp->info[2].dest_offset); + else + printf(", ..."); + printf("]"); + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, argsp); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + int fd1, fd2; + char buf[16384]; + + memset(buf, 0, sizeof(buf)); + + fd1 = openat(btrfs_test_dir_fd, "file1", O_RDWR|O_CREAT, 0600); + if (fd1 < 0) + perror_msg_and_fail("open file1 failed"); + + fd2 = openat(btrfs_test_dir_fd, "file2", O_RDWR|O_CREAT, 0600); + if (fd2 < 0) + perror_msg_and_fail("open file2 failed"); + + if (write(fd1, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd1"); + if (write(fd1, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd1"); + if (write(fd2, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd2"); + if (write(fd2, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd2"); + + close(fd2); + fd2 = openat(btrfs_test_dir_fd, "file2", O_RDONLY); + if (fd2 < 0) + perror_msg_and_fail("open file2 failed"); + + memset(argsp, 0, sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + + argsp->src_offset = 0; + argsp->src_length = 4096; + argsp->dest_count = 3; + argsp->info[0].dest_fd = fd2; + argsp->info[0].dest_offset = 0; + argsp->info[1].dest_fd = fd2; + argsp->info[1].dest_offset = 10240; + argsp->info[2].dest_fd = fd2; + argsp->info[2].dest_offset = 20480; + + printf("ioctl(%d, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 ", src_length=%" PRIu64 + ", dest_count=%hu, info=", fd1, + (uint64_t)argsp->src_offset, + (uint64_t)argsp->src_length, argsp->dest_count); + printf("[{dest_fd=%" PRId64 ", dest_offset=%" PRIu64 + "}, {dest_fd=%" PRId64 ", dest_offset=%"PRIu64 "}", + (int64_t)argsp->info[0].dest_fd, + (uint64_t)argsp->info[0].dest_offset, + (int64_t)argsp->info[1].dest_fd, + (uint64_t)argsp->info[1].dest_offset); + if (verbose) + printf(", {dest_fd=%" PRId64 + ", dest_offset=%" PRIu64 "}", + (int64_t)argsp->info[2].dest_fd, + (uint64_t)argsp->info[2].dest_offset); + else + printf(", ..."); + + ioctl(fd1, BTRFS_IOC_FILE_EXTENT_SAME, argsp); + printf("]} => {info="); + printf("[{bytes_deduped=%" PRIu64 ", status=%d}, " + "{bytes_deduped=%" PRIu64 ", status=%d}", + (uint64_t)argsp->info[0].bytes_deduped, + argsp->info[0].status, + (uint64_t)argsp->info[1].bytes_deduped, + argsp->info[1].status); + if (verbose) + printf(", {bytes_deduped=%" PRIu64 ", status=%d}", + (uint64_t)argsp->info[2].bytes_deduped, + argsp->info[2].status); + else + printf(", ..."); + printf("]}) = 0\n"); + close(fd1); + close(fd2); + unlinkat(btrfs_test_dir_fd, "file1", 0); + unlinkat(btrfs_test_dir_fd, "file2", 0); + close(fd1); + close(fd2); + } + free(argsp); +#endif /* BTRFS_IOC_FILE_EXTENT_SAME */ +} + +static void +btrfs_print_features(struct btrfs_ioctl_feature_flags *flags) +{ + printf("{compat_flags="); + printflags(btrfs_features_compat, flags->compat_flags, + "BTRFS_FEATURE_COMPAT_???"); + + printf(", compat_ro_flags="); + printflags(btrfs_features_compat_ro, flags->compat_ro_flags, + "BTRFS_FEATURE_COMPAT_RO_???"); + + printf(", incompat_flags="); + printflags(btrfs_features_incompat, flags->incompat_flags, + "BTRFS_FEATURE_INCOMPAT_???"); + printf("}"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SET_FEATURES + * + * Consumes nothing, returns argument: + * - BTRFS_IOC_GET_FEATURES + * - BTRFS_IOC_GET_SUPPORTED_FEATURES + */ +static void +btrfs_test_features_ioctls(void) +{ + struct btrfs_ioctl_feature_flags args[2] = { + { + .compat_flags = max_flags_plus_one(-1), + .incompat_flags = max_flags_plus_one(9), + .compat_ro_flags = max_flags_plus_one(0), + }, { + .compat_flags = max_flags_plus_one(-1), + .incompat_flags = max_flags_plus_one(9), + .compat_ro_flags = max_flags_plus_one(0), + }, + }; + struct btrfs_ioctl_feature_flags supported_features[3]; + + ioctl(-1, BTRFS_IOC_SET_FEATURES, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_FEATURES, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SET_FEATURES, ["); + btrfs_print_features(&args[0]); + printf(", "); + btrfs_print_features(&args[1]); + ioctl(-1, BTRFS_IOC_SET_FEATURES, &args); + printf("]) = -1 EBADF (%m)\n"); + + if (btrfs_test_root) { + printf("ioctl(%d, BTRFS_IOC_GET_FEATURES, ", + btrfs_test_dir_fd); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_FEATURES, + &supported_features); + btrfs_print_features(&supported_features[0]); + printf(") = 0\n"); + + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_SUPPORTED_FEATURES, + &supported_features); + printf("ioctl(%d, BTRFS_IOC_GET_SUPPORTED_FEATURES, ", + btrfs_test_dir_fd); + printf("[ /* supported */ "); + btrfs_print_features(&supported_features[0]); + printf(", /* safe to set */ "); + btrfs_print_features(&supported_features[1]); + printf(", /* safe to clear */ "); + btrfs_print_features(&supported_features[2]); + printf("]) = 0\n"); + } +} + +static void +btrfs_test_read_ioctls(void) +{ + static const struct xlat btrfs_read_cmd[] = { + XLAT(BTRFS_IOC_BALANCE_PROGRESS), + XLAT(BTRFS_IOC_FS_INFO), + XLAT(BTRFS_IOC_GET_FEATURES), + XLAT(BTRFS_IOC_GET_FSLABEL), + XLAT(BTRFS_IOC_GET_SUPPORTED_FEATURES), + XLAT(BTRFS_IOC_QGROUP_LIMIT), + XLAT(BTRFS_IOC_QUOTA_RESCAN_STATUS), + XLAT(BTRFS_IOC_START_SYNC), + XLAT(BTRFS_IOC_SUBVOL_GETFLAGS), + }; + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(btrfs_read_cmd); ++i) { + ioctl(-1, (unsigned long) btrfs_read_cmd[i].val, 0); + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", btrfs_read_cmd[i].str); + } +} + +int +main(int argc, char *argv[]) +{ + + int opt; + int ret; + const char *path; + + while ((opt = getopt(argc, argv, "wv")) != -1) { + switch (opt) { + case 'v': + /* + * These tests are incomplete, especially when + * printing arrays of objects are involved. + */ + verbose = true; + break; + case 'w': + write_ok = true; + break; + default: + error_msg_and_fail("usage: btrfs [-v] [-w] [path]"); + } + } + + /* + * This will enable optional tests that require a valid file descriptor + */ + if (optind < argc) { + int rootfd; + struct statfs sfi; + path = argv[optind]; + + ret = statfs(path, &sfi); + if (ret) + perror_msg_and_fail("statfs(%s) failed", path); + + if ((unsigned) sfi.f_type != BTRFS_SUPER_MAGIC) + error_msg_and_fail("%s is not a btrfs file system", + path); + + btrfs_test_root = path; + rootfd = open(path, O_RDONLY|O_DIRECTORY); + if (rootfd < 0) + perror_msg_and_fail("open(%s) failed", path); + + ret = mkdirat(rootfd, "strace-test", 0755); + if (ret < 0 && errno != EEXIST) + perror_msg_and_fail("mkdirat(strace-test) failed"); + + btrfs_test_dir_fd = openat(rootfd, "strace-test", + O_RDONLY|O_DIRECTORY); + if (btrfs_test_dir_fd < 0) + perror_msg_and_fail("openat(strace-test) failed"); + close(rootfd); + } else + write_ok = false; + + if (btrfs_test_root) { + fprintf(stderr, "Testing live ioctls on %s (%s)\n", + btrfs_test_root, write_ok ? "read/write" : "read only"); + } + + btrfs_test_read_ioctls(); + btrfs_test_trans_ioctls(); + btrfs_test_sync_ioctls(); + btrfs_test_subvol_ioctls(); + btrfs_test_balance_ioctls(); + btrfs_test_device_ioctls(); + btrfs_test_clone_ioctls(); + btrfs_test_defrag_ioctls(); + btrfs_test_search_ioctls(); + btrfs_test_ino_lookup_ioctl(); + btrfs_test_space_info_ioctl(); + btrfs_test_scrub_ioctls(); + btrfs_test_dev_info_ioctl(); + btrfs_test_ino_path_ioctls(); + btrfs_test_set_received_subvol_ioctl(); + btrfs_test_send_ioctl(); + btrfs_test_quota_ctl_ioctl(); + btrfs_test_qgroup_assign_ioctl(); + btrfs_test_qgroup_create_ioctl(); + btrfs_test_quota_rescan_ioctl(); + btrfs_test_label_ioctls(); + btrfs_test_get_dev_stats_ioctl(); + btrfs_test_dev_replace_ioctl(); + btrfs_test_extent_same_ioctl(); + btrfs_test_features_ioctls(); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_BTRFS_H") + +#endif diff --git a/tests-m32/btrfs.test b/tests-m32/btrfs.test new file mode 100755 index 000000000..2121b5b86 --- /dev/null +++ b/tests-m32/btrfs.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic btrfs ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-m32/caps-abbrev.awk b/tests-m32/caps-abbrev.awk new file mode 100644 index 000000000..86de7f236 --- /dev/null +++ b/tests-m32/caps-abbrev.awk @@ -0,0 +1,52 @@ +#!/bin/gawk +# +# This file is part of caps strace test. +# +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +BEGIN { + cap = "(0|1< +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +BEGIN { + cap = "(0|1< + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +extern int capget(int *, int *); +extern int capset(int *, const int *); + +int +main(void) +{ + const int data[] = { 2, 4, 0, 8, 16, 0 }; + const int v1 = 0x19980330; + const int v2 = 0x20071026; + const int v3 = 0x20080522; + + int * const head = tail_alloc(sizeof(int) * 2); + head[0] = v3; + head[1] = 0; + int * const tail_data = tail_alloc(sizeof(data)); + + capget(NULL, NULL); + capget(head + 2, tail_data); + capget(head, tail_data + ARRAY_SIZE(data)); + + if (capget(head, tail_data)) + perror_msg_and_skip("capget"); + if (head[0] != v3) + error_msg_and_skip("capget: v3 expected"); + + memcpy(tail_data, data, sizeof(data)); + + capset(NULL, NULL); + capset(head + 2, tail_data); + + head[0] = 0xbadc0ded; + head[1] = 2718281828U; + capset(head, tail_data + ARRAY_SIZE(data) - 2); + + head[0] = v2; + head[1] = 0; + capset(head, tail_data + ARRAY_SIZE(data) - 5); + + memcpy(tail_data, data, sizeof(data)); + head[0] = v3; + if (capset(head, tail_data) == 0 || errno != EPERM) + perror_msg_and_skip("capset"); + + memset(tail_data, 0, sizeof(data) / 2); + if (capset(head, tail_data) == 0 || errno != EPERM) + perror_msg_and_skip("capset"); + + memcpy(tail_data + ARRAY_SIZE(data) / 2, data, sizeof(data) / 2); + head[0] = v1; + if (capset(head, tail_data + ARRAY_SIZE(data) / 2) == 0 || + errno != EPERM) + perror_msg_and_skip("capset"); + + return 0; +} diff --git a/tests-m32/caps.test b/tests-m32/caps.test new file mode 100755 index 000000000..607a75bbc --- /dev/null +++ b/tests-m32/caps.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check capget/capset syscalls decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -a 19 -e trace=capget,capset $args +match_awk + +exit 0 diff --git a/tests-m32/chmod.c b/tests-m32/chmod.c new file mode 100644 index 000000000..f6f98ece6 --- /dev/null +++ b/tests-m32/chmod.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2016 Anchit Jain + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_chmod + +#include +#include +#include +#include + +int +main(void) +{ + static const char fname[] = "chmod_test_file"; + + if (open(fname, O_CREAT|O_RDONLY, 0400) < 0) + perror_msg_and_fail("open"); + + long rc = syscall(__NR_chmod, fname, 0600); + printf("chmod(\"%s\", 0600) = %s\n", fname, sprintrc(rc)); + + if (unlink(fname)) + perror_msg_and_fail("unlink"); + + rc = syscall(__NR_chmod, fname, 051); + printf("chmod(\"%s\", 051) = %s\n", fname, sprintrc(rc)); + + rc = syscall(__NR_chmod, fname, 004); + printf("chmod(\"%s\", 004) = %s\n", fname, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chmod") + +#endif diff --git a/tests-m32/chmod.test b/tests-m32/chmod.test new file mode 100755 index 000000000..70e561a1e --- /dev/null +++ b/tests-m32/chmod.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chmod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-m32/chown.c b/tests-m32/chown.c new file mode 100644 index 000000000..12aa8b71b --- /dev/null +++ b/tests-m32/chown.c @@ -0,0 +1,19 @@ +#include "tests.h" +#include + +#ifdef __NR_chown + +# define SYSCALL_NR __NR_chown +# define SYSCALL_NAME "chown" + +# if defined __NR_chown32 && __NR_chown != __NR_chown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_chown") + +#endif diff --git a/tests-m32/chown.test b/tests-m32/chown.test new file mode 100755 index 000000000..eb356ce47 --- /dev/null +++ b/tests-m32/chown.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-m32/chown32.c b/tests-m32/chown32.c new file mode 100644 index 000000000..4fffd7699 --- /dev/null +++ b/tests-m32/chown32.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_chown32 + +# define SYSCALL_NR __NR_chown32 +# define SYSCALL_NAME "chown32" +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_chown32") + +#endif diff --git a/tests-m32/chown32.test b/tests-m32/chown32.test new file mode 100755 index 000000000..0fa04c204 --- /dev/null +++ b/tests-m32/chown32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 diff --git a/tests-m32/chroot.c b/tests-m32/chroot.c new file mode 100644 index 000000000..a084cf337 --- /dev/null +++ b/tests-m32/chroot.c @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_chroot + +# include +# include + +int +main(void) +{ + static const char sample[] = "chroot.sample"; + + long rc = syscall(__NR_chroot, sample); + printf("chroot(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chroot") + +#endif diff --git a/tests-m32/chroot.test b/tests-m32/chroot.test new file mode 100755 index 000000000..3b384f5e8 --- /dev/null +++ b/tests-m32/chroot.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chroot syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff --git a/tests-m32/clock_adjtime.c b/tests-m32/clock_adjtime.c new file mode 100644 index 000000000..01089b544 --- /dev/null +++ b/tests-m32/clock_adjtime.c @@ -0,0 +1,60 @@ +/* + * This file is part of clock_adjtime strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_clock_adjtime + +# include +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_clock_adjtime, CLOCK_MONOTONIC, NULL); + printf("clock_adjtime(CLOCK_MONOTONIC, NULL) = %ld %s (%m)\n", + rc, errno2name()); + + void *efault = tail_alloc(1); + + rc = syscall(__NR_clock_adjtime, CLOCK_REALTIME, efault); + printf("clock_adjtime(CLOCK_REALTIME, %p) = %ld %s (%m)\n", + efault, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_clock_adjtime") + +#endif diff --git a/tests-m32/clock_adjtime.test b/tests-m32/clock_adjtime.test new file mode 100755 index 000000000..df2c0601a --- /dev/null +++ b/tests-m32/clock_adjtime.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check clock_adjtime syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a37 diff --git a/tests-m32/clock_nanosleep.c b/tests-m32/clock_nanosleep.c new file mode 100644 index 000000000..98407d7e8 --- /dev/null +++ b/tests-m32/clock_nanosleep.c @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +static void +handler(int signo) +{ +} + +int +main(void) +{ + struct { + struct timespec ts; + uint32_t pad[2]; + } req = { + .ts.tv_nsec = 0xc0de1, + .pad = { 0xdeadbeef, 0xbadc0ded } + }, rem = { + .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, + .pad = { 0xdeadbeef, 0xbadc0ded } + }; + const sigset_t set = {}; + const struct sigaction act = { .sa_handler = handler }; + const struct itimerval itv = { + .it_interval.tv_usec = 222222, + .it_value.tv_usec = 111111 + }; + + if (syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, &req.ts, NULL)) + perror_msg_and_skip("clock_nanosleep CLOCK_REALTIME"); + printf("clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=%jd, tv_nsec=%jd}, " + "NULL) = 0\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); + + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + NULL, &rem.ts) == -1); + printf("clock_nanosleep(CLOCK_REALTIME, 0, NULL, %p)" + " = -1 EFAULT (%m)\n", &rem.ts); + + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + &req.ts, &rem.ts) == 0); + printf("clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=%jd, tv_nsec=%jd}, " + "%p) = 0\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); + + req.ts.tv_nsec = 999999999 + 1; + assert(syscall(__NR_clock_nanosleep, CLOCK_MONOTONIC, 0, + &req.ts, &rem.ts) == -1); + printf("clock_nanosleep(CLOCK_MONOTONIC, 0" + ", {tv_sec=%jd, tv_nsec=%jd}, %p) = -1 EINVAL (%m)\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); + + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); + + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_skip("setitimer"); + printf("setitimer(ITIMER_REAL, {it_interval={tv_sec=%jd, tv_usec=%jd}" + ", it_value={tv_sec=%jd, tv_usec=%jd}}, NULL) = 0\n", + (intmax_t) itv.it_interval.tv_sec, + (intmax_t) itv.it_interval.tv_usec, + (intmax_t) itv.it_value.tv_sec, + (intmax_t) itv.it_value.tv_usec); + + --req.ts.tv_nsec; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + &req.ts, &rem.ts) == -1); + printf("clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=%jd, tv_nsec=%jd}, " + "{tv_sec=%jd, tv_nsec=%jd})" + " = ? ERESTART_RESTARTBLOCK (Interrupted by signal)\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, + (intmax_t) rem.ts.tv_sec, (intmax_t) rem.ts.tv_nsec); + puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); + + assert(syscall(__NR_clock_gettime, CLOCK_REALTIME, &req.ts) == 0); + printf("clock_gettime(CLOCK_REALTIME, {tv_sec=%jd, tv_nsec=%jd}) = 0\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); + + ++req.ts.tv_sec; + rem.ts.tv_sec = 0xc0de4; + rem.ts.tv_nsec = 0xc0de5; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, TIMER_ABSTIME, + &req.ts, &rem.ts) == -1); + printf("clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, {tv_sec=%jd, " + "tv_nsec=%jd}, %p)" + " = ? ERESTARTNOHAND (To be restarted if no handler)\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); + puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/clock_nanosleep.test b/tests-m32/clock_nanosleep.test new file mode 100755 index 000000000..ec434a60d --- /dev/null +++ b/tests-m32/clock_nanosleep.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check clock_nanosleep, clock_gettime, and setitimer syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=clock_nanosleep,clock_gettime,setitimer diff --git a/tests-m32/clock_xettime.c b/tests-m32/clock_xettime.c new file mode 100644 index 000000000..3ef5695fb --- /dev/null +++ b/tests-m32/clock_xettime.c @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#if defined __NR_clock_getres \ + && defined __NR_clock_gettime \ + && defined __NR_clock_settime + +int +main(void) +{ + struct { + struct timespec ts; + uint32_t pad[2]; + } t = { + .pad = { 0xdeadbeef, 0xbadc0ded } + }; + + if (syscall(__NR_clock_getres, CLOCK_REALTIME, &t.ts)) + perror_msg_and_skip("clock_getres CLOCK_REALTIME"); + printf("clock_getres(CLOCK_REALTIME, {tv_sec=%jd, tv_nsec=%jd}) = 0\n", + (intmax_t) t.ts.tv_sec, + (intmax_t) t.ts.tv_nsec); + + if (syscall(__NR_clock_gettime, CLOCK_PROCESS_CPUTIME_ID, &t.ts)) + perror_msg_and_skip("clock_gettime CLOCK_PROCESS_CPUTIME_ID"); + printf("clock_gettime(CLOCK_PROCESS_CPUTIME_ID, " + "{tv_sec=%jd, tv_nsec=%jd}) = 0\n", + (intmax_t) t.ts.tv_sec, + (intmax_t) t.ts.tv_nsec); + + t.ts.tv_sec = 0xdeface1; + t.ts.tv_nsec = 0xdeface2; + if (!syscall(__NR_clock_settime, CLOCK_THREAD_CPUTIME_ID, &t.ts)) + error_msg_and_skip("clock_settime CLOCK_THREAD_CPUTIME_ID:" + " EINVAL expected"); + printf("clock_settime(CLOCK_THREAD_CPUTIME_ID, {tv_sec=%jd, " + "tv_nsec=%jd}) = -1 EINVAL (%m)\n", + (intmax_t) t.ts.tv_sec, + (intmax_t) t.ts.tv_nsec); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_clock_getres && __NR_clock_gettime && __NR_clock_settime") + +#endif diff --git a/tests-m32/clock_xettime.test b/tests-m32/clock_xettime.test new file mode 100755 index 000000000..f045a66e8 --- /dev/null +++ b/tests-m32/clock_xettime.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check clock_getres, clock_gettime, and clock_settime syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 -e trace=clock_getres,clock_gettime,clock_settime diff --git a/tests-m32/copy_file_range.c b/tests-m32/copy_file_range.c new file mode 100644 index 000000000..085010af0 --- /dev/null +++ b/tests-m32/copy_file_range.c @@ -0,0 +1,66 @@ +/* + * This file is part of copy_file_range strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#if defined __NR_copy_file_range + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffff; + const long int fd_out = (long int) 0xdeadbeeffffffffe; + long long int *const off_in = tail_alloc(sizeof(*off_in)); + long long int *const off_out = tail_alloc(sizeof(*off_out)); + *off_in = 0xdeadbef1facefed1; + *off_out = 0xdeadbef2facefed2; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 0; + + long rc = syscall(__NR_copy_file_range, + fd_in, off_in, fd_out, off_out, len, flags); + printf("copy_file_range(%d, [%lld], %d, [%lld], %zu, %u)" + " = %ld %s (%m)\n", + (int) fd_in, *off_in, (int) fd_out, *off_out, len, flags, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_copy_file_range") + +#endif diff --git a/tests-m32/copy_file_range.test b/tests-m32/copy_file_range.test new file mode 100755 index 000000000..c39f6acdf --- /dev/null +++ b/tests-m32/copy_file_range.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check copy_file_range syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/count-f.c b/tests-m32/count-f.c new file mode 100644 index 000000000..6992b16b3 --- /dev/null +++ b/tests-m32/count-f.c @@ -0,0 +1,102 @@ +/* + * This file is part of count-f strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +#define N 32 +#define P 8 +#define T 4 + +static void * +thread(void *arg) +{ + unsigned int i; + + assert(chdir(".") == 0); + for (i = 0; i < N; ++i) { + assert(chdir("") == -1); + assert(chdir(".") == 0); + } + + return NULL; +} + +static int +process(void) +{ + unsigned int i; + pthread_t t[T]; + + for (i = 0; i < T; ++i) { + errno = pthread_create(&t[i], NULL, thread, NULL); + if (errno) + perror_msg_and_fail("pthread_create"); + } + + for (i = 0; i < T; ++i) { + void *retval; + errno = pthread_join(t[i], &retval); + if (errno) + perror_msg_and_fail("pthread_join"); + } + + return 0; +} + +int +main(void) +{ + unsigned int i; + pid_t p[P]; + + for (i = 0; i < P; ++i) { + p[i] = fork(); + if (p[i] < 0) + perror_msg_and_fail("fork"); + if (!p[i]) + return process(); + } + for (i = 0; i < P; ++i) { + int s; + + assert(waitpid(p[i], &s, 0) == p[i]); + assert(WIFEXITED(s)); + if (WEXITSTATUS(s)) + return WEXITSTATUS(s); + } + + return 0; +} diff --git a/tests-m32/count-f.expected b/tests-m32/count-f.expected new file mode 100644 index 000000000..f61ba54e3 --- /dev/null +++ b/tests-m32/count-f.expected @@ -0,0 +1 @@ +[ ]*[^ ]+ +[^ ]+ +[^ ]+ +2080 +1024 +chdir diff --git a/tests-m32/count-f.test b/tests-m32/count-f.test new file mode 100755 index 000000000..67515efa4 --- /dev/null +++ b/tests-m32/count-f.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check whether -c counts through forks and clones properly + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -q -f -c $args +match_grep + +exit 0 diff --git a/tests-m32/count.test b/tests-m32/count.test new file mode 100755 index 000000000..e75dc6b08 --- /dev/null +++ b/tests-m32/count.test @@ -0,0 +1,56 @@ +#!/bin/sh +# +# Check whether -c and -w options work. +# +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +check_prog grep + +grep_log() +{ + local pattern="$1"; shift + + run_strace "$@" ./sleep 1 + + grep nanosleep "$LOG" > /dev/null || + framework_skip_ 'sleep does not use nanosleep' + + LC_ALL=C grep -E -x -e "$pattern" "$LOG" > /dev/null || { + echo "Pattern of expected output: $pattern" + echo 'Actual output:' + dump_log_and_fail_with "$STRACE $args output mismatch" + } +} + +grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c +grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c -enanosleep +grep_log ' *[^ ]+ +(1\.[01]|0\.99)[^n]*nanosleep' -cw +grep_log '100\.00 +(1\.[01]|0\.99)[^n]*nanosleep' -cw -enanosleep + +exit 0 diff --git a/tests-m32/creat.c b/tests-m32/creat.c new file mode 100644 index 000000000..f22fdaaa4 --- /dev/null +++ b/tests-m32/creat.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_creat + +# define TEST_SYSCALL_NR __NR_creat +# define TEST_SYSCALL_STR "creat" +# include "umode_t.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_creat") + +#endif diff --git a/tests-m32/creat.test b/tests-m32/creat.test new file mode 100755 index 000000000..069648f7e --- /dev/null +++ b/tests-m32/creat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check creat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff --git a/tests-m32/delete_module.c b/tests-m32/delete_module.c new file mode 100644 index 000000000..5a3176035 --- /dev/null +++ b/tests-m32/delete_module.c @@ -0,0 +1,115 @@ +/* + * Check decoding of delete_module syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_delete_module) + +# include +# include +# include + +# include "init_delete_module.h" + +int +main(void) +{ + static const struct { + kernel_ulong_t val; + const char *str; + unsigned int val_prefix, val_suffix; + } flags[] = { + { ARG_STR(0), 0, 0 }, + { (kernel_ulong_t) 0xffffffff00000000ULL | O_NONBLOCK, + "O_NONBLOCK", 0, 0 }, + { (kernel_ulong_t) 0xbadc0dedfacef157ULL & ~(O_NONBLOCK | O_TRUNC), + " /* O_??? */", 0xfacef157U & ~(O_NONBLOCK | O_TRUNC), 0}, + { (kernel_ulong_t) (0xfacef157deade71cULL & ~O_NONBLOCK) | O_TRUNC, + "O_TRUNC", 0, 0xdeade71c & ~(O_NONBLOCK | O_TRUNC)}, + { -1LL, "O_NONBLOCK|O_TRUNC", 0, -1U & ~(O_NONBLOCK | O_TRUNC)}, + }; + + long rc; + char *bogus_param1 = tail_alloc(PARAM1_LEN); + char *bogus_param2 = tail_alloc(PARAM2_LEN); + const char *errstr; + + fill_memory_ex(bogus_param1, PARAM1_LEN, PARAM1_BASE, PARAM1_LEN); + fill_memory_ex(bogus_param2, PARAM2_LEN, PARAM2_BASE, PARAM2_LEN); + + rc = syscall(__NR_delete_module, NULL, bogus_zero); + printf("delete_module(NULL, 0) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_delete_module, bogus_param1, flags[0].val); + errstr = sprintrc(rc); + + printf("delete_module(\""); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\"..., %s) = %s\n", flags[0].str, errstr); + + bogus_param1[PARAM1_LEN - 1] = '\0'; + + rc = syscall(__NR_delete_module, bogus_param1, flags[1].val); + errstr = sprintrc(rc); + + printf("delete_module(\""); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\", %s) = %s\n", flags[1].str, errstr); + + rc = syscall(__NR_delete_module, bogus_param2 + PARAM2_LEN, + flags[2].val); + printf("delete_module(%p, %#x%s) = %s\n", + bogus_param2 + PARAM2_LEN, flags[2].val_prefix, + flags[2].str, sprintrc(rc)); + + rc = syscall(__NR_delete_module, bogus_param2, flags[3].val); + printf("delete_module(%p, %s|%#x) = %s\n", + bogus_param2, flags[3].str, flags[3].val_suffix, sprintrc(rc)); + + bogus_param2[PARAM2_LEN - 1] = '\0'; + + rc = syscall(__NR_delete_module, bogus_param2, flags[4].val); + errstr = sprintrc(rc); + + printf("delete_module(\""); + print_str(PARAM2_BASE, PARAM2_LEN - 1, true); + printf("\", %s|%#x) = %s\n", flags[4].str, flags[4].val_suffix, errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_delete_module"); + +#endif diff --git a/tests-m32/delete_module.test b/tests-m32/delete_module.test new file mode 100755 index 000000000..fb86ec9a0 --- /dev/null +++ b/tests-m32/delete_module.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of delete_module syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 diff --git a/tests-m32/detach-running.test b/tests-m32/detach-running.test new file mode 100755 index 000000000..006efb859 --- /dev/null +++ b/tests-m32/detach-running.test @@ -0,0 +1,90 @@ +#!/bin/sh +# +# Ensure that strace can detach from running processes. +# +# Copyright (c) 2013-2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +check_prog sleep + +set -e + +./set_ptracer_any sh -c "echo > $LOG; while :; do :; done" > /dev/null & + +while ! [ -s "$LOG" ]; do + kill -0 $! 2> /dev/null || + fail_ 'set_ptracer_any sh failed' + $SLEEP_A_BIT +done + +tracee_pid=$! + +cleanup() +{ + set +e + kill $tracee_pid + wait $tracee_pid 2> /dev/null + return 0 +} + +rm -f "$LOG" +$STRACE -p $tracee_pid 2> "$LOG" & + +while ! grep -F "Process $tracee_pid attached" "$LOG" > /dev/null; do + kill -0 $! 2> /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p failed to attach" + } + $SLEEP_A_BIT +done + +kill -INT $! +wait $! + +grep -F "Process $tracee_pid detached" "$LOG" > /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p failed to detach" + } + +if [ -f /proc/self/status ]; then + $SLEEP_A_BIT + test -d /proc/$tracee_pid || { + cleanup + dump_log_and_fail_with 'tracee died after detach' + } + grep_pid_status "$tracee_pid" '^State:.*R (running)' > /dev/null || { + grep_pid_status "$tracee_pid" '^State:' + cleanup + dump_log_and_fail_with 'tracee is not running after detach' + } +fi + +cleanup +exit 0 diff --git a/tests-m32/detach-sleeping.test b/tests-m32/detach-sleeping.test new file mode 100755 index 000000000..54304f311 --- /dev/null +++ b/tests-m32/detach-sleeping.test @@ -0,0 +1,91 @@ +#!/bin/sh +# +# Ensure that strace can detach from sleeping processes. +# +# Copyright (c) 2013-2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +check_prog sleep + +set -e + +rm -f "$LOG" +./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > "$LOG" & + +while ! [ -s "$LOG" ]; do + kill -0 $! 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' + $SLEEP_A_BIT +done + +tracee_pid=$! + +cleanup() +{ + set +e + kill $tracee_pid + wait $tracee_pid 2> /dev/null + return 0 +} + +rm -f "$LOG" +$STRACE -p $tracee_pid 2> "$LOG" & + +while ! grep -F "Process $tracee_pid attached" "$LOG" > /dev/null; do + kill -0 $! 2> /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p failed to attach" + } + $SLEEP_A_BIT +done + +kill -INT $! +wait $! + +grep -F "Process $tracee_pid detached" "$LOG" > /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p failed to detach" +} + +if [ -f /proc/self/status ]; then + $SLEEP_A_BIT + test -d /proc/$tracee_pid || { + cleanup + dump_log_and_fail_with 'tracee died after detach' + } + grep_pid_status "$tracee_pid" '^State:.*S (sleeping)' > /dev/null || { + grep_pid_status "$tracee_pid" '^State:' + cleanup + dump_log_and_fail_with 'tracee is not sleeping after detach' + } +fi + +cleanup +exit 0 diff --git a/tests-m32/detach-stopped.test b/tests-m32/detach-stopped.test new file mode 100755 index 000000000..8f480e7f7 --- /dev/null +++ b/tests-m32/detach-stopped.test @@ -0,0 +1,106 @@ +#!/bin/sh +# +# Ensure that strace can detach from stopped processes. +# +# Copyright (c) 2013-2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +check_prog sleep + +$STRACE -d -enone / > /dev/null 2> "$LOG" +if grep -x "[^:]*strace: PTRACE_SEIZE doesn't work" "$LOG" > /dev/null; then + skip_ "PTRACE_SEIZE doesn't work" +fi + +set -e + +rm -f "$LOG" +./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > "$LOG" & + +while ! [ -s "$LOG" ]; do + kill -0 $! 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' + $SLEEP_A_BIT +done + +tracee_pid=$! +kill -STOP $tracee_pid + +cleanup() +{ + set +e + kill $tracee_pid + kill -CONT $tracee_pid + wait $tracee_pid 2> /dev/null + return 0 +} + +rm -f "$LOG" +$STRACE -p $tracee_pid 2> "$LOG" & + +while ! grep -F "Process $tracee_pid attached" "$LOG" > /dev/null; do + kill -0 $! 2> /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p failed to attach" + } + $SLEEP_A_BIT +done + +while ! grep -F -e '--- stopped by ' "$LOG" > /dev/null; do + kill -0 $! 2> /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p missed stop notifications" + } + $SLEEP_A_BIT +done + +kill -INT $! +wait $! + +grep -F "Process $tracee_pid detached" "$LOG" > /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p failed to detach" +} + +if [ -f /proc/self/status ]; then + $SLEEP_A_BIT + test -d /proc/$tracee_pid || { + cleanup + dump_log_and_fail_with 'tracee died after detach' + } + grep_pid_status "$tracee_pid" '^State:.*T (stopped)' > /dev/null || { + grep_pid_status "$tracee_pid" '^State:' + cleanup + dump_log_and_fail_with 'tracee is not group-stopped after detach' + } +fi + +cleanup +exit 0 diff --git a/tests-m32/dup.c b/tests-m32/dup.c new file mode 100644 index 000000000..62157e2ff --- /dev/null +++ b/tests-m32/dup.c @@ -0,0 +1,13 @@ +#include "tests.h" +#include +#include + +int +main(void) +{ + int rc = dup(-1); + printf("dup(-1) = %d %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/dup.test b/tests-m32/dup.test new file mode 100755 index 000000000..1dc19198a --- /dev/null +++ b/tests-m32/dup.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 diff --git a/tests-m32/dup2.c b/tests-m32/dup2.c new file mode 100644 index 000000000..9f3addfa9 --- /dev/null +++ b/tests-m32/dup2.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_dup2 + +# include +# include + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffffULL; + const long int fd_new = (long int) 0xdeadbeeffffffffeULL; + + long rc = syscall(__NR_dup2, fd_old, fd_new); + printf("dup2(%d, %d) = %ld %s (%m)\n", + (int) fd_old, (int) fd_new, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_dup2") + +#endif diff --git a/tests-m32/dup2.test b/tests-m32/dup2.test new file mode 100755 index 000000000..509c5db13 --- /dev/null +++ b/tests-m32/dup2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff --git a/tests-m32/dup3.c b/tests-m32/dup3.c new file mode 100644 index 000000000..252e84693 --- /dev/null +++ b/tests-m32/dup3.c @@ -0,0 +1,28 @@ +#include "tests.h" +#include +#include + +#if defined __NR_dup3 && defined O_CLOEXEC + +# include +# include + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffffULL; + const long int fd_new = (long int) 0xdeadbeeffffffffeULL; + + long rc = syscall(__NR_dup3, fd_old, fd_new, O_CLOEXEC); + printf("dup3(%d, %d, O_CLOEXEC) = %ld %s (%m)\n", + (int) fd_old, (int) fd_new, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_dup3 && && O_CLOEXEC") + +#endif diff --git a/tests-m32/dup3.test b/tests-m32/dup3.test new file mode 100755 index 000000000..293f78f9f --- /dev/null +++ b/tests-m32/dup3.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup3 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff --git a/tests-m32/epoll_create.c b/tests-m32/epoll_create.c new file mode 100644 index 000000000..44262c7db --- /dev/null +++ b/tests-m32/epoll_create.c @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_create + +# include +# include + +int +main(void) +{ + const long int size = (long int) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_epoll_create, size); + printf("epoll_create(%d) = %ld %s (%m)\n", + (int) size, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_creat") + +#endif diff --git a/tests-m32/epoll_create.test b/tests-m32/epoll_create.test new file mode 100755 index 000000000..472a9bdbc --- /dev/null +++ b/tests-m32/epoll_create.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_create syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff --git a/tests-m32/epoll_create1.c b/tests-m32/epoll_create1.c new file mode 100644 index 000000000..cd905ecb1 --- /dev/null +++ b/tests-m32/epoll_create1.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_epoll_create1 && defined O_CLOEXEC + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_epoll_create1, O_CLOEXEC); + printf("epoll_create1(EPOLL_CLOEXEC) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_epoll_create1, O_CLOEXEC | O_NONBLOCK); + printf("epoll_create1(EPOLL_CLOEXEC|%#x) = %s\n", + O_NONBLOCK, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_create1 && O_CLOEXEC") + +#endif diff --git a/tests-m32/epoll_create1.test b/tests-m32/epoll_create1.test new file mode 100755 index 000000000..7a926a97d --- /dev/null +++ b/tests-m32/epoll_create1.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_create1 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-m32/epoll_ctl.c b/tests-m32/epoll_ctl.c new file mode 100644 index 000000000..e66605556 --- /dev/null +++ b/tests-m32/epoll_ctl.c @@ -0,0 +1,45 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_ctl + +# include +# include +# include +# include + +static long +invoke_syscall(unsigned long epfd, unsigned long op, unsigned long fd, void *ev) +{ + op |= (unsigned long) 0xffffffff00000000ULL; + return syscall(__NR_epoll_ctl, epfd, op, fd, (unsigned long) ev); +} + +int +main(void) +{ + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + ev->events = EPOLLIN; + + long rc = invoke_syscall(-1U, EPOLL_CTL_ADD, -2U, ev); + printf("epoll_ctl(-1, EPOLL_CTL_ADD, -2, {EPOLLIN," + " {u32=%u, u64=%" PRIu64 "}}) = %ld %s (%m)\n", + ev->data.u32, ev->data.u64, rc, errno2name()); + + rc = invoke_syscall(-3U, EPOLL_CTL_DEL, -4U, ev); + printf("epoll_ctl(-3, EPOLL_CTL_DEL, -4, %p) = %ld %s (%m)\n", + ev, rc, errno2name()); + + rc = invoke_syscall(-1UL, EPOLL_CTL_MOD, -16UL, 0); + printf("epoll_ctl(-1, EPOLL_CTL_MOD, -16, NULL) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_ctl") + +#endif diff --git a/tests-m32/epoll_ctl.test b/tests-m32/epoll_ctl.test new file mode 100755 index 000000000..1aded5430 --- /dev/null +++ b/tests-m32/epoll_ctl.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_ctl syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/epoll_pwait.c b/tests-m32/epoll_pwait.c new file mode 100644 index 000000000..eaaa34d62 --- /dev/null +++ b/tests-m32/epoll_pwait.c @@ -0,0 +1,30 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_pwait + +# include +# include +# include +# include + +int +main(void) +{ + sigset_t set[2]; + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + + long rc = syscall(__NR_epoll_pwait, -1, ev, 1, -2, + set, (kernel_ulong_t) sizeof(set)); + printf("epoll_pwait(-1, %p, 1, -2, %p, %u) = %ld %s (%m)\n", + ev, set, (unsigned) sizeof(set), rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_pwait") + +#endif diff --git a/tests-m32/epoll_pwait.test b/tests-m32/epoll_pwait.test new file mode 100755 index 000000000..c7aeeace7 --- /dev/null +++ b/tests-m32/epoll_pwait.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of epoll_pwait syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/epoll_wait.c b/tests-m32/epoll_wait.c new file mode 100644 index 000000000..038bf1f78 --- /dev/null +++ b/tests-m32/epoll_wait.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_wait + +# include +# include +# include + +int +main(void) +{ + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + + long rc = syscall(__NR_epoll_wait, -1, ev, 1, -2); + printf("epoll_wait(-1, %p, 1, -2) = %ld %s (%m)\n", + ev, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_wait") + +#endif diff --git a/tests-m32/epoll_wait.test b/tests-m32/epoll_wait.test new file mode 100755 index 000000000..83ae161f3 --- /dev/null +++ b/tests-m32/epoll_wait.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_wait syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a26 diff --git a/tests-m32/erestartsys.c b/tests-m32/erestartsys.c new file mode 100644 index 000000000..97c9699c4 --- /dev/null +++ b/tests-m32/erestartsys.c @@ -0,0 +1,81 @@ +/* + * Check decoding of ERESTARTSYS error code. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +static int sv[2]; + +static void +handler(int sig) +{ + close(sv[1]); + sv[1] = -1; +} + +int +main(void) +{ + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + + const struct sigaction act = { + .sa_handler = handler, + .sa_flags = SA_RESTART + }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct itimerval itv = { .it_value.tv_usec = 123456 }; + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_fail("setitimer"); + + if (recvfrom(sv[0], &sv[1], sizeof(sv[1]), 0, NULL, NULL)) + perror_msg_and_fail("recvfrom"); + + printf("recvfrom(%d, %p, %d, 0, NULL, NULL) = ? ERESTARTSYS" + " (To be restarted if SA_RESTART is set)\n", + sv[0], &sv[1], (int) sizeof(sv[1])); + printf("recvfrom(%d, \"\", %d, 0, NULL, NULL) = 0\n", + sv[0], (int) sizeof(sv[1])); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/erestartsys.test b/tests-m32/erestartsys.test new file mode 100755 index 000000000..91f711f3b --- /dev/null +++ b/tests-m32/erestartsys.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of ERESTARTSYS error code. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a34 -e signal=none -e trace=recvfrom diff --git a/tests-m32/errno2name.c b/tests-m32/errno2name.c new file mode 100644 index 000000000..4a176993b --- /dev/null +++ b/tests-m32/errno2name.c @@ -0,0 +1,481 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#define CASE(x) case x: return #x + +const char * +errno2name(void) +{ + switch (errno) { + /* names taken from linux/errnoent.h */ +#ifdef E2BIG + CASE(E2BIG); +#endif +#ifdef EACCES + CASE(EACCES); +#endif +#ifdef EADDRINUSE + CASE(EADDRINUSE); +#endif +#ifdef EADDRNOTAVAIL + CASE(EADDRNOTAVAIL); +#endif +#ifdef EADV + CASE(EADV); +#endif +#ifdef EAFNOSUPPORT + CASE(EAFNOSUPPORT); +#endif +#ifdef EAGAIN + CASE(EAGAIN); +#endif +#ifdef EALREADY + CASE(EALREADY); +#endif +#ifdef EBADCOOKIE + CASE(EBADCOOKIE); +#endif +#ifdef EBADE + CASE(EBADE); +#endif +#ifdef EBADF + CASE(EBADF); +#endif +#ifdef EBADFD + CASE(EBADFD); +#endif +#ifdef EBADHANDLE + CASE(EBADHANDLE); +#endif +#ifdef EBADMSG + CASE(EBADMSG); +#endif +#ifdef EBADR + CASE(EBADR); +#endif +#ifdef EBADRQC + CASE(EBADRQC); +#endif +#ifdef EBADSLT + CASE(EBADSLT); +#endif +#ifdef EBADTYPE + CASE(EBADTYPE); +#endif +#ifdef EBFONT + CASE(EBFONT); +#endif +#ifdef EBUSY + CASE(EBUSY); +#endif +#ifdef ECANCELED + CASE(ECANCELED); +#endif +#ifdef ECHILD + CASE(ECHILD); +#endif +#ifdef ECHRNG + CASE(ECHRNG); +#endif +#ifdef ECOMM + CASE(ECOMM); +#endif +#ifdef ECONNABORTED + CASE(ECONNABORTED); +#endif +#ifdef ECONNREFUSED + CASE(ECONNREFUSED); +#endif +#ifdef ECONNRESET + CASE(ECONNRESET); +#endif +#ifdef EDEADLK + CASE(EDEADLK); +#endif +#ifdef EDESTADDRREQ + CASE(EDESTADDRREQ); +#endif +#ifdef EDOM + CASE(EDOM); +#endif +#ifdef EDOTDOT + CASE(EDOTDOT); +#endif +#ifdef EDQUOT + CASE(EDQUOT); +#endif +#ifdef EEXIST + CASE(EEXIST); +#endif +#ifdef EFAULT + CASE(EFAULT); +#endif +#ifdef EFBIG + CASE(EFBIG); +#endif +#ifdef EHOSTDOWN + CASE(EHOSTDOWN); +#endif +#ifdef EHOSTUNREACH + CASE(EHOSTUNREACH); +#endif +#ifdef EHWPOISON + CASE(EHWPOISON); +#endif +#ifdef EIDRM + CASE(EIDRM); +#endif +#ifdef EILSEQ + CASE(EILSEQ); +#endif +#ifdef EINPROGRESS + CASE(EINPROGRESS); +#endif +#ifdef EINTR + CASE(EINTR); +#endif +#ifdef EINVAL + CASE(EINVAL); +#endif +#ifdef EIO + CASE(EIO); +#endif +#ifdef EIOCBQUEUED + CASE(EIOCBQUEUED); +#endif +#ifdef EISCONN + CASE(EISCONN); +#endif +#ifdef EISDIR + CASE(EISDIR); +#endif +#ifdef EISNAM + CASE(EISNAM); +#endif +#ifdef EJUKEBOX + CASE(EJUKEBOX); +#endif +#ifdef EKEYEXPIRED + CASE(EKEYEXPIRED); +#endif +#ifdef EKEYREJECTED + CASE(EKEYREJECTED); +#endif +#ifdef EKEYREVOKED + CASE(EKEYREVOKED); +#endif +#ifdef EL2HLT + CASE(EL2HLT); +#endif +#ifdef EL2NSYNC + CASE(EL2NSYNC); +#endif +#ifdef EL3HLT + CASE(EL3HLT); +#endif +#ifdef EL3RST + CASE(EL3RST); +#endif +#ifdef ELIBACC + CASE(ELIBACC); +#endif +#ifdef ELIBBAD + CASE(ELIBBAD); +#endif +#ifdef ELIBEXEC + CASE(ELIBEXEC); +#endif +#ifdef ELIBMAX + CASE(ELIBMAX); +#endif +#ifdef ELIBSCN + CASE(ELIBSCN); +#endif +#ifdef ELNRNG + CASE(ELNRNG); +#endif +#ifdef ELOOP + CASE(ELOOP); +#endif +#ifdef EMEDIUMTYPE + CASE(EMEDIUMTYPE); +#endif +#ifdef EMFILE + CASE(EMFILE); +#endif +#ifdef EMLINK + CASE(EMLINK); +#endif +#ifdef EMSGSIZE + CASE(EMSGSIZE); +#endif +#ifdef EMULTIHOP + CASE(EMULTIHOP); +#endif +#ifdef ENAMETOOLONG + CASE(ENAMETOOLONG); +#endif +#ifdef ENAVAIL + CASE(ENAVAIL); +#endif +#ifdef ENETDOWN + CASE(ENETDOWN); +#endif +#ifdef ENETRESET + CASE(ENETRESET); +#endif +#ifdef ENETUNREACH + CASE(ENETUNREACH); +#endif +#ifdef ENFILE + CASE(ENFILE); +#endif +#ifdef ENOANO + CASE(ENOANO); +#endif +#ifdef ENOBUFS + CASE(ENOBUFS); +#endif +#ifdef ENOCSI + CASE(ENOCSI); +#endif +#ifdef ENODATA + CASE(ENODATA); +#endif +#ifdef ENODEV + CASE(ENODEV); +#endif +#ifdef ENOENT + CASE(ENOENT); +#endif +#ifdef ENOEXEC + CASE(ENOEXEC); +#endif +#ifdef ENOIOCTLCMD + CASE(ENOIOCTLCMD); +#endif +#ifdef ENOKEY + CASE(ENOKEY); +#endif +#ifdef ENOLCK + CASE(ENOLCK); +#endif +#ifdef ENOLINK + CASE(ENOLINK); +#endif +#ifdef ENOMEDIUM + CASE(ENOMEDIUM); +#endif +#ifdef ENOMEM + CASE(ENOMEM); +#endif +#ifdef ENOMSG + CASE(ENOMSG); +#endif +#ifdef ENONET + CASE(ENONET); +#endif +#ifdef ENOPKG + CASE(ENOPKG); +#endif +#ifdef ENOPROTOOPT + CASE(ENOPROTOOPT); +#endif +#ifdef ENOSPC + CASE(ENOSPC); +#endif +#ifdef ENOSR + CASE(ENOSR); +#endif +#ifdef ENOSTR + CASE(ENOSTR); +#endif +#ifdef ENOSYS + CASE(ENOSYS); +#endif +#ifdef ENOTBLK + CASE(ENOTBLK); +#endif +#ifdef ENOTCONN + CASE(ENOTCONN); +#endif +#ifdef ENOTDIR + CASE(ENOTDIR); +#endif +#ifdef ENOTEMPTY + CASE(ENOTEMPTY); +#endif +#ifdef ENOTNAM + CASE(ENOTNAM); +#endif +#ifdef ENOTRECOVERABLE + CASE(ENOTRECOVERABLE); +#endif +#ifdef ENOTSOCK + CASE(ENOTSOCK); +#endif +#ifdef ENOTSUPP + CASE(ENOTSUPP); +#endif +#ifdef ENOTSYNC + CASE(ENOTSYNC); +#endif +#ifdef ENOTTY + CASE(ENOTTY); +#endif +#ifdef ENOTUNIQ + CASE(ENOTUNIQ); +#endif +#ifdef ENXIO + CASE(ENXIO); +#endif +#ifdef EOPENSTALE + CASE(EOPENSTALE); +#endif +#ifdef EOPNOTSUPP + CASE(EOPNOTSUPP); +#endif +#ifdef EOVERFLOW + CASE(EOVERFLOW); +#endif +#ifdef EOWNERDEAD + CASE(EOWNERDEAD); +#endif +#ifdef EPERM + CASE(EPERM); +#endif +#ifdef EPFNOSUPPORT + CASE(EPFNOSUPPORT); +#endif +#ifdef EPIPE + CASE(EPIPE); +#endif +#ifdef EPROBE_DEFER + CASE(EPROBE_DEFER); +#endif +#ifdef EPROTO + CASE(EPROTO); +#endif +#ifdef EPROTONOSUPPORT + CASE(EPROTONOSUPPORT); +#endif +#ifdef EPROTOTYPE + CASE(EPROTOTYPE); +#endif +#ifdef ERANGE + CASE(ERANGE); +#endif +#ifdef EREMCHG + CASE(EREMCHG); +#endif +#ifdef EREMOTE + CASE(EREMOTE); +#endif +#ifdef EREMOTEIO + CASE(EREMOTEIO); +#endif +#ifdef ERESTART + CASE(ERESTART); +#endif +#ifdef ERESTARTNOHAND + CASE(ERESTARTNOHAND); +#endif +#ifdef ERESTARTNOINTR + CASE(ERESTARTNOINTR); +#endif +#ifdef ERESTARTSYS + CASE(ERESTARTSYS); +#endif +#ifdef ERESTART_RESTARTBLOCK + CASE(ERESTART_RESTARTBLOCK); +#endif +#ifdef ERFKILL + CASE(ERFKILL); +#endif +#ifdef EROFS + CASE(EROFS); +#endif +#ifdef ESERVERFAULT + CASE(ESERVERFAULT); +#endif +#ifdef ESHUTDOWN + CASE(ESHUTDOWN); +#endif +#ifdef ESOCKTNOSUPPORT + CASE(ESOCKTNOSUPPORT); +#endif +#ifdef ESPIPE + CASE(ESPIPE); +#endif +#ifdef ESRCH + CASE(ESRCH); +#endif +#ifdef ESRMNT + CASE(ESRMNT); +#endif +#ifdef ESTALE + CASE(ESTALE); +#endif +#ifdef ESTRPIPE + CASE(ESTRPIPE); +#endif +#ifdef ETIME + CASE(ETIME); +#endif +#ifdef ETIMEDOUT + CASE(ETIMEDOUT); +#endif +#ifdef ETOOMANYREFS + CASE(ETOOMANYREFS); +#endif +#ifdef ETOOSMALL + CASE(ETOOSMALL); +#endif +#ifdef ETXTBSY + CASE(ETXTBSY); +#endif +#ifdef EUCLEAN + CASE(EUCLEAN); +#endif +#ifdef EUNATCH + CASE(EUNATCH); +#endif +#ifdef EUSERS + CASE(EUSERS); +#endif +#ifdef EXDEV + CASE(EXDEV); +#endif +#ifdef EXFULL + CASE(EXFULL); +#endif + default: perror_msg_and_fail("unknown errno %d", errno); + } +} diff --git a/tests-m32/error_msg.c b/tests-m32/error_msg.c new file mode 100644 index 000000000..498a88213 --- /dev/null +++ b/tests-m32/error_msg.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +void +perror_msg_and_fail(const char *fmt, ...) +{ + int err_no = errno; + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + if (err_no) + fprintf(stderr, ": %s\n", strerror(err_no)); + else + putc('\n', stderr); + exit(1); +} + +void +error_msg_and_fail(const char *fmt, ...) +{ + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + putc('\n', stderr); + exit(1); +} + +void +error_msg_and_skip(const char *fmt, ...) +{ + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + putc('\n', stderr); + exit(77); +} + +void +perror_msg_and_skip(const char *fmt, ...) +{ + int err_no = errno; + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + if (err_no) + fprintf(stderr, ": %s\n", strerror(err_no)); + else + putc('\n', stderr); + exit(77); +} diff --git a/tests-m32/eventfd.c b/tests-m32/eventfd.c new file mode 100644 index 000000000..d6ad6492e --- /dev/null +++ b/tests-m32/eventfd.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +#if defined __NR_eventfd2 && defined O_CLOEXEC + +int +main(void) +{ + (void) close(0); + if (syscall(__NR_eventfd2, -1L, 1 | O_CLOEXEC | O_NONBLOCK)) + perror_msg_and_skip("eventfd2"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_eventfd2 && O_CLOEXEC") + +#endif diff --git a/tests-m32/eventfd.expected b/tests-m32/eventfd.expected new file mode 100644 index 000000000..c4b45a073 --- /dev/null +++ b/tests-m32/eventfd.expected @@ -0,0 +1,2 @@ +eventfd2(4294967295, EFD_SEMAPHORE|EFD_CLOEXEC|EFD_NONBLOCK) = 0 ++++ exited with 0 +++ diff --git a/tests-m32/eventfd.test b/tests-m32/eventfd.test new file mode 100755 index 000000000..e181ed6ef --- /dev/null +++ b/tests-m32/eventfd.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check eventfd2 syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -e eventfd2 $args +match_diff + +exit 0 diff --git a/tests-m32/execve-v.c b/tests-m32/execve-v.c new file mode 100644 index 000000000..4506c6359 --- /dev/null +++ b/tests-m32/execve-v.c @@ -0,0 +1,3 @@ +/* This file is part of execve-v strace test. */ +#define VERBOSE 1 +#include "execve.c" diff --git a/tests-m32/execve-v.test b/tests-m32/execve-v.test new file mode 100755 index 000000000..cce586014 --- /dev/null +++ b/tests-m32/execve-v.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check verbose decoding of execve syscall. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -veexecve $args > "$EXP" + +# Filter out execve() call made by strace. +grep -F test.execve < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/execve.c b/tests-m32/execve.c new file mode 100644 index 000000000..74749e73e --- /dev/null +++ b/tests-m32/execve.c @@ -0,0 +1,171 @@ +/* + * This file is part of execve strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#define FILENAME "test.execve\nfilename" +#define Q_FILENAME "test.execve\\nfilename" + +static const char * const argv[] = { + FILENAME, "first", "second", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_argv[] = { + Q_FILENAME, "first", "second" +}; + +static const char * const envp[] = { + "foobar=1", "foo\nbar=2", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_envp[] = { + "foobar=1", "foo\\nbar=2" +}; + +int +main(void) +{ + char ** const tail_argv = tail_memdup(argv, sizeof(argv)); + char ** const tail_envp = tail_memdup(envp, sizeof(envp)); + + execve(FILENAME, tail_argv, tail_envp); + printf("execve(\"%s\"" + ", [\"%s\", \"%s\", \"%s\", %p, %p, %p, ???]" +#if VERBOSE + ", [\"%s\", \"%s\", %p, %p, %p, ???]" +#else + ", [/* 5 vars, unterminated */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], + argv[3], argv[4], argv[5] +#if VERBOSE + , q_envp[0], q_envp[1], envp[2], envp[3], envp[4] +#endif + ); + + tail_argv[ARRAY_SIZE(q_argv)] = NULL; + tail_envp[ARRAY_SIZE(q_envp)] = NULL; + + execve(FILENAME, tail_argv, tail_envp); + printf("execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" +#if VERBOSE + ", [\"%s\", \"%s\"]" +#else + ", [/* 2 vars */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2] +#if VERBOSE + , q_envp[0], q_envp[1] +#endif + ); + + execve(FILENAME, tail_argv + 2, tail_envp + 1); + printf("execve(\"%s\", [\"%s\"]" +#if VERBOSE + ", [\"%s\"]" +#else + ", [/* 1 var */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[2] +#if VERBOSE + , q_envp[1] +#endif + ); + + char **const empty = tail_alloc(sizeof(*empty)); + char **const efault = empty + 1; + *empty = NULL; + + execve(FILENAME, empty, empty); + printf("execve(\"%s\", []" +#if VERBOSE + ", []" +#else + ", [/* 0 vars */]" +#endif + ") = -1 ENOENT (%m)\n", Q_FILENAME); + + char str_a[] = "012345678901234567890123456789012"; + char str_b[] = "_abcdefghijklmnopqrstuvwxyz()[]{}"; +#define DEFAULT_STRLEN ((unsigned int) sizeof(str_a) - 2) + char **const a = tail_alloc(sizeof(*a) * (DEFAULT_STRLEN + 2)); + char **const b = tail_alloc(sizeof(*b) * (DEFAULT_STRLEN + 2)); + unsigned int i; + for (i = 0; i <= DEFAULT_STRLEN; ++i) { + a[i] = &str_a[i]; + b[i] = &str_b[i]; + } + a[i] = b[i] = NULL; + + execve(FILENAME, a, b); + printf("execve(\"%s\", [\"%.*s\"...", Q_FILENAME, DEFAULT_STRLEN, a[0]); + for (i = 1; i < DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#if VERBOSE + printf(", \"%s\"", a[i]); +#else + printf(", ..."); +#endif +#if VERBOSE + printf("], [\"%.*s\"...", DEFAULT_STRLEN, b[0]); + for (i = 1; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %u vars */", DEFAULT_STRLEN + 1); +#endif + printf("]) = -1 ENOENT (%m)\n"); + + execve(FILENAME, a + 1, b + 1); + printf("execve(\"%s\", [\"%s\"", Q_FILENAME, a[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#if VERBOSE + printf("], [\"%s\"", b[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %d vars */", DEFAULT_STRLEN); +#endif + printf("]) = -1 ENOENT (%m)\n"); + + execve(FILENAME, (char **) tail_argv[ARRAY_SIZE(q_argv)], efault); + printf("execve(\"%s\", NULL, %p) = -1 ENOENT (%m)\n", + Q_FILENAME, efault); + + execve(FILENAME, efault, NULL); + printf("execve(\"%s\", %p, NULL) = -1 ENOENT (%m)\n", + Q_FILENAME, efault); + + return 0; +} diff --git a/tests-m32/execve.test b/tests-m32/execve.test new file mode 100755 index 000000000..263b6fc5b --- /dev/null +++ b/tests-m32/execve.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check execve syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -eexecve $args > "$EXP" + +# Filter out execve() call made by strace. +grep -F test.execve < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/execveat-v.c b/tests-m32/execveat-v.c new file mode 100644 index 000000000..ff4de2e88 --- /dev/null +++ b/tests-m32/execveat-v.c @@ -0,0 +1,3 @@ +/* This file is part of execveat-v strace test. */ +#define VERBOSE 1 +#include "execveat.c" diff --git a/tests-m32/execveat-v.test b/tests-m32/execveat-v.test new file mode 100755 index 000000000..a90522485 --- /dev/null +++ b/tests-m32/execveat-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of execveat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=execveat diff --git a/tests-m32/execveat.c b/tests-m32/execveat.c new file mode 100644 index 000000000..9083830eb --- /dev/null +++ b/tests-m32/execveat.c @@ -0,0 +1,188 @@ +/* + * This file is part of execveat strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_execveat + +# include +# include + +# define FILENAME "test.execveat\nfilename" +# define Q_FILENAME "test.execveat\\nfilename" + +static const char * const argv[] = { + FILENAME, "first", "second", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_argv[] = { + Q_FILENAME, "first", "second" +}; + +static const char * const envp[] = { + "foobar=1", "foo\nbar=2", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_envp[] = { + "foobar=1", "foo\\nbar=2" +}; + +int +main(void) +{ + const char ** const tail_argv = tail_memdup(argv, sizeof(argv)); + const char ** const tail_envp = tail_memdup(envp, sizeof(envp)); + + syscall(__NR_execveat, -100, FILENAME, tail_argv, tail_envp, 0x1100); + printf("execveat(AT_FDCWD, \"%s\"" + ", [\"%s\", \"%s\", \"%s\", %p, %p, %p, ???]" +#if VERBOSE + ", [\"%s\", \"%s\", %p, %p, %p, ???]" +#else + ", [/* 5 vars, unterminated */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], + argv[3], argv[4], argv[5], +#if VERBOSE + q_envp[0], q_envp[1], envp[2], envp[3], envp[4], +#endif + errno2name()); + + tail_argv[ARRAY_SIZE(q_argv)] = NULL; + tail_envp[ARRAY_SIZE(q_envp)] = NULL; + + syscall(__NR_execveat, -100, FILENAME, tail_argv, tail_envp, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\", \"%s\", \"%s\"]" +#if VERBOSE + ", [\"%s\", \"%s\"]" +#else + ", [/* 2 vars */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], +#if VERBOSE + q_envp[0], q_envp[1], +#endif + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, tail_argv + 2, tail_envp + 1, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\"]" +#if VERBOSE + ", [\"%s\"]" +#else + ", [/* 1 var */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[2], +#if VERBOSE + q_envp[1], +#endif + errno2name()); + + char **const empty = tail_alloc(sizeof(*empty)); + char **const efault = empty + 1; + *empty = NULL; + + syscall(__NR_execveat, -100, FILENAME, empty, empty, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", []" +#if VERBOSE + ", []" +#else + ", [/* 0 vars */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, errno2name()); + + char str_a[] = "012345678901234567890123456789012"; + char str_b[] = "_abcdefghijklmnopqrstuvwxyz()[]{}"; +#define DEFAULT_STRLEN ((unsigned int) sizeof(str_a) - 2) + char **const a = tail_alloc(sizeof(*a) * (DEFAULT_STRLEN + 2)); + char **const b = tail_alloc(sizeof(*b) * (DEFAULT_STRLEN + 2)); + unsigned int i; + for (i = 0; i <= DEFAULT_STRLEN; ++i) { + a[i] = &str_a[i]; + b[i] = &str_b[i]; + } + a[i] = b[i] = NULL; + + syscall(__NR_execveat, -100, FILENAME, a, b, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%.*s\"...", Q_FILENAME, DEFAULT_STRLEN, a[0]); + for (i = 1; i < DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#if VERBOSE + printf(", \"%s\"", a[i]); +#else + printf(", ..."); +#endif +#if VERBOSE + printf("], [\"%.*s\"...", DEFAULT_STRLEN, b[0]); + for (i = 1; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %u vars */", DEFAULT_STRLEN + 1); +#endif + printf("], AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, a + 1, b + 1, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\"", Q_FILENAME, a[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#if VERBOSE + printf("], [\"%s\"", b[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %d vars */", DEFAULT_STRLEN); +#endif + printf("], AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, NULL, efault, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", NULL, %p" + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, efault, errno2name()); + + syscall(__NR_execveat, -100, FILENAME, efault, NULL, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", %p, NULL" + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, efault, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_execveat") + +#endif diff --git a/tests-m32/execveat.test b/tests-m32/execveat.test new file mode 100755 index 000000000..879e03e2a --- /dev/null +++ b/tests-m32/execveat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check execveat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/faccessat.c b/tests-m32/faccessat.c new file mode 100644 index 000000000..ce81349d1 --- /dev/null +++ b/tests-m32/faccessat.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_faccessat + +# include +# include + +int +main(void) +{ + static const char sample[] = "faccessat.sample"; + const long int fd = (long int) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_faccessat, fd, sample, F_OK); + printf("faccessat(%d, \"%s\", F_OK) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_faccessat") + +#endif diff --git a/tests-m32/faccessat.test b/tests-m32/faccessat.test new file mode 100755 index 000000000..61e7e2fdd --- /dev/null +++ b/tests-m32/faccessat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check faccessat syscall decoding. + +. "${srcdir=.}/openat.test" diff --git a/tests-m32/fadvise.h b/tests-m32/fadvise.h new file mode 100644 index 000000000..7a75f73b2 --- /dev/null +++ b/tests-m32/fadvise.h @@ -0,0 +1,57 @@ +/* + * Common definitions for fadvise64 and fadvise64_64 tests. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef STRACE_TESTS_FADVISE_H +#define STRACE_TESTS_FADVISE_H + +# include +# include +# include + +# include "xlat.h" +# include "xlat/advise.h" + +static void do_fadvise(long fd, long long offset, long long llen, long advice); + +int +main(void) +{ + static const long bogus_fd = (long) 0xfeedf00dbeeffaceULL; + static const long long bogus_offset = 0xbadc0dedda7a1057ULL; + static const long long bogus_len = 0xbadfaceca7b0d1e5ULL; + static const long bogus_advice = (long) 0xf00dfeeddeadca75ULL; + + do_fadvise(bogus_fd, bogus_offset, bogus_len, bogus_advice); + + puts("+++ exited with 0 +++"); + return 0; +} + +#endif /* !STRACE_TESTS_FADVISE_H */ diff --git a/tests-m32/fadvise64.c b/tests-m32/fadvise64.c new file mode 100644 index 000000000..930680be1 --- /dev/null +++ b/tests-m32/fadvise64.c @@ -0,0 +1,76 @@ +/* + * Check decoding of fadvise64 syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_fadvise64 + +# include "fadvise.h" + +static void +do_fadvise(long fd, long long offset, long long llen, long advice) +{ + long ret; + const char *errstr; + +# if (LONG_MAX > INT_MAX) \ + || (defined __x86_64__ && defined __ILP32__) \ + || defined LINUX_MIPSN32 + ret = syscall(__NR_fadvise64, fd, offset, llen, advice); + errstr = sprintrc(ret); + printf("fadvise64(%d, %lld, %llu, ", (int) fd, offset, llen); +# elif defined LINUX_MIPSO32 + ret = syscall(__NR_fadvise64, fd, 0, + LL_VAL_TO_PAIR(offset), LL_VAL_TO_PAIR(llen), advice); + errstr = sprintrc(ret); + printf("fadvise64(%d, %lld, %lld, ", (int) fd, offset, llen); +# else /* LONG_MAX == INT_MAX && !X32 && !LINUX_MIPSN32 */ + long len = (long) llen; +# if defined POWERPC + ret = syscall(__NR_fadvise64, fd, 0, + LL_VAL_TO_PAIR(offset), len, advice); +# else + ret = syscall(__NR_fadvise64, fd, + LL_VAL_TO_PAIR(offset), len, advice); +# endif + errstr = sprintrc(ret); + printf("fadvise64(%d, %lld, %lu, ", (int) fd, offset, len); +# endif /* LONG_MAX == INT_MAX && !X32 && !LINUX_MIPSN32 */ + printxval(advise, (unsigned) advice, "POSIX_FADV_???"); + printf(") = %s\n", errstr); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fadvise64"); + +#endif diff --git a/tests-m32/fadvise64.test b/tests-m32/fadvise64.test new file mode 100755 index 000000000..9f7467206 --- /dev/null +++ b/tests-m32/fadvise64.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of fadvise64 syscall. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -e $NAME $args > "$EXP" +check_prog grep +grep -v "^$NAME([0123]," < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/fadvise64_64.c b/tests-m32/fadvise64_64.c new file mode 100644 index 000000000..c23df97ff --- /dev/null +++ b/tests-m32/fadvise64_64.c @@ -0,0 +1,74 @@ +/* + * Check decoding of fadvise64_64 syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __arm__ +# ifdef __NR_arm_fadvise64_64 +# undef __NR_fadvise64_64 +# define __NR_fadvise64_64 __NR_arm_fadvise64_64 +# endif /* __NR_arm_fadvise64_64 */ +#endif /* __arm__ */ + +#ifdef __NR_fadvise64_64 + +# include "fadvise.h" + +static void +do_fadvise(long fd, long long offset, long long llen, long advice) +{ + long ret; + const char *errstr; + +# if (LONG_MAX > INT_MAX) \ + || (defined __x86_64__ && defined __ILP32__) \ + || defined LINUX_MIPSN32 + ret = syscall(__NR_fadvise64_64, fd, offset, llen, advice); +# elif defined __ARM_EABI__ || defined POWERPC || defined XTENSA + ret = syscall(__NR_fadvise64_64, fd, advice, + LL_VAL_TO_PAIR(offset), LL_VAL_TO_PAIR(llen)); +# else + ret = syscall(__NR_fadvise64_64, fd, + LL_VAL_TO_PAIR(offset), LL_VAL_TO_PAIR(llen), advice); +# endif + errstr = sprintrc(ret); + + printf("fadvise64_64(%d, %lld, %lld, ", (int) fd, offset, llen); + printxval(advise, (unsigned) advice, "POSIX_FADV_???"); + printf(") = %s\n", errstr); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fadvise64_64"); + +#endif diff --git a/tests-m32/fadvise64_64.test b/tests-m32/fadvise64_64.test new file mode 100755 index 000000000..a50fe2b9f --- /dev/null +++ b/tests-m32/fadvise64_64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of fadvise64_64 syscall. + +. "${srcdir=.}/fadvise64.test" diff --git a/tests-m32/fallocate.c b/tests-m32/fallocate.c new file mode 100644 index 000000000..a31711b3b --- /dev/null +++ b/tests-m32/fallocate.c @@ -0,0 +1,75 @@ +/* + * Check decoding of fallocate syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_fallocate) && defined(HAVE_FALLOCATE) && HAVE_FALLOCATE + +# include +# include +# include + +# include "xlat.h" +# include "xlat/falloc_flags.h" + +int +main(void) +{ + static const int bogus_fd = 0xbeefface; + static const int bogus_mode = 0xdeadca75; + static const off_t bogus_offset = (off_t) 0xbadc0dedda7a1057LLU; + static const off_t bogus_len = (off_t) 0xbadfaceca7b0d1e5LLU; + + long rc = fallocate(bogus_fd, bogus_mode, bogus_offset, bogus_len); + /* + * Workaround a bug fixed by commit glibc-2.11-346-gde240a0. + */ + if (rc > 0) { + errno = rc; + rc = -1; + } + const char *errstr = sprintrc(rc); + + printf("fallocate(%d, ", bogus_fd); + printflags(falloc_flags, (unsigned) bogus_mode, "FALLOC_FL_???"); + printf(", %lld, %lld) = %s\n", + (long long) bogus_offset, (long long) bogus_len, errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fallocate && HAVE_FALLOCATE"); + +#endif diff --git a/tests-m32/fallocate.test b/tests-m32/fallocate.test new file mode 100755 index 000000000..405187e5c --- /dev/null +++ b/tests-m32/fallocate.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getcwd syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff --git a/tests-m32/fanotify_init.c b/tests-m32/fanotify_init.c new file mode 100644 index 000000000..c14b41318 --- /dev/null +++ b/tests-m32/fanotify_init.c @@ -0,0 +1,95 @@ +/* + * Check decoding of fanotify_init syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined __NR_fanotify_init + +# include +# include +# include + +/* Performs fanotify_init call via the syscall interface. */ +static void +do_call(kernel_ulong_t flags, const char *flags_str, + kernel_ulong_t event_f_flags, const char *event_f_flags_str) +{ + long rc; + + rc = syscall(__NR_fanotify_init, flags, event_f_flags); + + printf("fanotify_init(%s, %s) = %s\n", + flags_str, event_f_flags_str, sprintrc(rc)); +} + +struct strval { + kernel_ulong_t val; + const char *str; +}; + + +int +main(void) +{ + static const struct strval flags[] = { + { (kernel_ulong_t) 0xffffffff00000000ULL, "FAN_CLASS_NOTIF" }, + { (kernel_ulong_t) 0xffffffff0000000cULL, + "0xc /* FAN_CLASS_??? */" }, + { (kernel_ulong_t) 0xdec0deddefaced04ULL, + "FAN_CLASS_CONTENT|0xefaced00 /* FAN_??? */" }, + { (kernel_ulong_t) 0xffffffffffffffffULL, + "0xc /* FAN_CLASS_??? */|FAN_CLOEXEC|FAN_NONBLOCK|" + "FAN_UNLIMITED_QUEUE|FAN_UNLIMITED_MARKS|0xffffffc0" }, + }; + static const struct strval event_f_flags[] = { + { (kernel_ulong_t) 0xffffffff00000000ULL, "O_RDONLY" }, + { (kernel_ulong_t) 0xdeadbeef80000001ULL, + "O_WRONLY|0x80000000" } + }; + + unsigned int i; + unsigned int j; + + + for (i = 0; i < ARRAY_SIZE(flags); i++) + for (j = 0; j < ARRAY_SIZE(event_f_flags); j++) + do_call(flags[i].val, flags[i].str, + event_f_flags[j].val, event_f_flags[j].str); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fanotify_init") + +#endif diff --git a/tests-m32/fanotify_init.test b/tests-m32/fanotify_init.test new file mode 100755 index 000000000..8d26af429 --- /dev/null +++ b/tests-m32/fanotify_init.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fanotify_init syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/fanotify_mark.c b/tests-m32/fanotify_mark.c new file mode 100644 index 000000000..43f285d33 --- /dev/null +++ b/tests-m32/fanotify_mark.c @@ -0,0 +1,182 @@ +/* + * Check decoding of fanotify_mark syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined HAVE_SYS_FANOTIFY_H && defined HAVE_FANOTIFY_MARK && \ + defined __NR_fanotify_mark + +# include +# include +# include +# include + +/* Performs fanotify_mark call via the syscall interface. */ +static void +do_call(kernel_ulong_t fd, kernel_ulong_t flags, const char *flags_str, + uint64_t mask, const char *mask_str, kernel_ulong_t dirfd, + const char *dirfd_str, kernel_ulong_t path, const char *path_str) +{ + long rc; + + rc = syscall(__NR_fanotify_mark, fd, flags, +# if (LONG_MAX > INT_MAX) \ + || (defined __x86_64__ && defined __ILP32__) \ + || defined LINUX_MIPSN32 + mask, +# else +/* arch/parisc/kernel/sys_parisc32.c, commit ab8a261b */ +# ifdef HPPA + LL_VAL_TO_PAIR((mask << 32) | (mask >> 32)), +# else + LL_VAL_TO_PAIR(mask), +# endif +# endif + dirfd, path); + + printf("fanotify_mark(%d, %s, %s, %s, %s) = %s\n", + (int) fd, flags_str, mask_str, dirfd_str, path_str, + sprintrc(rc)); +} + +struct strval { + kernel_ulong_t val; + const char *str; +}; + +struct strval64 { + uint64_t val; + const char *str; +}; + +#define STR16 "0123456789abcdef" +#define STR64 STR16 STR16 STR16 STR16 + +int +main(void) +{ + enum { + PATH1_SIZE = 64, + }; + + static const kernel_ulong_t fds[] = { + (kernel_ulong_t) 0xdeadfeed12345678ULL, + (kernel_ulong_t) 0xffffffff00000000ULL, + (kernel_ulong_t) 0xdeb0d1edffffffffULL, + }; + static const struct strval flags[] = { + { (kernel_ulong_t) 0xffffffff00000000ULL, "0" }, + { (kernel_ulong_t) 0xdec0deddefaced00ULL, + "0xefaced00 /* FAN_MARK_??? */" }, + { (kernel_ulong_t) 0xda7a105700000040ULL, + "FAN_MARK_IGNORED_SURV_MODIFY" }, + { (kernel_ulong_t) 0xbadc0deddeadfeedULL, + "FAN_MARK_ADD|FAN_MARK_DONT_FOLLOW|FAN_MARK_ONLYDIR|" + "FAN_MARK_IGNORED_MASK|FAN_MARK_IGNORED_SURV_MODIFY|" + "FAN_MARK_FLUSH|0xdeadfe00" }, + }; + static const struct strval64 masks[] = { + { ARG_ULL_STR(0) }, + { 0xdeadfeedfacebeefULL, + "FAN_ACCESS|FAN_MODIFY|FAN_CLOSE_WRITE|FAN_OPEN|" + "FAN_ACCESS_PERM|FAN_ONDIR|FAN_EVENT_ON_CHILD|" + "0xdeadfeedb2ccbec4" }, + { ARG_ULL_STR(0xffffffffb7fcbfc4) " /* FAN_??? */" }, + }; + static const struct strval dirfds[] = { + { (kernel_ulong_t) 0xfacefeed00000001ULL, "1" }, + { (kernel_ulong_t) 0xdec0ded0ffffffffULL, "FAN_NOFD" }, + { (kernel_ulong_t) 0xbadfacedffffff9cULL, "AT_FDCWD" }, + { (kernel_ulong_t) 0xdefaced1beeff00dULL, "-1091571699" }, + }; + static const char str64[] = STR64; + + static char bogus_path1_addr[sizeof("0x") + sizeof(void *) * 2]; + static char bogus_path1_after_addr[sizeof("0x") + sizeof(void *) * 2]; + + char *bogus_path1 = tail_memdup(str64, PATH1_SIZE); + char *bogus_path2 = tail_memdup(str64, sizeof(str64)); + + struct strval paths[] = { + { (kernel_ulong_t) 0, "NULL" }, + { (kernel_ulong_t) (uintptr_t) (bogus_path1 + PATH1_SIZE), + bogus_path1_after_addr }, + { (kernel_ulong_t) (uintptr_t) bogus_path1, bogus_path1_addr }, + { (kernel_ulong_t) (uintptr_t) bogus_path2, "\"" STR64 "\"" }, + }; + + unsigned int i; + unsigned int j; + unsigned int k; + unsigned int l; + unsigned int m; + int rc; + + + snprintf(bogus_path1_addr, sizeof(bogus_path1_addr), "%p", bogus_path1); + snprintf(bogus_path1_after_addr, sizeof(bogus_path1_after_addr), "%p", + bogus_path1 + PATH1_SIZE); + + rc = fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY | FAN_ONDIR, + -100, "."); + printf("fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY|FAN_ONDIR" + ", AT_FDCWD, \".\") = %s\n", sprintrc(rc)); + + for (i = 0; i < ARRAY_SIZE(fds); i++) { + for (j = 0; j < ARRAY_SIZE(flags); j++) { + for (k = 0; k < ARRAY_SIZE(masks); k++) { + for (l = 0; l < ARRAY_SIZE(dirfds); l++) { + for (m = 0; m < ARRAY_SIZE(paths); m++) + do_call(fds[i], + flags[j].val, + flags[j].str, + masks[k].val, + masks[k].str, + dirfds[l].val, + dirfds[l].str, + paths[m].val, + paths[m].str); + } + } + } + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYS_FANOTIFY_H && HAVE_FANOTIFY_MARK && " + "__NR_fanotify_mark") + +#endif diff --git a/tests-m32/fanotify_mark.test b/tests-m32/fanotify_mark.test new file mode 100755 index 000000000..fd6713876 --- /dev/null +++ b/tests-m32/fanotify_mark.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fanotify_mark syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 diff --git a/tests-m32/fchdir.c b/tests-m32/fchdir.c new file mode 100644 index 000000000..3cde5e635 --- /dev/null +++ b/tests-m32/fchdir.c @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_fchdir + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_fchdir, fd); + printf("fchdir(%d) = %ld %s (%m)\n", + (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchdir") + +#endif diff --git a/tests-m32/fchdir.test b/tests-m32/fchdir.test new file mode 100755 index 000000000..3a4296ed1 --- /dev/null +++ b/tests-m32/fchdir.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff --git a/tests-m32/fchmod.c b/tests-m32/fchmod.c new file mode 100644 index 000000000..932d08301 --- /dev/null +++ b/tests-m32/fchmod.c @@ -0,0 +1,72 @@ +/* + * Check decoding of fchmod syscall. + * + * Copyright (c) 2016 Fabien Siron + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fchmod + +# include +# include +# include +# include + +int +main(void) +{ + static const char fname[] = "fchmod_test_file"; + + int fd = open(fname, O_CREAT|O_RDONLY, 0400); + if (fd < 0) + perror_msg_and_fail("open"); + + if (unlink(fname)) + perror_msg_and_fail("unlink"); + + long rc = syscall(__NR_fchmod, fd, 0600); + printf("fchmod(%d, 0600) = %s\n", fd, sprintrc(rc)); + + close(fd); + + rc = syscall(__NR_fchmod, fd, 051); + printf("fchmod(%d, 051) = %s\n", fd, sprintrc(rc)); + + rc = syscall(__NR_fchmod, fd, 004); + printf("fchmod(%d, 004) = %s\n", fd, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchmod") + +#endif diff --git a/tests-m32/fchmod.test b/tests-m32/fchmod.test new file mode 100755 index 000000000..4cb126329 --- /dev/null +++ b/tests-m32/fchmod.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchmod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a15 diff --git a/tests-m32/fchmodat.c b/tests-m32/fchmodat.c new file mode 100644 index 000000000..c52a1cabc --- /dev/null +++ b/tests-m32/fchmodat.c @@ -0,0 +1,71 @@ +/* + * Check decoding of fchmodat syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fchmodat + +# include +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "fchmodat_sample"; + + if (open(sample, O_RDONLY | O_CREAT, 0400) < 0) + perror_msg_and_fail("open"); + + long rc = syscall(__NR_fchmodat, -100, sample, 0600); + printf("fchmodat(AT_FDCWD, \"%s\", 0600) = %s\n", + sample, sprintrc(rc)); + + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + rc = syscall(__NR_fchmodat, -100, sample, 051); + printf("fchmodat(AT_FDCWD, \"%s\", 051) = %s\n", + sample, sprintrc(rc)); + + rc = syscall(__NR_fchmodat, -100, sample, 004); + printf("fchmodat(AT_FDCWD, \"%s\", 004) = %s\n", + sample, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchmodat") + +#endif diff --git a/tests-m32/fchmodat.test b/tests-m32/fchmodat.test new file mode 100755 index 000000000..13cbe806a --- /dev/null +++ b/tests-m32/fchmodat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fchmodat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/fchown.c b/tests-m32/fchown.c new file mode 100644 index 000000000..d71190320 --- /dev/null +++ b/tests-m32/fchown.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_fchown + +# define SYSCALL_NR __NR_fchown +# define SYSCALL_NAME "fchown" +# define ACCESS_BY_DESCRIPTOR + +# if defined __NR_fchown32 && __NR_fchown != __NR_fchown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchown") + +#endif diff --git a/tests-m32/fchown.test b/tests-m32/fchown.test new file mode 100755 index 000000000..63a0f2e3a --- /dev/null +++ b/tests-m32/fchown.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 diff --git a/tests-m32/fchown32.c b/tests-m32/fchown32.c new file mode 100644 index 000000000..2d9d60f8f --- /dev/null +++ b/tests-m32/fchown32.c @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_fchown32 + +# define SYSCALL_NR __NR_fchown32 +# define SYSCALL_NAME "fchown32" +# define ACCESS_BY_DESCRIPTOR +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchown32") + +#endif diff --git a/tests-m32/fchown32.test b/tests-m32/fchown32.test new file mode 100755 index 000000000..e837f54ef --- /dev/null +++ b/tests-m32/fchown32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff --git a/tests-m32/fchownat.c b/tests-m32/fchownat.c new file mode 100644 index 000000000..f2f37ae3e --- /dev/null +++ b/tests-m32/fchownat.c @@ -0,0 +1,69 @@ +/* + * Check decoding of fchownat syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_fchownat && defined AT_FDCWD && defined AT_SYMLINK_NOFOLLOW + +# include +# include + +int +main(void) +{ + static const char sample[] = "fchownat_sample"; + uid_t uid = geteuid(); + uid_t gid = getegid(); + + if (open(sample, O_RDONLY | O_CREAT, 0400) == -1) + perror_msg_and_fail("open"); + + long rc = syscall(__NR_fchownat, AT_FDCWD, sample, uid, gid, 0); + printf("fchownat(AT_FDCWD, \"%s\", %d, %d, 0) = %s\n", + sample, uid, gid, sprintrc(rc)); + + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + rc = syscall(__NR_fchownat, AT_FDCWD, + sample, -1, -1L, AT_SYMLINK_NOFOLLOW); + printf("fchownat(AT_FDCWD, \"%s\", -1, -1, AT_SYMLINK_NOFOLLOW) = %s\n", + sample, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchownat && AT_FDCWD && AT_SYMLINK_NOFOLLOW") + +#endif diff --git a/tests-m32/fchownat.test b/tests-m32/fchownat.test new file mode 100755 index 000000000..e5d0f2857 --- /dev/null +++ b/tests-m32/fchownat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fchownat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/fcntl.c b/tests-m32/fcntl.c new file mode 100644 index 000000000..f060cdf8f --- /dev/null +++ b/tests-m32/fcntl.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fcntl + +# define TEST_SYSCALL_NR __NR_fcntl +# define TEST_SYSCALL_STR "fcntl" +# include "struct_flock.c" + +# define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) + +static void +test_flock64_einval(const int cmd, const char *name) +{ + struct_kernel_flock64 fl = { + .l_type = F_RDLCK, + .l_start = 0xdefaced1facefeedULL, + .l_len = 0xdefaced2cafef00dULL + }; + invoke_test_syscall(cmd, &fl); + printf("%s(0, %s, %p) = %s\n", + TEST_SYSCALL_STR, name, &fl, EINVAL_STR); +} + +static void +test_flock64(void) +{ +/* + * F_[GS]ETOWN_EX had conflicting values with F_[GS]ETLK64 + * in kernel revisions v2.6.32-rc1~96..v2.6.32-rc7~23. + */ +#if !defined(F_GETOWN_EX) || F_GETOWN_EX != F_SETLK64 + TEST_FLOCK64_EINVAL(F_SETLK64); +#endif +/* F_GETLK and F_SETLKW64 have conflicting values on mips64 */ +#if !defined(__mips64) || F_GETLK != F_SETLKW64 + TEST_FLOCK64_EINVAL(F_SETLKW64); +#endif +#if !defined(F_SETOWN_EX) || F_SETOWN_EX != F_GETLK64 + TEST_FLOCK64_EINVAL(F_GETLK64); +#endif +} + +int +main(void) +{ + create_sample(); + test_flock(); + test_flock64(); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fcntl") + +#endif diff --git a/tests-m32/fcntl.test b/tests-m32/fcntl.test new file mode 100755 index 000000000..9aea122d7 --- /dev/null +++ b/tests-m32/fcntl.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fcntl decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 diff --git a/tests-m32/fcntl64.c b/tests-m32/fcntl64.c new file mode 100644 index 000000000..5ecd6eb98 --- /dev/null +++ b/tests-m32/fcntl64.c @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fcntl64 + +# define TEST_SYSCALL_NR __NR_fcntl64 +# define TEST_SYSCALL_STR "fcntl64" +# include "struct_flock.c" + +# define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) + +static void +test_flock64_einval(const int cmd, const char *name) +{ + struct_kernel_flock64 fl = { + .l_type = F_RDLCK, + .l_start = 0xdefaced1facefeedULL, + .l_len = 0xdefaced2cafef00dULL + }; + invoke_test_syscall(cmd, &fl); + printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET" + ", l_start=%jd, l_len=%jd}) = %s\n", TEST_SYSCALL_STR, name, + (intmax_t) fl.l_start, (intmax_t) fl.l_len, EINVAL_STR); +} + +static void +test_flock64(void) +{ + TEST_FLOCK64_EINVAL(F_SETLK64); + TEST_FLOCK64_EINVAL(F_SETLKW64); +# ifdef F_OFD_SETLK + TEST_FLOCK64_EINVAL(F_OFD_SETLK); + TEST_FLOCK64_EINVAL(F_OFD_SETLKW); +# endif + + struct_kernel_flock64 fl = { + .l_type = F_RDLCK, + .l_len = FILE_LEN + }; + long rc = invoke_test_syscall(F_SETLK64, &fl); + printf("%s(0, F_SETLK64, {l_type=F_RDLCK, l_whence=SEEK_SET" + ", l_start=0, l_len=%d}) = %s\n", + TEST_SYSCALL_STR, FILE_LEN, rc ? EINVAL_STR : "0"); + + if (rc) + return; + + invoke_test_syscall(F_GETLK64, &fl); + printf("%s(0, F_GETLK64, {l_type=F_UNLCK, l_whence=SEEK_SET" + ", l_start=0, l_len=%d, l_pid=0}) = 0\n", + TEST_SYSCALL_STR, FILE_LEN); + + invoke_test_syscall(F_SETLK64, &fl); + printf("%s(0, F_SETLK64, {l_type=F_UNLCK, l_whence=SEEK_SET" + ", l_start=0, l_len=%d}) = 0\n", + TEST_SYSCALL_STR, FILE_LEN); +} + +int +main(void) +{ + create_sample(); + test_flock(); + test_flock64(); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fcntl64") + +#endif diff --git a/tests-m32/fcntl64.test b/tests-m32/fcntl64.test new file mode 100755 index 000000000..00ba671ab --- /dev/null +++ b/tests-m32/fcntl64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fcntl64 syscall decoding. + +. "${srcdir=.}/fcntl.test" diff --git a/tests-m32/fdatasync.c b/tests-m32/fdatasync.c new file mode 100644 index 000000000..fc82ade33 --- /dev/null +++ b/tests-m32/fdatasync.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_fdatasync + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_fdatasync, fd); + printf("fdatasync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fdatasync") + +#endif diff --git a/tests-m32/fdatasync.test b/tests-m32/fdatasync.test new file mode 100755 index 000000000..ff59749f9 --- /dev/null +++ b/tests-m32/fdatasync.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fdatasync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff --git a/tests-m32/file_handle.c b/tests-m32/file_handle.c new file mode 100644 index 000000000..a5ad6c73d --- /dev/null +++ b/tests-m32/file_handle.c @@ -0,0 +1,356 @@ +/* + * Check decoding of name_to_handle_at and open_by_handle_at syscalls. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_name_to_handle_at && defined __NR_open_by_handle_at + +# include +# include +# include +# include +# include +# include +# include + +enum assert_rc { + ASSERT_NONE, + ASSERT_SUCCESS, + ASSERT_ERROR, +}; + +# ifndef MAX_HANDLE_SZ + +# define MAX_HANDLE_SZ 128 + +struct file_handle { + unsigned int handle_bytes; + int handle_type; + unsigned char f_handle[0]; +}; +# endif /* !MAX_HANDLE_SZ */ + + +void +print_handle_data(unsigned char *bytes, unsigned int size) +{ + unsigned int i; + + if (size > MAX_HANDLE_SZ) + size = MAX_HANDLE_SZ; + + printf("0x"); + for (i = 0; i < size; ++i) + printf("%02x", bytes[i]); +} + +void +do_name_to_handle_at(kernel_ulong_t dirfd, const char *dirfd_str, + kernel_ulong_t pathname, const char *pathname_str, + kernel_ulong_t handle, const char *handle_str, + kernel_ulong_t mount_id, + kernel_ulong_t flags, const char *flags_str, + enum assert_rc assert_rc, long assert_errno) +{ + long rc; + const char *errstr; + + rc = syscall(__NR_name_to_handle_at, dirfd, pathname, handle, mount_id, + flags); + errstr = sprintrc(rc); + + if (assert_rc != ASSERT_NONE) + assert(rc == (assert_rc == ASSERT_SUCCESS ? 0 : -1)); + if (assert_errno) + assert(errno != assert_errno); + + printf("name_to_handle_at(%s, %s, %s", + dirfd_str, pathname_str, handle_str); + + if (rc != -1) { + struct file_handle *fh = + (struct file_handle *) (uintptr_t) handle; + int *mount_id_ptr = (int *) (uintptr_t) mount_id; + + printf(" => %u, handle_type=%d, f_handle=", + fh->handle_bytes, fh->handle_type); + print_handle_data((unsigned char *) fh + + sizeof(struct file_handle), + fh->handle_bytes); + printf("}, [%d]", *mount_id_ptr); + } else { + if (mount_id) + printf(", %#llx", (unsigned long long) mount_id); + else + printf(", NULL"); + } + + printf(", %s) = %s\n", flags_str, errstr); +} + +void +do_open_by_handle_at(kernel_ulong_t mount_fd, + kernel_ulong_t handle, bool valid_handle, bool valid_data, + kernel_ulong_t flags, const char *flags_str) +{ + long rc; + + printf("open_by_handle_at(%d, ", (int) mount_fd); + if (valid_handle) { + struct file_handle *fh = + (struct file_handle *) (uintptr_t) handle; + + printf("{handle_bytes=%u, handle_type=%d", fh->handle_bytes, + fh->handle_type); + + if (valid_data) { + printf(", f_handle="); + print_handle_data((unsigned char *) fh + + sizeof(struct file_handle), + fh->handle_bytes); + } + + printf("}"); + } else { + if (handle) + printf("%#llx", (unsigned long long) handle); + else + printf("NULL"); + } + printf(", %s) = ", flags_str); + + rc = syscall(__NR_open_by_handle_at, mount_fd, handle, flags); + + printf("%s\n", sprintrc(rc)); +} + +struct strval { + kernel_ulong_t val; + const char *str; +}; + +#define STR16 "0123456789abcdef" +#define STR64 STR16 STR16 STR16 STR16 + +int +main(void) +{ + enum { + PATH1_SIZE = 64, + }; + + static const kernel_ulong_t fdcwd = + (kernel_ulong_t) 0x87654321ffffff9cULL; + static const struct strval dirfds[] = { + { (kernel_ulong_t) 0xdeadca57badda7a1ULL, "-1159878751" }, + { (kernel_ulong_t) 0x12345678ffffff9cULL, "AT_FDCWD" }, + }; + static const struct strval name_flags[] = { + { (kernel_ulong_t) 0xdeadf15700000000ULL, "0" }, + { (kernel_ulong_t) 0xbadc0ded00001000ULL, + "AT_EMPTY_PATH" }, + { (kernel_ulong_t) 0xdeadc0deda7a1457ULL, + "AT_SYMLINK_FOLLOW|AT_EMPTY_PATH|0xda7a0057" }, + { (kernel_ulong_t) 0xdefaced1ffffebffULL, + "0xffffebff /* AT_??? */" }, + }; + static const kernel_ulong_t mount_fds[] = { + (kernel_ulong_t) 0xdeadca5701234567ULL, + (kernel_ulong_t) 0x12345678ffffff9cULL, + }; + static const struct strval open_flags[] = { + { (kernel_ulong_t) 0xffffffff00000000ULL, "O_RDONLY" }, + { (kernel_ulong_t) 0xdeadbeef80000001ULL, + "O_WRONLY|0x80000000" } + }; + + static const char str64[] = STR64; + + + char *bogus_path1 = tail_memdup(str64, PATH1_SIZE); + char *bogus_path2 = tail_memdup(str64, sizeof(str64)); + + struct file_handle *handle = + tail_alloc(sizeof(struct file_handle) + MAX_HANDLE_SZ); + struct file_handle *handle_0 = + tail_alloc(sizeof(struct file_handle) + 0); + struct file_handle *handle_8 = + tail_alloc(sizeof(struct file_handle) + 8); + struct file_handle *handle_128 = + tail_alloc(sizeof(struct file_handle) + 128); + struct file_handle *handle_256 = + tail_alloc(sizeof(struct file_handle) + 256); + int *bogus_mount_id = tail_alloc(sizeof(*bogus_mount_id)); + + char handle_0_addr[sizeof("0x") + sizeof(void *) * 2]; + + char bogus_path1_addr[sizeof("0x") + sizeof(void *) * 2]; + char bogus_path1_after_addr[sizeof("0x") + sizeof(void *) * 2]; + + + struct strval paths[] = { + { (kernel_ulong_t) 0, "NULL" }, + { (kernel_ulong_t) (uintptr_t) (bogus_path1 + PATH1_SIZE), + bogus_path1_after_addr }, + { (kernel_ulong_t) (uintptr_t) bogus_path1, bogus_path1_addr }, + { (kernel_ulong_t) (uintptr_t) bogus_path2, "\"" STR64 "\"" }, + }; + struct strval name_handles[] = { + { (uintptr_t) (handle_0 + sizeof(struct file_handle)), + handle_0_addr }, + { (uintptr_t) handle_0, "{handle_bytes=256}" }, + { (uintptr_t) handle_8, "{handle_bytes=0}" }, + { (uintptr_t) handle_128, "{handle_bytes=128}" }, + { (uintptr_t) handle_256, "{handle_bytes=256}" }, + }; + struct { + kernel_ulong_t addr; + bool valid; + bool valid_data; + } open_handles[] = { + { 0, false, false }, + { (uintptr_t) (handle_0 + sizeof(struct file_handle)), + false, false }, + { (uintptr_t) handle_0 + 4, false, false }, + { (uintptr_t) handle_0, true, false }, + { (uintptr_t) handle_8, true, true }, + { (uintptr_t) handle_128, true, true }, + { (uintptr_t) handle_256, true, true }, + }; + kernel_ulong_t mount_ids[] = { + 0, + (kernel_ulong_t) (uintptr_t) (bogus_mount_id + 1), + (kernel_ulong_t) (uintptr_t) bogus_mount_id, + }; + + const int flags = 0x400; + int mount_id; + unsigned int i; + unsigned int j; + unsigned int k; + unsigned int l; + unsigned int m; + + + snprintf(bogus_path1_addr, sizeof(bogus_path1_addr), "%p", bogus_path1); + snprintf(bogus_path1_after_addr, sizeof(bogus_path1_after_addr), "%p", + bogus_path1 + PATH1_SIZE); + + handle_0->handle_bytes = 256; + handle_8->handle_bytes = 0; + handle_128->handle_bytes = 128; + handle_256->handle_bytes = 256; + + fill_memory((char *) handle_128 + sizeof(struct file_handle), 128); + fill_memory((char *) handle_256 + sizeof(struct file_handle), 256); + + snprintf(handle_0_addr, sizeof(handle_0_addr), "%p", + handle_0 + sizeof(struct file_handle)); + + handle->handle_bytes = 0; + + assert(syscall(__NR_name_to_handle_at, fdcwd, ".", handle, &mount_id, + flags | 1) == -1); + if (EINVAL != errno) + perror_msg_and_skip("name_to_handle_at"); + printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=0}, %p" + ", AT_SYMLINK_FOLLOW|0x1) = -1 EINVAL (%m)\n", &mount_id); + + assert(syscall(__NR_name_to_handle_at, fdcwd, ".", handle, &mount_id, + flags) == -1); + if (EOVERFLOW != errno) + perror_msg_and_skip("name_to_handle_at"); + printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=0 => %u}" + ", %p, AT_SYMLINK_FOLLOW) = -1 EOVERFLOW (%m)\n", + handle->handle_bytes, &mount_id); + + assert(syscall(__NR_name_to_handle_at, fdcwd, ".", handle, &mount_id, + flags) == 0); + printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=%u" + ", handle_type=%d, f_handle=0x", + handle->handle_bytes, handle->handle_type); + for (i = 0; i < handle->handle_bytes; ++i) + printf("%02x", handle->f_handle[i]); + printf("}, [%d], AT_SYMLINK_FOLLOW) = 0\n", mount_id); + + printf("open_by_handle_at(-1, {handle_bytes=%u, handle_type=%d" + ", f_handle=0x", handle->handle_bytes, handle->handle_type); + for (i = 0; i < handle->handle_bytes; ++i) + printf("%02x", handle->f_handle[i]); + int rc = syscall(__NR_open_by_handle_at, -1, handle, + O_RDONLY | O_DIRECTORY); + printf("}, O_RDONLY|O_DIRECTORY) = %d %s (%m)\n", rc, errno2name()); + + for (i = 0; i < ARRAY_SIZE(dirfds); i++) { + for (j = 0; j < ARRAY_SIZE(paths); j++) { + for (k = 0; k < ARRAY_SIZE(name_handles); k++) { + for (l = 0; l < ARRAY_SIZE(mount_ids); l++) { + for (m = 0; m < ARRAY_SIZE(name_flags); + m++) { + do_name_to_handle_at( + dirfds[i].val, + dirfds[i].str, + paths[j].val, + paths[j].str, + name_handles[k].val, + name_handles[k].str, + mount_ids[l], + name_flags[m].val, + name_flags[m].str, + ASSERT_ERROR, 0); + } + } + } + } + } + + for (i = 0; i < ARRAY_SIZE(mount_fds); i++) { + for (j = 0; j < ARRAY_SIZE(open_handles); j++) { + for (k = 0; k < ARRAY_SIZE(open_flags); k++) { + do_open_by_handle_at(mount_fds[i], + open_handles[j].addr, + open_handles[j].valid, + open_handles[j].valid_data, + open_flags[k].val, + open_flags[k].str); + } + } + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_name_to_handle_at && __NR_open_by_handle_at") + +#endif diff --git a/tests-m32/file_handle.test b/tests-m32/file_handle.test new file mode 100755 index 000000000..1ccc9d457 --- /dev/null +++ b/tests-m32/file_handle.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check name_to_handle_at and open_by_handle_at syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=name_to_handle_at,open_by_handle_at diff --git a/tests-m32/file_ioctl.c b/tests-m32/file_ioctl.c new file mode 100644 index 000000000..0fe17b15d --- /dev/null +++ b/tests-m32/file_ioctl.c @@ -0,0 +1,45 @@ +#include "tests.h" + +#ifdef HAVE_LINUX_FIEMAP_H + +# include +# include +# include +# include +# include "xlat.h" +# include "xlat/fiemap_flags.h" + +static void +test_fiemap(void) +{ + (void) tail_alloc(1); + struct fiemap *const args = tail_alloc(sizeof(*args)); + + printf("ioctl(-1, FS_IOC_FIEMAP, {fm_start=%" PRI__u64 + ", fm_length=%" PRI__u64", fm_flags=", + args->fm_start, args->fm_length); + printflags(fiemap_flags, args->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_extent_count=%u})", args->fm_extent_count); + ioctl(-1, FS_IOC_FIEMAP, args); + printf(" = -1 EBADF (%m)\n"); + + /* The live version of this test is in btrfs.c */ +} + +/* clone and dedupe ioctls are in btrfs.c since they originated there */ + +int +main(int argc, char *argv[]) +{ + test_fiemap(); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_FIEMAP_H") + +#endif diff --git a/tests-m32/file_ioctl.test b/tests-m32/file_ioctl.test new file mode 100755 index 000000000..7b8b8ce84 --- /dev/null +++ b/tests-m32/file_ioctl.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check FS_IOC_FIEMAP ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-m32/fill_memory.c b/tests-m32/fill_memory.c new file mode 100644 index 000000000..a0aeccba1 --- /dev/null +++ b/tests-m32/fill_memory.c @@ -0,0 +1,19 @@ +#include "tests.h" + +void +fill_memory_ex(void *ptr, size_t size, unsigned char start, + unsigned char period) +{ + unsigned char *p = ptr; + size_t i; + + for (i = 0; i < size; i++) { + p[i] = start + i % period; + } +} + +void +fill_memory(void *ptr, size_t size) +{ + fill_memory_ex(ptr, size, 0x80, 0x80); +} diff --git a/tests-m32/filter-unavailable.c b/tests-m32/filter-unavailable.c new file mode 100644 index 000000000..6368b2cb8 --- /dev/null +++ b/tests-m32/filter-unavailable.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#define P 16 +#define T 7 + +static void * +thread(void *arg) +{ + assert(write(1, "", 1) == 1); + pause(); + return arg; +} + +static int +process(void) +{ + int i; + int fds[2]; + pthread_t t; + struct timespec ts = { .tv_nsec = 10000000 }; + + (void) close(0); + (void) close(1); + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + for (i = 0; i < T; ++i) + assert(pthread_create(&t, NULL, thread, NULL) == 0); + for (i = 0; i < T; ++i) + assert(read(0, fds, 1) == 1); + + (void) nanosleep(&ts, 0); + return 0; +} + +int +main(void) +{ + int i, s; + pid_t p; + + for (i = 0; i < P; ++i) { + p = fork(); + if (p < 0) + perror_msg_and_fail("fork"); + if (p == 0) + return process(); + assert(waitpid(p, &s, 0) == p); + assert(WIFEXITED(s)); + if (WEXITSTATUS(s)) + return WEXITSTATUS(s); + } + return 0; +} diff --git a/tests-m32/filter-unavailable.expected b/tests-m32/filter-unavailable.expected new file mode 100644 index 000000000..e69de29bb diff --git a/tests-m32/filter-unavailable.test b/tests-m32/filter-unavailable.test new file mode 100755 index 000000000..15a9ad1d3 --- /dev/null +++ b/tests-m32/filter-unavailable.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# check that syscalls are filtered properly + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -qq -f -echdir -esignal=none $args +match_diff + +exit 0 diff --git a/tests-m32/finit_module.c b/tests-m32/finit_module.c new file mode 100644 index 000000000..3f0178f73 --- /dev/null +++ b/tests-m32/finit_module.c @@ -0,0 +1,118 @@ +/* + * Check decoding of finit_module syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include "scno.h" + +#if defined(__NR_finit_module) + +# include +# include + +# include "init_delete_module.h" + +int +main(void) +{ + static const kernel_ulong_t bogus_fd = + (kernel_ulong_t) 0xdeb0d1edbeeff00dULL; + + static const struct { + kernel_ulong_t val; + const char *str; + } flags[] = { + { ARG_STR(0) }, + { (kernel_ulong_t) 0xffffffff00000002ULL, + "MODULE_INIT_IGNORE_VERMAGIC" }, + { (kernel_ulong_t) 0xbadc0deddefaced0ULL, + "0xdefaced0 /* MODULE_INIT_??? */" }, + { (kernel_ulong_t) 0xfacef157dec0ded1ULL, + "MODULE_INIT_IGNORE_MODVERSIONS|0xdec0ded0" }, + { -1LL, "MODULE_INIT_IGNORE_MODVERSIONS|" + "MODULE_INIT_IGNORE_VERMAGIC|0xfffffffc" }, + }; + + long rc; + char *bogus_param1 = tail_alloc(PARAM1_LEN); + char *bogus_param2 = tail_alloc(PARAM2_LEN); + const char *errstr; + + fill_memory_ex(bogus_param1, PARAM1_LEN, PARAM1_BASE, PARAM1_LEN); + fill_memory_ex(bogus_param2, PARAM2_LEN, PARAM2_BASE, PARAM2_LEN); + + rc = syscall(__NR_finit_module, bogus_zero, NULL, bogus_zero); + printf("finit_module(0, NULL, 0) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param1, flags[0].val); + errstr = sprintrc(rc); + + printf("finit_module(%d, \"", (int) bogus_fd); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\"..., %s) = %s\n", flags[0].str, errstr); + + bogus_param1[PARAM1_LEN - 1] = '\0'; + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param1, flags[1].val); + errstr = sprintrc(rc); + + printf("finit_module(%d, \"", (int) bogus_fd); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\", %s) = %s\n", flags[1].str, errstr); + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param2 + PARAM2_LEN, + flags[2].val); + printf("finit_module(%d, %p, %s) = %s\n", + (int) bogus_fd, bogus_param2 + PARAM2_LEN, flags[2].str, + sprintrc(rc)); + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param2, flags[3].val); + printf("finit_module(%d, %p, %s) = %s\n", + (int) bogus_fd, bogus_param2, flags[3].str, sprintrc(rc)); + + bogus_param2[PARAM2_LEN - 1] = '\0'; + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param2, flags[4].val); + errstr = sprintrc(rc); + + printf("finit_module(%d, \"", (int) bogus_fd); + print_str(PARAM2_BASE, PARAM2_LEN - 1, true); + printf("\", %s) = %s\n", flags[4].str, errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_finit_module"); + +#endif diff --git a/tests-m32/finit_module.test b/tests-m32/finit_module.test new file mode 100755 index 000000000..bd644f386 --- /dev/null +++ b/tests-m32/finit_module.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of finit_module syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff --git a/tests-m32/flock.c b/tests-m32/flock.c new file mode 100644 index 000000000..c154e4379 --- /dev/null +++ b/tests-m32/flock.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_flock + +# include +# include +# include + +int +main(void) +{ + const unsigned long fd = (long int) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_flock, fd, LOCK_SH); + printf("flock(%d, LOCK_SH) = %ld %s (%m)\n", + (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_flock") + +#endif diff --git a/tests-m32/flock.test b/tests-m32/flock.test new file mode 100755 index 000000000..24fcd74cd --- /dev/null +++ b/tests-m32/flock.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check flock syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff --git a/tests-m32/fork-f.c b/tests-m32/fork-f.c new file mode 100644 index 000000000..11ac3d970 --- /dev/null +++ b/tests-m32/fork-f.c @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static inline int +logit_(const char *const str) +{ + return !chdir(str); +} + +#define prefix "fork-f." +#define logit(arg) logit_(prefix arg) + +int main(int ac, char **av) +{ + if (ac < 1) + return 1; + if (ac > 1) + return logit("exec"); + + logit("start"); + + int child_wait_fds[2]; + (void) close(0); + if (pipe(child_wait_fds)) + perror_msg_and_fail("pipe"); + + pid_t pid = fork(); + + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + close(child_wait_fds[1]); + + if (read(0, child_wait_fds, sizeof(int))) + _exit(2); + + char *const args[] = { av[0], (char *) "", NULL }; + if (logit("child") || execve(args[0], args, args + 1)) + _exit(2); + } + + close(0); + + logit("parent"); + close(child_wait_fds[1]); + + int status; + assert(wait(&status) == pid); + assert(status == 0); + + pid_t ppid = getpid(); + logit("finish"); + + printf("%-5d chdir(\"%sstart\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sparent\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%schild\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sexec\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sfinish\") = -1 ENOENT (%m)\n", + ppid, prefix, + ppid, prefix, + pid, prefix, + pid, prefix, + ppid, prefix); + return 0; +} diff --git a/tests-m32/fork-f.test b/tests-m32/fork-f.test new file mode 100755 index 000000000..d8ca1e3ba --- /dev/null +++ b/tests-m32/fork-f.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check how strace -f follows fork syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a26 -qq -f -e trace=chdir -e signal=none diff --git a/tests-m32/fstat.c b/tests-m32/fstat.c new file mode 100644 index 000000000..12df3e19b --- /dev/null +++ b/tests-m32/fstat.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstat + +# define TEST_SYSCALL_NR __NR_fstat +# define TEST_SYSCALL_STR "fstat" +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 43147718418ULL) +# include "fstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstat") + +#endif diff --git a/tests-m32/fstat.test b/tests-m32/fstat.test new file mode 100755 index 000000000..2ba0fbaab --- /dev/null +++ b/tests-m32/fstat.test @@ -0,0 +1,19 @@ +#!/bin/sh + +# Check fstat syscall decoding. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +syscall=$NAME +run_prog > /dev/null +sample=$syscall.sample +> "$sample" +run_strace -ve$syscall -P$sample -a21 $args > "$OUT" +match_diff "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests-m32/fstat64.c b/tests-m32/fstat64.c new file mode 100644 index 000000000..a9c2e0725 --- /dev/null +++ b/tests-m32/fstat64.c @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstat64 + +# define TEST_SYSCALL_NR __NR_fstat64 +# define TEST_SYSCALL_STR "fstat64" +# define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" +# define STRUCT_STAT_IS_STAT64 1 +# include "fstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstat64") + +#endif diff --git a/tests-m32/fstat64.test b/tests-m32/fstat64.test new file mode 100755 index 000000000..8b4f5ef1c --- /dev/null +++ b/tests-m32/fstat64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstat64 syscall decoding. + +. "${srcdir=.}/fstat.test" diff --git a/tests-m32/fstatat.c b/tests-m32/fstatat.c new file mode 100644 index 000000000..66138c25e --- /dev/null +++ b/tests-m32/fstatat.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef HAVE_FSTATAT + +# define TEST_SYSCALL_INVOKE(sample, pst) \ + syscall(TEST_SYSCALL_NR, AT_FDCWD, sample, pst, AT_SYMLINK_NOFOLLOW) +# define PRINT_SYSCALL_HEADER(sample) \ + do { \ + int saved_errno = errno; \ + printf("%s(AT_FDCWD, \"%s\", ", TEST_SYSCALL_STR, sample) +# define PRINT_SYSCALL_FOOTER(rc) \ + errno = saved_errno; \ + printf(", AT_SYMLINK_NOFOLLOW) = %s\n", sprintrc(rc)); \ + } while (0) + +# include "xstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("HAVE_FSTATAT") + +#endif diff --git a/tests-m32/fstatat64.c b/tests-m32/fstatat64.c new file mode 100644 index 000000000..03082a8fb --- /dev/null +++ b/tests-m32/fstatat64.c @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstatat64 + +# define TEST_SYSCALL_NR __NR_fstatat64 +# define TEST_SYSCALL_STR "fstatat64" +# define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" +# define STRUCT_STAT_IS_STAT64 1 +# include "fstatat.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatat64") + +#endif diff --git a/tests-m32/fstatat64.test b/tests-m32/fstatat64.test new file mode 100755 index 000000000..484008ac1 --- /dev/null +++ b/tests-m32/fstatat64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstatat64 syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-m32/fstatfs.c b/tests-m32/fstatfs.c new file mode 100644 index 000000000..9e68c8d36 --- /dev/null +++ b/tests-m32/fstatfs.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstatfs + +# define SYSCALL_ARG_FMT "%d" +# define SYSCALL_ARG(file, desc) (desc) +# define SYSCALL_NR __NR_fstatfs +# define SYSCALL_NAME "fstatfs" +# include "xstatfs.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatfs") + +#endif diff --git a/tests-m32/fstatfs.test b/tests-m32/fstatfs.test new file mode 100755 index 000000000..646e66f2e --- /dev/null +++ b/tests-m32/fstatfs.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstatfs syscall decoding. + +. "${srcdir=.}/statfs.test" diff --git a/tests-m32/fstatfs64.c b/tests-m32/fstatfs64.c new file mode 100644 index 000000000..afc54aa92 --- /dev/null +++ b/tests-m32/fstatfs64.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstatfs64 + +# define SYSCALL_ARG_FMT "%d" +# define SYSCALL_ARG(file, desc) (desc) +# define SYSCALL_NR __NR_fstatfs64 +# define SYSCALL_NAME "fstatfs64" +# include "xstatfs64.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatfs64") + +#endif diff --git a/tests-m32/fstatfs64.test b/tests-m32/fstatfs64.test new file mode 100755 index 000000000..179ff1bf9 --- /dev/null +++ b/tests-m32/fstatfs64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstatfs64 syscall decoding. + +. "${srcdir=.}/statfs.test" diff --git a/tests-m32/fstatx.c b/tests-m32/fstatx.c new file mode 100644 index 000000000..f88d9a9c3 --- /dev/null +++ b/tests-m32/fstatx.c @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define IS_FSTAT 1 +#define TEST_SYSCALL_INVOKE(sample, pst) \ + syscall(TEST_SYSCALL_NR, 0, pst) +#define PRINT_SYSCALL_HEADER(sample) \ + do { \ + int saved_errno = errno; \ + printf("%s(0, ", TEST_SYSCALL_STR) +#define PRINT_SYSCALL_FOOTER(rc) \ + errno = saved_errno; \ + printf(") = %s\n", sprintrc(rc)); \ + } while (0) + +#include "xstatx.c" diff --git a/tests-m32/fsync.c b/tests-m32/fsync.c new file mode 100644 index 000000000..2f5041068 --- /dev/null +++ b/tests-m32/fsync.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_fsync + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_fsync, fd); + printf("fsync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fsync") + +#endif diff --git a/tests-m32/fsync.test b/tests-m32/fsync.test new file mode 100755 index 000000000..a58b67be4 --- /dev/null +++ b/tests-m32/fsync.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fsync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-m32/ftruncate.c b/tests-m32/ftruncate.c new file mode 100644 index 000000000..ee17455f0 --- /dev/null +++ b/tests-m32/ftruncate.c @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_ftruncate + +# include +# include + +int +main(void) +{ + const kernel_ulong_t len = (kernel_ulong_t) 0xdefaced0badc0deULL; + long rc; + + if (sizeof(len) > sizeof(long)) + rc = ftruncate(-1, len); + else + rc = syscall(__NR_ftruncate, -1L, len); + + printf("ftruncate(-1, %llu) = %ld %s (%m)\n", + (unsigned long long) len, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ftruncate") + +#endif diff --git a/tests-m32/ftruncate.test b/tests-m32/ftruncate.test new file mode 100755 index 000000000..ec8a1e05d --- /dev/null +++ b/tests-m32/ftruncate.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check ftruncate syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff --git a/tests-m32/ftruncate64.c b/tests-m32/ftruncate64.c new file mode 100644 index 000000000..90d9938fc --- /dev/null +++ b/tests-m32/ftruncate64.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_ftruncate64 + +# include +# include + +int +main(void) +{ + const off_t len = 0xdefaceddeadbeefULL; + + int rc = ftruncate(-1, len); + printf("ftruncate64(-1, %llu) = %d %s (%m)\n", + (unsigned long long) len, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ftruncate64") + +#endif diff --git a/tests-m32/ftruncate64.test b/tests-m32/ftruncate64.test new file mode 100755 index 000000000..906821029 --- /dev/null +++ b/tests-m32/ftruncate64.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check ftruncate64 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff --git a/tests-m32/futex.c b/tests-m32/futex.c new file mode 100644 index 000000000..586b95d5e --- /dev/null +++ b/tests-m32/futex.c @@ -0,0 +1,720 @@ +/* + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_futex + +# include +# include +# include +# include +# include +# include + +# include + +# ifndef FUTEX_PRIVATE_FLAG +# define FUTEX_PRIVATE_FLAG 128 +# endif +# ifndef FUTEX_CLOCK_REALTIME +# define FUTEX_CLOCK_REALTIME 256 +# endif +# ifndef FUTEX_CMD_MASK +# define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME) +# endif + +# include "xlat.h" +# include "xlat/futexops.h" +# include "xlat/futexwakeops.h" +# include "xlat/futexwakecmps.h" + +static struct timespec *tmout; + +void futex_error(int *uaddr, int op, unsigned long val, unsigned long timeout, + int *uaddr2, unsigned long val3, int rc) +{ + perror_msg_and_fail("futex(%p, %#x, %#x, %#lx, %p, %#x) = %d", + uaddr, op, (unsigned) val, timeout, uaddr, (unsigned) val3, rc); +} + +# define CHECK_FUTEX_GENERIC(uaddr, op, val, timeout, uaddr2, val3, check, \ + enosys) \ + do { \ + rc = syscall(__NR_futex, (uaddr), (op), (val), (timeout), \ + (uaddr2), (val3)); \ + /* It is here due to EPERM on WAKE_OP on AArch64 */ \ + if ((rc == -1) && (errno == EPERM)) \ + break; \ + if (enosys && (rc == -1) && (errno == ENOSYS)) \ + break; \ + if (!(check)) \ + futex_error((uaddr), (op), (val), \ + (unsigned long) (timeout), (int *) (uaddr2), \ + (val3), rc); \ + } while (0) + +# define CHECK_FUTEX_ENOSYS(uaddr, op, val, timeout, uaddr2, val3, check) \ + CHECK_FUTEX_GENERIC(uaddr, op, val, timeout, uaddr2, val3, check, 1) + +# define CHECK_FUTEX(uaddr, op, val, timeout, uaddr2, val3, check) \ + CHECK_FUTEX_GENERIC(uaddr, op, val, timeout, uaddr2, val3, check, 0) + +enum argmask { + ARG3 = 1 << 0, + ARG4 = 1 << 1, + ARG5 = 1 << 2, + ARG6 = 1 << 3, +}; + +void invalid_op(int *val, int op, uint32_t argmask, ...) +{ + static const unsigned long args[] = { + (unsigned long) 0xface1e55deadbee1ULL, + (unsigned long) 0xface1e56deadbee2ULL, + (unsigned long) 0xface1e57deadbee3ULL, + (unsigned long) 0xface1e58deadbee4ULL, + }; + /* Since timeout value is copied before full op check, we should provide + * some valid timeout address or NULL */ + int cmd = op & FUTEX_CMD_MASK; + bool valid_timeout = (cmd == FUTEX_WAIT) || (cmd == FUTEX_LOCK_PI) || + (cmd == FUTEX_WAIT_BITSET) || (cmd == FUTEX_WAIT_REQUEUE_PI); + bool timeout_is_val2 = (cmd == FUTEX_REQUEUE) || + (cmd == FUTEX_CMP_REQUEUE) || (cmd == FUTEX_WAKE_OP) || + (cmd == FUTEX_CMP_REQUEUE_PI); + const char *fmt; + int saved_errno; + int rc; + int i; + va_list ap; + + + CHECK_FUTEX(val, op, args[0], valid_timeout ? 0 : args[1], args[2], + args[3], (rc == -1) && (errno == ENOSYS)); + saved_errno = errno; + printf("futex(%p, %#x /* FUTEX_??? */", val, op); + + va_start(ap, argmask); + + for (i = 0; i < 4; i++) { + if (argmask & (1 << i)) { + fmt = va_arg(ap, const char *); + + printf(", "); + + if (((1 << i) == ARG3) || ((1 << i) == ARG6) || + (((1 << i) == ARG4) && timeout_is_val2)) + printf(fmt, (unsigned) args[i]); + else + printf(fmt, args[i]); + } + } + + va_end(ap); + + errno = saved_errno; + printf(") = -1 ENOSYS (%m)\n"); +} + +# define CHECK_INVALID_CLOCKRT(op, ...) \ + do { \ + invalid_op(uaddr, FUTEX_CLOCK_REALTIME | (op), __VA_ARGS__); \ + invalid_op(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_PRIVATE_FLAG | \ + (op), __VA_ARGS__); \ + } while (0) + +/* Value which differs from one stored in int *val */ +# define VAL ((unsigned long) 0xbadda7a0facefeedLLU) +# define VAL_PR ((unsigned) VAL) + +# define VAL2 ((unsigned long) 0xbadda7a0ca7b100dLLU) +# define VAL2_PR ((unsigned) VAL2) + +# define VAL3 ((unsigned long) 0xbadda7a09caffee1LLU) +# define VAL3_PR ((unsigned) VAL3) + +int +main(int argc, char *argv[]) +{ + int *uaddr = tail_alloc(sizeof(*uaddr)); + int *uaddr2 = tail_alloc(sizeof(*uaddr2)); + int rc; + unsigned i; + unsigned j; + + uaddr[0] = 0x1deadead; + uaddr2[0] = 0xbadf00d; + + tmout = tail_alloc(sizeof(*tmout)); + tmout->tv_sec = 123; + tmout->tv_nsec = 0xbadc0de; + + /* FUTEX_WAIT - check whether uaddr == val and sleep + * Possible flags: PRIVATE, CLOCK_RT (since 4.5) + * 1. uaddr - futex address + * 2. op - FUTEX_WAIT + * 3. val - expected value + * 4. timeout - address to timespec with timeout + * 5. uaddr2 - not used + * 6. val3 - not used + */ + + /* uaddr is NULL */ + CHECK_FUTEX(NULL, FUTEX_WAIT, VAL, tmout, uaddr2, VAL3, + (rc == -1) && (errno == EFAULT)); + printf("futex(NULL, FUTEX_WAIT, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + + /* uaddr is faulty */ + CHECK_FUTEX(uaddr + 1, FUTEX_WAIT, VAL, tmout, uaddr2, VAL3, + (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_WAIT, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + uaddr + 1, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, sprintrc(rc)); + + /* timeout is faulty */ + CHECK_FUTEX(uaddr, FUTEX_WAIT, VAL, tmout + 1, uaddr2, VAL3, + (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_WAIT, %u, %p) = %s\n", + uaddr, 0xfacefeed, tmout + 1, sprintrc(rc)); + + /* uaddr is not as provided; uaddr2 is faulty but ignored */ + CHECK_FUTEX(uaddr, FUTEX_WAIT, VAL, tmout, uaddr2 + 1, VAL3, + (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, sprintrc(rc)); + + /* uaddr is not as provided; uaddr2 is faulty but ignored */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAIT, VAL, tmout, + uaddr2 + 1, VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_PRIVATE, %u, {tv_sec=%jd, tv_nsec=%jd}) = " + "%s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, sprintrc(rc)); + + /* Next 2 tests are with CLOCKRT bit set */ + + /* Valid after v4.4-rc2-27-g337f130 */ + CHECK_FUTEX_ENOSYS(uaddr, + FUTEX_CLOCK_REALTIME | FUTEX_WAIT, + VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT|FUTEX_CLOCK_REALTIME, %u, " + "{tv_sec=%jd, tv_nsec=%jd}) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, + FUTEX_CLOCK_REALTIME | FUTEX_PRIVATE_FLAG | FUTEX_WAIT , + VAL, tmout, uaddr2, 0, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_PRIVATE|FUTEX_CLOCK_REALTIME, %u, " + "{tv_sec=%jd, tv_nsec=%jd}) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + + /* FUTEX_WAIT_BITSET - FUTEX_WAIT which provides additional bitmask + * which should be matched at least in one bit with + * wake mask in order to wake. + * Possible flags: PRIVATE, CLOCKRT + * 1. uaddr - futex address + * 2. op - FUTEX_TRYLOCK_PI + * 3. val - expected value stored in uaddr + * 4. timeout - timeout + * 5. uaddr2 - not used + * 6. val3 - bitmask + */ + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAIT_BITSET, VAL, tmout, uaddr2 + 1, + VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_BITSET, %u, {tv_sec=%jd, tv_nsec=%jd}, " + "%#x) = %s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, VAL3_PR, sprintrc(rc)); + + /* val3 of 0 is invalid */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAIT_BITSET, VAL, tmout, uaddr2 + 1, 0, + (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_WAIT_BITSET, %u, {tv_sec=%jd, tv_nsec=%jd}, " + "%#x) = %s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, 0, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAIT_BITSET, VAL, + tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_BITSET_PRIVATE, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %#x) = %s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, VAL3_PR, sprintrc(rc)); + + /* Next 3 tests are with CLOCKRT bit set */ + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_WAIT_BITSET, VAL, + tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %#x) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, VAL3_PR, + sprintrc(rc)); + + /* val3 of 0 is invalid */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_WAIT_BITSET, VAL, + tmout, uaddr2 + 1, 0, (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %#x) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, 0, + sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_PRIVATE_FLAG | + FUTEX_WAIT_BITSET, VAL, tmout, uaddr2 + 1, VAL3, + (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %#x) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, VAL3_PR, + sprintrc(rc)); + + /* FUTEX_WAKE - wake val processes waiting for uaddr + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_WAKE + * 3. val - how many processes to wake + * 4. timeout - not used + * 5. uaddr2 - not used + * 6. val3 - not used + */ + + /* Zero processes to wake is not a good idea, but it should return 0 */ + CHECK_FUTEX(uaddr, FUTEX_WAKE, 0, NULL, NULL, 0, (rc == 0)); + printf("futex(%p, FUTEX_WAKE, %u) = %s\n", uaddr, 0, sprintrc(rc)); + + /* Trying to wake some processes, but there's nothing to wake */ + CHECK_FUTEX(uaddr, FUTEX_WAKE, 10, NULL, NULL, 0, (rc == 0)); + printf("futex(%p, FUTEX_WAKE, %u) = %s\n", uaddr, 10, sprintrc(rc)); + + /* Trying to wake some processes, but there's nothing to wake */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAKE, 10, NULL, + NULL, 0, (rc == 0)); + printf("futex(%p, FUTEX_WAKE_PRIVATE, %u) = %s\n", uaddr, 10, + sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_WAKE, ARG3, "%u"); + + /* FUTEX_WAKE_BITSET - wake val processes waiting for uaddr which has at + * least one common bit with bitset provided in + * val3. + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_WAKE + * 3. val - how many processes to wake + * 4. timeout - not used + * 5. uaddr2 - not used + * 6. val3 - bitmask + */ + + /* Trying to wake some processes, but there's nothing to wake */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAKE_BITSET, 10, NULL, NULL, + VAL3, (rc == 0)); + printf("futex(%p, FUTEX_WAKE_BITSET, %u, %#x) = %s\n", uaddr, 10, + VAL3_PR, sprintrc(rc)); + + /* bitset 0 is invalid */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAKE_BITSET, 10, NULL, NULL, 0, + (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_WAKE_BITSET, %u, %#x) = %s\n", uaddr, 10, 0, + sprintrc(rc)); + + /* Trying to wake some processes, but there's nothing to wake */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAKE_BITSET, 10, + NULL, NULL, VAL3, (rc == 0)); + printf("futex(%p, FUTEX_WAKE_BITSET_PRIVATE, %u, %#x) = %s\n", uaddr, + 10, VAL3_PR, sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_WAKE_BITSET, ARG3 | ARG6, "%u", "%#x"); + + /* FUTEX_FD - deprecated + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_FD + * 3. val - signal number + * 4. timeout - not used + * 5. uaddr2 - not used + * 6. val3 - not used + */ + + /* FUTEX_FD is not implemented since 2.6.26 */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_FD, VAL, NULL, NULL, VAL3, + (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_FD, %u) = %s\n", uaddr, VAL_PR, sprintrc(rc)); + + /* FUTEX_FD is not implemented since 2.6.26 */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_FD, VAL, NULL, + NULL, VAL3, (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_FD|FUTEX_PRIVATE_FLAG, %u) = %s\n", uaddr, + VAL_PR, sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_FD, ARG3, "%u"); + + /* FUTEX_REQUEUE - wake val processes and re-queue rest on uaddr2 + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_REQUEUE + * 3. val - how many processes to wake + * 4. val2 - amount of processes to re-queue on uadr2 + * 5. uaddr2 - another futex address, to re-queue waiting processes on + * 6. val3 - not used + */ + + /* Trying to re-queue some processes but there's nothing to re-queue */ + CHECK_FUTEX(uaddr, FUTEX_REQUEUE, VAL, VAL2, uaddr2, VAL3, + (rc == 0)); + printf("futex(%p, FUTEX_REQUEUE, %u, %u, %p) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, sprintrc(rc)); + + /* Trying to re-queue some processes but there's nothing to re-queue */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_REQUEUE, VAL, VAL2, + uaddr2, VAL3, (rc == 0)); + printf("futex(%p, FUTEX_REQUEUE_PRIVATE, %u, %u, %p) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_REQUEUE, ARG3 | ARG4 | ARG5, "%u", "%u", + "%#lx"); + + /* FUTEX_CMP_REQUEUE - wake val processes and re-queue rest on uaddr2 + * if uaddr has value val3 + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_CMP_REQUEUE + * 3. val - how many processes to wake + * 4. val2 - amount of processes to re-queue on uadr2 + * 5. uaddr2 - another futex address, to re-queue waiting processes on + * 6. val3 - expected value stored in uaddr + */ + + /* Comparison re-queue with wrong val value */ + CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VAL, VAL2, uaddr2, VAL3, + (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, VAL3_PR, sprintrc(rc)); + + /* Successful comparison re-queue */ + CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VAL, VAL2, uaddr2, *uaddr, + (rc == 0)); + printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc)); + + /* Successful comparison re-queue */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_CMP_REQUEUE, VAL, + VAL2, uaddr2, *uaddr, (rc == 0)); + printf("futex(%p, FUTEX_CMP_REQUEUE_PRIVATE, %u, %u, %p, %u) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_CMP_REQUEUE, ARG3 | ARG4 | ARG5 | ARG6, + "%u", "%u", "%#lx", "%u"); + + /* FUTEX_WAKE_OP - wake val processes waiting for uaddr, additionally + * wake val2 processes waiting for uaddr2 in case + * operation encoded in val3 (change of value at uaddr2 + * and comparison of previous value against provided + * constant) succeedes with value at uaddr2. Operation + * result is written to value of uaddr2 (in any case). + * 1. uaddr - futex address + * 2. op - FUTEX_WAKE_OP + * 3. val - how many processes to wake + * 4. val2 - amount of processes to wake in case operation encoded in + * val3 returns true + * 5. uaddr2 - another futex address, for conditional wake of + * additional processes + * 6. val3 - encoded operation: + * 1. bit 31 - if 1 then value stored in field field 4 + * should be interpreted as power of 2. + * 2. 28..30 - arithmetic operation which should be + * applied to previous value stored in + * uaddr2. Values available (from 2005 up to + * 2016): SET. ADD, OR, ANDN, XOR. + * 3. 24..29 - comparison operation which should be + * applied to the old value stored in uaddr2 + * (before arithmetic operation is applied). + * Possible values: EQ, NE, LT, LE, GT, GE. + * 4. 12..23 - Second operand for arithmetic operation. + * If bit 31 is set, it is interpreted as + * power of 2. + * 5. 00..11 - Value against which old value stored in + * uaddr2 is compared. + */ + + static const struct { + uint32_t val; + const char *str; + int err; + const char *errstr; + } wake_ops[] = { + { 0x00000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x00fff000, "FUTEX_OP_SET<<28|0xfff<<12|FUTEX_OP_CMP_EQ<<24|" + "0" }, + { 0x00000fff, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_EQ<<24|" + "0xfff" }, + { 0x00ffffff, "FUTEX_OP_SET<<28|0xfff<<12|FUTEX_OP_CMP_EQ<<24|" + "0xfff" }, + { 0x10000000, "FUTEX_OP_ADD<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x20000000, "FUTEX_OP_OR<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x30000000, "FUTEX_OP_ANDN<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x40000000, "FUTEX_OP_XOR<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x50000000, "0x5<<28 /* FUTEX_OP_??? */|0<<12|" + "FUTEX_OP_CMP_EQ<<24|0", ENOSYS, "ENOSYS" }, + { 0x70000000, "0x7<<28 /* FUTEX_OP_??? */|0<<12|" + "FUTEX_OP_CMP_EQ<<24|0", ENOSYS, "ENOSYS" }, + { 0x80000000, "FUTEX_OP_OPARG_SHIFT<<28|FUTEX_OP_SET<<28|0<<12|" + "FUTEX_OP_CMP_EQ<<24|0" }, + { 0xa0caffee, "FUTEX_OP_OPARG_SHIFT<<28|FUTEX_OP_OR<<28|" + "0xcaf<<12|FUTEX_OP_CMP_EQ<<24|0xfee" }, + { 0x01000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_NE<<24|0" }, + { 0x01234567, "FUTEX_OP_SET<<28|0x234<<12|FUTEX_OP_CMP_NE<<24|" + "0x567" }, + { 0x02000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_LT<<24|0" }, + { 0x03000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_LE<<24|0" }, + { 0x04000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_GT<<24|0" }, + { 0x05000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_GE<<24|0" }, + { 0x06000000, "FUTEX_OP_SET<<28|0<<12|" + "0x6<<24 /* FUTEX_OP_CMP_??? */|0", ENOSYS, "ENOSYS" }, + { 0x07000000, "FUTEX_OP_SET<<28|0<<12|" + "0x7<<24 /* FUTEX_OP_CMP_??? */|0", ENOSYS, "ENOSYS" }, + { 0x08000000, "FUTEX_OP_SET<<28|0<<12|" + "0x8<<24 /* FUTEX_OP_CMP_??? */|0", ENOSYS, "ENOSYS" }, + { 0x0f000000, "FUTEX_OP_SET<<28|0<<12|" + "0xf<<24 /* FUTEX_OP_CMP_??? */|0", ENOSYS, "ENOSYS" }, + { 0xbadfaced, "FUTEX_OP_OPARG_SHIFT<<28|FUTEX_OP_ANDN<<28|" + "0xdfa<<12|0xa<<24 /* FUTEX_OP_CMP_??? */|0xced", + ENOSYS, "ENOSYS" }, + { 0xffffffff, "FUTEX_OP_OPARG_SHIFT<<28|" + "0x7<<28 /* FUTEX_OP_??? */|0xfff<<12|" + "0xf<<24 /* FUTEX_OP_CMP_??? */|0xfff", + ENOSYS, "ENOSYS" }, + }; + + for (i = 0; i < ARRAY_SIZE(wake_ops); i++) { + for (j = 0; j < 2; j++) { + CHECK_FUTEX_ENOSYS(uaddr, + j ? FUTEX_WAKE_OP_PRIVATE : FUTEX_WAKE_OP, + VAL, i, uaddr2, wake_ops[i].val, (rc == 0)); + printf("futex(%p, FUTEX_WAKE_OP%s, %u, %u, %p, %s) = " + "%s\n", uaddr, j ? "_PRIVATE" : "", VAL_PR, i, + uaddr2, wake_ops[i].str, sprintrc(rc)); + } + } + + CHECK_INVALID_CLOCKRT(FUTEX_WAKE_OP, ARG3 | ARG4 | ARG5 | ARG6, + "%u", "%u", "%#lx", + /* Decoding of the 0xdeadbee4 value */ + "FUTEX_OP_OPARG_SHIFT<<28|0x5<<28 /* FUTEX_OP_??? */|0xadb<<12|" + "0xe<<24 /* FUTEX_OP_CMP_??? */|0xee4"); + + /* FUTEX_LOCK_PI - slow path for mutex lock with process inheritance + * support. Expect that futex has 0 in unlocked case and + * TID of owning process in locked case. Value can also + * contain FUTEX_WAITERS bit signalling the presence of + * waiters queue. + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_LOCK_PI + * 3. val - not used + * 4. timeout - timeout + * 5. uaddr2 - not used + * 6. val3 - not used + */ + + *uaddr = getpid(); + + CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_LOCK_PI, VAL, tmout, uaddr2 + 1, + VAL3, (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_LOCK_PI, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + uaddr + 1, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_PRIVATE_FLAG | FUTEX_LOCK_PI, VAL, + tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_LOCK_PI_PRIVATE, {tv_sec=%jd, tv_nsec=%jd}) = " + "%s\n", + uaddr + 1, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + + /* NULL is passed by invalid_op() in cases valid timeout address is + * needed */ + CHECK_INVALID_CLOCKRT(FUTEX_LOCK_PI, ARG4, "NULL"); + + /* FUTEX_UNLOCK_PI - slow path for mutex unlock with process inheritance + * support. Expected to be called by process in case + * it failed to execute fast path (it usually means + * that FUTEX_WAITERS flag had been set while the lock + * has been held). + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_UNLOCK_PI + * 3. val - not used + * 4. timeout - not used + * 5. uaddr2 - not used + * 6. val3 - not used + */ + + CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_UNLOCK_PI, VAL, tmout, uaddr2 + 1, + VAL3, (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_UNLOCK_PI) = %s\n", uaddr + 1, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_PRIVATE_FLAG | FUTEX_UNLOCK_PI, VAL, + tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_UNLOCK_PI_PRIVATE) = %s\n", uaddr +1, + sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_UNLOCK_PI, 0); + + /* FUTEX_TRYLOCK_PI - slow path for mutex trylock with process + * inheritance support. + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_TRYLOCK_PI + * 3. val - not used + * 4. timeout - not used + * 5. uaddr2 - not used + * 6. val3 - not used + */ + + CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_TRYLOCK_PI, VAL, tmout, uaddr2 + 1, + VAL3, (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_TRYLOCK_PI) = %s\n", uaddr + 1, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_PRIVATE_FLAG | FUTEX_TRYLOCK_PI, + VAL, tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_TRYLOCK_PI_PRIVATE) = %s\n", uaddr + 1, + sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_TRYLOCK_PI, 0); + + /* FUTEX_WAIT_REQUEUE_PI - kernel-side handling of special case when + * processes should be re-queued on PI-aware + * futexes. This is so special since PI futexes + * utilize rt_mutex and it should be at no time + * left free with a wait queue, so this should + * be performed atomically in-kernel. + * Possible flags: PRIVATE, CLOCKRT + * 1. uaddr - futex address + * 2. op - FUTEX_WAIT_REQUEUE_PI + * 3. val - expected value stored in uaddr + * 4. timeout - timeout + * 5. uaddr2 - (PI-aware) futex address to requeue process on + * 6. val3 - not used (in kernel, it always initialized to + * FUTEX_BITSET_MATCH_ANY and passed to + * futex_wait_requeue_pi()) + */ + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAIT_REQUEUE_PI, VAL, tmout, uaddr2, + VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_REQUEUE_PI, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %p) = %s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, uaddr2, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAIT_REQUEUE_PI, + VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_REQUEUE_PI_PRIVATE, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %p) " + "= %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, uaddr2, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_WAIT_REQUEUE_PI, + VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_REQUEUE_PI|FUTEX_CLOCK_REALTIME, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %p) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, uaddr2, + sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_PRIVATE_FLAG | + FUTEX_WAIT_REQUEUE_PI, VAL, tmout, uaddr2, VAL3, + (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, " + "%u, {tv_sec=%jd, tv_nsec=%jd}, %p) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, uaddr2, + sprintrc(rc)); + + /* FUTEX_CMP_REQUEUE_PI - version of FUTEX_CMP_REQUEUE which re-queues + * on PI-aware futex. + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_CMP_REQUEUE + * 3. val - how many processes to wake + * 4. val2 - amount of processes to re-queue on uadr2 + * 5. uaddr2 - (PI-aware) futex address, to re-queue waiting processes + * on + * 6. val3 - expected value stored in uaddr + */ + + /* All these should fail with EINVAL since we try to re-queue to non-PI + * futex. + */ + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CMP_REQUEUE_PI, VAL, VAL2, uaddr2, VAL3, + (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_CMP_REQUEUE_PI, %u, %u, %p, %u) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, VAL3_PR, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CMP_REQUEUE_PI, VAL, VAL2, uaddr2, + *uaddr, (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_CMP_REQUEUE_PI, %u, %u, %p, %u) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_CMP_REQUEUE_PI, + VAL, VAL2, uaddr2, *uaddr, (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_CMP_REQUEUE_PI_PRIVATE, %u, %u, %p, %u) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_CMP_REQUEUE_PI, ARG3 | ARG4 | ARG5 | ARG6, + "%u", "%u", "%#lx", "%u"); + + /* + * Unknown commands + */ + + CHECK_FUTEX(uaddr, 0xd, VAL, tmout + 1, uaddr2 + 1, VAL3, + (rc == -1) && (errno == ENOSYS)); + printf("futex(%p, 0xd /* FUTEX_??? */, %u, %p, %p, %#x) = %s\n", + uaddr, VAL_PR, tmout + 1, uaddr2 + 1, VAL3_PR, sprintrc(rc)); + + CHECK_FUTEX(uaddr, 0xbefeeded, VAL, tmout + 1, uaddr2, VAL3, + (rc == -1) && (errno == ENOSYS)); + printf("futex(%p, 0xbefeeded /* FUTEX_??? */, %u, %p, %p, %#x) = %s\n", + uaddr, VAL_PR, tmout + 1, uaddr2, VAL3_PR, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_futex") + +#endif diff --git a/tests-m32/futex.test b/tests-m32/futex.test new file mode 100755 index 000000000..fc98267a9 --- /dev/null +++ b/tests-m32/futex.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check futex syscall decoding. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a27 +run_strace_match_diff -v -a27 diff --git a/tests-m32/futimesat.c b/tests-m32/futimesat.c new file mode 100644 index 000000000..c35662912 --- /dev/null +++ b/tests-m32/futimesat.c @@ -0,0 +1,89 @@ +/* + * Check decoding of futimesat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_futimesat + +# include +# include +# include +# include + + +int +main(void) +{ + struct timeval tv; + if (gettimeofday(&tv, NULL)) + perror_msg_and_fail("gettimeofday"); + + static const char sample[] = "futimesat_sample"; + unsigned long dirfd = (unsigned long) 0xdeadbeef00000000ULL | -100U; + + long rc = syscall(__NR_futimesat, dirfd, sample, 0); + printf("futimesat(AT_FDCWD, \"%s\", NULL) = %ld %s (%m)\n", + sample, rc, errno2name()); + + struct timeval *const ts = tail_alloc(sizeof(*ts) * 2); + dirfd = (unsigned long) 0xdeadbeefffffffffULL; + + ts[0].tv_sec = tv.tv_sec; + ts[0].tv_usec = tv.tv_usec; + ts[1].tv_sec = tv.tv_sec - 1; + ts[1].tv_usec = tv.tv_usec + 1; + + rc = syscall(__NR_futimesat, dirfd, 0, ts + 2); + printf("futimesat(%d, NULL, %p) = %ld %s (%m)\n", + (int) dirfd, ts + 2, rc, errno2name()); + + rc = syscall(__NR_futimesat, dirfd, 0, ts + 1); + printf("futimesat(%d, NULL, [{tv_sec=%jd, tv_usec=%jd}, %p]) = " + "%ld %s (%m)\n", (int) dirfd, + (intmax_t) ts[1].tv_sec, (intmax_t) ts[1].tv_usec, + ts + 2, rc, errno2name()); + + (void) close(0); + rc = syscall(__NR_futimesat, 0, "", ts); + printf("futimesat(0, \"\", [{tv_sec=%jd, tv_usec=%jd}, " + "{tv_sec=%jd, tv_usec=%jd}]) = %ld %s (%m)\n", + (intmax_t) ts[0].tv_sec, (intmax_t) ts[0].tv_usec, + (intmax_t) ts[1].tv_sec, (intmax_t) ts[1].tv_usec, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_futimesat") + +#endif diff --git a/tests-m32/futimesat.test b/tests-m32/futimesat.test new file mode 100755 index 000000000..3a67c0422 --- /dev/null +++ b/tests-m32/futimesat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check futimesat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-m32/get_mempolicy.c b/tests-m32/get_mempolicy.c new file mode 100644 index 000000000..03d1bffc5 --- /dev/null +++ b/tests-m32/get_mempolicy.c @@ -0,0 +1,135 @@ +/* + * Check decoding of get_mempolicy syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_get_mempolicy + +# include +# include + +# include "xlat.h" +# include "xlat/policies.h" + +# define MAX_STRLEN 3 +# define NLONGS(n) ((n + 8 * sizeof(long) - 2) \ + / (8 * sizeof(long))) + +static void +print_nodes(unsigned long maxnode) +{ + unsigned long *const nodemask = + tail_alloc(sizeof(*nodemask) * NLONGS(maxnode)); + + if (syscall(__NR_get_mempolicy, 0, nodemask, maxnode, 0, 0)) { + printf("get_mempolicy(NULL, %p, %lu, NULL, 0) = -1 %s (%m)\n", + nodemask, maxnode, errno2name()); + return; + } + + printf("get_mempolicy(NULL, ["); + + unsigned int nlongs = NLONGS(maxnode); + unsigned int i; + for (i = 0; i < nlongs; ++i) { + if (i) + fputs(", ", stdout); + if (i >= MAX_STRLEN) { + fputs("...", stdout); + break; + } + printf("%#0*lx", (int) sizeof(*nodemask) * 2 + 2, nodemask[i]); + } + + printf("], %lu, NULL, 0) = 0\n", maxnode); +} + +int +main(void) +{ + long rc; + + if (syscall(__NR_get_mempolicy, 0, 0, 0, 0, 0)) + perror_msg_and_skip("get_mempolicy"); + puts("get_mempolicy(NULL, NULL, 0, NULL, 0) = 0"); + + int *mode = (void *) 0xdefaced1baddeed2; + unsigned long maxnode = (unsigned long) 0xcafef00dbadc0dedULL; + const unsigned long *nodemask = (void *) 0xfacedad3bebefed4ULL; + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL; + const unsigned long flags = -1U; + rc = syscall(__NR_get_mempolicy, mode, nodemask, maxnode, addr, flags); + printf("get_mempolicy(%p, %p, %lu, %#lx, %s|%#lx) = %ld %s (%m)\n", + mode, nodemask, maxnode, addr, + "MPOL_F_NODE|MPOL_F_ADDR", + flags & ~3, rc, errno2name()); + + mode = tail_alloc(sizeof(*mode)); + + rc = syscall(__NR_get_mempolicy, mode, 0, 0, 0, 0); + printf("get_mempolicy(["); + printxval(policies, (unsigned) *mode, "MPOL_???"); + printf("], NULL, 0, NULL, 0) = %ld\n", rc); + + *mode = -1; + rc = syscall(__NR_get_mempolicy, mode, 0, 0, mode - 1, 2); + printf("get_mempolicy(["); + printxval(policies, (unsigned) *mode, "MPOL_???"); + printf("], NULL, 0, %p, MPOL_F_ADDR) = %ld\n", mode - 1, rc); + + maxnode = get_page_size() * 8; + + print_nodes(maxnode); + print_nodes(maxnode + 1); + print_nodes(maxnode + 2); + + maxnode = sizeof(*nodemask) * 8; + print_nodes(maxnode - 1); + print_nodes(maxnode ); + print_nodes(maxnode + 1); + print_nodes(maxnode + 2); + print_nodes(maxnode * 2 - 1); + print_nodes(maxnode * 2 ); + print_nodes(maxnode * 2 + 1); + print_nodes(maxnode * 2 + 2); + print_nodes(maxnode * 3 - 1); + print_nodes(maxnode * 3 ); + print_nodes(maxnode * 3 + 1); + print_nodes(maxnode * 3 + 2); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_get_mempolicy") + +#endif diff --git a/tests-m32/get_mempolicy.test b/tests-m32/get_mempolicy.test new file mode 100755 index 000000000..92270970a --- /dev/null +++ b/tests-m32/get_mempolicy.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check get_mempolicy syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 -a38 diff --git a/tests-m32/get_page_size.c b/tests-m32/get_page_size.c new file mode 100644 index 000000000..aeea861cc --- /dev/null +++ b/tests-m32/get_page_size.c @@ -0,0 +1,13 @@ +#include "tests.h" +#include + +size_t +get_page_size(void) +{ + static size_t page_size; + + if (!page_size) + page_size = sysconf(_SC_PAGESIZE); + + return page_size; +} diff --git a/tests-m32/getcpu.c b/tests-m32/getcpu.c new file mode 100644 index 000000000..ec671f1e8 --- /dev/null +++ b/tests-m32/getcpu.c @@ -0,0 +1,76 @@ +/* + * Check decoding of getcpu syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_getcpu + +# include +# include + +int +main(void) +{ + unsigned *bogus_cpu = + (unsigned *) tail_alloc(sizeof(* bogus_cpu)) + 1; + unsigned *bogus_node = + (unsigned *) tail_alloc(sizeof(* bogus_node)) + 1; + unsigned *bogus_tcache = + (unsigned *) tail_alloc(sizeof(* bogus_tcache)) + 1; + + long res; + unsigned *cpu = tail_alloc(sizeof(*cpu)); + unsigned *node = tail_alloc(sizeof(*node)); + long * tcache = tail_alloc(128); + + res = syscall(__NR_getcpu, NULL, NULL, NULL); + printf("getcpu(NULL, NULL, NULL) = %s\n", sprintrc(res)); + + res = syscall(__NR_getcpu, bogus_cpu, bogus_node, bogus_tcache); + printf("getcpu(%p, %p, %p) = %s\n", + bogus_cpu, bogus_node, bogus_tcache, sprintrc(res)); + + res = syscall(__NR_getcpu, cpu, node, tcache); + if (res != 0) + perror_msg_and_skip("getcpu"); + + printf("getcpu([%u], [%u], %p) = 0\n", *cpu, *node, tcache); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getcpu"); + +#endif diff --git a/tests-m32/getcpu.test b/tests-m32/getcpu.test new file mode 100755 index 000000000..fe212658e --- /dev/null +++ b/tests-m32/getcpu.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of getcpu syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff --git a/tests-m32/getcwd.c b/tests-m32/getcwd.c new file mode 100644 index 000000000..707c25c96 --- /dev/null +++ b/tests-m32/getcwd.c @@ -0,0 +1,46 @@ +#include "tests.h" + +#include + +#ifdef __NR_getcwd + +# include +# include +# include + +int +main(void) +{ + long res; + char cur_dir[PATH_MAX + 1]; + static const size_t bogus_size = (size_t) 0xbadc0deddeadfaceULL; + + res = syscall(__NR_getcwd, cur_dir, sizeof(cur_dir)); + + if (res <= 0) + perror_msg_and_fail("getcwd"); + + printf("getcwd(\""); + print_quoted_string(cur_dir); + printf("\", %zu) = %ld\n", sizeof(cur_dir), res); + + res = syscall(__NR_getcwd, cur_dir, 0); + printf("getcwd(%p, 0) = %s\n", cur_dir, sprintrc(res)); + + res = syscall(__NR_getcwd, NULL, bogus_size); + printf("getcwd(NULL, %zu) = %s\n", bogus_size, sprintrc(res)); + + res = syscall(__NR_getcwd, (void *) -1L, sizeof(cur_dir)); + printf("getcwd(%p, %zu) = %s\n", + (void *) -1L, sizeof(cur_dir), sprintrc(res)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getcwd"); + +#endif diff --git a/tests-m32/getcwd.test b/tests-m32/getcwd.test new file mode 100755 index 000000000..405187e5c --- /dev/null +++ b/tests-m32/getcwd.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getcwd syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff --git a/tests-m32/getdents.c b/tests-m32/getdents.c new file mode 100644 index 000000000..b787c837b --- /dev/null +++ b/tests-m32/getdents.c @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_getdents + +# include +# include +# include +# include +# include +# include +# include + +static const char fname[] = + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nZ"; +static const char qname[] = + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nZ"; + +static char buf[8192]; + +static const char * +str_d_type(const unsigned char d_type) +{ + switch (d_type) { + case DT_DIR: + return "DT_DIR"; + case DT_REG: + return "DT_REG"; + default: + return "DT_UNKNOWN"; + } +} +static void +print_dirent(const kernel_dirent *d) +{ + const unsigned int d_name_offset = offsetof(kernel_dirent, d_name); + int d_name_len = d->d_reclen - d_name_offset - 1; + assert(d_name_len > 0); + + printf("{d_ino=%llu, d_off=%llu, d_reclen=%u, d_name=", + (unsigned long long) d->d_ino, + (unsigned long long) d->d_off, d->d_reclen); + + if (d->d_name[0] == '.') + printf("\"%.*s\"", d_name_len, d->d_name); + else + printf("\"%s\"", qname); + + printf(", d_type=%s}", + str_d_type(*((const char *) d + d->d_reclen - 1))); +} + +int +main(int ac, const char **av) +{ + char *dname; + + assert(ac == 1); + assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); + assert(!mkdir(dname, 0700)); + assert(!chdir(dname)); + (void) close(0); + assert(!creat(fname, 0600)); + assert(!close(0)); + assert(!open(".", O_RDONLY | O_DIRECTORY)); + + unsigned long count = (unsigned long) 0xfacefeeddeadbeefULL; + long rc = syscall(__NR_getdents, (long) 0xdefacedffffffffULL, NULL, + count); + printf("getdents(-1, NULL, %u) = %ld %s (%m)\n", + (unsigned) count, rc, errno2name()); + + count = (unsigned long) 0xfacefeed00000000ULL | sizeof(buf); + while ((rc = syscall(__NR_getdents, 0, buf, count))) { + kernel_dirent *d; + long i; + + if (rc < 0) + perror_msg_and_skip("getdents"); + printf("getdents(0, ["); + for (i = 0; i < rc; i += d->d_reclen) { + d = (kernel_dirent *) &buf[i]; + if (i) + printf(", "); + print_dirent(d); + } + printf("], %u) = %ld\n", (unsigned) count, rc); + } + printf("getdents(0, [], %u) = 0\n", (unsigned) count); + puts("+++ exited with 0 +++"); + assert(!unlink(fname)); + assert(!chdir("..")); + assert(!rmdir(dname)); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getdents") + +#endif diff --git a/tests-m32/getdents.test b/tests-m32/getdents.test new file mode 100755 index 000000000..23c4ac3ad --- /dev/null +++ b/tests-m32/getdents.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check getdents syscall decoding. + +. "${srcdir=.}/init.sh" + +rm -rf -- "$LOG".dir +run_strace_match_diff -a22 -v diff --git a/tests-m32/getdents64.c b/tests-m32/getdents64.c new file mode 100644 index 000000000..9da2a23c2 --- /dev/null +++ b/tests-m32/getdents64.c @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_getdents64 + +# include +# include +# include +# include +# include +# include +# include +# include + +static const char fname[] = + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nZ"; +static const char qname[] = + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nZ"; + +typedef struct { + uint64_t d_ino; + uint64_t d_off; + unsigned short d_reclen; + unsigned char d_type; + char d_name[256]; +} kernel_dirent64; + +static char buf[8192]; + +static const char * +str_d_type(const unsigned char d_type) +{ + switch (d_type) { + case DT_DIR: + return "DT_DIR"; + case DT_REG: + return "DT_REG"; + default: + return "DT_UNKNOWN"; + } +} +static void +print_dirent(const kernel_dirent64 *d) +{ + const unsigned int d_name_offset = offsetof(kernel_dirent64, d_name); + int d_name_len = d->d_reclen - d_name_offset; + assert(d_name_len > 0); + + printf("{d_ino=%" PRIu64 ", d_off=%" PRId64 + ", d_reclen=%u, d_type=%s, d_name=", + d->d_ino, d->d_off, d->d_reclen, str_d_type(d->d_type)); + + if (d->d_name[0] == '.') + printf("\"%.*s\"}", d_name_len, d->d_name); + else + printf("\"%s\"}", qname); +} + +int +main(int ac, const char **av) +{ + char *dname; + + assert(ac == 1); + assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); + assert(!mkdir(dname, 0700)); + assert(!chdir(dname)); + (void) close(0); + assert(!creat(fname, 0600)); + assert(!close(0)); + assert(!open(".", O_RDONLY | O_DIRECTORY)); + + unsigned long count = (unsigned long) 0xfacefeeddeadbeefULL; + long rc = syscall(__NR_getdents64, (long) 0xdefacedffffffffULL, NULL, + count); + printf("getdents64(-1, NULL, %u) = %ld %s (%m)\n", + (unsigned) count, rc, errno2name()); + + count = (unsigned long) 0xfacefeed00000000ULL | sizeof(buf); + while ((rc = syscall(__NR_getdents64, 0, buf, count))) { + kernel_dirent64 *d; + long i; + + if (rc < 0) + perror_msg_and_skip("getdents64"); + printf("getdents64(0, ["); + for (i = 0; i < rc; i += d->d_reclen) { + d = (kernel_dirent64 *) &buf[i]; + if (i) + printf(", "); + print_dirent(d); + } + printf("], %u) = %ld\n", (unsigned) count, rc); + } + printf("getdents64(0, [], %u) = 0\n", (unsigned) count); + puts("+++ exited with 0 +++"); + assert(!unlink(fname)); + assert(!chdir("..")); + assert(!rmdir(dname)); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getdents64") + +#endif diff --git a/tests-m32/getdents64.test b/tests-m32/getdents64.test new file mode 100755 index 000000000..401cfc7cf --- /dev/null +++ b/tests-m32/getdents64.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check getdents64 syscall decoding. + +. "${srcdir=.}/init.sh" + +rm -rf -- "$LOG".dir +run_strace_match_diff -a24 -v diff --git a/tests-m32/getegid.c b/tests-m32/getegid.c new file mode 100644 index 000000000..98f8b9cbe --- /dev/null +++ b/tests-m32/getegid.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getegid + +# include +# include + +int +main(void) +{ + printf("getegid() = %ld\n", syscall(__NR_getegid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getegid") + +#endif diff --git a/tests-m32/getegid.test b/tests-m32/getegid.test new file mode 100755 index 000000000..4354158bd --- /dev/null +++ b/tests-m32/getegid.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getegid syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-m32/getegid32.c b/tests-m32/getegid32.c new file mode 100644 index 000000000..d9951864b --- /dev/null +++ b/tests-m32/getegid32.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getegid32 + +# include +# include + +int +main(void) +{ + printf("getegid32() = %ld\n", syscall(__NR_getegid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getegid32") + +#endif diff --git a/tests-m32/getegid32.test b/tests-m32/getegid32.test new file mode 100755 index 000000000..a266620e1 --- /dev/null +++ b/tests-m32/getegid32.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getegid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-m32/geteuid.c b/tests-m32/geteuid.c new file mode 100644 index 000000000..ef8269f97 --- /dev/null +++ b/tests-m32/geteuid.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_geteuid + +# include +# include + +int +main(void) +{ + printf("geteuid() = %ld\n", syscall(__NR_geteuid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_geteuid") + +#endif diff --git a/tests-m32/geteuid.test b/tests-m32/geteuid.test new file mode 100755 index 000000000..14ff6a691 --- /dev/null +++ b/tests-m32/geteuid.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check geteuid syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-m32/geteuid32.c b/tests-m32/geteuid32.c new file mode 100644 index 000000000..4341e46f3 --- /dev/null +++ b/tests-m32/geteuid32.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_geteuid32 + +# include +# include + +int +main(void) +{ + printf("geteuid32() = %ld\n", syscall(__NR_geteuid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_geteuid32") + +#endif diff --git a/tests-m32/geteuid32.test b/tests-m32/geteuid32.test new file mode 100755 index 000000000..9dd173d9f --- /dev/null +++ b/tests-m32/geteuid32.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check geteuid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-m32/getgid.c b/tests-m32/getgid.c new file mode 100644 index 000000000..2e060390e --- /dev/null +++ b/tests-m32/getgid.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getgid + +# include +# include + +int +main(void) +{ + printf("getgid() = %ld\n", syscall(__NR_getgid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgid") + +#endif diff --git a/tests-m32/getgid.test b/tests-m32/getgid.test new file mode 100755 index 000000000..f4f0c2e66 --- /dev/null +++ b/tests-m32/getgid.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getgid syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-m32/getgid32.c b/tests-m32/getgid32.c new file mode 100644 index 000000000..52e4d76a0 --- /dev/null +++ b/tests-m32/getgid32.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getgid32 + +# include +# include + +int +main(void) +{ + printf("getgid32() = %ld\n", syscall(__NR_getgid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgid32") + +#endif diff --git a/tests-m32/getgid32.test b/tests-m32/getgid32.test new file mode 100755 index 000000000..3bc98d1ad --- /dev/null +++ b/tests-m32/getgid32.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getgid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-m32/getgroups.c b/tests-m32/getgroups.c new file mode 100644 index 000000000..2617303f1 --- /dev/null +++ b/tests-m32/getgroups.c @@ -0,0 +1,135 @@ +/* + * Check decoding of getgroups/getgroups32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __NR_getgroups32 + +# define SYSCALL_NR __NR_getgroups32 +# define SYSCALL_NAME "getgroups32" +# define GID_TYPE unsigned int + +#else + +# include "tests.h" +# include + +# ifdef __NR_getgroups + +# define SYSCALL_NR __NR_getgroups +# define SYSCALL_NAME "getgroups" +# if defined __NR_getgroups32 && __NR_getgroups != __NR_getgroups32 +# define GID_TYPE unsigned short +# else +# define GID_TYPE unsigned int +# endif + +# endif + +#endif + +#ifdef GID_TYPE + +# include +# include + +#define MAX_STRLEN 32 +static long ngroups; + +static void +get_groups(const long size, GID_TYPE *const g) +{ + long i = syscall(SYSCALL_NR, size, g); + if (i != ngroups) + perror_msg_and_fail("%s(%#lx, %p)", SYSCALL_NAME, size, g); + + printf("%s(%d, [", SYSCALL_NAME, (int) size); + for (i = 0; i < ngroups; ++i) { + if (i) + printf(", "); + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + printf("%u", (unsigned int) g[i]); + } + printf("]) = %ld\n", ngroups); +} + +int +main(void) +{ + long rc; + + /* check how the first argument is decoded */ + ngroups = syscall(SYSCALL_NR, 0, 0); + printf("%s(0, NULL) = %ld\n", SYSCALL_NAME, ngroups); + if (ngroups < 0) + perror_msg_and_fail(SYSCALL_NAME); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL, 0); + printf("%s(0, NULL) = %ld\n", SYSCALL_NAME, rc); + + rc = syscall(SYSCALL_NR, -1U, 0); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, -1, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, -1L, 0); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, -1, sprintrc(rc)); + + const unsigned int ngroups_max = sysconf(_SC_NGROUPS_MAX); + + rc = syscall(SYSCALL_NR, ngroups_max, 0); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, ngroups_max, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL | ngroups_max, 0); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, ngroups_max, sprintrc(rc)); + + /* check how the second argument is decoded */ + GID_TYPE *const g1 = + tail_alloc(ngroups ? sizeof(*g1) * ngroups : 1); + GID_TYPE *const g2 = tail_alloc(sizeof(*g2) * (ngroups + 1)); + void *efault = g2 + ngroups + 1; + + get_groups(ngroups, g1); + get_groups(ngroups + 1, g1); + get_groups(ngroups + 1, g2); + + if (ngroups) { + rc = syscall(SYSCALL_NR, ngroups, efault); + printf("%s(%d, %p) = %s\n", + SYSCALL_NAME, (unsigned) ngroups, efault, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgroups") + +#endif diff --git a/tests-m32/getgroups.test b/tests-m32/getgroups.test new file mode 100755 index 000000000..2eb3056d9 --- /dev/null +++ b/tests-m32/getgroups.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getgroups syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff --git a/tests-m32/getgroups32.c b/tests-m32/getgroups32.c new file mode 100644 index 000000000..d0a356de1 --- /dev/null +++ b/tests-m32/getgroups32.c @@ -0,0 +1,12 @@ +#include "tests.h" +#include + +#ifdef __NR_getgroups32 + +# include "getgroups.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgroups32") + +#endif diff --git a/tests-m32/getgroups32.test b/tests-m32/getgroups32.test new file mode 100755 index 000000000..12a8bcc0d --- /dev/null +++ b/tests-m32/getgroups32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getgroups32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff --git a/tests-m32/getpeername.c b/tests-m32/getpeername.c new file mode 100644 index 000000000..c842acec6 --- /dev/null +++ b/tests-m32/getpeername.c @@ -0,0 +1,63 @@ +/* + * Check decoding of getpeername syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define TEST_SYSCALL_NAME getpeername +#include "sockname.c" + +int +main(void) +{ + int lfd = socket(AF_UNIX, SOCK_STREAM, 0); + int cfd = socket(AF_UNIX, SOCK_STREAM, 0); + if (lfd < 0 || cfd < 0) + perror_msg_and_skip("socket"); + + (void) unlink(TEST_SOCKET); + + const struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = TEST_SOCKET + }; + + if (bind(lfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + if (listen(lfd, 1)) + perror_msg_and_skip("listen"); + if (connect(cfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("connect"); + if (accept(lfd, 0, 0) < 0) + perror_msg_and_skip("accept"); + + test_sockname_syscall(cfd); + + (void) unlink(TEST_SOCKET); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/getpeername.test b/tests-m32/getpeername.test new file mode 100755 index 000000000..81f01bb18 --- /dev/null +++ b/tests-m32/getpeername.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of getpeername syscall. + +. "${srcdir=.}/getsockname.test" diff --git a/tests-m32/getpgrp.c b/tests-m32/getpgrp.c new file mode 100644 index 000000000..8b9d08827 --- /dev/null +++ b/tests-m32/getpgrp.c @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_getpgrp + +# include +# include + +int +main(void) +{ + printf("getpgrp() = %ld\n", syscall(__NR_getpgrp)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpgrp") + +#endif diff --git a/tests-m32/getpgrp.test b/tests-m32/getpgrp.test new file mode 100755 index 000000000..e116bb517 --- /dev/null +++ b/tests-m32/getpgrp.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpgrp syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-m32/getrandom.c b/tests-m32/getrandom.c new file mode 100644 index 000000000..de1a0874e --- /dev/null +++ b/tests-m32/getrandom.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_getrandom + +# include +# include + +int +main(void) +{ + unsigned char buf[4]; + + if (syscall(__NR_getrandom, buf, sizeof(buf) - 1, 0) != sizeof(buf) - 1) + perror_msg_and_skip("getrandom"); + printf("getrandom(\"\\x%02x\\x%02x\\x%02x\", 3, 0) = 3\n", + (int) buf[0], (int) buf[1], (int) buf[2]); + + if (syscall(__NR_getrandom, buf, sizeof(buf), 1) != sizeof(buf)) + perror_msg_and_skip("getrandom"); + printf("getrandom(\"\\x%02x\\x%02x\\x%02x\"..., 4, GRND_NONBLOCK) = 4\n", + (int) buf[0], (int) buf[1], (int) buf[2]); + + if (syscall(__NR_getrandom, buf, sizeof(buf), 0x3003) != -1) + perror_msg_and_skip("getrandom"); + printf("getrandom(%p, 4, GRND_NONBLOCK|GRND_RANDOM|0x3000) = " + "-1 EINVAL (%m)\n", buf); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getrandom") + +#endif diff --git a/tests-m32/getrandom.test b/tests-m32/getrandom.test new file mode 100755 index 000000000..ad34048fd --- /dev/null +++ b/tests-m32/getrandom.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getrandom syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 -s3 diff --git a/tests-m32/getresgid.c b/tests-m32/getresgid.c new file mode 100644 index 000000000..b8c687b1c --- /dev/null +++ b/tests-m32/getresgid.c @@ -0,0 +1,21 @@ +#include "tests.h" +#include + +#ifdef __NR_getresgid + +# define SYSCALL_NR __NR_getresgid +# define SYSCALL_NAME "getresgid" + +# if defined __NR_getresgid32 && __NR_getresgid != __NR_getresgid32 +# define UGID_TYPE short +# else +# define UGID_TYPE int +# endif + +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresgid") + +#endif diff --git a/tests-m32/getresgid.test b/tests-m32/getresgid.test new file mode 100755 index 000000000..9f5186e8c --- /dev/null +++ b/tests-m32/getresgid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff --git a/tests-m32/getresgid32.c b/tests-m32/getresgid32.c new file mode 100644 index 000000000..71f11344d --- /dev/null +++ b/tests-m32/getresgid32.c @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_getresgid32 + +# define SYSCALL_NR __NR_getresgid32 +# define SYSCALL_NAME "getresgid32" +# define UGID_TYPE int +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresgid32") + +#endif diff --git a/tests-m32/getresgid32.test b/tests-m32/getresgid32.test new file mode 100755 index 000000000..a9798911f --- /dev/null +++ b/tests-m32/getresgid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-m32/getresugid.c b/tests-m32/getresugid.c new file mode 100644 index 000000000..0ee721cfe --- /dev/null +++ b/tests-m32/getresugid.c @@ -0,0 +1,58 @@ +/* + * Check decoding of getresuid/getresgid/getresuid32/getresgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +int +main(void) +{ + unsigned UGID_TYPE *const r = tail_alloc(sizeof(*r)); + unsigned UGID_TYPE *const e = tail_alloc(sizeof(*e)); + unsigned UGID_TYPE *const s = tail_alloc(sizeof(*s)); + + if (syscall(SYSCALL_NR, r, e, s)) + perror_msg_and_fail(SYSCALL_NAME); + + printf("%s([%u], [%u], [%u]) = 0\n", SYSCALL_NAME, + (unsigned) *r, (unsigned) *e, (unsigned) *s); + + assert(syscall(SYSCALL_NR, NULL, e, s) == -1); + printf("%s(NULL, %p, %p) = -1 EFAULT (%m)\n", SYSCALL_NAME, e, s); + + assert(syscall(SYSCALL_NR, r, NULL, s) == -1); + printf("%s(%p, NULL, %p) = -1 EFAULT (%m)\n", SYSCALL_NAME, r, s); + + assert(syscall(SYSCALL_NR, r, e, NULL) == -1); + printf("%s(%p, %p, NULL) = -1 EFAULT (%m)\n", SYSCALL_NAME, r, e); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/getresuid.c b/tests-m32/getresuid.c new file mode 100644 index 000000000..b00f20ba4 --- /dev/null +++ b/tests-m32/getresuid.c @@ -0,0 +1,21 @@ +#include "tests.h" +#include + +#ifdef __NR_getresuid + +# define SYSCALL_NR __NR_getresuid +# define SYSCALL_NAME "getresuid" + +# if defined __NR_getresuid32 && __NR_getresuid != __NR_getresuid32 +# define UGID_TYPE short +# else +# define UGID_TYPE int +# endif + +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresuid") + +#endif diff --git a/tests-m32/getresuid.test b/tests-m32/getresuid.test new file mode 100755 index 000000000..eee1ac05b --- /dev/null +++ b/tests-m32/getresuid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff --git a/tests-m32/getresuid32.c b/tests-m32/getresuid32.c new file mode 100644 index 000000000..4c9a83df5 --- /dev/null +++ b/tests-m32/getresuid32.c @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_getresuid32 + +# define SYSCALL_NR __NR_getresuid32 +# define SYSCALL_NAME "getresuid32" +# define UGID_TYPE int +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresuid32") + +#endif diff --git a/tests-m32/getresuid32.test b/tests-m32/getresuid32.test new file mode 100755 index 000000000..fdc76a310 --- /dev/null +++ b/tests-m32/getresuid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-m32/getrlimit.c b/tests-m32/getrlimit.c new file mode 100644 index 000000000..bd9d0b0f2 --- /dev/null +++ b/tests-m32/getrlimit.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_getrlimit + +# define NR_GETRLIMIT __NR_getrlimit +# define STR_GETRLIMIT "getrlimit" +# include "xgetrlimit.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getrlimit") + +#endif diff --git a/tests-m32/getrlimit.test b/tests-m32/getrlimit.test new file mode 100755 index 000000000..6fd88aed1 --- /dev/null +++ b/tests-m32/getrlimit.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of getrlimit syscall. + +. "${srcdir=.}/setrlimit.test" diff --git a/tests-m32/getrusage.c b/tests-m32/getrusage.c new file mode 100644 index 000000000..8b76eff69 --- /dev/null +++ b/tests-m32/getrusage.c @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2016 Fei Jie + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_getrusage + +# include +# include +# include +# include + +int +main(void) +{ + struct rusage *const usage = tail_alloc(sizeof(struct rusage)); + int rc = syscall(__NR_getrusage, RUSAGE_SELF, usage); + printf("getrusage(RUSAGE_SELF, {ru_utime={tv_sec=%jd, tv_usec=%jd}" + ", ru_stime={tv_sec=%jd, tv_usec=%jd}, ru_maxrss=%lu" + ", ru_ixrss=%lu, ru_idrss=%lu, ru_isrss=%lu, ru_minflt=%lu" + ", ru_majflt=%lu, ru_nswap=%lu, ru_inblock=%lu" + ", ru_oublock=%lu, ru_msgsnd=%lu, ru_msgrcv=%lu" + ", ru_nsignals=%lu, ru_nvcsw=%lu, ru_nivcsw=%lu}) = %d\n", + (intmax_t) usage->ru_utime.tv_sec, + (intmax_t) usage->ru_utime.tv_usec, + (intmax_t) usage->ru_stime.tv_sec, + (intmax_t) usage->ru_stime.tv_usec, + usage->ru_maxrss, usage->ru_ixrss, usage->ru_idrss, + usage->ru_isrss, usage->ru_minflt, usage->ru_majflt, + usage->ru_nswap, usage->ru_inblock, usage->ru_oublock, + usage->ru_msgsnd, usage->ru_msgrcv, usage->ru_nsignals, + usage->ru_nvcsw, usage->ru_nivcsw, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getrusage") + +#endif diff --git a/tests-m32/getrusage.test b/tests-m32/getrusage.test new file mode 100755 index 000000000..4a3e8ed09 --- /dev/null +++ b/tests-m32/getrusage.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getrusage syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v diff --git a/tests-m32/getsid.c b/tests-m32/getsid.c new file mode 100644 index 000000000..b563de9d0 --- /dev/null +++ b/tests-m32/getsid.c @@ -0,0 +1,13 @@ +#include "tests.h" +#include +#include + +int +main(void) +{ + pid_t pid = getpid(); + printf("getsid(%d) = %d\n", pid, getsid(pid)); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/getsid.test b/tests-m32/getsid.test new file mode 100755 index 000000000..3fcf9799b --- /dev/null +++ b/tests-m32/getsid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getsid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-m32/getsockname.c b/tests-m32/getsockname.c new file mode 100644 index 000000000..66ac4e631 --- /dev/null +++ b/tests-m32/getsockname.c @@ -0,0 +1,56 @@ +/* + * Check decoding of getsockname syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define TEST_SYSCALL_NAME getsockname +#include "sockname.c" + +int +main(void) +{ + int lfd = socket(AF_UNIX, SOCK_STREAM, 0); + if (lfd < 0) + perror_msg_and_skip("socket"); + + (void) unlink(TEST_SOCKET); + + const struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = TEST_SOCKET + }; + + if (bind(lfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + + test_sockname_syscall(lfd); + + (void) unlink(TEST_SOCKET); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/getsockname.test b/tests-m32/getsockname.test new file mode 100755 index 000000000..99b285060 --- /dev/null +++ b/tests-m32/getsockname.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of getsockname syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-m32/getuid.c b/tests-m32/getuid.c new file mode 100644 index 000000000..57311f72d --- /dev/null +++ b/tests-m32/getuid.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getuid + +# include +# include + +int +main(void) +{ + printf("getuid() = %ld\n", syscall(__NR_getuid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getuid") + +#endif diff --git a/tests-m32/getuid.test b/tests-m32/getuid.test new file mode 100755 index 000000000..9aaf74ba2 --- /dev/null +++ b/tests-m32/getuid.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check getuid syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog uniq +run_prog > /dev/null +run_strace -qq -a9 -e$NAME $args > "$EXP" +uniq < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$OUT" "$EXP" diff --git a/tests-m32/getuid32.c b/tests-m32/getuid32.c new file mode 100644 index 000000000..397dd08ff --- /dev/null +++ b/tests-m32/getuid32.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getuid32 + +# include +# include + +int +main(void) +{ + printf("getuid32() = %ld\n", syscall(__NR_getuid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getuid32") + +#endif diff --git a/tests-m32/getuid32.test b/tests-m32/getuid32.test new file mode 100755 index 000000000..ae0c557bd --- /dev/null +++ b/tests-m32/getuid32.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getuid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-m32/getxxid.c b/tests-m32/getxxid.c new file mode 100644 index 000000000..6eee52c52 --- /dev/null +++ b/tests-m32/getxxid.c @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_getxpid && defined __NR_getxuid && defined __NR_getxgid + +# include +# include + +int +main(void) +{ + long id; + pid_t ppid; + + id = syscall(__NR_getxpid); + ppid = getppid(); + printf("getxpid() = %ld (ppid %ld)\n", id, (long) ppid); + printf("getxpid() = %ld (ppid %ld)\n", id, (long) ppid); + + id = syscall(__NR_getxuid); + printf("getxuid() = %ld (euid %ld)\n", id, id); + + id = syscall(__NR_getxgid); + printf("getxgid() = %ld (egid %ld)\n", id, id); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getxpid && __NR_getxuid && __NR_getxgid") + +#endif diff --git a/tests-m32/getxxid.test b/tests-m32/getxxid.test new file mode 100755 index 000000000..9b89d7cfa --- /dev/null +++ b/tests-m32/getxxid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getxpid, getxuid, and getxgid syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 -e trace=getxpid,getxuid,getxgid diff --git a/tests-m32/hexdump_strdup.c b/tests-m32/hexdump_strdup.c new file mode 100644 index 000000000..4d6b53f4c --- /dev/null +++ b/tests-m32/hexdump_strdup.c @@ -0,0 +1,66 @@ +/* + * Make a hexdump copy of C string + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +const char * +hexdump_memdup(const char *src, size_t len) +{ + size_t dst_size = 3 * len + 2; + assert(dst_size > len); + + char *dst = malloc(dst_size); + if (!dst) + perror_msg_and_fail("malloc(%zu)", dst_size); + + char *p = dst; + const unsigned char *usrc = (const unsigned char *) src; + size_t i; + for (i = 0; i < len; ++i) { + unsigned int c = usrc[i]; + *(p++) = ' '; + if (i == 8) + *(p++) = ' '; + *(p++) = "0123456789abcdef"[c >> 4]; + *(p++) = "0123456789abcdef"[c & 0xf]; + } + *p = '\0'; + + return dst; +} + +const char * +hexdump_strdup(const char *src) +{ + return hexdump_memdup(src, strlen(src)); +} diff --git a/tests-m32/hexquote_strndup.c b/tests-m32/hexquote_strndup.c new file mode 100644 index 000000000..3ad3970c2 --- /dev/null +++ b/tests-m32/hexquote_strndup.c @@ -0,0 +1,58 @@ +/* + * Make a hexquoted copy of a string + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +const char * +hexquote_strndup(const char *src, const size_t src_len) +{ + const size_t dst_size = 4 * src_len + 1; + assert(dst_size > src_len); + + char *dst = malloc(dst_size); + if (!dst) + perror_msg_and_fail("malloc(%zu)", dst_size); + + char *p = dst; + size_t i; + for (i = 0; i < src_len; ++i) { + unsigned int c = ((const unsigned char *) src)[i]; + *(p++) = '\\'; + *(p++) = 'x'; + *(p++) = "0123456789abcdef"[c >> 4]; + *(p++) = "0123456789abcdef"[c & 0xf]; + } + *p = '\0'; + + return dst; +} diff --git a/tests-m32/inet-cmsg.c b/tests-m32/inet-cmsg.c new file mode 100644 index 000000000..b530016d0 --- /dev/null +++ b/tests-m32/inet-cmsg.c @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +static void +print_pktinfo(const struct cmsghdr *c) +{ + printf("IP_PKTINFO, cmsg_data={ipi_ifindex=if_nametoindex(\"lo\")" + ", ipi_spec_dst=inet_addr(\"127.0.0.1\")" + ", ipi_addr=inet_addr(\"127.0.0.1\")}"); +} + +static void +print_ttl(const struct cmsghdr *c) +{ + const unsigned int *ttl = (const unsigned int *) CMSG_DATA(c); + + printf("IP_TTL, cmsg_data=[%u]", *ttl); +} + +static void +print_tos(const struct cmsghdr *c) +{ + const uint8_t *tos = (const uint8_t *) CMSG_DATA(c); + + printf("IP_TOS, cmsg_data=[%#x]", *tos); +} + +static void +print_opts(const char *name, const struct cmsghdr *c) +{ + const unsigned char *opts = (const unsigned char *) CMSG_DATA(c); + const size_t len = c->cmsg_len - CMSG_ALIGN(sizeof(*c)); + + printf("%s", name); + if (len) { + printf(", cmsg_data=["); + size_t i; + for (i = 0; i < len; ++i) + printf("%s0x%02x", i ? ", " : "", opts[i]); + printf("]"); + } +} + +#ifdef IP_ORIGDSTADDR +static void +print_origdstaddr(const struct cmsghdr *c) +{ + const struct sockaddr_in *sin = + (const struct sockaddr_in *) CMSG_DATA(c); + + printf("IP_ORIGDSTADDR, cmsg_data={sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}", ntohs(sin->sin_port)); +} +#endif + +int +main(void) +{ + int i; + while ((i = open("/dev/null", O_RDWR)) < 3) + assert(i >= 0); + assert(!close(0)); + assert(!close(3)); + + if (socket(AF_INET, SOCK_DGRAM, 0)) + perror_msg_and_skip("socket"); + struct sockaddr_in addr = { + .sin_family = AF_INET, + .sin_addr.s_addr = htonl(INADDR_LOOPBACK) + }; + socklen_t len = sizeof(addr); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + assert(!getsockname(0, (struct sockaddr *) &addr, &len)); + + assert(socket(AF_INET, SOCK_DGRAM, 0) == 3); + assert(!connect(3, (struct sockaddr *) &addr, len)); + + const int opt_1 = htonl(0x01000000); +#define SETSOCKOPT(fd, name) assert(!setsockopt(fd, IPPROTO_IP, (name), &opt_1, sizeof(opt_1))) + SETSOCKOPT(3, IP_OPTIONS); + SETSOCKOPT(0, IP_PKTINFO); + SETSOCKOPT(0, IP_RECVTTL); + SETSOCKOPT(0, IP_RECVTOS); + SETSOCKOPT(0, IP_RECVOPTS); + SETSOCKOPT(0, IP_RETOPTS); +#ifdef IP_RECVORIGDSTADDR + SETSOCKOPT(0, IP_RECVORIGDSTADDR); +#endif + + static const char data[] = "data"; + const size_t size = sizeof(data) - 1; + assert(send(3, data, size, 0) == (int) size); + assert(!close(3)); + + char buf[size]; + struct iovec iov = { + .iov_base = buf, + .iov_len = sizeof(buf) + }; + struct cmsghdr control[16]; + struct msghdr mh = { + .msg_name = &addr, + .msg_namelen = len, + .msg_iov = &iov, + .msg_iovlen = 1, + .msg_control = control, + .msg_controllen = sizeof(control) + }; + + assert(recvmsg(0, &mh, 0) == (int) size); + assert(!close(0)); + + printf("recvmsg(0, {msg_name={sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, msg_namelen=%u" + ", msg_iov=[{iov_base=\"%s\", iov_len=%u}], msg_iovlen=1" + ", msg_control=[", + ntohs(addr.sin_port), (unsigned) mh.msg_namelen, + data, (unsigned) size); + + struct cmsghdr *c; + for (c = CMSG_FIRSTHDR(&mh); c; c = CMSG_NXTHDR(&mh, c)) { + if (IPPROTO_IP != c->cmsg_level) + continue; + if (c != control) + printf(", "); + printf("{cmsg_len=%lu, cmsg_level=SOL_IP, cmsg_type=", + (unsigned long) c->cmsg_len); + switch (c->cmsg_type) { + case IP_PKTINFO: + print_pktinfo(c); + break; + case IP_TTL: + print_ttl(c); + break; + case IP_TOS: + print_tos(c); + break; + case IP_RECVOPTS: + print_opts("IP_RECVOPTS", c); + break; + case IP_RETOPTS: + print_opts("IP_RETOPTS", c); + break; +#ifdef IP_ORIGDSTADDR + case IP_ORIGDSTADDR: + print_origdstaddr(c); + break; +#endif + default: + printf("%d", c->cmsg_type); + break; + } + printf("}"); + } + printf("], msg_controllen=%lu, msg_flags=0}, 0) = %u\n", + (unsigned long) mh.msg_controllen, (unsigned) size); + puts("+++ exited with 0 +++"); + + return 0; +} diff --git a/tests-m32/inet-cmsg.test b/tests-m32/inet-cmsg.test new file mode 100755 index 000000000..52ff5f595 --- /dev/null +++ b/tests-m32/inet-cmsg.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check IPPROTO_IP control messages decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=recvmsg diff --git a/tests-m32/init.sh b/tests-m32/init.sh new file mode 100644 index 000000000..f368b98af --- /dev/null +++ b/tests-m32/init.sh @@ -0,0 +1,272 @@ +#!/bin/sh +# +# Copyright (c) 2011-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ME_="${0##*/}" +LOG="$ME_.tmp" +OUT="$LOG.out" +EXP="$LOG.exp" +NAME="${ME_%.test}" + +warn_() { printf >&2 '%s\n' "$*"; } +fail_() { warn_ "$ME_: failed test: $*"; exit 1; } +skip_() { warn_ "$ME_: skipped test: $*"; exit 77; } +framework_failure_() { warn_ "$ME_: framework failure: $*"; exit 99; } +framework_skip_() { warn_ "$ME_: framework skip: $*"; exit 77; } + +check_prog() +{ + type "$@" > /dev/null 2>&1 || + framework_skip_ "$* is not available" +} + +dump_log_and_fail_with() +{ + cat < "$LOG" + fail_ "$*" +} + +run_prog() +{ + if [ $# -eq 0 ]; then + set -- "./$NAME" + fi + args="$*" + "$@" || { + rc=$? + if [ $rc -eq 77 ]; then + skip_ "$args exited with code 77" + else + fail_ "$args failed with code $rc" + fi + } +} + + +run_prog_skip_if_failed() +{ + args="$*" + "$@" || framework_skip_ "$args failed with code $?" +} + +run_strace() +{ + > "$LOG" || fail_ "failed to write $LOG" + args="$*" + $STRACE -o "$LOG" "$@" || + dump_log_and_fail_with "$STRACE $args failed with code $?" +} + +run_strace_merge() +{ + rm -f -- "$LOG".[0-9]* + run_strace -ff -tt "$@" + "$srcdir"/../strace-log-merge "$LOG" > "$LOG" || + dump_log_and_fail_with 'strace-log-merge failed with code $?' + rm -f -- "$LOG".[0-9]* +} + +check_gawk() +{ + check_prog gawk + check_prog grep + + local program="$1"; shift + if grep '^@include[[:space:]]' < "$program" > /dev/null; then + gawk '@include "/dev/null"' < /dev/null || + framework_skip_ 'gawk does not support @include' + fi +} + +# Usage: [FILE_TO_CHECK [AWK_PROGRAM [ERROR_MESSAGE [EXTRA_AWK_OPTIONS...]]]] +# Check whether AWK_PROGRAM matches FILE_TO_CHECK using gawk. +# If it doesn't, dump FILE_TO_CHECK and fail with ERROR_MESSAGE. +match_awk() +{ + local output program error + if [ $# -eq 0 ]; then + output="$LOG" + else + output="$1"; shift + fi + if [ $# -eq 0 ]; then + program="$srcdir/$NAME.awk" + else + program="$1"; shift + fi + if [ $# -eq 0 ]; then + error="$STRACE $args output mismatch" + else + error="$1"; shift + fi + + check_gawk "$program" + + AWKPATH="$srcdir" gawk -f "$program" "$@" < "$output" || { + cat < "$output" + fail_ "$error" + } +} + +# Usage: [FILE_TO_CHECK [FILE_TO_COMPATE_WITH [ERROR_MESSAGE]]] +# Check whether FILE_TO_CHECK differs from FILE_TO_COMPATE_WITH. +# If it does, dump the difference and fail with ERROR_MESSAGE. +match_diff() +{ + local output expected error + if [ $# -eq 0 ]; then + output="$LOG" + else + output="$1"; shift + fi + if [ $# -eq 0 ]; then + expected="$srcdir/$NAME.expected" + else + expected="$1"; shift + fi + if [ $# -eq 0 ]; then + error="$STRACE $args output mismatch" + else + error="$1"; shift + fi + + check_prog diff + + diff -- "$expected" "$output" || + fail_ "$error" +} + +# Usage: [FILE_TO_CHECK [FILE_WITH_PATTERNS [ERROR_MESSAGE]]] +# Check whether all patterns listed in FILE_WITH_PATTERNS +# match FILE_TO_CHECK using egrep. +# If at least one of these patterns does not match, +# dump both files and fail with ERROR_MESSAGE. +match_grep() +{ + local output patterns error pattern cnt failed= + if [ $# -eq 0 ]; then + output="$LOG" + else + output="$1"; shift + fi + if [ $# -eq 0 ]; then + patterns="$srcdir/$NAME.expected" + else + patterns="$1"; shift + fi + if [ $# -eq 0 ]; then + error="$STRACE $args output mismatch" + else + error="$1"; shift + fi + + check_prog wc + check_prog grep + + cnt=1 + while read -r pattern; do + LC_ALL=C grep -E -x -e "$pattern" < "$output" > /dev/null || { + test -n "$failed" || { + echo 'Failed patterns of expected output:' + failed=1 + } + printf '#%d: %s\n' "$cnt" "$pattern" + } + cnt=$(($cnt + 1)) + done < "$patterns" + test -z "$failed" || { + echo 'Actual output:' + cat < "$output" + fail_ "$error" + } +} + +# Usage: run_strace_match_diff [args to run_strace] +run_strace_match_diff() +{ + args="$*" + [ -n "$args" -a -z "${args##*-e trace=*}" ] || + set -- -e trace="$NAME" "$@" + run_prog > /dev/null + run_strace "$@" $args > "$EXP" + match_diff "$LOG" "$EXP" + rm -f "$EXP" +} + +# Print kernel version code. +# usage: kernel_version_code $(uname -r) +kernel_version_code() +{ + ( + set -f + IFS=. + set -- $1 + v1="${1%%[!0-9]*}" && [ -n "$v1" ] || v1=0 + v2="${2%%[!0-9]*}" && [ -n "$v2" ] || v2=0 + v3="${3%%[!0-9]*}" && [ -n "$v3" ] || v3=0 + echo "$(($v1 * 65536 + $v2 * 256 + $v3))" + ) +} + +# Usage: require_min_kernel_version_or_skip 3.0 +require_min_kernel_version_or_skip() +{ + local uname_r + uname_r="$(uname -r)" + + [ "$(kernel_version_code "$uname_r")" -ge \ + "$(kernel_version_code "$1")" ] || + skip_ "the kernel release $uname_r is not $1 or newer" +} + +# Usage: grep_pid_status $pid GREP-OPTIONS... +grep_pid_status() +{ + local pid + pid=$1; shift + cat < "/proc/$pid/status" | grep "$@" +} + +check_prog cat +check_prog rm + +rm -f "$LOG" + +[ -n "${STRACE-}" ] || { + STRACE=../strace + case "${LOG_COMPILER-} ${LOG_FLAGS-}" in + *--suppressions=*--error-exitcode=*--tool=*) + # add valgrind command prefix + STRACE="${LOG_COMPILER-} ${LOG_FLAGS-} $STRACE" + ;; + esac +} + +: "${TIMEOUT_DURATION:=60}" +: "${SLEEP_A_BIT:=sleep 1}" + +[ -z "${VERBOSE-}" ] || + set -x diff --git a/tests-m32/init_delete_module.h b/tests-m32/init_delete_module.h new file mode 100644 index 000000000..db550c33c --- /dev/null +++ b/tests-m32/init_delete_module.h @@ -0,0 +1,64 @@ +/* + * Helper header containing common code for finit_module, init_module, + * and delete_module tests. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef STRACE_TESTS_INIT_DELETE_MODULE_H +#define STRACE_TESTS_INIT_DELETE_MODULE_H + +# include +# include + +enum { + PARAM1_LEN = 33, + PARAM2_LEN = 8, + PARAM1_BASE = 0x30, + PARAM2_BASE = 0x80, + MAX_STRLEN = 32, +}; + +static const kernel_ulong_t bogus_zero = + (kernel_ulong_t) 0xffffffff00000000ULL; + +static void +print_str(unsigned int base, unsigned int len, bool escape) +{ + unsigned int i; + + if (!escape) { + for (i = base; i < (base + len); i++) + putc(i, stdout); + + return; + } + + for (i = base; i < (base + len); i++) + printf("\\%u%u%u", (i >> 6) & 0x3, (i >> 3) & 0x7, i & 0x7); +} + +#endif /* !STRACE_TESTS_INIT_DELETE_MODULE_H */ diff --git a/tests-m32/init_module.c b/tests-m32/init_module.c new file mode 100644 index 000000000..88ef9ec83 --- /dev/null +++ b/tests-m32/init_module.c @@ -0,0 +1,106 @@ +/* + * Check decoding of init_module syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_init_module) + +# include +# include + +# include "init_delete_module.h" + +int +main(void) +{ + + static const kernel_ulong_t bogus_addr = + (kernel_ulong_t) 0xfffffeedfffffaceULL; + static const kernel_ulong_t bogus_len = + (kernel_ulong_t) 0xfffffca7ffffc0deULL; + + long rc; + char *bogus_param1 = tail_alloc(PARAM1_LEN); + char *bogus_param2 = tail_alloc(PARAM2_LEN); + const char *errstr; + + fill_memory_ex(bogus_param1, PARAM1_LEN, PARAM1_BASE, PARAM1_LEN); + fill_memory_ex(bogus_param2, PARAM2_LEN, PARAM2_BASE, PARAM2_LEN); + + rc = syscall(__NR_init_module, NULL, bogus_zero, NULL); + printf("init_module(NULL, %llu, NULL) = %s\n", + (unsigned long long) bogus_zero, sprintrc(rc)); + + rc = syscall(__NR_init_module, bogus_addr, 0, bogus_param1); + errstr = sprintrc(rc); + + printf("init_module(%#llx, 0, \"", (unsigned long long) bogus_addr); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\"...) = %s\n", errstr); + + bogus_param1[PARAM1_LEN - 1] = '\0'; + + rc = syscall(__NR_init_module, bogus_addr, 0, bogus_param1); + errstr = sprintrc(rc); + + printf("init_module(%#llx, 0, \"", (unsigned long long) bogus_addr); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\") = %s\n", errstr); + + rc = syscall(__NR_init_module, bogus_addr, bogus_len, + bogus_param2 + PARAM2_LEN); + printf("init_module(%#llx, %llu, %p) = %s\n", + (unsigned long long) bogus_addr, (unsigned long long) bogus_len, + bogus_param2 + PARAM2_LEN, sprintrc(rc)); + + rc = syscall(__NR_init_module, NULL, bogus_len, bogus_param2); + printf("init_module(NULL, %llu, %p) = %s\n", + (unsigned long long) bogus_len, bogus_param2, sprintrc(rc)); + + bogus_param2[PARAM2_LEN - 1] = '\0'; + + rc = syscall(__NR_init_module, NULL, bogus_len, bogus_param2); + errstr = sprintrc(rc); + + printf("init_module(NULL, %llu, \"", (unsigned long long) bogus_len); + print_str(PARAM2_BASE, PARAM2_LEN - 1, true); + printf("\") = %s\n", errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_init_module"); + +#endif diff --git a/tests-m32/init_module.test b/tests-m32/init_module.test new file mode 100755 index 000000000..ef7c7325b --- /dev/null +++ b/tests-m32/init_module.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of init_module syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-m32/inode_of_sockfd.c b/tests-m32/inode_of_sockfd.c new file mode 100644 index 000000000..b227f3069 --- /dev/null +++ b/tests-m32/inode_of_sockfd.c @@ -0,0 +1,59 @@ +/* + * This file is part of strace test suite. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +unsigned long +inode_of_sockfd(const int fd) +{ + assert(fd >= 0); + + char linkpath[sizeof("/proc/self/fd/%u") + sizeof(int) * 3]; + assert(snprintf(linkpath, sizeof(linkpath), "/proc/self/fd/%u", fd) + < (int) sizeof(linkpath)); + + char path[PATH_MAX + 1]; + const ssize_t path_len = readlink(linkpath, path, sizeof(path) - 1); + if (path_len < 0) + perror_msg_and_fail("readlink: %s", linkpath); + path[path_len] = '\0'; + + static const char prefix[] = "socket:["; + const size_t prefix_len = sizeof(prefix) - 1; + assert(strncmp(path, prefix, prefix_len) == 0 + && path[path_len - 1] == ']'); + + return strtoul(path + prefix_len, NULL, 10); +} diff --git a/tests-m32/inotify.c b/tests-m32/inotify.c new file mode 100644 index 000000000..925d69ffe --- /dev/null +++ b/tests-m32/inotify.c @@ -0,0 +1,90 @@ +/* + * Check decoding of inotify_add_watch and inotify_rm_watch syscalls. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_inotify_add_watch) && defined(__NR_inotify_rm_watch) + +# include +# include +# include + +int +main(void) +{ + static const struct { + const char *path; + const char *str; + } bogus_path_str = { + ARG_STR("/abc\1/def\2/ghi\3/jkl\4/mno\5/pqr\6/stu\7/vwx\10") }; + static const kernel_ulong_t bogus_fd = + (kernel_ulong_t) 0xfffffeedfffffaceULL; + static const kernel_ulong_t bogus_mask = + (kernel_ulong_t) 0xffffda7affffdeadULL; + static const char *bogus_mask_str = "IN_ACCESS|IN_ATTRIB|" + "IN_CLOSE_WRITE|IN_OPEN|IN_MOVED_TO|IN_DELETE|IN_DELETE_SELF|" + "IN_MOVE_SELF|IN_Q_OVERFLOW|IN_IGNORED|IN_ONLYDIR|" + "IN_DONT_FOLLOW|IN_EXCL_UNLINK|IN_MASK_ADD|IN_ISDIR|IN_ONESHOT|" + "0x18ff1000"; + + long rc; + char *bogus_path = tail_memdup(bogus_path_str.path, + strlen(bogus_path_str.path) + 1); + + rc = syscall(__NR_inotify_add_watch, 0, NULL, 0); + printf("inotify_add_watch(0, NULL, 0) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_inotify_add_watch, bogus_fd, bogus_path + 4096, 0); + printf("inotify_add_watch(%d, %p, %u) = %s\n", + (int) bogus_fd, bogus_path + 4096, 0, sprintrc(rc)); + + rc = syscall(__NR_inotify_add_watch, bogus_fd, bogus_path, bogus_mask); + printf("inotify_add_watch(%d, %s, %s) = %s\n", + (int) bogus_fd, bogus_path_str.str, bogus_mask_str, + sprintrc(rc)); + + rc = syscall(__NR_inotify_rm_watch, 0, 0); + printf("inotify_rm_watch(0, 0) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_inotify_rm_watch, bogus_fd, bogus_fd); + printf("inotify_rm_watch(%d, %d) = %s\n", + (int) bogus_fd, (int) bogus_fd, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_inotify_add_watch && __NR_inotify_rm_watch"); + +#endif diff --git a/tests-m32/inotify.test b/tests-m32/inotify.test new file mode 100755 index 000000000..436f3bc85 --- /dev/null +++ b/tests-m32/inotify.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of inotify_add_watch and inotify_rm_watch syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=inotify_add_watch,inotify_rm_watch -a23 diff --git a/tests-m32/inotify_init1.c b/tests-m32/inotify_init1.c new file mode 100644 index 000000000..0325150d9 --- /dev/null +++ b/tests-m32/inotify_init1.c @@ -0,0 +1,80 @@ +/* + * Check decoding of inotify_init1 syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_inotify_init1) + +# include +# include +# include + +# ifdef O_CLOEXEC +# define cloexec_flag O_CLOEXEC +# else +# define cloexec_flag 0 +# endif +# define all_flags (O_NONBLOCK | cloexec_flag) + +int +main(void) +{ + static const kernel_ulong_t bogus_flags1 = + (kernel_ulong_t) 0xfacefeeddeadbeefULL | O_NONBLOCK; + static const kernel_ulong_t bogus_flags2 = + (kernel_ulong_t) 0x55555550ff96b77bULL & ~all_flags; + + long rc; + + rc = syscall(__NR_inotify_init1, bogus_flags1); + printf("inotify_init1(IN_NONBLOCK|%s%#x) = %s\n", + bogus_flags1 & cloexec_flag ? "IN_CLOEXEC|" : "", + (unsigned int) (bogus_flags1 & ~all_flags), + sprintrc(rc)); + + rc = syscall(__NR_inotify_init1, bogus_flags2); + printf("inotify_init1(%#x /* IN_??? */) = %s\n", + (unsigned int) bogus_flags2, sprintrc(rc)); + + rc = syscall(__NR_inotify_init1, all_flags); + printf("inotify_init1(IN_NONBLOCK%s) = %s\n", + all_flags & cloexec_flag ? "|IN_CLOEXEC" : "", sprintrc(rc)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_inotify_init1"); + +#endif diff --git a/tests-m32/inotify_init1.test b/tests-m32/inotify_init1.test new file mode 100755 index 000000000..1a7c92615 --- /dev/null +++ b/tests-m32/inotify_init1.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of inotify_init1 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-m32/ioctl.c b/tests-m32/ioctl.c new file mode 100644 index 000000000..92a3191d1 --- /dev/null +++ b/tests-m32/ioctl.c @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_LINUX_MMTIMER_H +# include +#endif +#ifdef HAVE_LINUX_HIDDEV_H +# include +#endif +#ifdef HAVE_LINUX_INPUT_H +# include +#endif + +#include + +#if defined MMTIMER_GETRES \ + && defined VIDIOC_ENUMINPUT \ + && defined HIDIOCGVERSION \ + && defined HIDIOCGPHYS \ + && defined EVIOCGBIT \ + && defined EV_KEY + +int +main(void ) +{ + uint64_t data = 0; + +#ifndef POWERPC + struct termios tty; + (void) ioctl(-1, TCGETS, &tty); + printf("ioctl(-1, TCGETS, %p)" + " = -1 EBADF (%m)\n", &tty); +#endif + + (void) ioctl(-1, MMTIMER_GETRES, &data); + printf("ioctl(-1, MMTIMER_GETRES, %p)" + " = -1 EBADF (%m)\n", &data); + + (void) ioctl(-1, VIDIOC_ENUMINPUT, 0); + printf("ioctl(-1, VIDIOC_ENUMINPUT, NULL)" + " = -1 EBADF (%m)\n"); + + (void) ioctl(-1, HIDIOCGVERSION, &data); + printf("ioctl(-1, HIDIOCGRDESCSIZE or HIDIOCGVERSION, %p)" + " = -1 EBADF (%m)\n", &data); + + (void) ioctl(-1, HIDIOCGPHYS(8), &data); + printf("ioctl(-1, HIDIOCGPHYS(8), %p)" + " = -1 EBADF (%m)\n", &data); + + (void) ioctl(-1, EVIOCGBIT(EV_KEY, 8), &data); + printf("ioctl(-1, EVIOCGBIT(EV_KEY, 8), %p)" + " = -1 EBADF (%m)\n", &data); + + (void) ioctl(-1, _IOR('M', 13, int), &data); + printf("ioctl(-1, MIXER_READ(13) or OTPSELECT, [MTD_OTP_OFF])" + " = -1 EBADF (%m)\n"); + + (void) ioctl(-1, _IOC(_IOC_WRITE, 0xde, 0, 0), (kernel_ulong_t) -1ULL); + printf("ioctl(-1, _IOC(_IOC_WRITE, 0xde, 0, 0), %#lx)" + " = -1 EBADF (%m)\n", -1UL); + + (void) ioctl(-1, _IOR(0xde, 0xad, data), &data); + printf("ioctl(-1, _IOC(_IOC_READ, 0xde, 0xad, 0x8), %p)" + " = -1 EBADF (%m)\n", &data); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("MMTIMER_GETRES && VIDIOC_ENUMINPUT" + " && HIDIOCGVERSION && HIDIOCGPHYS" + " && EVIOCGBIT && EV_KEY") + +#endif diff --git a/tests-m32/ioctl.test b/tests-m32/ioctl.test new file mode 100755 index 000000000..94bc5d427 --- /dev/null +++ b/tests-m32/ioctl.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check ioctl syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-m32/ioctl_block.c b/tests-m32/ioctl_block.c new file mode 100644 index 000000000..f62b0b365 --- /dev/null +++ b/tests-m32/ioctl_block.c @@ -0,0 +1,203 @@ +/* + * This file is part of ioctl_block strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_STRUCT_BLK_USER_TRACE_SETUP +# include +#endif +#include "xlat.h" + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; + +static struct xlat block_argless[] = { + XLAT(BLKRRPART), + XLAT(BLKFLSBUF), +#ifdef BLKTRACESTART + XLAT(BLKTRACESTART), +#endif +#ifdef BLKTRACESTOP + XLAT(BLKTRACESTOP), +#endif +#ifdef BLKTRACETEARDOWN + XLAT(BLKTRACETEARDOWN), +#endif +}; + +#define TEST_NULL_ARG(cmd) \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd) + +int +main(void) +{ + TEST_NULL_ARG(BLKBSZGET); + TEST_NULL_ARG(BLKBSZSET); + TEST_NULL_ARG(BLKFRAGET); + TEST_NULL_ARG(BLKGETSIZE); + TEST_NULL_ARG(BLKGETSIZE64); + TEST_NULL_ARG(BLKPG); + TEST_NULL_ARG(BLKRAGET); + TEST_NULL_ARG(BLKROGET); + TEST_NULL_ARG(BLKROSET); + TEST_NULL_ARG(BLKSECTGET); + TEST_NULL_ARG(BLKSECTGET); + TEST_NULL_ARG(BLKSSZGET); +#ifdef BLKALIGNOFF + TEST_NULL_ARG(BLKALIGNOFF); +#endif +#ifdef BLKDISCARD + TEST_NULL_ARG(BLKDISCARD); +#endif +#ifdef BLKDISCARDZEROES + TEST_NULL_ARG(BLKDISCARDZEROES); +#endif +#ifdef BLKIOMIN + TEST_NULL_ARG(BLKIOMIN); +#endif +#ifdef BLKIOOPT + TEST_NULL_ARG(BLKIOOPT); +#endif +#ifdef BLKPBSZGET + TEST_NULL_ARG(BLKPBSZGET); +#endif +#ifdef BLKROTATIONAL + TEST_NULL_ARG(BLKROTATIONAL); +#endif +#ifdef BLKSECDISCARD + TEST_NULL_ARG(BLKSECDISCARD); +#endif +#ifdef BLKZEROOUT + TEST_NULL_ARG(BLKZEROOUT); +#endif +#if defined BLKTRACESETUP && defined HAVE_STRUCT_BLK_USER_TRACE_SETUP + TEST_NULL_ARG(BLKTRACESETUP); +#endif + + ioctl(-1, BLKRASET, lmagic); + printf("ioctl(-1, BLKRASET, %lu) = -1 EBADF (%m)\n", lmagic); + + ioctl(-1, BLKFRASET, lmagic); + printf("ioctl(-1, BLKFRASET, %lu) = -1 EBADF (%m)\n", lmagic); + + int *const val_int = tail_alloc(sizeof(*val_int)); + *val_int = magic; + + ioctl(-1, BLKROSET, val_int); + printf("ioctl(-1, BLKROSET, [%d]) = -1 EBADF (%m)\n", *val_int); + + ioctl(-1, BLKBSZSET, val_int); + printf("ioctl(-1, BLKBSZSET, [%d]) = -1 EBADF (%m)\n", *val_int); + + uint64_t *pair_int64 = tail_alloc(sizeof(*pair_int64) * 2); + pair_int64[0] = 0xdeadbeefbadc0dedULL; + pair_int64[1] = 0xfacefeedcafef00dULL; + +#ifdef BLKDISCARD + ioctl(-1, BLKDISCARD, pair_int64); + printf("ioctl(-1, BLKDISCARD, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + +#ifdef BLKSECDISCARD + ioctl(-1, BLKSECDISCARD, pair_int64); + printf("ioctl(-1, BLKSECDISCARD, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + +#ifdef BLKZEROOUT + ioctl(-1, BLKZEROOUT, pair_int64); + printf("ioctl(-1, BLKZEROOUT, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + + struct blkpg_ioctl_arg *const blkpg = tail_alloc(sizeof(*blkpg)); + blkpg->op = 3; + blkpg->flags = 0xdeadbeef; + blkpg->datalen = 0xbadc0ded; + blkpg->data = (void *) (unsigned long) 0xcafef00dfffffeedULL; + + ioctl(-1, BLKPG, blkpg); + printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d" + ", data=%#lx}) = -1 EBADF (%m)\n", + "BLKPG_RESIZE_PARTITION", blkpg->flags, blkpg->datalen, + (unsigned long) blkpg->data); + + struct blkpg_partition *const bp = tail_alloc(sizeof(*bp)); + bp->start = 0xfac1fed2dad3bef4ULL; + bp->length = 0xfac5fed6dad7bef8ULL; + bp->pno = magic; + memset(bp->devname, 'A', sizeof(bp->devname)); + memset(bp->volname, 'B', sizeof(bp->volname)); + blkpg->op = 1; + blkpg->data = bp; + + ioctl(-1, BLKPG, blkpg); + printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d" + ", data={start=%lld, length=%lld, pno=%d" + ", devname=\"%.*s\", volname=\"%.*s\"}})" + " = -1 EBADF (%m)\n", + "BLKPG_ADD_PARTITION", + blkpg->flags, blkpg->datalen, + bp->start, bp->length, bp->pno, + (int) sizeof(bp->devname) - 1, bp->devname, + (int) sizeof(bp->volname) - 1, bp->volname); + +#if defined BLKTRACESETUP && defined HAVE_STRUCT_BLK_USER_TRACE_SETUP + struct blk_user_trace_setup *const buts = tail_alloc(sizeof(*buts)); + fill_memory(buts, sizeof(*buts)); + + ioctl(-1, BLKTRACESETUP, buts); + printf("ioctl(-1, BLKTRACESETUP, {act_mask=%hu, buf_size=%u, buf_nr=%u" + ", start_lba=%" PRI__u64 ", end_lba=%" PRI__u64 ", pid=%u})" + " = -1 EBADF (%m)\n", + buts->act_mask, buts->buf_size, buts->buf_nr, + buts->start_lba, buts->end_lba, buts->pid); +#endif + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(block_argless); ++i) { + ioctl(-1, (unsigned long) block_argless[i].val, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", block_argless[i].str); + } + + ioctl(-1, _IOC(_IOC_READ, 0x12, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ, 0x12, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/ioctl_block.test b/tests-m32/ioctl_block.test new file mode 100755 index 000000000..0bf2500f4 --- /dev/null +++ b/tests-m32/ioctl_block.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of BLK* ioctls. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-m32/ioctl_dm-v.c b/tests-m32/ioctl_dm-v.c new file mode 100644 index 000000000..d95058f2e --- /dev/null +++ b/tests-m32/ioctl_dm-v.c @@ -0,0 +1,2 @@ +#define VERBOSE 1 +#include "ioctl_dm.c" diff --git a/tests-m32/ioctl_dm-v.test b/tests-m32/ioctl_dm-v.test new file mode 100755 index 000000000..ade3b9e85 --- /dev/null +++ b/tests-m32/ioctl_dm-v.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check unabbreviated decoding of DM* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -s9 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/ioctl_dm.c b/tests-m32/ioctl_dm.c new file mode 100644 index 000000000..08f036c6a --- /dev/null +++ b/tests-m32/ioctl_dm.c @@ -0,0 +1,774 @@ +/* + * Check decoding of DM_* commands of ioctl syscall. + * + * Copyright (c) 2016 Mikulas Patocka + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_LINUX_DM_IOCTL_H + +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# ifndef VERBOSE +# define VERBOSE 0 +# endif + +# define STR32 "AbCdEfGhIjKlMnOpQrStUvWxYz012345" + +# define ALIGNED_SIZE(s_, t_) \ + (((s_) + (ALIGNOF(t_) - 1UL)) & ~(ALIGNOF(t_) - 1UL)) +# define ALIGNED_OFFSET(t_, m_) \ + ALIGNED_SIZE(offsetof(t_, m_), t_) + +static const char str129[] = STR32 STR32 STR32 STR32 "6"; + +static const __u64 dts_sector_base = (__u64) 0xdeadca75facef157ULL; +static const __u64 dts_sector_step = (__u64) 0x100000001ULL; +static const __u64 dts_length_base = (__u64) 0xbadc0dedda7a1057ULL; +static const __u64 dts_length_step = (__u64) 0x700000007ULL; +static const __s32 dts_status_base = (__s32) 3141592653U; +static const __s32 dts_status_step = 0x1234; + +static const size_t min_sizeof_dm_ioctl = + offsetof(struct dm_ioctl, data); + +static struct s { + struct dm_ioctl ioc; + union { + struct { + struct dm_target_spec target_spec; + char target_params[256]; + } ts; + struct { + struct dm_target_msg target_msg; + char target_string[256]; + } tm; + char string[256]; + } u; +} s; + +struct dm_table_open_test { + struct dm_ioctl ioc; + struct dm_target_spec target0; + char param0[1]; + struct dm_target_spec target1; + char param1[2]; + struct dm_target_spec target2; + char param2[3]; + struct dm_target_spec target3; + char param3[4]; + struct dm_target_spec target4; + char param4[5]; + struct dm_target_spec target5; + char param5[6]; + struct dm_target_spec target6; + char param6[7]; + struct dm_target_spec target7; + char param7[8]; + struct dm_target_spec target8; + char param8[9]; + struct dm_target_spec target9; + char param9[10]; +}; + +struct dm_target_msg_test { + struct dm_ioctl ioc; + struct dm_target_msg msg; +}; + +struct args { + unsigned int arg; + const char *str; + bool has_params; + bool has_event_nr; +}; + + +static void +init_s(struct dm_ioctl *s, size_t size, size_t offs) +{ + memset(s, 0, size); + s->version[0] = DM_VERSION_MAJOR; + s->version[1] = 1; + s->version[2] = 2; + s->data_size = size; + s->data_start = offs; + s->dev = 0x1234; + strcpy(s->name, "nnn"); + strcpy(s->uuid, "uuu"); +} + +static void +init_dm_target_spec(struct dm_target_spec *ptr, uint32_t id) +{ + ptr->sector_start = dts_sector_base + dts_sector_step * id; + ptr->length = dts_length_base + dts_length_step * id; + ptr->status = dts_status_base + dts_status_step * id; + + strncpy(ptr->target_type, str129 + + id % (sizeof(str129) - sizeof(ptr->target_type)), + id % (sizeof(ptr->target_type) + 1)); + if (id % (sizeof(ptr->target_type) + 1) < sizeof(ptr->target_type)) + ptr->target_type[id % (sizeof(ptr->target_type) + 1)] = '\0'; +} + +# if VERBOSE +static void +print_dm_target_spec(struct dm_target_spec *ptr, uint32_t id) +{ + printf("{sector_start=%" PRI__u64 ", length=%" PRI__u64 ", " + "target_type=\"%.*s\", string=", + dts_sector_base + dts_sector_step * id, + dts_length_base + dts_length_step * id, + (int) (id % (sizeof(ptr->target_type) + 1)), + str129 + id % (sizeof(str129) - sizeof(ptr->target_type))); +} +# endif /* VERBOSE */ + +int +main(void) +{ + static kernel_ulong_t dummy_dm_ioctl1 = + _IOC(_IOC_READ, DM_IOCTL, 0, 0x1fff); + static kernel_ulong_t dummy_dm_ioctl2 = + _IOC(_IOC_READ|_IOC_WRITE, DM_IOCTL, 0xed, 0); + static kernel_ulong_t dummy_dm_arg = + (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + /* We can't check these properly for now */ + static struct args dummy_check_cmds_nodev[] = { + { ARG_STR(DM_REMOVE_ALL), false }, + { ARG_STR(DM_LIST_DEVICES), true }, + { ARG_STR(DM_LIST_VERSIONS), true }, + }; + static struct args dummy_check_cmds[] = { + { ARG_STR(DM_DEV_CREATE), false }, + { ARG_STR(DM_DEV_REMOVE), false, true }, + { ARG_STR(DM_DEV_STATUS), false }, + { ARG_STR(DM_DEV_WAIT), true, true }, + { ARG_STR(DM_TABLE_CLEAR), false }, + { ARG_STR(DM_TABLE_DEPS), true }, + { ARG_STR(DM_TABLE_STATUS), true }, + }; + + struct dm_ioctl *unaligned_dm_arg = + tail_alloc(offsetof(struct dm_ioctl, data)); + struct dm_ioctl *dm_arg = + tail_alloc(ALIGNED_OFFSET(struct dm_ioctl, data)); + struct dm_table_open_test *dm_arg_open1 = + tail_alloc(ALIGNED_OFFSET(struct dm_table_open_test, target1)); + struct dm_table_open_test *dm_arg_open2 = + tail_alloc(ALIGNED_OFFSET(struct dm_table_open_test, param1)); + struct dm_table_open_test *dm_arg_open3 = + tail_alloc(ALIGNED_OFFSET(struct dm_table_open_test, target9)); + struct dm_target_msg_test *dm_arg_msg = + tail_alloc(sizeof(*dm_arg_msg)); + + long rc; + const char *errstr; + unsigned int i; + + + /* Incorrect operation */ + ioctl(-1, _IOW(DM_IOCTL, 0xde, int), dm_arg); + printf("ioctl(-1, _IOC(_IOC_WRITE, %#x, 0xde, %#zx), %p) = " + "-1 EBADF (%m)\n", + DM_IOCTL, sizeof(int), dm_arg); + + ioctl(-1, dummy_dm_ioctl1, 0); + printf("ioctl(-1, _IOC(_IOC_READ, %#x, 0, %#x), 0) = -1 EBADF (%m)\n", + DM_IOCTL, (unsigned int) _IOC_SIZE(dummy_dm_ioctl1)); + + ioctl(-1, dummy_dm_ioctl2, dummy_dm_arg); + printf("ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, %#x, %#x, 0), %#lx) = " + "-1 EBADF (%m)\n", + DM_IOCTL, (unsigned int) _IOC_NR(dummy_dm_ioctl2), + (unsigned long) dummy_dm_arg); + + + /* DM_VERSION */ + /* Incorrect pointer */ + ioctl(-1, DM_VERSION, dm_arg + 1); + printf("ioctl(-1, DM_VERSION, %p) = -1 EBADF (%m)\n", dm_arg + 1); + + /* Incorrect data_size */ + init_s(dm_arg, 0, 0); + ioctl(-1, DM_VERSION, &s); + printf("ioctl(-1, DM_VERSION, %p) = -1 EBADF (%m)\n", &s); + + /* Incorrect version */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + dm_arg->version[0] = 0xbadc0ded; + dm_arg->version[1] = 0xbadc0dee; + dm_arg->version[2] = 0xbadc0def; + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, {version=%u.%u.%u, " + "/* Unsupported device mapper ABI version */ ...}) = " + "-1 EBADF (%m)\n", 0xbadc0ded, 0xbadc0dee, 0xbadc0def); + + /* Incorrect data_size */ + init_s(dm_arg, 14, 64); + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, {version=4.1.2, data_size=14, " + "/* Incorrect data_size */ ...}) = -1 EBADF (%m)\n"); + + /* Unterminated name/uuid */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + strncpy(dm_arg->name, str129, sizeof(dm_arg->name)); + strncpy(dm_arg->uuid, str129, sizeof(dm_arg->uuid)); + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, {version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"%.127s\", uuid=\"%.128s\", " + "flags=0}) = -1 EBADF (%m)\n", + min_sizeof_dm_ioctl, str129, str129); + + /* Normal call */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = " + "-1 EBADF (%m)\n", min_sizeof_dm_ioctl); + + /* Zero dev, name, uuid */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + dm_arg->data_size = 0xfacefeed; + dm_arg->dev = 0; + dm_arg->name[0] = '\0'; + dm_arg->uuid[0] = '\0'; + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, data_size=%u, flags=0}) = " + "-1 EBADF (%m)\n", 0xfacefeed); + + /* Flag */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + dm_arg->flags = 0xffffffff; + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=" + "DM_READONLY_FLAG|DM_SUSPEND_FLAG|DM_EXISTS_FLAG|" + "DM_PERSISTENT_DEV_FLAG|DM_STATUS_TABLE_FLAG|" + "DM_ACTIVE_PRESENT_FLAG|DM_INACTIVE_PRESENT_FLAG|" + "DM_BUFFER_FULL_FLAG|DM_SKIP_BDGET_FLAG|DM_SKIP_LOCKFS_FLAG|" + "DM_NOFLUSH_FLAG|DM_QUERY_INACTIVE_TABLE_FLAG|" + "DM_UEVENT_GENERATED_FLAG|DM_UUID_FLAG|DM_SECURE_DATA_FLAG|" + "DM_DATA_OUT_FLAG|DM_DEFERRED_REMOVE|DM_INTERNAL_SUSPEND_FLAG|" + "0xfff80080}) = -1 EBADF (%m)\n", + min_sizeof_dm_ioctl); + + /* Normal call */ + init_s(&s.ioc, sizeof(s.ioc), 0); + ioctl(-1, DM_VERSION, &s); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = " + "-1 EBADF (%m)\n", sizeof(s.ioc)); + + + /* DM_REMOVE_ALL */ + /* DM_LIST_DEVICES */ + /* DM_LIST_VERSIONS */ + for (i = 0; i < ARRAY_SIZE(dummy_check_cmds_nodev); i++) { + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + ioctl(-1, dummy_check_cmds_nodev[i].arg, dm_arg); + printf("ioctl(-1, %s, {version=4.1.2, data_size=%zu%s, " + "flags=0}) = -1 EBADF (%m)\n", + dummy_check_cmds_nodev[i].str, + min_sizeof_dm_ioctl, + dummy_check_cmds_nodev[i].has_params ? + ", data_start=0" : ""); + } + + + /* DM_DEV_CREATE */ + /* DM_DEV_REMOVE */ + /* DM_DEV_STATUS */ + /* DM_DEV_WAIT */ + /* DM_TABLE_CLEAR */ + /* DM_TABLE_DEPS */ + /* DM_TABLE_STATUS */ + for (i = 0; i < ARRAY_SIZE(dummy_check_cmds); i++) { + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + ioctl(-1, dummy_check_cmds[i].arg, dm_arg); + printf("ioctl(-1, %s, {version=4.1.2, data_size=%zu%s, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\"%s, " + "flags=0}) = -1 EBADF (%m)\n", + dummy_check_cmds[i].str, min_sizeof_dm_ioctl, + dummy_check_cmds[i].has_params ? ", data_start=0" : "", + dummy_check_cmds[i].has_event_nr ? ", event_nr=0" : ""); + } + + + /* DM_DEV_SUSPEND */ + init_s(&s.ioc, sizeof(s.ioc), 0); + s.ioc.flags = DM_SUSPEND_FLAG; + s.ioc.event_nr = 0xbadc0ded; + ioctl(-1, DM_DEV_SUSPEND, &s); + printf("ioctl(-1, DM_DEV_SUSPEND, " + "{version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "flags=DM_SUSPEND_FLAG}) = -1 EBADF (%m)\n", sizeof(s.ioc)); + + init_s(&s.ioc, sizeof(s.ioc), 0); + s.ioc.event_nr = 0xbadc0ded; + ioctl(-1, DM_DEV_SUSPEND, &s); + printf("ioctl(-1, DM_DEV_SUSPEND, " + "{version=4.1.2, data_size=%zu, dev=makedev(18, 52), " + "name=\"nnn\", uuid=\"uuu\", event_nr=3134983661, " + "flags=0}) = -1 EBADF (%m)\n", sizeof(s.ioc)); + + + /* DM_TABLE_LOAD */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + s.ioc.target_count = 1; + s.u.ts.target_spec.sector_start = 0x10; + s.u.ts.target_spec.length = 0x20; + s.u.ts.target_spec.next = + sizeof(s.u.ts.target_spec) + sizeof(s.u.ts.target_params); + strcpy(s.u.ts.target_spec.target_type, "tgt"); + strcpy(s.u.ts.target_params, "tparams"); + ioctl(-1, DM_TABLE_LOAD, &s); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=1, flags=0, " +# if VERBOSE + "{sector_start=16, length=32, target_type=\"tgt\", " + "string=\"tparams\"}" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", s.ioc.data_size, s.ioc.data_start); + + /* No targets */ + init_s(dm_arg, min_sizeof_dm_ioctl, min_sizeof_dm_ioctl); + dm_arg->data_size = sizeof(*dm_arg); + dm_arg->target_count = 0; + ioctl(-1, DM_TABLE_LOAD, dm_arg); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=0, flags=0}) = -1 EBADF (%m)\n", + sizeof(*dm_arg), min_sizeof_dm_ioctl); + + /* Invalid data_start */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0xfffffff8); + dm_arg->data_size = sizeof(*dm_arg); + dm_arg->target_count = 1234; + ioctl(-1, DM_TABLE_LOAD, dm_arg); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=1234, flags=0, " +# if VERBOSE + "/* misplaced struct dm_target_spec */ ..." +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", sizeof(*dm_arg), 0xfffffff8); + + /* Inaccessible pointer */ + init_s(&dm_arg_open1->ioc, offsetof(struct dm_table_open_test, target1), + offsetof(struct dm_table_open_test, target1)); + dm_arg_open1->ioc.data_size = sizeof(*dm_arg_open1); + dm_arg_open1->ioc.target_count = 0xdeaddea1; + ioctl(-1, DM_TABLE_LOAD, dm_arg_open1); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=3735936673, flags=0, " +# if VERBOSE + "%p" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", sizeof(*dm_arg_open1), + offsetof(struct dm_table_open_test, target1) +# if VERBOSE + , (char *) dm_arg_open1 + + offsetof(struct dm_table_open_test, target1) +# endif /* VERBOSE */ + ); + + /* Inaccessible string */ + init_s(&dm_arg_open2->ioc, offsetof(struct dm_table_open_test, param1), + offsetof(struct dm_table_open_test, target1)); + dm_arg_open2->ioc.data_size = sizeof(*dm_arg_open2); + dm_arg_open2->ioc.target_count = 2; + init_dm_target_spec(&dm_arg_open2->target1, 7); + dm_arg_open2->target1.next = + offsetof(struct dm_table_open_test, target3) - + offsetof(struct dm_table_open_test, target1); + rc = ioctl(-1, DM_TABLE_LOAD, dm_arg_open2); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=2, flags=0, ", + sizeof(*dm_arg_open2), + offsetof(struct dm_table_open_test, target1)); +# if VERBOSE + print_dm_target_spec(&dm_arg_open2->target1, 7); + printf("%p}, %p", + (char *) dm_arg_open2 + + offsetof(struct dm_table_open_test, param1), + (char *) dm_arg_open2 + + offsetof(struct dm_table_open_test, target3)); +# else /* !VERBOSE */ + printf("..."); +# endif /* VERBOSE */ + printf("}) = %s\n", errstr); + + /* Incorrect next */ + init_s(&dm_arg_open3->ioc, offsetof(struct dm_table_open_test, target5), + offsetof(struct dm_table_open_test, target0)); + dm_arg_open3->ioc.target_count = 4; + + init_dm_target_spec(&dm_arg_open3->target0, 9); + dm_arg_open3->target0.next = + offsetof(struct dm_table_open_test, target1) - + offsetof(struct dm_table_open_test, target0); + dm_arg_open3->param0[0] = '\0'; + + init_dm_target_spec(&dm_arg_open3->target1, 15); + dm_arg_open3->target1.next = + offsetof(struct dm_table_open_test, target3) - + offsetof(struct dm_table_open_test, target1); + dm_arg_open3->param1[0] = '\377'; + dm_arg_open3->param1[1] = '\0'; + + init_dm_target_spec(&dm_arg_open3->target3, 42); + dm_arg_open3->target3.next = 0xdeadbeef; + dm_arg_open3->param3[0] = '\1'; + dm_arg_open3->param3[1] = '\2'; + dm_arg_open3->param3[2] = '\0'; + + rc = ioctl(-1, DM_TABLE_LOAD, dm_arg_open3); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=4, flags=0, ", + offsetof(struct dm_table_open_test, target5), + offsetof(struct dm_table_open_test, target0)); +# if VERBOSE + print_dm_target_spec(&dm_arg_open3->target0, 9); + printf("\"\"}, "); + print_dm_target_spec(&dm_arg_open3->target1, 15); + printf("\"\\377\"}, "); + print_dm_target_spec(&dm_arg_open3->target1, 42); + printf("\"\\1\\2\"}, /* misplaced struct dm_target_spec */ ..."); +# else /* !VERBOSE */ + printf("..."); +# endif /* VERBOSE */ + printf("}) = %s\n", errstr); + + #define FILL_DM_TARGET(id, id_next) \ + do { \ + init_dm_target_spec(&dm_arg_open3->target##id, id); \ + dm_arg_open3->target##id.next = \ + offsetof(struct dm_table_open_test, \ + target##id_next) - \ + offsetof(struct dm_table_open_test, \ + target##id); \ + strncpy(dm_arg_open3->param##id, str129 + id * 2, id); \ + dm_arg_open3->param##id[id] = '\0'; \ + } while (0) + #define PRINT_DM_TARGET(id) \ + do { \ + print_dm_target_spec(&dm_arg_open3->target##id, id); \ + printf("\"%.*s\"}, ", id, str129 + id * 2); \ + } while (0) + + /* max_strlen limit */ + init_s(&dm_arg_open3->ioc, offsetof(struct dm_table_open_test, target9), + offsetof(struct dm_table_open_test, target0)); + dm_arg_open3->ioc.data_size = sizeof(*dm_arg_open3); + dm_arg_open3->ioc.target_count = 0xbadc0ded; + FILL_DM_TARGET(0, 1); + FILL_DM_TARGET(1, 2); + FILL_DM_TARGET(2, 3); + FILL_DM_TARGET(3, 4); + FILL_DM_TARGET(4, 5); + FILL_DM_TARGET(5, 6); + FILL_DM_TARGET(6, 7); + FILL_DM_TARGET(7, 8); + FILL_DM_TARGET(8, 9); + rc = ioctl(-1, DM_TABLE_LOAD, dm_arg_open3); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=3134983661, flags=0, ", + sizeof(*dm_arg_open3), + offsetof(struct dm_table_open_test, target0)); +# if VERBOSE + PRINT_DM_TARGET(0); + PRINT_DM_TARGET(1); + PRINT_DM_TARGET(2); + PRINT_DM_TARGET(3); + PRINT_DM_TARGET(4); + PRINT_DM_TARGET(5); + PRINT_DM_TARGET(6); + PRINT_DM_TARGET(7); + PRINT_DM_TARGET(8); +# endif /* VERBOSE */ + printf("...}) = %s\n", errstr); + + + /* DM_TARGET_MSG */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + s.u.tm.target_msg.sector = 0x1234; + strcpy(s.u.string + offsetof(struct dm_target_msg, message), + "long target msg"); + ioctl(-1, DM_TARGET_MSG, &s); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "{sector=4660, message=\"long targ\"...}" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size, s.ioc.data_start); + + /* Invalid data_start */ + init_s(dm_arg, min_sizeof_dm_ioctl, min_sizeof_dm_ioctl); + dm_arg->data_size = sizeof(*dm_arg); + ioctl(-1, DM_TARGET_MSG, dm_arg); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "/* misplaced struct dm_target_msg */" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + sizeof(*dm_arg), min_sizeof_dm_ioctl); + + /* Invalid data_start */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0xffffffff); + dm_arg->data_size = sizeof(*dm_arg); + ioctl(-1, DM_TARGET_MSG, dm_arg); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "/* misplaced struct dm_target_msg */" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + sizeof(*dm_arg), 0xffffffff); + + /* Inaccessible pointer */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + dm_arg->data_size = sizeof(*dm_arg) + sizeof(struct dm_target_msg); + dm_arg->data_start = sizeof(*dm_arg); + ioctl(-1, DM_TARGET_MSG, dm_arg); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "%p" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + sizeof(*dm_arg) + sizeof(struct dm_target_msg), + sizeof(*dm_arg) +# if VERBOSE + , (char *) dm_arg + sizeof(*dm_arg) +# endif /* VERBOSE */ + ); + + /* Inaccessible string */ + init_s(&dm_arg_msg->ioc, sizeof(*dm_arg_msg), + offsetof(struct dm_target_msg_test, msg)); + dm_arg_msg->ioc.data_size = sizeof(*dm_arg_msg) + 1; + dm_arg_msg->msg.sector = (__u64) 0xdeadbeeffacef157ULL; + rc = ioctl(-1, DM_TARGET_MSG, dm_arg_msg); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, ", + sizeof(*dm_arg_msg) + 1, + offsetof(struct dm_target_msg_test, msg)); +# if VERBOSE + printf("{sector=%" PRI__u64 ", message=%p}", + (__u64) 0xdeadbeeffacef157ULL, + (char *) dm_arg_msg + + offsetof(struct dm_target_msg_test, msg.message)); +# else /* !VERBOSE */ + printf("..."); +# endif /* VERBOSE */ + printf("}) = %s\n", errstr); + + /* Zero-sied string */ + init_s(&dm_arg_msg->ioc, sizeof(*dm_arg_msg), + offsetof(struct dm_target_msg_test, msg)); + dm_arg_msg->msg.sector = (__u64) 0xdeadbeeffacef157ULL; + rc = ioctl(-1, DM_TARGET_MSG, dm_arg_msg); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, ", + sizeof(*dm_arg_msg), offsetof(struct dm_target_msg_test, msg)); +# if VERBOSE + printf("{sector=%" PRI__u64 ", message=\"\"}", + (__u64) 0xdeadbeeffacef157ULL); +# else /* !VERBOSE */ + printf("..."); +# endif /* VERBOSE */ + printf("}) = %s\n", errstr); + + + /* DM_DEV_SET_GEOMETRY */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + strcpy(s.u.string, "10 20 30 40"); + ioctl(-1, DM_DEV_SET_GEOMETRY, &s); + printf("ioctl(-1, DM_DEV_SET_GEOMETRY, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "string=\"10 20 30 \"..." +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size, s.ioc.data_start); + + + /* DM_DEV_RENAME */ + /* Inaccessible data */ + init_s(dm_arg, min_sizeof_dm_ioctl, min_sizeof_dm_ioctl); + dm_arg->data_size = sizeof(*dm_arg); + memcpy(unaligned_dm_arg, dm_arg, offsetof(struct dm_ioctl, data)); + ioctl(-1, DM_DEV_RENAME, unaligned_dm_arg); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " + "flags=0, " +# if VERBOSE + "string=%p" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + sizeof(*unaligned_dm_arg), min_sizeof_dm_ioctl +# if VERBOSE + , (char *) unaligned_dm_arg + min_sizeof_dm_ioctl +# endif /* VERBOSE */ + ); + + /* Incorrect data_start data */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + s.ioc.data_start = 0xdeadbeef; + ioctl(-1, DM_DEV_RENAME, &s); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, data_size=%u, data_start=3735928559, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " + "flags=0, " +# if VERBOSE + "/* misplaced string */" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size); + + /* Strange but still valid data_start */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + /* Curiously, this is a valid structure */ + s.ioc.data_start = offsetof(struct dm_ioctl, name) + 1; + ioctl(-1, DM_DEV_RENAME, &s); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, data_size=%u, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " + "flags=0, " +# if VERBOSE + "string=\"nn\"" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size, + offsetof(struct dm_ioctl, name) + 1); + + /* Correct data */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + strcpy(s.u.string, "new long name"); + ioctl(-1, DM_DEV_RENAME, &s); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " + "flags=0, " +# if VERBOSE + "string=\"new long \"..." +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size, s.ioc.data_start); + + + /* DM_TABLE_LOAD */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + s.ioc.target_count = -1U; + ioctl(-1, DM_TABLE_LOAD, &s); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=4294967295, flags=0, " +# if VERBOSE + "{sector_start=0, length=0, target_type=\"\", string=\"\"}, " + "/* misplaced struct dm_target_spec */ " +# endif /* VERBOSE */ + "...}) = -1 EBADF (%m)\n", + s.ioc.data_size, s.ioc.data_start); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else /* !HAVE_LINUX_DM_IOCTL_H */ + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_DM_IOCTL_H") + +#endif /* HAVE_LINUX_DM_IOCTL_H */ diff --git a/tests-m32/ioctl_dm.test b/tests-m32/ioctl_dm.test new file mode 100755 index 000000000..648520511 --- /dev/null +++ b/tests-m32/ioctl_dm.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of DM* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -s9 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/ioctl_evdev-v.c b/tests-m32/ioctl_evdev-v.c new file mode 100644 index 000000000..3860716b7 --- /dev/null +++ b/tests-m32/ioctl_evdev-v.c @@ -0,0 +1,3 @@ +/* This file is part of ioctl_evdev-v strace test. */ +#define VERBOSE 1 +#include "ioctl_evdev.c" diff --git a/tests-m32/ioctl_evdev-v.test b/tests-m32/ioctl_evdev-v.test new file mode 100755 index 000000000..879410104 --- /dev/null +++ b/tests-m32/ioctl_evdev-v.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check verbose decoding EVIOC* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/ioctl_evdev.c b/tests-m32/ioctl_evdev.c new file mode 100644 index 000000000..d12323ee2 --- /dev/null +++ b/tests-m32/ioctl_evdev.c @@ -0,0 +1,278 @@ +/* + * This file is part of ioctl_evdev strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_LINUX_INPUT_H + +# include +# include +# include +# include +# include +# include + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; + +# if VERBOSE +static void +print_envelope(const struct ff_envelope *const e) +{ + printf(", envelope={attack_length=%hu, attack_level=%hu" + ", fade_length=%hu, fade_level=%#hx}", + e->attack_length, e->attack_level, + e->fade_length, e->fade_level); +} +# endif /* VERBOSE */ + +static void +print_ffe_common(const struct ff_effect *const ffe, const char *const type_str) +{ + printf("ioctl(-1, EVIOCSFF, {type=%s, id=%" PRIu16 + ", direction=%" PRIu16 ", ", + type_str, ffe->id, ffe->direction); +# if VERBOSE + printf("trigger={button=%hu, interval=%hu}" + ", replay={length=%hu, delay=%hu}", + ffe->trigger.button, ffe->trigger.interval, + ffe->replay.length, ffe->replay.delay); +# endif /* VERBOSE */ +} + +# define TEST_NULL_ARG(cmd) \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd) + +int +main(void) +{ + TEST_NULL_ARG(EVIOCGVERSION); + TEST_NULL_ARG(EVIOCGEFFECTS); + TEST_NULL_ARG(EVIOCGID); + TEST_NULL_ARG(EVIOCGKEYCODE); + TEST_NULL_ARG(EVIOCSKEYCODE); + TEST_NULL_ARG(EVIOCSFF); +# ifdef EVIOCGKEYCODE_V2 + TEST_NULL_ARG(EVIOCGKEYCODE_V2); +# endif +# ifdef EVIOCSKEYCODE_V2 + TEST_NULL_ARG(EVIOCSKEYCODE_V2); +# endif +# ifdef EVIOCGREP + TEST_NULL_ARG(EVIOCGREP); +# endif +# ifdef EVIOCSREP + TEST_NULL_ARG(EVIOCSREP); +# endif +# ifdef EVIOCSCLOCKID + TEST_NULL_ARG(EVIOCSCLOCKID); +# endif + + TEST_NULL_ARG(EVIOCGNAME(0)); + TEST_NULL_ARG(EVIOCGPHYS(0)); + TEST_NULL_ARG(EVIOCGUNIQ(0)); + TEST_NULL_ARG(EVIOCGKEY(0)); + TEST_NULL_ARG(EVIOCGLED(0)); +# ifdef EVIOCGMTSLOTS + TEST_NULL_ARG(EVIOCGMTSLOTS(0)); +# endif +# ifdef EVIOCGPROP + TEST_NULL_ARG(EVIOCGPROP(0)); +# endif + TEST_NULL_ARG(EVIOCGSND(0)); +# ifdef EVIOCGSW + TEST_NULL_ARG(EVIOCGSW(0)); +# endif + + TEST_NULL_ARG(EVIOCGABS(ABS_X)); + TEST_NULL_ARG(EVIOCSABS(ABS_X)); + + TEST_NULL_ARG(EVIOCGBIT(EV_SYN, 0)); + TEST_NULL_ARG(EVIOCGBIT(EV_KEY, 1)); + TEST_NULL_ARG(EVIOCGBIT(EV_REL, 2)); + TEST_NULL_ARG(EVIOCGBIT(EV_ABS, 3)); + TEST_NULL_ARG(EVIOCGBIT(EV_MSC, 4)); +# ifdef EV_SW + TEST_NULL_ARG(EVIOCGBIT(EV_SW, 5)); +# endif + TEST_NULL_ARG(EVIOCGBIT(EV_LED, 6)); + TEST_NULL_ARG(EVIOCGBIT(EV_SND, 7)); + TEST_NULL_ARG(EVIOCGBIT(EV_REP, 8)); + TEST_NULL_ARG(EVIOCGBIT(EV_FF, 9)); + TEST_NULL_ARG(EVIOCGBIT(EV_PWR, 10)); + TEST_NULL_ARG(EVIOCGBIT(EV_FF_STATUS, 11)); + + ioctl(-1, EVIOCGBIT(EV_MAX, 42), 0); + printf("ioctl(-1, EVIOCGBIT(%#x /* EV_??? */, 42), NULL)" + " = -1 EBADF (%m)\n", EV_MAX); + + ioctl(-1, EVIOCRMFF, lmagic); + printf("ioctl(-1, EVIOCRMFF, %d) = -1 EBADF (%m)\n", (int) lmagic); + + ioctl(-1, EVIOCGRAB, lmagic); + printf("ioctl(-1, EVIOCGRAB, %lu) = -1 EBADF (%m)\n", lmagic); + +# ifdef EVIOCREVOKE + ioctl(-1, EVIOCREVOKE, lmagic); + printf("ioctl(-1, EVIOCREVOKE, %lu) = -1 EBADF (%m)\n", lmagic); +# endif + + const unsigned int size = get_page_size(); + void *const page = tail_alloc(size); + fill_memory(page, size); + + int *const val_int = tail_alloc(sizeof(*val_int)); + *val_int = magic; + +# ifdef EVIOCSCLOCKID + ioctl(-1, EVIOCSCLOCKID, val_int); + printf("ioctl(-1, EVIOCSCLOCKID, [%u]) = -1 EBADF (%m)\n", *val_int); +# endif + + int *pair_int = tail_alloc(sizeof(*pair_int) * 2); + pair_int[0] = 0xdeadbeef; + pair_int[1] = 0xbadc0ded; + +# ifdef EVIOSGREP + ioctl(-1, EVIOCSREP, pair_int); + printf("ioctl(-1, EVIOCSREP, [%u, %u]) = -1 EBADF (%m)\n", + pair_int[0], pair_int[1]); +# endif + + pair_int[1] = 1; + ioctl(-1, EVIOCSKEYCODE, pair_int); + printf("ioctl(-1, EVIOCSKEYCODE, [%u, %s]) = -1 EBADF (%m)\n", + pair_int[0], "KEY_ESC"); + +# ifdef EVIOCSKEYCODE_V2 + struct input_keymap_entry *const ike = tail_alloc(sizeof(*ike)); + fill_memory(ike, sizeof(*ike)); + ike->keycode = 2; + + ioctl(-1, EVIOCSKEYCODE_V2, ike); + printf("ioctl(-1, EVIOCSKEYCODE_V2, {flags=%" PRIu8 + ", len=%" PRIu8 ", ", ike->flags, ike->len); +# if VERBOSE + printf("index=%" PRIu16 ", keycode=%s, scancode=[", + ike->index, "KEY_1"); + unsigned int i; + for (i = 0; i < ARRAY_SIZE(ike->scancode); ++i) { + if (i > 0) + printf(", "); + printf("%" PRIx8, ike->scancode[i]); + } + printf("]"); +# else + printf("..."); +# endif + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); +# endif + + struct ff_effect *const ffe = tail_alloc(sizeof(*ffe)); + fill_memory(ffe, sizeof(*ffe)); + + ffe->type = FF_CONSTANT; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_CONSTANT"); + +# if VERBOSE + printf(", constant={level=%hd", ffe->u.constant.level); + print_envelope(&ffe->u.constant.envelope); + printf("}"); +# else + printf("..."); +# endif + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + +# if VERBOSE + ffe->type = FF_RAMP; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_RAMP"); + printf(", ramp={start_level=%hd, end_level=%hd", + ffe->u.ramp.start_level, ffe->u.ramp.end_level); + print_envelope(&ffe->u.ramp.envelope); + errno = EBADF; + printf("}}) = -1 EBADF (%m)\n"); + + ffe->type = FF_PERIODIC; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_PERIODIC"); + printf(", periodic={waveform=%hu, period=%hu, magnitude=%hd" + ", offset=%hd, phase=%hu", + ffe->u.periodic.waveform, ffe->u.periodic.period, + ffe->u.periodic.magnitude, ffe->u.periodic.offset, + ffe->u.periodic.phase); + print_envelope(&ffe->u.periodic.envelope); + printf(", custom_len=%u, custom_data=%p}", + ffe->u.periodic.custom_len, ffe->u.periodic.custom_data); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + ffe->type = FF_RUMBLE; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_RUMBLE"); + printf(", rumble={strong_magnitude=%hu, weak_magnitude=%hu}", + ffe->u.rumble.strong_magnitude, ffe->u.rumble.weak_magnitude); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + ffe->type = 0xff; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "0xff /* FF_??? */"); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); +# endif + + ioctl(-1, _IOC(_IOC_READ, 0x45, 0x1, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ, 0x45, 0x1, 0xff)", lmagic); + + ioctl(-1, _IOC(_IOC_WRITE, 0x45, 0x1, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_WRITE, 0x45, 0x1, 0xff)", lmagic); + + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x45, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x45, 0xfe, 0xff)", lmagic); + + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x45, 0, 0), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x45, 0, 0)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_INPUT_H") + +#endif diff --git a/tests-m32/ioctl_evdev.test b/tests-m32/ioctl_evdev.test new file mode 100755 index 000000000..7ed2e98a6 --- /dev/null +++ b/tests-m32/ioctl_evdev.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of EVIOC* ioctls. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-m32/ioctl_loop-nv.c b/tests-m32/ioctl_loop-nv.c new file mode 100644 index 000000000..dc6b916d5 --- /dev/null +++ b/tests-m32/ioctl_loop-nv.c @@ -0,0 +1,2 @@ +#define ABBREV 1 +#include "ioctl_loop.c" diff --git a/tests-m32/ioctl_loop-nv.test b/tests-m32/ioctl_loop-nv.test new file mode 100755 index 000000000..dcc27e1de --- /dev/null +++ b/tests-m32/ioctl_loop-nv.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check non-verbose decoding of LOOP_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a22 -eioctl -e verbose=none $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/ioctl_loop-v.c b/tests-m32/ioctl_loop-v.c new file mode 100644 index 000000000..22e75727c --- /dev/null +++ b/tests-m32/ioctl_loop-v.c @@ -0,0 +1,2 @@ +#define VERBOSE 1 +#include "ioctl_loop.c" diff --git a/tests-m32/ioctl_loop-v.test b/tests-m32/ioctl_loop-v.test new file mode 100755 index 000000000..ff3995d87 --- /dev/null +++ b/tests-m32/ioctl_loop-v.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check non-abbreviated decoding of LOOP_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a22 -v -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/ioctl_loop.c b/tests-m32/ioctl_loop.c new file mode 100644 index 000000000..a95e775da --- /dev/null +++ b/tests-m32/ioctl_loop.c @@ -0,0 +1,322 @@ +/* + * This file is part of ioctl_loop strace test. + * + * Copyright (c) 2016 JingPiao Chen + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "xlat/loop_cmds.h" + +#ifndef ABBREV +# define ABBREV 0 +#endif + +static void +print_loop_info(struct loop_info * const info, bool print_encrypt, + const char *encrypt_type, const char *encrypt_key, + const char *flags) +{ +#if ABBREV + printf("%p", info); +#else + printf("{lo_number=%d", info->lo_number); +# if VERBOSE + printf(", lo_device=makedev(%u, %u), lo_inode=%lu, " + "lo_rdevice=makedev(%u, %u)", + major(info->lo_device), minor(info->lo_device), + info->lo_inode, + major(info->lo_rdevice), minor(info->lo_rdevice)); +# endif /* VERBOSE */ + + printf(", lo_offset=%#x", info->lo_offset); + + if (VERBOSE || print_encrypt) { + printf(", lo_encrypt_type="); + if (encrypt_type) + printf("%s", encrypt_type); + else + printf("%#x /* LO_CRYPT_??? */", info->lo_encrypt_type); + + printf(", lo_encrypt_key_size=%" PRIu32, + (uint32_t) info->lo_encrypt_key_size); + } + + printf(", lo_flags="); + if (flags) + printf("%s", flags); + else + printf("%#x /* LO_FLAGS_??? */", info->lo_flags); + + printf(", lo_name=\"%.*s\"", + (int) sizeof(info->lo_name) - 1, info->lo_name); + + if (VERBOSE || print_encrypt) + printf(", lo_encrypt_key=\"%.*s\"", + encrypt_key ? (int) strlen(encrypt_key) : + (int) sizeof(info->lo_encrypt_key), + encrypt_key ? encrypt_key : + (char *) info->lo_encrypt_key); + +# if VERBOSE + printf(", lo_init=[%#lx, %#lx]" + ", reserved=[%#hhx, %#hhx, %#hhx, %#hhx]}", + info->lo_init[0], info->lo_init[1], + info->reserved[0], info->reserved[1], + info->reserved[2], info->reserved[3]); +# else /* !VERBOSE */ + printf(", ...}"); +# endif /* VERBOSE */ +#endif /* !ABBREV */ +} + +static void +print_loop_info64(struct loop_info64 * const info64, bool print_encrypt, + const char *encrypt_type, const char *encrypt_key, + const char *flags) +{ +#if ABBREV + printf("%p", info64); +#else +# if VERBOSE + printf("{lo_device=makedev(%u, %u), lo_inode=%" PRIu64 + ", lo_rdevice=makedev(%u, %u), lo_offset=%#" PRIx64 + ", lo_sizelimit=%" PRIu64 ", lo_number=%" PRIu32, + major(info64->lo_device), minor(info64->lo_device), + (uint64_t) info64->lo_inode, + major(info64->lo_rdevice), minor(info64->lo_rdevice), + (uint64_t) info64->lo_offset, + (uint64_t) info64->lo_sizelimit, + (uint32_t) info64->lo_number); +# else /* !VERBOSE */ + printf("{lo_offset=%#" PRIx64 ", lo_number=%" PRIu32, + (uint64_t) info64->lo_offset, + (uint32_t) info64->lo_number); +# endif /* VERBOSE */ + + if (VERBOSE || print_encrypt) { + printf(", lo_encrypt_type="); + if (encrypt_type) + printf("%s", encrypt_type); + else + printf("%#x /* LO_CRYPT_??? */", + info64->lo_encrypt_type); + + printf(", lo_encrypt_key_size=%" PRIu32, + info64->lo_encrypt_key_size); + } + + printf(", lo_flags="); + if (flags) + printf("%s", flags); + else + printf("%#x /* LO_FLAGS_??? */", info64->lo_flags); + printf(", lo_file_name=\"%.*s\"", + (int) sizeof(info64->lo_file_name) - 1, info64->lo_file_name); + + if (VERBOSE || print_encrypt) + printf(", lo_crypt_name=\"%.*s\", lo_encrypt_key=\"%.*s\"", + (int) sizeof(info64->lo_crypt_name) - 1, + info64->lo_crypt_name, + encrypt_key ? (int) strlen(encrypt_key) : + (int) sizeof(info64->lo_encrypt_key), + encrypt_key ? encrypt_key : + (char *) info64->lo_encrypt_key); + +# if VERBOSE + printf(", lo_init=[%#" PRIx64 ", %#" PRIx64 "]}", + (uint64_t) info64->lo_init[0], + (uint64_t) info64->lo_init[1]); +# else /* !VERBOSE */ + printf(", ...}"); +# endif /* VERBOSE */ +#endif /* !ABBREV */ +} + +int +main(void) +{ + static const kernel_ulong_t unknown_loop_cmd = + (kernel_ulong_t) 0xbadc0dedfeed4cedULL; + static const kernel_ulong_t magic = + (kernel_ulong_t) 0xdeadbeefbadc0dedULL; + static const kernel_ulong_t kernel_mask = + ((kernel_ulong_t) -1) - ((unsigned long) -1L); + + struct loop_info * const info = tail_alloc(sizeof(*info)); + struct loop_info64 * const info64 = tail_alloc(sizeof(*info64)); + + /* Unknown loop commands */ + ioctl(-1, unknown_loop_cmd, magic); + printf("ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE%s, 0x4c, %#x, %#x), " + "%#lx) = -1 EBADF (%m)\n", + _IOC_DIR((unsigned int) unknown_loop_cmd) & _IOC_NONE ? + "|_IOC_NONE" : "", + _IOC_NR((unsigned int) unknown_loop_cmd), + _IOC_SIZE((unsigned int) unknown_loop_cmd), + (unsigned long) magic); + + ioctl(-1, LOOP_SET_DIRECT_IO + 1, magic); + printf("ioctl(-1, _IOC(0, 0x4c, %#x, %#x), %#lx) = " + "-1 EBADF (%m)\n", + _IOC_NR(LOOP_SET_DIRECT_IO + 1), + _IOC_SIZE(LOOP_SET_DIRECT_IO + 1), + (unsigned long) magic); + + ioctl(-1, LOOP_CTL_GET_FREE + 1, magic); + printf("ioctl(-1, _IOC(0, 0x4c, %#x, %#x), %#lx) = " + "-1 EBADF (%m)\n", + _IOC_NR(LOOP_CTL_GET_FREE + 1), + _IOC_SIZE(LOOP_CTL_GET_FREE + 1), + (unsigned long) magic); + + /* LOOP_SET_FD */ + ioctl(-1, LOOP_SET_FD, magic); + printf("ioctl(-1, LOOP_SET_FD, %d) = -1 EBADF (%m)\n", + (unsigned int) magic); + + /* LOOP_CLR_FD */ + ioctl(-1, LOOP_CLR_FD); + printf("ioctl(-1, LOOP_CLR_FD) = -1 EBADF (%m)\n"); + + /* LOOP_SET_STATUS */ + ioctl(-1, LOOP_SET_STATUS, NULL); + printf("ioctl(-1, LOOP_SET_STATUS, NULL) = -1 EBADF (%m)\n"); + + fill_memory(info, sizeof(*info)); + info->lo_flags = 0xdeface00; + info->lo_name[0] = '\0'; + info->lo_encrypt_key[0] = '\0'; + info->lo_encrypt_key_size = 1; + + printf("ioctl(-1, LOOP_SET_STATUS, "); + print_loop_info(info, true, NULL, "\\0", NULL); + ioctl(-1, LOOP_SET_STATUS, info); + printf(") = -1 EBADF (%m)\n"); + + fill_memory(info, sizeof(*info)); + info->lo_encrypt_type = LO_CRYPT_NONE; + info->lo_flags = LO_FLAGS_READ_ONLY; + memset(info->lo_name, 'A', sizeof(info->lo_name)); + memset(info->lo_encrypt_key, 'B', sizeof(info->lo_encrypt_key)); + + ioctl(-1, LOOP_SET_STATUS, (void *) info + ALIGNOF(info)); + printf("ioctl(-1, LOOP_SET_STATUS, %p) = -1 EBADF (%m)\n", + (void *) info + ALIGNOF(info)); + + printf("ioctl(-1, LOOP_SET_STATUS, "); + print_loop_info(info, false, "LO_CRYPT_NONE", NULL, + "LO_FLAGS_READ_ONLY"); + ioctl(-1, LOOP_SET_STATUS, info); + printf(") = -1 EBADF (%m)\n"); + + /* LOOP_GET_STATUS */ + ioctl(-1, LOOP_GET_STATUS, NULL); + printf("ioctl(-1, LOOP_GET_STATUS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, LOOP_GET_STATUS, (unsigned long) info | kernel_mask); + printf("ioctl(-1, LOOP_GET_STATUS, %p) = -1 EBADF (%m)\n", info); + + /* LOOP_SET_STATUS64 */ + ioctl(-1, LOOP_SET_STATUS64, NULL); + printf("ioctl(-1, LOOP_SET_STATUS64, NULL) = -1 EBADF (%m)\n"); + + fill_memory(info64, sizeof(*info64)); + info64->lo_flags = 0xdec0de00; + info64->lo_file_name[0] = '\0'; + info64->lo_crypt_name[0] = '\0'; + info64->lo_encrypt_key[0] = '\0'; + info64->lo_encrypt_key_size = 1; + + printf("ioctl(-1, LOOP_SET_STATUS64, "); + print_loop_info64(info64, true, NULL, "\\0", NULL); + ioctl(-1, LOOP_SET_STATUS64, info64); + printf(") = -1 EBADF (%m)\n"); + + fill_memory(info64, sizeof(*info64)); + info64->lo_flags = LO_FLAGS_READ_ONLY; + info64->lo_encrypt_type = LO_CRYPT_NONE; + memset(info64->lo_file_name, 'C', sizeof(info64->lo_file_name)); + memset(info64->lo_crypt_name, 'D', sizeof(info64->lo_crypt_name)); + memset(info64->lo_encrypt_key, 'E', sizeof(info64->lo_encrypt_key)); + + ioctl(-1, LOOP_SET_STATUS64, (void *) info64 + ALIGNOF(info64)); + printf("ioctl(-1, LOOP_SET_STATUS64, %p) = -1 EBADF (%m)\n", + (void *) info64 + ALIGNOF(info64)); + + printf("ioctl(-1, LOOP_SET_STATUS64, "); + print_loop_info64(info64, false, "LO_CRYPT_NONE", NULL, + "LO_FLAGS_READ_ONLY"); + ioctl(-1, LOOP_SET_STATUS64, info64); + printf(") = -1 EBADF (%m)\n"); + + /* LOOP_GET_STATUS64 */ + ioctl(-1, LOOP_GET_STATUS64, NULL); + printf("ioctl(-1, LOOP_GET_STATUS64, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, LOOP_GET_STATUS64, (unsigned long) info64 | kernel_mask); + printf("ioctl(-1, LOOP_GET_STATUS64, %p) = -1 EBADF (%m)\n", info64); + + /* LOOP_CHANGE_FD */ + ioctl(-1, LOOP_CHANGE_FD, magic); + printf("ioctl(-1, LOOP_CHANGE_FD, %d) = -1 EBADF (%m)\n", + (unsigned int) magic); + + /* LOOP_SET_CAPACITY */ + ioctl(-1, LOOP_SET_CAPACITY); + printf("ioctl(-1, LOOP_SET_CAPACITY) = -1 EBADF (%m)\n"); + + /* LOOP_SET_DIRECT_IO */ + ioctl(-1, LOOP_SET_DIRECT_IO, magic); + printf("ioctl(-1, LOOP_SET_DIRECT_IO, %lu) = -1 EBADF (%m)\n", + (unsigned long) magic); + + /* LOOP_CTL_ADD */ + ioctl(-1, LOOP_CTL_ADD, magic); + printf("ioctl(-1, LOOP_CTL_ADD, %d) = -1 EBADF (%m)\n", + (unsigned int) magic); + + /* LOOP_CTL_REMOVE */ + ioctl(-1, LOOP_CTL_REMOVE, magic); + printf("ioctl(-1, LOOP_CTL_REMOVE, %d) = -1 EBADF (%m)\n", + (unsigned int) magic); + + /* LOOP_CTL_GET_FREE */ + ioctl(-1, LOOP_CTL_GET_FREE); + printf("ioctl(-1, LOOP_CTL_GET_FREE) = -1 EBADF (%m)\n"); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/ioctl_loop.test b/tests-m32/ioctl_loop.test new file mode 100755 index 000000000..112cd636c --- /dev/null +++ b/tests-m32/ioctl_loop.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of LOOP_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a22 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/ioctl_mtd.c b/tests-m32/ioctl_mtd.c new file mode 100644 index 000000000..a37d5d0f0 --- /dev/null +++ b/tests-m32/ioctl_mtd.c @@ -0,0 +1,197 @@ +/* + * This file is part of ioctl_mtd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include +#include +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) +# include "mtd-abi.h" +#else +# include +#endif + +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; + +#define TEST_NULL_ARG(cmd) \ + do { \ + ioctl(-1, cmd, 0); \ + if (_IOC_DIR(cmd) == _IOC_WRITE) \ + printf("ioctl(-1, MIXER_WRITE(%u) or %s, NULL)" \ + " = -1 EBADF (%m)\n", \ + (unsigned int) _IOC_NR(cmd), #cmd); \ + else if (_IOC_DIR(cmd) == _IOC_READ) \ + printf("ioctl(-1, MIXER_READ(%u) or %s, NULL)" \ + " = -1 EBADF (%m)\n", \ + (unsigned int) _IOC_NR(cmd), #cmd); \ + else \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd); \ + } while (0) + +#define TEST_erase_info_user(cmd, eiu) \ + ioctl(-1, cmd, eiu); \ + printf("ioctl(-1, MIXER_%s(%u) or %s, {start=%#x, length=%#x})" \ + " = -1 EBADF (%m)\n", \ + (_IOC_DIR(cmd) == _IOC_READ) ? "READ" : "WRITE", \ + (unsigned int) _IOC_NR(cmd), #cmd, \ + eiu->start, eiu->length) + +int +main(void) +{ + TEST_NULL_ARG(ECCGETLAYOUT); + TEST_NULL_ARG(ECCGETSTATS); + TEST_NULL_ARG(MEMERASE); + TEST_NULL_ARG(MEMERASE64); + TEST_NULL_ARG(MEMGETBADBLOCK); + TEST_NULL_ARG(MEMGETINFO); + TEST_NULL_ARG(MEMGETOOBSEL); + TEST_NULL_ARG(MEMGETREGIONCOUNT); + TEST_NULL_ARG(MEMISLOCKED); + TEST_NULL_ARG(MEMLOCK); + TEST_NULL_ARG(MEMREADOOB); + TEST_NULL_ARG(MEMREADOOB64); + TEST_NULL_ARG(MEMSETBADBLOCK); + TEST_NULL_ARG(MEMUNLOCK); + TEST_NULL_ARG(MEMWRITE); + TEST_NULL_ARG(MEMWRITEOOB); + TEST_NULL_ARG(MEMWRITEOOB64); + TEST_NULL_ARG(OTPGETREGIONCOUNT); + TEST_NULL_ARG(OTPGETREGIONINFO); + TEST_NULL_ARG(OTPLOCK); + TEST_NULL_ARG(OTPSELECT); + + ioctl(-1, MTDFILEMODE, MTD_FILE_MODE_NORMAL); + printf("ioctl(-1, MTDFILEMODE, MTD_FILE_MODE_NORMAL) = -1 EBADF (%m)\n"); + + int *const opt = tail_alloc(sizeof(*opt)); + *opt = MTD_OTP_OFF; + ioctl(-1, OTPSELECT, opt); + printf("ioctl(-1, MIXER_READ(%u) or OTPSELECT, [MTD_OTP_OFF])" + " = -1 EBADF (%m)\n", (unsigned int) _IOC_NR(OTPSELECT)); + + uint64_t *const v64 = tail_alloc(sizeof(*v64)); + fill_memory(v64, sizeof(*v64)); + + ioctl(-1, MEMGETBADBLOCK, v64); + printf("ioctl(-1, MIXER_WRITE(%u) or MEMGETBADBLOCK, [%" PRIu64 "])" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMGETBADBLOCK), *v64); + + ioctl(-1, MEMSETBADBLOCK, v64); + printf("ioctl(-1, MIXER_WRITE(%u) or MEMSETBADBLOCK, [%" PRIu64 "])" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMSETBADBLOCK), *v64); + + struct region_info_user *const riu = tail_alloc(sizeof(*riu)); + fill_memory(riu, sizeof(*riu)); + ioctl(-1, MEMGETREGIONINFO, riu); + printf("ioctl(-1, %s, {regionindex=%#x}) = -1 EBADF (%m)\n", + "MEMGETREGIONINFO" +#ifdef __i386__ + " or MTRRIOC_GET_PAGE_ENTRY" +#endif + , riu->regionindex); + + struct erase_info_user *const eiu = tail_alloc(sizeof(*eiu)); + fill_memory(eiu, sizeof(*eiu)); + + TEST_erase_info_user(MEMERASE, eiu); + TEST_erase_info_user(MEMLOCK, eiu); + TEST_erase_info_user(MEMUNLOCK, eiu); + TEST_erase_info_user(MEMISLOCKED, eiu); + + struct erase_info_user64 *const eiu64 = tail_alloc(sizeof(*eiu64)); + fill_memory(eiu64, sizeof(*eiu64)); + ioctl(-1, MEMERASE64, eiu64); + printf("ioctl(-1, MIXER_WRITE(%u) or %s, {start=%#llx, length=%#llx})" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMERASE64), "MEMERASE64", + (unsigned long long) eiu64->start, + (unsigned long long) eiu64->length); + + struct mtd_oob_buf *const oob = tail_alloc(sizeof(*oob)); + fill_memory(oob, sizeof(*oob)); + + ioctl(-1, MEMWRITEOOB, oob); + printf("ioctl(-1, MEMWRITEOOB, {start=%#x, length=%#x, ptr=%p})" + " = -1 EBADF (%m)\n", oob->start, oob->length, oob->ptr); + + ioctl(-1, MEMREADOOB, oob); + printf("ioctl(-1, MEMREADOOB, {start=%#x, length=%#x, ptr=%p})" + " = -1 EBADF (%m)\n", oob->start, oob->length, oob->ptr); + + struct mtd_oob_buf64 *const oob64 = tail_alloc(sizeof(*oob64)); + fill_memory(oob64, sizeof(*oob64)); + + ioctl(-1, MEMWRITEOOB64, oob64); + printf("ioctl(-1, MEMWRITEOOB64" + ", {start=%#llx, length=%#x, usr_ptr=%#llx}) = -1 EBADF (%m)\n", + (unsigned long long) oob64->start, oob64->length, + (unsigned long long) oob64->usr_ptr); + + ioctl(-1, MEMREADOOB64, oob64); + printf("ioctl(-1, MEMREADOOB64" + ", {start=%#llx, length=%#x, usr_ptr=%#llx}) = -1 EBADF (%m)\n", + (unsigned long long) oob64->start, oob64->length, + (unsigned long long) oob64->usr_ptr); + + + struct otp_info *const oi = tail_alloc(sizeof(*oi)); + fill_memory(oi, sizeof(*oi)); + ioctl(-1, OTPLOCK, oi); + printf("ioctl(-1, MIXER_READ(%u) or OTPLOCK" + ", {start=%#x, length=%#x, locked=%u}) = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(OTPLOCK), oi->start, oi->length, oi->locked); + + struct mtd_write_req *const wr = tail_alloc(sizeof(*wr)); + fill_memory(wr, sizeof(*wr)); + wr->mode = MTD_OPS_PLACE_OOB; + ioctl(-1, MEMWRITE, wr); + printf("ioctl(-1, MEMWRITE, {start=%#llx, len=%#llx, ooblen=%#llx" + ", usr_data=%#llx, usr_oob=%#llx, mode=MTD_OPS_PLACE_OOB})" + " = -1 EBADF (%m)\n", + (unsigned long long) wr->start, + (unsigned long long) wr->len, + (unsigned long long) wr->ooblen, + (unsigned long long) wr->usr_data, + (unsigned long long) wr->usr_oob); + + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x4d, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x4d, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/ioctl_mtd.test b/tests-m32/ioctl_mtd.test new file mode 100755 index 000000000..084280730 --- /dev/null +++ b/tests-m32/ioctl_mtd.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of 'M' type ioctls. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-m32/ioctl_rtc-v.c b/tests-m32/ioctl_rtc-v.c new file mode 100644 index 000000000..62b161559 --- /dev/null +++ b/tests-m32/ioctl_rtc-v.c @@ -0,0 +1,3 @@ +/* This file is part of ioctl_rtc-v strace test. */ +#define VERBOSE 1 +#include "ioctl_rtc.c" diff --git a/tests-m32/ioctl_rtc-v.test b/tests-m32/ioctl_rtc-v.test new file mode 100755 index 000000000..a255322d5 --- /dev/null +++ b/tests-m32/ioctl_rtc-v.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check verbose decoding of RTC_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/ioctl_rtc.c b/tests-m32/ioctl_rtc.c new file mode 100644 index 000000000..49d7ec7b0 --- /dev/null +++ b/tests-m32/ioctl_rtc.c @@ -0,0 +1,207 @@ +/* + * This file is part of ioctl_rtc strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include "xlat.h" + +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; + +static void +print_rtc_time(const struct rtc_time *rt) +{ + printf("{tm_sec=%d, tm_min=%d, tm_hour=%d" + ", tm_mday=%d, tm_mon=%d, tm_year=%d", + rt->tm_sec, rt->tm_min, rt->tm_hour, + rt->tm_mday, rt->tm_mon, rt->tm_year); +#if VERBOSE + printf(", tm_wday=%d, tm_yday=%d, tm_isdst=%d}", + rt->tm_wday, rt->tm_yday, rt->tm_isdst); +#else + printf(", ...}"); +#endif +} + +static struct xlat rtc_argless[] = { + XLAT(RTC_AIE_OFF), + XLAT(RTC_PIE_ON), + XLAT(RTC_PIE_OFF), + XLAT(RTC_UIE_ON), + XLAT(RTC_WIE_ON), + XLAT(RTC_WIE_OFF), +#ifdef RTC_VL_CLR + XLAT(RTC_VL_CLR), +#endif +}; + +int +main(void) +{ + const unsigned int size = get_page_size(); + + void *const page = tail_alloc(size); + fill_memory(page, size); + + struct rtc_time *rt = tail_alloc(sizeof(*rt)); + fill_memory(rt, sizeof(*rt)); + + struct rtc_wkalrm *wk = tail_alloc(sizeof(*wk)); + fill_memory(wk, sizeof(*wk)); + + struct rtc_pll_info *pll = tail_alloc(sizeof(*pll)); + fill_memory(pll, sizeof(*pll)); + + /* RTC_ALM_READ */ + ioctl(-1, RTC_ALM_READ, 0); + printf("ioctl(-1, RTC_ALM_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_ALM_READ, page); + printf("ioctl(-1, RTC_ALM_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_RD_TIME */ + ioctl(-1, RTC_RD_TIME, 0); + printf("ioctl(-1, RTC_RD_TIME, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_RD_TIME, page); + printf("ioctl(-1, RTC_RD_TIME, %p) = -1 EBADF (%m)\n", page); + + /* RTC_ALM_SET */ + ioctl(-1, RTC_ALM_SET, 0); + printf("ioctl(-1, RTC_ALM_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_ALM_SET, rt); + printf("ioctl(-1, RTC_ALM_SET, "); + print_rtc_time(rt); + errno = EBADF; + printf(") = -1 EBADF (%m)\n"); + + /* RTC_SET_TIME */ + ioctl(-1, RTC_SET_TIME, 0); + printf("ioctl(-1, RTC_SET_TIME, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_SET_TIME, rt); + printf("ioctl(-1, RTC_SET_TIME, "); + print_rtc_time(rt); + errno = EBADF; + printf(") = -1 EBADF (%m)\n"); + + /* RTC_IRQP_SET */ + ioctl(-1, RTC_IRQP_SET, lmagic); + printf("ioctl(-1, RTC_IRQP_SET, %lu) = -1 EBADF (%m)\n", lmagic); + + /* RTC_EPOCH_SET */ + ioctl(-1, RTC_EPOCH_SET, lmagic); + printf("ioctl(-1, RTC_EPOCH_SET, %lu) = -1 EBADF (%m)\n", lmagic); + + /* RTC_IRQP_READ */ + ioctl(-1, RTC_IRQP_READ, 0); + printf("ioctl(-1, RTC_IRQP_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_IRQP_READ, page); + printf("ioctl(-1, RTC_IRQP_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_EPOCH_READ */ + ioctl(-1, RTC_EPOCH_READ, 0); + printf("ioctl(-1, RTC_EPOCH_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_EPOCH_READ, page); + printf("ioctl(-1, RTC_EPOCH_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_WKALM_RD */ + ioctl(-1, RTC_WKALM_RD, 0); + printf("ioctl(-1, RTC_WKALM_RD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_WKALM_RD, page); + printf("ioctl(-1, RTC_WKALM_RD, %p) = -1 EBADF (%m)\n", page); + + /* RTC_WKALM_SET */ + ioctl(-1, RTC_WKALM_SET, 0); + printf("ioctl(-1, RTC_WKALM_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_WKALM_SET, wk); + printf("ioctl(-1, RTC_WKALM_SET, {enabled=%u, pending=%u, time=", + (unsigned) wk->enabled, (unsigned) wk->pending); + print_rtc_time(&wk->time); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + /* RTC_PLL_GET */ + ioctl(-1, RTC_PLL_GET, 0); + printf("ioctl(-1, RTC_PLL_GET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_PLL_GET, page); + printf("ioctl(-1, RTC_PLL_GET, %p) = -1 EBADF (%m)\n", page); + + /* RTC_PLL_SET */ + ioctl(-1, RTC_PLL_SET, 0); + printf("ioctl(-1, RTC_PLL_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_PLL_SET, pll); + printf("ioctl(-1, RTC_PLL_SET, {pll_ctrl=%d, pll_value=%d" + ", pll_max=%d, pll_min=%d, pll_posmult=%d, pll_negmult=%d" + ", pll_clock=%ld}) = -1 EBADF (%m)\n", + pll->pll_ctrl, pll->pll_value, pll->pll_max, pll->pll_min, + pll->pll_posmult, pll->pll_negmult, pll->pll_clock); + +#ifdef RTC_VL_READ + /* RTC_VL_READ */ + ioctl(-1, RTC_VL_READ, 0); + printf("ioctl(-1, RTC_VL_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_VL_READ, page); + printf("ioctl(-1, RTC_VL_READ, %p) = -1 EBADF (%m)\n", page); +#endif + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(rtc_argless); ++i) { + ioctl(-1, (unsigned long) rtc_argless[i].val, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", rtc_argless[i].str); + } + + ioctl(-1, RTC_UIE_OFF, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "PHN_NOT_OH or RTC_UIE_OFF"); + + ioctl(-1, RTC_AIE_ON, lmagic); +#ifdef HPPA + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "PA_PERF_ON or RTC_AIE_ON"); +#else + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "RTC_AIE_ON"); +#endif + + ioctl(-1, _IO(0x70, 0x40), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", "NVRAM_INIT", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/ioctl_rtc.test b/tests-m32/ioctl_rtc.test new file mode 100755 index 000000000..4545f2aeb --- /dev/null +++ b/tests-m32/ioctl_rtc.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic decoding of RTC_* ioctls. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-m32/ioctl_scsi.c b/tests-m32/ioctl_scsi.c new file mode 100644 index 000000000..0db94d849 --- /dev/null +++ b/tests-m32/ioctl_scsi.c @@ -0,0 +1,156 @@ +/* + * Check decoding of SCSI ioctl commands. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_SCSI_SG_H + +# include +# include +# include +# include "xlat/scsi_sg_commands.h" + +# define TEST_NO_ARG(cmd) \ + do { \ + ioctl(-1, cmd, 0xdeadbeef); \ + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", #cmd); \ + } while (0) + +# define TEST_NULL_ARG(cmd) \ + do { \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd); \ + } while (0) + +# define TEST_TAKES_INT_BY_VAL(cmd, val) \ + do { \ + ioctl(-1, cmd, val); \ + printf("ioctl(-1, %s, %#x) = -1 EBADF (%m)\n", #cmd, val); \ + } while (0) + +# define TEST_TAKES_INT_BY_PTR(cmd, pint) \ + do { \ + ioctl(-1, cmd, pint); \ + printf("ioctl(-1, %s, [%d]) = -1 EBADF (%m)\n", #cmd, *(pint)); \ + } while (0) + +# define TEST_RETURNS_INT_BY_PTR(cmd, pint) \ + do { \ + ioctl(-1, cmd, pint); \ + printf("ioctl(-1, %s, %p) = -1 EBADF (%m)\n", #cmd, pint); \ + } while (0) + +int +main(void) +{ + int *const pint = tail_alloc(sizeof(*pint)); + *pint = (int) 0xfacefeed; + + TEST_NO_ARG(SG_GET_TIMEOUT); + + TEST_NULL_ARG(SG_SET_TIMEOUT); + TEST_NULL_ARG(SG_EMULATED_HOST); + TEST_NULL_ARG(SG_GET_TRANSFORM); + TEST_NULL_ARG(SG_GET_COMMAND_Q); + TEST_NULL_ARG(SG_SET_COMMAND_Q); + TEST_NULL_ARG(SG_GET_RESERVED_SIZE); + TEST_NULL_ARG(SG_SET_RESERVED_SIZE); + TEST_NULL_ARG(SG_GET_SCSI_ID); + TEST_NULL_ARG(SG_SET_FORCE_LOW_DMA); + TEST_NULL_ARG(SG_GET_LOW_DMA); + TEST_NULL_ARG(SG_SET_FORCE_PACK_ID); + TEST_NULL_ARG(SG_GET_PACK_ID); + TEST_NULL_ARG(SG_GET_NUM_WAITING); + TEST_NULL_ARG(SG_SET_DEBUG); + TEST_NULL_ARG(SG_GET_SG_TABLESIZE); + TEST_NULL_ARG(SG_GET_VERSION_NUM); + TEST_NULL_ARG(SG_NEXT_CMD_LEN); + TEST_NULL_ARG(SG_SCSI_RESET); + TEST_NULL_ARG(SG_IO); + TEST_NULL_ARG(SG_GET_REQUEST_TABLE); + TEST_NULL_ARG(SG_SET_KEEP_ORPHAN); + TEST_NULL_ARG(SG_GET_KEEP_ORPHAN); + TEST_NULL_ARG(SG_GET_ACCESS_COUNT); + + TEST_TAKES_INT_BY_VAL(SG_SET_TRANSFORM, 0); + TEST_TAKES_INT_BY_VAL(SG_SET_TRANSFORM, *pint); + + TEST_TAKES_INT_BY_PTR(SG_NEXT_CMD_LEN, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_COMMAND_Q, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_DEBUG, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_FORCE_LOW_DMA, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_FORCE_PACK_ID, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_KEEP_ORPHAN, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_RESERVED_SIZE, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_TIMEOUT, pint); + + TEST_RETURNS_INT_BY_PTR(SG_EMULATED_HOST, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_ACCESS_COUNT, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_COMMAND_Q, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_KEEP_ORPHAN, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_LOW_DMA, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_NUM_WAITING, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_PACK_ID, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_RESERVED_SIZE, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_SG_TABLESIZE, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_TRANSFORM, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_VERSION_NUM, pint); + + ioctl(-1, SG_SCSI_RESET, pint); + printf("ioctl(-1, %s, [%#x /* %s_??? */]) = -1 EBADF (%m)\n", + "SG_SCSI_RESET", *pint, "SG_SCSI_RESET"); + + *pint = 0x100; + ioctl(-1, SG_SCSI_RESET, pint); + printf("ioctl(-1, %s, [SG_SCSI_RESET_NO_ESCALATE|SG_SCSI_RESET_NOTHING])" + " = -1 EBADF (%m)\n", "SG_SCSI_RESET"); + + *pint = 1; + ioctl(-1, SG_SCSI_RESET, pint); + printf("ioctl(-1, %s, [SG_SCSI_RESET_DEVICE]) = -1 EBADF (%m)\n", + "SG_SCSI_RESET"); + + ioctl(-1, 0x22ff, 0); + printf("ioctl(-1, _IOC(0, 0x22, 0xff, 0), 0) = -1 EBADF (%m)\n"); + + static const unsigned long magic = + (unsigned long) 0xdeadbeeffacefeedULL; + ioctl(-1, 0x22ff, magic); + printf("ioctl(-1, _IOC(0, 0x22, 0xff, 0), %#lx) = -1 EBADF (%m)\n", + magic); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SCSI_SG_H") + +#endif diff --git a/tests-m32/ioctl_scsi.test b/tests-m32/ioctl_scsi.test new file mode 100755 index 000000000..2710f12b3 --- /dev/null +++ b/tests-m32/ioctl_scsi.test @@ -0,0 +1,4 @@ +#!/bin/sh + +# Check decoding of SCSI ioctl commands. +. "${srcdir=.}/ioctl.test" diff --git a/tests-m32/ioctl_sg_io_v3.c b/tests-m32/ioctl_sg_io_v3.c new file mode 100644 index 000000000..ef25795b7 --- /dev/null +++ b/tests-m32/ioctl_sg_io_v3.c @@ -0,0 +1,418 @@ +/* + * Check decoding of ioctl SG_IO v3 commands. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_SCSI_SG_H + +# include +# include +# include +# include +# include + +int +main(void) +{ + ioctl(-1, SG_IO, 0); + printf("ioctl(-1, SG_IO, NULL) = -1 EBADF (%m)\n"); + + struct sg_io_hdr *const sg_io = tail_alloc(sizeof(*sg_io)); + fill_memory(sg_io, sizeof(*sg_io)); + + const void *const efault = sg_io + 1; + ioctl(-1, SG_IO, efault); + printf("ioctl(-1, SG_IO, %p) = -1 EBADF (%m)\n", efault); + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, [%u]) = -1 EBADF (%m)\n", sg_io->interface_id); + + unsigned int *const piid = tail_alloc(sizeof(*piid)); + *piid = (unsigned char) 'S'; + ioctl(-1, SG_IO, piid); + printf("ioctl(-1, SG_IO, {interface_id='S', %p}) = -1 EBADF (%m)\n", piid + 1); + + sg_io->interface_id = (unsigned char) 'S'; + sg_io->dxfer_direction = -2; + sg_io->flags = -1U; + sg_io->info = -1U; + sg_io->dxferp = (void *) (unsigned long) 0xfacefeedfffffff1ULL; + sg_io->cmdp = (void *) (unsigned long) 0xfacefeedfffffff2ULL; + sg_io->sbp = (void *) (unsigned long) 0xfacefeedfffffff3ULL; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_TO_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_DIRECT_IO|SG_FLAG_UNUSED_LUN_INHIBIT" + "|SG_FLAG_MMAP_IO|SG_FLAG_NO_DXFER" + "|SG_FLAG_Q_AT_TAIL|SG_FLAG_Q_AT_HEAD|0xfffeffc8" + ", dxferp=%p" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xfffffff8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + sg_io->dxferp, + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->dxfer_direction = -3; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_DIRECT_IO|SG_FLAG_UNUSED_LUN_INHIBIT" + "|SG_FLAG_MMAP_IO|SG_FLAG_NO_DXFER" + "|SG_FLAG_Q_AT_TAIL|SG_FLAG_Q_AT_HEAD|0xfffeffc8" + ", dxferp=%p" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xfffffff8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + sg_io->dxferp, + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + const struct iovec iov[] = { + { + .iov_base = (void *) efault - 2, + .iov_len = 2 + }, { + .iov_base = (void *) efault - 3, + .iov_len = 4 + } + }; + struct iovec *const t_iov = tail_memdup(iov, sizeof(iov)); + + sg_io->flags = 0x24; + sg_io->info = 1; + sg_io->dxfer_direction = -2; + + sg_io->iovec_count = ARRAY_SIZE(iov); + sg_io->dxfer_len = iov[0].iov_len + iov[1].iov_len - 1; + sg_io->dxferp = t_iov; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_TO_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_MMAP_IO|SG_FLAG_Q_AT_HEAD" + ", dxferp=[{iov_base=\"\\%o\\%o\", iov_len=%u}" + ", {iov_base=\"\\%o\\%o\\%o\", iov_len=%u}]" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (iov[0].iov_base + 0), + * (unsigned char *) (iov[0].iov_base + 1), + (unsigned int) iov[0].iov_len, + * (unsigned char *) (iov[1].iov_base + 0), + * (unsigned char *) (iov[1].iov_base + 1), + * (unsigned char *) (iov[1].iov_base + 2), + (unsigned int) iov[1].iov_len, + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->flags = 0x11; + sg_io->dxfer_direction = -3; + sg_io->resid = sg_io->dxfer_len + 1; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_DIRECT_IO|SG_FLAG_Q_AT_TAIL" + ", dxferp=[{iov_base=\"\\%o\\%o\", iov_len=%u}" + ", {iov_base=\"\\%o\\%o\\%o\", iov_len=%u}]" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (iov[0].iov_base + 0), + * (unsigned char *) (iov[0].iov_base + 1), + (unsigned int) iov[0].iov_len, + * (unsigned char *) (iov[1].iov_base + 0), + * (unsigned char *) (iov[1].iov_base + 1), + * (unsigned char *) (iov[1].iov_base + 2), + (unsigned int) iov[1].iov_len, + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->flags = 0x10000; + sg_io->info = 0xdeadbeef; + sg_io->iovec_count = 0; + sg_io->dxfer_len = 5; + sg_io->resid = 1; + sg_io->dxferp = (void *) efault - (sg_io->dxfer_len - sg_io->resid); + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_NO_DXFER" + ", dxferp=\"\\x%x\\x%x\\x%x\\x%x\"" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xdeadbee8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (sg_io->dxferp + 0), + * (unsigned char *) (sg_io->dxferp + 1), + * (unsigned char *) (sg_io->dxferp + 2), + * (unsigned char *) (sg_io->dxferp + 3), + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->flags = 2; + sg_io->dxfer_direction = -4; + sg_io->dxfer_len = 3; + sg_io->resid = 1; + sg_io->dxferp = (void *) efault - sg_io->dxfer_len; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_TO_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_UNUSED_LUN_INHIBIT" + ", dxferp=\"\\x%x\\x%x\\x%x\" => dxferp=\"\\x%x\\x%x\"" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xdeadbee8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (sg_io->dxferp + 0), + * (unsigned char *) (sg_io->dxferp + 1), + * (unsigned char *) (sg_io->dxferp + 2), + * (unsigned char *) (sg_io->dxferp + 0), + * (unsigned char *) (sg_io->dxferp + 1), + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->flags = 0; + sg_io->resid = sg_io->dxfer_len; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_TO_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=0" + ", dxferp=\"\\x%x\\x%x\\x%x\"" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xdeadbee8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (sg_io->dxferp + 0), + * (unsigned char *) (sg_io->dxferp + 1), + * (unsigned char *) (sg_io->dxferp + 2), + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SCSI_SG_H") + +#endif diff --git a/tests-m32/ioctl_sg_io_v3.test b/tests-m32/ioctl_sg_io_v3.test new file mode 100755 index 000000000..dacacdf47 --- /dev/null +++ b/tests-m32/ioctl_sg_io_v3.test @@ -0,0 +1,4 @@ +#!/bin/sh + +# Check decoding of ioctl SG_IO v3 commands. +. "${srcdir=.}/ioctl.test" diff --git a/tests-m32/ioctl_sg_io_v4.c b/tests-m32/ioctl_sg_io_v4.c new file mode 100644 index 000000000..5f899eeea --- /dev/null +++ b/tests-m32/ioctl_sg_io_v4.c @@ -0,0 +1,238 @@ +/* + * Check decoding of ioctl SG_IO v4 commands. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_LINUX_BSG_H + +# include +# include +# include +# include +# include + +# include "xlat/scsi_sg_commands.h" + +int +main(void) +{ + ioctl(-1, SG_IO, 0); + printf("ioctl(-1, SG_IO, NULL) = -1 EBADF (%m)\n"); + + struct sg_io_v4 *const sg_io = tail_alloc(sizeof(*sg_io)); + fill_memory(sg_io, sizeof(*sg_io)); + + const void *const efault = sg_io + 1; + ioctl(-1, SG_IO, efault); + printf("ioctl(-1, SG_IO, %p) = -1 EBADF (%m)\n", efault); + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, [%u]) = -1 EBADF (%m)\n", sg_io->guard); + + unsigned int *const pguard = tail_alloc(sizeof(*pguard)); + *pguard = (unsigned char) 'Q'; + ioctl(-1, SG_IO, pguard); + printf("ioctl(-1, SG_IO, {guard='Q', %p}) = -1 EBADF (%m)\n", pguard + 1); + + sg_io->guard = (unsigned char) 'Q'; + sg_io->protocol = 0; + sg_io->subprotocol = 1; + sg_io->flags = -1U; + sg_io->info = -1U; + sg_io->request = (kernel_ulong_t) 0xfacefeedfffffff1ULL; + sg_io->response = (kernel_ulong_t) 0xfacefeedfffffff2ULL; + sg_io->dout_xferp = (kernel_ulong_t) 0xfacefeedfffffff3ULL; + sg_io->din_xferp = (kernel_ulong_t) 0xfacefeedfffffff4ULL; + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {guard='Q'" + ", protocol=BSG_PROTOCOL_SCSI" + ", subprotocol=BSG_SUB_PROTOCOL_SCSI_TMF" + ", request_len=%u" + ", request=%#llx" + ", request_tag=%#" PRI__x64 + ", request_attr=%u" + ", request_priority=%u" + ", request_extra=%u" + ", max_response_len=%u" + ", dout_iovec_count=%u" + ", dout_xfer_len=%u" + ", din_iovec_count=%u" + ", din_xfer_len=%u" + ", dout_xferp=%#llx" + ", timeout=%u" + ", flags=BSG_FLAG_Q_AT_TAIL|BSG_FLAG_Q_AT_HEAD|0xffffffcf" + ", usr_ptr=%#" PRI__x64 + ", response_len=%u" + ", response=%#llx" + ", din_xferp=%#llx" + ", driver_status=%#x" + ", transport_status=%#x" + ", device_status=%#x" + ", retry_delay=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xfffffff8" + ", duration=%u" + ", response_len=%u" + ", din_resid=%d" + ", dout_resid=%d" + ", generated_tag=%#" PRI__x64 "}) = -1 EBADF (%m)\n", + sg_io->request_len, + (unsigned long long) (kernel_ulong_t) sg_io->request, + sg_io->request_tag, + sg_io->request_attr, + sg_io->request_priority, + sg_io->request_extra, + sg_io->max_response_len, + sg_io->dout_iovec_count, + sg_io->dout_xfer_len, + sg_io->din_iovec_count, + sg_io->din_xfer_len, + (unsigned long long) (kernel_ulong_t) sg_io->dout_xferp, + sg_io->timeout, + sg_io->usr_ptr, + sg_io->response_len, + (unsigned long long) (kernel_ulong_t) sg_io->response, + (unsigned long long) (kernel_ulong_t) sg_io->din_xferp, + sg_io->driver_status, + sg_io->transport_status, + sg_io->device_status, + sg_io->retry_delay, + sg_io->duration, + sg_io->response_len, + sg_io->din_resid, + sg_io->dout_resid, + sg_io->generated_tag); + + const struct iovec iov[] = { + { + .iov_base = (void *) efault - 2, + .iov_len = 2 + }, { + .iov_base = (void *) efault - 3, + .iov_len = 4 + } + }; + const struct iovec *const t_iov = tail_memdup(iov, sizeof(iov)); + sg_io->dout_iovec_count = ARRAY_SIZE(iov); + sg_io->dout_xfer_len = iov[0].iov_len + iov[1].iov_len - 1; + sg_io->dout_xferp = (unsigned long) t_iov; + + sg_io->din_iovec_count = 0; + sg_io->din_xfer_len = 5; + sg_io->din_resid = 1; + sg_io->din_xferp = (unsigned long) efault - + (sg_io->dout_xfer_len - sg_io->din_resid); + + sg_io->request_len = 3; + sg_io->request = (unsigned long) efault - sg_io->request_len; + sg_io->response_len = 2; + sg_io->response = (unsigned long) efault - sg_io->response_len; + + sg_io->flags = 0x20; + sg_io->info = 1; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {guard='Q'" + ", protocol=BSG_PROTOCOL_SCSI" + ", subprotocol=BSG_SUB_PROTOCOL_SCSI_TMF" + ", request_len=%u" + ", request=\"\\x%x\\x%x\\x%x\"" + ", request_tag=%#" PRI__x64 + ", request_attr=%u" + ", request_priority=%u" + ", request_extra=%u" + ", max_response_len=%u" + ", dout_iovec_count=%u" + ", dout_xfer_len=%u" + ", din_iovec_count=%u" + ", din_xfer_len=%u" + ", dout_xferp=[{iov_base=\"\\%o\\%o\", iov_len=%u}" + ", {iov_base=\"\\%o\\%o\\%o\", iov_len=%u}]" + ", timeout=%u, flags=BSG_FLAG_Q_AT_HEAD" + ", usr_ptr=%#" PRI__x64 + ", response_len=%u" + ", response=\"\\x%x\\x%x\"" + ", din_xferp=\"\\x%x\\x%x\\x%x\\x%x\"" + ", driver_status=%#x" + ", transport_status=%#x" + ", device_status=%#x" + ", retry_delay=%u" + ", info=SG_INFO_CHECK" + ", duration=%u" + ", response_len=%u" + ", din_resid=%d" + ", dout_resid=%d" + ", generated_tag=%#" PRI__x64 "}) = -1 EBADF (%m)\n", + sg_io->request_len, + * (unsigned char *) ((unsigned long) sg_io->request + 0), + * (unsigned char *) ((unsigned long) sg_io->request + 1), + * (unsigned char *) ((unsigned long) sg_io->request + 2), + sg_io->request_tag, + sg_io->request_attr, + sg_io->request_priority, + sg_io->request_extra, + sg_io->max_response_len, + sg_io->dout_iovec_count, + sg_io->dout_xfer_len, + sg_io->din_iovec_count, + sg_io->din_xfer_len, + * (unsigned char *) (iov[0].iov_base + 0), + * (unsigned char *) (iov[0].iov_base + 1), + (unsigned int) iov[0].iov_len, + * (unsigned char *) (iov[1].iov_base + 0), + * (unsigned char *) (iov[1].iov_base + 1), + * (unsigned char *) (iov[1].iov_base + 2), + (unsigned int) iov[1].iov_len, + sg_io->timeout, + sg_io->usr_ptr, + sg_io->response_len, + * (unsigned char *) ((unsigned long) sg_io->response + 0), + * (unsigned char *) ((unsigned long) sg_io->response + 1), + * (unsigned char *) ((unsigned long) sg_io->din_xferp + 0), + * (unsigned char *) ((unsigned long) sg_io->din_xferp + 1), + * (unsigned char *) ((unsigned long) sg_io->din_xferp + 2), + * (unsigned char *) ((unsigned long) sg_io->din_xferp + 3), + sg_io->driver_status, + sg_io->transport_status, + sg_io->device_status, + sg_io->retry_delay, + sg_io->duration, + sg_io->response_len, + sg_io->din_resid, + sg_io->dout_resid, + sg_io->generated_tag); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_BSG_H") + +#endif diff --git a/tests-m32/ioctl_sg_io_v4.test b/tests-m32/ioctl_sg_io_v4.test new file mode 100755 index 000000000..255672247 --- /dev/null +++ b/tests-m32/ioctl_sg_io_v4.test @@ -0,0 +1,4 @@ +#!/bin/sh + +# Check decoding of ioctl SG_IO v4 commands. +. "${srcdir=.}/ioctl.test" diff --git a/tests-m32/ioctl_sock_gifconf.c b/tests-m32/ioctl_sock_gifconf.c new file mode 100644 index 000000000..ae0bea4f8 --- /dev/null +++ b/tests-m32/ioctl_sock_gifconf.c @@ -0,0 +1,182 @@ +/* + * Check decoding of SIOCGIFCONF command of ioctl syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +#include +#include +#include +#include + +#define MAX_STRLEN 1 + +static void +print_ifc_len(int val) +{ + if (val % (int) sizeof(struct ifreq)) + printf("%d", val); + else + printf("%d * sizeof(struct ifreq)", + val / (int) sizeof(struct ifreq)); +} + +static void +print_ifconf(struct ifconf *ifc, int in_len, char *in_buf, long rc) +{ + if (in_buf) { + printf("{ifc_len="); + print_ifc_len(in_len); + + if (in_len != ifc->ifc_len) { + printf(" => "); + print_ifc_len(ifc->ifc_len); + } + } else { + printf("{ifc_len="); + print_ifc_len(ifc->ifc_len); + } + + printf(", ifc_buf="); + + if ((rc < 0) || !in_buf) { + if (in_buf) + printf("%p", in_buf); + else + printf("NULL"); + } else { + int i; + + printf("["); + for (i = 0; i < (ifc->ifc_len) && + i < (int) (MAX_STRLEN * sizeof(struct ifreq)); + i += sizeof(struct ifreq)) { + struct ifreq *ifr = (struct ifreq *) (ifc->ifc_buf + i); + struct sockaddr_in *const sa_in = + (struct sockaddr_in *) &(ifr->ifr_addr); + + if (i) + printf(", "); + printf("{ifr_name=\"%s\", ifr_addr={sa_family=AF_INET, " + "sin_port=htons(%u), sin_addr=inet_addr(\"%s\")}" + "}", ifr->ifr_name, ntohs(sa_in->sin_port), + inet_ntoa(sa_in->sin_addr)); + } + + if ((size_t) (ifc->ifc_len - i) >= sizeof(struct ifreq)) + printf(", ..."); + + printf("]"); + } + + printf("}"); +} + +static void +gifconf_ioctl(int fd, struct ifconf *ifc, bool ifc_valid) +{ + const char * errstr; + int in_len; + char *in_buf; + long rc; + + if (ifc_valid) { + in_len = ifc->ifc_len; + in_buf = ifc->ifc_buf; + } + + rc = ioctl(fd, SIOCGIFCONF, ifc); + errstr = sprintrc(rc); + + printf("ioctl(%d, SIOCGIFCONF, ", fd); + if (ifc_valid) { + print_ifconf(ifc, in_len, in_buf, rc); + } else { + if (ifc) + printf("%p", ifc); + else + printf("NULL"); + } + + printf(") = %s\n", errstr); +} + +int +main(int argc, char *argv[]) +{ + struct ifreq *ifr = tail_alloc(2 * sizeof(*ifr)); + struct ifconf *ifc = tail_alloc(sizeof(*ifc)); + + struct sockaddr_in addr; + int fd; + + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + + if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) + perror_msg_and_skip("socket AF_INET"); + + gifconf_ioctl(fd, NULL, false); + gifconf_ioctl(fd, ifc + 1, false); + + ifc->ifc_len = 3141592653U; + ifc->ifc_buf = NULL; + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 0; + ifc->ifc_buf = (char *) (ifr + 2); + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 1; + ifc->ifc_buf = (char *) (ifr + 1); + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 1 * sizeof(*ifr); + ifc->ifc_buf = (char *) (ifr + 1); + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 2 * sizeof(*ifr); + ifc->ifc_buf = (char *) (ifr + 1); + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 2 * sizeof(*ifr) + 2; + ifc->ifc_buf = (char *) ifr; + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 3 * sizeof(*ifr) + 4; + ifc->ifc_buf = (char *) ifr; + gifconf_ioctl(fd, ifc, true); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/ioctl_sock_gifconf.test b/tests-m32/ioctl_sock_gifconf.test new file mode 100755 index 000000000..2e2fc019d --- /dev/null +++ b/tests-m32/ioctl_sock_gifconf.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of SIOCGIFCONF ioctl. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a28 -s1 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/ioctl_uffdio.c b/tests-m32/ioctl_uffdio.c new file mode 100644 index 000000000..10b8b843f --- /dev/null +++ b/tests-m32/ioctl_uffdio.c @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Red Hat, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_userfaultfd && defined HAVE_LINUX_USERFAULTFD_H + +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +int +main(void) +{ + int rc; + int fd = syscall(__NR_userfaultfd, O_NONBLOCK); + size_t pagesize = getpagesize(); + + if (fd < 0) + perror_msg_and_skip("userfaultfd"); + + /* ---- API ---- */ + struct uffdio_api *api_struct = tail_alloc(sizeof(*api_struct)); + + /* With a bad fd */ + memset(api_struct, 0, sizeof(*api_struct)); + rc = ioctl(-1, UFFDIO_API, api_struct); + printf("ioctl(-1, UFFDIO_API, {api=0, features=0}) = %d %s (%m)\n", + rc, errno2name()); + /* With a bad pointer */ + rc = ioctl(fd, UFFDIO_API, NULL); + printf("ioctl(%d, UFFDIO_API, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + /* Normal call */ + api_struct->api = UFFD_API; + api_struct->features = 0; + rc = ioctl(fd, UFFDIO_API, api_struct); + printf("ioctl(%d, UFFDIO_API, {api=0xaa, features=0, " + "features.out=%#" PRIx64 ", " "ioctls=1<<_UFFDIO_REGISTER|" + "1<<_UFFDIO_UNREGISTER|1<<_UFFDIO_API", + fd, (uint64_t)api_struct->features); + api_struct->ioctls &= ~(1ull<<_UFFDIO_REGISTER| + 1ull<<_UFFDIO_UNREGISTER| + 1ull<<_UFFDIO_API); + if (api_struct->ioctls) + printf("|%#" PRIx64, (uint64_t)api_struct->ioctls); + printf("}) = %d\n", rc); + + /* For the rest of the tests we need some anonymous memory */ + void *area1 = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1, 0); + if (area1 == MAP_FAILED) + perror_msg_and_fail("mmap area1"); + void *area2 = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1, 0); + if (area2 == MAP_FAILED) + perror_msg_and_fail("mmap area2"); + madvise(area2, pagesize, MADV_DONTNEED); + *(char *)area1 = 42; + + /* ---- REGISTER ---- */ + struct uffdio_register *register_struct = + tail_alloc(sizeof(*register_struct)); + memset(register_struct, 0, sizeof(*register_struct)); + + rc = ioctl(-1, UFFDIO_REGISTER, register_struct); + printf("ioctl(-1, UFFDIO_REGISTER, {range={start=0, len=0}, " + "mode=0}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_REGISTER, NULL); + printf("ioctl(%d, UFFDIO_REGISTER, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + register_struct->range.start = (uint64_t)(uintptr_t)area2; + register_struct->range.len = pagesize; + register_struct->mode = UFFDIO_REGISTER_MODE_MISSING; + rc = ioctl(fd, UFFDIO_REGISTER, register_struct); + printf("ioctl(%d, UFFDIO_REGISTER, {range={start=%p, len=%#zx}, " + "mode=UFFDIO_REGISTER_MODE_MISSING, ioctls=" + "1<<_UFFDIO_WAKE|1<<_UFFDIO_COPY|1<<_UFFDIO_ZEROPAGE", + fd, area2, pagesize); + register_struct->ioctls &= ~(1ull<<_UFFDIO_WAKE| + 1ull<<_UFFDIO_COPY| + 1ull<<_UFFDIO_ZEROPAGE); + if (register_struct->ioctls) + printf("|%#" PRIx64, (uint64_t)register_struct->ioctls); + printf("}) = %d\n", rc); + + /* With area2 registered we can now do the atomic copies onto it + * but be careful not to access it in any other way otherwise + * userfaultfd will cause us to stall. + */ + /* ---- COPY ---- */ + struct uffdio_copy *copy_struct = tail_alloc(sizeof(*copy_struct)); + + memset(copy_struct, 0, sizeof(*copy_struct)); + rc = ioctl(-1, UFFDIO_COPY, copy_struct); + printf("ioctl(-1, UFFDIO_COPY, {dst=0, src=0, len=0, mode=0" + "}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_COPY, NULL); + printf("ioctl(%d, UFFDIO_COPY, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + copy_struct->dst = (uint64_t)(uintptr_t)area2; + copy_struct->src = (uint64_t)(uintptr_t)area1; + copy_struct->len = pagesize; + copy_struct->mode = UFFDIO_COPY_MODE_DONTWAKE; + rc = ioctl(fd, UFFDIO_COPY, copy_struct); + printf("ioctl(%d, UFFDIO_COPY, {dst=%p, src=%p, len=%#zx," + " mode=UFFDIO_COPY_MODE_DONTWAKE, copy=%#zx}) = %d\n", + fd, area2, area1, pagesize, pagesize, rc); + + /* ---- ZEROPAGE ---- */ + struct uffdio_zeropage *zero_struct = tail_alloc(sizeof(*zero_struct)); + madvise(area2, pagesize, MADV_DONTNEED); + + memset(zero_struct, 0, sizeof(*zero_struct)); + rc = ioctl(-1, UFFDIO_ZEROPAGE, zero_struct); + printf("ioctl(-1, UFFDIO_ZEROPAGE, {range={start=0, len=0}, mode=0" + "}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_ZEROPAGE, NULL); + printf("ioctl(%d, UFFDIO_ZEROPAGE, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + zero_struct->range.start = (uint64_t)(uintptr_t)area2; + zero_struct->range.len = pagesize; + zero_struct->mode = UFFDIO_ZEROPAGE_MODE_DONTWAKE; + rc = ioctl(fd, UFFDIO_ZEROPAGE, zero_struct); + printf("ioctl(%d, UFFDIO_ZEROPAGE, {range={start=%p, len=%#zx}," + " mode=UFFDIO_ZEROPAGE_MODE_DONTWAKE, zeropage=%#zx}) = %d\n", + fd, area2, pagesize, pagesize, rc); + + /* ---- WAKE ---- */ + struct uffdio_range *range_struct = tail_alloc(sizeof(*range_struct)); + memset(range_struct, 0, sizeof(*range_struct)); + + rc = ioctl(-1, UFFDIO_WAKE, range_struct); + printf("ioctl(-1, UFFDIO_WAKE, {start=0, len=0}) = %d %s (%m)\n", + rc, errno2name()); + + rc = ioctl(fd, UFFDIO_WAKE, NULL); + printf("ioctl(%d, UFFDIO_WAKE, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + range_struct->start = (uint64_t)(uintptr_t)area2; + range_struct->len = pagesize; + rc = ioctl(fd, UFFDIO_WAKE, range_struct); + printf("ioctl(%d, UFFDIO_WAKE, {start=%p, len=%#zx}) = %d\n", + fd, area2, pagesize, rc); + + /* ---- UNREGISTER ---- */ + memset(range_struct, 0, sizeof(*range_struct)); + + rc = ioctl(-1, UFFDIO_UNREGISTER, range_struct); + printf("ioctl(-1, UFFDIO_UNREGISTER, {start=0, len=0}) = %d %s (%m)\n", + rc, errno2name()); + + rc = ioctl(fd, UFFDIO_UNREGISTER, NULL); + printf("ioctl(%d, UFFDIO_UNREGISTER, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + range_struct->start = (uint64_t)(uintptr_t)area2; + range_struct->len = pagesize; + rc = ioctl(fd, UFFDIO_UNREGISTER, range_struct); + printf("ioctl(%d, UFFDIO_UNREGISTER, {start=%p, len=%#zx}) = %d\n", + fd, area2, pagesize, rc); + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_userfaultfd && HAVE_LINUX_USERFAULTFD_H") + +#endif diff --git a/tests-m32/ioctl_uffdio.test b/tests-m32/ioctl_uffdio.test new file mode 100755 index 000000000..fae9b5567 --- /dev/null +++ b/tests-m32/ioctl_uffdio.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check userfaultfd ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-m32/ioctl_v4l2.c b/tests-m32/ioctl_v4l2.c new file mode 100644 index 000000000..af8c3419a --- /dev/null +++ b/tests-m32/ioctl_v4l2.c @@ -0,0 +1,551 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#if WORDS_BIGENDIAN +# define cc0(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 24)) +# define cc1(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 16)) +# define cc2(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 8)) +# define cc3(arg) ((unsigned int) (unsigned char) (arg)) +# define fourcc(a0, a1, a2, a3) \ + ((unsigned int)(a3) | \ + ((unsigned int)(a2) << 8) | \ + ((unsigned int)(a1) << 16) | \ + ((unsigned int)(a0) << 24)) +#else +# define cc0(arg) ((unsigned int) (unsigned char) (arg)) +# define cc1(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 8)) +# define cc2(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 16)) +# define cc3(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 24)) +# define fourcc(a0, a1, a2, a3) \ + ((unsigned int)(a0) | \ + ((unsigned int)(a1) << 8) | \ + ((unsigned int)(a2) << 16) | \ + ((unsigned int)(a3) << 24)) +#endif + +static const unsigned int magic = 0xdeadbeef; + +int +main(void ) +{ + const unsigned int size = get_page_size(); + void *const page = tail_alloc(size); + fill_memory(page, size); + + unsigned char cc[sizeof(int)] = { 'A', '\'', '\\', '\xfa' }; + + /* VIDIOC_QUERYCAP */ + ioctl(-1, VIDIOC_QUERYCAP, 0); + printf("ioctl(-1, VIDIOC_QUERYCAP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QUERYCAP, page); + printf("ioctl(-1, VIDIOC_QUERYCAP, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_ENUM_FMT */ + ioctl(-1, VIDIOC_ENUM_FMT, 0); + printf("ioctl(-1, VIDIOC_ENUM_FMT, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_fmtdesc *const p_fmtdesc = tail_alloc(sizeof(*p_fmtdesc)); + p_fmtdesc->index = magic; + p_fmtdesc->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + ioctl(-1, VIDIOC_ENUM_FMT, p_fmtdesc); + printf("ioctl(-1, VIDIOC_ENUM_FMT, {index=%u" + ", type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EBADF (%m)\n", + p_fmtdesc->index); + + /* VIDIOC_G_FMT */ + ioctl(-1, VIDIOC_G_FMT, 0); + printf("ioctl(-1, VIDIOC_G_FMT, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_format *const p_format = tail_alloc(sizeof(*p_format)); + p_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + + ioctl(-1, VIDIOC_G_FMT, p_format); + printf("ioctl(-1, VIDIOC_G_FMT" + ", {type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EBADF (%m)\n"); + + /* VIDIOC_S_FMT */ + ioctl(-1, VIDIOC_S_FMT, 0); + printf("ioctl(-1, VIDIOC_S_FMT, NULL) = -1 EBADF (%m)\n"); + + p_format->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; + p_format->fmt.pix.width = 0xdad1beaf; + p_format->fmt.pix.height = 0xdad2beaf; + p_format->fmt.pix.pixelformat = magic; + p_format->fmt.pix.field = V4L2_FIELD_NONE; + p_format->fmt.pix.bytesperline = 0xdad3beaf; + p_format->fmt.pix.sizeimage = 0xdad4beaf; + p_format->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG; + + ioctl(-1, VIDIOC_S_FMT, p_format); + printf("ioctl(-1, VIDIOC_S_FMT, {type=V4L2_BUF_TYPE_VIDEO_OUTPUT" + ", fmt.pix={width=%u, height=%u, pixelformat=" + "v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", field=V4L2_FIELD_NONE, bytesperline=%u, sizeimage=%u" + ", colorspace=V4L2_COLORSPACE_JPEG}}) = -1 EBADF (%m)\n", + p_format->fmt.pix.width, p_format->fmt.pix.height, + cc0(magic), cc1(magic), cc2(magic), cc3(magic), + p_format->fmt.pix.bytesperline, p_format->fmt.pix.sizeimage); + + /* VIDIOC_TRY_FMT */ + ioctl(-1, VIDIOC_TRY_FMT, 0); + printf("ioctl(-1, VIDIOC_TRY_FMT, NULL) = -1 EBADF (%m)\n"); + +#if HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE + memset(p_format, -1, sizeof(*p_format)); + p_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; + p_format->fmt.pix_mp.width = 0xdad1beaf; + p_format->fmt.pix_mp.height = 0xdad2beaf; + p_format->fmt.pix_mp.pixelformat = magic; + p_format->fmt.pix_mp.field = V4L2_FIELD_NONE; + p_format->fmt.pix_mp.colorspace = V4L2_COLORSPACE_JPEG; + unsigned int i; + for (i = 0; i < ARRAY_SIZE(p_format->fmt.pix_mp.plane_fmt); ++i) { + p_format->fmt.pix_mp.plane_fmt[i].sizeimage = 0xbadc0de0 | i; + p_format->fmt.pix_mp.plane_fmt[i].bytesperline = 0xdadbeaf0 | i; + } + ioctl(-1, VIDIOC_TRY_FMT, p_format); + printf("ioctl(-1, VIDIOC_TRY_FMT" + ", {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" + ", fmt.pix_mp={width=%u, height=%u, pixelformat=" + "v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", field=V4L2_FIELD_NONE, colorspace=V4L2_COLORSPACE_JPEG" + ", plane_fmt=[", + p_format->fmt.pix_mp.width, p_format->fmt.pix_mp.height, + cc0(magic), cc1(magic), cc2(magic), cc3(magic)); + for (i = 0; i < ARRAY_SIZE(p_format->fmt.pix_mp.plane_fmt); ++i) { + if (i) + printf(", "); + printf("{sizeimage=%u, bytesperline=%u}", + p_format->fmt.pix_mp.plane_fmt[i].sizeimage, + p_format->fmt.pix_mp.plane_fmt[i].bytesperline); + } + printf("], num_planes=%u}}) = -1 EBADF (%m)\n", + p_format->fmt.pix_mp.num_planes); +#else + struct v4l2_format *const p_v4l2_format = + page + size - sizeof(*p_v4l2_format); + ioctl(-1, VIDIOC_TRY_FMT, p_v4l2_format); + printf("ioctl(-1, VIDIOC_TRY_FMT, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_format->type); +#endif + + /* VIDIOC_REQBUFS */ + ioctl(-1, VIDIOC_REQBUFS, 0); + printf("ioctl(-1, VIDIOC_REQBUFS, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_requestbuffers *const p_v4l2_requestbuffers = + page + size - sizeof(*p_v4l2_requestbuffers); + ioctl(-1, VIDIOC_REQBUFS, p_v4l2_requestbuffers); + printf("ioctl(-1, VIDIOC_REQBUFS, {count=%u, type=%#x" + " /* V4L2_BUF_TYPE_??? */, memory=%#x /* V4L2_MEMORY_??? */})" + " = -1 EBADF (%m)\n", + p_v4l2_requestbuffers->count, + p_v4l2_requestbuffers->type, + p_v4l2_requestbuffers->memory); + + /* VIDIOC_QUERYBUF */ + ioctl(-1, VIDIOC_QUERYBUF, 0); + printf("ioctl(-1, VIDIOC_QUERYBUF, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_buffer *const p_v4l2_buffer = + page + size - sizeof(*p_v4l2_buffer); + ioctl(-1, VIDIOC_QUERYBUF, p_v4l2_buffer); + printf("ioctl(-1, VIDIOC_QUERYBUF, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", index=%u}) = -1 EBADF (%m)\n", + p_v4l2_buffer->type, p_v4l2_buffer->index); + + /* VIDIOC_QBUF */ + ioctl(-1, VIDIOC_QBUF, 0); + printf("ioctl(-1, VIDIOC_QBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QBUF, p_v4l2_buffer); + printf("ioctl(-1, VIDIOC_QBUF, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", index=%u}) = -1 EBADF (%m)\n", + p_v4l2_buffer->type, p_v4l2_buffer->index); + + /* VIDIOC_DQBUF */ + ioctl(-1, VIDIOC_DQBUF, 0); + printf("ioctl(-1, VIDIOC_DQBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_DQBUF, p_v4l2_buffer); + printf("ioctl(-1, VIDIOC_DQBUF, {type=%#x" + " /* V4L2_BUF_TYPE_??? */}) = -1 EBADF (%m)\n", + p_v4l2_buffer->type); + + /* VIDIOC_G_FBUF */ + ioctl(-1, VIDIOC_G_FBUF, 0); + printf("ioctl(-1, VIDIOC_G_FBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_FBUF, page); + printf("ioctl(-1, VIDIOC_G_FBUF, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_FBUF */ + ioctl(-1, VIDIOC_S_FBUF, 0); + printf("ioctl(-1, VIDIOC_S_FBUF, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_framebuffer *const p_v4l2_framebuffer = + page + size - sizeof(*p_v4l2_framebuffer); + ioctl(-1, VIDIOC_S_FBUF, p_v4l2_framebuffer); + printf("ioctl(-1, VIDIOC_S_FBUF, {capability=%#x" + ", flags=%#x, base=%p}) = -1 EBADF (%m)\n", + p_v4l2_framebuffer->capability, + p_v4l2_framebuffer->flags, + p_v4l2_framebuffer->base); + + /* VIDIOC_STREAMON */ + ioctl(-1, VIDIOC_STREAMON, 0); + printf("ioctl(-1, VIDIOC_STREAMON, NULL) = -1 EBADF (%m)\n"); + + int *const p_int = page + size - sizeof(int); + ioctl(-1, VIDIOC_STREAMON, p_int); + printf("ioctl(-1, VIDIOC_STREAMON, [%#x /* V4L2_BUF_TYPE_??? */])" + " = -1 EBADF (%m)\n", *p_int); + + /* VIDIOC_STREAMOFF */ + ioctl(-1, VIDIOC_STREAMOFF, 0); + printf("ioctl(-1, VIDIOC_STREAMOFF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_STREAMOFF, p_int); + printf("ioctl(-1, VIDIOC_STREAMOFF, [%#x /* V4L2_BUF_TYPE_??? */])" + " = -1 EBADF (%m)\n", *p_int); + + /* VIDIOC_G_PARM */ + ioctl(-1, VIDIOC_G_PARM, 0); + printf("ioctl(-1, VIDIOC_G_PARM, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_streamparm *const p_v4l2_streamparm = + page + size - sizeof(*p_v4l2_streamparm); + ioctl(-1, VIDIOC_G_PARM, p_v4l2_streamparm); + printf("ioctl(-1, VIDIOC_G_PARM, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_streamparm->type); + + /* VIDIOC_S_PARM */ + ioctl(-1, VIDIOC_S_PARM, 0); + printf("ioctl(-1, VIDIOC_S_PARM, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_PARM, p_v4l2_streamparm); + printf("ioctl(-1, VIDIOC_S_PARM, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_streamparm->type); + + struct v4l2_streamparm *const p_streamparm = + tail_alloc(sizeof(*p_streamparm)); + p_streamparm->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + p_streamparm->parm.capture.capability = V4L2_CAP_TIMEPERFRAME; + p_streamparm->parm.capture.capturemode = V4L2_MODE_HIGHQUALITY; + p_streamparm->parm.capture.timeperframe.numerator = 0xdeadbeef; + p_streamparm->parm.capture.timeperframe.denominator = 0xbadc0ded; + ioctl(-1, VIDIOC_S_PARM, p_streamparm); + printf("ioctl(-1, VIDIOC_S_PARM, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE" + ", parm.capture={capability=V4L2_CAP_TIMEPERFRAME" + ", capturemode=V4L2_MODE_HIGHQUALITY, timeperframe=%u/%u" + ", extendedmode=%u, readbuffers=%u}}) = -1 EBADF (%m)\n", + p_streamparm->parm.capture.timeperframe.numerator, + p_streamparm->parm.capture.timeperframe.denominator, -1U, -1U); + + p_streamparm->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; + p_streamparm->parm.output.outputmode = 0; + ioctl(-1, VIDIOC_S_PARM, p_streamparm); + printf("ioctl(-1, VIDIOC_S_PARM, {type=V4L2_BUF_TYPE_VIDEO_OUTPUT" + ", parm.output={capability=V4L2_CAP_TIMEPERFRAME" + ", outputmode=0, timeperframe=%u/%u" + ", extendedmode=%u, writebuffers=%u}}) = -1 EBADF (%m)\n", + p_streamparm->parm.output.timeperframe.numerator, + p_streamparm->parm.output.timeperframe.denominator, -1U, -1U); + + /* VIDIOC_G_STD */ + ioctl(-1, VIDIOC_G_STD, 0); + printf("ioctl(-1, VIDIOC_G_STD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_STD, page); + printf("ioctl(-1, VIDIOC_G_STD, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_STD */ + ioctl(-1, VIDIOC_S_STD, 0); + printf("ioctl(-1, VIDIOC_S_STD, NULL) = -1 EBADF (%m)\n"); + + long long *const p_longlong = page + size - sizeof(*p_longlong); + ioctl(-1, VIDIOC_S_STD, p_longlong); + printf("ioctl(-1, VIDIOC_S_STD, [%#llx]) = -1 EBADF (%m)\n", + *p_longlong); + + /* VIDIOC_ENUMSTD */ + ioctl(-1, VIDIOC_ENUMSTD, 0); + printf("ioctl(-1, VIDIOC_ENUMSTD, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_standard *const p_v4l2_standard = + page + size - sizeof(*p_v4l2_standard); + ioctl(-1, VIDIOC_ENUMSTD, p_v4l2_standard); + printf("ioctl(-1, VIDIOC_ENUMSTD, {index=%u}) = -1 EBADF (%m)\n", + p_v4l2_standard->index); + + /* VIDIOC_ENUMINPUT */ + ioctl(-1, VIDIOC_ENUMINPUT, 0); + printf("ioctl(-1, VIDIOC_ENUMINPUT, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_input *const p_v4l2_input = + page + size - sizeof(*p_v4l2_input); + ioctl(-1, VIDIOC_ENUMINPUT, p_v4l2_input); + printf("ioctl(-1, VIDIOC_ENUMINPUT, {index=%u}) = -1 EBADF (%m)\n", + p_v4l2_input->index); + + /* VIDIOC_G_CTRL */ + ioctl(-1, VIDIOC_G_CTRL, 0); + printf("ioctl(-1, VIDIOC_G_CTRL, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_control *const p_v4l2_control = + page + size - sizeof(*p_v4l2_control); + ioctl(-1, VIDIOC_G_CTRL, p_v4l2_control); + printf("ioctl(-1, VIDIOC_G_CTRL, {id=%#x /* V4L2_CID_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_control->id); + + /* VIDIOC_S_CTRL */ + ioctl(-1, VIDIOC_S_CTRL, 0); + printf("ioctl(-1, VIDIOC_S_CTRL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_CTRL, p_v4l2_control); + printf("ioctl(-1, VIDIOC_S_CTRL, {id=%#x /* V4L2_CID_??? */" + ", value=%d}) = -1 EBADF (%m)\n", + p_v4l2_control->id, p_v4l2_control->value); + + /* VIDIOC_QUERYCTRL */ + ioctl(-1, VIDIOC_QUERYCTRL, 0); + printf("ioctl(-1, VIDIOC_QUERYCTRL, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_queryctrl *const p_v4l2_queryctrl = + page + size - sizeof(*p_v4l2_queryctrl); + ioctl(-1, VIDIOC_QUERYCTRL, p_v4l2_queryctrl); +# ifdef V4L2_CTRL_FLAG_NEXT_CTRL + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=V4L2_CTRL_FLAG_NEXT_CTRL" + "|%#x /* V4L2_CID_??? */}) = -1 EBADF (%m)\n", + p_v4l2_queryctrl->id & ~V4L2_CTRL_FLAG_NEXT_CTRL); +# else + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=%#x /* V4L2_CID_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_queryctrl->id); +# endif + + struct v4l2_queryctrl *const p_queryctrl = + tail_alloc(sizeof(*p_queryctrl)); + p_queryctrl->id = V4L2_CID_SATURATION; + ioctl(-1, VIDIOC_QUERYCTRL, p_queryctrl); + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=V4L2_CID_SATURATION})" + " = -1 EBADF (%m)\n"); + + /* VIDIOC_G_INPUT */ + ioctl(-1, VIDIOC_G_INPUT, 0); + printf("ioctl(-1, VIDIOC_G_INPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_INPUT, page); + printf("ioctl(-1, VIDIOC_G_INPUT, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_INPUT */ + ioctl(-1, VIDIOC_S_INPUT, 0); + printf("ioctl(-1, VIDIOC_S_INPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_INPUT, p_int); + printf("ioctl(-1, VIDIOC_S_INPUT, [%u]) = -1 EBADF (%m)\n", *p_int); + + /* VIDIOC_CROPCAP */ + ioctl(-1, VIDIOC_CROPCAP, 0); + printf("ioctl(-1, VIDIOC_CROPCAP, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_cropcap *const p_v4l2_cropcap = + page + size - sizeof(*p_v4l2_cropcap); + ioctl(-1, VIDIOC_CROPCAP, p_v4l2_cropcap); + printf("ioctl(-1, VIDIOC_CROPCAP, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_cropcap->type); + + /* VIDIOC_G_CROP */ + ioctl(-1, VIDIOC_G_CROP, 0); + printf("ioctl(-1, VIDIOC_G_CROP, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_crop *const p_v4l2_crop = + page + size - sizeof(*p_v4l2_crop); + ioctl(-1, VIDIOC_G_CROP, p_v4l2_crop); + printf("ioctl(-1, VIDIOC_G_CROP, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_crop->type); + + /* VIDIOC_S_CROP */ + ioctl(-1, VIDIOC_S_CROP, 0); + printf("ioctl(-1, VIDIOC_S_CROP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_CROP, p_v4l2_crop); + printf("ioctl(-1, VIDIOC_S_CROP, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", c={left=%d, top=%d, width=%u, height=%u}}) = -1 EBADF (%m)\n", + p_v4l2_crop->type, + p_v4l2_crop->c.left, + p_v4l2_crop->c.top, + p_v4l2_crop->c.width, + p_v4l2_crop->c.height); + +#ifdef VIDIOC_S_EXT_CTRLS + /* VIDIOC_S_EXT_CTRLS */ + ioctl(-1, VIDIOC_S_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_ext_controls *const p_ext_controls = + tail_alloc(sizeof(*p_ext_controls)); + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_USER; + p_ext_controls->count = 0; + p_ext_controls->controls = (void *) -2UL; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, {ctrl_class=V4L2_CTRL_CLASS_USER" + ", count=%u}) = -1 EBADF (%m)\n", p_ext_controls->count); + + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_MPEG; + p_ext_controls->count = magic; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, {ctrl_class=V4L2_CTRL_CLASS_MPEG" + ", count=%u, controls=%p}) = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls); + +# if HAVE_DECL_V4L2_CTRL_TYPE_STRING + p_ext_controls->count = 2; + p_ext_controls->controls = + tail_alloc(sizeof(*p_ext_controls->controls) * p_ext_controls->count); + p_ext_controls->controls[0].id = V4L2_CID_BRIGHTNESS; + p_ext_controls->controls[0].size = 0; + p_ext_controls->controls[0].value64 = 0xfacefeeddeadbeefULL; + p_ext_controls->controls[1].id = V4L2_CID_CONTRAST; + p_ext_controls->controls[1].size = 2; + p_ext_controls->controls[1].string = + tail_alloc(p_ext_controls->controls[1].size); + + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_MPEG, count=%u, controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + "] => controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + "], error_idx=%u}) = -1 EBADF (%m)\n", + p_ext_controls->count, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->error_idx); + + ++p_ext_controls->count; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_MPEG, count=%u, controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + ", %p]}) = -1 EBADF (%m)\n", + p_ext_controls->count, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->controls + 2); +# endif /* HAVE_DECL_V4L2_CTRL_TYPE_STRING */ + + /* VIDIOC_TRY_EXT_CTRLS */ + ioctl(-1, VIDIOC_TRY_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_TRY_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_USER; + p_ext_controls->count = magic; + p_ext_controls->controls = (void *) -2UL; + ioctl(-1, VIDIOC_TRY_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_TRY_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_USER, count=%u, controls=%p})" + " = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls); + + /* VIDIOC_G_EXT_CTRLS */ + ioctl(-1, VIDIOC_G_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_G_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_G_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_USER, count=%u, controls=%p" + ", error_idx=%u}) = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls, + p_ext_controls->error_idx); +#endif /* VIDIOC_S_EXT_CTRLS */ + +#ifdef VIDIOC_ENUM_FRAMESIZES + ioctl(-1, VIDIOC_ENUM_FRAMESIZES, 0); + printf("ioctl(-1, VIDIOC_ENUM_FRAMESIZES, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_frmsizeenum *const p_frmsizeenum = + tail_alloc(sizeof(*p_frmsizeenum)); + p_frmsizeenum->index = magic; + p_frmsizeenum->pixel_format = fourcc(cc[0], cc[1], cc[2], cc[3]); + + ioctl(-1, VIDIOC_ENUM_FRAMESIZES, p_frmsizeenum); + printf("ioctl(-1, VIDIOC_ENUM_FRAMESIZES, {index=%u" + ", pixel_format=v4l2_fourcc('%c', '\\%c', '\\%c', '\\x%x')})" + " = -1 EBADF (%m)\n", p_frmsizeenum->index, + cc[0], cc[1], cc[2], cc[3]); +#endif /* VIDIOC_ENUM_FRAMESIZES */ + +#ifdef VIDIOC_ENUM_FRAMEINTERVALS + ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, 0); + printf("ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_frmivalenum *const p_v4l2_frmivalenum = + page + size - sizeof(*p_v4l2_frmivalenum); + ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, p_v4l2_frmivalenum); + printf("ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, {index=%u" + ", pixel_format=v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", width=%u, height=%u}) = -1 EBADF (%m)\n", + p_v4l2_frmivalenum->index, + cc0(p_v4l2_frmivalenum->pixel_format), + cc1(p_v4l2_frmivalenum->pixel_format), + cc2(p_v4l2_frmivalenum->pixel_format), + cc3(p_v4l2_frmivalenum->pixel_format), + p_v4l2_frmivalenum->width, + p_v4l2_frmivalenum->height); +#endif /* VIDIOC_ENUM_FRAMEINTERVALS */ + +#ifdef VIDIOC_CREATE_BUFS + ioctl(-1, VIDIOC_CREATE_BUFS, 0); + printf("ioctl(-1, VIDIOC_CREATE_BUFS, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_create_buffers *const p_v4l2_create_buffers = + page + size - sizeof(*p_v4l2_create_buffers); + ioctl(-1, VIDIOC_CREATE_BUFS, p_v4l2_create_buffers); + printf("ioctl(-1, VIDIOC_CREATE_BUFS, {count=%u, memory=%#x" + " /* V4L2_MEMORY_??? */, format={type=%#x" + " /* V4L2_BUF_TYPE_??? */}}) = -1 EBADF (%m)\n", + p_v4l2_create_buffers->count, + p_v4l2_create_buffers->memory, + p_v4l2_create_buffers->format.type); +#endif /* VIDIOC_CREATE_BUFS */ + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/ioctl_v4l2.test b/tests-m32/ioctl_v4l2.test new file mode 100755 index 000000000..a092a3cd9 --- /dev/null +++ b/tests-m32/ioctl_v4l2.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic VIDIOC_* ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-m32/ioperm.c b/tests-m32/ioperm.c new file mode 100644 index 000000000..2f02b5234 --- /dev/null +++ b/tests-m32/ioperm.c @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_ioperm + +# include +# include + +int +main(void) +{ + const unsigned long port = (unsigned long) 0xdeafbeefffffffffULL; + + long rc = syscall(__NR_ioperm, port, 1, 0); + printf("ioperm(%#lx, %#lx, %d) = %ld %s (%m)\n", + port, 1UL, 0, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ioperm") + +#endif diff --git a/tests-m32/ioperm.test b/tests-m32/ioperm.test new file mode 100755 index 000000000..8c1c1cc7d --- /dev/null +++ b/tests-m32/ioperm.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check ioperm syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-m32/iopl.c b/tests-m32/iopl.c new file mode 100644 index 000000000..14ec29e30 --- /dev/null +++ b/tests-m32/iopl.c @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_iopl + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_iopl, 4); + printf("iopl(4) = %ld %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_iopl") + +#endif diff --git a/tests-m32/iopl.test b/tests-m32/iopl.test new file mode 100755 index 000000000..d0b5b113b --- /dev/null +++ b/tests-m32/iopl.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check iopl syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 diff --git a/tests-m32/ioprio.c b/tests-m32/ioprio.c new file mode 100644 index 000000000..44ace6c3e --- /dev/null +++ b/tests-m32/ioprio.c @@ -0,0 +1,102 @@ +/* + * Check decoding of ioprio_get and ioprio_set syscalls. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_ioprio_get) && defined(__NR_ioprio_set) + +# include +# include + +enum { + IOPRIO_CLASS_NONE, + IOPRIO_CLASS_RT, + IOPRIO_CLASS_BE, + IOPRIO_CLASS_IDLE +}; + +# include "xlat.h" +# include "xlat/ioprio_class.h" + +void +print_ioprio(unsigned long val) +{ + printf(" (IOPRIO_PRIO_VALUE("); + printxval(ioprio_class, val >> 13, "IOPRIO_CLASS_???"); + printf(", %d))", (int) (val & 0x1fff)); +} + +int +main(void) +{ + static const kernel_ulong_t bogus_which = + (kernel_ulong_t) 0xdeadfacefa57beefULL; + static const kernel_ulong_t bogus_who = + (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + static const kernel_ulong_t bogus_ioprio = + (kernel_ulong_t) 0xdec0ded1facefeedULL; + static const char * const bogus_ioprio_str = + "IOPRIO_PRIO_VALUE(0x7d677 /* IOPRIO_CLASS_??? */, 7917)"; + + long rc; + + rc = syscall(__NR_ioprio_get, bogus_which, bogus_who); + printf("ioprio_get(%#x /* IOPRIO_WHO_??? */, %d) = %s\n", + (int) bogus_which, (int) bogus_who, sprintrc(rc)); + + rc = syscall(__NR_ioprio_get, 1, 0); + printf("ioprio_get(IOPRIO_WHO_PROCESS, 0) = %s", sprintrc(rc)); + + if (rc >= -1) + print_ioprio(rc); + + puts(""); + + rc = syscall(__NR_ioprio_set, 2, 0, 8191); + printf("ioprio_set(IOPRIO_WHO_PGRP, 0, " + "IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 8191)) = %s\n", + sprintrc(rc)); + + rc = syscall(__NR_ioprio_set, bogus_which, bogus_who, bogus_ioprio); + printf("ioprio_set(%#x /* IOPRIO_WHO_??? */, %d, %s) = %s\n", + (int) bogus_which, (int) bogus_who, bogus_ioprio_str, + sprintrc(rc)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ioprio_get && __NR_ioprio_set"); + +#endif diff --git a/tests-m32/ioprio.test b/tests-m32/ioprio.test new file mode 100755 index 000000000..e79310b3a --- /dev/null +++ b/tests-m32/ioprio.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check iprio_get and iprio_set syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 -e trace=ioprio_get,ioprio_set diff --git a/tests-m32/ip_mreq.c b/tests-m32/ip_mreq.c new file mode 100644 index 000000000..fa0c504b4 --- /dev/null +++ b/tests-m32/ip_mreq.c @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined IP_ADD_MEMBERSHIP && defined IPV6_ADD_MEMBERSHIP \ + && defined IPV6_JOIN_ANYCAST && defined HAVE_IF_INDEXTONAME + +# include +# include +# include +# include +# include + +int +main(void) +{ + static const char multi4addr[] = "224.0.0.3"; + static const char multi6addr[] = "ff01::c"; + static const char interface[] = "127.0.0.1"; + + struct ip_mreq *const m4 = tail_alloc(sizeof(*m4)); + struct ipv6_mreq *const m6 = tail_alloc(sizeof(*m6)); + unsigned int i; + int rc; + + inet_pton(AF_INET, multi4addr, &m4->imr_multiaddr); + inet_pton(AF_INET, interface, &m4->imr_interface); + inet_pton(AF_INET6, multi6addr, &m6->ipv6mr_multiaddr); + + m6->ipv6mr_interface = if_nametoindex("lo"); + if (!m6->ipv6mr_interface) + perror_msg_and_skip("lo"); + + (void) close(0); + if (socket(AF_INET, SOCK_DGRAM, 0)) + perror_msg_and_skip("socket"); + + struct { + int level; + const char *str_level; + int optname; + const char *str_optname; + void *optval; + unsigned int optsize; + } short_any[] = { + { + ARG_STR(SOL_IP), ARG_STR(IP_ADD_MEMBERSHIP), + m4, sizeof(*m4) + }, + { + ARG_STR(SOL_IP), ARG_STR(IP_DROP_MEMBERSHIP), + m4, sizeof(*m4) + }, + { + ARG_STR(SOL_IPV6), ARG_STR(IPV6_ADD_MEMBERSHIP), + m6, sizeof(*m6) + }, + { + ARG_STR(SOL_IPV6), ARG_STR(IPV6_DROP_MEMBERSHIP), + m6, sizeof(*m6) + }, + { + ARG_STR(SOL_IPV6), ARG_STR(IPV6_JOIN_ANYCAST), + m6, sizeof(*m6) + }, + { + ARG_STR(SOL_IPV6), ARG_STR(IPV6_LEAVE_ANYCAST), + m6, sizeof(*m6) + } + }; + + for (i = 0; i < ARRAY_SIZE(short_any); ++i) { + rc = setsockopt(0, short_any[i].level, short_any[i].optname, + short_any[i].optval, 1); + printf("setsockopt(0, %s, %s, \"\\%hho\", 1) = %s\n", + short_any[i].str_level, short_any[i].str_optname, + * (unsigned char *) short_any[i].optval, + sprintrc(rc)); + + rc = setsockopt(0, short_any[i].level, short_any[i].optname, + short_any[i].optval + 1, short_any[i].optsize); + printf("setsockopt(0, %s, %s, %p, %u) = %s\n", + short_any[i].str_level, short_any[i].str_optname, + short_any[i].optval + 1, short_any[i].optsize, + sprintrc(rc)); + } + + struct { + int optname; + const char *str_optname; + } long_ip[] = { + { ARG_STR(IP_ADD_MEMBERSHIP) }, + { ARG_STR(IP_DROP_MEMBERSHIP) } + }, long_ipv6[] = { + { ARG_STR(IPV6_ADD_MEMBERSHIP) }, + { ARG_STR(IPV6_DROP_MEMBERSHIP) }, + { ARG_STR(IPV6_JOIN_ANYCAST) }, + { ARG_STR(IPV6_LEAVE_ANYCAST) } + }; + + for (i = 0; i < ARRAY_SIZE(long_ip); ++i) { + rc = setsockopt(0, SOL_IP, long_ip[i].optname, + m4, sizeof(*m4)); + printf("setsockopt(0, SOL_IP, %s" + ", {imr_multiaddr=inet_addr(\"%s\")" + ", imr_interface=inet_addr(\"%s\")}, %u) = %s\n", + long_ip[i].str_optname, multi4addr, + interface, (unsigned) sizeof(*m4), sprintrc(rc)); + } + + for (i = 0; i < ARRAY_SIZE(long_ipv6); ++i) { + rc = setsockopt(0, SOL_IPV6, long_ipv6[i].optname, + m6, sizeof(*m6)); + printf("setsockopt(0, SOL_IPV6, %s" + ", {ipv6mr_multiaddr=inet_pton(\"%s\")" + ", ipv6mr_interface=if_nametoindex(\"lo\")}" + ", %u) = %s\n", + long_ipv6[i].str_optname, multi6addr, + (unsigned) sizeof(*m6), sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("IP_ADD_MEMBERSHIP && IPV6_ADD_MEMBERSHIP" + " && IPV6_JOIN_ANYCAST && HAVE_IF_INDEXTONAME") + +#endif diff --git a/tests-m32/ip_mreq.test b/tests-m32/ip_mreq.test new file mode 100755 index 000000000..d0a9e0f1b --- /dev/null +++ b/tests-m32/ip_mreq.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check {IP,IPV6}_{ADD,DROP}_MEMBERSHIP setsockopt decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=setsockopt diff --git a/tests-m32/ipc.c b/tests-m32/ipc.c new file mode 100644 index 000000000..c64d3716a --- /dev/null +++ b/tests-m32/ipc.c @@ -0,0 +1,122 @@ +/* + * Check decoding of ipc syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_ipc && defined HAVE_LINUX_IPC_H + +# include +# include +# include +# include + +# ifndef SEMCTL +# define SEMCTL 3 +# endif +# ifndef MSGRCV +# define MSGRCV 12 +# endif + +static int +ipc_call(const unsigned short version, const unsigned short call, + long a1, long a2, long a3, long a4, long a5) +{ + const unsigned long val = + (unsigned long) 0xfacefeed00000000ULL | + (unsigned int) version << 16 | + call; + + return syscall(__NR_ipc, val, a1, a2, a3, a4, a5); +} + +static int +ipc_call0(const unsigned short version, const unsigned short call) +{ + int rc = ipc_call(version, call, 0, 0, 0, 0, 0); + int saved_errno = errno; + printf("ipc("); + if (version) + printf("%hu<<16|", version); + errno = saved_errno; + printf("%hu, 0, 0, 0, 0%s) = %d %s (%m)\n", call, +# ifdef __s390__ + "", +# else + ", 0", +# endif + rc, errno2name()); + return rc; +} + +int +main(void) +{ + void *const efault = tail_alloc(1) + 1; + + int rc = ipc_call(0, SEMCTL, 0, 0, 0, (long) efault, 0); + if (rc != -1 || EFAULT != errno) + perror_msg_and_skip("ipc"); + printf("semctl(0, 0, IPC_RMID, %p) = -1 EFAULT (%m)\n", efault); + + unsigned short call; + for (call = 0; call <= 40; call += 10) { + ipc_call0(0, call); + ipc_call0(42, call); + } + + rc = ipc_call(42, SEMCTL, 0, 0, 0, (long) efault, 0); + int test_version = EFAULT == errno; + if (test_version) + printf("semctl(0, 0, IPC_RMID, %p) = %d %s (%m)\n", + efault, rc, errno2name()); + else + printf("ipc(42<<16|SEMCTL, 0, 0, 0, %p) = %d %s (%m)\n", + efault, rc, errno2name()); + + if (test_version) { + const int msqid = -2; + const long msgsz = -3; + const long msgtyp = 0; + + rc = ipc_call(1, MSGRCV, + msqid, msgsz, IPC_NOWAIT, (long) efault, msgtyp); + printf("msgrcv(%d, %p, %lu, %ld, IPC_NOWAIT) = %d %s (%m)\n", + msqid, efault, msgsz, msgtyp, rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ipc && HAVE_LINUX_IPC_H") + +#endif diff --git a/tests-m32/ipc.sh b/tests-m32/ipc.sh new file mode 100644 index 000000000..752d4bb21 --- /dev/null +++ b/tests-m32/ipc.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check decoding of ipc syscalls + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -eipc $args > "$OUT" +match_grep "$LOG" "$OUT" + +rm -f "$OUT" + +exit 0 diff --git a/tests-m32/ipc.test b/tests-m32/ipc.test new file mode 100755 index 000000000..aa33fa61c --- /dev/null +++ b/tests-m32/ipc.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of ipc syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff --git a/tests-m32/ipc_msg.c b/tests-m32/ipc_msg.c new file mode 100644 index 000000000..b49384398 --- /dev/null +++ b/tests-m32/ipc_msg.c @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +#include "xlat.h" +#include "xlat/resource_flags.h" + +/* + * Before glibc-2.22-122-gbe48165, ppc64 code tried to retrieve data + * provided in third argument of msgctl call (in case of IPC_SET cmd) + * which led to segmentation fault. + */ +#undef TEST_MSGCTL_BOGUS_ADDR +#if defined __GLIBC__ && defined POWERPC64 +# if !(defined __GLIBC_MINOR__) \ + || ((__GLIBC__ << 16) + __GLIBC_MINOR__ < (2 << 16) + 23) +# define TEST_MSGCTL_BOGUS_ADDR 0 +# endif +#endif /* __GLIBC__ && POWERPC64 */ + +#ifndef TEST_MSGCTL_BOGUS_ADDR +# define TEST_MSGCTL_BOGUS_ADDR 1 +#endif + +static int id = -1; + +static void +cleanup(void) +{ + msgctl(id, IPC_RMID, NULL); + printf("msgctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); + id = -1; +} + +int +main(void) +{ + static const key_t private_key = + (key_t) (0xffffffff00000000ULL | IPC_PRIVATE); + static const key_t bogus_key = (key_t) 0xeca86420fdb97531ULL; + static const int bogus_msgid = 0xfdb97531; + static const int bogus_cmd = 0xdeadbeef; +#if TEST_MSGCTL_BOGUS_ADDR + static void * const bogus_addr = (void *) -1L; +#endif + static const int bogus_flags = 0xface1e55 & ~IPC_CREAT; + + int rc; + struct msqid_ds ds; + + rc = msgget(bogus_key, bogus_flags); + printf("msgget\\(%#llx, %s%s%s%#x\\|%#04o\\) += %s\n", + zero_extend_signed_to_ull(bogus_key), + IPC_CREAT & bogus_flags ? "IPC_CREAT\\|" : "", + IPC_EXCL & bogus_flags ? "IPC_EXCL\\|" : "", + IPC_NOWAIT & bogus_flags ? "IPC_NOWAIT\\|" : "", + bogus_flags & ~(0777 | IPC_CREAT | IPC_EXCL | IPC_NOWAIT), + bogus_flags & 0777, sprintrc_grep(rc)); + + id = msgget(private_key, 0600); + if (id < 0) + perror_msg_and_skip("msgget"); + printf("msgget\\(IPC_PRIVATE, 0600\\) += %d\n", id); + atexit(cleanup); + + rc = msgctl(bogus_msgid, bogus_cmd, NULL); + printf("msgctl\\(%d, (IPC_64\\|)?%#x /\\* MSG_\\?\\?\\? \\*/, NULL\\)" + " += %s\n", bogus_msgid, bogus_cmd, sprintrc_grep(rc)); + +#if TEST_MSGCTL_BOGUS_ADDR + rc = msgctl(bogus_msgid, IPC_SET, bogus_addr); + printf("msgctl\\(%d, (IPC_64\\|)?IPC_SET, %p\\) += %s\n", + bogus_msgid, bogus_addr, sprintrc_grep(rc)); +#endif + + if (msgctl(id, IPC_STAT, &ds)) + perror_msg_and_skip("msgctl IPC_STAT"); + printf("msgctl\\(%d, (IPC_64\\|)?IPC_STAT, \\{msg_perm=\\{uid=%u" + ", gid=%u, mode=%#o, key=%u, cuid=%u, cgid=%u\\}, msg_stime=%u" + ", msg_rtime=%u, msg_ctime=%u, msg_qnum=%u, msg_qbytes=%u" + ", msg_lspid=%u, msg_lrpid=%u\\}\\) += 0\n", + id, (unsigned) ds.msg_perm.uid, (unsigned) ds.msg_perm.gid, + (unsigned) ds.msg_perm.mode, (unsigned) ds.msg_perm.__key, + (unsigned) ds.msg_perm.cuid, (unsigned) ds.msg_perm.cgid, + (unsigned) ds.msg_stime, (unsigned) ds.msg_rtime, + (unsigned) ds.msg_ctime, (unsigned) ds.msg_qnum, + (unsigned) ds.msg_qbytes, (unsigned) ds.msg_lspid, + (unsigned) ds.msg_lrpid); + + if (msgctl(id, IPC_SET, &ds)) + perror_msg_and_skip("msgctl IPC_SET"); + printf("msgctl\\(%d, (IPC_64\\|)?IPC_SET, \\{msg_perm=\\{uid=%u" + ", gid=%u, mode=%#o\\}, ...\\}\\) += 0\n", + id, (unsigned) ds.msg_perm.uid, (unsigned) ds.msg_perm.gid, + (unsigned) ds.msg_perm.mode); + + rc = msgctl(0, MSG_INFO, &ds); + printf("msgctl\\(0, (IPC_64\\|)?MSG_INFO, %p\\) += %s\n", + &ds, sprintrc_grep(rc)); + + rc = msgctl(id, MSG_STAT, &ds); + printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += %s\n", + id, &ds, sprintrc_grep(rc)); + + return 0; +} diff --git a/tests-m32/ipc_msg.test b/tests-m32/ipc_msg.test new file mode 100755 index 000000000..177495b0d --- /dev/null +++ b/tests-m32/ipc_msg.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of ipc msgget/msgctl syscalls + +. "${srcdir=.}/ipc.sh" diff --git a/tests-m32/ipc_msgbuf.c b/tests-m32/ipc_msgbuf.c new file mode 100644 index 000000000..1c34494d8 --- /dev/null +++ b/tests-m32/ipc_msgbuf.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +#define text_string "STRACE_STRING" +#define msgsz sizeof(text_string) + +static int msqid = -1; + +static void +cleanup(void) +{ + msgctl(msqid, IPC_RMID, 0); + msqid = -1; +} + +int +main (void) +{ + const long mtype = 0xdefaced; + struct { + kernel_long_t mtype; + char mtext[msgsz]; + } msg = { + .mtype = mtype, + .mtext = text_string + }; + msqid = msgget(IPC_PRIVATE, IPC_CREAT | S_IRWXU); + if (msqid == -1) + perror_msg_and_skip("msgget"); + atexit(cleanup); + if (msgsnd(msqid, &msg, msgsz, 0) == -1) + perror_msg_and_skip("msgsnd"); + if (msgrcv(msqid, &msg, msgsz, mtype, 0) != msgsz) + perror_msg_and_skip("msgrcv"); + return 0; +} diff --git a/tests-m32/ipc_msgbuf.expected b/tests-m32/ipc_msgbuf.expected new file mode 100644 index 000000000..880424bf1 --- /dev/null +++ b/tests-m32/ipc_msgbuf.expected @@ -0,0 +1,4 @@ +msgget\(IPC_PRIVATE, IPC_CREAT\|0700\) += [0-9]* +msgsnd\([0-9]*, \{233811181, "STRACE_STRING\\0"\}, 14, 0\) += 0 +msgrcv\([0-9]*, \{233811181, "STRACE_STRING\\0"\}, 14, 233811181, 0\) += 14 +msgctl\([0-9]*, (IPC_64\|)?IPC_RMID, NULL\) += 0 diff --git a/tests-m32/ipc_msgbuf.test b/tests-m32/ipc_msgbuf.test new file mode 100755 index 000000000..d0b65d1a3 --- /dev/null +++ b/tests-m32/ipc_msgbuf.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check msgget, msgsnd, msgrcv, msgctl syscalls decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -v -e msgget,msgsnd,msgrcv,msgctl $args +match_grep + +exit 0 diff --git a/tests-m32/ipc_sem.c b/tests-m32/ipc_sem.c new file mode 100644 index 000000000..8f6382ccb --- /dev/null +++ b/tests-m32/ipc_sem.c @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2015 Andreas Schwab + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +#include "xlat.h" +#include "xlat/resource_flags.h" + +union semun { + int val; /* Value for SETVAL */ + struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */ + unsigned short *array; /* Array for GETALL, SETALL */ + struct seminfo *__buf; /* Buffer for IPC_INFO + (Linux-specific) */ +}; + +static int id = -1; + +static void +cleanup(void) +{ + semctl(id, 0, IPC_RMID, 0); + printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_RMID, \\[?NULL\\]?\\) += 0\n", + id); + id = -1; +} + +int +main(void) +{ + static const key_t private_key = + (key_t) (0xffffffff00000000ULL | IPC_PRIVATE); + static const key_t bogus_key = (key_t) 0xeca86420fdb97531ULL; + static const int bogus_semid = 0xfdb97531; + static const int bogus_semnum = 0xeca86420; + static const int bogus_size = 0xdec0ded1; + static const int bogus_flags = 0xface1e55; + static const int bogus_cmd = 0xdeadbeef; + static const unsigned long bogus_arg = + (unsigned long) 0xbadc0dedfffffaceULL; + + int rc; + union semun un; + struct semid_ds ds; + struct seminfo info; + + rc = semget(bogus_key, bogus_size, bogus_flags); + printf("semget\\(%#llx, %d, %s%s%s%#x\\|%#04o\\) += %s\n", + zero_extend_signed_to_ull(bogus_key), bogus_size, + IPC_CREAT & bogus_flags ? "IPC_CREAT\\|" : "", + IPC_EXCL & bogus_flags ? "IPC_EXCL\\|" : "", + IPC_NOWAIT & bogus_flags ? "IPC_NOWAIT\\|" : "", + bogus_flags & ~(0777 | IPC_CREAT | IPC_EXCL | IPC_NOWAIT), + bogus_flags & 0777, sprintrc_grep(rc)); + + id = semget(private_key, 1, 0600); + if (id < 0) + perror_msg_and_skip("semget"); + printf("semget\\(IPC_PRIVATE, 1, 0600\\) += %d\n", id); + atexit(cleanup); + + rc = semctl(bogus_semid, bogus_semnum, bogus_cmd, bogus_arg); +#define SEMCTL_BOGUS_ARG_FMT "(%#lx|\\[(%#lx|NULL)\\]|NULL)" + printf("semctl\\(%d, %d, (IPC_64\\|)?%#x /\\* SEM_\\?\\?\\? \\*/" + ", " SEMCTL_BOGUS_ARG_FMT "\\) += %s\n", + bogus_semid, bogus_semnum, bogus_cmd, + bogus_arg, bogus_arg, sprintrc_grep(rc)); + + un.buf = &ds; + if (semctl(id, 0, IPC_STAT, un)) + perror_msg_and_skip("semctl IPC_STAT"); + printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_STAT, \\[?%p\\]?\\) += 0\n", + id, &ds); + + un.__buf = &info; + rc = semctl(0, 0, SEM_INFO, un); + printf("semctl\\(0, 0, (IPC_64\\|)?SEM_INFO, \\[?%p\\]?\\) += %s\n", + &info, sprintrc_grep(rc)); + + un.buf = &ds; + rc = semctl(id, 0, SEM_STAT, un); + printf("semctl\\(%d, 0, (IPC_64\\|)?SEM_STAT, \\[?%p\\]?\\) += %s\n", + id, &ds, sprintrc_grep(rc)); + + return 0; +} diff --git a/tests-m32/ipc_sem.test b/tests-m32/ipc_sem.test new file mode 100755 index 000000000..cc93d07bd --- /dev/null +++ b/tests-m32/ipc_sem.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of ipc semget/semctl syscalls + +. "${srcdir=.}/ipc.sh" diff --git a/tests-m32/ipc_shm.c b/tests-m32/ipc_shm.c new file mode 100644 index 000000000..66960ff9f --- /dev/null +++ b/tests-m32/ipc_shm.c @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +#include "xlat.h" +#include "xlat/shm_resource_flags.h" + +static int id = -1; + +static void +cleanup(void) +{ + shmctl(id, IPC_RMID, NULL); + printf("shmctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); + id = -1; +} + +int +main(void) +{ + static const key_t private_key = + (key_t) (0xffffffff00000000ULL | IPC_PRIVATE); + static const key_t bogus_key = (key_t) 0xeca86420fdb97531ULL; + static const int bogus_id = 0xdefaced1; + static const int bogus_cmd = 0xdefaced2; + static void * const bogus_addr = (void *) -1L; + static const size_t bogus_size = + /* + * musl sets size to SIZE_MAX if size argument is greater than + * PTRDIFF_MAX - musl/src/ipc/shmget.c + */ + #ifdef __GLIBC__ + (size_t) 0xdec0ded1dec0ded2ULL; + #else + (size_t) 0x1e55c0de5dec0dedULL; + #endif + static const int bogus_flags = 0xface1e55; + + int rc; + struct shmid_ds ds; + + rc = shmget(bogus_key, bogus_size, bogus_flags); + printf("shmget\\(%#llx, %zu, %s%s%s%#x\\|%#04o\\) += %s\n", + zero_extend_signed_to_ull(bogus_key), bogus_size, + IPC_CREAT & bogus_flags ? "IPC_CREAT\\|" : "", + IPC_EXCL & bogus_flags ? "IPC_EXCL\\|" : "", + SHM_HUGETLB & bogus_flags ? "SHM_HUGETLB\\|" : "", + bogus_flags & ~(0777 | IPC_CREAT | IPC_EXCL | SHM_HUGETLB), + bogus_flags & 0777, sprintrc_grep(rc)); + + id = shmget(private_key, 1, 0600); + if (id < 0) + perror_msg_and_skip("shmget"); + printf("shmget\\(IPC_PRIVATE, 1, 0600\\) += %d\n", id); + atexit(cleanup); + + rc = shmctl(bogus_id, bogus_cmd, NULL); + printf("shmctl\\(%d, (IPC_64\\|)?%#x /\\* SHM_\\?\\?\\? \\*/, NULL\\)" + " += %s\n", bogus_id, bogus_cmd, sprintrc_grep(rc)); + + rc = shmctl(bogus_id, IPC_STAT, bogus_addr); + printf("shmctl\\(%d, (IPC_64\\|)?IPC_STAT, %p\\) += %s\n", + bogus_id, bogus_addr, sprintrc_grep(rc)); + + if (shmctl(id, IPC_STAT, &ds)) + perror_msg_and_skip("shmctl IPC_STAT"); + printf("shmctl\\(%d, (IPC_64\\|)?IPC_STAT, \\{shm_perm=\\{uid=%u, gid=%u, " + "mode=%#o, key=%u, cuid=%u, cgid=%u\\}, shm_segsz=%u, shm_cpid=%u, " + "shm_lpid=%u, shm_nattch=%u, shm_atime=%u, shm_dtime=%u, " + "shm_ctime=%u\\}\\) += 0\n", + id, (unsigned) ds.shm_perm.uid, (unsigned) ds.shm_perm.gid, + (unsigned) ds.shm_perm.mode, (unsigned) ds.shm_perm.__key, + (unsigned) ds.shm_perm.cuid, (unsigned) ds.shm_perm.cgid, + (unsigned) ds.shm_segsz, (unsigned) ds.shm_cpid, + (unsigned) ds.shm_lpid, (unsigned) ds.shm_nattch, + (unsigned) ds.shm_atime, (unsigned) ds.shm_dtime, + (unsigned) ds. shm_ctime); + + if (shmctl(id, IPC_SET, &ds)) + perror_msg_and_skip("shmctl IPC_SET"); + printf("shmctl\\(%d, (IPC_64\\|)?IPC_SET, \\{shm_perm=\\{uid=%u, gid=%u" + ", mode=%#o\\}, ...\\}\\) += 0\n", + id, (unsigned) ds.shm_perm.uid, (unsigned) ds.shm_perm.gid, + (unsigned) ds.shm_perm.mode); + + rc = shmctl(0, SHM_INFO, &ds); + printf("shmctl\\(0, (IPC_64\\|)?SHM_INFO, %p\\) += %s\n", + &ds, sprintrc_grep(rc)); + + rc = shmctl(id, SHM_STAT, &ds); + printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += %s\n", + id, &ds, sprintrc_grep(rc)); + + return 0; +} diff --git a/tests-m32/ipc_shm.test b/tests-m32/ipc_shm.test new file mode 100755 index 000000000..a67ea291f --- /dev/null +++ b/tests-m32/ipc_shm.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of ipc shmget/shmctl syscalls + +. "${srcdir=.}/ipc.sh" diff --git a/tests-m32/kcmp.c b/tests-m32/kcmp.c new file mode 100644 index 000000000..cb497c9f2 --- /dev/null +++ b/tests-m32/kcmp.c @@ -0,0 +1,103 @@ +/* + * Check decoding of kcmp syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include "scno.h" + +#ifdef __NR_kcmp + +# include +# include + +# define KCMP_FILE 0 +# define KCMP_SYSVSEM 6 + +static void +do_kcmp(kernel_ulong_t pid1, kernel_ulong_t pid2, kernel_ulong_t type, + const char *type_str, kernel_ulong_t idx1, kernel_ulong_t idx2) +{ + long rc; + const char *errstr; + + rc = syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2); + errstr = sprintrc(rc); + + printf("kcmp(%d, %d, ", (int) pid1, (int) pid2); + + if (type_str) + printf("%s", type_str); + else + printf("%#x /* KCMP_??? */", (int) type); + + if (type == KCMP_FILE) + printf(", %u, %u", (unsigned) idx1, (unsigned) idx2); + else if (type > KCMP_SYSVSEM) + printf(", %#llx, %#llx", + (unsigned long long) idx1, (unsigned long long) idx2); + + printf(") = %s\n", errstr); +} + +int +main(void) +{ + static const kernel_ulong_t bogus_pid1 = + (kernel_ulong_t) 0xdeadca75face1057ULL; + static const kernel_ulong_t bogus_pid2 = + (kernel_ulong_t) 0xdefaced1defaced2ULL; + static const kernel_ulong_t bogus_type = + (kernel_ulong_t) 0xbadc0dedda7adeadULL; + static const kernel_ulong_t bogus_idx1 = + (kernel_ulong_t) 0xdec0ded3dec0ded4ULL; + static const kernel_ulong_t bogus_idx2 = + (kernel_ulong_t) 0xba5e1e55deadc0deULL; + + /* Invalid values */ + do_kcmp(bogus_pid1, bogus_pid2, bogus_type, NULL, bogus_idx1, + bogus_idx2); + do_kcmp(0, 0, KCMP_SYSVSEM + 1, NULL, 0, 0); + + /* KCMP_FILE is the only type which has additional args */ + do_kcmp(3141592653U, 2718281828U, ARG_STR(KCMP_FILE), bogus_idx1, + bogus_idx2); + /* Some type without additional args */ + do_kcmp(-1, -1, ARG_STR(KCMP_SYSVSEM), bogus_idx1, bogus_idx2); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kcmp"); + +#endif diff --git a/tests-m32/kcmp.test b/tests-m32/kcmp.test new file mode 100755 index 000000000..d022aeba0 --- /dev/null +++ b/tests-m32/kcmp.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kcmp syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-m32/kexec_file_load.c b/tests-m32/kexec_file_load.c new file mode 100644 index 000000000..be90a37d8 --- /dev/null +++ b/tests-m32/kexec_file_load.c @@ -0,0 +1,127 @@ +/* + * Check decoding of kexec_file_load syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_kexec_file_load + +# include +# include +# include + +struct strval { + kernel_ulong_t val; + const char *str64; + const char *str32; + const char *str; +}; + +#define CMDLINE_STR "deadcodebaddatadefaced"; + +int +main(void) +{ + static const kernel_ulong_t bogus_kernel_fd = + (kernel_ulong_t) 0xdeadca57badda7a1ULL; + static const kernel_ulong_t bogus_initrd_fd = + (kernel_ulong_t) 0xdec0ded1defaced2ULL; + static const char cmdline_str[] = CMDLINE_STR; + static const char cmdline_short_str[] = "abcdef"; + + static const kernel_ulong_t cmdline_lens[] = { + 0, + (kernel_ulong_t) 0xcaffeeeddeadbeefULL, + sizeof(cmdline_str), + sizeof(cmdline_str) - 1, + sizeof(cmdline_short_str), + sizeof(cmdline_short_str) - 1, + sizeof(cmdline_short_str) + 1, + }; + static const struct strval flags[] = { + { (kernel_ulong_t) 0xbadc0dedda7a1058ULL, + "0xbadc0ded", "0x", + "da7a1058 /* KEXEC_FILE_??? */" }, + { 0, "", "", "0" }, + { 0xdeadbeef, "", "", "KEXEC_FILE_UNLOAD|KEXEC_FILE_ON_CRASH|" + "KEXEC_FILE_NO_INITRAMFS|0xdeadbee8" }, + }; + + + long rc; + char *cmdline = tail_memdup(cmdline_str, sizeof(cmdline_str)); + char *cmdline_short = + tail_memdup(cmdline_short_str, sizeof(cmdline_short_str)); + char cmdline_ptr[sizeof("0x") + sizeof(void *) * 2]; + char cmdline_short_ptr[sizeof("0x") + sizeof(void *) * 2]; + unsigned int i; + unsigned int j; + + struct strval cmdlines[] = { + { (uintptr_t) NULL, "", "", "NULL" }, + { (uintptr_t) (cmdline + sizeof(cmdline_str)), "", "", + cmdline_ptr }, + { (uintptr_t) cmdline, "", "", "\"deadcodeb\"..." }, + { (uintptr_t) cmdline, "", "", "\"deadcodeb\"..." }, + { (uintptr_t) cmdline_short, "", "", "\"abcdef\\0\"" }, + { (uintptr_t) cmdline_short, "", "", "\"abcdef\"" }, + { (uintptr_t) cmdline_short, "", "", cmdline_short_ptr }, + }; + + + snprintf(cmdline_ptr, sizeof(cmdline_ptr), "%p", + cmdline + sizeof(cmdline_str)); + snprintf(cmdline_short_ptr, sizeof(cmdline_short_ptr), "%p", + cmdline_short); + + for (i = 0; i < ARRAY_SIZE(flags); i++) { + for (j = 0; j < ARRAY_SIZE(cmdlines); j++) { + rc = syscall(__NR_kexec_file_load, bogus_kernel_fd, + bogus_initrd_fd, cmdline_lens[j], + cmdlines[j].val, flags[i].val); + printf("kexec_file_load(%d, %d, %llu, %s, %s%s) = %s\n", + (int) bogus_kernel_fd, (int) bogus_initrd_fd, + (unsigned long long) cmdline_lens[j], + cmdlines[j].str, + sizeof(kernel_ulong_t) == 8 ? flags[i].str64 : + flags[i].str32, flags[i].str, sprintrc(rc)); + } + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kexec_file_load"); + +#endif diff --git a/tests-m32/kexec_file_load.test b/tests-m32/kexec_file_load.test new file mode 100755 index 000000000..c95e12382 --- /dev/null +++ b/tests-m32/kexec_file_load.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kexec_file_load syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s9 diff --git a/tests-m32/kexec_load.c b/tests-m32/kexec_load.c new file mode 100644 index 000000000..330238de0 --- /dev/null +++ b/tests-m32/kexec_load.c @@ -0,0 +1,170 @@ +/* + * Check decoding of kexec_load syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_kexec_load + +# include +# include + +struct strval { + kernel_ulong_t val; + const char *str64; + const char *str32; + const char *str; +}; + +struct segm { + void *buf; + size_t bufsz; + void *mem; + size_t memsz; +}; + +int +main(void) +{ + enum { + NUM_SEGMS = 17, + NUM_SEGMS_UNCUT = 5, + NUM_SEGMS_UNCUT_MAX = 9, + NUM_SEGMS_CUT = 12, + SEGMS_ARRAY_SIZE = sizeof(struct segm) * NUM_SEGMS, + }; + + static const kernel_ulong_t bogus_zero = + sizeof(long) < sizeof(kernel_long_t) ? + (kernel_ulong_t) 0xffffffff00000000ULL : 0; + static const kernel_ulong_t bogus_entry = + (kernel_ulong_t) 0xdeadca57badda7a1ULL; + static const kernel_ulong_t bogus_nsegs = + (kernel_ulong_t) 0xdec0ded1defaced2ULL; + + static const struct strval flags[] = { + { (kernel_ulong_t) 0xbadc0dedda7a1054ULL, + "0xda7a0000 /* KEXEC_ARCH_??? */|0xbadc0ded0000", + "0xda7a0000 /* KEXEC_ARCH_??? */|0x", + "1054 /* KEXEC_??? */" }, + { 0, "", "", "KEXEC_ARCH_DEFAULT" }, + { 0x2a0003, "", "", + "KEXEC_ARCH_SH|KEXEC_ON_CRASH|KEXEC_PRESERVE_CONTEXT" }, + { 0xdead0000, "", "", "0xdead0000 /* KEXEC_ARCH_??? */" }, + }; + + const char *errstr; + long rc; + struct segm *segms = tail_alloc(SEGMS_ARRAY_SIZE); + unsigned int i; + + fill_memory(segms, SEGMS_ARRAY_SIZE); + segms[0].buf = segms[0].mem = NULL; + + rc = syscall(__NR_kexec_load, bogus_zero, bogus_zero, bogus_zero, + flags[0].val); + printf("kexec_load(NULL, 0, NULL, %s%s) = %s\n", + sizeof(long) == 8 ? flags[0].str64 : flags[0].str32, + flags[0].str, sprintrc(rc)); + + rc = syscall(__NR_kexec_load, bogus_entry, bogus_nsegs, + segms + SEGMS_ARRAY_SIZE, flags[1].val); + printf("kexec_load(%#lx, %lu, %p, %s) = %s\n", + (unsigned long) bogus_entry, (unsigned long) bogus_nsegs, + segms + SEGMS_ARRAY_SIZE, flags[1].str, sprintrc(rc)); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS, + segms, flags[2].val); + printf("kexec_load(%#lx, %lu, %p, %s) = %s\n", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS, + segms, flags[2].str, sprintrc(rc)); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS_CUT, + segms, flags[3].val); + errstr = sprintrc(rc); + printf("kexec_load(%#lx, %lu, [{buf=NULL, bufsz=%zu, mem=NULL, " + "memsz=%zu}, ", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS_CUT, + segms[0].bufsz, segms[0].memsz); + for (i = 1; i < NUM_SEGMS_UNCUT_MAX; i++) + printf("{buf=%p, bufsz=%zu, mem=%p, memsz=%zu}, ", + segms[i].buf, segms[i].bufsz, + segms[i].mem, segms[i].memsz); + printf("...], %s) = %s\n", flags[3].str, errstr); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS_CUT, + segms + (NUM_SEGMS - NUM_SEGMS_UNCUT_MAX), + flags[0].val); + errstr = sprintrc(rc); + printf("kexec_load(%#lx, %lu, [", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS_CUT); + for (i = NUM_SEGMS - NUM_SEGMS_UNCUT_MAX; i < NUM_SEGMS; i++) + printf("{buf=%p, bufsz=%zu, mem=%p, memsz=%zu}, ", + segms[i].buf, segms[i].bufsz, + segms[i].mem, segms[i].memsz); + printf("%p], %s%s) = %s\n", + segms + NUM_SEGMS, + sizeof(long) == 8 ? flags[0].str64 : flags[0].str32, + flags[0].str, errstr); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS_UNCUT, + segms + (NUM_SEGMS - NUM_SEGMS_UNCUT), + flags[1].val); + errstr = sprintrc(rc); + printf("kexec_load(%#lx, %lu, [", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS_UNCUT); + for (i = NUM_SEGMS - NUM_SEGMS_UNCUT; i < NUM_SEGMS; i++) + printf("{buf=%p, bufsz=%zu, mem=%p, memsz=%zu}%s", + segms[i].buf, segms[i].bufsz, + segms[i].mem, segms[i].memsz, + (i == NUM_SEGMS - 1) ? "" : ", "); + printf("], %s) = %s\n", flags[1].str, errstr); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS_CUT, + segms + 1, flags[2].val); + errstr = sprintrc(rc); + printf("kexec_load(%#lx, %lu, [", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS_CUT); + for (i = 1; i < NUM_SEGMS_UNCUT_MAX + 1; i++) + printf("{buf=%p, bufsz=%zu, mem=%p, memsz=%zu}, ", + segms[i].buf, segms[i].bufsz, + segms[i].mem, segms[i].memsz); + printf("...], %s) = %s\n", flags[2].str, errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kexec_load"); + +#endif diff --git a/tests-m32/kexec_load.test b/tests-m32/kexec_load.test new file mode 100755 index 000000000..4b1511e90 --- /dev/null +++ b/tests-m32/kexec_load.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kexec_load syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s9 diff --git a/tests-m32/keyctl.c b/tests-m32/keyctl.c new file mode 100644 index 000000000..2e26076b1 --- /dev/null +++ b/tests-m32/keyctl.c @@ -0,0 +1,820 @@ +/* + * Check decoding of keyctl syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_keyctl + +# include +# include + +# include +# include +# include +# include +# include +# include +# include +# include +# include + +/* This check should be before #include "xlat/keyctl_commands.h" */ +# ifndef KEYCTL_DH_COMPUTE +struct keyctl_dh_params { + int32_t private; + int32_t prime; + int32_t base; +}; +# endif + +# include "xlat.h" +# include "xlat/keyctl_commands.h" + +# ifndef KEY_SPEC_REQKEY_AUTH_KEY +# define KEY_SPEC_REQKEY_AUTH_KEY -7 +# endif + +# ifndef KEY_SPEC_REQUESTOR_KEYRING +# define KEY_SPEC_REQUESTOR_KEYRING -8 +# endif + +static const size_t limit = 10; + +/* + * Well, this is true for DESCRIBE and GET_SECURITY, and false for READ and + * DH_COMPUTE and I see no ability to pass this information without + * significantly breaking interface. + */ +bool nul_terminated_buf = true; +bool buf_in_arg = false; + +/* + * When this is called with positive size, the buffer provided is an "out" + * argument and rc contains resulting size (globally defined nul_terminated_buf + * controls whether it is nul-terminated or not). If size is negative, + * it contains "in" argument. + */ +void +print_quoted_string_limit(const char *str, size_t size, long rc) +{ + size_t print_size = ((rc >= 0) && (size > 0)) ? + ((unsigned long) rc > size ? size : + (unsigned long) rc) : size; + size_t limited_size = print_size > limit ? limit : print_size; + + if ((rc == -1) && !buf_in_arg) { + printf("%p", str); + return; + } + + if (!nul_terminated_buf || + (strnlen(str, limited_size) == limited_size)) { + printf("\""); + print_quoted_memory(str, limited_size); + if (print_size > limit) + printf("\"..."); + else + printf("\""); + } else { + printf("\""); + print_quoted_string(str); + printf("\""); + } +} + +static void +print_arg(kernel_ulong_t arg, const char *str, const char *fmt, size_t size, + long rc) +{ + if (size == (size_t) -1) + size = 0; + + if (str) { + printf("%s", str); + } else { + if (size == sizeof(uint64_t)) + printf(fmt, (uint64_t)arg); + else if (size == sizeof(uint32_t)) + printf(fmt, (uint32_t)arg); + else + print_quoted_string_limit((void *) (uintptr_t) arg, + size, rc); + } +} + +/* + * Arguments are passed as sz, val, str, fmt. Arguments are read until 4 + * arguments are retrieved or size of 0 is occurred. + * + * str == NULL && fmt == NULL && sz not in {4, 8} - print_quoted_string_limit is + * used for argument printing. If sz is negative, in argument is assumed, out + * otherwise. + */ +void +do_keyctl(kernel_ulong_t cmd, const char *cmd_str, ...) +{ + kernel_ulong_t args[4] = { + (kernel_ulong_t) 0xdeadfee1badc0de5ULL, + (kernel_ulong_t) 0xdeadfee2badc0de6ULL, + (kernel_ulong_t) 0xdeadfee3badc0de7ULL, + (kernel_ulong_t) 0xdeadfee4badc0de8ULL, + }; + const char *arg_str[4] = { NULL }; + const char *arg_fmt[4] = { "%llu", "%llu", "%llu", "%llu" }; + size_t arg_sz[4] = { + sizeof(kernel_ulong_t), + sizeof(kernel_ulong_t), + sizeof(kernel_ulong_t), + sizeof(kernel_ulong_t), + }; + unsigned i; + unsigned cnt = 0; + + va_list ap; + + va_start(ap, cmd_str); + + do { + arg_sz[cnt] = va_arg(ap, size_t); + if (!arg_sz[cnt]) + break; + + if (arg_sz[cnt] == sizeof(uint64_t)) + args[cnt] = va_arg(ap, uint64_t); + else if (arg_sz[cnt] == sizeof(uint32_t)) + args[cnt] = va_arg(ap, uint32_t); + else + args[cnt] = (uintptr_t) va_arg(ap, void *); + + arg_str[cnt] = va_arg(ap, char *); + arg_fmt[cnt] = va_arg(ap, char *); + } while (++cnt < 4); + + long rc = syscall(__NR_keyctl, cmd, args[0], args[1], args[2], args[3]); + const char *errstr = sprintrc(rc); + printf("keyctl(%s", cmd_str); + for (i = 0; i < cnt; i++) { + printf(", "); + print_arg(args[i], arg_str[i], arg_fmt[i], arg_sz[i], rc); + } + printf(") = %s\n", errstr); +} + +int +main(void) +{ + enum { PR_LIMIT = 10, IOV_SIZE = 11, IOV_STR_SIZE = 4096 }; + + static const char *kulong_fmt = + sizeof(kernel_ulong_t) == sizeof(uint64_t) ? "%#llx" : "%#x"; + static const char *ksize_fmt = + sizeof(kernel_ulong_t) == sizeof(uint64_t) ? "%llu" : "%u"; + static const char *ptr_fmt = + sizeof(void *) == sizeof(uint64_t) ? "%#llx" : "%#x"; + static const char unterminated1[] = { '\1', '\2', '\3', '\4', '\5' }; + static const char unterminated2[] = { '\6', '\7', '\10', '\11', '\12' }; + static const char short_type_str[] = "shrt type"; + static const char short_desc_str[] = "shrt desc"; + static const char long_type_str[] = "overly long key type"; + static const char long_desc_str[] = "overly long key description"; + static const int32_t bogus_key1 = 0xdeadf00d; + static const int32_t bogus_key2 = 0x1eefdead; + static const kernel_ulong_t bogus_key3 = + (kernel_ulong_t) 0xdec0ded1dec0ded2ULL; + static const char *bogus_key3_str = "-557785390"; + + static const struct keyctl_dh_params kcdhp_data = { + KEY_SPEC_GROUP_KEYRING, 1234567890, 3141592653U }; + static const char *kcdhp_str = "{private=KEY_SPEC_GROUP_KEYRING, " + "prime=1234567890, base=-1153374643}"; + + char *bogus_str = tail_memdup(unterminated1, sizeof(unterminated1)); + char *bogus_desc = tail_memdup(unterminated2, sizeof(unterminated2)); + char *short_type = tail_memdup(short_type_str, sizeof(short_type_str)); + char *short_desc = tail_memdup(short_desc_str, sizeof(short_desc_str)); + char *long_type = tail_memdup(long_type_str, sizeof(long_type_str)); + char *long_desc = tail_memdup(long_desc_str, sizeof(long_desc_str)); + char *kcdhp = tail_memdup(&kcdhp_data, sizeof(kcdhp_data)); + struct iovec *key_iov = tail_alloc(sizeof(*key_iov) * IOV_SIZE); + char *bogus_buf1 = tail_alloc(9); + char *bogus_buf2 = tail_alloc(256); + char *key_iov_str1; + char *key_iov_str2 = tail_alloc(4096); + ssize_t ret; + ssize_t kis_size = 0; + int i; + + key_iov[0].iov_base = short_type; + key_iov[0].iov_len = sizeof(short_type_str); + key_iov[1].iov_base = long_type; + key_iov[1].iov_len = sizeof(long_type_str); + key_iov[2].iov_base = short_desc; + key_iov[2].iov_len = sizeof(short_desc_str); + key_iov[3].iov_base = long_desc; + key_iov[3].iov_len = sizeof(long_desc_str); + key_iov[4].iov_base = bogus_str; + key_iov[4].iov_len = 32; + + for (i = 5; i < IOV_SIZE; i++) { + key_iov[i].iov_base = + (void *) (uintptr_t) (0xfffffacefffff00dULL + + 0x100000001ULL * i); + key_iov[i].iov_len = (size_t) (0xcaffeeeddefaced7ULL + + 0x100000001ULL * i); + } + + ret = asprintf(&key_iov_str1, "[{iov_base=%p, iov_len=%zu}, " + "{iov_base=%p, iov_len=%zu}, " + "{iov_base=%p, iov_len=%zu}, " + "{iov_base=%p, iov_len=%zu}]", + key_iov[IOV_SIZE - 4].iov_base, + key_iov[IOV_SIZE - 4].iov_len, + key_iov[IOV_SIZE - 3].iov_base, + key_iov[IOV_SIZE - 3].iov_len, + key_iov[IOV_SIZE - 2].iov_base, + key_iov[IOV_SIZE - 2].iov_len, + key_iov[IOV_SIZE - 1].iov_base, + key_iov[IOV_SIZE - 1].iov_len); + + if (ret < 0) + error_msg_and_fail("asprintf"); + + ret = snprintf(key_iov_str2, IOV_STR_SIZE, + "[{iov_base=\"%s\\0\", iov_len=%zu}, " + "{iov_base=\"%.10s\"..., iov_len=%zu}, " + "{iov_base=\"%s\\0\", iov_len=%zu}, " + "{iov_base=\"%.10s\"..., iov_len=%zu}, ", + (char *) key_iov[0].iov_base, key_iov[0].iov_len, + (char *) key_iov[1].iov_base, key_iov[1].iov_len, + (char *) key_iov[2].iov_base, key_iov[2].iov_len, + (char *) key_iov[3].iov_base, key_iov[3].iov_len); + + if ((ret < 0) || (ret >= IOV_STR_SIZE)) + error_msg_and_fail("snprintf"); + + for (i = 4; i < PR_LIMIT; i++) { + kis_size += ret; + + ret = snprintf(key_iov_str2 + kis_size, IOV_STR_SIZE - kis_size, + "{iov_base=%p, iov_len=%zu}, ", + key_iov[i].iov_base, key_iov[i].iov_len); + + if ((ret < 0) || (ret >= (IOV_STR_SIZE - kis_size))) + error_msg_and_fail("snprintf"); + } + + kis_size += ret; + snprintf(key_iov_str2 + kis_size, IOV_STR_SIZE - kis_size, "...]"); + + + /* Invalid command */ + do_keyctl((kernel_ulong_t) 0xbadc0dedfacefeedULL, + "0xfacefeed /* KEYCTL_??? */", + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfee1badc0de5ULL, NULL, kulong_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfee2badc0de6ULL, NULL, kulong_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfee3badc0de7ULL, NULL, kulong_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfee4badc0de8ULL, NULL, kulong_fmt); + + + /* GET_KEYRING_ID */ + do_keyctl(ARG_STR(KEYCTL_GET_KEYRING_ID), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xbadc0dedffffffffLLU, "-1", + NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_KEYRING_ID), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), "%d", + sizeof(int), 3141592653U, NULL, "%d", + NULL, 0UL); + + + /* KEYCTL_JOIN_SESSION_KEYRING */ + do_keyctl(ARG_STR(KEYCTL_JOIN_SESSION_KEYRING), + sizeof(char *), ARG_STR(NULL), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_JOIN_SESSION_KEYRING), + sizeof(char *), (char *) 0xfffffacefffffeedULL, NULL, ptr_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_JOIN_SESSION_KEYRING), + sizeof(char *), bogus_str, NULL, ptr_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_JOIN_SESSION_KEYRING), + sizeof(char *), ARG_STR("bogus name"), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_JOIN_SESSION_KEYRING), + sizeof(char *), "very long keyring name", "\"very long \"...", + NULL, 0UL); + + + /* KEYCTL_UPDATE */ + + buf_in_arg = true; + + do_keyctl(ARG_STR(KEYCTL_UPDATE), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(char *), ARG_STR(NULL), NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_UPDATE), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), (char *) 0xfffffacefffffeedULL, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfee4badc0de8ULL, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_UPDATE), + sizeof(int32_t), bogus_key2, NULL, "%d", + sizeof(char *), bogus_str, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfee4badc0de8ULL, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_UPDATE), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(short_desc_str), short_desc, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) sizeof(short_desc_str) - 1, NULL, + ksize_fmt, + 0UL); + + buf_in_arg = false; + + + /* KEYCTL_REVOKE */ + do_keyctl(ARG_STR(KEYCTL_REVOKE), + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_REVOKE), + sizeof(int32_t), bogus_key1, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_REVOKE), + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_REVOKE), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_CHOWN */ + do_keyctl(ARG_STR(KEYCTL_CHOWN), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(uid_t), ARG_STR(-1), NULL, + sizeof(gid_t), ARG_STR(-1), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_CHOWN), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(uid_t), 2718281828U, NULL, "%u", + sizeof(gid_t), 3141592653U, NULL, "%u", 0UL); + + + /* KEYCTL_SETPERM */ + do_keyctl(ARG_STR(KEYCTL_SETPERM), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQKEY_AUTH_KEY), NULL, + sizeof(uint32_t), 0xffffffffU, + "KEY_POS_VIEW|KEY_POS_READ|KEY_POS_WRITE|" + "KEY_POS_SEARCH|KEY_POS_LINK|KEY_POS_SETATTR|" + "KEY_USR_VIEW|KEY_USR_READ|KEY_USR_WRITE|" + "KEY_USR_SEARCH|KEY_USR_LINK|KEY_USR_SETATTR|" + "KEY_GRP_VIEW|KEY_GRP_READ|KEY_GRP_WRITE|" + "KEY_GRP_SEARCH|KEY_GRP_LINK|KEY_GRP_SETATTR|" + "KEY_OTH_VIEW|KEY_OTH_READ|KEY_OTH_WRITE|" + "KEY_OTH_SEARCH|KEY_OTH_LINK|KEY_OTH_SETATTR|" + "0xc0c0c0c0", NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_SETPERM), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(uint32_t), 0, NULL, "%#x", 0UL); + do_keyctl(ARG_STR(KEYCTL_SETPERM), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(uint32_t), 0xc0c0c0c0, "0xc0c0c0c0 /* KEY_??? */", + NULL, + 0UL); + + + /* KEYCTL_DESCRIBE */ + do_keyctl(ARG_STR(KEYCTL_DESCRIBE), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_DESCRIBE), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_DESCRIBE), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) 9, (uintptr_t) bogus_buf1, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 9, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_DESCRIBE), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) 256, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 256, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_DESCRIBE), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) -4, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) -4, NULL, ksize_fmt, 0UL); + + + /* KEYCTL_CLEAR */ + do_keyctl(ARG_STR(KEYCTL_CLEAR), + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_CLEAR), + sizeof(int32_t), bogus_key1, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_CLEAR), + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_CLEAR), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_LINK */ + do_keyctl(ARG_STR(KEYCTL_LINK), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_LINK), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_LINK), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_UNLINK */ + do_keyctl(ARG_STR(KEYCTL_UNLINK), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, + 0UL); + do_keyctl(ARG_STR(KEYCTL_UNLINK), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_UNLINK), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_SEARCH */ + buf_in_arg = true; + + do_keyctl(ARG_STR(KEYCTL_SEARCH), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(char *), ARG_STR(NULL), NULL, + sizeof(char *), ARG_STR(NULL), NULL, + sizeof(int32_t), 0, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_SEARCH), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), (char *) 0xfffffacefffffeedULL, NULL, ptr_fmt, + sizeof(char *), (char *) 0xfffff00dfffff157ULL, NULL, ptr_fmt, + sizeof(int32_t), ARG_STR(KEY_SPEC_USER_SESSION_KEYRING), + NULL); + do_keyctl(ARG_STR(KEYCTL_SEARCH), + sizeof(int32_t), bogus_key2, NULL, "%d", + sizeof(char *), bogus_str, NULL, ptr_fmt, + sizeof(char *), bogus_desc, NULL, ptr_fmt, + sizeof(int32_t), bogus_key1, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_SEARCH), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(short_type_str), short_type, NULL, NULL, + sizeof(short_desc_str), short_desc, NULL, NULL, + sizeof(int32_t), bogus_key2, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_SEARCH), + sizeof(int32_t), 0, NULL, "%d", + sizeof(long_type_str), long_type, NULL, NULL, + sizeof(long_type_str), long_desc, NULL, NULL, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL); + + buf_in_arg = false; + + + /* KEYCTL_READ */ + nul_terminated_buf = false; + + /* Empty result is expected for these */ + bogus_buf1[0] = '\377'; + bogus_buf2[0] = '\377'; + + do_keyctl(ARG_STR(KEYCTL_READ), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_READ), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_READ), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) 9, (uintptr_t) bogus_buf1, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 9, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_READ), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) 256, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 256, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_READ), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) -4, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) -4, NULL, ksize_fmt, 0UL); + + nul_terminated_buf = true; + + /* KEYCTL_INSTANTIATE */ + buf_in_arg = true; + + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE), + sizeof(int32_t), 0, NULL, "%d", + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + sizeof(int32_t), 0, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), (char *) 0xfffffacefffffeedULL, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfeedLLU, NULL, ksize_fmt, + sizeof(int32_t), bogus_key1, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE), + sizeof(int32_t), bogus_key2, NULL, "%d", + sizeof(char *), bogus_str, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 32LLU, NULL, ksize_fmt, + sizeof(int32_t), bogus_key2, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(short_type_str), short_desc, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) sizeof(short_type_str) - 1, NULL, + ksize_fmt, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE), + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, + sizeof(long_type_str), long_desc, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) sizeof(long_type_str), NULL, ksize_fmt, + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL); + + buf_in_arg = false; + + + /* KEYCTL_NEGATE */ + do_keyctl(ARG_STR(KEYCTL_NEGATE), + sizeof(int32_t), 0, NULL, "%d", + sizeof(uint32_t), 0, NULL, "%u", + sizeof(int32_t), 0, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_NEGATE), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(uint32_t), 3141592653U, NULL, "%u", + sizeof(int32_t), bogus_key1, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_NEGATE), + sizeof(int32_t), bogus_key2, NULL, "%d", + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, "3134983661", NULL, + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_NEGATE), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, "3134983661", NULL, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_SET_REQKEY_KEYRING */ + do_keyctl(ARG_STR(KEYCTL_SET_REQKEY_KEYRING), + sizeof(int32_t), ARG_STR(KEY_REQKEY_DEFL_NO_CHANGE), NULL, + 0UL); + /* + * Keep it commented out until proper way of faking syscalls is not + * implemented. + */ + /* do_keyctl(ARG_STR(KEYCTL_SET_REQKEY_KEYRING), + sizeof(int32_t), + ARG_STR(KEY_REQKEY_DEFL_REQUESTOR_KEYRING), NULL, 0UL); */ + do_keyctl(ARG_STR(KEYCTL_SET_REQKEY_KEYRING), + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, + "0xbadc0ded /* KEY_REQKEY_DEFL_??? */", NULL, 0UL); + + + /* KEYCTL_SET_TIMEOUT */ + do_keyctl(ARG_STR(KEYCTL_SET_TIMEOUT), + sizeof(int32_t), 0, NULL, "%d", + sizeof(uint32_t), 0, NULL, "%u", 0UL); + do_keyctl(ARG_STR(KEYCTL_SET_TIMEOUT), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(uint32_t), 3141592653U, NULL, "%u", 0UL); + do_keyctl(ARG_STR(KEYCTL_SET_TIMEOUT), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, "3134983661", NULL, + 0UL); + + + /* KEYCTL_ASSUME_AUTHORITY */ + do_keyctl(ARG_STR(KEYCTL_ASSUME_AUTHORITY), + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_ASSUME_AUTHORITY), + sizeof(int32_t), bogus_key1, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_ASSUME_AUTHORITY), + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_ASSUME_AUTHORITY), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_GET_SECURITY */ + do_keyctl(ARG_STR(KEYCTL_GET_SECURITY), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(uint32_t), 0xbadc0dedU, NULL, "%u", 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_SECURITY), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_SECURITY), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) 9, (uintptr_t) bogus_buf1, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 9, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_SECURITY), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) 256, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 256, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_SECURITY), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) -4, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) -4, NULL, ksize_fmt, 0UL); + + + /* KEYCTL_SESSION_TO_PARENT */ + do_keyctl(ARG_STR(KEYCTL_SESSION_TO_PARENT), 0UL); + + + /* KEYCTL_REJECT */ + do_keyctl(ARG_STR(KEYCTL_REJECT), + sizeof(int32_t), 0, NULL, "%d", + sizeof(uint32_t), 0, NULL, "%u", + sizeof(uint32_t), 0, NULL, "%u", + sizeof(int32_t), 0, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_REJECT), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(uint32_t), 3141592653U, NULL, "%u", + sizeof(uint32_t), 2718281828U, NULL, "%u", + sizeof(int32_t), bogus_key1, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_REJECT), + sizeof(int32_t), bogus_key2, NULL, "%d", + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadca75facef157LLU, "4207866199", NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, "3134983661", NULL, + sizeof(int32_t), bogus_key2, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_REJECT), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, "3134983661", NULL, + sizeof(uint32_t), ARG_STR(ENODEV), NULL, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL); + + + /* KEYCTL_INSTANTIATE_IOV */ + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE_IOV), + sizeof(int32_t), 0, NULL, "%d", + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + sizeof(int32_t), 0, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE_IOV), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), (char *) 0xfffffacefffffeedULL, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfeedLLU, NULL, ksize_fmt, + sizeof(int32_t), bogus_key1, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE_IOV), + sizeof(int32_t), bogus_key2, NULL, "%d", + sizeof(char *), key_iov + IOV_SIZE, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 32LLU, NULL, ksize_fmt, + sizeof(int32_t), bogus_key2, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE_IOV), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(key_iov), key_iov + IOV_SIZE - 4, key_iov_str1, NULL, + sizeof(kernel_ulong_t), (kernel_ulong_t) 4, NULL, + ksize_fmt, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE_IOV), + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, + sizeof(key_iov), key_iov, key_iov_str2, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) IOV_SIZE, NULL, ksize_fmt, + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL); + + + /* KEYCTL_INVALIDATE */ + do_keyctl(ARG_STR(KEYCTL_INVALIDATE), + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_INVALIDATE), + sizeof(int32_t), bogus_key1, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_INVALIDATE), + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_INVALIDATE), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_GET_PERSISTENT */ + do_keyctl(ARG_STR(KEYCTL_GET_PERSISTENT), + sizeof(uid_t), ARG_STR(-1), NULL, + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_PERSISTENT), + sizeof(uid_t), 2718281828U, NULL, "%u", + sizeof(int32_t), bogus_key1, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_PERSISTENT), + sizeof(uid_t), 2718281828U, NULL, "%u", + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_DH_COMPUTE */ + nul_terminated_buf = false; + + /* Empty result is expected for these */ + bogus_buf1[0] = '\377'; + bogus_buf2[0] = '\377'; + + do_keyctl(ARG_STR(KEYCTL_DH_COMPUTE), + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_DH_COMPUTE), + sizeof(char *), kcdhp + 1, NULL, ptr_fmt, + sizeof(char *), (char *) 0xfffff157ffffdeadULL, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_DH_COMPUTE), + sizeof(kcdhp), kcdhp, kcdhp_str, NULL, + (size_t) 9, (uintptr_t) bogus_buf1, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 9, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_DH_COMPUTE), + sizeof(kcdhp), kcdhp, kcdhp_str, NULL, + (size_t) 256, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 256, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_DH_COMPUTE), + sizeof(kcdhp), kcdhp, kcdhp_str, NULL, + (size_t) -1, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) -1, NULL, ksize_fmt, 0UL); + + nul_terminated_buf = true; + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_keyctl"); + +#endif diff --git a/tests-m32/keyctl.test b/tests-m32/keyctl.test new file mode 100755 index 000000000..875a82d3b --- /dev/null +++ b/tests-m32/keyctl.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of keyctl syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 -s10 diff --git a/tests-m32/kill.c b/tests-m32/kill.c new file mode 100644 index 000000000..cb884aa1a --- /dev/null +++ b/tests-m32/kill.c @@ -0,0 +1,79 @@ +/* + * Check decoding of kill syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Fei Jie + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_kill + +# include +# include +# include + +static void +handler(int sig) +{ +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const int pid = getpid(); + long rc = syscall(__NR_kill, pid, (long) 0xdefaced00000000ULL | SIGALRM); + printf("kill(%d, SIGALRM) = %ld\n", pid, rc); + + const long big_pid = (long) 0xfacefeedbadc0dedULL; + const long big_sig = (long) 0xdeadbeefcafef00dULL; + rc = syscall(__NR_kill, big_pid, big_sig); + printf("kill(%d, %d) = %ld %s (%m)\n", + (int) big_pid, (int) big_sig, rc, errno2name()); + + rc = syscall(__NR_kill, (long) 0xdefaced00000000ULL | pid, 0); + printf("kill(%d, SIG_0) = %ld\n", pid, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kill") + +#endif diff --git a/tests-m32/kill.test b/tests-m32/kill.test new file mode 100755 index 000000000..7a3a51aaf --- /dev/null +++ b/tests-m32/kill.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kill syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 -esignal=none diff --git a/tests-m32/ksysent.c b/tests-m32/ksysent.c new file mode 100644 index 000000000..8cac93ca5 --- /dev/null +++ b/tests-m32/ksysent.c @@ -0,0 +1,128 @@ +/* + * Validate syscallent.h file. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "sysent.h" +#include +#include +#include + +#define TD 0 +#define TF 0 +#define TI 0 +#define TN 0 +#define TP 0 +#define TS 0 +#define TM 0 +#define NF 0 +#define MA 0 +#define SI 0 +#define SE 0 +#define CST 0 +#define SEN(arg) 0,0 + +static const struct_sysent syscallent[] = { +#include "syscallent.h" +}; + +typedef const char *pstr_t; +static const pstr_t ksyslist[] = { +#include "ksysent.h" +}; + +int +main(void) +{ + int rc = 0; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(ksyslist); ++i) { + if (!ksyslist[i]) + continue; + if (i >= ARRAY_SIZE(syscallent) || !syscallent[i].sys_name) { + fprintf(stderr, "warning: \"%s\" syscall #%u" + " is missing in syscallent.h\n", + ksyslist[i], i); + continue; + } +#ifdef SYS_socket_nsubcalls + if (i >= SYS_socket_subcall && + i < SYS_socket_subcall + SYS_socket_nsubcalls) { + fprintf(stderr, "error: \"%s\" syscall #%u" + " is a socket subcall in syscallent.h\n", + ksyslist[i], i); + rc = 1; + continue; + } +#endif +#ifdef SYS_ipc_nsubcalls + if (i >= SYS_ipc_subcall && + i < SYS_ipc_subcall + SYS_ipc_nsubcalls) { + fprintf(stderr, "error: \"%s\" syscall #%u" + " is an ipc subcall in syscallent.h\n", + ksyslist[i], i); + rc = 1; + continue; + } +#endif + if (strcmp(ksyslist[i], syscallent[i].sys_name)) { + fprintf(stderr, "error: \"%s\" syscall #%u" + " is \"%s\" in syscallent.h\n", + ksyslist[i], i, syscallent[i].sys_name); + rc = 1; + continue; + } + } + + for (i = 0; i < ARRAY_SIZE(syscallent); ++i) { + if (!syscallent[i].sys_name +#ifdef SYS_socket_nsubcalls + || (i >= SYS_socket_subcall && + i < SYS_socket_subcall + SYS_socket_nsubcalls) +#endif +#ifdef SYS_ipc_nsubcalls + || (i >= SYS_ipc_subcall && + i < SYS_ipc_subcall + SYS_ipc_nsubcalls) +#endif +#ifdef ARM_FIRST_SHUFFLED_SYSCALL + || (i >= ARM_FIRST_SHUFFLED_SYSCALL && + i <= ARM_FIRST_SHUFFLED_SYSCALL + + ARM_LAST_SPECIAL_SYSCALL + 1) +#endif + ) + continue; + if (i >= ARRAY_SIZE(ksyslist) || !ksyslist[i]) { + fprintf(stderr, "note: unknown syscall #%u" + " is \"%s\" in syscallent.h\n", + i, syscallent[i].sys_name); + } + } + + return rc; +} diff --git a/tests-m32/ksysent.sed b/tests-m32/ksysent.sed new file mode 100644 index 000000000..63ded4a99 --- /dev/null +++ b/tests-m32/ksysent.sed @@ -0,0 +1,15 @@ +#!/bin/sed -rnf + +# should not have been exported at all +/#define[[:space:]]+__NR_(sys_epoll_|arch_specific_syscall|syscalls|syscall_count|syscall_max|available|reserved|unused)/d + +# should not have been named this way +s/__NR_(arm|xtensa)_fadvise64_64/__NR_fadvise64_64/ + +# legacy names +s/__NR_get_cpu/__NR_getcpu/ +s/__NR_madvise1/__NR_madvise/ +s/__NR_paccept/__NR_accept4/ + +# generate +s/#define[[:space:]]+__NR_([a-z_][^[:space:]]+)([[:space:]].*)?$/#ifdef __NR_\1\n[__NR_\1 \& 0xffff] = "\1",\n#endif/p diff --git a/tests-m32/ksysent.test b/tests-m32/ksysent.test new file mode 100755 index 000000000..802664885 --- /dev/null +++ b/tests-m32/ksysent.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Validate syscallent.h + +./ksysent diff --git a/tests-m32/lchown.c b/tests-m32/lchown.c new file mode 100644 index 000000000..a07c878c0 --- /dev/null +++ b/tests-m32/lchown.c @@ -0,0 +1,19 @@ +#include "tests.h" +#include + +#ifdef __NR_lchown + +# define SYSCALL_NR __NR_lchown +# define SYSCALL_NAME "lchown" + +# if defined __NR_lchown32 && __NR_lchown != __NR_lchown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lchown") + +#endif diff --git a/tests-m32/lchown.test b/tests-m32/lchown.test new file mode 100755 index 000000000..ceeaa859e --- /dev/null +++ b/tests-m32/lchown.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check lchown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a30 diff --git a/tests-m32/lchown32.c b/tests-m32/lchown32.c new file mode 100644 index 000000000..29cb01dba --- /dev/null +++ b/tests-m32/lchown32.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_lchown32 + +# define SYSCALL_NR __NR_lchown32 +# define SYSCALL_NAME "lchown32" +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lchown32") + +#endif diff --git a/tests-m32/lchown32.test b/tests-m32/lchown32.test new file mode 100755 index 000000000..6ee1ac959 --- /dev/null +++ b/tests-m32/lchown32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check lchown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 diff --git a/tests-m32/libmmsg.c b/tests-m32/libmmsg.c new file mode 100644 index 000000000..b0db26d22 --- /dev/null +++ b/tests-m32/libmmsg.c @@ -0,0 +1,69 @@ +/* + * Wrappers for recvmmsg and sendmmsg syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#ifndef __NR_recvmmsg +# define __NR_recvmmsg -1 +#endif +#define SC_recvmmsg 19 + +#ifndef __NR_sendmmsg +# define __NR_sendmmsg -1 +#endif +#define SC_sendmmsg 20 + +int +recv_mmsg(const int fd, struct mmsghdr *const vec, + const unsigned int vlen, const unsigned int flags, + struct timespec *const timeout) +{ + int rc = socketcall(__NR_recvmmsg, SC_recvmmsg, + fd, (long) vec, vlen, flags, (long) timeout); + + if (rc < 0 && ENOSYS == errno) + perror_msg_and_skip("recvmmsg"); + + return rc; +} + +int +send_mmsg(const int fd, struct mmsghdr *const vec, + const unsigned int vlen, const unsigned int flags) +{ + int rc = socketcall(__NR_sendmmsg, SC_sendmmsg, + fd, (long) vec, vlen, flags, 0); + + if (rc < 0 && ENOSYS == errno) + perror_msg_and_skip("sendmmsg"); + + return rc; +} diff --git a/tests-m32/libsocketcall.c b/tests-m32/libsocketcall.c new file mode 100644 index 000000000..04d6710f8 --- /dev/null +++ b/tests-m32/libsocketcall.c @@ -0,0 +1,69 @@ +/* + * Invoke a socket syscall, either directly or via __NR_socketcall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +/* + * Invoke a socket syscall, either directly or via __NR_socketcall. + * if nr == -1, no direct syscall invocation will be made. + */ +int +socketcall(const int nr, const int call, + long a1, long a2, long a3, long a4, long a5) +{ + int rc = -1; + errno = ENOSYS; + +# ifdef __NR_socketcall + static int have_socketcall = -1; + + if (have_socketcall < 0) { + if (syscall(__NR_socketcall, 0L, 0L, 0L, 0L, 0L) < 0 + && EINVAL == errno) { + have_socketcall = 1; + } else { + have_socketcall = 0; + } + } + + if (have_socketcall) { + const long args[] = { a1, a2, a3, a4, a5 }; + rc = syscall(__NR_socketcall, call, args); + } else +# endif + { + if (nr != -1) + rc = syscall(nr, a1, a2, a3, a4, a5); + } + + return rc; +} diff --git a/tests-m32/link.c b/tests-m32/link.c new file mode 100644 index 000000000..d6550fd3a --- /dev/null +++ b/tests-m32/link.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_link + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "link_sample_old"; + static const char sample_2[] = "link_sample_new"; + + long rc = syscall(__NR_link, sample_1, sample_2); + printf("link(\"%s\", \"%s\") = %ld %s (%m)\n", + sample_1, sample_2, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_link") + +#endif diff --git a/tests-m32/link.test b/tests-m32/link.test new file mode 100755 index 000000000..cfa2b0cc1 --- /dev/null +++ b/tests-m32/link.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check link syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/linkat.c b/tests-m32/linkat.c new file mode 100644 index 000000000..64b900ea0 --- /dev/null +++ b/tests-m32/linkat.c @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#ifdef __NR_linkat + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "linkat_sample_old"; + static const char sample_2[] = "linkat_sample_new"; + const long fd_old = (long) 0xdeadbeefffffffffULL; + const long fd_new = (long) 0xdeadbeeffffffffeULL; + + long rc = syscall(__NR_linkat, fd_old, sample_1, fd_new, sample_2, 0); + printf("linkat(%d, \"%s\", %d, \"%s\", 0) = %ld %s (%m)\n", + (int) fd_old, sample_1, (int) fd_new, sample_2, + rc, errno2name()); + + rc = syscall(__NR_linkat, -100, sample_1, -100, sample_2, -1L); + printf("linkat(%s, \"%s\", %s, \"%s\", %s) = %ld %s (%m)\n", + "AT_FDCWD", sample_1, "AT_FDCWD", sample_2, + "AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW" + "|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|0xffffe0ff", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_linkat") + +#endif diff --git a/tests-m32/linkat.test b/tests-m32/linkat.test new file mode 100755 index 000000000..5627de7f9 --- /dev/null +++ b/tests-m32/linkat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check linkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/llseek.c b/tests-m32/llseek.c new file mode 100644 index 000000000..e687e947a --- /dev/null +++ b/tests-m32/llseek.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR__llseek + +# include +# include + +int +main(void) +{ + const unsigned long high = 0xfacefeed; + const unsigned long low = 0xdeadbeef; + const long long offset = 0xfacefeeddeadbeefLL; + unsigned long long result; + + long rc = syscall(__NR__llseek, -1, high, low, &result, SEEK_SET); + printf("_llseek(-1, %lld, %p, SEEK_SET) = %ld %s (%m)\n", + offset, &result, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR__llseek") + +#endif diff --git a/tests-m32/llseek.test b/tests-m32/llseek.test new file mode 100755 index 000000000..cf1607edf --- /dev/null +++ b/tests-m32/llseek.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check _llseek syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -e_llseek $args > "$EXP" +grep -v '^lseek([0-9]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-m32/lookup_dcookie.c b/tests-m32/lookup_dcookie.c new file mode 100644 index 000000000..986180ce3 --- /dev/null +++ b/tests-m32/lookup_dcookie.c @@ -0,0 +1,96 @@ +/* + * Check decoding of lookup_dcookie syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_lookup_dcookie + +# include +# include +# include +# include + +static void +do_lookup_cookie(uint64_t cookie, char *buf, kernel_ulong_t len) +{ + long rc; + const char *errstr; + +# if (LONG_MAX > INT_MAX) \ + || (defined __x86_64__ && defined __ILP32__) \ + || defined LINUX_MIPSN32 + rc = syscall(__NR_lookup_dcookie, cookie, buf, len); +# else + rc = syscall(__NR_lookup_dcookie, LL_VAL_TO_PAIR(cookie), buf, len); +# endif + + errstr = sprintrc(rc); + printf("lookup_dcookie(%" PRIu64 ", ", cookie); + + /* Here, we trust successful return code */ + if ((rc >= 0) && (rc < (long) INT_MAX)) { + printf("%.*s, ", (int) rc, buf); + } else { + if (buf != NULL) + printf("%p, ", buf); + else + printf("NULL, "); + } + + printf("%" PRIu64 ") = %s\n", (uint64_t) len, errstr); +} + +int +main(void) +{ + enum { BUF_SIZE = 4096 }; + + static const uint64_t bogus_cookie = + (uint64_t) 0xf157feeddeadfaceULL; + static const kernel_ulong_t bogus_len = + (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + + char *buf = tail_alloc(BUF_SIZE); + + do_lookup_cookie(0, NULL, 0); + do_lookup_cookie(bogus_cookie, buf + BUF_SIZE, bogus_len); + do_lookup_cookie(bogus_cookie, buf, BUF_SIZE); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_lookup_dcookie"); + +#endif diff --git a/tests-m32/lookup_dcookie.test b/tests-m32/lookup_dcookie.test new file mode 100755 index 000000000..47e1c2d61 --- /dev/null +++ b/tests-m32/lookup_dcookie.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of lookup_cookie syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-m32/lseek.c b/tests-m32/lseek.c new file mode 100644 index 000000000..4428c4e91 --- /dev/null +++ b/tests-m32/lseek.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_lseek + +# include +# include + +int +main(void) +{ + const kernel_ulong_t offset = (kernel_ulong_t) 0xfacefeeddeadbeefULL; + + if (sizeof(offset) > sizeof(long)) { + /* + * Cannot use syscall because it takes long arguments. + * Let's call lseek with hope it will invoke lseek syscall. + */ + long long rc = lseek(-1, offset, SEEK_SET); + printf("lseek(-1, %lld, SEEK_SET) = %lld %s (%m)\n", + (long long) offset, rc, errno2name()); + } else { + long rc = syscall(__NR_lseek, -1L, offset, SEEK_SET); + printf("lseek(-1, %ld, SEEK_SET) = %ld %s (%m)\n", + (long) offset, rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_lseek") + +#endif diff --git a/tests-m32/lseek.test b/tests-m32/lseek.test new file mode 100755 index 000000000..f96a91d16 --- /dev/null +++ b/tests-m32/lseek.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check lseek syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a30 -elseek $args > "$EXP" +grep -v '^lseek([0-9]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-m32/lstat.c b/tests-m32/lstat.c new file mode 100644 index 000000000..3754f766c --- /dev/null +++ b/tests-m32/lstat.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_lstat + +# define TEST_SYSCALL_NR __NR_lstat +# define TEST_SYSCALL_STR "lstat" +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 43147718418ULL) +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lstat") + +#endif diff --git a/tests-m32/lstat.test b/tests-m32/lstat.test new file mode 100755 index 000000000..f513bb487 --- /dev/null +++ b/tests-m32/lstat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check lstat syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-m32/lstat64.c b/tests-m32/lstat64.c new file mode 100644 index 000000000..da06609dd --- /dev/null +++ b/tests-m32/lstat64.c @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_lstat64 + +# define TEST_SYSCALL_NR __NR_lstat64 +# define TEST_SYSCALL_STR "lstat64" +# define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" +# define STRUCT_STAT_IS_STAT64 1 +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lstat64") + +#endif diff --git a/tests-m32/lstat64.test b/tests-m32/lstat64.test new file mode 100755 index 000000000..fcafe79dd --- /dev/null +++ b/tests-m32/lstat64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check lstat64 syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-m32/lstatx.c b/tests-m32/lstatx.c new file mode 100644 index 000000000..cdd1124b6 --- /dev/null +++ b/tests-m32/lstatx.c @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define TEST_SYSCALL_INVOKE(sample, pst) \ + syscall(TEST_SYSCALL_NR, sample, pst) +#define PRINT_SYSCALL_HEADER(sample) \ + do { \ + int saved_errno = errno; \ + printf("%s(\"%s\", ", TEST_SYSCALL_STR, sample) +#define PRINT_SYSCALL_FOOTER(rc) \ + errno = saved_errno; \ + printf(") = %s\n", sprintrc(rc)); \ + } while (0) + +#include "xstatx.c" diff --git a/tests-m32/match.awk b/tests-m32/match.awk new file mode 100644 index 000000000..abfbae926 --- /dev/null +++ b/tests-m32/match.awk @@ -0,0 +1,53 @@ +#!/bin/gawk +# +# Copyright (c) 2014-2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# s[] is array of match strings +# r[] is array of match patterns + +NR > lines { next } + +{ + if (s[NR]) { + if ($0 == s[NR]) + next + print "Line " NR " does not match expected string: " s[NR] + } else { + if (match($0, r[NR])) + next + print "Line " NR " does not match expected pattern: " r[NR] + } + + fail = 1 +} + +END { + if (fail == 0 && NR != lines) { + fail = 1 + print "Expected " lines " lines, found " NR " line(s)." + } + exit fail +} diff --git a/tests-m32/mbind.c b/tests-m32/mbind.c new file mode 100644 index 000000000..b0544263d --- /dev/null +++ b/tests-m32/mbind.c @@ -0,0 +1,61 @@ +/* + * Check decoding of mbind syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_mbind + +# include +# include + +int +main(void) +{ + const unsigned long len = (unsigned long) 0xcafef00dbadc0dedULL; + const unsigned long mode = 3; + const unsigned long nodemask = (unsigned long) 0xfacefeedfffffff1ULL; + const unsigned long maxnode = (unsigned long) 0xdeadbeeffffffff2ULL; + const unsigned long flags = -1UL; + + long rc = syscall(__NR_mbind, 0, len, mode, nodemask, maxnode, flags); + printf("mbind(NULL, %lu, %s, %#lx, %lu, %s|%#x) = %ld %s (%m)\n", + len, "MPOL_INTERLEAVE", nodemask, maxnode, + "MPOL_MF_STRICT|MPOL_MF_MOVE|MPOL_MF_MOVE_ALL", + (unsigned) flags & ~7, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mbind") + +#endif diff --git a/tests-m32/mbind.test b/tests-m32/mbind.test new file mode 100755 index 000000000..2a07cac65 --- /dev/null +++ b/tests-m32/mbind.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mbind syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/membarrier.c b/tests-m32/membarrier.c new file mode 100644 index 000000000..330893b6c --- /dev/null +++ b/tests-m32/membarrier.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_membarrier + +# include +# include +# include +# include + +int +main(void) +{ + assert(syscall(__NR_membarrier, 3, 255) == -1); + int saved_errno = errno; + printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = %s\n", + sprintrc(-1)); + if (saved_errno != ENOSYS) { + /* the test needs to be updated? */ + assert(syscall(__NR_membarrier, 0, 0) == 1); + puts("membarrier(MEMBARRIER_CMD_QUERY, 0)" + " = 0x1 (MEMBARRIER_CMD_SHARED)"); + } + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_membarrier") + +#endif diff --git a/tests-m32/membarrier.test b/tests-m32/membarrier.test new file mode 100755 index 000000000..ad1f713b6 --- /dev/null +++ b/tests-m32/membarrier.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check membarrier syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff --git a/tests-m32/memfd_create.c b/tests-m32/memfd_create.c new file mode 100644 index 000000000..480fd1771 --- /dev/null +++ b/tests-m32/memfd_create.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_memfd_create + +# include +# include + +int +main(void) +{ + static const char text[] = "strace"; + int rc = syscall(__NR_memfd_create, text, 7); + + printf("memfd_create(\"%s\", %s) = %d %s (%m)\n", + text, "MFD_CLOEXEC|MFD_ALLOW_SEALING|0x4", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_memfd_create") + +#endif diff --git a/tests-m32/memfd_create.test b/tests-m32/memfd_create.test new file mode 100755 index 000000000..4361dae40 --- /dev/null +++ b/tests-m32/memfd_create.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of memfd_create syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/migrate_pages.c b/tests-m32/migrate_pages.c new file mode 100644 index 000000000..4c303e380 --- /dev/null +++ b/tests-m32/migrate_pages.c @@ -0,0 +1,54 @@ +/* + * Check decoding of migrate_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_migrate_pages + +# include +# include + +int +main(void) +{ + const long pid = (long) 0xfacefeedffffffffULL; + long rc = syscall(__NR_migrate_pages, pid, 0, 0, 0); + printf("migrate_pages(%d, 0, NULL, NULL) = %ld %s (%m)\n", + (int) pid, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_migrate_pages") + +#endif diff --git a/tests-m32/migrate_pages.test b/tests-m32/migrate_pages.test new file mode 100755 index 000000000..fad53b79a --- /dev/null +++ b/tests-m32/migrate_pages.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check migrate_pages syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 diff --git a/tests-m32/mincore.c b/tests-m32/mincore.c new file mode 100644 index 000000000..ea2b49e38 --- /dev/null +++ b/tests-m32/mincore.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#define DEFAULT_STRLEN 32 + +static void +print_mincore(const unsigned int pages, void *const addr, + const size_t size, unsigned char *const vec) +{ + unsigned int i; + + if (mincore(addr, size, vec)) + perror_msg_and_skip("mincore"); + + printf("mincore(%p, %zu, [", addr, size); + for (i = 0; i < pages; ++i) { + if (i) + printf(", "); + if (i >= DEFAULT_STRLEN) { + printf("..."); + break; + } + printf("%u", vec[i] & 1); + } + puts("]) = 0"); +} + +static void +test_mincore(const unsigned int pages) +{ + const size_t page_size = get_page_size(); + const size_t size = pages * page_size; + void *const addr = tail_alloc(size); + unsigned char *const vec = tail_alloc(pages); + + mincore(addr, size, NULL); + printf("mincore(%p, %zu, NULL) = -1 %s (%m)\n", + addr, size, errno2name()); + + print_mincore(pages, addr, size, vec); + if (size) + print_mincore(pages, addr, size - page_size + 1, vec); +} + +int main(void) +{ + test_mincore(1); + test_mincore(2); + test_mincore(DEFAULT_STRLEN); + test_mincore(DEFAULT_STRLEN + 1); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/mincore.test b/tests-m32/mincore.test new file mode 100755 index 000000000..6af9f492f --- /dev/null +++ b/tests-m32/mincore.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mincore syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff --git a/tests-m32/mkdir.c b/tests-m32/mkdir.c new file mode 100644 index 000000000..d971b1884 --- /dev/null +++ b/tests-m32/mkdir.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_mkdir + +# define TEST_SYSCALL_NR __NR_mkdir +# define TEST_SYSCALL_STR "mkdir" +# include "umode_t.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_mkdir") + +#endif diff --git a/tests-m32/mkdir.test b/tests-m32/mkdir.test new file mode 100755 index 000000000..38ed6928a --- /dev/null +++ b/tests-m32/mkdir.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mkdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff --git a/tests-m32/mkdirat.c b/tests-m32/mkdirat.c new file mode 100644 index 000000000..6bfe4a5fc --- /dev/null +++ b/tests-m32/mkdirat.c @@ -0,0 +1,16 @@ +#include "tests.h" +#include + +#ifdef __NR_mkdirat + +# define TEST_SYSCALL_NR __NR_mkdirat +# define TEST_SYSCALL_STR "mkdirat" +# define TEST_SYSCALL_PREFIX_ARGS (long int) 0xdeadbeefffffffffULL, +# define TEST_SYSCALL_PREFIX_STR "-1, " +# include "umode_t.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_mkdirat") + +#endif diff --git a/tests-m32/mkdirat.test b/tests-m32/mkdirat.test new file mode 100755 index 000000000..0fcb841a9 --- /dev/null +++ b/tests-m32/mkdirat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mkdirat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-m32/mknod.c b/tests-m32/mknod.c new file mode 100644 index 000000000..4cc1c5cb7 --- /dev/null +++ b/tests-m32/mknod.c @@ -0,0 +1,73 @@ +#include "tests.h" +#include + +#ifdef __NR_mknod + +# include +# include +# include +# include + +static const char sample[] = "mknod"; + +static long +call_mknod(unsigned short mode, unsigned long dev) +{ + unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode; + return syscall(__NR_mknod, sample, lmode, dev); +} + +int +main(void) +{ + unsigned long dev = (unsigned long) 0xdeadbeefbadc0dedULL; + + long rc = call_mknod(0, dev); + printf("mknod(\"%s\", 000) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknod(0xffff, dev); + printf("mknod(\"%s\", %#03ho) = %ld %s (%m)\n", + sample, (unsigned short) -1, rc, errno2name()); + + rc = call_mknod(S_IFREG, 0); + printf("mknod(\"%s\", S_IFREG|000) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknod(S_IFDIR | 06, 0); + printf("mknod(\"%s\", S_IFDIR|006) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknod(S_IFLNK | 060, 0); + printf("mknod(\"%s\", S_IFLNK|060) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknod(S_IFIFO | 0600, 0); + printf("mknod(\"%s\", S_IFIFO|0600) = %ld %s (%m)\n", + sample, rc, errno2name()); + + dev = (unsigned long) 0xdeadbeef00000000ULL | makedev(1, 7); + + rc = call_mknod(S_IFCHR | 024, dev); + printf("mknod(\"%s\", S_IFCHR|024, makedev(1, 7)) = %ld %s (%m)\n", + sample, rc, errno2name()); + + const unsigned short mode = (0xffff & ~S_IFMT) | S_IFBLK; + dev = (unsigned long) 0xdeadbeefbadc0dedULL; + + rc = call_mknod(mode, dev); + printf("mknod(\"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho" + ", makedev(%u, %u)) = %ld %s (%m)\n", + sample, mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX), + major((unsigned) dev), minor((unsigned) dev), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mknod") + +#endif diff --git a/tests-m32/mknod.test b/tests-m32/mknod.test new file mode 100755 index 000000000..195f1e33f --- /dev/null +++ b/tests-m32/mknod.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mknod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff --git a/tests-m32/mknodat.c b/tests-m32/mknodat.c new file mode 100644 index 000000000..756e27713 --- /dev/null +++ b/tests-m32/mknodat.c @@ -0,0 +1,74 @@ +#include "tests.h" +#include + +#ifdef __NR_mknodat + +# include +# include +# include +# include + +static const char sample[] = "mknodat_sample"; +static const long int fd = (long int) 0xdeadbeefffffffffULL; + +static long +call_mknodat(unsigned short mode, unsigned long dev) +{ + unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode; + return syscall(__NR_mknodat, fd, sample, lmode, dev); +} + +int +main(void) +{ + unsigned long dev = (unsigned long) 0xdeadbeefbadc0dedULL; + + long rc = call_mknodat(0, dev); + printf("mknodat(-1, \"%s\", 000) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknodat(0xffff, dev); + printf("mknodat(-1, \"%s\", %#03ho) = %ld %s (%m)\n", + sample, (unsigned short) -1, rc, errno2name()); + + rc = call_mknodat(S_IFREG, 0); + printf("mknodat(-1, \"%s\", S_IFREG|000) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknodat(S_IFDIR | 06, 0); + printf("mknodat(-1, \"%s\", S_IFDIR|006) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknodat(S_IFLNK | 060, 0); + printf("mknodat(-1, \"%s\", S_IFLNK|060) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknodat(S_IFIFO | 0600, 0); + printf("mknodat(-1, \"%s\", S_IFIFO|0600) = %ld %s (%m)\n", + sample, rc, errno2name()); + + dev = (unsigned long) 0xdeadbeef00000000ULL | makedev(1, 7); + + rc = call_mknodat(S_IFCHR | 024, dev); + printf("mknodat(-1, \"%s\", S_IFCHR|024, makedev(1, 7)) = %ld %s (%m)\n", + sample, rc, errno2name()); + + const unsigned short mode = (0xffff & ~S_IFMT) | S_IFBLK; + dev = (unsigned long) 0xdeadbeefbadc0dedULL; + + rc = call_mknodat(mode, dev); + printf("mknodat(-1, \"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho" + ", makedev(%u, %u)) = %ld %s (%m)\n", + sample, mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX), + major((unsigned) dev), minor((unsigned) dev), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mknodat") + +#endif diff --git a/tests-m32/mknodat.test b/tests-m32/mknodat.test new file mode 100755 index 000000000..1701a368b --- /dev/null +++ b/tests-m32/mknodat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mknodat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff --git a/tests-m32/mlock.c b/tests-m32/mlock.c new file mode 100644 index 000000000..8e9806bd5 --- /dev/null +++ b/tests-m32/mlock.c @@ -0,0 +1,29 @@ +#include "tests.h" +#include + +#if defined __NR_mlock && defined __NR_munlock + +# include +# include + +int +main(void) +{ + const int size = 1024; + const char *addr = tail_alloc(size); + + long rc = syscall(__NR_mlock, addr, size); + printf("mlock(%p, %d) = %s\n", addr, size, sprintrc(rc)); + + rc = syscall(__NR_munlock, addr, size); + printf("munlock(%p, %d) = %s\n", addr, size, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mlock && __NR_munlock") + +#endif diff --git a/tests-m32/mlock.test b/tests-m32/mlock.test new file mode 100755 index 000000000..9a73a3063 --- /dev/null +++ b/tests-m32/mlock.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mlock and munlock syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mlock,munlock -a20 diff --git a/tests-m32/mlock2.c b/tests-m32/mlock2.c new file mode 100644 index 000000000..71a2003ea --- /dev/null +++ b/tests-m32/mlock2.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_mlock2 + +# include +# include + +int +main(void) +{ + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL; + const unsigned long len = (unsigned long) 0xcafef00dbadc0dedULL; + + long rc = syscall(__NR_mlock2, addr, len, -1UL); + printf("mlock2(%#lx, %lu, MLOCK_ONFAULT|0xfffffffe)" + " = %ld %s (%m)\n", addr, len, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mlock2") + +#endif diff --git a/tests-m32/mlock2.test b/tests-m32/mlock2.test new file mode 100755 index 000000000..bc412e97d --- /dev/null +++ b/tests-m32/mlock2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mlock2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/mlockall.c b/tests-m32/mlockall.c new file mode 100644 index 000000000..682d070da --- /dev/null +++ b/tests-m32/mlockall.c @@ -0,0 +1,46 @@ +/* + * Check decoding of mlockall syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include + +int +main(void) +{ + int rc = mlockall(0); + printf("mlockall(0) = %s\n", sprintrc(rc)); + + rc = mlockall(MCL_CURRENT); + printf("mlockall(MCL_CURRENT) = %s\n", sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/mlockall.test b/tests-m32/mlockall.test new file mode 100755 index 000000000..d7a6182d9 --- /dev/null +++ b/tests-m32/mlockall.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mlockall syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff --git a/tests-m32/mmap.c b/tests-m32/mmap.c new file mode 100644 index 000000000..f726f63ef --- /dev/null +++ b/tests-m32/mmap.c @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +int +main(int ac, char **av) +{ + const char *const name = ac > 1 ? av[1] : "mmap"; + const intmax_t pagesize = get_page_size(); + const unsigned long length1 = pagesize * 6; + const unsigned long length2 = pagesize * 3; + const unsigned long length3 = pagesize * 2; + const int fd = -1; + off_t offset; + void *addr, *p; + +#if ULONG_MAX > 4294967295UL + offset = 0xcafedeadbeef000ULL & -pagesize; + addr = (void *) (uintmax_t) (0xfacefeed000 & -pagesize); +#else + offset = 0xdeadbeef000ULL & -pagesize; + addr = (void *) (unsigned int) (0xfaced000 & -pagesize); +#endif + const uintmax_t uoffset = + sizeof(offset) == sizeof(int) ? (uintmax_t) (unsigned int) offset + : (uintmax_t) offset; + + (void) close(0); + (void) close(0); + printf("%s(NULL, 0, PROT_NONE, MAP_FILE, 0, 0) = -1 EBADF (%m)\n", + name); + mmap(NULL, 0, PROT_NONE, MAP_FILE, 0, 0); + + p = mmap(addr, length1, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, fd, offset); + if (MAP_FAILED == p) + perror_msg_and_fail("mmap"); + printf("%s(%p, %lu, PROT_READ|PROT_WRITE, " + "MAP_PRIVATE|MAP_ANONYMOUS, %d, %#jx) = %p\n", + name, addr, length1, fd, uoffset, p); + + if (msync(p, length1, MS_SYNC)) + perror_msg_and_fail("msync"); + printf("msync(%p, %lu, MS_SYNC) = 0\n", p, length1); + + if (mprotect(p, length1, PROT_NONE)) + perror_msg_and_fail("mprotect"); + printf("mprotect(%p, %lu, PROT_NONE) = 0\n", p, length1); + + addr = mremap(p, length1, length2, 0); + if (MAP_FAILED == addr) + perror_msg_and_fail("mremap"); + printf("mremap(%p, %lu, %lu, 0) = %p\n", p, length1, length2, addr); + + p = mremap(addr, length2, length3, MREMAP_MAYMOVE | MREMAP_FIXED, + addr + length2); + if (MAP_FAILED == p) + perror_msg_and_fail("mremap"); + printf("mremap(%p, %lu, %lu, MREMAP_MAYMOVE|MREMAP_FIXED" + ", %p) = %p\n", addr, length2, length3, addr + length2, p); + + if (madvise(p, length3, MADV_NORMAL)) + perror_msg_and_fail("madvise"); + printf("madvise(%p, %lu, MADV_NORMAL) = 0\n", p, length3); + + if (munmap(p, length3)) + perror_msg_and_fail("munmap"); + printf("munmap(%p, %lu) = 0\n", p, length3); + + if (mlockall(MCL_FUTURE)) + perror_msg_and_fail("mlockall"); + puts("mlockall(MCL_FUTURE) = 0"); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/mmap.test b/tests-m32/mmap.test new file mode 100755 index 000000000..0b87114a6 --- /dev/null +++ b/tests-m32/mmap.test @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Check mmap/mmap2, madvise, mlockall, mprotect, mremap, msync, and munmap +# syscalls decoding. +# +# Copyright (c) 2015-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +check_prog grep +check_prog sed +run_prog > /dev/null + +syscall= +for n in mmap mmap2; do + $STRACE -e$n -h > /dev/null && syscall=$syscall,$n +done +run_strace -e$syscall $args > /dev/null + +if grep '^mmap(NULL, 0, PROT_NONE,' < "$LOG" > /dev/null; then + mmap=mmap +elif grep '^mmap2(NULL, 0, PROT_NONE,' < "$LOG" > /dev/null; then + mmap=mmap2 +else + dump_log_and_fail_with "mmap/mmap2 not found in $STRACE $args output" +fi + +syscall=$mmap,madvise,mlockall,mprotect,mremap,msync,munmap + +run_prog "./$NAME" $mmap > /dev/null +run_strace -a20 -e$syscall $args > "$EXP" +sed -n "/^$mmap(NULL, 0, PROT_NONE,/,\$p" < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/mmap64.c b/tests-m32/mmap64.c new file mode 100644 index 000000000..b31ce4278 --- /dev/null +++ b/tests-m32/mmap64.c @@ -0,0 +1 @@ +#include "mmap.c" diff --git a/tests-m32/mmap64.test b/tests-m32/mmap64.test new file mode 100755 index 000000000..51f1896ed --- /dev/null +++ b/tests-m32/mmap64.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mmap/mprotect/munmap syscalls decoding. +# Target executable was compiled with -D_FILE_OFFSET_BITS=64. + +. "${srcdir=.}/mmap.test" diff --git a/tests-m32/mmsg-silent.c b/tests-m32/mmsg-silent.c new file mode 100644 index 000000000..47d0a504e --- /dev/null +++ b/tests-m32/mmsg-silent.c @@ -0,0 +1,63 @@ +/* + * Check silent decoding of sendmmsg and recvmmsg syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#include "msghdr.h" + +int +main(void) +{ + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + + char buf = 'A'; + struct iovec iov = { .iov_base = &buf, .iov_len = sizeof(buf) }; + struct mmsghdr mh = { + .msg_hdr = { + .msg_iov = &iov, + .msg_iovlen = 1 + } + }; + + int rc = send_mmsg(fds[1], &mh, 1, MSG_DONTWAIT); + if (rc < 0) + perror_msg_and_skip("sendmmsg"); + printf("sendmmsg(%d, %p, 1, MSG_DONTWAIT) = %d\n", fds[1], &mh, rc); + + struct timespec t = { .tv_sec = 0, .tv_nsec = 12345678 }; + rc = recv_mmsg(fds[0], &mh, 1, MSG_DONTWAIT, &t); + printf("recvmmsg(%d, %p, 1, MSG_DONTWAIT, %p) = %d\n", + fds[0], &mh, &t, rc); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/mmsg-silent.test b/tests-m32/mmsg-silent.test new file mode 100755 index 000000000..775e0ad34 --- /dev/null +++ b/tests-m32/mmsg-silent.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check silent decoding of sendmmsg and recvmmsg syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 -e verbose=none -e trace=sendmmsg,recvmmsg diff --git a/tests-m32/mmsg.c b/tests-m32/mmsg.c new file mode 100644 index 000000000..88805d16a --- /dev/null +++ b/tests-m32/mmsg.c @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2014 Masatake YAMATO + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#include "msghdr.h" + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (socketpair(AF_UNIX, SOCK_DGRAM, 0, fds)) + perror_msg_and_skip("socketpair"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + const struct iovec w0_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + } + }; + struct iovec *w0_iov = tail_memdup(w0_iov_, sizeof(w0_iov_)); + + const struct iovec w1_iov_[] = { + { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + struct iovec *w1_iov = tail_memdup(w1_iov_, sizeof(w1_iov_)); + + const struct mmsghdr w_mmh_[] = { + { + .msg_hdr = { + .msg_iov = w0_iov, + .msg_iovlen = ARRAY_SIZE(w0_iov_), + } + }, { + .msg_hdr = { + .msg_iov = w1_iov, + .msg_iovlen = ARRAY_SIZE(w1_iov_), + } + } + }; + void *w_mmh = tail_memdup(w_mmh_, sizeof(w_mmh_)); + const unsigned int n_w_mmh = ARRAY_SIZE(w_mmh_); + + int r = send_mmsg(1, w_mmh, n_w_mmh, MSG_DONTROUTE | MSG_NOSIGNAL); + if (r < 0) + perror_msg_and_skip("sendmmsg"); + assert(r == (int) n_w_mmh); + assert(close(1) == 0); + tprintf("sendmmsg(1, [{msg_hdr={msg_name=NULL, msg_namelen=0" + ", msg_iov=[{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}], msg_iovlen=%u" + ", msg_controllen=0, msg_flags=0}, msg_len=%u}" + ", {msg_hdr={msg_name=NULL, msg_namelen=0" + ", msg_iov=[{iov_base=\"%s\", iov_len=%u}], msg_iovlen=%u" + ", msg_controllen=0, msg_flags=0}, msg_len=%u}], %u" + ", MSG_DONTROUTE|MSG_NOSIGNAL) = %d\n" + " = %u buffers in vector 0\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " = %u buffers in vector 1\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), + w1_c, LENGTH_OF(w1_c), + ARRAY_SIZE(w0_iov_), + LENGTH_OF(w0_c) + LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w1_iov_), + LENGTH_OF(w2_c), + n_w_mmh, r, + ARRAY_SIZE(w0_iov_), LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, + ARRAY_SIZE(w1_iov_), LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + struct iovec *r0_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = r_len + } + }; + struct iovec *r1_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + const struct mmsghdr r_mmh_[] = { + { + .msg_hdr = { + .msg_iov = r0_iov, + .msg_iovlen = ARRAY_SIZE(r0_iov_), + } + }, { + .msg_hdr = { + .msg_iov = r1_iov, + .msg_iovlen = ARRAY_SIZE(r1_iov_), + } + } + }; + void *r_mmh = tail_memdup(r_mmh_, sizeof(r_mmh_)); + const unsigned int n_r_mmh = ARRAY_SIZE(r_mmh_); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + assert(recv_mmsg(0, r_mmh, n_r_mmh, MSG_DONTWAIT, NULL) == (int) n_r_mmh); + assert(close(0) == 0); + tprintf("recvmmsg(0, [{msg_hdr={msg_name=NULL, msg_namelen=0" + ", msg_iov=[{iov_base=\"%s\", iov_len=%u}], msg_iovlen=%u" + ", msg_controllen=0, msg_flags=0}, msg_len=%u}" + ", {msg_hdr={msg_name=NULL, msg_namelen=0" + ", msg_iov=[{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"\", iov_len=%u}], msg_iovlen=%u" + ", msg_controllen=0, msg_flags=0}, msg_len=%u}], %u" + ", MSG_DONTWAIT, NULL) = %d\n" + " = %u buffers in vector 0\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " = %u buffers in vector 1\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), LENGTH_OF(r0_c), + r1_c, r_len, r_len, ARRAY_SIZE(r1_iov_), LENGTH_OF(r1_c), + n_r_mmh, r, + ARRAY_SIZE(r0_iov_), LENGTH_OF(r0_c), r0_d, r0_c, + ARRAY_SIZE(r1_iov_), LENGTH_OF(r1_c), r1_d, r1_c); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests-m32/mmsg.test b/tests-m32/mmsg.test new file mode 100755 index 000000000..a8148ba88 --- /dev/null +++ b/tests-m32/mmsg.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check how iovecs in struct mmsghdr are decoded. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=recvmmsg,sendmmsg -e read=0 -e write=1 diff --git a/tests-m32/mmsg_name-v.c b/tests-m32/mmsg_name-v.c new file mode 100644 index 000000000..c663536d8 --- /dev/null +++ b/tests-m32/mmsg_name-v.c @@ -0,0 +1,4 @@ +/* This file is part of mmsg_name-v strace test. */ +#define VERBOSE 1 +#define TEST_NAME "mmsg_name-v" +#include "mmsg_name.c" diff --git a/tests-m32/mmsg_name-v.test b/tests-m32/mmsg_name-v.test new file mode 100755 index 000000000..ab8dfba6f --- /dev/null +++ b/tests-m32/mmsg_name-v.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check verbose decoding of msg_name* fields of struct msghdr array argument +# of sendmmsg and recvmmsg syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -a25 -e trace=sendmmsg,recvmmsg diff --git a/tests-m32/mmsg_name.c b/tests-m32/mmsg_name.c new file mode 100644 index 000000000..a7a55c55a --- /dev/null +++ b/tests-m32/mmsg_name.c @@ -0,0 +1,242 @@ +/* + * Check decoding of msg_name* fields of struct msghdr array argument + * of sendmmsg and recvmmsg syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "msghdr.h" + +#define DEFAULT_STRLEN 32 + +#define IOV_MAX1 (IOV_MAX + 1) + +#ifndef TEST_NAME +# define TEST_NAME "mmsg_name" +#endif + +static void +print_msghdr(const struct msghdr *const msg, const int user_msg_namelen) +{ + const struct sockaddr_un *const un = msg->msg_name; + const int offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); + + printf("{msg_name="); + if (!un) + printf("NULL"); + else if (user_msg_namelen < offsetof_sun_path) { + printf("%p", un); + } else { + printf("{sa_family=AF_UNIX"); + if (user_msg_namelen > offsetof_sun_path) { + int len = user_msg_namelen < (int) msg->msg_namelen ? + user_msg_namelen : (int) msg->msg_namelen; + len -= offsetof_sun_path; + if (len > (int) sizeof(un->sun_path)) + len = sizeof(un->sun_path); + printf(", sun_path=\"%.*s\"", len, un->sun_path); + } + printf("}"); + } + printf(", msg_namelen="); + if (user_msg_namelen != (int) msg->msg_namelen) { + printf("%d->", user_msg_namelen); + } + printf("%d, msg_iov=[{iov_base=\"%c\", iov_len=1}]" + ", msg_iovlen=1, msg_controllen=0, msg_flags=0}", + (int) msg->msg_namelen, * (char *) msg->msg_iov[0].iov_base); +} + +static void +test_mmsg_name(const int send_fd, const int recv_fd) +{ + struct sockaddr_un *const send_addr = + tail_alloc(sizeof(*send_addr) * IOV_MAX1); + char *const send_buf = tail_alloc(sizeof(*send_buf) * IOV_MAX1); + struct iovec *const send_iov = tail_alloc(sizeof(*send_iov) * IOV_MAX1); + struct mmsghdr *const send_mh = tail_alloc(sizeof(*send_mh) * IOV_MAX1); + + int i, rc; + + for (i = 0; i < IOV_MAX1; ++i) { + int sun_len = i + 1 > (int) sizeof(send_addr[i].sun_path) + ? (int) sizeof(send_addr[i].sun_path) + : i + 1; + + send_addr[i].sun_family = AF_UNIX; + memset(send_addr[i].sun_path, 'a' + i % 26, sun_len); + + send_buf[i] = '0' + i % 10; + + send_iov[i].iov_base = &send_buf[i]; + send_iov[i].iov_len = sizeof(*send_buf); + + send_mh[i].msg_hdr.msg_iov = &send_iov[i]; + send_mh[i].msg_hdr.msg_iovlen = 1; + send_mh[i].msg_hdr.msg_name = &send_addr[i]; + send_mh[i].msg_hdr.msg_namelen = i + 1; + send_mh[i].msg_hdr.msg_control = 0; + send_mh[i].msg_hdr.msg_controllen = 0; + send_mh[i].msg_hdr.msg_flags = 0; + } + + rc = send_mmsg(send_fd, send_mh, IOV_MAX1, MSG_DONTWAIT); + int saved_errno = errno; + + printf("sendmmsg(%d, [", send_fd); + for (i = 0; i < IOV_MAX1; ++i) { + if (i) + printf(", "); + if (i >= IOV_MAX +# if !VERBOSE + || i >= DEFAULT_STRLEN +# endif + ) { + printf("..."); + break; + } + printf("{msg_hdr="); + print_msghdr(&send_mh[i].msg_hdr, i + 1); + printf("}"); + } + errno = saved_errno; + printf("], %u, MSG_DONTWAIT) = %d %s (%m)\n", + IOV_MAX1, rc, errno2name()); + + for (i = 0; i < IOV_MAX1; ++i) { + send_mh[i].msg_hdr.msg_name = 0; + send_mh[i].msg_hdr.msg_namelen = 0; + } + + /* + * When recvmmsg is called with a valid descriptor + * but inaccessible memory, it causes segfaults on some architectures. + * As in these cases we test decoding of failed recvmmsg calls, + * it's ok to fail recvmmsg with any reason as long as + * it doesn't read that inaccessible memory. + */ + rc = send_mmsg(-1, &send_mh[IOV_MAX], 2, MSG_DONTWAIT); + saved_errno = errno; + printf("sendmmsg(-1, [{msg_hdr="); + print_msghdr(&send_mh[IOV_MAX].msg_hdr, 0); + errno = saved_errno; + printf("}, %p], %u, MSG_DONTWAIT) = %d %s (%m)\n", + &send_mh[IOV_MAX1], 2, rc, errno2name()); + + rc = send_mmsg(send_fd, send_mh, IOV_MAX1, MSG_DONTWAIT); + if (rc < 0) + perror_msg_and_skip("sendmmsg"); + + printf("sendmmsg(%d, [", send_fd); + for (i = 0; i < IOV_MAX1; ++i) { + if (i) + printf(", "); + if (i >= IOV_MAX +#if !VERBOSE + || i >= DEFAULT_STRLEN +#endif + ) { + printf("..."); + break; + } + printf("{msg_hdr="); + print_msghdr(&send_mh[i].msg_hdr, 0); + printf("%s}", i < rc ? ", msg_len=1" : ""); + } + printf("], %u, MSG_DONTWAIT) = %d\n", IOV_MAX1, rc); + + struct sockaddr_un *const recv_addr = + tail_alloc(sizeof(*recv_addr) * IOV_MAX1); + char *const recv_buf = tail_alloc(sizeof(*recv_buf) * IOV_MAX1); + struct iovec *const recv_iov = tail_alloc(sizeof(*recv_iov) * IOV_MAX1); + struct mmsghdr *const recv_mh = tail_alloc(sizeof(*recv_mh) * IOV_MAX1); + + for (i = 0; i < IOV_MAX1; ++i) { + recv_iov[i].iov_base = &recv_buf[i]; + recv_iov[i].iov_len = sizeof(*recv_buf); + + recv_mh[i].msg_hdr.msg_name = &recv_addr[i]; + recv_mh[i].msg_hdr.msg_namelen = i; + recv_mh[i].msg_hdr.msg_iov = &recv_iov[i]; + recv_mh[i].msg_hdr.msg_iovlen = 1; + recv_mh[i].msg_hdr.msg_control = 0; + recv_mh[i].msg_hdr.msg_controllen = 0; + recv_mh[i].msg_hdr.msg_flags = 0; + } + + rc = recv_mmsg(recv_fd, recv_mh, IOV_MAX1, MSG_DONTWAIT, 0); + if (rc < 0) + perror_msg_and_skip("recvmmsg"); + + printf("recvmmsg(%d, [", recv_fd); + for (i = 0; i < rc; ++i) { + if (i) + printf(", "); +#if !VERBOSE + if (i >= DEFAULT_STRLEN) { + printf("..."); + break; + } +#endif + printf("{msg_hdr="); + print_msghdr(&recv_mh[i].msg_hdr, i); + printf(", msg_len=1}"); + } + printf("], %u, MSG_DONTWAIT, NULL) = %d\n", IOV_MAX1, rc); +} + +int +main(void) +{ + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + + const struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = TEST_NAME "-recvmmsg.test.send.socket" + }; + + (void) unlink(un.sun_path); + if (bind(fds[1], (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + (void) unlink(un.sun_path); + + test_mmsg_name(fds[1], fds[0]); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/mmsg_name.test b/tests-m32/mmsg_name.test new file mode 100755 index 000000000..e18c9722a --- /dev/null +++ b/tests-m32/mmsg_name.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check decoding of msg_name* fields of struct msghdr array argument +# of sendmmsg and recvmmsg syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 -e trace=sendmmsg,recvmmsg diff --git a/tests-m32/mount.c b/tests-m32/mount.c new file mode 100644 index 000000000..cbfe42f8f --- /dev/null +++ b/tests-m32/mount.c @@ -0,0 +1,84 @@ +/* + * Check decoding of mount syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +#ifndef MS_MGC_VAL +# define MS_MGC_VAL 0xC0ED0000 +#endif + +#ifndef MS_RELATIME +# define MS_RELATIME (1ul << 21) +#endif + +#define str_ro_nosuid_nodev_noexec "MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC" + +int +main(void) +{ + static const char source[] = "mount_source"; + static const char target[] = "mount_target"; + static const char fstype[] = "mount_fstype"; + static const char data[] = "mount_data"; + + int rc = mount(source, target, fstype, 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, str_ro_nosuid_nodev_noexec, + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_RELATIME | 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, + str_ro_nosuid_nodev_noexec "|MS_RELATIME", + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_MGC_VAL, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, "MS_MGC_VAL", data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_MGC_VAL | 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, + "MS_MGC_VAL|" str_ro_nosuid_nodev_noexec, + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_REMOUNT, data); + printf("mount(\"%s\", \"%s\", %p, %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, "MS_REMOUNT", data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_BIND, data); + printf("mount(\"%s\", \"%s\", %p, %s, %p) = %d %s (%m)\n", + source, target, fstype, "MS_BIND", data, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/mount.test b/tests-m32/mount.test new file mode 100755 index 000000000..40fdca955 --- /dev/null +++ b/tests-m32/mount.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mount syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/move_pages.c b/tests-m32/move_pages.c new file mode 100644 index 000000000..f4ccafa2c --- /dev/null +++ b/tests-m32/move_pages.c @@ -0,0 +1,239 @@ +/* + * Check decoding of move_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_move_pages + +# include +# include +# include + +# define MAX_STRLEN 3 + +static void +print_page_array(const void **const pages, + const unsigned long count, + const unsigned int offset) +{ + if (!count) { + printf("%s", pages ? "[]" : "NULL"); + return; + } + if (count <= offset) { + printf("%p", pages); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i + offset < count) { + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + } else { + printf("%p", pages + i); + break; + } + const void *const addr = pages[i]; + if (addr) + printf("%p", addr); + else + printf("NULL"); + } + printf("]"); +} + +static void +print_node_array(const int *const nodes, + const unsigned long count, + const unsigned int offset) +{ + if (!count) { + printf("%s", nodes ? "[]" : "NULL"); + return; + } + if (count <= offset) { + printf("%p", nodes); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i + offset < count) { + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + } else { + printf("%p", nodes + i); + break; + } + printf("%d", nodes[i]); + } + printf("]"); +} + +static void +print_status_array(const int *const status, const unsigned long count) +{ + if (!count) { + printf("%s", status ? "[]" : "NULL"); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + if (status[i] >= 0) { + printf("%d", status[i]); + } else { + errno = -status[i]; + printf("%s", errno2name()); + } + } + printf("]"); +} + +static void +print_stat_pages(const unsigned long pid, const unsigned long count, + const void **const pages, int *const status) +{ + const unsigned long flags = (unsigned long) 0xfacefeed00000002ULL; + + long rc = syscall(__NR_move_pages, + pid, count, pages, NULL, status, flags); + const char *errstr = sprintrc(rc); + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, 0); + printf(", NULL, "); + if (rc) { + if (count) + printf("%p", status); + else + printf("[]"); + } else { + print_status_array(status, count); + } + printf(", MPOL_MF_MOVE) = %s\n", errstr); +} + +static void +print_move_pages(const unsigned long pid, + unsigned long count, + const unsigned int offset, + const void **const pages, + int *const nodes, + int *const status) +{ + const unsigned long flags = (unsigned long) 0xfacefeed00000004ULL; + count += offset; + + long rc = syscall(__NR_move_pages, + pid, count, pages, nodes, status, flags); + const char *errstr = sprintrc(rc); + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, offset); + printf(", "); + print_node_array(nodes, count, offset); + printf(", "); + if (count) + printf("%p", status); + else + printf("[]"); + printf(", MPOL_MF_MOVE_ALL) = %s\n", errstr); +} + +int +main(void) +{ + const unsigned long pid = + (unsigned long) 0xfacefeed00000000ULL | getpid(); + unsigned long count = 1; + const unsigned page_size = get_page_size(); + const void *const page = tail_alloc(page_size); + const void *const efault = page + page_size; + const void **pages = tail_alloc(sizeof(*pages)); + int *nodes = tail_alloc(sizeof(*nodes)); + int *status = tail_alloc(sizeof(*status)); + + print_stat_pages(pid, 0, pages, status); + print_move_pages(pid, 0, 0, pages, nodes, status); + print_move_pages(pid, 0, 1, pages + 1, nodes + 1, status + 1); + + *pages = page; + print_stat_pages(pid, count, pages, status); + *nodes = 0xdeadbee1; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = efault; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee2; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = nodes; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee3; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = status; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee4; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_move_pages") + +#endif diff --git a/tests-m32/move_pages.test b/tests-m32/move_pages.test new file mode 100755 index 000000000..f95771724 --- /dev/null +++ b/tests-m32/move_pages.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of move_pages syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 diff --git a/tests-m32/mq.c b/tests-m32/mq.c new file mode 100644 index 000000000..9c2ffc8ed --- /dev/null +++ b/tests-m32/mq.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_MQUEUE_H + +# include +# include +# include +# include +# include +# include + +# define NAME "strace-mq.test" + +int +main (void) +{ + struct mq_attr attr; + (void) close(0); + + if (mq_open("/" NAME, O_CREAT, 0700, NULL)) + perror_msg_and_skip("mq_open"); + printf("mq_open(\"%s\", O_RDONLY|O_CREAT, 0700, NULL) = 0\n", NAME); + + if (mq_getattr(0, &attr)) + perror_msg_and_skip("mq_getattr"); + printf("mq_getsetattr(0, NULL, {mq_flags=0, mq_maxmsg=%lld" + ", mq_msgsize=%lld, mq_curmsgs=0}) = 0\n", + (long long) attr.mq_maxmsg, + (long long) attr.mq_msgsize); + + if (mq_setattr(0, &attr, NULL)) + perror_msg_and_skip("mq_setattr"); + printf("mq_getsetattr(0, {mq_flags=0, mq_maxmsg=%lld" + ", mq_msgsize=%lld, mq_curmsgs=0}, NULL) = 0\n", + (long long) attr.mq_maxmsg, + (long long) attr.mq_msgsize); + + if (mq_unlink("/" NAME)) + perror_msg_and_skip("mq_unlink"); + printf("mq_unlink(\"%s\") = 0\n", NAME); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_MQUEUE_H") + +#endif diff --git a/tests-m32/mq.test b/tests-m32/mq.test new file mode 100755 index 000000000..746b07b7d --- /dev/null +++ b/tests-m32/mq.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mq_open, mq_getsetattr, and mq_unlink syscalls. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a28 -e trace=mq_getsetattr,mq_open,mq_unlink diff --git a/tests-m32/mq_sendrecv-read.c b/tests-m32/mq_sendrecv-read.c new file mode 100644 index 000000000..cc9867b96 --- /dev/null +++ b/tests-m32/mq_sendrecv-read.c @@ -0,0 +1,3 @@ +#define DUMPIO_READ 1 +#define MQ_NAME "mq_sendrecv-read.sample" +#include "mq_sendrecv.c" diff --git a/tests-m32/mq_sendrecv-read.test b/tests-m32/mq_sendrecv-read.test new file mode 100755 index 000000000..eb4ad75e0 --- /dev/null +++ b/tests-m32/mq_sendrecv-read.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mq_open, mq_notify, mq_timedsend, mq_timedreceive syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mq_open,mq_notify,mq_timedsend,mq_timedreceive,mq_unlink -eread=0 -a14 diff --git a/tests-m32/mq_sendrecv-write.c b/tests-m32/mq_sendrecv-write.c new file mode 100644 index 000000000..ae34ee1a3 --- /dev/null +++ b/tests-m32/mq_sendrecv-write.c @@ -0,0 +1,3 @@ +#define DUMPIO_WRITE 1 +#define MQ_NAME "mq_sendrecv-write.sample" +#include "mq_sendrecv.c" diff --git a/tests-m32/mq_sendrecv-write.test b/tests-m32/mq_sendrecv-write.test new file mode 100755 index 000000000..38277ec68 --- /dev/null +++ b/tests-m32/mq_sendrecv-write.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mq_open, mq_notify, mq_timedsend, mq_timedreceive syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mq_open,mq_notify,mq_timedsend,mq_timedreceive,mq_unlink -ewrite=0 -a14 diff --git a/tests-m32/mq_sendrecv.c b/tests-m32/mq_sendrecv.c new file mode 100644 index 000000000..c151542ce --- /dev/null +++ b/tests-m32/mq_sendrecv.c @@ -0,0 +1,480 @@ +/* + * Check decoding of mq_open, mq_timedsend, mq_notify, mq_timedreceive and + * mq_unlink syscalls. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined __NR_mq_open && __NR_mq_timedsend && __NR_mq_timedreceive && \ + __NR_mq_notify && __NR_mq_unlink + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include "sigevent.h" + +# ifndef MQ_NAME +# define MQ_NAME "mq_sendrecv.sample" +# endif + +# ifndef DUMPIO_READ +# define DUMPIO_READ 0 +# endif + +# ifndef DUMPIO_WRITE +# define DUMPIO_WRITE 0 +# endif + + +enum { + NUM_ATTRS = 8, + MSG_CUT = 8, + MSG_MAX_UNCUT = 32, + MSG_SIZE = 64, + MSG_START = 0x80, +}; + + +static void +printstr(unsigned char start, unsigned int count) +{ + unsigned int i; + + printf("\""); + for (i = 0; i < count; i++) { + printf("\\%hho", (unsigned char) (start + i)); + } + printf("\""); +} + +#if DUMPIO_READ || DUMPIO_WRITE +static void +dumpstr(unsigned char start, unsigned int count) +{ + unsigned int i; + unsigned int j; + + for (i = 0; i < count; i++) { + if (i < count) { + if (!(i % 16)) + printf(" | %05x ", i); + if (!(i % 8)) + printf(" "); + + printf("%02hhx ", (unsigned char) (start + i)); + } + + if ((i % 16 == 15) || (i == (count - 1))) { + if (i % 16 != 15) + printf("%*s", 3 * (15 - i % 16) + + ((i + 8) % 16) / 8, " "); + + printf(" "); + + for (j = 0; j <= (i % 16); j++) + printf("."); + for (j = i % 16; j < 15; j++) + printf(" "); + + printf(" |\n"); + + } + } +} +#endif /* DUMPIO_READ || DUMPIO_WRITE */ + +static void +cleanup(void) +{ + long rc; + + rc = syscall(__NR_mq_unlink, MQ_NAME); + printf("mq_unlink(\"" MQ_NAME "\") = %s\n", sprintrc(rc)); + + puts("+++ exited with 0 +++"); +} + +static void +do_send(int fd, char *msg, unsigned int msg_size, struct timespec *tmout, + bool cropped) +{ + long rc; + long saved_errno; + + do { + rc = syscall(__NR_mq_timedsend, fd, msg, msg_size, 42, + tmout); + saved_errno = errno; + printf("mq_timedsend(%d, ", fd); + printstr(MSG_START, msg_size > MSG_MAX_UNCUT ? MSG_MAX_UNCUT : + msg_size); + if (cropped) + printf("..."); + errno = saved_errno; + printf(", %u, 42, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", msg_size, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + errno = saved_errno; + + if (rc == -1) { + if (errno == EINTR) + continue; + perror_msg_and_skip("mq_timedsend"); + } +# if DUMPIO_WRITE + dumpstr(MSG_START, msg_size); +# endif + } while (rc); +} + +static void +do_recv(int fd, char *msg, unsigned int msg_size, struct timespec *tmout, + bool cropped) +{ + long rc; + long saved_errno; + unsigned prio; + + do { + rc = syscall(__NR_mq_timedreceive, fd, msg, MSG_SIZE, &prio, + tmout); + saved_errno = errno; + printf("mq_timedreceive(%d, ", fd); + if (rc >= 0) { + printstr(MSG_START, rc > MSG_MAX_UNCUT ? MSG_MAX_UNCUT : + rc); + if (cropped) + printf("..."); + } else { + printf("%p", msg); + } + errno = saved_errno; + printf(", %u, [42], {tv_sec=%jd, tv_nsec=%jd}) = %s\n", MSG_SIZE, + (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, sprintrc(rc)); + errno = saved_errno; + + if (rc == -1) { + if (errno == EINTR) + continue; + perror_msg_and_skip("mq_timedreceive"); + } + if ((rc >= 0) && ((unsigned long) rc != msg_size)) + error_msg_and_skip("mq_timedreceive size mismatch" + ": expected %u, got %ld", + msg_size, rc); +# if DUMPIO_READ + dumpstr(MSG_START, rc); +# endif + } while (rc < 0); +} + +int +main(void) +{ + static const kernel_ulong_t bogus_zero = + (kernel_ulong_t) 0x8765432100000000ULL; + static const kernel_ulong_t bogus_oflags = + (kernel_ulong_t) 0xdefaced100000003ULL; + static const kernel_ulong_t bogus_mode = + (kernel_ulong_t) 0xdec0deadfacefeedULL; + static const kernel_ulong_t bogus_fd = + (kernel_ulong_t) 0xfeedfacedeadba5eULL; + static const kernel_ulong_t bogus_zero_size = + (sizeof(kernel_ulong_t) > sizeof(int)) ? (kernel_ulong_t) 0 : + (kernel_ulong_t) 0xface1e5500000000ULL; + static const kernel_ulong_t bogus_size = + (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + static const kernel_ulong_t bogus_prio = + (kernel_ulong_t) 0xdec0ded1defaced3ULL; + static const struct timespec bogus_tmout_data = { + .tv_sec = (time_t) 0xdeadfacebeeff00dLL, + .tv_nsec = (long) 0xfacefee1deadfeedLL, + }; + static const struct timespec future_tmout_data = { + .tv_sec = (time_t) 0x7ea1fade7e57faceLL, + .tv_nsec = 999999999, + };; + struct_sigevent bogus_sev_data = { + .sigev_notify = 0xdefaced, + .sigev_signo = 0xfacefeed, + .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0dedULL + }; + + const char *errstr; + long rc; + kernel_long_t *bogus_attrs = tail_alloc(sizeof(*bogus_attrs) * + NUM_ATTRS); + char *msg = tail_alloc(MSG_SIZE); + unsigned *bogus_prio_ptr = tail_alloc(sizeof(*bogus_prio_ptr)); + struct timespec *bogus_tmout = tail_memdup(&bogus_tmout_data, + sizeof(*bogus_tmout)); + struct timespec *future_tmout = tail_memdup(&future_tmout_data, + sizeof(*future_tmout)); + struct_sigevent *bogus_sev = tail_memdup(&bogus_sev_data, + sizeof(*bogus_sev)); + int fd = -1; + + + fill_memory_ex(msg, MSG_SIZE, MSG_START, MSG_SIZE); + fill_memory_ex(bogus_attrs, sizeof(*bogus_attrs) * NUM_ATTRS, + 0xbb, 0x70); + + + /* mq_open */ + + /* Zero values, non-O_CREAT mode */ + rc = syscall(__NR_mq_open, NULL, bogus_zero, bogus_mode, NULL); + printf("mq_open(NULL, O_RDONLY) = %s\n", sprintrc(rc)); + + /* O_CREAT parsing, other flags, bogs values */ + rc = syscall(__NR_mq_open, msg, O_CREAT | bogus_oflags, bogus_mode, + NULL); + printf("mq_open(%p, O_ACCMODE|O_CREAT, %#o, NULL) = %s\n", + msg, (unsigned short) bogus_mode, sprintrc(rc)); + + /* Partially invalid attributes structure */ + rc = syscall(__NR_mq_open, msg, O_CREAT | bogus_oflags, bogus_mode, + bogus_attrs + 1); + printf("mq_open(%p, O_ACCMODE|O_CREAT, %#o, %p) = %s\n", + msg, (unsigned short) bogus_mode, bogus_attrs + 1, sprintrc(rc)); + + /* Valid attributes structure */ + rc = syscall(__NR_mq_open, msg, O_CREAT | bogus_oflags, bogus_mode, + bogus_attrs); + printf("mq_open(%p, O_ACCMODE|O_CREAT, %#o, {mq_flags=%#llx, " + "mq_maxmsg=%lld, mq_msgsize=%lld, mq_curmsgs=%lld}) = %s\n", + msg, (unsigned short) bogus_mode, + (unsigned long long) (kernel_ulong_t) bogus_attrs[0], + (long long) bogus_attrs[1], + (long long) bogus_attrs[2], + (long long) bogus_attrs[3], sprintrc(rc)); + + + /* mq_timedsend */ + + /* Zero values*/ + rc = syscall(__NR_mq_timedsend, bogus_zero, NULL, bogus_zero_size, + bogus_zero, NULL); + printf("mq_timedsend(0, NULL, 0, 0, NULL) = %s\n", sprintrc(rc)); + + /* Invalid pointers */ + rc = syscall(__NR_mq_timedsend, bogus_fd, msg + MSG_SIZE, bogus_size, + bogus_prio, bogus_tmout + 1); + printf("mq_timedsend(%d, %p, %llu, %u, %p) = %s\n", + (int) bogus_fd, msg + MSG_SIZE, (unsigned long long) bogus_size, + (unsigned) bogus_prio, bogus_tmout + 1, sprintrc(rc)); + + /* Partially invalid message (memory only partially available) */ + rc = syscall(__NR_mq_timedsend, bogus_fd, msg + MSG_SIZE - MSG_CUT, + MSG_SIZE, bogus_prio, bogus_tmout); + printf("mq_timedsend(%d, %p, %llu, %u, {tv_sec=%jd, tv_nsec=%jd}) = " + "%s\n", + (int) bogus_fd, msg + MSG_SIZE - MSG_CUT, + (unsigned long long) MSG_SIZE, (unsigned) bogus_prio, + (intmax_t) bogus_tmout->tv_sec, (intmax_t) bogus_tmout->tv_nsec, + sprintrc(rc)); + + /* Fully valid message, uncut */ + rc = syscall(__NR_mq_timedsend, bogus_fd, msg + MSG_SIZE - MSG_CUT, + MSG_CUT, bogus_prio, bogus_tmout); + errstr = sprintrc(rc); + printf("mq_timedsend(%d, ", (int) bogus_fd); + printstr(MSG_START + MSG_SIZE - MSG_CUT, MSG_CUT); + printf(", %llu, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + (unsigned long long) MSG_CUT, (unsigned) bogus_prio, + (intmax_t) bogus_tmout->tv_sec, (intmax_t) bogus_tmout->tv_nsec, + errstr); + + /* Partially invalid message, cut at maxstrlen */ + rc = syscall(__NR_mq_timedsend, bogus_fd, msg + MSG_CUT, MSG_SIZE, + bogus_prio, bogus_tmout); + errstr = sprintrc(rc); + printf("mq_timedsend(%d, ", (int) bogus_fd); + printstr(MSG_START + MSG_CUT, MSG_MAX_UNCUT); + printf("..., %llu, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + (unsigned long long) MSG_SIZE, (unsigned) bogus_prio, + (intmax_t) bogus_tmout->tv_sec, (intmax_t) bogus_tmout->tv_nsec, + errstr); + + + /* mq_timedreceive */ + + /* Zero values */ + rc = syscall(__NR_mq_timedreceive, bogus_zero, NULL, bogus_zero_size, + NULL, NULL); + printf("mq_timedreceive(0, NULL, 0, NULL, NULL) = %s\n", sprintrc(rc)); + + /* Invalid addresses */ + rc = syscall(__NR_mq_timedreceive, bogus_fd, msg + MSG_SIZE, bogus_size, + bogus_prio_ptr + 1, bogus_tmout + 1); + printf("mq_timedreceive(%d, %p, %llu, %p, %p) = %s\n", + (int) bogus_fd, msg + MSG_SIZE, (unsigned long long) bogus_size, + bogus_prio_ptr + 1, bogus_tmout + 1, sprintrc(rc)); + + /* Invalid fd, valid msg pointer */ + rc = syscall(__NR_mq_timedreceive, bogus_fd, msg, bogus_size, + bogus_prio_ptr, bogus_tmout); + printf("mq_timedreceive(%d, %p, %llu, %p, {tv_sec=%jd, tv_nsec=%jd}) = " + "%s\n", + (int) bogus_fd, msg, (unsigned long long) bogus_size, + bogus_prio_ptr, (intmax_t) bogus_tmout->tv_sec, + (intmax_t) bogus_tmout->tv_nsec, sprintrc(rc)); + + + /* mq_notify */ + + /* Zero values */ + rc = syscall(__NR_mq_notify, bogus_zero, NULL); + printf("mq_notify(0, NULL) = %s\n", sprintrc(rc)); + + /* Invalid pointer */ + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev + 1); + printf("mq_notify(%d, %p) = %s\n", + (int) bogus_fd, bogus_sev + 1, sprintrc(rc)); + + /* Invalid SIGEV_* */ + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev); + printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}" + ", sigev_signo=%u, sigev_notify=%#x /* SIGEV_??? */}) = %s\n", + (int) bogus_fd, bogus_sev->sigev_value.sival_int, + bogus_sev->sigev_value.sival_ptr, + bogus_sev->sigev_signo, bogus_sev->sigev_notify, + sprintrc(rc)); + + /* SIGEV_NONE */ + bogus_sev->sigev_notify = SIGEV_NONE; + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev); + printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, " + "sigev_signo=%u, sigev_notify=SIGEV_NONE}) = %s\n", + (int) bogus_fd, bogus_sev->sigev_value.sival_int, + bogus_sev->sigev_value.sival_ptr, + bogus_sev->sigev_signo, sprintrc(rc)); + + /* SIGEV_SIGNAL */ + bogus_sev->sigev_notify = SIGEV_SIGNAL; + bogus_sev->sigev_signo = SIGALRM; + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev); + printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, " + "sigev_signo=SIGALRM, sigev_notify=SIGEV_SIGNAL}) = %s\n", + (int) bogus_fd, bogus_sev->sigev_value.sival_int, + bogus_sev->sigev_value.sival_ptr, sprintrc(rc)); + + /* SIGEV_THREAD */ + bogus_sev->sigev_notify = SIGEV_THREAD; + bogus_sev->sigev_un.sigev_thread.function = + (unsigned long) 0xdeadbeefbadc0dedULL; + bogus_sev->sigev_un.sigev_thread.attribute = + (unsigned long) 0xcafef00dfacefeedULL; + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev); + printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, " + "sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD, " + "sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}) = " + "%s\n", + (int) bogus_fd, bogus_sev->sigev_value.sival_int, + bogus_sev->sigev_value.sival_ptr, + bogus_sev->sigev_un.sigev_thread.function, + bogus_sev->sigev_un.sigev_thread.attribute, sprintrc(rc)); + + /* mq_unlink */ + + /* Zero values */ + rc = syscall(__NR_mq_unlink, NULL); + printf("mq_unlink(NULL) = %s\n", sprintrc(rc)); + + /* Invalid ptr */ + rc = syscall(__NR_mq_unlink, msg + MSG_SIZE); + printf("mq_unlink(%p) = %s\n", msg + MSG_SIZE, sprintrc(rc)); + + /* Long unterminated string */ + rc = syscall(__NR_mq_unlink, msg); + errstr = sprintrc(rc); + printf("mq_unlink(%p) = %s\n", msg, errstr); + + + /* Sending and receiving test */ + +# if DUMPIO_READ || DUMPIO_WRITE + close(0); +# endif + bogus_attrs[1] = 2; + bogus_attrs[2] = MSG_SIZE; + fd = rc = syscall(__NR_mq_open, MQ_NAME, + O_CREAT|O_RDWR|O_NONBLOCK, S_IRWXU, bogus_attrs); + errstr = sprintrc(rc); + if (rc < 0) + perror_msg_and_skip("mq_open"); + else + atexit(cleanup); +# if DUMPIO_READ || DUMPIO_WRITE + if (fd != 0) + error_msg_and_skip("mq_open returned fd other than 0"); +# endif + fill_memory_ex(bogus_attrs, sizeof(*bogus_attrs) * NUM_ATTRS, + 0xbb, 0x70); + printf("mq_open(\"" MQ_NAME "\", O_RDWR|O_CREAT|O_NONBLOCK, " + "0700, {mq_flags=%#llx, mq_maxmsg=2, mq_msgsize=%u, " + "mq_curmsgs=%lld}) = %s\n", + (unsigned long long) (kernel_ulong_t) bogus_attrs[0], MSG_SIZE, + (long long) bogus_attrs[3], errstr); + + rc = syscall(__NR_mq_getsetattr, fd, NULL, bogus_attrs); + if (rc < 0) + perror_msg_and_skip("mq_getsetattr"); + if ((bogus_attrs[1] < 2) || (bogus_attrs[2] < MSG_SIZE)) + error_msg_and_skip("mq too small"); + + do_send(fd, msg, MSG_CUT, future_tmout, false); + do_send(fd, msg, MSG_SIZE, future_tmout, true); + + memset(msg, '\0', MSG_SIZE); + do_recv(fd, msg, MSG_CUT, future_tmout, false); + + memset(msg, '\0', MSG_SIZE); + do_recv(fd, msg, MSG_SIZE, future_tmout, true); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mq_open && __NR_mq_timedsend && " + "__NR_mq_timedreceive && __NR_mq_notify && __NR_mq_unlink"); + +#endif diff --git a/tests-m32/mq_sendrecv.test b/tests-m32/mq_sendrecv.test new file mode 100755 index 000000000..67f4d63c5 --- /dev/null +++ b/tests-m32/mq_sendrecv.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mq_open, mq_notify, mq_timedsend, mq_timedreceive syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mq_open,mq_notify,mq_timedsend,mq_timedreceive,mq_unlink -a14 diff --git a/tests-m32/msg_control-v.c b/tests-m32/msg_control-v.c new file mode 100644 index 000000000..b0afa523a --- /dev/null +++ b/tests-m32/msg_control-v.c @@ -0,0 +1,3 @@ +/* This file is part of msg_control-v strace test. */ +#define VERBOSE 1 +#include "msg_control.c" diff --git a/tests-m32/msg_control-v.test b/tests-m32/msg_control-v.test new file mode 100755 index 000000000..41f98428f --- /dev/null +++ b/tests-m32/msg_control-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of struct msghdr ancillary data. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -a21 -e trace=sendmsg diff --git a/tests-m32/msg_control.c b/tests-m32/msg_control.c new file mode 100644 index 000000000..709a30758 --- /dev/null +++ b/tests-m32/msg_control.c @@ -0,0 +1,715 @@ +/* + * Check decoding of struct msghdr ancillary data. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef SOL_IP +# define SOL_IP 0 +#endif +#ifndef SOL_TCP +# define SOL_TCP 6 +#endif + +#ifndef SCM_SECURITY +# define SCM_SECURITY 3 +#endif + +#define MIN_SIZE_OF(type, member) \ + (offsetof(type, member) + sizeof(((type *) 0)->member)) + +static struct cmsghdr * +get_cmsghdr(void *const page, const size_t len) +{ + return page - CMSG_ALIGN(len); +} + +#define DEFAULT_STRLEN 32 + +static void +print_fds(const struct cmsghdr *const cmsg, const size_t cmsg_len) +{ + size_t nfd = cmsg_len > CMSG_LEN(0) + ? (cmsg_len - CMSG_LEN(0)) / sizeof(int) : 0; + if (!nfd) + return; + + printf(", cmsg_data=["); + int *fdp = (int *) CMSG_DATA(cmsg); + size_t i; + for (i = 0; i < nfd; ++i) { + if (i) + printf(", "); +#if !VERBOSE + if (i >= DEFAULT_STRLEN) { + printf("..."); + break; + } +#endif + printf("%d", fdp[i]); + } + printf("]"); +} + +static void +test_scm_rights1(struct msghdr *const mh, + const size_t msg_controllen, + void *const page, + const void *const src, + const size_t cmsg_len) +{ + const size_t aligned_cms_len = + cmsg_len > CMSG_LEN(0) ? CMSG_ALIGN(cmsg_len) : CMSG_LEN(0); + if (cmsg_len >= CMSG_LEN(0) + && aligned_cms_len + CMSG_LEN(0) <= msg_controllen) + return; + + struct cmsghdr *cmsg = get_cmsghdr(page, msg_controllen); + + if (msg_controllen >= MIN_SIZE_OF(struct cmsghdr, cmsg_len)) + cmsg->cmsg_len = cmsg_len; + if (msg_controllen >= MIN_SIZE_OF(struct cmsghdr, cmsg_level)) + cmsg->cmsg_level = SOL_SOCKET; + if (msg_controllen >= MIN_SIZE_OF(struct cmsghdr, cmsg_type)) + cmsg->cmsg_type = SCM_RIGHTS; + + size_t src_len = + cmsg_len < msg_controllen ? cmsg_len : msg_controllen; + if (src_len > CMSG_LEN(0)) + memcpy(CMSG_DATA(cmsg), src, src_len - CMSG_LEN(0)); + + mh->msg_control = cmsg; + mh->msg_controllen = msg_controllen; + + int rc = sendmsg(-1, mh, 0); + int saved_errno = errno; + + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0"); + if (msg_controllen < CMSG_LEN(0)) { + if (msg_controllen) + printf(", msg_control=%p", cmsg); + } else { + printf(", msg_control=[{cmsg_len=%lu, cmsg_level=SOL_SOCKET" + ", cmsg_type=SCM_RIGHTS", (unsigned long) cmsg_len); + print_fds(cmsg, src_len); + printf("}"); + if (aligned_cms_len < msg_controllen) + printf(", %p", (void *) cmsg + aligned_cms_len); + printf("]"); + } + + errno = saved_errno; + printf(", msg_controllen=%lu, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned long) msg_controllen, rc, errno2name()); +} + +static void +test_scm_rights2(struct msghdr *const mh, + const size_t msg_controllen, + void *const page, + const int *const *const src, + const size_t *const cmsg_len) +{ + const size_t aligned_cms_len[2] = { + cmsg_len[0] > CMSG_LEN(0) ? CMSG_ALIGN(cmsg_len[0]) : CMSG_LEN(0), + cmsg_len[1] > CMSG_LEN(0) ? CMSG_ALIGN(cmsg_len[1]) : CMSG_LEN(0) + }; + if (cmsg_len[0] < CMSG_LEN(0) + || aligned_cms_len[0] + CMSG_LEN(0) > msg_controllen + || aligned_cms_len[0] + aligned_cms_len[1] + CMSG_LEN(0) <= msg_controllen) + return; + + struct cmsghdr *const cmsg[2] = { + get_cmsghdr(page, msg_controllen), + (void *) get_cmsghdr(page, msg_controllen) + aligned_cms_len[0] + }; + cmsg[0]->cmsg_len = cmsg_len[0]; + cmsg[0]->cmsg_level = SOL_SOCKET; + cmsg[0]->cmsg_type = SCM_RIGHTS; + if (cmsg_len[0] > CMSG_LEN(0)) + memcpy(CMSG_DATA(cmsg[0]), src[0], cmsg_len[0] - CMSG_LEN(0)); + + const size_t msg_controllen1 = msg_controllen - aligned_cms_len[0]; + if (msg_controllen1 >= MIN_SIZE_OF(struct cmsghdr, cmsg_len)) + cmsg[1]->cmsg_len = cmsg_len[1]; + if (msg_controllen >= MIN_SIZE_OF(struct cmsghdr, cmsg_level)) + cmsg[1]->cmsg_level = SOL_SOCKET; + if (msg_controllen >= MIN_SIZE_OF(struct cmsghdr, cmsg_type)) + cmsg[1]->cmsg_type = SCM_RIGHTS; + size_t src1_len = + cmsg_len[1] < msg_controllen1 ? cmsg_len[1] : msg_controllen1; + if (src1_len > CMSG_LEN(0)) + memcpy(CMSG_DATA(cmsg[1]), src[1], src1_len - CMSG_LEN(0)); + + mh->msg_control = cmsg[0]; + mh->msg_controllen = msg_controllen; + + int rc = sendmsg(-1, mh, 0); + int saved_errno = errno; + + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%lu" + ", cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS", + (unsigned long) cmsg_len[0]); + print_fds(cmsg[0], cmsg_len[0]); + printf("}, {cmsg_len=%lu, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS", + (unsigned long) cmsg_len[1]); + print_fds(cmsg[1], src1_len); + printf("}"); + if (aligned_cms_len[1] < msg_controllen1) + printf(", %p", (void *) cmsg[1] + aligned_cms_len[1]); + printf("]"); + + errno = saved_errno; + printf(", msg_controllen=%lu, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned long) msg_controllen, rc, errno2name()); +} + +static void +test_scm_rights3(struct msghdr *const mh, void *const page, const size_t nfds) +{ + const size_t len = CMSG_SPACE(sizeof(int) * nfds); + struct cmsghdr *cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(sizeof(int) * nfds); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + int *fdp = (int *) CMSG_DATA(cmsg); + size_t i; + for (i = 0; i < nfds; ++i) + fdp[i] = i; + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u" + ", cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS", + (unsigned) cmsg->cmsg_len); + print_fds(cmsg, cmsg->cmsg_len); + printf("}], msg_controllen=%lu, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned long) len, rc, errno2name()); +} + +static void +print_security(const struct cmsghdr *const cmsg, const size_t cmsg_len) +{ + int n = cmsg_len > CMSG_LEN(0) ? cmsg_len - CMSG_LEN(0) : 0; + if (!n) + return; + + printf(", cmsg_data=\"%.*s\"", n, CMSG_DATA(cmsg)); +} + +static void +test_scm_security(struct msghdr *const mh, + const size_t msg_controllen, + void *const page, + const void *const src, + const size_t cmsg_len, + const int cmsg_level, + const char *const cmsg_level_str) +{ + const size_t aligned_cms_len = + cmsg_len > CMSG_LEN(0) ? CMSG_ALIGN(cmsg_len) : CMSG_LEN(0); + if (cmsg_len >= CMSG_LEN(0) + && aligned_cms_len + CMSG_LEN(0) <= msg_controllen) + return; + + struct cmsghdr *cmsg = get_cmsghdr(page, msg_controllen); + + cmsg->cmsg_len = cmsg_len; + cmsg->cmsg_level = cmsg_level; + cmsg->cmsg_type = SCM_SECURITY; + + size_t src_len = + cmsg_len < msg_controllen ? cmsg_len : msg_controllen; + if (src_len > CMSG_LEN(0)) + memcpy(CMSG_DATA(cmsg), src, src_len - CMSG_LEN(0)); + + mh->msg_control = cmsg; + mh->msg_controllen = msg_controllen; + + int rc = sendmsg(-1, mh, 0); + int saved_errno = errno; + + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%lu, cmsg_level=%s" + ", cmsg_type=SCM_SECURITY", + (unsigned long) cmsg_len, cmsg_level_str); + print_security(cmsg, src_len); + printf("}"); + if (aligned_cms_len < msg_controllen) + printf(", %p", (void *) cmsg + aligned_cms_len); + printf("]"); + + errno = saved_errno; + printf(", msg_controllen=%lu, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned long) msg_controllen, rc, errno2name()); +} + +static void +test_unknown_type(struct msghdr *const mh, + void *const page, + const int cmsg_level, + const char *const cmsg_level_str, + const char *const cmsg_type_str) +{ + struct cmsghdr *cmsg = get_cmsghdr(page, CMSG_LEN(0)); + + cmsg->cmsg_len = CMSG_LEN(0); + cmsg->cmsg_level = cmsg_level; + cmsg->cmsg_type = 0xfacefeed; + + mh->msg_control = cmsg; + mh->msg_controllen = cmsg->cmsg_len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u, cmsg_level=%s" + ", cmsg_type=%#x /* %s */}], msg_controllen=%u, msg_flags=0}" + ", 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, cmsg_level_str, cmsg->cmsg_type, + cmsg_type_str, (unsigned) mh->msg_controllen, rc, errno2name()); +} + +static void +test_sol_socket(struct msghdr *const mh, void *const page) +{ + static const int fds0[] = { -10, -11, -12, -13 }; + static const int fds1[] = { -15, -16, -17, -18 }; + size_t msg_controllen, max_msg_controllen; + + max_msg_controllen = CMSG_SPACE(sizeof(fds0)) + sizeof(*fds0) - 1; + for (msg_controllen = 0; + msg_controllen <= max_msg_controllen; + msg_controllen++) { + size_t cmsg_len; + + for (cmsg_len = 0; + cmsg_len <= msg_controllen + CMSG_LEN(0); + cmsg_len++) { + test_scm_rights1(mh, msg_controllen, + page, fds0, cmsg_len); + } + } + + max_msg_controllen = + CMSG_SPACE(sizeof(fds0)) + CMSG_SPACE(sizeof(fds1)) + + sizeof(*fds0) - 1; + for (msg_controllen = CMSG_LEN(0) * 2; + msg_controllen <= max_msg_controllen; + msg_controllen++) { + static const int *const fdps[] = { fds0, fds1 }; + size_t cmsg_len[2]; + + for (cmsg_len[0] = CMSG_LEN(0); + CMSG_ALIGN(cmsg_len[0]) + CMSG_LEN(0) <= msg_controllen + && CMSG_ALIGN(cmsg_len[0]) <= CMSG_SPACE(sizeof(fds0)); + cmsg_len[0]++) { + const size_t msg_controllen1 = + msg_controllen - CMSG_ALIGN(cmsg_len[0]); + + for (cmsg_len[1] = 0; + cmsg_len[1] <= msg_controllen1 + CMSG_LEN(0); + cmsg_len[1]++) { + test_scm_rights2(mh, msg_controllen, + page, fdps, cmsg_len); + } + } + } + + static const char text[16] = "0123456789abcdef"; + max_msg_controllen = CMSG_SPACE(sizeof(text)) + CMSG_LEN(0) - 1; + for (msg_controllen = CMSG_LEN(0); + msg_controllen <= max_msg_controllen; + msg_controllen++) { + size_t cmsg_len; + + for (cmsg_len = 0; + cmsg_len <= msg_controllen + CMSG_LEN(0) + && cmsg_len <= CMSG_LEN(sizeof(text)); + cmsg_len++) { + test_scm_security(mh, msg_controllen, + page, text, cmsg_len, + ARG_STR(SOL_SOCKET)); + } + } + + test_scm_rights3(mh, page, DEFAULT_STRLEN - 1); + test_scm_rights3(mh, page, DEFAULT_STRLEN); + test_scm_rights3(mh, page, DEFAULT_STRLEN + 1); + + test_unknown_type(mh, page, ARG_STR(SOL_SOCKET), "SCM_???"); +} + +static void +test_ip_pktinfo(struct msghdr *const mh, void *const page, + const int cmsg_type, const char *const cmsg_type_str) +{ + const unsigned int len = CMSG_SPACE(sizeof(struct in_pktinfo)); + struct cmsghdr *const cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo)); + cmsg->cmsg_level = SOL_IP; + cmsg->cmsg_type = cmsg_type; + + struct in_pktinfo *const info = (struct in_pktinfo *) CMSG_DATA(cmsg); +#ifdef HAVE_IF_INDEXTONAME + info->ipi_ifindex = if_nametoindex("lo"); +#else + info->ipi_ifindex = 1; +#endif + info->ipi_spec_dst.s_addr = inet_addr("1.2.3.4"); + info->ipi_addr.s_addr = inet_addr("5.6.7.8"); + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u, cmsg_level=SOL_IP" + ", cmsg_type=%s, cmsg_data={ipi_ifindex=%s" + ", ipi_spec_dst=inet_addr(\"%s\")" + ", ipi_addr=inet_addr(\"%s\")}}]" + ", msg_controllen=%u, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, cmsg_type_str, +#ifdef HAVE_IF_INDEXTONAME + "if_nametoindex(\"lo\")", +#else + "1", +#endif + "1.2.3.4", "5.6.7.8", len, rc, errno2name()); +} + +static void +test_ip_uint(struct msghdr *const mh, void *const page, + const int cmsg_type, const char *const cmsg_type_str) +{ + const unsigned int len = CMSG_SPACE(sizeof(int)); + struct cmsghdr *const cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(sizeof(int)); + cmsg->cmsg_level = SOL_IP; + cmsg->cmsg_type = cmsg_type; + + unsigned int *u = (void *) CMSG_DATA(cmsg); + *u = 0xfacefeed; + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u" + ", cmsg_level=SOL_IP, cmsg_type=%s, cmsg_data=[%u]}]" + ", msg_controllen=%u, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, cmsg_type_str, *u, len, + rc, errno2name()); +} + +static void +test_ip_uint8_t(struct msghdr *const mh, void *const page, + const int cmsg_type, const char *const cmsg_type_str) +{ + const unsigned int len = CMSG_SPACE(1); + struct cmsghdr *const cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(1); + cmsg->cmsg_level = SOL_IP; + cmsg->cmsg_type = cmsg_type; + *CMSG_DATA(cmsg) = 'A'; + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u" + ", cmsg_level=SOL_IP, cmsg_type=%s, cmsg_data=[%#x]}]" + ", msg_controllen=%u, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, cmsg_type_str, + (unsigned) (uint8_t) 'A', len, rc, errno2name()); +} + +static void +print_ip_opts(const void *const cmsg_data, const unsigned int data_len) +{ + const unsigned char *const opts = cmsg_data; + unsigned int i; + for (i = 0; i < data_len; ++i) { + if (i) + printf(", "); +#if !VERBOSE + if (i >= DEFAULT_STRLEN) { + printf("..."); + break; + } +#endif + printf("0x%02x", opts[i]); + } +} + +static void +test_ip_opts(struct msghdr *const mh, void *const page, + const int cmsg_type, const char *const cmsg_type_str, + const unsigned int opts_len) +{ + unsigned int len = CMSG_SPACE(opts_len); + struct cmsghdr *cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(opts_len); + cmsg->cmsg_level = SOL_IP; + cmsg->cmsg_type = cmsg_type; + unsigned int i; + for (i = 0; i < opts_len; ++i) + CMSG_DATA(cmsg)[i] = 'A' + i; + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u" + ", cmsg_level=SOL_IP, cmsg_type=%s, cmsg_data=[", + (unsigned) cmsg->cmsg_len, cmsg_type_str); + print_ip_opts(CMSG_DATA(cmsg), opts_len); + printf("]}], msg_controllen=%u, msg_flags=0}, 0) = %d %s (%m)\n", + len, rc, errno2name()); +} + +#ifdef IP_CHECKSUM +struct sock_ee { + uint32_t ee_errno; + uint8_t ee_origin; + uint8_t ee_type; + uint8_t ee_code; + uint8_t ee_pad; + uint32_t ee_info; + uint32_t ee_data; + struct sockaddr_in offender; +}; + +static void +test_ip_recverr(struct msghdr *const mh, void *const page, + const int cmsg_type, const char *const cmsg_type_str) +{ + const unsigned int len = CMSG_SPACE(sizeof(struct sock_ee)); + struct cmsghdr *const cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(sizeof(struct sock_ee)); + cmsg->cmsg_level = SOL_IP; + cmsg->cmsg_type = cmsg_type; + + struct sock_ee *const e = (struct sock_ee *) CMSG_DATA(cmsg); + e->ee_errno = 0xdeadbeef; + e->ee_origin = 2; + e->ee_type = 3; + e->ee_code = 4; + e->ee_info = 0xfacefeed; + e->ee_data = 0xbadc0ded; + e->offender.sin_family = AF_INET, + e->offender.sin_port = htons(12345), + e->offender.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u, cmsg_level=SOL_IP" + ", cmsg_type=%s, cmsg_data={ee_errno=%u, ee_origin=%u" + ", ee_type=%u, ee_code=%u, ee_info=%u, ee_data=%u" + ", offender={sa_family=AF_INET, sin_port=htons(%hu)" + ", sin_addr=inet_addr(\"127.0.0.1\")}}}]" + ", msg_controllen=%u, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, cmsg_type_str, + e->ee_errno, e->ee_origin, e->ee_type, + e->ee_code, e->ee_info, e->ee_data, + ntohs(e->offender.sin_port), + len, rc, errno2name()); +} +#endif + +#ifdef IP_ORIGDSTADDR +static void +test_ip_origdstaddr(struct msghdr *const mh, void *const page, + const int cmsg_type, const char *const cmsg_type_str) +{ + const unsigned int len = CMSG_SPACE(sizeof(struct sockaddr_in)); + struct cmsghdr *const cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(sizeof(struct sockaddr_in)); + cmsg->cmsg_level = SOL_IP; + cmsg->cmsg_type = cmsg_type; + + struct sockaddr_in *const sin = (struct sockaddr_in *) CMSG_DATA(cmsg); + sin->sin_family = AF_INET, + sin->sin_port = htons(12345), + sin->sin_addr.s_addr = htonl(INADDR_LOOPBACK); + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u, cmsg_level=SOL_IP" + ", cmsg_type=%s, cmsg_data={sa_family=AF_INET" + ", sin_port=htons(%hu), sin_addr=inet_addr(\"127.0.0.1\")}}]" + ", msg_controllen=%u, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, cmsg_type_str, + ntohs(sin->sin_port), len, rc, errno2name()); +} +#endif + +static void +test_sol_ip(struct msghdr *const mh, void *const page) +{ + test_ip_pktinfo(mh, page, ARG_STR(IP_PKTINFO)); + test_ip_uint(mh, page, ARG_STR(IP_TTL)); + test_ip_uint8_t(mh, page, ARG_STR(IP_TOS)); + test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 1); + test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 2); + test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 3); + test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 4); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 5); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 6); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 7); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 8); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), DEFAULT_STRLEN - 1); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), DEFAULT_STRLEN); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), DEFAULT_STRLEN + 1); +#ifdef IP_CHECKSUM + test_ip_recverr(mh, page, ARG_STR(IP_RECVERR)); +#endif +#ifdef IP_ORIGDSTADDR + test_ip_origdstaddr(mh, page, ARG_STR(IP_ORIGDSTADDR)); +#endif +#ifdef IP_CHECKSUM + test_ip_uint(mh, page, ARG_STR(IP_CHECKSUM)); +#endif + test_scm_security(mh, CMSG_LEN(0), page, 0, CMSG_LEN(0), + ARG_STR(SOL_IP)); + test_unknown_type(mh, page, ARG_STR(SOL_IP), "IP_???"); +} + +static void +test_unknown_level(struct msghdr *const mh, void *const page) +{ + struct cmsghdr *cmsg = get_cmsghdr(page, CMSG_LEN(0)); + + cmsg->cmsg_len = CMSG_LEN(0); + cmsg->cmsg_level = SOL_TCP; + cmsg->cmsg_type = 0xdeadbeef; + + mh->msg_control = cmsg; + mh->msg_controllen = cmsg->cmsg_len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u, cmsg_level=%s" + ", cmsg_type=%#x}], msg_controllen=%u, msg_flags=0}" + ", 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, "SOL_TCP", cmsg->cmsg_type, + (unsigned) mh->msg_controllen, rc, errno2name()); +} + +static void +test_big_len(struct msghdr *const mh) +{ + int optmem_max; + + if (read_int_from_file("/proc/sys/net/core/optmem_max", &optmem_max) + || optmem_max <= 0 || optmem_max > 0x100000) + optmem_max = sizeof(long long) * (2 * IOV_MAX + 512); + optmem_max = (optmem_max + sizeof(long long) - 1) + & ~(sizeof(long long) - 1); + + const size_t len = optmem_max * 2; + struct cmsghdr *const cmsg = tail_alloc(len); + cmsg->cmsg_len = len; + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + if (EBADF != errno) + perror_msg_and_skip("sendmsg"); + + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u" + ", cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS", + (unsigned) cmsg->cmsg_len); + print_fds(cmsg, optmem_max); + printf("}, ...], msg_controllen=%lu, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned long) len, rc, errno2name()); +} + +int main(int ac, const char **av) +{ + int rc = sendmsg(-1, 0, 0); + printf("sendmsg(-1, NULL, 0) = %d %s (%m)\n", rc, errno2name()); + + struct msghdr *mh = tail_alloc(sizeof(*mh)); + memset(mh, 0, sizeof(*mh)); + test_big_len(mh); + + rc = sendmsg(-1, mh + 1, 0); + printf("sendmsg(-1, %p, 0) = %d %s (%m)\n", + mh + 1, rc, errno2name()); + + void *page = tail_alloc(1) + 1; + mh->msg_control = page; + mh->msg_controllen = CMSG_LEN(0); + rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=%p, msg_controllen=%u" + ", msg_flags=0}, 0) = %d %s (%m)\n", + page, (unsigned) CMSG_LEN(0), rc, errno2name()); + + test_sol_socket(mh, page); + test_sol_ip(mh, page); + test_unknown_level(mh, page); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/msg_control.test b/tests-m32/msg_control.test new file mode 100755 index 000000000..809ec7bb0 --- /dev/null +++ b/tests-m32/msg_control.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of struct msghdr ancillary data. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 -e trace=sendmsg diff --git a/tests-m32/msg_name.c b/tests-m32/msg_name.c new file mode 100644 index 000000000..c2ddda2ac --- /dev/null +++ b/tests-m32/msg_name.c @@ -0,0 +1,160 @@ +/* + * Check decoding of struct msghdr.msg_name* arguments of recvmsg syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static int +send_recv(const int send_fd, const int recv_fd, + struct msghdr *const msg, const int flags) +{ + if (send(send_fd, "A", 1, 0) != 1) + perror_msg_and_skip("send"); + return recvmsg(recv_fd, msg, flags); +} + +static void +test_msg_name(const int send_fd, const int recv_fd) +{ + char *const recv_buf = tail_alloc(sizeof(*recv_buf)); + struct iovec *const iov = tail_alloc(sizeof(*iov)); + iov->iov_base = recv_buf; + iov->iov_len = sizeof(*recv_buf); + + struct sockaddr_un *const addr = tail_alloc(sizeof(*addr)); + struct msghdr *const msg = tail_alloc(sizeof(*msg)); + msg->msg_name = addr; + msg->msg_namelen = sizeof(*addr); + msg->msg_iov = iov; + msg->msg_iovlen = 1; + msg->msg_control = 0; + msg->msg_controllen = 0; + msg->msg_flags = 0; + + int rc = send_recv(send_fd, recv_fd, msg, MSG_DONTWAIT); + if (rc < 0) + perror_msg_and_skip("recvmsg"); + printf("recvmsg(%d, {msg_name={sa_family=AF_UNIX, sun_path=\"%s\"}" + ", msg_namelen=%d->%d, msg_iov=[{iov_base=\"A\", iov_len=1}]" + ", msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT)" + " = %d\n", + recv_fd, addr->sun_path, (int) sizeof(struct sockaddr_un), + (int) msg->msg_namelen, rc); + + memset(addr, 0, sizeof(*addr)); + rc = send_recv(send_fd, recv_fd, msg, MSG_DONTWAIT); + printf("recvmsg(%d, {msg_name={sa_family=AF_UNIX, sun_path=\"%s\"}" + ", msg_namelen=%d, msg_iov=[{iov_base=\"A\", iov_len=1}]" + ", msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT)" + " = %d\n", + recv_fd, addr->sun_path, (int) msg->msg_namelen, rc); + + msg->msg_name = 0; + rc = send_recv(send_fd, recv_fd, msg, MSG_DONTWAIT); + printf("recvmsg(%d, {msg_name=NULL, msg_namelen=%d" + ", msg_iov=[{iov_base=\"A\", iov_len=1}], msg_iovlen=1" + ", msg_controllen=0, msg_flags=0}, MSG_DONTWAIT) = %d\n", + recv_fd, (int) msg->msg_namelen, rc); + + const size_t offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); + msg->msg_name = addr; + msg->msg_namelen = offsetof_sun_path; + memset(addr->sun_path, 'A', sizeof(addr->sun_path)); + + rc = send_recv(send_fd, recv_fd, msg, MSG_DONTWAIT); + printf("recvmsg(%d, {msg_name={sa_family=AF_UNIX}, msg_namelen=%d->%d" + ", msg_iov=[{iov_base=\"A\", iov_len=1}], msg_iovlen=1" + ", msg_controllen=0, msg_flags=0}, MSG_DONTWAIT) = %d\n", + recv_fd, (int) offsetof_sun_path, (int) msg->msg_namelen, rc); + + msg->msg_namelen = sizeof(struct sockaddr); + msg->msg_name = ((void *) (addr + 1)) - msg->msg_namelen; + rc = send_recv(send_fd, recv_fd, msg, MSG_DONTWAIT); + printf("recvmsg(%d, {msg_name={sa_family=AF_UNIX, sun_path=\"%.*s\"}" + ", msg_namelen=%d->%d, msg_iov=[{iov_base=\"A\", iov_len=1}]" + ", msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT)" + " = %d\n", + recv_fd, (int) (sizeof(struct sockaddr) - offsetof_sun_path), + ((struct sockaddr_un *) msg->msg_name)->sun_path, + (int) sizeof(struct sockaddr), (int) msg->msg_namelen, rc); + + rc = send_recv(send_fd, recv_fd, msg, MSG_DONTWAIT); + printf("recvmsg(%d, {msg_namelen=%d}, MSG_DONTWAIT) = %d %s (%m)\n", + recv_fd, (int) msg->msg_namelen, rc, errno2name()); + + /* + * When recvmsg is called with a valid descriptor + * but inaccessible memory, it causes segfaults on some architectures. + * As in these cases we test decoding of failed recvmsg calls, + * it's ok to fail recvmsg with any reason as long as + * it doesn't read that inaccessible memory. + */ + + /* + * Sadly, musl recvmsg wrapper blindly dereferences 2nd argument, + * so limit this test to glibc that doesn't. + */ +#ifdef __GLIBC__ + rc = send_recv(send_fd, -1, msg + 1, 0); + printf("recvmsg(-1, %p, 0) = %d %s (%m)\n", + msg + 1, rc, errno2name()); +#endif + + rc = send_recv(send_fd, -1, 0, 0); + printf("recvmsg(-1, NULL, 0) = %d %s (%m)\n", + rc, errno2name()); +} + +int +main(void) +{ + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + + const struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = "msg_name-recvmsg.test.send.socket" + }; + + (void) unlink(un.sun_path); + if (bind(fds[1], (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + (void) unlink(un.sun_path); + + test_msg_name(fds[1], fds[0]); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/msg_name.test b/tests-m32/msg_name.test new file mode 100755 index 000000000..ac06dd55f --- /dev/null +++ b/tests-m32/msg_name.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of struct msghdr.msg_name* arguments of recvmsg syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 -e trace=recvmsg diff --git a/tests-m32/munlockall.c b/tests-m32/munlockall.c new file mode 100644 index 000000000..9ac69423f --- /dev/null +++ b/tests-m32/munlockall.c @@ -0,0 +1,13 @@ +#include "tests.h" + +#include +#include + +int +main(void) +{ + printf("munlockall() = %d\n", munlockall()); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/munlockall.test b/tests-m32/munlockall.test new file mode 100755 index 000000000..e25d60a85 --- /dev/null +++ b/tests-m32/munlockall.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check munlockall syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff --git a/tests-m32/nanosleep.c b/tests-m32/nanosleep.c new file mode 100644 index 000000000..9f0e626f1 --- /dev/null +++ b/tests-m32/nanosleep.c @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static void +handler(int signo) +{ +} + +int +main(void) +{ + struct { + struct timespec ts; + uint32_t pad[2]; + } req = { + .ts.tv_nsec = 0xc0de1, + .pad = { 0xdeadbeef, 0xbadc0ded } + }, rem = { + .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, + .pad = { 0xdeadbeef, 0xbadc0ded } + }; + const sigset_t set = {}; + const struct sigaction act = { .sa_handler = handler }; + const struct itimerval itv = { .it_value.tv_usec = 111111 }; + + if (nanosleep(&req.ts, NULL)) + perror_msg_and_fail("nanosleep"); + printf("nanosleep({tv_sec=%jd, tv_nsec=%jd}, NULL) = 0\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); + + assert(nanosleep(NULL, &rem.ts) == -1); + printf("nanosleep(NULL, %p) = -1 EFAULT (%m)\n", &rem.ts); + + if (nanosleep(&req.ts, &rem.ts)) + perror_msg_and_fail("nanosleep"); + printf("nanosleep({tv_sec=%jd, tv_nsec=%jd}, %p) = 0\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); + + req.ts.tv_nsec = 1000000000; + assert(nanosleep(&req.ts, &rem.ts) == -1); + printf("nanosleep({tv_sec=%jd, tv_nsec=%jd}, %p) = -1 EINVAL (%m)\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); + + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); + + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_skip("setitimer"); + printf("setitimer(ITIMER_REAL, {it_interval={tv_sec=%jd, tv_usec=%jd}" + ", it_value={tv_sec=%jd, tv_usec=%jd}}, NULL) = 0\n", + (intmax_t) itv.it_interval.tv_sec, + (intmax_t) itv.it_interval.tv_usec, + (intmax_t) itv.it_value.tv_sec, + (intmax_t) itv.it_value.tv_usec); + + req.ts.tv_nsec = 999999999; + assert(nanosleep(&req.ts, &rem.ts) == -1); + printf("nanosleep({tv_sec=%jd, tv_nsec=%jd}, {tv_sec=%jd, tv_nsec=%jd})" + " = ? ERESTART_RESTARTBLOCK (Interrupted by signal)\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, + (intmax_t) rem.ts.tv_sec, (intmax_t) rem.ts.tv_nsec); + puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/nanosleep.test b/tests-m32/nanosleep.test new file mode 100755 index 000000000..055a8dcd7 --- /dev/null +++ b/tests-m32/nanosleep.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check nanosleep and setitimer syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 -e trace=nanosleep,setitimer diff --git a/tests-m32/net-accept-connect.c b/tests-m32/net-accept-connect.c new file mode 100644 index 000000000..04c05a60d --- /dev/null +++ b/tests-m32/net-accept-connect.c @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2013-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +static void +handler(int sig) +{ + assert(close(1) == 0); + _exit(0); +} + +int +main(int ac, const char **av) +{ + struct sockaddr_un addr = { + .sun_family = AF_UNIX, + }; + socklen_t len; + + assert(ac == 2); + assert(strlen(av[1]) > 0); + + strncpy(addr.sun_path, av[1], sizeof(addr.sun_path)); + len = offsetof(struct sockaddr_un, sun_path) + strlen(av[1]) + 1; + if (len > sizeof(addr)) + len = sizeof(addr); + + unlink(av[1]); + close(0); + close(1); + + if (socket(AF_UNIX, SOCK_STREAM, 0)) + perror_msg_and_skip("socket"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); + + memset(&addr, 0, sizeof addr); + assert(getsockname(0, (struct sockaddr *) &addr, &len) == 0); + if (len > sizeof(addr)) + len = sizeof(addr); + + pid_t pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (pid) { + assert(accept(0, (struct sockaddr *) &addr, &len) == 1); + assert(close(0) == 0); + assert(kill(pid, SIGUSR1) == 0); + int status; + assert(waitpid(pid, &status, 0) == pid); + assert(status == 0); + assert(close(1) == 0); + } else { + sigset_t set; + sigemptyset(&set); + sigaddset(&set, SIGUSR1); + + assert(sigprocmask(SIG_BLOCK, &set, NULL) == 0); + assert(signal(SIGUSR1, handler) != SIG_ERR); + assert(socket(AF_UNIX, SOCK_STREAM, 0) == 1); + assert(close(0) == 0); + assert(connect(1, (struct sockaddr *) &addr, len) == 0); + assert(sigprocmask(SIG_UNBLOCK, &set, NULL) == 0); + assert(pause() == 99); + return 1; + } + + unlink(av[1]); + return 0; +} diff --git a/tests-m32/net-icmp_filter.c b/tests-m32/net-icmp_filter.c new file mode 100644 index 000000000..f3f99f142 --- /dev/null +++ b/tests-m32/net-icmp_filter.c @@ -0,0 +1,84 @@ +/* + * Check decoding of ICMP_FILTER. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + getsockopt(-1, SOL_RAW, ICMP_FILTER, 0, 0); + printf("getsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, NULL) = -1 %s (%m)\n", + errno2name()); + + setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0); + printf("setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0) = -1 %s (%m)\n", + errno2name()); + + socklen_t *const plen = tail_alloc(sizeof(*plen)); + void *const efault = plen + 1; + struct icmp_filter *const f = tail_alloc(sizeof(*f)); + + getsockopt(-1, SOL_RAW, ICMP_FILTER, f, plen); + printf("getsockopt(-1, SOL_RAW, ICMP_FILTER, %p, %p) = -1 %s (%m)\n", + f, plen, errno2name()); + + setsockopt(-1, SOL_RAW, ICMP_FILTER, efault, sizeof(*f)); + printf("setsockopt(-1, SOL_RAW, ICMP_FILTER, %p, %u) = -1 %s (%m)\n", + efault, (unsigned) sizeof(*f), errno2name()); + + f->data = ~( + 1< + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_BLUETOOTH_BLUETOOTH_H +# include +# include +# include +# include +# include +#endif + +#ifdef HAVE_IF_INDEXTONAME +/* used to conflict with */ +extern unsigned int if_nametoindex(const char *); +#endif + +static void +check_un(void) +{ + struct sockaddr_un *un = tail_alloc(sizeof(*un)); + un->sun_family = AF_UNIX; + memset(un->sun_path, '0', sizeof(un->sun_path)); + unsigned int len = sizeof(*un); + int ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path), 0, len, ret); + + un->sun_path[1] = 0; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=\"%u\"}, %u)" + " = %d EBADF (%m)\n", 0, len, ret); + + un->sun_path[0] = 0; + un->sun_path[2] = 1; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=@\"\\0\\001%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path) - 3, 0, len, ret); + + un = ((void *) un) - 2; + un->sun_family = AF_UNIX; + memset(un->sun_path, '0', sizeof(un->sun_path)); + len = sizeof(*un) + 2; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path), 0, len, ret); + + un->sun_path[0] = 0; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=@\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path) - 1, 0, len, ret); + + un = ((void *) un) + 4; + un->sun_family = AF_UNIX; + len = sizeof(*un) - 2; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path) - 2, 0, len, ret); + + un->sun_path[0] = 0; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=@\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path) - 3, 0, len, ret); + + len = sizeof(*un); + ret = connect(-1, (void *) un, len); + printf("connect(-1, %p, %u) = %d EBADF (%m)\n", un, len, ret); + + un = tail_alloc(sizeof(struct sockaddr_storage)); + un->sun_family = AF_UNIX; + memset(un->sun_path, '0', sizeof(un->sun_path)); + len = sizeof(struct sockaddr_storage) + 1; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path), 0, len, ret); + + un->sun_path[0] = 0; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=@\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path) - 1, 0, len, ret); +} + +static void +check_in(void) +{ + const unsigned short h_port = 12345; + static const char h_addr[] = "12.34.56.78"; + + struct sockaddr_in *in = tail_alloc(sizeof(*in)); + in->sin_family = AF_INET; + in->sin_port = htons(h_port); + in->sin_addr.s_addr = inet_addr(h_addr); + unsigned int len = sizeof(*in); + int ret = connect(-1, (void *) in, len); + printf("connect(-1, {sa_family=AF_INET, sin_port=htons(%hu)" + ", sin_addr=inet_addr(\"%s\")}, %u) = %d EBADF (%m)\n", + h_port, h_addr, len, ret); + + in = ((void *) in) - 4; + in->sin_family = AF_INET; + in->sin_port = htons(h_port); + in->sin_addr.s_addr = inet_addr(h_addr); + len = sizeof(*in) + 4; + ret = connect(-1, (void *) in, len); + printf("connect(-1, {sa_family=AF_INET, sin_port=htons(%hu)" + ", sin_addr=inet_addr(\"%s\")}, %u) = %d EBADF (%m)\n", + h_port, h_addr, len, ret); + + in = ((void *) in) + 8; + in->sin_family = AF_INET; + in->sin_port = 0; + in->sin_addr.s_addr = 0; + len = sizeof(*in) - 4; + ret = connect(-1, (void *) in, len); + printf("connect(-1, {sa_family=AF_INET, sa_data=\"%s\"}, %u)" + " = %d EBADF (%m)\n", + "\\0\\0\\0\\0\\0\\0\\377\\377\\377\\377", + len, ret); + + len = sizeof(*in); + ret = connect(-1, (void *) in, len); + printf("connect(-1, %p, %u) = %d EBADF (%m)\n", in, len, ret); +} + +static void +check_in6_linklocal(struct sockaddr_in6 *const in6, const char *const h_addr) +{ + inet_pton(AF_INET6, h_addr, &in6->sin6_addr); + + in6->sin6_scope_id = 0xfacefeed; + unsigned int len = sizeof(*in6); + int ret = connect(-1, (void *) in6, len); + printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)" + ", inet_pton(AF_INET6, \"%s\", &sin6_addr)" + ", sin6_flowinfo=htonl(%u)" + ", sin6_scope_id=%u}, %u)" + " = %d EBADF (%m)\n", + ntohs(in6->sin6_port), h_addr, + ntohl(in6->sin6_flowinfo), in6->sin6_scope_id, len, ret); + +#ifdef HAVE_IF_INDEXTONAME + in6->sin6_scope_id = if_nametoindex("lo"); + if (in6->sin6_scope_id) { + ret = connect(-1, (void *) in6, len); + printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)" + ", inet_pton(AF_INET6, \"%s\", &sin6_addr)" + ", sin6_flowinfo=htonl(%u)" + ", sin6_scope_id=if_nametoindex(\"lo\")}, %u)" + " = %d EBADF (%m)\n", + ntohs(in6->sin6_port), h_addr, + ntohl(in6->sin6_flowinfo), len, ret); + } +#endif +} + +static void +check_in6(void) +{ + const unsigned short h_port = 12345; + const unsigned int h_flowinfo = 1234567890; + static const char h_addr[] = "12:34:56:78:90:ab:cd:ef"; + + struct sockaddr_in6 *in6 = tail_alloc(sizeof(*in6)); + in6->sin6_family = AF_INET6; + in6->sin6_port = htons(h_port); + in6->sin6_flowinfo = htonl(h_flowinfo); + inet_pton(AF_INET6, h_addr, &in6->sin6_addr); + in6->sin6_scope_id = 0xfacefeed; + unsigned int len = sizeof(*in6); + int ret = connect(-1, (void *) in6, len); + printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)" + ", inet_pton(AF_INET6, \"%s\", &sin6_addr)" + ", sin6_flowinfo=htonl(%u), sin6_scope_id=%u}, %u)" + " = %d EBADF (%m)\n", + h_port, h_addr, h_flowinfo, in6->sin6_scope_id, len, ret); + + check_in6_linklocal(in6, "fe80::"); + check_in6_linklocal(in6, "ff42::"); + + in6 = ((void *) in6) - 4; + in6->sin6_family = AF_INET6; + in6->sin6_port = htons(h_port); + in6->sin6_flowinfo = htonl(h_flowinfo); + inet_pton(AF_INET6, h_addr, &in6->sin6_addr); + in6->sin6_scope_id = 0xfacefeed; + len = sizeof(*in6) + 4; + ret = connect(-1, (void *) in6, len); + printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)" + ", inet_pton(AF_INET6, \"%s\", &sin6_addr)" + ", sin6_flowinfo=htonl(%u), sin6_scope_id=%u}, %u)" + " = %d EBADF (%m)\n", + h_port, h_addr, h_flowinfo, in6->sin6_scope_id, len, ret); + + in6 = ((void *) in6) + 4 + sizeof(in6->sin6_scope_id); + in6->sin6_family = AF_INET6; + in6->sin6_port = htons(h_port); + in6->sin6_flowinfo = htonl(h_flowinfo); + inet_pton(AF_INET6, h_addr, &in6->sin6_addr); + len = sizeof(*in6) - sizeof(in6->sin6_scope_id); + ret = connect(-1, (void *) in6, len); + printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)" + ", inet_pton(AF_INET6, \"%s\", &sin6_addr)" + ", sin6_flowinfo=htonl(%u)}, %u)" + " = %d EBADF (%m)\n", + h_port, h_addr, h_flowinfo, len, ret); + + in6 = ((void *) in6) + 4; + in6->sin6_family = AF_INET6; + in6->sin6_port = 0; + in6->sin6_flowinfo = 0; + memset(&in6->sin6_addr, '0', sizeof(in6->sin6_addr) - 4); + len = sizeof(*in6) - sizeof(in6->sin6_scope_id) - 4; + ret = connect(-1, (void *) in6, len); + printf("connect(-1, {sa_family=AF_INET6" + ", sa_data=\"\\0\\0\\0\\0\\0\\000%.*u\"}, %u)" + " = %d EBADF (%m)\n", + (int) (len - offsetof(struct sockaddr_in6, sin6_addr)), 0, + len, ret); + + len = sizeof(*in6) - sizeof(in6->sin6_scope_id); + ret = connect(-1, (void *) in6, len); + printf("connect(-1, %p, %u) = %d EBADF (%m)\n", in6, len, ret); +} + +static void +check_ipx(void) +{ + const unsigned short h_port = 12345; + const unsigned int h_network = 0xfacefeed; + struct sockaddr_ipx c_ipx = { + .sipx_family = AF_IPX, + .sipx_port = htons(h_port), + .sipx_network = htonl(h_network), + .sipx_node = "ABCDEF", + .sipx_type = -1 + }; + void *ipx = tail_memdup(&c_ipx, sizeof(c_ipx)); + unsigned int len = sizeof(c_ipx); + int ret = connect(-1, ipx, len); + printf("connect(-1, {sa_family=AF_IPX, sipx_port=htons(%u)" + ", sipx_network=htonl(%#x)" + ", sipx_node=[%#02x, %#02x, %#02x, %#02x, %#02x, %#02x]" + ", sipx_type=%#02x}, %u) = %d EBADF (%m)\n", + h_port, h_network, + c_ipx.sipx_node[0], c_ipx.sipx_node[1], + c_ipx.sipx_node[2], c_ipx.sipx_node[3], + c_ipx.sipx_node[4], c_ipx.sipx_node[5], + c_ipx.sipx_type, len, ret); +} + +static void +check_nl(void) +{ + struct sockaddr_nl *nl = tail_alloc(sizeof(*nl)); + nl->nl_family = AF_NETLINK; + nl->nl_pid = 1234567890; + nl->nl_groups = 0xfacefeed; + unsigned int len = sizeof(*nl); + int ret = connect(-1, (void *) nl, len); + printf("connect(-1, {sa_family=AF_NETLINK, nl_pid=%d" + ", nl_groups=%#08x}, %u) = %d EBADF (%m)\n", + nl->nl_pid, nl->nl_groups, len, ret); + + nl = ((void *) nl) - 4; + nl->nl_family = AF_NETLINK; + nl->nl_pid = 1234567890; + nl->nl_groups = 0xfacefeed; + len = sizeof(*nl) + 4; + ret = connect(-1, (void *) nl, len); + printf("connect(-1, {sa_family=AF_NETLINK, nl_pid=%d" + ", nl_groups=%#08x}, %u) = %d EBADF (%m)\n", + nl->nl_pid, nl->nl_groups, len, ret); +} + +static void +check_ll(void) +{ + struct sockaddr_ll c_ll = { + .sll_family = AF_PACKET, + .sll_protocol = htons(ETH_P_ALL), + .sll_ifindex = 0xfacefeed, + .sll_hatype = ARPHRD_ETHER, + .sll_pkttype = PACKET_HOST, + .sll_halen = sizeof(c_ll.sll_addr), + .sll_addr = "abcdefgh" + }; + void *ll = tail_memdup(&c_ll, sizeof(c_ll)); + unsigned int len = sizeof(c_ll); + int ret = connect(-1, ll, len); + printf("connect(-1, {sa_family=AF_PACKET" + ", sll_protocol=htons(ETH_P_ALL)" + ", sll_ifindex=%u, sll_hatype=ARPHRD_ETHER" + ", sll_pkttype=PACKET_HOST, sll_halen=%u, sll_addr=" + "[%#02x, %#02x, %#02x, %#02x, %#02x, %#02x, %#02x, %#02x]" + "}, %u) = %d EBADF (%m)\n", + c_ll.sll_ifindex, c_ll.sll_halen, + c_ll.sll_addr[0], c_ll.sll_addr[1], + c_ll.sll_addr[2], c_ll.sll_addr[3], + c_ll.sll_addr[4], c_ll.sll_addr[5], + c_ll.sll_addr[6], c_ll.sll_addr[7], + len, ret); + + ((struct sockaddr_ll *) ll)->sll_halen++; + ret = connect(-1, ll, len); + printf("connect(-1, {sa_family=AF_PACKET" + ", sll_protocol=htons(ETH_P_ALL)" + ", sll_ifindex=%u, sll_hatype=ARPHRD_ETHER" + ", sll_pkttype=PACKET_HOST, sll_halen=%u, sll_addr=" + "[%#02x, %#02x, %#02x, %#02x, %#02x, %#02x, %#02x, %#02x, ...]" + "}, %u) = %d EBADF (%m)\n", + c_ll.sll_ifindex, c_ll.sll_halen + 1, + c_ll.sll_addr[0], c_ll.sll_addr[1], + c_ll.sll_addr[2], c_ll.sll_addr[3], + c_ll.sll_addr[4], c_ll.sll_addr[5], + c_ll.sll_addr[6], c_ll.sll_addr[7], + len, ret); + + ((struct sockaddr_ll *) ll)->sll_halen = 0; + ret = connect(-1, ll, len); + printf("connect(-1, {sa_family=AF_PACKET" + ", sll_protocol=htons(ETH_P_ALL)" + ", sll_ifindex=%u, sll_hatype=ARPHRD_ETHER" + ", sll_pkttype=PACKET_HOST, sll_halen=0}, %u)" + " = %d EBADF (%m)\n", c_ll.sll_ifindex, len, ret); + +#ifdef HAVE_IF_INDEXTONAME + const int id = if_nametoindex("lo"); + if (id) { + ((struct sockaddr_ll *) ll)->sll_ifindex = id; + ret = connect(-1, ll, len); + printf("connect(-1, {sa_family=AF_PACKET" + ", sll_protocol=htons(ETH_P_ALL)" + ", sll_ifindex=if_nametoindex(\"lo\")" + ", sll_hatype=ARPHRD_ETHER" + ", sll_pkttype=PACKET_HOST, sll_halen=0}, %u)" + " = %d EBADF (%m)\n", len, ret); + } +#endif +} + +#ifdef HAVE_BLUETOOTH_BLUETOOTH_H +static void +check_hci(void) +{ + const unsigned short h_port = 12345; + struct sockaddr_hci *hci = tail_alloc(sizeof(*hci)); + hci->hci_family = AF_BLUETOOTH; + hci->hci_dev = htobs(h_port); + hci->hci_channel = HCI_CHANNEL_RAW; + unsigned int len = sizeof(*hci); + int ret = connect(-1, (void *) hci, len); + printf("connect(-1, {sa_family=AF_BLUETOOTH, hci_dev=htobs(%hu)" + ", hci_channel=HCI_CHANNEL_RAW}, %u) = %d EBADF (%m)\n", + h_port, len, ret); +} + +static void +check_sco(void) +{ + const struct sockaddr_sco c_sco = { + .sco_family = AF_BLUETOOTH, + .sco_bdaddr.b = "abcdef" + }; + void *sco = tail_memdup(&c_sco, sizeof(c_sco)); + unsigned int len = sizeof(c_sco); + int ret = connect(-1, sco, len); + printf("connect(-1, {sa_family=AF_BLUETOOTH" + ", sco_bdaddr=%02x:%02x:%02x:%02x:%02x:%02x" + "}, %u) = %d EBADF (%m)\n", + c_sco.sco_bdaddr.b[0], c_sco.sco_bdaddr.b[1], + c_sco.sco_bdaddr.b[2], c_sco.sco_bdaddr.b[3], + c_sco.sco_bdaddr.b[4], c_sco.sco_bdaddr.b[5], + len, ret); +} + +static void +check_rc(void) +{ + const struct sockaddr_rc c_rc = { + .rc_family = AF_BLUETOOTH, + .rc_bdaddr.b = "abcdef", + .rc_channel = 42 + }; + void *rc = tail_memdup(&c_rc, sizeof(c_rc)); + unsigned int len = sizeof(c_rc); + int ret = connect(-1, rc, len); + printf("connect(-1, {sa_family=AF_BLUETOOTH" + ", rc_bdaddr=%02x:%02x:%02x:%02x:%02x:%02x" + ", rc_channel=%u}, %u) = %d EBADF (%m)\n", + c_rc.rc_bdaddr.b[0], c_rc.rc_bdaddr.b[1], + c_rc.rc_bdaddr.b[2], c_rc.rc_bdaddr.b[3], + c_rc.rc_bdaddr.b[4], c_rc.rc_bdaddr.b[5], + c_rc.rc_channel, len, ret); +} + +static void +check_l2(void) +{ + const unsigned short h_psm = 12345; + const unsigned short h_cid = 13579; + const struct sockaddr_l2 c_l2 = { + .l2_family = AF_BLUETOOTH, + .l2_psm = htobs(h_psm), + .l2_bdaddr.b = "abcdef", + .l2_cid = htobs(h_cid), + .l2_bdaddr_type = 42 + }; + void *l2 = tail_memdup(&c_l2, sizeof(c_l2)); + unsigned int len = sizeof(c_l2); + int ret = connect(-1, l2, len); + printf("connect(-1, {sa_family=AF_BLUETOOTH" + ", l2_psm=htobs(%hu)" + ", l2_bdaddr=%02x:%02x:%02x:%02x:%02x:%02x" + ", l2_cid=htobs(%hu), l2_bdaddr_type=%u}" + ", %u) = %d EBADF (%m)\n", h_psm, + c_l2.l2_bdaddr.b[0], c_l2.l2_bdaddr.b[1], + c_l2.l2_bdaddr.b[2], c_l2.l2_bdaddr.b[3], + c_l2.l2_bdaddr.b[4], c_l2.l2_bdaddr.b[5], + h_cid, c_l2.l2_bdaddr_type, len, ret); +} +#endif + +static void +check_raw(void) +{ + union { + struct sockaddr *sa; + struct sockaddr_storage *st; + } u = { .st = tail_alloc(sizeof(*u.st)) }; + memset(u.st, '0', sizeof(*u.st)); + u.sa->sa_family = 0xff; + unsigned int len = sizeof(*u.st) + 8; + int ret = connect(-1, (void *) u.st, len); + printf("connect(-1, {sa_family=%#x /* AF_??? */, sa_data=\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", u.sa->sa_family, + (int) (sizeof(*u.st) - sizeof(u.sa->sa_family)), 0, len, ret); + + u.sa->sa_family = 0; + len = sizeof(u.sa->sa_family) + 1; + ret = connect(-1, (void *) u.st, len); + printf("connect(-1, {sa_family=AF_UNSPEC, sa_data=\"0\"}, %u)" + " = %d EBADF (%m)\n", len, ret); + + u.sa->sa_family = AF_BLUETOOTH; + ++len; + ret = connect(-1, (void *) u.st, len); + printf("connect(-1, {sa_family=AF_BLUETOOTH, sa_data=\"00\"}, %u)" + " = %d EBADF (%m)\n", len, ret); +} + +int +main(void) +{ + check_un(); + check_in(); + check_in6(); + check_ipx(); + check_nl(); + check_ll(); +#ifdef HAVE_BLUETOOTH_BLUETOOTH_H + check_hci(); + check_sco(); + check_rc(); + check_l2(); +#endif + check_raw(); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/net-sockaddr.test b/tests-m32/net-sockaddr.test new file mode 100755 index 000000000..cdfe536f8 --- /dev/null +++ b/tests-m32/net-sockaddr.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of sockaddr structures. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 -e trace=connect diff --git a/tests-m32/net-y-unix.c b/tests-m32/net-y-unix.c new file mode 100644 index 000000000..3efc2f645 --- /dev/null +++ b/tests-m32/net-y-unix.c @@ -0,0 +1,235 @@ +/* + * This file is part of net-y-unix strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(int ac, const char **av) +{ + assert(ac == 2); + + struct sockaddr_un addr = { .sun_family = AF_UNIX }; + unsigned int sun_path_len = strlen(av[1]); + assert(sun_path_len > 0 && sun_path_len <= sizeof(addr.sun_path)); + strncpy(addr.sun_path, av[1], sizeof(addr.sun_path)); + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = offsetof(struct sockaddr_un, sun_path) + strlen(av[1]) + 1; + if (*len > sizeof(addr)) + *len = sizeof(addr); + + int listen_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_UNIX, SOCK_STREAM, 0) = %d\n", + listen_fd, listen_inode); + + (void) unlink(av[1]); + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_UNIX, sun_path=\"%s\"}" + ", %u) = 0\n", listen_fd, listen_inode, av[1], (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", listen_fd, listen_inode); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_SOCKET, SO_PASSCRED, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], [%u]) = 0\n", + listen_fd, listen_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", listen_fd, listen_inode, + av[1], (int) sizeof(addr), (int) *len); + + int connect_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_UNIX, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + unsigned long accept_inode = inode_of_sockfd(accept_fd); + printf("accept(%d, {sa_family=AF_UNIX}" + ", [%d->%d]) = %d\n", + listen_fd, listen_inode, + (int) sizeof(addr), (int) *len, + accept_fd, accept_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", connect_fd, connect_inode, + av[1], (int) sizeof(addr), (int) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d) = 0\n", connect_fd, connect_inode); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d) = 0\n", accept_fd, accept_inode); + + connect_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_UNIX, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + *optval = 1; + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_SOCKET, SO_PASSCRED, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], %u) = 0\n", + connect_fd, connect_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", + listen_fd, listen_inode, av[1], + (int) sizeof(addr), (int) *len); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + accept_inode = inode_of_sockfd(accept_fd); + const char * const sun_path1 = + ((struct sockaddr_un *) accept_sa) -> sun_path + 1; + printf("accept(%d, {sa_family=AF_UNIX" + ", sun_path=@\"%s\"}, [%d->%d]) = %d\n", + listen_fd, listen_inode, sun_path1, + (int) sizeof(addr), (int) *len, + accept_fd, accept_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", + connect_fd, connect_inode, av[1], + (int) sizeof(addr), (int) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(connect_fd, accept_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_UNIX" + ", sun_path=@\"%s\"}, [%d->%d]) = 0\n", + connect_fd, connect_inode, sun_path1, + (int) sizeof(addr), (int) *len); + + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d) = 0\n", connect_fd, connect_inode); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d) = 0\n", accept_fd, accept_inode); + + assert(unlink(av[1]) == 0); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_inode); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/net-y-unix.test b/tests-m32/net-y-unix.test new file mode 100755 index 000000000..aec8159fd --- /dev/null +++ b/tests-m32/net-y-unix.test @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Check decoding of network syscalls in -y mode. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -y is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed + +addr="$NAME-local-stream" +run_prog "./$NAME" $addr > /dev/null + +run_strace -a20 -y -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/net-yy-inet.c b/tests-m32/net-yy-inet.c new file mode 100644 index 000000000..f76f941dd --- /dev/null +++ b/tests-m32/net-yy-inet.c @@ -0,0 +1,173 @@ +/* + * This file is part of net-yy-inet strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(void) +{ + const struct sockaddr_in addr = { + .sin_family = AF_INET, + .sin_addr.s_addr = htonl(INADDR_LOOPBACK) + }; + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = sizeof(addr); + + const int listen_fd = socket(AF_INET, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + const unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = %d\n", + listen_fd, listen_inode); + + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_INET, sin_port=htons(0)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, %u) = 0\n", + listen_fd, listen_inode, (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", listen_fd, listen_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + const unsigned int listen_port = + ntohs(((struct sockaddr_in *) listen_sa) -> sin_port); + printf("getsockname(%d, {sa_family=AF_INET" + ", sin_port=htons(%u), sin_addr=inet_addr(\"127.0.0.1\")}" + ", [%u]) = 0\n", + listen_fd, listen_port, listen_port, (unsigned) *len); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_TCP, TCP_MAXSEG, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_TCP, TCP_MAXSEG" + ", [%u], [%u]) = 0\n", + listen_fd, listen_port, *optval, (unsigned) *len); + + const int connect_fd = socket(AF_INET, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + const unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = %d\n", + connect_fd, connect_inode); + + *len = sizeof(addr); + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, %u) = 0\n", + connect_fd, connect_inode, listen_port, (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + const int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + const unsigned int connect_port = + ntohs(((struct sockaddr_in *) accept_sa) -> sin_port); + printf("accept(%d, {sa_family=AF_INET" + ", sin_port=htons(%u), sin_addr=inet_addr(\"127.0.0.1\")}" + ", [%u]) = %d127.0.0.1:%u]>\n", + listen_fd, listen_port, connect_port, (unsigned) *len, + accept_fd, listen_port, connect_port); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(accept_fd, accept_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d127.0.0.1:%u]>" + ", {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, [%u]) = 0\n", + accept_fd, listen_port, connect_port, connect_port, + (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d127.0.0.1:%u]>" + ", {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, [%u]) = 0\n", + connect_fd, connect_port, listen_port, listen_port, + (unsigned) *len); + + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_TCP, TCP_MAXSEG, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d127.0.0.1:%u]>" + ", SOL_TCP, TCP_MAXSEG, [%u], %u) = 0\n", + connect_fd, connect_port, listen_port, *optval, + (unsigned) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, + MSG_DONTROUTE | MSG_DONTWAIT, NULL, 0) == sizeof(text) - 1); + printf("sendto(%d127.0.0.1:%u]>, \"%s\", %u" + ", MSG_DONTROUTE|MSG_DONTWAIT, NULL, 0) = %u\n", + connect_fd, connect_port, listen_port, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d127.0.0.1:%u]>) = 0\n", + connect_fd, connect_port, listen_port); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_WAITALL, + NULL, NULL) == sizeof(text) - 1); + printf("recvfrom(%d127.0.0.1:%u]>, \"%s\", %u" + ", MSG_WAITALL, NULL, NULL) = %u\n", + accept_fd, listen_port, connect_port, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d127.0.0.1:%u]>) = 0\n", + accept_fd, listen_port, connect_port); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_port); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/net-yy-inet.test b/tests-m32/net-yy-inet.test new file mode 100755 index 000000000..2ebf91fa2 --- /dev/null +++ b/tests-m32/net-yy-inet.test @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Check decoding of ip:port pairs associated with socket descriptors +# +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_inet_diag + +run_prog "./$NAME" > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/net-yy-netlink.c b/tests-m32/net-yy-netlink.c new file mode 100644 index 000000000..64d0efca5 --- /dev/null +++ b/tests-m32/net-yy-netlink.c @@ -0,0 +1,84 @@ +/* + * This file is part of net-yy-netlink strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + +int +main(void) +{ + unsigned magic = 1234; + struct sockaddr_nl addr = { + .nl_family = AF_NETLINK, + .nl_pid = 1234 + }; + struct sockaddr *const sa = tail_memdup(&addr, sizeof(addr)); + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = sizeof(addr); + + const int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG); + if (fd < 0) + perror_msg_and_skip("socket"); + const unsigned long inode = inode_of_sockfd(fd); + printf("socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) = " + "%d\n", fd, inode); + + if (bind(fd, sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_NETLINK" + ", nl_pid=%u, nl_groups=00000000}, %u) = 0\n", + fd, inode, magic, (unsigned) *len); + + if (getsockname(fd, sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_NETLINK" + ", nl_pid=%u, nl_groups=00000000}, [%u]) = 0\n", + fd, magic, magic, (unsigned) *len); + + if (close(fd)) + perror_msg_and_fail("close"); + printf("close(%d) = 0\n", fd, magic); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/net-yy-netlink.test b/tests-m32/net-yy-netlink.test new file mode 100755 index 000000000..bff1d8616 --- /dev/null +++ b/tests-m32/net-yy-netlink.test @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check decoding of protocol:portid pairs associated with socket +# descriptors +# +# Copyright (c) 2014 Masatake YAMATO +# Copyright (c) 2014-2016 Dmitry V. Levin +# Copyright (c) 2016 Fabien Siron +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_netlink_diag + +run_prog "./$NAME" > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/net-yy-unix.c b/tests-m32/net-yy-unix.c new file mode 100644 index 000000000..63637bddb --- /dev/null +++ b/tests-m32/net-yy-unix.c @@ -0,0 +1,229 @@ +/* + * This file is part of net-yy-unix strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(int ac, const char **av) +{ + assert(ac == 2); + + struct sockaddr_un addr = { .sun_family = AF_UNIX }; + unsigned int sun_path_len = strlen(av[1]); + assert(sun_path_len > 0 && sun_path_len <= sizeof(addr.sun_path)); + strncpy(addr.sun_path, av[1], sizeof(addr.sun_path)); + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = offsetof(struct sockaddr_un, sun_path) + strlen(av[1]) + 1; + if (*len > sizeof(addr)) + *len = sizeof(addr); + + int listen_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_UNIX, SOCK_STREAM, 0) = %d\n", + listen_fd, listen_inode); + + (void) unlink(av[1]); + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_UNIX, sun_path=\"%s\"}" + ", %u) = 0\n", listen_fd, listen_inode, av[1], (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", + listen_fd, listen_inode, av[1]); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_SOCKET, SO_PASSCRED, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], [%u]) = 0\n", + listen_fd, listen_inode, av[1], *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", listen_fd, listen_inode, + av[1], av[1], (int) sizeof(addr), (int) *len); + + int connect_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_UNIX, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + unsigned long accept_inode = inode_of_sockfd(accept_fd); + printf("accept(%d, {sa_family=AF_UNIX}" + ", [%d->%d]) = %d%lu,\"%s\"]>\n", + listen_fd, listen_inode, av[1], (int) sizeof(addr), (int) *len, + accept_fd, accept_inode, connect_inode, av[1]); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d%lu]>, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", + connect_fd, connect_inode, + accept_inode, av[1], (int) sizeof(addr), (int) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d%lu]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d%lu,\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, connect_inode, av[1], text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d%lu]>) = 0\n", + connect_fd, connect_inode, accept_inode); + + assert(close(accept_fd) == 0); + printf("close(%d%lu,\"%s\"]>) = 0\n", + accept_fd, accept_inode, connect_inode, av[1]); + + connect_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_UNIX, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + *optval = 1; + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_SOCKET, SO_PASSCRED, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], %u) = 0\n", + connect_fd, connect_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", listen_fd, listen_inode, + av[1], av[1], (int) sizeof(addr), (int) *len); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + accept_inode = inode_of_sockfd(accept_fd); + const char * const sun_path1 = + ((struct sockaddr_un *) accept_sa) -> sun_path + 1; + printf("accept(%d, {sa_family=AF_UNIX" + ", sun_path=@\"%s\"}, [%d->%d]) = %d%lu,\"%s\"]>\n", + listen_fd, listen_inode, av[1], sun_path1, + (int) sizeof(addr), (int) *len, + accept_fd, accept_inode, connect_inode, av[1]); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d%lu,@\"%s\"]>, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", connect_fd, connect_inode, + accept_inode, sun_path1, av[1], (int) sizeof(addr), (int) *len); + + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d%lu,@\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, accept_inode, sun_path1, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d%lu,\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, connect_inode, av[1], text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d%lu,@\"%s\"]>) = 0\n", + connect_fd, connect_inode, accept_inode, sun_path1); + + assert(close(accept_fd) == 0); + printf("close(%d%lu,\"%s\"]>) = 0\n", + accept_fd, accept_inode, connect_inode, av[1]); + + assert(unlink(av[1]) == 0); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_inode, av[1]); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/net-yy-unix.test b/tests-m32/net-yy-unix.test new file mode 100755 index 000000000..b82761c34 --- /dev/null +++ b/tests-m32/net-yy-unix.test @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check decoding of address information (inode[->peer][,path]) +# associated with unix domain socket descriptors. +# +# Copyright (c) 2014 Masatake YAMATO +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_unix_diag + +addr="$NAME-local-stream" +run_prog "./$NAME" $addr > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/net.expected b/tests-m32/net.expected new file mode 100644 index 000000000..80dd07016 --- /dev/null +++ b/tests-m32/net.expected @@ -0,0 +1,7 @@ +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(AF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(AF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 1 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +bind\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-local-stream"\}, 19\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +listen\(0, 5\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +getsockname\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-local-stream"\}, \[19\]\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +accept\(0, \{sa_family=AF_(LOCAL|UNIX|FILE)\}, \[19->2\]\) += 1 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +connect\(1, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-local-stream"\}, 19\) += 0 diff --git a/tests-m32/net.test b/tests-m32/net.test new file mode 100755 index 000000000..cf943ffaa --- /dev/null +++ b/tests-m32/net.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check how network syscalls are traced. + +. "${srcdir=.}/init.sh" + +run_prog ./net-accept-connect net-local-stream +run_strace_merge -enetwork $args +match_grep + +exit 0 diff --git a/tests-m32/netlink_inet_diag.c b/tests-m32/netlink_inet_diag.c new file mode 100644 index 000000000..2332e203a --- /dev/null +++ b/tests-m32/netlink_inet_diag.c @@ -0,0 +1,144 @@ +/* + * This file is part of inet-yy strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +static void +send_query(const int fd, const int family, const int proto) +{ + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct { + struct nlmsghdr nlh; + struct inet_diag_req_v2 idr; + } req = { + .nlh = { + .nlmsg_len = sizeof(req), + .nlmsg_type = SOCK_DIAG_BY_FAMILY, + .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + }, + .idr = { + .sdiag_family = family, + .sdiag_protocol = proto, + .idiag_states = -1 + } + }; + struct iovec iov = { + .iov_base = &req, + .iov_len = sizeof(req) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); +} + +static void +check_responses(const int fd) +{ + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct iovec iov = { + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + ssize_t ret = recvmsg(fd, &msg, 0); + if (ret <= 0) + perror_msg_and_skip("recvmsg"); + + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct inet_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); +} + +int main(void) +{ + struct sockaddr_in addr; + socklen_t len = sizeof(addr); + + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + + close(0); + close(1); + + if (socket(AF_INET, SOCK_STREAM, 0)) + perror_msg_and_skip("socket AF_INET"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_INET_DIAG) != 1) + perror_msg_and_skip("socket AF_NETLINK"); + + send_query(1, AF_INET, IPPROTO_TCP); + check_responses(1); + return 0; +} diff --git a/tests-m32/netlink_netlink_diag.c b/tests-m32/netlink_netlink_diag.c new file mode 100644 index 000000000..fc32822b1 --- /dev/null +++ b/tests-m32/netlink_netlink_diag.c @@ -0,0 +1,147 @@ +/* + * This file is part of net-yy-netlink strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + +static void +send_query(const int fd) +{ + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct { + struct nlmsghdr nlh; + struct netlink_diag_req ndr; + } req = { + .nlh = { + .nlmsg_len = sizeof(req), + .nlmsg_type = SOCK_DIAG_BY_FAMILY, + .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + }, + .ndr = { + .sdiag_family = AF_NETLINK, + .sdiag_protocol = NDIAG_PROTO_ALL, + .ndiag_show = NDIAG_SHOW_MEMINFO + } + }; + struct iovec iov = { + .iov_base = &req, + .iov_len = sizeof(req) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); +} + +static void +check_responses(const int fd) +{ + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct iovec iov = { + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + ssize_t ret = recvmsg(fd, &msg, 0); + if (ret <= 0) + perror_msg_and_skip("recvmsg"); + + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct netlink_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); +} + +int main(void) +{ + struct sockaddr_nl addr; + socklen_t len = sizeof(addr); + + memset(&addr, 0, sizeof(addr)); + addr.nl_family = AF_NETLINK; + + close(0); + close(1); + + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG)) + perror_msg_and_skip("socket AF_NETLINK"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) != 1) + perror_msg_and_skip("socket AF_NETLINK"); + + send_query(1); + check_responses(1); + return 0; +} diff --git a/tests-m32/netlink_protocol.c b/tests-m32/netlink_protocol.c new file mode 100644 index 000000000..34e114be2 --- /dev/null +++ b/tests-m32/netlink_protocol.c @@ -0,0 +1,240 @@ +/* + * Check decoding of netlink protocol. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_SYS_XATTR_H + +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +# endif + +static void +send_query(const int fd) +{ + static const struct req { + struct nlmsghdr nlh; + const char magic[4]; + } c_req = { + .nlh = { + .nlmsg_len = sizeof(struct req), + .nlmsg_type = NLMSG_NOOP, + .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + }, + .magic = "abcd" + }; + struct req *const req = tail_memdup(&c_req, sizeof(c_req)); + long rc; + const char *errstr; + + /* zero address */ + rc = sendto(fd, NULL, sizeof(*req), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, NULL, %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, (unsigned) sizeof(*req), sprintrc(rc)); + + /* zero length */ + rc = sendto(fd, req, 0, MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, \"\", 0, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, sprintrc(rc)); + + /* zero address and length */ + rc = sendto(fd, NULL, 0, MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, NULL, 0, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, sprintrc(rc)); + + /* unfetchable struct nlmsghdr */ + const void *const efault = tail_alloc(sizeof(struct nlmsghdr) - 1); + rc = sendto(fd, efault, sizeof(struct nlmsghdr), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, %p, %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, efault, (unsigned) sizeof(struct nlmsghdr), sprintrc(rc)); + + /* whole message length < sizeof(struct nlmsghdr) */ + rc = sendto(fd, req->magic, sizeof(req->magic), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, \"abcd\", %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, (unsigned) sizeof(req->magic), sprintrc(rc)); + + /* a single message with some data */ + rc = sendto(fd, req, sizeof(*req), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, {{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}, \"abcd\"}, %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, req->nlh.nlmsg_len, NLM_F_DUMP, + (unsigned) sizeof(*req), sprintrc(rc)); + + /* a single message without data */ + req->nlh.nlmsg_len = sizeof(req->nlh); + rc = sendto(fd, &req->nlh, sizeof(req->nlh), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, {{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}}, %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, req->nlh.nlmsg_len, NLM_F_DUMP, + (unsigned) sizeof(req->nlh), sprintrc(rc)); + + /* nlmsg_len > whole message length */ + req->nlh.nlmsg_len = sizeof(*req) + 8; + rc = sendto(fd, req, sizeof(*req), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, {{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}, \"abcd\"}, %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, req->nlh.nlmsg_len, NLM_F_DUMP, + (unsigned) sizeof(*req), sprintrc(rc)); + + /* nlmsg_len < sizeof(struct nlmsghdr) */ + req->nlh.nlmsg_len = 8; + rc = sendto(fd, req, sizeof(*req), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, {{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}}, %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, req->nlh.nlmsg_len, NLM_F_DUMP, + (unsigned) sizeof(*req), sprintrc(rc)); + + /* a sequence of two nlmsg objects */ + struct reqs { + struct req req1; + char padding[NLMSG_ALIGN(sizeof(struct req)) - sizeof(struct req)]; + struct req req2; + } *const reqs = tail_alloc(sizeof(*reqs)); + memcpy(&reqs->req1, &c_req, sizeof(c_req)); + memcpy(&reqs->req2, &c_req, sizeof(c_req)); + + rc = sendto(fd, reqs, sizeof(*reqs), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, [{{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}, \"abcd\"}, {{len=%u, type=NLMSG_NOOP" + ", flags=NLM_F_REQUEST|0x%x, seq=0, pid=0}, \"abcd\"}]" + ", %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, reqs->req1.nlh.nlmsg_len, NLM_F_DUMP, + reqs->req2.nlh.nlmsg_len, NLM_F_DUMP, + (unsigned) sizeof(*reqs), sprintrc(rc)); + + /* unfetchable second struct nlmsghdr */ + void *const efault2 = tail_memdup(&reqs->req1, sizeof(reqs->req1)); + rc = sendto(fd, efault2, sizeof(*reqs), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, [{{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}, \"abcd\"}, %p], %u, MSG_DONTWAIT, NULL, 0)" + " = %s\n", + fd, reqs->req1.nlh.nlmsg_len, NLM_F_DUMP, + &((struct reqs *) efault2)->req2, (unsigned) sizeof(*reqs), + sprintrc(rc)); + + /* message length is not enough for the second struct nlmsghdr */ + rc = sendto(fd, reqs, sizeof(*reqs) - sizeof(req->nlh), MSG_DONTWAIT, + NULL, 0); + errstr = sprintrc(rc); + printf("sendto(%d, [{{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}, \"abcd\"}, \"", + fd, reqs->req1.nlh.nlmsg_len, NLM_F_DUMP); + print_quoted_memory((void *) &reqs->req2.nlh, + sizeof(reqs->req2) - sizeof(req->nlh)); + printf("\"], %u, MSG_DONTWAIT, NULL, 0) = %s\n", + (unsigned) (sizeof(*reqs) - sizeof(req->nlh)), errstr); + + /* second nlmsg_len < sizeof(struct nlmsghdr) */ + reqs->req2.nlh.nlmsg_len = 4; + rc = sendto(fd, reqs, sizeof(*reqs), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, [{{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}, \"abcd\"}, {{len=%u, type=NLMSG_NOOP" + ", flags=NLM_F_REQUEST|0x%x, seq=0, pid=0}}], %u" + ", MSG_DONTWAIT, NULL, 0) = %s\n", + fd, reqs->req1.nlh.nlmsg_len, NLM_F_DUMP, + reqs->req2.nlh.nlmsg_len, NLM_F_DUMP, + (unsigned) sizeof(*reqs), sprintrc(rc)); + + /* abbreviated output */ +# define DEFAULT_STRLEN 32 +# define ABBREV_LEN (DEFAULT_STRLEN + 1) + const unsigned int msg_len = sizeof(struct nlmsghdr) * ABBREV_LEN; + struct nlmsghdr *const msgs = tail_alloc(msg_len); + unsigned int i; + for (i = 0; i < ABBREV_LEN; ++i) { + msgs[i].nlmsg_len = sizeof(*msgs); + msgs[i].nlmsg_type = NLMSG_NOOP; + msgs[i].nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST; + msgs[i].nlmsg_seq = i; + msgs[i].nlmsg_pid = 0; + } + + rc = sendto(fd, msgs, msg_len, MSG_DONTWAIT, NULL, 0); + errstr = sprintrc(rc); + printf("sendto(%d, [", fd); + for (i = 0; i < DEFAULT_STRLEN; ++i) { + if (i) + printf(", "); + printf("{{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=%u, pid=0}}", + msgs[i].nlmsg_len, NLM_F_DUMP, msgs[i].nlmsg_seq); + } + printf(", ...], %u, MSG_DONTWAIT, NULL, 0) = %s\n", msg_len, errstr); +} + +int main(void) +{ + struct sockaddr_nl addr; + socklen_t len = sizeof(addr); + int fd; + + memset(&addr, 0, sizeof(addr)); + addr.nl_family = AF_NETLINK; + + if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG)) == -1) + perror_msg_and_skip("socket AF_NETLINK"); + + printf("socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) = %d\n", + fd); + if (bind(fd, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}" + ", %u) = 0\n", fd, len); + + char *path; + if (asprintf(&path, "/proc/self/fd/%u", fd) < 0) + perror_msg_and_fail("asprintf"); + char buf[256]; + if (getxattr(path, "system.sockprotoname", buf, sizeof(buf) - 1) < 0) + perror_msg_and_skip("getxattr"); + free(path); + + send_query(fd); + + printf("+++ exited with 0 +++\n"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYS_XATTR_H") + +#endif diff --git a/tests-m32/netlink_protocol.test b/tests-m32/netlink_protocol.test new file mode 100755 index 000000000..ab2bb1e8b --- /dev/null +++ b/tests-m32/netlink_protocol.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check decoding of netlink protocol. + +. "${srcdir=.}/init.sh" + +# getfdproto is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +run_strace_match_diff -e trace=network diff --git a/tests-m32/netlink_unix_diag.c b/tests-m32/netlink_unix_diag.c new file mode 100644 index 000000000..269adc6f9 --- /dev/null +++ b/tests-m32/netlink_unix_diag.c @@ -0,0 +1,156 @@ +/* + * This file is part of net-yy-unix strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + +static void +send_query(const int fd) +{ + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct { + struct nlmsghdr nlh; + struct unix_diag_req udr; + } req = { + .nlh = { + .nlmsg_len = sizeof(req), + .nlmsg_type = SOCK_DIAG_BY_FAMILY, + .nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP + }, + .udr = { + .sdiag_family = AF_UNIX, + .udiag_states = -1, + .udiag_show = UDIAG_SHOW_NAME | UDIAG_SHOW_PEER + } + }; + struct iovec iov = { + .iov_base = &req, + .iov_len = sizeof(req) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); +} + +static void +check_responses(const int fd) +{ + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct iovec iov = { + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + ssize_t ret = recvmsg(fd, &msg, 0); + if (ret <= 0) + perror_msg_and_skip("recvmsg"); + + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct unix_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); +} + +#define SUN_PATH "netlink_unix_diag_socket" +int main(void) +{ + struct sockaddr_un addr = { + .sun_family = AF_UNIX, + .sun_path = SUN_PATH + }; + socklen_t len = offsetof(struct sockaddr_un, sun_path) + sizeof(SUN_PATH); + + close(0); + close(1); + + (void) unlink(SUN_PATH); + if (socket(AF_UNIX, SOCK_STREAM, 0)) + perror_msg_and_skip("socket AF_UNIX"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); + + assert(unlink(SUN_PATH) == 0); + + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) != 1) + perror_msg_and_skip("socket AF_NETLINK"); + + send_query(1); + check_responses(1); + return 0; +} diff --git a/tests-m32/newfstatat.c b/tests-m32/newfstatat.c new file mode 100644 index 000000000..b501d880d --- /dev/null +++ b/tests-m32/newfstatat.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_newfstatat + +# define TEST_SYSCALL_NR __NR_newfstatat +# define TEST_SYSCALL_STR "newfstatat" +# include "fstatat.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_newfstatat") + +#endif diff --git a/tests-m32/newfstatat.test b/tests-m32/newfstatat.test new file mode 100755 index 000000000..6d83ec087 --- /dev/null +++ b/tests-m32/newfstatat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check newfstatat syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-m32/nsyscalls.c b/tests-m32/nsyscalls.c new file mode 100644 index 000000000..aecf7aa7e --- /dev/null +++ b/tests-m32/nsyscalls.c @@ -0,0 +1,108 @@ +/* + * Check decoding of out-of-range syscalls. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "sysent.h" +#include +#include +#include +#include + +#define TD 0 +#define TF 0 +#define TI 0 +#define TN 0 +#define TP 0 +#define TS 0 +#define TM 0 +#define NF 0 +#define MA 0 +#define SI 0 +#define SE 0 +#define CST 0 +#define SEN(arg) 0,0 + +static const struct_sysent syscallent[] = { +#include "syscallent.h" +}; + +#if defined __X32_SYSCALL_BIT && defined __NR_read \ + && (__X32_SYSCALL_BIT & __NR_read) != 0 +# define SYSCALL_BIT __X32_SYSCALL_BIT +#else +# define SYSCALL_BIT 0 +#endif + +static void +test_syscall(const unsigned long nr) +{ + static const kernel_ulong_t a[] = { + (kernel_ulong_t) 0xface0fedbadc0dedULL, + (kernel_ulong_t) 0xface1fedbadc1dedULL, + (kernel_ulong_t) 0xface2fedbadc2dedULL, + (kernel_ulong_t) 0xface3fedbadc3dedULL, + (kernel_ulong_t) 0xface4fedbadc4dedULL, + (kernel_ulong_t) 0xface5fedbadc5dedULL + }; + + long rc = syscall(nr | SYSCALL_BIT, + a[0], a[1], a[2], a[3], a[4], a[5]); +#ifdef LINUX_MIPSO32 + printf("syscall(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx)" + " = %ld ENOSYS (%m)\n", nr | SYSCALL_BIT, + a[0], a[1], a[2], a[3], a[4], a[5], rc); +#else + printf("syscall_%lu(%#llx, %#llx, %#llx, %#llx, %#llx, %#llx)" + " = %ld (errno %d)\n", nr, + (unsigned long long) a[0], + (unsigned long long) a[1], + (unsigned long long) a[2], + (unsigned long long) a[3], + (unsigned long long) a[4], + (unsigned long long) a[5], + rc, errno); +#endif +} + +int +main(void) +{ + test_syscall(ARRAY_SIZE(syscallent)); + +#ifdef SYS_socket_subcall + test_syscall(SYS_socket_subcall + 1); +#endif + +#ifdef SYS_ipc_subcall + test_syscall(SYS_ipc_subcall + 1); +#endif + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/nsyscalls.test b/tests-m32/nsyscalls.test new file mode 100755 index 000000000..61f72d520 --- /dev/null +++ b/tests-m32/nsyscalls.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check decoding of out-of-range syscalls. + +. "${srcdir=.}/init.sh" + +if [ "$MIPS_ABI" = "o32" ]; then + syscall=syscall +else + syscall=none +fi + +run_strace_match_diff -e trace=$syscall diff --git a/tests-m32/old_mmap.c b/tests-m32/old_mmap.c new file mode 100644 index 000000000..2725fb754 --- /dev/null +++ b/tests-m32/old_mmap.c @@ -0,0 +1,101 @@ +/* + * Check decoding of "old mmap" edition of mmap syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +/* + * On s390x and m68k, this is the mmap syscall used by glibc, so, + * from one side, it's already covered by another test, and, from another side, + * it would require additional efforts to filter out mmap calls made by glibc. + */ + +#if defined __NR_mmap && \ +( defined __arm__ \ + || defined __i386__ \ + || (defined __s390__ && !defined __s390x__) \ +) + +# include +# include +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_mmap, 0); + printf("mmap(NULL) = %ld %s (%m)\n", rc, errno2name()); + + const unsigned int args1_c[6] = { + 0xdeadbeef, /* addr */ + 0xfacefeed, /* len */ + PROT_READ|PROT_EXEC, /* prot */ + MAP_FILE|MAP_FIXED, /* flags */ + -2U, /* fd */ + 0xbadc0ded /* offset */ + }; + const unsigned int page_size = get_page_size(); + const unsigned int args2_c[6] = { + 0, + page_size, + PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1U, + 0xfaced000 & -page_size + }; + void *args = tail_memdup(args1_c, sizeof(args1_c)); + + rc = syscall(__NR_mmap, args); + printf("mmap(%#x, %u, PROT_READ|PROT_EXEC, MAP_FILE|MAP_FIXED" + ", %d, %#x) = %ld %s (%m)\n", + args1_c[0], args1_c[1], args1_c[4], args1_c[5], + rc, errno2name()); + + memcpy(args, args2_c, sizeof(args2_c)); + rc = syscall(__NR_mmap, args); + printf("mmap(NULL, %u, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS" + ", %d, %#x) = %#lx\n", + args2_c[1], args2_c[4], args2_c[5], rc); + + void *addr = (void *) rc; + if (mprotect(addr, page_size, PROT_NONE)) + perror_msg_and_fail("mprotect(%p, %u, PROT_NONE)", + addr, page_size); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mmap && (__arm__ || __i386__" + " || (__s390__ && !__s390x__))") + +#endif diff --git a/tests-m32/old_mmap.test b/tests-m32/old_mmap.test new file mode 100755 index 000000000..af776ff7b --- /dev/null +++ b/tests-m32/old_mmap.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of "old mmap" edition of mmap syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 -e trace=mmap diff --git a/tests-m32/oldfstat.c b/tests-m32/oldfstat.c new file mode 100644 index 000000000..f5a94416c --- /dev/null +++ b/tests-m32/oldfstat.c @@ -0,0 +1,49 @@ +/* + * Check decoding of oldfstat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_oldfstat && HAVE_STRUCT___OLD_KERNEL_STAT + +# define OLD_STAT 1 +# define TEST_SYSCALL_NR __NR_oldfstat +# define TEST_SYSCALL_STR "oldfstat" +# define STRUCT_STAT struct __old_kernel_stat +# define STRUCT_STAT_STR "struct __old_kernel_stat" +# define STRUCT_STAT_IS_STAT64 0 +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 23147718418U) +# include "fstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_oldfstat && HAVE_STRUCT___OLD_KERNEL_STAT") + +#endif diff --git a/tests-m32/oldfstat.test b/tests-m32/oldfstat.test new file mode 100755 index 000000000..66a105612 --- /dev/null +++ b/tests-m32/oldfstat.test @@ -0,0 +1,19 @@ +#!/bin/sh + +# Check oldfstat syscall decoding. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +syscall=$NAME +run_prog > /dev/null +sample=$syscall.sample +> "$sample" +run_strace -ve$syscall -P$sample -a21 $args > "$OUT" +match_diff "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests-m32/oldlstat.c b/tests-m32/oldlstat.c new file mode 100644 index 000000000..661323701 --- /dev/null +++ b/tests-m32/oldlstat.c @@ -0,0 +1,49 @@ +/* + * Check decoding of oldlstat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_oldlstat && HAVE_STRUCT___OLD_KERNEL_STAT + +# define OLD_STAT 1 +# define TEST_SYSCALL_NR __NR_oldlstat +# define TEST_SYSCALL_STR "oldlstat" +# define STRUCT_STAT struct __old_kernel_stat +# define STRUCT_STAT_STR "struct __old_kernel_stat" +# define STRUCT_STAT_IS_STAT64 0 +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 23147718418U) +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_oldlstat && HAVE_STRUCT___OLD_KERNEL_STAT") + +#endif diff --git a/tests-m32/oldlstat.test b/tests-m32/oldlstat.test new file mode 100755 index 000000000..a0f9ab931 --- /dev/null +++ b/tests-m32/oldlstat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check oldlstat syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-m32/oldselect.c b/tests-m32/oldselect.c new file mode 100644 index 000000000..7413fc336 --- /dev/null +++ b/tests-m32/oldselect.c @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_select && defined __NR__newselect \ + && __NR_select != __NR__newselect \ + && !defined SPARC + +# include +# include + +int +main(void) +{ + int fds[2]; + fd_set r = {}, w = {}; + struct timeval timeout = { .tv_sec = 0, .tv_usec = 42 }; + long args[] = { + 2, (long) &r, (long) &w, 0, (long) &timeout, + 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded, 0xdeadbeef + }; + + (void) close(0); + (void) close(1); + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + FD_SET(0, &w); + FD_SET(1, &r); + if (syscall(__NR_select, args)) + perror_msg_and_skip("select"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_select && __NR__newselect") + +#endif diff --git a/tests-m32/oldselect.expected b/tests-m32/oldselect.expected new file mode 100644 index 000000000..d6e7f3c4b --- /dev/null +++ b/tests-m32/oldselect.expected @@ -0,0 +1,2 @@ +select(2, [1], [0], NULL, {tv_sec=0, tv_usec=42}) = 0 (Timeout) ++++ exited with 0 +++ diff --git a/tests-m32/oldselect.test b/tests-m32/oldselect.test new file mode 100755 index 000000000..35661ad43 --- /dev/null +++ b/tests-m32/oldselect.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check old select syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -a34 -eselect $args +match_diff + +exit 0 diff --git a/tests-m32/oldstat.c b/tests-m32/oldstat.c new file mode 100644 index 000000000..d06e2bc64 --- /dev/null +++ b/tests-m32/oldstat.c @@ -0,0 +1,49 @@ +/* + * Check decoding of oldstat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_oldstat && HAVE_STRUCT___OLD_KERNEL_STAT + +# define OLD_STAT 1 +# define TEST_SYSCALL_NR __NR_oldstat +# define TEST_SYSCALL_STR "oldstat" +# define STRUCT_STAT struct __old_kernel_stat +# define STRUCT_STAT_STR "struct __old_kernel_stat" +# define STRUCT_STAT_IS_STAT64 0 +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 131478418U) +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_oldstat && HAVE_STRUCT___OLD_KERNEL_STAT") + +#endif diff --git a/tests-m32/oldstat.test b/tests-m32/oldstat.test new file mode 100755 index 000000000..42d70f7f8 --- /dev/null +++ b/tests-m32/oldstat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check oldstat syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-m32/open.c b/tests-m32/open.c new file mode 100644 index 000000000..01e89b0f2 --- /dev/null +++ b/tests-m32/open.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_open + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "open.sample"; + + long fd = syscall(__NR_open, sample, O_RDONLY|O_CREAT, 0400); + printf("open(\"%s\", O_RDONLY|O_CREAT, 0400) = %s\n", + sample, sprintrc(fd)); + + if (fd != -1) { + close(fd); + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + fd = syscall(__NR_open, sample, O_RDONLY); + printf("open(\"%s\", O_RDONLY) = %s\n", sample, sprintrc(fd)); + + fd = syscall(__NR_open, sample, O_WRONLY|O_NONBLOCK|0x80000000); + printf("open(\"%s\", O_WRONLY|O_NONBLOCK|0x80000000) = %s\n", + sample, sprintrc(fd)); + } + +#ifdef O_TMPFILE +# if O_TMPFILE == (O_TMPFILE & ~O_DIRECTORY) +# define STR_O_TMPFILE "O_TMPFILE" +# else +# define STR_O_TMPFILE "O_DIRECTORY|O_TMPFILE" +# endif + fd = syscall(__NR_open, sample, O_WRONLY|O_TMPFILE, 0600); + printf("open(\"%s\", O_WRONLY|%s, 0600) = %s\n", + sample, STR_O_TMPFILE, sprintrc(fd)); +#endif /* O_TMPFILE */ + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_open") + +#endif diff --git a/tests-m32/open.test b/tests-m32/open.test new file mode 100755 index 000000000..6df19cb82 --- /dev/null +++ b/tests-m32/open.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check open syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a30 -P $NAME.sample diff --git a/tests-m32/openat.c b/tests-m32/openat.c new file mode 100644 index 000000000..1d6765cf6 --- /dev/null +++ b/tests-m32/openat.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2016 Katerina Koukiou + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_openat + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "openat.sample"; + + long fd = syscall(__NR_openat, -100, sample, O_RDONLY|O_CREAT, 0400); + printf("openat(AT_FDCWD, \"%s\", O_RDONLY|O_CREAT, 0400) = %s\n", + sample, sprintrc(fd)); + + if (fd != -1) { + close(fd); + if (unlink(sample) == -1) + perror_msg_and_fail("unlink"); + + fd = syscall(__NR_openat, -100, sample, O_RDONLY); + printf("openat(AT_FDCWD, \"%s\", O_RDONLY) = %s\n", + sample, sprintrc(fd)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_openat") + +#endif diff --git a/tests-m32/openat.test b/tests-m32/openat.test new file mode 100755 index 000000000..68c4cee14 --- /dev/null +++ b/tests-m32/openat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check openat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -P $NAME.sample diff --git a/tests-m32/opipe.test b/tests-m32/opipe.test new file mode 100755 index 000000000..90e6838af --- /dev/null +++ b/tests-m32/opipe.test @@ -0,0 +1,16 @@ +#!/bin/sh + +# Check how -o '|pipe' works. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog grep chdir $srcdir/umovestr.expected > "$EXP" +run_prog ./umovestr + +> "$LOG" || fail_ "failed to write $LOG" +$STRACE -o "|cat > $LOG && $SLEEP_A_BIT && grep chdir < $LOG > $OUT" -e chdir $args || + dump_log_and_fail_with "$STRACE $args failed" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/options-syntax.test b/tests-m32/options-syntax.test new file mode 100755 index 000000000..592b0e034 --- /dev/null +++ b/tests-m32/options-syntax.test @@ -0,0 +1,148 @@ +#!/bin/sh +# +# Check strace options syntax. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +check_exit_status_and_stderr() +{ + $STRACE "$@" 2> "$LOG" && + dump_log_and_fail_with \ + "strace $* failed to handle the error properly" + match_diff "$LOG" "$EXP" || + dump_log_and_fail_with \ + "strace $* failed to print expected diagnostics" +} + +strace_exp="${STRACE##* }" + +check_e() +{ + local pattern="$1"; shift + cat > "$EXP" << __EOF__ +$strace_exp: $pattern +__EOF__ + check_exit_status_and_stderr "$@" +} + +check_h() +{ + local pattern="$1"; shift + cat > "$EXP" << __EOF__ +$strace_exp: $pattern +Try '$strace_exp -h' for more information. +__EOF__ + check_exit_status_and_stderr "$@" +} + +check_e "Invalid process id: '0'" -p 0 +check_e "Invalid process id: '-42'" -p -42 +check_e "Invalid process id: '$$.'" -p $$. +check_e "Invalid process id: 'a'" -p 1,a +check_e "Syscall 'chdir' for -b isn't supported" -b chdir +check_e "Syscall 'chdir' for -b isn't supported" -b execve -b chdir + +check_e "invalid system call '-1'" -e-1 +check_e "invalid system call '-2'" -e -2 +check_e "invalid system call '-3'" -etrace=-3 +check_e "invalid system call '-4'" -e trace=-4 +check_e "invalid system call '-5'" -e trace=1,-5 +check_e "invalid system call '2147483647'" -e 2147483647 +check_e "invalid system call '2147483648'" -e 2147483648 +check_e "invalid system call '4294967295'" -e 4294967295 +check_e "invalid system call '4294967296'" -e 4294967296 + +check_e "invalid descriptor '-1'" -eread=-1 +check_e "invalid descriptor '-42'" -ewrite=-42 +check_e "invalid descriptor '2147483648'" -eread=2147483648 +check_e "invalid descriptor '4294967296'" -ewrite=4294967296 +check_e "invalid descriptor 'foo'" -eread=foo +check_e "invalid descriptor ''" -ewrite= +check_e "invalid descriptor ','" -eread=, +check_e "invalid descriptor '!'" -ewrite='!' +check_e "invalid descriptor '!'" -eread='0,!' +check_e "invalid descriptor '!,'" -ewrite='!,' + +check_h 'must have PROG [ARGS] or -p PID' +check_h 'PROG [ARGS] must be specified with -D' -D -p $$ +check_h '-c and -C are mutually exclusive' -c -C true +check_h '-c and -C are mutually exclusive' -C -c true +check_h '(-c or -C) and -ff are mutually exclusive' -c -ff true +check_h '(-c or -C) and -ff are mutually exclusive' -C -ff true +check_h '-w must be given with (-c or -C)' -w true +check_h 'piping the output and -ff are mutually exclusive' -o '|' -ff true +check_h 'piping the output and -ff are mutually exclusive' -o '!' -ff true +check_h "invalid -a argument: '-42'" -a -42 +check_h "invalid -O argument: '-42'" -O -42 +check_h "invalid -s argument: '-42'" -s -42 +check_h "invalid -I argument: '5'" -I 5 + +if [ -n "${UID-}" ]; then + if [ "${UID-}" = 0 ]; then + umsg="Cannot find user ':nosuchuser:'" + else + umsg='You must be root to use the -u option' + fi + + check_e "$umsg" -u :nosuchuser: true + + for c in i r t T y; do + check_e "-$c has no effect with -c +$strace_exp: $umsg" -u :nosuchuser: -c -$c true + done + check_e "-i has no effect with -c +$strace_exp: -r has no effect with -c +$strace_exp: -t has no effect with -c +$strace_exp: -T has no effect with -c +$strace_exp: -y has no effect with -c +$strace_exp: $umsg" -u :nosuchuser: -cirtTy true + + check_e "-tt has no effect with -r +$strace_exp: $umsg" -u :nosuchuser: -r -tt true +fi + +args='-p 2147483647' +$STRACE $args 2> "$LOG" && + dump_log_and_fail_with \ + "strace $args failed to handle the error properly" + +for cmd in PTRACE_SEIZE PTRACE_ATTACH; do + cat > "$EXP" << __EOF__ +$strace_exp: attach: ptrace($cmd, 2147483647): No such process +__EOF__ + diff -- "$EXP" "$LOG" || + continue + args= + break +done + +[ -z "$args" ] || + dump_log_and_fail_with \ + "strace $args failed to print expected diagnostics" + +rm -f "$EXP" diff --git a/tests-m32/overflowuid.c b/tests-m32/overflowuid.c new file mode 100644 index 000000000..a3c742b46 --- /dev/null +++ b/tests-m32/overflowuid.c @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +int +read_int_from_file(const char *const fname, int *const pvalue) +{ + const int fd = open(fname, O_RDONLY); + if (fd < 0) + return -1; + + long lval; + char buf[sizeof(lval) * 3]; + int n = read(fd, buf, sizeof(buf) - 1); + int saved_errno = errno; + close(fd); + + if (n < 0) { + errno = saved_errno; + return -1; + } + + buf[n] = '\0'; + char *endptr = 0; + errno = 0; + lval = strtol(buf, &endptr, 10); + if (!endptr || (*endptr && '\n' != *endptr) +#if INT_MAX < LONG_MAX + || lval > INT_MAX || lval < INT_MIN +#endif + || ERANGE == errno) { + if (!errno) + errno = EINVAL; + return -1; + } + + *pvalue = (int) lval; + return 0; +} + +static void +check_overflow_id(const int id, const char *overflowid) +{ + int n; + + if (read_int_from_file(overflowid, &n)) { + if (ENOENT == errno) + return; + perror_msg_and_fail("read_int_from_file: %s", overflowid); + } + + if (id == n) + error_msg_and_skip("%d matches %s", id, overflowid); +} + +void +check_overflowuid(const int uid) +{ + check_overflow_id(uid, "/proc/sys/kernel/overflowuid"); +} + +void +check_overflowgid(const int gid) +{ + check_overflow_id(gid, "/proc/sys/kernel/overflowgid"); +} diff --git a/tests-m32/pause.c b/tests-m32/pause.c new file mode 100644 index 000000000..868736207 --- /dev/null +++ b/tests-m32/pause.c @@ -0,0 +1,79 @@ +/* + * Check decoding of pause syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Fei Jie + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_pause + +# include +# include +# include +# include +# include + +static void +handler(int sig) +{ +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct itimerval itv = { .it_value.tv_usec = 123456 }; + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_fail("setitimer"); + + syscall(__NR_pause); + if (errno == ENOSYS) + printf("pause() = -1 ENOSYS (%m)\n"); + else + printf("pause() = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pause") + +#endif diff --git a/tests-m32/pause.test b/tests-m32/pause.test new file mode 100755 index 000000000..c5fdacdeb --- /dev/null +++ b/tests-m32/pause.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pause syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 -esignal=none diff --git a/tests-m32/pc.c b/tests-m32/pc.c new file mode 100644 index 000000000..f53acd451 --- /dev/null +++ b/tests-m32/pc.c @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +int main(void) +{ + const unsigned long pagesize = get_page_size(); + +#ifdef __s390__ + /* + * The si_addr field is unreliable: + * https://marc.info/?l=linux-s390&m=142515870124248&w=2 + */ + error_msg_and_skip("s390: si_addr is unreliable"); +#endif + + /* write instruction pointer length to the log */ + assert(write(-1, NULL, 2 * sizeof(void *)) < 0); + + /* just a noticeable line in the log */ + assert(munmap(&main, 0) < 0); + + int pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + const unsigned long mask = ~(pagesize - 1); + unsigned long addr = (unsigned long) &main & mask; + unsigned long size = pagesize << 1; + +#ifdef HAVE_DLADDR + Dl_info info; + if (dladdr(&main, &info)) { + const unsigned long base = + (unsigned long) info.dli_fbase & mask; + if (base < addr) { + size += addr - base; + addr = base; + } + } else +#endif + { + addr -= size; + size <<= 1; + } + + /* SIGSEGV is expected */ + (void) munmap((void *) addr, size); + (void) munmap((void *) addr, size); + error_msg_and_skip("SIGSEGV did not happen"); + } + + int status; + assert(wait(&status) == pid); + assert(WIFSIGNALED(status)); + assert(WTERMSIG(status) == SIGSEGV); + + /* dump process map for debug purposes */ + close(0); + if (!open("/proc/self/maps", O_RDONLY)) + (void) sendfile(1, 0, NULL, pagesize); + + return 0; +} diff --git a/tests-m32/pc.test b/tests-m32/pc.test new file mode 100755 index 000000000..beadb7d78 --- /dev/null +++ b/tests-m32/pc.test @@ -0,0 +1,61 @@ +#!/bin/sh +# +# Check -i option. +# +# Copyright (c) 2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +check_prog sed + +run_prog > /dev/null + +args="-if $args" +$STRACE $args 2> "$LOG" || + dump_log_and_fail_with "$STRACE $args failed" + +len="$(sed -r -n 's/^\[[[:xdigit:]]+\] write\(-1, NULL, ([[:digit:]]{1,2})\)[[:space:]]+= -1 .*/\1/p' "$LOG")" && +[ -n "$len" ] && +pid="$(sed -r -n 's/^\[[[:xdigit:]]{'"$len"'}\] --- SIGCHLD \{si_signo=SIGCHLD, si_code=CLD_(KILLED|DUMPED), si_pid=([[:digit:]]+), .*/\2/p' "$LOG")" && +[ -n "$pid" ] && +ip="$(sed -r -n 's/^\[pid +'"$pid"'\] \[([[:xdigit:]]{'"$len"'})] --- SIGSEGV \{.*\} ---$/\1/p' "$LOG")" && +[ -n "$ip" ] && +addr="$(echo "$ip" |sed -r 's/^0+//')" && +[ -n "$addr" ] || + dump_log_and_fail_with + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +\\[[[:xdigit:]]{$len}\\] munmap\\(0x[[:xdigit:]]+, 0\\) += -1 .* +\\[pid +$pid\\] \\[$ip\\] --- SIGSEGV \\{si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x$addr\\} --- +\\[pid +$pid\\] \\[\\?{$len}\\] \\+\\+\\+ killed by SIGSEGV( \\(core dumped\\))? \\+\\+\\+ +\\[\\?{$len}\\] \\+\\+\\+ exited with 0 \\+\\+\\+ +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" + +exit 0 diff --git a/tests-m32/perf_event_open.c b/tests-m32/perf_event_open.c new file mode 100644 index 000000000..0ffea292f --- /dev/null +++ b/tests-m32/perf_event_open.c @@ -0,0 +1,821 @@ +/* + * Check verbose decoding of perf_event_open syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined(__NR_perf_event_open) && defined(HAVE_LINUX_PERF_EVENT_H) + +# include +# include +# include +# include +# include +# include +# include +# include + +# include + +# include "xlat.h" +# include "xlat/perf_event_open_flags.h" +# include "xlat/perf_attr_size.h" + +# if ULONG_MAX > UINT_MAX /* Poor man's "whether long is 8 bytes?" */ +# define LONG_STR_PREFIX "ffffffff" +# else /* !(ULONG_MAX > UINT_MAX) */ +# define LONG_STR_PREFIX "" +# endif /* ULONG_MAX > UINT_MAX */ + +# ifndef PERF_TYPE_BREAKPOINT +# define PERF_TYPE_BREAKPOINT 5 +# endif + +struct s32_val_str { + int32_t val; + const char *str; +}; + +struct u32_val_str { + uint32_t val; + const char *str; +}; + +struct u64_val_str { + uint64_t val; + const char *str; +}; + +/* In order to avoid endianess-specific hackery */ +struct pea_flags { + uint64_t disabled :1, + inherit :1, + pinned :1, + exclusive :1, + exclude_user :1, + exclude_kernel :1, + exclude_hv :1, + exclude_idle :1, + mmap :1, + comm :1, + freq :1, + inherit_stat :1, + enable_on_exec :1, + task :1, + watermark :1, + precise_ip :2, + mmap_data :1, + sample_id_all :1, + exclude_host :1, + exclude_guest :1, + exclude_callchain_kernel :1, + exclude_callchain_user :1, + mmap2 :1, + comm_exec :1, + use_clockid :1, + context_switch :1, + write_backward :1, + __reserved_1 :36; +}; + +static const char * +printaddr(void *ptr) +{ + static char buf[sizeof("0x") + sizeof(void *) * 2]; + + if (ptr == NULL) + return "NULL"; + + snprintf(buf, sizeof(buf), "%#lx", (unsigned long)ptr); + + return buf; +} + +/* + * Checklist: + * + * type - 8 IDs + * config - 13 IDs (0..11 + random), depends on type + * sample type - bitmask, up to 20 bits + * read_format - 5 IDs + * bp_type - 6, weird semantics (invalid/unknown) + * branch_sample_type - bitmask, 16 bits + * clockid - 13 values + * + * Unions: + * sample_period/sample_freq + * wakeup_event/wakeup_watermark + * bp_addr/config1 + * bp_len/config2 + */ + +/* + * The main idea behind all those numerous ifdefs is checking against version of + * structure provided in kernel headers and not use one defined in strace + * headers (assume the case when suddenly we add flag without proper update of + * __reserved_1 field or something like this). + */ +static void +print_event_attr(struct perf_event_attr *attr_ptr, size_t size, + const char *type, const char *config, const char *sample_type, + const char *read_format, const char *precise_ip_desc, + const char *bp_type, const char *branch_sample_type, + const char *clockid, uint32_t available_size) +{ + /* + * Currently, strace supports version 5 of the structure, which is + * 112 bytes in size. + */ + enum { + STRACE_PEA_ABBREV_SIZE = + offsetof(struct perf_event_attr, config) + + sizeof(attr_ptr->config), + STRACE_PEA_SIZE = 112, + }; + + uint32_t read_size; + struct perf_event_attr *attr; +# if VERBOSE + uint32_t cutoff; + uint64_t val; + uint64_t use_clockid; + union { + struct pea_flags flags; + uint64_t raw; + } flags_data; +# endif + + read_size = +# if !VERBOSE + STRACE_PEA_ABBREV_SIZE; +# else + size < STRACE_PEA_SIZE ? + (size ? size : PERF_ATTR_SIZE_VER0) : STRACE_PEA_SIZE; +# endif + + if (read_size > available_size) { + printf("%s", printaddr(attr_ptr)); + return; + } + + /* + * Replicate kernel's behaviour regarding copying structure from + * userspace. + */ + attr = calloc(1, STRACE_PEA_SIZE); + + if (!attr) + error_msg_and_fail("calloc"); + + + memcpy(attr, attr_ptr, read_size); + + if (size && (size < PERF_ATTR_SIZE_VER0)) { + printf("%s", printaddr(attr_ptr)); + free(attr); + return; + } + + printf("{type=%s, size=", type); + if (size != attr->size) { + printxval(perf_attr_size, size, "PERF_ATTR_SIZE_???"); + printf(" => "); + } + printxval(perf_attr_size, attr->size, "PERF_ATTR_SIZE_???"); + printf(", config=%s, ", config); + + if (!size) + size = PERF_ATTR_SIZE_VER0; + +# if !VERBOSE + printf("...}"); +# else /* !VERBOSE */ + printf("%s=%" PRI__u64", sample_type=%s, read_format=%s", + attr->freq ? "sample_freq" : "sample_period", + attr->freq ? attr->sample_freq : attr->sample_period, + sample_type, read_format); + + printf(", disabled=%u" + ", inherit=%u" + ", pinned=%u" + ", exclusive=%u" + ", exclusive_user=%u" + ", exclude_kernel=%u" + ", exclude_hv=%u" + ", exclude_idle=%u" + ", mmap=%u" + ", comm=%u" + ", freq=%u" + ", inherit_stat=%u" + ", enable_on_exec=%u" + ", task=%u" + ", watermark=%u", + attr->disabled, + attr->inherit, + attr->pinned, + attr->exclusive, + attr->exclude_user, + attr->exclude_kernel, + attr->exclude_hv, + attr->exclude_idle, + attr->mmap, + attr->comm, + attr->freq, + attr->inherit_stat, + attr->enable_on_exec, + attr->task, + attr->watermark); + + flags_data.raw = ((uint64_t *) attr)[5]; + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP + attr->precise_ip; +# else + flags_data.flags.precise_ip; +# endif + printf(", precise_ip=%" PRIu64 " /* %s */", val, precise_ip_desc); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_MMAP_DATA + attr->mmap_data; +# else + flags_data.flags.mmap_data; +# endif + printf(", mmap_data=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_ID_ALL + attr->sample_id_all; +# else + flags_data.flags.sample_id_all; +# endif + printf(", sample_id_all=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_HOST + attr->exclude_host; +# else + flags_data.flags.exclude_host; +# endif + printf(", exclude_host=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_GUEST + attr->exclude_guest; +# else + flags_data.flags.exclude_guest; +# endif + printf(", exclude_guest=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_KERNEL + attr->exclude_callchain_kernel; +# else + flags_data.flags.exclude_callchain_kernel; +# endif + printf(", exclude_callchain_kernel=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_USER + attr->exclude_callchain_user; +# else + flags_data.flags.exclude_callchain_user; +# endif + printf(", exclude_callchain_user=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_MMAP2 + attr->mmap2; +# else + flags_data.flags.mmap2; +# endif + printf(", mmap2=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_COMM_EXEC + attr->comm_exec; +# else + flags_data.flags.comm_exec; +# endif + printf(", comm_exec=%" PRIu64, val); + + use_clockid = val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_USE_CLOCKID + attr->use_clockid; +# else + flags_data.flags.use_clockid; +# endif + printf(", use_clockid=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONTEXT_SWITCH + attr->context_switch; +# else + flags_data.flags.context_switch; +# endif + printf(", context_switch=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_WRITE_BACKWARD + attr->write_backward; +# else + flags_data.flags.write_backward; +# endif + printf(", write_backward=%" PRIu64, val); + + val = flags_data.flags.__reserved_1; + if (val) + printf(", __reserved_1=%#" PRIx64 " /* Bits 63..28 */", val); + + printf(", %s=%u", + attr->watermark ? "wakeup_watermark" : "wakeup_events", + attr->watermark ? attr->wakeup_watermark : attr->wakeup_events); + + if (attr->type == PERF_TYPE_BREAKPOINT) + printf(", bp_type=%s", bp_type); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG1 + attr->config1; +# else + ((uint64_t *) attr)[56 / sizeof(uint64_t)]; +# endif + printf(", %s=%#" PRIx64, + attr->type == PERF_TYPE_BREAKPOINT ? "bp_addr" : "config1", + val); + + /* End of version 0 of the structure */ + if (size <= 64) { + cutoff = 64; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG2 + attr->config2; +# else + ((uint64_t *) attr)[64 / sizeof(uint64_t)]; +# endif + if (attr->type == PERF_TYPE_BREAKPOINT) + printf(", bp_len=%" PRIu64, val); + else + printf(", config2=%#" PRIx64, val); + + /* End of version 1 of the structure */ + if (size <= 72) { + cutoff = 72; + goto end; + } + + /* + * Print branch sample type only in case PERF_SAMPLE_BRANCH_STACK + * is set in the sample_type field. + */ + if (attr->sample_type & (1 << 11)) + printf(", branch_sample_type=%s", branch_sample_type); + + /* End of version 2 of the structure */ + if (size <= 80) { + cutoff = 80; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_USER + attr->sample_regs_user; +# else + ((uint64_t *) attr)[80 / sizeof(uint64_t)]; +# endif + printf(", sample_regs_user=%#" PRIx64, val); + + if (size <= 88) { + cutoff = 88; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_STACK_USER + attr->sample_stack_user; +# else + ((uint32_t *) attr)[88 / sizeof(uint32_t)]; +# endif + /* + * Print branch sample type only in case PERF_SAMPLE_STACK_USER + * is set in the sample_type field. + */ + if (attr->sample_type & (1 << 13)) + printf(", sample_stack_user=%#" PRIx32, (uint32_t) val); + + if (size <= 92) { + cutoff = 92; + goto end; + } + + if (use_clockid) + printf(", clockid=%s", clockid); + + /* End of version 3 of the structure */ + if (size <= 96) { + cutoff = 96; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_INTR + attr->sample_regs_intr; +# else + ((uint64_t *) attr)[96 / sizeof(uint64_t)]; +# endif + printf(", sample_regs_intr=%#" PRIx64, val); + + /* End of version 4 of the structure */ + if (size <= 104) { + cutoff =104; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_AUX_WATERMARK + attr->aux_watermark; +# else + ((uint32_t *) attr)[104 / sizeof(uint32_t)]; +# endif + printf(", aux_watermark=%" PRIu32, (uint32_t) val); + + if (size <= 108) { + cutoff =108; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_MAX_STACK + attr->sample_max_stack; +# else + ((uint16_t *) attr)[108 / sizeof(uint16_t)]; +# endif + printf(", sample_max_stack=%" PRIu16, (uint16_t) val); + + if (size <= 110) { + cutoff =110; + goto end; + } + + cutoff = STRACE_PEA_SIZE; + +end: + if (size > cutoff) + printf(", ..."); + + printf("}"); +# endif /* !VERBOSE */ + + free(attr); +} + +/* These require aligned access, so no byte-grain checks possible */ +# if defined SPARC || defined SPARC64 || defined POWERPC || defined POWERPC64 +# define ATTR_REC(sz) { tail_alloc((sz + 7) & ~7), sz } +# else +# define ATTR_REC(sz) { tail_alloc(sz), sz } +# endif + +# define BRANCH_TYPE_ALL \ + "PERF_SAMPLE_BRANCH_USER|" \ + "PERF_SAMPLE_BRANCH_KERNEL|" \ + "PERF_SAMPLE_BRANCH_HV|" \ + "PERF_SAMPLE_BRANCH_ANY|" \ + "PERF_SAMPLE_BRANCH_ANY_CALL|" \ + "PERF_SAMPLE_BRANCH_ANY_RETURN|" \ + "PERF_SAMPLE_BRANCH_IND_CALL|" \ + "PERF_SAMPLE_BRANCH_ABORT_TX|" \ + "PERF_SAMPLE_BRANCH_IN_TX|" \ + "PERF_SAMPLE_BRANCH_NO_TX|" \ + "PERF_SAMPLE_BRANCH_COND|" \ + "PERF_SAMPLE_BRANCH_CALL_STACK|" \ + "PERF_SAMPLE_BRANCH_IND_JUMP|" \ + "PERF_SAMPLE_BRANCH_CALL|" \ + "PERF_SAMPLE_BRANCH_NO_FLAGS|" \ + "PERF_SAMPLE_BRANCH_NO_CYCLES" + +int +main(void) +{ + static const size_t attr_small_size = PERF_ATTR_SIZE_VER0 - 8; + static const size_t attr_v0_size = PERF_ATTR_SIZE_VER0; + static const size_t attr_v1_size = PERF_ATTR_SIZE_VER1; + static const size_t attr_v2_size = PERF_ATTR_SIZE_VER2; + static const size_t attr_v2_5_size = PERF_ATTR_SIZE_VER2 + 8; + static const size_t attr_v2_75_size = PERF_ATTR_SIZE_VER2 + 12; + static const size_t attr_v3_size = PERF_ATTR_SIZE_VER3; + static const size_t attr_v4_size = PERF_ATTR_SIZE_VER4; + static const size_t attr_v4_5_size = PERF_ATTR_SIZE_VER4 + 4; + static const size_t attr_v4_625_size = PERF_ATTR_SIZE_VER4 + 5; + static const size_t attr_v4_875_size = PERF_ATTR_SIZE_VER4 + 7; + static const size_t attr_v5_size = PERF_ATTR_SIZE_VER5; + static const size_t attr_big_size = PERF_ATTR_SIZE_VER5 + 32; + + static const struct u64_val_str attr_types[] = { + { ARG_STR(PERF_TYPE_HARDWARE) }, + { ARG_STR(PERF_TYPE_SOFTWARE) }, + { ARG_STR(PERF_TYPE_TRACEPOINT) }, + { ARG_STR(PERF_TYPE_HW_CACHE) }, + { ARG_STR(PERF_TYPE_RAW) }, + { ARG_STR(PERF_TYPE_BREAKPOINT) }, + { ARG_STR(0x6) " /* PERF_TYPE_??? */" }, + { ARG_STR(0xdeadc0de) " /* PERF_TYPE_??? */" }, + }; + static const struct u64_val_str + attr_configs[ARRAY_SIZE(attr_types)][3] = { + /* PERF_TYPE_HARDWARE */ { + { 9, "PERF_COUNT_HW_REF_CPU_CYCLES" }, + { 10, "0xa /* PERF_COUNT_HW_??? */" }, + { ARG_ULL_STR(0xfaceca75deadb0d4) + " /* PERF_COUNT_HW_??? */" }, + }, + /* PERF_TYPE_SOFTWARE */ { + { 10, "PERF_COUNT_SW_BPF_OUTPUT" }, + { 11, "0xb /* PERF_COUNT_SW_??? */" }, + { ARG_ULL_STR(0xdec0ded1dec0ded2) + " /* PERF_COUNT_SW_??? */" }, + }, + /* PERF_TYPE_TRACEPOINT */ { + { ARG_STR(0) }, + { 4207856245U, "4207856245" }, + { ARG_ULL_STR(16051074073505095380) }, + }, + /* PERF_TYPE_HW_CACHE */ { + { 0, "PERF_COUNT_HW_CACHE_L1D|" + "PERF_COUNT_HW_CACHE_OP_READ<<8|" + "PERF_COUNT_HW_CACHE_RESULT_ACCESS<<16" }, + { 0x020207, "0x7 /* PERF_COUNT_HW_CACHE_??? */|" + "PERF_COUNT_HW_CACHE_OP_PREFETCH<<8|" + "0x2 /* PERF_COUNT_HW_CACHE_RESULT_??? */<<16" }, + { 0xdeadf157ed010306ULL, "PERF_COUNT_HW_CACHE_NODE|" + "0x3 /* PERF_COUNT_HW_CACHE_OP_??? */<<8|" + "PERF_COUNT_HW_CACHE_RESULT_MISS<<16|" + "0xdeadf157ed<<24 " + "/* PERF_COUNT_HW_CACHE_??? */" }, + }, + /* PERF_TYPE_RAW */ { + { ARG_STR(0) }, + { ARG_STR(0xda7a1057) }, + { ARG_ULL_STR(0xdec0ded7dec0ded8) }, + }, + /* PERF_TYPE_BREAKPOINT */ { + { ARG_STR(0) }, + { ARG_STR(0xbadc0ded) }, + { ARG_ULL_STR(0xdec0ded9dec0deda) }, + }, + /* invalid 1 */ { + { ARG_STR(0) }, + { ARG_STR(0xbeeff00d) }, + { ARG_ULL_STR(0xdec0dedbdec0dedc) }, + }, + /* invalid 2 */ { + { ARG_STR(0) }, + { ARG_STR(0xca75dead) }, + { ARG_ULL_STR(0xdec0dedddec0dede) }, + }, + }; + static const struct u64_val_str sample_types[] = { + { ARG_STR(0) }, + { 0x800, "PERF_SAMPLE_BRANCH_STACK" }, + { ARG_ULL_STR(0xdeadc0deda780000) " /* PERF_SAMPLE_??? */" }, + { 0xffffffffffffffffULL, + "PERF_SAMPLE_IP|PERF_SAMPLE_TID|PERF_SAMPLE_TIME|" + "PERF_SAMPLE_ADDR|PERF_SAMPLE_READ|" + "PERF_SAMPLE_CALLCHAIN|PERF_SAMPLE_ID|PERF_SAMPLE_CPU|" + "PERF_SAMPLE_PERIOD|PERF_SAMPLE_STREAM_ID|" + "PERF_SAMPLE_RAW|PERF_SAMPLE_BRANCH_STACK|" + "PERF_SAMPLE_REGS_USER|PERF_SAMPLE_STACK_USER|" + "PERF_SAMPLE_WEIGHT|PERF_SAMPLE_DATA_SRC|" + "PERF_SAMPLE_IDENTIFIER|PERF_SAMPLE_TRANSACTION|" + "PERF_SAMPLE_REGS_INTR|0xfffffffffff80000" }, + }; + static const struct u64_val_str read_formats[] = { + { ARG_STR(0) }, + { ARG_STR(PERF_FORMAT_TOTAL_TIME_ENABLED) }, + { 0xf, "PERF_FORMAT_TOTAL_TIME_ENABLED|" + "PERF_FORMAT_TOTAL_TIME_RUNNING|" + "PERF_FORMAT_ID|PERF_FORMAT_GROUP" }, + { ARG_ULL_STR(0xdeadf157dec0ded0) " /* PERF_FORMAT_??? */" }, + { 0xffffffffffffffffULL, + "PERF_FORMAT_TOTAL_TIME_ENABLED|" + "PERF_FORMAT_TOTAL_TIME_RUNNING|" + "PERF_FORMAT_ID|PERF_FORMAT_GROUP|" + "0xfffffffffffffff0" }, + }; + static const char *precise_ip_descs[] = { + "arbitrary skid", + "constant skid", + "requested to have 0 skid", + "must have 0 skid", + }; + static const struct u32_val_str bp_types[] = { + { 0, "HW_BREAKPOINT_EMPTY" }, + { 1, "HW_BREAKPOINT_R" }, + { 3, "HW_BREAKPOINT_RW" }, + { 5, "0x5 /* HW_BREAKPOINT_INVALID */" }, + { 8, "0x8 /* HW_BREAKPOINT_??? */" }, + { ARG_STR(0xface1e55) " /* HW_BREAKPOINT_??? */" }, + }; + static const struct u64_val_str branch_sample_types[] = { + { ARG_STR(0) }, + { 0x80, "PERF_SAMPLE_BRANCH_ABORT_TX" }, + { 0xffff, BRANCH_TYPE_ALL }, + { ARG_ULL_STR(0xdeadcaffeeed0000) + " /* PERF_SAMPLE_BRANCH_??? */" }, + { 0xffffffffffffffffULL, + BRANCH_TYPE_ALL "|0xffffffffffff0000" } + }; + static const struct s32_val_str clockids[] = { + { 11, "CLOCK_TAI" }, + { ARG_STR(0xc) " /* CLOCK_??? */" }, + { ARG_STR(0xbeeffeed) " /* CLOCK_??? */" }, + }; + + + struct { + struct perf_event_attr *ptr; + size_t size; + } attrs[] = { + ATTR_REC(sizeof(struct perf_event_attr)), + ATTR_REC(attr_v0_size), + ATTR_REC(attr_v1_size), + ATTR_REC(attr_v2_size), + ATTR_REC(attr_v2_5_size), + ATTR_REC(attr_v2_75_size), + ATTR_REC(attr_v3_size), + ATTR_REC(attr_v4_size), + ATTR_REC(attr_v4_5_size), + ATTR_REC(attr_v4_625_size), + ATTR_REC(attr_v4_875_size), + ATTR_REC(attr_v5_size), + ATTR_REC(attr_big_size), + }; + + struct perf_event_attr *small_attr = tail_alloc(sizeof(*small_attr)); + + struct { + struct perf_event_attr *attr; + pid_t pid; + int cpu; + int group_fd; + unsigned long flags; + const char *flags_str; + } args[] = { + { NULL, 0xfacef00d, 0xbadabba7, -1, + (unsigned long) 0xFFFFFFFFFFFFFFFFLLU, + "PERF_FLAG_FD_NO_GROUP|PERF_FLAG_FD_OUTPUT|" + "PERF_FLAG_PID_CGROUP|PERF_FLAG_FD_CLOEXEC|" + "0x" LONG_STR_PREFIX "fffffff0" + }, + { small_attr + 1, 0, 0, 0, + 0, "0" }, + { small_attr, -1, -1, 1, + PERF_FLAG_FD_NO_GROUP | PERF_FLAG_FD_OUTPUT | + PERF_FLAG_PID_CGROUP | PERF_FLAG_FD_CLOEXEC, + "PERF_FLAG_FD_NO_GROUP|PERF_FLAG_FD_OUTPUT|" + "PERF_FLAG_PID_CGROUP|PERF_FLAG_FD_CLOEXEC" }, + { (struct perf_event_attr *) (uintptr_t) 0xfffffacefffffeedULL, + -100, 100, 0xface1e55, + PERF_FLAG_FD_CLOEXEC, "PERF_FLAG_FD_CLOEXEC" }, + }; + + size_t i; + int rc; + + fill_memory(small_attr, sizeof(*small_attr)); + small_attr->size = attr_small_size; + + for (i = 0; i < ARRAY_SIZE(args); i++) { + rc = syscall(__NR_perf_event_open, args[i].attr, args[i].pid, + args[i].cpu, args[i].group_fd, args[i].flags); + printf("perf_event_open(%s, %d, %d, %d, %s) = %s\n", + printaddr(args[i].attr), args[i].pid, args[i].cpu, + args[i].group_fd, args[i].flags_str, sprintrc(rc)); + } + + for (i = 0; i < ARRAY_SIZE(attrs) * ARRAY_SIZE(attr_types) * + ARRAY_SIZE(attr_configs[0]) + 1; i++) { + struct perf_event_attr *attr = attrs[i % ARRAY_SIZE(attrs)].ptr; + uint32_t size = attrs[i % ARRAY_SIZE(attrs)].size; + unsigned char fill_start = 0x80 + i; + size_t type_idx = i % ARRAY_SIZE(attr_types); + size_t config_idx = i % ARRAY_SIZE(attr_configs[0]); + size_t sample_type_idx = i % ARRAY_SIZE(sample_types); + size_t read_format_idx = i % ARRAY_SIZE(read_formats); + size_t bp_type_idx = (i / ARRAY_SIZE(attr_configs[0])) % + ARRAY_SIZE(bp_types); + size_t branch_sample_type_idx = (i / ARRAY_SIZE(sample_types)) % + ARRAY_SIZE(branch_sample_types); + size_t clockid_idx = i % ARRAY_SIZE(clockids); + size_t args_idx = i % ARRAY_SIZE(args); + const char *ip_desc_str; + + fill_memory_ex(attr, size, fill_start, 0xff); + + attr->type = attr_types[type_idx].val; + attr->size = size; + attr->config = attr_configs[type_idx][config_idx].val; + attr->sample_type = sample_types[sample_type_idx].val; + attr->read_format = read_formats[read_format_idx].val; + + if ((i % 11) == 5) + attr->__reserved_1 = 0; + +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_BP_TYPE + attr->bp_type = +# else + ((uint32_t *) attr)[52 / sizeof(uint32_t)] = +# endif + bp_types[bp_type_idx].val; + + if (size >= 80) +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_BRANCH_SAMPLE_TYPE + attr->branch_sample_type = +# else + ((uint64_t *) attr)[72 / sizeof(uint64_t)] = +# endif + branch_sample_types[branch_sample_type_idx].val; + + if (size >= 96) +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CLOCKID + attr->clockid = +# else + ((uint32_t *) attr)[92 / sizeof(uint32_t)] = +# endif + clockids[clockid_idx].val; + +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP + ip_desc_str = precise_ip_descs[attr->precise_ip]; +# else + union { + struct pea_flags flags; + uint64_t raw; + } flags_data = { .raw = ((uint64_t *) attr)[5] }; + + ip_desc_str = precise_ip_descs[flags_data.flags.precise_ip]; +# endif + + if (i == 0) + attr->size = size + 8; + + if (i == 1) + attr->size = 0; + + rc = syscall(__NR_perf_event_open, attr, args[args_idx].pid, + args[args_idx].cpu, args[args_idx].group_fd, + args[args_idx].flags); + + printf("perf_event_open("); + print_event_attr(attr, i ? ((i == 1) ? 0 : size) : size + 8, + attr_types[type_idx].str, + attr_configs[type_idx][config_idx].str, + sample_types[sample_type_idx].str, + read_formats[read_format_idx].str, + ip_desc_str, + bp_types[bp_type_idx].str, + branch_sample_types[branch_sample_type_idx].str, + clockids[clockid_idx].str, size); + printf(", %d, %d, %d, %s) = %s\n", args[args_idx].pid, + args[args_idx].cpu, args[args_idx].group_fd, + args[args_idx].flags_str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_perf_event_open && HAVE_LINUX_PERF_EVENT_H"); + +#endif diff --git a/tests-m32/perf_event_open.test b/tests-m32/perf_event_open.test new file mode 100755 index 000000000..499134b40 --- /dev/null +++ b/tests-m32/perf_event_open.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check perf_event_open syscall decoding. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a1 diff --git a/tests-m32/perf_event_open_nonverbose.c b/tests-m32/perf_event_open_nonverbose.c new file mode 100644 index 000000000..45d7c8f23 --- /dev/null +++ b/tests-m32/perf_event_open_nonverbose.c @@ -0,0 +1,113 @@ +/* + * Check decoding of perf_event_open syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined(__NR_perf_event_open) && defined(HAVE_LINUX_PERF_EVENT_H) + +# include +# include +# include + +# include + +# include "xlat.h" +# include "xlat/perf_event_open_flags.h" + +#if ULONG_MAX > UINT_MAX +#define LONG_STR_PREFIX "ffffffff" +#else +#define LONG_STR_PREFIX "" +#endif + +static const char *printaddr(void *ptr) +{ + static char buf[sizeof("0x") + sizeof(void *) * 2]; + + if (ptr == NULL) + return "NULL"; + + snprintf(buf, sizeof(buf), "%#lx", (unsigned long)ptr); + + return buf; +} + +int +main(void) +{ + struct perf_event_attr *attr = tail_alloc(sizeof(*attr)); + + attr->type = PERF_TYPE_HARDWARE; + attr->size = sizeof(*attr); + + struct { + struct perf_event_attr *attr; + pid_t pid; + int cpu; + int group_fd; + unsigned long flags; + const char *flags_str; + } args[] = { + { NULL, 0xfacef00d, 0xbadabba7, -1, + (unsigned long) 0xFFFFFFFFFFFFFFFFLLU, + "PERF_FLAG_FD_NO_GROUP|PERF_FLAG_FD_OUTPUT|" + "PERF_FLAG_PID_CGROUP|PERF_FLAG_FD_CLOEXEC|" + "0x" LONG_STR_PREFIX "fffffff0" + }, + { attr + 1, 0, 0, 0, + 0, "0" }, + { attr, -1, -1, 1, + PERF_FLAG_FD_CLOEXEC, "PERF_FLAG_FD_CLOEXEC" }, + { attr - 1, -100, 100, 0xface1e55, + PERF_FLAG_FD_NO_GROUP | PERF_FLAG_FD_OUTPUT | + PERF_FLAG_PID_CGROUP | PERF_FLAG_FD_CLOEXEC, + "PERF_FLAG_FD_NO_GROUP|PERF_FLAG_FD_OUTPUT|" + "PERF_FLAG_PID_CGROUP|PERF_FLAG_FD_CLOEXEC" }, + }; + size_t i; + int rc; + + for (i = 0; i < ARRAY_SIZE(args); i++) { + rc = syscall(__NR_perf_event_open, args[i].attr, args[i].pid, + args[i].cpu, args[i].group_fd, args[i].flags); + printf("perf_event_open(%s, %d, %d, %d, %s) = %s\n", + printaddr(args[i].attr), args[i].pid, args[i].cpu, + args[i].group_fd, args[i].flags_str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_perf_event_open && HAVE_LINUX_PERF_EVENT_H"); + +#endif diff --git a/tests-m32/perf_event_open_nonverbose.test b/tests-m32/perf_event_open_nonverbose.test new file mode 100755 index 000000000..404827fed --- /dev/null +++ b/tests-m32/perf_event_open_nonverbose.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of perf_event_open syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a34 -e verbose=none -e trace=perf_event_open diff --git a/tests-m32/perf_event_open_unabbrev.c b/tests-m32/perf_event_open_unabbrev.c new file mode 100644 index 000000000..c2f260dea --- /dev/null +++ b/tests-m32/perf_event_open_unabbrev.c @@ -0,0 +1,2 @@ +#define VERBOSE 1 +#include "perf_event_open.c" diff --git a/tests-m32/perf_event_open_unabbrev.test b/tests-m32/perf_event_open_unabbrev.test new file mode 100755 index 000000000..f17fd17e8 --- /dev/null +++ b/tests-m32/perf_event_open_unabbrev.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check perf_event_open syscall decoding. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a1 -v -e trace=perf_event_open diff --git a/tests-m32/personality.c b/tests-m32/personality.c new file mode 100644 index 000000000..7a279a144 --- /dev/null +++ b/tests-m32/personality.c @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +int main(void) +{ + const unsigned int good_type = PER_BSD; + const char *good_type_str = "PER_BSD"; + + const unsigned int bad_type = 0x1f; + const char *bad_type_str = "0x1f /\\* PER_\\?\\?\\? \\*/"; + + const unsigned int good_flags = + SHORT_INODE | WHOLE_SECONDS | STICKY_TIMEOUTS; + const char *good_flags_str = + "SHORT_INODE\\|WHOLE_SECONDS\\|STICKY_TIMEOUTS"; + + const unsigned int bad_flags = 0x10000; + const char *bad_flags_str = "0x10000"; + + const unsigned int saved_pers = personality(0xffffffff); + printf("personality\\(0xffffffff\\) = %#x \\([^)]*\\)\n", saved_pers); + + /* PER_LINUX */ + personality(PER_LINUX); + printf("personality\\(PER_LINUX\\) = %#x \\([^)]*\\)\n", saved_pers); + + personality(0xffffffff); + puts("personality\\(0xffffffff\\) = 0 \\(PER_LINUX\\)"); + + personality(good_flags); + printf("personality\\(PER_LINUX\\|%s\\) = 0 \\(PER_LINUX\\)\n", + good_flags_str); + + personality(bad_flags); + printf("personality\\(PER_LINUX\\|%s\\)" + " = %#x \\(PER_LINUX\\|%s\\)\n", + bad_flags_str, good_flags, good_flags_str); + + personality(good_flags | bad_flags); + printf("personality\\(PER_LINUX\\|%s\\|%s\\)" + " = %#x \\(PER_LINUX\\|%s\\)\n", + good_flags_str, bad_flags_str, bad_flags, bad_flags_str); + + /* another valid type */ + personality(good_type); + printf("personality\\(%s\\) = %#x \\(PER_LINUX\\|%s\\|%s\\)\n", + good_type_str, good_flags | bad_flags, + good_flags_str, bad_flags_str); + + personality(good_type | good_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\)\n", + good_type_str, good_flags_str, good_type, good_type_str); + + personality(good_type | bad_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + good_type_str, bad_flags_str, good_type | good_flags, + good_type_str, good_flags_str); + + personality(good_type | good_flags | bad_flags); + printf("personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + good_type_str, good_flags_str, bad_flags_str, + good_type | bad_flags, + good_type_str, bad_flags_str); + + /* invalid type */ + personality(bad_type); + printf("personality\\(%s\\) = %#x \\(%s\\|%s\\|%s\\)\n", + bad_type_str, good_type | good_flags | bad_flags, + good_type_str, good_flags_str, bad_flags_str); + + personality(bad_type | good_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\)\n", + bad_type_str, good_flags_str, bad_type, bad_type_str); + + personality(bad_type | bad_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + bad_type_str, bad_flags_str, bad_type | good_flags, + bad_type_str, good_flags_str); + + personality(bad_type | good_flags | bad_flags); + printf("personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + bad_type_str, good_flags_str, bad_flags_str, + bad_type | bad_flags, bad_type_str, bad_flags_str); + + personality(saved_pers); + printf("personality\\([^)]*\\) = %#x \\(%s\\|%s\\|%s\\)\n", + bad_type | good_flags | bad_flags, + bad_type_str, good_flags_str, bad_flags_str); + + return 0; +} diff --git a/tests-m32/personality.test b/tests-m32/personality.test new file mode 100755 index 000000000..8f8c0adbe --- /dev/null +++ b/tests-m32/personality.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check personality syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a20 -epersonality $args > "$OUT" +match_grep "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests-m32/pipe.c b/tests-m32/pipe.c new file mode 100644 index 000000000..41c7f2154 --- /dev/null +++ b/tests-m32/pipe.c @@ -0,0 +1,55 @@ +/* + * Check decoding of pipe syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_pipe + +# include +# include +# include + +int +main(void) +{ + (void) close(0); + (void) close(1); + int *const fds = tail_alloc(sizeof(*fds) * 2); + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pipe") + +#endif diff --git a/tests-m32/pipe.expected b/tests-m32/pipe.expected new file mode 100644 index 000000000..2e46336c3 --- /dev/null +++ b/tests-m32/pipe.expected @@ -0,0 +1,2 @@ +pipe([0, 1]) = 0 ++++ exited with 0 +++ diff --git a/tests-m32/pipe.test b/tests-m32/pipe.test new file mode 100755 index 000000000..0ae414d49 --- /dev/null +++ b/tests-m32/pipe.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check decoding of pipe syscall. +. "${srcdir=.}/init.sh" + +run_prog +run_strace -a13 -epipe $args + +check_prog grep +LC_ALL=C grep -x "pipe(.*" "$LOG" > /dev/null || + skip_ 'test executable does not use pipe syscall' + +match_diff diff --git a/tests-m32/pipe2.c b/tests-m32/pipe2.c new file mode 100644 index 000000000..375ae74f1 --- /dev/null +++ b/tests-m32/pipe2.c @@ -0,0 +1,71 @@ +/* + * Check decoding of pipe2 syscall. + * + * Copyright (c) 2015-2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_pipe2 + +# include +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_zero = + (kernel_ulong_t) 0xffffffff00000000ULL; + int *const fds = tail_alloc(sizeof(*fds) * 2); + int *const efault = fds + 1; + long rc; + + rc = syscall(__NR_pipe2, fds, bogus_zero | O_NONBLOCK); + if (rc) + perror_msg_and_skip("pipe2"); + printf("pipe2([%d, %d], O_NONBLOCK) = 0\n", fds[0], fds[1]); + + rc = syscall(__NR_pipe2, efault, bogus_zero); + printf("pipe2(%p, 0) = %s\n", efault, sprintrc(rc)); + + if (F8ILL_KULONG_SUPPORTED) { + const kernel_ulong_t ill = f8ill_ptr_to_kulong(fds); + rc = syscall(__NR_pipe2, ill, 0); + printf("pipe2(%#llx, 0) = %s\n", + (unsigned long long) ill, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pipe2") + +#endif diff --git a/tests-m32/pipe2.test b/tests-m32/pipe2.test new file mode 100755 index 000000000..aff6cd443 --- /dev/null +++ b/tests-m32/pipe2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pipe2 syscall. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a15 diff --git a/tests-m32/pipe_maxfd.c b/tests-m32/pipe_maxfd.c new file mode 100644 index 000000000..a1343f917 --- /dev/null +++ b/tests-m32/pipe_maxfd.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +static void +move_fd(int *from, int *to) +{ + for (; *to > *from; --*to) { + if (dup2(*from, *to) != *to) + continue; + close(*from); + *from = *to; + break; + } +} + +void +pipe_maxfd(int pipefd[2]) +{ + struct rlimit rlim; + if (getrlimit(RLIMIT_NOFILE, &rlim)) + perror_msg_and_fail("getrlimit"); + if (rlim.rlim_cur < rlim.rlim_max) { + struct rlimit rlim_new; + rlim_new.rlim_cur = rlim_new.rlim_max = rlim.rlim_max; + if (!setrlimit(RLIMIT_NOFILE, &rlim_new)) + rlim.rlim_cur = rlim.rlim_max; + } + + if (pipe(pipefd)) + perror_msg_and_fail("pipe"); + + int max_fd = (rlim.rlim_cur > 0 && rlim.rlim_cur < INT_MAX) + ? rlim.rlim_cur - 1 : INT_MAX; + + move_fd(&pipefd[1], &max_fd); + --max_fd; + move_fd(&pipefd[0], &max_fd); +} diff --git a/tests-m32/pkey_alloc.c b/tests-m32/pkey_alloc.c new file mode 100644 index 000000000..457727873 --- /dev/null +++ b/tests-m32/pkey_alloc.c @@ -0,0 +1,84 @@ +/* + * Check decoding of pkey_alloc syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_pkey_alloc + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t flags[] = { + 0, + (kernel_ulong_t) 0xbadc0ded00000000ULL, + (kernel_ulong_t) 0xffff0000eeee1111ULL, + (kernel_ulong_t) 0x123456789abcdef0ULL, + }; + static const struct { + kernel_ulong_t val; + const char *str; + } rights[] = { + { (kernel_ulong_t) 0xbadc0ded00000002ULL, + sizeof(kernel_ulong_t) > sizeof(int) ? + "PKEY_DISABLE_WRITE|0xbadc0ded00000000" : + "PKEY_DISABLE_WRITE" }, + { 0xdec0ded, "PKEY_DISABLE_ACCESS|0xdec0dec" }, + { 0x3, "PKEY_DISABLE_ACCESS|PKEY_DISABLE_WRITE" }, + { ARG_STR(0) }, + { 0xbadc0dec, "0xbadc0dec /* PKEY_??? */" }, + }; + + long rc; + unsigned int i; + unsigned int j; + + for (i = 0; i < ARRAY_SIZE(flags); i++) { + for (j = 0; j < ARRAY_SIZE(rights); j++) { + rc = syscall(__NR_pkey_alloc, flags[i], rights[j].val); + printf("pkey_alloc(%#llx, %s) = %s\n", + (unsigned long long) flags[i], rights[j].str, + sprintrc(rc)); + } + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pkey_alloc"); + +#endif diff --git a/tests-m32/pkey_alloc.test b/tests-m32/pkey_alloc.test new file mode 100755 index 000000000..f168c21a1 --- /dev/null +++ b/tests-m32/pkey_alloc.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pkey_alloc syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff --git a/tests-m32/pkey_free.c b/tests-m32/pkey_free.c new file mode 100644 index 000000000..95a2ad263 --- /dev/null +++ b/tests-m32/pkey_free.c @@ -0,0 +1,67 @@ +/* + * Check decoding of pkey_free syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_pkey_free + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t keys[] = { + 0, + 3141592653U, + (kernel_ulong_t) 0xbadc0ded00000000ULL, + (kernel_ulong_t) 0xffff00001111eeeeULL, + (kernel_ulong_t) 0x123456789abcdef0ULL, + }; + + long rc; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(keys); i++) { + rc = syscall(__NR_pkey_free, keys[i]); + printf("pkey_free(%d) = %s\n", (int) keys[i], sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pkey_free"); + +#endif diff --git a/tests-m32/pkey_free.test b/tests-m32/pkey_free.test new file mode 100755 index 000000000..9c01c3e75 --- /dev/null +++ b/tests-m32/pkey_free.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pkey_free syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff --git a/tests-m32/pkey_mprotect.c b/tests-m32/pkey_mprotect.c new file mode 100644 index 000000000..529abd1f1 --- /dev/null +++ b/tests-m32/pkey_mprotect.c @@ -0,0 +1,120 @@ +/* + * Check decoding of pkey_mprotect syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_pkey_mprotect + +# include +# include +# include + +const char * +sprintptr(kernel_ulong_t ptr) +{ + static char buf[sizeof(ptr) * 2 + sizeof("0x")]; + + if (ptr) + snprintf(buf, sizeof(buf), "%#llx", (unsigned long long) ptr); + else + return "NULL"; + + return buf; +} + +int +main(void) +{ + static const kernel_ulong_t ptrs[] = { + 0, + (kernel_ulong_t) 0xfacebeef00000000ULL, + (kernel_ulong_t) 0xbadc0dedda7a1057ULL, + }; + static const kernel_ulong_t sizes[] = { + 0, + (kernel_ulong_t) 0xfacebeef00000000ULL, + (kernel_ulong_t) 0xfedcba9876543210ULL, + (kernel_ulong_t) 0x123456789abcdef0ULL, + (kernel_ulong_t) 0xbadc0dedda7a1057ULL, + }; + static const struct { + kernel_ulong_t val; + const char *str; + } prots[] = { + { ARG_STR(PROT_READ) }, + /* For now, only 0x0300001f are used */ + { (kernel_ulong_t) 0xdeadfeed00ca7500ULL, + sizeof(kernel_ulong_t) > sizeof(int) ? + "0xdeadfeed00ca7500 /* PROT_??? */" : + "0xca7500 /* PROT_??? */" }, + { ARG_STR(PROT_READ|PROT_WRITE|0xface00) }, + }; + static const kernel_ulong_t pkeys[] = { + 0, + -1LL, + (kernel_ulong_t) 0xface1e55, + (kernel_ulong_t) 0xbadc0ded00000001, + }; + + long rc; + unsigned int i; + unsigned int j; + unsigned int k; + unsigned int l; + + for (i = 0; i < ARRAY_SIZE(ptrs); i++) { + for (j = 0; j < ARRAY_SIZE(sizes); j++) { + for (k = 0; k < ARRAY_SIZE(prots); k++) { + for (l = 0; l < ARRAY_SIZE(pkeys); l++) { + rc = syscall(__NR_pkey_mprotect, + ptrs[i], sizes[j], + prots[k].val, pkeys[l]); + printf("pkey_mprotect(%s, %llu, %s, %d)" + " = %s\n", + sprintptr(ptrs[i]), + (unsigned long long) sizes[j], + prots[k].str, (int) pkeys[l], + sprintrc(rc)); + } + } + } + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pkey_mprotect"); + +#endif diff --git a/tests-m32/pkey_mprotect.test b/tests-m32/pkey_mprotect.test new file mode 100755 index 000000000..922d4919f --- /dev/null +++ b/tests-m32/pkey_mprotect.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pkey_mprotect syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a37 diff --git a/tests-m32/poll.c b/tests-m32/poll.c new file mode 100644 index 000000000..c47c97e51 --- /dev/null +++ b/tests-m32/poll.c @@ -0,0 +1,259 @@ +/* + * This file is part of poll strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_poll + +# include +# include +# include +# include +# include +# include + +#define PRINT_EVENT(flag, member) \ + if (member & flag) { \ + if (member != pfd->member) \ + tprintf("|"); \ + tprintf(#flag); \ + member &= ~flag; \ + } + +static void +print_pollfd_entering(const struct pollfd *const pfd) +{ + tprintf("{fd=%d", pfd->fd); + if (pfd->fd >= 0) { + tprintf(", events="); + short events = pfd->events; + + if (pfd->events) { + PRINT_EVENT(POLLIN, events) + PRINT_EVENT(POLLPRI, events) + PRINT_EVENT(POLLOUT, events) +#ifdef POLLRDNORM + PRINT_EVENT(POLLRDNORM, events) +#endif +#ifdef POLLWRNORM + PRINT_EVENT(POLLWRNORM, events) +#endif +#ifdef POLLRDBAND + PRINT_EVENT(POLLRDBAND, events) +#endif +#ifdef POLLWRBAND + PRINT_EVENT(POLLWRBAND, events) +#endif + PRINT_EVENT(POLLERR, events) + PRINT_EVENT(POLLHUP, events) + PRINT_EVENT(POLLNVAL, events) + } else + tprintf("0"); + } + tprintf("}"); +} + +static void +print_pollfd_array_entering(const struct pollfd *const pfd, + const unsigned int size, + const unsigned int valid, + const unsigned int abbrev) +{ + tprintf("["); + unsigned int i; + for (i = 0; i < size; ++i) { + if (i) + tprintf(", "); + if (i >= valid) { + tprintf("%p", &pfd[i]); + break; + } + if (i >= abbrev) { + tprintf("..."); + break; + } + print_pollfd_entering(&pfd[i]); + } + tprintf("]"); +} + +static void +print_pollfd_exiting(const struct pollfd *const pfd, + unsigned int *const seen, + const unsigned int abbrev) +{ + if (!pfd->revents || pfd->fd < 0 || *seen > abbrev) + return; + + if (*seen) + tprintf(", "); + ++(*seen); + + if (*seen > abbrev) { + tprintf("..."); + return; + } + tprintf("{fd=%d, revents=", pfd->fd); + short revents = pfd->revents; + + PRINT_EVENT(POLLIN, revents) + PRINT_EVENT(POLLPRI, revents) + PRINT_EVENT(POLLOUT, revents) +#ifdef POLLRDNORM + PRINT_EVENT(POLLRDNORM, revents) +#endif +#ifdef POLLWRNORM + PRINT_EVENT(POLLWRNORM, revents) +#endif +#ifdef POLLRDBAND + PRINT_EVENT(POLLRDBAND, revents) +#endif +#ifdef POLLWRBAND + PRINT_EVENT(POLLWRBAND, revents) +#endif + PRINT_EVENT(POLLERR, revents) + PRINT_EVENT(POLLHUP, revents) + PRINT_EVENT(POLLNVAL, revents) + tprintf("}"); +} + +static void +print_pollfd_array_exiting(const struct pollfd *const pfd, + const unsigned int size, + const unsigned int abbrev) +{ + tprintf("["); + unsigned int seen = 0; + unsigned int i; + for (i = 0; i < size; ++i) + print_pollfd_exiting(&pfd[i], &seen, abbrev); + tprintf("]"); +} + +int +main(int ac, char **av) +{ + tprintf("%s", ""); + + assert(syscall(__NR_poll, NULL, 42, 0) == -1); + if (ENOSYS == errno) + perror_msg_and_skip("poll"); + tprintf("poll(NULL, 42, 0) = -1 EFAULT (%m)\n"); + + int fds[2]; + if (pipe(fds) || pipe(fds)) + perror_msg_and_fail("pipe"); + + const unsigned int abbrev = (ac > 1) ? atoi(av[1]) : -1; + const struct pollfd pfds0[] = { + { .fd = 0, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 1, .events = POLLOUT | POLLWRNORM | POLLWRBAND }, + { .fd = fds[0], .events = POLLIN | POLLPRI }, + { .fd = fds[1], .events = POLLOUT }, + { .fd = 2, .events = POLLOUT | POLLWRBAND } + }; + struct pollfd *const tail_fds0 = tail_memdup(pfds0, sizeof(pfds0)); + const int timeout = 42; + int rc = syscall(__NR_poll, tail_fds0, 0, timeout); + assert(rc == 0); + + tprintf("poll([], 0, %d) = %d (Timeout)\n", timeout, rc); + + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 3); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + tail_fds0[0].fd = -1; + tail_fds0[2].fd = -3; + tail_fds0[4].events = 0; + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 2); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + tail_fds0[1].fd = -2; + tail_fds0[4].fd = -5; + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 1); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + struct pollfd pfds1[] = { + { .fd = 1, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 0, .events = POLLOUT | POLLWRNORM | POLLWRBAND } + }; + struct pollfd *const tail_fds1 = tail_memdup(pfds1, sizeof(pfds1)); + rc = syscall(__NR_poll, tail_fds1, ARRAY_SIZE(pfds1), timeout); + assert(rc == 0); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds1, ARRAY_SIZE(pfds1), + ARRAY_SIZE(pfds1), abbrev); + tprintf(", %u, %d) = %d (Timeout)\n", ARRAY_SIZE(pfds1), timeout, rc); + + const void *const efault = tail_fds0 + ARRAY_SIZE(pfds0); + rc = syscall(__NR_poll, efault, 1, 0); + assert(rc == -1); + tprintf("poll(%p, 1, 0) = -1 EFAULT (%m)\n", efault); + + const unsigned int valid = 1; + const void *const epfds = tail_fds0 + ARRAY_SIZE(pfds0) - valid; + rc = syscall(__NR_poll, epfds, valid + 1, 0); + assert(rc == -1); + tprintf("poll("); + print_pollfd_array_entering(epfds, valid + 1, valid, abbrev); + errno = EFAULT; + tprintf(", %u, 0) = -1 EFAULT (%m)\n", valid + 1); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_poll") + +#endif diff --git a/tests-m32/poll.test b/tests-m32/poll.test new file mode 100755 index 000000000..b74be29e6 --- /dev/null +++ b/tests-m32/poll.test @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check poll syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -vepoll $args > "$OUT" +match_diff "$LOG" "$OUT" + +for abbrev in 0 1 2 3 4 5; do + run_prog "./$NAME" $abbrev > /dev/null + run_strace -a16 -epoll -s$abbrev $args > "$OUT" + match_diff "$LOG" "$OUT" +done + +rm -f "$OUT" diff --git a/tests-m32/ppoll-v.expected b/tests-m32/ppoll-v.expected new file mode 100644 index 000000000..31070ad16 --- /dev/null +++ b/tests-m32/ppoll-v.expected @@ -0,0 +1,3 @@ +ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \{fd=3, events=POLLIN\|POLLPRI\}, \{fd=4, events=POLLOUT\}\], 4, \{tv_sec=42, tv_nsec=999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{tv_sec=42, tv_nsec=9[0-9]{8}\}\) +ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{tv_sec=0, tv_nsec=999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) +ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) = -1 EFAULT .* diff --git a/tests-m32/ppoll.c b/tests-m32/ppoll.c new file mode 100644 index 000000000..46d7e8169 --- /dev/null +++ b/tests-m32/ppoll.c @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +static void +test1(void) +{ + const struct timespec timeout = { .tv_sec = 42, .tv_nsec = 999999999 }; + struct pollfd fds[] = { + { .fd = 0, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 1, .events = POLLOUT | POLLWRNORM | POLLWRBAND }, + { .fd = 3, .events = POLLIN | POLLPRI }, + { .fd = 4, .events = POLLOUT } + }; + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR2); + sigaddset(&mask, SIGCHLD); + + int rc = ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask); + if (rc < 0) + perror_msg_and_skip("ppoll"); + assert(rc == 2); +} + +static void +test2(void) +{ + const struct timespec timeout = { .tv_sec = 0, .tv_nsec = 999 }; + struct pollfd fds[] = { + { .fd = 1, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 0, .events = POLLOUT | POLLWRNORM | POLLWRBAND } + }; + + sigset_t mask; + sigfillset(&mask); + sigdelset(&mask, SIGHUP); + sigdelset(&mask, SIGKILL); + sigdelset(&mask, SIGSTOP); + + int rc = ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask); + if (rc < 0) + perror_msg_and_skip("ppoll"); + assert(rc == 0); +} + +int +main(void) +{ + int fds[2]; + + (void) close(0); + (void) close(1); + (void) close(3); + (void) close(4); + if (pipe(fds) || pipe(fds)) + perror_msg_and_fail("pipe"); + + test1(); + test2(); + + assert(ppoll(NULL, 42, NULL, NULL) < 0); + return 0; +} diff --git a/tests-m32/ppoll.expected b/tests-m32/ppoll.expected new file mode 100644 index 000000000..c38a2062a --- /dev/null +++ b/tests-m32/ppoll.expected @@ -0,0 +1,3 @@ +ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \.\.\.\], 4, \{tv_sec=42, tv_nsec=999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{tv_sec=42, tv_nsec=9[0-9]{8}\}\) +ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{tv_sec=0, tv_nsec=999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) +ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) = -1 EFAULT .* diff --git a/tests-m32/ppoll.test b/tests-m32/ppoll.test new file mode 100755 index 000000000..98389ee6e --- /dev/null +++ b/tests-m32/ppoll.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check ppoll syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -a30 -s2 -e ppoll $args +match_grep +run_strace -a30 -v -s2 -e ppoll $args +match_grep "$LOG" "$srcdir/$NAME-v.expected" + +exit 0 diff --git a/tests-m32/prctl-arg2-intptr.c b/tests-m32/prctl-arg2-intptr.c new file mode 100644 index 000000000..ee000ebe2 --- /dev/null +++ b/tests-m32/prctl-arg2-intptr.c @@ -0,0 +1,120 @@ +/* + * Check decoding of prctl operations which use arg2 as pointer to an integer + * value: PR_GET_CHILD_SUBREAPER, PR_GET_ENDIAN, PR_GET_FPEMU, and PR_GET_FPEXC. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_prctl + +# include +# include +# include +# include + +static const char *errstr; + +static long +prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) +{ + static const kernel_ulong_t bogus_arg = + (kernel_ulong_t) 0xdeadbeefbadc0dedULL; + long rc = syscall(__NR_prctl, arg1, arg2, bogus_arg); + errstr = sprintrc(rc); + return rc; +} + +int +main(void) +{ + static const kernel_ulong_t bogus_addr1 = + (kernel_ulong_t) 0x1e55c0de00000000ULL; + static const kernel_ulong_t bogus_addr2 = + (kernel_ulong_t) 0xfffffffffffffffdULL; + static const kernel_ulong_t bogus_op_bits = + (kernel_ulong_t) 0xbadc0ded00000000ULL; + static const struct { + kernel_ulong_t val; + const char *str; + } options[] = { + { 37, "PR_GET_CHILD_SUBREAPER" }, + { 19, "PR_GET_ENDIAN" }, + { 9, "PR_GET_FPEMU" }, + { 11, "PR_GET_FPEXC" }, + }; + + unsigned int *ptr = tail_alloc(sizeof(*ptr)); + long rc; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(options); ++i) { + prctl(options[i].val | bogus_op_bits, 0); + printf("prctl(%s, NULL) = %s\n", options[i].str, errstr); + + if (bogus_addr1) { + prctl(options[i].val | bogus_op_bits, bogus_addr1); + printf("prctl(%s, %#llx) = %s\n", options[i].str, + (unsigned long long) bogus_addr1, errstr); + } + + prctl(options[i].val | bogus_op_bits, bogus_addr2); + printf("prctl(%s, %#llx) = %s\n", options[i].str, + (unsigned long long) bogus_addr2, errstr); + + prctl(options[i].val | bogus_op_bits, (uintptr_t) (ptr + 1)); + printf("prctl(%s, %p) = %s\n", options[i].str, + ptr + 1, errstr); + + rc = prctl(options[i].val | bogus_op_bits, (uintptr_t) ptr); + if (!rc) { + printf("prctl(%s, [%u]) = %s\n", + options[i].str, *ptr, errstr); + } else { + printf("prctl(%s, %p) = %s\n", + options[i].str, ptr, errstr); + } + + if (F8ILL_KULONG_SUPPORTED) { + kernel_ulong_t bogus_addr3 = f8ill_ptr_to_kulong(ptr); + prctl(options[i].val | bogus_op_bits, bogus_addr3); + printf("prctl(%s, %#llx) = %s\n", options[i].str, + (unsigned long long) bogus_addr3, errstr); + } + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl") + +#endif diff --git a/tests-m32/prctl-arg2-intptr.test b/tests-m32/prctl-arg2-intptr.test new file mode 100755 index 000000000..bcef80650 --- /dev/null +++ b/tests-m32/prctl-arg2-intptr.test @@ -0,0 +1,14 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_CHILD_SUBREAPER, PR_GET_ENDIAN, PR_GET_FPEMU, +# and PR_GET_FPEXC operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a25 -eprctl $args > "$EXP" +LC_ALL=C grep -Ev '^prctl\(PR_[GS]ET_([^CEF]|.[^HNP]|..[^DEI])' \ + < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/prctl-dumpable.c b/tests-m32/prctl-dumpable.c new file mode 100644 index 000000000..1049bcee8 --- /dev/null +++ b/tests-m32/prctl-dumpable.c @@ -0,0 +1,106 @@ +/* + * Check decoding of prctl PR_GET_DUMPABLE/PR_SET_DUMPABLE operations. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined PR_GET_DUMPABLE && defined PR_SET_DUMPABLE + +# include +# include + +static const char *errstr; + +static long +prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) +{ + static const kernel_ulong_t bogus_arg = + (kernel_ulong_t) 0xdeadbeefbadc0dedULL; + long rc = syscall(__NR_prctl, arg1, arg2, bogus_arg); + errstr = sprintrc(rc); + return rc; +} + +int +main(void) +{ + static const kernel_ulong_t bogus_dumpable1 = + (kernel_ulong_t) 0xdeadc0de00000001ULL; + static const kernel_ulong_t bogus_dumpable2 = + (kernel_ulong_t) 0xdeadc0defacebeefULL; + + static const char * const args[] = { + "SUID_DUMP_DISABLE", + "SUID_DUMP_USER", + "SUID_DUMP_ROOT", + }; + + unsigned int i; + + prctl(PR_SET_DUMPABLE, 3); + printf("prctl(PR_SET_DUMPABLE, 0x3 /* SUID_DUMP_??? */) = %s\n", + errstr); + + prctl(PR_SET_DUMPABLE, bogus_dumpable1); + if (bogus_dumpable1 == 1) { + printf("prctl(PR_SET_DUMPABLE, SUID_DUMP_USER) = %s\n", errstr); + } else { + printf("prctl(PR_SET_DUMPABLE, %#llx /* SUID_DUMP_??? */)" + " = %s\n", + (unsigned long long) bogus_dumpable1, errstr); + } + + prctl(PR_SET_DUMPABLE, bogus_dumpable2); + printf("prctl(PR_SET_DUMPABLE, %#llx /* SUID_DUMP_??? */) = %s\n", + (unsigned long long) bogus_dumpable2, errstr); + + for (i = 0; i < ARRAY_SIZE(args); ++i) { + prctl(PR_SET_DUMPABLE, i); + printf("prctl(PR_SET_DUMPABLE, %s) = %s\n", args[i], errstr); + + long rc = prctl(PR_GET_DUMPABLE, bogus_dumpable2); + if (rc >= 0 && rc < (long) ARRAY_SIZE(args)) { + printf("prctl(PR_GET_DUMPABLE) = %s (%s)\n", + errstr, args[rc]); + } else { + printf("prctl(PR_GET_DUMPABLE) = %s\n", errstr); + } + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_DUMPABLE && PR_SET_DUMPABLE") + +#endif diff --git a/tests-m32/prctl-dumpable.test b/tests-m32/prctl-dumpable.test new file mode 100755 index 000000000..08acb8b9a --- /dev/null +++ b/tests-m32/prctl-dumpable.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_DUMPABLE and PR_SET_DUMPABLE operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a23 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^D][^U]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/prctl-name.c b/tests-m32/prctl-name.c new file mode 100644 index 000000000..308c275f2 --- /dev/null +++ b/tests-m32/prctl-name.c @@ -0,0 +1,103 @@ +/* + * Check decoding of prctl PR_GET_NAME/PR_SET_NAME operations. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PRCTL +# include +#endif + +#if defined HAVE_PRCTL && defined PR_GET_NAME && defined PR_SET_NAME + +# include +# include +# include + +int +main(void) +{ + static const char str[] = "0123456789abcdef"; + static const int len = sizeof(str) - 1; + char *name = tail_memdup(str, sizeof(str)); + int i; + int rc; + + rc = prctl(PR_SET_NAME, NULL); + printf("prctl(PR_SET_NAME, NULL) = %s\n", sprintrc(rc)); + + for (i = 0; i <= len; ++i) { + rc = prctl(PR_SET_NAME, name + len - i); + printf("prctl(PR_SET_NAME, \"%.*s\"%s) = %s\n", + i < len - 1 ? i : len - 1, + str + len - i, + i < len - 1 ? "" : "...", + sprintrc(rc)); + } + + *name = -1; + ++name; + memcpy(name, str, len); + + for (i = 0; i <= len; ++i) { + rc = prctl(PR_SET_NAME, name + len - i); + if (i < len - 1) + printf("prctl(PR_SET_NAME, %p) = %s\n", + name + len - i, sprintrc(rc)); + else + printf("prctl(PR_SET_NAME, \"%.*s\"...) = %s\n", + len - 1, str + len - i, sprintrc(rc)); + } + + rc = prctl(PR_GET_NAME, NULL); + printf("prctl(PR_GET_NAME, NULL) = %s\n", sprintrc(rc)); + + for (i = 0; i < len; ++i) { + rc = prctl(PR_GET_NAME, name + len - i); + printf("prctl(PR_GET_NAME, %p) = %s\n", + name + len - i, sprintrc(rc)); + } + + rc = prctl(PR_GET_NAME, name); + if (rc) + printf("prctl(PR_GET_NAME, %p) = %s\n", + name, sprintrc(rc)); + else + printf("prctl(PR_GET_NAME, \"%.*s\") = %s\n", + len - 1, name, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_GET_NAME && PR_SET_NAME") + +#endif diff --git a/tests-m32/prctl-name.test b/tests-m32/prctl-name.test new file mode 100755 index 000000000..071179c55 --- /dev/null +++ b/tests-m32/prctl-name.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_NAME/PR_SET_NAME operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a23 -eprctl $args > "$EXP" +grep -v '^prctl(PR_GET_[^N][^A]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/prctl-no-args.c b/tests-m32/prctl-no-args.c new file mode 100644 index 000000000..57e1b733e --- /dev/null +++ b/tests-m32/prctl-no-args.c @@ -0,0 +1,77 @@ +/* + * Check decoding of prctl operations without arguments and return code parsing: + * PR_GET_KEEPCAPS, PR_GET_SECCOMP, PR_GET_TIMERSLACK, PR_GET_TIMING, + * PR_TASK_PERF_EVENTS_DISABLE, and PR_TASK_PERF_EVENTS_ENABLE. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_prctl + +# include +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_op_bits = + (kernel_ulong_t) 0xbadc0ded00000000ULL; + static const kernel_ulong_t bogus_arg = + (kernel_ulong_t) 0xfacefeeddeadbeefULL; + static const struct { + kernel_ulong_t val; + const char *str; + } options[] = { + { 7, "PR_GET_KEEPCAPS" }, + { 13, "PR_GET_TIMING" }, + { 21, "PR_GET_SECCOMP" }, + { 30, "PR_GET_TIMERSLACK" }, + { 31, "PR_TASK_PERF_EVENTS_DISABLE" }, + { 32, "PR_TASK_PERF_EVENTS_ENABLE" }, + }; + + unsigned int *ptr = tail_alloc(sizeof(*ptr)); + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(options); i++) { + long rc = syscall(__NR_prctl, options[i].val | bogus_op_bits, + bogus_arg); + printf("prctl(%s) = %s\n", options[i].str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl") + +#endif diff --git a/tests-m32/prctl-no-args.test b/tests-m32/prctl-no-args.test new file mode 100755 index 000000000..ce8ca67b7 --- /dev/null +++ b/tests-m32/prctl-no-args.test @@ -0,0 +1,14 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_KEEPCAPS, PR_GET_SECCOMP, PR_GET_TIMERSLACK, +# PR_GET_TIMING, PR_TASK_PERF_EVENTS_DISABLE, and PR_TASK_PERF_EVENTS_ENABLE +# operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a21 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^KST][^EI][^CEM]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/prctl-pdeathsig.c b/tests-m32/prctl-pdeathsig.c new file mode 100644 index 000000000..c17603072 --- /dev/null +++ b/tests-m32/prctl-pdeathsig.c @@ -0,0 +1,81 @@ +/* + * Check decoding of prctl PR_GET_PDEATHSIG/PR_SET_PDEATHSIG operations. + * + * Copyright (c) 2016 JingPiao Chen + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined PR_GET_PDEATHSIG && defined PR_SET_PDEATHSIG + +# include +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_signal = + (kernel_ulong_t) 0xbadc0deddeadfeedULL; + + int *pdeathsig = tail_alloc(sizeof(*pdeathsig)); + long rc; + + rc = syscall(__NR_prctl, PR_SET_PDEATHSIG, bogus_signal); + printf("prctl(PR_SET_PDEATHSIG, %llu) = %s\n", + (unsigned long long) bogus_signal, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_SET_PDEATHSIG, SIGINT); + printf("prctl(PR_SET_PDEATHSIG, SIGINT) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_PDEATHSIG, NULL); + printf("prctl(PR_GET_PDEATHSIG, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_PDEATHSIG, pdeathsig + 1); + printf("prctl(PR_GET_PDEATHSIG, %p) = %s\n", + pdeathsig + 1, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_PDEATHSIG, pdeathsig); + if (rc) { + printf("prctl(PR_GET_PDEATHSIG, %p) = %s\n", + pdeathsig, sprintrc(rc)); + } else { + printf("prctl(PR_GET_PDEATHSIG, [SIGINT]) = %s\n", + sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_PDEATHSIG && PR_SET_PDEATHSIG") + +#endif diff --git a/tests-m32/prctl-pdeathsig.test b/tests-m32/prctl-pdeathsig.test new file mode 100755 index 000000000..2777503ae --- /dev/null +++ b/tests-m32/prctl-pdeathsig.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check prctl PR_GET_PDEATHSIG PR_SET_PDEATHSIG decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a30 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^P][^D]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/prctl-seccomp-filter-v.c b/tests-m32/prctl-seccomp-filter-v.c new file mode 100644 index 000000000..69316fbed --- /dev/null +++ b/tests-m32/prctl-seccomp-filter-v.c @@ -0,0 +1,145 @@ +/* + * Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#ifdef HAVE_PRCTL +# include +#endif +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined HAVE_PRCTL \ + && defined PR_SET_NO_NEW_PRIVS \ + && defined PR_SET_SECCOMP \ + && defined SECCOMP_MODE_FILTER \ + && defined SECCOMP_RET_ERRNO \ + && defined BPF_JUMP \ + && defined BPF_STMT + +#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW) + +#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|(SECCOMP_RET_DATA & (err))) + +#define SOCK_FILTER_KILL_PROCESS \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL) + +#define PRINT_ALLOW_SYSCALL(nr) \ + printf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), ", \ + __NR_ ## nr) + +#define PRINT_DENY_SYSCALL(nr, err) \ + printf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|%#x), ", \ + __NR_ ## nr, err) + +static const struct sock_filter filter[] = { + /* load syscall number */ + BPF_STMT(BPF_LD|BPF_W|BPF_ABS, offsetof(struct seccomp_data, nr)), + + /* allow syscalls */ + SOCK_FILTER_ALLOW_SYSCALL(close), + SOCK_FILTER_ALLOW_SYSCALL(exit), + SOCK_FILTER_ALLOW_SYSCALL(exit_group), + + /* deny syscalls */ + SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), + SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), + + /* kill process */ + SOCK_FILTER_KILL_PROCESS +}; + +static const struct sock_fprog prog = { + .len = ARRAY_SIZE(filter), + .filter = (struct sock_filter *) filter, +}; + +int +main(void) +{ + int fds[2]; + + puts("prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0"); + + printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=%u, filter=[", + prog.len); + + printf("BPF_STMT(BPF_LD|BPF_W|BPF_ABS, %#x), ", + (unsigned) offsetof(struct seccomp_data, nr)); + + PRINT_ALLOW_SYSCALL(close); + PRINT_ALLOW_SYSCALL(exit); + PRINT_ALLOW_SYSCALL(exit_group); + + PRINT_DENY_SYSCALL(sync, EBUSY), + PRINT_DENY_SYSCALL(setsid, EPERM), + + printf("BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL)"); + + puts("]}) = 0"); + puts("+++ exited with 0 +++"); + + fflush(stdout); + close(0); + close(1); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) + perror_msg_and_skip("PR_SET_NO_NEW_PRIVS"); + if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) + perror_msg_and_skip("PR_SET_SECCOMP"); + if (close(0) || close(1)) + _exit(77); + + _exit(0); +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_SET_NO_NEW_PRIVS && PR_SET_SECCOMP" + " && SECCOMP_MODE_FILTER && SECCOMP_RET_ERRNO" + " && BPF_JUMP && BPF_STMT") + +#endif diff --git a/tests-m32/prctl-seccomp-filter-v.test b/tests-m32/prctl-seccomp-filter-v.test new file mode 100755 index 000000000..44e4a782a --- /dev/null +++ b/tests-m32/prctl-seccomp-filter-v.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -v -eprctl $args > "$EXP" +grep -v '^prctl(PR_GET_' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/prctl-seccomp-strict.c b/tests-m32/prctl-seccomp-strict.c new file mode 100644 index 000000000..a78f81736 --- /dev/null +++ b/tests-m32/prctl-seccomp-strict.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#ifdef HAVE_PRCTL +# include +#endif + +#if defined HAVE_PRCTL && defined PR_SET_SECCOMP && defined __NR_exit + +# include +# include + +int +main(void) +{ + static const char text1[] = + "prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT) = 0\n"; + static const char text2[] = "+++ exited with 0 +++\n"; + + int rc = prctl(PR_SET_SECCOMP, -1L, 1, 2, 3); + printf("prctl(PR_SET_SECCOMP, %#lx /* SECCOMP_MODE_??? */, 0x1, 0x2, 0x3)" + " = %d %s (%m)\n", -1L, rc, errno2name()); + fflush(stdout); + + rc = prctl(PR_SET_SECCOMP, 1); + if (rc) { + printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT)" + " = %d %s (%m)\n", rc, errno2name()); + fflush(stdout); + rc = 0; + } else { + /* + * If kernel implementaton of SECCOMP_MODE_STRICT is buggy, + * the following syscall will result to SIGKILL. + */ + rc = write(1, text1, LENGTH_OF(text1)) != LENGTH_OF(text1); + } + + rc += write(1, text2, LENGTH_OF(text2)) != LENGTH_OF(text2); + return !!syscall(__NR_exit, rc); +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_SET_SECCOMP && __NR_exit") + +#endif diff --git a/tests-m32/prctl-seccomp-strict.test b/tests-m32/prctl-seccomp-strict.test new file mode 100755 index 000000000..1f987df72 --- /dev/null +++ b/tests-m32/prctl-seccomp-strict.test @@ -0,0 +1,19 @@ +#!/bin/sh + +# Check how prctl PR_SET_SECCOMP SECCOMP_MODE_STRICT is decoded. + +. "${srcdir=.}/init.sh" + +check_prog grep +set -- "./$NAME" +"$@" > /dev/null || { + case $? in + 77) skip_ "$* exited with code 77" ;; + 137) framework_skip_ "$* killed by SIGKILL, fix your kernel" ;; + *) fail_ "$args failed" ;; + esac +} +run_strace -eprctl "$@" > "$EXP" +grep -v '^prctl(PR_GET_' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-m32/prctl-securebits.c b/tests-m32/prctl-securebits.c new file mode 100644 index 000000000..741973af9 --- /dev/null +++ b/tests-m32/prctl-securebits.c @@ -0,0 +1,106 @@ +/* + * Check decoding of prctl PR_GET_SECUREBITS/PR_SET_SECUREBITS operations. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined PR_GET_SECUREBITS && defined PR_SET_SECUREBITS + +# include +# include + +# include "xlat.h" +# include "xlat/secbits.h" + +static const char *errstr; + +static long +prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) +{ + static const kernel_ulong_t bogus_arg = + (kernel_ulong_t) 0xdeadbeefbadc0dedULL; + long rc = syscall(__NR_prctl, arg1, arg2, bogus_arg); + errstr = sprintrc(rc); + return rc; +} + +int +main(void) +{ + static const kernel_ulong_t bits1 = + (kernel_ulong_t) 0xdeadc0defacebeefULL; + static const kernel_ulong_t bits2 = + (kernel_ulong_t) 0xbadc0ded00000000ULL; + static const kernel_ulong_t bits3 = + (kernel_ulong_t) 0xffULL; + + prctl(PR_SET_SECUREBITS, 0); + printf("prctl(PR_SET_SECUREBITS, 0) = %s\n", errstr); + + prctl(PR_SET_SECUREBITS, bits1); + printf("prctl(PR_SET_SECUREBITS, SECBIT_NOROOT|SECBIT_NOROOT_LOCKED|" + "SECBIT_NO_SETUID_FIXUP|SECBIT_NO_SETUID_FIXUP_LOCKED|" + "SECBIT_KEEP_CAPS_LOCKED|SECBIT_NO_CAP_AMBIENT_RAISE|" + "SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED|%#llx) = %s\n", + (unsigned long long) bits1 & ~0xffULL, errstr); + + if (bits2) { + prctl(PR_SET_SECUREBITS, bits2); + printf("prctl(PR_SET_SECUREBITS, %#llx /* SECBIT_??? */)" + " = %s\n", (unsigned long long) bits2, errstr); + } + + prctl(PR_SET_SECUREBITS, bits3); + printf("prctl(PR_SET_SECUREBITS, SECBIT_NOROOT|SECBIT_NOROOT_LOCKED|" + "SECBIT_NO_SETUID_FIXUP|SECBIT_NO_SETUID_FIXUP_LOCKED|" + "SECBIT_KEEP_CAPS|SECBIT_KEEP_CAPS_LOCKED|" + "SECBIT_NO_CAP_AMBIENT_RAISE|SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED)" + " = %s\n", errstr); + + long rc = prctl(PR_GET_SECUREBITS, bits1); + printf("prctl(PR_GET_SECUREBITS) = %s", errstr); + if (rc > 0) { + printf(" ("); + printflags(secbits, rc, NULL); + printf(")"); + } + + puts(""); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_SECUREBITS && PR_SET_SECUREBITS") + +#endif diff --git a/tests-m32/prctl-securebits.test b/tests-m32/prctl-securebits.test new file mode 100755 index 000000000..c91e62a61 --- /dev/null +++ b/tests-m32/prctl-securebits.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_SECUREBITS/PR_SET_SECUREBITS operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a25 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^S][^E][^C][^U]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/prctl-tid_address.c b/tests-m32/prctl-tid_address.c new file mode 100644 index 000000000..24e45031b --- /dev/null +++ b/tests-m32/prctl-tid_address.c @@ -0,0 +1,103 @@ +/* + * Check decoding of prctl PR_GET_TID_ADDRESS operation. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined __NR_set_tid_address && \ + defined PR_GET_TID_ADDRESS + +# include +# include +# include + +static const char * +sprintaddr(kernel_ulong_t addr) +{ + static char buf[sizeof("0x") + sizeof(addr) * 2]; + + if (addr) { + snprintf(buf, sizeof(buf), "%#llx", (unsigned long long) addr); + + return buf; + } + + return "NULL"; +} + +int +main(void) +{ + static const kernel_ulong_t bogus_addr = + (kernel_ulong_t) 0xfffffffffffffffdULL; + + /* Note that kernel puts kernel-sized pointer even on x32 */ + kernel_ulong_t *ptr = tail_alloc(sizeof(*ptr)); + long rc; + long set_ok; + + *ptr = (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + + rc = syscall(__NR_prctl, PR_GET_TID_ADDRESS, NULL); + printf("prctl(PR_GET_TID_ADDRESS, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TID_ADDRESS, bogus_addr); + printf("prctl(PR_GET_TID_ADDRESS, %#llx) = %s\n", + (unsigned long long) bogus_addr, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TID_ADDRESS, ptr); + if (rc) { + printf("prctl(PR_GET_TID_ADDRESS, %p) = %s\n", + ptr, sprintrc(rc)); + } else { + printf("prctl(PR_GET_TID_ADDRESS, [%s]) = %s\n", + sprintaddr(*ptr), sprintrc(rc)); + } + + set_ok = syscall(__NR_set_tid_address, bogus_addr); + + rc = syscall(__NR_prctl, PR_GET_TID_ADDRESS, ptr); + if (rc) { + printf("prctl(PR_GET_TID_ADDRESS, %p) = %s\n", + ptr, sprintrc(rc)); + } else { + printf("prctl(PR_GET_TID_ADDRESS, [%s]) = %s\n", + sprintaddr(set_ok ? bogus_addr : *ptr), sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && __NR_set_tid_address && PR_GET_TID_ADDRESS") + +#endif diff --git a/tests-m32/prctl-tid_address.test b/tests-m32/prctl-tid_address.test new file mode 100755 index 000000000..dc7b7c328 --- /dev/null +++ b/tests-m32/prctl-tid_address.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_TID_ADDRESS operation. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a23 -eprctl $args > "$EXP" +LC_ALL=C grep -Ev '^prctl\(PR_[GS]ET_([^T]|.[^I]|..[^D])' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/prctl-tsc.c b/tests-m32/prctl-tsc.c new file mode 100644 index 000000000..fd9362d76 --- /dev/null +++ b/tests-m32/prctl-tsc.c @@ -0,0 +1,80 @@ +/* + * Check decoding of prctl PR_GET_TSC/PR_SET_TSC operations. + * + * Copyright (c) 2016 JingPiao Chen + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined PR_GET_TSC && defined PR_SET_TSC + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_tsc = + (kernel_ulong_t) 0xdeadc0defacebeefULL; + + int *tsc = tail_alloc(sizeof(*tsc)); + long rc; + + rc = syscall(__NR_prctl, PR_SET_TSC, 0); + printf("prctl(PR_SET_TSC, 0 /* PR_TSC_??? */) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_SET_TSC, bogus_tsc); + printf("prctl(PR_SET_TSC, %#x /* PR_TSC_??? */) = %s\n", + (unsigned int) bogus_tsc, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_SET_TSC, PR_TSC_SIGSEGV); + printf("prctl(PR_SET_TSC, PR_TSC_SIGSEGV) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TSC, NULL); + printf("prctl(PR_GET_TSC, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TSC, tsc + 1); + printf("prctl(PR_GET_TSC, %p) = %s\n", tsc + 1, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TSC, tsc); + if (rc) + printf("prctl(PR_GET_TSC, %p) = %s\n", tsc, sprintrc(rc)); + else + printf("prctl(PR_GET_TSC, [PR_TSC_SIGSEGV]) = %s\n", + sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_TSC && PR_SET_TSC") + +#endif diff --git a/tests-m32/prctl-tsc.test b/tests-m32/prctl-tsc.test new file mode 100755 index 000000000..a906ba894 --- /dev/null +++ b/tests-m32/prctl-tsc.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check prctl PR_GET_TSC PR_SET_TSC decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a24 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^T][^S]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-m32/pread64-pwrite64.c b/tests-m32/pread64-pwrite64.c new file mode 100644 index 000000000..4a0932a99 --- /dev/null +++ b/tests-m32/pread64-pwrite64.c @@ -0,0 +1,223 @@ +/* + * Check decoding of pread64 and pwrite64 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +static void +dump_str(const char *str, const unsigned int len) +{ + static const char dots[16] = "................"; + unsigned int i; + + for (i = 0; i < len; i += 16) { + unsigned int n = len - i > 16 ? 16 : len - i; + const char *dump = hexdump_memdup(str + i, n); + + tprintf(" | %05x %-49s %-16.*s |\n", + i, dump, n, dots); + + free((void *) dump); + } +} + +static void +print_hex(const char *str, const unsigned int len) +{ + const unsigned char *ustr = (const unsigned char *) str; + unsigned int i; + + for (i = 0; i < len; ++i) { + unsigned int c = ustr[i]; + + switch (c) { + case '\t': + tprintf("\\t"); break; + case '\n': + tprintf("\\n"); break; + case '\v': + tprintf("\\v"); break; + case '\f': + tprintf("\\f"); break; + case '\r': + tprintf("\\r"); break; + default: + tprintf("\\%o", ustr[i]); + } + } +} + +static void +test_dump(const unsigned int len) +{ + static char *buf; + + if (buf) { + size_t ps1 = get_page_size() - 1; + buf = (void *) (((size_t) buf + ps1) & ~ps1) - len; + } else { + buf = tail_alloc(len); + } + + const off_t offset = 0xdefaceddeadbeefLL + len; + long rc = pread(0, buf, len, offset); + if (rc != (int) len) + perror_msg_and_fail("pread64: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "pread64", 0); + print_hex(buf, len); + tprintf("\", %d, %lld) = %ld\n", len, (long long) offset, rc); + dump_str(buf, len); + + unsigned int i; + for (i = 0; i < len; ++i) + buf[i] = i; + + rc = pwrite(1, buf, len, offset); + if (rc != (int) len) + perror_msg_and_fail("pwrite64: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "pwrite64", 1); + print_hex(buf, len); + tprintf("\", %d, %lld) = %ld\n", len, (long long) offset, rc); + dump_str(buf, len); + + if (!len) + buf = 0; +} + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "pread64-pwrite64-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + + char *nil = tail_alloc(1); + *nil = '\0'; + + static const char w_c[] = "0123456789abcde"; + const unsigned int w_len = LENGTH_OF(w_c); + const char *w_d = hexdump_strdup(w_c); + const void *w = tail_memdup(w_c, w_len); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + const unsigned int r0_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r0_len); + + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + const unsigned int r1_len = w_len - r0_len; + void *r1 = tail_alloc(w_len); + + void *efault = r1 - get_page_size(); + + long rc; + + rc = pwrite(1, w, 0, 0); + if (rc) + perror_msg_and_fail("pwrite64: expected 0, returned %ld", rc); + tprintf("pwrite64(1, \"\", 0, 0) = 0\n"); + + rc = pwrite(1, efault, 1, 0); + if (rc != -1) + perror_msg_and_fail("pwrite64: expected -1 EFAULT" + ", returned %ld", rc); + tprintf("pwrite64(1, %p, 1, 0) = -1 EFAULT (%m)\n", efault); + + rc = pwrite(1, nil, 1, -3); + if (rc != -1) + perror_msg_and_fail("pwrite64: expected -1, returned %ld", rc); + tprintf("pwrite64(1, \"\\0\", 1, -3) = -1 EINVAL (%m)\n"); + + rc = pwrite(1, w, w_len, 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwrite64: expected %u, returned %ld", + w_len, rc); + tprintf("pwrite64(1, \"%s\", %u, 0) = %ld\n" + " | 00000 %-49s %-16s |\n", + w_c, w_len, rc, w_d, w_c); + close(1); + + rc = pread(0, r0, 0, 0); + if (rc) + perror_msg_and_fail("pread64: expected 0, returned %ld", rc); + tprintf("pread64(0, \"\", 0, 0) = 0\n"); + + rc = pread(0, efault, 1, 0); + if (rc != -1) + perror_msg_and_fail("pread64: expected -1, returned %ld", rc); + tprintf("pread64(0, %p, 1, 0) = -1 EFAULT (%m)\n", efault); + + rc = pread(0, efault, 2, -7); + if (rc != -1) + perror_msg_and_fail("pread64: expected -1, returned %ld", rc); + tprintf("pread64(0, %p, 2, -7) = -1 EINVAL (%m)\n", efault); + + rc = pread(0, r0, r0_len, 0); + if (rc != (int) r0_len) + perror_msg_and_fail("pread64: expected %u, returned %ld", + r0_len, rc); + tprintf("pread64(0, \"%s\", %u, 0) = %ld\n" + " | 00000 %-49s %-16s |\n", + r0_c, r0_len, rc, r0_d, r0_c); + + rc = pread(0, r1, w_len, r0_len); + if (rc != (int) r1_len) + perror_msg_and_fail("pread64: expected %u, returned %ld", + r1_len, rc); + tprintf("pread64(0, \"%s\", %u, %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r1_c, w_len, r0_len, rc, r1_d, r1_c); + close(0); + + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (open("/dev/null", O_WRONLY) != 1) + perror_msg_and_fail("open"); + + unsigned int i; + for (i = 0; i <= 32; ++i) + test_dump(i); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests-m32/pread64-pwrite64.test b/tests-m32/pread64-pwrite64.test new file mode 100755 index 000000000..e585406da --- /dev/null +++ b/tests-m32/pread64-pwrite64.test @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check decoding and dumping of pread64 and pwrite64 syscalls. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +tmpfile=pread64-pwrite64-tmpfile +> $tmpfile + +run_strace_match_diff \ + -a21 -eread=0 -ewrite=1 -e trace=pread64,pwrite64 \ + -P $tmpfile -P /dev/zero -P /dev/null + +rm -f $tmpfile diff --git a/tests-m32/preadv-pwritev.c b/tests-m32/preadv-pwritev.c new file mode 100644 index 000000000..b2d2a8248 --- /dev/null +++ b/tests-m32/preadv-pwritev.c @@ -0,0 +1,182 @@ +/* + * Check decoding of preadv and pwritev syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#if defined HAVE_PREADV && defined HAVE_PWRITEV + +# include +# include +# include +# include + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "preadv-pwritev-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + if (unlink(tmp)) + perror_msg_and_fail("unlink: %s", tmp); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + const void *efault = w0 + LENGTH_OF(w0_c); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + long rc; + + rc = pwritev(1, efault, 42, 0); + tprintf("pwritev(1, %p, 42, 0) = %ld %s (%m)\n", + efault, rc, errno2name()); + + rc = preadv(0, efault, 42, 0); + tprintf("preadv(0, %p, 42, 0) = %ld %s (%m)\n", + efault, rc, errno2name()); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + rc = pwritev(1, w_iov, 0, 0); + if (rc) + perror_msg_and_fail("pwritev: expected 0, returned %ld", rc); + tprintf("pwritev(1, [], 0, 0) = 0\n"); + + rc = pwritev(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2, 0); + tprintf("pwritev(1, [{iov_base=\"%s\", iov_len=%u}, %p], 2, 0)" + " = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + rc = pwritev(1, w_iov, ARRAY_SIZE(w_iov_), 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwritev: expected %u, returned %ld", + w_len, rc); + close(1); + tprintf("pwritev(1, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}], %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + rc = preadv(0, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv: expected %u, returned %ld", + r_len, rc); + tprintf("preadv(0, [{iov_base=\"%s\", iov_len=%u}], %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = preadv(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) w_len - (int) r_len) + perror_msg_and_fail("preadv: expected %d, returned %ld", + (int) w_len - r_len, rc); + tprintf("preadv(0, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"\", iov_len=%u}], %u, %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), + r_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PREADV && HAVE_PWRITEV") + +#endif diff --git a/tests-m32/preadv-pwritev.test b/tests-m32/preadv-pwritev.test new file mode 100755 index 000000000..cb2a07729 --- /dev/null +++ b/tests-m32/preadv-pwritev.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding and dumping of preadv and pwritev syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 -eread=0 -ewrite=1 -e trace=preadv,pwritev diff --git a/tests-m32/preadv.c b/tests-m32/preadv.c new file mode 100644 index 000000000..fb5d3ad78 --- /dev/null +++ b/tests-m32/preadv.c @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PREADV + +# include +# include +# include +# include + +# define LEN 8 + +static void +print_iov(const struct iovec *iov) +{ + unsigned int i; + unsigned char *buf = iov->iov_base; + + fputs("{iov_base=\"", stdout); + for (i = 0; i < iov->iov_len; ++i) + printf("\\%d", (int) buf[i]); + printf("\", iov_len=%u}", (unsigned) iov->iov_len); +} + +static void +print_iovec(const struct iovec *iov, unsigned int cnt) +{ + unsigned int i; + putchar('['); + for (i = 0; i < cnt; ++i) { + if (i) + fputs(", ", stdout); + print_iov(&iov[i]); + } + putchar(']'); +} + +int +main(void) +{ + const off_t offset = 0xdefaceddeadbeefLL; + char *buf = tail_alloc(LEN); + struct iovec *iov = tail_alloc(sizeof(*iov)); + iov->iov_base = buf; + iov->iov_len = LEN; + + (void) close(0); + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (preadv(0, iov, 1, offset) != LEN) + perror_msg_and_fail("preadv"); + printf("preadv(0, "); + print_iovec(iov, 1); + printf(", 1, %lld) = %u\n", (long long) offset, LEN); + + if (preadv(0, iov, 1, -1) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, [{iov_base=%p, iov_len=%zu}], 1, -1) = " + "-1 EINVAL (%m)\n", iov->iov_base, iov->iov_len); + + if (preadv(0, NULL, 1, -2) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, NULL, 1, -2) = -1 EINVAL (%m)\n"); + + if (preadv(0, iov, 0, -3) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, [], 0, -3) = -1 EINVAL (%m)\n"); + + static const char tmp[] = "preadv-tmpfile"; + int fd = open(tmp, O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd < 0) + perror_msg_and_fail("open"); + if (unlink(tmp)) + perror_msg_and_fail("unlink"); + + static const char w[] = "0123456789abcde"; + if (write(fd, w, LENGTH_OF(w)) != LENGTH_OF(w)) + perror_msg_and_fail("write"); + + static const char r0_c[] = "01234567"; + static const char r1_c[] = "89abcde"; + + const unsigned int r_len = (LENGTH_OF(w) + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + long rc; + + rc = preadv(fd, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv: expected %u, returned %ld", + r_len, rc); + printf("preadv(%d, [{iov_base=\"%s\", iov_len=%u}], %u, 0) = %u\n", + fd, r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(LENGTH_OF(w)); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = LENGTH_OF(w) + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = preadv(fd, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) LENGTH_OF(w) - (int) r_len) + perror_msg_and_fail("preadv: expected %d, returned %ld", + (int) LENGTH_OF(w) - r_len, rc); + printf("preadv(%d, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"\", iov_len=%u}], %u, %u) = %u\n", + fd, r1_c, r_len, LENGTH_OF(w), ARRAY_SIZE(r1_iov_), + r_len, LENGTH_OF(w) - r_len); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PREADV") + +#endif diff --git a/tests-m32/preadv.test b/tests-m32/preadv.test new file mode 100755 index 000000000..d1abdb7d4 --- /dev/null +++ b/tests-m32/preadv.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check preadv syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff --git a/tests-m32/preadv2-pwritev2.c b/tests-m32/preadv2-pwritev2.c new file mode 100644 index 000000000..f7c46c0af --- /dev/null +++ b/tests-m32/preadv2-pwritev2.c @@ -0,0 +1,216 @@ +/* + * Check decoding of preadv2 and pwritev2 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#if defined __NR_preadv2 && defined __NR_pwritev2 + +# include +# include +# include +# include +# include + +static int +pr(const int fd, const struct iovec *const vec, + const unsigned long vlen, const unsigned long pos) +{ + return syscall(__NR_preadv2, fd, vec, vlen, pos, 0L, 0L); +} + +static int +pw(const int fd, const struct iovec *const vec, + const unsigned long vlen, const unsigned long pos) +{ + return syscall(__NR_pwritev2, fd, vec, vlen, pos, 0L, 0L); +} + +static void +dumpio(void) +{ + static char tmp[] = "preadv2-pwritev2-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + if (unlink(tmp)) + perror_msg_and_fail("unlink: %s", tmp); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + long rc; + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + rc = pw(1, w_iov, 0, 0); + if (rc) + perror_msg_and_fail("pwritev2: expected 0, returned %ld", rc); + tprintf("pwritev2(1, [], 0, 0, 0) = 0\n"); + + rc = pw(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2, 0); + tprintf("pwritev2(1, [{iov_base=\"%s\", iov_len=%u}, %p], 2, 0, 0)" + " = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + rc = pw(1, w_iov, ARRAY_SIZE(w_iov_), 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwritev2: expected %u, returned %ld", + w_len, rc); + close(1); + tprintf("pwritev2(1, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}], %u, 0, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + rc = pr(0, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv2: expected %u, returned %ld", + r_len, rc); + tprintf("preadv2(0, [{iov_base=\"%s\", iov_len=%u}], %u, 0, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = pr(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) w_len - (int) r_len) + perror_msg_and_fail("preadv2: expected %d, returned %ld", + (int) w_len - r_len, rc); + tprintf("preadv2(0, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"\", iov_len=%u}], %u, %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), + r_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); +} + +int +main(void) +{ + const kernel_ulong_t vlen = (kernel_ulong_t) 0xfac1fed2dad3bef4ULL; + const unsigned long long pos = 0xfac5fed6dad7bef8; + const kernel_ulong_t pos_l = (kernel_ulong_t) pos; + const kernel_ulong_t pos_h = + (sizeof(kernel_ulong_t) == sizeof(long long)) ? + (kernel_ulong_t) 0xbadc0deddeadbeefULL : 0xfac5fed6UL; + int test_dumpio = 1; + + tprintf("%s", ""); + + syscall(__NR_preadv2, -1, NULL, vlen, pos_l, pos_h, 1); + if (ENOSYS == errno) + test_dumpio = 0; + tprintf("preadv2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n", + (unsigned long) vlen, pos, errno2name()); + + syscall(__NR_pwritev2, -1, NULL, vlen, pos_l, pos_h, 1); + if (ENOSYS == errno) + test_dumpio = 0; + tprintf("pwritev2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n", + (unsigned long) vlen, pos, errno2name()); + + if (test_dumpio) + dumpio(); + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_preadv2 && __NR_pwritev2") + +#endif diff --git a/tests-m32/preadv2-pwritev2.test b/tests-m32/preadv2-pwritev2.test new file mode 100755 index 000000000..5641ef46a --- /dev/null +++ b/tests-m32/preadv2-pwritev2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding and dumping of preadv2 and pwritev2 syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -eread=0 -ewrite=1 -e trace=preadv2,pwritev2 diff --git a/tests-m32/print_maxfd.c b/tests-m32/print_maxfd.c new file mode 100644 index 000000000..c3d4ea88c --- /dev/null +++ b/tests-m32/print_maxfd.c @@ -0,0 +1,41 @@ +/* + * Print the maximum descriptor number available. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + int fds[2]; + pipe_maxfd(fds); + printf("%d\n", fds[1]); + return 0; +} diff --git a/tests-m32/print_quoted_string.c b/tests-m32/print_quoted_string.c new file mode 100644 index 000000000..3ad86024c --- /dev/null +++ b/tests-m32/print_quoted_string.c @@ -0,0 +1,75 @@ +#include "tests.h" + +#include +#include +#include + +/* + * Based on string_quote() from util.c. + * Assumes instr is NUL-terminated. + */ + +void +print_quoted_string(const char *instr) +{ + print_quoted_memory(instr, strlen(instr)); +} + +void +print_quoted_memory(const char *instr, const size_t len) +{ + const unsigned char *str = (const unsigned char*) instr; + size_t i; + + for (i = 0; i < len; ++i) { + const int c = str[i]; + switch (c) { + case '\"': + printf("\\\""); + break; + case '\\': + printf("\\\\"); + break; + case '\f': + printf("\\f"); + break; + case '\n': + printf("\\n"); + break; + case '\r': + printf("\\r"); + break; + case '\t': + printf("\\t"); + break; + case '\v': + printf("\\v"); + break; + default: + if (c >= ' ' && c <= 0x7e) + putchar(c); + else { + putchar('\\'); + + char c1 = '0' + (c & 0x7); + char c2 = '0' + ((c >> 3) & 0x7); + char c3 = '0' + (c >> 6); + + if (*str >= '0' && *str <= '9') { + /* Print \octal */ + putchar(c3); + putchar(c2); + } else { + /* Print \[[o]o]o */ + if (c3 != '0') + putchar(c3); + if (c3 != '0' || c2 != '0') + putchar(c2); + } + putchar(c1); + } + break; + } + } + +} diff --git a/tests-m32/printflags.c b/tests-m32/printflags.c new file mode 100644 index 000000000..badc85d3e --- /dev/null +++ b/tests-m32/printflags.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "xlat.h" +#include + +int +printflags(const struct xlat *xlat, unsigned long long flags, + const char *const dflt) +{ + if (flags == 0 && xlat->val == 0 && xlat->str) { + fputs(xlat->str, stdout); + return 1; + } + + int n; + char sep = 0; + for (n = 0; xlat->str; xlat++) { + if (xlat->val && (flags & xlat->val) == xlat->val) { + if (sep) + putc(sep, stdout); + else + sep = '|'; + fputs(xlat->str, stdout); + flags &= ~xlat->val; + n++; + } + } + + if (n) { + if (flags) { + if (sep) + putc(sep, stdout); + printf("%#llx", flags); + n++; + } + } else { + if (flags) { + printf("%#llx", flags); + if (dflt) + printf(" /* %s */", dflt); + } else { + if (dflt) + putc('0', stdout); + } + } + + return n; +} diff --git a/tests-m32/printstr.c b/tests-m32/printstr.c new file mode 100644 index 000000000..330234f10 --- /dev/null +++ b/tests-m32/printstr.c @@ -0,0 +1,69 @@ +/* + * Check decoding of non-NUL-terminated strings when len == -1. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +#define DEFAULT_STRLEN 32 + +int +main(void) +{ + char *const buf = tail_alloc(DEFAULT_STRLEN + 1); + const struct iovec io = { + .iov_base = buf, + .iov_len = -1 + }; + int rc; + + buf[0] = 0; + + tprintf("%s", ""); + + memset(buf + 1, 'X', DEFAULT_STRLEN); + buf[DEFAULT_STRLEN - 1] = 0; + + rc = writev(-1, &io, 1); + tprintf("writev(-1, [{iov_base=\"\\0%*s\\0\"..., iov_len=%lu}], 1)" + " = %s\n", DEFAULT_STRLEN - 2, buf + 1, -1UL, sprintrc(rc)); + + buf[DEFAULT_STRLEN - 1] = 'X'; + buf[DEFAULT_STRLEN] = 0; + + rc = writev(-1, &io, 1); + tprintf("writev(-1, [{iov_base=\"\\0%*s\"..., iov_len=%lu}], 1)" + " = %s\n", DEFAULT_STRLEN - 1, buf + 1, -1UL, sprintrc(rc)); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests-m32/printstr.test b/tests-m32/printstr.test new file mode 100755 index 000000000..5f164eb7e --- /dev/null +++ b/tests-m32/printstr.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of non-NUL-terminated strings when len == -1. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -e trace=writev diff --git a/tests-m32/printxval.c b/tests-m32/printxval.c new file mode 100644 index 000000000..4fb61c846 --- /dev/null +++ b/tests-m32/printxval.c @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "xlat.h" +#include + +int +printxval(const struct xlat *xlat, unsigned long long val, + const char *const dflt) +{ + for (; xlat->str; xlat++) { + if (xlat->val == val) { + fputs(xlat->str, stdout); + return 1; + } + } + + printf("%#llx", val); + if (dflt) + printf(" /* %s */", dflt); + return 0; +} diff --git a/tests-m32/prlimit64.c b/tests-m32/prlimit64.c new file mode 100644 index 000000000..1e6511610 --- /dev/null +++ b/tests-m32/prlimit64.c @@ -0,0 +1,92 @@ +/* + * Check decoding of prlimit64 syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_prlimit64 + +# include +# include +# include +# include +# include + +# include "xlat.h" +# include "xlat/resources.h" + +const char * +sprint_rlim(uint64_t lim) +{ + if (lim == -1ULL) + return "RLIM64_INFINITY"; + + static char buf[2][sizeof(lim)*3 + sizeof("*1024")]; + static int i; + i &= 1; + if (lim > 1024 && lim % 1024 == 0) + sprintf(buf[i], "%" PRIu64 "*1024", lim / 1024); + else + sprintf(buf[i], "%" PRIu64, lim); + + return buf[i++]; +} + +int +main(void) +{ + unsigned long pid = + (unsigned long) 0xdefaced00000000ULL | (unsigned) getpid(); + uint64_t *const rlimit = tail_alloc(sizeof(*rlimit) * 2); + const struct xlat *xlat; + + for (xlat = resources; xlat->str; ++xlat) { + unsigned long res = 0xfacefeed00000000ULL | xlat->val; + long rc = syscall(__NR_prlimit64, pid, res, 0, rlimit); + if (rc) + printf("prlimit64(%d, %s, NULL, %p) = %ld %s (%m)\n", + (unsigned) pid, xlat->str, rlimit, + rc, errno2name()); + else + printf("prlimit64(%d, %s, NULL" + ", {rlim_cur=%s, rlim_max=%s}) = 0\n", + (unsigned) pid, xlat->str, + sprint_rlim(rlimit[0]), + sprint_rlim(rlimit[1])); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prlimit64") + +#endif diff --git a/tests-m32/prlimit64.test b/tests-m32/prlimit64.test new file mode 100755 index 000000000..2d2240d73 --- /dev/null +++ b/tests-m32/prlimit64.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of prlimit64 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/process_vm_readv.c b/tests-m32/process_vm_readv.c new file mode 100644 index 000000000..cfb8f7861 --- /dev/null +++ b/tests-m32/process_vm_readv.c @@ -0,0 +1,18 @@ +#include "tests.h" + +#include + +#ifdef __NR_process_vm_readv + +# define OP process_vm_readv +# define OP_NR __NR_process_vm_readv +# define OP_STR "process_vm_readv" +# define OP_WR 0 + +# include "process_vm_readv_writev.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_process_vm_readv"); + +#endif diff --git a/tests-m32/process_vm_readv.test b/tests-m32/process_vm_readv.test new file mode 100755 index 000000000..c092f5a39 --- /dev/null +++ b/tests-m32/process_vm_readv.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of process_vm_readv syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s5 -a37 diff --git a/tests-m32/process_vm_readv_writev.c b/tests-m32/process_vm_readv_writev.c new file mode 100644 index 000000000..2a089395a --- /dev/null +++ b/tests-m32/process_vm_readv_writev.c @@ -0,0 +1,306 @@ +/* + * Check decoding of process_vm_readv/process_vm_writev syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include + +#if OP_WR +# define in_iovec rmt_iovec +# define out_iovec lcl_iovec +# define in_iov rmt_iov +# define out_iov lcl_iov +#else +# define in_iovec lcl_iovec +# define out_iovec rmt_iovec +# define in_iov lcl_iov +# define out_iov rmt_iov +#endif + +typedef void (*iov_print_fn)(const struct iovec *, const void *, long); + +enum { MAX_SEGM_COUNT = 2, MAX_STR_LEN = 5 }; + +struct print_iov_arg { + uint32_t count; + uint32_t valid :1, + string :1, + addr_term:1, + check_rc :1; + uint32_t str_segms; + uint8_t str_base[MAX_SEGM_COUNT]; + uint8_t str_size[MAX_SEGM_COUNT]; +}; + +static void +print_iov(const struct iovec *iov, const void *arg_ptr, long rc) +{ + const struct print_iov_arg *arg = arg_ptr; + uint32_t i; + uint32_t num_segm = 0; + uint64_t segm_offs = 0; + + if (!arg || !arg->valid) { + if (iov) + printf("%p", iov); + else + printf("NULL"); + + return; + } + + printf("["); + + for (i = 0; i < arg->count; i++) { + if (i) + printf(", "); + + if (i >= MAX_STR_LEN) { + printf("..."); + break; + } + + printf("{iov_base="); + if (arg->string && (!arg->check_rc || (rc != -1))) { + uint64_t str_left = iov[i].iov_len; + uint64_t pr_count = 0; + + printf("\""); + + while (str_left--) { + static const char oct_str[] = "01234567"; + uint8_t c = arg->str_base[num_segm] + segm_offs; + + if ((num_segm >= arg->str_segms) || + (num_segm >= MAX_SEGM_COUNT)) + error_msg_and_fail("print_iov: segment " + "count overrun"); + + if (pr_count++ < MAX_STR_LEN) + printf("\\%.1s%.1s%d", + (c >> 6) ? + oct_str + (c >> 6) : "", + (c >> 3) ? + oct_str + ((c >> 3) & 7) : "", + c & 7); + + segm_offs++; + + if (segm_offs >= arg->str_size[num_segm]) { + num_segm++; + segm_offs = 0; + } + } + + printf("\""); + + if (pr_count > MAX_STR_LEN) + printf("..."); + } else { + if (iov[i].iov_base) + printf("%p", iov[i].iov_base); + else + printf("NULL"); + } + + printf(", iov_len=%zu}", iov[i].iov_len); + } + + if (arg->addr_term) + printf(", %p", iov + arg->count); + + printf("]"); +} + +static void +do_call(kernel_ulong_t pid, + kernel_ulong_t local_iov, const char *local_arg, + kernel_ulong_t liovcnt, + kernel_ulong_t remote_iov, const char *remote_arg, + kernel_ulong_t riovcnt, + kernel_ulong_t flags, iov_print_fn pr_iov) +{ + long rc; + const char *errstr; + + rc = syscall(OP_NR, pid, local_iov, liovcnt, remote_iov, riovcnt, + flags); + errstr = sprintrc(rc); + + printf("%s(%d, ", OP_STR, (int) pid); + + if (pr_iov) + pr_iov((const struct iovec *) (uintptr_t) local_iov, local_arg, + rc); + else + printf("%s", local_arg); + + printf(", %lu, ", (unsigned long) liovcnt); + + if (pr_iov) + pr_iov((const struct iovec *) (uintptr_t) remote_iov, + remote_arg, rc); + else + printf("%s", remote_arg); + + printf(", %lu, %lu) = %s\n", (unsigned long) riovcnt, + (unsigned long) flags, errstr); +} + +kernel_ulong_t +ptr_cast(void *ptr) +{ + return (kernel_ulong_t) (uintptr_t) ptr; +} + +int +main(void) +{ + enum { + SIZE_11 = 2, + SIZE_12 = 3, + SIZE_13 = 4, + SIZE_1 = SIZE_11 + SIZE_12 + SIZE_13, + SIZE_21 = 5, + SIZE_22 = 6, + SIZE_23 = 7, + SIZE_2 = SIZE_21 + SIZE_22 + SIZE_23, + }; + + enum { + SEGM1_BASE = 0x80, + SEGM2_BASE = 0xA0, + }; + + static const kernel_ulong_t bogus_pid = + (kernel_ulong_t) 0xbadfaceddeadca57ULL; + static const kernel_ulong_t bogus_iovcnt1 = + (kernel_ulong_t) 0xdec0ded1defaced2ULL; + static const kernel_ulong_t bogus_iovcnt2 = + (kernel_ulong_t) 0xdec0ded3defaced4ULL; + static const kernel_ulong_t bogus_flags = + (kernel_ulong_t) 0xdeadc0deda7adeadULL; + + pid_t my_pid = getpid(); + char *data1_out = tail_alloc(SIZE_1); + char *data2_out = tail_alloc(SIZE_2); + char *data1_in = tail_alloc(SIZE_2); + char *data2_in = tail_alloc(SIZE_1); + + struct iovec bogus_iovec[] = { + { data1_out + SIZE_1, (size_t) 0xdeadfaceca57beefULL }, + { data1_in + SIZE_2, (size_t) 0xbadc0dedda7adeadULL }, + { data2_out + SIZE_2, (size_t) 0xf157facedec0ded1ULL }, + { data2_in + SIZE_1, (size_t) 0xdefaced2bea7be57ULL }, + }; + + struct iovec out_iovec[] = { + { data1_out, SIZE_11 }, + { data1_out + SIZE_11, SIZE_12 }, + { data1_out + SIZE_11 + SIZE_12, SIZE_13 }, + { data2_out, SIZE_21 }, + { data2_out + SIZE_21, SIZE_22 }, + { data2_out + SIZE_21 + SIZE_22, SIZE_23 }, + }; + struct iovec in_iovec[] = { + { data1_in, SIZE_23 }, + { data1_in + SIZE_23, SIZE_22 }, + { data1_in + SIZE_23 + SIZE_22, SIZE_21 }, + { data2_in, SIZE_13 }, + { data2_in + SIZE_13, SIZE_12 }, + { data2_in + SIZE_13 + SIZE_12, SIZE_11 }, + }; + + struct iovec *bogus_iov = tail_memdup(bogus_iovec, sizeof(bogus_iovec)); + struct iovec *lcl_iov = tail_memdup(lcl_iovec, sizeof(lcl_iovec)); + struct iovec *rmt_iov = tail_memdup(rmt_iovec, sizeof(rmt_iovec)); + + struct print_iov_arg bogus_arg = { ARRAY_SIZE(bogus_iovec), 1 }; + struct print_iov_arg lcl_arg = { ARRAY_SIZE(lcl_iovec), 1, 1, 0, 0, + 2, {SEGM1_BASE, SEGM2_BASE}, {SIZE_1, SIZE_2} }; + struct print_iov_arg rmt_arg = { ARRAY_SIZE(rmt_iovec), 1 }; + + struct print_iov_arg bogus_arg_cut = + { ARRAY_SIZE(bogus_iovec) - 2, 1, 0, 1 }; + struct print_iov_arg lcl_arg_cut = + { ARRAY_SIZE(lcl_iovec) - 2, 1, 1, 1, 0, 2, + {SEGM1_BASE + SIZE_11 + SIZE_12, SEGM2_BASE}, + {SIZE_13, SIZE_2} }; + struct print_iov_arg rmt_arg_cut = + { ARRAY_SIZE(rmt_iovec) - 2, 1 }; + + + fill_memory_ex(data1_out, SIZE_1, SEGM1_BASE, SIZE_1); + fill_memory_ex(data2_out, SIZE_2, SEGM2_BASE, SIZE_2); + + + do_call(bogus_pid, (kernel_ulong_t) (uintptr_t) ARG_STR(NULL), + bogus_iovcnt1, (kernel_ulong_t) (uintptr_t) ARG_STR(NULL), + bogus_iovcnt2, bogus_flags, NULL); + + do_call(my_pid, ptr_cast(bogus_iov + ARRAY_SIZE(bogus_iovec)), + "[]", 0, ptr_cast(in_iov + ARRAY_SIZE(in_iovec)), "[]", + 0, 0, NULL); + do_call(my_pid, ptr_cast(bogus_iov + ARRAY_SIZE(bogus_iovec)), NULL, + bogus_iovcnt1, ptr_cast(in_iov + ARRAY_SIZE(in_iovec)), NULL, + bogus_iovcnt2, 0, print_iov); + + do_call(my_pid, ptr_cast(bogus_iov), (char *) &bogus_arg, + ARRAY_SIZE(bogus_iovec), ptr_cast(rmt_iov + 2), + (char *) &rmt_arg_cut, ARRAY_SIZE(rmt_iovec) - 2, 0, print_iov); + +#if !OP_WR + lcl_arg.check_rc = 1; + lcl_arg_cut.check_rc = 1; +#endif + + do_call(my_pid, ptr_cast(lcl_iov + 2), (char *) &lcl_arg_cut, + ARRAY_SIZE(lcl_iovec) - 1, ptr_cast(bogus_iov + 2), + (char *) &bogus_arg_cut, ARRAY_SIZE(bogus_iovec) - 1, 0, + print_iov); + + lcl_arg_cut.addr_term = 0; + + rmt_arg_cut.addr_term = 1; + rmt_arg_cut.count = 5; + + do_call(my_pid, ptr_cast(lcl_iov + 2), (char *) &lcl_arg_cut, + ARRAY_SIZE(lcl_iovec) - 2, ptr_cast(rmt_iov + 1), + (char *) &rmt_arg_cut, ARRAY_SIZE(rmt_iovec), 0, print_iov); + + /* Correct call */ + do_call(my_pid, ptr_cast(lcl_iov), (char *) &lcl_arg, + ARRAY_SIZE(lcl_iovec), ptr_cast(rmt_iov), (char *) &rmt_arg, + ARRAY_SIZE(rmt_iovec), 0, print_iov); + + puts("+++ exited with 0 +++"); + + return 0; +} diff --git a/tests-m32/process_vm_writev.c b/tests-m32/process_vm_writev.c new file mode 100644 index 000000000..6271c01bc --- /dev/null +++ b/tests-m32/process_vm_writev.c @@ -0,0 +1,18 @@ +#include "tests.h" + +#include + +#ifdef __NR_process_vm_writev + +# define OP process_vm_writev +# define OP_NR __NR_process_vm_writev +# define OP_STR "process_vm_writev" +# define OP_WR 1 + +# include "process_vm_readv_writev.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_process_vm_writev"); + +#endif diff --git a/tests-m32/process_vm_writev.test b/tests-m32/process_vm_writev.test new file mode 100755 index 000000000..f690e6a96 --- /dev/null +++ b/tests-m32/process_vm_writev.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of process_vm_writev syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s5 -a38 diff --git a/tests-m32/pselect6.c b/tests-m32/pselect6.c new file mode 100644 index 000000000..f26448531 --- /dev/null +++ b/tests-m32/pselect6.c @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Based on test by Dr. David Alan Gilbert + */ + +#include "tests.h" +#include "nsig.h" +#include +#include +#include +#include +#include +#include + +#ifdef __NR_pselect6 + +static fd_set set[3][0x1000000 / sizeof(fd_set)]; + +static void +handler(int signo) +{ +} + +int main(int ac, char **av) +{ + int fds[2]; + struct { + struct timespec ts; + int pad[2]; + } tm_in = { + .ts = { .tv_sec = 0xc0de1, .tv_nsec = 0xc0de2 }, + .pad = { 0xdeadbeef, 0xbadc0ded } + }, tm = tm_in; + sigset_t mask; + const struct sigaction act = { .sa_handler = handler }; + const struct itimerval itv = { .it_value.tv_usec = 111111 }; + + sigemptyset(&mask); + sigaddset(&mask, SIGHUP); + sigaddset(&mask, SIGCHLD); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + /* + * Start with a nice simple pselect. + */ + FD_SET(fds[0], set[0]); + FD_SET(fds[1], set[0]); + FD_SET(fds[0], set[1]); + FD_SET(fds[1], set[1]); + FD_SET(1, set[2]); + FD_SET(2, set[2]); + int rc = pselect(fds[1] + 1, set[0], set[1], set[2], NULL, NULL); + if (rc < 0) + perror_msg_and_skip("pselect"); + assert(rc == 1); + printf("pselect6(%d, [%d %d], [%d %d], [1 2], NULL, {NULL, %u}) " + "= 1 (out [%d])\n", + fds[1] + 1, fds[0], fds[1], + fds[0], fds[1], + NSIG_BYTES, fds[1]); + + /* + * Another simple one, with a timeout. + */ + FD_SET(1, set[1]); + FD_SET(2, set[1]); + FD_SET(fds[0], set[1]); + FD_SET(fds[1], set[1]); + assert(syscall(__NR_pselect6, fds[1] + 1, NULL, set[1], NULL, &tm.ts, NULL) == 3); + printf("pselect6(%d, NULL, [1 2 %d %d], NULL, " + "{tv_sec=%lld, tv_nsec=%lld}, NULL) = 3 (out [1 2 %d], left " + "{tv_sec=%lld, tv_nsec=%lld})\n", + fds[1] + 1, fds[0], fds[1], + (long long) tm_in.ts.tv_sec, (long long) tm_in.ts.tv_nsec, + fds[1], + (long long) tm.ts.tv_sec, (long long) tm.ts.tv_nsec); + + /* + * Now the crash case that trinity found, negative nfds + * but with a pointer to a large chunk of valid memory. + */ + FD_ZERO(set[0]); + FD_SET(fds[1],set[0]); + assert(pselect(-1, NULL, set[0], NULL, NULL, &mask) == -1); + printf("pselect6(-1, NULL, %p, NULL, NULL, {[HUP CHLD], %u}) " + "= -1 EINVAL (%m)\n", set[0], NSIG_BYTES); + + /* + * Another variant, with nfds exceeding FD_SETSIZE limit. + */ + FD_ZERO(set[0]); + FD_SET(fds[0],set[0]); + FD_ZERO(set[1]); + tm.ts.tv_sec = 0; + tm.ts.tv_nsec = 123; + assert(pselect(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) == 0); + printf("pselect6(%d, [%d], [], NULL, {tv_sec=0, tv_nsec=123}, " + "{[HUP CHLD], %u}) = 0 (Timeout)\n", + FD_SETSIZE + 1, fds[0], NSIG_BYTES); + + /* + * See how timeouts are decoded. + */ + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(setitimer(ITIMER_REAL, &itv, NULL) == 0); + + tm.ts.tv_nsec = 222222222; + assert(pselect(0, NULL, NULL, NULL, &tm.ts, &mask) == -1); + printf("pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=222222222}, " + "{[HUP CHLD], %u}) = " + "? ERESTARTNOHAND (To be restarted if no handler)\n", + NSIG_BYTES); + puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pselect6") + +#endif diff --git a/tests-m32/pselect6.test b/tests-m32/pselect6.test new file mode 100755 index 000000000..203f8e249 --- /dev/null +++ b/tests-m32/pselect6.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check pselect6 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/ptrace.c b/tests-m32/ptrace.c new file mode 100644 index 000000000..80ce8cbb2 --- /dev/null +++ b/tests-m32/ptrace.c @@ -0,0 +1,455 @@ +/* + * Check decoding of ptrace syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigprocmask + +# include +# include +# include +# include +# include +# include +# include "ptrace.h" +# include + +static const char *errstr; + +static long +do_ptrace(unsigned long request, unsigned long pid, + unsigned long addr, unsigned long data) +{ + long rc = syscall(__NR_ptrace, request, pid, addr, data); + errstr = sprintrc(rc); + return rc; +} + +static void +test_peeksiginfo(unsigned long pid, const unsigned long bad_request) +{ + do_ptrace(PTRACE_PEEKSIGINFO, pid, 0, bad_request); + printf("ptrace(PTRACE_PEEKSIGINFO, %u, NULL, %#lx) = %s\n", + (unsigned) pid, bad_request, errstr); + + struct { + unsigned long long off; + unsigned int flags, nr; + } *const psi = tail_alloc(sizeof(*psi)); + + psi->off = 0xdeadbeeffacefeedULL; + psi->flags = 1; + psi->nr = 42; + + do_ptrace(PTRACE_PEEKSIGINFO, pid, (unsigned long) psi, bad_request); + printf("ptrace(PTRACE_PEEKSIGINFO, %u, {off=%llu" + ", flags=PTRACE_PEEKSIGINFO_SHARED, nr=%u}, %#lx) = %s\n", + (unsigned) pid, psi->off, psi->nr, bad_request, errstr); + + pid = fork(); + if ((pid_t) pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + sigaddset(&mask, SIGUSR2); + sigaddset(&mask, SIGALRM); + + if (sigprocmask(SIG_BLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + raise(SIGUSR1); + raise(SIGUSR2); + raise(SIGALRM); + + if (do_ptrace(PTRACE_TRACEME, 0, 0, 0)) + perror_msg_and_fail("child: PTRACE_TRACEME"); + + raise(SIGSTOP); + _exit(0); + } + + const unsigned int nsigs = 4; + const uid_t uid = geteuid(); + siginfo_t *sigs = tail_alloc(sizeof(*sigs) * nsigs); + + psi->off = 0; + psi->flags = 0; + psi->nr = nsigs; + + for (;;) { + int status, tracee, saved; + + errno = 0; + tracee = wait(&status); + if (tracee <= 0) { + if (errno == EINTR) + continue; + saved = errno; + kill (pid, SIGKILL); + errno = saved; + perror_msg_and_fail("wait"); + } + if (WIFEXITED(status)) { + if (WEXITSTATUS(status) == 0) + break; + error_msg_and_fail("unexpected exit status %u", + WEXITSTATUS(status)); + } + if (WIFSIGNALED(status)) + error_msg_and_fail("unexpected signal %u", + WTERMSIG(status)); + if (!WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP) { + kill(pid, SIGKILL); + error_msg_and_fail("unexpected wait status %x", + status); + } + + long rc = do_ptrace(PTRACE_PEEKSIGINFO, pid, + (unsigned long) psi, (unsigned long) sigs); + if (rc < 0) { + printf("ptrace(PTRACE_PEEKSIGINFO, %u" + ", {off=%llu, flags=0, nr=%u}, %p) = %s\n", + (unsigned) pid, psi->off, psi->nr, sigs, + errstr); + } else { + printf("ptrace(PTRACE_PEEKSIGINFO, %u" + ", {off=%llu, flags=0, nr=%u}" + ", [{si_signo=SIGUSR1, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + ", {si_signo=SIGUSR2, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + ", {si_signo=SIGALRM, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + "]) = %s\n", + (unsigned) pid, psi->off, psi->nr, + (unsigned) pid, (unsigned) uid, + (unsigned) pid, (unsigned) uid, + (unsigned) pid, (unsigned) uid, + errstr); + } + + if (do_ptrace(PTRACE_CONT, pid, 0, 0)) { + saved = errno; + kill (pid, SIGKILL); + errno = saved; + perror_msg_and_fail("ptrace"); + } + printf("ptrace(PTRACE_CONT, %ld, NULL, SIG_0) = 0\n", pid); + } +} + +int +main(void) +{ + const unsigned long bad_request = + (unsigned long) 0xdeadbeeffffffeedULL; + const unsigned long bad_data = + (unsigned long) 0xdeadcafefffff00dULL; + const unsigned long pid = + (unsigned long) 0xdefaced00000000ULL | (unsigned) getpid(); + + unsigned int sigset_size; + + for (sigset_size = 1024 / 8; sigset_size; sigset_size >>= 1) { + if (!syscall(__NR_rt_sigprocmask, + SIG_SETMASK, NULL, NULL, sigset_size)) + break; + } + if (!sigset_size) + perror_msg_and_fail("rt_sigprocmask"); + + void *const k_set = tail_alloc(sigset_size); + siginfo_t *const sip = tail_alloc(sizeof(*sip)); + + do_ptrace(bad_request, pid, 0, 0); + printf("ptrace(%#lx /* PTRACE_??? */, %u, NULL, NULL) = %s\n", + bad_request, (unsigned) pid, errstr); + + do_ptrace(PTRACE_PEEKDATA, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKDATA, %u, %#lx) = %s\n", + (unsigned) pid, bad_request, errstr); +# else + printf("ptrace(PTRACE_PEEKDATA, %u, %#lx, %#lx) = %s\n", + (unsigned) pid, bad_request, bad_data, errstr); +#endif + + do_ptrace(PTRACE_PEEKTEXT, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKTEXT, %u, %#lx) = %s\n", + (unsigned) pid, bad_request, errstr); +# else + printf("ptrace(PTRACE_PEEKTEXT, %u, %#lx, %#lx) = %s\n", + (unsigned) pid, bad_request, bad_data, errstr); +#endif + + do_ptrace(PTRACE_PEEKUSER, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKUSER, %u, %#lx) = %s\n", + (unsigned) pid, bad_request, errstr); +# else + printf("ptrace(PTRACE_PEEKUSER, %u, %#lx, %#lx) = %s\n", + (unsigned) pid, bad_request, bad_data, errstr); +#endif + + do_ptrace(PTRACE_POKEUSER, pid, bad_request, bad_data); + printf("ptrace(PTRACE_POKEUSER, %u, %#lx, %#lx) = %s\n", + (unsigned) pid, bad_request, bad_data, errstr); + + do_ptrace(PTRACE_ATTACH, pid, 0, 0); + printf("ptrace(PTRACE_ATTACH, %u) = %s\n", (unsigned) pid, errstr); + + do_ptrace(PTRACE_INTERRUPT, pid, 0, 0); + printf("ptrace(PTRACE_INTERRUPT, %u) = %s\n", (unsigned) pid, errstr); + + do_ptrace(PTRACE_KILL, pid, 0, 0); + printf("ptrace(PTRACE_KILL, %u) = %s\n", (unsigned) pid, errstr); + + do_ptrace(PTRACE_LISTEN, pid, 0, 0); + printf("ptrace(PTRACE_LISTEN, %u) = %s\n", (unsigned) pid, errstr); + + sigset_t libc_set; + sigemptyset(&libc_set); + sigaddset(&libc_set, SIGUSR1); + memcpy(k_set, &libc_set, sigset_size); + + do_ptrace(PTRACE_SETSIGMASK, pid, sigset_size, (unsigned long) k_set); + printf("ptrace(PTRACE_SETSIGMASK, %u, %u, [USR1]) = %s\n", + (unsigned) pid, sigset_size, errstr); + + do_ptrace(PTRACE_GETSIGMASK, pid, sigset_size, (unsigned long) k_set); + printf("ptrace(PTRACE_GETSIGMASK, %u, %u, %p) = %s\n", + (unsigned) pid, sigset_size, k_set, errstr); + + do_ptrace(PTRACE_SECCOMP_GET_FILTER, pid, 42, 0); + printf("ptrace(PTRACE_SECCOMP_GET_FILTER, %u, 42, NULL) = %s\n", + (unsigned) pid, errstr); + + do_ptrace(PTRACE_GETEVENTMSG, pid, bad_request, bad_data); + printf("ptrace(PTRACE_GETEVENTMSG, %u, %#lx, %#lx) = %s\n", + (unsigned) pid, bad_request, bad_data, errstr); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGIO; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_band = -2; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGIO" + ", si_code=POLL_IN, si_errno=ENOENT, si_band=-2}) = %s\n", + (unsigned) pid, bad_request, errstr); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGTRAP; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_pid = 2; + sip->si_uid = 3; + sip->si_ptr = (void *) bad_request; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGTRAP" + ", si_code=TRAP_BRKPT, si_errno=ENOENT, si_pid=2, si_uid=3" + ", si_value={int=%d, ptr=%p}}) = %s\n", + (unsigned) pid, bad_request, sip->si_int, sip->si_ptr, + errstr); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGILL; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeefULL; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGILL" + ", si_code=ILL_ILLOPC, si_errno=ENOENT, si_addr=%p}) = %s\n", + (unsigned) pid, bad_request, sip->si_addr, errstr); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGFPE; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeefULL; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGFPE" + ", si_code=FPE_INTDIV, si_errno=ENOENT, si_addr=%p}) = %s\n", + (unsigned) pid, bad_request, sip->si_addr, errstr); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGBUS; + sip->si_code = 1; + sip->si_errno = -2; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeefULL; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGBUS" + ", si_code=BUS_ADRALN, si_errno=%d, si_addr=%p}) = %s\n", + (unsigned) pid, bad_request, sip->si_errno, sip->si_addr, + errstr); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGPROF; + sip->si_code = 0xbadc0ded; + sip->si_errno = -2; + sip->si_pid = 0; + sip->si_uid = 3; + sip->si_ptr = 0; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGPROF" + ", si_code=%#x, si_errno=%d, si_pid=0, si_uid=3}) = %s\n", + (unsigned) pid, bad_request, sip->si_code, sip->si_errno, + errstr); + +#ifdef HAVE_SIGINFO_T_SI_SYSCALL + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGSYS; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_call_addr = (void *) (unsigned long) 0xfacefeeddeadbeefULL; + sip->si_syscall = -1U; + sip->si_arch = AUDIT_ARCH_X86_64; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGSYS" + ", si_code=SYS_SECCOMP, si_errno=ENOENT, si_call_addr=%p" + ", si_syscall=%u, si_arch=AUDIT_ARCH_X86_64})" + " = %s\n", + (unsigned) pid, bad_request, sip->si_call_addr, sip->si_syscall, + errstr); + + sip->si_errno = 3141592653U; + sip->si_call_addr = NULL; + sip->si_syscall = __NR_read; + sip->si_arch = 0xda7a1057; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGSYS" + ", si_code=SYS_SECCOMP, si_errno=%d, si_call_addr=NULL" + ", si_syscall=__NR_read, si_arch=%#x /* AUDIT_ARCH_??? */})" + " = %s\n", + (unsigned) pid, bad_request, sip->si_errno, sip->si_arch, + errstr); +#endif + +#if defined HAVE_SIGINFO_T_SI_TIMERID && defined HAVE_SIGINFO_T_SI_OVERRUN + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGHUP; + sip->si_code = SI_TIMER; + sip->si_errno = ENOENT; + sip->si_timerid = 0xdeadbeef; + sip->si_overrun = -1; + sip->si_ptr = (void *) (unsigned long) 0xfacefeeddeadbeefULL; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGHUP" + ", si_code=SI_TIMER, si_errno=ENOENT, si_timerid=%#x" + ", si_overrun=%d, si_value={int=%d, ptr=%p}}) = %s\n", + (unsigned) pid, bad_request, sip->si_timerid, sip->si_overrun, + sip->si_int, sip->si_ptr, errstr); +#endif + + do_ptrace(PTRACE_GETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_GETSIGINFO, %u, %#lx, %p)" + " = %s\n", (unsigned) pid, bad_request, sip, errstr); + + do_ptrace(PTRACE_CONT, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_CONT, %u, NULL, SIGUSR1) = %s\n", + (unsigned) pid, errstr); + + do_ptrace(PTRACE_DETACH, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_DETACH, %u, NULL, SIGUSR2) = %s\n", + (unsigned) pid, errstr); + + do_ptrace(PTRACE_SYSCALL, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SYSCALL, %u, NULL, SIGUSR1) = %s\n", + (unsigned) pid, errstr); + +#ifdef PTRACE_SINGLESTEP + do_ptrace(PTRACE_SINGLESTEP, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_SINGLESTEP, %u, NULL, SIGUSR2) = %s\n", + (unsigned) pid, errstr); +#endif + +#ifdef PTRACE_SINGLEBLOCK + do_ptrace(PTRACE_SINGLEBLOCK, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SINGLEBLOCK, %u, NULL, SIGUSR1) = %s\n", + (unsigned) pid, errstr); +#endif + +#ifdef PTRACE_SYSEMU + do_ptrace(PTRACE_SYSEMU, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_SYSEMU, %u, NULL, SIGUSR2) = %s\n", + (unsigned) pid, errstr); +#endif +#ifdef PTRACE_SYSEMU_SINGLESTEP + do_ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SYSEMU_SINGLESTEP, %u, NULL, SIGUSR1) = %s\n", + (unsigned) pid, errstr); +#endif + + do_ptrace(PTRACE_SETOPTIONS, + pid, 0, PTRACE_O_TRACEFORK|PTRACE_O_TRACECLONE); + printf("ptrace(PTRACE_SETOPTIONS, %u, NULL" + ", PTRACE_O_TRACEFORK|PTRACE_O_TRACECLONE) = %s\n", + (unsigned) pid, errstr); + + do_ptrace(PTRACE_SEIZE, pid, bad_request, PTRACE_O_TRACESYSGOOD); + printf("ptrace(PTRACE_SEIZE, %u, %#lx, PTRACE_O_TRACESYSGOOD) = %s\n", + (unsigned) pid, bad_request, errstr); + + do_ptrace(PTRACE_SETREGSET, pid, 1, bad_request); + printf("ptrace(PTRACE_SETREGSET, %u, NT_PRSTATUS, %#lx) = %s\n", + (unsigned) pid, bad_request, errstr); + + do_ptrace(PTRACE_GETREGSET, pid, 3, bad_request); + printf("ptrace(PTRACE_GETREGSET, %u, NT_PRPSINFO, %#lx) = %s\n", + (unsigned) pid, bad_request, errstr); + + test_peeksiginfo(pid, bad_request); + + do_ptrace(PTRACE_TRACEME, 0, 0, 0); + printf("ptrace(PTRACE_TRACEME) = %s\n", errstr); + + puts("+++ exited with 0 +++"); + return 0; +} + + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigprocmask") + +#endif diff --git a/tests-m32/ptrace.test b/tests-m32/ptrace.test new file mode 100755 index 000000000..5add9be47 --- /dev/null +++ b/tests-m32/ptrace.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of ptrace syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e signal=none diff --git a/tests-m32/pwritev.c b/tests-m32/pwritev.c new file mode 100644 index 000000000..58e5b41e2 --- /dev/null +++ b/tests-m32/pwritev.c @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PWRITEV + +# include +# include +# include +# include + +# define LEN 8 +# define LIM (LEN - 1) + +static void +print_iov(const struct iovec *iov) +{ + unsigned int i; + unsigned char *buf = iov->iov_base; + + fputs("{iov_base=\"", stdout); + for (i = 0; i < iov->iov_len; ++i) { + if (i < LIM) + printf("\\%d", (int) buf[i]); + } + printf("\"%s, iov_len=%u}", + i > LIM ? "..." : "", (unsigned) iov->iov_len); +} + +static void +print_iovec(const struct iovec *iov, unsigned int cnt, unsigned int size) +{ + if (!size) { + printf("%p", iov); + return; + } + unsigned int i; + putchar('['); + for (i = 0; i < cnt; ++i) { + if (i) + fputs(", ", stdout); + if (i == size) { + printf("%p", &iov[i]); + break; + } + if (i == LIM) { + fputs("...", stdout); + break; + } + print_iov(&iov[i]); + } + putchar(']'); +} + +int +main(void) +{ + (void) close(0); + if (open("/dev/null", O_WRONLY)) + perror_msg_and_fail("open"); + + char *buf = tail_alloc(LEN); + unsigned i; + for (i = 0; i < LEN; ++i) + buf[i] = i; + + struct iovec *iov = tail_alloc(sizeof(*iov) * LEN); + for (i = 0; i < LEN; ++i) { + buf[i] = i; + iov[i].iov_base = &buf[i]; + iov[i].iov_len = LEN - i; + } + + const off_t offset = 0xdefaceddeadbeefLL; + long rc; + int written = 0; + for (i = 0; i < LEN; ++i) { + written += iov[i].iov_len; + if (pwritev(0, iov, i + 1, offset + i) != written) + perror_msg_and_fail("pwritev"); + fputs("pwritev(0, ", stdout); + print_iovec(iov, i + 1, LEN); + printf(", %u, %lld) = %d\n", + i + 1, (long long) offset + i, written); + } + + for (i = 0; i <= LEN; ++i) { + unsigned int n = LEN + 1 - i; + fputs("pwritev(0, ", stdout); + print_iovec(iov + i, n, LEN - i); + rc = pwritev(0, iov + i, n, offset + LEN + i); + printf(", %u, %lld) = %ld %s (%m)\n", + n, (long long) offset + LEN + i, rc, errno2name()); + } + + iov->iov_base = iov + LEN * 2; + rc = pwritev(0, iov, 1, -1); + printf("pwritev(0, [{iov_base=%p, iov_len=%d}], 1, -1) = %ld %s (%m)\n", + iov->iov_base, LEN, rc, errno2name()); + + iov += LEN; + rc = pwritev(0, iov, 42, -2); + printf("pwritev(0, %p, 42, -2) = %ld %s (%m)\n", + iov, rc, errno2name()); + + rc = pwritev(0, NULL, 1, -3); + printf("pwritev(0, NULL, 1, -3) = %ld %s (%m)\n", + rc, errno2name()); + + rc = pwritev(0, iov, 0, -4); + printf("pwritev(0, [], 0, -4) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PWRITEV") + +#endif diff --git a/tests-m32/pwritev.test b/tests-m32/pwritev.test new file mode 100755 index 000000000..0aed6835c --- /dev/null +++ b/tests-m32/pwritev.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check pwritev syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -s7 diff --git a/tests-m32/qual_fault-exit_group.expected b/tests-m32/qual_fault-exit_group.expected new file mode 100644 index 000000000..dd9d4e46e --- /dev/null +++ b/tests-m32/qual_fault-exit_group.expected @@ -0,0 +1,3 @@ +exit_group(42) = -1 ENOSYS (Function not implemented) (INJECTED) +exit(42) = ? ++++ exited with 42 +++ diff --git a/tests-m32/qual_fault-exit_group.test b/tests-m32/qual_fault-exit_group.test new file mode 100755 index 000000000..c98ffc6e0 --- /dev/null +++ b/tests-m32/qual_fault-exit_group.test @@ -0,0 +1,53 @@ +#!/bin/sh +# +# Check decoding of fault injected exit_group syscall. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/scno_tampering.sh" + +test_with() +{ + > "$LOG" || fail_ "failed to write $LOG" + + $STRACE -o "$LOG" "$@" + rc=$? + [ $rc -eq 42 ] || + dump_log_and_fail_with "$STRACE $* failed with code $rc" + + match_diff +} + +test_with -eexit,exit_group -efault=exit_group:error=ENOSYS ./answer + +test_with -eexit,exit_group -efault=exit_group:error=ENOSYS \ + -efault=\!process:error=1 ./answer + +test_with -eexit,exit_group -efault=all:error=ENOSYS \ + -efault=exit:error=1:when=2+ ./answer + +test_with -eexit,exit_group -efault=exit_group:error=ENOSYS \ + -efault=\!desc,file,memory,process,signal,network,ipc:error=1 ./answer diff --git a/tests-m32/qual_fault-syntax.test b/tests-m32/qual_fault-syntax.test new file mode 100755 index 000000000..85093fc7d --- /dev/null +++ b/tests-m32/qual_fault-syntax.test @@ -0,0 +1,111 @@ +#!/bin/sh +# +# Check -e fault= syntax. +# +# Copyright (c) 2016=2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# +# F +# F+ +# F+S + +fail_with() +{ + dump_log_and_fail_with \ + "strace -e fault=$* failed to handle an argument error properly" +} + +for arg in '' , ,, ,,, : :: ::: \! \!, \!: \ + invalid_syscall_name \ + invalid_syscall_name:when=3 \ + -1 \!-1 \ + -1:when=4 \ + -2 \ + -2:when=5 \ + 32767 \!32767 \ + 32767:when=6 \ + chdir:42 \!chdir:42 \ + chdir:42:when=7 \ + chdir:invalid \ + chdir:invalid:when=8 \ + chdir:error= \ + chdir:error=:when=10 \ + chdir:error=invalid_error_name \ + chdir:error=invalid_error_name:when=11 \ + chdir:error=-1 \ + chdir:error=-1:when=12 \ + chdir:error=-2 \ + chdir:error=-2:when=13 \ + chdir:error=3+ \ + chdir:error=3+:when=14 \ + chdir:error=4096 \ + chdir:error=4096:when=15 \ + chdir:when=7:error=invalid_error_name \ + chdir:when= \ + chdir:when=:error=19 \ + chdir:when=0 \ + chdir:when=0:error=20 \ + chdir:when=-1 \ + chdir:when=-1:error=21 \ + chdir:when=-2+ \ + chdir:when=-2+:error=22 \ + chdir:when=-3+0 \ + chdir:when=-3+0:error=23 \ + chdir:when=4- \ + chdir:when=4-:error=24 \ + chdir:when=5+- \ + chdir:when=5+-:error=25 \ + chdir:when=6++ \ + chdir:when=6++:error=26 \ + chdir:when=7+0 \ + chdir:when=7+0:error=27 \ + chdir:when=8+-1 \ + chdir:when=8+-1:error=28 \ + chdir:when=9+1+ \ + chdir:when=9+1+:error=29 \ + chdir:when=65536 \ + chdir:when=65536:error=30 \ + chdir:when=1+65536 \ + chdir:when=1+65536:error=31 \ + file,nonsense \ + \!desc,nonsense \ + chdir,nonsense \ + \!chdir,nonsense \ + 1,nonsense \ + \!1,nonsense \ + chdir:retval=0 \ + chdir:signal=1 \ + chdir:error=1:error=2 \ + ; do + $STRACE -e fault="$arg" true 2> "$LOG" && + fail_with "$arg" + LC_ALL=C grep -F 'invalid fault argument' < "$LOG" > /dev/null || + fail_with "$arg" +done + +exit 0 diff --git a/tests-m32/qual_fault.c b/tests-m32/qual_fault.c new file mode 100644 index 000000000..d26dc7ce7 --- /dev/null +++ b/tests-m32/qual_fault.c @@ -0,0 +1,148 @@ +/* + * Check that fault injection works properly. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +static const int expfd = 4; +static const int gotfd = 5; + +#define DEFAULT_ERRNO ENOSYS + +static const char *errstr; +static int is_raw, err, first, step, iter, try; + +static void +invoke(int fail) +{ + static char buf[sizeof(int) * 3 + 3]; + const struct iovec io = { + .iov_base = buf, + .iov_len = sprintf(buf, "%d.", ++try) + }; + int rc; + + if (!fail) { + rc = write(expfd, io.iov_base, io.iov_len); + if (rc != (int) io.iov_len) + perror_msg_and_fail("write"); + } + + errno = 0; + rc = writev(gotfd, &io, 1); + + if (fail) { + if (!(rc == -1 && errno == err)) + perror_msg_and_fail("expected errno %d" + ", got rc == %d, errno == %d", + err, rc, errno); + + if (is_raw) + tprintf("writev(%#x, %p, 0x1) = -1 (errno %d)" + " (INJECTED)\n", gotfd, &io, err); + else + tprintf("writev(%d, [{iov_base=\"%s\", iov_len=%d}], 1)" + " = -1 %s (%m) (INJECTED)\n", + gotfd, buf, (int) io.iov_len, errstr); + } else { + if (rc != (int) io.iov_len) + perror_msg_and_fail("expected %d" + ", got rc == %d, errno == %d", + (int) io.iov_len, rc, errno); + + if (is_raw) + tprintf("writev(%#x, %p, 0x1) = %#x\n", gotfd, &io, rc); + else + tprintf("writev(%d, [{iov_base=\"%s\", iov_len=%d}], 1)" + " = %d\n", + gotfd, buf, (int) io.iov_len, (int) io.iov_len); + } +} + +int +main(int argc, char *argv[]) +{ + struct stat st; + + assert(fstat(expfd, &st) == 0); + assert(fstat(gotfd, &st) == 0); + + assert(argc == 6); + + is_raw = !strcmp("raw", argv[1]); + + errstr = argv[2]; + err = atoi(errstr); + assert(err >= 0); + + if (!err) { + if (!*errstr) + err = DEFAULT_ERRNO; + else if (!strcasecmp(errstr, "EINVAL")) + err = EINVAL; + else + err = ENOSYS; + } + + errno = err; + errstr = errno2name(); + + first = atoi(argv[3]); + step = atoi(argv[4]); + iter = atoi(argv[5]); + + assert(first > 0); + assert(step >= 0); + + tprintf("%s", ""); + + int i; + for (i = 1; i <= iter; ++i) { + int fail = 0; + if (first > 0) { + --first; + if (first == 0) { + fail = 1; + first = step; + } + } + invoke(fail); + } + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/qual_fault.test b/tests-m32/qual_fault.test new file mode 100755 index 000000000..e194a7879 --- /dev/null +++ b/tests-m32/qual_fault.test @@ -0,0 +1,104 @@ +#!/bin/sh +# +# Check that fault injection works properly. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/scno_tampering.sh" + +# +# F +# F+ +# F+S + +N=16 + +check_fault_injection() +{ + local trace fault err first step extra + trace=$1; shift + fault=$1; shift + err=$1; shift + first=$1; shift + step=$1; shift + extra="$*" + + local when= + if [ -z "$first$step" ]; then + first=1 + step=1 + else + case "$step" in + '') when=":when=$first"; step=0 ;; + +) when=":when=$first+"; step=1 ;; + *) when=":when=$first+$step" ;; + esac + fi + + local error= + local raw=reg + set -- + case "$err" in + '') ;; + [123456789]*) + error=":error=$err" + raw=raw + set -- -e raw=all + ;; + *) error=":error=$err" ;; + esac + + outexp="$NAME.out.exp" + outgot="$NAME.out.got" + + run_strace -a11 -e trace=$trace \ + "$@" -e fault=$fault$when$error $extra \ + ./$NAME $raw "$err" "$first" "$step" $N \ + > "$EXP" 4> "$outexp" 5> "$outgot" + + match_diff "$EXP" "$LOG" + match_diff "$outexp" "$outgot" + rm -f "$EXP" "$outexp" "$outgot" +} + +for err in '' ENOSYS 22 einval; do + for fault in writev desc,51; do + check_fault_injection \ + writev $fault "$err" '' '' -efault=chdir + check_fault_injection \ + writev $fault "$err" '' '' -efault=chdir -efault=none + for F in 1 2 3 5 7 11; do + check_fault_injection \ + writev $fault "$err" $F '' + check_fault_injection \ + writev $fault "$err" $F + + for S in 1 2 3 5 7 11; do + check_fault_injection \ + writev $fault "$err" $F $S + done + done + done +done diff --git a/tests-m32/qual_inject-error-signal.c b/tests-m32/qual_inject-error-signal.c new file mode 100644 index 000000000..f4ccd8241 --- /dev/null +++ b/tests-m32/qual_inject-error-signal.c @@ -0,0 +1,69 @@ +/* + * Check fault injection along with signal injection. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +static struct stat before, after; + +static void +handler(int sig) +{ + if (stat(".", &after)) + syscall(__NR_exit_group, 2); + + if (before.st_dev != after.st_dev || before.st_ino != after.st_ino) + syscall(__NR_exit_group, 3); + + syscall(__NR_exit_group, 0); +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGUSR1, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + if (stat(".", &before)) + perror_msg_and_fail("stat"); + + syscall(__NR_chdir, "."); + syscall(__NR_exit_group, 1); + return 1; +} diff --git a/tests-m32/qual_inject-error-signal.expected b/tests-m32/qual_inject-error-signal.expected new file mode 100644 index 000000000..24389b378 --- /dev/null +++ b/tests-m32/qual_inject-error-signal.expected @@ -0,0 +1,4 @@ +chdir(".") = -1 ENOENT (No such file or directory) (INJECTED) +--- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_KERNEL} --- +exit_group(0) = ? ++++ exited with 0 +++ diff --git a/tests-m32/qual_inject-error-signal.test b/tests-m32/qual_inject-error-signal.test new file mode 100755 index 000000000..fcbcc398f --- /dev/null +++ b/tests-m32/qual_inject-error-signal.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check fault injection along with signal injection. +. "${srcdir=.}/scno_tampering.sh" + +run_strace -a12 -echdir,exit_group -einject=chdir:error=ENOENT:signal=USR1 \ + "./$NAME" +match_diff diff --git a/tests-m32/qual_inject-retval.c b/tests-m32/qual_inject-retval.c new file mode 100644 index 000000000..ac9801ebf --- /dev/null +++ b/tests-m32/qual_inject-retval.c @@ -0,0 +1,73 @@ +/* + * Check success injection. + * + * Copyright (c) 2017 Elvira Khabirova + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_chdir + +# include +# include +# include +# include +# include + +int +main(int argc, char *argv[]) +{ + assert(argc == 2); + + static const char dir[] = ".."; + struct stat before, after; + + if (stat(".", &before)) + perror_msg_and_fail("stat"); + + long rval = syscall(__NR_chdir, dir); + + if (stat(".", &after)) + perror_msg_and_fail("stat"); + + if (before.st_dev != after.st_dev || before.st_ino != after.st_ino) + error_msg_and_fail("syscall succeeded"); + if (atol(argv[1]) != rval) + error_msg_and_fail("expected retval %s, got retval %ld", + argv[1], rval); + + printf("chdir(\"%s\") = %ld (INJECTED)\n", dir, rval); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chdir") + +#endif diff --git a/tests-m32/qual_inject-retval.test b/tests-m32/qual_inject-retval.test new file mode 100755 index 000000000..419030ad4 --- /dev/null +++ b/tests-m32/qual_inject-retval.test @@ -0,0 +1,21 @@ +#!/bin/sh + +# Check success injection. + +. "${srcdir=.}/scno_tampering.sh" + +check_injection() +{ + local syscall rval + + syscall=chdir + rval="$1"; shift + + run_strace -a12 -e$syscall -einject="$syscall:retval=$rval" "$@" \ + ./qual_inject-retval "$rval" > "$EXP" + match_diff "$LOG" "$EXP" + rm -f "$EXP" +} + +check_injection 0 +check_injection 42 diff --git a/tests-m32/qual_inject-signal.c b/tests-m32/qual_inject-signal.c new file mode 100644 index 000000000..ff56a2862 --- /dev/null +++ b/tests-m32/qual_inject-signal.c @@ -0,0 +1,57 @@ +/* + * Check that signal injection works properly. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +static void +handler(int sig) +{ + syscall(__NR_exit_group, 0); +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGUSR1, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + syscall(__NR_chdir, "."); + syscall(__NR_exit_group, 1); + return 1; +} diff --git a/tests-m32/qual_inject-signal.expected b/tests-m32/qual_inject-signal.expected new file mode 100644 index 000000000..69a1d9793 --- /dev/null +++ b/tests-m32/qual_inject-signal.expected @@ -0,0 +1,4 @@ +chdir(".") = 0 +--- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_KERNEL} --- +exit_group(0) = ? ++++ exited with 0 +++ diff --git a/tests-m32/qual_inject-signal.test b/tests-m32/qual_inject-signal.test new file mode 100755 index 000000000..88002ce94 --- /dev/null +++ b/tests-m32/qual_inject-signal.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check signal injection. +. "${srcdir=.}/init.sh" + +run_strace -a12 -echdir,exit_group -einject=chdir:signal=USR1 \ + ./$NAME +match_diff diff --git a/tests-m32/qual_inject-syntax.test b/tests-m32/qual_inject-syntax.test new file mode 100755 index 000000000..a9e44d748 --- /dev/null +++ b/tests-m32/qual_inject-syntax.test @@ -0,0 +1,118 @@ +#!/bin/sh +# +# Check -e inject= syntax. +# +# Copyright (c) 2016-2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# +# F +# F+ +# F+S + +fail_with() +{ + dump_log_and_fail_with \ + "strace -e inject=$* failed to handle an argument error properly" +} + +for arg in '' , ,, ,,, : :: ::: \! \!, \!: \ + invalid_syscall_name \ + invalid_syscall_name:when=3 \ + -1 \!-1 \ + -1:when=4 \ + -2 \ + -2:when=5 \ + 32767 \!32767 \ + 32767:when=6 \ + 42 \ + chdir \ + chdir:42 \!chdir:42 \ + chdir:42:when=7 \ + chdir:invalid \ + chdir:invalid:when=8 \ + chdir:error= \ + chdir:error=:when=10 \ + chdir:error=invalid_error_name \ + chdir:error=invalid_error_name:when=11 \ + chdir:error=-1 \ + chdir:error=-1:when=12 \ + chdir:error=-2 \ + chdir:error=-2:when=13 \ + chdir:error=3+ \ + chdir:error=3+:when=14 \ + chdir:error=4096 \ + chdir:error=4096:when=15 \ + chdir:when=7:error=invalid_error_name \ + chdir:when= \ + chdir:when=:error=19 \ + chdir:when=0 \ + chdir:when=0:error=20 \ + chdir:when=-1 \ + chdir:when=-1:error=21 \ + chdir:when=-2+ \ + chdir:when=-2+:error=22 \ + chdir:when=-3+0 \ + chdir:when=-3+0:error=23 \ + chdir:when=4- \ + chdir:when=4-:error=24 \ + chdir:when=5+- \ + chdir:when=5+-:error=25 \ + chdir:when=6++ \ + chdir:when=6++:error=26 \ + chdir:when=7+0 \ + chdir:when=7+0:error=27 \ + chdir:when=8+-1 \ + chdir:when=8+-1:error=28 \ + chdir:when=9+1+ \ + chdir:when=9+1+:error=29 \ + chdir:when=65536 \ + chdir:when=65536:error=30 \ + chdir:when=1+65536 \ + chdir:when=1+65536:error=31 \ + file,nonsense \ + \!desc,nonsense \ + chdir,nonsense \ + \!chdir,nonsense \ + 1,nonsense \ + \!1,nonsense \ + chdir:retval=-1 \ + chdir:signal=0 \ + chdir:signal=129 \ + chdir:retval=0:retval=1 \ + chdir:error=1:error=2 \ + chdir:retval=0:error=1 \ + chdir:error=1:retval=0 \ + chdir:retval=0:signal=1:error=1 \ + ; do + $STRACE -e inject="$arg" true 2> "$LOG" && + fail_with "$arg" + LC_ALL=C grep -F 'invalid inject argument' < "$LOG" > /dev/null || + fail_with "$arg" +done + +exit 0 diff --git a/tests-m32/qual_signal.c b/tests-m32/qual_signal.c new file mode 100644 index 000000000..106dabea8 --- /dev/null +++ b/tests-m32/qual_signal.c @@ -0,0 +1,82 @@ +/* + * Check how strace -e signal=set works. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static pid_t pid; +static uid_t uid; + +static void +handler(int sig) +{ +} + +static void +test_sig(int signo, const char *name) +{ + const struct sigaction act = { .sa_handler = handler }; + + if (sigaction(signo, &act, NULL)) + perror_msg_and_fail("sigaction: %d", signo); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, signo); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask: %d", signo); + + if (kill(pid, signo)) + perror_msg_and_fail("kill(%d, %d)", pid, signo); + + if (name && *name) + printf("--- %s {si_signo=%s, si_code=SI_USER" + ", si_pid=%d, si_uid=%d} ---\n", + name, name, pid, uid); +} + +int +main(int ac, const char **av) +{ + assert(ac & 1); + + pid = getpid(); + uid = geteuid(); + + int i; + for (i = 1; i < ac; i += 2) + test_sig(atoi(av[i]), av[i + 1]); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/qual_signal.test b/tests-m32/qual_signal.test new file mode 100755 index 000000000..54a37a30c --- /dev/null +++ b/tests-m32/qual_signal.test @@ -0,0 +1,111 @@ +#!/bin/sh +# +# Check how strace -e signal=set works. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +test_one_sig() +{ + local sigs + sigs="$1"; shift + + run_prog "./$NAME" "$@" > /dev/null + run_strace -e trace=none -e signal="$sigs" "./$NAME" "$@" > "$EXP" + match_diff "$LOG" "$EXP" + rm -f "$EXP" +} + +test_sigs() +{ + local first second sigs + first="$1"; shift + second="$1"; shift + + for sigs; do + test_one_sig "$sigs" 2 "$first" 15 "$second" + done +} + +test_sigs '' '' \ + none '!all' \ + CHLD SIGCHLD ALRM SIGALRM \ + chld sigchld alrm sigalrm \ + CHLD,SIGALRM ALRM,SIGCHLD \ + chld,sigalrm alrm,sigchld \ + 9 9,4 9,4,11 \ + 4,CHLD,11,ALRM,9 \ + '!2,15' '!INT,TERM' '!SIGINT,TERM' '!INT,SIGTERM' '!SIGTERM,SIGINT' \ + '!2,INT,TERM' '!2,SIGTERM' '!SIGINT,15' '!INT,SIGTERM,15' \ + '!2,4,15' '!15,9,2,11,4' + +test_sigs SIGINT '' \ + 2 INT SIGINT \ + CHLD,SIGINT SIGINT,SIGALRM \ + chld,sigint sigint,sigalrm \ + ALRM,2,SIGCHLD \ + '!15' '!TERM' '!SIGTERM' \ + '!15,TERM' '!SIGTERM,15,TERM' \ + '!SIGALRM,TERM' '!CHLD,SIGTERM' \ + '!ALRM,15' '!SIGCHLD,ALRM,SIGTERM,KILL' \ + '!4,15' '!15,9,11,4' + +test_sigs '' SIGTERM \ + 15 TERM SIGTERM \ + CHLD,SIGTERM SIGTERM,SIGALRM \ + chld,sigterm sigterm,sigalrm \ + ALRM,15,SIGCHLD \ + '!2' '!INT' '!SIGINT' \ + '!2,INT' '!SIGINT,2,INT' \ + '!SIGALRM,INT' '!CHLD,SIGINT' \ + '!ALRM,2' '!SIGCHLD,ALRM,SIGINT,KILL' \ + '!4,2' '!2,9,11,4' + +test_sigs SIGINT SIGTERM \ + all '!none' \ + INT,TERM SIGINT,TERM SIGTERM,INT SIGINT,SIGTERM \ + int,term sigint,term sigterm,int sigint,sigterm \ + 2,15 2,TERM SIGTERM,2 TERM,15,SIGINT,2 \ + '!CHLD' '!SIGCHLD' '!ALRM' '!SIGALRM' \ + '!CHLD,SIGALRM' '!ALRM,SIGCHLD' \ + '!9' '!9,4' '!9,4,11' '!4,CHLD,11,ALRM,9' + +fail_with() +{ + dump_log_and_fail_with \ + "strace -e signal=$* failed to handle an argument error properly" +} + +for arg in ' ' invalid_signal_name SIG -1 256 1-1 \ + 1,2,4,8,16,32,64,128,256,512,1024 9,chdir; do + $STRACE -e signal="$arg" true 2> "$LOG" && + fail_with "$arg" + LC_ALL=C grep -F 'invalid signal' < "$LOG" > /dev/null || + fail_with "$arg" +done + +exit 0 diff --git a/tests-m32/qual_syscall.test b/tests-m32/qual_syscall.test new file mode 100755 index 000000000..f7eb06d5a --- /dev/null +++ b/tests-m32/qual_syscall.test @@ -0,0 +1,59 @@ +#!/bin/sh + +# Check how strace -e abbrev=set, -e raw=set, -e trace=set, +# and -e verbose=set work. + +. "${srcdir=.}/init.sh" + +run_prog ./umovestr +pattern_abbrev_verbose='execve("\./umovestr", \["\./umovestr"\], \[/\* [[:digit:]]* vars \*/\]) = 0' +pattern_nonabbrev_verbose='execve("\./umovestr", \["\./umovestr"\], \[".*\"\(\.\.\.\)\?\]) = 0' +pattern_nonverbose='execve("\./umovestr", 0x[[:xdigit:]]*, 0x[[:xdigit:]]*) = 0' +pattern_raw='execve(0x[[:xdigit:]]*, 0x[[:xdigit:]]*, 0x[[:xdigit:]]*) = 0' + +check_output_mismatch() +{ + local pattern + pattern="$1"; shift + run_strace "$@" ./umovestr + LC_ALL=C grep -x "$pattern" "$LOG" > /dev/null || { + printf '%s\n%s\n' \ + 'Failed patterns of expected output:' "$pattern" + dump_log_and_fail_with "$STRACE $args output mismatch" + } +} + +check_output_mismatch "$pattern_abbrev_verbose" -e execve +LC_ALL=C grep -v -x "$pattern_abbrev_verbose" "$LOG" | +LC_ALL=C grep '^[[:alnum:]_]*(' > /dev/null && + dump_log_and_fail_with "$STRACE $args unexpected output" + +check_output_mismatch "$pattern_abbrev_verbose" -e trace=process +LC_ALL=C grep '^chdir' "$LOG" > /dev/null && + dump_log_and_fail_with "$STRACE $args unexpected output" + +run_strace -e 42 ./umovestr +LC_ALL=C grep '^[[:alnum:]_]*(' "$LOG" > /dev/null && + dump_log_and_fail_with "$STRACE $args unexpected output" + +for a in execve \!chdir all \!none \ + file process \!desc \!ipc \!memory \!network \!signal; do + check_output_mismatch \ + "$pattern_abbrev_verbose" -e abbrev="$a" -e execve + check_output_mismatch \ + "$pattern_raw" -a22 -e raw="$a" -e execve + check_output_mismatch \ + "$pattern_abbrev_verbose" -e verbose="$a" -e execve +done + +for a in \!execve chdir 42 \!all none \ + \!file \!process desc ipc memory network signal; do + check_output_mismatch \ + "$pattern_nonabbrev_verbose" -e abbrev="$a" -e execve + check_output_mismatch \ + "$pattern_abbrev_verbose" -e raw="$a" -e execve + check_output_mismatch \ + "$pattern_nonverbose" -a31 -e verbose="$a" -e execve +done + +exit 0 diff --git a/tests-m32/quotactl-v.c b/tests-m32/quotactl-v.c new file mode 100644 index 000000000..00139649c --- /dev/null +++ b/tests-m32/quotactl-v.c @@ -0,0 +1,3 @@ +/* This file is part of quotactl-v strace test. */ +#define VERBOSE 1 +#include "quotactl.c" diff --git a/tests-m32/quotactl-v.test b/tests-m32/quotactl-v.test new file mode 100755 index 000000000..6adaf82cb --- /dev/null +++ b/tests-m32/quotactl-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check non-abbreviated decoding of quotactl syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=quotactl diff --git a/tests-m32/quotactl-xfs-v.c b/tests-m32/quotactl-xfs-v.c new file mode 100644 index 000000000..21173d634 --- /dev/null +++ b/tests-m32/quotactl-xfs-v.c @@ -0,0 +1,3 @@ +/* This file is part of quotactl-xfs-v strace test. */ +#define VERBOSE 1 +#include "quotactl-xfs.c" diff --git a/tests-m32/quotactl-xfs-v.test b/tests-m32/quotactl-xfs-v.test new file mode 100755 index 000000000..d5ffc7d69 --- /dev/null +++ b/tests-m32/quotactl-xfs-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check non-abbreviated decoding of quotactl xfs subcommands. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=quotactl diff --git a/tests-m32/quotactl-xfs.c b/tests-m32/quotactl-xfs.c new file mode 100644 index 000000000..e420d1c9d --- /dev/null +++ b/tests-m32/quotactl-xfs.c @@ -0,0 +1,354 @@ +/* + * Check decoding of quotactl xfs subcommands. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_quotactl) && \ + (defined(HAVE_LINUX_QUOTA_H) || defined(HAVE_SYS_QUOTA_H)) && \ + defined(HAVE_LINUX_DQBLK_XFS_H) + +# include +# include +# include + +# include + +# include "quotactl.h" + +# ifndef Q_GETNEXTQUOTA +# define Q_XGETNEXTQUOTA XQM_CMD(0x9) +# endif /* !Q_GETNEXTQUOTA */ + +# ifndef Q_XGETQSTATV + +# define Q_XGETQSTATV XQM_CMD(8) +# define FS_QSTATV_VERSION1 1 + +struct fs_qfilestatv { + uint64_t qfs_ino; /* inode number */ + uint64_t qfs_nblks; /* number of BBs 512-byte-blks */ + uint32_t qfs_nextents; /* number of extents */ + uint32_t qfs_pad; /* pad for 8-byte alignment */ +}; + +struct fs_quota_statv { + int8_t qs_version; /* version for future changes */ + uint8_t qs_pad1; /* pad for 16bit alignment */ + uint16_t qs_flags; /* XFS_QUOTA_.* flags */ + uint32_t qs_incoredqs; /* number of dquots incore */ + struct fs_qfilestatv qs_uquota; /* user quota information */ + struct fs_qfilestatv qs_gquota; /* group quota information */ + struct fs_qfilestatv qs_pquota; /* project quota information */ + int32_t qs_btimelimit; /* limit for blks timer */ + int32_t qs_itimelimit; /* limit for inodes timer */ + int32_t qs_rtbtimelimit; /* limit for rt blks timer */ + uint16_t qs_bwarnlimit; /* limit for num warnings */ + uint16_t qs_iwarnlimit; /* limit for num warnings */ + uint64_t qs_pad2[8]; /* for future proofing */ +}; + +# endif /* !Q_XGETQSTATV */ + +# include "xlat.h" +# include "xlat/xfs_dqblk_flags.h" +# if VERBOSE +# include "xlat/xfs_quota_flags.h" +# endif + + +void +print_xdisk_quota(int rc, void *ptr, void *arg) +{ + struct fs_disk_quota *dq = ptr; + long out_arg = (long) arg; + + if (((rc != 0) && out_arg) || (out_arg > 1)) { + printf("%p", dq); + return; + } + + PRINT_FIELD_D("{", dq, d_version); + printf(", d_flags="); + printflags(xfs_dqblk_flags, (uint8_t) dq->d_flags, "XFS_???_QUOTA"); + + PRINT_FIELD_X(", ", dq, d_fieldmask); + PRINT_FIELD_U(", ", dq, d_id); + PRINT_FIELD_U(", ", dq, d_blk_hardlimit); + PRINT_FIELD_U(", ", dq, d_blk_softlimit); + PRINT_FIELD_U(", ", dq, d_ino_hardlimit); + PRINT_FIELD_U(", ", dq, d_ino_softlimit); + PRINT_FIELD_U(", ", dq, d_bcount); + PRINT_FIELD_U(", ", dq, d_icount); + +# if VERBOSE + PRINT_FIELD_D(", ", dq, d_itimer); + PRINT_FIELD_D(", ", dq, d_btimer); + PRINT_FIELD_U(", ", dq, d_iwarns); + PRINT_FIELD_U(", ", dq, d_bwarns); + PRINT_FIELD_U(", ", dq, d_rtb_hardlimit); + PRINT_FIELD_U(", ", dq, d_rtb_softlimit); + PRINT_FIELD_U(", ", dq, d_rtbcount); + PRINT_FIELD_D(", ", dq, d_rtbtimer); + PRINT_FIELD_U(", ", dq, d_rtbwarns); +# else + printf(", ..."); +# endif /* !VERBOSE */ + printf("}"); +} + +void +print_xquota_stat(int rc, void *ptr, void *arg) +{ + struct fs_quota_stat *qs = ptr; + long out_arg = (long) arg; + + if (((rc != 0) && out_arg) || (out_arg > 1)) { + printf("%p", qs); + return; + } + + PRINT_FIELD_D("{", qs, qs_version); + +# if VERBOSE + printf(", qs_flags="); + printflags(xfs_quota_flags, qs->qs_flags, "XFS_QUOTA_???"); + PRINT_FIELD_U(", qs_uquota={", &qs->qs_uquota, qfs_ino); + PRINT_FIELD_U(", ", &qs->qs_uquota, qfs_nblks); + PRINT_FIELD_U(", ", &qs->qs_uquota, qfs_nextents); + PRINT_FIELD_U("}, qs_gquota={", &qs->qs_gquota, qfs_ino); + PRINT_FIELD_U(", ", &qs->qs_gquota, qfs_nblks); + PRINT_FIELD_U(", ", &qs->qs_gquota, qfs_nextents); + PRINT_FIELD_U("}, ", qs, qs_incoredqs); + PRINT_FIELD_D(", ", qs, qs_btimelimit); + PRINT_FIELD_D(", ", qs, qs_itimelimit); + PRINT_FIELD_D(", ", qs, qs_rtbtimelimit); + PRINT_FIELD_U(", ", qs, qs_bwarnlimit); + PRINT_FIELD_U(", ", qs, qs_iwarnlimit); +# else + printf(", ..."); +# endif /* !VERBOSE */ + printf("}"); +} + +void +print_xquota_statv(int rc, void *ptr, void *arg) +{ + struct fs_quota_statv *qs = ptr; + long out_arg = (long) arg; + + if (((rc != 0) && out_arg) || (out_arg > 1)) { + printf("%p", qs); + return; + } + + PRINT_FIELD_D("{", qs, qs_version); + +# if VERBOSE + printf(", qs_flags="); + printflags(xfs_quota_flags, qs->qs_flags, "XFS_QUOTA_???"); + PRINT_FIELD_U(", ", qs, qs_incoredqs); + PRINT_FIELD_U(", qs_uquota={", &qs->qs_uquota, qfs_ino); + PRINT_FIELD_U(", ", &qs->qs_uquota, qfs_nblks); + PRINT_FIELD_U(", ", &qs->qs_uquota, qfs_nextents); + PRINT_FIELD_U("}, qs_gquota={", &qs->qs_gquota, qfs_ino); + PRINT_FIELD_U(", ", &qs->qs_gquota, qfs_nblks); + PRINT_FIELD_U(", ", &qs->qs_gquota, qfs_nextents); + PRINT_FIELD_U("}, qs_pquota={", &qs->qs_pquota, qfs_ino); + PRINT_FIELD_U(", ", &qs->qs_pquota, qfs_nblks); + PRINT_FIELD_U(", ", &qs->qs_pquota, qfs_nextents); + PRINT_FIELD_D("}, ", qs, qs_btimelimit); + PRINT_FIELD_D(", ", qs, qs_itimelimit); + PRINT_FIELD_D(", ", qs, qs_rtbtimelimit); + PRINT_FIELD_U(", ", qs, qs_bwarnlimit); + PRINT_FIELD_U(", ", qs, qs_iwarnlimit); +# else + printf(", ..."); +# endif /* !VERBOSE */ + printf("}"); +} + +int +main(void) +{ + char *bogus_special = (char *) tail_alloc(1) + 1; + void *bogus_addr = (char *) tail_alloc(1) + 1; + + char bogus_special_str[sizeof(void *) * 2 + sizeof("0x")]; + char bogus_addr_str[sizeof(void *) * 2 + sizeof("0x")]; + char unterminated_str[sizeof(void *) * 2 + sizeof("0x")]; + + long rc; + struct fs_disk_quota *xdq = tail_alloc(sizeof(*xdq)); + struct fs_quota_stat *xqstat = tail_alloc(sizeof(*xqstat)); + struct fs_quota_statv *xqstatv = tail_alloc(sizeof(*xqstatv)); + uint32_t *flags = tail_alloc(sizeof(*flags)); + char *unterminated = tail_memdup(unterminated_data, + sizeof(unterminated_data)); + + snprintf(bogus_special_str, sizeof(bogus_special_str), "%p", + bogus_special); + snprintf(bogus_addr_str, sizeof(bogus_addr_str), "%p", + bogus_addr); + snprintf(unterminated_str, sizeof(unterminated_str), "%p", + unterminated); + + + /* Q_XQUOTAON */ + + *flags = 0xdeadbeef; + + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_XQUOTAON, USRQUOTA)), + ARG_STR("/dev/bogus/"), flags, + "[XFS_QUOTA_UDQ_ACCT|XFS_QUOTA_UDQ_ENFD" + "|XFS_QUOTA_GDQ_ACCT|XFS_QUOTA_GDQ_ENFD" + "|XFS_QUOTA_PDQ_ENFD|0xdeadbec0]"); + + rc = syscall(__NR_quotactl, QCMD(Q_XQUOTAON, 0xfacefeed), bogus_dev, + bogus_id, bogus_addr); + printf("quotactl(QCMD(Q_XQUOTAON, %#x /* ???QUOTA */)" + ", %s, %p) = %s\n", + QCMD_TYPE(QCMD(Q_XQUOTAON, 0xfacefeed)), + bogus_dev_str, bogus_addr, sprintrc(rc)); + + + /* Q_XQUOTAOFF */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_XQUOTAOFF, USRQUOTA)), + bogus_special, bogus_special_str, + bogus_addr, bogus_addr_str); + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_XQUOTAOFF, GRPQUOTA)), + ARG_STR("/dev/bogus/"), + ARG_STR(NULL)); + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + QCMD(Q_XQUOTAOFF, 3), + "QCMD(Q_XQUOTAOFF, 0x3 /* ???QUOTA */)", + ARG_STR("/dev/bogus/"), flags, + "[XFS_QUOTA_UDQ_ACCT|XFS_QUOTA_UDQ_ENFD" + "|XFS_QUOTA_GDQ_ACCT|XFS_QUOTA_GDQ_ENFD" + "|XFS_QUOTA_PDQ_ENFD|0xdeadbec0]"); + + + /* Q_XGETQUOTA */ + + /* Trying our best to get successful result */ + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_GETQUOTA, USRQUOTA)), + ARG_STR("/dev/sda1"), getuid(), xdq, print_xdisk_quota, + (intptr_t) 1); + + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_GETQUOTA, GRPQUOTA)), + ARG_STR(NULL), -1, xdq, print_xdisk_quota, (intptr_t) 2); + + + /* Q_XGETNEXTQUOTA */ + + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_XGETNEXTQUOTA, USRQUOTA)), + ARG_STR("/dev/sda1"), 0, xdq, print_xdisk_quota, + (intptr_t) 1); + + + /* Q_XSETQLIM */ + + check_quota(CQF_NONE, ARG_STR(QCMD(Q_XSETQLIM, PRJQUOTA)), + bogus_special, bogus_special_str, 0, bogus_addr); + + fill_memory_ex(xdq, sizeof(*xdq), 0x8e, 0x80); + + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_XSETQLIM, PRJQUOTA)), + bogus_dev, bogus_dev_str, 3141592653U, + xdq, print_xdisk_quota, (intptr_t) 0); + + + /* Q_XGETQSTAT */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_XGETQSTAT, USRQUOTA)), + ARG_STR("/dev/sda1"), xqstat, print_xquota_stat, (intptr_t) 1); + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_XGETQSTATV, PRJQUOTA)), + unterminated, unterminated_str, + xqstat + 1, print_xquota_stat, (intptr_t) 2); + + + /* Q_XGETQSTATV */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_XGETQSTAT, USRQUOTA)), + ARG_STR("/dev/sda1"), xqstatv, print_xquota_statv, 1); + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_XGETQSTATV, GRPQUOTA)), + ARG_STR(NULL), xqstatv, print_xquota_statv, (intptr_t) 2); + + + /* Q_XQUOTARM */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_XQUOTARM, PRJQUOTA)), + bogus_special, bogus_special_str, ARG_STR(NULL)); + check_quota(CQF_ID_SKIP, + ARG_STR(QCMD(Q_XQUOTARM, USRQUOTA)), + unterminated, unterminated_str, flags + 1); + + *flags = 0xdeadbeef; + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_XQUOTARM, GRPQUOTA)), + ARG_STR(NULL), flags, + "[XFS_USER_QUOTA|XFS_PROJ_QUOTA" + "|XFS_GROUP_QUOTA|0xdeadbee8]"); + + + /* Q_XQUOTASYNC */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + ARG_STR(QCMD(Q_XQUOTASYNC, USRQUOTA)), + bogus_special, bogus_special_str); + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + QCMD(Q_XQUOTASYNC, 0xfff), + "QCMD(Q_XQUOTASYNC, 0xff /* ???QUOTA */)", + ARG_STR(NULL)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_quotactl && " + "(HAVE_LINUX_QUOTA_H || HAVE_SYS_QUOTA_H) && " + "HAVE_LINUX_DQBLK_XFS_H"); + +#endif diff --git a/tests-m32/quotactl-xfs.test b/tests-m32/quotactl-xfs.test new file mode 100755 index 000000000..404a73724 --- /dev/null +++ b/tests-m32/quotactl-xfs.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of quotactl xfs subcommands. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=quotactl diff --git a/tests-m32/quotactl.c b/tests-m32/quotactl.c new file mode 100644 index 000000000..3a7c11323 --- /dev/null +++ b/tests-m32/quotactl.c @@ -0,0 +1,320 @@ +/* + * Check decoding of quotactl syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_quotactl) && \ + (defined(HAVE_LINUX_QUOTA_H) || defined(HAVE_SYS_QUOTA_H)) + +# include +# include +# include +# include +# include + +# include "quotactl.h" + +# ifndef HAVE_LINUX_QUOTA_H +/* Some dirty hacks in order to make sys/quota.h usable as a backup */ + +# define if_dqblk dqblk +# define if_nextdqblk nextdqblk +# define if_dqinfo dqinfo + +# endif /* !HAVE_LINUX_QUOTA_H */ + +# ifndef Q_GETNEXTQUOTA + +# define Q_GETNEXTQUOTA 0x800009 + +struct if_nextdqblk { + uint64_t dqb_bhardlimit; + uint64_t dqb_bsoftlimit; + uint64_t dqb_curspace; + uint64_t dqb_ihardlimit; + uint64_t dqb_isoftlimit; + uint64_t dqb_curinodes; + uint64_t dqb_btime; + uint64_t dqb_itime; + uint32_t dqb_valid; + uint32_t dqb_id; +}; +# endif /* !Q_GETNEXTQUOTA */ + +# include "xlat.h" +# include "xlat/quota_formats.h" +# include "xlat/if_dqblk_valid.h" +# include "xlat/if_dqinfo_flags.h" +# include "xlat/if_dqinfo_valid.h" + +void +print_dqblk(long rc, void *ptr, void *arg) +{ + struct if_dqblk *db = ptr; + long out_arg = (long) arg; + + if (((rc != 0) && out_arg) || (out_arg > 1)) { + printf("%p", db); + return; + } + + PRINT_FIELD_U("{", db, dqb_bhardlimit); + PRINT_FIELD_U(", ", db, dqb_bsoftlimit); + PRINT_FIELD_U(", ", db, dqb_curspace); + PRINT_FIELD_U(", ", db, dqb_ihardlimit); + PRINT_FIELD_U(", ", db, dqb_isoftlimit); + PRINT_FIELD_U(", ", db, dqb_curinodes); + +# if VERBOSE + PRINT_FIELD_U(", ", db, dqb_btime); + PRINT_FIELD_U(", ", db, dqb_itime); + + printf(", dqb_valid="); + printflags(if_dqblk_valid, db->dqb_valid, "QIF_???"); +# else + printf(", ..."); +# endif /* !VERBOSE */ + printf("}"); +} + +void +print_nextdqblk(long rc, void *ptr, void *arg) +{ + struct if_nextdqblk *db = ptr; + long out_arg = (long) arg; + + if (((rc != 0) && out_arg) || (out_arg > 1)) { + printf("%p", db); + return; + } + + PRINT_FIELD_U("{", db, dqb_bhardlimit); + PRINT_FIELD_U(", ", db, dqb_bsoftlimit); + PRINT_FIELD_U(", ", db, dqb_curspace); + PRINT_FIELD_U(", ", db, dqb_ihardlimit); + PRINT_FIELD_U(", ", db, dqb_isoftlimit); + PRINT_FIELD_U(", ", db, dqb_curinodes); + +# if VERBOSE + PRINT_FIELD_U(", ", db, dqb_btime); + PRINT_FIELD_U(", ", db, dqb_itime); + + printf(", dqb_valid="); + printflags(if_dqblk_valid, db->dqb_valid, "QIF_???"); + + PRINT_FIELD_U(", ", db, dqb_id); +# else + PRINT_FIELD_U(", ", db, dqb_id); + printf(", ..."); +# endif /* !VERBOSE */ + printf("}"); +} + +void +print_dqinfo(long rc, void *ptr, void *arg) +{ + struct if_dqinfo *di = ptr; + long out_arg = (long) arg; + + if (((rc != 0) && out_arg) || (out_arg > 1)) { + printf("%p", di); + return; + } + + PRINT_FIELD_U("{", di, dqi_bgrace); + PRINT_FIELD_U(", ", di, dqi_igrace); + + printf(", dqi_flags="); + printflags(if_dqinfo_flags, di->dqi_flags, "DQF_???"); + printf(", dqi_valid="); + printflags(if_dqinfo_valid, di->dqi_valid, "IIF_???"); + printf("}"); +} + + +int +main(void) +{ + char *bogus_special = (char *) tail_alloc(1) + 1; + void *bogus_addr = (char *) tail_alloc(1) + 1; + + char bogus_special_str[sizeof(void *) * 2 + sizeof("0x")]; + char unterminated_str[sizeof(void *) * 2 + sizeof("0x")]; + + long rc; + char *unterminated = tail_memdup(unterminated_data, + sizeof(unterminated_data)); + struct if_dqblk *dqblk = tail_alloc(sizeof(*dqblk)); + struct if_dqinfo *dqinfo = tail_alloc(sizeof(*dqinfo)); + uint32_t *fmt = tail_alloc(sizeof(*fmt)); + struct if_nextdqblk *nextdqblk = tail_alloc(sizeof(*nextdqblk)); + + + snprintf(bogus_special_str, sizeof(bogus_special_str), "%p", + bogus_special); + snprintf(unterminated_str, sizeof(unterminated_str), "%p", + unterminated); + + + /* Invalid commands */ + + rc = syscall(__NR_quotactl, bogus_cmd, bogus_special, bogus_id, + bogus_addr); + printf("quotactl(QCMD(%#x /* Q_??? */, %#x /* ???QUOTA */)" + ", %p, %u, %p) = %s\n", + QCMD_CMD(bogus_cmd), QCMD_TYPE(bogus_cmd), + bogus_special, bogus_id, bogus_addr, sprintrc(rc)); + + rc = syscall(__NR_quotactl, 0, NULL, -1, NULL); + printf("quotactl(QCMD(0 /* Q_??? */, USRQUOTA), NULL, -1, NULL) = %s\n", + sprintrc(rc)); + + + /* Q_QUOTAON */ + + check_quota(CQF_ID_STR | CQF_ADDR_STR, + ARG_STR(QCMD(Q_QUOTAON, USRQUOTA)), + ARG_STR("/dev/bogus/"), ARG_STR(QFMT_VFS_OLD), + ARG_STR("/tmp/bogus/")); + + rc = syscall(__NR_quotactl, QCMD(Q_QUOTAON, 0xfacefeed), bogus_dev, + bogus_id, bogus_addr); + printf("quotactl(QCMD(Q_QUOTAON, %#x /* ???QUOTA */)" + ", %s, %#x /* QFMT_VFS_??? */, %p) = %s\n", + QCMD_TYPE(QCMD(Q_QUOTAON, 0xfacefeed)), + bogus_dev_str, bogus_id, bogus_addr, sprintrc(rc)); + + + /* Q_QUOTAOFF */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + ARG_STR(QCMD(Q_QUOTAOFF, USRQUOTA)), + bogus_special, bogus_special_str); + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + ARG_STR(QCMD(Q_QUOTAOFF, GRPQUOTA)), + ARG_STR("/dev/bogus/")); + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + ARG_STR(QCMD(Q_QUOTAOFF, PRJQUOTA)), ARG_STR(NULL)); + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + QCMD(Q_QUOTAOFF, 3), "QCMD(Q_QUOTAOFF, 0x3 /* ???QUOTA */)", + ARG_STR(NULL)); + + + /* Q_GETQUOTA */ + + /* Trying our best to get successful result */ + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_GETQUOTA, USRQUOTA)), + ARG_STR("/dev/sda1"), getuid(), dqblk, print_dqblk, + (intptr_t) 1); + + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_GETQUOTA, GRPQUOTA)), + ARG_STR(NULL), -1, dqblk, print_dqblk, (intptr_t) 2); + + + /* Q_GETNEXTQUOTA */ + + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_GETNEXTQUOTA, USRQUOTA)), + ARG_STR("/dev/sda1"), 0, nextdqblk, print_nextdqblk, + (intptr_t) 1); + + + /* Q_SETQUOTA */ + + fill_memory(dqblk, sizeof(*dqblk)); + + check_quota(CQF_NONE, ARG_STR(QCMD(Q_SETQUOTA, PRJQUOTA)), + bogus_special, bogus_special_str, 0, bogus_addr); + + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_SETQUOTA, PRJQUOTA)), + ARG_STR("/dev/bogus/"), 3141592653U, dqblk, print_dqblk, + (intptr_t) 0); + + + /* Q_GETINFO */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_GETINFO, GRPQUOTA)), + ARG_STR("/dev/sda1"), dqinfo, print_dqinfo, (intptr_t) 1); + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_GETINFO, GRPQUOTA)), + bogus_special, bogus_special_str, dqinfo, + print_dqinfo, (intptr_t) 2); + + /* Q_SETINFO */ + + fill_memory(dqinfo, sizeof(*dqinfo)); + /* In order to check flag printing correctness */ + dqinfo->dqi_flags = 0xdeadabcd; + + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_SETINFO, PRJQUOTA)), + bogus_special, bogus_special_str, ARG_STR(NULL)); + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_SETINFO, USRQUOTA)), + ARG_STR("/dev/bogus/"), dqinfo, print_dqinfo, (intptr_t) 0); + + + /* Q_GETFMT */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_GETFMT, PRJQUOTA)), + bogus_special, bogus_special_str, ARG_STR(NULL)); + check_quota(CQF_ID_SKIP, + ARG_STR(QCMD(Q_GETFMT, USRQUOTA)), + unterminated, unterminated_str, fmt + 1); + check_quota(CQF_ID_SKIP, + ARG_STR(QCMD(Q_GETFMT, GRPQUOTA)), + ARG_STR("/dev/sda1"), fmt); + + + /* Q_SYNC */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + ARG_STR(QCMD(Q_SYNC, USRQUOTA)), + bogus_special, bogus_special_str); + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + QCMD(Q_SYNC, 0xfff), "QCMD(Q_SYNC, 0xff /* ???QUOTA */)", + ARG_STR(NULL)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_quotactl && " + "(HAVE_LINUX_QUOTA_H || HAVE_SYS_QUOTA_H)"); + +#endif diff --git a/tests-m32/quotactl.h b/tests-m32/quotactl.h new file mode 100644 index 000000000..31eaec586 --- /dev/null +++ b/tests-m32/quotactl.h @@ -0,0 +1,166 @@ +/* + * Common definitions for Linux and XFS quota tests. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef STRACE_TESTS_QUOTACTL_H +#define STRACE_TESTS_QUOTACTL_H + +# include +# include +# include + +# ifdef HAVE_LINUX_QUOTA_H +/* Broken in CentOS 5: has extern spinlock_t dq_data_lock; declaration */ +# include +# else +# include +/* Broken in some new glibc versions: have Q_GETNEXTQUOTA definition but no + * struct nextdqblk defined. Fixed in glibc-2.24-106-g4d72808. */ +# include +# endif + +# ifndef QCMD_CMD +# define QCMD_CMD(_val) ((unsigned) (_val) >> SUBCMDSHIFT) +# endif /* !QCMD_CMD */ + +# ifndef QCMD_TYPE +# define QCMD_TYPE(_val) ((unsigned) (_val) & SUBCMDMASK) +# endif /* !QCMD_TYPE */ + +# ifndef PRJQUOTA +# define PRJQUOTA 2 +# endif + +# define PRINT_FIELD_D(prefix, where, field) \ + printf("%s%s=%lld", (prefix), #field, \ + sign_extend_unsigned_to_ll((where)->field)) + +# define PRINT_FIELD_U(prefix, where, field) \ + printf("%s%s=%llu", (prefix), #field, \ + zero_extend_signed_to_ull((where)->field)) + +# define PRINT_FIELD_X(prefix, where, field) \ + printf("%s%s=%#llx", (prefix), #field, \ + zero_extend_signed_to_ull((where)->field)) + +typedef void (*print_cb)(long rc, void *addr, void *arg); + +enum check_quotactl_flag_bits { + CQF_ID_SKIP_BIT, + CQF_ID_STR_BIT, + CQF_ADDR_SKIP_BIT, + CQF_ADDR_STR_BIT, + CQF_ADDR_CB_BIT, +}; + +enum check_quotactl_flags { + CQF_NONE, + CQF_ID_SKIP = 1 << CQF_ID_SKIP_BIT, + CQF_ID_STR = 1 << CQF_ID_STR_BIT, + CQF_ADDR_SKIP = 1 << CQF_ADDR_SKIP_BIT, + CQF_ADDR_STR = 1 << CQF_ADDR_STR_BIT, + CQF_ADDR_CB = 1 << CQF_ADDR_CB_BIT, +}; + + +static inline void +check_quota(uint32_t flags, int cmd, const char *cmd_str, + const char *special, const char *special_str, ...) +{ + long rc; + const char *addr_str = NULL; + const char *id_str = NULL; + void *addr = NULL; + print_cb addr_cb = NULL; + void *addr_cb_arg = NULL; + uint32_t id = -1; + + va_list ap; + + va_start(ap, special_str); + + if (!(flags & CQF_ID_SKIP)) { + id = va_arg(ap, uint32_t); + + if (flags & CQF_ID_STR) + id_str = va_arg(ap, const char *); + } + + if (!(flags & CQF_ADDR_SKIP)) { + addr = va_arg(ap, void *); + + if (flags & CQF_ADDR_CB) { + addr_cb = va_arg(ap, print_cb); + addr_cb_arg = va_arg(ap, void *); + } else if (flags & CQF_ADDR_STR) { + addr_str = va_arg(ap, const char *); + } + } + + va_end(ap); + + rc = syscall(__NR_quotactl, cmd, special, id, addr); + printf("quotactl(%s, %s", cmd_str, special_str); + + if (!(flags & CQF_ID_SKIP)) { + if (flags & CQF_ID_STR) { + printf(", %s", id_str); + } else { + if (id == (uint32_t)-1) + printf(", -1"); + else + printf(", %u", id); + } + } + + if (!(flags & CQF_ADDR_SKIP)) { + if (flags & CQF_ADDR_CB) { + printf(", "); + addr_cb(rc, addr, addr_cb_arg); + } else if (flags & CQF_ADDR_STR) { + printf(", %s", addr_str); + } else { + printf(", %p", addr); + } + } + + printf(") = %s\n", sprintrc(rc)); +} + + +static const int bogus_cmd = 0xbadc0ded; +static const int bogus_id = 0xca7faced; + +/* It is invalid anyway due to the slash in the end */ +static const char *bogus_dev = "/dev/bogus/"; +static const char *bogus_dev_str = "\"/dev/bogus/\""; + +static const char unterminated_data[] = { '\1', '\2', '\3' }; + +#endif /* !STRACE_TESTS_QUOTACTL_H */ diff --git a/tests-m32/quotactl.test b/tests-m32/quotactl.test new file mode 100755 index 000000000..d0101f466 --- /dev/null +++ b/tests-m32/quotactl.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of quotactl syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/read-write.c b/tests-m32/read-write.c new file mode 100644 index 000000000..262e07b5b --- /dev/null +++ b/tests-m32/read-write.c @@ -0,0 +1,224 @@ +/* + * Check decoding and dumping of read and write syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +static void +dump_str(const char *str, const unsigned int len) +{ + static const char dots[16] = "................"; + unsigned int i; + + for (i = 0; i < len; i += 16) { + unsigned int n = len - i > 16 ? 16 : len - i; + const char *dump = hexdump_memdup(str + i, n); + + tprintf(" | %05x %-49s %-16.*s |\n", + i, dump, n, dots); + + free((void *) dump); + } +} + +static void +print_hex(const char *str, const unsigned int len) +{ + const unsigned char *ustr = (const unsigned char *) str; + unsigned int i; + + for (i = 0; i < len; ++i) { + unsigned int c = ustr[i]; + + switch (c) { + case '\t': + tprintf("\\t"); break; + case '\n': + tprintf("\\n"); break; + case '\v': + tprintf("\\v"); break; + case '\f': + tprintf("\\f"); break; + case '\r': + tprintf("\\r"); break; + default: + tprintf("\\%o", ustr[i]); + } + } +} + +static long +k_read(unsigned int fd, void *buf, size_t count) +{ + kernel_ulong_t kfd = (kernel_ulong_t) 0xfacefeed00000000ULL | fd; + return syscall(__NR_read, kfd, buf, count); +} + +static long +k_write(unsigned int fd, const void *buf, size_t count) +{ + kernel_ulong_t kfd = (kernel_ulong_t) 0xfacefeed00000000ULL | fd; + return syscall(__NR_write, kfd, buf, count); +} + +static void +test_dump(const unsigned int len) +{ + static char *buf; + + if (buf) { + size_t ps1 = get_page_size() - 1; + buf = (void *) (((size_t) buf + ps1) & ~ps1) - len; + } else { + buf = tail_alloc(len); + } + + long rc = k_read(0, buf, len); + if (rc != (int) len) + perror_msg_and_fail("read: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "read", 0); + print_hex(buf, len); + tprintf("\", %d) = %ld\n", len, rc); + dump_str(buf, len); + + unsigned int i; + for (i = 0; i < len; ++i) + buf[i] = i; + + rc = k_write(1, buf, len); + if (rc != (int) len) + perror_msg_and_fail("write: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "write", 1); + print_hex(buf, len); + tprintf("\", %d) = %ld\n", len, rc); + dump_str(buf, len); + + if (!len) + buf = 0; +} + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "read-write-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + + static const char w_c[] = "0123456789abcde"; + const unsigned int w_len = LENGTH_OF(w_c); + const char *w_d = hexdump_strdup(w_c); + const void *w = tail_memdup(w_c, w_len); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + const unsigned int r0_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r0_len); + + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + const unsigned int r1_len = w_len - r0_len; + void *r1 = tail_alloc(w_len); + + void *efault = r1 - get_page_size(); + + long rc; + + rc = k_write(1, w, 0); + if (rc) + perror_msg_and_fail("write: expected 0, returned %ld", rc); + tprintf("write(1, \"\", 0) = 0\n"); + + rc = k_write(1, efault, 1); + if (rc != -1) + perror_msg_and_fail("write: expected -1 EFAULT" + ", returned %ld", rc); + tprintf("write(1, %p, 1) = -1 EFAULT (%m)\n", efault); + + rc = k_write(1, w, w_len); + if (rc != (int) w_len) + perror_msg_and_fail("write: expected %u, returned %ld", + w_len, rc); + tprintf("write(1, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + w_c, w_len, rc, w_d, w_c); + close(1); + + rc = k_read(0, r0, 0); + if (rc) + perror_msg_and_fail("read: expected 0, returned %ld", rc); + tprintf("read(0, \"\", 0) = 0\n"); + + rc = k_read(0, efault, 1); + if (rc != -1) + perror_msg_and_fail("read: expected -1, returned %ld", rc); + tprintf("read(0, %p, 1) = -1 EFAULT (%m)\n", efault); + + rc = k_read(0, r0, r0_len); + if (rc != (int) r0_len) + perror_msg_and_fail("read: expected %u, returned %ld", + r0_len, rc); + tprintf("read(0, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r0_c, r0_len, rc, r0_d, r0_c); + + rc = k_read(0, r1, w_len); + if (rc != (int) r1_len) + perror_msg_and_fail("read: expected %u, returned %ld", + r1_len, rc); + tprintf("read(0, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r1_c, w_len, rc, r1_d, r1_c); + close(0); + + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (open("/dev/null", O_WRONLY) != 1) + perror_msg_and_fail("open"); + + unsigned int i; + for (i = 0; i <= 32; ++i) + test_dump(i); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests-m32/read-write.test b/tests-m32/read-write.test new file mode 100755 index 000000000..3700541fa --- /dev/null +++ b/tests-m32/read-write.test @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check decoding and dumping of read and write syscalls. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +tmpfile=read-write-tmpfile +> $tmpfile + +run_strace_match_diff \ + -a15 -eread=0 -ewrite=1 -e trace=read,write \ + -P $tmpfile -P /dev/zero -P /dev/null + +rm -f $tmpfile diff --git a/tests-m32/readahead.c b/tests-m32/readahead.c new file mode 100644 index 000000000..c11b577d2 --- /dev/null +++ b/tests-m32/readahead.c @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef HAVE_READAHEAD +/* Check for glibc readahead argument passing bugs. */ +# ifdef __GLIBC__ +/* + * glibc < 2.8 had an incorrect order of higher and lower parts of offset, + * see https://sourceware.org/bugzilla/show_bug.cgi?id=5208 + */ +# if !(defined __GLIBC_MINOR__ && \ + (__GLIBC__ << 16) + __GLIBC_MINOR__ >= (2 << 16) + 8) +# undef HAVE_READAHEAD +# endif /* glibc < 2.8 */ +/* + * glibc < 2.25 had an incorrect implementation on mips n64, + * see https://sourceware.org/bugzilla/show_bug.cgi?id=21026 + */ +# if defined LINUX_MIPSN64 && !(defined __GLIBC_MINOR__ && \ + (__GLIBC__ << 16) + __GLIBC_MINOR__ >= (2 << 16) + 25) +# undef HAVE_READAHEAD +# endif /* LINUX_MIPSN64 && glibc < 2.25 */ +# endif /* __GLIBC__ */ +#endif /* HAVE_READAHEAD */ + +#ifdef HAVE_READAHEAD + +# include +# include + +static const int fds[] = { + -0x80000000, + -100, + -1, + 0, + 1, + 2, + 0x7fffffff, +}; + +static const off64_t offsets[] = { + -0x8000000000000000LL, + -0x5060708090a0b0c0LL, + -1LL, + 0, + 1, + 0xbadfaced, + 0x7fffffffffffffffLL, +}; + +static const unsigned long counts[] = { + 0UL, + 0xdeadca75, + (unsigned long) 0xface1e55beeff00dULL, + (unsigned long) 0xffffffffffffffffULL, +}; + +int +main(void) +{ + unsigned i; + unsigned j; + unsigned k; + ssize_t rc; + + for (i = 0; i < ARRAY_SIZE(fds); i++) + for (j = 0; j < ARRAY_SIZE(offsets); j++) + for (k = 0; k < ARRAY_SIZE(counts); k++) { + rc = readahead(fds[i], offsets[j], counts[k]); + + printf("readahead(%d, %lld, %lu) = %s\n", + fds[i], (long long) offsets[j], + counts[k], sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_READAHEAD") + +#endif diff --git a/tests-m32/readahead.test b/tests-m32/readahead.test new file mode 100755 index 000000000..397c6903f --- /dev/null +++ b/tests-m32/readahead.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check readahead syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a1 diff --git a/tests-m32/readdir.c b/tests-m32/readdir.c new file mode 100644 index 000000000..8c4836200 --- /dev/null +++ b/tests-m32/readdir.c @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_readdir + +# include +# include +# include +# include +# include +# include +# include + +static const char fname[] = + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nZ"; +static const char qname[] = + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nZ"; + +int +main(int ac, const char **av) +{ + char *dname; + struct { + unsigned long d_ino; + unsigned long d_off; + unsigned short d_reclen; + char d_name[1024]; + } e; + int rc; + + assert(ac == 1); + assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); + assert(!mkdir(dname, 0700)); + assert(!chdir(dname)); + (void) close(0); + assert(!creat(fname, 0600)); + assert(!close(0)); + assert(!open(".", O_RDONLY | O_DIRECTORY)); + while ((rc = syscall(__NR_readdir, 0, &e, 1))) { + if (rc < 0) + perror_msg_and_skip("readdir"); + e.d_name[e.d_reclen] = '\0'; + printf("readdir(0, {d_ino=%lu, d_off=%lu, d_reclen=%u" + ", d_name=\"%s\"}) = %d\n", + e.d_ino, e.d_off, e.d_reclen, + e.d_name[0] == '.' ? e.d_name : qname, rc); + } + printf("readdir(0, %p) = 0\n", &e); + puts("+++ exited with 0 +++"); + assert(!unlink(fname)); + assert(!chdir("..")); + assert(!rmdir(dname)); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_readdir") + +#endif diff --git a/tests-m32/readdir.test b/tests-m32/readdir.test new file mode 100755 index 000000000..e3132737f --- /dev/null +++ b/tests-m32/readdir.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check readdir syscall decoding. + +. "${srcdir=.}/init.sh" + +rm -rf -- "$LOG".dir +run_strace_match_diff -a16 diff --git a/tests-m32/readlink.c b/tests-m32/readlink.c new file mode 100644 index 000000000..4ddf5fac3 --- /dev/null +++ b/tests-m32/readlink.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2015 Gleb Fotengauer-Malinovskiy + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_readlink + +# include +# include + +# define PREFIX "test.readlink" +# define TARGET (PREFIX ".target") +# define LINKPATH (PREFIX ".link") + +int +main(void) +{ + const char * const fname = tail_memdup(LINKPATH, sizeof(LINKPATH)); + const char * const hex_fname = + hexquote_strndup(fname, sizeof(LINKPATH) - 1); + + const unsigned int size = sizeof(TARGET) - 1; + char * const buf = tail_alloc(size); + + (void) unlink(fname); + + long rc = syscall(__NR_readlink, fname, buf, size); + printf("readlink(\"%s\", %p, %u) = -1 ENOENT (%m)\n", + hex_fname, buf, size); + + if (symlink(TARGET, fname)) + perror_msg_and_fail("symlink"); + + rc = syscall(__NR_readlink, fname, buf, size); + if (rc < 0) { + perror("readlink"); + (void) unlink(fname); + return 77; + } + const char * const hex_buf = hexquote_strndup(buf, size); + printf("readlink(\"%s\", \"%s\", %u) = %u\n", + hex_fname, hex_buf, size, size); + + if (unlink(fname)) + perror_msg_and_fail("unlink"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_readlink") + +#endif diff --git a/tests-m32/readlink.test b/tests-m32/readlink.test new file mode 100755 index 000000000..c026ecbed --- /dev/null +++ b/tests-m32/readlink.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check readlink syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -xx diff --git a/tests-m32/readlinkat.c b/tests-m32/readlinkat.c new file mode 100644 index 000000000..4d3b516cb --- /dev/null +++ b/tests-m32/readlinkat.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2015 Gleb Fotengauer-Malinovskiy + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_readlinkat + +# include +# include + +# define PREFIX "test.readlinkat" +# define TARGET (PREFIX ".target") +# define LINKPATH (PREFIX ".link") + +int +main(void) +{ + const char * const fname = tail_memdup(LINKPATH, sizeof(LINKPATH)); + const char * const hex_fname = + hexquote_strndup(fname, sizeof(LINKPATH) - 1); + + const unsigned int size = sizeof(TARGET) - 1; + char * const buf = tail_alloc(size); + + (void) unlink(fname); + + long rc = syscall(__NR_readlinkat, -100, fname, buf, size); + printf("readlinkat(AT_FDCWD, \"%s\", %p, %u) = -1 ENOENT (%m)\n", + hex_fname, buf, size); + + if (symlink(TARGET, fname)) + perror_msg_and_fail("symlink"); + + rc = syscall(__NR_readlinkat, -100, fname, buf, size); + if (rc < 0) { + perror("readlinkat"); + (void) unlink(fname); + return 77; + } + const char * const hex_buf = hexquote_strndup(buf, size); + printf("readlinkat(AT_FDCWD, \"%s\", \"%s\", %u) = %u\n", + hex_fname, hex_buf, size, size); + + if (unlink(fname)) + perror_msg_and_fail("unlink"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_readlink") + +#endif diff --git a/tests-m32/readlinkat.test b/tests-m32/readlinkat.test new file mode 100755 index 000000000..229c8e1e6 --- /dev/null +++ b/tests-m32/readlinkat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check readlinkat syscall decoding. + +. "${srcdir=.}/readlink.test" diff --git a/tests-m32/readv.c b/tests-m32/readv.c new file mode 100644 index 000000000..0e5aab65c --- /dev/null +++ b/tests-m32/readv.c @@ -0,0 +1,157 @@ +/* + * Check decoding of readv and writev syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + pipe_maxfd(fds); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + const void *efault = w0 + LENGTH_OF(w0_c); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + long rc; + + rc = writev(fds[1], efault, 42); + tprintf("writev(%d, %p, 42) = %ld %s (%m)\n", + fds[1], efault, rc, errno2name()); + + rc = readv(fds[0], efault, 42); + tprintf("readv(%d, %p, 42) = %ld %s (%m)\n", + fds[0], efault, rc, errno2name()); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + tprintf("writev(%d, [], 0) = %ld\n", + fds[1], (long) writev(fds[1], w_iov, 0)); + + rc = writev(fds[1], w_iov + ARRAY_SIZE(w_iov_) - 1, 2); + tprintf("writev(%d, [{iov_base=\"%s\", iov_len=%u}, %p], 2)" + " = %ld %s (%m)\n", + fds[1], w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + assert(writev(fds[1], w_iov, ARRAY_SIZE(w_iov_)) == (int) w_len); + close(fds[1]); + tprintf("writev(%d, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + fds[1], w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + assert(readv(fds[0], r_iov, ARRAY_SIZE(r0_iov_)) == (int) r_len); + tprintf("readv(%d, [{iov_base=\"%s\", iov_len=%u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + fds[0], + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + assert(readv(fds[0], r_iov, ARRAY_SIZE(r1_iov_)) == (int) w_len - (int) r_len); + tprintf("readv(%d, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"\", iov_len=%u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + fds[0], r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(fds[0]); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests-m32/readv.test b/tests-m32/readv.test new file mode 100755 index 000000000..dc187996f --- /dev/null +++ b/tests-m32/readv.test @@ -0,0 +1,65 @@ +#!/bin/sh +# +# Check decoding and dumping of readv and writev syscalls. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread=all -ewrite='!none' +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread='!none' -ewrite=all +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread=none -ewrite='!all' -eread='!0,1,2' -ewrite='!0,1,2' +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread='!all' -ewrite=none -eread='!0,1,2' -ewrite='!0,1,2' + +wfd="$(./print_maxfd)" +rfd="$(($wfd - 1))" +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread="$rfd" -ewrite="$wfd" +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread="!$rfd" -ewrite="!$wfd" -eread="$rfd" -ewrite="$wfd" + +rfds='!!!0' +[ $rfd -lt 1023 ] || rfd=1023 +i=0 +while [ $i -lt $rfd ]; do + rfds="$rfds,$i" + i=$(($i + 1)) +done + +wfds='!!!0' +[ $wfd -lt 1023 ] || wfd=1023 +i=0 +while [ $i -lt $wfd ]; do + wfds="$wfds,$i" + i=$(($i + 1)) +done + +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread="$rfds" -ewrite="$wfds" diff --git a/tests-m32/reboot.c b/tests-m32/reboot.c new file mode 100644 index 000000000..9b09e647e --- /dev/null +++ b/tests-m32/reboot.c @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#ifdef __NR_reboot + +# include +# include +# include + +# define INVALID_MAGIC 319887762 +# define INVALID_CMD 0x01234568 + +int +main(void) +{ + static const char buf[] = "reboot"; + long rc = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, \ + INVALID_MAGIC, LINUX_REBOOT_CMD_RESTART2, buf); + printf("reboot(LINUX_REBOOT_MAGIC1, %#x /* LINUX_REBOOT_MAGIC_??? */," + " LINUX_REBOOT_CMD_RESTART2, \"%s\") = %ld %s (%m)\n", + INVALID_MAGIC, buf, rc, errno2name()); + + rc = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, \ + LINUX_REBOOT_MAGIC2, INVALID_CMD); + printf("reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2," + " %#x /* LINUX_REBOOT_CMD_??? */) = %ld %s (%m)\n", + INVALID_CMD, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_reboot") + +#endif diff --git a/tests-m32/reboot.test b/tests-m32/reboot.test new file mode 100755 index 000000000..a97dd21ab --- /dev/null +++ b/tests-m32/reboot.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check reboot syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/recvfrom.c b/tests-m32/recvfrom.c new file mode 100644 index 000000000..b12454d2b --- /dev/null +++ b/tests-m32/recvfrom.c @@ -0,0 +1,89 @@ +/* + * Check decoding of sockaddr related arguments of recvfrom syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define TEST_SYSCALL_NAME recvfrom +#define TEST_SYSCALL_PREPARE send_un() +#define PREFIX_S_ARGS , recv_buf, 1, 0 +#define PREFIX_S_STR ", \"A\", 1, 0" +#define PREFIX_F_ARGS , 0, 1, 0 +#define PREFIX_F_STR ", NULL, 1, 0" +static void send_un(void); +static char recv_buf[1]; +#include "sockname.c" + +static int cfd; + +static void +send_un(void) +{ + if (send(cfd, "A", 1, 0) != 1) + perror_msg_and_skip("send"); +} + +int +main(void) +{ + cfd = socket(AF_UNIX, SOCK_STREAM, 0); + int lfd = socket(AF_UNIX, SOCK_STREAM, 0); + if (cfd < 0 || lfd < 0) + perror_msg_and_skip("socket"); + + struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = TEST_SOCKET ".send" + }; + + (void) unlink(un.sun_path); + if (bind(cfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + (void) unlink(un.sun_path); + + un.sun_path[sizeof(TEST_SOCKET) - 1] = '\0'; + (void) unlink(un.sun_path); + + if (bind(lfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + + if (listen(lfd, 1)) + perror_msg_and_skip("listen"); + + if (connect(cfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("connect"); + + int afd = accept(lfd, 0, 0); + if (afd < 0) + perror_msg_and_skip("accept"); + + (void) unlink(un.sun_path); + + test_sockname_syscall(afd); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/recvfrom.test b/tests-m32/recvfrom.test new file mode 100755 index 000000000..9dfbc8985 --- /dev/null +++ b/tests-m32/recvfrom.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of sockaddr related arguments of recvfrom syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff --git a/tests-m32/recvmmsg-timeout.c b/tests-m32/recvmmsg-timeout.c new file mode 100644 index 000000000..7cf064db4 --- /dev/null +++ b/tests-m32/recvmmsg-timeout.c @@ -0,0 +1,71 @@ +/* + * Check decoding of timeout argument of recvmmsg syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#include "msghdr.h" + +int +main(void) +{ + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + + if (send(fds[1], "A", 1, 0) != 1) + perror_msg_and_skip("send"); + + char buf; + struct iovec iov = { .iov_base = &buf, .iov_len = sizeof(buf) }; + struct mmsghdr mh = { + .msg_hdr = { + .msg_iov = &iov, + .msg_iovlen = 1 + } + }; + struct timespec t = { .tv_sec = 0, .tv_nsec = 12345678 }; + + int rc = recv_mmsg(-1, &mh, 1, 0, &t); + printf("recvmmsg(-1, %p, 1, 0, {tv_sec=0, tv_nsec=12345678})" + " = %d %s (%m)\n", &mh, rc, errno2name()); + + rc = recv_mmsg(fds[0], &mh, 1, 0, &t); + if (rc < 0) + perror_msg_and_skip("recvmmsg"); + printf("recvmmsg(%d, [{msg_hdr={msg_name=NULL, msg_namelen=0" + ", msg_iov=[{iov_base=\"A\", iov_len=1}], msg_iovlen=1" + ", msg_controllen=0, msg_flags=0}, msg_len=1}], 1, 0" + ", {tv_sec=0, tv_nsec=12345678}) = " + "%d (left {tv_sec=0, tv_nsec=%d})\n", + fds[0], rc, (int) t.tv_nsec); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/recvmmsg-timeout.test b/tests-m32/recvmmsg-timeout.test new file mode 100755 index 000000000..36a12221c --- /dev/null +++ b/tests-m32/recvmmsg-timeout.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of timeout argument of recvmmsg syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 -e trace=recvmmsg diff --git a/tests-m32/recvmsg.c b/tests-m32/recvmsg.c new file mode 100644 index 000000000..fa41a9d41 --- /dev/null +++ b/tests-m32/recvmsg.c @@ -0,0 +1,160 @@ +/* + * Check decoding of recvmsg and sendmsg syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + const struct msghdr w_mh_ = { + .msg_iov = w_iov, + .msg_iovlen = ARRAY_SIZE(w_iov_) + }; + const struct msghdr *w_mh = tail_memdup(&w_mh_, sizeof(w_mh_)); + + assert(sendmsg(1, w_mh, 0) == (int) w_len); + close(1); + tprintf("sendmsg(1, {msg_name=NULL, msg_namelen=0, msg_iov=" + "[{iov_base=\"%s\", iov_len=%u}, {iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}], msg_iovlen=%u" + ", msg_controllen=0, msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), + w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), + ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, + LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + const struct msghdr r_mh_ = { + .msg_iov = r_iov, + .msg_iovlen = ARRAY_SIZE(r0_iov_) + }; + struct msghdr *r_mh = tail_memdup(&r_mh_, sizeof(r_mh_)); + + assert(recvmsg(0, r_mh, 0) == (int) r_len); + tprintf("recvmsg(0, {msg_name=NULL, msg_namelen=0, msg_iov=" + "[{iov_base=\"%s\", iov_len=%u}], msg_iovlen=%u" + ", msg_controllen=0, msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + r_mh->msg_iov = r_iov; + r_mh->msg_iovlen = ARRAY_SIZE(r1_iov_); + + assert(recvmsg(0, r_mh, 0) == (int) w_len - (int) r_len); + tprintf("recvmsg(0, {msg_name=NULL, msg_namelen=0, msg_iov=" + "[{iov_base=\"%s\", iov_len=%u}, {iov_base=\"\", iov_len=%u}]" + ", msg_iovlen=%u, msg_controllen=0, msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests-m32/recvmsg.test b/tests-m32/recvmsg.test new file mode 100755 index 000000000..e373a20a6 --- /dev/null +++ b/tests-m32/recvmsg.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of recvmsg and sendmsg syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -eread=0 -ewrite=1 -e trace=recvmsg,sendmsg diff --git a/tests-m32/redirect-fds.c b/tests-m32/redirect-fds.c new file mode 100644 index 000000000..fc1073a73 --- /dev/null +++ b/tests-m32/redirect-fds.c @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +#define N_FDS 3 + +/* + * Do not print any messages, indicate errors with return codes. + */ +static int +check_fd(int fd, const char *fname) +{ + const int should_be_closed = (fname[0] == '\0'); + + struct stat st_fd, st_fn; + + if (fstat(fd, &st_fd)) { + if (!should_be_closed) + return 10 + fd; + } else { + if (should_be_closed) + return 20 + fd; + + if (stat(fname, &st_fn)) + return 30 + fd; + + if (st_fd.st_dev != st_fn.st_dev + || st_fd.st_ino != st_fn.st_ino) + return 40 + fd; + } + + return 0; +} + +int +main(int ac, char **av) +{ + assert(ac == 1 + N_FDS); + + int rc = 0, fd; + for (fd = 1; fd < 1 + N_FDS; ++fd) + if ((rc = check_fd(fd - 1, av[fd]))) + break; + + return rc; +} diff --git a/tests-m32/redirect-fds.test b/tests-m32/redirect-fds.test new file mode 100755 index 000000000..ddef8fab1 --- /dev/null +++ b/tests-m32/redirect-fds.test @@ -0,0 +1,71 @@ +#!/bin/sh +# +# Check that strace does not leak placeholder descriptors. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +case "$STRACE" in + *valgrind\ *--suppressions=*) + skip_ 'incompatible with valgrind' ;; +esac + +fd0="$LOG.fd0" +fd1="$LOG.fd1" +fd2="$LOG.fd2" + +check_prog touch + +check_fd() +{ + local a1 a2 a3 + a1="$1" + a2="$2" + a3="$3" + + touch "$LOG" "$fd0" || + framework_skip_ 'failed to create files' + + set -- "\"./$NAME\"" "\"$1\"" "\"$2\"" "\"$3\"" + eval "$@" "<${a1:-&-}" ">${a2:-&-}" "2>${a3:-&-}" || + fail_ "$* failed with code $rc" + + set -- "$STRACE" -o"$LOG" -echdir "$@" + eval "$@" "<${a1:-&-}" ">${a2:-&-}" "2>${a3:-&-}" || + dump_log_and_fail_with "$* failed with code $?" + + rm -f "$LOG" "$fd0" "$fd1" "$fd2" +} + +check_fd "$fd0" "$fd1" "$fd2" +check_fd '' "$fd1" "$fd2" +check_fd "$fd0" '' "$fd2" +check_fd "$fd0" "$fd1" '' +check_fd '' '' "$fd2" +check_fd '' "$fd1" '' +check_fd "$fd0" '' '' +check_fd '' '' '' diff --git a/tests-m32/redirect.test b/tests-m32/redirect.test new file mode 100755 index 000000000..fa0c53696 --- /dev/null +++ b/tests-m32/redirect.test @@ -0,0 +1,78 @@ +#!/bin/sh +# +# Ensure that strace does not retain stdin and stdout descriptors. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +check_prog sleep +check_prog yes + +> "$OUT" +> "$LOG" +( + while [ -f "$LOG" ]; do + : + done + $SLEEP_A_BIT & + yes + if kill -0 $! 2> /dev/null; then + wait + else + echo TIMEOUT >> "$OUT" + fi +) | $STRACE -qq -enone -esignal=none \ + sh -c "exec <&- >&-; rm -f -- $LOG; $SLEEP_A_BIT; $SLEEP_A_BIT" + +if [ -s "$OUT" ]; then + fail_ "$STRACE failed to redirect standard input" +fi + +> "$LOG" +$STRACE -qq -enone -esignal=none \ + sh -c "exec <&- >&-; rm -f -- $LOG; $SLEEP_A_BIT; $SLEEP_A_BIT" | +( + while [ -f "$LOG" ]; do + : + done + $SLEEP_A_BIT & + cat > /dev/null + if kill -0 $! 2> /dev/null; then + wait + else + echo TIMEOUT >> "$OUT" + fi +) + +if [ -s "$OUT" ]; then + fail_ "$STRACE failed to redirect standard output" +fi + +rm -f -- "$OUT" diff --git a/tests-m32/remap_file_pages.c b/tests-m32/remap_file_pages.c new file mode 100644 index 000000000..452d2de75 --- /dev/null +++ b/tests-m32/remap_file_pages.c @@ -0,0 +1,61 @@ +/* + * Check decoding of remap_file_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_remap_file_pages + +# include +# include +# include + +int +main(void) +{ + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL; + const unsigned long size = (unsigned long) 0xdefaced1bad2f00dULL; + const unsigned long prot = PROT_READ|PROT_WRITE|PROT_EXEC; + const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deedULL; + const unsigned long flags = MAP_PRIVATE|MAP_ANONYMOUS; + + long rc = syscall(__NR_remap_file_pages, addr, size, prot, pgoff, flags); + printf("remap_file_pages(%#lx, %lu, %s, %lu, %s) = %ld %s (%m)\n", + addr, size, "PROT_READ|PROT_WRITE|PROT_EXEC", pgoff, + "MAP_PRIVATE|MAP_ANONYMOUS", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_remap_file_pages") + +#endif diff --git a/tests-m32/remap_file_pages.test b/tests-m32/remap_file_pages.test new file mode 100755 index 000000000..9d51a9a06 --- /dev/null +++ b/tests-m32/remap_file_pages.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check remap_file_pages syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/rename.c b/tests-m32/rename.c new file mode 100644 index 000000000..2a2a4e01e --- /dev/null +++ b/tests-m32/rename.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_rename + +# include +# include + +# define OLD_FILE "rename_old" +# define NEW_FILE "rename_new" + +int +main(void) +{ + long rc = syscall(__NR_rename, OLD_FILE, NEW_FILE); + printf("rename(\"%s\", \"%s\") = %ld %s (%m)\n", + OLD_FILE, NEW_FILE, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rename") + +#endif diff --git a/tests-m32/rename.test b/tests-m32/rename.test new file mode 100755 index 000000000..9067e4cce --- /dev/null +++ b/tests-m32/rename.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rename syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff --git a/tests-m32/renameat.c b/tests-m32/renameat.c new file mode 100644 index 000000000..2b874efac --- /dev/null +++ b/tests-m32/renameat.c @@ -0,0 +1,31 @@ +#include "tests.h" +#include + +#ifdef __NR_renameat + +# include +# include + +# define OLD_FILE "renameat_old" +# define NEW_FILE "renameat_new" + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffffULL; + const long int fd_new = (long int) 0xdeadbeeffffffffeULL; + + long rc = syscall(__NR_renameat, fd_old, OLD_FILE, fd_new, NEW_FILE); + printf("renameat(%d, \"%s\", %d, \"%s\") = %ld %s (%m)\n", + (int) fd_old, OLD_FILE, (int) fd_new, NEW_FILE, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_renameat") + +#endif diff --git a/tests-m32/renameat.test b/tests-m32/renameat.test new file mode 100755 index 000000000..9b0a61dd5 --- /dev/null +++ b/tests-m32/renameat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check renameat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/renameat2.c b/tests-m32/renameat2.c new file mode 100644 index 000000000..33f889884 --- /dev/null +++ b/tests-m32/renameat2.c @@ -0,0 +1,63 @@ +/* + * Check decoding of renameat2 syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_renameat2 + +# include +# include + +int +main(void) +{ + static const char oldpath[] = "renameat2_oldpath"; + static const char newpath[] = "renameat2_newpath"; + const unsigned long olddirfd = + (unsigned long) 0xfacefeedffffffff; + const unsigned long newdirfd = + (unsigned long) 0xfacefeed00000000 | -100U; + + long rc = syscall(__NR_renameat2, + olddirfd, oldpath, newdirfd, newpath, 1); + printf("renameat2(%d, \"%s\", AT_FDCWD, \"%s\", RENAME_NOREPLACE)" + " = %ld %s (%m)\n", + (int) olddirfd, oldpath, newpath, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_renameat2") + +#endif diff --git a/tests-m32/renameat2.test b/tests-m32/renameat2.test new file mode 100755 index 000000000..4c176bbd9 --- /dev/null +++ b/tests-m32/renameat2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check renameat2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/request_key.c b/tests-m32/request_key.c new file mode 100644 index 000000000..fea977b2d --- /dev/null +++ b/tests-m32/request_key.c @@ -0,0 +1,149 @@ +/* + * Check decoding of request_key syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_request_key + +# include +# include +# include + +void +print_val_str(const void *ptr, const char *str) +{ + if (str) + printf("%s, ", str); + else + printf("%p, ", ptr); +} + +void +do_request_key(const char *type, const char *type_str, const char *desc, + const char *desc_str, const char *info, const char *info_str, + int32_t keyring, const char *keyring_str) +{ + long rc = syscall(__NR_request_key, type, desc, info, keyring); + const char *errstr = sprintrc(rc); + printf("request_key("); + print_val_str(type, type_str); + print_val_str(desc, desc_str); + print_val_str(info, info_str); + if (keyring_str) + printf("%s", keyring_str); + else + printf("%d", keyring); + printf(") = %s\n", errstr); +} + +int +main(void) +{ + static const char unterminated1[] = { '\1', '\2', '\3', '\4', '\5' }; + static const char unterminated2[] = { '\6', '\7', '\10', '\11', '\12' }; + static const char unterminated3[] = + { '\16', '\17', '\20', '\21', '\22' }; + + char *bogus_type = tail_memdup(unterminated1, sizeof(unterminated1)); + char *bogus_desc = tail_memdup(unterminated2, sizeof(unterminated2)); + char *bogus_info = tail_memdup(unterminated3, sizeof(unterminated3)); + + unsigned i; + unsigned j; + unsigned k; + unsigned l; + + struct { + const char *type; + const char *str; + } types[] = { + { ARG_STR(NULL) }, + { bogus_type + sizeof(unterminated1), NULL }, + { bogus_type, NULL }, + { ARG_STR("\20\21\22\23\24") }, + { ARG_STR("user") }, + }; + + struct { + const char *desc; + const char *str; + } descs[] = { + { ARG_STR(NULL) }, + { bogus_desc + sizeof(unterminated2), NULL }, + { bogus_desc, NULL }, + { ARG_STR("\25\26\27\30\31") }, + { ARG_STR("desc") }, + { "overly long description", _STR("overly long ") "..." }, + }; + + struct { + const char *info; + const char *str; + } infos[] = { + { ARG_STR(NULL) }, + { bogus_info + sizeof(unterminated3), NULL }, + { bogus_info, NULL }, + { ARG_STR("\32\33\34\35\36") }, + { ARG_STR("info") }, + { "overly long info", _STR("overly long ") "..." }, + }; + + struct { + uint32_t keyring; + const char *str; + } keyrings[] = { + { ARG_STR(0) }, + { ARG_STR(1234567890) }, + { ARG_STR(-1234567890) }, + { -1, "KEY_SPEC_THREAD_KEYRING" }, + }; + + for (i = 0; i < ARRAY_SIZE(types); i++) + for (j = 0; j < ARRAY_SIZE(descs); j++) + for (k = 0; k < ARRAY_SIZE(infos); k++) + for (l = 0; l < ARRAY_SIZE(keyrings); l++) + do_request_key( + types[i].type, types[i].str, + descs[j].desc, descs[j].str, + infos[k].info, infos[k].str, + keyrings[l].keyring, + keyrings[l].str); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_request_key"); + +#endif diff --git a/tests-m32/request_key.test b/tests-m32/request_key.test new file mode 100755 index 000000000..9812a18e5 --- /dev/null +++ b/tests-m32/request_key.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of request_key syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 -s12 diff --git a/tests-m32/restart_syscall.c b/tests-m32/restart_syscall.c new file mode 100644 index 000000000..e492e62e2 --- /dev/null +++ b/tests-m32/restart_syscall.c @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +int +main(void) +{ +#if defined __x86_64__ && defined __ILP32__ + /* + * x32 is broken from the beginning: + * https://lkml.org/lkml/2015/11/30/790 + */ + error_msg_and_skip("x32 is broken"); +#else + const sigset_t set = {}; + const struct sigaction act = { .sa_handler = SIG_IGN }; + const struct itimerval itv = { .it_value.tv_usec = 111111 }; + struct timespec req = { .tv_nsec = 222222222 }, rem; + + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_skip("setitimer"); + if (nanosleep(&req, &rem)) + perror_msg_and_fail("nanosleep"); + + printf("nanosleep\\(\\{tv_sec=%jd, tv_nsec=%jd\\}, " + "\\{tv_sec=%jd, tv_nsec=%jd\\}\\)" + " = \\? ERESTART_RESTARTBLOCK \\(Interrupted by signal\\)\n", + (intmax_t) req.tv_sec, (intmax_t) req.tv_nsec, + (intmax_t) rem.tv_sec, (intmax_t) rem.tv_nsec); + puts("--- SIGALRM \\{si_signo=SIGALRM, si_code=SI_KERNEL\\} ---"); +#ifdef __arm__ +/* old kernels used to overwrite ARM_r0 with -EINTR */ +# define ALTERNATIVE_NANOSLEEP_REQ "0xfffffffc|" +#else +# define ALTERNATIVE_NANOSLEEP_REQ "" +#endif + printf("(nanosleep\\((%s\\{tv_sec=%jd, tv_nsec=%jd\\}), " + "%p|restart_syscall\\(<\\.\\.\\." + " resuming interrupted nanosleep \\.\\.\\.>)\\) = 0\n", + ALTERNATIVE_NANOSLEEP_REQ, + (intmax_t) req.tv_sec, (intmax_t) req.tv_nsec, &rem); + + puts("\\+\\+\\+ exited with 0 \\+\\+\\+"); + return 0; +#endif +} diff --git a/tests-m32/restart_syscall.test b/tests-m32/restart_syscall.test new file mode 100755 index 000000000..6dfda1686 --- /dev/null +++ b/tests-m32/restart_syscall.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check how "resuming interrupted nanosleep" works. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +syscalls=nanosleep,restart_syscall +run_strace -a20 -e trace=$syscalls $args > "$OUT" +match_grep "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests-m32/rmdir.c b/tests-m32/rmdir.c new file mode 100644 index 000000000..20952d84d --- /dev/null +++ b/tests-m32/rmdir.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_rmdir + +# include +# include + +int +main(void) +{ + static const char sample[] = "rmdir_sample"; + long rc = syscall(__NR_rmdir, sample); + printf("rmdir(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rmdir") + +#endif diff --git a/tests-m32/rmdir.test b/tests-m32/rmdir.test new file mode 100755 index 000000000..81ee66b8a --- /dev/null +++ b/tests-m32/rmdir.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rmdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff --git a/tests-m32/rt_sigpending.c b/tests-m32/rt_sigpending.c new file mode 100644 index 000000000..accf69134 --- /dev/null +++ b/tests-m32/rt_sigpending.c @@ -0,0 +1,128 @@ +/* + * This file is part of rt_sigpending strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigpending + +# include +# include +# include +# include +# include + +static long +k_sigpending(void *const set, const unsigned long size) +{ + return syscall(__NR_rt_sigpending, set, size); +} + +static void +iterate(const char *const text, unsigned int size, void *set) +{ + for (;;) { + if (k_sigpending(set, size)) { + tprintf("rt_sigpending(%p, %u) = -1 EFAULT (%m)\n", + set, size); + break; + } + if (size) { +#if WORDS_BIGENDIAN + if (size < sizeof(long)) + tprintf("rt_sigpending(%s, %u) = 0\n", + "[]", size); + else +#endif + tprintf("rt_sigpending(%s, %u) = 0\n", + text, size); + } else { + tprintf("rt_sigpending(%p, %u) = 0\n", set, size); + break; + } + size >>= 1; + set += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + + sigemptyset(libc_set); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + memset(k_set, 0, big_size); + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + if (!k_sigpending(k_set, set_size)) + break; + tprintf("rt_sigpending(%p, %u) = -1 EINVAL (%m)\n", + k_set, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigpending"); + tprintf("rt_sigpending(%s, %u) = 0\n", "[]", set_size); + + iterate("[]", set_size >> 1, k_set + (set_size >> 1)); + + void *const efault = k_set + (set_size >> 1); + assert(k_sigpending(efault, set_size) == -1); + tprintf("rt_sigpending(%p, %u) = -1 EFAULT (%m)\n", + efault, set_size); + + sigaddset(libc_set, SIGHUP); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + raise(SIGHUP); + + iterate("[HUP]", set_size, k_set); + + sigaddset(libc_set, SIGINT); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + raise(SIGINT); + + iterate("[HUP INT]", set_size, k_set); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigpending") + +#endif diff --git a/tests-m32/rt_sigpending.test b/tests-m32/rt_sigpending.test new file mode 100755 index 000000000..40c83a810 --- /dev/null +++ b/tests-m32/rt_sigpending.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigpending syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff --git a/tests-m32/rt_sigprocmask.c b/tests-m32/rt_sigprocmask.c new file mode 100644 index 000000000..27e357fab --- /dev/null +++ b/tests-m32/rt_sigprocmask.c @@ -0,0 +1,174 @@ +/* + * This file is part of rt_sigprocmask strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigprocmask + +# include +# include +# include +# include +# include + +static long +k_sigprocmask(const unsigned long how, void *const new_set, + void *const old_set, const unsigned long size) +{ + return syscall(__NR_rt_sigprocmask, how, new_set, old_set, size); +} + +static void +iterate(const char *const text, void *set, void *old, unsigned int size) +{ + for (;;) { + if (k_sigprocmask(SIG_UNBLOCK, set, old, size)) { + if (size < sizeof(long)) + tprintf("rt_sigprocmask(SIG_UNBLOCK" + ", %p, %p, %u) = -1 EINVAL (%m)\n", + set, old, size); + else + tprintf("rt_sigprocmask(SIG_UNBLOCK" + ", %s, %p, %u) = -1 EINVAL (%m)\n", + text, old, size); + } else { + tprintf("rt_sigprocmask(SIG_UNBLOCK, %s, [], %u)" + " = 0\n", text, size); + } + if (!size) + break; + size >>= 1; + set += size; + old += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + unsigned int set_size; + + for (set_size = big_size; set_size; set_size >>= 1) { + if (!k_sigprocmask(SIG_SETMASK, NULL, NULL, set_size)) + break; + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, NULL, %u)" + " = -1 EINVAL (%m)\n", set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, NULL, %u) = 0\n", + set_size); + + void *const k_set = tail_alloc(set_size); + void *const old_set = tail_alloc(set_size); + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + + memset(k_set, 0, set_size); + if (k_sigprocmask(SIG_SETMASK, k_set, NULL, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, [], NULL, %u) = 0\n", set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set - set_size, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[], [], %u) = 0\n", set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set - set_size, + old_set, set_size << 1) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %p, %p, %u) = -1 EINVAL (%m)\n", + k_set - set_size, old_set, set_size << 1); + + iterate("~[]", k_set - set_size, old_set, set_size >> 1); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_BLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_BLOCK, [HUP], [], %u) = 0\n", set_size); + + memset(libc_set, -1, sizeof(sigset_t)); + sigdelset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[HUP], [HUP], %u) = 0\n", + set_size); + + sigdelset(libc_set, SIGKILL); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[HUP KILL], [HUP], %u) = 0\n", + set_size); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + sigaddset(libc_set, SIGINT); + sigaddset(libc_set, SIGQUIT); + sigaddset(libc_set, SIGALRM); + sigaddset(libc_set, SIGTERM); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_BLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_BLOCK, %s, [HUP], %u) = 0\n", + "[HUP INT QUIT ALRM TERM]", set_size); + + if (k_sigprocmask(SIG_SETMASK, NULL, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, %s, %u) = 0\n", + "[HUP INT QUIT ALRM TERM]", set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set + (set_size >> 1), NULL, + set_size) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %p, NULL, %u) = -1 EFAULT (%m)\n", + k_set + (set_size >> 1), set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set, old_set + (set_size >> 1), + set_size) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %s, %p, %u) = -1 EFAULT (%m)\n", + "[HUP INT QUIT ALRM TERM]", + old_set + (set_size >> 1), set_size); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigprocmask") + +#endif diff --git a/tests-m32/rt_sigprocmask.test b/tests-m32/rt_sigprocmask.test new file mode 100755 index 000000000..1e60ebde5 --- /dev/null +++ b/tests-m32/rt_sigprocmask.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigprocmask syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/rt_sigqueueinfo.c b/tests-m32/rt_sigqueueinfo.c new file mode 100644 index 000000000..aba6776c5 --- /dev/null +++ b/tests-m32/rt_sigqueueinfo.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015 Elvira Khabirova + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +int +main (void) +{ + struct sigaction sa = { + .sa_handler = SIG_IGN + }; + union sigval value = { + .sival_ptr = (void *) (unsigned long) 0xdeadbeefbadc0dedULL + }; + pid_t pid = getpid(); + + assert(sigaction(SIGUSR1, &sa, NULL) == 0); + if (sigqueue(pid, SIGUSR1, value)) + perror_msg_and_skip("sigqueue"); + printf("rt_sigqueueinfo(%u, SIGUSR1, {si_signo=SIGUSR1, " + "si_code=SI_QUEUE, si_pid=%u, si_uid=%u, " + "si_value={int=%d, ptr=%p}}) = 0\n", + pid, pid, getuid(), value.sival_int, value.sival_ptr); + printf("+++ exited with 0 +++\n"); + + return 0; +} diff --git a/tests-m32/rt_sigqueueinfo.test b/tests-m32/rt_sigqueueinfo.test new file mode 100755 index 000000000..c03c76f2a --- /dev/null +++ b/tests-m32/rt_sigqueueinfo.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of rt_sigqueueinfo syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff --git a/tests-m32/rt_sigsuspend.c b/tests-m32/rt_sigsuspend.c new file mode 100644 index 000000000..73e133646 --- /dev/null +++ b/tests-m32/rt_sigsuspend.c @@ -0,0 +1,165 @@ +/* + * This file is part of rt_sigsuspend strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigsuspend + +# include +# include +# include +# include +# include +# include +# include + +static long +k_sigsuspend(const sigset_t *const set, const unsigned long size) +{ + return syscall(__NR_rt_sigsuspend, set, size); +} + +static void +iterate(const char *const text, const int sig, + const void *const set, unsigned int size) +{ + const void *mask; + + for (mask = set;; size >>= 1, mask += size) { + raise(sig); + assert(k_sigsuspend(mask, size) == -1); + if (EINTR == errno) { + tprintf("rt_sigsuspend(%s, %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", + text, size); + } else { + if (size < sizeof(long)) + tprintf("rt_sigsuspend(%p, %u)" + " = -1 EINVAL (%m)\n", + mask, size); + else + tprintf("rt_sigsuspend(%s, %u)" + " = -1 EINVAL (%m)\n", + set == mask ? text : "~[]", size); + } + if (!size) + break; + } +} + +static void +handler(int signo) +{ +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + memset(k_set, 0, big_size); + + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + sigemptyset(libc_set); + sigaddset(libc_set, SIGUSR1); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct sigaction sa = { + .sa_handler = handler + }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + raise(SIGUSR1); + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + assert(k_sigsuspend(k_set, set_size) == -1); + if (EINTR == errno) + break; + tprintf("rt_sigsuspend(%p, %u) = -1 EINVAL (%m)\n", + k_set, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigsuspend"); + tprintf("rt_sigsuspend([], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGUSR2); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([HUP USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigaddset(libc_set, SIGINT); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([HUP INT USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + memset(libc_set, -1, sizeof(*libc_set)); + sigdelset(libc_set, SIGUSR1); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend(~[USR1], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + assert(k_sigsuspend(k_set - set_size, set_size << 1) == -1); + tprintf("rt_sigsuspend(%p, %u) = -1 EINVAL (%m)\n", + k_set - set_size, set_size << 1); + + iterate("~[USR1]", SIGUSR1, k_set, set_size >> 1); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigsuspend") + +#endif diff --git a/tests-m32/rt_sigsuspend.test b/tests-m32/rt_sigsuspend.test new file mode 100755 index 000000000..2e30fd4b1 --- /dev/null +++ b/tests-m32/rt_sigsuspend.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigsuspend syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 -esignal=none diff --git a/tests-m32/rt_sigtimedwait.c b/tests-m32/rt_sigtimedwait.c new file mode 100644 index 000000000..10311e6ef --- /dev/null +++ b/tests-m32/rt_sigtimedwait.c @@ -0,0 +1,185 @@ +/* + * This file is part of rt_sigtimedwait strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigtimedwait + +# include +# include +# include +# include +# include +# include +# include + +static long +k_sigtimedwait(const sigset_t *const set, siginfo_t *const info, + const struct timespec *const timeout, const unsigned long size) +{ + return syscall(__NR_rt_sigtimedwait, set, info, timeout, size); +} + +static void +iterate(const char *const text, const void *set, + const struct timespec *const timeout, unsigned int size) +{ + for (;;) { + assert(k_sigtimedwait(set, NULL, timeout, size) == -1); + if (EINTR == errno) { + tprintf("rt_sigtimedwait(%s, NULL, " + "{tv_sec=%jd, tv_nsec=%jd}, %u)" + " = -1 EAGAIN (%m)\n", text, + (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, + size); + } else { + if (size < sizeof(long)) + tprintf("rt_sigtimedwait(%p, NULL, " + "{tv_sec=%jd, tv_nsec=%jd}" + ", %u) = -1 EINVAL (%m)\n", + set, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, size); + else + tprintf("rt_sigtimedwait(%s, NULL, " + "{tv_sec=%jd, tv_nsec=%jd}" + ", %u) = -1 EINVAL (%m)\n", + text, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, size); + } + if (!size) + break; + size >>= 1; + set += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + siginfo_t *const info = tail_alloc(sizeof(*info)); + struct timespec *const timeout = tail_alloc(sizeof(*timeout)); + timeout->tv_sec = 0; + timeout->tv_nsec = 42; + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + memset(k_set, 0, big_size); + + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + assert(k_sigtimedwait(k_set, NULL, timeout, set_size) == -1); + if (EAGAIN == errno) + break; + tprintf("rt_sigtimedwait(%p, NULL, {tv_sec=%jd, tv_nsec=%jd}, %u)" + " = -1 EINVAL (%m)\n", + k_set, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigtimedwait"); + tprintf("rt_sigtimedwait([], NULL, {tv_sec=%jd, tv_nsec=%jd}, %u) = -1 EAGAIN (%m)\n", + (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, + set_size); + + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait([HUP], %p, {tv_sec=%jd, tv_nsec=%jd}, %u) = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + sigaddset(libc_set, SIGINT); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait([HUP INT], %p, {tv_sec=%jd, tv_nsec=%jd}, %u)" + " = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + sigaddset(libc_set, SIGQUIT); + sigaddset(libc_set, SIGALRM); + sigaddset(libc_set, SIGTERM); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait(%s, %p, {tv_sec=%jd, tv_nsec=%jd}, %u) = -1 EAGAIN (%m)\n", + "[HUP INT QUIT ALRM TERM]", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + memset(k_set - set_size, -1, set_size); + assert(k_sigtimedwait(k_set - set_size, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait(~[], %p, {tv_sec=%jd, tv_nsec=%jd}, %u) = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + assert(k_sigtimedwait(k_set - set_size, info, NULL, set_size << 1) == -1); + tprintf("rt_sigtimedwait(%p, %p, NULL, %u) = -1 EINVAL (%m)\n", + k_set - set_size, info, set_size << 1); + + iterate("~[]", k_set - set_size, timeout, set_size >> 1); + + timeout->tv_sec = 1; + raise(SIGALRM); + assert(k_sigtimedwait(k_set, info, timeout, set_size) == SIGALRM); + tprintf("rt_sigtimedwait(%s, {si_signo=%s, si_code=SI_TKILL" + ", si_pid=%d, si_uid=%d}, {tv_sec=%jd, tv_nsec=%jd}, %u) = %d (%s)\n", + "[HUP INT QUIT ALRM TERM]", "SIGALRM", getpid(), getuid(), + (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, + set_size, SIGALRM, "SIGALRM"); + + raise(SIGALRM); + assert(k_sigtimedwait(k_set, NULL, NULL, set_size) == SIGALRM); + tprintf("rt_sigtimedwait(%s, NULL, NULL, %u) = %d (%s)\n", + "[HUP INT QUIT ALRM TERM]", set_size, SIGALRM, "SIGALRM"); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigtimedwait") + +#endif diff --git a/tests-m32/rt_sigtimedwait.test b/tests-m32/rt_sigtimedwait.test new file mode 100755 index 000000000..e15fb7796 --- /dev/null +++ b/tests-m32/rt_sigtimedwait.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigtimedwait syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a38 diff --git a/tests-m32/rt_tgsigqueueinfo.c b/tests-m32/rt_tgsigqueueinfo.c new file mode 100644 index 000000000..ec0934812 --- /dev/null +++ b/tests-m32/rt_tgsigqueueinfo.c @@ -0,0 +1,88 @@ +/* + * This file is part of rt_tgsigqueueinfo strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_tgsigqueueinfo + +# include +# include +# include +# include +# include + +static long +k_tgsigqueueinfo(const pid_t pid, const int sig, const void *const info) +{ + return syscall(__NR_rt_tgsigqueueinfo, + (unsigned long) 0xffffffff00000000ULL | pid, + (unsigned long) 0xffffffff00000000ULL | pid, + (unsigned long) 0xffffffff00000000ULL | sig, + info); +} + +int +main (void) +{ + const struct sigaction sa = { + .sa_handler = SIG_IGN + }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + siginfo_t *const info = tail_alloc(sizeof(*info)); + memset(info, 0, sizeof(*info)); + info->si_signo = SIGUSR1; + info->si_errno = ENOENT; + info->si_code = SI_QUEUE; + info->si_pid = getpid(); + info->si_uid = getuid(); + info->si_value.sival_ptr = (void *) (unsigned long) 0xdeadbeeffacefeedULL; + + if (k_tgsigqueueinfo(info->si_pid, SIGUSR1, info)) + (errno == ENOSYS ? perror_msg_and_skip : perror_msg_and_fail)( + "rt_tgsigqueueinfo"); + + printf("rt_tgsigqueueinfo(%u, %u, %s, {si_signo=%s" + ", si_code=SI_QUEUE, si_errno=ENOENT, si_pid=%u" + ", si_uid=%u, si_value={int=%d, ptr=%p}}) = 0\n", + info->si_pid, info->si_pid, "SIGUSR1", "SIGUSR1", + info->si_pid, info->si_uid, info->si_value.sival_int, + info->si_value.sival_ptr); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_tgsigqueueinfo") + +#endif diff --git a/tests-m32/rt_tgsigqueueinfo.test b/tests-m32/rt_tgsigqueueinfo.test new file mode 100755 index 000000000..ab24e2d63 --- /dev/null +++ b/tests-m32/rt_tgsigqueueinfo.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of rt_tgsigqueueinfo syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff --git a/tests-m32/run.sh b/tests-m32/run.sh new file mode 100755 index 000000000..02d99123c --- /dev/null +++ b/tests-m32/run.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +. "${srcdir=.}/init.sh" + +$STRACE -V > /dev/null || + framework_failure_ "$STRACE is not available" + +TIMEOUT="timeout -s 9 $TIMEOUT_DURATION" +$TIMEOUT true > /dev/null 2>&1 || + TIMEOUT= + +exec $TIMEOUT "$@" diff --git a/tests-m32/sched_get_priority_mxx.c b/tests-m32/sched_get_priority_mxx.c new file mode 100644 index 000000000..fc14b27c6 --- /dev/null +++ b/tests-m32/sched_get_priority_mxx.c @@ -0,0 +1,29 @@ +#include "tests.h" +#include + +#if defined(__NR_sched_get_priority_min) \ + && defined(__NR_sched_get_priority_max) + +# include +# include +# include + +int +main(void) +{ + int rc = syscall(__NR_sched_get_priority_min, SCHED_FIFO); + printf("sched_get_priority_min(SCHED_FIFO) = %d\n", rc); + + rc = syscall(__NR_sched_get_priority_max, SCHED_RR); + printf("sched_get_priority_max(SCHED_RR) = %d\n", rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_get_priority_min" + " && defined __NR_sched_get_priority_max"); + +#endif diff --git a/tests-m32/sched_get_priority_mxx.test b/tests-m32/sched_get_priority_mxx.test new file mode 100755 index 000000000..0d1a1a78a --- /dev/null +++ b/tests-m32/sched_get_priority_mxx.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_get_priority_min and sched_get_priority_max syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 -e trace=sched_get_priority_min,sched_get_priority_max diff --git a/tests-m32/sched_rr_get_interval.c b/tests-m32/sched_rr_get_interval.c new file mode 100644 index 000000000..0aacd2b77 --- /dev/null +++ b/tests-m32/sched_rr_get_interval.c @@ -0,0 +1,42 @@ +#include "tests.h" +#include + +#ifdef __NR_sched_rr_get_interval + +# include +# include +# include +# include + +int +main(void) +{ + struct timespec *const tp = tail_alloc(sizeof(struct timespec)); + long rc; + + rc = syscall(__NR_sched_rr_get_interval, 0, NULL); + printf("sched_rr_get_interval(0, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_sched_rr_get_interval, 0, tp + 1); + printf("sched_rr_get_interval(0, %p) = %s\n", tp + 1, sprintrc(rc)); + + rc = syscall(__NR_sched_rr_get_interval, -1, tp); + printf("sched_rr_get_interval(-1, %p) = %s\n", tp, sprintrc(rc)); + + rc = syscall(__NR_sched_rr_get_interval, 0, tp); + if (rc == 0) + printf("sched_rr_get_interval(0, {tv_sec=%jd, tv_nsec=%jd}) = " + "0\n", (intmax_t)tp->tv_sec, (intmax_t)tp->tv_nsec); + else + printf("sched_rr_get_interval(-1, %p) = %s\n", tp, + sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_rr_get_interval") + +#endif diff --git a/tests-m32/sched_rr_get_interval.test b/tests-m32/sched_rr_get_interval.test new file mode 100755 index 000000000..828ba5d03 --- /dev/null +++ b/tests-m32/sched_rr_get_interval.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_rr_get_interval syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 diff --git a/tests-m32/sched_xetaffinity.c b/tests-m32/sched_xetaffinity.c new file mode 100644 index 000000000..41a18202d --- /dev/null +++ b/tests-m32/sched_xetaffinity.c @@ -0,0 +1,135 @@ +/* + * This file is part of sched_xetaffinity strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_sched_getaffinity && defined __NR_sched_setaffinity \ + && defined CPU_ISSET_S && defined CPU_ZERO_S && defined CPU_SET_S + +# include +# include +# include +# include + +static const char *errstr; + +static int +getaffinity(unsigned long pid, unsigned long size, void *set) +{ + int rc = syscall(__NR_sched_getaffinity, pid, size, set); + errstr = sprintrc(rc); + return rc; +} + +static int +setaffinity(unsigned long pid, unsigned long size, void *set) +{ + int rc = syscall(__NR_sched_setaffinity, pid, size, set); + errstr = sprintrc(rc); + return rc; +} + +int +main(void) +{ + unsigned int cpuset_size = 1; + const pid_t pid = getpid(); + + while (cpuset_size) { + assert(getaffinity(pid, cpuset_size, NULL) == -1); + if (EFAULT == errno) + break; + if (EINVAL != errno) + perror_msg_and_skip("sched_getaffinity"); + printf("sched_getaffinity(%d, %u, NULL) = %s\n", + pid, cpuset_size, errstr); + cpuset_size <<= 1; + } + assert(cpuset_size); + printf("sched_getaffinity(%d, %u, NULL) = %s\n", + pid, cpuset_size, errstr); + + cpu_set_t *cpuset = tail_alloc(cpuset_size); + getaffinity(pid, cpuset_size, cpuset + 1); + printf("sched_getaffinity(%d, %u, %p) = %s\n", + pid, cpuset_size, cpuset + 1, errstr); + + int ret_size = getaffinity(pid, cpuset_size, cpuset); + if (ret_size < 0) + perror_msg_and_fail("sched_getaffinity(%d, %u, %p) = %s\n", + pid, (unsigned) cpuset_size, cpuset, errstr); + assert(ret_size <= (int) cpuset_size); + + printf("sched_getaffinity(%d, %u, [", pid, cpuset_size); + const char *sep; + unsigned int i, cpu; + for (i = 0, cpu = 0, sep = ""; i < (unsigned) ret_size * 8; ++i) { + if (CPU_ISSET_S(i, (unsigned) ret_size, cpuset)) { + printf("%s%u", sep, i); + sep = ", "; + cpu = i; + } + } + printf("]) = %s\n", errstr); + + CPU_ZERO_S(cpuset_size, cpuset); + CPU_SET_S(cpu, cpuset_size, cpuset); + if (setaffinity(pid, cpuset_size, cpuset)) + perror_msg_and_skip("sched_setaffinity"); + printf("sched_setaffinity(%d, %u, [%u]) = 0\n", + pid, cpuset_size, cpu); + + const unsigned int big_size = cpuset_size < 128 ? 128 : cpuset_size * 2; + cpuset = tail_alloc(big_size); + ret_size = getaffinity(pid, big_size, cpuset); + if (ret_size < 0) + perror_msg_and_fail("sched_getaffinity(%d, %u, %p) = %s\n", + pid, big_size, cpuset, errstr); + assert(ret_size <= (int) big_size); + printf("sched_getaffinity(%d, %u, [", pid, big_size); + for (i = 0, sep = ""; i < (unsigned) ret_size * 8; ++i) { + if (CPU_ISSET_S(i, (unsigned) ret_size, cpuset)) { + printf("%s%u", sep, i); + sep = ", "; + } + } + printf("]) = %s\n", errstr); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getaffinity && __NR_sched_setaffinity" + " && CPU_ISSET_S && CPU_ZERO_S && CPU_SET_S") + +#endif diff --git a/tests-m32/sched_xetaffinity.test b/tests-m32/sched_xetaffinity.test new file mode 100755 index 000000000..246ea21aa --- /dev/null +++ b/tests-m32/sched_xetaffinity.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getaffinity and sched_setaffinity syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 -e trace=sched_getaffinity,sched_setaffinity diff --git a/tests-m32/sched_xetattr.c b/tests-m32/sched_xetattr.c new file mode 100644 index 000000000..1b484915f --- /dev/null +++ b/tests-m32/sched_xetattr.c @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_sched_getattr && defined __NR_sched_setattr + +# include +# include +# include + +int +main(void) +{ + struct { + uint32_t size; + uint32_t sched_policy; + uint64_t sched_flags; + int32_t sched_nice; + uint32_t sched_priority; + uint64_t sched_runtime; + uint64_t sched_deadline; + uint64_t sched_period; + } *sched_attr = tail_alloc(sizeof(*sched_attr)); + + long rc = syscall(__NR_sched_getattr, 0xdeadface, NULL, 0, 0); + printf("sched_getattr\\(%d, NULL, 0, 0\\) += %s\n", + 0xdeadface, sprintrc_grep(rc)); + + rc = syscall(__NR_sched_getattr, -1, + sched_attr, 0xbadfaced, 0xc0defeed); + printf("sched_getattr\\(-1, %p, %u, %u\\) += %s\n", + sched_attr, 0xbadfaced, 0xc0defeed, sprintrc_grep(rc)); + + rc = syscall(__NR_sched_getattr, 0, + sched_attr + 1, sizeof(*sched_attr), 0); + printf("sched_getattr\\(0, %p, %u, 0\\) += %s\n", + sched_attr + 1, (unsigned)sizeof(*sched_attr), + sprintrc_grep(rc)); + + if (syscall(__NR_sched_getattr, 0, sched_attr, sizeof(*sched_attr), 0)) + perror_msg_and_skip("sched_getattr"); + + printf("sched_getattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+" + ", sched_flags=%s, sched_nice=%d, sched_priority=%u" + ", sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 + ", sched_period=%" PRIu64 "\\}, %u, 0\\) += 0\n", + sched_attr->size, + sched_attr->sched_flags ? "SCHED_FLAG_RESET_ON_FORK" : "0", + sched_attr->sched_nice, + sched_attr->sched_priority, + sched_attr->sched_runtime, + sched_attr->sched_deadline, + sched_attr->sched_period, + (unsigned) sizeof(*sched_attr)); + + sched_attr->sched_flags |= 1; + if (syscall(__NR_sched_setattr, 0, sched_attr, 0)) + perror_msg_and_skip("sched_setattr"); + + printf("sched_setattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+" + ", sched_flags=%s, sched_nice=%d, sched_priority=%u" + ", sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 + ", sched_period=%" PRIu64 "\\}, 0\\) += 0\n", + sched_attr->size, + "SCHED_FLAG_RESET_ON_FORK", + sched_attr->sched_nice, + sched_attr->sched_priority, + sched_attr->sched_runtime, + sched_attr->sched_deadline, + sched_attr->sched_period); + + sched_attr->size = 0x90807060; + sched_attr->sched_policy = 0xca7faced; + sched_attr->sched_flags = 0xbadc0ded1057da7aULL; + sched_attr->sched_nice = 0xafbfcfdf; + sched_attr->sched_priority = 0xb8c8d8e8; + sched_attr->sched_runtime = 0xbadcaffedeadf157ULL; + sched_attr->sched_deadline = 0xc0de70a57badac75ULL; + sched_attr->sched_period = 0xded1ca7edda7aca7ULL; + + rc = syscall(__NR_sched_setattr, 0xfacec0de, sched_attr, 0xbeeff00d); + + printf("sched_setattr\\(%d, \\{size=%u, " + "sched_policy=%#x /\\* SCHED_\\?\\?\\? \\*/, " + "sched_flags=%#" PRIx64 " /\\* SCHED_FLAG_\\?\\?\\? \\*/, " + "sched_nice=%d, sched_priority=%u, sched_runtime=%" PRIu64 ", " + "sched_deadline=%" PRIu64 ", sched_period=%" PRIu64 "\\}, " + "%u\\) += %s\n", + 0xfacec0de, sched_attr->size, + sched_attr->sched_policy, + sched_attr->sched_flags, + sched_attr->sched_nice, + sched_attr->sched_priority, + sched_attr->sched_runtime, + sched_attr->sched_deadline, + sched_attr->sched_period, 0xbeeff00d, sprintrc_grep(rc)); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getattr && __NR_sched_setattr") + +#endif diff --git a/tests-m32/sched_xetattr.test b/tests-m32/sched_xetattr.test new file mode 100755 index 000000000..c2c7914c4 --- /dev/null +++ b/tests-m32/sched_xetattr.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check sched_getattr and sched_setattr syscalls decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -e sched_getattr,sched_setattr $args > "$OUT" +match_grep "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests-m32/sched_xetparam.c b/tests-m32/sched_xetparam.c new file mode 100644 index 000000000..e761a9d0e --- /dev/null +++ b/tests-m32/sched_xetparam.c @@ -0,0 +1,33 @@ +#include "tests.h" +#include + +#if defined __NR_sched_getparam && defined __NR_sched_setparam + +# include +# include +# include + +int +main(void) +{ + struct sched_param *const param = + tail_alloc(sizeof(struct sched_param)); + + long rc = syscall(__NR_sched_getparam, 0, param); + printf("sched_getparam(0, [%d]) = %ld\n", + param->sched_priority, rc); + + param->sched_priority = -1; + rc = syscall(__NR_sched_setparam, 0, param); + printf("sched_setparam(0, [%d]) = %ld %s (%m)\n", + param->sched_priority, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getparam && __NR_sched_setparam") + +#endif diff --git a/tests-m32/sched_xetparam.test b/tests-m32/sched_xetparam.test new file mode 100755 index 000000000..c9fede139 --- /dev/null +++ b/tests-m32/sched_xetparam.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getparam and sched_setparam syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e trace=sched_getparam,sched_setparam diff --git a/tests-m32/sched_xetscheduler.c b/tests-m32/sched_xetscheduler.c new file mode 100644 index 000000000..7faee8cd0 --- /dev/null +++ b/tests-m32/sched_xetscheduler.c @@ -0,0 +1,81 @@ +#include "tests.h" +#include + +#if defined __NR_sched_getscheduler && defined __NR_sched_setscheduler + +# include +# include +# include + +int +main(void) +{ + struct sched_param *const param = tail_alloc(sizeof(struct sched_param)); + long rc = syscall(__NR_sched_getscheduler, 0); + const char *scheduler; + switch (rc) { + case SCHED_FIFO: + scheduler = "SCHED_FIFO"; + break; + case SCHED_RR: + scheduler = "SCHED_RR"; + break; +# ifdef SCHED_BATCH + case SCHED_BATCH: + scheduler = "SCHED_BATCH"; + break; +# endif +# ifdef SCHED_IDLE + case SCHED_IDLE: + scheduler = "SCHED_IDLE"; + break; +# endif +# ifdef SCHED_ISO + case SCHED_ISO: + scheduler = "SCHED_ISO"; + break; +# endif +# ifdef SCHED_DEADLINE + case SCHED_DEADLINE: + scheduler = "SCHED_DEADLINE"; + break; +# endif + default: + scheduler = "SCHED_OTHER"; + } + printf("sched_getscheduler(0) = %ld (%s)\n", + rc, scheduler); + + rc = syscall(__NR_sched_getscheduler, -1); + printf("sched_getscheduler(-1) = %s\n", sprintrc(rc)); + + param->sched_priority = -1; + + rc = syscall(__NR_sched_setscheduler, 0, SCHED_FIFO, NULL); + printf("sched_setscheduler(0, SCHED_FIFO, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_sched_setscheduler, 0, SCHED_FIFO, param + 1); + printf("sched_setscheduler(0, SCHED_FIFO, %p) = %s\n", param + 1, + sprintrc(rc)); + + rc = syscall(__NR_sched_setscheduler, 0, 0xfaceda7a, param); + printf("sched_setscheduler(0, %#x /* SCHED_??? */, [%d]) = %s\n", + 0xfaceda7a, param->sched_priority, sprintrc(rc)); + + rc = syscall(__NR_sched_setscheduler, -1, SCHED_FIFO, param); + printf("sched_setscheduler(-1, SCHED_FIFO, [%d]) = %s\n", + param->sched_priority, sprintrc(rc)); + + rc = syscall(__NR_sched_setscheduler, 0, SCHED_FIFO, param); + printf("sched_setscheduler(0, SCHED_FIFO, [%d]) = %s\n", + param->sched_priority, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getscheduler && __NR_sched_setscheduler") + +#endif diff --git a/tests-m32/sched_xetscheduler.test b/tests-m32/sched_xetscheduler.test new file mode 100755 index 000000000..07c93f311 --- /dev/null +++ b/tests-m32/sched_xetscheduler.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getscheduler and sched_setscheduler syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -e trace=sched_getscheduler,sched_setscheduler diff --git a/tests-m32/sched_yield.c b/tests-m32/sched_yield.c new file mode 100644 index 000000000..355e7e8da --- /dev/null +++ b/tests-m32/sched_yield.c @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_sched_yield + +# include +# include + +int +main(void) +{ + printf("sched_yield() = %ld\n", syscall(__NR_sched_yield)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_yield") + +#endif diff --git a/tests-m32/sched_yield.test b/tests-m32/sched_yield.test new file mode 100755 index 000000000..f0c2c303d --- /dev/null +++ b/tests-m32/sched_yield.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_yield syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff --git a/tests-m32/scm_rights-fd.test b/tests-m32/scm_rights-fd.test new file mode 100755 index 000000000..8447375fd --- /dev/null +++ b/tests-m32/scm_rights-fd.test @@ -0,0 +1,80 @@ +#!/bin/sh +# +# Check how SCM_RIGHTS and SCM_CREDENTIALS control messages are decoded in -y mode. +# +# Copyright (c) 2014-2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -y is implemented using /proc/$pid/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog mkdir +check_prog rm +check_prog seq +check_prog touch + +dir="$LOG.dir" +rm -rf -- "$dir" +mkdir -- "$dir" || + framework_skip_ 'failed to create a directory' + +file="$dir/$(for i in $(seq 1 127); do echo A; done; echo Z)" + +touch -- "$file" || + framework_skip_ 'failed to create a file' + +run_prog ./scm_rights /dev/zero +run_strace -y -x -enetwork $args "$file" + +hex='[[:xdigit:]]' +n='[1-9][0-9]*' +sample="$(for i in $(seq 1 15); do printf '\\\\xf%x' $i; done)" +socket='' + +path6='(/.*/(A\\n){127}Z|\\x2f(\\x'"$hex$hex"')*\\x2f(\\x41\\x0a){127}\\x5a)' +rights_data='\[4, 5, 6<'"$path6"'>\]' +iov='\[\{iov_base="'"$sample"'", iov_len=15\}\]' +ids='\{pid='"$n"', uid=[0-9]+, gid=[0-9]+\}' + +msg_head='\{msg_name=NULL, msg_namelen=0, msg_iov='"$iov"', msg_iovlen=1, msg_control=' +msg_tail=', msg_controllen='"$n"', msg_flags=0' +rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data='"$rights_data"'\}' +creds='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data='"$ids"'\}' + +EXPECTED="$LOG.expected" + +cat > "$EXPECTED" << __EOF__ +sendmsg\\(3$socket, $msg_head\\[$rights\\]$msg_tail\\}, 0\\) = 15 +recvmsg\\(0$socket, $msg_head\\[$creds, $rights\\]$msg_tail\\}, 0\\) = 15 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" +rm -rf -- "$dir" + +exit 0 diff --git a/tests-m32/scm_rights.c b/tests-m32/scm_rights.c new file mode 100644 index 000000000..42caed7ca --- /dev/null +++ b/tests-m32/scm_rights.c @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +int main(int ac, const char **av) +{ + assert(ac > 0); + int fds[ac]; + + static const char sample[] = + "\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + const unsigned int data_size = sizeof(sample) - 1; + void *data = tail_alloc(data_size); + memcpy(data, sample, data_size); + + struct iovec *iov = tail_alloc(sizeof(struct iovec)); + iov->iov_base = data; + iov->iov_len = data_size; + + struct msghdr *mh = tail_alloc(sizeof(struct msghdr)); + memset(mh, 0, sizeof(*mh)); + mh->msg_iov = iov; + mh->msg_iovlen = 1; + + int i; + while ((i = open("/dev/null", O_RDWR)) <= ac + 2) + assert(i >= 0); + while (i > 2) + assert(close(i--) == 0); + assert(close(0) == 0); + + int sv[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + int one = 1; + if (setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one))) + perror_msg_and_skip("setsockopt"); + + assert((fds[0] = open("/dev/null", O_RDWR)) == 4); + for (i = 1; i < ac; ++i) + assert((fds[i] = open(av[i], O_RDONLY)) == i + 4); + + unsigned int cmsg_size = CMSG_SPACE(sizeof(fds)); + struct cmsghdr *cmsg = tail_alloc(cmsg_size); + memset(cmsg, 0, cmsg_size); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fds)); + memcpy(CMSG_DATA(cmsg), fds, sizeof(fds)); + + mh->msg_control = cmsg; + mh->msg_controllen = cmsg_size; + + assert(sendmsg(sv[1], mh, 0) == (int) data_size); + + assert(close(sv[1]) == 0); + assert(open("/dev/null", O_RDWR) == sv[1]); + + for (i = 0; i < ac; ++i) { + assert(close(fds[i]) == 0); + fds[i] = 0; + } + + cmsg_size += CMSG_SPACE(sizeof(struct ucred)); + cmsg = tail_alloc(cmsg_size); + memset(cmsg, 0, cmsg_size); + mh->msg_control = cmsg; + mh->msg_controllen = cmsg_size; + + assert(recvmsg(0, mh, 0) == (int) data_size); + assert(close(0) == 0); + + return 0; +} diff --git a/tests-m32/scno_tampering.sh b/tests-m32/scno_tampering.sh new file mode 100755 index 000000000..6aa78432c --- /dev/null +++ b/tests-m32/scno_tampering.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Skip the test if arch+kernel combination is not supported. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +uname_r="$(uname -r)" +case "$STRACE_ARCH" in + arm) + # PTRACE_SET_SYSCALL is supported by linux kernel + # starting with commit v2.6.16-rc1~107^2. + require_min_kernel_version_or_skip 2.6.16 ;; + aarch64) + # NT_ARM_SYSTEM_CALL regset is supported by linux kernel + # starting with commit v3.19-rc1~59^2~16. + require_min_kernel_version_or_skip 3.19 ;; + hppa) + # Syscall number and return value modification did not work + # properly before commit v4.5-rc7~31^2~1. + require_min_kernel_version_or_skip 4.5 ;; + sparc*) + # Reloading the syscall number from %g1 register is supported + # by linux kernel starting with commit v4.5-rc7~35^2~3. + require_min_kernel_version_or_skip 4.5 ;; + mips) + # Only the native ABI is supported by the kernel properly, see + # https://sourceforge.net/p/strace/mailman/message/35587571/ + uname_m="$(uname -m)" + case "$MIPS_ABI:$uname_m" in + o32:mips|n64:mips64) ;; + *) skip_ "$MIPS_ABI scno tampering does not work on $uname_m yet" ;; + esac ;; +esac diff --git a/tests-m32/seccomp-filter-v.c b/tests-m32/seccomp-filter-v.c new file mode 100644 index 000000000..dbf686d14 --- /dev/null +++ b/tests-m32/seccomp-filter-v.c @@ -0,0 +1,213 @@ +/* + * Check verbose decoding of seccomp SECCOMP_SET_MODE_FILTER. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +#ifdef HAVE_PRCTL +# include +#endif +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined __NR_seccomp \ + && defined PR_SET_NO_NEW_PRIVS \ + && defined SECCOMP_SET_MODE_FILTER \ + && defined SECCOMP_RET_ERRNO \ + && defined BPF_JUMP \ + && defined BPF_STMT + +#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW) + +#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|(SECCOMP_RET_DATA & (err))) + +#define SOCK_FILTER_KILL_PROCESS \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL) + +#define PRINT_ALLOW_SYSCALL(nr) \ + tprintf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), ", \ + __NR_ ## nr) + +#define PRINT_DENY_SYSCALL(nr, err) \ + tprintf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|%#x), ", \ + __NR_ ## nr, err) + +static const struct sock_filter filter_c[] = { + /* load syscall number */ + BPF_STMT(BPF_LD|BPF_W|BPF_ABS, offsetof(struct seccomp_data, nr)), + + /* allow syscalls */ + SOCK_FILTER_ALLOW_SYSCALL(close), + SOCK_FILTER_ALLOW_SYSCALL(exit), + SOCK_FILTER_ALLOW_SYSCALL(exit_group), + + /* deny syscalls */ + SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), + SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), + + /* kill process */ + SOCK_FILTER_KILL_PROCESS +}; + +#ifndef BPF_MAXINSNS +# define BPF_MAXINSNS 4096 +#endif + +int +main(void) +{ + tprintf("%s", ""); + + static const char kill_stmt_txt[] = + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL)"; + struct sock_filter *const filter = + tail_memdup(filter_c, sizeof(filter_c)); + struct sock_filter *const big_filter = + tail_alloc(sizeof(*big_filter) * (BPF_MAXINSNS + 1)); + struct sock_fprog *const prog = tail_alloc(sizeof(*prog)); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) + perror_msg_and_skip("PR_SET_NO_NEW_PRIVS"); + + prog->filter = filter + ARRAY_SIZE(filter_c); + prog->len = 1; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=1, filter=%p})" + " = -1 EFAULT (%m)\n", prog->filter); + + prog->filter = filter + ARRAY_SIZE(filter_c) - 1; + prog->len = 3; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=%u" + ", filter=[%s, %p]}) = -1 EFAULT (%m)\n", + prog->len, kill_stmt_txt, filter + ARRAY_SIZE(filter_c)); + + prog->len = 0; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=0, filter=[]})" + " = -1 EINVAL (%m)\n"); + + unsigned int i; + for (i = 0; i <= BPF_MAXINSNS; ++i) { + const struct sock_filter stmt = + BPF_STMT(BPF_CLASS(i), i << 16); + big_filter[i] = stmt; + } + + prog->filter = big_filter; + prog->len = BPF_MAXINSNS + 1; + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, %s, {len=%u, filter=[", + "SECCOMP_FILTER_FLAG_TSYNC|0xfffffffe", prog->len); + for (i = 0; i < BPF_MAXINSNS; ++i) { + if (i) + tprintf(", "); + switch(BPF_CLASS(i)) { + case BPF_LD: + tprintf("BPF_STMT(BPF_LD|BPF_W|BPF_IMM, %#x)", i << 16); + break; + case BPF_LDX: + tprintf("BPF_STMT(BPF_LDX|BPF_W|BPF_IMM, %#x)", i << 16); + break; + case BPF_ST: + tprintf("BPF_STMT(BPF_ST, %#x)", i << 16); + break; + case BPF_STX: + tprintf("BPF_STMT(BPF_STX, %#x)", i << 16); + break; + case BPF_ALU: + tprintf("BPF_STMT(BPF_ALU|BPF_K|BPF_ADD, %#x)", i << 16); + break; + case BPF_JMP: + tprintf("BPF_STMT(BPF_JMP|BPF_K|BPF_JA, %#x)", i << 16); + break; + case BPF_RET: + tprintf("BPF_STMT(BPF_RET|BPF_K, %#x" + " /* SECCOMP_RET_??? */)", i << 16); + break; + case BPF_MISC: + tprintf("BPF_STMT(BPF_MISC|BPF_TAX, %#x)", i << 16); + break; + } + } + tprintf(", ...]})"); + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -1, prog); + tprintf(" = -1 EINVAL (%m)\n"); + + prog->filter = filter; + prog->len = ARRAY_SIZE(filter_c); + + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=%u, filter=[", + prog->len); + + tprintf("BPF_STMT(BPF_LD|BPF_W|BPF_ABS, %#x), ", + (unsigned) offsetof(struct seccomp_data, nr)); + + PRINT_ALLOW_SYSCALL(close); + PRINT_ALLOW_SYSCALL(exit); + PRINT_ALLOW_SYSCALL(exit_group); + + PRINT_DENY_SYSCALL(sync, EBUSY), + PRINT_DENY_SYSCALL(setsid, EPERM), + + tprintf("%s]}) = 0\n+++ exited with 0 +++\n", kill_stmt_txt); + + if (syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog)) + perror_msg_and_skip("SECCOMP_SET_MODE_FILTER"); + + if (close(0) || close(1)) + _exit(77); + + _exit(0); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && PR_SET_NO_NEW_PRIVS" + " && SECCOMP_SET_MODE_FILTER && SECCOMP_RET_ERRNO" + " && BPF_JUMP && BPF_STMT") + +#endif diff --git a/tests-m32/seccomp-filter-v.test b/tests-m32/seccomp-filter-v.test new file mode 100755 index 000000000..f873eb6f0 --- /dev/null +++ b/tests-m32/seccomp-filter-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of seccomp SECCOMP_SET_MODE_FILTER. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=seccomp diff --git a/tests-m32/seccomp-filter.c b/tests-m32/seccomp-filter.c new file mode 100644 index 000000000..d4d76dd35 --- /dev/null +++ b/tests-m32/seccomp-filter.c @@ -0,0 +1,75 @@ +/* + * Check decoding of seccomp SECCOMP_SET_MODE_FILTER. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined __NR_seccomp && defined SECCOMP_SET_MODE_FILTER + +# define N 7 + +int +main(void) +{ + struct sock_filter *const filter = tail_alloc(sizeof(*filter) * N); + const void *const efault = tail_alloc(1); + struct sock_fprog *const prog = tail_alloc(sizeof(*prog)); + long rc; + + prog->filter = filter; + prog->len = N; + rc = syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -1, prog); + printf("seccomp(SECCOMP_SET_MODE_FILTER, %s, {len=%u, filter=%p})" + " = %ld %s (%m)\n", "SECCOMP_FILTER_FLAG_TSYNC|0xfffffffe", + prog->len, prog->filter, rc, errno2name()); + + rc = syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -2L, efault); + printf("seccomp(SECCOMP_SET_MODE_FILTER, %s, %p) = %ld %s (%m)\n", + "0xfffffffe /* SECCOMP_FILTER_FLAG_??? */", + efault, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && SECCOMP_SET_MODE_FILTER") + +#endif diff --git a/tests-m32/seccomp-filter.test b/tests-m32/seccomp-filter.test new file mode 100755 index 000000000..65c6d4955 --- /dev/null +++ b/tests-m32/seccomp-filter.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of seccomp SECCOMP_SET_MODE_FILTER. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=seccomp diff --git a/tests-m32/seccomp-strict.c b/tests-m32/seccomp-strict.c new file mode 100644 index 000000000..237b0ecac --- /dev/null +++ b/tests-m32/seccomp-strict.c @@ -0,0 +1,74 @@ +/* + * Check how seccomp SECCOMP_SET_MODE_STRICT is decoded. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_seccomp && defined __NR_exit + +# include +# include + +int +main(void) +{ + static const char text1[] = + "seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL) = 0\n"; + static const char text2[] = "+++ exited with 0 +++\n"; + const kernel_ulong_t addr = (kernel_ulong_t) 0xfacefeeddeadbeefULL; + long rc; + + rc = syscall(__NR_seccomp, -1L, -1L, addr); + printf("seccomp(%#x /* SECCOMP_SET_MODE_??? */, %u, %#llx)" + " = %s\n", -1, -1, (unsigned long long) addr, sprintrc(rc)); + fflush(stdout); + + rc = syscall(__NR_seccomp, 0, 0, 0); + if (rc) { + printf("seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL) = %s\n", + sprintrc(rc)); + fflush(stdout); + rc = 0; + } else { + /* + * If kernel implementaton of SECCOMP_MODE_STRICT is buggy, + * the following syscall will result to SIGKILL. + */ + rc = write(1, text1, LENGTH_OF(text1)) != LENGTH_OF(text1); + } + + rc += write(1, text2, LENGTH_OF(text2)) != LENGTH_OF(text2); + return !!syscall(__NR_exit, rc); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && __NR_exit") + +#endif diff --git a/tests-m32/seccomp-strict.test b/tests-m32/seccomp-strict.test new file mode 100755 index 000000000..b354c6a29 --- /dev/null +++ b/tests-m32/seccomp-strict.test @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check how seccomp SECCOMP_SET_MODE_STRICT is decoded. + +. "${srcdir=.}/init.sh" + +set -- "./$NAME" +"$@" > /dev/null || { + case $? in + 77) skip_ "$* exited with code 77" ;; + 137) framework_skip_ "$* killed by SIGKILL, fix your kernel" ;; + *) fail_ "$args failed" ;; + esac +} +run_strace -eseccomp "$@" > "$EXP" +match_diff "$LOG" "$EXP" +rm -f "$EXP" diff --git a/tests-m32/select.c b/tests-m32/select.c new file mode 100644 index 000000000..b5ff259d3 --- /dev/null +++ b/tests-m32/select.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_select && !defined __NR__newselect + +# define TEST_SYSCALL_NR __NR_select +# define TEST_SYSCALL_STR "select" +# include "xselect.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_select && !__NR__newselect") + +#endif diff --git a/tests-m32/select.test b/tests-m32/select.test new file mode 100755 index 000000000..60b88caf9 --- /dev/null +++ b/tests-m32/select.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check select syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff --git a/tests-m32/semop.c b/tests-m32/semop.c new file mode 100644 index 000000000..a2ff2635a --- /dev/null +++ b/tests-m32/semop.c @@ -0,0 +1,119 @@ +#include "tests.h" +#include +#include +#include +#include +#include +#include + +#include "xlat.h" +#include "xlat/semop_flags.h" + +union semun +{ + int val; + struct semid_ds *buf; + unsigned short *array; + struct seminfo *__buf; +}; + +static int id = -1; + +static void +cleanup(void) +{ + semctl(id, 0, IPC_RMID, 0); + id = -1; +} + +int +main(void) +{ + static const int bogus_semid = 0xfdb97531; + static void * const bogus_sops = (void *) -1L; + static const size_t bogus_nsops = (size_t) 0xdefaceddeadbeefULL; + + static const struct timespec ts_data = { 1, 123456789 }; + + struct timespec *ts = tail_memdup(&ts_data, sizeof(*ts)); + int rc; + + id = semget(IPC_PRIVATE, 1, 0600); + if (id < 0) + perror_msg_and_skip("semget"); + atexit(cleanup); + + union semun sem_union = { .val = 0 }; + if (semctl(id, 0, SETVAL, sem_union) == -1) + perror_msg_and_skip("semctl"); + + struct sembuf *const sem_b = tail_alloc(sizeof(*sem_b)); + struct sembuf *const sem_b2 = tail_alloc(sizeof(*sem_b2)); + + rc = semop(bogus_semid, NULL, bogus_nsops); + printf("semop(%d, NULL, %u) = %s\n", + bogus_semid, (unsigned) bogus_nsops, sprintrc(rc)); + + rc = semop(bogus_semid, bogus_sops, 1); + printf("semop(%d, %p, %u) = %s\n", + bogus_semid, bogus_sops, 1, sprintrc(rc)); + + sem_b->sem_num = 0; + sem_b->sem_op = 1; + sem_b->sem_flg = SEM_UNDO; + + sem_b2->sem_num = 0xface; + sem_b2->sem_op = 0xf00d; + sem_b2->sem_flg = 0xbeef; + + rc = semop(bogus_semid, sem_b2, 2); + printf("semop(%d, [{%hu, %hd, %s%s%#hx}, %p], %u) = %s\n", + bogus_semid, sem_b2->sem_num, sem_b2->sem_op, + sem_b2->sem_flg & SEM_UNDO ? "SEM_UNDO|" : "", + sem_b2->sem_flg & IPC_NOWAIT ? "IPC_NOWAIT|" : "", + sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT), + sem_b2 + 1, 2, sprintrc(rc)); + + if (semop(id, sem_b, 1)) + perror_msg_and_skip("semop, 1"); + printf("semop(%d, [{0, 1, SEM_UNDO}], 1) = 0\n", id); + + sem_b->sem_op = -1; + if (semop(id, sem_b, 1)) + perror_msg_and_skip("semop, -1"); + printf("semop(%d, [{0, -1, SEM_UNDO}], 1) = 0\n", id); + + rc = semtimedop(bogus_semid, NULL, bogus_nsops, NULL); + printf("semtimedop(%d, NULL, %u, NULL) = %s\n", + bogus_semid, (unsigned) bogus_nsops, sprintrc(rc)); + + rc = semtimedop(id, sem_b + 1, 1, ts + 1); + printf("semtimedop(%d, %p, 1, %p) = %s\n", + id, sem_b + 1, ts + 1, sprintrc(rc)); + + rc = semtimedop(bogus_semid, sem_b2, 2, ts); + printf("semtimedop(%d, [{%hu, %hd, %s%s%#hx}, %p], %u, " + "{tv_sec=%jd, tv_nsec=%jd}) = %s\n", + bogus_semid, sem_b2->sem_num, sem_b2->sem_op, + sem_b2->sem_flg & SEM_UNDO ? "SEM_UNDO|" : "", + sem_b2->sem_flg & IPC_NOWAIT ? "IPC_NOWAIT|" : "", + sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT), + sem_b2 + 1, 2, + (intmax_t) ts->tv_sec, (intmax_t) ts->tv_nsec, + sprintrc(rc)); + + sem_b->sem_op = 1; + if (semtimedop(id, sem_b, 1, NULL)) + perror_msg_and_skip("semtimedop, 1"); + printf("semtimedop(%d, [{0, 1, SEM_UNDO}], 1, NULL) = 0\n", id); + + sem_b->sem_op = -1; + if (semtimedop(id, sem_b, 1, ts)) + perror_msg_and_skip("semtimedop, -1"); + printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1, " + "{tv_sec=%jd, tv_nsec=%jd}) = 0\n", id, + (intmax_t) ts->tv_sec, (intmax_t) ts->tv_nsec); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/semop.test b/tests-m32/semop.test new file mode 100755 index 000000000..3e77d2f92 --- /dev/null +++ b/tests-m32/semop.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check semop syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 -e trace=semop,semtimedop diff --git a/tests-m32/sendfile.c b/tests-m32/sendfile.c new file mode 100644 index 000000000..23f096b62 --- /dev/null +++ b/tests-m32/sendfile.c @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_sendfile + +# include +# include +# include +# include +# include +# include +# include +# include + +int +main(int ac, const char **av) +{ + assert(ac == 1); + + (void) close(0); + if (open("/dev/zero", O_RDONLY) != 0) + perror_msg_and_skip("open: %s", "/dev/zero"); + + int sv[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + + int reg_in = open(av[0], O_RDONLY); + if (reg_in < 0) + perror_msg_and_fail("open: %s", av[0]); + + struct stat stb; + assert(fstat(reg_in, &stb) == 0); + const size_t blen = stb.st_size / 3; + const size_t alen = stb.st_size - blen; + assert(S_ISREG(stb.st_mode) && blen > 0); + + const size_t page_len = get_page_size(); + assert(syscall(__NR_sendfile, 0, 1, NULL, page_len) == -1); + if (EBADF != errno) + perror_msg_and_skip("sendfile"); + printf("sendfile(0, 1, NULL, %lu) = -1 EBADF (%m)\n", + (unsigned long) page_len); + + uint32_t *p_off = tail_alloc(sizeof(uint32_t)); + void *p = p_off + 1; + *p_off = 0; + + assert(syscall(__NR_sendfile, 0, 1, p, page_len) == -1); + printf("sendfile(0, 1, %#lx, %lu) = -1 EFAULT (%m)\n", + (unsigned long) p, (unsigned long) page_len); + + assert(syscall(__NR_sendfile, sv[1], reg_in, NULL, alen) + == (long) alen); + printf("sendfile(%d, %d, NULL, %lu) = %lu\n", + sv[1], reg_in, (unsigned long) alen, + (unsigned long) alen); + + p = p_off; + if (syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) != (long) alen) { + printf("sendfile(%d, %d, %#lx, %lu) = -1 EFAULT (%m)\n", + sv[1], reg_in, (unsigned long) p_off, + (unsigned long) alen); + --p_off; + *p_off = 0; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) + == (long) alen); + } + printf("sendfile(%d, %d, [0] => [%lu], %lu) = %lu\n", + sv[1], reg_in, (unsigned long) alen, + (unsigned long) alen, (unsigned long) alen); + + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, stb.st_size + 1) + == (long) blen); + printf("sendfile(%d, %d, [%lu] => [%lu], %lu) = %lu\n", + sv[1], reg_in, (unsigned long) alen, + (unsigned long) stb.st_size, + (unsigned long) stb.st_size + 1, + (unsigned long) blen); + + if (p_off != p) { + uint64_t *p_off64 = (uint64_t *) p_off; + *p_off64 = 0xcafef00dfacefeedULL; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off64, 1) == -1); + printf("sendfile(%d, %d, [14627392582579060461], 1)" + " = -1 EINVAL (%m)\n", sv[1], reg_in); + *p_off64 = 0xdefaced; + } else { + *p_off = 0xdefaced; + } + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, 1) == 0); + printf("sendfile(%d, %d, [233811181], 1) = 0\n", + sv[1], reg_in); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sendfile") + +#endif diff --git a/tests-m32/sendfile.test b/tests-m32/sendfile.test new file mode 100755 index 000000000..48dba5856 --- /dev/null +++ b/tests-m32/sendfile.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sendfile syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-m32/sendfile64.c b/tests-m32/sendfile64.c new file mode 100644 index 000000000..7208c3006 --- /dev/null +++ b/tests-m32/sendfile64.c @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_sendfile64 + +# include +# include +# include +# include +# include +# include +# include +# include + +int +main(int ac, const char **av) +{ + assert(ac == 1); + + (void) close(0); + if (open("/dev/zero", O_RDONLY) != 0) + perror_msg_and_skip("open: %s", "/dev/zero"); + + int sv[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + + int reg_in = open(av[0], O_RDONLY); + if (reg_in < 0) + perror_msg_and_fail("open: %s", av[0]); + + struct stat stb; + assert(fstat(reg_in, &stb) == 0); + const size_t blen = stb.st_size / 3; + const size_t alen = stb.st_size - blen; + assert(S_ISREG(stb.st_mode) && blen > 0); + + const size_t page_len = get_page_size(); + assert(syscall(__NR_sendfile64, 0, 1, NULL, page_len) == -1); + if (EBADF != errno) + perror_msg_and_skip("sendfile64"); + printf("sendfile64(0, 1, NULL, %lu) = -1 EBADF (%m)\n", + (unsigned long) page_len); + + uint64_t *p_off = tail_alloc(sizeof(uint64_t)); + void *p = p_off + 1; + *p_off = 0; + + assert(syscall(__NR_sendfile64, 0, 1, p, page_len) == -1); + printf("sendfile64(0, 1, %#lx, %lu) = -1 EFAULT (%m)\n", + (unsigned long) p, (unsigned long) page_len); + + assert(syscall(__NR_sendfile64, sv[1], reg_in, NULL, alen) + == (long) alen); + printf("sendfile64(%d, %d, NULL, %lu) = %lu\n", + sv[1], reg_in, (unsigned long) alen, + (unsigned long) alen); + + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, alen) + == (long) alen); + printf("sendfile64(%d, %d, [0] => [%lu], %lu) = %lu\n", + sv[1], reg_in, (unsigned long) alen, + (unsigned long) alen, (unsigned long) alen); + + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, stb.st_size + 1) + == (long) blen); + printf("sendfile64(%d, %d, [%lu] => [%lu], %lu) = %lu\n", + sv[1], reg_in, (unsigned long) alen, + (unsigned long) stb.st_size, + (unsigned long) stb.st_size + 1, + (unsigned long) blen); + + *p_off = 0xcafef00dfacefeedULL; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == -1); + printf("sendfile64(%d, %d, [14627392582579060461], 1)" + " = -1 EINVAL (%m)\n", sv[1], reg_in); + + *p_off = 0xfacefeed; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == 0); + printf("sendfile64(%d, %d, [4207869677], 1) = 0\n", sv[1], reg_in); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sendfile64") + +#endif diff --git a/tests-m32/sendfile64.test b/tests-m32/sendfile64.test new file mode 100755 index 000000000..faa05254e --- /dev/null +++ b/tests-m32/sendfile64.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sendfile64 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a29 diff --git a/tests-m32/set_mempolicy.c b/tests-m32/set_mempolicy.c new file mode 100644 index 000000000..f3261a094 --- /dev/null +++ b/tests-m32/set_mempolicy.c @@ -0,0 +1,146 @@ +/* + * Check decoding of set_mempolicy syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_set_mempolicy + +# include +# include +# include +# include + +# include "xlat.h" +# include "xlat/policies.h" + +# define MAX_STRLEN 3 +# define NLONGS(n) ((n + 8 * sizeof(long) - 2) \ + / (8 * sizeof(long))) + +static void +print_nodes(const unsigned long maxnode, unsigned int offset) +{ + unsigned int nlongs = NLONGS(maxnode); + if (nlongs <= offset) + nlongs = 0; + else + nlongs -= offset; + const unsigned int size = nlongs * sizeof(long); + unsigned long *const nodemask = + tail_alloc(size ? size : (offset ? 1 : 0)); + memset(nodemask, 0, size); + + long rc = syscall(__NR_set_mempolicy, 0, nodemask, maxnode); + const char *errstr = sprintrc(rc); + + fputs("set_mempolicy(MPOL_DEFAULT, ", stdout); + + if (nlongs) { + putc('[', stdout); + unsigned int i; + for (i = 0; i < nlongs + offset; ++i) { + if (i) + fputs(", ", stdout); + if (i < nlongs) { + if (i >= MAX_STRLEN) { + fputs("...", stdout); + break; + } + printf("%#0*lx", (int) sizeof(long) * 2 + 2, + nodemask[i]); + } else { + printf("%p", nodemask + i); + break; + } + } + putc(']', stdout); + } else { + if (maxnode) + printf("%p", nodemask); + else + printf("[]"); + } + + printf(", %lu) = %s\n", maxnode, errstr); +} + +static void +test_offset(const unsigned int offset) +{ + unsigned long maxnode = get_page_size() * 8; + + print_nodes(maxnode, offset); + print_nodes(maxnode + 1, offset); + print_nodes(maxnode + 2, offset); + + maxnode = sizeof(long) * 8; + print_nodes(0, offset); + print_nodes(1, offset); + print_nodes(2, offset); + print_nodes(maxnode - 1, offset); + print_nodes(maxnode , offset); + print_nodes(maxnode + 1, offset); + print_nodes(maxnode + 2, offset); + print_nodes(maxnode * 2 - 1, offset); + print_nodes(maxnode * 2 , offset); + print_nodes(maxnode * 2 + 1, offset); + print_nodes(maxnode * 2 + 2, offset); + print_nodes(maxnode * 3 - 1, offset); + print_nodes(maxnode * 3 , offset); + print_nodes(maxnode * 3 + 1, offset); + print_nodes(maxnode * 3 + 2, offset); + print_nodes(maxnode * 4 + 2, offset); +} + +int +main(void) +{ + if (syscall(__NR_set_mempolicy, 0, 0, 0)) + perror_msg_and_skip("set_mempolicy"); + puts("set_mempolicy(MPOL_DEFAULT, NULL, 0) = 0"); + + const unsigned long *nodemask = (void *) 0xfacefeedfffffffeULL; + const unsigned long maxnode = (unsigned long) 0xcafef00dbadc0dedULL; + long rc = syscall(__NR_set_mempolicy, 1, nodemask, maxnode); + printf("set_mempolicy(MPOL_PREFERRED, %p, %lu) = %s\n", + nodemask, maxnode, sprintrc(rc)); + + test_offset(0); + test_offset(1); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_set_mempolicy") + +#endif diff --git a/tests-m32/set_mempolicy.test b/tests-m32/set_mempolicy.test new file mode 100755 index 000000000..0ed6666cb --- /dev/null +++ b/tests-m32/set_mempolicy.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check set_mempolicy syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 -a35 diff --git a/tests-m32/set_ptracer_any.c b/tests-m32/set_ptracer_any.c new file mode 100644 index 000000000..bc2f90cab --- /dev/null +++ b/tests-m32/set_ptracer_any.c @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#ifdef HAVE_PRCTL +# include +#endif + +int main(int argc, char **argv) +{ + if (argc < 2) + return 99; +#if defined HAVE_PRCTL && defined PR_SET_PTRACER && defined PR_SET_PTRACER_ANY + /* Turn off restrictions on tracing if applicable. If the options + * aren't available on this system, that's OK too. */ + (void) prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY); +#endif + if (write(1, "\n", 1) != 1) { + perror("write"); + return 99; + } + (void) execvp(argv[1], argv + 1); + perror(argv[1]); + return 99; +} diff --git a/tests-m32/setdomainname.c b/tests-m32/setdomainname.c new file mode 100644 index 000000000..f3e248409 --- /dev/null +++ b/tests-m32/setdomainname.c @@ -0,0 +1,24 @@ +#include "tests.h" +#include + +#ifdef __NR_setdomainname + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_setdomainname, 0, 63); + printf("setdomainname(NULL, 63) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setdomainname") + +#endif diff --git a/tests-m32/setdomainname.test b/tests-m32/setdomainname.test new file mode 100755 index 000000000..2159e7c49 --- /dev/null +++ b/tests-m32/setdomainname.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setdomainname syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff --git a/tests-m32/setfsgid.c b/tests-m32/setfsgid.c new file mode 100644 index 000000000..871f4b35f --- /dev/null +++ b/tests-m32/setfsgid.c @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsgid + +# define SYSCALL_NR __NR_setfsgid +# define SYSCALL_NAME "setfsgid" + +# if defined __NR_setfsgid32 && __NR_setfsgid != __NR_setfsgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# endif + +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsgid") + +#endif diff --git a/tests-m32/setfsgid.test b/tests-m32/setfsgid.test new file mode 100755 index 000000000..0ae2b0a2c --- /dev/null +++ b/tests-m32/setfsgid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff --git a/tests-m32/setfsgid32.c b/tests-m32/setfsgid32.c new file mode 100644 index 000000000..6279abd30 --- /dev/null +++ b/tests-m32/setfsgid32.c @@ -0,0 +1,16 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsgid32 + +# define SYSCALL_NR __NR_setfsgid32 +# define SYSCALL_NAME "setfsgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsgid32") + +#endif diff --git a/tests-m32/setfsgid32.test b/tests-m32/setfsgid32.test new file mode 100755 index 000000000..9b7a2bf89 --- /dev/null +++ b/tests-m32/setfsgid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff --git a/tests-m32/setfsugid.c b/tests-m32/setfsugid.c new file mode 100644 index 000000000..79ba34d89 --- /dev/null +++ b/tests-m32/setfsugid.c @@ -0,0 +1,76 @@ +/* + * Check decoding of setfsuid/setfsgid/setfsuid32/setfsgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +void +printuid(unsigned UGID_TYPE id) +{ + if (id == (unsigned UGID_TYPE) -1U) + printf("-1"); + else + printf("%u", id); +} + +int +main(void) +{ + unsigned int ugid = GETUGID; + + const kernel_ulong_t tests[] = { + ugid, + 0xffff0000U | ugid, + (kernel_ulong_t) 0xffffffff00000000ULL | ugid, + 0xffffU, + -1U, + -1L, + 0xc0deffffU, + 0xfacefeedU, + (long) 0xfacefeeddeadbeefULL + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int num = (unsigned UGID_TYPE) tests[i]; + unsigned int rc; + + rc = syscall(SYSCALL_NR, tests[i]); + printf("%s(", SYSCALL_NAME); + printuid(num); + printf(") = %u\n", rc); + + rc = syscall(SYSCALL_NR, ugid); + printf("%s(%u) = %u\n", SYSCALL_NAME, ugid, rc); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/setfsuid.c b/tests-m32/setfsuid.c new file mode 100644 index 000000000..d6faf9711 --- /dev/null +++ b/tests-m32/setfsuid.c @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsuid + +# define SYSCALL_NR __NR_setfsuid +# define SYSCALL_NAME "setfsuid" + +# if defined __NR_setfsuid32 && __NR_setfsuid != __NR_setfsuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# endif + +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsuid") + +#endif diff --git a/tests-m32/setfsuid.test b/tests-m32/setfsuid.test new file mode 100755 index 000000000..18a102198 --- /dev/null +++ b/tests-m32/setfsuid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff --git a/tests-m32/setfsuid32.c b/tests-m32/setfsuid32.c new file mode 100644 index 000000000..b71cf2354 --- /dev/null +++ b/tests-m32/setfsuid32.c @@ -0,0 +1,16 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsuid32 + +# define SYSCALL_NR __NR_setfsuid32 +# define SYSCALL_NAME "setfsuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsuid32") + +#endif diff --git a/tests-m32/setfsuid32.test b/tests-m32/setfsuid32.test new file mode 100755 index 000000000..2dce3cc9e --- /dev/null +++ b/tests-m32/setfsuid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff --git a/tests-m32/setgid.c b/tests-m32/setgid.c new file mode 100644 index 000000000..8794a0a4b --- /dev/null +++ b/tests-m32/setgid.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setgid + +# define SYSCALL_NR __NR_setgid +# define SYSCALL_NAME "setgid" + +# if defined __NR_setgid32 && __NR_setgid != __NR_setgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgid") + +#endif diff --git a/tests-m32/setgid.test b/tests-m32/setgid.test new file mode 100755 index 000000000..a3a90041d --- /dev/null +++ b/tests-m32/setgid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-m32/setgid32.c b/tests-m32/setgid32.c new file mode 100644 index 000000000..17f43c585 --- /dev/null +++ b/tests-m32/setgid32.c @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setgid32 + +# define SYSCALL_NR __NR_setgid32 +# define SYSCALL_NAME "setgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgid32") + +#endif diff --git a/tests-m32/setgid32.test b/tests-m32/setgid32.test new file mode 100755 index 000000000..11a87e12c --- /dev/null +++ b/tests-m32/setgid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff --git a/tests-m32/setgroups.c b/tests-m32/setgroups.c new file mode 100644 index 000000000..1ec8333ff --- /dev/null +++ b/tests-m32/setgroups.c @@ -0,0 +1,190 @@ +/* + * Check decoding of setgroups/setgroups32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __NR_setgroups32 + +# define SYSCALL_NR __NR_setgroups32 +# define SYSCALL_NAME "setgroups32" +# define GID_TYPE unsigned int + +#else + +# include "tests.h" +# include + +# ifdef __NR_setgroups + +# define SYSCALL_NR __NR_setgroups +# define SYSCALL_NAME "setgroups" +# if defined __NR_setgroups32 && __NR_setgroups != __NR_setgroups32 +# define GID_TYPE unsigned short +# else +# define GID_TYPE unsigned int +# endif + +# endif + +#endif + +#ifdef GID_TYPE + +# include +# include + +void +printuid(GID_TYPE id) +{ + if (id == (GID_TYPE) -1U) + printf("-1"); + else + printf("%u", id); +} + +int +main(void) +{ + const char *errstr; + + /* check how the first argument is decoded */ + long rc = syscall(SYSCALL_NR, 0, 0); + printf("%s(0, NULL) = %s\n", SYSCALL_NAME, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL, 0); + printf("%s(0, NULL) = %s\n", SYSCALL_NAME, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, 1, 0); + printf("%s(1, NULL) = %s\n", SYSCALL_NAME, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000001ULL, 0); + printf("%s(1, NULL) = %s\n", SYSCALL_NAME, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, -1U, 0); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, -1, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, -1L, 0); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, -1, sprintrc(rc)); + + /* check how the second argument is decoded */ + const GID_TYPE *const g1 = tail_alloc(sizeof(*g1)); + GID_TYPE *const g2 = tail_alloc(sizeof(*g2) * 2); + GID_TYPE *const g3 = tail_alloc(sizeof(*g3) * 3); + + rc = syscall(SYSCALL_NR, 0, g1 + 1); + printf("%s(0, []) = %s\n", SYSCALL_NAME, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, 1, g1); + errstr = sprintrc(rc); + printf("%s(1, [", SYSCALL_NAME); + printuid(*g1); + printf("]) = %s\n", errstr); + + rc = syscall(SYSCALL_NR, 1, g1 + 1); + printf("%s(1, %p) = %s\n", SYSCALL_NAME, g1 + 1, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, 1, -1L); + printf("%s(1, %#lx) = %s\n", SYSCALL_NAME, -1L, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, 2, g1); + errstr = sprintrc(rc); + printf("%s(2, [", SYSCALL_NAME); + printuid(*g1); + printf(", %p]) = %s\n", g1 + 1, errstr); + + g2[0] = -2; + g2[1] = -3; + rc = syscall(SYSCALL_NR, 2, g2); + errstr = sprintrc(rc); + printf("%s(2, [", SYSCALL_NAME); + printuid(g2[0]); + printf(", "); + printuid(g2[1]); + printf("]) = %s\n", errstr); + + rc = syscall(SYSCALL_NR, 3, g2); + errstr = sprintrc(rc); + printf("%s(3, [", SYSCALL_NAME); + printuid(g2[0]); + printf(", "); + printuid(g2[1]); + printf(", %p]) = %s\n", g2 + 2, errstr); + + g3[0] = 0; + g3[1] = 1; + rc = syscall(SYSCALL_NR, 3, g3); + errstr = sprintrc(rc); + printf("%s(3, [", SYSCALL_NAME); + printuid(g3[0]); + printf(", "); + printuid(g3[1]); + printf(", ...]) = %s\n", errstr); + + rc = syscall(SYSCALL_NR, 4, g3); + errstr = sprintrc(rc); + printf("%s(4, [", SYSCALL_NAME); + printuid(g3[0]); + printf(", "); + printuid(g3[1]); + printf(", ...]) = %s\n", errstr); + + rc = sysconf(_SC_NGROUPS_MAX); + const unsigned ngroups_max = rc; + + if ((unsigned long) rc == ngroups_max && (int) ngroups_max > 0) { + rc = syscall(SYSCALL_NR, ngroups_max, g3); + errstr = sprintrc(rc); + printf("%s(%d, [", SYSCALL_NAME, ngroups_max); + printuid(g3[0]); + printf(", "); + printuid(g3[1]); + printf(", ...]) = %s\n", errstr); + + const unsigned long size = + (unsigned long) 0xffffffff00000000ULL | ngroups_max; + rc = syscall(SYSCALL_NR, size, g3); + errstr = sprintrc(rc); + printf("%s(%d, [", SYSCALL_NAME, ngroups_max); + printuid(g3[0]); + printf(", "); + printuid(g3[1]); + printf(", ...]) = %s\n", errstr); + + rc = syscall(SYSCALL_NR, ngroups_max + 1, g3); + printf("%s(%d, %p) = %s\n", SYSCALL_NAME, + ngroups_max + 1, g3, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgroups") + +#endif diff --git a/tests-m32/setgroups.test b/tests-m32/setgroups.test new file mode 100755 index 000000000..0dcc8f756 --- /dev/null +++ b/tests-m32/setgroups.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgroups syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s2 -a17 diff --git a/tests-m32/setgroups32.c b/tests-m32/setgroups32.c new file mode 100644 index 000000000..ecf00bbde --- /dev/null +++ b/tests-m32/setgroups32.c @@ -0,0 +1,12 @@ +#include "tests.h" +#include + +#ifdef __NR_setgroups32 + +# include "setgroups.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgroups32") + +#endif diff --git a/tests-m32/setgroups32.test b/tests-m32/setgroups32.test new file mode 100755 index 000000000..ee4750d1b --- /dev/null +++ b/tests-m32/setgroups32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgroups32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s2 -a19 diff --git a/tests-m32/sethostname.c b/tests-m32/sethostname.c new file mode 100644 index 000000000..e1b2f0696 --- /dev/null +++ b/tests-m32/sethostname.c @@ -0,0 +1,79 @@ +/* + * Check decoding of sethostname syscall. + * + * Copyright (c) 2016 Fei Jie + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_sethostname + +# include +# include + +#ifdef HAVE_LINUX_UTSNAME_H +# include +#endif + +#ifndef __NEW_UTS_LEN +# define __NEW_UTS_LEN 64 +#endif + +int +main(void) +{ + kernel_ulong_t len; + long rc; + + len = __NEW_UTS_LEN; + rc = syscall(__NR_sethostname, 0, len); + printf("sethostname(NULL, %u) = %s\n", + (unsigned) len, sprintrc(rc)); + + if (F8ILL_KULONG_MASK) { + len |= F8ILL_KULONG_MASK; + rc = syscall(__NR_sethostname, 0, len); + printf("sethostname(NULL, %u) = %s\n", + (unsigned) len, sprintrc(rc)); + } + + len = __NEW_UTS_LEN + 1; + void *const p = tail_alloc(len); + rc = syscall(__NR_sethostname, p, len); + printf("sethostname(%p, %u) = %s\n", + p, (unsigned) len, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sethostname") + +#endif diff --git a/tests-m32/sethostname.test b/tests-m32/sethostname.test new file mode 100755 index 000000000..78f8c58ed --- /dev/null +++ b/tests-m32/sethostname.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sethostname syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff --git a/tests-m32/setns.c b/tests-m32/setns.c new file mode 100644 index 000000000..54a15317e --- /dev/null +++ b/tests-m32/setns.c @@ -0,0 +1,73 @@ +/* + * Check decoding of setns syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_setns + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_fd = + (kernel_ulong_t) 0xfeedfacedeadc0deULL; + + static struct { + kernel_ulong_t val; + const char *str; + } nstypes[] = { + { (kernel_ulong_t) 0xdefaced100000000ULL, "0" }, + { (kernel_ulong_t) 0xbadc0dedfeedfaceULL, + "0xfeedface /* CLONE_NEW??? */" }, + { (kernel_ulong_t) 0xca75f15702000000ULL, "CLONE_NEWCGROUP" }, + }; + + long rc; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(nstypes); i++) { + rc = syscall(__NR_setns, bogus_fd, nstypes[i].val); + printf("setns(%d, %s) = %s\n", + (int) bogus_fd, nstypes[i].str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setns"); + +#endif diff --git a/tests-m32/setns.test b/tests-m32/setns.test new file mode 100755 index 000000000..e9a905abd --- /dev/null +++ b/tests-m32/setns.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of setns syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff --git a/tests-m32/setregid.c b/tests-m32/setregid.c new file mode 100644 index 000000000..e1da7862d --- /dev/null +++ b/tests-m32/setregid.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setregid + +# define SYSCALL_NR __NR_setregid +# define SYSCALL_NAME "setregid" + +# if defined __NR_setregid32 && __NR_setregid != __NR_setregid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setregid") + +#endif diff --git a/tests-m32/setregid.test b/tests-m32/setregid.test new file mode 100755 index 000000000..101c7bdfb --- /dev/null +++ b/tests-m32/setregid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setregid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a15 diff --git a/tests-m32/setregid32.c b/tests-m32/setregid32.c new file mode 100644 index 000000000..3cf0daf6f --- /dev/null +++ b/tests-m32/setregid32.c @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setregid32 + +# define SYSCALL_NR __NR_setregid32 +# define SYSCALL_NAME "setregid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setregid32") + +#endif diff --git a/tests-m32/setregid32.test b/tests-m32/setregid32.test new file mode 100755 index 000000000..e57e66c4d --- /dev/null +++ b/tests-m32/setregid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setregid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff --git a/tests-m32/setresgid.c b/tests-m32/setresgid.c new file mode 100644 index 000000000..8701df8ed --- /dev/null +++ b/tests-m32/setresgid.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setresgid + +# define SYSCALL_NR __NR_setresgid +# define SYSCALL_NAME "setresgid" + +# if defined __NR_setresgid32 && __NR_setresgid != __NR_setresgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresgid") + +#endif diff --git a/tests-m32/setresgid.test b/tests-m32/setresgid.test new file mode 100755 index 000000000..5a695742b --- /dev/null +++ b/tests-m32/setresgid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff --git a/tests-m32/setresgid32.c b/tests-m32/setresgid32.c new file mode 100644 index 000000000..dfce45727 --- /dev/null +++ b/tests-m32/setresgid32.c @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setresgid32 + +# define SYSCALL_NR __NR_setresgid32 +# define SYSCALL_NAME "setresgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresgid32") + +#endif diff --git a/tests-m32/setresgid32.test b/tests-m32/setresgid32.test new file mode 100755 index 000000000..528b2c9ed --- /dev/null +++ b/tests-m32/setresgid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff --git a/tests-m32/setresugid.c b/tests-m32/setresugid.c new file mode 100644 index 000000000..711bd317c --- /dev/null +++ b/tests-m32/setresugid.c @@ -0,0 +1,113 @@ +/* + * Check decoding of setresuid/setresgid/setresuid32/setresgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf("-1"); + else + printf("%u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int ugid) +{ + return num == ugid || num == -1U; +} + +#define TRIPLE(val) \ + { val, ugid, ugid }, { ugid, val, ugid }, { ugid, ugid, val } + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const struct { + const long r, e, s; + } tests[] = { + { ugid, ugid, ugid }, + TRIPLE((unsigned long) 0xffffffff00000000ULL | ugid), + TRIPLE(-1U), + TRIPLE(-1L), + TRIPLE(0xffff0000U | ugid), + TRIPLE(0xffff), + TRIPLE(0xc0deffffU) + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int rn = ugid2int(tests[i].r); + const unsigned int en = ugid2int(tests[i].e); + const unsigned int sn = ugid2int(tests[i].s); + + if (!num_matches_id(rn, ugid) || + !num_matches_id(en, ugid) || + !num_matches_id(sn, ugid)) + continue; + + if (syscall(SYSCALL_NR, tests[i].r, tests[i].e, tests[i].s)) { + if (!i && ENOSYS == errno) { + printf("%s(%u, %u, %u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid, ugid, ugid); + break; + } + perror_msg_and_fail("%s(%#lx, %#lx, %#lx)", + SYSCALL_NAME, + tests[i].r, tests[i].e, tests[i].s); + } + + printf("%s(", SYSCALL_NAME); + print_int(rn); + printf(", "); + print_int(en); + printf(", "); + print_int(sn); + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/setresuid.c b/tests-m32/setresuid.c new file mode 100644 index 000000000..3a9dbd1fc --- /dev/null +++ b/tests-m32/setresuid.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setresuid + +# define SYSCALL_NR __NR_setresuid +# define SYSCALL_NAME "setresuid" + +# if defined __NR_setresuid32 && __NR_setresuid != __NR_setresuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresuid") + +#endif diff --git a/tests-m32/setresuid.test b/tests-m32/setresuid.test new file mode 100755 index 000000000..f1219e069 --- /dev/null +++ b/tests-m32/setresuid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff --git a/tests-m32/setresuid32.c b/tests-m32/setresuid32.c new file mode 100644 index 000000000..387268a7f --- /dev/null +++ b/tests-m32/setresuid32.c @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setresuid32 + +# define SYSCALL_NR __NR_setresuid32 +# define SYSCALL_NAME "setresuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresuid32") + +#endif diff --git a/tests-m32/setresuid32.test b/tests-m32/setresuid32.test new file mode 100755 index 000000000..942a3a650 --- /dev/null +++ b/tests-m32/setresuid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff --git a/tests-m32/setreugid.c b/tests-m32/setreugid.c new file mode 100644 index 000000000..38c80d576 --- /dev/null +++ b/tests-m32/setreugid.c @@ -0,0 +1,106 @@ +/* + * Check decoding of setreuid/setregid/setreuid32/setregid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf("-1"); + else + printf("%u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int ugid) +{ + return num == ugid || num == -1U; +} + +#define PAIR(val) { val, ugid }, { ugid, val } + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const struct { + const long r, e; + } tests[] = { + { ugid, ugid }, + PAIR((unsigned long) 0xffffffff00000000ULL | ugid), + PAIR(-1U), + PAIR(-1L), + PAIR(0xffff0000U | ugid), + PAIR(0xffff), + PAIR(0xc0deffffU) + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int rn = ugid2int(tests[i].r); + const unsigned int en = ugid2int(tests[i].e); + + if (!num_matches_id(rn, ugid) || !num_matches_id(en, ugid)) + continue; + + if (syscall(SYSCALL_NR, tests[i].r, tests[i].e)) { + if (!i && ENOSYS == errno) { + printf("%s(%u, %u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid, ugid); + break; + } + perror_msg_and_fail("%s(%#lx, %#lx)", SYSCALL_NAME, + tests[i].r, tests[i].e); + } + + printf("%s(", SYSCALL_NAME); + print_int(rn); + printf(", "); + print_int(en); + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/setreuid.c b/tests-m32/setreuid.c new file mode 100644 index 000000000..68e751923 --- /dev/null +++ b/tests-m32/setreuid.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setreuid + +# define SYSCALL_NR __NR_setreuid +# define SYSCALL_NAME "setreuid" + +# if defined __NR_setreuid32 && __NR_setreuid != __NR_setreuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setreuid") + +#endif diff --git a/tests-m32/setreuid.test b/tests-m32/setreuid.test new file mode 100755 index 000000000..b6db3c1d8 --- /dev/null +++ b/tests-m32/setreuid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setreuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a15 diff --git a/tests-m32/setreuid32.c b/tests-m32/setreuid32.c new file mode 100644 index 000000000..ba0176211 --- /dev/null +++ b/tests-m32/setreuid32.c @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setreuid32 + +# define SYSCALL_NR __NR_setreuid32 +# define SYSCALL_NAME "setreuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setreuid32") + +#endif diff --git a/tests-m32/setreuid32.test b/tests-m32/setreuid32.test new file mode 100755 index 000000000..23323d473 --- /dev/null +++ b/tests-m32/setreuid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setreuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff --git a/tests-m32/setrlimit.c b/tests-m32/setrlimit.c new file mode 100644 index 000000000..e93c8e372 --- /dev/null +++ b/tests-m32/setrlimit.c @@ -0,0 +1,70 @@ +/* + * Check decoding of setrlimit syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_setrlimit + +# include "xgetrlimit.c" + +int +main(void) +{ + kernel_ulong_t *const rlimit = tail_alloc(sizeof(*rlimit) * 2); + const struct xlat *xlat; + + for (xlat = resources; xlat->str; ++xlat) { + unsigned long res = 0xfacefeed00000000ULL | xlat->val; + long rc = syscall(__NR_setrlimit, res, 0); + printf("setrlimit(%s, NULL) = %s\n", xlat->str, sprintrc(rc)); + + struct rlimit libc_rlim = {}; + if (getrlimit((int) res, &libc_rlim)) + continue; + rlimit[0] = libc_rlim.rlim_cur; + rlimit[1] = libc_rlim.rlim_max; + + rc = syscall(__NR_setrlimit, res, rlimit); + const char *errstr = sprintrc(rc); + printf("setrlimit(%s, {rlim_cur=%s, rlim_max=%s}) = %s\n", + xlat->str, + sprint_rlim(rlimit[0]), sprint_rlim(rlimit[1]), + errstr); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setrlimit") + +#endif diff --git a/tests-m32/setrlimit.test b/tests-m32/setrlimit.test new file mode 100755 index 000000000..792060897 --- /dev/null +++ b/tests-m32/setrlimit.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of getrlimit/ugetrlimit/setrlimit syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-m32/setugid.c b/tests-m32/setugid.c new file mode 100644 index 000000000..aba277c59 --- /dev/null +++ b/tests-m32/setugid.c @@ -0,0 +1,91 @@ +/* + * Check decoding of setuid/setgid/setuid32/setgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +void +printuid(unsigned UGID_TYPE id) +{ + if (id == (unsigned UGID_TYPE) -1U) + printf("-1"); + else + printf("%u", id); +} + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const long tests[] = { + ugid, + 0xffff0000U | ugid, + (unsigned long) 0xffffffff00000000ULL | ugid, + 0xffffU, + -1U, + -1L + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int num = (unsigned UGID_TYPE) tests[i]; + long expected; + + if (num == ugid) + expected = 0; + else if ((UGID_TYPE) num == (UGID_TYPE) -1U) + expected = -1; + else + continue; + + const long rc = syscall(SYSCALL_NR, tests[i]); + const char *errstr = sprintrc(rc); + + if (rc != expected) { + if (!i && ENOSYS == errno) { + printf("%s(%u) = %s\n", + SYSCALL_NAME, ugid, errstr); + break; + } + perror_msg_and_fail("%s(%#lx) != %ld", + SYSCALL_NAME, tests[i], expected); + } + + printf("%s(", SYSCALL_NAME); + printuid(num); + printf(") = %s\n", errstr); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/setuid.c b/tests-m32/setuid.c new file mode 100644 index 000000000..df2e46b17 --- /dev/null +++ b/tests-m32/setuid.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setuid + +# define SYSCALL_NR __NR_setuid +# define SYSCALL_NAME "setuid" + +# if defined __NR_setuid32 && __NR_setuid != __NR_setuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setuid") + +#endif diff --git a/tests-m32/setuid.test b/tests-m32/setuid.test new file mode 100755 index 000000000..9279233aa --- /dev/null +++ b/tests-m32/setuid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-m32/setuid32.c b/tests-m32/setuid32.c new file mode 100644 index 000000000..c837d547c --- /dev/null +++ b/tests-m32/setuid32.c @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setuid32 + +# define SYSCALL_NR __NR_setuid32 +# define SYSCALL_NAME "setuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setuid32") + +#endif diff --git a/tests-m32/setuid32.test b/tests-m32/setuid32.test new file mode 100755 index 000000000..7998392a0 --- /dev/null +++ b/tests-m32/setuid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff --git a/tests-m32/shmxt.c b/tests-m32/shmxt.c new file mode 100644 index 000000000..23cc7ccf4 --- /dev/null +++ b/tests-m32/shmxt.c @@ -0,0 +1,68 @@ +#include "tests.h" +#include +#include +#include + +static int id = -1; + +static void +cleanup(void) +{ + shmctl(id, IPC_RMID, NULL); + id = -1; +} + +#ifdef __alpha__ +# define SHMAT "osf_shmat" +#else +# define SHMAT "shmat" +#endif + +int +main(void) +{ + static const int bogus_shmid = 0xfdb97531; + static const void * const bogus_shmaddr = + (void *) (unsigned long) 0xdec0ded1dec0ded2ULL; + static const int bogus_shmflg = 0xffffface; + + long rc; + + id = shmget(IPC_PRIVATE, 1, 0600); + if (id < 0) + perror_msg_and_skip("shmget"); + atexit(cleanup); + + rc = (long) shmat(bogus_shmid, bogus_shmaddr, bogus_shmflg); + printf("%s(%d, %p, SHM_REMAP|SHM_RDONLY|SHM_RND|%#x) = %s\n", + SHMAT, bogus_shmid, bogus_shmaddr, bogus_shmflg & ~0x7000, + sprintrc(rc)); + + shmat(id, NULL, SHM_REMAP); + printf("%s(%d, NULL, SHM_REMAP) = -1 %s (%m)\n", + SHMAT, id, errno2name()); + + void *shmaddr = shmat(id, NULL, SHM_RDONLY); + if (shmaddr == (void *)(-1)) + perror_msg_and_skip("shmat SHM_RDONLY"); + printf("%s(%d, NULL, SHM_RDONLY) = %p\n", SHMAT, id, shmaddr); + + rc = shmdt(NULL); + printf("shmdt(NULL) = %s\n", sprintrc(rc)); + + if (shmdt(shmaddr)) + perror_msg_and_skip("shmdt"); + printf("shmdt(%p) = 0\n", shmaddr); + + ++shmaddr; + void *shmaddr2 = shmat(id, shmaddr, SHM_RND); + if (shmaddr2 == (void *)(-1)) + printf("%s(%d, %p, SHM_RND) = -1 %s (%m)\n", + SHMAT, id, shmaddr, errno2name()); + else + printf("%s(%d, %p, SHM_RND) = %p\n", + SHMAT, id, shmaddr, shmaddr2); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/shmxt.test b/tests-m32/shmxt.test new file mode 100755 index 000000000..3757cfa44 --- /dev/null +++ b/tests-m32/shmxt.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check shmat and shmdt syscalls decoding. + +. "${srcdir=.}/init.sh" + +case "$STRACE_ARCH" in + alpha) shmat=osf_shmat ;; + *) shmat=shmat ;; +esac + +run_strace_match_diff -e trace=$shmat,shmdt -a11 diff --git a/tests-m32/shutdown.c b/tests-m32/shutdown.c new file mode 100644 index 000000000..d770c43a8 --- /dev/null +++ b/tests-m32/shutdown.c @@ -0,0 +1,15 @@ +/* Check decoding of shutdown syscall. */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + int rc = shutdown(-1, SHUT_RDWR); + printf("shutdown(-1, SHUT_RDWR) = %d %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/shutdown.test b/tests-m32/shutdown.test new file mode 100755 index 000000000..22f0d5ab6 --- /dev/null +++ b/tests-m32/shutdown.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of shutdown syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff --git a/tests-m32/sigaction.awk b/tests-m32/sigaction.awk new file mode 100644 index 000000000..9c3a9ed33 --- /dev/null +++ b/tests-m32/sigaction.awk @@ -0,0 +1,95 @@ +#!/bin/gawk +# +# Copyright (c) 2014-2015 Dmitry V. Levin +# Copyright (c) 2016 Elvira Khabirova +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +BEGIN { + n1[1][1] = n2[1][1] = "SIG_IGN" + n1[1][2] = n2[1][2] = "\\[HUP INT\\]" + n1[1][3] = "SA_RESTORER\\|SA_RESTART" + n2[1][3] = "SA_RESTART" + n1[1][4] = ", sa_restorer=0x[0-9a-f]+" + n2[1][4] = "" + + n1[2][1] = n2[2][1] = "0x[0-9a-f]+" + n1[2][2] = n2[2][2] = "\\[QUIT TERM\\]" + n1[2][3] = "SA_RESTORER\\|SA_SIGINFO" + n2[2][3] = "SA_SIGINFO" + n1[2][4] = ", sa_restorer=0x[0-9a-f]+" + n2[2][4] = "" + + n1[3][1] = n2[3][1] = "SIG_DFL" + n1[3][2] = n2[3][2] = "\\[\\]" + n1[3][3] = "SA_RESTORER" + n2[3][3] = "0" + n1[3][4] = ", sa_restorer=0x[0-9a-f]+" + n2[3][4] = "" + + n1[4][1] = n2[4][1] = "SIG_DFL" + n1[4][2] = n2[4][2] = "~\\[HUP( ((RT|SIGRT)[^] ]+|[3-9][0-9]|1[0-9][0-9]))*\\]" + n1[4][3] = "SA_RESTORER" + n2[4][3] = "0" + n1[4][4] = ", sa_restorer=0x[0-9a-f]+" + n2[4][4] = "" + + o1[1][1] = o2[1][1] = "SIG_DFL" + o1[1][2] = o2[1][2] = "\\[\\]" + o1[1][3] = o2[1][3] = "0" + o1[1][4] = o2[1][4] = "" + + for (i = 2; i < 5; i++) { + for (j = 1; j < 5; j++) { + o1[i][j] = n1[i - 1][j] + o2[i][j] = n2[i - 1][j] + } + } + + a1 = "(0x[0-9a-f]+, )?(4|8|16)" + a2 = "(4|8|16)(, 0x[0-9a-f]+)?" + a3 = "0x[0-9a-f]+, (4|8|16)" + + for (i = 1; i < 5; i++) { + r[i] = "^rt_sigaction\\(SIGUSR2, (" \ + "\\{sa_handler=" n1[i][1] ", sa_mask=" n1[i][2] \ + ", sa_flags=" n1[i][3] n1[i][4] "\\}, \\{sa_handler=" \ + o1[i][1] ", sa_mask=" o1[i][2] ", sa_flags=" o1[i][3] \ + o1[i][4] "\\}, " a1 "|" \ + "\\{sa_handler=" n2[i][1] ", sa_mask=" n2[i][2] \ + ", sa_flags=" n2[i][3] n2[i][4] "\\}, \\{sa_handler=" \ + o2[i][1] ", sa_mask=" o2[i][2] ", sa_flags=" o2[i][3] \ + o2[i][4] "\\}, " a2 "|" \ + "\\{sa_handler=" n2[i][1] ", sa_mask=" n2[i][2] \ + ", sa_flags=" n2[i][3] n2[i][4] "\\}, \\{sa_handler=" \ + o2[i][1] ", sa_mask=" o2[i][2] ", sa_flags=" o2[i][3] \ + o2[i][4] "\\}, " a3 ")\\) = 0$" + } + s[5] = "+++ exited with 0 +++" + + lines = 5 + fail = 0 +} + +@include "match.awk" diff --git a/tests-m32/sigaction.c b/tests-m32/sigaction.c new file mode 100644 index 000000000..1c034ff34 --- /dev/null +++ b/tests-m32/sigaction.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2014-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include + +static void handle_signal(int no) +{ + _exit(128 + no); +} + +int +main(void) +{ + struct sigaction sa, sa0; + + sa.sa_handler = SIG_IGN; + sigemptyset(&sa.sa_mask); + sigaddset(&sa.sa_mask, SIGHUP); + sigaddset(&sa.sa_mask, SIGINT); + sa.sa_flags = SA_RESTART; + assert(!sigaction(SIGUSR2, &sa, &sa0)); + + sa.sa_handler = handle_signal; + sigemptyset(&sa.sa_mask); + sigaddset(&sa.sa_mask, SIGQUIT); + sigaddset(&sa.sa_mask, SIGTERM); + sa.sa_flags = SA_SIGINFO; + assert(!sigaction(SIGUSR2, &sa, &sa0)); + + sa.sa_handler = SIG_DFL; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + assert(!sigaction(SIGUSR2, &sa, &sa0)); + + sigfillset(&sa.sa_mask); + sigdelset(&sa.sa_mask, SIGHUP); + assert(!sigaction(SIGUSR2, &sa, &sa0)); + + return 0; +} diff --git a/tests-m32/sigaction.test b/tests-m32/sigaction.test new file mode 100755 index 000000000..fcde3bafa --- /dev/null +++ b/tests-m32/sigaction.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check rt_sigaction decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -ert_sigaction $args +match_awk + +exit 0 diff --git a/tests-m32/sigaltstack.c b/tests-m32/sigaltstack.c new file mode 100644 index 000000000..884e3c55f --- /dev/null +++ b/tests-m32/sigaltstack.c @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +int +main(void) +{ + stack_t ss = { + .ss_sp = (void *) 0xbaadf00d, + .ss_flags = SS_DISABLE, + .ss_size = 0xdeadbeef + }; + if (sigaltstack(&ss, (stack_t *) 0)) + perror_msg_and_skip("sigaltstack"); + return 0; +} diff --git a/tests-m32/sigaltstack.expected b/tests-m32/sigaltstack.expected new file mode 100644 index 000000000..be8092baa --- /dev/null +++ b/tests-m32/sigaltstack.expected @@ -0,0 +1,2 @@ +sigaltstack({ss_sp=0xbaadf00d, ss_flags=SS_DISABLE, ss_size=3735928559}, NULL) = 0 ++++ exited with 0 +++ diff --git a/tests-m32/sigaltstack.test b/tests-m32/sigaltstack.test new file mode 100755 index 000000000..ff83c2eac --- /dev/null +++ b/tests-m32/sigaltstack.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check sigaltstack syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -e sigaltstack $args +match_diff + +exit 0 diff --git a/tests-m32/siginfo.c b/tests-m32/siginfo.c new file mode 100644 index 000000000..2ecb13fd9 --- /dev/null +++ b/tests-m32/siginfo.c @@ -0,0 +1,175 @@ +/* + * Check SIGCHLD siginfo_t decoding. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static siginfo_t sinfo; + +static void +handler(int no, siginfo_t *si, void *uc) +{ + memcpy(&sinfo, si, sizeof(sinfo)); +} + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + pid_t pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + char c; + (void) close(1); + assert(read(0, &c, sizeof(c)) == 1); + return 42; + } + + (void) close(0); + + struct sigaction sa = { + .sa_sigaction = handler, + .sa_flags = SA_SIGINFO + }; + assert(sigaction(SIGCHLD, &sa, NULL) == 0); + + sigset_t block_mask, unblock_mask; + assert(sigprocmask(SIG_SETMASK, NULL, &block_mask) == 0); + sigaddset(&block_mask, SIGCHLD); + assert(sigprocmask(SIG_SETMASK, &block_mask, NULL) == 0); + + unblock_mask = block_mask; + sigdelset(&unblock_mask, SIGCHLD); + + assert(write(1, "", 1) == 1); + (void) close(1); + + sigsuspend(&unblock_mask); + tprintf("--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED" + ", si_pid=%d, si_uid=%u, si_status=%d" + ", si_utime=%llu, si_stime=%llu} ---\n", + sinfo.si_pid, sinfo.si_uid, sinfo.si_status, + zero_extend_signed_to_ull(sinfo.si_utime), + zero_extend_signed_to_ull(sinfo.si_stime)); + + int s; + assert(wait(&s) == pid); + assert(WIFEXITED(s) && WEXITSTATUS(s) == 42); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + (void) close(1); + char c; + assert(read(0, &c, sizeof(c)) == 1); + (void) raise(SIGUSR1); + return 1; + } + + (void) close(0); + + assert(write(1, "", 1) == 1); + (void) close(1); + + sigsuspend(&unblock_mask); + tprintf("--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED" + ", si_pid=%d, si_uid=%u, si_status=SIGUSR1" + ", si_utime=%llu, si_stime=%llu} ---\n", + sinfo.si_pid, sinfo.si_uid, + zero_extend_signed_to_ull(sinfo.si_utime), + zero_extend_signed_to_ull(sinfo.si_stime)); + + assert(wait(&s) == pid); + assert(WIFSIGNALED(s) && WTERMSIG(s) == SIGUSR1); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + (void) close(1); + raise(SIGSTOP); + char c; + assert(read(0, &c, sizeof(c)) == 1); + return 0; + } + + (void) close(0); + + sigsuspend(&unblock_mask); + tprintf("--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_STOPPED" + ", si_pid=%d, si_uid=%u, si_status=SIGSTOP" + ", si_utime=%llu, si_stime=%llu} ---\n", + sinfo.si_pid, sinfo.si_uid, + zero_extend_signed_to_ull(sinfo.si_utime), + zero_extend_signed_to_ull(sinfo.si_stime)); + + assert(kill(pid, SIGCONT) == 0); + + sigsuspend(&unblock_mask); + tprintf("--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_CONTINUED" + ", si_pid=%d, si_uid=%u, si_status=SIGCONT" + ", si_utime=%llu, si_stime=%llu} ---\n", + sinfo.si_pid, sinfo.si_uid, + zero_extend_signed_to_ull(sinfo.si_utime), + zero_extend_signed_to_ull(sinfo.si_stime)); + + assert(write(1, "", 1) == 1); + (void) close(1); + + sigsuspend(&unblock_mask); + tprintf("--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED" + ", si_pid=%d, si_uid=%u, si_status=0" + ", si_utime=%llu, si_stime=%llu} ---\n", + sinfo.si_pid, sinfo.si_uid, + zero_extend_signed_to_ull(sinfo.si_utime), + zero_extend_signed_to_ull(sinfo.si_stime)); + + assert(wait(&s) == pid && s == 0); + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/siginfo.test b/tests-m32/siginfo.test new file mode 100755 index 000000000..725f714f8 --- /dev/null +++ b/tests-m32/siginfo.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check SIGCHLD siginfo_t decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=none diff --git a/tests-m32/signal2name.c b/tests-m32/signal2name.c new file mode 100644 index 000000000..e301f4ee4 --- /dev/null +++ b/tests-m32/signal2name.c @@ -0,0 +1,55 @@ +#include "tests.h" +#include + +#define CASE(x) case x: return #x + +const char * +signal2name(int sig) +{ + switch (sig) { + CASE(SIGALRM); + CASE(SIGBUS); + CASE(SIGCHLD); + CASE(SIGCONT); + CASE(SIGFPE); + CASE(SIGHUP); + CASE(SIGILL); + CASE(SIGINT); + CASE(SIGIO); + CASE(SIGPIPE); + CASE(SIGPROF); + CASE(SIGQUIT); + CASE(SIGSEGV); + CASE(SIGSYS); + CASE(SIGTERM); + CASE(SIGTRAP); + CASE(SIGTSTP); + CASE(SIGTTIN); + CASE(SIGTTOU); + CASE(SIGURG); + CASE(SIGUSR1); + CASE(SIGUSR2); + CASE(SIGVTALRM); + CASE(SIGWINCH); + CASE(SIGXCPU); + CASE(SIGXFSZ); +#if defined ALPHA + CASE(SIGABRT); + CASE(SIGEMT); + CASE(SIGINFO); +#elif defined SPARC || defined SPARC64 + CASE(SIGABRT); + CASE(SIGEMT); + CASE(SIGLOST); +#elif defined MIPS + CASE(SIGEMT); + CASE(SIGIOT); + CASE(SIGPWR); +#else + CASE(SIGABRT); + CASE(SIGPWR); + CASE(SIGSTKFLT); +#endif + default: perror_msg_and_fail("unknown signal number %d", sig); + } +} diff --git a/tests-m32/signal_receive.c b/tests-m32/signal_receive.c new file mode 100644 index 000000000..1c4293e5f --- /dev/null +++ b/tests-m32/signal_receive.c @@ -0,0 +1,45 @@ +#include "tests.h" +#include +#include +#include + +void sig_print(const char *signame, const int pid, const int uid) +{ + printf("kill(%d, %s) = 0\n" + "--- %s {si_signo=%s, si_code=SI_USER, si_pid=%d" + ", si_uid=%d} ---\n", + pid, signame, signame, signame, pid, uid); +} + +static void +handler(int sig) +{ +} + +int +main(void) +{ + int sig, pid = getpid(), uid = getuid(); + const struct sigaction act = { .sa_handler = handler }; + sigset_t mask; + sigemptyset(&mask); + + for (sig = 1; sig <= 31; sig++) { + if( sig != SIGKILL && sig != SIGSTOP) { + sigaction(sig, &act, NULL); + sigaddset(&mask, sig); + } + } + sigprocmask(SIG_UNBLOCK, &mask, NULL); + + for (sig = 1; sig <= 31; sig++) { + if(sig != SIGKILL && sig != SIGSTOP) { + if (kill(pid, sig) != 0) + perror_msg_and_fail("kill: %d", sig); + sig_print(signal2name(sig), pid, uid); + } + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/signal_receive.test b/tests-m32/signal_receive.test new file mode 100755 index 000000000..9685b666e --- /dev/null +++ b/tests-m32/signal_receive.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check whether strace traces signals properly. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 -e trace=kill diff --git a/tests-m32/signalfd4.c b/tests-m32/signalfd4.c new file mode 100644 index 000000000..47e49b500 --- /dev/null +++ b/tests-m32/signalfd4.c @@ -0,0 +1,86 @@ +/* + * Check decoding of signalfd4 syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_rt_sigprocmask \ + && defined HAVE_SYS_SIGNALFD_H \ + && defined HAVE_SIGNALFD \ + && defined O_CLOEXEC + +# include +# include +# include +# include + +static unsigned int +get_sigset_size(void) +{ + const unsigned int big_size = 1024 / 8; + unsigned int set_size; + + for (set_size = big_size; set_size; set_size >>= 1) { + if (!syscall(__NR_rt_sigprocmask, SIG_SETMASK, + NULL, NULL, set_size)) + break; + } + + if (!set_size) + perror_msg_and_fail("rt_sigprocmask"); + + return set_size; +} + +int +main(void) +{ + const char *const sigs = SIGUSR2 < SIGCHLD ? "USR2 CHLD" : "CHLD USR2"; + const unsigned int size = get_sigset_size(); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR2); + sigaddset(&mask, SIGCHLD); + + int fd = signalfd(-1, &mask, O_CLOEXEC | O_NONBLOCK); + printf("signalfd4(-1, [%s], %u, SFD_CLOEXEC|SFD_NONBLOCK) = %s\n", + sigs, size, sprintrc(fd)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigprocmask && HAVE_SYS_SIGNALFD_H" + " && HAVE_SIGNALFD && O_CLOEXEC") + +#endif diff --git a/tests-m32/signalfd4.test b/tests-m32/signalfd4.test new file mode 100755 index 000000000..a615a5bf3 --- /dev/null +++ b/tests-m32/signalfd4.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of signalfd4 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/sigreturn.c b/tests-m32/sigreturn.c new file mode 100644 index 000000000..dace040a5 --- /dev/null +++ b/tests-m32/sigreturn.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#ifdef ASM_SIGRTMIN +# define RT_0 ASM_SIGRTMIN +#else +/* Linux kernel >= 3.18 defines SIGRTMIN to 32 on all architectures. */ +# define RT_0 32 +#endif + +static void handler(int sig) +{ +} + +int main(void) { + sigset_t set; + sigemptyset(&set); + sigaddset(&set, SIGUSR2); + sigaddset(&set, SIGCHLD); + sigaddset(&set, RT_0 + 3); + sigaddset(&set, RT_0 + 4); + sigaddset(&set, RT_0 + 5); + sigaddset(&set, RT_0 + 26); + sigaddset(&set, RT_0 + 27); + sigprocmask(SIG_SETMASK, &set, NULL); + signal(SIGUSR1, handler); + raise(SIGUSR1); + return 0; +} diff --git a/tests-m32/sigreturn.test b/tests-m32/sigreturn.test new file mode 100755 index 000000000..f9a612bff --- /dev/null +++ b/tests-m32/sigreturn.test @@ -0,0 +1,48 @@ +#!/bin/sh +# +# Check rt_sigprocmask and sigreturn/rt_sigreturn decoding. +# +# Copyright (c) 2015-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -esignal $args + +mask='\[(USR2 CHLD|CHLD USR2) RT_3 RT_4 RT_5 RT_26 RT_27\]' +rt_sigprocmask='rt_sigprocmask\(SIG_SETMASK, '"$mask"', NULL, [[:digit:]]+\) += 0' +osf_sigprocmask='osf_sigprocmask\(SIG_SETMASK, '"$mask"'\) += 0 +\(old mask \[[^]]*\]\)' +EXPECTED="$LOG.expected" + +cat > "$EXPECTED" << __EOF__ +$rt_sigprocmask|$osf_sigprocmask +(rt_)?sigreturn\\((\\{mask=$mask\\})?\\) += 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" + +exit 0 diff --git a/tests-m32/sleep.c b/tests-m32/sleep.c new file mode 100644 index 000000000..f4bce3cdb --- /dev/null +++ b/tests-m32/sleep.c @@ -0,0 +1,49 @@ +/* + * A simple nanosleep based sleep(1) replacement. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(int ac, char **av) +{ + if (ac < 2) + error_msg_and_fail("missing operand"); + + if (ac > 2) + error_msg_and_fail("extra operand"); + + struct timespec ts = { atoi(av[1]), 0 }; + + if (nanosleep(&ts, NULL)) + perror_msg_and_fail("nanosleep"); + + return 0; +} diff --git a/tests-m32/socketcall.c b/tests-m32/socketcall.c new file mode 100644 index 000000000..4fe1ea3ac --- /dev/null +++ b/tests-m32/socketcall.c @@ -0,0 +1,95 @@ +/* + * Check decoding of socketcall syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_socketcall + +# include +# include +# include + +# include "xlat.h" +# include "xlat/socketcalls.h" + +static const char * +xlookup_uint(const struct xlat *xlat, const unsigned int val) +{ + for (; xlat->str != NULL; xlat++) + if (xlat->val == val) + return xlat->str; + return NULL; +} + +static const int sc_min = 1, sc_max = 20; +static void *efault; + +static void +test_socketcall(const int i, const void *const addr) +{ + const unsigned long call = + (unsigned long) 0xfacefeed00000000ULL | (unsigned int) i; + + long rc = syscall(__NR_socketcall, call, addr); + + if (i < sc_min || i > sc_max) { + printf("socketcall(%d, %p) = %ld %s (%m)\n", + (int) call, addr, rc, errno2name()); + } else if (addr == efault) { + const char *const str = xlookup_uint(socketcalls, i); + assert(str); + printf("socketcall(%s, %p) = %ld %s (%m)\n", + str, addr, rc, errno2name()); + } +} +int +main(void) +{ + assert((unsigned) sc_min == socketcalls[0].val); + assert((unsigned) sc_max == socketcalls[ARRAY_SIZE(socketcalls) - 2].val); + + const unsigned long *const args = tail_alloc(sizeof(*args) * 6); + efault = tail_alloc(1) + 1; + + int i; + for (i = sc_min - 3; i <= sc_max + 3; ++i) { + test_socketcall(i, efault); + test_socketcall(i, args); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_socketcall") + +#endif diff --git a/tests-m32/socketcall.test b/tests-m32/socketcall.test new file mode 100755 index 000000000..959bc83d4 --- /dev/null +++ b/tests-m32/socketcall.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of socketcall syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff --git a/tests-m32/sockname.c b/tests-m32/sockname.c new file mode 100644 index 000000000..c5072cac4 --- /dev/null +++ b/tests-m32/sockname.c @@ -0,0 +1,156 @@ +/* + * Check decoding of sockname family syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef TEST_SYSCALL_NAME +# error TEST_SYSCALL_NAME must be defined +#endif + +#define TEST_SYSCALL_STR__(a) #a +#define TEST_SYSCALL_STR_(a) TEST_SYSCALL_STR__(a) +#define TEST_SYSCALL_STR TEST_SYSCALL_STR_(TEST_SYSCALL_NAME) +#define TEST_SOCKET TEST_SYSCALL_STR ".socket" + +#ifdef TEST_SYSCALL_PREPARE +# define PREPARE_TEST_SYSCALL_INVOCATION do { TEST_SYSCALL_PREPARE; } while (0) +#else +# define PREPARE_TEST_SYSCALL_INVOCATION do {} while (0) +#endif + +#ifndef PREFIX_S_ARGS +# define PREFIX_S_ARGS +#endif +#ifndef PREFIX_F_ARGS +# define PREFIX_F_ARGS +#endif +#ifndef PREFIX_S_STR +# define PREFIX_S_STR "" +#endif +#ifndef PREFIX_F_STR +# define PREFIX_F_STR "" +#endif +#ifndef SUFFIX_ARGS +# define SUFFIX_ARGS +#endif +#ifndef SUFFIX_STR +# define SUFFIX_STR "" +#endif + +static void +test_sockname_syscall(const int fd) +{ + socklen_t *const plen = tail_alloc(sizeof(*plen)); + *plen = sizeof(struct sockaddr_un); + struct sockaddr_un *addr = tail_alloc(*plen); + + PREPARE_TEST_SYSCALL_INVOCATION; + int rc = TEST_SYSCALL_NAME(fd PREFIX_S_ARGS, (void *) addr, + plen SUFFIX_ARGS); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + printf("%s(%d%s, {sa_family=AF_UNIX, sun_path=\"%s\"}" + ", [%d->%d]%s) = %d\n", + TEST_SYSCALL_STR, fd, PREFIX_S_STR, addr->sun_path, + (int) sizeof(struct sockaddr_un), (int) *plen, SUFFIX_STR, rc); + + memset(addr, 0, sizeof(*addr)); + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_S_ARGS, (void *) addr, + plen SUFFIX_ARGS); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + printf("%s(%d%s, {sa_family=AF_UNIX, sun_path=\"%s\"}" + ", [%d]%s) = %d\n", + TEST_SYSCALL_STR, fd, PREFIX_S_STR, addr->sun_path, + (int) *plen, SUFFIX_STR, rc); + + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_F_ARGS, (void *) addr, 0 SUFFIX_ARGS); + printf("%s(%d%s, %p, NULL%s) = %s\n", + TEST_SYSCALL_STR, fd, PREFIX_F_STR, addr, SUFFIX_STR, + sprintrc(rc)); + + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_S_ARGS, 0, 0 SUFFIX_ARGS); + printf("%s(%d%s, NULL, NULL%s) = %s\n", + TEST_SYSCALL_STR, fd, rc == -1 ? PREFIX_F_STR : PREFIX_S_STR, + SUFFIX_STR, sprintrc(rc)); + + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_F_ARGS, (void *) addr, + plen + 1 SUFFIX_ARGS); + printf("%s(%d%s, %p, %p%s) = %s\n", + TEST_SYSCALL_STR, fd, PREFIX_F_STR, addr, + plen + 1, SUFFIX_STR, sprintrc(rc)); + + const size_t offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); + *plen = offsetof_sun_path; + memset(addr->sun_path, 'A', sizeof(addr->sun_path)); + + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_S_ARGS, (void *) addr, + plen SUFFIX_ARGS); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + printf("%s(%d%s, {sa_family=AF_UNIX}, [%d->%d]%s) = %d\n", + TEST_SYSCALL_STR, fd, PREFIX_S_STR, + (int) offsetof_sun_path, (int) *plen, SUFFIX_STR, rc); + + ++addr; + *plen = sizeof(struct sockaddr); + addr = (void *) addr - *plen; + + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_S_ARGS, (void *) addr, + plen SUFFIX_ARGS); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + printf("%s(%d%s, {sa_family=AF_UNIX, sun_path=\"%.*s\"}" + ", [%d->%d]%s) = %d\n", + TEST_SYSCALL_STR, fd, PREFIX_S_STR, + (int) (sizeof(struct sockaddr) - offsetof_sun_path), + addr->sun_path, (int) sizeof(struct sockaddr), + (int) *plen, SUFFIX_STR, rc); + + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_F_ARGS, (void *) addr, + plen SUFFIX_ARGS); + printf("%s(%d%s, %p, [%d]%s) = %s\n", + TEST_SYSCALL_STR, fd, PREFIX_F_STR, addr, + *plen, SUFFIX_STR, sprintrc(rc)); +} diff --git a/tests-m32/splice.c b/tests-m32/splice.c new file mode 100644 index 000000000..b6f252560 --- /dev/null +++ b/tests-m32/splice.c @@ -0,0 +1,65 @@ +/* + * This file is part of splice strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_splice + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffffULL; + const long int fd_out = (long int) 0xdeadbeeffffffffeULL; + long long int *const off_in = tail_alloc(sizeof(*off_in)); + long long int *const off_out = tail_alloc(sizeof(*off_out)); + *off_in = 0xdeadbef1facefed1ULL; + *off_out = 0xdeadbef2facefed2ULL; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 15; + + long rc = syscall(__NR_splice, + fd_in, off_in, fd_out, off_out, len, flags); + printf("splice(%d, [%lld], %d, [%lld], %zu, %s) = %ld %s (%m)\n", + (int) fd_in, *off_in, (int) fd_out, *off_out, len, + "SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_splice") + +#endif diff --git a/tests-m32/splice.test b/tests-m32/splice.test new file mode 100755 index 000000000..cc5c327eb --- /dev/null +++ b/tests-m32/splice.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check splice syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/sprintrc.c b/tests-m32/sprintrc.c new file mode 100644 index 000000000..7423afb69 --- /dev/null +++ b/tests-m32/sprintrc.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +enum sprintrc_fmt { + SPRINTRC_FMT_RAW, + SPRINTRC_FMT_GREP, +}; + +/** + * Provides pointer to static string buffer with printed return code in format + * used by strace - with errno and error message. + * + * @param rc Return code. + * @param fmt Output format. Currently, raw (used for diff matching) and grep + * (for extended POSIX regex-based pattern matching) formats are + * supported. + * @return Pointer to (statically allocated) buffer containing decimal + * representation of return code and errno/error message in case @rc + * is equal to -1. + */ +static inline const char * +sprintrc_ex(long rc, enum sprintrc_fmt fmt) +{ + static const char *formats[] = { + [SPRINTRC_FMT_RAW] = "-1 %s (%m)", + [SPRINTRC_FMT_GREP] = "-1 %s \\(%m\\)", + }; + static char buf[4096]; + + if (fmt >= ARRAY_SIZE(formats)) + perror_msg_and_fail("sprintrc_ex: incorrect format provided"); + + if (rc == 0) + return "0"; + + int ret = (rc == -1) + ? snprintf(buf, sizeof(buf), formats[fmt], errno2name()) + : snprintf(buf, sizeof(buf), "%ld", rc); + + if (ret < 0) + perror_msg_and_fail("snprintf"); + if ((size_t) ret >= sizeof(buf)) + error_msg_and_fail("snprintf overflow: got %d, expected" + " no more than %zu", ret, sizeof(buf)); + + return buf; +} + +const char * +sprintrc(long rc) +{ + return sprintrc_ex(rc, SPRINTRC_FMT_RAW); +} + +const char * +sprintrc_grep(long rc) +{ + return sprintrc_ex(rc, SPRINTRC_FMT_GREP); +} diff --git a/tests-m32/stack-fcall-0.c b/tests-m32/stack-fcall-0.c new file mode 100644 index 000000000..12a260deb --- /dev/null +++ b/tests-m32/stack-fcall-0.c @@ -0,0 +1,6 @@ +int f1(int i); + +int f0(int i) +{ + return f1(i) - i; +} diff --git a/tests-m32/stack-fcall-1.c b/tests-m32/stack-fcall-1.c new file mode 100644 index 000000000..8716702df --- /dev/null +++ b/tests-m32/stack-fcall-1.c @@ -0,0 +1,6 @@ +int f2(int i); + +int f1(int i) +{ + return f2(i) + i; +} diff --git a/tests-m32/stack-fcall-2.c b/tests-m32/stack-fcall-2.c new file mode 100644 index 000000000..19f8cf83c --- /dev/null +++ b/tests-m32/stack-fcall-2.c @@ -0,0 +1,6 @@ +int f3(int i); + +int f2(int i) +{ + return f3(i) - i; +} diff --git a/tests-m32/stack-fcall-3.c b/tests-m32/stack-fcall-3.c new file mode 100644 index 000000000..3af1667f4 --- /dev/null +++ b/tests-m32/stack-fcall-3.c @@ -0,0 +1,6 @@ +#include + +int f3(int i) +{ + return getpid() + i; +} diff --git a/tests-m32/stack-fcall.c b/tests-m32/stack-fcall.c new file mode 100644 index 000000000..134d54f61 --- /dev/null +++ b/tests-m32/stack-fcall.c @@ -0,0 +1,7 @@ +int f0(int i); + +int main(int argc, char** argv) +{ + f0(argc); + return 0; +} diff --git a/tests-m32/stat.c b/tests-m32/stat.c new file mode 100644 index 000000000..d4ca7b0b9 --- /dev/null +++ b/tests-m32/stat.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_stat + +# define TEST_SYSCALL_NR __NR_stat +# define TEST_SYSCALL_STR "stat" +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 43147718418ULL) +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_stat") + +#endif diff --git a/tests-m32/stat.test b/tests-m32/stat.test new file mode 100755 index 000000000..ba8938c02 --- /dev/null +++ b/tests-m32/stat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check stat syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-m32/stat64.c b/tests-m32/stat64.c new file mode 100644 index 000000000..782de33d6 --- /dev/null +++ b/tests-m32/stat64.c @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_stat64 + +# define TEST_SYSCALL_NR __NR_stat64 +# define TEST_SYSCALL_STR "stat64" +# define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" +# define STRUCT_STAT_IS_STAT64 1 +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_stat64") + +#endif diff --git a/tests-m32/stat64.test b/tests-m32/stat64.test new file mode 100755 index 000000000..abcfb9eca --- /dev/null +++ b/tests-m32/stat64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check stat64 syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-m32/statfs.c b/tests-m32/statfs.c new file mode 100644 index 000000000..6032a668b --- /dev/null +++ b/tests-m32/statfs.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_statfs + +# define SYSCALL_ARG_FMT "\"%s\"" +# define SYSCALL_ARG(file, desc) (file) +# define SYSCALL_NR __NR_statfs +# define SYSCALL_NAME "statfs" +# include "xstatfs.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_statfs") + +#endif diff --git a/tests-m32/statfs.expected b/tests-m32/statfs.expected new file mode 100644 index 000000000..11e9f0b15 --- /dev/null +++ b/tests-m32/statfs.expected @@ -0,0 +1 @@ +statfs(64)?\("/proc/self/status"(, [1-9][0-9]*)?, \{f_type=PROC_SUPER_MAGIC, f_bsize=[1-9][0-9]*, f_blocks=[0-9]+, f_bfree=[0-9]+, f_bavail=[0-9]+, f_files=[0-9]+, f_ffree=[0-9]+, f_fsid=\{val=\[[0-9]+, [0-9]+\]\}, f_namelen=[1-9][0-9]*(, f_frsize=[0-9]+)?(, f_flags=ST_VALID(\|ST_[A-Z]+)*)?\}\) += 0 diff --git a/tests-m32/statfs.test b/tests-m32/statfs.test new file mode 100755 index 000000000..6075576f8 --- /dev/null +++ b/tests-m32/statfs.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check statfs syscall decoding. + +. "${srcdir=.}/init.sh" + +# this test probes /proc/self/status +[ -f /proc/self/status ] || + framework_skip_ '/proc/self/status is not available' + +run_strace_match_diff -a17 diff --git a/tests-m32/statfs64.c b/tests-m32/statfs64.c new file mode 100644 index 000000000..f46e76709 --- /dev/null +++ b/tests-m32/statfs64.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_statfs64 + +# define SYSCALL_ARG_FMT "\"%s\"" +# define SYSCALL_ARG(file, desc) (file) +# define SYSCALL_NR __NR_statfs64 +# define SYSCALL_NAME "statfs64" +# include "xstatfs64.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_statfs64") + +#endif diff --git a/tests-m32/statfs64.test b/tests-m32/statfs64.test new file mode 100755 index 000000000..9c0aa2787 --- /dev/null +++ b/tests-m32/statfs64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check statfs64 syscall decoding. + +. "${srcdir=.}/statfs.test" diff --git a/tests-m32/statx.sh b/tests-m32/statx.sh new file mode 100755 index 000000000..a630193d7 --- /dev/null +++ b/tests-m32/statx.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of stat family syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -P $NAME.sample -P /dev/full -a32 diff --git a/tests-m32/strace-C.expected b/tests-m32/strace-C.expected new file mode 100644 index 000000000..832af1f38 --- /dev/null +++ b/tests-m32/strace-C.expected @@ -0,0 +1,3 @@ +nanosleep\(\{tv_sec=1, tv_nsec=0\}, NULL\) = 0 +\+\+\+ exited with 0 \+\+\+ +[ ]*[0-9][0-9]*[.][0-9][0-9]* *0[.]0[0-9]* *[0-9][0-9]* *1 *nanosleep diff --git a/tests-m32/strace-C.test b/tests-m32/strace-C.test new file mode 100755 index 000000000..ccca9a091 --- /dev/null +++ b/tests-m32/strace-C.test @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -C option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -a24 -C -enanosleep ./sleep 1 +match_grep diff --git a/tests-m32/strace-E.expected b/tests-m32/strace-E.expected new file mode 100644 index 000000000..d7823b7a2 --- /dev/null +++ b/tests-m32/strace-E.expected @@ -0,0 +1 @@ +execve\("\./sleep", \["\./sleep", "0"\], \[.*"option_E_var=OPTION_E_VAL".*\]\) = 0 diff --git a/tests-m32/strace-E.test b/tests-m32/strace-E.test new file mode 100755 index 000000000..d76ec3f5c --- /dev/null +++ b/tests-m32/strace-E.test @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -E option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 > /dev/null +run_strace -E option_E_var=OPTION_E_VAL -v $args +match_grep diff --git a/tests-m32/strace-S.test b/tests-m32/strace-S.test new file mode 100755 index 000000000..3ea315cef --- /dev/null +++ b/tests-m32/strace-S.test @@ -0,0 +1,32 @@ +#!/bin/sh + +# Check -S option. + +. "${srcdir=.}/init.sh" + +run_prog ./readv > /dev/null + +test_c() +{ + local sortby sortopts sedexpr + sortby="$1"; shift + sortopts="$1"; shift + sedexpr="$1"; shift + + run_strace -c -w -S "$sortby" ./readv > /dev/null + sed -r -n -e "$sedexpr" < "$LOG" > "$OUT" + + [ -s "$OUT" ] || + fail_ "$STRACE $args output mismatch" + LC_ALL=C sort -c $sortopts "$OUT" || { + echo 'Actual output:' + cat < "$LOG" + fail_ "$STRACE $args output not sorted properly" + } +} + +c='[[:space:]]+([^[:space:]]+)' +test_c calls '-n -r' '/^[[:space:]]+[0-9]/ s/^'"$c$c$c$c"'[[:space:]].*/\4/p' +test_c name '' '/^[[:space:]]+[0-9]/ s/^'"$c$c$c$c"'([[:space:]]+[0-9]+)?'"$c"'$/\6/p' + +rm -f "$OUT" diff --git a/tests-m32/strace-T.expected b/tests-m32/strace-T.expected new file mode 100644 index 000000000..1ea020465 --- /dev/null +++ b/tests-m32/strace-T.expected @@ -0,0 +1 @@ +nanosleep\(\{tv_sec=1, tv_nsec=0\}, NULL\) = 0 <(1\.[01]|0\.9)[[:digit:]]{5}> diff --git a/tests-m32/strace-T.test b/tests-m32/strace-T.test new file mode 100755 index 000000000..7ab84a743 --- /dev/null +++ b/tests-m32/strace-T.test @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -T option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -a24 -T -enanosleep ./sleep 1 +match_grep diff --git a/tests-m32/strace-V.test b/tests-m32/strace-V.test new file mode 100755 index 000000000..9a051e00e --- /dev/null +++ b/tests-m32/strace-V.test @@ -0,0 +1,24 @@ +#!/bin/sh + +# Check -V option. +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%Y > /dev/null +year="$(date +%Y)" + +run_strace -V > "$LOG" + +getval() +{ + sed -r -n 's/#define[[:space:]]*'"$1"'[[:space:]]*"([^"]*)".*/\1/p' ../config.h +} + +cat > "$EXP" << __EOF__ +$(getval PACKAGE_NAME) -- version $(getval PACKAGE_VERSION) +Copyright (C) 1991-$year The strace developers <$(getval PACKAGE_URL)>. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +__EOF__ + +match_diff "$EXP" "$LOG" +rm -f "$EXP" diff --git a/tests-m32/strace-ff.expected b/tests-m32/strace-ff.expected new file mode 100644 index 000000000..627a1b4c5 --- /dev/null +++ b/tests-m32/strace-ff.expected @@ -0,0 +1,2 @@ +exit_group(0) = ? ++++ exited with 0 +++ diff --git a/tests-m32/strace-ff.test b/tests-m32/strace-ff.test new file mode 100755 index 000000000..2ce06f19d --- /dev/null +++ b/tests-m32/strace-ff.test @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check -ff option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +./set_ptracer_any ./sleep 1 > "$OUT" & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' +done + +rm -f "$LOG".* +run_strace -a14 -eexit_group -ff -p $tracee_pid + +# check that output matches +match_diff "$LOG.$tracee_pid" + +# check that no other output files have been created +set -- "$LOG".* +[ "$LOG.$tracee_pid" = "$*" ] || + fail_ "too many output files: $*" + +rm -f "$OUT" "$LOG.$tracee_pid" diff --git a/tests-m32/strace-k.test b/tests-m32/strace-k.test new file mode 100755 index 000000000..d5e8ed2bc --- /dev/null +++ b/tests-m32/strace-k.test @@ -0,0 +1,53 @@ +#!/bin/sh +# +# Ensure that strace -k works. +# +# Copyright (c) 2014 Masatake YAMATO +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -k is implemented using /proc/$pid/maps +[ -f /proc/self/maps ] || + framework_skip_ '/proc/self/maps is not available' + +check_prog sed +check_prog tr + +run_prog ./stack-fcall +run_strace -e getpid -k $args + +expected='getpid f3 f2 f1 f0 main ' +result=$(sed -r -n '1,/\(main\+0x[a-f0-9]+\) .*/ s/^.*\(([^+]+)\+0x[a-f0-9]+\) .*/\1/p' "$LOG" | + tr '\n' ' ') + +test "$result" = "$expected" || { + echo "expected: \"$expected\"" + echo "result: \"$result\"" + dump_log_and_fail_with "$STRACE $args output mismatch" +} + +exit 0 diff --git a/tests-m32/strace-r.expected b/tests-m32/strace-r.expected new file mode 100644 index 000000000..8009c353c --- /dev/null +++ b/tests-m32/strace-r.expected @@ -0,0 +1,2 @@ +[ ]{5}0\.0{6} execve\("\./sleep", \["\./sleep", "1"\], \[/\* [[:digit:]]+ vars \*/\]\) = 0 +[ ]{5}(1\.[01]|0\.9)[[:digit:]]{5} \+\+\+ exited with 0 \+\+\+ diff --git a/tests-m32/strace-r.test b/tests-m32/strace-r.test new file mode 100755 index 000000000..4ba01f12a --- /dev/null +++ b/tests-m32/strace-r.test @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -r option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -r -eexecve ./sleep 1 +match_grep diff --git a/tests-m32/strace-t.test b/tests-m32/strace-t.test new file mode 100755 index 000000000..1d213e639 --- /dev/null +++ b/tests-m32/strace-t.test @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check -t option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%T > /dev/null +run_prog ./sleep 0 + +t0="$(date +%T)" +run_strace -t -eexecve $args +t1="$(date +%T)" + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +($t0|$t1) execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" diff --git a/tests-m32/strace-tt.test b/tests-m32/strace-tt.test new file mode 100755 index 000000000..3f80001eb --- /dev/null +++ b/tests-m32/strace-tt.test @@ -0,0 +1,28 @@ +#!/bin/sh + +# Check -tt option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%s > "$LOG" +run_prog_skip_if_failed date +%T --date "@$(cat "$LOG")" > /dev/null +run_prog ./sleep 0 + +s0="$(date +%s)" +run_strace -tt -eexecve $args +s1="$(date +%s)" + +s="$s0" +t_reg= +while [ "$s" -le "$s1" ]; do + t="$(date +%T --date "@$s")" + [ -z "$t_reg" ] && t_reg="$t" || t_reg="$t_reg|$t" + s=$(($s + 1)) +done + +cat > "$EXP" << __EOF__ +($t_reg)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXP" +rm -f "$EXP" diff --git a/tests-m32/strace-ttt.test b/tests-m32/strace-ttt.test new file mode 100755 index 000000000..4439715b5 --- /dev/null +++ b/tests-m32/strace-ttt.test @@ -0,0 +1,26 @@ +#!/bin/sh + +# Check -ttt option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%s > /dev/null +run_prog ./sleep 0 + +s0="$(date +%s)" +run_strace -ttt -eexecve $args +s1="$(date +%s)" + +s="$s0" +t_reg= +while [ "$s" -le "$s1" ]; do + [ -z "$t_reg" ] && t_reg="$s" || t_reg="$t_reg|$s" + s=$(($s + 1)) +done + +cat > "$EXP" << __EOF__ +($t_reg)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXP" +rm -f "$EXP" diff --git a/tests-m32/strace.supp b/tests-m32/strace.supp new file mode 100644 index 000000000..578b0a259 --- /dev/null +++ b/tests-m32/strace.supp @@ -0,0 +1,7 @@ +{ + get_cpuset_size: sched_getaffinity with NULL mask + Memcheck:Param + sched_getaffinity(mask) + fun:sched_getaffinity* + fun:get_cpuset_size +} diff --git a/tests-m32/struct_flock.c b/tests-m32/struct_flock.c new file mode 100644 index 000000000..34cf58e6b --- /dev/null +++ b/tests-m32/struct_flock.c @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include "flock.h" + +#define FILE_LEN 4096 +#define EINVAL_STR "-1 EINVAL (Invalid argument)" + +#define TEST_FLOCK_EINVAL(cmd) test_flock_einval(cmd, #cmd) + +#ifdef HAVE_TYPEOF +# define TYPEOF_FLOCK_OFF_T typeof(((struct_kernel_flock *) NULL)->l_len) +#else +# define TYPEOF_FLOCK_OFF_T off_t +#endif + +static long +invoke_test_syscall(const unsigned int cmd, void *const p) +{ + const unsigned long op = (unsigned long) 0xffffffff00000000ULL | cmd; + + return syscall(TEST_SYSCALL_NR, 0, op, (unsigned long) p); +} + +static void +test_flock_einval(const int cmd, const char *name) +{ + struct_kernel_flock fl = { + .l_type = F_RDLCK, + .l_start = (TYPEOF_FLOCK_OFF_T) 0xdefaced1facefeedULL, + .l_len = (TYPEOF_FLOCK_OFF_T) 0xdefaced2cafef00dULL + }; + invoke_test_syscall(cmd, &fl); + printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET" + ", l_start=%jd, l_len=%jd}) = %s\n", TEST_SYSCALL_STR, name, + (intmax_t) fl.l_start, (intmax_t) fl.l_len, EINVAL_STR); +} + +static void +test_flock(void) +{ + TEST_FLOCK_EINVAL(F_SETLK); + TEST_FLOCK_EINVAL(F_SETLKW); + + struct_kernel_flock fl = { + .l_type = F_RDLCK, + .l_len = FILE_LEN + }; + long rc = invoke_test_syscall(F_SETLK, &fl); + printf("%s(0, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET" + ", l_start=0, l_len=%d}) = %s\n", + TEST_SYSCALL_STR, FILE_LEN, rc ? EINVAL_STR : "0"); + if (rc) + return; + + invoke_test_syscall(F_GETLK, &fl); + printf("%s(0, F_GETLK, {l_type=F_UNLCK, l_whence=SEEK_SET" + ", l_start=0, l_len=%d, l_pid=0}) = 0\n", + TEST_SYSCALL_STR, FILE_LEN); + + invoke_test_syscall(F_SETLK, &fl); + printf("%s(0, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET" + ", l_start=0, l_len=%d}) = 0\n", + TEST_SYSCALL_STR, FILE_LEN); +} + +static void +create_sample(void) +{ + char fname[] = TEST_SYSCALL_STR "_XXXXXX"; + + (void) close(0); + if (mkstemp(fname)) + perror_msg_and_fail("mkstemp: %s", fname); + if (unlink(fname)) + perror_msg_and_fail("unlink: %s", fname); + if (ftruncate(0, FILE_LEN)) + perror_msg_and_fail("ftruncate"); +} diff --git a/tests-m32/sun_path.expected b/tests-m32/sun_path.expected new file mode 100644 index 000000000..30a11c03d --- /dev/null +++ b/tests-m32/sun_path.expected @@ -0,0 +1,3 @@ +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +bind\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678"\}, 110\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +getsockname\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678"\}, \[110->111\]\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +connect\(1, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678"\}, 110\) += 0 diff --git a/tests-m32/sun_path.test b/tests-m32/sun_path.test new file mode 100755 index 000000000..728328a84 --- /dev/null +++ b/tests-m32/sun_path.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check how long sun_path addresses are traced. + +. "${srcdir=.}/init.sh" + +run_prog ./net-accept-connect 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 +run_strace_merge -ebind,connect,getsockname $args +match_grep + +exit 0 diff --git a/tests-m32/swap.c b/tests-m32/swap.c new file mode 100644 index 000000000..77b25050a --- /dev/null +++ b/tests-m32/swap.c @@ -0,0 +1,51 @@ +#include "tests.h" +#include + +#if defined __NR_swapon && defined __NR_swapoff + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "swap.sample"; + long rc; + + rc = syscall(__NR_swapon, sample, 0); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "0", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, 42); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "42", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, SWAP_FLAG_PREFER); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "SWAP_FLAG_PREFER|0", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, SWAP_FLAG_PREFER | 42); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "SWAP_FLAG_PREFER|42", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, -1L); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, + "SWAP_FLAG_PREFER|SWAP_FLAG_DISCARD|SWAP_FLAG_DISCARD_ONCE" + "|SWAP_FLAG_DISCARD_PAGES|0xfff80000|32767", + rc, errno2name()); + + rc = syscall(__NR_swapoff, sample); + printf("swapoff(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_swapon && __NR_swapoff") + +#endif diff --git a/tests-m32/swap.test b/tests-m32/swap.test new file mode 100755 index 000000000..a30e1fd82 --- /dev/null +++ b/tests-m32/swap.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check swapon and swapoff syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e trace=swapon,swapoff diff --git a/tests-m32/symlink.c b/tests-m32/symlink.c new file mode 100644 index 000000000..72cb49085 --- /dev/null +++ b/tests-m32/symlink.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_symlink + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "symlink_new"; + static const char sample_2[] = "symlink"; + + long rc = syscall(__NR_symlink, sample_1, sample_2); + printf("symlink(\"%s\", \"%s\") = %ld %s (%m)\n", + sample_1, sample_2, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_symlink") + +#endif diff --git a/tests-m32/symlink.test b/tests-m32/symlink.test new file mode 100755 index 000000000..79b93baad --- /dev/null +++ b/tests-m32/symlink.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check symlink syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a34 diff --git a/tests-m32/symlinkat.c b/tests-m32/symlinkat.c new file mode 100644 index 000000000..6e5d617db --- /dev/null +++ b/tests-m32/symlinkat.c @@ -0,0 +1,28 @@ +#include "tests.h" +#include + +#ifdef __NR_symlinkat + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffffULL; + static const char oldpath[] = "symlink_old"; + static const char newpath[] = "symlink_new"; + + long rc = syscall(__NR_symlinkat, oldpath, fd, newpath); + printf("symlinkat(\"%s\", %d, \"%s\") = %ld %s (%m)\n", + oldpath, (int) fd, newpath, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_symlinkat") + +#endif diff --git a/tests-m32/symlinkat.test b/tests-m32/symlinkat.test new file mode 100755 index 000000000..d8501ffd6 --- /dev/null +++ b/tests-m32/symlinkat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check symlinkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/sync.c b/tests-m32/sync.c new file mode 100644 index 000000000..e6e7ce372 --- /dev/null +++ b/tests-m32/sync.c @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_sync + +# include +# include + +int +main(void) +{ + printf("sync() = %ld\n", syscall(__NR_sync)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sync") + +#endif diff --git a/tests-m32/sync.test b/tests-m32/sync.test new file mode 100755 index 000000000..f6bf6c8f5 --- /dev/null +++ b/tests-m32/sync.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a7 diff --git a/tests-m32/sync_file_range.c b/tests-m32/sync_file_range.c new file mode 100644 index 000000000..67d31a89b --- /dev/null +++ b/tests-m32/sync_file_range.c @@ -0,0 +1,63 @@ +/* + * Check decoding of sync_file_range syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined HAVE_SYNC_FILE_RANGE && defined __NR_sync_file_range + +# include + +int +main(void) +{ + const int fd = -1; + const off64_t offset = 0xdeadbeefbadc0dedULL; + const off64_t nbytes = 0xfacefeedcafef00dULL; + const unsigned int flags = -1; + + int rc = sync_file_range(fd, offset, nbytes, flags); + printf("%s(%d, %lld, %lld, SYNC_FILE_RANGE_WAIT_BEFORE" + "|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER" + "|0xfffffff8) = %d %s (%m)\n", + "sync_file_range", fd, + (long long) offset, + (long long) nbytes, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYNC_FILE_RANGE && __NR_sync_file_range") + +#endif diff --git a/tests-m32/sync_file_range.test b/tests-m32/sync_file_range.test new file mode 100755 index 000000000..6aa86d6ca --- /dev/null +++ b/tests-m32/sync_file_range.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync_file_range syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/sync_file_range2.c b/tests-m32/sync_file_range2.c new file mode 100644 index 000000000..6ce7db260 --- /dev/null +++ b/tests-m32/sync_file_range2.c @@ -0,0 +1,63 @@ +/* + * Check decoding of sync_file_range2 syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined HAVE_SYNC_FILE_RANGE && defined __NR_sync_file_range2 + +# include + +int +main(void) +{ + const int fd = -1; + const off64_t offset = 0xdeadbeefbadc0ded; + const off64_t nbytes = 0xfacefeedcafef00d; + const unsigned int flags = -1; + + int rc = sync_file_range(fd, offset, nbytes, flags); + printf("%s(%d, SYNC_FILE_RANGE_WAIT_BEFORE" + "|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER" + "|0xfffffff8, %lld, %lld) = %d %s (%m)\n", + "sync_file_range2", fd, + (long long) offset, + (long long) nbytes, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYNC_FILE_RANGE && __NR_sync_file_range2") + +#endif diff --git a/tests-m32/sync_file_range2.test b/tests-m32/sync_file_range2.test new file mode 100755 index 000000000..0d9945eda --- /dev/null +++ b/tests-m32/sync_file_range2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync_file_range2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/sysinfo.c b/tests-m32/sysinfo.c new file mode 100644 index 000000000..377bdc9c1 --- /dev/null +++ b/tests-m32/sysinfo.c @@ -0,0 +1,76 @@ +/* + * This file is part of sysinfo strace test. + * + * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + sysinfo(NULL); + printf("sysinfo(NULL) = -1 EFAULT (%m)\n"); + + struct sysinfo * const si = tail_alloc(sizeof(*si)); + + if (sysinfo(si)) + perror_msg_and_skip("sysinfo"); + printf("sysinfo({uptime=%llu" + ", loads=[%llu, %llu, %llu]" + ", totalram=%llu" + ", freeram=%llu" + ", sharedram=%llu" + ", bufferram=%llu" + ", totalswap=%llu" + ", freeswap=%llu" + ", procs=%u" + ", totalhigh=%llu" + ", freehigh=%llu" + ", mem_unit=%u" + "}) = 0\n" + , (unsigned long long) si->uptime + , (unsigned long long) si->loads[0] + , (unsigned long long) si->loads[1] + , (unsigned long long) si->loads[2] + , (unsigned long long) si->totalram + , (unsigned long long) si->freeram + , (unsigned long long) si->sharedram + , (unsigned long long) si->bufferram + , (unsigned long long) si->totalswap + , (unsigned long long) si->freeswap + , (unsigned) si->procs + , (unsigned long long) si->totalhigh + , (unsigned long long) si->freehigh + , si->mem_unit + ); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/sysinfo.test b/tests-m32/sysinfo.test new file mode 100755 index 000000000..806d8b61d --- /dev/null +++ b/tests-m32/sysinfo.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of sysinfo syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff --git a/tests-m32/syslog.c b/tests-m32/syslog.c new file mode 100644 index 000000000..5df96cb8c --- /dev/null +++ b/tests-m32/syslog.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_syslog + +# include +# include + +# define SYSLOG_ACTION_READ 2 + +int +main(void) +{ + const long addr = (long) 0xfacefeeddeadbeefULL; + int rc = syscall(__NR_syslog, SYSLOG_ACTION_READ, addr, -1); + printf("syslog(SYSLOG_ACTION_READ, %#lx, -1) = %d %s (%m)\n", + addr, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_syslog") + +#endif diff --git a/tests-m32/syslog.test b/tests-m32/syslog.test new file mode 100755 index 000000000..1c2158e4a --- /dev/null +++ b/tests-m32/syslog.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check syslog syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff --git a/tests-m32/tail_alloc.c b/tests-m32/tail_alloc.c new file mode 100644 index 000000000..08081d4fc --- /dev/null +++ b/tests-m32/tail_alloc.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +void * +tail_alloc(const size_t size) +{ + const size_t page_size = get_page_size(); + const size_t len = (size + page_size - 1) & -page_size; + const size_t alloc_size = len + 6 * page_size; + + void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + if (MAP_FAILED == p) + perror_msg_and_fail("mmap(%zu)", alloc_size); + + void *start_work = p + 3 * page_size; + void *tail_guard = start_work + len; + + if (munmap(p, page_size) || + munmap(p + 2 * page_size, page_size) || + munmap(tail_guard, page_size) || + munmap(tail_guard + 2 * page_size, page_size)) + perror_msg_and_fail("munmap"); + + memset(start_work, 0xff, len); + return tail_guard - size; +} + +void * +tail_memdup(const void *p, const size_t size) +{ + void *dest = tail_alloc(size); + memcpy(dest, p, size); + return dest; +} diff --git a/tests-m32/tee.c b/tests-m32/tee.c new file mode 100644 index 000000000..66d1c94f9 --- /dev/null +++ b/tests-m32/tee.c @@ -0,0 +1,60 @@ +/* + * This file is part of tee strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_tee + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffffULL; + const long int fd_out = (long int) 0xdeadbeeffffffffeULL; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 15; + + long rc = syscall(__NR_tee, fd_in, fd_out, len, flags); + printf("tee(%d, %d, %zu, %s) = %ld %s (%m)\n", + (int) fd_in, (int) fd_out, len, + "SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_tee") + +#endif diff --git a/tests-m32/tee.test b/tests-m32/tee.test new file mode 100755 index 000000000..76b600036 --- /dev/null +++ b/tests-m32/tee.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check tee syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/tests.h b/tests-m32/tests.h new file mode 100644 index 000000000..d4294de9a --- /dev/null +++ b/tests-m32/tests.h @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef STRACE_TESTS_H +#define STRACE_TESTS_H + +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif + +# include +# include "kernel_types.h" +# include "gcc_compat.h" + +/* Tests of "strace -v" are expected to define VERBOSE to 1. */ +#ifndef VERBOSE +# define VERBOSE 0 +#endif + +/* Cached sysconf(_SC_PAGESIZE). */ +size_t get_page_size(void); + +/* Print message and strerror(errno) to stderr, then exit(1). */ +void perror_msg_and_fail(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message to stderr, then exit(1). */ +void error_msg_and_fail(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message to stderr, then exit(77). */ +void error_msg_and_skip(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message and strerror(errno) to stderr, then exit(77). */ +void perror_msg_and_skip(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; + +/* + * Allocate memory that ends on the page boundary. + * Pages allocated by this call are preceeded by an unmapped page + * and followed also by an unmapped page. + */ +void *tail_alloc(const size_t) + ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1)); +/* Allocate memory using tail_alloc, then memcpy. */ +void *tail_memdup(const void *, const size_t) + ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((2)); + +/* + * Fill memory (pointed by ptr, having size bytes) with different bytes (with + * values starting with start and resetting every period) in order to catch + * sign, byte order and/or alignment errors. + */ +void fill_memory_ex(void *ptr, size_t size, unsigned char start, + unsigned char period); +/* Shortcut for fill_memory_ex(ptr, size, 0x80, 0x80) */ +void fill_memory(void *ptr, size_t size); + +/* Close stdin, move stdout to a non-standard descriptor, and print. */ +void tprintf(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)); + +/* Make a hexdump copy of C string */ +const char *hexdump_strdup(const char *); + +/* Make a hexdump copy of memory */ +const char *hexdump_memdup(const char *, size_t); + +/* Make a hexquoted copy of a string */ +const char *hexquote_strndup(const char *, size_t); + +/* Return inode number of socket descriptor. */ +unsigned long inode_of_sockfd(int); + +/* Print string in a quoted form. */ +void print_quoted_string(const char *); + +/* Print memory in a quoted form. */ +void print_quoted_memory(const char *, size_t); + +/* Read an int from the file. */ +int read_int_from_file(const char *, int *); + +/* Check whether given uid matches kernel overflowuid. */ +void check_overflowuid(const int); + +/* Check whether given gid matches kernel overflowgid. */ +void check_overflowgid(const int); + +/* Translate errno to its name. */ +const char *errno2name(void); + +/* Translate signal number to its name. */ +const char *signal2name(int); + +/* Print return code and, in case return code is -1, errno information. */ +const char *sprintrc(long rc); +/* sprintrc variant suitable for usage as part of grep pattern. */ +const char *sprintrc_grep(long rc); + +struct xlat; + +/* Print flags in symbolic form according to xlat table. */ +int printflags(const struct xlat *, const unsigned long long, const char *); + +/* Print constant in symbolic form according to xlat table. */ +int printxval(const struct xlat *, const unsigned long long, const char *); + +/* Invoke a socket syscall, either directly or via __NR_socketcall. */ +int socketcall(const int nr, const int call, + long a1, long a2, long a3, long a4, long a5); + +/* Wrappers for recvmmsg and sendmmsg syscalls. */ +struct mmsghdr; +struct timespec; +int recv_mmsg(int, struct mmsghdr *, unsigned int, unsigned int, struct timespec *); +int send_mmsg(int, struct mmsghdr *, unsigned int, unsigned int); + +/* Create a pipe with maximized descriptor numbers. */ +void pipe_maxfd(int pipefd[2]); + +#define F8ILL_KULONG_SUPPORTED (sizeof(void *) < sizeof(kernel_ulong_t)) +#define F8ILL_KULONG_MASK ((kernel_ulong_t) 0xffffffff00000000ULL) + +/* + * For 64-bit kernel_ulong_t and 32-bit pointer, + * return a kernel_ulong_t value by filling higher bits. + * For other architertures, return the original pointer. + */ +static inline kernel_ulong_t +f8ill_ptr_to_kulong(const void *const ptr) +{ + const unsigned long uptr = (unsigned long) ptr; + return F8ILL_KULONG_SUPPORTED + ? F8ILL_KULONG_MASK | uptr : (kernel_ulong_t) uptr; +} + +# define ARRAY_SIZE(arg) ((unsigned int) (sizeof(arg) / sizeof((arg)[0]))) +# define LENGTH_OF(arg) ((unsigned int) sizeof(arg) - 1) + +/* Zero-extend a signed integer type to unsigned long long. */ +#define zero_extend_signed_to_ull(v) \ + (sizeof(v) == sizeof(char) ? (unsigned long long) (unsigned char) (v) : \ + sizeof(v) == sizeof(short) ? (unsigned long long) (unsigned short) (v) : \ + sizeof(v) == sizeof(int) ? (unsigned long long) (unsigned int) (v) : \ + sizeof(v) == sizeof(long) ? (unsigned long long) (unsigned long) (v) : \ + (unsigned long long) (v)) + +/* Sign-extend an unsigned integer type to long long. */ +#define sign_extend_unsigned_to_ll(v) \ + (sizeof(v) == sizeof(char) ? (long long) (char) (v) : \ + sizeof(v) == sizeof(short) ? (long long) (short) (v) : \ + sizeof(v) == sizeof(int) ? (long long) (int) (v) : \ + sizeof(v) == sizeof(long) ? (long long) (long) (v) : \ + (long long) (v)) + +# define SKIP_MAIN_UNDEFINED(arg) \ + int main(void) { error_msg_and_skip("undefined: %s", arg); } + +/* + * The kernel used to define 64-bit types on 64-bit systems on a per-arch + * basis. Some architectures would use unsigned long and others would use + * unsigned long long. These types were exported as part of the + * kernel-userspace ABI and now must be maintained forever. This matches + * what the kernel exports for each architecture so we don't need to cast + * every printing of __u64 or __s64 to stdint types. + */ +# if SIZEOF_LONG == 4 +# define PRI__64 "ll" +# elif defined ALPHA || defined IA64 || defined MIPS || defined POWERPC +# define PRI__64 "l" +# else +# define PRI__64 "ll" +# endif + +# define PRI__d64 PRI__64"d" +# define PRI__u64 PRI__64"u" +# define PRI__x64 PRI__64"x" + +# if WORDS_BIGENDIAN +# define LL_PAIR(HI, LO) (HI), (LO) +# else +# define LL_PAIR(HI, LO) (LO), (HI) +# endif +# define LL_VAL_TO_PAIR(llval) LL_PAIR((long) ((llval) >> 32), (long) (llval)) + +# define _STR(_arg) #_arg +# define ARG_STR(_arg) (_arg), #_arg +# define ARG_ULL_STR(_arg) _arg##ULL, #_arg + +#endif /* !STRACE_TESTS_H */ diff --git a/tests-m32/threads-execve.c b/tests-m32/threads-execve.c new file mode 100644 index 000000000..853645ffa --- /dev/null +++ b/tests-m32/threads-execve.c @@ -0,0 +1,246 @@ +/* + * Check decoding of threads when a non-leader thread invokes execve. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +static pid_t leader; +static pid_t tid; + +static void +handler(int signo) +{ +} + +static unsigned int sigsetsize; +static long +k_sigsuspend(const sigset_t *const set) +{ + return syscall(__NR_rt_sigsuspend, set, sigsetsize); +} + +static pid_t +k_gettid(void) +{ + return syscall(__NR_gettid); +} + +static void +get_sigsetsize(void) +{ + static const struct sigaction sa = { .sa_handler = handler }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + if (sigprocmask(SIG_BLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + raise(SIGUSR1); + + sigemptyset(&mask); + for (sigsetsize = sizeof(mask) / sizeof(long); + sigsetsize; sigsetsize >>= 1) { + long rc = k_sigsuspend(&mask); + if (!rc) + error_msg_and_fail("rt_sigsuspend"); + if (EINTR == errno) + break; + printf("%-5d rt_sigsuspend(%p, %u) = %s\n", + leader, &mask, sigsetsize, sprintrc(rc)); + } + if (!sigsetsize) + perror_msg_and_fail("rt_sigsuspend"); + printf("%-5d rt_sigsuspend([], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", leader, sigsetsize); +} + +enum { + ACTION_exit = 0, + ACTION_rt_sigsuspend, + ACTION_nanosleep, + NUMBER_OF_ACTIONS +}; + +static const unsigned int NUMBER_OF_ITERATIONS = 1; +static unsigned int action; +static int fds[2]; + +static unsigned int +arglen(char **args) +{ + char **p; + + for (p = args; *p; ++p) + ; + + return p - args; +} + +static void * +thread(void *arg) +{ + tid = k_gettid(); + + static char buf[sizeof(action) * 3]; + sprintf(buf, "%u", action + 1); + + char **argv = arg; + argv[2] = buf; + + if (read(fds[0], fds, sizeof(fds[0]))) + perror_msg_and_fail("execve"); + + struct timespec ts = { .tv_nsec = 100000000 }; + (void) clock_nanosleep(CLOCK_REALTIME, 0, &ts, NULL); + + ts.tv_nsec = 12345; + printf("%-5d nanosleep({tv_sec=0, tv_nsec=%u}, NULL) = 0\n", + tid, (unsigned int) ts.tv_nsec); + + switch (action % NUMBER_OF_ACTIONS) { + case ACTION_exit: + printf("%-5d execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" + ", [/* %u vars */] \n", + tid, argv[0], argv[0], argv[1], argv[2], + arglen(environ), leader); + break; + case ACTION_rt_sigsuspend: + printf("%-5d execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" + ", [/* %u vars */] \n" + "%-5d <... rt_sigsuspend resumed>) = ?\n", + tid, argv[0], argv[0], argv[1], argv[2], + arglen(environ), + leader); + break; + case ACTION_nanosleep: + printf("%-5d execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" + ", [/* %u vars */] \n" + "%-5d <... nanosleep resumed> )" + " = ?\n", + tid, argv[0], argv[0], argv[1], argv[2], + arglen(environ), + leader); + break; + } + + printf("%-5d +++ superseded by execve in pid %u +++\n" + "%-5d <... execve resumed> ) = 0\n", + leader, tid, + leader); + + (void) nanosleep(&ts, NULL); + execve(argv[0], argv, environ); + perror_msg_and_fail("execve"); +} + +int +main(int ac, char **av) +{ + setvbuf(stdout, NULL, _IONBF, 0); + leader = getpid(); + + if (ac < 3) { + struct timespec ts = { .tv_nsec = 1 }; + if (clock_nanosleep(CLOCK_REALTIME, 0, &ts, NULL)) + perror_msg_and_skip("clock_nanosleep CLOCK_REALTIME"); + + printf("%-5d execve(\"%s\", [\"%s\"], [/* %u vars */]) = 0\n", + leader, av[0], av[0], arglen(environ)); + + get_sigsetsize(); + static char buf[sizeof(sigsetsize) * 3]; + sprintf(buf, "%u", sigsetsize); + + char *argv[] = { av[0], buf, (char *) "0", NULL }; + printf("%-5d execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" + ", [/* %u vars */]) = 0\n", + leader, argv[0], argv[0], argv[1], argv[2], + arglen(environ)); + execve(argv[0], argv, environ); + perror_msg_and_fail("execve"); + } + + sigsetsize = atoi(av[1]); + action = atoi(av[2]); + + if (action >= NUMBER_OF_ACTIONS * NUMBER_OF_ITERATIONS) { + printf("%-5d +++ exited with 0 +++\n", leader); + return 0; + } + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + pthread_t t; + errno = pthread_create(&t, NULL, thread, av); + if (errno) + perror_msg_and_fail("pthread_create"); + + struct timespec ts = { .tv_sec = 123 }; + sigset_t mask; + sigemptyset(&mask); + + static char leader_str[sizeof(leader) * 3]; + int leader_str_len = + snprintf(leader_str, sizeof(leader_str), "%-5d", leader); + + switch (action % NUMBER_OF_ACTIONS) { + case ACTION_exit: + printf("%s exit(42)%*s= ?\n", leader_str, + (int) sizeof(leader_str) - leader_str_len, " "); + close(fds[1]); + (void) syscall(__NR_exit, 42); + break; + case ACTION_rt_sigsuspend: + printf("%s rt_sigsuspend([], %u \n", + leader_str, sigsetsize); + close(fds[1]); + (void) k_sigsuspend(&mask); + break; + case ACTION_nanosleep: + printf("%s nanosleep({tv_sec=%u, tv_nsec=0}" + ", \n", + leader_str, (unsigned int) ts.tv_sec); + close(fds[1]); + (void) nanosleep(&ts, 0); + break; + } + + return 1; +} diff --git a/tests-m32/threads-execve.test b/tests-m32/threads-execve.test new file mode 100755 index 000000000..4a771467a --- /dev/null +++ b/tests-m32/threads-execve.test @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Check decoding of threads when a non-leader thread invokes execve. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# Check that PTRACE_EVENT_EXEC support in kernel is good enough. +# The kernel before commit v3.1-rc1~308^2~7 reported 0 instead of old pid. +require_min_kernel_version_or_skip 3.1 + +check_prog diff +run_prog > /dev/null + +set -- -a21 -f -esignal=none -e trace=execve,exit,nanosleep,rt_sigsuspend $args + +# Due to probabilistic nature of the test, try it several times. +i=0 +while [ $i -le 9 ]; do + run_strace "$@" > "$EXP" + diff -- "$EXP" "$LOG" || continue + rm -f "$EXP" + exit 0 +done + +fail_ "$STRACE $* output mismatch" diff --git a/tests-m32/time.c b/tests-m32/time.c new file mode 100644 index 000000000..4a5cde9c1 --- /dev/null +++ b/tests-m32/time.c @@ -0,0 +1,61 @@ +/* + * This file is part of time strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_time + +# include +# include +# include +# include + +int +main(void) +{ + time_t *p = tail_alloc(sizeof(time_t)); + + time_t t = syscall(__NR_time, NULL); + if ((time_t) -1 == t) + perror_msg_and_skip("time"); + printf("time(NULL) = %jd\n", (intmax_t) t); + + t = syscall(__NR_time, p); + printf("time([%jd]) = %jd\n", (intmax_t) *p, (intmax_t) t); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_time") + +#endif diff --git a/tests-m32/time.test b/tests-m32/time.test new file mode 100755 index 000000000..6ab193a4b --- /dev/null +++ b/tests-m32/time.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check time syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-m32/timer_create.c b/tests-m32/timer_create.c new file mode 100644 index 000000000..1a2596271 --- /dev/null +++ b/tests-m32/timer_create.c @@ -0,0 +1,125 @@ +/* + * This file is part of timer_create strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_timer_create + +# include +# include +# include +# include +# include "sigevent.h" + +int +main(void) +{ + syscall(__NR_timer_create, CLOCK_REALTIME, NULL, NULL); + printf("timer_create(CLOCK_REALTIME, NULL, NULL) = -1 %s (%m)\n", + errno2name()); + + int tid[4] = {}; + struct_sigevent sev = { + .sigev_notify = 0xdefaced, + .sigev_signo = 0xfacefeed, + .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0dedULL + }; + + syscall(__NR_timer_create, CLOCK_REALTIME, &sev, NULL); + printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=%u, " + "sigev_notify=%#x /* SIGEV_??? */}, NULL) = -1 %s (%m)\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, + sev.sigev_signo, sev.sigev_notify, + errno2name()); + + sev.sigev_notify = SIGEV_NONE; + if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[0])) + perror_msg_and_skip("timer_create CLOCK_REALTIME"); + printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=%u, sigev_notify=SIGEV_NONE}, " + "[%d]) = 0\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, + sev.sigev_signo, tid[0]); + + sev.sigev_notify = SIGEV_SIGNAL; + sev.sigev_signo = SIGALRM; + if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[1])) + perror_msg_and_skip("timer_create CLOCK_MONOTONIC"); + printf("timer_create(CLOCK_MONOTONIC, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=SIGALRM, " + "sigev_notify=SIGEV_SIGNAL}, [%d]) = 0\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, tid[1]); + + sev.sigev_notify = SIGEV_THREAD; + sev.sigev_un.sigev_thread.function = + (unsigned long) 0xdeadbeefbadc0dedULL; + sev.sigev_un.sigev_thread.attribute = + (unsigned long) 0xcafef00dfacefeedULL; + if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[2])) + perror_msg_and_skip("timer_create CLOCK_REALTIME"); + printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD" + ", sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}" + ", [%d]) = 0\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, + sev.sigev_un.sigev_thread.function, + sev.sigev_un.sigev_thread.attribute, + tid[2]); + +#ifndef SIGEV_THREAD_ID +# define SIGEV_THREAD_ID 4 +#endif + sev.sigev_notify = SIGEV_THREAD_ID; + sev.sigev_un.tid = getpid(); + if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[3])) + perror_msg_and_skip("timer_create CLOCK_MONOTONIC"); + printf("timer_create(CLOCK_MONOTONIC, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=SIGALRM, " + "sigev_notify=SIGEV_THREAD_ID, sigev_notify_thread_id=%d}" + ", [%d]) = 0\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, + sev.sigev_un.tid, + tid[3]); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_timer_create") + +#endif diff --git a/tests-m32/timer_create.test b/tests-m32/timer_create.test new file mode 100755 index 000000000..870a1795c --- /dev/null +++ b/tests-m32/timer_create.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check timer_create syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/timer_xettime.c b/tests-m32/timer_xettime.c new file mode 100644 index 000000000..9eabbf084 --- /dev/null +++ b/tests-m32/timer_xettime.c @@ -0,0 +1,112 @@ +/* + * This file is part of timer_xettime strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_timer_create \ + && defined __NR_timer_gettime \ + && defined __NR_timer_settime + +# include +# include +# include +# include +# include + +int +main(void) +{ + syscall(__NR_timer_settime, 0xdefaced, TIMER_ABSTIME, NULL, NULL); + printf("timer_settime(%d, TIMER_ABSTIME, NULL, NULL)" + " = -1 EINVAL (%m)\n", 0xdefaced); + + int tid; + struct sigevent sev = { .sigev_notify = SIGEV_NONE }; + + if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid)) + perror_msg_and_skip("timer_create"); + printf("timer_create(CLOCK_MONOTONIC, {sigev_signo=0" + ", sigev_notify=SIGEV_NONE}, [%d]) = 0\n", tid); + + struct { + struct itimerspec its; + uint32_t pad[4]; + } old = { + .its = { + .it_interval = { 0xdeface5, 0xdeface6 }, + .it_value = { 0xdeface7, 0xdeface8 } + }, + .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } + }, new = { + .its = { + .it_interval = { 0xdeface1, 0xdeface2 }, + .it_value = { 0xdeface3, 0xdeface4 } + }, + .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } + }; + + if (syscall(__NR_timer_settime, tid, 0, &new.its, &old.its)) + perror_msg_and_skip("timer_settime"); + printf("timer_settime(%d, 0" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}" + ") = 0\n", + tid, + (intmax_t) new.its.it_interval.tv_sec, + (intmax_t) new.its.it_interval.tv_nsec, + (intmax_t) new.its.it_value.tv_sec, + (intmax_t) new.its.it_value.tv_nsec, + (intmax_t) old.its.it_interval.tv_sec, + (intmax_t) old.its.it_interval.tv_nsec, + (intmax_t) old.its.it_value.tv_sec, + (intmax_t) old.its.it_value.tv_nsec); + + if (syscall(__NR_timer_gettime, tid, &old.its)) + perror_msg_and_skip("timer_gettime"); + printf("timer_gettime(%d" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}) = 0\n", + tid, + (intmax_t) old.its.it_interval.tv_sec, + (intmax_t) old.its.it_interval.tv_nsec, + (intmax_t) old.its.it_value.tv_sec, + (intmax_t) old.its.it_value.tv_nsec); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_timer_create && __NR_timer_gettime && __NR_timer_settime") + +#endif diff --git a/tests-m32/timer_xettime.test b/tests-m32/timer_xettime.test new file mode 100755 index 000000000..08bcdd68c --- /dev/null +++ b/tests-m32/timer_xettime.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check timer_create, timer_settime, and timer_gettime syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=timer_create,timer_settime,timer_gettime diff --git a/tests-m32/timerfd_xettime.c b/tests-m32/timerfd_xettime.c new file mode 100644 index 000000000..ca7124ec3 --- /dev/null +++ b/tests-m32/timerfd_xettime.c @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_timerfd_create \ + && defined __NR_timerfd_gettime \ + && defined __NR_timerfd_settime \ + && defined O_CLOEXEC + +# include +# include +# include +# include + +int +main(void) +{ + (void) close(0); + if (syscall(__NR_timerfd_create, CLOCK_MONOTONIC, O_CLOEXEC | O_NONBLOCK)) + perror_msg_and_skip("timerfd_create"); + puts("timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC|TFD_NONBLOCK) = 0"); + + struct { + struct itimerspec its; + uint32_t pad[4]; + } old = { + .its = { + .it_interval = { 0xdeface5, 0xdeface6 }, + .it_value = { 0xdeface7, 0xdeface8 } + }, + .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } + }, new = { + .its = { + .it_interval = { 0xdeface1, 0xdeface2 }, + .it_value = { 0xdeface3, 0xdeface4 } + }, + .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } + }; + + if (syscall(__NR_timerfd_settime, 0, 0, &new.its, &old.its)) + perror_msg_and_skip("timerfd_settime"); + printf("timerfd_settime(0, 0" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}" + ") = 0\n", + (intmax_t) new.its.it_interval.tv_sec, + (intmax_t) new.its.it_interval.tv_nsec, + (intmax_t) new.its.it_value.tv_sec, + (intmax_t) new.its.it_value.tv_nsec, + (intmax_t) old.its.it_interval.tv_sec, + (intmax_t) old.its.it_interval.tv_nsec, + (intmax_t) old.its.it_value.tv_sec, + (intmax_t) old.its.it_value.tv_nsec); + + if (syscall(__NR_timerfd_gettime, 0, &old.its)) + perror_msg_and_skip("timerfd_gettime"); + printf("timerfd_gettime(0" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}) = 0\n", + (intmax_t) old.its.it_interval.tv_sec, + (intmax_t) old.its.it_interval.tv_nsec, + (intmax_t) old.its.it_value.tv_sec, + (intmax_t) old.its.it_value.tv_nsec); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_timerfd_create && __NR_timerfd_gettime" + " && __NR_timerfd_settime && O_CLOEXEC") + +#endif diff --git a/tests-m32/timerfd_xettime.test b/tests-m32/timerfd_xettime.test new file mode 100755 index 000000000..75aa21c2a --- /dev/null +++ b/tests-m32/timerfd_xettime.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check timerfd_create, timerfd_settime, and timerfd_gettime syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=timerfd_create,timerfd_settime,timerfd_gettime diff --git a/tests-m32/times-fail.c b/tests-m32/times-fail.c new file mode 100644 index 000000000..cb69bd431 --- /dev/null +++ b/tests-m32/times-fail.c @@ -0,0 +1,15 @@ +#include "tests.h" +#include +#include +#include +#include + +int +main (void) +{ + assert(syscall(__NR_times, 0x42) == -1); + printf("times(0x42) = -1 EFAULT (%m)\n"); + puts("+++ exited with 0 +++"); + + return 0; +} diff --git a/tests-m32/times-fail.test b/tests-m32/times-fail.test new file mode 100755 index 000000000..ee28a060b --- /dev/null +++ b/tests-m32/times-fail.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of failing times syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 -e trace=times diff --git a/tests-m32/times.c b/tests-m32/times.c new file mode 100644 index 000000000..2c7b95e58 --- /dev/null +++ b/tests-m32/times.c @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2015 Eugene Syromyatnikov + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * @file + * This test burns some CPU cycles in user space and kernel space in order to + * get some non-zero values returned by times(2). + */ + +#include "tests.h" +#include +#include +#include +#include + +#include +#include +#include + +enum { + NUM_USER_ITERS = 1000000, + PARENT_CPUTIME_LIMIT_NSEC = 200000000, + CHILD_CPUTIME_LIMIT_NSEC = 300000000 +}; + +int +main (void) +{ + struct timespec ts; + volatile int dummy = 0; + int i = 0; + + pid_t pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + const long cputime_limit = + pid ? PARENT_CPUTIME_LIMIT_NSEC : CHILD_CPUTIME_LIMIT_NSEC; + + /* Enjoying my user time */ + while (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) == 0) { + if (ts.tv_sec || ts.tv_nsec >= cputime_limit) + break; + + if (i && !(ts.tv_sec || ts.tv_nsec)) + error_msg_and_skip("clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {0, 0})"); + + for (i = 0; i < NUM_USER_ITERS; ++i) + ++dummy; + } + + /* Enjoying my system time */ + while (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) == 0) { + if (ts.tv_sec || ts.tv_nsec >= cputime_limit * 2) + break; + + sched_yield(); + } + + if (pid == 0) { + return 0; + } else { + wait(NULL); + } + + struct tms tbuf; + unsigned long long llres; + + /* + * On systems where user's and kernel's long types are the same, + * prefer direct times syscall over libc's times function because + * the latter is more prone to return value truncation. + */ +#undef USE_LIBC_SYSCALL +#if defined __NR_times && \ + !defined(LINUX_MIPSN32) && \ + !(defined __x86_64__ && defined __ILP32__) +# define USE_LIBC_SYSCALL 1 +#endif + +#if defined USE_LIBC_SYSCALL + long res = syscall(__NR_times, &tbuf); + + if (-1L == res) + perror_msg_and_skip("times"); + else + llres = (unsigned long) res; +#elif defined __NR_times && defined __x86_64__ && defined __ILP32__ + register long arg asm("rdi") = (long) &tbuf; + asm volatile("syscall\n\t" + : "=a"(llres) + : "0"(__NR_times), "r"(arg) + : "memory", "cc", "r11", "cx"); + if (llres > 0xfffffffffffff000) + return 77; +#else + clock_t res = times(&tbuf); + + if ((clock_t) -1 == res) + perror_msg_and_skip("times"); + if (sizeof(res) < sizeof(unsigned long long)) + llres = (unsigned long) res; + else + llres = res; +#endif + + printf("times({tms_utime=%llu, tms_stime=%llu, ", + (unsigned long long) tbuf.tms_utime, + (unsigned long long) tbuf.tms_stime); + printf("tms_cutime=%llu, tms_cstime=%llu}) = %llu\n", + (unsigned long long) tbuf.tms_cutime, + (unsigned long long) tbuf.tms_cstime, + llres); + puts("+++ exited with 0 +++"); + + return 0; +} diff --git a/tests-m32/times.test b/tests-m32/times.test new file mode 100755 index 000000000..b97e0d339 --- /dev/null +++ b/tests-m32/times.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of times syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff --git a/tests-m32/tprintf.c b/tests-m32/tprintf.c new file mode 100644 index 000000000..a759d8af3 --- /dev/null +++ b/tests-m32/tprintf.c @@ -0,0 +1,90 @@ +/* + * Close stdin, move stdout to a non-standard descriptor, and print. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +static ssize_t +write_retry(int fd, const void *buf, size_t count) +{ + ssize_t rc; + + do { + errno = 0; + rc = write(fd, buf, count); + } while (rc == -1 && EINTR == errno); + + if (rc <= 0) + perror_msg_and_fail("write"); + + return rc; +} + +static void +write_loop(int fd, const char *buf, size_t count) +{ + ssize_t offset = 0; + + while (count > 0) { + ssize_t block = write_retry(fd, &buf[offset], count); + + offset += block; + count -= (size_t) block; + } +} + +void +tprintf(const char *fmt, ...) +{ + static int initialized; + if (!initialized) { + assert(dup2(1, 3) == 3); + assert(close(1) == 0); + (void) close(0); + initialized = 1; + } + + va_list p; + va_start(p, fmt); + + static char buf[65536]; + int len = vsnprintf(buf, sizeof(buf), fmt, p); + if (len < 0) + perror_msg_and_fail("vsnprintf"); + assert((unsigned) len < sizeof(buf)); + + write_loop(3, buf, len); + + va_end(p); +} diff --git a/tests-m32/truncate.c b/tests-m32/truncate.c new file mode 100644 index 000000000..d9529334e --- /dev/null +++ b/tests-m32/truncate.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_truncate + +# include +# include + +int +main(void) +{ + static const char fname[] = "truncate\nfilename"; + static const char qname[] = "truncate\\nfilename"; + const kernel_ulong_t len = (kernel_ulong_t) 0xdefaced0badc0deULL; + long rc; + + if (sizeof(len) > sizeof(long)) + rc = truncate(fname, len); + else + rc = syscall(__NR_truncate, fname, len); + + printf("truncate(\"%s\", %llu) = %ld %s (%m)\n", + qname, (unsigned long long) len, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_truncate") + +#endif diff --git a/tests-m32/truncate.test b/tests-m32/truncate.test new file mode 100755 index 000000000..6bf1e7025 --- /dev/null +++ b/tests-m32/truncate.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check truncate syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/truncate64.c b/tests-m32/truncate64.c new file mode 100644 index 000000000..8c29ea81b --- /dev/null +++ b/tests-m32/truncate64.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_truncate64 + +# include +# include + +int +main(void) +{ + static const char fname[] = "truncate64\nfilename"; + static const char qname[] = "truncate64\\nfilename"; + const off_t len = 0xdefaceddeadbeefULL; + + int rc = truncate(fname, len); + printf("truncate64(\"%s\", %llu) = %d %s (%m)\n", + qname, (unsigned long long) len, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_truncate64") + +#endif diff --git a/tests-m32/truncate64.test b/tests-m32/truncate64.test new file mode 100755 index 000000000..c46680626 --- /dev/null +++ b/tests-m32/truncate64.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check truncate64 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-m32/ugetrlimit.c b/tests-m32/ugetrlimit.c new file mode 100644 index 000000000..a99e496d9 --- /dev/null +++ b/tests-m32/ugetrlimit.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_ugetrlimit + +# define NR_GETRLIMIT __NR_ugetrlimit +# define STR_GETRLIMIT "ugetrlimit" +# include "xgetrlimit.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_ugetrlimit") + +#endif diff --git a/tests-m32/ugetrlimit.test b/tests-m32/ugetrlimit.test new file mode 100755 index 000000000..f4648ff18 --- /dev/null +++ b/tests-m32/ugetrlimit.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of ugetrlimit syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-m32/uio.c b/tests-m32/uio.c new file mode 100644 index 000000000..6291f972f --- /dev/null +++ b/tests-m32/uio.c @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#if defined(HAVE_PREADV) && defined(HAVE_PWRITEV) + +# include +# include +# include +# include + +int +main(void) +{ + const off_t offset = 0xdefaceddeadbeefLL; + char buf[4]; + struct iovec iov = { buf, sizeof buf }; + + (void) close(0); + assert(open("/dev/zero", O_RDONLY) == 0); + assert(pread(0, buf, sizeof buf, offset) == 4); + assert(preadv(0, &iov, 1, offset) == 4); + assert(!close(0)); + + assert(open("/dev/null", O_WRONLY) == 0); + assert(pwrite(0, buf, sizeof buf, offset) == 4); + assert(pwritev(0, &iov, 1, offset) == 4); + assert(!close(0)); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PREADV && HAVE_PWRITEV") + +#endif diff --git a/tests-m32/uio.expected b/tests-m32/uio.expected new file mode 100644 index 000000000..98d5c06db --- /dev/null +++ b/tests-m32/uio.expected @@ -0,0 +1,4 @@ +pread(64)?\(0, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4 +preadv\(0, \[\{iov_base="\\0\\0\\0\\0", iov_len=4\}\], 1, 1004211379570065135\) += 4 +pwrite(64)?\(0, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4 +pwritev\(0, \[\{iov_base="\\0\\0\\0\\0", iov_len=4\}\], 1, 1004211379570065135\) += 4 diff --git a/tests-m32/uio.test b/tests-m32/uio.test new file mode 100755 index 000000000..020b97e95 --- /dev/null +++ b/tests-m32/uio.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check how pread/pwrite and preadv/pwritev syscalls are traced. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -edesc $args +match_grep + +exit 0 diff --git a/tests-m32/umask.c b/tests-m32/umask.c new file mode 100644 index 000000000..86903a954 --- /dev/null +++ b/tests-m32/umask.c @@ -0,0 +1,24 @@ +#include +#include + +void +test_umask(const mode_t mode) +{ + mode_t rc = umask(0xffff0000 | mode); + printf("umask(%#03ho) = %#03o\n", (unsigned short) mode, rc); +} + +int +main(void) +{ + test_umask(0); + test_umask(06); + test_umask(026); + test_umask(0126); + test_umask(07777); + test_umask(0107777); + test_umask(-1); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/umask.test b/tests-m32/umask.test new file mode 100755 index 000000000..1351721f6 --- /dev/null +++ b/tests-m32/umask.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check umask syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff --git a/tests-m32/umode_t.c b/tests-m32/umode_t.c new file mode 100644 index 000000000..5041638ee --- /dev/null +++ b/tests-m32/umode_t.c @@ -0,0 +1,78 @@ +/* + * Check decoding of umode_t type syscall arguments. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#ifndef TEST_SYSCALL_PREFIX_ARGS +# define TEST_SYSCALL_PREFIX_ARGS +#endif +#ifndef TEST_SYSCALL_PREFIX_STR +# define TEST_SYSCALL_PREFIX_STR "" +#endif + +static const char sample[] = TEST_SYSCALL_STR; + +static void +test_syscall(unsigned short mode) +{ + unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode; + long rc = syscall(TEST_SYSCALL_NR, TEST_SYSCALL_PREFIX_ARGS + sample, lmode); + + if (mode <= 07) + printf("%s(%s\"%s\", 00%d) = %ld %s (%m)\n", + sample, TEST_SYSCALL_PREFIX_STR, + sample, (int) mode, rc, errno2name()); + else + printf("%s(%s\"%s\", %#03ho) = %ld %s (%m)\n", + sample, TEST_SYSCALL_PREFIX_STR, + sample, mode, rc, errno2name()); +} + +int +main(void) +{ + test_syscall(0); + test_syscall(0xffff); + test_syscall(06); + test_syscall(060); + test_syscall(0600); + test_syscall(024); + test_syscall(S_IFREG); + test_syscall(S_IFDIR | 06); + test_syscall(S_IFLNK | 060); + test_syscall(S_IFIFO | 0600); + test_syscall(S_IFCHR | 024); + test_syscall((0xffff & ~S_IFMT) | S_IFBLK); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/umount.c b/tests-m32/umount.c new file mode 100644 index 000000000..eda7ae5c4 --- /dev/null +++ b/tests-m32/umount.c @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#ifdef __NR_oldumount +# define TEST_SYSCALL_STR "oldumount" +#else +# if defined __NR_umount && defined __NR_umount2 +# define __NR_oldumount __NR_umount +# define TEST_SYSCALL_STR "umount" +# endif +#endif + +#ifdef __NR_oldumount + +int +main(void) +{ + static const char sample[] = "umount.sample"; + if (mkdir(sample, 0700)) + perror_msg_and_fail("mkdir: %s", sample); + + long rc = syscall(__NR_oldumount, sample); + printf("%s(\"%s\") = %ld %s (%m)\n", + TEST_SYSCALL_STR, sample, rc, errno2name()); + + if (rmdir(sample)) + perror_msg_and_fail("rmdir: %s", sample); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_oldumount") + +#endif diff --git a/tests-m32/umount.test b/tests-m32/umount.test new file mode 100755 index 000000000..a5840d54b --- /dev/null +++ b/tests-m32/umount.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check umount syscall decoding. + +. "${srcdir=.}/init.sh" + +case "$STRACE_ARCH" in + alpha) syscall=oldumount ;; + *) syscall=umount ;; +esac +run_strace_match_diff -a24 -s6 -e trace=$syscall diff --git a/tests-m32/umount2.c b/tests-m32/umount2.c new file mode 100644 index 000000000..1a6d8451a --- /dev/null +++ b/tests-m32/umount2.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#ifdef __NR_umount2 +# define TEST_SYSCALL_STR "umount2" +#else +# define __NR_umount2 __NR_umount +# define TEST_SYSCALL_STR "umount" +#endif + +int +main(void) +{ + static const char sample[] = "umount2.sample"; + if (mkdir(sample, 0700)) + perror_msg_and_fail("mkdir: %s", sample); + (void) syscall(__NR_umount2, sample, 31); + printf("%s(\"%s\", MNT_FORCE|MNT_DETACH|MNT_EXPIRE|UMOUNT_NOFOLLOW|0x10)" + " = -1 EINVAL (%m)\n", TEST_SYSCALL_STR, sample); + if (rmdir(sample)) + perror_msg_and_fail("rmdir: %s", sample); + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/umount2.test b/tests-m32/umount2.test new file mode 100755 index 000000000..c43b38dba --- /dev/null +++ b/tests-m32/umount2.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check umount2 syscall decoding. + +. "${srcdir=.}/init.sh" + +case "$STRACE_ARCH" in + alpha|ia64) syscall=umount ;; + *) syscall=umount2 ;; +esac +run_strace_match_diff -s7 -e trace=$syscall diff --git a/tests-m32/umoven-illptr.c b/tests-m32/umoven-illptr.c new file mode 100644 index 000000000..4deee1634 --- /dev/null +++ b/tests-m32/umoven-illptr.c @@ -0,0 +1,57 @@ +/* + * Check decoding of invalid pointer by umoven. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +int +main(void) +{ + if (F8ILL_KULONG_SUPPORTED) { + struct timespec ts = { 0, 0 }; + const void *const p = tail_memdup(&ts, sizeof(ts)); + + long rc = syscall(__NR_nanosleep, p, NULL); + printf("nanosleep({tv_sec=0, tv_nsec=0}, NULL) = %s\n", + sprintrc(rc)); + + const kernel_ulong_t ill = f8ill_ptr_to_kulong(p); + rc = syscall(__NR_nanosleep, ill, NULL); + printf("nanosleep(%#llx, NULL) = %s\n", + (unsigned long long) ill, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; + } else { + return 77; + } +} diff --git a/tests-m32/umoven-illptr.test b/tests-m32/umoven-illptr.test new file mode 100755 index 000000000..7b8cb314e --- /dev/null +++ b/tests-m32/umoven-illptr.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of invalid pointer by umoven. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a36 -e trace=nanosleep diff --git a/tests-m32/umovestr-illptr.c b/tests-m32/umovestr-illptr.c new file mode 100644 index 000000000..dea6885d4 --- /dev/null +++ b/tests-m32/umovestr-illptr.c @@ -0,0 +1,53 @@ +/* + * Check decoding of invalid pointer by umovestr. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + if (F8ILL_KULONG_SUPPORTED) { + const void *const p = tail_memdup(".", 2); + long rc = syscall(__NR_chdir, p); + printf("chdir(\".\") = %s\n", sprintrc(rc)); + + const kernel_ulong_t ill = f8ill_ptr_to_kulong(p); + rc = syscall(__NR_chdir, ill); + printf("chdir(%#llx) = %s\n", + (unsigned long long) ill, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; + } else { + return 77; + } +} diff --git a/tests-m32/umovestr-illptr.test b/tests-m32/umovestr-illptr.test new file mode 100755 index 000000000..6f1cc8620 --- /dev/null +++ b/tests-m32/umovestr-illptr.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of invalid pointer by umovestr. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a11 -e trace=chdir diff --git a/tests-m32/umovestr.c b/tests-m32/umovestr.c new file mode 100644 index 000000000..95fccb677 --- /dev/null +++ b/tests-m32/umovestr.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + const size_t tail_len = 257; + char *addr = tail_alloc(tail_len); + memset(addr, '/', tail_len - 1); + addr[tail_len - 1] = '\0'; + if (chdir(addr)) + perror_msg_and_skip("chdir"); + return 0; +} diff --git a/tests-m32/umovestr.expected b/tests-m32/umovestr.expected new file mode 100644 index 000000000..c26d877ec --- /dev/null +++ b/tests-m32/umovestr.expected @@ -0,0 +1,2 @@ +chdir("////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////") = 0 ++++ exited with 0 +++ diff --git a/tests-m32/umovestr.test b/tests-m32/umovestr.test new file mode 100755 index 000000000..5ae8ffa9b --- /dev/null +++ b/tests-m32/umovestr.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# umovestr short read regression test + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -e chdir $args +match_diff + +exit 0 diff --git a/tests-m32/umovestr2.c b/tests-m32/umovestr2.c new file mode 100644 index 000000000..b2c63d800 --- /dev/null +++ b/tests-m32/umovestr2.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + const size_t page_len = get_page_size(); + const size_t tail_len = page_len * 2 - 1; + const size_t str_len = tail_len - 1; + + char *addr = tail_alloc(tail_len); + memset(addr, '0', str_len); + addr[str_len] = '\0'; + + char *argv[] = { NULL }; + char *envp[] = { addr, NULL }; + execve("", argv, envp); + + printf("execve(\"\", [], [\"%0*u\"]) = -1 ENOENT (%m)\n", + (int) str_len, 0); + puts("+++ exited with 0 +++"); + + return 0; +} diff --git a/tests-m32/umovestr2.test b/tests-m32/umovestr2.test new file mode 100755 index 000000000..5c5d561f9 --- /dev/null +++ b/tests-m32/umovestr2.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# umovestr short read regression test + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -veexecve -s262144 $args > "$EXP" +check_prog sed +sed 1d < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-m32/umovestr3.c b/tests-m32/umovestr3.c new file mode 100644 index 000000000..cf2fa7d4f --- /dev/null +++ b/tests-m32/umovestr3.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + const unsigned int size = PATH_MAX - 1; + const char *p = tail_alloc(size); + const char *const efault = p + size; + + for (; p <= efault; ++p) { + int rc = chdir(p); + printf("chdir(%p) = %d %s (%m)\n", p, rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/umovestr3.test b/tests-m32/umovestr3.test new file mode 100755 index 000000000..d5be2832b --- /dev/null +++ b/tests-m32/umovestr3.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# yet another umovestr short read test + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 -e trace=chdir diff --git a/tests-m32/uname.c b/tests-m32/uname.c new file mode 100644 index 000000000..cd6f51cde --- /dev/null +++ b/tests-m32/uname.c @@ -0,0 +1,44 @@ +#include "tests.h" +#include + +#ifdef __NR_uname + +# include +# include +# include + +int main(int ac, char **av) +{ + int abbrev = ac > 1; + struct utsname *const uname = tail_alloc(sizeof(struct utsname)); + int rc = syscall(__NR_uname, uname); + printf("uname({sysname=\""); + print_quoted_string(uname->sysname); + printf("\", nodename=\""); + print_quoted_string(uname->nodename); + if (abbrev) { + printf("\", ..."); + } else { + printf("\", release=\""); + print_quoted_string(uname->release); + printf("\", version=\""); + print_quoted_string(uname->version); + printf("\", machine=\""); + print_quoted_string(uname->machine); +# ifdef HAVE_STRUCT_UTSNAME_DOMAINNAME + printf("\", domainname=\""); + print_quoted_string(uname->domainname); +# endif + printf("\""); + } + printf("}) = %d\n", rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_uname") + +#endif diff --git a/tests-m32/uname.test b/tests-m32/uname.test new file mode 100755 index 000000000..03fe30cd8 --- /dev/null +++ b/tests-m32/uname.test @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check uname syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog uniq + +run_prog > /dev/null +run_strace -v -euname $args > "$EXP" +uniq < "$LOG" > "$OUT" + +run_prog "./$NAME" abbrev > /dev/null +run_strace -euname $args >> "$EXP" +uniq < "$LOG" >> "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$OUT" "$EXP" diff --git a/tests-m32/unix-pair-send-recv.c b/tests-m32/unix-pair-send-recv.c new file mode 100644 index 000000000..d4ac0d237 --- /dev/null +++ b/tests-m32/unix-pair-send-recv.c @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include +#include + +#ifndef __NR_send +# define __NR_send -1 +#endif +#define SC_send 9 + +#ifndef __NR_recv +# define __NR_recv -1 +#endif +#define SC_recv 10 + +static int +sys_send(int sockfd, const void *buf, size_t len, int flags) +{ + int rc = socketcall(__NR_send, SC_send, + sockfd, (long) buf, len, flags, 0); + if (rc < 0 && ENOSYS == errno) + perror_msg_and_skip("send"); + return rc; +} + +static int +sys_recv(int sockfd, const void *buf, size_t len, int flags) +{ + int rc = socketcall(__NR_recv, SC_recv, + sockfd, (long) buf, len, flags, 0); + if (rc < 0 && ENOSYS == errno) + perror_msg_and_skip("recv"); + return rc; +} + +static void +transpose(char *str, const size_t len) +{ + size_t i; + + for (i = 0; i < len / 2; ++i) { + char c = str[i]; + str[i] = str[len - 1 - i]; + str[len - 1 - i] = c; + } +} + +int +main(int ac, char **av) +{ + assert(ac == 2); + const size_t len = strlen(av[1]); + assert(len); + char *const buf0 = tail_alloc(len); + char *const buf1 = tail_alloc(len); + memcpy(buf0, av[1], len); + + (void) close(0); + (void) close(1); + + int sv[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + + assert(sys_send(0, buf0, len, MSG_DONTROUTE) == (int) len); + assert(sys_recv(1, buf1, len, MSG_WAITALL) == (int) len); + + transpose(buf1, len); + assert(sys_send(1, buf1, len, MSG_DONTROUTE) == (int) len); + if (close(1)) + perror_msg_and_fail("close(1)"); + + assert(sys_recv(0, buf0, len, MSG_WAITALL) == (int) len); + if (close(0)) + perror_msg_and_fail("close(0)"); + assert(sys_recv(0, NULL, len, MSG_DONTWAIT) == -1); + + return 0; +} diff --git a/tests-m32/unix-pair-send-recv.expected b/tests-m32/unix-pair-send-recv.expected new file mode 100644 index 000000000..39359781e --- /dev/null +++ b/tests-m32/unix-pair-send-recv.expected @@ -0,0 +1,10 @@ +send(0, "abcdefghijklmnopqrstuvwxyz", 26, MSG_DONTROUTE) = 26 + | 00000 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 abcdefghijklmnop | + | 00010 71 72 73 74 75 76 77 78 79 7a qrstuvwxyz | +recv(1, "abcdefghijklmnopqrstuvwxyz", 26, MSG_WAITALL) = 26 +send(1, "zyxwvutsrqponmlkjihgfedcba", 26, MSG_DONTROUTE) = 26 +recv(0, "zyxwvutsrqponmlkjihgfedcba", 26, MSG_WAITALL) = 26 + | 00000 7a 79 78 77 76 75 74 73 72 71 70 6f 6e 6d 6c 6b zyxwvutsrqponmlk | + | 00010 6a 69 68 67 66 65 64 63 62 61 jihgfedcba | +recv(0, NULL, 26, MSG_DONTWAIT) = -1 EBADF (Bad file descriptor) ++++ exited with 0 +++ diff --git a/tests-m32/unix-pair-send-recv.test b/tests-m32/unix-pair-send-recv.test new file mode 100755 index 000000000..4defdebb7 --- /dev/null +++ b/tests-m32/unix-pair-send-recv.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check decoding and dumping of send and recv syscalls. + +. "${srcdir=.}/init.sh" + +run_prog ./unix-pair-send-recv abcdefghijklmnopqrstuvwxyz +run_strace -a32 -esignal=none -esend,recv -eread=0 -ewrite=0 $args +match_diff + +exit 0 diff --git a/tests-m32/unix-pair-sendto-recvfrom.c b/tests-m32/unix-pair-sendto-recvfrom.c new file mode 100644 index 000000000..cea382c9e --- /dev/null +++ b/tests-m32/unix-pair-sendto-recvfrom.c @@ -0,0 +1,87 @@ +/* + * Check decoding and dumping of sendto and recvfrom syscalls. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static void +transpose(char *str, int len) +{ + int i; + + for (i = 0; i < len / 2; ++i) { + char c = str[i]; + str[i] = str[len - 1 - i]; + str[len - 1 - i] = c; + } +} + +int +main(int ac, char **av) +{ + assert(ac == 2); + const int len = strlen(av[1]); + assert(len); + + (void) close(0); + (void) close(1); + + int sv[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + + pid_t pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (pid) { + assert(close(1) == 0); + transpose(av[1], len); + assert(sendto(0, av[1], len, MSG_DONTROUTE, NULL, 0) == len); + assert(recvfrom(0, av[1], len, MSG_WAITALL, NULL, NULL) == len); + assert(close(0) == 0); + + int status; + assert(waitpid(pid, &status, 0) == pid); + assert(status == 0); + } else { + assert(close(0) == 0); + assert(recvfrom(1, av[1], len, MSG_WAITALL, NULL, NULL) == len); + transpose(av[1], len); + assert(sendto(1, av[1], len, MSG_DONTROUTE, NULL, 0) == len); + assert(recvfrom(1, av[1], len, MSG_WAITALL, NULL, NULL) == 0); + assert(close(1) == 0); + } + + return 0; +} diff --git a/tests-m32/unix-pair-sendto-recvfrom.expected b/tests-m32/unix-pair-sendto-recvfrom.expected new file mode 100644 index 000000000..f8fd24494 --- /dev/null +++ b/tests-m32/unix-pair-sendto-recvfrom.expected @@ -0,0 +1,7 @@ +sendto(0, "zyxwvutsrqponmlkjihgfedcba", 26, MSG_DONTROUTE, NULL, 0) = 26 + | 00000 7a 79 78 77 76 75 74 73 72 71 70 6f 6e 6d 6c 6b zyxwvutsrqponmlk | + | 00010 6a 69 68 67 66 65 64 63 62 61 jihgfedcba | +recvfrom(0, "abcdefghijklmnopqrstuvwxyz", 26, MSG_WAITALL, NULL, NULL) = 26 + | 00000 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 abcdefghijklmnop | + | 00010 71 72 73 74 75 76 77 78 79 7a qrstuvwxyz | ++++ exited with 0 +++ diff --git a/tests-m32/unix-pair-sendto-recvfrom.test b/tests-m32/unix-pair-sendto-recvfrom.test new file mode 100755 index 000000000..21afe236d --- /dev/null +++ b/tests-m32/unix-pair-sendto-recvfrom.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check decoding and dumping of sendto and recvfrom syscalls. + +. "${srcdir=.}/init.sh" + +run_prog ./unix-pair-sendto-recvfrom abcdefghijklmnopqrstuvwxyz +run_strace -esignal=none -esendto,recvfrom -eread=0 -ewrite=0 $args +match_diff + +exit 0 diff --git a/tests-m32/unlink.c b/tests-m32/unlink.c new file mode 100644 index 000000000..bbb1de155 --- /dev/null +++ b/tests-m32/unlink.c @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_unlink + +# include +# include + +int +main(void) +{ + static const char sample[] = "unlink_sample"; + + long rc = syscall(__NR_unlink, sample); + printf("unlink(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unlink") + +#endif diff --git a/tests-m32/unlink.test b/tests-m32/unlink.test new file mode 100755 index 000000000..09bf79a7c --- /dev/null +++ b/tests-m32/unlink.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check unlink syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff --git a/tests-m32/unlinkat.c b/tests-m32/unlinkat.c new file mode 100644 index 000000000..22c3de399 --- /dev/null +++ b/tests-m32/unlinkat.c @@ -0,0 +1,34 @@ +#include "tests.h" +#include + +#ifdef __NR_unlinkat + +# include +# include + +int +main(void) +{ + static const char sample[] = "unlinkat_sample"; + const long fd = (long) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_unlinkat, fd, sample, 0); + printf("unlinkat(%d, \"%s\", 0) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + rc = syscall(__NR_unlinkat, -100, sample, -1L); + printf("unlinkat(%s, \"%s\", %s) = %ld %s (%m)\n", + "AT_FDCWD", sample, + "AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW" + "|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|0xffffe0ff", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unlinkat") + +#endif diff --git a/tests-m32/unlinkat.test b/tests-m32/unlinkat.test new file mode 100755 index 000000000..864261f71 --- /dev/null +++ b/tests-m32/unlinkat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check unlinkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff --git a/tests-m32/unshare.c b/tests-m32/unshare.c new file mode 100644 index 000000000..5aedde476 --- /dev/null +++ b/tests-m32/unshare.c @@ -0,0 +1,80 @@ +/* + * Check decoding of unshare syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_unshare + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_flags = + (kernel_ulong_t) 0xbadc0ded0000000fULL; + + static struct { + kernel_ulong_t val; + const char *str; + } unshare_flags[] = { + { ARG_STR(0) }, + { 0xdeadca75, + "CLONE_THREAD|CLONE_FS|CLONE_SIGHAND|CLONE_SYSVSEM|" + "CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWNET|CLONE_NEWUSER|" + "CLONE_NEWCGROUP|0x80a8c075" }, + { 0x2000000, "CLONE_NEWCGROUP" }, + { ARG_STR(0x81f8f0ff) " /* CLONE_??? */" }, + }; + + long rc; + unsigned int i; + + rc = syscall(__NR_unshare, bogus_flags); + printf("unshare(%#llx /* CLONE_??? */) = %s\n", + (unsigned long long) bogus_flags, sprintrc(rc)); + + for (i = 0; i < ARRAY_SIZE(unshare_flags); i++) { + rc = syscall(__NR_unshare, unshare_flags[i].val); + printf("unshare(%s) = %s\n", + unshare_flags[i].str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unshare"); + +#endif diff --git a/tests-m32/unshare.test b/tests-m32/unshare.test new file mode 100755 index 000000000..ccb9575ef --- /dev/null +++ b/tests-m32/unshare.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of setns syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff --git a/tests-m32/userfaultfd.c b/tests-m32/userfaultfd.c new file mode 100644 index 000000000..60432fa38 --- /dev/null +++ b/tests-m32/userfaultfd.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include "scno.h" + +#if defined __NR_userfaultfd && defined O_CLOEXEC + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_userfaultfd, 1 | O_NONBLOCK | O_CLOEXEC); + printf("userfaultfd(O_NONBLOCK|O_CLOEXEC|0x1) = %ld %s (%m)\n", + rc, errno2name()); + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_userfaultfd && O_CLOEXEC") + +#endif diff --git a/tests-m32/userfaultfd.test b/tests-m32/userfaultfd.test new file mode 100755 index 000000000..af8b6fbe8 --- /dev/null +++ b/tests-m32/userfaultfd.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check userfaultfd syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a38 diff --git a/tests-m32/ustat.c b/tests-m32/ustat.c new file mode 100644 index 000000000..57bb29c27 --- /dev/null +++ b/tests-m32/ustat.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2017 JingPiao Chen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_ustat + +# include +# include +# include +# include +# ifdef HAVE_USTAT_H +# include +# endif + +int +main(void) +{ + const kernel_ulong_t magic = (kernel_ulong_t) 0xfacefeedffffffff; + unsigned long long buf[4]; + unsigned int dev; + long rc; + +# ifdef HAVE_USTAT_H + struct ustat *const ust = tail_alloc(sizeof(*ust)); + struct stat st; + if (stat(".", &st)) + perror_msg_and_fail("stat"); + + dev = (unsigned int) st.st_dev; + rc = syscall(__NR_ustat, dev, ust); + if (rc) + printf("ustat(makedev(%u, %u), %p) = %s\n", + major(dev), minor(dev), ust, sprintrc(rc)); + else + printf("ustat(makedev(%u, %u)" + ", {f_tfree=%llu, f_tinode=%llu}) = 0\n", + major(dev), minor(dev), + zero_extend_signed_to_ull(ust->f_tfree), + zero_extend_signed_to_ull(ust->f_tinode)); +# endif /* HAVE_USTAT_H */ + + dev = (unsigned int) magic; + rc = syscall(__NR_ustat, magic, 0); + printf("ustat(makedev(%u, %u), NULL) = %s\n", + major(dev), minor(dev), sprintrc(rc)); + + rc = syscall(__NR_ustat, magic, buf); + printf("ustat(makedev(%u, %u), %p) = %s\n", + major(dev), minor(dev), buf, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ustat") + +#endif diff --git a/tests-m32/ustat.test b/tests-m32/ustat.test new file mode 100755 index 000000000..60a88e0af --- /dev/null +++ b/tests-m32/ustat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check ustat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 diff --git a/tests-m32/utime.c b/tests-m32/utime.c new file mode 100644 index 000000000..8fd594f07 --- /dev/null +++ b/tests-m32/utime.c @@ -0,0 +1,97 @@ +/* + * Check decoding of utime syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_utime + +# include +# include +# include +# include +# include + + +static void +print_tm(const struct tm * const p) +{ + char buf[256]; + + strftime(buf, sizeof(buf), "%FT%T%z", p); + + printf("%s", buf); +} + +static long +k_utime(const void *const filename, const void *const times) +{ + return syscall(__NR_utime, filename, times); +} + +int +main(void) +{ + static const char *const dummy_str = "dummy filename"; + + const time_t t = time(NULL); + const struct tm * const p = localtime(&t); + const struct utimbuf u = { .actime = t, .modtime = t }; + const struct utimbuf *const tail_u = tail_memdup(&u, sizeof(u)); + const char *const dummy_filename = + tail_memdup(dummy_str, sizeof(dummy_str) - 1); + + long rc = k_utime("", NULL); + printf("utime(\"\", NULL) = %s\n", sprintrc(rc)); + + rc = k_utime(dummy_filename + sizeof(dummy_str), tail_u + 1); + printf("utime(%p, %p) = %s\n", dummy_filename + sizeof(dummy_str), + tail_u + 1, sprintrc(rc)); + + rc = k_utime(dummy_filename, (struct tm *) tail_u + 1); + printf("utime(%p, %p) = %s\n", + dummy_filename, (struct tm *) tail_u + 1, sprintrc(rc)); + + rc = k_utime("utime\nfilename", tail_u); + const char *errstr = sprintrc(rc); + printf("utime(\"utime\\nfilename\", {actime="); + print_tm(p); + printf(", modtime="); + print_tm(p); + printf("}) = %s\n", errstr); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_utime") + +#endif diff --git a/tests-m32/utime.test b/tests-m32/utime.test new file mode 100755 index 000000000..bd64c5329 --- /dev/null +++ b/tests-m32/utime.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of utime syscall. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a 16 -e trace=utime diff --git a/tests-m32/utimensat.c b/tests-m32/utimensat.c new file mode 100644 index 000000000..6d9faac29 --- /dev/null +++ b/tests-m32/utimensat.c @@ -0,0 +1,101 @@ +/* + * This file is part of utimensat strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +#if defined HAVE_UTIMENSAT \ + && defined AT_FDCWD && defined AT_SYMLINK_NOFOLLOW \ + && defined UTIME_NOW && defined UTIME_OMIT + +static void +print_ts(const struct timespec *ts) +{ + printf("{tv_sec=%ju, tv_nsec=%ju}", (uintmax_t) ts->tv_sec, + (uintmax_t) ts->tv_nsec); +} + +int +main(void) +{ + static const char fname[] = "utimensat\nfilename"; + + assert(utimensat(AT_FDCWD, fname, NULL, 0) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + + #define PREFIX "utimensat(AT_FDCWD, \"utimensat\\nfilename\", " + printf(PREFIX "NULL, 0) = -1 ENOENT (%m)\n"); + + struct timeval tv; + struct timespec ts[2]; + + if (gettimeofday(&tv, NULL)) + perror_msg_and_skip("gettimeofday"); + + ts[0].tv_sec = tv.tv_sec; + ts[0].tv_nsec = tv.tv_usec; + ts[1].tv_sec = tv.tv_sec - 1; + ts[1].tv_nsec = tv.tv_usec + 1; + + printf(PREFIX "["); + print_ts(&ts[0]); + printf(", "); + print_ts(&ts[1]); + printf("], AT_SYMLINK_NOFOLLOW) = -1 ENOENT "); + + assert(utimensat(AT_FDCWD, fname, ts, AT_SYMLINK_NOFOLLOW) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + printf("(%m)\n"); + + ts[0].tv_nsec = UTIME_NOW; + ts[1].tv_nsec = UTIME_OMIT; + assert(utimensat(AT_FDCWD, fname, ts, AT_SYMLINK_NOFOLLOW) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + printf(PREFIX "[UTIME_NOW, UTIME_OMIT], AT_SYMLINK_NOFOLLOW)" + " = -1 ENOENT (%m)\n"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_UTIMENSAT && AT_FDCWD && AT_SYMLINK_NOFOLLOW" + " && UTIME_NOW && UTIME_OMIT") + +#endif diff --git a/tests-m32/utimensat.test b/tests-m32/utimensat.test new file mode 100755 index 000000000..52e3f3165 --- /dev/null +++ b/tests-m32/utimensat.test @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check decoding of utimensat syscall. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -e utimensat $args > "$OUT" + +check_prog grep +LC_ALL=C grep -x "utimensat(.*" "$LOG" > /dev/null || { + rm -f "$OUT" + skip_ 'test executable does not use utimensat syscall' +} + +match_diff "$LOG" "$OUT" + +rm -f "$OUT" + +exit 0 diff --git a/tests-m32/utimes.c b/tests-m32/utimes.c new file mode 100644 index 000000000..bbfa03105 --- /dev/null +++ b/tests-m32/utimes.c @@ -0,0 +1,84 @@ +/* + * Check decoding of utimes syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_utimes + +# include +# include +# include +# include + +int +main(void) +{ + struct timeval tv; + if (gettimeofday(&tv, NULL)) + perror_msg_and_fail("gettimeofday"); + + static const char sample[] = "utimes_sample"; + + long rc = syscall(__NR_utimes, sample, 0); + printf("utimes(\"%s\", NULL) = %ld %s (%m)\n", + sample, rc, errno2name()); + + struct timeval *const ts = tail_alloc(sizeof(*ts) * 2); + + ts[0].tv_sec = tv.tv_sec; + ts[0].tv_usec = tv.tv_usec; + ts[1].tv_sec = tv.tv_sec - 1; + ts[1].tv_usec = tv.tv_usec + 1; + + rc = syscall(__NR_utimes, 0, ts + 2); + printf("utimes(NULL, %p) = %ld %s (%m)\n", ts + 2, rc, errno2name()); + + rc = syscall(__NR_utimes, 0, ts + 1); + printf("utimes(NULL, [{tv_sec=%jd, tv_usec=%jd}, %p]) = " + "%ld %s (%m)\n", + (intmax_t) ts[1].tv_sec, (intmax_t) ts[1].tv_usec, + ts + 2, rc, errno2name()); + + rc = syscall(__NR_utimes, "", ts); + printf("utimes(\"\", [{tv_sec=%jd, tv_usec=%jd}, " + "{tv_sec=%jd, tv_usec=%jd}]) = %ld %s (%m)\n", + (intmax_t) ts[0].tv_sec, (intmax_t) ts[0].tv_usec, + (intmax_t) ts[1].tv_sec, (intmax_t) ts[1].tv_usec, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_utimes") + +#endif diff --git a/tests-m32/utimes.test b/tests-m32/utimes.test new file mode 100755 index 000000000..99143a0b0 --- /dev/null +++ b/tests-m32/utimes.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check utimes syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff --git a/tests-m32/vfork-f.c b/tests-m32/vfork-f.c new file mode 100644 index 000000000..b14e4b499 --- /dev/null +++ b/tests-m32/vfork-f.c @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static inline int +logit_(const char *const str) +{ + return !chdir(str); +} + +#define prefix "vfork-f." +#define logit(arg) logit_(prefix arg) + +int main(int ac, char **av) +{ + if (ac < 1) + return 1; + if (ac > 1) { + if (read(0, &ac, sizeof(int))) + return 2; + return logit("exec"); + } + + logit("start"); + + int child_wait_fds[2]; + (void) close(0); + if (pipe(child_wait_fds)) + perror_msg_and_fail("pipe"); + if (fcntl(child_wait_fds[1], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + + int parent_wait_fds[2]; + if (pipe(parent_wait_fds)) + perror_msg_and_fail("pipe"); + if (fcntl(parent_wait_fds[0], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + if (fcntl(parent_wait_fds[1], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + + char *const args[] = { av[0], (char *) "", NULL }; + pid_t pid = vfork(); + + if (pid < 0) + perror_msg_and_fail("vfork"); + + if (!pid) { + if (logit("child") || execve(args[0], args, args + 1)) + _exit(2); + } + + close(0); + close(parent_wait_fds[1]); + + if (read(parent_wait_fds[0], &parent_wait_fds[1], sizeof(int))) + perror_msg_and_fail("read"); + logit("parent"); + close(child_wait_fds[1]); + + int status; + assert(wait(&status) == pid); + assert(status == 0); + + pid_t ppid = getpid(); + logit("finish"); + + printf("%-5d chdir(\"%sstart\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%schild\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sparent\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sexec\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sfinish\") = -1 ENOENT (%m)\n", + ppid, prefix, + pid, prefix, + ppid, prefix, + pid, prefix, + ppid, prefix); + return 0; +} diff --git a/tests-m32/vfork-f.test b/tests-m32/vfork-f.test new file mode 100755 index 000000000..ff4422b2b --- /dev/null +++ b/tests-m32/vfork-f.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check how strace -f follows vfork syscall. + +. "${srcdir=.}/fork-f.test" diff --git a/tests-m32/vhangup.c b/tests-m32/vhangup.c new file mode 100644 index 000000000..e7ddabba2 --- /dev/null +++ b/tests-m32/vhangup.c @@ -0,0 +1,34 @@ +#include "tests.h" +#include + +#ifdef __NR_vhangup + +# include +# include + +int +main(void) +{ + if (setsid() == -1) + perror_msg_and_skip("setsid"); + + long rc = syscall(__NR_vhangup); + + /* + * On setsid() success, the new session has no controlling terminal, + * therefore a subsequent vhangup() has nothing to hangup. + * + * The system call, however, returns 0 iff the calling process + * has CAP_SYS_TTY_CONFIG capability. + */ + printf("vhangup() = %s\n", sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_vhangup") + +#endif diff --git a/tests-m32/vhangup.test b/tests-m32/vhangup.test new file mode 100755 index 000000000..8fe1cacb9 --- /dev/null +++ b/tests-m32/vhangup.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check vhangup syscall decoding. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a10 diff --git a/tests-m32/vmsplice.c b/tests-m32/vmsplice.c new file mode 100644 index 000000000..f29962e3d --- /dev/null +++ b/tests-m32/vmsplice.c @@ -0,0 +1,107 @@ +/* + * This file is part of vmsplice strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_vmsplice + +# include +# include +# include +# include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + const struct iovec iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *iov = tail_memdup(iov_, sizeof(iov_)); + const unsigned int len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + tprintf("vmsplice(1, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}], %u, %s) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(iov_), + "SPLICE_F_NONBLOCK", len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const long rc = syscall(__NR_vmsplice, 1, iov, ARRAY_SIZE(iov_), 2); + if (rc < 0) + perror_msg_and_skip("vmsplice"); + assert(rc == (int) len); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_vmsplice") + +#endif diff --git a/tests-m32/vmsplice.test b/tests-m32/vmsplice.test new file mode 100755 index 000000000..8a80650e0 --- /dev/null +++ b/tests-m32/vmsplice.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of vmsplice syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -ewrite=1 diff --git a/tests-m32/wait4-v.c b/tests-m32/wait4-v.c new file mode 100644 index 000000000..8c0c9f596 --- /dev/null +++ b/tests-m32/wait4-v.c @@ -0,0 +1,3 @@ +/* This file is part of wait4-v strace test. */ +#define VERBOSE 1 +#include "wait4.c" diff --git a/tests-m32/wait4-v.test b/tests-m32/wait4-v.test new file mode 100755 index 000000000..58e55f25d --- /dev/null +++ b/tests-m32/wait4-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of wait4 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e signal=none -e trace=wait4 diff --git a/tests-m32/wait4.c b/tests-m32/wait4.c new file mode 100644 index 000000000..ccb3ebb9a --- /dev/null +++ b/tests-m32/wait4.c @@ -0,0 +1,199 @@ +/* + * Check decoding of wait4 syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static const char * +sprint_rusage(const struct rusage *const ru) +{ + static char buf[1024]; + snprintf(buf, sizeof(buf), + "{ru_utime={tv_sec=%lu, tv_usec=%lu}" + ", ru_stime={tv_sec=%lu, tv_usec=%lu}" +#if VERBOSE + ", ru_maxrss=%lu" + ", ru_ixrss=%lu" + ", ru_idrss=%lu" + ", ru_isrss=%lu" + ", ru_minflt=%lu" + ", ru_majflt=%lu" + ", ru_nswap=%lu" + ", ru_inblock=%lu" + ", ru_oublock=%lu" + ", ru_msgsnd=%lu" + ", ru_msgrcv=%lu" + ", ru_nsignals=%lu" + ", ru_nvcsw=%lu" + ", ru_nivcsw=%lu}" +#else + ", ...}" +#endif + , (long) ru->ru_utime.tv_sec + , (long) ru->ru_utime.tv_usec + , (long) ru->ru_stime.tv_sec + , (long) ru->ru_stime.tv_usec +#if VERBOSE + , (long) ru->ru_maxrss + , (long) ru->ru_ixrss + , (long) ru->ru_idrss + , (long) ru->ru_isrss + , (long) ru->ru_minflt + , (long) ru->ru_majflt + , (long) ru->ru_nswap + , (long) ru->ru_inblock + , (long) ru->ru_oublock + , (long) ru->ru_msgsnd + , (long) ru->ru_msgrcv + , (long) ru->ru_nsignals + , (long) ru->ru_nvcsw + , (long) ru->ru_nivcsw +#endif + ); + return buf; +} + +static pid_t +do_wait4(pid_t pid, int *wstatus, int options, struct rusage *ru) +{ + sigset_t mask = {}; + sigaddset(&mask, SIGCHLD); + + assert(sigprocmask(SIG_BLOCK, &mask, NULL) == 0); + pid_t rc = wait4(pid, wstatus, options, ru); + assert(sigprocmask(SIG_UNBLOCK, &mask, NULL) == 0); + return rc; +} + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + pid_t pid; + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + char c; + (void) close(1); + assert(read(0, &c, sizeof(c)) == 1); + return 42; + } + + (void) close(0); + + int *const s = tail_alloc(sizeof(*s)); + if (wait4(pid, s, WNOHANG|__WALL, NULL)) + perror_msg_and_fail("wait4 #1"); + tprintf("wait4(%d, %p, WNOHANG|__WALL, NULL) = 0\n", pid, s); + + struct rusage *const rusage = tail_alloc(sizeof(*rusage)); + if (wait4(pid, s, WNOHANG|__WALL, rusage)) + perror_msg_and_fail("wait4 #2"); + tprintf("wait4(%d, %p, WNOHANG|__WALL, %p) = 0\n", pid, s, rusage); + + assert(write(1, "", 1) == 1); + (void) close(1); + + assert(do_wait4(pid, s, 0, rusage) == pid); + assert(WIFEXITED(*s) && WEXITSTATUS(*s) == 42); + tprintf("wait4(%d, [{WIFEXITED(s) && WEXITSTATUS(s) == 42}], 0, %s)" + " = %d\n", pid, sprint_rusage(rusage), pid); + + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + (void) raise(SIGUSR1); + return 1; + } + + assert(do_wait4(pid, s, __WALL, rusage) == pid); + assert(WIFSIGNALED(*s) && WTERMSIG(*s) == SIGUSR1); + tprintf("wait4(%d, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGUSR1}]" + ", __WALL, %s) = %d\n", pid, sprint_rusage(rusage), pid); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + (void) close(1); + raise(SIGSTOP); + char c; + assert(read(0, &c, sizeof(c)) == 1); + return 0; + } + + (void) close(0); + + assert(do_wait4(pid, s, WSTOPPED, rusage) == pid); + assert(WIFSTOPPED(*s) && WSTOPSIG(*s) == SIGSTOP); + tprintf("wait4(%d, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGSTOP}]" + ", WSTOPPED, %s) = %d\n", pid, sprint_rusage(rusage), pid); + + if (kill(pid, SIGCONT)) + perror_msg_and_fail("kill(SIGCONT)"); + +#if defined WCONTINUED && defined WIFCONTINUED + assert(do_wait4(pid, s, WCONTINUED, rusage) == pid); + assert(WIFCONTINUED(*s)); + tprintf("wait4(%d, [{WIFCONTINUED(s)}], WCONTINUED" + ", %s) = %d\n", pid, sprint_rusage(rusage), pid); +#endif /* WCONTINUED && WIFCONTINUED */ + + assert(write(1, "", 1) == 1); + (void) close(1); + + assert(do_wait4(pid, s, 0, rusage) == pid); + assert(WIFEXITED(*s) && WEXITSTATUS(*s) == 0); + tprintf("wait4(%d, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0" + ", %s) = %d\n", pid, sprint_rusage(rusage), pid); + + assert(wait4(-1, s, WNOHANG|WSTOPPED|__WALL, rusage) == -1); + tprintf("wait4(-1, %p, WNOHANG|WSTOPPED|__WALL, %p) = -1 %s (%m)\n", + s, rusage, errno2name()); + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/wait4.test b/tests-m32/wait4.test new file mode 100755 index 000000000..6338d1f67 --- /dev/null +++ b/tests-m32/wait4.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of wait4 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff --git a/tests-m32/waitid-v.c b/tests-m32/waitid-v.c new file mode 100644 index 000000000..15a8010ce --- /dev/null +++ b/tests-m32/waitid-v.c @@ -0,0 +1,3 @@ +/* This file is part of waitid-v strace test. */ +#define VERBOSE 1 +#include "waitid.c" diff --git a/tests-m32/waitid-v.test b/tests-m32/waitid-v.test new file mode 100755 index 000000000..eb498cb0c --- /dev/null +++ b/tests-m32/waitid-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of waitid syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e signal=none -e trace=waitid diff --git a/tests-m32/waitid.c b/tests-m32/waitid.c new file mode 100644 index 000000000..6a102990a --- /dev/null +++ b/tests-m32/waitid.c @@ -0,0 +1,263 @@ +/* + * Check decoding of waitid syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * +sprint_rusage(const struct rusage *const ru) +{ + static char buf[1024]; + snprintf(buf, sizeof(buf), + "{ru_utime={tv_sec=%lld, tv_usec=%lld}" + ", ru_stime={tv_sec=%lld, tv_usec=%lld}" +#if VERBOSE + ", ru_maxrss=%llu" + ", ru_ixrss=%llu" + ", ru_idrss=%llu" + ", ru_isrss=%llu" + ", ru_minflt=%llu" + ", ru_majflt=%llu" + ", ru_nswap=%llu" + ", ru_inblock=%llu" + ", ru_oublock=%llu" + ", ru_msgsnd=%llu" + ", ru_msgrcv=%llu" + ", ru_nsignals=%llu" + ", ru_nvcsw=%llu" + ", ru_nivcsw=%llu}" +#else + ", ...}" +#endif + , (long long) ru->ru_utime.tv_sec + , (long long) ru->ru_utime.tv_usec + , (long long) ru->ru_stime.tv_sec + , (long long) ru->ru_stime.tv_usec +#if VERBOSE + , zero_extend_signed_to_ull(ru->ru_maxrss) + , zero_extend_signed_to_ull(ru->ru_ixrss) + , zero_extend_signed_to_ull(ru->ru_idrss) + , zero_extend_signed_to_ull(ru->ru_isrss) + , zero_extend_signed_to_ull(ru->ru_minflt) + , zero_extend_signed_to_ull(ru->ru_majflt) + , zero_extend_signed_to_ull(ru->ru_nswap) + , zero_extend_signed_to_ull(ru->ru_inblock) + , zero_extend_signed_to_ull(ru->ru_oublock) + , zero_extend_signed_to_ull(ru->ru_msgsnd) + , zero_extend_signed_to_ull(ru->ru_msgrcv) + , zero_extend_signed_to_ull(ru->ru_nsignals) + , zero_extend_signed_to_ull(ru->ru_nvcsw) + , zero_extend_signed_to_ull(ru->ru_nivcsw) +#endif + ); + return buf; +} + +#define CASE(x) case x: return #x + +static const char * +si_code_2_name(const int code) +{ + switch (code) { +#ifdef CLD_EXITED + CASE(CLD_EXITED); +#endif +#ifdef CLD_KILLED + CASE(CLD_KILLED); +#endif +#ifdef CLD_DUMPED + CASE(CLD_DUMPED); +#endif +#ifdef CLD_TRAPPED + CASE(CLD_TRAPPED); +#endif +#ifdef CLD_STOPPED + CASE(CLD_STOPPED); +#endif +#ifdef CLD_CONTINUED + CASE(CLD_CONTINUED); +#endif + default: perror_msg_and_fail("unknown si_code %d", code); + } +} + +static const char * +sprint_siginfo(const siginfo_t *const si, const char *const status_text) +{ + static char buf[1024]; + snprintf(buf, sizeof(buf), + "{si_signo=SIGCHLD" + ", si_code=%s" + ", si_pid=%u" + ", si_uid=%u" + ", si_status=%s" + ", si_utime=%llu" + ", si_stime=%llu}", + si_code_2_name(si->si_code), + si->si_pid, + si->si_uid, + status_text, + zero_extend_signed_to_ull(si->si_utime), + zero_extend_signed_to_ull(si->si_stime)); + return buf; +} + +static unsigned long +poison(unsigned int v) +{ + return (unsigned long) 0xfacefeed00000000ULL | v; +} + +static long +do_waitid(const unsigned int idtype, + const unsigned int id, + const siginfo_t *const infop, + const unsigned int options, + const struct rusage *const rusage) +{ + sigset_t mask = {}; + sigaddset(&mask, SIGCHLD); + + assert(sigprocmask(SIG_BLOCK, &mask, NULL) == 0); + long rc = syscall(__NR_waitid, poison(idtype), poison(id), + infop, poison(options), rusage); + assert(sigprocmask(SIG_UNBLOCK, &mask, NULL) == 0); + return rc; +} + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + pid_t pid; + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + char c; + (void) close(1); + assert(read(0, &c, sizeof(c)) == 1); + return 42; + } + + (void) close(0); + + if (do_waitid(P_PID, pid, 0, WNOHANG|WEXITED, 0)) + perror_msg_and_fail("waitid #1"); + tprintf("waitid(P_PID, %d, NULL, WNOHANG|WEXITED, NULL) = 0\n", pid); + + siginfo_t *const sinfo = tail_alloc(sizeof(*sinfo)); + memset(sinfo, 0, sizeof(*sinfo)); + struct rusage *const rusage = tail_alloc(sizeof(*rusage)); + if (do_waitid(P_PID, pid, sinfo, WNOHANG|WEXITED|WSTOPPED, rusage)) + perror_msg_and_fail("waitid #2"); + tprintf("waitid(P_PID, %d, {}, WNOHANG|WEXITED|WSTOPPED, %s) = 0\n", + pid, sprint_rusage(rusage)); + + assert(write(1, "", 1) == 1); + (void) close(1); + + if (do_waitid(P_PID, pid, sinfo, WEXITED, rusage)) + perror_msg_and_fail("waitid #3"); + tprintf("waitid(P_PID, %d, %s, WEXITED, %s) = 0\n", + pid, sprint_siginfo(sinfo, "42"), sprint_rusage(rusage)); + + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + (void) raise(SIGUSR1); + return 1; + } + + if (do_waitid(P_PID, pid, sinfo, WEXITED, rusage)) + perror_msg_and_fail("waitid #4"); + tprintf("waitid(P_PID, %d, %s, WEXITED, %s) = 0\n", + pid, sprint_siginfo(sinfo, "SIGUSR1"), sprint_rusage(rusage)); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + (void) close(1); + raise(SIGSTOP); + char c; + assert(read(0, &c, sizeof(c)) == 1); + return 0; + } + + (void) close(0); + + if (do_waitid(P_PID, pid, sinfo, WSTOPPED, rusage)) + perror_msg_and_fail("waitid #5"); + tprintf("waitid(P_PID, %d, %s, WSTOPPED, %s) = 0\n", + pid, sprint_siginfo(sinfo, "SIGSTOP"), sprint_rusage(rusage)); + + if (kill(pid, SIGCONT)) + perror_msg_and_fail("kill(SIGCONT)"); + +#if defined WCONTINUED + if (do_waitid(P_PID, pid, sinfo, WCONTINUED, rusage)) + perror_msg_and_fail("waitid #6"); + tprintf("waitid(P_PID, %d, %s, WCONTINUED, %s) = 0\n", + pid, sprint_siginfo(sinfo, "SIGCONT"), sprint_rusage(rusage)); +#endif /* WCONTINUED */ + + assert(write(1, "", 1) == 1); + (void) close(1); + + if (do_waitid(P_PID, pid, sinfo, WEXITED, rusage)) + perror_msg_and_fail("waitid #7"); + tprintf("waitid(P_PID, %d, %s, WEXITED, %s) = 0\n", + pid, sprint_siginfo(sinfo, "0"), sprint_rusage(rusage)); + + long rc = do_waitid(P_ALL, -1, sinfo, WEXITED|WSTOPPED, rusage); + tprintf("waitid(P_ALL, -1, %p, WEXITED|WSTOPPED, %p)" + " = %ld %s (%m)\n", sinfo, rusage, rc, errno2name()); + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/waitid.test b/tests-m32/waitid.test new file mode 100755 index 000000000..3bcba3abb --- /dev/null +++ b/tests-m32/waitid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of waitid syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff --git a/tests-m32/waitpid.c b/tests-m32/waitpid.c new file mode 100644 index 000000000..2e22e2453 --- /dev/null +++ b/tests-m32/waitpid.c @@ -0,0 +1,56 @@ +/* + * Check decoding of waitpid syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_waitpid + +# include +# include +# include + +int +main(void) +{ + unsigned long pid = + (unsigned long) 0xdefaced00000000ULL | (unsigned) getpid(); + long rc = syscall(__NR_waitpid, pid, 0L, (unsigned long) WNOHANG); + printf("waitpid(%d, NULL, WNOHANG) = %ld %s (%m)\n", + (int) pid, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_waitpid") + +#endif diff --git a/tests-m32/waitpid.test b/tests-m32/waitpid.test new file mode 100755 index 000000000..93807d1fb --- /dev/null +++ b/tests-m32/waitpid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of waitpid syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-m32/xattr-strings.c b/tests-m32/xattr-strings.c new file mode 100644 index 000000000..310929a95 --- /dev/null +++ b/tests-m32/xattr-strings.c @@ -0,0 +1,30 @@ +#include "tests.h" + +#ifdef HAVE_SYS_XATTR_H + +# include +# include + +int +main(void) +{ + static const char name[] = "strace.test"; + static const char c_value[] = "foobar"; + + const char *const z_value = tail_memdup(c_value, sizeof(c_value)); + long rc; + + rc = fsetxattr(-1, name, z_value, sizeof(c_value), XATTR_REPLACE); + printf("fsetxattr(-1, \"%.*s\"..., \"%.*s\"..., %u, XATTR_REPLACE) = %s\n", + 4, name, 4, c_value, (unsigned) sizeof(c_value), sprintrc(rc)); + + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYS_XATTR_H") + +#endif diff --git a/tests-m32/xattr-strings.test b/tests-m32/xattr-strings.test new file mode 100755 index 000000000..25ef360b0 --- /dev/null +++ b/tests-m32/xattr-strings.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check *xattr syscalls decoding when limiting string size. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a22 -s 4 -e trace=fsetxattr diff --git a/tests-m32/xattr.c b/tests-m32/xattr.c new file mode 100644 index 000000000..a772eced6 --- /dev/null +++ b/tests-m32/xattr.c @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_SYS_XATTR_H + +# include +# include + +# ifndef XATTR_SIZE_MAX +# define XATTR_SIZE_MAX 65536 +# endif + +#define DEFAULT_STRLEN 32 + +int +main(void) +{ + static const char name[] = "strace.test"; + static const char c_value[] = "foo\0bar"; + static const char q_value[] = "foo\\0bar"; + + const char *const z_value = tail_memdup(c_value, sizeof(c_value)); + char *const efault = tail_alloc(1) + 1; + const char *const value = tail_memdup(c_value, sizeof(c_value) - 1); + char *const big = tail_alloc(XATTR_SIZE_MAX + 1); + long rc; + const char *errstr; + + rc = fsetxattr(-1, 0, 0, 0, XATTR_CREATE); + printf("fsetxattr(-1, NULL, NULL, 0, XATTR_CREATE) = %s\n", + sprintrc(rc)); + + rc = fsetxattr(-1, 0, z_value, 0, XATTR_CREATE); + printf("fsetxattr(-1, NULL, \"\", 0, XATTR_CREATE) = %s\n", + sprintrc(rc)); + + rc = fsetxattr(-1, name, big, XATTR_SIZE_MAX + 1, XATTR_CREATE); + printf("fsetxattr(-1, \"%s\", %p, %u, XATTR_CREATE) = %s\n", + name, big, XATTR_SIZE_MAX + 1, sprintrc(rc)); + + rc = fsetxattr(-1, name, value, sizeof(c_value), XATTR_CREATE); + printf("fsetxattr(-1, \"%s\", %p, %u, XATTR_CREATE) = %s\n", + name, value, (unsigned) sizeof(c_value), sprintrc(rc)); + + rc = fsetxattr(-1, name, z_value, sizeof(c_value), XATTR_REPLACE); + printf("fsetxattr(-1, \"%s\", \"%s\", %u, XATTR_REPLACE) = %s\n", + name, q_value, (unsigned) sizeof(c_value), sprintrc(rc)); + + rc = fsetxattr(-1, name, value, sizeof(c_value) - 1, XATTR_CREATE|XATTR_REPLACE); + printf("fsetxattr(-1, \"%s\", \"%s\", %u, XATTR_CREATE|XATTR_REPLACE)" + " = %s\n", + name, q_value, (unsigned) sizeof(c_value) - 1, sprintrc(rc)); + + rc = setxattr(".", name, z_value, sizeof(c_value), XATTR_CREATE); + printf("setxattr(\".\", \"%s\", \"%s\", %u, XATTR_CREATE) = %s\n", + name, q_value, (unsigned) sizeof(c_value), sprintrc(rc)); + + rc = lsetxattr(".", name, value, sizeof(c_value) - 1, XATTR_CREATE); + printf("lsetxattr(\".\", \"%s\", \"%s\", %u, XATTR_CREATE) = %s\n", + name, q_value, (unsigned) sizeof(c_value) - 1, sprintrc(rc)); + + rc = fgetxattr(-1, name, efault, 4); + printf("fgetxattr(-1, \"%s\", %p, 4) = %s\n", + name, efault, sprintrc(rc)); + + rc = getxattr(".", name, big, XATTR_SIZE_MAX + 1); + printf("getxattr(\".\", \"%s\", %p, %u) = %s\n", + name, big, XATTR_SIZE_MAX + 1, sprintrc(rc)); + + rc = lgetxattr(".", name, big + 1, XATTR_SIZE_MAX); + printf("lgetxattr(\".\", \"%s\", %p, %u) = %s\n", + name, big + 1, XATTR_SIZE_MAX, sprintrc(rc)); + + rc = flistxattr(-1, efault, 4); + printf("flistxattr(-1, %p, 4) = %s\n", efault, sprintrc(rc)); + + rc = llistxattr("", efault + 1, 4); + printf("llistxattr(\"\", %p, 4) = %s\n", efault + 1, sprintrc(rc)); + + rc = listxattr(".", big, 0); + printf("listxattr(\".\", %p, 0) = %s\n", big, sprintrc(rc)); + + rc = listxattr(".", big, XATTR_SIZE_MAX + 1); + errstr = sprintrc(rc); + printf("listxattr(\".\", "); + if (rc < 0) + printf("%p", big); + else { + const int ellipsis = rc > DEFAULT_STRLEN; + + putchar('"'); + print_quoted_memory(big, ellipsis ? DEFAULT_STRLEN : rc); + putchar('"'); + if (ellipsis) + fputs("...", stdout); + } + printf(", %u) = %s\n", XATTR_SIZE_MAX + 1, errstr); + + rc = fremovexattr(-1, name); + printf("fremovexattr(-1, \"%s\") = %s\n", name, sprintrc(rc)); + + rc = removexattr(".", name); + printf("removexattr(\".\", \"%s\") = %s\n", name, sprintrc(rc)); + + rc = lremovexattr(".", name); + printf("lremovexattr(\".\", \"%s\") = %s\n", name, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYS_XATTR_H") + +#endif diff --git a/tests-m32/xattr.test b/tests-m32/xattr.test new file mode 100755 index 000000000..8c7a87b94 --- /dev/null +++ b/tests-m32/xattr.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check *xattr syscalls decoding. + +. "${srcdir=.}/init.sh" + +syscalls= +for n in getxattr setxattr listxattr removexattr; do + syscalls="$syscalls,${n},f${n},l${n}" +done + +run_strace_match_diff -a22 -e trace=$syscalls diff --git a/tests-m32/xchownx.c b/tests-m32/xchownx.c new file mode 100644 index 000000000..fe5828351 --- /dev/null +++ b/tests-m32/xchownx.c @@ -0,0 +1,152 @@ +/* + * Check decoding of chown/chown32/lchown/lchown32/fchown/fchown32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#ifdef UGID_TYPE_IS_SHORT +# define UGID_TYPE short +# define GETEUID syscall(__NR_geteuid) +# define GETEGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUID(arg) check_overflowuid(arg) +# define CHECK_OVERFLOWGID(arg) check_overflowgid(arg) +#else +# define UGID_TYPE int +# define GETEUID geteuid() +# define GETEGID getegid() +# define CHECK_OVERFLOWUID(arg) +# define CHECK_OVERFLOWGID(arg) +#endif + +#define UNLINK_SAMPLE \ + if (unlink(sample)) perror_msg_and_fail("unlink") +#define CLOSE_SAMPLE \ + if (close(fd)) perror_msg_and_fail("close") + +#ifdef ACCESS_BY_DESCRIPTOR +# define SYSCALL_ARG1 fd +# define FMT_ARG1 "%d" +# define EOK_CMD CLOSE_SAMPLE +# define CLEANUP_CMD UNLINK_SAMPLE +#else +# define SYSCALL_ARG1 sample +# define FMT_ARG1 "\"%s\"" +# define EOK_CMD UNLINK_SAMPLE +# define CLEANUP_CMD CLOSE_SAMPLE +#endif + +static int +ugid2int(const unsigned UGID_TYPE id) +{ + if ((unsigned UGID_TYPE) -1U == id) + return -1; + else + return id; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf(", -1"); + else + printf(", %u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int id) +{ + return num == id || num == -1U; +} + +#define PAIR(val) { val, gid }, { uid, val } + +int +main(void) +{ + static const char sample[] = SYSCALL_NAME "_sample"; + + unsigned int uid = GETEUID; + CHECK_OVERFLOWUID(uid); + unsigned int gid = GETEGID; + CHECK_OVERFLOWUID(gid); + + const struct { + const long uid, gid; + } tests[] = { + { uid, gid }, + { (unsigned long) 0xffffffff00000000ULL | uid, gid }, + { uid, (unsigned long) 0xffffffff00000000ULL | gid }, + PAIR(-1U), + PAIR(-1L), + { 0xffff0000U | uid, gid }, + { uid, 0xffff0000U | gid }, + PAIR(0xffff), + PAIR(0xc0deffffU), + PAIR(0xfacefeedU), + PAIR((long) 0xfacefeeddeadbeefULL) + }; + + int fd = open(sample, O_RDONLY | O_CREAT, 0400); + if (fd < 0) + perror_msg_and_fail("open"); + + CLEANUP_CMD; + + unsigned int i; + long expected = 0; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int unum = ugid2int(tests[i].uid); + const unsigned int gnum = ugid2int(tests[i].gid); + + if (num_matches_id(unum, uid) && + num_matches_id(gnum, gid)) { + if (expected) + continue; + } else { + if (!expected) { + expected = -1; + EOK_CMD; + } + } + + const long rc = syscall(SYSCALL_NR, SYSCALL_ARG1, + tests[i].uid, tests[i].gid); + const char *errstr = sprintrc(rc); + printf("%s(" FMT_ARG1, SYSCALL_NAME, SYSCALL_ARG1); + print_int(unum); + print_int(gnum); + printf(") = %s\n", errstr); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/xet_robust_list.c b/tests-m32/xet_robust_list.c new file mode 100644 index 000000000..211dec459 --- /dev/null +++ b/tests-m32/xet_robust_list.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_get_robust_list && defined __NR_set_robust_list + +# include +# include + +static const char * +sprintaddr(void *addr) +{ + static char buf[sizeof(addr) * 2 + sizeof("0x")]; + + if (!addr) + return "NULL"; + else + snprintf(buf, sizeof(buf), "%p", addr); + + return buf; +} + +int +main(void) +{ + const pid_t pid = getpid(); + const long long_pid = (unsigned long) (0xdeadbeef00000000LL | pid); + void **p_head = tail_alloc(sizeof(void *)); + size_t *p_len = tail_alloc(sizeof(size_t)); + + if (syscall(__NR_get_robust_list, long_pid, p_head, p_len)) + perror_msg_and_skip("get_robust_list"); + printf("get_robust_list(%d, [%s], [%lu]) = 0\n", + (int) pid, sprintaddr(*p_head), (unsigned long) *p_len); + + void *head = tail_alloc(*p_len); + if (syscall(__NR_set_robust_list, head, *p_len)) + perror_msg_and_skip("set_robust_list"); + printf("set_robust_list(%p, %lu) = 0\n", + head, (unsigned long) *p_len); + + if (syscall(__NR_get_robust_list, long_pid, p_head, p_len)) + perror_msg_and_skip("get_robust_list"); + printf("get_robust_list(%d, [%s], [%lu]) = 0\n", + (int) pid, sprintaddr(*p_head), (unsigned long) *p_len); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_get_robust_list && __NR_set_robust_list") + +#endif diff --git a/tests-m32/xet_robust_list.test b/tests-m32/xet_robust_list.test new file mode 100755 index 000000000..8a3a3820b --- /dev/null +++ b/tests-m32/xet_robust_list.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check get_robust_list and set_robust_list syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 -e trace=get_robust_list,set_robust_list diff --git a/tests-m32/xetitimer.c b/tests-m32/xetitimer.c new file mode 100644 index 000000000..4b17edd3a --- /dev/null +++ b/tests-m32/xetitimer.c @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + struct { + struct itimerval itv; + uint32_t pad[4]; + } old = { + .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } + }, new = { + .itv = { + .it_interval = { 0xc0de1, 0xc0de2 }, + .it_value = { 0xc0de3, 0xc0de4 } + }, + .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } + }; + + if (setitimer(ITIMER_REAL, &new.itv, &old.itv)) + perror_msg_and_skip("setitimer"); + printf("setitimer(ITIMER_REAL" + ", {it_interval={tv_sec=%jd, tv_usec=%jd}, " + "it_value={tv_sec=%jd, tv_usec=%jd}}" + ", {it_interval={tv_sec=%jd, tv_usec=%jd}, " + "it_value={tv_sec=%jd, tv_usec=%jd}}) = 0\n", + (intmax_t) new.itv.it_interval.tv_sec, + (intmax_t) new.itv.it_interval.tv_usec, + (intmax_t) new.itv.it_value.tv_sec, + (intmax_t) new.itv.it_value.tv_usec, + (intmax_t) old.itv.it_interval.tv_sec, + (intmax_t) old.itv.it_interval.tv_usec, + (intmax_t) old.itv.it_value.tv_sec, + (intmax_t) old.itv.it_value.tv_usec); + + if (getitimer(ITIMER_REAL, &old.itv)) + perror_msg_and_skip("getitimer"); + printf("getitimer(ITIMER_REAL" + ", {it_interval={tv_sec=%jd, tv_usec=%jd}, " + "it_value={tv_sec=%jd, tv_usec=%jd}}) = 0\n", + (intmax_t) old.itv.it_interval.tv_sec, + (intmax_t) old.itv.it_interval.tv_usec, + (intmax_t) old.itv.it_value.tv_sec, + (intmax_t) old.itv.it_value.tv_usec); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/xetitimer.test b/tests-m32/xetitimer.test new file mode 100755 index 000000000..4aa00ccee --- /dev/null +++ b/tests-m32/xetitimer.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setitimer and getitimer syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=setitimer,getitimer diff --git a/tests-m32/xetpgid.c b/tests-m32/xetpgid.c new file mode 100644 index 000000000..24e0d7f0b --- /dev/null +++ b/tests-m32/xetpgid.c @@ -0,0 +1,59 @@ +/* + * This file is part of xetpgid strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_getpgid && defined __NR_setpgid + +# include +# include + +int +main(void) +{ + const int pid = getpid(); + long rc = syscall(__NR_getpgid, + (unsigned long) 0xffffffff00000000ULL | pid); + printf("getpgid(%d) = %ld\n", pid, rc); + + rc = syscall(__NR_setpgid, + (unsigned long) 0xffffffff00000000ULL, + (unsigned long) 0xffffffff00000000ULL | pid); + printf("setpgid(0, %d) = %ld\n", pid, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpgid && __NR_setpgid") + +#endif diff --git a/tests-m32/xetpgid.test b/tests-m32/xetpgid.test new file mode 100755 index 000000000..07f4f9e80 --- /dev/null +++ b/tests-m32/xetpgid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpgid and setpgid syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 -e trace=getpgid,setpgid diff --git a/tests-m32/xetpriority.c b/tests-m32/xetpriority.c new file mode 100644 index 000000000..ed5525988 --- /dev/null +++ b/tests-m32/xetpriority.c @@ -0,0 +1,31 @@ +#include "tests.h" +#include + +#if defined __NR_getpriority && defined __NR_setpriority + +# include +# include +# include + +int +main(void) +{ + const int pid = getpid(); + long rc = syscall(__NR_getpriority, PRIO_PROCESS, + (unsigned long) 0xffffffff00000000ULL | pid); + printf("getpriority(PRIO_PROCESS, %d) = %ld\n", pid, rc); + + rc = syscall(__NR_setpriority, PRIO_PROCESS, + (unsigned long) 0xffffffff00000000ULL | pid, + (unsigned long) 0xffffffff00000000ULL); + printf("setpriority(PRIO_PROCESS, %d, 0) = %s\n", pid, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpriority && _NR_setpriority") + +#endif diff --git a/tests-m32/xetpriority.test b/tests-m32/xetpriority.test new file mode 100755 index 000000000..2c84ba418 --- /dev/null +++ b/tests-m32/xetpriority.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpriority and setpriority syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a29 -e trace=getpriority,setpriority diff --git a/tests-m32/xettimeofday.c b/tests-m32/xettimeofday.c new file mode 100644 index 000000000..d36c57b4b --- /dev/null +++ b/tests-m32/xettimeofday.c @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +int +main(void) +{ + struct { + struct timeval tv; + uint32_t pad0[2]; + struct timezone tz; + uint32_t pad1[2]; + } t = { + .pad0 = { 0xdeadbeef, 0xbadc0ded }, + .pad1 = { 0xdeadbeef, 0xbadc0ded } + }; + + if (syscall(__NR_gettimeofday, &t.tv, NULL)) + perror_msg_and_skip("gettimeofday"); + printf("gettimeofday({tv_sec=%jd, tv_usec=%jd}, NULL) = 0\n", + (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec); + + if (syscall(__NR_gettimeofday, &t.tv, &t.tz)) + perror_msg_and_skip("gettimeofday"); + printf("gettimeofday({tv_sec=%jd, tv_usec=%jd}" + ", {tz_minuteswest=%d, tz_dsttime=%d}) = 0\n", + (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, + t.tz.tz_minuteswest, t.tz.tz_dsttime); + + t.tv.tv_sec = -1; + t.tv.tv_usec = 1000000000; + assert(syscall(__NR_settimeofday, &t.tv, &t.tz) == -1); + printf("settimeofday({tv_sec=%jd, tv_usec=%jd}" + ", {tz_minuteswest=%d, tz_dsttime=%d})" + " = -1 EINVAL (%m)\n", + (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, + t.tz.tz_minuteswest, t.tz.tz_dsttime); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/xettimeofday.test b/tests-m32/xettimeofday.test new file mode 100755 index 000000000..68764e468 --- /dev/null +++ b/tests-m32/xettimeofday.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check gettimeofday and settimeofday syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 -e trace=gettimeofday,settimeofday diff --git a/tests-m32/xgetrlimit.c b/tests-m32/xgetrlimit.c new file mode 100644 index 000000000..78d9cb997 --- /dev/null +++ b/tests-m32/xgetrlimit.c @@ -0,0 +1,91 @@ +/* + * Check decoding of getrlimit/ugetrlimit syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include + +#include "xlat.h" +#include "xlat/resources.h" + +const char * +sprint_rlim(kernel_ulong_t lim) +{ + if (sizeof(lim) == sizeof(uint64_t)) { + if (lim == (kernel_ulong_t) -1ULL) + return "RLIM64_INFINITY"; + } else { + if (lim == (kernel_ulong_t) -1U) + return "RLIM_INFINITY"; + } + + static char buf[2][sizeof(lim)*3 + sizeof("*1024")]; + static int i; + i &= 1; + if (lim > 1024 && lim % 1024 == 0) + sprintf(buf[i], "%llu*1024", (unsigned long long) lim / 1024); + else + sprintf(buf[i], "%llu", (unsigned long long) lim); + + return buf[i++]; +} + +#ifdef NR_GETRLIMIT + +int +main(void) +{ + kernel_ulong_t *const rlimit = tail_alloc(sizeof(*rlimit) * 2); + const struct xlat *xlat; + + for (xlat = resources; xlat->str; ++xlat) { + unsigned long res = 0xfacefeed00000000ULL | xlat->val; + long rc = syscall(NR_GETRLIMIT, res, 0); + if (rc && ENOSYS == errno) + perror_msg_and_skip(STR_GETRLIMIT); + printf("%s(%s, NULL) = %ld %s (%m)\n", + STR_GETRLIMIT, xlat->str, rc, errno2name()); + + rc = syscall(NR_GETRLIMIT, res, rlimit); + if (rc) + printf("%s(%s, NULL) = %ld %s (%m)\n", + STR_GETRLIMIT, xlat->str, rc, errno2name()); + else + printf("%s(%s, {rlim_cur=%s, rlim_max=%s})" + " = 0\n", STR_GETRLIMIT, xlat->str, + sprint_rlim(rlimit[0]), sprint_rlim(rlimit[1])); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#endif /* NR_GETRLIMIT */ diff --git a/tests-m32/xselect.c b/tests-m32/xselect.c new file mode 100644 index 000000000..39e87ac79 --- /dev/null +++ b/tests-m32/xselect.c @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Based on test by Dr. David Alan Gilbert + */ + +#include +#include +#include +#include + +static fd_set set[0x1000000 / sizeof(fd_set)]; + +int main(void) +{ + int fds[2]; + struct { + struct timeval tv; + int pad[2]; + } tm_in = { + .tv = { .tv_sec = 0xc0de1, .tv_usec = 0xc0de2 }, + .pad = { 0xdeadbeef, 0xbadc0ded } + }, tm = tm_in; + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + /* + * Start with a nice simple select. + */ + FD_ZERO(set); + FD_SET(fds[0], set); + FD_SET(fds[1], set); + int rc = syscall(TEST_SYSCALL_NR, fds[1] + 1, set, set, set, NULL); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + assert(rc == 1); + printf("%s(%d, [%d %d], [%d %d], [%d %d], NULL) = 1 ()\n", + TEST_SYSCALL_STR, fds[1] + 1, fds[0], fds[1], + fds[0], fds[1], fds[0], fds[1]); + + /* + * Another simple one, with a timeout. + */ + FD_SET(1, set); + FD_SET(2, set); + FD_SET(fds[0], set); + FD_SET(fds[1], set); + assert(syscall(TEST_SYSCALL_NR, fds[1] + 1, NULL, set, NULL, &tm.tv) == 3); + printf("%s(%d, NULL, [1 2 %d %d], NULL, {tv_sec=%lld, tv_usec=%lld})" + " = 3 (out [1 2 %d], left {tv_sec=%lld, tv_usec=%lld})\n", + TEST_SYSCALL_STR, fds[1] + 1, fds[0], fds[1], + (long long) tm_in.tv.tv_sec, (long long) tm_in.tv.tv_usec, + fds[1], + (long long) tm.tv.tv_sec, (long long) tm.tv.tv_usec); + + /* + * Now the crash case that trinity found, negative nfds + * but with a pointer to a large chunk of valid memory. + */ + FD_ZERO(set); + FD_SET(fds[1],set); + assert(syscall(TEST_SYSCALL_NR, -1, NULL, set, NULL, NULL) == -1); + printf("%s(-1, NULL, %p, NULL, NULL) = -1 EINVAL (%m)\n", + TEST_SYSCALL_STR, set); + + /* + * Another variant, with nfds exceeding FD_SETSIZE limit. + */ + FD_ZERO(set); + FD_SET(fds[0],set); + tm.tv.tv_sec = 0; + tm.tv.tv_usec = 123; + assert(syscall(TEST_SYSCALL_NR, FD_SETSIZE + 1, set, set + 1, NULL, &tm.tv) == 0); + printf("%s(%d, [%d], [], NULL, {tv_sec=0, tv_usec=123}) = 0 (Timeout)\n", + TEST_SYSCALL_STR, FD_SETSIZE + 1, fds[0]); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/xstatfs.c b/tests-m32/xstatfs.c new file mode 100644 index 000000000..26c43dee7 --- /dev/null +++ b/tests-m32/xstatfs.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define SYSCALL_INVOKE(file, desc, ptr, size) \ + syscall(SYSCALL_NR, SYSCALL_ARG(file, desc), ptr) +#define PRINT_SYSCALL_HEADER(file, desc, size) \ + printf("%s(" SYSCALL_ARG_FMT ", ", SYSCALL_NAME, SYSCALL_ARG(file, desc)) + +#define STRUCT_STATFS struct statfs +#ifdef HAVE_STRUCT_STATFS_F_FRSIZE +# define PRINT_F_FRSIZE +#endif +#ifdef HAVE_STRUCT_STATFS_F_FLAGS +# define PRINT_F_FLAGS +#endif +#if defined HAVE_STRUCT_STATFS_F_FSID_VAL +# define PRINT_F_FSID f_fsid.val +#elif defined HAVE_STRUCT_STATFS_F_FSID___VAL +# define PRINT_F_FSID f_fsid.__val +#endif + +#include "xstatfsx.c" diff --git a/tests-m32/xstatfs64.c b/tests-m32/xstatfs64.c new file mode 100644 index 000000000..8f50de299 --- /dev/null +++ b/tests-m32/xstatfs64.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define SYSCALL_INVOKE(file, desc, ptr, size) \ + syscall(SYSCALL_NR, SYSCALL_ARG(file, desc), size, ptr) +#define PRINT_SYSCALL_HEADER(file, desc, size) \ + printf("%s(" SYSCALL_ARG_FMT ", %u, ", SYSCALL_NAME, \ + SYSCALL_ARG(file, desc), (unsigned) size) + +#define STRUCT_STATFS struct statfs64 +#ifdef HAVE_STRUCT_STATFS64_F_FRSIZE +# define PRINT_F_FRSIZE +#endif +#ifdef HAVE_STRUCT_STATFS64_F_FLAGS +# define PRINT_F_FLAGS +#endif +#if defined HAVE_STRUCT_STATFS64_F_FSID_VAL +# define PRINT_F_FSID f_fsid.val +#elif defined HAVE_STRUCT_STATFS64_F_FSID___VAL +# define PRINT_F_FSID f_fsid.__val +#endif +#define CHECK_ODD_SIZE + +#include "xstatfsx.c" diff --git a/tests-m32/xstatfsx.c b/tests-m32/xstatfsx.c new file mode 100644 index 000000000..d8288f1ff --- /dev/null +++ b/tests-m32/xstatfsx.c @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#include +#include + +#include "xlat.h" +#include "xlat/fsmagic.h" +#include "xlat/statfs_flags.h" + +#define PRINT_NUM(arg) \ + if (sizeof(b->arg) == sizeof(int)) \ + printf(", %s=%u", #arg, (unsigned int) b->arg); \ + else if (sizeof(b->arg) == sizeof(long)) \ + printf(", %s=%lu", #arg, (unsigned long) b->arg); \ + else \ + printf(", %s=%llu", #arg, (unsigned long long) b->arg) + +static void +print_statfs_type(const char *const prefix, const unsigned int magic) +{ + fputs(prefix, stdout); + unsigned int i; + for (i = 0; i < ARRAY_SIZE(fsmagic); ++i) + if (magic == fsmagic[i].val) { + fputs(fsmagic[i].str, stdout); + return; + } + printf("%#x", magic); +} + +static void +print_statfs(const char *const sample, const char *magic_str) +{ + int fd = open(sample, O_RDONLY); + if (fd < 0) + perror_msg_and_fail("open: %s", sample); + + STRUCT_STATFS *const b = tail_alloc(sizeof(*b)); + long rc = SYSCALL_INVOKE(sample, fd, b, sizeof(*b)); + if (rc) + perror_msg_and_skip(SYSCALL_NAME); + + PRINT_SYSCALL_HEADER(sample, fd, sizeof(*b)); + if (magic_str) + printf("{f_type=%s", magic_str); + else + print_statfs_type("{f_type=", b->f_type); + PRINT_NUM(f_bsize); + PRINT_NUM(f_blocks); + PRINT_NUM(f_bfree); + PRINT_NUM(f_bavail); + PRINT_NUM(f_files); + PRINT_NUM(f_ffree); +#ifdef PRINT_F_FSID + printf(", f_fsid={val=[%u, %u]}", + (unsigned) b->PRINT_F_FSID[0], (unsigned) b->PRINT_F_FSID[1]); +#endif + PRINT_NUM(f_namelen); +#ifdef PRINT_F_FRSIZE + PRINT_NUM(f_frsize); +#endif +#ifdef PRINT_F_FLAGS + if (b->f_flags & ST_VALID) { + printf(", f_flags="); + printflags(statfs_flags, b->f_flags, "ST_???"); + } +#endif + printf("}) = 0\n"); +} + +int +main(void) +{ + print_statfs("/proc/self/status", "PROC_SUPER_MAGIC"); + + print_statfs(".", NULL); + + long rc = SYSCALL_INVOKE("", -1, 0, sizeof(STRUCT_STATFS)); + const char *errstr = sprintrc(rc); + PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS)); + printf("NULL) = %s\n", errstr); + +#ifdef CHECK_ODD_SIZE + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL; + rc = SYSCALL_INVOKE("", -1, addr, sizeof(STRUCT_STATFS) + 1); + errstr = sprintrc(rc); + PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS) + 1); + printf("%#lx) = %s\n", addr, errstr); +#endif + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-m32/xstatx.c b/tests-m32/xstatx.c new file mode 100644 index 000000000..0d5fca87b --- /dev/null +++ b/tests-m32/xstatx.c @@ -0,0 +1,324 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#if defined HAVE_FTRUNCATE && defined HAVE_FUTIMENS + +# ifndef TEST_SYSCALL_STR +# error TEST_SYSCALL_STR must be defined +# endif +# ifndef TEST_SYSCALL_INVOKE +# error TEST_SYSCALL_INVOKE must be defined +# endif +# ifndef PRINT_SYSCALL_HEADER +# error PRINT_SYSCALL_HEADER must be defined +# endif +# ifndef PRINT_SYSCALL_FOOTER +# error PRINT_SYSCALL_FOOTER must be defined +# endif + +# include +# include +# include +# include +# include +# include + +static void +print_time(const time_t t) +{ + if (!t) { + printf("0"); + return; + } + + struct tm *p = localtime(&t); + + if (p) { + char buf[256]; + + strftime(buf, sizeof(buf), "%FT%T%z", p); + + printf("%s", buf); + } else { + printf("%llu", zero_extend_signed_to_ull(t)); + } +} + +# ifndef STRUCT_STAT +# define STRUCT_STAT struct stat +# define STRUCT_STAT_STR "struct stat" +# define STRUCT_STAT_IS_STAT64 0 +# endif +# ifndef SAMPLE_SIZE +# define SAMPLE_SIZE ((libc_off_t) 43147718418ULL) +# endif + +typedef off_t libc_off_t; + +# define stat libc_stat +# define stat64 libc_stat64 +# include +# include +# undef stat +# undef stat64 + +# undef st_atime +# undef st_mtime +# undef st_ctime +# include "asm_stat.h" + +# if STRUCT_STAT_IS_STAT64 +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# if defined MPERS_IS_m32 +# ifdef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# elif defined MPERS_IS_mx32 +# ifdef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# elif defined HAVE_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif /* MPERS_IS_m32 || MPERS_IS_mx32 || HAVE_STRUCT_STAT64_ST_MTIME_NSEC */ +# else /* !STRUCT_STAT_IS_STAT64 */ +# if defined MPERS_IS_m32 +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# ifdef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# elif defined MPERS_IS_mx32 +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# ifdef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# endif /* MPERS_IS_m32 || MPERS_IS_mx32 */ +# endif /* STRUCT_STAT_IS_STAT64 */ + +# ifndef TEST_BOGUS_STRUCT_STAT +# define TEST_BOGUS_STRUCT_STAT 1 +# endif + +# ifndef IS_FSTAT +# define IS_FSTAT 0 +# endif + +# ifndef OLD_STAT +# define OLD_STAT 0 +# endif + +static void +print_ftype(const unsigned int mode) +{ + if (S_ISREG(mode)) + printf("S_IFREG"); + else if (S_ISDIR(mode)) + printf("S_IFDIR"); + else if (S_ISCHR(mode)) + printf("S_IFCHR"); + else if (S_ISBLK(mode)) + printf("S_IFBLK"); + else + printf("%#o", mode & S_IFMT); +} + +static void +print_perms(const unsigned int mode) +{ + printf("%#o", mode & ~S_IFMT); +} + +static void +print_stat(const STRUCT_STAT *st) +{ + printf("{st_dev=makedev(%u, %u)", + (unsigned int) major(zero_extend_signed_to_ull(st->st_dev)), + (unsigned int) minor(zero_extend_signed_to_ull(st->st_dev))); + printf(", st_ino=%llu", zero_extend_signed_to_ull(st->st_ino)); + printf(", st_mode="); + print_ftype(st->st_mode); + printf("|"); + print_perms(st->st_mode); + printf(", st_nlink=%llu", zero_extend_signed_to_ull(st->st_nlink)); + printf(", st_uid=%llu", zero_extend_signed_to_ull(st->st_uid)); + printf(", st_gid=%llu", zero_extend_signed_to_ull(st->st_gid)); +# if OLD_STAT + printf(", st_blksize=0, st_blocks=0"); +# else /* !OLD_STAT */ + printf(", st_blksize=%llu", zero_extend_signed_to_ull(st->st_blksize)); + printf(", st_blocks=%llu", zero_extend_signed_to_ull(st->st_blocks)); +# endif /* OLD_STAT */ + + switch (st->st_mode & S_IFMT) { + case S_IFCHR: case S_IFBLK: + printf(", st_rdev=makedev(%u, %u)", + (unsigned int) major(zero_extend_signed_to_ull(st->st_rdev)), + (unsigned int) minor(zero_extend_signed_to_ull(st->st_rdev))); + break; + default: + printf(", st_size=%llu", zero_extend_signed_to_ull(st->st_size)); + } + + printf(", st_atime="); + print_time(sign_extend_unsigned_to_ll(st->st_atime)); +# if defined(HAVE_STRUCT_STAT_ST_MTIME_NSEC) && !OLD_STAT + if (st->st_atime_nsec) + printf(".%09llu", zero_extend_signed_to_ull(st->st_atime_nsec)); +# endif + printf(", st_mtime="); + print_time(sign_extend_unsigned_to_ll(st->st_mtime)); +# if defined(HAVE_STRUCT_STAT_ST_MTIME_NSEC) && !OLD_STAT + if (st->st_mtime_nsec) + printf(".%09llu", zero_extend_signed_to_ull(st->st_mtime_nsec)); +# endif + printf(", st_ctime="); + print_time(sign_extend_unsigned_to_ll(st->st_ctime)); +# if defined(HAVE_STRUCT_STAT_ST_MTIME_NSEC) && !OLD_STAT + if (st->st_ctime_nsec) + printf(".%09llu", zero_extend_signed_to_ull(st->st_ctime_nsec)); +# endif + printf("}"); +} + +static int +create_sample(const char *fname, const libc_off_t size) +{ + static const struct timespec ts[] = { + {-10843, 135}, {-10841, 246} + }; + + (void) close(0); + if (open(fname, O_RDWR | O_CREAT | O_TRUNC, 0640)) { + perror(fname); + return 77; + } + if (ftruncate(0, size)) { + perror("ftruncate"); + return 77; + } + if (futimens(0, ts)) { + perror("futimens"); + return 77; + } + return 0; +} + +int +main(void) +{ +# if !IS_FSTAT + static const char full[] = "/dev/full"; +# endif + static const char sample[] = TEST_SYSCALL_STR ".sample"; + STRUCT_STAT st[2]; + + int rc; + + rc = create_sample(sample, SAMPLE_SIZE); + if (rc) { + (void) unlink(sample); + return rc; + } + +# if TEST_BOGUS_STRUCT_STAT + STRUCT_STAT *st_cut = tail_alloc(sizeof(long) * 4); + rc = TEST_SYSCALL_INVOKE(sample, st_cut); + PRINT_SYSCALL_HEADER(sample); + printf("%p", st_cut); + PRINT_SYSCALL_FOOTER(rc); +# endif + +# if !IS_FSTAT + rc = TEST_SYSCALL_INVOKE(full, st); + PRINT_SYSCALL_HEADER(full); + if (rc) + printf("%p", st); + else + print_stat(st); + PRINT_SYSCALL_FOOTER(rc); +# endif + + if ((rc = TEST_SYSCALL_INVOKE(sample, st))) { +# if OLD_STAT + if (errno != EOVERFLOW) +# endif + { + perror(TEST_SYSCALL_STR); + (void) unlink(sample); + return 77; + } + } + (void) unlink(sample); + if (!rc && zero_extend_signed_to_ull(SAMPLE_SIZE) != + zero_extend_signed_to_ull(st[0].st_size)) { + fprintf(stderr, "Size mismatch: " + "requested size(%llu) != st_size(%llu)\n", + zero_extend_signed_to_ull(SAMPLE_SIZE), + zero_extend_signed_to_ull(st[0].st_size)); + fprintf(stderr, "The most likely reason for this is incorrect" + " definition of %s.\n" + "Here is some diagnostics that might help:\n", + STRUCT_STAT_STR); + +#define LOG_STAT_OFFSETOF_SIZEOF(object, member) \ + fprintf(stderr, "offsetof(%s, %s) = %zu" \ + ", sizeof(%s) = %zu\n", \ + STRUCT_STAT_STR, #member, \ + offsetof(STRUCT_STAT, member), \ + #member, sizeof((object).member)) + + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_dev); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_ino); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_mode); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_nlink); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_uid); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_gid); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_rdev); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_size); +# if !OLD_STAT + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_blksize); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_blocks); +# endif /* !OLD_STAT */ + + return 1; + } + + PRINT_SYSCALL_HEADER(sample); + if (rc) + printf("%p", st); + else + print_stat(st); + PRINT_SYSCALL_FOOTER(rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_FTRUNCATE && HAVE_FUTIMENS") + +#endif diff --git a/tests-mx32/Makefile b/tests-mx32/Makefile new file mode 100644 index 000000000..d43833f3a --- /dev/null +++ b/tests-mx32/Makefile @@ -0,0 +1,5800 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# tests-mx32/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# Automake input for strace tests. +# +# Copyright (c) 2011-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# scno.h make rules for strace. +# +# Copyright (c) 2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/strace +pkgincludedir = $(includedir)/strace +pkglibdir = $(libdir)/strace +pkglibexecdir = $(libexecdir)/strace +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-pc-linux-gnu +host_triplet = x86_64-pc-linux-gnu +check_PROGRAMS = _newselect$(EXEEXT) accept$(EXEEXT) accept4$(EXEEXT) \ + access$(EXEEXT) acct$(EXEEXT) add_key$(EXEEXT) \ + adjtimex$(EXEEXT) aio$(EXEEXT) alarm$(EXEEXT) answer$(EXEEXT) \ + attach-f-p$(EXEEXT) attach-f-p-cmd$(EXEEXT) \ + attach-p-cmd-cmd$(EXEEXT) attach-p-cmd-p$(EXEEXT) bpf$(EXEEXT) \ + brk$(EXEEXT) btrfs$(EXEEXT) caps$(EXEEXT) caps-abbrev$(EXEEXT) \ + chmod$(EXEEXT) chown$(EXEEXT) chown32$(EXEEXT) chroot$(EXEEXT) \ + clock_adjtime$(EXEEXT) clock_nanosleep$(EXEEXT) \ + clock_xettime$(EXEEXT) copy_file_range$(EXEEXT) \ + count-f$(EXEEXT) creat$(EXEEXT) delete_module$(EXEEXT) \ + dup$(EXEEXT) dup2$(EXEEXT) dup3$(EXEEXT) epoll_create$(EXEEXT) \ + epoll_create1$(EXEEXT) epoll_ctl$(EXEEXT) epoll_pwait$(EXEEXT) \ + epoll_wait$(EXEEXT) erestartsys$(EXEEXT) eventfd$(EXEEXT) \ + execve$(EXEEXT) execve-v$(EXEEXT) execveat$(EXEEXT) \ + execveat-v$(EXEEXT) faccessat$(EXEEXT) fadvise64$(EXEEXT) \ + fadvise64_64$(EXEEXT) fallocate$(EXEEXT) \ + fanotify_init$(EXEEXT) fanotify_mark$(EXEEXT) fchdir$(EXEEXT) \ + fchmod$(EXEEXT) fchmodat$(EXEEXT) fchown$(EXEEXT) \ + fchown32$(EXEEXT) fchownat$(EXEEXT) fcntl$(EXEEXT) \ + fcntl64$(EXEEXT) fdatasync$(EXEEXT) file_handle$(EXEEXT) \ + file_ioctl$(EXEEXT) filter-unavailable$(EXEEXT) \ + finit_module$(EXEEXT) flock$(EXEEXT) fork-f$(EXEEXT) \ + fstat$(EXEEXT) fstat64$(EXEEXT) fstatat64$(EXEEXT) \ + fstatfs$(EXEEXT) fstatfs64$(EXEEXT) fsync$(EXEEXT) \ + ftruncate$(EXEEXT) ftruncate64$(EXEEXT) futex$(EXEEXT) \ + futimesat$(EXEEXT) get_mempolicy$(EXEEXT) getcpu$(EXEEXT) \ + getcwd$(EXEEXT) getdents$(EXEEXT) getdents64$(EXEEXT) \ + getegid$(EXEEXT) getegid32$(EXEEXT) geteuid$(EXEEXT) \ + geteuid32$(EXEEXT) getgid$(EXEEXT) getgid32$(EXEEXT) \ + getgroups$(EXEEXT) getgroups32$(EXEEXT) getpeername$(EXEEXT) \ + getpgrp$(EXEEXT) getrandom$(EXEEXT) getresgid$(EXEEXT) \ + getresgid32$(EXEEXT) getresuid$(EXEEXT) getresuid32$(EXEEXT) \ + getrlimit$(EXEEXT) getrusage$(EXEEXT) getsid$(EXEEXT) \ + getsockname$(EXEEXT) getuid$(EXEEXT) getuid32$(EXEEXT) \ + getxxid$(EXEEXT) inet-cmsg$(EXEEXT) init_module$(EXEEXT) \ + inotify$(EXEEXT) inotify_init1$(EXEEXT) ioctl$(EXEEXT) \ + ioctl_block$(EXEEXT) ioctl_dm$(EXEEXT) ioctl_dm-v$(EXEEXT) \ + ioctl_evdev$(EXEEXT) ioctl_evdev-v$(EXEEXT) \ + ioctl_loop$(EXEEXT) ioctl_loop-nv$(EXEEXT) \ + ioctl_loop-v$(EXEEXT) ioctl_mtd$(EXEEXT) ioctl_rtc$(EXEEXT) \ + ioctl_rtc-v$(EXEEXT) ioctl_scsi$(EXEEXT) \ + ioctl_sg_io_v3$(EXEEXT) ioctl_sg_io_v4$(EXEEXT) \ + ioctl_sock_gifconf$(EXEEXT) ioctl_uffdio$(EXEEXT) \ + ioctl_v4l2$(EXEEXT) ioperm$(EXEEXT) iopl$(EXEEXT) \ + ioprio$(EXEEXT) ip_mreq$(EXEEXT) ipc$(EXEEXT) ipc_msg$(EXEEXT) \ + ipc_msgbuf$(EXEEXT) ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) \ + kcmp$(EXEEXT) kexec_file_load$(EXEEXT) kexec_load$(EXEEXT) \ + keyctl$(EXEEXT) kill$(EXEEXT) ksysent$(EXEEXT) lchown$(EXEEXT) \ + lchown32$(EXEEXT) link$(EXEEXT) linkat$(EXEEXT) \ + llseek$(EXEEXT) lookup_dcookie$(EXEEXT) lseek$(EXEEXT) \ + lstat$(EXEEXT) lstat64$(EXEEXT) mbind$(EXEEXT) \ + membarrier$(EXEEXT) memfd_create$(EXEEXT) \ + migrate_pages$(EXEEXT) mincore$(EXEEXT) mkdir$(EXEEXT) \ + mkdirat$(EXEEXT) mknod$(EXEEXT) mknodat$(EXEEXT) \ + mlock$(EXEEXT) mlock2$(EXEEXT) mlockall$(EXEEXT) mmap$(EXEEXT) \ + mmap64$(EXEEXT) mmsg$(EXEEXT) mmsg-silent$(EXEEXT) \ + mmsg_name$(EXEEXT) mmsg_name-v$(EXEEXT) mount$(EXEEXT) \ + move_pages$(EXEEXT) mq$(EXEEXT) mq_sendrecv$(EXEEXT) \ + mq_sendrecv-read$(EXEEXT) mq_sendrecv-write$(EXEEXT) \ + msg_control$(EXEEXT) msg_control-v$(EXEEXT) msg_name$(EXEEXT) \ + munlockall$(EXEEXT) nanosleep$(EXEEXT) \ + net-accept-connect$(EXEEXT) net-icmp_filter$(EXEEXT) \ + net-sockaddr$(EXEEXT) net-y-unix$(EXEEXT) net-yy-inet$(EXEEXT) \ + net-yy-netlink$(EXEEXT) net-yy-unix$(EXEEXT) \ + netlink_inet_diag$(EXEEXT) netlink_netlink_diag$(EXEEXT) \ + netlink_protocol$(EXEEXT) netlink_unix_diag$(EXEEXT) \ + newfstatat$(EXEEXT) nsyscalls$(EXEEXT) old_mmap$(EXEEXT) \ + oldfstat$(EXEEXT) oldlstat$(EXEEXT) oldselect$(EXEEXT) \ + oldstat$(EXEEXT) open$(EXEEXT) openat$(EXEEXT) pause$(EXEEXT) \ + pc$(EXEEXT) perf_event_open$(EXEEXT) \ + perf_event_open_nonverbose$(EXEEXT) \ + perf_event_open_unabbrev$(EXEEXT) personality$(EXEEXT) \ + pipe$(EXEEXT) pipe2$(EXEEXT) pkey_alloc$(EXEEXT) \ + pkey_free$(EXEEXT) pkey_mprotect$(EXEEXT) poll$(EXEEXT) \ + ppoll$(EXEEXT) prctl-arg2-intptr$(EXEEXT) \ + prctl-dumpable$(EXEEXT) prctl-name$(EXEEXT) \ + prctl-no-args$(EXEEXT) prctl-pdeathsig$(EXEEXT) \ + prctl-seccomp-filter-v$(EXEEXT) prctl-seccomp-strict$(EXEEXT) \ + prctl-securebits$(EXEEXT) prctl-tid_address$(EXEEXT) \ + prctl-tsc$(EXEEXT) pread64-pwrite64$(EXEEXT) preadv$(EXEEXT) \ + preadv-pwritev$(EXEEXT) preadv2-pwritev2$(EXEEXT) \ + print_maxfd$(EXEEXT) printstr$(EXEEXT) prlimit64$(EXEEXT) \ + process_vm_readv$(EXEEXT) process_vm_writev$(EXEEXT) \ + pselect6$(EXEEXT) ptrace$(EXEEXT) pwritev$(EXEEXT) \ + qual_fault$(EXEEXT) qual_inject-error-signal$(EXEEXT) \ + qual_inject-retval$(EXEEXT) qual_inject-signal$(EXEEXT) \ + qual_signal$(EXEEXT) quotactl$(EXEEXT) quotactl-v$(EXEEXT) \ + quotactl-xfs$(EXEEXT) quotactl-xfs-v$(EXEEXT) \ + read-write$(EXEEXT) readahead$(EXEEXT) readdir$(EXEEXT) \ + readlink$(EXEEXT) readlinkat$(EXEEXT) readv$(EXEEXT) \ + reboot$(EXEEXT) recvfrom$(EXEEXT) recvmmsg-timeout$(EXEEXT) \ + recvmsg$(EXEEXT) redirect-fds$(EXEEXT) \ + remap_file_pages$(EXEEXT) rename$(EXEEXT) renameat$(EXEEXT) \ + renameat2$(EXEEXT) request_key$(EXEEXT) \ + restart_syscall$(EXEEXT) rmdir$(EXEEXT) rt_sigpending$(EXEEXT) \ + rt_sigprocmask$(EXEEXT) rt_sigqueueinfo$(EXEEXT) \ + rt_sigsuspend$(EXEEXT) rt_sigtimedwait$(EXEEXT) \ + rt_tgsigqueueinfo$(EXEEXT) sched_get_priority_mxx$(EXEEXT) \ + sched_rr_get_interval$(EXEEXT) sched_xetaffinity$(EXEEXT) \ + sched_xetattr$(EXEEXT) sched_xetparam$(EXEEXT) \ + sched_xetscheduler$(EXEEXT) sched_yield$(EXEEXT) \ + scm_rights$(EXEEXT) seccomp-filter$(EXEEXT) \ + seccomp-filter-v$(EXEEXT) seccomp-strict$(EXEEXT) \ + select$(EXEEXT) semop$(EXEEXT) sendfile$(EXEEXT) \ + sendfile64$(EXEEXT) set_mempolicy$(EXEEXT) \ + set_ptracer_any$(EXEEXT) setdomainname$(EXEEXT) \ + setfsgid$(EXEEXT) setfsgid32$(EXEEXT) setfsuid$(EXEEXT) \ + setfsuid32$(EXEEXT) setgid$(EXEEXT) setgid32$(EXEEXT) \ + setgroups$(EXEEXT) setgroups32$(EXEEXT) sethostname$(EXEEXT) \ + setns$(EXEEXT) setregid$(EXEEXT) setregid32$(EXEEXT) \ + setresgid$(EXEEXT) setresgid32$(EXEEXT) setresuid$(EXEEXT) \ + setresuid32$(EXEEXT) setreuid$(EXEEXT) setreuid32$(EXEEXT) \ + setrlimit$(EXEEXT) setuid$(EXEEXT) setuid32$(EXEEXT) \ + shmxt$(EXEEXT) shutdown$(EXEEXT) sigaction$(EXEEXT) \ + sigaltstack$(EXEEXT) siginfo$(EXEEXT) signal_receive$(EXEEXT) \ + signalfd4$(EXEEXT) sigreturn$(EXEEXT) sleep$(EXEEXT) \ + socketcall$(EXEEXT) splice$(EXEEXT) stack-fcall$(EXEEXT) \ + stat$(EXEEXT) stat64$(EXEEXT) statfs$(EXEEXT) \ + statfs64$(EXEEXT) swap$(EXEEXT) symlink$(EXEEXT) \ + symlinkat$(EXEEXT) sync$(EXEEXT) sync_file_range$(EXEEXT) \ + sync_file_range2$(EXEEXT) sysinfo$(EXEEXT) syslog$(EXEEXT) \ + tee$(EXEEXT) threads-execve$(EXEEXT) time$(EXEEXT) \ + timer_create$(EXEEXT) timer_xettime$(EXEEXT) \ + timerfd_xettime$(EXEEXT) times$(EXEEXT) times-fail$(EXEEXT) \ + truncate$(EXEEXT) truncate64$(EXEEXT) ugetrlimit$(EXEEXT) \ + uio$(EXEEXT) umask$(EXEEXT) umount$(EXEEXT) umount2$(EXEEXT) \ + umoven-illptr$(EXEEXT) umovestr$(EXEEXT) \ + umovestr-illptr$(EXEEXT) umovestr2$(EXEEXT) umovestr3$(EXEEXT) \ + uname$(EXEEXT) unix-pair-send-recv$(EXEEXT) \ + unix-pair-sendto-recvfrom$(EXEEXT) unlink$(EXEEXT) \ + unlinkat$(EXEEXT) unshare$(EXEEXT) userfaultfd$(EXEEXT) \ + ustat$(EXEEXT) utime$(EXEEXT) utimensat$(EXEEXT) \ + utimes$(EXEEXT) vfork-f$(EXEEXT) vhangup$(EXEEXT) \ + vmsplice$(EXEEXT) wait4$(EXEEXT) wait4-v$(EXEEXT) \ + waitid$(EXEEXT) waitid-v$(EXEEXT) waitpid$(EXEEXT) \ + xattr$(EXEEXT) xattr-strings$(EXEEXT) xet_robust_list$(EXEEXT) \ + xetitimer$(EXEEXT) xetpgid$(EXEEXT) xetpriority$(EXEEXT) \ + xettimeofday$(EXEEXT) +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(am__EXEEXT_1) +DIST_COMMON = $(srcdir)/../scno.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ + $(top_srcdir)/test-driver +subdir = tests-mx32 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/ax_valgrind_check.m4 \ + $(top_srcdir)/m4/mpers.m4 \ + $(top_srcdir)/m4/st_save_restore_var.m4 \ + $(top_srcdir)/m4/st_warn_cflags.m4 \ + $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AR = ar +ARFLAGS = cru +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libtests_a_AR = $(AR) $(ARFLAGS) +libtests_a_LIBADD = +am_libtests_a_OBJECTS = libtests_a-errno2name.$(OBJEXT) \ + libtests_a-error_msg.$(OBJEXT) \ + libtests_a-fill_memory.$(OBJEXT) \ + libtests_a-get_page_size.$(OBJEXT) \ + libtests_a-hexdump_strdup.$(OBJEXT) \ + libtests_a-hexquote_strndup.$(OBJEXT) \ + libtests_a-inode_of_sockfd.$(OBJEXT) \ + libtests_a-libmmsg.$(OBJEXT) \ + libtests_a-libsocketcall.$(OBJEXT) \ + libtests_a-overflowuid.$(OBJEXT) \ + libtests_a-pipe_maxfd.$(OBJEXT) \ + libtests_a-print_quoted_string.$(OBJEXT) \ + libtests_a-printflags.$(OBJEXT) libtests_a-printxval.$(OBJEXT) \ + libtests_a-signal2name.$(OBJEXT) libtests_a-sprintrc.$(OBJEXT) \ + libtests_a-tail_alloc.$(OBJEXT) libtests_a-tprintf.$(OBJEXT) +libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) +_newselect_SOURCES = _newselect.c +_newselect_OBJECTS = _newselect.$(OBJEXT) +_newselect_LDADD = $(LDADD) +_newselect_DEPENDENCIES = libtests.a +accept_SOURCES = accept.c +accept_OBJECTS = accept.$(OBJEXT) +accept_LDADD = $(LDADD) +accept_DEPENDENCIES = libtests.a +accept4_SOURCES = accept4.c +accept4_OBJECTS = accept4.$(OBJEXT) +accept4_LDADD = $(LDADD) +accept4_DEPENDENCIES = libtests.a +access_SOURCES = access.c +access_OBJECTS = access.$(OBJEXT) +access_LDADD = $(LDADD) +access_DEPENDENCIES = libtests.a +acct_SOURCES = acct.c +acct_OBJECTS = acct.$(OBJEXT) +acct_LDADD = $(LDADD) +acct_DEPENDENCIES = libtests.a +add_key_SOURCES = add_key.c +add_key_OBJECTS = add_key.$(OBJEXT) +add_key_LDADD = $(LDADD) +add_key_DEPENDENCIES = libtests.a +adjtimex_SOURCES = adjtimex.c +adjtimex_OBJECTS = adjtimex.$(OBJEXT) +adjtimex_LDADD = $(LDADD) +adjtimex_DEPENDENCIES = libtests.a +aio_SOURCES = aio.c +aio_OBJECTS = aio.$(OBJEXT) +aio_LDADD = $(LDADD) +aio_DEPENDENCIES = libtests.a +alarm_SOURCES = alarm.c +alarm_OBJECTS = alarm.$(OBJEXT) +alarm_LDADD = $(LDADD) +alarm_DEPENDENCIES = libtests.a +answer_SOURCES = answer.c +answer_OBJECTS = answer.$(OBJEXT) +answer_LDADD = $(LDADD) +answer_DEPENDENCIES = libtests.a +attach_f_p_SOURCES = attach-f-p.c +attach_f_p_OBJECTS = attach-f-p.$(OBJEXT) +attach_f_p_DEPENDENCIES = $(LDADD) +attach_f_p_cmd_SOURCES = attach-f-p-cmd.c +attach_f_p_cmd_OBJECTS = attach-f-p-cmd.$(OBJEXT) +attach_f_p_cmd_LDADD = $(LDADD) +attach_f_p_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_cmd_SOURCES = attach-p-cmd-cmd.c +attach_p_cmd_cmd_OBJECTS = attach-p-cmd-cmd.$(OBJEXT) +attach_p_cmd_cmd_LDADD = $(LDADD) +attach_p_cmd_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_p_SOURCES = attach-p-cmd-p.c +attach_p_cmd_p_OBJECTS = attach-p-cmd-p.$(OBJEXT) +attach_p_cmd_p_LDADD = $(LDADD) +attach_p_cmd_p_DEPENDENCIES = libtests.a +bpf_SOURCES = bpf.c +bpf_OBJECTS = bpf.$(OBJEXT) +bpf_LDADD = $(LDADD) +bpf_DEPENDENCIES = libtests.a +brk_SOURCES = brk.c +brk_OBJECTS = brk.$(OBJEXT) +brk_LDADD = $(LDADD) +brk_DEPENDENCIES = libtests.a +btrfs_SOURCES = btrfs.c +btrfs_OBJECTS = btrfs.$(OBJEXT) +btrfs_LDADD = $(LDADD) +btrfs_DEPENDENCIES = libtests.a +caps_SOURCES = caps.c +caps_OBJECTS = caps.$(OBJEXT) +caps_LDADD = $(LDADD) +caps_DEPENDENCIES = libtests.a +caps_abbrev_SOURCES = caps-abbrev.c +caps_abbrev_OBJECTS = caps-abbrev.$(OBJEXT) +caps_abbrev_LDADD = $(LDADD) +caps_abbrev_DEPENDENCIES = libtests.a +chmod_SOURCES = chmod.c +chmod_OBJECTS = chmod.$(OBJEXT) +chmod_LDADD = $(LDADD) +chmod_DEPENDENCIES = libtests.a +chown_SOURCES = chown.c +chown_OBJECTS = chown.$(OBJEXT) +chown_LDADD = $(LDADD) +chown_DEPENDENCIES = libtests.a +chown32_SOURCES = chown32.c +chown32_OBJECTS = chown32.$(OBJEXT) +chown32_LDADD = $(LDADD) +chown32_DEPENDENCIES = libtests.a +chroot_SOURCES = chroot.c +chroot_OBJECTS = chroot.$(OBJEXT) +chroot_LDADD = $(LDADD) +chroot_DEPENDENCIES = libtests.a +clock_adjtime_SOURCES = clock_adjtime.c +clock_adjtime_OBJECTS = clock_adjtime.$(OBJEXT) +clock_adjtime_LDADD = $(LDADD) +clock_adjtime_DEPENDENCIES = libtests.a +clock_nanosleep_SOURCES = clock_nanosleep.c +clock_nanosleep_OBJECTS = clock_nanosleep.$(OBJEXT) +clock_nanosleep_LDADD = $(LDADD) +clock_nanosleep_DEPENDENCIES = libtests.a +clock_xettime_SOURCES = clock_xettime.c +clock_xettime_OBJECTS = clock_xettime.$(OBJEXT) +clock_xettime_DEPENDENCIES = $(LDADD) +copy_file_range_SOURCES = copy_file_range.c +copy_file_range_OBJECTS = copy_file_range.$(OBJEXT) +copy_file_range_LDADD = $(LDADD) +copy_file_range_DEPENDENCIES = libtests.a +count_f_SOURCES = count-f.c +count_f_OBJECTS = count-f.$(OBJEXT) +count_f_DEPENDENCIES = $(LDADD) +creat_SOURCES = creat.c +creat_OBJECTS = creat.$(OBJEXT) +creat_LDADD = $(LDADD) +creat_DEPENDENCIES = libtests.a +delete_module_SOURCES = delete_module.c +delete_module_OBJECTS = delete_module.$(OBJEXT) +delete_module_LDADD = $(LDADD) +delete_module_DEPENDENCIES = libtests.a +dup_SOURCES = dup.c +dup_OBJECTS = dup.$(OBJEXT) +dup_LDADD = $(LDADD) +dup_DEPENDENCIES = libtests.a +dup2_SOURCES = dup2.c +dup2_OBJECTS = dup2.$(OBJEXT) +dup2_LDADD = $(LDADD) +dup2_DEPENDENCIES = libtests.a +dup3_SOURCES = dup3.c +dup3_OBJECTS = dup3.$(OBJEXT) +dup3_LDADD = $(LDADD) +dup3_DEPENDENCIES = libtests.a +epoll_create_SOURCES = epoll_create.c +epoll_create_OBJECTS = epoll_create.$(OBJEXT) +epoll_create_LDADD = $(LDADD) +epoll_create_DEPENDENCIES = libtests.a +epoll_create1_SOURCES = epoll_create1.c +epoll_create1_OBJECTS = epoll_create1.$(OBJEXT) +epoll_create1_LDADD = $(LDADD) +epoll_create1_DEPENDENCIES = libtests.a +epoll_ctl_SOURCES = epoll_ctl.c +epoll_ctl_OBJECTS = epoll_ctl.$(OBJEXT) +epoll_ctl_LDADD = $(LDADD) +epoll_ctl_DEPENDENCIES = libtests.a +epoll_pwait_SOURCES = epoll_pwait.c +epoll_pwait_OBJECTS = epoll_pwait.$(OBJEXT) +epoll_pwait_LDADD = $(LDADD) +epoll_pwait_DEPENDENCIES = libtests.a +epoll_wait_SOURCES = epoll_wait.c +epoll_wait_OBJECTS = epoll_wait.$(OBJEXT) +epoll_wait_LDADD = $(LDADD) +epoll_wait_DEPENDENCIES = libtests.a +erestartsys_SOURCES = erestartsys.c +erestartsys_OBJECTS = erestartsys.$(OBJEXT) +erestartsys_LDADD = $(LDADD) +erestartsys_DEPENDENCIES = libtests.a +eventfd_SOURCES = eventfd.c +eventfd_OBJECTS = eventfd.$(OBJEXT) +eventfd_LDADD = $(LDADD) +eventfd_DEPENDENCIES = libtests.a +execve_SOURCES = execve.c +execve_OBJECTS = execve.$(OBJEXT) +execve_LDADD = $(LDADD) +execve_DEPENDENCIES = libtests.a +execve_v_SOURCES = execve-v.c +execve_v_OBJECTS = execve-v.$(OBJEXT) +execve_v_LDADD = $(LDADD) +execve_v_DEPENDENCIES = libtests.a +execveat_SOURCES = execveat.c +execveat_OBJECTS = execveat.$(OBJEXT) +execveat_LDADD = $(LDADD) +execveat_DEPENDENCIES = libtests.a +execveat_v_SOURCES = execveat-v.c +execveat_v_OBJECTS = execveat-v.$(OBJEXT) +execveat_v_LDADD = $(LDADD) +execveat_v_DEPENDENCIES = libtests.a +faccessat_SOURCES = faccessat.c +faccessat_OBJECTS = faccessat.$(OBJEXT) +faccessat_LDADD = $(LDADD) +faccessat_DEPENDENCIES = libtests.a +fadvise64_SOURCES = fadvise64.c +fadvise64_OBJECTS = fadvise64.$(OBJEXT) +fadvise64_LDADD = $(LDADD) +fadvise64_DEPENDENCIES = libtests.a +fadvise64_64_SOURCES = fadvise64_64.c +fadvise64_64_OBJECTS = fadvise64_64.$(OBJEXT) +fadvise64_64_LDADD = $(LDADD) +fadvise64_64_DEPENDENCIES = libtests.a +fallocate_SOURCES = fallocate.c +fallocate_OBJECTS = fallocate.$(OBJEXT) +fallocate_LDADD = $(LDADD) +fallocate_DEPENDENCIES = libtests.a +fanotify_init_SOURCES = fanotify_init.c +fanotify_init_OBJECTS = fanotify_init.$(OBJEXT) +fanotify_init_LDADD = $(LDADD) +fanotify_init_DEPENDENCIES = libtests.a +fanotify_mark_SOURCES = fanotify_mark.c +fanotify_mark_OBJECTS = fanotify_mark.$(OBJEXT) +fanotify_mark_LDADD = $(LDADD) +fanotify_mark_DEPENDENCIES = libtests.a +fchdir_SOURCES = fchdir.c +fchdir_OBJECTS = fchdir.$(OBJEXT) +fchdir_LDADD = $(LDADD) +fchdir_DEPENDENCIES = libtests.a +fchmod_SOURCES = fchmod.c +fchmod_OBJECTS = fchmod.$(OBJEXT) +fchmod_LDADD = $(LDADD) +fchmod_DEPENDENCIES = libtests.a +fchmodat_SOURCES = fchmodat.c +fchmodat_OBJECTS = fchmodat.$(OBJEXT) +fchmodat_LDADD = $(LDADD) +fchmodat_DEPENDENCIES = libtests.a +fchown_SOURCES = fchown.c +fchown_OBJECTS = fchown.$(OBJEXT) +fchown_LDADD = $(LDADD) +fchown_DEPENDENCIES = libtests.a +fchown32_SOURCES = fchown32.c +fchown32_OBJECTS = fchown32.$(OBJEXT) +fchown32_LDADD = $(LDADD) +fchown32_DEPENDENCIES = libtests.a +fchownat_SOURCES = fchownat.c +fchownat_OBJECTS = fchownat.$(OBJEXT) +fchownat_LDADD = $(LDADD) +fchownat_DEPENDENCIES = libtests.a +fcntl_SOURCES = fcntl.c +fcntl_OBJECTS = fcntl.$(OBJEXT) +fcntl_LDADD = $(LDADD) +fcntl_DEPENDENCIES = libtests.a +fcntl64_SOURCES = fcntl64.c +fcntl64_OBJECTS = fcntl64.$(OBJEXT) +fcntl64_LDADD = $(LDADD) +fcntl64_DEPENDENCIES = libtests.a +fdatasync_SOURCES = fdatasync.c +fdatasync_OBJECTS = fdatasync.$(OBJEXT) +fdatasync_LDADD = $(LDADD) +fdatasync_DEPENDENCIES = libtests.a +file_handle_SOURCES = file_handle.c +file_handle_OBJECTS = file_handle.$(OBJEXT) +file_handle_LDADD = $(LDADD) +file_handle_DEPENDENCIES = libtests.a +file_ioctl_SOURCES = file_ioctl.c +file_ioctl_OBJECTS = file_ioctl.$(OBJEXT) +file_ioctl_LDADD = $(LDADD) +file_ioctl_DEPENDENCIES = libtests.a +filter_unavailable_SOURCES = filter-unavailable.c +filter_unavailable_OBJECTS = filter-unavailable.$(OBJEXT) +filter_unavailable_DEPENDENCIES = $(LDADD) +finit_module_SOURCES = finit_module.c +finit_module_OBJECTS = finit_module.$(OBJEXT) +finit_module_LDADD = $(LDADD) +finit_module_DEPENDENCIES = libtests.a +flock_SOURCES = flock.c +flock_OBJECTS = flock.$(OBJEXT) +flock_LDADD = $(LDADD) +flock_DEPENDENCIES = libtests.a +fork_f_SOURCES = fork-f.c +fork_f_OBJECTS = fork-f.$(OBJEXT) +fork_f_LDADD = $(LDADD) +fork_f_DEPENDENCIES = libtests.a +fstat_SOURCES = fstat.c +fstat_OBJECTS = fstat.$(OBJEXT) +fstat_LDADD = $(LDADD) +fstat_DEPENDENCIES = libtests.a +fstat64_SOURCES = fstat64.c +fstat64_OBJECTS = fstat64-fstat64.$(OBJEXT) +fstat64_LDADD = $(LDADD) +fstat64_DEPENDENCIES = libtests.a +fstatat64_SOURCES = fstatat64.c +fstatat64_OBJECTS = fstatat64-fstatat64.$(OBJEXT) +fstatat64_LDADD = $(LDADD) +fstatat64_DEPENDENCIES = libtests.a +fstatfs_SOURCES = fstatfs.c +fstatfs_OBJECTS = fstatfs.$(OBJEXT) +fstatfs_LDADD = $(LDADD) +fstatfs_DEPENDENCIES = libtests.a +fstatfs64_SOURCES = fstatfs64.c +fstatfs64_OBJECTS = fstatfs64.$(OBJEXT) +fstatfs64_LDADD = $(LDADD) +fstatfs64_DEPENDENCIES = libtests.a +fsync_SOURCES = fsync.c +fsync_OBJECTS = fsync.$(OBJEXT) +fsync_LDADD = $(LDADD) +fsync_DEPENDENCIES = libtests.a +ftruncate_SOURCES = ftruncate.c +ftruncate_OBJECTS = ftruncate.$(OBJEXT) +ftruncate_LDADD = $(LDADD) +ftruncate_DEPENDENCIES = libtests.a +ftruncate64_SOURCES = ftruncate64.c +ftruncate64_OBJECTS = ftruncate64-ftruncate64.$(OBJEXT) +ftruncate64_LDADD = $(LDADD) +ftruncate64_DEPENDENCIES = libtests.a +futex_SOURCES = futex.c +futex_OBJECTS = futex.$(OBJEXT) +futex_LDADD = $(LDADD) +futex_DEPENDENCIES = libtests.a +futimesat_SOURCES = futimesat.c +futimesat_OBJECTS = futimesat.$(OBJEXT) +futimesat_LDADD = $(LDADD) +futimesat_DEPENDENCIES = libtests.a +get_mempolicy_SOURCES = get_mempolicy.c +get_mempolicy_OBJECTS = get_mempolicy.$(OBJEXT) +get_mempolicy_LDADD = $(LDADD) +get_mempolicy_DEPENDENCIES = libtests.a +getcpu_SOURCES = getcpu.c +getcpu_OBJECTS = getcpu.$(OBJEXT) +getcpu_LDADD = $(LDADD) +getcpu_DEPENDENCIES = libtests.a +getcwd_SOURCES = getcwd.c +getcwd_OBJECTS = getcwd.$(OBJEXT) +getcwd_LDADD = $(LDADD) +getcwd_DEPENDENCIES = libtests.a +getdents_SOURCES = getdents.c +getdents_OBJECTS = getdents.$(OBJEXT) +getdents_LDADD = $(LDADD) +getdents_DEPENDENCIES = libtests.a +getdents64_SOURCES = getdents64.c +getdents64_OBJECTS = getdents64.$(OBJEXT) +getdents64_LDADD = $(LDADD) +getdents64_DEPENDENCIES = libtests.a +getegid_SOURCES = getegid.c +getegid_OBJECTS = getegid.$(OBJEXT) +getegid_LDADD = $(LDADD) +getegid_DEPENDENCIES = libtests.a +getegid32_SOURCES = getegid32.c +getegid32_OBJECTS = getegid32.$(OBJEXT) +getegid32_LDADD = $(LDADD) +getegid32_DEPENDENCIES = libtests.a +geteuid_SOURCES = geteuid.c +geteuid_OBJECTS = geteuid.$(OBJEXT) +geteuid_LDADD = $(LDADD) +geteuid_DEPENDENCIES = libtests.a +geteuid32_SOURCES = geteuid32.c +geteuid32_OBJECTS = geteuid32.$(OBJEXT) +geteuid32_LDADD = $(LDADD) +geteuid32_DEPENDENCIES = libtests.a +getgid_SOURCES = getgid.c +getgid_OBJECTS = getgid.$(OBJEXT) +getgid_LDADD = $(LDADD) +getgid_DEPENDENCIES = libtests.a +getgid32_SOURCES = getgid32.c +getgid32_OBJECTS = getgid32.$(OBJEXT) +getgid32_LDADD = $(LDADD) +getgid32_DEPENDENCIES = libtests.a +getgroups_SOURCES = getgroups.c +getgroups_OBJECTS = getgroups.$(OBJEXT) +getgroups_LDADD = $(LDADD) +getgroups_DEPENDENCIES = libtests.a +getgroups32_SOURCES = getgroups32.c +getgroups32_OBJECTS = getgroups32.$(OBJEXT) +getgroups32_LDADD = $(LDADD) +getgroups32_DEPENDENCIES = libtests.a +getpeername_SOURCES = getpeername.c +getpeername_OBJECTS = getpeername.$(OBJEXT) +getpeername_LDADD = $(LDADD) +getpeername_DEPENDENCIES = libtests.a +getpgrp_SOURCES = getpgrp.c +getpgrp_OBJECTS = getpgrp.$(OBJEXT) +getpgrp_LDADD = $(LDADD) +getpgrp_DEPENDENCIES = libtests.a +getrandom_SOURCES = getrandom.c +getrandom_OBJECTS = getrandom.$(OBJEXT) +getrandom_LDADD = $(LDADD) +getrandom_DEPENDENCIES = libtests.a +getresgid_SOURCES = getresgid.c +getresgid_OBJECTS = getresgid.$(OBJEXT) +getresgid_LDADD = $(LDADD) +getresgid_DEPENDENCIES = libtests.a +getresgid32_SOURCES = getresgid32.c +getresgid32_OBJECTS = getresgid32.$(OBJEXT) +getresgid32_LDADD = $(LDADD) +getresgid32_DEPENDENCIES = libtests.a +getresuid_SOURCES = getresuid.c +getresuid_OBJECTS = getresuid.$(OBJEXT) +getresuid_LDADD = $(LDADD) +getresuid_DEPENDENCIES = libtests.a +getresuid32_SOURCES = getresuid32.c +getresuid32_OBJECTS = getresuid32.$(OBJEXT) +getresuid32_LDADD = $(LDADD) +getresuid32_DEPENDENCIES = libtests.a +getrlimit_SOURCES = getrlimit.c +getrlimit_OBJECTS = getrlimit.$(OBJEXT) +getrlimit_LDADD = $(LDADD) +getrlimit_DEPENDENCIES = libtests.a +getrusage_SOURCES = getrusage.c +getrusage_OBJECTS = getrusage.$(OBJEXT) +getrusage_LDADD = $(LDADD) +getrusage_DEPENDENCIES = libtests.a +getsid_SOURCES = getsid.c +getsid_OBJECTS = getsid.$(OBJEXT) +getsid_LDADD = $(LDADD) +getsid_DEPENDENCIES = libtests.a +getsockname_SOURCES = getsockname.c +getsockname_OBJECTS = getsockname.$(OBJEXT) +getsockname_LDADD = $(LDADD) +getsockname_DEPENDENCIES = libtests.a +getuid_SOURCES = getuid.c +getuid_OBJECTS = getuid.$(OBJEXT) +getuid_LDADD = $(LDADD) +getuid_DEPENDENCIES = libtests.a +getuid32_SOURCES = getuid32.c +getuid32_OBJECTS = getuid32.$(OBJEXT) +getuid32_LDADD = $(LDADD) +getuid32_DEPENDENCIES = libtests.a +getxxid_SOURCES = getxxid.c +getxxid_OBJECTS = getxxid.$(OBJEXT) +getxxid_LDADD = $(LDADD) +getxxid_DEPENDENCIES = libtests.a +inet_cmsg_SOURCES = inet-cmsg.c +inet_cmsg_OBJECTS = inet-cmsg.$(OBJEXT) +inet_cmsg_LDADD = $(LDADD) +inet_cmsg_DEPENDENCIES = libtests.a +init_module_SOURCES = init_module.c +init_module_OBJECTS = init_module.$(OBJEXT) +init_module_LDADD = $(LDADD) +init_module_DEPENDENCIES = libtests.a +inotify_SOURCES = inotify.c +inotify_OBJECTS = inotify.$(OBJEXT) +inotify_LDADD = $(LDADD) +inotify_DEPENDENCIES = libtests.a +inotify_init1_SOURCES = inotify_init1.c +inotify_init1_OBJECTS = inotify_init1.$(OBJEXT) +inotify_init1_LDADD = $(LDADD) +inotify_init1_DEPENDENCIES = libtests.a +ioctl_SOURCES = ioctl.c +ioctl_OBJECTS = ioctl.$(OBJEXT) +ioctl_LDADD = $(LDADD) +ioctl_DEPENDENCIES = libtests.a +ioctl_block_SOURCES = ioctl_block.c +ioctl_block_OBJECTS = ioctl_block.$(OBJEXT) +ioctl_block_LDADD = $(LDADD) +ioctl_block_DEPENDENCIES = libtests.a +ioctl_dm_SOURCES = ioctl_dm.c +ioctl_dm_OBJECTS = ioctl_dm.$(OBJEXT) +ioctl_dm_LDADD = $(LDADD) +ioctl_dm_DEPENDENCIES = libtests.a +ioctl_dm_v_SOURCES = ioctl_dm-v.c +ioctl_dm_v_OBJECTS = ioctl_dm-v.$(OBJEXT) +ioctl_dm_v_LDADD = $(LDADD) +ioctl_dm_v_DEPENDENCIES = libtests.a +ioctl_evdev_SOURCES = ioctl_evdev.c +ioctl_evdev_OBJECTS = ioctl_evdev.$(OBJEXT) +ioctl_evdev_LDADD = $(LDADD) +ioctl_evdev_DEPENDENCIES = libtests.a +ioctl_evdev_v_SOURCES = ioctl_evdev-v.c +ioctl_evdev_v_OBJECTS = ioctl_evdev-v.$(OBJEXT) +ioctl_evdev_v_LDADD = $(LDADD) +ioctl_evdev_v_DEPENDENCIES = libtests.a +ioctl_loop_SOURCES = ioctl_loop.c +ioctl_loop_OBJECTS = ioctl_loop.$(OBJEXT) +ioctl_loop_LDADD = $(LDADD) +ioctl_loop_DEPENDENCIES = libtests.a +ioctl_loop_nv_SOURCES = ioctl_loop-nv.c +ioctl_loop_nv_OBJECTS = ioctl_loop-nv.$(OBJEXT) +ioctl_loop_nv_LDADD = $(LDADD) +ioctl_loop_nv_DEPENDENCIES = libtests.a +ioctl_loop_v_SOURCES = ioctl_loop-v.c +ioctl_loop_v_OBJECTS = ioctl_loop-v.$(OBJEXT) +ioctl_loop_v_LDADD = $(LDADD) +ioctl_loop_v_DEPENDENCIES = libtests.a +ioctl_mtd_SOURCES = ioctl_mtd.c +ioctl_mtd_OBJECTS = ioctl_mtd.$(OBJEXT) +ioctl_mtd_LDADD = $(LDADD) +ioctl_mtd_DEPENDENCIES = libtests.a +ioctl_rtc_SOURCES = ioctl_rtc.c +ioctl_rtc_OBJECTS = ioctl_rtc.$(OBJEXT) +ioctl_rtc_LDADD = $(LDADD) +ioctl_rtc_DEPENDENCIES = libtests.a +ioctl_rtc_v_SOURCES = ioctl_rtc-v.c +ioctl_rtc_v_OBJECTS = ioctl_rtc-v.$(OBJEXT) +ioctl_rtc_v_LDADD = $(LDADD) +ioctl_rtc_v_DEPENDENCIES = libtests.a +ioctl_scsi_SOURCES = ioctl_scsi.c +ioctl_scsi_OBJECTS = ioctl_scsi.$(OBJEXT) +ioctl_scsi_LDADD = $(LDADD) +ioctl_scsi_DEPENDENCIES = libtests.a +ioctl_sg_io_v3_SOURCES = ioctl_sg_io_v3.c +ioctl_sg_io_v3_OBJECTS = ioctl_sg_io_v3.$(OBJEXT) +ioctl_sg_io_v3_LDADD = $(LDADD) +ioctl_sg_io_v3_DEPENDENCIES = libtests.a +ioctl_sg_io_v4_SOURCES = ioctl_sg_io_v4.c +ioctl_sg_io_v4_OBJECTS = ioctl_sg_io_v4.$(OBJEXT) +ioctl_sg_io_v4_LDADD = $(LDADD) +ioctl_sg_io_v4_DEPENDENCIES = libtests.a +ioctl_sock_gifconf_SOURCES = ioctl_sock_gifconf.c +ioctl_sock_gifconf_OBJECTS = ioctl_sock_gifconf.$(OBJEXT) +ioctl_sock_gifconf_LDADD = $(LDADD) +ioctl_sock_gifconf_DEPENDENCIES = libtests.a +ioctl_uffdio_SOURCES = ioctl_uffdio.c +ioctl_uffdio_OBJECTS = ioctl_uffdio.$(OBJEXT) +ioctl_uffdio_LDADD = $(LDADD) +ioctl_uffdio_DEPENDENCIES = libtests.a +ioctl_v4l2_SOURCES = ioctl_v4l2.c +ioctl_v4l2_OBJECTS = ioctl_v4l2.$(OBJEXT) +ioctl_v4l2_LDADD = $(LDADD) +ioctl_v4l2_DEPENDENCIES = libtests.a +ioperm_SOURCES = ioperm.c +ioperm_OBJECTS = ioperm.$(OBJEXT) +ioperm_LDADD = $(LDADD) +ioperm_DEPENDENCIES = libtests.a +iopl_SOURCES = iopl.c +iopl_OBJECTS = iopl.$(OBJEXT) +iopl_LDADD = $(LDADD) +iopl_DEPENDENCIES = libtests.a +ioprio_SOURCES = ioprio.c +ioprio_OBJECTS = ioprio.$(OBJEXT) +ioprio_LDADD = $(LDADD) +ioprio_DEPENDENCIES = libtests.a +ip_mreq_SOURCES = ip_mreq.c +ip_mreq_OBJECTS = ip_mreq.$(OBJEXT) +ip_mreq_LDADD = $(LDADD) +ip_mreq_DEPENDENCIES = libtests.a +ipc_SOURCES = ipc.c +ipc_OBJECTS = ipc.$(OBJEXT) +ipc_LDADD = $(LDADD) +ipc_DEPENDENCIES = libtests.a +ipc_msg_SOURCES = ipc_msg.c +ipc_msg_OBJECTS = ipc_msg.$(OBJEXT) +ipc_msg_LDADD = $(LDADD) +ipc_msg_DEPENDENCIES = libtests.a +ipc_msgbuf_SOURCES = ipc_msgbuf.c +ipc_msgbuf_OBJECTS = ipc_msgbuf.$(OBJEXT) +ipc_msgbuf_LDADD = $(LDADD) +ipc_msgbuf_DEPENDENCIES = libtests.a +ipc_sem_SOURCES = ipc_sem.c +ipc_sem_OBJECTS = ipc_sem.$(OBJEXT) +ipc_sem_LDADD = $(LDADD) +ipc_sem_DEPENDENCIES = libtests.a +ipc_shm_SOURCES = ipc_shm.c +ipc_shm_OBJECTS = ipc_shm.$(OBJEXT) +ipc_shm_LDADD = $(LDADD) +ipc_shm_DEPENDENCIES = libtests.a +kcmp_SOURCES = kcmp.c +kcmp_OBJECTS = kcmp.$(OBJEXT) +kcmp_LDADD = $(LDADD) +kcmp_DEPENDENCIES = libtests.a +kexec_file_load_SOURCES = kexec_file_load.c +kexec_file_load_OBJECTS = kexec_file_load.$(OBJEXT) +kexec_file_load_LDADD = $(LDADD) +kexec_file_load_DEPENDENCIES = libtests.a +kexec_load_SOURCES = kexec_load.c +kexec_load_OBJECTS = kexec_load.$(OBJEXT) +kexec_load_LDADD = $(LDADD) +kexec_load_DEPENDENCIES = libtests.a +keyctl_SOURCES = keyctl.c +keyctl_OBJECTS = keyctl.$(OBJEXT) +keyctl_LDADD = $(LDADD) +keyctl_DEPENDENCIES = libtests.a +kill_SOURCES = kill.c +kill_OBJECTS = kill.$(OBJEXT) +kill_LDADD = $(LDADD) +kill_DEPENDENCIES = libtests.a +ksysent_SOURCES = ksysent.c +ksysent_OBJECTS = ksysent.$(OBJEXT) +ksysent_LDADD = $(LDADD) +ksysent_DEPENDENCIES = libtests.a +lchown_SOURCES = lchown.c +lchown_OBJECTS = lchown.$(OBJEXT) +lchown_LDADD = $(LDADD) +lchown_DEPENDENCIES = libtests.a +lchown32_SOURCES = lchown32.c +lchown32_OBJECTS = lchown32.$(OBJEXT) +lchown32_LDADD = $(LDADD) +lchown32_DEPENDENCIES = libtests.a +link_SOURCES = link.c +link_OBJECTS = link.$(OBJEXT) +link_LDADD = $(LDADD) +link_DEPENDENCIES = libtests.a +linkat_SOURCES = linkat.c +linkat_OBJECTS = linkat.$(OBJEXT) +linkat_LDADD = $(LDADD) +linkat_DEPENDENCIES = libtests.a +llseek_SOURCES = llseek.c +llseek_OBJECTS = llseek.$(OBJEXT) +llseek_LDADD = $(LDADD) +llseek_DEPENDENCIES = libtests.a +lookup_dcookie_SOURCES = lookup_dcookie.c +lookup_dcookie_OBJECTS = lookup_dcookie.$(OBJEXT) +lookup_dcookie_LDADD = $(LDADD) +lookup_dcookie_DEPENDENCIES = libtests.a +lseek_SOURCES = lseek.c +lseek_OBJECTS = lseek.$(OBJEXT) +lseek_LDADD = $(LDADD) +lseek_DEPENDENCIES = libtests.a +lstat_SOURCES = lstat.c +lstat_OBJECTS = lstat.$(OBJEXT) +lstat_LDADD = $(LDADD) +lstat_DEPENDENCIES = libtests.a +lstat64_SOURCES = lstat64.c +lstat64_OBJECTS = lstat64-lstat64.$(OBJEXT) +lstat64_LDADD = $(LDADD) +lstat64_DEPENDENCIES = libtests.a +mbind_SOURCES = mbind.c +mbind_OBJECTS = mbind.$(OBJEXT) +mbind_LDADD = $(LDADD) +mbind_DEPENDENCIES = libtests.a +membarrier_SOURCES = membarrier.c +membarrier_OBJECTS = membarrier.$(OBJEXT) +membarrier_LDADD = $(LDADD) +membarrier_DEPENDENCIES = libtests.a +memfd_create_SOURCES = memfd_create.c +memfd_create_OBJECTS = memfd_create.$(OBJEXT) +memfd_create_LDADD = $(LDADD) +memfd_create_DEPENDENCIES = libtests.a +migrate_pages_SOURCES = migrate_pages.c +migrate_pages_OBJECTS = migrate_pages.$(OBJEXT) +migrate_pages_LDADD = $(LDADD) +migrate_pages_DEPENDENCIES = libtests.a +mincore_SOURCES = mincore.c +mincore_OBJECTS = mincore.$(OBJEXT) +mincore_LDADD = $(LDADD) +mincore_DEPENDENCIES = libtests.a +mkdir_SOURCES = mkdir.c +mkdir_OBJECTS = mkdir.$(OBJEXT) +mkdir_LDADD = $(LDADD) +mkdir_DEPENDENCIES = libtests.a +mkdirat_SOURCES = mkdirat.c +mkdirat_OBJECTS = mkdirat.$(OBJEXT) +mkdirat_LDADD = $(LDADD) +mkdirat_DEPENDENCIES = libtests.a +mknod_SOURCES = mknod.c +mknod_OBJECTS = mknod.$(OBJEXT) +mknod_LDADD = $(LDADD) +mknod_DEPENDENCIES = libtests.a +mknodat_SOURCES = mknodat.c +mknodat_OBJECTS = mknodat.$(OBJEXT) +mknodat_LDADD = $(LDADD) +mknodat_DEPENDENCIES = libtests.a +mlock_SOURCES = mlock.c +mlock_OBJECTS = mlock.$(OBJEXT) +mlock_LDADD = $(LDADD) +mlock_DEPENDENCIES = libtests.a +mlock2_SOURCES = mlock2.c +mlock2_OBJECTS = mlock2.$(OBJEXT) +mlock2_LDADD = $(LDADD) +mlock2_DEPENDENCIES = libtests.a +mlockall_SOURCES = mlockall.c +mlockall_OBJECTS = mlockall.$(OBJEXT) +mlockall_LDADD = $(LDADD) +mlockall_DEPENDENCIES = libtests.a +mmap_SOURCES = mmap.c +mmap_OBJECTS = mmap.$(OBJEXT) +mmap_LDADD = $(LDADD) +mmap_DEPENDENCIES = libtests.a +mmap64_SOURCES = mmap64.c +mmap64_OBJECTS = mmap64-mmap64.$(OBJEXT) +mmap64_LDADD = $(LDADD) +mmap64_DEPENDENCIES = libtests.a +mmsg_SOURCES = mmsg.c +mmsg_OBJECTS = mmsg.$(OBJEXT) +mmsg_LDADD = $(LDADD) +mmsg_DEPENDENCIES = libtests.a +mmsg_silent_SOURCES = mmsg-silent.c +mmsg_silent_OBJECTS = mmsg-silent.$(OBJEXT) +mmsg_silent_LDADD = $(LDADD) +mmsg_silent_DEPENDENCIES = libtests.a +mmsg_name_SOURCES = mmsg_name.c +mmsg_name_OBJECTS = mmsg_name.$(OBJEXT) +mmsg_name_LDADD = $(LDADD) +mmsg_name_DEPENDENCIES = libtests.a +mmsg_name_v_SOURCES = mmsg_name-v.c +mmsg_name_v_OBJECTS = mmsg_name-v.$(OBJEXT) +mmsg_name_v_LDADD = $(LDADD) +mmsg_name_v_DEPENDENCIES = libtests.a +mount_SOURCES = mount.c +mount_OBJECTS = mount.$(OBJEXT) +mount_LDADD = $(LDADD) +mount_DEPENDENCIES = libtests.a +move_pages_SOURCES = move_pages.c +move_pages_OBJECTS = move_pages.$(OBJEXT) +move_pages_LDADD = $(LDADD) +move_pages_DEPENDENCIES = libtests.a +mq_SOURCES = mq.c +mq_OBJECTS = mq.$(OBJEXT) +mq_DEPENDENCIES = $(LDADD) +mq_sendrecv_SOURCES = mq_sendrecv.c +mq_sendrecv_OBJECTS = mq_sendrecv.$(OBJEXT) +mq_sendrecv_DEPENDENCIES = $(LDADD) +mq_sendrecv_read_SOURCES = mq_sendrecv-read.c +mq_sendrecv_read_OBJECTS = mq_sendrecv-read.$(OBJEXT) +mq_sendrecv_read_DEPENDENCIES = $(LDADD) +mq_sendrecv_write_SOURCES = mq_sendrecv-write.c +mq_sendrecv_write_OBJECTS = mq_sendrecv-write.$(OBJEXT) +mq_sendrecv_write_DEPENDENCIES = $(LDADD) +msg_control_SOURCES = msg_control.c +msg_control_OBJECTS = msg_control.$(OBJEXT) +msg_control_LDADD = $(LDADD) +msg_control_DEPENDENCIES = libtests.a +msg_control_v_SOURCES = msg_control-v.c +msg_control_v_OBJECTS = msg_control-v.$(OBJEXT) +msg_control_v_LDADD = $(LDADD) +msg_control_v_DEPENDENCIES = libtests.a +msg_name_SOURCES = msg_name.c +msg_name_OBJECTS = msg_name.$(OBJEXT) +msg_name_LDADD = $(LDADD) +msg_name_DEPENDENCIES = libtests.a +munlockall_SOURCES = munlockall.c +munlockall_OBJECTS = munlockall.$(OBJEXT) +munlockall_LDADD = $(LDADD) +munlockall_DEPENDENCIES = libtests.a +nanosleep_SOURCES = nanosleep.c +nanosleep_OBJECTS = nanosleep.$(OBJEXT) +nanosleep_LDADD = $(LDADD) +nanosleep_DEPENDENCIES = libtests.a +net_accept_connect_SOURCES = net-accept-connect.c +net_accept_connect_OBJECTS = net-accept-connect.$(OBJEXT) +net_accept_connect_LDADD = $(LDADD) +net_accept_connect_DEPENDENCIES = libtests.a +net_icmp_filter_SOURCES = net-icmp_filter.c +net_icmp_filter_OBJECTS = net-icmp_filter.$(OBJEXT) +net_icmp_filter_LDADD = $(LDADD) +net_icmp_filter_DEPENDENCIES = libtests.a +net_sockaddr_SOURCES = net-sockaddr.c +net_sockaddr_OBJECTS = net-sockaddr.$(OBJEXT) +net_sockaddr_LDADD = $(LDADD) +net_sockaddr_DEPENDENCIES = libtests.a +net_y_unix_SOURCES = net-y-unix.c +net_y_unix_OBJECTS = net-y-unix.$(OBJEXT) +net_y_unix_LDADD = $(LDADD) +net_y_unix_DEPENDENCIES = libtests.a +net_yy_inet_SOURCES = net-yy-inet.c +net_yy_inet_OBJECTS = net-yy-inet.$(OBJEXT) +net_yy_inet_LDADD = $(LDADD) +net_yy_inet_DEPENDENCIES = libtests.a +net_yy_netlink_SOURCES = net-yy-netlink.c +net_yy_netlink_OBJECTS = net-yy-netlink.$(OBJEXT) +net_yy_netlink_LDADD = $(LDADD) +net_yy_netlink_DEPENDENCIES = libtests.a +net_yy_unix_SOURCES = net-yy-unix.c +net_yy_unix_OBJECTS = net-yy-unix.$(OBJEXT) +net_yy_unix_LDADD = $(LDADD) +net_yy_unix_DEPENDENCIES = libtests.a +netlink_inet_diag_SOURCES = netlink_inet_diag.c +netlink_inet_diag_OBJECTS = netlink_inet_diag.$(OBJEXT) +netlink_inet_diag_LDADD = $(LDADD) +netlink_inet_diag_DEPENDENCIES = libtests.a +netlink_netlink_diag_SOURCES = netlink_netlink_diag.c +netlink_netlink_diag_OBJECTS = netlink_netlink_diag.$(OBJEXT) +netlink_netlink_diag_LDADD = $(LDADD) +netlink_netlink_diag_DEPENDENCIES = libtests.a +netlink_protocol_SOURCES = netlink_protocol.c +netlink_protocol_OBJECTS = netlink_protocol.$(OBJEXT) +netlink_protocol_LDADD = $(LDADD) +netlink_protocol_DEPENDENCIES = libtests.a +netlink_unix_diag_SOURCES = netlink_unix_diag.c +netlink_unix_diag_OBJECTS = netlink_unix_diag.$(OBJEXT) +netlink_unix_diag_LDADD = $(LDADD) +netlink_unix_diag_DEPENDENCIES = libtests.a +newfstatat_SOURCES = newfstatat.c +newfstatat_OBJECTS = newfstatat-newfstatat.$(OBJEXT) +newfstatat_LDADD = $(LDADD) +newfstatat_DEPENDENCIES = libtests.a +nsyscalls_SOURCES = nsyscalls.c +nsyscalls_OBJECTS = nsyscalls.$(OBJEXT) +nsyscalls_LDADD = $(LDADD) +nsyscalls_DEPENDENCIES = libtests.a +old_mmap_SOURCES = old_mmap.c +old_mmap_OBJECTS = old_mmap.$(OBJEXT) +old_mmap_LDADD = $(LDADD) +old_mmap_DEPENDENCIES = libtests.a +oldfstat_SOURCES = oldfstat.c +oldfstat_OBJECTS = oldfstat.$(OBJEXT) +oldfstat_LDADD = $(LDADD) +oldfstat_DEPENDENCIES = libtests.a +oldlstat_SOURCES = oldlstat.c +oldlstat_OBJECTS = oldlstat.$(OBJEXT) +oldlstat_LDADD = $(LDADD) +oldlstat_DEPENDENCIES = libtests.a +oldselect_SOURCES = oldselect.c +oldselect_OBJECTS = oldselect.$(OBJEXT) +oldselect_LDADD = $(LDADD) +oldselect_DEPENDENCIES = libtests.a +oldstat_SOURCES = oldstat.c +oldstat_OBJECTS = oldstat.$(OBJEXT) +oldstat_LDADD = $(LDADD) +oldstat_DEPENDENCIES = libtests.a +open_SOURCES = open.c +open_OBJECTS = open.$(OBJEXT) +open_LDADD = $(LDADD) +open_DEPENDENCIES = libtests.a +openat_SOURCES = openat.c +openat_OBJECTS = openat.$(OBJEXT) +openat_LDADD = $(LDADD) +openat_DEPENDENCIES = libtests.a +pause_SOURCES = pause.c +pause_OBJECTS = pause.$(OBJEXT) +pause_LDADD = $(LDADD) +pause_DEPENDENCIES = libtests.a +pc_SOURCES = pc.c +pc_OBJECTS = pc.$(OBJEXT) +am__DEPENDENCIES_1 = +pc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(LDADD) +perf_event_open_SOURCES = perf_event_open.c +perf_event_open_OBJECTS = perf_event_open.$(OBJEXT) +perf_event_open_LDADD = $(LDADD) +perf_event_open_DEPENDENCIES = libtests.a +perf_event_open_nonverbose_SOURCES = perf_event_open_nonverbose.c +perf_event_open_nonverbose_OBJECTS = \ + perf_event_open_nonverbose.$(OBJEXT) +perf_event_open_nonverbose_LDADD = $(LDADD) +perf_event_open_nonverbose_DEPENDENCIES = libtests.a +perf_event_open_unabbrev_SOURCES = perf_event_open_unabbrev.c +perf_event_open_unabbrev_OBJECTS = perf_event_open_unabbrev.$(OBJEXT) +perf_event_open_unabbrev_LDADD = $(LDADD) +perf_event_open_unabbrev_DEPENDENCIES = libtests.a +personality_SOURCES = personality.c +personality_OBJECTS = personality.$(OBJEXT) +personality_LDADD = $(LDADD) +personality_DEPENDENCIES = libtests.a +pipe_SOURCES = pipe.c +pipe_OBJECTS = pipe.$(OBJEXT) +pipe_LDADD = $(LDADD) +pipe_DEPENDENCIES = libtests.a +pipe2_SOURCES = pipe2.c +pipe2_OBJECTS = pipe2.$(OBJEXT) +pipe2_LDADD = $(LDADD) +pipe2_DEPENDENCIES = libtests.a +pkey_alloc_SOURCES = pkey_alloc.c +pkey_alloc_OBJECTS = pkey_alloc.$(OBJEXT) +pkey_alloc_LDADD = $(LDADD) +pkey_alloc_DEPENDENCIES = libtests.a +pkey_free_SOURCES = pkey_free.c +pkey_free_OBJECTS = pkey_free.$(OBJEXT) +pkey_free_LDADD = $(LDADD) +pkey_free_DEPENDENCIES = libtests.a +pkey_mprotect_SOURCES = pkey_mprotect.c +pkey_mprotect_OBJECTS = pkey_mprotect.$(OBJEXT) +pkey_mprotect_LDADD = $(LDADD) +pkey_mprotect_DEPENDENCIES = libtests.a +poll_SOURCES = poll.c +poll_OBJECTS = poll.$(OBJEXT) +poll_LDADD = $(LDADD) +poll_DEPENDENCIES = libtests.a +ppoll_SOURCES = ppoll.c +ppoll_OBJECTS = ppoll.$(OBJEXT) +ppoll_LDADD = $(LDADD) +ppoll_DEPENDENCIES = libtests.a +prctl_arg2_intptr_SOURCES = prctl-arg2-intptr.c +prctl_arg2_intptr_OBJECTS = prctl-arg2-intptr.$(OBJEXT) +prctl_arg2_intptr_LDADD = $(LDADD) +prctl_arg2_intptr_DEPENDENCIES = libtests.a +prctl_dumpable_SOURCES = prctl-dumpable.c +prctl_dumpable_OBJECTS = prctl-dumpable.$(OBJEXT) +prctl_dumpable_LDADD = $(LDADD) +prctl_dumpable_DEPENDENCIES = libtests.a +prctl_name_SOURCES = prctl-name.c +prctl_name_OBJECTS = prctl-name.$(OBJEXT) +prctl_name_LDADD = $(LDADD) +prctl_name_DEPENDENCIES = libtests.a +prctl_no_args_SOURCES = prctl-no-args.c +prctl_no_args_OBJECTS = prctl-no-args.$(OBJEXT) +prctl_no_args_LDADD = $(LDADD) +prctl_no_args_DEPENDENCIES = libtests.a +prctl_pdeathsig_SOURCES = prctl-pdeathsig.c +prctl_pdeathsig_OBJECTS = prctl-pdeathsig.$(OBJEXT) +prctl_pdeathsig_LDADD = $(LDADD) +prctl_pdeathsig_DEPENDENCIES = libtests.a +prctl_seccomp_filter_v_SOURCES = prctl-seccomp-filter-v.c +prctl_seccomp_filter_v_OBJECTS = prctl-seccomp-filter-v.$(OBJEXT) +prctl_seccomp_filter_v_LDADD = $(LDADD) +prctl_seccomp_filter_v_DEPENDENCIES = libtests.a +prctl_seccomp_strict_SOURCES = prctl-seccomp-strict.c +prctl_seccomp_strict_OBJECTS = prctl-seccomp-strict.$(OBJEXT) +prctl_seccomp_strict_LDADD = $(LDADD) +prctl_seccomp_strict_DEPENDENCIES = libtests.a +prctl_securebits_SOURCES = prctl-securebits.c +prctl_securebits_OBJECTS = prctl-securebits.$(OBJEXT) +prctl_securebits_LDADD = $(LDADD) +prctl_securebits_DEPENDENCIES = libtests.a +prctl_tid_address_SOURCES = prctl-tid_address.c +prctl_tid_address_OBJECTS = prctl-tid_address.$(OBJEXT) +prctl_tid_address_LDADD = $(LDADD) +prctl_tid_address_DEPENDENCIES = libtests.a +prctl_tsc_SOURCES = prctl-tsc.c +prctl_tsc_OBJECTS = prctl-tsc.$(OBJEXT) +prctl_tsc_LDADD = $(LDADD) +prctl_tsc_DEPENDENCIES = libtests.a +pread64_pwrite64_SOURCES = pread64-pwrite64.c +pread64_pwrite64_OBJECTS = \ + pread64_pwrite64-pread64-pwrite64.$(OBJEXT) +pread64_pwrite64_LDADD = $(LDADD) +pread64_pwrite64_DEPENDENCIES = libtests.a +preadv_SOURCES = preadv.c +preadv_OBJECTS = preadv-preadv.$(OBJEXT) +preadv_LDADD = $(LDADD) +preadv_DEPENDENCIES = libtests.a +preadv_pwritev_SOURCES = preadv-pwritev.c +preadv_pwritev_OBJECTS = preadv_pwritev-preadv-pwritev.$(OBJEXT) +preadv_pwritev_LDADD = $(LDADD) +preadv_pwritev_DEPENDENCIES = libtests.a +preadv2_pwritev2_SOURCES = preadv2-pwritev2.c +preadv2_pwritev2_OBJECTS = preadv2-pwritev2.$(OBJEXT) +preadv2_pwritev2_LDADD = $(LDADD) +preadv2_pwritev2_DEPENDENCIES = libtests.a +print_maxfd_SOURCES = print_maxfd.c +print_maxfd_OBJECTS = print_maxfd.$(OBJEXT) +print_maxfd_LDADD = $(LDADD) +print_maxfd_DEPENDENCIES = libtests.a +printstr_SOURCES = printstr.c +printstr_OBJECTS = printstr.$(OBJEXT) +printstr_LDADD = $(LDADD) +printstr_DEPENDENCIES = libtests.a +prlimit64_SOURCES = prlimit64.c +prlimit64_OBJECTS = prlimit64.$(OBJEXT) +prlimit64_LDADD = $(LDADD) +prlimit64_DEPENDENCIES = libtests.a +process_vm_readv_SOURCES = process_vm_readv.c +process_vm_readv_OBJECTS = process_vm_readv.$(OBJEXT) +process_vm_readv_LDADD = $(LDADD) +process_vm_readv_DEPENDENCIES = libtests.a +process_vm_writev_SOURCES = process_vm_writev.c +process_vm_writev_OBJECTS = process_vm_writev.$(OBJEXT) +process_vm_writev_LDADD = $(LDADD) +process_vm_writev_DEPENDENCIES = libtests.a +pselect6_SOURCES = pselect6.c +pselect6_OBJECTS = pselect6.$(OBJEXT) +pselect6_LDADD = $(LDADD) +pselect6_DEPENDENCIES = libtests.a +ptrace_SOURCES = ptrace.c +ptrace_OBJECTS = ptrace.$(OBJEXT) +ptrace_LDADD = $(LDADD) +ptrace_DEPENDENCIES = libtests.a +pwritev_SOURCES = pwritev.c +pwritev_OBJECTS = pwritev-pwritev.$(OBJEXT) +pwritev_LDADD = $(LDADD) +pwritev_DEPENDENCIES = libtests.a +qual_fault_SOURCES = qual_fault.c +qual_fault_OBJECTS = qual_fault.$(OBJEXT) +qual_fault_LDADD = $(LDADD) +qual_fault_DEPENDENCIES = libtests.a +qual_inject_error_signal_SOURCES = qual_inject-error-signal.c +qual_inject_error_signal_OBJECTS = qual_inject-error-signal.$(OBJEXT) +qual_inject_error_signal_LDADD = $(LDADD) +qual_inject_error_signal_DEPENDENCIES = libtests.a +qual_inject_retval_SOURCES = qual_inject-retval.c +qual_inject_retval_OBJECTS = qual_inject-retval.$(OBJEXT) +qual_inject_retval_LDADD = $(LDADD) +qual_inject_retval_DEPENDENCIES = libtests.a +qual_inject_signal_SOURCES = qual_inject-signal.c +qual_inject_signal_OBJECTS = qual_inject-signal.$(OBJEXT) +qual_inject_signal_LDADD = $(LDADD) +qual_inject_signal_DEPENDENCIES = libtests.a +qual_signal_SOURCES = qual_signal.c +qual_signal_OBJECTS = qual_signal.$(OBJEXT) +qual_signal_LDADD = $(LDADD) +qual_signal_DEPENDENCIES = libtests.a +quotactl_SOURCES = quotactl.c +quotactl_OBJECTS = quotactl.$(OBJEXT) +quotactl_LDADD = $(LDADD) +quotactl_DEPENDENCIES = libtests.a +quotactl_v_SOURCES = quotactl-v.c +quotactl_v_OBJECTS = quotactl-v.$(OBJEXT) +quotactl_v_LDADD = $(LDADD) +quotactl_v_DEPENDENCIES = libtests.a +quotactl_xfs_SOURCES = quotactl-xfs.c +quotactl_xfs_OBJECTS = quotactl-xfs.$(OBJEXT) +quotactl_xfs_LDADD = $(LDADD) +quotactl_xfs_DEPENDENCIES = libtests.a +quotactl_xfs_v_SOURCES = quotactl-xfs-v.c +quotactl_xfs_v_OBJECTS = quotactl-xfs-v.$(OBJEXT) +quotactl_xfs_v_LDADD = $(LDADD) +quotactl_xfs_v_DEPENDENCIES = libtests.a +read_write_SOURCES = read-write.c +read_write_OBJECTS = read-write.$(OBJEXT) +read_write_LDADD = $(LDADD) +read_write_DEPENDENCIES = libtests.a +readahead_SOURCES = readahead.c +readahead_OBJECTS = readahead.$(OBJEXT) +readahead_LDADD = $(LDADD) +readahead_DEPENDENCIES = libtests.a +readdir_SOURCES = readdir.c +readdir_OBJECTS = readdir.$(OBJEXT) +readdir_LDADD = $(LDADD) +readdir_DEPENDENCIES = libtests.a +readlink_SOURCES = readlink.c +readlink_OBJECTS = readlink.$(OBJEXT) +readlink_LDADD = $(LDADD) +readlink_DEPENDENCIES = libtests.a +readlinkat_SOURCES = readlinkat.c +readlinkat_OBJECTS = readlinkat.$(OBJEXT) +readlinkat_LDADD = $(LDADD) +readlinkat_DEPENDENCIES = libtests.a +readv_SOURCES = readv.c +readv_OBJECTS = readv.$(OBJEXT) +readv_LDADD = $(LDADD) +readv_DEPENDENCIES = libtests.a +reboot_SOURCES = reboot.c +reboot_OBJECTS = reboot.$(OBJEXT) +reboot_LDADD = $(LDADD) +reboot_DEPENDENCIES = libtests.a +recvfrom_SOURCES = recvfrom.c +recvfrom_OBJECTS = recvfrom.$(OBJEXT) +recvfrom_LDADD = $(LDADD) +recvfrom_DEPENDENCIES = libtests.a +recvmmsg_timeout_SOURCES = recvmmsg-timeout.c +recvmmsg_timeout_OBJECTS = recvmmsg-timeout.$(OBJEXT) +recvmmsg_timeout_LDADD = $(LDADD) +recvmmsg_timeout_DEPENDENCIES = libtests.a +recvmsg_SOURCES = recvmsg.c +recvmsg_OBJECTS = recvmsg.$(OBJEXT) +recvmsg_LDADD = $(LDADD) +recvmsg_DEPENDENCIES = libtests.a +redirect_fds_SOURCES = redirect-fds.c +redirect_fds_OBJECTS = redirect-fds.$(OBJEXT) +redirect_fds_LDADD = $(LDADD) +redirect_fds_DEPENDENCIES = libtests.a +remap_file_pages_SOURCES = remap_file_pages.c +remap_file_pages_OBJECTS = remap_file_pages.$(OBJEXT) +remap_file_pages_LDADD = $(LDADD) +remap_file_pages_DEPENDENCIES = libtests.a +rename_SOURCES = rename.c +rename_OBJECTS = rename.$(OBJEXT) +rename_LDADD = $(LDADD) +rename_DEPENDENCIES = libtests.a +renameat_SOURCES = renameat.c +renameat_OBJECTS = renameat.$(OBJEXT) +renameat_LDADD = $(LDADD) +renameat_DEPENDENCIES = libtests.a +renameat2_SOURCES = renameat2.c +renameat2_OBJECTS = renameat2.$(OBJEXT) +renameat2_LDADD = $(LDADD) +renameat2_DEPENDENCIES = libtests.a +request_key_SOURCES = request_key.c +request_key_OBJECTS = request_key.$(OBJEXT) +request_key_LDADD = $(LDADD) +request_key_DEPENDENCIES = libtests.a +restart_syscall_SOURCES = restart_syscall.c +restart_syscall_OBJECTS = restart_syscall.$(OBJEXT) +restart_syscall_LDADD = $(LDADD) +restart_syscall_DEPENDENCIES = libtests.a +rmdir_SOURCES = rmdir.c +rmdir_OBJECTS = rmdir.$(OBJEXT) +rmdir_LDADD = $(LDADD) +rmdir_DEPENDENCIES = libtests.a +rt_sigpending_SOURCES = rt_sigpending.c +rt_sigpending_OBJECTS = rt_sigpending.$(OBJEXT) +rt_sigpending_LDADD = $(LDADD) +rt_sigpending_DEPENDENCIES = libtests.a +rt_sigprocmask_SOURCES = rt_sigprocmask.c +rt_sigprocmask_OBJECTS = rt_sigprocmask.$(OBJEXT) +rt_sigprocmask_LDADD = $(LDADD) +rt_sigprocmask_DEPENDENCIES = libtests.a +rt_sigqueueinfo_SOURCES = rt_sigqueueinfo.c +rt_sigqueueinfo_OBJECTS = rt_sigqueueinfo.$(OBJEXT) +rt_sigqueueinfo_LDADD = $(LDADD) +rt_sigqueueinfo_DEPENDENCIES = libtests.a +rt_sigsuspend_SOURCES = rt_sigsuspend.c +rt_sigsuspend_OBJECTS = rt_sigsuspend.$(OBJEXT) +rt_sigsuspend_LDADD = $(LDADD) +rt_sigsuspend_DEPENDENCIES = libtests.a +rt_sigtimedwait_SOURCES = rt_sigtimedwait.c +rt_sigtimedwait_OBJECTS = rt_sigtimedwait.$(OBJEXT) +rt_sigtimedwait_LDADD = $(LDADD) +rt_sigtimedwait_DEPENDENCIES = libtests.a +rt_tgsigqueueinfo_SOURCES = rt_tgsigqueueinfo.c +rt_tgsigqueueinfo_OBJECTS = rt_tgsigqueueinfo.$(OBJEXT) +rt_tgsigqueueinfo_LDADD = $(LDADD) +rt_tgsigqueueinfo_DEPENDENCIES = libtests.a +sched_get_priority_mxx_SOURCES = sched_get_priority_mxx.c +sched_get_priority_mxx_OBJECTS = sched_get_priority_mxx.$(OBJEXT) +sched_get_priority_mxx_LDADD = $(LDADD) +sched_get_priority_mxx_DEPENDENCIES = libtests.a +sched_rr_get_interval_SOURCES = sched_rr_get_interval.c +sched_rr_get_interval_OBJECTS = sched_rr_get_interval.$(OBJEXT) +sched_rr_get_interval_LDADD = $(LDADD) +sched_rr_get_interval_DEPENDENCIES = libtests.a +sched_xetaffinity_SOURCES = sched_xetaffinity.c +sched_xetaffinity_OBJECTS = sched_xetaffinity.$(OBJEXT) +sched_xetaffinity_LDADD = $(LDADD) +sched_xetaffinity_DEPENDENCIES = libtests.a +sched_xetattr_SOURCES = sched_xetattr.c +sched_xetattr_OBJECTS = sched_xetattr.$(OBJEXT) +sched_xetattr_LDADD = $(LDADD) +sched_xetattr_DEPENDENCIES = libtests.a +sched_xetparam_SOURCES = sched_xetparam.c +sched_xetparam_OBJECTS = sched_xetparam.$(OBJEXT) +sched_xetparam_LDADD = $(LDADD) +sched_xetparam_DEPENDENCIES = libtests.a +sched_xetscheduler_SOURCES = sched_xetscheduler.c +sched_xetscheduler_OBJECTS = sched_xetscheduler.$(OBJEXT) +sched_xetscheduler_LDADD = $(LDADD) +sched_xetscheduler_DEPENDENCIES = libtests.a +sched_yield_SOURCES = sched_yield.c +sched_yield_OBJECTS = sched_yield.$(OBJEXT) +sched_yield_LDADD = $(LDADD) +sched_yield_DEPENDENCIES = libtests.a +scm_rights_SOURCES = scm_rights.c +scm_rights_OBJECTS = scm_rights.$(OBJEXT) +scm_rights_LDADD = $(LDADD) +scm_rights_DEPENDENCIES = libtests.a +seccomp_filter_SOURCES = seccomp-filter.c +seccomp_filter_OBJECTS = seccomp-filter.$(OBJEXT) +seccomp_filter_LDADD = $(LDADD) +seccomp_filter_DEPENDENCIES = libtests.a +seccomp_filter_v_SOURCES = seccomp-filter-v.c +seccomp_filter_v_OBJECTS = seccomp-filter-v.$(OBJEXT) +seccomp_filter_v_LDADD = $(LDADD) +seccomp_filter_v_DEPENDENCIES = libtests.a +seccomp_strict_SOURCES = seccomp-strict.c +seccomp_strict_OBJECTS = seccomp-strict.$(OBJEXT) +seccomp_strict_LDADD = $(LDADD) +seccomp_strict_DEPENDENCIES = libtests.a +select_SOURCES = select.c +select_OBJECTS = select.$(OBJEXT) +select_LDADD = $(LDADD) +select_DEPENDENCIES = libtests.a +semop_SOURCES = semop.c +semop_OBJECTS = semop.$(OBJEXT) +semop_LDADD = $(LDADD) +semop_DEPENDENCIES = libtests.a +sendfile_SOURCES = sendfile.c +sendfile_OBJECTS = sendfile.$(OBJEXT) +sendfile_LDADD = $(LDADD) +sendfile_DEPENDENCIES = libtests.a +sendfile64_SOURCES = sendfile64.c +sendfile64_OBJECTS = sendfile64.$(OBJEXT) +sendfile64_LDADD = $(LDADD) +sendfile64_DEPENDENCIES = libtests.a +set_mempolicy_SOURCES = set_mempolicy.c +set_mempolicy_OBJECTS = set_mempolicy.$(OBJEXT) +set_mempolicy_LDADD = $(LDADD) +set_mempolicy_DEPENDENCIES = libtests.a +set_ptracer_any_SOURCES = set_ptracer_any.c +set_ptracer_any_OBJECTS = set_ptracer_any.$(OBJEXT) +set_ptracer_any_LDADD = $(LDADD) +set_ptracer_any_DEPENDENCIES = libtests.a +setdomainname_SOURCES = setdomainname.c +setdomainname_OBJECTS = setdomainname.$(OBJEXT) +setdomainname_LDADD = $(LDADD) +setdomainname_DEPENDENCIES = libtests.a +setfsgid_SOURCES = setfsgid.c +setfsgid_OBJECTS = setfsgid.$(OBJEXT) +setfsgid_LDADD = $(LDADD) +setfsgid_DEPENDENCIES = libtests.a +setfsgid32_SOURCES = setfsgid32.c +setfsgid32_OBJECTS = setfsgid32.$(OBJEXT) +setfsgid32_LDADD = $(LDADD) +setfsgid32_DEPENDENCIES = libtests.a +setfsuid_SOURCES = setfsuid.c +setfsuid_OBJECTS = setfsuid.$(OBJEXT) +setfsuid_LDADD = $(LDADD) +setfsuid_DEPENDENCIES = libtests.a +setfsuid32_SOURCES = setfsuid32.c +setfsuid32_OBJECTS = setfsuid32.$(OBJEXT) +setfsuid32_LDADD = $(LDADD) +setfsuid32_DEPENDENCIES = libtests.a +setgid_SOURCES = setgid.c +setgid_OBJECTS = setgid.$(OBJEXT) +setgid_LDADD = $(LDADD) +setgid_DEPENDENCIES = libtests.a +setgid32_SOURCES = setgid32.c +setgid32_OBJECTS = setgid32.$(OBJEXT) +setgid32_LDADD = $(LDADD) +setgid32_DEPENDENCIES = libtests.a +setgroups_SOURCES = setgroups.c +setgroups_OBJECTS = setgroups.$(OBJEXT) +setgroups_LDADD = $(LDADD) +setgroups_DEPENDENCIES = libtests.a +setgroups32_SOURCES = setgroups32.c +setgroups32_OBJECTS = setgroups32.$(OBJEXT) +setgroups32_LDADD = $(LDADD) +setgroups32_DEPENDENCIES = libtests.a +sethostname_SOURCES = sethostname.c +sethostname_OBJECTS = sethostname.$(OBJEXT) +sethostname_LDADD = $(LDADD) +sethostname_DEPENDENCIES = libtests.a +setns_SOURCES = setns.c +setns_OBJECTS = setns.$(OBJEXT) +setns_LDADD = $(LDADD) +setns_DEPENDENCIES = libtests.a +setregid_SOURCES = setregid.c +setregid_OBJECTS = setregid.$(OBJEXT) +setregid_LDADD = $(LDADD) +setregid_DEPENDENCIES = libtests.a +setregid32_SOURCES = setregid32.c +setregid32_OBJECTS = setregid32.$(OBJEXT) +setregid32_LDADD = $(LDADD) +setregid32_DEPENDENCIES = libtests.a +setresgid_SOURCES = setresgid.c +setresgid_OBJECTS = setresgid.$(OBJEXT) +setresgid_LDADD = $(LDADD) +setresgid_DEPENDENCIES = libtests.a +setresgid32_SOURCES = setresgid32.c +setresgid32_OBJECTS = setresgid32.$(OBJEXT) +setresgid32_LDADD = $(LDADD) +setresgid32_DEPENDENCIES = libtests.a +setresuid_SOURCES = setresuid.c +setresuid_OBJECTS = setresuid.$(OBJEXT) +setresuid_LDADD = $(LDADD) +setresuid_DEPENDENCIES = libtests.a +setresuid32_SOURCES = setresuid32.c +setresuid32_OBJECTS = setresuid32.$(OBJEXT) +setresuid32_LDADD = $(LDADD) +setresuid32_DEPENDENCIES = libtests.a +setreuid_SOURCES = setreuid.c +setreuid_OBJECTS = setreuid.$(OBJEXT) +setreuid_LDADD = $(LDADD) +setreuid_DEPENDENCIES = libtests.a +setreuid32_SOURCES = setreuid32.c +setreuid32_OBJECTS = setreuid32.$(OBJEXT) +setreuid32_LDADD = $(LDADD) +setreuid32_DEPENDENCIES = libtests.a +setrlimit_SOURCES = setrlimit.c +setrlimit_OBJECTS = setrlimit.$(OBJEXT) +setrlimit_LDADD = $(LDADD) +setrlimit_DEPENDENCIES = libtests.a +setuid_SOURCES = setuid.c +setuid_OBJECTS = setuid.$(OBJEXT) +setuid_LDADD = $(LDADD) +setuid_DEPENDENCIES = libtests.a +setuid32_SOURCES = setuid32.c +setuid32_OBJECTS = setuid32.$(OBJEXT) +setuid32_LDADD = $(LDADD) +setuid32_DEPENDENCIES = libtests.a +shmxt_SOURCES = shmxt.c +shmxt_OBJECTS = shmxt.$(OBJEXT) +shmxt_LDADD = $(LDADD) +shmxt_DEPENDENCIES = libtests.a +shutdown_SOURCES = shutdown.c +shutdown_OBJECTS = shutdown.$(OBJEXT) +shutdown_LDADD = $(LDADD) +shutdown_DEPENDENCIES = libtests.a +sigaction_SOURCES = sigaction.c +sigaction_OBJECTS = sigaction.$(OBJEXT) +sigaction_LDADD = $(LDADD) +sigaction_DEPENDENCIES = libtests.a +sigaltstack_SOURCES = sigaltstack.c +sigaltstack_OBJECTS = sigaltstack.$(OBJEXT) +sigaltstack_LDADD = $(LDADD) +sigaltstack_DEPENDENCIES = libtests.a +siginfo_SOURCES = siginfo.c +siginfo_OBJECTS = siginfo.$(OBJEXT) +siginfo_LDADD = $(LDADD) +siginfo_DEPENDENCIES = libtests.a +signal_receive_SOURCES = signal_receive.c +signal_receive_OBJECTS = signal_receive.$(OBJEXT) +signal_receive_LDADD = $(LDADD) +signal_receive_DEPENDENCIES = libtests.a +signalfd4_SOURCES = signalfd4.c +signalfd4_OBJECTS = signalfd4.$(OBJEXT) +signalfd4_LDADD = $(LDADD) +signalfd4_DEPENDENCIES = libtests.a +sigreturn_SOURCES = sigreturn.c +sigreturn_OBJECTS = sigreturn.$(OBJEXT) +sigreturn_LDADD = $(LDADD) +sigreturn_DEPENDENCIES = libtests.a +sleep_SOURCES = sleep.c +sleep_OBJECTS = sleep.$(OBJEXT) +sleep_LDADD = $(LDADD) +sleep_DEPENDENCIES = libtests.a +socketcall_SOURCES = socketcall.c +socketcall_OBJECTS = socketcall.$(OBJEXT) +socketcall_LDADD = $(LDADD) +socketcall_DEPENDENCIES = libtests.a +splice_SOURCES = splice.c +splice_OBJECTS = splice.$(OBJEXT) +splice_LDADD = $(LDADD) +splice_DEPENDENCIES = libtests.a +am_stack_fcall_OBJECTS = stack-fcall.$(OBJEXT) stack-fcall-0.$(OBJEXT) \ + stack-fcall-1.$(OBJEXT) stack-fcall-2.$(OBJEXT) \ + stack-fcall-3.$(OBJEXT) +stack_fcall_OBJECTS = $(am_stack_fcall_OBJECTS) +stack_fcall_LDADD = $(LDADD) +stack_fcall_DEPENDENCIES = libtests.a +stat_SOURCES = stat.c +stat_OBJECTS = stat.$(OBJEXT) +stat_LDADD = $(LDADD) +stat_DEPENDENCIES = libtests.a +stat64_SOURCES = stat64.c +stat64_OBJECTS = stat64-stat64.$(OBJEXT) +stat64_LDADD = $(LDADD) +stat64_DEPENDENCIES = libtests.a +statfs_SOURCES = statfs.c +statfs_OBJECTS = statfs-statfs.$(OBJEXT) +statfs_LDADD = $(LDADD) +statfs_DEPENDENCIES = libtests.a +statfs64_SOURCES = statfs64.c +statfs64_OBJECTS = statfs64.$(OBJEXT) +statfs64_LDADD = $(LDADD) +statfs64_DEPENDENCIES = libtests.a +swap_SOURCES = swap.c +swap_OBJECTS = swap.$(OBJEXT) +swap_LDADD = $(LDADD) +swap_DEPENDENCIES = libtests.a +symlink_SOURCES = symlink.c +symlink_OBJECTS = symlink.$(OBJEXT) +symlink_LDADD = $(LDADD) +symlink_DEPENDENCIES = libtests.a +symlinkat_SOURCES = symlinkat.c +symlinkat_OBJECTS = symlinkat.$(OBJEXT) +symlinkat_LDADD = $(LDADD) +symlinkat_DEPENDENCIES = libtests.a +sync_SOURCES = sync.c +sync_OBJECTS = sync.$(OBJEXT) +sync_LDADD = $(LDADD) +sync_DEPENDENCIES = libtests.a +sync_file_range_SOURCES = sync_file_range.c +sync_file_range_OBJECTS = sync_file_range.$(OBJEXT) +sync_file_range_LDADD = $(LDADD) +sync_file_range_DEPENDENCIES = libtests.a +sync_file_range2_SOURCES = sync_file_range2.c +sync_file_range2_OBJECTS = sync_file_range2.$(OBJEXT) +sync_file_range2_LDADD = $(LDADD) +sync_file_range2_DEPENDENCIES = libtests.a +sysinfo_SOURCES = sysinfo.c +sysinfo_OBJECTS = sysinfo.$(OBJEXT) +sysinfo_LDADD = $(LDADD) +sysinfo_DEPENDENCIES = libtests.a +syslog_SOURCES = syslog.c +syslog_OBJECTS = syslog.$(OBJEXT) +syslog_LDADD = $(LDADD) +syslog_DEPENDENCIES = libtests.a +tee_SOURCES = tee.c +tee_OBJECTS = tee.$(OBJEXT) +tee_LDADD = $(LDADD) +tee_DEPENDENCIES = libtests.a +threads_execve_SOURCES = threads-execve.c +threads_execve_OBJECTS = threads-execve.$(OBJEXT) +threads_execve_DEPENDENCIES = $(LDADD) +time_SOURCES = time.c +time_OBJECTS = time.$(OBJEXT) +time_LDADD = $(LDADD) +time_DEPENDENCIES = libtests.a +timer_create_SOURCES = timer_create.c +timer_create_OBJECTS = timer_create.$(OBJEXT) +timer_create_LDADD = $(LDADD) +timer_create_DEPENDENCIES = libtests.a +timer_xettime_SOURCES = timer_xettime.c +timer_xettime_OBJECTS = timer_xettime.$(OBJEXT) +timer_xettime_LDADD = $(LDADD) +timer_xettime_DEPENDENCIES = libtests.a +timerfd_xettime_SOURCES = timerfd_xettime.c +timerfd_xettime_OBJECTS = timerfd_xettime.$(OBJEXT) +timerfd_xettime_LDADD = $(LDADD) +timerfd_xettime_DEPENDENCIES = libtests.a +times_SOURCES = times.c +times_OBJECTS = times.$(OBJEXT) +times_DEPENDENCIES = $(LDADD) +times_fail_SOURCES = times-fail.c +times_fail_OBJECTS = times-fail.$(OBJEXT) +times_fail_LDADD = $(LDADD) +times_fail_DEPENDENCIES = libtests.a +truncate_SOURCES = truncate.c +truncate_OBJECTS = truncate.$(OBJEXT) +truncate_LDADD = $(LDADD) +truncate_DEPENDENCIES = libtests.a +truncate64_SOURCES = truncate64.c +truncate64_OBJECTS = truncate64-truncate64.$(OBJEXT) +truncate64_LDADD = $(LDADD) +truncate64_DEPENDENCIES = libtests.a +ugetrlimit_SOURCES = ugetrlimit.c +ugetrlimit_OBJECTS = ugetrlimit.$(OBJEXT) +ugetrlimit_LDADD = $(LDADD) +ugetrlimit_DEPENDENCIES = libtests.a +uio_SOURCES = uio.c +uio_OBJECTS = uio-uio.$(OBJEXT) +uio_LDADD = $(LDADD) +uio_DEPENDENCIES = libtests.a +umask_SOURCES = umask.c +umask_OBJECTS = umask.$(OBJEXT) +umask_LDADD = $(LDADD) +umask_DEPENDENCIES = libtests.a +umount_SOURCES = umount.c +umount_OBJECTS = umount.$(OBJEXT) +umount_LDADD = $(LDADD) +umount_DEPENDENCIES = libtests.a +umount2_SOURCES = umount2.c +umount2_OBJECTS = umount2.$(OBJEXT) +umount2_LDADD = $(LDADD) +umount2_DEPENDENCIES = libtests.a +umoven_illptr_SOURCES = umoven-illptr.c +umoven_illptr_OBJECTS = umoven-illptr.$(OBJEXT) +umoven_illptr_LDADD = $(LDADD) +umoven_illptr_DEPENDENCIES = libtests.a +umovestr_SOURCES = umovestr.c +umovestr_OBJECTS = umovestr.$(OBJEXT) +umovestr_LDADD = $(LDADD) +umovestr_DEPENDENCIES = libtests.a +umovestr_illptr_SOURCES = umovestr-illptr.c +umovestr_illptr_OBJECTS = umovestr-illptr.$(OBJEXT) +umovestr_illptr_LDADD = $(LDADD) +umovestr_illptr_DEPENDENCIES = libtests.a +umovestr2_SOURCES = umovestr2.c +umovestr2_OBJECTS = umovestr2.$(OBJEXT) +umovestr2_LDADD = $(LDADD) +umovestr2_DEPENDENCIES = libtests.a +umovestr3_SOURCES = umovestr3.c +umovestr3_OBJECTS = umovestr3.$(OBJEXT) +umovestr3_LDADD = $(LDADD) +umovestr3_DEPENDENCIES = libtests.a +uname_SOURCES = uname.c +uname_OBJECTS = uname.$(OBJEXT) +uname_LDADD = $(LDADD) +uname_DEPENDENCIES = libtests.a +unix_pair_send_recv_SOURCES = unix-pair-send-recv.c +unix_pair_send_recv_OBJECTS = unix-pair-send-recv.$(OBJEXT) +unix_pair_send_recv_LDADD = $(LDADD) +unix_pair_send_recv_DEPENDENCIES = libtests.a +unix_pair_sendto_recvfrom_SOURCES = unix-pair-sendto-recvfrom.c +unix_pair_sendto_recvfrom_OBJECTS = \ + unix-pair-sendto-recvfrom.$(OBJEXT) +unix_pair_sendto_recvfrom_LDADD = $(LDADD) +unix_pair_sendto_recvfrom_DEPENDENCIES = libtests.a +unlink_SOURCES = unlink.c +unlink_OBJECTS = unlink.$(OBJEXT) +unlink_LDADD = $(LDADD) +unlink_DEPENDENCIES = libtests.a +unlinkat_SOURCES = unlinkat.c +unlinkat_OBJECTS = unlinkat.$(OBJEXT) +unlinkat_LDADD = $(LDADD) +unlinkat_DEPENDENCIES = libtests.a +unshare_SOURCES = unshare.c +unshare_OBJECTS = unshare.$(OBJEXT) +unshare_LDADD = $(LDADD) +unshare_DEPENDENCIES = libtests.a +userfaultfd_SOURCES = userfaultfd.c +userfaultfd_OBJECTS = userfaultfd.$(OBJEXT) +userfaultfd_LDADD = $(LDADD) +userfaultfd_DEPENDENCIES = libtests.a +ustat_SOURCES = ustat.c +ustat_OBJECTS = ustat.$(OBJEXT) +ustat_LDADD = $(LDADD) +ustat_DEPENDENCIES = libtests.a +utime_SOURCES = utime.c +utime_OBJECTS = utime.$(OBJEXT) +utime_LDADD = $(LDADD) +utime_DEPENDENCIES = libtests.a +utimensat_SOURCES = utimensat.c +utimensat_OBJECTS = utimensat.$(OBJEXT) +utimensat_LDADD = $(LDADD) +utimensat_DEPENDENCIES = libtests.a +utimes_SOURCES = utimes.c +utimes_OBJECTS = utimes.$(OBJEXT) +utimes_LDADD = $(LDADD) +utimes_DEPENDENCIES = libtests.a +vfork_f_SOURCES = vfork-f.c +vfork_f_OBJECTS = vfork-f.$(OBJEXT) +vfork_f_LDADD = $(LDADD) +vfork_f_DEPENDENCIES = libtests.a +vhangup_SOURCES = vhangup.c +vhangup_OBJECTS = vhangup.$(OBJEXT) +vhangup_LDADD = $(LDADD) +vhangup_DEPENDENCIES = libtests.a +vmsplice_SOURCES = vmsplice.c +vmsplice_OBJECTS = vmsplice.$(OBJEXT) +vmsplice_LDADD = $(LDADD) +vmsplice_DEPENDENCIES = libtests.a +wait4_SOURCES = wait4.c +wait4_OBJECTS = wait4.$(OBJEXT) +wait4_LDADD = $(LDADD) +wait4_DEPENDENCIES = libtests.a +wait4_v_SOURCES = wait4-v.c +wait4_v_OBJECTS = wait4-v.$(OBJEXT) +wait4_v_LDADD = $(LDADD) +wait4_v_DEPENDENCIES = libtests.a +waitid_SOURCES = waitid.c +waitid_OBJECTS = waitid.$(OBJEXT) +waitid_LDADD = $(LDADD) +waitid_DEPENDENCIES = libtests.a +waitid_v_SOURCES = waitid-v.c +waitid_v_OBJECTS = waitid-v.$(OBJEXT) +waitid_v_LDADD = $(LDADD) +waitid_v_DEPENDENCIES = libtests.a +waitpid_SOURCES = waitpid.c +waitpid_OBJECTS = waitpid.$(OBJEXT) +waitpid_LDADD = $(LDADD) +waitpid_DEPENDENCIES = libtests.a +xattr_SOURCES = xattr.c +xattr_OBJECTS = xattr.$(OBJEXT) +xattr_LDADD = $(LDADD) +xattr_DEPENDENCIES = libtests.a +xattr_strings_SOURCES = xattr-strings.c +xattr_strings_OBJECTS = xattr-strings.$(OBJEXT) +xattr_strings_LDADD = $(LDADD) +xattr_strings_DEPENDENCIES = libtests.a +xet_robust_list_SOURCES = xet_robust_list.c +xet_robust_list_OBJECTS = xet_robust_list.$(OBJEXT) +xet_robust_list_LDADD = $(LDADD) +xet_robust_list_DEPENDENCIES = libtests.a +xetitimer_SOURCES = xetitimer.c +xetitimer_OBJECTS = xetitimer.$(OBJEXT) +xetitimer_LDADD = $(LDADD) +xetitimer_DEPENDENCIES = libtests.a +xetpgid_SOURCES = xetpgid.c +xetpgid_OBJECTS = xetpgid.$(OBJEXT) +xetpgid_LDADD = $(LDADD) +xetpgid_DEPENDENCIES = libtests.a +xetpriority_SOURCES = xetpriority.c +xetpriority_OBJECTS = xetpriority.$(OBJEXT) +xetpriority_LDADD = $(LDADD) +xetpriority_DEPENDENCIES = libtests.a +xettimeofday_SOURCES = xettimeofday.c +xettimeofday_OBJECTS = xettimeofday.$(OBJEXT) +xettimeofday_LDADD = $(LDADD) +xettimeofday_DEPENDENCIES = libtests.a +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libtests_a_SOURCES) _newselect.c accept.c accept4.c \ + access.c acct.c add_key.c adjtimex.c aio.c alarm.c answer.c \ + attach-f-p.c attach-f-p-cmd.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c caps-abbrev.c \ + chmod.c chown.c chown32.c chroot.c clock_adjtime.c \ + clock_nanosleep.c clock_xettime.c copy_file_range.c count-f.c \ + creat.c delete_module.c dup.c dup2.c dup3.c epoll_create.c \ + epoll_create1.c epoll_ctl.c epoll_pwait.c epoll_wait.c \ + erestartsys.c eventfd.c execve.c execve-v.c execveat.c \ + execveat-v.c faccessat.c fadvise64.c fadvise64_64.c \ + fallocate.c fanotify_init.c fanotify_mark.c fchdir.c fchmod.c \ + fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c fcntl64.c \ + fdatasync.c file_handle.c file_ioctl.c filter-unavailable.c \ + finit_module.c flock.c fork-f.c fstat.c fstat64.c fstatat64.c \ + fstatfs.c fstatfs64.c fsync.c ftruncate.c ftruncate64.c \ + futex.c futimesat.c get_mempolicy.c getcpu.c getcwd.c \ + getdents.c getdents64.c getegid.c getegid32.c geteuid.c \ + geteuid32.c getgid.c getgid32.c getgroups.c getgroups32.c \ + getpeername.c getpgrp.c getrandom.c getresgid.c getresgid32.c \ + getresuid.c getresuid32.c getrlimit.c getrusage.c getsid.c \ + getsockname.c getuid.c getuid32.c getxxid.c inet-cmsg.c \ + init_module.c inotify.c inotify_init1.c ioctl.c ioctl_block.c \ + ioctl_dm.c ioctl_dm-v.c ioctl_evdev.c ioctl_evdev-v.c \ + ioctl_loop.c ioctl_loop-nv.c ioctl_loop-v.c ioctl_mtd.c \ + ioctl_rtc.c ioctl_rtc-v.c ioctl_scsi.c ioctl_sg_io_v3.c \ + ioctl_sg_io_v4.c ioctl_sock_gifconf.c ioctl_uffdio.c \ + ioctl_v4l2.c ioperm.c iopl.c ioprio.c ip_mreq.c ipc.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kcmp.c \ + kexec_file_load.c kexec_load.c keyctl.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lookup_dcookie.c \ + lseek.c lstat.c lstat64.c mbind.c membarrier.c memfd_create.c \ + migrate_pages.c mincore.c mkdir.c mkdirat.c mknod.c mknodat.c \ + mlock.c mlock2.c mlockall.c mmap.c mmap64.c mmsg.c \ + mmsg-silent.c mmsg_name.c mmsg_name-v.c mount.c move_pages.c \ + mq.c mq_sendrecv.c mq_sendrecv-read.c mq_sendrecv-write.c \ + msg_control.c msg_control-v.c msg_name.c munlockall.c \ + nanosleep.c net-accept-connect.c net-icmp_filter.c \ + net-sockaddr.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_protocol.c netlink_unix_diag.c newfstatat.c \ + nsyscalls.c old_mmap.c oldfstat.c oldlstat.c oldselect.c \ + oldstat.c open.c openat.c pause.c pc.c perf_event_open.c \ + perf_event_open_nonverbose.c perf_event_open_unabbrev.c \ + personality.c pipe.c pipe2.c pkey_alloc.c pkey_free.c \ + pkey_mprotect.c poll.c ppoll.c prctl-arg2-intptr.c \ + prctl-dumpable.c prctl-name.c prctl-no-args.c \ + prctl-pdeathsig.c prctl-seccomp-filter-v.c \ + prctl-seccomp-strict.c prctl-securebits.c prctl-tid_address.c \ + prctl-tsc.c pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c print_maxfd.c printstr.c prlimit64.c \ + process_vm_readv.c process_vm_writev.c pselect6.c ptrace.c \ + pwritev.c qual_fault.c qual_inject-error-signal.c \ + qual_inject-retval.c qual_inject-signal.c qual_signal.c \ + quotactl.c quotactl-v.c quotactl-xfs.c quotactl-xfs-v.c \ + read-write.c readahead.c readdir.c readlink.c readlinkat.c \ + readv.c reboot.c recvfrom.c recvmmsg-timeout.c recvmsg.c \ + redirect-fds.c remap_file_pages.c rename.c renameat.c \ + renameat2.c request_key.c restart_syscall.c rmdir.c \ + rt_sigpending.c rt_sigprocmask.c rt_sigqueueinfo.c \ + rt_sigsuspend.c rt_sigtimedwait.c rt_tgsigqueueinfo.c \ + sched_get_priority_mxx.c sched_rr_get_interval.c \ + sched_xetaffinity.c sched_xetattr.c sched_xetparam.c \ + sched_xetscheduler.c sched_yield.c scm_rights.c \ + seccomp-filter.c seccomp-filter-v.c seccomp-strict.c select.c \ + semop.c sendfile.c sendfile64.c set_mempolicy.c \ + set_ptracer_any.c setdomainname.c setfsgid.c setfsgid32.c \ + setfsuid.c setfsuid32.c setgid.c setgid32.c setgroups.c \ + setgroups32.c sethostname.c setns.c setregid.c setregid32.c \ + setresgid.c setresgid32.c setresuid.c setresuid32.c setreuid.c \ + setreuid32.c setrlimit.c setuid.c setuid32.c shmxt.c \ + shutdown.c sigaction.c sigaltstack.c siginfo.c \ + signal_receive.c signalfd4.c sigreturn.c sleep.c socketcall.c \ + splice.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ + statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + threads-execve.c time.c timer_create.c timer_xettime.c \ + timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ + ugetrlimit.c uio.c umask.c umount.c umount2.c umoven-illptr.c \ + umovestr.c umovestr-illptr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unix-pair-sendto-recvfrom.c unlink.c \ + unlinkat.c unshare.c userfaultfd.c ustat.c utime.c utimensat.c \ + utimes.c vfork-f.c vhangup.c vmsplice.c wait4.c wait4-v.c \ + waitid.c waitid-v.c waitpid.c xattr.c xattr-strings.c \ + xet_robust_list.c xetitimer.c xetpgid.c xetpriority.c \ + xettimeofday.c +DIST_SOURCES = $(libtests_a_SOURCES) _newselect.c accept.c accept4.c \ + access.c acct.c add_key.c adjtimex.c aio.c alarm.c answer.c \ + attach-f-p.c attach-f-p-cmd.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c caps-abbrev.c \ + chmod.c chown.c chown32.c chroot.c clock_adjtime.c \ + clock_nanosleep.c clock_xettime.c copy_file_range.c count-f.c \ + creat.c delete_module.c dup.c dup2.c dup3.c epoll_create.c \ + epoll_create1.c epoll_ctl.c epoll_pwait.c epoll_wait.c \ + erestartsys.c eventfd.c execve.c execve-v.c execveat.c \ + execveat-v.c faccessat.c fadvise64.c fadvise64_64.c \ + fallocate.c fanotify_init.c fanotify_mark.c fchdir.c fchmod.c \ + fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c fcntl64.c \ + fdatasync.c file_handle.c file_ioctl.c filter-unavailable.c \ + finit_module.c flock.c fork-f.c fstat.c fstat64.c fstatat64.c \ + fstatfs.c fstatfs64.c fsync.c ftruncate.c ftruncate64.c \ + futex.c futimesat.c get_mempolicy.c getcpu.c getcwd.c \ + getdents.c getdents64.c getegid.c getegid32.c geteuid.c \ + geteuid32.c getgid.c getgid32.c getgroups.c getgroups32.c \ + getpeername.c getpgrp.c getrandom.c getresgid.c getresgid32.c \ + getresuid.c getresuid32.c getrlimit.c getrusage.c getsid.c \ + getsockname.c getuid.c getuid32.c getxxid.c inet-cmsg.c \ + init_module.c inotify.c inotify_init1.c ioctl.c ioctl_block.c \ + ioctl_dm.c ioctl_dm-v.c ioctl_evdev.c ioctl_evdev-v.c \ + ioctl_loop.c ioctl_loop-nv.c ioctl_loop-v.c ioctl_mtd.c \ + ioctl_rtc.c ioctl_rtc-v.c ioctl_scsi.c ioctl_sg_io_v3.c \ + ioctl_sg_io_v4.c ioctl_sock_gifconf.c ioctl_uffdio.c \ + ioctl_v4l2.c ioperm.c iopl.c ioprio.c ip_mreq.c ipc.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kcmp.c \ + kexec_file_load.c kexec_load.c keyctl.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lookup_dcookie.c \ + lseek.c lstat.c lstat64.c mbind.c membarrier.c memfd_create.c \ + migrate_pages.c mincore.c mkdir.c mkdirat.c mknod.c mknodat.c \ + mlock.c mlock2.c mlockall.c mmap.c mmap64.c mmsg.c \ + mmsg-silent.c mmsg_name.c mmsg_name-v.c mount.c move_pages.c \ + mq.c mq_sendrecv.c mq_sendrecv-read.c mq_sendrecv-write.c \ + msg_control.c msg_control-v.c msg_name.c munlockall.c \ + nanosleep.c net-accept-connect.c net-icmp_filter.c \ + net-sockaddr.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_protocol.c netlink_unix_diag.c newfstatat.c \ + nsyscalls.c old_mmap.c oldfstat.c oldlstat.c oldselect.c \ + oldstat.c open.c openat.c pause.c pc.c perf_event_open.c \ + perf_event_open_nonverbose.c perf_event_open_unabbrev.c \ + personality.c pipe.c pipe2.c pkey_alloc.c pkey_free.c \ + pkey_mprotect.c poll.c ppoll.c prctl-arg2-intptr.c \ + prctl-dumpable.c prctl-name.c prctl-no-args.c \ + prctl-pdeathsig.c prctl-seccomp-filter-v.c \ + prctl-seccomp-strict.c prctl-securebits.c prctl-tid_address.c \ + prctl-tsc.c pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c print_maxfd.c printstr.c prlimit64.c \ + process_vm_readv.c process_vm_writev.c pselect6.c ptrace.c \ + pwritev.c qual_fault.c qual_inject-error-signal.c \ + qual_inject-retval.c qual_inject-signal.c qual_signal.c \ + quotactl.c quotactl-v.c quotactl-xfs.c quotactl-xfs-v.c \ + read-write.c readahead.c readdir.c readlink.c readlinkat.c \ + readv.c reboot.c recvfrom.c recvmmsg-timeout.c recvmsg.c \ + redirect-fds.c remap_file_pages.c rename.c renameat.c \ + renameat2.c request_key.c restart_syscall.c rmdir.c \ + rt_sigpending.c rt_sigprocmask.c rt_sigqueueinfo.c \ + rt_sigsuspend.c rt_sigtimedwait.c rt_tgsigqueueinfo.c \ + sched_get_priority_mxx.c sched_rr_get_interval.c \ + sched_xetaffinity.c sched_xetattr.c sched_xetparam.c \ + sched_xetscheduler.c sched_yield.c scm_rights.c \ + seccomp-filter.c seccomp-filter-v.c seccomp-strict.c select.c \ + semop.c sendfile.c sendfile64.c set_mempolicy.c \ + set_ptracer_any.c setdomainname.c setfsgid.c setfsgid32.c \ + setfsuid.c setfsuid32.c setgid.c setgid32.c setgroups.c \ + setgroups32.c sethostname.c setns.c setregid.c setregid32.c \ + setresgid.c setresgid32.c setresuid.c setresuid32.c setreuid.c \ + setreuid32.c setrlimit.c setuid.c setuid32.c shmxt.c \ + shutdown.c sigaction.c sigaltstack.c siginfo.c \ + signal_receive.c signalfd4.c sigreturn.c sleep.c socketcall.c \ + splice.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ + statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + threads-execve.c time.c timer_create.c timer_xettime.c \ + timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ + ugetrlimit.c uio.c umask.c umount.c umount2.c umoven-illptr.c \ + umovestr.c umovestr-illptr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unix-pair-sendto-recvfrom.c unlink.c \ + unlinkat.c unshare.c userfaultfd.c ustat.c utime.c utimensat.c \ + utimes.c vfork-f.c vhangup.c vmsplice.c wait4.c wait4-v.c \ + waitid.c waitid-v.c waitpid.c xattr.c xattr-strings.c \ + xet_robust_list.c xetitimer.c xetpgid.c xetpriority.c \ + xettimeofday.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__extra_recursive_targets = check-valgrind-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +#am__EXEEXT_1 = strace-k.test +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = .test +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing aclocal-1.14 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AUTOCONF = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing autoconf +AUTOHEADER = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing autoheader +AUTOMAKE = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing automake-1.14 +AWK = gawk +BUILD_EXEEXT = +BUILD_OBJEXT = +CC = gcc +CCDEPMODE = depmode=gcc3 +CC_FOR_BUILD = gcc +CFLAGS = -g -O2 +CFLAGS_FOR_BUILD = -g -O2 +CODE_COVERAGE_CFLAGS = +CODE_COVERAGE_CPPFLAGS = +CODE_COVERAGE_CXXFLAGS = +CODE_COVERAGE_ENABLED = no +CODE_COVERAGE_LDFLAGS = +CPP = gcc -E +CPPFLAGS = +CPPFLAGS_FOR_BUILD = +CPP_FOR_BUILD = gcc -E +CYGPATH_W = echo +DEB_CHANGELOGTIME = Wed, 15 Feb 2017 11:38:25 -0800 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +ENABLE_VALGRIND_drd = no +ENABLE_VALGRIND_helgrind = no +ENABLE_VALGRIND_memcheck = yes +ENABLE_VALGRIND_sgcheck = +EXEEXT = +GCOV = +GENHTML = +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LCOV = +LDFLAGS = +LDFLAGS_FOR_BUILD = +LIBOBJS = +LIBS = +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing makeinfo +MIPS_ABI = +MKDIR_P = /bin/mkdir -p +OBJEXT = o +PACKAGE = strace +PACKAGE_BUGREPORT = strace-devel@lists.sourceforge.net +PACKAGE_NAME = strace +PACKAGE_STRING = strace 4.16 +PACKAGE_TARNAME = strace +PACKAGE_URL = https://strace.io +PACKAGE_VERSION = 4.16 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +RANLIB = ranlib +RPM_CHANGELOGTIME = Wed Feb 15 2017 +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +VALGRIND = valgrind +VALGRIND_ENABLED = yes +VERSION = 4.16 +WARN_CFLAGS = -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings +WARN_CFLAGS_FOR_BUILD = -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings +abs_builddir = /usr/local/google/home/enh/Downloads/strace-4.16/tests-mx32 +abs_srcdir = /usr/local/google/home/enh/Downloads/strace-4.16/tests-mx32 +abs_top_builddir = /usr/local/google/home/enh/Downloads/strace-4.16 +abs_top_srcdir = /usr/local/google/home/enh/Downloads/strace-4.16 +ac_ct_CC = gcc +ac_ct_CC_FOR_BUILD = gcc +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +arch = x86_64 +arch_m32 = i386 +arch_mx32 = x32 +bindir = ${exec_prefix}/bin +build = x86_64-pc-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = pc +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +dl_LIBS = -ldl +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-pc-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +libunwind_CPPFLAGS = +libunwind_LDFLAGS = +libunwind_LIBS = +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +valgrind_enabled_tools = memcheck +valgrind_tools = memcheck helgrind drd sgcheck +OS = linux +ARCH = x32 +MPERS_NAME = mx32 +ARCH_MFLAGS = -DMPERS_IS_$(MPERS_NAME) -mx32 +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = $(ARCH_MFLAGS) \ + -I$(builddir) \ + -I$(top_builddir)/$(OS)/$(ARCH) \ + -I$(top_srcdir)/$(OS)/$(ARCH) \ + -I$(top_builddir)/$(OS) \ + -I$(top_srcdir)/$(OS) \ + -I$(top_builddir) \ + -I$(top_srcdir) + +AM_LDFLAGS = $(ARCH_MFLAGS) +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + fill_memory.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + libmmsg.c \ + libsocketcall.c \ + overflowuid.c \ + pipe_maxfd.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + signal2name.c \ + sprintrc.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES + +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) +fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mq_LDADD = -lrt $(LDADD) +mq_sendrecv_LDADD = -lrt $(LDADD) +mq_sendrecv_read_LDADD = -lrt $(LDADD) +mq_sendrecv_write_LDADD = -lrt $(LDADD) +newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +threads_execve_LDADD = -lrt -lpthread $(LDADD) +times_LDADD = -lrt $(LDADD) +truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stack_fcall_SOURCES = stack-fcall.c \ + stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c + +LIBUNWIND_TESTS = +#LIBUNWIND_TESTS = strace-k.test +DECODER_TESTS = \ + _newselect.test \ + accept.test \ + accept4.test \ + access.test \ + acct.test \ + add_key.test \ + adjtimex.test \ + aio.test \ + alarm.test \ + bpf.test \ + brk.test \ + btrfs-v.test \ + btrfs-vw.test \ + btrfs-w.test \ + btrfs.test \ + caps-abbrev.test \ + caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ + clock_nanosleep.test \ + clock_xettime.test \ + copy_file_range.test \ + creat.test \ + delete_module.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ + epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ + erestartsys.test \ + eventfd.test \ + execve-v.test \ + execve.test \ + execveat-v.test \ + execveat.test \ + faccessat.test \ + fadvise64.test \ + fadvise64_64.test \ + fallocate.test \ + fanotify_init.test \ + fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ + fcntl.test \ + fcntl64.test \ + fdatasync.test \ + file_handle.test \ + file_ioctl.test \ + finit_module.test \ + flock.test \ + fstat.test \ + fstat64.test \ + fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ + ftruncate.test \ + ftruncate64.test \ + futex.test \ + futimesat.test \ + get_mempolicy.test \ + getcpu.test \ + getcwd.test \ + getdents.test \ + getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpeername.test \ + getpgrp.test \ + getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrlimit.test \ + getrusage.test \ + getsid.test \ + getsockname.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ + inet-cmsg.test \ + init_module.test \ + inotify.test \ + inotify_init1.test \ + ioctl.test \ + ioctl_block.test \ + ioctl_dm-v.test \ + ioctl_dm.test \ + ioctl_evdev-v.test \ + ioctl_evdev.test \ + ioctl_loop-nv.test \ + ioctl_loop-v.test \ + ioctl_loop.test \ + ioctl_mtd.test \ + ioctl_rtc-v.test \ + ioctl_rtc.test \ + ioctl_scsi.test \ + ioctl_sg_io_v3.test \ + ioctl_sg_io_v4.test \ + ioctl_sock_gifconf.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ + ioprio.test \ + ip_mreq.test \ + ipc.test \ + ipc_msg.test \ + ipc_msgbuf.test \ + ipc_sem.test \ + ipc_shm.test \ + kcmp.test \ + kexec_file_load.test \ + kexec_load.test \ + keyctl.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ + llseek.test \ + lookup_dcookie.test \ + lseek.test \ + lstat.test \ + lstat64.test \ + mbind.test \ + membarrier.test \ + memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ + mlock2.test \ + mlockall.test \ + mmap.test \ + mmap64.test \ + mmsg-silent.test \ + mmsg.test \ + mmsg_name-v.test \ + mmsg_name.test \ + mount.test \ + move_pages.test \ + mq.test \ + mq_sendrecv-read.test \ + mq_sendrecv-write.test \ + mq_sendrecv.test \ + msg_control-v.test \ + msg_control.test \ + msg_name.test \ + munlockall.test \ + nanosleep.test \ + net-icmp_filter.test \ + net-sockaddr.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ + net.test \ + netlink_protocol.test \ + newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ + oldfstat.test \ + oldlstat.test \ + oldselect.test \ + oldstat.test \ + open.test \ + openat.test \ + pause.test \ + perf_event_open.test \ + perf_event_open_nonverbose.test \ + perf_event_open_unabbrev.test \ + personality.test \ + pipe.test \ + pipe2.test \ + pkey_alloc.test \ + pkey_free.test \ + pkey_mprotect.test \ + poll.test \ + ppoll.test \ + prctl-arg2-intptr.test \ + prctl-dumpable.test \ + prctl-name.test \ + prctl-no-args.test \ + prctl-pdeathsig.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + prctl-securebits.test \ + prctl-tid_address.test \ + prctl-tsc.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv.test \ + preadv2-pwritev2.test \ + printstr.test \ + prlimit64.test \ + process_vm_readv.test \ + process_vm_writev.test \ + pselect6.test \ + ptrace.test \ + pwritev.test \ + qual_fault-exit_group.test \ + quotactl-v.test \ + quotactl-xfs-v.test \ + quotactl-xfs.test \ + quotactl.test \ + read-write.test \ + readahead.test \ + readdir.test \ + readlink.test \ + readlinkat.test \ + readv.test \ + reboot.test \ + recvfrom.test \ + recvmmsg-timeout.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + request_key.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ + rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ + sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ + scm_rights-fd.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ + select.test \ + semop.test \ + sendfile.test \ + sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setns.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setrlimit.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ + shutdown.test \ + sigaction.test \ + sigaltstack.test \ + siginfo.test \ + signalfd4.test \ + sigreturn.test \ + socketcall.test \ + splice.test \ + stat.test \ + stat64.test \ + statfs.test \ + statfs64.test \ + sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ + sysinfo.test \ + syslog.test \ + tee.test \ + time.test \ + timer_create.test \ + timer_xettime.test \ + timerfd_xettime.test \ + times-fail.test \ + times.test \ + truncate.test \ + truncate64.test \ + ugetrlimit.test \ + uio.test \ + umask.test \ + umount.test \ + umount2.test \ + umoven-illptr.test \ + umovestr-illptr.test \ + umovestr.test \ + umovestr2.test \ + umovestr3.test \ + uname.test \ + unix-pair-send-recv.test \ + unix-pair-sendto-recvfrom.test \ + unlink.test \ + unlinkat.test \ + unshare.test \ + userfaultfd.test \ + ustat.test \ + utime.test \ + utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ + wait4-v.test \ + wait4.test \ + waitid-v.test \ + waitid.test \ + waitpid.test \ + xattr-strings.test \ + xattr.test \ + xet_robust_list.test \ + xetitimer.test \ + xetpgid.test \ + xetpriority.test \ + xettimeofday.test \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ + count.test \ + detach-running.test \ + detach-sleeping.test \ + detach-stopped.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + options-syntax.test \ + pc.test \ + qual_fault-syntax.test \ + qual_fault.test \ + qual_inject-error-signal.test \ + qual_inject-retval.test \ + qual_inject-signal.test \ + qual_inject-syntax.test \ + qual_signal.test \ + qual_syscall.test \ + redirect-fds.test \ + redirect.test \ + restart_syscall.test \ + signal_receive.test \ + strace-C.test \ + strace-E.test \ + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + threads-execve.test \ + vfork-f.test \ + # end of MISC_TESTS + +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) +TEST_LOG_COMPILER = env +AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh +VALGRIND_FLAGS = --quiet +VALGRIND_SUPPRESSIONS_FILES = $(srcdir)/strace.supp +EXTRA_DIST = init.sh run.sh match.awk \ + caps-abbrev.awk \ + caps.awk \ + count-f.expected \ + eventfd.expected \ + fadvise.h \ + filter-unavailable.expected \ + fstatat.c \ + fstatx.c \ + getresugid.c \ + init_delete_module.h \ + ipc.sh \ + ipc_msgbuf.expected \ + ksysent.sed \ + lstatx.c \ + net.expected \ + oldselect.expected \ + pipe.expected \ + ppoll-v.expected \ + ppoll.expected \ + process_vm_readv_writev.c \ + qual_fault-exit_group.expected \ + qual_inject-error-signal.expected \ + qual_inject-signal.expected \ + quotactl.h \ + scno_tampering.sh \ + setfsugid.c \ + setresugid.c \ + setreugid.c \ + setugid.c \ + sigaction.awk \ + sigaltstack.expected \ + sockname.c \ + statfs.expected \ + statx.sh \ + strace-C.expected \ + strace-E.expected \ + strace-T.expected \ + strace-ff.expected \ + strace-k.test \ + strace-r.expected \ + strace.supp \ + struct_flock.c \ + sun_path.expected \ + uio.expected \ + umode_t.c \ + umovestr.expected \ + unix-pair-send-recv.expected \ + unix-pair-sendto-recvfrom.expected \ + xchownx.c \ + xgetrlimit.c \ + xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ + xstatx.c \ + $(TESTS) + +objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT))) +CLEANFILES = ksysent.h $(TESTS:=.tmp) syscallent.i scno.h +SCNO_CPPFLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(ARCH_MFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) + +digits = [[:digit:]][[:digit:]]* +al_nums = [[:alnum:]_][[:alnum:]_]* +SCNO_SED = /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 +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(srcdir)/../scno.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests-mx32/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests-mx32/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/../scno.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkLIBRARIES: + -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) + +libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtests.a + $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) + $(AM_V_at)$(RANLIB) libtests.a + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) + +_newselect$(EXEEXT): $(_newselect_OBJECTS) $(_newselect_DEPENDENCIES) $(EXTRA__newselect_DEPENDENCIES) + @rm -f _newselect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(_newselect_OBJECTS) $(_newselect_LDADD) $(LIBS) + +accept$(EXEEXT): $(accept_OBJECTS) $(accept_DEPENDENCIES) $(EXTRA_accept_DEPENDENCIES) + @rm -f accept$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(accept_OBJECTS) $(accept_LDADD) $(LIBS) + +accept4$(EXEEXT): $(accept4_OBJECTS) $(accept4_DEPENDENCIES) $(EXTRA_accept4_DEPENDENCIES) + @rm -f accept4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(accept4_OBJECTS) $(accept4_LDADD) $(LIBS) + +access$(EXEEXT): $(access_OBJECTS) $(access_DEPENDENCIES) $(EXTRA_access_DEPENDENCIES) + @rm -f access$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(access_OBJECTS) $(access_LDADD) $(LIBS) + +acct$(EXEEXT): $(acct_OBJECTS) $(acct_DEPENDENCIES) $(EXTRA_acct_DEPENDENCIES) + @rm -f acct$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(acct_OBJECTS) $(acct_LDADD) $(LIBS) + +add_key$(EXEEXT): $(add_key_OBJECTS) $(add_key_DEPENDENCIES) $(EXTRA_add_key_DEPENDENCIES) + @rm -f add_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(add_key_OBJECTS) $(add_key_LDADD) $(LIBS) + +adjtimex$(EXEEXT): $(adjtimex_OBJECTS) $(adjtimex_DEPENDENCIES) $(EXTRA_adjtimex_DEPENDENCIES) + @rm -f adjtimex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(adjtimex_OBJECTS) $(adjtimex_LDADD) $(LIBS) + +aio$(EXEEXT): $(aio_OBJECTS) $(aio_DEPENDENCIES) $(EXTRA_aio_DEPENDENCIES) + @rm -f aio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(aio_OBJECTS) $(aio_LDADD) $(LIBS) + +alarm$(EXEEXT): $(alarm_OBJECTS) $(alarm_DEPENDENCIES) $(EXTRA_alarm_DEPENDENCIES) + @rm -f alarm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(alarm_OBJECTS) $(alarm_LDADD) $(LIBS) + +answer$(EXEEXT): $(answer_OBJECTS) $(answer_DEPENDENCIES) $(EXTRA_answer_DEPENDENCIES) + @rm -f answer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(answer_OBJECTS) $(answer_LDADD) $(LIBS) + +attach-f-p$(EXEEXT): $(attach_f_p_OBJECTS) $(attach_f_p_DEPENDENCIES) $(EXTRA_attach_f_p_DEPENDENCIES) + @rm -f attach-f-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_OBJECTS) $(attach_f_p_LDADD) $(LIBS) + +attach-f-p-cmd$(EXEEXT): $(attach_f_p_cmd_OBJECTS) $(attach_f_p_cmd_DEPENDENCIES) $(EXTRA_attach_f_p_cmd_DEPENDENCIES) + @rm -f attach-f-p-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_cmd_OBJECTS) $(attach_f_p_cmd_LDADD) $(LIBS) + +attach-p-cmd-cmd$(EXEEXT): $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_DEPENDENCIES) $(EXTRA_attach_p_cmd_cmd_DEPENDENCIES) + @rm -f attach-p-cmd-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_LDADD) $(LIBS) + +attach-p-cmd-p$(EXEEXT): $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_DEPENDENCIES) $(EXTRA_attach_p_cmd_p_DEPENDENCIES) + @rm -f attach-p-cmd-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_LDADD) $(LIBS) + +bpf$(EXEEXT): $(bpf_OBJECTS) $(bpf_DEPENDENCIES) $(EXTRA_bpf_DEPENDENCIES) + @rm -f bpf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(bpf_OBJECTS) $(bpf_LDADD) $(LIBS) + +brk$(EXEEXT): $(brk_OBJECTS) $(brk_DEPENDENCIES) $(EXTRA_brk_DEPENDENCIES) + @rm -f brk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(brk_OBJECTS) $(brk_LDADD) $(LIBS) + +btrfs$(EXEEXT): $(btrfs_OBJECTS) $(btrfs_DEPENDENCIES) $(EXTRA_btrfs_DEPENDENCIES) + @rm -f btrfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(btrfs_OBJECTS) $(btrfs_LDADD) $(LIBS) + +caps$(EXEEXT): $(caps_OBJECTS) $(caps_DEPENDENCIES) $(EXTRA_caps_DEPENDENCIES) + @rm -f caps$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(caps_OBJECTS) $(caps_LDADD) $(LIBS) + +caps-abbrev$(EXEEXT): $(caps_abbrev_OBJECTS) $(caps_abbrev_DEPENDENCIES) $(EXTRA_caps_abbrev_DEPENDENCIES) + @rm -f caps-abbrev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(caps_abbrev_OBJECTS) $(caps_abbrev_LDADD) $(LIBS) + +chmod$(EXEEXT): $(chmod_OBJECTS) $(chmod_DEPENDENCIES) $(EXTRA_chmod_DEPENDENCIES) + @rm -f chmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chmod_OBJECTS) $(chmod_LDADD) $(LIBS) + +chown$(EXEEXT): $(chown_OBJECTS) $(chown_DEPENDENCIES) $(EXTRA_chown_DEPENDENCIES) + @rm -f chown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown_OBJECTS) $(chown_LDADD) $(LIBS) + +chown32$(EXEEXT): $(chown32_OBJECTS) $(chown32_DEPENDENCIES) $(EXTRA_chown32_DEPENDENCIES) + @rm -f chown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown32_OBJECTS) $(chown32_LDADD) $(LIBS) + +chroot$(EXEEXT): $(chroot_OBJECTS) $(chroot_DEPENDENCIES) $(EXTRA_chroot_DEPENDENCIES) + @rm -f chroot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chroot_OBJECTS) $(chroot_LDADD) $(LIBS) + +clock_adjtime$(EXEEXT): $(clock_adjtime_OBJECTS) $(clock_adjtime_DEPENDENCIES) $(EXTRA_clock_adjtime_DEPENDENCIES) + @rm -f clock_adjtime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_adjtime_OBJECTS) $(clock_adjtime_LDADD) $(LIBS) + +clock_nanosleep$(EXEEXT): $(clock_nanosleep_OBJECTS) $(clock_nanosleep_DEPENDENCIES) $(EXTRA_clock_nanosleep_DEPENDENCIES) + @rm -f clock_nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_nanosleep_OBJECTS) $(clock_nanosleep_LDADD) $(LIBS) + +clock_xettime$(EXEEXT): $(clock_xettime_OBJECTS) $(clock_xettime_DEPENDENCIES) $(EXTRA_clock_xettime_DEPENDENCIES) + @rm -f clock_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_xettime_OBJECTS) $(clock_xettime_LDADD) $(LIBS) + +copy_file_range$(EXEEXT): $(copy_file_range_OBJECTS) $(copy_file_range_DEPENDENCIES) $(EXTRA_copy_file_range_DEPENDENCIES) + @rm -f copy_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(copy_file_range_OBJECTS) $(copy_file_range_LDADD) $(LIBS) + +count-f$(EXEEXT): $(count_f_OBJECTS) $(count_f_DEPENDENCIES) $(EXTRA_count_f_DEPENDENCIES) + @rm -f count-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(count_f_OBJECTS) $(count_f_LDADD) $(LIBS) + +creat$(EXEEXT): $(creat_OBJECTS) $(creat_DEPENDENCIES) $(EXTRA_creat_DEPENDENCIES) + @rm -f creat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(creat_OBJECTS) $(creat_LDADD) $(LIBS) + +delete_module$(EXEEXT): $(delete_module_OBJECTS) $(delete_module_DEPENDENCIES) $(EXTRA_delete_module_DEPENDENCIES) + @rm -f delete_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(delete_module_OBJECTS) $(delete_module_LDADD) $(LIBS) + +dup$(EXEEXT): $(dup_OBJECTS) $(dup_DEPENDENCIES) $(EXTRA_dup_DEPENDENCIES) + @rm -f dup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup_OBJECTS) $(dup_LDADD) $(LIBS) + +dup2$(EXEEXT): $(dup2_OBJECTS) $(dup2_DEPENDENCIES) $(EXTRA_dup2_DEPENDENCIES) + @rm -f dup2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup2_OBJECTS) $(dup2_LDADD) $(LIBS) + +dup3$(EXEEXT): $(dup3_OBJECTS) $(dup3_DEPENDENCIES) $(EXTRA_dup3_DEPENDENCIES) + @rm -f dup3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup3_OBJECTS) $(dup3_LDADD) $(LIBS) + +epoll_create$(EXEEXT): $(epoll_create_OBJECTS) $(epoll_create_DEPENDENCIES) $(EXTRA_epoll_create_DEPENDENCIES) + @rm -f epoll_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create_OBJECTS) $(epoll_create_LDADD) $(LIBS) + +epoll_create1$(EXEEXT): $(epoll_create1_OBJECTS) $(epoll_create1_DEPENDENCIES) $(EXTRA_epoll_create1_DEPENDENCIES) + @rm -f epoll_create1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create1_OBJECTS) $(epoll_create1_LDADD) $(LIBS) + +epoll_ctl$(EXEEXT): $(epoll_ctl_OBJECTS) $(epoll_ctl_DEPENDENCIES) $(EXTRA_epoll_ctl_DEPENDENCIES) + @rm -f epoll_ctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_ctl_OBJECTS) $(epoll_ctl_LDADD) $(LIBS) + +epoll_pwait$(EXEEXT): $(epoll_pwait_OBJECTS) $(epoll_pwait_DEPENDENCIES) $(EXTRA_epoll_pwait_DEPENDENCIES) + @rm -f epoll_pwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_pwait_OBJECTS) $(epoll_pwait_LDADD) $(LIBS) + +epoll_wait$(EXEEXT): $(epoll_wait_OBJECTS) $(epoll_wait_DEPENDENCIES) $(EXTRA_epoll_wait_DEPENDENCIES) + @rm -f epoll_wait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_wait_OBJECTS) $(epoll_wait_LDADD) $(LIBS) + +erestartsys$(EXEEXT): $(erestartsys_OBJECTS) $(erestartsys_DEPENDENCIES) $(EXTRA_erestartsys_DEPENDENCIES) + @rm -f erestartsys$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(erestartsys_OBJECTS) $(erestartsys_LDADD) $(LIBS) + +eventfd$(EXEEXT): $(eventfd_OBJECTS) $(eventfd_DEPENDENCIES) $(EXTRA_eventfd_DEPENDENCIES) + @rm -f eventfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(eventfd_OBJECTS) $(eventfd_LDADD) $(LIBS) + +execve$(EXEEXT): $(execve_OBJECTS) $(execve_DEPENDENCIES) $(EXTRA_execve_DEPENDENCIES) + @rm -f execve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_OBJECTS) $(execve_LDADD) $(LIBS) + +execve-v$(EXEEXT): $(execve_v_OBJECTS) $(execve_v_DEPENDENCIES) $(EXTRA_execve_v_DEPENDENCIES) + @rm -f execve-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_v_OBJECTS) $(execve_v_LDADD) $(LIBS) + +execveat$(EXEEXT): $(execveat_OBJECTS) $(execveat_DEPENDENCIES) $(EXTRA_execveat_DEPENDENCIES) + @rm -f execveat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_OBJECTS) $(execveat_LDADD) $(LIBS) + +execveat-v$(EXEEXT): $(execveat_v_OBJECTS) $(execveat_v_DEPENDENCIES) $(EXTRA_execveat_v_DEPENDENCIES) + @rm -f execveat-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_v_OBJECTS) $(execveat_v_LDADD) $(LIBS) + +faccessat$(EXEEXT): $(faccessat_OBJECTS) $(faccessat_DEPENDENCIES) $(EXTRA_faccessat_DEPENDENCIES) + @rm -f faccessat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(faccessat_OBJECTS) $(faccessat_LDADD) $(LIBS) + +fadvise64$(EXEEXT): $(fadvise64_OBJECTS) $(fadvise64_DEPENDENCIES) $(EXTRA_fadvise64_DEPENDENCIES) + @rm -f fadvise64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fadvise64_OBJECTS) $(fadvise64_LDADD) $(LIBS) + +fadvise64_64$(EXEEXT): $(fadvise64_64_OBJECTS) $(fadvise64_64_DEPENDENCIES) $(EXTRA_fadvise64_64_DEPENDENCIES) + @rm -f fadvise64_64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fadvise64_64_OBJECTS) $(fadvise64_64_LDADD) $(LIBS) + +fallocate$(EXEEXT): $(fallocate_OBJECTS) $(fallocate_DEPENDENCIES) $(EXTRA_fallocate_DEPENDENCIES) + @rm -f fallocate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fallocate_OBJECTS) $(fallocate_LDADD) $(LIBS) + +fanotify_init$(EXEEXT): $(fanotify_init_OBJECTS) $(fanotify_init_DEPENDENCIES) $(EXTRA_fanotify_init_DEPENDENCIES) + @rm -f fanotify_init$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fanotify_init_OBJECTS) $(fanotify_init_LDADD) $(LIBS) + +fanotify_mark$(EXEEXT): $(fanotify_mark_OBJECTS) $(fanotify_mark_DEPENDENCIES) $(EXTRA_fanotify_mark_DEPENDENCIES) + @rm -f fanotify_mark$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fanotify_mark_OBJECTS) $(fanotify_mark_LDADD) $(LIBS) + +fchdir$(EXEEXT): $(fchdir_OBJECTS) $(fchdir_DEPENDENCIES) $(EXTRA_fchdir_DEPENDENCIES) + @rm -f fchdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchdir_OBJECTS) $(fchdir_LDADD) $(LIBS) + +fchmod$(EXEEXT): $(fchmod_OBJECTS) $(fchmod_DEPENDENCIES) $(EXTRA_fchmod_DEPENDENCIES) + @rm -f fchmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmod_OBJECTS) $(fchmod_LDADD) $(LIBS) + +fchmodat$(EXEEXT): $(fchmodat_OBJECTS) $(fchmodat_DEPENDENCIES) $(EXTRA_fchmodat_DEPENDENCIES) + @rm -f fchmodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmodat_OBJECTS) $(fchmodat_LDADD) $(LIBS) + +fchown$(EXEEXT): $(fchown_OBJECTS) $(fchown_DEPENDENCIES) $(EXTRA_fchown_DEPENDENCIES) + @rm -f fchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown_OBJECTS) $(fchown_LDADD) $(LIBS) + +fchown32$(EXEEXT): $(fchown32_OBJECTS) $(fchown32_DEPENDENCIES) $(EXTRA_fchown32_DEPENDENCIES) + @rm -f fchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown32_OBJECTS) $(fchown32_LDADD) $(LIBS) + +fchownat$(EXEEXT): $(fchownat_OBJECTS) $(fchownat_DEPENDENCIES) $(EXTRA_fchownat_DEPENDENCIES) + @rm -f fchownat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchownat_OBJECTS) $(fchownat_LDADD) $(LIBS) + +fcntl$(EXEEXT): $(fcntl_OBJECTS) $(fcntl_DEPENDENCIES) $(EXTRA_fcntl_DEPENDENCIES) + @rm -f fcntl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcntl_OBJECTS) $(fcntl_LDADD) $(LIBS) + +fcntl64$(EXEEXT): $(fcntl64_OBJECTS) $(fcntl64_DEPENDENCIES) $(EXTRA_fcntl64_DEPENDENCIES) + @rm -f fcntl64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcntl64_OBJECTS) $(fcntl64_LDADD) $(LIBS) + +fdatasync$(EXEEXT): $(fdatasync_OBJECTS) $(fdatasync_DEPENDENCIES) $(EXTRA_fdatasync_DEPENDENCIES) + @rm -f fdatasync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fdatasync_OBJECTS) $(fdatasync_LDADD) $(LIBS) + +file_handle$(EXEEXT): $(file_handle_OBJECTS) $(file_handle_DEPENDENCIES) $(EXTRA_file_handle_DEPENDENCIES) + @rm -f file_handle$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_handle_OBJECTS) $(file_handle_LDADD) $(LIBS) + +file_ioctl$(EXEEXT): $(file_ioctl_OBJECTS) $(file_ioctl_DEPENDENCIES) $(EXTRA_file_ioctl_DEPENDENCIES) + @rm -f file_ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_ioctl_OBJECTS) $(file_ioctl_LDADD) $(LIBS) + +filter-unavailable$(EXEEXT): $(filter_unavailable_OBJECTS) $(filter_unavailable_DEPENDENCIES) $(EXTRA_filter_unavailable_DEPENDENCIES) + @rm -f filter-unavailable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(filter_unavailable_OBJECTS) $(filter_unavailable_LDADD) $(LIBS) + +finit_module$(EXEEXT): $(finit_module_OBJECTS) $(finit_module_DEPENDENCIES) $(EXTRA_finit_module_DEPENDENCIES) + @rm -f finit_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(finit_module_OBJECTS) $(finit_module_LDADD) $(LIBS) + +flock$(EXEEXT): $(flock_OBJECTS) $(flock_DEPENDENCIES) $(EXTRA_flock_DEPENDENCIES) + @rm -f flock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(flock_OBJECTS) $(flock_LDADD) $(LIBS) + +fork-f$(EXEEXT): $(fork_f_OBJECTS) $(fork_f_DEPENDENCIES) $(EXTRA_fork_f_DEPENDENCIES) + @rm -f fork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fork_f_OBJECTS) $(fork_f_LDADD) $(LIBS) + +fstat$(EXEEXT): $(fstat_OBJECTS) $(fstat_DEPENDENCIES) $(EXTRA_fstat_DEPENDENCIES) + @rm -f fstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstat_OBJECTS) $(fstat_LDADD) $(LIBS) + +fstat64$(EXEEXT): $(fstat64_OBJECTS) $(fstat64_DEPENDENCIES) $(EXTRA_fstat64_DEPENDENCIES) + @rm -f fstat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstat64_OBJECTS) $(fstat64_LDADD) $(LIBS) + +fstatat64$(EXEEXT): $(fstatat64_OBJECTS) $(fstatat64_DEPENDENCIES) $(EXTRA_fstatat64_DEPENDENCIES) + @rm -f fstatat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatat64_OBJECTS) $(fstatat64_LDADD) $(LIBS) + +fstatfs$(EXEEXT): $(fstatfs_OBJECTS) $(fstatfs_DEPENDENCIES) $(EXTRA_fstatfs_DEPENDENCIES) + @rm -f fstatfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs_OBJECTS) $(fstatfs_LDADD) $(LIBS) + +fstatfs64$(EXEEXT): $(fstatfs64_OBJECTS) $(fstatfs64_DEPENDENCIES) $(EXTRA_fstatfs64_DEPENDENCIES) + @rm -f fstatfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs64_OBJECTS) $(fstatfs64_LDADD) $(LIBS) + +fsync$(EXEEXT): $(fsync_OBJECTS) $(fsync_DEPENDENCIES) $(EXTRA_fsync_DEPENDENCIES) + @rm -f fsync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fsync_OBJECTS) $(fsync_LDADD) $(LIBS) + +ftruncate$(EXEEXT): $(ftruncate_OBJECTS) $(ftruncate_DEPENDENCIES) $(EXTRA_ftruncate_DEPENDENCIES) + @rm -f ftruncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftruncate_OBJECTS) $(ftruncate_LDADD) $(LIBS) + +ftruncate64$(EXEEXT): $(ftruncate64_OBJECTS) $(ftruncate64_DEPENDENCIES) $(EXTRA_ftruncate64_DEPENDENCIES) + @rm -f ftruncate64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftruncate64_OBJECTS) $(ftruncate64_LDADD) $(LIBS) + +futex$(EXEEXT): $(futex_OBJECTS) $(futex_DEPENDENCIES) $(EXTRA_futex_DEPENDENCIES) + @rm -f futex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futex_OBJECTS) $(futex_LDADD) $(LIBS) + +futimesat$(EXEEXT): $(futimesat_OBJECTS) $(futimesat_DEPENDENCIES) $(EXTRA_futimesat_DEPENDENCIES) + @rm -f futimesat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futimesat_OBJECTS) $(futimesat_LDADD) $(LIBS) + +get_mempolicy$(EXEEXT): $(get_mempolicy_OBJECTS) $(get_mempolicy_DEPENDENCIES) $(EXTRA_get_mempolicy_DEPENDENCIES) + @rm -f get_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(get_mempolicy_OBJECTS) $(get_mempolicy_LDADD) $(LIBS) + +getcpu$(EXEEXT): $(getcpu_OBJECTS) $(getcpu_DEPENDENCIES) $(EXTRA_getcpu_DEPENDENCIES) + @rm -f getcpu$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcpu_OBJECTS) $(getcpu_LDADD) $(LIBS) + +getcwd$(EXEEXT): $(getcwd_OBJECTS) $(getcwd_DEPENDENCIES) $(EXTRA_getcwd_DEPENDENCIES) + @rm -f getcwd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcwd_OBJECTS) $(getcwd_LDADD) $(LIBS) + +getdents$(EXEEXT): $(getdents_OBJECTS) $(getdents_DEPENDENCIES) $(EXTRA_getdents_DEPENDENCIES) + @rm -f getdents$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getdents_OBJECTS) $(getdents_LDADD) $(LIBS) + +getdents64$(EXEEXT): $(getdents64_OBJECTS) $(getdents64_DEPENDENCIES) $(EXTRA_getdents64_DEPENDENCIES) + @rm -f getdents64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getdents64_OBJECTS) $(getdents64_LDADD) $(LIBS) + +getegid$(EXEEXT): $(getegid_OBJECTS) $(getegid_DEPENDENCIES) $(EXTRA_getegid_DEPENDENCIES) + @rm -f getegid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid_OBJECTS) $(getegid_LDADD) $(LIBS) + +getegid32$(EXEEXT): $(getegid32_OBJECTS) $(getegid32_DEPENDENCIES) $(EXTRA_getegid32_DEPENDENCIES) + @rm -f getegid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid32_OBJECTS) $(getegid32_LDADD) $(LIBS) + +geteuid$(EXEEXT): $(geteuid_OBJECTS) $(geteuid_DEPENDENCIES) $(EXTRA_geteuid_DEPENDENCIES) + @rm -f geteuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid_OBJECTS) $(geteuid_LDADD) $(LIBS) + +geteuid32$(EXEEXT): $(geteuid32_OBJECTS) $(geteuid32_DEPENDENCIES) $(EXTRA_geteuid32_DEPENDENCIES) + @rm -f geteuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid32_OBJECTS) $(geteuid32_LDADD) $(LIBS) + +getgid$(EXEEXT): $(getgid_OBJECTS) $(getgid_DEPENDENCIES) $(EXTRA_getgid_DEPENDENCIES) + @rm -f getgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid_OBJECTS) $(getgid_LDADD) $(LIBS) + +getgid32$(EXEEXT): $(getgid32_OBJECTS) $(getgid32_DEPENDENCIES) $(EXTRA_getgid32_DEPENDENCIES) + @rm -f getgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid32_OBJECTS) $(getgid32_LDADD) $(LIBS) + +getgroups$(EXEEXT): $(getgroups_OBJECTS) $(getgroups_DEPENDENCIES) $(EXTRA_getgroups_DEPENDENCIES) + @rm -f getgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups_OBJECTS) $(getgroups_LDADD) $(LIBS) + +getgroups32$(EXEEXT): $(getgroups32_OBJECTS) $(getgroups32_DEPENDENCIES) $(EXTRA_getgroups32_DEPENDENCIES) + @rm -f getgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups32_OBJECTS) $(getgroups32_LDADD) $(LIBS) + +getpeername$(EXEEXT): $(getpeername_OBJECTS) $(getpeername_DEPENDENCIES) $(EXTRA_getpeername_DEPENDENCIES) + @rm -f getpeername$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpeername_OBJECTS) $(getpeername_LDADD) $(LIBS) + +getpgrp$(EXEEXT): $(getpgrp_OBJECTS) $(getpgrp_DEPENDENCIES) $(EXTRA_getpgrp_DEPENDENCIES) + @rm -f getpgrp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpgrp_OBJECTS) $(getpgrp_LDADD) $(LIBS) + +getrandom$(EXEEXT): $(getrandom_OBJECTS) $(getrandom_DEPENDENCIES) $(EXTRA_getrandom_DEPENDENCIES) + @rm -f getrandom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrandom_OBJECTS) $(getrandom_LDADD) $(LIBS) + +getresgid$(EXEEXT): $(getresgid_OBJECTS) $(getresgid_DEPENDENCIES) $(EXTRA_getresgid_DEPENDENCIES) + @rm -f getresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid_OBJECTS) $(getresgid_LDADD) $(LIBS) + +getresgid32$(EXEEXT): $(getresgid32_OBJECTS) $(getresgid32_DEPENDENCIES) $(EXTRA_getresgid32_DEPENDENCIES) + @rm -f getresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid32_OBJECTS) $(getresgid32_LDADD) $(LIBS) + +getresuid$(EXEEXT): $(getresuid_OBJECTS) $(getresuid_DEPENDENCIES) $(EXTRA_getresuid_DEPENDENCIES) + @rm -f getresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid_OBJECTS) $(getresuid_LDADD) $(LIBS) + +getresuid32$(EXEEXT): $(getresuid32_OBJECTS) $(getresuid32_DEPENDENCIES) $(EXTRA_getresuid32_DEPENDENCIES) + @rm -f getresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid32_OBJECTS) $(getresuid32_LDADD) $(LIBS) + +getrlimit$(EXEEXT): $(getrlimit_OBJECTS) $(getrlimit_DEPENDENCIES) $(EXTRA_getrlimit_DEPENDENCIES) + @rm -f getrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrlimit_OBJECTS) $(getrlimit_LDADD) $(LIBS) + +getrusage$(EXEEXT): $(getrusage_OBJECTS) $(getrusage_DEPENDENCIES) $(EXTRA_getrusage_DEPENDENCIES) + @rm -f getrusage$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrusage_OBJECTS) $(getrusage_LDADD) $(LIBS) + +getsid$(EXEEXT): $(getsid_OBJECTS) $(getsid_DEPENDENCIES) $(EXTRA_getsid_DEPENDENCIES) + @rm -f getsid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsid_OBJECTS) $(getsid_LDADD) $(LIBS) + +getsockname$(EXEEXT): $(getsockname_OBJECTS) $(getsockname_DEPENDENCIES) $(EXTRA_getsockname_DEPENDENCIES) + @rm -f getsockname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsockname_OBJECTS) $(getsockname_LDADD) $(LIBS) + +getuid$(EXEEXT): $(getuid_OBJECTS) $(getuid_DEPENDENCIES) $(EXTRA_getuid_DEPENDENCIES) + @rm -f getuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid_OBJECTS) $(getuid_LDADD) $(LIBS) + +getuid32$(EXEEXT): $(getuid32_OBJECTS) $(getuid32_DEPENDENCIES) $(EXTRA_getuid32_DEPENDENCIES) + @rm -f getuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid32_OBJECTS) $(getuid32_LDADD) $(LIBS) + +getxxid$(EXEEXT): $(getxxid_OBJECTS) $(getxxid_DEPENDENCIES) $(EXTRA_getxxid_DEPENDENCIES) + @rm -f getxxid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getxxid_OBJECTS) $(getxxid_LDADD) $(LIBS) + +inet-cmsg$(EXEEXT): $(inet_cmsg_OBJECTS) $(inet_cmsg_DEPENDENCIES) $(EXTRA_inet_cmsg_DEPENDENCIES) + @rm -f inet-cmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inet_cmsg_OBJECTS) $(inet_cmsg_LDADD) $(LIBS) + +init_module$(EXEEXT): $(init_module_OBJECTS) $(init_module_DEPENDENCIES) $(EXTRA_init_module_DEPENDENCIES) + @rm -f init_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(init_module_OBJECTS) $(init_module_LDADD) $(LIBS) + +inotify$(EXEEXT): $(inotify_OBJECTS) $(inotify_DEPENDENCIES) $(EXTRA_inotify_DEPENDENCIES) + @rm -f inotify$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inotify_OBJECTS) $(inotify_LDADD) $(LIBS) + +inotify_init1$(EXEEXT): $(inotify_init1_OBJECTS) $(inotify_init1_DEPENDENCIES) $(EXTRA_inotify_init1_DEPENDENCIES) + @rm -f inotify_init1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inotify_init1_OBJECTS) $(inotify_init1_LDADD) $(LIBS) + +ioctl$(EXEEXT): $(ioctl_OBJECTS) $(ioctl_DEPENDENCIES) $(EXTRA_ioctl_DEPENDENCIES) + @rm -f ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_OBJECTS) $(ioctl_LDADD) $(LIBS) + +ioctl_block$(EXEEXT): $(ioctl_block_OBJECTS) $(ioctl_block_DEPENDENCIES) $(EXTRA_ioctl_block_DEPENDENCIES) + @rm -f ioctl_block$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_block_OBJECTS) $(ioctl_block_LDADD) $(LIBS) + +ioctl_dm$(EXEEXT): $(ioctl_dm_OBJECTS) $(ioctl_dm_DEPENDENCIES) $(EXTRA_ioctl_dm_DEPENDENCIES) + @rm -f ioctl_dm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_dm_OBJECTS) $(ioctl_dm_LDADD) $(LIBS) + +ioctl_dm-v$(EXEEXT): $(ioctl_dm_v_OBJECTS) $(ioctl_dm_v_DEPENDENCIES) $(EXTRA_ioctl_dm_v_DEPENDENCIES) + @rm -f ioctl_dm-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_dm_v_OBJECTS) $(ioctl_dm_v_LDADD) $(LIBS) + +ioctl_evdev$(EXEEXT): $(ioctl_evdev_OBJECTS) $(ioctl_evdev_DEPENDENCIES) $(EXTRA_ioctl_evdev_DEPENDENCIES) + @rm -f ioctl_evdev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_OBJECTS) $(ioctl_evdev_LDADD) $(LIBS) + +ioctl_evdev-v$(EXEEXT): $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_DEPENDENCIES) $(EXTRA_ioctl_evdev_v_DEPENDENCIES) + @rm -f ioctl_evdev-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_LDADD) $(LIBS) + +ioctl_loop$(EXEEXT): $(ioctl_loop_OBJECTS) $(ioctl_loop_DEPENDENCIES) $(EXTRA_ioctl_loop_DEPENDENCIES) + @rm -f ioctl_loop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_OBJECTS) $(ioctl_loop_LDADD) $(LIBS) + +ioctl_loop-nv$(EXEEXT): $(ioctl_loop_nv_OBJECTS) $(ioctl_loop_nv_DEPENDENCIES) $(EXTRA_ioctl_loop_nv_DEPENDENCIES) + @rm -f ioctl_loop-nv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_nv_OBJECTS) $(ioctl_loop_nv_LDADD) $(LIBS) + +ioctl_loop-v$(EXEEXT): $(ioctl_loop_v_OBJECTS) $(ioctl_loop_v_DEPENDENCIES) $(EXTRA_ioctl_loop_v_DEPENDENCIES) + @rm -f ioctl_loop-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_v_OBJECTS) $(ioctl_loop_v_LDADD) $(LIBS) + +ioctl_mtd$(EXEEXT): $(ioctl_mtd_OBJECTS) $(ioctl_mtd_DEPENDENCIES) $(EXTRA_ioctl_mtd_DEPENDENCIES) + @rm -f ioctl_mtd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_mtd_OBJECTS) $(ioctl_mtd_LDADD) $(LIBS) + +ioctl_rtc$(EXEEXT): $(ioctl_rtc_OBJECTS) $(ioctl_rtc_DEPENDENCIES) $(EXTRA_ioctl_rtc_DEPENDENCIES) + @rm -f ioctl_rtc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_OBJECTS) $(ioctl_rtc_LDADD) $(LIBS) + +ioctl_rtc-v$(EXEEXT): $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_DEPENDENCIES) $(EXTRA_ioctl_rtc_v_DEPENDENCIES) + @rm -f ioctl_rtc-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_LDADD) $(LIBS) + +ioctl_scsi$(EXEEXT): $(ioctl_scsi_OBJECTS) $(ioctl_scsi_DEPENDENCIES) $(EXTRA_ioctl_scsi_DEPENDENCIES) + @rm -f ioctl_scsi$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_scsi_OBJECTS) $(ioctl_scsi_LDADD) $(LIBS) + +ioctl_sg_io_v3$(EXEEXT): $(ioctl_sg_io_v3_OBJECTS) $(ioctl_sg_io_v3_DEPENDENCIES) $(EXTRA_ioctl_sg_io_v3_DEPENDENCIES) + @rm -f ioctl_sg_io_v3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sg_io_v3_OBJECTS) $(ioctl_sg_io_v3_LDADD) $(LIBS) + +ioctl_sg_io_v4$(EXEEXT): $(ioctl_sg_io_v4_OBJECTS) $(ioctl_sg_io_v4_DEPENDENCIES) $(EXTRA_ioctl_sg_io_v4_DEPENDENCIES) + @rm -f ioctl_sg_io_v4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sg_io_v4_OBJECTS) $(ioctl_sg_io_v4_LDADD) $(LIBS) + +ioctl_sock_gifconf$(EXEEXT): $(ioctl_sock_gifconf_OBJECTS) $(ioctl_sock_gifconf_DEPENDENCIES) $(EXTRA_ioctl_sock_gifconf_DEPENDENCIES) + @rm -f ioctl_sock_gifconf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sock_gifconf_OBJECTS) $(ioctl_sock_gifconf_LDADD) $(LIBS) + +ioctl_uffdio$(EXEEXT): $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_DEPENDENCIES) $(EXTRA_ioctl_uffdio_DEPENDENCIES) + @rm -f ioctl_uffdio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_LDADD) $(LIBS) + +ioctl_v4l2$(EXEEXT): $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_DEPENDENCIES) $(EXTRA_ioctl_v4l2_DEPENDENCIES) + @rm -f ioctl_v4l2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_LDADD) $(LIBS) + +ioperm$(EXEEXT): $(ioperm_OBJECTS) $(ioperm_DEPENDENCIES) $(EXTRA_ioperm_DEPENDENCIES) + @rm -f ioperm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioperm_OBJECTS) $(ioperm_LDADD) $(LIBS) + +iopl$(EXEEXT): $(iopl_OBJECTS) $(iopl_DEPENDENCIES) $(EXTRA_iopl_DEPENDENCIES) + @rm -f iopl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(iopl_OBJECTS) $(iopl_LDADD) $(LIBS) + +ioprio$(EXEEXT): $(ioprio_OBJECTS) $(ioprio_DEPENDENCIES) $(EXTRA_ioprio_DEPENDENCIES) + @rm -f ioprio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioprio_OBJECTS) $(ioprio_LDADD) $(LIBS) + +ip_mreq$(EXEEXT): $(ip_mreq_OBJECTS) $(ip_mreq_DEPENDENCIES) $(EXTRA_ip_mreq_DEPENDENCIES) + @rm -f ip_mreq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ip_mreq_OBJECTS) $(ip_mreq_LDADD) $(LIBS) + +ipc$(EXEEXT): $(ipc_OBJECTS) $(ipc_DEPENDENCIES) $(EXTRA_ipc_DEPENDENCIES) + @rm -f ipc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_OBJECTS) $(ipc_LDADD) $(LIBS) + +ipc_msg$(EXEEXT): $(ipc_msg_OBJECTS) $(ipc_msg_DEPENDENCIES) $(EXTRA_ipc_msg_DEPENDENCIES) + @rm -f ipc_msg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_msg_OBJECTS) $(ipc_msg_LDADD) $(LIBS) + +ipc_msgbuf$(EXEEXT): $(ipc_msgbuf_OBJECTS) $(ipc_msgbuf_DEPENDENCIES) $(EXTRA_ipc_msgbuf_DEPENDENCIES) + @rm -f ipc_msgbuf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_msgbuf_OBJECTS) $(ipc_msgbuf_LDADD) $(LIBS) + +ipc_sem$(EXEEXT): $(ipc_sem_OBJECTS) $(ipc_sem_DEPENDENCIES) $(EXTRA_ipc_sem_DEPENDENCIES) + @rm -f ipc_sem$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_sem_OBJECTS) $(ipc_sem_LDADD) $(LIBS) + +ipc_shm$(EXEEXT): $(ipc_shm_OBJECTS) $(ipc_shm_DEPENDENCIES) $(EXTRA_ipc_shm_DEPENDENCIES) + @rm -f ipc_shm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_shm_OBJECTS) $(ipc_shm_LDADD) $(LIBS) + +kcmp$(EXEEXT): $(kcmp_OBJECTS) $(kcmp_DEPENDENCIES) $(EXTRA_kcmp_DEPENDENCIES) + @rm -f kcmp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kcmp_OBJECTS) $(kcmp_LDADD) $(LIBS) + +kexec_file_load$(EXEEXT): $(kexec_file_load_OBJECTS) $(kexec_file_load_DEPENDENCIES) $(EXTRA_kexec_file_load_DEPENDENCIES) + @rm -f kexec_file_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kexec_file_load_OBJECTS) $(kexec_file_load_LDADD) $(LIBS) + +kexec_load$(EXEEXT): $(kexec_load_OBJECTS) $(kexec_load_DEPENDENCIES) $(EXTRA_kexec_load_DEPENDENCIES) + @rm -f kexec_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kexec_load_OBJECTS) $(kexec_load_LDADD) $(LIBS) + +keyctl$(EXEEXT): $(keyctl_OBJECTS) $(keyctl_DEPENDENCIES) $(EXTRA_keyctl_DEPENDENCIES) + @rm -f keyctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(keyctl_OBJECTS) $(keyctl_LDADD) $(LIBS) + +kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES) $(EXTRA_kill_DEPENDENCIES) + @rm -f kill$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kill_OBJECTS) $(kill_LDADD) $(LIBS) + +ksysent$(EXEEXT): $(ksysent_OBJECTS) $(ksysent_DEPENDENCIES) $(EXTRA_ksysent_DEPENDENCIES) + @rm -f ksysent$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ksysent_OBJECTS) $(ksysent_LDADD) $(LIBS) + +lchown$(EXEEXT): $(lchown_OBJECTS) $(lchown_DEPENDENCIES) $(EXTRA_lchown_DEPENDENCIES) + @rm -f lchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown_OBJECTS) $(lchown_LDADD) $(LIBS) + +lchown32$(EXEEXT): $(lchown32_OBJECTS) $(lchown32_DEPENDENCIES) $(EXTRA_lchown32_DEPENDENCIES) + @rm -f lchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown32_OBJECTS) $(lchown32_LDADD) $(LIBS) + +link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES) $(EXTRA_link_DEPENDENCIES) + @rm -f link$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(link_OBJECTS) $(link_LDADD) $(LIBS) + +linkat$(EXEEXT): $(linkat_OBJECTS) $(linkat_DEPENDENCIES) $(EXTRA_linkat_DEPENDENCIES) + @rm -f linkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(linkat_OBJECTS) $(linkat_LDADD) $(LIBS) + +llseek$(EXEEXT): $(llseek_OBJECTS) $(llseek_DEPENDENCIES) $(EXTRA_llseek_DEPENDENCIES) + @rm -f llseek$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(llseek_OBJECTS) $(llseek_LDADD) $(LIBS) + +lookup_dcookie$(EXEEXT): $(lookup_dcookie_OBJECTS) $(lookup_dcookie_DEPENDENCIES) $(EXTRA_lookup_dcookie_DEPENDENCIES) + @rm -f lookup_dcookie$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lookup_dcookie_OBJECTS) $(lookup_dcookie_LDADD) $(LIBS) + +lseek$(EXEEXT): $(lseek_OBJECTS) $(lseek_DEPENDENCIES) $(EXTRA_lseek_DEPENDENCIES) + @rm -f lseek$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lseek_OBJECTS) $(lseek_LDADD) $(LIBS) + +lstat$(EXEEXT): $(lstat_OBJECTS) $(lstat_DEPENDENCIES) $(EXTRA_lstat_DEPENDENCIES) + @rm -f lstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lstat_OBJECTS) $(lstat_LDADD) $(LIBS) + +lstat64$(EXEEXT): $(lstat64_OBJECTS) $(lstat64_DEPENDENCIES) $(EXTRA_lstat64_DEPENDENCIES) + @rm -f lstat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lstat64_OBJECTS) $(lstat64_LDADD) $(LIBS) + +mbind$(EXEEXT): $(mbind_OBJECTS) $(mbind_DEPENDENCIES) $(EXTRA_mbind_DEPENDENCIES) + @rm -f mbind$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mbind_OBJECTS) $(mbind_LDADD) $(LIBS) + +membarrier$(EXEEXT): $(membarrier_OBJECTS) $(membarrier_DEPENDENCIES) $(EXTRA_membarrier_DEPENDENCIES) + @rm -f membarrier$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(membarrier_OBJECTS) $(membarrier_LDADD) $(LIBS) + +memfd_create$(EXEEXT): $(memfd_create_OBJECTS) $(memfd_create_DEPENDENCIES) $(EXTRA_memfd_create_DEPENDENCIES) + @rm -f memfd_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(memfd_create_OBJECTS) $(memfd_create_LDADD) $(LIBS) + +migrate_pages$(EXEEXT): $(migrate_pages_OBJECTS) $(migrate_pages_DEPENDENCIES) $(EXTRA_migrate_pages_DEPENDENCIES) + @rm -f migrate_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(migrate_pages_OBJECTS) $(migrate_pages_LDADD) $(LIBS) + +mincore$(EXEEXT): $(mincore_OBJECTS) $(mincore_DEPENDENCIES) $(EXTRA_mincore_DEPENDENCIES) + @rm -f mincore$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mincore_OBJECTS) $(mincore_LDADD) $(LIBS) + +mkdir$(EXEEXT): $(mkdir_OBJECTS) $(mkdir_DEPENDENCIES) $(EXTRA_mkdir_DEPENDENCIES) + @rm -f mkdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdir_OBJECTS) $(mkdir_LDADD) $(LIBS) + +mkdirat$(EXEEXT): $(mkdirat_OBJECTS) $(mkdirat_DEPENDENCIES) $(EXTRA_mkdirat_DEPENDENCIES) + @rm -f mkdirat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdirat_OBJECTS) $(mkdirat_LDADD) $(LIBS) + +mknod$(EXEEXT): $(mknod_OBJECTS) $(mknod_DEPENDENCIES) $(EXTRA_mknod_DEPENDENCIES) + @rm -f mknod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknod_OBJECTS) $(mknod_LDADD) $(LIBS) + +mknodat$(EXEEXT): $(mknodat_OBJECTS) $(mknodat_DEPENDENCIES) $(EXTRA_mknodat_DEPENDENCIES) + @rm -f mknodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknodat_OBJECTS) $(mknodat_LDADD) $(LIBS) + +mlock$(EXEEXT): $(mlock_OBJECTS) $(mlock_DEPENDENCIES) $(EXTRA_mlock_DEPENDENCIES) + @rm -f mlock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock_OBJECTS) $(mlock_LDADD) $(LIBS) + +mlock2$(EXEEXT): $(mlock2_OBJECTS) $(mlock2_DEPENDENCIES) $(EXTRA_mlock2_DEPENDENCIES) + @rm -f mlock2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock2_OBJECTS) $(mlock2_LDADD) $(LIBS) + +mlockall$(EXEEXT): $(mlockall_OBJECTS) $(mlockall_DEPENDENCIES) $(EXTRA_mlockall_DEPENDENCIES) + @rm -f mlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlockall_OBJECTS) $(mlockall_LDADD) $(LIBS) + +mmap$(EXEEXT): $(mmap_OBJECTS) $(mmap_DEPENDENCIES) $(EXTRA_mmap_DEPENDENCIES) + @rm -f mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmap_OBJECTS) $(mmap_LDADD) $(LIBS) + +mmap64$(EXEEXT): $(mmap64_OBJECTS) $(mmap64_DEPENDENCIES) $(EXTRA_mmap64_DEPENDENCIES) + @rm -f mmap64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmap64_OBJECTS) $(mmap64_LDADD) $(LIBS) + +mmsg$(EXEEXT): $(mmsg_OBJECTS) $(mmsg_DEPENDENCIES) $(EXTRA_mmsg_DEPENDENCIES) + @rm -f mmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_OBJECTS) $(mmsg_LDADD) $(LIBS) + +mmsg-silent$(EXEEXT): $(mmsg_silent_OBJECTS) $(mmsg_silent_DEPENDENCIES) $(EXTRA_mmsg_silent_DEPENDENCIES) + @rm -f mmsg-silent$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_silent_OBJECTS) $(mmsg_silent_LDADD) $(LIBS) + +mmsg_name$(EXEEXT): $(mmsg_name_OBJECTS) $(mmsg_name_DEPENDENCIES) $(EXTRA_mmsg_name_DEPENDENCIES) + @rm -f mmsg_name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_name_OBJECTS) $(mmsg_name_LDADD) $(LIBS) + +mmsg_name-v$(EXEEXT): $(mmsg_name_v_OBJECTS) $(mmsg_name_v_DEPENDENCIES) $(EXTRA_mmsg_name_v_DEPENDENCIES) + @rm -f mmsg_name-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_name_v_OBJECTS) $(mmsg_name_v_LDADD) $(LIBS) + +mount$(EXEEXT): $(mount_OBJECTS) $(mount_DEPENDENCIES) $(EXTRA_mount_DEPENDENCIES) + @rm -f mount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mount_OBJECTS) $(mount_LDADD) $(LIBS) + +move_pages$(EXEEXT): $(move_pages_OBJECTS) $(move_pages_DEPENDENCIES) $(EXTRA_move_pages_DEPENDENCIES) + @rm -f move_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(move_pages_OBJECTS) $(move_pages_LDADD) $(LIBS) + +mq$(EXEEXT): $(mq_OBJECTS) $(mq_DEPENDENCIES) $(EXTRA_mq_DEPENDENCIES) + @rm -f mq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_OBJECTS) $(mq_LDADD) $(LIBS) + +mq_sendrecv$(EXEEXT): $(mq_sendrecv_OBJECTS) $(mq_sendrecv_DEPENDENCIES) $(EXTRA_mq_sendrecv_DEPENDENCIES) + @rm -f mq_sendrecv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_OBJECTS) $(mq_sendrecv_LDADD) $(LIBS) + +mq_sendrecv-read$(EXEEXT): $(mq_sendrecv_read_OBJECTS) $(mq_sendrecv_read_DEPENDENCIES) $(EXTRA_mq_sendrecv_read_DEPENDENCIES) + @rm -f mq_sendrecv-read$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_read_OBJECTS) $(mq_sendrecv_read_LDADD) $(LIBS) + +mq_sendrecv-write$(EXEEXT): $(mq_sendrecv_write_OBJECTS) $(mq_sendrecv_write_DEPENDENCIES) $(EXTRA_mq_sendrecv_write_DEPENDENCIES) + @rm -f mq_sendrecv-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_write_OBJECTS) $(mq_sendrecv_write_LDADD) $(LIBS) + +msg_control$(EXEEXT): $(msg_control_OBJECTS) $(msg_control_DEPENDENCIES) $(EXTRA_msg_control_DEPENDENCIES) + @rm -f msg_control$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_control_OBJECTS) $(msg_control_LDADD) $(LIBS) + +msg_control-v$(EXEEXT): $(msg_control_v_OBJECTS) $(msg_control_v_DEPENDENCIES) $(EXTRA_msg_control_v_DEPENDENCIES) + @rm -f msg_control-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_control_v_OBJECTS) $(msg_control_v_LDADD) $(LIBS) + +msg_name$(EXEEXT): $(msg_name_OBJECTS) $(msg_name_DEPENDENCIES) $(EXTRA_msg_name_DEPENDENCIES) + @rm -f msg_name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_name_OBJECTS) $(msg_name_LDADD) $(LIBS) + +munlockall$(EXEEXT): $(munlockall_OBJECTS) $(munlockall_DEPENDENCIES) $(EXTRA_munlockall_DEPENDENCIES) + @rm -f munlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(munlockall_OBJECTS) $(munlockall_LDADD) $(LIBS) + +nanosleep$(EXEEXT): $(nanosleep_OBJECTS) $(nanosleep_DEPENDENCIES) $(EXTRA_nanosleep_DEPENDENCIES) + @rm -f nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nanosleep_OBJECTS) $(nanosleep_LDADD) $(LIBS) + +net-accept-connect$(EXEEXT): $(net_accept_connect_OBJECTS) $(net_accept_connect_DEPENDENCIES) $(EXTRA_net_accept_connect_DEPENDENCIES) + @rm -f net-accept-connect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_accept_connect_OBJECTS) $(net_accept_connect_LDADD) $(LIBS) + +net-icmp_filter$(EXEEXT): $(net_icmp_filter_OBJECTS) $(net_icmp_filter_DEPENDENCIES) $(EXTRA_net_icmp_filter_DEPENDENCIES) + @rm -f net-icmp_filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_icmp_filter_OBJECTS) $(net_icmp_filter_LDADD) $(LIBS) + +net-sockaddr$(EXEEXT): $(net_sockaddr_OBJECTS) $(net_sockaddr_DEPENDENCIES) $(EXTRA_net_sockaddr_DEPENDENCIES) + @rm -f net-sockaddr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_sockaddr_OBJECTS) $(net_sockaddr_LDADD) $(LIBS) + +net-y-unix$(EXEEXT): $(net_y_unix_OBJECTS) $(net_y_unix_DEPENDENCIES) $(EXTRA_net_y_unix_DEPENDENCIES) + @rm -f net-y-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_y_unix_OBJECTS) $(net_y_unix_LDADD) $(LIBS) + +net-yy-inet$(EXEEXT): $(net_yy_inet_OBJECTS) $(net_yy_inet_DEPENDENCIES) $(EXTRA_net_yy_inet_DEPENDENCIES) + @rm -f net-yy-inet$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_inet_OBJECTS) $(net_yy_inet_LDADD) $(LIBS) + +net-yy-netlink$(EXEEXT): $(net_yy_netlink_OBJECTS) $(net_yy_netlink_DEPENDENCIES) $(EXTRA_net_yy_netlink_DEPENDENCIES) + @rm -f net-yy-netlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_netlink_OBJECTS) $(net_yy_netlink_LDADD) $(LIBS) + +net-yy-unix$(EXEEXT): $(net_yy_unix_OBJECTS) $(net_yy_unix_DEPENDENCIES) $(EXTRA_net_yy_unix_DEPENDENCIES) + @rm -f net-yy-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_unix_OBJECTS) $(net_yy_unix_LDADD) $(LIBS) + +netlink_inet_diag$(EXEEXT): $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_DEPENDENCIES) $(EXTRA_netlink_inet_diag_DEPENDENCIES) + @rm -f netlink_inet_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_LDADD) $(LIBS) + +netlink_netlink_diag$(EXEEXT): $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_DEPENDENCIES) $(EXTRA_netlink_netlink_diag_DEPENDENCIES) + @rm -f netlink_netlink_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_LDADD) $(LIBS) + +netlink_protocol$(EXEEXT): $(netlink_protocol_OBJECTS) $(netlink_protocol_DEPENDENCIES) $(EXTRA_netlink_protocol_DEPENDENCIES) + @rm -f netlink_protocol$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_protocol_OBJECTS) $(netlink_protocol_LDADD) $(LIBS) + +netlink_unix_diag$(EXEEXT): $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_DEPENDENCIES) $(EXTRA_netlink_unix_diag_DEPENDENCIES) + @rm -f netlink_unix_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_LDADD) $(LIBS) + +newfstatat$(EXEEXT): $(newfstatat_OBJECTS) $(newfstatat_DEPENDENCIES) $(EXTRA_newfstatat_DEPENDENCIES) + @rm -f newfstatat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(newfstatat_OBJECTS) $(newfstatat_LDADD) $(LIBS) + +nsyscalls$(EXEEXT): $(nsyscalls_OBJECTS) $(nsyscalls_DEPENDENCIES) $(EXTRA_nsyscalls_DEPENDENCIES) + @rm -f nsyscalls$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nsyscalls_OBJECTS) $(nsyscalls_LDADD) $(LIBS) + +old_mmap$(EXEEXT): $(old_mmap_OBJECTS) $(old_mmap_DEPENDENCIES) $(EXTRA_old_mmap_DEPENDENCIES) + @rm -f old_mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(old_mmap_OBJECTS) $(old_mmap_LDADD) $(LIBS) + +oldfstat$(EXEEXT): $(oldfstat_OBJECTS) $(oldfstat_DEPENDENCIES) $(EXTRA_oldfstat_DEPENDENCIES) + @rm -f oldfstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldfstat_OBJECTS) $(oldfstat_LDADD) $(LIBS) + +oldlstat$(EXEEXT): $(oldlstat_OBJECTS) $(oldlstat_DEPENDENCIES) $(EXTRA_oldlstat_DEPENDENCIES) + @rm -f oldlstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldlstat_OBJECTS) $(oldlstat_LDADD) $(LIBS) + +oldselect$(EXEEXT): $(oldselect_OBJECTS) $(oldselect_DEPENDENCIES) $(EXTRA_oldselect_DEPENDENCIES) + @rm -f oldselect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldselect_OBJECTS) $(oldselect_LDADD) $(LIBS) + +oldstat$(EXEEXT): $(oldstat_OBJECTS) $(oldstat_DEPENDENCIES) $(EXTRA_oldstat_DEPENDENCIES) + @rm -f oldstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldstat_OBJECTS) $(oldstat_LDADD) $(LIBS) + +open$(EXEEXT): $(open_OBJECTS) $(open_DEPENDENCIES) $(EXTRA_open_DEPENDENCIES) + @rm -f open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(open_OBJECTS) $(open_LDADD) $(LIBS) + +openat$(EXEEXT): $(openat_OBJECTS) $(openat_DEPENDENCIES) $(EXTRA_openat_DEPENDENCIES) + @rm -f openat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(openat_OBJECTS) $(openat_LDADD) $(LIBS) + +pause$(EXEEXT): $(pause_OBJECTS) $(pause_DEPENDENCIES) $(EXTRA_pause_DEPENDENCIES) + @rm -f pause$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pause_OBJECTS) $(pause_LDADD) $(LIBS) + +pc$(EXEEXT): $(pc_OBJECTS) $(pc_DEPENDENCIES) $(EXTRA_pc_DEPENDENCIES) + @rm -f pc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pc_OBJECTS) $(pc_LDADD) $(LIBS) + +perf_event_open$(EXEEXT): $(perf_event_open_OBJECTS) $(perf_event_open_DEPENDENCIES) $(EXTRA_perf_event_open_DEPENDENCIES) + @rm -f perf_event_open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_OBJECTS) $(perf_event_open_LDADD) $(LIBS) + +perf_event_open_nonverbose$(EXEEXT): $(perf_event_open_nonverbose_OBJECTS) $(perf_event_open_nonverbose_DEPENDENCIES) $(EXTRA_perf_event_open_nonverbose_DEPENDENCIES) + @rm -f perf_event_open_nonverbose$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_nonverbose_OBJECTS) $(perf_event_open_nonverbose_LDADD) $(LIBS) + +perf_event_open_unabbrev$(EXEEXT): $(perf_event_open_unabbrev_OBJECTS) $(perf_event_open_unabbrev_DEPENDENCIES) $(EXTRA_perf_event_open_unabbrev_DEPENDENCIES) + @rm -f perf_event_open_unabbrev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_unabbrev_OBJECTS) $(perf_event_open_unabbrev_LDADD) $(LIBS) + +personality$(EXEEXT): $(personality_OBJECTS) $(personality_DEPENDENCIES) $(EXTRA_personality_DEPENDENCIES) + @rm -f personality$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(personality_OBJECTS) $(personality_LDADD) $(LIBS) + +pipe$(EXEEXT): $(pipe_OBJECTS) $(pipe_DEPENDENCIES) $(EXTRA_pipe_DEPENDENCIES) + @rm -f pipe$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pipe_OBJECTS) $(pipe_LDADD) $(LIBS) + +pipe2$(EXEEXT): $(pipe2_OBJECTS) $(pipe2_DEPENDENCIES) $(EXTRA_pipe2_DEPENDENCIES) + @rm -f pipe2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pipe2_OBJECTS) $(pipe2_LDADD) $(LIBS) + +pkey_alloc$(EXEEXT): $(pkey_alloc_OBJECTS) $(pkey_alloc_DEPENDENCIES) $(EXTRA_pkey_alloc_DEPENDENCIES) + @rm -f pkey_alloc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_alloc_OBJECTS) $(pkey_alloc_LDADD) $(LIBS) + +pkey_free$(EXEEXT): $(pkey_free_OBJECTS) $(pkey_free_DEPENDENCIES) $(EXTRA_pkey_free_DEPENDENCIES) + @rm -f pkey_free$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_free_OBJECTS) $(pkey_free_LDADD) $(LIBS) + +pkey_mprotect$(EXEEXT): $(pkey_mprotect_OBJECTS) $(pkey_mprotect_DEPENDENCIES) $(EXTRA_pkey_mprotect_DEPENDENCIES) + @rm -f pkey_mprotect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_mprotect_OBJECTS) $(pkey_mprotect_LDADD) $(LIBS) + +poll$(EXEEXT): $(poll_OBJECTS) $(poll_DEPENDENCIES) $(EXTRA_poll_DEPENDENCIES) + @rm -f poll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(poll_OBJECTS) $(poll_LDADD) $(LIBS) + +ppoll$(EXEEXT): $(ppoll_OBJECTS) $(ppoll_DEPENDENCIES) $(EXTRA_ppoll_DEPENDENCIES) + @rm -f ppoll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ppoll_OBJECTS) $(ppoll_LDADD) $(LIBS) + +prctl-arg2-intptr$(EXEEXT): $(prctl_arg2_intptr_OBJECTS) $(prctl_arg2_intptr_DEPENDENCIES) $(EXTRA_prctl_arg2_intptr_DEPENDENCIES) + @rm -f prctl-arg2-intptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_arg2_intptr_OBJECTS) $(prctl_arg2_intptr_LDADD) $(LIBS) + +prctl-dumpable$(EXEEXT): $(prctl_dumpable_OBJECTS) $(prctl_dumpable_DEPENDENCIES) $(EXTRA_prctl_dumpable_DEPENDENCIES) + @rm -f prctl-dumpable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_dumpable_OBJECTS) $(prctl_dumpable_LDADD) $(LIBS) + +prctl-name$(EXEEXT): $(prctl_name_OBJECTS) $(prctl_name_DEPENDENCIES) $(EXTRA_prctl_name_DEPENDENCIES) + @rm -f prctl-name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_name_OBJECTS) $(prctl_name_LDADD) $(LIBS) + +prctl-no-args$(EXEEXT): $(prctl_no_args_OBJECTS) $(prctl_no_args_DEPENDENCIES) $(EXTRA_prctl_no_args_DEPENDENCIES) + @rm -f prctl-no-args$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_no_args_OBJECTS) $(prctl_no_args_LDADD) $(LIBS) + +prctl-pdeathsig$(EXEEXT): $(prctl_pdeathsig_OBJECTS) $(prctl_pdeathsig_DEPENDENCIES) $(EXTRA_prctl_pdeathsig_DEPENDENCIES) + @rm -f prctl-pdeathsig$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_pdeathsig_OBJECTS) $(prctl_pdeathsig_LDADD) $(LIBS) + +prctl-seccomp-filter-v$(EXEEXT): $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_DEPENDENCIES) $(EXTRA_prctl_seccomp_filter_v_DEPENDENCIES) + @rm -f prctl-seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_LDADD) $(LIBS) + +prctl-seccomp-strict$(EXEEXT): $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_DEPENDENCIES) $(EXTRA_prctl_seccomp_strict_DEPENDENCIES) + @rm -f prctl-seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_LDADD) $(LIBS) + +prctl-securebits$(EXEEXT): $(prctl_securebits_OBJECTS) $(prctl_securebits_DEPENDENCIES) $(EXTRA_prctl_securebits_DEPENDENCIES) + @rm -f prctl-securebits$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_securebits_OBJECTS) $(prctl_securebits_LDADD) $(LIBS) + +prctl-tid_address$(EXEEXT): $(prctl_tid_address_OBJECTS) $(prctl_tid_address_DEPENDENCIES) $(EXTRA_prctl_tid_address_DEPENDENCIES) + @rm -f prctl-tid_address$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_tid_address_OBJECTS) $(prctl_tid_address_LDADD) $(LIBS) + +prctl-tsc$(EXEEXT): $(prctl_tsc_OBJECTS) $(prctl_tsc_DEPENDENCIES) $(EXTRA_prctl_tsc_DEPENDENCIES) + @rm -f prctl-tsc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_tsc_OBJECTS) $(prctl_tsc_LDADD) $(LIBS) + +pread64-pwrite64$(EXEEXT): $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_DEPENDENCIES) $(EXTRA_pread64_pwrite64_DEPENDENCIES) + @rm -f pread64-pwrite64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_LDADD) $(LIBS) + +preadv$(EXEEXT): $(preadv_OBJECTS) $(preadv_DEPENDENCIES) $(EXTRA_preadv_DEPENDENCIES) + @rm -f preadv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_OBJECTS) $(preadv_LDADD) $(LIBS) + +preadv-pwritev$(EXEEXT): $(preadv_pwritev_OBJECTS) $(preadv_pwritev_DEPENDENCIES) $(EXTRA_preadv_pwritev_DEPENDENCIES) + @rm -f preadv-pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_pwritev_OBJECTS) $(preadv_pwritev_LDADD) $(LIBS) + +preadv2-pwritev2$(EXEEXT): $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_DEPENDENCIES) $(EXTRA_preadv2_pwritev2_DEPENDENCIES) + @rm -f preadv2-pwritev2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_LDADD) $(LIBS) + +print_maxfd$(EXEEXT): $(print_maxfd_OBJECTS) $(print_maxfd_DEPENDENCIES) $(EXTRA_print_maxfd_DEPENDENCIES) + @rm -f print_maxfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(print_maxfd_OBJECTS) $(print_maxfd_LDADD) $(LIBS) + +printstr$(EXEEXT): $(printstr_OBJECTS) $(printstr_DEPENDENCIES) $(EXTRA_printstr_DEPENDENCIES) + @rm -f printstr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(printstr_OBJECTS) $(printstr_LDADD) $(LIBS) + +prlimit64$(EXEEXT): $(prlimit64_OBJECTS) $(prlimit64_DEPENDENCIES) $(EXTRA_prlimit64_DEPENDENCIES) + @rm -f prlimit64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prlimit64_OBJECTS) $(prlimit64_LDADD) $(LIBS) + +process_vm_readv$(EXEEXT): $(process_vm_readv_OBJECTS) $(process_vm_readv_DEPENDENCIES) $(EXTRA_process_vm_readv_DEPENDENCIES) + @rm -f process_vm_readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(process_vm_readv_OBJECTS) $(process_vm_readv_LDADD) $(LIBS) + +process_vm_writev$(EXEEXT): $(process_vm_writev_OBJECTS) $(process_vm_writev_DEPENDENCIES) $(EXTRA_process_vm_writev_DEPENDENCIES) + @rm -f process_vm_writev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(process_vm_writev_OBJECTS) $(process_vm_writev_LDADD) $(LIBS) + +pselect6$(EXEEXT): $(pselect6_OBJECTS) $(pselect6_DEPENDENCIES) $(EXTRA_pselect6_DEPENDENCIES) + @rm -f pselect6$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pselect6_OBJECTS) $(pselect6_LDADD) $(LIBS) + +ptrace$(EXEEXT): $(ptrace_OBJECTS) $(ptrace_DEPENDENCIES) $(EXTRA_ptrace_DEPENDENCIES) + @rm -f ptrace$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ptrace_OBJECTS) $(ptrace_LDADD) $(LIBS) + +pwritev$(EXEEXT): $(pwritev_OBJECTS) $(pwritev_DEPENDENCIES) $(EXTRA_pwritev_DEPENDENCIES) + @rm -f pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pwritev_OBJECTS) $(pwritev_LDADD) $(LIBS) + +qual_fault$(EXEEXT): $(qual_fault_OBJECTS) $(qual_fault_DEPENDENCIES) $(EXTRA_qual_fault_DEPENDENCIES) + @rm -f qual_fault$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_fault_OBJECTS) $(qual_fault_LDADD) $(LIBS) + +qual_inject-error-signal$(EXEEXT): $(qual_inject_error_signal_OBJECTS) $(qual_inject_error_signal_DEPENDENCIES) $(EXTRA_qual_inject_error_signal_DEPENDENCIES) + @rm -f qual_inject-error-signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_error_signal_OBJECTS) $(qual_inject_error_signal_LDADD) $(LIBS) + +qual_inject-retval$(EXEEXT): $(qual_inject_retval_OBJECTS) $(qual_inject_retval_DEPENDENCIES) $(EXTRA_qual_inject_retval_DEPENDENCIES) + @rm -f qual_inject-retval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_retval_OBJECTS) $(qual_inject_retval_LDADD) $(LIBS) + +qual_inject-signal$(EXEEXT): $(qual_inject_signal_OBJECTS) $(qual_inject_signal_DEPENDENCIES) $(EXTRA_qual_inject_signal_DEPENDENCIES) + @rm -f qual_inject-signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_signal_OBJECTS) $(qual_inject_signal_LDADD) $(LIBS) + +qual_signal$(EXEEXT): $(qual_signal_OBJECTS) $(qual_signal_DEPENDENCIES) $(EXTRA_qual_signal_DEPENDENCIES) + @rm -f qual_signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_signal_OBJECTS) $(qual_signal_LDADD) $(LIBS) + +quotactl$(EXEEXT): $(quotactl_OBJECTS) $(quotactl_DEPENDENCIES) $(EXTRA_quotactl_DEPENDENCIES) + @rm -f quotactl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_OBJECTS) $(quotactl_LDADD) $(LIBS) + +quotactl-v$(EXEEXT): $(quotactl_v_OBJECTS) $(quotactl_v_DEPENDENCIES) $(EXTRA_quotactl_v_DEPENDENCIES) + @rm -f quotactl-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_v_OBJECTS) $(quotactl_v_LDADD) $(LIBS) + +quotactl-xfs$(EXEEXT): $(quotactl_xfs_OBJECTS) $(quotactl_xfs_DEPENDENCIES) $(EXTRA_quotactl_xfs_DEPENDENCIES) + @rm -f quotactl-xfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_xfs_OBJECTS) $(quotactl_xfs_LDADD) $(LIBS) + +quotactl-xfs-v$(EXEEXT): $(quotactl_xfs_v_OBJECTS) $(quotactl_xfs_v_DEPENDENCIES) $(EXTRA_quotactl_xfs_v_DEPENDENCIES) + @rm -f quotactl-xfs-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_xfs_v_OBJECTS) $(quotactl_xfs_v_LDADD) $(LIBS) + +read-write$(EXEEXT): $(read_write_OBJECTS) $(read_write_DEPENDENCIES) $(EXTRA_read_write_DEPENDENCIES) + @rm -f read-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(read_write_OBJECTS) $(read_write_LDADD) $(LIBS) + +readahead$(EXEEXT): $(readahead_OBJECTS) $(readahead_DEPENDENCIES) $(EXTRA_readahead_DEPENDENCIES) + @rm -f readahead$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readahead_OBJECTS) $(readahead_LDADD) $(LIBS) + +readdir$(EXEEXT): $(readdir_OBJECTS) $(readdir_DEPENDENCIES) $(EXTRA_readdir_DEPENDENCIES) + @rm -f readdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readdir_OBJECTS) $(readdir_LDADD) $(LIBS) + +readlink$(EXEEXT): $(readlink_OBJECTS) $(readlink_DEPENDENCIES) $(EXTRA_readlink_DEPENDENCIES) + @rm -f readlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readlink_OBJECTS) $(readlink_LDADD) $(LIBS) + +readlinkat$(EXEEXT): $(readlinkat_OBJECTS) $(readlinkat_DEPENDENCIES) $(EXTRA_readlinkat_DEPENDENCIES) + @rm -f readlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readlinkat_OBJECTS) $(readlinkat_LDADD) $(LIBS) + +readv$(EXEEXT): $(readv_OBJECTS) $(readv_DEPENDENCIES) $(EXTRA_readv_DEPENDENCIES) + @rm -f readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readv_OBJECTS) $(readv_LDADD) $(LIBS) + +reboot$(EXEEXT): $(reboot_OBJECTS) $(reboot_DEPENDENCIES) $(EXTRA_reboot_DEPENDENCIES) + @rm -f reboot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(reboot_OBJECTS) $(reboot_LDADD) $(LIBS) + +recvfrom$(EXEEXT): $(recvfrom_OBJECTS) $(recvfrom_DEPENDENCIES) $(EXTRA_recvfrom_DEPENDENCIES) + @rm -f recvfrom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvfrom_OBJECTS) $(recvfrom_LDADD) $(LIBS) + +recvmmsg-timeout$(EXEEXT): $(recvmmsg_timeout_OBJECTS) $(recvmmsg_timeout_DEPENDENCIES) $(EXTRA_recvmmsg_timeout_DEPENDENCIES) + @rm -f recvmmsg-timeout$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmmsg_timeout_OBJECTS) $(recvmmsg_timeout_LDADD) $(LIBS) + +recvmsg$(EXEEXT): $(recvmsg_OBJECTS) $(recvmsg_DEPENDENCIES) $(EXTRA_recvmsg_DEPENDENCIES) + @rm -f recvmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmsg_OBJECTS) $(recvmsg_LDADD) $(LIBS) + +redirect-fds$(EXEEXT): $(redirect_fds_OBJECTS) $(redirect_fds_DEPENDENCIES) $(EXTRA_redirect_fds_DEPENDENCIES) + @rm -f redirect-fds$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(redirect_fds_OBJECTS) $(redirect_fds_LDADD) $(LIBS) + +remap_file_pages$(EXEEXT): $(remap_file_pages_OBJECTS) $(remap_file_pages_DEPENDENCIES) $(EXTRA_remap_file_pages_DEPENDENCIES) + @rm -f remap_file_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(remap_file_pages_OBJECTS) $(remap_file_pages_LDADD) $(LIBS) + +rename$(EXEEXT): $(rename_OBJECTS) $(rename_DEPENDENCIES) $(EXTRA_rename_DEPENDENCIES) + @rm -f rename$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rename_OBJECTS) $(rename_LDADD) $(LIBS) + +renameat$(EXEEXT): $(renameat_OBJECTS) $(renameat_DEPENDENCIES) $(EXTRA_renameat_DEPENDENCIES) + @rm -f renameat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat_OBJECTS) $(renameat_LDADD) $(LIBS) + +renameat2$(EXEEXT): $(renameat2_OBJECTS) $(renameat2_DEPENDENCIES) $(EXTRA_renameat2_DEPENDENCIES) + @rm -f renameat2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat2_OBJECTS) $(renameat2_LDADD) $(LIBS) + +request_key$(EXEEXT): $(request_key_OBJECTS) $(request_key_DEPENDENCIES) $(EXTRA_request_key_DEPENDENCIES) + @rm -f request_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(request_key_OBJECTS) $(request_key_LDADD) $(LIBS) + +restart_syscall$(EXEEXT): $(restart_syscall_OBJECTS) $(restart_syscall_DEPENDENCIES) $(EXTRA_restart_syscall_DEPENDENCIES) + @rm -f restart_syscall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(restart_syscall_OBJECTS) $(restart_syscall_LDADD) $(LIBS) + +rmdir$(EXEEXT): $(rmdir_OBJECTS) $(rmdir_DEPENDENCIES) $(EXTRA_rmdir_DEPENDENCIES) + @rm -f rmdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rmdir_OBJECTS) $(rmdir_LDADD) $(LIBS) + +rt_sigpending$(EXEEXT): $(rt_sigpending_OBJECTS) $(rt_sigpending_DEPENDENCIES) $(EXTRA_rt_sigpending_DEPENDENCIES) + @rm -f rt_sigpending$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigpending_OBJECTS) $(rt_sigpending_LDADD) $(LIBS) + +rt_sigprocmask$(EXEEXT): $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_DEPENDENCIES) $(EXTRA_rt_sigprocmask_DEPENDENCIES) + @rm -f rt_sigprocmask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_LDADD) $(LIBS) + +rt_sigqueueinfo$(EXEEXT): $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_DEPENDENCIES) $(EXTRA_rt_sigqueueinfo_DEPENDENCIES) + @rm -f rt_sigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_LDADD) $(LIBS) + +rt_sigsuspend$(EXEEXT): $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_DEPENDENCIES) $(EXTRA_rt_sigsuspend_DEPENDENCIES) + @rm -f rt_sigsuspend$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_LDADD) $(LIBS) + +rt_sigtimedwait$(EXEEXT): $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_DEPENDENCIES) $(EXTRA_rt_sigtimedwait_DEPENDENCIES) + @rm -f rt_sigtimedwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_LDADD) $(LIBS) + +rt_tgsigqueueinfo$(EXEEXT): $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_DEPENDENCIES) $(EXTRA_rt_tgsigqueueinfo_DEPENDENCIES) + @rm -f rt_tgsigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_LDADD) $(LIBS) + +sched_get_priority_mxx$(EXEEXT): $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_DEPENDENCIES) $(EXTRA_sched_get_priority_mxx_DEPENDENCIES) + @rm -f sched_get_priority_mxx$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_LDADD) $(LIBS) + +sched_rr_get_interval$(EXEEXT): $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_DEPENDENCIES) $(EXTRA_sched_rr_get_interval_DEPENDENCIES) + @rm -f sched_rr_get_interval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_LDADD) $(LIBS) + +sched_xetaffinity$(EXEEXT): $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_DEPENDENCIES) $(EXTRA_sched_xetaffinity_DEPENDENCIES) + @rm -f sched_xetaffinity$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_LDADD) $(LIBS) + +sched_xetattr$(EXEEXT): $(sched_xetattr_OBJECTS) $(sched_xetattr_DEPENDENCIES) $(EXTRA_sched_xetattr_DEPENDENCIES) + @rm -f sched_xetattr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetattr_OBJECTS) $(sched_xetattr_LDADD) $(LIBS) + +sched_xetparam$(EXEEXT): $(sched_xetparam_OBJECTS) $(sched_xetparam_DEPENDENCIES) $(EXTRA_sched_xetparam_DEPENDENCIES) + @rm -f sched_xetparam$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetparam_OBJECTS) $(sched_xetparam_LDADD) $(LIBS) + +sched_xetscheduler$(EXEEXT): $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_DEPENDENCIES) $(EXTRA_sched_xetscheduler_DEPENDENCIES) + @rm -f sched_xetscheduler$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_LDADD) $(LIBS) + +sched_yield$(EXEEXT): $(sched_yield_OBJECTS) $(sched_yield_DEPENDENCIES) $(EXTRA_sched_yield_DEPENDENCIES) + @rm -f sched_yield$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_yield_OBJECTS) $(sched_yield_LDADD) $(LIBS) + +scm_rights$(EXEEXT): $(scm_rights_OBJECTS) $(scm_rights_DEPENDENCIES) $(EXTRA_scm_rights_DEPENDENCIES) + @rm -f scm_rights$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(scm_rights_OBJECTS) $(scm_rights_LDADD) $(LIBS) + +seccomp-filter$(EXEEXT): $(seccomp_filter_OBJECTS) $(seccomp_filter_DEPENDENCIES) $(EXTRA_seccomp_filter_DEPENDENCIES) + @rm -f seccomp-filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_OBJECTS) $(seccomp_filter_LDADD) $(LIBS) + +seccomp-filter-v$(EXEEXT): $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_DEPENDENCIES) $(EXTRA_seccomp_filter_v_DEPENDENCIES) + @rm -f seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_LDADD) $(LIBS) + +seccomp-strict$(EXEEXT): $(seccomp_strict_OBJECTS) $(seccomp_strict_DEPENDENCIES) $(EXTRA_seccomp_strict_DEPENDENCIES) + @rm -f seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_strict_OBJECTS) $(seccomp_strict_LDADD) $(LIBS) + +select$(EXEEXT): $(select_OBJECTS) $(select_DEPENDENCIES) $(EXTRA_select_DEPENDENCIES) + @rm -f select$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(select_OBJECTS) $(select_LDADD) $(LIBS) + +semop$(EXEEXT): $(semop_OBJECTS) $(semop_DEPENDENCIES) $(EXTRA_semop_DEPENDENCIES) + @rm -f semop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(semop_OBJECTS) $(semop_LDADD) $(LIBS) + +sendfile$(EXEEXT): $(sendfile_OBJECTS) $(sendfile_DEPENDENCIES) $(EXTRA_sendfile_DEPENDENCIES) + @rm -f sendfile$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sendfile_OBJECTS) $(sendfile_LDADD) $(LIBS) + +sendfile64$(EXEEXT): $(sendfile64_OBJECTS) $(sendfile64_DEPENDENCIES) $(EXTRA_sendfile64_DEPENDENCIES) + @rm -f sendfile64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sendfile64_OBJECTS) $(sendfile64_LDADD) $(LIBS) + +set_mempolicy$(EXEEXT): $(set_mempolicy_OBJECTS) $(set_mempolicy_DEPENDENCIES) $(EXTRA_set_mempolicy_DEPENDENCIES) + @rm -f set_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_mempolicy_OBJECTS) $(set_mempolicy_LDADD) $(LIBS) + +set_ptracer_any$(EXEEXT): $(set_ptracer_any_OBJECTS) $(set_ptracer_any_DEPENDENCIES) $(EXTRA_set_ptracer_any_DEPENDENCIES) + @rm -f set_ptracer_any$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_ptracer_any_OBJECTS) $(set_ptracer_any_LDADD) $(LIBS) + +setdomainname$(EXEEXT): $(setdomainname_OBJECTS) $(setdomainname_DEPENDENCIES) $(EXTRA_setdomainname_DEPENDENCIES) + @rm -f setdomainname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setdomainname_OBJECTS) $(setdomainname_LDADD) $(LIBS) + +setfsgid$(EXEEXT): $(setfsgid_OBJECTS) $(setfsgid_DEPENDENCIES) $(EXTRA_setfsgid_DEPENDENCIES) + @rm -f setfsgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid_OBJECTS) $(setfsgid_LDADD) $(LIBS) + +setfsgid32$(EXEEXT): $(setfsgid32_OBJECTS) $(setfsgid32_DEPENDENCIES) $(EXTRA_setfsgid32_DEPENDENCIES) + @rm -f setfsgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid32_OBJECTS) $(setfsgid32_LDADD) $(LIBS) + +setfsuid$(EXEEXT): $(setfsuid_OBJECTS) $(setfsuid_DEPENDENCIES) $(EXTRA_setfsuid_DEPENDENCIES) + @rm -f setfsuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid_OBJECTS) $(setfsuid_LDADD) $(LIBS) + +setfsuid32$(EXEEXT): $(setfsuid32_OBJECTS) $(setfsuid32_DEPENDENCIES) $(EXTRA_setfsuid32_DEPENDENCIES) + @rm -f setfsuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid32_OBJECTS) $(setfsuid32_LDADD) $(LIBS) + +setgid$(EXEEXT): $(setgid_OBJECTS) $(setgid_DEPENDENCIES) $(EXTRA_setgid_DEPENDENCIES) + @rm -f setgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid_OBJECTS) $(setgid_LDADD) $(LIBS) + +setgid32$(EXEEXT): $(setgid32_OBJECTS) $(setgid32_DEPENDENCIES) $(EXTRA_setgid32_DEPENDENCIES) + @rm -f setgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid32_OBJECTS) $(setgid32_LDADD) $(LIBS) + +setgroups$(EXEEXT): $(setgroups_OBJECTS) $(setgroups_DEPENDENCIES) $(EXTRA_setgroups_DEPENDENCIES) + @rm -f setgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups_OBJECTS) $(setgroups_LDADD) $(LIBS) + +setgroups32$(EXEEXT): $(setgroups32_OBJECTS) $(setgroups32_DEPENDENCIES) $(EXTRA_setgroups32_DEPENDENCIES) + @rm -f setgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups32_OBJECTS) $(setgroups32_LDADD) $(LIBS) + +sethostname$(EXEEXT): $(sethostname_OBJECTS) $(sethostname_DEPENDENCIES) $(EXTRA_sethostname_DEPENDENCIES) + @rm -f sethostname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sethostname_OBJECTS) $(sethostname_LDADD) $(LIBS) + +setns$(EXEEXT): $(setns_OBJECTS) $(setns_DEPENDENCIES) $(EXTRA_setns_DEPENDENCIES) + @rm -f setns$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setns_OBJECTS) $(setns_LDADD) $(LIBS) + +setregid$(EXEEXT): $(setregid_OBJECTS) $(setregid_DEPENDENCIES) $(EXTRA_setregid_DEPENDENCIES) + @rm -f setregid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid_OBJECTS) $(setregid_LDADD) $(LIBS) + +setregid32$(EXEEXT): $(setregid32_OBJECTS) $(setregid32_DEPENDENCIES) $(EXTRA_setregid32_DEPENDENCIES) + @rm -f setregid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid32_OBJECTS) $(setregid32_LDADD) $(LIBS) + +setresgid$(EXEEXT): $(setresgid_OBJECTS) $(setresgid_DEPENDENCIES) $(EXTRA_setresgid_DEPENDENCIES) + @rm -f setresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid_OBJECTS) $(setresgid_LDADD) $(LIBS) + +setresgid32$(EXEEXT): $(setresgid32_OBJECTS) $(setresgid32_DEPENDENCIES) $(EXTRA_setresgid32_DEPENDENCIES) + @rm -f setresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid32_OBJECTS) $(setresgid32_LDADD) $(LIBS) + +setresuid$(EXEEXT): $(setresuid_OBJECTS) $(setresuid_DEPENDENCIES) $(EXTRA_setresuid_DEPENDENCIES) + @rm -f setresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid_OBJECTS) $(setresuid_LDADD) $(LIBS) + +setresuid32$(EXEEXT): $(setresuid32_OBJECTS) $(setresuid32_DEPENDENCIES) $(EXTRA_setresuid32_DEPENDENCIES) + @rm -f setresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid32_OBJECTS) $(setresuid32_LDADD) $(LIBS) + +setreuid$(EXEEXT): $(setreuid_OBJECTS) $(setreuid_DEPENDENCIES) $(EXTRA_setreuid_DEPENDENCIES) + @rm -f setreuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid_OBJECTS) $(setreuid_LDADD) $(LIBS) + +setreuid32$(EXEEXT): $(setreuid32_OBJECTS) $(setreuid32_DEPENDENCIES) $(EXTRA_setreuid32_DEPENDENCIES) + @rm -f setreuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid32_OBJECTS) $(setreuid32_LDADD) $(LIBS) + +setrlimit$(EXEEXT): $(setrlimit_OBJECTS) $(setrlimit_DEPENDENCIES) $(EXTRA_setrlimit_DEPENDENCIES) + @rm -f setrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setrlimit_OBJECTS) $(setrlimit_LDADD) $(LIBS) + +setuid$(EXEEXT): $(setuid_OBJECTS) $(setuid_DEPENDENCIES) $(EXTRA_setuid_DEPENDENCIES) + @rm -f setuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid_OBJECTS) $(setuid_LDADD) $(LIBS) + +setuid32$(EXEEXT): $(setuid32_OBJECTS) $(setuid32_DEPENDENCIES) $(EXTRA_setuid32_DEPENDENCIES) + @rm -f setuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid32_OBJECTS) $(setuid32_LDADD) $(LIBS) + +shmxt$(EXEEXT): $(shmxt_OBJECTS) $(shmxt_DEPENDENCIES) $(EXTRA_shmxt_DEPENDENCIES) + @rm -f shmxt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shmxt_OBJECTS) $(shmxt_LDADD) $(LIBS) + +shutdown$(EXEEXT): $(shutdown_OBJECTS) $(shutdown_DEPENDENCIES) $(EXTRA_shutdown_DEPENDENCIES) + @rm -f shutdown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shutdown_OBJECTS) $(shutdown_LDADD) $(LIBS) + +sigaction$(EXEEXT): $(sigaction_OBJECTS) $(sigaction_DEPENDENCIES) $(EXTRA_sigaction_DEPENDENCIES) + @rm -f sigaction$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigaction_OBJECTS) $(sigaction_LDADD) $(LIBS) + +sigaltstack$(EXEEXT): $(sigaltstack_OBJECTS) $(sigaltstack_DEPENDENCIES) $(EXTRA_sigaltstack_DEPENDENCIES) + @rm -f sigaltstack$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigaltstack_OBJECTS) $(sigaltstack_LDADD) $(LIBS) + +siginfo$(EXEEXT): $(siginfo_OBJECTS) $(siginfo_DEPENDENCIES) $(EXTRA_siginfo_DEPENDENCIES) + @rm -f siginfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(siginfo_OBJECTS) $(siginfo_LDADD) $(LIBS) + +signal_receive$(EXEEXT): $(signal_receive_OBJECTS) $(signal_receive_DEPENDENCIES) $(EXTRA_signal_receive_DEPENDENCIES) + @rm -f signal_receive$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(signal_receive_OBJECTS) $(signal_receive_LDADD) $(LIBS) + +signalfd4$(EXEEXT): $(signalfd4_OBJECTS) $(signalfd4_DEPENDENCIES) $(EXTRA_signalfd4_DEPENDENCIES) + @rm -f signalfd4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(signalfd4_OBJECTS) $(signalfd4_LDADD) $(LIBS) + +sigreturn$(EXEEXT): $(sigreturn_OBJECTS) $(sigreturn_DEPENDENCIES) $(EXTRA_sigreturn_DEPENDENCIES) + @rm -f sigreturn$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigreturn_OBJECTS) $(sigreturn_LDADD) $(LIBS) + +sleep$(EXEEXT): $(sleep_OBJECTS) $(sleep_DEPENDENCIES) $(EXTRA_sleep_DEPENDENCIES) + @rm -f sleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sleep_OBJECTS) $(sleep_LDADD) $(LIBS) + +socketcall$(EXEEXT): $(socketcall_OBJECTS) $(socketcall_DEPENDENCIES) $(EXTRA_socketcall_DEPENDENCIES) + @rm -f socketcall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(socketcall_OBJECTS) $(socketcall_LDADD) $(LIBS) + +splice$(EXEEXT): $(splice_OBJECTS) $(splice_DEPENDENCIES) $(EXTRA_splice_DEPENDENCIES) + @rm -f splice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(splice_OBJECTS) $(splice_LDADD) $(LIBS) + +stack-fcall$(EXEEXT): $(stack_fcall_OBJECTS) $(stack_fcall_DEPENDENCIES) $(EXTRA_stack_fcall_DEPENDENCIES) + @rm -f stack-fcall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stack_fcall_OBJECTS) $(stack_fcall_LDADD) $(LIBS) + +stat$(EXEEXT): $(stat_OBJECTS) $(stat_DEPENDENCIES) $(EXTRA_stat_DEPENDENCIES) + @rm -f stat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stat_OBJECTS) $(stat_LDADD) $(LIBS) + +stat64$(EXEEXT): $(stat64_OBJECTS) $(stat64_DEPENDENCIES) $(EXTRA_stat64_DEPENDENCIES) + @rm -f stat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stat64_OBJECTS) $(stat64_LDADD) $(LIBS) + +statfs$(EXEEXT): $(statfs_OBJECTS) $(statfs_DEPENDENCIES) $(EXTRA_statfs_DEPENDENCIES) + @rm -f statfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs_OBJECTS) $(statfs_LDADD) $(LIBS) + +statfs64$(EXEEXT): $(statfs64_OBJECTS) $(statfs64_DEPENDENCIES) $(EXTRA_statfs64_DEPENDENCIES) + @rm -f statfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs64_OBJECTS) $(statfs64_LDADD) $(LIBS) + +swap$(EXEEXT): $(swap_OBJECTS) $(swap_DEPENDENCIES) $(EXTRA_swap_DEPENDENCIES) + @rm -f swap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(swap_OBJECTS) $(swap_LDADD) $(LIBS) + +symlink$(EXEEXT): $(symlink_OBJECTS) $(symlink_DEPENDENCIES) $(EXTRA_symlink_DEPENDENCIES) + @rm -f symlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlink_OBJECTS) $(symlink_LDADD) $(LIBS) + +symlinkat$(EXEEXT): $(symlinkat_OBJECTS) $(symlinkat_DEPENDENCIES) $(EXTRA_symlinkat_DEPENDENCIES) + @rm -f symlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlinkat_OBJECTS) $(symlinkat_LDADD) $(LIBS) + +sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES) $(EXTRA_sync_DEPENDENCIES) + @rm -f sync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_OBJECTS) $(sync_LDADD) $(LIBS) + +sync_file_range$(EXEEXT): $(sync_file_range_OBJECTS) $(sync_file_range_DEPENDENCIES) $(EXTRA_sync_file_range_DEPENDENCIES) + @rm -f sync_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range_OBJECTS) $(sync_file_range_LDADD) $(LIBS) + +sync_file_range2$(EXEEXT): $(sync_file_range2_OBJECTS) $(sync_file_range2_DEPENDENCIES) $(EXTRA_sync_file_range2_DEPENDENCIES) + @rm -f sync_file_range2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range2_OBJECTS) $(sync_file_range2_LDADD) $(LIBS) + +sysinfo$(EXEEXT): $(sysinfo_OBJECTS) $(sysinfo_DEPENDENCIES) $(EXTRA_sysinfo_DEPENDENCIES) + @rm -f sysinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sysinfo_OBJECTS) $(sysinfo_LDADD) $(LIBS) + +syslog$(EXEEXT): $(syslog_OBJECTS) $(syslog_DEPENDENCIES) $(EXTRA_syslog_DEPENDENCIES) + @rm -f syslog$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(syslog_OBJECTS) $(syslog_LDADD) $(LIBS) + +tee$(EXEEXT): $(tee_OBJECTS) $(tee_DEPENDENCIES) $(EXTRA_tee_DEPENDENCIES) + @rm -f tee$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tee_OBJECTS) $(tee_LDADD) $(LIBS) + +threads-execve$(EXEEXT): $(threads_execve_OBJECTS) $(threads_execve_DEPENDENCIES) $(EXTRA_threads_execve_DEPENDENCIES) + @rm -f threads-execve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(threads_execve_OBJECTS) $(threads_execve_LDADD) $(LIBS) + +time$(EXEEXT): $(time_OBJECTS) $(time_DEPENDENCIES) $(EXTRA_time_DEPENDENCIES) + @rm -f time$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(time_OBJECTS) $(time_LDADD) $(LIBS) + +timer_create$(EXEEXT): $(timer_create_OBJECTS) $(timer_create_DEPENDENCIES) $(EXTRA_timer_create_DEPENDENCIES) + @rm -f timer_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timer_create_OBJECTS) $(timer_create_LDADD) $(LIBS) + +timer_xettime$(EXEEXT): $(timer_xettime_OBJECTS) $(timer_xettime_DEPENDENCIES) $(EXTRA_timer_xettime_DEPENDENCIES) + @rm -f timer_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timer_xettime_OBJECTS) $(timer_xettime_LDADD) $(LIBS) + +timerfd_xettime$(EXEEXT): $(timerfd_xettime_OBJECTS) $(timerfd_xettime_DEPENDENCIES) $(EXTRA_timerfd_xettime_DEPENDENCIES) + @rm -f timerfd_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timerfd_xettime_OBJECTS) $(timerfd_xettime_LDADD) $(LIBS) + +times$(EXEEXT): $(times_OBJECTS) $(times_DEPENDENCIES) $(EXTRA_times_DEPENDENCIES) + @rm -f times$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(times_OBJECTS) $(times_LDADD) $(LIBS) + +times-fail$(EXEEXT): $(times_fail_OBJECTS) $(times_fail_DEPENDENCIES) $(EXTRA_times_fail_DEPENDENCIES) + @rm -f times-fail$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(times_fail_OBJECTS) $(times_fail_LDADD) $(LIBS) + +truncate$(EXEEXT): $(truncate_OBJECTS) $(truncate_DEPENDENCIES) $(EXTRA_truncate_DEPENDENCIES) + @rm -f truncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(truncate_OBJECTS) $(truncate_LDADD) $(LIBS) + +truncate64$(EXEEXT): $(truncate64_OBJECTS) $(truncate64_DEPENDENCIES) $(EXTRA_truncate64_DEPENDENCIES) + @rm -f truncate64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(truncate64_OBJECTS) $(truncate64_LDADD) $(LIBS) + +ugetrlimit$(EXEEXT): $(ugetrlimit_OBJECTS) $(ugetrlimit_DEPENDENCIES) $(EXTRA_ugetrlimit_DEPENDENCIES) + @rm -f ugetrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ugetrlimit_OBJECTS) $(ugetrlimit_LDADD) $(LIBS) + +uio$(EXEEXT): $(uio_OBJECTS) $(uio_DEPENDENCIES) $(EXTRA_uio_DEPENDENCIES) + @rm -f uio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uio_OBJECTS) $(uio_LDADD) $(LIBS) + +umask$(EXEEXT): $(umask_OBJECTS) $(umask_DEPENDENCIES) $(EXTRA_umask_DEPENDENCIES) + @rm -f umask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umask_OBJECTS) $(umask_LDADD) $(LIBS) + +umount$(EXEEXT): $(umount_OBJECTS) $(umount_DEPENDENCIES) $(EXTRA_umount_DEPENDENCIES) + @rm -f umount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umount_OBJECTS) $(umount_LDADD) $(LIBS) + +umount2$(EXEEXT): $(umount2_OBJECTS) $(umount2_DEPENDENCIES) $(EXTRA_umount2_DEPENDENCIES) + @rm -f umount2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umount2_OBJECTS) $(umount2_LDADD) $(LIBS) + +umoven-illptr$(EXEEXT): $(umoven_illptr_OBJECTS) $(umoven_illptr_DEPENDENCIES) $(EXTRA_umoven_illptr_DEPENDENCIES) + @rm -f umoven-illptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umoven_illptr_OBJECTS) $(umoven_illptr_LDADD) $(LIBS) + +umovestr$(EXEEXT): $(umovestr_OBJECTS) $(umovestr_DEPENDENCIES) $(EXTRA_umovestr_DEPENDENCIES) + @rm -f umovestr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr_OBJECTS) $(umovestr_LDADD) $(LIBS) + +umovestr-illptr$(EXEEXT): $(umovestr_illptr_OBJECTS) $(umovestr_illptr_DEPENDENCIES) $(EXTRA_umovestr_illptr_DEPENDENCIES) + @rm -f umovestr-illptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr_illptr_OBJECTS) $(umovestr_illptr_LDADD) $(LIBS) + +umovestr2$(EXEEXT): $(umovestr2_OBJECTS) $(umovestr2_DEPENDENCIES) $(EXTRA_umovestr2_DEPENDENCIES) + @rm -f umovestr2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr2_OBJECTS) $(umovestr2_LDADD) $(LIBS) + +umovestr3$(EXEEXT): $(umovestr3_OBJECTS) $(umovestr3_DEPENDENCIES) $(EXTRA_umovestr3_DEPENDENCIES) + @rm -f umovestr3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr3_OBJECTS) $(umovestr3_LDADD) $(LIBS) + +uname$(EXEEXT): $(uname_OBJECTS) $(uname_DEPENDENCIES) $(EXTRA_uname_DEPENDENCIES) + @rm -f uname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uname_OBJECTS) $(uname_LDADD) $(LIBS) + +unix-pair-send-recv$(EXEEXT): $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_DEPENDENCIES) $(EXTRA_unix_pair_send_recv_DEPENDENCIES) + @rm -f unix-pair-send-recv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_LDADD) $(LIBS) + +unix-pair-sendto-recvfrom$(EXEEXT): $(unix_pair_sendto_recvfrom_OBJECTS) $(unix_pair_sendto_recvfrom_DEPENDENCIES) $(EXTRA_unix_pair_sendto_recvfrom_DEPENDENCIES) + @rm -f unix-pair-sendto-recvfrom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unix_pair_sendto_recvfrom_OBJECTS) $(unix_pair_sendto_recvfrom_LDADD) $(LIBS) + +unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) $(EXTRA_unlink_DEPENDENCIES) + @rm -f unlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS) + +unlinkat$(EXEEXT): $(unlinkat_OBJECTS) $(unlinkat_DEPENDENCIES) $(EXTRA_unlinkat_DEPENDENCIES) + @rm -f unlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlinkat_OBJECTS) $(unlinkat_LDADD) $(LIBS) + +unshare$(EXEEXT): $(unshare_OBJECTS) $(unshare_DEPENDENCIES) $(EXTRA_unshare_DEPENDENCIES) + @rm -f unshare$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unshare_OBJECTS) $(unshare_LDADD) $(LIBS) + +userfaultfd$(EXEEXT): $(userfaultfd_OBJECTS) $(userfaultfd_DEPENDENCIES) $(EXTRA_userfaultfd_DEPENDENCIES) + @rm -f userfaultfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(userfaultfd_OBJECTS) $(userfaultfd_LDADD) $(LIBS) + +ustat$(EXEEXT): $(ustat_OBJECTS) $(ustat_DEPENDENCIES) $(EXTRA_ustat_DEPENDENCIES) + @rm -f ustat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ustat_OBJECTS) $(ustat_LDADD) $(LIBS) + +utime$(EXEEXT): $(utime_OBJECTS) $(utime_DEPENDENCIES) $(EXTRA_utime_DEPENDENCIES) + @rm -f utime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utime_OBJECTS) $(utime_LDADD) $(LIBS) + +utimensat$(EXEEXT): $(utimensat_OBJECTS) $(utimensat_DEPENDENCIES) $(EXTRA_utimensat_DEPENDENCIES) + @rm -f utimensat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimensat_OBJECTS) $(utimensat_LDADD) $(LIBS) + +utimes$(EXEEXT): $(utimes_OBJECTS) $(utimes_DEPENDENCIES) $(EXTRA_utimes_DEPENDENCIES) + @rm -f utimes$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimes_OBJECTS) $(utimes_LDADD) $(LIBS) + +vfork-f$(EXEEXT): $(vfork_f_OBJECTS) $(vfork_f_DEPENDENCIES) $(EXTRA_vfork_f_DEPENDENCIES) + @rm -f vfork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfork_f_OBJECTS) $(vfork_f_LDADD) $(LIBS) + +vhangup$(EXEEXT): $(vhangup_OBJECTS) $(vhangup_DEPENDENCIES) $(EXTRA_vhangup_DEPENDENCIES) + @rm -f vhangup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vhangup_OBJECTS) $(vhangup_LDADD) $(LIBS) + +vmsplice$(EXEEXT): $(vmsplice_OBJECTS) $(vmsplice_DEPENDENCIES) $(EXTRA_vmsplice_DEPENDENCIES) + @rm -f vmsplice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vmsplice_OBJECTS) $(vmsplice_LDADD) $(LIBS) + +wait4$(EXEEXT): $(wait4_OBJECTS) $(wait4_DEPENDENCIES) $(EXTRA_wait4_DEPENDENCIES) + @rm -f wait4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wait4_OBJECTS) $(wait4_LDADD) $(LIBS) + +wait4-v$(EXEEXT): $(wait4_v_OBJECTS) $(wait4_v_DEPENDENCIES) $(EXTRA_wait4_v_DEPENDENCIES) + @rm -f wait4-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wait4_v_OBJECTS) $(wait4_v_LDADD) $(LIBS) + +waitid$(EXEEXT): $(waitid_OBJECTS) $(waitid_DEPENDENCIES) $(EXTRA_waitid_DEPENDENCIES) + @rm -f waitid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitid_OBJECTS) $(waitid_LDADD) $(LIBS) + +waitid-v$(EXEEXT): $(waitid_v_OBJECTS) $(waitid_v_DEPENDENCIES) $(EXTRA_waitid_v_DEPENDENCIES) + @rm -f waitid-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitid_v_OBJECTS) $(waitid_v_LDADD) $(LIBS) + +waitpid$(EXEEXT): $(waitpid_OBJECTS) $(waitpid_DEPENDENCIES) $(EXTRA_waitpid_DEPENDENCIES) + @rm -f waitpid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitpid_OBJECTS) $(waitpid_LDADD) $(LIBS) + +xattr$(EXEEXT): $(xattr_OBJECTS) $(xattr_DEPENDENCIES) $(EXTRA_xattr_DEPENDENCIES) + @rm -f xattr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xattr_OBJECTS) $(xattr_LDADD) $(LIBS) + +xattr-strings$(EXEEXT): $(xattr_strings_OBJECTS) $(xattr_strings_DEPENDENCIES) $(EXTRA_xattr_strings_DEPENDENCIES) + @rm -f xattr-strings$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xattr_strings_OBJECTS) $(xattr_strings_LDADD) $(LIBS) + +xet_robust_list$(EXEEXT): $(xet_robust_list_OBJECTS) $(xet_robust_list_DEPENDENCIES) $(EXTRA_xet_robust_list_DEPENDENCIES) + @rm -f xet_robust_list$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xet_robust_list_OBJECTS) $(xet_robust_list_LDADD) $(LIBS) + +xetitimer$(EXEEXT): $(xetitimer_OBJECTS) $(xetitimer_DEPENDENCIES) $(EXTRA_xetitimer_DEPENDENCIES) + @rm -f xetitimer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetitimer_OBJECTS) $(xetitimer_LDADD) $(LIBS) + +xetpgid$(EXEEXT): $(xetpgid_OBJECTS) $(xetpgid_DEPENDENCIES) $(EXTRA_xetpgid_DEPENDENCIES) + @rm -f xetpgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpgid_OBJECTS) $(xetpgid_LDADD) $(LIBS) + +xetpriority$(EXEEXT): $(xetpriority_OBJECTS) $(xetpriority_DEPENDENCIES) $(EXTRA_xetpriority_DEPENDENCIES) + @rm -f xetpriority$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpriority_OBJECTS) $(xetpriority_LDADD) $(LIBS) + +xettimeofday$(EXEEXT): $(xettimeofday_OBJECTS) $(xettimeofday_DEPENDENCIES) $(EXTRA_xettimeofday_DEPENDENCIES) + @rm -f xettimeofday$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xettimeofday_OBJECTS) $(xettimeofday_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/_newselect.Po +include ./$(DEPDIR)/accept.Po +include ./$(DEPDIR)/accept4.Po +include ./$(DEPDIR)/access.Po +include ./$(DEPDIR)/acct.Po +include ./$(DEPDIR)/add_key.Po +include ./$(DEPDIR)/adjtimex.Po +include ./$(DEPDIR)/aio.Po +include ./$(DEPDIR)/alarm.Po +include ./$(DEPDIR)/answer.Po +include ./$(DEPDIR)/attach-f-p-cmd.Po +include ./$(DEPDIR)/attach-f-p.Po +include ./$(DEPDIR)/attach-p-cmd-cmd.Po +include ./$(DEPDIR)/attach-p-cmd-p.Po +include ./$(DEPDIR)/bpf.Po +include ./$(DEPDIR)/brk.Po +include ./$(DEPDIR)/btrfs.Po +include ./$(DEPDIR)/caps-abbrev.Po +include ./$(DEPDIR)/caps.Po +include ./$(DEPDIR)/chmod.Po +include ./$(DEPDIR)/chown.Po +include ./$(DEPDIR)/chown32.Po +include ./$(DEPDIR)/chroot.Po +include ./$(DEPDIR)/clock_adjtime.Po +include ./$(DEPDIR)/clock_nanosleep.Po +include ./$(DEPDIR)/clock_xettime.Po +include ./$(DEPDIR)/copy_file_range.Po +include ./$(DEPDIR)/count-f.Po +include ./$(DEPDIR)/creat.Po +include ./$(DEPDIR)/delete_module.Po +include ./$(DEPDIR)/dup.Po +include ./$(DEPDIR)/dup2.Po +include ./$(DEPDIR)/dup3.Po +include ./$(DEPDIR)/epoll_create.Po +include ./$(DEPDIR)/epoll_create1.Po +include ./$(DEPDIR)/epoll_ctl.Po +include ./$(DEPDIR)/epoll_pwait.Po +include ./$(DEPDIR)/epoll_wait.Po +include ./$(DEPDIR)/erestartsys.Po +include ./$(DEPDIR)/eventfd.Po +include ./$(DEPDIR)/execve-v.Po +include ./$(DEPDIR)/execve.Po +include ./$(DEPDIR)/execveat-v.Po +include ./$(DEPDIR)/execveat.Po +include ./$(DEPDIR)/faccessat.Po +include ./$(DEPDIR)/fadvise64.Po +include ./$(DEPDIR)/fadvise64_64.Po +include ./$(DEPDIR)/fallocate.Po +include ./$(DEPDIR)/fanotify_init.Po +include ./$(DEPDIR)/fanotify_mark.Po +include ./$(DEPDIR)/fchdir.Po +include ./$(DEPDIR)/fchmod.Po +include ./$(DEPDIR)/fchmodat.Po +include ./$(DEPDIR)/fchown.Po +include ./$(DEPDIR)/fchown32.Po +include ./$(DEPDIR)/fchownat.Po +include ./$(DEPDIR)/fcntl.Po +include ./$(DEPDIR)/fcntl64.Po +include ./$(DEPDIR)/fdatasync.Po +include ./$(DEPDIR)/file_handle.Po +include ./$(DEPDIR)/file_ioctl.Po +include ./$(DEPDIR)/filter-unavailable.Po +include ./$(DEPDIR)/finit_module.Po +include ./$(DEPDIR)/flock.Po +include ./$(DEPDIR)/fork-f.Po +include ./$(DEPDIR)/fstat.Po +include ./$(DEPDIR)/fstat64-fstat64.Po +include ./$(DEPDIR)/fstatat64-fstatat64.Po +include ./$(DEPDIR)/fstatfs.Po +include ./$(DEPDIR)/fstatfs64.Po +include ./$(DEPDIR)/fsync.Po +include ./$(DEPDIR)/ftruncate.Po +include ./$(DEPDIR)/ftruncate64-ftruncate64.Po +include ./$(DEPDIR)/futex.Po +include ./$(DEPDIR)/futimesat.Po +include ./$(DEPDIR)/get_mempolicy.Po +include ./$(DEPDIR)/getcpu.Po +include ./$(DEPDIR)/getcwd.Po +include ./$(DEPDIR)/getdents.Po +include ./$(DEPDIR)/getdents64.Po +include ./$(DEPDIR)/getegid.Po +include ./$(DEPDIR)/getegid32.Po +include ./$(DEPDIR)/geteuid.Po +include ./$(DEPDIR)/geteuid32.Po +include ./$(DEPDIR)/getgid.Po +include ./$(DEPDIR)/getgid32.Po +include ./$(DEPDIR)/getgroups.Po +include ./$(DEPDIR)/getgroups32.Po +include ./$(DEPDIR)/getpeername.Po +include ./$(DEPDIR)/getpgrp.Po +include ./$(DEPDIR)/getrandom.Po +include ./$(DEPDIR)/getresgid.Po +include ./$(DEPDIR)/getresgid32.Po +include ./$(DEPDIR)/getresuid.Po +include ./$(DEPDIR)/getresuid32.Po +include ./$(DEPDIR)/getrlimit.Po +include ./$(DEPDIR)/getrusage.Po +include ./$(DEPDIR)/getsid.Po +include ./$(DEPDIR)/getsockname.Po +include ./$(DEPDIR)/getuid.Po +include ./$(DEPDIR)/getuid32.Po +include ./$(DEPDIR)/getxxid.Po +include ./$(DEPDIR)/inet-cmsg.Po +include ./$(DEPDIR)/init_module.Po +include ./$(DEPDIR)/inotify.Po +include ./$(DEPDIR)/inotify_init1.Po +include ./$(DEPDIR)/ioctl.Po +include ./$(DEPDIR)/ioctl_block.Po +include ./$(DEPDIR)/ioctl_dm-v.Po +include ./$(DEPDIR)/ioctl_dm.Po +include ./$(DEPDIR)/ioctl_evdev-v.Po +include ./$(DEPDIR)/ioctl_evdev.Po +include ./$(DEPDIR)/ioctl_loop-nv.Po +include ./$(DEPDIR)/ioctl_loop-v.Po +include ./$(DEPDIR)/ioctl_loop.Po +include ./$(DEPDIR)/ioctl_mtd.Po +include ./$(DEPDIR)/ioctl_rtc-v.Po +include ./$(DEPDIR)/ioctl_rtc.Po +include ./$(DEPDIR)/ioctl_scsi.Po +include ./$(DEPDIR)/ioctl_sg_io_v3.Po +include ./$(DEPDIR)/ioctl_sg_io_v4.Po +include ./$(DEPDIR)/ioctl_sock_gifconf.Po +include ./$(DEPDIR)/ioctl_uffdio.Po +include ./$(DEPDIR)/ioctl_v4l2.Po +include ./$(DEPDIR)/ioperm.Po +include ./$(DEPDIR)/iopl.Po +include ./$(DEPDIR)/ioprio.Po +include ./$(DEPDIR)/ip_mreq.Po +include ./$(DEPDIR)/ipc.Po +include ./$(DEPDIR)/ipc_msg.Po +include ./$(DEPDIR)/ipc_msgbuf.Po +include ./$(DEPDIR)/ipc_sem.Po +include ./$(DEPDIR)/ipc_shm.Po +include ./$(DEPDIR)/kcmp.Po +include ./$(DEPDIR)/kexec_file_load.Po +include ./$(DEPDIR)/kexec_load.Po +include ./$(DEPDIR)/keyctl.Po +include ./$(DEPDIR)/kill.Po +include ./$(DEPDIR)/ksysent.Po +include ./$(DEPDIR)/lchown.Po +include ./$(DEPDIR)/lchown32.Po +include ./$(DEPDIR)/libtests_a-errno2name.Po +include ./$(DEPDIR)/libtests_a-error_msg.Po +include ./$(DEPDIR)/libtests_a-fill_memory.Po +include ./$(DEPDIR)/libtests_a-get_page_size.Po +include ./$(DEPDIR)/libtests_a-hexdump_strdup.Po +include ./$(DEPDIR)/libtests_a-hexquote_strndup.Po +include ./$(DEPDIR)/libtests_a-inode_of_sockfd.Po +include ./$(DEPDIR)/libtests_a-libmmsg.Po +include ./$(DEPDIR)/libtests_a-libsocketcall.Po +include ./$(DEPDIR)/libtests_a-overflowuid.Po +include ./$(DEPDIR)/libtests_a-pipe_maxfd.Po +include ./$(DEPDIR)/libtests_a-print_quoted_string.Po +include ./$(DEPDIR)/libtests_a-printflags.Po +include ./$(DEPDIR)/libtests_a-printxval.Po +include ./$(DEPDIR)/libtests_a-signal2name.Po +include ./$(DEPDIR)/libtests_a-sprintrc.Po +include ./$(DEPDIR)/libtests_a-tail_alloc.Po +include ./$(DEPDIR)/libtests_a-tprintf.Po +include ./$(DEPDIR)/link.Po +include ./$(DEPDIR)/linkat.Po +include ./$(DEPDIR)/llseek.Po +include ./$(DEPDIR)/lookup_dcookie.Po +include ./$(DEPDIR)/lseek.Po +include ./$(DEPDIR)/lstat.Po +include ./$(DEPDIR)/lstat64-lstat64.Po +include ./$(DEPDIR)/mbind.Po +include ./$(DEPDIR)/membarrier.Po +include ./$(DEPDIR)/memfd_create.Po +include ./$(DEPDIR)/migrate_pages.Po +include ./$(DEPDIR)/mincore.Po +include ./$(DEPDIR)/mkdir.Po +include ./$(DEPDIR)/mkdirat.Po +include ./$(DEPDIR)/mknod.Po +include ./$(DEPDIR)/mknodat.Po +include ./$(DEPDIR)/mlock.Po +include ./$(DEPDIR)/mlock2.Po +include ./$(DEPDIR)/mlockall.Po +include ./$(DEPDIR)/mmap.Po +include ./$(DEPDIR)/mmap64-mmap64.Po +include ./$(DEPDIR)/mmsg-silent.Po +include ./$(DEPDIR)/mmsg.Po +include ./$(DEPDIR)/mmsg_name-v.Po +include ./$(DEPDIR)/mmsg_name.Po +include ./$(DEPDIR)/mount.Po +include ./$(DEPDIR)/move_pages.Po +include ./$(DEPDIR)/mq.Po +include ./$(DEPDIR)/mq_sendrecv-read.Po +include ./$(DEPDIR)/mq_sendrecv-write.Po +include ./$(DEPDIR)/mq_sendrecv.Po +include ./$(DEPDIR)/msg_control-v.Po +include ./$(DEPDIR)/msg_control.Po +include ./$(DEPDIR)/msg_name.Po +include ./$(DEPDIR)/munlockall.Po +include ./$(DEPDIR)/nanosleep.Po +include ./$(DEPDIR)/net-accept-connect.Po +include ./$(DEPDIR)/net-icmp_filter.Po +include ./$(DEPDIR)/net-sockaddr.Po +include ./$(DEPDIR)/net-y-unix.Po +include ./$(DEPDIR)/net-yy-inet.Po +include ./$(DEPDIR)/net-yy-netlink.Po +include ./$(DEPDIR)/net-yy-unix.Po +include ./$(DEPDIR)/netlink_inet_diag.Po +include ./$(DEPDIR)/netlink_netlink_diag.Po +include ./$(DEPDIR)/netlink_protocol.Po +include ./$(DEPDIR)/netlink_unix_diag.Po +include ./$(DEPDIR)/newfstatat-newfstatat.Po +include ./$(DEPDIR)/nsyscalls.Po +include ./$(DEPDIR)/old_mmap.Po +include ./$(DEPDIR)/oldfstat.Po +include ./$(DEPDIR)/oldlstat.Po +include ./$(DEPDIR)/oldselect.Po +include ./$(DEPDIR)/oldstat.Po +include ./$(DEPDIR)/open.Po +include ./$(DEPDIR)/openat.Po +include ./$(DEPDIR)/pause.Po +include ./$(DEPDIR)/pc.Po +include ./$(DEPDIR)/perf_event_open.Po +include ./$(DEPDIR)/perf_event_open_nonverbose.Po +include ./$(DEPDIR)/perf_event_open_unabbrev.Po +include ./$(DEPDIR)/personality.Po +include ./$(DEPDIR)/pipe.Po +include ./$(DEPDIR)/pipe2.Po +include ./$(DEPDIR)/pkey_alloc.Po +include ./$(DEPDIR)/pkey_free.Po +include ./$(DEPDIR)/pkey_mprotect.Po +include ./$(DEPDIR)/poll.Po +include ./$(DEPDIR)/ppoll.Po +include ./$(DEPDIR)/prctl-arg2-intptr.Po +include ./$(DEPDIR)/prctl-dumpable.Po +include ./$(DEPDIR)/prctl-name.Po +include ./$(DEPDIR)/prctl-no-args.Po +include ./$(DEPDIR)/prctl-pdeathsig.Po +include ./$(DEPDIR)/prctl-seccomp-filter-v.Po +include ./$(DEPDIR)/prctl-seccomp-strict.Po +include ./$(DEPDIR)/prctl-securebits.Po +include ./$(DEPDIR)/prctl-tid_address.Po +include ./$(DEPDIR)/prctl-tsc.Po +include ./$(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +include ./$(DEPDIR)/preadv-preadv.Po +include ./$(DEPDIR)/preadv2-pwritev2.Po +include ./$(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +include ./$(DEPDIR)/print_maxfd.Po +include ./$(DEPDIR)/printstr.Po +include ./$(DEPDIR)/prlimit64.Po +include ./$(DEPDIR)/process_vm_readv.Po +include ./$(DEPDIR)/process_vm_writev.Po +include ./$(DEPDIR)/pselect6.Po +include ./$(DEPDIR)/ptrace.Po +include ./$(DEPDIR)/pwritev-pwritev.Po +include ./$(DEPDIR)/qual_fault.Po +include ./$(DEPDIR)/qual_inject-error-signal.Po +include ./$(DEPDIR)/qual_inject-retval.Po +include ./$(DEPDIR)/qual_inject-signal.Po +include ./$(DEPDIR)/qual_signal.Po +include ./$(DEPDIR)/quotactl-v.Po +include ./$(DEPDIR)/quotactl-xfs-v.Po +include ./$(DEPDIR)/quotactl-xfs.Po +include ./$(DEPDIR)/quotactl.Po +include ./$(DEPDIR)/read-write.Po +include ./$(DEPDIR)/readahead.Po +include ./$(DEPDIR)/readdir.Po +include ./$(DEPDIR)/readlink.Po +include ./$(DEPDIR)/readlinkat.Po +include ./$(DEPDIR)/readv.Po +include ./$(DEPDIR)/reboot.Po +include ./$(DEPDIR)/recvfrom.Po +include ./$(DEPDIR)/recvmmsg-timeout.Po +include ./$(DEPDIR)/recvmsg.Po +include ./$(DEPDIR)/redirect-fds.Po +include ./$(DEPDIR)/remap_file_pages.Po +include ./$(DEPDIR)/rename.Po +include ./$(DEPDIR)/renameat.Po +include ./$(DEPDIR)/renameat2.Po +include ./$(DEPDIR)/request_key.Po +include ./$(DEPDIR)/restart_syscall.Po +include ./$(DEPDIR)/rmdir.Po +include ./$(DEPDIR)/rt_sigpending.Po +include ./$(DEPDIR)/rt_sigprocmask.Po +include ./$(DEPDIR)/rt_sigqueueinfo.Po +include ./$(DEPDIR)/rt_sigsuspend.Po +include ./$(DEPDIR)/rt_sigtimedwait.Po +include ./$(DEPDIR)/rt_tgsigqueueinfo.Po +include ./$(DEPDIR)/sched_get_priority_mxx.Po +include ./$(DEPDIR)/sched_rr_get_interval.Po +include ./$(DEPDIR)/sched_xetaffinity.Po +include ./$(DEPDIR)/sched_xetattr.Po +include ./$(DEPDIR)/sched_xetparam.Po +include ./$(DEPDIR)/sched_xetscheduler.Po +include ./$(DEPDIR)/sched_yield.Po +include ./$(DEPDIR)/scm_rights.Po +include ./$(DEPDIR)/seccomp-filter-v.Po +include ./$(DEPDIR)/seccomp-filter.Po +include ./$(DEPDIR)/seccomp-strict.Po +include ./$(DEPDIR)/select.Po +include ./$(DEPDIR)/semop.Po +include ./$(DEPDIR)/sendfile.Po +include ./$(DEPDIR)/sendfile64.Po +include ./$(DEPDIR)/set_mempolicy.Po +include ./$(DEPDIR)/set_ptracer_any.Po +include ./$(DEPDIR)/setdomainname.Po +include ./$(DEPDIR)/setfsgid.Po +include ./$(DEPDIR)/setfsgid32.Po +include ./$(DEPDIR)/setfsuid.Po +include ./$(DEPDIR)/setfsuid32.Po +include ./$(DEPDIR)/setgid.Po +include ./$(DEPDIR)/setgid32.Po +include ./$(DEPDIR)/setgroups.Po +include ./$(DEPDIR)/setgroups32.Po +include ./$(DEPDIR)/sethostname.Po +include ./$(DEPDIR)/setns.Po +include ./$(DEPDIR)/setregid.Po +include ./$(DEPDIR)/setregid32.Po +include ./$(DEPDIR)/setresgid.Po +include ./$(DEPDIR)/setresgid32.Po +include ./$(DEPDIR)/setresuid.Po +include ./$(DEPDIR)/setresuid32.Po +include ./$(DEPDIR)/setreuid.Po +include ./$(DEPDIR)/setreuid32.Po +include ./$(DEPDIR)/setrlimit.Po +include ./$(DEPDIR)/setuid.Po +include ./$(DEPDIR)/setuid32.Po +include ./$(DEPDIR)/shmxt.Po +include ./$(DEPDIR)/shutdown.Po +include ./$(DEPDIR)/sigaction.Po +include ./$(DEPDIR)/sigaltstack.Po +include ./$(DEPDIR)/siginfo.Po +include ./$(DEPDIR)/signal_receive.Po +include ./$(DEPDIR)/signalfd4.Po +include ./$(DEPDIR)/sigreturn.Po +include ./$(DEPDIR)/sleep.Po +include ./$(DEPDIR)/socketcall.Po +include ./$(DEPDIR)/splice.Po +include ./$(DEPDIR)/stack-fcall-0.Po +include ./$(DEPDIR)/stack-fcall-1.Po +include ./$(DEPDIR)/stack-fcall-2.Po +include ./$(DEPDIR)/stack-fcall-3.Po +include ./$(DEPDIR)/stack-fcall.Po +include ./$(DEPDIR)/stat.Po +include ./$(DEPDIR)/stat64-stat64.Po +include ./$(DEPDIR)/statfs-statfs.Po +include ./$(DEPDIR)/statfs64.Po +include ./$(DEPDIR)/swap.Po +include ./$(DEPDIR)/symlink.Po +include ./$(DEPDIR)/symlinkat.Po +include ./$(DEPDIR)/sync.Po +include ./$(DEPDIR)/sync_file_range.Po +include ./$(DEPDIR)/sync_file_range2.Po +include ./$(DEPDIR)/sysinfo.Po +include ./$(DEPDIR)/syslog.Po +include ./$(DEPDIR)/tee.Po +include ./$(DEPDIR)/threads-execve.Po +include ./$(DEPDIR)/time.Po +include ./$(DEPDIR)/timer_create.Po +include ./$(DEPDIR)/timer_xettime.Po +include ./$(DEPDIR)/timerfd_xettime.Po +include ./$(DEPDIR)/times-fail.Po +include ./$(DEPDIR)/times.Po +include ./$(DEPDIR)/truncate.Po +include ./$(DEPDIR)/truncate64-truncate64.Po +include ./$(DEPDIR)/ugetrlimit.Po +include ./$(DEPDIR)/uio-uio.Po +include ./$(DEPDIR)/umask.Po +include ./$(DEPDIR)/umount.Po +include ./$(DEPDIR)/umount2.Po +include ./$(DEPDIR)/umoven-illptr.Po +include ./$(DEPDIR)/umovestr-illptr.Po +include ./$(DEPDIR)/umovestr.Po +include ./$(DEPDIR)/umovestr2.Po +include ./$(DEPDIR)/umovestr3.Po +include ./$(DEPDIR)/uname.Po +include ./$(DEPDIR)/unix-pair-send-recv.Po +include ./$(DEPDIR)/unix-pair-sendto-recvfrom.Po +include ./$(DEPDIR)/unlink.Po +include ./$(DEPDIR)/unlinkat.Po +include ./$(DEPDIR)/unshare.Po +include ./$(DEPDIR)/userfaultfd.Po +include ./$(DEPDIR)/ustat.Po +include ./$(DEPDIR)/utime.Po +include ./$(DEPDIR)/utimensat.Po +include ./$(DEPDIR)/utimes.Po +include ./$(DEPDIR)/vfork-f.Po +include ./$(DEPDIR)/vhangup.Po +include ./$(DEPDIR)/vmsplice.Po +include ./$(DEPDIR)/wait4-v.Po +include ./$(DEPDIR)/wait4.Po +include ./$(DEPDIR)/waitid-v.Po +include ./$(DEPDIR)/waitid.Po +include ./$(DEPDIR)/waitpid.Po +include ./$(DEPDIR)/xattr-strings.Po +include ./$(DEPDIR)/xattr.Po +include ./$(DEPDIR)/xet_robust_list.Po +include ./$(DEPDIR)/xetitimer.Po +include ./$(DEPDIR)/xetpgid.Po +include ./$(DEPDIR)/xetpriority.Po +include ./$(DEPDIR)/xettimeofday.Po + +.c.o: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +libtests_a-errno2name.o: errno2name.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.o -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +# $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c + +libtests_a-errno2name.obj: errno2name.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +# $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` + +libtests_a-error_msg.o: error_msg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.o -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +# $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c + +libtests_a-error_msg.obj: error_msg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.obj -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +# $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` + +libtests_a-fill_memory.o: fill_memory.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-fill_memory.o -MD -MP -MF $(DEPDIR)/libtests_a-fill_memory.Tpo -c -o libtests_a-fill_memory.o `test -f 'fill_memory.c' || echo '$(srcdir)/'`fill_memory.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-fill_memory.Tpo $(DEPDIR)/libtests_a-fill_memory.Po +# $(AM_V_CC)source='fill_memory.c' object='libtests_a-fill_memory.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-fill_memory.o `test -f 'fill_memory.c' || echo '$(srcdir)/'`fill_memory.c + +libtests_a-fill_memory.obj: fill_memory.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-fill_memory.obj -MD -MP -MF $(DEPDIR)/libtests_a-fill_memory.Tpo -c -o libtests_a-fill_memory.obj `if test -f 'fill_memory.c'; then $(CYGPATH_W) 'fill_memory.c'; else $(CYGPATH_W) '$(srcdir)/fill_memory.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-fill_memory.Tpo $(DEPDIR)/libtests_a-fill_memory.Po +# $(AM_V_CC)source='fill_memory.c' object='libtests_a-fill_memory.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-fill_memory.obj `if test -f 'fill_memory.c'; then $(CYGPATH_W) 'fill_memory.c'; else $(CYGPATH_W) '$(srcdir)/fill_memory.c'; fi` + +libtests_a-get_page_size.o: get_page_size.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.o -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +# $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c + +libtests_a-get_page_size.obj: get_page_size.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.obj -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +# $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` + +libtests_a-hexdump_strdup.o: hexdump_strdup.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +# $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c + +libtests_a-hexdump_strdup.obj: hexdump_strdup.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +# $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` + +libtests_a-hexquote_strndup.o: hexquote_strndup.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +# $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c + +libtests_a-hexquote_strndup.obj: hexquote_strndup.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +# $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` + +libtests_a-inode_of_sockfd.o: inode_of_sockfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.o -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +# $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c + +libtests_a-inode_of_sockfd.obj: inode_of_sockfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +# $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` + +libtests_a-libmmsg.o: libmmsg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libmmsg.o -MD -MP -MF $(DEPDIR)/libtests_a-libmmsg.Tpo -c -o libtests_a-libmmsg.o `test -f 'libmmsg.c' || echo '$(srcdir)/'`libmmsg.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libmmsg.Tpo $(DEPDIR)/libtests_a-libmmsg.Po +# $(AM_V_CC)source='libmmsg.c' object='libtests_a-libmmsg.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libmmsg.o `test -f 'libmmsg.c' || echo '$(srcdir)/'`libmmsg.c + +libtests_a-libmmsg.obj: libmmsg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libmmsg.obj -MD -MP -MF $(DEPDIR)/libtests_a-libmmsg.Tpo -c -o libtests_a-libmmsg.obj `if test -f 'libmmsg.c'; then $(CYGPATH_W) 'libmmsg.c'; else $(CYGPATH_W) '$(srcdir)/libmmsg.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libmmsg.Tpo $(DEPDIR)/libtests_a-libmmsg.Po +# $(AM_V_CC)source='libmmsg.c' object='libtests_a-libmmsg.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libmmsg.obj `if test -f 'libmmsg.c'; then $(CYGPATH_W) 'libmmsg.c'; else $(CYGPATH_W) '$(srcdir)/libmmsg.c'; fi` + +libtests_a-libsocketcall.o: libsocketcall.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libsocketcall.o -MD -MP -MF $(DEPDIR)/libtests_a-libsocketcall.Tpo -c -o libtests_a-libsocketcall.o `test -f 'libsocketcall.c' || echo '$(srcdir)/'`libsocketcall.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libsocketcall.Tpo $(DEPDIR)/libtests_a-libsocketcall.Po +# $(AM_V_CC)source='libsocketcall.c' object='libtests_a-libsocketcall.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libsocketcall.o `test -f 'libsocketcall.c' || echo '$(srcdir)/'`libsocketcall.c + +libtests_a-libsocketcall.obj: libsocketcall.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libsocketcall.obj -MD -MP -MF $(DEPDIR)/libtests_a-libsocketcall.Tpo -c -o libtests_a-libsocketcall.obj `if test -f 'libsocketcall.c'; then $(CYGPATH_W) 'libsocketcall.c'; else $(CYGPATH_W) '$(srcdir)/libsocketcall.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libsocketcall.Tpo $(DEPDIR)/libtests_a-libsocketcall.Po +# $(AM_V_CC)source='libsocketcall.c' object='libtests_a-libsocketcall.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libsocketcall.obj `if test -f 'libsocketcall.c'; then $(CYGPATH_W) 'libsocketcall.c'; else $(CYGPATH_W) '$(srcdir)/libsocketcall.c'; fi` + +libtests_a-overflowuid.o: overflowuid.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.o -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +# $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c + +libtests_a-overflowuid.obj: overflowuid.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.obj -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +# $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` + +libtests_a-pipe_maxfd.o: pipe_maxfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-pipe_maxfd.o -MD -MP -MF $(DEPDIR)/libtests_a-pipe_maxfd.Tpo -c -o libtests_a-pipe_maxfd.o `test -f 'pipe_maxfd.c' || echo '$(srcdir)/'`pipe_maxfd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-pipe_maxfd.Tpo $(DEPDIR)/libtests_a-pipe_maxfd.Po +# $(AM_V_CC)source='pipe_maxfd.c' object='libtests_a-pipe_maxfd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-pipe_maxfd.o `test -f 'pipe_maxfd.c' || echo '$(srcdir)/'`pipe_maxfd.c + +libtests_a-pipe_maxfd.obj: pipe_maxfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-pipe_maxfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-pipe_maxfd.Tpo -c -o libtests_a-pipe_maxfd.obj `if test -f 'pipe_maxfd.c'; then $(CYGPATH_W) 'pipe_maxfd.c'; else $(CYGPATH_W) '$(srcdir)/pipe_maxfd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-pipe_maxfd.Tpo $(DEPDIR)/libtests_a-pipe_maxfd.Po +# $(AM_V_CC)source='pipe_maxfd.c' object='libtests_a-pipe_maxfd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-pipe_maxfd.obj `if test -f 'pipe_maxfd.c'; then $(CYGPATH_W) 'pipe_maxfd.c'; else $(CYGPATH_W) '$(srcdir)/pipe_maxfd.c'; fi` + +libtests_a-print_quoted_string.o: print_quoted_string.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.o -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +# $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c + +libtests_a-print_quoted_string.obj: print_quoted_string.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.obj -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +# $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` + +libtests_a-printflags.o: printflags.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.o -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +# $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c + +libtests_a-printflags.obj: printflags.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.obj -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +# $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` + +libtests_a-printxval.o: printxval.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.o -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +# $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c + +libtests_a-printxval.obj: printxval.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.obj -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +# $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` + +libtests_a-signal2name.o: signal2name.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-signal2name.o -MD -MP -MF $(DEPDIR)/libtests_a-signal2name.Tpo -c -o libtests_a-signal2name.o `test -f 'signal2name.c' || echo '$(srcdir)/'`signal2name.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-signal2name.Tpo $(DEPDIR)/libtests_a-signal2name.Po +# $(AM_V_CC)source='signal2name.c' object='libtests_a-signal2name.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-signal2name.o `test -f 'signal2name.c' || echo '$(srcdir)/'`signal2name.c + +libtests_a-signal2name.obj: signal2name.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-signal2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-signal2name.Tpo -c -o libtests_a-signal2name.obj `if test -f 'signal2name.c'; then $(CYGPATH_W) 'signal2name.c'; else $(CYGPATH_W) '$(srcdir)/signal2name.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-signal2name.Tpo $(DEPDIR)/libtests_a-signal2name.Po +# $(AM_V_CC)source='signal2name.c' object='libtests_a-signal2name.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-signal2name.obj `if test -f 'signal2name.c'; then $(CYGPATH_W) 'signal2name.c'; else $(CYGPATH_W) '$(srcdir)/signal2name.c'; fi` + +libtests_a-sprintrc.o: sprintrc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-sprintrc.o -MD -MP -MF $(DEPDIR)/libtests_a-sprintrc.Tpo -c -o libtests_a-sprintrc.o `test -f 'sprintrc.c' || echo '$(srcdir)/'`sprintrc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-sprintrc.Tpo $(DEPDIR)/libtests_a-sprintrc.Po +# $(AM_V_CC)source='sprintrc.c' object='libtests_a-sprintrc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-sprintrc.o `test -f 'sprintrc.c' || echo '$(srcdir)/'`sprintrc.c + +libtests_a-sprintrc.obj: sprintrc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-sprintrc.obj -MD -MP -MF $(DEPDIR)/libtests_a-sprintrc.Tpo -c -o libtests_a-sprintrc.obj `if test -f 'sprintrc.c'; then $(CYGPATH_W) 'sprintrc.c'; else $(CYGPATH_W) '$(srcdir)/sprintrc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-sprintrc.Tpo $(DEPDIR)/libtests_a-sprintrc.Po +# $(AM_V_CC)source='sprintrc.c' object='libtests_a-sprintrc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-sprintrc.obj `if test -f 'sprintrc.c'; then $(CYGPATH_W) 'sprintrc.c'; else $(CYGPATH_W) '$(srcdir)/sprintrc.c'; fi` + +libtests_a-tail_alloc.o: tail_alloc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.o -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +# $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c + +libtests_a-tail_alloc.obj: tail_alloc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.obj -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +# $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` + +libtests_a-tprintf.o: tprintf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.o -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +# $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c + +libtests_a-tprintf.obj: tprintf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.obj -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +# $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` + +fstat64-fstat64.o: fstat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.o -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po +# $(AM_V_CC)source='fstat64.c' object='fstat64-fstat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c + +fstat64-fstat64.obj: fstat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.obj -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.obj `if test -f 'fstat64.c'; then $(CYGPATH_W) 'fstat64.c'; else $(CYGPATH_W) '$(srcdir)/fstat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po +# $(AM_V_CC)source='fstat64.c' object='fstat64-fstat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstat64-fstat64.obj `if test -f 'fstat64.c'; then $(CYGPATH_W) 'fstat64.c'; else $(CYGPATH_W) '$(srcdir)/fstat64.c'; fi` + +fstatat64-fstatat64.o: fstatat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstatat64-fstatat64.o -MD -MP -MF $(DEPDIR)/fstatat64-fstatat64.Tpo -c -o fstatat64-fstatat64.o `test -f 'fstatat64.c' || echo '$(srcdir)/'`fstatat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/fstatat64-fstatat64.Tpo $(DEPDIR)/fstatat64-fstatat64.Po +# $(AM_V_CC)source='fstatat64.c' object='fstatat64-fstatat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstatat64-fstatat64.o `test -f 'fstatat64.c' || echo '$(srcdir)/'`fstatat64.c + +fstatat64-fstatat64.obj: fstatat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstatat64-fstatat64.obj -MD -MP -MF $(DEPDIR)/fstatat64-fstatat64.Tpo -c -o fstatat64-fstatat64.obj `if test -f 'fstatat64.c'; then $(CYGPATH_W) 'fstatat64.c'; else $(CYGPATH_W) '$(srcdir)/fstatat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/fstatat64-fstatat64.Tpo $(DEPDIR)/fstatat64-fstatat64.Po +# $(AM_V_CC)source='fstatat64.c' object='fstatat64-fstatat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstatat64-fstatat64.obj `if test -f 'fstatat64.c'; then $(CYGPATH_W) 'fstatat64.c'; else $(CYGPATH_W) '$(srcdir)/fstatat64.c'; fi` + +ftruncate64-ftruncate64.o: ftruncate64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftruncate64-ftruncate64.o -MD -MP -MF $(DEPDIR)/ftruncate64-ftruncate64.Tpo -c -o ftruncate64-ftruncate64.o `test -f 'ftruncate64.c' || echo '$(srcdir)/'`ftruncate64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/ftruncate64-ftruncate64.Tpo $(DEPDIR)/ftruncate64-ftruncate64.Po +# $(AM_V_CC)source='ftruncate64.c' object='ftruncate64-ftruncate64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftruncate64-ftruncate64.o `test -f 'ftruncate64.c' || echo '$(srcdir)/'`ftruncate64.c + +ftruncate64-ftruncate64.obj: ftruncate64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftruncate64-ftruncate64.obj -MD -MP -MF $(DEPDIR)/ftruncate64-ftruncate64.Tpo -c -o ftruncate64-ftruncate64.obj `if test -f 'ftruncate64.c'; then $(CYGPATH_W) 'ftruncate64.c'; else $(CYGPATH_W) '$(srcdir)/ftruncate64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/ftruncate64-ftruncate64.Tpo $(DEPDIR)/ftruncate64-ftruncate64.Po +# $(AM_V_CC)source='ftruncate64.c' object='ftruncate64-ftruncate64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftruncate64-ftruncate64.obj `if test -f 'ftruncate64.c'; then $(CYGPATH_W) 'ftruncate64.c'; else $(CYGPATH_W) '$(srcdir)/ftruncate64.c'; fi` + +lstat64-lstat64.o: lstat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lstat64-lstat64.o -MD -MP -MF $(DEPDIR)/lstat64-lstat64.Tpo -c -o lstat64-lstat64.o `test -f 'lstat64.c' || echo '$(srcdir)/'`lstat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/lstat64-lstat64.Tpo $(DEPDIR)/lstat64-lstat64.Po +# $(AM_V_CC)source='lstat64.c' object='lstat64-lstat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lstat64-lstat64.o `test -f 'lstat64.c' || echo '$(srcdir)/'`lstat64.c + +lstat64-lstat64.obj: lstat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lstat64-lstat64.obj -MD -MP -MF $(DEPDIR)/lstat64-lstat64.Tpo -c -o lstat64-lstat64.obj `if test -f 'lstat64.c'; then $(CYGPATH_W) 'lstat64.c'; else $(CYGPATH_W) '$(srcdir)/lstat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/lstat64-lstat64.Tpo $(DEPDIR)/lstat64-lstat64.Po +# $(AM_V_CC)source='lstat64.c' object='lstat64-lstat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lstat64-lstat64.obj `if test -f 'lstat64.c'; then $(CYGPATH_W) 'lstat64.c'; else $(CYGPATH_W) '$(srcdir)/lstat64.c'; fi` + +mmap64-mmap64.o: mmap64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmap64-mmap64.o -MD -MP -MF $(DEPDIR)/mmap64-mmap64.Tpo -c -o mmap64-mmap64.o `test -f 'mmap64.c' || echo '$(srcdir)/'`mmap64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/mmap64-mmap64.Tpo $(DEPDIR)/mmap64-mmap64.Po +# $(AM_V_CC)source='mmap64.c' object='mmap64-mmap64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap64-mmap64.o `test -f 'mmap64.c' || echo '$(srcdir)/'`mmap64.c + +mmap64-mmap64.obj: mmap64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmap64-mmap64.obj -MD -MP -MF $(DEPDIR)/mmap64-mmap64.Tpo -c -o mmap64-mmap64.obj `if test -f 'mmap64.c'; then $(CYGPATH_W) 'mmap64.c'; else $(CYGPATH_W) '$(srcdir)/mmap64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/mmap64-mmap64.Tpo $(DEPDIR)/mmap64-mmap64.Po +# $(AM_V_CC)source='mmap64.c' object='mmap64-mmap64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap64-mmap64.obj `if test -f 'mmap64.c'; then $(CYGPATH_W) 'mmap64.c'; else $(CYGPATH_W) '$(srcdir)/mmap64.c'; fi` + +newfstatat-newfstatat.o: newfstatat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT newfstatat-newfstatat.o -MD -MP -MF $(DEPDIR)/newfstatat-newfstatat.Tpo -c -o newfstatat-newfstatat.o `test -f 'newfstatat.c' || echo '$(srcdir)/'`newfstatat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/newfstatat-newfstatat.Tpo $(DEPDIR)/newfstatat-newfstatat.Po +# $(AM_V_CC)source='newfstatat.c' object='newfstatat-newfstatat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.o `test -f 'newfstatat.c' || echo '$(srcdir)/'`newfstatat.c + +newfstatat-newfstatat.obj: newfstatat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT newfstatat-newfstatat.obj -MD -MP -MF $(DEPDIR)/newfstatat-newfstatat.Tpo -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/newfstatat-newfstatat.Tpo $(DEPDIR)/newfstatat-newfstatat.Po +# $(AM_V_CC)source='newfstatat.c' object='newfstatat-newfstatat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` + +pread64_pwrite64-pread64-pwrite64.o: pread64-pwrite64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.o -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +# $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c + +pread64_pwrite64-pread64-pwrite64.obj: pread64-pwrite64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.obj -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +# $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` + +preadv-preadv.o: preadv.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.o -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c + $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +# $(AM_V_CC)source='preadv.c' object='preadv-preadv.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c + +preadv-preadv.obj: preadv.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.obj -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +# $(AM_V_CC)source='preadv.c' object='preadv-preadv.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` + +preadv_pwritev-preadv-pwritev.o: preadv-pwritev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.o -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c + $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +# $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c + +preadv_pwritev-preadv-pwritev.obj: preadv-pwritev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.obj -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +# $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` + +pwritev-pwritev.o: pwritev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.o -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c + $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +# $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c + +pwritev-pwritev.obj: pwritev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.obj -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +# $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` + +stat64-stat64.o: stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.o -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po +# $(AM_V_CC)source='stat64.c' object='stat64-stat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c + +stat64-stat64.obj: stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.obj -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po +# $(AM_V_CC)source='stat64.c' object='stat64-stat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat64-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` + +statfs-statfs.o: statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT statfs-statfs.o -MD -MP -MF $(DEPDIR)/statfs-statfs.Tpo -c -o statfs-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/statfs-statfs.Tpo $(DEPDIR)/statfs-statfs.Po +# $(AM_V_CC)source='statfs.c' object='statfs-statfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o statfs-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + +statfs-statfs.obj: statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT statfs-statfs.obj -MD -MP -MF $(DEPDIR)/statfs-statfs.Tpo -c -o statfs-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/statfs-statfs.Tpo $(DEPDIR)/statfs-statfs.Po +# $(AM_V_CC)source='statfs.c' object='statfs-statfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o statfs-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + +truncate64-truncate64.o: truncate64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT truncate64-truncate64.o -MD -MP -MF $(DEPDIR)/truncate64-truncate64.Tpo -c -o truncate64-truncate64.o `test -f 'truncate64.c' || echo '$(srcdir)/'`truncate64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/truncate64-truncate64.Tpo $(DEPDIR)/truncate64-truncate64.Po +# $(AM_V_CC)source='truncate64.c' object='truncate64-truncate64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o truncate64-truncate64.o `test -f 'truncate64.c' || echo '$(srcdir)/'`truncate64.c + +truncate64-truncate64.obj: truncate64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT truncate64-truncate64.obj -MD -MP -MF $(DEPDIR)/truncate64-truncate64.Tpo -c -o truncate64-truncate64.obj `if test -f 'truncate64.c'; then $(CYGPATH_W) 'truncate64.c'; else $(CYGPATH_W) '$(srcdir)/truncate64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/truncate64-truncate64.Tpo $(DEPDIR)/truncate64-truncate64.Po +# $(AM_V_CC)source='truncate64.c' object='truncate64-truncate64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o truncate64-truncate64.obj `if test -f 'truncate64.c'; then $(CYGPATH_W) 'truncate64.c'; else $(CYGPATH_W) '$(srcdir)/truncate64.c'; fi` + +uio-uio.o: uio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uio-uio.o -MD -MP -MF $(DEPDIR)/uio-uio.Tpo -c -o uio-uio.o `test -f 'uio.c' || echo '$(srcdir)/'`uio.c + $(AM_V_at)$(am__mv) $(DEPDIR)/uio-uio.Tpo $(DEPDIR)/uio-uio.Po +# $(AM_V_CC)source='uio.c' object='uio-uio.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uio-uio.o `test -f 'uio.c' || echo '$(srcdir)/'`uio.c + +uio-uio.obj: uio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uio-uio.obj -MD -MP -MF $(DEPDIR)/uio-uio.Tpo -c -o uio-uio.obj `if test -f 'uio.c'; then $(CYGPATH_W) 'uio.c'; else $(CYGPATH_W) '$(srcdir)/uio.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/uio-uio.Tpo $(DEPDIR)/uio-uio.Po +# $(AM_V_CC)source='uio.c' object='uio-uio.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uio-uio.obj `if test -f 'uio.c'; then $(CYGPATH_W) 'uio.c'; else $(CYGPATH_W) '$(srcdir)/uio.c'; fi` +check-valgrind-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_LIBRARIES) $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +#.test$(EXEEXT).log: +# @p='$<'; \ +# $(am__set_b); \ +# $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +# --log-file $$b.log --trs-file $$b.trs \ +# $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +# "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-am + +check-valgrind-am: check-valgrind-local + +clean: clean-am + +clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am \ + check-valgrind-am check-valgrind-local clean \ + clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am + + + +# Valgrind check +# +# Optional: +# - VALGRIND_SUPPRESSIONS_FILES: Space-separated list of Valgrind suppressions +# files to load. (Default: empty) +# - VALGRIND_FLAGS: General flags to pass to all Valgrind tools. +# (Default: --num-callers=30) +# - VALGRIND_$toolname_FLAGS: Flags to pass to Valgrind $toolname (one of: +# memcheck, helgrind, drd, sgcheck). (Default: various) + +# Optional variables +VALGRIND_SUPPRESSIONS ?= $(addprefix --suppressions=,$(VALGRIND_SUPPRESSIONS_FILES)) +VALGRIND_FLAGS ?= --num-callers=30 +VALGRIND_memcheck_FLAGS ?= --leak-check=full --show-reachable=no +VALGRIND_helgrind_FLAGS ?= --history-level=approx +VALGRIND_drd_FLAGS ?= +VALGRIND_sgcheck_FLAGS ?= + +# Internal use +valgrind_log_files = $(addprefix test-suite-,$(addsuffix .log,$(valgrind_tools))) + +valgrind_memcheck_flags = --tool=memcheck $(VALGRIND_memcheck_FLAGS) +valgrind_helgrind_flags = --tool=helgrind $(VALGRIND_helgrind_FLAGS) +valgrind_drd_flags = --tool=drd $(VALGRIND_drd_FLAGS) +valgrind_sgcheck_flags = --tool=exp-sgcheck $(VALGRIND_sgcheck_FLAGS) + +valgrind_quiet = $(valgrind_quiet_$(V)) +valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY)) +valgrind_quiet_0 = --quiet +valgrind_v_use = $(valgrind_v_use_$(V)) +valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY)) +valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$@):; + +# Support running with and without libtool. +ifneq ($(LIBTOOL),) +valgrind_lt = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=execute +else +valgrind_lt = +endif + +# Use recursive makes in order to ignore errors during check +check-valgrind: +ifeq ($(VALGRIND_ENABLED),yes) + -$(AM_V_at)$(foreach tool,$(valgrind_enabled_tools), \ + $(MAKE) $(AM_MAKEFLAGS) -k check-valgrind-$(tool); \ + ) +else + @echo "Need to reconfigure with --enable-valgrind" +endif + +# Valgrind running +VALGRIND_TESTS_ENVIRONMENT = \ + $(TESTS_ENVIRONMENT) \ + env VALGRIND=$(VALGRIND) \ + G_SLICE=always-malloc,debug-blocks \ + G_DEBUG=fatal-warnings,fatal-criticals,gc-friendly + +VALGRIND_LOG_COMPILER = \ + $(valgrind_lt) \ + $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) + +define valgrind_tool_rule = +check-valgrind-$(1): $$(BUILT_SOURCES) +ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes) + $$(valgrind_v_use)$$(MAKE) $$(AM_MAKEFLAGS) check-am \ + TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \ + LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \ + LOG_FLAGS="$$(valgrind_$(1)_flags)" \ + TEST_SUITE_LOG=test-suite-$(1).log +else ifeq ($$(VALGRIND_ENABLED),yes) + @echo "Need to reconfigure with --enable-valgrind-$(1)" +else + @echo "Need to reconfigure with --enable-valgrind" +endif +endef + +$(foreach tool,$(valgrind_tools),$(eval $(call valgrind_tool_rule,$(tool)))) + +AM_DISTCHECK_CONFIGURE_FLAGS ?= +AM_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind + +MOSTLYCLEANFILES ?= +MOSTLYCLEANFILES += $(valgrind_log_files) + +.PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools)) + + +ksysent.h: $(srcdir)/ksysent.sed + echo '#include ' | \ + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 + LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 + mv -f $@.t2 $@ + rm -f $@.t1 + +ksysent.$(OBJEXT): ksysent.h +$(objects): scno.h + +syscallent.i: $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h + $(CPP) -P $(SCNO_CPPFLAGS) $^ -o $@ + +scno.h: $(top_srcdir)/scno.head syscallent.i + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + cat $< >> $@-t + LC_ALL=C sed -n '$(SCNO_SED)' $(filter-out $<,$^) >> $@-t + mv $@-t $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests-mx32/Makefile.am b/tests-mx32/Makefile.am new file mode 100644 index 000000000..58efd3e21 --- /dev/null +++ b/tests-mx32/Makefile.am @@ -0,0 +1,962 @@ +# Automake input for strace tests. +# +# Copyright (c) 2011-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +OS = linux +ARCH = @arch_mx32@ +MPERS_NAME = mx32 +ARCH_MFLAGS = -DMPERS_IS_$(MPERS_NAME) -mx32 +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = $(ARCH_MFLAGS) \ + -I$(builddir) \ + -I$(top_builddir)/$(OS)/$(ARCH) \ + -I$(top_srcdir)/$(OS)/$(ARCH) \ + -I$(top_builddir)/$(OS) \ + -I$(top_srcdir)/$(OS) \ + -I$(top_builddir) \ + -I$(top_srcdir) +AM_LDFLAGS = $(ARCH_MFLAGS) + +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + fill_memory.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + libmmsg.c \ + libsocketcall.c \ + overflowuid.c \ + pipe_maxfd.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + signal2name.c \ + sprintrc.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a + +check_PROGRAMS = \ + _newselect \ + accept \ + accept4 \ + access \ + acct \ + add_key \ + adjtimex \ + aio \ + alarm \ + answer \ + attach-f-p \ + attach-f-p-cmd \ + attach-p-cmd-cmd \ + attach-p-cmd-p \ + bpf \ + brk \ + btrfs \ + caps \ + caps-abbrev \ + chmod \ + chown \ + chown32 \ + chroot \ + clock_adjtime \ + clock_nanosleep \ + clock_xettime \ + copy_file_range \ + count-f \ + creat \ + delete_module \ + dup \ + dup2 \ + dup3 \ + epoll_create \ + epoll_create1 \ + epoll_ctl \ + epoll_pwait \ + epoll_wait \ + erestartsys \ + eventfd \ + execve \ + execve-v \ + execveat \ + execveat-v \ + faccessat \ + fadvise64 \ + fadvise64_64 \ + fallocate \ + fanotify_init \ + fanotify_mark \ + fchdir \ + fchmod \ + fchmodat \ + fchown \ + fchown32 \ + fchownat \ + fcntl \ + fcntl64 \ + fdatasync \ + file_handle \ + file_ioctl \ + filter-unavailable \ + finit_module \ + flock \ + fork-f \ + fstat \ + fstat64 \ + fstatat64 \ + fstatfs \ + fstatfs64 \ + fsync \ + ftruncate \ + ftruncate64 \ + futex \ + futimesat \ + get_mempolicy \ + getcpu \ + getcwd \ + getdents \ + getdents64 \ + getegid \ + getegid32 \ + geteuid \ + geteuid32 \ + getgid \ + getgid32 \ + getgroups \ + getgroups32 \ + getpeername \ + getpgrp \ + getrandom \ + getresgid \ + getresgid32 \ + getresuid \ + getresuid32 \ + getrlimit \ + getrusage \ + getsid \ + getsockname \ + getuid \ + getuid32 \ + getxxid \ + inet-cmsg \ + init_module \ + inotify \ + inotify_init1 \ + ioctl \ + ioctl_block \ + ioctl_dm \ + ioctl_dm-v \ + ioctl_evdev \ + ioctl_evdev-v \ + ioctl_loop \ + ioctl_loop-nv \ + ioctl_loop-v \ + ioctl_mtd \ + ioctl_rtc \ + ioctl_rtc-v \ + ioctl_scsi \ + ioctl_sg_io_v3 \ + ioctl_sg_io_v4 \ + ioctl_sock_gifconf \ + ioctl_uffdio \ + ioctl_v4l2 \ + ioperm \ + iopl \ + ioprio \ + ip_mreq \ + ipc \ + ipc_msg \ + ipc_msgbuf \ + ipc_sem \ + ipc_shm \ + kcmp \ + kexec_file_load \ + kexec_load \ + keyctl \ + kill \ + ksysent \ + lchown \ + lchown32 \ + link \ + linkat \ + llseek \ + lookup_dcookie \ + lseek \ + lstat \ + lstat64 \ + mbind \ + membarrier \ + memfd_create \ + migrate_pages \ + mincore \ + mkdir \ + mkdirat \ + mknod \ + mknodat \ + mlock \ + mlock2 \ + mlockall \ + mmap \ + mmap64 \ + mmsg \ + mmsg-silent \ + mmsg_name \ + mmsg_name-v \ + mount \ + move_pages \ + mq \ + mq_sendrecv \ + mq_sendrecv-read \ + mq_sendrecv-write \ + msg_control \ + msg_control-v \ + msg_name \ + munlockall \ + nanosleep \ + net-accept-connect \ + net-icmp_filter \ + net-sockaddr \ + net-y-unix \ + net-yy-inet \ + net-yy-netlink \ + net-yy-unix \ + netlink_inet_diag \ + netlink_netlink_diag \ + netlink_protocol \ + netlink_unix_diag \ + newfstatat \ + nsyscalls \ + old_mmap \ + oldfstat \ + oldlstat \ + oldselect \ + oldstat \ + open \ + openat \ + pause \ + pc \ + perf_event_open \ + perf_event_open_nonverbose \ + perf_event_open_unabbrev \ + personality \ + pipe \ + pipe2 \ + pkey_alloc \ + pkey_free \ + pkey_mprotect \ + poll \ + ppoll \ + prctl-arg2-intptr \ + prctl-dumpable \ + prctl-name \ + prctl-no-args \ + prctl-pdeathsig \ + prctl-seccomp-filter-v \ + prctl-seccomp-strict \ + prctl-securebits \ + prctl-tid_address \ + prctl-tsc \ + pread64-pwrite64 \ + preadv \ + preadv-pwritev \ + preadv2-pwritev2 \ + print_maxfd \ + printstr \ + prlimit64 \ + process_vm_readv \ + process_vm_writev \ + pselect6 \ + ptrace \ + pwritev \ + qual_fault \ + qual_inject-error-signal \ + qual_inject-retval \ + qual_inject-signal \ + qual_signal \ + quotactl \ + quotactl-v \ + quotactl-xfs \ + quotactl-xfs-v \ + read-write \ + readahead \ + readdir \ + readlink \ + readlinkat \ + readv \ + reboot \ + recvfrom \ + recvmmsg-timeout \ + recvmsg \ + redirect-fds \ + remap_file_pages \ + rename \ + renameat \ + renameat2 \ + request_key \ + restart_syscall \ + rmdir \ + rt_sigpending \ + rt_sigprocmask \ + rt_sigqueueinfo \ + rt_sigsuspend \ + rt_sigtimedwait \ + rt_tgsigqueueinfo \ + sched_get_priority_mxx \ + sched_rr_get_interval \ + sched_xetaffinity \ + sched_xetattr \ + sched_xetparam \ + sched_xetscheduler \ + sched_yield \ + scm_rights \ + seccomp-filter \ + seccomp-filter-v \ + seccomp-strict \ + select \ + semop \ + sendfile \ + sendfile64 \ + set_mempolicy \ + set_ptracer_any \ + setdomainname \ + setfsgid \ + setfsgid32 \ + setfsuid \ + setfsuid32 \ + setgid \ + setgid32 \ + setgroups \ + setgroups32 \ + sethostname \ + setns \ + setregid \ + setregid32 \ + setresgid \ + setresgid32 \ + setresuid \ + setresuid32 \ + setreuid \ + setreuid32 \ + setrlimit \ + setuid \ + setuid32 \ + shmxt \ + shutdown \ + sigaction \ + sigaltstack \ + siginfo \ + signal_receive \ + signalfd4 \ + sigreturn \ + sleep \ + socketcall \ + splice \ + stack-fcall \ + stat \ + stat64 \ + statfs \ + statfs64 \ + swap \ + symlink \ + symlinkat \ + sync \ + sync_file_range \ + sync_file_range2 \ + sysinfo \ + syslog \ + tee \ + threads-execve \ + time \ + timer_create \ + timer_xettime \ + timerfd_xettime \ + times \ + times-fail \ + truncate \ + truncate64 \ + ugetrlimit \ + uio \ + umask \ + umount \ + umount2 \ + umoven-illptr \ + umovestr \ + umovestr-illptr \ + umovestr2 \ + umovestr3 \ + uname \ + unix-pair-send-recv \ + unix-pair-sendto-recvfrom \ + unlink \ + unlinkat \ + unshare \ + userfaultfd \ + ustat \ + utime \ + utimensat \ + utimes \ + vfork-f \ + vhangup \ + vmsplice \ + wait4 \ + wait4-v \ + waitid \ + waitid-v \ + waitpid \ + xattr \ + xattr-strings \ + xet_robust_list \ + xetitimer \ + xetpgid \ + xetpriority \ + xettimeofday \ + # end of check_PROGRAMS + +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) +fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mq_LDADD = -lrt $(LDADD) +mq_sendrecv_LDADD = -lrt $(LDADD) +mq_sendrecv_read_LDADD = -lrt $(LDADD) +mq_sendrecv_write_LDADD = -lrt $(LDADD) +newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +threads_execve_LDADD = -lrt -lpthread $(LDADD) +times_LDADD = -lrt $(LDADD) +truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 + +stack_fcall_SOURCES = stack-fcall.c \ + stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c + +if USE_LIBUNWIND +LIBUNWIND_TESTS = strace-k.test +else +LIBUNWIND_TESTS = +endif + +DECODER_TESTS = \ + _newselect.test \ + accept.test \ + accept4.test \ + access.test \ + acct.test \ + add_key.test \ + adjtimex.test \ + aio.test \ + alarm.test \ + bpf.test \ + brk.test \ + btrfs-v.test \ + btrfs-vw.test \ + btrfs-w.test \ + btrfs.test \ + caps-abbrev.test \ + caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ + clock_nanosleep.test \ + clock_xettime.test \ + copy_file_range.test \ + creat.test \ + delete_module.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ + epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ + erestartsys.test \ + eventfd.test \ + execve-v.test \ + execve.test \ + execveat-v.test \ + execveat.test \ + faccessat.test \ + fadvise64.test \ + fadvise64_64.test \ + fallocate.test \ + fanotify_init.test \ + fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ + fcntl.test \ + fcntl64.test \ + fdatasync.test \ + file_handle.test \ + file_ioctl.test \ + finit_module.test \ + flock.test \ + fstat.test \ + fstat64.test \ + fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ + ftruncate.test \ + ftruncate64.test \ + futex.test \ + futimesat.test \ + get_mempolicy.test \ + getcpu.test \ + getcwd.test \ + getdents.test \ + getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpeername.test \ + getpgrp.test \ + getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrlimit.test \ + getrusage.test \ + getsid.test \ + getsockname.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ + inet-cmsg.test \ + init_module.test \ + inotify.test \ + inotify_init1.test \ + ioctl.test \ + ioctl_block.test \ + ioctl_dm-v.test \ + ioctl_dm.test \ + ioctl_evdev-v.test \ + ioctl_evdev.test \ + ioctl_loop-nv.test \ + ioctl_loop-v.test \ + ioctl_loop.test \ + ioctl_mtd.test \ + ioctl_rtc-v.test \ + ioctl_rtc.test \ + ioctl_scsi.test \ + ioctl_sg_io_v3.test \ + ioctl_sg_io_v4.test \ + ioctl_sock_gifconf.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ + ioprio.test \ + ip_mreq.test \ + ipc.test \ + ipc_msg.test \ + ipc_msgbuf.test \ + ipc_sem.test \ + ipc_shm.test \ + kcmp.test \ + kexec_file_load.test \ + kexec_load.test \ + keyctl.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ + llseek.test \ + lookup_dcookie.test \ + lseek.test \ + lstat.test \ + lstat64.test \ + mbind.test \ + membarrier.test \ + memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ + mlock2.test \ + mlockall.test \ + mmap.test \ + mmap64.test \ + mmsg-silent.test \ + mmsg.test \ + mmsg_name-v.test \ + mmsg_name.test \ + mount.test \ + move_pages.test \ + mq.test \ + mq_sendrecv-read.test \ + mq_sendrecv-write.test \ + mq_sendrecv.test \ + msg_control-v.test \ + msg_control.test \ + msg_name.test \ + munlockall.test \ + nanosleep.test \ + net-icmp_filter.test \ + net-sockaddr.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ + net.test \ + netlink_protocol.test \ + newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ + oldfstat.test \ + oldlstat.test \ + oldselect.test \ + oldstat.test \ + open.test \ + openat.test \ + pause.test \ + perf_event_open.test \ + perf_event_open_nonverbose.test \ + perf_event_open_unabbrev.test \ + personality.test \ + pipe.test \ + pipe2.test \ + pkey_alloc.test \ + pkey_free.test \ + pkey_mprotect.test \ + poll.test \ + ppoll.test \ + prctl-arg2-intptr.test \ + prctl-dumpable.test \ + prctl-name.test \ + prctl-no-args.test \ + prctl-pdeathsig.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + prctl-securebits.test \ + prctl-tid_address.test \ + prctl-tsc.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv.test \ + preadv2-pwritev2.test \ + printstr.test \ + prlimit64.test \ + process_vm_readv.test \ + process_vm_writev.test \ + pselect6.test \ + ptrace.test \ + pwritev.test \ + qual_fault-exit_group.test \ + quotactl-v.test \ + quotactl-xfs-v.test \ + quotactl-xfs.test \ + quotactl.test \ + read-write.test \ + readahead.test \ + readdir.test \ + readlink.test \ + readlinkat.test \ + readv.test \ + reboot.test \ + recvfrom.test \ + recvmmsg-timeout.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + request_key.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ + rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ + sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ + scm_rights-fd.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ + select.test \ + semop.test \ + sendfile.test \ + sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setns.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setrlimit.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ + shutdown.test \ + sigaction.test \ + sigaltstack.test \ + siginfo.test \ + signalfd4.test \ + sigreturn.test \ + socketcall.test \ + splice.test \ + stat.test \ + stat64.test \ + statfs.test \ + statfs64.test \ + sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ + sysinfo.test \ + syslog.test \ + tee.test \ + time.test \ + timer_create.test \ + timer_xettime.test \ + timerfd_xettime.test \ + times-fail.test \ + times.test \ + truncate.test \ + truncate64.test \ + ugetrlimit.test \ + uio.test \ + umask.test \ + umount.test \ + umount2.test \ + umoven-illptr.test \ + umovestr-illptr.test \ + umovestr.test \ + umovestr2.test \ + umovestr3.test \ + uname.test \ + unix-pair-send-recv.test \ + unix-pair-sendto-recvfrom.test \ + unlink.test \ + unlinkat.test \ + unshare.test \ + userfaultfd.test \ + ustat.test \ + utime.test \ + utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ + wait4-v.test \ + wait4.test \ + waitid-v.test \ + waitid.test \ + waitpid.test \ + xattr-strings.test \ + xattr.test \ + xet_robust_list.test \ + xetitimer.test \ + xetpgid.test \ + xetpriority.test \ + xettimeofday.test \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ + count.test \ + detach-running.test \ + detach-sleeping.test \ + detach-stopped.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + options-syntax.test \ + pc.test \ + qual_fault-syntax.test \ + qual_fault.test \ + qual_inject-error-signal.test \ + qual_inject-retval.test \ + qual_inject-signal.test \ + qual_inject-syntax.test \ + qual_signal.test \ + qual_syscall.test \ + redirect-fds.test \ + redirect.test \ + restart_syscall.test \ + signal_receive.test \ + strace-C.test \ + strace-E.test \ + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + threads-execve.test \ + vfork-f.test \ + # end of MISC_TESTS + +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(LIBUNWIND_TESTS) + +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) + +TEST_LOG_COMPILER = env +AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh + +@VALGRIND_CHECK_RULES@ +VALGRIND_FLAGS = --quiet +VALGRIND_SUPPRESSIONS_FILES = $(srcdir)/strace.supp + +EXTRA_DIST = init.sh run.sh match.awk \ + caps-abbrev.awk \ + caps.awk \ + count-f.expected \ + eventfd.expected \ + fadvise.h \ + filter-unavailable.expected \ + fstatat.c \ + fstatx.c \ + getresugid.c \ + init_delete_module.h \ + ipc.sh \ + ipc_msgbuf.expected \ + ksysent.sed \ + lstatx.c \ + net.expected \ + oldselect.expected \ + pipe.expected \ + ppoll-v.expected \ + ppoll.expected \ + process_vm_readv_writev.c \ + qual_fault-exit_group.expected \ + qual_inject-error-signal.expected \ + qual_inject-signal.expected \ + quotactl.h \ + scno_tampering.sh \ + setfsugid.c \ + setresugid.c \ + setreugid.c \ + setugid.c \ + sigaction.awk \ + sigaltstack.expected \ + sockname.c \ + statfs.expected \ + statx.sh \ + strace-C.expected \ + strace-E.expected \ + strace-T.expected \ + strace-ff.expected \ + strace-k.test \ + strace-r.expected \ + strace.supp \ + struct_flock.c \ + sun_path.expected \ + uio.expected \ + umode_t.c \ + umovestr.expected \ + unix-pair-send-recv.expected \ + unix-pair-sendto-recvfrom.expected \ + xchownx.c \ + xgetrlimit.c \ + xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ + xstatx.c \ + $(TESTS) + +ksysent.h: $(srcdir)/ksysent.sed + echo '#include ' | \ + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 + LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 + mv -f $@.t2 $@ + rm -f $@.t1 + +ksysent.$(OBJEXT): ksysent.h + +objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT))) +$(objects): scno.h + +CLEANFILES = ksysent.h $(TESTS:=.tmp) + +include ../scno.am diff --git a/tests-mx32/Makefile.in b/tests-mx32/Makefile.in new file mode 100644 index 000000000..47838a3f7 --- /dev/null +++ b/tests-mx32/Makefile.in @@ -0,0 +1,5714 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Automake input for strace tests. +# +# Copyright (c) 2011-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# scno.h make rules for strace. +# +# Copyright (c) 2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = _newselect$(EXEEXT) accept$(EXEEXT) accept4$(EXEEXT) \ + access$(EXEEXT) acct$(EXEEXT) add_key$(EXEEXT) \ + adjtimex$(EXEEXT) aio$(EXEEXT) alarm$(EXEEXT) answer$(EXEEXT) \ + attach-f-p$(EXEEXT) attach-f-p-cmd$(EXEEXT) \ + attach-p-cmd-cmd$(EXEEXT) attach-p-cmd-p$(EXEEXT) bpf$(EXEEXT) \ + brk$(EXEEXT) btrfs$(EXEEXT) caps$(EXEEXT) caps-abbrev$(EXEEXT) \ + chmod$(EXEEXT) chown$(EXEEXT) chown32$(EXEEXT) chroot$(EXEEXT) \ + clock_adjtime$(EXEEXT) clock_nanosleep$(EXEEXT) \ + clock_xettime$(EXEEXT) copy_file_range$(EXEEXT) \ + count-f$(EXEEXT) creat$(EXEEXT) delete_module$(EXEEXT) \ + dup$(EXEEXT) dup2$(EXEEXT) dup3$(EXEEXT) epoll_create$(EXEEXT) \ + epoll_create1$(EXEEXT) epoll_ctl$(EXEEXT) epoll_pwait$(EXEEXT) \ + epoll_wait$(EXEEXT) erestartsys$(EXEEXT) eventfd$(EXEEXT) \ + execve$(EXEEXT) execve-v$(EXEEXT) execveat$(EXEEXT) \ + execveat-v$(EXEEXT) faccessat$(EXEEXT) fadvise64$(EXEEXT) \ + fadvise64_64$(EXEEXT) fallocate$(EXEEXT) \ + fanotify_init$(EXEEXT) fanotify_mark$(EXEEXT) fchdir$(EXEEXT) \ + fchmod$(EXEEXT) fchmodat$(EXEEXT) fchown$(EXEEXT) \ + fchown32$(EXEEXT) fchownat$(EXEEXT) fcntl$(EXEEXT) \ + fcntl64$(EXEEXT) fdatasync$(EXEEXT) file_handle$(EXEEXT) \ + file_ioctl$(EXEEXT) filter-unavailable$(EXEEXT) \ + finit_module$(EXEEXT) flock$(EXEEXT) fork-f$(EXEEXT) \ + fstat$(EXEEXT) fstat64$(EXEEXT) fstatat64$(EXEEXT) \ + fstatfs$(EXEEXT) fstatfs64$(EXEEXT) fsync$(EXEEXT) \ + ftruncate$(EXEEXT) ftruncate64$(EXEEXT) futex$(EXEEXT) \ + futimesat$(EXEEXT) get_mempolicy$(EXEEXT) getcpu$(EXEEXT) \ + getcwd$(EXEEXT) getdents$(EXEEXT) getdents64$(EXEEXT) \ + getegid$(EXEEXT) getegid32$(EXEEXT) geteuid$(EXEEXT) \ + geteuid32$(EXEEXT) getgid$(EXEEXT) getgid32$(EXEEXT) \ + getgroups$(EXEEXT) getgroups32$(EXEEXT) getpeername$(EXEEXT) \ + getpgrp$(EXEEXT) getrandom$(EXEEXT) getresgid$(EXEEXT) \ + getresgid32$(EXEEXT) getresuid$(EXEEXT) getresuid32$(EXEEXT) \ + getrlimit$(EXEEXT) getrusage$(EXEEXT) getsid$(EXEEXT) \ + getsockname$(EXEEXT) getuid$(EXEEXT) getuid32$(EXEEXT) \ + getxxid$(EXEEXT) inet-cmsg$(EXEEXT) init_module$(EXEEXT) \ + inotify$(EXEEXT) inotify_init1$(EXEEXT) ioctl$(EXEEXT) \ + ioctl_block$(EXEEXT) ioctl_dm$(EXEEXT) ioctl_dm-v$(EXEEXT) \ + ioctl_evdev$(EXEEXT) ioctl_evdev-v$(EXEEXT) \ + ioctl_loop$(EXEEXT) ioctl_loop-nv$(EXEEXT) \ + ioctl_loop-v$(EXEEXT) ioctl_mtd$(EXEEXT) ioctl_rtc$(EXEEXT) \ + ioctl_rtc-v$(EXEEXT) ioctl_scsi$(EXEEXT) \ + ioctl_sg_io_v3$(EXEEXT) ioctl_sg_io_v4$(EXEEXT) \ + ioctl_sock_gifconf$(EXEEXT) ioctl_uffdio$(EXEEXT) \ + ioctl_v4l2$(EXEEXT) ioperm$(EXEEXT) iopl$(EXEEXT) \ + ioprio$(EXEEXT) ip_mreq$(EXEEXT) ipc$(EXEEXT) ipc_msg$(EXEEXT) \ + ipc_msgbuf$(EXEEXT) ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) \ + kcmp$(EXEEXT) kexec_file_load$(EXEEXT) kexec_load$(EXEEXT) \ + keyctl$(EXEEXT) kill$(EXEEXT) ksysent$(EXEEXT) lchown$(EXEEXT) \ + lchown32$(EXEEXT) link$(EXEEXT) linkat$(EXEEXT) \ + llseek$(EXEEXT) lookup_dcookie$(EXEEXT) lseek$(EXEEXT) \ + lstat$(EXEEXT) lstat64$(EXEEXT) mbind$(EXEEXT) \ + membarrier$(EXEEXT) memfd_create$(EXEEXT) \ + migrate_pages$(EXEEXT) mincore$(EXEEXT) mkdir$(EXEEXT) \ + mkdirat$(EXEEXT) mknod$(EXEEXT) mknodat$(EXEEXT) \ + mlock$(EXEEXT) mlock2$(EXEEXT) mlockall$(EXEEXT) mmap$(EXEEXT) \ + mmap64$(EXEEXT) mmsg$(EXEEXT) mmsg-silent$(EXEEXT) \ + mmsg_name$(EXEEXT) mmsg_name-v$(EXEEXT) mount$(EXEEXT) \ + move_pages$(EXEEXT) mq$(EXEEXT) mq_sendrecv$(EXEEXT) \ + mq_sendrecv-read$(EXEEXT) mq_sendrecv-write$(EXEEXT) \ + msg_control$(EXEEXT) msg_control-v$(EXEEXT) msg_name$(EXEEXT) \ + munlockall$(EXEEXT) nanosleep$(EXEEXT) \ + net-accept-connect$(EXEEXT) net-icmp_filter$(EXEEXT) \ + net-sockaddr$(EXEEXT) net-y-unix$(EXEEXT) net-yy-inet$(EXEEXT) \ + net-yy-netlink$(EXEEXT) net-yy-unix$(EXEEXT) \ + netlink_inet_diag$(EXEEXT) netlink_netlink_diag$(EXEEXT) \ + netlink_protocol$(EXEEXT) netlink_unix_diag$(EXEEXT) \ + newfstatat$(EXEEXT) nsyscalls$(EXEEXT) old_mmap$(EXEEXT) \ + oldfstat$(EXEEXT) oldlstat$(EXEEXT) oldselect$(EXEEXT) \ + oldstat$(EXEEXT) open$(EXEEXT) openat$(EXEEXT) pause$(EXEEXT) \ + pc$(EXEEXT) perf_event_open$(EXEEXT) \ + perf_event_open_nonverbose$(EXEEXT) \ + perf_event_open_unabbrev$(EXEEXT) personality$(EXEEXT) \ + pipe$(EXEEXT) pipe2$(EXEEXT) pkey_alloc$(EXEEXT) \ + pkey_free$(EXEEXT) pkey_mprotect$(EXEEXT) poll$(EXEEXT) \ + ppoll$(EXEEXT) prctl-arg2-intptr$(EXEEXT) \ + prctl-dumpable$(EXEEXT) prctl-name$(EXEEXT) \ + prctl-no-args$(EXEEXT) prctl-pdeathsig$(EXEEXT) \ + prctl-seccomp-filter-v$(EXEEXT) prctl-seccomp-strict$(EXEEXT) \ + prctl-securebits$(EXEEXT) prctl-tid_address$(EXEEXT) \ + prctl-tsc$(EXEEXT) pread64-pwrite64$(EXEEXT) preadv$(EXEEXT) \ + preadv-pwritev$(EXEEXT) preadv2-pwritev2$(EXEEXT) \ + print_maxfd$(EXEEXT) printstr$(EXEEXT) prlimit64$(EXEEXT) \ + process_vm_readv$(EXEEXT) process_vm_writev$(EXEEXT) \ + pselect6$(EXEEXT) ptrace$(EXEEXT) pwritev$(EXEEXT) \ + qual_fault$(EXEEXT) qual_inject-error-signal$(EXEEXT) \ + qual_inject-retval$(EXEEXT) qual_inject-signal$(EXEEXT) \ + qual_signal$(EXEEXT) quotactl$(EXEEXT) quotactl-v$(EXEEXT) \ + quotactl-xfs$(EXEEXT) quotactl-xfs-v$(EXEEXT) \ + read-write$(EXEEXT) readahead$(EXEEXT) readdir$(EXEEXT) \ + readlink$(EXEEXT) readlinkat$(EXEEXT) readv$(EXEEXT) \ + reboot$(EXEEXT) recvfrom$(EXEEXT) recvmmsg-timeout$(EXEEXT) \ + recvmsg$(EXEEXT) redirect-fds$(EXEEXT) \ + remap_file_pages$(EXEEXT) rename$(EXEEXT) renameat$(EXEEXT) \ + renameat2$(EXEEXT) request_key$(EXEEXT) \ + restart_syscall$(EXEEXT) rmdir$(EXEEXT) rt_sigpending$(EXEEXT) \ + rt_sigprocmask$(EXEEXT) rt_sigqueueinfo$(EXEEXT) \ + rt_sigsuspend$(EXEEXT) rt_sigtimedwait$(EXEEXT) \ + rt_tgsigqueueinfo$(EXEEXT) sched_get_priority_mxx$(EXEEXT) \ + sched_rr_get_interval$(EXEEXT) sched_xetaffinity$(EXEEXT) \ + sched_xetattr$(EXEEXT) sched_xetparam$(EXEEXT) \ + sched_xetscheduler$(EXEEXT) sched_yield$(EXEEXT) \ + scm_rights$(EXEEXT) seccomp-filter$(EXEEXT) \ + seccomp-filter-v$(EXEEXT) seccomp-strict$(EXEEXT) \ + select$(EXEEXT) semop$(EXEEXT) sendfile$(EXEEXT) \ + sendfile64$(EXEEXT) set_mempolicy$(EXEEXT) \ + set_ptracer_any$(EXEEXT) setdomainname$(EXEEXT) \ + setfsgid$(EXEEXT) setfsgid32$(EXEEXT) setfsuid$(EXEEXT) \ + setfsuid32$(EXEEXT) setgid$(EXEEXT) setgid32$(EXEEXT) \ + setgroups$(EXEEXT) setgroups32$(EXEEXT) sethostname$(EXEEXT) \ + setns$(EXEEXT) setregid$(EXEEXT) setregid32$(EXEEXT) \ + setresgid$(EXEEXT) setresgid32$(EXEEXT) setresuid$(EXEEXT) \ + setresuid32$(EXEEXT) setreuid$(EXEEXT) setreuid32$(EXEEXT) \ + setrlimit$(EXEEXT) setuid$(EXEEXT) setuid32$(EXEEXT) \ + shmxt$(EXEEXT) shutdown$(EXEEXT) sigaction$(EXEEXT) \ + sigaltstack$(EXEEXT) siginfo$(EXEEXT) signal_receive$(EXEEXT) \ + signalfd4$(EXEEXT) sigreturn$(EXEEXT) sleep$(EXEEXT) \ + socketcall$(EXEEXT) splice$(EXEEXT) stack-fcall$(EXEEXT) \ + stat$(EXEEXT) stat64$(EXEEXT) statfs$(EXEEXT) \ + statfs64$(EXEEXT) swap$(EXEEXT) symlink$(EXEEXT) \ + symlinkat$(EXEEXT) sync$(EXEEXT) sync_file_range$(EXEEXT) \ + sync_file_range2$(EXEEXT) sysinfo$(EXEEXT) syslog$(EXEEXT) \ + tee$(EXEEXT) threads-execve$(EXEEXT) time$(EXEEXT) \ + timer_create$(EXEEXT) timer_xettime$(EXEEXT) \ + timerfd_xettime$(EXEEXT) times$(EXEEXT) times-fail$(EXEEXT) \ + truncate$(EXEEXT) truncate64$(EXEEXT) ugetrlimit$(EXEEXT) \ + uio$(EXEEXT) umask$(EXEEXT) umount$(EXEEXT) umount2$(EXEEXT) \ + umoven-illptr$(EXEEXT) umovestr$(EXEEXT) \ + umovestr-illptr$(EXEEXT) umovestr2$(EXEEXT) umovestr3$(EXEEXT) \ + uname$(EXEEXT) unix-pair-send-recv$(EXEEXT) \ + unix-pair-sendto-recvfrom$(EXEEXT) unlink$(EXEEXT) \ + unlinkat$(EXEEXT) unshare$(EXEEXT) userfaultfd$(EXEEXT) \ + ustat$(EXEEXT) utime$(EXEEXT) utimensat$(EXEEXT) \ + utimes$(EXEEXT) vfork-f$(EXEEXT) vhangup$(EXEEXT) \ + vmsplice$(EXEEXT) wait4$(EXEEXT) wait4-v$(EXEEXT) \ + waitid$(EXEEXT) waitid-v$(EXEEXT) waitpid$(EXEEXT) \ + xattr$(EXEEXT) xattr-strings$(EXEEXT) xet_robust_list$(EXEEXT) \ + xetitimer$(EXEEXT) xetpgid$(EXEEXT) xetpriority$(EXEEXT) \ + xettimeofday$(EXEEXT) +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(am__EXEEXT_1) +DIST_COMMON = $(srcdir)/../scno.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ + $(top_srcdir)/test-driver +subdir = tests-mx32 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/ax_valgrind_check.m4 \ + $(top_srcdir)/m4/mpers.m4 \ + $(top_srcdir)/m4/st_save_restore_var.m4 \ + $(top_srcdir)/m4/st_warn_cflags.m4 \ + $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AR = ar +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libtests_a_AR = $(AR) $(ARFLAGS) +libtests_a_LIBADD = +am_libtests_a_OBJECTS = libtests_a-errno2name.$(OBJEXT) \ + libtests_a-error_msg.$(OBJEXT) \ + libtests_a-fill_memory.$(OBJEXT) \ + libtests_a-get_page_size.$(OBJEXT) \ + libtests_a-hexdump_strdup.$(OBJEXT) \ + libtests_a-hexquote_strndup.$(OBJEXT) \ + libtests_a-inode_of_sockfd.$(OBJEXT) \ + libtests_a-libmmsg.$(OBJEXT) \ + libtests_a-libsocketcall.$(OBJEXT) \ + libtests_a-overflowuid.$(OBJEXT) \ + libtests_a-pipe_maxfd.$(OBJEXT) \ + libtests_a-print_quoted_string.$(OBJEXT) \ + libtests_a-printflags.$(OBJEXT) libtests_a-printxval.$(OBJEXT) \ + libtests_a-signal2name.$(OBJEXT) libtests_a-sprintrc.$(OBJEXT) \ + libtests_a-tail_alloc.$(OBJEXT) libtests_a-tprintf.$(OBJEXT) +libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) +_newselect_SOURCES = _newselect.c +_newselect_OBJECTS = _newselect.$(OBJEXT) +_newselect_LDADD = $(LDADD) +_newselect_DEPENDENCIES = libtests.a +accept_SOURCES = accept.c +accept_OBJECTS = accept.$(OBJEXT) +accept_LDADD = $(LDADD) +accept_DEPENDENCIES = libtests.a +accept4_SOURCES = accept4.c +accept4_OBJECTS = accept4.$(OBJEXT) +accept4_LDADD = $(LDADD) +accept4_DEPENDENCIES = libtests.a +access_SOURCES = access.c +access_OBJECTS = access.$(OBJEXT) +access_LDADD = $(LDADD) +access_DEPENDENCIES = libtests.a +acct_SOURCES = acct.c +acct_OBJECTS = acct.$(OBJEXT) +acct_LDADD = $(LDADD) +acct_DEPENDENCIES = libtests.a +add_key_SOURCES = add_key.c +add_key_OBJECTS = add_key.$(OBJEXT) +add_key_LDADD = $(LDADD) +add_key_DEPENDENCIES = libtests.a +adjtimex_SOURCES = adjtimex.c +adjtimex_OBJECTS = adjtimex.$(OBJEXT) +adjtimex_LDADD = $(LDADD) +adjtimex_DEPENDENCIES = libtests.a +aio_SOURCES = aio.c +aio_OBJECTS = aio.$(OBJEXT) +aio_LDADD = $(LDADD) +aio_DEPENDENCIES = libtests.a +alarm_SOURCES = alarm.c +alarm_OBJECTS = alarm.$(OBJEXT) +alarm_LDADD = $(LDADD) +alarm_DEPENDENCIES = libtests.a +answer_SOURCES = answer.c +answer_OBJECTS = answer.$(OBJEXT) +answer_LDADD = $(LDADD) +answer_DEPENDENCIES = libtests.a +attach_f_p_SOURCES = attach-f-p.c +attach_f_p_OBJECTS = attach-f-p.$(OBJEXT) +attach_f_p_DEPENDENCIES = $(LDADD) +attach_f_p_cmd_SOURCES = attach-f-p-cmd.c +attach_f_p_cmd_OBJECTS = attach-f-p-cmd.$(OBJEXT) +attach_f_p_cmd_LDADD = $(LDADD) +attach_f_p_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_cmd_SOURCES = attach-p-cmd-cmd.c +attach_p_cmd_cmd_OBJECTS = attach-p-cmd-cmd.$(OBJEXT) +attach_p_cmd_cmd_LDADD = $(LDADD) +attach_p_cmd_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_p_SOURCES = attach-p-cmd-p.c +attach_p_cmd_p_OBJECTS = attach-p-cmd-p.$(OBJEXT) +attach_p_cmd_p_LDADD = $(LDADD) +attach_p_cmd_p_DEPENDENCIES = libtests.a +bpf_SOURCES = bpf.c +bpf_OBJECTS = bpf.$(OBJEXT) +bpf_LDADD = $(LDADD) +bpf_DEPENDENCIES = libtests.a +brk_SOURCES = brk.c +brk_OBJECTS = brk.$(OBJEXT) +brk_LDADD = $(LDADD) +brk_DEPENDENCIES = libtests.a +btrfs_SOURCES = btrfs.c +btrfs_OBJECTS = btrfs.$(OBJEXT) +btrfs_LDADD = $(LDADD) +btrfs_DEPENDENCIES = libtests.a +caps_SOURCES = caps.c +caps_OBJECTS = caps.$(OBJEXT) +caps_LDADD = $(LDADD) +caps_DEPENDENCIES = libtests.a +caps_abbrev_SOURCES = caps-abbrev.c +caps_abbrev_OBJECTS = caps-abbrev.$(OBJEXT) +caps_abbrev_LDADD = $(LDADD) +caps_abbrev_DEPENDENCIES = libtests.a +chmod_SOURCES = chmod.c +chmod_OBJECTS = chmod.$(OBJEXT) +chmod_LDADD = $(LDADD) +chmod_DEPENDENCIES = libtests.a +chown_SOURCES = chown.c +chown_OBJECTS = chown.$(OBJEXT) +chown_LDADD = $(LDADD) +chown_DEPENDENCIES = libtests.a +chown32_SOURCES = chown32.c +chown32_OBJECTS = chown32.$(OBJEXT) +chown32_LDADD = $(LDADD) +chown32_DEPENDENCIES = libtests.a +chroot_SOURCES = chroot.c +chroot_OBJECTS = chroot.$(OBJEXT) +chroot_LDADD = $(LDADD) +chroot_DEPENDENCIES = libtests.a +clock_adjtime_SOURCES = clock_adjtime.c +clock_adjtime_OBJECTS = clock_adjtime.$(OBJEXT) +clock_adjtime_LDADD = $(LDADD) +clock_adjtime_DEPENDENCIES = libtests.a +clock_nanosleep_SOURCES = clock_nanosleep.c +clock_nanosleep_OBJECTS = clock_nanosleep.$(OBJEXT) +clock_nanosleep_LDADD = $(LDADD) +clock_nanosleep_DEPENDENCIES = libtests.a +clock_xettime_SOURCES = clock_xettime.c +clock_xettime_OBJECTS = clock_xettime.$(OBJEXT) +clock_xettime_DEPENDENCIES = $(LDADD) +copy_file_range_SOURCES = copy_file_range.c +copy_file_range_OBJECTS = copy_file_range.$(OBJEXT) +copy_file_range_LDADD = $(LDADD) +copy_file_range_DEPENDENCIES = libtests.a +count_f_SOURCES = count-f.c +count_f_OBJECTS = count-f.$(OBJEXT) +count_f_DEPENDENCIES = $(LDADD) +creat_SOURCES = creat.c +creat_OBJECTS = creat.$(OBJEXT) +creat_LDADD = $(LDADD) +creat_DEPENDENCIES = libtests.a +delete_module_SOURCES = delete_module.c +delete_module_OBJECTS = delete_module.$(OBJEXT) +delete_module_LDADD = $(LDADD) +delete_module_DEPENDENCIES = libtests.a +dup_SOURCES = dup.c +dup_OBJECTS = dup.$(OBJEXT) +dup_LDADD = $(LDADD) +dup_DEPENDENCIES = libtests.a +dup2_SOURCES = dup2.c +dup2_OBJECTS = dup2.$(OBJEXT) +dup2_LDADD = $(LDADD) +dup2_DEPENDENCIES = libtests.a +dup3_SOURCES = dup3.c +dup3_OBJECTS = dup3.$(OBJEXT) +dup3_LDADD = $(LDADD) +dup3_DEPENDENCIES = libtests.a +epoll_create_SOURCES = epoll_create.c +epoll_create_OBJECTS = epoll_create.$(OBJEXT) +epoll_create_LDADD = $(LDADD) +epoll_create_DEPENDENCIES = libtests.a +epoll_create1_SOURCES = epoll_create1.c +epoll_create1_OBJECTS = epoll_create1.$(OBJEXT) +epoll_create1_LDADD = $(LDADD) +epoll_create1_DEPENDENCIES = libtests.a +epoll_ctl_SOURCES = epoll_ctl.c +epoll_ctl_OBJECTS = epoll_ctl.$(OBJEXT) +epoll_ctl_LDADD = $(LDADD) +epoll_ctl_DEPENDENCIES = libtests.a +epoll_pwait_SOURCES = epoll_pwait.c +epoll_pwait_OBJECTS = epoll_pwait.$(OBJEXT) +epoll_pwait_LDADD = $(LDADD) +epoll_pwait_DEPENDENCIES = libtests.a +epoll_wait_SOURCES = epoll_wait.c +epoll_wait_OBJECTS = epoll_wait.$(OBJEXT) +epoll_wait_LDADD = $(LDADD) +epoll_wait_DEPENDENCIES = libtests.a +erestartsys_SOURCES = erestartsys.c +erestartsys_OBJECTS = erestartsys.$(OBJEXT) +erestartsys_LDADD = $(LDADD) +erestartsys_DEPENDENCIES = libtests.a +eventfd_SOURCES = eventfd.c +eventfd_OBJECTS = eventfd.$(OBJEXT) +eventfd_LDADD = $(LDADD) +eventfd_DEPENDENCIES = libtests.a +execve_SOURCES = execve.c +execve_OBJECTS = execve.$(OBJEXT) +execve_LDADD = $(LDADD) +execve_DEPENDENCIES = libtests.a +execve_v_SOURCES = execve-v.c +execve_v_OBJECTS = execve-v.$(OBJEXT) +execve_v_LDADD = $(LDADD) +execve_v_DEPENDENCIES = libtests.a +execveat_SOURCES = execveat.c +execveat_OBJECTS = execveat.$(OBJEXT) +execveat_LDADD = $(LDADD) +execveat_DEPENDENCIES = libtests.a +execveat_v_SOURCES = execveat-v.c +execveat_v_OBJECTS = execveat-v.$(OBJEXT) +execveat_v_LDADD = $(LDADD) +execveat_v_DEPENDENCIES = libtests.a +faccessat_SOURCES = faccessat.c +faccessat_OBJECTS = faccessat.$(OBJEXT) +faccessat_LDADD = $(LDADD) +faccessat_DEPENDENCIES = libtests.a +fadvise64_SOURCES = fadvise64.c +fadvise64_OBJECTS = fadvise64.$(OBJEXT) +fadvise64_LDADD = $(LDADD) +fadvise64_DEPENDENCIES = libtests.a +fadvise64_64_SOURCES = fadvise64_64.c +fadvise64_64_OBJECTS = fadvise64_64.$(OBJEXT) +fadvise64_64_LDADD = $(LDADD) +fadvise64_64_DEPENDENCIES = libtests.a +fallocate_SOURCES = fallocate.c +fallocate_OBJECTS = fallocate.$(OBJEXT) +fallocate_LDADD = $(LDADD) +fallocate_DEPENDENCIES = libtests.a +fanotify_init_SOURCES = fanotify_init.c +fanotify_init_OBJECTS = fanotify_init.$(OBJEXT) +fanotify_init_LDADD = $(LDADD) +fanotify_init_DEPENDENCIES = libtests.a +fanotify_mark_SOURCES = fanotify_mark.c +fanotify_mark_OBJECTS = fanotify_mark.$(OBJEXT) +fanotify_mark_LDADD = $(LDADD) +fanotify_mark_DEPENDENCIES = libtests.a +fchdir_SOURCES = fchdir.c +fchdir_OBJECTS = fchdir.$(OBJEXT) +fchdir_LDADD = $(LDADD) +fchdir_DEPENDENCIES = libtests.a +fchmod_SOURCES = fchmod.c +fchmod_OBJECTS = fchmod.$(OBJEXT) +fchmod_LDADD = $(LDADD) +fchmod_DEPENDENCIES = libtests.a +fchmodat_SOURCES = fchmodat.c +fchmodat_OBJECTS = fchmodat.$(OBJEXT) +fchmodat_LDADD = $(LDADD) +fchmodat_DEPENDENCIES = libtests.a +fchown_SOURCES = fchown.c +fchown_OBJECTS = fchown.$(OBJEXT) +fchown_LDADD = $(LDADD) +fchown_DEPENDENCIES = libtests.a +fchown32_SOURCES = fchown32.c +fchown32_OBJECTS = fchown32.$(OBJEXT) +fchown32_LDADD = $(LDADD) +fchown32_DEPENDENCIES = libtests.a +fchownat_SOURCES = fchownat.c +fchownat_OBJECTS = fchownat.$(OBJEXT) +fchownat_LDADD = $(LDADD) +fchownat_DEPENDENCIES = libtests.a +fcntl_SOURCES = fcntl.c +fcntl_OBJECTS = fcntl.$(OBJEXT) +fcntl_LDADD = $(LDADD) +fcntl_DEPENDENCIES = libtests.a +fcntl64_SOURCES = fcntl64.c +fcntl64_OBJECTS = fcntl64.$(OBJEXT) +fcntl64_LDADD = $(LDADD) +fcntl64_DEPENDENCIES = libtests.a +fdatasync_SOURCES = fdatasync.c +fdatasync_OBJECTS = fdatasync.$(OBJEXT) +fdatasync_LDADD = $(LDADD) +fdatasync_DEPENDENCIES = libtests.a +file_handle_SOURCES = file_handle.c +file_handle_OBJECTS = file_handle.$(OBJEXT) +file_handle_LDADD = $(LDADD) +file_handle_DEPENDENCIES = libtests.a +file_ioctl_SOURCES = file_ioctl.c +file_ioctl_OBJECTS = file_ioctl.$(OBJEXT) +file_ioctl_LDADD = $(LDADD) +file_ioctl_DEPENDENCIES = libtests.a +filter_unavailable_SOURCES = filter-unavailable.c +filter_unavailable_OBJECTS = filter-unavailable.$(OBJEXT) +filter_unavailable_DEPENDENCIES = $(LDADD) +finit_module_SOURCES = finit_module.c +finit_module_OBJECTS = finit_module.$(OBJEXT) +finit_module_LDADD = $(LDADD) +finit_module_DEPENDENCIES = libtests.a +flock_SOURCES = flock.c +flock_OBJECTS = flock.$(OBJEXT) +flock_LDADD = $(LDADD) +flock_DEPENDENCIES = libtests.a +fork_f_SOURCES = fork-f.c +fork_f_OBJECTS = fork-f.$(OBJEXT) +fork_f_LDADD = $(LDADD) +fork_f_DEPENDENCIES = libtests.a +fstat_SOURCES = fstat.c +fstat_OBJECTS = fstat.$(OBJEXT) +fstat_LDADD = $(LDADD) +fstat_DEPENDENCIES = libtests.a +fstat64_SOURCES = fstat64.c +fstat64_OBJECTS = fstat64-fstat64.$(OBJEXT) +fstat64_LDADD = $(LDADD) +fstat64_DEPENDENCIES = libtests.a +fstatat64_SOURCES = fstatat64.c +fstatat64_OBJECTS = fstatat64-fstatat64.$(OBJEXT) +fstatat64_LDADD = $(LDADD) +fstatat64_DEPENDENCIES = libtests.a +fstatfs_SOURCES = fstatfs.c +fstatfs_OBJECTS = fstatfs.$(OBJEXT) +fstatfs_LDADD = $(LDADD) +fstatfs_DEPENDENCIES = libtests.a +fstatfs64_SOURCES = fstatfs64.c +fstatfs64_OBJECTS = fstatfs64.$(OBJEXT) +fstatfs64_LDADD = $(LDADD) +fstatfs64_DEPENDENCIES = libtests.a +fsync_SOURCES = fsync.c +fsync_OBJECTS = fsync.$(OBJEXT) +fsync_LDADD = $(LDADD) +fsync_DEPENDENCIES = libtests.a +ftruncate_SOURCES = ftruncate.c +ftruncate_OBJECTS = ftruncate.$(OBJEXT) +ftruncate_LDADD = $(LDADD) +ftruncate_DEPENDENCIES = libtests.a +ftruncate64_SOURCES = ftruncate64.c +ftruncate64_OBJECTS = ftruncate64-ftruncate64.$(OBJEXT) +ftruncate64_LDADD = $(LDADD) +ftruncate64_DEPENDENCIES = libtests.a +futex_SOURCES = futex.c +futex_OBJECTS = futex.$(OBJEXT) +futex_LDADD = $(LDADD) +futex_DEPENDENCIES = libtests.a +futimesat_SOURCES = futimesat.c +futimesat_OBJECTS = futimesat.$(OBJEXT) +futimesat_LDADD = $(LDADD) +futimesat_DEPENDENCIES = libtests.a +get_mempolicy_SOURCES = get_mempolicy.c +get_mempolicy_OBJECTS = get_mempolicy.$(OBJEXT) +get_mempolicy_LDADD = $(LDADD) +get_mempolicy_DEPENDENCIES = libtests.a +getcpu_SOURCES = getcpu.c +getcpu_OBJECTS = getcpu.$(OBJEXT) +getcpu_LDADD = $(LDADD) +getcpu_DEPENDENCIES = libtests.a +getcwd_SOURCES = getcwd.c +getcwd_OBJECTS = getcwd.$(OBJEXT) +getcwd_LDADD = $(LDADD) +getcwd_DEPENDENCIES = libtests.a +getdents_SOURCES = getdents.c +getdents_OBJECTS = getdents.$(OBJEXT) +getdents_LDADD = $(LDADD) +getdents_DEPENDENCIES = libtests.a +getdents64_SOURCES = getdents64.c +getdents64_OBJECTS = getdents64.$(OBJEXT) +getdents64_LDADD = $(LDADD) +getdents64_DEPENDENCIES = libtests.a +getegid_SOURCES = getegid.c +getegid_OBJECTS = getegid.$(OBJEXT) +getegid_LDADD = $(LDADD) +getegid_DEPENDENCIES = libtests.a +getegid32_SOURCES = getegid32.c +getegid32_OBJECTS = getegid32.$(OBJEXT) +getegid32_LDADD = $(LDADD) +getegid32_DEPENDENCIES = libtests.a +geteuid_SOURCES = geteuid.c +geteuid_OBJECTS = geteuid.$(OBJEXT) +geteuid_LDADD = $(LDADD) +geteuid_DEPENDENCIES = libtests.a +geteuid32_SOURCES = geteuid32.c +geteuid32_OBJECTS = geteuid32.$(OBJEXT) +geteuid32_LDADD = $(LDADD) +geteuid32_DEPENDENCIES = libtests.a +getgid_SOURCES = getgid.c +getgid_OBJECTS = getgid.$(OBJEXT) +getgid_LDADD = $(LDADD) +getgid_DEPENDENCIES = libtests.a +getgid32_SOURCES = getgid32.c +getgid32_OBJECTS = getgid32.$(OBJEXT) +getgid32_LDADD = $(LDADD) +getgid32_DEPENDENCIES = libtests.a +getgroups_SOURCES = getgroups.c +getgroups_OBJECTS = getgroups.$(OBJEXT) +getgroups_LDADD = $(LDADD) +getgroups_DEPENDENCIES = libtests.a +getgroups32_SOURCES = getgroups32.c +getgroups32_OBJECTS = getgroups32.$(OBJEXT) +getgroups32_LDADD = $(LDADD) +getgroups32_DEPENDENCIES = libtests.a +getpeername_SOURCES = getpeername.c +getpeername_OBJECTS = getpeername.$(OBJEXT) +getpeername_LDADD = $(LDADD) +getpeername_DEPENDENCIES = libtests.a +getpgrp_SOURCES = getpgrp.c +getpgrp_OBJECTS = getpgrp.$(OBJEXT) +getpgrp_LDADD = $(LDADD) +getpgrp_DEPENDENCIES = libtests.a +getrandom_SOURCES = getrandom.c +getrandom_OBJECTS = getrandom.$(OBJEXT) +getrandom_LDADD = $(LDADD) +getrandom_DEPENDENCIES = libtests.a +getresgid_SOURCES = getresgid.c +getresgid_OBJECTS = getresgid.$(OBJEXT) +getresgid_LDADD = $(LDADD) +getresgid_DEPENDENCIES = libtests.a +getresgid32_SOURCES = getresgid32.c +getresgid32_OBJECTS = getresgid32.$(OBJEXT) +getresgid32_LDADD = $(LDADD) +getresgid32_DEPENDENCIES = libtests.a +getresuid_SOURCES = getresuid.c +getresuid_OBJECTS = getresuid.$(OBJEXT) +getresuid_LDADD = $(LDADD) +getresuid_DEPENDENCIES = libtests.a +getresuid32_SOURCES = getresuid32.c +getresuid32_OBJECTS = getresuid32.$(OBJEXT) +getresuid32_LDADD = $(LDADD) +getresuid32_DEPENDENCIES = libtests.a +getrlimit_SOURCES = getrlimit.c +getrlimit_OBJECTS = getrlimit.$(OBJEXT) +getrlimit_LDADD = $(LDADD) +getrlimit_DEPENDENCIES = libtests.a +getrusage_SOURCES = getrusage.c +getrusage_OBJECTS = getrusage.$(OBJEXT) +getrusage_LDADD = $(LDADD) +getrusage_DEPENDENCIES = libtests.a +getsid_SOURCES = getsid.c +getsid_OBJECTS = getsid.$(OBJEXT) +getsid_LDADD = $(LDADD) +getsid_DEPENDENCIES = libtests.a +getsockname_SOURCES = getsockname.c +getsockname_OBJECTS = getsockname.$(OBJEXT) +getsockname_LDADD = $(LDADD) +getsockname_DEPENDENCIES = libtests.a +getuid_SOURCES = getuid.c +getuid_OBJECTS = getuid.$(OBJEXT) +getuid_LDADD = $(LDADD) +getuid_DEPENDENCIES = libtests.a +getuid32_SOURCES = getuid32.c +getuid32_OBJECTS = getuid32.$(OBJEXT) +getuid32_LDADD = $(LDADD) +getuid32_DEPENDENCIES = libtests.a +getxxid_SOURCES = getxxid.c +getxxid_OBJECTS = getxxid.$(OBJEXT) +getxxid_LDADD = $(LDADD) +getxxid_DEPENDENCIES = libtests.a +inet_cmsg_SOURCES = inet-cmsg.c +inet_cmsg_OBJECTS = inet-cmsg.$(OBJEXT) +inet_cmsg_LDADD = $(LDADD) +inet_cmsg_DEPENDENCIES = libtests.a +init_module_SOURCES = init_module.c +init_module_OBJECTS = init_module.$(OBJEXT) +init_module_LDADD = $(LDADD) +init_module_DEPENDENCIES = libtests.a +inotify_SOURCES = inotify.c +inotify_OBJECTS = inotify.$(OBJEXT) +inotify_LDADD = $(LDADD) +inotify_DEPENDENCIES = libtests.a +inotify_init1_SOURCES = inotify_init1.c +inotify_init1_OBJECTS = inotify_init1.$(OBJEXT) +inotify_init1_LDADD = $(LDADD) +inotify_init1_DEPENDENCIES = libtests.a +ioctl_SOURCES = ioctl.c +ioctl_OBJECTS = ioctl.$(OBJEXT) +ioctl_LDADD = $(LDADD) +ioctl_DEPENDENCIES = libtests.a +ioctl_block_SOURCES = ioctl_block.c +ioctl_block_OBJECTS = ioctl_block.$(OBJEXT) +ioctl_block_LDADD = $(LDADD) +ioctl_block_DEPENDENCIES = libtests.a +ioctl_dm_SOURCES = ioctl_dm.c +ioctl_dm_OBJECTS = ioctl_dm.$(OBJEXT) +ioctl_dm_LDADD = $(LDADD) +ioctl_dm_DEPENDENCIES = libtests.a +ioctl_dm_v_SOURCES = ioctl_dm-v.c +ioctl_dm_v_OBJECTS = ioctl_dm-v.$(OBJEXT) +ioctl_dm_v_LDADD = $(LDADD) +ioctl_dm_v_DEPENDENCIES = libtests.a +ioctl_evdev_SOURCES = ioctl_evdev.c +ioctl_evdev_OBJECTS = ioctl_evdev.$(OBJEXT) +ioctl_evdev_LDADD = $(LDADD) +ioctl_evdev_DEPENDENCIES = libtests.a +ioctl_evdev_v_SOURCES = ioctl_evdev-v.c +ioctl_evdev_v_OBJECTS = ioctl_evdev-v.$(OBJEXT) +ioctl_evdev_v_LDADD = $(LDADD) +ioctl_evdev_v_DEPENDENCIES = libtests.a +ioctl_loop_SOURCES = ioctl_loop.c +ioctl_loop_OBJECTS = ioctl_loop.$(OBJEXT) +ioctl_loop_LDADD = $(LDADD) +ioctl_loop_DEPENDENCIES = libtests.a +ioctl_loop_nv_SOURCES = ioctl_loop-nv.c +ioctl_loop_nv_OBJECTS = ioctl_loop-nv.$(OBJEXT) +ioctl_loop_nv_LDADD = $(LDADD) +ioctl_loop_nv_DEPENDENCIES = libtests.a +ioctl_loop_v_SOURCES = ioctl_loop-v.c +ioctl_loop_v_OBJECTS = ioctl_loop-v.$(OBJEXT) +ioctl_loop_v_LDADD = $(LDADD) +ioctl_loop_v_DEPENDENCIES = libtests.a +ioctl_mtd_SOURCES = ioctl_mtd.c +ioctl_mtd_OBJECTS = ioctl_mtd.$(OBJEXT) +ioctl_mtd_LDADD = $(LDADD) +ioctl_mtd_DEPENDENCIES = libtests.a +ioctl_rtc_SOURCES = ioctl_rtc.c +ioctl_rtc_OBJECTS = ioctl_rtc.$(OBJEXT) +ioctl_rtc_LDADD = $(LDADD) +ioctl_rtc_DEPENDENCIES = libtests.a +ioctl_rtc_v_SOURCES = ioctl_rtc-v.c +ioctl_rtc_v_OBJECTS = ioctl_rtc-v.$(OBJEXT) +ioctl_rtc_v_LDADD = $(LDADD) +ioctl_rtc_v_DEPENDENCIES = libtests.a +ioctl_scsi_SOURCES = ioctl_scsi.c +ioctl_scsi_OBJECTS = ioctl_scsi.$(OBJEXT) +ioctl_scsi_LDADD = $(LDADD) +ioctl_scsi_DEPENDENCIES = libtests.a +ioctl_sg_io_v3_SOURCES = ioctl_sg_io_v3.c +ioctl_sg_io_v3_OBJECTS = ioctl_sg_io_v3.$(OBJEXT) +ioctl_sg_io_v3_LDADD = $(LDADD) +ioctl_sg_io_v3_DEPENDENCIES = libtests.a +ioctl_sg_io_v4_SOURCES = ioctl_sg_io_v4.c +ioctl_sg_io_v4_OBJECTS = ioctl_sg_io_v4.$(OBJEXT) +ioctl_sg_io_v4_LDADD = $(LDADD) +ioctl_sg_io_v4_DEPENDENCIES = libtests.a +ioctl_sock_gifconf_SOURCES = ioctl_sock_gifconf.c +ioctl_sock_gifconf_OBJECTS = ioctl_sock_gifconf.$(OBJEXT) +ioctl_sock_gifconf_LDADD = $(LDADD) +ioctl_sock_gifconf_DEPENDENCIES = libtests.a +ioctl_uffdio_SOURCES = ioctl_uffdio.c +ioctl_uffdio_OBJECTS = ioctl_uffdio.$(OBJEXT) +ioctl_uffdio_LDADD = $(LDADD) +ioctl_uffdio_DEPENDENCIES = libtests.a +ioctl_v4l2_SOURCES = ioctl_v4l2.c +ioctl_v4l2_OBJECTS = ioctl_v4l2.$(OBJEXT) +ioctl_v4l2_LDADD = $(LDADD) +ioctl_v4l2_DEPENDENCIES = libtests.a +ioperm_SOURCES = ioperm.c +ioperm_OBJECTS = ioperm.$(OBJEXT) +ioperm_LDADD = $(LDADD) +ioperm_DEPENDENCIES = libtests.a +iopl_SOURCES = iopl.c +iopl_OBJECTS = iopl.$(OBJEXT) +iopl_LDADD = $(LDADD) +iopl_DEPENDENCIES = libtests.a +ioprio_SOURCES = ioprio.c +ioprio_OBJECTS = ioprio.$(OBJEXT) +ioprio_LDADD = $(LDADD) +ioprio_DEPENDENCIES = libtests.a +ip_mreq_SOURCES = ip_mreq.c +ip_mreq_OBJECTS = ip_mreq.$(OBJEXT) +ip_mreq_LDADD = $(LDADD) +ip_mreq_DEPENDENCIES = libtests.a +ipc_SOURCES = ipc.c +ipc_OBJECTS = ipc.$(OBJEXT) +ipc_LDADD = $(LDADD) +ipc_DEPENDENCIES = libtests.a +ipc_msg_SOURCES = ipc_msg.c +ipc_msg_OBJECTS = ipc_msg.$(OBJEXT) +ipc_msg_LDADD = $(LDADD) +ipc_msg_DEPENDENCIES = libtests.a +ipc_msgbuf_SOURCES = ipc_msgbuf.c +ipc_msgbuf_OBJECTS = ipc_msgbuf.$(OBJEXT) +ipc_msgbuf_LDADD = $(LDADD) +ipc_msgbuf_DEPENDENCIES = libtests.a +ipc_sem_SOURCES = ipc_sem.c +ipc_sem_OBJECTS = ipc_sem.$(OBJEXT) +ipc_sem_LDADD = $(LDADD) +ipc_sem_DEPENDENCIES = libtests.a +ipc_shm_SOURCES = ipc_shm.c +ipc_shm_OBJECTS = ipc_shm.$(OBJEXT) +ipc_shm_LDADD = $(LDADD) +ipc_shm_DEPENDENCIES = libtests.a +kcmp_SOURCES = kcmp.c +kcmp_OBJECTS = kcmp.$(OBJEXT) +kcmp_LDADD = $(LDADD) +kcmp_DEPENDENCIES = libtests.a +kexec_file_load_SOURCES = kexec_file_load.c +kexec_file_load_OBJECTS = kexec_file_load.$(OBJEXT) +kexec_file_load_LDADD = $(LDADD) +kexec_file_load_DEPENDENCIES = libtests.a +kexec_load_SOURCES = kexec_load.c +kexec_load_OBJECTS = kexec_load.$(OBJEXT) +kexec_load_LDADD = $(LDADD) +kexec_load_DEPENDENCIES = libtests.a +keyctl_SOURCES = keyctl.c +keyctl_OBJECTS = keyctl.$(OBJEXT) +keyctl_LDADD = $(LDADD) +keyctl_DEPENDENCIES = libtests.a +kill_SOURCES = kill.c +kill_OBJECTS = kill.$(OBJEXT) +kill_LDADD = $(LDADD) +kill_DEPENDENCIES = libtests.a +ksysent_SOURCES = ksysent.c +ksysent_OBJECTS = ksysent.$(OBJEXT) +ksysent_LDADD = $(LDADD) +ksysent_DEPENDENCIES = libtests.a +lchown_SOURCES = lchown.c +lchown_OBJECTS = lchown.$(OBJEXT) +lchown_LDADD = $(LDADD) +lchown_DEPENDENCIES = libtests.a +lchown32_SOURCES = lchown32.c +lchown32_OBJECTS = lchown32.$(OBJEXT) +lchown32_LDADD = $(LDADD) +lchown32_DEPENDENCIES = libtests.a +link_SOURCES = link.c +link_OBJECTS = link.$(OBJEXT) +link_LDADD = $(LDADD) +link_DEPENDENCIES = libtests.a +linkat_SOURCES = linkat.c +linkat_OBJECTS = linkat.$(OBJEXT) +linkat_LDADD = $(LDADD) +linkat_DEPENDENCIES = libtests.a +llseek_SOURCES = llseek.c +llseek_OBJECTS = llseek.$(OBJEXT) +llseek_LDADD = $(LDADD) +llseek_DEPENDENCIES = libtests.a +lookup_dcookie_SOURCES = lookup_dcookie.c +lookup_dcookie_OBJECTS = lookup_dcookie.$(OBJEXT) +lookup_dcookie_LDADD = $(LDADD) +lookup_dcookie_DEPENDENCIES = libtests.a +lseek_SOURCES = lseek.c +lseek_OBJECTS = lseek.$(OBJEXT) +lseek_LDADD = $(LDADD) +lseek_DEPENDENCIES = libtests.a +lstat_SOURCES = lstat.c +lstat_OBJECTS = lstat.$(OBJEXT) +lstat_LDADD = $(LDADD) +lstat_DEPENDENCIES = libtests.a +lstat64_SOURCES = lstat64.c +lstat64_OBJECTS = lstat64-lstat64.$(OBJEXT) +lstat64_LDADD = $(LDADD) +lstat64_DEPENDENCIES = libtests.a +mbind_SOURCES = mbind.c +mbind_OBJECTS = mbind.$(OBJEXT) +mbind_LDADD = $(LDADD) +mbind_DEPENDENCIES = libtests.a +membarrier_SOURCES = membarrier.c +membarrier_OBJECTS = membarrier.$(OBJEXT) +membarrier_LDADD = $(LDADD) +membarrier_DEPENDENCIES = libtests.a +memfd_create_SOURCES = memfd_create.c +memfd_create_OBJECTS = memfd_create.$(OBJEXT) +memfd_create_LDADD = $(LDADD) +memfd_create_DEPENDENCIES = libtests.a +migrate_pages_SOURCES = migrate_pages.c +migrate_pages_OBJECTS = migrate_pages.$(OBJEXT) +migrate_pages_LDADD = $(LDADD) +migrate_pages_DEPENDENCIES = libtests.a +mincore_SOURCES = mincore.c +mincore_OBJECTS = mincore.$(OBJEXT) +mincore_LDADD = $(LDADD) +mincore_DEPENDENCIES = libtests.a +mkdir_SOURCES = mkdir.c +mkdir_OBJECTS = mkdir.$(OBJEXT) +mkdir_LDADD = $(LDADD) +mkdir_DEPENDENCIES = libtests.a +mkdirat_SOURCES = mkdirat.c +mkdirat_OBJECTS = mkdirat.$(OBJEXT) +mkdirat_LDADD = $(LDADD) +mkdirat_DEPENDENCIES = libtests.a +mknod_SOURCES = mknod.c +mknod_OBJECTS = mknod.$(OBJEXT) +mknod_LDADD = $(LDADD) +mknod_DEPENDENCIES = libtests.a +mknodat_SOURCES = mknodat.c +mknodat_OBJECTS = mknodat.$(OBJEXT) +mknodat_LDADD = $(LDADD) +mknodat_DEPENDENCIES = libtests.a +mlock_SOURCES = mlock.c +mlock_OBJECTS = mlock.$(OBJEXT) +mlock_LDADD = $(LDADD) +mlock_DEPENDENCIES = libtests.a +mlock2_SOURCES = mlock2.c +mlock2_OBJECTS = mlock2.$(OBJEXT) +mlock2_LDADD = $(LDADD) +mlock2_DEPENDENCIES = libtests.a +mlockall_SOURCES = mlockall.c +mlockall_OBJECTS = mlockall.$(OBJEXT) +mlockall_LDADD = $(LDADD) +mlockall_DEPENDENCIES = libtests.a +mmap_SOURCES = mmap.c +mmap_OBJECTS = mmap.$(OBJEXT) +mmap_LDADD = $(LDADD) +mmap_DEPENDENCIES = libtests.a +mmap64_SOURCES = mmap64.c +mmap64_OBJECTS = mmap64-mmap64.$(OBJEXT) +mmap64_LDADD = $(LDADD) +mmap64_DEPENDENCIES = libtests.a +mmsg_SOURCES = mmsg.c +mmsg_OBJECTS = mmsg.$(OBJEXT) +mmsg_LDADD = $(LDADD) +mmsg_DEPENDENCIES = libtests.a +mmsg_silent_SOURCES = mmsg-silent.c +mmsg_silent_OBJECTS = mmsg-silent.$(OBJEXT) +mmsg_silent_LDADD = $(LDADD) +mmsg_silent_DEPENDENCIES = libtests.a +mmsg_name_SOURCES = mmsg_name.c +mmsg_name_OBJECTS = mmsg_name.$(OBJEXT) +mmsg_name_LDADD = $(LDADD) +mmsg_name_DEPENDENCIES = libtests.a +mmsg_name_v_SOURCES = mmsg_name-v.c +mmsg_name_v_OBJECTS = mmsg_name-v.$(OBJEXT) +mmsg_name_v_LDADD = $(LDADD) +mmsg_name_v_DEPENDENCIES = libtests.a +mount_SOURCES = mount.c +mount_OBJECTS = mount.$(OBJEXT) +mount_LDADD = $(LDADD) +mount_DEPENDENCIES = libtests.a +move_pages_SOURCES = move_pages.c +move_pages_OBJECTS = move_pages.$(OBJEXT) +move_pages_LDADD = $(LDADD) +move_pages_DEPENDENCIES = libtests.a +mq_SOURCES = mq.c +mq_OBJECTS = mq.$(OBJEXT) +mq_DEPENDENCIES = $(LDADD) +mq_sendrecv_SOURCES = mq_sendrecv.c +mq_sendrecv_OBJECTS = mq_sendrecv.$(OBJEXT) +mq_sendrecv_DEPENDENCIES = $(LDADD) +mq_sendrecv_read_SOURCES = mq_sendrecv-read.c +mq_sendrecv_read_OBJECTS = mq_sendrecv-read.$(OBJEXT) +mq_sendrecv_read_DEPENDENCIES = $(LDADD) +mq_sendrecv_write_SOURCES = mq_sendrecv-write.c +mq_sendrecv_write_OBJECTS = mq_sendrecv-write.$(OBJEXT) +mq_sendrecv_write_DEPENDENCIES = $(LDADD) +msg_control_SOURCES = msg_control.c +msg_control_OBJECTS = msg_control.$(OBJEXT) +msg_control_LDADD = $(LDADD) +msg_control_DEPENDENCIES = libtests.a +msg_control_v_SOURCES = msg_control-v.c +msg_control_v_OBJECTS = msg_control-v.$(OBJEXT) +msg_control_v_LDADD = $(LDADD) +msg_control_v_DEPENDENCIES = libtests.a +msg_name_SOURCES = msg_name.c +msg_name_OBJECTS = msg_name.$(OBJEXT) +msg_name_LDADD = $(LDADD) +msg_name_DEPENDENCIES = libtests.a +munlockall_SOURCES = munlockall.c +munlockall_OBJECTS = munlockall.$(OBJEXT) +munlockall_LDADD = $(LDADD) +munlockall_DEPENDENCIES = libtests.a +nanosleep_SOURCES = nanosleep.c +nanosleep_OBJECTS = nanosleep.$(OBJEXT) +nanosleep_LDADD = $(LDADD) +nanosleep_DEPENDENCIES = libtests.a +net_accept_connect_SOURCES = net-accept-connect.c +net_accept_connect_OBJECTS = net-accept-connect.$(OBJEXT) +net_accept_connect_LDADD = $(LDADD) +net_accept_connect_DEPENDENCIES = libtests.a +net_icmp_filter_SOURCES = net-icmp_filter.c +net_icmp_filter_OBJECTS = net-icmp_filter.$(OBJEXT) +net_icmp_filter_LDADD = $(LDADD) +net_icmp_filter_DEPENDENCIES = libtests.a +net_sockaddr_SOURCES = net-sockaddr.c +net_sockaddr_OBJECTS = net-sockaddr.$(OBJEXT) +net_sockaddr_LDADD = $(LDADD) +net_sockaddr_DEPENDENCIES = libtests.a +net_y_unix_SOURCES = net-y-unix.c +net_y_unix_OBJECTS = net-y-unix.$(OBJEXT) +net_y_unix_LDADD = $(LDADD) +net_y_unix_DEPENDENCIES = libtests.a +net_yy_inet_SOURCES = net-yy-inet.c +net_yy_inet_OBJECTS = net-yy-inet.$(OBJEXT) +net_yy_inet_LDADD = $(LDADD) +net_yy_inet_DEPENDENCIES = libtests.a +net_yy_netlink_SOURCES = net-yy-netlink.c +net_yy_netlink_OBJECTS = net-yy-netlink.$(OBJEXT) +net_yy_netlink_LDADD = $(LDADD) +net_yy_netlink_DEPENDENCIES = libtests.a +net_yy_unix_SOURCES = net-yy-unix.c +net_yy_unix_OBJECTS = net-yy-unix.$(OBJEXT) +net_yy_unix_LDADD = $(LDADD) +net_yy_unix_DEPENDENCIES = libtests.a +netlink_inet_diag_SOURCES = netlink_inet_diag.c +netlink_inet_diag_OBJECTS = netlink_inet_diag.$(OBJEXT) +netlink_inet_diag_LDADD = $(LDADD) +netlink_inet_diag_DEPENDENCIES = libtests.a +netlink_netlink_diag_SOURCES = netlink_netlink_diag.c +netlink_netlink_diag_OBJECTS = netlink_netlink_diag.$(OBJEXT) +netlink_netlink_diag_LDADD = $(LDADD) +netlink_netlink_diag_DEPENDENCIES = libtests.a +netlink_protocol_SOURCES = netlink_protocol.c +netlink_protocol_OBJECTS = netlink_protocol.$(OBJEXT) +netlink_protocol_LDADD = $(LDADD) +netlink_protocol_DEPENDENCIES = libtests.a +netlink_unix_diag_SOURCES = netlink_unix_diag.c +netlink_unix_diag_OBJECTS = netlink_unix_diag.$(OBJEXT) +netlink_unix_diag_LDADD = $(LDADD) +netlink_unix_diag_DEPENDENCIES = libtests.a +newfstatat_SOURCES = newfstatat.c +newfstatat_OBJECTS = newfstatat-newfstatat.$(OBJEXT) +newfstatat_LDADD = $(LDADD) +newfstatat_DEPENDENCIES = libtests.a +nsyscalls_SOURCES = nsyscalls.c +nsyscalls_OBJECTS = nsyscalls.$(OBJEXT) +nsyscalls_LDADD = $(LDADD) +nsyscalls_DEPENDENCIES = libtests.a +old_mmap_SOURCES = old_mmap.c +old_mmap_OBJECTS = old_mmap.$(OBJEXT) +old_mmap_LDADD = $(LDADD) +old_mmap_DEPENDENCIES = libtests.a +oldfstat_SOURCES = oldfstat.c +oldfstat_OBJECTS = oldfstat.$(OBJEXT) +oldfstat_LDADD = $(LDADD) +oldfstat_DEPENDENCIES = libtests.a +oldlstat_SOURCES = oldlstat.c +oldlstat_OBJECTS = oldlstat.$(OBJEXT) +oldlstat_LDADD = $(LDADD) +oldlstat_DEPENDENCIES = libtests.a +oldselect_SOURCES = oldselect.c +oldselect_OBJECTS = oldselect.$(OBJEXT) +oldselect_LDADD = $(LDADD) +oldselect_DEPENDENCIES = libtests.a +oldstat_SOURCES = oldstat.c +oldstat_OBJECTS = oldstat.$(OBJEXT) +oldstat_LDADD = $(LDADD) +oldstat_DEPENDENCIES = libtests.a +open_SOURCES = open.c +open_OBJECTS = open.$(OBJEXT) +open_LDADD = $(LDADD) +open_DEPENDENCIES = libtests.a +openat_SOURCES = openat.c +openat_OBJECTS = openat.$(OBJEXT) +openat_LDADD = $(LDADD) +openat_DEPENDENCIES = libtests.a +pause_SOURCES = pause.c +pause_OBJECTS = pause.$(OBJEXT) +pause_LDADD = $(LDADD) +pause_DEPENDENCIES = libtests.a +pc_SOURCES = pc.c +pc_OBJECTS = pc.$(OBJEXT) +am__DEPENDENCIES_1 = +pc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(LDADD) +perf_event_open_SOURCES = perf_event_open.c +perf_event_open_OBJECTS = perf_event_open.$(OBJEXT) +perf_event_open_LDADD = $(LDADD) +perf_event_open_DEPENDENCIES = libtests.a +perf_event_open_nonverbose_SOURCES = perf_event_open_nonverbose.c +perf_event_open_nonverbose_OBJECTS = \ + perf_event_open_nonverbose.$(OBJEXT) +perf_event_open_nonverbose_LDADD = $(LDADD) +perf_event_open_nonverbose_DEPENDENCIES = libtests.a +perf_event_open_unabbrev_SOURCES = perf_event_open_unabbrev.c +perf_event_open_unabbrev_OBJECTS = perf_event_open_unabbrev.$(OBJEXT) +perf_event_open_unabbrev_LDADD = $(LDADD) +perf_event_open_unabbrev_DEPENDENCIES = libtests.a +personality_SOURCES = personality.c +personality_OBJECTS = personality.$(OBJEXT) +personality_LDADD = $(LDADD) +personality_DEPENDENCIES = libtests.a +pipe_SOURCES = pipe.c +pipe_OBJECTS = pipe.$(OBJEXT) +pipe_LDADD = $(LDADD) +pipe_DEPENDENCIES = libtests.a +pipe2_SOURCES = pipe2.c +pipe2_OBJECTS = pipe2.$(OBJEXT) +pipe2_LDADD = $(LDADD) +pipe2_DEPENDENCIES = libtests.a +pkey_alloc_SOURCES = pkey_alloc.c +pkey_alloc_OBJECTS = pkey_alloc.$(OBJEXT) +pkey_alloc_LDADD = $(LDADD) +pkey_alloc_DEPENDENCIES = libtests.a +pkey_free_SOURCES = pkey_free.c +pkey_free_OBJECTS = pkey_free.$(OBJEXT) +pkey_free_LDADD = $(LDADD) +pkey_free_DEPENDENCIES = libtests.a +pkey_mprotect_SOURCES = pkey_mprotect.c +pkey_mprotect_OBJECTS = pkey_mprotect.$(OBJEXT) +pkey_mprotect_LDADD = $(LDADD) +pkey_mprotect_DEPENDENCIES = libtests.a +poll_SOURCES = poll.c +poll_OBJECTS = poll.$(OBJEXT) +poll_LDADD = $(LDADD) +poll_DEPENDENCIES = libtests.a +ppoll_SOURCES = ppoll.c +ppoll_OBJECTS = ppoll.$(OBJEXT) +ppoll_LDADD = $(LDADD) +ppoll_DEPENDENCIES = libtests.a +prctl_arg2_intptr_SOURCES = prctl-arg2-intptr.c +prctl_arg2_intptr_OBJECTS = prctl-arg2-intptr.$(OBJEXT) +prctl_arg2_intptr_LDADD = $(LDADD) +prctl_arg2_intptr_DEPENDENCIES = libtests.a +prctl_dumpable_SOURCES = prctl-dumpable.c +prctl_dumpable_OBJECTS = prctl-dumpable.$(OBJEXT) +prctl_dumpable_LDADD = $(LDADD) +prctl_dumpable_DEPENDENCIES = libtests.a +prctl_name_SOURCES = prctl-name.c +prctl_name_OBJECTS = prctl-name.$(OBJEXT) +prctl_name_LDADD = $(LDADD) +prctl_name_DEPENDENCIES = libtests.a +prctl_no_args_SOURCES = prctl-no-args.c +prctl_no_args_OBJECTS = prctl-no-args.$(OBJEXT) +prctl_no_args_LDADD = $(LDADD) +prctl_no_args_DEPENDENCIES = libtests.a +prctl_pdeathsig_SOURCES = prctl-pdeathsig.c +prctl_pdeathsig_OBJECTS = prctl-pdeathsig.$(OBJEXT) +prctl_pdeathsig_LDADD = $(LDADD) +prctl_pdeathsig_DEPENDENCIES = libtests.a +prctl_seccomp_filter_v_SOURCES = prctl-seccomp-filter-v.c +prctl_seccomp_filter_v_OBJECTS = prctl-seccomp-filter-v.$(OBJEXT) +prctl_seccomp_filter_v_LDADD = $(LDADD) +prctl_seccomp_filter_v_DEPENDENCIES = libtests.a +prctl_seccomp_strict_SOURCES = prctl-seccomp-strict.c +prctl_seccomp_strict_OBJECTS = prctl-seccomp-strict.$(OBJEXT) +prctl_seccomp_strict_LDADD = $(LDADD) +prctl_seccomp_strict_DEPENDENCIES = libtests.a +prctl_securebits_SOURCES = prctl-securebits.c +prctl_securebits_OBJECTS = prctl-securebits.$(OBJEXT) +prctl_securebits_LDADD = $(LDADD) +prctl_securebits_DEPENDENCIES = libtests.a +prctl_tid_address_SOURCES = prctl-tid_address.c +prctl_tid_address_OBJECTS = prctl-tid_address.$(OBJEXT) +prctl_tid_address_LDADD = $(LDADD) +prctl_tid_address_DEPENDENCIES = libtests.a +prctl_tsc_SOURCES = prctl-tsc.c +prctl_tsc_OBJECTS = prctl-tsc.$(OBJEXT) +prctl_tsc_LDADD = $(LDADD) +prctl_tsc_DEPENDENCIES = libtests.a +pread64_pwrite64_SOURCES = pread64-pwrite64.c +pread64_pwrite64_OBJECTS = \ + pread64_pwrite64-pread64-pwrite64.$(OBJEXT) +pread64_pwrite64_LDADD = $(LDADD) +pread64_pwrite64_DEPENDENCIES = libtests.a +preadv_SOURCES = preadv.c +preadv_OBJECTS = preadv-preadv.$(OBJEXT) +preadv_LDADD = $(LDADD) +preadv_DEPENDENCIES = libtests.a +preadv_pwritev_SOURCES = preadv-pwritev.c +preadv_pwritev_OBJECTS = preadv_pwritev-preadv-pwritev.$(OBJEXT) +preadv_pwritev_LDADD = $(LDADD) +preadv_pwritev_DEPENDENCIES = libtests.a +preadv2_pwritev2_SOURCES = preadv2-pwritev2.c +preadv2_pwritev2_OBJECTS = preadv2-pwritev2.$(OBJEXT) +preadv2_pwritev2_LDADD = $(LDADD) +preadv2_pwritev2_DEPENDENCIES = libtests.a +print_maxfd_SOURCES = print_maxfd.c +print_maxfd_OBJECTS = print_maxfd.$(OBJEXT) +print_maxfd_LDADD = $(LDADD) +print_maxfd_DEPENDENCIES = libtests.a +printstr_SOURCES = printstr.c +printstr_OBJECTS = printstr.$(OBJEXT) +printstr_LDADD = $(LDADD) +printstr_DEPENDENCIES = libtests.a +prlimit64_SOURCES = prlimit64.c +prlimit64_OBJECTS = prlimit64.$(OBJEXT) +prlimit64_LDADD = $(LDADD) +prlimit64_DEPENDENCIES = libtests.a +process_vm_readv_SOURCES = process_vm_readv.c +process_vm_readv_OBJECTS = process_vm_readv.$(OBJEXT) +process_vm_readv_LDADD = $(LDADD) +process_vm_readv_DEPENDENCIES = libtests.a +process_vm_writev_SOURCES = process_vm_writev.c +process_vm_writev_OBJECTS = process_vm_writev.$(OBJEXT) +process_vm_writev_LDADD = $(LDADD) +process_vm_writev_DEPENDENCIES = libtests.a +pselect6_SOURCES = pselect6.c +pselect6_OBJECTS = pselect6.$(OBJEXT) +pselect6_LDADD = $(LDADD) +pselect6_DEPENDENCIES = libtests.a +ptrace_SOURCES = ptrace.c +ptrace_OBJECTS = ptrace.$(OBJEXT) +ptrace_LDADD = $(LDADD) +ptrace_DEPENDENCIES = libtests.a +pwritev_SOURCES = pwritev.c +pwritev_OBJECTS = pwritev-pwritev.$(OBJEXT) +pwritev_LDADD = $(LDADD) +pwritev_DEPENDENCIES = libtests.a +qual_fault_SOURCES = qual_fault.c +qual_fault_OBJECTS = qual_fault.$(OBJEXT) +qual_fault_LDADD = $(LDADD) +qual_fault_DEPENDENCIES = libtests.a +qual_inject_error_signal_SOURCES = qual_inject-error-signal.c +qual_inject_error_signal_OBJECTS = qual_inject-error-signal.$(OBJEXT) +qual_inject_error_signal_LDADD = $(LDADD) +qual_inject_error_signal_DEPENDENCIES = libtests.a +qual_inject_retval_SOURCES = qual_inject-retval.c +qual_inject_retval_OBJECTS = qual_inject-retval.$(OBJEXT) +qual_inject_retval_LDADD = $(LDADD) +qual_inject_retval_DEPENDENCIES = libtests.a +qual_inject_signal_SOURCES = qual_inject-signal.c +qual_inject_signal_OBJECTS = qual_inject-signal.$(OBJEXT) +qual_inject_signal_LDADD = $(LDADD) +qual_inject_signal_DEPENDENCIES = libtests.a +qual_signal_SOURCES = qual_signal.c +qual_signal_OBJECTS = qual_signal.$(OBJEXT) +qual_signal_LDADD = $(LDADD) +qual_signal_DEPENDENCIES = libtests.a +quotactl_SOURCES = quotactl.c +quotactl_OBJECTS = quotactl.$(OBJEXT) +quotactl_LDADD = $(LDADD) +quotactl_DEPENDENCIES = libtests.a +quotactl_v_SOURCES = quotactl-v.c +quotactl_v_OBJECTS = quotactl-v.$(OBJEXT) +quotactl_v_LDADD = $(LDADD) +quotactl_v_DEPENDENCIES = libtests.a +quotactl_xfs_SOURCES = quotactl-xfs.c +quotactl_xfs_OBJECTS = quotactl-xfs.$(OBJEXT) +quotactl_xfs_LDADD = $(LDADD) +quotactl_xfs_DEPENDENCIES = libtests.a +quotactl_xfs_v_SOURCES = quotactl-xfs-v.c +quotactl_xfs_v_OBJECTS = quotactl-xfs-v.$(OBJEXT) +quotactl_xfs_v_LDADD = $(LDADD) +quotactl_xfs_v_DEPENDENCIES = libtests.a +read_write_SOURCES = read-write.c +read_write_OBJECTS = read-write.$(OBJEXT) +read_write_LDADD = $(LDADD) +read_write_DEPENDENCIES = libtests.a +readahead_SOURCES = readahead.c +readahead_OBJECTS = readahead.$(OBJEXT) +readahead_LDADD = $(LDADD) +readahead_DEPENDENCIES = libtests.a +readdir_SOURCES = readdir.c +readdir_OBJECTS = readdir.$(OBJEXT) +readdir_LDADD = $(LDADD) +readdir_DEPENDENCIES = libtests.a +readlink_SOURCES = readlink.c +readlink_OBJECTS = readlink.$(OBJEXT) +readlink_LDADD = $(LDADD) +readlink_DEPENDENCIES = libtests.a +readlinkat_SOURCES = readlinkat.c +readlinkat_OBJECTS = readlinkat.$(OBJEXT) +readlinkat_LDADD = $(LDADD) +readlinkat_DEPENDENCIES = libtests.a +readv_SOURCES = readv.c +readv_OBJECTS = readv.$(OBJEXT) +readv_LDADD = $(LDADD) +readv_DEPENDENCIES = libtests.a +reboot_SOURCES = reboot.c +reboot_OBJECTS = reboot.$(OBJEXT) +reboot_LDADD = $(LDADD) +reboot_DEPENDENCIES = libtests.a +recvfrom_SOURCES = recvfrom.c +recvfrom_OBJECTS = recvfrom.$(OBJEXT) +recvfrom_LDADD = $(LDADD) +recvfrom_DEPENDENCIES = libtests.a +recvmmsg_timeout_SOURCES = recvmmsg-timeout.c +recvmmsg_timeout_OBJECTS = recvmmsg-timeout.$(OBJEXT) +recvmmsg_timeout_LDADD = $(LDADD) +recvmmsg_timeout_DEPENDENCIES = libtests.a +recvmsg_SOURCES = recvmsg.c +recvmsg_OBJECTS = recvmsg.$(OBJEXT) +recvmsg_LDADD = $(LDADD) +recvmsg_DEPENDENCIES = libtests.a +redirect_fds_SOURCES = redirect-fds.c +redirect_fds_OBJECTS = redirect-fds.$(OBJEXT) +redirect_fds_LDADD = $(LDADD) +redirect_fds_DEPENDENCIES = libtests.a +remap_file_pages_SOURCES = remap_file_pages.c +remap_file_pages_OBJECTS = remap_file_pages.$(OBJEXT) +remap_file_pages_LDADD = $(LDADD) +remap_file_pages_DEPENDENCIES = libtests.a +rename_SOURCES = rename.c +rename_OBJECTS = rename.$(OBJEXT) +rename_LDADD = $(LDADD) +rename_DEPENDENCIES = libtests.a +renameat_SOURCES = renameat.c +renameat_OBJECTS = renameat.$(OBJEXT) +renameat_LDADD = $(LDADD) +renameat_DEPENDENCIES = libtests.a +renameat2_SOURCES = renameat2.c +renameat2_OBJECTS = renameat2.$(OBJEXT) +renameat2_LDADD = $(LDADD) +renameat2_DEPENDENCIES = libtests.a +request_key_SOURCES = request_key.c +request_key_OBJECTS = request_key.$(OBJEXT) +request_key_LDADD = $(LDADD) +request_key_DEPENDENCIES = libtests.a +restart_syscall_SOURCES = restart_syscall.c +restart_syscall_OBJECTS = restart_syscall.$(OBJEXT) +restart_syscall_LDADD = $(LDADD) +restart_syscall_DEPENDENCIES = libtests.a +rmdir_SOURCES = rmdir.c +rmdir_OBJECTS = rmdir.$(OBJEXT) +rmdir_LDADD = $(LDADD) +rmdir_DEPENDENCIES = libtests.a +rt_sigpending_SOURCES = rt_sigpending.c +rt_sigpending_OBJECTS = rt_sigpending.$(OBJEXT) +rt_sigpending_LDADD = $(LDADD) +rt_sigpending_DEPENDENCIES = libtests.a +rt_sigprocmask_SOURCES = rt_sigprocmask.c +rt_sigprocmask_OBJECTS = rt_sigprocmask.$(OBJEXT) +rt_sigprocmask_LDADD = $(LDADD) +rt_sigprocmask_DEPENDENCIES = libtests.a +rt_sigqueueinfo_SOURCES = rt_sigqueueinfo.c +rt_sigqueueinfo_OBJECTS = rt_sigqueueinfo.$(OBJEXT) +rt_sigqueueinfo_LDADD = $(LDADD) +rt_sigqueueinfo_DEPENDENCIES = libtests.a +rt_sigsuspend_SOURCES = rt_sigsuspend.c +rt_sigsuspend_OBJECTS = rt_sigsuspend.$(OBJEXT) +rt_sigsuspend_LDADD = $(LDADD) +rt_sigsuspend_DEPENDENCIES = libtests.a +rt_sigtimedwait_SOURCES = rt_sigtimedwait.c +rt_sigtimedwait_OBJECTS = rt_sigtimedwait.$(OBJEXT) +rt_sigtimedwait_LDADD = $(LDADD) +rt_sigtimedwait_DEPENDENCIES = libtests.a +rt_tgsigqueueinfo_SOURCES = rt_tgsigqueueinfo.c +rt_tgsigqueueinfo_OBJECTS = rt_tgsigqueueinfo.$(OBJEXT) +rt_tgsigqueueinfo_LDADD = $(LDADD) +rt_tgsigqueueinfo_DEPENDENCIES = libtests.a +sched_get_priority_mxx_SOURCES = sched_get_priority_mxx.c +sched_get_priority_mxx_OBJECTS = sched_get_priority_mxx.$(OBJEXT) +sched_get_priority_mxx_LDADD = $(LDADD) +sched_get_priority_mxx_DEPENDENCIES = libtests.a +sched_rr_get_interval_SOURCES = sched_rr_get_interval.c +sched_rr_get_interval_OBJECTS = sched_rr_get_interval.$(OBJEXT) +sched_rr_get_interval_LDADD = $(LDADD) +sched_rr_get_interval_DEPENDENCIES = libtests.a +sched_xetaffinity_SOURCES = sched_xetaffinity.c +sched_xetaffinity_OBJECTS = sched_xetaffinity.$(OBJEXT) +sched_xetaffinity_LDADD = $(LDADD) +sched_xetaffinity_DEPENDENCIES = libtests.a +sched_xetattr_SOURCES = sched_xetattr.c +sched_xetattr_OBJECTS = sched_xetattr.$(OBJEXT) +sched_xetattr_LDADD = $(LDADD) +sched_xetattr_DEPENDENCIES = libtests.a +sched_xetparam_SOURCES = sched_xetparam.c +sched_xetparam_OBJECTS = sched_xetparam.$(OBJEXT) +sched_xetparam_LDADD = $(LDADD) +sched_xetparam_DEPENDENCIES = libtests.a +sched_xetscheduler_SOURCES = sched_xetscheduler.c +sched_xetscheduler_OBJECTS = sched_xetscheduler.$(OBJEXT) +sched_xetscheduler_LDADD = $(LDADD) +sched_xetscheduler_DEPENDENCIES = libtests.a +sched_yield_SOURCES = sched_yield.c +sched_yield_OBJECTS = sched_yield.$(OBJEXT) +sched_yield_LDADD = $(LDADD) +sched_yield_DEPENDENCIES = libtests.a +scm_rights_SOURCES = scm_rights.c +scm_rights_OBJECTS = scm_rights.$(OBJEXT) +scm_rights_LDADD = $(LDADD) +scm_rights_DEPENDENCIES = libtests.a +seccomp_filter_SOURCES = seccomp-filter.c +seccomp_filter_OBJECTS = seccomp-filter.$(OBJEXT) +seccomp_filter_LDADD = $(LDADD) +seccomp_filter_DEPENDENCIES = libtests.a +seccomp_filter_v_SOURCES = seccomp-filter-v.c +seccomp_filter_v_OBJECTS = seccomp-filter-v.$(OBJEXT) +seccomp_filter_v_LDADD = $(LDADD) +seccomp_filter_v_DEPENDENCIES = libtests.a +seccomp_strict_SOURCES = seccomp-strict.c +seccomp_strict_OBJECTS = seccomp-strict.$(OBJEXT) +seccomp_strict_LDADD = $(LDADD) +seccomp_strict_DEPENDENCIES = libtests.a +select_SOURCES = select.c +select_OBJECTS = select.$(OBJEXT) +select_LDADD = $(LDADD) +select_DEPENDENCIES = libtests.a +semop_SOURCES = semop.c +semop_OBJECTS = semop.$(OBJEXT) +semop_LDADD = $(LDADD) +semop_DEPENDENCIES = libtests.a +sendfile_SOURCES = sendfile.c +sendfile_OBJECTS = sendfile.$(OBJEXT) +sendfile_LDADD = $(LDADD) +sendfile_DEPENDENCIES = libtests.a +sendfile64_SOURCES = sendfile64.c +sendfile64_OBJECTS = sendfile64.$(OBJEXT) +sendfile64_LDADD = $(LDADD) +sendfile64_DEPENDENCIES = libtests.a +set_mempolicy_SOURCES = set_mempolicy.c +set_mempolicy_OBJECTS = set_mempolicy.$(OBJEXT) +set_mempolicy_LDADD = $(LDADD) +set_mempolicy_DEPENDENCIES = libtests.a +set_ptracer_any_SOURCES = set_ptracer_any.c +set_ptracer_any_OBJECTS = set_ptracer_any.$(OBJEXT) +set_ptracer_any_LDADD = $(LDADD) +set_ptracer_any_DEPENDENCIES = libtests.a +setdomainname_SOURCES = setdomainname.c +setdomainname_OBJECTS = setdomainname.$(OBJEXT) +setdomainname_LDADD = $(LDADD) +setdomainname_DEPENDENCIES = libtests.a +setfsgid_SOURCES = setfsgid.c +setfsgid_OBJECTS = setfsgid.$(OBJEXT) +setfsgid_LDADD = $(LDADD) +setfsgid_DEPENDENCIES = libtests.a +setfsgid32_SOURCES = setfsgid32.c +setfsgid32_OBJECTS = setfsgid32.$(OBJEXT) +setfsgid32_LDADD = $(LDADD) +setfsgid32_DEPENDENCIES = libtests.a +setfsuid_SOURCES = setfsuid.c +setfsuid_OBJECTS = setfsuid.$(OBJEXT) +setfsuid_LDADD = $(LDADD) +setfsuid_DEPENDENCIES = libtests.a +setfsuid32_SOURCES = setfsuid32.c +setfsuid32_OBJECTS = setfsuid32.$(OBJEXT) +setfsuid32_LDADD = $(LDADD) +setfsuid32_DEPENDENCIES = libtests.a +setgid_SOURCES = setgid.c +setgid_OBJECTS = setgid.$(OBJEXT) +setgid_LDADD = $(LDADD) +setgid_DEPENDENCIES = libtests.a +setgid32_SOURCES = setgid32.c +setgid32_OBJECTS = setgid32.$(OBJEXT) +setgid32_LDADD = $(LDADD) +setgid32_DEPENDENCIES = libtests.a +setgroups_SOURCES = setgroups.c +setgroups_OBJECTS = setgroups.$(OBJEXT) +setgroups_LDADD = $(LDADD) +setgroups_DEPENDENCIES = libtests.a +setgroups32_SOURCES = setgroups32.c +setgroups32_OBJECTS = setgroups32.$(OBJEXT) +setgroups32_LDADD = $(LDADD) +setgroups32_DEPENDENCIES = libtests.a +sethostname_SOURCES = sethostname.c +sethostname_OBJECTS = sethostname.$(OBJEXT) +sethostname_LDADD = $(LDADD) +sethostname_DEPENDENCIES = libtests.a +setns_SOURCES = setns.c +setns_OBJECTS = setns.$(OBJEXT) +setns_LDADD = $(LDADD) +setns_DEPENDENCIES = libtests.a +setregid_SOURCES = setregid.c +setregid_OBJECTS = setregid.$(OBJEXT) +setregid_LDADD = $(LDADD) +setregid_DEPENDENCIES = libtests.a +setregid32_SOURCES = setregid32.c +setregid32_OBJECTS = setregid32.$(OBJEXT) +setregid32_LDADD = $(LDADD) +setregid32_DEPENDENCIES = libtests.a +setresgid_SOURCES = setresgid.c +setresgid_OBJECTS = setresgid.$(OBJEXT) +setresgid_LDADD = $(LDADD) +setresgid_DEPENDENCIES = libtests.a +setresgid32_SOURCES = setresgid32.c +setresgid32_OBJECTS = setresgid32.$(OBJEXT) +setresgid32_LDADD = $(LDADD) +setresgid32_DEPENDENCIES = libtests.a +setresuid_SOURCES = setresuid.c +setresuid_OBJECTS = setresuid.$(OBJEXT) +setresuid_LDADD = $(LDADD) +setresuid_DEPENDENCIES = libtests.a +setresuid32_SOURCES = setresuid32.c +setresuid32_OBJECTS = setresuid32.$(OBJEXT) +setresuid32_LDADD = $(LDADD) +setresuid32_DEPENDENCIES = libtests.a +setreuid_SOURCES = setreuid.c +setreuid_OBJECTS = setreuid.$(OBJEXT) +setreuid_LDADD = $(LDADD) +setreuid_DEPENDENCIES = libtests.a +setreuid32_SOURCES = setreuid32.c +setreuid32_OBJECTS = setreuid32.$(OBJEXT) +setreuid32_LDADD = $(LDADD) +setreuid32_DEPENDENCIES = libtests.a +setrlimit_SOURCES = setrlimit.c +setrlimit_OBJECTS = setrlimit.$(OBJEXT) +setrlimit_LDADD = $(LDADD) +setrlimit_DEPENDENCIES = libtests.a +setuid_SOURCES = setuid.c +setuid_OBJECTS = setuid.$(OBJEXT) +setuid_LDADD = $(LDADD) +setuid_DEPENDENCIES = libtests.a +setuid32_SOURCES = setuid32.c +setuid32_OBJECTS = setuid32.$(OBJEXT) +setuid32_LDADD = $(LDADD) +setuid32_DEPENDENCIES = libtests.a +shmxt_SOURCES = shmxt.c +shmxt_OBJECTS = shmxt.$(OBJEXT) +shmxt_LDADD = $(LDADD) +shmxt_DEPENDENCIES = libtests.a +shutdown_SOURCES = shutdown.c +shutdown_OBJECTS = shutdown.$(OBJEXT) +shutdown_LDADD = $(LDADD) +shutdown_DEPENDENCIES = libtests.a +sigaction_SOURCES = sigaction.c +sigaction_OBJECTS = sigaction.$(OBJEXT) +sigaction_LDADD = $(LDADD) +sigaction_DEPENDENCIES = libtests.a +sigaltstack_SOURCES = sigaltstack.c +sigaltstack_OBJECTS = sigaltstack.$(OBJEXT) +sigaltstack_LDADD = $(LDADD) +sigaltstack_DEPENDENCIES = libtests.a +siginfo_SOURCES = siginfo.c +siginfo_OBJECTS = siginfo.$(OBJEXT) +siginfo_LDADD = $(LDADD) +siginfo_DEPENDENCIES = libtests.a +signal_receive_SOURCES = signal_receive.c +signal_receive_OBJECTS = signal_receive.$(OBJEXT) +signal_receive_LDADD = $(LDADD) +signal_receive_DEPENDENCIES = libtests.a +signalfd4_SOURCES = signalfd4.c +signalfd4_OBJECTS = signalfd4.$(OBJEXT) +signalfd4_LDADD = $(LDADD) +signalfd4_DEPENDENCIES = libtests.a +sigreturn_SOURCES = sigreturn.c +sigreturn_OBJECTS = sigreturn.$(OBJEXT) +sigreturn_LDADD = $(LDADD) +sigreturn_DEPENDENCIES = libtests.a +sleep_SOURCES = sleep.c +sleep_OBJECTS = sleep.$(OBJEXT) +sleep_LDADD = $(LDADD) +sleep_DEPENDENCIES = libtests.a +socketcall_SOURCES = socketcall.c +socketcall_OBJECTS = socketcall.$(OBJEXT) +socketcall_LDADD = $(LDADD) +socketcall_DEPENDENCIES = libtests.a +splice_SOURCES = splice.c +splice_OBJECTS = splice.$(OBJEXT) +splice_LDADD = $(LDADD) +splice_DEPENDENCIES = libtests.a +am_stack_fcall_OBJECTS = stack-fcall.$(OBJEXT) stack-fcall-0.$(OBJEXT) \ + stack-fcall-1.$(OBJEXT) stack-fcall-2.$(OBJEXT) \ + stack-fcall-3.$(OBJEXT) +stack_fcall_OBJECTS = $(am_stack_fcall_OBJECTS) +stack_fcall_LDADD = $(LDADD) +stack_fcall_DEPENDENCIES = libtests.a +stat_SOURCES = stat.c +stat_OBJECTS = stat.$(OBJEXT) +stat_LDADD = $(LDADD) +stat_DEPENDENCIES = libtests.a +stat64_SOURCES = stat64.c +stat64_OBJECTS = stat64-stat64.$(OBJEXT) +stat64_LDADD = $(LDADD) +stat64_DEPENDENCIES = libtests.a +statfs_SOURCES = statfs.c +statfs_OBJECTS = statfs-statfs.$(OBJEXT) +statfs_LDADD = $(LDADD) +statfs_DEPENDENCIES = libtests.a +statfs64_SOURCES = statfs64.c +statfs64_OBJECTS = statfs64.$(OBJEXT) +statfs64_LDADD = $(LDADD) +statfs64_DEPENDENCIES = libtests.a +swap_SOURCES = swap.c +swap_OBJECTS = swap.$(OBJEXT) +swap_LDADD = $(LDADD) +swap_DEPENDENCIES = libtests.a +symlink_SOURCES = symlink.c +symlink_OBJECTS = symlink.$(OBJEXT) +symlink_LDADD = $(LDADD) +symlink_DEPENDENCIES = libtests.a +symlinkat_SOURCES = symlinkat.c +symlinkat_OBJECTS = symlinkat.$(OBJEXT) +symlinkat_LDADD = $(LDADD) +symlinkat_DEPENDENCIES = libtests.a +sync_SOURCES = sync.c +sync_OBJECTS = sync.$(OBJEXT) +sync_LDADD = $(LDADD) +sync_DEPENDENCIES = libtests.a +sync_file_range_SOURCES = sync_file_range.c +sync_file_range_OBJECTS = sync_file_range.$(OBJEXT) +sync_file_range_LDADD = $(LDADD) +sync_file_range_DEPENDENCIES = libtests.a +sync_file_range2_SOURCES = sync_file_range2.c +sync_file_range2_OBJECTS = sync_file_range2.$(OBJEXT) +sync_file_range2_LDADD = $(LDADD) +sync_file_range2_DEPENDENCIES = libtests.a +sysinfo_SOURCES = sysinfo.c +sysinfo_OBJECTS = sysinfo.$(OBJEXT) +sysinfo_LDADD = $(LDADD) +sysinfo_DEPENDENCIES = libtests.a +syslog_SOURCES = syslog.c +syslog_OBJECTS = syslog.$(OBJEXT) +syslog_LDADD = $(LDADD) +syslog_DEPENDENCIES = libtests.a +tee_SOURCES = tee.c +tee_OBJECTS = tee.$(OBJEXT) +tee_LDADD = $(LDADD) +tee_DEPENDENCIES = libtests.a +threads_execve_SOURCES = threads-execve.c +threads_execve_OBJECTS = threads-execve.$(OBJEXT) +threads_execve_DEPENDENCIES = $(LDADD) +time_SOURCES = time.c +time_OBJECTS = time.$(OBJEXT) +time_LDADD = $(LDADD) +time_DEPENDENCIES = libtests.a +timer_create_SOURCES = timer_create.c +timer_create_OBJECTS = timer_create.$(OBJEXT) +timer_create_LDADD = $(LDADD) +timer_create_DEPENDENCIES = libtests.a +timer_xettime_SOURCES = timer_xettime.c +timer_xettime_OBJECTS = timer_xettime.$(OBJEXT) +timer_xettime_LDADD = $(LDADD) +timer_xettime_DEPENDENCIES = libtests.a +timerfd_xettime_SOURCES = timerfd_xettime.c +timerfd_xettime_OBJECTS = timerfd_xettime.$(OBJEXT) +timerfd_xettime_LDADD = $(LDADD) +timerfd_xettime_DEPENDENCIES = libtests.a +times_SOURCES = times.c +times_OBJECTS = times.$(OBJEXT) +times_DEPENDENCIES = $(LDADD) +times_fail_SOURCES = times-fail.c +times_fail_OBJECTS = times-fail.$(OBJEXT) +times_fail_LDADD = $(LDADD) +times_fail_DEPENDENCIES = libtests.a +truncate_SOURCES = truncate.c +truncate_OBJECTS = truncate.$(OBJEXT) +truncate_LDADD = $(LDADD) +truncate_DEPENDENCIES = libtests.a +truncate64_SOURCES = truncate64.c +truncate64_OBJECTS = truncate64-truncate64.$(OBJEXT) +truncate64_LDADD = $(LDADD) +truncate64_DEPENDENCIES = libtests.a +ugetrlimit_SOURCES = ugetrlimit.c +ugetrlimit_OBJECTS = ugetrlimit.$(OBJEXT) +ugetrlimit_LDADD = $(LDADD) +ugetrlimit_DEPENDENCIES = libtests.a +uio_SOURCES = uio.c +uio_OBJECTS = uio-uio.$(OBJEXT) +uio_LDADD = $(LDADD) +uio_DEPENDENCIES = libtests.a +umask_SOURCES = umask.c +umask_OBJECTS = umask.$(OBJEXT) +umask_LDADD = $(LDADD) +umask_DEPENDENCIES = libtests.a +umount_SOURCES = umount.c +umount_OBJECTS = umount.$(OBJEXT) +umount_LDADD = $(LDADD) +umount_DEPENDENCIES = libtests.a +umount2_SOURCES = umount2.c +umount2_OBJECTS = umount2.$(OBJEXT) +umount2_LDADD = $(LDADD) +umount2_DEPENDENCIES = libtests.a +umoven_illptr_SOURCES = umoven-illptr.c +umoven_illptr_OBJECTS = umoven-illptr.$(OBJEXT) +umoven_illptr_LDADD = $(LDADD) +umoven_illptr_DEPENDENCIES = libtests.a +umovestr_SOURCES = umovestr.c +umovestr_OBJECTS = umovestr.$(OBJEXT) +umovestr_LDADD = $(LDADD) +umovestr_DEPENDENCIES = libtests.a +umovestr_illptr_SOURCES = umovestr-illptr.c +umovestr_illptr_OBJECTS = umovestr-illptr.$(OBJEXT) +umovestr_illptr_LDADD = $(LDADD) +umovestr_illptr_DEPENDENCIES = libtests.a +umovestr2_SOURCES = umovestr2.c +umovestr2_OBJECTS = umovestr2.$(OBJEXT) +umovestr2_LDADD = $(LDADD) +umovestr2_DEPENDENCIES = libtests.a +umovestr3_SOURCES = umovestr3.c +umovestr3_OBJECTS = umovestr3.$(OBJEXT) +umovestr3_LDADD = $(LDADD) +umovestr3_DEPENDENCIES = libtests.a +uname_SOURCES = uname.c +uname_OBJECTS = uname.$(OBJEXT) +uname_LDADD = $(LDADD) +uname_DEPENDENCIES = libtests.a +unix_pair_send_recv_SOURCES = unix-pair-send-recv.c +unix_pair_send_recv_OBJECTS = unix-pair-send-recv.$(OBJEXT) +unix_pair_send_recv_LDADD = $(LDADD) +unix_pair_send_recv_DEPENDENCIES = libtests.a +unix_pair_sendto_recvfrom_SOURCES = unix-pair-sendto-recvfrom.c +unix_pair_sendto_recvfrom_OBJECTS = \ + unix-pair-sendto-recvfrom.$(OBJEXT) +unix_pair_sendto_recvfrom_LDADD = $(LDADD) +unix_pair_sendto_recvfrom_DEPENDENCIES = libtests.a +unlink_SOURCES = unlink.c +unlink_OBJECTS = unlink.$(OBJEXT) +unlink_LDADD = $(LDADD) +unlink_DEPENDENCIES = libtests.a +unlinkat_SOURCES = unlinkat.c +unlinkat_OBJECTS = unlinkat.$(OBJEXT) +unlinkat_LDADD = $(LDADD) +unlinkat_DEPENDENCIES = libtests.a +unshare_SOURCES = unshare.c +unshare_OBJECTS = unshare.$(OBJEXT) +unshare_LDADD = $(LDADD) +unshare_DEPENDENCIES = libtests.a +userfaultfd_SOURCES = userfaultfd.c +userfaultfd_OBJECTS = userfaultfd.$(OBJEXT) +userfaultfd_LDADD = $(LDADD) +userfaultfd_DEPENDENCIES = libtests.a +ustat_SOURCES = ustat.c +ustat_OBJECTS = ustat.$(OBJEXT) +ustat_LDADD = $(LDADD) +ustat_DEPENDENCIES = libtests.a +utime_SOURCES = utime.c +utime_OBJECTS = utime.$(OBJEXT) +utime_LDADD = $(LDADD) +utime_DEPENDENCIES = libtests.a +utimensat_SOURCES = utimensat.c +utimensat_OBJECTS = utimensat.$(OBJEXT) +utimensat_LDADD = $(LDADD) +utimensat_DEPENDENCIES = libtests.a +utimes_SOURCES = utimes.c +utimes_OBJECTS = utimes.$(OBJEXT) +utimes_LDADD = $(LDADD) +utimes_DEPENDENCIES = libtests.a +vfork_f_SOURCES = vfork-f.c +vfork_f_OBJECTS = vfork-f.$(OBJEXT) +vfork_f_LDADD = $(LDADD) +vfork_f_DEPENDENCIES = libtests.a +vhangup_SOURCES = vhangup.c +vhangup_OBJECTS = vhangup.$(OBJEXT) +vhangup_LDADD = $(LDADD) +vhangup_DEPENDENCIES = libtests.a +vmsplice_SOURCES = vmsplice.c +vmsplice_OBJECTS = vmsplice.$(OBJEXT) +vmsplice_LDADD = $(LDADD) +vmsplice_DEPENDENCIES = libtests.a +wait4_SOURCES = wait4.c +wait4_OBJECTS = wait4.$(OBJEXT) +wait4_LDADD = $(LDADD) +wait4_DEPENDENCIES = libtests.a +wait4_v_SOURCES = wait4-v.c +wait4_v_OBJECTS = wait4-v.$(OBJEXT) +wait4_v_LDADD = $(LDADD) +wait4_v_DEPENDENCIES = libtests.a +waitid_SOURCES = waitid.c +waitid_OBJECTS = waitid.$(OBJEXT) +waitid_LDADD = $(LDADD) +waitid_DEPENDENCIES = libtests.a +waitid_v_SOURCES = waitid-v.c +waitid_v_OBJECTS = waitid-v.$(OBJEXT) +waitid_v_LDADD = $(LDADD) +waitid_v_DEPENDENCIES = libtests.a +waitpid_SOURCES = waitpid.c +waitpid_OBJECTS = waitpid.$(OBJEXT) +waitpid_LDADD = $(LDADD) +waitpid_DEPENDENCIES = libtests.a +xattr_SOURCES = xattr.c +xattr_OBJECTS = xattr.$(OBJEXT) +xattr_LDADD = $(LDADD) +xattr_DEPENDENCIES = libtests.a +xattr_strings_SOURCES = xattr-strings.c +xattr_strings_OBJECTS = xattr-strings.$(OBJEXT) +xattr_strings_LDADD = $(LDADD) +xattr_strings_DEPENDENCIES = libtests.a +xet_robust_list_SOURCES = xet_robust_list.c +xet_robust_list_OBJECTS = xet_robust_list.$(OBJEXT) +xet_robust_list_LDADD = $(LDADD) +xet_robust_list_DEPENDENCIES = libtests.a +xetitimer_SOURCES = xetitimer.c +xetitimer_OBJECTS = xetitimer.$(OBJEXT) +xetitimer_LDADD = $(LDADD) +xetitimer_DEPENDENCIES = libtests.a +xetpgid_SOURCES = xetpgid.c +xetpgid_OBJECTS = xetpgid.$(OBJEXT) +xetpgid_LDADD = $(LDADD) +xetpgid_DEPENDENCIES = libtests.a +xetpriority_SOURCES = xetpriority.c +xetpriority_OBJECTS = xetpriority.$(OBJEXT) +xetpriority_LDADD = $(LDADD) +xetpriority_DEPENDENCIES = libtests.a +xettimeofday_SOURCES = xettimeofday.c +xettimeofday_OBJECTS = xettimeofday.$(OBJEXT) +xettimeofday_LDADD = $(LDADD) +xettimeofday_DEPENDENCIES = libtests.a +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libtests_a_SOURCES) _newselect.c accept.c accept4.c \ + access.c acct.c add_key.c adjtimex.c aio.c alarm.c answer.c \ + attach-f-p.c attach-f-p-cmd.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c caps-abbrev.c \ + chmod.c chown.c chown32.c chroot.c clock_adjtime.c \ + clock_nanosleep.c clock_xettime.c copy_file_range.c count-f.c \ + creat.c delete_module.c dup.c dup2.c dup3.c epoll_create.c \ + epoll_create1.c epoll_ctl.c epoll_pwait.c epoll_wait.c \ + erestartsys.c eventfd.c execve.c execve-v.c execveat.c \ + execveat-v.c faccessat.c fadvise64.c fadvise64_64.c \ + fallocate.c fanotify_init.c fanotify_mark.c fchdir.c fchmod.c \ + fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c fcntl64.c \ + fdatasync.c file_handle.c file_ioctl.c filter-unavailable.c \ + finit_module.c flock.c fork-f.c fstat.c fstat64.c fstatat64.c \ + fstatfs.c fstatfs64.c fsync.c ftruncate.c ftruncate64.c \ + futex.c futimesat.c get_mempolicy.c getcpu.c getcwd.c \ + getdents.c getdents64.c getegid.c getegid32.c geteuid.c \ + geteuid32.c getgid.c getgid32.c getgroups.c getgroups32.c \ + getpeername.c getpgrp.c getrandom.c getresgid.c getresgid32.c \ + getresuid.c getresuid32.c getrlimit.c getrusage.c getsid.c \ + getsockname.c getuid.c getuid32.c getxxid.c inet-cmsg.c \ + init_module.c inotify.c inotify_init1.c ioctl.c ioctl_block.c \ + ioctl_dm.c ioctl_dm-v.c ioctl_evdev.c ioctl_evdev-v.c \ + ioctl_loop.c ioctl_loop-nv.c ioctl_loop-v.c ioctl_mtd.c \ + ioctl_rtc.c ioctl_rtc-v.c ioctl_scsi.c ioctl_sg_io_v3.c \ + ioctl_sg_io_v4.c ioctl_sock_gifconf.c ioctl_uffdio.c \ + ioctl_v4l2.c ioperm.c iopl.c ioprio.c ip_mreq.c ipc.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kcmp.c \ + kexec_file_load.c kexec_load.c keyctl.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lookup_dcookie.c \ + lseek.c lstat.c lstat64.c mbind.c membarrier.c memfd_create.c \ + migrate_pages.c mincore.c mkdir.c mkdirat.c mknod.c mknodat.c \ + mlock.c mlock2.c mlockall.c mmap.c mmap64.c mmsg.c \ + mmsg-silent.c mmsg_name.c mmsg_name-v.c mount.c move_pages.c \ + mq.c mq_sendrecv.c mq_sendrecv-read.c mq_sendrecv-write.c \ + msg_control.c msg_control-v.c msg_name.c munlockall.c \ + nanosleep.c net-accept-connect.c net-icmp_filter.c \ + net-sockaddr.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_protocol.c netlink_unix_diag.c newfstatat.c \ + nsyscalls.c old_mmap.c oldfstat.c oldlstat.c oldselect.c \ + oldstat.c open.c openat.c pause.c pc.c perf_event_open.c \ + perf_event_open_nonverbose.c perf_event_open_unabbrev.c \ + personality.c pipe.c pipe2.c pkey_alloc.c pkey_free.c \ + pkey_mprotect.c poll.c ppoll.c prctl-arg2-intptr.c \ + prctl-dumpable.c prctl-name.c prctl-no-args.c \ + prctl-pdeathsig.c prctl-seccomp-filter-v.c \ + prctl-seccomp-strict.c prctl-securebits.c prctl-tid_address.c \ + prctl-tsc.c pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c print_maxfd.c printstr.c prlimit64.c \ + process_vm_readv.c process_vm_writev.c pselect6.c ptrace.c \ + pwritev.c qual_fault.c qual_inject-error-signal.c \ + qual_inject-retval.c qual_inject-signal.c qual_signal.c \ + quotactl.c quotactl-v.c quotactl-xfs.c quotactl-xfs-v.c \ + read-write.c readahead.c readdir.c readlink.c readlinkat.c \ + readv.c reboot.c recvfrom.c recvmmsg-timeout.c recvmsg.c \ + redirect-fds.c remap_file_pages.c rename.c renameat.c \ + renameat2.c request_key.c restart_syscall.c rmdir.c \ + rt_sigpending.c rt_sigprocmask.c rt_sigqueueinfo.c \ + rt_sigsuspend.c rt_sigtimedwait.c rt_tgsigqueueinfo.c \ + sched_get_priority_mxx.c sched_rr_get_interval.c \ + sched_xetaffinity.c sched_xetattr.c sched_xetparam.c \ + sched_xetscheduler.c sched_yield.c scm_rights.c \ + seccomp-filter.c seccomp-filter-v.c seccomp-strict.c select.c \ + semop.c sendfile.c sendfile64.c set_mempolicy.c \ + set_ptracer_any.c setdomainname.c setfsgid.c setfsgid32.c \ + setfsuid.c setfsuid32.c setgid.c setgid32.c setgroups.c \ + setgroups32.c sethostname.c setns.c setregid.c setregid32.c \ + setresgid.c setresgid32.c setresuid.c setresuid32.c setreuid.c \ + setreuid32.c setrlimit.c setuid.c setuid32.c shmxt.c \ + shutdown.c sigaction.c sigaltstack.c siginfo.c \ + signal_receive.c signalfd4.c sigreturn.c sleep.c socketcall.c \ + splice.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ + statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + threads-execve.c time.c timer_create.c timer_xettime.c \ + timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ + ugetrlimit.c uio.c umask.c umount.c umount2.c umoven-illptr.c \ + umovestr.c umovestr-illptr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unix-pair-sendto-recvfrom.c unlink.c \ + unlinkat.c unshare.c userfaultfd.c ustat.c utime.c utimensat.c \ + utimes.c vfork-f.c vhangup.c vmsplice.c wait4.c wait4-v.c \ + waitid.c waitid-v.c waitpid.c xattr.c xattr-strings.c \ + xet_robust_list.c xetitimer.c xetpgid.c xetpriority.c \ + xettimeofday.c +DIST_SOURCES = $(libtests_a_SOURCES) _newselect.c accept.c accept4.c \ + access.c acct.c add_key.c adjtimex.c aio.c alarm.c answer.c \ + attach-f-p.c attach-f-p-cmd.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c caps-abbrev.c \ + chmod.c chown.c chown32.c chroot.c clock_adjtime.c \ + clock_nanosleep.c clock_xettime.c copy_file_range.c count-f.c \ + creat.c delete_module.c dup.c dup2.c dup3.c epoll_create.c \ + epoll_create1.c epoll_ctl.c epoll_pwait.c epoll_wait.c \ + erestartsys.c eventfd.c execve.c execve-v.c execveat.c \ + execveat-v.c faccessat.c fadvise64.c fadvise64_64.c \ + fallocate.c fanotify_init.c fanotify_mark.c fchdir.c fchmod.c \ + fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c fcntl64.c \ + fdatasync.c file_handle.c file_ioctl.c filter-unavailable.c \ + finit_module.c flock.c fork-f.c fstat.c fstat64.c fstatat64.c \ + fstatfs.c fstatfs64.c fsync.c ftruncate.c ftruncate64.c \ + futex.c futimesat.c get_mempolicy.c getcpu.c getcwd.c \ + getdents.c getdents64.c getegid.c getegid32.c geteuid.c \ + geteuid32.c getgid.c getgid32.c getgroups.c getgroups32.c \ + getpeername.c getpgrp.c getrandom.c getresgid.c getresgid32.c \ + getresuid.c getresuid32.c getrlimit.c getrusage.c getsid.c \ + getsockname.c getuid.c getuid32.c getxxid.c inet-cmsg.c \ + init_module.c inotify.c inotify_init1.c ioctl.c ioctl_block.c \ + ioctl_dm.c ioctl_dm-v.c ioctl_evdev.c ioctl_evdev-v.c \ + ioctl_loop.c ioctl_loop-nv.c ioctl_loop-v.c ioctl_mtd.c \ + ioctl_rtc.c ioctl_rtc-v.c ioctl_scsi.c ioctl_sg_io_v3.c \ + ioctl_sg_io_v4.c ioctl_sock_gifconf.c ioctl_uffdio.c \ + ioctl_v4l2.c ioperm.c iopl.c ioprio.c ip_mreq.c ipc.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kcmp.c \ + kexec_file_load.c kexec_load.c keyctl.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lookup_dcookie.c \ + lseek.c lstat.c lstat64.c mbind.c membarrier.c memfd_create.c \ + migrate_pages.c mincore.c mkdir.c mkdirat.c mknod.c mknodat.c \ + mlock.c mlock2.c mlockall.c mmap.c mmap64.c mmsg.c \ + mmsg-silent.c mmsg_name.c mmsg_name-v.c mount.c move_pages.c \ + mq.c mq_sendrecv.c mq_sendrecv-read.c mq_sendrecv-write.c \ + msg_control.c msg_control-v.c msg_name.c munlockall.c \ + nanosleep.c net-accept-connect.c net-icmp_filter.c \ + net-sockaddr.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_protocol.c netlink_unix_diag.c newfstatat.c \ + nsyscalls.c old_mmap.c oldfstat.c oldlstat.c oldselect.c \ + oldstat.c open.c openat.c pause.c pc.c perf_event_open.c \ + perf_event_open_nonverbose.c perf_event_open_unabbrev.c \ + personality.c pipe.c pipe2.c pkey_alloc.c pkey_free.c \ + pkey_mprotect.c poll.c ppoll.c prctl-arg2-intptr.c \ + prctl-dumpable.c prctl-name.c prctl-no-args.c \ + prctl-pdeathsig.c prctl-seccomp-filter-v.c \ + prctl-seccomp-strict.c prctl-securebits.c prctl-tid_address.c \ + prctl-tsc.c pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c print_maxfd.c printstr.c prlimit64.c \ + process_vm_readv.c process_vm_writev.c pselect6.c ptrace.c \ + pwritev.c qual_fault.c qual_inject-error-signal.c \ + qual_inject-retval.c qual_inject-signal.c qual_signal.c \ + quotactl.c quotactl-v.c quotactl-xfs.c quotactl-xfs-v.c \ + read-write.c readahead.c readdir.c readlink.c readlinkat.c \ + readv.c reboot.c recvfrom.c recvmmsg-timeout.c recvmsg.c \ + redirect-fds.c remap_file_pages.c rename.c renameat.c \ + renameat2.c request_key.c restart_syscall.c rmdir.c \ + rt_sigpending.c rt_sigprocmask.c rt_sigqueueinfo.c \ + rt_sigsuspend.c rt_sigtimedwait.c rt_tgsigqueueinfo.c \ + sched_get_priority_mxx.c sched_rr_get_interval.c \ + sched_xetaffinity.c sched_xetattr.c sched_xetparam.c \ + sched_xetscheduler.c sched_yield.c scm_rights.c \ + seccomp-filter.c seccomp-filter-v.c seccomp-strict.c select.c \ + semop.c sendfile.c sendfile64.c set_mempolicy.c \ + set_ptracer_any.c setdomainname.c setfsgid.c setfsgid32.c \ + setfsuid.c setfsuid32.c setgid.c setgid32.c setgroups.c \ + setgroups32.c sethostname.c setns.c setregid.c setregid32.c \ + setresgid.c setresgid32.c setresuid.c setresuid32.c setreuid.c \ + setreuid32.c setrlimit.c setuid.c setuid32.c shmxt.c \ + shutdown.c sigaction.c sigaltstack.c siginfo.c \ + signal_receive.c signalfd4.c sigreturn.c sleep.c socketcall.c \ + splice.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ + statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + threads-execve.c time.c timer_create.c timer_xettime.c \ + timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ + ugetrlimit.c uio.c umask.c umount.c umount2.c umoven-illptr.c \ + umovestr.c umovestr-illptr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unix-pair-sendto-recvfrom.c unlink.c \ + unlinkat.c unshare.c userfaultfd.c ustat.c utime.c utimensat.c \ + utimes.c vfork-f.c vhangup.c vmsplice.c wait4.c wait4-v.c \ + waitid.c waitid-v.c waitpid.c xattr.c xattr-strings.c \ + xet_robust_list.c xetitimer.c xetpgid.c xetpriority.c \ + xettimeofday.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__extra_recursive_targets = check-valgrind-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +@USE_LIBUNWIND_TRUE@am__EXEEXT_1 = strace-k.test +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CYGPATH_W = @CYGPATH_W@ +DEB_CHANGELOGTIME = @DEB_CHANGELOGTIME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ +ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ +ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ +ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ +EXEEXT = @EXEEXT@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LCOV = @LCOV@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MIPS_ABI = @MIPS_ABI@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +RPM_CHANGELOGTIME = @RPM_CHANGELOGTIME@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VALGRIND = @VALGRIND@ +VALGRIND_ENABLED = @VALGRIND_ENABLED@ +VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +arch = @arch@ +arch_m32 = @arch_m32@ +arch_mx32 = @arch_mx32@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dl_LIBS = @dl_LIBS@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libunwind_CPPFLAGS = @libunwind_CPPFLAGS@ +libunwind_LDFLAGS = @libunwind_LDFLAGS@ +libunwind_LIBS = @libunwind_LIBS@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +valgrind_enabled_tools = @valgrind_enabled_tools@ +valgrind_tools = @valgrind_tools@ +OS = linux +ARCH = @arch_mx32@ +MPERS_NAME = mx32 +ARCH_MFLAGS = -DMPERS_IS_$(MPERS_NAME) -mx32 +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = $(ARCH_MFLAGS) \ + -I$(builddir) \ + -I$(top_builddir)/$(OS)/$(ARCH) \ + -I$(top_srcdir)/$(OS)/$(ARCH) \ + -I$(top_builddir)/$(OS) \ + -I$(top_srcdir)/$(OS) \ + -I$(top_builddir) \ + -I$(top_srcdir) + +AM_LDFLAGS = $(ARCH_MFLAGS) +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + fill_memory.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + libmmsg.c \ + libsocketcall.c \ + overflowuid.c \ + pipe_maxfd.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + signal2name.c \ + sprintrc.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES + +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) +fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mq_LDADD = -lrt $(LDADD) +mq_sendrecv_LDADD = -lrt $(LDADD) +mq_sendrecv_read_LDADD = -lrt $(LDADD) +mq_sendrecv_write_LDADD = -lrt $(LDADD) +newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +threads_execve_LDADD = -lrt -lpthread $(LDADD) +times_LDADD = -lrt $(LDADD) +truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stack_fcall_SOURCES = stack-fcall.c \ + stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c + +@USE_LIBUNWIND_FALSE@LIBUNWIND_TESTS = +@USE_LIBUNWIND_TRUE@LIBUNWIND_TESTS = strace-k.test +DECODER_TESTS = \ + _newselect.test \ + accept.test \ + accept4.test \ + access.test \ + acct.test \ + add_key.test \ + adjtimex.test \ + aio.test \ + alarm.test \ + bpf.test \ + brk.test \ + btrfs-v.test \ + btrfs-vw.test \ + btrfs-w.test \ + btrfs.test \ + caps-abbrev.test \ + caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ + clock_nanosleep.test \ + clock_xettime.test \ + copy_file_range.test \ + creat.test \ + delete_module.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ + epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ + erestartsys.test \ + eventfd.test \ + execve-v.test \ + execve.test \ + execveat-v.test \ + execveat.test \ + faccessat.test \ + fadvise64.test \ + fadvise64_64.test \ + fallocate.test \ + fanotify_init.test \ + fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ + fcntl.test \ + fcntl64.test \ + fdatasync.test \ + file_handle.test \ + file_ioctl.test \ + finit_module.test \ + flock.test \ + fstat.test \ + fstat64.test \ + fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ + ftruncate.test \ + ftruncate64.test \ + futex.test \ + futimesat.test \ + get_mempolicy.test \ + getcpu.test \ + getcwd.test \ + getdents.test \ + getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpeername.test \ + getpgrp.test \ + getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrlimit.test \ + getrusage.test \ + getsid.test \ + getsockname.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ + inet-cmsg.test \ + init_module.test \ + inotify.test \ + inotify_init1.test \ + ioctl.test \ + ioctl_block.test \ + ioctl_dm-v.test \ + ioctl_dm.test \ + ioctl_evdev-v.test \ + ioctl_evdev.test \ + ioctl_loop-nv.test \ + ioctl_loop-v.test \ + ioctl_loop.test \ + ioctl_mtd.test \ + ioctl_rtc-v.test \ + ioctl_rtc.test \ + ioctl_scsi.test \ + ioctl_sg_io_v3.test \ + ioctl_sg_io_v4.test \ + ioctl_sock_gifconf.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ + ioprio.test \ + ip_mreq.test \ + ipc.test \ + ipc_msg.test \ + ipc_msgbuf.test \ + ipc_sem.test \ + ipc_shm.test \ + kcmp.test \ + kexec_file_load.test \ + kexec_load.test \ + keyctl.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ + llseek.test \ + lookup_dcookie.test \ + lseek.test \ + lstat.test \ + lstat64.test \ + mbind.test \ + membarrier.test \ + memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ + mlock2.test \ + mlockall.test \ + mmap.test \ + mmap64.test \ + mmsg-silent.test \ + mmsg.test \ + mmsg_name-v.test \ + mmsg_name.test \ + mount.test \ + move_pages.test \ + mq.test \ + mq_sendrecv-read.test \ + mq_sendrecv-write.test \ + mq_sendrecv.test \ + msg_control-v.test \ + msg_control.test \ + msg_name.test \ + munlockall.test \ + nanosleep.test \ + net-icmp_filter.test \ + net-sockaddr.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ + net.test \ + netlink_protocol.test \ + newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ + oldfstat.test \ + oldlstat.test \ + oldselect.test \ + oldstat.test \ + open.test \ + openat.test \ + pause.test \ + perf_event_open.test \ + perf_event_open_nonverbose.test \ + perf_event_open_unabbrev.test \ + personality.test \ + pipe.test \ + pipe2.test \ + pkey_alloc.test \ + pkey_free.test \ + pkey_mprotect.test \ + poll.test \ + ppoll.test \ + prctl-arg2-intptr.test \ + prctl-dumpable.test \ + prctl-name.test \ + prctl-no-args.test \ + prctl-pdeathsig.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + prctl-securebits.test \ + prctl-tid_address.test \ + prctl-tsc.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv.test \ + preadv2-pwritev2.test \ + printstr.test \ + prlimit64.test \ + process_vm_readv.test \ + process_vm_writev.test \ + pselect6.test \ + ptrace.test \ + pwritev.test \ + qual_fault-exit_group.test \ + quotactl-v.test \ + quotactl-xfs-v.test \ + quotactl-xfs.test \ + quotactl.test \ + read-write.test \ + readahead.test \ + readdir.test \ + readlink.test \ + readlinkat.test \ + readv.test \ + reboot.test \ + recvfrom.test \ + recvmmsg-timeout.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + request_key.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ + rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ + sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ + scm_rights-fd.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ + select.test \ + semop.test \ + sendfile.test \ + sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setns.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setrlimit.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ + shutdown.test \ + sigaction.test \ + sigaltstack.test \ + siginfo.test \ + signalfd4.test \ + sigreturn.test \ + socketcall.test \ + splice.test \ + stat.test \ + stat64.test \ + statfs.test \ + statfs64.test \ + sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ + sysinfo.test \ + syslog.test \ + tee.test \ + time.test \ + timer_create.test \ + timer_xettime.test \ + timerfd_xettime.test \ + times-fail.test \ + times.test \ + truncate.test \ + truncate64.test \ + ugetrlimit.test \ + uio.test \ + umask.test \ + umount.test \ + umount2.test \ + umoven-illptr.test \ + umovestr-illptr.test \ + umovestr.test \ + umovestr2.test \ + umovestr3.test \ + uname.test \ + unix-pair-send-recv.test \ + unix-pair-sendto-recvfrom.test \ + unlink.test \ + unlinkat.test \ + unshare.test \ + userfaultfd.test \ + ustat.test \ + utime.test \ + utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ + wait4-v.test \ + wait4.test \ + waitid-v.test \ + waitid.test \ + waitpid.test \ + xattr-strings.test \ + xattr.test \ + xet_robust_list.test \ + xetitimer.test \ + xetpgid.test \ + xetpriority.test \ + xettimeofday.test \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ + count.test \ + detach-running.test \ + detach-sleeping.test \ + detach-stopped.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + options-syntax.test \ + pc.test \ + qual_fault-syntax.test \ + qual_fault.test \ + qual_inject-error-signal.test \ + qual_inject-retval.test \ + qual_inject-signal.test \ + qual_inject-syntax.test \ + qual_signal.test \ + qual_syscall.test \ + redirect-fds.test \ + redirect.test \ + restart_syscall.test \ + signal_receive.test \ + strace-C.test \ + strace-E.test \ + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + threads-execve.test \ + vfork-f.test \ + # end of MISC_TESTS + +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) +TEST_LOG_COMPILER = env +AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh +VALGRIND_FLAGS = --quiet +VALGRIND_SUPPRESSIONS_FILES = $(srcdir)/strace.supp +EXTRA_DIST = init.sh run.sh match.awk \ + caps-abbrev.awk \ + caps.awk \ + count-f.expected \ + eventfd.expected \ + fadvise.h \ + filter-unavailable.expected \ + fstatat.c \ + fstatx.c \ + getresugid.c \ + init_delete_module.h \ + ipc.sh \ + ipc_msgbuf.expected \ + ksysent.sed \ + lstatx.c \ + net.expected \ + oldselect.expected \ + pipe.expected \ + ppoll-v.expected \ + ppoll.expected \ + process_vm_readv_writev.c \ + qual_fault-exit_group.expected \ + qual_inject-error-signal.expected \ + qual_inject-signal.expected \ + quotactl.h \ + scno_tampering.sh \ + setfsugid.c \ + setresugid.c \ + setreugid.c \ + setugid.c \ + sigaction.awk \ + sigaltstack.expected \ + sockname.c \ + statfs.expected \ + statx.sh \ + strace-C.expected \ + strace-E.expected \ + strace-T.expected \ + strace-ff.expected \ + strace-k.test \ + strace-r.expected \ + strace.supp \ + struct_flock.c \ + sun_path.expected \ + uio.expected \ + umode_t.c \ + umovestr.expected \ + unix-pair-send-recv.expected \ + unix-pair-sendto-recvfrom.expected \ + xchownx.c \ + xgetrlimit.c \ + xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ + xstatx.c \ + $(TESTS) + +objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT))) +CLEANFILES = ksysent.h $(TESTS:=.tmp) syscallent.i scno.h +SCNO_CPPFLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(ARCH_MFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) + +digits = [[:digit:]][[:digit:]]* +al_nums = [[:alnum:]_][[:alnum:]_]* +SCNO_SED = /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 +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../scno.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests-mx32/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests-mx32/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/../scno.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkLIBRARIES: + -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) + +libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtests.a + $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) + $(AM_V_at)$(RANLIB) libtests.a + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) + +_newselect$(EXEEXT): $(_newselect_OBJECTS) $(_newselect_DEPENDENCIES) $(EXTRA__newselect_DEPENDENCIES) + @rm -f _newselect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(_newselect_OBJECTS) $(_newselect_LDADD) $(LIBS) + +accept$(EXEEXT): $(accept_OBJECTS) $(accept_DEPENDENCIES) $(EXTRA_accept_DEPENDENCIES) + @rm -f accept$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(accept_OBJECTS) $(accept_LDADD) $(LIBS) + +accept4$(EXEEXT): $(accept4_OBJECTS) $(accept4_DEPENDENCIES) $(EXTRA_accept4_DEPENDENCIES) + @rm -f accept4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(accept4_OBJECTS) $(accept4_LDADD) $(LIBS) + +access$(EXEEXT): $(access_OBJECTS) $(access_DEPENDENCIES) $(EXTRA_access_DEPENDENCIES) + @rm -f access$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(access_OBJECTS) $(access_LDADD) $(LIBS) + +acct$(EXEEXT): $(acct_OBJECTS) $(acct_DEPENDENCIES) $(EXTRA_acct_DEPENDENCIES) + @rm -f acct$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(acct_OBJECTS) $(acct_LDADD) $(LIBS) + +add_key$(EXEEXT): $(add_key_OBJECTS) $(add_key_DEPENDENCIES) $(EXTRA_add_key_DEPENDENCIES) + @rm -f add_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(add_key_OBJECTS) $(add_key_LDADD) $(LIBS) + +adjtimex$(EXEEXT): $(adjtimex_OBJECTS) $(adjtimex_DEPENDENCIES) $(EXTRA_adjtimex_DEPENDENCIES) + @rm -f adjtimex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(adjtimex_OBJECTS) $(adjtimex_LDADD) $(LIBS) + +aio$(EXEEXT): $(aio_OBJECTS) $(aio_DEPENDENCIES) $(EXTRA_aio_DEPENDENCIES) + @rm -f aio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(aio_OBJECTS) $(aio_LDADD) $(LIBS) + +alarm$(EXEEXT): $(alarm_OBJECTS) $(alarm_DEPENDENCIES) $(EXTRA_alarm_DEPENDENCIES) + @rm -f alarm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(alarm_OBJECTS) $(alarm_LDADD) $(LIBS) + +answer$(EXEEXT): $(answer_OBJECTS) $(answer_DEPENDENCIES) $(EXTRA_answer_DEPENDENCIES) + @rm -f answer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(answer_OBJECTS) $(answer_LDADD) $(LIBS) + +attach-f-p$(EXEEXT): $(attach_f_p_OBJECTS) $(attach_f_p_DEPENDENCIES) $(EXTRA_attach_f_p_DEPENDENCIES) + @rm -f attach-f-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_OBJECTS) $(attach_f_p_LDADD) $(LIBS) + +attach-f-p-cmd$(EXEEXT): $(attach_f_p_cmd_OBJECTS) $(attach_f_p_cmd_DEPENDENCIES) $(EXTRA_attach_f_p_cmd_DEPENDENCIES) + @rm -f attach-f-p-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_cmd_OBJECTS) $(attach_f_p_cmd_LDADD) $(LIBS) + +attach-p-cmd-cmd$(EXEEXT): $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_DEPENDENCIES) $(EXTRA_attach_p_cmd_cmd_DEPENDENCIES) + @rm -f attach-p-cmd-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_LDADD) $(LIBS) + +attach-p-cmd-p$(EXEEXT): $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_DEPENDENCIES) $(EXTRA_attach_p_cmd_p_DEPENDENCIES) + @rm -f attach-p-cmd-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_LDADD) $(LIBS) + +bpf$(EXEEXT): $(bpf_OBJECTS) $(bpf_DEPENDENCIES) $(EXTRA_bpf_DEPENDENCIES) + @rm -f bpf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(bpf_OBJECTS) $(bpf_LDADD) $(LIBS) + +brk$(EXEEXT): $(brk_OBJECTS) $(brk_DEPENDENCIES) $(EXTRA_brk_DEPENDENCIES) + @rm -f brk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(brk_OBJECTS) $(brk_LDADD) $(LIBS) + +btrfs$(EXEEXT): $(btrfs_OBJECTS) $(btrfs_DEPENDENCIES) $(EXTRA_btrfs_DEPENDENCIES) + @rm -f btrfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(btrfs_OBJECTS) $(btrfs_LDADD) $(LIBS) + +caps$(EXEEXT): $(caps_OBJECTS) $(caps_DEPENDENCIES) $(EXTRA_caps_DEPENDENCIES) + @rm -f caps$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(caps_OBJECTS) $(caps_LDADD) $(LIBS) + +caps-abbrev$(EXEEXT): $(caps_abbrev_OBJECTS) $(caps_abbrev_DEPENDENCIES) $(EXTRA_caps_abbrev_DEPENDENCIES) + @rm -f caps-abbrev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(caps_abbrev_OBJECTS) $(caps_abbrev_LDADD) $(LIBS) + +chmod$(EXEEXT): $(chmod_OBJECTS) $(chmod_DEPENDENCIES) $(EXTRA_chmod_DEPENDENCIES) + @rm -f chmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chmod_OBJECTS) $(chmod_LDADD) $(LIBS) + +chown$(EXEEXT): $(chown_OBJECTS) $(chown_DEPENDENCIES) $(EXTRA_chown_DEPENDENCIES) + @rm -f chown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown_OBJECTS) $(chown_LDADD) $(LIBS) + +chown32$(EXEEXT): $(chown32_OBJECTS) $(chown32_DEPENDENCIES) $(EXTRA_chown32_DEPENDENCIES) + @rm -f chown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown32_OBJECTS) $(chown32_LDADD) $(LIBS) + +chroot$(EXEEXT): $(chroot_OBJECTS) $(chroot_DEPENDENCIES) $(EXTRA_chroot_DEPENDENCIES) + @rm -f chroot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chroot_OBJECTS) $(chroot_LDADD) $(LIBS) + +clock_adjtime$(EXEEXT): $(clock_adjtime_OBJECTS) $(clock_adjtime_DEPENDENCIES) $(EXTRA_clock_adjtime_DEPENDENCIES) + @rm -f clock_adjtime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_adjtime_OBJECTS) $(clock_adjtime_LDADD) $(LIBS) + +clock_nanosleep$(EXEEXT): $(clock_nanosleep_OBJECTS) $(clock_nanosleep_DEPENDENCIES) $(EXTRA_clock_nanosleep_DEPENDENCIES) + @rm -f clock_nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_nanosleep_OBJECTS) $(clock_nanosleep_LDADD) $(LIBS) + +clock_xettime$(EXEEXT): $(clock_xettime_OBJECTS) $(clock_xettime_DEPENDENCIES) $(EXTRA_clock_xettime_DEPENDENCIES) + @rm -f clock_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_xettime_OBJECTS) $(clock_xettime_LDADD) $(LIBS) + +copy_file_range$(EXEEXT): $(copy_file_range_OBJECTS) $(copy_file_range_DEPENDENCIES) $(EXTRA_copy_file_range_DEPENDENCIES) + @rm -f copy_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(copy_file_range_OBJECTS) $(copy_file_range_LDADD) $(LIBS) + +count-f$(EXEEXT): $(count_f_OBJECTS) $(count_f_DEPENDENCIES) $(EXTRA_count_f_DEPENDENCIES) + @rm -f count-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(count_f_OBJECTS) $(count_f_LDADD) $(LIBS) + +creat$(EXEEXT): $(creat_OBJECTS) $(creat_DEPENDENCIES) $(EXTRA_creat_DEPENDENCIES) + @rm -f creat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(creat_OBJECTS) $(creat_LDADD) $(LIBS) + +delete_module$(EXEEXT): $(delete_module_OBJECTS) $(delete_module_DEPENDENCIES) $(EXTRA_delete_module_DEPENDENCIES) + @rm -f delete_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(delete_module_OBJECTS) $(delete_module_LDADD) $(LIBS) + +dup$(EXEEXT): $(dup_OBJECTS) $(dup_DEPENDENCIES) $(EXTRA_dup_DEPENDENCIES) + @rm -f dup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup_OBJECTS) $(dup_LDADD) $(LIBS) + +dup2$(EXEEXT): $(dup2_OBJECTS) $(dup2_DEPENDENCIES) $(EXTRA_dup2_DEPENDENCIES) + @rm -f dup2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup2_OBJECTS) $(dup2_LDADD) $(LIBS) + +dup3$(EXEEXT): $(dup3_OBJECTS) $(dup3_DEPENDENCIES) $(EXTRA_dup3_DEPENDENCIES) + @rm -f dup3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup3_OBJECTS) $(dup3_LDADD) $(LIBS) + +epoll_create$(EXEEXT): $(epoll_create_OBJECTS) $(epoll_create_DEPENDENCIES) $(EXTRA_epoll_create_DEPENDENCIES) + @rm -f epoll_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create_OBJECTS) $(epoll_create_LDADD) $(LIBS) + +epoll_create1$(EXEEXT): $(epoll_create1_OBJECTS) $(epoll_create1_DEPENDENCIES) $(EXTRA_epoll_create1_DEPENDENCIES) + @rm -f epoll_create1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create1_OBJECTS) $(epoll_create1_LDADD) $(LIBS) + +epoll_ctl$(EXEEXT): $(epoll_ctl_OBJECTS) $(epoll_ctl_DEPENDENCIES) $(EXTRA_epoll_ctl_DEPENDENCIES) + @rm -f epoll_ctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_ctl_OBJECTS) $(epoll_ctl_LDADD) $(LIBS) + +epoll_pwait$(EXEEXT): $(epoll_pwait_OBJECTS) $(epoll_pwait_DEPENDENCIES) $(EXTRA_epoll_pwait_DEPENDENCIES) + @rm -f epoll_pwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_pwait_OBJECTS) $(epoll_pwait_LDADD) $(LIBS) + +epoll_wait$(EXEEXT): $(epoll_wait_OBJECTS) $(epoll_wait_DEPENDENCIES) $(EXTRA_epoll_wait_DEPENDENCIES) + @rm -f epoll_wait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_wait_OBJECTS) $(epoll_wait_LDADD) $(LIBS) + +erestartsys$(EXEEXT): $(erestartsys_OBJECTS) $(erestartsys_DEPENDENCIES) $(EXTRA_erestartsys_DEPENDENCIES) + @rm -f erestartsys$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(erestartsys_OBJECTS) $(erestartsys_LDADD) $(LIBS) + +eventfd$(EXEEXT): $(eventfd_OBJECTS) $(eventfd_DEPENDENCIES) $(EXTRA_eventfd_DEPENDENCIES) + @rm -f eventfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(eventfd_OBJECTS) $(eventfd_LDADD) $(LIBS) + +execve$(EXEEXT): $(execve_OBJECTS) $(execve_DEPENDENCIES) $(EXTRA_execve_DEPENDENCIES) + @rm -f execve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_OBJECTS) $(execve_LDADD) $(LIBS) + +execve-v$(EXEEXT): $(execve_v_OBJECTS) $(execve_v_DEPENDENCIES) $(EXTRA_execve_v_DEPENDENCIES) + @rm -f execve-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_v_OBJECTS) $(execve_v_LDADD) $(LIBS) + +execveat$(EXEEXT): $(execveat_OBJECTS) $(execveat_DEPENDENCIES) $(EXTRA_execveat_DEPENDENCIES) + @rm -f execveat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_OBJECTS) $(execveat_LDADD) $(LIBS) + +execveat-v$(EXEEXT): $(execveat_v_OBJECTS) $(execveat_v_DEPENDENCIES) $(EXTRA_execveat_v_DEPENDENCIES) + @rm -f execveat-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_v_OBJECTS) $(execveat_v_LDADD) $(LIBS) + +faccessat$(EXEEXT): $(faccessat_OBJECTS) $(faccessat_DEPENDENCIES) $(EXTRA_faccessat_DEPENDENCIES) + @rm -f faccessat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(faccessat_OBJECTS) $(faccessat_LDADD) $(LIBS) + +fadvise64$(EXEEXT): $(fadvise64_OBJECTS) $(fadvise64_DEPENDENCIES) $(EXTRA_fadvise64_DEPENDENCIES) + @rm -f fadvise64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fadvise64_OBJECTS) $(fadvise64_LDADD) $(LIBS) + +fadvise64_64$(EXEEXT): $(fadvise64_64_OBJECTS) $(fadvise64_64_DEPENDENCIES) $(EXTRA_fadvise64_64_DEPENDENCIES) + @rm -f fadvise64_64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fadvise64_64_OBJECTS) $(fadvise64_64_LDADD) $(LIBS) + +fallocate$(EXEEXT): $(fallocate_OBJECTS) $(fallocate_DEPENDENCIES) $(EXTRA_fallocate_DEPENDENCIES) + @rm -f fallocate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fallocate_OBJECTS) $(fallocate_LDADD) $(LIBS) + +fanotify_init$(EXEEXT): $(fanotify_init_OBJECTS) $(fanotify_init_DEPENDENCIES) $(EXTRA_fanotify_init_DEPENDENCIES) + @rm -f fanotify_init$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fanotify_init_OBJECTS) $(fanotify_init_LDADD) $(LIBS) + +fanotify_mark$(EXEEXT): $(fanotify_mark_OBJECTS) $(fanotify_mark_DEPENDENCIES) $(EXTRA_fanotify_mark_DEPENDENCIES) + @rm -f fanotify_mark$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fanotify_mark_OBJECTS) $(fanotify_mark_LDADD) $(LIBS) + +fchdir$(EXEEXT): $(fchdir_OBJECTS) $(fchdir_DEPENDENCIES) $(EXTRA_fchdir_DEPENDENCIES) + @rm -f fchdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchdir_OBJECTS) $(fchdir_LDADD) $(LIBS) + +fchmod$(EXEEXT): $(fchmod_OBJECTS) $(fchmod_DEPENDENCIES) $(EXTRA_fchmod_DEPENDENCIES) + @rm -f fchmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmod_OBJECTS) $(fchmod_LDADD) $(LIBS) + +fchmodat$(EXEEXT): $(fchmodat_OBJECTS) $(fchmodat_DEPENDENCIES) $(EXTRA_fchmodat_DEPENDENCIES) + @rm -f fchmodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmodat_OBJECTS) $(fchmodat_LDADD) $(LIBS) + +fchown$(EXEEXT): $(fchown_OBJECTS) $(fchown_DEPENDENCIES) $(EXTRA_fchown_DEPENDENCIES) + @rm -f fchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown_OBJECTS) $(fchown_LDADD) $(LIBS) + +fchown32$(EXEEXT): $(fchown32_OBJECTS) $(fchown32_DEPENDENCIES) $(EXTRA_fchown32_DEPENDENCIES) + @rm -f fchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown32_OBJECTS) $(fchown32_LDADD) $(LIBS) + +fchownat$(EXEEXT): $(fchownat_OBJECTS) $(fchownat_DEPENDENCIES) $(EXTRA_fchownat_DEPENDENCIES) + @rm -f fchownat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchownat_OBJECTS) $(fchownat_LDADD) $(LIBS) + +fcntl$(EXEEXT): $(fcntl_OBJECTS) $(fcntl_DEPENDENCIES) $(EXTRA_fcntl_DEPENDENCIES) + @rm -f fcntl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcntl_OBJECTS) $(fcntl_LDADD) $(LIBS) + +fcntl64$(EXEEXT): $(fcntl64_OBJECTS) $(fcntl64_DEPENDENCIES) $(EXTRA_fcntl64_DEPENDENCIES) + @rm -f fcntl64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcntl64_OBJECTS) $(fcntl64_LDADD) $(LIBS) + +fdatasync$(EXEEXT): $(fdatasync_OBJECTS) $(fdatasync_DEPENDENCIES) $(EXTRA_fdatasync_DEPENDENCIES) + @rm -f fdatasync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fdatasync_OBJECTS) $(fdatasync_LDADD) $(LIBS) + +file_handle$(EXEEXT): $(file_handle_OBJECTS) $(file_handle_DEPENDENCIES) $(EXTRA_file_handle_DEPENDENCIES) + @rm -f file_handle$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_handle_OBJECTS) $(file_handle_LDADD) $(LIBS) + +file_ioctl$(EXEEXT): $(file_ioctl_OBJECTS) $(file_ioctl_DEPENDENCIES) $(EXTRA_file_ioctl_DEPENDENCIES) + @rm -f file_ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_ioctl_OBJECTS) $(file_ioctl_LDADD) $(LIBS) + +filter-unavailable$(EXEEXT): $(filter_unavailable_OBJECTS) $(filter_unavailable_DEPENDENCIES) $(EXTRA_filter_unavailable_DEPENDENCIES) + @rm -f filter-unavailable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(filter_unavailable_OBJECTS) $(filter_unavailable_LDADD) $(LIBS) + +finit_module$(EXEEXT): $(finit_module_OBJECTS) $(finit_module_DEPENDENCIES) $(EXTRA_finit_module_DEPENDENCIES) + @rm -f finit_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(finit_module_OBJECTS) $(finit_module_LDADD) $(LIBS) + +flock$(EXEEXT): $(flock_OBJECTS) $(flock_DEPENDENCIES) $(EXTRA_flock_DEPENDENCIES) + @rm -f flock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(flock_OBJECTS) $(flock_LDADD) $(LIBS) + +fork-f$(EXEEXT): $(fork_f_OBJECTS) $(fork_f_DEPENDENCIES) $(EXTRA_fork_f_DEPENDENCIES) + @rm -f fork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fork_f_OBJECTS) $(fork_f_LDADD) $(LIBS) + +fstat$(EXEEXT): $(fstat_OBJECTS) $(fstat_DEPENDENCIES) $(EXTRA_fstat_DEPENDENCIES) + @rm -f fstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstat_OBJECTS) $(fstat_LDADD) $(LIBS) + +fstat64$(EXEEXT): $(fstat64_OBJECTS) $(fstat64_DEPENDENCIES) $(EXTRA_fstat64_DEPENDENCIES) + @rm -f fstat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstat64_OBJECTS) $(fstat64_LDADD) $(LIBS) + +fstatat64$(EXEEXT): $(fstatat64_OBJECTS) $(fstatat64_DEPENDENCIES) $(EXTRA_fstatat64_DEPENDENCIES) + @rm -f fstatat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatat64_OBJECTS) $(fstatat64_LDADD) $(LIBS) + +fstatfs$(EXEEXT): $(fstatfs_OBJECTS) $(fstatfs_DEPENDENCIES) $(EXTRA_fstatfs_DEPENDENCIES) + @rm -f fstatfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs_OBJECTS) $(fstatfs_LDADD) $(LIBS) + +fstatfs64$(EXEEXT): $(fstatfs64_OBJECTS) $(fstatfs64_DEPENDENCIES) $(EXTRA_fstatfs64_DEPENDENCIES) + @rm -f fstatfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs64_OBJECTS) $(fstatfs64_LDADD) $(LIBS) + +fsync$(EXEEXT): $(fsync_OBJECTS) $(fsync_DEPENDENCIES) $(EXTRA_fsync_DEPENDENCIES) + @rm -f fsync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fsync_OBJECTS) $(fsync_LDADD) $(LIBS) + +ftruncate$(EXEEXT): $(ftruncate_OBJECTS) $(ftruncate_DEPENDENCIES) $(EXTRA_ftruncate_DEPENDENCIES) + @rm -f ftruncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftruncate_OBJECTS) $(ftruncate_LDADD) $(LIBS) + +ftruncate64$(EXEEXT): $(ftruncate64_OBJECTS) $(ftruncate64_DEPENDENCIES) $(EXTRA_ftruncate64_DEPENDENCIES) + @rm -f ftruncate64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftruncate64_OBJECTS) $(ftruncate64_LDADD) $(LIBS) + +futex$(EXEEXT): $(futex_OBJECTS) $(futex_DEPENDENCIES) $(EXTRA_futex_DEPENDENCIES) + @rm -f futex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futex_OBJECTS) $(futex_LDADD) $(LIBS) + +futimesat$(EXEEXT): $(futimesat_OBJECTS) $(futimesat_DEPENDENCIES) $(EXTRA_futimesat_DEPENDENCIES) + @rm -f futimesat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futimesat_OBJECTS) $(futimesat_LDADD) $(LIBS) + +get_mempolicy$(EXEEXT): $(get_mempolicy_OBJECTS) $(get_mempolicy_DEPENDENCIES) $(EXTRA_get_mempolicy_DEPENDENCIES) + @rm -f get_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(get_mempolicy_OBJECTS) $(get_mempolicy_LDADD) $(LIBS) + +getcpu$(EXEEXT): $(getcpu_OBJECTS) $(getcpu_DEPENDENCIES) $(EXTRA_getcpu_DEPENDENCIES) + @rm -f getcpu$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcpu_OBJECTS) $(getcpu_LDADD) $(LIBS) + +getcwd$(EXEEXT): $(getcwd_OBJECTS) $(getcwd_DEPENDENCIES) $(EXTRA_getcwd_DEPENDENCIES) + @rm -f getcwd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcwd_OBJECTS) $(getcwd_LDADD) $(LIBS) + +getdents$(EXEEXT): $(getdents_OBJECTS) $(getdents_DEPENDENCIES) $(EXTRA_getdents_DEPENDENCIES) + @rm -f getdents$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getdents_OBJECTS) $(getdents_LDADD) $(LIBS) + +getdents64$(EXEEXT): $(getdents64_OBJECTS) $(getdents64_DEPENDENCIES) $(EXTRA_getdents64_DEPENDENCIES) + @rm -f getdents64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getdents64_OBJECTS) $(getdents64_LDADD) $(LIBS) + +getegid$(EXEEXT): $(getegid_OBJECTS) $(getegid_DEPENDENCIES) $(EXTRA_getegid_DEPENDENCIES) + @rm -f getegid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid_OBJECTS) $(getegid_LDADD) $(LIBS) + +getegid32$(EXEEXT): $(getegid32_OBJECTS) $(getegid32_DEPENDENCIES) $(EXTRA_getegid32_DEPENDENCIES) + @rm -f getegid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid32_OBJECTS) $(getegid32_LDADD) $(LIBS) + +geteuid$(EXEEXT): $(geteuid_OBJECTS) $(geteuid_DEPENDENCIES) $(EXTRA_geteuid_DEPENDENCIES) + @rm -f geteuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid_OBJECTS) $(geteuid_LDADD) $(LIBS) + +geteuid32$(EXEEXT): $(geteuid32_OBJECTS) $(geteuid32_DEPENDENCIES) $(EXTRA_geteuid32_DEPENDENCIES) + @rm -f geteuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid32_OBJECTS) $(geteuid32_LDADD) $(LIBS) + +getgid$(EXEEXT): $(getgid_OBJECTS) $(getgid_DEPENDENCIES) $(EXTRA_getgid_DEPENDENCIES) + @rm -f getgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid_OBJECTS) $(getgid_LDADD) $(LIBS) + +getgid32$(EXEEXT): $(getgid32_OBJECTS) $(getgid32_DEPENDENCIES) $(EXTRA_getgid32_DEPENDENCIES) + @rm -f getgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid32_OBJECTS) $(getgid32_LDADD) $(LIBS) + +getgroups$(EXEEXT): $(getgroups_OBJECTS) $(getgroups_DEPENDENCIES) $(EXTRA_getgroups_DEPENDENCIES) + @rm -f getgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups_OBJECTS) $(getgroups_LDADD) $(LIBS) + +getgroups32$(EXEEXT): $(getgroups32_OBJECTS) $(getgroups32_DEPENDENCIES) $(EXTRA_getgroups32_DEPENDENCIES) + @rm -f getgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups32_OBJECTS) $(getgroups32_LDADD) $(LIBS) + +getpeername$(EXEEXT): $(getpeername_OBJECTS) $(getpeername_DEPENDENCIES) $(EXTRA_getpeername_DEPENDENCIES) + @rm -f getpeername$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpeername_OBJECTS) $(getpeername_LDADD) $(LIBS) + +getpgrp$(EXEEXT): $(getpgrp_OBJECTS) $(getpgrp_DEPENDENCIES) $(EXTRA_getpgrp_DEPENDENCIES) + @rm -f getpgrp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpgrp_OBJECTS) $(getpgrp_LDADD) $(LIBS) + +getrandom$(EXEEXT): $(getrandom_OBJECTS) $(getrandom_DEPENDENCIES) $(EXTRA_getrandom_DEPENDENCIES) + @rm -f getrandom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrandom_OBJECTS) $(getrandom_LDADD) $(LIBS) + +getresgid$(EXEEXT): $(getresgid_OBJECTS) $(getresgid_DEPENDENCIES) $(EXTRA_getresgid_DEPENDENCIES) + @rm -f getresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid_OBJECTS) $(getresgid_LDADD) $(LIBS) + +getresgid32$(EXEEXT): $(getresgid32_OBJECTS) $(getresgid32_DEPENDENCIES) $(EXTRA_getresgid32_DEPENDENCIES) + @rm -f getresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid32_OBJECTS) $(getresgid32_LDADD) $(LIBS) + +getresuid$(EXEEXT): $(getresuid_OBJECTS) $(getresuid_DEPENDENCIES) $(EXTRA_getresuid_DEPENDENCIES) + @rm -f getresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid_OBJECTS) $(getresuid_LDADD) $(LIBS) + +getresuid32$(EXEEXT): $(getresuid32_OBJECTS) $(getresuid32_DEPENDENCIES) $(EXTRA_getresuid32_DEPENDENCIES) + @rm -f getresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid32_OBJECTS) $(getresuid32_LDADD) $(LIBS) + +getrlimit$(EXEEXT): $(getrlimit_OBJECTS) $(getrlimit_DEPENDENCIES) $(EXTRA_getrlimit_DEPENDENCIES) + @rm -f getrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrlimit_OBJECTS) $(getrlimit_LDADD) $(LIBS) + +getrusage$(EXEEXT): $(getrusage_OBJECTS) $(getrusage_DEPENDENCIES) $(EXTRA_getrusage_DEPENDENCIES) + @rm -f getrusage$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrusage_OBJECTS) $(getrusage_LDADD) $(LIBS) + +getsid$(EXEEXT): $(getsid_OBJECTS) $(getsid_DEPENDENCIES) $(EXTRA_getsid_DEPENDENCIES) + @rm -f getsid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsid_OBJECTS) $(getsid_LDADD) $(LIBS) + +getsockname$(EXEEXT): $(getsockname_OBJECTS) $(getsockname_DEPENDENCIES) $(EXTRA_getsockname_DEPENDENCIES) + @rm -f getsockname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsockname_OBJECTS) $(getsockname_LDADD) $(LIBS) + +getuid$(EXEEXT): $(getuid_OBJECTS) $(getuid_DEPENDENCIES) $(EXTRA_getuid_DEPENDENCIES) + @rm -f getuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid_OBJECTS) $(getuid_LDADD) $(LIBS) + +getuid32$(EXEEXT): $(getuid32_OBJECTS) $(getuid32_DEPENDENCIES) $(EXTRA_getuid32_DEPENDENCIES) + @rm -f getuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid32_OBJECTS) $(getuid32_LDADD) $(LIBS) + +getxxid$(EXEEXT): $(getxxid_OBJECTS) $(getxxid_DEPENDENCIES) $(EXTRA_getxxid_DEPENDENCIES) + @rm -f getxxid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getxxid_OBJECTS) $(getxxid_LDADD) $(LIBS) + +inet-cmsg$(EXEEXT): $(inet_cmsg_OBJECTS) $(inet_cmsg_DEPENDENCIES) $(EXTRA_inet_cmsg_DEPENDENCIES) + @rm -f inet-cmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inet_cmsg_OBJECTS) $(inet_cmsg_LDADD) $(LIBS) + +init_module$(EXEEXT): $(init_module_OBJECTS) $(init_module_DEPENDENCIES) $(EXTRA_init_module_DEPENDENCIES) + @rm -f init_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(init_module_OBJECTS) $(init_module_LDADD) $(LIBS) + +inotify$(EXEEXT): $(inotify_OBJECTS) $(inotify_DEPENDENCIES) $(EXTRA_inotify_DEPENDENCIES) + @rm -f inotify$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inotify_OBJECTS) $(inotify_LDADD) $(LIBS) + +inotify_init1$(EXEEXT): $(inotify_init1_OBJECTS) $(inotify_init1_DEPENDENCIES) $(EXTRA_inotify_init1_DEPENDENCIES) + @rm -f inotify_init1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inotify_init1_OBJECTS) $(inotify_init1_LDADD) $(LIBS) + +ioctl$(EXEEXT): $(ioctl_OBJECTS) $(ioctl_DEPENDENCIES) $(EXTRA_ioctl_DEPENDENCIES) + @rm -f ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_OBJECTS) $(ioctl_LDADD) $(LIBS) + +ioctl_block$(EXEEXT): $(ioctl_block_OBJECTS) $(ioctl_block_DEPENDENCIES) $(EXTRA_ioctl_block_DEPENDENCIES) + @rm -f ioctl_block$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_block_OBJECTS) $(ioctl_block_LDADD) $(LIBS) + +ioctl_dm$(EXEEXT): $(ioctl_dm_OBJECTS) $(ioctl_dm_DEPENDENCIES) $(EXTRA_ioctl_dm_DEPENDENCIES) + @rm -f ioctl_dm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_dm_OBJECTS) $(ioctl_dm_LDADD) $(LIBS) + +ioctl_dm-v$(EXEEXT): $(ioctl_dm_v_OBJECTS) $(ioctl_dm_v_DEPENDENCIES) $(EXTRA_ioctl_dm_v_DEPENDENCIES) + @rm -f ioctl_dm-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_dm_v_OBJECTS) $(ioctl_dm_v_LDADD) $(LIBS) + +ioctl_evdev$(EXEEXT): $(ioctl_evdev_OBJECTS) $(ioctl_evdev_DEPENDENCIES) $(EXTRA_ioctl_evdev_DEPENDENCIES) + @rm -f ioctl_evdev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_OBJECTS) $(ioctl_evdev_LDADD) $(LIBS) + +ioctl_evdev-v$(EXEEXT): $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_DEPENDENCIES) $(EXTRA_ioctl_evdev_v_DEPENDENCIES) + @rm -f ioctl_evdev-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_LDADD) $(LIBS) + +ioctl_loop$(EXEEXT): $(ioctl_loop_OBJECTS) $(ioctl_loop_DEPENDENCIES) $(EXTRA_ioctl_loop_DEPENDENCIES) + @rm -f ioctl_loop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_OBJECTS) $(ioctl_loop_LDADD) $(LIBS) + +ioctl_loop-nv$(EXEEXT): $(ioctl_loop_nv_OBJECTS) $(ioctl_loop_nv_DEPENDENCIES) $(EXTRA_ioctl_loop_nv_DEPENDENCIES) + @rm -f ioctl_loop-nv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_nv_OBJECTS) $(ioctl_loop_nv_LDADD) $(LIBS) + +ioctl_loop-v$(EXEEXT): $(ioctl_loop_v_OBJECTS) $(ioctl_loop_v_DEPENDENCIES) $(EXTRA_ioctl_loop_v_DEPENDENCIES) + @rm -f ioctl_loop-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_v_OBJECTS) $(ioctl_loop_v_LDADD) $(LIBS) + +ioctl_mtd$(EXEEXT): $(ioctl_mtd_OBJECTS) $(ioctl_mtd_DEPENDENCIES) $(EXTRA_ioctl_mtd_DEPENDENCIES) + @rm -f ioctl_mtd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_mtd_OBJECTS) $(ioctl_mtd_LDADD) $(LIBS) + +ioctl_rtc$(EXEEXT): $(ioctl_rtc_OBJECTS) $(ioctl_rtc_DEPENDENCIES) $(EXTRA_ioctl_rtc_DEPENDENCIES) + @rm -f ioctl_rtc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_OBJECTS) $(ioctl_rtc_LDADD) $(LIBS) + +ioctl_rtc-v$(EXEEXT): $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_DEPENDENCIES) $(EXTRA_ioctl_rtc_v_DEPENDENCIES) + @rm -f ioctl_rtc-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_LDADD) $(LIBS) + +ioctl_scsi$(EXEEXT): $(ioctl_scsi_OBJECTS) $(ioctl_scsi_DEPENDENCIES) $(EXTRA_ioctl_scsi_DEPENDENCIES) + @rm -f ioctl_scsi$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_scsi_OBJECTS) $(ioctl_scsi_LDADD) $(LIBS) + +ioctl_sg_io_v3$(EXEEXT): $(ioctl_sg_io_v3_OBJECTS) $(ioctl_sg_io_v3_DEPENDENCIES) $(EXTRA_ioctl_sg_io_v3_DEPENDENCIES) + @rm -f ioctl_sg_io_v3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sg_io_v3_OBJECTS) $(ioctl_sg_io_v3_LDADD) $(LIBS) + +ioctl_sg_io_v4$(EXEEXT): $(ioctl_sg_io_v4_OBJECTS) $(ioctl_sg_io_v4_DEPENDENCIES) $(EXTRA_ioctl_sg_io_v4_DEPENDENCIES) + @rm -f ioctl_sg_io_v4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sg_io_v4_OBJECTS) $(ioctl_sg_io_v4_LDADD) $(LIBS) + +ioctl_sock_gifconf$(EXEEXT): $(ioctl_sock_gifconf_OBJECTS) $(ioctl_sock_gifconf_DEPENDENCIES) $(EXTRA_ioctl_sock_gifconf_DEPENDENCIES) + @rm -f ioctl_sock_gifconf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sock_gifconf_OBJECTS) $(ioctl_sock_gifconf_LDADD) $(LIBS) + +ioctl_uffdio$(EXEEXT): $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_DEPENDENCIES) $(EXTRA_ioctl_uffdio_DEPENDENCIES) + @rm -f ioctl_uffdio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_LDADD) $(LIBS) + +ioctl_v4l2$(EXEEXT): $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_DEPENDENCIES) $(EXTRA_ioctl_v4l2_DEPENDENCIES) + @rm -f ioctl_v4l2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_LDADD) $(LIBS) + +ioperm$(EXEEXT): $(ioperm_OBJECTS) $(ioperm_DEPENDENCIES) $(EXTRA_ioperm_DEPENDENCIES) + @rm -f ioperm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioperm_OBJECTS) $(ioperm_LDADD) $(LIBS) + +iopl$(EXEEXT): $(iopl_OBJECTS) $(iopl_DEPENDENCIES) $(EXTRA_iopl_DEPENDENCIES) + @rm -f iopl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(iopl_OBJECTS) $(iopl_LDADD) $(LIBS) + +ioprio$(EXEEXT): $(ioprio_OBJECTS) $(ioprio_DEPENDENCIES) $(EXTRA_ioprio_DEPENDENCIES) + @rm -f ioprio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioprio_OBJECTS) $(ioprio_LDADD) $(LIBS) + +ip_mreq$(EXEEXT): $(ip_mreq_OBJECTS) $(ip_mreq_DEPENDENCIES) $(EXTRA_ip_mreq_DEPENDENCIES) + @rm -f ip_mreq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ip_mreq_OBJECTS) $(ip_mreq_LDADD) $(LIBS) + +ipc$(EXEEXT): $(ipc_OBJECTS) $(ipc_DEPENDENCIES) $(EXTRA_ipc_DEPENDENCIES) + @rm -f ipc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_OBJECTS) $(ipc_LDADD) $(LIBS) + +ipc_msg$(EXEEXT): $(ipc_msg_OBJECTS) $(ipc_msg_DEPENDENCIES) $(EXTRA_ipc_msg_DEPENDENCIES) + @rm -f ipc_msg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_msg_OBJECTS) $(ipc_msg_LDADD) $(LIBS) + +ipc_msgbuf$(EXEEXT): $(ipc_msgbuf_OBJECTS) $(ipc_msgbuf_DEPENDENCIES) $(EXTRA_ipc_msgbuf_DEPENDENCIES) + @rm -f ipc_msgbuf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_msgbuf_OBJECTS) $(ipc_msgbuf_LDADD) $(LIBS) + +ipc_sem$(EXEEXT): $(ipc_sem_OBJECTS) $(ipc_sem_DEPENDENCIES) $(EXTRA_ipc_sem_DEPENDENCIES) + @rm -f ipc_sem$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_sem_OBJECTS) $(ipc_sem_LDADD) $(LIBS) + +ipc_shm$(EXEEXT): $(ipc_shm_OBJECTS) $(ipc_shm_DEPENDENCIES) $(EXTRA_ipc_shm_DEPENDENCIES) + @rm -f ipc_shm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_shm_OBJECTS) $(ipc_shm_LDADD) $(LIBS) + +kcmp$(EXEEXT): $(kcmp_OBJECTS) $(kcmp_DEPENDENCIES) $(EXTRA_kcmp_DEPENDENCIES) + @rm -f kcmp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kcmp_OBJECTS) $(kcmp_LDADD) $(LIBS) + +kexec_file_load$(EXEEXT): $(kexec_file_load_OBJECTS) $(kexec_file_load_DEPENDENCIES) $(EXTRA_kexec_file_load_DEPENDENCIES) + @rm -f kexec_file_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kexec_file_load_OBJECTS) $(kexec_file_load_LDADD) $(LIBS) + +kexec_load$(EXEEXT): $(kexec_load_OBJECTS) $(kexec_load_DEPENDENCIES) $(EXTRA_kexec_load_DEPENDENCIES) + @rm -f kexec_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kexec_load_OBJECTS) $(kexec_load_LDADD) $(LIBS) + +keyctl$(EXEEXT): $(keyctl_OBJECTS) $(keyctl_DEPENDENCIES) $(EXTRA_keyctl_DEPENDENCIES) + @rm -f keyctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(keyctl_OBJECTS) $(keyctl_LDADD) $(LIBS) + +kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES) $(EXTRA_kill_DEPENDENCIES) + @rm -f kill$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kill_OBJECTS) $(kill_LDADD) $(LIBS) + +ksysent$(EXEEXT): $(ksysent_OBJECTS) $(ksysent_DEPENDENCIES) $(EXTRA_ksysent_DEPENDENCIES) + @rm -f ksysent$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ksysent_OBJECTS) $(ksysent_LDADD) $(LIBS) + +lchown$(EXEEXT): $(lchown_OBJECTS) $(lchown_DEPENDENCIES) $(EXTRA_lchown_DEPENDENCIES) + @rm -f lchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown_OBJECTS) $(lchown_LDADD) $(LIBS) + +lchown32$(EXEEXT): $(lchown32_OBJECTS) $(lchown32_DEPENDENCIES) $(EXTRA_lchown32_DEPENDENCIES) + @rm -f lchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown32_OBJECTS) $(lchown32_LDADD) $(LIBS) + +link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES) $(EXTRA_link_DEPENDENCIES) + @rm -f link$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(link_OBJECTS) $(link_LDADD) $(LIBS) + +linkat$(EXEEXT): $(linkat_OBJECTS) $(linkat_DEPENDENCIES) $(EXTRA_linkat_DEPENDENCIES) + @rm -f linkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(linkat_OBJECTS) $(linkat_LDADD) $(LIBS) + +llseek$(EXEEXT): $(llseek_OBJECTS) $(llseek_DEPENDENCIES) $(EXTRA_llseek_DEPENDENCIES) + @rm -f llseek$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(llseek_OBJECTS) $(llseek_LDADD) $(LIBS) + +lookup_dcookie$(EXEEXT): $(lookup_dcookie_OBJECTS) $(lookup_dcookie_DEPENDENCIES) $(EXTRA_lookup_dcookie_DEPENDENCIES) + @rm -f lookup_dcookie$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lookup_dcookie_OBJECTS) $(lookup_dcookie_LDADD) $(LIBS) + +lseek$(EXEEXT): $(lseek_OBJECTS) $(lseek_DEPENDENCIES) $(EXTRA_lseek_DEPENDENCIES) + @rm -f lseek$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lseek_OBJECTS) $(lseek_LDADD) $(LIBS) + +lstat$(EXEEXT): $(lstat_OBJECTS) $(lstat_DEPENDENCIES) $(EXTRA_lstat_DEPENDENCIES) + @rm -f lstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lstat_OBJECTS) $(lstat_LDADD) $(LIBS) + +lstat64$(EXEEXT): $(lstat64_OBJECTS) $(lstat64_DEPENDENCIES) $(EXTRA_lstat64_DEPENDENCIES) + @rm -f lstat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lstat64_OBJECTS) $(lstat64_LDADD) $(LIBS) + +mbind$(EXEEXT): $(mbind_OBJECTS) $(mbind_DEPENDENCIES) $(EXTRA_mbind_DEPENDENCIES) + @rm -f mbind$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mbind_OBJECTS) $(mbind_LDADD) $(LIBS) + +membarrier$(EXEEXT): $(membarrier_OBJECTS) $(membarrier_DEPENDENCIES) $(EXTRA_membarrier_DEPENDENCIES) + @rm -f membarrier$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(membarrier_OBJECTS) $(membarrier_LDADD) $(LIBS) + +memfd_create$(EXEEXT): $(memfd_create_OBJECTS) $(memfd_create_DEPENDENCIES) $(EXTRA_memfd_create_DEPENDENCIES) + @rm -f memfd_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(memfd_create_OBJECTS) $(memfd_create_LDADD) $(LIBS) + +migrate_pages$(EXEEXT): $(migrate_pages_OBJECTS) $(migrate_pages_DEPENDENCIES) $(EXTRA_migrate_pages_DEPENDENCIES) + @rm -f migrate_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(migrate_pages_OBJECTS) $(migrate_pages_LDADD) $(LIBS) + +mincore$(EXEEXT): $(mincore_OBJECTS) $(mincore_DEPENDENCIES) $(EXTRA_mincore_DEPENDENCIES) + @rm -f mincore$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mincore_OBJECTS) $(mincore_LDADD) $(LIBS) + +mkdir$(EXEEXT): $(mkdir_OBJECTS) $(mkdir_DEPENDENCIES) $(EXTRA_mkdir_DEPENDENCIES) + @rm -f mkdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdir_OBJECTS) $(mkdir_LDADD) $(LIBS) + +mkdirat$(EXEEXT): $(mkdirat_OBJECTS) $(mkdirat_DEPENDENCIES) $(EXTRA_mkdirat_DEPENDENCIES) + @rm -f mkdirat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdirat_OBJECTS) $(mkdirat_LDADD) $(LIBS) + +mknod$(EXEEXT): $(mknod_OBJECTS) $(mknod_DEPENDENCIES) $(EXTRA_mknod_DEPENDENCIES) + @rm -f mknod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknod_OBJECTS) $(mknod_LDADD) $(LIBS) + +mknodat$(EXEEXT): $(mknodat_OBJECTS) $(mknodat_DEPENDENCIES) $(EXTRA_mknodat_DEPENDENCIES) + @rm -f mknodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknodat_OBJECTS) $(mknodat_LDADD) $(LIBS) + +mlock$(EXEEXT): $(mlock_OBJECTS) $(mlock_DEPENDENCIES) $(EXTRA_mlock_DEPENDENCIES) + @rm -f mlock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock_OBJECTS) $(mlock_LDADD) $(LIBS) + +mlock2$(EXEEXT): $(mlock2_OBJECTS) $(mlock2_DEPENDENCIES) $(EXTRA_mlock2_DEPENDENCIES) + @rm -f mlock2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock2_OBJECTS) $(mlock2_LDADD) $(LIBS) + +mlockall$(EXEEXT): $(mlockall_OBJECTS) $(mlockall_DEPENDENCIES) $(EXTRA_mlockall_DEPENDENCIES) + @rm -f mlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlockall_OBJECTS) $(mlockall_LDADD) $(LIBS) + +mmap$(EXEEXT): $(mmap_OBJECTS) $(mmap_DEPENDENCIES) $(EXTRA_mmap_DEPENDENCIES) + @rm -f mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmap_OBJECTS) $(mmap_LDADD) $(LIBS) + +mmap64$(EXEEXT): $(mmap64_OBJECTS) $(mmap64_DEPENDENCIES) $(EXTRA_mmap64_DEPENDENCIES) + @rm -f mmap64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmap64_OBJECTS) $(mmap64_LDADD) $(LIBS) + +mmsg$(EXEEXT): $(mmsg_OBJECTS) $(mmsg_DEPENDENCIES) $(EXTRA_mmsg_DEPENDENCIES) + @rm -f mmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_OBJECTS) $(mmsg_LDADD) $(LIBS) + +mmsg-silent$(EXEEXT): $(mmsg_silent_OBJECTS) $(mmsg_silent_DEPENDENCIES) $(EXTRA_mmsg_silent_DEPENDENCIES) + @rm -f mmsg-silent$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_silent_OBJECTS) $(mmsg_silent_LDADD) $(LIBS) + +mmsg_name$(EXEEXT): $(mmsg_name_OBJECTS) $(mmsg_name_DEPENDENCIES) $(EXTRA_mmsg_name_DEPENDENCIES) + @rm -f mmsg_name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_name_OBJECTS) $(mmsg_name_LDADD) $(LIBS) + +mmsg_name-v$(EXEEXT): $(mmsg_name_v_OBJECTS) $(mmsg_name_v_DEPENDENCIES) $(EXTRA_mmsg_name_v_DEPENDENCIES) + @rm -f mmsg_name-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_name_v_OBJECTS) $(mmsg_name_v_LDADD) $(LIBS) + +mount$(EXEEXT): $(mount_OBJECTS) $(mount_DEPENDENCIES) $(EXTRA_mount_DEPENDENCIES) + @rm -f mount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mount_OBJECTS) $(mount_LDADD) $(LIBS) + +move_pages$(EXEEXT): $(move_pages_OBJECTS) $(move_pages_DEPENDENCIES) $(EXTRA_move_pages_DEPENDENCIES) + @rm -f move_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(move_pages_OBJECTS) $(move_pages_LDADD) $(LIBS) + +mq$(EXEEXT): $(mq_OBJECTS) $(mq_DEPENDENCIES) $(EXTRA_mq_DEPENDENCIES) + @rm -f mq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_OBJECTS) $(mq_LDADD) $(LIBS) + +mq_sendrecv$(EXEEXT): $(mq_sendrecv_OBJECTS) $(mq_sendrecv_DEPENDENCIES) $(EXTRA_mq_sendrecv_DEPENDENCIES) + @rm -f mq_sendrecv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_OBJECTS) $(mq_sendrecv_LDADD) $(LIBS) + +mq_sendrecv-read$(EXEEXT): $(mq_sendrecv_read_OBJECTS) $(mq_sendrecv_read_DEPENDENCIES) $(EXTRA_mq_sendrecv_read_DEPENDENCIES) + @rm -f mq_sendrecv-read$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_read_OBJECTS) $(mq_sendrecv_read_LDADD) $(LIBS) + +mq_sendrecv-write$(EXEEXT): $(mq_sendrecv_write_OBJECTS) $(mq_sendrecv_write_DEPENDENCIES) $(EXTRA_mq_sendrecv_write_DEPENDENCIES) + @rm -f mq_sendrecv-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_write_OBJECTS) $(mq_sendrecv_write_LDADD) $(LIBS) + +msg_control$(EXEEXT): $(msg_control_OBJECTS) $(msg_control_DEPENDENCIES) $(EXTRA_msg_control_DEPENDENCIES) + @rm -f msg_control$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_control_OBJECTS) $(msg_control_LDADD) $(LIBS) + +msg_control-v$(EXEEXT): $(msg_control_v_OBJECTS) $(msg_control_v_DEPENDENCIES) $(EXTRA_msg_control_v_DEPENDENCIES) + @rm -f msg_control-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_control_v_OBJECTS) $(msg_control_v_LDADD) $(LIBS) + +msg_name$(EXEEXT): $(msg_name_OBJECTS) $(msg_name_DEPENDENCIES) $(EXTRA_msg_name_DEPENDENCIES) + @rm -f msg_name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_name_OBJECTS) $(msg_name_LDADD) $(LIBS) + +munlockall$(EXEEXT): $(munlockall_OBJECTS) $(munlockall_DEPENDENCIES) $(EXTRA_munlockall_DEPENDENCIES) + @rm -f munlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(munlockall_OBJECTS) $(munlockall_LDADD) $(LIBS) + +nanosleep$(EXEEXT): $(nanosleep_OBJECTS) $(nanosleep_DEPENDENCIES) $(EXTRA_nanosleep_DEPENDENCIES) + @rm -f nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nanosleep_OBJECTS) $(nanosleep_LDADD) $(LIBS) + +net-accept-connect$(EXEEXT): $(net_accept_connect_OBJECTS) $(net_accept_connect_DEPENDENCIES) $(EXTRA_net_accept_connect_DEPENDENCIES) + @rm -f net-accept-connect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_accept_connect_OBJECTS) $(net_accept_connect_LDADD) $(LIBS) + +net-icmp_filter$(EXEEXT): $(net_icmp_filter_OBJECTS) $(net_icmp_filter_DEPENDENCIES) $(EXTRA_net_icmp_filter_DEPENDENCIES) + @rm -f net-icmp_filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_icmp_filter_OBJECTS) $(net_icmp_filter_LDADD) $(LIBS) + +net-sockaddr$(EXEEXT): $(net_sockaddr_OBJECTS) $(net_sockaddr_DEPENDENCIES) $(EXTRA_net_sockaddr_DEPENDENCIES) + @rm -f net-sockaddr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_sockaddr_OBJECTS) $(net_sockaddr_LDADD) $(LIBS) + +net-y-unix$(EXEEXT): $(net_y_unix_OBJECTS) $(net_y_unix_DEPENDENCIES) $(EXTRA_net_y_unix_DEPENDENCIES) + @rm -f net-y-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_y_unix_OBJECTS) $(net_y_unix_LDADD) $(LIBS) + +net-yy-inet$(EXEEXT): $(net_yy_inet_OBJECTS) $(net_yy_inet_DEPENDENCIES) $(EXTRA_net_yy_inet_DEPENDENCIES) + @rm -f net-yy-inet$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_inet_OBJECTS) $(net_yy_inet_LDADD) $(LIBS) + +net-yy-netlink$(EXEEXT): $(net_yy_netlink_OBJECTS) $(net_yy_netlink_DEPENDENCIES) $(EXTRA_net_yy_netlink_DEPENDENCIES) + @rm -f net-yy-netlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_netlink_OBJECTS) $(net_yy_netlink_LDADD) $(LIBS) + +net-yy-unix$(EXEEXT): $(net_yy_unix_OBJECTS) $(net_yy_unix_DEPENDENCIES) $(EXTRA_net_yy_unix_DEPENDENCIES) + @rm -f net-yy-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_unix_OBJECTS) $(net_yy_unix_LDADD) $(LIBS) + +netlink_inet_diag$(EXEEXT): $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_DEPENDENCIES) $(EXTRA_netlink_inet_diag_DEPENDENCIES) + @rm -f netlink_inet_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_LDADD) $(LIBS) + +netlink_netlink_diag$(EXEEXT): $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_DEPENDENCIES) $(EXTRA_netlink_netlink_diag_DEPENDENCIES) + @rm -f netlink_netlink_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_LDADD) $(LIBS) + +netlink_protocol$(EXEEXT): $(netlink_protocol_OBJECTS) $(netlink_protocol_DEPENDENCIES) $(EXTRA_netlink_protocol_DEPENDENCIES) + @rm -f netlink_protocol$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_protocol_OBJECTS) $(netlink_protocol_LDADD) $(LIBS) + +netlink_unix_diag$(EXEEXT): $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_DEPENDENCIES) $(EXTRA_netlink_unix_diag_DEPENDENCIES) + @rm -f netlink_unix_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_LDADD) $(LIBS) + +newfstatat$(EXEEXT): $(newfstatat_OBJECTS) $(newfstatat_DEPENDENCIES) $(EXTRA_newfstatat_DEPENDENCIES) + @rm -f newfstatat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(newfstatat_OBJECTS) $(newfstatat_LDADD) $(LIBS) + +nsyscalls$(EXEEXT): $(nsyscalls_OBJECTS) $(nsyscalls_DEPENDENCIES) $(EXTRA_nsyscalls_DEPENDENCIES) + @rm -f nsyscalls$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nsyscalls_OBJECTS) $(nsyscalls_LDADD) $(LIBS) + +old_mmap$(EXEEXT): $(old_mmap_OBJECTS) $(old_mmap_DEPENDENCIES) $(EXTRA_old_mmap_DEPENDENCIES) + @rm -f old_mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(old_mmap_OBJECTS) $(old_mmap_LDADD) $(LIBS) + +oldfstat$(EXEEXT): $(oldfstat_OBJECTS) $(oldfstat_DEPENDENCIES) $(EXTRA_oldfstat_DEPENDENCIES) + @rm -f oldfstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldfstat_OBJECTS) $(oldfstat_LDADD) $(LIBS) + +oldlstat$(EXEEXT): $(oldlstat_OBJECTS) $(oldlstat_DEPENDENCIES) $(EXTRA_oldlstat_DEPENDENCIES) + @rm -f oldlstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldlstat_OBJECTS) $(oldlstat_LDADD) $(LIBS) + +oldselect$(EXEEXT): $(oldselect_OBJECTS) $(oldselect_DEPENDENCIES) $(EXTRA_oldselect_DEPENDENCIES) + @rm -f oldselect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldselect_OBJECTS) $(oldselect_LDADD) $(LIBS) + +oldstat$(EXEEXT): $(oldstat_OBJECTS) $(oldstat_DEPENDENCIES) $(EXTRA_oldstat_DEPENDENCIES) + @rm -f oldstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldstat_OBJECTS) $(oldstat_LDADD) $(LIBS) + +open$(EXEEXT): $(open_OBJECTS) $(open_DEPENDENCIES) $(EXTRA_open_DEPENDENCIES) + @rm -f open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(open_OBJECTS) $(open_LDADD) $(LIBS) + +openat$(EXEEXT): $(openat_OBJECTS) $(openat_DEPENDENCIES) $(EXTRA_openat_DEPENDENCIES) + @rm -f openat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(openat_OBJECTS) $(openat_LDADD) $(LIBS) + +pause$(EXEEXT): $(pause_OBJECTS) $(pause_DEPENDENCIES) $(EXTRA_pause_DEPENDENCIES) + @rm -f pause$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pause_OBJECTS) $(pause_LDADD) $(LIBS) + +pc$(EXEEXT): $(pc_OBJECTS) $(pc_DEPENDENCIES) $(EXTRA_pc_DEPENDENCIES) + @rm -f pc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pc_OBJECTS) $(pc_LDADD) $(LIBS) + +perf_event_open$(EXEEXT): $(perf_event_open_OBJECTS) $(perf_event_open_DEPENDENCIES) $(EXTRA_perf_event_open_DEPENDENCIES) + @rm -f perf_event_open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_OBJECTS) $(perf_event_open_LDADD) $(LIBS) + +perf_event_open_nonverbose$(EXEEXT): $(perf_event_open_nonverbose_OBJECTS) $(perf_event_open_nonverbose_DEPENDENCIES) $(EXTRA_perf_event_open_nonverbose_DEPENDENCIES) + @rm -f perf_event_open_nonverbose$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_nonverbose_OBJECTS) $(perf_event_open_nonverbose_LDADD) $(LIBS) + +perf_event_open_unabbrev$(EXEEXT): $(perf_event_open_unabbrev_OBJECTS) $(perf_event_open_unabbrev_DEPENDENCIES) $(EXTRA_perf_event_open_unabbrev_DEPENDENCIES) + @rm -f perf_event_open_unabbrev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_unabbrev_OBJECTS) $(perf_event_open_unabbrev_LDADD) $(LIBS) + +personality$(EXEEXT): $(personality_OBJECTS) $(personality_DEPENDENCIES) $(EXTRA_personality_DEPENDENCIES) + @rm -f personality$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(personality_OBJECTS) $(personality_LDADD) $(LIBS) + +pipe$(EXEEXT): $(pipe_OBJECTS) $(pipe_DEPENDENCIES) $(EXTRA_pipe_DEPENDENCIES) + @rm -f pipe$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pipe_OBJECTS) $(pipe_LDADD) $(LIBS) + +pipe2$(EXEEXT): $(pipe2_OBJECTS) $(pipe2_DEPENDENCIES) $(EXTRA_pipe2_DEPENDENCIES) + @rm -f pipe2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pipe2_OBJECTS) $(pipe2_LDADD) $(LIBS) + +pkey_alloc$(EXEEXT): $(pkey_alloc_OBJECTS) $(pkey_alloc_DEPENDENCIES) $(EXTRA_pkey_alloc_DEPENDENCIES) + @rm -f pkey_alloc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_alloc_OBJECTS) $(pkey_alloc_LDADD) $(LIBS) + +pkey_free$(EXEEXT): $(pkey_free_OBJECTS) $(pkey_free_DEPENDENCIES) $(EXTRA_pkey_free_DEPENDENCIES) + @rm -f pkey_free$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_free_OBJECTS) $(pkey_free_LDADD) $(LIBS) + +pkey_mprotect$(EXEEXT): $(pkey_mprotect_OBJECTS) $(pkey_mprotect_DEPENDENCIES) $(EXTRA_pkey_mprotect_DEPENDENCIES) + @rm -f pkey_mprotect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_mprotect_OBJECTS) $(pkey_mprotect_LDADD) $(LIBS) + +poll$(EXEEXT): $(poll_OBJECTS) $(poll_DEPENDENCIES) $(EXTRA_poll_DEPENDENCIES) + @rm -f poll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(poll_OBJECTS) $(poll_LDADD) $(LIBS) + +ppoll$(EXEEXT): $(ppoll_OBJECTS) $(ppoll_DEPENDENCIES) $(EXTRA_ppoll_DEPENDENCIES) + @rm -f ppoll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ppoll_OBJECTS) $(ppoll_LDADD) $(LIBS) + +prctl-arg2-intptr$(EXEEXT): $(prctl_arg2_intptr_OBJECTS) $(prctl_arg2_intptr_DEPENDENCIES) $(EXTRA_prctl_arg2_intptr_DEPENDENCIES) + @rm -f prctl-arg2-intptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_arg2_intptr_OBJECTS) $(prctl_arg2_intptr_LDADD) $(LIBS) + +prctl-dumpable$(EXEEXT): $(prctl_dumpable_OBJECTS) $(prctl_dumpable_DEPENDENCIES) $(EXTRA_prctl_dumpable_DEPENDENCIES) + @rm -f prctl-dumpable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_dumpable_OBJECTS) $(prctl_dumpable_LDADD) $(LIBS) + +prctl-name$(EXEEXT): $(prctl_name_OBJECTS) $(prctl_name_DEPENDENCIES) $(EXTRA_prctl_name_DEPENDENCIES) + @rm -f prctl-name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_name_OBJECTS) $(prctl_name_LDADD) $(LIBS) + +prctl-no-args$(EXEEXT): $(prctl_no_args_OBJECTS) $(prctl_no_args_DEPENDENCIES) $(EXTRA_prctl_no_args_DEPENDENCIES) + @rm -f prctl-no-args$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_no_args_OBJECTS) $(prctl_no_args_LDADD) $(LIBS) + +prctl-pdeathsig$(EXEEXT): $(prctl_pdeathsig_OBJECTS) $(prctl_pdeathsig_DEPENDENCIES) $(EXTRA_prctl_pdeathsig_DEPENDENCIES) + @rm -f prctl-pdeathsig$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_pdeathsig_OBJECTS) $(prctl_pdeathsig_LDADD) $(LIBS) + +prctl-seccomp-filter-v$(EXEEXT): $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_DEPENDENCIES) $(EXTRA_prctl_seccomp_filter_v_DEPENDENCIES) + @rm -f prctl-seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_LDADD) $(LIBS) + +prctl-seccomp-strict$(EXEEXT): $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_DEPENDENCIES) $(EXTRA_prctl_seccomp_strict_DEPENDENCIES) + @rm -f prctl-seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_LDADD) $(LIBS) + +prctl-securebits$(EXEEXT): $(prctl_securebits_OBJECTS) $(prctl_securebits_DEPENDENCIES) $(EXTRA_prctl_securebits_DEPENDENCIES) + @rm -f prctl-securebits$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_securebits_OBJECTS) $(prctl_securebits_LDADD) $(LIBS) + +prctl-tid_address$(EXEEXT): $(prctl_tid_address_OBJECTS) $(prctl_tid_address_DEPENDENCIES) $(EXTRA_prctl_tid_address_DEPENDENCIES) + @rm -f prctl-tid_address$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_tid_address_OBJECTS) $(prctl_tid_address_LDADD) $(LIBS) + +prctl-tsc$(EXEEXT): $(prctl_tsc_OBJECTS) $(prctl_tsc_DEPENDENCIES) $(EXTRA_prctl_tsc_DEPENDENCIES) + @rm -f prctl-tsc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_tsc_OBJECTS) $(prctl_tsc_LDADD) $(LIBS) + +pread64-pwrite64$(EXEEXT): $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_DEPENDENCIES) $(EXTRA_pread64_pwrite64_DEPENDENCIES) + @rm -f pread64-pwrite64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_LDADD) $(LIBS) + +preadv$(EXEEXT): $(preadv_OBJECTS) $(preadv_DEPENDENCIES) $(EXTRA_preadv_DEPENDENCIES) + @rm -f preadv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_OBJECTS) $(preadv_LDADD) $(LIBS) + +preadv-pwritev$(EXEEXT): $(preadv_pwritev_OBJECTS) $(preadv_pwritev_DEPENDENCIES) $(EXTRA_preadv_pwritev_DEPENDENCIES) + @rm -f preadv-pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_pwritev_OBJECTS) $(preadv_pwritev_LDADD) $(LIBS) + +preadv2-pwritev2$(EXEEXT): $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_DEPENDENCIES) $(EXTRA_preadv2_pwritev2_DEPENDENCIES) + @rm -f preadv2-pwritev2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_LDADD) $(LIBS) + +print_maxfd$(EXEEXT): $(print_maxfd_OBJECTS) $(print_maxfd_DEPENDENCIES) $(EXTRA_print_maxfd_DEPENDENCIES) + @rm -f print_maxfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(print_maxfd_OBJECTS) $(print_maxfd_LDADD) $(LIBS) + +printstr$(EXEEXT): $(printstr_OBJECTS) $(printstr_DEPENDENCIES) $(EXTRA_printstr_DEPENDENCIES) + @rm -f printstr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(printstr_OBJECTS) $(printstr_LDADD) $(LIBS) + +prlimit64$(EXEEXT): $(prlimit64_OBJECTS) $(prlimit64_DEPENDENCIES) $(EXTRA_prlimit64_DEPENDENCIES) + @rm -f prlimit64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prlimit64_OBJECTS) $(prlimit64_LDADD) $(LIBS) + +process_vm_readv$(EXEEXT): $(process_vm_readv_OBJECTS) $(process_vm_readv_DEPENDENCIES) $(EXTRA_process_vm_readv_DEPENDENCIES) + @rm -f process_vm_readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(process_vm_readv_OBJECTS) $(process_vm_readv_LDADD) $(LIBS) + +process_vm_writev$(EXEEXT): $(process_vm_writev_OBJECTS) $(process_vm_writev_DEPENDENCIES) $(EXTRA_process_vm_writev_DEPENDENCIES) + @rm -f process_vm_writev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(process_vm_writev_OBJECTS) $(process_vm_writev_LDADD) $(LIBS) + +pselect6$(EXEEXT): $(pselect6_OBJECTS) $(pselect6_DEPENDENCIES) $(EXTRA_pselect6_DEPENDENCIES) + @rm -f pselect6$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pselect6_OBJECTS) $(pselect6_LDADD) $(LIBS) + +ptrace$(EXEEXT): $(ptrace_OBJECTS) $(ptrace_DEPENDENCIES) $(EXTRA_ptrace_DEPENDENCIES) + @rm -f ptrace$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ptrace_OBJECTS) $(ptrace_LDADD) $(LIBS) + +pwritev$(EXEEXT): $(pwritev_OBJECTS) $(pwritev_DEPENDENCIES) $(EXTRA_pwritev_DEPENDENCIES) + @rm -f pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pwritev_OBJECTS) $(pwritev_LDADD) $(LIBS) + +qual_fault$(EXEEXT): $(qual_fault_OBJECTS) $(qual_fault_DEPENDENCIES) $(EXTRA_qual_fault_DEPENDENCIES) + @rm -f qual_fault$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_fault_OBJECTS) $(qual_fault_LDADD) $(LIBS) + +qual_inject-error-signal$(EXEEXT): $(qual_inject_error_signal_OBJECTS) $(qual_inject_error_signal_DEPENDENCIES) $(EXTRA_qual_inject_error_signal_DEPENDENCIES) + @rm -f qual_inject-error-signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_error_signal_OBJECTS) $(qual_inject_error_signal_LDADD) $(LIBS) + +qual_inject-retval$(EXEEXT): $(qual_inject_retval_OBJECTS) $(qual_inject_retval_DEPENDENCIES) $(EXTRA_qual_inject_retval_DEPENDENCIES) + @rm -f qual_inject-retval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_retval_OBJECTS) $(qual_inject_retval_LDADD) $(LIBS) + +qual_inject-signal$(EXEEXT): $(qual_inject_signal_OBJECTS) $(qual_inject_signal_DEPENDENCIES) $(EXTRA_qual_inject_signal_DEPENDENCIES) + @rm -f qual_inject-signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_signal_OBJECTS) $(qual_inject_signal_LDADD) $(LIBS) + +qual_signal$(EXEEXT): $(qual_signal_OBJECTS) $(qual_signal_DEPENDENCIES) $(EXTRA_qual_signal_DEPENDENCIES) + @rm -f qual_signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_signal_OBJECTS) $(qual_signal_LDADD) $(LIBS) + +quotactl$(EXEEXT): $(quotactl_OBJECTS) $(quotactl_DEPENDENCIES) $(EXTRA_quotactl_DEPENDENCIES) + @rm -f quotactl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_OBJECTS) $(quotactl_LDADD) $(LIBS) + +quotactl-v$(EXEEXT): $(quotactl_v_OBJECTS) $(quotactl_v_DEPENDENCIES) $(EXTRA_quotactl_v_DEPENDENCIES) + @rm -f quotactl-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_v_OBJECTS) $(quotactl_v_LDADD) $(LIBS) + +quotactl-xfs$(EXEEXT): $(quotactl_xfs_OBJECTS) $(quotactl_xfs_DEPENDENCIES) $(EXTRA_quotactl_xfs_DEPENDENCIES) + @rm -f quotactl-xfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_xfs_OBJECTS) $(quotactl_xfs_LDADD) $(LIBS) + +quotactl-xfs-v$(EXEEXT): $(quotactl_xfs_v_OBJECTS) $(quotactl_xfs_v_DEPENDENCIES) $(EXTRA_quotactl_xfs_v_DEPENDENCIES) + @rm -f quotactl-xfs-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_xfs_v_OBJECTS) $(quotactl_xfs_v_LDADD) $(LIBS) + +read-write$(EXEEXT): $(read_write_OBJECTS) $(read_write_DEPENDENCIES) $(EXTRA_read_write_DEPENDENCIES) + @rm -f read-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(read_write_OBJECTS) $(read_write_LDADD) $(LIBS) + +readahead$(EXEEXT): $(readahead_OBJECTS) $(readahead_DEPENDENCIES) $(EXTRA_readahead_DEPENDENCIES) + @rm -f readahead$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readahead_OBJECTS) $(readahead_LDADD) $(LIBS) + +readdir$(EXEEXT): $(readdir_OBJECTS) $(readdir_DEPENDENCIES) $(EXTRA_readdir_DEPENDENCIES) + @rm -f readdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readdir_OBJECTS) $(readdir_LDADD) $(LIBS) + +readlink$(EXEEXT): $(readlink_OBJECTS) $(readlink_DEPENDENCIES) $(EXTRA_readlink_DEPENDENCIES) + @rm -f readlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readlink_OBJECTS) $(readlink_LDADD) $(LIBS) + +readlinkat$(EXEEXT): $(readlinkat_OBJECTS) $(readlinkat_DEPENDENCIES) $(EXTRA_readlinkat_DEPENDENCIES) + @rm -f readlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readlinkat_OBJECTS) $(readlinkat_LDADD) $(LIBS) + +readv$(EXEEXT): $(readv_OBJECTS) $(readv_DEPENDENCIES) $(EXTRA_readv_DEPENDENCIES) + @rm -f readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readv_OBJECTS) $(readv_LDADD) $(LIBS) + +reboot$(EXEEXT): $(reboot_OBJECTS) $(reboot_DEPENDENCIES) $(EXTRA_reboot_DEPENDENCIES) + @rm -f reboot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(reboot_OBJECTS) $(reboot_LDADD) $(LIBS) + +recvfrom$(EXEEXT): $(recvfrom_OBJECTS) $(recvfrom_DEPENDENCIES) $(EXTRA_recvfrom_DEPENDENCIES) + @rm -f recvfrom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvfrom_OBJECTS) $(recvfrom_LDADD) $(LIBS) + +recvmmsg-timeout$(EXEEXT): $(recvmmsg_timeout_OBJECTS) $(recvmmsg_timeout_DEPENDENCIES) $(EXTRA_recvmmsg_timeout_DEPENDENCIES) + @rm -f recvmmsg-timeout$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmmsg_timeout_OBJECTS) $(recvmmsg_timeout_LDADD) $(LIBS) + +recvmsg$(EXEEXT): $(recvmsg_OBJECTS) $(recvmsg_DEPENDENCIES) $(EXTRA_recvmsg_DEPENDENCIES) + @rm -f recvmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmsg_OBJECTS) $(recvmsg_LDADD) $(LIBS) + +redirect-fds$(EXEEXT): $(redirect_fds_OBJECTS) $(redirect_fds_DEPENDENCIES) $(EXTRA_redirect_fds_DEPENDENCIES) + @rm -f redirect-fds$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(redirect_fds_OBJECTS) $(redirect_fds_LDADD) $(LIBS) + +remap_file_pages$(EXEEXT): $(remap_file_pages_OBJECTS) $(remap_file_pages_DEPENDENCIES) $(EXTRA_remap_file_pages_DEPENDENCIES) + @rm -f remap_file_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(remap_file_pages_OBJECTS) $(remap_file_pages_LDADD) $(LIBS) + +rename$(EXEEXT): $(rename_OBJECTS) $(rename_DEPENDENCIES) $(EXTRA_rename_DEPENDENCIES) + @rm -f rename$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rename_OBJECTS) $(rename_LDADD) $(LIBS) + +renameat$(EXEEXT): $(renameat_OBJECTS) $(renameat_DEPENDENCIES) $(EXTRA_renameat_DEPENDENCIES) + @rm -f renameat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat_OBJECTS) $(renameat_LDADD) $(LIBS) + +renameat2$(EXEEXT): $(renameat2_OBJECTS) $(renameat2_DEPENDENCIES) $(EXTRA_renameat2_DEPENDENCIES) + @rm -f renameat2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat2_OBJECTS) $(renameat2_LDADD) $(LIBS) + +request_key$(EXEEXT): $(request_key_OBJECTS) $(request_key_DEPENDENCIES) $(EXTRA_request_key_DEPENDENCIES) + @rm -f request_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(request_key_OBJECTS) $(request_key_LDADD) $(LIBS) + +restart_syscall$(EXEEXT): $(restart_syscall_OBJECTS) $(restart_syscall_DEPENDENCIES) $(EXTRA_restart_syscall_DEPENDENCIES) + @rm -f restart_syscall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(restart_syscall_OBJECTS) $(restart_syscall_LDADD) $(LIBS) + +rmdir$(EXEEXT): $(rmdir_OBJECTS) $(rmdir_DEPENDENCIES) $(EXTRA_rmdir_DEPENDENCIES) + @rm -f rmdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rmdir_OBJECTS) $(rmdir_LDADD) $(LIBS) + +rt_sigpending$(EXEEXT): $(rt_sigpending_OBJECTS) $(rt_sigpending_DEPENDENCIES) $(EXTRA_rt_sigpending_DEPENDENCIES) + @rm -f rt_sigpending$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigpending_OBJECTS) $(rt_sigpending_LDADD) $(LIBS) + +rt_sigprocmask$(EXEEXT): $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_DEPENDENCIES) $(EXTRA_rt_sigprocmask_DEPENDENCIES) + @rm -f rt_sigprocmask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_LDADD) $(LIBS) + +rt_sigqueueinfo$(EXEEXT): $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_DEPENDENCIES) $(EXTRA_rt_sigqueueinfo_DEPENDENCIES) + @rm -f rt_sigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_LDADD) $(LIBS) + +rt_sigsuspend$(EXEEXT): $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_DEPENDENCIES) $(EXTRA_rt_sigsuspend_DEPENDENCIES) + @rm -f rt_sigsuspend$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_LDADD) $(LIBS) + +rt_sigtimedwait$(EXEEXT): $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_DEPENDENCIES) $(EXTRA_rt_sigtimedwait_DEPENDENCIES) + @rm -f rt_sigtimedwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_LDADD) $(LIBS) + +rt_tgsigqueueinfo$(EXEEXT): $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_DEPENDENCIES) $(EXTRA_rt_tgsigqueueinfo_DEPENDENCIES) + @rm -f rt_tgsigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_LDADD) $(LIBS) + +sched_get_priority_mxx$(EXEEXT): $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_DEPENDENCIES) $(EXTRA_sched_get_priority_mxx_DEPENDENCIES) + @rm -f sched_get_priority_mxx$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_LDADD) $(LIBS) + +sched_rr_get_interval$(EXEEXT): $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_DEPENDENCIES) $(EXTRA_sched_rr_get_interval_DEPENDENCIES) + @rm -f sched_rr_get_interval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_LDADD) $(LIBS) + +sched_xetaffinity$(EXEEXT): $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_DEPENDENCIES) $(EXTRA_sched_xetaffinity_DEPENDENCIES) + @rm -f sched_xetaffinity$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_LDADD) $(LIBS) + +sched_xetattr$(EXEEXT): $(sched_xetattr_OBJECTS) $(sched_xetattr_DEPENDENCIES) $(EXTRA_sched_xetattr_DEPENDENCIES) + @rm -f sched_xetattr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetattr_OBJECTS) $(sched_xetattr_LDADD) $(LIBS) + +sched_xetparam$(EXEEXT): $(sched_xetparam_OBJECTS) $(sched_xetparam_DEPENDENCIES) $(EXTRA_sched_xetparam_DEPENDENCIES) + @rm -f sched_xetparam$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetparam_OBJECTS) $(sched_xetparam_LDADD) $(LIBS) + +sched_xetscheduler$(EXEEXT): $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_DEPENDENCIES) $(EXTRA_sched_xetscheduler_DEPENDENCIES) + @rm -f sched_xetscheduler$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_LDADD) $(LIBS) + +sched_yield$(EXEEXT): $(sched_yield_OBJECTS) $(sched_yield_DEPENDENCIES) $(EXTRA_sched_yield_DEPENDENCIES) + @rm -f sched_yield$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_yield_OBJECTS) $(sched_yield_LDADD) $(LIBS) + +scm_rights$(EXEEXT): $(scm_rights_OBJECTS) $(scm_rights_DEPENDENCIES) $(EXTRA_scm_rights_DEPENDENCIES) + @rm -f scm_rights$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(scm_rights_OBJECTS) $(scm_rights_LDADD) $(LIBS) + +seccomp-filter$(EXEEXT): $(seccomp_filter_OBJECTS) $(seccomp_filter_DEPENDENCIES) $(EXTRA_seccomp_filter_DEPENDENCIES) + @rm -f seccomp-filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_OBJECTS) $(seccomp_filter_LDADD) $(LIBS) + +seccomp-filter-v$(EXEEXT): $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_DEPENDENCIES) $(EXTRA_seccomp_filter_v_DEPENDENCIES) + @rm -f seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_LDADD) $(LIBS) + +seccomp-strict$(EXEEXT): $(seccomp_strict_OBJECTS) $(seccomp_strict_DEPENDENCIES) $(EXTRA_seccomp_strict_DEPENDENCIES) + @rm -f seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_strict_OBJECTS) $(seccomp_strict_LDADD) $(LIBS) + +select$(EXEEXT): $(select_OBJECTS) $(select_DEPENDENCIES) $(EXTRA_select_DEPENDENCIES) + @rm -f select$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(select_OBJECTS) $(select_LDADD) $(LIBS) + +semop$(EXEEXT): $(semop_OBJECTS) $(semop_DEPENDENCIES) $(EXTRA_semop_DEPENDENCIES) + @rm -f semop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(semop_OBJECTS) $(semop_LDADD) $(LIBS) + +sendfile$(EXEEXT): $(sendfile_OBJECTS) $(sendfile_DEPENDENCIES) $(EXTRA_sendfile_DEPENDENCIES) + @rm -f sendfile$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sendfile_OBJECTS) $(sendfile_LDADD) $(LIBS) + +sendfile64$(EXEEXT): $(sendfile64_OBJECTS) $(sendfile64_DEPENDENCIES) $(EXTRA_sendfile64_DEPENDENCIES) + @rm -f sendfile64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sendfile64_OBJECTS) $(sendfile64_LDADD) $(LIBS) + +set_mempolicy$(EXEEXT): $(set_mempolicy_OBJECTS) $(set_mempolicy_DEPENDENCIES) $(EXTRA_set_mempolicy_DEPENDENCIES) + @rm -f set_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_mempolicy_OBJECTS) $(set_mempolicy_LDADD) $(LIBS) + +set_ptracer_any$(EXEEXT): $(set_ptracer_any_OBJECTS) $(set_ptracer_any_DEPENDENCIES) $(EXTRA_set_ptracer_any_DEPENDENCIES) + @rm -f set_ptracer_any$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_ptracer_any_OBJECTS) $(set_ptracer_any_LDADD) $(LIBS) + +setdomainname$(EXEEXT): $(setdomainname_OBJECTS) $(setdomainname_DEPENDENCIES) $(EXTRA_setdomainname_DEPENDENCIES) + @rm -f setdomainname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setdomainname_OBJECTS) $(setdomainname_LDADD) $(LIBS) + +setfsgid$(EXEEXT): $(setfsgid_OBJECTS) $(setfsgid_DEPENDENCIES) $(EXTRA_setfsgid_DEPENDENCIES) + @rm -f setfsgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid_OBJECTS) $(setfsgid_LDADD) $(LIBS) + +setfsgid32$(EXEEXT): $(setfsgid32_OBJECTS) $(setfsgid32_DEPENDENCIES) $(EXTRA_setfsgid32_DEPENDENCIES) + @rm -f setfsgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid32_OBJECTS) $(setfsgid32_LDADD) $(LIBS) + +setfsuid$(EXEEXT): $(setfsuid_OBJECTS) $(setfsuid_DEPENDENCIES) $(EXTRA_setfsuid_DEPENDENCIES) + @rm -f setfsuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid_OBJECTS) $(setfsuid_LDADD) $(LIBS) + +setfsuid32$(EXEEXT): $(setfsuid32_OBJECTS) $(setfsuid32_DEPENDENCIES) $(EXTRA_setfsuid32_DEPENDENCIES) + @rm -f setfsuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid32_OBJECTS) $(setfsuid32_LDADD) $(LIBS) + +setgid$(EXEEXT): $(setgid_OBJECTS) $(setgid_DEPENDENCIES) $(EXTRA_setgid_DEPENDENCIES) + @rm -f setgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid_OBJECTS) $(setgid_LDADD) $(LIBS) + +setgid32$(EXEEXT): $(setgid32_OBJECTS) $(setgid32_DEPENDENCIES) $(EXTRA_setgid32_DEPENDENCIES) + @rm -f setgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid32_OBJECTS) $(setgid32_LDADD) $(LIBS) + +setgroups$(EXEEXT): $(setgroups_OBJECTS) $(setgroups_DEPENDENCIES) $(EXTRA_setgroups_DEPENDENCIES) + @rm -f setgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups_OBJECTS) $(setgroups_LDADD) $(LIBS) + +setgroups32$(EXEEXT): $(setgroups32_OBJECTS) $(setgroups32_DEPENDENCIES) $(EXTRA_setgroups32_DEPENDENCIES) + @rm -f setgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups32_OBJECTS) $(setgroups32_LDADD) $(LIBS) + +sethostname$(EXEEXT): $(sethostname_OBJECTS) $(sethostname_DEPENDENCIES) $(EXTRA_sethostname_DEPENDENCIES) + @rm -f sethostname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sethostname_OBJECTS) $(sethostname_LDADD) $(LIBS) + +setns$(EXEEXT): $(setns_OBJECTS) $(setns_DEPENDENCIES) $(EXTRA_setns_DEPENDENCIES) + @rm -f setns$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setns_OBJECTS) $(setns_LDADD) $(LIBS) + +setregid$(EXEEXT): $(setregid_OBJECTS) $(setregid_DEPENDENCIES) $(EXTRA_setregid_DEPENDENCIES) + @rm -f setregid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid_OBJECTS) $(setregid_LDADD) $(LIBS) + +setregid32$(EXEEXT): $(setregid32_OBJECTS) $(setregid32_DEPENDENCIES) $(EXTRA_setregid32_DEPENDENCIES) + @rm -f setregid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid32_OBJECTS) $(setregid32_LDADD) $(LIBS) + +setresgid$(EXEEXT): $(setresgid_OBJECTS) $(setresgid_DEPENDENCIES) $(EXTRA_setresgid_DEPENDENCIES) + @rm -f setresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid_OBJECTS) $(setresgid_LDADD) $(LIBS) + +setresgid32$(EXEEXT): $(setresgid32_OBJECTS) $(setresgid32_DEPENDENCIES) $(EXTRA_setresgid32_DEPENDENCIES) + @rm -f setresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid32_OBJECTS) $(setresgid32_LDADD) $(LIBS) + +setresuid$(EXEEXT): $(setresuid_OBJECTS) $(setresuid_DEPENDENCIES) $(EXTRA_setresuid_DEPENDENCIES) + @rm -f setresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid_OBJECTS) $(setresuid_LDADD) $(LIBS) + +setresuid32$(EXEEXT): $(setresuid32_OBJECTS) $(setresuid32_DEPENDENCIES) $(EXTRA_setresuid32_DEPENDENCIES) + @rm -f setresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid32_OBJECTS) $(setresuid32_LDADD) $(LIBS) + +setreuid$(EXEEXT): $(setreuid_OBJECTS) $(setreuid_DEPENDENCIES) $(EXTRA_setreuid_DEPENDENCIES) + @rm -f setreuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid_OBJECTS) $(setreuid_LDADD) $(LIBS) + +setreuid32$(EXEEXT): $(setreuid32_OBJECTS) $(setreuid32_DEPENDENCIES) $(EXTRA_setreuid32_DEPENDENCIES) + @rm -f setreuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid32_OBJECTS) $(setreuid32_LDADD) $(LIBS) + +setrlimit$(EXEEXT): $(setrlimit_OBJECTS) $(setrlimit_DEPENDENCIES) $(EXTRA_setrlimit_DEPENDENCIES) + @rm -f setrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setrlimit_OBJECTS) $(setrlimit_LDADD) $(LIBS) + +setuid$(EXEEXT): $(setuid_OBJECTS) $(setuid_DEPENDENCIES) $(EXTRA_setuid_DEPENDENCIES) + @rm -f setuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid_OBJECTS) $(setuid_LDADD) $(LIBS) + +setuid32$(EXEEXT): $(setuid32_OBJECTS) $(setuid32_DEPENDENCIES) $(EXTRA_setuid32_DEPENDENCIES) + @rm -f setuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid32_OBJECTS) $(setuid32_LDADD) $(LIBS) + +shmxt$(EXEEXT): $(shmxt_OBJECTS) $(shmxt_DEPENDENCIES) $(EXTRA_shmxt_DEPENDENCIES) + @rm -f shmxt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shmxt_OBJECTS) $(shmxt_LDADD) $(LIBS) + +shutdown$(EXEEXT): $(shutdown_OBJECTS) $(shutdown_DEPENDENCIES) $(EXTRA_shutdown_DEPENDENCIES) + @rm -f shutdown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shutdown_OBJECTS) $(shutdown_LDADD) $(LIBS) + +sigaction$(EXEEXT): $(sigaction_OBJECTS) $(sigaction_DEPENDENCIES) $(EXTRA_sigaction_DEPENDENCIES) + @rm -f sigaction$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigaction_OBJECTS) $(sigaction_LDADD) $(LIBS) + +sigaltstack$(EXEEXT): $(sigaltstack_OBJECTS) $(sigaltstack_DEPENDENCIES) $(EXTRA_sigaltstack_DEPENDENCIES) + @rm -f sigaltstack$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigaltstack_OBJECTS) $(sigaltstack_LDADD) $(LIBS) + +siginfo$(EXEEXT): $(siginfo_OBJECTS) $(siginfo_DEPENDENCIES) $(EXTRA_siginfo_DEPENDENCIES) + @rm -f siginfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(siginfo_OBJECTS) $(siginfo_LDADD) $(LIBS) + +signal_receive$(EXEEXT): $(signal_receive_OBJECTS) $(signal_receive_DEPENDENCIES) $(EXTRA_signal_receive_DEPENDENCIES) + @rm -f signal_receive$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(signal_receive_OBJECTS) $(signal_receive_LDADD) $(LIBS) + +signalfd4$(EXEEXT): $(signalfd4_OBJECTS) $(signalfd4_DEPENDENCIES) $(EXTRA_signalfd4_DEPENDENCIES) + @rm -f signalfd4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(signalfd4_OBJECTS) $(signalfd4_LDADD) $(LIBS) + +sigreturn$(EXEEXT): $(sigreturn_OBJECTS) $(sigreturn_DEPENDENCIES) $(EXTRA_sigreturn_DEPENDENCIES) + @rm -f sigreturn$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigreturn_OBJECTS) $(sigreturn_LDADD) $(LIBS) + +sleep$(EXEEXT): $(sleep_OBJECTS) $(sleep_DEPENDENCIES) $(EXTRA_sleep_DEPENDENCIES) + @rm -f sleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sleep_OBJECTS) $(sleep_LDADD) $(LIBS) + +socketcall$(EXEEXT): $(socketcall_OBJECTS) $(socketcall_DEPENDENCIES) $(EXTRA_socketcall_DEPENDENCIES) + @rm -f socketcall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(socketcall_OBJECTS) $(socketcall_LDADD) $(LIBS) + +splice$(EXEEXT): $(splice_OBJECTS) $(splice_DEPENDENCIES) $(EXTRA_splice_DEPENDENCIES) + @rm -f splice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(splice_OBJECTS) $(splice_LDADD) $(LIBS) + +stack-fcall$(EXEEXT): $(stack_fcall_OBJECTS) $(stack_fcall_DEPENDENCIES) $(EXTRA_stack_fcall_DEPENDENCIES) + @rm -f stack-fcall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stack_fcall_OBJECTS) $(stack_fcall_LDADD) $(LIBS) + +stat$(EXEEXT): $(stat_OBJECTS) $(stat_DEPENDENCIES) $(EXTRA_stat_DEPENDENCIES) + @rm -f stat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stat_OBJECTS) $(stat_LDADD) $(LIBS) + +stat64$(EXEEXT): $(stat64_OBJECTS) $(stat64_DEPENDENCIES) $(EXTRA_stat64_DEPENDENCIES) + @rm -f stat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stat64_OBJECTS) $(stat64_LDADD) $(LIBS) + +statfs$(EXEEXT): $(statfs_OBJECTS) $(statfs_DEPENDENCIES) $(EXTRA_statfs_DEPENDENCIES) + @rm -f statfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs_OBJECTS) $(statfs_LDADD) $(LIBS) + +statfs64$(EXEEXT): $(statfs64_OBJECTS) $(statfs64_DEPENDENCIES) $(EXTRA_statfs64_DEPENDENCIES) + @rm -f statfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs64_OBJECTS) $(statfs64_LDADD) $(LIBS) + +swap$(EXEEXT): $(swap_OBJECTS) $(swap_DEPENDENCIES) $(EXTRA_swap_DEPENDENCIES) + @rm -f swap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(swap_OBJECTS) $(swap_LDADD) $(LIBS) + +symlink$(EXEEXT): $(symlink_OBJECTS) $(symlink_DEPENDENCIES) $(EXTRA_symlink_DEPENDENCIES) + @rm -f symlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlink_OBJECTS) $(symlink_LDADD) $(LIBS) + +symlinkat$(EXEEXT): $(symlinkat_OBJECTS) $(symlinkat_DEPENDENCIES) $(EXTRA_symlinkat_DEPENDENCIES) + @rm -f symlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlinkat_OBJECTS) $(symlinkat_LDADD) $(LIBS) + +sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES) $(EXTRA_sync_DEPENDENCIES) + @rm -f sync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_OBJECTS) $(sync_LDADD) $(LIBS) + +sync_file_range$(EXEEXT): $(sync_file_range_OBJECTS) $(sync_file_range_DEPENDENCIES) $(EXTRA_sync_file_range_DEPENDENCIES) + @rm -f sync_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range_OBJECTS) $(sync_file_range_LDADD) $(LIBS) + +sync_file_range2$(EXEEXT): $(sync_file_range2_OBJECTS) $(sync_file_range2_DEPENDENCIES) $(EXTRA_sync_file_range2_DEPENDENCIES) + @rm -f sync_file_range2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range2_OBJECTS) $(sync_file_range2_LDADD) $(LIBS) + +sysinfo$(EXEEXT): $(sysinfo_OBJECTS) $(sysinfo_DEPENDENCIES) $(EXTRA_sysinfo_DEPENDENCIES) + @rm -f sysinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sysinfo_OBJECTS) $(sysinfo_LDADD) $(LIBS) + +syslog$(EXEEXT): $(syslog_OBJECTS) $(syslog_DEPENDENCIES) $(EXTRA_syslog_DEPENDENCIES) + @rm -f syslog$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(syslog_OBJECTS) $(syslog_LDADD) $(LIBS) + +tee$(EXEEXT): $(tee_OBJECTS) $(tee_DEPENDENCIES) $(EXTRA_tee_DEPENDENCIES) + @rm -f tee$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tee_OBJECTS) $(tee_LDADD) $(LIBS) + +threads-execve$(EXEEXT): $(threads_execve_OBJECTS) $(threads_execve_DEPENDENCIES) $(EXTRA_threads_execve_DEPENDENCIES) + @rm -f threads-execve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(threads_execve_OBJECTS) $(threads_execve_LDADD) $(LIBS) + +time$(EXEEXT): $(time_OBJECTS) $(time_DEPENDENCIES) $(EXTRA_time_DEPENDENCIES) + @rm -f time$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(time_OBJECTS) $(time_LDADD) $(LIBS) + +timer_create$(EXEEXT): $(timer_create_OBJECTS) $(timer_create_DEPENDENCIES) $(EXTRA_timer_create_DEPENDENCIES) + @rm -f timer_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timer_create_OBJECTS) $(timer_create_LDADD) $(LIBS) + +timer_xettime$(EXEEXT): $(timer_xettime_OBJECTS) $(timer_xettime_DEPENDENCIES) $(EXTRA_timer_xettime_DEPENDENCIES) + @rm -f timer_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timer_xettime_OBJECTS) $(timer_xettime_LDADD) $(LIBS) + +timerfd_xettime$(EXEEXT): $(timerfd_xettime_OBJECTS) $(timerfd_xettime_DEPENDENCIES) $(EXTRA_timerfd_xettime_DEPENDENCIES) + @rm -f timerfd_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timerfd_xettime_OBJECTS) $(timerfd_xettime_LDADD) $(LIBS) + +times$(EXEEXT): $(times_OBJECTS) $(times_DEPENDENCIES) $(EXTRA_times_DEPENDENCIES) + @rm -f times$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(times_OBJECTS) $(times_LDADD) $(LIBS) + +times-fail$(EXEEXT): $(times_fail_OBJECTS) $(times_fail_DEPENDENCIES) $(EXTRA_times_fail_DEPENDENCIES) + @rm -f times-fail$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(times_fail_OBJECTS) $(times_fail_LDADD) $(LIBS) + +truncate$(EXEEXT): $(truncate_OBJECTS) $(truncate_DEPENDENCIES) $(EXTRA_truncate_DEPENDENCIES) + @rm -f truncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(truncate_OBJECTS) $(truncate_LDADD) $(LIBS) + +truncate64$(EXEEXT): $(truncate64_OBJECTS) $(truncate64_DEPENDENCIES) $(EXTRA_truncate64_DEPENDENCIES) + @rm -f truncate64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(truncate64_OBJECTS) $(truncate64_LDADD) $(LIBS) + +ugetrlimit$(EXEEXT): $(ugetrlimit_OBJECTS) $(ugetrlimit_DEPENDENCIES) $(EXTRA_ugetrlimit_DEPENDENCIES) + @rm -f ugetrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ugetrlimit_OBJECTS) $(ugetrlimit_LDADD) $(LIBS) + +uio$(EXEEXT): $(uio_OBJECTS) $(uio_DEPENDENCIES) $(EXTRA_uio_DEPENDENCIES) + @rm -f uio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uio_OBJECTS) $(uio_LDADD) $(LIBS) + +umask$(EXEEXT): $(umask_OBJECTS) $(umask_DEPENDENCIES) $(EXTRA_umask_DEPENDENCIES) + @rm -f umask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umask_OBJECTS) $(umask_LDADD) $(LIBS) + +umount$(EXEEXT): $(umount_OBJECTS) $(umount_DEPENDENCIES) $(EXTRA_umount_DEPENDENCIES) + @rm -f umount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umount_OBJECTS) $(umount_LDADD) $(LIBS) + +umount2$(EXEEXT): $(umount2_OBJECTS) $(umount2_DEPENDENCIES) $(EXTRA_umount2_DEPENDENCIES) + @rm -f umount2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umount2_OBJECTS) $(umount2_LDADD) $(LIBS) + +umoven-illptr$(EXEEXT): $(umoven_illptr_OBJECTS) $(umoven_illptr_DEPENDENCIES) $(EXTRA_umoven_illptr_DEPENDENCIES) + @rm -f umoven-illptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umoven_illptr_OBJECTS) $(umoven_illptr_LDADD) $(LIBS) + +umovestr$(EXEEXT): $(umovestr_OBJECTS) $(umovestr_DEPENDENCIES) $(EXTRA_umovestr_DEPENDENCIES) + @rm -f umovestr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr_OBJECTS) $(umovestr_LDADD) $(LIBS) + +umovestr-illptr$(EXEEXT): $(umovestr_illptr_OBJECTS) $(umovestr_illptr_DEPENDENCIES) $(EXTRA_umovestr_illptr_DEPENDENCIES) + @rm -f umovestr-illptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr_illptr_OBJECTS) $(umovestr_illptr_LDADD) $(LIBS) + +umovestr2$(EXEEXT): $(umovestr2_OBJECTS) $(umovestr2_DEPENDENCIES) $(EXTRA_umovestr2_DEPENDENCIES) + @rm -f umovestr2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr2_OBJECTS) $(umovestr2_LDADD) $(LIBS) + +umovestr3$(EXEEXT): $(umovestr3_OBJECTS) $(umovestr3_DEPENDENCIES) $(EXTRA_umovestr3_DEPENDENCIES) + @rm -f umovestr3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr3_OBJECTS) $(umovestr3_LDADD) $(LIBS) + +uname$(EXEEXT): $(uname_OBJECTS) $(uname_DEPENDENCIES) $(EXTRA_uname_DEPENDENCIES) + @rm -f uname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uname_OBJECTS) $(uname_LDADD) $(LIBS) + +unix-pair-send-recv$(EXEEXT): $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_DEPENDENCIES) $(EXTRA_unix_pair_send_recv_DEPENDENCIES) + @rm -f unix-pair-send-recv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_LDADD) $(LIBS) + +unix-pair-sendto-recvfrom$(EXEEXT): $(unix_pair_sendto_recvfrom_OBJECTS) $(unix_pair_sendto_recvfrom_DEPENDENCIES) $(EXTRA_unix_pair_sendto_recvfrom_DEPENDENCIES) + @rm -f unix-pair-sendto-recvfrom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unix_pair_sendto_recvfrom_OBJECTS) $(unix_pair_sendto_recvfrom_LDADD) $(LIBS) + +unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) $(EXTRA_unlink_DEPENDENCIES) + @rm -f unlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS) + +unlinkat$(EXEEXT): $(unlinkat_OBJECTS) $(unlinkat_DEPENDENCIES) $(EXTRA_unlinkat_DEPENDENCIES) + @rm -f unlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlinkat_OBJECTS) $(unlinkat_LDADD) $(LIBS) + +unshare$(EXEEXT): $(unshare_OBJECTS) $(unshare_DEPENDENCIES) $(EXTRA_unshare_DEPENDENCIES) + @rm -f unshare$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unshare_OBJECTS) $(unshare_LDADD) $(LIBS) + +userfaultfd$(EXEEXT): $(userfaultfd_OBJECTS) $(userfaultfd_DEPENDENCIES) $(EXTRA_userfaultfd_DEPENDENCIES) + @rm -f userfaultfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(userfaultfd_OBJECTS) $(userfaultfd_LDADD) $(LIBS) + +ustat$(EXEEXT): $(ustat_OBJECTS) $(ustat_DEPENDENCIES) $(EXTRA_ustat_DEPENDENCIES) + @rm -f ustat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ustat_OBJECTS) $(ustat_LDADD) $(LIBS) + +utime$(EXEEXT): $(utime_OBJECTS) $(utime_DEPENDENCIES) $(EXTRA_utime_DEPENDENCIES) + @rm -f utime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utime_OBJECTS) $(utime_LDADD) $(LIBS) + +utimensat$(EXEEXT): $(utimensat_OBJECTS) $(utimensat_DEPENDENCIES) $(EXTRA_utimensat_DEPENDENCIES) + @rm -f utimensat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimensat_OBJECTS) $(utimensat_LDADD) $(LIBS) + +utimes$(EXEEXT): $(utimes_OBJECTS) $(utimes_DEPENDENCIES) $(EXTRA_utimes_DEPENDENCIES) + @rm -f utimes$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimes_OBJECTS) $(utimes_LDADD) $(LIBS) + +vfork-f$(EXEEXT): $(vfork_f_OBJECTS) $(vfork_f_DEPENDENCIES) $(EXTRA_vfork_f_DEPENDENCIES) + @rm -f vfork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfork_f_OBJECTS) $(vfork_f_LDADD) $(LIBS) + +vhangup$(EXEEXT): $(vhangup_OBJECTS) $(vhangup_DEPENDENCIES) $(EXTRA_vhangup_DEPENDENCIES) + @rm -f vhangup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vhangup_OBJECTS) $(vhangup_LDADD) $(LIBS) + +vmsplice$(EXEEXT): $(vmsplice_OBJECTS) $(vmsplice_DEPENDENCIES) $(EXTRA_vmsplice_DEPENDENCIES) + @rm -f vmsplice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vmsplice_OBJECTS) $(vmsplice_LDADD) $(LIBS) + +wait4$(EXEEXT): $(wait4_OBJECTS) $(wait4_DEPENDENCIES) $(EXTRA_wait4_DEPENDENCIES) + @rm -f wait4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wait4_OBJECTS) $(wait4_LDADD) $(LIBS) + +wait4-v$(EXEEXT): $(wait4_v_OBJECTS) $(wait4_v_DEPENDENCIES) $(EXTRA_wait4_v_DEPENDENCIES) + @rm -f wait4-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wait4_v_OBJECTS) $(wait4_v_LDADD) $(LIBS) + +waitid$(EXEEXT): $(waitid_OBJECTS) $(waitid_DEPENDENCIES) $(EXTRA_waitid_DEPENDENCIES) + @rm -f waitid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitid_OBJECTS) $(waitid_LDADD) $(LIBS) + +waitid-v$(EXEEXT): $(waitid_v_OBJECTS) $(waitid_v_DEPENDENCIES) $(EXTRA_waitid_v_DEPENDENCIES) + @rm -f waitid-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitid_v_OBJECTS) $(waitid_v_LDADD) $(LIBS) + +waitpid$(EXEEXT): $(waitpid_OBJECTS) $(waitpid_DEPENDENCIES) $(EXTRA_waitpid_DEPENDENCIES) + @rm -f waitpid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitpid_OBJECTS) $(waitpid_LDADD) $(LIBS) + +xattr$(EXEEXT): $(xattr_OBJECTS) $(xattr_DEPENDENCIES) $(EXTRA_xattr_DEPENDENCIES) + @rm -f xattr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xattr_OBJECTS) $(xattr_LDADD) $(LIBS) + +xattr-strings$(EXEEXT): $(xattr_strings_OBJECTS) $(xattr_strings_DEPENDENCIES) $(EXTRA_xattr_strings_DEPENDENCIES) + @rm -f xattr-strings$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xattr_strings_OBJECTS) $(xattr_strings_LDADD) $(LIBS) + +xet_robust_list$(EXEEXT): $(xet_robust_list_OBJECTS) $(xet_robust_list_DEPENDENCIES) $(EXTRA_xet_robust_list_DEPENDENCIES) + @rm -f xet_robust_list$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xet_robust_list_OBJECTS) $(xet_robust_list_LDADD) $(LIBS) + +xetitimer$(EXEEXT): $(xetitimer_OBJECTS) $(xetitimer_DEPENDENCIES) $(EXTRA_xetitimer_DEPENDENCIES) + @rm -f xetitimer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetitimer_OBJECTS) $(xetitimer_LDADD) $(LIBS) + +xetpgid$(EXEEXT): $(xetpgid_OBJECTS) $(xetpgid_DEPENDENCIES) $(EXTRA_xetpgid_DEPENDENCIES) + @rm -f xetpgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpgid_OBJECTS) $(xetpgid_LDADD) $(LIBS) + +xetpriority$(EXEEXT): $(xetpriority_OBJECTS) $(xetpriority_DEPENDENCIES) $(EXTRA_xetpriority_DEPENDENCIES) + @rm -f xetpriority$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpriority_OBJECTS) $(xetpriority_LDADD) $(LIBS) + +xettimeofday$(EXEEXT): $(xettimeofday_OBJECTS) $(xettimeofday_DEPENDENCIES) $(EXTRA_xettimeofday_DEPENDENCIES) + @rm -f xettimeofday$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xettimeofday_OBJECTS) $(xettimeofday_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_newselect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accept.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accept4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/access.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acct.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_key.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alarm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/answer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-f-p-cmd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-f-p.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-p-cmd-cmd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-p-cmd-p.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bpf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/brk.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btrfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caps-abbrev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caps.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chroot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_adjtime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_nanosleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_xettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/creat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delete_module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_create1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_ctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_pwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_wait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erestartsys.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execveat-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execveat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fadvise64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fadvise64_64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fallocate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fanotify_init.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fanotify_mark.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchownat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdatasync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_handle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter-unavailable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/finit_module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fork-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat64-fstat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat64-fstatat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate64-ftruncate64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/futex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/futimesat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_mempolicy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcpu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdents.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdents64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getegid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getegid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geteuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geteuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpeername.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpgrp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrandom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrlimit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrusage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getsid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getsockname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getxxid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet-cmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init_module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inotify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inotify_init1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_block.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_dm-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_dm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_evdev-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_evdev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_loop-nv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_loop-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_loop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_mtd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_rtc-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_rtc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_scsi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_sg_io_v3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_sg_io_v4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_sock_gifconf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_uffdio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_v4l2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioperm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iopl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioprio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip_mreq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_msg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_msgbuf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_sem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_shm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kcmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kexec_file_load.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kexec_load.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kill.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ksysent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-errno2name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-error_msg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-fill_memory.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-get_page_size.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-hexdump_strdup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-hexquote_strndup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-inode_of_sockfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-libmmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-libsocketcall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-overflowuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-pipe_maxfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-print_quoted_string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-printflags.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-printxval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-signal2name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-sprintrc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-tail_alloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-tprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llseek.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup_dcookie.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat64-lstat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbind.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/membarrier.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memfd_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/migrate_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mincore.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdirat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlock2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlockall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap64-mmap64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg-silent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg_name-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg_name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/move_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq_sendrecv-read.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq_sendrecv-write.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq_sendrecv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_control-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_control.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/munlockall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-accept-connect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-icmp_filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-sockaddr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-y-unix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-inet.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-netlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-unix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_inet_diag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_netlink_diag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_protocol.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_unix_diag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newfstatat-newfstatat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsyscalls.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/old_mmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldfstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldlstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldselect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pause.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_event_open.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_event_open_nonverbose.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_event_open_unabbrev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/personality.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkey_alloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkey_free.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkey_mprotect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppoll.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-arg2-intptr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-dumpable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-no-args.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-pdeathsig.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-seccomp-filter-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-seccomp-strict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-securebits.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-tid_address.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-tsc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv-preadv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv2-pwritev2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv_pwritev-preadv-pwritev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_maxfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printstr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prlimit64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process_vm_readv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process_vm_writev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pselect6.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptrace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwritev-pwritev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_fault.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_inject-error-signal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_inject-retval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_inject-signal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_signal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotactl-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotactl-xfs-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotactl-xfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotactl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read-write.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readahead.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reboot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvfrom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvmmsg-timeout.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/redirect-fds.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remap_file_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renameat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renameat2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/request_key.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/restart_syscall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigpending.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigprocmask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigqueueinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigsuspend.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigtimedwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_tgsigqueueinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_get_priority_mxx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_rr_get_interval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetaffinity.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetattr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetparam.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetscheduler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_yield.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scm_rights.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-filter-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-strict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/semop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendfile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendfile64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_mempolicy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_ptracer_any.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setdomainname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgroups32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sethostname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setns.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setregid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setregid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setreuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setreuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setrlimit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shmxt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shutdown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaltstack.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/siginfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal_receive.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signalfd4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigreturn.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socketcall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splice.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-0.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat64-stat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs-statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_file_range2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syslog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tee.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threads-execve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_xettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timerfd_xettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/times-fail.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/times.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate64-truncate64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ugetrlimit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uio-uio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umoven-illptr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr-illptr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix-pair-send-recv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix-pair-sendto-recvfrom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unshare.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userfaultfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ustat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimensat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfork-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vhangup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmsplice.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wait4-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wait4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/waitid-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/waitid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/waitpid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattr-strings.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xet_robust_list.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetitimer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetpgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetpriority.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xettimeofday.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +libtests_a-errno2name.o: errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.o -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c + +libtests_a-errno2name.obj: errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` + +libtests_a-error_msg.o: error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.o -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c + +libtests_a-error_msg.obj: error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.obj -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` + +libtests_a-fill_memory.o: fill_memory.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-fill_memory.o -MD -MP -MF $(DEPDIR)/libtests_a-fill_memory.Tpo -c -o libtests_a-fill_memory.o `test -f 'fill_memory.c' || echo '$(srcdir)/'`fill_memory.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-fill_memory.Tpo $(DEPDIR)/libtests_a-fill_memory.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fill_memory.c' object='libtests_a-fill_memory.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-fill_memory.o `test -f 'fill_memory.c' || echo '$(srcdir)/'`fill_memory.c + +libtests_a-fill_memory.obj: fill_memory.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-fill_memory.obj -MD -MP -MF $(DEPDIR)/libtests_a-fill_memory.Tpo -c -o libtests_a-fill_memory.obj `if test -f 'fill_memory.c'; then $(CYGPATH_W) 'fill_memory.c'; else $(CYGPATH_W) '$(srcdir)/fill_memory.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-fill_memory.Tpo $(DEPDIR)/libtests_a-fill_memory.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fill_memory.c' object='libtests_a-fill_memory.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-fill_memory.obj `if test -f 'fill_memory.c'; then $(CYGPATH_W) 'fill_memory.c'; else $(CYGPATH_W) '$(srcdir)/fill_memory.c'; fi` + +libtests_a-get_page_size.o: get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.o -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c + +libtests_a-get_page_size.obj: get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.obj -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` + +libtests_a-hexdump_strdup.o: hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c + +libtests_a-hexdump_strdup.obj: hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` + +libtests_a-hexquote_strndup.o: hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c + +libtests_a-hexquote_strndup.obj: hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` + +libtests_a-inode_of_sockfd.o: inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.o -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c + +libtests_a-inode_of_sockfd.obj: inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` + +libtests_a-libmmsg.o: libmmsg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libmmsg.o -MD -MP -MF $(DEPDIR)/libtests_a-libmmsg.Tpo -c -o libtests_a-libmmsg.o `test -f 'libmmsg.c' || echo '$(srcdir)/'`libmmsg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libmmsg.Tpo $(DEPDIR)/libtests_a-libmmsg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmmsg.c' object='libtests_a-libmmsg.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libmmsg.o `test -f 'libmmsg.c' || echo '$(srcdir)/'`libmmsg.c + +libtests_a-libmmsg.obj: libmmsg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libmmsg.obj -MD -MP -MF $(DEPDIR)/libtests_a-libmmsg.Tpo -c -o libtests_a-libmmsg.obj `if test -f 'libmmsg.c'; then $(CYGPATH_W) 'libmmsg.c'; else $(CYGPATH_W) '$(srcdir)/libmmsg.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libmmsg.Tpo $(DEPDIR)/libtests_a-libmmsg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmmsg.c' object='libtests_a-libmmsg.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libmmsg.obj `if test -f 'libmmsg.c'; then $(CYGPATH_W) 'libmmsg.c'; else $(CYGPATH_W) '$(srcdir)/libmmsg.c'; fi` + +libtests_a-libsocketcall.o: libsocketcall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libsocketcall.o -MD -MP -MF $(DEPDIR)/libtests_a-libsocketcall.Tpo -c -o libtests_a-libsocketcall.o `test -f 'libsocketcall.c' || echo '$(srcdir)/'`libsocketcall.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libsocketcall.Tpo $(DEPDIR)/libtests_a-libsocketcall.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libsocketcall.c' object='libtests_a-libsocketcall.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libsocketcall.o `test -f 'libsocketcall.c' || echo '$(srcdir)/'`libsocketcall.c + +libtests_a-libsocketcall.obj: libsocketcall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libsocketcall.obj -MD -MP -MF $(DEPDIR)/libtests_a-libsocketcall.Tpo -c -o libtests_a-libsocketcall.obj `if test -f 'libsocketcall.c'; then $(CYGPATH_W) 'libsocketcall.c'; else $(CYGPATH_W) '$(srcdir)/libsocketcall.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libsocketcall.Tpo $(DEPDIR)/libtests_a-libsocketcall.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libsocketcall.c' object='libtests_a-libsocketcall.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libsocketcall.obj `if test -f 'libsocketcall.c'; then $(CYGPATH_W) 'libsocketcall.c'; else $(CYGPATH_W) '$(srcdir)/libsocketcall.c'; fi` + +libtests_a-overflowuid.o: overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.o -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c + +libtests_a-overflowuid.obj: overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.obj -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` + +libtests_a-pipe_maxfd.o: pipe_maxfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-pipe_maxfd.o -MD -MP -MF $(DEPDIR)/libtests_a-pipe_maxfd.Tpo -c -o libtests_a-pipe_maxfd.o `test -f 'pipe_maxfd.c' || echo '$(srcdir)/'`pipe_maxfd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-pipe_maxfd.Tpo $(DEPDIR)/libtests_a-pipe_maxfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipe_maxfd.c' object='libtests_a-pipe_maxfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-pipe_maxfd.o `test -f 'pipe_maxfd.c' || echo '$(srcdir)/'`pipe_maxfd.c + +libtests_a-pipe_maxfd.obj: pipe_maxfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-pipe_maxfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-pipe_maxfd.Tpo -c -o libtests_a-pipe_maxfd.obj `if test -f 'pipe_maxfd.c'; then $(CYGPATH_W) 'pipe_maxfd.c'; else $(CYGPATH_W) '$(srcdir)/pipe_maxfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-pipe_maxfd.Tpo $(DEPDIR)/libtests_a-pipe_maxfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipe_maxfd.c' object='libtests_a-pipe_maxfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-pipe_maxfd.obj `if test -f 'pipe_maxfd.c'; then $(CYGPATH_W) 'pipe_maxfd.c'; else $(CYGPATH_W) '$(srcdir)/pipe_maxfd.c'; fi` + +libtests_a-print_quoted_string.o: print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.o -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c + +libtests_a-print_quoted_string.obj: print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.obj -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` + +libtests_a-printflags.o: printflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.o -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c + +libtests_a-printflags.obj: printflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.obj -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` + +libtests_a-printxval.o: printxval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.o -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c + +libtests_a-printxval.obj: printxval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.obj -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` + +libtests_a-signal2name.o: signal2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-signal2name.o -MD -MP -MF $(DEPDIR)/libtests_a-signal2name.Tpo -c -o libtests_a-signal2name.o `test -f 'signal2name.c' || echo '$(srcdir)/'`signal2name.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-signal2name.Tpo $(DEPDIR)/libtests_a-signal2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signal2name.c' object='libtests_a-signal2name.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-signal2name.o `test -f 'signal2name.c' || echo '$(srcdir)/'`signal2name.c + +libtests_a-signal2name.obj: signal2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-signal2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-signal2name.Tpo -c -o libtests_a-signal2name.obj `if test -f 'signal2name.c'; then $(CYGPATH_W) 'signal2name.c'; else $(CYGPATH_W) '$(srcdir)/signal2name.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-signal2name.Tpo $(DEPDIR)/libtests_a-signal2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signal2name.c' object='libtests_a-signal2name.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-signal2name.obj `if test -f 'signal2name.c'; then $(CYGPATH_W) 'signal2name.c'; else $(CYGPATH_W) '$(srcdir)/signal2name.c'; fi` + +libtests_a-sprintrc.o: sprintrc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-sprintrc.o -MD -MP -MF $(DEPDIR)/libtests_a-sprintrc.Tpo -c -o libtests_a-sprintrc.o `test -f 'sprintrc.c' || echo '$(srcdir)/'`sprintrc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-sprintrc.Tpo $(DEPDIR)/libtests_a-sprintrc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sprintrc.c' object='libtests_a-sprintrc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-sprintrc.o `test -f 'sprintrc.c' || echo '$(srcdir)/'`sprintrc.c + +libtests_a-sprintrc.obj: sprintrc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-sprintrc.obj -MD -MP -MF $(DEPDIR)/libtests_a-sprintrc.Tpo -c -o libtests_a-sprintrc.obj `if test -f 'sprintrc.c'; then $(CYGPATH_W) 'sprintrc.c'; else $(CYGPATH_W) '$(srcdir)/sprintrc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-sprintrc.Tpo $(DEPDIR)/libtests_a-sprintrc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sprintrc.c' object='libtests_a-sprintrc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-sprintrc.obj `if test -f 'sprintrc.c'; then $(CYGPATH_W) 'sprintrc.c'; else $(CYGPATH_W) '$(srcdir)/sprintrc.c'; fi` + +libtests_a-tail_alloc.o: tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.o -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c + +libtests_a-tail_alloc.obj: tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.obj -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` + +libtests_a-tprintf.o: tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.o -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c + +libtests_a-tprintf.obj: tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.obj -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` + +fstat64-fstat64.o: fstat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.o -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstat64.c' object='fstat64-fstat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c + +fstat64-fstat64.obj: fstat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.obj -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.obj `if test -f 'fstat64.c'; then $(CYGPATH_W) 'fstat64.c'; else $(CYGPATH_W) '$(srcdir)/fstat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstat64.c' object='fstat64-fstat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstat64-fstat64.obj `if test -f 'fstat64.c'; then $(CYGPATH_W) 'fstat64.c'; else $(CYGPATH_W) '$(srcdir)/fstat64.c'; fi` + +fstatat64-fstatat64.o: fstatat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstatat64-fstatat64.o -MD -MP -MF $(DEPDIR)/fstatat64-fstatat64.Tpo -c -o fstatat64-fstatat64.o `test -f 'fstatat64.c' || echo '$(srcdir)/'`fstatat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstatat64-fstatat64.Tpo $(DEPDIR)/fstatat64-fstatat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatat64.c' object='fstatat64-fstatat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstatat64-fstatat64.o `test -f 'fstatat64.c' || echo '$(srcdir)/'`fstatat64.c + +fstatat64-fstatat64.obj: fstatat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstatat64-fstatat64.obj -MD -MP -MF $(DEPDIR)/fstatat64-fstatat64.Tpo -c -o fstatat64-fstatat64.obj `if test -f 'fstatat64.c'; then $(CYGPATH_W) 'fstatat64.c'; else $(CYGPATH_W) '$(srcdir)/fstatat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstatat64-fstatat64.Tpo $(DEPDIR)/fstatat64-fstatat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatat64.c' object='fstatat64-fstatat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstatat64-fstatat64.obj `if test -f 'fstatat64.c'; then $(CYGPATH_W) 'fstatat64.c'; else $(CYGPATH_W) '$(srcdir)/fstatat64.c'; fi` + +ftruncate64-ftruncate64.o: ftruncate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftruncate64-ftruncate64.o -MD -MP -MF $(DEPDIR)/ftruncate64-ftruncate64.Tpo -c -o ftruncate64-ftruncate64.o `test -f 'ftruncate64.c' || echo '$(srcdir)/'`ftruncate64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ftruncate64-ftruncate64.Tpo $(DEPDIR)/ftruncate64-ftruncate64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ftruncate64.c' object='ftruncate64-ftruncate64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftruncate64-ftruncate64.o `test -f 'ftruncate64.c' || echo '$(srcdir)/'`ftruncate64.c + +ftruncate64-ftruncate64.obj: ftruncate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftruncate64-ftruncate64.obj -MD -MP -MF $(DEPDIR)/ftruncate64-ftruncate64.Tpo -c -o ftruncate64-ftruncate64.obj `if test -f 'ftruncate64.c'; then $(CYGPATH_W) 'ftruncate64.c'; else $(CYGPATH_W) '$(srcdir)/ftruncate64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ftruncate64-ftruncate64.Tpo $(DEPDIR)/ftruncate64-ftruncate64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ftruncate64.c' object='ftruncate64-ftruncate64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftruncate64-ftruncate64.obj `if test -f 'ftruncate64.c'; then $(CYGPATH_W) 'ftruncate64.c'; else $(CYGPATH_W) '$(srcdir)/ftruncate64.c'; fi` + +lstat64-lstat64.o: lstat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lstat64-lstat64.o -MD -MP -MF $(DEPDIR)/lstat64-lstat64.Tpo -c -o lstat64-lstat64.o `test -f 'lstat64.c' || echo '$(srcdir)/'`lstat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lstat64-lstat64.Tpo $(DEPDIR)/lstat64-lstat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lstat64.c' object='lstat64-lstat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lstat64-lstat64.o `test -f 'lstat64.c' || echo '$(srcdir)/'`lstat64.c + +lstat64-lstat64.obj: lstat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lstat64-lstat64.obj -MD -MP -MF $(DEPDIR)/lstat64-lstat64.Tpo -c -o lstat64-lstat64.obj `if test -f 'lstat64.c'; then $(CYGPATH_W) 'lstat64.c'; else $(CYGPATH_W) '$(srcdir)/lstat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lstat64-lstat64.Tpo $(DEPDIR)/lstat64-lstat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lstat64.c' object='lstat64-lstat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lstat64-lstat64.obj `if test -f 'lstat64.c'; then $(CYGPATH_W) 'lstat64.c'; else $(CYGPATH_W) '$(srcdir)/lstat64.c'; fi` + +mmap64-mmap64.o: mmap64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmap64-mmap64.o -MD -MP -MF $(DEPDIR)/mmap64-mmap64.Tpo -c -o mmap64-mmap64.o `test -f 'mmap64.c' || echo '$(srcdir)/'`mmap64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mmap64-mmap64.Tpo $(DEPDIR)/mmap64-mmap64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mmap64.c' object='mmap64-mmap64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap64-mmap64.o `test -f 'mmap64.c' || echo '$(srcdir)/'`mmap64.c + +mmap64-mmap64.obj: mmap64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmap64-mmap64.obj -MD -MP -MF $(DEPDIR)/mmap64-mmap64.Tpo -c -o mmap64-mmap64.obj `if test -f 'mmap64.c'; then $(CYGPATH_W) 'mmap64.c'; else $(CYGPATH_W) '$(srcdir)/mmap64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mmap64-mmap64.Tpo $(DEPDIR)/mmap64-mmap64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mmap64.c' object='mmap64-mmap64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap64-mmap64.obj `if test -f 'mmap64.c'; then $(CYGPATH_W) 'mmap64.c'; else $(CYGPATH_W) '$(srcdir)/mmap64.c'; fi` + +newfstatat-newfstatat.o: newfstatat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT newfstatat-newfstatat.o -MD -MP -MF $(DEPDIR)/newfstatat-newfstatat.Tpo -c -o newfstatat-newfstatat.o `test -f 'newfstatat.c' || echo '$(srcdir)/'`newfstatat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/newfstatat-newfstatat.Tpo $(DEPDIR)/newfstatat-newfstatat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='newfstatat.c' object='newfstatat-newfstatat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.o `test -f 'newfstatat.c' || echo '$(srcdir)/'`newfstatat.c + +newfstatat-newfstatat.obj: newfstatat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT newfstatat-newfstatat.obj -MD -MP -MF $(DEPDIR)/newfstatat-newfstatat.Tpo -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/newfstatat-newfstatat.Tpo $(DEPDIR)/newfstatat-newfstatat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='newfstatat.c' object='newfstatat-newfstatat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` + +pread64_pwrite64-pread64-pwrite64.o: pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.o -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c + +pread64_pwrite64-pread64-pwrite64.obj: pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.obj -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` + +preadv-preadv.o: preadv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.o -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv.c' object='preadv-preadv.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c + +preadv-preadv.obj: preadv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.obj -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv.c' object='preadv-preadv.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` + +preadv_pwritev-preadv-pwritev.o: preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.o -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c + +preadv_pwritev-preadv-pwritev.obj: preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.obj -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` + +pwritev-pwritev.o: pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.o -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c + +pwritev-pwritev.obj: pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.obj -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` + +stat64-stat64.o: stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.o -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stat64.c' object='stat64-stat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c + +stat64-stat64.obj: stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.obj -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stat64.c' object='stat64-stat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat64-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` + +statfs-statfs.o: statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT statfs-statfs.o -MD -MP -MF $(DEPDIR)/statfs-statfs.Tpo -c -o statfs-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/statfs-statfs.Tpo $(DEPDIR)/statfs-statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='statfs-statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o statfs-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + +statfs-statfs.obj: statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT statfs-statfs.obj -MD -MP -MF $(DEPDIR)/statfs-statfs.Tpo -c -o statfs-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/statfs-statfs.Tpo $(DEPDIR)/statfs-statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='statfs-statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o statfs-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + +truncate64-truncate64.o: truncate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT truncate64-truncate64.o -MD -MP -MF $(DEPDIR)/truncate64-truncate64.Tpo -c -o truncate64-truncate64.o `test -f 'truncate64.c' || echo '$(srcdir)/'`truncate64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/truncate64-truncate64.Tpo $(DEPDIR)/truncate64-truncate64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='truncate64.c' object='truncate64-truncate64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o truncate64-truncate64.o `test -f 'truncate64.c' || echo '$(srcdir)/'`truncate64.c + +truncate64-truncate64.obj: truncate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT truncate64-truncate64.obj -MD -MP -MF $(DEPDIR)/truncate64-truncate64.Tpo -c -o truncate64-truncate64.obj `if test -f 'truncate64.c'; then $(CYGPATH_W) 'truncate64.c'; else $(CYGPATH_W) '$(srcdir)/truncate64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/truncate64-truncate64.Tpo $(DEPDIR)/truncate64-truncate64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='truncate64.c' object='truncate64-truncate64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o truncate64-truncate64.obj `if test -f 'truncate64.c'; then $(CYGPATH_W) 'truncate64.c'; else $(CYGPATH_W) '$(srcdir)/truncate64.c'; fi` + +uio-uio.o: uio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uio-uio.o -MD -MP -MF $(DEPDIR)/uio-uio.Tpo -c -o uio-uio.o `test -f 'uio.c' || echo '$(srcdir)/'`uio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uio-uio.Tpo $(DEPDIR)/uio-uio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uio.c' object='uio-uio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uio-uio.o `test -f 'uio.c' || echo '$(srcdir)/'`uio.c + +uio-uio.obj: uio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uio-uio.obj -MD -MP -MF $(DEPDIR)/uio-uio.Tpo -c -o uio-uio.obj `if test -f 'uio.c'; then $(CYGPATH_W) 'uio.c'; else $(CYGPATH_W) '$(srcdir)/uio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uio-uio.Tpo $(DEPDIR)/uio-uio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uio.c' object='uio-uio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uio-uio.obj `if test -f 'uio.c'; then $(CYGPATH_W) 'uio.c'; else $(CYGPATH_W) '$(srcdir)/uio.c'; fi` +check-valgrind-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_LIBRARIES) $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-am + +check-valgrind-am: check-valgrind-local + +clean: clean-am + +clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am \ + check-valgrind-am check-valgrind-local clean \ + clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am + + +@VALGRIND_CHECK_RULES@ + +ksysent.h: $(srcdir)/ksysent.sed + echo '#include ' | \ + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 + LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 + mv -f $@.t2 $@ + rm -f $@.t1 + +ksysent.$(OBJEXT): ksysent.h +$(objects): scno.h + +syscallent.i: $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h + $(CPP) -P $(SCNO_CPPFLAGS) $^ -o $@ + +scno.h: $(top_srcdir)/scno.head syscallent.i + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + cat $< >> $@-t + LC_ALL=C sed -n '$(SCNO_SED)' $(filter-out $<,$^) >> $@-t + mv $@-t $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests-mx32/_newselect.c b/tests-mx32/_newselect.c new file mode 100644 index 000000000..ae2bc51af --- /dev/null +++ b/tests-mx32/_newselect.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR__newselect + +# define TEST_SYSCALL_NR __NR__newselect +# define TEST_SYSCALL_STR "_newselect" +# include "xselect.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR__newselect") + +#endif diff --git a/tests-mx32/_newselect.test b/tests-mx32/_newselect.test new file mode 100755 index 000000000..3371d4dbc --- /dev/null +++ b/tests-mx32/_newselect.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check _newselect syscall decoding. + +. "${srcdir=.}/select.test" diff --git a/tests-mx32/accept.c b/tests-mx32/accept.c new file mode 100644 index 000000000..8d42ba156 --- /dev/null +++ b/tests-mx32/accept.c @@ -0,0 +1,85 @@ +/* + * Check decoding of accept syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TEST_SYSCALL_NAME +# define TEST_SYSCALL_NAME accept +#endif + +#define TEST_SYSCALL_PREPARE connect_un() +static void connect_un(void); +#include "sockname.c" + +static void +connect_un(void) +{ + int cfd = socket(AF_UNIX, SOCK_STREAM, 0); + if (cfd < 0) + perror_msg_and_skip("socket"); + + struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = TEST_SOCKET ".connect" + }; + + (void) unlink(un.sun_path); + if (bind(cfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + (void) unlink(un.sun_path); + + un.sun_path[sizeof(TEST_SOCKET) - 1] = '\0'; + if (connect(cfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("connect"); +} + +int +main(void) +{ + int lfd = socket(AF_UNIX, SOCK_STREAM, 0); + if (lfd < 0) + perror_msg_and_skip("socket"); + + (void) unlink(TEST_SOCKET); + + const struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = TEST_SOCKET + }; + + if (bind(lfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + if (listen(lfd, 16)) + perror_msg_and_skip("listen"); + + test_sockname_syscall(lfd); + + (void) unlink(TEST_SOCKET); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/accept.test b/tests-mx32/accept.test new file mode 100755 index 000000000..b5e07904d --- /dev/null +++ b/tests-mx32/accept.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of accept syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff --git a/tests-mx32/accept4.c b/tests-mx32/accept4.c new file mode 100644 index 000000000..d26e15c5c --- /dev/null +++ b/tests-mx32/accept4.c @@ -0,0 +1,44 @@ +/* + * Check decoding of accept4 syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined HAVE_ACCEPT4 && defined O_CLOEXEC + +# define TEST_SYSCALL_NAME accept4 +# define SUFFIX_ARGS , O_CLOEXEC +# define SUFFIX_STR ", SOCK_CLOEXEC" +# include "accept.c" + +#else + +SKIP_MAIN_UNDEFINED("HAVE_ACCEPT4 && O_CLOEXEC") + +#endif diff --git a/tests-mx32/accept4.test b/tests-mx32/accept4.test new file mode 100755 index 000000000..722f25a55 --- /dev/null +++ b/tests-mx32/accept4.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of accept4 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a37 diff --git a/tests-mx32/access.c b/tests-mx32/access.c new file mode 100644 index 000000000..e6f169b26 --- /dev/null +++ b/tests-mx32/access.c @@ -0,0 +1,29 @@ +#include "tests.h" +#include + +#ifdef __NR_access + +# include +# include + +int +main(void) +{ + static const char sample[] = "access_sample"; + + long rc = syscall(__NR_access, sample, F_OK); + printf("access(\"%s\", F_OK) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = syscall(__NR_access, sample, R_OK|W_OK|X_OK); + printf("access(\"%s\", R_OK|W_OK|X_OK) = %ld %s (%m)\n", + sample, rc, errno2name()); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_access") + +#endif diff --git a/tests-mx32/access.test b/tests-mx32/access.test new file mode 100755 index 000000000..3ab2eb4ba --- /dev/null +++ b/tests-mx32/access.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check access syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -eaccess -a30 $args > "$EXP" + +# Filter out access() calls made by libc. +grep -F access_sample < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/acct.c b/tests-mx32/acct.c new file mode 100644 index 000000000..1cc3fa56e --- /dev/null +++ b/tests-mx32/acct.c @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_acct + +# include +# include + +int +main(void) +{ + const char sample[] = "acct_sample"; + + long rc = syscall(__NR_acct, sample); + printf("acct(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR__acct") + +#endif diff --git a/tests-mx32/acct.test b/tests-mx32/acct.test new file mode 100755 index 000000000..b9bca7544 --- /dev/null +++ b/tests-mx32/acct.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check acct syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff --git a/tests-mx32/add_key.c b/tests-mx32/add_key.c new file mode 100644 index 000000000..d2696f9bc --- /dev/null +++ b/tests-mx32/add_key.c @@ -0,0 +1,153 @@ +/* + * Check decoding of add_key syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_add_key + +# include +# include +# include + +void +print_val_str(const void *ptr, const char *str) +{ + if (str) + printf("%s, ", str); + else + printf("%p, ", ptr); +} + +void +do_add_key(const char *type, const char *type_str, const char *desc, + const char *desc_str, const char *payload, const char *payload_str, + size_t plen, int32_t keyring, const char *keyring_str) +{ + long rc = syscall(__NR_add_key, type, desc, payload, plen, keyring); + const char *errstr = sprintrc(rc); + printf("add_key("); + print_val_str(type, type_str); + print_val_str(desc, desc_str); + print_val_str(payload, payload_str); + printf("%zu, ", plen); + if (keyring_str) + printf("%s", keyring_str); + else + printf("%d", keyring); + printf(") = %s\n", errstr); +} + +int +main(void) +{ + static const char unterminated1[] = { '\1', '\2', '\3', '\4', '\5' }; + static const char unterminated2[] = { '\6', '\7', '\10', '\11', '\12' }; + static const char unterminated3[] = + { '\16', '\17', '\20', '\21', '\22' }; + + char *bogus_type = tail_memdup(unterminated1, sizeof(unterminated1)); + char *bogus_desc = tail_memdup(unterminated2, sizeof(unterminated2)); + char *bogus_payload = tail_memdup(unterminated3, sizeof(unterminated3)); + + unsigned i; + unsigned j; + unsigned k; + unsigned l; + + struct { + const char *type; + const char *str; + } types[] = { + { ARG_STR(NULL) }, + { bogus_type + sizeof(unterminated1), NULL }, + { bogus_type, NULL }, + { ARG_STR("\20\21\22\23\24") }, + { ARG_STR("user") }, + }; + + struct { + const char *desc; + const char *str; + } descs[] = { + { ARG_STR(NULL) }, + { bogus_desc + sizeof(unterminated2), NULL }, + { bogus_desc, NULL }, + { ARG_STR("\25\26\27\30\31") }, + { ARG_STR("desc") }, + { "overly long description", _STR("overly long ") "..." }, + }; + + struct { + const char *pload; + const char *str; + size_t plen; + } payloads[] = { + { ARG_STR(NULL), 0 }, + { bogus_payload + sizeof(unterminated3), NULL, + (size_t) 0xdeadbeefbadc0dedULL }, + { bogus_payload, _STR(""), 0 }, + { bogus_payload, _STR("\16\17\20\21\22"), 5 }, + { bogus_payload, NULL, 10 }, + { "overly long payload", _STR("overly long ") "...", 15 }, + }; + + struct { + uint32_t keyring; + const char *str; + } keyrings[] = { + { ARG_STR(0) }, + { ARG_STR(1234567890) }, + { ARG_STR(-1234567890) }, + { -1, "KEY_SPEC_THREAD_KEYRING" }, + }; + + for (i = 0; i < ARRAY_SIZE(types); i++) + for (j = 0; j < ARRAY_SIZE(descs); j++) + for (k = 0; k < ARRAY_SIZE(payloads); k++) + for (l = 0; l < ARRAY_SIZE(keyrings); l++) + do_add_key(types[i].type, types[i].str, + descs[j].desc, descs[j].str, + payloads[k].pload, + payloads[k].str, + payloads[k].plen, + keyrings[l].keyring, + keyrings[l].str); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_add_key"); + +#endif diff --git a/tests-mx32/add_key.test b/tests-mx32/add_key.test new file mode 100755 index 000000000..eadd8c2b8 --- /dev/null +++ b/tests-mx32/add_key.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of add_key syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a30 -s12 diff --git a/tests-mx32/adjtimex.c b/tests-mx32/adjtimex.c new file mode 100644 index 000000000..1638b5356 --- /dev/null +++ b/tests-mx32/adjtimex.c @@ -0,0 +1,83 @@ +/* + * This file is part of adjtimex strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +int +main(void) +{ + adjtimex(NULL); + printf("adjtimex\\(NULL\\) = -1 EFAULT \\(%m\\)\n"); + + struct timex * const tx = tail_alloc(sizeof(*tx)); + memset(tx, 0, sizeof(*tx)); + + int state = adjtimex(tx); + if (state < 0) + perror_msg_and_skip("adjtimex"); + + printf("adjtimex\\(\\{modes=0, offset=%jd, freq=%jd, maxerror=%jd" + ", esterror=%jd, status=%s, constant=%jd, precision=%jd" + ", tolerance=%jd, time=\\{tv_sec=%jd, tv_usec=%jd\\}, tick=%jd, " + "ppsfreq=%jd, jitter=%jd, shift=%d, stabil=%jd, jitcnt=%jd, " + "calcnt=%jd, errcnt=%jd, stbcnt=%jd" +#ifdef HAVE_STRUCT_TIMEX_TAI + ", tai=%d" +#endif + "\\}\\) = %d \\(TIME_[A-Z]+\\)\n", + (intmax_t) tx->offset, + (intmax_t) tx->freq, + (intmax_t) tx->maxerror, + (intmax_t) tx->esterror, + tx->status ? "STA_[A-Z]+(\\|STA_[A-Z]+)*" : "0", + (intmax_t) tx->constant, + (intmax_t) tx->precision, + (intmax_t) tx->tolerance, + (intmax_t) tx->time.tv_sec, + (intmax_t) tx->time.tv_usec, + (intmax_t) tx->tick, + (intmax_t) tx->ppsfreq, + (intmax_t) tx->jitter, + tx->shift, + (intmax_t) tx->stabil, + (intmax_t) tx->jitcnt, + (intmax_t) tx->calcnt, + (intmax_t) tx->errcnt, + (intmax_t) tx->stbcnt, +#ifdef HAVE_STRUCT_TIMEX_TAI + tx->tai, +#endif + state); + + return 0; +} diff --git a/tests-mx32/adjtimex.test b/tests-mx32/adjtimex.test new file mode 100755 index 000000000..014055011 --- /dev/null +++ b/tests-mx32/adjtimex.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check adjtimex syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a 15 -e adjtimex $args > "$OUT" +match_grep "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests-mx32/aio.c b/tests-mx32/aio.c new file mode 100644 index 000000000..0766d23a7 --- /dev/null +++ b/tests-mx32/aio.c @@ -0,0 +1,368 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +#if defined __NR_io_setup \ + && defined __NR_io_submit \ + && defined __NR_io_getevents \ + && defined __NR_io_cancel \ + && defined __NR_io_destroy +# include + +int +main(void) +{ + static const long bogus_ctx = + (long) 0xface1e55deadbeefLL; + + static const char data2[] = + "\0\1\2\3cat test test test 0123456789abcdef"; + + const unsigned int sizeof_data0 = 4096; + const unsigned int sizeof_data1 = 8192; + void *data0 = tail_alloc(sizeof_data0); + void *data1 = tail_alloc(sizeof_data1); + + const struct iocb proto_cb[] = { + { + .aio_data = (unsigned long) 0xfeedface11111111ULL, + .aio_reqprio = 11, + .aio_buf = (unsigned long) data0, + .aio_offset = (unsigned long) 0xdeface1facefeedULL, + .aio_nbytes = sizeof_data0 + }, + { + .aio_data = (unsigned long) 0xfeedface22222222ULL, + .aio_reqprio = 22, + .aio_buf = (unsigned long) data1, + .aio_offset = (unsigned long) 0xdeface2cafef00dULL, + .aio_nbytes = sizeof_data1 + } + }; + const struct iocb *cb = tail_memdup(proto_cb, sizeof(proto_cb)); + + const struct iovec proto_iov0[] = { + { + .iov_base = data0, + .iov_len = sizeof_data0 / 4 + }, + { + .iov_base = data0 + sizeof_data0 / 4, + .iov_len = sizeof_data0 / 4 * 3 + }, + }; + const struct iovec *iov0 = tail_memdup(proto_iov0, sizeof(proto_iov0)); + + const struct iovec proto_iov1[] = { + { + .iov_base = data1, + .iov_len = sizeof_data1 / 4 + }, + { + .iov_base = data1 + sizeof_data1 / 4, + .iov_len = sizeof_data1 / 4 * 3 + }, + }; + const struct iovec *iov1 = tail_memdup(proto_iov1, sizeof(proto_iov1)); + + const struct iocb proto_cbv[] = { + { + .aio_data = (unsigned long) 0xfeed11111111faceULL, + .aio_lio_opcode = 7, + .aio_reqprio = 111, + .aio_buf = (unsigned long) iov0, + .aio_offset = (unsigned long) 0xdeface1facefeedULL, + .aio_nbytes = ARRAY_SIZE(proto_iov0) + }, + { + .aio_data = (unsigned long) 0xfeed22222222faceULL, + .aio_lio_opcode = 7, + .aio_reqprio = 222, + .aio_buf = (unsigned long) iov1, + .aio_offset = (unsigned long) 0xdeface2cafef00dULL, + .aio_nbytes = ARRAY_SIZE(proto_iov1) + } + }; + const struct iocb *cbv = tail_memdup(proto_cbv, sizeof(proto_cbv)); + + /* For additional decoder testing */ + const struct iocb proto_cbv2[] = { + { + .aio_data = 0xbadfacedc0ffeeedULL, + .aio_key = 0xdefaced0, + .aio_lio_opcode = 0xf00d, + .aio_reqprio = 0, + .aio_fildes = 0xdefaced1, + .aio_buf = 0, + }, + { + .aio_data = 0, + .aio_key = 0xdefaced0, + .aio_lio_opcode = 1, + .aio_reqprio = 0xbeef, + .aio_fildes = 0xdefaced1, + .aio_buf = 0, + /* In order to make record valid */ + .aio_nbytes = (size_t) 0x1020304050607080ULL, + .aio_offset = 0xdeadda7abadc0dedULL, +# ifdef IOCB_FLAG_RESFD + .aio_flags = 0xfacef157, + .aio_resfd = 0xded1ca7e, +# endif + }, + { + .aio_data = 0, + .aio_key = 0xdefaced0, + .aio_lio_opcode = 1, + .aio_reqprio = 0xbeef, + .aio_fildes = 0xdefaced1, + .aio_buf = 0xbadc0ffeedefacedULL, + .aio_nbytes = 0x8090a0b0c0d0e0f0ULL, + .aio_offset = 0xdeadda7abadc0dedULL, + }, + { + .aio_data = 0, + .aio_key = 0xdefaced0, + .aio_lio_opcode = 1, + .aio_reqprio = 0xbeef, + .aio_fildes = 0xdefaced1, + .aio_buf = (unsigned long)data2, + .aio_nbytes = sizeof(data2), + .aio_offset = 0xdeadda7abadc0dedULL, + }, + { + .aio_data = 0, + .aio_key = 0xdefaced0, + .aio_lio_opcode = 8, + .aio_reqprio = 0xbeef, + .aio_fildes = 0xdefaced1, + .aio_buf = 0, + .aio_nbytes = 0x8090a0b0c0d0e0f0ULL, + .aio_offset = 0xdeadda7abadc0dedULL, + }, + }; + const struct iocb *cbv2 = tail_memdup(proto_cbv2, sizeof(proto_cbv2)); + + const struct iocb proto_cbc = { + .aio_data = (unsigned long) 0xdeadbeefbadc0dedULL, + .aio_reqprio = 99, + .aio_fildes = -42 + }; + const struct iocb *cbc = tail_memdup(&proto_cbc, sizeof(proto_cbc)); + + const long proto_cbs[] = { + (long) &cb[0], (long) &cb[1] + }; + const long *cbs = tail_memdup(proto_cbs, sizeof(proto_cbs)); + + const long proto_cbvs[] = { + (long) &cbv[0], (long) &cbv[1], + }; + const long *cbvs = tail_memdup(proto_cbvs, sizeof(proto_cbvs)); + + const long proto_cbvs2[] = { + (long) &cbv2[0], (long) &cbv2[1], (long) &cbv2[2], + (long) &cbv2[3], (long) &cbv2[4], + (long) NULL, (long) 0xffffffffffffffffLL, + }; + const long *cbvs2 = tail_memdup(proto_cbvs2, sizeof(proto_cbvs2)); + + unsigned long *ctx = tail_alloc(sizeof(unsigned long)); + *ctx = 0; + + const unsigned int nr = ARRAY_SIZE(proto_cb); + const unsigned long lnr = (unsigned long) (0xdeadbeef00000000ULL | nr); + + const struct io_event *ev = tail_alloc(nr * sizeof(struct io_event)); + const struct timespec proto_ts = { .tv_nsec = 123456789 }; + const struct timespec *ts = tail_memdup(&proto_ts, sizeof(proto_ts)); + + (void) close(0); + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_skip("open: %s", "/dev/zero"); + + long rc = syscall(__NR_io_setup, 0xdeadbeef, NULL); + printf("io_setup(%u, NULL) = %s\n", 0xdeadbeef, sprintrc(rc)); + + rc = syscall(__NR_io_setup, lnr, ctx + 1); + printf("io_setup(%u, %p) = %s\n", nr, ctx + 1, sprintrc(rc)); + + if (syscall(__NR_io_setup, lnr, ctx)) + perror_msg_and_skip("io_setup"); + printf("io_setup(%u, [%#lx]) = 0\n", nr, *ctx); + + rc = syscall(__NR_io_submit, bogus_ctx, (long) 0xca7faceddeadf00dLL, + NULL); + printf("io_submit(%#lx, %ld, NULL) = %s\n", + bogus_ctx, (long) 0xca7faceddeadf00dLL, sprintrc(rc)); + + rc = syscall(__NR_io_submit, *ctx, nr, cbs + nr); + printf("io_submit(%#lx, %ld, %p) = %s\n", + *ctx, (long) nr, cbs + nr, sprintrc(rc)); + + rc = syscall(__NR_io_submit, *ctx, -1L, cbs); + printf("io_submit(%#lx, -1, %p) = %s\n", + *ctx, cbs, sprintrc(rc)); + + rc = syscall(__NR_io_submit, *ctx, nr, cbs); + if (rc != (long) nr) + perror_msg_and_skip("io_submit"); + printf("io_submit(%#lx, %u, [" + "{data=%#" PRI__x64 ", pread, reqprio=11, fildes=0, " + "buf=%p, nbytes=%u, offset=%" PRI__d64 "}, " + "{data=%#" PRI__x64 ", pread, reqprio=22, fildes=0, " + "buf=%p, nbytes=%u, offset=%" PRI__d64 "}" + "]) = %s\n", + *ctx, nr, + cb[0].aio_data, data0, sizeof_data0, cb[0].aio_offset, + cb[1].aio_data, data1, sizeof_data1, cb[1].aio_offset, + sprintrc(rc)); + + rc = syscall(__NR_io_getevents, bogus_ctx, + (long) 0xca7faceddeadf00dLL, (long) 0xba5e1e505ca571e0LL, + ev + 1, NULL); + printf("io_getevents(%#lx, %ld, %ld, %p, NULL) = %s\n", + bogus_ctx, (long) 0xca7faceddeadf00dLL, + (long) 0xba5e1e505ca571e0LL, ev + 1, sprintrc(rc)); + + rc = syscall(__NR_io_getevents, bogus_ctx, + (long) 0xca7faceddeadf00dLL, (long) 0xba5e1e505ca571e0LL, + NULL, ts + 1); + printf("io_getevents(%#lx, %ld, %ld, NULL, %p) = %s\n", + bogus_ctx, (long) 0xca7faceddeadf00dLL, + (long) 0xba5e1e505ca571e0LL, ts + 1, sprintrc(rc)); + + rc = syscall(__NR_io_getevents, *ctx, nr, nr + 1, ev, ts); + printf("io_getevents(%#lx, %ld, %ld, [" + "{data=%#" PRI__x64 ", obj=%p, res=%u, res2=0}, " + "{data=%#" PRI__x64 ", obj=%p, res=%u, res2=0}" + "], {tv_sec=0, tv_nsec=123456789}) = %s\n", + *ctx, (long) nr, (long) (nr + 1), + cb[0].aio_data, &cb[0], sizeof_data0, + cb[1].aio_data, &cb[1], sizeof_data1, + sprintrc(rc)); + + rc = syscall(__NR_io_cancel, bogus_ctx, NULL, NULL); + printf("io_cancel(%#lx, NULL, NULL) = %s\n", bogus_ctx, sprintrc(rc)); + + rc = syscall(__NR_io_cancel, *ctx, cbc + 1, ev); + printf("io_cancel(%#lx, %p, %p) = %s\n", *ctx, cbc + 1, ev, + sprintrc(rc)); + + rc = syscall(__NR_io_cancel, *ctx, cbc, ev); + printf("io_cancel(%#lx, {data=%#" PRI__x64 + ", pread, reqprio=99, fildes=-42}, %p) = %s\n", + *ctx, cbc->aio_data, ev, sprintrc(rc)); + + rc = syscall(__NR_io_submit, (unsigned long) 0xfacef157beeff00dULL, + (long) 0xdeadc0defacefeedLL, NULL); + printf("io_submit(%#lx, %ld, NULL) = %s\n", + (long) 0xfacef157beeff00dULL, + (long) 0xdeadc0defacefeedLL, sprintrc(rc)); + + rc = syscall(__NR_io_submit, *ctx, -1L, cbvs + nr); + printf("io_submit(%#lx, %ld, %p) = %s\n", + *ctx, -1L, cbvs + nr, sprintrc(rc)); + + rc = syscall(__NR_io_submit, *ctx, 1057L, cbvs2); + printf("io_submit(%#lx, %ld, [" + "{data=%#" PRI__x64 ", key=%u, %hu /* SUB_??? */, fildes=%d}, " + "{key=%u, pwrite, reqprio=%hd, fildes=%d, str=NULL" + ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 +# ifdef IOCB_FLAG_RESFD + ", resfd=%d, flags=%#x" +# endif + "}, " + "{key=%u, pwrite, reqprio=%hd, fildes=%d, buf=%#" PRI__x64 + ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 "}, " + "{key=%u, pwrite, reqprio=%hd, fildes=%d" + ", str=\"\\0\\1\\2\\3%.28s\"..." + ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 "}, " + "{key=%u, pwritev, reqprio=%hd, fildes=%d, buf=%#" PRI__x64 + ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 "}" + ", {NULL}, {%#lx}, %p]) = %s\n", + *ctx, 1057L, + cbv2[0].aio_data, cbv2[0].aio_key, + cbv2[0].aio_lio_opcode, cbv2[0].aio_fildes, + cbv2[1].aio_key, cbv2[1].aio_reqprio, cbv2[1].aio_fildes, + cbv2[1].aio_nbytes, cbv2[1].aio_offset, +# ifdef IOCB_FLAG_RESFD + cbv2[1].aio_resfd, cbv2[1].aio_flags, +# endif + cbv2[2].aio_key, cbv2[2].aio_reqprio, cbv2[2].aio_fildes, + cbv2[2].aio_buf, cbv2[2].aio_nbytes, cbv2[2].aio_offset, + cbv2[3].aio_key, cbv2[3].aio_reqprio, cbv2[3].aio_fildes, + data2 + 4, cbv2[3].aio_nbytes, cbv2[3].aio_offset, + cbv2[4].aio_key, cbv2[4].aio_reqprio, cbv2[4].aio_fildes, + cbv2[4].aio_buf, cbv2[4].aio_nbytes, cbv2[4].aio_offset, + cbvs2[6], cbvs2 + 7, sprintrc(rc)); + + rc = syscall(__NR_io_submit, *ctx, nr, cbvs); + if (rc != (long) nr) + perror_msg_and_skip("io_submit"); + printf("io_submit(%#lx, %u, [" + "{data=%#" PRI__x64 ", preadv, reqprio=%hd, fildes=0, " + "iovec=[{iov_base=%p, iov_len=%u}" + ", {iov_base=%p, iov_len=%u}], offset=%" PRI__d64 "}, " + "{data=%#" PRI__x64 ", preadv, reqprio=%hd, fildes=0, " + "iovec=[{iov_base=%p, iov_len=%u}" + ", {iov_base=%p, iov_len=%u}], offset=%" PRI__d64 "}" + "]) = %s\n", + *ctx, nr, + cbv[0].aio_data, cbv[0].aio_reqprio, + iov0[0].iov_base, (unsigned int) iov0[0].iov_len, + iov0[1].iov_base, (unsigned int) iov0[1].iov_len, + cbv[0].aio_offset, + cbv[1].aio_data, cbv[1].aio_reqprio, + iov1[0].iov_base, (unsigned int) iov1[0].iov_len, + iov1[1].iov_base, (unsigned int) iov1[1].iov_len, + cbv[1].aio_offset, + sprintrc(rc)); + + rc = syscall(__NR_io_destroy, bogus_ctx); + printf("io_destroy(%#lx) = %s\n", + bogus_ctx, sprintrc(rc)); + + rc = syscall(__NR_io_destroy, *ctx); + printf("io_destroy(%#lx) = %s\n", *ctx, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_io_*") + +#endif diff --git a/tests-mx32/aio.test b/tests-mx32/aio.test new file mode 100755 index 000000000..2ba90da8d --- /dev/null +++ b/tests-mx32/aio.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check io_* syscalls decoding. + +. "${srcdir=.}/init.sh" + +syscalls=io_setup,io_submit,io_getevents,io_cancel,io_destroy +run_strace_match_diff -a14 -e trace=$syscalls diff --git a/tests-mx32/alarm.c b/tests-mx32/alarm.c new file mode 100644 index 000000000..291b26ad9 --- /dev/null +++ b/tests-mx32/alarm.c @@ -0,0 +1,52 @@ +/* + * This file is part of alarm strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_alarm + +# include +# include + +int +main(void) +{ + int rc = syscall(__NR_alarm, (unsigned long) 0xffffffff0000002aULL); + printf("alarm(%u) = %d\n", 42, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_alarm") + +#endif diff --git a/tests-mx32/alarm.test b/tests-mx32/alarm.test new file mode 100755 index 000000000..267b22393 --- /dev/null +++ b/tests-mx32/alarm.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check alarm syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-mx32/answer.c b/tests-mx32/answer.c new file mode 100644 index 000000000..ae3059a48 --- /dev/null +++ b/tests-mx32/answer.c @@ -0,0 +1,44 @@ +/* + * Check decoding of fault injected exit_group syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + static const kernel_ulong_t answer = + (kernel_ulong_t) 0xbadc0ded0000002aULL; + + syscall(__NR_exit_group, answer); + syscall(__NR_exit, answer); + + return 1; +} diff --git a/tests-mx32/attach-f-p-cmd.c b/tests-mx32/attach-f-p-cmd.c new file mode 100644 index 000000000..77594bebb --- /dev/null +++ b/tests-mx32/attach-f-p-cmd.c @@ -0,0 +1,46 @@ +/* + * This file is part of attach-f-p strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + static const char dir[] = "attach-f-p.test cmd"; + pid_t pid = getpid(); + int rc = chdir(dir); + + printf("%-5d chdir(\"%s\") = %s\n" + "%-5d +++ exited with 0 +++\n", + pid, dir, sprintrc(rc), pid); + + return 0; +} diff --git a/tests-mx32/attach-f-p.c b/tests-mx32/attach-f-p.c new file mode 100644 index 000000000..3f9a7e3e0 --- /dev/null +++ b/tests-mx32/attach-f-p.c @@ -0,0 +1,124 @@ +/* + * This file is part of attach-f-p strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#define N 3 + +typedef union { + void *ptr; + pid_t pid; +} retval_t; + +static const char text_parent[] = "attach-f-p.test parent"; +static const char *child[N] = { + "attach-f-p.test child 0", + "attach-f-p.test child 1", + "attach-f-p.test child 2" +}; +typedef int pipefd[2]; +static pipefd pipes[N]; + +static void * +thread(void *a) +{ + unsigned int no = (long) a; + int i; + + if (read(pipes[no][0], &i, sizeof(i)) != (int) sizeof(i)) + perror_msg_and_fail("read[%u]", no); + assert(chdir(child[no]) == -1); + retval_t retval = { .pid = syscall(__NR_gettid) }; + return retval.ptr; +} + +int +main(void) +{ + pthread_t t[N]; + unsigned int i; + + if (write(1, "", 0) != 0) + perror_msg_and_fail("write"); + + for (i = 0; i < N; ++i) { + if (pipe(pipes[i])) + perror_msg_and_fail("pipe"); + + errno = pthread_create(&t[i], NULL, thread, (void *) (long) i); + if (errno) + perror_msg_and_fail("pthread_create"); + } + + if (write(1, "\n", 1) != 1) + perror_msg_and_fail("write"); + + /* wait for the peer to write to stdout */ + struct stat st; + for (;;) { + if (fstat(1, &st)) + perror_msg_and_fail("fstat"); + if (st.st_size >= 103) + break; + } + + for (i = 0; i < N; ++i) { + /* sleep a bit to let the tracer catch up */ + sleep(1); + if (write(pipes[i][1], &i, sizeof(i)) != (int) sizeof(i)) + perror_msg_and_fail("write[%u]", i); + retval_t retval; + errno = pthread_join(t[i], &retval.ptr); + if (errno) + perror_msg_and_fail("pthread_join"); + errno = ENOENT; + printf("%-5d chdir(\"%s\") = %s\n" + "%-5d +++ exited with 0 +++\n", + retval.pid, child[i], sprintrc(-1), retval.pid); + } + + /* sleep a bit more to let the tracer catch up */ + sleep(1); + + pid_t pid = getpid(); + assert(chdir(text_parent) == -1); + + printf("%-5d chdir(\"%s\") = -1 ENOENT (%m)\n" + "%-5d +++ exited with 0 +++\n", pid, text_parent, pid); + + return 0; +} diff --git a/tests-mx32/attach-f-p.test b/tests-mx32/attach-f-p.test new file mode 100755 index 000000000..f41707409 --- /dev/null +++ b/tests-mx32/attach-f-p.test @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Check that -f -p attaches to threads properly. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -f -p is implemented using /proc/$pid/task/ +[ -d /proc/self/task/ ] || + framework_skip_ '/proc/self/task/ is not available' +run_prog_skip_if_failed \ + kill -0 $$ +run_prog ./attach-f-p-cmd > /dev/null + +rm -f "$OUT" +./set_ptracer_any sh -c "exec ./attach-f-p >> $OUT" > /dev/null & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sh failed' +done + +run_strace -a32 -f -echdir -p $tracee_pid ./attach-f-p-cmd > "$OUT" +match_diff "$LOG" "$OUT" +rm -f "$OUT" diff --git a/tests-mx32/attach-p-cmd-cmd.c b/tests-mx32/attach-p-cmd-cmd.c new file mode 100644 index 000000000..d0f824e95 --- /dev/null +++ b/tests-mx32/attach-p-cmd-cmd.c @@ -0,0 +1,55 @@ +/* + * This file is part of attach-p-cmd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +int +main(void) +{ + static const char lockdir[] = "attach-p-cmd.test-lock"; + /* wait for the lock directory to be created by peer */ + while (rmdir(lockdir)) { + if (ENOENT != errno) + perror_msg_and_fail("rmdir: %s", lockdir); + } + + static const char dir[] = "attach-p-cmd.test cmd"; + pid_t pid = getpid(); + int rc = chdir(dir); + + printf("%-5d chdir(\"%s\") = %s\n" + "%-5d +++ exited with 0 +++\n", + pid, dir, sprintrc(rc), pid); + + return 0; +} diff --git a/tests-mx32/attach-p-cmd-p.c b/tests-mx32/attach-p-cmd-p.c new file mode 100644 index 000000000..254d19ae0 --- /dev/null +++ b/tests-mx32/attach-p-cmd-p.c @@ -0,0 +1,83 @@ +/* + * This file is part of attach-p-cmd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static void +handler(int signo) +{ +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask = {}; + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + static const char lockdir[] = "attach-p-cmd.test-lock"; + /* create a lock directory */ + if (mkdir(lockdir, 0700)) + perror_msg_and_fail("mkdir: %s", lockdir); + + /* wait for the lock directory to be removed by peer */ + while (mkdir(lockdir, 0700)) { + if (EEXIST != errno) + perror_msg_and_fail("mkdir: %s", lockdir); + } + + /* remove the lock directory */ + if (rmdir(lockdir)) + perror_msg_and_fail("rmdir: %s", lockdir); + + alarm(1); + pause(); + + static const char dir[] = "attach-p-cmd.test -p"; + pid_t pid = getpid(); + int rc = chdir(dir); + + printf("%-5d --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---\n" + "%-5d chdir(\"%s\") = %d %s (%m)\n" + "%-5d +++ exited with 0 +++\n", + pid, pid, dir, rc, errno2name(), pid); + + return 0; +} diff --git a/tests-mx32/attach-p-cmd.test b/tests-mx32/attach-p-cmd.test new file mode 100755 index 000000000..2068cf1d2 --- /dev/null +++ b/tests-mx32/attach-p-cmd.test @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Check that simultaneous use of -p option and tracing of a command works. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +rm -rf attach-p-cmd.test-lock +rm -f "$OUT" +./set_ptracer_any ./attach-p-cmd-p >> "$OUT" & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any ./attach-p-cmd-p failed' +done + +run_strace -a30 -echdir -p $tracee_pid ./attach-p-cmd-cmd > "$OUT" +match_diff "$LOG" "$OUT" +rm -f "$OUT" diff --git a/tests-mx32/bexecve.test b/tests-mx32/bexecve.test new file mode 100755 index 000000000..f1ab04f1f --- /dev/null +++ b/tests-mx32/bexecve.test @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Check -bexecve behavior. +# +# Copyright (c) 2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_strace_redir() +{ + args="$*" + $STRACE "$@" 2> "$LOG" +} + +run_strace_redir -enone ./set_ptracer_any true || + dump_log_and_fail_with "$STRACE $args: unexpected exit status" + +run_strace_redir -enone ./set_ptracer_any false +[ $? -eq 1 ] || + dump_log_and_fail_with "$STRACE $args: unexpected exit status" + +run_strace_redir -bexecve -enone ./set_ptracer_any false || + dump_log_and_fail_with "$STRACE $args: unexpected exit status" + +pattern_detached='[^:]*strace: Process [1-9][0-9]* detached' +pattern_personality='[^:]*strace: \[ Process PID=[1-9][0-9]* runs in .* mode. \]' + +LC_ALL=C grep -x "$pattern_detached" "$LOG" > /dev/null || + dump_log_and_fail_with "$STRACE $args: output mismatch" + +if LC_ALL=C grep -E -v -x "($pattern_detached|$pattern_personality)" "$LOG" > /dev/null; then + dump_log_and_fail_with "$STRACE $args: unexpected output" +fi + +exit 0 diff --git a/tests-mx32/bpf.c b/tests-mx32/bpf.c new file mode 100644 index 000000000..7ef16c9f2 --- /dev/null +++ b/tests-mx32/bpf.c @@ -0,0 +1,234 @@ +/* + * Copyright (c) 2015-2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined HAVE_UNION_BPF_ATTR_LOG_BUF && defined __NR_bpf +# include +# include +# include +# include + +static const struct bpf_insn insns[] = { + { .code = BPF_JMP | BPF_EXIT } +}; + +static const char *errstr; +static char log_buf[4096]; + +static long +sys_bpf(kernel_ulong_t cmd, kernel_ulong_t attr, kernel_ulong_t size) +{ + long rc = syscall(__NR_bpf, cmd, attr, size); + errstr = sprintrc(rc); + return rc; +} + +static int +map_create(void) +{ + union bpf_attr attr = { + .key_size = 4, + .value_size = 8, + .max_entries = 256 + }; + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(BPF_MAP_CREATE, (unsigned long) t_attr, sizeof(attr)); +} + +static int +map_any(int cmd) +{ + union bpf_attr attr = { + .map_fd = -1, + .key = 0xdeadbeef, + .value = 0xbadc0ded + }; + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(cmd, (unsigned long) t_attr, sizeof(attr)); +} + +static int +prog_load(void) +{ + union bpf_attr attr = { + .insn_cnt = sizeof(insns) / sizeof(insns[0]), + .insns = (unsigned long) insns, + .license = (unsigned long) "GPL", + .log_level = 42, + .log_size = sizeof(log_buf), + .log_buf = (unsigned long) log_buf + }; + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(BPF_PROG_LOAD, (unsigned long) t_attr, sizeof(attr)); +} + +/* + * bpf() syscall and its first six commands were introduced in Linux kernel + * 3.18. Some additional commands were added afterwards, so we need to take + * precautions to make sure the tests compile. + * + * BPF_OBJ_PIN and BPF_OBJ_GET commands appear in kernel 4.4. + */ +# ifdef HAVE_UNION_BPF_ATTR_BPF_FD +static int +obj_manage(int cmd) +{ + union bpf_attr attr = { + .pathname = (unsigned long) "/sys/fs/bpf/foo/bar", + .bpf_fd = -1 + }; + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(cmd, (unsigned long) t_attr, sizeof(attr)); +} +# endif + +/* BPF_PROG_ATTACH and BPF_PROG_DETACH commands appear in kernel 4.10. */ +# ifdef HAVE_UNION_BPF_ATTR_ATTACH_TYPE +static int +prog_cgroup(int cmd) +{ + union bpf_attr attr = { + .target_fd = -1, + .attach_bpf_fd = -1, + .attach_type = 0 + }; + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(cmd, (unsigned long) t_attr, sizeof(attr)); +} +# endif + +static unsigned long efault; + +static void +bogus_bpf(int cmd, const char *name) +{ + const unsigned long bogus_size = 1024; + const unsigned long bogus_addr = efault - bogus_size; + + sys_bpf(cmd, efault, 4); + printf("bpf(%s, %#lx, %lu) = %s\n", + name, efault, 4UL, errstr); + + sys_bpf(cmd, efault, bogus_size); + printf("bpf(%s, %#lx, %lu) = %s\n", + name, efault, bogus_size, errstr); + + sys_bpf(cmd, bogus_addr, 0); + printf("bpf(%s, %#lx, %lu) = %s\n", + name, bogus_addr, 0UL, errstr); +} + +#define BOGUS_BPF(cmd) bogus_bpf(cmd, #cmd) + +int +main(void) +{ + efault = (unsigned long) tail_alloc(1) + 1; + + map_create(); + printf("bpf(BPF_MAP_CREATE" + ", {map_type=BPF_MAP_TYPE_UNSPEC, key_size=4" + ", value_size=8, max_entries=256}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_CREATE); + + map_any(BPF_MAP_LOOKUP_ELEM); + printf("bpf(BPF_MAP_LOOKUP_ELEM" + ", {map_fd=-1, key=0xdeadbeef}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_LOOKUP_ELEM); + + map_any(BPF_MAP_UPDATE_ELEM); + printf("bpf(BPF_MAP_UPDATE_ELEM" + ", {map_fd=-1, key=0xdeadbeef" + ", value=0xbadc0ded, flags=BPF_ANY}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_UPDATE_ELEM); + + map_any(BPF_MAP_DELETE_ELEM); + printf("bpf(BPF_MAP_DELETE_ELEM" + ", {map_fd=-1, key=0xdeadbeef}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_DELETE_ELEM); + + map_any(BPF_MAP_GET_NEXT_KEY); + printf("bpf(BPF_MAP_GET_NEXT_KEY" + ", {map_fd=-1, key=0xdeadbeef}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_GET_NEXT_KEY); + + prog_load(); + printf("bpf(BPF_PROG_LOAD" + ", {prog_type=BPF_PROG_TYPE_UNSPEC, insn_cnt=1, insns=%p" + ", license=\"GPL\", log_level=42, log_size=4096, log_buf=%p" + ", kern_version=0}, %u) = %s\n", + insns, log_buf, (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_PROG_LOAD); + +# ifdef HAVE_UNION_BPF_ATTR_BPF_FD + obj_manage(BPF_OBJ_PIN); + printf("bpf(BPF_OBJ_PIN" + ", {pathname=\"/sys/fs/bpf/foo/bar\", bpf_fd=-1}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_OBJ_PIN); + + obj_manage(BPF_OBJ_GET); + printf("bpf(BPF_OBJ_GET" + ", {pathname=\"/sys/fs/bpf/foo/bar\", bpf_fd=-1}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_OBJ_GET); +# endif + +# ifdef HAVE_UNION_BPF_ATTR_ATTACH_TYPE + prog_cgroup(BPF_PROG_ATTACH); + printf("bpf(BPF_PROG_ATTACH" + ", {target_fd=-1, attach_bpf_fd=-1" + ", attach_type=BPF_CGROUP_INET_INGRESS}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_PROG_ATTACH); + + prog_cgroup(BPF_PROG_DETACH); + printf("bpf(BPF_PROG_DETACH" + ", {target_fd=-1, attach_type=BPF_CGROUP_INET_INGRESS}, %u)" + " = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_PROG_DETACH); +# endif + + bogus_bpf(0xfacefeed, "0xfacefeed /* BPF_??? */"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_bpf") + +#endif diff --git a/tests-mx32/bpf.test b/tests-mx32/bpf.test new file mode 100755 index 000000000..adf0d576c --- /dev/null +++ b/tests-mx32/bpf.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check bpf syscall decoding. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a20 diff --git a/tests-mx32/brk.c b/tests-mx32/brk.c new file mode 100644 index 000000000..572ebd61f --- /dev/null +++ b/tests-mx32/brk.c @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_brk + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_brk, NULL); + printf("brk\\(NULL\\) = %#lx\n", rc); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_brk") + +#endif diff --git a/tests-mx32/brk.test b/tests-mx32/brk.test new file mode 100755 index 000000000..8c0e2e49b --- /dev/null +++ b/tests-mx32/brk.test @@ -0,0 +1,10 @@ +#!/bin/sh + +# Check brk syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a10 -ebrk $args > "$EXP" +match_grep "$LOG" "$EXP" +rm -f "$EXP" diff --git a/tests-mx32/btrfs-v.test b/tests-mx32/btrfs-v.test new file mode 100755 index 000000000..1ee17b4b0 --- /dev/null +++ b/tests-mx32/btrfs-v.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check verbose decoding of btrfs ioctl + +. "${srcdir=.}/init.sh" + +run_prog ./btrfs -v > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-mx32/btrfs-vw.test b/tests-mx32/btrfs-vw.test new file mode 100755 index 000000000..c7e40ad71 --- /dev/null +++ b/tests-mx32/btrfs-vw.test @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check verbose decoding of btrfs ioctl w/ live ioctls. + +# WARNING: USE OF THIS TEST WILL MODIFY AN EXISTING BTRFS FILE SYSTEM + +# Typical usage: +# mkfs.btrfs +# mount /mnt +# BTRFS_MOUNTPOINT=/mnt make check TESTS="btrfs-vw" +# umount /mnt + +. "${srcdir=.}/init.sh" + +if [ -z "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT not set" +elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT does not point to a directory" +fi + +run_prog ./btrfs -v -w "${BTRFS_MOUNTPOINT}" > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-mx32/btrfs-w.test b/tests-mx32/btrfs-w.test new file mode 100755 index 000000000..6238dca80 --- /dev/null +++ b/tests-mx32/btrfs-w.test @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check decoding of btrfs ioctl w/ live ioctls. + +# WARNING: USE OF THIS TEST WILL MODIFY AN EXISTING BTRFS FILE SYSTEM + +# Typical usage: +# mkfs.btrfs +# mount /mnt +# BTRFS_MOUNTPOINT=/mnt make check TESTS="btrfs-w" +# umount /mnt + +. "${srcdir=.}/init.sh" + +if [ -z "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT not set" +elif [ ! -d "${BTRFS_MOUNTPOINT}" ]; then + skip_ "\$BTRFS_MOUNTPOINT does not point to a directory" +fi + +run_prog ./btrfs -w "${BTRFS_MOUNTPOINT}" > /dev/null +run_strace -a16 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-mx32/btrfs.c b/tests-mx32/btrfs.c new file mode 100644 index 000000000..b3e23f80c --- /dev/null +++ b/tests-mx32/btrfs.c @@ -0,0 +1,1932 @@ +#include "tests.h" + +#ifdef HAVE_LINUX_BTRFS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "xlat.h" + +#include "xlat/btrfs_balance_args.h" +#include "xlat/btrfs_balance_flags.h" +#include "xlat/btrfs_balance_state.h" +#include "xlat/btrfs_compress_types.h" +#include "xlat/btrfs_defrag_flags.h" +#include "xlat/btrfs_dev_stats_values.h" +#include "xlat/btrfs_dev_stats_flags.h" +#include "xlat/btrfs_qgroup_inherit_flags.h" +#include "xlat/btrfs_qgroup_limit_flags.h" +#include "xlat/btrfs_scrub_flags.h" +#include "xlat/btrfs_send_flags.h" +#include "xlat/btrfs_space_info_flags.h" +#include "xlat/btrfs_snap_flags_v2.h" +#include "xlat/btrfs_tree_objectids.h" +#include "xlat/btrfs_features_compat.h" +#include "xlat/btrfs_features_compat_ro.h" +#include "xlat/btrfs_features_incompat.h" +#include "xlat/btrfs_key_types.h" + +#ifdef HAVE_LINUX_FIEMAP_H +# include +# include "xlat/fiemap_flags.h" +# include "xlat/fiemap_extent_flags.h" +#endif + +#ifndef BTRFS_LABEL_SIZE +# define BTRFS_LABEL_SIZE 256 +#endif + +#ifndef BTRFS_NAME_LEN +# define BTRFS_NAME_LEN 255 +#endif + +/* + * Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in + * its definition, which isn't exported by the kernel. + */ +typedef __u64 u64; + +static const char *btrfs_test_root; +static int btrfs_test_dir_fd; +static bool verbose = false; +static bool write_ok = false; + +const unsigned char uuid_reference[BTRFS_UUID_SIZE] = { + 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, + 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, +}; + +const char uuid_reference_string[] = "01234567-89ab-cdef-fedc-ba9876543210"; + +#ifndef BTRFS_IOC_QUOTA_RESCAN +struct btrfs_ioctl_quota_rescan_args { + uint64_t flags, progress, reserved[6]; +}; +# define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \ + struct btrfs_ioctl_quota_rescan_args) +# define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \ + struct btrfs_ioctl_quota_rescan_args) +#endif + +#ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT +# define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46) +#endif + +#ifndef BTRFS_IOC_GET_FEATURES +# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags) +# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags[2]) +# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \ + struct btrfs_ioctl_feature_flags[3]) +#endif + +#ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS +struct btrfs_ioctl_feature_flags { + uint64_t compat_flags; + uint64_t compat_ro_flags; + uint64_t incompat_flags; +}; +#endif + +#ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START +struct btrfs_ioctl_defrag_range_args { + uint64_t start; + uint64_t len; + uint64_t flags; + uint32_t extent_thresh; + uint32_t compress_type; + uint32_t unused[4]; +}; +#endif + +#ifndef FIDEDUPERANGE +# define FIDEDUPERANGE _IOWR(0x94, 54, struct file_dedupe_range) +struct file_dedupe_range_info { + int64_t dest_fd; /* in - destination file */ + uint64_t dest_offset; /* in - start of extent in destination */ + uint64_t bytes_deduped; /* out - total # of bytes we were able + * to dedupe from this file. */ + /* status of this dedupe operation: + * < 0 for error + * == FILE_DEDUPE_RANGE_SAME if dedupe succeeds + * == FILE_DEDUPE_RANGE_DIFFERS if data differs + */ + int32_t status; /* out - see above description */ + uint32_t reserved; /* must be zero */ +}; + +struct file_dedupe_range { + uint64_t src_offset; /* in - start of extent in source */ + uint64_t src_length; /* in - length of extent */ + uint16_t dest_count; /* in - total elements in info array */ + uint16_t reserved1; /* must be zero */ + uint32_t reserved2; /* must be zero */ + struct file_dedupe_range_info info[0]; +}; +#endif + +#ifndef BTRFS_IOC_TREE_SEARCH_V2 +# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \ + struct btrfs_ioctl_search_args_v2) +struct btrfs_ioctl_search_args_v2 { + struct btrfs_ioctl_search_key key; /* in/out - search parameters */ + uint64_t buf_size; /* in - size of buffer + * out - on EOVERFLOW: needed size + * to store item */ + uint64_t buf[0]; /* out - found items */ +}; +#endif + + +static const char * +maybe_print_uint64max(uint64_t val) +{ + if (val == UINT64_MAX) + return " /* UINT64_MAX */"; + return ""; +} + +/* takes highest valid flag bit */ +static uint64_t +max_flags_plus_one(int bit) +{ + int i; + uint64_t val = 0; + if (bit == -1) + return 1; + for (i = 0; i <= bit + 1 && i < 64; i++) + val |= (1ULL << i); + return val; +} + +/* + * Consumes no arguments, returns nothing: + * + * - BTRFS_IOC_TRANS_START + * - BTRFS_IOC_TRANS_END + */ +static void +btrfs_test_trans_ioctls(void) +{ + ioctl(-1, BTRFS_IOC_TRANS_START, NULL); + printf("ioctl(-1, BTRFS_IOC_TRANS_START) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_TRANS_END, NULL); + printf("ioctl(-1, BTRFS_IOC_TRANS_END) = -1 EBADF (%m)\n"); +} + +/* + * Consumes no arguments, returns nothing: + * - BTRFS_IOC_SYNC + * + * Consumes argument, returns nothing + * - BTRFS_IOC_WAIT_SYNC + */ +static void +btrfs_test_sync_ioctls(void) +{ + uint64_t u64val = 0xdeadbeefbadc0dedULL; + + ioctl(-1, BTRFS_IOC_SYNC, NULL); + printf("ioctl(-1, BTRFS_IOC_SYNC) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_WAIT_SYNC, NULL); + printf("ioctl(-1, BTRFS_IOC_WAIT_SYNC, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_WAIT_SYNC, &u64val); + printf("ioctl(-1, BTRFS_IOC_WAIT_SYNC, [%" PRIu64 + "]) = -1 EBADF (%m)\n", u64val); + + /* + * The live test of BTRFS_IOC_SYNC happens as a part of the test + * for BTRFS_IOC_LOGICAL_INO + */ +} + +static void +btrfs_print_qgroup_inherit(struct btrfs_qgroup_inherit *inherit) +{ + printf("{flags="); + printflags(btrfs_qgroup_inherit_flags, inherit->flags, + "BTRFS_QGROUP_INHERIT_???"); + printf(", num_qgroups=%" PRI__u64 + ", num_ref_copies=%" PRI__u64 + ", num_excl_copies=%" PRI__u64", lim={flags=", + inherit->num_qgroups, inherit->num_ref_copies, + inherit->num_excl_copies); + printflags(btrfs_qgroup_limit_flags, + inherit->lim.flags, + "BTRFS_QGROUP_LIMIT_???"); + printf(", max_rfer=%" PRI__u64 ", max_excl=%" PRI__u64 + ", rsv_rfer=%" PRI__u64 ", rsv_excl=%" PRI__u64 + "}, qgroups=", + inherit->lim.max_rfer, inherit->lim.max_excl, + inherit->lim.rsv_rfer, inherit->lim.rsv_excl); + if (verbose) { + unsigned int i; + printf("["); + for (i = 0; i < inherit->num_qgroups; i++) { + if (i > 0) + printf(", "); + printf("%" PRI__u64, inherit->qgroups[i]); + } + printf("]"); + } else + printf("..."); + printf("}"); +} + + +static void +btrfs_print_vol_args_v2(struct btrfs_ioctl_vol_args_v2 *args, int print_qgroups) +{ + printf("{fd=%d, flags=", (int) args->fd); + printflags(btrfs_snap_flags_v2, args->flags, "BTRFS_SUBVOL_???"); + + if (args->flags & BTRFS_SUBVOL_QGROUP_INHERIT) { + printf(", size=%" PRI__u64 ", qgroup_inherit=", args->size); + if (args->qgroup_inherit && print_qgroups) + btrfs_print_qgroup_inherit(args->qgroup_inherit); + else if (args->qgroup_inherit) + printf("%p", args->qgroup_inherit); + else + printf("NULL"); + } + printf(", name=\"%s\"}", args->name); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SNAP_CREATE + * - BTRFS_IOC_SUBVOL_CREATE + * - BTRFS_IOC_SNAP_DESTROY + * - BTRFS_IOC_DEFAULT_SUBVOL + * + * Consumes argument, returns u64: + * - BTRFS_IOC_SNAP_CREATE_V2 + * - BTRFS_IOC_SUBVOL_CREATE_V2 + */ + +static void +btrfs_test_subvol_ioctls(void) +{ + const char *subvol_name = "subvol-name"; + char *long_subvol_name; + void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeedULL; + uint64_t u64val = 0xdeadbeefbadc0dedULL; + struct btrfs_ioctl_vol_args vol_args = {}; + struct btrfs_ioctl_vol_args_v2 vol_args_v2 = { + .fd = 2, + .flags = max_flags_plus_one(2), + }; + + long_subvol_name = malloc(BTRFS_PATH_NAME_MAX); + if (!long_subvol_name) + perror_msg_and_fail("malloc failed"); + memset(long_subvol_name, 'f', BTRFS_PATH_NAME_MAX); + long_subvol_name[BTRFS_PATH_NAME_MAX - 1] = '\0'; + + strcpy(vol_args.name, subvol_name); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE, NULL); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE, " + "{fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, " + "{fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_DESTROY," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + strncpy(vol_args.name, long_subvol_name, BTRFS_PATH_NAME_MAX); + ioctl(-1, BTRFS_IOC_SNAP_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + ioctl(-1, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(-1, BTRFS_IOC_SNAP_DESTROY," + " {fd=0, name=\"%s\"}) = -1 EBADF (%m)\n", vol_args.name); + + long_subvol_name = realloc(long_subvol_name, BTRFS_SUBVOL_NAME_MAX); + if (!long_subvol_name) + perror_msg_and_fail("realloc failed"); + + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, NULL) = -1 EBADF (%m)\n"); + + strcpy(vol_args_v2.name, subvol_name); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + strncpy(vol_args_v2.name, long_subvol_name, BTRFS_SUBVOL_NAME_MAX); + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + strcpy(vol_args_v2.name, subvol_name); + vol_args_v2.qgroup_inherit = bad_pointer; + + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 0); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 0); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + const unsigned int n_qgroups = 8; + unsigned int i; + struct btrfs_qgroup_inherit *inherit; + vol_args_v2.size = + sizeof(*inherit) + n_qgroups * sizeof(inherit->qgroups[0]); + inherit = tail_alloc(vol_args_v2.size); + + inherit->flags = 0x3; + inherit->num_ref_copies = 0; + inherit->num_excl_copies = 0; + inherit->num_qgroups = n_qgroups; + for (i = 0; i < n_qgroups; i++) + inherit->qgroups[i] = 1ULL << i; + inherit->lim.flags = 0x7f; + inherit->lim.max_rfer = u64val; + inherit->lim.max_excl = u64val; + inherit->lim.rsv_rfer = u64val; + inherit->lim.rsv_excl = u64val; + vol_args_v2.qgroup_inherit = inherit; + + printf("ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SNAP_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, "); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(-1, BTRFS_IOC_SUBVOL_CREATE_V2, &vol_args_v2); + printf(") = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, &u64val); + printf("ioctl(-1, BTRFS_IOC_DEFAULT_SUBVOL, [%" + PRIu64 "]) = -1 EBADF (%m)\n", u64val); + + printf("ioctl(-1, BTRFS_IOC_SUBVOL_SETFLAGS, "); + printflags(btrfs_snap_flags_v2, vol_args_v2.flags, + "BTRFS_SUBVOL_???"); + ioctl(-1, BTRFS_IOC_SUBVOL_SETFLAGS, &vol_args_v2.flags); + printf(") = -1 EBADF (%m)\n"); + + if (write_ok) { + struct btrfs_ioctl_vol_args_v2 args_passed; + /* + * Returns transid if flags & BTRFS_SUBVOL_CREATE_ASYNC + * - BTRFS_IOC_SNAP_CREATE_V2 + * - BTRFS_IOC_SUBVOL_CREATE_V2 + */ + int subvolfd; + + strncpy(vol_args_v2.name, subvol_name, + sizeof(vol_args_v2.name)); + vol_args_v2.flags = BTRFS_SUBVOL_CREATE_ASYNC; + vol_args_v2.size = 0; + vol_args_v2.qgroup_inherit = NULL; + args_passed = vol_args_v2; + printf("ioctl(%d, BTRFS_IOC_SUBVOL_CREATE_V2, ", + btrfs_test_dir_fd); + btrfs_print_vol_args_v2(&vol_args_v2, 1); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SUBVOL_CREATE_V2, + &args_passed); + printf(" => {transid=%" PRI__u64"}) = 0\n", + args_passed.transid); + + subvolfd = openat(btrfs_test_dir_fd, subvol_name, + O_RDONLY|O_DIRECTORY); + if (subvolfd < 0) + perror_msg_and_fail("openat(%s) failed", subvol_name); + + strncpy(vol_args_v2.name, long_subvol_name, BTRFS_NAME_LEN); + vol_args_v2.fd = subvolfd; + args_passed = vol_args_v2; + printf("ioctl(%d, BTRFS_IOC_SNAP_CREATE_V2, ", + btrfs_test_dir_fd); + btrfs_print_vol_args_v2(&args_passed, 1); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_CREATE_V2, + &args_passed); + printf(" => {transid=%" PRI__u64"}) = 0\n", + args_passed.transid); + + /* This only works when mounted w/ -ouser_subvol_rm_allowed */ + strncpy(vol_args.name, long_subvol_name, 255); + vol_args.name[255] = 0; + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(%d, BTRFS_IOC_SNAP_DESTROY, " + "{fd=%d, name=\"%.*s\"}) = 0\n", + btrfs_test_dir_fd, (int) vol_args.fd, 255, long_subvol_name); + + strcpy(vol_args.name, subvol_name); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SNAP_DESTROY, &vol_args); + printf("ioctl(%d, BTRFS_IOC_SNAP_DESTROY, " + "{fd=%d, name=\"%s\"}) = 0\n", + btrfs_test_dir_fd, (int) vol_args.fd, subvol_name); + + close(subvolfd); + } + free(long_subvol_name); +} + +static void +btrfs_print_balance_args(struct btrfs_balance_args *args) +{ + printf("{profiles="); + printflags(btrfs_space_info_flags, args->profiles, + "BTRFS_BLOCK_GROUP_???"); + printf(", usage=%"PRI__u64 "%s, devid=%"PRI__u64 "%s, pstart=%"PRI__u64 + "%s, pend=%"PRI__u64 "%s, vstart=%"PRI__u64 "%s, vend=%"PRI__u64 + "%s, target=%"PRI__u64 "%s, flags=", + args->usage, maybe_print_uint64max(args->usage), + args->devid, maybe_print_uint64max(args->devid), + args->pstart, maybe_print_uint64max(args->pstart), + args->pend, maybe_print_uint64max(args->pend), + args->vstart, maybe_print_uint64max(args->vstart), + args->vend, maybe_print_uint64max(args->vend), + args->target, maybe_print_uint64max(args->target)); + printflags(btrfs_balance_args, args->flags, "BTRFS_BALANCE_ARGS_???"); + printf("}"); +} + +/* + * Accepts argument, returns nothing + * - BTRFS_IOC_BALANCE + * - BTRFS_IOC_BALANCE_CTL + * + * Accepts argument, returns argument + * - BTRFS_IOC_BALANCE_V2 + */ +static void +btrfs_test_balance_ioctls(void) +{ + struct btrfs_ioctl_balance_args args = { + .flags = 0x3f, + .data = { + .profiles = 0x7, + .flags = 0x7, + .devid = 1, + .pend = -1ULL, + .vend = -1ULL, + }, + + .meta = { + .profiles = 0x38, + .flags = 0x38, + .devid = 1, + }, + + .sys = { + .profiles = 0x1c0 | (1ULL << 48), + .flags = 0x4c0, + .devid = 1, + }, + }; + struct btrfs_ioctl_vol_args vol_args = {}; + + ioctl(-1, BTRFS_IOC_BALANCE_CTL, 1); + printf("ioctl(-1, BTRFS_IOC_BALANCE_CTL, " + "BTRFS_BALANCE_CTL_PAUSE) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE_CTL, 2); + printf("ioctl(-1, BTRFS_IOC_BALANCE_CTL, " + "BTRFS_BALANCE_CTL_CANCEL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE, NULL); + printf("ioctl(-1, BTRFS_IOC_BALANCE) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_BALANCE, &vol_args); + printf("ioctl(-1, BTRFS_IOC_BALANCE) = -1 EBADF (%m)\n"); + + /* struct btrfs_ioctl_balance_args */ + ioctl(-1, BTRFS_IOC_BALANCE_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_BALANCE_V2, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_BALANCE_V2, {flags="); + printflags(btrfs_balance_flags, args.flags, "BTRFS_BALANCE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + ioctl(-1, BTRFS_IOC_BALANCE_V2, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + args.flags = BTRFS_BALANCE_DATA | BTRFS_BALANCE_METADATA | + BTRFS_BALANCE_SYSTEM; + args.data.flags = 0; + args.data.profiles = 0; + args.meta.flags = 0; + args.meta.profiles = 0; + args.sys.flags = 0; + args.sys.profiles = 0; + printf("ioctl(%d, BTRFS_IOC_BALANCE_V2, {flags=", + btrfs_test_dir_fd); + + printflags(btrfs_balance_flags, args.flags, + "BTRFS_BALANCE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_BALANCE_V2, &args); + printf("} => {flags="); + printflags(btrfs_balance_flags, args.flags, + "BTRFS_BALANCE_???"); + printf(", state="); + printflags(btrfs_balance_state, args.state, + "BTRFS_BALANCE_STATE_???"); + printf(", data="); + btrfs_print_balance_args(&args.data); + printf(", meta="); + btrfs_print_balance_args(&args.meta); + printf(", sys="); + btrfs_print_balance_args(&args.sys); + printf("}) = 0\n"); + } +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_RESIZE + * + * Requires /dev/btrfs-control, consumes argument, returns nothing: + * - BTRFS_IOC_SCAN_DEV + * - BTRFS_IOC_DEVICES_READY + * + */ +static void +btrfs_test_device_ioctls(void) +{ + const char *devid = "1"; + const char *devname = "/dev/sda1"; + struct btrfs_ioctl_vol_args args = { + .fd = 2, + }; + + ioctl(-1, BTRFS_IOC_RESIZE, NULL); + printf("ioctl(-1, BTRFS_IOC_RESIZE, NULL) = -1 EBADF (%m)\n"); + + strcpy(args.name, devid); + ioctl(-1, BTRFS_IOC_RESIZE, &args); + printf("ioctl(-1, BTRFS_IOC_RESIZE, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_SCAN_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_SCAN_DEV, NULL) = -1 EBADF (%m)\n"); + + strcpy(args.name, devname); + ioctl(-1, BTRFS_IOC_SCAN_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_SCAN_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_ADD_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_ADD_DEV, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_ADD_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_ADD_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + + ioctl(-1, BTRFS_IOC_RM_DEV, NULL); + printf("ioctl(-1, BTRFS_IOC_RM_DEV, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_RM_DEV, &args); + printf("ioctl(-1, BTRFS_IOC_RM_DEV, " + "{fd=%d, name=\"%s\"}) = -1 EBADF (%m)\n", + (int) args.fd, args.name); + +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_CLONE + * - BTRFS_IOC_CLONE_RANGE + */ +static void +btrfs_test_clone_ioctls(void) +{ + int clone_fd = 4; + struct btrfs_ioctl_clone_range_args args = { + .src_fd = clone_fd, + .src_offset = 4096, + .src_length = 16384, + .dest_offset = 128 * 1024, + }; + + ioctl(-1, BTRFS_IOC_CLONE, clone_fd); + printf("ioctl(-1, BTRFS_IOC_CLONE or FICLONE, %x) = -1 EBADF (%m)\n", + clone_fd); + + ioctl(-1, BTRFS_IOC_CLONE_RANGE, NULL); + printf("ioctl(-1, BTRFS_IOC_CLONE_RANGE or FICLONERANGE, " + "NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_CLONE_RANGE, &args); + printf("ioctl(-1, BTRFS_IOC_CLONE_RANGE or FICLONERANGE, " + "{src_fd=%d, src_offset=%" PRI__u64 ", src_length=%" PRI__u64 + ", dest_offset=%" PRI__u64 "}) = -1 EBADF (%m)\n", + (int) args.src_fd, args.src_offset, args.src_length, + args.dest_offset); +} + +#define BTRFS_COMPRESS_TYPES 2 +#define BTRFS_INVALID_COMPRESS (BTRFS_COMPRESS_TYPES + 1) + +static void +btrfs_print_defrag_range_args(struct btrfs_ioctl_defrag_range_args *args) +{ + printf("{start=%" PRIu64", len=%" PRIu64 "%s, flags=", + (uint64_t) args->start, (uint64_t) args->len, + maybe_print_uint64max(args->len)); + + printflags(btrfs_defrag_flags, args->flags, "BTRFS_DEFRAG_RANGE_???"); + printf(", extent_thresh=%u, compress_type=", args->extent_thresh); + printxval(btrfs_compress_types, args->compress_type, + "BTRFS_COMPRESS_???"); + printf("}"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_DEFRAG + * - BTRFS_DEFRAG_RANGE + */ +static void +btrfs_test_defrag_ioctls(void) +{ + struct btrfs_ioctl_vol_args vol_args = {}; + struct btrfs_ioctl_defrag_range_args args = { + .start = 0, + .len = -1ULL, + .flags = max_flags_plus_one(1), + .extent_thresh = 128 * 1024, + .compress_type = 2, /* BTRFS_COMPRESS_LZO */ + }; + + /* + * These are documented as using vol_args but don't + * actually consume it. + */ + ioctl(-1, BTRFS_IOC_DEFRAG, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFRAG) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEFRAG, &vol_args); + printf("ioctl(-1, BTRFS_IOC_DEFRAG) = -1 EBADF (%m)\n"); + + /* struct btrfs_ioctl_defrag_range_args */ + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, NULL); + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); + + args.compress_type = BTRFS_INVALID_COMPRESS; + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); + + args.len--; + printf("ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, "); + btrfs_print_defrag_range_args(&args); + ioctl(-1, BTRFS_IOC_DEFRAG_RANGE, &args); + printf(") = -1 EBADF (%m)\n"); +} + +static const char * +xlookup(const struct xlat *xlat, const uint64_t val) +{ + for (; xlat->str != NULL; xlat++) + if (xlat->val == val) + return xlat->str; + return NULL; +} + +static void +btrfs_print_objectid(uint64_t objectid) +{ + const char *str = xlookup(btrfs_tree_objectids, objectid); + printf("%" PRIu64, objectid); + if (str) + printf(" /* %s */", str); +} + +static void +btrfs_print_key_type(uint32_t type) +{ + const char *str = xlookup(btrfs_key_types, type); + printf("%u", type); + if (str) + printf(" /* %s */", str); +} + +static void +btrfs_print_search_key(struct btrfs_ioctl_search_key *key) +{ + printf("key={tree_id="); + btrfs_print_objectid(key->tree_id); + if (verbose || key->min_objectid != 256) { + printf(", min_objectid="); + btrfs_print_objectid(key->min_objectid); + } + if (verbose || key->max_objectid != -256ULL) { + printf(", max_objectid="); + btrfs_print_objectid(key->max_objectid); + } + if (key->min_offset) + printf(", min_offset=%" PRI__u64 "%s", + key->min_offset, maybe_print_uint64max(key->min_offset)); + if (key->max_offset) + printf(", max_offset=%" PRI__u64 "%s", + key->max_offset, maybe_print_uint64max(key->max_offset)); + if (key->min_transid) + printf(", min_transid=%" PRI__u64"%s", key->min_transid, + maybe_print_uint64max(key->min_transid)); + if (key->max_transid) + printf(", max_transid=%" PRI__u64"%s", key->max_transid, + maybe_print_uint64max(key->max_transid)); + printf(", min_type="); + btrfs_print_key_type(key->min_type); + printf(", max_type="); + btrfs_print_key_type(key->max_type); + printf(", nr_items=%u}", key->nr_items); +} + +static void +btrfs_print_tree_search_buf(struct btrfs_ioctl_search_key *key, + void *buf, uint64_t buf_size) +{ + if (verbose) { + uint64_t i; + uint64_t off = 0; + printf("["); + for (i = 0; i < key->nr_items; i++) { + struct btrfs_ioctl_search_header *sh; + sh = (typeof(sh))(buf + off); + if (i) + printf(", "); + printf("{transid=%" PRI__u64 ", objectid=", + sh->transid); + btrfs_print_objectid(sh->objectid); + printf(", offset=%" PRI__u64 ", type=", sh->offset); + btrfs_print_key_type(sh->type); + printf(", len=%u}", sh->len); + off += sizeof(*sh) + sh->len; + } + printf("]"); + } else + printf("..."); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_TREE_SEARCH + * - BTRFS_IOC_TREE_SEARCH_V2 + */ +static void +btrfs_test_search_ioctls(void) +{ + struct btrfs_ioctl_search_key key_reference = { + .tree_id = 5, + .min_objectid = 256, + .max_objectid = -1ULL, + .min_offset = 0, + .max_offset = -1ULL, + .min_transid = 0, + .max_transid = -1ULL, + .min_type = 0, + .max_type = -1U, + .nr_items = 10, + }; + struct btrfs_ioctl_search_args search_args; + struct btrfs_ioctl_search_args_v2 search_args_v2 = { + .buf_size = 4096, + }; + + ioctl(-1, BTRFS_IOC_TREE_SEARCH, NULL); + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, NULL); + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, NULL) = -1 EBADF (%m)\n"); + + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_objectid = 6; + key_reference.max_objectid = 7; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_offset++; + key_reference.max_offset--; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_transid++; + key_reference.max_transid--; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + key_reference.min_type = 1; + key_reference.max_type = 12; + search_args.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH, {"); + btrfs_print_search_key(&search_args.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("}) = -1 EBADF (%m)\n"); + + search_args_v2.key = key_reference; + printf("ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, {"); + btrfs_print_search_key(&search_args_v2.key); + ioctl(-1, BTRFS_IOC_TREE_SEARCH_V2, &search_args_v2); + printf(", buf_size=%" PRIu64 "}) = -1 EBADF (%m)\n", + (uint64_t)search_args_v2.buf_size); + + if (btrfs_test_root) { + struct btrfs_ioctl_search_args_v2 *args; + int bufsize = 4096; + + key_reference.tree_id = 5; + key_reference.min_type = 1; + key_reference.max_type = 1; + key_reference.min_objectid = 256; + key_reference.max_objectid = 357; + key_reference.min_offset = 0; + key_reference.max_offset = -1ULL; + + search_args.key = key_reference; + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&search_args.key); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH, &search_args); + printf("} => {key={nr_items=%u}, buf=", + search_args.key.nr_items); + btrfs_print_tree_search_buf(&search_args.key, search_args.buf, + sizeof(search_args.buf)); + printf("}) = 0\n"); + + args = malloc(sizeof(*args) + bufsize); + if (!args) + perror_msg_and_fail("malloc failed"); + + args->key = key_reference; + args->buf_size = bufsize; + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH_V2, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&key_reference); + printf(", buf_size=%" PRIu64 "}", (uint64_t) args->buf_size); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH_V2, args); + printf(" => {key={nr_items=%u}, buf_size=%" PRIu64 ", buf=", + args->key.nr_items, (uint64_t)args->buf_size); + btrfs_print_tree_search_buf(&args->key, args->buf, + args->buf_size); + printf("}) = 0\n"); + + args->key = key_reference; + args->buf_size = sizeof(struct btrfs_ioctl_search_header); + printf("ioctl(%d, BTRFS_IOC_TREE_SEARCH_V2, {", + btrfs_test_dir_fd); + btrfs_print_search_key(&args->key); + printf(", buf_size=%" PRIu64 "}", (uint64_t)args->buf_size); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_TREE_SEARCH_V2, args); + printf(" => {buf_size=%" PRIu64 "}) = -1 EOVERFLOW (%m)\n", + (uint64_t)args->buf_size); + free(args); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_INO_LOOKUP + */ +static void +btrfs_test_ino_lookup_ioctl(void) +{ + struct btrfs_ioctl_ino_lookup_args args = { + .treeid = 5, + .objectid = 256, + }; + + ioctl(-1, BTRFS_IOC_INO_LOOKUP, NULL); + printf("ioctl(-1, BTRFS_IOC_INO_LOOKUP, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_INO_LOOKUP, {treeid="); + btrfs_print_objectid(args.treeid); + printf(", objectid="); + btrfs_print_objectid(args.objectid); + ioctl(-1, BTRFS_IOC_INO_LOOKUP, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (btrfs_test_root) { + printf("ioctl(%d, BTRFS_IOC_INO_LOOKUP, {treeid=", + btrfs_test_dir_fd); + btrfs_print_objectid(args.treeid); + printf(", objectid="); + btrfs_print_objectid(args.objectid); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_INO_LOOKUP, &args); + printf("} => {name=\"%s\"}) = 0\n", args.name); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_SPACE_INFO + */ +static void +btrfs_test_space_info_ioctl(void) +{ + struct btrfs_ioctl_space_args args = {}; + + ioctl(-1, BTRFS_IOC_SPACE_INFO, NULL); + printf("ioctl(-1, BTRFS_IOC_SPACE_INFO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SPACE_INFO, &args); + printf("ioctl(-1, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}) = -1 EBADF (%m)\n", + args.space_slots); + + if (btrfs_test_root) { + struct btrfs_ioctl_space_args args_passed; + struct btrfs_ioctl_space_args *argsp; + args_passed = args; + printf("ioctl(%d, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}", + btrfs_test_dir_fd, args_passed.space_slots); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SPACE_INFO, &args_passed); + printf(" => {total_spaces=%" PRI__u64 "}) = 0\n", + args_passed.total_spaces); + + argsp = malloc(sizeof(args) + + args_passed.total_spaces * sizeof(args.spaces[0])); + if (!argsp) + perror_msg_and_fail("malloc failed"); + + *argsp = args; + argsp->space_slots = args_passed.total_spaces; + printf("ioctl(%d, BTRFS_IOC_SPACE_INFO, " + "{space_slots=%" PRI__u64 "}", + btrfs_test_dir_fd, argsp->space_slots); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SPACE_INFO, argsp); + printf(" => {total_spaces=%" PRI__u64 ", spaces=", + argsp->total_spaces); + if (verbose) { + unsigned int i; + printf("["); + for (i = 0; i < argsp->total_spaces; i++) { + struct btrfs_ioctl_space_info *info; + info = &argsp->spaces[i]; + if (i) + printf(", "); + printf("{flags="); + printflags(btrfs_space_info_flags, info->flags, + "BTRFS_SPACE_INFO_???"); + printf(", total_bytes=%" PRI__u64 + ", used_bytes=%" PRI__u64 "}", + info->total_bytes, info->used_bytes); + } + + printf("]"); + } else + printf("..."); + printf("}) = 0\n"); + free(argsp); + } +} + +/* + * Consumes no arguments, returns nothing: + * - BTRFS_IOC_SCRUB_CANCEL + * Consumes argument, returns argument: + - * BTRFS_IOC_SCRUB + - * BTRFS_IOC_SCRUB_PROGRESS + */ +static void +btrfs_test_scrub_ioctls(void) +{ + struct btrfs_ioctl_scrub_args args = { + .devid = 1, + .start = 0, + .end = -1ULL, + .flags = max_flags_plus_one(0), + }; + + ioctl(-1, BTRFS_IOC_SCRUB, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_CANCEL, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB_CANCEL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SCRUB, {devid=%" PRI__u64 ", start=%" + PRI__u64 "%s, end=%" PRI__u64"%s, flags=", + args.devid, args.start, maybe_print_uint64max(args.start), + args.end, maybe_print_uint64max(args.end)); + printflags(btrfs_scrub_flags, args.flags, "BTRFS_SCRUB_???"); + ioctl(-1, BTRFS_IOC_SCRUB, &args); + printf("}) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, NULL); + printf("ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, &args); + printf("ioctl(-1, BTRFS_IOC_SCRUB_PROGRESS, " + "{devid=%" PRI__u64 "}) = -1 EBADF (%m)\n", args.devid); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_DEV_INFO + */ +static void +btrfs_test_dev_info_ioctl(void) +{ + struct btrfs_ioctl_dev_info_args args = { + .devid = 1, + }; + memcpy(&args.uuid, uuid_reference, BTRFS_UUID_SIZE); + + ioctl(-1, BTRFS_IOC_DEV_INFO, NULL); + printf("ioctl(-1, BTRFS_IOC_DEV_INFO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEV_INFO, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_INFO, " + "{devid=%" PRI__u64", uuid=%s}) = -1 EBADF (%m)\n", + args.devid, uuid_reference_string); +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_INO_PATHS + * - BTRFS_IOC_LOGICAL_INO + */ +static void +btrfs_test_ino_path_ioctls(void) +{ + char buf[16384]; + struct btrfs_ioctl_ino_path_args args = { + .inum = 256, + .size = sizeof(buf), + .fspath = (unsigned long)buf, + }; + + ioctl(-1, BTRFS_IOC_INO_PATHS, NULL); + printf("ioctl(-1, BTRFS_IOC_INO_PATHS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_LOGICAL_INO, NULL); + printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_INO_PATHS, &args); + printf("ioctl(-1, BTRFS_IOC_INO_PATHS, " + "{inum=%" PRI__u64", size=%" PRI__u64 + ", fspath=0x%" PRI__x64 "}) = -1 EBADF (%m)\n", + args.inum, args.size, args.fspath); + + ioctl(-1, BTRFS_IOC_LOGICAL_INO, &args); + printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64 + ", size=%" PRI__u64", inodes=0x%" PRI__x64 + "}) = -1 EBADF (%m)\n", args.inum, args.size, args.fspath); + +#ifdef HAVE_LINUX_FIEMAP_H + if (btrfs_test_root) { + int size; + struct stat si; + int ret; + struct btrfs_data_container *data = (void *)buf; + struct fiemap *fiemap; + int fd; + + ret = fstat(btrfs_test_dir_fd, &si); + if (ret) + perror_msg_and_fail("fstat failed"); + + args.inum = si.st_ino; + printf("ioctl(%d, BTRFS_IOC_INO_PATHS, " + "{inum=%" PRI__u64", size=%" PRI__u64 + ", fspath=0x%" PRI__x64"}", + btrfs_test_dir_fd, args.inum, args.size, + args.fspath); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_INO_PATHS, &args); + printf(" => {fspath={bytes_left=%u, bytes_missing=%u, elem_cnt=%u, elem_missed=%u, val=", + data->bytes_left, data->bytes_missing, data->elem_cnt, + data->elem_missed); + if (verbose) { + printf("[\"strace-test\"]"); + } else + printf("..."); + printf("}}) = 0\n"); + + fd = openat(btrfs_test_dir_fd, "file1", O_RDWR|O_CREAT, 0600); + if (fd < 0) + perror_msg_and_fail("openat(file1) failed"); + + ret = fstat(fd, &si); + if (ret) + perror_msg_and_fail("fstat failed"); + + if (write(fd, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd"); + + /* + * Force delalloc so we can actually + * search for the extent. + */ + fsync(fd); + ioctl(fd, BTRFS_IOC_SYNC, NULL); + printf("ioctl(%d, BTRFS_IOC_SYNC) = 0\n", fd); + + size = sizeof(*fiemap) + 2 * sizeof(fiemap->fm_extents[0]); + fiemap = malloc(size); + if (!fiemap) + perror_msg_and_fail("malloc failed"); + memset(fiemap, 0, size); + + fiemap->fm_length = sizeof(buf); + fiemap->fm_extent_count = 2; + + /* This is also a live test for FIEMAP */ + printf("ioctl(%d, FS_IOC_FIEMAP, {fm_start=%" PRI__u64 + ", fm_length=%" PRI__u64", fm_flags=", + fd, fiemap->fm_start, fiemap->fm_length); + printflags(fiemap_flags, fiemap->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_extent_count=%u}", fiemap->fm_extent_count); + ioctl(fd, FS_IOC_FIEMAP, fiemap); + printf(" => {fm_flags="); + printflags(fiemap_flags, fiemap->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_mapped_extents=%u, fm_extents=", + fiemap->fm_mapped_extents); + if (verbose) { + printf("["); + unsigned int i; + for (i = 0; i < fiemap->fm_mapped_extents; i++) { + struct fiemap_extent *fe; + fe = &fiemap->fm_extents[i]; + if (i) + printf(", "); + printf("{fe_logical=%" PRI__u64 + ", fe_physical=%" PRI__u64 + ", fe_length=%" PRI__u64 + ", ", + fe->fe_logical, fe->fe_physical, + fe->fe_length); + printflags(fiemap_extent_flags, fe->fe_flags, + "FIEMAP_EXTENT_???"); + printf("}"); + } + printf("]"); + } else + printf("..."); + printf("}) = 0\n"); + + args.inum = fiemap->fm_extents[0].fe_physical; + printf("ioctl(%d, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64 + ", size=%" PRI__u64", inodes=0x%" PRI__x64"}", + fd, args.inum, args.size, args.fspath); + ioctl(fd, BTRFS_IOC_LOGICAL_INO, &args); + printf(" => {inodes={bytes_left=%u, bytes_missing=%u, elem_cnt=%u, elem_missed=%u, val=", + data->bytes_left, data->bytes_missing, data->elem_cnt, + data->elem_missed); + if (verbose) { + printf("[{inum=%llu, offset=0, root=5}]", + (unsigned long long) si.st_ino); + } else + printf("..."); + printf("}}) = 0\n"); + close(fd); + free(fiemap); + } +#endif /* HAVE_LINUX_FIEMAP_H */ +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_SET_RECEIVED_SUBVOL + */ +static void +btrfs_test_set_received_subvol_ioctl(void) +{ + struct btrfs_ioctl_received_subvol_args args = { + .stransid = 0x12345, + .stime = { + .sec = 1463193386, + .nsec = 12345, + }, + }; + memcpy(&args.uuid, uuid_reference, BTRFS_UUID_SIZE); + + ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, " + "NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, &args); + printf("ioctl(-1, BTRFS_IOC_SET_RECEIVED_SUBVOL, " + "{uuid=%s, stransid=%" PRI__u64", stime=%" PRI__u64 + ".%u, flags=0}) = -1 EBADF (%m)\n", + uuid_reference_string, args.stransid, args.stime.sec, + args.stime.nsec); +} + +/* + * Consumes argument, returns nothing (output is via send_fd) + * - BTRFS_IOC_SEND + */ +static void +btrfs_test_send_ioctl(void) +{ + uint64_t u64_array[2] = { 256, 257 }; + struct btrfs_ioctl_send_args args = { + .send_fd = 4, + .parent_root = 257, + .flags = max_flags_plus_one(2), + }; + + ioctl(-1, BTRFS_IOC_SEND, NULL); + printf("ioctl(-1, BTRFS_IOC_SEND, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SEND, " + "{send_fd=%d, clone_sources_count=%" PRI__u64 + ", clone_sources=", + (int) args.send_fd, args.clone_sources_count); + if (verbose) + printf("NULL"); + else + printf("..."); + printf(", parent_root="); + btrfs_print_objectid(args.parent_root); + printf(", flags="); + printflags(btrfs_send_flags, args.flags, "BTRFS_SEND_FLAGS_???"); + ioctl(-1, BTRFS_IOC_SEND, &args); + printf("}) = -1 EBADF (%m)\n"); + + args.clone_sources_count = 2; + args.clone_sources = (__u64 *) (void *) u64_array; + + printf("ioctl(-1, BTRFS_IOC_SEND, " + "{send_fd=%d, clone_sources_count=%" PRI__u64 + ", clone_sources=", + (int) args.send_fd, args.clone_sources_count); + if (verbose) { + printf("["); + btrfs_print_objectid(u64_array[0]); + printf(", "); + btrfs_print_objectid(u64_array[1]); + printf("]"); + } else + printf("..."); + printf(", parent_root="); + btrfs_print_objectid(args.parent_root); + printf(", flags="); + printflags(btrfs_send_flags, args.flags, "BTRFS_SEND_FLAGS_???"); + ioctl(-1, BTRFS_IOC_SEND, &args); + printf("}) = -1 EBADF (%m)\n"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QUOTA_CTL + */ +static void +btrfs_test_quota_ctl_ioctl(void) +{ + struct btrfs_ioctl_quota_ctl_args args = { + .cmd = 1, + }; + + ioctl(-1, BTRFS_IOC_QUOTA_CTL, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_ENABLE}) = -1 EBADF (%m)\n"); + + args.cmd = 2; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_DISABLE}) = -1 EBADF (%m)\n"); + + args.cmd = 3; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "BTRFS_QUOTA_CTL_RESCAN__NOTUSED}) = -1 EBADF (%m)\n"); + + args.cmd = 4; + ioctl(-1, BTRFS_IOC_QUOTA_CTL, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_CTL, " + "0x4 /* BTRFS_QUOTA_CTL_??? */}) = -1 EBADF (%m)\n"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QGROUP_ASSIGN + */ +static void +btrfs_test_qgroup_assign_ioctl(void) +{ + struct btrfs_ioctl_qgroup_assign_args args = { + .assign = 1, + .src = 257, + .dst = 258, + }; + + ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, NULL); + printf("ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, &args); + printf("ioctl(-1, BTRFS_IOC_QGROUP_ASSIGN, " + "{assign=%" PRI__u64", src=%" PRI__u64", dst=%" PRI__u64 + "}) = -1 EBADF (%m)\n", args.assign, args.src, args.dst); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_QGROUP_CREATE + */ +static void +btrfs_test_qgroup_create_ioctl(void) +{ + struct btrfs_ioctl_qgroup_create_args args = { + .create = 1, + .qgroupid = 257, + }; + + ioctl(-1, BTRFS_IOC_QGROUP_CREATE, NULL); + printf("ioctl(-1, BTRFS_IOC_QGROUP_CREATE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QGROUP_CREATE, &args); + printf("ioctl(-1, BTRFS_IOC_QGROUP_CREATE, " + "{create=%" PRI__u64", qgroupid=%" PRI__u64 + "}) = -1 EBADF (%m)\n", args.create, args.qgroupid); +} + +/* + * Consumes nothing, returns nothing: + * - BTRFS_IOC_QUOTA_RESCAN_WAIT + * Consumes argument, returns nothing: + * - BTRFS_IOC_QUOTA_RESCAN + */ +static void +btrfs_test_quota_rescan_ioctl(void) +{ + struct btrfs_ioctl_quota_rescan_args args = { + .progress = 1, + }; + + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, &args); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN, " + "{flags=0}) = -1 EBADF (%m)\n"); + ioctl(-1, BTRFS_IOC_QUOTA_RESCAN_WAIT, NULL); + printf("ioctl(-1, BTRFS_IOC_QUOTA_RESCAN_WAIT) = -1 EBADF (%m)\n"); + +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SET_FSLABEL + * + * Consumes no argument, returns argument: + * - BTRFS_IOC_GET_FS_LABEL + */ +static void +btrfs_test_label_ioctls(void) +{ + char label[BTRFS_LABEL_SIZE] = "btrfs-label"; + + ioctl(-1, BTRFS_IOC_SET_FSLABEL, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_FSLABEL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_SET_FSLABEL, label); + printf("ioctl(-1, BTRFS_IOC_SET_FSLABEL, \"%s\") = -1 EBADF (%m)\n", + label); + + if (write_ok) { + ioctl(btrfs_test_dir_fd, BTRFS_IOC_SET_FSLABEL, label); + printf("ioctl(%d, BTRFS_IOC_SET_FSLABEL, \"%s\") = 0\n", + btrfs_test_dir_fd, label); + + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_FSLABEL, label); + printf("ioctl(%d, BTRFS_IOC_GET_FSLABEL, \"%s\") = 0\n", + btrfs_test_dir_fd, label); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_GET_DEV_STATS + */ +static void +btrfs_test_get_dev_stats_ioctl(void) +{ + struct btrfs_ioctl_get_dev_stats args = { + .devid = 1, + .nr_items = 5, + .flags = max_flags_plus_one(0), + }; + + ioctl(-1, BTRFS_IOC_GET_DEV_STATS, NULL); + printf("ioctl(-1, BTRFS_IOC_GET_DEV_STATS, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_GET_DEV_STATS, {devid=%" PRI__u64 + ", nr_items=%" PRI__u64", flags=", + args.devid, args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + ioctl(-1, BTRFS_IOC_GET_DEV_STATS, &args); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + unsigned int i; + args.flags = BTRFS_DEV_STATS_RESET; + printf("ioctl(%d, BTRFS_IOC_GET_DEV_STATS, {devid=%" PRI__u64 + ", nr_items=%" PRI__u64", flags=", + btrfs_test_dir_fd, args.devid, args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_DEV_STATS, &args); + printf("} => {nr_items=%" PRI__u64 ", flags=", + args.nr_items); + printflags(btrfs_dev_stats_flags, args.flags, + "BTRFS_DEV_STATS_???"); + printf(", ["); + for (i = 0; i < args.nr_items; i++) { + const char *name = xlookup(btrfs_dev_stats_values, i); + if (i) + printf(", "); + if (name) + printf("/* %s */ ", name); + printf("%" PRI__u64, args.values[i]); + } + printf("]}) = 0\n"); + } +} + +/* + * Consumes argument, returns argument: + * - BTRFS_IOC_DEV_REPLACE + * + * Test environment for this is more difficult; It's better to do it by hand. + */ +static void +btrfs_test_dev_replace_ioctl(void) +{ + struct btrfs_ioctl_dev_replace_args args = { + .cmd = BTRFS_IOCTL_DEV_REPLACE_CMD_START, + }; + args.start.srcdevid = 1; + strcpy((char *)args.start.srcdev_name, "/dev/sda1"); + strcpy((char *)args.start.tgtdev_name, "/dev/sdb1"); + + /* struct btrfs_ioctl_dev_replace_args */ + ioctl(-1, BTRFS_IOC_DEV_REPLACE, NULL); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, BTRFS_IOC_DEV_REPLACE, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, " + "{cmd=BTRFS_IOCTL_DEV_REPLACE_CMD_START, start={srcdevid=%" + PRI__u64", cont_reading_from_srcdev_mode=%" PRI__u64 + ", srcdev_name=\"%s\", tgtdev_name=\"%s\"}}) = -1 EBADF (%m)\n", + args.start.srcdevid, + args.start.cont_reading_from_srcdev_mode, + (char *)args.start.srcdev_name, + (char *)args.start.tgtdev_name); + + args.cmd = 1; + ioctl(-1, BTRFS_IOC_DEV_REPLACE, &args); + printf("ioctl(-1, BTRFS_IOC_DEV_REPLACE, " + "{cmd=BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS}) = -1 EBADF (%m)\n"); +} + +static void +btrfs_test_extent_same_ioctl(void) +{ +#ifdef BTRFS_IOC_FILE_EXTENT_SAME + struct file_dedupe_range args = { + .src_offset = 1024, + .src_length = 10240, + }; + struct file_dedupe_range *argsp; + + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, NULL); + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 + ", src_length=%" PRIu64 + ", dest_count=%hu, info=[]", + (uint64_t)args.src_offset, + (uint64_t)args.src_length, args.dest_count); + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, &args); + printf("}) = -1 EBADF (%m)\n"); + + argsp = malloc(sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + if (!argsp) + perror_msg_and_fail("malloc failed"); + memset(argsp, 0, sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + + *argsp = args; + argsp->dest_count = 3; + argsp->info[0].dest_fd = 2; + argsp->info[0].dest_offset = 0; + argsp->info[1].dest_fd = 2; + argsp->info[1].dest_offset = 10240; + argsp->info[2].dest_fd = 2; + argsp->info[2].dest_offset = 20480; + + printf("ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 + ", src_length=%" PRIu64 + ", dest_count=%hu, info=", + (int64_t)argsp->src_offset, + (uint64_t)argsp->src_length, argsp->dest_count); + printf("[{dest_fd=%" PRId64 ", dest_offset=%" PRIu64 + "}, {dest_fd=%" PRId64 ", dest_offset=%"PRIu64 "}", + (int64_t)argsp->info[0].dest_fd, + (uint64_t)argsp->info[0].dest_offset, + (int64_t)argsp->info[1].dest_fd, + (uint64_t)argsp->info[1].dest_offset); + if (verbose) + printf(", {dest_fd=%" PRId64 ", dest_offset=%" PRIu64 "}", + (int64_t)argsp->info[2].dest_fd, + (uint64_t)argsp->info[2].dest_offset); + else + printf(", ..."); + printf("]"); + ioctl(-1, BTRFS_IOC_FILE_EXTENT_SAME, argsp); + printf("}) = -1 EBADF (%m)\n"); + + if (write_ok) { + int fd1, fd2; + char buf[16384]; + + memset(buf, 0, sizeof(buf)); + + fd1 = openat(btrfs_test_dir_fd, "file1", O_RDWR|O_CREAT, 0600); + if (fd1 < 0) + perror_msg_and_fail("open file1 failed"); + + fd2 = openat(btrfs_test_dir_fd, "file2", O_RDWR|O_CREAT, 0600); + if (fd2 < 0) + perror_msg_and_fail("open file2 failed"); + + if (write(fd1, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd1"); + if (write(fd1, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd1"); + if (write(fd2, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd2"); + if (write(fd2, buf, sizeof(buf)) < 0) + perror_msg_and_fail("write: fd2"); + + close(fd2); + fd2 = openat(btrfs_test_dir_fd, "file2", O_RDONLY); + if (fd2 < 0) + perror_msg_and_fail("open file2 failed"); + + memset(argsp, 0, sizeof(*argsp) + sizeof(argsp->info[0]) * 3); + + argsp->src_offset = 0; + argsp->src_length = 4096; + argsp->dest_count = 3; + argsp->info[0].dest_fd = fd2; + argsp->info[0].dest_offset = 0; + argsp->info[1].dest_fd = fd2; + argsp->info[1].dest_offset = 10240; + argsp->info[2].dest_fd = fd2; + argsp->info[2].dest_offset = 20480; + + printf("ioctl(%d, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, " + "{src_offset=%" PRIu64 ", src_length=%" PRIu64 + ", dest_count=%hu, info=", fd1, + (uint64_t)argsp->src_offset, + (uint64_t)argsp->src_length, argsp->dest_count); + printf("[{dest_fd=%" PRId64 ", dest_offset=%" PRIu64 + "}, {dest_fd=%" PRId64 ", dest_offset=%"PRIu64 "}", + (int64_t)argsp->info[0].dest_fd, + (uint64_t)argsp->info[0].dest_offset, + (int64_t)argsp->info[1].dest_fd, + (uint64_t)argsp->info[1].dest_offset); + if (verbose) + printf(", {dest_fd=%" PRId64 + ", dest_offset=%" PRIu64 "}", + (int64_t)argsp->info[2].dest_fd, + (uint64_t)argsp->info[2].dest_offset); + else + printf(", ..."); + + ioctl(fd1, BTRFS_IOC_FILE_EXTENT_SAME, argsp); + printf("]} => {info="); + printf("[{bytes_deduped=%" PRIu64 ", status=%d}, " + "{bytes_deduped=%" PRIu64 ", status=%d}", + (uint64_t)argsp->info[0].bytes_deduped, + argsp->info[0].status, + (uint64_t)argsp->info[1].bytes_deduped, + argsp->info[1].status); + if (verbose) + printf(", {bytes_deduped=%" PRIu64 ", status=%d}", + (uint64_t)argsp->info[2].bytes_deduped, + argsp->info[2].status); + else + printf(", ..."); + printf("]}) = 0\n"); + close(fd1); + close(fd2); + unlinkat(btrfs_test_dir_fd, "file1", 0); + unlinkat(btrfs_test_dir_fd, "file2", 0); + close(fd1); + close(fd2); + } + free(argsp); +#endif /* BTRFS_IOC_FILE_EXTENT_SAME */ +} + +static void +btrfs_print_features(struct btrfs_ioctl_feature_flags *flags) +{ + printf("{compat_flags="); + printflags(btrfs_features_compat, flags->compat_flags, + "BTRFS_FEATURE_COMPAT_???"); + + printf(", compat_ro_flags="); + printflags(btrfs_features_compat_ro, flags->compat_ro_flags, + "BTRFS_FEATURE_COMPAT_RO_???"); + + printf(", incompat_flags="); + printflags(btrfs_features_incompat, flags->incompat_flags, + "BTRFS_FEATURE_INCOMPAT_???"); + printf("}"); +} + +/* + * Consumes argument, returns nothing: + * - BTRFS_IOC_SET_FEATURES + * + * Consumes nothing, returns argument: + * - BTRFS_IOC_GET_FEATURES + * - BTRFS_IOC_GET_SUPPORTED_FEATURES + */ +static void +btrfs_test_features_ioctls(void) +{ + struct btrfs_ioctl_feature_flags args[2] = { + { + .compat_flags = max_flags_plus_one(-1), + .incompat_flags = max_flags_plus_one(9), + .compat_ro_flags = max_flags_plus_one(0), + }, { + .compat_flags = max_flags_plus_one(-1), + .incompat_flags = max_flags_plus_one(9), + .compat_ro_flags = max_flags_plus_one(0), + }, + }; + struct btrfs_ioctl_feature_flags supported_features[3]; + + ioctl(-1, BTRFS_IOC_SET_FEATURES, NULL); + printf("ioctl(-1, BTRFS_IOC_SET_FEATURES, NULL) = -1 EBADF (%m)\n"); + + printf("ioctl(-1, BTRFS_IOC_SET_FEATURES, ["); + btrfs_print_features(&args[0]); + printf(", "); + btrfs_print_features(&args[1]); + ioctl(-1, BTRFS_IOC_SET_FEATURES, &args); + printf("]) = -1 EBADF (%m)\n"); + + if (btrfs_test_root) { + printf("ioctl(%d, BTRFS_IOC_GET_FEATURES, ", + btrfs_test_dir_fd); + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_FEATURES, + &supported_features); + btrfs_print_features(&supported_features[0]); + printf(") = 0\n"); + + ioctl(btrfs_test_dir_fd, BTRFS_IOC_GET_SUPPORTED_FEATURES, + &supported_features); + printf("ioctl(%d, BTRFS_IOC_GET_SUPPORTED_FEATURES, ", + btrfs_test_dir_fd); + printf("[ /* supported */ "); + btrfs_print_features(&supported_features[0]); + printf(", /* safe to set */ "); + btrfs_print_features(&supported_features[1]); + printf(", /* safe to clear */ "); + btrfs_print_features(&supported_features[2]); + printf("]) = 0\n"); + } +} + +static void +btrfs_test_read_ioctls(void) +{ + static const struct xlat btrfs_read_cmd[] = { + XLAT(BTRFS_IOC_BALANCE_PROGRESS), + XLAT(BTRFS_IOC_FS_INFO), + XLAT(BTRFS_IOC_GET_FEATURES), + XLAT(BTRFS_IOC_GET_FSLABEL), + XLAT(BTRFS_IOC_GET_SUPPORTED_FEATURES), + XLAT(BTRFS_IOC_QGROUP_LIMIT), + XLAT(BTRFS_IOC_QUOTA_RESCAN_STATUS), + XLAT(BTRFS_IOC_START_SYNC), + XLAT(BTRFS_IOC_SUBVOL_GETFLAGS), + }; + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(btrfs_read_cmd); ++i) { + ioctl(-1, (unsigned long) btrfs_read_cmd[i].val, 0); + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", btrfs_read_cmd[i].str); + } +} + +int +main(int argc, char *argv[]) +{ + + int opt; + int ret; + const char *path; + + while ((opt = getopt(argc, argv, "wv")) != -1) { + switch (opt) { + case 'v': + /* + * These tests are incomplete, especially when + * printing arrays of objects are involved. + */ + verbose = true; + break; + case 'w': + write_ok = true; + break; + default: + error_msg_and_fail("usage: btrfs [-v] [-w] [path]"); + } + } + + /* + * This will enable optional tests that require a valid file descriptor + */ + if (optind < argc) { + int rootfd; + struct statfs sfi; + path = argv[optind]; + + ret = statfs(path, &sfi); + if (ret) + perror_msg_and_fail("statfs(%s) failed", path); + + if ((unsigned) sfi.f_type != BTRFS_SUPER_MAGIC) + error_msg_and_fail("%s is not a btrfs file system", + path); + + btrfs_test_root = path; + rootfd = open(path, O_RDONLY|O_DIRECTORY); + if (rootfd < 0) + perror_msg_and_fail("open(%s) failed", path); + + ret = mkdirat(rootfd, "strace-test", 0755); + if (ret < 0 && errno != EEXIST) + perror_msg_and_fail("mkdirat(strace-test) failed"); + + btrfs_test_dir_fd = openat(rootfd, "strace-test", + O_RDONLY|O_DIRECTORY); + if (btrfs_test_dir_fd < 0) + perror_msg_and_fail("openat(strace-test) failed"); + close(rootfd); + } else + write_ok = false; + + if (btrfs_test_root) { + fprintf(stderr, "Testing live ioctls on %s (%s)\n", + btrfs_test_root, write_ok ? "read/write" : "read only"); + } + + btrfs_test_read_ioctls(); + btrfs_test_trans_ioctls(); + btrfs_test_sync_ioctls(); + btrfs_test_subvol_ioctls(); + btrfs_test_balance_ioctls(); + btrfs_test_device_ioctls(); + btrfs_test_clone_ioctls(); + btrfs_test_defrag_ioctls(); + btrfs_test_search_ioctls(); + btrfs_test_ino_lookup_ioctl(); + btrfs_test_space_info_ioctl(); + btrfs_test_scrub_ioctls(); + btrfs_test_dev_info_ioctl(); + btrfs_test_ino_path_ioctls(); + btrfs_test_set_received_subvol_ioctl(); + btrfs_test_send_ioctl(); + btrfs_test_quota_ctl_ioctl(); + btrfs_test_qgroup_assign_ioctl(); + btrfs_test_qgroup_create_ioctl(); + btrfs_test_quota_rescan_ioctl(); + btrfs_test_label_ioctls(); + btrfs_test_get_dev_stats_ioctl(); + btrfs_test_dev_replace_ioctl(); + btrfs_test_extent_same_ioctl(); + btrfs_test_features_ioctls(); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_BTRFS_H") + +#endif diff --git a/tests-mx32/btrfs.test b/tests-mx32/btrfs.test new file mode 100755 index 000000000..2121b5b86 --- /dev/null +++ b/tests-mx32/btrfs.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic btrfs ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-mx32/caps-abbrev.awk b/tests-mx32/caps-abbrev.awk new file mode 100644 index 000000000..86de7f236 --- /dev/null +++ b/tests-mx32/caps-abbrev.awk @@ -0,0 +1,52 @@ +#!/bin/gawk +# +# This file is part of caps strace test. +# +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +BEGIN { + cap = "(0|1< +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +BEGIN { + cap = "(0|1< + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +extern int capget(int *, int *); +extern int capset(int *, const int *); + +int +main(void) +{ + const int data[] = { 2, 4, 0, 8, 16, 0 }; + const int v1 = 0x19980330; + const int v2 = 0x20071026; + const int v3 = 0x20080522; + + int * const head = tail_alloc(sizeof(int) * 2); + head[0] = v3; + head[1] = 0; + int * const tail_data = tail_alloc(sizeof(data)); + + capget(NULL, NULL); + capget(head + 2, tail_data); + capget(head, tail_data + ARRAY_SIZE(data)); + + if (capget(head, tail_data)) + perror_msg_and_skip("capget"); + if (head[0] != v3) + error_msg_and_skip("capget: v3 expected"); + + memcpy(tail_data, data, sizeof(data)); + + capset(NULL, NULL); + capset(head + 2, tail_data); + + head[0] = 0xbadc0ded; + head[1] = 2718281828U; + capset(head, tail_data + ARRAY_SIZE(data) - 2); + + head[0] = v2; + head[1] = 0; + capset(head, tail_data + ARRAY_SIZE(data) - 5); + + memcpy(tail_data, data, sizeof(data)); + head[0] = v3; + if (capset(head, tail_data) == 0 || errno != EPERM) + perror_msg_and_skip("capset"); + + memset(tail_data, 0, sizeof(data) / 2); + if (capset(head, tail_data) == 0 || errno != EPERM) + perror_msg_and_skip("capset"); + + memcpy(tail_data + ARRAY_SIZE(data) / 2, data, sizeof(data) / 2); + head[0] = v1; + if (capset(head, tail_data + ARRAY_SIZE(data) / 2) == 0 || + errno != EPERM) + perror_msg_and_skip("capset"); + + return 0; +} diff --git a/tests-mx32/caps.test b/tests-mx32/caps.test new file mode 100755 index 000000000..607a75bbc --- /dev/null +++ b/tests-mx32/caps.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check capget/capset syscalls decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -a 19 -e trace=capget,capset $args +match_awk + +exit 0 diff --git a/tests-mx32/chmod.c b/tests-mx32/chmod.c new file mode 100644 index 000000000..f6f98ece6 --- /dev/null +++ b/tests-mx32/chmod.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2016 Anchit Jain + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_chmod + +#include +#include +#include +#include + +int +main(void) +{ + static const char fname[] = "chmod_test_file"; + + if (open(fname, O_CREAT|O_RDONLY, 0400) < 0) + perror_msg_and_fail("open"); + + long rc = syscall(__NR_chmod, fname, 0600); + printf("chmod(\"%s\", 0600) = %s\n", fname, sprintrc(rc)); + + if (unlink(fname)) + perror_msg_and_fail("unlink"); + + rc = syscall(__NR_chmod, fname, 051); + printf("chmod(\"%s\", 051) = %s\n", fname, sprintrc(rc)); + + rc = syscall(__NR_chmod, fname, 004); + printf("chmod(\"%s\", 004) = %s\n", fname, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chmod") + +#endif diff --git a/tests-mx32/chmod.test b/tests-mx32/chmod.test new file mode 100755 index 000000000..70e561a1e --- /dev/null +++ b/tests-mx32/chmod.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chmod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-mx32/chown.c b/tests-mx32/chown.c new file mode 100644 index 000000000..12aa8b71b --- /dev/null +++ b/tests-mx32/chown.c @@ -0,0 +1,19 @@ +#include "tests.h" +#include + +#ifdef __NR_chown + +# define SYSCALL_NR __NR_chown +# define SYSCALL_NAME "chown" + +# if defined __NR_chown32 && __NR_chown != __NR_chown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_chown") + +#endif diff --git a/tests-mx32/chown.test b/tests-mx32/chown.test new file mode 100755 index 000000000..eb356ce47 --- /dev/null +++ b/tests-mx32/chown.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-mx32/chown32.c b/tests-mx32/chown32.c new file mode 100644 index 000000000..4fffd7699 --- /dev/null +++ b/tests-mx32/chown32.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_chown32 + +# define SYSCALL_NR __NR_chown32 +# define SYSCALL_NAME "chown32" +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_chown32") + +#endif diff --git a/tests-mx32/chown32.test b/tests-mx32/chown32.test new file mode 100755 index 000000000..0fa04c204 --- /dev/null +++ b/tests-mx32/chown32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 diff --git a/tests-mx32/chroot.c b/tests-mx32/chroot.c new file mode 100644 index 000000000..a084cf337 --- /dev/null +++ b/tests-mx32/chroot.c @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_chroot + +# include +# include + +int +main(void) +{ + static const char sample[] = "chroot.sample"; + + long rc = syscall(__NR_chroot, sample); + printf("chroot(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chroot") + +#endif diff --git a/tests-mx32/chroot.test b/tests-mx32/chroot.test new file mode 100755 index 000000000..3b384f5e8 --- /dev/null +++ b/tests-mx32/chroot.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check chroot syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff --git a/tests-mx32/clock_adjtime.c b/tests-mx32/clock_adjtime.c new file mode 100644 index 000000000..01089b544 --- /dev/null +++ b/tests-mx32/clock_adjtime.c @@ -0,0 +1,60 @@ +/* + * This file is part of clock_adjtime strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_clock_adjtime + +# include +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_clock_adjtime, CLOCK_MONOTONIC, NULL); + printf("clock_adjtime(CLOCK_MONOTONIC, NULL) = %ld %s (%m)\n", + rc, errno2name()); + + void *efault = tail_alloc(1); + + rc = syscall(__NR_clock_adjtime, CLOCK_REALTIME, efault); + printf("clock_adjtime(CLOCK_REALTIME, %p) = %ld %s (%m)\n", + efault, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_clock_adjtime") + +#endif diff --git a/tests-mx32/clock_adjtime.test b/tests-mx32/clock_adjtime.test new file mode 100755 index 000000000..df2c0601a --- /dev/null +++ b/tests-mx32/clock_adjtime.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check clock_adjtime syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a37 diff --git a/tests-mx32/clock_nanosleep.c b/tests-mx32/clock_nanosleep.c new file mode 100644 index 000000000..98407d7e8 --- /dev/null +++ b/tests-mx32/clock_nanosleep.c @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +static void +handler(int signo) +{ +} + +int +main(void) +{ + struct { + struct timespec ts; + uint32_t pad[2]; + } req = { + .ts.tv_nsec = 0xc0de1, + .pad = { 0xdeadbeef, 0xbadc0ded } + }, rem = { + .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, + .pad = { 0xdeadbeef, 0xbadc0ded } + }; + const sigset_t set = {}; + const struct sigaction act = { .sa_handler = handler }; + const struct itimerval itv = { + .it_interval.tv_usec = 222222, + .it_value.tv_usec = 111111 + }; + + if (syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, &req.ts, NULL)) + perror_msg_and_skip("clock_nanosleep CLOCK_REALTIME"); + printf("clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=%jd, tv_nsec=%jd}, " + "NULL) = 0\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); + + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + NULL, &rem.ts) == -1); + printf("clock_nanosleep(CLOCK_REALTIME, 0, NULL, %p)" + " = -1 EFAULT (%m)\n", &rem.ts); + + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + &req.ts, &rem.ts) == 0); + printf("clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=%jd, tv_nsec=%jd}, " + "%p) = 0\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); + + req.ts.tv_nsec = 999999999 + 1; + assert(syscall(__NR_clock_nanosleep, CLOCK_MONOTONIC, 0, + &req.ts, &rem.ts) == -1); + printf("clock_nanosleep(CLOCK_MONOTONIC, 0" + ", {tv_sec=%jd, tv_nsec=%jd}, %p) = -1 EINVAL (%m)\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); + + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); + + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_skip("setitimer"); + printf("setitimer(ITIMER_REAL, {it_interval={tv_sec=%jd, tv_usec=%jd}" + ", it_value={tv_sec=%jd, tv_usec=%jd}}, NULL) = 0\n", + (intmax_t) itv.it_interval.tv_sec, + (intmax_t) itv.it_interval.tv_usec, + (intmax_t) itv.it_value.tv_sec, + (intmax_t) itv.it_value.tv_usec); + + --req.ts.tv_nsec; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, 0, + &req.ts, &rem.ts) == -1); + printf("clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=%jd, tv_nsec=%jd}, " + "{tv_sec=%jd, tv_nsec=%jd})" + " = ? ERESTART_RESTARTBLOCK (Interrupted by signal)\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, + (intmax_t) rem.ts.tv_sec, (intmax_t) rem.ts.tv_nsec); + puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); + + assert(syscall(__NR_clock_gettime, CLOCK_REALTIME, &req.ts) == 0); + printf("clock_gettime(CLOCK_REALTIME, {tv_sec=%jd, tv_nsec=%jd}) = 0\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); + + ++req.ts.tv_sec; + rem.ts.tv_sec = 0xc0de4; + rem.ts.tv_nsec = 0xc0de5; + assert(syscall(__NR_clock_nanosleep, CLOCK_REALTIME, TIMER_ABSTIME, + &req.ts, &rem.ts) == -1); + printf("clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, {tv_sec=%jd, " + "tv_nsec=%jd}, %p)" + " = ? ERESTARTNOHAND (To be restarted if no handler)\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); + puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/clock_nanosleep.test b/tests-mx32/clock_nanosleep.test new file mode 100755 index 000000000..ec434a60d --- /dev/null +++ b/tests-mx32/clock_nanosleep.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check clock_nanosleep, clock_gettime, and setitimer syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=clock_nanosleep,clock_gettime,setitimer diff --git a/tests-mx32/clock_xettime.c b/tests-mx32/clock_xettime.c new file mode 100644 index 000000000..3ef5695fb --- /dev/null +++ b/tests-mx32/clock_xettime.c @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#if defined __NR_clock_getres \ + && defined __NR_clock_gettime \ + && defined __NR_clock_settime + +int +main(void) +{ + struct { + struct timespec ts; + uint32_t pad[2]; + } t = { + .pad = { 0xdeadbeef, 0xbadc0ded } + }; + + if (syscall(__NR_clock_getres, CLOCK_REALTIME, &t.ts)) + perror_msg_and_skip("clock_getres CLOCK_REALTIME"); + printf("clock_getres(CLOCK_REALTIME, {tv_sec=%jd, tv_nsec=%jd}) = 0\n", + (intmax_t) t.ts.tv_sec, + (intmax_t) t.ts.tv_nsec); + + if (syscall(__NR_clock_gettime, CLOCK_PROCESS_CPUTIME_ID, &t.ts)) + perror_msg_and_skip("clock_gettime CLOCK_PROCESS_CPUTIME_ID"); + printf("clock_gettime(CLOCK_PROCESS_CPUTIME_ID, " + "{tv_sec=%jd, tv_nsec=%jd}) = 0\n", + (intmax_t) t.ts.tv_sec, + (intmax_t) t.ts.tv_nsec); + + t.ts.tv_sec = 0xdeface1; + t.ts.tv_nsec = 0xdeface2; + if (!syscall(__NR_clock_settime, CLOCK_THREAD_CPUTIME_ID, &t.ts)) + error_msg_and_skip("clock_settime CLOCK_THREAD_CPUTIME_ID:" + " EINVAL expected"); + printf("clock_settime(CLOCK_THREAD_CPUTIME_ID, {tv_sec=%jd, " + "tv_nsec=%jd}) = -1 EINVAL (%m)\n", + (intmax_t) t.ts.tv_sec, + (intmax_t) t.ts.tv_nsec); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_clock_getres && __NR_clock_gettime && __NR_clock_settime") + +#endif diff --git a/tests-mx32/clock_xettime.test b/tests-mx32/clock_xettime.test new file mode 100755 index 000000000..f045a66e8 --- /dev/null +++ b/tests-mx32/clock_xettime.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check clock_getres, clock_gettime, and clock_settime syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 -e trace=clock_getres,clock_gettime,clock_settime diff --git a/tests-mx32/copy_file_range.c b/tests-mx32/copy_file_range.c new file mode 100644 index 000000000..085010af0 --- /dev/null +++ b/tests-mx32/copy_file_range.c @@ -0,0 +1,66 @@ +/* + * This file is part of copy_file_range strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#if defined __NR_copy_file_range + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffff; + const long int fd_out = (long int) 0xdeadbeeffffffffe; + long long int *const off_in = tail_alloc(sizeof(*off_in)); + long long int *const off_out = tail_alloc(sizeof(*off_out)); + *off_in = 0xdeadbef1facefed1; + *off_out = 0xdeadbef2facefed2; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 0; + + long rc = syscall(__NR_copy_file_range, + fd_in, off_in, fd_out, off_out, len, flags); + printf("copy_file_range(%d, [%lld], %d, [%lld], %zu, %u)" + " = %ld %s (%m)\n", + (int) fd_in, *off_in, (int) fd_out, *off_out, len, flags, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_copy_file_range") + +#endif diff --git a/tests-mx32/copy_file_range.test b/tests-mx32/copy_file_range.test new file mode 100755 index 000000000..c39f6acdf --- /dev/null +++ b/tests-mx32/copy_file_range.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check copy_file_range syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/count-f.c b/tests-mx32/count-f.c new file mode 100644 index 000000000..6992b16b3 --- /dev/null +++ b/tests-mx32/count-f.c @@ -0,0 +1,102 @@ +/* + * This file is part of count-f strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +#define N 32 +#define P 8 +#define T 4 + +static void * +thread(void *arg) +{ + unsigned int i; + + assert(chdir(".") == 0); + for (i = 0; i < N; ++i) { + assert(chdir("") == -1); + assert(chdir(".") == 0); + } + + return NULL; +} + +static int +process(void) +{ + unsigned int i; + pthread_t t[T]; + + for (i = 0; i < T; ++i) { + errno = pthread_create(&t[i], NULL, thread, NULL); + if (errno) + perror_msg_and_fail("pthread_create"); + } + + for (i = 0; i < T; ++i) { + void *retval; + errno = pthread_join(t[i], &retval); + if (errno) + perror_msg_and_fail("pthread_join"); + } + + return 0; +} + +int +main(void) +{ + unsigned int i; + pid_t p[P]; + + for (i = 0; i < P; ++i) { + p[i] = fork(); + if (p[i] < 0) + perror_msg_and_fail("fork"); + if (!p[i]) + return process(); + } + for (i = 0; i < P; ++i) { + int s; + + assert(waitpid(p[i], &s, 0) == p[i]); + assert(WIFEXITED(s)); + if (WEXITSTATUS(s)) + return WEXITSTATUS(s); + } + + return 0; +} diff --git a/tests-mx32/count-f.expected b/tests-mx32/count-f.expected new file mode 100644 index 000000000..f61ba54e3 --- /dev/null +++ b/tests-mx32/count-f.expected @@ -0,0 +1 @@ +[ ]*[^ ]+ +[^ ]+ +[^ ]+ +2080 +1024 +chdir diff --git a/tests-mx32/count-f.test b/tests-mx32/count-f.test new file mode 100755 index 000000000..67515efa4 --- /dev/null +++ b/tests-mx32/count-f.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check whether -c counts through forks and clones properly + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -q -f -c $args +match_grep + +exit 0 diff --git a/tests-mx32/count.test b/tests-mx32/count.test new file mode 100755 index 000000000..e75dc6b08 --- /dev/null +++ b/tests-mx32/count.test @@ -0,0 +1,56 @@ +#!/bin/sh +# +# Check whether -c and -w options work. +# +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +check_prog grep + +grep_log() +{ + local pattern="$1"; shift + + run_strace "$@" ./sleep 1 + + grep nanosleep "$LOG" > /dev/null || + framework_skip_ 'sleep does not use nanosleep' + + LC_ALL=C grep -E -x -e "$pattern" "$LOG" > /dev/null || { + echo "Pattern of expected output: $pattern" + echo 'Actual output:' + dump_log_and_fail_with "$STRACE $args output mismatch" + } +} + +grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c +grep_log ' *[^ ]+ +0\.0[^n]*nanosleep' -c -enanosleep +grep_log ' *[^ ]+ +(1\.[01]|0\.99)[^n]*nanosleep' -cw +grep_log '100\.00 +(1\.[01]|0\.99)[^n]*nanosleep' -cw -enanosleep + +exit 0 diff --git a/tests-mx32/creat.c b/tests-mx32/creat.c new file mode 100644 index 000000000..f22fdaaa4 --- /dev/null +++ b/tests-mx32/creat.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_creat + +# define TEST_SYSCALL_NR __NR_creat +# define TEST_SYSCALL_STR "creat" +# include "umode_t.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_creat") + +#endif diff --git a/tests-mx32/creat.test b/tests-mx32/creat.test new file mode 100755 index 000000000..069648f7e --- /dev/null +++ b/tests-mx32/creat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check creat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff --git a/tests-mx32/delete_module.c b/tests-mx32/delete_module.c new file mode 100644 index 000000000..5a3176035 --- /dev/null +++ b/tests-mx32/delete_module.c @@ -0,0 +1,115 @@ +/* + * Check decoding of delete_module syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_delete_module) + +# include +# include +# include + +# include "init_delete_module.h" + +int +main(void) +{ + static const struct { + kernel_ulong_t val; + const char *str; + unsigned int val_prefix, val_suffix; + } flags[] = { + { ARG_STR(0), 0, 0 }, + { (kernel_ulong_t) 0xffffffff00000000ULL | O_NONBLOCK, + "O_NONBLOCK", 0, 0 }, + { (kernel_ulong_t) 0xbadc0dedfacef157ULL & ~(O_NONBLOCK | O_TRUNC), + " /* O_??? */", 0xfacef157U & ~(O_NONBLOCK | O_TRUNC), 0}, + { (kernel_ulong_t) (0xfacef157deade71cULL & ~O_NONBLOCK) | O_TRUNC, + "O_TRUNC", 0, 0xdeade71c & ~(O_NONBLOCK | O_TRUNC)}, + { -1LL, "O_NONBLOCK|O_TRUNC", 0, -1U & ~(O_NONBLOCK | O_TRUNC)}, + }; + + long rc; + char *bogus_param1 = tail_alloc(PARAM1_LEN); + char *bogus_param2 = tail_alloc(PARAM2_LEN); + const char *errstr; + + fill_memory_ex(bogus_param1, PARAM1_LEN, PARAM1_BASE, PARAM1_LEN); + fill_memory_ex(bogus_param2, PARAM2_LEN, PARAM2_BASE, PARAM2_LEN); + + rc = syscall(__NR_delete_module, NULL, bogus_zero); + printf("delete_module(NULL, 0) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_delete_module, bogus_param1, flags[0].val); + errstr = sprintrc(rc); + + printf("delete_module(\""); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\"..., %s) = %s\n", flags[0].str, errstr); + + bogus_param1[PARAM1_LEN - 1] = '\0'; + + rc = syscall(__NR_delete_module, bogus_param1, flags[1].val); + errstr = sprintrc(rc); + + printf("delete_module(\""); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\", %s) = %s\n", flags[1].str, errstr); + + rc = syscall(__NR_delete_module, bogus_param2 + PARAM2_LEN, + flags[2].val); + printf("delete_module(%p, %#x%s) = %s\n", + bogus_param2 + PARAM2_LEN, flags[2].val_prefix, + flags[2].str, sprintrc(rc)); + + rc = syscall(__NR_delete_module, bogus_param2, flags[3].val); + printf("delete_module(%p, %s|%#x) = %s\n", + bogus_param2, flags[3].str, flags[3].val_suffix, sprintrc(rc)); + + bogus_param2[PARAM2_LEN - 1] = '\0'; + + rc = syscall(__NR_delete_module, bogus_param2, flags[4].val); + errstr = sprintrc(rc); + + printf("delete_module(\""); + print_str(PARAM2_BASE, PARAM2_LEN - 1, true); + printf("\", %s|%#x) = %s\n", flags[4].str, flags[4].val_suffix, errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_delete_module"); + +#endif diff --git a/tests-mx32/delete_module.test b/tests-mx32/delete_module.test new file mode 100755 index 000000000..fb86ec9a0 --- /dev/null +++ b/tests-mx32/delete_module.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of delete_module syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 diff --git a/tests-mx32/detach-running.test b/tests-mx32/detach-running.test new file mode 100755 index 000000000..006efb859 --- /dev/null +++ b/tests-mx32/detach-running.test @@ -0,0 +1,90 @@ +#!/bin/sh +# +# Ensure that strace can detach from running processes. +# +# Copyright (c) 2013-2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +check_prog sleep + +set -e + +./set_ptracer_any sh -c "echo > $LOG; while :; do :; done" > /dev/null & + +while ! [ -s "$LOG" ]; do + kill -0 $! 2> /dev/null || + fail_ 'set_ptracer_any sh failed' + $SLEEP_A_BIT +done + +tracee_pid=$! + +cleanup() +{ + set +e + kill $tracee_pid + wait $tracee_pid 2> /dev/null + return 0 +} + +rm -f "$LOG" +$STRACE -p $tracee_pid 2> "$LOG" & + +while ! grep -F "Process $tracee_pid attached" "$LOG" > /dev/null; do + kill -0 $! 2> /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p failed to attach" + } + $SLEEP_A_BIT +done + +kill -INT $! +wait $! + +grep -F "Process $tracee_pid detached" "$LOG" > /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p failed to detach" + } + +if [ -f /proc/self/status ]; then + $SLEEP_A_BIT + test -d /proc/$tracee_pid || { + cleanup + dump_log_and_fail_with 'tracee died after detach' + } + grep_pid_status "$tracee_pid" '^State:.*R (running)' > /dev/null || { + grep_pid_status "$tracee_pid" '^State:' + cleanup + dump_log_and_fail_with 'tracee is not running after detach' + } +fi + +cleanup +exit 0 diff --git a/tests-mx32/detach-sleeping.test b/tests-mx32/detach-sleeping.test new file mode 100755 index 000000000..54304f311 --- /dev/null +++ b/tests-mx32/detach-sleeping.test @@ -0,0 +1,91 @@ +#!/bin/sh +# +# Ensure that strace can detach from sleeping processes. +# +# Copyright (c) 2013-2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +check_prog sleep + +set -e + +rm -f "$LOG" +./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > "$LOG" & + +while ! [ -s "$LOG" ]; do + kill -0 $! 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' + $SLEEP_A_BIT +done + +tracee_pid=$! + +cleanup() +{ + set +e + kill $tracee_pid + wait $tracee_pid 2> /dev/null + return 0 +} + +rm -f "$LOG" +$STRACE -p $tracee_pid 2> "$LOG" & + +while ! grep -F "Process $tracee_pid attached" "$LOG" > /dev/null; do + kill -0 $! 2> /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p failed to attach" + } + $SLEEP_A_BIT +done + +kill -INT $! +wait $! + +grep -F "Process $tracee_pid detached" "$LOG" > /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p failed to detach" +} + +if [ -f /proc/self/status ]; then + $SLEEP_A_BIT + test -d /proc/$tracee_pid || { + cleanup + dump_log_and_fail_with 'tracee died after detach' + } + grep_pid_status "$tracee_pid" '^State:.*S (sleeping)' > /dev/null || { + grep_pid_status "$tracee_pid" '^State:' + cleanup + dump_log_and_fail_with 'tracee is not sleeping after detach' + } +fi + +cleanup +exit 0 diff --git a/tests-mx32/detach-stopped.test b/tests-mx32/detach-stopped.test new file mode 100755 index 000000000..8f480e7f7 --- /dev/null +++ b/tests-mx32/detach-stopped.test @@ -0,0 +1,106 @@ +#!/bin/sh +# +# Ensure that strace can detach from stopped processes. +# +# Copyright (c) 2013-2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +check_prog sleep + +$STRACE -d -enone / > /dev/null 2> "$LOG" +if grep -x "[^:]*strace: PTRACE_SEIZE doesn't work" "$LOG" > /dev/null; then + skip_ "PTRACE_SEIZE doesn't work" +fi + +set -e + +rm -f "$LOG" +./set_ptracer_any sleep $((2*$TIMEOUT_DURATION)) > "$LOG" & + +while ! [ -s "$LOG" ]; do + kill -0 $! 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' + $SLEEP_A_BIT +done + +tracee_pid=$! +kill -STOP $tracee_pid + +cleanup() +{ + set +e + kill $tracee_pid + kill -CONT $tracee_pid + wait $tracee_pid 2> /dev/null + return 0 +} + +rm -f "$LOG" +$STRACE -p $tracee_pid 2> "$LOG" & + +while ! grep -F "Process $tracee_pid attached" "$LOG" > /dev/null; do + kill -0 $! 2> /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p failed to attach" + } + $SLEEP_A_BIT +done + +while ! grep -F -e '--- stopped by ' "$LOG" > /dev/null; do + kill -0 $! 2> /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p missed stop notifications" + } + $SLEEP_A_BIT +done + +kill -INT $! +wait $! + +grep -F "Process $tracee_pid detached" "$LOG" > /dev/null || { + cleanup + dump_log_and_fail_with "$STRACE -p failed to detach" +} + +if [ -f /proc/self/status ]; then + $SLEEP_A_BIT + test -d /proc/$tracee_pid || { + cleanup + dump_log_and_fail_with 'tracee died after detach' + } + grep_pid_status "$tracee_pid" '^State:.*T (stopped)' > /dev/null || { + grep_pid_status "$tracee_pid" '^State:' + cleanup + dump_log_and_fail_with 'tracee is not group-stopped after detach' + } +fi + +cleanup +exit 0 diff --git a/tests-mx32/dup.c b/tests-mx32/dup.c new file mode 100644 index 000000000..62157e2ff --- /dev/null +++ b/tests-mx32/dup.c @@ -0,0 +1,13 @@ +#include "tests.h" +#include +#include + +int +main(void) +{ + int rc = dup(-1); + printf("dup(-1) = %d %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/dup.test b/tests-mx32/dup.test new file mode 100755 index 000000000..1dc19198a --- /dev/null +++ b/tests-mx32/dup.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 diff --git a/tests-mx32/dup2.c b/tests-mx32/dup2.c new file mode 100644 index 000000000..9f3addfa9 --- /dev/null +++ b/tests-mx32/dup2.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_dup2 + +# include +# include + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffffULL; + const long int fd_new = (long int) 0xdeadbeeffffffffeULL; + + long rc = syscall(__NR_dup2, fd_old, fd_new); + printf("dup2(%d, %d) = %ld %s (%m)\n", + (int) fd_old, (int) fd_new, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_dup2") + +#endif diff --git a/tests-mx32/dup2.test b/tests-mx32/dup2.test new file mode 100755 index 000000000..509c5db13 --- /dev/null +++ b/tests-mx32/dup2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff --git a/tests-mx32/dup3.c b/tests-mx32/dup3.c new file mode 100644 index 000000000..252e84693 --- /dev/null +++ b/tests-mx32/dup3.c @@ -0,0 +1,28 @@ +#include "tests.h" +#include +#include + +#if defined __NR_dup3 && defined O_CLOEXEC + +# include +# include + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffffULL; + const long int fd_new = (long int) 0xdeadbeeffffffffeULL; + + long rc = syscall(__NR_dup3, fd_old, fd_new, O_CLOEXEC); + printf("dup3(%d, %d, O_CLOEXEC) = %ld %s (%m)\n", + (int) fd_old, (int) fd_new, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_dup3 && && O_CLOEXEC") + +#endif diff --git a/tests-mx32/dup3.test b/tests-mx32/dup3.test new file mode 100755 index 000000000..293f78f9f --- /dev/null +++ b/tests-mx32/dup3.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check dup3 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff --git a/tests-mx32/epoll_create.c b/tests-mx32/epoll_create.c new file mode 100644 index 000000000..44262c7db --- /dev/null +++ b/tests-mx32/epoll_create.c @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_create + +# include +# include + +int +main(void) +{ + const long int size = (long int) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_epoll_create, size); + printf("epoll_create(%d) = %ld %s (%m)\n", + (int) size, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_creat") + +#endif diff --git a/tests-mx32/epoll_create.test b/tests-mx32/epoll_create.test new file mode 100755 index 000000000..472a9bdbc --- /dev/null +++ b/tests-mx32/epoll_create.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_create syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff --git a/tests-mx32/epoll_create1.c b/tests-mx32/epoll_create1.c new file mode 100644 index 000000000..cd905ecb1 --- /dev/null +++ b/tests-mx32/epoll_create1.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_epoll_create1 && defined O_CLOEXEC + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_epoll_create1, O_CLOEXEC); + printf("epoll_create1(EPOLL_CLOEXEC) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_epoll_create1, O_CLOEXEC | O_NONBLOCK); + printf("epoll_create1(EPOLL_CLOEXEC|%#x) = %s\n", + O_NONBLOCK, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_create1 && O_CLOEXEC") + +#endif diff --git a/tests-mx32/epoll_create1.test b/tests-mx32/epoll_create1.test new file mode 100755 index 000000000..7a926a97d --- /dev/null +++ b/tests-mx32/epoll_create1.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_create1 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-mx32/epoll_ctl.c b/tests-mx32/epoll_ctl.c new file mode 100644 index 000000000..e66605556 --- /dev/null +++ b/tests-mx32/epoll_ctl.c @@ -0,0 +1,45 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_ctl + +# include +# include +# include +# include + +static long +invoke_syscall(unsigned long epfd, unsigned long op, unsigned long fd, void *ev) +{ + op |= (unsigned long) 0xffffffff00000000ULL; + return syscall(__NR_epoll_ctl, epfd, op, fd, (unsigned long) ev); +} + +int +main(void) +{ + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + ev->events = EPOLLIN; + + long rc = invoke_syscall(-1U, EPOLL_CTL_ADD, -2U, ev); + printf("epoll_ctl(-1, EPOLL_CTL_ADD, -2, {EPOLLIN," + " {u32=%u, u64=%" PRIu64 "}}) = %ld %s (%m)\n", + ev->data.u32, ev->data.u64, rc, errno2name()); + + rc = invoke_syscall(-3U, EPOLL_CTL_DEL, -4U, ev); + printf("epoll_ctl(-3, EPOLL_CTL_DEL, -4, %p) = %ld %s (%m)\n", + ev, rc, errno2name()); + + rc = invoke_syscall(-1UL, EPOLL_CTL_MOD, -16UL, 0); + printf("epoll_ctl(-1, EPOLL_CTL_MOD, -16, NULL) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_ctl") + +#endif diff --git a/tests-mx32/epoll_ctl.test b/tests-mx32/epoll_ctl.test new file mode 100755 index 000000000..1aded5430 --- /dev/null +++ b/tests-mx32/epoll_ctl.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_ctl syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/epoll_pwait.c b/tests-mx32/epoll_pwait.c new file mode 100644 index 000000000..eaaa34d62 --- /dev/null +++ b/tests-mx32/epoll_pwait.c @@ -0,0 +1,30 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_pwait + +# include +# include +# include +# include + +int +main(void) +{ + sigset_t set[2]; + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + + long rc = syscall(__NR_epoll_pwait, -1, ev, 1, -2, + set, (kernel_ulong_t) sizeof(set)); + printf("epoll_pwait(-1, %p, 1, -2, %p, %u) = %ld %s (%m)\n", + ev, set, (unsigned) sizeof(set), rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_pwait") + +#endif diff --git a/tests-mx32/epoll_pwait.test b/tests-mx32/epoll_pwait.test new file mode 100755 index 000000000..c7aeeace7 --- /dev/null +++ b/tests-mx32/epoll_pwait.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of epoll_pwait syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/epoll_wait.c b/tests-mx32/epoll_wait.c new file mode 100644 index 000000000..038bf1f78 --- /dev/null +++ b/tests-mx32/epoll_wait.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_epoll_wait + +# include +# include +# include + +int +main(void) +{ + struct epoll_event *const ev = tail_alloc(sizeof(*ev)); + + long rc = syscall(__NR_epoll_wait, -1, ev, 1, -2); + printf("epoll_wait(-1, %p, 1, -2) = %ld %s (%m)\n", + ev, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_epoll_wait") + +#endif diff --git a/tests-mx32/epoll_wait.test b/tests-mx32/epoll_wait.test new file mode 100755 index 000000000..83ae161f3 --- /dev/null +++ b/tests-mx32/epoll_wait.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check epoll_wait syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a26 diff --git a/tests-mx32/erestartsys.c b/tests-mx32/erestartsys.c new file mode 100644 index 000000000..97c9699c4 --- /dev/null +++ b/tests-mx32/erestartsys.c @@ -0,0 +1,81 @@ +/* + * Check decoding of ERESTARTSYS error code. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +static int sv[2]; + +static void +handler(int sig) +{ + close(sv[1]); + sv[1] = -1; +} + +int +main(void) +{ + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + + const struct sigaction act = { + .sa_handler = handler, + .sa_flags = SA_RESTART + }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct itimerval itv = { .it_value.tv_usec = 123456 }; + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_fail("setitimer"); + + if (recvfrom(sv[0], &sv[1], sizeof(sv[1]), 0, NULL, NULL)) + perror_msg_and_fail("recvfrom"); + + printf("recvfrom(%d, %p, %d, 0, NULL, NULL) = ? ERESTARTSYS" + " (To be restarted if SA_RESTART is set)\n", + sv[0], &sv[1], (int) sizeof(sv[1])); + printf("recvfrom(%d, \"\", %d, 0, NULL, NULL) = 0\n", + sv[0], (int) sizeof(sv[1])); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/erestartsys.test b/tests-mx32/erestartsys.test new file mode 100755 index 000000000..91f711f3b --- /dev/null +++ b/tests-mx32/erestartsys.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of ERESTARTSYS error code. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a34 -e signal=none -e trace=recvfrom diff --git a/tests-mx32/errno2name.c b/tests-mx32/errno2name.c new file mode 100644 index 000000000..4a176993b --- /dev/null +++ b/tests-mx32/errno2name.c @@ -0,0 +1,481 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#define CASE(x) case x: return #x + +const char * +errno2name(void) +{ + switch (errno) { + /* names taken from linux/errnoent.h */ +#ifdef E2BIG + CASE(E2BIG); +#endif +#ifdef EACCES + CASE(EACCES); +#endif +#ifdef EADDRINUSE + CASE(EADDRINUSE); +#endif +#ifdef EADDRNOTAVAIL + CASE(EADDRNOTAVAIL); +#endif +#ifdef EADV + CASE(EADV); +#endif +#ifdef EAFNOSUPPORT + CASE(EAFNOSUPPORT); +#endif +#ifdef EAGAIN + CASE(EAGAIN); +#endif +#ifdef EALREADY + CASE(EALREADY); +#endif +#ifdef EBADCOOKIE + CASE(EBADCOOKIE); +#endif +#ifdef EBADE + CASE(EBADE); +#endif +#ifdef EBADF + CASE(EBADF); +#endif +#ifdef EBADFD + CASE(EBADFD); +#endif +#ifdef EBADHANDLE + CASE(EBADHANDLE); +#endif +#ifdef EBADMSG + CASE(EBADMSG); +#endif +#ifdef EBADR + CASE(EBADR); +#endif +#ifdef EBADRQC + CASE(EBADRQC); +#endif +#ifdef EBADSLT + CASE(EBADSLT); +#endif +#ifdef EBADTYPE + CASE(EBADTYPE); +#endif +#ifdef EBFONT + CASE(EBFONT); +#endif +#ifdef EBUSY + CASE(EBUSY); +#endif +#ifdef ECANCELED + CASE(ECANCELED); +#endif +#ifdef ECHILD + CASE(ECHILD); +#endif +#ifdef ECHRNG + CASE(ECHRNG); +#endif +#ifdef ECOMM + CASE(ECOMM); +#endif +#ifdef ECONNABORTED + CASE(ECONNABORTED); +#endif +#ifdef ECONNREFUSED + CASE(ECONNREFUSED); +#endif +#ifdef ECONNRESET + CASE(ECONNRESET); +#endif +#ifdef EDEADLK + CASE(EDEADLK); +#endif +#ifdef EDESTADDRREQ + CASE(EDESTADDRREQ); +#endif +#ifdef EDOM + CASE(EDOM); +#endif +#ifdef EDOTDOT + CASE(EDOTDOT); +#endif +#ifdef EDQUOT + CASE(EDQUOT); +#endif +#ifdef EEXIST + CASE(EEXIST); +#endif +#ifdef EFAULT + CASE(EFAULT); +#endif +#ifdef EFBIG + CASE(EFBIG); +#endif +#ifdef EHOSTDOWN + CASE(EHOSTDOWN); +#endif +#ifdef EHOSTUNREACH + CASE(EHOSTUNREACH); +#endif +#ifdef EHWPOISON + CASE(EHWPOISON); +#endif +#ifdef EIDRM + CASE(EIDRM); +#endif +#ifdef EILSEQ + CASE(EILSEQ); +#endif +#ifdef EINPROGRESS + CASE(EINPROGRESS); +#endif +#ifdef EINTR + CASE(EINTR); +#endif +#ifdef EINVAL + CASE(EINVAL); +#endif +#ifdef EIO + CASE(EIO); +#endif +#ifdef EIOCBQUEUED + CASE(EIOCBQUEUED); +#endif +#ifdef EISCONN + CASE(EISCONN); +#endif +#ifdef EISDIR + CASE(EISDIR); +#endif +#ifdef EISNAM + CASE(EISNAM); +#endif +#ifdef EJUKEBOX + CASE(EJUKEBOX); +#endif +#ifdef EKEYEXPIRED + CASE(EKEYEXPIRED); +#endif +#ifdef EKEYREJECTED + CASE(EKEYREJECTED); +#endif +#ifdef EKEYREVOKED + CASE(EKEYREVOKED); +#endif +#ifdef EL2HLT + CASE(EL2HLT); +#endif +#ifdef EL2NSYNC + CASE(EL2NSYNC); +#endif +#ifdef EL3HLT + CASE(EL3HLT); +#endif +#ifdef EL3RST + CASE(EL3RST); +#endif +#ifdef ELIBACC + CASE(ELIBACC); +#endif +#ifdef ELIBBAD + CASE(ELIBBAD); +#endif +#ifdef ELIBEXEC + CASE(ELIBEXEC); +#endif +#ifdef ELIBMAX + CASE(ELIBMAX); +#endif +#ifdef ELIBSCN + CASE(ELIBSCN); +#endif +#ifdef ELNRNG + CASE(ELNRNG); +#endif +#ifdef ELOOP + CASE(ELOOP); +#endif +#ifdef EMEDIUMTYPE + CASE(EMEDIUMTYPE); +#endif +#ifdef EMFILE + CASE(EMFILE); +#endif +#ifdef EMLINK + CASE(EMLINK); +#endif +#ifdef EMSGSIZE + CASE(EMSGSIZE); +#endif +#ifdef EMULTIHOP + CASE(EMULTIHOP); +#endif +#ifdef ENAMETOOLONG + CASE(ENAMETOOLONG); +#endif +#ifdef ENAVAIL + CASE(ENAVAIL); +#endif +#ifdef ENETDOWN + CASE(ENETDOWN); +#endif +#ifdef ENETRESET + CASE(ENETRESET); +#endif +#ifdef ENETUNREACH + CASE(ENETUNREACH); +#endif +#ifdef ENFILE + CASE(ENFILE); +#endif +#ifdef ENOANO + CASE(ENOANO); +#endif +#ifdef ENOBUFS + CASE(ENOBUFS); +#endif +#ifdef ENOCSI + CASE(ENOCSI); +#endif +#ifdef ENODATA + CASE(ENODATA); +#endif +#ifdef ENODEV + CASE(ENODEV); +#endif +#ifdef ENOENT + CASE(ENOENT); +#endif +#ifdef ENOEXEC + CASE(ENOEXEC); +#endif +#ifdef ENOIOCTLCMD + CASE(ENOIOCTLCMD); +#endif +#ifdef ENOKEY + CASE(ENOKEY); +#endif +#ifdef ENOLCK + CASE(ENOLCK); +#endif +#ifdef ENOLINK + CASE(ENOLINK); +#endif +#ifdef ENOMEDIUM + CASE(ENOMEDIUM); +#endif +#ifdef ENOMEM + CASE(ENOMEM); +#endif +#ifdef ENOMSG + CASE(ENOMSG); +#endif +#ifdef ENONET + CASE(ENONET); +#endif +#ifdef ENOPKG + CASE(ENOPKG); +#endif +#ifdef ENOPROTOOPT + CASE(ENOPROTOOPT); +#endif +#ifdef ENOSPC + CASE(ENOSPC); +#endif +#ifdef ENOSR + CASE(ENOSR); +#endif +#ifdef ENOSTR + CASE(ENOSTR); +#endif +#ifdef ENOSYS + CASE(ENOSYS); +#endif +#ifdef ENOTBLK + CASE(ENOTBLK); +#endif +#ifdef ENOTCONN + CASE(ENOTCONN); +#endif +#ifdef ENOTDIR + CASE(ENOTDIR); +#endif +#ifdef ENOTEMPTY + CASE(ENOTEMPTY); +#endif +#ifdef ENOTNAM + CASE(ENOTNAM); +#endif +#ifdef ENOTRECOVERABLE + CASE(ENOTRECOVERABLE); +#endif +#ifdef ENOTSOCK + CASE(ENOTSOCK); +#endif +#ifdef ENOTSUPP + CASE(ENOTSUPP); +#endif +#ifdef ENOTSYNC + CASE(ENOTSYNC); +#endif +#ifdef ENOTTY + CASE(ENOTTY); +#endif +#ifdef ENOTUNIQ + CASE(ENOTUNIQ); +#endif +#ifdef ENXIO + CASE(ENXIO); +#endif +#ifdef EOPENSTALE + CASE(EOPENSTALE); +#endif +#ifdef EOPNOTSUPP + CASE(EOPNOTSUPP); +#endif +#ifdef EOVERFLOW + CASE(EOVERFLOW); +#endif +#ifdef EOWNERDEAD + CASE(EOWNERDEAD); +#endif +#ifdef EPERM + CASE(EPERM); +#endif +#ifdef EPFNOSUPPORT + CASE(EPFNOSUPPORT); +#endif +#ifdef EPIPE + CASE(EPIPE); +#endif +#ifdef EPROBE_DEFER + CASE(EPROBE_DEFER); +#endif +#ifdef EPROTO + CASE(EPROTO); +#endif +#ifdef EPROTONOSUPPORT + CASE(EPROTONOSUPPORT); +#endif +#ifdef EPROTOTYPE + CASE(EPROTOTYPE); +#endif +#ifdef ERANGE + CASE(ERANGE); +#endif +#ifdef EREMCHG + CASE(EREMCHG); +#endif +#ifdef EREMOTE + CASE(EREMOTE); +#endif +#ifdef EREMOTEIO + CASE(EREMOTEIO); +#endif +#ifdef ERESTART + CASE(ERESTART); +#endif +#ifdef ERESTARTNOHAND + CASE(ERESTARTNOHAND); +#endif +#ifdef ERESTARTNOINTR + CASE(ERESTARTNOINTR); +#endif +#ifdef ERESTARTSYS + CASE(ERESTARTSYS); +#endif +#ifdef ERESTART_RESTARTBLOCK + CASE(ERESTART_RESTARTBLOCK); +#endif +#ifdef ERFKILL + CASE(ERFKILL); +#endif +#ifdef EROFS + CASE(EROFS); +#endif +#ifdef ESERVERFAULT + CASE(ESERVERFAULT); +#endif +#ifdef ESHUTDOWN + CASE(ESHUTDOWN); +#endif +#ifdef ESOCKTNOSUPPORT + CASE(ESOCKTNOSUPPORT); +#endif +#ifdef ESPIPE + CASE(ESPIPE); +#endif +#ifdef ESRCH + CASE(ESRCH); +#endif +#ifdef ESRMNT + CASE(ESRMNT); +#endif +#ifdef ESTALE + CASE(ESTALE); +#endif +#ifdef ESTRPIPE + CASE(ESTRPIPE); +#endif +#ifdef ETIME + CASE(ETIME); +#endif +#ifdef ETIMEDOUT + CASE(ETIMEDOUT); +#endif +#ifdef ETOOMANYREFS + CASE(ETOOMANYREFS); +#endif +#ifdef ETOOSMALL + CASE(ETOOSMALL); +#endif +#ifdef ETXTBSY + CASE(ETXTBSY); +#endif +#ifdef EUCLEAN + CASE(EUCLEAN); +#endif +#ifdef EUNATCH + CASE(EUNATCH); +#endif +#ifdef EUSERS + CASE(EUSERS); +#endif +#ifdef EXDEV + CASE(EXDEV); +#endif +#ifdef EXFULL + CASE(EXFULL); +#endif + default: perror_msg_and_fail("unknown errno %d", errno); + } +} diff --git a/tests-mx32/error_msg.c b/tests-mx32/error_msg.c new file mode 100644 index 000000000..498a88213 --- /dev/null +++ b/tests-mx32/error_msg.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +void +perror_msg_and_fail(const char *fmt, ...) +{ + int err_no = errno; + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + if (err_no) + fprintf(stderr, ": %s\n", strerror(err_no)); + else + putc('\n', stderr); + exit(1); +} + +void +error_msg_and_fail(const char *fmt, ...) +{ + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + putc('\n', stderr); + exit(1); +} + +void +error_msg_and_skip(const char *fmt, ...) +{ + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + putc('\n', stderr); + exit(77); +} + +void +perror_msg_and_skip(const char *fmt, ...) +{ + int err_no = errno; + va_list p; + + va_start(p, fmt); + vfprintf(stderr, fmt, p); + if (err_no) + fprintf(stderr, ": %s\n", strerror(err_no)); + else + putc('\n', stderr); + exit(77); +} diff --git a/tests-mx32/eventfd.c b/tests-mx32/eventfd.c new file mode 100644 index 000000000..d6ad6492e --- /dev/null +++ b/tests-mx32/eventfd.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +#if defined __NR_eventfd2 && defined O_CLOEXEC + +int +main(void) +{ + (void) close(0); + if (syscall(__NR_eventfd2, -1L, 1 | O_CLOEXEC | O_NONBLOCK)) + perror_msg_and_skip("eventfd2"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_eventfd2 && O_CLOEXEC") + +#endif diff --git a/tests-mx32/eventfd.expected b/tests-mx32/eventfd.expected new file mode 100644 index 000000000..c4b45a073 --- /dev/null +++ b/tests-mx32/eventfd.expected @@ -0,0 +1,2 @@ +eventfd2(4294967295, EFD_SEMAPHORE|EFD_CLOEXEC|EFD_NONBLOCK) = 0 ++++ exited with 0 +++ diff --git a/tests-mx32/eventfd.test b/tests-mx32/eventfd.test new file mode 100755 index 000000000..e181ed6ef --- /dev/null +++ b/tests-mx32/eventfd.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check eventfd2 syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -e eventfd2 $args +match_diff + +exit 0 diff --git a/tests-mx32/execve-v.c b/tests-mx32/execve-v.c new file mode 100644 index 000000000..4506c6359 --- /dev/null +++ b/tests-mx32/execve-v.c @@ -0,0 +1,3 @@ +/* This file is part of execve-v strace test. */ +#define VERBOSE 1 +#include "execve.c" diff --git a/tests-mx32/execve-v.test b/tests-mx32/execve-v.test new file mode 100755 index 000000000..cce586014 --- /dev/null +++ b/tests-mx32/execve-v.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check verbose decoding of execve syscall. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -veexecve $args > "$EXP" + +# Filter out execve() call made by strace. +grep -F test.execve < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/execve.c b/tests-mx32/execve.c new file mode 100644 index 000000000..74749e73e --- /dev/null +++ b/tests-mx32/execve.c @@ -0,0 +1,171 @@ +/* + * This file is part of execve strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#define FILENAME "test.execve\nfilename" +#define Q_FILENAME "test.execve\\nfilename" + +static const char * const argv[] = { + FILENAME, "first", "second", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_argv[] = { + Q_FILENAME, "first", "second" +}; + +static const char * const envp[] = { + "foobar=1", "foo\nbar=2", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_envp[] = { + "foobar=1", "foo\\nbar=2" +}; + +int +main(void) +{ + char ** const tail_argv = tail_memdup(argv, sizeof(argv)); + char ** const tail_envp = tail_memdup(envp, sizeof(envp)); + + execve(FILENAME, tail_argv, tail_envp); + printf("execve(\"%s\"" + ", [\"%s\", \"%s\", \"%s\", %p, %p, %p, ???]" +#if VERBOSE + ", [\"%s\", \"%s\", %p, %p, %p, ???]" +#else + ", [/* 5 vars, unterminated */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], + argv[3], argv[4], argv[5] +#if VERBOSE + , q_envp[0], q_envp[1], envp[2], envp[3], envp[4] +#endif + ); + + tail_argv[ARRAY_SIZE(q_argv)] = NULL; + tail_envp[ARRAY_SIZE(q_envp)] = NULL; + + execve(FILENAME, tail_argv, tail_envp); + printf("execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" +#if VERBOSE + ", [\"%s\", \"%s\"]" +#else + ", [/* 2 vars */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2] +#if VERBOSE + , q_envp[0], q_envp[1] +#endif + ); + + execve(FILENAME, tail_argv + 2, tail_envp + 1); + printf("execve(\"%s\", [\"%s\"]" +#if VERBOSE + ", [\"%s\"]" +#else + ", [/* 1 var */]" +#endif + ") = -1 ENOENT (%m)\n", + Q_FILENAME, q_argv[2] +#if VERBOSE + , q_envp[1] +#endif + ); + + char **const empty = tail_alloc(sizeof(*empty)); + char **const efault = empty + 1; + *empty = NULL; + + execve(FILENAME, empty, empty); + printf("execve(\"%s\", []" +#if VERBOSE + ", []" +#else + ", [/* 0 vars */]" +#endif + ") = -1 ENOENT (%m)\n", Q_FILENAME); + + char str_a[] = "012345678901234567890123456789012"; + char str_b[] = "_abcdefghijklmnopqrstuvwxyz()[]{}"; +#define DEFAULT_STRLEN ((unsigned int) sizeof(str_a) - 2) + char **const a = tail_alloc(sizeof(*a) * (DEFAULT_STRLEN + 2)); + char **const b = tail_alloc(sizeof(*b) * (DEFAULT_STRLEN + 2)); + unsigned int i; + for (i = 0; i <= DEFAULT_STRLEN; ++i) { + a[i] = &str_a[i]; + b[i] = &str_b[i]; + } + a[i] = b[i] = NULL; + + execve(FILENAME, a, b); + printf("execve(\"%s\", [\"%.*s\"...", Q_FILENAME, DEFAULT_STRLEN, a[0]); + for (i = 1; i < DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#if VERBOSE + printf(", \"%s\"", a[i]); +#else + printf(", ..."); +#endif +#if VERBOSE + printf("], [\"%.*s\"...", DEFAULT_STRLEN, b[0]); + for (i = 1; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %u vars */", DEFAULT_STRLEN + 1); +#endif + printf("]) = -1 ENOENT (%m)\n"); + + execve(FILENAME, a + 1, b + 1); + printf("execve(\"%s\", [\"%s\"", Q_FILENAME, a[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#if VERBOSE + printf("], [\"%s\"", b[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %d vars */", DEFAULT_STRLEN); +#endif + printf("]) = -1 ENOENT (%m)\n"); + + execve(FILENAME, (char **) tail_argv[ARRAY_SIZE(q_argv)], efault); + printf("execve(\"%s\", NULL, %p) = -1 ENOENT (%m)\n", + Q_FILENAME, efault); + + execve(FILENAME, efault, NULL); + printf("execve(\"%s\", %p, NULL) = -1 ENOENT (%m)\n", + Q_FILENAME, efault); + + return 0; +} diff --git a/tests-mx32/execve.test b/tests-mx32/execve.test new file mode 100755 index 000000000..263b6fc5b --- /dev/null +++ b/tests-mx32/execve.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check execve syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -eexecve $args > "$EXP" + +# Filter out execve() call made by strace. +grep -F test.execve < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/execveat-v.c b/tests-mx32/execveat-v.c new file mode 100644 index 000000000..ff4de2e88 --- /dev/null +++ b/tests-mx32/execveat-v.c @@ -0,0 +1,3 @@ +/* This file is part of execveat-v strace test. */ +#define VERBOSE 1 +#include "execveat.c" diff --git a/tests-mx32/execveat-v.test b/tests-mx32/execveat-v.test new file mode 100755 index 000000000..a90522485 --- /dev/null +++ b/tests-mx32/execveat-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of execveat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=execveat diff --git a/tests-mx32/execveat.c b/tests-mx32/execveat.c new file mode 100644 index 000000000..9083830eb --- /dev/null +++ b/tests-mx32/execveat.c @@ -0,0 +1,188 @@ +/* + * This file is part of execveat strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_execveat + +# include +# include + +# define FILENAME "test.execveat\nfilename" +# define Q_FILENAME "test.execveat\\nfilename" + +static const char * const argv[] = { + FILENAME, "first", "second", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_argv[] = { + Q_FILENAME, "first", "second" +}; + +static const char * const envp[] = { + "foobar=1", "foo\nbar=2", (const char *) -1L, + (const char *) -2L, (const char *) -3L +}; +static const char * const q_envp[] = { + "foobar=1", "foo\\nbar=2" +}; + +int +main(void) +{ + const char ** const tail_argv = tail_memdup(argv, sizeof(argv)); + const char ** const tail_envp = tail_memdup(envp, sizeof(envp)); + + syscall(__NR_execveat, -100, FILENAME, tail_argv, tail_envp, 0x1100); + printf("execveat(AT_FDCWD, \"%s\"" + ", [\"%s\", \"%s\", \"%s\", %p, %p, %p, ???]" +#if VERBOSE + ", [\"%s\", \"%s\", %p, %p, %p, ???]" +#else + ", [/* 5 vars, unterminated */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], + argv[3], argv[4], argv[5], +#if VERBOSE + q_envp[0], q_envp[1], envp[2], envp[3], envp[4], +#endif + errno2name()); + + tail_argv[ARRAY_SIZE(q_argv)] = NULL; + tail_envp[ARRAY_SIZE(q_envp)] = NULL; + + syscall(__NR_execveat, -100, FILENAME, tail_argv, tail_envp, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\", \"%s\", \"%s\"]" +#if VERBOSE + ", [\"%s\", \"%s\"]" +#else + ", [/* 2 vars */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[0], q_argv[1], q_argv[2], +#if VERBOSE + q_envp[0], q_envp[1], +#endif + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, tail_argv + 2, tail_envp + 1, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\"]" +#if VERBOSE + ", [\"%s\"]" +#else + ", [/* 1 var */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, q_argv[2], +#if VERBOSE + q_envp[1], +#endif + errno2name()); + + char **const empty = tail_alloc(sizeof(*empty)); + char **const efault = empty + 1; + *empty = NULL; + + syscall(__NR_execveat, -100, FILENAME, empty, empty, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", []" +#if VERBOSE + ", []" +#else + ", [/* 0 vars */]" +#endif + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, errno2name()); + + char str_a[] = "012345678901234567890123456789012"; + char str_b[] = "_abcdefghijklmnopqrstuvwxyz()[]{}"; +#define DEFAULT_STRLEN ((unsigned int) sizeof(str_a) - 2) + char **const a = tail_alloc(sizeof(*a) * (DEFAULT_STRLEN + 2)); + char **const b = tail_alloc(sizeof(*b) * (DEFAULT_STRLEN + 2)); + unsigned int i; + for (i = 0; i <= DEFAULT_STRLEN; ++i) { + a[i] = &str_a[i]; + b[i] = &str_b[i]; + } + a[i] = b[i] = NULL; + + syscall(__NR_execveat, -100, FILENAME, a, b, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%.*s\"...", Q_FILENAME, DEFAULT_STRLEN, a[0]); + for (i = 1; i < DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#if VERBOSE + printf(", \"%s\"", a[i]); +#else + printf(", ..."); +#endif +#if VERBOSE + printf("], [\"%.*s\"...", DEFAULT_STRLEN, b[0]); + for (i = 1; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %u vars */", DEFAULT_STRLEN + 1); +#endif + printf("], AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, a + 1, b + 1, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", [\"%s\"", Q_FILENAME, a[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", a[i]); +#if VERBOSE + printf("], [\"%s\"", b[1]); + for (i = 2; i <= DEFAULT_STRLEN; ++i) + printf(", \"%s\"", b[i]); +#else + printf("], [/* %d vars */", DEFAULT_STRLEN); +#endif + printf("], AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + errno2name()); + + syscall(__NR_execveat, -100, FILENAME, NULL, efault, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", NULL, %p" + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, efault, errno2name()); + + syscall(__NR_execveat, -100, FILENAME, efault, NULL, 0x1100); + printf("execveat(AT_FDCWD, \"%s\", %p, NULL" + ", AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) = -1 %s (%m)\n", + Q_FILENAME, efault, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_execveat") + +#endif diff --git a/tests-mx32/execveat.test b/tests-mx32/execveat.test new file mode 100755 index 000000000..879e03e2a --- /dev/null +++ b/tests-mx32/execveat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check execveat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/faccessat.c b/tests-mx32/faccessat.c new file mode 100644 index 000000000..ce81349d1 --- /dev/null +++ b/tests-mx32/faccessat.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_faccessat + +# include +# include + +int +main(void) +{ + static const char sample[] = "faccessat.sample"; + const long int fd = (long int) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_faccessat, fd, sample, F_OK); + printf("faccessat(%d, \"%s\", F_OK) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_faccessat") + +#endif diff --git a/tests-mx32/faccessat.test b/tests-mx32/faccessat.test new file mode 100755 index 000000000..61e7e2fdd --- /dev/null +++ b/tests-mx32/faccessat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check faccessat syscall decoding. + +. "${srcdir=.}/openat.test" diff --git a/tests-mx32/fadvise.h b/tests-mx32/fadvise.h new file mode 100644 index 000000000..7a75f73b2 --- /dev/null +++ b/tests-mx32/fadvise.h @@ -0,0 +1,57 @@ +/* + * Common definitions for fadvise64 and fadvise64_64 tests. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef STRACE_TESTS_FADVISE_H +#define STRACE_TESTS_FADVISE_H + +# include +# include +# include + +# include "xlat.h" +# include "xlat/advise.h" + +static void do_fadvise(long fd, long long offset, long long llen, long advice); + +int +main(void) +{ + static const long bogus_fd = (long) 0xfeedf00dbeeffaceULL; + static const long long bogus_offset = 0xbadc0dedda7a1057ULL; + static const long long bogus_len = 0xbadfaceca7b0d1e5ULL; + static const long bogus_advice = (long) 0xf00dfeeddeadca75ULL; + + do_fadvise(bogus_fd, bogus_offset, bogus_len, bogus_advice); + + puts("+++ exited with 0 +++"); + return 0; +} + +#endif /* !STRACE_TESTS_FADVISE_H */ diff --git a/tests-mx32/fadvise64.c b/tests-mx32/fadvise64.c new file mode 100644 index 000000000..930680be1 --- /dev/null +++ b/tests-mx32/fadvise64.c @@ -0,0 +1,76 @@ +/* + * Check decoding of fadvise64 syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_fadvise64 + +# include "fadvise.h" + +static void +do_fadvise(long fd, long long offset, long long llen, long advice) +{ + long ret; + const char *errstr; + +# if (LONG_MAX > INT_MAX) \ + || (defined __x86_64__ && defined __ILP32__) \ + || defined LINUX_MIPSN32 + ret = syscall(__NR_fadvise64, fd, offset, llen, advice); + errstr = sprintrc(ret); + printf("fadvise64(%d, %lld, %llu, ", (int) fd, offset, llen); +# elif defined LINUX_MIPSO32 + ret = syscall(__NR_fadvise64, fd, 0, + LL_VAL_TO_PAIR(offset), LL_VAL_TO_PAIR(llen), advice); + errstr = sprintrc(ret); + printf("fadvise64(%d, %lld, %lld, ", (int) fd, offset, llen); +# else /* LONG_MAX == INT_MAX && !X32 && !LINUX_MIPSN32 */ + long len = (long) llen; +# if defined POWERPC + ret = syscall(__NR_fadvise64, fd, 0, + LL_VAL_TO_PAIR(offset), len, advice); +# else + ret = syscall(__NR_fadvise64, fd, + LL_VAL_TO_PAIR(offset), len, advice); +# endif + errstr = sprintrc(ret); + printf("fadvise64(%d, %lld, %lu, ", (int) fd, offset, len); +# endif /* LONG_MAX == INT_MAX && !X32 && !LINUX_MIPSN32 */ + printxval(advise, (unsigned) advice, "POSIX_FADV_???"); + printf(") = %s\n", errstr); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fadvise64"); + +#endif diff --git a/tests-mx32/fadvise64.test b/tests-mx32/fadvise64.test new file mode 100755 index 000000000..9f7467206 --- /dev/null +++ b/tests-mx32/fadvise64.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of fadvise64 syscall. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -e $NAME $args > "$EXP" +check_prog grep +grep -v "^$NAME([0123]," < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/fadvise64_64.c b/tests-mx32/fadvise64_64.c new file mode 100644 index 000000000..c23df97ff --- /dev/null +++ b/tests-mx32/fadvise64_64.c @@ -0,0 +1,74 @@ +/* + * Check decoding of fadvise64_64 syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __arm__ +# ifdef __NR_arm_fadvise64_64 +# undef __NR_fadvise64_64 +# define __NR_fadvise64_64 __NR_arm_fadvise64_64 +# endif /* __NR_arm_fadvise64_64 */ +#endif /* __arm__ */ + +#ifdef __NR_fadvise64_64 + +# include "fadvise.h" + +static void +do_fadvise(long fd, long long offset, long long llen, long advice) +{ + long ret; + const char *errstr; + +# if (LONG_MAX > INT_MAX) \ + || (defined __x86_64__ && defined __ILP32__) \ + || defined LINUX_MIPSN32 + ret = syscall(__NR_fadvise64_64, fd, offset, llen, advice); +# elif defined __ARM_EABI__ || defined POWERPC || defined XTENSA + ret = syscall(__NR_fadvise64_64, fd, advice, + LL_VAL_TO_PAIR(offset), LL_VAL_TO_PAIR(llen)); +# else + ret = syscall(__NR_fadvise64_64, fd, + LL_VAL_TO_PAIR(offset), LL_VAL_TO_PAIR(llen), advice); +# endif + errstr = sprintrc(ret); + + printf("fadvise64_64(%d, %lld, %lld, ", (int) fd, offset, llen); + printxval(advise, (unsigned) advice, "POSIX_FADV_???"); + printf(") = %s\n", errstr); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fadvise64_64"); + +#endif diff --git a/tests-mx32/fadvise64_64.test b/tests-mx32/fadvise64_64.test new file mode 100755 index 000000000..a50fe2b9f --- /dev/null +++ b/tests-mx32/fadvise64_64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of fadvise64_64 syscall. + +. "${srcdir=.}/fadvise64.test" diff --git a/tests-mx32/fallocate.c b/tests-mx32/fallocate.c new file mode 100644 index 000000000..a31711b3b --- /dev/null +++ b/tests-mx32/fallocate.c @@ -0,0 +1,75 @@ +/* + * Check decoding of fallocate syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_fallocate) && defined(HAVE_FALLOCATE) && HAVE_FALLOCATE + +# include +# include +# include + +# include "xlat.h" +# include "xlat/falloc_flags.h" + +int +main(void) +{ + static const int bogus_fd = 0xbeefface; + static const int bogus_mode = 0xdeadca75; + static const off_t bogus_offset = (off_t) 0xbadc0dedda7a1057LLU; + static const off_t bogus_len = (off_t) 0xbadfaceca7b0d1e5LLU; + + long rc = fallocate(bogus_fd, bogus_mode, bogus_offset, bogus_len); + /* + * Workaround a bug fixed by commit glibc-2.11-346-gde240a0. + */ + if (rc > 0) { + errno = rc; + rc = -1; + } + const char *errstr = sprintrc(rc); + + printf("fallocate(%d, ", bogus_fd); + printflags(falloc_flags, (unsigned) bogus_mode, "FALLOC_FL_???"); + printf(", %lld, %lld) = %s\n", + (long long) bogus_offset, (long long) bogus_len, errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fallocate && HAVE_FALLOCATE"); + +#endif diff --git a/tests-mx32/fallocate.test b/tests-mx32/fallocate.test new file mode 100755 index 000000000..405187e5c --- /dev/null +++ b/tests-mx32/fallocate.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getcwd syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff --git a/tests-mx32/fanotify_init.c b/tests-mx32/fanotify_init.c new file mode 100644 index 000000000..c14b41318 --- /dev/null +++ b/tests-mx32/fanotify_init.c @@ -0,0 +1,95 @@ +/* + * Check decoding of fanotify_init syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined __NR_fanotify_init + +# include +# include +# include + +/* Performs fanotify_init call via the syscall interface. */ +static void +do_call(kernel_ulong_t flags, const char *flags_str, + kernel_ulong_t event_f_flags, const char *event_f_flags_str) +{ + long rc; + + rc = syscall(__NR_fanotify_init, flags, event_f_flags); + + printf("fanotify_init(%s, %s) = %s\n", + flags_str, event_f_flags_str, sprintrc(rc)); +} + +struct strval { + kernel_ulong_t val; + const char *str; +}; + + +int +main(void) +{ + static const struct strval flags[] = { + { (kernel_ulong_t) 0xffffffff00000000ULL, "FAN_CLASS_NOTIF" }, + { (kernel_ulong_t) 0xffffffff0000000cULL, + "0xc /* FAN_CLASS_??? */" }, + { (kernel_ulong_t) 0xdec0deddefaced04ULL, + "FAN_CLASS_CONTENT|0xefaced00 /* FAN_??? */" }, + { (kernel_ulong_t) 0xffffffffffffffffULL, + "0xc /* FAN_CLASS_??? */|FAN_CLOEXEC|FAN_NONBLOCK|" + "FAN_UNLIMITED_QUEUE|FAN_UNLIMITED_MARKS|0xffffffc0" }, + }; + static const struct strval event_f_flags[] = { + { (kernel_ulong_t) 0xffffffff00000000ULL, "O_RDONLY" }, + { (kernel_ulong_t) 0xdeadbeef80000001ULL, + "O_WRONLY|0x80000000" } + }; + + unsigned int i; + unsigned int j; + + + for (i = 0; i < ARRAY_SIZE(flags); i++) + for (j = 0; j < ARRAY_SIZE(event_f_flags); j++) + do_call(flags[i].val, flags[i].str, + event_f_flags[j].val, event_f_flags[j].str); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fanotify_init") + +#endif diff --git a/tests-mx32/fanotify_init.test b/tests-mx32/fanotify_init.test new file mode 100755 index 000000000..8d26af429 --- /dev/null +++ b/tests-mx32/fanotify_init.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fanotify_init syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/fanotify_mark.c b/tests-mx32/fanotify_mark.c new file mode 100644 index 000000000..43f285d33 --- /dev/null +++ b/tests-mx32/fanotify_mark.c @@ -0,0 +1,182 @@ +/* + * Check decoding of fanotify_mark syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined HAVE_SYS_FANOTIFY_H && defined HAVE_FANOTIFY_MARK && \ + defined __NR_fanotify_mark + +# include +# include +# include +# include + +/* Performs fanotify_mark call via the syscall interface. */ +static void +do_call(kernel_ulong_t fd, kernel_ulong_t flags, const char *flags_str, + uint64_t mask, const char *mask_str, kernel_ulong_t dirfd, + const char *dirfd_str, kernel_ulong_t path, const char *path_str) +{ + long rc; + + rc = syscall(__NR_fanotify_mark, fd, flags, +# if (LONG_MAX > INT_MAX) \ + || (defined __x86_64__ && defined __ILP32__) \ + || defined LINUX_MIPSN32 + mask, +# else +/* arch/parisc/kernel/sys_parisc32.c, commit ab8a261b */ +# ifdef HPPA + LL_VAL_TO_PAIR((mask << 32) | (mask >> 32)), +# else + LL_VAL_TO_PAIR(mask), +# endif +# endif + dirfd, path); + + printf("fanotify_mark(%d, %s, %s, %s, %s) = %s\n", + (int) fd, flags_str, mask_str, dirfd_str, path_str, + sprintrc(rc)); +} + +struct strval { + kernel_ulong_t val; + const char *str; +}; + +struct strval64 { + uint64_t val; + const char *str; +}; + +#define STR16 "0123456789abcdef" +#define STR64 STR16 STR16 STR16 STR16 + +int +main(void) +{ + enum { + PATH1_SIZE = 64, + }; + + static const kernel_ulong_t fds[] = { + (kernel_ulong_t) 0xdeadfeed12345678ULL, + (kernel_ulong_t) 0xffffffff00000000ULL, + (kernel_ulong_t) 0xdeb0d1edffffffffULL, + }; + static const struct strval flags[] = { + { (kernel_ulong_t) 0xffffffff00000000ULL, "0" }, + { (kernel_ulong_t) 0xdec0deddefaced00ULL, + "0xefaced00 /* FAN_MARK_??? */" }, + { (kernel_ulong_t) 0xda7a105700000040ULL, + "FAN_MARK_IGNORED_SURV_MODIFY" }, + { (kernel_ulong_t) 0xbadc0deddeadfeedULL, + "FAN_MARK_ADD|FAN_MARK_DONT_FOLLOW|FAN_MARK_ONLYDIR|" + "FAN_MARK_IGNORED_MASK|FAN_MARK_IGNORED_SURV_MODIFY|" + "FAN_MARK_FLUSH|0xdeadfe00" }, + }; + static const struct strval64 masks[] = { + { ARG_ULL_STR(0) }, + { 0xdeadfeedfacebeefULL, + "FAN_ACCESS|FAN_MODIFY|FAN_CLOSE_WRITE|FAN_OPEN|" + "FAN_ACCESS_PERM|FAN_ONDIR|FAN_EVENT_ON_CHILD|" + "0xdeadfeedb2ccbec4" }, + { ARG_ULL_STR(0xffffffffb7fcbfc4) " /* FAN_??? */" }, + }; + static const struct strval dirfds[] = { + { (kernel_ulong_t) 0xfacefeed00000001ULL, "1" }, + { (kernel_ulong_t) 0xdec0ded0ffffffffULL, "FAN_NOFD" }, + { (kernel_ulong_t) 0xbadfacedffffff9cULL, "AT_FDCWD" }, + { (kernel_ulong_t) 0xdefaced1beeff00dULL, "-1091571699" }, + }; + static const char str64[] = STR64; + + static char bogus_path1_addr[sizeof("0x") + sizeof(void *) * 2]; + static char bogus_path1_after_addr[sizeof("0x") + sizeof(void *) * 2]; + + char *bogus_path1 = tail_memdup(str64, PATH1_SIZE); + char *bogus_path2 = tail_memdup(str64, sizeof(str64)); + + struct strval paths[] = { + { (kernel_ulong_t) 0, "NULL" }, + { (kernel_ulong_t) (uintptr_t) (bogus_path1 + PATH1_SIZE), + bogus_path1_after_addr }, + { (kernel_ulong_t) (uintptr_t) bogus_path1, bogus_path1_addr }, + { (kernel_ulong_t) (uintptr_t) bogus_path2, "\"" STR64 "\"" }, + }; + + unsigned int i; + unsigned int j; + unsigned int k; + unsigned int l; + unsigned int m; + int rc; + + + snprintf(bogus_path1_addr, sizeof(bogus_path1_addr), "%p", bogus_path1); + snprintf(bogus_path1_after_addr, sizeof(bogus_path1_after_addr), "%p", + bogus_path1 + PATH1_SIZE); + + rc = fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY | FAN_ONDIR, + -100, "."); + printf("fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY|FAN_ONDIR" + ", AT_FDCWD, \".\") = %s\n", sprintrc(rc)); + + for (i = 0; i < ARRAY_SIZE(fds); i++) { + for (j = 0; j < ARRAY_SIZE(flags); j++) { + for (k = 0; k < ARRAY_SIZE(masks); k++) { + for (l = 0; l < ARRAY_SIZE(dirfds); l++) { + for (m = 0; m < ARRAY_SIZE(paths); m++) + do_call(fds[i], + flags[j].val, + flags[j].str, + masks[k].val, + masks[k].str, + dirfds[l].val, + dirfds[l].str, + paths[m].val, + paths[m].str); + } + } + } + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYS_FANOTIFY_H && HAVE_FANOTIFY_MARK && " + "__NR_fanotify_mark") + +#endif diff --git a/tests-mx32/fanotify_mark.test b/tests-mx32/fanotify_mark.test new file mode 100755 index 000000000..fd6713876 --- /dev/null +++ b/tests-mx32/fanotify_mark.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fanotify_mark syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 diff --git a/tests-mx32/fchdir.c b/tests-mx32/fchdir.c new file mode 100644 index 000000000..3cde5e635 --- /dev/null +++ b/tests-mx32/fchdir.c @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_fchdir + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_fchdir, fd); + printf("fchdir(%d) = %ld %s (%m)\n", + (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchdir") + +#endif diff --git a/tests-mx32/fchdir.test b/tests-mx32/fchdir.test new file mode 100755 index 000000000..3a4296ed1 --- /dev/null +++ b/tests-mx32/fchdir.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff --git a/tests-mx32/fchmod.c b/tests-mx32/fchmod.c new file mode 100644 index 000000000..932d08301 --- /dev/null +++ b/tests-mx32/fchmod.c @@ -0,0 +1,72 @@ +/* + * Check decoding of fchmod syscall. + * + * Copyright (c) 2016 Fabien Siron + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fchmod + +# include +# include +# include +# include + +int +main(void) +{ + static const char fname[] = "fchmod_test_file"; + + int fd = open(fname, O_CREAT|O_RDONLY, 0400); + if (fd < 0) + perror_msg_and_fail("open"); + + if (unlink(fname)) + perror_msg_and_fail("unlink"); + + long rc = syscall(__NR_fchmod, fd, 0600); + printf("fchmod(%d, 0600) = %s\n", fd, sprintrc(rc)); + + close(fd); + + rc = syscall(__NR_fchmod, fd, 051); + printf("fchmod(%d, 051) = %s\n", fd, sprintrc(rc)); + + rc = syscall(__NR_fchmod, fd, 004); + printf("fchmod(%d, 004) = %s\n", fd, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchmod") + +#endif diff --git a/tests-mx32/fchmod.test b/tests-mx32/fchmod.test new file mode 100755 index 000000000..4cb126329 --- /dev/null +++ b/tests-mx32/fchmod.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchmod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a15 diff --git a/tests-mx32/fchmodat.c b/tests-mx32/fchmodat.c new file mode 100644 index 000000000..c52a1cabc --- /dev/null +++ b/tests-mx32/fchmodat.c @@ -0,0 +1,71 @@ +/* + * Check decoding of fchmodat syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fchmodat + +# include +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "fchmodat_sample"; + + if (open(sample, O_RDONLY | O_CREAT, 0400) < 0) + perror_msg_and_fail("open"); + + long rc = syscall(__NR_fchmodat, -100, sample, 0600); + printf("fchmodat(AT_FDCWD, \"%s\", 0600) = %s\n", + sample, sprintrc(rc)); + + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + rc = syscall(__NR_fchmodat, -100, sample, 051); + printf("fchmodat(AT_FDCWD, \"%s\", 051) = %s\n", + sample, sprintrc(rc)); + + rc = syscall(__NR_fchmodat, -100, sample, 004); + printf("fchmodat(AT_FDCWD, \"%s\", 004) = %s\n", + sample, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchmodat") + +#endif diff --git a/tests-mx32/fchmodat.test b/tests-mx32/fchmodat.test new file mode 100755 index 000000000..13cbe806a --- /dev/null +++ b/tests-mx32/fchmodat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fchmodat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/fchown.c b/tests-mx32/fchown.c new file mode 100644 index 000000000..d71190320 --- /dev/null +++ b/tests-mx32/fchown.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_fchown + +# define SYSCALL_NR __NR_fchown +# define SYSCALL_NAME "fchown" +# define ACCESS_BY_DESCRIPTOR + +# if defined __NR_fchown32 && __NR_fchown != __NR_fchown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchown") + +#endif diff --git a/tests-mx32/fchown.test b/tests-mx32/fchown.test new file mode 100755 index 000000000..63a0f2e3a --- /dev/null +++ b/tests-mx32/fchown.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 diff --git a/tests-mx32/fchown32.c b/tests-mx32/fchown32.c new file mode 100644 index 000000000..2d9d60f8f --- /dev/null +++ b/tests-mx32/fchown32.c @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_fchown32 + +# define SYSCALL_NR __NR_fchown32 +# define SYSCALL_NAME "fchown32" +# define ACCESS_BY_DESCRIPTOR +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchown32") + +#endif diff --git a/tests-mx32/fchown32.test b/tests-mx32/fchown32.test new file mode 100755 index 000000000..e837f54ef --- /dev/null +++ b/tests-mx32/fchown32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fchown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff --git a/tests-mx32/fchownat.c b/tests-mx32/fchownat.c new file mode 100644 index 000000000..f2f37ae3e --- /dev/null +++ b/tests-mx32/fchownat.c @@ -0,0 +1,69 @@ +/* + * Check decoding of fchownat syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_fchownat && defined AT_FDCWD && defined AT_SYMLINK_NOFOLLOW + +# include +# include + +int +main(void) +{ + static const char sample[] = "fchownat_sample"; + uid_t uid = geteuid(); + uid_t gid = getegid(); + + if (open(sample, O_RDONLY | O_CREAT, 0400) == -1) + perror_msg_and_fail("open"); + + long rc = syscall(__NR_fchownat, AT_FDCWD, sample, uid, gid, 0); + printf("fchownat(AT_FDCWD, \"%s\", %d, %d, 0) = %s\n", + sample, uid, gid, sprintrc(rc)); + + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + rc = syscall(__NR_fchownat, AT_FDCWD, + sample, -1, -1L, AT_SYMLINK_NOFOLLOW); + printf("fchownat(AT_FDCWD, \"%s\", -1, -1, AT_SYMLINK_NOFOLLOW) = %s\n", + sample, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fchownat && AT_FDCWD && AT_SYMLINK_NOFOLLOW") + +#endif diff --git a/tests-mx32/fchownat.test b/tests-mx32/fchownat.test new file mode 100755 index 000000000..e5d0f2857 --- /dev/null +++ b/tests-mx32/fchownat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fchownat syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/fcntl.c b/tests-mx32/fcntl.c new file mode 100644 index 000000000..f060cdf8f --- /dev/null +++ b/tests-mx32/fcntl.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fcntl + +# define TEST_SYSCALL_NR __NR_fcntl +# define TEST_SYSCALL_STR "fcntl" +# include "struct_flock.c" + +# define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) + +static void +test_flock64_einval(const int cmd, const char *name) +{ + struct_kernel_flock64 fl = { + .l_type = F_RDLCK, + .l_start = 0xdefaced1facefeedULL, + .l_len = 0xdefaced2cafef00dULL + }; + invoke_test_syscall(cmd, &fl); + printf("%s(0, %s, %p) = %s\n", + TEST_SYSCALL_STR, name, &fl, EINVAL_STR); +} + +static void +test_flock64(void) +{ +/* + * F_[GS]ETOWN_EX had conflicting values with F_[GS]ETLK64 + * in kernel revisions v2.6.32-rc1~96..v2.6.32-rc7~23. + */ +#if !defined(F_GETOWN_EX) || F_GETOWN_EX != F_SETLK64 + TEST_FLOCK64_EINVAL(F_SETLK64); +#endif +/* F_GETLK and F_SETLKW64 have conflicting values on mips64 */ +#if !defined(__mips64) || F_GETLK != F_SETLKW64 + TEST_FLOCK64_EINVAL(F_SETLKW64); +#endif +#if !defined(F_SETOWN_EX) || F_SETOWN_EX != F_GETLK64 + TEST_FLOCK64_EINVAL(F_GETLK64); +#endif +} + +int +main(void) +{ + create_sample(); + test_flock(); + test_flock64(); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fcntl") + +#endif diff --git a/tests-mx32/fcntl.test b/tests-mx32/fcntl.test new file mode 100755 index 000000000..9aea122d7 --- /dev/null +++ b/tests-mx32/fcntl.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fcntl decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 diff --git a/tests-mx32/fcntl64.c b/tests-mx32/fcntl64.c new file mode 100644 index 000000000..5ecd6eb98 --- /dev/null +++ b/tests-mx32/fcntl64.c @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fcntl64 + +# define TEST_SYSCALL_NR __NR_fcntl64 +# define TEST_SYSCALL_STR "fcntl64" +# include "struct_flock.c" + +# define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd) + +static void +test_flock64_einval(const int cmd, const char *name) +{ + struct_kernel_flock64 fl = { + .l_type = F_RDLCK, + .l_start = 0xdefaced1facefeedULL, + .l_len = 0xdefaced2cafef00dULL + }; + invoke_test_syscall(cmd, &fl); + printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET" + ", l_start=%jd, l_len=%jd}) = %s\n", TEST_SYSCALL_STR, name, + (intmax_t) fl.l_start, (intmax_t) fl.l_len, EINVAL_STR); +} + +static void +test_flock64(void) +{ + TEST_FLOCK64_EINVAL(F_SETLK64); + TEST_FLOCK64_EINVAL(F_SETLKW64); +# ifdef F_OFD_SETLK + TEST_FLOCK64_EINVAL(F_OFD_SETLK); + TEST_FLOCK64_EINVAL(F_OFD_SETLKW); +# endif + + struct_kernel_flock64 fl = { + .l_type = F_RDLCK, + .l_len = FILE_LEN + }; + long rc = invoke_test_syscall(F_SETLK64, &fl); + printf("%s(0, F_SETLK64, {l_type=F_RDLCK, l_whence=SEEK_SET" + ", l_start=0, l_len=%d}) = %s\n", + TEST_SYSCALL_STR, FILE_LEN, rc ? EINVAL_STR : "0"); + + if (rc) + return; + + invoke_test_syscall(F_GETLK64, &fl); + printf("%s(0, F_GETLK64, {l_type=F_UNLCK, l_whence=SEEK_SET" + ", l_start=0, l_len=%d, l_pid=0}) = 0\n", + TEST_SYSCALL_STR, FILE_LEN); + + invoke_test_syscall(F_SETLK64, &fl); + printf("%s(0, F_SETLK64, {l_type=F_UNLCK, l_whence=SEEK_SET" + ", l_start=0, l_len=%d}) = 0\n", + TEST_SYSCALL_STR, FILE_LEN); +} + +int +main(void) +{ + create_sample(); + test_flock(); + test_flock64(); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fcntl64") + +#endif diff --git a/tests-mx32/fcntl64.test b/tests-mx32/fcntl64.test new file mode 100755 index 000000000..00ba671ab --- /dev/null +++ b/tests-mx32/fcntl64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fcntl64 syscall decoding. + +. "${srcdir=.}/fcntl.test" diff --git a/tests-mx32/fdatasync.c b/tests-mx32/fdatasync.c new file mode 100644 index 000000000..fc82ade33 --- /dev/null +++ b/tests-mx32/fdatasync.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_fdatasync + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_fdatasync, fd); + printf("fdatasync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fdatasync") + +#endif diff --git a/tests-mx32/fdatasync.test b/tests-mx32/fdatasync.test new file mode 100755 index 000000000..ff59749f9 --- /dev/null +++ b/tests-mx32/fdatasync.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fdatasync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff --git a/tests-mx32/file_handle.c b/tests-mx32/file_handle.c new file mode 100644 index 000000000..a5ad6c73d --- /dev/null +++ b/tests-mx32/file_handle.c @@ -0,0 +1,356 @@ +/* + * Check decoding of name_to_handle_at and open_by_handle_at syscalls. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_name_to_handle_at && defined __NR_open_by_handle_at + +# include +# include +# include +# include +# include +# include +# include + +enum assert_rc { + ASSERT_NONE, + ASSERT_SUCCESS, + ASSERT_ERROR, +}; + +# ifndef MAX_HANDLE_SZ + +# define MAX_HANDLE_SZ 128 + +struct file_handle { + unsigned int handle_bytes; + int handle_type; + unsigned char f_handle[0]; +}; +# endif /* !MAX_HANDLE_SZ */ + + +void +print_handle_data(unsigned char *bytes, unsigned int size) +{ + unsigned int i; + + if (size > MAX_HANDLE_SZ) + size = MAX_HANDLE_SZ; + + printf("0x"); + for (i = 0; i < size; ++i) + printf("%02x", bytes[i]); +} + +void +do_name_to_handle_at(kernel_ulong_t dirfd, const char *dirfd_str, + kernel_ulong_t pathname, const char *pathname_str, + kernel_ulong_t handle, const char *handle_str, + kernel_ulong_t mount_id, + kernel_ulong_t flags, const char *flags_str, + enum assert_rc assert_rc, long assert_errno) +{ + long rc; + const char *errstr; + + rc = syscall(__NR_name_to_handle_at, dirfd, pathname, handle, mount_id, + flags); + errstr = sprintrc(rc); + + if (assert_rc != ASSERT_NONE) + assert(rc == (assert_rc == ASSERT_SUCCESS ? 0 : -1)); + if (assert_errno) + assert(errno != assert_errno); + + printf("name_to_handle_at(%s, %s, %s", + dirfd_str, pathname_str, handle_str); + + if (rc != -1) { + struct file_handle *fh = + (struct file_handle *) (uintptr_t) handle; + int *mount_id_ptr = (int *) (uintptr_t) mount_id; + + printf(" => %u, handle_type=%d, f_handle=", + fh->handle_bytes, fh->handle_type); + print_handle_data((unsigned char *) fh + + sizeof(struct file_handle), + fh->handle_bytes); + printf("}, [%d]", *mount_id_ptr); + } else { + if (mount_id) + printf(", %#llx", (unsigned long long) mount_id); + else + printf(", NULL"); + } + + printf(", %s) = %s\n", flags_str, errstr); +} + +void +do_open_by_handle_at(kernel_ulong_t mount_fd, + kernel_ulong_t handle, bool valid_handle, bool valid_data, + kernel_ulong_t flags, const char *flags_str) +{ + long rc; + + printf("open_by_handle_at(%d, ", (int) mount_fd); + if (valid_handle) { + struct file_handle *fh = + (struct file_handle *) (uintptr_t) handle; + + printf("{handle_bytes=%u, handle_type=%d", fh->handle_bytes, + fh->handle_type); + + if (valid_data) { + printf(", f_handle="); + print_handle_data((unsigned char *) fh + + sizeof(struct file_handle), + fh->handle_bytes); + } + + printf("}"); + } else { + if (handle) + printf("%#llx", (unsigned long long) handle); + else + printf("NULL"); + } + printf(", %s) = ", flags_str); + + rc = syscall(__NR_open_by_handle_at, mount_fd, handle, flags); + + printf("%s\n", sprintrc(rc)); +} + +struct strval { + kernel_ulong_t val; + const char *str; +}; + +#define STR16 "0123456789abcdef" +#define STR64 STR16 STR16 STR16 STR16 + +int +main(void) +{ + enum { + PATH1_SIZE = 64, + }; + + static const kernel_ulong_t fdcwd = + (kernel_ulong_t) 0x87654321ffffff9cULL; + static const struct strval dirfds[] = { + { (kernel_ulong_t) 0xdeadca57badda7a1ULL, "-1159878751" }, + { (kernel_ulong_t) 0x12345678ffffff9cULL, "AT_FDCWD" }, + }; + static const struct strval name_flags[] = { + { (kernel_ulong_t) 0xdeadf15700000000ULL, "0" }, + { (kernel_ulong_t) 0xbadc0ded00001000ULL, + "AT_EMPTY_PATH" }, + { (kernel_ulong_t) 0xdeadc0deda7a1457ULL, + "AT_SYMLINK_FOLLOW|AT_EMPTY_PATH|0xda7a0057" }, + { (kernel_ulong_t) 0xdefaced1ffffebffULL, + "0xffffebff /* AT_??? */" }, + }; + static const kernel_ulong_t mount_fds[] = { + (kernel_ulong_t) 0xdeadca5701234567ULL, + (kernel_ulong_t) 0x12345678ffffff9cULL, + }; + static const struct strval open_flags[] = { + { (kernel_ulong_t) 0xffffffff00000000ULL, "O_RDONLY" }, + { (kernel_ulong_t) 0xdeadbeef80000001ULL, + "O_WRONLY|0x80000000" } + }; + + static const char str64[] = STR64; + + + char *bogus_path1 = tail_memdup(str64, PATH1_SIZE); + char *bogus_path2 = tail_memdup(str64, sizeof(str64)); + + struct file_handle *handle = + tail_alloc(sizeof(struct file_handle) + MAX_HANDLE_SZ); + struct file_handle *handle_0 = + tail_alloc(sizeof(struct file_handle) + 0); + struct file_handle *handle_8 = + tail_alloc(sizeof(struct file_handle) + 8); + struct file_handle *handle_128 = + tail_alloc(sizeof(struct file_handle) + 128); + struct file_handle *handle_256 = + tail_alloc(sizeof(struct file_handle) + 256); + int *bogus_mount_id = tail_alloc(sizeof(*bogus_mount_id)); + + char handle_0_addr[sizeof("0x") + sizeof(void *) * 2]; + + char bogus_path1_addr[sizeof("0x") + sizeof(void *) * 2]; + char bogus_path1_after_addr[sizeof("0x") + sizeof(void *) * 2]; + + + struct strval paths[] = { + { (kernel_ulong_t) 0, "NULL" }, + { (kernel_ulong_t) (uintptr_t) (bogus_path1 + PATH1_SIZE), + bogus_path1_after_addr }, + { (kernel_ulong_t) (uintptr_t) bogus_path1, bogus_path1_addr }, + { (kernel_ulong_t) (uintptr_t) bogus_path2, "\"" STR64 "\"" }, + }; + struct strval name_handles[] = { + { (uintptr_t) (handle_0 + sizeof(struct file_handle)), + handle_0_addr }, + { (uintptr_t) handle_0, "{handle_bytes=256}" }, + { (uintptr_t) handle_8, "{handle_bytes=0}" }, + { (uintptr_t) handle_128, "{handle_bytes=128}" }, + { (uintptr_t) handle_256, "{handle_bytes=256}" }, + }; + struct { + kernel_ulong_t addr; + bool valid; + bool valid_data; + } open_handles[] = { + { 0, false, false }, + { (uintptr_t) (handle_0 + sizeof(struct file_handle)), + false, false }, + { (uintptr_t) handle_0 + 4, false, false }, + { (uintptr_t) handle_0, true, false }, + { (uintptr_t) handle_8, true, true }, + { (uintptr_t) handle_128, true, true }, + { (uintptr_t) handle_256, true, true }, + }; + kernel_ulong_t mount_ids[] = { + 0, + (kernel_ulong_t) (uintptr_t) (bogus_mount_id + 1), + (kernel_ulong_t) (uintptr_t) bogus_mount_id, + }; + + const int flags = 0x400; + int mount_id; + unsigned int i; + unsigned int j; + unsigned int k; + unsigned int l; + unsigned int m; + + + snprintf(bogus_path1_addr, sizeof(bogus_path1_addr), "%p", bogus_path1); + snprintf(bogus_path1_after_addr, sizeof(bogus_path1_after_addr), "%p", + bogus_path1 + PATH1_SIZE); + + handle_0->handle_bytes = 256; + handle_8->handle_bytes = 0; + handle_128->handle_bytes = 128; + handle_256->handle_bytes = 256; + + fill_memory((char *) handle_128 + sizeof(struct file_handle), 128); + fill_memory((char *) handle_256 + sizeof(struct file_handle), 256); + + snprintf(handle_0_addr, sizeof(handle_0_addr), "%p", + handle_0 + sizeof(struct file_handle)); + + handle->handle_bytes = 0; + + assert(syscall(__NR_name_to_handle_at, fdcwd, ".", handle, &mount_id, + flags | 1) == -1); + if (EINVAL != errno) + perror_msg_and_skip("name_to_handle_at"); + printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=0}, %p" + ", AT_SYMLINK_FOLLOW|0x1) = -1 EINVAL (%m)\n", &mount_id); + + assert(syscall(__NR_name_to_handle_at, fdcwd, ".", handle, &mount_id, + flags) == -1); + if (EOVERFLOW != errno) + perror_msg_and_skip("name_to_handle_at"); + printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=0 => %u}" + ", %p, AT_SYMLINK_FOLLOW) = -1 EOVERFLOW (%m)\n", + handle->handle_bytes, &mount_id); + + assert(syscall(__NR_name_to_handle_at, fdcwd, ".", handle, &mount_id, + flags) == 0); + printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=%u" + ", handle_type=%d, f_handle=0x", + handle->handle_bytes, handle->handle_type); + for (i = 0; i < handle->handle_bytes; ++i) + printf("%02x", handle->f_handle[i]); + printf("}, [%d], AT_SYMLINK_FOLLOW) = 0\n", mount_id); + + printf("open_by_handle_at(-1, {handle_bytes=%u, handle_type=%d" + ", f_handle=0x", handle->handle_bytes, handle->handle_type); + for (i = 0; i < handle->handle_bytes; ++i) + printf("%02x", handle->f_handle[i]); + int rc = syscall(__NR_open_by_handle_at, -1, handle, + O_RDONLY | O_DIRECTORY); + printf("}, O_RDONLY|O_DIRECTORY) = %d %s (%m)\n", rc, errno2name()); + + for (i = 0; i < ARRAY_SIZE(dirfds); i++) { + for (j = 0; j < ARRAY_SIZE(paths); j++) { + for (k = 0; k < ARRAY_SIZE(name_handles); k++) { + for (l = 0; l < ARRAY_SIZE(mount_ids); l++) { + for (m = 0; m < ARRAY_SIZE(name_flags); + m++) { + do_name_to_handle_at( + dirfds[i].val, + dirfds[i].str, + paths[j].val, + paths[j].str, + name_handles[k].val, + name_handles[k].str, + mount_ids[l], + name_flags[m].val, + name_flags[m].str, + ASSERT_ERROR, 0); + } + } + } + } + } + + for (i = 0; i < ARRAY_SIZE(mount_fds); i++) { + for (j = 0; j < ARRAY_SIZE(open_handles); j++) { + for (k = 0; k < ARRAY_SIZE(open_flags); k++) { + do_open_by_handle_at(mount_fds[i], + open_handles[j].addr, + open_handles[j].valid, + open_handles[j].valid_data, + open_flags[k].val, + open_flags[k].str); + } + } + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_name_to_handle_at && __NR_open_by_handle_at") + +#endif diff --git a/tests-mx32/file_handle.test b/tests-mx32/file_handle.test new file mode 100755 index 000000000..1ccc9d457 --- /dev/null +++ b/tests-mx32/file_handle.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check name_to_handle_at and open_by_handle_at syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=name_to_handle_at,open_by_handle_at diff --git a/tests-mx32/file_ioctl.c b/tests-mx32/file_ioctl.c new file mode 100644 index 000000000..0fe17b15d --- /dev/null +++ b/tests-mx32/file_ioctl.c @@ -0,0 +1,45 @@ +#include "tests.h" + +#ifdef HAVE_LINUX_FIEMAP_H + +# include +# include +# include +# include +# include "xlat.h" +# include "xlat/fiemap_flags.h" + +static void +test_fiemap(void) +{ + (void) tail_alloc(1); + struct fiemap *const args = tail_alloc(sizeof(*args)); + + printf("ioctl(-1, FS_IOC_FIEMAP, {fm_start=%" PRI__u64 + ", fm_length=%" PRI__u64", fm_flags=", + args->fm_start, args->fm_length); + printflags(fiemap_flags, args->fm_flags, "FIEMAP_FLAG_???"); + printf(", fm_extent_count=%u})", args->fm_extent_count); + ioctl(-1, FS_IOC_FIEMAP, args); + printf(" = -1 EBADF (%m)\n"); + + /* The live version of this test is in btrfs.c */ +} + +/* clone and dedupe ioctls are in btrfs.c since they originated there */ + +int +main(int argc, char *argv[]) +{ + test_fiemap(); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_FIEMAP_H") + +#endif diff --git a/tests-mx32/file_ioctl.test b/tests-mx32/file_ioctl.test new file mode 100755 index 000000000..7b8b8ce84 --- /dev/null +++ b/tests-mx32/file_ioctl.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check FS_IOC_FIEMAP ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-mx32/fill_memory.c b/tests-mx32/fill_memory.c new file mode 100644 index 000000000..a0aeccba1 --- /dev/null +++ b/tests-mx32/fill_memory.c @@ -0,0 +1,19 @@ +#include "tests.h" + +void +fill_memory_ex(void *ptr, size_t size, unsigned char start, + unsigned char period) +{ + unsigned char *p = ptr; + size_t i; + + for (i = 0; i < size; i++) { + p[i] = start + i % period; + } +} + +void +fill_memory(void *ptr, size_t size) +{ + fill_memory_ex(ptr, size, 0x80, 0x80); +} diff --git a/tests-mx32/filter-unavailable.c b/tests-mx32/filter-unavailable.c new file mode 100644 index 000000000..6368b2cb8 --- /dev/null +++ b/tests-mx32/filter-unavailable.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#define P 16 +#define T 7 + +static void * +thread(void *arg) +{ + assert(write(1, "", 1) == 1); + pause(); + return arg; +} + +static int +process(void) +{ + int i; + int fds[2]; + pthread_t t; + struct timespec ts = { .tv_nsec = 10000000 }; + + (void) close(0); + (void) close(1); + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + for (i = 0; i < T; ++i) + assert(pthread_create(&t, NULL, thread, NULL) == 0); + for (i = 0; i < T; ++i) + assert(read(0, fds, 1) == 1); + + (void) nanosleep(&ts, 0); + return 0; +} + +int +main(void) +{ + int i, s; + pid_t p; + + for (i = 0; i < P; ++i) { + p = fork(); + if (p < 0) + perror_msg_and_fail("fork"); + if (p == 0) + return process(); + assert(waitpid(p, &s, 0) == p); + assert(WIFEXITED(s)); + if (WEXITSTATUS(s)) + return WEXITSTATUS(s); + } + return 0; +} diff --git a/tests-mx32/filter-unavailable.expected b/tests-mx32/filter-unavailable.expected new file mode 100644 index 000000000..e69de29bb diff --git a/tests-mx32/filter-unavailable.test b/tests-mx32/filter-unavailable.test new file mode 100755 index 000000000..15a9ad1d3 --- /dev/null +++ b/tests-mx32/filter-unavailable.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# check that syscalls are filtered properly + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -qq -f -echdir -esignal=none $args +match_diff + +exit 0 diff --git a/tests-mx32/finit_module.c b/tests-mx32/finit_module.c new file mode 100644 index 000000000..3f0178f73 --- /dev/null +++ b/tests-mx32/finit_module.c @@ -0,0 +1,118 @@ +/* + * Check decoding of finit_module syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include "scno.h" + +#if defined(__NR_finit_module) + +# include +# include + +# include "init_delete_module.h" + +int +main(void) +{ + static const kernel_ulong_t bogus_fd = + (kernel_ulong_t) 0xdeb0d1edbeeff00dULL; + + static const struct { + kernel_ulong_t val; + const char *str; + } flags[] = { + { ARG_STR(0) }, + { (kernel_ulong_t) 0xffffffff00000002ULL, + "MODULE_INIT_IGNORE_VERMAGIC" }, + { (kernel_ulong_t) 0xbadc0deddefaced0ULL, + "0xdefaced0 /* MODULE_INIT_??? */" }, + { (kernel_ulong_t) 0xfacef157dec0ded1ULL, + "MODULE_INIT_IGNORE_MODVERSIONS|0xdec0ded0" }, + { -1LL, "MODULE_INIT_IGNORE_MODVERSIONS|" + "MODULE_INIT_IGNORE_VERMAGIC|0xfffffffc" }, + }; + + long rc; + char *bogus_param1 = tail_alloc(PARAM1_LEN); + char *bogus_param2 = tail_alloc(PARAM2_LEN); + const char *errstr; + + fill_memory_ex(bogus_param1, PARAM1_LEN, PARAM1_BASE, PARAM1_LEN); + fill_memory_ex(bogus_param2, PARAM2_LEN, PARAM2_BASE, PARAM2_LEN); + + rc = syscall(__NR_finit_module, bogus_zero, NULL, bogus_zero); + printf("finit_module(0, NULL, 0) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param1, flags[0].val); + errstr = sprintrc(rc); + + printf("finit_module(%d, \"", (int) bogus_fd); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\"..., %s) = %s\n", flags[0].str, errstr); + + bogus_param1[PARAM1_LEN - 1] = '\0'; + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param1, flags[1].val); + errstr = sprintrc(rc); + + printf("finit_module(%d, \"", (int) bogus_fd); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\", %s) = %s\n", flags[1].str, errstr); + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param2 + PARAM2_LEN, + flags[2].val); + printf("finit_module(%d, %p, %s) = %s\n", + (int) bogus_fd, bogus_param2 + PARAM2_LEN, flags[2].str, + sprintrc(rc)); + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param2, flags[3].val); + printf("finit_module(%d, %p, %s) = %s\n", + (int) bogus_fd, bogus_param2, flags[3].str, sprintrc(rc)); + + bogus_param2[PARAM2_LEN - 1] = '\0'; + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param2, flags[4].val); + errstr = sprintrc(rc); + + printf("finit_module(%d, \"", (int) bogus_fd); + print_str(PARAM2_BASE, PARAM2_LEN - 1, true); + printf("\", %s) = %s\n", flags[4].str, errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_finit_module"); + +#endif diff --git a/tests-mx32/finit_module.test b/tests-mx32/finit_module.test new file mode 100755 index 000000000..bd644f386 --- /dev/null +++ b/tests-mx32/finit_module.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of finit_module syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff --git a/tests-mx32/flock.c b/tests-mx32/flock.c new file mode 100644 index 000000000..c154e4379 --- /dev/null +++ b/tests-mx32/flock.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_flock + +# include +# include +# include + +int +main(void) +{ + const unsigned long fd = (long int) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_flock, fd, LOCK_SH); + printf("flock(%d, LOCK_SH) = %ld %s (%m)\n", + (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_flock") + +#endif diff --git a/tests-mx32/flock.test b/tests-mx32/flock.test new file mode 100755 index 000000000..24fcd74cd --- /dev/null +++ b/tests-mx32/flock.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check flock syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff --git a/tests-mx32/fork-f.c b/tests-mx32/fork-f.c new file mode 100644 index 000000000..11ac3d970 --- /dev/null +++ b/tests-mx32/fork-f.c @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static inline int +logit_(const char *const str) +{ + return !chdir(str); +} + +#define prefix "fork-f." +#define logit(arg) logit_(prefix arg) + +int main(int ac, char **av) +{ + if (ac < 1) + return 1; + if (ac > 1) + return logit("exec"); + + logit("start"); + + int child_wait_fds[2]; + (void) close(0); + if (pipe(child_wait_fds)) + perror_msg_and_fail("pipe"); + + pid_t pid = fork(); + + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + close(child_wait_fds[1]); + + if (read(0, child_wait_fds, sizeof(int))) + _exit(2); + + char *const args[] = { av[0], (char *) "", NULL }; + if (logit("child") || execve(args[0], args, args + 1)) + _exit(2); + } + + close(0); + + logit("parent"); + close(child_wait_fds[1]); + + int status; + assert(wait(&status) == pid); + assert(status == 0); + + pid_t ppid = getpid(); + logit("finish"); + + printf("%-5d chdir(\"%sstart\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sparent\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%schild\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sexec\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sfinish\") = -1 ENOENT (%m)\n", + ppid, prefix, + ppid, prefix, + pid, prefix, + pid, prefix, + ppid, prefix); + return 0; +} diff --git a/tests-mx32/fork-f.test b/tests-mx32/fork-f.test new file mode 100755 index 000000000..d8ca1e3ba --- /dev/null +++ b/tests-mx32/fork-f.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check how strace -f follows fork syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a26 -qq -f -e trace=chdir -e signal=none diff --git a/tests-mx32/fstat.c b/tests-mx32/fstat.c new file mode 100644 index 000000000..12df3e19b --- /dev/null +++ b/tests-mx32/fstat.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstat + +# define TEST_SYSCALL_NR __NR_fstat +# define TEST_SYSCALL_STR "fstat" +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 43147718418ULL) +# include "fstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstat") + +#endif diff --git a/tests-mx32/fstat.test b/tests-mx32/fstat.test new file mode 100755 index 000000000..2ba0fbaab --- /dev/null +++ b/tests-mx32/fstat.test @@ -0,0 +1,19 @@ +#!/bin/sh + +# Check fstat syscall decoding. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +syscall=$NAME +run_prog > /dev/null +sample=$syscall.sample +> "$sample" +run_strace -ve$syscall -P$sample -a21 $args > "$OUT" +match_diff "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests-mx32/fstat64.c b/tests-mx32/fstat64.c new file mode 100644 index 000000000..a9c2e0725 --- /dev/null +++ b/tests-mx32/fstat64.c @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstat64 + +# define TEST_SYSCALL_NR __NR_fstat64 +# define TEST_SYSCALL_STR "fstat64" +# define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" +# define STRUCT_STAT_IS_STAT64 1 +# include "fstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstat64") + +#endif diff --git a/tests-mx32/fstat64.test b/tests-mx32/fstat64.test new file mode 100755 index 000000000..8b4f5ef1c --- /dev/null +++ b/tests-mx32/fstat64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstat64 syscall decoding. + +. "${srcdir=.}/fstat.test" diff --git a/tests-mx32/fstatat.c b/tests-mx32/fstatat.c new file mode 100644 index 000000000..66138c25e --- /dev/null +++ b/tests-mx32/fstatat.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef HAVE_FSTATAT + +# define TEST_SYSCALL_INVOKE(sample, pst) \ + syscall(TEST_SYSCALL_NR, AT_FDCWD, sample, pst, AT_SYMLINK_NOFOLLOW) +# define PRINT_SYSCALL_HEADER(sample) \ + do { \ + int saved_errno = errno; \ + printf("%s(AT_FDCWD, \"%s\", ", TEST_SYSCALL_STR, sample) +# define PRINT_SYSCALL_FOOTER(rc) \ + errno = saved_errno; \ + printf(", AT_SYMLINK_NOFOLLOW) = %s\n", sprintrc(rc)); \ + } while (0) + +# include "xstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("HAVE_FSTATAT") + +#endif diff --git a/tests-mx32/fstatat64.c b/tests-mx32/fstatat64.c new file mode 100644 index 000000000..03082a8fb --- /dev/null +++ b/tests-mx32/fstatat64.c @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstatat64 + +# define TEST_SYSCALL_NR __NR_fstatat64 +# define TEST_SYSCALL_STR "fstatat64" +# define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" +# define STRUCT_STAT_IS_STAT64 1 +# include "fstatat.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatat64") + +#endif diff --git a/tests-mx32/fstatat64.test b/tests-mx32/fstatat64.test new file mode 100755 index 000000000..484008ac1 --- /dev/null +++ b/tests-mx32/fstatat64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstatat64 syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-mx32/fstatfs.c b/tests-mx32/fstatfs.c new file mode 100644 index 000000000..9e68c8d36 --- /dev/null +++ b/tests-mx32/fstatfs.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstatfs + +# define SYSCALL_ARG_FMT "%d" +# define SYSCALL_ARG(file, desc) (desc) +# define SYSCALL_NR __NR_fstatfs +# define SYSCALL_NAME "fstatfs" +# include "xstatfs.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatfs") + +#endif diff --git a/tests-mx32/fstatfs.test b/tests-mx32/fstatfs.test new file mode 100755 index 000000000..646e66f2e --- /dev/null +++ b/tests-mx32/fstatfs.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstatfs syscall decoding. + +. "${srcdir=.}/statfs.test" diff --git a/tests-mx32/fstatfs64.c b/tests-mx32/fstatfs64.c new file mode 100644 index 000000000..afc54aa92 --- /dev/null +++ b/tests-mx32/fstatfs64.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_fstatfs64 + +# define SYSCALL_ARG_FMT "%d" +# define SYSCALL_ARG(file, desc) (desc) +# define SYSCALL_NR __NR_fstatfs64 +# define SYSCALL_NAME "fstatfs64" +# include "xstatfs64.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_fstatfs64") + +#endif diff --git a/tests-mx32/fstatfs64.test b/tests-mx32/fstatfs64.test new file mode 100755 index 000000000..179ff1bf9 --- /dev/null +++ b/tests-mx32/fstatfs64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check fstatfs64 syscall decoding. + +. "${srcdir=.}/statfs.test" diff --git a/tests-mx32/fstatx.c b/tests-mx32/fstatx.c new file mode 100644 index 000000000..f88d9a9c3 --- /dev/null +++ b/tests-mx32/fstatx.c @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define IS_FSTAT 1 +#define TEST_SYSCALL_INVOKE(sample, pst) \ + syscall(TEST_SYSCALL_NR, 0, pst) +#define PRINT_SYSCALL_HEADER(sample) \ + do { \ + int saved_errno = errno; \ + printf("%s(0, ", TEST_SYSCALL_STR) +#define PRINT_SYSCALL_FOOTER(rc) \ + errno = saved_errno; \ + printf(") = %s\n", sprintrc(rc)); \ + } while (0) + +#include "xstatx.c" diff --git a/tests-mx32/fsync.c b/tests-mx32/fsync.c new file mode 100644 index 000000000..2f5041068 --- /dev/null +++ b/tests-mx32/fsync.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_fsync + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_fsync, fd); + printf("fsync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fsync") + +#endif diff --git a/tests-mx32/fsync.test b/tests-mx32/fsync.test new file mode 100755 index 000000000..a58b67be4 --- /dev/null +++ b/tests-mx32/fsync.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check fsync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-mx32/ftruncate.c b/tests-mx32/ftruncate.c new file mode 100644 index 000000000..ee17455f0 --- /dev/null +++ b/tests-mx32/ftruncate.c @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_ftruncate + +# include +# include + +int +main(void) +{ + const kernel_ulong_t len = (kernel_ulong_t) 0xdefaced0badc0deULL; + long rc; + + if (sizeof(len) > sizeof(long)) + rc = ftruncate(-1, len); + else + rc = syscall(__NR_ftruncate, -1L, len); + + printf("ftruncate(-1, %llu) = %ld %s (%m)\n", + (unsigned long long) len, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ftruncate") + +#endif diff --git a/tests-mx32/ftruncate.test b/tests-mx32/ftruncate.test new file mode 100755 index 000000000..ec8a1e05d --- /dev/null +++ b/tests-mx32/ftruncate.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check ftruncate syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff --git a/tests-mx32/ftruncate64.c b/tests-mx32/ftruncate64.c new file mode 100644 index 000000000..90d9938fc --- /dev/null +++ b/tests-mx32/ftruncate64.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_ftruncate64 + +# include +# include + +int +main(void) +{ + const off_t len = 0xdefaceddeadbeefULL; + + int rc = ftruncate(-1, len); + printf("ftruncate64(-1, %llu) = %d %s (%m)\n", + (unsigned long long) len, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ftruncate64") + +#endif diff --git a/tests-mx32/ftruncate64.test b/tests-mx32/ftruncate64.test new file mode 100755 index 000000000..906821029 --- /dev/null +++ b/tests-mx32/ftruncate64.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check ftruncate64 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff --git a/tests-mx32/futex.c b/tests-mx32/futex.c new file mode 100644 index 000000000..586b95d5e --- /dev/null +++ b/tests-mx32/futex.c @@ -0,0 +1,720 @@ +/* + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_futex + +# include +# include +# include +# include +# include +# include + +# include + +# ifndef FUTEX_PRIVATE_FLAG +# define FUTEX_PRIVATE_FLAG 128 +# endif +# ifndef FUTEX_CLOCK_REALTIME +# define FUTEX_CLOCK_REALTIME 256 +# endif +# ifndef FUTEX_CMD_MASK +# define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME) +# endif + +# include "xlat.h" +# include "xlat/futexops.h" +# include "xlat/futexwakeops.h" +# include "xlat/futexwakecmps.h" + +static struct timespec *tmout; + +void futex_error(int *uaddr, int op, unsigned long val, unsigned long timeout, + int *uaddr2, unsigned long val3, int rc) +{ + perror_msg_and_fail("futex(%p, %#x, %#x, %#lx, %p, %#x) = %d", + uaddr, op, (unsigned) val, timeout, uaddr, (unsigned) val3, rc); +} + +# define CHECK_FUTEX_GENERIC(uaddr, op, val, timeout, uaddr2, val3, check, \ + enosys) \ + do { \ + rc = syscall(__NR_futex, (uaddr), (op), (val), (timeout), \ + (uaddr2), (val3)); \ + /* It is here due to EPERM on WAKE_OP on AArch64 */ \ + if ((rc == -1) && (errno == EPERM)) \ + break; \ + if (enosys && (rc == -1) && (errno == ENOSYS)) \ + break; \ + if (!(check)) \ + futex_error((uaddr), (op), (val), \ + (unsigned long) (timeout), (int *) (uaddr2), \ + (val3), rc); \ + } while (0) + +# define CHECK_FUTEX_ENOSYS(uaddr, op, val, timeout, uaddr2, val3, check) \ + CHECK_FUTEX_GENERIC(uaddr, op, val, timeout, uaddr2, val3, check, 1) + +# define CHECK_FUTEX(uaddr, op, val, timeout, uaddr2, val3, check) \ + CHECK_FUTEX_GENERIC(uaddr, op, val, timeout, uaddr2, val3, check, 0) + +enum argmask { + ARG3 = 1 << 0, + ARG4 = 1 << 1, + ARG5 = 1 << 2, + ARG6 = 1 << 3, +}; + +void invalid_op(int *val, int op, uint32_t argmask, ...) +{ + static const unsigned long args[] = { + (unsigned long) 0xface1e55deadbee1ULL, + (unsigned long) 0xface1e56deadbee2ULL, + (unsigned long) 0xface1e57deadbee3ULL, + (unsigned long) 0xface1e58deadbee4ULL, + }; + /* Since timeout value is copied before full op check, we should provide + * some valid timeout address or NULL */ + int cmd = op & FUTEX_CMD_MASK; + bool valid_timeout = (cmd == FUTEX_WAIT) || (cmd == FUTEX_LOCK_PI) || + (cmd == FUTEX_WAIT_BITSET) || (cmd == FUTEX_WAIT_REQUEUE_PI); + bool timeout_is_val2 = (cmd == FUTEX_REQUEUE) || + (cmd == FUTEX_CMP_REQUEUE) || (cmd == FUTEX_WAKE_OP) || + (cmd == FUTEX_CMP_REQUEUE_PI); + const char *fmt; + int saved_errno; + int rc; + int i; + va_list ap; + + + CHECK_FUTEX(val, op, args[0], valid_timeout ? 0 : args[1], args[2], + args[3], (rc == -1) && (errno == ENOSYS)); + saved_errno = errno; + printf("futex(%p, %#x /* FUTEX_??? */", val, op); + + va_start(ap, argmask); + + for (i = 0; i < 4; i++) { + if (argmask & (1 << i)) { + fmt = va_arg(ap, const char *); + + printf(", "); + + if (((1 << i) == ARG3) || ((1 << i) == ARG6) || + (((1 << i) == ARG4) && timeout_is_val2)) + printf(fmt, (unsigned) args[i]); + else + printf(fmt, args[i]); + } + } + + va_end(ap); + + errno = saved_errno; + printf(") = -1 ENOSYS (%m)\n"); +} + +# define CHECK_INVALID_CLOCKRT(op, ...) \ + do { \ + invalid_op(uaddr, FUTEX_CLOCK_REALTIME | (op), __VA_ARGS__); \ + invalid_op(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_PRIVATE_FLAG | \ + (op), __VA_ARGS__); \ + } while (0) + +/* Value which differs from one stored in int *val */ +# define VAL ((unsigned long) 0xbadda7a0facefeedLLU) +# define VAL_PR ((unsigned) VAL) + +# define VAL2 ((unsigned long) 0xbadda7a0ca7b100dLLU) +# define VAL2_PR ((unsigned) VAL2) + +# define VAL3 ((unsigned long) 0xbadda7a09caffee1LLU) +# define VAL3_PR ((unsigned) VAL3) + +int +main(int argc, char *argv[]) +{ + int *uaddr = tail_alloc(sizeof(*uaddr)); + int *uaddr2 = tail_alloc(sizeof(*uaddr2)); + int rc; + unsigned i; + unsigned j; + + uaddr[0] = 0x1deadead; + uaddr2[0] = 0xbadf00d; + + tmout = tail_alloc(sizeof(*tmout)); + tmout->tv_sec = 123; + tmout->tv_nsec = 0xbadc0de; + + /* FUTEX_WAIT - check whether uaddr == val and sleep + * Possible flags: PRIVATE, CLOCK_RT (since 4.5) + * 1. uaddr - futex address + * 2. op - FUTEX_WAIT + * 3. val - expected value + * 4. timeout - address to timespec with timeout + * 5. uaddr2 - not used + * 6. val3 - not used + */ + + /* uaddr is NULL */ + CHECK_FUTEX(NULL, FUTEX_WAIT, VAL, tmout, uaddr2, VAL3, + (rc == -1) && (errno == EFAULT)); + printf("futex(NULL, FUTEX_WAIT, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + + /* uaddr is faulty */ + CHECK_FUTEX(uaddr + 1, FUTEX_WAIT, VAL, tmout, uaddr2, VAL3, + (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_WAIT, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + uaddr + 1, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, sprintrc(rc)); + + /* timeout is faulty */ + CHECK_FUTEX(uaddr, FUTEX_WAIT, VAL, tmout + 1, uaddr2, VAL3, + (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_WAIT, %u, %p) = %s\n", + uaddr, 0xfacefeed, tmout + 1, sprintrc(rc)); + + /* uaddr is not as provided; uaddr2 is faulty but ignored */ + CHECK_FUTEX(uaddr, FUTEX_WAIT, VAL, tmout, uaddr2 + 1, VAL3, + (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, sprintrc(rc)); + + /* uaddr is not as provided; uaddr2 is faulty but ignored */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAIT, VAL, tmout, + uaddr2 + 1, VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_PRIVATE, %u, {tv_sec=%jd, tv_nsec=%jd}) = " + "%s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, sprintrc(rc)); + + /* Next 2 tests are with CLOCKRT bit set */ + + /* Valid after v4.4-rc2-27-g337f130 */ + CHECK_FUTEX_ENOSYS(uaddr, + FUTEX_CLOCK_REALTIME | FUTEX_WAIT, + VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT|FUTEX_CLOCK_REALTIME, %u, " + "{tv_sec=%jd, tv_nsec=%jd}) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, + FUTEX_CLOCK_REALTIME | FUTEX_PRIVATE_FLAG | FUTEX_WAIT , + VAL, tmout, uaddr2, 0, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_PRIVATE|FUTEX_CLOCK_REALTIME, %u, " + "{tv_sec=%jd, tv_nsec=%jd}) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + + /* FUTEX_WAIT_BITSET - FUTEX_WAIT which provides additional bitmask + * which should be matched at least in one bit with + * wake mask in order to wake. + * Possible flags: PRIVATE, CLOCKRT + * 1. uaddr - futex address + * 2. op - FUTEX_TRYLOCK_PI + * 3. val - expected value stored in uaddr + * 4. timeout - timeout + * 5. uaddr2 - not used + * 6. val3 - bitmask + */ + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAIT_BITSET, VAL, tmout, uaddr2 + 1, + VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_BITSET, %u, {tv_sec=%jd, tv_nsec=%jd}, " + "%#x) = %s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, VAL3_PR, sprintrc(rc)); + + /* val3 of 0 is invalid */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAIT_BITSET, VAL, tmout, uaddr2 + 1, 0, + (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_WAIT_BITSET, %u, {tv_sec=%jd, tv_nsec=%jd}, " + "%#x) = %s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, 0, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAIT_BITSET, VAL, + tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_BITSET_PRIVATE, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %#x) = %s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, VAL3_PR, sprintrc(rc)); + + /* Next 3 tests are with CLOCKRT bit set */ + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_WAIT_BITSET, VAL, + tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %#x) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, VAL3_PR, + sprintrc(rc)); + + /* val3 of 0 is invalid */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_WAIT_BITSET, VAL, + tmout, uaddr2 + 1, 0, (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %#x) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, 0, + sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_PRIVATE_FLAG | + FUTEX_WAIT_BITSET, VAL, tmout, uaddr2 + 1, VAL3, + (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %#x) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, VAL3_PR, + sprintrc(rc)); + + /* FUTEX_WAKE - wake val processes waiting for uaddr + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_WAKE + * 3. val - how many processes to wake + * 4. timeout - not used + * 5. uaddr2 - not used + * 6. val3 - not used + */ + + /* Zero processes to wake is not a good idea, but it should return 0 */ + CHECK_FUTEX(uaddr, FUTEX_WAKE, 0, NULL, NULL, 0, (rc == 0)); + printf("futex(%p, FUTEX_WAKE, %u) = %s\n", uaddr, 0, sprintrc(rc)); + + /* Trying to wake some processes, but there's nothing to wake */ + CHECK_FUTEX(uaddr, FUTEX_WAKE, 10, NULL, NULL, 0, (rc == 0)); + printf("futex(%p, FUTEX_WAKE, %u) = %s\n", uaddr, 10, sprintrc(rc)); + + /* Trying to wake some processes, but there's nothing to wake */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAKE, 10, NULL, + NULL, 0, (rc == 0)); + printf("futex(%p, FUTEX_WAKE_PRIVATE, %u) = %s\n", uaddr, 10, + sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_WAKE, ARG3, "%u"); + + /* FUTEX_WAKE_BITSET - wake val processes waiting for uaddr which has at + * least one common bit with bitset provided in + * val3. + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_WAKE + * 3. val - how many processes to wake + * 4. timeout - not used + * 5. uaddr2 - not used + * 6. val3 - bitmask + */ + + /* Trying to wake some processes, but there's nothing to wake */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAKE_BITSET, 10, NULL, NULL, + VAL3, (rc == 0)); + printf("futex(%p, FUTEX_WAKE_BITSET, %u, %#x) = %s\n", uaddr, 10, + VAL3_PR, sprintrc(rc)); + + /* bitset 0 is invalid */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAKE_BITSET, 10, NULL, NULL, 0, + (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_WAKE_BITSET, %u, %#x) = %s\n", uaddr, 10, 0, + sprintrc(rc)); + + /* Trying to wake some processes, but there's nothing to wake */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAKE_BITSET, 10, + NULL, NULL, VAL3, (rc == 0)); + printf("futex(%p, FUTEX_WAKE_BITSET_PRIVATE, %u, %#x) = %s\n", uaddr, + 10, VAL3_PR, sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_WAKE_BITSET, ARG3 | ARG6, "%u", "%#x"); + + /* FUTEX_FD - deprecated + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_FD + * 3. val - signal number + * 4. timeout - not used + * 5. uaddr2 - not used + * 6. val3 - not used + */ + + /* FUTEX_FD is not implemented since 2.6.26 */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_FD, VAL, NULL, NULL, VAL3, + (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_FD, %u) = %s\n", uaddr, VAL_PR, sprintrc(rc)); + + /* FUTEX_FD is not implemented since 2.6.26 */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_FD, VAL, NULL, + NULL, VAL3, (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_FD|FUTEX_PRIVATE_FLAG, %u) = %s\n", uaddr, + VAL_PR, sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_FD, ARG3, "%u"); + + /* FUTEX_REQUEUE - wake val processes and re-queue rest on uaddr2 + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_REQUEUE + * 3. val - how many processes to wake + * 4. val2 - amount of processes to re-queue on uadr2 + * 5. uaddr2 - another futex address, to re-queue waiting processes on + * 6. val3 - not used + */ + + /* Trying to re-queue some processes but there's nothing to re-queue */ + CHECK_FUTEX(uaddr, FUTEX_REQUEUE, VAL, VAL2, uaddr2, VAL3, + (rc == 0)); + printf("futex(%p, FUTEX_REQUEUE, %u, %u, %p) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, sprintrc(rc)); + + /* Trying to re-queue some processes but there's nothing to re-queue */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_REQUEUE, VAL, VAL2, + uaddr2, VAL3, (rc == 0)); + printf("futex(%p, FUTEX_REQUEUE_PRIVATE, %u, %u, %p) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_REQUEUE, ARG3 | ARG4 | ARG5, "%u", "%u", + "%#lx"); + + /* FUTEX_CMP_REQUEUE - wake val processes and re-queue rest on uaddr2 + * if uaddr has value val3 + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_CMP_REQUEUE + * 3. val - how many processes to wake + * 4. val2 - amount of processes to re-queue on uadr2 + * 5. uaddr2 - another futex address, to re-queue waiting processes on + * 6. val3 - expected value stored in uaddr + */ + + /* Comparison re-queue with wrong val value */ + CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VAL, VAL2, uaddr2, VAL3, + (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, VAL3_PR, sprintrc(rc)); + + /* Successful comparison re-queue */ + CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VAL, VAL2, uaddr2, *uaddr, + (rc == 0)); + printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc)); + + /* Successful comparison re-queue */ + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_CMP_REQUEUE, VAL, + VAL2, uaddr2, *uaddr, (rc == 0)); + printf("futex(%p, FUTEX_CMP_REQUEUE_PRIVATE, %u, %u, %p, %u) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_CMP_REQUEUE, ARG3 | ARG4 | ARG5 | ARG6, + "%u", "%u", "%#lx", "%u"); + + /* FUTEX_WAKE_OP - wake val processes waiting for uaddr, additionally + * wake val2 processes waiting for uaddr2 in case + * operation encoded in val3 (change of value at uaddr2 + * and comparison of previous value against provided + * constant) succeedes with value at uaddr2. Operation + * result is written to value of uaddr2 (in any case). + * 1. uaddr - futex address + * 2. op - FUTEX_WAKE_OP + * 3. val - how many processes to wake + * 4. val2 - amount of processes to wake in case operation encoded in + * val3 returns true + * 5. uaddr2 - another futex address, for conditional wake of + * additional processes + * 6. val3 - encoded operation: + * 1. bit 31 - if 1 then value stored in field field 4 + * should be interpreted as power of 2. + * 2. 28..30 - arithmetic operation which should be + * applied to previous value stored in + * uaddr2. Values available (from 2005 up to + * 2016): SET. ADD, OR, ANDN, XOR. + * 3. 24..29 - comparison operation which should be + * applied to the old value stored in uaddr2 + * (before arithmetic operation is applied). + * Possible values: EQ, NE, LT, LE, GT, GE. + * 4. 12..23 - Second operand for arithmetic operation. + * If bit 31 is set, it is interpreted as + * power of 2. + * 5. 00..11 - Value against which old value stored in + * uaddr2 is compared. + */ + + static const struct { + uint32_t val; + const char *str; + int err; + const char *errstr; + } wake_ops[] = { + { 0x00000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x00fff000, "FUTEX_OP_SET<<28|0xfff<<12|FUTEX_OP_CMP_EQ<<24|" + "0" }, + { 0x00000fff, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_EQ<<24|" + "0xfff" }, + { 0x00ffffff, "FUTEX_OP_SET<<28|0xfff<<12|FUTEX_OP_CMP_EQ<<24|" + "0xfff" }, + { 0x10000000, "FUTEX_OP_ADD<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x20000000, "FUTEX_OP_OR<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x30000000, "FUTEX_OP_ANDN<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x40000000, "FUTEX_OP_XOR<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x50000000, "0x5<<28 /* FUTEX_OP_??? */|0<<12|" + "FUTEX_OP_CMP_EQ<<24|0", ENOSYS, "ENOSYS" }, + { 0x70000000, "0x7<<28 /* FUTEX_OP_??? */|0<<12|" + "FUTEX_OP_CMP_EQ<<24|0", ENOSYS, "ENOSYS" }, + { 0x80000000, "FUTEX_OP_OPARG_SHIFT<<28|FUTEX_OP_SET<<28|0<<12|" + "FUTEX_OP_CMP_EQ<<24|0" }, + { 0xa0caffee, "FUTEX_OP_OPARG_SHIFT<<28|FUTEX_OP_OR<<28|" + "0xcaf<<12|FUTEX_OP_CMP_EQ<<24|0xfee" }, + { 0x01000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_NE<<24|0" }, + { 0x01234567, "FUTEX_OP_SET<<28|0x234<<12|FUTEX_OP_CMP_NE<<24|" + "0x567" }, + { 0x02000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_LT<<24|0" }, + { 0x03000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_LE<<24|0" }, + { 0x04000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_GT<<24|0" }, + { 0x05000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_GE<<24|0" }, + { 0x06000000, "FUTEX_OP_SET<<28|0<<12|" + "0x6<<24 /* FUTEX_OP_CMP_??? */|0", ENOSYS, "ENOSYS" }, + { 0x07000000, "FUTEX_OP_SET<<28|0<<12|" + "0x7<<24 /* FUTEX_OP_CMP_??? */|0", ENOSYS, "ENOSYS" }, + { 0x08000000, "FUTEX_OP_SET<<28|0<<12|" + "0x8<<24 /* FUTEX_OP_CMP_??? */|0", ENOSYS, "ENOSYS" }, + { 0x0f000000, "FUTEX_OP_SET<<28|0<<12|" + "0xf<<24 /* FUTEX_OP_CMP_??? */|0", ENOSYS, "ENOSYS" }, + { 0xbadfaced, "FUTEX_OP_OPARG_SHIFT<<28|FUTEX_OP_ANDN<<28|" + "0xdfa<<12|0xa<<24 /* FUTEX_OP_CMP_??? */|0xced", + ENOSYS, "ENOSYS" }, + { 0xffffffff, "FUTEX_OP_OPARG_SHIFT<<28|" + "0x7<<28 /* FUTEX_OP_??? */|0xfff<<12|" + "0xf<<24 /* FUTEX_OP_CMP_??? */|0xfff", + ENOSYS, "ENOSYS" }, + }; + + for (i = 0; i < ARRAY_SIZE(wake_ops); i++) { + for (j = 0; j < 2; j++) { + CHECK_FUTEX_ENOSYS(uaddr, + j ? FUTEX_WAKE_OP_PRIVATE : FUTEX_WAKE_OP, + VAL, i, uaddr2, wake_ops[i].val, (rc == 0)); + printf("futex(%p, FUTEX_WAKE_OP%s, %u, %u, %p, %s) = " + "%s\n", uaddr, j ? "_PRIVATE" : "", VAL_PR, i, + uaddr2, wake_ops[i].str, sprintrc(rc)); + } + } + + CHECK_INVALID_CLOCKRT(FUTEX_WAKE_OP, ARG3 | ARG4 | ARG5 | ARG6, + "%u", "%u", "%#lx", + /* Decoding of the 0xdeadbee4 value */ + "FUTEX_OP_OPARG_SHIFT<<28|0x5<<28 /* FUTEX_OP_??? */|0xadb<<12|" + "0xe<<24 /* FUTEX_OP_CMP_??? */|0xee4"); + + /* FUTEX_LOCK_PI - slow path for mutex lock with process inheritance + * support. Expect that futex has 0 in unlocked case and + * TID of owning process in locked case. Value can also + * contain FUTEX_WAITERS bit signalling the presence of + * waiters queue. + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_LOCK_PI + * 3. val - not used + * 4. timeout - timeout + * 5. uaddr2 - not used + * 6. val3 - not used + */ + + *uaddr = getpid(); + + CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_LOCK_PI, VAL, tmout, uaddr2 + 1, + VAL3, (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_LOCK_PI, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + uaddr + 1, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_PRIVATE_FLAG | FUTEX_LOCK_PI, VAL, + tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_LOCK_PI_PRIVATE, {tv_sec=%jd, tv_nsec=%jd}) = " + "%s\n", + uaddr + 1, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + + /* NULL is passed by invalid_op() in cases valid timeout address is + * needed */ + CHECK_INVALID_CLOCKRT(FUTEX_LOCK_PI, ARG4, "NULL"); + + /* FUTEX_UNLOCK_PI - slow path for mutex unlock with process inheritance + * support. Expected to be called by process in case + * it failed to execute fast path (it usually means + * that FUTEX_WAITERS flag had been set while the lock + * has been held). + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_UNLOCK_PI + * 3. val - not used + * 4. timeout - not used + * 5. uaddr2 - not used + * 6. val3 - not used + */ + + CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_UNLOCK_PI, VAL, tmout, uaddr2 + 1, + VAL3, (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_UNLOCK_PI) = %s\n", uaddr + 1, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_PRIVATE_FLAG | FUTEX_UNLOCK_PI, VAL, + tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_UNLOCK_PI_PRIVATE) = %s\n", uaddr +1, + sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_UNLOCK_PI, 0); + + /* FUTEX_TRYLOCK_PI - slow path for mutex trylock with process + * inheritance support. + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_TRYLOCK_PI + * 3. val - not used + * 4. timeout - not used + * 5. uaddr2 - not used + * 6. val3 - not used + */ + + CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_TRYLOCK_PI, VAL, tmout, uaddr2 + 1, + VAL3, (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_TRYLOCK_PI) = %s\n", uaddr + 1, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_PRIVATE_FLAG | FUTEX_TRYLOCK_PI, + VAL, tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EFAULT)); + printf("futex(%p, FUTEX_TRYLOCK_PI_PRIVATE) = %s\n", uaddr + 1, + sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_TRYLOCK_PI, 0); + + /* FUTEX_WAIT_REQUEUE_PI - kernel-side handling of special case when + * processes should be re-queued on PI-aware + * futexes. This is so special since PI futexes + * utilize rt_mutex and it should be at no time + * left free with a wait queue, so this should + * be performed atomically in-kernel. + * Possible flags: PRIVATE, CLOCKRT + * 1. uaddr - futex address + * 2. op - FUTEX_WAIT_REQUEUE_PI + * 3. val - expected value stored in uaddr + * 4. timeout - timeout + * 5. uaddr2 - (PI-aware) futex address to requeue process on + * 6. val3 - not used (in kernel, it always initialized to + * FUTEX_BITSET_MATCH_ANY and passed to + * futex_wait_requeue_pi()) + */ + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAIT_REQUEUE_PI, VAL, tmout, uaddr2, + VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_REQUEUE_PI, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %p) = %s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, uaddr2, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAIT_REQUEUE_PI, + VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_REQUEUE_PI_PRIVATE, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %p) " + "= %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, uaddr2, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_WAIT_REQUEUE_PI, + VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_REQUEUE_PI|FUTEX_CLOCK_REALTIME, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %p) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, uaddr2, + sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_PRIVATE_FLAG | + FUTEX_WAIT_REQUEUE_PI, VAL, tmout, uaddr2, VAL3, + (rc == -1) && (errno == EAGAIN)); + printf("futex(%p, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, " + "%u, {tv_sec=%jd, tv_nsec=%jd}, %p) = %s\n", uaddr, VAL_PR, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, uaddr2, + sprintrc(rc)); + + /* FUTEX_CMP_REQUEUE_PI - version of FUTEX_CMP_REQUEUE which re-queues + * on PI-aware futex. + * Possible flags: PRIVATE + * 1. uaddr - futex address + * 2. op - FUTEX_CMP_REQUEUE + * 3. val - how many processes to wake + * 4. val2 - amount of processes to re-queue on uadr2 + * 5. uaddr2 - (PI-aware) futex address, to re-queue waiting processes + * on + * 6. val3 - expected value stored in uaddr + */ + + /* All these should fail with EINVAL since we try to re-queue to non-PI + * futex. + */ + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CMP_REQUEUE_PI, VAL, VAL2, uaddr2, VAL3, + (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_CMP_REQUEUE_PI, %u, %u, %p, %u) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, VAL3_PR, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CMP_REQUEUE_PI, VAL, VAL2, uaddr2, + *uaddr, (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_CMP_REQUEUE_PI, %u, %u, %p, %u) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc)); + + CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_CMP_REQUEUE_PI, + VAL, VAL2, uaddr2, *uaddr, (rc == -1) && (errno == EINVAL)); + printf("futex(%p, FUTEX_CMP_REQUEUE_PI_PRIVATE, %u, %u, %p, %u) = %s\n", + uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc)); + + CHECK_INVALID_CLOCKRT(FUTEX_CMP_REQUEUE_PI, ARG3 | ARG4 | ARG5 | ARG6, + "%u", "%u", "%#lx", "%u"); + + /* + * Unknown commands + */ + + CHECK_FUTEX(uaddr, 0xd, VAL, tmout + 1, uaddr2 + 1, VAL3, + (rc == -1) && (errno == ENOSYS)); + printf("futex(%p, 0xd /* FUTEX_??? */, %u, %p, %p, %#x) = %s\n", + uaddr, VAL_PR, tmout + 1, uaddr2 + 1, VAL3_PR, sprintrc(rc)); + + CHECK_FUTEX(uaddr, 0xbefeeded, VAL, tmout + 1, uaddr2, VAL3, + (rc == -1) && (errno == ENOSYS)); + printf("futex(%p, 0xbefeeded /* FUTEX_??? */, %u, %p, %p, %#x) = %s\n", + uaddr, VAL_PR, tmout + 1, uaddr2, VAL3_PR, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_futex") + +#endif diff --git a/tests-mx32/futex.test b/tests-mx32/futex.test new file mode 100755 index 000000000..fc98267a9 --- /dev/null +++ b/tests-mx32/futex.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check futex syscall decoding. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a27 +run_strace_match_diff -v -a27 diff --git a/tests-mx32/futimesat.c b/tests-mx32/futimesat.c new file mode 100644 index 000000000..c35662912 --- /dev/null +++ b/tests-mx32/futimesat.c @@ -0,0 +1,89 @@ +/* + * Check decoding of futimesat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_futimesat + +# include +# include +# include +# include + + +int +main(void) +{ + struct timeval tv; + if (gettimeofday(&tv, NULL)) + perror_msg_and_fail("gettimeofday"); + + static const char sample[] = "futimesat_sample"; + unsigned long dirfd = (unsigned long) 0xdeadbeef00000000ULL | -100U; + + long rc = syscall(__NR_futimesat, dirfd, sample, 0); + printf("futimesat(AT_FDCWD, \"%s\", NULL) = %ld %s (%m)\n", + sample, rc, errno2name()); + + struct timeval *const ts = tail_alloc(sizeof(*ts) * 2); + dirfd = (unsigned long) 0xdeadbeefffffffffULL; + + ts[0].tv_sec = tv.tv_sec; + ts[0].tv_usec = tv.tv_usec; + ts[1].tv_sec = tv.tv_sec - 1; + ts[1].tv_usec = tv.tv_usec + 1; + + rc = syscall(__NR_futimesat, dirfd, 0, ts + 2); + printf("futimesat(%d, NULL, %p) = %ld %s (%m)\n", + (int) dirfd, ts + 2, rc, errno2name()); + + rc = syscall(__NR_futimesat, dirfd, 0, ts + 1); + printf("futimesat(%d, NULL, [{tv_sec=%jd, tv_usec=%jd}, %p]) = " + "%ld %s (%m)\n", (int) dirfd, + (intmax_t) ts[1].tv_sec, (intmax_t) ts[1].tv_usec, + ts + 2, rc, errno2name()); + + (void) close(0); + rc = syscall(__NR_futimesat, 0, "", ts); + printf("futimesat(0, \"\", [{tv_sec=%jd, tv_usec=%jd}, " + "{tv_sec=%jd, tv_usec=%jd}]) = %ld %s (%m)\n", + (intmax_t) ts[0].tv_sec, (intmax_t) ts[0].tv_usec, + (intmax_t) ts[1].tv_sec, (intmax_t) ts[1].tv_usec, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_futimesat") + +#endif diff --git a/tests-mx32/futimesat.test b/tests-mx32/futimesat.test new file mode 100755 index 000000000..3a67c0422 --- /dev/null +++ b/tests-mx32/futimesat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check futimesat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-mx32/get_mempolicy.c b/tests-mx32/get_mempolicy.c new file mode 100644 index 000000000..03d1bffc5 --- /dev/null +++ b/tests-mx32/get_mempolicy.c @@ -0,0 +1,135 @@ +/* + * Check decoding of get_mempolicy syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_get_mempolicy + +# include +# include + +# include "xlat.h" +# include "xlat/policies.h" + +# define MAX_STRLEN 3 +# define NLONGS(n) ((n + 8 * sizeof(long) - 2) \ + / (8 * sizeof(long))) + +static void +print_nodes(unsigned long maxnode) +{ + unsigned long *const nodemask = + tail_alloc(sizeof(*nodemask) * NLONGS(maxnode)); + + if (syscall(__NR_get_mempolicy, 0, nodemask, maxnode, 0, 0)) { + printf("get_mempolicy(NULL, %p, %lu, NULL, 0) = -1 %s (%m)\n", + nodemask, maxnode, errno2name()); + return; + } + + printf("get_mempolicy(NULL, ["); + + unsigned int nlongs = NLONGS(maxnode); + unsigned int i; + for (i = 0; i < nlongs; ++i) { + if (i) + fputs(", ", stdout); + if (i >= MAX_STRLEN) { + fputs("...", stdout); + break; + } + printf("%#0*lx", (int) sizeof(*nodemask) * 2 + 2, nodemask[i]); + } + + printf("], %lu, NULL, 0) = 0\n", maxnode); +} + +int +main(void) +{ + long rc; + + if (syscall(__NR_get_mempolicy, 0, 0, 0, 0, 0)) + perror_msg_and_skip("get_mempolicy"); + puts("get_mempolicy(NULL, NULL, 0, NULL, 0) = 0"); + + int *mode = (void *) 0xdefaced1baddeed2; + unsigned long maxnode = (unsigned long) 0xcafef00dbadc0dedULL; + const unsigned long *nodemask = (void *) 0xfacedad3bebefed4ULL; + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL; + const unsigned long flags = -1U; + rc = syscall(__NR_get_mempolicy, mode, nodemask, maxnode, addr, flags); + printf("get_mempolicy(%p, %p, %lu, %#lx, %s|%#lx) = %ld %s (%m)\n", + mode, nodemask, maxnode, addr, + "MPOL_F_NODE|MPOL_F_ADDR", + flags & ~3, rc, errno2name()); + + mode = tail_alloc(sizeof(*mode)); + + rc = syscall(__NR_get_mempolicy, mode, 0, 0, 0, 0); + printf("get_mempolicy(["); + printxval(policies, (unsigned) *mode, "MPOL_???"); + printf("], NULL, 0, NULL, 0) = %ld\n", rc); + + *mode = -1; + rc = syscall(__NR_get_mempolicy, mode, 0, 0, mode - 1, 2); + printf("get_mempolicy(["); + printxval(policies, (unsigned) *mode, "MPOL_???"); + printf("], NULL, 0, %p, MPOL_F_ADDR) = %ld\n", mode - 1, rc); + + maxnode = get_page_size() * 8; + + print_nodes(maxnode); + print_nodes(maxnode + 1); + print_nodes(maxnode + 2); + + maxnode = sizeof(*nodemask) * 8; + print_nodes(maxnode - 1); + print_nodes(maxnode ); + print_nodes(maxnode + 1); + print_nodes(maxnode + 2); + print_nodes(maxnode * 2 - 1); + print_nodes(maxnode * 2 ); + print_nodes(maxnode * 2 + 1); + print_nodes(maxnode * 2 + 2); + print_nodes(maxnode * 3 - 1); + print_nodes(maxnode * 3 ); + print_nodes(maxnode * 3 + 1); + print_nodes(maxnode * 3 + 2); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_get_mempolicy") + +#endif diff --git a/tests-mx32/get_mempolicy.test b/tests-mx32/get_mempolicy.test new file mode 100755 index 000000000..92270970a --- /dev/null +++ b/tests-mx32/get_mempolicy.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check get_mempolicy syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 -a38 diff --git a/tests-mx32/get_page_size.c b/tests-mx32/get_page_size.c new file mode 100644 index 000000000..aeea861cc --- /dev/null +++ b/tests-mx32/get_page_size.c @@ -0,0 +1,13 @@ +#include "tests.h" +#include + +size_t +get_page_size(void) +{ + static size_t page_size; + + if (!page_size) + page_size = sysconf(_SC_PAGESIZE); + + return page_size; +} diff --git a/tests-mx32/getcpu.c b/tests-mx32/getcpu.c new file mode 100644 index 000000000..ec671f1e8 --- /dev/null +++ b/tests-mx32/getcpu.c @@ -0,0 +1,76 @@ +/* + * Check decoding of getcpu syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_getcpu + +# include +# include + +int +main(void) +{ + unsigned *bogus_cpu = + (unsigned *) tail_alloc(sizeof(* bogus_cpu)) + 1; + unsigned *bogus_node = + (unsigned *) tail_alloc(sizeof(* bogus_node)) + 1; + unsigned *bogus_tcache = + (unsigned *) tail_alloc(sizeof(* bogus_tcache)) + 1; + + long res; + unsigned *cpu = tail_alloc(sizeof(*cpu)); + unsigned *node = tail_alloc(sizeof(*node)); + long * tcache = tail_alloc(128); + + res = syscall(__NR_getcpu, NULL, NULL, NULL); + printf("getcpu(NULL, NULL, NULL) = %s\n", sprintrc(res)); + + res = syscall(__NR_getcpu, bogus_cpu, bogus_node, bogus_tcache); + printf("getcpu(%p, %p, %p) = %s\n", + bogus_cpu, bogus_node, bogus_tcache, sprintrc(res)); + + res = syscall(__NR_getcpu, cpu, node, tcache); + if (res != 0) + perror_msg_and_skip("getcpu"); + + printf("getcpu([%u], [%u], %p) = 0\n", *cpu, *node, tcache); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getcpu"); + +#endif diff --git a/tests-mx32/getcpu.test b/tests-mx32/getcpu.test new file mode 100755 index 000000000..fe212658e --- /dev/null +++ b/tests-mx32/getcpu.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of getcpu syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff --git a/tests-mx32/getcwd.c b/tests-mx32/getcwd.c new file mode 100644 index 000000000..707c25c96 --- /dev/null +++ b/tests-mx32/getcwd.c @@ -0,0 +1,46 @@ +#include "tests.h" + +#include + +#ifdef __NR_getcwd + +# include +# include +# include + +int +main(void) +{ + long res; + char cur_dir[PATH_MAX + 1]; + static const size_t bogus_size = (size_t) 0xbadc0deddeadfaceULL; + + res = syscall(__NR_getcwd, cur_dir, sizeof(cur_dir)); + + if (res <= 0) + perror_msg_and_fail("getcwd"); + + printf("getcwd(\""); + print_quoted_string(cur_dir); + printf("\", %zu) = %ld\n", sizeof(cur_dir), res); + + res = syscall(__NR_getcwd, cur_dir, 0); + printf("getcwd(%p, 0) = %s\n", cur_dir, sprintrc(res)); + + res = syscall(__NR_getcwd, NULL, bogus_size); + printf("getcwd(NULL, %zu) = %s\n", bogus_size, sprintrc(res)); + + res = syscall(__NR_getcwd, (void *) -1L, sizeof(cur_dir)); + printf("getcwd(%p, %zu) = %s\n", + (void *) -1L, sizeof(cur_dir), sprintrc(res)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getcwd"); + +#endif diff --git a/tests-mx32/getcwd.test b/tests-mx32/getcwd.test new file mode 100755 index 000000000..405187e5c --- /dev/null +++ b/tests-mx32/getcwd.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getcwd syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff --git a/tests-mx32/getdents.c b/tests-mx32/getdents.c new file mode 100644 index 000000000..b787c837b --- /dev/null +++ b/tests-mx32/getdents.c @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_getdents + +# include +# include +# include +# include +# include +# include +# include + +static const char fname[] = + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nZ"; +static const char qname[] = + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nZ"; + +static char buf[8192]; + +static const char * +str_d_type(const unsigned char d_type) +{ + switch (d_type) { + case DT_DIR: + return "DT_DIR"; + case DT_REG: + return "DT_REG"; + default: + return "DT_UNKNOWN"; + } +} +static void +print_dirent(const kernel_dirent *d) +{ + const unsigned int d_name_offset = offsetof(kernel_dirent, d_name); + int d_name_len = d->d_reclen - d_name_offset - 1; + assert(d_name_len > 0); + + printf("{d_ino=%llu, d_off=%llu, d_reclen=%u, d_name=", + (unsigned long long) d->d_ino, + (unsigned long long) d->d_off, d->d_reclen); + + if (d->d_name[0] == '.') + printf("\"%.*s\"", d_name_len, d->d_name); + else + printf("\"%s\"", qname); + + printf(", d_type=%s}", + str_d_type(*((const char *) d + d->d_reclen - 1))); +} + +int +main(int ac, const char **av) +{ + char *dname; + + assert(ac == 1); + assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); + assert(!mkdir(dname, 0700)); + assert(!chdir(dname)); + (void) close(0); + assert(!creat(fname, 0600)); + assert(!close(0)); + assert(!open(".", O_RDONLY | O_DIRECTORY)); + + unsigned long count = (unsigned long) 0xfacefeeddeadbeefULL; + long rc = syscall(__NR_getdents, (long) 0xdefacedffffffffULL, NULL, + count); + printf("getdents(-1, NULL, %u) = %ld %s (%m)\n", + (unsigned) count, rc, errno2name()); + + count = (unsigned long) 0xfacefeed00000000ULL | sizeof(buf); + while ((rc = syscall(__NR_getdents, 0, buf, count))) { + kernel_dirent *d; + long i; + + if (rc < 0) + perror_msg_and_skip("getdents"); + printf("getdents(0, ["); + for (i = 0; i < rc; i += d->d_reclen) { + d = (kernel_dirent *) &buf[i]; + if (i) + printf(", "); + print_dirent(d); + } + printf("], %u) = %ld\n", (unsigned) count, rc); + } + printf("getdents(0, [], %u) = 0\n", (unsigned) count); + puts("+++ exited with 0 +++"); + assert(!unlink(fname)); + assert(!chdir("..")); + assert(!rmdir(dname)); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getdents") + +#endif diff --git a/tests-mx32/getdents.test b/tests-mx32/getdents.test new file mode 100755 index 000000000..23c4ac3ad --- /dev/null +++ b/tests-mx32/getdents.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check getdents syscall decoding. + +. "${srcdir=.}/init.sh" + +rm -rf -- "$LOG".dir +run_strace_match_diff -a22 -v diff --git a/tests-mx32/getdents64.c b/tests-mx32/getdents64.c new file mode 100644 index 000000000..9da2a23c2 --- /dev/null +++ b/tests-mx32/getdents64.c @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_getdents64 + +# include +# include +# include +# include +# include +# include +# include +# include + +static const char fname[] = + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nZ"; +static const char qname[] = + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nZ"; + +typedef struct { + uint64_t d_ino; + uint64_t d_off; + unsigned short d_reclen; + unsigned char d_type; + char d_name[256]; +} kernel_dirent64; + +static char buf[8192]; + +static const char * +str_d_type(const unsigned char d_type) +{ + switch (d_type) { + case DT_DIR: + return "DT_DIR"; + case DT_REG: + return "DT_REG"; + default: + return "DT_UNKNOWN"; + } +} +static void +print_dirent(const kernel_dirent64 *d) +{ + const unsigned int d_name_offset = offsetof(kernel_dirent64, d_name); + int d_name_len = d->d_reclen - d_name_offset; + assert(d_name_len > 0); + + printf("{d_ino=%" PRIu64 ", d_off=%" PRId64 + ", d_reclen=%u, d_type=%s, d_name=", + d->d_ino, d->d_off, d->d_reclen, str_d_type(d->d_type)); + + if (d->d_name[0] == '.') + printf("\"%.*s\"}", d_name_len, d->d_name); + else + printf("\"%s\"}", qname); +} + +int +main(int ac, const char **av) +{ + char *dname; + + assert(ac == 1); + assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); + assert(!mkdir(dname, 0700)); + assert(!chdir(dname)); + (void) close(0); + assert(!creat(fname, 0600)); + assert(!close(0)); + assert(!open(".", O_RDONLY | O_DIRECTORY)); + + unsigned long count = (unsigned long) 0xfacefeeddeadbeefULL; + long rc = syscall(__NR_getdents64, (long) 0xdefacedffffffffULL, NULL, + count); + printf("getdents64(-1, NULL, %u) = %ld %s (%m)\n", + (unsigned) count, rc, errno2name()); + + count = (unsigned long) 0xfacefeed00000000ULL | sizeof(buf); + while ((rc = syscall(__NR_getdents64, 0, buf, count))) { + kernel_dirent64 *d; + long i; + + if (rc < 0) + perror_msg_and_skip("getdents64"); + printf("getdents64(0, ["); + for (i = 0; i < rc; i += d->d_reclen) { + d = (kernel_dirent64 *) &buf[i]; + if (i) + printf(", "); + print_dirent(d); + } + printf("], %u) = %ld\n", (unsigned) count, rc); + } + printf("getdents64(0, [], %u) = 0\n", (unsigned) count); + puts("+++ exited with 0 +++"); + assert(!unlink(fname)); + assert(!chdir("..")); + assert(!rmdir(dname)); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getdents64") + +#endif diff --git a/tests-mx32/getdents64.test b/tests-mx32/getdents64.test new file mode 100755 index 000000000..401cfc7cf --- /dev/null +++ b/tests-mx32/getdents64.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check getdents64 syscall decoding. + +. "${srcdir=.}/init.sh" + +rm -rf -- "$LOG".dir +run_strace_match_diff -a24 -v diff --git a/tests-mx32/getegid.c b/tests-mx32/getegid.c new file mode 100644 index 000000000..98f8b9cbe --- /dev/null +++ b/tests-mx32/getegid.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getegid + +# include +# include + +int +main(void) +{ + printf("getegid() = %ld\n", syscall(__NR_getegid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getegid") + +#endif diff --git a/tests-mx32/getegid.test b/tests-mx32/getegid.test new file mode 100755 index 000000000..4354158bd --- /dev/null +++ b/tests-mx32/getegid.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getegid syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-mx32/getegid32.c b/tests-mx32/getegid32.c new file mode 100644 index 000000000..d9951864b --- /dev/null +++ b/tests-mx32/getegid32.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getegid32 + +# include +# include + +int +main(void) +{ + printf("getegid32() = %ld\n", syscall(__NR_getegid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getegid32") + +#endif diff --git a/tests-mx32/getegid32.test b/tests-mx32/getegid32.test new file mode 100755 index 000000000..a266620e1 --- /dev/null +++ b/tests-mx32/getegid32.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getegid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-mx32/geteuid.c b/tests-mx32/geteuid.c new file mode 100644 index 000000000..ef8269f97 --- /dev/null +++ b/tests-mx32/geteuid.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_geteuid + +# include +# include + +int +main(void) +{ + printf("geteuid() = %ld\n", syscall(__NR_geteuid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_geteuid") + +#endif diff --git a/tests-mx32/geteuid.test b/tests-mx32/geteuid.test new file mode 100755 index 000000000..14ff6a691 --- /dev/null +++ b/tests-mx32/geteuid.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check geteuid syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-mx32/geteuid32.c b/tests-mx32/geteuid32.c new file mode 100644 index 000000000..4341e46f3 --- /dev/null +++ b/tests-mx32/geteuid32.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_geteuid32 + +# include +# include + +int +main(void) +{ + printf("geteuid32() = %ld\n", syscall(__NR_geteuid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_geteuid32") + +#endif diff --git a/tests-mx32/geteuid32.test b/tests-mx32/geteuid32.test new file mode 100755 index 000000000..9dd173d9f --- /dev/null +++ b/tests-mx32/geteuid32.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check geteuid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-mx32/getgid.c b/tests-mx32/getgid.c new file mode 100644 index 000000000..2e060390e --- /dev/null +++ b/tests-mx32/getgid.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getgid + +# include +# include + +int +main(void) +{ + printf("getgid() = %ld\n", syscall(__NR_getgid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgid") + +#endif diff --git a/tests-mx32/getgid.test b/tests-mx32/getgid.test new file mode 100755 index 000000000..f4f0c2e66 --- /dev/null +++ b/tests-mx32/getgid.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getgid syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-mx32/getgid32.c b/tests-mx32/getgid32.c new file mode 100644 index 000000000..52e4d76a0 --- /dev/null +++ b/tests-mx32/getgid32.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getgid32 + +# include +# include + +int +main(void) +{ + printf("getgid32() = %ld\n", syscall(__NR_getgid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgid32") + +#endif diff --git a/tests-mx32/getgid32.test b/tests-mx32/getgid32.test new file mode 100755 index 000000000..3bc98d1ad --- /dev/null +++ b/tests-mx32/getgid32.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getgid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-mx32/getgroups.c b/tests-mx32/getgroups.c new file mode 100644 index 000000000..2617303f1 --- /dev/null +++ b/tests-mx32/getgroups.c @@ -0,0 +1,135 @@ +/* + * Check decoding of getgroups/getgroups32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __NR_getgroups32 + +# define SYSCALL_NR __NR_getgroups32 +# define SYSCALL_NAME "getgroups32" +# define GID_TYPE unsigned int + +#else + +# include "tests.h" +# include + +# ifdef __NR_getgroups + +# define SYSCALL_NR __NR_getgroups +# define SYSCALL_NAME "getgroups" +# if defined __NR_getgroups32 && __NR_getgroups != __NR_getgroups32 +# define GID_TYPE unsigned short +# else +# define GID_TYPE unsigned int +# endif + +# endif + +#endif + +#ifdef GID_TYPE + +# include +# include + +#define MAX_STRLEN 32 +static long ngroups; + +static void +get_groups(const long size, GID_TYPE *const g) +{ + long i = syscall(SYSCALL_NR, size, g); + if (i != ngroups) + perror_msg_and_fail("%s(%#lx, %p)", SYSCALL_NAME, size, g); + + printf("%s(%d, [", SYSCALL_NAME, (int) size); + for (i = 0; i < ngroups; ++i) { + if (i) + printf(", "); + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + printf("%u", (unsigned int) g[i]); + } + printf("]) = %ld\n", ngroups); +} + +int +main(void) +{ + long rc; + + /* check how the first argument is decoded */ + ngroups = syscall(SYSCALL_NR, 0, 0); + printf("%s(0, NULL) = %ld\n", SYSCALL_NAME, ngroups); + if (ngroups < 0) + perror_msg_and_fail(SYSCALL_NAME); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL, 0); + printf("%s(0, NULL) = %ld\n", SYSCALL_NAME, rc); + + rc = syscall(SYSCALL_NR, -1U, 0); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, -1, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, -1L, 0); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, -1, sprintrc(rc)); + + const unsigned int ngroups_max = sysconf(_SC_NGROUPS_MAX); + + rc = syscall(SYSCALL_NR, ngroups_max, 0); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, ngroups_max, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL | ngroups_max, 0); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, ngroups_max, sprintrc(rc)); + + /* check how the second argument is decoded */ + GID_TYPE *const g1 = + tail_alloc(ngroups ? sizeof(*g1) * ngroups : 1); + GID_TYPE *const g2 = tail_alloc(sizeof(*g2) * (ngroups + 1)); + void *efault = g2 + ngroups + 1; + + get_groups(ngroups, g1); + get_groups(ngroups + 1, g1); + get_groups(ngroups + 1, g2); + + if (ngroups) { + rc = syscall(SYSCALL_NR, ngroups, efault); + printf("%s(%d, %p) = %s\n", + SYSCALL_NAME, (unsigned) ngroups, efault, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgroups") + +#endif diff --git a/tests-mx32/getgroups.test b/tests-mx32/getgroups.test new file mode 100755 index 000000000..2eb3056d9 --- /dev/null +++ b/tests-mx32/getgroups.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getgroups syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff --git a/tests-mx32/getgroups32.c b/tests-mx32/getgroups32.c new file mode 100644 index 000000000..d0a356de1 --- /dev/null +++ b/tests-mx32/getgroups32.c @@ -0,0 +1,12 @@ +#include "tests.h" +#include + +#ifdef __NR_getgroups32 + +# include "getgroups.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getgroups32") + +#endif diff --git a/tests-mx32/getgroups32.test b/tests-mx32/getgroups32.test new file mode 100755 index 000000000..12a8bcc0d --- /dev/null +++ b/tests-mx32/getgroups32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getgroups32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff --git a/tests-mx32/getpeername.c b/tests-mx32/getpeername.c new file mode 100644 index 000000000..c842acec6 --- /dev/null +++ b/tests-mx32/getpeername.c @@ -0,0 +1,63 @@ +/* + * Check decoding of getpeername syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define TEST_SYSCALL_NAME getpeername +#include "sockname.c" + +int +main(void) +{ + int lfd = socket(AF_UNIX, SOCK_STREAM, 0); + int cfd = socket(AF_UNIX, SOCK_STREAM, 0); + if (lfd < 0 || cfd < 0) + perror_msg_and_skip("socket"); + + (void) unlink(TEST_SOCKET); + + const struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = TEST_SOCKET + }; + + if (bind(lfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + if (listen(lfd, 1)) + perror_msg_and_skip("listen"); + if (connect(cfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("connect"); + if (accept(lfd, 0, 0) < 0) + perror_msg_and_skip("accept"); + + test_sockname_syscall(cfd); + + (void) unlink(TEST_SOCKET); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/getpeername.test b/tests-mx32/getpeername.test new file mode 100755 index 000000000..81f01bb18 --- /dev/null +++ b/tests-mx32/getpeername.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of getpeername syscall. + +. "${srcdir=.}/getsockname.test" diff --git a/tests-mx32/getpgrp.c b/tests-mx32/getpgrp.c new file mode 100644 index 000000000..8b9d08827 --- /dev/null +++ b/tests-mx32/getpgrp.c @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_getpgrp + +# include +# include + +int +main(void) +{ + printf("getpgrp() = %ld\n", syscall(__NR_getpgrp)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpgrp") + +#endif diff --git a/tests-mx32/getpgrp.test b/tests-mx32/getpgrp.test new file mode 100755 index 000000000..e116bb517 --- /dev/null +++ b/tests-mx32/getpgrp.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpgrp syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-mx32/getrandom.c b/tests-mx32/getrandom.c new file mode 100644 index 000000000..de1a0874e --- /dev/null +++ b/tests-mx32/getrandom.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_getrandom + +# include +# include + +int +main(void) +{ + unsigned char buf[4]; + + if (syscall(__NR_getrandom, buf, sizeof(buf) - 1, 0) != sizeof(buf) - 1) + perror_msg_and_skip("getrandom"); + printf("getrandom(\"\\x%02x\\x%02x\\x%02x\", 3, 0) = 3\n", + (int) buf[0], (int) buf[1], (int) buf[2]); + + if (syscall(__NR_getrandom, buf, sizeof(buf), 1) != sizeof(buf)) + perror_msg_and_skip("getrandom"); + printf("getrandom(\"\\x%02x\\x%02x\\x%02x\"..., 4, GRND_NONBLOCK) = 4\n", + (int) buf[0], (int) buf[1], (int) buf[2]); + + if (syscall(__NR_getrandom, buf, sizeof(buf), 0x3003) != -1) + perror_msg_and_skip("getrandom"); + printf("getrandom(%p, 4, GRND_NONBLOCK|GRND_RANDOM|0x3000) = " + "-1 EINVAL (%m)\n", buf); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getrandom") + +#endif diff --git a/tests-mx32/getrandom.test b/tests-mx32/getrandom.test new file mode 100755 index 000000000..ad34048fd --- /dev/null +++ b/tests-mx32/getrandom.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getrandom syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 -s3 diff --git a/tests-mx32/getresgid.c b/tests-mx32/getresgid.c new file mode 100644 index 000000000..b8c687b1c --- /dev/null +++ b/tests-mx32/getresgid.c @@ -0,0 +1,21 @@ +#include "tests.h" +#include + +#ifdef __NR_getresgid + +# define SYSCALL_NR __NR_getresgid +# define SYSCALL_NAME "getresgid" + +# if defined __NR_getresgid32 && __NR_getresgid != __NR_getresgid32 +# define UGID_TYPE short +# else +# define UGID_TYPE int +# endif + +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresgid") + +#endif diff --git a/tests-mx32/getresgid.test b/tests-mx32/getresgid.test new file mode 100755 index 000000000..9f5186e8c --- /dev/null +++ b/tests-mx32/getresgid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff --git a/tests-mx32/getresgid32.c b/tests-mx32/getresgid32.c new file mode 100644 index 000000000..71f11344d --- /dev/null +++ b/tests-mx32/getresgid32.c @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_getresgid32 + +# define SYSCALL_NR __NR_getresgid32 +# define SYSCALL_NAME "getresgid32" +# define UGID_TYPE int +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresgid32") + +#endif diff --git a/tests-mx32/getresgid32.test b/tests-mx32/getresgid32.test new file mode 100755 index 000000000..a9798911f --- /dev/null +++ b/tests-mx32/getresgid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-mx32/getresugid.c b/tests-mx32/getresugid.c new file mode 100644 index 000000000..0ee721cfe --- /dev/null +++ b/tests-mx32/getresugid.c @@ -0,0 +1,58 @@ +/* + * Check decoding of getresuid/getresgid/getresuid32/getresgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +int +main(void) +{ + unsigned UGID_TYPE *const r = tail_alloc(sizeof(*r)); + unsigned UGID_TYPE *const e = tail_alloc(sizeof(*e)); + unsigned UGID_TYPE *const s = tail_alloc(sizeof(*s)); + + if (syscall(SYSCALL_NR, r, e, s)) + perror_msg_and_fail(SYSCALL_NAME); + + printf("%s([%u], [%u], [%u]) = 0\n", SYSCALL_NAME, + (unsigned) *r, (unsigned) *e, (unsigned) *s); + + assert(syscall(SYSCALL_NR, NULL, e, s) == -1); + printf("%s(NULL, %p, %p) = -1 EFAULT (%m)\n", SYSCALL_NAME, e, s); + + assert(syscall(SYSCALL_NR, r, NULL, s) == -1); + printf("%s(%p, NULL, %p) = -1 EFAULT (%m)\n", SYSCALL_NAME, r, s); + + assert(syscall(SYSCALL_NR, r, e, NULL) == -1); + printf("%s(%p, %p, NULL) = -1 EFAULT (%m)\n", SYSCALL_NAME, r, e); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/getresuid.c b/tests-mx32/getresuid.c new file mode 100644 index 000000000..b00f20ba4 --- /dev/null +++ b/tests-mx32/getresuid.c @@ -0,0 +1,21 @@ +#include "tests.h" +#include + +#ifdef __NR_getresuid + +# define SYSCALL_NR __NR_getresuid +# define SYSCALL_NAME "getresuid" + +# if defined __NR_getresuid32 && __NR_getresuid != __NR_getresuid32 +# define UGID_TYPE short +# else +# define UGID_TYPE int +# endif + +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresuid") + +#endif diff --git a/tests-mx32/getresuid.test b/tests-mx32/getresuid.test new file mode 100755 index 000000000..eee1ac05b --- /dev/null +++ b/tests-mx32/getresuid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff --git a/tests-mx32/getresuid32.c b/tests-mx32/getresuid32.c new file mode 100644 index 000000000..4c9a83df5 --- /dev/null +++ b/tests-mx32/getresuid32.c @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +#ifdef __NR_getresuid32 + +# define SYSCALL_NR __NR_getresuid32 +# define SYSCALL_NAME "getresuid32" +# define UGID_TYPE int +# include "getresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getresuid32") + +#endif diff --git a/tests-mx32/getresuid32.test b/tests-mx32/getresuid32.test new file mode 100755 index 000000000..fdc76a310 --- /dev/null +++ b/tests-mx32/getresuid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getresuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-mx32/getrlimit.c b/tests-mx32/getrlimit.c new file mode 100644 index 000000000..bd9d0b0f2 --- /dev/null +++ b/tests-mx32/getrlimit.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_getrlimit + +# define NR_GETRLIMIT __NR_getrlimit +# define STR_GETRLIMIT "getrlimit" +# include "xgetrlimit.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_getrlimit") + +#endif diff --git a/tests-mx32/getrlimit.test b/tests-mx32/getrlimit.test new file mode 100755 index 000000000..6fd88aed1 --- /dev/null +++ b/tests-mx32/getrlimit.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of getrlimit syscall. + +. "${srcdir=.}/setrlimit.test" diff --git a/tests-mx32/getrusage.c b/tests-mx32/getrusage.c new file mode 100644 index 000000000..8b76eff69 --- /dev/null +++ b/tests-mx32/getrusage.c @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2016 Fei Jie + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_getrusage + +# include +# include +# include +# include + +int +main(void) +{ + struct rusage *const usage = tail_alloc(sizeof(struct rusage)); + int rc = syscall(__NR_getrusage, RUSAGE_SELF, usage); + printf("getrusage(RUSAGE_SELF, {ru_utime={tv_sec=%jd, tv_usec=%jd}" + ", ru_stime={tv_sec=%jd, tv_usec=%jd}, ru_maxrss=%lu" + ", ru_ixrss=%lu, ru_idrss=%lu, ru_isrss=%lu, ru_minflt=%lu" + ", ru_majflt=%lu, ru_nswap=%lu, ru_inblock=%lu" + ", ru_oublock=%lu, ru_msgsnd=%lu, ru_msgrcv=%lu" + ", ru_nsignals=%lu, ru_nvcsw=%lu, ru_nivcsw=%lu}) = %d\n", + (intmax_t) usage->ru_utime.tv_sec, + (intmax_t) usage->ru_utime.tv_usec, + (intmax_t) usage->ru_stime.tv_sec, + (intmax_t) usage->ru_stime.tv_usec, + usage->ru_maxrss, usage->ru_ixrss, usage->ru_idrss, + usage->ru_isrss, usage->ru_minflt, usage->ru_majflt, + usage->ru_nswap, usage->ru_inblock, usage->ru_oublock, + usage->ru_msgsnd, usage->ru_msgrcv, usage->ru_nsignals, + usage->ru_nvcsw, usage->ru_nivcsw, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getrusage") + +#endif diff --git a/tests-mx32/getrusage.test b/tests-mx32/getrusage.test new file mode 100755 index 000000000..4a3e8ed09 --- /dev/null +++ b/tests-mx32/getrusage.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getrusage syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v diff --git a/tests-mx32/getsid.c b/tests-mx32/getsid.c new file mode 100644 index 000000000..b563de9d0 --- /dev/null +++ b/tests-mx32/getsid.c @@ -0,0 +1,13 @@ +#include "tests.h" +#include +#include + +int +main(void) +{ + pid_t pid = getpid(); + printf("getsid(%d) = %d\n", pid, getsid(pid)); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/getsid.test b/tests-mx32/getsid.test new file mode 100755 index 000000000..3fcf9799b --- /dev/null +++ b/tests-mx32/getsid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getsid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-mx32/getsockname.c b/tests-mx32/getsockname.c new file mode 100644 index 000000000..66ac4e631 --- /dev/null +++ b/tests-mx32/getsockname.c @@ -0,0 +1,56 @@ +/* + * Check decoding of getsockname syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define TEST_SYSCALL_NAME getsockname +#include "sockname.c" + +int +main(void) +{ + int lfd = socket(AF_UNIX, SOCK_STREAM, 0); + if (lfd < 0) + perror_msg_and_skip("socket"); + + (void) unlink(TEST_SOCKET); + + const struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = TEST_SOCKET + }; + + if (bind(lfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + + test_sockname_syscall(lfd); + + (void) unlink(TEST_SOCKET); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/getsockname.test b/tests-mx32/getsockname.test new file mode 100755 index 000000000..99b285060 --- /dev/null +++ b/tests-mx32/getsockname.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of getsockname syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-mx32/getuid.c b/tests-mx32/getuid.c new file mode 100644 index 000000000..57311f72d --- /dev/null +++ b/tests-mx32/getuid.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getuid + +# include +# include + +int +main(void) +{ + printf("getuid() = %ld\n", syscall(__NR_getuid)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getuid") + +#endif diff --git a/tests-mx32/getuid.test b/tests-mx32/getuid.test new file mode 100755 index 000000000..9aaf74ba2 --- /dev/null +++ b/tests-mx32/getuid.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check getuid syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog uniq +run_prog > /dev/null +run_strace -qq -a9 -e$NAME $args > "$EXP" +uniq < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$OUT" "$EXP" diff --git a/tests-mx32/getuid32.c b/tests-mx32/getuid32.c new file mode 100644 index 000000000..397dd08ff --- /dev/null +++ b/tests-mx32/getuid32.c @@ -0,0 +1,20 @@ +#include "tests.h" +#include + +#ifdef __NR_getuid32 + +# include +# include + +int +main(void) +{ + printf("getuid32() = %ld\n", syscall(__NR_getuid32)); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getuid32") + +#endif diff --git a/tests-mx32/getuid32.test b/tests-mx32/getuid32.test new file mode 100755 index 000000000..ae0c557bd --- /dev/null +++ b/tests-mx32/getuid32.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check getuid32 syscall decoding. + +. "${srcdir=.}/getuid.test" diff --git a/tests-mx32/getxxid.c b/tests-mx32/getxxid.c new file mode 100644 index 000000000..6eee52c52 --- /dev/null +++ b/tests-mx32/getxxid.c @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_getxpid && defined __NR_getxuid && defined __NR_getxgid + +# include +# include + +int +main(void) +{ + long id; + pid_t ppid; + + id = syscall(__NR_getxpid); + ppid = getppid(); + printf("getxpid() = %ld (ppid %ld)\n", id, (long) ppid); + printf("getxpid() = %ld (ppid %ld)\n", id, (long) ppid); + + id = syscall(__NR_getxuid); + printf("getxuid() = %ld (euid %ld)\n", id, id); + + id = syscall(__NR_getxgid); + printf("getxgid() = %ld (egid %ld)\n", id, id); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getxpid && __NR_getxuid && __NR_getxgid") + +#endif diff --git a/tests-mx32/getxxid.test b/tests-mx32/getxxid.test new file mode 100755 index 000000000..9b89d7cfa --- /dev/null +++ b/tests-mx32/getxxid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getxpid, getxuid, and getxgid syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 -e trace=getxpid,getxuid,getxgid diff --git a/tests-mx32/hexdump_strdup.c b/tests-mx32/hexdump_strdup.c new file mode 100644 index 000000000..4d6b53f4c --- /dev/null +++ b/tests-mx32/hexdump_strdup.c @@ -0,0 +1,66 @@ +/* + * Make a hexdump copy of C string + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +const char * +hexdump_memdup(const char *src, size_t len) +{ + size_t dst_size = 3 * len + 2; + assert(dst_size > len); + + char *dst = malloc(dst_size); + if (!dst) + perror_msg_and_fail("malloc(%zu)", dst_size); + + char *p = dst; + const unsigned char *usrc = (const unsigned char *) src; + size_t i; + for (i = 0; i < len; ++i) { + unsigned int c = usrc[i]; + *(p++) = ' '; + if (i == 8) + *(p++) = ' '; + *(p++) = "0123456789abcdef"[c >> 4]; + *(p++) = "0123456789abcdef"[c & 0xf]; + } + *p = '\0'; + + return dst; +} + +const char * +hexdump_strdup(const char *src) +{ + return hexdump_memdup(src, strlen(src)); +} diff --git a/tests-mx32/hexquote_strndup.c b/tests-mx32/hexquote_strndup.c new file mode 100644 index 000000000..3ad3970c2 --- /dev/null +++ b/tests-mx32/hexquote_strndup.c @@ -0,0 +1,58 @@ +/* + * Make a hexquoted copy of a string + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +const char * +hexquote_strndup(const char *src, const size_t src_len) +{ + const size_t dst_size = 4 * src_len + 1; + assert(dst_size > src_len); + + char *dst = malloc(dst_size); + if (!dst) + perror_msg_and_fail("malloc(%zu)", dst_size); + + char *p = dst; + size_t i; + for (i = 0; i < src_len; ++i) { + unsigned int c = ((const unsigned char *) src)[i]; + *(p++) = '\\'; + *(p++) = 'x'; + *(p++) = "0123456789abcdef"[c >> 4]; + *(p++) = "0123456789abcdef"[c & 0xf]; + } + *p = '\0'; + + return dst; +} diff --git a/tests-mx32/inet-cmsg.c b/tests-mx32/inet-cmsg.c new file mode 100644 index 000000000..b530016d0 --- /dev/null +++ b/tests-mx32/inet-cmsg.c @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +static void +print_pktinfo(const struct cmsghdr *c) +{ + printf("IP_PKTINFO, cmsg_data={ipi_ifindex=if_nametoindex(\"lo\")" + ", ipi_spec_dst=inet_addr(\"127.0.0.1\")" + ", ipi_addr=inet_addr(\"127.0.0.1\")}"); +} + +static void +print_ttl(const struct cmsghdr *c) +{ + const unsigned int *ttl = (const unsigned int *) CMSG_DATA(c); + + printf("IP_TTL, cmsg_data=[%u]", *ttl); +} + +static void +print_tos(const struct cmsghdr *c) +{ + const uint8_t *tos = (const uint8_t *) CMSG_DATA(c); + + printf("IP_TOS, cmsg_data=[%#x]", *tos); +} + +static void +print_opts(const char *name, const struct cmsghdr *c) +{ + const unsigned char *opts = (const unsigned char *) CMSG_DATA(c); + const size_t len = c->cmsg_len - CMSG_ALIGN(sizeof(*c)); + + printf("%s", name); + if (len) { + printf(", cmsg_data=["); + size_t i; + for (i = 0; i < len; ++i) + printf("%s0x%02x", i ? ", " : "", opts[i]); + printf("]"); + } +} + +#ifdef IP_ORIGDSTADDR +static void +print_origdstaddr(const struct cmsghdr *c) +{ + const struct sockaddr_in *sin = + (const struct sockaddr_in *) CMSG_DATA(c); + + printf("IP_ORIGDSTADDR, cmsg_data={sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}", ntohs(sin->sin_port)); +} +#endif + +int +main(void) +{ + int i; + while ((i = open("/dev/null", O_RDWR)) < 3) + assert(i >= 0); + assert(!close(0)); + assert(!close(3)); + + if (socket(AF_INET, SOCK_DGRAM, 0)) + perror_msg_and_skip("socket"); + struct sockaddr_in addr = { + .sin_family = AF_INET, + .sin_addr.s_addr = htonl(INADDR_LOOPBACK) + }; + socklen_t len = sizeof(addr); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + assert(!getsockname(0, (struct sockaddr *) &addr, &len)); + + assert(socket(AF_INET, SOCK_DGRAM, 0) == 3); + assert(!connect(3, (struct sockaddr *) &addr, len)); + + const int opt_1 = htonl(0x01000000); +#define SETSOCKOPT(fd, name) assert(!setsockopt(fd, IPPROTO_IP, (name), &opt_1, sizeof(opt_1))) + SETSOCKOPT(3, IP_OPTIONS); + SETSOCKOPT(0, IP_PKTINFO); + SETSOCKOPT(0, IP_RECVTTL); + SETSOCKOPT(0, IP_RECVTOS); + SETSOCKOPT(0, IP_RECVOPTS); + SETSOCKOPT(0, IP_RETOPTS); +#ifdef IP_RECVORIGDSTADDR + SETSOCKOPT(0, IP_RECVORIGDSTADDR); +#endif + + static const char data[] = "data"; + const size_t size = sizeof(data) - 1; + assert(send(3, data, size, 0) == (int) size); + assert(!close(3)); + + char buf[size]; + struct iovec iov = { + .iov_base = buf, + .iov_len = sizeof(buf) + }; + struct cmsghdr control[16]; + struct msghdr mh = { + .msg_name = &addr, + .msg_namelen = len, + .msg_iov = &iov, + .msg_iovlen = 1, + .msg_control = control, + .msg_controllen = sizeof(control) + }; + + assert(recvmsg(0, &mh, 0) == (int) size); + assert(!close(0)); + + printf("recvmsg(0, {msg_name={sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, msg_namelen=%u" + ", msg_iov=[{iov_base=\"%s\", iov_len=%u}], msg_iovlen=1" + ", msg_control=[", + ntohs(addr.sin_port), (unsigned) mh.msg_namelen, + data, (unsigned) size); + + struct cmsghdr *c; + for (c = CMSG_FIRSTHDR(&mh); c; c = CMSG_NXTHDR(&mh, c)) { + if (IPPROTO_IP != c->cmsg_level) + continue; + if (c != control) + printf(", "); + printf("{cmsg_len=%lu, cmsg_level=SOL_IP, cmsg_type=", + (unsigned long) c->cmsg_len); + switch (c->cmsg_type) { + case IP_PKTINFO: + print_pktinfo(c); + break; + case IP_TTL: + print_ttl(c); + break; + case IP_TOS: + print_tos(c); + break; + case IP_RECVOPTS: + print_opts("IP_RECVOPTS", c); + break; + case IP_RETOPTS: + print_opts("IP_RETOPTS", c); + break; +#ifdef IP_ORIGDSTADDR + case IP_ORIGDSTADDR: + print_origdstaddr(c); + break; +#endif + default: + printf("%d", c->cmsg_type); + break; + } + printf("}"); + } + printf("], msg_controllen=%lu, msg_flags=0}, 0) = %u\n", + (unsigned long) mh.msg_controllen, (unsigned) size); + puts("+++ exited with 0 +++"); + + return 0; +} diff --git a/tests-mx32/inet-cmsg.test b/tests-mx32/inet-cmsg.test new file mode 100755 index 000000000..52ff5f595 --- /dev/null +++ b/tests-mx32/inet-cmsg.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check IPPROTO_IP control messages decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=recvmsg diff --git a/tests-mx32/init.sh b/tests-mx32/init.sh new file mode 100644 index 000000000..f368b98af --- /dev/null +++ b/tests-mx32/init.sh @@ -0,0 +1,272 @@ +#!/bin/sh +# +# Copyright (c) 2011-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ME_="${0##*/}" +LOG="$ME_.tmp" +OUT="$LOG.out" +EXP="$LOG.exp" +NAME="${ME_%.test}" + +warn_() { printf >&2 '%s\n' "$*"; } +fail_() { warn_ "$ME_: failed test: $*"; exit 1; } +skip_() { warn_ "$ME_: skipped test: $*"; exit 77; } +framework_failure_() { warn_ "$ME_: framework failure: $*"; exit 99; } +framework_skip_() { warn_ "$ME_: framework skip: $*"; exit 77; } + +check_prog() +{ + type "$@" > /dev/null 2>&1 || + framework_skip_ "$* is not available" +} + +dump_log_and_fail_with() +{ + cat < "$LOG" + fail_ "$*" +} + +run_prog() +{ + if [ $# -eq 0 ]; then + set -- "./$NAME" + fi + args="$*" + "$@" || { + rc=$? + if [ $rc -eq 77 ]; then + skip_ "$args exited with code 77" + else + fail_ "$args failed with code $rc" + fi + } +} + + +run_prog_skip_if_failed() +{ + args="$*" + "$@" || framework_skip_ "$args failed with code $?" +} + +run_strace() +{ + > "$LOG" || fail_ "failed to write $LOG" + args="$*" + $STRACE -o "$LOG" "$@" || + dump_log_and_fail_with "$STRACE $args failed with code $?" +} + +run_strace_merge() +{ + rm -f -- "$LOG".[0-9]* + run_strace -ff -tt "$@" + "$srcdir"/../strace-log-merge "$LOG" > "$LOG" || + dump_log_and_fail_with 'strace-log-merge failed with code $?' + rm -f -- "$LOG".[0-9]* +} + +check_gawk() +{ + check_prog gawk + check_prog grep + + local program="$1"; shift + if grep '^@include[[:space:]]' < "$program" > /dev/null; then + gawk '@include "/dev/null"' < /dev/null || + framework_skip_ 'gawk does not support @include' + fi +} + +# Usage: [FILE_TO_CHECK [AWK_PROGRAM [ERROR_MESSAGE [EXTRA_AWK_OPTIONS...]]]] +# Check whether AWK_PROGRAM matches FILE_TO_CHECK using gawk. +# If it doesn't, dump FILE_TO_CHECK and fail with ERROR_MESSAGE. +match_awk() +{ + local output program error + if [ $# -eq 0 ]; then + output="$LOG" + else + output="$1"; shift + fi + if [ $# -eq 0 ]; then + program="$srcdir/$NAME.awk" + else + program="$1"; shift + fi + if [ $# -eq 0 ]; then + error="$STRACE $args output mismatch" + else + error="$1"; shift + fi + + check_gawk "$program" + + AWKPATH="$srcdir" gawk -f "$program" "$@" < "$output" || { + cat < "$output" + fail_ "$error" + } +} + +# Usage: [FILE_TO_CHECK [FILE_TO_COMPATE_WITH [ERROR_MESSAGE]]] +# Check whether FILE_TO_CHECK differs from FILE_TO_COMPATE_WITH. +# If it does, dump the difference and fail with ERROR_MESSAGE. +match_diff() +{ + local output expected error + if [ $# -eq 0 ]; then + output="$LOG" + else + output="$1"; shift + fi + if [ $# -eq 0 ]; then + expected="$srcdir/$NAME.expected" + else + expected="$1"; shift + fi + if [ $# -eq 0 ]; then + error="$STRACE $args output mismatch" + else + error="$1"; shift + fi + + check_prog diff + + diff -- "$expected" "$output" || + fail_ "$error" +} + +# Usage: [FILE_TO_CHECK [FILE_WITH_PATTERNS [ERROR_MESSAGE]]] +# Check whether all patterns listed in FILE_WITH_PATTERNS +# match FILE_TO_CHECK using egrep. +# If at least one of these patterns does not match, +# dump both files and fail with ERROR_MESSAGE. +match_grep() +{ + local output patterns error pattern cnt failed= + if [ $# -eq 0 ]; then + output="$LOG" + else + output="$1"; shift + fi + if [ $# -eq 0 ]; then + patterns="$srcdir/$NAME.expected" + else + patterns="$1"; shift + fi + if [ $# -eq 0 ]; then + error="$STRACE $args output mismatch" + else + error="$1"; shift + fi + + check_prog wc + check_prog grep + + cnt=1 + while read -r pattern; do + LC_ALL=C grep -E -x -e "$pattern" < "$output" > /dev/null || { + test -n "$failed" || { + echo 'Failed patterns of expected output:' + failed=1 + } + printf '#%d: %s\n' "$cnt" "$pattern" + } + cnt=$(($cnt + 1)) + done < "$patterns" + test -z "$failed" || { + echo 'Actual output:' + cat < "$output" + fail_ "$error" + } +} + +# Usage: run_strace_match_diff [args to run_strace] +run_strace_match_diff() +{ + args="$*" + [ -n "$args" -a -z "${args##*-e trace=*}" ] || + set -- -e trace="$NAME" "$@" + run_prog > /dev/null + run_strace "$@" $args > "$EXP" + match_diff "$LOG" "$EXP" + rm -f "$EXP" +} + +# Print kernel version code. +# usage: kernel_version_code $(uname -r) +kernel_version_code() +{ + ( + set -f + IFS=. + set -- $1 + v1="${1%%[!0-9]*}" && [ -n "$v1" ] || v1=0 + v2="${2%%[!0-9]*}" && [ -n "$v2" ] || v2=0 + v3="${3%%[!0-9]*}" && [ -n "$v3" ] || v3=0 + echo "$(($v1 * 65536 + $v2 * 256 + $v3))" + ) +} + +# Usage: require_min_kernel_version_or_skip 3.0 +require_min_kernel_version_or_skip() +{ + local uname_r + uname_r="$(uname -r)" + + [ "$(kernel_version_code "$uname_r")" -ge \ + "$(kernel_version_code "$1")" ] || + skip_ "the kernel release $uname_r is not $1 or newer" +} + +# Usage: grep_pid_status $pid GREP-OPTIONS... +grep_pid_status() +{ + local pid + pid=$1; shift + cat < "/proc/$pid/status" | grep "$@" +} + +check_prog cat +check_prog rm + +rm -f "$LOG" + +[ -n "${STRACE-}" ] || { + STRACE=../strace + case "${LOG_COMPILER-} ${LOG_FLAGS-}" in + *--suppressions=*--error-exitcode=*--tool=*) + # add valgrind command prefix + STRACE="${LOG_COMPILER-} ${LOG_FLAGS-} $STRACE" + ;; + esac +} + +: "${TIMEOUT_DURATION:=60}" +: "${SLEEP_A_BIT:=sleep 1}" + +[ -z "${VERBOSE-}" ] || + set -x diff --git a/tests-mx32/init_delete_module.h b/tests-mx32/init_delete_module.h new file mode 100644 index 000000000..db550c33c --- /dev/null +++ b/tests-mx32/init_delete_module.h @@ -0,0 +1,64 @@ +/* + * Helper header containing common code for finit_module, init_module, + * and delete_module tests. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef STRACE_TESTS_INIT_DELETE_MODULE_H +#define STRACE_TESTS_INIT_DELETE_MODULE_H + +# include +# include + +enum { + PARAM1_LEN = 33, + PARAM2_LEN = 8, + PARAM1_BASE = 0x30, + PARAM2_BASE = 0x80, + MAX_STRLEN = 32, +}; + +static const kernel_ulong_t bogus_zero = + (kernel_ulong_t) 0xffffffff00000000ULL; + +static void +print_str(unsigned int base, unsigned int len, bool escape) +{ + unsigned int i; + + if (!escape) { + for (i = base; i < (base + len); i++) + putc(i, stdout); + + return; + } + + for (i = base; i < (base + len); i++) + printf("\\%u%u%u", (i >> 6) & 0x3, (i >> 3) & 0x7, i & 0x7); +} + +#endif /* !STRACE_TESTS_INIT_DELETE_MODULE_H */ diff --git a/tests-mx32/init_module.c b/tests-mx32/init_module.c new file mode 100644 index 000000000..88ef9ec83 --- /dev/null +++ b/tests-mx32/init_module.c @@ -0,0 +1,106 @@ +/* + * Check decoding of init_module syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_init_module) + +# include +# include + +# include "init_delete_module.h" + +int +main(void) +{ + + static const kernel_ulong_t bogus_addr = + (kernel_ulong_t) 0xfffffeedfffffaceULL; + static const kernel_ulong_t bogus_len = + (kernel_ulong_t) 0xfffffca7ffffc0deULL; + + long rc; + char *bogus_param1 = tail_alloc(PARAM1_LEN); + char *bogus_param2 = tail_alloc(PARAM2_LEN); + const char *errstr; + + fill_memory_ex(bogus_param1, PARAM1_LEN, PARAM1_BASE, PARAM1_LEN); + fill_memory_ex(bogus_param2, PARAM2_LEN, PARAM2_BASE, PARAM2_LEN); + + rc = syscall(__NR_init_module, NULL, bogus_zero, NULL); + printf("init_module(NULL, %llu, NULL) = %s\n", + (unsigned long long) bogus_zero, sprintrc(rc)); + + rc = syscall(__NR_init_module, bogus_addr, 0, bogus_param1); + errstr = sprintrc(rc); + + printf("init_module(%#llx, 0, \"", (unsigned long long) bogus_addr); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\"...) = %s\n", errstr); + + bogus_param1[PARAM1_LEN - 1] = '\0'; + + rc = syscall(__NR_init_module, bogus_addr, 0, bogus_param1); + errstr = sprintrc(rc); + + printf("init_module(%#llx, 0, \"", (unsigned long long) bogus_addr); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\") = %s\n", errstr); + + rc = syscall(__NR_init_module, bogus_addr, bogus_len, + bogus_param2 + PARAM2_LEN); + printf("init_module(%#llx, %llu, %p) = %s\n", + (unsigned long long) bogus_addr, (unsigned long long) bogus_len, + bogus_param2 + PARAM2_LEN, sprintrc(rc)); + + rc = syscall(__NR_init_module, NULL, bogus_len, bogus_param2); + printf("init_module(NULL, %llu, %p) = %s\n", + (unsigned long long) bogus_len, bogus_param2, sprintrc(rc)); + + bogus_param2[PARAM2_LEN - 1] = '\0'; + + rc = syscall(__NR_init_module, NULL, bogus_len, bogus_param2); + errstr = sprintrc(rc); + + printf("init_module(NULL, %llu, \"", (unsigned long long) bogus_len); + print_str(PARAM2_BASE, PARAM2_LEN - 1, true); + printf("\") = %s\n", errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_init_module"); + +#endif diff --git a/tests-mx32/init_module.test b/tests-mx32/init_module.test new file mode 100755 index 000000000..ef7c7325b --- /dev/null +++ b/tests-mx32/init_module.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of init_module syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-mx32/inode_of_sockfd.c b/tests-mx32/inode_of_sockfd.c new file mode 100644 index 000000000..b227f3069 --- /dev/null +++ b/tests-mx32/inode_of_sockfd.c @@ -0,0 +1,59 @@ +/* + * This file is part of strace test suite. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +unsigned long +inode_of_sockfd(const int fd) +{ + assert(fd >= 0); + + char linkpath[sizeof("/proc/self/fd/%u") + sizeof(int) * 3]; + assert(snprintf(linkpath, sizeof(linkpath), "/proc/self/fd/%u", fd) + < (int) sizeof(linkpath)); + + char path[PATH_MAX + 1]; + const ssize_t path_len = readlink(linkpath, path, sizeof(path) - 1); + if (path_len < 0) + perror_msg_and_fail("readlink: %s", linkpath); + path[path_len] = '\0'; + + static const char prefix[] = "socket:["; + const size_t prefix_len = sizeof(prefix) - 1; + assert(strncmp(path, prefix, prefix_len) == 0 + && path[path_len - 1] == ']'); + + return strtoul(path + prefix_len, NULL, 10); +} diff --git a/tests-mx32/inotify.c b/tests-mx32/inotify.c new file mode 100644 index 000000000..925d69ffe --- /dev/null +++ b/tests-mx32/inotify.c @@ -0,0 +1,90 @@ +/* + * Check decoding of inotify_add_watch and inotify_rm_watch syscalls. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_inotify_add_watch) && defined(__NR_inotify_rm_watch) + +# include +# include +# include + +int +main(void) +{ + static const struct { + const char *path; + const char *str; + } bogus_path_str = { + ARG_STR("/abc\1/def\2/ghi\3/jkl\4/mno\5/pqr\6/stu\7/vwx\10") }; + static const kernel_ulong_t bogus_fd = + (kernel_ulong_t) 0xfffffeedfffffaceULL; + static const kernel_ulong_t bogus_mask = + (kernel_ulong_t) 0xffffda7affffdeadULL; + static const char *bogus_mask_str = "IN_ACCESS|IN_ATTRIB|" + "IN_CLOSE_WRITE|IN_OPEN|IN_MOVED_TO|IN_DELETE|IN_DELETE_SELF|" + "IN_MOVE_SELF|IN_Q_OVERFLOW|IN_IGNORED|IN_ONLYDIR|" + "IN_DONT_FOLLOW|IN_EXCL_UNLINK|IN_MASK_ADD|IN_ISDIR|IN_ONESHOT|" + "0x18ff1000"; + + long rc; + char *bogus_path = tail_memdup(bogus_path_str.path, + strlen(bogus_path_str.path) + 1); + + rc = syscall(__NR_inotify_add_watch, 0, NULL, 0); + printf("inotify_add_watch(0, NULL, 0) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_inotify_add_watch, bogus_fd, bogus_path + 4096, 0); + printf("inotify_add_watch(%d, %p, %u) = %s\n", + (int) bogus_fd, bogus_path + 4096, 0, sprintrc(rc)); + + rc = syscall(__NR_inotify_add_watch, bogus_fd, bogus_path, bogus_mask); + printf("inotify_add_watch(%d, %s, %s) = %s\n", + (int) bogus_fd, bogus_path_str.str, bogus_mask_str, + sprintrc(rc)); + + rc = syscall(__NR_inotify_rm_watch, 0, 0); + printf("inotify_rm_watch(0, 0) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_inotify_rm_watch, bogus_fd, bogus_fd); + printf("inotify_rm_watch(%d, %d) = %s\n", + (int) bogus_fd, (int) bogus_fd, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_inotify_add_watch && __NR_inotify_rm_watch"); + +#endif diff --git a/tests-mx32/inotify.test b/tests-mx32/inotify.test new file mode 100755 index 000000000..436f3bc85 --- /dev/null +++ b/tests-mx32/inotify.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of inotify_add_watch and inotify_rm_watch syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=inotify_add_watch,inotify_rm_watch -a23 diff --git a/tests-mx32/inotify_init1.c b/tests-mx32/inotify_init1.c new file mode 100644 index 000000000..0325150d9 --- /dev/null +++ b/tests-mx32/inotify_init1.c @@ -0,0 +1,80 @@ +/* + * Check decoding of inotify_init1 syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_inotify_init1) + +# include +# include +# include + +# ifdef O_CLOEXEC +# define cloexec_flag O_CLOEXEC +# else +# define cloexec_flag 0 +# endif +# define all_flags (O_NONBLOCK | cloexec_flag) + +int +main(void) +{ + static const kernel_ulong_t bogus_flags1 = + (kernel_ulong_t) 0xfacefeeddeadbeefULL | O_NONBLOCK; + static const kernel_ulong_t bogus_flags2 = + (kernel_ulong_t) 0x55555550ff96b77bULL & ~all_flags; + + long rc; + + rc = syscall(__NR_inotify_init1, bogus_flags1); + printf("inotify_init1(IN_NONBLOCK|%s%#x) = %s\n", + bogus_flags1 & cloexec_flag ? "IN_CLOEXEC|" : "", + (unsigned int) (bogus_flags1 & ~all_flags), + sprintrc(rc)); + + rc = syscall(__NR_inotify_init1, bogus_flags2); + printf("inotify_init1(%#x /* IN_??? */) = %s\n", + (unsigned int) bogus_flags2, sprintrc(rc)); + + rc = syscall(__NR_inotify_init1, all_flags); + printf("inotify_init1(IN_NONBLOCK%s) = %s\n", + all_flags & cloexec_flag ? "|IN_CLOEXEC" : "", sprintrc(rc)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_inotify_init1"); + +#endif diff --git a/tests-mx32/inotify_init1.test b/tests-mx32/inotify_init1.test new file mode 100755 index 000000000..1a7c92615 --- /dev/null +++ b/tests-mx32/inotify_init1.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of inotify_init1 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-mx32/ioctl.c b/tests-mx32/ioctl.c new file mode 100644 index 000000000..92a3191d1 --- /dev/null +++ b/tests-mx32/ioctl.c @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_LINUX_MMTIMER_H +# include +#endif +#ifdef HAVE_LINUX_HIDDEV_H +# include +#endif +#ifdef HAVE_LINUX_INPUT_H +# include +#endif + +#include + +#if defined MMTIMER_GETRES \ + && defined VIDIOC_ENUMINPUT \ + && defined HIDIOCGVERSION \ + && defined HIDIOCGPHYS \ + && defined EVIOCGBIT \ + && defined EV_KEY + +int +main(void ) +{ + uint64_t data = 0; + +#ifndef POWERPC + struct termios tty; + (void) ioctl(-1, TCGETS, &tty); + printf("ioctl(-1, TCGETS, %p)" + " = -1 EBADF (%m)\n", &tty); +#endif + + (void) ioctl(-1, MMTIMER_GETRES, &data); + printf("ioctl(-1, MMTIMER_GETRES, %p)" + " = -1 EBADF (%m)\n", &data); + + (void) ioctl(-1, VIDIOC_ENUMINPUT, 0); + printf("ioctl(-1, VIDIOC_ENUMINPUT, NULL)" + " = -1 EBADF (%m)\n"); + + (void) ioctl(-1, HIDIOCGVERSION, &data); + printf("ioctl(-1, HIDIOCGRDESCSIZE or HIDIOCGVERSION, %p)" + " = -1 EBADF (%m)\n", &data); + + (void) ioctl(-1, HIDIOCGPHYS(8), &data); + printf("ioctl(-1, HIDIOCGPHYS(8), %p)" + " = -1 EBADF (%m)\n", &data); + + (void) ioctl(-1, EVIOCGBIT(EV_KEY, 8), &data); + printf("ioctl(-1, EVIOCGBIT(EV_KEY, 8), %p)" + " = -1 EBADF (%m)\n", &data); + + (void) ioctl(-1, _IOR('M', 13, int), &data); + printf("ioctl(-1, MIXER_READ(13) or OTPSELECT, [MTD_OTP_OFF])" + " = -1 EBADF (%m)\n"); + + (void) ioctl(-1, _IOC(_IOC_WRITE, 0xde, 0, 0), (kernel_ulong_t) -1ULL); + printf("ioctl(-1, _IOC(_IOC_WRITE, 0xde, 0, 0), %#lx)" + " = -1 EBADF (%m)\n", -1UL); + + (void) ioctl(-1, _IOR(0xde, 0xad, data), &data); + printf("ioctl(-1, _IOC(_IOC_READ, 0xde, 0xad, 0x8), %p)" + " = -1 EBADF (%m)\n", &data); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("MMTIMER_GETRES && VIDIOC_ENUMINPUT" + " && HIDIOCGVERSION && HIDIOCGPHYS" + " && EVIOCGBIT && EV_KEY") + +#endif diff --git a/tests-mx32/ioctl.test b/tests-mx32/ioctl.test new file mode 100755 index 000000000..94bc5d427 --- /dev/null +++ b/tests-mx32/ioctl.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check ioctl syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-mx32/ioctl_block.c b/tests-mx32/ioctl_block.c new file mode 100644 index 000000000..f62b0b365 --- /dev/null +++ b/tests-mx32/ioctl_block.c @@ -0,0 +1,203 @@ +/* + * This file is part of ioctl_block strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_STRUCT_BLK_USER_TRACE_SETUP +# include +#endif +#include "xlat.h" + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; + +static struct xlat block_argless[] = { + XLAT(BLKRRPART), + XLAT(BLKFLSBUF), +#ifdef BLKTRACESTART + XLAT(BLKTRACESTART), +#endif +#ifdef BLKTRACESTOP + XLAT(BLKTRACESTOP), +#endif +#ifdef BLKTRACETEARDOWN + XLAT(BLKTRACETEARDOWN), +#endif +}; + +#define TEST_NULL_ARG(cmd) \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd) + +int +main(void) +{ + TEST_NULL_ARG(BLKBSZGET); + TEST_NULL_ARG(BLKBSZSET); + TEST_NULL_ARG(BLKFRAGET); + TEST_NULL_ARG(BLKGETSIZE); + TEST_NULL_ARG(BLKGETSIZE64); + TEST_NULL_ARG(BLKPG); + TEST_NULL_ARG(BLKRAGET); + TEST_NULL_ARG(BLKROGET); + TEST_NULL_ARG(BLKROSET); + TEST_NULL_ARG(BLKSECTGET); + TEST_NULL_ARG(BLKSECTGET); + TEST_NULL_ARG(BLKSSZGET); +#ifdef BLKALIGNOFF + TEST_NULL_ARG(BLKALIGNOFF); +#endif +#ifdef BLKDISCARD + TEST_NULL_ARG(BLKDISCARD); +#endif +#ifdef BLKDISCARDZEROES + TEST_NULL_ARG(BLKDISCARDZEROES); +#endif +#ifdef BLKIOMIN + TEST_NULL_ARG(BLKIOMIN); +#endif +#ifdef BLKIOOPT + TEST_NULL_ARG(BLKIOOPT); +#endif +#ifdef BLKPBSZGET + TEST_NULL_ARG(BLKPBSZGET); +#endif +#ifdef BLKROTATIONAL + TEST_NULL_ARG(BLKROTATIONAL); +#endif +#ifdef BLKSECDISCARD + TEST_NULL_ARG(BLKSECDISCARD); +#endif +#ifdef BLKZEROOUT + TEST_NULL_ARG(BLKZEROOUT); +#endif +#if defined BLKTRACESETUP && defined HAVE_STRUCT_BLK_USER_TRACE_SETUP + TEST_NULL_ARG(BLKTRACESETUP); +#endif + + ioctl(-1, BLKRASET, lmagic); + printf("ioctl(-1, BLKRASET, %lu) = -1 EBADF (%m)\n", lmagic); + + ioctl(-1, BLKFRASET, lmagic); + printf("ioctl(-1, BLKFRASET, %lu) = -1 EBADF (%m)\n", lmagic); + + int *const val_int = tail_alloc(sizeof(*val_int)); + *val_int = magic; + + ioctl(-1, BLKROSET, val_int); + printf("ioctl(-1, BLKROSET, [%d]) = -1 EBADF (%m)\n", *val_int); + + ioctl(-1, BLKBSZSET, val_int); + printf("ioctl(-1, BLKBSZSET, [%d]) = -1 EBADF (%m)\n", *val_int); + + uint64_t *pair_int64 = tail_alloc(sizeof(*pair_int64) * 2); + pair_int64[0] = 0xdeadbeefbadc0dedULL; + pair_int64[1] = 0xfacefeedcafef00dULL; + +#ifdef BLKDISCARD + ioctl(-1, BLKDISCARD, pair_int64); + printf("ioctl(-1, BLKDISCARD, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + +#ifdef BLKSECDISCARD + ioctl(-1, BLKSECDISCARD, pair_int64); + printf("ioctl(-1, BLKSECDISCARD, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + +#ifdef BLKZEROOUT + ioctl(-1, BLKZEROOUT, pair_int64); + printf("ioctl(-1, BLKZEROOUT, [%" PRIu64 ", %" PRIu64 "])" + " = -1 EBADF (%m)\n", pair_int64[0], pair_int64[1]); +#endif + + struct blkpg_ioctl_arg *const blkpg = tail_alloc(sizeof(*blkpg)); + blkpg->op = 3; + blkpg->flags = 0xdeadbeef; + blkpg->datalen = 0xbadc0ded; + blkpg->data = (void *) (unsigned long) 0xcafef00dfffffeedULL; + + ioctl(-1, BLKPG, blkpg); + printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d" + ", data=%#lx}) = -1 EBADF (%m)\n", + "BLKPG_RESIZE_PARTITION", blkpg->flags, blkpg->datalen, + (unsigned long) blkpg->data); + + struct blkpg_partition *const bp = tail_alloc(sizeof(*bp)); + bp->start = 0xfac1fed2dad3bef4ULL; + bp->length = 0xfac5fed6dad7bef8ULL; + bp->pno = magic; + memset(bp->devname, 'A', sizeof(bp->devname)); + memset(bp->volname, 'B', sizeof(bp->volname)); + blkpg->op = 1; + blkpg->data = bp; + + ioctl(-1, BLKPG, blkpg); + printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d" + ", data={start=%lld, length=%lld, pno=%d" + ", devname=\"%.*s\", volname=\"%.*s\"}})" + " = -1 EBADF (%m)\n", + "BLKPG_ADD_PARTITION", + blkpg->flags, blkpg->datalen, + bp->start, bp->length, bp->pno, + (int) sizeof(bp->devname) - 1, bp->devname, + (int) sizeof(bp->volname) - 1, bp->volname); + +#if defined BLKTRACESETUP && defined HAVE_STRUCT_BLK_USER_TRACE_SETUP + struct blk_user_trace_setup *const buts = tail_alloc(sizeof(*buts)); + fill_memory(buts, sizeof(*buts)); + + ioctl(-1, BLKTRACESETUP, buts); + printf("ioctl(-1, BLKTRACESETUP, {act_mask=%hu, buf_size=%u, buf_nr=%u" + ", start_lba=%" PRI__u64 ", end_lba=%" PRI__u64 ", pid=%u})" + " = -1 EBADF (%m)\n", + buts->act_mask, buts->buf_size, buts->buf_nr, + buts->start_lba, buts->end_lba, buts->pid); +#endif + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(block_argless); ++i) { + ioctl(-1, (unsigned long) block_argless[i].val, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", block_argless[i].str); + } + + ioctl(-1, _IOC(_IOC_READ, 0x12, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ, 0x12, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/ioctl_block.test b/tests-mx32/ioctl_block.test new file mode 100755 index 000000000..0bf2500f4 --- /dev/null +++ b/tests-mx32/ioctl_block.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of BLK* ioctls. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-mx32/ioctl_dm-v.c b/tests-mx32/ioctl_dm-v.c new file mode 100644 index 000000000..d95058f2e --- /dev/null +++ b/tests-mx32/ioctl_dm-v.c @@ -0,0 +1,2 @@ +#define VERBOSE 1 +#include "ioctl_dm.c" diff --git a/tests-mx32/ioctl_dm-v.test b/tests-mx32/ioctl_dm-v.test new file mode 100755 index 000000000..ade3b9e85 --- /dev/null +++ b/tests-mx32/ioctl_dm-v.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check unabbreviated decoding of DM* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -s9 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/ioctl_dm.c b/tests-mx32/ioctl_dm.c new file mode 100644 index 000000000..08f036c6a --- /dev/null +++ b/tests-mx32/ioctl_dm.c @@ -0,0 +1,774 @@ +/* + * Check decoding of DM_* commands of ioctl syscall. + * + * Copyright (c) 2016 Mikulas Patocka + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_LINUX_DM_IOCTL_H + +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# ifndef VERBOSE +# define VERBOSE 0 +# endif + +# define STR32 "AbCdEfGhIjKlMnOpQrStUvWxYz012345" + +# define ALIGNED_SIZE(s_, t_) \ + (((s_) + (ALIGNOF(t_) - 1UL)) & ~(ALIGNOF(t_) - 1UL)) +# define ALIGNED_OFFSET(t_, m_) \ + ALIGNED_SIZE(offsetof(t_, m_), t_) + +static const char str129[] = STR32 STR32 STR32 STR32 "6"; + +static const __u64 dts_sector_base = (__u64) 0xdeadca75facef157ULL; +static const __u64 dts_sector_step = (__u64) 0x100000001ULL; +static const __u64 dts_length_base = (__u64) 0xbadc0dedda7a1057ULL; +static const __u64 dts_length_step = (__u64) 0x700000007ULL; +static const __s32 dts_status_base = (__s32) 3141592653U; +static const __s32 dts_status_step = 0x1234; + +static const size_t min_sizeof_dm_ioctl = + offsetof(struct dm_ioctl, data); + +static struct s { + struct dm_ioctl ioc; + union { + struct { + struct dm_target_spec target_spec; + char target_params[256]; + } ts; + struct { + struct dm_target_msg target_msg; + char target_string[256]; + } tm; + char string[256]; + } u; +} s; + +struct dm_table_open_test { + struct dm_ioctl ioc; + struct dm_target_spec target0; + char param0[1]; + struct dm_target_spec target1; + char param1[2]; + struct dm_target_spec target2; + char param2[3]; + struct dm_target_spec target3; + char param3[4]; + struct dm_target_spec target4; + char param4[5]; + struct dm_target_spec target5; + char param5[6]; + struct dm_target_spec target6; + char param6[7]; + struct dm_target_spec target7; + char param7[8]; + struct dm_target_spec target8; + char param8[9]; + struct dm_target_spec target9; + char param9[10]; +}; + +struct dm_target_msg_test { + struct dm_ioctl ioc; + struct dm_target_msg msg; +}; + +struct args { + unsigned int arg; + const char *str; + bool has_params; + bool has_event_nr; +}; + + +static void +init_s(struct dm_ioctl *s, size_t size, size_t offs) +{ + memset(s, 0, size); + s->version[0] = DM_VERSION_MAJOR; + s->version[1] = 1; + s->version[2] = 2; + s->data_size = size; + s->data_start = offs; + s->dev = 0x1234; + strcpy(s->name, "nnn"); + strcpy(s->uuid, "uuu"); +} + +static void +init_dm_target_spec(struct dm_target_spec *ptr, uint32_t id) +{ + ptr->sector_start = dts_sector_base + dts_sector_step * id; + ptr->length = dts_length_base + dts_length_step * id; + ptr->status = dts_status_base + dts_status_step * id; + + strncpy(ptr->target_type, str129 + + id % (sizeof(str129) - sizeof(ptr->target_type)), + id % (sizeof(ptr->target_type) + 1)); + if (id % (sizeof(ptr->target_type) + 1) < sizeof(ptr->target_type)) + ptr->target_type[id % (sizeof(ptr->target_type) + 1)] = '\0'; +} + +# if VERBOSE +static void +print_dm_target_spec(struct dm_target_spec *ptr, uint32_t id) +{ + printf("{sector_start=%" PRI__u64 ", length=%" PRI__u64 ", " + "target_type=\"%.*s\", string=", + dts_sector_base + dts_sector_step * id, + dts_length_base + dts_length_step * id, + (int) (id % (sizeof(ptr->target_type) + 1)), + str129 + id % (sizeof(str129) - sizeof(ptr->target_type))); +} +# endif /* VERBOSE */ + +int +main(void) +{ + static kernel_ulong_t dummy_dm_ioctl1 = + _IOC(_IOC_READ, DM_IOCTL, 0, 0x1fff); + static kernel_ulong_t dummy_dm_ioctl2 = + _IOC(_IOC_READ|_IOC_WRITE, DM_IOCTL, 0xed, 0); + static kernel_ulong_t dummy_dm_arg = + (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + /* We can't check these properly for now */ + static struct args dummy_check_cmds_nodev[] = { + { ARG_STR(DM_REMOVE_ALL), false }, + { ARG_STR(DM_LIST_DEVICES), true }, + { ARG_STR(DM_LIST_VERSIONS), true }, + }; + static struct args dummy_check_cmds[] = { + { ARG_STR(DM_DEV_CREATE), false }, + { ARG_STR(DM_DEV_REMOVE), false, true }, + { ARG_STR(DM_DEV_STATUS), false }, + { ARG_STR(DM_DEV_WAIT), true, true }, + { ARG_STR(DM_TABLE_CLEAR), false }, + { ARG_STR(DM_TABLE_DEPS), true }, + { ARG_STR(DM_TABLE_STATUS), true }, + }; + + struct dm_ioctl *unaligned_dm_arg = + tail_alloc(offsetof(struct dm_ioctl, data)); + struct dm_ioctl *dm_arg = + tail_alloc(ALIGNED_OFFSET(struct dm_ioctl, data)); + struct dm_table_open_test *dm_arg_open1 = + tail_alloc(ALIGNED_OFFSET(struct dm_table_open_test, target1)); + struct dm_table_open_test *dm_arg_open2 = + tail_alloc(ALIGNED_OFFSET(struct dm_table_open_test, param1)); + struct dm_table_open_test *dm_arg_open3 = + tail_alloc(ALIGNED_OFFSET(struct dm_table_open_test, target9)); + struct dm_target_msg_test *dm_arg_msg = + tail_alloc(sizeof(*dm_arg_msg)); + + long rc; + const char *errstr; + unsigned int i; + + + /* Incorrect operation */ + ioctl(-1, _IOW(DM_IOCTL, 0xde, int), dm_arg); + printf("ioctl(-1, _IOC(_IOC_WRITE, %#x, 0xde, %#zx), %p) = " + "-1 EBADF (%m)\n", + DM_IOCTL, sizeof(int), dm_arg); + + ioctl(-1, dummy_dm_ioctl1, 0); + printf("ioctl(-1, _IOC(_IOC_READ, %#x, 0, %#x), 0) = -1 EBADF (%m)\n", + DM_IOCTL, (unsigned int) _IOC_SIZE(dummy_dm_ioctl1)); + + ioctl(-1, dummy_dm_ioctl2, dummy_dm_arg); + printf("ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, %#x, %#x, 0), %#lx) = " + "-1 EBADF (%m)\n", + DM_IOCTL, (unsigned int) _IOC_NR(dummy_dm_ioctl2), + (unsigned long) dummy_dm_arg); + + + /* DM_VERSION */ + /* Incorrect pointer */ + ioctl(-1, DM_VERSION, dm_arg + 1); + printf("ioctl(-1, DM_VERSION, %p) = -1 EBADF (%m)\n", dm_arg + 1); + + /* Incorrect data_size */ + init_s(dm_arg, 0, 0); + ioctl(-1, DM_VERSION, &s); + printf("ioctl(-1, DM_VERSION, %p) = -1 EBADF (%m)\n", &s); + + /* Incorrect version */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + dm_arg->version[0] = 0xbadc0ded; + dm_arg->version[1] = 0xbadc0dee; + dm_arg->version[2] = 0xbadc0def; + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, {version=%u.%u.%u, " + "/* Unsupported device mapper ABI version */ ...}) = " + "-1 EBADF (%m)\n", 0xbadc0ded, 0xbadc0dee, 0xbadc0def); + + /* Incorrect data_size */ + init_s(dm_arg, 14, 64); + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, {version=4.1.2, data_size=14, " + "/* Incorrect data_size */ ...}) = -1 EBADF (%m)\n"); + + /* Unterminated name/uuid */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + strncpy(dm_arg->name, str129, sizeof(dm_arg->name)); + strncpy(dm_arg->uuid, str129, sizeof(dm_arg->uuid)); + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, {version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"%.127s\", uuid=\"%.128s\", " + "flags=0}) = -1 EBADF (%m)\n", + min_sizeof_dm_ioctl, str129, str129); + + /* Normal call */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = " + "-1 EBADF (%m)\n", min_sizeof_dm_ioctl); + + /* Zero dev, name, uuid */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + dm_arg->data_size = 0xfacefeed; + dm_arg->dev = 0; + dm_arg->name[0] = '\0'; + dm_arg->uuid[0] = '\0'; + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, data_size=%u, flags=0}) = " + "-1 EBADF (%m)\n", 0xfacefeed); + + /* Flag */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + dm_arg->flags = 0xffffffff; + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=" + "DM_READONLY_FLAG|DM_SUSPEND_FLAG|DM_EXISTS_FLAG|" + "DM_PERSISTENT_DEV_FLAG|DM_STATUS_TABLE_FLAG|" + "DM_ACTIVE_PRESENT_FLAG|DM_INACTIVE_PRESENT_FLAG|" + "DM_BUFFER_FULL_FLAG|DM_SKIP_BDGET_FLAG|DM_SKIP_LOCKFS_FLAG|" + "DM_NOFLUSH_FLAG|DM_QUERY_INACTIVE_TABLE_FLAG|" + "DM_UEVENT_GENERATED_FLAG|DM_UUID_FLAG|DM_SECURE_DATA_FLAG|" + "DM_DATA_OUT_FLAG|DM_DEFERRED_REMOVE|DM_INTERNAL_SUSPEND_FLAG|" + "0xfff80080}) = -1 EBADF (%m)\n", + min_sizeof_dm_ioctl); + + /* Normal call */ + init_s(&s.ioc, sizeof(s.ioc), 0); + ioctl(-1, DM_VERSION, &s); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = " + "-1 EBADF (%m)\n", sizeof(s.ioc)); + + + /* DM_REMOVE_ALL */ + /* DM_LIST_DEVICES */ + /* DM_LIST_VERSIONS */ + for (i = 0; i < ARRAY_SIZE(dummy_check_cmds_nodev); i++) { + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + ioctl(-1, dummy_check_cmds_nodev[i].arg, dm_arg); + printf("ioctl(-1, %s, {version=4.1.2, data_size=%zu%s, " + "flags=0}) = -1 EBADF (%m)\n", + dummy_check_cmds_nodev[i].str, + min_sizeof_dm_ioctl, + dummy_check_cmds_nodev[i].has_params ? + ", data_start=0" : ""); + } + + + /* DM_DEV_CREATE */ + /* DM_DEV_REMOVE */ + /* DM_DEV_STATUS */ + /* DM_DEV_WAIT */ + /* DM_TABLE_CLEAR */ + /* DM_TABLE_DEPS */ + /* DM_TABLE_STATUS */ + for (i = 0; i < ARRAY_SIZE(dummy_check_cmds); i++) { + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + ioctl(-1, dummy_check_cmds[i].arg, dm_arg); + printf("ioctl(-1, %s, {version=4.1.2, data_size=%zu%s, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\"%s, " + "flags=0}) = -1 EBADF (%m)\n", + dummy_check_cmds[i].str, min_sizeof_dm_ioctl, + dummy_check_cmds[i].has_params ? ", data_start=0" : "", + dummy_check_cmds[i].has_event_nr ? ", event_nr=0" : ""); + } + + + /* DM_DEV_SUSPEND */ + init_s(&s.ioc, sizeof(s.ioc), 0); + s.ioc.flags = DM_SUSPEND_FLAG; + s.ioc.event_nr = 0xbadc0ded; + ioctl(-1, DM_DEV_SUSPEND, &s); + printf("ioctl(-1, DM_DEV_SUSPEND, " + "{version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "flags=DM_SUSPEND_FLAG}) = -1 EBADF (%m)\n", sizeof(s.ioc)); + + init_s(&s.ioc, sizeof(s.ioc), 0); + s.ioc.event_nr = 0xbadc0ded; + ioctl(-1, DM_DEV_SUSPEND, &s); + printf("ioctl(-1, DM_DEV_SUSPEND, " + "{version=4.1.2, data_size=%zu, dev=makedev(18, 52), " + "name=\"nnn\", uuid=\"uuu\", event_nr=3134983661, " + "flags=0}) = -1 EBADF (%m)\n", sizeof(s.ioc)); + + + /* DM_TABLE_LOAD */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + s.ioc.target_count = 1; + s.u.ts.target_spec.sector_start = 0x10; + s.u.ts.target_spec.length = 0x20; + s.u.ts.target_spec.next = + sizeof(s.u.ts.target_spec) + sizeof(s.u.ts.target_params); + strcpy(s.u.ts.target_spec.target_type, "tgt"); + strcpy(s.u.ts.target_params, "tparams"); + ioctl(-1, DM_TABLE_LOAD, &s); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=1, flags=0, " +# if VERBOSE + "{sector_start=16, length=32, target_type=\"tgt\", " + "string=\"tparams\"}" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", s.ioc.data_size, s.ioc.data_start); + + /* No targets */ + init_s(dm_arg, min_sizeof_dm_ioctl, min_sizeof_dm_ioctl); + dm_arg->data_size = sizeof(*dm_arg); + dm_arg->target_count = 0; + ioctl(-1, DM_TABLE_LOAD, dm_arg); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=0, flags=0}) = -1 EBADF (%m)\n", + sizeof(*dm_arg), min_sizeof_dm_ioctl); + + /* Invalid data_start */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0xfffffff8); + dm_arg->data_size = sizeof(*dm_arg); + dm_arg->target_count = 1234; + ioctl(-1, DM_TABLE_LOAD, dm_arg); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=1234, flags=0, " +# if VERBOSE + "/* misplaced struct dm_target_spec */ ..." +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", sizeof(*dm_arg), 0xfffffff8); + + /* Inaccessible pointer */ + init_s(&dm_arg_open1->ioc, offsetof(struct dm_table_open_test, target1), + offsetof(struct dm_table_open_test, target1)); + dm_arg_open1->ioc.data_size = sizeof(*dm_arg_open1); + dm_arg_open1->ioc.target_count = 0xdeaddea1; + ioctl(-1, DM_TABLE_LOAD, dm_arg_open1); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=3735936673, flags=0, " +# if VERBOSE + "%p" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", sizeof(*dm_arg_open1), + offsetof(struct dm_table_open_test, target1) +# if VERBOSE + , (char *) dm_arg_open1 + + offsetof(struct dm_table_open_test, target1) +# endif /* VERBOSE */ + ); + + /* Inaccessible string */ + init_s(&dm_arg_open2->ioc, offsetof(struct dm_table_open_test, param1), + offsetof(struct dm_table_open_test, target1)); + dm_arg_open2->ioc.data_size = sizeof(*dm_arg_open2); + dm_arg_open2->ioc.target_count = 2; + init_dm_target_spec(&dm_arg_open2->target1, 7); + dm_arg_open2->target1.next = + offsetof(struct dm_table_open_test, target3) - + offsetof(struct dm_table_open_test, target1); + rc = ioctl(-1, DM_TABLE_LOAD, dm_arg_open2); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=2, flags=0, ", + sizeof(*dm_arg_open2), + offsetof(struct dm_table_open_test, target1)); +# if VERBOSE + print_dm_target_spec(&dm_arg_open2->target1, 7); + printf("%p}, %p", + (char *) dm_arg_open2 + + offsetof(struct dm_table_open_test, param1), + (char *) dm_arg_open2 + + offsetof(struct dm_table_open_test, target3)); +# else /* !VERBOSE */ + printf("..."); +# endif /* VERBOSE */ + printf("}) = %s\n", errstr); + + /* Incorrect next */ + init_s(&dm_arg_open3->ioc, offsetof(struct dm_table_open_test, target5), + offsetof(struct dm_table_open_test, target0)); + dm_arg_open3->ioc.target_count = 4; + + init_dm_target_spec(&dm_arg_open3->target0, 9); + dm_arg_open3->target0.next = + offsetof(struct dm_table_open_test, target1) - + offsetof(struct dm_table_open_test, target0); + dm_arg_open3->param0[0] = '\0'; + + init_dm_target_spec(&dm_arg_open3->target1, 15); + dm_arg_open3->target1.next = + offsetof(struct dm_table_open_test, target3) - + offsetof(struct dm_table_open_test, target1); + dm_arg_open3->param1[0] = '\377'; + dm_arg_open3->param1[1] = '\0'; + + init_dm_target_spec(&dm_arg_open3->target3, 42); + dm_arg_open3->target3.next = 0xdeadbeef; + dm_arg_open3->param3[0] = '\1'; + dm_arg_open3->param3[1] = '\2'; + dm_arg_open3->param3[2] = '\0'; + + rc = ioctl(-1, DM_TABLE_LOAD, dm_arg_open3); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=4, flags=0, ", + offsetof(struct dm_table_open_test, target5), + offsetof(struct dm_table_open_test, target0)); +# if VERBOSE + print_dm_target_spec(&dm_arg_open3->target0, 9); + printf("\"\"}, "); + print_dm_target_spec(&dm_arg_open3->target1, 15); + printf("\"\\377\"}, "); + print_dm_target_spec(&dm_arg_open3->target1, 42); + printf("\"\\1\\2\"}, /* misplaced struct dm_target_spec */ ..."); +# else /* !VERBOSE */ + printf("..."); +# endif /* VERBOSE */ + printf("}) = %s\n", errstr); + + #define FILL_DM_TARGET(id, id_next) \ + do { \ + init_dm_target_spec(&dm_arg_open3->target##id, id); \ + dm_arg_open3->target##id.next = \ + offsetof(struct dm_table_open_test, \ + target##id_next) - \ + offsetof(struct dm_table_open_test, \ + target##id); \ + strncpy(dm_arg_open3->param##id, str129 + id * 2, id); \ + dm_arg_open3->param##id[id] = '\0'; \ + } while (0) + #define PRINT_DM_TARGET(id) \ + do { \ + print_dm_target_spec(&dm_arg_open3->target##id, id); \ + printf("\"%.*s\"}, ", id, str129 + id * 2); \ + } while (0) + + /* max_strlen limit */ + init_s(&dm_arg_open3->ioc, offsetof(struct dm_table_open_test, target9), + offsetof(struct dm_table_open_test, target0)); + dm_arg_open3->ioc.data_size = sizeof(*dm_arg_open3); + dm_arg_open3->ioc.target_count = 0xbadc0ded; + FILL_DM_TARGET(0, 1); + FILL_DM_TARGET(1, 2); + FILL_DM_TARGET(2, 3); + FILL_DM_TARGET(3, 4); + FILL_DM_TARGET(4, 5); + FILL_DM_TARGET(5, 6); + FILL_DM_TARGET(6, 7); + FILL_DM_TARGET(7, 8); + FILL_DM_TARGET(8, 9); + rc = ioctl(-1, DM_TABLE_LOAD, dm_arg_open3); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=3134983661, flags=0, ", + sizeof(*dm_arg_open3), + offsetof(struct dm_table_open_test, target0)); +# if VERBOSE + PRINT_DM_TARGET(0); + PRINT_DM_TARGET(1); + PRINT_DM_TARGET(2); + PRINT_DM_TARGET(3); + PRINT_DM_TARGET(4); + PRINT_DM_TARGET(5); + PRINT_DM_TARGET(6); + PRINT_DM_TARGET(7); + PRINT_DM_TARGET(8); +# endif /* VERBOSE */ + printf("...}) = %s\n", errstr); + + + /* DM_TARGET_MSG */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + s.u.tm.target_msg.sector = 0x1234; + strcpy(s.u.string + offsetof(struct dm_target_msg, message), + "long target msg"); + ioctl(-1, DM_TARGET_MSG, &s); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "{sector=4660, message=\"long targ\"...}" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size, s.ioc.data_start); + + /* Invalid data_start */ + init_s(dm_arg, min_sizeof_dm_ioctl, min_sizeof_dm_ioctl); + dm_arg->data_size = sizeof(*dm_arg); + ioctl(-1, DM_TARGET_MSG, dm_arg); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "/* misplaced struct dm_target_msg */" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + sizeof(*dm_arg), min_sizeof_dm_ioctl); + + /* Invalid data_start */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0xffffffff); + dm_arg->data_size = sizeof(*dm_arg); + ioctl(-1, DM_TARGET_MSG, dm_arg); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "/* misplaced struct dm_target_msg */" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + sizeof(*dm_arg), 0xffffffff); + + /* Inaccessible pointer */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + dm_arg->data_size = sizeof(*dm_arg) + sizeof(struct dm_target_msg); + dm_arg->data_start = sizeof(*dm_arg); + ioctl(-1, DM_TARGET_MSG, dm_arg); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "%p" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + sizeof(*dm_arg) + sizeof(struct dm_target_msg), + sizeof(*dm_arg) +# if VERBOSE + , (char *) dm_arg + sizeof(*dm_arg) +# endif /* VERBOSE */ + ); + + /* Inaccessible string */ + init_s(&dm_arg_msg->ioc, sizeof(*dm_arg_msg), + offsetof(struct dm_target_msg_test, msg)); + dm_arg_msg->ioc.data_size = sizeof(*dm_arg_msg) + 1; + dm_arg_msg->msg.sector = (__u64) 0xdeadbeeffacef157ULL; + rc = ioctl(-1, DM_TARGET_MSG, dm_arg_msg); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, ", + sizeof(*dm_arg_msg) + 1, + offsetof(struct dm_target_msg_test, msg)); +# if VERBOSE + printf("{sector=%" PRI__u64 ", message=%p}", + (__u64) 0xdeadbeeffacef157ULL, + (char *) dm_arg_msg + + offsetof(struct dm_target_msg_test, msg.message)); +# else /* !VERBOSE */ + printf("..."); +# endif /* VERBOSE */ + printf("}) = %s\n", errstr); + + /* Zero-sied string */ + init_s(&dm_arg_msg->ioc, sizeof(*dm_arg_msg), + offsetof(struct dm_target_msg_test, msg)); + dm_arg_msg->msg.sector = (__u64) 0xdeadbeeffacef157ULL; + rc = ioctl(-1, DM_TARGET_MSG, dm_arg_msg); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, ", + sizeof(*dm_arg_msg), offsetof(struct dm_target_msg_test, msg)); +# if VERBOSE + printf("{sector=%" PRI__u64 ", message=\"\"}", + (__u64) 0xdeadbeeffacef157ULL); +# else /* !VERBOSE */ + printf("..."); +# endif /* VERBOSE */ + printf("}) = %s\n", errstr); + + + /* DM_DEV_SET_GEOMETRY */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + strcpy(s.u.string, "10 20 30 40"); + ioctl(-1, DM_DEV_SET_GEOMETRY, &s); + printf("ioctl(-1, DM_DEV_SET_GEOMETRY, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "string=\"10 20 30 \"..." +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size, s.ioc.data_start); + + + /* DM_DEV_RENAME */ + /* Inaccessible data */ + init_s(dm_arg, min_sizeof_dm_ioctl, min_sizeof_dm_ioctl); + dm_arg->data_size = sizeof(*dm_arg); + memcpy(unaligned_dm_arg, dm_arg, offsetof(struct dm_ioctl, data)); + ioctl(-1, DM_DEV_RENAME, unaligned_dm_arg); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " + "flags=0, " +# if VERBOSE + "string=%p" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + sizeof(*unaligned_dm_arg), min_sizeof_dm_ioctl +# if VERBOSE + , (char *) unaligned_dm_arg + min_sizeof_dm_ioctl +# endif /* VERBOSE */ + ); + + /* Incorrect data_start data */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + s.ioc.data_start = 0xdeadbeef; + ioctl(-1, DM_DEV_RENAME, &s); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, data_size=%u, data_start=3735928559, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " + "flags=0, " +# if VERBOSE + "/* misplaced string */" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size); + + /* Strange but still valid data_start */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + /* Curiously, this is a valid structure */ + s.ioc.data_start = offsetof(struct dm_ioctl, name) + 1; + ioctl(-1, DM_DEV_RENAME, &s); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, data_size=%u, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " + "flags=0, " +# if VERBOSE + "string=\"nn\"" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size, + offsetof(struct dm_ioctl, name) + 1); + + /* Correct data */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + strcpy(s.u.string, "new long name"); + ioctl(-1, DM_DEV_RENAME, &s); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " + "flags=0, " +# if VERBOSE + "string=\"new long \"..." +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size, s.ioc.data_start); + + + /* DM_TABLE_LOAD */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + s.ioc.target_count = -1U; + ioctl(-1, DM_TABLE_LOAD, &s); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=4294967295, flags=0, " +# if VERBOSE + "{sector_start=0, length=0, target_type=\"\", string=\"\"}, " + "/* misplaced struct dm_target_spec */ " +# endif /* VERBOSE */ + "...}) = -1 EBADF (%m)\n", + s.ioc.data_size, s.ioc.data_start); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else /* !HAVE_LINUX_DM_IOCTL_H */ + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_DM_IOCTL_H") + +#endif /* HAVE_LINUX_DM_IOCTL_H */ diff --git a/tests-mx32/ioctl_dm.test b/tests-mx32/ioctl_dm.test new file mode 100755 index 000000000..648520511 --- /dev/null +++ b/tests-mx32/ioctl_dm.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of DM* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -s9 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/ioctl_evdev-v.c b/tests-mx32/ioctl_evdev-v.c new file mode 100644 index 000000000..3860716b7 --- /dev/null +++ b/tests-mx32/ioctl_evdev-v.c @@ -0,0 +1,3 @@ +/* This file is part of ioctl_evdev-v strace test. */ +#define VERBOSE 1 +#include "ioctl_evdev.c" diff --git a/tests-mx32/ioctl_evdev-v.test b/tests-mx32/ioctl_evdev-v.test new file mode 100755 index 000000000..879410104 --- /dev/null +++ b/tests-mx32/ioctl_evdev-v.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check verbose decoding EVIOC* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/ioctl_evdev.c b/tests-mx32/ioctl_evdev.c new file mode 100644 index 000000000..d12323ee2 --- /dev/null +++ b/tests-mx32/ioctl_evdev.c @@ -0,0 +1,278 @@ +/* + * This file is part of ioctl_evdev strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_LINUX_INPUT_H + +# include +# include +# include +# include +# include +# include + +static const unsigned int magic = 0xdeadbeef; +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; + +# if VERBOSE +static void +print_envelope(const struct ff_envelope *const e) +{ + printf(", envelope={attack_length=%hu, attack_level=%hu" + ", fade_length=%hu, fade_level=%#hx}", + e->attack_length, e->attack_level, + e->fade_length, e->fade_level); +} +# endif /* VERBOSE */ + +static void +print_ffe_common(const struct ff_effect *const ffe, const char *const type_str) +{ + printf("ioctl(-1, EVIOCSFF, {type=%s, id=%" PRIu16 + ", direction=%" PRIu16 ", ", + type_str, ffe->id, ffe->direction); +# if VERBOSE + printf("trigger={button=%hu, interval=%hu}" + ", replay={length=%hu, delay=%hu}", + ffe->trigger.button, ffe->trigger.interval, + ffe->replay.length, ffe->replay.delay); +# endif /* VERBOSE */ +} + +# define TEST_NULL_ARG(cmd) \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd) + +int +main(void) +{ + TEST_NULL_ARG(EVIOCGVERSION); + TEST_NULL_ARG(EVIOCGEFFECTS); + TEST_NULL_ARG(EVIOCGID); + TEST_NULL_ARG(EVIOCGKEYCODE); + TEST_NULL_ARG(EVIOCSKEYCODE); + TEST_NULL_ARG(EVIOCSFF); +# ifdef EVIOCGKEYCODE_V2 + TEST_NULL_ARG(EVIOCGKEYCODE_V2); +# endif +# ifdef EVIOCSKEYCODE_V2 + TEST_NULL_ARG(EVIOCSKEYCODE_V2); +# endif +# ifdef EVIOCGREP + TEST_NULL_ARG(EVIOCGREP); +# endif +# ifdef EVIOCSREP + TEST_NULL_ARG(EVIOCSREP); +# endif +# ifdef EVIOCSCLOCKID + TEST_NULL_ARG(EVIOCSCLOCKID); +# endif + + TEST_NULL_ARG(EVIOCGNAME(0)); + TEST_NULL_ARG(EVIOCGPHYS(0)); + TEST_NULL_ARG(EVIOCGUNIQ(0)); + TEST_NULL_ARG(EVIOCGKEY(0)); + TEST_NULL_ARG(EVIOCGLED(0)); +# ifdef EVIOCGMTSLOTS + TEST_NULL_ARG(EVIOCGMTSLOTS(0)); +# endif +# ifdef EVIOCGPROP + TEST_NULL_ARG(EVIOCGPROP(0)); +# endif + TEST_NULL_ARG(EVIOCGSND(0)); +# ifdef EVIOCGSW + TEST_NULL_ARG(EVIOCGSW(0)); +# endif + + TEST_NULL_ARG(EVIOCGABS(ABS_X)); + TEST_NULL_ARG(EVIOCSABS(ABS_X)); + + TEST_NULL_ARG(EVIOCGBIT(EV_SYN, 0)); + TEST_NULL_ARG(EVIOCGBIT(EV_KEY, 1)); + TEST_NULL_ARG(EVIOCGBIT(EV_REL, 2)); + TEST_NULL_ARG(EVIOCGBIT(EV_ABS, 3)); + TEST_NULL_ARG(EVIOCGBIT(EV_MSC, 4)); +# ifdef EV_SW + TEST_NULL_ARG(EVIOCGBIT(EV_SW, 5)); +# endif + TEST_NULL_ARG(EVIOCGBIT(EV_LED, 6)); + TEST_NULL_ARG(EVIOCGBIT(EV_SND, 7)); + TEST_NULL_ARG(EVIOCGBIT(EV_REP, 8)); + TEST_NULL_ARG(EVIOCGBIT(EV_FF, 9)); + TEST_NULL_ARG(EVIOCGBIT(EV_PWR, 10)); + TEST_NULL_ARG(EVIOCGBIT(EV_FF_STATUS, 11)); + + ioctl(-1, EVIOCGBIT(EV_MAX, 42), 0); + printf("ioctl(-1, EVIOCGBIT(%#x /* EV_??? */, 42), NULL)" + " = -1 EBADF (%m)\n", EV_MAX); + + ioctl(-1, EVIOCRMFF, lmagic); + printf("ioctl(-1, EVIOCRMFF, %d) = -1 EBADF (%m)\n", (int) lmagic); + + ioctl(-1, EVIOCGRAB, lmagic); + printf("ioctl(-1, EVIOCGRAB, %lu) = -1 EBADF (%m)\n", lmagic); + +# ifdef EVIOCREVOKE + ioctl(-1, EVIOCREVOKE, lmagic); + printf("ioctl(-1, EVIOCREVOKE, %lu) = -1 EBADF (%m)\n", lmagic); +# endif + + const unsigned int size = get_page_size(); + void *const page = tail_alloc(size); + fill_memory(page, size); + + int *const val_int = tail_alloc(sizeof(*val_int)); + *val_int = magic; + +# ifdef EVIOCSCLOCKID + ioctl(-1, EVIOCSCLOCKID, val_int); + printf("ioctl(-1, EVIOCSCLOCKID, [%u]) = -1 EBADF (%m)\n", *val_int); +# endif + + int *pair_int = tail_alloc(sizeof(*pair_int) * 2); + pair_int[0] = 0xdeadbeef; + pair_int[1] = 0xbadc0ded; + +# ifdef EVIOSGREP + ioctl(-1, EVIOCSREP, pair_int); + printf("ioctl(-1, EVIOCSREP, [%u, %u]) = -1 EBADF (%m)\n", + pair_int[0], pair_int[1]); +# endif + + pair_int[1] = 1; + ioctl(-1, EVIOCSKEYCODE, pair_int); + printf("ioctl(-1, EVIOCSKEYCODE, [%u, %s]) = -1 EBADF (%m)\n", + pair_int[0], "KEY_ESC"); + +# ifdef EVIOCSKEYCODE_V2 + struct input_keymap_entry *const ike = tail_alloc(sizeof(*ike)); + fill_memory(ike, sizeof(*ike)); + ike->keycode = 2; + + ioctl(-1, EVIOCSKEYCODE_V2, ike); + printf("ioctl(-1, EVIOCSKEYCODE_V2, {flags=%" PRIu8 + ", len=%" PRIu8 ", ", ike->flags, ike->len); +# if VERBOSE + printf("index=%" PRIu16 ", keycode=%s, scancode=[", + ike->index, "KEY_1"); + unsigned int i; + for (i = 0; i < ARRAY_SIZE(ike->scancode); ++i) { + if (i > 0) + printf(", "); + printf("%" PRIx8, ike->scancode[i]); + } + printf("]"); +# else + printf("..."); +# endif + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); +# endif + + struct ff_effect *const ffe = tail_alloc(sizeof(*ffe)); + fill_memory(ffe, sizeof(*ffe)); + + ffe->type = FF_CONSTANT; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_CONSTANT"); + +# if VERBOSE + printf(", constant={level=%hd", ffe->u.constant.level); + print_envelope(&ffe->u.constant.envelope); + printf("}"); +# else + printf("..."); +# endif + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + +# if VERBOSE + ffe->type = FF_RAMP; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_RAMP"); + printf(", ramp={start_level=%hd, end_level=%hd", + ffe->u.ramp.start_level, ffe->u.ramp.end_level); + print_envelope(&ffe->u.ramp.envelope); + errno = EBADF; + printf("}}) = -1 EBADF (%m)\n"); + + ffe->type = FF_PERIODIC; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_PERIODIC"); + printf(", periodic={waveform=%hu, period=%hu, magnitude=%hd" + ", offset=%hd, phase=%hu", + ffe->u.periodic.waveform, ffe->u.periodic.period, + ffe->u.periodic.magnitude, ffe->u.periodic.offset, + ffe->u.periodic.phase); + print_envelope(&ffe->u.periodic.envelope); + printf(", custom_len=%u, custom_data=%p}", + ffe->u.periodic.custom_len, ffe->u.periodic.custom_data); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + ffe->type = FF_RUMBLE; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "FF_RUMBLE"); + printf(", rumble={strong_magnitude=%hu, weak_magnitude=%hu}", + ffe->u.rumble.strong_magnitude, ffe->u.rumble.weak_magnitude); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + ffe->type = 0xff; + ioctl(-1, EVIOCSFF, ffe); + print_ffe_common(ffe, "0xff /* FF_??? */"); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); +# endif + + ioctl(-1, _IOC(_IOC_READ, 0x45, 0x1, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ, 0x45, 0x1, 0xff)", lmagic); + + ioctl(-1, _IOC(_IOC_WRITE, 0x45, 0x1, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_WRITE, 0x45, 0x1, 0xff)", lmagic); + + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x45, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x45, 0xfe, 0xff)", lmagic); + + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x45, 0, 0), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x45, 0, 0)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_INPUT_H") + +#endif diff --git a/tests-mx32/ioctl_evdev.test b/tests-mx32/ioctl_evdev.test new file mode 100755 index 000000000..7ed2e98a6 --- /dev/null +++ b/tests-mx32/ioctl_evdev.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of EVIOC* ioctls. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-mx32/ioctl_loop-nv.c b/tests-mx32/ioctl_loop-nv.c new file mode 100644 index 000000000..dc6b916d5 --- /dev/null +++ b/tests-mx32/ioctl_loop-nv.c @@ -0,0 +1,2 @@ +#define ABBREV 1 +#include "ioctl_loop.c" diff --git a/tests-mx32/ioctl_loop-nv.test b/tests-mx32/ioctl_loop-nv.test new file mode 100755 index 000000000..dcc27e1de --- /dev/null +++ b/tests-mx32/ioctl_loop-nv.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check non-verbose decoding of LOOP_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a22 -eioctl -e verbose=none $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/ioctl_loop-v.c b/tests-mx32/ioctl_loop-v.c new file mode 100644 index 000000000..22e75727c --- /dev/null +++ b/tests-mx32/ioctl_loop-v.c @@ -0,0 +1,2 @@ +#define VERBOSE 1 +#include "ioctl_loop.c" diff --git a/tests-mx32/ioctl_loop-v.test b/tests-mx32/ioctl_loop-v.test new file mode 100755 index 000000000..ff3995d87 --- /dev/null +++ b/tests-mx32/ioctl_loop-v.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check non-abbreviated decoding of LOOP_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a22 -v -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/ioctl_loop.c b/tests-mx32/ioctl_loop.c new file mode 100644 index 000000000..a95e775da --- /dev/null +++ b/tests-mx32/ioctl_loop.c @@ -0,0 +1,322 @@ +/* + * This file is part of ioctl_loop strace test. + * + * Copyright (c) 2016 JingPiao Chen + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "xlat/loop_cmds.h" + +#ifndef ABBREV +# define ABBREV 0 +#endif + +static void +print_loop_info(struct loop_info * const info, bool print_encrypt, + const char *encrypt_type, const char *encrypt_key, + const char *flags) +{ +#if ABBREV + printf("%p", info); +#else + printf("{lo_number=%d", info->lo_number); +# if VERBOSE + printf(", lo_device=makedev(%u, %u), lo_inode=%lu, " + "lo_rdevice=makedev(%u, %u)", + major(info->lo_device), minor(info->lo_device), + info->lo_inode, + major(info->lo_rdevice), minor(info->lo_rdevice)); +# endif /* VERBOSE */ + + printf(", lo_offset=%#x", info->lo_offset); + + if (VERBOSE || print_encrypt) { + printf(", lo_encrypt_type="); + if (encrypt_type) + printf("%s", encrypt_type); + else + printf("%#x /* LO_CRYPT_??? */", info->lo_encrypt_type); + + printf(", lo_encrypt_key_size=%" PRIu32, + (uint32_t) info->lo_encrypt_key_size); + } + + printf(", lo_flags="); + if (flags) + printf("%s", flags); + else + printf("%#x /* LO_FLAGS_??? */", info->lo_flags); + + printf(", lo_name=\"%.*s\"", + (int) sizeof(info->lo_name) - 1, info->lo_name); + + if (VERBOSE || print_encrypt) + printf(", lo_encrypt_key=\"%.*s\"", + encrypt_key ? (int) strlen(encrypt_key) : + (int) sizeof(info->lo_encrypt_key), + encrypt_key ? encrypt_key : + (char *) info->lo_encrypt_key); + +# if VERBOSE + printf(", lo_init=[%#lx, %#lx]" + ", reserved=[%#hhx, %#hhx, %#hhx, %#hhx]}", + info->lo_init[0], info->lo_init[1], + info->reserved[0], info->reserved[1], + info->reserved[2], info->reserved[3]); +# else /* !VERBOSE */ + printf(", ...}"); +# endif /* VERBOSE */ +#endif /* !ABBREV */ +} + +static void +print_loop_info64(struct loop_info64 * const info64, bool print_encrypt, + const char *encrypt_type, const char *encrypt_key, + const char *flags) +{ +#if ABBREV + printf("%p", info64); +#else +# if VERBOSE + printf("{lo_device=makedev(%u, %u), lo_inode=%" PRIu64 + ", lo_rdevice=makedev(%u, %u), lo_offset=%#" PRIx64 + ", lo_sizelimit=%" PRIu64 ", lo_number=%" PRIu32, + major(info64->lo_device), minor(info64->lo_device), + (uint64_t) info64->lo_inode, + major(info64->lo_rdevice), minor(info64->lo_rdevice), + (uint64_t) info64->lo_offset, + (uint64_t) info64->lo_sizelimit, + (uint32_t) info64->lo_number); +# else /* !VERBOSE */ + printf("{lo_offset=%#" PRIx64 ", lo_number=%" PRIu32, + (uint64_t) info64->lo_offset, + (uint32_t) info64->lo_number); +# endif /* VERBOSE */ + + if (VERBOSE || print_encrypt) { + printf(", lo_encrypt_type="); + if (encrypt_type) + printf("%s", encrypt_type); + else + printf("%#x /* LO_CRYPT_??? */", + info64->lo_encrypt_type); + + printf(", lo_encrypt_key_size=%" PRIu32, + info64->lo_encrypt_key_size); + } + + printf(", lo_flags="); + if (flags) + printf("%s", flags); + else + printf("%#x /* LO_FLAGS_??? */", info64->lo_flags); + printf(", lo_file_name=\"%.*s\"", + (int) sizeof(info64->lo_file_name) - 1, info64->lo_file_name); + + if (VERBOSE || print_encrypt) + printf(", lo_crypt_name=\"%.*s\", lo_encrypt_key=\"%.*s\"", + (int) sizeof(info64->lo_crypt_name) - 1, + info64->lo_crypt_name, + encrypt_key ? (int) strlen(encrypt_key) : + (int) sizeof(info64->lo_encrypt_key), + encrypt_key ? encrypt_key : + (char *) info64->lo_encrypt_key); + +# if VERBOSE + printf(", lo_init=[%#" PRIx64 ", %#" PRIx64 "]}", + (uint64_t) info64->lo_init[0], + (uint64_t) info64->lo_init[1]); +# else /* !VERBOSE */ + printf(", ...}"); +# endif /* VERBOSE */ +#endif /* !ABBREV */ +} + +int +main(void) +{ + static const kernel_ulong_t unknown_loop_cmd = + (kernel_ulong_t) 0xbadc0dedfeed4cedULL; + static const kernel_ulong_t magic = + (kernel_ulong_t) 0xdeadbeefbadc0dedULL; + static const kernel_ulong_t kernel_mask = + ((kernel_ulong_t) -1) - ((unsigned long) -1L); + + struct loop_info * const info = tail_alloc(sizeof(*info)); + struct loop_info64 * const info64 = tail_alloc(sizeof(*info64)); + + /* Unknown loop commands */ + ioctl(-1, unknown_loop_cmd, magic); + printf("ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE%s, 0x4c, %#x, %#x), " + "%#lx) = -1 EBADF (%m)\n", + _IOC_DIR((unsigned int) unknown_loop_cmd) & _IOC_NONE ? + "|_IOC_NONE" : "", + _IOC_NR((unsigned int) unknown_loop_cmd), + _IOC_SIZE((unsigned int) unknown_loop_cmd), + (unsigned long) magic); + + ioctl(-1, LOOP_SET_DIRECT_IO + 1, magic); + printf("ioctl(-1, _IOC(0, 0x4c, %#x, %#x), %#lx) = " + "-1 EBADF (%m)\n", + _IOC_NR(LOOP_SET_DIRECT_IO + 1), + _IOC_SIZE(LOOP_SET_DIRECT_IO + 1), + (unsigned long) magic); + + ioctl(-1, LOOP_CTL_GET_FREE + 1, magic); + printf("ioctl(-1, _IOC(0, 0x4c, %#x, %#x), %#lx) = " + "-1 EBADF (%m)\n", + _IOC_NR(LOOP_CTL_GET_FREE + 1), + _IOC_SIZE(LOOP_CTL_GET_FREE + 1), + (unsigned long) magic); + + /* LOOP_SET_FD */ + ioctl(-1, LOOP_SET_FD, magic); + printf("ioctl(-1, LOOP_SET_FD, %d) = -1 EBADF (%m)\n", + (unsigned int) magic); + + /* LOOP_CLR_FD */ + ioctl(-1, LOOP_CLR_FD); + printf("ioctl(-1, LOOP_CLR_FD) = -1 EBADF (%m)\n"); + + /* LOOP_SET_STATUS */ + ioctl(-1, LOOP_SET_STATUS, NULL); + printf("ioctl(-1, LOOP_SET_STATUS, NULL) = -1 EBADF (%m)\n"); + + fill_memory(info, sizeof(*info)); + info->lo_flags = 0xdeface00; + info->lo_name[0] = '\0'; + info->lo_encrypt_key[0] = '\0'; + info->lo_encrypt_key_size = 1; + + printf("ioctl(-1, LOOP_SET_STATUS, "); + print_loop_info(info, true, NULL, "\\0", NULL); + ioctl(-1, LOOP_SET_STATUS, info); + printf(") = -1 EBADF (%m)\n"); + + fill_memory(info, sizeof(*info)); + info->lo_encrypt_type = LO_CRYPT_NONE; + info->lo_flags = LO_FLAGS_READ_ONLY; + memset(info->lo_name, 'A', sizeof(info->lo_name)); + memset(info->lo_encrypt_key, 'B', sizeof(info->lo_encrypt_key)); + + ioctl(-1, LOOP_SET_STATUS, (void *) info + ALIGNOF(info)); + printf("ioctl(-1, LOOP_SET_STATUS, %p) = -1 EBADF (%m)\n", + (void *) info + ALIGNOF(info)); + + printf("ioctl(-1, LOOP_SET_STATUS, "); + print_loop_info(info, false, "LO_CRYPT_NONE", NULL, + "LO_FLAGS_READ_ONLY"); + ioctl(-1, LOOP_SET_STATUS, info); + printf(") = -1 EBADF (%m)\n"); + + /* LOOP_GET_STATUS */ + ioctl(-1, LOOP_GET_STATUS, NULL); + printf("ioctl(-1, LOOP_GET_STATUS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, LOOP_GET_STATUS, (unsigned long) info | kernel_mask); + printf("ioctl(-1, LOOP_GET_STATUS, %p) = -1 EBADF (%m)\n", info); + + /* LOOP_SET_STATUS64 */ + ioctl(-1, LOOP_SET_STATUS64, NULL); + printf("ioctl(-1, LOOP_SET_STATUS64, NULL) = -1 EBADF (%m)\n"); + + fill_memory(info64, sizeof(*info64)); + info64->lo_flags = 0xdec0de00; + info64->lo_file_name[0] = '\0'; + info64->lo_crypt_name[0] = '\0'; + info64->lo_encrypt_key[0] = '\0'; + info64->lo_encrypt_key_size = 1; + + printf("ioctl(-1, LOOP_SET_STATUS64, "); + print_loop_info64(info64, true, NULL, "\\0", NULL); + ioctl(-1, LOOP_SET_STATUS64, info64); + printf(") = -1 EBADF (%m)\n"); + + fill_memory(info64, sizeof(*info64)); + info64->lo_flags = LO_FLAGS_READ_ONLY; + info64->lo_encrypt_type = LO_CRYPT_NONE; + memset(info64->lo_file_name, 'C', sizeof(info64->lo_file_name)); + memset(info64->lo_crypt_name, 'D', sizeof(info64->lo_crypt_name)); + memset(info64->lo_encrypt_key, 'E', sizeof(info64->lo_encrypt_key)); + + ioctl(-1, LOOP_SET_STATUS64, (void *) info64 + ALIGNOF(info64)); + printf("ioctl(-1, LOOP_SET_STATUS64, %p) = -1 EBADF (%m)\n", + (void *) info64 + ALIGNOF(info64)); + + printf("ioctl(-1, LOOP_SET_STATUS64, "); + print_loop_info64(info64, false, "LO_CRYPT_NONE", NULL, + "LO_FLAGS_READ_ONLY"); + ioctl(-1, LOOP_SET_STATUS64, info64); + printf(") = -1 EBADF (%m)\n"); + + /* LOOP_GET_STATUS64 */ + ioctl(-1, LOOP_GET_STATUS64, NULL); + printf("ioctl(-1, LOOP_GET_STATUS64, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, LOOP_GET_STATUS64, (unsigned long) info64 | kernel_mask); + printf("ioctl(-1, LOOP_GET_STATUS64, %p) = -1 EBADF (%m)\n", info64); + + /* LOOP_CHANGE_FD */ + ioctl(-1, LOOP_CHANGE_FD, magic); + printf("ioctl(-1, LOOP_CHANGE_FD, %d) = -1 EBADF (%m)\n", + (unsigned int) magic); + + /* LOOP_SET_CAPACITY */ + ioctl(-1, LOOP_SET_CAPACITY); + printf("ioctl(-1, LOOP_SET_CAPACITY) = -1 EBADF (%m)\n"); + + /* LOOP_SET_DIRECT_IO */ + ioctl(-1, LOOP_SET_DIRECT_IO, magic); + printf("ioctl(-1, LOOP_SET_DIRECT_IO, %lu) = -1 EBADF (%m)\n", + (unsigned long) magic); + + /* LOOP_CTL_ADD */ + ioctl(-1, LOOP_CTL_ADD, magic); + printf("ioctl(-1, LOOP_CTL_ADD, %d) = -1 EBADF (%m)\n", + (unsigned int) magic); + + /* LOOP_CTL_REMOVE */ + ioctl(-1, LOOP_CTL_REMOVE, magic); + printf("ioctl(-1, LOOP_CTL_REMOVE, %d) = -1 EBADF (%m)\n", + (unsigned int) magic); + + /* LOOP_CTL_GET_FREE */ + ioctl(-1, LOOP_CTL_GET_FREE); + printf("ioctl(-1, LOOP_CTL_GET_FREE) = -1 EBADF (%m)\n"); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/ioctl_loop.test b/tests-mx32/ioctl_loop.test new file mode 100755 index 000000000..112cd636c --- /dev/null +++ b/tests-mx32/ioctl_loop.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of LOOP_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a22 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/ioctl_mtd.c b/tests-mx32/ioctl_mtd.c new file mode 100644 index 000000000..a37d5d0f0 --- /dev/null +++ b/tests-mx32/ioctl_mtd.c @@ -0,0 +1,197 @@ +/* + * This file is part of ioctl_mtd strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include +#include +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) +# include "mtd-abi.h" +#else +# include +#endif + +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; + +#define TEST_NULL_ARG(cmd) \ + do { \ + ioctl(-1, cmd, 0); \ + if (_IOC_DIR(cmd) == _IOC_WRITE) \ + printf("ioctl(-1, MIXER_WRITE(%u) or %s, NULL)" \ + " = -1 EBADF (%m)\n", \ + (unsigned int) _IOC_NR(cmd), #cmd); \ + else if (_IOC_DIR(cmd) == _IOC_READ) \ + printf("ioctl(-1, MIXER_READ(%u) or %s, NULL)" \ + " = -1 EBADF (%m)\n", \ + (unsigned int) _IOC_NR(cmd), #cmd); \ + else \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd); \ + } while (0) + +#define TEST_erase_info_user(cmd, eiu) \ + ioctl(-1, cmd, eiu); \ + printf("ioctl(-1, MIXER_%s(%u) or %s, {start=%#x, length=%#x})" \ + " = -1 EBADF (%m)\n", \ + (_IOC_DIR(cmd) == _IOC_READ) ? "READ" : "WRITE", \ + (unsigned int) _IOC_NR(cmd), #cmd, \ + eiu->start, eiu->length) + +int +main(void) +{ + TEST_NULL_ARG(ECCGETLAYOUT); + TEST_NULL_ARG(ECCGETSTATS); + TEST_NULL_ARG(MEMERASE); + TEST_NULL_ARG(MEMERASE64); + TEST_NULL_ARG(MEMGETBADBLOCK); + TEST_NULL_ARG(MEMGETINFO); + TEST_NULL_ARG(MEMGETOOBSEL); + TEST_NULL_ARG(MEMGETREGIONCOUNT); + TEST_NULL_ARG(MEMISLOCKED); + TEST_NULL_ARG(MEMLOCK); + TEST_NULL_ARG(MEMREADOOB); + TEST_NULL_ARG(MEMREADOOB64); + TEST_NULL_ARG(MEMSETBADBLOCK); + TEST_NULL_ARG(MEMUNLOCK); + TEST_NULL_ARG(MEMWRITE); + TEST_NULL_ARG(MEMWRITEOOB); + TEST_NULL_ARG(MEMWRITEOOB64); + TEST_NULL_ARG(OTPGETREGIONCOUNT); + TEST_NULL_ARG(OTPGETREGIONINFO); + TEST_NULL_ARG(OTPLOCK); + TEST_NULL_ARG(OTPSELECT); + + ioctl(-1, MTDFILEMODE, MTD_FILE_MODE_NORMAL); + printf("ioctl(-1, MTDFILEMODE, MTD_FILE_MODE_NORMAL) = -1 EBADF (%m)\n"); + + int *const opt = tail_alloc(sizeof(*opt)); + *opt = MTD_OTP_OFF; + ioctl(-1, OTPSELECT, opt); + printf("ioctl(-1, MIXER_READ(%u) or OTPSELECT, [MTD_OTP_OFF])" + " = -1 EBADF (%m)\n", (unsigned int) _IOC_NR(OTPSELECT)); + + uint64_t *const v64 = tail_alloc(sizeof(*v64)); + fill_memory(v64, sizeof(*v64)); + + ioctl(-1, MEMGETBADBLOCK, v64); + printf("ioctl(-1, MIXER_WRITE(%u) or MEMGETBADBLOCK, [%" PRIu64 "])" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMGETBADBLOCK), *v64); + + ioctl(-1, MEMSETBADBLOCK, v64); + printf("ioctl(-1, MIXER_WRITE(%u) or MEMSETBADBLOCK, [%" PRIu64 "])" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMSETBADBLOCK), *v64); + + struct region_info_user *const riu = tail_alloc(sizeof(*riu)); + fill_memory(riu, sizeof(*riu)); + ioctl(-1, MEMGETREGIONINFO, riu); + printf("ioctl(-1, %s, {regionindex=%#x}) = -1 EBADF (%m)\n", + "MEMGETREGIONINFO" +#ifdef __i386__ + " or MTRRIOC_GET_PAGE_ENTRY" +#endif + , riu->regionindex); + + struct erase_info_user *const eiu = tail_alloc(sizeof(*eiu)); + fill_memory(eiu, sizeof(*eiu)); + + TEST_erase_info_user(MEMERASE, eiu); + TEST_erase_info_user(MEMLOCK, eiu); + TEST_erase_info_user(MEMUNLOCK, eiu); + TEST_erase_info_user(MEMISLOCKED, eiu); + + struct erase_info_user64 *const eiu64 = tail_alloc(sizeof(*eiu64)); + fill_memory(eiu64, sizeof(*eiu64)); + ioctl(-1, MEMERASE64, eiu64); + printf("ioctl(-1, MIXER_WRITE(%u) or %s, {start=%#llx, length=%#llx})" + " = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(MEMERASE64), "MEMERASE64", + (unsigned long long) eiu64->start, + (unsigned long long) eiu64->length); + + struct mtd_oob_buf *const oob = tail_alloc(sizeof(*oob)); + fill_memory(oob, sizeof(*oob)); + + ioctl(-1, MEMWRITEOOB, oob); + printf("ioctl(-1, MEMWRITEOOB, {start=%#x, length=%#x, ptr=%p})" + " = -1 EBADF (%m)\n", oob->start, oob->length, oob->ptr); + + ioctl(-1, MEMREADOOB, oob); + printf("ioctl(-1, MEMREADOOB, {start=%#x, length=%#x, ptr=%p})" + " = -1 EBADF (%m)\n", oob->start, oob->length, oob->ptr); + + struct mtd_oob_buf64 *const oob64 = tail_alloc(sizeof(*oob64)); + fill_memory(oob64, sizeof(*oob64)); + + ioctl(-1, MEMWRITEOOB64, oob64); + printf("ioctl(-1, MEMWRITEOOB64" + ", {start=%#llx, length=%#x, usr_ptr=%#llx}) = -1 EBADF (%m)\n", + (unsigned long long) oob64->start, oob64->length, + (unsigned long long) oob64->usr_ptr); + + ioctl(-1, MEMREADOOB64, oob64); + printf("ioctl(-1, MEMREADOOB64" + ", {start=%#llx, length=%#x, usr_ptr=%#llx}) = -1 EBADF (%m)\n", + (unsigned long long) oob64->start, oob64->length, + (unsigned long long) oob64->usr_ptr); + + + struct otp_info *const oi = tail_alloc(sizeof(*oi)); + fill_memory(oi, sizeof(*oi)); + ioctl(-1, OTPLOCK, oi); + printf("ioctl(-1, MIXER_READ(%u) or OTPLOCK" + ", {start=%#x, length=%#x, locked=%u}) = -1 EBADF (%m)\n", + (unsigned int) _IOC_NR(OTPLOCK), oi->start, oi->length, oi->locked); + + struct mtd_write_req *const wr = tail_alloc(sizeof(*wr)); + fill_memory(wr, sizeof(*wr)); + wr->mode = MTD_OPS_PLACE_OOB; + ioctl(-1, MEMWRITE, wr); + printf("ioctl(-1, MEMWRITE, {start=%#llx, len=%#llx, ooblen=%#llx" + ", usr_data=%#llx, usr_oob=%#llx, mode=MTD_OPS_PLACE_OOB})" + " = -1 EBADF (%m)\n", + (unsigned long long) wr->start, + (unsigned long long) wr->len, + (unsigned long long) wr->ooblen, + (unsigned long long) wr->usr_data, + (unsigned long long) wr->usr_oob); + + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x4d, 0xfe, 0xff), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x4d, 0xfe, 0xff)", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/ioctl_mtd.test b/tests-mx32/ioctl_mtd.test new file mode 100755 index 000000000..084280730 --- /dev/null +++ b/tests-mx32/ioctl_mtd.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of 'M' type ioctls. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-mx32/ioctl_rtc-v.c b/tests-mx32/ioctl_rtc-v.c new file mode 100644 index 000000000..62b161559 --- /dev/null +++ b/tests-mx32/ioctl_rtc-v.c @@ -0,0 +1,3 @@ +/* This file is part of ioctl_rtc-v strace test. */ +#define VERBOSE 1 +#include "ioctl_rtc.c" diff --git a/tests-mx32/ioctl_rtc-v.test b/tests-mx32/ioctl_rtc-v.test new file mode 100755 index 000000000..a255322d5 --- /dev/null +++ b/tests-mx32/ioctl_rtc-v.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check verbose decoding of RTC_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/ioctl_rtc.c b/tests-mx32/ioctl_rtc.c new file mode 100644 index 000000000..49d7ec7b0 --- /dev/null +++ b/tests-mx32/ioctl_rtc.c @@ -0,0 +1,207 @@ +/* + * This file is part of ioctl_rtc strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include "xlat.h" + +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; + +static void +print_rtc_time(const struct rtc_time *rt) +{ + printf("{tm_sec=%d, tm_min=%d, tm_hour=%d" + ", tm_mday=%d, tm_mon=%d, tm_year=%d", + rt->tm_sec, rt->tm_min, rt->tm_hour, + rt->tm_mday, rt->tm_mon, rt->tm_year); +#if VERBOSE + printf(", tm_wday=%d, tm_yday=%d, tm_isdst=%d}", + rt->tm_wday, rt->tm_yday, rt->tm_isdst); +#else + printf(", ...}"); +#endif +} + +static struct xlat rtc_argless[] = { + XLAT(RTC_AIE_OFF), + XLAT(RTC_PIE_ON), + XLAT(RTC_PIE_OFF), + XLAT(RTC_UIE_ON), + XLAT(RTC_WIE_ON), + XLAT(RTC_WIE_OFF), +#ifdef RTC_VL_CLR + XLAT(RTC_VL_CLR), +#endif +}; + +int +main(void) +{ + const unsigned int size = get_page_size(); + + void *const page = tail_alloc(size); + fill_memory(page, size); + + struct rtc_time *rt = tail_alloc(sizeof(*rt)); + fill_memory(rt, sizeof(*rt)); + + struct rtc_wkalrm *wk = tail_alloc(sizeof(*wk)); + fill_memory(wk, sizeof(*wk)); + + struct rtc_pll_info *pll = tail_alloc(sizeof(*pll)); + fill_memory(pll, sizeof(*pll)); + + /* RTC_ALM_READ */ + ioctl(-1, RTC_ALM_READ, 0); + printf("ioctl(-1, RTC_ALM_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_ALM_READ, page); + printf("ioctl(-1, RTC_ALM_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_RD_TIME */ + ioctl(-1, RTC_RD_TIME, 0); + printf("ioctl(-1, RTC_RD_TIME, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_RD_TIME, page); + printf("ioctl(-1, RTC_RD_TIME, %p) = -1 EBADF (%m)\n", page); + + /* RTC_ALM_SET */ + ioctl(-1, RTC_ALM_SET, 0); + printf("ioctl(-1, RTC_ALM_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_ALM_SET, rt); + printf("ioctl(-1, RTC_ALM_SET, "); + print_rtc_time(rt); + errno = EBADF; + printf(") = -1 EBADF (%m)\n"); + + /* RTC_SET_TIME */ + ioctl(-1, RTC_SET_TIME, 0); + printf("ioctl(-1, RTC_SET_TIME, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_SET_TIME, rt); + printf("ioctl(-1, RTC_SET_TIME, "); + print_rtc_time(rt); + errno = EBADF; + printf(") = -1 EBADF (%m)\n"); + + /* RTC_IRQP_SET */ + ioctl(-1, RTC_IRQP_SET, lmagic); + printf("ioctl(-1, RTC_IRQP_SET, %lu) = -1 EBADF (%m)\n", lmagic); + + /* RTC_EPOCH_SET */ + ioctl(-1, RTC_EPOCH_SET, lmagic); + printf("ioctl(-1, RTC_EPOCH_SET, %lu) = -1 EBADF (%m)\n", lmagic); + + /* RTC_IRQP_READ */ + ioctl(-1, RTC_IRQP_READ, 0); + printf("ioctl(-1, RTC_IRQP_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_IRQP_READ, page); + printf("ioctl(-1, RTC_IRQP_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_EPOCH_READ */ + ioctl(-1, RTC_EPOCH_READ, 0); + printf("ioctl(-1, RTC_EPOCH_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_EPOCH_READ, page); + printf("ioctl(-1, RTC_EPOCH_READ, %p) = -1 EBADF (%m)\n", page); + + /* RTC_WKALM_RD */ + ioctl(-1, RTC_WKALM_RD, 0); + printf("ioctl(-1, RTC_WKALM_RD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_WKALM_RD, page); + printf("ioctl(-1, RTC_WKALM_RD, %p) = -1 EBADF (%m)\n", page); + + /* RTC_WKALM_SET */ + ioctl(-1, RTC_WKALM_SET, 0); + printf("ioctl(-1, RTC_WKALM_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_WKALM_SET, wk); + printf("ioctl(-1, RTC_WKALM_SET, {enabled=%u, pending=%u, time=", + (unsigned) wk->enabled, (unsigned) wk->pending); + print_rtc_time(&wk->time); + errno = EBADF; + printf("}) = -1 EBADF (%m)\n"); + + /* RTC_PLL_GET */ + ioctl(-1, RTC_PLL_GET, 0); + printf("ioctl(-1, RTC_PLL_GET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_PLL_GET, page); + printf("ioctl(-1, RTC_PLL_GET, %p) = -1 EBADF (%m)\n", page); + + /* RTC_PLL_SET */ + ioctl(-1, RTC_PLL_SET, 0); + printf("ioctl(-1, RTC_PLL_SET, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_PLL_SET, pll); + printf("ioctl(-1, RTC_PLL_SET, {pll_ctrl=%d, pll_value=%d" + ", pll_max=%d, pll_min=%d, pll_posmult=%d, pll_negmult=%d" + ", pll_clock=%ld}) = -1 EBADF (%m)\n", + pll->pll_ctrl, pll->pll_value, pll->pll_max, pll->pll_min, + pll->pll_posmult, pll->pll_negmult, pll->pll_clock); + +#ifdef RTC_VL_READ + /* RTC_VL_READ */ + ioctl(-1, RTC_VL_READ, 0); + printf("ioctl(-1, RTC_VL_READ, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, RTC_VL_READ, page); + printf("ioctl(-1, RTC_VL_READ, %p) = -1 EBADF (%m)\n", page); +#endif + + unsigned int i; + for (i = 0; i < ARRAY_SIZE(rtc_argless); ++i) { + ioctl(-1, (unsigned long) rtc_argless[i].val, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", rtc_argless[i].str); + } + + ioctl(-1, RTC_UIE_OFF, lmagic); + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "PHN_NOT_OH or RTC_UIE_OFF"); + + ioctl(-1, RTC_AIE_ON, lmagic); +#ifdef HPPA + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "PA_PERF_ON or RTC_AIE_ON"); +#else + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", "RTC_AIE_ON"); +#endif + + ioctl(-1, _IO(0x70, 0x40), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", "NVRAM_INIT", lmagic); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/ioctl_rtc.test b/tests-mx32/ioctl_rtc.test new file mode 100755 index 000000000..4545f2aeb --- /dev/null +++ b/tests-mx32/ioctl_rtc.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic decoding of RTC_* ioctls. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-mx32/ioctl_scsi.c b/tests-mx32/ioctl_scsi.c new file mode 100644 index 000000000..0db94d849 --- /dev/null +++ b/tests-mx32/ioctl_scsi.c @@ -0,0 +1,156 @@ +/* + * Check decoding of SCSI ioctl commands. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_SCSI_SG_H + +# include +# include +# include +# include "xlat/scsi_sg_commands.h" + +# define TEST_NO_ARG(cmd) \ + do { \ + ioctl(-1, cmd, 0xdeadbeef); \ + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", #cmd); \ + } while (0) + +# define TEST_NULL_ARG(cmd) \ + do { \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd); \ + } while (0) + +# define TEST_TAKES_INT_BY_VAL(cmd, val) \ + do { \ + ioctl(-1, cmd, val); \ + printf("ioctl(-1, %s, %#x) = -1 EBADF (%m)\n", #cmd, val); \ + } while (0) + +# define TEST_TAKES_INT_BY_PTR(cmd, pint) \ + do { \ + ioctl(-1, cmd, pint); \ + printf("ioctl(-1, %s, [%d]) = -1 EBADF (%m)\n", #cmd, *(pint)); \ + } while (0) + +# define TEST_RETURNS_INT_BY_PTR(cmd, pint) \ + do { \ + ioctl(-1, cmd, pint); \ + printf("ioctl(-1, %s, %p) = -1 EBADF (%m)\n", #cmd, pint); \ + } while (0) + +int +main(void) +{ + int *const pint = tail_alloc(sizeof(*pint)); + *pint = (int) 0xfacefeed; + + TEST_NO_ARG(SG_GET_TIMEOUT); + + TEST_NULL_ARG(SG_SET_TIMEOUT); + TEST_NULL_ARG(SG_EMULATED_HOST); + TEST_NULL_ARG(SG_GET_TRANSFORM); + TEST_NULL_ARG(SG_GET_COMMAND_Q); + TEST_NULL_ARG(SG_SET_COMMAND_Q); + TEST_NULL_ARG(SG_GET_RESERVED_SIZE); + TEST_NULL_ARG(SG_SET_RESERVED_SIZE); + TEST_NULL_ARG(SG_GET_SCSI_ID); + TEST_NULL_ARG(SG_SET_FORCE_LOW_DMA); + TEST_NULL_ARG(SG_GET_LOW_DMA); + TEST_NULL_ARG(SG_SET_FORCE_PACK_ID); + TEST_NULL_ARG(SG_GET_PACK_ID); + TEST_NULL_ARG(SG_GET_NUM_WAITING); + TEST_NULL_ARG(SG_SET_DEBUG); + TEST_NULL_ARG(SG_GET_SG_TABLESIZE); + TEST_NULL_ARG(SG_GET_VERSION_NUM); + TEST_NULL_ARG(SG_NEXT_CMD_LEN); + TEST_NULL_ARG(SG_SCSI_RESET); + TEST_NULL_ARG(SG_IO); + TEST_NULL_ARG(SG_GET_REQUEST_TABLE); + TEST_NULL_ARG(SG_SET_KEEP_ORPHAN); + TEST_NULL_ARG(SG_GET_KEEP_ORPHAN); + TEST_NULL_ARG(SG_GET_ACCESS_COUNT); + + TEST_TAKES_INT_BY_VAL(SG_SET_TRANSFORM, 0); + TEST_TAKES_INT_BY_VAL(SG_SET_TRANSFORM, *pint); + + TEST_TAKES_INT_BY_PTR(SG_NEXT_CMD_LEN, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_COMMAND_Q, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_DEBUG, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_FORCE_LOW_DMA, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_FORCE_PACK_ID, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_KEEP_ORPHAN, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_RESERVED_SIZE, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_TIMEOUT, pint); + + TEST_RETURNS_INT_BY_PTR(SG_EMULATED_HOST, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_ACCESS_COUNT, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_COMMAND_Q, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_KEEP_ORPHAN, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_LOW_DMA, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_NUM_WAITING, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_PACK_ID, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_RESERVED_SIZE, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_SG_TABLESIZE, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_TRANSFORM, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_VERSION_NUM, pint); + + ioctl(-1, SG_SCSI_RESET, pint); + printf("ioctl(-1, %s, [%#x /* %s_??? */]) = -1 EBADF (%m)\n", + "SG_SCSI_RESET", *pint, "SG_SCSI_RESET"); + + *pint = 0x100; + ioctl(-1, SG_SCSI_RESET, pint); + printf("ioctl(-1, %s, [SG_SCSI_RESET_NO_ESCALATE|SG_SCSI_RESET_NOTHING])" + " = -1 EBADF (%m)\n", "SG_SCSI_RESET"); + + *pint = 1; + ioctl(-1, SG_SCSI_RESET, pint); + printf("ioctl(-1, %s, [SG_SCSI_RESET_DEVICE]) = -1 EBADF (%m)\n", + "SG_SCSI_RESET"); + + ioctl(-1, 0x22ff, 0); + printf("ioctl(-1, _IOC(0, 0x22, 0xff, 0), 0) = -1 EBADF (%m)\n"); + + static const unsigned long magic = + (unsigned long) 0xdeadbeeffacefeedULL; + ioctl(-1, 0x22ff, magic); + printf("ioctl(-1, _IOC(0, 0x22, 0xff, 0), %#lx) = -1 EBADF (%m)\n", + magic); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SCSI_SG_H") + +#endif diff --git a/tests-mx32/ioctl_scsi.test b/tests-mx32/ioctl_scsi.test new file mode 100755 index 000000000..2710f12b3 --- /dev/null +++ b/tests-mx32/ioctl_scsi.test @@ -0,0 +1,4 @@ +#!/bin/sh + +# Check decoding of SCSI ioctl commands. +. "${srcdir=.}/ioctl.test" diff --git a/tests-mx32/ioctl_sg_io_v3.c b/tests-mx32/ioctl_sg_io_v3.c new file mode 100644 index 000000000..ef25795b7 --- /dev/null +++ b/tests-mx32/ioctl_sg_io_v3.c @@ -0,0 +1,418 @@ +/* + * Check decoding of ioctl SG_IO v3 commands. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_SCSI_SG_H + +# include +# include +# include +# include +# include + +int +main(void) +{ + ioctl(-1, SG_IO, 0); + printf("ioctl(-1, SG_IO, NULL) = -1 EBADF (%m)\n"); + + struct sg_io_hdr *const sg_io = tail_alloc(sizeof(*sg_io)); + fill_memory(sg_io, sizeof(*sg_io)); + + const void *const efault = sg_io + 1; + ioctl(-1, SG_IO, efault); + printf("ioctl(-1, SG_IO, %p) = -1 EBADF (%m)\n", efault); + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, [%u]) = -1 EBADF (%m)\n", sg_io->interface_id); + + unsigned int *const piid = tail_alloc(sizeof(*piid)); + *piid = (unsigned char) 'S'; + ioctl(-1, SG_IO, piid); + printf("ioctl(-1, SG_IO, {interface_id='S', %p}) = -1 EBADF (%m)\n", piid + 1); + + sg_io->interface_id = (unsigned char) 'S'; + sg_io->dxfer_direction = -2; + sg_io->flags = -1U; + sg_io->info = -1U; + sg_io->dxferp = (void *) (unsigned long) 0xfacefeedfffffff1ULL; + sg_io->cmdp = (void *) (unsigned long) 0xfacefeedfffffff2ULL; + sg_io->sbp = (void *) (unsigned long) 0xfacefeedfffffff3ULL; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_TO_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_DIRECT_IO|SG_FLAG_UNUSED_LUN_INHIBIT" + "|SG_FLAG_MMAP_IO|SG_FLAG_NO_DXFER" + "|SG_FLAG_Q_AT_TAIL|SG_FLAG_Q_AT_HEAD|0xfffeffc8" + ", dxferp=%p" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xfffffff8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + sg_io->dxferp, + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->dxfer_direction = -3; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_DIRECT_IO|SG_FLAG_UNUSED_LUN_INHIBIT" + "|SG_FLAG_MMAP_IO|SG_FLAG_NO_DXFER" + "|SG_FLAG_Q_AT_TAIL|SG_FLAG_Q_AT_HEAD|0xfffeffc8" + ", dxferp=%p" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xfffffff8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + sg_io->dxferp, + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + const struct iovec iov[] = { + { + .iov_base = (void *) efault - 2, + .iov_len = 2 + }, { + .iov_base = (void *) efault - 3, + .iov_len = 4 + } + }; + struct iovec *const t_iov = tail_memdup(iov, sizeof(iov)); + + sg_io->flags = 0x24; + sg_io->info = 1; + sg_io->dxfer_direction = -2; + + sg_io->iovec_count = ARRAY_SIZE(iov); + sg_io->dxfer_len = iov[0].iov_len + iov[1].iov_len - 1; + sg_io->dxferp = t_iov; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_TO_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_MMAP_IO|SG_FLAG_Q_AT_HEAD" + ", dxferp=[{iov_base=\"\\%o\\%o\", iov_len=%u}" + ", {iov_base=\"\\%o\\%o\\%o\", iov_len=%u}]" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (iov[0].iov_base + 0), + * (unsigned char *) (iov[0].iov_base + 1), + (unsigned int) iov[0].iov_len, + * (unsigned char *) (iov[1].iov_base + 0), + * (unsigned char *) (iov[1].iov_base + 1), + * (unsigned char *) (iov[1].iov_base + 2), + (unsigned int) iov[1].iov_len, + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->flags = 0x11; + sg_io->dxfer_direction = -3; + sg_io->resid = sg_io->dxfer_len + 1; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_DIRECT_IO|SG_FLAG_Q_AT_TAIL" + ", dxferp=[{iov_base=\"\\%o\\%o\", iov_len=%u}" + ", {iov_base=\"\\%o\\%o\\%o\", iov_len=%u}]" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (iov[0].iov_base + 0), + * (unsigned char *) (iov[0].iov_base + 1), + (unsigned int) iov[0].iov_len, + * (unsigned char *) (iov[1].iov_base + 0), + * (unsigned char *) (iov[1].iov_base + 1), + * (unsigned char *) (iov[1].iov_base + 2), + (unsigned int) iov[1].iov_len, + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->flags = 0x10000; + sg_io->info = 0xdeadbeef; + sg_io->iovec_count = 0; + sg_io->dxfer_len = 5; + sg_io->resid = 1; + sg_io->dxferp = (void *) efault - (sg_io->dxfer_len - sg_io->resid); + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_NO_DXFER" + ", dxferp=\"\\x%x\\x%x\\x%x\\x%x\"" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xdeadbee8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (sg_io->dxferp + 0), + * (unsigned char *) (sg_io->dxferp + 1), + * (unsigned char *) (sg_io->dxferp + 2), + * (unsigned char *) (sg_io->dxferp + 3), + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->flags = 2; + sg_io->dxfer_direction = -4; + sg_io->dxfer_len = 3; + sg_io->resid = 1; + sg_io->dxferp = (void *) efault - sg_io->dxfer_len; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_TO_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_UNUSED_LUN_INHIBIT" + ", dxferp=\"\\x%x\\x%x\\x%x\" => dxferp=\"\\x%x\\x%x\"" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xdeadbee8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (sg_io->dxferp + 0), + * (unsigned char *) (sg_io->dxferp + 1), + * (unsigned char *) (sg_io->dxferp + 2), + * (unsigned char *) (sg_io->dxferp + 0), + * (unsigned char *) (sg_io->dxferp + 1), + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->flags = 0; + sg_io->resid = sg_io->dxfer_len; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_TO_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=0" + ", dxferp=\"\\x%x\\x%x\\x%x\"" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xdeadbee8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (sg_io->dxferp + 0), + * (unsigned char *) (sg_io->dxferp + 1), + * (unsigned char *) (sg_io->dxferp + 2), + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SCSI_SG_H") + +#endif diff --git a/tests-mx32/ioctl_sg_io_v3.test b/tests-mx32/ioctl_sg_io_v3.test new file mode 100755 index 000000000..dacacdf47 --- /dev/null +++ b/tests-mx32/ioctl_sg_io_v3.test @@ -0,0 +1,4 @@ +#!/bin/sh + +# Check decoding of ioctl SG_IO v3 commands. +. "${srcdir=.}/ioctl.test" diff --git a/tests-mx32/ioctl_sg_io_v4.c b/tests-mx32/ioctl_sg_io_v4.c new file mode 100644 index 000000000..5f899eeea --- /dev/null +++ b/tests-mx32/ioctl_sg_io_v4.c @@ -0,0 +1,238 @@ +/* + * Check decoding of ioctl SG_IO v4 commands. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_LINUX_BSG_H + +# include +# include +# include +# include +# include + +# include "xlat/scsi_sg_commands.h" + +int +main(void) +{ + ioctl(-1, SG_IO, 0); + printf("ioctl(-1, SG_IO, NULL) = -1 EBADF (%m)\n"); + + struct sg_io_v4 *const sg_io = tail_alloc(sizeof(*sg_io)); + fill_memory(sg_io, sizeof(*sg_io)); + + const void *const efault = sg_io + 1; + ioctl(-1, SG_IO, efault); + printf("ioctl(-1, SG_IO, %p) = -1 EBADF (%m)\n", efault); + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, [%u]) = -1 EBADF (%m)\n", sg_io->guard); + + unsigned int *const pguard = tail_alloc(sizeof(*pguard)); + *pguard = (unsigned char) 'Q'; + ioctl(-1, SG_IO, pguard); + printf("ioctl(-1, SG_IO, {guard='Q', %p}) = -1 EBADF (%m)\n", pguard + 1); + + sg_io->guard = (unsigned char) 'Q'; + sg_io->protocol = 0; + sg_io->subprotocol = 1; + sg_io->flags = -1U; + sg_io->info = -1U; + sg_io->request = (kernel_ulong_t) 0xfacefeedfffffff1ULL; + sg_io->response = (kernel_ulong_t) 0xfacefeedfffffff2ULL; + sg_io->dout_xferp = (kernel_ulong_t) 0xfacefeedfffffff3ULL; + sg_io->din_xferp = (kernel_ulong_t) 0xfacefeedfffffff4ULL; + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {guard='Q'" + ", protocol=BSG_PROTOCOL_SCSI" + ", subprotocol=BSG_SUB_PROTOCOL_SCSI_TMF" + ", request_len=%u" + ", request=%#llx" + ", request_tag=%#" PRI__x64 + ", request_attr=%u" + ", request_priority=%u" + ", request_extra=%u" + ", max_response_len=%u" + ", dout_iovec_count=%u" + ", dout_xfer_len=%u" + ", din_iovec_count=%u" + ", din_xfer_len=%u" + ", dout_xferp=%#llx" + ", timeout=%u" + ", flags=BSG_FLAG_Q_AT_TAIL|BSG_FLAG_Q_AT_HEAD|0xffffffcf" + ", usr_ptr=%#" PRI__x64 + ", response_len=%u" + ", response=%#llx" + ", din_xferp=%#llx" + ", driver_status=%#x" + ", transport_status=%#x" + ", device_status=%#x" + ", retry_delay=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xfffffff8" + ", duration=%u" + ", response_len=%u" + ", din_resid=%d" + ", dout_resid=%d" + ", generated_tag=%#" PRI__x64 "}) = -1 EBADF (%m)\n", + sg_io->request_len, + (unsigned long long) (kernel_ulong_t) sg_io->request, + sg_io->request_tag, + sg_io->request_attr, + sg_io->request_priority, + sg_io->request_extra, + sg_io->max_response_len, + sg_io->dout_iovec_count, + sg_io->dout_xfer_len, + sg_io->din_iovec_count, + sg_io->din_xfer_len, + (unsigned long long) (kernel_ulong_t) sg_io->dout_xferp, + sg_io->timeout, + sg_io->usr_ptr, + sg_io->response_len, + (unsigned long long) (kernel_ulong_t) sg_io->response, + (unsigned long long) (kernel_ulong_t) sg_io->din_xferp, + sg_io->driver_status, + sg_io->transport_status, + sg_io->device_status, + sg_io->retry_delay, + sg_io->duration, + sg_io->response_len, + sg_io->din_resid, + sg_io->dout_resid, + sg_io->generated_tag); + + const struct iovec iov[] = { + { + .iov_base = (void *) efault - 2, + .iov_len = 2 + }, { + .iov_base = (void *) efault - 3, + .iov_len = 4 + } + }; + const struct iovec *const t_iov = tail_memdup(iov, sizeof(iov)); + sg_io->dout_iovec_count = ARRAY_SIZE(iov); + sg_io->dout_xfer_len = iov[0].iov_len + iov[1].iov_len - 1; + sg_io->dout_xferp = (unsigned long) t_iov; + + sg_io->din_iovec_count = 0; + sg_io->din_xfer_len = 5; + sg_io->din_resid = 1; + sg_io->din_xferp = (unsigned long) efault - + (sg_io->dout_xfer_len - sg_io->din_resid); + + sg_io->request_len = 3; + sg_io->request = (unsigned long) efault - sg_io->request_len; + sg_io->response_len = 2; + sg_io->response = (unsigned long) efault - sg_io->response_len; + + sg_io->flags = 0x20; + sg_io->info = 1; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {guard='Q'" + ", protocol=BSG_PROTOCOL_SCSI" + ", subprotocol=BSG_SUB_PROTOCOL_SCSI_TMF" + ", request_len=%u" + ", request=\"\\x%x\\x%x\\x%x\"" + ", request_tag=%#" PRI__x64 + ", request_attr=%u" + ", request_priority=%u" + ", request_extra=%u" + ", max_response_len=%u" + ", dout_iovec_count=%u" + ", dout_xfer_len=%u" + ", din_iovec_count=%u" + ", din_xfer_len=%u" + ", dout_xferp=[{iov_base=\"\\%o\\%o\", iov_len=%u}" + ", {iov_base=\"\\%o\\%o\\%o\", iov_len=%u}]" + ", timeout=%u, flags=BSG_FLAG_Q_AT_HEAD" + ", usr_ptr=%#" PRI__x64 + ", response_len=%u" + ", response=\"\\x%x\\x%x\"" + ", din_xferp=\"\\x%x\\x%x\\x%x\\x%x\"" + ", driver_status=%#x" + ", transport_status=%#x" + ", device_status=%#x" + ", retry_delay=%u" + ", info=SG_INFO_CHECK" + ", duration=%u" + ", response_len=%u" + ", din_resid=%d" + ", dout_resid=%d" + ", generated_tag=%#" PRI__x64 "}) = -1 EBADF (%m)\n", + sg_io->request_len, + * (unsigned char *) ((unsigned long) sg_io->request + 0), + * (unsigned char *) ((unsigned long) sg_io->request + 1), + * (unsigned char *) ((unsigned long) sg_io->request + 2), + sg_io->request_tag, + sg_io->request_attr, + sg_io->request_priority, + sg_io->request_extra, + sg_io->max_response_len, + sg_io->dout_iovec_count, + sg_io->dout_xfer_len, + sg_io->din_iovec_count, + sg_io->din_xfer_len, + * (unsigned char *) (iov[0].iov_base + 0), + * (unsigned char *) (iov[0].iov_base + 1), + (unsigned int) iov[0].iov_len, + * (unsigned char *) (iov[1].iov_base + 0), + * (unsigned char *) (iov[1].iov_base + 1), + * (unsigned char *) (iov[1].iov_base + 2), + (unsigned int) iov[1].iov_len, + sg_io->timeout, + sg_io->usr_ptr, + sg_io->response_len, + * (unsigned char *) ((unsigned long) sg_io->response + 0), + * (unsigned char *) ((unsigned long) sg_io->response + 1), + * (unsigned char *) ((unsigned long) sg_io->din_xferp + 0), + * (unsigned char *) ((unsigned long) sg_io->din_xferp + 1), + * (unsigned char *) ((unsigned long) sg_io->din_xferp + 2), + * (unsigned char *) ((unsigned long) sg_io->din_xferp + 3), + sg_io->driver_status, + sg_io->transport_status, + sg_io->device_status, + sg_io->retry_delay, + sg_io->duration, + sg_io->response_len, + sg_io->din_resid, + sg_io->dout_resid, + sg_io->generated_tag); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_BSG_H") + +#endif diff --git a/tests-mx32/ioctl_sg_io_v4.test b/tests-mx32/ioctl_sg_io_v4.test new file mode 100755 index 000000000..255672247 --- /dev/null +++ b/tests-mx32/ioctl_sg_io_v4.test @@ -0,0 +1,4 @@ +#!/bin/sh + +# Check decoding of ioctl SG_IO v4 commands. +. "${srcdir=.}/ioctl.test" diff --git a/tests-mx32/ioctl_sock_gifconf.c b/tests-mx32/ioctl_sock_gifconf.c new file mode 100644 index 000000000..ae0bea4f8 --- /dev/null +++ b/tests-mx32/ioctl_sock_gifconf.c @@ -0,0 +1,182 @@ +/* + * Check decoding of SIOCGIFCONF command of ioctl syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +#include +#include +#include +#include + +#define MAX_STRLEN 1 + +static void +print_ifc_len(int val) +{ + if (val % (int) sizeof(struct ifreq)) + printf("%d", val); + else + printf("%d * sizeof(struct ifreq)", + val / (int) sizeof(struct ifreq)); +} + +static void +print_ifconf(struct ifconf *ifc, int in_len, char *in_buf, long rc) +{ + if (in_buf) { + printf("{ifc_len="); + print_ifc_len(in_len); + + if (in_len != ifc->ifc_len) { + printf(" => "); + print_ifc_len(ifc->ifc_len); + } + } else { + printf("{ifc_len="); + print_ifc_len(ifc->ifc_len); + } + + printf(", ifc_buf="); + + if ((rc < 0) || !in_buf) { + if (in_buf) + printf("%p", in_buf); + else + printf("NULL"); + } else { + int i; + + printf("["); + for (i = 0; i < (ifc->ifc_len) && + i < (int) (MAX_STRLEN * sizeof(struct ifreq)); + i += sizeof(struct ifreq)) { + struct ifreq *ifr = (struct ifreq *) (ifc->ifc_buf + i); + struct sockaddr_in *const sa_in = + (struct sockaddr_in *) &(ifr->ifr_addr); + + if (i) + printf(", "); + printf("{ifr_name=\"%s\", ifr_addr={sa_family=AF_INET, " + "sin_port=htons(%u), sin_addr=inet_addr(\"%s\")}" + "}", ifr->ifr_name, ntohs(sa_in->sin_port), + inet_ntoa(sa_in->sin_addr)); + } + + if ((size_t) (ifc->ifc_len - i) >= sizeof(struct ifreq)) + printf(", ..."); + + printf("]"); + } + + printf("}"); +} + +static void +gifconf_ioctl(int fd, struct ifconf *ifc, bool ifc_valid) +{ + const char * errstr; + int in_len; + char *in_buf; + long rc; + + if (ifc_valid) { + in_len = ifc->ifc_len; + in_buf = ifc->ifc_buf; + } + + rc = ioctl(fd, SIOCGIFCONF, ifc); + errstr = sprintrc(rc); + + printf("ioctl(%d, SIOCGIFCONF, ", fd); + if (ifc_valid) { + print_ifconf(ifc, in_len, in_buf, rc); + } else { + if (ifc) + printf("%p", ifc); + else + printf("NULL"); + } + + printf(") = %s\n", errstr); +} + +int +main(int argc, char *argv[]) +{ + struct ifreq *ifr = tail_alloc(2 * sizeof(*ifr)); + struct ifconf *ifc = tail_alloc(sizeof(*ifc)); + + struct sockaddr_in addr; + int fd; + + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + + if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) + perror_msg_and_skip("socket AF_INET"); + + gifconf_ioctl(fd, NULL, false); + gifconf_ioctl(fd, ifc + 1, false); + + ifc->ifc_len = 3141592653U; + ifc->ifc_buf = NULL; + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 0; + ifc->ifc_buf = (char *) (ifr + 2); + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 1; + ifc->ifc_buf = (char *) (ifr + 1); + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 1 * sizeof(*ifr); + ifc->ifc_buf = (char *) (ifr + 1); + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 2 * sizeof(*ifr); + ifc->ifc_buf = (char *) (ifr + 1); + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 2 * sizeof(*ifr) + 2; + ifc->ifc_buf = (char *) ifr; + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 3 * sizeof(*ifr) + 4; + ifc->ifc_buf = (char *) ifr; + gifconf_ioctl(fd, ifc, true); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/ioctl_sock_gifconf.test b/tests-mx32/ioctl_sock_gifconf.test new file mode 100755 index 000000000..2e2fc019d --- /dev/null +++ b/tests-mx32/ioctl_sock_gifconf.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of SIOCGIFCONF ioctl. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a28 -s1 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/ioctl_uffdio.c b/tests-mx32/ioctl_uffdio.c new file mode 100644 index 000000000..10b8b843f --- /dev/null +++ b/tests-mx32/ioctl_uffdio.c @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Red Hat, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_userfaultfd && defined HAVE_LINUX_USERFAULTFD_H + +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +int +main(void) +{ + int rc; + int fd = syscall(__NR_userfaultfd, O_NONBLOCK); + size_t pagesize = getpagesize(); + + if (fd < 0) + perror_msg_and_skip("userfaultfd"); + + /* ---- API ---- */ + struct uffdio_api *api_struct = tail_alloc(sizeof(*api_struct)); + + /* With a bad fd */ + memset(api_struct, 0, sizeof(*api_struct)); + rc = ioctl(-1, UFFDIO_API, api_struct); + printf("ioctl(-1, UFFDIO_API, {api=0, features=0}) = %d %s (%m)\n", + rc, errno2name()); + /* With a bad pointer */ + rc = ioctl(fd, UFFDIO_API, NULL); + printf("ioctl(%d, UFFDIO_API, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + /* Normal call */ + api_struct->api = UFFD_API; + api_struct->features = 0; + rc = ioctl(fd, UFFDIO_API, api_struct); + printf("ioctl(%d, UFFDIO_API, {api=0xaa, features=0, " + "features.out=%#" PRIx64 ", " "ioctls=1<<_UFFDIO_REGISTER|" + "1<<_UFFDIO_UNREGISTER|1<<_UFFDIO_API", + fd, (uint64_t)api_struct->features); + api_struct->ioctls &= ~(1ull<<_UFFDIO_REGISTER| + 1ull<<_UFFDIO_UNREGISTER| + 1ull<<_UFFDIO_API); + if (api_struct->ioctls) + printf("|%#" PRIx64, (uint64_t)api_struct->ioctls); + printf("}) = %d\n", rc); + + /* For the rest of the tests we need some anonymous memory */ + void *area1 = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1, 0); + if (area1 == MAP_FAILED) + perror_msg_and_fail("mmap area1"); + void *area2 = mmap(NULL, pagesize, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1, 0); + if (area2 == MAP_FAILED) + perror_msg_and_fail("mmap area2"); + madvise(area2, pagesize, MADV_DONTNEED); + *(char *)area1 = 42; + + /* ---- REGISTER ---- */ + struct uffdio_register *register_struct = + tail_alloc(sizeof(*register_struct)); + memset(register_struct, 0, sizeof(*register_struct)); + + rc = ioctl(-1, UFFDIO_REGISTER, register_struct); + printf("ioctl(-1, UFFDIO_REGISTER, {range={start=0, len=0}, " + "mode=0}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_REGISTER, NULL); + printf("ioctl(%d, UFFDIO_REGISTER, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + register_struct->range.start = (uint64_t)(uintptr_t)area2; + register_struct->range.len = pagesize; + register_struct->mode = UFFDIO_REGISTER_MODE_MISSING; + rc = ioctl(fd, UFFDIO_REGISTER, register_struct); + printf("ioctl(%d, UFFDIO_REGISTER, {range={start=%p, len=%#zx}, " + "mode=UFFDIO_REGISTER_MODE_MISSING, ioctls=" + "1<<_UFFDIO_WAKE|1<<_UFFDIO_COPY|1<<_UFFDIO_ZEROPAGE", + fd, area2, pagesize); + register_struct->ioctls &= ~(1ull<<_UFFDIO_WAKE| + 1ull<<_UFFDIO_COPY| + 1ull<<_UFFDIO_ZEROPAGE); + if (register_struct->ioctls) + printf("|%#" PRIx64, (uint64_t)register_struct->ioctls); + printf("}) = %d\n", rc); + + /* With area2 registered we can now do the atomic copies onto it + * but be careful not to access it in any other way otherwise + * userfaultfd will cause us to stall. + */ + /* ---- COPY ---- */ + struct uffdio_copy *copy_struct = tail_alloc(sizeof(*copy_struct)); + + memset(copy_struct, 0, sizeof(*copy_struct)); + rc = ioctl(-1, UFFDIO_COPY, copy_struct); + printf("ioctl(-1, UFFDIO_COPY, {dst=0, src=0, len=0, mode=0" + "}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_COPY, NULL); + printf("ioctl(%d, UFFDIO_COPY, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + copy_struct->dst = (uint64_t)(uintptr_t)area2; + copy_struct->src = (uint64_t)(uintptr_t)area1; + copy_struct->len = pagesize; + copy_struct->mode = UFFDIO_COPY_MODE_DONTWAKE; + rc = ioctl(fd, UFFDIO_COPY, copy_struct); + printf("ioctl(%d, UFFDIO_COPY, {dst=%p, src=%p, len=%#zx," + " mode=UFFDIO_COPY_MODE_DONTWAKE, copy=%#zx}) = %d\n", + fd, area2, area1, pagesize, pagesize, rc); + + /* ---- ZEROPAGE ---- */ + struct uffdio_zeropage *zero_struct = tail_alloc(sizeof(*zero_struct)); + madvise(area2, pagesize, MADV_DONTNEED); + + memset(zero_struct, 0, sizeof(*zero_struct)); + rc = ioctl(-1, UFFDIO_ZEROPAGE, zero_struct); + printf("ioctl(-1, UFFDIO_ZEROPAGE, {range={start=0, len=0}, mode=0" + "}) = %d %s (%m)\n", rc, errno2name()); + + rc = ioctl(fd, UFFDIO_ZEROPAGE, NULL); + printf("ioctl(%d, UFFDIO_ZEROPAGE, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + zero_struct->range.start = (uint64_t)(uintptr_t)area2; + zero_struct->range.len = pagesize; + zero_struct->mode = UFFDIO_ZEROPAGE_MODE_DONTWAKE; + rc = ioctl(fd, UFFDIO_ZEROPAGE, zero_struct); + printf("ioctl(%d, UFFDIO_ZEROPAGE, {range={start=%p, len=%#zx}," + " mode=UFFDIO_ZEROPAGE_MODE_DONTWAKE, zeropage=%#zx}) = %d\n", + fd, area2, pagesize, pagesize, rc); + + /* ---- WAKE ---- */ + struct uffdio_range *range_struct = tail_alloc(sizeof(*range_struct)); + memset(range_struct, 0, sizeof(*range_struct)); + + rc = ioctl(-1, UFFDIO_WAKE, range_struct); + printf("ioctl(-1, UFFDIO_WAKE, {start=0, len=0}) = %d %s (%m)\n", + rc, errno2name()); + + rc = ioctl(fd, UFFDIO_WAKE, NULL); + printf("ioctl(%d, UFFDIO_WAKE, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + range_struct->start = (uint64_t)(uintptr_t)area2; + range_struct->len = pagesize; + rc = ioctl(fd, UFFDIO_WAKE, range_struct); + printf("ioctl(%d, UFFDIO_WAKE, {start=%p, len=%#zx}) = %d\n", + fd, area2, pagesize, rc); + + /* ---- UNREGISTER ---- */ + memset(range_struct, 0, sizeof(*range_struct)); + + rc = ioctl(-1, UFFDIO_UNREGISTER, range_struct); + printf("ioctl(-1, UFFDIO_UNREGISTER, {start=0, len=0}) = %d %s (%m)\n", + rc, errno2name()); + + rc = ioctl(fd, UFFDIO_UNREGISTER, NULL); + printf("ioctl(%d, UFFDIO_UNREGISTER, NULL) = %d %s (%m)\n", + fd, rc, errno2name()); + + range_struct->start = (uint64_t)(uintptr_t)area2; + range_struct->len = pagesize; + rc = ioctl(fd, UFFDIO_UNREGISTER, range_struct); + printf("ioctl(%d, UFFDIO_UNREGISTER, {start=%p, len=%#zx}) = %d\n", + fd, area2, pagesize, rc); + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_userfaultfd && HAVE_LINUX_USERFAULTFD_H") + +#endif diff --git a/tests-mx32/ioctl_uffdio.test b/tests-mx32/ioctl_uffdio.test new file mode 100755 index 000000000..fae9b5567 --- /dev/null +++ b/tests-mx32/ioctl_uffdio.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check userfaultfd ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-mx32/ioctl_v4l2.c b/tests-mx32/ioctl_v4l2.c new file mode 100644 index 000000000..af8c3419a --- /dev/null +++ b/tests-mx32/ioctl_v4l2.c @@ -0,0 +1,551 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#if WORDS_BIGENDIAN +# define cc0(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 24)) +# define cc1(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 16)) +# define cc2(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 8)) +# define cc3(arg) ((unsigned int) (unsigned char) (arg)) +# define fourcc(a0, a1, a2, a3) \ + ((unsigned int)(a3) | \ + ((unsigned int)(a2) << 8) | \ + ((unsigned int)(a1) << 16) | \ + ((unsigned int)(a0) << 24)) +#else +# define cc0(arg) ((unsigned int) (unsigned char) (arg)) +# define cc1(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 8)) +# define cc2(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 16)) +# define cc3(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 24)) +# define fourcc(a0, a1, a2, a3) \ + ((unsigned int)(a0) | \ + ((unsigned int)(a1) << 8) | \ + ((unsigned int)(a2) << 16) | \ + ((unsigned int)(a3) << 24)) +#endif + +static const unsigned int magic = 0xdeadbeef; + +int +main(void ) +{ + const unsigned int size = get_page_size(); + void *const page = tail_alloc(size); + fill_memory(page, size); + + unsigned char cc[sizeof(int)] = { 'A', '\'', '\\', '\xfa' }; + + /* VIDIOC_QUERYCAP */ + ioctl(-1, VIDIOC_QUERYCAP, 0); + printf("ioctl(-1, VIDIOC_QUERYCAP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QUERYCAP, page); + printf("ioctl(-1, VIDIOC_QUERYCAP, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_ENUM_FMT */ + ioctl(-1, VIDIOC_ENUM_FMT, 0); + printf("ioctl(-1, VIDIOC_ENUM_FMT, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_fmtdesc *const p_fmtdesc = tail_alloc(sizeof(*p_fmtdesc)); + p_fmtdesc->index = magic; + p_fmtdesc->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + ioctl(-1, VIDIOC_ENUM_FMT, p_fmtdesc); + printf("ioctl(-1, VIDIOC_ENUM_FMT, {index=%u" + ", type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EBADF (%m)\n", + p_fmtdesc->index); + + /* VIDIOC_G_FMT */ + ioctl(-1, VIDIOC_G_FMT, 0); + printf("ioctl(-1, VIDIOC_G_FMT, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_format *const p_format = tail_alloc(sizeof(*p_format)); + p_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + + ioctl(-1, VIDIOC_G_FMT, p_format); + printf("ioctl(-1, VIDIOC_G_FMT" + ", {type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EBADF (%m)\n"); + + /* VIDIOC_S_FMT */ + ioctl(-1, VIDIOC_S_FMT, 0); + printf("ioctl(-1, VIDIOC_S_FMT, NULL) = -1 EBADF (%m)\n"); + + p_format->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; + p_format->fmt.pix.width = 0xdad1beaf; + p_format->fmt.pix.height = 0xdad2beaf; + p_format->fmt.pix.pixelformat = magic; + p_format->fmt.pix.field = V4L2_FIELD_NONE; + p_format->fmt.pix.bytesperline = 0xdad3beaf; + p_format->fmt.pix.sizeimage = 0xdad4beaf; + p_format->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG; + + ioctl(-1, VIDIOC_S_FMT, p_format); + printf("ioctl(-1, VIDIOC_S_FMT, {type=V4L2_BUF_TYPE_VIDEO_OUTPUT" + ", fmt.pix={width=%u, height=%u, pixelformat=" + "v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", field=V4L2_FIELD_NONE, bytesperline=%u, sizeimage=%u" + ", colorspace=V4L2_COLORSPACE_JPEG}}) = -1 EBADF (%m)\n", + p_format->fmt.pix.width, p_format->fmt.pix.height, + cc0(magic), cc1(magic), cc2(magic), cc3(magic), + p_format->fmt.pix.bytesperline, p_format->fmt.pix.sizeimage); + + /* VIDIOC_TRY_FMT */ + ioctl(-1, VIDIOC_TRY_FMT, 0); + printf("ioctl(-1, VIDIOC_TRY_FMT, NULL) = -1 EBADF (%m)\n"); + +#if HAVE_DECL_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE + memset(p_format, -1, sizeof(*p_format)); + p_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; + p_format->fmt.pix_mp.width = 0xdad1beaf; + p_format->fmt.pix_mp.height = 0xdad2beaf; + p_format->fmt.pix_mp.pixelformat = magic; + p_format->fmt.pix_mp.field = V4L2_FIELD_NONE; + p_format->fmt.pix_mp.colorspace = V4L2_COLORSPACE_JPEG; + unsigned int i; + for (i = 0; i < ARRAY_SIZE(p_format->fmt.pix_mp.plane_fmt); ++i) { + p_format->fmt.pix_mp.plane_fmt[i].sizeimage = 0xbadc0de0 | i; + p_format->fmt.pix_mp.plane_fmt[i].bytesperline = 0xdadbeaf0 | i; + } + ioctl(-1, VIDIOC_TRY_FMT, p_format); + printf("ioctl(-1, VIDIOC_TRY_FMT" + ", {type=V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE" + ", fmt.pix_mp={width=%u, height=%u, pixelformat=" + "v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", field=V4L2_FIELD_NONE, colorspace=V4L2_COLORSPACE_JPEG" + ", plane_fmt=[", + p_format->fmt.pix_mp.width, p_format->fmt.pix_mp.height, + cc0(magic), cc1(magic), cc2(magic), cc3(magic)); + for (i = 0; i < ARRAY_SIZE(p_format->fmt.pix_mp.plane_fmt); ++i) { + if (i) + printf(", "); + printf("{sizeimage=%u, bytesperline=%u}", + p_format->fmt.pix_mp.plane_fmt[i].sizeimage, + p_format->fmt.pix_mp.plane_fmt[i].bytesperline); + } + printf("], num_planes=%u}}) = -1 EBADF (%m)\n", + p_format->fmt.pix_mp.num_planes); +#else + struct v4l2_format *const p_v4l2_format = + page + size - sizeof(*p_v4l2_format); + ioctl(-1, VIDIOC_TRY_FMT, p_v4l2_format); + printf("ioctl(-1, VIDIOC_TRY_FMT, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_format->type); +#endif + + /* VIDIOC_REQBUFS */ + ioctl(-1, VIDIOC_REQBUFS, 0); + printf("ioctl(-1, VIDIOC_REQBUFS, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_requestbuffers *const p_v4l2_requestbuffers = + page + size - sizeof(*p_v4l2_requestbuffers); + ioctl(-1, VIDIOC_REQBUFS, p_v4l2_requestbuffers); + printf("ioctl(-1, VIDIOC_REQBUFS, {count=%u, type=%#x" + " /* V4L2_BUF_TYPE_??? */, memory=%#x /* V4L2_MEMORY_??? */})" + " = -1 EBADF (%m)\n", + p_v4l2_requestbuffers->count, + p_v4l2_requestbuffers->type, + p_v4l2_requestbuffers->memory); + + /* VIDIOC_QUERYBUF */ + ioctl(-1, VIDIOC_QUERYBUF, 0); + printf("ioctl(-1, VIDIOC_QUERYBUF, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_buffer *const p_v4l2_buffer = + page + size - sizeof(*p_v4l2_buffer); + ioctl(-1, VIDIOC_QUERYBUF, p_v4l2_buffer); + printf("ioctl(-1, VIDIOC_QUERYBUF, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", index=%u}) = -1 EBADF (%m)\n", + p_v4l2_buffer->type, p_v4l2_buffer->index); + + /* VIDIOC_QBUF */ + ioctl(-1, VIDIOC_QBUF, 0); + printf("ioctl(-1, VIDIOC_QBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_QBUF, p_v4l2_buffer); + printf("ioctl(-1, VIDIOC_QBUF, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", index=%u}) = -1 EBADF (%m)\n", + p_v4l2_buffer->type, p_v4l2_buffer->index); + + /* VIDIOC_DQBUF */ + ioctl(-1, VIDIOC_DQBUF, 0); + printf("ioctl(-1, VIDIOC_DQBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_DQBUF, p_v4l2_buffer); + printf("ioctl(-1, VIDIOC_DQBUF, {type=%#x" + " /* V4L2_BUF_TYPE_??? */}) = -1 EBADF (%m)\n", + p_v4l2_buffer->type); + + /* VIDIOC_G_FBUF */ + ioctl(-1, VIDIOC_G_FBUF, 0); + printf("ioctl(-1, VIDIOC_G_FBUF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_FBUF, page); + printf("ioctl(-1, VIDIOC_G_FBUF, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_FBUF */ + ioctl(-1, VIDIOC_S_FBUF, 0); + printf("ioctl(-1, VIDIOC_S_FBUF, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_framebuffer *const p_v4l2_framebuffer = + page + size - sizeof(*p_v4l2_framebuffer); + ioctl(-1, VIDIOC_S_FBUF, p_v4l2_framebuffer); + printf("ioctl(-1, VIDIOC_S_FBUF, {capability=%#x" + ", flags=%#x, base=%p}) = -1 EBADF (%m)\n", + p_v4l2_framebuffer->capability, + p_v4l2_framebuffer->flags, + p_v4l2_framebuffer->base); + + /* VIDIOC_STREAMON */ + ioctl(-1, VIDIOC_STREAMON, 0); + printf("ioctl(-1, VIDIOC_STREAMON, NULL) = -1 EBADF (%m)\n"); + + int *const p_int = page + size - sizeof(int); + ioctl(-1, VIDIOC_STREAMON, p_int); + printf("ioctl(-1, VIDIOC_STREAMON, [%#x /* V4L2_BUF_TYPE_??? */])" + " = -1 EBADF (%m)\n", *p_int); + + /* VIDIOC_STREAMOFF */ + ioctl(-1, VIDIOC_STREAMOFF, 0); + printf("ioctl(-1, VIDIOC_STREAMOFF, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_STREAMOFF, p_int); + printf("ioctl(-1, VIDIOC_STREAMOFF, [%#x /* V4L2_BUF_TYPE_??? */])" + " = -1 EBADF (%m)\n", *p_int); + + /* VIDIOC_G_PARM */ + ioctl(-1, VIDIOC_G_PARM, 0); + printf("ioctl(-1, VIDIOC_G_PARM, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_streamparm *const p_v4l2_streamparm = + page + size - sizeof(*p_v4l2_streamparm); + ioctl(-1, VIDIOC_G_PARM, p_v4l2_streamparm); + printf("ioctl(-1, VIDIOC_G_PARM, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_streamparm->type); + + /* VIDIOC_S_PARM */ + ioctl(-1, VIDIOC_S_PARM, 0); + printf("ioctl(-1, VIDIOC_S_PARM, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_PARM, p_v4l2_streamparm); + printf("ioctl(-1, VIDIOC_S_PARM, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_streamparm->type); + + struct v4l2_streamparm *const p_streamparm = + tail_alloc(sizeof(*p_streamparm)); + p_streamparm->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + p_streamparm->parm.capture.capability = V4L2_CAP_TIMEPERFRAME; + p_streamparm->parm.capture.capturemode = V4L2_MODE_HIGHQUALITY; + p_streamparm->parm.capture.timeperframe.numerator = 0xdeadbeef; + p_streamparm->parm.capture.timeperframe.denominator = 0xbadc0ded; + ioctl(-1, VIDIOC_S_PARM, p_streamparm); + printf("ioctl(-1, VIDIOC_S_PARM, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE" + ", parm.capture={capability=V4L2_CAP_TIMEPERFRAME" + ", capturemode=V4L2_MODE_HIGHQUALITY, timeperframe=%u/%u" + ", extendedmode=%u, readbuffers=%u}}) = -1 EBADF (%m)\n", + p_streamparm->parm.capture.timeperframe.numerator, + p_streamparm->parm.capture.timeperframe.denominator, -1U, -1U); + + p_streamparm->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; + p_streamparm->parm.output.outputmode = 0; + ioctl(-1, VIDIOC_S_PARM, p_streamparm); + printf("ioctl(-1, VIDIOC_S_PARM, {type=V4L2_BUF_TYPE_VIDEO_OUTPUT" + ", parm.output={capability=V4L2_CAP_TIMEPERFRAME" + ", outputmode=0, timeperframe=%u/%u" + ", extendedmode=%u, writebuffers=%u}}) = -1 EBADF (%m)\n", + p_streamparm->parm.output.timeperframe.numerator, + p_streamparm->parm.output.timeperframe.denominator, -1U, -1U); + + /* VIDIOC_G_STD */ + ioctl(-1, VIDIOC_G_STD, 0); + printf("ioctl(-1, VIDIOC_G_STD, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_STD, page); + printf("ioctl(-1, VIDIOC_G_STD, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_STD */ + ioctl(-1, VIDIOC_S_STD, 0); + printf("ioctl(-1, VIDIOC_S_STD, NULL) = -1 EBADF (%m)\n"); + + long long *const p_longlong = page + size - sizeof(*p_longlong); + ioctl(-1, VIDIOC_S_STD, p_longlong); + printf("ioctl(-1, VIDIOC_S_STD, [%#llx]) = -1 EBADF (%m)\n", + *p_longlong); + + /* VIDIOC_ENUMSTD */ + ioctl(-1, VIDIOC_ENUMSTD, 0); + printf("ioctl(-1, VIDIOC_ENUMSTD, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_standard *const p_v4l2_standard = + page + size - sizeof(*p_v4l2_standard); + ioctl(-1, VIDIOC_ENUMSTD, p_v4l2_standard); + printf("ioctl(-1, VIDIOC_ENUMSTD, {index=%u}) = -1 EBADF (%m)\n", + p_v4l2_standard->index); + + /* VIDIOC_ENUMINPUT */ + ioctl(-1, VIDIOC_ENUMINPUT, 0); + printf("ioctl(-1, VIDIOC_ENUMINPUT, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_input *const p_v4l2_input = + page + size - sizeof(*p_v4l2_input); + ioctl(-1, VIDIOC_ENUMINPUT, p_v4l2_input); + printf("ioctl(-1, VIDIOC_ENUMINPUT, {index=%u}) = -1 EBADF (%m)\n", + p_v4l2_input->index); + + /* VIDIOC_G_CTRL */ + ioctl(-1, VIDIOC_G_CTRL, 0); + printf("ioctl(-1, VIDIOC_G_CTRL, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_control *const p_v4l2_control = + page + size - sizeof(*p_v4l2_control); + ioctl(-1, VIDIOC_G_CTRL, p_v4l2_control); + printf("ioctl(-1, VIDIOC_G_CTRL, {id=%#x /* V4L2_CID_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_control->id); + + /* VIDIOC_S_CTRL */ + ioctl(-1, VIDIOC_S_CTRL, 0); + printf("ioctl(-1, VIDIOC_S_CTRL, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_CTRL, p_v4l2_control); + printf("ioctl(-1, VIDIOC_S_CTRL, {id=%#x /* V4L2_CID_??? */" + ", value=%d}) = -1 EBADF (%m)\n", + p_v4l2_control->id, p_v4l2_control->value); + + /* VIDIOC_QUERYCTRL */ + ioctl(-1, VIDIOC_QUERYCTRL, 0); + printf("ioctl(-1, VIDIOC_QUERYCTRL, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_queryctrl *const p_v4l2_queryctrl = + page + size - sizeof(*p_v4l2_queryctrl); + ioctl(-1, VIDIOC_QUERYCTRL, p_v4l2_queryctrl); +# ifdef V4L2_CTRL_FLAG_NEXT_CTRL + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=V4L2_CTRL_FLAG_NEXT_CTRL" + "|%#x /* V4L2_CID_??? */}) = -1 EBADF (%m)\n", + p_v4l2_queryctrl->id & ~V4L2_CTRL_FLAG_NEXT_CTRL); +# else + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=%#x /* V4L2_CID_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_queryctrl->id); +# endif + + struct v4l2_queryctrl *const p_queryctrl = + tail_alloc(sizeof(*p_queryctrl)); + p_queryctrl->id = V4L2_CID_SATURATION; + ioctl(-1, VIDIOC_QUERYCTRL, p_queryctrl); + printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=V4L2_CID_SATURATION})" + " = -1 EBADF (%m)\n"); + + /* VIDIOC_G_INPUT */ + ioctl(-1, VIDIOC_G_INPUT, 0); + printf("ioctl(-1, VIDIOC_G_INPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_INPUT, page); + printf("ioctl(-1, VIDIOC_G_INPUT, %p) = -1 EBADF (%m)\n", page); + + /* VIDIOC_S_INPUT */ + ioctl(-1, VIDIOC_S_INPUT, 0); + printf("ioctl(-1, VIDIOC_S_INPUT, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_INPUT, p_int); + printf("ioctl(-1, VIDIOC_S_INPUT, [%u]) = -1 EBADF (%m)\n", *p_int); + + /* VIDIOC_CROPCAP */ + ioctl(-1, VIDIOC_CROPCAP, 0); + printf("ioctl(-1, VIDIOC_CROPCAP, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_cropcap *const p_v4l2_cropcap = + page + size - sizeof(*p_v4l2_cropcap); + ioctl(-1, VIDIOC_CROPCAP, p_v4l2_cropcap); + printf("ioctl(-1, VIDIOC_CROPCAP, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_cropcap->type); + + /* VIDIOC_G_CROP */ + ioctl(-1, VIDIOC_G_CROP, 0); + printf("ioctl(-1, VIDIOC_G_CROP, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_crop *const p_v4l2_crop = + page + size - sizeof(*p_v4l2_crop); + ioctl(-1, VIDIOC_G_CROP, p_v4l2_crop); + printf("ioctl(-1, VIDIOC_G_CROP, {type=%#x /* V4L2_BUF_TYPE_??? */})" + " = -1 EBADF (%m)\n", p_v4l2_crop->type); + + /* VIDIOC_S_CROP */ + ioctl(-1, VIDIOC_S_CROP, 0); + printf("ioctl(-1, VIDIOC_S_CROP, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_S_CROP, p_v4l2_crop); + printf("ioctl(-1, VIDIOC_S_CROP, {type=%#x /* V4L2_BUF_TYPE_??? */" + ", c={left=%d, top=%d, width=%u, height=%u}}) = -1 EBADF (%m)\n", + p_v4l2_crop->type, + p_v4l2_crop->c.left, + p_v4l2_crop->c.top, + p_v4l2_crop->c.width, + p_v4l2_crop->c.height); + +#ifdef VIDIOC_S_EXT_CTRLS + /* VIDIOC_S_EXT_CTRLS */ + ioctl(-1, VIDIOC_S_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_ext_controls *const p_ext_controls = + tail_alloc(sizeof(*p_ext_controls)); + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_USER; + p_ext_controls->count = 0; + p_ext_controls->controls = (void *) -2UL; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, {ctrl_class=V4L2_CTRL_CLASS_USER" + ", count=%u}) = -1 EBADF (%m)\n", p_ext_controls->count); + + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_MPEG; + p_ext_controls->count = magic; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS, {ctrl_class=V4L2_CTRL_CLASS_MPEG" + ", count=%u, controls=%p}) = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls); + +# if HAVE_DECL_V4L2_CTRL_TYPE_STRING + p_ext_controls->count = 2; + p_ext_controls->controls = + tail_alloc(sizeof(*p_ext_controls->controls) * p_ext_controls->count); + p_ext_controls->controls[0].id = V4L2_CID_BRIGHTNESS; + p_ext_controls->controls[0].size = 0; + p_ext_controls->controls[0].value64 = 0xfacefeeddeadbeefULL; + p_ext_controls->controls[1].id = V4L2_CID_CONTRAST; + p_ext_controls->controls[1].size = 2; + p_ext_controls->controls[1].string = + tail_alloc(p_ext_controls->controls[1].size); + + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_MPEG, count=%u, controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + "] => controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + "], error_idx=%u}) = -1 EBADF (%m)\n", + p_ext_controls->count, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->error_idx); + + ++p_ext_controls->count; + ioctl(-1, VIDIOC_S_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_S_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_MPEG, count=%u, controls=" + "[{id=V4L2_CID_BRIGHTNESS, size=0, value=%d, value64=%lld}" + ", {id=V4L2_CID_CONTRAST, size=2, string=\"\\377\\377\"}" + ", %p]}) = -1 EBADF (%m)\n", + p_ext_controls->count, + p_ext_controls->controls[0].value, + (long long) p_ext_controls->controls[0].value64, + p_ext_controls->controls + 2); +# endif /* HAVE_DECL_V4L2_CTRL_TYPE_STRING */ + + /* VIDIOC_TRY_EXT_CTRLS */ + ioctl(-1, VIDIOC_TRY_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_TRY_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + p_ext_controls->ctrl_class = V4L2_CTRL_CLASS_USER; + p_ext_controls->count = magic; + p_ext_controls->controls = (void *) -2UL; + ioctl(-1, VIDIOC_TRY_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_TRY_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_USER, count=%u, controls=%p})" + " = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls); + + /* VIDIOC_G_EXT_CTRLS */ + ioctl(-1, VIDIOC_G_EXT_CTRLS, 0); + printf("ioctl(-1, VIDIOC_G_EXT_CTRLS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, VIDIOC_G_EXT_CTRLS, p_ext_controls); + printf("ioctl(-1, VIDIOC_G_EXT_CTRLS" + ", {ctrl_class=V4L2_CTRL_CLASS_USER, count=%u, controls=%p" + ", error_idx=%u}) = -1 EBADF (%m)\n", + p_ext_controls->count, p_ext_controls->controls, + p_ext_controls->error_idx); +#endif /* VIDIOC_S_EXT_CTRLS */ + +#ifdef VIDIOC_ENUM_FRAMESIZES + ioctl(-1, VIDIOC_ENUM_FRAMESIZES, 0); + printf("ioctl(-1, VIDIOC_ENUM_FRAMESIZES, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_frmsizeenum *const p_frmsizeenum = + tail_alloc(sizeof(*p_frmsizeenum)); + p_frmsizeenum->index = magic; + p_frmsizeenum->pixel_format = fourcc(cc[0], cc[1], cc[2], cc[3]); + + ioctl(-1, VIDIOC_ENUM_FRAMESIZES, p_frmsizeenum); + printf("ioctl(-1, VIDIOC_ENUM_FRAMESIZES, {index=%u" + ", pixel_format=v4l2_fourcc('%c', '\\%c', '\\%c', '\\x%x')})" + " = -1 EBADF (%m)\n", p_frmsizeenum->index, + cc[0], cc[1], cc[2], cc[3]); +#endif /* VIDIOC_ENUM_FRAMESIZES */ + +#ifdef VIDIOC_ENUM_FRAMEINTERVALS + ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, 0); + printf("ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_frmivalenum *const p_v4l2_frmivalenum = + page + size - sizeof(*p_v4l2_frmivalenum); + ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, p_v4l2_frmivalenum); + printf("ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, {index=%u" + ", pixel_format=v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" + ", width=%u, height=%u}) = -1 EBADF (%m)\n", + p_v4l2_frmivalenum->index, + cc0(p_v4l2_frmivalenum->pixel_format), + cc1(p_v4l2_frmivalenum->pixel_format), + cc2(p_v4l2_frmivalenum->pixel_format), + cc3(p_v4l2_frmivalenum->pixel_format), + p_v4l2_frmivalenum->width, + p_v4l2_frmivalenum->height); +#endif /* VIDIOC_ENUM_FRAMEINTERVALS */ + +#ifdef VIDIOC_CREATE_BUFS + ioctl(-1, VIDIOC_CREATE_BUFS, 0); + printf("ioctl(-1, VIDIOC_CREATE_BUFS, NULL) = -1 EBADF (%m)\n"); + + struct v4l2_create_buffers *const p_v4l2_create_buffers = + page + size - sizeof(*p_v4l2_create_buffers); + ioctl(-1, VIDIOC_CREATE_BUFS, p_v4l2_create_buffers); + printf("ioctl(-1, VIDIOC_CREATE_BUFS, {count=%u, memory=%#x" + " /* V4L2_MEMORY_??? */, format={type=%#x" + " /* V4L2_BUF_TYPE_??? */}}) = -1 EBADF (%m)\n", + p_v4l2_create_buffers->count, + p_v4l2_create_buffers->memory, + p_v4l2_create_buffers->format.type); +#endif /* VIDIOC_CREATE_BUFS */ + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/ioctl_v4l2.test b/tests-mx32/ioctl_v4l2.test new file mode 100755 index 000000000..a092a3cd9 --- /dev/null +++ b/tests-mx32/ioctl_v4l2.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check basic VIDIOC_* ioctl decoding. + +. "${srcdir=.}/ioctl.test" diff --git a/tests-mx32/ioperm.c b/tests-mx32/ioperm.c new file mode 100644 index 000000000..2f02b5234 --- /dev/null +++ b/tests-mx32/ioperm.c @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_ioperm + +# include +# include + +int +main(void) +{ + const unsigned long port = (unsigned long) 0xdeafbeefffffffffULL; + + long rc = syscall(__NR_ioperm, port, 1, 0); + printf("ioperm(%#lx, %#lx, %d) = %ld %s (%m)\n", + port, 1UL, 0, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ioperm") + +#endif diff --git a/tests-mx32/ioperm.test b/tests-mx32/ioperm.test new file mode 100755 index 000000000..8c1c1cc7d --- /dev/null +++ b/tests-mx32/ioperm.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check ioperm syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-mx32/iopl.c b/tests-mx32/iopl.c new file mode 100644 index 000000000..14ec29e30 --- /dev/null +++ b/tests-mx32/iopl.c @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_iopl + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_iopl, 4); + printf("iopl(4) = %ld %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_iopl") + +#endif diff --git a/tests-mx32/iopl.test b/tests-mx32/iopl.test new file mode 100755 index 000000000..d0b5b113b --- /dev/null +++ b/tests-mx32/iopl.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check iopl syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 diff --git a/tests-mx32/ioprio.c b/tests-mx32/ioprio.c new file mode 100644 index 000000000..44ace6c3e --- /dev/null +++ b/tests-mx32/ioprio.c @@ -0,0 +1,102 @@ +/* + * Check decoding of ioprio_get and ioprio_set syscalls. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_ioprio_get) && defined(__NR_ioprio_set) + +# include +# include + +enum { + IOPRIO_CLASS_NONE, + IOPRIO_CLASS_RT, + IOPRIO_CLASS_BE, + IOPRIO_CLASS_IDLE +}; + +# include "xlat.h" +# include "xlat/ioprio_class.h" + +void +print_ioprio(unsigned long val) +{ + printf(" (IOPRIO_PRIO_VALUE("); + printxval(ioprio_class, val >> 13, "IOPRIO_CLASS_???"); + printf(", %d))", (int) (val & 0x1fff)); +} + +int +main(void) +{ + static const kernel_ulong_t bogus_which = + (kernel_ulong_t) 0xdeadfacefa57beefULL; + static const kernel_ulong_t bogus_who = + (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + static const kernel_ulong_t bogus_ioprio = + (kernel_ulong_t) 0xdec0ded1facefeedULL; + static const char * const bogus_ioprio_str = + "IOPRIO_PRIO_VALUE(0x7d677 /* IOPRIO_CLASS_??? */, 7917)"; + + long rc; + + rc = syscall(__NR_ioprio_get, bogus_which, bogus_who); + printf("ioprio_get(%#x /* IOPRIO_WHO_??? */, %d) = %s\n", + (int) bogus_which, (int) bogus_who, sprintrc(rc)); + + rc = syscall(__NR_ioprio_get, 1, 0); + printf("ioprio_get(IOPRIO_WHO_PROCESS, 0) = %s", sprintrc(rc)); + + if (rc >= -1) + print_ioprio(rc); + + puts(""); + + rc = syscall(__NR_ioprio_set, 2, 0, 8191); + printf("ioprio_set(IOPRIO_WHO_PGRP, 0, " + "IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 8191)) = %s\n", + sprintrc(rc)); + + rc = syscall(__NR_ioprio_set, bogus_which, bogus_who, bogus_ioprio); + printf("ioprio_set(%#x /* IOPRIO_WHO_??? */, %d, %s) = %s\n", + (int) bogus_which, (int) bogus_who, bogus_ioprio_str, + sprintrc(rc)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ioprio_get && __NR_ioprio_set"); + +#endif diff --git a/tests-mx32/ioprio.test b/tests-mx32/ioprio.test new file mode 100755 index 000000000..e79310b3a --- /dev/null +++ b/tests-mx32/ioprio.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check iprio_get and iprio_set syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 -e trace=ioprio_get,ioprio_set diff --git a/tests-mx32/ip_mreq.c b/tests-mx32/ip_mreq.c new file mode 100644 index 000000000..fa0c504b4 --- /dev/null +++ b/tests-mx32/ip_mreq.c @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined IP_ADD_MEMBERSHIP && defined IPV6_ADD_MEMBERSHIP \ + && defined IPV6_JOIN_ANYCAST && defined HAVE_IF_INDEXTONAME + +# include +# include +# include +# include +# include + +int +main(void) +{ + static const char multi4addr[] = "224.0.0.3"; + static const char multi6addr[] = "ff01::c"; + static const char interface[] = "127.0.0.1"; + + struct ip_mreq *const m4 = tail_alloc(sizeof(*m4)); + struct ipv6_mreq *const m6 = tail_alloc(sizeof(*m6)); + unsigned int i; + int rc; + + inet_pton(AF_INET, multi4addr, &m4->imr_multiaddr); + inet_pton(AF_INET, interface, &m4->imr_interface); + inet_pton(AF_INET6, multi6addr, &m6->ipv6mr_multiaddr); + + m6->ipv6mr_interface = if_nametoindex("lo"); + if (!m6->ipv6mr_interface) + perror_msg_and_skip("lo"); + + (void) close(0); + if (socket(AF_INET, SOCK_DGRAM, 0)) + perror_msg_and_skip("socket"); + + struct { + int level; + const char *str_level; + int optname; + const char *str_optname; + void *optval; + unsigned int optsize; + } short_any[] = { + { + ARG_STR(SOL_IP), ARG_STR(IP_ADD_MEMBERSHIP), + m4, sizeof(*m4) + }, + { + ARG_STR(SOL_IP), ARG_STR(IP_DROP_MEMBERSHIP), + m4, sizeof(*m4) + }, + { + ARG_STR(SOL_IPV6), ARG_STR(IPV6_ADD_MEMBERSHIP), + m6, sizeof(*m6) + }, + { + ARG_STR(SOL_IPV6), ARG_STR(IPV6_DROP_MEMBERSHIP), + m6, sizeof(*m6) + }, + { + ARG_STR(SOL_IPV6), ARG_STR(IPV6_JOIN_ANYCAST), + m6, sizeof(*m6) + }, + { + ARG_STR(SOL_IPV6), ARG_STR(IPV6_LEAVE_ANYCAST), + m6, sizeof(*m6) + } + }; + + for (i = 0; i < ARRAY_SIZE(short_any); ++i) { + rc = setsockopt(0, short_any[i].level, short_any[i].optname, + short_any[i].optval, 1); + printf("setsockopt(0, %s, %s, \"\\%hho\", 1) = %s\n", + short_any[i].str_level, short_any[i].str_optname, + * (unsigned char *) short_any[i].optval, + sprintrc(rc)); + + rc = setsockopt(0, short_any[i].level, short_any[i].optname, + short_any[i].optval + 1, short_any[i].optsize); + printf("setsockopt(0, %s, %s, %p, %u) = %s\n", + short_any[i].str_level, short_any[i].str_optname, + short_any[i].optval + 1, short_any[i].optsize, + sprintrc(rc)); + } + + struct { + int optname; + const char *str_optname; + } long_ip[] = { + { ARG_STR(IP_ADD_MEMBERSHIP) }, + { ARG_STR(IP_DROP_MEMBERSHIP) } + }, long_ipv6[] = { + { ARG_STR(IPV6_ADD_MEMBERSHIP) }, + { ARG_STR(IPV6_DROP_MEMBERSHIP) }, + { ARG_STR(IPV6_JOIN_ANYCAST) }, + { ARG_STR(IPV6_LEAVE_ANYCAST) } + }; + + for (i = 0; i < ARRAY_SIZE(long_ip); ++i) { + rc = setsockopt(0, SOL_IP, long_ip[i].optname, + m4, sizeof(*m4)); + printf("setsockopt(0, SOL_IP, %s" + ", {imr_multiaddr=inet_addr(\"%s\")" + ", imr_interface=inet_addr(\"%s\")}, %u) = %s\n", + long_ip[i].str_optname, multi4addr, + interface, (unsigned) sizeof(*m4), sprintrc(rc)); + } + + for (i = 0; i < ARRAY_SIZE(long_ipv6); ++i) { + rc = setsockopt(0, SOL_IPV6, long_ipv6[i].optname, + m6, sizeof(*m6)); + printf("setsockopt(0, SOL_IPV6, %s" + ", {ipv6mr_multiaddr=inet_pton(\"%s\")" + ", ipv6mr_interface=if_nametoindex(\"lo\")}" + ", %u) = %s\n", + long_ipv6[i].str_optname, multi6addr, + (unsigned) sizeof(*m6), sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("IP_ADD_MEMBERSHIP && IPV6_ADD_MEMBERSHIP" + " && IPV6_JOIN_ANYCAST && HAVE_IF_INDEXTONAME") + +#endif diff --git a/tests-mx32/ip_mreq.test b/tests-mx32/ip_mreq.test new file mode 100755 index 000000000..d0a9e0f1b --- /dev/null +++ b/tests-mx32/ip_mreq.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check {IP,IPV6}_{ADD,DROP}_MEMBERSHIP setsockopt decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=setsockopt diff --git a/tests-mx32/ipc.c b/tests-mx32/ipc.c new file mode 100644 index 000000000..c64d3716a --- /dev/null +++ b/tests-mx32/ipc.c @@ -0,0 +1,122 @@ +/* + * Check decoding of ipc syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_ipc && defined HAVE_LINUX_IPC_H + +# include +# include +# include +# include + +# ifndef SEMCTL +# define SEMCTL 3 +# endif +# ifndef MSGRCV +# define MSGRCV 12 +# endif + +static int +ipc_call(const unsigned short version, const unsigned short call, + long a1, long a2, long a3, long a4, long a5) +{ + const unsigned long val = + (unsigned long) 0xfacefeed00000000ULL | + (unsigned int) version << 16 | + call; + + return syscall(__NR_ipc, val, a1, a2, a3, a4, a5); +} + +static int +ipc_call0(const unsigned short version, const unsigned short call) +{ + int rc = ipc_call(version, call, 0, 0, 0, 0, 0); + int saved_errno = errno; + printf("ipc("); + if (version) + printf("%hu<<16|", version); + errno = saved_errno; + printf("%hu, 0, 0, 0, 0%s) = %d %s (%m)\n", call, +# ifdef __s390__ + "", +# else + ", 0", +# endif + rc, errno2name()); + return rc; +} + +int +main(void) +{ + void *const efault = tail_alloc(1) + 1; + + int rc = ipc_call(0, SEMCTL, 0, 0, 0, (long) efault, 0); + if (rc != -1 || EFAULT != errno) + perror_msg_and_skip("ipc"); + printf("semctl(0, 0, IPC_RMID, %p) = -1 EFAULT (%m)\n", efault); + + unsigned short call; + for (call = 0; call <= 40; call += 10) { + ipc_call0(0, call); + ipc_call0(42, call); + } + + rc = ipc_call(42, SEMCTL, 0, 0, 0, (long) efault, 0); + int test_version = EFAULT == errno; + if (test_version) + printf("semctl(0, 0, IPC_RMID, %p) = %d %s (%m)\n", + efault, rc, errno2name()); + else + printf("ipc(42<<16|SEMCTL, 0, 0, 0, %p) = %d %s (%m)\n", + efault, rc, errno2name()); + + if (test_version) { + const int msqid = -2; + const long msgsz = -3; + const long msgtyp = 0; + + rc = ipc_call(1, MSGRCV, + msqid, msgsz, IPC_NOWAIT, (long) efault, msgtyp); + printf("msgrcv(%d, %p, %lu, %ld, IPC_NOWAIT) = %d %s (%m)\n", + msqid, efault, msgsz, msgtyp, rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ipc && HAVE_LINUX_IPC_H") + +#endif diff --git a/tests-mx32/ipc.sh b/tests-mx32/ipc.sh new file mode 100644 index 000000000..752d4bb21 --- /dev/null +++ b/tests-mx32/ipc.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check decoding of ipc syscalls + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -eipc $args > "$OUT" +match_grep "$LOG" "$OUT" + +rm -f "$OUT" + +exit 0 diff --git a/tests-mx32/ipc.test b/tests-mx32/ipc.test new file mode 100755 index 000000000..aa33fa61c --- /dev/null +++ b/tests-mx32/ipc.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of ipc syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff --git a/tests-mx32/ipc_msg.c b/tests-mx32/ipc_msg.c new file mode 100644 index 000000000..b49384398 --- /dev/null +++ b/tests-mx32/ipc_msg.c @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +#include "xlat.h" +#include "xlat/resource_flags.h" + +/* + * Before glibc-2.22-122-gbe48165, ppc64 code tried to retrieve data + * provided in third argument of msgctl call (in case of IPC_SET cmd) + * which led to segmentation fault. + */ +#undef TEST_MSGCTL_BOGUS_ADDR +#if defined __GLIBC__ && defined POWERPC64 +# if !(defined __GLIBC_MINOR__) \ + || ((__GLIBC__ << 16) + __GLIBC_MINOR__ < (2 << 16) + 23) +# define TEST_MSGCTL_BOGUS_ADDR 0 +# endif +#endif /* __GLIBC__ && POWERPC64 */ + +#ifndef TEST_MSGCTL_BOGUS_ADDR +# define TEST_MSGCTL_BOGUS_ADDR 1 +#endif + +static int id = -1; + +static void +cleanup(void) +{ + msgctl(id, IPC_RMID, NULL); + printf("msgctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); + id = -1; +} + +int +main(void) +{ + static const key_t private_key = + (key_t) (0xffffffff00000000ULL | IPC_PRIVATE); + static const key_t bogus_key = (key_t) 0xeca86420fdb97531ULL; + static const int bogus_msgid = 0xfdb97531; + static const int bogus_cmd = 0xdeadbeef; +#if TEST_MSGCTL_BOGUS_ADDR + static void * const bogus_addr = (void *) -1L; +#endif + static const int bogus_flags = 0xface1e55 & ~IPC_CREAT; + + int rc; + struct msqid_ds ds; + + rc = msgget(bogus_key, bogus_flags); + printf("msgget\\(%#llx, %s%s%s%#x\\|%#04o\\) += %s\n", + zero_extend_signed_to_ull(bogus_key), + IPC_CREAT & bogus_flags ? "IPC_CREAT\\|" : "", + IPC_EXCL & bogus_flags ? "IPC_EXCL\\|" : "", + IPC_NOWAIT & bogus_flags ? "IPC_NOWAIT\\|" : "", + bogus_flags & ~(0777 | IPC_CREAT | IPC_EXCL | IPC_NOWAIT), + bogus_flags & 0777, sprintrc_grep(rc)); + + id = msgget(private_key, 0600); + if (id < 0) + perror_msg_and_skip("msgget"); + printf("msgget\\(IPC_PRIVATE, 0600\\) += %d\n", id); + atexit(cleanup); + + rc = msgctl(bogus_msgid, bogus_cmd, NULL); + printf("msgctl\\(%d, (IPC_64\\|)?%#x /\\* MSG_\\?\\?\\? \\*/, NULL\\)" + " += %s\n", bogus_msgid, bogus_cmd, sprintrc_grep(rc)); + +#if TEST_MSGCTL_BOGUS_ADDR + rc = msgctl(bogus_msgid, IPC_SET, bogus_addr); + printf("msgctl\\(%d, (IPC_64\\|)?IPC_SET, %p\\) += %s\n", + bogus_msgid, bogus_addr, sprintrc_grep(rc)); +#endif + + if (msgctl(id, IPC_STAT, &ds)) + perror_msg_and_skip("msgctl IPC_STAT"); + printf("msgctl\\(%d, (IPC_64\\|)?IPC_STAT, \\{msg_perm=\\{uid=%u" + ", gid=%u, mode=%#o, key=%u, cuid=%u, cgid=%u\\}, msg_stime=%u" + ", msg_rtime=%u, msg_ctime=%u, msg_qnum=%u, msg_qbytes=%u" + ", msg_lspid=%u, msg_lrpid=%u\\}\\) += 0\n", + id, (unsigned) ds.msg_perm.uid, (unsigned) ds.msg_perm.gid, + (unsigned) ds.msg_perm.mode, (unsigned) ds.msg_perm.__key, + (unsigned) ds.msg_perm.cuid, (unsigned) ds.msg_perm.cgid, + (unsigned) ds.msg_stime, (unsigned) ds.msg_rtime, + (unsigned) ds.msg_ctime, (unsigned) ds.msg_qnum, + (unsigned) ds.msg_qbytes, (unsigned) ds.msg_lspid, + (unsigned) ds.msg_lrpid); + + if (msgctl(id, IPC_SET, &ds)) + perror_msg_and_skip("msgctl IPC_SET"); + printf("msgctl\\(%d, (IPC_64\\|)?IPC_SET, \\{msg_perm=\\{uid=%u" + ", gid=%u, mode=%#o\\}, ...\\}\\) += 0\n", + id, (unsigned) ds.msg_perm.uid, (unsigned) ds.msg_perm.gid, + (unsigned) ds.msg_perm.mode); + + rc = msgctl(0, MSG_INFO, &ds); + printf("msgctl\\(0, (IPC_64\\|)?MSG_INFO, %p\\) += %s\n", + &ds, sprintrc_grep(rc)); + + rc = msgctl(id, MSG_STAT, &ds); + printf("msgctl\\(%d, (IPC_64\\|)?MSG_STAT, %p\\) += %s\n", + id, &ds, sprintrc_grep(rc)); + + return 0; +} diff --git a/tests-mx32/ipc_msg.test b/tests-mx32/ipc_msg.test new file mode 100755 index 000000000..177495b0d --- /dev/null +++ b/tests-mx32/ipc_msg.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of ipc msgget/msgctl syscalls + +. "${srcdir=.}/ipc.sh" diff --git a/tests-mx32/ipc_msgbuf.c b/tests-mx32/ipc_msgbuf.c new file mode 100644 index 000000000..1c34494d8 --- /dev/null +++ b/tests-mx32/ipc_msgbuf.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +#define text_string "STRACE_STRING" +#define msgsz sizeof(text_string) + +static int msqid = -1; + +static void +cleanup(void) +{ + msgctl(msqid, IPC_RMID, 0); + msqid = -1; +} + +int +main (void) +{ + const long mtype = 0xdefaced; + struct { + kernel_long_t mtype; + char mtext[msgsz]; + } msg = { + .mtype = mtype, + .mtext = text_string + }; + msqid = msgget(IPC_PRIVATE, IPC_CREAT | S_IRWXU); + if (msqid == -1) + perror_msg_and_skip("msgget"); + atexit(cleanup); + if (msgsnd(msqid, &msg, msgsz, 0) == -1) + perror_msg_and_skip("msgsnd"); + if (msgrcv(msqid, &msg, msgsz, mtype, 0) != msgsz) + perror_msg_and_skip("msgrcv"); + return 0; +} diff --git a/tests-mx32/ipc_msgbuf.expected b/tests-mx32/ipc_msgbuf.expected new file mode 100644 index 000000000..880424bf1 --- /dev/null +++ b/tests-mx32/ipc_msgbuf.expected @@ -0,0 +1,4 @@ +msgget\(IPC_PRIVATE, IPC_CREAT\|0700\) += [0-9]* +msgsnd\([0-9]*, \{233811181, "STRACE_STRING\\0"\}, 14, 0\) += 0 +msgrcv\([0-9]*, \{233811181, "STRACE_STRING\\0"\}, 14, 233811181, 0\) += 14 +msgctl\([0-9]*, (IPC_64\|)?IPC_RMID, NULL\) += 0 diff --git a/tests-mx32/ipc_msgbuf.test b/tests-mx32/ipc_msgbuf.test new file mode 100755 index 000000000..d0b65d1a3 --- /dev/null +++ b/tests-mx32/ipc_msgbuf.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check msgget, msgsnd, msgrcv, msgctl syscalls decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -v -e msgget,msgsnd,msgrcv,msgctl $args +match_grep + +exit 0 diff --git a/tests-mx32/ipc_sem.c b/tests-mx32/ipc_sem.c new file mode 100644 index 000000000..8f6382ccb --- /dev/null +++ b/tests-mx32/ipc_sem.c @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2015 Andreas Schwab + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +#include "xlat.h" +#include "xlat/resource_flags.h" + +union semun { + int val; /* Value for SETVAL */ + struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */ + unsigned short *array; /* Array for GETALL, SETALL */ + struct seminfo *__buf; /* Buffer for IPC_INFO + (Linux-specific) */ +}; + +static int id = -1; + +static void +cleanup(void) +{ + semctl(id, 0, IPC_RMID, 0); + printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_RMID, \\[?NULL\\]?\\) += 0\n", + id); + id = -1; +} + +int +main(void) +{ + static const key_t private_key = + (key_t) (0xffffffff00000000ULL | IPC_PRIVATE); + static const key_t bogus_key = (key_t) 0xeca86420fdb97531ULL; + static const int bogus_semid = 0xfdb97531; + static const int bogus_semnum = 0xeca86420; + static const int bogus_size = 0xdec0ded1; + static const int bogus_flags = 0xface1e55; + static const int bogus_cmd = 0xdeadbeef; + static const unsigned long bogus_arg = + (unsigned long) 0xbadc0dedfffffaceULL; + + int rc; + union semun un; + struct semid_ds ds; + struct seminfo info; + + rc = semget(bogus_key, bogus_size, bogus_flags); + printf("semget\\(%#llx, %d, %s%s%s%#x\\|%#04o\\) += %s\n", + zero_extend_signed_to_ull(bogus_key), bogus_size, + IPC_CREAT & bogus_flags ? "IPC_CREAT\\|" : "", + IPC_EXCL & bogus_flags ? "IPC_EXCL\\|" : "", + IPC_NOWAIT & bogus_flags ? "IPC_NOWAIT\\|" : "", + bogus_flags & ~(0777 | IPC_CREAT | IPC_EXCL | IPC_NOWAIT), + bogus_flags & 0777, sprintrc_grep(rc)); + + id = semget(private_key, 1, 0600); + if (id < 0) + perror_msg_and_skip("semget"); + printf("semget\\(IPC_PRIVATE, 1, 0600\\) += %d\n", id); + atexit(cleanup); + + rc = semctl(bogus_semid, bogus_semnum, bogus_cmd, bogus_arg); +#define SEMCTL_BOGUS_ARG_FMT "(%#lx|\\[(%#lx|NULL)\\]|NULL)" + printf("semctl\\(%d, %d, (IPC_64\\|)?%#x /\\* SEM_\\?\\?\\? \\*/" + ", " SEMCTL_BOGUS_ARG_FMT "\\) += %s\n", + bogus_semid, bogus_semnum, bogus_cmd, + bogus_arg, bogus_arg, sprintrc_grep(rc)); + + un.buf = &ds; + if (semctl(id, 0, IPC_STAT, un)) + perror_msg_and_skip("semctl IPC_STAT"); + printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_STAT, \\[?%p\\]?\\) += 0\n", + id, &ds); + + un.__buf = &info; + rc = semctl(0, 0, SEM_INFO, un); + printf("semctl\\(0, 0, (IPC_64\\|)?SEM_INFO, \\[?%p\\]?\\) += %s\n", + &info, sprintrc_grep(rc)); + + un.buf = &ds; + rc = semctl(id, 0, SEM_STAT, un); + printf("semctl\\(%d, 0, (IPC_64\\|)?SEM_STAT, \\[?%p\\]?\\) += %s\n", + id, &ds, sprintrc_grep(rc)); + + return 0; +} diff --git a/tests-mx32/ipc_sem.test b/tests-mx32/ipc_sem.test new file mode 100755 index 000000000..cc93d07bd --- /dev/null +++ b/tests-mx32/ipc_sem.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of ipc semget/semctl syscalls + +. "${srcdir=.}/ipc.sh" diff --git a/tests-mx32/ipc_shm.c b/tests-mx32/ipc_shm.c new file mode 100644 index 000000000..66960ff9f --- /dev/null +++ b/tests-mx32/ipc_shm.c @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +#include "xlat.h" +#include "xlat/shm_resource_flags.h" + +static int id = -1; + +static void +cleanup(void) +{ + shmctl(id, IPC_RMID, NULL); + printf("shmctl\\(%d, (IPC_64\\|)?IPC_RMID, NULL\\) += 0\n", id); + id = -1; +} + +int +main(void) +{ + static const key_t private_key = + (key_t) (0xffffffff00000000ULL | IPC_PRIVATE); + static const key_t bogus_key = (key_t) 0xeca86420fdb97531ULL; + static const int bogus_id = 0xdefaced1; + static const int bogus_cmd = 0xdefaced2; + static void * const bogus_addr = (void *) -1L; + static const size_t bogus_size = + /* + * musl sets size to SIZE_MAX if size argument is greater than + * PTRDIFF_MAX - musl/src/ipc/shmget.c + */ + #ifdef __GLIBC__ + (size_t) 0xdec0ded1dec0ded2ULL; + #else + (size_t) 0x1e55c0de5dec0dedULL; + #endif + static const int bogus_flags = 0xface1e55; + + int rc; + struct shmid_ds ds; + + rc = shmget(bogus_key, bogus_size, bogus_flags); + printf("shmget\\(%#llx, %zu, %s%s%s%#x\\|%#04o\\) += %s\n", + zero_extend_signed_to_ull(bogus_key), bogus_size, + IPC_CREAT & bogus_flags ? "IPC_CREAT\\|" : "", + IPC_EXCL & bogus_flags ? "IPC_EXCL\\|" : "", + SHM_HUGETLB & bogus_flags ? "SHM_HUGETLB\\|" : "", + bogus_flags & ~(0777 | IPC_CREAT | IPC_EXCL | SHM_HUGETLB), + bogus_flags & 0777, sprintrc_grep(rc)); + + id = shmget(private_key, 1, 0600); + if (id < 0) + perror_msg_and_skip("shmget"); + printf("shmget\\(IPC_PRIVATE, 1, 0600\\) += %d\n", id); + atexit(cleanup); + + rc = shmctl(bogus_id, bogus_cmd, NULL); + printf("shmctl\\(%d, (IPC_64\\|)?%#x /\\* SHM_\\?\\?\\? \\*/, NULL\\)" + " += %s\n", bogus_id, bogus_cmd, sprintrc_grep(rc)); + + rc = shmctl(bogus_id, IPC_STAT, bogus_addr); + printf("shmctl\\(%d, (IPC_64\\|)?IPC_STAT, %p\\) += %s\n", + bogus_id, bogus_addr, sprintrc_grep(rc)); + + if (shmctl(id, IPC_STAT, &ds)) + perror_msg_and_skip("shmctl IPC_STAT"); + printf("shmctl\\(%d, (IPC_64\\|)?IPC_STAT, \\{shm_perm=\\{uid=%u, gid=%u, " + "mode=%#o, key=%u, cuid=%u, cgid=%u\\}, shm_segsz=%u, shm_cpid=%u, " + "shm_lpid=%u, shm_nattch=%u, shm_atime=%u, shm_dtime=%u, " + "shm_ctime=%u\\}\\) += 0\n", + id, (unsigned) ds.shm_perm.uid, (unsigned) ds.shm_perm.gid, + (unsigned) ds.shm_perm.mode, (unsigned) ds.shm_perm.__key, + (unsigned) ds.shm_perm.cuid, (unsigned) ds.shm_perm.cgid, + (unsigned) ds.shm_segsz, (unsigned) ds.shm_cpid, + (unsigned) ds.shm_lpid, (unsigned) ds.shm_nattch, + (unsigned) ds.shm_atime, (unsigned) ds.shm_dtime, + (unsigned) ds. shm_ctime); + + if (shmctl(id, IPC_SET, &ds)) + perror_msg_and_skip("shmctl IPC_SET"); + printf("shmctl\\(%d, (IPC_64\\|)?IPC_SET, \\{shm_perm=\\{uid=%u, gid=%u" + ", mode=%#o\\}, ...\\}\\) += 0\n", + id, (unsigned) ds.shm_perm.uid, (unsigned) ds.shm_perm.gid, + (unsigned) ds.shm_perm.mode); + + rc = shmctl(0, SHM_INFO, &ds); + printf("shmctl\\(0, (IPC_64\\|)?SHM_INFO, %p\\) += %s\n", + &ds, sprintrc_grep(rc)); + + rc = shmctl(id, SHM_STAT, &ds); + printf("shmctl\\(%d, (IPC_64\\|)?SHM_STAT, %p\\) += %s\n", + id, &ds, sprintrc_grep(rc)); + + return 0; +} diff --git a/tests-mx32/ipc_shm.test b/tests-mx32/ipc_shm.test new file mode 100755 index 000000000..a67ea291f --- /dev/null +++ b/tests-mx32/ipc_shm.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check decoding of ipc shmget/shmctl syscalls + +. "${srcdir=.}/ipc.sh" diff --git a/tests-mx32/kcmp.c b/tests-mx32/kcmp.c new file mode 100644 index 000000000..cb497c9f2 --- /dev/null +++ b/tests-mx32/kcmp.c @@ -0,0 +1,103 @@ +/* + * Check decoding of kcmp syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include "scno.h" + +#ifdef __NR_kcmp + +# include +# include + +# define KCMP_FILE 0 +# define KCMP_SYSVSEM 6 + +static void +do_kcmp(kernel_ulong_t pid1, kernel_ulong_t pid2, kernel_ulong_t type, + const char *type_str, kernel_ulong_t idx1, kernel_ulong_t idx2) +{ + long rc; + const char *errstr; + + rc = syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2); + errstr = sprintrc(rc); + + printf("kcmp(%d, %d, ", (int) pid1, (int) pid2); + + if (type_str) + printf("%s", type_str); + else + printf("%#x /* KCMP_??? */", (int) type); + + if (type == KCMP_FILE) + printf(", %u, %u", (unsigned) idx1, (unsigned) idx2); + else if (type > KCMP_SYSVSEM) + printf(", %#llx, %#llx", + (unsigned long long) idx1, (unsigned long long) idx2); + + printf(") = %s\n", errstr); +} + +int +main(void) +{ + static const kernel_ulong_t bogus_pid1 = + (kernel_ulong_t) 0xdeadca75face1057ULL; + static const kernel_ulong_t bogus_pid2 = + (kernel_ulong_t) 0xdefaced1defaced2ULL; + static const kernel_ulong_t bogus_type = + (kernel_ulong_t) 0xbadc0dedda7adeadULL; + static const kernel_ulong_t bogus_idx1 = + (kernel_ulong_t) 0xdec0ded3dec0ded4ULL; + static const kernel_ulong_t bogus_idx2 = + (kernel_ulong_t) 0xba5e1e55deadc0deULL; + + /* Invalid values */ + do_kcmp(bogus_pid1, bogus_pid2, bogus_type, NULL, bogus_idx1, + bogus_idx2); + do_kcmp(0, 0, KCMP_SYSVSEM + 1, NULL, 0, 0); + + /* KCMP_FILE is the only type which has additional args */ + do_kcmp(3141592653U, 2718281828U, ARG_STR(KCMP_FILE), bogus_idx1, + bogus_idx2); + /* Some type without additional args */ + do_kcmp(-1, -1, ARG_STR(KCMP_SYSVSEM), bogus_idx1, bogus_idx2); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kcmp"); + +#endif diff --git a/tests-mx32/kcmp.test b/tests-mx32/kcmp.test new file mode 100755 index 000000000..d022aeba0 --- /dev/null +++ b/tests-mx32/kcmp.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kcmp syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-mx32/kexec_file_load.c b/tests-mx32/kexec_file_load.c new file mode 100644 index 000000000..be90a37d8 --- /dev/null +++ b/tests-mx32/kexec_file_load.c @@ -0,0 +1,127 @@ +/* + * Check decoding of kexec_file_load syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_kexec_file_load + +# include +# include +# include + +struct strval { + kernel_ulong_t val; + const char *str64; + const char *str32; + const char *str; +}; + +#define CMDLINE_STR "deadcodebaddatadefaced"; + +int +main(void) +{ + static const kernel_ulong_t bogus_kernel_fd = + (kernel_ulong_t) 0xdeadca57badda7a1ULL; + static const kernel_ulong_t bogus_initrd_fd = + (kernel_ulong_t) 0xdec0ded1defaced2ULL; + static const char cmdline_str[] = CMDLINE_STR; + static const char cmdline_short_str[] = "abcdef"; + + static const kernel_ulong_t cmdline_lens[] = { + 0, + (kernel_ulong_t) 0xcaffeeeddeadbeefULL, + sizeof(cmdline_str), + sizeof(cmdline_str) - 1, + sizeof(cmdline_short_str), + sizeof(cmdline_short_str) - 1, + sizeof(cmdline_short_str) + 1, + }; + static const struct strval flags[] = { + { (kernel_ulong_t) 0xbadc0dedda7a1058ULL, + "0xbadc0ded", "0x", + "da7a1058 /* KEXEC_FILE_??? */" }, + { 0, "", "", "0" }, + { 0xdeadbeef, "", "", "KEXEC_FILE_UNLOAD|KEXEC_FILE_ON_CRASH|" + "KEXEC_FILE_NO_INITRAMFS|0xdeadbee8" }, + }; + + + long rc; + char *cmdline = tail_memdup(cmdline_str, sizeof(cmdline_str)); + char *cmdline_short = + tail_memdup(cmdline_short_str, sizeof(cmdline_short_str)); + char cmdline_ptr[sizeof("0x") + sizeof(void *) * 2]; + char cmdline_short_ptr[sizeof("0x") + sizeof(void *) * 2]; + unsigned int i; + unsigned int j; + + struct strval cmdlines[] = { + { (uintptr_t) NULL, "", "", "NULL" }, + { (uintptr_t) (cmdline + sizeof(cmdline_str)), "", "", + cmdline_ptr }, + { (uintptr_t) cmdline, "", "", "\"deadcodeb\"..." }, + { (uintptr_t) cmdline, "", "", "\"deadcodeb\"..." }, + { (uintptr_t) cmdline_short, "", "", "\"abcdef\\0\"" }, + { (uintptr_t) cmdline_short, "", "", "\"abcdef\"" }, + { (uintptr_t) cmdline_short, "", "", cmdline_short_ptr }, + }; + + + snprintf(cmdline_ptr, sizeof(cmdline_ptr), "%p", + cmdline + sizeof(cmdline_str)); + snprintf(cmdline_short_ptr, sizeof(cmdline_short_ptr), "%p", + cmdline_short); + + for (i = 0; i < ARRAY_SIZE(flags); i++) { + for (j = 0; j < ARRAY_SIZE(cmdlines); j++) { + rc = syscall(__NR_kexec_file_load, bogus_kernel_fd, + bogus_initrd_fd, cmdline_lens[j], + cmdlines[j].val, flags[i].val); + printf("kexec_file_load(%d, %d, %llu, %s, %s%s) = %s\n", + (int) bogus_kernel_fd, (int) bogus_initrd_fd, + (unsigned long long) cmdline_lens[j], + cmdlines[j].str, + sizeof(kernel_ulong_t) == 8 ? flags[i].str64 : + flags[i].str32, flags[i].str, sprintrc(rc)); + } + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kexec_file_load"); + +#endif diff --git a/tests-mx32/kexec_file_load.test b/tests-mx32/kexec_file_load.test new file mode 100755 index 000000000..c95e12382 --- /dev/null +++ b/tests-mx32/kexec_file_load.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kexec_file_load syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s9 diff --git a/tests-mx32/kexec_load.c b/tests-mx32/kexec_load.c new file mode 100644 index 000000000..330238de0 --- /dev/null +++ b/tests-mx32/kexec_load.c @@ -0,0 +1,170 @@ +/* + * Check decoding of kexec_load syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_kexec_load + +# include +# include + +struct strval { + kernel_ulong_t val; + const char *str64; + const char *str32; + const char *str; +}; + +struct segm { + void *buf; + size_t bufsz; + void *mem; + size_t memsz; +}; + +int +main(void) +{ + enum { + NUM_SEGMS = 17, + NUM_SEGMS_UNCUT = 5, + NUM_SEGMS_UNCUT_MAX = 9, + NUM_SEGMS_CUT = 12, + SEGMS_ARRAY_SIZE = sizeof(struct segm) * NUM_SEGMS, + }; + + static const kernel_ulong_t bogus_zero = + sizeof(long) < sizeof(kernel_long_t) ? + (kernel_ulong_t) 0xffffffff00000000ULL : 0; + static const kernel_ulong_t bogus_entry = + (kernel_ulong_t) 0xdeadca57badda7a1ULL; + static const kernel_ulong_t bogus_nsegs = + (kernel_ulong_t) 0xdec0ded1defaced2ULL; + + static const struct strval flags[] = { + { (kernel_ulong_t) 0xbadc0dedda7a1054ULL, + "0xda7a0000 /* KEXEC_ARCH_??? */|0xbadc0ded0000", + "0xda7a0000 /* KEXEC_ARCH_??? */|0x", + "1054 /* KEXEC_??? */" }, + { 0, "", "", "KEXEC_ARCH_DEFAULT" }, + { 0x2a0003, "", "", + "KEXEC_ARCH_SH|KEXEC_ON_CRASH|KEXEC_PRESERVE_CONTEXT" }, + { 0xdead0000, "", "", "0xdead0000 /* KEXEC_ARCH_??? */" }, + }; + + const char *errstr; + long rc; + struct segm *segms = tail_alloc(SEGMS_ARRAY_SIZE); + unsigned int i; + + fill_memory(segms, SEGMS_ARRAY_SIZE); + segms[0].buf = segms[0].mem = NULL; + + rc = syscall(__NR_kexec_load, bogus_zero, bogus_zero, bogus_zero, + flags[0].val); + printf("kexec_load(NULL, 0, NULL, %s%s) = %s\n", + sizeof(long) == 8 ? flags[0].str64 : flags[0].str32, + flags[0].str, sprintrc(rc)); + + rc = syscall(__NR_kexec_load, bogus_entry, bogus_nsegs, + segms + SEGMS_ARRAY_SIZE, flags[1].val); + printf("kexec_load(%#lx, %lu, %p, %s) = %s\n", + (unsigned long) bogus_entry, (unsigned long) bogus_nsegs, + segms + SEGMS_ARRAY_SIZE, flags[1].str, sprintrc(rc)); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS, + segms, flags[2].val); + printf("kexec_load(%#lx, %lu, %p, %s) = %s\n", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS, + segms, flags[2].str, sprintrc(rc)); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS_CUT, + segms, flags[3].val); + errstr = sprintrc(rc); + printf("kexec_load(%#lx, %lu, [{buf=NULL, bufsz=%zu, mem=NULL, " + "memsz=%zu}, ", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS_CUT, + segms[0].bufsz, segms[0].memsz); + for (i = 1; i < NUM_SEGMS_UNCUT_MAX; i++) + printf("{buf=%p, bufsz=%zu, mem=%p, memsz=%zu}, ", + segms[i].buf, segms[i].bufsz, + segms[i].mem, segms[i].memsz); + printf("...], %s) = %s\n", flags[3].str, errstr); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS_CUT, + segms + (NUM_SEGMS - NUM_SEGMS_UNCUT_MAX), + flags[0].val); + errstr = sprintrc(rc); + printf("kexec_load(%#lx, %lu, [", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS_CUT); + for (i = NUM_SEGMS - NUM_SEGMS_UNCUT_MAX; i < NUM_SEGMS; i++) + printf("{buf=%p, bufsz=%zu, mem=%p, memsz=%zu}, ", + segms[i].buf, segms[i].bufsz, + segms[i].mem, segms[i].memsz); + printf("%p], %s%s) = %s\n", + segms + NUM_SEGMS, + sizeof(long) == 8 ? flags[0].str64 : flags[0].str32, + flags[0].str, errstr); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS_UNCUT, + segms + (NUM_SEGMS - NUM_SEGMS_UNCUT), + flags[1].val); + errstr = sprintrc(rc); + printf("kexec_load(%#lx, %lu, [", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS_UNCUT); + for (i = NUM_SEGMS - NUM_SEGMS_UNCUT; i < NUM_SEGMS; i++) + printf("{buf=%p, bufsz=%zu, mem=%p, memsz=%zu}%s", + segms[i].buf, segms[i].bufsz, + segms[i].mem, segms[i].memsz, + (i == NUM_SEGMS - 1) ? "" : ", "); + printf("], %s) = %s\n", flags[1].str, errstr); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS_CUT, + segms + 1, flags[2].val); + errstr = sprintrc(rc); + printf("kexec_load(%#lx, %lu, [", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS_CUT); + for (i = 1; i < NUM_SEGMS_UNCUT_MAX + 1; i++) + printf("{buf=%p, bufsz=%zu, mem=%p, memsz=%zu}, ", + segms[i].buf, segms[i].bufsz, + segms[i].mem, segms[i].memsz); + printf("...], %s) = %s\n", flags[2].str, errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kexec_load"); + +#endif diff --git a/tests-mx32/kexec_load.test b/tests-mx32/kexec_load.test new file mode 100755 index 000000000..4b1511e90 --- /dev/null +++ b/tests-mx32/kexec_load.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kexec_load syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s9 diff --git a/tests-mx32/keyctl.c b/tests-mx32/keyctl.c new file mode 100644 index 000000000..2e26076b1 --- /dev/null +++ b/tests-mx32/keyctl.c @@ -0,0 +1,820 @@ +/* + * Check decoding of keyctl syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_keyctl + +# include +# include + +# include +# include +# include +# include +# include +# include +# include +# include +# include + +/* This check should be before #include "xlat/keyctl_commands.h" */ +# ifndef KEYCTL_DH_COMPUTE +struct keyctl_dh_params { + int32_t private; + int32_t prime; + int32_t base; +}; +# endif + +# include "xlat.h" +# include "xlat/keyctl_commands.h" + +# ifndef KEY_SPEC_REQKEY_AUTH_KEY +# define KEY_SPEC_REQKEY_AUTH_KEY -7 +# endif + +# ifndef KEY_SPEC_REQUESTOR_KEYRING +# define KEY_SPEC_REQUESTOR_KEYRING -8 +# endif + +static const size_t limit = 10; + +/* + * Well, this is true for DESCRIBE and GET_SECURITY, and false for READ and + * DH_COMPUTE and I see no ability to pass this information without + * significantly breaking interface. + */ +bool nul_terminated_buf = true; +bool buf_in_arg = false; + +/* + * When this is called with positive size, the buffer provided is an "out" + * argument and rc contains resulting size (globally defined nul_terminated_buf + * controls whether it is nul-terminated or not). If size is negative, + * it contains "in" argument. + */ +void +print_quoted_string_limit(const char *str, size_t size, long rc) +{ + size_t print_size = ((rc >= 0) && (size > 0)) ? + ((unsigned long) rc > size ? size : + (unsigned long) rc) : size; + size_t limited_size = print_size > limit ? limit : print_size; + + if ((rc == -1) && !buf_in_arg) { + printf("%p", str); + return; + } + + if (!nul_terminated_buf || + (strnlen(str, limited_size) == limited_size)) { + printf("\""); + print_quoted_memory(str, limited_size); + if (print_size > limit) + printf("\"..."); + else + printf("\""); + } else { + printf("\""); + print_quoted_string(str); + printf("\""); + } +} + +static void +print_arg(kernel_ulong_t arg, const char *str, const char *fmt, size_t size, + long rc) +{ + if (size == (size_t) -1) + size = 0; + + if (str) { + printf("%s", str); + } else { + if (size == sizeof(uint64_t)) + printf(fmt, (uint64_t)arg); + else if (size == sizeof(uint32_t)) + printf(fmt, (uint32_t)arg); + else + print_quoted_string_limit((void *) (uintptr_t) arg, + size, rc); + } +} + +/* + * Arguments are passed as sz, val, str, fmt. Arguments are read until 4 + * arguments are retrieved or size of 0 is occurred. + * + * str == NULL && fmt == NULL && sz not in {4, 8} - print_quoted_string_limit is + * used for argument printing. If sz is negative, in argument is assumed, out + * otherwise. + */ +void +do_keyctl(kernel_ulong_t cmd, const char *cmd_str, ...) +{ + kernel_ulong_t args[4] = { + (kernel_ulong_t) 0xdeadfee1badc0de5ULL, + (kernel_ulong_t) 0xdeadfee2badc0de6ULL, + (kernel_ulong_t) 0xdeadfee3badc0de7ULL, + (kernel_ulong_t) 0xdeadfee4badc0de8ULL, + }; + const char *arg_str[4] = { NULL }; + const char *arg_fmt[4] = { "%llu", "%llu", "%llu", "%llu" }; + size_t arg_sz[4] = { + sizeof(kernel_ulong_t), + sizeof(kernel_ulong_t), + sizeof(kernel_ulong_t), + sizeof(kernel_ulong_t), + }; + unsigned i; + unsigned cnt = 0; + + va_list ap; + + va_start(ap, cmd_str); + + do { + arg_sz[cnt] = va_arg(ap, size_t); + if (!arg_sz[cnt]) + break; + + if (arg_sz[cnt] == sizeof(uint64_t)) + args[cnt] = va_arg(ap, uint64_t); + else if (arg_sz[cnt] == sizeof(uint32_t)) + args[cnt] = va_arg(ap, uint32_t); + else + args[cnt] = (uintptr_t) va_arg(ap, void *); + + arg_str[cnt] = va_arg(ap, char *); + arg_fmt[cnt] = va_arg(ap, char *); + } while (++cnt < 4); + + long rc = syscall(__NR_keyctl, cmd, args[0], args[1], args[2], args[3]); + const char *errstr = sprintrc(rc); + printf("keyctl(%s", cmd_str); + for (i = 0; i < cnt; i++) { + printf(", "); + print_arg(args[i], arg_str[i], arg_fmt[i], arg_sz[i], rc); + } + printf(") = %s\n", errstr); +} + +int +main(void) +{ + enum { PR_LIMIT = 10, IOV_SIZE = 11, IOV_STR_SIZE = 4096 }; + + static const char *kulong_fmt = + sizeof(kernel_ulong_t) == sizeof(uint64_t) ? "%#llx" : "%#x"; + static const char *ksize_fmt = + sizeof(kernel_ulong_t) == sizeof(uint64_t) ? "%llu" : "%u"; + static const char *ptr_fmt = + sizeof(void *) == sizeof(uint64_t) ? "%#llx" : "%#x"; + static const char unterminated1[] = { '\1', '\2', '\3', '\4', '\5' }; + static const char unterminated2[] = { '\6', '\7', '\10', '\11', '\12' }; + static const char short_type_str[] = "shrt type"; + static const char short_desc_str[] = "shrt desc"; + static const char long_type_str[] = "overly long key type"; + static const char long_desc_str[] = "overly long key description"; + static const int32_t bogus_key1 = 0xdeadf00d; + static const int32_t bogus_key2 = 0x1eefdead; + static const kernel_ulong_t bogus_key3 = + (kernel_ulong_t) 0xdec0ded1dec0ded2ULL; + static const char *bogus_key3_str = "-557785390"; + + static const struct keyctl_dh_params kcdhp_data = { + KEY_SPEC_GROUP_KEYRING, 1234567890, 3141592653U }; + static const char *kcdhp_str = "{private=KEY_SPEC_GROUP_KEYRING, " + "prime=1234567890, base=-1153374643}"; + + char *bogus_str = tail_memdup(unterminated1, sizeof(unterminated1)); + char *bogus_desc = tail_memdup(unterminated2, sizeof(unterminated2)); + char *short_type = tail_memdup(short_type_str, sizeof(short_type_str)); + char *short_desc = tail_memdup(short_desc_str, sizeof(short_desc_str)); + char *long_type = tail_memdup(long_type_str, sizeof(long_type_str)); + char *long_desc = tail_memdup(long_desc_str, sizeof(long_desc_str)); + char *kcdhp = tail_memdup(&kcdhp_data, sizeof(kcdhp_data)); + struct iovec *key_iov = tail_alloc(sizeof(*key_iov) * IOV_SIZE); + char *bogus_buf1 = tail_alloc(9); + char *bogus_buf2 = tail_alloc(256); + char *key_iov_str1; + char *key_iov_str2 = tail_alloc(4096); + ssize_t ret; + ssize_t kis_size = 0; + int i; + + key_iov[0].iov_base = short_type; + key_iov[0].iov_len = sizeof(short_type_str); + key_iov[1].iov_base = long_type; + key_iov[1].iov_len = sizeof(long_type_str); + key_iov[2].iov_base = short_desc; + key_iov[2].iov_len = sizeof(short_desc_str); + key_iov[3].iov_base = long_desc; + key_iov[3].iov_len = sizeof(long_desc_str); + key_iov[4].iov_base = bogus_str; + key_iov[4].iov_len = 32; + + for (i = 5; i < IOV_SIZE; i++) { + key_iov[i].iov_base = + (void *) (uintptr_t) (0xfffffacefffff00dULL + + 0x100000001ULL * i); + key_iov[i].iov_len = (size_t) (0xcaffeeeddefaced7ULL + + 0x100000001ULL * i); + } + + ret = asprintf(&key_iov_str1, "[{iov_base=%p, iov_len=%zu}, " + "{iov_base=%p, iov_len=%zu}, " + "{iov_base=%p, iov_len=%zu}, " + "{iov_base=%p, iov_len=%zu}]", + key_iov[IOV_SIZE - 4].iov_base, + key_iov[IOV_SIZE - 4].iov_len, + key_iov[IOV_SIZE - 3].iov_base, + key_iov[IOV_SIZE - 3].iov_len, + key_iov[IOV_SIZE - 2].iov_base, + key_iov[IOV_SIZE - 2].iov_len, + key_iov[IOV_SIZE - 1].iov_base, + key_iov[IOV_SIZE - 1].iov_len); + + if (ret < 0) + error_msg_and_fail("asprintf"); + + ret = snprintf(key_iov_str2, IOV_STR_SIZE, + "[{iov_base=\"%s\\0\", iov_len=%zu}, " + "{iov_base=\"%.10s\"..., iov_len=%zu}, " + "{iov_base=\"%s\\0\", iov_len=%zu}, " + "{iov_base=\"%.10s\"..., iov_len=%zu}, ", + (char *) key_iov[0].iov_base, key_iov[0].iov_len, + (char *) key_iov[1].iov_base, key_iov[1].iov_len, + (char *) key_iov[2].iov_base, key_iov[2].iov_len, + (char *) key_iov[3].iov_base, key_iov[3].iov_len); + + if ((ret < 0) || (ret >= IOV_STR_SIZE)) + error_msg_and_fail("snprintf"); + + for (i = 4; i < PR_LIMIT; i++) { + kis_size += ret; + + ret = snprintf(key_iov_str2 + kis_size, IOV_STR_SIZE - kis_size, + "{iov_base=%p, iov_len=%zu}, ", + key_iov[i].iov_base, key_iov[i].iov_len); + + if ((ret < 0) || (ret >= (IOV_STR_SIZE - kis_size))) + error_msg_and_fail("snprintf"); + } + + kis_size += ret; + snprintf(key_iov_str2 + kis_size, IOV_STR_SIZE - kis_size, "...]"); + + + /* Invalid command */ + do_keyctl((kernel_ulong_t) 0xbadc0dedfacefeedULL, + "0xfacefeed /* KEYCTL_??? */", + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfee1badc0de5ULL, NULL, kulong_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfee2badc0de6ULL, NULL, kulong_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfee3badc0de7ULL, NULL, kulong_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfee4badc0de8ULL, NULL, kulong_fmt); + + + /* GET_KEYRING_ID */ + do_keyctl(ARG_STR(KEYCTL_GET_KEYRING_ID), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xbadc0dedffffffffLLU, "-1", + NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_KEYRING_ID), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), "%d", + sizeof(int), 3141592653U, NULL, "%d", + NULL, 0UL); + + + /* KEYCTL_JOIN_SESSION_KEYRING */ + do_keyctl(ARG_STR(KEYCTL_JOIN_SESSION_KEYRING), + sizeof(char *), ARG_STR(NULL), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_JOIN_SESSION_KEYRING), + sizeof(char *), (char *) 0xfffffacefffffeedULL, NULL, ptr_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_JOIN_SESSION_KEYRING), + sizeof(char *), bogus_str, NULL, ptr_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_JOIN_SESSION_KEYRING), + sizeof(char *), ARG_STR("bogus name"), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_JOIN_SESSION_KEYRING), + sizeof(char *), "very long keyring name", "\"very long \"...", + NULL, 0UL); + + + /* KEYCTL_UPDATE */ + + buf_in_arg = true; + + do_keyctl(ARG_STR(KEYCTL_UPDATE), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(char *), ARG_STR(NULL), NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_UPDATE), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), (char *) 0xfffffacefffffeedULL, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfee4badc0de8ULL, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_UPDATE), + sizeof(int32_t), bogus_key2, NULL, "%d", + sizeof(char *), bogus_str, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfee4badc0de8ULL, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_UPDATE), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(short_desc_str), short_desc, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) sizeof(short_desc_str) - 1, NULL, + ksize_fmt, + 0UL); + + buf_in_arg = false; + + + /* KEYCTL_REVOKE */ + do_keyctl(ARG_STR(KEYCTL_REVOKE), + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_REVOKE), + sizeof(int32_t), bogus_key1, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_REVOKE), + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_REVOKE), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_CHOWN */ + do_keyctl(ARG_STR(KEYCTL_CHOWN), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(uid_t), ARG_STR(-1), NULL, + sizeof(gid_t), ARG_STR(-1), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_CHOWN), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(uid_t), 2718281828U, NULL, "%u", + sizeof(gid_t), 3141592653U, NULL, "%u", 0UL); + + + /* KEYCTL_SETPERM */ + do_keyctl(ARG_STR(KEYCTL_SETPERM), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQKEY_AUTH_KEY), NULL, + sizeof(uint32_t), 0xffffffffU, + "KEY_POS_VIEW|KEY_POS_READ|KEY_POS_WRITE|" + "KEY_POS_SEARCH|KEY_POS_LINK|KEY_POS_SETATTR|" + "KEY_USR_VIEW|KEY_USR_READ|KEY_USR_WRITE|" + "KEY_USR_SEARCH|KEY_USR_LINK|KEY_USR_SETATTR|" + "KEY_GRP_VIEW|KEY_GRP_READ|KEY_GRP_WRITE|" + "KEY_GRP_SEARCH|KEY_GRP_LINK|KEY_GRP_SETATTR|" + "KEY_OTH_VIEW|KEY_OTH_READ|KEY_OTH_WRITE|" + "KEY_OTH_SEARCH|KEY_OTH_LINK|KEY_OTH_SETATTR|" + "0xc0c0c0c0", NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_SETPERM), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(uint32_t), 0, NULL, "%#x", 0UL); + do_keyctl(ARG_STR(KEYCTL_SETPERM), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(uint32_t), 0xc0c0c0c0, "0xc0c0c0c0 /* KEY_??? */", + NULL, + 0UL); + + + /* KEYCTL_DESCRIBE */ + do_keyctl(ARG_STR(KEYCTL_DESCRIBE), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_DESCRIBE), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_DESCRIBE), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) 9, (uintptr_t) bogus_buf1, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 9, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_DESCRIBE), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) 256, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 256, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_DESCRIBE), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) -4, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) -4, NULL, ksize_fmt, 0UL); + + + /* KEYCTL_CLEAR */ + do_keyctl(ARG_STR(KEYCTL_CLEAR), + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_CLEAR), + sizeof(int32_t), bogus_key1, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_CLEAR), + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_CLEAR), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_LINK */ + do_keyctl(ARG_STR(KEYCTL_LINK), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_LINK), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_LINK), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_UNLINK */ + do_keyctl(ARG_STR(KEYCTL_UNLINK), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, + 0UL); + do_keyctl(ARG_STR(KEYCTL_UNLINK), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_UNLINK), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_SEARCH */ + buf_in_arg = true; + + do_keyctl(ARG_STR(KEYCTL_SEARCH), + sizeof(int32_t), ARG_STR(KEY_SPEC_REQUESTOR_KEYRING), NULL, + sizeof(char *), ARG_STR(NULL), NULL, + sizeof(char *), ARG_STR(NULL), NULL, + sizeof(int32_t), 0, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_SEARCH), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), (char *) 0xfffffacefffffeedULL, NULL, ptr_fmt, + sizeof(char *), (char *) 0xfffff00dfffff157ULL, NULL, ptr_fmt, + sizeof(int32_t), ARG_STR(KEY_SPEC_USER_SESSION_KEYRING), + NULL); + do_keyctl(ARG_STR(KEYCTL_SEARCH), + sizeof(int32_t), bogus_key2, NULL, "%d", + sizeof(char *), bogus_str, NULL, ptr_fmt, + sizeof(char *), bogus_desc, NULL, ptr_fmt, + sizeof(int32_t), bogus_key1, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_SEARCH), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(short_type_str), short_type, NULL, NULL, + sizeof(short_desc_str), short_desc, NULL, NULL, + sizeof(int32_t), bogus_key2, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_SEARCH), + sizeof(int32_t), 0, NULL, "%d", + sizeof(long_type_str), long_type, NULL, NULL, + sizeof(long_type_str), long_desc, NULL, NULL, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL); + + buf_in_arg = false; + + + /* KEYCTL_READ */ + nul_terminated_buf = false; + + /* Empty result is expected for these */ + bogus_buf1[0] = '\377'; + bogus_buf2[0] = '\377'; + + do_keyctl(ARG_STR(KEYCTL_READ), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_READ), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_READ), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) 9, (uintptr_t) bogus_buf1, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 9, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_READ), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) 256, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 256, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_READ), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) -4, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) -4, NULL, ksize_fmt, 0UL); + + nul_terminated_buf = true; + + /* KEYCTL_INSTANTIATE */ + buf_in_arg = true; + + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE), + sizeof(int32_t), 0, NULL, "%d", + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + sizeof(int32_t), 0, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), (char *) 0xfffffacefffffeedULL, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfeedLLU, NULL, ksize_fmt, + sizeof(int32_t), bogus_key1, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE), + sizeof(int32_t), bogus_key2, NULL, "%d", + sizeof(char *), bogus_str, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 32LLU, NULL, ksize_fmt, + sizeof(int32_t), bogus_key2, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(short_type_str), short_desc, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) sizeof(short_type_str) - 1, NULL, + ksize_fmt, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE), + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, + sizeof(long_type_str), long_desc, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) sizeof(long_type_str), NULL, ksize_fmt, + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL); + + buf_in_arg = false; + + + /* KEYCTL_NEGATE */ + do_keyctl(ARG_STR(KEYCTL_NEGATE), + sizeof(int32_t), 0, NULL, "%d", + sizeof(uint32_t), 0, NULL, "%u", + sizeof(int32_t), 0, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_NEGATE), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(uint32_t), 3141592653U, NULL, "%u", + sizeof(int32_t), bogus_key1, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_NEGATE), + sizeof(int32_t), bogus_key2, NULL, "%d", + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, "3134983661", NULL, + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_NEGATE), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, "3134983661", NULL, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_SET_REQKEY_KEYRING */ + do_keyctl(ARG_STR(KEYCTL_SET_REQKEY_KEYRING), + sizeof(int32_t), ARG_STR(KEY_REQKEY_DEFL_NO_CHANGE), NULL, + 0UL); + /* + * Keep it commented out until proper way of faking syscalls is not + * implemented. + */ + /* do_keyctl(ARG_STR(KEYCTL_SET_REQKEY_KEYRING), + sizeof(int32_t), + ARG_STR(KEY_REQKEY_DEFL_REQUESTOR_KEYRING), NULL, 0UL); */ + do_keyctl(ARG_STR(KEYCTL_SET_REQKEY_KEYRING), + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, + "0xbadc0ded /* KEY_REQKEY_DEFL_??? */", NULL, 0UL); + + + /* KEYCTL_SET_TIMEOUT */ + do_keyctl(ARG_STR(KEYCTL_SET_TIMEOUT), + sizeof(int32_t), 0, NULL, "%d", + sizeof(uint32_t), 0, NULL, "%u", 0UL); + do_keyctl(ARG_STR(KEYCTL_SET_TIMEOUT), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(uint32_t), 3141592653U, NULL, "%u", 0UL); + do_keyctl(ARG_STR(KEYCTL_SET_TIMEOUT), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, "3134983661", NULL, + 0UL); + + + /* KEYCTL_ASSUME_AUTHORITY */ + do_keyctl(ARG_STR(KEYCTL_ASSUME_AUTHORITY), + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_ASSUME_AUTHORITY), + sizeof(int32_t), bogus_key1, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_ASSUME_AUTHORITY), + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_ASSUME_AUTHORITY), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_GET_SECURITY */ + do_keyctl(ARG_STR(KEYCTL_GET_SECURITY), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(uint32_t), 0xbadc0dedU, NULL, "%u", 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_SECURITY), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_SECURITY), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) 9, (uintptr_t) bogus_buf1, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 9, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_SECURITY), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) 256, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 256, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_SECURITY), + sizeof(int32_t), ARG_STR(KEY_SPEC_THREAD_KEYRING), NULL, + (size_t) -4, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) -4, NULL, ksize_fmt, 0UL); + + + /* KEYCTL_SESSION_TO_PARENT */ + do_keyctl(ARG_STR(KEYCTL_SESSION_TO_PARENT), 0UL); + + + /* KEYCTL_REJECT */ + do_keyctl(ARG_STR(KEYCTL_REJECT), + sizeof(int32_t), 0, NULL, "%d", + sizeof(uint32_t), 0, NULL, "%u", + sizeof(uint32_t), 0, NULL, "%u", + sizeof(int32_t), 0, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_REJECT), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(uint32_t), 3141592653U, NULL, "%u", + sizeof(uint32_t), 2718281828U, NULL, "%u", + sizeof(int32_t), bogus_key1, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_REJECT), + sizeof(int32_t), bogus_key2, NULL, "%d", + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadca75facef157LLU, "4207866199", NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, "3134983661", NULL, + sizeof(int32_t), bogus_key2, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_REJECT), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, "3134983661", NULL, + sizeof(uint32_t), ARG_STR(ENODEV), NULL, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL); + + + /* KEYCTL_INSTANTIATE_IOV */ + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE_IOV), + sizeof(int32_t), 0, NULL, "%d", + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + sizeof(int32_t), 0, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE_IOV), + sizeof(int32_t), bogus_key1, NULL, "%d", + sizeof(char *), (char *) 0xfffffacefffffeedULL, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xdeadfeedLLU, NULL, ksize_fmt, + sizeof(int32_t), bogus_key1, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE_IOV), + sizeof(int32_t), bogus_key2, NULL, "%d", + sizeof(char *), key_iov + IOV_SIZE, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 32LLU, NULL, ksize_fmt, + sizeof(int32_t), bogus_key2, NULL, "%d"); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE_IOV), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + sizeof(key_iov), key_iov + IOV_SIZE - 4, key_iov_str1, NULL, + sizeof(kernel_ulong_t), (kernel_ulong_t) 4, NULL, + ksize_fmt, + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL); + do_keyctl(ARG_STR(KEYCTL_INSTANTIATE_IOV), + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, + sizeof(key_iov), key_iov, key_iov_str2, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) IOV_SIZE, NULL, ksize_fmt, + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL); + + + /* KEYCTL_INVALIDATE */ + do_keyctl(ARG_STR(KEYCTL_INVALIDATE), + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_INVALIDATE), + sizeof(int32_t), bogus_key1, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_INVALIDATE), + sizeof(int32_t), bogus_key2, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_INVALIDATE), + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_GET_PERSISTENT */ + do_keyctl(ARG_STR(KEYCTL_GET_PERSISTENT), + sizeof(uid_t), ARG_STR(-1), NULL, + sizeof(int32_t), ARG_STR(KEY_SPEC_GROUP_KEYRING), NULL, 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_PERSISTENT), + sizeof(uid_t), 2718281828U, NULL, "%u", + sizeof(int32_t), bogus_key1, NULL, "%d", 0UL); + do_keyctl(ARG_STR(KEYCTL_GET_PERSISTENT), + sizeof(uid_t), 2718281828U, NULL, "%u", + sizeof(kernel_ulong_t), bogus_key3, bogus_key3_str, NULL, + 0UL); + + + /* KEYCTL_DH_COMPUTE */ + nul_terminated_buf = false; + + /* Empty result is expected for these */ + bogus_buf1[0] = '\377'; + bogus_buf2[0] = '\377'; + + do_keyctl(ARG_STR(KEYCTL_DH_COMPUTE), + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(char *), ARG_STR(NULL), ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_DH_COMPUTE), + sizeof(char *), kcdhp + 1, NULL, ptr_fmt, + sizeof(char *), (char *) 0xfffff157ffffdeadULL, NULL, ptr_fmt, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 0xfeedf157badc0dedLLU, NULL, ksize_fmt, + 0UL); + do_keyctl(ARG_STR(KEYCTL_DH_COMPUTE), + sizeof(kcdhp), kcdhp, kcdhp_str, NULL, + (size_t) 9, (uintptr_t) bogus_buf1, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 9, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_DH_COMPUTE), + sizeof(kcdhp), kcdhp, kcdhp_str, NULL, + (size_t) 256, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) 256, NULL, ksize_fmt, 0UL); + do_keyctl(ARG_STR(KEYCTL_DH_COMPUTE), + sizeof(kcdhp), kcdhp, kcdhp_str, NULL, + (size_t) -1, (uintptr_t) bogus_buf2, NULL, NULL, + sizeof(kernel_ulong_t), + (kernel_ulong_t) -1, NULL, ksize_fmt, 0UL); + + nul_terminated_buf = true; + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_keyctl"); + +#endif diff --git a/tests-mx32/keyctl.test b/tests-mx32/keyctl.test new file mode 100755 index 000000000..875a82d3b --- /dev/null +++ b/tests-mx32/keyctl.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of keyctl syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 -s10 diff --git a/tests-mx32/kill.c b/tests-mx32/kill.c new file mode 100644 index 000000000..cb884aa1a --- /dev/null +++ b/tests-mx32/kill.c @@ -0,0 +1,79 @@ +/* + * Check decoding of kill syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Fei Jie + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_kill + +# include +# include +# include + +static void +handler(int sig) +{ +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const int pid = getpid(); + long rc = syscall(__NR_kill, pid, (long) 0xdefaced00000000ULL | SIGALRM); + printf("kill(%d, SIGALRM) = %ld\n", pid, rc); + + const long big_pid = (long) 0xfacefeedbadc0dedULL; + const long big_sig = (long) 0xdeadbeefcafef00dULL; + rc = syscall(__NR_kill, big_pid, big_sig); + printf("kill(%d, %d) = %ld %s (%m)\n", + (int) big_pid, (int) big_sig, rc, errno2name()); + + rc = syscall(__NR_kill, (long) 0xdefaced00000000ULL | pid, 0); + printf("kill(%d, SIG_0) = %ld\n", pid, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kill") + +#endif diff --git a/tests-mx32/kill.test b/tests-mx32/kill.test new file mode 100755 index 000000000..7a3a51aaf --- /dev/null +++ b/tests-mx32/kill.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kill syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 -esignal=none diff --git a/tests-mx32/ksysent.c b/tests-mx32/ksysent.c new file mode 100644 index 000000000..8cac93ca5 --- /dev/null +++ b/tests-mx32/ksysent.c @@ -0,0 +1,128 @@ +/* + * Validate syscallent.h file. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "sysent.h" +#include +#include +#include + +#define TD 0 +#define TF 0 +#define TI 0 +#define TN 0 +#define TP 0 +#define TS 0 +#define TM 0 +#define NF 0 +#define MA 0 +#define SI 0 +#define SE 0 +#define CST 0 +#define SEN(arg) 0,0 + +static const struct_sysent syscallent[] = { +#include "syscallent.h" +}; + +typedef const char *pstr_t; +static const pstr_t ksyslist[] = { +#include "ksysent.h" +}; + +int +main(void) +{ + int rc = 0; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(ksyslist); ++i) { + if (!ksyslist[i]) + continue; + if (i >= ARRAY_SIZE(syscallent) || !syscallent[i].sys_name) { + fprintf(stderr, "warning: \"%s\" syscall #%u" + " is missing in syscallent.h\n", + ksyslist[i], i); + continue; + } +#ifdef SYS_socket_nsubcalls + if (i >= SYS_socket_subcall && + i < SYS_socket_subcall + SYS_socket_nsubcalls) { + fprintf(stderr, "error: \"%s\" syscall #%u" + " is a socket subcall in syscallent.h\n", + ksyslist[i], i); + rc = 1; + continue; + } +#endif +#ifdef SYS_ipc_nsubcalls + if (i >= SYS_ipc_subcall && + i < SYS_ipc_subcall + SYS_ipc_nsubcalls) { + fprintf(stderr, "error: \"%s\" syscall #%u" + " is an ipc subcall in syscallent.h\n", + ksyslist[i], i); + rc = 1; + continue; + } +#endif + if (strcmp(ksyslist[i], syscallent[i].sys_name)) { + fprintf(stderr, "error: \"%s\" syscall #%u" + " is \"%s\" in syscallent.h\n", + ksyslist[i], i, syscallent[i].sys_name); + rc = 1; + continue; + } + } + + for (i = 0; i < ARRAY_SIZE(syscallent); ++i) { + if (!syscallent[i].sys_name +#ifdef SYS_socket_nsubcalls + || (i >= SYS_socket_subcall && + i < SYS_socket_subcall + SYS_socket_nsubcalls) +#endif +#ifdef SYS_ipc_nsubcalls + || (i >= SYS_ipc_subcall && + i < SYS_ipc_subcall + SYS_ipc_nsubcalls) +#endif +#ifdef ARM_FIRST_SHUFFLED_SYSCALL + || (i >= ARM_FIRST_SHUFFLED_SYSCALL && + i <= ARM_FIRST_SHUFFLED_SYSCALL + + ARM_LAST_SPECIAL_SYSCALL + 1) +#endif + ) + continue; + if (i >= ARRAY_SIZE(ksyslist) || !ksyslist[i]) { + fprintf(stderr, "note: unknown syscall #%u" + " is \"%s\" in syscallent.h\n", + i, syscallent[i].sys_name); + } + } + + return rc; +} diff --git a/tests-mx32/ksysent.sed b/tests-mx32/ksysent.sed new file mode 100644 index 000000000..63ded4a99 --- /dev/null +++ b/tests-mx32/ksysent.sed @@ -0,0 +1,15 @@ +#!/bin/sed -rnf + +# should not have been exported at all +/#define[[:space:]]+__NR_(sys_epoll_|arch_specific_syscall|syscalls|syscall_count|syscall_max|available|reserved|unused)/d + +# should not have been named this way +s/__NR_(arm|xtensa)_fadvise64_64/__NR_fadvise64_64/ + +# legacy names +s/__NR_get_cpu/__NR_getcpu/ +s/__NR_madvise1/__NR_madvise/ +s/__NR_paccept/__NR_accept4/ + +# generate +s/#define[[:space:]]+__NR_([a-z_][^[:space:]]+)([[:space:]].*)?$/#ifdef __NR_\1\n[__NR_\1 \& 0xffff] = "\1",\n#endif/p diff --git a/tests-mx32/ksysent.test b/tests-mx32/ksysent.test new file mode 100755 index 000000000..802664885 --- /dev/null +++ b/tests-mx32/ksysent.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Validate syscallent.h + +./ksysent diff --git a/tests-mx32/lchown.c b/tests-mx32/lchown.c new file mode 100644 index 000000000..a07c878c0 --- /dev/null +++ b/tests-mx32/lchown.c @@ -0,0 +1,19 @@ +#include "tests.h" +#include + +#ifdef __NR_lchown + +# define SYSCALL_NR __NR_lchown +# define SYSCALL_NAME "lchown" + +# if defined __NR_lchown32 && __NR_lchown != __NR_lchown32 +# define UGID_TYPE_IS_SHORT +# endif + +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lchown") + +#endif diff --git a/tests-mx32/lchown.test b/tests-mx32/lchown.test new file mode 100755 index 000000000..ceeaa859e --- /dev/null +++ b/tests-mx32/lchown.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check lchown syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a30 diff --git a/tests-mx32/lchown32.c b/tests-mx32/lchown32.c new file mode 100644 index 000000000..29cb01dba --- /dev/null +++ b/tests-mx32/lchown32.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_lchown32 + +# define SYSCALL_NR __NR_lchown32 +# define SYSCALL_NAME "lchown32" +# include "xchownx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lchown32") + +#endif diff --git a/tests-mx32/lchown32.test b/tests-mx32/lchown32.test new file mode 100755 index 000000000..6ee1ac959 --- /dev/null +++ b/tests-mx32/lchown32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check lchown32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 diff --git a/tests-mx32/libmmsg.c b/tests-mx32/libmmsg.c new file mode 100644 index 000000000..b0db26d22 --- /dev/null +++ b/tests-mx32/libmmsg.c @@ -0,0 +1,69 @@ +/* + * Wrappers for recvmmsg and sendmmsg syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#ifndef __NR_recvmmsg +# define __NR_recvmmsg -1 +#endif +#define SC_recvmmsg 19 + +#ifndef __NR_sendmmsg +# define __NR_sendmmsg -1 +#endif +#define SC_sendmmsg 20 + +int +recv_mmsg(const int fd, struct mmsghdr *const vec, + const unsigned int vlen, const unsigned int flags, + struct timespec *const timeout) +{ + int rc = socketcall(__NR_recvmmsg, SC_recvmmsg, + fd, (long) vec, vlen, flags, (long) timeout); + + if (rc < 0 && ENOSYS == errno) + perror_msg_and_skip("recvmmsg"); + + return rc; +} + +int +send_mmsg(const int fd, struct mmsghdr *const vec, + const unsigned int vlen, const unsigned int flags) +{ + int rc = socketcall(__NR_sendmmsg, SC_sendmmsg, + fd, (long) vec, vlen, flags, 0); + + if (rc < 0 && ENOSYS == errno) + perror_msg_and_skip("sendmmsg"); + + return rc; +} diff --git a/tests-mx32/libsocketcall.c b/tests-mx32/libsocketcall.c new file mode 100644 index 000000000..04d6710f8 --- /dev/null +++ b/tests-mx32/libsocketcall.c @@ -0,0 +1,69 @@ +/* + * Invoke a socket syscall, either directly or via __NR_socketcall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +/* + * Invoke a socket syscall, either directly or via __NR_socketcall. + * if nr == -1, no direct syscall invocation will be made. + */ +int +socketcall(const int nr, const int call, + long a1, long a2, long a3, long a4, long a5) +{ + int rc = -1; + errno = ENOSYS; + +# ifdef __NR_socketcall + static int have_socketcall = -1; + + if (have_socketcall < 0) { + if (syscall(__NR_socketcall, 0L, 0L, 0L, 0L, 0L) < 0 + && EINVAL == errno) { + have_socketcall = 1; + } else { + have_socketcall = 0; + } + } + + if (have_socketcall) { + const long args[] = { a1, a2, a3, a4, a5 }; + rc = syscall(__NR_socketcall, call, args); + } else +# endif + { + if (nr != -1) + rc = syscall(nr, a1, a2, a3, a4, a5); + } + + return rc; +} diff --git a/tests-mx32/link.c b/tests-mx32/link.c new file mode 100644 index 000000000..d6550fd3a --- /dev/null +++ b/tests-mx32/link.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_link + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "link_sample_old"; + static const char sample_2[] = "link_sample_new"; + + long rc = syscall(__NR_link, sample_1, sample_2); + printf("link(\"%s\", \"%s\") = %ld %s (%m)\n", + sample_1, sample_2, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_link") + +#endif diff --git a/tests-mx32/link.test b/tests-mx32/link.test new file mode 100755 index 000000000..cfa2b0cc1 --- /dev/null +++ b/tests-mx32/link.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check link syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/linkat.c b/tests-mx32/linkat.c new file mode 100644 index 000000000..64b900ea0 --- /dev/null +++ b/tests-mx32/linkat.c @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#ifdef __NR_linkat + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "linkat_sample_old"; + static const char sample_2[] = "linkat_sample_new"; + const long fd_old = (long) 0xdeadbeefffffffffULL; + const long fd_new = (long) 0xdeadbeeffffffffeULL; + + long rc = syscall(__NR_linkat, fd_old, sample_1, fd_new, sample_2, 0); + printf("linkat(%d, \"%s\", %d, \"%s\", 0) = %ld %s (%m)\n", + (int) fd_old, sample_1, (int) fd_new, sample_2, + rc, errno2name()); + + rc = syscall(__NR_linkat, -100, sample_1, -100, sample_2, -1L); + printf("linkat(%s, \"%s\", %s, \"%s\", %s) = %ld %s (%m)\n", + "AT_FDCWD", sample_1, "AT_FDCWD", sample_2, + "AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW" + "|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|0xffffe0ff", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_linkat") + +#endif diff --git a/tests-mx32/linkat.test b/tests-mx32/linkat.test new file mode 100755 index 000000000..5627de7f9 --- /dev/null +++ b/tests-mx32/linkat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check linkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/llseek.c b/tests-mx32/llseek.c new file mode 100644 index 000000000..e687e947a --- /dev/null +++ b/tests-mx32/llseek.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR__llseek + +# include +# include + +int +main(void) +{ + const unsigned long high = 0xfacefeed; + const unsigned long low = 0xdeadbeef; + const long long offset = 0xfacefeeddeadbeefLL; + unsigned long long result; + + long rc = syscall(__NR__llseek, -1, high, low, &result, SEEK_SET); + printf("_llseek(-1, %lld, %p, SEEK_SET) = %ld %s (%m)\n", + offset, &result, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR__llseek") + +#endif diff --git a/tests-mx32/llseek.test b/tests-mx32/llseek.test new file mode 100755 index 000000000..cf1607edf --- /dev/null +++ b/tests-mx32/llseek.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check _llseek syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -e_llseek $args > "$EXP" +grep -v '^lseek([0-9]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-mx32/lookup_dcookie.c b/tests-mx32/lookup_dcookie.c new file mode 100644 index 000000000..986180ce3 --- /dev/null +++ b/tests-mx32/lookup_dcookie.c @@ -0,0 +1,96 @@ +/* + * Check decoding of lookup_dcookie syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_lookup_dcookie + +# include +# include +# include +# include + +static void +do_lookup_cookie(uint64_t cookie, char *buf, kernel_ulong_t len) +{ + long rc; + const char *errstr; + +# if (LONG_MAX > INT_MAX) \ + || (defined __x86_64__ && defined __ILP32__) \ + || defined LINUX_MIPSN32 + rc = syscall(__NR_lookup_dcookie, cookie, buf, len); +# else + rc = syscall(__NR_lookup_dcookie, LL_VAL_TO_PAIR(cookie), buf, len); +# endif + + errstr = sprintrc(rc); + printf("lookup_dcookie(%" PRIu64 ", ", cookie); + + /* Here, we trust successful return code */ + if ((rc >= 0) && (rc < (long) INT_MAX)) { + printf("%.*s, ", (int) rc, buf); + } else { + if (buf != NULL) + printf("%p, ", buf); + else + printf("NULL, "); + } + + printf("%" PRIu64 ") = %s\n", (uint64_t) len, errstr); +} + +int +main(void) +{ + enum { BUF_SIZE = 4096 }; + + static const uint64_t bogus_cookie = + (uint64_t) 0xf157feeddeadfaceULL; + static const kernel_ulong_t bogus_len = + (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + + char *buf = tail_alloc(BUF_SIZE); + + do_lookup_cookie(0, NULL, 0); + do_lookup_cookie(bogus_cookie, buf + BUF_SIZE, bogus_len); + do_lookup_cookie(bogus_cookie, buf, BUF_SIZE); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_lookup_dcookie"); + +#endif diff --git a/tests-mx32/lookup_dcookie.test b/tests-mx32/lookup_dcookie.test new file mode 100755 index 000000000..47e1c2d61 --- /dev/null +++ b/tests-mx32/lookup_dcookie.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of lookup_cookie syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-mx32/lseek.c b/tests-mx32/lseek.c new file mode 100644 index 000000000..4428c4e91 --- /dev/null +++ b/tests-mx32/lseek.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_lseek + +# include +# include + +int +main(void) +{ + const kernel_ulong_t offset = (kernel_ulong_t) 0xfacefeeddeadbeefULL; + + if (sizeof(offset) > sizeof(long)) { + /* + * Cannot use syscall because it takes long arguments. + * Let's call lseek with hope it will invoke lseek syscall. + */ + long long rc = lseek(-1, offset, SEEK_SET); + printf("lseek(-1, %lld, SEEK_SET) = %lld %s (%m)\n", + (long long) offset, rc, errno2name()); + } else { + long rc = syscall(__NR_lseek, -1L, offset, SEEK_SET); + printf("lseek(-1, %ld, SEEK_SET) = %ld %s (%m)\n", + (long) offset, rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_lseek") + +#endif diff --git a/tests-mx32/lseek.test b/tests-mx32/lseek.test new file mode 100755 index 000000000..f96a91d16 --- /dev/null +++ b/tests-mx32/lseek.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check lseek syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a30 -elseek $args > "$EXP" +grep -v '^lseek([0-9]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-mx32/lstat.c b/tests-mx32/lstat.c new file mode 100644 index 000000000..3754f766c --- /dev/null +++ b/tests-mx32/lstat.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_lstat + +# define TEST_SYSCALL_NR __NR_lstat +# define TEST_SYSCALL_STR "lstat" +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 43147718418ULL) +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lstat") + +#endif diff --git a/tests-mx32/lstat.test b/tests-mx32/lstat.test new file mode 100755 index 000000000..f513bb487 --- /dev/null +++ b/tests-mx32/lstat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check lstat syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-mx32/lstat64.c b/tests-mx32/lstat64.c new file mode 100644 index 000000000..da06609dd --- /dev/null +++ b/tests-mx32/lstat64.c @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_lstat64 + +# define TEST_SYSCALL_NR __NR_lstat64 +# define TEST_SYSCALL_STR "lstat64" +# define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" +# define STRUCT_STAT_IS_STAT64 1 +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_lstat64") + +#endif diff --git a/tests-mx32/lstat64.test b/tests-mx32/lstat64.test new file mode 100755 index 000000000..fcafe79dd --- /dev/null +++ b/tests-mx32/lstat64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check lstat64 syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-mx32/lstatx.c b/tests-mx32/lstatx.c new file mode 100644 index 000000000..cdd1124b6 --- /dev/null +++ b/tests-mx32/lstatx.c @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define TEST_SYSCALL_INVOKE(sample, pst) \ + syscall(TEST_SYSCALL_NR, sample, pst) +#define PRINT_SYSCALL_HEADER(sample) \ + do { \ + int saved_errno = errno; \ + printf("%s(\"%s\", ", TEST_SYSCALL_STR, sample) +#define PRINT_SYSCALL_FOOTER(rc) \ + errno = saved_errno; \ + printf(") = %s\n", sprintrc(rc)); \ + } while (0) + +#include "xstatx.c" diff --git a/tests-mx32/match.awk b/tests-mx32/match.awk new file mode 100644 index 000000000..abfbae926 --- /dev/null +++ b/tests-mx32/match.awk @@ -0,0 +1,53 @@ +#!/bin/gawk +# +# Copyright (c) 2014-2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# s[] is array of match strings +# r[] is array of match patterns + +NR > lines { next } + +{ + if (s[NR]) { + if ($0 == s[NR]) + next + print "Line " NR " does not match expected string: " s[NR] + } else { + if (match($0, r[NR])) + next + print "Line " NR " does not match expected pattern: " r[NR] + } + + fail = 1 +} + +END { + if (fail == 0 && NR != lines) { + fail = 1 + print "Expected " lines " lines, found " NR " line(s)." + } + exit fail +} diff --git a/tests-mx32/mbind.c b/tests-mx32/mbind.c new file mode 100644 index 000000000..b0544263d --- /dev/null +++ b/tests-mx32/mbind.c @@ -0,0 +1,61 @@ +/* + * Check decoding of mbind syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_mbind + +# include +# include + +int +main(void) +{ + const unsigned long len = (unsigned long) 0xcafef00dbadc0dedULL; + const unsigned long mode = 3; + const unsigned long nodemask = (unsigned long) 0xfacefeedfffffff1ULL; + const unsigned long maxnode = (unsigned long) 0xdeadbeeffffffff2ULL; + const unsigned long flags = -1UL; + + long rc = syscall(__NR_mbind, 0, len, mode, nodemask, maxnode, flags); + printf("mbind(NULL, %lu, %s, %#lx, %lu, %s|%#x) = %ld %s (%m)\n", + len, "MPOL_INTERLEAVE", nodemask, maxnode, + "MPOL_MF_STRICT|MPOL_MF_MOVE|MPOL_MF_MOVE_ALL", + (unsigned) flags & ~7, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mbind") + +#endif diff --git a/tests-mx32/mbind.test b/tests-mx32/mbind.test new file mode 100755 index 000000000..2a07cac65 --- /dev/null +++ b/tests-mx32/mbind.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mbind syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/membarrier.c b/tests-mx32/membarrier.c new file mode 100644 index 000000000..330893b6c --- /dev/null +++ b/tests-mx32/membarrier.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_membarrier + +# include +# include +# include +# include + +int +main(void) +{ + assert(syscall(__NR_membarrier, 3, 255) == -1); + int saved_errno = errno; + printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = %s\n", + sprintrc(-1)); + if (saved_errno != ENOSYS) { + /* the test needs to be updated? */ + assert(syscall(__NR_membarrier, 0, 0) == 1); + puts("membarrier(MEMBARRIER_CMD_QUERY, 0)" + " = 0x1 (MEMBARRIER_CMD_SHARED)"); + } + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_membarrier") + +#endif diff --git a/tests-mx32/membarrier.test b/tests-mx32/membarrier.test new file mode 100755 index 000000000..ad1f713b6 --- /dev/null +++ b/tests-mx32/membarrier.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check membarrier syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff --git a/tests-mx32/memfd_create.c b/tests-mx32/memfd_create.c new file mode 100644 index 000000000..480fd1771 --- /dev/null +++ b/tests-mx32/memfd_create.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_memfd_create + +# include +# include + +int +main(void) +{ + static const char text[] = "strace"; + int rc = syscall(__NR_memfd_create, text, 7); + + printf("memfd_create(\"%s\", %s) = %d %s (%m)\n", + text, "MFD_CLOEXEC|MFD_ALLOW_SEALING|0x4", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_memfd_create") + +#endif diff --git a/tests-mx32/memfd_create.test b/tests-mx32/memfd_create.test new file mode 100755 index 000000000..4361dae40 --- /dev/null +++ b/tests-mx32/memfd_create.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of memfd_create syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/migrate_pages.c b/tests-mx32/migrate_pages.c new file mode 100644 index 000000000..4c303e380 --- /dev/null +++ b/tests-mx32/migrate_pages.c @@ -0,0 +1,54 @@ +/* + * Check decoding of migrate_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_migrate_pages + +# include +# include + +int +main(void) +{ + const long pid = (long) 0xfacefeedffffffffULL; + long rc = syscall(__NR_migrate_pages, pid, 0, 0, 0); + printf("migrate_pages(%d, 0, NULL, NULL) = %ld %s (%m)\n", + (int) pid, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_migrate_pages") + +#endif diff --git a/tests-mx32/migrate_pages.test b/tests-mx32/migrate_pages.test new file mode 100755 index 000000000..fad53b79a --- /dev/null +++ b/tests-mx32/migrate_pages.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check migrate_pages syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 diff --git a/tests-mx32/mincore.c b/tests-mx32/mincore.c new file mode 100644 index 000000000..ea2b49e38 --- /dev/null +++ b/tests-mx32/mincore.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#define DEFAULT_STRLEN 32 + +static void +print_mincore(const unsigned int pages, void *const addr, + const size_t size, unsigned char *const vec) +{ + unsigned int i; + + if (mincore(addr, size, vec)) + perror_msg_and_skip("mincore"); + + printf("mincore(%p, %zu, [", addr, size); + for (i = 0; i < pages; ++i) { + if (i) + printf(", "); + if (i >= DEFAULT_STRLEN) { + printf("..."); + break; + } + printf("%u", vec[i] & 1); + } + puts("]) = 0"); +} + +static void +test_mincore(const unsigned int pages) +{ + const size_t page_size = get_page_size(); + const size_t size = pages * page_size; + void *const addr = tail_alloc(size); + unsigned char *const vec = tail_alloc(pages); + + mincore(addr, size, NULL); + printf("mincore(%p, %zu, NULL) = -1 %s (%m)\n", + addr, size, errno2name()); + + print_mincore(pages, addr, size, vec); + if (size) + print_mincore(pages, addr, size - page_size + 1, vec); +} + +int main(void) +{ + test_mincore(1); + test_mincore(2); + test_mincore(DEFAULT_STRLEN); + test_mincore(DEFAULT_STRLEN + 1); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/mincore.test b/tests-mx32/mincore.test new file mode 100755 index 000000000..6af9f492f --- /dev/null +++ b/tests-mx32/mincore.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mincore syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff --git a/tests-mx32/mkdir.c b/tests-mx32/mkdir.c new file mode 100644 index 000000000..d971b1884 --- /dev/null +++ b/tests-mx32/mkdir.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_mkdir + +# define TEST_SYSCALL_NR __NR_mkdir +# define TEST_SYSCALL_STR "mkdir" +# include "umode_t.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_mkdir") + +#endif diff --git a/tests-mx32/mkdir.test b/tests-mx32/mkdir.test new file mode 100755 index 000000000..38ed6928a --- /dev/null +++ b/tests-mx32/mkdir.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mkdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff --git a/tests-mx32/mkdirat.c b/tests-mx32/mkdirat.c new file mode 100644 index 000000000..6bfe4a5fc --- /dev/null +++ b/tests-mx32/mkdirat.c @@ -0,0 +1,16 @@ +#include "tests.h" +#include + +#ifdef __NR_mkdirat + +# define TEST_SYSCALL_NR __NR_mkdirat +# define TEST_SYSCALL_STR "mkdirat" +# define TEST_SYSCALL_PREFIX_ARGS (long int) 0xdeadbeefffffffffULL, +# define TEST_SYSCALL_PREFIX_STR "-1, " +# include "umode_t.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_mkdirat") + +#endif diff --git a/tests-mx32/mkdirat.test b/tests-mx32/mkdirat.test new file mode 100755 index 000000000..0fcb841a9 --- /dev/null +++ b/tests-mx32/mkdirat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mkdirat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-mx32/mknod.c b/tests-mx32/mknod.c new file mode 100644 index 000000000..4cc1c5cb7 --- /dev/null +++ b/tests-mx32/mknod.c @@ -0,0 +1,73 @@ +#include "tests.h" +#include + +#ifdef __NR_mknod + +# include +# include +# include +# include + +static const char sample[] = "mknod"; + +static long +call_mknod(unsigned short mode, unsigned long dev) +{ + unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode; + return syscall(__NR_mknod, sample, lmode, dev); +} + +int +main(void) +{ + unsigned long dev = (unsigned long) 0xdeadbeefbadc0dedULL; + + long rc = call_mknod(0, dev); + printf("mknod(\"%s\", 000) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknod(0xffff, dev); + printf("mknod(\"%s\", %#03ho) = %ld %s (%m)\n", + sample, (unsigned short) -1, rc, errno2name()); + + rc = call_mknod(S_IFREG, 0); + printf("mknod(\"%s\", S_IFREG|000) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknod(S_IFDIR | 06, 0); + printf("mknod(\"%s\", S_IFDIR|006) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknod(S_IFLNK | 060, 0); + printf("mknod(\"%s\", S_IFLNK|060) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknod(S_IFIFO | 0600, 0); + printf("mknod(\"%s\", S_IFIFO|0600) = %ld %s (%m)\n", + sample, rc, errno2name()); + + dev = (unsigned long) 0xdeadbeef00000000ULL | makedev(1, 7); + + rc = call_mknod(S_IFCHR | 024, dev); + printf("mknod(\"%s\", S_IFCHR|024, makedev(1, 7)) = %ld %s (%m)\n", + sample, rc, errno2name()); + + const unsigned short mode = (0xffff & ~S_IFMT) | S_IFBLK; + dev = (unsigned long) 0xdeadbeefbadc0dedULL; + + rc = call_mknod(mode, dev); + printf("mknod(\"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho" + ", makedev(%u, %u)) = %ld %s (%m)\n", + sample, mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX), + major((unsigned) dev), minor((unsigned) dev), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mknod") + +#endif diff --git a/tests-mx32/mknod.test b/tests-mx32/mknod.test new file mode 100755 index 000000000..195f1e33f --- /dev/null +++ b/tests-mx32/mknod.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mknod syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 diff --git a/tests-mx32/mknodat.c b/tests-mx32/mknodat.c new file mode 100644 index 000000000..756e27713 --- /dev/null +++ b/tests-mx32/mknodat.c @@ -0,0 +1,74 @@ +#include "tests.h" +#include + +#ifdef __NR_mknodat + +# include +# include +# include +# include + +static const char sample[] = "mknodat_sample"; +static const long int fd = (long int) 0xdeadbeefffffffffULL; + +static long +call_mknodat(unsigned short mode, unsigned long dev) +{ + unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode; + return syscall(__NR_mknodat, fd, sample, lmode, dev); +} + +int +main(void) +{ + unsigned long dev = (unsigned long) 0xdeadbeefbadc0dedULL; + + long rc = call_mknodat(0, dev); + printf("mknodat(-1, \"%s\", 000) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknodat(0xffff, dev); + printf("mknodat(-1, \"%s\", %#03ho) = %ld %s (%m)\n", + sample, (unsigned short) -1, rc, errno2name()); + + rc = call_mknodat(S_IFREG, 0); + printf("mknodat(-1, \"%s\", S_IFREG|000) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknodat(S_IFDIR | 06, 0); + printf("mknodat(-1, \"%s\", S_IFDIR|006) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknodat(S_IFLNK | 060, 0); + printf("mknodat(-1, \"%s\", S_IFLNK|060) = %ld %s (%m)\n", + sample, rc, errno2name()); + + rc = call_mknodat(S_IFIFO | 0600, 0); + printf("mknodat(-1, \"%s\", S_IFIFO|0600) = %ld %s (%m)\n", + sample, rc, errno2name()); + + dev = (unsigned long) 0xdeadbeef00000000ULL | makedev(1, 7); + + rc = call_mknodat(S_IFCHR | 024, dev); + printf("mknodat(-1, \"%s\", S_IFCHR|024, makedev(1, 7)) = %ld %s (%m)\n", + sample, rc, errno2name()); + + const unsigned short mode = (0xffff & ~S_IFMT) | S_IFBLK; + dev = (unsigned long) 0xdeadbeefbadc0dedULL; + + rc = call_mknodat(mode, dev); + printf("mknodat(-1, \"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho" + ", makedev(%u, %u)) = %ld %s (%m)\n", + sample, mode & ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX), + major((unsigned) dev), minor((unsigned) dev), + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mknodat") + +#endif diff --git a/tests-mx32/mknodat.test b/tests-mx32/mknodat.test new file mode 100755 index 000000000..1701a368b --- /dev/null +++ b/tests-mx32/mknodat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mknodat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff --git a/tests-mx32/mlock.c b/tests-mx32/mlock.c new file mode 100644 index 000000000..8e9806bd5 --- /dev/null +++ b/tests-mx32/mlock.c @@ -0,0 +1,29 @@ +#include "tests.h" +#include + +#if defined __NR_mlock && defined __NR_munlock + +# include +# include + +int +main(void) +{ + const int size = 1024; + const char *addr = tail_alloc(size); + + long rc = syscall(__NR_mlock, addr, size); + printf("mlock(%p, %d) = %s\n", addr, size, sprintrc(rc)); + + rc = syscall(__NR_munlock, addr, size); + printf("munlock(%p, %d) = %s\n", addr, size, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mlock && __NR_munlock") + +#endif diff --git a/tests-mx32/mlock.test b/tests-mx32/mlock.test new file mode 100755 index 000000000..9a73a3063 --- /dev/null +++ b/tests-mx32/mlock.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mlock and munlock syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mlock,munlock -a20 diff --git a/tests-mx32/mlock2.c b/tests-mx32/mlock2.c new file mode 100644 index 000000000..71a2003ea --- /dev/null +++ b/tests-mx32/mlock2.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_mlock2 + +# include +# include + +int +main(void) +{ + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL; + const unsigned long len = (unsigned long) 0xcafef00dbadc0dedULL; + + long rc = syscall(__NR_mlock2, addr, len, -1UL); + printf("mlock2(%#lx, %lu, MLOCK_ONFAULT|0xfffffffe)" + " = %ld %s (%m)\n", addr, len, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mlock2") + +#endif diff --git a/tests-mx32/mlock2.test b/tests-mx32/mlock2.test new file mode 100755 index 000000000..bc412e97d --- /dev/null +++ b/tests-mx32/mlock2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mlock2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/mlockall.c b/tests-mx32/mlockall.c new file mode 100644 index 000000000..682d070da --- /dev/null +++ b/tests-mx32/mlockall.c @@ -0,0 +1,46 @@ +/* + * Check decoding of mlockall syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include + +int +main(void) +{ + int rc = mlockall(0); + printf("mlockall(0) = %s\n", sprintrc(rc)); + + rc = mlockall(MCL_CURRENT); + printf("mlockall(MCL_CURRENT) = %s\n", sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/mlockall.test b/tests-mx32/mlockall.test new file mode 100755 index 000000000..d7a6182d9 --- /dev/null +++ b/tests-mx32/mlockall.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mlockall syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff --git a/tests-mx32/mmap.c b/tests-mx32/mmap.c new file mode 100644 index 000000000..f726f63ef --- /dev/null +++ b/tests-mx32/mmap.c @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +int +main(int ac, char **av) +{ + const char *const name = ac > 1 ? av[1] : "mmap"; + const intmax_t pagesize = get_page_size(); + const unsigned long length1 = pagesize * 6; + const unsigned long length2 = pagesize * 3; + const unsigned long length3 = pagesize * 2; + const int fd = -1; + off_t offset; + void *addr, *p; + +#if ULONG_MAX > 4294967295UL + offset = 0xcafedeadbeef000ULL & -pagesize; + addr = (void *) (uintmax_t) (0xfacefeed000 & -pagesize); +#else + offset = 0xdeadbeef000ULL & -pagesize; + addr = (void *) (unsigned int) (0xfaced000 & -pagesize); +#endif + const uintmax_t uoffset = + sizeof(offset) == sizeof(int) ? (uintmax_t) (unsigned int) offset + : (uintmax_t) offset; + + (void) close(0); + (void) close(0); + printf("%s(NULL, 0, PROT_NONE, MAP_FILE, 0, 0) = -1 EBADF (%m)\n", + name); + mmap(NULL, 0, PROT_NONE, MAP_FILE, 0, 0); + + p = mmap(addr, length1, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, fd, offset); + if (MAP_FAILED == p) + perror_msg_and_fail("mmap"); + printf("%s(%p, %lu, PROT_READ|PROT_WRITE, " + "MAP_PRIVATE|MAP_ANONYMOUS, %d, %#jx) = %p\n", + name, addr, length1, fd, uoffset, p); + + if (msync(p, length1, MS_SYNC)) + perror_msg_and_fail("msync"); + printf("msync(%p, %lu, MS_SYNC) = 0\n", p, length1); + + if (mprotect(p, length1, PROT_NONE)) + perror_msg_and_fail("mprotect"); + printf("mprotect(%p, %lu, PROT_NONE) = 0\n", p, length1); + + addr = mremap(p, length1, length2, 0); + if (MAP_FAILED == addr) + perror_msg_and_fail("mremap"); + printf("mremap(%p, %lu, %lu, 0) = %p\n", p, length1, length2, addr); + + p = mremap(addr, length2, length3, MREMAP_MAYMOVE | MREMAP_FIXED, + addr + length2); + if (MAP_FAILED == p) + perror_msg_and_fail("mremap"); + printf("mremap(%p, %lu, %lu, MREMAP_MAYMOVE|MREMAP_FIXED" + ", %p) = %p\n", addr, length2, length3, addr + length2, p); + + if (madvise(p, length3, MADV_NORMAL)) + perror_msg_and_fail("madvise"); + printf("madvise(%p, %lu, MADV_NORMAL) = 0\n", p, length3); + + if (munmap(p, length3)) + perror_msg_and_fail("munmap"); + printf("munmap(%p, %lu) = 0\n", p, length3); + + if (mlockall(MCL_FUTURE)) + perror_msg_and_fail("mlockall"); + puts("mlockall(MCL_FUTURE) = 0"); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/mmap.test b/tests-mx32/mmap.test new file mode 100755 index 000000000..0b87114a6 --- /dev/null +++ b/tests-mx32/mmap.test @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Check mmap/mmap2, madvise, mlockall, mprotect, mremap, msync, and munmap +# syscalls decoding. +# +# Copyright (c) 2015-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +check_prog grep +check_prog sed +run_prog > /dev/null + +syscall= +for n in mmap mmap2; do + $STRACE -e$n -h > /dev/null && syscall=$syscall,$n +done +run_strace -e$syscall $args > /dev/null + +if grep '^mmap(NULL, 0, PROT_NONE,' < "$LOG" > /dev/null; then + mmap=mmap +elif grep '^mmap2(NULL, 0, PROT_NONE,' < "$LOG" > /dev/null; then + mmap=mmap2 +else + dump_log_and_fail_with "mmap/mmap2 not found in $STRACE $args output" +fi + +syscall=$mmap,madvise,mlockall,mprotect,mremap,msync,munmap + +run_prog "./$NAME" $mmap > /dev/null +run_strace -a20 -e$syscall $args > "$EXP" +sed -n "/^$mmap(NULL, 0, PROT_NONE,/,\$p" < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/mmap64.c b/tests-mx32/mmap64.c new file mode 100644 index 000000000..b31ce4278 --- /dev/null +++ b/tests-mx32/mmap64.c @@ -0,0 +1 @@ +#include "mmap.c" diff --git a/tests-mx32/mmap64.test b/tests-mx32/mmap64.test new file mode 100755 index 000000000..51f1896ed --- /dev/null +++ b/tests-mx32/mmap64.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check mmap/mprotect/munmap syscalls decoding. +# Target executable was compiled with -D_FILE_OFFSET_BITS=64. + +. "${srcdir=.}/mmap.test" diff --git a/tests-mx32/mmsg-silent.c b/tests-mx32/mmsg-silent.c new file mode 100644 index 000000000..47d0a504e --- /dev/null +++ b/tests-mx32/mmsg-silent.c @@ -0,0 +1,63 @@ +/* + * Check silent decoding of sendmmsg and recvmmsg syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#include "msghdr.h" + +int +main(void) +{ + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + + char buf = 'A'; + struct iovec iov = { .iov_base = &buf, .iov_len = sizeof(buf) }; + struct mmsghdr mh = { + .msg_hdr = { + .msg_iov = &iov, + .msg_iovlen = 1 + } + }; + + int rc = send_mmsg(fds[1], &mh, 1, MSG_DONTWAIT); + if (rc < 0) + perror_msg_and_skip("sendmmsg"); + printf("sendmmsg(%d, %p, 1, MSG_DONTWAIT) = %d\n", fds[1], &mh, rc); + + struct timespec t = { .tv_sec = 0, .tv_nsec = 12345678 }; + rc = recv_mmsg(fds[0], &mh, 1, MSG_DONTWAIT, &t); + printf("recvmmsg(%d, %p, 1, MSG_DONTWAIT, %p) = %d\n", + fds[0], &mh, &t, rc); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/mmsg-silent.test b/tests-mx32/mmsg-silent.test new file mode 100755 index 000000000..775e0ad34 --- /dev/null +++ b/tests-mx32/mmsg-silent.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check silent decoding of sendmmsg and recvmmsg syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 -e verbose=none -e trace=sendmmsg,recvmmsg diff --git a/tests-mx32/mmsg.c b/tests-mx32/mmsg.c new file mode 100644 index 000000000..88805d16a --- /dev/null +++ b/tests-mx32/mmsg.c @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2014 Masatake YAMATO + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#include "msghdr.h" + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (socketpair(AF_UNIX, SOCK_DGRAM, 0, fds)) + perror_msg_and_skip("socketpair"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + const struct iovec w0_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + } + }; + struct iovec *w0_iov = tail_memdup(w0_iov_, sizeof(w0_iov_)); + + const struct iovec w1_iov_[] = { + { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + struct iovec *w1_iov = tail_memdup(w1_iov_, sizeof(w1_iov_)); + + const struct mmsghdr w_mmh_[] = { + { + .msg_hdr = { + .msg_iov = w0_iov, + .msg_iovlen = ARRAY_SIZE(w0_iov_), + } + }, { + .msg_hdr = { + .msg_iov = w1_iov, + .msg_iovlen = ARRAY_SIZE(w1_iov_), + } + } + }; + void *w_mmh = tail_memdup(w_mmh_, sizeof(w_mmh_)); + const unsigned int n_w_mmh = ARRAY_SIZE(w_mmh_); + + int r = send_mmsg(1, w_mmh, n_w_mmh, MSG_DONTROUTE | MSG_NOSIGNAL); + if (r < 0) + perror_msg_and_skip("sendmmsg"); + assert(r == (int) n_w_mmh); + assert(close(1) == 0); + tprintf("sendmmsg(1, [{msg_hdr={msg_name=NULL, msg_namelen=0" + ", msg_iov=[{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}], msg_iovlen=%u" + ", msg_controllen=0, msg_flags=0}, msg_len=%u}" + ", {msg_hdr={msg_name=NULL, msg_namelen=0" + ", msg_iov=[{iov_base=\"%s\", iov_len=%u}], msg_iovlen=%u" + ", msg_controllen=0, msg_flags=0}, msg_len=%u}], %u" + ", MSG_DONTROUTE|MSG_NOSIGNAL) = %d\n" + " = %u buffers in vector 0\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " = %u buffers in vector 1\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), + w1_c, LENGTH_OF(w1_c), + ARRAY_SIZE(w0_iov_), + LENGTH_OF(w0_c) + LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w1_iov_), + LENGTH_OF(w2_c), + n_w_mmh, r, + ARRAY_SIZE(w0_iov_), LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, + ARRAY_SIZE(w1_iov_), LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + struct iovec *r0_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = r_len + } + }; + struct iovec *r1_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + const struct mmsghdr r_mmh_[] = { + { + .msg_hdr = { + .msg_iov = r0_iov, + .msg_iovlen = ARRAY_SIZE(r0_iov_), + } + }, { + .msg_hdr = { + .msg_iov = r1_iov, + .msg_iovlen = ARRAY_SIZE(r1_iov_), + } + } + }; + void *r_mmh = tail_memdup(r_mmh_, sizeof(r_mmh_)); + const unsigned int n_r_mmh = ARRAY_SIZE(r_mmh_); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + assert(recv_mmsg(0, r_mmh, n_r_mmh, MSG_DONTWAIT, NULL) == (int) n_r_mmh); + assert(close(0) == 0); + tprintf("recvmmsg(0, [{msg_hdr={msg_name=NULL, msg_namelen=0" + ", msg_iov=[{iov_base=\"%s\", iov_len=%u}], msg_iovlen=%u" + ", msg_controllen=0, msg_flags=0}, msg_len=%u}" + ", {msg_hdr={msg_name=NULL, msg_namelen=0" + ", msg_iov=[{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"\", iov_len=%u}], msg_iovlen=%u" + ", msg_controllen=0, msg_flags=0}, msg_len=%u}], %u" + ", MSG_DONTWAIT, NULL) = %d\n" + " = %u buffers in vector 0\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " = %u buffers in vector 1\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), LENGTH_OF(r0_c), + r1_c, r_len, r_len, ARRAY_SIZE(r1_iov_), LENGTH_OF(r1_c), + n_r_mmh, r, + ARRAY_SIZE(r0_iov_), LENGTH_OF(r0_c), r0_d, r0_c, + ARRAY_SIZE(r1_iov_), LENGTH_OF(r1_c), r1_d, r1_c); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests-mx32/mmsg.test b/tests-mx32/mmsg.test new file mode 100755 index 000000000..a8148ba88 --- /dev/null +++ b/tests-mx32/mmsg.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check how iovecs in struct mmsghdr are decoded. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=recvmmsg,sendmmsg -e read=0 -e write=1 diff --git a/tests-mx32/mmsg_name-v.c b/tests-mx32/mmsg_name-v.c new file mode 100644 index 000000000..c663536d8 --- /dev/null +++ b/tests-mx32/mmsg_name-v.c @@ -0,0 +1,4 @@ +/* This file is part of mmsg_name-v strace test. */ +#define VERBOSE 1 +#define TEST_NAME "mmsg_name-v" +#include "mmsg_name.c" diff --git a/tests-mx32/mmsg_name-v.test b/tests-mx32/mmsg_name-v.test new file mode 100755 index 000000000..ab8dfba6f --- /dev/null +++ b/tests-mx32/mmsg_name-v.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check verbose decoding of msg_name* fields of struct msghdr array argument +# of sendmmsg and recvmmsg syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -a25 -e trace=sendmmsg,recvmmsg diff --git a/tests-mx32/mmsg_name.c b/tests-mx32/mmsg_name.c new file mode 100644 index 000000000..a7a55c55a --- /dev/null +++ b/tests-mx32/mmsg_name.c @@ -0,0 +1,242 @@ +/* + * Check decoding of msg_name* fields of struct msghdr array argument + * of sendmmsg and recvmmsg syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "msghdr.h" + +#define DEFAULT_STRLEN 32 + +#define IOV_MAX1 (IOV_MAX + 1) + +#ifndef TEST_NAME +# define TEST_NAME "mmsg_name" +#endif + +static void +print_msghdr(const struct msghdr *const msg, const int user_msg_namelen) +{ + const struct sockaddr_un *const un = msg->msg_name; + const int offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); + + printf("{msg_name="); + if (!un) + printf("NULL"); + else if (user_msg_namelen < offsetof_sun_path) { + printf("%p", un); + } else { + printf("{sa_family=AF_UNIX"); + if (user_msg_namelen > offsetof_sun_path) { + int len = user_msg_namelen < (int) msg->msg_namelen ? + user_msg_namelen : (int) msg->msg_namelen; + len -= offsetof_sun_path; + if (len > (int) sizeof(un->sun_path)) + len = sizeof(un->sun_path); + printf(", sun_path=\"%.*s\"", len, un->sun_path); + } + printf("}"); + } + printf(", msg_namelen="); + if (user_msg_namelen != (int) msg->msg_namelen) { + printf("%d->", user_msg_namelen); + } + printf("%d, msg_iov=[{iov_base=\"%c\", iov_len=1}]" + ", msg_iovlen=1, msg_controllen=0, msg_flags=0}", + (int) msg->msg_namelen, * (char *) msg->msg_iov[0].iov_base); +} + +static void +test_mmsg_name(const int send_fd, const int recv_fd) +{ + struct sockaddr_un *const send_addr = + tail_alloc(sizeof(*send_addr) * IOV_MAX1); + char *const send_buf = tail_alloc(sizeof(*send_buf) * IOV_MAX1); + struct iovec *const send_iov = tail_alloc(sizeof(*send_iov) * IOV_MAX1); + struct mmsghdr *const send_mh = tail_alloc(sizeof(*send_mh) * IOV_MAX1); + + int i, rc; + + for (i = 0; i < IOV_MAX1; ++i) { + int sun_len = i + 1 > (int) sizeof(send_addr[i].sun_path) + ? (int) sizeof(send_addr[i].sun_path) + : i + 1; + + send_addr[i].sun_family = AF_UNIX; + memset(send_addr[i].sun_path, 'a' + i % 26, sun_len); + + send_buf[i] = '0' + i % 10; + + send_iov[i].iov_base = &send_buf[i]; + send_iov[i].iov_len = sizeof(*send_buf); + + send_mh[i].msg_hdr.msg_iov = &send_iov[i]; + send_mh[i].msg_hdr.msg_iovlen = 1; + send_mh[i].msg_hdr.msg_name = &send_addr[i]; + send_mh[i].msg_hdr.msg_namelen = i + 1; + send_mh[i].msg_hdr.msg_control = 0; + send_mh[i].msg_hdr.msg_controllen = 0; + send_mh[i].msg_hdr.msg_flags = 0; + } + + rc = send_mmsg(send_fd, send_mh, IOV_MAX1, MSG_DONTWAIT); + int saved_errno = errno; + + printf("sendmmsg(%d, [", send_fd); + for (i = 0; i < IOV_MAX1; ++i) { + if (i) + printf(", "); + if (i >= IOV_MAX +# if !VERBOSE + || i >= DEFAULT_STRLEN +# endif + ) { + printf("..."); + break; + } + printf("{msg_hdr="); + print_msghdr(&send_mh[i].msg_hdr, i + 1); + printf("}"); + } + errno = saved_errno; + printf("], %u, MSG_DONTWAIT) = %d %s (%m)\n", + IOV_MAX1, rc, errno2name()); + + for (i = 0; i < IOV_MAX1; ++i) { + send_mh[i].msg_hdr.msg_name = 0; + send_mh[i].msg_hdr.msg_namelen = 0; + } + + /* + * When recvmmsg is called with a valid descriptor + * but inaccessible memory, it causes segfaults on some architectures. + * As in these cases we test decoding of failed recvmmsg calls, + * it's ok to fail recvmmsg with any reason as long as + * it doesn't read that inaccessible memory. + */ + rc = send_mmsg(-1, &send_mh[IOV_MAX], 2, MSG_DONTWAIT); + saved_errno = errno; + printf("sendmmsg(-1, [{msg_hdr="); + print_msghdr(&send_mh[IOV_MAX].msg_hdr, 0); + errno = saved_errno; + printf("}, %p], %u, MSG_DONTWAIT) = %d %s (%m)\n", + &send_mh[IOV_MAX1], 2, rc, errno2name()); + + rc = send_mmsg(send_fd, send_mh, IOV_MAX1, MSG_DONTWAIT); + if (rc < 0) + perror_msg_and_skip("sendmmsg"); + + printf("sendmmsg(%d, [", send_fd); + for (i = 0; i < IOV_MAX1; ++i) { + if (i) + printf(", "); + if (i >= IOV_MAX +#if !VERBOSE + || i >= DEFAULT_STRLEN +#endif + ) { + printf("..."); + break; + } + printf("{msg_hdr="); + print_msghdr(&send_mh[i].msg_hdr, 0); + printf("%s}", i < rc ? ", msg_len=1" : ""); + } + printf("], %u, MSG_DONTWAIT) = %d\n", IOV_MAX1, rc); + + struct sockaddr_un *const recv_addr = + tail_alloc(sizeof(*recv_addr) * IOV_MAX1); + char *const recv_buf = tail_alloc(sizeof(*recv_buf) * IOV_MAX1); + struct iovec *const recv_iov = tail_alloc(sizeof(*recv_iov) * IOV_MAX1); + struct mmsghdr *const recv_mh = tail_alloc(sizeof(*recv_mh) * IOV_MAX1); + + for (i = 0; i < IOV_MAX1; ++i) { + recv_iov[i].iov_base = &recv_buf[i]; + recv_iov[i].iov_len = sizeof(*recv_buf); + + recv_mh[i].msg_hdr.msg_name = &recv_addr[i]; + recv_mh[i].msg_hdr.msg_namelen = i; + recv_mh[i].msg_hdr.msg_iov = &recv_iov[i]; + recv_mh[i].msg_hdr.msg_iovlen = 1; + recv_mh[i].msg_hdr.msg_control = 0; + recv_mh[i].msg_hdr.msg_controllen = 0; + recv_mh[i].msg_hdr.msg_flags = 0; + } + + rc = recv_mmsg(recv_fd, recv_mh, IOV_MAX1, MSG_DONTWAIT, 0); + if (rc < 0) + perror_msg_and_skip("recvmmsg"); + + printf("recvmmsg(%d, [", recv_fd); + for (i = 0; i < rc; ++i) { + if (i) + printf(", "); +#if !VERBOSE + if (i >= DEFAULT_STRLEN) { + printf("..."); + break; + } +#endif + printf("{msg_hdr="); + print_msghdr(&recv_mh[i].msg_hdr, i); + printf(", msg_len=1}"); + } + printf("], %u, MSG_DONTWAIT, NULL) = %d\n", IOV_MAX1, rc); +} + +int +main(void) +{ + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + + const struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = TEST_NAME "-recvmmsg.test.send.socket" + }; + + (void) unlink(un.sun_path); + if (bind(fds[1], (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + (void) unlink(un.sun_path); + + test_mmsg_name(fds[1], fds[0]); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/mmsg_name.test b/tests-mx32/mmsg_name.test new file mode 100755 index 000000000..e18c9722a --- /dev/null +++ b/tests-mx32/mmsg_name.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check decoding of msg_name* fields of struct msghdr array argument +# of sendmmsg and recvmmsg syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 -e trace=sendmmsg,recvmmsg diff --git a/tests-mx32/mount.c b/tests-mx32/mount.c new file mode 100644 index 000000000..cbfe42f8f --- /dev/null +++ b/tests-mx32/mount.c @@ -0,0 +1,84 @@ +/* + * Check decoding of mount syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +#ifndef MS_MGC_VAL +# define MS_MGC_VAL 0xC0ED0000 +#endif + +#ifndef MS_RELATIME +# define MS_RELATIME (1ul << 21) +#endif + +#define str_ro_nosuid_nodev_noexec "MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC" + +int +main(void) +{ + static const char source[] = "mount_source"; + static const char target[] = "mount_target"; + static const char fstype[] = "mount_fstype"; + static const char data[] = "mount_data"; + + int rc = mount(source, target, fstype, 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, str_ro_nosuid_nodev_noexec, + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_RELATIME | 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, + str_ro_nosuid_nodev_noexec "|MS_RELATIME", + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_MGC_VAL, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, "MS_MGC_VAL", data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_MGC_VAL | 15, data); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, + "MS_MGC_VAL|" str_ro_nosuid_nodev_noexec, + data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_REMOUNT, data); + printf("mount(\"%s\", \"%s\", %p, %s, \"%s\") = %d %s (%m)\n", + source, target, fstype, "MS_REMOUNT", data, rc, errno2name()); + + rc = mount(source, target, fstype, MS_BIND, data); + printf("mount(\"%s\", \"%s\", %p, %s, %p) = %d %s (%m)\n", + source, target, fstype, "MS_BIND", data, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/mount.test b/tests-mx32/mount.test new file mode 100755 index 000000000..40fdca955 --- /dev/null +++ b/tests-mx32/mount.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mount syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/move_pages.c b/tests-mx32/move_pages.c new file mode 100644 index 000000000..f4ccafa2c --- /dev/null +++ b/tests-mx32/move_pages.c @@ -0,0 +1,239 @@ +/* + * Check decoding of move_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_move_pages + +# include +# include +# include + +# define MAX_STRLEN 3 + +static void +print_page_array(const void **const pages, + const unsigned long count, + const unsigned int offset) +{ + if (!count) { + printf("%s", pages ? "[]" : "NULL"); + return; + } + if (count <= offset) { + printf("%p", pages); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i + offset < count) { + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + } else { + printf("%p", pages + i); + break; + } + const void *const addr = pages[i]; + if (addr) + printf("%p", addr); + else + printf("NULL"); + } + printf("]"); +} + +static void +print_node_array(const int *const nodes, + const unsigned long count, + const unsigned int offset) +{ + if (!count) { + printf("%s", nodes ? "[]" : "NULL"); + return; + } + if (count <= offset) { + printf("%p", nodes); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i + offset < count) { + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + } else { + printf("%p", nodes + i); + break; + } + printf("%d", nodes[i]); + } + printf("]"); +} + +static void +print_status_array(const int *const status, const unsigned long count) +{ + if (!count) { + printf("%s", status ? "[]" : "NULL"); + return; + } + printf("["); + unsigned long i; + for (i = 0; i < count; ++i) { + if (i) + printf(", "); + if (i >= MAX_STRLEN) { + printf("..."); + break; + } + if (status[i] >= 0) { + printf("%d", status[i]); + } else { + errno = -status[i]; + printf("%s", errno2name()); + } + } + printf("]"); +} + +static void +print_stat_pages(const unsigned long pid, const unsigned long count, + const void **const pages, int *const status) +{ + const unsigned long flags = (unsigned long) 0xfacefeed00000002ULL; + + long rc = syscall(__NR_move_pages, + pid, count, pages, NULL, status, flags); + const char *errstr = sprintrc(rc); + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, 0); + printf(", NULL, "); + if (rc) { + if (count) + printf("%p", status); + else + printf("[]"); + } else { + print_status_array(status, count); + } + printf(", MPOL_MF_MOVE) = %s\n", errstr); +} + +static void +print_move_pages(const unsigned long pid, + unsigned long count, + const unsigned int offset, + const void **const pages, + int *const nodes, + int *const status) +{ + const unsigned long flags = (unsigned long) 0xfacefeed00000004ULL; + count += offset; + + long rc = syscall(__NR_move_pages, + pid, count, pages, nodes, status, flags); + const char *errstr = sprintrc(rc); + printf("move_pages(%d, %lu, ", (int) pid, count); + print_page_array(pages, count, offset); + printf(", "); + print_node_array(nodes, count, offset); + printf(", "); + if (count) + printf("%p", status); + else + printf("[]"); + printf(", MPOL_MF_MOVE_ALL) = %s\n", errstr); +} + +int +main(void) +{ + const unsigned long pid = + (unsigned long) 0xfacefeed00000000ULL | getpid(); + unsigned long count = 1; + const unsigned page_size = get_page_size(); + const void *const page = tail_alloc(page_size); + const void *const efault = page + page_size; + const void **pages = tail_alloc(sizeof(*pages)); + int *nodes = tail_alloc(sizeof(*nodes)); + int *status = tail_alloc(sizeof(*status)); + + print_stat_pages(pid, 0, pages, status); + print_move_pages(pid, 0, 0, pages, nodes, status); + print_move_pages(pid, 0, 1, pages + 1, nodes + 1, status + 1); + + *pages = page; + print_stat_pages(pid, count, pages, status); + *nodes = 0xdeadbee1; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = efault; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee2; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = nodes; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee3; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + ++count; + --status; + *(--pages) = status; + print_stat_pages(pid, count, pages, status); + *(--nodes) = 0xdeadbee4; + print_move_pages(pid, count, 0, pages, nodes, status); + print_move_pages(pid, count, 1, pages, nodes, status); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_move_pages") + +#endif diff --git a/tests-mx32/move_pages.test b/tests-mx32/move_pages.test new file mode 100755 index 000000000..f95771724 --- /dev/null +++ b/tests-mx32/move_pages.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of move_pages syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 diff --git a/tests-mx32/mq.c b/tests-mx32/mq.c new file mode 100644 index 000000000..9c2ffc8ed --- /dev/null +++ b/tests-mx32/mq.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_MQUEUE_H + +# include +# include +# include +# include +# include +# include + +# define NAME "strace-mq.test" + +int +main (void) +{ + struct mq_attr attr; + (void) close(0); + + if (mq_open("/" NAME, O_CREAT, 0700, NULL)) + perror_msg_and_skip("mq_open"); + printf("mq_open(\"%s\", O_RDONLY|O_CREAT, 0700, NULL) = 0\n", NAME); + + if (mq_getattr(0, &attr)) + perror_msg_and_skip("mq_getattr"); + printf("mq_getsetattr(0, NULL, {mq_flags=0, mq_maxmsg=%lld" + ", mq_msgsize=%lld, mq_curmsgs=0}) = 0\n", + (long long) attr.mq_maxmsg, + (long long) attr.mq_msgsize); + + if (mq_setattr(0, &attr, NULL)) + perror_msg_and_skip("mq_setattr"); + printf("mq_getsetattr(0, {mq_flags=0, mq_maxmsg=%lld" + ", mq_msgsize=%lld, mq_curmsgs=0}, NULL) = 0\n", + (long long) attr.mq_maxmsg, + (long long) attr.mq_msgsize); + + if (mq_unlink("/" NAME)) + perror_msg_and_skip("mq_unlink"); + printf("mq_unlink(\"%s\") = 0\n", NAME); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_MQUEUE_H") + +#endif diff --git a/tests-mx32/mq.test b/tests-mx32/mq.test new file mode 100755 index 000000000..746b07b7d --- /dev/null +++ b/tests-mx32/mq.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mq_open, mq_getsetattr, and mq_unlink syscalls. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a28 -e trace=mq_getsetattr,mq_open,mq_unlink diff --git a/tests-mx32/mq_sendrecv-read.c b/tests-mx32/mq_sendrecv-read.c new file mode 100644 index 000000000..cc9867b96 --- /dev/null +++ b/tests-mx32/mq_sendrecv-read.c @@ -0,0 +1,3 @@ +#define DUMPIO_READ 1 +#define MQ_NAME "mq_sendrecv-read.sample" +#include "mq_sendrecv.c" diff --git a/tests-mx32/mq_sendrecv-read.test b/tests-mx32/mq_sendrecv-read.test new file mode 100755 index 000000000..eb4ad75e0 --- /dev/null +++ b/tests-mx32/mq_sendrecv-read.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mq_open, mq_notify, mq_timedsend, mq_timedreceive syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mq_open,mq_notify,mq_timedsend,mq_timedreceive,mq_unlink -eread=0 -a14 diff --git a/tests-mx32/mq_sendrecv-write.c b/tests-mx32/mq_sendrecv-write.c new file mode 100644 index 000000000..ae34ee1a3 --- /dev/null +++ b/tests-mx32/mq_sendrecv-write.c @@ -0,0 +1,3 @@ +#define DUMPIO_WRITE 1 +#define MQ_NAME "mq_sendrecv-write.sample" +#include "mq_sendrecv.c" diff --git a/tests-mx32/mq_sendrecv-write.test b/tests-mx32/mq_sendrecv-write.test new file mode 100755 index 000000000..38277ec68 --- /dev/null +++ b/tests-mx32/mq_sendrecv-write.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mq_open, mq_notify, mq_timedsend, mq_timedreceive syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mq_open,mq_notify,mq_timedsend,mq_timedreceive,mq_unlink -ewrite=0 -a14 diff --git a/tests-mx32/mq_sendrecv.c b/tests-mx32/mq_sendrecv.c new file mode 100644 index 000000000..c151542ce --- /dev/null +++ b/tests-mx32/mq_sendrecv.c @@ -0,0 +1,480 @@ +/* + * Check decoding of mq_open, mq_timedsend, mq_notify, mq_timedreceive and + * mq_unlink syscalls. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined __NR_mq_open && __NR_mq_timedsend && __NR_mq_timedreceive && \ + __NR_mq_notify && __NR_mq_unlink + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include "sigevent.h" + +# ifndef MQ_NAME +# define MQ_NAME "mq_sendrecv.sample" +# endif + +# ifndef DUMPIO_READ +# define DUMPIO_READ 0 +# endif + +# ifndef DUMPIO_WRITE +# define DUMPIO_WRITE 0 +# endif + + +enum { + NUM_ATTRS = 8, + MSG_CUT = 8, + MSG_MAX_UNCUT = 32, + MSG_SIZE = 64, + MSG_START = 0x80, +}; + + +static void +printstr(unsigned char start, unsigned int count) +{ + unsigned int i; + + printf("\""); + for (i = 0; i < count; i++) { + printf("\\%hho", (unsigned char) (start + i)); + } + printf("\""); +} + +#if DUMPIO_READ || DUMPIO_WRITE +static void +dumpstr(unsigned char start, unsigned int count) +{ + unsigned int i; + unsigned int j; + + for (i = 0; i < count; i++) { + if (i < count) { + if (!(i % 16)) + printf(" | %05x ", i); + if (!(i % 8)) + printf(" "); + + printf("%02hhx ", (unsigned char) (start + i)); + } + + if ((i % 16 == 15) || (i == (count - 1))) { + if (i % 16 != 15) + printf("%*s", 3 * (15 - i % 16) + + ((i + 8) % 16) / 8, " "); + + printf(" "); + + for (j = 0; j <= (i % 16); j++) + printf("."); + for (j = i % 16; j < 15; j++) + printf(" "); + + printf(" |\n"); + + } + } +} +#endif /* DUMPIO_READ || DUMPIO_WRITE */ + +static void +cleanup(void) +{ + long rc; + + rc = syscall(__NR_mq_unlink, MQ_NAME); + printf("mq_unlink(\"" MQ_NAME "\") = %s\n", sprintrc(rc)); + + puts("+++ exited with 0 +++"); +} + +static void +do_send(int fd, char *msg, unsigned int msg_size, struct timespec *tmout, + bool cropped) +{ + long rc; + long saved_errno; + + do { + rc = syscall(__NR_mq_timedsend, fd, msg, msg_size, 42, + tmout); + saved_errno = errno; + printf("mq_timedsend(%d, ", fd); + printstr(MSG_START, msg_size > MSG_MAX_UNCUT ? MSG_MAX_UNCUT : + msg_size); + if (cropped) + printf("..."); + errno = saved_errno; + printf(", %u, 42, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", msg_size, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + errno = saved_errno; + + if (rc == -1) { + if (errno == EINTR) + continue; + perror_msg_and_skip("mq_timedsend"); + } +# if DUMPIO_WRITE + dumpstr(MSG_START, msg_size); +# endif + } while (rc); +} + +static void +do_recv(int fd, char *msg, unsigned int msg_size, struct timespec *tmout, + bool cropped) +{ + long rc; + long saved_errno; + unsigned prio; + + do { + rc = syscall(__NR_mq_timedreceive, fd, msg, MSG_SIZE, &prio, + tmout); + saved_errno = errno; + printf("mq_timedreceive(%d, ", fd); + if (rc >= 0) { + printstr(MSG_START, rc > MSG_MAX_UNCUT ? MSG_MAX_UNCUT : + rc); + if (cropped) + printf("..."); + } else { + printf("%p", msg); + } + errno = saved_errno; + printf(", %u, [42], {tv_sec=%jd, tv_nsec=%jd}) = %s\n", MSG_SIZE, + (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, sprintrc(rc)); + errno = saved_errno; + + if (rc == -1) { + if (errno == EINTR) + continue; + perror_msg_and_skip("mq_timedreceive"); + } + if ((rc >= 0) && ((unsigned long) rc != msg_size)) + error_msg_and_skip("mq_timedreceive size mismatch" + ": expected %u, got %ld", + msg_size, rc); +# if DUMPIO_READ + dumpstr(MSG_START, rc); +# endif + } while (rc < 0); +} + +int +main(void) +{ + static const kernel_ulong_t bogus_zero = + (kernel_ulong_t) 0x8765432100000000ULL; + static const kernel_ulong_t bogus_oflags = + (kernel_ulong_t) 0xdefaced100000003ULL; + static const kernel_ulong_t bogus_mode = + (kernel_ulong_t) 0xdec0deadfacefeedULL; + static const kernel_ulong_t bogus_fd = + (kernel_ulong_t) 0xfeedfacedeadba5eULL; + static const kernel_ulong_t bogus_zero_size = + (sizeof(kernel_ulong_t) > sizeof(int)) ? (kernel_ulong_t) 0 : + (kernel_ulong_t) 0xface1e5500000000ULL; + static const kernel_ulong_t bogus_size = + (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + static const kernel_ulong_t bogus_prio = + (kernel_ulong_t) 0xdec0ded1defaced3ULL; + static const struct timespec bogus_tmout_data = { + .tv_sec = (time_t) 0xdeadfacebeeff00dLL, + .tv_nsec = (long) 0xfacefee1deadfeedLL, + }; + static const struct timespec future_tmout_data = { + .tv_sec = (time_t) 0x7ea1fade7e57faceLL, + .tv_nsec = 999999999, + };; + struct_sigevent bogus_sev_data = { + .sigev_notify = 0xdefaced, + .sigev_signo = 0xfacefeed, + .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0dedULL + }; + + const char *errstr; + long rc; + kernel_long_t *bogus_attrs = tail_alloc(sizeof(*bogus_attrs) * + NUM_ATTRS); + char *msg = tail_alloc(MSG_SIZE); + unsigned *bogus_prio_ptr = tail_alloc(sizeof(*bogus_prio_ptr)); + struct timespec *bogus_tmout = tail_memdup(&bogus_tmout_data, + sizeof(*bogus_tmout)); + struct timespec *future_tmout = tail_memdup(&future_tmout_data, + sizeof(*future_tmout)); + struct_sigevent *bogus_sev = tail_memdup(&bogus_sev_data, + sizeof(*bogus_sev)); + int fd = -1; + + + fill_memory_ex(msg, MSG_SIZE, MSG_START, MSG_SIZE); + fill_memory_ex(bogus_attrs, sizeof(*bogus_attrs) * NUM_ATTRS, + 0xbb, 0x70); + + + /* mq_open */ + + /* Zero values, non-O_CREAT mode */ + rc = syscall(__NR_mq_open, NULL, bogus_zero, bogus_mode, NULL); + printf("mq_open(NULL, O_RDONLY) = %s\n", sprintrc(rc)); + + /* O_CREAT parsing, other flags, bogs values */ + rc = syscall(__NR_mq_open, msg, O_CREAT | bogus_oflags, bogus_mode, + NULL); + printf("mq_open(%p, O_ACCMODE|O_CREAT, %#o, NULL) = %s\n", + msg, (unsigned short) bogus_mode, sprintrc(rc)); + + /* Partially invalid attributes structure */ + rc = syscall(__NR_mq_open, msg, O_CREAT | bogus_oflags, bogus_mode, + bogus_attrs + 1); + printf("mq_open(%p, O_ACCMODE|O_CREAT, %#o, %p) = %s\n", + msg, (unsigned short) bogus_mode, bogus_attrs + 1, sprintrc(rc)); + + /* Valid attributes structure */ + rc = syscall(__NR_mq_open, msg, O_CREAT | bogus_oflags, bogus_mode, + bogus_attrs); + printf("mq_open(%p, O_ACCMODE|O_CREAT, %#o, {mq_flags=%#llx, " + "mq_maxmsg=%lld, mq_msgsize=%lld, mq_curmsgs=%lld}) = %s\n", + msg, (unsigned short) bogus_mode, + (unsigned long long) (kernel_ulong_t) bogus_attrs[0], + (long long) bogus_attrs[1], + (long long) bogus_attrs[2], + (long long) bogus_attrs[3], sprintrc(rc)); + + + /* mq_timedsend */ + + /* Zero values*/ + rc = syscall(__NR_mq_timedsend, bogus_zero, NULL, bogus_zero_size, + bogus_zero, NULL); + printf("mq_timedsend(0, NULL, 0, 0, NULL) = %s\n", sprintrc(rc)); + + /* Invalid pointers */ + rc = syscall(__NR_mq_timedsend, bogus_fd, msg + MSG_SIZE, bogus_size, + bogus_prio, bogus_tmout + 1); + printf("mq_timedsend(%d, %p, %llu, %u, %p) = %s\n", + (int) bogus_fd, msg + MSG_SIZE, (unsigned long long) bogus_size, + (unsigned) bogus_prio, bogus_tmout + 1, sprintrc(rc)); + + /* Partially invalid message (memory only partially available) */ + rc = syscall(__NR_mq_timedsend, bogus_fd, msg + MSG_SIZE - MSG_CUT, + MSG_SIZE, bogus_prio, bogus_tmout); + printf("mq_timedsend(%d, %p, %llu, %u, {tv_sec=%jd, tv_nsec=%jd}) = " + "%s\n", + (int) bogus_fd, msg + MSG_SIZE - MSG_CUT, + (unsigned long long) MSG_SIZE, (unsigned) bogus_prio, + (intmax_t) bogus_tmout->tv_sec, (intmax_t) bogus_tmout->tv_nsec, + sprintrc(rc)); + + /* Fully valid message, uncut */ + rc = syscall(__NR_mq_timedsend, bogus_fd, msg + MSG_SIZE - MSG_CUT, + MSG_CUT, bogus_prio, bogus_tmout); + errstr = sprintrc(rc); + printf("mq_timedsend(%d, ", (int) bogus_fd); + printstr(MSG_START + MSG_SIZE - MSG_CUT, MSG_CUT); + printf(", %llu, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + (unsigned long long) MSG_CUT, (unsigned) bogus_prio, + (intmax_t) bogus_tmout->tv_sec, (intmax_t) bogus_tmout->tv_nsec, + errstr); + + /* Partially invalid message, cut at maxstrlen */ + rc = syscall(__NR_mq_timedsend, bogus_fd, msg + MSG_CUT, MSG_SIZE, + bogus_prio, bogus_tmout); + errstr = sprintrc(rc); + printf("mq_timedsend(%d, ", (int) bogus_fd); + printstr(MSG_START + MSG_CUT, MSG_MAX_UNCUT); + printf("..., %llu, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + (unsigned long long) MSG_SIZE, (unsigned) bogus_prio, + (intmax_t) bogus_tmout->tv_sec, (intmax_t) bogus_tmout->tv_nsec, + errstr); + + + /* mq_timedreceive */ + + /* Zero values */ + rc = syscall(__NR_mq_timedreceive, bogus_zero, NULL, bogus_zero_size, + NULL, NULL); + printf("mq_timedreceive(0, NULL, 0, NULL, NULL) = %s\n", sprintrc(rc)); + + /* Invalid addresses */ + rc = syscall(__NR_mq_timedreceive, bogus_fd, msg + MSG_SIZE, bogus_size, + bogus_prio_ptr + 1, bogus_tmout + 1); + printf("mq_timedreceive(%d, %p, %llu, %p, %p) = %s\n", + (int) bogus_fd, msg + MSG_SIZE, (unsigned long long) bogus_size, + bogus_prio_ptr + 1, bogus_tmout + 1, sprintrc(rc)); + + /* Invalid fd, valid msg pointer */ + rc = syscall(__NR_mq_timedreceive, bogus_fd, msg, bogus_size, + bogus_prio_ptr, bogus_tmout); + printf("mq_timedreceive(%d, %p, %llu, %p, {tv_sec=%jd, tv_nsec=%jd}) = " + "%s\n", + (int) bogus_fd, msg, (unsigned long long) bogus_size, + bogus_prio_ptr, (intmax_t) bogus_tmout->tv_sec, + (intmax_t) bogus_tmout->tv_nsec, sprintrc(rc)); + + + /* mq_notify */ + + /* Zero values */ + rc = syscall(__NR_mq_notify, bogus_zero, NULL); + printf("mq_notify(0, NULL) = %s\n", sprintrc(rc)); + + /* Invalid pointer */ + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev + 1); + printf("mq_notify(%d, %p) = %s\n", + (int) bogus_fd, bogus_sev + 1, sprintrc(rc)); + + /* Invalid SIGEV_* */ + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev); + printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}" + ", sigev_signo=%u, sigev_notify=%#x /* SIGEV_??? */}) = %s\n", + (int) bogus_fd, bogus_sev->sigev_value.sival_int, + bogus_sev->sigev_value.sival_ptr, + bogus_sev->sigev_signo, bogus_sev->sigev_notify, + sprintrc(rc)); + + /* SIGEV_NONE */ + bogus_sev->sigev_notify = SIGEV_NONE; + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev); + printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, " + "sigev_signo=%u, sigev_notify=SIGEV_NONE}) = %s\n", + (int) bogus_fd, bogus_sev->sigev_value.sival_int, + bogus_sev->sigev_value.sival_ptr, + bogus_sev->sigev_signo, sprintrc(rc)); + + /* SIGEV_SIGNAL */ + bogus_sev->sigev_notify = SIGEV_SIGNAL; + bogus_sev->sigev_signo = SIGALRM; + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev); + printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, " + "sigev_signo=SIGALRM, sigev_notify=SIGEV_SIGNAL}) = %s\n", + (int) bogus_fd, bogus_sev->sigev_value.sival_int, + bogus_sev->sigev_value.sival_ptr, sprintrc(rc)); + + /* SIGEV_THREAD */ + bogus_sev->sigev_notify = SIGEV_THREAD; + bogus_sev->sigev_un.sigev_thread.function = + (unsigned long) 0xdeadbeefbadc0dedULL; + bogus_sev->sigev_un.sigev_thread.attribute = + (unsigned long) 0xcafef00dfacefeedULL; + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev); + printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, " + "sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD, " + "sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}) = " + "%s\n", + (int) bogus_fd, bogus_sev->sigev_value.sival_int, + bogus_sev->sigev_value.sival_ptr, + bogus_sev->sigev_un.sigev_thread.function, + bogus_sev->sigev_un.sigev_thread.attribute, sprintrc(rc)); + + /* mq_unlink */ + + /* Zero values */ + rc = syscall(__NR_mq_unlink, NULL); + printf("mq_unlink(NULL) = %s\n", sprintrc(rc)); + + /* Invalid ptr */ + rc = syscall(__NR_mq_unlink, msg + MSG_SIZE); + printf("mq_unlink(%p) = %s\n", msg + MSG_SIZE, sprintrc(rc)); + + /* Long unterminated string */ + rc = syscall(__NR_mq_unlink, msg); + errstr = sprintrc(rc); + printf("mq_unlink(%p) = %s\n", msg, errstr); + + + /* Sending and receiving test */ + +# if DUMPIO_READ || DUMPIO_WRITE + close(0); +# endif + bogus_attrs[1] = 2; + bogus_attrs[2] = MSG_SIZE; + fd = rc = syscall(__NR_mq_open, MQ_NAME, + O_CREAT|O_RDWR|O_NONBLOCK, S_IRWXU, bogus_attrs); + errstr = sprintrc(rc); + if (rc < 0) + perror_msg_and_skip("mq_open"); + else + atexit(cleanup); +# if DUMPIO_READ || DUMPIO_WRITE + if (fd != 0) + error_msg_and_skip("mq_open returned fd other than 0"); +# endif + fill_memory_ex(bogus_attrs, sizeof(*bogus_attrs) * NUM_ATTRS, + 0xbb, 0x70); + printf("mq_open(\"" MQ_NAME "\", O_RDWR|O_CREAT|O_NONBLOCK, " + "0700, {mq_flags=%#llx, mq_maxmsg=2, mq_msgsize=%u, " + "mq_curmsgs=%lld}) = %s\n", + (unsigned long long) (kernel_ulong_t) bogus_attrs[0], MSG_SIZE, + (long long) bogus_attrs[3], errstr); + + rc = syscall(__NR_mq_getsetattr, fd, NULL, bogus_attrs); + if (rc < 0) + perror_msg_and_skip("mq_getsetattr"); + if ((bogus_attrs[1] < 2) || (bogus_attrs[2] < MSG_SIZE)) + error_msg_and_skip("mq too small"); + + do_send(fd, msg, MSG_CUT, future_tmout, false); + do_send(fd, msg, MSG_SIZE, future_tmout, true); + + memset(msg, '\0', MSG_SIZE); + do_recv(fd, msg, MSG_CUT, future_tmout, false); + + memset(msg, '\0', MSG_SIZE); + do_recv(fd, msg, MSG_SIZE, future_tmout, true); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mq_open && __NR_mq_timedsend && " + "__NR_mq_timedreceive && __NR_mq_notify && __NR_mq_unlink"); + +#endif diff --git a/tests-mx32/mq_sendrecv.test b/tests-mx32/mq_sendrecv.test new file mode 100755 index 000000000..67f4d63c5 --- /dev/null +++ b/tests-mx32/mq_sendrecv.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mq_open, mq_notify, mq_timedsend, mq_timedreceive syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mq_open,mq_notify,mq_timedsend,mq_timedreceive,mq_unlink -a14 diff --git a/tests-mx32/msg_control-v.c b/tests-mx32/msg_control-v.c new file mode 100644 index 000000000..b0afa523a --- /dev/null +++ b/tests-mx32/msg_control-v.c @@ -0,0 +1,3 @@ +/* This file is part of msg_control-v strace test. */ +#define VERBOSE 1 +#include "msg_control.c" diff --git a/tests-mx32/msg_control-v.test b/tests-mx32/msg_control-v.test new file mode 100755 index 000000000..41f98428f --- /dev/null +++ b/tests-mx32/msg_control-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of struct msghdr ancillary data. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -a21 -e trace=sendmsg diff --git a/tests-mx32/msg_control.c b/tests-mx32/msg_control.c new file mode 100644 index 000000000..709a30758 --- /dev/null +++ b/tests-mx32/msg_control.c @@ -0,0 +1,715 @@ +/* + * Check decoding of struct msghdr ancillary data. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef SOL_IP +# define SOL_IP 0 +#endif +#ifndef SOL_TCP +# define SOL_TCP 6 +#endif + +#ifndef SCM_SECURITY +# define SCM_SECURITY 3 +#endif + +#define MIN_SIZE_OF(type, member) \ + (offsetof(type, member) + sizeof(((type *) 0)->member)) + +static struct cmsghdr * +get_cmsghdr(void *const page, const size_t len) +{ + return page - CMSG_ALIGN(len); +} + +#define DEFAULT_STRLEN 32 + +static void +print_fds(const struct cmsghdr *const cmsg, const size_t cmsg_len) +{ + size_t nfd = cmsg_len > CMSG_LEN(0) + ? (cmsg_len - CMSG_LEN(0)) / sizeof(int) : 0; + if (!nfd) + return; + + printf(", cmsg_data=["); + int *fdp = (int *) CMSG_DATA(cmsg); + size_t i; + for (i = 0; i < nfd; ++i) { + if (i) + printf(", "); +#if !VERBOSE + if (i >= DEFAULT_STRLEN) { + printf("..."); + break; + } +#endif + printf("%d", fdp[i]); + } + printf("]"); +} + +static void +test_scm_rights1(struct msghdr *const mh, + const size_t msg_controllen, + void *const page, + const void *const src, + const size_t cmsg_len) +{ + const size_t aligned_cms_len = + cmsg_len > CMSG_LEN(0) ? CMSG_ALIGN(cmsg_len) : CMSG_LEN(0); + if (cmsg_len >= CMSG_LEN(0) + && aligned_cms_len + CMSG_LEN(0) <= msg_controllen) + return; + + struct cmsghdr *cmsg = get_cmsghdr(page, msg_controllen); + + if (msg_controllen >= MIN_SIZE_OF(struct cmsghdr, cmsg_len)) + cmsg->cmsg_len = cmsg_len; + if (msg_controllen >= MIN_SIZE_OF(struct cmsghdr, cmsg_level)) + cmsg->cmsg_level = SOL_SOCKET; + if (msg_controllen >= MIN_SIZE_OF(struct cmsghdr, cmsg_type)) + cmsg->cmsg_type = SCM_RIGHTS; + + size_t src_len = + cmsg_len < msg_controllen ? cmsg_len : msg_controllen; + if (src_len > CMSG_LEN(0)) + memcpy(CMSG_DATA(cmsg), src, src_len - CMSG_LEN(0)); + + mh->msg_control = cmsg; + mh->msg_controllen = msg_controllen; + + int rc = sendmsg(-1, mh, 0); + int saved_errno = errno; + + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0"); + if (msg_controllen < CMSG_LEN(0)) { + if (msg_controllen) + printf(", msg_control=%p", cmsg); + } else { + printf(", msg_control=[{cmsg_len=%lu, cmsg_level=SOL_SOCKET" + ", cmsg_type=SCM_RIGHTS", (unsigned long) cmsg_len); + print_fds(cmsg, src_len); + printf("}"); + if (aligned_cms_len < msg_controllen) + printf(", %p", (void *) cmsg + aligned_cms_len); + printf("]"); + } + + errno = saved_errno; + printf(", msg_controllen=%lu, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned long) msg_controllen, rc, errno2name()); +} + +static void +test_scm_rights2(struct msghdr *const mh, + const size_t msg_controllen, + void *const page, + const int *const *const src, + const size_t *const cmsg_len) +{ + const size_t aligned_cms_len[2] = { + cmsg_len[0] > CMSG_LEN(0) ? CMSG_ALIGN(cmsg_len[0]) : CMSG_LEN(0), + cmsg_len[1] > CMSG_LEN(0) ? CMSG_ALIGN(cmsg_len[1]) : CMSG_LEN(0) + }; + if (cmsg_len[0] < CMSG_LEN(0) + || aligned_cms_len[0] + CMSG_LEN(0) > msg_controllen + || aligned_cms_len[0] + aligned_cms_len[1] + CMSG_LEN(0) <= msg_controllen) + return; + + struct cmsghdr *const cmsg[2] = { + get_cmsghdr(page, msg_controllen), + (void *) get_cmsghdr(page, msg_controllen) + aligned_cms_len[0] + }; + cmsg[0]->cmsg_len = cmsg_len[0]; + cmsg[0]->cmsg_level = SOL_SOCKET; + cmsg[0]->cmsg_type = SCM_RIGHTS; + if (cmsg_len[0] > CMSG_LEN(0)) + memcpy(CMSG_DATA(cmsg[0]), src[0], cmsg_len[0] - CMSG_LEN(0)); + + const size_t msg_controllen1 = msg_controllen - aligned_cms_len[0]; + if (msg_controllen1 >= MIN_SIZE_OF(struct cmsghdr, cmsg_len)) + cmsg[1]->cmsg_len = cmsg_len[1]; + if (msg_controllen >= MIN_SIZE_OF(struct cmsghdr, cmsg_level)) + cmsg[1]->cmsg_level = SOL_SOCKET; + if (msg_controllen >= MIN_SIZE_OF(struct cmsghdr, cmsg_type)) + cmsg[1]->cmsg_type = SCM_RIGHTS; + size_t src1_len = + cmsg_len[1] < msg_controllen1 ? cmsg_len[1] : msg_controllen1; + if (src1_len > CMSG_LEN(0)) + memcpy(CMSG_DATA(cmsg[1]), src[1], src1_len - CMSG_LEN(0)); + + mh->msg_control = cmsg[0]; + mh->msg_controllen = msg_controllen; + + int rc = sendmsg(-1, mh, 0); + int saved_errno = errno; + + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%lu" + ", cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS", + (unsigned long) cmsg_len[0]); + print_fds(cmsg[0], cmsg_len[0]); + printf("}, {cmsg_len=%lu, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS", + (unsigned long) cmsg_len[1]); + print_fds(cmsg[1], src1_len); + printf("}"); + if (aligned_cms_len[1] < msg_controllen1) + printf(", %p", (void *) cmsg[1] + aligned_cms_len[1]); + printf("]"); + + errno = saved_errno; + printf(", msg_controllen=%lu, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned long) msg_controllen, rc, errno2name()); +} + +static void +test_scm_rights3(struct msghdr *const mh, void *const page, const size_t nfds) +{ + const size_t len = CMSG_SPACE(sizeof(int) * nfds); + struct cmsghdr *cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(sizeof(int) * nfds); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + int *fdp = (int *) CMSG_DATA(cmsg); + size_t i; + for (i = 0; i < nfds; ++i) + fdp[i] = i; + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u" + ", cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS", + (unsigned) cmsg->cmsg_len); + print_fds(cmsg, cmsg->cmsg_len); + printf("}], msg_controllen=%lu, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned long) len, rc, errno2name()); +} + +static void +print_security(const struct cmsghdr *const cmsg, const size_t cmsg_len) +{ + int n = cmsg_len > CMSG_LEN(0) ? cmsg_len - CMSG_LEN(0) : 0; + if (!n) + return; + + printf(", cmsg_data=\"%.*s\"", n, CMSG_DATA(cmsg)); +} + +static void +test_scm_security(struct msghdr *const mh, + const size_t msg_controllen, + void *const page, + const void *const src, + const size_t cmsg_len, + const int cmsg_level, + const char *const cmsg_level_str) +{ + const size_t aligned_cms_len = + cmsg_len > CMSG_LEN(0) ? CMSG_ALIGN(cmsg_len) : CMSG_LEN(0); + if (cmsg_len >= CMSG_LEN(0) + && aligned_cms_len + CMSG_LEN(0) <= msg_controllen) + return; + + struct cmsghdr *cmsg = get_cmsghdr(page, msg_controllen); + + cmsg->cmsg_len = cmsg_len; + cmsg->cmsg_level = cmsg_level; + cmsg->cmsg_type = SCM_SECURITY; + + size_t src_len = + cmsg_len < msg_controllen ? cmsg_len : msg_controllen; + if (src_len > CMSG_LEN(0)) + memcpy(CMSG_DATA(cmsg), src, src_len - CMSG_LEN(0)); + + mh->msg_control = cmsg; + mh->msg_controllen = msg_controllen; + + int rc = sendmsg(-1, mh, 0); + int saved_errno = errno; + + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%lu, cmsg_level=%s" + ", cmsg_type=SCM_SECURITY", + (unsigned long) cmsg_len, cmsg_level_str); + print_security(cmsg, src_len); + printf("}"); + if (aligned_cms_len < msg_controllen) + printf(", %p", (void *) cmsg + aligned_cms_len); + printf("]"); + + errno = saved_errno; + printf(", msg_controllen=%lu, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned long) msg_controllen, rc, errno2name()); +} + +static void +test_unknown_type(struct msghdr *const mh, + void *const page, + const int cmsg_level, + const char *const cmsg_level_str, + const char *const cmsg_type_str) +{ + struct cmsghdr *cmsg = get_cmsghdr(page, CMSG_LEN(0)); + + cmsg->cmsg_len = CMSG_LEN(0); + cmsg->cmsg_level = cmsg_level; + cmsg->cmsg_type = 0xfacefeed; + + mh->msg_control = cmsg; + mh->msg_controllen = cmsg->cmsg_len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u, cmsg_level=%s" + ", cmsg_type=%#x /* %s */}], msg_controllen=%u, msg_flags=0}" + ", 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, cmsg_level_str, cmsg->cmsg_type, + cmsg_type_str, (unsigned) mh->msg_controllen, rc, errno2name()); +} + +static void +test_sol_socket(struct msghdr *const mh, void *const page) +{ + static const int fds0[] = { -10, -11, -12, -13 }; + static const int fds1[] = { -15, -16, -17, -18 }; + size_t msg_controllen, max_msg_controllen; + + max_msg_controllen = CMSG_SPACE(sizeof(fds0)) + sizeof(*fds0) - 1; + for (msg_controllen = 0; + msg_controllen <= max_msg_controllen; + msg_controllen++) { + size_t cmsg_len; + + for (cmsg_len = 0; + cmsg_len <= msg_controllen + CMSG_LEN(0); + cmsg_len++) { + test_scm_rights1(mh, msg_controllen, + page, fds0, cmsg_len); + } + } + + max_msg_controllen = + CMSG_SPACE(sizeof(fds0)) + CMSG_SPACE(sizeof(fds1)) + + sizeof(*fds0) - 1; + for (msg_controllen = CMSG_LEN(0) * 2; + msg_controllen <= max_msg_controllen; + msg_controllen++) { + static const int *const fdps[] = { fds0, fds1 }; + size_t cmsg_len[2]; + + for (cmsg_len[0] = CMSG_LEN(0); + CMSG_ALIGN(cmsg_len[0]) + CMSG_LEN(0) <= msg_controllen + && CMSG_ALIGN(cmsg_len[0]) <= CMSG_SPACE(sizeof(fds0)); + cmsg_len[0]++) { + const size_t msg_controllen1 = + msg_controllen - CMSG_ALIGN(cmsg_len[0]); + + for (cmsg_len[1] = 0; + cmsg_len[1] <= msg_controllen1 + CMSG_LEN(0); + cmsg_len[1]++) { + test_scm_rights2(mh, msg_controllen, + page, fdps, cmsg_len); + } + } + } + + static const char text[16] = "0123456789abcdef"; + max_msg_controllen = CMSG_SPACE(sizeof(text)) + CMSG_LEN(0) - 1; + for (msg_controllen = CMSG_LEN(0); + msg_controllen <= max_msg_controllen; + msg_controllen++) { + size_t cmsg_len; + + for (cmsg_len = 0; + cmsg_len <= msg_controllen + CMSG_LEN(0) + && cmsg_len <= CMSG_LEN(sizeof(text)); + cmsg_len++) { + test_scm_security(mh, msg_controllen, + page, text, cmsg_len, + ARG_STR(SOL_SOCKET)); + } + } + + test_scm_rights3(mh, page, DEFAULT_STRLEN - 1); + test_scm_rights3(mh, page, DEFAULT_STRLEN); + test_scm_rights3(mh, page, DEFAULT_STRLEN + 1); + + test_unknown_type(mh, page, ARG_STR(SOL_SOCKET), "SCM_???"); +} + +static void +test_ip_pktinfo(struct msghdr *const mh, void *const page, + const int cmsg_type, const char *const cmsg_type_str) +{ + const unsigned int len = CMSG_SPACE(sizeof(struct in_pktinfo)); + struct cmsghdr *const cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo)); + cmsg->cmsg_level = SOL_IP; + cmsg->cmsg_type = cmsg_type; + + struct in_pktinfo *const info = (struct in_pktinfo *) CMSG_DATA(cmsg); +#ifdef HAVE_IF_INDEXTONAME + info->ipi_ifindex = if_nametoindex("lo"); +#else + info->ipi_ifindex = 1; +#endif + info->ipi_spec_dst.s_addr = inet_addr("1.2.3.4"); + info->ipi_addr.s_addr = inet_addr("5.6.7.8"); + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u, cmsg_level=SOL_IP" + ", cmsg_type=%s, cmsg_data={ipi_ifindex=%s" + ", ipi_spec_dst=inet_addr(\"%s\")" + ", ipi_addr=inet_addr(\"%s\")}}]" + ", msg_controllen=%u, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, cmsg_type_str, +#ifdef HAVE_IF_INDEXTONAME + "if_nametoindex(\"lo\")", +#else + "1", +#endif + "1.2.3.4", "5.6.7.8", len, rc, errno2name()); +} + +static void +test_ip_uint(struct msghdr *const mh, void *const page, + const int cmsg_type, const char *const cmsg_type_str) +{ + const unsigned int len = CMSG_SPACE(sizeof(int)); + struct cmsghdr *const cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(sizeof(int)); + cmsg->cmsg_level = SOL_IP; + cmsg->cmsg_type = cmsg_type; + + unsigned int *u = (void *) CMSG_DATA(cmsg); + *u = 0xfacefeed; + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u" + ", cmsg_level=SOL_IP, cmsg_type=%s, cmsg_data=[%u]}]" + ", msg_controllen=%u, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, cmsg_type_str, *u, len, + rc, errno2name()); +} + +static void +test_ip_uint8_t(struct msghdr *const mh, void *const page, + const int cmsg_type, const char *const cmsg_type_str) +{ + const unsigned int len = CMSG_SPACE(1); + struct cmsghdr *const cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(1); + cmsg->cmsg_level = SOL_IP; + cmsg->cmsg_type = cmsg_type; + *CMSG_DATA(cmsg) = 'A'; + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u" + ", cmsg_level=SOL_IP, cmsg_type=%s, cmsg_data=[%#x]}]" + ", msg_controllen=%u, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, cmsg_type_str, + (unsigned) (uint8_t) 'A', len, rc, errno2name()); +} + +static void +print_ip_opts(const void *const cmsg_data, const unsigned int data_len) +{ + const unsigned char *const opts = cmsg_data; + unsigned int i; + for (i = 0; i < data_len; ++i) { + if (i) + printf(", "); +#if !VERBOSE + if (i >= DEFAULT_STRLEN) { + printf("..."); + break; + } +#endif + printf("0x%02x", opts[i]); + } +} + +static void +test_ip_opts(struct msghdr *const mh, void *const page, + const int cmsg_type, const char *const cmsg_type_str, + const unsigned int opts_len) +{ + unsigned int len = CMSG_SPACE(opts_len); + struct cmsghdr *cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(opts_len); + cmsg->cmsg_level = SOL_IP; + cmsg->cmsg_type = cmsg_type; + unsigned int i; + for (i = 0; i < opts_len; ++i) + CMSG_DATA(cmsg)[i] = 'A' + i; + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u" + ", cmsg_level=SOL_IP, cmsg_type=%s, cmsg_data=[", + (unsigned) cmsg->cmsg_len, cmsg_type_str); + print_ip_opts(CMSG_DATA(cmsg), opts_len); + printf("]}], msg_controllen=%u, msg_flags=0}, 0) = %d %s (%m)\n", + len, rc, errno2name()); +} + +#ifdef IP_CHECKSUM +struct sock_ee { + uint32_t ee_errno; + uint8_t ee_origin; + uint8_t ee_type; + uint8_t ee_code; + uint8_t ee_pad; + uint32_t ee_info; + uint32_t ee_data; + struct sockaddr_in offender; +}; + +static void +test_ip_recverr(struct msghdr *const mh, void *const page, + const int cmsg_type, const char *const cmsg_type_str) +{ + const unsigned int len = CMSG_SPACE(sizeof(struct sock_ee)); + struct cmsghdr *const cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(sizeof(struct sock_ee)); + cmsg->cmsg_level = SOL_IP; + cmsg->cmsg_type = cmsg_type; + + struct sock_ee *const e = (struct sock_ee *) CMSG_DATA(cmsg); + e->ee_errno = 0xdeadbeef; + e->ee_origin = 2; + e->ee_type = 3; + e->ee_code = 4; + e->ee_info = 0xfacefeed; + e->ee_data = 0xbadc0ded; + e->offender.sin_family = AF_INET, + e->offender.sin_port = htons(12345), + e->offender.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u, cmsg_level=SOL_IP" + ", cmsg_type=%s, cmsg_data={ee_errno=%u, ee_origin=%u" + ", ee_type=%u, ee_code=%u, ee_info=%u, ee_data=%u" + ", offender={sa_family=AF_INET, sin_port=htons(%hu)" + ", sin_addr=inet_addr(\"127.0.0.1\")}}}]" + ", msg_controllen=%u, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, cmsg_type_str, + e->ee_errno, e->ee_origin, e->ee_type, + e->ee_code, e->ee_info, e->ee_data, + ntohs(e->offender.sin_port), + len, rc, errno2name()); +} +#endif + +#ifdef IP_ORIGDSTADDR +static void +test_ip_origdstaddr(struct msghdr *const mh, void *const page, + const int cmsg_type, const char *const cmsg_type_str) +{ + const unsigned int len = CMSG_SPACE(sizeof(struct sockaddr_in)); + struct cmsghdr *const cmsg = get_cmsghdr(page, len); + + cmsg->cmsg_len = CMSG_LEN(sizeof(struct sockaddr_in)); + cmsg->cmsg_level = SOL_IP; + cmsg->cmsg_type = cmsg_type; + + struct sockaddr_in *const sin = (struct sockaddr_in *) CMSG_DATA(cmsg); + sin->sin_family = AF_INET, + sin->sin_port = htons(12345), + sin->sin_addr.s_addr = htonl(INADDR_LOOPBACK); + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u, cmsg_level=SOL_IP" + ", cmsg_type=%s, cmsg_data={sa_family=AF_INET" + ", sin_port=htons(%hu), sin_addr=inet_addr(\"127.0.0.1\")}}]" + ", msg_controllen=%u, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, cmsg_type_str, + ntohs(sin->sin_port), len, rc, errno2name()); +} +#endif + +static void +test_sol_ip(struct msghdr *const mh, void *const page) +{ + test_ip_pktinfo(mh, page, ARG_STR(IP_PKTINFO)); + test_ip_uint(mh, page, ARG_STR(IP_TTL)); + test_ip_uint8_t(mh, page, ARG_STR(IP_TOS)); + test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 1); + test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 2); + test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 3); + test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 4); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 5); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 6); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 7); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 8); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), DEFAULT_STRLEN - 1); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), DEFAULT_STRLEN); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), DEFAULT_STRLEN + 1); +#ifdef IP_CHECKSUM + test_ip_recverr(mh, page, ARG_STR(IP_RECVERR)); +#endif +#ifdef IP_ORIGDSTADDR + test_ip_origdstaddr(mh, page, ARG_STR(IP_ORIGDSTADDR)); +#endif +#ifdef IP_CHECKSUM + test_ip_uint(mh, page, ARG_STR(IP_CHECKSUM)); +#endif + test_scm_security(mh, CMSG_LEN(0), page, 0, CMSG_LEN(0), + ARG_STR(SOL_IP)); + test_unknown_type(mh, page, ARG_STR(SOL_IP), "IP_???"); +} + +static void +test_unknown_level(struct msghdr *const mh, void *const page) +{ + struct cmsghdr *cmsg = get_cmsghdr(page, CMSG_LEN(0)); + + cmsg->cmsg_len = CMSG_LEN(0); + cmsg->cmsg_level = SOL_TCP; + cmsg->cmsg_type = 0xdeadbeef; + + mh->msg_control = cmsg; + mh->msg_controllen = cmsg->cmsg_len; + + int rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u, cmsg_level=%s" + ", cmsg_type=%#x}], msg_controllen=%u, msg_flags=0}" + ", 0) = %d %s (%m)\n", + (unsigned) cmsg->cmsg_len, "SOL_TCP", cmsg->cmsg_type, + (unsigned) mh->msg_controllen, rc, errno2name()); +} + +static void +test_big_len(struct msghdr *const mh) +{ + int optmem_max; + + if (read_int_from_file("/proc/sys/net/core/optmem_max", &optmem_max) + || optmem_max <= 0 || optmem_max > 0x100000) + optmem_max = sizeof(long long) * (2 * IOV_MAX + 512); + optmem_max = (optmem_max + sizeof(long long) - 1) + & ~(sizeof(long long) - 1); + + const size_t len = optmem_max * 2; + struct cmsghdr *const cmsg = tail_alloc(len); + cmsg->cmsg_len = len; + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + + mh->msg_control = cmsg; + mh->msg_controllen = len; + + int rc = sendmsg(-1, mh, 0); + if (EBADF != errno) + perror_msg_and_skip("sendmsg"); + + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=[{cmsg_len=%u" + ", cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS", + (unsigned) cmsg->cmsg_len); + print_fds(cmsg, optmem_max); + printf("}, ...], msg_controllen=%lu, msg_flags=0}, 0) = %d %s (%m)\n", + (unsigned long) len, rc, errno2name()); +} + +int main(int ac, const char **av) +{ + int rc = sendmsg(-1, 0, 0); + printf("sendmsg(-1, NULL, 0) = %d %s (%m)\n", rc, errno2name()); + + struct msghdr *mh = tail_alloc(sizeof(*mh)); + memset(mh, 0, sizeof(*mh)); + test_big_len(mh); + + rc = sendmsg(-1, mh + 1, 0); + printf("sendmsg(-1, %p, 0) = %d %s (%m)\n", + mh + 1, rc, errno2name()); + + void *page = tail_alloc(1) + 1; + mh->msg_control = page; + mh->msg_controllen = CMSG_LEN(0); + rc = sendmsg(-1, mh, 0); + printf("sendmsg(-1, {msg_name=NULL, msg_namelen=0, msg_iov=NULL" + ", msg_iovlen=0, msg_control=%p, msg_controllen=%u" + ", msg_flags=0}, 0) = %d %s (%m)\n", + page, (unsigned) CMSG_LEN(0), rc, errno2name()); + + test_sol_socket(mh, page); + test_sol_ip(mh, page); + test_unknown_level(mh, page); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/msg_control.test b/tests-mx32/msg_control.test new file mode 100755 index 000000000..809ec7bb0 --- /dev/null +++ b/tests-mx32/msg_control.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of struct msghdr ancillary data. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 -e trace=sendmsg diff --git a/tests-mx32/msg_name.c b/tests-mx32/msg_name.c new file mode 100644 index 000000000..c2ddda2ac --- /dev/null +++ b/tests-mx32/msg_name.c @@ -0,0 +1,160 @@ +/* + * Check decoding of struct msghdr.msg_name* arguments of recvmsg syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static int +send_recv(const int send_fd, const int recv_fd, + struct msghdr *const msg, const int flags) +{ + if (send(send_fd, "A", 1, 0) != 1) + perror_msg_and_skip("send"); + return recvmsg(recv_fd, msg, flags); +} + +static void +test_msg_name(const int send_fd, const int recv_fd) +{ + char *const recv_buf = tail_alloc(sizeof(*recv_buf)); + struct iovec *const iov = tail_alloc(sizeof(*iov)); + iov->iov_base = recv_buf; + iov->iov_len = sizeof(*recv_buf); + + struct sockaddr_un *const addr = tail_alloc(sizeof(*addr)); + struct msghdr *const msg = tail_alloc(sizeof(*msg)); + msg->msg_name = addr; + msg->msg_namelen = sizeof(*addr); + msg->msg_iov = iov; + msg->msg_iovlen = 1; + msg->msg_control = 0; + msg->msg_controllen = 0; + msg->msg_flags = 0; + + int rc = send_recv(send_fd, recv_fd, msg, MSG_DONTWAIT); + if (rc < 0) + perror_msg_and_skip("recvmsg"); + printf("recvmsg(%d, {msg_name={sa_family=AF_UNIX, sun_path=\"%s\"}" + ", msg_namelen=%d->%d, msg_iov=[{iov_base=\"A\", iov_len=1}]" + ", msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT)" + " = %d\n", + recv_fd, addr->sun_path, (int) sizeof(struct sockaddr_un), + (int) msg->msg_namelen, rc); + + memset(addr, 0, sizeof(*addr)); + rc = send_recv(send_fd, recv_fd, msg, MSG_DONTWAIT); + printf("recvmsg(%d, {msg_name={sa_family=AF_UNIX, sun_path=\"%s\"}" + ", msg_namelen=%d, msg_iov=[{iov_base=\"A\", iov_len=1}]" + ", msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT)" + " = %d\n", + recv_fd, addr->sun_path, (int) msg->msg_namelen, rc); + + msg->msg_name = 0; + rc = send_recv(send_fd, recv_fd, msg, MSG_DONTWAIT); + printf("recvmsg(%d, {msg_name=NULL, msg_namelen=%d" + ", msg_iov=[{iov_base=\"A\", iov_len=1}], msg_iovlen=1" + ", msg_controllen=0, msg_flags=0}, MSG_DONTWAIT) = %d\n", + recv_fd, (int) msg->msg_namelen, rc); + + const size_t offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); + msg->msg_name = addr; + msg->msg_namelen = offsetof_sun_path; + memset(addr->sun_path, 'A', sizeof(addr->sun_path)); + + rc = send_recv(send_fd, recv_fd, msg, MSG_DONTWAIT); + printf("recvmsg(%d, {msg_name={sa_family=AF_UNIX}, msg_namelen=%d->%d" + ", msg_iov=[{iov_base=\"A\", iov_len=1}], msg_iovlen=1" + ", msg_controllen=0, msg_flags=0}, MSG_DONTWAIT) = %d\n", + recv_fd, (int) offsetof_sun_path, (int) msg->msg_namelen, rc); + + msg->msg_namelen = sizeof(struct sockaddr); + msg->msg_name = ((void *) (addr + 1)) - msg->msg_namelen; + rc = send_recv(send_fd, recv_fd, msg, MSG_DONTWAIT); + printf("recvmsg(%d, {msg_name={sa_family=AF_UNIX, sun_path=\"%.*s\"}" + ", msg_namelen=%d->%d, msg_iov=[{iov_base=\"A\", iov_len=1}]" + ", msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT)" + " = %d\n", + recv_fd, (int) (sizeof(struct sockaddr) - offsetof_sun_path), + ((struct sockaddr_un *) msg->msg_name)->sun_path, + (int) sizeof(struct sockaddr), (int) msg->msg_namelen, rc); + + rc = send_recv(send_fd, recv_fd, msg, MSG_DONTWAIT); + printf("recvmsg(%d, {msg_namelen=%d}, MSG_DONTWAIT) = %d %s (%m)\n", + recv_fd, (int) msg->msg_namelen, rc, errno2name()); + + /* + * When recvmsg is called with a valid descriptor + * but inaccessible memory, it causes segfaults on some architectures. + * As in these cases we test decoding of failed recvmsg calls, + * it's ok to fail recvmsg with any reason as long as + * it doesn't read that inaccessible memory. + */ + + /* + * Sadly, musl recvmsg wrapper blindly dereferences 2nd argument, + * so limit this test to glibc that doesn't. + */ +#ifdef __GLIBC__ + rc = send_recv(send_fd, -1, msg + 1, 0); + printf("recvmsg(-1, %p, 0) = %d %s (%m)\n", + msg + 1, rc, errno2name()); +#endif + + rc = send_recv(send_fd, -1, 0, 0); + printf("recvmsg(-1, NULL, 0) = %d %s (%m)\n", + rc, errno2name()); +} + +int +main(void) +{ + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + + const struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = "msg_name-recvmsg.test.send.socket" + }; + + (void) unlink(un.sun_path); + if (bind(fds[1], (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + (void) unlink(un.sun_path); + + test_msg_name(fds[1], fds[0]); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/msg_name.test b/tests-mx32/msg_name.test new file mode 100755 index 000000000..ac06dd55f --- /dev/null +++ b/tests-mx32/msg_name.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of struct msghdr.msg_name* arguments of recvmsg syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 -e trace=recvmsg diff --git a/tests-mx32/munlockall.c b/tests-mx32/munlockall.c new file mode 100644 index 000000000..9ac69423f --- /dev/null +++ b/tests-mx32/munlockall.c @@ -0,0 +1,13 @@ +#include "tests.h" + +#include +#include + +int +main(void) +{ + printf("munlockall() = %d\n", munlockall()); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/munlockall.test b/tests-mx32/munlockall.test new file mode 100755 index 000000000..e25d60a85 --- /dev/null +++ b/tests-mx32/munlockall.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check munlockall syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff --git a/tests-mx32/nanosleep.c b/tests-mx32/nanosleep.c new file mode 100644 index 000000000..9f0e626f1 --- /dev/null +++ b/tests-mx32/nanosleep.c @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static void +handler(int signo) +{ +} + +int +main(void) +{ + struct { + struct timespec ts; + uint32_t pad[2]; + } req = { + .ts.tv_nsec = 0xc0de1, + .pad = { 0xdeadbeef, 0xbadc0ded } + }, rem = { + .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, + .pad = { 0xdeadbeef, 0xbadc0ded } + }; + const sigset_t set = {}; + const struct sigaction act = { .sa_handler = handler }; + const struct itimerval itv = { .it_value.tv_usec = 111111 }; + + if (nanosleep(&req.ts, NULL)) + perror_msg_and_fail("nanosleep"); + printf("nanosleep({tv_sec=%jd, tv_nsec=%jd}, NULL) = 0\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); + + assert(nanosleep(NULL, &rem.ts) == -1); + printf("nanosleep(NULL, %p) = -1 EFAULT (%m)\n", &rem.ts); + + if (nanosleep(&req.ts, &rem.ts)) + perror_msg_and_fail("nanosleep"); + printf("nanosleep({tv_sec=%jd, tv_nsec=%jd}, %p) = 0\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); + + req.ts.tv_nsec = 1000000000; + assert(nanosleep(&req.ts, &rem.ts) == -1); + printf("nanosleep({tv_sec=%jd, tv_nsec=%jd}, %p) = -1 EINVAL (%m)\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); + + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); + + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_skip("setitimer"); + printf("setitimer(ITIMER_REAL, {it_interval={tv_sec=%jd, tv_usec=%jd}" + ", it_value={tv_sec=%jd, tv_usec=%jd}}, NULL) = 0\n", + (intmax_t) itv.it_interval.tv_sec, + (intmax_t) itv.it_interval.tv_usec, + (intmax_t) itv.it_value.tv_sec, + (intmax_t) itv.it_value.tv_usec); + + req.ts.tv_nsec = 999999999; + assert(nanosleep(&req.ts, &rem.ts) == -1); + printf("nanosleep({tv_sec=%jd, tv_nsec=%jd}, {tv_sec=%jd, tv_nsec=%jd})" + " = ? ERESTART_RESTARTBLOCK (Interrupted by signal)\n", + (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, + (intmax_t) rem.ts.tv_sec, (intmax_t) rem.ts.tv_nsec); + puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/nanosleep.test b/tests-mx32/nanosleep.test new file mode 100755 index 000000000..055a8dcd7 --- /dev/null +++ b/tests-mx32/nanosleep.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check nanosleep and setitimer syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 -e trace=nanosleep,setitimer diff --git a/tests-mx32/net-accept-connect.c b/tests-mx32/net-accept-connect.c new file mode 100644 index 000000000..04c05a60d --- /dev/null +++ b/tests-mx32/net-accept-connect.c @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2013-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +static void +handler(int sig) +{ + assert(close(1) == 0); + _exit(0); +} + +int +main(int ac, const char **av) +{ + struct sockaddr_un addr = { + .sun_family = AF_UNIX, + }; + socklen_t len; + + assert(ac == 2); + assert(strlen(av[1]) > 0); + + strncpy(addr.sun_path, av[1], sizeof(addr.sun_path)); + len = offsetof(struct sockaddr_un, sun_path) + strlen(av[1]) + 1; + if (len > sizeof(addr)) + len = sizeof(addr); + + unlink(av[1]); + close(0); + close(1); + + if (socket(AF_UNIX, SOCK_STREAM, 0)) + perror_msg_and_skip("socket"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); + + memset(&addr, 0, sizeof addr); + assert(getsockname(0, (struct sockaddr *) &addr, &len) == 0); + if (len > sizeof(addr)) + len = sizeof(addr); + + pid_t pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (pid) { + assert(accept(0, (struct sockaddr *) &addr, &len) == 1); + assert(close(0) == 0); + assert(kill(pid, SIGUSR1) == 0); + int status; + assert(waitpid(pid, &status, 0) == pid); + assert(status == 0); + assert(close(1) == 0); + } else { + sigset_t set; + sigemptyset(&set); + sigaddset(&set, SIGUSR1); + + assert(sigprocmask(SIG_BLOCK, &set, NULL) == 0); + assert(signal(SIGUSR1, handler) != SIG_ERR); + assert(socket(AF_UNIX, SOCK_STREAM, 0) == 1); + assert(close(0) == 0); + assert(connect(1, (struct sockaddr *) &addr, len) == 0); + assert(sigprocmask(SIG_UNBLOCK, &set, NULL) == 0); + assert(pause() == 99); + return 1; + } + + unlink(av[1]); + return 0; +} diff --git a/tests-mx32/net-icmp_filter.c b/tests-mx32/net-icmp_filter.c new file mode 100644 index 000000000..f3f99f142 --- /dev/null +++ b/tests-mx32/net-icmp_filter.c @@ -0,0 +1,84 @@ +/* + * Check decoding of ICMP_FILTER. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + getsockopt(-1, SOL_RAW, ICMP_FILTER, 0, 0); + printf("getsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, NULL) = -1 %s (%m)\n", + errno2name()); + + setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0); + printf("setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0) = -1 %s (%m)\n", + errno2name()); + + socklen_t *const plen = tail_alloc(sizeof(*plen)); + void *const efault = plen + 1; + struct icmp_filter *const f = tail_alloc(sizeof(*f)); + + getsockopt(-1, SOL_RAW, ICMP_FILTER, f, plen); + printf("getsockopt(-1, SOL_RAW, ICMP_FILTER, %p, %p) = -1 %s (%m)\n", + f, plen, errno2name()); + + setsockopt(-1, SOL_RAW, ICMP_FILTER, efault, sizeof(*f)); + printf("setsockopt(-1, SOL_RAW, ICMP_FILTER, %p, %u) = -1 %s (%m)\n", + efault, (unsigned) sizeof(*f), errno2name()); + + f->data = ~( + 1< + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_BLUETOOTH_BLUETOOTH_H +# include +# include +# include +# include +# include +#endif + +#ifdef HAVE_IF_INDEXTONAME +/* used to conflict with */ +extern unsigned int if_nametoindex(const char *); +#endif + +static void +check_un(void) +{ + struct sockaddr_un *un = tail_alloc(sizeof(*un)); + un->sun_family = AF_UNIX; + memset(un->sun_path, '0', sizeof(un->sun_path)); + unsigned int len = sizeof(*un); + int ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path), 0, len, ret); + + un->sun_path[1] = 0; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=\"%u\"}, %u)" + " = %d EBADF (%m)\n", 0, len, ret); + + un->sun_path[0] = 0; + un->sun_path[2] = 1; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=@\"\\0\\001%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path) - 3, 0, len, ret); + + un = ((void *) un) - 2; + un->sun_family = AF_UNIX; + memset(un->sun_path, '0', sizeof(un->sun_path)); + len = sizeof(*un) + 2; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path), 0, len, ret); + + un->sun_path[0] = 0; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=@\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path) - 1, 0, len, ret); + + un = ((void *) un) + 4; + un->sun_family = AF_UNIX; + len = sizeof(*un) - 2; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path) - 2, 0, len, ret); + + un->sun_path[0] = 0; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=@\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path) - 3, 0, len, ret); + + len = sizeof(*un); + ret = connect(-1, (void *) un, len); + printf("connect(-1, %p, %u) = %d EBADF (%m)\n", un, len, ret); + + un = tail_alloc(sizeof(struct sockaddr_storage)); + un->sun_family = AF_UNIX; + memset(un->sun_path, '0', sizeof(un->sun_path)); + len = sizeof(struct sockaddr_storage) + 1; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path), 0, len, ret); + + un->sun_path[0] = 0; + ret = connect(-1, (void *) un, len); + printf("connect(-1, {sa_family=AF_UNIX, sun_path=@\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", + (int) sizeof(un->sun_path) - 1, 0, len, ret); +} + +static void +check_in(void) +{ + const unsigned short h_port = 12345; + static const char h_addr[] = "12.34.56.78"; + + struct sockaddr_in *in = tail_alloc(sizeof(*in)); + in->sin_family = AF_INET; + in->sin_port = htons(h_port); + in->sin_addr.s_addr = inet_addr(h_addr); + unsigned int len = sizeof(*in); + int ret = connect(-1, (void *) in, len); + printf("connect(-1, {sa_family=AF_INET, sin_port=htons(%hu)" + ", sin_addr=inet_addr(\"%s\")}, %u) = %d EBADF (%m)\n", + h_port, h_addr, len, ret); + + in = ((void *) in) - 4; + in->sin_family = AF_INET; + in->sin_port = htons(h_port); + in->sin_addr.s_addr = inet_addr(h_addr); + len = sizeof(*in) + 4; + ret = connect(-1, (void *) in, len); + printf("connect(-1, {sa_family=AF_INET, sin_port=htons(%hu)" + ", sin_addr=inet_addr(\"%s\")}, %u) = %d EBADF (%m)\n", + h_port, h_addr, len, ret); + + in = ((void *) in) + 8; + in->sin_family = AF_INET; + in->sin_port = 0; + in->sin_addr.s_addr = 0; + len = sizeof(*in) - 4; + ret = connect(-1, (void *) in, len); + printf("connect(-1, {sa_family=AF_INET, sa_data=\"%s\"}, %u)" + " = %d EBADF (%m)\n", + "\\0\\0\\0\\0\\0\\0\\377\\377\\377\\377", + len, ret); + + len = sizeof(*in); + ret = connect(-1, (void *) in, len); + printf("connect(-1, %p, %u) = %d EBADF (%m)\n", in, len, ret); +} + +static void +check_in6_linklocal(struct sockaddr_in6 *const in6, const char *const h_addr) +{ + inet_pton(AF_INET6, h_addr, &in6->sin6_addr); + + in6->sin6_scope_id = 0xfacefeed; + unsigned int len = sizeof(*in6); + int ret = connect(-1, (void *) in6, len); + printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)" + ", inet_pton(AF_INET6, \"%s\", &sin6_addr)" + ", sin6_flowinfo=htonl(%u)" + ", sin6_scope_id=%u}, %u)" + " = %d EBADF (%m)\n", + ntohs(in6->sin6_port), h_addr, + ntohl(in6->sin6_flowinfo), in6->sin6_scope_id, len, ret); + +#ifdef HAVE_IF_INDEXTONAME + in6->sin6_scope_id = if_nametoindex("lo"); + if (in6->sin6_scope_id) { + ret = connect(-1, (void *) in6, len); + printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)" + ", inet_pton(AF_INET6, \"%s\", &sin6_addr)" + ", sin6_flowinfo=htonl(%u)" + ", sin6_scope_id=if_nametoindex(\"lo\")}, %u)" + " = %d EBADF (%m)\n", + ntohs(in6->sin6_port), h_addr, + ntohl(in6->sin6_flowinfo), len, ret); + } +#endif +} + +static void +check_in6(void) +{ + const unsigned short h_port = 12345; + const unsigned int h_flowinfo = 1234567890; + static const char h_addr[] = "12:34:56:78:90:ab:cd:ef"; + + struct sockaddr_in6 *in6 = tail_alloc(sizeof(*in6)); + in6->sin6_family = AF_INET6; + in6->sin6_port = htons(h_port); + in6->sin6_flowinfo = htonl(h_flowinfo); + inet_pton(AF_INET6, h_addr, &in6->sin6_addr); + in6->sin6_scope_id = 0xfacefeed; + unsigned int len = sizeof(*in6); + int ret = connect(-1, (void *) in6, len); + printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)" + ", inet_pton(AF_INET6, \"%s\", &sin6_addr)" + ", sin6_flowinfo=htonl(%u), sin6_scope_id=%u}, %u)" + " = %d EBADF (%m)\n", + h_port, h_addr, h_flowinfo, in6->sin6_scope_id, len, ret); + + check_in6_linklocal(in6, "fe80::"); + check_in6_linklocal(in6, "ff42::"); + + in6 = ((void *) in6) - 4; + in6->sin6_family = AF_INET6; + in6->sin6_port = htons(h_port); + in6->sin6_flowinfo = htonl(h_flowinfo); + inet_pton(AF_INET6, h_addr, &in6->sin6_addr); + in6->sin6_scope_id = 0xfacefeed; + len = sizeof(*in6) + 4; + ret = connect(-1, (void *) in6, len); + printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)" + ", inet_pton(AF_INET6, \"%s\", &sin6_addr)" + ", sin6_flowinfo=htonl(%u), sin6_scope_id=%u}, %u)" + " = %d EBADF (%m)\n", + h_port, h_addr, h_flowinfo, in6->sin6_scope_id, len, ret); + + in6 = ((void *) in6) + 4 + sizeof(in6->sin6_scope_id); + in6->sin6_family = AF_INET6; + in6->sin6_port = htons(h_port); + in6->sin6_flowinfo = htonl(h_flowinfo); + inet_pton(AF_INET6, h_addr, &in6->sin6_addr); + len = sizeof(*in6) - sizeof(in6->sin6_scope_id); + ret = connect(-1, (void *) in6, len); + printf("connect(-1, {sa_family=AF_INET6, sin6_port=htons(%hu)" + ", inet_pton(AF_INET6, \"%s\", &sin6_addr)" + ", sin6_flowinfo=htonl(%u)}, %u)" + " = %d EBADF (%m)\n", + h_port, h_addr, h_flowinfo, len, ret); + + in6 = ((void *) in6) + 4; + in6->sin6_family = AF_INET6; + in6->sin6_port = 0; + in6->sin6_flowinfo = 0; + memset(&in6->sin6_addr, '0', sizeof(in6->sin6_addr) - 4); + len = sizeof(*in6) - sizeof(in6->sin6_scope_id) - 4; + ret = connect(-1, (void *) in6, len); + printf("connect(-1, {sa_family=AF_INET6" + ", sa_data=\"\\0\\0\\0\\0\\0\\000%.*u\"}, %u)" + " = %d EBADF (%m)\n", + (int) (len - offsetof(struct sockaddr_in6, sin6_addr)), 0, + len, ret); + + len = sizeof(*in6) - sizeof(in6->sin6_scope_id); + ret = connect(-1, (void *) in6, len); + printf("connect(-1, %p, %u) = %d EBADF (%m)\n", in6, len, ret); +} + +static void +check_ipx(void) +{ + const unsigned short h_port = 12345; + const unsigned int h_network = 0xfacefeed; + struct sockaddr_ipx c_ipx = { + .sipx_family = AF_IPX, + .sipx_port = htons(h_port), + .sipx_network = htonl(h_network), + .sipx_node = "ABCDEF", + .sipx_type = -1 + }; + void *ipx = tail_memdup(&c_ipx, sizeof(c_ipx)); + unsigned int len = sizeof(c_ipx); + int ret = connect(-1, ipx, len); + printf("connect(-1, {sa_family=AF_IPX, sipx_port=htons(%u)" + ", sipx_network=htonl(%#x)" + ", sipx_node=[%#02x, %#02x, %#02x, %#02x, %#02x, %#02x]" + ", sipx_type=%#02x}, %u) = %d EBADF (%m)\n", + h_port, h_network, + c_ipx.sipx_node[0], c_ipx.sipx_node[1], + c_ipx.sipx_node[2], c_ipx.sipx_node[3], + c_ipx.sipx_node[4], c_ipx.sipx_node[5], + c_ipx.sipx_type, len, ret); +} + +static void +check_nl(void) +{ + struct sockaddr_nl *nl = tail_alloc(sizeof(*nl)); + nl->nl_family = AF_NETLINK; + nl->nl_pid = 1234567890; + nl->nl_groups = 0xfacefeed; + unsigned int len = sizeof(*nl); + int ret = connect(-1, (void *) nl, len); + printf("connect(-1, {sa_family=AF_NETLINK, nl_pid=%d" + ", nl_groups=%#08x}, %u) = %d EBADF (%m)\n", + nl->nl_pid, nl->nl_groups, len, ret); + + nl = ((void *) nl) - 4; + nl->nl_family = AF_NETLINK; + nl->nl_pid = 1234567890; + nl->nl_groups = 0xfacefeed; + len = sizeof(*nl) + 4; + ret = connect(-1, (void *) nl, len); + printf("connect(-1, {sa_family=AF_NETLINK, nl_pid=%d" + ", nl_groups=%#08x}, %u) = %d EBADF (%m)\n", + nl->nl_pid, nl->nl_groups, len, ret); +} + +static void +check_ll(void) +{ + struct sockaddr_ll c_ll = { + .sll_family = AF_PACKET, + .sll_protocol = htons(ETH_P_ALL), + .sll_ifindex = 0xfacefeed, + .sll_hatype = ARPHRD_ETHER, + .sll_pkttype = PACKET_HOST, + .sll_halen = sizeof(c_ll.sll_addr), + .sll_addr = "abcdefgh" + }; + void *ll = tail_memdup(&c_ll, sizeof(c_ll)); + unsigned int len = sizeof(c_ll); + int ret = connect(-1, ll, len); + printf("connect(-1, {sa_family=AF_PACKET" + ", sll_protocol=htons(ETH_P_ALL)" + ", sll_ifindex=%u, sll_hatype=ARPHRD_ETHER" + ", sll_pkttype=PACKET_HOST, sll_halen=%u, sll_addr=" + "[%#02x, %#02x, %#02x, %#02x, %#02x, %#02x, %#02x, %#02x]" + "}, %u) = %d EBADF (%m)\n", + c_ll.sll_ifindex, c_ll.sll_halen, + c_ll.sll_addr[0], c_ll.sll_addr[1], + c_ll.sll_addr[2], c_ll.sll_addr[3], + c_ll.sll_addr[4], c_ll.sll_addr[5], + c_ll.sll_addr[6], c_ll.sll_addr[7], + len, ret); + + ((struct sockaddr_ll *) ll)->sll_halen++; + ret = connect(-1, ll, len); + printf("connect(-1, {sa_family=AF_PACKET" + ", sll_protocol=htons(ETH_P_ALL)" + ", sll_ifindex=%u, sll_hatype=ARPHRD_ETHER" + ", sll_pkttype=PACKET_HOST, sll_halen=%u, sll_addr=" + "[%#02x, %#02x, %#02x, %#02x, %#02x, %#02x, %#02x, %#02x, ...]" + "}, %u) = %d EBADF (%m)\n", + c_ll.sll_ifindex, c_ll.sll_halen + 1, + c_ll.sll_addr[0], c_ll.sll_addr[1], + c_ll.sll_addr[2], c_ll.sll_addr[3], + c_ll.sll_addr[4], c_ll.sll_addr[5], + c_ll.sll_addr[6], c_ll.sll_addr[7], + len, ret); + + ((struct sockaddr_ll *) ll)->sll_halen = 0; + ret = connect(-1, ll, len); + printf("connect(-1, {sa_family=AF_PACKET" + ", sll_protocol=htons(ETH_P_ALL)" + ", sll_ifindex=%u, sll_hatype=ARPHRD_ETHER" + ", sll_pkttype=PACKET_HOST, sll_halen=0}, %u)" + " = %d EBADF (%m)\n", c_ll.sll_ifindex, len, ret); + +#ifdef HAVE_IF_INDEXTONAME + const int id = if_nametoindex("lo"); + if (id) { + ((struct sockaddr_ll *) ll)->sll_ifindex = id; + ret = connect(-1, ll, len); + printf("connect(-1, {sa_family=AF_PACKET" + ", sll_protocol=htons(ETH_P_ALL)" + ", sll_ifindex=if_nametoindex(\"lo\")" + ", sll_hatype=ARPHRD_ETHER" + ", sll_pkttype=PACKET_HOST, sll_halen=0}, %u)" + " = %d EBADF (%m)\n", len, ret); + } +#endif +} + +#ifdef HAVE_BLUETOOTH_BLUETOOTH_H +static void +check_hci(void) +{ + const unsigned short h_port = 12345; + struct sockaddr_hci *hci = tail_alloc(sizeof(*hci)); + hci->hci_family = AF_BLUETOOTH; + hci->hci_dev = htobs(h_port); + hci->hci_channel = HCI_CHANNEL_RAW; + unsigned int len = sizeof(*hci); + int ret = connect(-1, (void *) hci, len); + printf("connect(-1, {sa_family=AF_BLUETOOTH, hci_dev=htobs(%hu)" + ", hci_channel=HCI_CHANNEL_RAW}, %u) = %d EBADF (%m)\n", + h_port, len, ret); +} + +static void +check_sco(void) +{ + const struct sockaddr_sco c_sco = { + .sco_family = AF_BLUETOOTH, + .sco_bdaddr.b = "abcdef" + }; + void *sco = tail_memdup(&c_sco, sizeof(c_sco)); + unsigned int len = sizeof(c_sco); + int ret = connect(-1, sco, len); + printf("connect(-1, {sa_family=AF_BLUETOOTH" + ", sco_bdaddr=%02x:%02x:%02x:%02x:%02x:%02x" + "}, %u) = %d EBADF (%m)\n", + c_sco.sco_bdaddr.b[0], c_sco.sco_bdaddr.b[1], + c_sco.sco_bdaddr.b[2], c_sco.sco_bdaddr.b[3], + c_sco.sco_bdaddr.b[4], c_sco.sco_bdaddr.b[5], + len, ret); +} + +static void +check_rc(void) +{ + const struct sockaddr_rc c_rc = { + .rc_family = AF_BLUETOOTH, + .rc_bdaddr.b = "abcdef", + .rc_channel = 42 + }; + void *rc = tail_memdup(&c_rc, sizeof(c_rc)); + unsigned int len = sizeof(c_rc); + int ret = connect(-1, rc, len); + printf("connect(-1, {sa_family=AF_BLUETOOTH" + ", rc_bdaddr=%02x:%02x:%02x:%02x:%02x:%02x" + ", rc_channel=%u}, %u) = %d EBADF (%m)\n", + c_rc.rc_bdaddr.b[0], c_rc.rc_bdaddr.b[1], + c_rc.rc_bdaddr.b[2], c_rc.rc_bdaddr.b[3], + c_rc.rc_bdaddr.b[4], c_rc.rc_bdaddr.b[5], + c_rc.rc_channel, len, ret); +} + +static void +check_l2(void) +{ + const unsigned short h_psm = 12345; + const unsigned short h_cid = 13579; + const struct sockaddr_l2 c_l2 = { + .l2_family = AF_BLUETOOTH, + .l2_psm = htobs(h_psm), + .l2_bdaddr.b = "abcdef", + .l2_cid = htobs(h_cid), + .l2_bdaddr_type = 42 + }; + void *l2 = tail_memdup(&c_l2, sizeof(c_l2)); + unsigned int len = sizeof(c_l2); + int ret = connect(-1, l2, len); + printf("connect(-1, {sa_family=AF_BLUETOOTH" + ", l2_psm=htobs(%hu)" + ", l2_bdaddr=%02x:%02x:%02x:%02x:%02x:%02x" + ", l2_cid=htobs(%hu), l2_bdaddr_type=%u}" + ", %u) = %d EBADF (%m)\n", h_psm, + c_l2.l2_bdaddr.b[0], c_l2.l2_bdaddr.b[1], + c_l2.l2_bdaddr.b[2], c_l2.l2_bdaddr.b[3], + c_l2.l2_bdaddr.b[4], c_l2.l2_bdaddr.b[5], + h_cid, c_l2.l2_bdaddr_type, len, ret); +} +#endif + +static void +check_raw(void) +{ + union { + struct sockaddr *sa; + struct sockaddr_storage *st; + } u = { .st = tail_alloc(sizeof(*u.st)) }; + memset(u.st, '0', sizeof(*u.st)); + u.sa->sa_family = 0xff; + unsigned int len = sizeof(*u.st) + 8; + int ret = connect(-1, (void *) u.st, len); + printf("connect(-1, {sa_family=%#x /* AF_??? */, sa_data=\"%.*u\"}" + ", %u) = %d EBADF (%m)\n", u.sa->sa_family, + (int) (sizeof(*u.st) - sizeof(u.sa->sa_family)), 0, len, ret); + + u.sa->sa_family = 0; + len = sizeof(u.sa->sa_family) + 1; + ret = connect(-1, (void *) u.st, len); + printf("connect(-1, {sa_family=AF_UNSPEC, sa_data=\"0\"}, %u)" + " = %d EBADF (%m)\n", len, ret); + + u.sa->sa_family = AF_BLUETOOTH; + ++len; + ret = connect(-1, (void *) u.st, len); + printf("connect(-1, {sa_family=AF_BLUETOOTH, sa_data=\"00\"}, %u)" + " = %d EBADF (%m)\n", len, ret); +} + +int +main(void) +{ + check_un(); + check_in(); + check_in6(); + check_ipx(); + check_nl(); + check_ll(); +#ifdef HAVE_BLUETOOTH_BLUETOOTH_H + check_hci(); + check_sco(); + check_rc(); + check_l2(); +#endif + check_raw(); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/net-sockaddr.test b/tests-mx32/net-sockaddr.test new file mode 100755 index 000000000..cdfe536f8 --- /dev/null +++ b/tests-mx32/net-sockaddr.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of sockaddr structures. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 -e trace=connect diff --git a/tests-mx32/net-y-unix.c b/tests-mx32/net-y-unix.c new file mode 100644 index 000000000..3efc2f645 --- /dev/null +++ b/tests-mx32/net-y-unix.c @@ -0,0 +1,235 @@ +/* + * This file is part of net-y-unix strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(int ac, const char **av) +{ + assert(ac == 2); + + struct sockaddr_un addr = { .sun_family = AF_UNIX }; + unsigned int sun_path_len = strlen(av[1]); + assert(sun_path_len > 0 && sun_path_len <= sizeof(addr.sun_path)); + strncpy(addr.sun_path, av[1], sizeof(addr.sun_path)); + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = offsetof(struct sockaddr_un, sun_path) + strlen(av[1]) + 1; + if (*len > sizeof(addr)) + *len = sizeof(addr); + + int listen_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_UNIX, SOCK_STREAM, 0) = %d\n", + listen_fd, listen_inode); + + (void) unlink(av[1]); + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_UNIX, sun_path=\"%s\"}" + ", %u) = 0\n", listen_fd, listen_inode, av[1], (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", listen_fd, listen_inode); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_SOCKET, SO_PASSCRED, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], [%u]) = 0\n", + listen_fd, listen_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", listen_fd, listen_inode, + av[1], (int) sizeof(addr), (int) *len); + + int connect_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_UNIX, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + unsigned long accept_inode = inode_of_sockfd(accept_fd); + printf("accept(%d, {sa_family=AF_UNIX}" + ", [%d->%d]) = %d\n", + listen_fd, listen_inode, + (int) sizeof(addr), (int) *len, + accept_fd, accept_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", connect_fd, connect_inode, + av[1], (int) sizeof(addr), (int) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d) = 0\n", connect_fd, connect_inode); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d) = 0\n", accept_fd, accept_inode); + + connect_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_UNIX, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + *optval = 1; + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_SOCKET, SO_PASSCRED, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], %u) = 0\n", + connect_fd, connect_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", + listen_fd, listen_inode, av[1], + (int) sizeof(addr), (int) *len); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + accept_inode = inode_of_sockfd(accept_fd); + const char * const sun_path1 = + ((struct sockaddr_un *) accept_sa) -> sun_path + 1; + printf("accept(%d, {sa_family=AF_UNIX" + ", sun_path=@\"%s\"}, [%d->%d]) = %d\n", + listen_fd, listen_inode, sun_path1, + (int) sizeof(addr), (int) *len, + accept_fd, accept_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", + connect_fd, connect_inode, av[1], + (int) sizeof(addr), (int) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(connect_fd, accept_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_UNIX" + ", sun_path=@\"%s\"}, [%d->%d]) = 0\n", + connect_fd, connect_inode, sun_path1, + (int) sizeof(addr), (int) *len); + + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d) = 0\n", connect_fd, connect_inode); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d) = 0\n", accept_fd, accept_inode); + + assert(unlink(av[1]) == 0); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_inode); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/net-y-unix.test b/tests-mx32/net-y-unix.test new file mode 100755 index 000000000..aec8159fd --- /dev/null +++ b/tests-mx32/net-y-unix.test @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Check decoding of network syscalls in -y mode. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -y is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed + +addr="$NAME-local-stream" +run_prog "./$NAME" $addr > /dev/null + +run_strace -a20 -y -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/net-yy-inet.c b/tests-mx32/net-yy-inet.c new file mode 100644 index 000000000..f76f941dd --- /dev/null +++ b/tests-mx32/net-yy-inet.c @@ -0,0 +1,173 @@ +/* + * This file is part of net-yy-inet strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(void) +{ + const struct sockaddr_in addr = { + .sin_family = AF_INET, + .sin_addr.s_addr = htonl(INADDR_LOOPBACK) + }; + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = sizeof(addr); + + const int listen_fd = socket(AF_INET, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + const unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = %d\n", + listen_fd, listen_inode); + + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_INET, sin_port=htons(0)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, %u) = 0\n", + listen_fd, listen_inode, (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", listen_fd, listen_inode); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + const unsigned int listen_port = + ntohs(((struct sockaddr_in *) listen_sa) -> sin_port); + printf("getsockname(%d, {sa_family=AF_INET" + ", sin_port=htons(%u), sin_addr=inet_addr(\"127.0.0.1\")}" + ", [%u]) = 0\n", + listen_fd, listen_port, listen_port, (unsigned) *len); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_TCP, TCP_MAXSEG, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_TCP, TCP_MAXSEG" + ", [%u], [%u]) = 0\n", + listen_fd, listen_port, *optval, (unsigned) *len); + + const int connect_fd = socket(AF_INET, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + const unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = %d\n", + connect_fd, connect_inode); + + *len = sizeof(addr); + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, %u) = 0\n", + connect_fd, connect_inode, listen_port, (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + const int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + const unsigned int connect_port = + ntohs(((struct sockaddr_in *) accept_sa) -> sin_port); + printf("accept(%d, {sa_family=AF_INET" + ", sin_port=htons(%u), sin_addr=inet_addr(\"127.0.0.1\")}" + ", [%u]) = %d127.0.0.1:%u]>\n", + listen_fd, listen_port, connect_port, (unsigned) *len, + accept_fd, listen_port, connect_port); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(accept_fd, accept_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d127.0.0.1:%u]>" + ", {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, [%u]) = 0\n", + accept_fd, listen_port, connect_port, connect_port, + (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d127.0.0.1:%u]>" + ", {sa_family=AF_INET, sin_port=htons(%u)" + ", sin_addr=inet_addr(\"127.0.0.1\")}, [%u]) = 0\n", + connect_fd, connect_port, listen_port, listen_port, + (unsigned) *len); + + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_TCP, TCP_MAXSEG, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d127.0.0.1:%u]>" + ", SOL_TCP, TCP_MAXSEG, [%u], %u) = 0\n", + connect_fd, connect_port, listen_port, *optval, + (unsigned) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, + MSG_DONTROUTE | MSG_DONTWAIT, NULL, 0) == sizeof(text) - 1); + printf("sendto(%d127.0.0.1:%u]>, \"%s\", %u" + ", MSG_DONTROUTE|MSG_DONTWAIT, NULL, 0) = %u\n", + connect_fd, connect_port, listen_port, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d127.0.0.1:%u]>) = 0\n", + connect_fd, connect_port, listen_port); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_WAITALL, + NULL, NULL) == sizeof(text) - 1); + printf("recvfrom(%d127.0.0.1:%u]>, \"%s\", %u" + ", MSG_WAITALL, NULL, NULL) = %u\n", + accept_fd, listen_port, connect_port, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(accept_fd) == 0); + printf("close(%d127.0.0.1:%u]>) = 0\n", + accept_fd, listen_port, connect_port); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_port); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/net-yy-inet.test b/tests-mx32/net-yy-inet.test new file mode 100755 index 000000000..2ebf91fa2 --- /dev/null +++ b/tests-mx32/net-yy-inet.test @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Check decoding of ip:port pairs associated with socket descriptors +# +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_inet_diag + +run_prog "./$NAME" > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/net-yy-netlink.c b/tests-mx32/net-yy-netlink.c new file mode 100644 index 000000000..64d0efca5 --- /dev/null +++ b/tests-mx32/net-yy-netlink.c @@ -0,0 +1,84 @@ +/* + * This file is part of net-yy-netlink strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + +int +main(void) +{ + unsigned magic = 1234; + struct sockaddr_nl addr = { + .nl_family = AF_NETLINK, + .nl_pid = 1234 + }; + struct sockaddr *const sa = tail_memdup(&addr, sizeof(addr)); + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = sizeof(addr); + + const int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG); + if (fd < 0) + perror_msg_and_skip("socket"); + const unsigned long inode = inode_of_sockfd(fd); + printf("socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) = " + "%d\n", fd, inode); + + if (bind(fd, sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_NETLINK" + ", nl_pid=%u, nl_groups=00000000}, %u) = 0\n", + fd, inode, magic, (unsigned) *len); + + if (getsockname(fd, sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_NETLINK" + ", nl_pid=%u, nl_groups=00000000}, [%u]) = 0\n", + fd, magic, magic, (unsigned) *len); + + if (close(fd)) + perror_msg_and_fail("close"); + printf("close(%d) = 0\n", fd, magic); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/net-yy-netlink.test b/tests-mx32/net-yy-netlink.test new file mode 100755 index 000000000..bff1d8616 --- /dev/null +++ b/tests-mx32/net-yy-netlink.test @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check decoding of protocol:portid pairs associated with socket +# descriptors +# +# Copyright (c) 2014 Masatake YAMATO +# Copyright (c) 2014-2016 Dmitry V. Levin +# Copyright (c) 2016 Fabien Siron +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_netlink_diag + +run_prog "./$NAME" > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/net-yy-unix.c b/tests-mx32/net-yy-unix.c new file mode 100644 index 000000000..63637bddb --- /dev/null +++ b/tests-mx32/net-yy-unix.c @@ -0,0 +1,229 @@ +/* + * This file is part of net-yy-unix strace test. + * + * Copyright (c) 2013-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +main(int ac, const char **av) +{ + assert(ac == 2); + + struct sockaddr_un addr = { .sun_family = AF_UNIX }; + unsigned int sun_path_len = strlen(av[1]); + assert(sun_path_len > 0 && sun_path_len <= sizeof(addr.sun_path)); + strncpy(addr.sun_path, av[1], sizeof(addr.sun_path)); + struct sockaddr * const listen_sa = tail_memdup(&addr, sizeof(addr)); + + socklen_t * const len = tail_alloc(sizeof(socklen_t)); + *len = offsetof(struct sockaddr_un, sun_path) + strlen(av[1]) + 1; + if (*len > sizeof(addr)) + *len = sizeof(addr); + + int listen_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (listen_fd < 0) + perror_msg_and_skip("socket"); + unsigned long listen_inode = inode_of_sockfd(listen_fd); + printf("socket(AF_UNIX, SOCK_STREAM, 0) = %d\n", + listen_fd, listen_inode); + + (void) unlink(av[1]); + if (bind(listen_fd, listen_sa, *len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_UNIX, sun_path=\"%s\"}" + ", %u) = 0\n", listen_fd, listen_inode, av[1], (unsigned) *len); + + if (listen(listen_fd, 1)) + perror_msg_and_skip("listen"); + printf("listen(%d, 1) = 0\n", + listen_fd, listen_inode, av[1]); + + unsigned int * const optval = tail_alloc(sizeof(unsigned int)); + *len = sizeof(*optval); + if (getsockopt(listen_fd, SOL_SOCKET, SO_PASSCRED, optval, len)) + perror_msg_and_fail("getsockopt"); + printf("getsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], [%u]) = 0\n", + listen_fd, listen_inode, av[1], *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", listen_fd, listen_inode, + av[1], av[1], (int) sizeof(addr), (int) *len); + + int connect_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + unsigned long connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_UNIX, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + struct sockaddr * const accept_sa = tail_alloc(sizeof(addr)); + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + int accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + unsigned long accept_inode = inode_of_sockfd(accept_fd); + printf("accept(%d, {sa_family=AF_UNIX}" + ", [%d->%d]) = %d%lu,\"%s\"]>\n", + listen_fd, listen_inode, av[1], (int) sizeof(addr), (int) *len, + accept_fd, accept_inode, connect_inode, av[1]); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d%lu]>, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", + connect_fd, connect_inode, + accept_inode, av[1], (int) sizeof(addr), (int) *len); + + char text[] = "text"; + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d%lu]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, accept_inode, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d%lu,\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, connect_inode, av[1], text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d%lu]>) = 0\n", + connect_fd, connect_inode, accept_inode); + + assert(close(accept_fd) == 0); + printf("close(%d%lu,\"%s\"]>) = 0\n", + accept_fd, accept_inode, connect_inode, av[1]); + + connect_fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (connect_fd < 0) + perror_msg_and_fail("socket"); + connect_inode = inode_of_sockfd(connect_fd); + printf("socket(AF_UNIX, SOCK_STREAM, 0) = %d\n", + connect_fd, connect_inode); + + *optval = 1; + *len = sizeof(*optval); + if (setsockopt(connect_fd, SOL_SOCKET, SO_PASSCRED, optval, *len)) + perror_msg_and_fail("setsockopt"); + printf("setsockopt(%d, SOL_SOCKET, SO_PASSCRED" + ", [%u], %u) = 0\n", + connect_fd, connect_inode, *optval, (unsigned) *len); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getsockname(listen_fd, listen_sa, len)) + perror_msg_and_fail("getsockname"); + printf("getsockname(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", listen_fd, listen_inode, + av[1], av[1], (int) sizeof(addr), (int) *len); + + if (connect(connect_fd, listen_sa, *len)) + perror_msg_and_fail("connect"); + printf("connect(%d, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, %u) = 0\n", + connect_fd, connect_inode, av[1], (unsigned) *len); + + memset(accept_sa, 0, sizeof(addr)); + *len = sizeof(addr); + accept_fd = accept(listen_fd, accept_sa, len); + if (accept_fd < 0) + perror_msg_and_fail("accept"); + accept_inode = inode_of_sockfd(accept_fd); + const char * const sun_path1 = + ((struct sockaddr_un *) accept_sa) -> sun_path + 1; + printf("accept(%d, {sa_family=AF_UNIX" + ", sun_path=@\"%s\"}, [%d->%d]) = %d%lu,\"%s\"]>\n", + listen_fd, listen_inode, av[1], sun_path1, + (int) sizeof(addr), (int) *len, + accept_fd, accept_inode, connect_inode, av[1]); + + memset(listen_sa, 0, sizeof(addr)); + *len = sizeof(addr); + if (getpeername(connect_fd, listen_sa, len)) + perror_msg_and_fail("getpeername"); + printf("getpeername(%d%lu,@\"%s\"]>, {sa_family=AF_UNIX" + ", sun_path=\"%s\"}, [%d->%d]) = 0\n", connect_fd, connect_inode, + accept_inode, sun_path1, av[1], (int) sizeof(addr), (int) *len); + + assert(sendto(connect_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, 0) + == sizeof(text) - 1); + printf("sendto(%d%lu,@\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, 0) = %u\n", + connect_fd, connect_inode, accept_inode, sun_path1, text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(recvfrom(accept_fd, text, sizeof(text) - 1, MSG_DONTWAIT, NULL, NULL) + == sizeof(text) - 1); + printf("recvfrom(%d%lu,\"%s\"]>, \"%s\", %u, MSG_DONTWAIT" + ", NULL, NULL) = %u\n", + accept_fd, accept_inode, connect_inode, av[1], text, + (unsigned) sizeof(text) - 1, (unsigned) sizeof(text) - 1); + + assert(close(connect_fd) == 0); + printf("close(%d%lu,@\"%s\"]>) = 0\n", + connect_fd, connect_inode, accept_inode, sun_path1); + + assert(close(accept_fd) == 0); + printf("close(%d%lu,\"%s\"]>) = 0\n", + accept_fd, accept_inode, connect_inode, av[1]); + + assert(unlink(av[1]) == 0); + + assert(close(listen_fd) == 0); + printf("close(%d) = 0\n", + listen_fd, listen_inode, av[1]); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/net-yy-unix.test b/tests-mx32/net-yy-unix.test new file mode 100755 index 000000000..b82761c34 --- /dev/null +++ b/tests-mx32/net-yy-unix.test @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Check decoding of address information (inode[->peer][,path]) +# associated with unix domain socket descriptors. +# +# Copyright (c) 2014 Masatake YAMATO +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -yy is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog sed +run_prog ./netlink_unix_diag + +addr="$NAME-local-stream" +run_prog "./$NAME" $addr > /dev/null + +run_strace -a22 -yy -eclose,network $args > "$EXP" +# Filter out close() calls made by ld.so and libc. +sed -n '/socket/,$p' < "$LOG" > "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/net.expected b/tests-mx32/net.expected new file mode 100644 index 000000000..80dd07016 --- /dev/null +++ b/tests-mx32/net.expected @@ -0,0 +1,7 @@ +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(AF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +socket\(AF_(LOCAL|UNIX|FILE), SOCK_STREAM, 0\) += 1 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +bind\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-local-stream"\}, 19\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +listen\(0, 5\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +getsockname\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-local-stream"\}, \[19\]\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +accept\(0, \{sa_family=AF_(LOCAL|UNIX|FILE)\}, \[19->2\]\) += 1 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +connect\(1, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="net-local-stream"\}, 19\) += 0 diff --git a/tests-mx32/net.test b/tests-mx32/net.test new file mode 100755 index 000000000..cf943ffaa --- /dev/null +++ b/tests-mx32/net.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check how network syscalls are traced. + +. "${srcdir=.}/init.sh" + +run_prog ./net-accept-connect net-local-stream +run_strace_merge -enetwork $args +match_grep + +exit 0 diff --git a/tests-mx32/netlink_inet_diag.c b/tests-mx32/netlink_inet_diag.c new file mode 100644 index 000000000..2332e203a --- /dev/null +++ b/tests-mx32/netlink_inet_diag.c @@ -0,0 +1,144 @@ +/* + * This file is part of inet-yy strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +static void +send_query(const int fd, const int family, const int proto) +{ + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct { + struct nlmsghdr nlh; + struct inet_diag_req_v2 idr; + } req = { + .nlh = { + .nlmsg_len = sizeof(req), + .nlmsg_type = SOCK_DIAG_BY_FAMILY, + .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + }, + .idr = { + .sdiag_family = family, + .sdiag_protocol = proto, + .idiag_states = -1 + } + }; + struct iovec iov = { + .iov_base = &req, + .iov_len = sizeof(req) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); +} + +static void +check_responses(const int fd) +{ + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct iovec iov = { + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + ssize_t ret = recvmsg(fd, &msg, 0); + if (ret <= 0) + perror_msg_and_skip("recvmsg"); + + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct inet_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); +} + +int main(void) +{ + struct sockaddr_in addr; + socklen_t len = sizeof(addr); + + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + + close(0); + close(1); + + if (socket(AF_INET, SOCK_STREAM, 0)) + perror_msg_and_skip("socket AF_INET"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_INET_DIAG) != 1) + perror_msg_and_skip("socket AF_NETLINK"); + + send_query(1, AF_INET, IPPROTO_TCP); + check_responses(1); + return 0; +} diff --git a/tests-mx32/netlink_netlink_diag.c b/tests-mx32/netlink_netlink_diag.c new file mode 100644 index 000000000..fc32822b1 --- /dev/null +++ b/tests-mx32/netlink_netlink_diag.c @@ -0,0 +1,147 @@ +/* + * This file is part of net-yy-netlink strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + +static void +send_query(const int fd) +{ + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct { + struct nlmsghdr nlh; + struct netlink_diag_req ndr; + } req = { + .nlh = { + .nlmsg_len = sizeof(req), + .nlmsg_type = SOCK_DIAG_BY_FAMILY, + .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + }, + .ndr = { + .sdiag_family = AF_NETLINK, + .sdiag_protocol = NDIAG_PROTO_ALL, + .ndiag_show = NDIAG_SHOW_MEMINFO + } + }; + struct iovec iov = { + .iov_base = &req, + .iov_len = sizeof(req) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); +} + +static void +check_responses(const int fd) +{ + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct iovec iov = { + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + ssize_t ret = recvmsg(fd, &msg, 0); + if (ret <= 0) + perror_msg_and_skip("recvmsg"); + + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct netlink_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); +} + +int main(void) +{ + struct sockaddr_nl addr; + socklen_t len = sizeof(addr); + + memset(&addr, 0, sizeof(addr)); + addr.nl_family = AF_NETLINK; + + close(0); + close(1); + + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG)) + perror_msg_and_skip("socket AF_NETLINK"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) != 1) + perror_msg_and_skip("socket AF_NETLINK"); + + send_query(1); + check_responses(1); + return 0; +} diff --git a/tests-mx32/netlink_protocol.c b/tests-mx32/netlink_protocol.c new file mode 100644 index 000000000..34e114be2 --- /dev/null +++ b/tests-mx32/netlink_protocol.c @@ -0,0 +1,240 @@ +/* + * Check decoding of netlink protocol. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * Copyright (c) 2016 Fabien Siron + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_SYS_XATTR_H + +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +# endif + +static void +send_query(const int fd) +{ + static const struct req { + struct nlmsghdr nlh; + const char magic[4]; + } c_req = { + .nlh = { + .nlmsg_len = sizeof(struct req), + .nlmsg_type = NLMSG_NOOP, + .nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST + }, + .magic = "abcd" + }; + struct req *const req = tail_memdup(&c_req, sizeof(c_req)); + long rc; + const char *errstr; + + /* zero address */ + rc = sendto(fd, NULL, sizeof(*req), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, NULL, %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, (unsigned) sizeof(*req), sprintrc(rc)); + + /* zero length */ + rc = sendto(fd, req, 0, MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, \"\", 0, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, sprintrc(rc)); + + /* zero address and length */ + rc = sendto(fd, NULL, 0, MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, NULL, 0, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, sprintrc(rc)); + + /* unfetchable struct nlmsghdr */ + const void *const efault = tail_alloc(sizeof(struct nlmsghdr) - 1); + rc = sendto(fd, efault, sizeof(struct nlmsghdr), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, %p, %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, efault, (unsigned) sizeof(struct nlmsghdr), sprintrc(rc)); + + /* whole message length < sizeof(struct nlmsghdr) */ + rc = sendto(fd, req->magic, sizeof(req->magic), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, \"abcd\", %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, (unsigned) sizeof(req->magic), sprintrc(rc)); + + /* a single message with some data */ + rc = sendto(fd, req, sizeof(*req), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, {{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}, \"abcd\"}, %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, req->nlh.nlmsg_len, NLM_F_DUMP, + (unsigned) sizeof(*req), sprintrc(rc)); + + /* a single message without data */ + req->nlh.nlmsg_len = sizeof(req->nlh); + rc = sendto(fd, &req->nlh, sizeof(req->nlh), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, {{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}}, %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, req->nlh.nlmsg_len, NLM_F_DUMP, + (unsigned) sizeof(req->nlh), sprintrc(rc)); + + /* nlmsg_len > whole message length */ + req->nlh.nlmsg_len = sizeof(*req) + 8; + rc = sendto(fd, req, sizeof(*req), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, {{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}, \"abcd\"}, %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, req->nlh.nlmsg_len, NLM_F_DUMP, + (unsigned) sizeof(*req), sprintrc(rc)); + + /* nlmsg_len < sizeof(struct nlmsghdr) */ + req->nlh.nlmsg_len = 8; + rc = sendto(fd, req, sizeof(*req), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, {{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}}, %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, req->nlh.nlmsg_len, NLM_F_DUMP, + (unsigned) sizeof(*req), sprintrc(rc)); + + /* a sequence of two nlmsg objects */ + struct reqs { + struct req req1; + char padding[NLMSG_ALIGN(sizeof(struct req)) - sizeof(struct req)]; + struct req req2; + } *const reqs = tail_alloc(sizeof(*reqs)); + memcpy(&reqs->req1, &c_req, sizeof(c_req)); + memcpy(&reqs->req2, &c_req, sizeof(c_req)); + + rc = sendto(fd, reqs, sizeof(*reqs), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, [{{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}, \"abcd\"}, {{len=%u, type=NLMSG_NOOP" + ", flags=NLM_F_REQUEST|0x%x, seq=0, pid=0}, \"abcd\"}]" + ", %u, MSG_DONTWAIT, NULL, 0) = %s\n", + fd, reqs->req1.nlh.nlmsg_len, NLM_F_DUMP, + reqs->req2.nlh.nlmsg_len, NLM_F_DUMP, + (unsigned) sizeof(*reqs), sprintrc(rc)); + + /* unfetchable second struct nlmsghdr */ + void *const efault2 = tail_memdup(&reqs->req1, sizeof(reqs->req1)); + rc = sendto(fd, efault2, sizeof(*reqs), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, [{{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}, \"abcd\"}, %p], %u, MSG_DONTWAIT, NULL, 0)" + " = %s\n", + fd, reqs->req1.nlh.nlmsg_len, NLM_F_DUMP, + &((struct reqs *) efault2)->req2, (unsigned) sizeof(*reqs), + sprintrc(rc)); + + /* message length is not enough for the second struct nlmsghdr */ + rc = sendto(fd, reqs, sizeof(*reqs) - sizeof(req->nlh), MSG_DONTWAIT, + NULL, 0); + errstr = sprintrc(rc); + printf("sendto(%d, [{{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}, \"abcd\"}, \"", + fd, reqs->req1.nlh.nlmsg_len, NLM_F_DUMP); + print_quoted_memory((void *) &reqs->req2.nlh, + sizeof(reqs->req2) - sizeof(req->nlh)); + printf("\"], %u, MSG_DONTWAIT, NULL, 0) = %s\n", + (unsigned) (sizeof(*reqs) - sizeof(req->nlh)), errstr); + + /* second nlmsg_len < sizeof(struct nlmsghdr) */ + reqs->req2.nlh.nlmsg_len = 4; + rc = sendto(fd, reqs, sizeof(*reqs), MSG_DONTWAIT, NULL, 0); + printf("sendto(%d, [{{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=0, pid=0}, \"abcd\"}, {{len=%u, type=NLMSG_NOOP" + ", flags=NLM_F_REQUEST|0x%x, seq=0, pid=0}}], %u" + ", MSG_DONTWAIT, NULL, 0) = %s\n", + fd, reqs->req1.nlh.nlmsg_len, NLM_F_DUMP, + reqs->req2.nlh.nlmsg_len, NLM_F_DUMP, + (unsigned) sizeof(*reqs), sprintrc(rc)); + + /* abbreviated output */ +# define DEFAULT_STRLEN 32 +# define ABBREV_LEN (DEFAULT_STRLEN + 1) + const unsigned int msg_len = sizeof(struct nlmsghdr) * ABBREV_LEN; + struct nlmsghdr *const msgs = tail_alloc(msg_len); + unsigned int i; + for (i = 0; i < ABBREV_LEN; ++i) { + msgs[i].nlmsg_len = sizeof(*msgs); + msgs[i].nlmsg_type = NLMSG_NOOP; + msgs[i].nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST; + msgs[i].nlmsg_seq = i; + msgs[i].nlmsg_pid = 0; + } + + rc = sendto(fd, msgs, msg_len, MSG_DONTWAIT, NULL, 0); + errstr = sprintrc(rc); + printf("sendto(%d, [", fd); + for (i = 0; i < DEFAULT_STRLEN; ++i) { + if (i) + printf(", "); + printf("{{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x" + ", seq=%u, pid=0}}", + msgs[i].nlmsg_len, NLM_F_DUMP, msgs[i].nlmsg_seq); + } + printf(", ...], %u, MSG_DONTWAIT, NULL, 0) = %s\n", msg_len, errstr); +} + +int main(void) +{ + struct sockaddr_nl addr; + socklen_t len = sizeof(addr); + int fd; + + memset(&addr, 0, sizeof(addr)); + addr.nl_family = AF_NETLINK; + + if ((fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG)) == -1) + perror_msg_and_skip("socket AF_NETLINK"); + + printf("socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) = %d\n", + fd); + if (bind(fd, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + printf("bind(%d, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}" + ", %u) = 0\n", fd, len); + + char *path; + if (asprintf(&path, "/proc/self/fd/%u", fd) < 0) + perror_msg_and_fail("asprintf"); + char buf[256]; + if (getxattr(path, "system.sockprotoname", buf, sizeof(buf) - 1) < 0) + perror_msg_and_skip("getxattr"); + free(path); + + send_query(fd); + + printf("+++ exited with 0 +++\n"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYS_XATTR_H") + +#endif diff --git a/tests-mx32/netlink_protocol.test b/tests-mx32/netlink_protocol.test new file mode 100755 index 000000000..ab2bb1e8b --- /dev/null +++ b/tests-mx32/netlink_protocol.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check decoding of netlink protocol. + +. "${srcdir=.}/init.sh" + +# getfdproto is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +run_strace_match_diff -e trace=network diff --git a/tests-mx32/netlink_unix_diag.c b/tests-mx32/netlink_unix_diag.c new file mode 100644 index 000000000..269adc6f9 --- /dev/null +++ b/tests-mx32/netlink_unix_diag.c @@ -0,0 +1,156 @@ +/* + * This file is part of net-yy-unix strace test. + * + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG +# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + +static void +send_query(const int fd) +{ + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct { + struct nlmsghdr nlh; + struct unix_diag_req udr; + } req = { + .nlh = { + .nlmsg_len = sizeof(req), + .nlmsg_type = SOCK_DIAG_BY_FAMILY, + .nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP + }, + .udr = { + .sdiag_family = AF_UNIX, + .udiag_states = -1, + .udiag_show = UDIAG_SHOW_NAME | UDIAG_SHOW_PEER + } + }; + struct iovec iov = { + .iov_base = &req, + .iov_len = sizeof(req) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + if (sendmsg(fd, &msg, 0) <= 0) + perror_msg_and_skip("sendmsg"); +} + +static void +check_responses(const int fd) +{ + static union { + struct nlmsghdr hdr; + long buf[8192 / sizeof(long)]; + } hdr_buf; + + struct sockaddr_nl nladdr = { + .nl_family = AF_NETLINK + }; + struct iovec iov = { + .iov_base = hdr_buf.buf, + .iov_len = sizeof(hdr_buf.buf) + }; + struct msghdr msg = { + .msg_name = (void *) &nladdr, + .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, + .msg_iovlen = 1 + }; + + ssize_t ret = recvmsg(fd, &msg, 0); + if (ret <= 0) + perror_msg_and_skip("recvmsg"); + + struct nlmsghdr *h = &hdr_buf.hdr; + if (!NLMSG_OK(h, ret)) + error_msg_and_skip("!NLMSG_OK"); + if (h->nlmsg_type == NLMSG_ERROR) { + const struct nlmsgerr *err = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) + error_msg_and_skip("NLMSG_ERROR"); + errno = -err->error; + perror_msg_and_skip("NLMSG_ERROR"); + } + if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) + error_msg_and_skip("unexpected nlmsg_type %u", + (unsigned) h->nlmsg_type); + + const struct unix_diag_msg *diag = NLMSG_DATA(h); + if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*diag))) + error_msg_and_skip("short response"); +} + +#define SUN_PATH "netlink_unix_diag_socket" +int main(void) +{ + struct sockaddr_un addr = { + .sun_family = AF_UNIX, + .sun_path = SUN_PATH + }; + socklen_t len = offsetof(struct sockaddr_un, sun_path) + sizeof(SUN_PATH); + + close(0); + close(1); + + (void) unlink(SUN_PATH); + if (socket(AF_UNIX, SOCK_STREAM, 0)) + perror_msg_and_skip("socket AF_UNIX"); + if (bind(0, (struct sockaddr *) &addr, len)) + perror_msg_and_skip("bind"); + if (listen(0, 5)) + perror_msg_and_skip("listen"); + + assert(unlink(SUN_PATH) == 0); + + if (socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG) != 1) + perror_msg_and_skip("socket AF_NETLINK"); + + send_query(1); + check_responses(1); + return 0; +} diff --git a/tests-mx32/newfstatat.c b/tests-mx32/newfstatat.c new file mode 100644 index 000000000..b501d880d --- /dev/null +++ b/tests-mx32/newfstatat.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_newfstatat + +# define TEST_SYSCALL_NR __NR_newfstatat +# define TEST_SYSCALL_STR "newfstatat" +# include "fstatat.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_newfstatat") + +#endif diff --git a/tests-mx32/newfstatat.test b/tests-mx32/newfstatat.test new file mode 100755 index 000000000..6d83ec087 --- /dev/null +++ b/tests-mx32/newfstatat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check newfstatat syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-mx32/nsyscalls.c b/tests-mx32/nsyscalls.c new file mode 100644 index 000000000..aecf7aa7e --- /dev/null +++ b/tests-mx32/nsyscalls.c @@ -0,0 +1,108 @@ +/* + * Check decoding of out-of-range syscalls. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "sysent.h" +#include +#include +#include +#include + +#define TD 0 +#define TF 0 +#define TI 0 +#define TN 0 +#define TP 0 +#define TS 0 +#define TM 0 +#define NF 0 +#define MA 0 +#define SI 0 +#define SE 0 +#define CST 0 +#define SEN(arg) 0,0 + +static const struct_sysent syscallent[] = { +#include "syscallent.h" +}; + +#if defined __X32_SYSCALL_BIT && defined __NR_read \ + && (__X32_SYSCALL_BIT & __NR_read) != 0 +# define SYSCALL_BIT __X32_SYSCALL_BIT +#else +# define SYSCALL_BIT 0 +#endif + +static void +test_syscall(const unsigned long nr) +{ + static const kernel_ulong_t a[] = { + (kernel_ulong_t) 0xface0fedbadc0dedULL, + (kernel_ulong_t) 0xface1fedbadc1dedULL, + (kernel_ulong_t) 0xface2fedbadc2dedULL, + (kernel_ulong_t) 0xface3fedbadc3dedULL, + (kernel_ulong_t) 0xface4fedbadc4dedULL, + (kernel_ulong_t) 0xface5fedbadc5dedULL + }; + + long rc = syscall(nr | SYSCALL_BIT, + a[0], a[1], a[2], a[3], a[4], a[5]); +#ifdef LINUX_MIPSO32 + printf("syscall(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx)" + " = %ld ENOSYS (%m)\n", nr | SYSCALL_BIT, + a[0], a[1], a[2], a[3], a[4], a[5], rc); +#else + printf("syscall_%lu(%#llx, %#llx, %#llx, %#llx, %#llx, %#llx)" + " = %ld (errno %d)\n", nr, + (unsigned long long) a[0], + (unsigned long long) a[1], + (unsigned long long) a[2], + (unsigned long long) a[3], + (unsigned long long) a[4], + (unsigned long long) a[5], + rc, errno); +#endif +} + +int +main(void) +{ + test_syscall(ARRAY_SIZE(syscallent)); + +#ifdef SYS_socket_subcall + test_syscall(SYS_socket_subcall + 1); +#endif + +#ifdef SYS_ipc_subcall + test_syscall(SYS_ipc_subcall + 1); +#endif + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/nsyscalls.test b/tests-mx32/nsyscalls.test new file mode 100755 index 000000000..61f72d520 --- /dev/null +++ b/tests-mx32/nsyscalls.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check decoding of out-of-range syscalls. + +. "${srcdir=.}/init.sh" + +if [ "$MIPS_ABI" = "o32" ]; then + syscall=syscall +else + syscall=none +fi + +run_strace_match_diff -e trace=$syscall diff --git a/tests-mx32/old_mmap.c b/tests-mx32/old_mmap.c new file mode 100644 index 000000000..2725fb754 --- /dev/null +++ b/tests-mx32/old_mmap.c @@ -0,0 +1,101 @@ +/* + * Check decoding of "old mmap" edition of mmap syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +/* + * On s390x and m68k, this is the mmap syscall used by glibc, so, + * from one side, it's already covered by another test, and, from another side, + * it would require additional efforts to filter out mmap calls made by glibc. + */ + +#if defined __NR_mmap && \ +( defined __arm__ \ + || defined __i386__ \ + || (defined __s390__ && !defined __s390x__) \ +) + +# include +# include +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_mmap, 0); + printf("mmap(NULL) = %ld %s (%m)\n", rc, errno2name()); + + const unsigned int args1_c[6] = { + 0xdeadbeef, /* addr */ + 0xfacefeed, /* len */ + PROT_READ|PROT_EXEC, /* prot */ + MAP_FILE|MAP_FIXED, /* flags */ + -2U, /* fd */ + 0xbadc0ded /* offset */ + }; + const unsigned int page_size = get_page_size(); + const unsigned int args2_c[6] = { + 0, + page_size, + PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, + -1U, + 0xfaced000 & -page_size + }; + void *args = tail_memdup(args1_c, sizeof(args1_c)); + + rc = syscall(__NR_mmap, args); + printf("mmap(%#x, %u, PROT_READ|PROT_EXEC, MAP_FILE|MAP_FIXED" + ", %d, %#x) = %ld %s (%m)\n", + args1_c[0], args1_c[1], args1_c[4], args1_c[5], + rc, errno2name()); + + memcpy(args, args2_c, sizeof(args2_c)); + rc = syscall(__NR_mmap, args); + printf("mmap(NULL, %u, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS" + ", %d, %#x) = %#lx\n", + args2_c[1], args2_c[4], args2_c[5], rc); + + void *addr = (void *) rc; + if (mprotect(addr, page_size, PROT_NONE)) + perror_msg_and_fail("mprotect(%p, %u, PROT_NONE)", + addr, page_size); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mmap && (__arm__ || __i386__" + " || (__s390__ && !__s390x__))") + +#endif diff --git a/tests-mx32/old_mmap.test b/tests-mx32/old_mmap.test new file mode 100755 index 000000000..af776ff7b --- /dev/null +++ b/tests-mx32/old_mmap.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of "old mmap" edition of mmap syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 -e trace=mmap diff --git a/tests-mx32/oldfstat.c b/tests-mx32/oldfstat.c new file mode 100644 index 000000000..f5a94416c --- /dev/null +++ b/tests-mx32/oldfstat.c @@ -0,0 +1,49 @@ +/* + * Check decoding of oldfstat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_oldfstat && HAVE_STRUCT___OLD_KERNEL_STAT + +# define OLD_STAT 1 +# define TEST_SYSCALL_NR __NR_oldfstat +# define TEST_SYSCALL_STR "oldfstat" +# define STRUCT_STAT struct __old_kernel_stat +# define STRUCT_STAT_STR "struct __old_kernel_stat" +# define STRUCT_STAT_IS_STAT64 0 +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 23147718418U) +# include "fstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_oldfstat && HAVE_STRUCT___OLD_KERNEL_STAT") + +#endif diff --git a/tests-mx32/oldfstat.test b/tests-mx32/oldfstat.test new file mode 100755 index 000000000..66a105612 --- /dev/null +++ b/tests-mx32/oldfstat.test @@ -0,0 +1,19 @@ +#!/bin/sh + +# Check oldfstat syscall decoding. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +syscall=$NAME +run_prog > /dev/null +sample=$syscall.sample +> "$sample" +run_strace -ve$syscall -P$sample -a21 $args > "$OUT" +match_diff "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests-mx32/oldlstat.c b/tests-mx32/oldlstat.c new file mode 100644 index 000000000..661323701 --- /dev/null +++ b/tests-mx32/oldlstat.c @@ -0,0 +1,49 @@ +/* + * Check decoding of oldlstat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_oldlstat && HAVE_STRUCT___OLD_KERNEL_STAT + +# define OLD_STAT 1 +# define TEST_SYSCALL_NR __NR_oldlstat +# define TEST_SYSCALL_STR "oldlstat" +# define STRUCT_STAT struct __old_kernel_stat +# define STRUCT_STAT_STR "struct __old_kernel_stat" +# define STRUCT_STAT_IS_STAT64 0 +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 23147718418U) +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_oldlstat && HAVE_STRUCT___OLD_KERNEL_STAT") + +#endif diff --git a/tests-mx32/oldlstat.test b/tests-mx32/oldlstat.test new file mode 100755 index 000000000..a0f9ab931 --- /dev/null +++ b/tests-mx32/oldlstat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check oldlstat syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-mx32/oldselect.c b/tests-mx32/oldselect.c new file mode 100644 index 000000000..7413fc336 --- /dev/null +++ b/tests-mx32/oldselect.c @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_select && defined __NR__newselect \ + && __NR_select != __NR__newselect \ + && !defined SPARC + +# include +# include + +int +main(void) +{ + int fds[2]; + fd_set r = {}, w = {}; + struct timeval timeout = { .tv_sec = 0, .tv_usec = 42 }; + long args[] = { + 2, (long) &r, (long) &w, 0, (long) &timeout, + 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded, 0xdeadbeef + }; + + (void) close(0); + (void) close(1); + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + FD_SET(0, &w); + FD_SET(1, &r); + if (syscall(__NR_select, args)) + perror_msg_and_skip("select"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_select && __NR__newselect") + +#endif diff --git a/tests-mx32/oldselect.expected b/tests-mx32/oldselect.expected new file mode 100644 index 000000000..d6e7f3c4b --- /dev/null +++ b/tests-mx32/oldselect.expected @@ -0,0 +1,2 @@ +select(2, [1], [0], NULL, {tv_sec=0, tv_usec=42}) = 0 (Timeout) ++++ exited with 0 +++ diff --git a/tests-mx32/oldselect.test b/tests-mx32/oldselect.test new file mode 100755 index 000000000..35661ad43 --- /dev/null +++ b/tests-mx32/oldselect.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check old select syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -a34 -eselect $args +match_diff + +exit 0 diff --git a/tests-mx32/oldstat.c b/tests-mx32/oldstat.c new file mode 100644 index 000000000..d06e2bc64 --- /dev/null +++ b/tests-mx32/oldstat.c @@ -0,0 +1,49 @@ +/* + * Check decoding of oldstat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_oldstat && HAVE_STRUCT___OLD_KERNEL_STAT + +# define OLD_STAT 1 +# define TEST_SYSCALL_NR __NR_oldstat +# define TEST_SYSCALL_STR "oldstat" +# define STRUCT_STAT struct __old_kernel_stat +# define STRUCT_STAT_STR "struct __old_kernel_stat" +# define STRUCT_STAT_IS_STAT64 0 +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 131478418U) +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_oldstat && HAVE_STRUCT___OLD_KERNEL_STAT") + +#endif diff --git a/tests-mx32/oldstat.test b/tests-mx32/oldstat.test new file mode 100755 index 000000000..42d70f7f8 --- /dev/null +++ b/tests-mx32/oldstat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check oldstat syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-mx32/open.c b/tests-mx32/open.c new file mode 100644 index 000000000..01e89b0f2 --- /dev/null +++ b/tests-mx32/open.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_open + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "open.sample"; + + long fd = syscall(__NR_open, sample, O_RDONLY|O_CREAT, 0400); + printf("open(\"%s\", O_RDONLY|O_CREAT, 0400) = %s\n", + sample, sprintrc(fd)); + + if (fd != -1) { + close(fd); + if (unlink(sample)) + perror_msg_and_fail("unlink"); + + fd = syscall(__NR_open, sample, O_RDONLY); + printf("open(\"%s\", O_RDONLY) = %s\n", sample, sprintrc(fd)); + + fd = syscall(__NR_open, sample, O_WRONLY|O_NONBLOCK|0x80000000); + printf("open(\"%s\", O_WRONLY|O_NONBLOCK|0x80000000) = %s\n", + sample, sprintrc(fd)); + } + +#ifdef O_TMPFILE +# if O_TMPFILE == (O_TMPFILE & ~O_DIRECTORY) +# define STR_O_TMPFILE "O_TMPFILE" +# else +# define STR_O_TMPFILE "O_DIRECTORY|O_TMPFILE" +# endif + fd = syscall(__NR_open, sample, O_WRONLY|O_TMPFILE, 0600); + printf("open(\"%s\", O_WRONLY|%s, 0600) = %s\n", + sample, STR_O_TMPFILE, sprintrc(fd)); +#endif /* O_TMPFILE */ + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_open") + +#endif diff --git a/tests-mx32/open.test b/tests-mx32/open.test new file mode 100755 index 000000000..6df19cb82 --- /dev/null +++ b/tests-mx32/open.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check open syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a30 -P $NAME.sample diff --git a/tests-mx32/openat.c b/tests-mx32/openat.c new file mode 100644 index 000000000..1d6765cf6 --- /dev/null +++ b/tests-mx32/openat.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2016 Katerina Koukiou + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_openat + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "openat.sample"; + + long fd = syscall(__NR_openat, -100, sample, O_RDONLY|O_CREAT, 0400); + printf("openat(AT_FDCWD, \"%s\", O_RDONLY|O_CREAT, 0400) = %s\n", + sample, sprintrc(fd)); + + if (fd != -1) { + close(fd); + if (unlink(sample) == -1) + perror_msg_and_fail("unlink"); + + fd = syscall(__NR_openat, -100, sample, O_RDONLY); + printf("openat(AT_FDCWD, \"%s\", O_RDONLY) = %s\n", + sample, sprintrc(fd)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_openat") + +#endif diff --git a/tests-mx32/openat.test b/tests-mx32/openat.test new file mode 100755 index 000000000..68c4cee14 --- /dev/null +++ b/tests-mx32/openat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check openat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -P $NAME.sample diff --git a/tests-mx32/opipe.test b/tests-mx32/opipe.test new file mode 100755 index 000000000..90e6838af --- /dev/null +++ b/tests-mx32/opipe.test @@ -0,0 +1,16 @@ +#!/bin/sh + +# Check how -o '|pipe' works. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog grep chdir $srcdir/umovestr.expected > "$EXP" +run_prog ./umovestr + +> "$LOG" || fail_ "failed to write $LOG" +$STRACE -o "|cat > $LOG && $SLEEP_A_BIT && grep chdir < $LOG > $OUT" -e chdir $args || + dump_log_and_fail_with "$STRACE $args failed" + +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/options-syntax.test b/tests-mx32/options-syntax.test new file mode 100755 index 000000000..592b0e034 --- /dev/null +++ b/tests-mx32/options-syntax.test @@ -0,0 +1,148 @@ +#!/bin/sh +# +# Check strace options syntax. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +check_exit_status_and_stderr() +{ + $STRACE "$@" 2> "$LOG" && + dump_log_and_fail_with \ + "strace $* failed to handle the error properly" + match_diff "$LOG" "$EXP" || + dump_log_and_fail_with \ + "strace $* failed to print expected diagnostics" +} + +strace_exp="${STRACE##* }" + +check_e() +{ + local pattern="$1"; shift + cat > "$EXP" << __EOF__ +$strace_exp: $pattern +__EOF__ + check_exit_status_and_stderr "$@" +} + +check_h() +{ + local pattern="$1"; shift + cat > "$EXP" << __EOF__ +$strace_exp: $pattern +Try '$strace_exp -h' for more information. +__EOF__ + check_exit_status_and_stderr "$@" +} + +check_e "Invalid process id: '0'" -p 0 +check_e "Invalid process id: '-42'" -p -42 +check_e "Invalid process id: '$$.'" -p $$. +check_e "Invalid process id: 'a'" -p 1,a +check_e "Syscall 'chdir' for -b isn't supported" -b chdir +check_e "Syscall 'chdir' for -b isn't supported" -b execve -b chdir + +check_e "invalid system call '-1'" -e-1 +check_e "invalid system call '-2'" -e -2 +check_e "invalid system call '-3'" -etrace=-3 +check_e "invalid system call '-4'" -e trace=-4 +check_e "invalid system call '-5'" -e trace=1,-5 +check_e "invalid system call '2147483647'" -e 2147483647 +check_e "invalid system call '2147483648'" -e 2147483648 +check_e "invalid system call '4294967295'" -e 4294967295 +check_e "invalid system call '4294967296'" -e 4294967296 + +check_e "invalid descriptor '-1'" -eread=-1 +check_e "invalid descriptor '-42'" -ewrite=-42 +check_e "invalid descriptor '2147483648'" -eread=2147483648 +check_e "invalid descriptor '4294967296'" -ewrite=4294967296 +check_e "invalid descriptor 'foo'" -eread=foo +check_e "invalid descriptor ''" -ewrite= +check_e "invalid descriptor ','" -eread=, +check_e "invalid descriptor '!'" -ewrite='!' +check_e "invalid descriptor '!'" -eread='0,!' +check_e "invalid descriptor '!,'" -ewrite='!,' + +check_h 'must have PROG [ARGS] or -p PID' +check_h 'PROG [ARGS] must be specified with -D' -D -p $$ +check_h '-c and -C are mutually exclusive' -c -C true +check_h '-c and -C are mutually exclusive' -C -c true +check_h '(-c or -C) and -ff are mutually exclusive' -c -ff true +check_h '(-c or -C) and -ff are mutually exclusive' -C -ff true +check_h '-w must be given with (-c or -C)' -w true +check_h 'piping the output and -ff are mutually exclusive' -o '|' -ff true +check_h 'piping the output and -ff are mutually exclusive' -o '!' -ff true +check_h "invalid -a argument: '-42'" -a -42 +check_h "invalid -O argument: '-42'" -O -42 +check_h "invalid -s argument: '-42'" -s -42 +check_h "invalid -I argument: '5'" -I 5 + +if [ -n "${UID-}" ]; then + if [ "${UID-}" = 0 ]; then + umsg="Cannot find user ':nosuchuser:'" + else + umsg='You must be root to use the -u option' + fi + + check_e "$umsg" -u :nosuchuser: true + + for c in i r t T y; do + check_e "-$c has no effect with -c +$strace_exp: $umsg" -u :nosuchuser: -c -$c true + done + check_e "-i has no effect with -c +$strace_exp: -r has no effect with -c +$strace_exp: -t has no effect with -c +$strace_exp: -T has no effect with -c +$strace_exp: -y has no effect with -c +$strace_exp: $umsg" -u :nosuchuser: -cirtTy true + + check_e "-tt has no effect with -r +$strace_exp: $umsg" -u :nosuchuser: -r -tt true +fi + +args='-p 2147483647' +$STRACE $args 2> "$LOG" && + dump_log_and_fail_with \ + "strace $args failed to handle the error properly" + +for cmd in PTRACE_SEIZE PTRACE_ATTACH; do + cat > "$EXP" << __EOF__ +$strace_exp: attach: ptrace($cmd, 2147483647): No such process +__EOF__ + diff -- "$EXP" "$LOG" || + continue + args= + break +done + +[ -z "$args" ] || + dump_log_and_fail_with \ + "strace $args failed to print expected diagnostics" + +rm -f "$EXP" diff --git a/tests-mx32/overflowuid.c b/tests-mx32/overflowuid.c new file mode 100644 index 000000000..a3c742b46 --- /dev/null +++ b/tests-mx32/overflowuid.c @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +int +read_int_from_file(const char *const fname, int *const pvalue) +{ + const int fd = open(fname, O_RDONLY); + if (fd < 0) + return -1; + + long lval; + char buf[sizeof(lval) * 3]; + int n = read(fd, buf, sizeof(buf) - 1); + int saved_errno = errno; + close(fd); + + if (n < 0) { + errno = saved_errno; + return -1; + } + + buf[n] = '\0'; + char *endptr = 0; + errno = 0; + lval = strtol(buf, &endptr, 10); + if (!endptr || (*endptr && '\n' != *endptr) +#if INT_MAX < LONG_MAX + || lval > INT_MAX || lval < INT_MIN +#endif + || ERANGE == errno) { + if (!errno) + errno = EINVAL; + return -1; + } + + *pvalue = (int) lval; + return 0; +} + +static void +check_overflow_id(const int id, const char *overflowid) +{ + int n; + + if (read_int_from_file(overflowid, &n)) { + if (ENOENT == errno) + return; + perror_msg_and_fail("read_int_from_file: %s", overflowid); + } + + if (id == n) + error_msg_and_skip("%d matches %s", id, overflowid); +} + +void +check_overflowuid(const int uid) +{ + check_overflow_id(uid, "/proc/sys/kernel/overflowuid"); +} + +void +check_overflowgid(const int gid) +{ + check_overflow_id(gid, "/proc/sys/kernel/overflowgid"); +} diff --git a/tests-mx32/pause.c b/tests-mx32/pause.c new file mode 100644 index 000000000..868736207 --- /dev/null +++ b/tests-mx32/pause.c @@ -0,0 +1,79 @@ +/* + * Check decoding of pause syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Fei Jie + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_pause + +# include +# include +# include +# include +# include + +static void +handler(int sig) +{ +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct itimerval itv = { .it_value.tv_usec = 123456 }; + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_fail("setitimer"); + + syscall(__NR_pause); + if (errno == ENOSYS) + printf("pause() = -1 ENOSYS (%m)\n"); + else + printf("pause() = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pause") + +#endif diff --git a/tests-mx32/pause.test b/tests-mx32/pause.test new file mode 100755 index 000000000..c5fdacdeb --- /dev/null +++ b/tests-mx32/pause.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pause syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a8 -esignal=none diff --git a/tests-mx32/pc.c b/tests-mx32/pc.c new file mode 100644 index 000000000..f53acd451 --- /dev/null +++ b/tests-mx32/pc.c @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +int main(void) +{ + const unsigned long pagesize = get_page_size(); + +#ifdef __s390__ + /* + * The si_addr field is unreliable: + * https://marc.info/?l=linux-s390&m=142515870124248&w=2 + */ + error_msg_and_skip("s390: si_addr is unreliable"); +#endif + + /* write instruction pointer length to the log */ + assert(write(-1, NULL, 2 * sizeof(void *)) < 0); + + /* just a noticeable line in the log */ + assert(munmap(&main, 0) < 0); + + int pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + const unsigned long mask = ~(pagesize - 1); + unsigned long addr = (unsigned long) &main & mask; + unsigned long size = pagesize << 1; + +#ifdef HAVE_DLADDR + Dl_info info; + if (dladdr(&main, &info)) { + const unsigned long base = + (unsigned long) info.dli_fbase & mask; + if (base < addr) { + size += addr - base; + addr = base; + } + } else +#endif + { + addr -= size; + size <<= 1; + } + + /* SIGSEGV is expected */ + (void) munmap((void *) addr, size); + (void) munmap((void *) addr, size); + error_msg_and_skip("SIGSEGV did not happen"); + } + + int status; + assert(wait(&status) == pid); + assert(WIFSIGNALED(status)); + assert(WTERMSIG(status) == SIGSEGV); + + /* dump process map for debug purposes */ + close(0); + if (!open("/proc/self/maps", O_RDONLY)) + (void) sendfile(1, 0, NULL, pagesize); + + return 0; +} diff --git a/tests-mx32/pc.test b/tests-mx32/pc.test new file mode 100755 index 000000000..beadb7d78 --- /dev/null +++ b/tests-mx32/pc.test @@ -0,0 +1,61 @@ +#!/bin/sh +# +# Check -i option. +# +# Copyright (c) 2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +check_prog sed + +run_prog > /dev/null + +args="-if $args" +$STRACE $args 2> "$LOG" || + dump_log_and_fail_with "$STRACE $args failed" + +len="$(sed -r -n 's/^\[[[:xdigit:]]+\] write\(-1, NULL, ([[:digit:]]{1,2})\)[[:space:]]+= -1 .*/\1/p' "$LOG")" && +[ -n "$len" ] && +pid="$(sed -r -n 's/^\[[[:xdigit:]]{'"$len"'}\] --- SIGCHLD \{si_signo=SIGCHLD, si_code=CLD_(KILLED|DUMPED), si_pid=([[:digit:]]+), .*/\2/p' "$LOG")" && +[ -n "$pid" ] && +ip="$(sed -r -n 's/^\[pid +'"$pid"'\] \[([[:xdigit:]]{'"$len"'})] --- SIGSEGV \{.*\} ---$/\1/p' "$LOG")" && +[ -n "$ip" ] && +addr="$(echo "$ip" |sed -r 's/^0+//')" && +[ -n "$addr" ] || + dump_log_and_fail_with + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +\\[[[:xdigit:]]{$len}\\] munmap\\(0x[[:xdigit:]]+, 0\\) += -1 .* +\\[pid +$pid\\] \\[$ip\\] --- SIGSEGV \\{si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x$addr\\} --- +\\[pid +$pid\\] \\[\\?{$len}\\] \\+\\+\\+ killed by SIGSEGV( \\(core dumped\\))? \\+\\+\\+ +\\[\\?{$len}\\] \\+\\+\\+ exited with 0 \\+\\+\\+ +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" + +exit 0 diff --git a/tests-mx32/perf_event_open.c b/tests-mx32/perf_event_open.c new file mode 100644 index 000000000..0ffea292f --- /dev/null +++ b/tests-mx32/perf_event_open.c @@ -0,0 +1,821 @@ +/* + * Check verbose decoding of perf_event_open syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined(__NR_perf_event_open) && defined(HAVE_LINUX_PERF_EVENT_H) + +# include +# include +# include +# include +# include +# include +# include +# include + +# include + +# include "xlat.h" +# include "xlat/perf_event_open_flags.h" +# include "xlat/perf_attr_size.h" + +# if ULONG_MAX > UINT_MAX /* Poor man's "whether long is 8 bytes?" */ +# define LONG_STR_PREFIX "ffffffff" +# else /* !(ULONG_MAX > UINT_MAX) */ +# define LONG_STR_PREFIX "" +# endif /* ULONG_MAX > UINT_MAX */ + +# ifndef PERF_TYPE_BREAKPOINT +# define PERF_TYPE_BREAKPOINT 5 +# endif + +struct s32_val_str { + int32_t val; + const char *str; +}; + +struct u32_val_str { + uint32_t val; + const char *str; +}; + +struct u64_val_str { + uint64_t val; + const char *str; +}; + +/* In order to avoid endianess-specific hackery */ +struct pea_flags { + uint64_t disabled :1, + inherit :1, + pinned :1, + exclusive :1, + exclude_user :1, + exclude_kernel :1, + exclude_hv :1, + exclude_idle :1, + mmap :1, + comm :1, + freq :1, + inherit_stat :1, + enable_on_exec :1, + task :1, + watermark :1, + precise_ip :2, + mmap_data :1, + sample_id_all :1, + exclude_host :1, + exclude_guest :1, + exclude_callchain_kernel :1, + exclude_callchain_user :1, + mmap2 :1, + comm_exec :1, + use_clockid :1, + context_switch :1, + write_backward :1, + __reserved_1 :36; +}; + +static const char * +printaddr(void *ptr) +{ + static char buf[sizeof("0x") + sizeof(void *) * 2]; + + if (ptr == NULL) + return "NULL"; + + snprintf(buf, sizeof(buf), "%#lx", (unsigned long)ptr); + + return buf; +} + +/* + * Checklist: + * + * type - 8 IDs + * config - 13 IDs (0..11 + random), depends on type + * sample type - bitmask, up to 20 bits + * read_format - 5 IDs + * bp_type - 6, weird semantics (invalid/unknown) + * branch_sample_type - bitmask, 16 bits + * clockid - 13 values + * + * Unions: + * sample_period/sample_freq + * wakeup_event/wakeup_watermark + * bp_addr/config1 + * bp_len/config2 + */ + +/* + * The main idea behind all those numerous ifdefs is checking against version of + * structure provided in kernel headers and not use one defined in strace + * headers (assume the case when suddenly we add flag without proper update of + * __reserved_1 field or something like this). + */ +static void +print_event_attr(struct perf_event_attr *attr_ptr, size_t size, + const char *type, const char *config, const char *sample_type, + const char *read_format, const char *precise_ip_desc, + const char *bp_type, const char *branch_sample_type, + const char *clockid, uint32_t available_size) +{ + /* + * Currently, strace supports version 5 of the structure, which is + * 112 bytes in size. + */ + enum { + STRACE_PEA_ABBREV_SIZE = + offsetof(struct perf_event_attr, config) + + sizeof(attr_ptr->config), + STRACE_PEA_SIZE = 112, + }; + + uint32_t read_size; + struct perf_event_attr *attr; +# if VERBOSE + uint32_t cutoff; + uint64_t val; + uint64_t use_clockid; + union { + struct pea_flags flags; + uint64_t raw; + } flags_data; +# endif + + read_size = +# if !VERBOSE + STRACE_PEA_ABBREV_SIZE; +# else + size < STRACE_PEA_SIZE ? + (size ? size : PERF_ATTR_SIZE_VER0) : STRACE_PEA_SIZE; +# endif + + if (read_size > available_size) { + printf("%s", printaddr(attr_ptr)); + return; + } + + /* + * Replicate kernel's behaviour regarding copying structure from + * userspace. + */ + attr = calloc(1, STRACE_PEA_SIZE); + + if (!attr) + error_msg_and_fail("calloc"); + + + memcpy(attr, attr_ptr, read_size); + + if (size && (size < PERF_ATTR_SIZE_VER0)) { + printf("%s", printaddr(attr_ptr)); + free(attr); + return; + } + + printf("{type=%s, size=", type); + if (size != attr->size) { + printxval(perf_attr_size, size, "PERF_ATTR_SIZE_???"); + printf(" => "); + } + printxval(perf_attr_size, attr->size, "PERF_ATTR_SIZE_???"); + printf(", config=%s, ", config); + + if (!size) + size = PERF_ATTR_SIZE_VER0; + +# if !VERBOSE + printf("...}"); +# else /* !VERBOSE */ + printf("%s=%" PRI__u64", sample_type=%s, read_format=%s", + attr->freq ? "sample_freq" : "sample_period", + attr->freq ? attr->sample_freq : attr->sample_period, + sample_type, read_format); + + printf(", disabled=%u" + ", inherit=%u" + ", pinned=%u" + ", exclusive=%u" + ", exclusive_user=%u" + ", exclude_kernel=%u" + ", exclude_hv=%u" + ", exclude_idle=%u" + ", mmap=%u" + ", comm=%u" + ", freq=%u" + ", inherit_stat=%u" + ", enable_on_exec=%u" + ", task=%u" + ", watermark=%u", + attr->disabled, + attr->inherit, + attr->pinned, + attr->exclusive, + attr->exclude_user, + attr->exclude_kernel, + attr->exclude_hv, + attr->exclude_idle, + attr->mmap, + attr->comm, + attr->freq, + attr->inherit_stat, + attr->enable_on_exec, + attr->task, + attr->watermark); + + flags_data.raw = ((uint64_t *) attr)[5]; + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP + attr->precise_ip; +# else + flags_data.flags.precise_ip; +# endif + printf(", precise_ip=%" PRIu64 " /* %s */", val, precise_ip_desc); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_MMAP_DATA + attr->mmap_data; +# else + flags_data.flags.mmap_data; +# endif + printf(", mmap_data=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_ID_ALL + attr->sample_id_all; +# else + flags_data.flags.sample_id_all; +# endif + printf(", sample_id_all=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_HOST + attr->exclude_host; +# else + flags_data.flags.exclude_host; +# endif + printf(", exclude_host=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_GUEST + attr->exclude_guest; +# else + flags_data.flags.exclude_guest; +# endif + printf(", exclude_guest=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_KERNEL + attr->exclude_callchain_kernel; +# else + flags_data.flags.exclude_callchain_kernel; +# endif + printf(", exclude_callchain_kernel=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_USER + attr->exclude_callchain_user; +# else + flags_data.flags.exclude_callchain_user; +# endif + printf(", exclude_callchain_user=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_MMAP2 + attr->mmap2; +# else + flags_data.flags.mmap2; +# endif + printf(", mmap2=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_COMM_EXEC + attr->comm_exec; +# else + flags_data.flags.comm_exec; +# endif + printf(", comm_exec=%" PRIu64, val); + + use_clockid = val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_USE_CLOCKID + attr->use_clockid; +# else + flags_data.flags.use_clockid; +# endif + printf(", use_clockid=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONTEXT_SWITCH + attr->context_switch; +# else + flags_data.flags.context_switch; +# endif + printf(", context_switch=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_WRITE_BACKWARD + attr->write_backward; +# else + flags_data.flags.write_backward; +# endif + printf(", write_backward=%" PRIu64, val); + + val = flags_data.flags.__reserved_1; + if (val) + printf(", __reserved_1=%#" PRIx64 " /* Bits 63..28 */", val); + + printf(", %s=%u", + attr->watermark ? "wakeup_watermark" : "wakeup_events", + attr->watermark ? attr->wakeup_watermark : attr->wakeup_events); + + if (attr->type == PERF_TYPE_BREAKPOINT) + printf(", bp_type=%s", bp_type); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG1 + attr->config1; +# else + ((uint64_t *) attr)[56 / sizeof(uint64_t)]; +# endif + printf(", %s=%#" PRIx64, + attr->type == PERF_TYPE_BREAKPOINT ? "bp_addr" : "config1", + val); + + /* End of version 0 of the structure */ + if (size <= 64) { + cutoff = 64; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG2 + attr->config2; +# else + ((uint64_t *) attr)[64 / sizeof(uint64_t)]; +# endif + if (attr->type == PERF_TYPE_BREAKPOINT) + printf(", bp_len=%" PRIu64, val); + else + printf(", config2=%#" PRIx64, val); + + /* End of version 1 of the structure */ + if (size <= 72) { + cutoff = 72; + goto end; + } + + /* + * Print branch sample type only in case PERF_SAMPLE_BRANCH_STACK + * is set in the sample_type field. + */ + if (attr->sample_type & (1 << 11)) + printf(", branch_sample_type=%s", branch_sample_type); + + /* End of version 2 of the structure */ + if (size <= 80) { + cutoff = 80; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_USER + attr->sample_regs_user; +# else + ((uint64_t *) attr)[80 / sizeof(uint64_t)]; +# endif + printf(", sample_regs_user=%#" PRIx64, val); + + if (size <= 88) { + cutoff = 88; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_STACK_USER + attr->sample_stack_user; +# else + ((uint32_t *) attr)[88 / sizeof(uint32_t)]; +# endif + /* + * Print branch sample type only in case PERF_SAMPLE_STACK_USER + * is set in the sample_type field. + */ + if (attr->sample_type & (1 << 13)) + printf(", sample_stack_user=%#" PRIx32, (uint32_t) val); + + if (size <= 92) { + cutoff = 92; + goto end; + } + + if (use_clockid) + printf(", clockid=%s", clockid); + + /* End of version 3 of the structure */ + if (size <= 96) { + cutoff = 96; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_INTR + attr->sample_regs_intr; +# else + ((uint64_t *) attr)[96 / sizeof(uint64_t)]; +# endif + printf(", sample_regs_intr=%#" PRIx64, val); + + /* End of version 4 of the structure */ + if (size <= 104) { + cutoff =104; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_AUX_WATERMARK + attr->aux_watermark; +# else + ((uint32_t *) attr)[104 / sizeof(uint32_t)]; +# endif + printf(", aux_watermark=%" PRIu32, (uint32_t) val); + + if (size <= 108) { + cutoff =108; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_MAX_STACK + attr->sample_max_stack; +# else + ((uint16_t *) attr)[108 / sizeof(uint16_t)]; +# endif + printf(", sample_max_stack=%" PRIu16, (uint16_t) val); + + if (size <= 110) { + cutoff =110; + goto end; + } + + cutoff = STRACE_PEA_SIZE; + +end: + if (size > cutoff) + printf(", ..."); + + printf("}"); +# endif /* !VERBOSE */ + + free(attr); +} + +/* These require aligned access, so no byte-grain checks possible */ +# if defined SPARC || defined SPARC64 || defined POWERPC || defined POWERPC64 +# define ATTR_REC(sz) { tail_alloc((sz + 7) & ~7), sz } +# else +# define ATTR_REC(sz) { tail_alloc(sz), sz } +# endif + +# define BRANCH_TYPE_ALL \ + "PERF_SAMPLE_BRANCH_USER|" \ + "PERF_SAMPLE_BRANCH_KERNEL|" \ + "PERF_SAMPLE_BRANCH_HV|" \ + "PERF_SAMPLE_BRANCH_ANY|" \ + "PERF_SAMPLE_BRANCH_ANY_CALL|" \ + "PERF_SAMPLE_BRANCH_ANY_RETURN|" \ + "PERF_SAMPLE_BRANCH_IND_CALL|" \ + "PERF_SAMPLE_BRANCH_ABORT_TX|" \ + "PERF_SAMPLE_BRANCH_IN_TX|" \ + "PERF_SAMPLE_BRANCH_NO_TX|" \ + "PERF_SAMPLE_BRANCH_COND|" \ + "PERF_SAMPLE_BRANCH_CALL_STACK|" \ + "PERF_SAMPLE_BRANCH_IND_JUMP|" \ + "PERF_SAMPLE_BRANCH_CALL|" \ + "PERF_SAMPLE_BRANCH_NO_FLAGS|" \ + "PERF_SAMPLE_BRANCH_NO_CYCLES" + +int +main(void) +{ + static const size_t attr_small_size = PERF_ATTR_SIZE_VER0 - 8; + static const size_t attr_v0_size = PERF_ATTR_SIZE_VER0; + static const size_t attr_v1_size = PERF_ATTR_SIZE_VER1; + static const size_t attr_v2_size = PERF_ATTR_SIZE_VER2; + static const size_t attr_v2_5_size = PERF_ATTR_SIZE_VER2 + 8; + static const size_t attr_v2_75_size = PERF_ATTR_SIZE_VER2 + 12; + static const size_t attr_v3_size = PERF_ATTR_SIZE_VER3; + static const size_t attr_v4_size = PERF_ATTR_SIZE_VER4; + static const size_t attr_v4_5_size = PERF_ATTR_SIZE_VER4 + 4; + static const size_t attr_v4_625_size = PERF_ATTR_SIZE_VER4 + 5; + static const size_t attr_v4_875_size = PERF_ATTR_SIZE_VER4 + 7; + static const size_t attr_v5_size = PERF_ATTR_SIZE_VER5; + static const size_t attr_big_size = PERF_ATTR_SIZE_VER5 + 32; + + static const struct u64_val_str attr_types[] = { + { ARG_STR(PERF_TYPE_HARDWARE) }, + { ARG_STR(PERF_TYPE_SOFTWARE) }, + { ARG_STR(PERF_TYPE_TRACEPOINT) }, + { ARG_STR(PERF_TYPE_HW_CACHE) }, + { ARG_STR(PERF_TYPE_RAW) }, + { ARG_STR(PERF_TYPE_BREAKPOINT) }, + { ARG_STR(0x6) " /* PERF_TYPE_??? */" }, + { ARG_STR(0xdeadc0de) " /* PERF_TYPE_??? */" }, + }; + static const struct u64_val_str + attr_configs[ARRAY_SIZE(attr_types)][3] = { + /* PERF_TYPE_HARDWARE */ { + { 9, "PERF_COUNT_HW_REF_CPU_CYCLES" }, + { 10, "0xa /* PERF_COUNT_HW_??? */" }, + { ARG_ULL_STR(0xfaceca75deadb0d4) + " /* PERF_COUNT_HW_??? */" }, + }, + /* PERF_TYPE_SOFTWARE */ { + { 10, "PERF_COUNT_SW_BPF_OUTPUT" }, + { 11, "0xb /* PERF_COUNT_SW_??? */" }, + { ARG_ULL_STR(0xdec0ded1dec0ded2) + " /* PERF_COUNT_SW_??? */" }, + }, + /* PERF_TYPE_TRACEPOINT */ { + { ARG_STR(0) }, + { 4207856245U, "4207856245" }, + { ARG_ULL_STR(16051074073505095380) }, + }, + /* PERF_TYPE_HW_CACHE */ { + { 0, "PERF_COUNT_HW_CACHE_L1D|" + "PERF_COUNT_HW_CACHE_OP_READ<<8|" + "PERF_COUNT_HW_CACHE_RESULT_ACCESS<<16" }, + { 0x020207, "0x7 /* PERF_COUNT_HW_CACHE_??? */|" + "PERF_COUNT_HW_CACHE_OP_PREFETCH<<8|" + "0x2 /* PERF_COUNT_HW_CACHE_RESULT_??? */<<16" }, + { 0xdeadf157ed010306ULL, "PERF_COUNT_HW_CACHE_NODE|" + "0x3 /* PERF_COUNT_HW_CACHE_OP_??? */<<8|" + "PERF_COUNT_HW_CACHE_RESULT_MISS<<16|" + "0xdeadf157ed<<24 " + "/* PERF_COUNT_HW_CACHE_??? */" }, + }, + /* PERF_TYPE_RAW */ { + { ARG_STR(0) }, + { ARG_STR(0xda7a1057) }, + { ARG_ULL_STR(0xdec0ded7dec0ded8) }, + }, + /* PERF_TYPE_BREAKPOINT */ { + { ARG_STR(0) }, + { ARG_STR(0xbadc0ded) }, + { ARG_ULL_STR(0xdec0ded9dec0deda) }, + }, + /* invalid 1 */ { + { ARG_STR(0) }, + { ARG_STR(0xbeeff00d) }, + { ARG_ULL_STR(0xdec0dedbdec0dedc) }, + }, + /* invalid 2 */ { + { ARG_STR(0) }, + { ARG_STR(0xca75dead) }, + { ARG_ULL_STR(0xdec0dedddec0dede) }, + }, + }; + static const struct u64_val_str sample_types[] = { + { ARG_STR(0) }, + { 0x800, "PERF_SAMPLE_BRANCH_STACK" }, + { ARG_ULL_STR(0xdeadc0deda780000) " /* PERF_SAMPLE_??? */" }, + { 0xffffffffffffffffULL, + "PERF_SAMPLE_IP|PERF_SAMPLE_TID|PERF_SAMPLE_TIME|" + "PERF_SAMPLE_ADDR|PERF_SAMPLE_READ|" + "PERF_SAMPLE_CALLCHAIN|PERF_SAMPLE_ID|PERF_SAMPLE_CPU|" + "PERF_SAMPLE_PERIOD|PERF_SAMPLE_STREAM_ID|" + "PERF_SAMPLE_RAW|PERF_SAMPLE_BRANCH_STACK|" + "PERF_SAMPLE_REGS_USER|PERF_SAMPLE_STACK_USER|" + "PERF_SAMPLE_WEIGHT|PERF_SAMPLE_DATA_SRC|" + "PERF_SAMPLE_IDENTIFIER|PERF_SAMPLE_TRANSACTION|" + "PERF_SAMPLE_REGS_INTR|0xfffffffffff80000" }, + }; + static const struct u64_val_str read_formats[] = { + { ARG_STR(0) }, + { ARG_STR(PERF_FORMAT_TOTAL_TIME_ENABLED) }, + { 0xf, "PERF_FORMAT_TOTAL_TIME_ENABLED|" + "PERF_FORMAT_TOTAL_TIME_RUNNING|" + "PERF_FORMAT_ID|PERF_FORMAT_GROUP" }, + { ARG_ULL_STR(0xdeadf157dec0ded0) " /* PERF_FORMAT_??? */" }, + { 0xffffffffffffffffULL, + "PERF_FORMAT_TOTAL_TIME_ENABLED|" + "PERF_FORMAT_TOTAL_TIME_RUNNING|" + "PERF_FORMAT_ID|PERF_FORMAT_GROUP|" + "0xfffffffffffffff0" }, + }; + static const char *precise_ip_descs[] = { + "arbitrary skid", + "constant skid", + "requested to have 0 skid", + "must have 0 skid", + }; + static const struct u32_val_str bp_types[] = { + { 0, "HW_BREAKPOINT_EMPTY" }, + { 1, "HW_BREAKPOINT_R" }, + { 3, "HW_BREAKPOINT_RW" }, + { 5, "0x5 /* HW_BREAKPOINT_INVALID */" }, + { 8, "0x8 /* HW_BREAKPOINT_??? */" }, + { ARG_STR(0xface1e55) " /* HW_BREAKPOINT_??? */" }, + }; + static const struct u64_val_str branch_sample_types[] = { + { ARG_STR(0) }, + { 0x80, "PERF_SAMPLE_BRANCH_ABORT_TX" }, + { 0xffff, BRANCH_TYPE_ALL }, + { ARG_ULL_STR(0xdeadcaffeeed0000) + " /* PERF_SAMPLE_BRANCH_??? */" }, + { 0xffffffffffffffffULL, + BRANCH_TYPE_ALL "|0xffffffffffff0000" } + }; + static const struct s32_val_str clockids[] = { + { 11, "CLOCK_TAI" }, + { ARG_STR(0xc) " /* CLOCK_??? */" }, + { ARG_STR(0xbeeffeed) " /* CLOCK_??? */" }, + }; + + + struct { + struct perf_event_attr *ptr; + size_t size; + } attrs[] = { + ATTR_REC(sizeof(struct perf_event_attr)), + ATTR_REC(attr_v0_size), + ATTR_REC(attr_v1_size), + ATTR_REC(attr_v2_size), + ATTR_REC(attr_v2_5_size), + ATTR_REC(attr_v2_75_size), + ATTR_REC(attr_v3_size), + ATTR_REC(attr_v4_size), + ATTR_REC(attr_v4_5_size), + ATTR_REC(attr_v4_625_size), + ATTR_REC(attr_v4_875_size), + ATTR_REC(attr_v5_size), + ATTR_REC(attr_big_size), + }; + + struct perf_event_attr *small_attr = tail_alloc(sizeof(*small_attr)); + + struct { + struct perf_event_attr *attr; + pid_t pid; + int cpu; + int group_fd; + unsigned long flags; + const char *flags_str; + } args[] = { + { NULL, 0xfacef00d, 0xbadabba7, -1, + (unsigned long) 0xFFFFFFFFFFFFFFFFLLU, + "PERF_FLAG_FD_NO_GROUP|PERF_FLAG_FD_OUTPUT|" + "PERF_FLAG_PID_CGROUP|PERF_FLAG_FD_CLOEXEC|" + "0x" LONG_STR_PREFIX "fffffff0" + }, + { small_attr + 1, 0, 0, 0, + 0, "0" }, + { small_attr, -1, -1, 1, + PERF_FLAG_FD_NO_GROUP | PERF_FLAG_FD_OUTPUT | + PERF_FLAG_PID_CGROUP | PERF_FLAG_FD_CLOEXEC, + "PERF_FLAG_FD_NO_GROUP|PERF_FLAG_FD_OUTPUT|" + "PERF_FLAG_PID_CGROUP|PERF_FLAG_FD_CLOEXEC" }, + { (struct perf_event_attr *) (uintptr_t) 0xfffffacefffffeedULL, + -100, 100, 0xface1e55, + PERF_FLAG_FD_CLOEXEC, "PERF_FLAG_FD_CLOEXEC" }, + }; + + size_t i; + int rc; + + fill_memory(small_attr, sizeof(*small_attr)); + small_attr->size = attr_small_size; + + for (i = 0; i < ARRAY_SIZE(args); i++) { + rc = syscall(__NR_perf_event_open, args[i].attr, args[i].pid, + args[i].cpu, args[i].group_fd, args[i].flags); + printf("perf_event_open(%s, %d, %d, %d, %s) = %s\n", + printaddr(args[i].attr), args[i].pid, args[i].cpu, + args[i].group_fd, args[i].flags_str, sprintrc(rc)); + } + + for (i = 0; i < ARRAY_SIZE(attrs) * ARRAY_SIZE(attr_types) * + ARRAY_SIZE(attr_configs[0]) + 1; i++) { + struct perf_event_attr *attr = attrs[i % ARRAY_SIZE(attrs)].ptr; + uint32_t size = attrs[i % ARRAY_SIZE(attrs)].size; + unsigned char fill_start = 0x80 + i; + size_t type_idx = i % ARRAY_SIZE(attr_types); + size_t config_idx = i % ARRAY_SIZE(attr_configs[0]); + size_t sample_type_idx = i % ARRAY_SIZE(sample_types); + size_t read_format_idx = i % ARRAY_SIZE(read_formats); + size_t bp_type_idx = (i / ARRAY_SIZE(attr_configs[0])) % + ARRAY_SIZE(bp_types); + size_t branch_sample_type_idx = (i / ARRAY_SIZE(sample_types)) % + ARRAY_SIZE(branch_sample_types); + size_t clockid_idx = i % ARRAY_SIZE(clockids); + size_t args_idx = i % ARRAY_SIZE(args); + const char *ip_desc_str; + + fill_memory_ex(attr, size, fill_start, 0xff); + + attr->type = attr_types[type_idx].val; + attr->size = size; + attr->config = attr_configs[type_idx][config_idx].val; + attr->sample_type = sample_types[sample_type_idx].val; + attr->read_format = read_formats[read_format_idx].val; + + if ((i % 11) == 5) + attr->__reserved_1 = 0; + +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_BP_TYPE + attr->bp_type = +# else + ((uint32_t *) attr)[52 / sizeof(uint32_t)] = +# endif + bp_types[bp_type_idx].val; + + if (size >= 80) +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_BRANCH_SAMPLE_TYPE + attr->branch_sample_type = +# else + ((uint64_t *) attr)[72 / sizeof(uint64_t)] = +# endif + branch_sample_types[branch_sample_type_idx].val; + + if (size >= 96) +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CLOCKID + attr->clockid = +# else + ((uint32_t *) attr)[92 / sizeof(uint32_t)] = +# endif + clockids[clockid_idx].val; + +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP + ip_desc_str = precise_ip_descs[attr->precise_ip]; +# else + union { + struct pea_flags flags; + uint64_t raw; + } flags_data = { .raw = ((uint64_t *) attr)[5] }; + + ip_desc_str = precise_ip_descs[flags_data.flags.precise_ip]; +# endif + + if (i == 0) + attr->size = size + 8; + + if (i == 1) + attr->size = 0; + + rc = syscall(__NR_perf_event_open, attr, args[args_idx].pid, + args[args_idx].cpu, args[args_idx].group_fd, + args[args_idx].flags); + + printf("perf_event_open("); + print_event_attr(attr, i ? ((i == 1) ? 0 : size) : size + 8, + attr_types[type_idx].str, + attr_configs[type_idx][config_idx].str, + sample_types[sample_type_idx].str, + read_formats[read_format_idx].str, + ip_desc_str, + bp_types[bp_type_idx].str, + branch_sample_types[branch_sample_type_idx].str, + clockids[clockid_idx].str, size); + printf(", %d, %d, %d, %s) = %s\n", args[args_idx].pid, + args[args_idx].cpu, args[args_idx].group_fd, + args[args_idx].flags_str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_perf_event_open && HAVE_LINUX_PERF_EVENT_H"); + +#endif diff --git a/tests-mx32/perf_event_open.test b/tests-mx32/perf_event_open.test new file mode 100755 index 000000000..499134b40 --- /dev/null +++ b/tests-mx32/perf_event_open.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check perf_event_open syscall decoding. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a1 diff --git a/tests-mx32/perf_event_open_nonverbose.c b/tests-mx32/perf_event_open_nonverbose.c new file mode 100644 index 000000000..45d7c8f23 --- /dev/null +++ b/tests-mx32/perf_event_open_nonverbose.c @@ -0,0 +1,113 @@ +/* + * Check decoding of perf_event_open syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined(__NR_perf_event_open) && defined(HAVE_LINUX_PERF_EVENT_H) + +# include +# include +# include + +# include + +# include "xlat.h" +# include "xlat/perf_event_open_flags.h" + +#if ULONG_MAX > UINT_MAX +#define LONG_STR_PREFIX "ffffffff" +#else +#define LONG_STR_PREFIX "" +#endif + +static const char *printaddr(void *ptr) +{ + static char buf[sizeof("0x") + sizeof(void *) * 2]; + + if (ptr == NULL) + return "NULL"; + + snprintf(buf, sizeof(buf), "%#lx", (unsigned long)ptr); + + return buf; +} + +int +main(void) +{ + struct perf_event_attr *attr = tail_alloc(sizeof(*attr)); + + attr->type = PERF_TYPE_HARDWARE; + attr->size = sizeof(*attr); + + struct { + struct perf_event_attr *attr; + pid_t pid; + int cpu; + int group_fd; + unsigned long flags; + const char *flags_str; + } args[] = { + { NULL, 0xfacef00d, 0xbadabba7, -1, + (unsigned long) 0xFFFFFFFFFFFFFFFFLLU, + "PERF_FLAG_FD_NO_GROUP|PERF_FLAG_FD_OUTPUT|" + "PERF_FLAG_PID_CGROUP|PERF_FLAG_FD_CLOEXEC|" + "0x" LONG_STR_PREFIX "fffffff0" + }, + { attr + 1, 0, 0, 0, + 0, "0" }, + { attr, -1, -1, 1, + PERF_FLAG_FD_CLOEXEC, "PERF_FLAG_FD_CLOEXEC" }, + { attr - 1, -100, 100, 0xface1e55, + PERF_FLAG_FD_NO_GROUP | PERF_FLAG_FD_OUTPUT | + PERF_FLAG_PID_CGROUP | PERF_FLAG_FD_CLOEXEC, + "PERF_FLAG_FD_NO_GROUP|PERF_FLAG_FD_OUTPUT|" + "PERF_FLAG_PID_CGROUP|PERF_FLAG_FD_CLOEXEC" }, + }; + size_t i; + int rc; + + for (i = 0; i < ARRAY_SIZE(args); i++) { + rc = syscall(__NR_perf_event_open, args[i].attr, args[i].pid, + args[i].cpu, args[i].group_fd, args[i].flags); + printf("perf_event_open(%s, %d, %d, %d, %s) = %s\n", + printaddr(args[i].attr), args[i].pid, args[i].cpu, + args[i].group_fd, args[i].flags_str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_perf_event_open && HAVE_LINUX_PERF_EVENT_H"); + +#endif diff --git a/tests-mx32/perf_event_open_nonverbose.test b/tests-mx32/perf_event_open_nonverbose.test new file mode 100755 index 000000000..404827fed --- /dev/null +++ b/tests-mx32/perf_event_open_nonverbose.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of perf_event_open syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a34 -e verbose=none -e trace=perf_event_open diff --git a/tests-mx32/perf_event_open_unabbrev.c b/tests-mx32/perf_event_open_unabbrev.c new file mode 100644 index 000000000..c2f260dea --- /dev/null +++ b/tests-mx32/perf_event_open_unabbrev.c @@ -0,0 +1,2 @@ +#define VERBOSE 1 +#include "perf_event_open.c" diff --git a/tests-mx32/perf_event_open_unabbrev.test b/tests-mx32/perf_event_open_unabbrev.test new file mode 100755 index 000000000..f17fd17e8 --- /dev/null +++ b/tests-mx32/perf_event_open_unabbrev.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check perf_event_open syscall decoding. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a1 -v -e trace=perf_event_open diff --git a/tests-mx32/personality.c b/tests-mx32/personality.c new file mode 100644 index 000000000..7a279a144 --- /dev/null +++ b/tests-mx32/personality.c @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +int main(void) +{ + const unsigned int good_type = PER_BSD; + const char *good_type_str = "PER_BSD"; + + const unsigned int bad_type = 0x1f; + const char *bad_type_str = "0x1f /\\* PER_\\?\\?\\? \\*/"; + + const unsigned int good_flags = + SHORT_INODE | WHOLE_SECONDS | STICKY_TIMEOUTS; + const char *good_flags_str = + "SHORT_INODE\\|WHOLE_SECONDS\\|STICKY_TIMEOUTS"; + + const unsigned int bad_flags = 0x10000; + const char *bad_flags_str = "0x10000"; + + const unsigned int saved_pers = personality(0xffffffff); + printf("personality\\(0xffffffff\\) = %#x \\([^)]*\\)\n", saved_pers); + + /* PER_LINUX */ + personality(PER_LINUX); + printf("personality\\(PER_LINUX\\) = %#x \\([^)]*\\)\n", saved_pers); + + personality(0xffffffff); + puts("personality\\(0xffffffff\\) = 0 \\(PER_LINUX\\)"); + + personality(good_flags); + printf("personality\\(PER_LINUX\\|%s\\) = 0 \\(PER_LINUX\\)\n", + good_flags_str); + + personality(bad_flags); + printf("personality\\(PER_LINUX\\|%s\\)" + " = %#x \\(PER_LINUX\\|%s\\)\n", + bad_flags_str, good_flags, good_flags_str); + + personality(good_flags | bad_flags); + printf("personality\\(PER_LINUX\\|%s\\|%s\\)" + " = %#x \\(PER_LINUX\\|%s\\)\n", + good_flags_str, bad_flags_str, bad_flags, bad_flags_str); + + /* another valid type */ + personality(good_type); + printf("personality\\(%s\\) = %#x \\(PER_LINUX\\|%s\\|%s\\)\n", + good_type_str, good_flags | bad_flags, + good_flags_str, bad_flags_str); + + personality(good_type | good_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\)\n", + good_type_str, good_flags_str, good_type, good_type_str); + + personality(good_type | bad_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + good_type_str, bad_flags_str, good_type | good_flags, + good_type_str, good_flags_str); + + personality(good_type | good_flags | bad_flags); + printf("personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + good_type_str, good_flags_str, bad_flags_str, + good_type | bad_flags, + good_type_str, bad_flags_str); + + /* invalid type */ + personality(bad_type); + printf("personality\\(%s\\) = %#x \\(%s\\|%s\\|%s\\)\n", + bad_type_str, good_type | good_flags | bad_flags, + good_type_str, good_flags_str, bad_flags_str); + + personality(bad_type | good_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\)\n", + bad_type_str, good_flags_str, bad_type, bad_type_str); + + personality(bad_type | bad_flags); + printf("personality\\(%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + bad_type_str, bad_flags_str, bad_type | good_flags, + bad_type_str, good_flags_str); + + personality(bad_type | good_flags | bad_flags); + printf("personality\\(%s\\|%s\\|%s\\) = %#x \\(%s\\|%s\\)\n", + bad_type_str, good_flags_str, bad_flags_str, + bad_type | bad_flags, bad_type_str, bad_flags_str); + + personality(saved_pers); + printf("personality\\([^)]*\\) = %#x \\(%s\\|%s\\|%s\\)\n", + bad_type | good_flags | bad_flags, + bad_type_str, good_flags_str, bad_flags_str); + + return 0; +} diff --git a/tests-mx32/personality.test b/tests-mx32/personality.test new file mode 100755 index 000000000..8f8c0adbe --- /dev/null +++ b/tests-mx32/personality.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check personality syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a20 -epersonality $args > "$OUT" +match_grep "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests-mx32/pipe.c b/tests-mx32/pipe.c new file mode 100644 index 000000000..41c7f2154 --- /dev/null +++ b/tests-mx32/pipe.c @@ -0,0 +1,55 @@ +/* + * Check decoding of pipe syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_pipe + +# include +# include +# include + +int +main(void) +{ + (void) close(0); + (void) close(1); + int *const fds = tail_alloc(sizeof(*fds) * 2); + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pipe") + +#endif diff --git a/tests-mx32/pipe.expected b/tests-mx32/pipe.expected new file mode 100644 index 000000000..2e46336c3 --- /dev/null +++ b/tests-mx32/pipe.expected @@ -0,0 +1,2 @@ +pipe([0, 1]) = 0 ++++ exited with 0 +++ diff --git a/tests-mx32/pipe.test b/tests-mx32/pipe.test new file mode 100755 index 000000000..0ae414d49 --- /dev/null +++ b/tests-mx32/pipe.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check decoding of pipe syscall. +. "${srcdir=.}/init.sh" + +run_prog +run_strace -a13 -epipe $args + +check_prog grep +LC_ALL=C grep -x "pipe(.*" "$LOG" > /dev/null || + skip_ 'test executable does not use pipe syscall' + +match_diff diff --git a/tests-mx32/pipe2.c b/tests-mx32/pipe2.c new file mode 100644 index 000000000..375ae74f1 --- /dev/null +++ b/tests-mx32/pipe2.c @@ -0,0 +1,71 @@ +/* + * Check decoding of pipe2 syscall. + * + * Copyright (c) 2015-2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_pipe2 + +# include +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_zero = + (kernel_ulong_t) 0xffffffff00000000ULL; + int *const fds = tail_alloc(sizeof(*fds) * 2); + int *const efault = fds + 1; + long rc; + + rc = syscall(__NR_pipe2, fds, bogus_zero | O_NONBLOCK); + if (rc) + perror_msg_and_skip("pipe2"); + printf("pipe2([%d, %d], O_NONBLOCK) = 0\n", fds[0], fds[1]); + + rc = syscall(__NR_pipe2, efault, bogus_zero); + printf("pipe2(%p, 0) = %s\n", efault, sprintrc(rc)); + + if (F8ILL_KULONG_SUPPORTED) { + const kernel_ulong_t ill = f8ill_ptr_to_kulong(fds); + rc = syscall(__NR_pipe2, ill, 0); + printf("pipe2(%#llx, 0) = %s\n", + (unsigned long long) ill, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pipe2") + +#endif diff --git a/tests-mx32/pipe2.test b/tests-mx32/pipe2.test new file mode 100755 index 000000000..aff6cd443 --- /dev/null +++ b/tests-mx32/pipe2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pipe2 syscall. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a15 diff --git a/tests-mx32/pipe_maxfd.c b/tests-mx32/pipe_maxfd.c new file mode 100644 index 000000000..a1343f917 --- /dev/null +++ b/tests-mx32/pipe_maxfd.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +static void +move_fd(int *from, int *to) +{ + for (; *to > *from; --*to) { + if (dup2(*from, *to) != *to) + continue; + close(*from); + *from = *to; + break; + } +} + +void +pipe_maxfd(int pipefd[2]) +{ + struct rlimit rlim; + if (getrlimit(RLIMIT_NOFILE, &rlim)) + perror_msg_and_fail("getrlimit"); + if (rlim.rlim_cur < rlim.rlim_max) { + struct rlimit rlim_new; + rlim_new.rlim_cur = rlim_new.rlim_max = rlim.rlim_max; + if (!setrlimit(RLIMIT_NOFILE, &rlim_new)) + rlim.rlim_cur = rlim.rlim_max; + } + + if (pipe(pipefd)) + perror_msg_and_fail("pipe"); + + int max_fd = (rlim.rlim_cur > 0 && rlim.rlim_cur < INT_MAX) + ? rlim.rlim_cur - 1 : INT_MAX; + + move_fd(&pipefd[1], &max_fd); + --max_fd; + move_fd(&pipefd[0], &max_fd); +} diff --git a/tests-mx32/pkey_alloc.c b/tests-mx32/pkey_alloc.c new file mode 100644 index 000000000..457727873 --- /dev/null +++ b/tests-mx32/pkey_alloc.c @@ -0,0 +1,84 @@ +/* + * Check decoding of pkey_alloc syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_pkey_alloc + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t flags[] = { + 0, + (kernel_ulong_t) 0xbadc0ded00000000ULL, + (kernel_ulong_t) 0xffff0000eeee1111ULL, + (kernel_ulong_t) 0x123456789abcdef0ULL, + }; + static const struct { + kernel_ulong_t val; + const char *str; + } rights[] = { + { (kernel_ulong_t) 0xbadc0ded00000002ULL, + sizeof(kernel_ulong_t) > sizeof(int) ? + "PKEY_DISABLE_WRITE|0xbadc0ded00000000" : + "PKEY_DISABLE_WRITE" }, + { 0xdec0ded, "PKEY_DISABLE_ACCESS|0xdec0dec" }, + { 0x3, "PKEY_DISABLE_ACCESS|PKEY_DISABLE_WRITE" }, + { ARG_STR(0) }, + { 0xbadc0dec, "0xbadc0dec /* PKEY_??? */" }, + }; + + long rc; + unsigned int i; + unsigned int j; + + for (i = 0; i < ARRAY_SIZE(flags); i++) { + for (j = 0; j < ARRAY_SIZE(rights); j++) { + rc = syscall(__NR_pkey_alloc, flags[i], rights[j].val); + printf("pkey_alloc(%#llx, %s) = %s\n", + (unsigned long long) flags[i], rights[j].str, + sprintrc(rc)); + } + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pkey_alloc"); + +#endif diff --git a/tests-mx32/pkey_alloc.test b/tests-mx32/pkey_alloc.test new file mode 100755 index 000000000..f168c21a1 --- /dev/null +++ b/tests-mx32/pkey_alloc.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pkey_alloc syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff --git a/tests-mx32/pkey_free.c b/tests-mx32/pkey_free.c new file mode 100644 index 000000000..95a2ad263 --- /dev/null +++ b/tests-mx32/pkey_free.c @@ -0,0 +1,67 @@ +/* + * Check decoding of pkey_free syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_pkey_free + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t keys[] = { + 0, + 3141592653U, + (kernel_ulong_t) 0xbadc0ded00000000ULL, + (kernel_ulong_t) 0xffff00001111eeeeULL, + (kernel_ulong_t) 0x123456789abcdef0ULL, + }; + + long rc; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(keys); i++) { + rc = syscall(__NR_pkey_free, keys[i]); + printf("pkey_free(%d) = %s\n", (int) keys[i], sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pkey_free"); + +#endif diff --git a/tests-mx32/pkey_free.test b/tests-mx32/pkey_free.test new file mode 100755 index 000000000..9c01c3e75 --- /dev/null +++ b/tests-mx32/pkey_free.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pkey_free syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff --git a/tests-mx32/pkey_mprotect.c b/tests-mx32/pkey_mprotect.c new file mode 100644 index 000000000..529abd1f1 --- /dev/null +++ b/tests-mx32/pkey_mprotect.c @@ -0,0 +1,120 @@ +/* + * Check decoding of pkey_mprotect syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_pkey_mprotect + +# include +# include +# include + +const char * +sprintptr(kernel_ulong_t ptr) +{ + static char buf[sizeof(ptr) * 2 + sizeof("0x")]; + + if (ptr) + snprintf(buf, sizeof(buf), "%#llx", (unsigned long long) ptr); + else + return "NULL"; + + return buf; +} + +int +main(void) +{ + static const kernel_ulong_t ptrs[] = { + 0, + (kernel_ulong_t) 0xfacebeef00000000ULL, + (kernel_ulong_t) 0xbadc0dedda7a1057ULL, + }; + static const kernel_ulong_t sizes[] = { + 0, + (kernel_ulong_t) 0xfacebeef00000000ULL, + (kernel_ulong_t) 0xfedcba9876543210ULL, + (kernel_ulong_t) 0x123456789abcdef0ULL, + (kernel_ulong_t) 0xbadc0dedda7a1057ULL, + }; + static const struct { + kernel_ulong_t val; + const char *str; + } prots[] = { + { ARG_STR(PROT_READ) }, + /* For now, only 0x0300001f are used */ + { (kernel_ulong_t) 0xdeadfeed00ca7500ULL, + sizeof(kernel_ulong_t) > sizeof(int) ? + "0xdeadfeed00ca7500 /* PROT_??? */" : + "0xca7500 /* PROT_??? */" }, + { ARG_STR(PROT_READ|PROT_WRITE|0xface00) }, + }; + static const kernel_ulong_t pkeys[] = { + 0, + -1LL, + (kernel_ulong_t) 0xface1e55, + (kernel_ulong_t) 0xbadc0ded00000001, + }; + + long rc; + unsigned int i; + unsigned int j; + unsigned int k; + unsigned int l; + + for (i = 0; i < ARRAY_SIZE(ptrs); i++) { + for (j = 0; j < ARRAY_SIZE(sizes); j++) { + for (k = 0; k < ARRAY_SIZE(prots); k++) { + for (l = 0; l < ARRAY_SIZE(pkeys); l++) { + rc = syscall(__NR_pkey_mprotect, + ptrs[i], sizes[j], + prots[k].val, pkeys[l]); + printf("pkey_mprotect(%s, %llu, %s, %d)" + " = %s\n", + sprintptr(ptrs[i]), + (unsigned long long) sizes[j], + prots[k].str, (int) pkeys[l], + sprintrc(rc)); + } + } + } + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pkey_mprotect"); + +#endif diff --git a/tests-mx32/pkey_mprotect.test b/tests-mx32/pkey_mprotect.test new file mode 100755 index 000000000..922d4919f --- /dev/null +++ b/tests-mx32/pkey_mprotect.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pkey_mprotect syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a37 diff --git a/tests-mx32/poll.c b/tests-mx32/poll.c new file mode 100644 index 000000000..c47c97e51 --- /dev/null +++ b/tests-mx32/poll.c @@ -0,0 +1,259 @@ +/* + * This file is part of poll strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_poll + +# include +# include +# include +# include +# include +# include + +#define PRINT_EVENT(flag, member) \ + if (member & flag) { \ + if (member != pfd->member) \ + tprintf("|"); \ + tprintf(#flag); \ + member &= ~flag; \ + } + +static void +print_pollfd_entering(const struct pollfd *const pfd) +{ + tprintf("{fd=%d", pfd->fd); + if (pfd->fd >= 0) { + tprintf(", events="); + short events = pfd->events; + + if (pfd->events) { + PRINT_EVENT(POLLIN, events) + PRINT_EVENT(POLLPRI, events) + PRINT_EVENT(POLLOUT, events) +#ifdef POLLRDNORM + PRINT_EVENT(POLLRDNORM, events) +#endif +#ifdef POLLWRNORM + PRINT_EVENT(POLLWRNORM, events) +#endif +#ifdef POLLRDBAND + PRINT_EVENT(POLLRDBAND, events) +#endif +#ifdef POLLWRBAND + PRINT_EVENT(POLLWRBAND, events) +#endif + PRINT_EVENT(POLLERR, events) + PRINT_EVENT(POLLHUP, events) + PRINT_EVENT(POLLNVAL, events) + } else + tprintf("0"); + } + tprintf("}"); +} + +static void +print_pollfd_array_entering(const struct pollfd *const pfd, + const unsigned int size, + const unsigned int valid, + const unsigned int abbrev) +{ + tprintf("["); + unsigned int i; + for (i = 0; i < size; ++i) { + if (i) + tprintf(", "); + if (i >= valid) { + tprintf("%p", &pfd[i]); + break; + } + if (i >= abbrev) { + tprintf("..."); + break; + } + print_pollfd_entering(&pfd[i]); + } + tprintf("]"); +} + +static void +print_pollfd_exiting(const struct pollfd *const pfd, + unsigned int *const seen, + const unsigned int abbrev) +{ + if (!pfd->revents || pfd->fd < 0 || *seen > abbrev) + return; + + if (*seen) + tprintf(", "); + ++(*seen); + + if (*seen > abbrev) { + tprintf("..."); + return; + } + tprintf("{fd=%d, revents=", pfd->fd); + short revents = pfd->revents; + + PRINT_EVENT(POLLIN, revents) + PRINT_EVENT(POLLPRI, revents) + PRINT_EVENT(POLLOUT, revents) +#ifdef POLLRDNORM + PRINT_EVENT(POLLRDNORM, revents) +#endif +#ifdef POLLWRNORM + PRINT_EVENT(POLLWRNORM, revents) +#endif +#ifdef POLLRDBAND + PRINT_EVENT(POLLRDBAND, revents) +#endif +#ifdef POLLWRBAND + PRINT_EVENT(POLLWRBAND, revents) +#endif + PRINT_EVENT(POLLERR, revents) + PRINT_EVENT(POLLHUP, revents) + PRINT_EVENT(POLLNVAL, revents) + tprintf("}"); +} + +static void +print_pollfd_array_exiting(const struct pollfd *const pfd, + const unsigned int size, + const unsigned int abbrev) +{ + tprintf("["); + unsigned int seen = 0; + unsigned int i; + for (i = 0; i < size; ++i) + print_pollfd_exiting(&pfd[i], &seen, abbrev); + tprintf("]"); +} + +int +main(int ac, char **av) +{ + tprintf("%s", ""); + + assert(syscall(__NR_poll, NULL, 42, 0) == -1); + if (ENOSYS == errno) + perror_msg_and_skip("poll"); + tprintf("poll(NULL, 42, 0) = -1 EFAULT (%m)\n"); + + int fds[2]; + if (pipe(fds) || pipe(fds)) + perror_msg_and_fail("pipe"); + + const unsigned int abbrev = (ac > 1) ? atoi(av[1]) : -1; + const struct pollfd pfds0[] = { + { .fd = 0, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 1, .events = POLLOUT | POLLWRNORM | POLLWRBAND }, + { .fd = fds[0], .events = POLLIN | POLLPRI }, + { .fd = fds[1], .events = POLLOUT }, + { .fd = 2, .events = POLLOUT | POLLWRBAND } + }; + struct pollfd *const tail_fds0 = tail_memdup(pfds0, sizeof(pfds0)); + const int timeout = 42; + int rc = syscall(__NR_poll, tail_fds0, 0, timeout); + assert(rc == 0); + + tprintf("poll([], 0, %d) = %d (Timeout)\n", timeout, rc); + + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 3); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + tail_fds0[0].fd = -1; + tail_fds0[2].fd = -3; + tail_fds0[4].events = 0; + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 2); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + tail_fds0[1].fd = -2; + tail_fds0[4].fd = -5; + rc = syscall(__NR_poll, tail_fds0, ARRAY_SIZE(pfds0), timeout); + assert(rc == 1); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds0, ARRAY_SIZE(pfds0), + ARRAY_SIZE(pfds0), abbrev); + tprintf(", %u, %d) = %d (", ARRAY_SIZE(pfds0), timeout, rc); + print_pollfd_array_exiting(tail_fds0, ARRAY_SIZE(pfds0), abbrev); + tprintf(")\n"); + + struct pollfd pfds1[] = { + { .fd = 1, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 0, .events = POLLOUT | POLLWRNORM | POLLWRBAND } + }; + struct pollfd *const tail_fds1 = tail_memdup(pfds1, sizeof(pfds1)); + rc = syscall(__NR_poll, tail_fds1, ARRAY_SIZE(pfds1), timeout); + assert(rc == 0); + + tprintf("poll("); + print_pollfd_array_entering(tail_fds1, ARRAY_SIZE(pfds1), + ARRAY_SIZE(pfds1), abbrev); + tprintf(", %u, %d) = %d (Timeout)\n", ARRAY_SIZE(pfds1), timeout, rc); + + const void *const efault = tail_fds0 + ARRAY_SIZE(pfds0); + rc = syscall(__NR_poll, efault, 1, 0); + assert(rc == -1); + tprintf("poll(%p, 1, 0) = -1 EFAULT (%m)\n", efault); + + const unsigned int valid = 1; + const void *const epfds = tail_fds0 + ARRAY_SIZE(pfds0) - valid; + rc = syscall(__NR_poll, epfds, valid + 1, 0); + assert(rc == -1); + tprintf("poll("); + print_pollfd_array_entering(epfds, valid + 1, valid, abbrev); + errno = EFAULT; + tprintf(", %u, 0) = -1 EFAULT (%m)\n", valid + 1); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_poll") + +#endif diff --git a/tests-mx32/poll.test b/tests-mx32/poll.test new file mode 100755 index 000000000..b74be29e6 --- /dev/null +++ b/tests-mx32/poll.test @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check poll syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -vepoll $args > "$OUT" +match_diff "$LOG" "$OUT" + +for abbrev in 0 1 2 3 4 5; do + run_prog "./$NAME" $abbrev > /dev/null + run_strace -a16 -epoll -s$abbrev $args > "$OUT" + match_diff "$LOG" "$OUT" +done + +rm -f "$OUT" diff --git a/tests-mx32/ppoll-v.expected b/tests-mx32/ppoll-v.expected new file mode 100644 index 000000000..31070ad16 --- /dev/null +++ b/tests-mx32/ppoll-v.expected @@ -0,0 +1,3 @@ +ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \{fd=3, events=POLLIN\|POLLPRI\}, \{fd=4, events=POLLOUT\}\], 4, \{tv_sec=42, tv_nsec=999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{tv_sec=42, tv_nsec=9[0-9]{8}\}\) +ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{tv_sec=0, tv_nsec=999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) +ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) = -1 EFAULT .* diff --git a/tests-mx32/ppoll.c b/tests-mx32/ppoll.c new file mode 100644 index 000000000..46d7e8169 --- /dev/null +++ b/tests-mx32/ppoll.c @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +static void +test1(void) +{ + const struct timespec timeout = { .tv_sec = 42, .tv_nsec = 999999999 }; + struct pollfd fds[] = { + { .fd = 0, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 1, .events = POLLOUT | POLLWRNORM | POLLWRBAND }, + { .fd = 3, .events = POLLIN | POLLPRI }, + { .fd = 4, .events = POLLOUT } + }; + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR2); + sigaddset(&mask, SIGCHLD); + + int rc = ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask); + if (rc < 0) + perror_msg_and_skip("ppoll"); + assert(rc == 2); +} + +static void +test2(void) +{ + const struct timespec timeout = { .tv_sec = 0, .tv_nsec = 999 }; + struct pollfd fds[] = { + { .fd = 1, .events = POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND }, + { .fd = 0, .events = POLLOUT | POLLWRNORM | POLLWRBAND } + }; + + sigset_t mask; + sigfillset(&mask); + sigdelset(&mask, SIGHUP); + sigdelset(&mask, SIGKILL); + sigdelset(&mask, SIGSTOP); + + int rc = ppoll(fds, sizeof(fds) / sizeof(*fds), &timeout, &mask); + if (rc < 0) + perror_msg_and_skip("ppoll"); + assert(rc == 0); +} + +int +main(void) +{ + int fds[2]; + + (void) close(0); + (void) close(1); + (void) close(3); + (void) close(4); + if (pipe(fds) || pipe(fds)) + perror_msg_and_fail("pipe"); + + test1(); + test2(); + + assert(ppoll(NULL, 42, NULL, NULL) < 0); + return 0; +} diff --git a/tests-mx32/ppoll.expected b/tests-mx32/ppoll.expected new file mode 100644 index 000000000..c38a2062a --- /dev/null +++ b/tests-mx32/ppoll.expected @@ -0,0 +1,3 @@ +ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \.\.\.\], 4, \{tv_sec=42, tv_nsec=999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{tv_sec=42, tv_nsec=9[0-9]{8}\}\) +ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{tv_sec=0, tv_nsec=999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) +ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) = -1 EFAULT .* diff --git a/tests-mx32/ppoll.test b/tests-mx32/ppoll.test new file mode 100755 index 000000000..98389ee6e --- /dev/null +++ b/tests-mx32/ppoll.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check ppoll syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -a30 -s2 -e ppoll $args +match_grep +run_strace -a30 -v -s2 -e ppoll $args +match_grep "$LOG" "$srcdir/$NAME-v.expected" + +exit 0 diff --git a/tests-mx32/prctl-arg2-intptr.c b/tests-mx32/prctl-arg2-intptr.c new file mode 100644 index 000000000..ee000ebe2 --- /dev/null +++ b/tests-mx32/prctl-arg2-intptr.c @@ -0,0 +1,120 @@ +/* + * Check decoding of prctl operations which use arg2 as pointer to an integer + * value: PR_GET_CHILD_SUBREAPER, PR_GET_ENDIAN, PR_GET_FPEMU, and PR_GET_FPEXC. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_prctl + +# include +# include +# include +# include + +static const char *errstr; + +static long +prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) +{ + static const kernel_ulong_t bogus_arg = + (kernel_ulong_t) 0xdeadbeefbadc0dedULL; + long rc = syscall(__NR_prctl, arg1, arg2, bogus_arg); + errstr = sprintrc(rc); + return rc; +} + +int +main(void) +{ + static const kernel_ulong_t bogus_addr1 = + (kernel_ulong_t) 0x1e55c0de00000000ULL; + static const kernel_ulong_t bogus_addr2 = + (kernel_ulong_t) 0xfffffffffffffffdULL; + static const kernel_ulong_t bogus_op_bits = + (kernel_ulong_t) 0xbadc0ded00000000ULL; + static const struct { + kernel_ulong_t val; + const char *str; + } options[] = { + { 37, "PR_GET_CHILD_SUBREAPER" }, + { 19, "PR_GET_ENDIAN" }, + { 9, "PR_GET_FPEMU" }, + { 11, "PR_GET_FPEXC" }, + }; + + unsigned int *ptr = tail_alloc(sizeof(*ptr)); + long rc; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(options); ++i) { + prctl(options[i].val | bogus_op_bits, 0); + printf("prctl(%s, NULL) = %s\n", options[i].str, errstr); + + if (bogus_addr1) { + prctl(options[i].val | bogus_op_bits, bogus_addr1); + printf("prctl(%s, %#llx) = %s\n", options[i].str, + (unsigned long long) bogus_addr1, errstr); + } + + prctl(options[i].val | bogus_op_bits, bogus_addr2); + printf("prctl(%s, %#llx) = %s\n", options[i].str, + (unsigned long long) bogus_addr2, errstr); + + prctl(options[i].val | bogus_op_bits, (uintptr_t) (ptr + 1)); + printf("prctl(%s, %p) = %s\n", options[i].str, + ptr + 1, errstr); + + rc = prctl(options[i].val | bogus_op_bits, (uintptr_t) ptr); + if (!rc) { + printf("prctl(%s, [%u]) = %s\n", + options[i].str, *ptr, errstr); + } else { + printf("prctl(%s, %p) = %s\n", + options[i].str, ptr, errstr); + } + + if (F8ILL_KULONG_SUPPORTED) { + kernel_ulong_t bogus_addr3 = f8ill_ptr_to_kulong(ptr); + prctl(options[i].val | bogus_op_bits, bogus_addr3); + printf("prctl(%s, %#llx) = %s\n", options[i].str, + (unsigned long long) bogus_addr3, errstr); + } + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl") + +#endif diff --git a/tests-mx32/prctl-arg2-intptr.test b/tests-mx32/prctl-arg2-intptr.test new file mode 100755 index 000000000..bcef80650 --- /dev/null +++ b/tests-mx32/prctl-arg2-intptr.test @@ -0,0 +1,14 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_CHILD_SUBREAPER, PR_GET_ENDIAN, PR_GET_FPEMU, +# and PR_GET_FPEXC operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a25 -eprctl $args > "$EXP" +LC_ALL=C grep -Ev '^prctl\(PR_[GS]ET_([^CEF]|.[^HNP]|..[^DEI])' \ + < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/prctl-dumpable.c b/tests-mx32/prctl-dumpable.c new file mode 100644 index 000000000..1049bcee8 --- /dev/null +++ b/tests-mx32/prctl-dumpable.c @@ -0,0 +1,106 @@ +/* + * Check decoding of prctl PR_GET_DUMPABLE/PR_SET_DUMPABLE operations. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined PR_GET_DUMPABLE && defined PR_SET_DUMPABLE + +# include +# include + +static const char *errstr; + +static long +prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) +{ + static const kernel_ulong_t bogus_arg = + (kernel_ulong_t) 0xdeadbeefbadc0dedULL; + long rc = syscall(__NR_prctl, arg1, arg2, bogus_arg); + errstr = sprintrc(rc); + return rc; +} + +int +main(void) +{ + static const kernel_ulong_t bogus_dumpable1 = + (kernel_ulong_t) 0xdeadc0de00000001ULL; + static const kernel_ulong_t bogus_dumpable2 = + (kernel_ulong_t) 0xdeadc0defacebeefULL; + + static const char * const args[] = { + "SUID_DUMP_DISABLE", + "SUID_DUMP_USER", + "SUID_DUMP_ROOT", + }; + + unsigned int i; + + prctl(PR_SET_DUMPABLE, 3); + printf("prctl(PR_SET_DUMPABLE, 0x3 /* SUID_DUMP_??? */) = %s\n", + errstr); + + prctl(PR_SET_DUMPABLE, bogus_dumpable1); + if (bogus_dumpable1 == 1) { + printf("prctl(PR_SET_DUMPABLE, SUID_DUMP_USER) = %s\n", errstr); + } else { + printf("prctl(PR_SET_DUMPABLE, %#llx /* SUID_DUMP_??? */)" + " = %s\n", + (unsigned long long) bogus_dumpable1, errstr); + } + + prctl(PR_SET_DUMPABLE, bogus_dumpable2); + printf("prctl(PR_SET_DUMPABLE, %#llx /* SUID_DUMP_??? */) = %s\n", + (unsigned long long) bogus_dumpable2, errstr); + + for (i = 0; i < ARRAY_SIZE(args); ++i) { + prctl(PR_SET_DUMPABLE, i); + printf("prctl(PR_SET_DUMPABLE, %s) = %s\n", args[i], errstr); + + long rc = prctl(PR_GET_DUMPABLE, bogus_dumpable2); + if (rc >= 0 && rc < (long) ARRAY_SIZE(args)) { + printf("prctl(PR_GET_DUMPABLE) = %s (%s)\n", + errstr, args[rc]); + } else { + printf("prctl(PR_GET_DUMPABLE) = %s\n", errstr); + } + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_DUMPABLE && PR_SET_DUMPABLE") + +#endif diff --git a/tests-mx32/prctl-dumpable.test b/tests-mx32/prctl-dumpable.test new file mode 100755 index 000000000..08acb8b9a --- /dev/null +++ b/tests-mx32/prctl-dumpable.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_DUMPABLE and PR_SET_DUMPABLE operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a23 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^D][^U]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/prctl-name.c b/tests-mx32/prctl-name.c new file mode 100644 index 000000000..308c275f2 --- /dev/null +++ b/tests-mx32/prctl-name.c @@ -0,0 +1,103 @@ +/* + * Check decoding of prctl PR_GET_NAME/PR_SET_NAME operations. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PRCTL +# include +#endif + +#if defined HAVE_PRCTL && defined PR_GET_NAME && defined PR_SET_NAME + +# include +# include +# include + +int +main(void) +{ + static const char str[] = "0123456789abcdef"; + static const int len = sizeof(str) - 1; + char *name = tail_memdup(str, sizeof(str)); + int i; + int rc; + + rc = prctl(PR_SET_NAME, NULL); + printf("prctl(PR_SET_NAME, NULL) = %s\n", sprintrc(rc)); + + for (i = 0; i <= len; ++i) { + rc = prctl(PR_SET_NAME, name + len - i); + printf("prctl(PR_SET_NAME, \"%.*s\"%s) = %s\n", + i < len - 1 ? i : len - 1, + str + len - i, + i < len - 1 ? "" : "...", + sprintrc(rc)); + } + + *name = -1; + ++name; + memcpy(name, str, len); + + for (i = 0; i <= len; ++i) { + rc = prctl(PR_SET_NAME, name + len - i); + if (i < len - 1) + printf("prctl(PR_SET_NAME, %p) = %s\n", + name + len - i, sprintrc(rc)); + else + printf("prctl(PR_SET_NAME, \"%.*s\"...) = %s\n", + len - 1, str + len - i, sprintrc(rc)); + } + + rc = prctl(PR_GET_NAME, NULL); + printf("prctl(PR_GET_NAME, NULL) = %s\n", sprintrc(rc)); + + for (i = 0; i < len; ++i) { + rc = prctl(PR_GET_NAME, name + len - i); + printf("prctl(PR_GET_NAME, %p) = %s\n", + name + len - i, sprintrc(rc)); + } + + rc = prctl(PR_GET_NAME, name); + if (rc) + printf("prctl(PR_GET_NAME, %p) = %s\n", + name, sprintrc(rc)); + else + printf("prctl(PR_GET_NAME, \"%.*s\") = %s\n", + len - 1, name, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_GET_NAME && PR_SET_NAME") + +#endif diff --git a/tests-mx32/prctl-name.test b/tests-mx32/prctl-name.test new file mode 100755 index 000000000..071179c55 --- /dev/null +++ b/tests-mx32/prctl-name.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_NAME/PR_SET_NAME operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a23 -eprctl $args > "$EXP" +grep -v '^prctl(PR_GET_[^N][^A]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/prctl-no-args.c b/tests-mx32/prctl-no-args.c new file mode 100644 index 000000000..57e1b733e --- /dev/null +++ b/tests-mx32/prctl-no-args.c @@ -0,0 +1,77 @@ +/* + * Check decoding of prctl operations without arguments and return code parsing: + * PR_GET_KEEPCAPS, PR_GET_SECCOMP, PR_GET_TIMERSLACK, PR_GET_TIMING, + * PR_TASK_PERF_EVENTS_DISABLE, and PR_TASK_PERF_EVENTS_ENABLE. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_prctl + +# include +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_op_bits = + (kernel_ulong_t) 0xbadc0ded00000000ULL; + static const kernel_ulong_t bogus_arg = + (kernel_ulong_t) 0xfacefeeddeadbeefULL; + static const struct { + kernel_ulong_t val; + const char *str; + } options[] = { + { 7, "PR_GET_KEEPCAPS" }, + { 13, "PR_GET_TIMING" }, + { 21, "PR_GET_SECCOMP" }, + { 30, "PR_GET_TIMERSLACK" }, + { 31, "PR_TASK_PERF_EVENTS_DISABLE" }, + { 32, "PR_TASK_PERF_EVENTS_ENABLE" }, + }; + + unsigned int *ptr = tail_alloc(sizeof(*ptr)); + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(options); i++) { + long rc = syscall(__NR_prctl, options[i].val | bogus_op_bits, + bogus_arg); + printf("prctl(%s) = %s\n", options[i].str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl") + +#endif diff --git a/tests-mx32/prctl-no-args.test b/tests-mx32/prctl-no-args.test new file mode 100755 index 000000000..ce8ca67b7 --- /dev/null +++ b/tests-mx32/prctl-no-args.test @@ -0,0 +1,14 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_KEEPCAPS, PR_GET_SECCOMP, PR_GET_TIMERSLACK, +# PR_GET_TIMING, PR_TASK_PERF_EVENTS_DISABLE, and PR_TASK_PERF_EVENTS_ENABLE +# operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a21 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^KST][^EI][^CEM]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/prctl-pdeathsig.c b/tests-mx32/prctl-pdeathsig.c new file mode 100644 index 000000000..c17603072 --- /dev/null +++ b/tests-mx32/prctl-pdeathsig.c @@ -0,0 +1,81 @@ +/* + * Check decoding of prctl PR_GET_PDEATHSIG/PR_SET_PDEATHSIG operations. + * + * Copyright (c) 2016 JingPiao Chen + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined PR_GET_PDEATHSIG && defined PR_SET_PDEATHSIG + +# include +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_signal = + (kernel_ulong_t) 0xbadc0deddeadfeedULL; + + int *pdeathsig = tail_alloc(sizeof(*pdeathsig)); + long rc; + + rc = syscall(__NR_prctl, PR_SET_PDEATHSIG, bogus_signal); + printf("prctl(PR_SET_PDEATHSIG, %llu) = %s\n", + (unsigned long long) bogus_signal, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_SET_PDEATHSIG, SIGINT); + printf("prctl(PR_SET_PDEATHSIG, SIGINT) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_PDEATHSIG, NULL); + printf("prctl(PR_GET_PDEATHSIG, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_PDEATHSIG, pdeathsig + 1); + printf("prctl(PR_GET_PDEATHSIG, %p) = %s\n", + pdeathsig + 1, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_PDEATHSIG, pdeathsig); + if (rc) { + printf("prctl(PR_GET_PDEATHSIG, %p) = %s\n", + pdeathsig, sprintrc(rc)); + } else { + printf("prctl(PR_GET_PDEATHSIG, [SIGINT]) = %s\n", + sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_PDEATHSIG && PR_SET_PDEATHSIG") + +#endif diff --git a/tests-mx32/prctl-pdeathsig.test b/tests-mx32/prctl-pdeathsig.test new file mode 100755 index 000000000..2777503ae --- /dev/null +++ b/tests-mx32/prctl-pdeathsig.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check prctl PR_GET_PDEATHSIG PR_SET_PDEATHSIG decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a30 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^P][^D]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/prctl-seccomp-filter-v.c b/tests-mx32/prctl-seccomp-filter-v.c new file mode 100644 index 000000000..69316fbed --- /dev/null +++ b/tests-mx32/prctl-seccomp-filter-v.c @@ -0,0 +1,145 @@ +/* + * Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#ifdef HAVE_PRCTL +# include +#endif +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined HAVE_PRCTL \ + && defined PR_SET_NO_NEW_PRIVS \ + && defined PR_SET_SECCOMP \ + && defined SECCOMP_MODE_FILTER \ + && defined SECCOMP_RET_ERRNO \ + && defined BPF_JUMP \ + && defined BPF_STMT + +#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW) + +#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|(SECCOMP_RET_DATA & (err))) + +#define SOCK_FILTER_KILL_PROCESS \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL) + +#define PRINT_ALLOW_SYSCALL(nr) \ + printf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), ", \ + __NR_ ## nr) + +#define PRINT_DENY_SYSCALL(nr, err) \ + printf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|%#x), ", \ + __NR_ ## nr, err) + +static const struct sock_filter filter[] = { + /* load syscall number */ + BPF_STMT(BPF_LD|BPF_W|BPF_ABS, offsetof(struct seccomp_data, nr)), + + /* allow syscalls */ + SOCK_FILTER_ALLOW_SYSCALL(close), + SOCK_FILTER_ALLOW_SYSCALL(exit), + SOCK_FILTER_ALLOW_SYSCALL(exit_group), + + /* deny syscalls */ + SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), + SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), + + /* kill process */ + SOCK_FILTER_KILL_PROCESS +}; + +static const struct sock_fprog prog = { + .len = ARRAY_SIZE(filter), + .filter = (struct sock_filter *) filter, +}; + +int +main(void) +{ + int fds[2]; + + puts("prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0"); + + printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=%u, filter=[", + prog.len); + + printf("BPF_STMT(BPF_LD|BPF_W|BPF_ABS, %#x), ", + (unsigned) offsetof(struct seccomp_data, nr)); + + PRINT_ALLOW_SYSCALL(close); + PRINT_ALLOW_SYSCALL(exit); + PRINT_ALLOW_SYSCALL(exit_group); + + PRINT_DENY_SYSCALL(sync, EBUSY), + PRINT_DENY_SYSCALL(setsid, EPERM), + + printf("BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL)"); + + puts("]}) = 0"); + puts("+++ exited with 0 +++"); + + fflush(stdout); + close(0); + close(1); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) + perror_msg_and_skip("PR_SET_NO_NEW_PRIVS"); + if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) + perror_msg_and_skip("PR_SET_SECCOMP"); + if (close(0) || close(1)) + _exit(77); + + _exit(0); +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_SET_NO_NEW_PRIVS && PR_SET_SECCOMP" + " && SECCOMP_MODE_FILTER && SECCOMP_RET_ERRNO" + " && BPF_JUMP && BPF_STMT") + +#endif diff --git a/tests-mx32/prctl-seccomp-filter-v.test b/tests-mx32/prctl-seccomp-filter-v.test new file mode 100755 index 000000000..44e4a782a --- /dev/null +++ b/tests-mx32/prctl-seccomp-filter-v.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -v -eprctl $args > "$EXP" +grep -v '^prctl(PR_GET_' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/prctl-seccomp-strict.c b/tests-mx32/prctl-seccomp-strict.c new file mode 100644 index 000000000..a78f81736 --- /dev/null +++ b/tests-mx32/prctl-seccomp-strict.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#ifdef HAVE_PRCTL +# include +#endif + +#if defined HAVE_PRCTL && defined PR_SET_SECCOMP && defined __NR_exit + +# include +# include + +int +main(void) +{ + static const char text1[] = + "prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT) = 0\n"; + static const char text2[] = "+++ exited with 0 +++\n"; + + int rc = prctl(PR_SET_SECCOMP, -1L, 1, 2, 3); + printf("prctl(PR_SET_SECCOMP, %#lx /* SECCOMP_MODE_??? */, 0x1, 0x2, 0x3)" + " = %d %s (%m)\n", -1L, rc, errno2name()); + fflush(stdout); + + rc = prctl(PR_SET_SECCOMP, 1); + if (rc) { + printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT)" + " = %d %s (%m)\n", rc, errno2name()); + fflush(stdout); + rc = 0; + } else { + /* + * If kernel implementaton of SECCOMP_MODE_STRICT is buggy, + * the following syscall will result to SIGKILL. + */ + rc = write(1, text1, LENGTH_OF(text1)) != LENGTH_OF(text1); + } + + rc += write(1, text2, LENGTH_OF(text2)) != LENGTH_OF(text2); + return !!syscall(__NR_exit, rc); +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_SET_SECCOMP && __NR_exit") + +#endif diff --git a/tests-mx32/prctl-seccomp-strict.test b/tests-mx32/prctl-seccomp-strict.test new file mode 100755 index 000000000..1f987df72 --- /dev/null +++ b/tests-mx32/prctl-seccomp-strict.test @@ -0,0 +1,19 @@ +#!/bin/sh + +# Check how prctl PR_SET_SECCOMP SECCOMP_MODE_STRICT is decoded. + +. "${srcdir=.}/init.sh" + +check_prog grep +set -- "./$NAME" +"$@" > /dev/null || { + case $? in + 77) skip_ "$* exited with code 77" ;; + 137) framework_skip_ "$* killed by SIGKILL, fix your kernel" ;; + *) fail_ "$args failed" ;; + esac +} +run_strace -eprctl "$@" > "$EXP" +grep -v '^prctl(PR_GET_' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/prctl-securebits.c b/tests-mx32/prctl-securebits.c new file mode 100644 index 000000000..741973af9 --- /dev/null +++ b/tests-mx32/prctl-securebits.c @@ -0,0 +1,106 @@ +/* + * Check decoding of prctl PR_GET_SECUREBITS/PR_SET_SECUREBITS operations. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined PR_GET_SECUREBITS && defined PR_SET_SECUREBITS + +# include +# include + +# include "xlat.h" +# include "xlat/secbits.h" + +static const char *errstr; + +static long +prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) +{ + static const kernel_ulong_t bogus_arg = + (kernel_ulong_t) 0xdeadbeefbadc0dedULL; + long rc = syscall(__NR_prctl, arg1, arg2, bogus_arg); + errstr = sprintrc(rc); + return rc; +} + +int +main(void) +{ + static const kernel_ulong_t bits1 = + (kernel_ulong_t) 0xdeadc0defacebeefULL; + static const kernel_ulong_t bits2 = + (kernel_ulong_t) 0xbadc0ded00000000ULL; + static const kernel_ulong_t bits3 = + (kernel_ulong_t) 0xffULL; + + prctl(PR_SET_SECUREBITS, 0); + printf("prctl(PR_SET_SECUREBITS, 0) = %s\n", errstr); + + prctl(PR_SET_SECUREBITS, bits1); + printf("prctl(PR_SET_SECUREBITS, SECBIT_NOROOT|SECBIT_NOROOT_LOCKED|" + "SECBIT_NO_SETUID_FIXUP|SECBIT_NO_SETUID_FIXUP_LOCKED|" + "SECBIT_KEEP_CAPS_LOCKED|SECBIT_NO_CAP_AMBIENT_RAISE|" + "SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED|%#llx) = %s\n", + (unsigned long long) bits1 & ~0xffULL, errstr); + + if (bits2) { + prctl(PR_SET_SECUREBITS, bits2); + printf("prctl(PR_SET_SECUREBITS, %#llx /* SECBIT_??? */)" + " = %s\n", (unsigned long long) bits2, errstr); + } + + prctl(PR_SET_SECUREBITS, bits3); + printf("prctl(PR_SET_SECUREBITS, SECBIT_NOROOT|SECBIT_NOROOT_LOCKED|" + "SECBIT_NO_SETUID_FIXUP|SECBIT_NO_SETUID_FIXUP_LOCKED|" + "SECBIT_KEEP_CAPS|SECBIT_KEEP_CAPS_LOCKED|" + "SECBIT_NO_CAP_AMBIENT_RAISE|SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED)" + " = %s\n", errstr); + + long rc = prctl(PR_GET_SECUREBITS, bits1); + printf("prctl(PR_GET_SECUREBITS) = %s", errstr); + if (rc > 0) { + printf(" ("); + printflags(secbits, rc, NULL); + printf(")"); + } + + puts(""); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_SECUREBITS && PR_SET_SECUREBITS") + +#endif diff --git a/tests-mx32/prctl-securebits.test b/tests-mx32/prctl-securebits.test new file mode 100755 index 000000000..c91e62a61 --- /dev/null +++ b/tests-mx32/prctl-securebits.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_SECUREBITS/PR_SET_SECUREBITS operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a25 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^S][^E][^C][^U]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/prctl-tid_address.c b/tests-mx32/prctl-tid_address.c new file mode 100644 index 000000000..24e45031b --- /dev/null +++ b/tests-mx32/prctl-tid_address.c @@ -0,0 +1,103 @@ +/* + * Check decoding of prctl PR_GET_TID_ADDRESS operation. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined __NR_set_tid_address && \ + defined PR_GET_TID_ADDRESS + +# include +# include +# include + +static const char * +sprintaddr(kernel_ulong_t addr) +{ + static char buf[sizeof("0x") + sizeof(addr) * 2]; + + if (addr) { + snprintf(buf, sizeof(buf), "%#llx", (unsigned long long) addr); + + return buf; + } + + return "NULL"; +} + +int +main(void) +{ + static const kernel_ulong_t bogus_addr = + (kernel_ulong_t) 0xfffffffffffffffdULL; + + /* Note that kernel puts kernel-sized pointer even on x32 */ + kernel_ulong_t *ptr = tail_alloc(sizeof(*ptr)); + long rc; + long set_ok; + + *ptr = (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + + rc = syscall(__NR_prctl, PR_GET_TID_ADDRESS, NULL); + printf("prctl(PR_GET_TID_ADDRESS, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TID_ADDRESS, bogus_addr); + printf("prctl(PR_GET_TID_ADDRESS, %#llx) = %s\n", + (unsigned long long) bogus_addr, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TID_ADDRESS, ptr); + if (rc) { + printf("prctl(PR_GET_TID_ADDRESS, %p) = %s\n", + ptr, sprintrc(rc)); + } else { + printf("prctl(PR_GET_TID_ADDRESS, [%s]) = %s\n", + sprintaddr(*ptr), sprintrc(rc)); + } + + set_ok = syscall(__NR_set_tid_address, bogus_addr); + + rc = syscall(__NR_prctl, PR_GET_TID_ADDRESS, ptr); + if (rc) { + printf("prctl(PR_GET_TID_ADDRESS, %p) = %s\n", + ptr, sprintrc(rc)); + } else { + printf("prctl(PR_GET_TID_ADDRESS, [%s]) = %s\n", + sprintaddr(set_ok ? bogus_addr : *ptr), sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && __NR_set_tid_address && PR_GET_TID_ADDRESS") + +#endif diff --git a/tests-mx32/prctl-tid_address.test b/tests-mx32/prctl-tid_address.test new file mode 100755 index 000000000..dc7b7c328 --- /dev/null +++ b/tests-mx32/prctl-tid_address.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_TID_ADDRESS operation. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a23 -eprctl $args > "$EXP" +LC_ALL=C grep -Ev '^prctl\(PR_[GS]ET_([^T]|.[^I]|..[^D])' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/prctl-tsc.c b/tests-mx32/prctl-tsc.c new file mode 100644 index 000000000..fd9362d76 --- /dev/null +++ b/tests-mx32/prctl-tsc.c @@ -0,0 +1,80 @@ +/* + * Check decoding of prctl PR_GET_TSC/PR_SET_TSC operations. + * + * Copyright (c) 2016 JingPiao Chen + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined PR_GET_TSC && defined PR_SET_TSC + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_tsc = + (kernel_ulong_t) 0xdeadc0defacebeefULL; + + int *tsc = tail_alloc(sizeof(*tsc)); + long rc; + + rc = syscall(__NR_prctl, PR_SET_TSC, 0); + printf("prctl(PR_SET_TSC, 0 /* PR_TSC_??? */) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_SET_TSC, bogus_tsc); + printf("prctl(PR_SET_TSC, %#x /* PR_TSC_??? */) = %s\n", + (unsigned int) bogus_tsc, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_SET_TSC, PR_TSC_SIGSEGV); + printf("prctl(PR_SET_TSC, PR_TSC_SIGSEGV) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TSC, NULL); + printf("prctl(PR_GET_TSC, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TSC, tsc + 1); + printf("prctl(PR_GET_TSC, %p) = %s\n", tsc + 1, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TSC, tsc); + if (rc) + printf("prctl(PR_GET_TSC, %p) = %s\n", tsc, sprintrc(rc)); + else + printf("prctl(PR_GET_TSC, [PR_TSC_SIGSEGV]) = %s\n", + sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_TSC && PR_SET_TSC") + +#endif diff --git a/tests-mx32/prctl-tsc.test b/tests-mx32/prctl-tsc.test new file mode 100755 index 000000000..a906ba894 --- /dev/null +++ b/tests-mx32/prctl-tsc.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check prctl PR_GET_TSC PR_SET_TSC decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a24 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^T][^S]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests-mx32/pread64-pwrite64.c b/tests-mx32/pread64-pwrite64.c new file mode 100644 index 000000000..4a0932a99 --- /dev/null +++ b/tests-mx32/pread64-pwrite64.c @@ -0,0 +1,223 @@ +/* + * Check decoding of pread64 and pwrite64 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +static void +dump_str(const char *str, const unsigned int len) +{ + static const char dots[16] = "................"; + unsigned int i; + + for (i = 0; i < len; i += 16) { + unsigned int n = len - i > 16 ? 16 : len - i; + const char *dump = hexdump_memdup(str + i, n); + + tprintf(" | %05x %-49s %-16.*s |\n", + i, dump, n, dots); + + free((void *) dump); + } +} + +static void +print_hex(const char *str, const unsigned int len) +{ + const unsigned char *ustr = (const unsigned char *) str; + unsigned int i; + + for (i = 0; i < len; ++i) { + unsigned int c = ustr[i]; + + switch (c) { + case '\t': + tprintf("\\t"); break; + case '\n': + tprintf("\\n"); break; + case '\v': + tprintf("\\v"); break; + case '\f': + tprintf("\\f"); break; + case '\r': + tprintf("\\r"); break; + default: + tprintf("\\%o", ustr[i]); + } + } +} + +static void +test_dump(const unsigned int len) +{ + static char *buf; + + if (buf) { + size_t ps1 = get_page_size() - 1; + buf = (void *) (((size_t) buf + ps1) & ~ps1) - len; + } else { + buf = tail_alloc(len); + } + + const off_t offset = 0xdefaceddeadbeefLL + len; + long rc = pread(0, buf, len, offset); + if (rc != (int) len) + perror_msg_and_fail("pread64: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "pread64", 0); + print_hex(buf, len); + tprintf("\", %d, %lld) = %ld\n", len, (long long) offset, rc); + dump_str(buf, len); + + unsigned int i; + for (i = 0; i < len; ++i) + buf[i] = i; + + rc = pwrite(1, buf, len, offset); + if (rc != (int) len) + perror_msg_and_fail("pwrite64: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "pwrite64", 1); + print_hex(buf, len); + tprintf("\", %d, %lld) = %ld\n", len, (long long) offset, rc); + dump_str(buf, len); + + if (!len) + buf = 0; +} + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "pread64-pwrite64-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + + char *nil = tail_alloc(1); + *nil = '\0'; + + static const char w_c[] = "0123456789abcde"; + const unsigned int w_len = LENGTH_OF(w_c); + const char *w_d = hexdump_strdup(w_c); + const void *w = tail_memdup(w_c, w_len); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + const unsigned int r0_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r0_len); + + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + const unsigned int r1_len = w_len - r0_len; + void *r1 = tail_alloc(w_len); + + void *efault = r1 - get_page_size(); + + long rc; + + rc = pwrite(1, w, 0, 0); + if (rc) + perror_msg_and_fail("pwrite64: expected 0, returned %ld", rc); + tprintf("pwrite64(1, \"\", 0, 0) = 0\n"); + + rc = pwrite(1, efault, 1, 0); + if (rc != -1) + perror_msg_and_fail("pwrite64: expected -1 EFAULT" + ", returned %ld", rc); + tprintf("pwrite64(1, %p, 1, 0) = -1 EFAULT (%m)\n", efault); + + rc = pwrite(1, nil, 1, -3); + if (rc != -1) + perror_msg_and_fail("pwrite64: expected -1, returned %ld", rc); + tprintf("pwrite64(1, \"\\0\", 1, -3) = -1 EINVAL (%m)\n"); + + rc = pwrite(1, w, w_len, 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwrite64: expected %u, returned %ld", + w_len, rc); + tprintf("pwrite64(1, \"%s\", %u, 0) = %ld\n" + " | 00000 %-49s %-16s |\n", + w_c, w_len, rc, w_d, w_c); + close(1); + + rc = pread(0, r0, 0, 0); + if (rc) + perror_msg_and_fail("pread64: expected 0, returned %ld", rc); + tprintf("pread64(0, \"\", 0, 0) = 0\n"); + + rc = pread(0, efault, 1, 0); + if (rc != -1) + perror_msg_and_fail("pread64: expected -1, returned %ld", rc); + tprintf("pread64(0, %p, 1, 0) = -1 EFAULT (%m)\n", efault); + + rc = pread(0, efault, 2, -7); + if (rc != -1) + perror_msg_and_fail("pread64: expected -1, returned %ld", rc); + tprintf("pread64(0, %p, 2, -7) = -1 EINVAL (%m)\n", efault); + + rc = pread(0, r0, r0_len, 0); + if (rc != (int) r0_len) + perror_msg_and_fail("pread64: expected %u, returned %ld", + r0_len, rc); + tprintf("pread64(0, \"%s\", %u, 0) = %ld\n" + " | 00000 %-49s %-16s |\n", + r0_c, r0_len, rc, r0_d, r0_c); + + rc = pread(0, r1, w_len, r0_len); + if (rc != (int) r1_len) + perror_msg_and_fail("pread64: expected %u, returned %ld", + r1_len, rc); + tprintf("pread64(0, \"%s\", %u, %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r1_c, w_len, r0_len, rc, r1_d, r1_c); + close(0); + + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (open("/dev/null", O_WRONLY) != 1) + perror_msg_and_fail("open"); + + unsigned int i; + for (i = 0; i <= 32; ++i) + test_dump(i); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests-mx32/pread64-pwrite64.test b/tests-mx32/pread64-pwrite64.test new file mode 100755 index 000000000..e585406da --- /dev/null +++ b/tests-mx32/pread64-pwrite64.test @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check decoding and dumping of pread64 and pwrite64 syscalls. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +tmpfile=pread64-pwrite64-tmpfile +> $tmpfile + +run_strace_match_diff \ + -a21 -eread=0 -ewrite=1 -e trace=pread64,pwrite64 \ + -P $tmpfile -P /dev/zero -P /dev/null + +rm -f $tmpfile diff --git a/tests-mx32/preadv-pwritev.c b/tests-mx32/preadv-pwritev.c new file mode 100644 index 000000000..b2d2a8248 --- /dev/null +++ b/tests-mx32/preadv-pwritev.c @@ -0,0 +1,182 @@ +/* + * Check decoding of preadv and pwritev syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#if defined HAVE_PREADV && defined HAVE_PWRITEV + +# include +# include +# include +# include + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "preadv-pwritev-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + if (unlink(tmp)) + perror_msg_and_fail("unlink: %s", tmp); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + const void *efault = w0 + LENGTH_OF(w0_c); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + long rc; + + rc = pwritev(1, efault, 42, 0); + tprintf("pwritev(1, %p, 42, 0) = %ld %s (%m)\n", + efault, rc, errno2name()); + + rc = preadv(0, efault, 42, 0); + tprintf("preadv(0, %p, 42, 0) = %ld %s (%m)\n", + efault, rc, errno2name()); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + rc = pwritev(1, w_iov, 0, 0); + if (rc) + perror_msg_and_fail("pwritev: expected 0, returned %ld", rc); + tprintf("pwritev(1, [], 0, 0) = 0\n"); + + rc = pwritev(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2, 0); + tprintf("pwritev(1, [{iov_base=\"%s\", iov_len=%u}, %p], 2, 0)" + " = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + rc = pwritev(1, w_iov, ARRAY_SIZE(w_iov_), 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwritev: expected %u, returned %ld", + w_len, rc); + close(1); + tprintf("pwritev(1, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}], %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + rc = preadv(0, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv: expected %u, returned %ld", + r_len, rc); + tprintf("preadv(0, [{iov_base=\"%s\", iov_len=%u}], %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = preadv(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) w_len - (int) r_len) + perror_msg_and_fail("preadv: expected %d, returned %ld", + (int) w_len - r_len, rc); + tprintf("preadv(0, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"\", iov_len=%u}], %u, %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), + r_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PREADV && HAVE_PWRITEV") + +#endif diff --git a/tests-mx32/preadv-pwritev.test b/tests-mx32/preadv-pwritev.test new file mode 100755 index 000000000..cb2a07729 --- /dev/null +++ b/tests-mx32/preadv-pwritev.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding and dumping of preadv and pwritev syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 -eread=0 -ewrite=1 -e trace=preadv,pwritev diff --git a/tests-mx32/preadv.c b/tests-mx32/preadv.c new file mode 100644 index 000000000..fb5d3ad78 --- /dev/null +++ b/tests-mx32/preadv.c @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PREADV + +# include +# include +# include +# include + +# define LEN 8 + +static void +print_iov(const struct iovec *iov) +{ + unsigned int i; + unsigned char *buf = iov->iov_base; + + fputs("{iov_base=\"", stdout); + for (i = 0; i < iov->iov_len; ++i) + printf("\\%d", (int) buf[i]); + printf("\", iov_len=%u}", (unsigned) iov->iov_len); +} + +static void +print_iovec(const struct iovec *iov, unsigned int cnt) +{ + unsigned int i; + putchar('['); + for (i = 0; i < cnt; ++i) { + if (i) + fputs(", ", stdout); + print_iov(&iov[i]); + } + putchar(']'); +} + +int +main(void) +{ + const off_t offset = 0xdefaceddeadbeefLL; + char *buf = tail_alloc(LEN); + struct iovec *iov = tail_alloc(sizeof(*iov)); + iov->iov_base = buf; + iov->iov_len = LEN; + + (void) close(0); + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (preadv(0, iov, 1, offset) != LEN) + perror_msg_and_fail("preadv"); + printf("preadv(0, "); + print_iovec(iov, 1); + printf(", 1, %lld) = %u\n", (long long) offset, LEN); + + if (preadv(0, iov, 1, -1) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, [{iov_base=%p, iov_len=%zu}], 1, -1) = " + "-1 EINVAL (%m)\n", iov->iov_base, iov->iov_len); + + if (preadv(0, NULL, 1, -2) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, NULL, 1, -2) = -1 EINVAL (%m)\n"); + + if (preadv(0, iov, 0, -3) != -1) + perror_msg_and_fail("preadv"); + printf("preadv(0, [], 0, -3) = -1 EINVAL (%m)\n"); + + static const char tmp[] = "preadv-tmpfile"; + int fd = open(tmp, O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd < 0) + perror_msg_and_fail("open"); + if (unlink(tmp)) + perror_msg_and_fail("unlink"); + + static const char w[] = "0123456789abcde"; + if (write(fd, w, LENGTH_OF(w)) != LENGTH_OF(w)) + perror_msg_and_fail("write"); + + static const char r0_c[] = "01234567"; + static const char r1_c[] = "89abcde"; + + const unsigned int r_len = (LENGTH_OF(w) + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + long rc; + + rc = preadv(fd, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv: expected %u, returned %ld", + r_len, rc); + printf("preadv(%d, [{iov_base=\"%s\", iov_len=%u}], %u, 0) = %u\n", + fd, r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(LENGTH_OF(w)); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = LENGTH_OF(w) + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = preadv(fd, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) LENGTH_OF(w) - (int) r_len) + perror_msg_and_fail("preadv: expected %d, returned %ld", + (int) LENGTH_OF(w) - r_len, rc); + printf("preadv(%d, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"\", iov_len=%u}], %u, %u) = %u\n", + fd, r1_c, r_len, LENGTH_OF(w), ARRAY_SIZE(r1_iov_), + r_len, LENGTH_OF(w) - r_len); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PREADV") + +#endif diff --git a/tests-mx32/preadv.test b/tests-mx32/preadv.test new file mode 100755 index 000000000..d1abdb7d4 --- /dev/null +++ b/tests-mx32/preadv.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check preadv syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff --git a/tests-mx32/preadv2-pwritev2.c b/tests-mx32/preadv2-pwritev2.c new file mode 100644 index 000000000..f7c46c0af --- /dev/null +++ b/tests-mx32/preadv2-pwritev2.c @@ -0,0 +1,216 @@ +/* + * Check decoding of preadv2 and pwritev2 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#if defined __NR_preadv2 && defined __NR_pwritev2 + +# include +# include +# include +# include +# include + +static int +pr(const int fd, const struct iovec *const vec, + const unsigned long vlen, const unsigned long pos) +{ + return syscall(__NR_preadv2, fd, vec, vlen, pos, 0L, 0L); +} + +static int +pw(const int fd, const struct iovec *const vec, + const unsigned long vlen, const unsigned long pos) +{ + return syscall(__NR_pwritev2, fd, vec, vlen, pos, 0L, 0L); +} + +static void +dumpio(void) +{ + static char tmp[] = "preadv2-pwritev2-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + if (unlink(tmp)) + perror_msg_and_fail("unlink: %s", tmp); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + long rc; + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + rc = pw(1, w_iov, 0, 0); + if (rc) + perror_msg_and_fail("pwritev2: expected 0, returned %ld", rc); + tprintf("pwritev2(1, [], 0, 0, 0) = 0\n"); + + rc = pw(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2, 0); + tprintf("pwritev2(1, [{iov_base=\"%s\", iov_len=%u}, %p], 2, 0, 0)" + " = %ld %s (%m)\n", + w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + rc = pw(1, w_iov, ARRAY_SIZE(w_iov_), 0); + if (rc != (int) w_len) + perror_msg_and_fail("pwritev2: expected %u, returned %ld", + w_len, rc); + close(1); + tprintf("pwritev2(1, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}], %u, 0, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + rc = pr(0, r_iov, ARRAY_SIZE(r0_iov_), 0); + if (rc != (int) r_len) + perror_msg_and_fail("preadv2: expected %u, returned %ld", + r_len, rc); + tprintf("preadv2(0, [{iov_base=\"%s\", iov_len=%u}], %u, 0, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + rc = pr(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); + if (rc != (int) w_len - (int) r_len) + perror_msg_and_fail("preadv2: expected %d, returned %ld", + (int) w_len - r_len, rc); + tprintf("preadv2(0, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"\", iov_len=%u}], %u, %u, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), + r_len, w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); +} + +int +main(void) +{ + const kernel_ulong_t vlen = (kernel_ulong_t) 0xfac1fed2dad3bef4ULL; + const unsigned long long pos = 0xfac5fed6dad7bef8; + const kernel_ulong_t pos_l = (kernel_ulong_t) pos; + const kernel_ulong_t pos_h = + (sizeof(kernel_ulong_t) == sizeof(long long)) ? + (kernel_ulong_t) 0xbadc0deddeadbeefULL : 0xfac5fed6UL; + int test_dumpio = 1; + + tprintf("%s", ""); + + syscall(__NR_preadv2, -1, NULL, vlen, pos_l, pos_h, 1); + if (ENOSYS == errno) + test_dumpio = 0; + tprintf("preadv2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n", + (unsigned long) vlen, pos, errno2name()); + + syscall(__NR_pwritev2, -1, NULL, vlen, pos_l, pos_h, 1); + if (ENOSYS == errno) + test_dumpio = 0; + tprintf("pwritev2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n", + (unsigned long) vlen, pos, errno2name()); + + if (test_dumpio) + dumpio(); + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_preadv2 && __NR_pwritev2") + +#endif diff --git a/tests-mx32/preadv2-pwritev2.test b/tests-mx32/preadv2-pwritev2.test new file mode 100755 index 000000000..5641ef46a --- /dev/null +++ b/tests-mx32/preadv2-pwritev2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding and dumping of preadv2 and pwritev2 syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -eread=0 -ewrite=1 -e trace=preadv2,pwritev2 diff --git a/tests-mx32/print_maxfd.c b/tests-mx32/print_maxfd.c new file mode 100644 index 000000000..c3d4ea88c --- /dev/null +++ b/tests-mx32/print_maxfd.c @@ -0,0 +1,41 @@ +/* + * Print the maximum descriptor number available. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + int fds[2]; + pipe_maxfd(fds); + printf("%d\n", fds[1]); + return 0; +} diff --git a/tests-mx32/print_quoted_string.c b/tests-mx32/print_quoted_string.c new file mode 100644 index 000000000..3ad86024c --- /dev/null +++ b/tests-mx32/print_quoted_string.c @@ -0,0 +1,75 @@ +#include "tests.h" + +#include +#include +#include + +/* + * Based on string_quote() from util.c. + * Assumes instr is NUL-terminated. + */ + +void +print_quoted_string(const char *instr) +{ + print_quoted_memory(instr, strlen(instr)); +} + +void +print_quoted_memory(const char *instr, const size_t len) +{ + const unsigned char *str = (const unsigned char*) instr; + size_t i; + + for (i = 0; i < len; ++i) { + const int c = str[i]; + switch (c) { + case '\"': + printf("\\\""); + break; + case '\\': + printf("\\\\"); + break; + case '\f': + printf("\\f"); + break; + case '\n': + printf("\\n"); + break; + case '\r': + printf("\\r"); + break; + case '\t': + printf("\\t"); + break; + case '\v': + printf("\\v"); + break; + default: + if (c >= ' ' && c <= 0x7e) + putchar(c); + else { + putchar('\\'); + + char c1 = '0' + (c & 0x7); + char c2 = '0' + ((c >> 3) & 0x7); + char c3 = '0' + (c >> 6); + + if (*str >= '0' && *str <= '9') { + /* Print \octal */ + putchar(c3); + putchar(c2); + } else { + /* Print \[[o]o]o */ + if (c3 != '0') + putchar(c3); + if (c3 != '0' || c2 != '0') + putchar(c2); + } + putchar(c1); + } + break; + } + } + +} diff --git a/tests-mx32/printflags.c b/tests-mx32/printflags.c new file mode 100644 index 000000000..badc85d3e --- /dev/null +++ b/tests-mx32/printflags.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "xlat.h" +#include + +int +printflags(const struct xlat *xlat, unsigned long long flags, + const char *const dflt) +{ + if (flags == 0 && xlat->val == 0 && xlat->str) { + fputs(xlat->str, stdout); + return 1; + } + + int n; + char sep = 0; + for (n = 0; xlat->str; xlat++) { + if (xlat->val && (flags & xlat->val) == xlat->val) { + if (sep) + putc(sep, stdout); + else + sep = '|'; + fputs(xlat->str, stdout); + flags &= ~xlat->val; + n++; + } + } + + if (n) { + if (flags) { + if (sep) + putc(sep, stdout); + printf("%#llx", flags); + n++; + } + } else { + if (flags) { + printf("%#llx", flags); + if (dflt) + printf(" /* %s */", dflt); + } else { + if (dflt) + putc('0', stdout); + } + } + + return n; +} diff --git a/tests-mx32/printstr.c b/tests-mx32/printstr.c new file mode 100644 index 000000000..330234f10 --- /dev/null +++ b/tests-mx32/printstr.c @@ -0,0 +1,69 @@ +/* + * Check decoding of non-NUL-terminated strings when len == -1. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +#define DEFAULT_STRLEN 32 + +int +main(void) +{ + char *const buf = tail_alloc(DEFAULT_STRLEN + 1); + const struct iovec io = { + .iov_base = buf, + .iov_len = -1 + }; + int rc; + + buf[0] = 0; + + tprintf("%s", ""); + + memset(buf + 1, 'X', DEFAULT_STRLEN); + buf[DEFAULT_STRLEN - 1] = 0; + + rc = writev(-1, &io, 1); + tprintf("writev(-1, [{iov_base=\"\\0%*s\\0\"..., iov_len=%lu}], 1)" + " = %s\n", DEFAULT_STRLEN - 2, buf + 1, -1UL, sprintrc(rc)); + + buf[DEFAULT_STRLEN - 1] = 'X'; + buf[DEFAULT_STRLEN] = 0; + + rc = writev(-1, &io, 1); + tprintf("writev(-1, [{iov_base=\"\\0%*s\"..., iov_len=%lu}], 1)" + " = %s\n", DEFAULT_STRLEN - 1, buf + 1, -1UL, sprintrc(rc)); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests-mx32/printstr.test b/tests-mx32/printstr.test new file mode 100755 index 000000000..5f164eb7e --- /dev/null +++ b/tests-mx32/printstr.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of non-NUL-terminated strings when len == -1. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -e trace=writev diff --git a/tests-mx32/printxval.c b/tests-mx32/printxval.c new file mode 100644 index 000000000..4fb61c846 --- /dev/null +++ b/tests-mx32/printxval.c @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1991, 1992 Paul Kranenburg + * Copyright (c) 1993 Branko Lankester + * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey + * Copyright (c) 1996-1999 Wichert Akkerman + * Copyright (c) 2005-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include "xlat.h" +#include + +int +printxval(const struct xlat *xlat, unsigned long long val, + const char *const dflt) +{ + for (; xlat->str; xlat++) { + if (xlat->val == val) { + fputs(xlat->str, stdout); + return 1; + } + } + + printf("%#llx", val); + if (dflt) + printf(" /* %s */", dflt); + return 0; +} diff --git a/tests-mx32/prlimit64.c b/tests-mx32/prlimit64.c new file mode 100644 index 000000000..1e6511610 --- /dev/null +++ b/tests-mx32/prlimit64.c @@ -0,0 +1,92 @@ +/* + * Check decoding of prlimit64 syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_prlimit64 + +# include +# include +# include +# include +# include + +# include "xlat.h" +# include "xlat/resources.h" + +const char * +sprint_rlim(uint64_t lim) +{ + if (lim == -1ULL) + return "RLIM64_INFINITY"; + + static char buf[2][sizeof(lim)*3 + sizeof("*1024")]; + static int i; + i &= 1; + if (lim > 1024 && lim % 1024 == 0) + sprintf(buf[i], "%" PRIu64 "*1024", lim / 1024); + else + sprintf(buf[i], "%" PRIu64, lim); + + return buf[i++]; +} + +int +main(void) +{ + unsigned long pid = + (unsigned long) 0xdefaced00000000ULL | (unsigned) getpid(); + uint64_t *const rlimit = tail_alloc(sizeof(*rlimit) * 2); + const struct xlat *xlat; + + for (xlat = resources; xlat->str; ++xlat) { + unsigned long res = 0xfacefeed00000000ULL | xlat->val; + long rc = syscall(__NR_prlimit64, pid, res, 0, rlimit); + if (rc) + printf("prlimit64(%d, %s, NULL, %p) = %ld %s (%m)\n", + (unsigned) pid, xlat->str, rlimit, + rc, errno2name()); + else + printf("prlimit64(%d, %s, NULL" + ", {rlim_cur=%s, rlim_max=%s}) = 0\n", + (unsigned) pid, xlat->str, + sprint_rlim(rlimit[0]), + sprint_rlim(rlimit[1])); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prlimit64") + +#endif diff --git a/tests-mx32/prlimit64.test b/tests-mx32/prlimit64.test new file mode 100755 index 000000000..2d2240d73 --- /dev/null +++ b/tests-mx32/prlimit64.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of prlimit64 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/process_vm_readv.c b/tests-mx32/process_vm_readv.c new file mode 100644 index 000000000..cfb8f7861 --- /dev/null +++ b/tests-mx32/process_vm_readv.c @@ -0,0 +1,18 @@ +#include "tests.h" + +#include + +#ifdef __NR_process_vm_readv + +# define OP process_vm_readv +# define OP_NR __NR_process_vm_readv +# define OP_STR "process_vm_readv" +# define OP_WR 0 + +# include "process_vm_readv_writev.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_process_vm_readv"); + +#endif diff --git a/tests-mx32/process_vm_readv.test b/tests-mx32/process_vm_readv.test new file mode 100755 index 000000000..c092f5a39 --- /dev/null +++ b/tests-mx32/process_vm_readv.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of process_vm_readv syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s5 -a37 diff --git a/tests-mx32/process_vm_readv_writev.c b/tests-mx32/process_vm_readv_writev.c new file mode 100644 index 000000000..2a089395a --- /dev/null +++ b/tests-mx32/process_vm_readv_writev.c @@ -0,0 +1,306 @@ +/* + * Check decoding of process_vm_readv/process_vm_writev syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include + +#if OP_WR +# define in_iovec rmt_iovec +# define out_iovec lcl_iovec +# define in_iov rmt_iov +# define out_iov lcl_iov +#else +# define in_iovec lcl_iovec +# define out_iovec rmt_iovec +# define in_iov lcl_iov +# define out_iov rmt_iov +#endif + +typedef void (*iov_print_fn)(const struct iovec *, const void *, long); + +enum { MAX_SEGM_COUNT = 2, MAX_STR_LEN = 5 }; + +struct print_iov_arg { + uint32_t count; + uint32_t valid :1, + string :1, + addr_term:1, + check_rc :1; + uint32_t str_segms; + uint8_t str_base[MAX_SEGM_COUNT]; + uint8_t str_size[MAX_SEGM_COUNT]; +}; + +static void +print_iov(const struct iovec *iov, const void *arg_ptr, long rc) +{ + const struct print_iov_arg *arg = arg_ptr; + uint32_t i; + uint32_t num_segm = 0; + uint64_t segm_offs = 0; + + if (!arg || !arg->valid) { + if (iov) + printf("%p", iov); + else + printf("NULL"); + + return; + } + + printf("["); + + for (i = 0; i < arg->count; i++) { + if (i) + printf(", "); + + if (i >= MAX_STR_LEN) { + printf("..."); + break; + } + + printf("{iov_base="); + if (arg->string && (!arg->check_rc || (rc != -1))) { + uint64_t str_left = iov[i].iov_len; + uint64_t pr_count = 0; + + printf("\""); + + while (str_left--) { + static const char oct_str[] = "01234567"; + uint8_t c = arg->str_base[num_segm] + segm_offs; + + if ((num_segm >= arg->str_segms) || + (num_segm >= MAX_SEGM_COUNT)) + error_msg_and_fail("print_iov: segment " + "count overrun"); + + if (pr_count++ < MAX_STR_LEN) + printf("\\%.1s%.1s%d", + (c >> 6) ? + oct_str + (c >> 6) : "", + (c >> 3) ? + oct_str + ((c >> 3) & 7) : "", + c & 7); + + segm_offs++; + + if (segm_offs >= arg->str_size[num_segm]) { + num_segm++; + segm_offs = 0; + } + } + + printf("\""); + + if (pr_count > MAX_STR_LEN) + printf("..."); + } else { + if (iov[i].iov_base) + printf("%p", iov[i].iov_base); + else + printf("NULL"); + } + + printf(", iov_len=%zu}", iov[i].iov_len); + } + + if (arg->addr_term) + printf(", %p", iov + arg->count); + + printf("]"); +} + +static void +do_call(kernel_ulong_t pid, + kernel_ulong_t local_iov, const char *local_arg, + kernel_ulong_t liovcnt, + kernel_ulong_t remote_iov, const char *remote_arg, + kernel_ulong_t riovcnt, + kernel_ulong_t flags, iov_print_fn pr_iov) +{ + long rc; + const char *errstr; + + rc = syscall(OP_NR, pid, local_iov, liovcnt, remote_iov, riovcnt, + flags); + errstr = sprintrc(rc); + + printf("%s(%d, ", OP_STR, (int) pid); + + if (pr_iov) + pr_iov((const struct iovec *) (uintptr_t) local_iov, local_arg, + rc); + else + printf("%s", local_arg); + + printf(", %lu, ", (unsigned long) liovcnt); + + if (pr_iov) + pr_iov((const struct iovec *) (uintptr_t) remote_iov, + remote_arg, rc); + else + printf("%s", remote_arg); + + printf(", %lu, %lu) = %s\n", (unsigned long) riovcnt, + (unsigned long) flags, errstr); +} + +kernel_ulong_t +ptr_cast(void *ptr) +{ + return (kernel_ulong_t) (uintptr_t) ptr; +} + +int +main(void) +{ + enum { + SIZE_11 = 2, + SIZE_12 = 3, + SIZE_13 = 4, + SIZE_1 = SIZE_11 + SIZE_12 + SIZE_13, + SIZE_21 = 5, + SIZE_22 = 6, + SIZE_23 = 7, + SIZE_2 = SIZE_21 + SIZE_22 + SIZE_23, + }; + + enum { + SEGM1_BASE = 0x80, + SEGM2_BASE = 0xA0, + }; + + static const kernel_ulong_t bogus_pid = + (kernel_ulong_t) 0xbadfaceddeadca57ULL; + static const kernel_ulong_t bogus_iovcnt1 = + (kernel_ulong_t) 0xdec0ded1defaced2ULL; + static const kernel_ulong_t bogus_iovcnt2 = + (kernel_ulong_t) 0xdec0ded3defaced4ULL; + static const kernel_ulong_t bogus_flags = + (kernel_ulong_t) 0xdeadc0deda7adeadULL; + + pid_t my_pid = getpid(); + char *data1_out = tail_alloc(SIZE_1); + char *data2_out = tail_alloc(SIZE_2); + char *data1_in = tail_alloc(SIZE_2); + char *data2_in = tail_alloc(SIZE_1); + + struct iovec bogus_iovec[] = { + { data1_out + SIZE_1, (size_t) 0xdeadfaceca57beefULL }, + { data1_in + SIZE_2, (size_t) 0xbadc0dedda7adeadULL }, + { data2_out + SIZE_2, (size_t) 0xf157facedec0ded1ULL }, + { data2_in + SIZE_1, (size_t) 0xdefaced2bea7be57ULL }, + }; + + struct iovec out_iovec[] = { + { data1_out, SIZE_11 }, + { data1_out + SIZE_11, SIZE_12 }, + { data1_out + SIZE_11 + SIZE_12, SIZE_13 }, + { data2_out, SIZE_21 }, + { data2_out + SIZE_21, SIZE_22 }, + { data2_out + SIZE_21 + SIZE_22, SIZE_23 }, + }; + struct iovec in_iovec[] = { + { data1_in, SIZE_23 }, + { data1_in + SIZE_23, SIZE_22 }, + { data1_in + SIZE_23 + SIZE_22, SIZE_21 }, + { data2_in, SIZE_13 }, + { data2_in + SIZE_13, SIZE_12 }, + { data2_in + SIZE_13 + SIZE_12, SIZE_11 }, + }; + + struct iovec *bogus_iov = tail_memdup(bogus_iovec, sizeof(bogus_iovec)); + struct iovec *lcl_iov = tail_memdup(lcl_iovec, sizeof(lcl_iovec)); + struct iovec *rmt_iov = tail_memdup(rmt_iovec, sizeof(rmt_iovec)); + + struct print_iov_arg bogus_arg = { ARRAY_SIZE(bogus_iovec), 1 }; + struct print_iov_arg lcl_arg = { ARRAY_SIZE(lcl_iovec), 1, 1, 0, 0, + 2, {SEGM1_BASE, SEGM2_BASE}, {SIZE_1, SIZE_2} }; + struct print_iov_arg rmt_arg = { ARRAY_SIZE(rmt_iovec), 1 }; + + struct print_iov_arg bogus_arg_cut = + { ARRAY_SIZE(bogus_iovec) - 2, 1, 0, 1 }; + struct print_iov_arg lcl_arg_cut = + { ARRAY_SIZE(lcl_iovec) - 2, 1, 1, 1, 0, 2, + {SEGM1_BASE + SIZE_11 + SIZE_12, SEGM2_BASE}, + {SIZE_13, SIZE_2} }; + struct print_iov_arg rmt_arg_cut = + { ARRAY_SIZE(rmt_iovec) - 2, 1 }; + + + fill_memory_ex(data1_out, SIZE_1, SEGM1_BASE, SIZE_1); + fill_memory_ex(data2_out, SIZE_2, SEGM2_BASE, SIZE_2); + + + do_call(bogus_pid, (kernel_ulong_t) (uintptr_t) ARG_STR(NULL), + bogus_iovcnt1, (kernel_ulong_t) (uintptr_t) ARG_STR(NULL), + bogus_iovcnt2, bogus_flags, NULL); + + do_call(my_pid, ptr_cast(bogus_iov + ARRAY_SIZE(bogus_iovec)), + "[]", 0, ptr_cast(in_iov + ARRAY_SIZE(in_iovec)), "[]", + 0, 0, NULL); + do_call(my_pid, ptr_cast(bogus_iov + ARRAY_SIZE(bogus_iovec)), NULL, + bogus_iovcnt1, ptr_cast(in_iov + ARRAY_SIZE(in_iovec)), NULL, + bogus_iovcnt2, 0, print_iov); + + do_call(my_pid, ptr_cast(bogus_iov), (char *) &bogus_arg, + ARRAY_SIZE(bogus_iovec), ptr_cast(rmt_iov + 2), + (char *) &rmt_arg_cut, ARRAY_SIZE(rmt_iovec) - 2, 0, print_iov); + +#if !OP_WR + lcl_arg.check_rc = 1; + lcl_arg_cut.check_rc = 1; +#endif + + do_call(my_pid, ptr_cast(lcl_iov + 2), (char *) &lcl_arg_cut, + ARRAY_SIZE(lcl_iovec) - 1, ptr_cast(bogus_iov + 2), + (char *) &bogus_arg_cut, ARRAY_SIZE(bogus_iovec) - 1, 0, + print_iov); + + lcl_arg_cut.addr_term = 0; + + rmt_arg_cut.addr_term = 1; + rmt_arg_cut.count = 5; + + do_call(my_pid, ptr_cast(lcl_iov + 2), (char *) &lcl_arg_cut, + ARRAY_SIZE(lcl_iovec) - 2, ptr_cast(rmt_iov + 1), + (char *) &rmt_arg_cut, ARRAY_SIZE(rmt_iovec), 0, print_iov); + + /* Correct call */ + do_call(my_pid, ptr_cast(lcl_iov), (char *) &lcl_arg, + ARRAY_SIZE(lcl_iovec), ptr_cast(rmt_iov), (char *) &rmt_arg, + ARRAY_SIZE(rmt_iovec), 0, print_iov); + + puts("+++ exited with 0 +++"); + + return 0; +} diff --git a/tests-mx32/process_vm_writev.c b/tests-mx32/process_vm_writev.c new file mode 100644 index 000000000..6271c01bc --- /dev/null +++ b/tests-mx32/process_vm_writev.c @@ -0,0 +1,18 @@ +#include "tests.h" + +#include + +#ifdef __NR_process_vm_writev + +# define OP process_vm_writev +# define OP_NR __NR_process_vm_writev +# define OP_STR "process_vm_writev" +# define OP_WR 1 + +# include "process_vm_readv_writev.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_process_vm_writev"); + +#endif diff --git a/tests-mx32/process_vm_writev.test b/tests-mx32/process_vm_writev.test new file mode 100755 index 000000000..f690e6a96 --- /dev/null +++ b/tests-mx32/process_vm_writev.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of process_vm_writev syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s5 -a38 diff --git a/tests-mx32/pselect6.c b/tests-mx32/pselect6.c new file mode 100644 index 000000000..f26448531 --- /dev/null +++ b/tests-mx32/pselect6.c @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Based on test by Dr. David Alan Gilbert + */ + +#include "tests.h" +#include "nsig.h" +#include +#include +#include +#include +#include +#include + +#ifdef __NR_pselect6 + +static fd_set set[3][0x1000000 / sizeof(fd_set)]; + +static void +handler(int signo) +{ +} + +int main(int ac, char **av) +{ + int fds[2]; + struct { + struct timespec ts; + int pad[2]; + } tm_in = { + .ts = { .tv_sec = 0xc0de1, .tv_nsec = 0xc0de2 }, + .pad = { 0xdeadbeef, 0xbadc0ded } + }, tm = tm_in; + sigset_t mask; + const struct sigaction act = { .sa_handler = handler }; + const struct itimerval itv = { .it_value.tv_usec = 111111 }; + + sigemptyset(&mask); + sigaddset(&mask, SIGHUP); + sigaddset(&mask, SIGCHLD); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + /* + * Start with a nice simple pselect. + */ + FD_SET(fds[0], set[0]); + FD_SET(fds[1], set[0]); + FD_SET(fds[0], set[1]); + FD_SET(fds[1], set[1]); + FD_SET(1, set[2]); + FD_SET(2, set[2]); + int rc = pselect(fds[1] + 1, set[0], set[1], set[2], NULL, NULL); + if (rc < 0) + perror_msg_and_skip("pselect"); + assert(rc == 1); + printf("pselect6(%d, [%d %d], [%d %d], [1 2], NULL, {NULL, %u}) " + "= 1 (out [%d])\n", + fds[1] + 1, fds[0], fds[1], + fds[0], fds[1], + NSIG_BYTES, fds[1]); + + /* + * Another simple one, with a timeout. + */ + FD_SET(1, set[1]); + FD_SET(2, set[1]); + FD_SET(fds[0], set[1]); + FD_SET(fds[1], set[1]); + assert(syscall(__NR_pselect6, fds[1] + 1, NULL, set[1], NULL, &tm.ts, NULL) == 3); + printf("pselect6(%d, NULL, [1 2 %d %d], NULL, " + "{tv_sec=%lld, tv_nsec=%lld}, NULL) = 3 (out [1 2 %d], left " + "{tv_sec=%lld, tv_nsec=%lld})\n", + fds[1] + 1, fds[0], fds[1], + (long long) tm_in.ts.tv_sec, (long long) tm_in.ts.tv_nsec, + fds[1], + (long long) tm.ts.tv_sec, (long long) tm.ts.tv_nsec); + + /* + * Now the crash case that trinity found, negative nfds + * but with a pointer to a large chunk of valid memory. + */ + FD_ZERO(set[0]); + FD_SET(fds[1],set[0]); + assert(pselect(-1, NULL, set[0], NULL, NULL, &mask) == -1); + printf("pselect6(-1, NULL, %p, NULL, NULL, {[HUP CHLD], %u}) " + "= -1 EINVAL (%m)\n", set[0], NSIG_BYTES); + + /* + * Another variant, with nfds exceeding FD_SETSIZE limit. + */ + FD_ZERO(set[0]); + FD_SET(fds[0],set[0]); + FD_ZERO(set[1]); + tm.ts.tv_sec = 0; + tm.ts.tv_nsec = 123; + assert(pselect(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) == 0); + printf("pselect6(%d, [%d], [], NULL, {tv_sec=0, tv_nsec=123}, " + "{[HUP CHLD], %u}) = 0 (Timeout)\n", + FD_SETSIZE + 1, fds[0], NSIG_BYTES); + + /* + * See how timeouts are decoded. + */ + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(setitimer(ITIMER_REAL, &itv, NULL) == 0); + + tm.ts.tv_nsec = 222222222; + assert(pselect(0, NULL, NULL, NULL, &tm.ts, &mask) == -1); + printf("pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=222222222}, " + "{[HUP CHLD], %u}) = " + "? ERESTARTNOHAND (To be restarted if no handler)\n", + NSIG_BYTES); + puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pselect6") + +#endif diff --git a/tests-mx32/pselect6.test b/tests-mx32/pselect6.test new file mode 100755 index 000000000..203f8e249 --- /dev/null +++ b/tests-mx32/pselect6.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check pselect6 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/ptrace.c b/tests-mx32/ptrace.c new file mode 100644 index 000000000..80ce8cbb2 --- /dev/null +++ b/tests-mx32/ptrace.c @@ -0,0 +1,455 @@ +/* + * Check decoding of ptrace syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigprocmask + +# include +# include +# include +# include +# include +# include +# include "ptrace.h" +# include + +static const char *errstr; + +static long +do_ptrace(unsigned long request, unsigned long pid, + unsigned long addr, unsigned long data) +{ + long rc = syscall(__NR_ptrace, request, pid, addr, data); + errstr = sprintrc(rc); + return rc; +} + +static void +test_peeksiginfo(unsigned long pid, const unsigned long bad_request) +{ + do_ptrace(PTRACE_PEEKSIGINFO, pid, 0, bad_request); + printf("ptrace(PTRACE_PEEKSIGINFO, %u, NULL, %#lx) = %s\n", + (unsigned) pid, bad_request, errstr); + + struct { + unsigned long long off; + unsigned int flags, nr; + } *const psi = tail_alloc(sizeof(*psi)); + + psi->off = 0xdeadbeeffacefeedULL; + psi->flags = 1; + psi->nr = 42; + + do_ptrace(PTRACE_PEEKSIGINFO, pid, (unsigned long) psi, bad_request); + printf("ptrace(PTRACE_PEEKSIGINFO, %u, {off=%llu" + ", flags=PTRACE_PEEKSIGINFO_SHARED, nr=%u}, %#lx) = %s\n", + (unsigned) pid, psi->off, psi->nr, bad_request, errstr); + + pid = fork(); + if ((pid_t) pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + sigaddset(&mask, SIGUSR2); + sigaddset(&mask, SIGALRM); + + if (sigprocmask(SIG_BLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + raise(SIGUSR1); + raise(SIGUSR2); + raise(SIGALRM); + + if (do_ptrace(PTRACE_TRACEME, 0, 0, 0)) + perror_msg_and_fail("child: PTRACE_TRACEME"); + + raise(SIGSTOP); + _exit(0); + } + + const unsigned int nsigs = 4; + const uid_t uid = geteuid(); + siginfo_t *sigs = tail_alloc(sizeof(*sigs) * nsigs); + + psi->off = 0; + psi->flags = 0; + psi->nr = nsigs; + + for (;;) { + int status, tracee, saved; + + errno = 0; + tracee = wait(&status); + if (tracee <= 0) { + if (errno == EINTR) + continue; + saved = errno; + kill (pid, SIGKILL); + errno = saved; + perror_msg_and_fail("wait"); + } + if (WIFEXITED(status)) { + if (WEXITSTATUS(status) == 0) + break; + error_msg_and_fail("unexpected exit status %u", + WEXITSTATUS(status)); + } + if (WIFSIGNALED(status)) + error_msg_and_fail("unexpected signal %u", + WTERMSIG(status)); + if (!WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP) { + kill(pid, SIGKILL); + error_msg_and_fail("unexpected wait status %x", + status); + } + + long rc = do_ptrace(PTRACE_PEEKSIGINFO, pid, + (unsigned long) psi, (unsigned long) sigs); + if (rc < 0) { + printf("ptrace(PTRACE_PEEKSIGINFO, %u" + ", {off=%llu, flags=0, nr=%u}, %p) = %s\n", + (unsigned) pid, psi->off, psi->nr, sigs, + errstr); + } else { + printf("ptrace(PTRACE_PEEKSIGINFO, %u" + ", {off=%llu, flags=0, nr=%u}" + ", [{si_signo=SIGUSR1, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + ", {si_signo=SIGUSR2, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + ", {si_signo=SIGALRM, si_code=SI_TKILL" + ", si_pid=%u, si_uid=%u}" + "]) = %s\n", + (unsigned) pid, psi->off, psi->nr, + (unsigned) pid, (unsigned) uid, + (unsigned) pid, (unsigned) uid, + (unsigned) pid, (unsigned) uid, + errstr); + } + + if (do_ptrace(PTRACE_CONT, pid, 0, 0)) { + saved = errno; + kill (pid, SIGKILL); + errno = saved; + perror_msg_and_fail("ptrace"); + } + printf("ptrace(PTRACE_CONT, %ld, NULL, SIG_0) = 0\n", pid); + } +} + +int +main(void) +{ + const unsigned long bad_request = + (unsigned long) 0xdeadbeeffffffeedULL; + const unsigned long bad_data = + (unsigned long) 0xdeadcafefffff00dULL; + const unsigned long pid = + (unsigned long) 0xdefaced00000000ULL | (unsigned) getpid(); + + unsigned int sigset_size; + + for (sigset_size = 1024 / 8; sigset_size; sigset_size >>= 1) { + if (!syscall(__NR_rt_sigprocmask, + SIG_SETMASK, NULL, NULL, sigset_size)) + break; + } + if (!sigset_size) + perror_msg_and_fail("rt_sigprocmask"); + + void *const k_set = tail_alloc(sigset_size); + siginfo_t *const sip = tail_alloc(sizeof(*sip)); + + do_ptrace(bad_request, pid, 0, 0); + printf("ptrace(%#lx /* PTRACE_??? */, %u, NULL, NULL) = %s\n", + bad_request, (unsigned) pid, errstr); + + do_ptrace(PTRACE_PEEKDATA, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKDATA, %u, %#lx) = %s\n", + (unsigned) pid, bad_request, errstr); +# else + printf("ptrace(PTRACE_PEEKDATA, %u, %#lx, %#lx) = %s\n", + (unsigned) pid, bad_request, bad_data, errstr); +#endif + + do_ptrace(PTRACE_PEEKTEXT, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKTEXT, %u, %#lx) = %s\n", + (unsigned) pid, bad_request, errstr); +# else + printf("ptrace(PTRACE_PEEKTEXT, %u, %#lx, %#lx) = %s\n", + (unsigned) pid, bad_request, bad_data, errstr); +#endif + + do_ptrace(PTRACE_PEEKUSER, pid, bad_request, bad_data); +# ifdef IA64 + printf("ptrace(PTRACE_PEEKUSER, %u, %#lx) = %s\n", + (unsigned) pid, bad_request, errstr); +# else + printf("ptrace(PTRACE_PEEKUSER, %u, %#lx, %#lx) = %s\n", + (unsigned) pid, bad_request, bad_data, errstr); +#endif + + do_ptrace(PTRACE_POKEUSER, pid, bad_request, bad_data); + printf("ptrace(PTRACE_POKEUSER, %u, %#lx, %#lx) = %s\n", + (unsigned) pid, bad_request, bad_data, errstr); + + do_ptrace(PTRACE_ATTACH, pid, 0, 0); + printf("ptrace(PTRACE_ATTACH, %u) = %s\n", (unsigned) pid, errstr); + + do_ptrace(PTRACE_INTERRUPT, pid, 0, 0); + printf("ptrace(PTRACE_INTERRUPT, %u) = %s\n", (unsigned) pid, errstr); + + do_ptrace(PTRACE_KILL, pid, 0, 0); + printf("ptrace(PTRACE_KILL, %u) = %s\n", (unsigned) pid, errstr); + + do_ptrace(PTRACE_LISTEN, pid, 0, 0); + printf("ptrace(PTRACE_LISTEN, %u) = %s\n", (unsigned) pid, errstr); + + sigset_t libc_set; + sigemptyset(&libc_set); + sigaddset(&libc_set, SIGUSR1); + memcpy(k_set, &libc_set, sigset_size); + + do_ptrace(PTRACE_SETSIGMASK, pid, sigset_size, (unsigned long) k_set); + printf("ptrace(PTRACE_SETSIGMASK, %u, %u, [USR1]) = %s\n", + (unsigned) pid, sigset_size, errstr); + + do_ptrace(PTRACE_GETSIGMASK, pid, sigset_size, (unsigned long) k_set); + printf("ptrace(PTRACE_GETSIGMASK, %u, %u, %p) = %s\n", + (unsigned) pid, sigset_size, k_set, errstr); + + do_ptrace(PTRACE_SECCOMP_GET_FILTER, pid, 42, 0); + printf("ptrace(PTRACE_SECCOMP_GET_FILTER, %u, 42, NULL) = %s\n", + (unsigned) pid, errstr); + + do_ptrace(PTRACE_GETEVENTMSG, pid, bad_request, bad_data); + printf("ptrace(PTRACE_GETEVENTMSG, %u, %#lx, %#lx) = %s\n", + (unsigned) pid, bad_request, bad_data, errstr); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGIO; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_band = -2; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGIO" + ", si_code=POLL_IN, si_errno=ENOENT, si_band=-2}) = %s\n", + (unsigned) pid, bad_request, errstr); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGTRAP; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_pid = 2; + sip->si_uid = 3; + sip->si_ptr = (void *) bad_request; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGTRAP" + ", si_code=TRAP_BRKPT, si_errno=ENOENT, si_pid=2, si_uid=3" + ", si_value={int=%d, ptr=%p}}) = %s\n", + (unsigned) pid, bad_request, sip->si_int, sip->si_ptr, + errstr); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGILL; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeefULL; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGILL" + ", si_code=ILL_ILLOPC, si_errno=ENOENT, si_addr=%p}) = %s\n", + (unsigned) pid, bad_request, sip->si_addr, errstr); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGFPE; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeefULL; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGFPE" + ", si_code=FPE_INTDIV, si_errno=ENOENT, si_addr=%p}) = %s\n", + (unsigned) pid, bad_request, sip->si_addr, errstr); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGBUS; + sip->si_code = 1; + sip->si_errno = -2; + sip->si_addr = (void *) (unsigned long) 0xfacefeeddeadbeefULL; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGBUS" + ", si_code=BUS_ADRALN, si_errno=%d, si_addr=%p}) = %s\n", + (unsigned) pid, bad_request, sip->si_errno, sip->si_addr, + errstr); + + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGPROF; + sip->si_code = 0xbadc0ded; + sip->si_errno = -2; + sip->si_pid = 0; + sip->si_uid = 3; + sip->si_ptr = 0; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGPROF" + ", si_code=%#x, si_errno=%d, si_pid=0, si_uid=3}) = %s\n", + (unsigned) pid, bad_request, sip->si_code, sip->si_errno, + errstr); + +#ifdef HAVE_SIGINFO_T_SI_SYSCALL + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGSYS; + sip->si_code = 1; + sip->si_errno = ENOENT; + sip->si_call_addr = (void *) (unsigned long) 0xfacefeeddeadbeefULL; + sip->si_syscall = -1U; + sip->si_arch = AUDIT_ARCH_X86_64; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGSYS" + ", si_code=SYS_SECCOMP, si_errno=ENOENT, si_call_addr=%p" + ", si_syscall=%u, si_arch=AUDIT_ARCH_X86_64})" + " = %s\n", + (unsigned) pid, bad_request, sip->si_call_addr, sip->si_syscall, + errstr); + + sip->si_errno = 3141592653U; + sip->si_call_addr = NULL; + sip->si_syscall = __NR_read; + sip->si_arch = 0xda7a1057; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGSYS" + ", si_code=SYS_SECCOMP, si_errno=%d, si_call_addr=NULL" + ", si_syscall=__NR_read, si_arch=%#x /* AUDIT_ARCH_??? */})" + " = %s\n", + (unsigned) pid, bad_request, sip->si_errno, sip->si_arch, + errstr); +#endif + +#if defined HAVE_SIGINFO_T_SI_TIMERID && defined HAVE_SIGINFO_T_SI_OVERRUN + memset(sip, -1, sizeof(*sip)); + sip->si_signo = SIGHUP; + sip->si_code = SI_TIMER; + sip->si_errno = ENOENT; + sip->si_timerid = 0xdeadbeef; + sip->si_overrun = -1; + sip->si_ptr = (void *) (unsigned long) 0xfacefeeddeadbeefULL; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGHUP" + ", si_code=SI_TIMER, si_errno=ENOENT, si_timerid=%#x" + ", si_overrun=%d, si_value={int=%d, ptr=%p}}) = %s\n", + (unsigned) pid, bad_request, sip->si_timerid, sip->si_overrun, + sip->si_int, sip->si_ptr, errstr); +#endif + + do_ptrace(PTRACE_GETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_GETSIGINFO, %u, %#lx, %p)" + " = %s\n", (unsigned) pid, bad_request, sip, errstr); + + do_ptrace(PTRACE_CONT, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_CONT, %u, NULL, SIGUSR1) = %s\n", + (unsigned) pid, errstr); + + do_ptrace(PTRACE_DETACH, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_DETACH, %u, NULL, SIGUSR2) = %s\n", + (unsigned) pid, errstr); + + do_ptrace(PTRACE_SYSCALL, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SYSCALL, %u, NULL, SIGUSR1) = %s\n", + (unsigned) pid, errstr); + +#ifdef PTRACE_SINGLESTEP + do_ptrace(PTRACE_SINGLESTEP, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_SINGLESTEP, %u, NULL, SIGUSR2) = %s\n", + (unsigned) pid, errstr); +#endif + +#ifdef PTRACE_SINGLEBLOCK + do_ptrace(PTRACE_SINGLEBLOCK, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SINGLEBLOCK, %u, NULL, SIGUSR1) = %s\n", + (unsigned) pid, errstr); +#endif + +#ifdef PTRACE_SYSEMU + do_ptrace(PTRACE_SYSEMU, pid, 0, SIGUSR2); + printf("ptrace(PTRACE_SYSEMU, %u, NULL, SIGUSR2) = %s\n", + (unsigned) pid, errstr); +#endif +#ifdef PTRACE_SYSEMU_SINGLESTEP + do_ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, SIGUSR1); + printf("ptrace(PTRACE_SYSEMU_SINGLESTEP, %u, NULL, SIGUSR1) = %s\n", + (unsigned) pid, errstr); +#endif + + do_ptrace(PTRACE_SETOPTIONS, + pid, 0, PTRACE_O_TRACEFORK|PTRACE_O_TRACECLONE); + printf("ptrace(PTRACE_SETOPTIONS, %u, NULL" + ", PTRACE_O_TRACEFORK|PTRACE_O_TRACECLONE) = %s\n", + (unsigned) pid, errstr); + + do_ptrace(PTRACE_SEIZE, pid, bad_request, PTRACE_O_TRACESYSGOOD); + printf("ptrace(PTRACE_SEIZE, %u, %#lx, PTRACE_O_TRACESYSGOOD) = %s\n", + (unsigned) pid, bad_request, errstr); + + do_ptrace(PTRACE_SETREGSET, pid, 1, bad_request); + printf("ptrace(PTRACE_SETREGSET, %u, NT_PRSTATUS, %#lx) = %s\n", + (unsigned) pid, bad_request, errstr); + + do_ptrace(PTRACE_GETREGSET, pid, 3, bad_request); + printf("ptrace(PTRACE_GETREGSET, %u, NT_PRPSINFO, %#lx) = %s\n", + (unsigned) pid, bad_request, errstr); + + test_peeksiginfo(pid, bad_request); + + do_ptrace(PTRACE_TRACEME, 0, 0, 0); + printf("ptrace(PTRACE_TRACEME) = %s\n", errstr); + + puts("+++ exited with 0 +++"); + return 0; +} + + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigprocmask") + +#endif diff --git a/tests-mx32/ptrace.test b/tests-mx32/ptrace.test new file mode 100755 index 000000000..5add9be47 --- /dev/null +++ b/tests-mx32/ptrace.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of ptrace syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e signal=none diff --git a/tests-mx32/pwritev.c b/tests-mx32/pwritev.c new file mode 100644 index 000000000..58e5b41e2 --- /dev/null +++ b/tests-mx32/pwritev.c @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PWRITEV + +# include +# include +# include +# include + +# define LEN 8 +# define LIM (LEN - 1) + +static void +print_iov(const struct iovec *iov) +{ + unsigned int i; + unsigned char *buf = iov->iov_base; + + fputs("{iov_base=\"", stdout); + for (i = 0; i < iov->iov_len; ++i) { + if (i < LIM) + printf("\\%d", (int) buf[i]); + } + printf("\"%s, iov_len=%u}", + i > LIM ? "..." : "", (unsigned) iov->iov_len); +} + +static void +print_iovec(const struct iovec *iov, unsigned int cnt, unsigned int size) +{ + if (!size) { + printf("%p", iov); + return; + } + unsigned int i; + putchar('['); + for (i = 0; i < cnt; ++i) { + if (i) + fputs(", ", stdout); + if (i == size) { + printf("%p", &iov[i]); + break; + } + if (i == LIM) { + fputs("...", stdout); + break; + } + print_iov(&iov[i]); + } + putchar(']'); +} + +int +main(void) +{ + (void) close(0); + if (open("/dev/null", O_WRONLY)) + perror_msg_and_fail("open"); + + char *buf = tail_alloc(LEN); + unsigned i; + for (i = 0; i < LEN; ++i) + buf[i] = i; + + struct iovec *iov = tail_alloc(sizeof(*iov) * LEN); + for (i = 0; i < LEN; ++i) { + buf[i] = i; + iov[i].iov_base = &buf[i]; + iov[i].iov_len = LEN - i; + } + + const off_t offset = 0xdefaceddeadbeefLL; + long rc; + int written = 0; + for (i = 0; i < LEN; ++i) { + written += iov[i].iov_len; + if (pwritev(0, iov, i + 1, offset + i) != written) + perror_msg_and_fail("pwritev"); + fputs("pwritev(0, ", stdout); + print_iovec(iov, i + 1, LEN); + printf(", %u, %lld) = %d\n", + i + 1, (long long) offset + i, written); + } + + for (i = 0; i <= LEN; ++i) { + unsigned int n = LEN + 1 - i; + fputs("pwritev(0, ", stdout); + print_iovec(iov + i, n, LEN - i); + rc = pwritev(0, iov + i, n, offset + LEN + i); + printf(", %u, %lld) = %ld %s (%m)\n", + n, (long long) offset + LEN + i, rc, errno2name()); + } + + iov->iov_base = iov + LEN * 2; + rc = pwritev(0, iov, 1, -1); + printf("pwritev(0, [{iov_base=%p, iov_len=%d}], 1, -1) = %ld %s (%m)\n", + iov->iov_base, LEN, rc, errno2name()); + + iov += LEN; + rc = pwritev(0, iov, 42, -2); + printf("pwritev(0, %p, 42, -2) = %ld %s (%m)\n", + iov, rc, errno2name()); + + rc = pwritev(0, NULL, 1, -3); + printf("pwritev(0, NULL, 1, -3) = %ld %s (%m)\n", + rc, errno2name()); + + rc = pwritev(0, iov, 0, -4); + printf("pwritev(0, [], 0, -4) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PWRITEV") + +#endif diff --git a/tests-mx32/pwritev.test b/tests-mx32/pwritev.test new file mode 100755 index 000000000..0aed6835c --- /dev/null +++ b/tests-mx32/pwritev.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check pwritev syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -s7 diff --git a/tests-mx32/qual_fault-exit_group.expected b/tests-mx32/qual_fault-exit_group.expected new file mode 100644 index 000000000..dd9d4e46e --- /dev/null +++ b/tests-mx32/qual_fault-exit_group.expected @@ -0,0 +1,3 @@ +exit_group(42) = -1 ENOSYS (Function not implemented) (INJECTED) +exit(42) = ? ++++ exited with 42 +++ diff --git a/tests-mx32/qual_fault-exit_group.test b/tests-mx32/qual_fault-exit_group.test new file mode 100755 index 000000000..c98ffc6e0 --- /dev/null +++ b/tests-mx32/qual_fault-exit_group.test @@ -0,0 +1,53 @@ +#!/bin/sh +# +# Check decoding of fault injected exit_group syscall. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/scno_tampering.sh" + +test_with() +{ + > "$LOG" || fail_ "failed to write $LOG" + + $STRACE -o "$LOG" "$@" + rc=$? + [ $rc -eq 42 ] || + dump_log_and_fail_with "$STRACE $* failed with code $rc" + + match_diff +} + +test_with -eexit,exit_group -efault=exit_group:error=ENOSYS ./answer + +test_with -eexit,exit_group -efault=exit_group:error=ENOSYS \ + -efault=\!process:error=1 ./answer + +test_with -eexit,exit_group -efault=all:error=ENOSYS \ + -efault=exit:error=1:when=2+ ./answer + +test_with -eexit,exit_group -efault=exit_group:error=ENOSYS \ + -efault=\!desc,file,memory,process,signal,network,ipc:error=1 ./answer diff --git a/tests-mx32/qual_fault-syntax.test b/tests-mx32/qual_fault-syntax.test new file mode 100755 index 000000000..85093fc7d --- /dev/null +++ b/tests-mx32/qual_fault-syntax.test @@ -0,0 +1,111 @@ +#!/bin/sh +# +# Check -e fault= syntax. +# +# Copyright (c) 2016=2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# +# F +# F+ +# F+S + +fail_with() +{ + dump_log_and_fail_with \ + "strace -e fault=$* failed to handle an argument error properly" +} + +for arg in '' , ,, ,,, : :: ::: \! \!, \!: \ + invalid_syscall_name \ + invalid_syscall_name:when=3 \ + -1 \!-1 \ + -1:when=4 \ + -2 \ + -2:when=5 \ + 32767 \!32767 \ + 32767:when=6 \ + chdir:42 \!chdir:42 \ + chdir:42:when=7 \ + chdir:invalid \ + chdir:invalid:when=8 \ + chdir:error= \ + chdir:error=:when=10 \ + chdir:error=invalid_error_name \ + chdir:error=invalid_error_name:when=11 \ + chdir:error=-1 \ + chdir:error=-1:when=12 \ + chdir:error=-2 \ + chdir:error=-2:when=13 \ + chdir:error=3+ \ + chdir:error=3+:when=14 \ + chdir:error=4096 \ + chdir:error=4096:when=15 \ + chdir:when=7:error=invalid_error_name \ + chdir:when= \ + chdir:when=:error=19 \ + chdir:when=0 \ + chdir:when=0:error=20 \ + chdir:when=-1 \ + chdir:when=-1:error=21 \ + chdir:when=-2+ \ + chdir:when=-2+:error=22 \ + chdir:when=-3+0 \ + chdir:when=-3+0:error=23 \ + chdir:when=4- \ + chdir:when=4-:error=24 \ + chdir:when=5+- \ + chdir:when=5+-:error=25 \ + chdir:when=6++ \ + chdir:when=6++:error=26 \ + chdir:when=7+0 \ + chdir:when=7+0:error=27 \ + chdir:when=8+-1 \ + chdir:when=8+-1:error=28 \ + chdir:when=9+1+ \ + chdir:when=9+1+:error=29 \ + chdir:when=65536 \ + chdir:when=65536:error=30 \ + chdir:when=1+65536 \ + chdir:when=1+65536:error=31 \ + file,nonsense \ + \!desc,nonsense \ + chdir,nonsense \ + \!chdir,nonsense \ + 1,nonsense \ + \!1,nonsense \ + chdir:retval=0 \ + chdir:signal=1 \ + chdir:error=1:error=2 \ + ; do + $STRACE -e fault="$arg" true 2> "$LOG" && + fail_with "$arg" + LC_ALL=C grep -F 'invalid fault argument' < "$LOG" > /dev/null || + fail_with "$arg" +done + +exit 0 diff --git a/tests-mx32/qual_fault.c b/tests-mx32/qual_fault.c new file mode 100644 index 000000000..d26dc7ce7 --- /dev/null +++ b/tests-mx32/qual_fault.c @@ -0,0 +1,148 @@ +/* + * Check that fault injection works properly. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +static const int expfd = 4; +static const int gotfd = 5; + +#define DEFAULT_ERRNO ENOSYS + +static const char *errstr; +static int is_raw, err, first, step, iter, try; + +static void +invoke(int fail) +{ + static char buf[sizeof(int) * 3 + 3]; + const struct iovec io = { + .iov_base = buf, + .iov_len = sprintf(buf, "%d.", ++try) + }; + int rc; + + if (!fail) { + rc = write(expfd, io.iov_base, io.iov_len); + if (rc != (int) io.iov_len) + perror_msg_and_fail("write"); + } + + errno = 0; + rc = writev(gotfd, &io, 1); + + if (fail) { + if (!(rc == -1 && errno == err)) + perror_msg_and_fail("expected errno %d" + ", got rc == %d, errno == %d", + err, rc, errno); + + if (is_raw) + tprintf("writev(%#x, %p, 0x1) = -1 (errno %d)" + " (INJECTED)\n", gotfd, &io, err); + else + tprintf("writev(%d, [{iov_base=\"%s\", iov_len=%d}], 1)" + " = -1 %s (%m) (INJECTED)\n", + gotfd, buf, (int) io.iov_len, errstr); + } else { + if (rc != (int) io.iov_len) + perror_msg_and_fail("expected %d" + ", got rc == %d, errno == %d", + (int) io.iov_len, rc, errno); + + if (is_raw) + tprintf("writev(%#x, %p, 0x1) = %#x\n", gotfd, &io, rc); + else + tprintf("writev(%d, [{iov_base=\"%s\", iov_len=%d}], 1)" + " = %d\n", + gotfd, buf, (int) io.iov_len, (int) io.iov_len); + } +} + +int +main(int argc, char *argv[]) +{ + struct stat st; + + assert(fstat(expfd, &st) == 0); + assert(fstat(gotfd, &st) == 0); + + assert(argc == 6); + + is_raw = !strcmp("raw", argv[1]); + + errstr = argv[2]; + err = atoi(errstr); + assert(err >= 0); + + if (!err) { + if (!*errstr) + err = DEFAULT_ERRNO; + else if (!strcasecmp(errstr, "EINVAL")) + err = EINVAL; + else + err = ENOSYS; + } + + errno = err; + errstr = errno2name(); + + first = atoi(argv[3]); + step = atoi(argv[4]); + iter = atoi(argv[5]); + + assert(first > 0); + assert(step >= 0); + + tprintf("%s", ""); + + int i; + for (i = 1; i <= iter; ++i) { + int fail = 0; + if (first > 0) { + --first; + if (first == 0) { + fail = 1; + first = step; + } + } + invoke(fail); + } + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/qual_fault.test b/tests-mx32/qual_fault.test new file mode 100755 index 000000000..e194a7879 --- /dev/null +++ b/tests-mx32/qual_fault.test @@ -0,0 +1,104 @@ +#!/bin/sh +# +# Check that fault injection works properly. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/scno_tampering.sh" + +# +# F +# F+ +# F+S + +N=16 + +check_fault_injection() +{ + local trace fault err first step extra + trace=$1; shift + fault=$1; shift + err=$1; shift + first=$1; shift + step=$1; shift + extra="$*" + + local when= + if [ -z "$first$step" ]; then + first=1 + step=1 + else + case "$step" in + '') when=":when=$first"; step=0 ;; + +) when=":when=$first+"; step=1 ;; + *) when=":when=$first+$step" ;; + esac + fi + + local error= + local raw=reg + set -- + case "$err" in + '') ;; + [123456789]*) + error=":error=$err" + raw=raw + set -- -e raw=all + ;; + *) error=":error=$err" ;; + esac + + outexp="$NAME.out.exp" + outgot="$NAME.out.got" + + run_strace -a11 -e trace=$trace \ + "$@" -e fault=$fault$when$error $extra \ + ./$NAME $raw "$err" "$first" "$step" $N \ + > "$EXP" 4> "$outexp" 5> "$outgot" + + match_diff "$EXP" "$LOG" + match_diff "$outexp" "$outgot" + rm -f "$EXP" "$outexp" "$outgot" +} + +for err in '' ENOSYS 22 einval; do + for fault in writev desc,51; do + check_fault_injection \ + writev $fault "$err" '' '' -efault=chdir + check_fault_injection \ + writev $fault "$err" '' '' -efault=chdir -efault=none + for F in 1 2 3 5 7 11; do + check_fault_injection \ + writev $fault "$err" $F '' + check_fault_injection \ + writev $fault "$err" $F + + for S in 1 2 3 5 7 11; do + check_fault_injection \ + writev $fault "$err" $F $S + done + done + done +done diff --git a/tests-mx32/qual_inject-error-signal.c b/tests-mx32/qual_inject-error-signal.c new file mode 100644 index 000000000..f4ccd8241 --- /dev/null +++ b/tests-mx32/qual_inject-error-signal.c @@ -0,0 +1,69 @@ +/* + * Check fault injection along with signal injection. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +static struct stat before, after; + +static void +handler(int sig) +{ + if (stat(".", &after)) + syscall(__NR_exit_group, 2); + + if (before.st_dev != after.st_dev || before.st_ino != after.st_ino) + syscall(__NR_exit_group, 3); + + syscall(__NR_exit_group, 0); +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGUSR1, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + if (stat(".", &before)) + perror_msg_and_fail("stat"); + + syscall(__NR_chdir, "."); + syscall(__NR_exit_group, 1); + return 1; +} diff --git a/tests-mx32/qual_inject-error-signal.expected b/tests-mx32/qual_inject-error-signal.expected new file mode 100644 index 000000000..24389b378 --- /dev/null +++ b/tests-mx32/qual_inject-error-signal.expected @@ -0,0 +1,4 @@ +chdir(".") = -1 ENOENT (No such file or directory) (INJECTED) +--- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_KERNEL} --- +exit_group(0) = ? ++++ exited with 0 +++ diff --git a/tests-mx32/qual_inject-error-signal.test b/tests-mx32/qual_inject-error-signal.test new file mode 100755 index 000000000..fcbcc398f --- /dev/null +++ b/tests-mx32/qual_inject-error-signal.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check fault injection along with signal injection. +. "${srcdir=.}/scno_tampering.sh" + +run_strace -a12 -echdir,exit_group -einject=chdir:error=ENOENT:signal=USR1 \ + "./$NAME" +match_diff diff --git a/tests-mx32/qual_inject-retval.c b/tests-mx32/qual_inject-retval.c new file mode 100644 index 000000000..ac9801ebf --- /dev/null +++ b/tests-mx32/qual_inject-retval.c @@ -0,0 +1,73 @@ +/* + * Check success injection. + * + * Copyright (c) 2017 Elvira Khabirova + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_chdir + +# include +# include +# include +# include +# include + +int +main(int argc, char *argv[]) +{ + assert(argc == 2); + + static const char dir[] = ".."; + struct stat before, after; + + if (stat(".", &before)) + perror_msg_and_fail("stat"); + + long rval = syscall(__NR_chdir, dir); + + if (stat(".", &after)) + perror_msg_and_fail("stat"); + + if (before.st_dev != after.st_dev || before.st_ino != after.st_ino) + error_msg_and_fail("syscall succeeded"); + if (atol(argv[1]) != rval) + error_msg_and_fail("expected retval %s, got retval %ld", + argv[1], rval); + + printf("chdir(\"%s\") = %ld (INJECTED)\n", dir, rval); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chdir") + +#endif diff --git a/tests-mx32/qual_inject-retval.test b/tests-mx32/qual_inject-retval.test new file mode 100755 index 000000000..419030ad4 --- /dev/null +++ b/tests-mx32/qual_inject-retval.test @@ -0,0 +1,21 @@ +#!/bin/sh + +# Check success injection. + +. "${srcdir=.}/scno_tampering.sh" + +check_injection() +{ + local syscall rval + + syscall=chdir + rval="$1"; shift + + run_strace -a12 -e$syscall -einject="$syscall:retval=$rval" "$@" \ + ./qual_inject-retval "$rval" > "$EXP" + match_diff "$LOG" "$EXP" + rm -f "$EXP" +} + +check_injection 0 +check_injection 42 diff --git a/tests-mx32/qual_inject-signal.c b/tests-mx32/qual_inject-signal.c new file mode 100644 index 000000000..ff56a2862 --- /dev/null +++ b/tests-mx32/qual_inject-signal.c @@ -0,0 +1,57 @@ +/* + * Check that signal injection works properly. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +static void +handler(int sig) +{ + syscall(__NR_exit_group, 0); +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGUSR1, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + syscall(__NR_chdir, "."); + syscall(__NR_exit_group, 1); + return 1; +} diff --git a/tests-mx32/qual_inject-signal.expected b/tests-mx32/qual_inject-signal.expected new file mode 100644 index 000000000..69a1d9793 --- /dev/null +++ b/tests-mx32/qual_inject-signal.expected @@ -0,0 +1,4 @@ +chdir(".") = 0 +--- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_KERNEL} --- +exit_group(0) = ? ++++ exited with 0 +++ diff --git a/tests-mx32/qual_inject-signal.test b/tests-mx32/qual_inject-signal.test new file mode 100755 index 000000000..88002ce94 --- /dev/null +++ b/tests-mx32/qual_inject-signal.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check signal injection. +. "${srcdir=.}/init.sh" + +run_strace -a12 -echdir,exit_group -einject=chdir:signal=USR1 \ + ./$NAME +match_diff diff --git a/tests-mx32/qual_inject-syntax.test b/tests-mx32/qual_inject-syntax.test new file mode 100755 index 000000000..a9e44d748 --- /dev/null +++ b/tests-mx32/qual_inject-syntax.test @@ -0,0 +1,118 @@ +#!/bin/sh +# +# Check -e inject= syntax. +# +# Copyright (c) 2016-2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# +# F +# F+ +# F+S + +fail_with() +{ + dump_log_and_fail_with \ + "strace -e inject=$* failed to handle an argument error properly" +} + +for arg in '' , ,, ,,, : :: ::: \! \!, \!: \ + invalid_syscall_name \ + invalid_syscall_name:when=3 \ + -1 \!-1 \ + -1:when=4 \ + -2 \ + -2:when=5 \ + 32767 \!32767 \ + 32767:when=6 \ + 42 \ + chdir \ + chdir:42 \!chdir:42 \ + chdir:42:when=7 \ + chdir:invalid \ + chdir:invalid:when=8 \ + chdir:error= \ + chdir:error=:when=10 \ + chdir:error=invalid_error_name \ + chdir:error=invalid_error_name:when=11 \ + chdir:error=-1 \ + chdir:error=-1:when=12 \ + chdir:error=-2 \ + chdir:error=-2:when=13 \ + chdir:error=3+ \ + chdir:error=3+:when=14 \ + chdir:error=4096 \ + chdir:error=4096:when=15 \ + chdir:when=7:error=invalid_error_name \ + chdir:when= \ + chdir:when=:error=19 \ + chdir:when=0 \ + chdir:when=0:error=20 \ + chdir:when=-1 \ + chdir:when=-1:error=21 \ + chdir:when=-2+ \ + chdir:when=-2+:error=22 \ + chdir:when=-3+0 \ + chdir:when=-3+0:error=23 \ + chdir:when=4- \ + chdir:when=4-:error=24 \ + chdir:when=5+- \ + chdir:when=5+-:error=25 \ + chdir:when=6++ \ + chdir:when=6++:error=26 \ + chdir:when=7+0 \ + chdir:when=7+0:error=27 \ + chdir:when=8+-1 \ + chdir:when=8+-1:error=28 \ + chdir:when=9+1+ \ + chdir:when=9+1+:error=29 \ + chdir:when=65536 \ + chdir:when=65536:error=30 \ + chdir:when=1+65536 \ + chdir:when=1+65536:error=31 \ + file,nonsense \ + \!desc,nonsense \ + chdir,nonsense \ + \!chdir,nonsense \ + 1,nonsense \ + \!1,nonsense \ + chdir:retval=-1 \ + chdir:signal=0 \ + chdir:signal=129 \ + chdir:retval=0:retval=1 \ + chdir:error=1:error=2 \ + chdir:retval=0:error=1 \ + chdir:error=1:retval=0 \ + chdir:retval=0:signal=1:error=1 \ + ; do + $STRACE -e inject="$arg" true 2> "$LOG" && + fail_with "$arg" + LC_ALL=C grep -F 'invalid inject argument' < "$LOG" > /dev/null || + fail_with "$arg" +done + +exit 0 diff --git a/tests-mx32/qual_signal.c b/tests-mx32/qual_signal.c new file mode 100644 index 000000000..106dabea8 --- /dev/null +++ b/tests-mx32/qual_signal.c @@ -0,0 +1,82 @@ +/* + * Check how strace -e signal=set works. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static pid_t pid; +static uid_t uid; + +static void +handler(int sig) +{ +} + +static void +test_sig(int signo, const char *name) +{ + const struct sigaction act = { .sa_handler = handler }; + + if (sigaction(signo, &act, NULL)) + perror_msg_and_fail("sigaction: %d", signo); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, signo); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask: %d", signo); + + if (kill(pid, signo)) + perror_msg_and_fail("kill(%d, %d)", pid, signo); + + if (name && *name) + printf("--- %s {si_signo=%s, si_code=SI_USER" + ", si_pid=%d, si_uid=%d} ---\n", + name, name, pid, uid); +} + +int +main(int ac, const char **av) +{ + assert(ac & 1); + + pid = getpid(); + uid = geteuid(); + + int i; + for (i = 1; i < ac; i += 2) + test_sig(atoi(av[i]), av[i + 1]); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/qual_signal.test b/tests-mx32/qual_signal.test new file mode 100755 index 000000000..54a37a30c --- /dev/null +++ b/tests-mx32/qual_signal.test @@ -0,0 +1,111 @@ +#!/bin/sh +# +# Check how strace -e signal=set works. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +test_one_sig() +{ + local sigs + sigs="$1"; shift + + run_prog "./$NAME" "$@" > /dev/null + run_strace -e trace=none -e signal="$sigs" "./$NAME" "$@" > "$EXP" + match_diff "$LOG" "$EXP" + rm -f "$EXP" +} + +test_sigs() +{ + local first second sigs + first="$1"; shift + second="$1"; shift + + for sigs; do + test_one_sig "$sigs" 2 "$first" 15 "$second" + done +} + +test_sigs '' '' \ + none '!all' \ + CHLD SIGCHLD ALRM SIGALRM \ + chld sigchld alrm sigalrm \ + CHLD,SIGALRM ALRM,SIGCHLD \ + chld,sigalrm alrm,sigchld \ + 9 9,4 9,4,11 \ + 4,CHLD,11,ALRM,9 \ + '!2,15' '!INT,TERM' '!SIGINT,TERM' '!INT,SIGTERM' '!SIGTERM,SIGINT' \ + '!2,INT,TERM' '!2,SIGTERM' '!SIGINT,15' '!INT,SIGTERM,15' \ + '!2,4,15' '!15,9,2,11,4' + +test_sigs SIGINT '' \ + 2 INT SIGINT \ + CHLD,SIGINT SIGINT,SIGALRM \ + chld,sigint sigint,sigalrm \ + ALRM,2,SIGCHLD \ + '!15' '!TERM' '!SIGTERM' \ + '!15,TERM' '!SIGTERM,15,TERM' \ + '!SIGALRM,TERM' '!CHLD,SIGTERM' \ + '!ALRM,15' '!SIGCHLD,ALRM,SIGTERM,KILL' \ + '!4,15' '!15,9,11,4' + +test_sigs '' SIGTERM \ + 15 TERM SIGTERM \ + CHLD,SIGTERM SIGTERM,SIGALRM \ + chld,sigterm sigterm,sigalrm \ + ALRM,15,SIGCHLD \ + '!2' '!INT' '!SIGINT' \ + '!2,INT' '!SIGINT,2,INT' \ + '!SIGALRM,INT' '!CHLD,SIGINT' \ + '!ALRM,2' '!SIGCHLD,ALRM,SIGINT,KILL' \ + '!4,2' '!2,9,11,4' + +test_sigs SIGINT SIGTERM \ + all '!none' \ + INT,TERM SIGINT,TERM SIGTERM,INT SIGINT,SIGTERM \ + int,term sigint,term sigterm,int sigint,sigterm \ + 2,15 2,TERM SIGTERM,2 TERM,15,SIGINT,2 \ + '!CHLD' '!SIGCHLD' '!ALRM' '!SIGALRM' \ + '!CHLD,SIGALRM' '!ALRM,SIGCHLD' \ + '!9' '!9,4' '!9,4,11' '!4,CHLD,11,ALRM,9' + +fail_with() +{ + dump_log_and_fail_with \ + "strace -e signal=$* failed to handle an argument error properly" +} + +for arg in ' ' invalid_signal_name SIG -1 256 1-1 \ + 1,2,4,8,16,32,64,128,256,512,1024 9,chdir; do + $STRACE -e signal="$arg" true 2> "$LOG" && + fail_with "$arg" + LC_ALL=C grep -F 'invalid signal' < "$LOG" > /dev/null || + fail_with "$arg" +done + +exit 0 diff --git a/tests-mx32/qual_syscall.test b/tests-mx32/qual_syscall.test new file mode 100755 index 000000000..f7eb06d5a --- /dev/null +++ b/tests-mx32/qual_syscall.test @@ -0,0 +1,59 @@ +#!/bin/sh + +# Check how strace -e abbrev=set, -e raw=set, -e trace=set, +# and -e verbose=set work. + +. "${srcdir=.}/init.sh" + +run_prog ./umovestr +pattern_abbrev_verbose='execve("\./umovestr", \["\./umovestr"\], \[/\* [[:digit:]]* vars \*/\]) = 0' +pattern_nonabbrev_verbose='execve("\./umovestr", \["\./umovestr"\], \[".*\"\(\.\.\.\)\?\]) = 0' +pattern_nonverbose='execve("\./umovestr", 0x[[:xdigit:]]*, 0x[[:xdigit:]]*) = 0' +pattern_raw='execve(0x[[:xdigit:]]*, 0x[[:xdigit:]]*, 0x[[:xdigit:]]*) = 0' + +check_output_mismatch() +{ + local pattern + pattern="$1"; shift + run_strace "$@" ./umovestr + LC_ALL=C grep -x "$pattern" "$LOG" > /dev/null || { + printf '%s\n%s\n' \ + 'Failed patterns of expected output:' "$pattern" + dump_log_and_fail_with "$STRACE $args output mismatch" + } +} + +check_output_mismatch "$pattern_abbrev_verbose" -e execve +LC_ALL=C grep -v -x "$pattern_abbrev_verbose" "$LOG" | +LC_ALL=C grep '^[[:alnum:]_]*(' > /dev/null && + dump_log_and_fail_with "$STRACE $args unexpected output" + +check_output_mismatch "$pattern_abbrev_verbose" -e trace=process +LC_ALL=C grep '^chdir' "$LOG" > /dev/null && + dump_log_and_fail_with "$STRACE $args unexpected output" + +run_strace -e 42 ./umovestr +LC_ALL=C grep '^[[:alnum:]_]*(' "$LOG" > /dev/null && + dump_log_and_fail_with "$STRACE $args unexpected output" + +for a in execve \!chdir all \!none \ + file process \!desc \!ipc \!memory \!network \!signal; do + check_output_mismatch \ + "$pattern_abbrev_verbose" -e abbrev="$a" -e execve + check_output_mismatch \ + "$pattern_raw" -a22 -e raw="$a" -e execve + check_output_mismatch \ + "$pattern_abbrev_verbose" -e verbose="$a" -e execve +done + +for a in \!execve chdir 42 \!all none \ + \!file \!process desc ipc memory network signal; do + check_output_mismatch \ + "$pattern_nonabbrev_verbose" -e abbrev="$a" -e execve + check_output_mismatch \ + "$pattern_abbrev_verbose" -e raw="$a" -e execve + check_output_mismatch \ + "$pattern_nonverbose" -a31 -e verbose="$a" -e execve +done + +exit 0 diff --git a/tests-mx32/quotactl-v.c b/tests-mx32/quotactl-v.c new file mode 100644 index 000000000..00139649c --- /dev/null +++ b/tests-mx32/quotactl-v.c @@ -0,0 +1,3 @@ +/* This file is part of quotactl-v strace test. */ +#define VERBOSE 1 +#include "quotactl.c" diff --git a/tests-mx32/quotactl-v.test b/tests-mx32/quotactl-v.test new file mode 100755 index 000000000..6adaf82cb --- /dev/null +++ b/tests-mx32/quotactl-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check non-abbreviated decoding of quotactl syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=quotactl diff --git a/tests-mx32/quotactl-xfs-v.c b/tests-mx32/quotactl-xfs-v.c new file mode 100644 index 000000000..21173d634 --- /dev/null +++ b/tests-mx32/quotactl-xfs-v.c @@ -0,0 +1,3 @@ +/* This file is part of quotactl-xfs-v strace test. */ +#define VERBOSE 1 +#include "quotactl-xfs.c" diff --git a/tests-mx32/quotactl-xfs-v.test b/tests-mx32/quotactl-xfs-v.test new file mode 100755 index 000000000..d5ffc7d69 --- /dev/null +++ b/tests-mx32/quotactl-xfs-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check non-abbreviated decoding of quotactl xfs subcommands. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=quotactl diff --git a/tests-mx32/quotactl-xfs.c b/tests-mx32/quotactl-xfs.c new file mode 100644 index 000000000..e420d1c9d --- /dev/null +++ b/tests-mx32/quotactl-xfs.c @@ -0,0 +1,354 @@ +/* + * Check decoding of quotactl xfs subcommands. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_quotactl) && \ + (defined(HAVE_LINUX_QUOTA_H) || defined(HAVE_SYS_QUOTA_H)) && \ + defined(HAVE_LINUX_DQBLK_XFS_H) + +# include +# include +# include + +# include + +# include "quotactl.h" + +# ifndef Q_GETNEXTQUOTA +# define Q_XGETNEXTQUOTA XQM_CMD(0x9) +# endif /* !Q_GETNEXTQUOTA */ + +# ifndef Q_XGETQSTATV + +# define Q_XGETQSTATV XQM_CMD(8) +# define FS_QSTATV_VERSION1 1 + +struct fs_qfilestatv { + uint64_t qfs_ino; /* inode number */ + uint64_t qfs_nblks; /* number of BBs 512-byte-blks */ + uint32_t qfs_nextents; /* number of extents */ + uint32_t qfs_pad; /* pad for 8-byte alignment */ +}; + +struct fs_quota_statv { + int8_t qs_version; /* version for future changes */ + uint8_t qs_pad1; /* pad for 16bit alignment */ + uint16_t qs_flags; /* XFS_QUOTA_.* flags */ + uint32_t qs_incoredqs; /* number of dquots incore */ + struct fs_qfilestatv qs_uquota; /* user quota information */ + struct fs_qfilestatv qs_gquota; /* group quota information */ + struct fs_qfilestatv qs_pquota; /* project quota information */ + int32_t qs_btimelimit; /* limit for blks timer */ + int32_t qs_itimelimit; /* limit for inodes timer */ + int32_t qs_rtbtimelimit; /* limit for rt blks timer */ + uint16_t qs_bwarnlimit; /* limit for num warnings */ + uint16_t qs_iwarnlimit; /* limit for num warnings */ + uint64_t qs_pad2[8]; /* for future proofing */ +}; + +# endif /* !Q_XGETQSTATV */ + +# include "xlat.h" +# include "xlat/xfs_dqblk_flags.h" +# if VERBOSE +# include "xlat/xfs_quota_flags.h" +# endif + + +void +print_xdisk_quota(int rc, void *ptr, void *arg) +{ + struct fs_disk_quota *dq = ptr; + long out_arg = (long) arg; + + if (((rc != 0) && out_arg) || (out_arg > 1)) { + printf("%p", dq); + return; + } + + PRINT_FIELD_D("{", dq, d_version); + printf(", d_flags="); + printflags(xfs_dqblk_flags, (uint8_t) dq->d_flags, "XFS_???_QUOTA"); + + PRINT_FIELD_X(", ", dq, d_fieldmask); + PRINT_FIELD_U(", ", dq, d_id); + PRINT_FIELD_U(", ", dq, d_blk_hardlimit); + PRINT_FIELD_U(", ", dq, d_blk_softlimit); + PRINT_FIELD_U(", ", dq, d_ino_hardlimit); + PRINT_FIELD_U(", ", dq, d_ino_softlimit); + PRINT_FIELD_U(", ", dq, d_bcount); + PRINT_FIELD_U(", ", dq, d_icount); + +# if VERBOSE + PRINT_FIELD_D(", ", dq, d_itimer); + PRINT_FIELD_D(", ", dq, d_btimer); + PRINT_FIELD_U(", ", dq, d_iwarns); + PRINT_FIELD_U(", ", dq, d_bwarns); + PRINT_FIELD_U(", ", dq, d_rtb_hardlimit); + PRINT_FIELD_U(", ", dq, d_rtb_softlimit); + PRINT_FIELD_U(", ", dq, d_rtbcount); + PRINT_FIELD_D(", ", dq, d_rtbtimer); + PRINT_FIELD_U(", ", dq, d_rtbwarns); +# else + printf(", ..."); +# endif /* !VERBOSE */ + printf("}"); +} + +void +print_xquota_stat(int rc, void *ptr, void *arg) +{ + struct fs_quota_stat *qs = ptr; + long out_arg = (long) arg; + + if (((rc != 0) && out_arg) || (out_arg > 1)) { + printf("%p", qs); + return; + } + + PRINT_FIELD_D("{", qs, qs_version); + +# if VERBOSE + printf(", qs_flags="); + printflags(xfs_quota_flags, qs->qs_flags, "XFS_QUOTA_???"); + PRINT_FIELD_U(", qs_uquota={", &qs->qs_uquota, qfs_ino); + PRINT_FIELD_U(", ", &qs->qs_uquota, qfs_nblks); + PRINT_FIELD_U(", ", &qs->qs_uquota, qfs_nextents); + PRINT_FIELD_U("}, qs_gquota={", &qs->qs_gquota, qfs_ino); + PRINT_FIELD_U(", ", &qs->qs_gquota, qfs_nblks); + PRINT_FIELD_U(", ", &qs->qs_gquota, qfs_nextents); + PRINT_FIELD_U("}, ", qs, qs_incoredqs); + PRINT_FIELD_D(", ", qs, qs_btimelimit); + PRINT_FIELD_D(", ", qs, qs_itimelimit); + PRINT_FIELD_D(", ", qs, qs_rtbtimelimit); + PRINT_FIELD_U(", ", qs, qs_bwarnlimit); + PRINT_FIELD_U(", ", qs, qs_iwarnlimit); +# else + printf(", ..."); +# endif /* !VERBOSE */ + printf("}"); +} + +void +print_xquota_statv(int rc, void *ptr, void *arg) +{ + struct fs_quota_statv *qs = ptr; + long out_arg = (long) arg; + + if (((rc != 0) && out_arg) || (out_arg > 1)) { + printf("%p", qs); + return; + } + + PRINT_FIELD_D("{", qs, qs_version); + +# if VERBOSE + printf(", qs_flags="); + printflags(xfs_quota_flags, qs->qs_flags, "XFS_QUOTA_???"); + PRINT_FIELD_U(", ", qs, qs_incoredqs); + PRINT_FIELD_U(", qs_uquota={", &qs->qs_uquota, qfs_ino); + PRINT_FIELD_U(", ", &qs->qs_uquota, qfs_nblks); + PRINT_FIELD_U(", ", &qs->qs_uquota, qfs_nextents); + PRINT_FIELD_U("}, qs_gquota={", &qs->qs_gquota, qfs_ino); + PRINT_FIELD_U(", ", &qs->qs_gquota, qfs_nblks); + PRINT_FIELD_U(", ", &qs->qs_gquota, qfs_nextents); + PRINT_FIELD_U("}, qs_pquota={", &qs->qs_pquota, qfs_ino); + PRINT_FIELD_U(", ", &qs->qs_pquota, qfs_nblks); + PRINT_FIELD_U(", ", &qs->qs_pquota, qfs_nextents); + PRINT_FIELD_D("}, ", qs, qs_btimelimit); + PRINT_FIELD_D(", ", qs, qs_itimelimit); + PRINT_FIELD_D(", ", qs, qs_rtbtimelimit); + PRINT_FIELD_U(", ", qs, qs_bwarnlimit); + PRINT_FIELD_U(", ", qs, qs_iwarnlimit); +# else + printf(", ..."); +# endif /* !VERBOSE */ + printf("}"); +} + +int +main(void) +{ + char *bogus_special = (char *) tail_alloc(1) + 1; + void *bogus_addr = (char *) tail_alloc(1) + 1; + + char bogus_special_str[sizeof(void *) * 2 + sizeof("0x")]; + char bogus_addr_str[sizeof(void *) * 2 + sizeof("0x")]; + char unterminated_str[sizeof(void *) * 2 + sizeof("0x")]; + + long rc; + struct fs_disk_quota *xdq = tail_alloc(sizeof(*xdq)); + struct fs_quota_stat *xqstat = tail_alloc(sizeof(*xqstat)); + struct fs_quota_statv *xqstatv = tail_alloc(sizeof(*xqstatv)); + uint32_t *flags = tail_alloc(sizeof(*flags)); + char *unterminated = tail_memdup(unterminated_data, + sizeof(unterminated_data)); + + snprintf(bogus_special_str, sizeof(bogus_special_str), "%p", + bogus_special); + snprintf(bogus_addr_str, sizeof(bogus_addr_str), "%p", + bogus_addr); + snprintf(unterminated_str, sizeof(unterminated_str), "%p", + unterminated); + + + /* Q_XQUOTAON */ + + *flags = 0xdeadbeef; + + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_XQUOTAON, USRQUOTA)), + ARG_STR("/dev/bogus/"), flags, + "[XFS_QUOTA_UDQ_ACCT|XFS_QUOTA_UDQ_ENFD" + "|XFS_QUOTA_GDQ_ACCT|XFS_QUOTA_GDQ_ENFD" + "|XFS_QUOTA_PDQ_ENFD|0xdeadbec0]"); + + rc = syscall(__NR_quotactl, QCMD(Q_XQUOTAON, 0xfacefeed), bogus_dev, + bogus_id, bogus_addr); + printf("quotactl(QCMD(Q_XQUOTAON, %#x /* ???QUOTA */)" + ", %s, %p) = %s\n", + QCMD_TYPE(QCMD(Q_XQUOTAON, 0xfacefeed)), + bogus_dev_str, bogus_addr, sprintrc(rc)); + + + /* Q_XQUOTAOFF */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_XQUOTAOFF, USRQUOTA)), + bogus_special, bogus_special_str, + bogus_addr, bogus_addr_str); + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_XQUOTAOFF, GRPQUOTA)), + ARG_STR("/dev/bogus/"), + ARG_STR(NULL)); + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + QCMD(Q_XQUOTAOFF, 3), + "QCMD(Q_XQUOTAOFF, 0x3 /* ???QUOTA */)", + ARG_STR("/dev/bogus/"), flags, + "[XFS_QUOTA_UDQ_ACCT|XFS_QUOTA_UDQ_ENFD" + "|XFS_QUOTA_GDQ_ACCT|XFS_QUOTA_GDQ_ENFD" + "|XFS_QUOTA_PDQ_ENFD|0xdeadbec0]"); + + + /* Q_XGETQUOTA */ + + /* Trying our best to get successful result */ + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_GETQUOTA, USRQUOTA)), + ARG_STR("/dev/sda1"), getuid(), xdq, print_xdisk_quota, + (intptr_t) 1); + + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_GETQUOTA, GRPQUOTA)), + ARG_STR(NULL), -1, xdq, print_xdisk_quota, (intptr_t) 2); + + + /* Q_XGETNEXTQUOTA */ + + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_XGETNEXTQUOTA, USRQUOTA)), + ARG_STR("/dev/sda1"), 0, xdq, print_xdisk_quota, + (intptr_t) 1); + + + /* Q_XSETQLIM */ + + check_quota(CQF_NONE, ARG_STR(QCMD(Q_XSETQLIM, PRJQUOTA)), + bogus_special, bogus_special_str, 0, bogus_addr); + + fill_memory_ex(xdq, sizeof(*xdq), 0x8e, 0x80); + + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_XSETQLIM, PRJQUOTA)), + bogus_dev, bogus_dev_str, 3141592653U, + xdq, print_xdisk_quota, (intptr_t) 0); + + + /* Q_XGETQSTAT */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_XGETQSTAT, USRQUOTA)), + ARG_STR("/dev/sda1"), xqstat, print_xquota_stat, (intptr_t) 1); + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_XGETQSTATV, PRJQUOTA)), + unterminated, unterminated_str, + xqstat + 1, print_xquota_stat, (intptr_t) 2); + + + /* Q_XGETQSTATV */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_XGETQSTAT, USRQUOTA)), + ARG_STR("/dev/sda1"), xqstatv, print_xquota_statv, 1); + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_XGETQSTATV, GRPQUOTA)), + ARG_STR(NULL), xqstatv, print_xquota_statv, (intptr_t) 2); + + + /* Q_XQUOTARM */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_XQUOTARM, PRJQUOTA)), + bogus_special, bogus_special_str, ARG_STR(NULL)); + check_quota(CQF_ID_SKIP, + ARG_STR(QCMD(Q_XQUOTARM, USRQUOTA)), + unterminated, unterminated_str, flags + 1); + + *flags = 0xdeadbeef; + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_XQUOTARM, GRPQUOTA)), + ARG_STR(NULL), flags, + "[XFS_USER_QUOTA|XFS_PROJ_QUOTA" + "|XFS_GROUP_QUOTA|0xdeadbee8]"); + + + /* Q_XQUOTASYNC */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + ARG_STR(QCMD(Q_XQUOTASYNC, USRQUOTA)), + bogus_special, bogus_special_str); + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + QCMD(Q_XQUOTASYNC, 0xfff), + "QCMD(Q_XQUOTASYNC, 0xff /* ???QUOTA */)", + ARG_STR(NULL)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_quotactl && " + "(HAVE_LINUX_QUOTA_H || HAVE_SYS_QUOTA_H) && " + "HAVE_LINUX_DQBLK_XFS_H"); + +#endif diff --git a/tests-mx32/quotactl-xfs.test b/tests-mx32/quotactl-xfs.test new file mode 100755 index 000000000..404a73724 --- /dev/null +++ b/tests-mx32/quotactl-xfs.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of quotactl xfs subcommands. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=quotactl diff --git a/tests-mx32/quotactl.c b/tests-mx32/quotactl.c new file mode 100644 index 000000000..3a7c11323 --- /dev/null +++ b/tests-mx32/quotactl.c @@ -0,0 +1,320 @@ +/* + * Check decoding of quotactl syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_quotactl) && \ + (defined(HAVE_LINUX_QUOTA_H) || defined(HAVE_SYS_QUOTA_H)) + +# include +# include +# include +# include +# include + +# include "quotactl.h" + +# ifndef HAVE_LINUX_QUOTA_H +/* Some dirty hacks in order to make sys/quota.h usable as a backup */ + +# define if_dqblk dqblk +# define if_nextdqblk nextdqblk +# define if_dqinfo dqinfo + +# endif /* !HAVE_LINUX_QUOTA_H */ + +# ifndef Q_GETNEXTQUOTA + +# define Q_GETNEXTQUOTA 0x800009 + +struct if_nextdqblk { + uint64_t dqb_bhardlimit; + uint64_t dqb_bsoftlimit; + uint64_t dqb_curspace; + uint64_t dqb_ihardlimit; + uint64_t dqb_isoftlimit; + uint64_t dqb_curinodes; + uint64_t dqb_btime; + uint64_t dqb_itime; + uint32_t dqb_valid; + uint32_t dqb_id; +}; +# endif /* !Q_GETNEXTQUOTA */ + +# include "xlat.h" +# include "xlat/quota_formats.h" +# include "xlat/if_dqblk_valid.h" +# include "xlat/if_dqinfo_flags.h" +# include "xlat/if_dqinfo_valid.h" + +void +print_dqblk(long rc, void *ptr, void *arg) +{ + struct if_dqblk *db = ptr; + long out_arg = (long) arg; + + if (((rc != 0) && out_arg) || (out_arg > 1)) { + printf("%p", db); + return; + } + + PRINT_FIELD_U("{", db, dqb_bhardlimit); + PRINT_FIELD_U(", ", db, dqb_bsoftlimit); + PRINT_FIELD_U(", ", db, dqb_curspace); + PRINT_FIELD_U(", ", db, dqb_ihardlimit); + PRINT_FIELD_U(", ", db, dqb_isoftlimit); + PRINT_FIELD_U(", ", db, dqb_curinodes); + +# if VERBOSE + PRINT_FIELD_U(", ", db, dqb_btime); + PRINT_FIELD_U(", ", db, dqb_itime); + + printf(", dqb_valid="); + printflags(if_dqblk_valid, db->dqb_valid, "QIF_???"); +# else + printf(", ..."); +# endif /* !VERBOSE */ + printf("}"); +} + +void +print_nextdqblk(long rc, void *ptr, void *arg) +{ + struct if_nextdqblk *db = ptr; + long out_arg = (long) arg; + + if (((rc != 0) && out_arg) || (out_arg > 1)) { + printf("%p", db); + return; + } + + PRINT_FIELD_U("{", db, dqb_bhardlimit); + PRINT_FIELD_U(", ", db, dqb_bsoftlimit); + PRINT_FIELD_U(", ", db, dqb_curspace); + PRINT_FIELD_U(", ", db, dqb_ihardlimit); + PRINT_FIELD_U(", ", db, dqb_isoftlimit); + PRINT_FIELD_U(", ", db, dqb_curinodes); + +# if VERBOSE + PRINT_FIELD_U(", ", db, dqb_btime); + PRINT_FIELD_U(", ", db, dqb_itime); + + printf(", dqb_valid="); + printflags(if_dqblk_valid, db->dqb_valid, "QIF_???"); + + PRINT_FIELD_U(", ", db, dqb_id); +# else + PRINT_FIELD_U(", ", db, dqb_id); + printf(", ..."); +# endif /* !VERBOSE */ + printf("}"); +} + +void +print_dqinfo(long rc, void *ptr, void *arg) +{ + struct if_dqinfo *di = ptr; + long out_arg = (long) arg; + + if (((rc != 0) && out_arg) || (out_arg > 1)) { + printf("%p", di); + return; + } + + PRINT_FIELD_U("{", di, dqi_bgrace); + PRINT_FIELD_U(", ", di, dqi_igrace); + + printf(", dqi_flags="); + printflags(if_dqinfo_flags, di->dqi_flags, "DQF_???"); + printf(", dqi_valid="); + printflags(if_dqinfo_valid, di->dqi_valid, "IIF_???"); + printf("}"); +} + + +int +main(void) +{ + char *bogus_special = (char *) tail_alloc(1) + 1; + void *bogus_addr = (char *) tail_alloc(1) + 1; + + char bogus_special_str[sizeof(void *) * 2 + sizeof("0x")]; + char unterminated_str[sizeof(void *) * 2 + sizeof("0x")]; + + long rc; + char *unterminated = tail_memdup(unterminated_data, + sizeof(unterminated_data)); + struct if_dqblk *dqblk = tail_alloc(sizeof(*dqblk)); + struct if_dqinfo *dqinfo = tail_alloc(sizeof(*dqinfo)); + uint32_t *fmt = tail_alloc(sizeof(*fmt)); + struct if_nextdqblk *nextdqblk = tail_alloc(sizeof(*nextdqblk)); + + + snprintf(bogus_special_str, sizeof(bogus_special_str), "%p", + bogus_special); + snprintf(unterminated_str, sizeof(unterminated_str), "%p", + unterminated); + + + /* Invalid commands */ + + rc = syscall(__NR_quotactl, bogus_cmd, bogus_special, bogus_id, + bogus_addr); + printf("quotactl(QCMD(%#x /* Q_??? */, %#x /* ???QUOTA */)" + ", %p, %u, %p) = %s\n", + QCMD_CMD(bogus_cmd), QCMD_TYPE(bogus_cmd), + bogus_special, bogus_id, bogus_addr, sprintrc(rc)); + + rc = syscall(__NR_quotactl, 0, NULL, -1, NULL); + printf("quotactl(QCMD(0 /* Q_??? */, USRQUOTA), NULL, -1, NULL) = %s\n", + sprintrc(rc)); + + + /* Q_QUOTAON */ + + check_quota(CQF_ID_STR | CQF_ADDR_STR, + ARG_STR(QCMD(Q_QUOTAON, USRQUOTA)), + ARG_STR("/dev/bogus/"), ARG_STR(QFMT_VFS_OLD), + ARG_STR("/tmp/bogus/")); + + rc = syscall(__NR_quotactl, QCMD(Q_QUOTAON, 0xfacefeed), bogus_dev, + bogus_id, bogus_addr); + printf("quotactl(QCMD(Q_QUOTAON, %#x /* ???QUOTA */)" + ", %s, %#x /* QFMT_VFS_??? */, %p) = %s\n", + QCMD_TYPE(QCMD(Q_QUOTAON, 0xfacefeed)), + bogus_dev_str, bogus_id, bogus_addr, sprintrc(rc)); + + + /* Q_QUOTAOFF */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + ARG_STR(QCMD(Q_QUOTAOFF, USRQUOTA)), + bogus_special, bogus_special_str); + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + ARG_STR(QCMD(Q_QUOTAOFF, GRPQUOTA)), + ARG_STR("/dev/bogus/")); + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + ARG_STR(QCMD(Q_QUOTAOFF, PRJQUOTA)), ARG_STR(NULL)); + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + QCMD(Q_QUOTAOFF, 3), "QCMD(Q_QUOTAOFF, 0x3 /* ???QUOTA */)", + ARG_STR(NULL)); + + + /* Q_GETQUOTA */ + + /* Trying our best to get successful result */ + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_GETQUOTA, USRQUOTA)), + ARG_STR("/dev/sda1"), getuid(), dqblk, print_dqblk, + (intptr_t) 1); + + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_GETQUOTA, GRPQUOTA)), + ARG_STR(NULL), -1, dqblk, print_dqblk, (intptr_t) 2); + + + /* Q_GETNEXTQUOTA */ + + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_GETNEXTQUOTA, USRQUOTA)), + ARG_STR("/dev/sda1"), 0, nextdqblk, print_nextdqblk, + (intptr_t) 1); + + + /* Q_SETQUOTA */ + + fill_memory(dqblk, sizeof(*dqblk)); + + check_quota(CQF_NONE, ARG_STR(QCMD(Q_SETQUOTA, PRJQUOTA)), + bogus_special, bogus_special_str, 0, bogus_addr); + + check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_SETQUOTA, PRJQUOTA)), + ARG_STR("/dev/bogus/"), 3141592653U, dqblk, print_dqblk, + (intptr_t) 0); + + + /* Q_GETINFO */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_GETINFO, GRPQUOTA)), + ARG_STR("/dev/sda1"), dqinfo, print_dqinfo, (intptr_t) 1); + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_GETINFO, GRPQUOTA)), + bogus_special, bogus_special_str, dqinfo, + print_dqinfo, (intptr_t) 2); + + /* Q_SETINFO */ + + fill_memory(dqinfo, sizeof(*dqinfo)); + /* In order to check flag printing correctness */ + dqinfo->dqi_flags = 0xdeadabcd; + + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_SETINFO, PRJQUOTA)), + bogus_special, bogus_special_str, ARG_STR(NULL)); + + check_quota(CQF_ID_SKIP | CQF_ADDR_CB, + ARG_STR(QCMD(Q_SETINFO, USRQUOTA)), + ARG_STR("/dev/bogus/"), dqinfo, print_dqinfo, (intptr_t) 0); + + + /* Q_GETFMT */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_STR, + ARG_STR(QCMD(Q_GETFMT, PRJQUOTA)), + bogus_special, bogus_special_str, ARG_STR(NULL)); + check_quota(CQF_ID_SKIP, + ARG_STR(QCMD(Q_GETFMT, USRQUOTA)), + unterminated, unterminated_str, fmt + 1); + check_quota(CQF_ID_SKIP, + ARG_STR(QCMD(Q_GETFMT, GRPQUOTA)), + ARG_STR("/dev/sda1"), fmt); + + + /* Q_SYNC */ + + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + ARG_STR(QCMD(Q_SYNC, USRQUOTA)), + bogus_special, bogus_special_str); + check_quota(CQF_ID_SKIP | CQF_ADDR_SKIP, + QCMD(Q_SYNC, 0xfff), "QCMD(Q_SYNC, 0xff /* ???QUOTA */)", + ARG_STR(NULL)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_quotactl && " + "(HAVE_LINUX_QUOTA_H || HAVE_SYS_QUOTA_H)"); + +#endif diff --git a/tests-mx32/quotactl.h b/tests-mx32/quotactl.h new file mode 100644 index 000000000..31eaec586 --- /dev/null +++ b/tests-mx32/quotactl.h @@ -0,0 +1,166 @@ +/* + * Common definitions for Linux and XFS quota tests. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef STRACE_TESTS_QUOTACTL_H +#define STRACE_TESTS_QUOTACTL_H + +# include +# include +# include + +# ifdef HAVE_LINUX_QUOTA_H +/* Broken in CentOS 5: has extern spinlock_t dq_data_lock; declaration */ +# include +# else +# include +/* Broken in some new glibc versions: have Q_GETNEXTQUOTA definition but no + * struct nextdqblk defined. Fixed in glibc-2.24-106-g4d72808. */ +# include +# endif + +# ifndef QCMD_CMD +# define QCMD_CMD(_val) ((unsigned) (_val) >> SUBCMDSHIFT) +# endif /* !QCMD_CMD */ + +# ifndef QCMD_TYPE +# define QCMD_TYPE(_val) ((unsigned) (_val) & SUBCMDMASK) +# endif /* !QCMD_TYPE */ + +# ifndef PRJQUOTA +# define PRJQUOTA 2 +# endif + +# define PRINT_FIELD_D(prefix, where, field) \ + printf("%s%s=%lld", (prefix), #field, \ + sign_extend_unsigned_to_ll((where)->field)) + +# define PRINT_FIELD_U(prefix, where, field) \ + printf("%s%s=%llu", (prefix), #field, \ + zero_extend_signed_to_ull((where)->field)) + +# define PRINT_FIELD_X(prefix, where, field) \ + printf("%s%s=%#llx", (prefix), #field, \ + zero_extend_signed_to_ull((where)->field)) + +typedef void (*print_cb)(long rc, void *addr, void *arg); + +enum check_quotactl_flag_bits { + CQF_ID_SKIP_BIT, + CQF_ID_STR_BIT, + CQF_ADDR_SKIP_BIT, + CQF_ADDR_STR_BIT, + CQF_ADDR_CB_BIT, +}; + +enum check_quotactl_flags { + CQF_NONE, + CQF_ID_SKIP = 1 << CQF_ID_SKIP_BIT, + CQF_ID_STR = 1 << CQF_ID_STR_BIT, + CQF_ADDR_SKIP = 1 << CQF_ADDR_SKIP_BIT, + CQF_ADDR_STR = 1 << CQF_ADDR_STR_BIT, + CQF_ADDR_CB = 1 << CQF_ADDR_CB_BIT, +}; + + +static inline void +check_quota(uint32_t flags, int cmd, const char *cmd_str, + const char *special, const char *special_str, ...) +{ + long rc; + const char *addr_str = NULL; + const char *id_str = NULL; + void *addr = NULL; + print_cb addr_cb = NULL; + void *addr_cb_arg = NULL; + uint32_t id = -1; + + va_list ap; + + va_start(ap, special_str); + + if (!(flags & CQF_ID_SKIP)) { + id = va_arg(ap, uint32_t); + + if (flags & CQF_ID_STR) + id_str = va_arg(ap, const char *); + } + + if (!(flags & CQF_ADDR_SKIP)) { + addr = va_arg(ap, void *); + + if (flags & CQF_ADDR_CB) { + addr_cb = va_arg(ap, print_cb); + addr_cb_arg = va_arg(ap, void *); + } else if (flags & CQF_ADDR_STR) { + addr_str = va_arg(ap, const char *); + } + } + + va_end(ap); + + rc = syscall(__NR_quotactl, cmd, special, id, addr); + printf("quotactl(%s, %s", cmd_str, special_str); + + if (!(flags & CQF_ID_SKIP)) { + if (flags & CQF_ID_STR) { + printf(", %s", id_str); + } else { + if (id == (uint32_t)-1) + printf(", -1"); + else + printf(", %u", id); + } + } + + if (!(flags & CQF_ADDR_SKIP)) { + if (flags & CQF_ADDR_CB) { + printf(", "); + addr_cb(rc, addr, addr_cb_arg); + } else if (flags & CQF_ADDR_STR) { + printf(", %s", addr_str); + } else { + printf(", %p", addr); + } + } + + printf(") = %s\n", sprintrc(rc)); +} + + +static const int bogus_cmd = 0xbadc0ded; +static const int bogus_id = 0xca7faced; + +/* It is invalid anyway due to the slash in the end */ +static const char *bogus_dev = "/dev/bogus/"; +static const char *bogus_dev_str = "\"/dev/bogus/\""; + +static const char unterminated_data[] = { '\1', '\2', '\3' }; + +#endif /* !STRACE_TESTS_QUOTACTL_H */ diff --git a/tests-mx32/quotactl.test b/tests-mx32/quotactl.test new file mode 100755 index 000000000..d0101f466 --- /dev/null +++ b/tests-mx32/quotactl.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of quotactl syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/read-write.c b/tests-mx32/read-write.c new file mode 100644 index 000000000..262e07b5b --- /dev/null +++ b/tests-mx32/read-write.c @@ -0,0 +1,224 @@ +/* + * Check decoding and dumping of read and write syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +static void +dump_str(const char *str, const unsigned int len) +{ + static const char dots[16] = "................"; + unsigned int i; + + for (i = 0; i < len; i += 16) { + unsigned int n = len - i > 16 ? 16 : len - i; + const char *dump = hexdump_memdup(str + i, n); + + tprintf(" | %05x %-49s %-16.*s |\n", + i, dump, n, dots); + + free((void *) dump); + } +} + +static void +print_hex(const char *str, const unsigned int len) +{ + const unsigned char *ustr = (const unsigned char *) str; + unsigned int i; + + for (i = 0; i < len; ++i) { + unsigned int c = ustr[i]; + + switch (c) { + case '\t': + tprintf("\\t"); break; + case '\n': + tprintf("\\n"); break; + case '\v': + tprintf("\\v"); break; + case '\f': + tprintf("\\f"); break; + case '\r': + tprintf("\\r"); break; + default: + tprintf("\\%o", ustr[i]); + } + } +} + +static long +k_read(unsigned int fd, void *buf, size_t count) +{ + kernel_ulong_t kfd = (kernel_ulong_t) 0xfacefeed00000000ULL | fd; + return syscall(__NR_read, kfd, buf, count); +} + +static long +k_write(unsigned int fd, const void *buf, size_t count) +{ + kernel_ulong_t kfd = (kernel_ulong_t) 0xfacefeed00000000ULL | fd; + return syscall(__NR_write, kfd, buf, count); +} + +static void +test_dump(const unsigned int len) +{ + static char *buf; + + if (buf) { + size_t ps1 = get_page_size() - 1; + buf = (void *) (((size_t) buf + ps1) & ~ps1) - len; + } else { + buf = tail_alloc(len); + } + + long rc = k_read(0, buf, len); + if (rc != (int) len) + perror_msg_and_fail("read: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "read", 0); + print_hex(buf, len); + tprintf("\", %d) = %ld\n", len, rc); + dump_str(buf, len); + + unsigned int i; + for (i = 0; i < len; ++i) + buf[i] = i; + + rc = k_write(1, buf, len); + if (rc != (int) len) + perror_msg_and_fail("write: expected %d, returned %ld", + len, rc); + + tprintf("%s(%d, \"", "write", 1); + print_hex(buf, len); + tprintf("\", %d) = %ld\n", len, rc); + dump_str(buf, len); + + if (!len) + buf = 0; +} + +int +main(void) +{ + tprintf("%s", ""); + + static char tmp[] = "read-write-tmpfile"; + if (open(tmp, O_CREAT|O_RDONLY|O_TRUNC, 0600) != 0) + perror_msg_and_fail("creat: %s", tmp); + if (open(tmp, O_WRONLY) != 1) + perror_msg_and_fail("open: %s", tmp); + + static const char w_c[] = "0123456789abcde"; + const unsigned int w_len = LENGTH_OF(w_c); + const char *w_d = hexdump_strdup(w_c); + const void *w = tail_memdup(w_c, w_len); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + const unsigned int r0_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r0_len); + + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + const unsigned int r1_len = w_len - r0_len; + void *r1 = tail_alloc(w_len); + + void *efault = r1 - get_page_size(); + + long rc; + + rc = k_write(1, w, 0); + if (rc) + perror_msg_and_fail("write: expected 0, returned %ld", rc); + tprintf("write(1, \"\", 0) = 0\n"); + + rc = k_write(1, efault, 1); + if (rc != -1) + perror_msg_and_fail("write: expected -1 EFAULT" + ", returned %ld", rc); + tprintf("write(1, %p, 1) = -1 EFAULT (%m)\n", efault); + + rc = k_write(1, w, w_len); + if (rc != (int) w_len) + perror_msg_and_fail("write: expected %u, returned %ld", + w_len, rc); + tprintf("write(1, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + w_c, w_len, rc, w_d, w_c); + close(1); + + rc = k_read(0, r0, 0); + if (rc) + perror_msg_and_fail("read: expected 0, returned %ld", rc); + tprintf("read(0, \"\", 0) = 0\n"); + + rc = k_read(0, efault, 1); + if (rc != -1) + perror_msg_and_fail("read: expected -1, returned %ld", rc); + tprintf("read(0, %p, 1) = -1 EFAULT (%m)\n", efault); + + rc = k_read(0, r0, r0_len); + if (rc != (int) r0_len) + perror_msg_and_fail("read: expected %u, returned %ld", + r0_len, rc); + tprintf("read(0, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r0_c, r0_len, rc, r0_d, r0_c); + + rc = k_read(0, r1, w_len); + if (rc != (int) r1_len) + perror_msg_and_fail("read: expected %u, returned %ld", + r1_len, rc); + tprintf("read(0, \"%s\", %u) = %ld\n" + " | 00000 %-49s %-16s |\n", + r1_c, w_len, rc, r1_d, r1_c); + close(0); + + if (open("/dev/zero", O_RDONLY)) + perror_msg_and_fail("open"); + + if (open("/dev/null", O_WRONLY) != 1) + perror_msg_and_fail("open"); + + unsigned int i; + for (i = 0; i <= 32; ++i) + test_dump(i); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests-mx32/read-write.test b/tests-mx32/read-write.test new file mode 100755 index 000000000..3700541fa --- /dev/null +++ b/tests-mx32/read-write.test @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check decoding and dumping of read and write syscalls. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +tmpfile=read-write-tmpfile +> $tmpfile + +run_strace_match_diff \ + -a15 -eread=0 -ewrite=1 -e trace=read,write \ + -P $tmpfile -P /dev/zero -P /dev/null + +rm -f $tmpfile diff --git a/tests-mx32/readahead.c b/tests-mx32/readahead.c new file mode 100644 index 000000000..c11b577d2 --- /dev/null +++ b/tests-mx32/readahead.c @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef HAVE_READAHEAD +/* Check for glibc readahead argument passing bugs. */ +# ifdef __GLIBC__ +/* + * glibc < 2.8 had an incorrect order of higher and lower parts of offset, + * see https://sourceware.org/bugzilla/show_bug.cgi?id=5208 + */ +# if !(defined __GLIBC_MINOR__ && \ + (__GLIBC__ << 16) + __GLIBC_MINOR__ >= (2 << 16) + 8) +# undef HAVE_READAHEAD +# endif /* glibc < 2.8 */ +/* + * glibc < 2.25 had an incorrect implementation on mips n64, + * see https://sourceware.org/bugzilla/show_bug.cgi?id=21026 + */ +# if defined LINUX_MIPSN64 && !(defined __GLIBC_MINOR__ && \ + (__GLIBC__ << 16) + __GLIBC_MINOR__ >= (2 << 16) + 25) +# undef HAVE_READAHEAD +# endif /* LINUX_MIPSN64 && glibc < 2.25 */ +# endif /* __GLIBC__ */ +#endif /* HAVE_READAHEAD */ + +#ifdef HAVE_READAHEAD + +# include +# include + +static const int fds[] = { + -0x80000000, + -100, + -1, + 0, + 1, + 2, + 0x7fffffff, +}; + +static const off64_t offsets[] = { + -0x8000000000000000LL, + -0x5060708090a0b0c0LL, + -1LL, + 0, + 1, + 0xbadfaced, + 0x7fffffffffffffffLL, +}; + +static const unsigned long counts[] = { + 0UL, + 0xdeadca75, + (unsigned long) 0xface1e55beeff00dULL, + (unsigned long) 0xffffffffffffffffULL, +}; + +int +main(void) +{ + unsigned i; + unsigned j; + unsigned k; + ssize_t rc; + + for (i = 0; i < ARRAY_SIZE(fds); i++) + for (j = 0; j < ARRAY_SIZE(offsets); j++) + for (k = 0; k < ARRAY_SIZE(counts); k++) { + rc = readahead(fds[i], offsets[j], counts[k]); + + printf("readahead(%d, %lld, %lu) = %s\n", + fds[i], (long long) offsets[j], + counts[k], sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_READAHEAD") + +#endif diff --git a/tests-mx32/readahead.test b/tests-mx32/readahead.test new file mode 100755 index 000000000..397c6903f --- /dev/null +++ b/tests-mx32/readahead.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check readahead syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a1 diff --git a/tests-mx32/readdir.c b/tests-mx32/readdir.c new file mode 100644 index 000000000..8c4836200 --- /dev/null +++ b/tests-mx32/readdir.c @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_readdir + +# include +# include +# include +# include +# include +# include +# include + +static const char fname[] = + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" + "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nZ"; +static const char qname[] = + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\n" + "A\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nA\\nZ"; + +int +main(int ac, const char **av) +{ + char *dname; + struct { + unsigned long d_ino; + unsigned long d_off; + unsigned short d_reclen; + char d_name[1024]; + } e; + int rc; + + assert(ac == 1); + assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); + assert(!mkdir(dname, 0700)); + assert(!chdir(dname)); + (void) close(0); + assert(!creat(fname, 0600)); + assert(!close(0)); + assert(!open(".", O_RDONLY | O_DIRECTORY)); + while ((rc = syscall(__NR_readdir, 0, &e, 1))) { + if (rc < 0) + perror_msg_and_skip("readdir"); + e.d_name[e.d_reclen] = '\0'; + printf("readdir(0, {d_ino=%lu, d_off=%lu, d_reclen=%u" + ", d_name=\"%s\"}) = %d\n", + e.d_ino, e.d_off, e.d_reclen, + e.d_name[0] == '.' ? e.d_name : qname, rc); + } + printf("readdir(0, %p) = 0\n", &e); + puts("+++ exited with 0 +++"); + assert(!unlink(fname)); + assert(!chdir("..")); + assert(!rmdir(dname)); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_readdir") + +#endif diff --git a/tests-mx32/readdir.test b/tests-mx32/readdir.test new file mode 100755 index 000000000..e3132737f --- /dev/null +++ b/tests-mx32/readdir.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check readdir syscall decoding. + +. "${srcdir=.}/init.sh" + +rm -rf -- "$LOG".dir +run_strace_match_diff -a16 diff --git a/tests-mx32/readlink.c b/tests-mx32/readlink.c new file mode 100644 index 000000000..4ddf5fac3 --- /dev/null +++ b/tests-mx32/readlink.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2015 Gleb Fotengauer-Malinovskiy + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_readlink + +# include +# include + +# define PREFIX "test.readlink" +# define TARGET (PREFIX ".target") +# define LINKPATH (PREFIX ".link") + +int +main(void) +{ + const char * const fname = tail_memdup(LINKPATH, sizeof(LINKPATH)); + const char * const hex_fname = + hexquote_strndup(fname, sizeof(LINKPATH) - 1); + + const unsigned int size = sizeof(TARGET) - 1; + char * const buf = tail_alloc(size); + + (void) unlink(fname); + + long rc = syscall(__NR_readlink, fname, buf, size); + printf("readlink(\"%s\", %p, %u) = -1 ENOENT (%m)\n", + hex_fname, buf, size); + + if (symlink(TARGET, fname)) + perror_msg_and_fail("symlink"); + + rc = syscall(__NR_readlink, fname, buf, size); + if (rc < 0) { + perror("readlink"); + (void) unlink(fname); + return 77; + } + const char * const hex_buf = hexquote_strndup(buf, size); + printf("readlink(\"%s\", \"%s\", %u) = %u\n", + hex_fname, hex_buf, size, size); + + if (unlink(fname)) + perror_msg_and_fail("unlink"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_readlink") + +#endif diff --git a/tests-mx32/readlink.test b/tests-mx32/readlink.test new file mode 100755 index 000000000..c026ecbed --- /dev/null +++ b/tests-mx32/readlink.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check readlink syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -xx diff --git a/tests-mx32/readlinkat.c b/tests-mx32/readlinkat.c new file mode 100644 index 000000000..4d3b516cb --- /dev/null +++ b/tests-mx32/readlinkat.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2015 Gleb Fotengauer-Malinovskiy + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_readlinkat + +# include +# include + +# define PREFIX "test.readlinkat" +# define TARGET (PREFIX ".target") +# define LINKPATH (PREFIX ".link") + +int +main(void) +{ + const char * const fname = tail_memdup(LINKPATH, sizeof(LINKPATH)); + const char * const hex_fname = + hexquote_strndup(fname, sizeof(LINKPATH) - 1); + + const unsigned int size = sizeof(TARGET) - 1; + char * const buf = tail_alloc(size); + + (void) unlink(fname); + + long rc = syscall(__NR_readlinkat, -100, fname, buf, size); + printf("readlinkat(AT_FDCWD, \"%s\", %p, %u) = -1 ENOENT (%m)\n", + hex_fname, buf, size); + + if (symlink(TARGET, fname)) + perror_msg_and_fail("symlink"); + + rc = syscall(__NR_readlinkat, -100, fname, buf, size); + if (rc < 0) { + perror("readlinkat"); + (void) unlink(fname); + return 77; + } + const char * const hex_buf = hexquote_strndup(buf, size); + printf("readlinkat(AT_FDCWD, \"%s\", \"%s\", %u) = %u\n", + hex_fname, hex_buf, size, size); + + if (unlink(fname)) + perror_msg_and_fail("unlink"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_readlink") + +#endif diff --git a/tests-mx32/readlinkat.test b/tests-mx32/readlinkat.test new file mode 100755 index 000000000..229c8e1e6 --- /dev/null +++ b/tests-mx32/readlinkat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check readlinkat syscall decoding. + +. "${srcdir=.}/readlink.test" diff --git a/tests-mx32/readv.c b/tests-mx32/readv.c new file mode 100644 index 000000000..0e5aab65c --- /dev/null +++ b/tests-mx32/readv.c @@ -0,0 +1,157 @@ +/* + * Check decoding of readv and writev syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + pipe_maxfd(fds); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + const void *efault = w0 + LENGTH_OF(w0_c); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + long rc; + + rc = writev(fds[1], efault, 42); + tprintf("writev(%d, %p, 42) = %ld %s (%m)\n", + fds[1], efault, rc, errno2name()); + + rc = readv(fds[0], efault, 42); + tprintf("readv(%d, %p, 42) = %ld %s (%m)\n", + fds[0], efault, rc, errno2name()); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + + tprintf("writev(%d, [], 0) = %ld\n", + fds[1], (long) writev(fds[1], w_iov, 0)); + + rc = writev(fds[1], w_iov + ARRAY_SIZE(w_iov_) - 1, 2); + tprintf("writev(%d, [{iov_base=\"%s\", iov_len=%u}, %p], 2)" + " = %ld %s (%m)\n", + fds[1], w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + rc, errno2name()); + + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + assert(writev(fds[1], w_iov, ARRAY_SIZE(w_iov_)) == (int) w_len); + close(fds[1]); + tprintf("writev(%d, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + fds[1], w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + assert(readv(fds[0], r_iov, ARRAY_SIZE(r0_iov_)) == (int) r_len); + tprintf("readv(%d, [{iov_base=\"%s\", iov_len=%u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + fds[0], + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + + assert(readv(fds[0], r_iov, ARRAY_SIZE(r1_iov_)) == (int) w_len - (int) r_len); + tprintf("readv(%d, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"\", iov_len=%u}], %u) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + fds[0], r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(fds[0]); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests-mx32/readv.test b/tests-mx32/readv.test new file mode 100755 index 000000000..dc187996f --- /dev/null +++ b/tests-mx32/readv.test @@ -0,0 +1,65 @@ +#!/bin/sh +# +# Check decoding and dumping of readv and writev syscalls. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread=all -ewrite='!none' +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread='!none' -ewrite=all +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread=none -ewrite='!all' -eread='!0,1,2' -ewrite='!0,1,2' +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread='!all' -ewrite=none -eread='!0,1,2' -ewrite='!0,1,2' + +wfd="$(./print_maxfd)" +rfd="$(($wfd - 1))" +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread="$rfd" -ewrite="$wfd" +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread="!$rfd" -ewrite="!$wfd" -eread="$rfd" -ewrite="$wfd" + +rfds='!!!0' +[ $rfd -lt 1023 ] || rfd=1023 +i=0 +while [ $i -lt $rfd ]; do + rfds="$rfds,$i" + i=$(($i + 1)) +done + +wfds='!!!0' +[ $wfd -lt 1023 ] || wfd=1023 +i=0 +while [ $i -lt $wfd ]; do + wfds="$wfds,$i" + i=$(($i + 1)) +done + +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread="$rfds" -ewrite="$wfds" diff --git a/tests-mx32/reboot.c b/tests-mx32/reboot.c new file mode 100644 index 000000000..9b09e647e --- /dev/null +++ b/tests-mx32/reboot.c @@ -0,0 +1,37 @@ +#include "tests.h" +#include + +#ifdef __NR_reboot + +# include +# include +# include + +# define INVALID_MAGIC 319887762 +# define INVALID_CMD 0x01234568 + +int +main(void) +{ + static const char buf[] = "reboot"; + long rc = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, \ + INVALID_MAGIC, LINUX_REBOOT_CMD_RESTART2, buf); + printf("reboot(LINUX_REBOOT_MAGIC1, %#x /* LINUX_REBOOT_MAGIC_??? */," + " LINUX_REBOOT_CMD_RESTART2, \"%s\") = %ld %s (%m)\n", + INVALID_MAGIC, buf, rc, errno2name()); + + rc = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, \ + LINUX_REBOOT_MAGIC2, INVALID_CMD); + printf("reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2," + " %#x /* LINUX_REBOOT_CMD_??? */) = %ld %s (%m)\n", + INVALID_CMD, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_reboot") + +#endif diff --git a/tests-mx32/reboot.test b/tests-mx32/reboot.test new file mode 100755 index 000000000..a97dd21ab --- /dev/null +++ b/tests-mx32/reboot.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check reboot syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/recvfrom.c b/tests-mx32/recvfrom.c new file mode 100644 index 000000000..b12454d2b --- /dev/null +++ b/tests-mx32/recvfrom.c @@ -0,0 +1,89 @@ +/* + * Check decoding of sockaddr related arguments of recvfrom syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define TEST_SYSCALL_NAME recvfrom +#define TEST_SYSCALL_PREPARE send_un() +#define PREFIX_S_ARGS , recv_buf, 1, 0 +#define PREFIX_S_STR ", \"A\", 1, 0" +#define PREFIX_F_ARGS , 0, 1, 0 +#define PREFIX_F_STR ", NULL, 1, 0" +static void send_un(void); +static char recv_buf[1]; +#include "sockname.c" + +static int cfd; + +static void +send_un(void) +{ + if (send(cfd, "A", 1, 0) != 1) + perror_msg_and_skip("send"); +} + +int +main(void) +{ + cfd = socket(AF_UNIX, SOCK_STREAM, 0); + int lfd = socket(AF_UNIX, SOCK_STREAM, 0); + if (cfd < 0 || lfd < 0) + perror_msg_and_skip("socket"); + + struct sockaddr_un un = { + .sun_family = AF_UNIX, + .sun_path = TEST_SOCKET ".send" + }; + + (void) unlink(un.sun_path); + if (bind(cfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + (void) unlink(un.sun_path); + + un.sun_path[sizeof(TEST_SOCKET) - 1] = '\0'; + (void) unlink(un.sun_path); + + if (bind(lfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("bind"); + + if (listen(lfd, 1)) + perror_msg_and_skip("listen"); + + if (connect(cfd, (const void *) &un, sizeof(un))) + perror_msg_and_skip("connect"); + + int afd = accept(lfd, 0, 0); + if (afd < 0) + perror_msg_and_skip("accept"); + + (void) unlink(un.sun_path); + + test_sockname_syscall(afd); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/recvfrom.test b/tests-mx32/recvfrom.test new file mode 100755 index 000000000..9dfbc8985 --- /dev/null +++ b/tests-mx32/recvfrom.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of sockaddr related arguments of recvfrom syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff --git a/tests-mx32/recvmmsg-timeout.c b/tests-mx32/recvmmsg-timeout.c new file mode 100644 index 000000000..7cf064db4 --- /dev/null +++ b/tests-mx32/recvmmsg-timeout.c @@ -0,0 +1,71 @@ +/* + * Check decoding of timeout argument of recvmmsg syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#include "msghdr.h" + +int +main(void) +{ + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + + if (send(fds[1], "A", 1, 0) != 1) + perror_msg_and_skip("send"); + + char buf; + struct iovec iov = { .iov_base = &buf, .iov_len = sizeof(buf) }; + struct mmsghdr mh = { + .msg_hdr = { + .msg_iov = &iov, + .msg_iovlen = 1 + } + }; + struct timespec t = { .tv_sec = 0, .tv_nsec = 12345678 }; + + int rc = recv_mmsg(-1, &mh, 1, 0, &t); + printf("recvmmsg(-1, %p, 1, 0, {tv_sec=0, tv_nsec=12345678})" + " = %d %s (%m)\n", &mh, rc, errno2name()); + + rc = recv_mmsg(fds[0], &mh, 1, 0, &t); + if (rc < 0) + perror_msg_and_skip("recvmmsg"); + printf("recvmmsg(%d, [{msg_hdr={msg_name=NULL, msg_namelen=0" + ", msg_iov=[{iov_base=\"A\", iov_len=1}], msg_iovlen=1" + ", msg_controllen=0, msg_flags=0}, msg_len=1}], 1, 0" + ", {tv_sec=0, tv_nsec=12345678}) = " + "%d (left {tv_sec=0, tv_nsec=%d})\n", + fds[0], rc, (int) t.tv_nsec); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/recvmmsg-timeout.test b/tests-mx32/recvmmsg-timeout.test new file mode 100755 index 000000000..36a12221c --- /dev/null +++ b/tests-mx32/recvmmsg-timeout.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of timeout argument of recvmmsg syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 -e trace=recvmmsg diff --git a/tests-mx32/recvmsg.c b/tests-mx32/recvmsg.c new file mode 100644 index 000000000..fa41a9d41 --- /dev/null +++ b/tests-mx32/recvmsg.c @@ -0,0 +1,160 @@ +/* + * Check decoding of recvmsg and sendmsg syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) + perror_msg_and_skip("socketpair"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + static const char r0_c[] = "01234567"; + const char *r0_d = hexdump_strdup(r0_c); + static const char r1_c[] = "89abcde"; + const char *r1_d = hexdump_strdup(r1_c); + + const struct iovec w_iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); + const unsigned int w_len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + const struct msghdr w_mh_ = { + .msg_iov = w_iov, + .msg_iovlen = ARRAY_SIZE(w_iov_) + }; + const struct msghdr *w_mh = tail_memdup(&w_mh_, sizeof(w_mh_)); + + assert(sendmsg(1, w_mh, 0) == (int) w_len); + close(1); + tprintf("sendmsg(1, {msg_name=NULL, msg_namelen=0, msg_iov=" + "[{iov_base=\"%s\", iov_len=%u}, {iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}], msg_iovlen=%u" + ", msg_controllen=0, msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), + w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), + ARRAY_SIZE(w_iov_), w_len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, + LENGTH_OF(w2_c), w2_d, w2_c); + + const unsigned int r_len = (w_len + 1) / 2; + void *r0 = tail_alloc(r_len); + const struct iovec r0_iov_[] = { + { + .iov_base = r0, + .iov_len = r_len + } + }; + struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); + + const struct msghdr r_mh_ = { + .msg_iov = r_iov, + .msg_iovlen = ARRAY_SIZE(r0_iov_) + }; + struct msghdr *r_mh = tail_memdup(&r_mh_, sizeof(r_mh_)); + + assert(recvmsg(0, r_mh, 0) == (int) r_len); + tprintf("recvmsg(0, {msg_name=NULL, msg_namelen=0, msg_iov=" + "[{iov_base=\"%s\", iov_len=%u}], msg_iovlen=%u" + ", msg_controllen=0, msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); + + void *r1 = tail_alloc(r_len); + void *r2 = tail_alloc(w_len); + const struct iovec r1_iov_[] = { + { + .iov_base = r1, + .iov_len = r_len + }, + { + .iov_base = r2, + .iov_len = w_len + } + }; + r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); + r_mh->msg_iov = r_iov; + r_mh->msg_iovlen = ARRAY_SIZE(r1_iov_); + + assert(recvmsg(0, r_mh, 0) == (int) w_len - (int) r_len); + tprintf("recvmsg(0, {msg_name=NULL, msg_namelen=0, msg_iov=" + "[{iov_base=\"%s\", iov_len=%u}, {iov_base=\"\", iov_len=%u}]" + ", msg_iovlen=%u, msg_controllen=0, msg_flags=0}, 0) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n", + r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), w_len - r_len, + w_len - r_len, r1_d, r1_c); + close(0); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests-mx32/recvmsg.test b/tests-mx32/recvmsg.test new file mode 100755 index 000000000..e373a20a6 --- /dev/null +++ b/tests-mx32/recvmsg.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of recvmsg and sendmsg syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -eread=0 -ewrite=1 -e trace=recvmsg,sendmsg diff --git a/tests-mx32/redirect-fds.c b/tests-mx32/redirect-fds.c new file mode 100644 index 000000000..fc1073a73 --- /dev/null +++ b/tests-mx32/redirect-fds.c @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +#define N_FDS 3 + +/* + * Do not print any messages, indicate errors with return codes. + */ +static int +check_fd(int fd, const char *fname) +{ + const int should_be_closed = (fname[0] == '\0'); + + struct stat st_fd, st_fn; + + if (fstat(fd, &st_fd)) { + if (!should_be_closed) + return 10 + fd; + } else { + if (should_be_closed) + return 20 + fd; + + if (stat(fname, &st_fn)) + return 30 + fd; + + if (st_fd.st_dev != st_fn.st_dev + || st_fd.st_ino != st_fn.st_ino) + return 40 + fd; + } + + return 0; +} + +int +main(int ac, char **av) +{ + assert(ac == 1 + N_FDS); + + int rc = 0, fd; + for (fd = 1; fd < 1 + N_FDS; ++fd) + if ((rc = check_fd(fd - 1, av[fd]))) + break; + + return rc; +} diff --git a/tests-mx32/redirect-fds.test b/tests-mx32/redirect-fds.test new file mode 100755 index 000000000..ddef8fab1 --- /dev/null +++ b/tests-mx32/redirect-fds.test @@ -0,0 +1,71 @@ +#!/bin/sh +# +# Check that strace does not leak placeholder descriptors. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +case "$STRACE" in + *valgrind\ *--suppressions=*) + skip_ 'incompatible with valgrind' ;; +esac + +fd0="$LOG.fd0" +fd1="$LOG.fd1" +fd2="$LOG.fd2" + +check_prog touch + +check_fd() +{ + local a1 a2 a3 + a1="$1" + a2="$2" + a3="$3" + + touch "$LOG" "$fd0" || + framework_skip_ 'failed to create files' + + set -- "\"./$NAME\"" "\"$1\"" "\"$2\"" "\"$3\"" + eval "$@" "<${a1:-&-}" ">${a2:-&-}" "2>${a3:-&-}" || + fail_ "$* failed with code $rc" + + set -- "$STRACE" -o"$LOG" -echdir "$@" + eval "$@" "<${a1:-&-}" ">${a2:-&-}" "2>${a3:-&-}" || + dump_log_and_fail_with "$* failed with code $?" + + rm -f "$LOG" "$fd0" "$fd1" "$fd2" +} + +check_fd "$fd0" "$fd1" "$fd2" +check_fd '' "$fd1" "$fd2" +check_fd "$fd0" '' "$fd2" +check_fd "$fd0" "$fd1" '' +check_fd '' '' "$fd2" +check_fd '' "$fd1" '' +check_fd "$fd0" '' '' +check_fd '' '' '' diff --git a/tests-mx32/redirect.test b/tests-mx32/redirect.test new file mode 100755 index 000000000..fa0c53696 --- /dev/null +++ b/tests-mx32/redirect.test @@ -0,0 +1,78 @@ +#!/bin/sh +# +# Ensure that strace does not retain stdin and stdout descriptors. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +check_prog sleep +check_prog yes + +> "$OUT" +> "$LOG" +( + while [ -f "$LOG" ]; do + : + done + $SLEEP_A_BIT & + yes + if kill -0 $! 2> /dev/null; then + wait + else + echo TIMEOUT >> "$OUT" + fi +) | $STRACE -qq -enone -esignal=none \ + sh -c "exec <&- >&-; rm -f -- $LOG; $SLEEP_A_BIT; $SLEEP_A_BIT" + +if [ -s "$OUT" ]; then + fail_ "$STRACE failed to redirect standard input" +fi + +> "$LOG" +$STRACE -qq -enone -esignal=none \ + sh -c "exec <&- >&-; rm -f -- $LOG; $SLEEP_A_BIT; $SLEEP_A_BIT" | +( + while [ -f "$LOG" ]; do + : + done + $SLEEP_A_BIT & + cat > /dev/null + if kill -0 $! 2> /dev/null; then + wait + else + echo TIMEOUT >> "$OUT" + fi +) + +if [ -s "$OUT" ]; then + fail_ "$STRACE failed to redirect standard output" +fi + +rm -f -- "$OUT" diff --git a/tests-mx32/remap_file_pages.c b/tests-mx32/remap_file_pages.c new file mode 100644 index 000000000..452d2de75 --- /dev/null +++ b/tests-mx32/remap_file_pages.c @@ -0,0 +1,61 @@ +/* + * Check decoding of remap_file_pages syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_remap_file_pages + +# include +# include +# include + +int +main(void) +{ + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL; + const unsigned long size = (unsigned long) 0xdefaced1bad2f00dULL; + const unsigned long prot = PROT_READ|PROT_WRITE|PROT_EXEC; + const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deedULL; + const unsigned long flags = MAP_PRIVATE|MAP_ANONYMOUS; + + long rc = syscall(__NR_remap_file_pages, addr, size, prot, pgoff, flags); + printf("remap_file_pages(%#lx, %lu, %s, %lu, %s) = %ld %s (%m)\n", + addr, size, "PROT_READ|PROT_WRITE|PROT_EXEC", pgoff, + "MAP_PRIVATE|MAP_ANONYMOUS", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_remap_file_pages") + +#endif diff --git a/tests-mx32/remap_file_pages.test b/tests-mx32/remap_file_pages.test new file mode 100755 index 000000000..9d51a9a06 --- /dev/null +++ b/tests-mx32/remap_file_pages.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check remap_file_pages syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/rename.c b/tests-mx32/rename.c new file mode 100644 index 000000000..2a2a4e01e --- /dev/null +++ b/tests-mx32/rename.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_rename + +# include +# include + +# define OLD_FILE "rename_old" +# define NEW_FILE "rename_new" + +int +main(void) +{ + long rc = syscall(__NR_rename, OLD_FILE, NEW_FILE); + printf("rename(\"%s\", \"%s\") = %ld %s (%m)\n", + OLD_FILE, NEW_FILE, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rename") + +#endif diff --git a/tests-mx32/rename.test b/tests-mx32/rename.test new file mode 100755 index 000000000..9067e4cce --- /dev/null +++ b/tests-mx32/rename.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rename syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff --git a/tests-mx32/renameat.c b/tests-mx32/renameat.c new file mode 100644 index 000000000..2b874efac --- /dev/null +++ b/tests-mx32/renameat.c @@ -0,0 +1,31 @@ +#include "tests.h" +#include + +#ifdef __NR_renameat + +# include +# include + +# define OLD_FILE "renameat_old" +# define NEW_FILE "renameat_new" + +int +main(void) +{ + const long int fd_old = (long int) 0xdeadbeefffffffffULL; + const long int fd_new = (long int) 0xdeadbeeffffffffeULL; + + long rc = syscall(__NR_renameat, fd_old, OLD_FILE, fd_new, NEW_FILE); + printf("renameat(%d, \"%s\", %d, \"%s\") = %ld %s (%m)\n", + (int) fd_old, OLD_FILE, (int) fd_new, NEW_FILE, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_renameat") + +#endif diff --git a/tests-mx32/renameat.test b/tests-mx32/renameat.test new file mode 100755 index 000000000..9b0a61dd5 --- /dev/null +++ b/tests-mx32/renameat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check renameat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/renameat2.c b/tests-mx32/renameat2.c new file mode 100644 index 000000000..33f889884 --- /dev/null +++ b/tests-mx32/renameat2.c @@ -0,0 +1,63 @@ +/* + * Check decoding of renameat2 syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_renameat2 + +# include +# include + +int +main(void) +{ + static const char oldpath[] = "renameat2_oldpath"; + static const char newpath[] = "renameat2_newpath"; + const unsigned long olddirfd = + (unsigned long) 0xfacefeedffffffff; + const unsigned long newdirfd = + (unsigned long) 0xfacefeed00000000 | -100U; + + long rc = syscall(__NR_renameat2, + olddirfd, oldpath, newdirfd, newpath, 1); + printf("renameat2(%d, \"%s\", AT_FDCWD, \"%s\", RENAME_NOREPLACE)" + " = %ld %s (%m)\n", + (int) olddirfd, oldpath, newpath, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_renameat2") + +#endif diff --git a/tests-mx32/renameat2.test b/tests-mx32/renameat2.test new file mode 100755 index 000000000..4c176bbd9 --- /dev/null +++ b/tests-mx32/renameat2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check renameat2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/request_key.c b/tests-mx32/request_key.c new file mode 100644 index 000000000..fea977b2d --- /dev/null +++ b/tests-mx32/request_key.c @@ -0,0 +1,149 @@ +/* + * Check decoding of request_key syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_request_key + +# include +# include +# include + +void +print_val_str(const void *ptr, const char *str) +{ + if (str) + printf("%s, ", str); + else + printf("%p, ", ptr); +} + +void +do_request_key(const char *type, const char *type_str, const char *desc, + const char *desc_str, const char *info, const char *info_str, + int32_t keyring, const char *keyring_str) +{ + long rc = syscall(__NR_request_key, type, desc, info, keyring); + const char *errstr = sprintrc(rc); + printf("request_key("); + print_val_str(type, type_str); + print_val_str(desc, desc_str); + print_val_str(info, info_str); + if (keyring_str) + printf("%s", keyring_str); + else + printf("%d", keyring); + printf(") = %s\n", errstr); +} + +int +main(void) +{ + static const char unterminated1[] = { '\1', '\2', '\3', '\4', '\5' }; + static const char unterminated2[] = { '\6', '\7', '\10', '\11', '\12' }; + static const char unterminated3[] = + { '\16', '\17', '\20', '\21', '\22' }; + + char *bogus_type = tail_memdup(unterminated1, sizeof(unterminated1)); + char *bogus_desc = tail_memdup(unterminated2, sizeof(unterminated2)); + char *bogus_info = tail_memdup(unterminated3, sizeof(unterminated3)); + + unsigned i; + unsigned j; + unsigned k; + unsigned l; + + struct { + const char *type; + const char *str; + } types[] = { + { ARG_STR(NULL) }, + { bogus_type + sizeof(unterminated1), NULL }, + { bogus_type, NULL }, + { ARG_STR("\20\21\22\23\24") }, + { ARG_STR("user") }, + }; + + struct { + const char *desc; + const char *str; + } descs[] = { + { ARG_STR(NULL) }, + { bogus_desc + sizeof(unterminated2), NULL }, + { bogus_desc, NULL }, + { ARG_STR("\25\26\27\30\31") }, + { ARG_STR("desc") }, + { "overly long description", _STR("overly long ") "..." }, + }; + + struct { + const char *info; + const char *str; + } infos[] = { + { ARG_STR(NULL) }, + { bogus_info + sizeof(unterminated3), NULL }, + { bogus_info, NULL }, + { ARG_STR("\32\33\34\35\36") }, + { ARG_STR("info") }, + { "overly long info", _STR("overly long ") "..." }, + }; + + struct { + uint32_t keyring; + const char *str; + } keyrings[] = { + { ARG_STR(0) }, + { ARG_STR(1234567890) }, + { ARG_STR(-1234567890) }, + { -1, "KEY_SPEC_THREAD_KEYRING" }, + }; + + for (i = 0; i < ARRAY_SIZE(types); i++) + for (j = 0; j < ARRAY_SIZE(descs); j++) + for (k = 0; k < ARRAY_SIZE(infos); k++) + for (l = 0; l < ARRAY_SIZE(keyrings); l++) + do_request_key( + types[i].type, types[i].str, + descs[j].desc, descs[j].str, + infos[k].info, infos[k].str, + keyrings[l].keyring, + keyrings[l].str); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_request_key"); + +#endif diff --git a/tests-mx32/request_key.test b/tests-mx32/request_key.test new file mode 100755 index 000000000..9812a18e5 --- /dev/null +++ b/tests-mx32/request_key.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of request_key syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 -s12 diff --git a/tests-mx32/restart_syscall.c b/tests-mx32/restart_syscall.c new file mode 100644 index 000000000..e492e62e2 --- /dev/null +++ b/tests-mx32/restart_syscall.c @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +int +main(void) +{ +#if defined __x86_64__ && defined __ILP32__ + /* + * x32 is broken from the beginning: + * https://lkml.org/lkml/2015/11/30/790 + */ + error_msg_and_skip("x32 is broken"); +#else + const sigset_t set = {}; + const struct sigaction act = { .sa_handler = SIG_IGN }; + const struct itimerval itv = { .it_value.tv_usec = 111111 }; + struct timespec req = { .tv_nsec = 222222222 }, rem; + + assert(sigaction(SIGALRM, &act, NULL) == 0); + assert(sigprocmask(SIG_SETMASK, &set, NULL) == 0); + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_skip("setitimer"); + if (nanosleep(&req, &rem)) + perror_msg_and_fail("nanosleep"); + + printf("nanosleep\\(\\{tv_sec=%jd, tv_nsec=%jd\\}, " + "\\{tv_sec=%jd, tv_nsec=%jd\\}\\)" + " = \\? ERESTART_RESTARTBLOCK \\(Interrupted by signal\\)\n", + (intmax_t) req.tv_sec, (intmax_t) req.tv_nsec, + (intmax_t) rem.tv_sec, (intmax_t) rem.tv_nsec); + puts("--- SIGALRM \\{si_signo=SIGALRM, si_code=SI_KERNEL\\} ---"); +#ifdef __arm__ +/* old kernels used to overwrite ARM_r0 with -EINTR */ +# define ALTERNATIVE_NANOSLEEP_REQ "0xfffffffc|" +#else +# define ALTERNATIVE_NANOSLEEP_REQ "" +#endif + printf("(nanosleep\\((%s\\{tv_sec=%jd, tv_nsec=%jd\\}), " + "%p|restart_syscall\\(<\\.\\.\\." + " resuming interrupted nanosleep \\.\\.\\.>)\\) = 0\n", + ALTERNATIVE_NANOSLEEP_REQ, + (intmax_t) req.tv_sec, (intmax_t) req.tv_nsec, &rem); + + puts("\\+\\+\\+ exited with 0 \\+\\+\\+"); + return 0; +#endif +} diff --git a/tests-mx32/restart_syscall.test b/tests-mx32/restart_syscall.test new file mode 100755 index 000000000..6dfda1686 --- /dev/null +++ b/tests-mx32/restart_syscall.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check how "resuming interrupted nanosleep" works. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +syscalls=nanosleep,restart_syscall +run_strace -a20 -e trace=$syscalls $args > "$OUT" +match_grep "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests-mx32/rmdir.c b/tests-mx32/rmdir.c new file mode 100644 index 000000000..20952d84d --- /dev/null +++ b/tests-mx32/rmdir.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_rmdir + +# include +# include + +int +main(void) +{ + static const char sample[] = "rmdir_sample"; + long rc = syscall(__NR_rmdir, sample); + printf("rmdir(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rmdir") + +#endif diff --git a/tests-mx32/rmdir.test b/tests-mx32/rmdir.test new file mode 100755 index 000000000..81ee66b8a --- /dev/null +++ b/tests-mx32/rmdir.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rmdir syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff --git a/tests-mx32/rt_sigpending.c b/tests-mx32/rt_sigpending.c new file mode 100644 index 000000000..accf69134 --- /dev/null +++ b/tests-mx32/rt_sigpending.c @@ -0,0 +1,128 @@ +/* + * This file is part of rt_sigpending strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigpending + +# include +# include +# include +# include +# include + +static long +k_sigpending(void *const set, const unsigned long size) +{ + return syscall(__NR_rt_sigpending, set, size); +} + +static void +iterate(const char *const text, unsigned int size, void *set) +{ + for (;;) { + if (k_sigpending(set, size)) { + tprintf("rt_sigpending(%p, %u) = -1 EFAULT (%m)\n", + set, size); + break; + } + if (size) { +#if WORDS_BIGENDIAN + if (size < sizeof(long)) + tprintf("rt_sigpending(%s, %u) = 0\n", + "[]", size); + else +#endif + tprintf("rt_sigpending(%s, %u) = 0\n", + text, size); + } else { + tprintf("rt_sigpending(%p, %u) = 0\n", set, size); + break; + } + size >>= 1; + set += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + + sigemptyset(libc_set); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + memset(k_set, 0, big_size); + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + if (!k_sigpending(k_set, set_size)) + break; + tprintf("rt_sigpending(%p, %u) = -1 EINVAL (%m)\n", + k_set, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigpending"); + tprintf("rt_sigpending(%s, %u) = 0\n", "[]", set_size); + + iterate("[]", set_size >> 1, k_set + (set_size >> 1)); + + void *const efault = k_set + (set_size >> 1); + assert(k_sigpending(efault, set_size) == -1); + tprintf("rt_sigpending(%p, %u) = -1 EFAULT (%m)\n", + efault, set_size); + + sigaddset(libc_set, SIGHUP); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + raise(SIGHUP); + + iterate("[HUP]", set_size, k_set); + + sigaddset(libc_set, SIGINT); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + raise(SIGINT); + + iterate("[HUP INT]", set_size, k_set); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigpending") + +#endif diff --git a/tests-mx32/rt_sigpending.test b/tests-mx32/rt_sigpending.test new file mode 100755 index 000000000..40c83a810 --- /dev/null +++ b/tests-mx32/rt_sigpending.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigpending syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff --git a/tests-mx32/rt_sigprocmask.c b/tests-mx32/rt_sigprocmask.c new file mode 100644 index 000000000..27e357fab --- /dev/null +++ b/tests-mx32/rt_sigprocmask.c @@ -0,0 +1,174 @@ +/* + * This file is part of rt_sigprocmask strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigprocmask + +# include +# include +# include +# include +# include + +static long +k_sigprocmask(const unsigned long how, void *const new_set, + void *const old_set, const unsigned long size) +{ + return syscall(__NR_rt_sigprocmask, how, new_set, old_set, size); +} + +static void +iterate(const char *const text, void *set, void *old, unsigned int size) +{ + for (;;) { + if (k_sigprocmask(SIG_UNBLOCK, set, old, size)) { + if (size < sizeof(long)) + tprintf("rt_sigprocmask(SIG_UNBLOCK" + ", %p, %p, %u) = -1 EINVAL (%m)\n", + set, old, size); + else + tprintf("rt_sigprocmask(SIG_UNBLOCK" + ", %s, %p, %u) = -1 EINVAL (%m)\n", + text, old, size); + } else { + tprintf("rt_sigprocmask(SIG_UNBLOCK, %s, [], %u)" + " = 0\n", text, size); + } + if (!size) + break; + size >>= 1; + set += size; + old += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + unsigned int set_size; + + for (set_size = big_size; set_size; set_size >>= 1) { + if (!k_sigprocmask(SIG_SETMASK, NULL, NULL, set_size)) + break; + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, NULL, %u)" + " = -1 EINVAL (%m)\n", set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, NULL, %u) = 0\n", + set_size); + + void *const k_set = tail_alloc(set_size); + void *const old_set = tail_alloc(set_size); + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + + memset(k_set, 0, set_size); + if (k_sigprocmask(SIG_SETMASK, k_set, NULL, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, [], NULL, %u) = 0\n", set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set - set_size, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[], [], %u) = 0\n", set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set - set_size, + old_set, set_size << 1) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %p, %p, %u) = -1 EINVAL (%m)\n", + k_set - set_size, old_set, set_size << 1); + + iterate("~[]", k_set - set_size, old_set, set_size >> 1); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_BLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_BLOCK, [HUP], [], %u) = 0\n", set_size); + + memset(libc_set, -1, sizeof(sigset_t)); + sigdelset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[HUP], [HUP], %u) = 0\n", + set_size); + + sigdelset(libc_set, SIGKILL); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_UNBLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_UNBLOCK, ~[HUP KILL], [HUP], %u) = 0\n", + set_size); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + sigaddset(libc_set, SIGINT); + sigaddset(libc_set, SIGQUIT); + sigaddset(libc_set, SIGALRM); + sigaddset(libc_set, SIGTERM); + memcpy(k_set, libc_set, set_size); + + if (k_sigprocmask(SIG_BLOCK, k_set, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_BLOCK, %s, [HUP], %u) = 0\n", + "[HUP INT QUIT ALRM TERM]", set_size); + + if (k_sigprocmask(SIG_SETMASK, NULL, old_set, set_size)) + perror_msg_and_fail("rt_sigprocmask"); + tprintf("rt_sigprocmask(SIG_SETMASK, NULL, %s, %u) = 0\n", + "[HUP INT QUIT ALRM TERM]", set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set + (set_size >> 1), NULL, + set_size) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %p, NULL, %u) = -1 EFAULT (%m)\n", + k_set + (set_size >> 1), set_size); + + assert(k_sigprocmask(SIG_SETMASK, k_set, old_set + (set_size >> 1), + set_size) == -1); + tprintf("rt_sigprocmask(SIG_SETMASK, %s, %p, %u) = -1 EFAULT (%m)\n", + "[HUP INT QUIT ALRM TERM]", + old_set + (set_size >> 1), set_size); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigprocmask") + +#endif diff --git a/tests-mx32/rt_sigprocmask.test b/tests-mx32/rt_sigprocmask.test new file mode 100755 index 000000000..1e60ebde5 --- /dev/null +++ b/tests-mx32/rt_sigprocmask.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigprocmask syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/rt_sigqueueinfo.c b/tests-mx32/rt_sigqueueinfo.c new file mode 100644 index 000000000..aba6776c5 --- /dev/null +++ b/tests-mx32/rt_sigqueueinfo.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015 Elvira Khabirova + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +int +main (void) +{ + struct sigaction sa = { + .sa_handler = SIG_IGN + }; + union sigval value = { + .sival_ptr = (void *) (unsigned long) 0xdeadbeefbadc0dedULL + }; + pid_t pid = getpid(); + + assert(sigaction(SIGUSR1, &sa, NULL) == 0); + if (sigqueue(pid, SIGUSR1, value)) + perror_msg_and_skip("sigqueue"); + printf("rt_sigqueueinfo(%u, SIGUSR1, {si_signo=SIGUSR1, " + "si_code=SI_QUEUE, si_pid=%u, si_uid=%u, " + "si_value={int=%d, ptr=%p}}) = 0\n", + pid, pid, getuid(), value.sival_int, value.sival_ptr); + printf("+++ exited with 0 +++\n"); + + return 0; +} diff --git a/tests-mx32/rt_sigqueueinfo.test b/tests-mx32/rt_sigqueueinfo.test new file mode 100755 index 000000000..c03c76f2a --- /dev/null +++ b/tests-mx32/rt_sigqueueinfo.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of rt_sigqueueinfo syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff --git a/tests-mx32/rt_sigsuspend.c b/tests-mx32/rt_sigsuspend.c new file mode 100644 index 000000000..73e133646 --- /dev/null +++ b/tests-mx32/rt_sigsuspend.c @@ -0,0 +1,165 @@ +/* + * This file is part of rt_sigsuspend strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigsuspend + +# include +# include +# include +# include +# include +# include +# include + +static long +k_sigsuspend(const sigset_t *const set, const unsigned long size) +{ + return syscall(__NR_rt_sigsuspend, set, size); +} + +static void +iterate(const char *const text, const int sig, + const void *const set, unsigned int size) +{ + const void *mask; + + for (mask = set;; size >>= 1, mask += size) { + raise(sig); + assert(k_sigsuspend(mask, size) == -1); + if (EINTR == errno) { + tprintf("rt_sigsuspend(%s, %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", + text, size); + } else { + if (size < sizeof(long)) + tprintf("rt_sigsuspend(%p, %u)" + " = -1 EINVAL (%m)\n", + mask, size); + else + tprintf("rt_sigsuspend(%s, %u)" + " = -1 EINVAL (%m)\n", + set == mask ? text : "~[]", size); + } + if (!size) + break; + } +} + +static void +handler(int signo) +{ +} + +int +main(void) +{ + tprintf("%s", ""); + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + memset(k_set, 0, big_size); + + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + sigemptyset(libc_set); + sigaddset(libc_set, SIGUSR1); + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct sigaction sa = { + .sa_handler = handler + }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + raise(SIGUSR1); + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + assert(k_sigsuspend(k_set, set_size) == -1); + if (EINTR == errno) + break; + tprintf("rt_sigsuspend(%p, %u) = -1 EINVAL (%m)\n", + k_set, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigsuspend"); + tprintf("rt_sigsuspend([], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigemptyset(libc_set); + sigaddset(libc_set, SIGUSR2); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([HUP USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + sigaddset(libc_set, SIGINT); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend([HUP INT USR2], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + memset(libc_set, -1, sizeof(*libc_set)); + sigdelset(libc_set, SIGUSR1); + memcpy(k_set, libc_set, set_size); + raise(SIGUSR1); + assert(k_sigsuspend(k_set, set_size) == -1); + assert(EINTR == errno); + tprintf("rt_sigsuspend(~[USR1], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", set_size); + + assert(k_sigsuspend(k_set - set_size, set_size << 1) == -1); + tprintf("rt_sigsuspend(%p, %u) = -1 EINVAL (%m)\n", + k_set - set_size, set_size << 1); + + iterate("~[USR1]", SIGUSR1, k_set, set_size >> 1); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigsuspend") + +#endif diff --git a/tests-mx32/rt_sigsuspend.test b/tests-mx32/rt_sigsuspend.test new file mode 100755 index 000000000..2e30fd4b1 --- /dev/null +++ b/tests-mx32/rt_sigsuspend.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigsuspend syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 -esignal=none diff --git a/tests-mx32/rt_sigtimedwait.c b/tests-mx32/rt_sigtimedwait.c new file mode 100644 index 000000000..10311e6ef --- /dev/null +++ b/tests-mx32/rt_sigtimedwait.c @@ -0,0 +1,185 @@ +/* + * This file is part of rt_sigtimedwait strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_sigtimedwait + +# include +# include +# include +# include +# include +# include +# include + +static long +k_sigtimedwait(const sigset_t *const set, siginfo_t *const info, + const struct timespec *const timeout, const unsigned long size) +{ + return syscall(__NR_rt_sigtimedwait, set, info, timeout, size); +} + +static void +iterate(const char *const text, const void *set, + const struct timespec *const timeout, unsigned int size) +{ + for (;;) { + assert(k_sigtimedwait(set, NULL, timeout, size) == -1); + if (EINTR == errno) { + tprintf("rt_sigtimedwait(%s, NULL, " + "{tv_sec=%jd, tv_nsec=%jd}, %u)" + " = -1 EAGAIN (%m)\n", text, + (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, + size); + } else { + if (size < sizeof(long)) + tprintf("rt_sigtimedwait(%p, NULL, " + "{tv_sec=%jd, tv_nsec=%jd}" + ", %u) = -1 EINVAL (%m)\n", + set, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, size); + else + tprintf("rt_sigtimedwait(%s, NULL, " + "{tv_sec=%jd, tv_nsec=%jd}" + ", %u) = -1 EINVAL (%m)\n", + text, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, size); + } + if (!size) + break; + size >>= 1; + set += size; + } +} + +int +main(void) +{ + tprintf("%s", ""); + + siginfo_t *const info = tail_alloc(sizeof(*info)); + struct timespec *const timeout = tail_alloc(sizeof(*timeout)); + timeout->tv_sec = 0; + timeout->tv_nsec = 42; + + const unsigned int big_size = 1024 / 8; + void *k_set = tail_alloc(big_size); + memset(k_set, 0, big_size); + + unsigned int set_size = big_size; + for (; set_size; set_size >>= 1, k_set += set_size) { + assert(k_sigtimedwait(k_set, NULL, timeout, set_size) == -1); + if (EAGAIN == errno) + break; + tprintf("rt_sigtimedwait(%p, NULL, {tv_sec=%jd, tv_nsec=%jd}, %u)" + " = -1 EINVAL (%m)\n", + k_set, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + } + if (!set_size) + perror_msg_and_fail("rt_sigtimedwait"); + tprintf("rt_sigtimedwait([], NULL, {tv_sec=%jd, tv_nsec=%jd}, %u) = -1 EAGAIN (%m)\n", + (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, + set_size); + + sigset_t *const libc_set = tail_alloc(sizeof(sigset_t)); + sigemptyset(libc_set); + sigaddset(libc_set, SIGHUP); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait([HUP], %p, {tv_sec=%jd, tv_nsec=%jd}, %u) = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + sigaddset(libc_set, SIGINT); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait([HUP INT], %p, {tv_sec=%jd, tv_nsec=%jd}, %u)" + " = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + sigaddset(libc_set, SIGQUIT); + sigaddset(libc_set, SIGALRM); + sigaddset(libc_set, SIGTERM); + memcpy(k_set, libc_set, set_size); + + assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait(%s, %p, {tv_sec=%jd, tv_nsec=%jd}, %u) = -1 EAGAIN (%m)\n", + "[HUP INT QUIT ALRM TERM]", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + memset(k_set - set_size, -1, set_size); + assert(k_sigtimedwait(k_set - set_size, info, timeout, set_size) == -1); + assert(EAGAIN == errno); + tprintf("rt_sigtimedwait(~[], %p, {tv_sec=%jd, tv_nsec=%jd}, %u) = -1 EAGAIN (%m)\n", + info, (intmax_t) timeout->tv_sec, + (intmax_t) timeout->tv_nsec, set_size); + + if (sigprocmask(SIG_SETMASK, libc_set, NULL)) + perror_msg_and_fail("sigprocmask"); + + assert(k_sigtimedwait(k_set - set_size, info, NULL, set_size << 1) == -1); + tprintf("rt_sigtimedwait(%p, %p, NULL, %u) = -1 EINVAL (%m)\n", + k_set - set_size, info, set_size << 1); + + iterate("~[]", k_set - set_size, timeout, set_size >> 1); + + timeout->tv_sec = 1; + raise(SIGALRM); + assert(k_sigtimedwait(k_set, info, timeout, set_size) == SIGALRM); + tprintf("rt_sigtimedwait(%s, {si_signo=%s, si_code=SI_TKILL" + ", si_pid=%d, si_uid=%d}, {tv_sec=%jd, tv_nsec=%jd}, %u) = %d (%s)\n", + "[HUP INT QUIT ALRM TERM]", "SIGALRM", getpid(), getuid(), + (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, + set_size, SIGALRM, "SIGALRM"); + + raise(SIGALRM); + assert(k_sigtimedwait(k_set, NULL, NULL, set_size) == SIGALRM); + tprintf("rt_sigtimedwait(%s, NULL, NULL, %u) = %d (%s)\n", + "[HUP INT QUIT ALRM TERM]", set_size, SIGALRM, "SIGALRM"); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigtimedwait") + +#endif diff --git a/tests-mx32/rt_sigtimedwait.test b/tests-mx32/rt_sigtimedwait.test new file mode 100755 index 000000000..e15fb7796 --- /dev/null +++ b/tests-mx32/rt_sigtimedwait.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check rt_sigtimedwait syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a38 diff --git a/tests-mx32/rt_tgsigqueueinfo.c b/tests-mx32/rt_tgsigqueueinfo.c new file mode 100644 index 000000000..ec0934812 --- /dev/null +++ b/tests-mx32/rt_tgsigqueueinfo.c @@ -0,0 +1,88 @@ +/* + * This file is part of rt_tgsigqueueinfo strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_rt_tgsigqueueinfo + +# include +# include +# include +# include +# include + +static long +k_tgsigqueueinfo(const pid_t pid, const int sig, const void *const info) +{ + return syscall(__NR_rt_tgsigqueueinfo, + (unsigned long) 0xffffffff00000000ULL | pid, + (unsigned long) 0xffffffff00000000ULL | pid, + (unsigned long) 0xffffffff00000000ULL | sig, + info); +} + +int +main (void) +{ + const struct sigaction sa = { + .sa_handler = SIG_IGN + }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + siginfo_t *const info = tail_alloc(sizeof(*info)); + memset(info, 0, sizeof(*info)); + info->si_signo = SIGUSR1; + info->si_errno = ENOENT; + info->si_code = SI_QUEUE; + info->si_pid = getpid(); + info->si_uid = getuid(); + info->si_value.sival_ptr = (void *) (unsigned long) 0xdeadbeeffacefeedULL; + + if (k_tgsigqueueinfo(info->si_pid, SIGUSR1, info)) + (errno == ENOSYS ? perror_msg_and_skip : perror_msg_and_fail)( + "rt_tgsigqueueinfo"); + + printf("rt_tgsigqueueinfo(%u, %u, %s, {si_signo=%s" + ", si_code=SI_QUEUE, si_errno=ENOENT, si_pid=%u" + ", si_uid=%u, si_value={int=%d, ptr=%p}}) = 0\n", + info->si_pid, info->si_pid, "SIGUSR1", "SIGUSR1", + info->si_pid, info->si_uid, info->si_value.sival_int, + info->si_value.sival_ptr); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_tgsigqueueinfo") + +#endif diff --git a/tests-mx32/rt_tgsigqueueinfo.test b/tests-mx32/rt_tgsigqueueinfo.test new file mode 100755 index 000000000..ab24e2d63 --- /dev/null +++ b/tests-mx32/rt_tgsigqueueinfo.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of rt_tgsigqueueinfo syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff --git a/tests-mx32/run.sh b/tests-mx32/run.sh new file mode 100755 index 000000000..02d99123c --- /dev/null +++ b/tests-mx32/run.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +. "${srcdir=.}/init.sh" + +$STRACE -V > /dev/null || + framework_failure_ "$STRACE is not available" + +TIMEOUT="timeout -s 9 $TIMEOUT_DURATION" +$TIMEOUT true > /dev/null 2>&1 || + TIMEOUT= + +exec $TIMEOUT "$@" diff --git a/tests-mx32/sched_get_priority_mxx.c b/tests-mx32/sched_get_priority_mxx.c new file mode 100644 index 000000000..fc14b27c6 --- /dev/null +++ b/tests-mx32/sched_get_priority_mxx.c @@ -0,0 +1,29 @@ +#include "tests.h" +#include + +#if defined(__NR_sched_get_priority_min) \ + && defined(__NR_sched_get_priority_max) + +# include +# include +# include + +int +main(void) +{ + int rc = syscall(__NR_sched_get_priority_min, SCHED_FIFO); + printf("sched_get_priority_min(SCHED_FIFO) = %d\n", rc); + + rc = syscall(__NR_sched_get_priority_max, SCHED_RR); + printf("sched_get_priority_max(SCHED_RR) = %d\n", rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_get_priority_min" + " && defined __NR_sched_get_priority_max"); + +#endif diff --git a/tests-mx32/sched_get_priority_mxx.test b/tests-mx32/sched_get_priority_mxx.test new file mode 100755 index 000000000..0d1a1a78a --- /dev/null +++ b/tests-mx32/sched_get_priority_mxx.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_get_priority_min and sched_get_priority_max syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 -e trace=sched_get_priority_min,sched_get_priority_max diff --git a/tests-mx32/sched_rr_get_interval.c b/tests-mx32/sched_rr_get_interval.c new file mode 100644 index 000000000..0aacd2b77 --- /dev/null +++ b/tests-mx32/sched_rr_get_interval.c @@ -0,0 +1,42 @@ +#include "tests.h" +#include + +#ifdef __NR_sched_rr_get_interval + +# include +# include +# include +# include + +int +main(void) +{ + struct timespec *const tp = tail_alloc(sizeof(struct timespec)); + long rc; + + rc = syscall(__NR_sched_rr_get_interval, 0, NULL); + printf("sched_rr_get_interval(0, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_sched_rr_get_interval, 0, tp + 1); + printf("sched_rr_get_interval(0, %p) = %s\n", tp + 1, sprintrc(rc)); + + rc = syscall(__NR_sched_rr_get_interval, -1, tp); + printf("sched_rr_get_interval(-1, %p) = %s\n", tp, sprintrc(rc)); + + rc = syscall(__NR_sched_rr_get_interval, 0, tp); + if (rc == 0) + printf("sched_rr_get_interval(0, {tv_sec=%jd, tv_nsec=%jd}) = " + "0\n", (intmax_t)tp->tv_sec, (intmax_t)tp->tv_nsec); + else + printf("sched_rr_get_interval(-1, %p) = %s\n", tp, + sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_rr_get_interval") + +#endif diff --git a/tests-mx32/sched_rr_get_interval.test b/tests-mx32/sched_rr_get_interval.test new file mode 100755 index 000000000..828ba5d03 --- /dev/null +++ b/tests-mx32/sched_rr_get_interval.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_rr_get_interval syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a31 diff --git a/tests-mx32/sched_xetaffinity.c b/tests-mx32/sched_xetaffinity.c new file mode 100644 index 000000000..41a18202d --- /dev/null +++ b/tests-mx32/sched_xetaffinity.c @@ -0,0 +1,135 @@ +/* + * This file is part of sched_xetaffinity strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_sched_getaffinity && defined __NR_sched_setaffinity \ + && defined CPU_ISSET_S && defined CPU_ZERO_S && defined CPU_SET_S + +# include +# include +# include +# include + +static const char *errstr; + +static int +getaffinity(unsigned long pid, unsigned long size, void *set) +{ + int rc = syscall(__NR_sched_getaffinity, pid, size, set); + errstr = sprintrc(rc); + return rc; +} + +static int +setaffinity(unsigned long pid, unsigned long size, void *set) +{ + int rc = syscall(__NR_sched_setaffinity, pid, size, set); + errstr = sprintrc(rc); + return rc; +} + +int +main(void) +{ + unsigned int cpuset_size = 1; + const pid_t pid = getpid(); + + while (cpuset_size) { + assert(getaffinity(pid, cpuset_size, NULL) == -1); + if (EFAULT == errno) + break; + if (EINVAL != errno) + perror_msg_and_skip("sched_getaffinity"); + printf("sched_getaffinity(%d, %u, NULL) = %s\n", + pid, cpuset_size, errstr); + cpuset_size <<= 1; + } + assert(cpuset_size); + printf("sched_getaffinity(%d, %u, NULL) = %s\n", + pid, cpuset_size, errstr); + + cpu_set_t *cpuset = tail_alloc(cpuset_size); + getaffinity(pid, cpuset_size, cpuset + 1); + printf("sched_getaffinity(%d, %u, %p) = %s\n", + pid, cpuset_size, cpuset + 1, errstr); + + int ret_size = getaffinity(pid, cpuset_size, cpuset); + if (ret_size < 0) + perror_msg_and_fail("sched_getaffinity(%d, %u, %p) = %s\n", + pid, (unsigned) cpuset_size, cpuset, errstr); + assert(ret_size <= (int) cpuset_size); + + printf("sched_getaffinity(%d, %u, [", pid, cpuset_size); + const char *sep; + unsigned int i, cpu; + for (i = 0, cpu = 0, sep = ""; i < (unsigned) ret_size * 8; ++i) { + if (CPU_ISSET_S(i, (unsigned) ret_size, cpuset)) { + printf("%s%u", sep, i); + sep = ", "; + cpu = i; + } + } + printf("]) = %s\n", errstr); + + CPU_ZERO_S(cpuset_size, cpuset); + CPU_SET_S(cpu, cpuset_size, cpuset); + if (setaffinity(pid, cpuset_size, cpuset)) + perror_msg_and_skip("sched_setaffinity"); + printf("sched_setaffinity(%d, %u, [%u]) = 0\n", + pid, cpuset_size, cpu); + + const unsigned int big_size = cpuset_size < 128 ? 128 : cpuset_size * 2; + cpuset = tail_alloc(big_size); + ret_size = getaffinity(pid, big_size, cpuset); + if (ret_size < 0) + perror_msg_and_fail("sched_getaffinity(%d, %u, %p) = %s\n", + pid, big_size, cpuset, errstr); + assert(ret_size <= (int) big_size); + printf("sched_getaffinity(%d, %u, [", pid, big_size); + for (i = 0, sep = ""; i < (unsigned) ret_size * 8; ++i) { + if (CPU_ISSET_S(i, (unsigned) ret_size, cpuset)) { + printf("%s%u", sep, i); + sep = ", "; + } + } + printf("]) = %s\n", errstr); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getaffinity && __NR_sched_setaffinity" + " && CPU_ISSET_S && CPU_ZERO_S && CPU_SET_S") + +#endif diff --git a/tests-mx32/sched_xetaffinity.test b/tests-mx32/sched_xetaffinity.test new file mode 100755 index 000000000..246ea21aa --- /dev/null +++ b/tests-mx32/sched_xetaffinity.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getaffinity and sched_setaffinity syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 -e trace=sched_getaffinity,sched_setaffinity diff --git a/tests-mx32/sched_xetattr.c b/tests-mx32/sched_xetattr.c new file mode 100644 index 000000000..1b484915f --- /dev/null +++ b/tests-mx32/sched_xetattr.c @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_sched_getattr && defined __NR_sched_setattr + +# include +# include +# include + +int +main(void) +{ + struct { + uint32_t size; + uint32_t sched_policy; + uint64_t sched_flags; + int32_t sched_nice; + uint32_t sched_priority; + uint64_t sched_runtime; + uint64_t sched_deadline; + uint64_t sched_period; + } *sched_attr = tail_alloc(sizeof(*sched_attr)); + + long rc = syscall(__NR_sched_getattr, 0xdeadface, NULL, 0, 0); + printf("sched_getattr\\(%d, NULL, 0, 0\\) += %s\n", + 0xdeadface, sprintrc_grep(rc)); + + rc = syscall(__NR_sched_getattr, -1, + sched_attr, 0xbadfaced, 0xc0defeed); + printf("sched_getattr\\(-1, %p, %u, %u\\) += %s\n", + sched_attr, 0xbadfaced, 0xc0defeed, sprintrc_grep(rc)); + + rc = syscall(__NR_sched_getattr, 0, + sched_attr + 1, sizeof(*sched_attr), 0); + printf("sched_getattr\\(0, %p, %u, 0\\) += %s\n", + sched_attr + 1, (unsigned)sizeof(*sched_attr), + sprintrc_grep(rc)); + + if (syscall(__NR_sched_getattr, 0, sched_attr, sizeof(*sched_attr), 0)) + perror_msg_and_skip("sched_getattr"); + + printf("sched_getattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+" + ", sched_flags=%s, sched_nice=%d, sched_priority=%u" + ", sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 + ", sched_period=%" PRIu64 "\\}, %u, 0\\) += 0\n", + sched_attr->size, + sched_attr->sched_flags ? "SCHED_FLAG_RESET_ON_FORK" : "0", + sched_attr->sched_nice, + sched_attr->sched_priority, + sched_attr->sched_runtime, + sched_attr->sched_deadline, + sched_attr->sched_period, + (unsigned) sizeof(*sched_attr)); + + sched_attr->sched_flags |= 1; + if (syscall(__NR_sched_setattr, 0, sched_attr, 0)) + perror_msg_and_skip("sched_setattr"); + + printf("sched_setattr\\(0, \\{size=%u, sched_policy=SCHED_[A-Z]+" + ", sched_flags=%s, sched_nice=%d, sched_priority=%u" + ", sched_runtime=%" PRIu64 ", sched_deadline=%" PRIu64 + ", sched_period=%" PRIu64 "\\}, 0\\) += 0\n", + sched_attr->size, + "SCHED_FLAG_RESET_ON_FORK", + sched_attr->sched_nice, + sched_attr->sched_priority, + sched_attr->sched_runtime, + sched_attr->sched_deadline, + sched_attr->sched_period); + + sched_attr->size = 0x90807060; + sched_attr->sched_policy = 0xca7faced; + sched_attr->sched_flags = 0xbadc0ded1057da7aULL; + sched_attr->sched_nice = 0xafbfcfdf; + sched_attr->sched_priority = 0xb8c8d8e8; + sched_attr->sched_runtime = 0xbadcaffedeadf157ULL; + sched_attr->sched_deadline = 0xc0de70a57badac75ULL; + sched_attr->sched_period = 0xded1ca7edda7aca7ULL; + + rc = syscall(__NR_sched_setattr, 0xfacec0de, sched_attr, 0xbeeff00d); + + printf("sched_setattr\\(%d, \\{size=%u, " + "sched_policy=%#x /\\* SCHED_\\?\\?\\? \\*/, " + "sched_flags=%#" PRIx64 " /\\* SCHED_FLAG_\\?\\?\\? \\*/, " + "sched_nice=%d, sched_priority=%u, sched_runtime=%" PRIu64 ", " + "sched_deadline=%" PRIu64 ", sched_period=%" PRIu64 "\\}, " + "%u\\) += %s\n", + 0xfacec0de, sched_attr->size, + sched_attr->sched_policy, + sched_attr->sched_flags, + sched_attr->sched_nice, + sched_attr->sched_priority, + sched_attr->sched_runtime, + sched_attr->sched_deadline, + sched_attr->sched_period, 0xbeeff00d, sprintrc_grep(rc)); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getattr && __NR_sched_setattr") + +#endif diff --git a/tests-mx32/sched_xetattr.test b/tests-mx32/sched_xetattr.test new file mode 100755 index 000000000..c2c7914c4 --- /dev/null +++ b/tests-mx32/sched_xetattr.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check sched_getattr and sched_setattr syscalls decoding. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -e sched_getattr,sched_setattr $args > "$OUT" +match_grep "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests-mx32/sched_xetparam.c b/tests-mx32/sched_xetparam.c new file mode 100644 index 000000000..e761a9d0e --- /dev/null +++ b/tests-mx32/sched_xetparam.c @@ -0,0 +1,33 @@ +#include "tests.h" +#include + +#if defined __NR_sched_getparam && defined __NR_sched_setparam + +# include +# include +# include + +int +main(void) +{ + struct sched_param *const param = + tail_alloc(sizeof(struct sched_param)); + + long rc = syscall(__NR_sched_getparam, 0, param); + printf("sched_getparam(0, [%d]) = %ld\n", + param->sched_priority, rc); + + param->sched_priority = -1; + rc = syscall(__NR_sched_setparam, 0, param); + printf("sched_setparam(0, [%d]) = %ld %s (%m)\n", + param->sched_priority, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getparam && __NR_sched_setparam") + +#endif diff --git a/tests-mx32/sched_xetparam.test b/tests-mx32/sched_xetparam.test new file mode 100755 index 000000000..c9fede139 --- /dev/null +++ b/tests-mx32/sched_xetparam.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getparam and sched_setparam syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e trace=sched_getparam,sched_setparam diff --git a/tests-mx32/sched_xetscheduler.c b/tests-mx32/sched_xetscheduler.c new file mode 100644 index 000000000..7faee8cd0 --- /dev/null +++ b/tests-mx32/sched_xetscheduler.c @@ -0,0 +1,81 @@ +#include "tests.h" +#include + +#if defined __NR_sched_getscheduler && defined __NR_sched_setscheduler + +# include +# include +# include + +int +main(void) +{ + struct sched_param *const param = tail_alloc(sizeof(struct sched_param)); + long rc = syscall(__NR_sched_getscheduler, 0); + const char *scheduler; + switch (rc) { + case SCHED_FIFO: + scheduler = "SCHED_FIFO"; + break; + case SCHED_RR: + scheduler = "SCHED_RR"; + break; +# ifdef SCHED_BATCH + case SCHED_BATCH: + scheduler = "SCHED_BATCH"; + break; +# endif +# ifdef SCHED_IDLE + case SCHED_IDLE: + scheduler = "SCHED_IDLE"; + break; +# endif +# ifdef SCHED_ISO + case SCHED_ISO: + scheduler = "SCHED_ISO"; + break; +# endif +# ifdef SCHED_DEADLINE + case SCHED_DEADLINE: + scheduler = "SCHED_DEADLINE"; + break; +# endif + default: + scheduler = "SCHED_OTHER"; + } + printf("sched_getscheduler(0) = %ld (%s)\n", + rc, scheduler); + + rc = syscall(__NR_sched_getscheduler, -1); + printf("sched_getscheduler(-1) = %s\n", sprintrc(rc)); + + param->sched_priority = -1; + + rc = syscall(__NR_sched_setscheduler, 0, SCHED_FIFO, NULL); + printf("sched_setscheduler(0, SCHED_FIFO, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_sched_setscheduler, 0, SCHED_FIFO, param + 1); + printf("sched_setscheduler(0, SCHED_FIFO, %p) = %s\n", param + 1, + sprintrc(rc)); + + rc = syscall(__NR_sched_setscheduler, 0, 0xfaceda7a, param); + printf("sched_setscheduler(0, %#x /* SCHED_??? */, [%d]) = %s\n", + 0xfaceda7a, param->sched_priority, sprintrc(rc)); + + rc = syscall(__NR_sched_setscheduler, -1, SCHED_FIFO, param); + printf("sched_setscheduler(-1, SCHED_FIFO, [%d]) = %s\n", + param->sched_priority, sprintrc(rc)); + + rc = syscall(__NR_sched_setscheduler, 0, SCHED_FIFO, param); + printf("sched_setscheduler(0, SCHED_FIFO, [%d]) = %s\n", + param->sched_priority, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_getscheduler && __NR_sched_setscheduler") + +#endif diff --git a/tests-mx32/sched_xetscheduler.test b/tests-mx32/sched_xetscheduler.test new file mode 100755 index 000000000..07c93f311 --- /dev/null +++ b/tests-mx32/sched_xetscheduler.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_getscheduler and sched_setscheduler syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 -e trace=sched_getscheduler,sched_setscheduler diff --git a/tests-mx32/sched_yield.c b/tests-mx32/sched_yield.c new file mode 100644 index 000000000..355e7e8da --- /dev/null +++ b/tests-mx32/sched_yield.c @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_sched_yield + +# include +# include + +int +main(void) +{ + printf("sched_yield() = %ld\n", syscall(__NR_sched_yield)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sched_yield") + +#endif diff --git a/tests-mx32/sched_yield.test b/tests-mx32/sched_yield.test new file mode 100755 index 000000000..f0c2c303d --- /dev/null +++ b/tests-mx32/sched_yield.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sched_yield syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff --git a/tests-mx32/scm_rights-fd.test b/tests-mx32/scm_rights-fd.test new file mode 100755 index 000000000..8447375fd --- /dev/null +++ b/tests-mx32/scm_rights-fd.test @@ -0,0 +1,80 @@ +#!/bin/sh +# +# Check how SCM_RIGHTS and SCM_CREDENTIALS control messages are decoded in -y mode. +# +# Copyright (c) 2014-2015 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -y is implemented using /proc/$pid/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +check_prog mkdir +check_prog rm +check_prog seq +check_prog touch + +dir="$LOG.dir" +rm -rf -- "$dir" +mkdir -- "$dir" || + framework_skip_ 'failed to create a directory' + +file="$dir/$(for i in $(seq 1 127); do echo A; done; echo Z)" + +touch -- "$file" || + framework_skip_ 'failed to create a file' + +run_prog ./scm_rights /dev/zero +run_strace -y -x -enetwork $args "$file" + +hex='[[:xdigit:]]' +n='[1-9][0-9]*' +sample="$(for i in $(seq 1 15); do printf '\\\\xf%x' $i; done)" +socket='' + +path6='(/.*/(A\\n){127}Z|\\x2f(\\x'"$hex$hex"')*\\x2f(\\x41\\x0a){127}\\x5a)' +rights_data='\[4, 5, 6<'"$path6"'>\]' +iov='\[\{iov_base="'"$sample"'", iov_len=15\}\]' +ids='\{pid='"$n"', uid=[0-9]+, gid=[0-9]+\}' + +msg_head='\{msg_name=NULL, msg_namelen=0, msg_iov='"$iov"', msg_iovlen=1, msg_control=' +msg_tail=', msg_controllen='"$n"', msg_flags=0' +rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data='"$rights_data"'\}' +creds='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data='"$ids"'\}' + +EXPECTED="$LOG.expected" + +cat > "$EXPECTED" << __EOF__ +sendmsg\\(3$socket, $msg_head\\[$rights\\]$msg_tail\\}, 0\\) = 15 +recvmsg\\(0$socket, $msg_head\\[$creds, $rights\\]$msg_tail\\}, 0\\) = 15 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" +rm -rf -- "$dir" + +exit 0 diff --git a/tests-mx32/scm_rights.c b/tests-mx32/scm_rights.c new file mode 100644 index 000000000..42caed7ca --- /dev/null +++ b/tests-mx32/scm_rights.c @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +int main(int ac, const char **av) +{ + assert(ac > 0); + int fds[ac]; + + static const char sample[] = + "\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + const unsigned int data_size = sizeof(sample) - 1; + void *data = tail_alloc(data_size); + memcpy(data, sample, data_size); + + struct iovec *iov = tail_alloc(sizeof(struct iovec)); + iov->iov_base = data; + iov->iov_len = data_size; + + struct msghdr *mh = tail_alloc(sizeof(struct msghdr)); + memset(mh, 0, sizeof(*mh)); + mh->msg_iov = iov; + mh->msg_iovlen = 1; + + int i; + while ((i = open("/dev/null", O_RDWR)) <= ac + 2) + assert(i >= 0); + while (i > 2) + assert(close(i--) == 0); + assert(close(0) == 0); + + int sv[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + int one = 1; + if (setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one))) + perror_msg_and_skip("setsockopt"); + + assert((fds[0] = open("/dev/null", O_RDWR)) == 4); + for (i = 1; i < ac; ++i) + assert((fds[i] = open(av[i], O_RDONLY)) == i + 4); + + unsigned int cmsg_size = CMSG_SPACE(sizeof(fds)); + struct cmsghdr *cmsg = tail_alloc(cmsg_size); + memset(cmsg, 0, cmsg_size); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN(sizeof(fds)); + memcpy(CMSG_DATA(cmsg), fds, sizeof(fds)); + + mh->msg_control = cmsg; + mh->msg_controllen = cmsg_size; + + assert(sendmsg(sv[1], mh, 0) == (int) data_size); + + assert(close(sv[1]) == 0); + assert(open("/dev/null", O_RDWR) == sv[1]); + + for (i = 0; i < ac; ++i) { + assert(close(fds[i]) == 0); + fds[i] = 0; + } + + cmsg_size += CMSG_SPACE(sizeof(struct ucred)); + cmsg = tail_alloc(cmsg_size); + memset(cmsg, 0, cmsg_size); + mh->msg_control = cmsg; + mh->msg_controllen = cmsg_size; + + assert(recvmsg(0, mh, 0) == (int) data_size); + assert(close(0) == 0); + + return 0; +} diff --git a/tests-mx32/scno_tampering.sh b/tests-mx32/scno_tampering.sh new file mode 100755 index 000000000..6aa78432c --- /dev/null +++ b/tests-mx32/scno_tampering.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Skip the test if arch+kernel combination is not supported. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +uname_r="$(uname -r)" +case "$STRACE_ARCH" in + arm) + # PTRACE_SET_SYSCALL is supported by linux kernel + # starting with commit v2.6.16-rc1~107^2. + require_min_kernel_version_or_skip 2.6.16 ;; + aarch64) + # NT_ARM_SYSTEM_CALL regset is supported by linux kernel + # starting with commit v3.19-rc1~59^2~16. + require_min_kernel_version_or_skip 3.19 ;; + hppa) + # Syscall number and return value modification did not work + # properly before commit v4.5-rc7~31^2~1. + require_min_kernel_version_or_skip 4.5 ;; + sparc*) + # Reloading the syscall number from %g1 register is supported + # by linux kernel starting with commit v4.5-rc7~35^2~3. + require_min_kernel_version_or_skip 4.5 ;; + mips) + # Only the native ABI is supported by the kernel properly, see + # https://sourceforge.net/p/strace/mailman/message/35587571/ + uname_m="$(uname -m)" + case "$MIPS_ABI:$uname_m" in + o32:mips|n64:mips64) ;; + *) skip_ "$MIPS_ABI scno tampering does not work on $uname_m yet" ;; + esac ;; +esac diff --git a/tests-mx32/seccomp-filter-v.c b/tests-mx32/seccomp-filter-v.c new file mode 100644 index 000000000..dbf686d14 --- /dev/null +++ b/tests-mx32/seccomp-filter-v.c @@ -0,0 +1,213 @@ +/* + * Check verbose decoding of seccomp SECCOMP_SET_MODE_FILTER. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +#ifdef HAVE_PRCTL +# include +#endif +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined __NR_seccomp \ + && defined PR_SET_NO_NEW_PRIVS \ + && defined SECCOMP_SET_MODE_FILTER \ + && defined SECCOMP_RET_ERRNO \ + && defined BPF_JUMP \ + && defined BPF_STMT + +#define SOCK_FILTER_ALLOW_SYSCALL(nr) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW) + +#define SOCK_FILTER_DENY_SYSCALL(nr, err) \ + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, __NR_ ## nr, 0, 1), \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|(SECCOMP_RET_DATA & (err))) + +#define SOCK_FILTER_KILL_PROCESS \ + BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL) + +#define PRINT_ALLOW_SYSCALL(nr) \ + tprintf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), ", \ + __NR_ ## nr) + +#define PRINT_DENY_SYSCALL(nr, err) \ + tprintf("BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, %#x, 0, 0x1), " \ + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ERRNO|%#x), ", \ + __NR_ ## nr, err) + +static const struct sock_filter filter_c[] = { + /* load syscall number */ + BPF_STMT(BPF_LD|BPF_W|BPF_ABS, offsetof(struct seccomp_data, nr)), + + /* allow syscalls */ + SOCK_FILTER_ALLOW_SYSCALL(close), + SOCK_FILTER_ALLOW_SYSCALL(exit), + SOCK_FILTER_ALLOW_SYSCALL(exit_group), + + /* deny syscalls */ + SOCK_FILTER_DENY_SYSCALL(sync, EBUSY), + SOCK_FILTER_DENY_SYSCALL(setsid, EPERM), + + /* kill process */ + SOCK_FILTER_KILL_PROCESS +}; + +#ifndef BPF_MAXINSNS +# define BPF_MAXINSNS 4096 +#endif + +int +main(void) +{ + tprintf("%s", ""); + + static const char kill_stmt_txt[] = + "BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_KILL)"; + struct sock_filter *const filter = + tail_memdup(filter_c, sizeof(filter_c)); + struct sock_filter *const big_filter = + tail_alloc(sizeof(*big_filter) * (BPF_MAXINSNS + 1)); + struct sock_fprog *const prog = tail_alloc(sizeof(*prog)); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) + perror_msg_and_skip("PR_SET_NO_NEW_PRIVS"); + + prog->filter = filter + ARRAY_SIZE(filter_c); + prog->len = 1; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=1, filter=%p})" + " = -1 EFAULT (%m)\n", prog->filter); + + prog->filter = filter + ARRAY_SIZE(filter_c) - 1; + prog->len = 3; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=%u" + ", filter=[%s, %p]}) = -1 EFAULT (%m)\n", + prog->len, kill_stmt_txt, filter + ARRAY_SIZE(filter_c)); + + prog->len = 0; + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog); + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=0, filter=[]})" + " = -1 EINVAL (%m)\n"); + + unsigned int i; + for (i = 0; i <= BPF_MAXINSNS; ++i) { + const struct sock_filter stmt = + BPF_STMT(BPF_CLASS(i), i << 16); + big_filter[i] = stmt; + } + + prog->filter = big_filter; + prog->len = BPF_MAXINSNS + 1; + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, %s, {len=%u, filter=[", + "SECCOMP_FILTER_FLAG_TSYNC|0xfffffffe", prog->len); + for (i = 0; i < BPF_MAXINSNS; ++i) { + if (i) + tprintf(", "); + switch(BPF_CLASS(i)) { + case BPF_LD: + tprintf("BPF_STMT(BPF_LD|BPF_W|BPF_IMM, %#x)", i << 16); + break; + case BPF_LDX: + tprintf("BPF_STMT(BPF_LDX|BPF_W|BPF_IMM, %#x)", i << 16); + break; + case BPF_ST: + tprintf("BPF_STMT(BPF_ST, %#x)", i << 16); + break; + case BPF_STX: + tprintf("BPF_STMT(BPF_STX, %#x)", i << 16); + break; + case BPF_ALU: + tprintf("BPF_STMT(BPF_ALU|BPF_K|BPF_ADD, %#x)", i << 16); + break; + case BPF_JMP: + tprintf("BPF_STMT(BPF_JMP|BPF_K|BPF_JA, %#x)", i << 16); + break; + case BPF_RET: + tprintf("BPF_STMT(BPF_RET|BPF_K, %#x" + " /* SECCOMP_RET_??? */)", i << 16); + break; + case BPF_MISC: + tprintf("BPF_STMT(BPF_MISC|BPF_TAX, %#x)", i << 16); + break; + } + } + tprintf(", ...]})"); + syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -1, prog); + tprintf(" = -1 EINVAL (%m)\n"); + + prog->filter = filter; + prog->len = ARRAY_SIZE(filter_c); + + tprintf("seccomp(SECCOMP_SET_MODE_FILTER, 0, {len=%u, filter=[", + prog->len); + + tprintf("BPF_STMT(BPF_LD|BPF_W|BPF_ABS, %#x), ", + (unsigned) offsetof(struct seccomp_data, nr)); + + PRINT_ALLOW_SYSCALL(close); + PRINT_ALLOW_SYSCALL(exit); + PRINT_ALLOW_SYSCALL(exit_group); + + PRINT_DENY_SYSCALL(sync, EBUSY), + PRINT_DENY_SYSCALL(setsid, EPERM), + + tprintf("%s]}) = 0\n+++ exited with 0 +++\n", kill_stmt_txt); + + if (syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, 0, prog)) + perror_msg_and_skip("SECCOMP_SET_MODE_FILTER"); + + if (close(0) || close(1)) + _exit(77); + + _exit(0); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && PR_SET_NO_NEW_PRIVS" + " && SECCOMP_SET_MODE_FILTER && SECCOMP_RET_ERRNO" + " && BPF_JUMP && BPF_STMT") + +#endif diff --git a/tests-mx32/seccomp-filter-v.test b/tests-mx32/seccomp-filter-v.test new file mode 100755 index 000000000..f873eb6f0 --- /dev/null +++ b/tests-mx32/seccomp-filter-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of seccomp SECCOMP_SET_MODE_FILTER. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e trace=seccomp diff --git a/tests-mx32/seccomp-filter.c b/tests-mx32/seccomp-filter.c new file mode 100644 index 000000000..d4d76dd35 --- /dev/null +++ b/tests-mx32/seccomp-filter.c @@ -0,0 +1,75 @@ +/* + * Check decoding of seccomp SECCOMP_SET_MODE_FILTER. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +#ifdef HAVE_LINUX_SECCOMP_H +# include +#endif +#ifdef HAVE_LINUX_FILTER_H +# include +#endif + +#if defined __NR_seccomp && defined SECCOMP_SET_MODE_FILTER + +# define N 7 + +int +main(void) +{ + struct sock_filter *const filter = tail_alloc(sizeof(*filter) * N); + const void *const efault = tail_alloc(1); + struct sock_fprog *const prog = tail_alloc(sizeof(*prog)); + long rc; + + prog->filter = filter; + prog->len = N; + rc = syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -1, prog); + printf("seccomp(SECCOMP_SET_MODE_FILTER, %s, {len=%u, filter=%p})" + " = %ld %s (%m)\n", "SECCOMP_FILTER_FLAG_TSYNC|0xfffffffe", + prog->len, prog->filter, rc, errno2name()); + + rc = syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, -2L, efault); + printf("seccomp(SECCOMP_SET_MODE_FILTER, %s, %p) = %ld %s (%m)\n", + "0xfffffffe /* SECCOMP_FILTER_FLAG_??? */", + efault, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && SECCOMP_SET_MODE_FILTER") + +#endif diff --git a/tests-mx32/seccomp-filter.test b/tests-mx32/seccomp-filter.test new file mode 100755 index 000000000..65c6d4955 --- /dev/null +++ b/tests-mx32/seccomp-filter.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of seccomp SECCOMP_SET_MODE_FILTER. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=seccomp diff --git a/tests-mx32/seccomp-strict.c b/tests-mx32/seccomp-strict.c new file mode 100644 index 000000000..237b0ecac --- /dev/null +++ b/tests-mx32/seccomp-strict.c @@ -0,0 +1,74 @@ +/* + * Check how seccomp SECCOMP_SET_MODE_STRICT is decoded. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_seccomp && defined __NR_exit + +# include +# include + +int +main(void) +{ + static const char text1[] = + "seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL) = 0\n"; + static const char text2[] = "+++ exited with 0 +++\n"; + const kernel_ulong_t addr = (kernel_ulong_t) 0xfacefeeddeadbeefULL; + long rc; + + rc = syscall(__NR_seccomp, -1L, -1L, addr); + printf("seccomp(%#x /* SECCOMP_SET_MODE_??? */, %u, %#llx)" + " = %s\n", -1, -1, (unsigned long long) addr, sprintrc(rc)); + fflush(stdout); + + rc = syscall(__NR_seccomp, 0, 0, 0); + if (rc) { + printf("seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL) = %s\n", + sprintrc(rc)); + fflush(stdout); + rc = 0; + } else { + /* + * If kernel implementaton of SECCOMP_MODE_STRICT is buggy, + * the following syscall will result to SIGKILL. + */ + rc = write(1, text1, LENGTH_OF(text1)) != LENGTH_OF(text1); + } + + rc += write(1, text2, LENGTH_OF(text2)) != LENGTH_OF(text2); + return !!syscall(__NR_exit, rc); +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_seccomp && __NR_exit") + +#endif diff --git a/tests-mx32/seccomp-strict.test b/tests-mx32/seccomp-strict.test new file mode 100755 index 000000000..b354c6a29 --- /dev/null +++ b/tests-mx32/seccomp-strict.test @@ -0,0 +1,17 @@ +#!/bin/sh + +# Check how seccomp SECCOMP_SET_MODE_STRICT is decoded. + +. "${srcdir=.}/init.sh" + +set -- "./$NAME" +"$@" > /dev/null || { + case $? in + 77) skip_ "$* exited with code 77" ;; + 137) framework_skip_ "$* killed by SIGKILL, fix your kernel" ;; + *) fail_ "$args failed" ;; + esac +} +run_strace -eseccomp "$@" > "$EXP" +match_diff "$LOG" "$EXP" +rm -f "$EXP" diff --git a/tests-mx32/select.c b/tests-mx32/select.c new file mode 100644 index 000000000..b5ff259d3 --- /dev/null +++ b/tests-mx32/select.c @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_select && !defined __NR__newselect + +# define TEST_SYSCALL_NR __NR_select +# define TEST_SYSCALL_STR "select" +# include "xselect.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_select && !__NR__newselect") + +#endif diff --git a/tests-mx32/select.test b/tests-mx32/select.test new file mode 100755 index 000000000..60b88caf9 --- /dev/null +++ b/tests-mx32/select.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check select syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff --git a/tests-mx32/semop.c b/tests-mx32/semop.c new file mode 100644 index 000000000..a2ff2635a --- /dev/null +++ b/tests-mx32/semop.c @@ -0,0 +1,119 @@ +#include "tests.h" +#include +#include +#include +#include +#include +#include + +#include "xlat.h" +#include "xlat/semop_flags.h" + +union semun +{ + int val; + struct semid_ds *buf; + unsigned short *array; + struct seminfo *__buf; +}; + +static int id = -1; + +static void +cleanup(void) +{ + semctl(id, 0, IPC_RMID, 0); + id = -1; +} + +int +main(void) +{ + static const int bogus_semid = 0xfdb97531; + static void * const bogus_sops = (void *) -1L; + static const size_t bogus_nsops = (size_t) 0xdefaceddeadbeefULL; + + static const struct timespec ts_data = { 1, 123456789 }; + + struct timespec *ts = tail_memdup(&ts_data, sizeof(*ts)); + int rc; + + id = semget(IPC_PRIVATE, 1, 0600); + if (id < 0) + perror_msg_and_skip("semget"); + atexit(cleanup); + + union semun sem_union = { .val = 0 }; + if (semctl(id, 0, SETVAL, sem_union) == -1) + perror_msg_and_skip("semctl"); + + struct sembuf *const sem_b = tail_alloc(sizeof(*sem_b)); + struct sembuf *const sem_b2 = tail_alloc(sizeof(*sem_b2)); + + rc = semop(bogus_semid, NULL, bogus_nsops); + printf("semop(%d, NULL, %u) = %s\n", + bogus_semid, (unsigned) bogus_nsops, sprintrc(rc)); + + rc = semop(bogus_semid, bogus_sops, 1); + printf("semop(%d, %p, %u) = %s\n", + bogus_semid, bogus_sops, 1, sprintrc(rc)); + + sem_b->sem_num = 0; + sem_b->sem_op = 1; + sem_b->sem_flg = SEM_UNDO; + + sem_b2->sem_num = 0xface; + sem_b2->sem_op = 0xf00d; + sem_b2->sem_flg = 0xbeef; + + rc = semop(bogus_semid, sem_b2, 2); + printf("semop(%d, [{%hu, %hd, %s%s%#hx}, %p], %u) = %s\n", + bogus_semid, sem_b2->sem_num, sem_b2->sem_op, + sem_b2->sem_flg & SEM_UNDO ? "SEM_UNDO|" : "", + sem_b2->sem_flg & IPC_NOWAIT ? "IPC_NOWAIT|" : "", + sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT), + sem_b2 + 1, 2, sprintrc(rc)); + + if (semop(id, sem_b, 1)) + perror_msg_and_skip("semop, 1"); + printf("semop(%d, [{0, 1, SEM_UNDO}], 1) = 0\n", id); + + sem_b->sem_op = -1; + if (semop(id, sem_b, 1)) + perror_msg_and_skip("semop, -1"); + printf("semop(%d, [{0, -1, SEM_UNDO}], 1) = 0\n", id); + + rc = semtimedop(bogus_semid, NULL, bogus_nsops, NULL); + printf("semtimedop(%d, NULL, %u, NULL) = %s\n", + bogus_semid, (unsigned) bogus_nsops, sprintrc(rc)); + + rc = semtimedop(id, sem_b + 1, 1, ts + 1); + printf("semtimedop(%d, %p, 1, %p) = %s\n", + id, sem_b + 1, ts + 1, sprintrc(rc)); + + rc = semtimedop(bogus_semid, sem_b2, 2, ts); + printf("semtimedop(%d, [{%hu, %hd, %s%s%#hx}, %p], %u, " + "{tv_sec=%jd, tv_nsec=%jd}) = %s\n", + bogus_semid, sem_b2->sem_num, sem_b2->sem_op, + sem_b2->sem_flg & SEM_UNDO ? "SEM_UNDO|" : "", + sem_b2->sem_flg & IPC_NOWAIT ? "IPC_NOWAIT|" : "", + sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT), + sem_b2 + 1, 2, + (intmax_t) ts->tv_sec, (intmax_t) ts->tv_nsec, + sprintrc(rc)); + + sem_b->sem_op = 1; + if (semtimedop(id, sem_b, 1, NULL)) + perror_msg_and_skip("semtimedop, 1"); + printf("semtimedop(%d, [{0, 1, SEM_UNDO}], 1, NULL) = 0\n", id); + + sem_b->sem_op = -1; + if (semtimedop(id, sem_b, 1, ts)) + perror_msg_and_skip("semtimedop, -1"); + printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1, " + "{tv_sec=%jd, tv_nsec=%jd}) = 0\n", id, + (intmax_t) ts->tv_sec, (intmax_t) ts->tv_nsec); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/semop.test b/tests-mx32/semop.test new file mode 100755 index 000000000..3e77d2f92 --- /dev/null +++ b/tests-mx32/semop.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check semop syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a32 -e trace=semop,semtimedop diff --git a/tests-mx32/sendfile.c b/tests-mx32/sendfile.c new file mode 100644 index 000000000..23f096b62 --- /dev/null +++ b/tests-mx32/sendfile.c @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_sendfile + +# include +# include +# include +# include +# include +# include +# include +# include + +int +main(int ac, const char **av) +{ + assert(ac == 1); + + (void) close(0); + if (open("/dev/zero", O_RDONLY) != 0) + perror_msg_and_skip("open: %s", "/dev/zero"); + + int sv[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + + int reg_in = open(av[0], O_RDONLY); + if (reg_in < 0) + perror_msg_and_fail("open: %s", av[0]); + + struct stat stb; + assert(fstat(reg_in, &stb) == 0); + const size_t blen = stb.st_size / 3; + const size_t alen = stb.st_size - blen; + assert(S_ISREG(stb.st_mode) && blen > 0); + + const size_t page_len = get_page_size(); + assert(syscall(__NR_sendfile, 0, 1, NULL, page_len) == -1); + if (EBADF != errno) + perror_msg_and_skip("sendfile"); + printf("sendfile(0, 1, NULL, %lu) = -1 EBADF (%m)\n", + (unsigned long) page_len); + + uint32_t *p_off = tail_alloc(sizeof(uint32_t)); + void *p = p_off + 1; + *p_off = 0; + + assert(syscall(__NR_sendfile, 0, 1, p, page_len) == -1); + printf("sendfile(0, 1, %#lx, %lu) = -1 EFAULT (%m)\n", + (unsigned long) p, (unsigned long) page_len); + + assert(syscall(__NR_sendfile, sv[1], reg_in, NULL, alen) + == (long) alen); + printf("sendfile(%d, %d, NULL, %lu) = %lu\n", + sv[1], reg_in, (unsigned long) alen, + (unsigned long) alen); + + p = p_off; + if (syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) != (long) alen) { + printf("sendfile(%d, %d, %#lx, %lu) = -1 EFAULT (%m)\n", + sv[1], reg_in, (unsigned long) p_off, + (unsigned long) alen); + --p_off; + *p_off = 0; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, alen) + == (long) alen); + } + printf("sendfile(%d, %d, [0] => [%lu], %lu) = %lu\n", + sv[1], reg_in, (unsigned long) alen, + (unsigned long) alen, (unsigned long) alen); + + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, stb.st_size + 1) + == (long) blen); + printf("sendfile(%d, %d, [%lu] => [%lu], %lu) = %lu\n", + sv[1], reg_in, (unsigned long) alen, + (unsigned long) stb.st_size, + (unsigned long) stb.st_size + 1, + (unsigned long) blen); + + if (p_off != p) { + uint64_t *p_off64 = (uint64_t *) p_off; + *p_off64 = 0xcafef00dfacefeedULL; + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off64, 1) == -1); + printf("sendfile(%d, %d, [14627392582579060461], 1)" + " = -1 EINVAL (%m)\n", sv[1], reg_in); + *p_off64 = 0xdefaced; + } else { + *p_off = 0xdefaced; + } + assert(syscall(__NR_sendfile, sv[1], reg_in, p_off, 1) == 0); + printf("sendfile(%d, %d, [233811181], 1) = 0\n", + sv[1], reg_in); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sendfile") + +#endif diff --git a/tests-mx32/sendfile.test b/tests-mx32/sendfile.test new file mode 100755 index 000000000..48dba5856 --- /dev/null +++ b/tests-mx32/sendfile.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sendfile syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-mx32/sendfile64.c b/tests-mx32/sendfile64.c new file mode 100644 index 000000000..7208c3006 --- /dev/null +++ b/tests-mx32/sendfile64.c @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_sendfile64 + +# include +# include +# include +# include +# include +# include +# include +# include + +int +main(int ac, const char **av) +{ + assert(ac == 1); + + (void) close(0); + if (open("/dev/zero", O_RDONLY) != 0) + perror_msg_and_skip("open: %s", "/dev/zero"); + + int sv[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + + int reg_in = open(av[0], O_RDONLY); + if (reg_in < 0) + perror_msg_and_fail("open: %s", av[0]); + + struct stat stb; + assert(fstat(reg_in, &stb) == 0); + const size_t blen = stb.st_size / 3; + const size_t alen = stb.st_size - blen; + assert(S_ISREG(stb.st_mode) && blen > 0); + + const size_t page_len = get_page_size(); + assert(syscall(__NR_sendfile64, 0, 1, NULL, page_len) == -1); + if (EBADF != errno) + perror_msg_and_skip("sendfile64"); + printf("sendfile64(0, 1, NULL, %lu) = -1 EBADF (%m)\n", + (unsigned long) page_len); + + uint64_t *p_off = tail_alloc(sizeof(uint64_t)); + void *p = p_off + 1; + *p_off = 0; + + assert(syscall(__NR_sendfile64, 0, 1, p, page_len) == -1); + printf("sendfile64(0, 1, %#lx, %lu) = -1 EFAULT (%m)\n", + (unsigned long) p, (unsigned long) page_len); + + assert(syscall(__NR_sendfile64, sv[1], reg_in, NULL, alen) + == (long) alen); + printf("sendfile64(%d, %d, NULL, %lu) = %lu\n", + sv[1], reg_in, (unsigned long) alen, + (unsigned long) alen); + + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, alen) + == (long) alen); + printf("sendfile64(%d, %d, [0] => [%lu], %lu) = %lu\n", + sv[1], reg_in, (unsigned long) alen, + (unsigned long) alen, (unsigned long) alen); + + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, stb.st_size + 1) + == (long) blen); + printf("sendfile64(%d, %d, [%lu] => [%lu], %lu) = %lu\n", + sv[1], reg_in, (unsigned long) alen, + (unsigned long) stb.st_size, + (unsigned long) stb.st_size + 1, + (unsigned long) blen); + + *p_off = 0xcafef00dfacefeedULL; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == -1); + printf("sendfile64(%d, %d, [14627392582579060461], 1)" + " = -1 EINVAL (%m)\n", sv[1], reg_in); + + *p_off = 0xfacefeed; + assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == 0); + printf("sendfile64(%d, %d, [4207869677], 1) = 0\n", sv[1], reg_in); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sendfile64") + +#endif diff --git a/tests-mx32/sendfile64.test b/tests-mx32/sendfile64.test new file mode 100755 index 000000000..faa05254e --- /dev/null +++ b/tests-mx32/sendfile64.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sendfile64 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a29 diff --git a/tests-mx32/set_mempolicy.c b/tests-mx32/set_mempolicy.c new file mode 100644 index 000000000..f3261a094 --- /dev/null +++ b/tests-mx32/set_mempolicy.c @@ -0,0 +1,146 @@ +/* + * Check decoding of set_mempolicy syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_set_mempolicy + +# include +# include +# include +# include + +# include "xlat.h" +# include "xlat/policies.h" + +# define MAX_STRLEN 3 +# define NLONGS(n) ((n + 8 * sizeof(long) - 2) \ + / (8 * sizeof(long))) + +static void +print_nodes(const unsigned long maxnode, unsigned int offset) +{ + unsigned int nlongs = NLONGS(maxnode); + if (nlongs <= offset) + nlongs = 0; + else + nlongs -= offset; + const unsigned int size = nlongs * sizeof(long); + unsigned long *const nodemask = + tail_alloc(size ? size : (offset ? 1 : 0)); + memset(nodemask, 0, size); + + long rc = syscall(__NR_set_mempolicy, 0, nodemask, maxnode); + const char *errstr = sprintrc(rc); + + fputs("set_mempolicy(MPOL_DEFAULT, ", stdout); + + if (nlongs) { + putc('[', stdout); + unsigned int i; + for (i = 0; i < nlongs + offset; ++i) { + if (i) + fputs(", ", stdout); + if (i < nlongs) { + if (i >= MAX_STRLEN) { + fputs("...", stdout); + break; + } + printf("%#0*lx", (int) sizeof(long) * 2 + 2, + nodemask[i]); + } else { + printf("%p", nodemask + i); + break; + } + } + putc(']', stdout); + } else { + if (maxnode) + printf("%p", nodemask); + else + printf("[]"); + } + + printf(", %lu) = %s\n", maxnode, errstr); +} + +static void +test_offset(const unsigned int offset) +{ + unsigned long maxnode = get_page_size() * 8; + + print_nodes(maxnode, offset); + print_nodes(maxnode + 1, offset); + print_nodes(maxnode + 2, offset); + + maxnode = sizeof(long) * 8; + print_nodes(0, offset); + print_nodes(1, offset); + print_nodes(2, offset); + print_nodes(maxnode - 1, offset); + print_nodes(maxnode , offset); + print_nodes(maxnode + 1, offset); + print_nodes(maxnode + 2, offset); + print_nodes(maxnode * 2 - 1, offset); + print_nodes(maxnode * 2 , offset); + print_nodes(maxnode * 2 + 1, offset); + print_nodes(maxnode * 2 + 2, offset); + print_nodes(maxnode * 3 - 1, offset); + print_nodes(maxnode * 3 , offset); + print_nodes(maxnode * 3 + 1, offset); + print_nodes(maxnode * 3 + 2, offset); + print_nodes(maxnode * 4 + 2, offset); +} + +int +main(void) +{ + if (syscall(__NR_set_mempolicy, 0, 0, 0)) + perror_msg_and_skip("set_mempolicy"); + puts("set_mempolicy(MPOL_DEFAULT, NULL, 0) = 0"); + + const unsigned long *nodemask = (void *) 0xfacefeedfffffffeULL; + const unsigned long maxnode = (unsigned long) 0xcafef00dbadc0dedULL; + long rc = syscall(__NR_set_mempolicy, 1, nodemask, maxnode); + printf("set_mempolicy(MPOL_PREFERRED, %p, %lu) = %s\n", + nodemask, maxnode, sprintrc(rc)); + + test_offset(0); + test_offset(1); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_set_mempolicy") + +#endif diff --git a/tests-mx32/set_mempolicy.test b/tests-mx32/set_mempolicy.test new file mode 100755 index 000000000..0ed6666cb --- /dev/null +++ b/tests-mx32/set_mempolicy.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check set_mempolicy syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s3 -a35 diff --git a/tests-mx32/set_ptracer_any.c b/tests-mx32/set_ptracer_any.c new file mode 100644 index 000000000..bc2f90cab --- /dev/null +++ b/tests-mx32/set_ptracer_any.c @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#ifdef HAVE_PRCTL +# include +#endif + +int main(int argc, char **argv) +{ + if (argc < 2) + return 99; +#if defined HAVE_PRCTL && defined PR_SET_PTRACER && defined PR_SET_PTRACER_ANY + /* Turn off restrictions on tracing if applicable. If the options + * aren't available on this system, that's OK too. */ + (void) prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY); +#endif + if (write(1, "\n", 1) != 1) { + perror("write"); + return 99; + } + (void) execvp(argv[1], argv + 1); + perror(argv[1]); + return 99; +} diff --git a/tests-mx32/setdomainname.c b/tests-mx32/setdomainname.c new file mode 100644 index 000000000..f3e248409 --- /dev/null +++ b/tests-mx32/setdomainname.c @@ -0,0 +1,24 @@ +#include "tests.h" +#include + +#ifdef __NR_setdomainname + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_setdomainname, 0, 63); + printf("setdomainname(NULL, 63) = %ld %s (%m)\n", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setdomainname") + +#endif diff --git a/tests-mx32/setdomainname.test b/tests-mx32/setdomainname.test new file mode 100755 index 000000000..2159e7c49 --- /dev/null +++ b/tests-mx32/setdomainname.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setdomainname syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff --git a/tests-mx32/setfsgid.c b/tests-mx32/setfsgid.c new file mode 100644 index 000000000..871f4b35f --- /dev/null +++ b/tests-mx32/setfsgid.c @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsgid + +# define SYSCALL_NR __NR_setfsgid +# define SYSCALL_NAME "setfsgid" + +# if defined __NR_setfsgid32 && __NR_setfsgid != __NR_setfsgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# endif + +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsgid") + +#endif diff --git a/tests-mx32/setfsgid.test b/tests-mx32/setfsgid.test new file mode 100755 index 000000000..0ae2b0a2c --- /dev/null +++ b/tests-mx32/setfsgid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff --git a/tests-mx32/setfsgid32.c b/tests-mx32/setfsgid32.c new file mode 100644 index 000000000..6279abd30 --- /dev/null +++ b/tests-mx32/setfsgid32.c @@ -0,0 +1,16 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsgid32 + +# define SYSCALL_NR __NR_setfsgid32 +# define SYSCALL_NAME "setfsgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsgid32") + +#endif diff --git a/tests-mx32/setfsgid32.test b/tests-mx32/setfsgid32.test new file mode 100755 index 000000000..9b7a2bf89 --- /dev/null +++ b/tests-mx32/setfsgid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff --git a/tests-mx32/setfsugid.c b/tests-mx32/setfsugid.c new file mode 100644 index 000000000..79ba34d89 --- /dev/null +++ b/tests-mx32/setfsugid.c @@ -0,0 +1,76 @@ +/* + * Check decoding of setfsuid/setfsgid/setfsuid32/setfsgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +void +printuid(unsigned UGID_TYPE id) +{ + if (id == (unsigned UGID_TYPE) -1U) + printf("-1"); + else + printf("%u", id); +} + +int +main(void) +{ + unsigned int ugid = GETUGID; + + const kernel_ulong_t tests[] = { + ugid, + 0xffff0000U | ugid, + (kernel_ulong_t) 0xffffffff00000000ULL | ugid, + 0xffffU, + -1U, + -1L, + 0xc0deffffU, + 0xfacefeedU, + (long) 0xfacefeeddeadbeefULL + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int num = (unsigned UGID_TYPE) tests[i]; + unsigned int rc; + + rc = syscall(SYSCALL_NR, tests[i]); + printf("%s(", SYSCALL_NAME); + printuid(num); + printf(") = %u\n", rc); + + rc = syscall(SYSCALL_NR, ugid); + printf("%s(%u) = %u\n", SYSCALL_NAME, ugid, rc); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/setfsuid.c b/tests-mx32/setfsuid.c new file mode 100644 index 000000000..d6faf9711 --- /dev/null +++ b/tests-mx32/setfsuid.c @@ -0,0 +1,23 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsuid + +# define SYSCALL_NR __NR_setfsuid +# define SYSCALL_NAME "setfsuid" + +# if defined __NR_setfsuid32 && __NR_setfsuid != __NR_setfsuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# endif + +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsuid") + +#endif diff --git a/tests-mx32/setfsuid.test b/tests-mx32/setfsuid.test new file mode 100755 index 000000000..18a102198 --- /dev/null +++ b/tests-mx32/setfsuid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff --git a/tests-mx32/setfsuid32.c b/tests-mx32/setfsuid32.c new file mode 100644 index 000000000..b71cf2354 --- /dev/null +++ b/tests-mx32/setfsuid32.c @@ -0,0 +1,16 @@ +#include "tests.h" +#include + +#ifdef __NR_setfsuid32 + +# define SYSCALL_NR __NR_setfsuid32 +# define SYSCALL_NAME "setfsuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# include "setfsugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setfsuid32") + +#endif diff --git a/tests-mx32/setfsuid32.test b/tests-mx32/setfsuid32.test new file mode 100755 index 000000000..2dce3cc9e --- /dev/null +++ b/tests-mx32/setfsuid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setfsuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff --git a/tests-mx32/setgid.c b/tests-mx32/setgid.c new file mode 100644 index 000000000..8794a0a4b --- /dev/null +++ b/tests-mx32/setgid.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setgid + +# define SYSCALL_NR __NR_setgid +# define SYSCALL_NAME "setgid" + +# if defined __NR_setgid32 && __NR_setgid != __NR_setgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgid") + +#endif diff --git a/tests-mx32/setgid.test b/tests-mx32/setgid.test new file mode 100755 index 000000000..a3a90041d --- /dev/null +++ b/tests-mx32/setgid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-mx32/setgid32.c b/tests-mx32/setgid32.c new file mode 100644 index 000000000..17f43c585 --- /dev/null +++ b/tests-mx32/setgid32.c @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setgid32 + +# define SYSCALL_NR __NR_setgid32 +# define SYSCALL_NAME "setgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgid32") + +#endif diff --git a/tests-mx32/setgid32.test b/tests-mx32/setgid32.test new file mode 100755 index 000000000..11a87e12c --- /dev/null +++ b/tests-mx32/setgid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff --git a/tests-mx32/setgroups.c b/tests-mx32/setgroups.c new file mode 100644 index 000000000..1ec8333ff --- /dev/null +++ b/tests-mx32/setgroups.c @@ -0,0 +1,190 @@ +/* + * Check decoding of setgroups/setgroups32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __NR_setgroups32 + +# define SYSCALL_NR __NR_setgroups32 +# define SYSCALL_NAME "setgroups32" +# define GID_TYPE unsigned int + +#else + +# include "tests.h" +# include + +# ifdef __NR_setgroups + +# define SYSCALL_NR __NR_setgroups +# define SYSCALL_NAME "setgroups" +# if defined __NR_setgroups32 && __NR_setgroups != __NR_setgroups32 +# define GID_TYPE unsigned short +# else +# define GID_TYPE unsigned int +# endif + +# endif + +#endif + +#ifdef GID_TYPE + +# include +# include + +void +printuid(GID_TYPE id) +{ + if (id == (GID_TYPE) -1U) + printf("-1"); + else + printf("%u", id); +} + +int +main(void) +{ + const char *errstr; + + /* check how the first argument is decoded */ + long rc = syscall(SYSCALL_NR, 0, 0); + printf("%s(0, NULL) = %s\n", SYSCALL_NAME, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL, 0); + printf("%s(0, NULL) = %s\n", SYSCALL_NAME, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, 1, 0); + printf("%s(1, NULL) = %s\n", SYSCALL_NAME, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, (long) 0xffffffff00000001ULL, 0); + printf("%s(1, NULL) = %s\n", SYSCALL_NAME, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, -1U, 0); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, -1, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, -1L, 0); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, -1, sprintrc(rc)); + + /* check how the second argument is decoded */ + const GID_TYPE *const g1 = tail_alloc(sizeof(*g1)); + GID_TYPE *const g2 = tail_alloc(sizeof(*g2) * 2); + GID_TYPE *const g3 = tail_alloc(sizeof(*g3) * 3); + + rc = syscall(SYSCALL_NR, 0, g1 + 1); + printf("%s(0, []) = %s\n", SYSCALL_NAME, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, 1, g1); + errstr = sprintrc(rc); + printf("%s(1, [", SYSCALL_NAME); + printuid(*g1); + printf("]) = %s\n", errstr); + + rc = syscall(SYSCALL_NR, 1, g1 + 1); + printf("%s(1, %p) = %s\n", SYSCALL_NAME, g1 + 1, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, 1, -1L); + printf("%s(1, %#lx) = %s\n", SYSCALL_NAME, -1L, sprintrc(rc)); + + rc = syscall(SYSCALL_NR, 2, g1); + errstr = sprintrc(rc); + printf("%s(2, [", SYSCALL_NAME); + printuid(*g1); + printf(", %p]) = %s\n", g1 + 1, errstr); + + g2[0] = -2; + g2[1] = -3; + rc = syscall(SYSCALL_NR, 2, g2); + errstr = sprintrc(rc); + printf("%s(2, [", SYSCALL_NAME); + printuid(g2[0]); + printf(", "); + printuid(g2[1]); + printf("]) = %s\n", errstr); + + rc = syscall(SYSCALL_NR, 3, g2); + errstr = sprintrc(rc); + printf("%s(3, [", SYSCALL_NAME); + printuid(g2[0]); + printf(", "); + printuid(g2[1]); + printf(", %p]) = %s\n", g2 + 2, errstr); + + g3[0] = 0; + g3[1] = 1; + rc = syscall(SYSCALL_NR, 3, g3); + errstr = sprintrc(rc); + printf("%s(3, [", SYSCALL_NAME); + printuid(g3[0]); + printf(", "); + printuid(g3[1]); + printf(", ...]) = %s\n", errstr); + + rc = syscall(SYSCALL_NR, 4, g3); + errstr = sprintrc(rc); + printf("%s(4, [", SYSCALL_NAME); + printuid(g3[0]); + printf(", "); + printuid(g3[1]); + printf(", ...]) = %s\n", errstr); + + rc = sysconf(_SC_NGROUPS_MAX); + const unsigned ngroups_max = rc; + + if ((unsigned long) rc == ngroups_max && (int) ngroups_max > 0) { + rc = syscall(SYSCALL_NR, ngroups_max, g3); + errstr = sprintrc(rc); + printf("%s(%d, [", SYSCALL_NAME, ngroups_max); + printuid(g3[0]); + printf(", "); + printuid(g3[1]); + printf(", ...]) = %s\n", errstr); + + const unsigned long size = + (unsigned long) 0xffffffff00000000ULL | ngroups_max; + rc = syscall(SYSCALL_NR, size, g3); + errstr = sprintrc(rc); + printf("%s(%d, [", SYSCALL_NAME, ngroups_max); + printuid(g3[0]); + printf(", "); + printuid(g3[1]); + printf(", ...]) = %s\n", errstr); + + rc = syscall(SYSCALL_NR, ngroups_max + 1, g3); + printf("%s(%d, %p) = %s\n", SYSCALL_NAME, + ngroups_max + 1, g3, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgroups") + +#endif diff --git a/tests-mx32/setgroups.test b/tests-mx32/setgroups.test new file mode 100755 index 000000000..0dcc8f756 --- /dev/null +++ b/tests-mx32/setgroups.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgroups syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s2 -a17 diff --git a/tests-mx32/setgroups32.c b/tests-mx32/setgroups32.c new file mode 100644 index 000000000..ecf00bbde --- /dev/null +++ b/tests-mx32/setgroups32.c @@ -0,0 +1,12 @@ +#include "tests.h" +#include + +#ifdef __NR_setgroups32 + +# include "setgroups.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setgroups32") + +#endif diff --git a/tests-mx32/setgroups32.test b/tests-mx32/setgroups32.test new file mode 100755 index 000000000..ee4750d1b --- /dev/null +++ b/tests-mx32/setgroups32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setgroups32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s2 -a19 diff --git a/tests-mx32/sethostname.c b/tests-mx32/sethostname.c new file mode 100644 index 000000000..e1b2f0696 --- /dev/null +++ b/tests-mx32/sethostname.c @@ -0,0 +1,79 @@ +/* + * Check decoding of sethostname syscall. + * + * Copyright (c) 2016 Fei Jie + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_sethostname + +# include +# include + +#ifdef HAVE_LINUX_UTSNAME_H +# include +#endif + +#ifndef __NEW_UTS_LEN +# define __NEW_UTS_LEN 64 +#endif + +int +main(void) +{ + kernel_ulong_t len; + long rc; + + len = __NEW_UTS_LEN; + rc = syscall(__NR_sethostname, 0, len); + printf("sethostname(NULL, %u) = %s\n", + (unsigned) len, sprintrc(rc)); + + if (F8ILL_KULONG_MASK) { + len |= F8ILL_KULONG_MASK; + rc = syscall(__NR_sethostname, 0, len); + printf("sethostname(NULL, %u) = %s\n", + (unsigned) len, sprintrc(rc)); + } + + len = __NEW_UTS_LEN + 1; + void *const p = tail_alloc(len); + rc = syscall(__NR_sethostname, p, len); + printf("sethostname(%p, %u) = %s\n", + p, (unsigned) len, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sethostname") + +#endif diff --git a/tests-mx32/sethostname.test b/tests-mx32/sethostname.test new file mode 100755 index 000000000..78f8c58ed --- /dev/null +++ b/tests-mx32/sethostname.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sethostname syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a22 diff --git a/tests-mx32/setns.c b/tests-mx32/setns.c new file mode 100644 index 000000000..54a15317e --- /dev/null +++ b/tests-mx32/setns.c @@ -0,0 +1,73 @@ +/* + * Check decoding of setns syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_setns + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_fd = + (kernel_ulong_t) 0xfeedfacedeadc0deULL; + + static struct { + kernel_ulong_t val; + const char *str; + } nstypes[] = { + { (kernel_ulong_t) 0xdefaced100000000ULL, "0" }, + { (kernel_ulong_t) 0xbadc0dedfeedfaceULL, + "0xfeedface /* CLONE_NEW??? */" }, + { (kernel_ulong_t) 0xca75f15702000000ULL, "CLONE_NEWCGROUP" }, + }; + + long rc; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(nstypes); i++) { + rc = syscall(__NR_setns, bogus_fd, nstypes[i].val); + printf("setns(%d, %s) = %s\n", + (int) bogus_fd, nstypes[i].str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setns"); + +#endif diff --git a/tests-mx32/setns.test b/tests-mx32/setns.test new file mode 100755 index 000000000..e9a905abd --- /dev/null +++ b/tests-mx32/setns.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of setns syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff --git a/tests-mx32/setregid.c b/tests-mx32/setregid.c new file mode 100644 index 000000000..e1da7862d --- /dev/null +++ b/tests-mx32/setregid.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setregid + +# define SYSCALL_NR __NR_setregid +# define SYSCALL_NAME "setregid" + +# if defined __NR_setregid32 && __NR_setregid != __NR_setregid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setregid") + +#endif diff --git a/tests-mx32/setregid.test b/tests-mx32/setregid.test new file mode 100755 index 000000000..101c7bdfb --- /dev/null +++ b/tests-mx32/setregid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setregid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a15 diff --git a/tests-mx32/setregid32.c b/tests-mx32/setregid32.c new file mode 100644 index 000000000..3cf0daf6f --- /dev/null +++ b/tests-mx32/setregid32.c @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setregid32 + +# define SYSCALL_NR __NR_setregid32 +# define SYSCALL_NAME "setregid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setregid32") + +#endif diff --git a/tests-mx32/setregid32.test b/tests-mx32/setregid32.test new file mode 100755 index 000000000..e57e66c4d --- /dev/null +++ b/tests-mx32/setregid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setregid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff --git a/tests-mx32/setresgid.c b/tests-mx32/setresgid.c new file mode 100644 index 000000000..8701df8ed --- /dev/null +++ b/tests-mx32/setresgid.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setresgid + +# define SYSCALL_NR __NR_setresgid +# define SYSCALL_NAME "setresgid" + +# if defined __NR_setresgid32 && __NR_setresgid != __NR_setresgid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) +# else +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresgid") + +#endif diff --git a/tests-mx32/setresgid.test b/tests-mx32/setresgid.test new file mode 100755 index 000000000..5a695742b --- /dev/null +++ b/tests-mx32/setresgid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresgid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff --git a/tests-mx32/setresgid32.c b/tests-mx32/setresgid32.c new file mode 100644 index 000000000..dfce45727 --- /dev/null +++ b/tests-mx32/setresgid32.c @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setresgid32 + +# define SYSCALL_NR __NR_setresgid32 +# define SYSCALL_NAME "setresgid32" +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresgid32") + +#endif diff --git a/tests-mx32/setresgid32.test b/tests-mx32/setresgid32.test new file mode 100755 index 000000000..528b2c9ed --- /dev/null +++ b/tests-mx32/setresgid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresgid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff --git a/tests-mx32/setresugid.c b/tests-mx32/setresugid.c new file mode 100644 index 000000000..711bd317c --- /dev/null +++ b/tests-mx32/setresugid.c @@ -0,0 +1,113 @@ +/* + * Check decoding of setresuid/setresgid/setresuid32/setresgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf("-1"); + else + printf("%u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int ugid) +{ + return num == ugid || num == -1U; +} + +#define TRIPLE(val) \ + { val, ugid, ugid }, { ugid, val, ugid }, { ugid, ugid, val } + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const struct { + const long r, e, s; + } tests[] = { + { ugid, ugid, ugid }, + TRIPLE((unsigned long) 0xffffffff00000000ULL | ugid), + TRIPLE(-1U), + TRIPLE(-1L), + TRIPLE(0xffff0000U | ugid), + TRIPLE(0xffff), + TRIPLE(0xc0deffffU) + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int rn = ugid2int(tests[i].r); + const unsigned int en = ugid2int(tests[i].e); + const unsigned int sn = ugid2int(tests[i].s); + + if (!num_matches_id(rn, ugid) || + !num_matches_id(en, ugid) || + !num_matches_id(sn, ugid)) + continue; + + if (syscall(SYSCALL_NR, tests[i].r, tests[i].e, tests[i].s)) { + if (!i && ENOSYS == errno) { + printf("%s(%u, %u, %u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid, ugid, ugid); + break; + } + perror_msg_and_fail("%s(%#lx, %#lx, %#lx)", + SYSCALL_NAME, + tests[i].r, tests[i].e, tests[i].s); + } + + printf("%s(", SYSCALL_NAME); + print_int(rn); + printf(", "); + print_int(en); + printf(", "); + print_int(sn); + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/setresuid.c b/tests-mx32/setresuid.c new file mode 100644 index 000000000..3a9dbd1fc --- /dev/null +++ b/tests-mx32/setresuid.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setresuid + +# define SYSCALL_NR __NR_setresuid +# define SYSCALL_NAME "setresuid" + +# if defined __NR_setresuid32 && __NR_setresuid != __NR_setresuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresuid") + +#endif diff --git a/tests-mx32/setresuid.test b/tests-mx32/setresuid.test new file mode 100755 index 000000000..f1219e069 --- /dev/null +++ b/tests-mx32/setresuid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a19 diff --git a/tests-mx32/setresuid32.c b/tests-mx32/setresuid32.c new file mode 100644 index 000000000..387268a7f --- /dev/null +++ b/tests-mx32/setresuid32.c @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setresuid32 + +# define SYSCALL_NR __NR_setresuid32 +# define SYSCALL_NAME "setresuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setresugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setresuid32") + +#endif diff --git a/tests-mx32/setresuid32.test b/tests-mx32/setresuid32.test new file mode 100755 index 000000000..942a3a650 --- /dev/null +++ b/tests-mx32/setresuid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setresuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff --git a/tests-mx32/setreugid.c b/tests-mx32/setreugid.c new file mode 100644 index 000000000..38c80d576 --- /dev/null +++ b/tests-mx32/setreugid.c @@ -0,0 +1,106 @@ +/* + * Check decoding of setreuid/setregid/setreuid32/setregid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +static int +ugid2int(const unsigned UGID_TYPE ugid) +{ + if ((unsigned UGID_TYPE) -1U == ugid) + return -1; + else + return ugid; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf("-1"); + else + printf("%u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int ugid) +{ + return num == ugid || num == -1U; +} + +#define PAIR(val) { val, ugid }, { ugid, val } + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const struct { + const long r, e; + } tests[] = { + { ugid, ugid }, + PAIR((unsigned long) 0xffffffff00000000ULL | ugid), + PAIR(-1U), + PAIR(-1L), + PAIR(0xffff0000U | ugid), + PAIR(0xffff), + PAIR(0xc0deffffU) + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int rn = ugid2int(tests[i].r); + const unsigned int en = ugid2int(tests[i].e); + + if (!num_matches_id(rn, ugid) || !num_matches_id(en, ugid)) + continue; + + if (syscall(SYSCALL_NR, tests[i].r, tests[i].e)) { + if (!i && ENOSYS == errno) { + printf("%s(%u, %u) = -1 ENOSYS (%m)\n", + SYSCALL_NAME, ugid, ugid); + break; + } + perror_msg_and_fail("%s(%#lx, %#lx)", SYSCALL_NAME, + tests[i].r, tests[i].e); + } + + printf("%s(", SYSCALL_NAME); + print_int(rn); + printf(", "); + print_int(en); + printf(") = 0\n"); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/setreuid.c b/tests-mx32/setreuid.c new file mode 100644 index 000000000..68e751923 --- /dev/null +++ b/tests-mx32/setreuid.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setreuid + +# define SYSCALL_NR __NR_setreuid +# define SYSCALL_NAME "setreuid" + +# if defined __NR_setreuid32 && __NR_setreuid != __NR_setreuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setreuid") + +#endif diff --git a/tests-mx32/setreuid.test b/tests-mx32/setreuid.test new file mode 100755 index 000000000..b6db3c1d8 --- /dev/null +++ b/tests-mx32/setreuid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setreuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a15 diff --git a/tests-mx32/setreuid32.c b/tests-mx32/setreuid32.c new file mode 100644 index 000000000..ba0176211 --- /dev/null +++ b/tests-mx32/setreuid32.c @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setreuid32 + +# define SYSCALL_NR __NR_setreuid32 +# define SYSCALL_NAME "setreuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setreugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setreuid32") + +#endif diff --git a/tests-mx32/setreuid32.test b/tests-mx32/setreuid32.test new file mode 100755 index 000000000..23323d473 --- /dev/null +++ b/tests-mx32/setreuid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setreuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff --git a/tests-mx32/setrlimit.c b/tests-mx32/setrlimit.c new file mode 100644 index 000000000..e93c8e372 --- /dev/null +++ b/tests-mx32/setrlimit.c @@ -0,0 +1,70 @@ +/* + * Check decoding of setrlimit syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_setrlimit + +# include "xgetrlimit.c" + +int +main(void) +{ + kernel_ulong_t *const rlimit = tail_alloc(sizeof(*rlimit) * 2); + const struct xlat *xlat; + + for (xlat = resources; xlat->str; ++xlat) { + unsigned long res = 0xfacefeed00000000ULL | xlat->val; + long rc = syscall(__NR_setrlimit, res, 0); + printf("setrlimit(%s, NULL) = %s\n", xlat->str, sprintrc(rc)); + + struct rlimit libc_rlim = {}; + if (getrlimit((int) res, &libc_rlim)) + continue; + rlimit[0] = libc_rlim.rlim_cur; + rlimit[1] = libc_rlim.rlim_max; + + rc = syscall(__NR_setrlimit, res, rlimit); + const char *errstr = sprintrc(rc); + printf("setrlimit(%s, {rlim_cur=%s, rlim_max=%s}) = %s\n", + xlat->str, + sprint_rlim(rlimit[0]), sprint_rlim(rlimit[1]), + errstr); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setrlimit") + +#endif diff --git a/tests-mx32/setrlimit.test b/tests-mx32/setrlimit.test new file mode 100755 index 000000000..792060897 --- /dev/null +++ b/tests-mx32/setrlimit.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of getrlimit/ugetrlimit/setrlimit syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests-mx32/setugid.c b/tests-mx32/setugid.c new file mode 100644 index 000000000..aba277c59 --- /dev/null +++ b/tests-mx32/setugid.c @@ -0,0 +1,91 @@ +/* + * Check decoding of setuid/setgid/setuid32/setgid32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +void +printuid(unsigned UGID_TYPE id) +{ + if (id == (unsigned UGID_TYPE) -1U) + printf("-1"); + else + printf("%u", id); +} + +int +main(void) +{ + unsigned int ugid = GETUGID; + CHECK_OVERFLOWUGID(ugid); + + const long tests[] = { + ugid, + 0xffff0000U | ugid, + (unsigned long) 0xffffffff00000000ULL | ugid, + 0xffffU, + -1U, + -1L + }; + + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int num = (unsigned UGID_TYPE) tests[i]; + long expected; + + if (num == ugid) + expected = 0; + else if ((UGID_TYPE) num == (UGID_TYPE) -1U) + expected = -1; + else + continue; + + const long rc = syscall(SYSCALL_NR, tests[i]); + const char *errstr = sprintrc(rc); + + if (rc != expected) { + if (!i && ENOSYS == errno) { + printf("%s(%u) = %s\n", + SYSCALL_NAME, ugid, errstr); + break; + } + perror_msg_and_fail("%s(%#lx) != %ld", + SYSCALL_NAME, tests[i], expected); + } + + printf("%s(", SYSCALL_NAME); + printuid(num); + printf(") = %s\n", errstr); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/setuid.c b/tests-mx32/setuid.c new file mode 100644 index 000000000..df2e46b17 --- /dev/null +++ b/tests-mx32/setuid.c @@ -0,0 +1,25 @@ +#include "tests.h" +#include + +#ifdef __NR_setuid + +# define SYSCALL_NR __NR_setuid +# define SYSCALL_NAME "setuid" + +# if defined __NR_setuid32 && __NR_setuid != __NR_setuid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_geteuid) +# define CHECK_OVERFLOWUGID(arg) check_overflowuid(arg) +# else +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# endif + +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setuid") + +#endif diff --git a/tests-mx32/setuid.test b/tests-mx32/setuid.test new file mode 100755 index 000000000..9279233aa --- /dev/null +++ b/tests-mx32/setuid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setuid syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-mx32/setuid32.c b/tests-mx32/setuid32.c new file mode 100644 index 000000000..c837d547c --- /dev/null +++ b/tests-mx32/setuid32.c @@ -0,0 +1,17 @@ +#include "tests.h" +#include + +#ifdef __NR_setuid32 + +# define SYSCALL_NR __NR_setuid32 +# define SYSCALL_NAME "setuid32" +# define UGID_TYPE int +# define GETUGID geteuid() +# define CHECK_OVERFLOWUGID(arg) +# include "setugid.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_setuid32") + +#endif diff --git a/tests-mx32/setuid32.test b/tests-mx32/setuid32.test new file mode 100755 index 000000000..7998392a0 --- /dev/null +++ b/tests-mx32/setuid32.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setuid32 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 diff --git a/tests-mx32/shmxt.c b/tests-mx32/shmxt.c new file mode 100644 index 000000000..23cc7ccf4 --- /dev/null +++ b/tests-mx32/shmxt.c @@ -0,0 +1,68 @@ +#include "tests.h" +#include +#include +#include + +static int id = -1; + +static void +cleanup(void) +{ + shmctl(id, IPC_RMID, NULL); + id = -1; +} + +#ifdef __alpha__ +# define SHMAT "osf_shmat" +#else +# define SHMAT "shmat" +#endif + +int +main(void) +{ + static const int bogus_shmid = 0xfdb97531; + static const void * const bogus_shmaddr = + (void *) (unsigned long) 0xdec0ded1dec0ded2ULL; + static const int bogus_shmflg = 0xffffface; + + long rc; + + id = shmget(IPC_PRIVATE, 1, 0600); + if (id < 0) + perror_msg_and_skip("shmget"); + atexit(cleanup); + + rc = (long) shmat(bogus_shmid, bogus_shmaddr, bogus_shmflg); + printf("%s(%d, %p, SHM_REMAP|SHM_RDONLY|SHM_RND|%#x) = %s\n", + SHMAT, bogus_shmid, bogus_shmaddr, bogus_shmflg & ~0x7000, + sprintrc(rc)); + + shmat(id, NULL, SHM_REMAP); + printf("%s(%d, NULL, SHM_REMAP) = -1 %s (%m)\n", + SHMAT, id, errno2name()); + + void *shmaddr = shmat(id, NULL, SHM_RDONLY); + if (shmaddr == (void *)(-1)) + perror_msg_and_skip("shmat SHM_RDONLY"); + printf("%s(%d, NULL, SHM_RDONLY) = %p\n", SHMAT, id, shmaddr); + + rc = shmdt(NULL); + printf("shmdt(NULL) = %s\n", sprintrc(rc)); + + if (shmdt(shmaddr)) + perror_msg_and_skip("shmdt"); + printf("shmdt(%p) = 0\n", shmaddr); + + ++shmaddr; + void *shmaddr2 = shmat(id, shmaddr, SHM_RND); + if (shmaddr2 == (void *)(-1)) + printf("%s(%d, %p, SHM_RND) = -1 %s (%m)\n", + SHMAT, id, shmaddr, errno2name()); + else + printf("%s(%d, %p, SHM_RND) = %p\n", + SHMAT, id, shmaddr, shmaddr2); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/shmxt.test b/tests-mx32/shmxt.test new file mode 100755 index 000000000..3757cfa44 --- /dev/null +++ b/tests-mx32/shmxt.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check shmat and shmdt syscalls decoding. + +. "${srcdir=.}/init.sh" + +case "$STRACE_ARCH" in + alpha) shmat=osf_shmat ;; + *) shmat=shmat ;; +esac + +run_strace_match_diff -e trace=$shmat,shmdt -a11 diff --git a/tests-mx32/shutdown.c b/tests-mx32/shutdown.c new file mode 100644 index 000000000..d770c43a8 --- /dev/null +++ b/tests-mx32/shutdown.c @@ -0,0 +1,15 @@ +/* Check decoding of shutdown syscall. */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + int rc = shutdown(-1, SHUT_RDWR); + printf("shutdown(-1, SHUT_RDWR) = %d %s (%m)\n", rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/shutdown.test b/tests-mx32/shutdown.test new file mode 100755 index 000000000..22f0d5ab6 --- /dev/null +++ b/tests-mx32/shutdown.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of shutdown syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff --git a/tests-mx32/sigaction.awk b/tests-mx32/sigaction.awk new file mode 100644 index 000000000..9c3a9ed33 --- /dev/null +++ b/tests-mx32/sigaction.awk @@ -0,0 +1,95 @@ +#!/bin/gawk +# +# Copyright (c) 2014-2015 Dmitry V. Levin +# Copyright (c) 2016 Elvira Khabirova +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +BEGIN { + n1[1][1] = n2[1][1] = "SIG_IGN" + n1[1][2] = n2[1][2] = "\\[HUP INT\\]" + n1[1][3] = "SA_RESTORER\\|SA_RESTART" + n2[1][3] = "SA_RESTART" + n1[1][4] = ", sa_restorer=0x[0-9a-f]+" + n2[1][4] = "" + + n1[2][1] = n2[2][1] = "0x[0-9a-f]+" + n1[2][2] = n2[2][2] = "\\[QUIT TERM\\]" + n1[2][3] = "SA_RESTORER\\|SA_SIGINFO" + n2[2][3] = "SA_SIGINFO" + n1[2][4] = ", sa_restorer=0x[0-9a-f]+" + n2[2][4] = "" + + n1[3][1] = n2[3][1] = "SIG_DFL" + n1[3][2] = n2[3][2] = "\\[\\]" + n1[3][3] = "SA_RESTORER" + n2[3][3] = "0" + n1[3][4] = ", sa_restorer=0x[0-9a-f]+" + n2[3][4] = "" + + n1[4][1] = n2[4][1] = "SIG_DFL" + n1[4][2] = n2[4][2] = "~\\[HUP( ((RT|SIGRT)[^] ]+|[3-9][0-9]|1[0-9][0-9]))*\\]" + n1[4][3] = "SA_RESTORER" + n2[4][3] = "0" + n1[4][4] = ", sa_restorer=0x[0-9a-f]+" + n2[4][4] = "" + + o1[1][1] = o2[1][1] = "SIG_DFL" + o1[1][2] = o2[1][2] = "\\[\\]" + o1[1][3] = o2[1][3] = "0" + o1[1][4] = o2[1][4] = "" + + for (i = 2; i < 5; i++) { + for (j = 1; j < 5; j++) { + o1[i][j] = n1[i - 1][j] + o2[i][j] = n2[i - 1][j] + } + } + + a1 = "(0x[0-9a-f]+, )?(4|8|16)" + a2 = "(4|8|16)(, 0x[0-9a-f]+)?" + a3 = "0x[0-9a-f]+, (4|8|16)" + + for (i = 1; i < 5; i++) { + r[i] = "^rt_sigaction\\(SIGUSR2, (" \ + "\\{sa_handler=" n1[i][1] ", sa_mask=" n1[i][2] \ + ", sa_flags=" n1[i][3] n1[i][4] "\\}, \\{sa_handler=" \ + o1[i][1] ", sa_mask=" o1[i][2] ", sa_flags=" o1[i][3] \ + o1[i][4] "\\}, " a1 "|" \ + "\\{sa_handler=" n2[i][1] ", sa_mask=" n2[i][2] \ + ", sa_flags=" n2[i][3] n2[i][4] "\\}, \\{sa_handler=" \ + o2[i][1] ", sa_mask=" o2[i][2] ", sa_flags=" o2[i][3] \ + o2[i][4] "\\}, " a2 "|" \ + "\\{sa_handler=" n2[i][1] ", sa_mask=" n2[i][2] \ + ", sa_flags=" n2[i][3] n2[i][4] "\\}, \\{sa_handler=" \ + o2[i][1] ", sa_mask=" o2[i][2] ", sa_flags=" o2[i][3] \ + o2[i][4] "\\}, " a3 ")\\) = 0$" + } + s[5] = "+++ exited with 0 +++" + + lines = 5 + fail = 0 +} + +@include "match.awk" diff --git a/tests-mx32/sigaction.c b/tests-mx32/sigaction.c new file mode 100644 index 000000000..1c034ff34 --- /dev/null +++ b/tests-mx32/sigaction.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2014-2015 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include + +static void handle_signal(int no) +{ + _exit(128 + no); +} + +int +main(void) +{ + struct sigaction sa, sa0; + + sa.sa_handler = SIG_IGN; + sigemptyset(&sa.sa_mask); + sigaddset(&sa.sa_mask, SIGHUP); + sigaddset(&sa.sa_mask, SIGINT); + sa.sa_flags = SA_RESTART; + assert(!sigaction(SIGUSR2, &sa, &sa0)); + + sa.sa_handler = handle_signal; + sigemptyset(&sa.sa_mask); + sigaddset(&sa.sa_mask, SIGQUIT); + sigaddset(&sa.sa_mask, SIGTERM); + sa.sa_flags = SA_SIGINFO; + assert(!sigaction(SIGUSR2, &sa, &sa0)); + + sa.sa_handler = SIG_DFL; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + assert(!sigaction(SIGUSR2, &sa, &sa0)); + + sigfillset(&sa.sa_mask); + sigdelset(&sa.sa_mask, SIGHUP); + assert(!sigaction(SIGUSR2, &sa, &sa0)); + + return 0; +} diff --git a/tests-mx32/sigaction.test b/tests-mx32/sigaction.test new file mode 100755 index 000000000..fcde3bafa --- /dev/null +++ b/tests-mx32/sigaction.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check rt_sigaction decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -ert_sigaction $args +match_awk + +exit 0 diff --git a/tests-mx32/sigaltstack.c b/tests-mx32/sigaltstack.c new file mode 100644 index 000000000..884e3c55f --- /dev/null +++ b/tests-mx32/sigaltstack.c @@ -0,0 +1,15 @@ +#include "tests.h" +#include + +int +main(void) +{ + stack_t ss = { + .ss_sp = (void *) 0xbaadf00d, + .ss_flags = SS_DISABLE, + .ss_size = 0xdeadbeef + }; + if (sigaltstack(&ss, (stack_t *) 0)) + perror_msg_and_skip("sigaltstack"); + return 0; +} diff --git a/tests-mx32/sigaltstack.expected b/tests-mx32/sigaltstack.expected new file mode 100644 index 000000000..be8092baa --- /dev/null +++ b/tests-mx32/sigaltstack.expected @@ -0,0 +1,2 @@ +sigaltstack({ss_sp=0xbaadf00d, ss_flags=SS_DISABLE, ss_size=3735928559}, NULL) = 0 ++++ exited with 0 +++ diff --git a/tests-mx32/sigaltstack.test b/tests-mx32/sigaltstack.test new file mode 100755 index 000000000..ff83c2eac --- /dev/null +++ b/tests-mx32/sigaltstack.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check sigaltstack syscall decoding. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -e sigaltstack $args +match_diff + +exit 0 diff --git a/tests-mx32/siginfo.c b/tests-mx32/siginfo.c new file mode 100644 index 000000000..2ecb13fd9 --- /dev/null +++ b/tests-mx32/siginfo.c @@ -0,0 +1,175 @@ +/* + * Check SIGCHLD siginfo_t decoding. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static siginfo_t sinfo; + +static void +handler(int no, siginfo_t *si, void *uc) +{ + memcpy(&sinfo, si, sizeof(sinfo)); +} + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + pid_t pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + char c; + (void) close(1); + assert(read(0, &c, sizeof(c)) == 1); + return 42; + } + + (void) close(0); + + struct sigaction sa = { + .sa_sigaction = handler, + .sa_flags = SA_SIGINFO + }; + assert(sigaction(SIGCHLD, &sa, NULL) == 0); + + sigset_t block_mask, unblock_mask; + assert(sigprocmask(SIG_SETMASK, NULL, &block_mask) == 0); + sigaddset(&block_mask, SIGCHLD); + assert(sigprocmask(SIG_SETMASK, &block_mask, NULL) == 0); + + unblock_mask = block_mask; + sigdelset(&unblock_mask, SIGCHLD); + + assert(write(1, "", 1) == 1); + (void) close(1); + + sigsuspend(&unblock_mask); + tprintf("--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED" + ", si_pid=%d, si_uid=%u, si_status=%d" + ", si_utime=%llu, si_stime=%llu} ---\n", + sinfo.si_pid, sinfo.si_uid, sinfo.si_status, + zero_extend_signed_to_ull(sinfo.si_utime), + zero_extend_signed_to_ull(sinfo.si_stime)); + + int s; + assert(wait(&s) == pid); + assert(WIFEXITED(s) && WEXITSTATUS(s) == 42); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + (void) close(1); + char c; + assert(read(0, &c, sizeof(c)) == 1); + (void) raise(SIGUSR1); + return 1; + } + + (void) close(0); + + assert(write(1, "", 1) == 1); + (void) close(1); + + sigsuspend(&unblock_mask); + tprintf("--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED" + ", si_pid=%d, si_uid=%u, si_status=SIGUSR1" + ", si_utime=%llu, si_stime=%llu} ---\n", + sinfo.si_pid, sinfo.si_uid, + zero_extend_signed_to_ull(sinfo.si_utime), + zero_extend_signed_to_ull(sinfo.si_stime)); + + assert(wait(&s) == pid); + assert(WIFSIGNALED(s) && WTERMSIG(s) == SIGUSR1); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + (void) close(1); + raise(SIGSTOP); + char c; + assert(read(0, &c, sizeof(c)) == 1); + return 0; + } + + (void) close(0); + + sigsuspend(&unblock_mask); + tprintf("--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_STOPPED" + ", si_pid=%d, si_uid=%u, si_status=SIGSTOP" + ", si_utime=%llu, si_stime=%llu} ---\n", + sinfo.si_pid, sinfo.si_uid, + zero_extend_signed_to_ull(sinfo.si_utime), + zero_extend_signed_to_ull(sinfo.si_stime)); + + assert(kill(pid, SIGCONT) == 0); + + sigsuspend(&unblock_mask); + tprintf("--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_CONTINUED" + ", si_pid=%d, si_uid=%u, si_status=SIGCONT" + ", si_utime=%llu, si_stime=%llu} ---\n", + sinfo.si_pid, sinfo.si_uid, + zero_extend_signed_to_ull(sinfo.si_utime), + zero_extend_signed_to_ull(sinfo.si_stime)); + + assert(write(1, "", 1) == 1); + (void) close(1); + + sigsuspend(&unblock_mask); + tprintf("--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED" + ", si_pid=%d, si_uid=%u, si_status=0" + ", si_utime=%llu, si_stime=%llu} ---\n", + sinfo.si_pid, sinfo.si_uid, + zero_extend_signed_to_ull(sinfo.si_utime), + zero_extend_signed_to_ull(sinfo.si_stime)); + + assert(wait(&s) == pid && s == 0); + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/siginfo.test b/tests-mx32/siginfo.test new file mode 100755 index 000000000..725f714f8 --- /dev/null +++ b/tests-mx32/siginfo.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check SIGCHLD siginfo_t decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=none diff --git a/tests-mx32/signal2name.c b/tests-mx32/signal2name.c new file mode 100644 index 000000000..e301f4ee4 --- /dev/null +++ b/tests-mx32/signal2name.c @@ -0,0 +1,55 @@ +#include "tests.h" +#include + +#define CASE(x) case x: return #x + +const char * +signal2name(int sig) +{ + switch (sig) { + CASE(SIGALRM); + CASE(SIGBUS); + CASE(SIGCHLD); + CASE(SIGCONT); + CASE(SIGFPE); + CASE(SIGHUP); + CASE(SIGILL); + CASE(SIGINT); + CASE(SIGIO); + CASE(SIGPIPE); + CASE(SIGPROF); + CASE(SIGQUIT); + CASE(SIGSEGV); + CASE(SIGSYS); + CASE(SIGTERM); + CASE(SIGTRAP); + CASE(SIGTSTP); + CASE(SIGTTIN); + CASE(SIGTTOU); + CASE(SIGURG); + CASE(SIGUSR1); + CASE(SIGUSR2); + CASE(SIGVTALRM); + CASE(SIGWINCH); + CASE(SIGXCPU); + CASE(SIGXFSZ); +#if defined ALPHA + CASE(SIGABRT); + CASE(SIGEMT); + CASE(SIGINFO); +#elif defined SPARC || defined SPARC64 + CASE(SIGABRT); + CASE(SIGEMT); + CASE(SIGLOST); +#elif defined MIPS + CASE(SIGEMT); + CASE(SIGIOT); + CASE(SIGPWR); +#else + CASE(SIGABRT); + CASE(SIGPWR); + CASE(SIGSTKFLT); +#endif + default: perror_msg_and_fail("unknown signal number %d", sig); + } +} diff --git a/tests-mx32/signal_receive.c b/tests-mx32/signal_receive.c new file mode 100644 index 000000000..1c4293e5f --- /dev/null +++ b/tests-mx32/signal_receive.c @@ -0,0 +1,45 @@ +#include "tests.h" +#include +#include +#include + +void sig_print(const char *signame, const int pid, const int uid) +{ + printf("kill(%d, %s) = 0\n" + "--- %s {si_signo=%s, si_code=SI_USER, si_pid=%d" + ", si_uid=%d} ---\n", + pid, signame, signame, signame, pid, uid); +} + +static void +handler(int sig) +{ +} + +int +main(void) +{ + int sig, pid = getpid(), uid = getuid(); + const struct sigaction act = { .sa_handler = handler }; + sigset_t mask; + sigemptyset(&mask); + + for (sig = 1; sig <= 31; sig++) { + if( sig != SIGKILL && sig != SIGSTOP) { + sigaction(sig, &act, NULL); + sigaddset(&mask, sig); + } + } + sigprocmask(SIG_UNBLOCK, &mask, NULL); + + for (sig = 1; sig <= 31; sig++) { + if(sig != SIGKILL && sig != SIGSTOP) { + if (kill(pid, sig) != 0) + perror_msg_and_fail("kill: %d", sig); + sig_print(signal2name(sig), pid, uid); + } + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/signal_receive.test b/tests-mx32/signal_receive.test new file mode 100755 index 000000000..9685b666e --- /dev/null +++ b/tests-mx32/signal_receive.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check whether strace traces signals properly. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a16 -e trace=kill diff --git a/tests-mx32/signalfd4.c b/tests-mx32/signalfd4.c new file mode 100644 index 000000000..47e49b500 --- /dev/null +++ b/tests-mx32/signalfd4.c @@ -0,0 +1,86 @@ +/* + * Check decoding of signalfd4 syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_rt_sigprocmask \ + && defined HAVE_SYS_SIGNALFD_H \ + && defined HAVE_SIGNALFD \ + && defined O_CLOEXEC + +# include +# include +# include +# include + +static unsigned int +get_sigset_size(void) +{ + const unsigned int big_size = 1024 / 8; + unsigned int set_size; + + for (set_size = big_size; set_size; set_size >>= 1) { + if (!syscall(__NR_rt_sigprocmask, SIG_SETMASK, + NULL, NULL, set_size)) + break; + } + + if (!set_size) + perror_msg_and_fail("rt_sigprocmask"); + + return set_size; +} + +int +main(void) +{ + const char *const sigs = SIGUSR2 < SIGCHLD ? "USR2 CHLD" : "CHLD USR2"; + const unsigned int size = get_sigset_size(); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR2); + sigaddset(&mask, SIGCHLD); + + int fd = signalfd(-1, &mask, O_CLOEXEC | O_NONBLOCK); + printf("signalfd4(-1, [%s], %u, SFD_CLOEXEC|SFD_NONBLOCK) = %s\n", + sigs, size, sprintrc(fd)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_rt_sigprocmask && HAVE_SYS_SIGNALFD_H" + " && HAVE_SIGNALFD && O_CLOEXEC") + +#endif diff --git a/tests-mx32/signalfd4.test b/tests-mx32/signalfd4.test new file mode 100755 index 000000000..a615a5bf3 --- /dev/null +++ b/tests-mx32/signalfd4.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of signalfd4 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/sigreturn.c b/tests-mx32/sigreturn.c new file mode 100644 index 000000000..dace040a5 --- /dev/null +++ b/tests-mx32/sigreturn.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#ifdef ASM_SIGRTMIN +# define RT_0 ASM_SIGRTMIN +#else +/* Linux kernel >= 3.18 defines SIGRTMIN to 32 on all architectures. */ +# define RT_0 32 +#endif + +static void handler(int sig) +{ +} + +int main(void) { + sigset_t set; + sigemptyset(&set); + sigaddset(&set, SIGUSR2); + sigaddset(&set, SIGCHLD); + sigaddset(&set, RT_0 + 3); + sigaddset(&set, RT_0 + 4); + sigaddset(&set, RT_0 + 5); + sigaddset(&set, RT_0 + 26); + sigaddset(&set, RT_0 + 27); + sigprocmask(SIG_SETMASK, &set, NULL); + signal(SIGUSR1, handler); + raise(SIGUSR1); + return 0; +} diff --git a/tests-mx32/sigreturn.test b/tests-mx32/sigreturn.test new file mode 100755 index 000000000..f9a612bff --- /dev/null +++ b/tests-mx32/sigreturn.test @@ -0,0 +1,48 @@ +#!/bin/sh +# +# Check rt_sigprocmask and sigreturn/rt_sigreturn decoding. +# +# Copyright (c) 2015-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -esignal $args + +mask='\[(USR2 CHLD|CHLD USR2) RT_3 RT_4 RT_5 RT_26 RT_27\]' +rt_sigprocmask='rt_sigprocmask\(SIG_SETMASK, '"$mask"', NULL, [[:digit:]]+\) += 0' +osf_sigprocmask='osf_sigprocmask\(SIG_SETMASK, '"$mask"'\) += 0 +\(old mask \[[^]]*\]\)' +EXPECTED="$LOG.expected" + +cat > "$EXPECTED" << __EOF__ +$rt_sigprocmask|$osf_sigprocmask +(rt_)?sigreturn\\((\\{mask=$mask\\})?\\) += 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" + +exit 0 diff --git a/tests-mx32/sleep.c b/tests-mx32/sleep.c new file mode 100644 index 000000000..f4bce3cdb --- /dev/null +++ b/tests-mx32/sleep.c @@ -0,0 +1,49 @@ +/* + * A simple nanosleep based sleep(1) replacement. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(int ac, char **av) +{ + if (ac < 2) + error_msg_and_fail("missing operand"); + + if (ac > 2) + error_msg_and_fail("extra operand"); + + struct timespec ts = { atoi(av[1]), 0 }; + + if (nanosleep(&ts, NULL)) + perror_msg_and_fail("nanosleep"); + + return 0; +} diff --git a/tests-mx32/socketcall.c b/tests-mx32/socketcall.c new file mode 100644 index 000000000..4fe1ea3ac --- /dev/null +++ b/tests-mx32/socketcall.c @@ -0,0 +1,95 @@ +/* + * Check decoding of socketcall syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_socketcall + +# include +# include +# include + +# include "xlat.h" +# include "xlat/socketcalls.h" + +static const char * +xlookup_uint(const struct xlat *xlat, const unsigned int val) +{ + for (; xlat->str != NULL; xlat++) + if (xlat->val == val) + return xlat->str; + return NULL; +} + +static const int sc_min = 1, sc_max = 20; +static void *efault; + +static void +test_socketcall(const int i, const void *const addr) +{ + const unsigned long call = + (unsigned long) 0xfacefeed00000000ULL | (unsigned int) i; + + long rc = syscall(__NR_socketcall, call, addr); + + if (i < sc_min || i > sc_max) { + printf("socketcall(%d, %p) = %ld %s (%m)\n", + (int) call, addr, rc, errno2name()); + } else if (addr == efault) { + const char *const str = xlookup_uint(socketcalls, i); + assert(str); + printf("socketcall(%s, %p) = %ld %s (%m)\n", + str, addr, rc, errno2name()); + } +} +int +main(void) +{ + assert((unsigned) sc_min == socketcalls[0].val); + assert((unsigned) sc_max == socketcalls[ARRAY_SIZE(socketcalls) - 2].val); + + const unsigned long *const args = tail_alloc(sizeof(*args) * 6); + efault = tail_alloc(1) + 1; + + int i; + for (i = sc_min - 3; i <= sc_max + 3; ++i) { + test_socketcall(i, efault); + test_socketcall(i, args); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_socketcall") + +#endif diff --git a/tests-mx32/socketcall.test b/tests-mx32/socketcall.test new file mode 100755 index 000000000..959bc83d4 --- /dev/null +++ b/tests-mx32/socketcall.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of socketcall syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 diff --git a/tests-mx32/sockname.c b/tests-mx32/sockname.c new file mode 100644 index 000000000..c5072cac4 --- /dev/null +++ b/tests-mx32/sockname.c @@ -0,0 +1,156 @@ +/* + * Check decoding of sockname family syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef TEST_SYSCALL_NAME +# error TEST_SYSCALL_NAME must be defined +#endif + +#define TEST_SYSCALL_STR__(a) #a +#define TEST_SYSCALL_STR_(a) TEST_SYSCALL_STR__(a) +#define TEST_SYSCALL_STR TEST_SYSCALL_STR_(TEST_SYSCALL_NAME) +#define TEST_SOCKET TEST_SYSCALL_STR ".socket" + +#ifdef TEST_SYSCALL_PREPARE +# define PREPARE_TEST_SYSCALL_INVOCATION do { TEST_SYSCALL_PREPARE; } while (0) +#else +# define PREPARE_TEST_SYSCALL_INVOCATION do {} while (0) +#endif + +#ifndef PREFIX_S_ARGS +# define PREFIX_S_ARGS +#endif +#ifndef PREFIX_F_ARGS +# define PREFIX_F_ARGS +#endif +#ifndef PREFIX_S_STR +# define PREFIX_S_STR "" +#endif +#ifndef PREFIX_F_STR +# define PREFIX_F_STR "" +#endif +#ifndef SUFFIX_ARGS +# define SUFFIX_ARGS +#endif +#ifndef SUFFIX_STR +# define SUFFIX_STR "" +#endif + +static void +test_sockname_syscall(const int fd) +{ + socklen_t *const plen = tail_alloc(sizeof(*plen)); + *plen = sizeof(struct sockaddr_un); + struct sockaddr_un *addr = tail_alloc(*plen); + + PREPARE_TEST_SYSCALL_INVOCATION; + int rc = TEST_SYSCALL_NAME(fd PREFIX_S_ARGS, (void *) addr, + plen SUFFIX_ARGS); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + printf("%s(%d%s, {sa_family=AF_UNIX, sun_path=\"%s\"}" + ", [%d->%d]%s) = %d\n", + TEST_SYSCALL_STR, fd, PREFIX_S_STR, addr->sun_path, + (int) sizeof(struct sockaddr_un), (int) *plen, SUFFIX_STR, rc); + + memset(addr, 0, sizeof(*addr)); + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_S_ARGS, (void *) addr, + plen SUFFIX_ARGS); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + printf("%s(%d%s, {sa_family=AF_UNIX, sun_path=\"%s\"}" + ", [%d]%s) = %d\n", + TEST_SYSCALL_STR, fd, PREFIX_S_STR, addr->sun_path, + (int) *plen, SUFFIX_STR, rc); + + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_F_ARGS, (void *) addr, 0 SUFFIX_ARGS); + printf("%s(%d%s, %p, NULL%s) = %s\n", + TEST_SYSCALL_STR, fd, PREFIX_F_STR, addr, SUFFIX_STR, + sprintrc(rc)); + + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_S_ARGS, 0, 0 SUFFIX_ARGS); + printf("%s(%d%s, NULL, NULL%s) = %s\n", + TEST_SYSCALL_STR, fd, rc == -1 ? PREFIX_F_STR : PREFIX_S_STR, + SUFFIX_STR, sprintrc(rc)); + + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_F_ARGS, (void *) addr, + plen + 1 SUFFIX_ARGS); + printf("%s(%d%s, %p, %p%s) = %s\n", + TEST_SYSCALL_STR, fd, PREFIX_F_STR, addr, + plen + 1, SUFFIX_STR, sprintrc(rc)); + + const size_t offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); + *plen = offsetof_sun_path; + memset(addr->sun_path, 'A', sizeof(addr->sun_path)); + + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_S_ARGS, (void *) addr, + plen SUFFIX_ARGS); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + printf("%s(%d%s, {sa_family=AF_UNIX}, [%d->%d]%s) = %d\n", + TEST_SYSCALL_STR, fd, PREFIX_S_STR, + (int) offsetof_sun_path, (int) *plen, SUFFIX_STR, rc); + + ++addr; + *plen = sizeof(struct sockaddr); + addr = (void *) addr - *plen; + + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_S_ARGS, (void *) addr, + plen SUFFIX_ARGS); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + printf("%s(%d%s, {sa_family=AF_UNIX, sun_path=\"%.*s\"}" + ", [%d->%d]%s) = %d\n", + TEST_SYSCALL_STR, fd, PREFIX_S_STR, + (int) (sizeof(struct sockaddr) - offsetof_sun_path), + addr->sun_path, (int) sizeof(struct sockaddr), + (int) *plen, SUFFIX_STR, rc); + + PREPARE_TEST_SYSCALL_INVOCATION; + rc = TEST_SYSCALL_NAME(fd PREFIX_F_ARGS, (void *) addr, + plen SUFFIX_ARGS); + printf("%s(%d%s, %p, [%d]%s) = %s\n", + TEST_SYSCALL_STR, fd, PREFIX_F_STR, addr, + *plen, SUFFIX_STR, sprintrc(rc)); +} diff --git a/tests-mx32/splice.c b/tests-mx32/splice.c new file mode 100644 index 000000000..b6f252560 --- /dev/null +++ b/tests-mx32/splice.c @@ -0,0 +1,65 @@ +/* + * This file is part of splice strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_splice + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffffULL; + const long int fd_out = (long int) 0xdeadbeeffffffffeULL; + long long int *const off_in = tail_alloc(sizeof(*off_in)); + long long int *const off_out = tail_alloc(sizeof(*off_out)); + *off_in = 0xdeadbef1facefed1ULL; + *off_out = 0xdeadbef2facefed2ULL; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 15; + + long rc = syscall(__NR_splice, + fd_in, off_in, fd_out, off_out, len, flags); + printf("splice(%d, [%lld], %d, [%lld], %zu, %s) = %ld %s (%m)\n", + (int) fd_in, *off_in, (int) fd_out, *off_out, len, + "SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_splice") + +#endif diff --git a/tests-mx32/splice.test b/tests-mx32/splice.test new file mode 100755 index 000000000..cc5c327eb --- /dev/null +++ b/tests-mx32/splice.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check splice syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/sprintrc.c b/tests-mx32/sprintrc.c new file mode 100644 index 000000000..7423afb69 --- /dev/null +++ b/tests-mx32/sprintrc.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +enum sprintrc_fmt { + SPRINTRC_FMT_RAW, + SPRINTRC_FMT_GREP, +}; + +/** + * Provides pointer to static string buffer with printed return code in format + * used by strace - with errno and error message. + * + * @param rc Return code. + * @param fmt Output format. Currently, raw (used for diff matching) and grep + * (for extended POSIX regex-based pattern matching) formats are + * supported. + * @return Pointer to (statically allocated) buffer containing decimal + * representation of return code and errno/error message in case @rc + * is equal to -1. + */ +static inline const char * +sprintrc_ex(long rc, enum sprintrc_fmt fmt) +{ + static const char *formats[] = { + [SPRINTRC_FMT_RAW] = "-1 %s (%m)", + [SPRINTRC_FMT_GREP] = "-1 %s \\(%m\\)", + }; + static char buf[4096]; + + if (fmt >= ARRAY_SIZE(formats)) + perror_msg_and_fail("sprintrc_ex: incorrect format provided"); + + if (rc == 0) + return "0"; + + int ret = (rc == -1) + ? snprintf(buf, sizeof(buf), formats[fmt], errno2name()) + : snprintf(buf, sizeof(buf), "%ld", rc); + + if (ret < 0) + perror_msg_and_fail("snprintf"); + if ((size_t) ret >= sizeof(buf)) + error_msg_and_fail("snprintf overflow: got %d, expected" + " no more than %zu", ret, sizeof(buf)); + + return buf; +} + +const char * +sprintrc(long rc) +{ + return sprintrc_ex(rc, SPRINTRC_FMT_RAW); +} + +const char * +sprintrc_grep(long rc) +{ + return sprintrc_ex(rc, SPRINTRC_FMT_GREP); +} diff --git a/tests-mx32/stack-fcall-0.c b/tests-mx32/stack-fcall-0.c new file mode 100644 index 000000000..12a260deb --- /dev/null +++ b/tests-mx32/stack-fcall-0.c @@ -0,0 +1,6 @@ +int f1(int i); + +int f0(int i) +{ + return f1(i) - i; +} diff --git a/tests-mx32/stack-fcall-1.c b/tests-mx32/stack-fcall-1.c new file mode 100644 index 000000000..8716702df --- /dev/null +++ b/tests-mx32/stack-fcall-1.c @@ -0,0 +1,6 @@ +int f2(int i); + +int f1(int i) +{ + return f2(i) + i; +} diff --git a/tests-mx32/stack-fcall-2.c b/tests-mx32/stack-fcall-2.c new file mode 100644 index 000000000..19f8cf83c --- /dev/null +++ b/tests-mx32/stack-fcall-2.c @@ -0,0 +1,6 @@ +int f3(int i); + +int f2(int i) +{ + return f3(i) - i; +} diff --git a/tests-mx32/stack-fcall-3.c b/tests-mx32/stack-fcall-3.c new file mode 100644 index 000000000..3af1667f4 --- /dev/null +++ b/tests-mx32/stack-fcall-3.c @@ -0,0 +1,6 @@ +#include + +int f3(int i) +{ + return getpid() + i; +} diff --git a/tests-mx32/stack-fcall.c b/tests-mx32/stack-fcall.c new file mode 100644 index 000000000..134d54f61 --- /dev/null +++ b/tests-mx32/stack-fcall.c @@ -0,0 +1,7 @@ +int f0(int i); + +int main(int argc, char** argv) +{ + f0(argc); + return 0; +} diff --git a/tests-mx32/stat.c b/tests-mx32/stat.c new file mode 100644 index 000000000..d4ca7b0b9 --- /dev/null +++ b/tests-mx32/stat.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_stat + +# define TEST_SYSCALL_NR __NR_stat +# define TEST_SYSCALL_STR "stat" +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 43147718418ULL) +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_stat") + +#endif diff --git a/tests-mx32/stat.test b/tests-mx32/stat.test new file mode 100755 index 000000000..ba8938c02 --- /dev/null +++ b/tests-mx32/stat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check stat syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-mx32/stat64.c b/tests-mx32/stat64.c new file mode 100644 index 000000000..782de33d6 --- /dev/null +++ b/tests-mx32/stat64.c @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_stat64 + +# define TEST_SYSCALL_NR __NR_stat64 +# define TEST_SYSCALL_STR "stat64" +# define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" +# define STRUCT_STAT_IS_STAT64 1 +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_stat64") + +#endif diff --git a/tests-mx32/stat64.test b/tests-mx32/stat64.test new file mode 100755 index 000000000..abcfb9eca --- /dev/null +++ b/tests-mx32/stat64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check stat64 syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests-mx32/statfs.c b/tests-mx32/statfs.c new file mode 100644 index 000000000..6032a668b --- /dev/null +++ b/tests-mx32/statfs.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_statfs + +# define SYSCALL_ARG_FMT "\"%s\"" +# define SYSCALL_ARG(file, desc) (file) +# define SYSCALL_NR __NR_statfs +# define SYSCALL_NAME "statfs" +# include "xstatfs.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_statfs") + +#endif diff --git a/tests-mx32/statfs.expected b/tests-mx32/statfs.expected new file mode 100644 index 000000000..11e9f0b15 --- /dev/null +++ b/tests-mx32/statfs.expected @@ -0,0 +1 @@ +statfs(64)?\("/proc/self/status"(, [1-9][0-9]*)?, \{f_type=PROC_SUPER_MAGIC, f_bsize=[1-9][0-9]*, f_blocks=[0-9]+, f_bfree=[0-9]+, f_bavail=[0-9]+, f_files=[0-9]+, f_ffree=[0-9]+, f_fsid=\{val=\[[0-9]+, [0-9]+\]\}, f_namelen=[1-9][0-9]*(, f_frsize=[0-9]+)?(, f_flags=ST_VALID(\|ST_[A-Z]+)*)?\}\) += 0 diff --git a/tests-mx32/statfs.test b/tests-mx32/statfs.test new file mode 100755 index 000000000..6075576f8 --- /dev/null +++ b/tests-mx32/statfs.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check statfs syscall decoding. + +. "${srcdir=.}/init.sh" + +# this test probes /proc/self/status +[ -f /proc/self/status ] || + framework_skip_ '/proc/self/status is not available' + +run_strace_match_diff -a17 diff --git a/tests-mx32/statfs64.c b/tests-mx32/statfs64.c new file mode 100644 index 000000000..f46e76709 --- /dev/null +++ b/tests-mx32/statfs64.c @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_statfs64 + +# define SYSCALL_ARG_FMT "\"%s\"" +# define SYSCALL_ARG(file, desc) (file) +# define SYSCALL_NR __NR_statfs64 +# define SYSCALL_NAME "statfs64" +# include "xstatfs64.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_statfs64") + +#endif diff --git a/tests-mx32/statfs64.test b/tests-mx32/statfs64.test new file mode 100755 index 000000000..9c0aa2787 --- /dev/null +++ b/tests-mx32/statfs64.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check statfs64 syscall decoding. + +. "${srcdir=.}/statfs.test" diff --git a/tests-mx32/statx.sh b/tests-mx32/statx.sh new file mode 100755 index 000000000..a630193d7 --- /dev/null +++ b/tests-mx32/statx.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of stat family syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -P $NAME.sample -P /dev/full -a32 diff --git a/tests-mx32/strace-C.expected b/tests-mx32/strace-C.expected new file mode 100644 index 000000000..832af1f38 --- /dev/null +++ b/tests-mx32/strace-C.expected @@ -0,0 +1,3 @@ +nanosleep\(\{tv_sec=1, tv_nsec=0\}, NULL\) = 0 +\+\+\+ exited with 0 \+\+\+ +[ ]*[0-9][0-9]*[.][0-9][0-9]* *0[.]0[0-9]* *[0-9][0-9]* *1 *nanosleep diff --git a/tests-mx32/strace-C.test b/tests-mx32/strace-C.test new file mode 100755 index 000000000..ccca9a091 --- /dev/null +++ b/tests-mx32/strace-C.test @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -C option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -a24 -C -enanosleep ./sleep 1 +match_grep diff --git a/tests-mx32/strace-E.expected b/tests-mx32/strace-E.expected new file mode 100644 index 000000000..d7823b7a2 --- /dev/null +++ b/tests-mx32/strace-E.expected @@ -0,0 +1 @@ +execve\("\./sleep", \["\./sleep", "0"\], \[.*"option_E_var=OPTION_E_VAL".*\]\) = 0 diff --git a/tests-mx32/strace-E.test b/tests-mx32/strace-E.test new file mode 100755 index 000000000..d76ec3f5c --- /dev/null +++ b/tests-mx32/strace-E.test @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -E option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 > /dev/null +run_strace -E option_E_var=OPTION_E_VAL -v $args +match_grep diff --git a/tests-mx32/strace-S.test b/tests-mx32/strace-S.test new file mode 100755 index 000000000..3ea315cef --- /dev/null +++ b/tests-mx32/strace-S.test @@ -0,0 +1,32 @@ +#!/bin/sh + +# Check -S option. + +. "${srcdir=.}/init.sh" + +run_prog ./readv > /dev/null + +test_c() +{ + local sortby sortopts sedexpr + sortby="$1"; shift + sortopts="$1"; shift + sedexpr="$1"; shift + + run_strace -c -w -S "$sortby" ./readv > /dev/null + sed -r -n -e "$sedexpr" < "$LOG" > "$OUT" + + [ -s "$OUT" ] || + fail_ "$STRACE $args output mismatch" + LC_ALL=C sort -c $sortopts "$OUT" || { + echo 'Actual output:' + cat < "$LOG" + fail_ "$STRACE $args output not sorted properly" + } +} + +c='[[:space:]]+([^[:space:]]+)' +test_c calls '-n -r' '/^[[:space:]]+[0-9]/ s/^'"$c$c$c$c"'[[:space:]].*/\4/p' +test_c name '' '/^[[:space:]]+[0-9]/ s/^'"$c$c$c$c"'([[:space:]]+[0-9]+)?'"$c"'$/\6/p' + +rm -f "$OUT" diff --git a/tests-mx32/strace-T.expected b/tests-mx32/strace-T.expected new file mode 100644 index 000000000..1ea020465 --- /dev/null +++ b/tests-mx32/strace-T.expected @@ -0,0 +1 @@ +nanosleep\(\{tv_sec=1, tv_nsec=0\}, NULL\) = 0 <(1\.[01]|0\.9)[[:digit:]]{5}> diff --git a/tests-mx32/strace-T.test b/tests-mx32/strace-T.test new file mode 100755 index 000000000..7ab84a743 --- /dev/null +++ b/tests-mx32/strace-T.test @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -T option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -a24 -T -enanosleep ./sleep 1 +match_grep diff --git a/tests-mx32/strace-V.test b/tests-mx32/strace-V.test new file mode 100755 index 000000000..9a051e00e --- /dev/null +++ b/tests-mx32/strace-V.test @@ -0,0 +1,24 @@ +#!/bin/sh + +# Check -V option. +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%Y > /dev/null +year="$(date +%Y)" + +run_strace -V > "$LOG" + +getval() +{ + sed -r -n 's/#define[[:space:]]*'"$1"'[[:space:]]*"([^"]*)".*/\1/p' ../config.h +} + +cat > "$EXP" << __EOF__ +$(getval PACKAGE_NAME) -- version $(getval PACKAGE_VERSION) +Copyright (C) 1991-$year The strace developers <$(getval PACKAGE_URL)>. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +__EOF__ + +match_diff "$EXP" "$LOG" +rm -f "$EXP" diff --git a/tests-mx32/strace-ff.expected b/tests-mx32/strace-ff.expected new file mode 100644 index 000000000..627a1b4c5 --- /dev/null +++ b/tests-mx32/strace-ff.expected @@ -0,0 +1,2 @@ +exit_group(0) = ? ++++ exited with 0 +++ diff --git a/tests-mx32/strace-ff.test b/tests-mx32/strace-ff.test new file mode 100755 index 000000000..2ce06f19d --- /dev/null +++ b/tests-mx32/strace-ff.test @@ -0,0 +1,29 @@ +#!/bin/sh + +# Check -ff option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed \ + kill -0 $$ + +./set_ptracer_any ./sleep 1 > "$OUT" & +tracee_pid=$! + +while ! [ -s "$OUT" ]; do + kill -0 $tracee_pid 2> /dev/null || + fail_ 'set_ptracer_any sleep failed' +done + +rm -f "$LOG".* +run_strace -a14 -eexit_group -ff -p $tracee_pid + +# check that output matches +match_diff "$LOG.$tracee_pid" + +# check that no other output files have been created +set -- "$LOG".* +[ "$LOG.$tracee_pid" = "$*" ] || + fail_ "too many output files: $*" + +rm -f "$OUT" "$LOG.$tracee_pid" diff --git a/tests-mx32/strace-k.test b/tests-mx32/strace-k.test new file mode 100755 index 000000000..d5e8ed2bc --- /dev/null +++ b/tests-mx32/strace-k.test @@ -0,0 +1,53 @@ +#!/bin/sh +# +# Ensure that strace -k works. +# +# Copyright (c) 2014 Masatake YAMATO +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# strace -k is implemented using /proc/$pid/maps +[ -f /proc/self/maps ] || + framework_skip_ '/proc/self/maps is not available' + +check_prog sed +check_prog tr + +run_prog ./stack-fcall +run_strace -e getpid -k $args + +expected='getpid f3 f2 f1 f0 main ' +result=$(sed -r -n '1,/\(main\+0x[a-f0-9]+\) .*/ s/^.*\(([^+]+)\+0x[a-f0-9]+\) .*/\1/p' "$LOG" | + tr '\n' ' ') + +test "$result" = "$expected" || { + echo "expected: \"$expected\"" + echo "result: \"$result\"" + dump_log_and_fail_with "$STRACE $args output mismatch" +} + +exit 0 diff --git a/tests-mx32/strace-r.expected b/tests-mx32/strace-r.expected new file mode 100644 index 000000000..8009c353c --- /dev/null +++ b/tests-mx32/strace-r.expected @@ -0,0 +1,2 @@ +[ ]{5}0\.0{6} execve\("\./sleep", \["\./sleep", "1"\], \[/\* [[:digit:]]+ vars \*/\]\) = 0 +[ ]{5}(1\.[01]|0\.9)[[:digit:]]{5} \+\+\+ exited with 0 \+\+\+ diff --git a/tests-mx32/strace-r.test b/tests-mx32/strace-r.test new file mode 100755 index 000000000..4ba01f12a --- /dev/null +++ b/tests-mx32/strace-r.test @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -r option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -r -eexecve ./sleep 1 +match_grep diff --git a/tests-mx32/strace-t.test b/tests-mx32/strace-t.test new file mode 100755 index 000000000..1d213e639 --- /dev/null +++ b/tests-mx32/strace-t.test @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check -t option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%T > /dev/null +run_prog ./sleep 0 + +t0="$(date +%T)" +run_strace -t -eexecve $args +t1="$(date +%T)" + +EXPECTED="$LOG.expected" +cat > "$EXPECTED" << __EOF__ +($t0|$t1) execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXPECTED" +rm -f "$EXPECTED" diff --git a/tests-mx32/strace-tt.test b/tests-mx32/strace-tt.test new file mode 100755 index 000000000..3f80001eb --- /dev/null +++ b/tests-mx32/strace-tt.test @@ -0,0 +1,28 @@ +#!/bin/sh + +# Check -tt option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%s > "$LOG" +run_prog_skip_if_failed date +%T --date "@$(cat "$LOG")" > /dev/null +run_prog ./sleep 0 + +s0="$(date +%s)" +run_strace -tt -eexecve $args +s1="$(date +%s)" + +s="$s0" +t_reg= +while [ "$s" -le "$s1" ]; do + t="$(date +%T --date "@$s")" + [ -z "$t_reg" ] && t_reg="$t" || t_reg="$t_reg|$t" + s=$(($s + 1)) +done + +cat > "$EXP" << __EOF__ +($t_reg)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXP" +rm -f "$EXP" diff --git a/tests-mx32/strace-ttt.test b/tests-mx32/strace-ttt.test new file mode 100755 index 000000000..4439715b5 --- /dev/null +++ b/tests-mx32/strace-ttt.test @@ -0,0 +1,26 @@ +#!/bin/sh + +# Check -ttt option. + +. "${srcdir=.}/init.sh" + +run_prog_skip_if_failed date +%s > /dev/null +run_prog ./sleep 0 + +s0="$(date +%s)" +run_strace -ttt -eexecve $args +s1="$(date +%s)" + +s="$s0" +t_reg= +while [ "$s" -le "$s1" ]; do + [ -z "$t_reg" ] && t_reg="$s" || t_reg="$t_reg|$s" + s=$(($s + 1)) +done + +cat > "$EXP" << __EOF__ +($t_reg)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +__EOF__ + +match_grep "$LOG" "$EXP" +rm -f "$EXP" diff --git a/tests-mx32/strace.supp b/tests-mx32/strace.supp new file mode 100644 index 000000000..578b0a259 --- /dev/null +++ b/tests-mx32/strace.supp @@ -0,0 +1,7 @@ +{ + get_cpuset_size: sched_getaffinity with NULL mask + Memcheck:Param + sched_getaffinity(mask) + fun:sched_getaffinity* + fun:get_cpuset_size +} diff --git a/tests-mx32/struct_flock.c b/tests-mx32/struct_flock.c new file mode 100644 index 000000000..34cf58e6b --- /dev/null +++ b/tests-mx32/struct_flock.c @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include "flock.h" + +#define FILE_LEN 4096 +#define EINVAL_STR "-1 EINVAL (Invalid argument)" + +#define TEST_FLOCK_EINVAL(cmd) test_flock_einval(cmd, #cmd) + +#ifdef HAVE_TYPEOF +# define TYPEOF_FLOCK_OFF_T typeof(((struct_kernel_flock *) NULL)->l_len) +#else +# define TYPEOF_FLOCK_OFF_T off_t +#endif + +static long +invoke_test_syscall(const unsigned int cmd, void *const p) +{ + const unsigned long op = (unsigned long) 0xffffffff00000000ULL | cmd; + + return syscall(TEST_SYSCALL_NR, 0, op, (unsigned long) p); +} + +static void +test_flock_einval(const int cmd, const char *name) +{ + struct_kernel_flock fl = { + .l_type = F_RDLCK, + .l_start = (TYPEOF_FLOCK_OFF_T) 0xdefaced1facefeedULL, + .l_len = (TYPEOF_FLOCK_OFF_T) 0xdefaced2cafef00dULL + }; + invoke_test_syscall(cmd, &fl); + printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET" + ", l_start=%jd, l_len=%jd}) = %s\n", TEST_SYSCALL_STR, name, + (intmax_t) fl.l_start, (intmax_t) fl.l_len, EINVAL_STR); +} + +static void +test_flock(void) +{ + TEST_FLOCK_EINVAL(F_SETLK); + TEST_FLOCK_EINVAL(F_SETLKW); + + struct_kernel_flock fl = { + .l_type = F_RDLCK, + .l_len = FILE_LEN + }; + long rc = invoke_test_syscall(F_SETLK, &fl); + printf("%s(0, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET" + ", l_start=0, l_len=%d}) = %s\n", + TEST_SYSCALL_STR, FILE_LEN, rc ? EINVAL_STR : "0"); + if (rc) + return; + + invoke_test_syscall(F_GETLK, &fl); + printf("%s(0, F_GETLK, {l_type=F_UNLCK, l_whence=SEEK_SET" + ", l_start=0, l_len=%d, l_pid=0}) = 0\n", + TEST_SYSCALL_STR, FILE_LEN); + + invoke_test_syscall(F_SETLK, &fl); + printf("%s(0, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET" + ", l_start=0, l_len=%d}) = 0\n", + TEST_SYSCALL_STR, FILE_LEN); +} + +static void +create_sample(void) +{ + char fname[] = TEST_SYSCALL_STR "_XXXXXX"; + + (void) close(0); + if (mkstemp(fname)) + perror_msg_and_fail("mkstemp: %s", fname); + if (unlink(fname)) + perror_msg_and_fail("unlink: %s", fname); + if (ftruncate(0, FILE_LEN)) + perror_msg_and_fail("ftruncate"); +} diff --git a/tests-mx32/sun_path.expected b/tests-mx32/sun_path.expected new file mode 100644 index 000000000..30a11c03d --- /dev/null +++ b/tests-mx32/sun_path.expected @@ -0,0 +1,3 @@ +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +bind\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678"\}, 110\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +getsockname\(0, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678"\}, \[110->111\]\) += 0 +[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +connect\(1, \{sa_family=AF_(LOCAL|UNIX|FILE), sun_path="123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678"\}, 110\) += 0 diff --git a/tests-mx32/sun_path.test b/tests-mx32/sun_path.test new file mode 100755 index 000000000..728328a84 --- /dev/null +++ b/tests-mx32/sun_path.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check how long sun_path addresses are traced. + +. "${srcdir=.}/init.sh" + +run_prog ./net-accept-connect 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 +run_strace_merge -ebind,connect,getsockname $args +match_grep + +exit 0 diff --git a/tests-mx32/swap.c b/tests-mx32/swap.c new file mode 100644 index 000000000..77b25050a --- /dev/null +++ b/tests-mx32/swap.c @@ -0,0 +1,51 @@ +#include "tests.h" +#include + +#if defined __NR_swapon && defined __NR_swapoff + +# include +# include +# include + +int +main(void) +{ + static const char sample[] = "swap.sample"; + long rc; + + rc = syscall(__NR_swapon, sample, 0); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "0", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, 42); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "42", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, SWAP_FLAG_PREFER); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "SWAP_FLAG_PREFER|0", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, SWAP_FLAG_PREFER | 42); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, "SWAP_FLAG_PREFER|42", rc, errno2name()); + + rc = syscall(__NR_swapon, sample, -1L); + printf("swapon(\"%s\", %s) = %ld %s (%m)\n", + sample, + "SWAP_FLAG_PREFER|SWAP_FLAG_DISCARD|SWAP_FLAG_DISCARD_ONCE" + "|SWAP_FLAG_DISCARD_PAGES|0xfff80000|32767", + rc, errno2name()); + + rc = syscall(__NR_swapoff, sample); + printf("swapoff(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_swapon && __NR_swapoff") + +#endif diff --git a/tests-mx32/swap.test b/tests-mx32/swap.test new file mode 100755 index 000000000..a30e1fd82 --- /dev/null +++ b/tests-mx32/swap.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check swapon and swapoff syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 -e trace=swapon,swapoff diff --git a/tests-mx32/symlink.c b/tests-mx32/symlink.c new file mode 100644 index 000000000..72cb49085 --- /dev/null +++ b/tests-mx32/symlink.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_symlink + +# include +# include + +int +main(void) +{ + static const char sample_1[] = "symlink_new"; + static const char sample_2[] = "symlink"; + + long rc = syscall(__NR_symlink, sample_1, sample_2); + printf("symlink(\"%s\", \"%s\") = %ld %s (%m)\n", + sample_1, sample_2, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_symlink") + +#endif diff --git a/tests-mx32/symlink.test b/tests-mx32/symlink.test new file mode 100755 index 000000000..79b93baad --- /dev/null +++ b/tests-mx32/symlink.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check symlink syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a34 diff --git a/tests-mx32/symlinkat.c b/tests-mx32/symlinkat.c new file mode 100644 index 000000000..6e5d617db --- /dev/null +++ b/tests-mx32/symlinkat.c @@ -0,0 +1,28 @@ +#include "tests.h" +#include + +#ifdef __NR_symlinkat + +# include +# include + +int +main(void) +{ + const long int fd = (long int) 0xdeadbeefffffffffULL; + static const char oldpath[] = "symlink_old"; + static const char newpath[] = "symlink_new"; + + long rc = syscall(__NR_symlinkat, oldpath, fd, newpath); + printf("symlinkat(\"%s\", %d, \"%s\") = %ld %s (%m)\n", + oldpath, (int) fd, newpath, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_symlinkat") + +#endif diff --git a/tests-mx32/symlinkat.test b/tests-mx32/symlinkat.test new file mode 100755 index 000000000..d8501ffd6 --- /dev/null +++ b/tests-mx32/symlinkat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check symlinkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/sync.c b/tests-mx32/sync.c new file mode 100644 index 000000000..e6e7ce372 --- /dev/null +++ b/tests-mx32/sync.c @@ -0,0 +1,22 @@ +#include "tests.h" +#include + +#ifdef __NR_sync + +# include +# include + +int +main(void) +{ + printf("sync() = %ld\n", syscall(__NR_sync)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_sync") + +#endif diff --git a/tests-mx32/sync.test b/tests-mx32/sync.test new file mode 100755 index 000000000..f6bf6c8f5 --- /dev/null +++ b/tests-mx32/sync.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a7 diff --git a/tests-mx32/sync_file_range.c b/tests-mx32/sync_file_range.c new file mode 100644 index 000000000..67d31a89b --- /dev/null +++ b/tests-mx32/sync_file_range.c @@ -0,0 +1,63 @@ +/* + * Check decoding of sync_file_range syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined HAVE_SYNC_FILE_RANGE && defined __NR_sync_file_range + +# include + +int +main(void) +{ + const int fd = -1; + const off64_t offset = 0xdeadbeefbadc0dedULL; + const off64_t nbytes = 0xfacefeedcafef00dULL; + const unsigned int flags = -1; + + int rc = sync_file_range(fd, offset, nbytes, flags); + printf("%s(%d, %lld, %lld, SYNC_FILE_RANGE_WAIT_BEFORE" + "|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER" + "|0xfffffff8) = %d %s (%m)\n", + "sync_file_range", fd, + (long long) offset, + (long long) nbytes, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYNC_FILE_RANGE && __NR_sync_file_range") + +#endif diff --git a/tests-mx32/sync_file_range.test b/tests-mx32/sync_file_range.test new file mode 100755 index 000000000..6aa86d6ca --- /dev/null +++ b/tests-mx32/sync_file_range.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync_file_range syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/sync_file_range2.c b/tests-mx32/sync_file_range2.c new file mode 100644 index 000000000..6ce7db260 --- /dev/null +++ b/tests-mx32/sync_file_range2.c @@ -0,0 +1,63 @@ +/* + * Check decoding of sync_file_range2 syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined HAVE_SYNC_FILE_RANGE && defined __NR_sync_file_range2 + +# include + +int +main(void) +{ + const int fd = -1; + const off64_t offset = 0xdeadbeefbadc0ded; + const off64_t nbytes = 0xfacefeedcafef00d; + const unsigned int flags = -1; + + int rc = sync_file_range(fd, offset, nbytes, flags); + printf("%s(%d, SYNC_FILE_RANGE_WAIT_BEFORE" + "|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER" + "|0xfffffff8, %lld, %lld) = %d %s (%m)\n", + "sync_file_range2", fd, + (long long) offset, + (long long) nbytes, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYNC_FILE_RANGE && __NR_sync_file_range2") + +#endif diff --git a/tests-mx32/sync_file_range2.test b/tests-mx32/sync_file_range2.test new file mode 100755 index 000000000..0d9945eda --- /dev/null +++ b/tests-mx32/sync_file_range2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check sync_file_range2 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/sysinfo.c b/tests-mx32/sysinfo.c new file mode 100644 index 000000000..377bdc9c1 --- /dev/null +++ b/tests-mx32/sysinfo.c @@ -0,0 +1,76 @@ +/* + * This file is part of sysinfo strace test. + * + * Copyright (c) 2015 Elvira Khabirova + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + sysinfo(NULL); + printf("sysinfo(NULL) = -1 EFAULT (%m)\n"); + + struct sysinfo * const si = tail_alloc(sizeof(*si)); + + if (sysinfo(si)) + perror_msg_and_skip("sysinfo"); + printf("sysinfo({uptime=%llu" + ", loads=[%llu, %llu, %llu]" + ", totalram=%llu" + ", freeram=%llu" + ", sharedram=%llu" + ", bufferram=%llu" + ", totalswap=%llu" + ", freeswap=%llu" + ", procs=%u" + ", totalhigh=%llu" + ", freehigh=%llu" + ", mem_unit=%u" + "}) = 0\n" + , (unsigned long long) si->uptime + , (unsigned long long) si->loads[0] + , (unsigned long long) si->loads[1] + , (unsigned long long) si->loads[2] + , (unsigned long long) si->totalram + , (unsigned long long) si->freeram + , (unsigned long long) si->sharedram + , (unsigned long long) si->bufferram + , (unsigned long long) si->totalswap + , (unsigned long long) si->freeswap + , (unsigned) si->procs + , (unsigned long long) si->totalhigh + , (unsigned long long) si->freehigh + , si->mem_unit + ); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/sysinfo.test b/tests-mx32/sysinfo.test new file mode 100755 index 000000000..806d8b61d --- /dev/null +++ b/tests-mx32/sysinfo.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of sysinfo syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 diff --git a/tests-mx32/syslog.c b/tests-mx32/syslog.c new file mode 100644 index 000000000..5df96cb8c --- /dev/null +++ b/tests-mx32/syslog.c @@ -0,0 +1,27 @@ +#include "tests.h" +#include + +#ifdef __NR_syslog + +# include +# include + +# define SYSLOG_ACTION_READ 2 + +int +main(void) +{ + const long addr = (long) 0xfacefeeddeadbeefULL; + int rc = syscall(__NR_syslog, SYSLOG_ACTION_READ, addr, -1); + printf("syslog(SYSLOG_ACTION_READ, %#lx, -1) = %d %s (%m)\n", + addr, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_syslog") + +#endif diff --git a/tests-mx32/syslog.test b/tests-mx32/syslog.test new file mode 100755 index 000000000..1c2158e4a --- /dev/null +++ b/tests-mx32/syslog.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check syslog syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a36 diff --git a/tests-mx32/tail_alloc.c b/tests-mx32/tail_alloc.c new file mode 100644 index 000000000..08081d4fc --- /dev/null +++ b/tests-mx32/tail_alloc.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +void * +tail_alloc(const size_t size) +{ + const size_t page_size = get_page_size(); + const size_t len = (size + page_size - 1) & -page_size; + const size_t alloc_size = len + 6 * page_size; + + void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + if (MAP_FAILED == p) + perror_msg_and_fail("mmap(%zu)", alloc_size); + + void *start_work = p + 3 * page_size; + void *tail_guard = start_work + len; + + if (munmap(p, page_size) || + munmap(p + 2 * page_size, page_size) || + munmap(tail_guard, page_size) || + munmap(tail_guard + 2 * page_size, page_size)) + perror_msg_and_fail("munmap"); + + memset(start_work, 0xff, len); + return tail_guard - size; +} + +void * +tail_memdup(const void *p, const size_t size) +{ + void *dest = tail_alloc(size); + memcpy(dest, p, size); + return dest; +} diff --git a/tests-mx32/tee.c b/tests-mx32/tee.c new file mode 100644 index 000000000..66d1c94f9 --- /dev/null +++ b/tests-mx32/tee.c @@ -0,0 +1,60 @@ +/* + * This file is part of tee strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_tee + +# include +# include + +int +main(void) +{ + const long int fd_in = (long int) 0xdeadbeefffffffffULL; + const long int fd_out = (long int) 0xdeadbeeffffffffeULL; + const size_t len = (size_t) 0xdeadbef3facefed3ULL; + const unsigned int flags = 15; + + long rc = syscall(__NR_tee, fd_in, fd_out, len, flags); + printf("tee(%d, %d, %zu, %s) = %ld %s (%m)\n", + (int) fd_in, (int) fd_out, len, + "SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_tee") + +#endif diff --git a/tests-mx32/tee.test b/tests-mx32/tee.test new file mode 100755 index 000000000..76b600036 --- /dev/null +++ b/tests-mx32/tee.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check tee syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/tests.h b/tests-mx32/tests.h new file mode 100644 index 000000000..d4294de9a --- /dev/null +++ b/tests-mx32/tests.h @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef STRACE_TESTS_H +#define STRACE_TESTS_H + +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif + +# include +# include "kernel_types.h" +# include "gcc_compat.h" + +/* Tests of "strace -v" are expected to define VERBOSE to 1. */ +#ifndef VERBOSE +# define VERBOSE 0 +#endif + +/* Cached sysconf(_SC_PAGESIZE). */ +size_t get_page_size(void); + +/* Print message and strerror(errno) to stderr, then exit(1). */ +void perror_msg_and_fail(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message to stderr, then exit(1). */ +void error_msg_and_fail(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message to stderr, then exit(77). */ +void error_msg_and_skip(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; +/* Print message and strerror(errno) to stderr, then exit(77). */ +void perror_msg_and_skip(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN; + +/* + * Allocate memory that ends on the page boundary. + * Pages allocated by this call are preceeded by an unmapped page + * and followed also by an unmapped page. + */ +void *tail_alloc(const size_t) + ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1)); +/* Allocate memory using tail_alloc, then memcpy. */ +void *tail_memdup(const void *, const size_t) + ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((2)); + +/* + * Fill memory (pointed by ptr, having size bytes) with different bytes (with + * values starting with start and resetting every period) in order to catch + * sign, byte order and/or alignment errors. + */ +void fill_memory_ex(void *ptr, size_t size, unsigned char start, + unsigned char period); +/* Shortcut for fill_memory_ex(ptr, size, 0x80, 0x80) */ +void fill_memory(void *ptr, size_t size); + +/* Close stdin, move stdout to a non-standard descriptor, and print. */ +void tprintf(const char *, ...) + ATTRIBUTE_FORMAT((printf, 1, 2)); + +/* Make a hexdump copy of C string */ +const char *hexdump_strdup(const char *); + +/* Make a hexdump copy of memory */ +const char *hexdump_memdup(const char *, size_t); + +/* Make a hexquoted copy of a string */ +const char *hexquote_strndup(const char *, size_t); + +/* Return inode number of socket descriptor. */ +unsigned long inode_of_sockfd(int); + +/* Print string in a quoted form. */ +void print_quoted_string(const char *); + +/* Print memory in a quoted form. */ +void print_quoted_memory(const char *, size_t); + +/* Read an int from the file. */ +int read_int_from_file(const char *, int *); + +/* Check whether given uid matches kernel overflowuid. */ +void check_overflowuid(const int); + +/* Check whether given gid matches kernel overflowgid. */ +void check_overflowgid(const int); + +/* Translate errno to its name. */ +const char *errno2name(void); + +/* Translate signal number to its name. */ +const char *signal2name(int); + +/* Print return code and, in case return code is -1, errno information. */ +const char *sprintrc(long rc); +/* sprintrc variant suitable for usage as part of grep pattern. */ +const char *sprintrc_grep(long rc); + +struct xlat; + +/* Print flags in symbolic form according to xlat table. */ +int printflags(const struct xlat *, const unsigned long long, const char *); + +/* Print constant in symbolic form according to xlat table. */ +int printxval(const struct xlat *, const unsigned long long, const char *); + +/* Invoke a socket syscall, either directly or via __NR_socketcall. */ +int socketcall(const int nr, const int call, + long a1, long a2, long a3, long a4, long a5); + +/* Wrappers for recvmmsg and sendmmsg syscalls. */ +struct mmsghdr; +struct timespec; +int recv_mmsg(int, struct mmsghdr *, unsigned int, unsigned int, struct timespec *); +int send_mmsg(int, struct mmsghdr *, unsigned int, unsigned int); + +/* Create a pipe with maximized descriptor numbers. */ +void pipe_maxfd(int pipefd[2]); + +#define F8ILL_KULONG_SUPPORTED (sizeof(void *) < sizeof(kernel_ulong_t)) +#define F8ILL_KULONG_MASK ((kernel_ulong_t) 0xffffffff00000000ULL) + +/* + * For 64-bit kernel_ulong_t and 32-bit pointer, + * return a kernel_ulong_t value by filling higher bits. + * For other architertures, return the original pointer. + */ +static inline kernel_ulong_t +f8ill_ptr_to_kulong(const void *const ptr) +{ + const unsigned long uptr = (unsigned long) ptr; + return F8ILL_KULONG_SUPPORTED + ? F8ILL_KULONG_MASK | uptr : (kernel_ulong_t) uptr; +} + +# define ARRAY_SIZE(arg) ((unsigned int) (sizeof(arg) / sizeof((arg)[0]))) +# define LENGTH_OF(arg) ((unsigned int) sizeof(arg) - 1) + +/* Zero-extend a signed integer type to unsigned long long. */ +#define zero_extend_signed_to_ull(v) \ + (sizeof(v) == sizeof(char) ? (unsigned long long) (unsigned char) (v) : \ + sizeof(v) == sizeof(short) ? (unsigned long long) (unsigned short) (v) : \ + sizeof(v) == sizeof(int) ? (unsigned long long) (unsigned int) (v) : \ + sizeof(v) == sizeof(long) ? (unsigned long long) (unsigned long) (v) : \ + (unsigned long long) (v)) + +/* Sign-extend an unsigned integer type to long long. */ +#define sign_extend_unsigned_to_ll(v) \ + (sizeof(v) == sizeof(char) ? (long long) (char) (v) : \ + sizeof(v) == sizeof(short) ? (long long) (short) (v) : \ + sizeof(v) == sizeof(int) ? (long long) (int) (v) : \ + sizeof(v) == sizeof(long) ? (long long) (long) (v) : \ + (long long) (v)) + +# define SKIP_MAIN_UNDEFINED(arg) \ + int main(void) { error_msg_and_skip("undefined: %s", arg); } + +/* + * The kernel used to define 64-bit types on 64-bit systems on a per-arch + * basis. Some architectures would use unsigned long and others would use + * unsigned long long. These types were exported as part of the + * kernel-userspace ABI and now must be maintained forever. This matches + * what the kernel exports for each architecture so we don't need to cast + * every printing of __u64 or __s64 to stdint types. + */ +# if SIZEOF_LONG == 4 +# define PRI__64 "ll" +# elif defined ALPHA || defined IA64 || defined MIPS || defined POWERPC +# define PRI__64 "l" +# else +# define PRI__64 "ll" +# endif + +# define PRI__d64 PRI__64"d" +# define PRI__u64 PRI__64"u" +# define PRI__x64 PRI__64"x" + +# if WORDS_BIGENDIAN +# define LL_PAIR(HI, LO) (HI), (LO) +# else +# define LL_PAIR(HI, LO) (LO), (HI) +# endif +# define LL_VAL_TO_PAIR(llval) LL_PAIR((long) ((llval) >> 32), (long) (llval)) + +# define _STR(_arg) #_arg +# define ARG_STR(_arg) (_arg), #_arg +# define ARG_ULL_STR(_arg) _arg##ULL, #_arg + +#endif /* !STRACE_TESTS_H */ diff --git a/tests-mx32/threads-execve.c b/tests-mx32/threads-execve.c new file mode 100644 index 000000000..853645ffa --- /dev/null +++ b/tests-mx32/threads-execve.c @@ -0,0 +1,246 @@ +/* + * Check decoding of threads when a non-leader thread invokes execve. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +static pid_t leader; +static pid_t tid; + +static void +handler(int signo) +{ +} + +static unsigned int sigsetsize; +static long +k_sigsuspend(const sigset_t *const set) +{ + return syscall(__NR_rt_sigsuspend, set, sigsetsize); +} + +static pid_t +k_gettid(void) +{ + return syscall(__NR_gettid); +} + +static void +get_sigsetsize(void) +{ + static const struct sigaction sa = { .sa_handler = handler }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + if (sigprocmask(SIG_BLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + raise(SIGUSR1); + + sigemptyset(&mask); + for (sigsetsize = sizeof(mask) / sizeof(long); + sigsetsize; sigsetsize >>= 1) { + long rc = k_sigsuspend(&mask); + if (!rc) + error_msg_and_fail("rt_sigsuspend"); + if (EINTR == errno) + break; + printf("%-5d rt_sigsuspend(%p, %u) = %s\n", + leader, &mask, sigsetsize, sprintrc(rc)); + } + if (!sigsetsize) + perror_msg_and_fail("rt_sigsuspend"); + printf("%-5d rt_sigsuspend([], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", leader, sigsetsize); +} + +enum { + ACTION_exit = 0, + ACTION_rt_sigsuspend, + ACTION_nanosleep, + NUMBER_OF_ACTIONS +}; + +static const unsigned int NUMBER_OF_ITERATIONS = 1; +static unsigned int action; +static int fds[2]; + +static unsigned int +arglen(char **args) +{ + char **p; + + for (p = args; *p; ++p) + ; + + return p - args; +} + +static void * +thread(void *arg) +{ + tid = k_gettid(); + + static char buf[sizeof(action) * 3]; + sprintf(buf, "%u", action + 1); + + char **argv = arg; + argv[2] = buf; + + if (read(fds[0], fds, sizeof(fds[0]))) + perror_msg_and_fail("execve"); + + struct timespec ts = { .tv_nsec = 100000000 }; + (void) clock_nanosleep(CLOCK_REALTIME, 0, &ts, NULL); + + ts.tv_nsec = 12345; + printf("%-5d nanosleep({tv_sec=0, tv_nsec=%u}, NULL) = 0\n", + tid, (unsigned int) ts.tv_nsec); + + switch (action % NUMBER_OF_ACTIONS) { + case ACTION_exit: + printf("%-5d execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" + ", [/* %u vars */] \n", + tid, argv[0], argv[0], argv[1], argv[2], + arglen(environ), leader); + break; + case ACTION_rt_sigsuspend: + printf("%-5d execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" + ", [/* %u vars */] \n" + "%-5d <... rt_sigsuspend resumed>) = ?\n", + tid, argv[0], argv[0], argv[1], argv[2], + arglen(environ), + leader); + break; + case ACTION_nanosleep: + printf("%-5d execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" + ", [/* %u vars */] \n" + "%-5d <... nanosleep resumed> )" + " = ?\n", + tid, argv[0], argv[0], argv[1], argv[2], + arglen(environ), + leader); + break; + } + + printf("%-5d +++ superseded by execve in pid %u +++\n" + "%-5d <... execve resumed> ) = 0\n", + leader, tid, + leader); + + (void) nanosleep(&ts, NULL); + execve(argv[0], argv, environ); + perror_msg_and_fail("execve"); +} + +int +main(int ac, char **av) +{ + setvbuf(stdout, NULL, _IONBF, 0); + leader = getpid(); + + if (ac < 3) { + struct timespec ts = { .tv_nsec = 1 }; + if (clock_nanosleep(CLOCK_REALTIME, 0, &ts, NULL)) + perror_msg_and_skip("clock_nanosleep CLOCK_REALTIME"); + + printf("%-5d execve(\"%s\", [\"%s\"], [/* %u vars */]) = 0\n", + leader, av[0], av[0], arglen(environ)); + + get_sigsetsize(); + static char buf[sizeof(sigsetsize) * 3]; + sprintf(buf, "%u", sigsetsize); + + char *argv[] = { av[0], buf, (char *) "0", NULL }; + printf("%-5d execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" + ", [/* %u vars */]) = 0\n", + leader, argv[0], argv[0], argv[1], argv[2], + arglen(environ)); + execve(argv[0], argv, environ); + perror_msg_and_fail("execve"); + } + + sigsetsize = atoi(av[1]); + action = atoi(av[2]); + + if (action >= NUMBER_OF_ACTIONS * NUMBER_OF_ITERATIONS) { + printf("%-5d +++ exited with 0 +++\n", leader); + return 0; + } + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + pthread_t t; + errno = pthread_create(&t, NULL, thread, av); + if (errno) + perror_msg_and_fail("pthread_create"); + + struct timespec ts = { .tv_sec = 123 }; + sigset_t mask; + sigemptyset(&mask); + + static char leader_str[sizeof(leader) * 3]; + int leader_str_len = + snprintf(leader_str, sizeof(leader_str), "%-5d", leader); + + switch (action % NUMBER_OF_ACTIONS) { + case ACTION_exit: + printf("%s exit(42)%*s= ?\n", leader_str, + (int) sizeof(leader_str) - leader_str_len, " "); + close(fds[1]); + (void) syscall(__NR_exit, 42); + break; + case ACTION_rt_sigsuspend: + printf("%s rt_sigsuspend([], %u \n", + leader_str, sigsetsize); + close(fds[1]); + (void) k_sigsuspend(&mask); + break; + case ACTION_nanosleep: + printf("%s nanosleep({tv_sec=%u, tv_nsec=0}" + ", \n", + leader_str, (unsigned int) ts.tv_sec); + close(fds[1]); + (void) nanosleep(&ts, 0); + break; + } + + return 1; +} diff --git a/tests-mx32/threads-execve.test b/tests-mx32/threads-execve.test new file mode 100755 index 000000000..4a771467a --- /dev/null +++ b/tests-mx32/threads-execve.test @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Check decoding of threads when a non-leader thread invokes execve. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# Check that PTRACE_EVENT_EXEC support in kernel is good enough. +# The kernel before commit v3.1-rc1~308^2~7 reported 0 instead of old pid. +require_min_kernel_version_or_skip 3.1 + +check_prog diff +run_prog > /dev/null + +set -- -a21 -f -esignal=none -e trace=execve,exit,nanosleep,rt_sigsuspend $args + +# Due to probabilistic nature of the test, try it several times. +i=0 +while [ $i -le 9 ]; do + run_strace "$@" > "$EXP" + diff -- "$EXP" "$LOG" || continue + rm -f "$EXP" + exit 0 +done + +fail_ "$STRACE $* output mismatch" diff --git a/tests-mx32/time.c b/tests-mx32/time.c new file mode 100644 index 000000000..4a5cde9c1 --- /dev/null +++ b/tests-mx32/time.c @@ -0,0 +1,61 @@ +/* + * This file is part of time strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_time + +# include +# include +# include +# include + +int +main(void) +{ + time_t *p = tail_alloc(sizeof(time_t)); + + time_t t = syscall(__NR_time, NULL); + if ((time_t) -1 == t) + perror_msg_and_skip("time"); + printf("time(NULL) = %jd\n", (intmax_t) t); + + t = syscall(__NR_time, p); + printf("time([%jd]) = %jd\n", (intmax_t) *p, (intmax_t) t); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_time") + +#endif diff --git a/tests-mx32/time.test b/tests-mx32/time.test new file mode 100755 index 000000000..6ab193a4b --- /dev/null +++ b/tests-mx32/time.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check time syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a10 diff --git a/tests-mx32/timer_create.c b/tests-mx32/timer_create.c new file mode 100644 index 000000000..1a2596271 --- /dev/null +++ b/tests-mx32/timer_create.c @@ -0,0 +1,125 @@ +/* + * This file is part of timer_create strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_timer_create + +# include +# include +# include +# include +# include "sigevent.h" + +int +main(void) +{ + syscall(__NR_timer_create, CLOCK_REALTIME, NULL, NULL); + printf("timer_create(CLOCK_REALTIME, NULL, NULL) = -1 %s (%m)\n", + errno2name()); + + int tid[4] = {}; + struct_sigevent sev = { + .sigev_notify = 0xdefaced, + .sigev_signo = 0xfacefeed, + .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0dedULL + }; + + syscall(__NR_timer_create, CLOCK_REALTIME, &sev, NULL); + printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=%u, " + "sigev_notify=%#x /* SIGEV_??? */}, NULL) = -1 %s (%m)\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, + sev.sigev_signo, sev.sigev_notify, + errno2name()); + + sev.sigev_notify = SIGEV_NONE; + if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[0])) + perror_msg_and_skip("timer_create CLOCK_REALTIME"); + printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=%u, sigev_notify=SIGEV_NONE}, " + "[%d]) = 0\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, + sev.sigev_signo, tid[0]); + + sev.sigev_notify = SIGEV_SIGNAL; + sev.sigev_signo = SIGALRM; + if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[1])) + perror_msg_and_skip("timer_create CLOCK_MONOTONIC"); + printf("timer_create(CLOCK_MONOTONIC, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=SIGALRM, " + "sigev_notify=SIGEV_SIGNAL}, [%d]) = 0\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, tid[1]); + + sev.sigev_notify = SIGEV_THREAD; + sev.sigev_un.sigev_thread.function = + (unsigned long) 0xdeadbeefbadc0dedULL; + sev.sigev_un.sigev_thread.attribute = + (unsigned long) 0xcafef00dfacefeedULL; + if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[2])) + perror_msg_and_skip("timer_create CLOCK_REALTIME"); + printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD" + ", sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}" + ", [%d]) = 0\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, + sev.sigev_un.sigev_thread.function, + sev.sigev_un.sigev_thread.attribute, + tid[2]); + +#ifndef SIGEV_THREAD_ID +# define SIGEV_THREAD_ID 4 +#endif + sev.sigev_notify = SIGEV_THREAD_ID; + sev.sigev_un.tid = getpid(); + if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[3])) + perror_msg_and_skip("timer_create CLOCK_MONOTONIC"); + printf("timer_create(CLOCK_MONOTONIC, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=SIGALRM, " + "sigev_notify=SIGEV_THREAD_ID, sigev_notify_thread_id=%d}" + ", [%d]) = 0\n", + sev.sigev_value.sival_int, + sev.sigev_value.sival_ptr, + sev.sigev_un.tid, + tid[3]); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_timer_create") + +#endif diff --git a/tests-mx32/timer_create.test b/tests-mx32/timer_create.test new file mode 100755 index 000000000..870a1795c --- /dev/null +++ b/tests-mx32/timer_create.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check timer_create syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/timer_xettime.c b/tests-mx32/timer_xettime.c new file mode 100644 index 000000000..9eabbf084 --- /dev/null +++ b/tests-mx32/timer_xettime.c @@ -0,0 +1,112 @@ +/* + * This file is part of timer_xettime strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_timer_create \ + && defined __NR_timer_gettime \ + && defined __NR_timer_settime + +# include +# include +# include +# include +# include + +int +main(void) +{ + syscall(__NR_timer_settime, 0xdefaced, TIMER_ABSTIME, NULL, NULL); + printf("timer_settime(%d, TIMER_ABSTIME, NULL, NULL)" + " = -1 EINVAL (%m)\n", 0xdefaced); + + int tid; + struct sigevent sev = { .sigev_notify = SIGEV_NONE }; + + if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid)) + perror_msg_and_skip("timer_create"); + printf("timer_create(CLOCK_MONOTONIC, {sigev_signo=0" + ", sigev_notify=SIGEV_NONE}, [%d]) = 0\n", tid); + + struct { + struct itimerspec its; + uint32_t pad[4]; + } old = { + .its = { + .it_interval = { 0xdeface5, 0xdeface6 }, + .it_value = { 0xdeface7, 0xdeface8 } + }, + .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } + }, new = { + .its = { + .it_interval = { 0xdeface1, 0xdeface2 }, + .it_value = { 0xdeface3, 0xdeface4 } + }, + .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } + }; + + if (syscall(__NR_timer_settime, tid, 0, &new.its, &old.its)) + perror_msg_and_skip("timer_settime"); + printf("timer_settime(%d, 0" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}" + ") = 0\n", + tid, + (intmax_t) new.its.it_interval.tv_sec, + (intmax_t) new.its.it_interval.tv_nsec, + (intmax_t) new.its.it_value.tv_sec, + (intmax_t) new.its.it_value.tv_nsec, + (intmax_t) old.its.it_interval.tv_sec, + (intmax_t) old.its.it_interval.tv_nsec, + (intmax_t) old.its.it_value.tv_sec, + (intmax_t) old.its.it_value.tv_nsec); + + if (syscall(__NR_timer_gettime, tid, &old.its)) + perror_msg_and_skip("timer_gettime"); + printf("timer_gettime(%d" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}) = 0\n", + tid, + (intmax_t) old.its.it_interval.tv_sec, + (intmax_t) old.its.it_interval.tv_nsec, + (intmax_t) old.its.it_value.tv_sec, + (intmax_t) old.its.it_value.tv_nsec); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_timer_create && __NR_timer_gettime && __NR_timer_settime") + +#endif diff --git a/tests-mx32/timer_xettime.test b/tests-mx32/timer_xettime.test new file mode 100755 index 000000000..08bcdd68c --- /dev/null +++ b/tests-mx32/timer_xettime.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check timer_create, timer_settime, and timer_gettime syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=timer_create,timer_settime,timer_gettime diff --git a/tests-mx32/timerfd_xettime.c b/tests-mx32/timerfd_xettime.c new file mode 100644 index 000000000..ca7124ec3 --- /dev/null +++ b/tests-mx32/timerfd_xettime.c @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_timerfd_create \ + && defined __NR_timerfd_gettime \ + && defined __NR_timerfd_settime \ + && defined O_CLOEXEC + +# include +# include +# include +# include + +int +main(void) +{ + (void) close(0); + if (syscall(__NR_timerfd_create, CLOCK_MONOTONIC, O_CLOEXEC | O_NONBLOCK)) + perror_msg_and_skip("timerfd_create"); + puts("timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC|TFD_NONBLOCK) = 0"); + + struct { + struct itimerspec its; + uint32_t pad[4]; + } old = { + .its = { + .it_interval = { 0xdeface5, 0xdeface6 }, + .it_value = { 0xdeface7, 0xdeface8 } + }, + .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } + }, new = { + .its = { + .it_interval = { 0xdeface1, 0xdeface2 }, + .it_value = { 0xdeface3, 0xdeface4 } + }, + .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } + }; + + if (syscall(__NR_timerfd_settime, 0, 0, &new.its, &old.its)) + perror_msg_and_skip("timerfd_settime"); + printf("timerfd_settime(0, 0" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}" + ") = 0\n", + (intmax_t) new.its.it_interval.tv_sec, + (intmax_t) new.its.it_interval.tv_nsec, + (intmax_t) new.its.it_value.tv_sec, + (intmax_t) new.its.it_value.tv_nsec, + (intmax_t) old.its.it_interval.tv_sec, + (intmax_t) old.its.it_interval.tv_nsec, + (intmax_t) old.its.it_value.tv_sec, + (intmax_t) old.its.it_value.tv_nsec); + + if (syscall(__NR_timerfd_gettime, 0, &old.its)) + perror_msg_and_skip("timerfd_gettime"); + printf("timerfd_gettime(0" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}) = 0\n", + (intmax_t) old.its.it_interval.tv_sec, + (intmax_t) old.its.it_interval.tv_nsec, + (intmax_t) old.its.it_value.tv_sec, + (intmax_t) old.its.it_value.tv_nsec); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_timerfd_create && __NR_timerfd_gettime" + " && __NR_timerfd_settime && O_CLOEXEC") + +#endif diff --git a/tests-mx32/timerfd_xettime.test b/tests-mx32/timerfd_xettime.test new file mode 100755 index 000000000..75aa21c2a --- /dev/null +++ b/tests-mx32/timerfd_xettime.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check timerfd_create, timerfd_settime, and timerfd_gettime syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=timerfd_create,timerfd_settime,timerfd_gettime diff --git a/tests-mx32/times-fail.c b/tests-mx32/times-fail.c new file mode 100644 index 000000000..cb69bd431 --- /dev/null +++ b/tests-mx32/times-fail.c @@ -0,0 +1,15 @@ +#include "tests.h" +#include +#include +#include +#include + +int +main (void) +{ + assert(syscall(__NR_times, 0x42) == -1); + printf("times(0x42) = -1 EFAULT (%m)\n"); + puts("+++ exited with 0 +++"); + + return 0; +} diff --git a/tests-mx32/times-fail.test b/tests-mx32/times-fail.test new file mode 100755 index 000000000..ee28a060b --- /dev/null +++ b/tests-mx32/times-fail.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of failing times syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a12 -e trace=times diff --git a/tests-mx32/times.c b/tests-mx32/times.c new file mode 100644 index 000000000..2c7b95e58 --- /dev/null +++ b/tests-mx32/times.c @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2015 Eugene Syromyatnikov + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * @file + * This test burns some CPU cycles in user space and kernel space in order to + * get some non-zero values returned by times(2). + */ + +#include "tests.h" +#include +#include +#include +#include + +#include +#include +#include + +enum { + NUM_USER_ITERS = 1000000, + PARENT_CPUTIME_LIMIT_NSEC = 200000000, + CHILD_CPUTIME_LIMIT_NSEC = 300000000 +}; + +int +main (void) +{ + struct timespec ts; + volatile int dummy = 0; + int i = 0; + + pid_t pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + const long cputime_limit = + pid ? PARENT_CPUTIME_LIMIT_NSEC : CHILD_CPUTIME_LIMIT_NSEC; + + /* Enjoying my user time */ + while (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) == 0) { + if (ts.tv_sec || ts.tv_nsec >= cputime_limit) + break; + + if (i && !(ts.tv_sec || ts.tv_nsec)) + error_msg_and_skip("clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {0, 0})"); + + for (i = 0; i < NUM_USER_ITERS; ++i) + ++dummy; + } + + /* Enjoying my system time */ + while (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) == 0) { + if (ts.tv_sec || ts.tv_nsec >= cputime_limit * 2) + break; + + sched_yield(); + } + + if (pid == 0) { + return 0; + } else { + wait(NULL); + } + + struct tms tbuf; + unsigned long long llres; + + /* + * On systems where user's and kernel's long types are the same, + * prefer direct times syscall over libc's times function because + * the latter is more prone to return value truncation. + */ +#undef USE_LIBC_SYSCALL +#if defined __NR_times && \ + !defined(LINUX_MIPSN32) && \ + !(defined __x86_64__ && defined __ILP32__) +# define USE_LIBC_SYSCALL 1 +#endif + +#if defined USE_LIBC_SYSCALL + long res = syscall(__NR_times, &tbuf); + + if (-1L == res) + perror_msg_and_skip("times"); + else + llres = (unsigned long) res; +#elif defined __NR_times && defined __x86_64__ && defined __ILP32__ + register long arg asm("rdi") = (long) &tbuf; + asm volatile("syscall\n\t" + : "=a"(llres) + : "0"(__NR_times), "r"(arg) + : "memory", "cc", "r11", "cx"); + if (llres > 0xfffffffffffff000) + return 77; +#else + clock_t res = times(&tbuf); + + if ((clock_t) -1 == res) + perror_msg_and_skip("times"); + if (sizeof(res) < sizeof(unsigned long long)) + llres = (unsigned long) res; + else + llres = res; +#endif + + printf("times({tms_utime=%llu, tms_stime=%llu, ", + (unsigned long long) tbuf.tms_utime, + (unsigned long long) tbuf.tms_stime); + printf("tms_cutime=%llu, tms_cstime=%llu}) = %llu\n", + (unsigned long long) tbuf.tms_cutime, + (unsigned long long) tbuf.tms_cstime, + llres); + puts("+++ exited with 0 +++"); + + return 0; +} diff --git a/tests-mx32/times.test b/tests-mx32/times.test new file mode 100755 index 000000000..b97e0d339 --- /dev/null +++ b/tests-mx32/times.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of times syscall + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff --git a/tests-mx32/tprintf.c b/tests-mx32/tprintf.c new file mode 100644 index 000000000..a759d8af3 --- /dev/null +++ b/tests-mx32/tprintf.c @@ -0,0 +1,90 @@ +/* + * Close stdin, move stdout to a non-standard descriptor, and print. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +static ssize_t +write_retry(int fd, const void *buf, size_t count) +{ + ssize_t rc; + + do { + errno = 0; + rc = write(fd, buf, count); + } while (rc == -1 && EINTR == errno); + + if (rc <= 0) + perror_msg_and_fail("write"); + + return rc; +} + +static void +write_loop(int fd, const char *buf, size_t count) +{ + ssize_t offset = 0; + + while (count > 0) { + ssize_t block = write_retry(fd, &buf[offset], count); + + offset += block; + count -= (size_t) block; + } +} + +void +tprintf(const char *fmt, ...) +{ + static int initialized; + if (!initialized) { + assert(dup2(1, 3) == 3); + assert(close(1) == 0); + (void) close(0); + initialized = 1; + } + + va_list p; + va_start(p, fmt); + + static char buf[65536]; + int len = vsnprintf(buf, sizeof(buf), fmt, p); + if (len < 0) + perror_msg_and_fail("vsnprintf"); + assert((unsigned) len < sizeof(buf)); + + write_loop(3, buf, len); + + va_end(p); +} diff --git a/tests-mx32/truncate.c b/tests-mx32/truncate.c new file mode 100644 index 000000000..d9529334e --- /dev/null +++ b/tests-mx32/truncate.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_truncate + +# include +# include + +int +main(void) +{ + static const char fname[] = "truncate\nfilename"; + static const char qname[] = "truncate\\nfilename"; + const kernel_ulong_t len = (kernel_ulong_t) 0xdefaced0badc0deULL; + long rc; + + if (sizeof(len) > sizeof(long)) + rc = truncate(fname, len); + else + rc = syscall(__NR_truncate, fname, len); + + printf("truncate(\"%s\", %llu) = %ld %s (%m)\n", + qname, (unsigned long long) len, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_truncate") + +#endif diff --git a/tests-mx32/truncate.test b/tests-mx32/truncate.test new file mode 100755 index 000000000..6bf1e7025 --- /dev/null +++ b/tests-mx32/truncate.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check truncate syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/truncate64.c b/tests-mx32/truncate64.c new file mode 100644 index 000000000..8c29ea81b --- /dev/null +++ b/tests-mx32/truncate64.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_truncate64 + +# include +# include + +int +main(void) +{ + static const char fname[] = "truncate64\nfilename"; + static const char qname[] = "truncate64\\nfilename"; + const off_t len = 0xdefaceddeadbeefULL; + + int rc = truncate(fname, len); + printf("truncate64(\"%s\", %llu) = %d %s (%m)\n", + qname, (unsigned long long) len, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_truncate64") + +#endif diff --git a/tests-mx32/truncate64.test b/tests-mx32/truncate64.test new file mode 100755 index 000000000..c46680626 --- /dev/null +++ b/tests-mx32/truncate64.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check truncate64 syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests-mx32/ugetrlimit.c b/tests-mx32/ugetrlimit.c new file mode 100644 index 000000000..a99e496d9 --- /dev/null +++ b/tests-mx32/ugetrlimit.c @@ -0,0 +1,14 @@ +#include "tests.h" +#include + +#ifdef __NR_ugetrlimit + +# define NR_GETRLIMIT __NR_ugetrlimit +# define STR_GETRLIMIT "ugetrlimit" +# include "xgetrlimit.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_ugetrlimit") + +#endif diff --git a/tests-mx32/ugetrlimit.test b/tests-mx32/ugetrlimit.test new file mode 100755 index 000000000..f4648ff18 --- /dev/null +++ b/tests-mx32/ugetrlimit.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of ugetrlimit syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-mx32/uio.c b/tests-mx32/uio.c new file mode 100644 index 000000000..6291f972f --- /dev/null +++ b/tests-mx32/uio.c @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2014-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#if defined(HAVE_PREADV) && defined(HAVE_PWRITEV) + +# include +# include +# include +# include + +int +main(void) +{ + const off_t offset = 0xdefaceddeadbeefLL; + char buf[4]; + struct iovec iov = { buf, sizeof buf }; + + (void) close(0); + assert(open("/dev/zero", O_RDONLY) == 0); + assert(pread(0, buf, sizeof buf, offset) == 4); + assert(preadv(0, &iov, 1, offset) == 4); + assert(!close(0)); + + assert(open("/dev/null", O_WRONLY) == 0); + assert(pwrite(0, buf, sizeof buf, offset) == 4); + assert(pwritev(0, &iov, 1, offset) == 4); + assert(!close(0)); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PREADV && HAVE_PWRITEV") + +#endif diff --git a/tests-mx32/uio.expected b/tests-mx32/uio.expected new file mode 100644 index 000000000..98d5c06db --- /dev/null +++ b/tests-mx32/uio.expected @@ -0,0 +1,4 @@ +pread(64)?\(0, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4 +preadv\(0, \[\{iov_base="\\0\\0\\0\\0", iov_len=4\}\], 1, 1004211379570065135\) += 4 +pwrite(64)?\(0, "\\0\\0\\0\\0", 4, 1004211379570065135\) += 4 +pwritev\(0, \[\{iov_base="\\0\\0\\0\\0", iov_len=4\}\], 1, 1004211379570065135\) += 4 diff --git a/tests-mx32/uio.test b/tests-mx32/uio.test new file mode 100755 index 000000000..020b97e95 --- /dev/null +++ b/tests-mx32/uio.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check how pread/pwrite and preadv/pwritev syscalls are traced. + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -edesc $args +match_grep + +exit 0 diff --git a/tests-mx32/umask.c b/tests-mx32/umask.c new file mode 100644 index 000000000..86903a954 --- /dev/null +++ b/tests-mx32/umask.c @@ -0,0 +1,24 @@ +#include +#include + +void +test_umask(const mode_t mode) +{ + mode_t rc = umask(0xffff0000 | mode); + printf("umask(%#03ho) = %#03o\n", (unsigned short) mode, rc); +} + +int +main(void) +{ + test_umask(0); + test_umask(06); + test_umask(026); + test_umask(0126); + test_umask(07777); + test_umask(0107777); + test_umask(-1); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/umask.test b/tests-mx32/umask.test new file mode 100755 index 000000000..1351721f6 --- /dev/null +++ b/tests-mx32/umask.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check umask syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff --git a/tests-mx32/umode_t.c b/tests-mx32/umode_t.c new file mode 100644 index 000000000..5041638ee --- /dev/null +++ b/tests-mx32/umode_t.c @@ -0,0 +1,78 @@ +/* + * Check decoding of umode_t type syscall arguments. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#ifndef TEST_SYSCALL_PREFIX_ARGS +# define TEST_SYSCALL_PREFIX_ARGS +#endif +#ifndef TEST_SYSCALL_PREFIX_STR +# define TEST_SYSCALL_PREFIX_STR "" +#endif + +static const char sample[] = TEST_SYSCALL_STR; + +static void +test_syscall(unsigned short mode) +{ + unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode; + long rc = syscall(TEST_SYSCALL_NR, TEST_SYSCALL_PREFIX_ARGS + sample, lmode); + + if (mode <= 07) + printf("%s(%s\"%s\", 00%d) = %ld %s (%m)\n", + sample, TEST_SYSCALL_PREFIX_STR, + sample, (int) mode, rc, errno2name()); + else + printf("%s(%s\"%s\", %#03ho) = %ld %s (%m)\n", + sample, TEST_SYSCALL_PREFIX_STR, + sample, mode, rc, errno2name()); +} + +int +main(void) +{ + test_syscall(0); + test_syscall(0xffff); + test_syscall(06); + test_syscall(060); + test_syscall(0600); + test_syscall(024); + test_syscall(S_IFREG); + test_syscall(S_IFDIR | 06); + test_syscall(S_IFLNK | 060); + test_syscall(S_IFIFO | 0600); + test_syscall(S_IFCHR | 024); + test_syscall((0xffff & ~S_IFMT) | S_IFBLK); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/umount.c b/tests-mx32/umount.c new file mode 100644 index 000000000..eda7ae5c4 --- /dev/null +++ b/tests-mx32/umount.c @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#ifdef __NR_oldumount +# define TEST_SYSCALL_STR "oldumount" +#else +# if defined __NR_umount && defined __NR_umount2 +# define __NR_oldumount __NR_umount +# define TEST_SYSCALL_STR "umount" +# endif +#endif + +#ifdef __NR_oldumount + +int +main(void) +{ + static const char sample[] = "umount.sample"; + if (mkdir(sample, 0700)) + perror_msg_and_fail("mkdir: %s", sample); + + long rc = syscall(__NR_oldumount, sample); + printf("%s(\"%s\") = %ld %s (%m)\n", + TEST_SYSCALL_STR, sample, rc, errno2name()); + + if (rmdir(sample)) + perror_msg_and_fail("rmdir: %s", sample); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_oldumount") + +#endif diff --git a/tests-mx32/umount.test b/tests-mx32/umount.test new file mode 100755 index 000000000..a5840d54b --- /dev/null +++ b/tests-mx32/umount.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check umount syscall decoding. + +. "${srcdir=.}/init.sh" + +case "$STRACE_ARCH" in + alpha) syscall=oldumount ;; + *) syscall=umount ;; +esac +run_strace_match_diff -a24 -s6 -e trace=$syscall diff --git a/tests-mx32/umount2.c b/tests-mx32/umount2.c new file mode 100644 index 000000000..1a6d8451a --- /dev/null +++ b/tests-mx32/umount2.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +#ifdef __NR_umount2 +# define TEST_SYSCALL_STR "umount2" +#else +# define __NR_umount2 __NR_umount +# define TEST_SYSCALL_STR "umount" +#endif + +int +main(void) +{ + static const char sample[] = "umount2.sample"; + if (mkdir(sample, 0700)) + perror_msg_and_fail("mkdir: %s", sample); + (void) syscall(__NR_umount2, sample, 31); + printf("%s(\"%s\", MNT_FORCE|MNT_DETACH|MNT_EXPIRE|UMOUNT_NOFOLLOW|0x10)" + " = -1 EINVAL (%m)\n", TEST_SYSCALL_STR, sample); + if (rmdir(sample)) + perror_msg_and_fail("rmdir: %s", sample); + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/umount2.test b/tests-mx32/umount2.test new file mode 100755 index 000000000..c43b38dba --- /dev/null +++ b/tests-mx32/umount2.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check umount2 syscall decoding. + +. "${srcdir=.}/init.sh" + +case "$STRACE_ARCH" in + alpha|ia64) syscall=umount ;; + *) syscall=umount2 ;; +esac +run_strace_match_diff -s7 -e trace=$syscall diff --git a/tests-mx32/umoven-illptr.c b/tests-mx32/umoven-illptr.c new file mode 100644 index 000000000..4deee1634 --- /dev/null +++ b/tests-mx32/umoven-illptr.c @@ -0,0 +1,57 @@ +/* + * Check decoding of invalid pointer by umoven. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +int +main(void) +{ + if (F8ILL_KULONG_SUPPORTED) { + struct timespec ts = { 0, 0 }; + const void *const p = tail_memdup(&ts, sizeof(ts)); + + long rc = syscall(__NR_nanosleep, p, NULL); + printf("nanosleep({tv_sec=0, tv_nsec=0}, NULL) = %s\n", + sprintrc(rc)); + + const kernel_ulong_t ill = f8ill_ptr_to_kulong(p); + rc = syscall(__NR_nanosleep, ill, NULL); + printf("nanosleep(%#llx, NULL) = %s\n", + (unsigned long long) ill, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; + } else { + return 77; + } +} diff --git a/tests-mx32/umoven-illptr.test b/tests-mx32/umoven-illptr.test new file mode 100755 index 000000000..7b8cb314e --- /dev/null +++ b/tests-mx32/umoven-illptr.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of invalid pointer by umoven. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a36 -e trace=nanosleep diff --git a/tests-mx32/umovestr-illptr.c b/tests-mx32/umovestr-illptr.c new file mode 100644 index 000000000..dea6885d4 --- /dev/null +++ b/tests-mx32/umovestr-illptr.c @@ -0,0 +1,53 @@ +/* + * Check decoding of invalid pointer by umovestr. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + if (F8ILL_KULONG_SUPPORTED) { + const void *const p = tail_memdup(".", 2); + long rc = syscall(__NR_chdir, p); + printf("chdir(\".\") = %s\n", sprintrc(rc)); + + const kernel_ulong_t ill = f8ill_ptr_to_kulong(p); + rc = syscall(__NR_chdir, ill); + printf("chdir(%#llx) = %s\n", + (unsigned long long) ill, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; + } else { + return 77; + } +} diff --git a/tests-mx32/umovestr-illptr.test b/tests-mx32/umovestr-illptr.test new file mode 100755 index 000000000..6f1cc8620 --- /dev/null +++ b/tests-mx32/umovestr-illptr.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of invalid pointer by umovestr. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a11 -e trace=chdir diff --git a/tests-mx32/umovestr.c b/tests-mx32/umovestr.c new file mode 100644 index 000000000..95fccb677 --- /dev/null +++ b/tests-mx32/umovestr.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + const size_t tail_len = 257; + char *addr = tail_alloc(tail_len); + memset(addr, '/', tail_len - 1); + addr[tail_len - 1] = '\0'; + if (chdir(addr)) + perror_msg_and_skip("chdir"); + return 0; +} diff --git a/tests-mx32/umovestr.expected b/tests-mx32/umovestr.expected new file mode 100644 index 000000000..c26d877ec --- /dev/null +++ b/tests-mx32/umovestr.expected @@ -0,0 +1,2 @@ +chdir("////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////") = 0 ++++ exited with 0 +++ diff --git a/tests-mx32/umovestr.test b/tests-mx32/umovestr.test new file mode 100755 index 000000000..5ae8ffa9b --- /dev/null +++ b/tests-mx32/umovestr.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# umovestr short read regression test + +. "${srcdir=.}/init.sh" + +run_prog +run_strace -e chdir $args +match_diff + +exit 0 diff --git a/tests-mx32/umovestr2.c b/tests-mx32/umovestr2.c new file mode 100644 index 000000000..b2c63d800 --- /dev/null +++ b/tests-mx32/umovestr2.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + const size_t page_len = get_page_size(); + const size_t tail_len = page_len * 2 - 1; + const size_t str_len = tail_len - 1; + + char *addr = tail_alloc(tail_len); + memset(addr, '0', str_len); + addr[str_len] = '\0'; + + char *argv[] = { NULL }; + char *envp[] = { addr, NULL }; + execve("", argv, envp); + + printf("execve(\"\", [], [\"%0*u\"]) = -1 ENOENT (%m)\n", + (int) str_len, 0); + puts("+++ exited with 0 +++"); + + return 0; +} diff --git a/tests-mx32/umovestr2.test b/tests-mx32/umovestr2.test new file mode 100755 index 000000000..5c5d561f9 --- /dev/null +++ b/tests-mx32/umovestr2.test @@ -0,0 +1,15 @@ +#!/bin/sh + +# umovestr short read regression test + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -veexecve -s262144 $args > "$EXP" +check_prog sed +sed 1d < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" + +exit 0 diff --git a/tests-mx32/umovestr3.c b/tests-mx32/umovestr3.c new file mode 100644 index 000000000..cf2fa7d4f --- /dev/null +++ b/tests-mx32/umovestr3.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + const unsigned int size = PATH_MAX - 1; + const char *p = tail_alloc(size); + const char *const efault = p + size; + + for (; p <= efault; ++p) { + int rc = chdir(p); + printf("chdir(%p) = %d %s (%m)\n", p, rc, errno2name()); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/umovestr3.test b/tests-mx32/umovestr3.test new file mode 100755 index 000000000..d5be2832b --- /dev/null +++ b/tests-mx32/umovestr3.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# yet another umovestr short read test + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a14 -e trace=chdir diff --git a/tests-mx32/uname.c b/tests-mx32/uname.c new file mode 100644 index 000000000..cd6f51cde --- /dev/null +++ b/tests-mx32/uname.c @@ -0,0 +1,44 @@ +#include "tests.h" +#include + +#ifdef __NR_uname + +# include +# include +# include + +int main(int ac, char **av) +{ + int abbrev = ac > 1; + struct utsname *const uname = tail_alloc(sizeof(struct utsname)); + int rc = syscall(__NR_uname, uname); + printf("uname({sysname=\""); + print_quoted_string(uname->sysname); + printf("\", nodename=\""); + print_quoted_string(uname->nodename); + if (abbrev) { + printf("\", ..."); + } else { + printf("\", release=\""); + print_quoted_string(uname->release); + printf("\", version=\""); + print_quoted_string(uname->version); + printf("\", machine=\""); + print_quoted_string(uname->machine); +# ifdef HAVE_STRUCT_UTSNAME_DOMAINNAME + printf("\", domainname=\""); + print_quoted_string(uname->domainname); +# endif + printf("\""); + } + printf("}) = %d\n", rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_uname") + +#endif diff --git a/tests-mx32/uname.test b/tests-mx32/uname.test new file mode 100755 index 000000000..03fe30cd8 --- /dev/null +++ b/tests-mx32/uname.test @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check uname syscall decoding. + +. "${srcdir=.}/init.sh" + +check_prog uniq + +run_prog > /dev/null +run_strace -v -euname $args > "$EXP" +uniq < "$LOG" > "$OUT" + +run_prog "./$NAME" abbrev > /dev/null +run_strace -euname $args >> "$EXP" +uniq < "$LOG" >> "$OUT" + +match_diff "$OUT" "$EXP" +rm -f "$OUT" "$EXP" diff --git a/tests-mx32/unix-pair-send-recv.c b/tests-mx32/unix-pair-send-recv.c new file mode 100644 index 000000000..d4ac0d237 --- /dev/null +++ b/tests-mx32/unix-pair-send-recv.c @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include +#include + +#ifndef __NR_send +# define __NR_send -1 +#endif +#define SC_send 9 + +#ifndef __NR_recv +# define __NR_recv -1 +#endif +#define SC_recv 10 + +static int +sys_send(int sockfd, const void *buf, size_t len, int flags) +{ + int rc = socketcall(__NR_send, SC_send, + sockfd, (long) buf, len, flags, 0); + if (rc < 0 && ENOSYS == errno) + perror_msg_and_skip("send"); + return rc; +} + +static int +sys_recv(int sockfd, const void *buf, size_t len, int flags) +{ + int rc = socketcall(__NR_recv, SC_recv, + sockfd, (long) buf, len, flags, 0); + if (rc < 0 && ENOSYS == errno) + perror_msg_and_skip("recv"); + return rc; +} + +static void +transpose(char *str, const size_t len) +{ + size_t i; + + for (i = 0; i < len / 2; ++i) { + char c = str[i]; + str[i] = str[len - 1 - i]; + str[len - 1 - i] = c; + } +} + +int +main(int ac, char **av) +{ + assert(ac == 2); + const size_t len = strlen(av[1]); + assert(len); + char *const buf0 = tail_alloc(len); + char *const buf1 = tail_alloc(len); + memcpy(buf0, av[1], len); + + (void) close(0); + (void) close(1); + + int sv[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + + assert(sys_send(0, buf0, len, MSG_DONTROUTE) == (int) len); + assert(sys_recv(1, buf1, len, MSG_WAITALL) == (int) len); + + transpose(buf1, len); + assert(sys_send(1, buf1, len, MSG_DONTROUTE) == (int) len); + if (close(1)) + perror_msg_and_fail("close(1)"); + + assert(sys_recv(0, buf0, len, MSG_WAITALL) == (int) len); + if (close(0)) + perror_msg_and_fail("close(0)"); + assert(sys_recv(0, NULL, len, MSG_DONTWAIT) == -1); + + return 0; +} diff --git a/tests-mx32/unix-pair-send-recv.expected b/tests-mx32/unix-pair-send-recv.expected new file mode 100644 index 000000000..39359781e --- /dev/null +++ b/tests-mx32/unix-pair-send-recv.expected @@ -0,0 +1,10 @@ +send(0, "abcdefghijklmnopqrstuvwxyz", 26, MSG_DONTROUTE) = 26 + | 00000 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 abcdefghijklmnop | + | 00010 71 72 73 74 75 76 77 78 79 7a qrstuvwxyz | +recv(1, "abcdefghijklmnopqrstuvwxyz", 26, MSG_WAITALL) = 26 +send(1, "zyxwvutsrqponmlkjihgfedcba", 26, MSG_DONTROUTE) = 26 +recv(0, "zyxwvutsrqponmlkjihgfedcba", 26, MSG_WAITALL) = 26 + | 00000 7a 79 78 77 76 75 74 73 72 71 70 6f 6e 6d 6c 6b zyxwvutsrqponmlk | + | 00010 6a 69 68 67 66 65 64 63 62 61 jihgfedcba | +recv(0, NULL, 26, MSG_DONTWAIT) = -1 EBADF (Bad file descriptor) ++++ exited with 0 +++ diff --git a/tests-mx32/unix-pair-send-recv.test b/tests-mx32/unix-pair-send-recv.test new file mode 100755 index 000000000..4defdebb7 --- /dev/null +++ b/tests-mx32/unix-pair-send-recv.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check decoding and dumping of send and recv syscalls. + +. "${srcdir=.}/init.sh" + +run_prog ./unix-pair-send-recv abcdefghijklmnopqrstuvwxyz +run_strace -a32 -esignal=none -esend,recv -eread=0 -ewrite=0 $args +match_diff + +exit 0 diff --git a/tests-mx32/unix-pair-sendto-recvfrom.c b/tests-mx32/unix-pair-sendto-recvfrom.c new file mode 100644 index 000000000..cea382c9e --- /dev/null +++ b/tests-mx32/unix-pair-sendto-recvfrom.c @@ -0,0 +1,87 @@ +/* + * Check decoding and dumping of sendto and recvfrom syscalls. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static void +transpose(char *str, int len) +{ + int i; + + for (i = 0; i < len / 2; ++i) { + char c = str[i]; + str[i] = str[len - 1 - i]; + str[len - 1 - i] = c; + } +} + +int +main(int ac, char **av) +{ + assert(ac == 2); + const int len = strlen(av[1]); + assert(len); + + (void) close(0); + (void) close(1); + + int sv[2]; + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + + pid_t pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (pid) { + assert(close(1) == 0); + transpose(av[1], len); + assert(sendto(0, av[1], len, MSG_DONTROUTE, NULL, 0) == len); + assert(recvfrom(0, av[1], len, MSG_WAITALL, NULL, NULL) == len); + assert(close(0) == 0); + + int status; + assert(waitpid(pid, &status, 0) == pid); + assert(status == 0); + } else { + assert(close(0) == 0); + assert(recvfrom(1, av[1], len, MSG_WAITALL, NULL, NULL) == len); + transpose(av[1], len); + assert(sendto(1, av[1], len, MSG_DONTROUTE, NULL, 0) == len); + assert(recvfrom(1, av[1], len, MSG_WAITALL, NULL, NULL) == 0); + assert(close(1) == 0); + } + + return 0; +} diff --git a/tests-mx32/unix-pair-sendto-recvfrom.expected b/tests-mx32/unix-pair-sendto-recvfrom.expected new file mode 100644 index 000000000..f8fd24494 --- /dev/null +++ b/tests-mx32/unix-pair-sendto-recvfrom.expected @@ -0,0 +1,7 @@ +sendto(0, "zyxwvutsrqponmlkjihgfedcba", 26, MSG_DONTROUTE, NULL, 0) = 26 + | 00000 7a 79 78 77 76 75 74 73 72 71 70 6f 6e 6d 6c 6b zyxwvutsrqponmlk | + | 00010 6a 69 68 67 66 65 64 63 62 61 jihgfedcba | +recvfrom(0, "abcdefghijklmnopqrstuvwxyz", 26, MSG_WAITALL, NULL, NULL) = 26 + | 00000 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 abcdefghijklmnop | + | 00010 71 72 73 74 75 76 77 78 79 7a qrstuvwxyz | ++++ exited with 0 +++ diff --git a/tests-mx32/unix-pair-sendto-recvfrom.test b/tests-mx32/unix-pair-sendto-recvfrom.test new file mode 100755 index 000000000..21afe236d --- /dev/null +++ b/tests-mx32/unix-pair-sendto-recvfrom.test @@ -0,0 +1,11 @@ +#!/bin/sh + +# Check decoding and dumping of sendto and recvfrom syscalls. + +. "${srcdir=.}/init.sh" + +run_prog ./unix-pair-sendto-recvfrom abcdefghijklmnopqrstuvwxyz +run_strace -esignal=none -esendto,recvfrom -eread=0 -ewrite=0 $args +match_diff + +exit 0 diff --git a/tests-mx32/unlink.c b/tests-mx32/unlink.c new file mode 100644 index 000000000..bbb1de155 --- /dev/null +++ b/tests-mx32/unlink.c @@ -0,0 +1,26 @@ +#include "tests.h" +#include + +#ifdef __NR_unlink + +# include +# include + +int +main(void) +{ + static const char sample[] = "unlink_sample"; + + long rc = syscall(__NR_unlink, sample); + printf("unlink(\"%s\") = %ld %s (%m)\n", + sample, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unlink") + +#endif diff --git a/tests-mx32/unlink.test b/tests-mx32/unlink.test new file mode 100755 index 000000000..09bf79a7c --- /dev/null +++ b/tests-mx32/unlink.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check unlink syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 diff --git a/tests-mx32/unlinkat.c b/tests-mx32/unlinkat.c new file mode 100644 index 000000000..22c3de399 --- /dev/null +++ b/tests-mx32/unlinkat.c @@ -0,0 +1,34 @@ +#include "tests.h" +#include + +#ifdef __NR_unlinkat + +# include +# include + +int +main(void) +{ + static const char sample[] = "unlinkat_sample"; + const long fd = (long) 0xdeadbeefffffffffULL; + + long rc = syscall(__NR_unlinkat, fd, sample, 0); + printf("unlinkat(%d, \"%s\", 0) = %ld %s (%m)\n", + (int) fd, sample, rc, errno2name()); + + rc = syscall(__NR_unlinkat, -100, sample, -1L); + printf("unlinkat(%s, \"%s\", %s) = %ld %s (%m)\n", + "AT_FDCWD", sample, + "AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW" + "|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|0xffffe0ff", + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unlinkat") + +#endif diff --git a/tests-mx32/unlinkat.test b/tests-mx32/unlinkat.test new file mode 100755 index 000000000..864261f71 --- /dev/null +++ b/tests-mx32/unlinkat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check unlinkat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a35 diff --git a/tests-mx32/unshare.c b/tests-mx32/unshare.c new file mode 100644 index 000000000..5aedde476 --- /dev/null +++ b/tests-mx32/unshare.c @@ -0,0 +1,80 @@ +/* + * Check decoding of unshare syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_unshare + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_flags = + (kernel_ulong_t) 0xbadc0ded0000000fULL; + + static struct { + kernel_ulong_t val; + const char *str; + } unshare_flags[] = { + { ARG_STR(0) }, + { 0xdeadca75, + "CLONE_THREAD|CLONE_FS|CLONE_SIGHAND|CLONE_SYSVSEM|" + "CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWNET|CLONE_NEWUSER|" + "CLONE_NEWCGROUP|0x80a8c075" }, + { 0x2000000, "CLONE_NEWCGROUP" }, + { ARG_STR(0x81f8f0ff) " /* CLONE_??? */" }, + }; + + long rc; + unsigned int i; + + rc = syscall(__NR_unshare, bogus_flags); + printf("unshare(%#llx /* CLONE_??? */) = %s\n", + (unsigned long long) bogus_flags, sprintrc(rc)); + + for (i = 0; i < ARRAY_SIZE(unshare_flags); i++) { + rc = syscall(__NR_unshare, unshare_flags[i].val); + printf("unshare(%s) = %s\n", + unshare_flags[i].str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unshare"); + +#endif diff --git a/tests-mx32/unshare.test b/tests-mx32/unshare.test new file mode 100755 index 000000000..ccb9575ef --- /dev/null +++ b/tests-mx32/unshare.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of setns syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff --git a/tests-mx32/userfaultfd.c b/tests-mx32/userfaultfd.c new file mode 100644 index 000000000..60432fa38 --- /dev/null +++ b/tests-mx32/userfaultfd.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include "scno.h" + +#if defined __NR_userfaultfd && defined O_CLOEXEC + +# include +# include + +int +main(void) +{ + long rc = syscall(__NR_userfaultfd, 1 | O_NONBLOCK | O_CLOEXEC); + printf("userfaultfd(O_NONBLOCK|O_CLOEXEC|0x1) = %ld %s (%m)\n", + rc, errno2name()); + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_userfaultfd && O_CLOEXEC") + +#endif diff --git a/tests-mx32/userfaultfd.test b/tests-mx32/userfaultfd.test new file mode 100755 index 000000000..af8b6fbe8 --- /dev/null +++ b/tests-mx32/userfaultfd.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check userfaultfd syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a38 diff --git a/tests-mx32/ustat.c b/tests-mx32/ustat.c new file mode 100644 index 000000000..57bb29c27 --- /dev/null +++ b/tests-mx32/ustat.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2017 JingPiao Chen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_ustat + +# include +# include +# include +# include +# ifdef HAVE_USTAT_H +# include +# endif + +int +main(void) +{ + const kernel_ulong_t magic = (kernel_ulong_t) 0xfacefeedffffffff; + unsigned long long buf[4]; + unsigned int dev; + long rc; + +# ifdef HAVE_USTAT_H + struct ustat *const ust = tail_alloc(sizeof(*ust)); + struct stat st; + if (stat(".", &st)) + perror_msg_and_fail("stat"); + + dev = (unsigned int) st.st_dev; + rc = syscall(__NR_ustat, dev, ust); + if (rc) + printf("ustat(makedev(%u, %u), %p) = %s\n", + major(dev), minor(dev), ust, sprintrc(rc)); + else + printf("ustat(makedev(%u, %u)" + ", {f_tfree=%llu, f_tinode=%llu}) = 0\n", + major(dev), minor(dev), + zero_extend_signed_to_ull(ust->f_tfree), + zero_extend_signed_to_ull(ust->f_tinode)); +# endif /* HAVE_USTAT_H */ + + dev = (unsigned int) magic; + rc = syscall(__NR_ustat, magic, 0); + printf("ustat(makedev(%u, %u), NULL) = %s\n", + major(dev), minor(dev), sprintrc(rc)); + + rc = syscall(__NR_ustat, magic, buf); + printf("ustat(makedev(%u, %u), %p) = %s\n", + major(dev), minor(dev), buf, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ustat") + +#endif diff --git a/tests-mx32/ustat.test b/tests-mx32/ustat.test new file mode 100755 index 000000000..60a88e0af --- /dev/null +++ b/tests-mx32/ustat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check ustat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 diff --git a/tests-mx32/utime.c b/tests-mx32/utime.c new file mode 100644 index 000000000..8fd594f07 --- /dev/null +++ b/tests-mx32/utime.c @@ -0,0 +1,97 @@ +/* + * Check decoding of utime syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_utime + +# include +# include +# include +# include +# include + + +static void +print_tm(const struct tm * const p) +{ + char buf[256]; + + strftime(buf, sizeof(buf), "%FT%T%z", p); + + printf("%s", buf); +} + +static long +k_utime(const void *const filename, const void *const times) +{ + return syscall(__NR_utime, filename, times); +} + +int +main(void) +{ + static const char *const dummy_str = "dummy filename"; + + const time_t t = time(NULL); + const struct tm * const p = localtime(&t); + const struct utimbuf u = { .actime = t, .modtime = t }; + const struct utimbuf *const tail_u = tail_memdup(&u, sizeof(u)); + const char *const dummy_filename = + tail_memdup(dummy_str, sizeof(dummy_str) - 1); + + long rc = k_utime("", NULL); + printf("utime(\"\", NULL) = %s\n", sprintrc(rc)); + + rc = k_utime(dummy_filename + sizeof(dummy_str), tail_u + 1); + printf("utime(%p, %p) = %s\n", dummy_filename + sizeof(dummy_str), + tail_u + 1, sprintrc(rc)); + + rc = k_utime(dummy_filename, (struct tm *) tail_u + 1); + printf("utime(%p, %p) = %s\n", + dummy_filename, (struct tm *) tail_u + 1, sprintrc(rc)); + + rc = k_utime("utime\nfilename", tail_u); + const char *errstr = sprintrc(rc); + printf("utime(\"utime\\nfilename\", {actime="); + print_tm(p); + printf(", modtime="); + print_tm(p); + printf("}) = %s\n", errstr); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_utime") + +#endif diff --git a/tests-mx32/utime.test b/tests-mx32/utime.test new file mode 100755 index 000000000..bd64c5329 --- /dev/null +++ b/tests-mx32/utime.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of utime syscall. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a 16 -e trace=utime diff --git a/tests-mx32/utimensat.c b/tests-mx32/utimensat.c new file mode 100644 index 000000000..6d9faac29 --- /dev/null +++ b/tests-mx32/utimensat.c @@ -0,0 +1,101 @@ +/* + * This file is part of utimensat strace test. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include + +#if defined HAVE_UTIMENSAT \ + && defined AT_FDCWD && defined AT_SYMLINK_NOFOLLOW \ + && defined UTIME_NOW && defined UTIME_OMIT + +static void +print_ts(const struct timespec *ts) +{ + printf("{tv_sec=%ju, tv_nsec=%ju}", (uintmax_t) ts->tv_sec, + (uintmax_t) ts->tv_nsec); +} + +int +main(void) +{ + static const char fname[] = "utimensat\nfilename"; + + assert(utimensat(AT_FDCWD, fname, NULL, 0) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + + #define PREFIX "utimensat(AT_FDCWD, \"utimensat\\nfilename\", " + printf(PREFIX "NULL, 0) = -1 ENOENT (%m)\n"); + + struct timeval tv; + struct timespec ts[2]; + + if (gettimeofday(&tv, NULL)) + perror_msg_and_skip("gettimeofday"); + + ts[0].tv_sec = tv.tv_sec; + ts[0].tv_nsec = tv.tv_usec; + ts[1].tv_sec = tv.tv_sec - 1; + ts[1].tv_nsec = tv.tv_usec + 1; + + printf(PREFIX "["); + print_ts(&ts[0]); + printf(", "); + print_ts(&ts[1]); + printf("], AT_SYMLINK_NOFOLLOW) = -1 ENOENT "); + + assert(utimensat(AT_FDCWD, fname, ts, AT_SYMLINK_NOFOLLOW) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + printf("(%m)\n"); + + ts[0].tv_nsec = UTIME_NOW; + ts[1].tv_nsec = UTIME_OMIT; + assert(utimensat(AT_FDCWD, fname, ts, AT_SYMLINK_NOFOLLOW) == -1); + if (ENOENT != errno) + error_msg_and_skip("utimensat"); + printf(PREFIX "[UTIME_NOW, UTIME_OMIT], AT_SYMLINK_NOFOLLOW)" + " = -1 ENOENT (%m)\n"); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_UTIMENSAT && AT_FDCWD && AT_SYMLINK_NOFOLLOW" + " && UTIME_NOW && UTIME_OMIT") + +#endif diff --git a/tests-mx32/utimensat.test b/tests-mx32/utimensat.test new file mode 100755 index 000000000..52e3f3165 --- /dev/null +++ b/tests-mx32/utimensat.test @@ -0,0 +1,20 @@ +#!/bin/sh + +# Check decoding of utimensat syscall. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -e utimensat $args > "$OUT" + +check_prog grep +LC_ALL=C grep -x "utimensat(.*" "$LOG" > /dev/null || { + rm -f "$OUT" + skip_ 'test executable does not use utimensat syscall' +} + +match_diff "$LOG" "$OUT" + +rm -f "$OUT" + +exit 0 diff --git a/tests-mx32/utimes.c b/tests-mx32/utimes.c new file mode 100644 index 000000000..bbfa03105 --- /dev/null +++ b/tests-mx32/utimes.c @@ -0,0 +1,84 @@ +/* + * Check decoding of utimes syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_utimes + +# include +# include +# include +# include + +int +main(void) +{ + struct timeval tv; + if (gettimeofday(&tv, NULL)) + perror_msg_and_fail("gettimeofday"); + + static const char sample[] = "utimes_sample"; + + long rc = syscall(__NR_utimes, sample, 0); + printf("utimes(\"%s\", NULL) = %ld %s (%m)\n", + sample, rc, errno2name()); + + struct timeval *const ts = tail_alloc(sizeof(*ts) * 2); + + ts[0].tv_sec = tv.tv_sec; + ts[0].tv_usec = tv.tv_usec; + ts[1].tv_sec = tv.tv_sec - 1; + ts[1].tv_usec = tv.tv_usec + 1; + + rc = syscall(__NR_utimes, 0, ts + 2); + printf("utimes(NULL, %p) = %ld %s (%m)\n", ts + 2, rc, errno2name()); + + rc = syscall(__NR_utimes, 0, ts + 1); + printf("utimes(NULL, [{tv_sec=%jd, tv_usec=%jd}, %p]) = " + "%ld %s (%m)\n", + (intmax_t) ts[1].tv_sec, (intmax_t) ts[1].tv_usec, + ts + 2, rc, errno2name()); + + rc = syscall(__NR_utimes, "", ts); + printf("utimes(\"\", [{tv_sec=%jd, tv_usec=%jd}, " + "{tv_sec=%jd, tv_usec=%jd}]) = %ld %s (%m)\n", + (intmax_t) ts[0].tv_sec, (intmax_t) ts[0].tv_usec, + (intmax_t) ts[1].tv_sec, (intmax_t) ts[1].tv_usec, + rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_utimes") + +#endif diff --git a/tests-mx32/utimes.test b/tests-mx32/utimes.test new file mode 100755 index 000000000..99143a0b0 --- /dev/null +++ b/tests-mx32/utimes.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check utimes syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff --git a/tests-mx32/vfork-f.c b/tests-mx32/vfork-f.c new file mode 100644 index 000000000..b14e4b499 --- /dev/null +++ b/tests-mx32/vfork-f.c @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static inline int +logit_(const char *const str) +{ + return !chdir(str); +} + +#define prefix "vfork-f." +#define logit(arg) logit_(prefix arg) + +int main(int ac, char **av) +{ + if (ac < 1) + return 1; + if (ac > 1) { + if (read(0, &ac, sizeof(int))) + return 2; + return logit("exec"); + } + + logit("start"); + + int child_wait_fds[2]; + (void) close(0); + if (pipe(child_wait_fds)) + perror_msg_and_fail("pipe"); + if (fcntl(child_wait_fds[1], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + + int parent_wait_fds[2]; + if (pipe(parent_wait_fds)) + perror_msg_and_fail("pipe"); + if (fcntl(parent_wait_fds[0], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + if (fcntl(parent_wait_fds[1], F_SETFD, FD_CLOEXEC)) + perror_msg_and_fail("fcntl"); + + char *const args[] = { av[0], (char *) "", NULL }; + pid_t pid = vfork(); + + if (pid < 0) + perror_msg_and_fail("vfork"); + + if (!pid) { + if (logit("child") || execve(args[0], args, args + 1)) + _exit(2); + } + + close(0); + close(parent_wait_fds[1]); + + if (read(parent_wait_fds[0], &parent_wait_fds[1], sizeof(int))) + perror_msg_and_fail("read"); + logit("parent"); + close(child_wait_fds[1]); + + int status; + assert(wait(&status) == pid); + assert(status == 0); + + pid_t ppid = getpid(); + logit("finish"); + + printf("%-5d chdir(\"%sstart\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%schild\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sparent\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sexec\") = -1 ENOENT (%m)\n" + "%-5d chdir(\"%sfinish\") = -1 ENOENT (%m)\n", + ppid, prefix, + pid, prefix, + ppid, prefix, + pid, prefix, + ppid, prefix); + return 0; +} diff --git a/tests-mx32/vfork-f.test b/tests-mx32/vfork-f.test new file mode 100755 index 000000000..ff4422b2b --- /dev/null +++ b/tests-mx32/vfork-f.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check how strace -f follows vfork syscall. + +. "${srcdir=.}/fork-f.test" diff --git a/tests-mx32/vhangup.c b/tests-mx32/vhangup.c new file mode 100644 index 000000000..e7ddabba2 --- /dev/null +++ b/tests-mx32/vhangup.c @@ -0,0 +1,34 @@ +#include "tests.h" +#include + +#ifdef __NR_vhangup + +# include +# include + +int +main(void) +{ + if (setsid() == -1) + perror_msg_and_skip("setsid"); + + long rc = syscall(__NR_vhangup); + + /* + * On setsid() success, the new session has no controlling terminal, + * therefore a subsequent vhangup() has nothing to hangup. + * + * The system call, however, returns 0 iff the calling process + * has CAP_SYS_TTY_CONFIG capability. + */ + printf("vhangup() = %s\n", sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_vhangup") + +#endif diff --git a/tests-mx32/vhangup.test b/tests-mx32/vhangup.test new file mode 100755 index 000000000..8fe1cacb9 --- /dev/null +++ b/tests-mx32/vhangup.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check vhangup syscall decoding. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a10 diff --git a/tests-mx32/vmsplice.c b/tests-mx32/vmsplice.c new file mode 100644 index 000000000..f29962e3d --- /dev/null +++ b/tests-mx32/vmsplice.c @@ -0,0 +1,107 @@ +/* + * This file is part of vmsplice strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_vmsplice + +# include +# include +# include +# include + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + assert(0 == fds[0]); + assert(1 == fds[1]); + + static const char w0_c[] = "012"; + const char *w0_d = hexdump_strdup(w0_c); + void *w0 = tail_memdup(w0_c, LENGTH_OF(w0_c)); + + static const char w1_c[] = "34567"; + const char *w1_d = hexdump_strdup(w1_c); + void *w1 = tail_memdup(w1_c, LENGTH_OF(w1_c)); + + static const char w2_c[] = "89abcde"; + const char *w2_d = hexdump_strdup(w2_c); + void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); + + const struct iovec iov_[] = { + { + .iov_base = w0, + .iov_len = LENGTH_OF(w0_c) + }, { + .iov_base = w1, + .iov_len = LENGTH_OF(w1_c) + }, { + .iov_base = w2, + .iov_len = LENGTH_OF(w2_c) + } + }; + const struct iovec *iov = tail_memdup(iov_, sizeof(iov_)); + const unsigned int len = + LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); + + tprintf("vmsplice(1, [{iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}" + ", {iov_base=\"%s\", iov_len=%u}], %u, %s) = %u\n" + " * %u bytes in buffer 0\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 1\n" + " | 00000 %-49s %-16s |\n" + " * %u bytes in buffer 2\n" + " | 00000 %-49s %-16s |\n", + w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(iov_), + "SPLICE_F_NONBLOCK", len, + LENGTH_OF(w0_c), w0_d, w0_c, + LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); + + const long rc = syscall(__NR_vmsplice, 1, iov, ARRAY_SIZE(iov_), 2); + if (rc < 0) + perror_msg_and_skip("vmsplice"); + assert(rc == (int) len); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_vmsplice") + +#endif diff --git a/tests-mx32/vmsplice.test b/tests-mx32/vmsplice.test new file mode 100755 index 000000000..8a80650e0 --- /dev/null +++ b/tests-mx32/vmsplice.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of vmsplice syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -ewrite=1 diff --git a/tests-mx32/wait4-v.c b/tests-mx32/wait4-v.c new file mode 100644 index 000000000..8c0c9f596 --- /dev/null +++ b/tests-mx32/wait4-v.c @@ -0,0 +1,3 @@ +/* This file is part of wait4-v strace test. */ +#define VERBOSE 1 +#include "wait4.c" diff --git a/tests-mx32/wait4-v.test b/tests-mx32/wait4-v.test new file mode 100755 index 000000000..58e55f25d --- /dev/null +++ b/tests-mx32/wait4-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of wait4 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e signal=none -e trace=wait4 diff --git a/tests-mx32/wait4.c b/tests-mx32/wait4.c new file mode 100644 index 000000000..ccb3ebb9a --- /dev/null +++ b/tests-mx32/wait4.c @@ -0,0 +1,199 @@ +/* + * Check decoding of wait4 syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +static const char * +sprint_rusage(const struct rusage *const ru) +{ + static char buf[1024]; + snprintf(buf, sizeof(buf), + "{ru_utime={tv_sec=%lu, tv_usec=%lu}" + ", ru_stime={tv_sec=%lu, tv_usec=%lu}" +#if VERBOSE + ", ru_maxrss=%lu" + ", ru_ixrss=%lu" + ", ru_idrss=%lu" + ", ru_isrss=%lu" + ", ru_minflt=%lu" + ", ru_majflt=%lu" + ", ru_nswap=%lu" + ", ru_inblock=%lu" + ", ru_oublock=%lu" + ", ru_msgsnd=%lu" + ", ru_msgrcv=%lu" + ", ru_nsignals=%lu" + ", ru_nvcsw=%lu" + ", ru_nivcsw=%lu}" +#else + ", ...}" +#endif + , (long) ru->ru_utime.tv_sec + , (long) ru->ru_utime.tv_usec + , (long) ru->ru_stime.tv_sec + , (long) ru->ru_stime.tv_usec +#if VERBOSE + , (long) ru->ru_maxrss + , (long) ru->ru_ixrss + , (long) ru->ru_idrss + , (long) ru->ru_isrss + , (long) ru->ru_minflt + , (long) ru->ru_majflt + , (long) ru->ru_nswap + , (long) ru->ru_inblock + , (long) ru->ru_oublock + , (long) ru->ru_msgsnd + , (long) ru->ru_msgrcv + , (long) ru->ru_nsignals + , (long) ru->ru_nvcsw + , (long) ru->ru_nivcsw +#endif + ); + return buf; +} + +static pid_t +do_wait4(pid_t pid, int *wstatus, int options, struct rusage *ru) +{ + sigset_t mask = {}; + sigaddset(&mask, SIGCHLD); + + assert(sigprocmask(SIG_BLOCK, &mask, NULL) == 0); + pid_t rc = wait4(pid, wstatus, options, ru); + assert(sigprocmask(SIG_UNBLOCK, &mask, NULL) == 0); + return rc; +} + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + pid_t pid; + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + char c; + (void) close(1); + assert(read(0, &c, sizeof(c)) == 1); + return 42; + } + + (void) close(0); + + int *const s = tail_alloc(sizeof(*s)); + if (wait4(pid, s, WNOHANG|__WALL, NULL)) + perror_msg_and_fail("wait4 #1"); + tprintf("wait4(%d, %p, WNOHANG|__WALL, NULL) = 0\n", pid, s); + + struct rusage *const rusage = tail_alloc(sizeof(*rusage)); + if (wait4(pid, s, WNOHANG|__WALL, rusage)) + perror_msg_and_fail("wait4 #2"); + tprintf("wait4(%d, %p, WNOHANG|__WALL, %p) = 0\n", pid, s, rusage); + + assert(write(1, "", 1) == 1); + (void) close(1); + + assert(do_wait4(pid, s, 0, rusage) == pid); + assert(WIFEXITED(*s) && WEXITSTATUS(*s) == 42); + tprintf("wait4(%d, [{WIFEXITED(s) && WEXITSTATUS(s) == 42}], 0, %s)" + " = %d\n", pid, sprint_rusage(rusage), pid); + + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + (void) raise(SIGUSR1); + return 1; + } + + assert(do_wait4(pid, s, __WALL, rusage) == pid); + assert(WIFSIGNALED(*s) && WTERMSIG(*s) == SIGUSR1); + tprintf("wait4(%d, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGUSR1}]" + ", __WALL, %s) = %d\n", pid, sprint_rusage(rusage), pid); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + (void) close(1); + raise(SIGSTOP); + char c; + assert(read(0, &c, sizeof(c)) == 1); + return 0; + } + + (void) close(0); + + assert(do_wait4(pid, s, WSTOPPED, rusage) == pid); + assert(WIFSTOPPED(*s) && WSTOPSIG(*s) == SIGSTOP); + tprintf("wait4(%d, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGSTOP}]" + ", WSTOPPED, %s) = %d\n", pid, sprint_rusage(rusage), pid); + + if (kill(pid, SIGCONT)) + perror_msg_and_fail("kill(SIGCONT)"); + +#if defined WCONTINUED && defined WIFCONTINUED + assert(do_wait4(pid, s, WCONTINUED, rusage) == pid); + assert(WIFCONTINUED(*s)); + tprintf("wait4(%d, [{WIFCONTINUED(s)}], WCONTINUED" + ", %s) = %d\n", pid, sprint_rusage(rusage), pid); +#endif /* WCONTINUED && WIFCONTINUED */ + + assert(write(1, "", 1) == 1); + (void) close(1); + + assert(do_wait4(pid, s, 0, rusage) == pid); + assert(WIFEXITED(*s) && WEXITSTATUS(*s) == 0); + tprintf("wait4(%d, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0" + ", %s) = %d\n", pid, sprint_rusage(rusage), pid); + + assert(wait4(-1, s, WNOHANG|WSTOPPED|__WALL, rusage) == -1); + tprintf("wait4(-1, %p, WNOHANG|WSTOPPED|__WALL, %p) = -1 %s (%m)\n", + s, rusage, errno2name()); + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/wait4.test b/tests-mx32/wait4.test new file mode 100755 index 000000000..6338d1f67 --- /dev/null +++ b/tests-mx32/wait4.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of wait4 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff --git a/tests-mx32/waitid-v.c b/tests-mx32/waitid-v.c new file mode 100644 index 000000000..15a8010ce --- /dev/null +++ b/tests-mx32/waitid-v.c @@ -0,0 +1,3 @@ +/* This file is part of waitid-v strace test. */ +#define VERBOSE 1 +#include "waitid.c" diff --git a/tests-mx32/waitid-v.test b/tests-mx32/waitid-v.test new file mode 100755 index 000000000..eb498cb0c --- /dev/null +++ b/tests-mx32/waitid-v.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check verbose decoding of waitid syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -v -e signal=none -e trace=waitid diff --git a/tests-mx32/waitid.c b/tests-mx32/waitid.c new file mode 100644 index 000000000..6a102990a --- /dev/null +++ b/tests-mx32/waitid.c @@ -0,0 +1,263 @@ +/* + * Check decoding of waitid syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * +sprint_rusage(const struct rusage *const ru) +{ + static char buf[1024]; + snprintf(buf, sizeof(buf), + "{ru_utime={tv_sec=%lld, tv_usec=%lld}" + ", ru_stime={tv_sec=%lld, tv_usec=%lld}" +#if VERBOSE + ", ru_maxrss=%llu" + ", ru_ixrss=%llu" + ", ru_idrss=%llu" + ", ru_isrss=%llu" + ", ru_minflt=%llu" + ", ru_majflt=%llu" + ", ru_nswap=%llu" + ", ru_inblock=%llu" + ", ru_oublock=%llu" + ", ru_msgsnd=%llu" + ", ru_msgrcv=%llu" + ", ru_nsignals=%llu" + ", ru_nvcsw=%llu" + ", ru_nivcsw=%llu}" +#else + ", ...}" +#endif + , (long long) ru->ru_utime.tv_sec + , (long long) ru->ru_utime.tv_usec + , (long long) ru->ru_stime.tv_sec + , (long long) ru->ru_stime.tv_usec +#if VERBOSE + , zero_extend_signed_to_ull(ru->ru_maxrss) + , zero_extend_signed_to_ull(ru->ru_ixrss) + , zero_extend_signed_to_ull(ru->ru_idrss) + , zero_extend_signed_to_ull(ru->ru_isrss) + , zero_extend_signed_to_ull(ru->ru_minflt) + , zero_extend_signed_to_ull(ru->ru_majflt) + , zero_extend_signed_to_ull(ru->ru_nswap) + , zero_extend_signed_to_ull(ru->ru_inblock) + , zero_extend_signed_to_ull(ru->ru_oublock) + , zero_extend_signed_to_ull(ru->ru_msgsnd) + , zero_extend_signed_to_ull(ru->ru_msgrcv) + , zero_extend_signed_to_ull(ru->ru_nsignals) + , zero_extend_signed_to_ull(ru->ru_nvcsw) + , zero_extend_signed_to_ull(ru->ru_nivcsw) +#endif + ); + return buf; +} + +#define CASE(x) case x: return #x + +static const char * +si_code_2_name(const int code) +{ + switch (code) { +#ifdef CLD_EXITED + CASE(CLD_EXITED); +#endif +#ifdef CLD_KILLED + CASE(CLD_KILLED); +#endif +#ifdef CLD_DUMPED + CASE(CLD_DUMPED); +#endif +#ifdef CLD_TRAPPED + CASE(CLD_TRAPPED); +#endif +#ifdef CLD_STOPPED + CASE(CLD_STOPPED); +#endif +#ifdef CLD_CONTINUED + CASE(CLD_CONTINUED); +#endif + default: perror_msg_and_fail("unknown si_code %d", code); + } +} + +static const char * +sprint_siginfo(const siginfo_t *const si, const char *const status_text) +{ + static char buf[1024]; + snprintf(buf, sizeof(buf), + "{si_signo=SIGCHLD" + ", si_code=%s" + ", si_pid=%u" + ", si_uid=%u" + ", si_status=%s" + ", si_utime=%llu" + ", si_stime=%llu}", + si_code_2_name(si->si_code), + si->si_pid, + si->si_uid, + status_text, + zero_extend_signed_to_ull(si->si_utime), + zero_extend_signed_to_ull(si->si_stime)); + return buf; +} + +static unsigned long +poison(unsigned int v) +{ + return (unsigned long) 0xfacefeed00000000ULL | v; +} + +static long +do_waitid(const unsigned int idtype, + const unsigned int id, + const siginfo_t *const infop, + const unsigned int options, + const struct rusage *const rusage) +{ + sigset_t mask = {}; + sigaddset(&mask, SIGCHLD); + + assert(sigprocmask(SIG_BLOCK, &mask, NULL) == 0); + long rc = syscall(__NR_waitid, poison(idtype), poison(id), + infop, poison(options), rusage); + assert(sigprocmask(SIG_UNBLOCK, &mask, NULL) == 0); + return rc; +} + +int +main(void) +{ + tprintf("%s", ""); + + int fds[2]; + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + pid_t pid; + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + char c; + (void) close(1); + assert(read(0, &c, sizeof(c)) == 1); + return 42; + } + + (void) close(0); + + if (do_waitid(P_PID, pid, 0, WNOHANG|WEXITED, 0)) + perror_msg_and_fail("waitid #1"); + tprintf("waitid(P_PID, %d, NULL, WNOHANG|WEXITED, NULL) = 0\n", pid); + + siginfo_t *const sinfo = tail_alloc(sizeof(*sinfo)); + memset(sinfo, 0, sizeof(*sinfo)); + struct rusage *const rusage = tail_alloc(sizeof(*rusage)); + if (do_waitid(P_PID, pid, sinfo, WNOHANG|WEXITED|WSTOPPED, rusage)) + perror_msg_and_fail("waitid #2"); + tprintf("waitid(P_PID, %d, {}, WNOHANG|WEXITED|WSTOPPED, %s) = 0\n", + pid, sprint_rusage(rusage)); + + assert(write(1, "", 1) == 1); + (void) close(1); + + if (do_waitid(P_PID, pid, sinfo, WEXITED, rusage)) + perror_msg_and_fail("waitid #3"); + tprintf("waitid(P_PID, %d, %s, WEXITED, %s) = 0\n", + pid, sprint_siginfo(sinfo, "42"), sprint_rusage(rusage)); + + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + (void) raise(SIGUSR1); + return 1; + } + + if (do_waitid(P_PID, pid, sinfo, WEXITED, rusage)) + perror_msg_and_fail("waitid #4"); + tprintf("waitid(P_PID, %d, %s, WEXITED, %s) = 0\n", + pid, sprint_siginfo(sinfo, "SIGUSR1"), sprint_rusage(rusage)); + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + pid = fork(); + if (pid < 0) + perror_msg_and_fail("fork"); + + if (!pid) { + (void) close(1); + raise(SIGSTOP); + char c; + assert(read(0, &c, sizeof(c)) == 1); + return 0; + } + + (void) close(0); + + if (do_waitid(P_PID, pid, sinfo, WSTOPPED, rusage)) + perror_msg_and_fail("waitid #5"); + tprintf("waitid(P_PID, %d, %s, WSTOPPED, %s) = 0\n", + pid, sprint_siginfo(sinfo, "SIGSTOP"), sprint_rusage(rusage)); + + if (kill(pid, SIGCONT)) + perror_msg_and_fail("kill(SIGCONT)"); + +#if defined WCONTINUED + if (do_waitid(P_PID, pid, sinfo, WCONTINUED, rusage)) + perror_msg_and_fail("waitid #6"); + tprintf("waitid(P_PID, %d, %s, WCONTINUED, %s) = 0\n", + pid, sprint_siginfo(sinfo, "SIGCONT"), sprint_rusage(rusage)); +#endif /* WCONTINUED */ + + assert(write(1, "", 1) == 1); + (void) close(1); + + if (do_waitid(P_PID, pid, sinfo, WEXITED, rusage)) + perror_msg_and_fail("waitid #7"); + tprintf("waitid(P_PID, %d, %s, WEXITED, %s) = 0\n", + pid, sprint_siginfo(sinfo, "0"), sprint_rusage(rusage)); + + long rc = do_waitid(P_ALL, -1, sinfo, WEXITED|WSTOPPED, rusage); + tprintf("waitid(P_ALL, -1, %p, WEXITED|WSTOPPED, %p)" + " = %ld %s (%m)\n", sinfo, rusage, rc, errno2name()); + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/waitid.test b/tests-mx32/waitid.test new file mode 100755 index 000000000..3bcba3abb --- /dev/null +++ b/tests-mx32/waitid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of waitid syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -esignal=none diff --git a/tests-mx32/waitpid.c b/tests-mx32/waitpid.c new file mode 100644 index 000000000..2e22e2453 --- /dev/null +++ b/tests-mx32/waitpid.c @@ -0,0 +1,56 @@ +/* + * Check decoding of waitpid syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_waitpid + +# include +# include +# include + +int +main(void) +{ + unsigned long pid = + (unsigned long) 0xdefaced00000000ULL | (unsigned) getpid(); + long rc = syscall(__NR_waitpid, pid, 0L, (unsigned long) WNOHANG); + printf("waitpid(%d, NULL, WNOHANG) = %ld %s (%m)\n", + (int) pid, rc, errno2name()); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_waitpid") + +#endif diff --git a/tests-mx32/waitpid.test b/tests-mx32/waitpid.test new file mode 100755 index 000000000..93807d1fb --- /dev/null +++ b/tests-mx32/waitpid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of waitpid syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a28 diff --git a/tests-mx32/xattr-strings.c b/tests-mx32/xattr-strings.c new file mode 100644 index 000000000..310929a95 --- /dev/null +++ b/tests-mx32/xattr-strings.c @@ -0,0 +1,30 @@ +#include "tests.h" + +#ifdef HAVE_SYS_XATTR_H + +# include +# include + +int +main(void) +{ + static const char name[] = "strace.test"; + static const char c_value[] = "foobar"; + + const char *const z_value = tail_memdup(c_value, sizeof(c_value)); + long rc; + + rc = fsetxattr(-1, name, z_value, sizeof(c_value), XATTR_REPLACE); + printf("fsetxattr(-1, \"%.*s\"..., \"%.*s\"..., %u, XATTR_REPLACE) = %s\n", + 4, name, 4, c_value, (unsigned) sizeof(c_value), sprintrc(rc)); + + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYS_XATTR_H") + +#endif diff --git a/tests-mx32/xattr-strings.test b/tests-mx32/xattr-strings.test new file mode 100755 index 000000000..25ef360b0 --- /dev/null +++ b/tests-mx32/xattr-strings.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check *xattr syscalls decoding when limiting string size. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a22 -s 4 -e trace=fsetxattr diff --git a/tests-mx32/xattr.c b/tests-mx32/xattr.c new file mode 100644 index 000000000..a772eced6 --- /dev/null +++ b/tests-mx32/xattr.c @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_SYS_XATTR_H + +# include +# include + +# ifndef XATTR_SIZE_MAX +# define XATTR_SIZE_MAX 65536 +# endif + +#define DEFAULT_STRLEN 32 + +int +main(void) +{ + static const char name[] = "strace.test"; + static const char c_value[] = "foo\0bar"; + static const char q_value[] = "foo\\0bar"; + + const char *const z_value = tail_memdup(c_value, sizeof(c_value)); + char *const efault = tail_alloc(1) + 1; + const char *const value = tail_memdup(c_value, sizeof(c_value) - 1); + char *const big = tail_alloc(XATTR_SIZE_MAX + 1); + long rc; + const char *errstr; + + rc = fsetxattr(-1, 0, 0, 0, XATTR_CREATE); + printf("fsetxattr(-1, NULL, NULL, 0, XATTR_CREATE) = %s\n", + sprintrc(rc)); + + rc = fsetxattr(-1, 0, z_value, 0, XATTR_CREATE); + printf("fsetxattr(-1, NULL, \"\", 0, XATTR_CREATE) = %s\n", + sprintrc(rc)); + + rc = fsetxattr(-1, name, big, XATTR_SIZE_MAX + 1, XATTR_CREATE); + printf("fsetxattr(-1, \"%s\", %p, %u, XATTR_CREATE) = %s\n", + name, big, XATTR_SIZE_MAX + 1, sprintrc(rc)); + + rc = fsetxattr(-1, name, value, sizeof(c_value), XATTR_CREATE); + printf("fsetxattr(-1, \"%s\", %p, %u, XATTR_CREATE) = %s\n", + name, value, (unsigned) sizeof(c_value), sprintrc(rc)); + + rc = fsetxattr(-1, name, z_value, sizeof(c_value), XATTR_REPLACE); + printf("fsetxattr(-1, \"%s\", \"%s\", %u, XATTR_REPLACE) = %s\n", + name, q_value, (unsigned) sizeof(c_value), sprintrc(rc)); + + rc = fsetxattr(-1, name, value, sizeof(c_value) - 1, XATTR_CREATE|XATTR_REPLACE); + printf("fsetxattr(-1, \"%s\", \"%s\", %u, XATTR_CREATE|XATTR_REPLACE)" + " = %s\n", + name, q_value, (unsigned) sizeof(c_value) - 1, sprintrc(rc)); + + rc = setxattr(".", name, z_value, sizeof(c_value), XATTR_CREATE); + printf("setxattr(\".\", \"%s\", \"%s\", %u, XATTR_CREATE) = %s\n", + name, q_value, (unsigned) sizeof(c_value), sprintrc(rc)); + + rc = lsetxattr(".", name, value, sizeof(c_value) - 1, XATTR_CREATE); + printf("lsetxattr(\".\", \"%s\", \"%s\", %u, XATTR_CREATE) = %s\n", + name, q_value, (unsigned) sizeof(c_value) - 1, sprintrc(rc)); + + rc = fgetxattr(-1, name, efault, 4); + printf("fgetxattr(-1, \"%s\", %p, 4) = %s\n", + name, efault, sprintrc(rc)); + + rc = getxattr(".", name, big, XATTR_SIZE_MAX + 1); + printf("getxattr(\".\", \"%s\", %p, %u) = %s\n", + name, big, XATTR_SIZE_MAX + 1, sprintrc(rc)); + + rc = lgetxattr(".", name, big + 1, XATTR_SIZE_MAX); + printf("lgetxattr(\".\", \"%s\", %p, %u) = %s\n", + name, big + 1, XATTR_SIZE_MAX, sprintrc(rc)); + + rc = flistxattr(-1, efault, 4); + printf("flistxattr(-1, %p, 4) = %s\n", efault, sprintrc(rc)); + + rc = llistxattr("", efault + 1, 4); + printf("llistxattr(\"\", %p, 4) = %s\n", efault + 1, sprintrc(rc)); + + rc = listxattr(".", big, 0); + printf("listxattr(\".\", %p, 0) = %s\n", big, sprintrc(rc)); + + rc = listxattr(".", big, XATTR_SIZE_MAX + 1); + errstr = sprintrc(rc); + printf("listxattr(\".\", "); + if (rc < 0) + printf("%p", big); + else { + const int ellipsis = rc > DEFAULT_STRLEN; + + putchar('"'); + print_quoted_memory(big, ellipsis ? DEFAULT_STRLEN : rc); + putchar('"'); + if (ellipsis) + fputs("...", stdout); + } + printf(", %u) = %s\n", XATTR_SIZE_MAX + 1, errstr); + + rc = fremovexattr(-1, name); + printf("fremovexattr(-1, \"%s\") = %s\n", name, sprintrc(rc)); + + rc = removexattr(".", name); + printf("removexattr(\".\", \"%s\") = %s\n", name, sprintrc(rc)); + + rc = lremovexattr(".", name); + printf("lremovexattr(\".\", \"%s\") = %s\n", name, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYS_XATTR_H") + +#endif diff --git a/tests-mx32/xattr.test b/tests-mx32/xattr.test new file mode 100755 index 000000000..8c7a87b94 --- /dev/null +++ b/tests-mx32/xattr.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check *xattr syscalls decoding. + +. "${srcdir=.}/init.sh" + +syscalls= +for n in getxattr setxattr listxattr removexattr; do + syscalls="$syscalls,${n},f${n},l${n}" +done + +run_strace_match_diff -a22 -e trace=$syscalls diff --git a/tests-mx32/xchownx.c b/tests-mx32/xchownx.c new file mode 100644 index 000000000..fe5828351 --- /dev/null +++ b/tests-mx32/xchownx.c @@ -0,0 +1,152 @@ +/* + * Check decoding of chown/chown32/lchown/lchown32/fchown/fchown32 syscalls. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#ifdef UGID_TYPE_IS_SHORT +# define UGID_TYPE short +# define GETEUID syscall(__NR_geteuid) +# define GETEGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUID(arg) check_overflowuid(arg) +# define CHECK_OVERFLOWGID(arg) check_overflowgid(arg) +#else +# define UGID_TYPE int +# define GETEUID geteuid() +# define GETEGID getegid() +# define CHECK_OVERFLOWUID(arg) +# define CHECK_OVERFLOWGID(arg) +#endif + +#define UNLINK_SAMPLE \ + if (unlink(sample)) perror_msg_and_fail("unlink") +#define CLOSE_SAMPLE \ + if (close(fd)) perror_msg_and_fail("close") + +#ifdef ACCESS_BY_DESCRIPTOR +# define SYSCALL_ARG1 fd +# define FMT_ARG1 "%d" +# define EOK_CMD CLOSE_SAMPLE +# define CLEANUP_CMD UNLINK_SAMPLE +#else +# define SYSCALL_ARG1 sample +# define FMT_ARG1 "\"%s\"" +# define EOK_CMD UNLINK_SAMPLE +# define CLEANUP_CMD CLOSE_SAMPLE +#endif + +static int +ugid2int(const unsigned UGID_TYPE id) +{ + if ((unsigned UGID_TYPE) -1U == id) + return -1; + else + return id; +} + +static void +print_int(const unsigned int num) +{ + if (num == -1U) + printf(", -1"); + else + printf(", %u", num); +} + +static int +num_matches_id(const unsigned int num, const unsigned int id) +{ + return num == id || num == -1U; +} + +#define PAIR(val) { val, gid }, { uid, val } + +int +main(void) +{ + static const char sample[] = SYSCALL_NAME "_sample"; + + unsigned int uid = GETEUID; + CHECK_OVERFLOWUID(uid); + unsigned int gid = GETEGID; + CHECK_OVERFLOWUID(gid); + + const struct { + const long uid, gid; + } tests[] = { + { uid, gid }, + { (unsigned long) 0xffffffff00000000ULL | uid, gid }, + { uid, (unsigned long) 0xffffffff00000000ULL | gid }, + PAIR(-1U), + PAIR(-1L), + { 0xffff0000U | uid, gid }, + { uid, 0xffff0000U | gid }, + PAIR(0xffff), + PAIR(0xc0deffffU), + PAIR(0xfacefeedU), + PAIR((long) 0xfacefeeddeadbeefULL) + }; + + int fd = open(sample, O_RDONLY | O_CREAT, 0400); + if (fd < 0) + perror_msg_and_fail("open"); + + CLEANUP_CMD; + + unsigned int i; + long expected = 0; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + const unsigned int unum = ugid2int(tests[i].uid); + const unsigned int gnum = ugid2int(tests[i].gid); + + if (num_matches_id(unum, uid) && + num_matches_id(gnum, gid)) { + if (expected) + continue; + } else { + if (!expected) { + expected = -1; + EOK_CMD; + } + } + + const long rc = syscall(SYSCALL_NR, SYSCALL_ARG1, + tests[i].uid, tests[i].gid); + const char *errstr = sprintrc(rc); + printf("%s(" FMT_ARG1, SYSCALL_NAME, SYSCALL_ARG1); + print_int(unum); + print_int(gnum); + printf(") = %s\n", errstr); + } + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/xet_robust_list.c b/tests-mx32/xet_robust_list.c new file mode 100644 index 000000000..211dec459 --- /dev/null +++ b/tests-mx32/xet_robust_list.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_get_robust_list && defined __NR_set_robust_list + +# include +# include + +static const char * +sprintaddr(void *addr) +{ + static char buf[sizeof(addr) * 2 + sizeof("0x")]; + + if (!addr) + return "NULL"; + else + snprintf(buf, sizeof(buf), "%p", addr); + + return buf; +} + +int +main(void) +{ + const pid_t pid = getpid(); + const long long_pid = (unsigned long) (0xdeadbeef00000000LL | pid); + void **p_head = tail_alloc(sizeof(void *)); + size_t *p_len = tail_alloc(sizeof(size_t)); + + if (syscall(__NR_get_robust_list, long_pid, p_head, p_len)) + perror_msg_and_skip("get_robust_list"); + printf("get_robust_list(%d, [%s], [%lu]) = 0\n", + (int) pid, sprintaddr(*p_head), (unsigned long) *p_len); + + void *head = tail_alloc(*p_len); + if (syscall(__NR_set_robust_list, head, *p_len)) + perror_msg_and_skip("set_robust_list"); + printf("set_robust_list(%p, %lu) = 0\n", + head, (unsigned long) *p_len); + + if (syscall(__NR_get_robust_list, long_pid, p_head, p_len)) + perror_msg_and_skip("get_robust_list"); + printf("get_robust_list(%d, [%s], [%lu]) = 0\n", + (int) pid, sprintaddr(*p_head), (unsigned long) *p_len); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_get_robust_list && __NR_set_robust_list") + +#endif diff --git a/tests-mx32/xet_robust_list.test b/tests-mx32/xet_robust_list.test new file mode 100755 index 000000000..8a3a3820b --- /dev/null +++ b/tests-mx32/xet_robust_list.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check get_robust_list and set_robust_list syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a24 -e trace=get_robust_list,set_robust_list diff --git a/tests-mx32/xetitimer.c b/tests-mx32/xetitimer.c new file mode 100644 index 000000000..4b17edd3a --- /dev/null +++ b/tests-mx32/xetitimer.c @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + struct { + struct itimerval itv; + uint32_t pad[4]; + } old = { + .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } + }, new = { + .itv = { + .it_interval = { 0xc0de1, 0xc0de2 }, + .it_value = { 0xc0de3, 0xc0de4 } + }, + .pad = { 0xdeadbeef, 0xbadc0ded, 0xdeadbeef, 0xbadc0ded } + }; + + if (setitimer(ITIMER_REAL, &new.itv, &old.itv)) + perror_msg_and_skip("setitimer"); + printf("setitimer(ITIMER_REAL" + ", {it_interval={tv_sec=%jd, tv_usec=%jd}, " + "it_value={tv_sec=%jd, tv_usec=%jd}}" + ", {it_interval={tv_sec=%jd, tv_usec=%jd}, " + "it_value={tv_sec=%jd, tv_usec=%jd}}) = 0\n", + (intmax_t) new.itv.it_interval.tv_sec, + (intmax_t) new.itv.it_interval.tv_usec, + (intmax_t) new.itv.it_value.tv_sec, + (intmax_t) new.itv.it_value.tv_usec, + (intmax_t) old.itv.it_interval.tv_sec, + (intmax_t) old.itv.it_interval.tv_usec, + (intmax_t) old.itv.it_value.tv_sec, + (intmax_t) old.itv.it_value.tv_usec); + + if (getitimer(ITIMER_REAL, &old.itv)) + perror_msg_and_skip("getitimer"); + printf("getitimer(ITIMER_REAL" + ", {it_interval={tv_sec=%jd, tv_usec=%jd}, " + "it_value={tv_sec=%jd, tv_usec=%jd}}) = 0\n", + (intmax_t) old.itv.it_interval.tv_sec, + (intmax_t) old.itv.it_interval.tv_usec, + (intmax_t) old.itv.it_value.tv_sec, + (intmax_t) old.itv.it_value.tv_usec); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/xetitimer.test b/tests-mx32/xetitimer.test new file mode 100755 index 000000000..4aa00ccee --- /dev/null +++ b/tests-mx32/xetitimer.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check setitimer and getitimer syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=setitimer,getitimer diff --git a/tests-mx32/xetpgid.c b/tests-mx32/xetpgid.c new file mode 100644 index 000000000..24e0d7f0b --- /dev/null +++ b/tests-mx32/xetpgid.c @@ -0,0 +1,59 @@ +/* + * This file is part of xetpgid strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_getpgid && defined __NR_setpgid + +# include +# include + +int +main(void) +{ + const int pid = getpid(); + long rc = syscall(__NR_getpgid, + (unsigned long) 0xffffffff00000000ULL | pid); + printf("getpgid(%d) = %ld\n", pid, rc); + + rc = syscall(__NR_setpgid, + (unsigned long) 0xffffffff00000000ULL, + (unsigned long) 0xffffffff00000000ULL | pid); + printf("setpgid(0, %d) = %ld\n", pid, rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpgid && __NR_setpgid") + +#endif diff --git a/tests-mx32/xetpgid.test b/tests-mx32/xetpgid.test new file mode 100755 index 000000000..07f4f9e80 --- /dev/null +++ b/tests-mx32/xetpgid.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpgid and setpgid syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 -e trace=getpgid,setpgid diff --git a/tests-mx32/xetpriority.c b/tests-mx32/xetpriority.c new file mode 100644 index 000000000..ed5525988 --- /dev/null +++ b/tests-mx32/xetpriority.c @@ -0,0 +1,31 @@ +#include "tests.h" +#include + +#if defined __NR_getpriority && defined __NR_setpriority + +# include +# include +# include + +int +main(void) +{ + const int pid = getpid(); + long rc = syscall(__NR_getpriority, PRIO_PROCESS, + (unsigned long) 0xffffffff00000000ULL | pid); + printf("getpriority(PRIO_PROCESS, %d) = %ld\n", pid, rc); + + rc = syscall(__NR_setpriority, PRIO_PROCESS, + (unsigned long) 0xffffffff00000000ULL | pid, + (unsigned long) 0xffffffff00000000ULL); + printf("setpriority(PRIO_PROCESS, %d, 0) = %s\n", pid, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_getpriority && _NR_setpriority") + +#endif diff --git a/tests-mx32/xetpriority.test b/tests-mx32/xetpriority.test new file mode 100755 index 000000000..2c84ba418 --- /dev/null +++ b/tests-mx32/xetpriority.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check getpriority and setpriority syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a29 -e trace=getpriority,setpriority diff --git a/tests-mx32/xettimeofday.c b/tests-mx32/xettimeofday.c new file mode 100644 index 000000000..d36c57b4b --- /dev/null +++ b/tests-mx32/xettimeofday.c @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include + +int +main(void) +{ + struct { + struct timeval tv; + uint32_t pad0[2]; + struct timezone tz; + uint32_t pad1[2]; + } t = { + .pad0 = { 0xdeadbeef, 0xbadc0ded }, + .pad1 = { 0xdeadbeef, 0xbadc0ded } + }; + + if (syscall(__NR_gettimeofday, &t.tv, NULL)) + perror_msg_and_skip("gettimeofday"); + printf("gettimeofday({tv_sec=%jd, tv_usec=%jd}, NULL) = 0\n", + (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec); + + if (syscall(__NR_gettimeofday, &t.tv, &t.tz)) + perror_msg_and_skip("gettimeofday"); + printf("gettimeofday({tv_sec=%jd, tv_usec=%jd}" + ", {tz_minuteswest=%d, tz_dsttime=%d}) = 0\n", + (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, + t.tz.tz_minuteswest, t.tz.tz_dsttime); + + t.tv.tv_sec = -1; + t.tv.tv_usec = 1000000000; + assert(syscall(__NR_settimeofday, &t.tv, &t.tz) == -1); + printf("settimeofday({tv_sec=%jd, tv_usec=%jd}" + ", {tz_minuteswest=%d, tz_dsttime=%d})" + " = -1 EINVAL (%m)\n", + (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, + t.tz.tz_minuteswest, t.tz.tz_dsttime); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/xettimeofday.test b/tests-mx32/xettimeofday.test new file mode 100755 index 000000000..68764e468 --- /dev/null +++ b/tests-mx32/xettimeofday.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check gettimeofday and settimeofday syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a20 -e trace=gettimeofday,settimeofday diff --git a/tests-mx32/xgetrlimit.c b/tests-mx32/xgetrlimit.c new file mode 100644 index 000000000..78d9cb997 --- /dev/null +++ b/tests-mx32/xgetrlimit.c @@ -0,0 +1,91 @@ +/* + * Check decoding of getrlimit/ugetrlimit syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include + +#include "xlat.h" +#include "xlat/resources.h" + +const char * +sprint_rlim(kernel_ulong_t lim) +{ + if (sizeof(lim) == sizeof(uint64_t)) { + if (lim == (kernel_ulong_t) -1ULL) + return "RLIM64_INFINITY"; + } else { + if (lim == (kernel_ulong_t) -1U) + return "RLIM_INFINITY"; + } + + static char buf[2][sizeof(lim)*3 + sizeof("*1024")]; + static int i; + i &= 1; + if (lim > 1024 && lim % 1024 == 0) + sprintf(buf[i], "%llu*1024", (unsigned long long) lim / 1024); + else + sprintf(buf[i], "%llu", (unsigned long long) lim); + + return buf[i++]; +} + +#ifdef NR_GETRLIMIT + +int +main(void) +{ + kernel_ulong_t *const rlimit = tail_alloc(sizeof(*rlimit) * 2); + const struct xlat *xlat; + + for (xlat = resources; xlat->str; ++xlat) { + unsigned long res = 0xfacefeed00000000ULL | xlat->val; + long rc = syscall(NR_GETRLIMIT, res, 0); + if (rc && ENOSYS == errno) + perror_msg_and_skip(STR_GETRLIMIT); + printf("%s(%s, NULL) = %ld %s (%m)\n", + STR_GETRLIMIT, xlat->str, rc, errno2name()); + + rc = syscall(NR_GETRLIMIT, res, rlimit); + if (rc) + printf("%s(%s, NULL) = %ld %s (%m)\n", + STR_GETRLIMIT, xlat->str, rc, errno2name()); + else + printf("%s(%s, {rlim_cur=%s, rlim_max=%s})" + " = 0\n", STR_GETRLIMIT, xlat->str, + sprint_rlim(rlimit[0]), sprint_rlim(rlimit[1])); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#endif /* NR_GETRLIMIT */ diff --git a/tests-mx32/xselect.c b/tests-mx32/xselect.c new file mode 100644 index 000000000..39e87ac79 --- /dev/null +++ b/tests-mx32/xselect.c @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Based on test by Dr. David Alan Gilbert + */ + +#include +#include +#include +#include + +static fd_set set[0x1000000 / sizeof(fd_set)]; + +int main(void) +{ + int fds[2]; + struct { + struct timeval tv; + int pad[2]; + } tm_in = { + .tv = { .tv_sec = 0xc0de1, .tv_usec = 0xc0de2 }, + .pad = { 0xdeadbeef, 0xbadc0ded } + }, tm = tm_in; + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + /* + * Start with a nice simple select. + */ + FD_ZERO(set); + FD_SET(fds[0], set); + FD_SET(fds[1], set); + int rc = syscall(TEST_SYSCALL_NR, fds[1] + 1, set, set, set, NULL); + if (rc < 0) + perror_msg_and_skip(TEST_SYSCALL_STR); + assert(rc == 1); + printf("%s(%d, [%d %d], [%d %d], [%d %d], NULL) = 1 ()\n", + TEST_SYSCALL_STR, fds[1] + 1, fds[0], fds[1], + fds[0], fds[1], fds[0], fds[1]); + + /* + * Another simple one, with a timeout. + */ + FD_SET(1, set); + FD_SET(2, set); + FD_SET(fds[0], set); + FD_SET(fds[1], set); + assert(syscall(TEST_SYSCALL_NR, fds[1] + 1, NULL, set, NULL, &tm.tv) == 3); + printf("%s(%d, NULL, [1 2 %d %d], NULL, {tv_sec=%lld, tv_usec=%lld})" + " = 3 (out [1 2 %d], left {tv_sec=%lld, tv_usec=%lld})\n", + TEST_SYSCALL_STR, fds[1] + 1, fds[0], fds[1], + (long long) tm_in.tv.tv_sec, (long long) tm_in.tv.tv_usec, + fds[1], + (long long) tm.tv.tv_sec, (long long) tm.tv.tv_usec); + + /* + * Now the crash case that trinity found, negative nfds + * but with a pointer to a large chunk of valid memory. + */ + FD_ZERO(set); + FD_SET(fds[1],set); + assert(syscall(TEST_SYSCALL_NR, -1, NULL, set, NULL, NULL) == -1); + printf("%s(-1, NULL, %p, NULL, NULL) = -1 EINVAL (%m)\n", + TEST_SYSCALL_STR, set); + + /* + * Another variant, with nfds exceeding FD_SETSIZE limit. + */ + FD_ZERO(set); + FD_SET(fds[0],set); + tm.tv.tv_sec = 0; + tm.tv.tv_usec = 123; + assert(syscall(TEST_SYSCALL_NR, FD_SETSIZE + 1, set, set + 1, NULL, &tm.tv) == 0); + printf("%s(%d, [%d], [], NULL, {tv_sec=0, tv_usec=123}) = 0 (Timeout)\n", + TEST_SYSCALL_STR, FD_SETSIZE + 1, fds[0]); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/xstatfs.c b/tests-mx32/xstatfs.c new file mode 100644 index 000000000..26c43dee7 --- /dev/null +++ b/tests-mx32/xstatfs.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define SYSCALL_INVOKE(file, desc, ptr, size) \ + syscall(SYSCALL_NR, SYSCALL_ARG(file, desc), ptr) +#define PRINT_SYSCALL_HEADER(file, desc, size) \ + printf("%s(" SYSCALL_ARG_FMT ", ", SYSCALL_NAME, SYSCALL_ARG(file, desc)) + +#define STRUCT_STATFS struct statfs +#ifdef HAVE_STRUCT_STATFS_F_FRSIZE +# define PRINT_F_FRSIZE +#endif +#ifdef HAVE_STRUCT_STATFS_F_FLAGS +# define PRINT_F_FLAGS +#endif +#if defined HAVE_STRUCT_STATFS_F_FSID_VAL +# define PRINT_F_FSID f_fsid.val +#elif defined HAVE_STRUCT_STATFS_F_FSID___VAL +# define PRINT_F_FSID f_fsid.__val +#endif + +#include "xstatfsx.c" diff --git a/tests-mx32/xstatfs64.c b/tests-mx32/xstatfs64.c new file mode 100644 index 000000000..8f50de299 --- /dev/null +++ b/tests-mx32/xstatfs64.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define SYSCALL_INVOKE(file, desc, ptr, size) \ + syscall(SYSCALL_NR, SYSCALL_ARG(file, desc), size, ptr) +#define PRINT_SYSCALL_HEADER(file, desc, size) \ + printf("%s(" SYSCALL_ARG_FMT ", %u, ", SYSCALL_NAME, \ + SYSCALL_ARG(file, desc), (unsigned) size) + +#define STRUCT_STATFS struct statfs64 +#ifdef HAVE_STRUCT_STATFS64_F_FRSIZE +# define PRINT_F_FRSIZE +#endif +#ifdef HAVE_STRUCT_STATFS64_F_FLAGS +# define PRINT_F_FLAGS +#endif +#if defined HAVE_STRUCT_STATFS64_F_FSID_VAL +# define PRINT_F_FSID f_fsid.val +#elif defined HAVE_STRUCT_STATFS64_F_FSID___VAL +# define PRINT_F_FSID f_fsid.__val +#endif +#define CHECK_ODD_SIZE + +#include "xstatfsx.c" diff --git a/tests-mx32/xstatfsx.c b/tests-mx32/xstatfsx.c new file mode 100644 index 000000000..d8288f1ff --- /dev/null +++ b/tests-mx32/xstatfsx.c @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#include +#include + +#include "xlat.h" +#include "xlat/fsmagic.h" +#include "xlat/statfs_flags.h" + +#define PRINT_NUM(arg) \ + if (sizeof(b->arg) == sizeof(int)) \ + printf(", %s=%u", #arg, (unsigned int) b->arg); \ + else if (sizeof(b->arg) == sizeof(long)) \ + printf(", %s=%lu", #arg, (unsigned long) b->arg); \ + else \ + printf(", %s=%llu", #arg, (unsigned long long) b->arg) + +static void +print_statfs_type(const char *const prefix, const unsigned int magic) +{ + fputs(prefix, stdout); + unsigned int i; + for (i = 0; i < ARRAY_SIZE(fsmagic); ++i) + if (magic == fsmagic[i].val) { + fputs(fsmagic[i].str, stdout); + return; + } + printf("%#x", magic); +} + +static void +print_statfs(const char *const sample, const char *magic_str) +{ + int fd = open(sample, O_RDONLY); + if (fd < 0) + perror_msg_and_fail("open: %s", sample); + + STRUCT_STATFS *const b = tail_alloc(sizeof(*b)); + long rc = SYSCALL_INVOKE(sample, fd, b, sizeof(*b)); + if (rc) + perror_msg_and_skip(SYSCALL_NAME); + + PRINT_SYSCALL_HEADER(sample, fd, sizeof(*b)); + if (magic_str) + printf("{f_type=%s", magic_str); + else + print_statfs_type("{f_type=", b->f_type); + PRINT_NUM(f_bsize); + PRINT_NUM(f_blocks); + PRINT_NUM(f_bfree); + PRINT_NUM(f_bavail); + PRINT_NUM(f_files); + PRINT_NUM(f_ffree); +#ifdef PRINT_F_FSID + printf(", f_fsid={val=[%u, %u]}", + (unsigned) b->PRINT_F_FSID[0], (unsigned) b->PRINT_F_FSID[1]); +#endif + PRINT_NUM(f_namelen); +#ifdef PRINT_F_FRSIZE + PRINT_NUM(f_frsize); +#endif +#ifdef PRINT_F_FLAGS + if (b->f_flags & ST_VALID) { + printf(", f_flags="); + printflags(statfs_flags, b->f_flags, "ST_???"); + } +#endif + printf("}) = 0\n"); +} + +int +main(void) +{ + print_statfs("/proc/self/status", "PROC_SUPER_MAGIC"); + + print_statfs(".", NULL); + + long rc = SYSCALL_INVOKE("", -1, 0, sizeof(STRUCT_STATFS)); + const char *errstr = sprintrc(rc); + PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS)); + printf("NULL) = %s\n", errstr); + +#ifdef CHECK_ODD_SIZE + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL; + rc = SYSCALL_INVOKE("", -1, addr, sizeof(STRUCT_STATFS) + 1); + errstr = sprintrc(rc); + PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS) + 1); + printf("%#lx) = %s\n", addr, errstr); +#endif + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests-mx32/xstatx.c b/tests-mx32/xstatx.c new file mode 100644 index 000000000..0d5fca87b --- /dev/null +++ b/tests-mx32/xstatx.c @@ -0,0 +1,324 @@ +/* + * Copyright (c) 2015-2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#if defined HAVE_FTRUNCATE && defined HAVE_FUTIMENS + +# ifndef TEST_SYSCALL_STR +# error TEST_SYSCALL_STR must be defined +# endif +# ifndef TEST_SYSCALL_INVOKE +# error TEST_SYSCALL_INVOKE must be defined +# endif +# ifndef PRINT_SYSCALL_HEADER +# error PRINT_SYSCALL_HEADER must be defined +# endif +# ifndef PRINT_SYSCALL_FOOTER +# error PRINT_SYSCALL_FOOTER must be defined +# endif + +# include +# include +# include +# include +# include +# include + +static void +print_time(const time_t t) +{ + if (!t) { + printf("0"); + return; + } + + struct tm *p = localtime(&t); + + if (p) { + char buf[256]; + + strftime(buf, sizeof(buf), "%FT%T%z", p); + + printf("%s", buf); + } else { + printf("%llu", zero_extend_signed_to_ull(t)); + } +} + +# ifndef STRUCT_STAT +# define STRUCT_STAT struct stat +# define STRUCT_STAT_STR "struct stat" +# define STRUCT_STAT_IS_STAT64 0 +# endif +# ifndef SAMPLE_SIZE +# define SAMPLE_SIZE ((libc_off_t) 43147718418ULL) +# endif + +typedef off_t libc_off_t; + +# define stat libc_stat +# define stat64 libc_stat64 +# include +# include +# undef stat +# undef stat64 + +# undef st_atime +# undef st_mtime +# undef st_ctime +# include "asm_stat.h" + +# if STRUCT_STAT_IS_STAT64 +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# if defined MPERS_IS_m32 +# ifdef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# elif defined MPERS_IS_mx32 +# ifdef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# elif defined HAVE_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif /* MPERS_IS_m32 || MPERS_IS_mx32 || HAVE_STRUCT_STAT64_ST_MTIME_NSEC */ +# else /* !STRUCT_STAT_IS_STAT64 */ +# if defined MPERS_IS_m32 +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# ifdef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# elif defined MPERS_IS_mx32 +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# ifdef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# endif /* MPERS_IS_m32 || MPERS_IS_mx32 */ +# endif /* STRUCT_STAT_IS_STAT64 */ + +# ifndef TEST_BOGUS_STRUCT_STAT +# define TEST_BOGUS_STRUCT_STAT 1 +# endif + +# ifndef IS_FSTAT +# define IS_FSTAT 0 +# endif + +# ifndef OLD_STAT +# define OLD_STAT 0 +# endif + +static void +print_ftype(const unsigned int mode) +{ + if (S_ISREG(mode)) + printf("S_IFREG"); + else if (S_ISDIR(mode)) + printf("S_IFDIR"); + else if (S_ISCHR(mode)) + printf("S_IFCHR"); + else if (S_ISBLK(mode)) + printf("S_IFBLK"); + else + printf("%#o", mode & S_IFMT); +} + +static void +print_perms(const unsigned int mode) +{ + printf("%#o", mode & ~S_IFMT); +} + +static void +print_stat(const STRUCT_STAT *st) +{ + printf("{st_dev=makedev(%u, %u)", + (unsigned int) major(zero_extend_signed_to_ull(st->st_dev)), + (unsigned int) minor(zero_extend_signed_to_ull(st->st_dev))); + printf(", st_ino=%llu", zero_extend_signed_to_ull(st->st_ino)); + printf(", st_mode="); + print_ftype(st->st_mode); + printf("|"); + print_perms(st->st_mode); + printf(", st_nlink=%llu", zero_extend_signed_to_ull(st->st_nlink)); + printf(", st_uid=%llu", zero_extend_signed_to_ull(st->st_uid)); + printf(", st_gid=%llu", zero_extend_signed_to_ull(st->st_gid)); +# if OLD_STAT + printf(", st_blksize=0, st_blocks=0"); +# else /* !OLD_STAT */ + printf(", st_blksize=%llu", zero_extend_signed_to_ull(st->st_blksize)); + printf(", st_blocks=%llu", zero_extend_signed_to_ull(st->st_blocks)); +# endif /* OLD_STAT */ + + switch (st->st_mode & S_IFMT) { + case S_IFCHR: case S_IFBLK: + printf(", st_rdev=makedev(%u, %u)", + (unsigned int) major(zero_extend_signed_to_ull(st->st_rdev)), + (unsigned int) minor(zero_extend_signed_to_ull(st->st_rdev))); + break; + default: + printf(", st_size=%llu", zero_extend_signed_to_ull(st->st_size)); + } + + printf(", st_atime="); + print_time(sign_extend_unsigned_to_ll(st->st_atime)); +# if defined(HAVE_STRUCT_STAT_ST_MTIME_NSEC) && !OLD_STAT + if (st->st_atime_nsec) + printf(".%09llu", zero_extend_signed_to_ull(st->st_atime_nsec)); +# endif + printf(", st_mtime="); + print_time(sign_extend_unsigned_to_ll(st->st_mtime)); +# if defined(HAVE_STRUCT_STAT_ST_MTIME_NSEC) && !OLD_STAT + if (st->st_mtime_nsec) + printf(".%09llu", zero_extend_signed_to_ull(st->st_mtime_nsec)); +# endif + printf(", st_ctime="); + print_time(sign_extend_unsigned_to_ll(st->st_ctime)); +# if defined(HAVE_STRUCT_STAT_ST_MTIME_NSEC) && !OLD_STAT + if (st->st_ctime_nsec) + printf(".%09llu", zero_extend_signed_to_ull(st->st_ctime_nsec)); +# endif + printf("}"); +} + +static int +create_sample(const char *fname, const libc_off_t size) +{ + static const struct timespec ts[] = { + {-10843, 135}, {-10841, 246} + }; + + (void) close(0); + if (open(fname, O_RDWR | O_CREAT | O_TRUNC, 0640)) { + perror(fname); + return 77; + } + if (ftruncate(0, size)) { + perror("ftruncate"); + return 77; + } + if (futimens(0, ts)) { + perror("futimens"); + return 77; + } + return 0; +} + +int +main(void) +{ +# if !IS_FSTAT + static const char full[] = "/dev/full"; +# endif + static const char sample[] = TEST_SYSCALL_STR ".sample"; + STRUCT_STAT st[2]; + + int rc; + + rc = create_sample(sample, SAMPLE_SIZE); + if (rc) { + (void) unlink(sample); + return rc; + } + +# if TEST_BOGUS_STRUCT_STAT + STRUCT_STAT *st_cut = tail_alloc(sizeof(long) * 4); + rc = TEST_SYSCALL_INVOKE(sample, st_cut); + PRINT_SYSCALL_HEADER(sample); + printf("%p", st_cut); + PRINT_SYSCALL_FOOTER(rc); +# endif + +# if !IS_FSTAT + rc = TEST_SYSCALL_INVOKE(full, st); + PRINT_SYSCALL_HEADER(full); + if (rc) + printf("%p", st); + else + print_stat(st); + PRINT_SYSCALL_FOOTER(rc); +# endif + + if ((rc = TEST_SYSCALL_INVOKE(sample, st))) { +# if OLD_STAT + if (errno != EOVERFLOW) +# endif + { + perror(TEST_SYSCALL_STR); + (void) unlink(sample); + return 77; + } + } + (void) unlink(sample); + if (!rc && zero_extend_signed_to_ull(SAMPLE_SIZE) != + zero_extend_signed_to_ull(st[0].st_size)) { + fprintf(stderr, "Size mismatch: " + "requested size(%llu) != st_size(%llu)\n", + zero_extend_signed_to_ull(SAMPLE_SIZE), + zero_extend_signed_to_ull(st[0].st_size)); + fprintf(stderr, "The most likely reason for this is incorrect" + " definition of %s.\n" + "Here is some diagnostics that might help:\n", + STRUCT_STAT_STR); + +#define LOG_STAT_OFFSETOF_SIZEOF(object, member) \ + fprintf(stderr, "offsetof(%s, %s) = %zu" \ + ", sizeof(%s) = %zu\n", \ + STRUCT_STAT_STR, #member, \ + offsetof(STRUCT_STAT, member), \ + #member, sizeof((object).member)) + + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_dev); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_ino); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_mode); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_nlink); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_uid); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_gid); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_rdev); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_size); +# if !OLD_STAT + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_blksize); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_blocks); +# endif /* !OLD_STAT */ + + return 1; + } + + PRINT_SYSCALL_HEADER(sample); + if (rc) + printf("%p", st); + else + print_stat(st); + PRINT_SYSCALL_FOOTER(rc); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_FTRUNCATE && HAVE_FUTIMENS") + +#endif diff --git a/tests/.gitignore b/tests/.gitignore deleted file mode 100644 index 5b33416e1..000000000 --- a/tests/.gitignore +++ /dev/null @@ -1,323 +0,0 @@ -*.log -*.log.* -*.o -*.tmp -*.tmp-* -*.tmp.* -*.trs -_newselect -accept -accept4 -access -acct -addkey -adjtimex -aio -alarm -attach-f-p -attach-p-cmd-cmd -attach-p-cmd-p -bpf -brk -btrfs -caps -chmod -chown -chown32 -chroot -clock_adjtime -clock_nanosleep -clock_xettime -copy_file_range -count-f -creat -dup -dup2 -dup3 -epoll_create -epoll_create1 -epoll_ctl -epoll_pwait -epoll_wait -eventfd -execve -execve-v -execveat -execveat-v -faccessat -fadvise64 -fadvise64_64 -fallocate -fanotify_mark -fchdir -fchmod -fchmodat -fchown -fchown32 -fchownat -fcntl -fcntl64 -fdatasync -file_handle -file_ioctl -filter-unavailable -flock -fork-f -fstat -fstat64 -fstatat64 -fstatfs -fstatfs64 -fsync -ftruncate -ftruncate64 -futex -futimesat -get_mempolicy -getcpu -getcwd -getdents -getdents64 -getegid -getegid32 -geteuid -geteuid32 -getgid -getgid32 -getgroups -getgroups32 -getpeername -getpgrp -getrandom -getresgid -getresgid32 -getresuid -getresuid32 -getrlimit -getrusage -getsid -getsockname -getuid -getuid32 -getxxid -inet-cmsg -ioctl -ioctl_block -ioctl_evdev -ioctl_evdev-v -ioctl_mtd -ioctl_rtc -ioctl_rtc-v -ioctl_uffdio -ioctl_v4l2 -ioperm -iopl -ip_mreq -ipc -ipc_msg -ipc_msgbuf -ipc_sem -ipc_shm -keyctl -kill -ksysent -ksysent.h -lchown -lchown32 -libtests.a -link -linkat -llseek -lseek -lstat -lstat64 -mbind -membarrier -memfd_create -migrate_pages -mincore -mkdir -mkdirat -mknod -mknodat -mlock -mlock2 -mlockall -mmap -mmap64 -mmsg -mmsg-silent -mmsg_name -mmsg_name-v -mount -move_pages -mq -msg_control -msg_control-v -msg_name -munlockall -nanosleep -net-accept-connect -net-icmp_filter -net-sockaddr -net-y-unix -net-yy-inet -net-yy-netlink -net-yy-unix -netlink_inet_diag -netlink_netlink_diag -netlink_protocol -netlink_unix_diag -newfstatat -nsyscalls -old_mmap -oldselect -open -openat -pause -pc -perf_event_open -personality -pipe -poll -ppoll -prctl-seccomp-filter-v -prctl-seccomp-strict -pread64-pwrite64 -preadv -preadv-pwritev -preadv2-pwritev2 -prlimit64 -pselect6 -ptrace -pwritev -quotactl -quotactl-v -quotactl-xfs -quotactl-xfs-v -read-write -readahead -readdir -readlink -readlinkat -readv -reboot -recvfrom -recvmmsg-timeout -recvmsg -redirect-fds -remap_file_pages -rename -renameat -renameat2 -request_key -restart_syscall -rmdir -rt_sigpending -rt_sigprocmask -rt_sigqueueinfo -rt_sigsuspend -rt_sigtimedwait -rt_tgsigqueueinfo -sched_get_priority_mxx -sched_rr_get_interval -sched_xetaffinity -sched_xetattr -sched_xetparam -sched_xetscheduler -sched_yield -scm_rights -seccomp-filter -seccomp-filter-v -seccomp-strict -select -semop -sendfile -sendfile64 -set_mempolicy -set_ptracer_any -setdomainname -setfsgid -setfsgid32 -setfsuid -setfsuid32 -setgid -setgid32 -setgroups -setgroups32 -sethostname -setregid -setregid32 -setresgid -setresgid32 -setresuid -setresuid32 -setreuid -setreuid32 -setrlimit -setuid -setuid32 -shmxt -shutdown -sigaction -sigaltstack -siginfo -signal_receive -signalfd4 -sigreturn -sleep -socketcall -splice -stack-fcall -stat -stat64 -statfs -statfs64 -swap -symlink -symlinkat -sync -sync_file_range -sync_file_range2 -sysinfo -syslog -tee -time -timer_create -timer_xettime -timerfd_xettime -times -times-fail -truncate -truncate64 -ugetrlimit -uio -umask -umount -umount2 -umovestr -umovestr2 -umovestr3 -uname -unix-pair-send-recv -unix-pair-sendto-recvfrom -unlink -unlinkat -userfaultfd -utime -utimensat -utimes -vfork-f -vhangup -vmsplice -wait4 -wait4-v -waitid -waitid-v -waitpid -xattr -xet_robust_list -xetitimer -xetpgid -xetpriority -xettimeofday diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 000000000..53b7a6c58 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,5800 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# tests/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# Automake input for strace tests. +# +# Copyright (c) 2011-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# scno.h make rules for strace. +# +# Copyright (c) 2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/strace +pkgincludedir = $(includedir)/strace +pkglibdir = $(libdir)/strace +pkglibexecdir = $(libexecdir)/strace +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-pc-linux-gnu +host_triplet = x86_64-pc-linux-gnu +check_PROGRAMS = _newselect$(EXEEXT) accept$(EXEEXT) accept4$(EXEEXT) \ + access$(EXEEXT) acct$(EXEEXT) add_key$(EXEEXT) \ + adjtimex$(EXEEXT) aio$(EXEEXT) alarm$(EXEEXT) answer$(EXEEXT) \ + attach-f-p$(EXEEXT) attach-f-p-cmd$(EXEEXT) \ + attach-p-cmd-cmd$(EXEEXT) attach-p-cmd-p$(EXEEXT) bpf$(EXEEXT) \ + brk$(EXEEXT) btrfs$(EXEEXT) caps$(EXEEXT) caps-abbrev$(EXEEXT) \ + chmod$(EXEEXT) chown$(EXEEXT) chown32$(EXEEXT) chroot$(EXEEXT) \ + clock_adjtime$(EXEEXT) clock_nanosleep$(EXEEXT) \ + clock_xettime$(EXEEXT) copy_file_range$(EXEEXT) \ + count-f$(EXEEXT) creat$(EXEEXT) delete_module$(EXEEXT) \ + dup$(EXEEXT) dup2$(EXEEXT) dup3$(EXEEXT) epoll_create$(EXEEXT) \ + epoll_create1$(EXEEXT) epoll_ctl$(EXEEXT) epoll_pwait$(EXEEXT) \ + epoll_wait$(EXEEXT) erestartsys$(EXEEXT) eventfd$(EXEEXT) \ + execve$(EXEEXT) execve-v$(EXEEXT) execveat$(EXEEXT) \ + execveat-v$(EXEEXT) faccessat$(EXEEXT) fadvise64$(EXEEXT) \ + fadvise64_64$(EXEEXT) fallocate$(EXEEXT) \ + fanotify_init$(EXEEXT) fanotify_mark$(EXEEXT) fchdir$(EXEEXT) \ + fchmod$(EXEEXT) fchmodat$(EXEEXT) fchown$(EXEEXT) \ + fchown32$(EXEEXT) fchownat$(EXEEXT) fcntl$(EXEEXT) \ + fcntl64$(EXEEXT) fdatasync$(EXEEXT) file_handle$(EXEEXT) \ + file_ioctl$(EXEEXT) filter-unavailable$(EXEEXT) \ + finit_module$(EXEEXT) flock$(EXEEXT) fork-f$(EXEEXT) \ + fstat$(EXEEXT) fstat64$(EXEEXT) fstatat64$(EXEEXT) \ + fstatfs$(EXEEXT) fstatfs64$(EXEEXT) fsync$(EXEEXT) \ + ftruncate$(EXEEXT) ftruncate64$(EXEEXT) futex$(EXEEXT) \ + futimesat$(EXEEXT) get_mempolicy$(EXEEXT) getcpu$(EXEEXT) \ + getcwd$(EXEEXT) getdents$(EXEEXT) getdents64$(EXEEXT) \ + getegid$(EXEEXT) getegid32$(EXEEXT) geteuid$(EXEEXT) \ + geteuid32$(EXEEXT) getgid$(EXEEXT) getgid32$(EXEEXT) \ + getgroups$(EXEEXT) getgroups32$(EXEEXT) getpeername$(EXEEXT) \ + getpgrp$(EXEEXT) getrandom$(EXEEXT) getresgid$(EXEEXT) \ + getresgid32$(EXEEXT) getresuid$(EXEEXT) getresuid32$(EXEEXT) \ + getrlimit$(EXEEXT) getrusage$(EXEEXT) getsid$(EXEEXT) \ + getsockname$(EXEEXT) getuid$(EXEEXT) getuid32$(EXEEXT) \ + getxxid$(EXEEXT) inet-cmsg$(EXEEXT) init_module$(EXEEXT) \ + inotify$(EXEEXT) inotify_init1$(EXEEXT) ioctl$(EXEEXT) \ + ioctl_block$(EXEEXT) ioctl_dm$(EXEEXT) ioctl_dm-v$(EXEEXT) \ + ioctl_evdev$(EXEEXT) ioctl_evdev-v$(EXEEXT) \ + ioctl_loop$(EXEEXT) ioctl_loop-nv$(EXEEXT) \ + ioctl_loop-v$(EXEEXT) ioctl_mtd$(EXEEXT) ioctl_rtc$(EXEEXT) \ + ioctl_rtc-v$(EXEEXT) ioctl_scsi$(EXEEXT) \ + ioctl_sg_io_v3$(EXEEXT) ioctl_sg_io_v4$(EXEEXT) \ + ioctl_sock_gifconf$(EXEEXT) ioctl_uffdio$(EXEEXT) \ + ioctl_v4l2$(EXEEXT) ioperm$(EXEEXT) iopl$(EXEEXT) \ + ioprio$(EXEEXT) ip_mreq$(EXEEXT) ipc$(EXEEXT) ipc_msg$(EXEEXT) \ + ipc_msgbuf$(EXEEXT) ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) \ + kcmp$(EXEEXT) kexec_file_load$(EXEEXT) kexec_load$(EXEEXT) \ + keyctl$(EXEEXT) kill$(EXEEXT) ksysent$(EXEEXT) lchown$(EXEEXT) \ + lchown32$(EXEEXT) link$(EXEEXT) linkat$(EXEEXT) \ + llseek$(EXEEXT) lookup_dcookie$(EXEEXT) lseek$(EXEEXT) \ + lstat$(EXEEXT) lstat64$(EXEEXT) mbind$(EXEEXT) \ + membarrier$(EXEEXT) memfd_create$(EXEEXT) \ + migrate_pages$(EXEEXT) mincore$(EXEEXT) mkdir$(EXEEXT) \ + mkdirat$(EXEEXT) mknod$(EXEEXT) mknodat$(EXEEXT) \ + mlock$(EXEEXT) mlock2$(EXEEXT) mlockall$(EXEEXT) mmap$(EXEEXT) \ + mmap64$(EXEEXT) mmsg$(EXEEXT) mmsg-silent$(EXEEXT) \ + mmsg_name$(EXEEXT) mmsg_name-v$(EXEEXT) mount$(EXEEXT) \ + move_pages$(EXEEXT) mq$(EXEEXT) mq_sendrecv$(EXEEXT) \ + mq_sendrecv-read$(EXEEXT) mq_sendrecv-write$(EXEEXT) \ + msg_control$(EXEEXT) msg_control-v$(EXEEXT) msg_name$(EXEEXT) \ + munlockall$(EXEEXT) nanosleep$(EXEEXT) \ + net-accept-connect$(EXEEXT) net-icmp_filter$(EXEEXT) \ + net-sockaddr$(EXEEXT) net-y-unix$(EXEEXT) net-yy-inet$(EXEEXT) \ + net-yy-netlink$(EXEEXT) net-yy-unix$(EXEEXT) \ + netlink_inet_diag$(EXEEXT) netlink_netlink_diag$(EXEEXT) \ + netlink_protocol$(EXEEXT) netlink_unix_diag$(EXEEXT) \ + newfstatat$(EXEEXT) nsyscalls$(EXEEXT) old_mmap$(EXEEXT) \ + oldfstat$(EXEEXT) oldlstat$(EXEEXT) oldselect$(EXEEXT) \ + oldstat$(EXEEXT) open$(EXEEXT) openat$(EXEEXT) pause$(EXEEXT) \ + pc$(EXEEXT) perf_event_open$(EXEEXT) \ + perf_event_open_nonverbose$(EXEEXT) \ + perf_event_open_unabbrev$(EXEEXT) personality$(EXEEXT) \ + pipe$(EXEEXT) pipe2$(EXEEXT) pkey_alloc$(EXEEXT) \ + pkey_free$(EXEEXT) pkey_mprotect$(EXEEXT) poll$(EXEEXT) \ + ppoll$(EXEEXT) prctl-arg2-intptr$(EXEEXT) \ + prctl-dumpable$(EXEEXT) prctl-name$(EXEEXT) \ + prctl-no-args$(EXEEXT) prctl-pdeathsig$(EXEEXT) \ + prctl-seccomp-filter-v$(EXEEXT) prctl-seccomp-strict$(EXEEXT) \ + prctl-securebits$(EXEEXT) prctl-tid_address$(EXEEXT) \ + prctl-tsc$(EXEEXT) pread64-pwrite64$(EXEEXT) preadv$(EXEEXT) \ + preadv-pwritev$(EXEEXT) preadv2-pwritev2$(EXEEXT) \ + print_maxfd$(EXEEXT) printstr$(EXEEXT) prlimit64$(EXEEXT) \ + process_vm_readv$(EXEEXT) process_vm_writev$(EXEEXT) \ + pselect6$(EXEEXT) ptrace$(EXEEXT) pwritev$(EXEEXT) \ + qual_fault$(EXEEXT) qual_inject-error-signal$(EXEEXT) \ + qual_inject-retval$(EXEEXT) qual_inject-signal$(EXEEXT) \ + qual_signal$(EXEEXT) quotactl$(EXEEXT) quotactl-v$(EXEEXT) \ + quotactl-xfs$(EXEEXT) quotactl-xfs-v$(EXEEXT) \ + read-write$(EXEEXT) readahead$(EXEEXT) readdir$(EXEEXT) \ + readlink$(EXEEXT) readlinkat$(EXEEXT) readv$(EXEEXT) \ + reboot$(EXEEXT) recvfrom$(EXEEXT) recvmmsg-timeout$(EXEEXT) \ + recvmsg$(EXEEXT) redirect-fds$(EXEEXT) \ + remap_file_pages$(EXEEXT) rename$(EXEEXT) renameat$(EXEEXT) \ + renameat2$(EXEEXT) request_key$(EXEEXT) \ + restart_syscall$(EXEEXT) rmdir$(EXEEXT) rt_sigpending$(EXEEXT) \ + rt_sigprocmask$(EXEEXT) rt_sigqueueinfo$(EXEEXT) \ + rt_sigsuspend$(EXEEXT) rt_sigtimedwait$(EXEEXT) \ + rt_tgsigqueueinfo$(EXEEXT) sched_get_priority_mxx$(EXEEXT) \ + sched_rr_get_interval$(EXEEXT) sched_xetaffinity$(EXEEXT) \ + sched_xetattr$(EXEEXT) sched_xetparam$(EXEEXT) \ + sched_xetscheduler$(EXEEXT) sched_yield$(EXEEXT) \ + scm_rights$(EXEEXT) seccomp-filter$(EXEEXT) \ + seccomp-filter-v$(EXEEXT) seccomp-strict$(EXEEXT) \ + select$(EXEEXT) semop$(EXEEXT) sendfile$(EXEEXT) \ + sendfile64$(EXEEXT) set_mempolicy$(EXEEXT) \ + set_ptracer_any$(EXEEXT) setdomainname$(EXEEXT) \ + setfsgid$(EXEEXT) setfsgid32$(EXEEXT) setfsuid$(EXEEXT) \ + setfsuid32$(EXEEXT) setgid$(EXEEXT) setgid32$(EXEEXT) \ + setgroups$(EXEEXT) setgroups32$(EXEEXT) sethostname$(EXEEXT) \ + setns$(EXEEXT) setregid$(EXEEXT) setregid32$(EXEEXT) \ + setresgid$(EXEEXT) setresgid32$(EXEEXT) setresuid$(EXEEXT) \ + setresuid32$(EXEEXT) setreuid$(EXEEXT) setreuid32$(EXEEXT) \ + setrlimit$(EXEEXT) setuid$(EXEEXT) setuid32$(EXEEXT) \ + shmxt$(EXEEXT) shutdown$(EXEEXT) sigaction$(EXEEXT) \ + sigaltstack$(EXEEXT) siginfo$(EXEEXT) signal_receive$(EXEEXT) \ + signalfd4$(EXEEXT) sigreturn$(EXEEXT) sleep$(EXEEXT) \ + socketcall$(EXEEXT) splice$(EXEEXT) stack-fcall$(EXEEXT) \ + stat$(EXEEXT) stat64$(EXEEXT) statfs$(EXEEXT) \ + statfs64$(EXEEXT) swap$(EXEEXT) symlink$(EXEEXT) \ + symlinkat$(EXEEXT) sync$(EXEEXT) sync_file_range$(EXEEXT) \ + sync_file_range2$(EXEEXT) sysinfo$(EXEEXT) syslog$(EXEEXT) \ + tee$(EXEEXT) threads-execve$(EXEEXT) time$(EXEEXT) \ + timer_create$(EXEEXT) timer_xettime$(EXEEXT) \ + timerfd_xettime$(EXEEXT) times$(EXEEXT) times-fail$(EXEEXT) \ + truncate$(EXEEXT) truncate64$(EXEEXT) ugetrlimit$(EXEEXT) \ + uio$(EXEEXT) umask$(EXEEXT) umount$(EXEEXT) umount2$(EXEEXT) \ + umoven-illptr$(EXEEXT) umovestr$(EXEEXT) \ + umovestr-illptr$(EXEEXT) umovestr2$(EXEEXT) umovestr3$(EXEEXT) \ + uname$(EXEEXT) unix-pair-send-recv$(EXEEXT) \ + unix-pair-sendto-recvfrom$(EXEEXT) unlink$(EXEEXT) \ + unlinkat$(EXEEXT) unshare$(EXEEXT) userfaultfd$(EXEEXT) \ + ustat$(EXEEXT) utime$(EXEEXT) utimensat$(EXEEXT) \ + utimes$(EXEEXT) vfork-f$(EXEEXT) vhangup$(EXEEXT) \ + vmsplice$(EXEEXT) wait4$(EXEEXT) wait4-v$(EXEEXT) \ + waitid$(EXEEXT) waitid-v$(EXEEXT) waitpid$(EXEEXT) \ + xattr$(EXEEXT) xattr-strings$(EXEEXT) xet_robust_list$(EXEEXT) \ + xetitimer$(EXEEXT) xetpgid$(EXEEXT) xetpriority$(EXEEXT) \ + xettimeofday$(EXEEXT) +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(am__EXEEXT_1) +DIST_COMMON = $(srcdir)/../scno.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ + $(top_srcdir)/test-driver +subdir = tests +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/ax_valgrind_check.m4 \ + $(top_srcdir)/m4/mpers.m4 \ + $(top_srcdir)/m4/st_save_restore_var.m4 \ + $(top_srcdir)/m4/st_warn_cflags.m4 \ + $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AR = ar +ARFLAGS = cru +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libtests_a_AR = $(AR) $(ARFLAGS) +libtests_a_LIBADD = +am_libtests_a_OBJECTS = libtests_a-errno2name.$(OBJEXT) \ + libtests_a-error_msg.$(OBJEXT) \ + libtests_a-fill_memory.$(OBJEXT) \ + libtests_a-get_page_size.$(OBJEXT) \ + libtests_a-hexdump_strdup.$(OBJEXT) \ + libtests_a-hexquote_strndup.$(OBJEXT) \ + libtests_a-inode_of_sockfd.$(OBJEXT) \ + libtests_a-libmmsg.$(OBJEXT) \ + libtests_a-libsocketcall.$(OBJEXT) \ + libtests_a-overflowuid.$(OBJEXT) \ + libtests_a-pipe_maxfd.$(OBJEXT) \ + libtests_a-print_quoted_string.$(OBJEXT) \ + libtests_a-printflags.$(OBJEXT) libtests_a-printxval.$(OBJEXT) \ + libtests_a-signal2name.$(OBJEXT) libtests_a-sprintrc.$(OBJEXT) \ + libtests_a-tail_alloc.$(OBJEXT) libtests_a-tprintf.$(OBJEXT) +libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) +_newselect_SOURCES = _newselect.c +_newselect_OBJECTS = _newselect.$(OBJEXT) +_newselect_LDADD = $(LDADD) +_newselect_DEPENDENCIES = libtests.a +accept_SOURCES = accept.c +accept_OBJECTS = accept.$(OBJEXT) +accept_LDADD = $(LDADD) +accept_DEPENDENCIES = libtests.a +accept4_SOURCES = accept4.c +accept4_OBJECTS = accept4.$(OBJEXT) +accept4_LDADD = $(LDADD) +accept4_DEPENDENCIES = libtests.a +access_SOURCES = access.c +access_OBJECTS = access.$(OBJEXT) +access_LDADD = $(LDADD) +access_DEPENDENCIES = libtests.a +acct_SOURCES = acct.c +acct_OBJECTS = acct.$(OBJEXT) +acct_LDADD = $(LDADD) +acct_DEPENDENCIES = libtests.a +add_key_SOURCES = add_key.c +add_key_OBJECTS = add_key.$(OBJEXT) +add_key_LDADD = $(LDADD) +add_key_DEPENDENCIES = libtests.a +adjtimex_SOURCES = adjtimex.c +adjtimex_OBJECTS = adjtimex.$(OBJEXT) +adjtimex_LDADD = $(LDADD) +adjtimex_DEPENDENCIES = libtests.a +aio_SOURCES = aio.c +aio_OBJECTS = aio.$(OBJEXT) +aio_LDADD = $(LDADD) +aio_DEPENDENCIES = libtests.a +alarm_SOURCES = alarm.c +alarm_OBJECTS = alarm.$(OBJEXT) +alarm_LDADD = $(LDADD) +alarm_DEPENDENCIES = libtests.a +answer_SOURCES = answer.c +answer_OBJECTS = answer.$(OBJEXT) +answer_LDADD = $(LDADD) +answer_DEPENDENCIES = libtests.a +attach_f_p_SOURCES = attach-f-p.c +attach_f_p_OBJECTS = attach-f-p.$(OBJEXT) +attach_f_p_DEPENDENCIES = $(LDADD) +attach_f_p_cmd_SOURCES = attach-f-p-cmd.c +attach_f_p_cmd_OBJECTS = attach-f-p-cmd.$(OBJEXT) +attach_f_p_cmd_LDADD = $(LDADD) +attach_f_p_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_cmd_SOURCES = attach-p-cmd-cmd.c +attach_p_cmd_cmd_OBJECTS = attach-p-cmd-cmd.$(OBJEXT) +attach_p_cmd_cmd_LDADD = $(LDADD) +attach_p_cmd_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_p_SOURCES = attach-p-cmd-p.c +attach_p_cmd_p_OBJECTS = attach-p-cmd-p.$(OBJEXT) +attach_p_cmd_p_LDADD = $(LDADD) +attach_p_cmd_p_DEPENDENCIES = libtests.a +bpf_SOURCES = bpf.c +bpf_OBJECTS = bpf.$(OBJEXT) +bpf_LDADD = $(LDADD) +bpf_DEPENDENCIES = libtests.a +brk_SOURCES = brk.c +brk_OBJECTS = brk.$(OBJEXT) +brk_LDADD = $(LDADD) +brk_DEPENDENCIES = libtests.a +btrfs_SOURCES = btrfs.c +btrfs_OBJECTS = btrfs.$(OBJEXT) +btrfs_LDADD = $(LDADD) +btrfs_DEPENDENCIES = libtests.a +caps_SOURCES = caps.c +caps_OBJECTS = caps.$(OBJEXT) +caps_LDADD = $(LDADD) +caps_DEPENDENCIES = libtests.a +caps_abbrev_SOURCES = caps-abbrev.c +caps_abbrev_OBJECTS = caps-abbrev.$(OBJEXT) +caps_abbrev_LDADD = $(LDADD) +caps_abbrev_DEPENDENCIES = libtests.a +chmod_SOURCES = chmod.c +chmod_OBJECTS = chmod.$(OBJEXT) +chmod_LDADD = $(LDADD) +chmod_DEPENDENCIES = libtests.a +chown_SOURCES = chown.c +chown_OBJECTS = chown.$(OBJEXT) +chown_LDADD = $(LDADD) +chown_DEPENDENCIES = libtests.a +chown32_SOURCES = chown32.c +chown32_OBJECTS = chown32.$(OBJEXT) +chown32_LDADD = $(LDADD) +chown32_DEPENDENCIES = libtests.a +chroot_SOURCES = chroot.c +chroot_OBJECTS = chroot.$(OBJEXT) +chroot_LDADD = $(LDADD) +chroot_DEPENDENCIES = libtests.a +clock_adjtime_SOURCES = clock_adjtime.c +clock_adjtime_OBJECTS = clock_adjtime.$(OBJEXT) +clock_adjtime_LDADD = $(LDADD) +clock_adjtime_DEPENDENCIES = libtests.a +clock_nanosleep_SOURCES = clock_nanosleep.c +clock_nanosleep_OBJECTS = clock_nanosleep.$(OBJEXT) +clock_nanosleep_LDADD = $(LDADD) +clock_nanosleep_DEPENDENCIES = libtests.a +clock_xettime_SOURCES = clock_xettime.c +clock_xettime_OBJECTS = clock_xettime.$(OBJEXT) +clock_xettime_DEPENDENCIES = $(LDADD) +copy_file_range_SOURCES = copy_file_range.c +copy_file_range_OBJECTS = copy_file_range.$(OBJEXT) +copy_file_range_LDADD = $(LDADD) +copy_file_range_DEPENDENCIES = libtests.a +count_f_SOURCES = count-f.c +count_f_OBJECTS = count-f.$(OBJEXT) +count_f_DEPENDENCIES = $(LDADD) +creat_SOURCES = creat.c +creat_OBJECTS = creat.$(OBJEXT) +creat_LDADD = $(LDADD) +creat_DEPENDENCIES = libtests.a +delete_module_SOURCES = delete_module.c +delete_module_OBJECTS = delete_module.$(OBJEXT) +delete_module_LDADD = $(LDADD) +delete_module_DEPENDENCIES = libtests.a +dup_SOURCES = dup.c +dup_OBJECTS = dup.$(OBJEXT) +dup_LDADD = $(LDADD) +dup_DEPENDENCIES = libtests.a +dup2_SOURCES = dup2.c +dup2_OBJECTS = dup2.$(OBJEXT) +dup2_LDADD = $(LDADD) +dup2_DEPENDENCIES = libtests.a +dup3_SOURCES = dup3.c +dup3_OBJECTS = dup3.$(OBJEXT) +dup3_LDADD = $(LDADD) +dup3_DEPENDENCIES = libtests.a +epoll_create_SOURCES = epoll_create.c +epoll_create_OBJECTS = epoll_create.$(OBJEXT) +epoll_create_LDADD = $(LDADD) +epoll_create_DEPENDENCIES = libtests.a +epoll_create1_SOURCES = epoll_create1.c +epoll_create1_OBJECTS = epoll_create1.$(OBJEXT) +epoll_create1_LDADD = $(LDADD) +epoll_create1_DEPENDENCIES = libtests.a +epoll_ctl_SOURCES = epoll_ctl.c +epoll_ctl_OBJECTS = epoll_ctl.$(OBJEXT) +epoll_ctl_LDADD = $(LDADD) +epoll_ctl_DEPENDENCIES = libtests.a +epoll_pwait_SOURCES = epoll_pwait.c +epoll_pwait_OBJECTS = epoll_pwait.$(OBJEXT) +epoll_pwait_LDADD = $(LDADD) +epoll_pwait_DEPENDENCIES = libtests.a +epoll_wait_SOURCES = epoll_wait.c +epoll_wait_OBJECTS = epoll_wait.$(OBJEXT) +epoll_wait_LDADD = $(LDADD) +epoll_wait_DEPENDENCIES = libtests.a +erestartsys_SOURCES = erestartsys.c +erestartsys_OBJECTS = erestartsys.$(OBJEXT) +erestartsys_LDADD = $(LDADD) +erestartsys_DEPENDENCIES = libtests.a +eventfd_SOURCES = eventfd.c +eventfd_OBJECTS = eventfd.$(OBJEXT) +eventfd_LDADD = $(LDADD) +eventfd_DEPENDENCIES = libtests.a +execve_SOURCES = execve.c +execve_OBJECTS = execve.$(OBJEXT) +execve_LDADD = $(LDADD) +execve_DEPENDENCIES = libtests.a +execve_v_SOURCES = execve-v.c +execve_v_OBJECTS = execve-v.$(OBJEXT) +execve_v_LDADD = $(LDADD) +execve_v_DEPENDENCIES = libtests.a +execveat_SOURCES = execveat.c +execveat_OBJECTS = execveat.$(OBJEXT) +execveat_LDADD = $(LDADD) +execveat_DEPENDENCIES = libtests.a +execveat_v_SOURCES = execveat-v.c +execveat_v_OBJECTS = execveat-v.$(OBJEXT) +execveat_v_LDADD = $(LDADD) +execveat_v_DEPENDENCIES = libtests.a +faccessat_SOURCES = faccessat.c +faccessat_OBJECTS = faccessat.$(OBJEXT) +faccessat_LDADD = $(LDADD) +faccessat_DEPENDENCIES = libtests.a +fadvise64_SOURCES = fadvise64.c +fadvise64_OBJECTS = fadvise64.$(OBJEXT) +fadvise64_LDADD = $(LDADD) +fadvise64_DEPENDENCIES = libtests.a +fadvise64_64_SOURCES = fadvise64_64.c +fadvise64_64_OBJECTS = fadvise64_64.$(OBJEXT) +fadvise64_64_LDADD = $(LDADD) +fadvise64_64_DEPENDENCIES = libtests.a +fallocate_SOURCES = fallocate.c +fallocate_OBJECTS = fallocate.$(OBJEXT) +fallocate_LDADD = $(LDADD) +fallocate_DEPENDENCIES = libtests.a +fanotify_init_SOURCES = fanotify_init.c +fanotify_init_OBJECTS = fanotify_init.$(OBJEXT) +fanotify_init_LDADD = $(LDADD) +fanotify_init_DEPENDENCIES = libtests.a +fanotify_mark_SOURCES = fanotify_mark.c +fanotify_mark_OBJECTS = fanotify_mark.$(OBJEXT) +fanotify_mark_LDADD = $(LDADD) +fanotify_mark_DEPENDENCIES = libtests.a +fchdir_SOURCES = fchdir.c +fchdir_OBJECTS = fchdir.$(OBJEXT) +fchdir_LDADD = $(LDADD) +fchdir_DEPENDENCIES = libtests.a +fchmod_SOURCES = fchmod.c +fchmod_OBJECTS = fchmod.$(OBJEXT) +fchmod_LDADD = $(LDADD) +fchmod_DEPENDENCIES = libtests.a +fchmodat_SOURCES = fchmodat.c +fchmodat_OBJECTS = fchmodat.$(OBJEXT) +fchmodat_LDADD = $(LDADD) +fchmodat_DEPENDENCIES = libtests.a +fchown_SOURCES = fchown.c +fchown_OBJECTS = fchown.$(OBJEXT) +fchown_LDADD = $(LDADD) +fchown_DEPENDENCIES = libtests.a +fchown32_SOURCES = fchown32.c +fchown32_OBJECTS = fchown32.$(OBJEXT) +fchown32_LDADD = $(LDADD) +fchown32_DEPENDENCIES = libtests.a +fchownat_SOURCES = fchownat.c +fchownat_OBJECTS = fchownat.$(OBJEXT) +fchownat_LDADD = $(LDADD) +fchownat_DEPENDENCIES = libtests.a +fcntl_SOURCES = fcntl.c +fcntl_OBJECTS = fcntl.$(OBJEXT) +fcntl_LDADD = $(LDADD) +fcntl_DEPENDENCIES = libtests.a +fcntl64_SOURCES = fcntl64.c +fcntl64_OBJECTS = fcntl64.$(OBJEXT) +fcntl64_LDADD = $(LDADD) +fcntl64_DEPENDENCIES = libtests.a +fdatasync_SOURCES = fdatasync.c +fdatasync_OBJECTS = fdatasync.$(OBJEXT) +fdatasync_LDADD = $(LDADD) +fdatasync_DEPENDENCIES = libtests.a +file_handle_SOURCES = file_handle.c +file_handle_OBJECTS = file_handle.$(OBJEXT) +file_handle_LDADD = $(LDADD) +file_handle_DEPENDENCIES = libtests.a +file_ioctl_SOURCES = file_ioctl.c +file_ioctl_OBJECTS = file_ioctl.$(OBJEXT) +file_ioctl_LDADD = $(LDADD) +file_ioctl_DEPENDENCIES = libtests.a +filter_unavailable_SOURCES = filter-unavailable.c +filter_unavailable_OBJECTS = filter-unavailable.$(OBJEXT) +filter_unavailable_DEPENDENCIES = $(LDADD) +finit_module_SOURCES = finit_module.c +finit_module_OBJECTS = finit_module.$(OBJEXT) +finit_module_LDADD = $(LDADD) +finit_module_DEPENDENCIES = libtests.a +flock_SOURCES = flock.c +flock_OBJECTS = flock.$(OBJEXT) +flock_LDADD = $(LDADD) +flock_DEPENDENCIES = libtests.a +fork_f_SOURCES = fork-f.c +fork_f_OBJECTS = fork-f.$(OBJEXT) +fork_f_LDADD = $(LDADD) +fork_f_DEPENDENCIES = libtests.a +fstat_SOURCES = fstat.c +fstat_OBJECTS = fstat.$(OBJEXT) +fstat_LDADD = $(LDADD) +fstat_DEPENDENCIES = libtests.a +fstat64_SOURCES = fstat64.c +fstat64_OBJECTS = fstat64-fstat64.$(OBJEXT) +fstat64_LDADD = $(LDADD) +fstat64_DEPENDENCIES = libtests.a +fstatat64_SOURCES = fstatat64.c +fstatat64_OBJECTS = fstatat64-fstatat64.$(OBJEXT) +fstatat64_LDADD = $(LDADD) +fstatat64_DEPENDENCIES = libtests.a +fstatfs_SOURCES = fstatfs.c +fstatfs_OBJECTS = fstatfs.$(OBJEXT) +fstatfs_LDADD = $(LDADD) +fstatfs_DEPENDENCIES = libtests.a +fstatfs64_SOURCES = fstatfs64.c +fstatfs64_OBJECTS = fstatfs64.$(OBJEXT) +fstatfs64_LDADD = $(LDADD) +fstatfs64_DEPENDENCIES = libtests.a +fsync_SOURCES = fsync.c +fsync_OBJECTS = fsync.$(OBJEXT) +fsync_LDADD = $(LDADD) +fsync_DEPENDENCIES = libtests.a +ftruncate_SOURCES = ftruncate.c +ftruncate_OBJECTS = ftruncate.$(OBJEXT) +ftruncate_LDADD = $(LDADD) +ftruncate_DEPENDENCIES = libtests.a +ftruncate64_SOURCES = ftruncate64.c +ftruncate64_OBJECTS = ftruncate64-ftruncate64.$(OBJEXT) +ftruncate64_LDADD = $(LDADD) +ftruncate64_DEPENDENCIES = libtests.a +futex_SOURCES = futex.c +futex_OBJECTS = futex.$(OBJEXT) +futex_LDADD = $(LDADD) +futex_DEPENDENCIES = libtests.a +futimesat_SOURCES = futimesat.c +futimesat_OBJECTS = futimesat.$(OBJEXT) +futimesat_LDADD = $(LDADD) +futimesat_DEPENDENCIES = libtests.a +get_mempolicy_SOURCES = get_mempolicy.c +get_mempolicy_OBJECTS = get_mempolicy.$(OBJEXT) +get_mempolicy_LDADD = $(LDADD) +get_mempolicy_DEPENDENCIES = libtests.a +getcpu_SOURCES = getcpu.c +getcpu_OBJECTS = getcpu.$(OBJEXT) +getcpu_LDADD = $(LDADD) +getcpu_DEPENDENCIES = libtests.a +getcwd_SOURCES = getcwd.c +getcwd_OBJECTS = getcwd.$(OBJEXT) +getcwd_LDADD = $(LDADD) +getcwd_DEPENDENCIES = libtests.a +getdents_SOURCES = getdents.c +getdents_OBJECTS = getdents.$(OBJEXT) +getdents_LDADD = $(LDADD) +getdents_DEPENDENCIES = libtests.a +getdents64_SOURCES = getdents64.c +getdents64_OBJECTS = getdents64.$(OBJEXT) +getdents64_LDADD = $(LDADD) +getdents64_DEPENDENCIES = libtests.a +getegid_SOURCES = getegid.c +getegid_OBJECTS = getegid.$(OBJEXT) +getegid_LDADD = $(LDADD) +getegid_DEPENDENCIES = libtests.a +getegid32_SOURCES = getegid32.c +getegid32_OBJECTS = getegid32.$(OBJEXT) +getegid32_LDADD = $(LDADD) +getegid32_DEPENDENCIES = libtests.a +geteuid_SOURCES = geteuid.c +geteuid_OBJECTS = geteuid.$(OBJEXT) +geteuid_LDADD = $(LDADD) +geteuid_DEPENDENCIES = libtests.a +geteuid32_SOURCES = geteuid32.c +geteuid32_OBJECTS = geteuid32.$(OBJEXT) +geteuid32_LDADD = $(LDADD) +geteuid32_DEPENDENCIES = libtests.a +getgid_SOURCES = getgid.c +getgid_OBJECTS = getgid.$(OBJEXT) +getgid_LDADD = $(LDADD) +getgid_DEPENDENCIES = libtests.a +getgid32_SOURCES = getgid32.c +getgid32_OBJECTS = getgid32.$(OBJEXT) +getgid32_LDADD = $(LDADD) +getgid32_DEPENDENCIES = libtests.a +getgroups_SOURCES = getgroups.c +getgroups_OBJECTS = getgroups.$(OBJEXT) +getgroups_LDADD = $(LDADD) +getgroups_DEPENDENCIES = libtests.a +getgroups32_SOURCES = getgroups32.c +getgroups32_OBJECTS = getgroups32.$(OBJEXT) +getgroups32_LDADD = $(LDADD) +getgroups32_DEPENDENCIES = libtests.a +getpeername_SOURCES = getpeername.c +getpeername_OBJECTS = getpeername.$(OBJEXT) +getpeername_LDADD = $(LDADD) +getpeername_DEPENDENCIES = libtests.a +getpgrp_SOURCES = getpgrp.c +getpgrp_OBJECTS = getpgrp.$(OBJEXT) +getpgrp_LDADD = $(LDADD) +getpgrp_DEPENDENCIES = libtests.a +getrandom_SOURCES = getrandom.c +getrandom_OBJECTS = getrandom.$(OBJEXT) +getrandom_LDADD = $(LDADD) +getrandom_DEPENDENCIES = libtests.a +getresgid_SOURCES = getresgid.c +getresgid_OBJECTS = getresgid.$(OBJEXT) +getresgid_LDADD = $(LDADD) +getresgid_DEPENDENCIES = libtests.a +getresgid32_SOURCES = getresgid32.c +getresgid32_OBJECTS = getresgid32.$(OBJEXT) +getresgid32_LDADD = $(LDADD) +getresgid32_DEPENDENCIES = libtests.a +getresuid_SOURCES = getresuid.c +getresuid_OBJECTS = getresuid.$(OBJEXT) +getresuid_LDADD = $(LDADD) +getresuid_DEPENDENCIES = libtests.a +getresuid32_SOURCES = getresuid32.c +getresuid32_OBJECTS = getresuid32.$(OBJEXT) +getresuid32_LDADD = $(LDADD) +getresuid32_DEPENDENCIES = libtests.a +getrlimit_SOURCES = getrlimit.c +getrlimit_OBJECTS = getrlimit.$(OBJEXT) +getrlimit_LDADD = $(LDADD) +getrlimit_DEPENDENCIES = libtests.a +getrusage_SOURCES = getrusage.c +getrusage_OBJECTS = getrusage.$(OBJEXT) +getrusage_LDADD = $(LDADD) +getrusage_DEPENDENCIES = libtests.a +getsid_SOURCES = getsid.c +getsid_OBJECTS = getsid.$(OBJEXT) +getsid_LDADD = $(LDADD) +getsid_DEPENDENCIES = libtests.a +getsockname_SOURCES = getsockname.c +getsockname_OBJECTS = getsockname.$(OBJEXT) +getsockname_LDADD = $(LDADD) +getsockname_DEPENDENCIES = libtests.a +getuid_SOURCES = getuid.c +getuid_OBJECTS = getuid.$(OBJEXT) +getuid_LDADD = $(LDADD) +getuid_DEPENDENCIES = libtests.a +getuid32_SOURCES = getuid32.c +getuid32_OBJECTS = getuid32.$(OBJEXT) +getuid32_LDADD = $(LDADD) +getuid32_DEPENDENCIES = libtests.a +getxxid_SOURCES = getxxid.c +getxxid_OBJECTS = getxxid.$(OBJEXT) +getxxid_LDADD = $(LDADD) +getxxid_DEPENDENCIES = libtests.a +inet_cmsg_SOURCES = inet-cmsg.c +inet_cmsg_OBJECTS = inet-cmsg.$(OBJEXT) +inet_cmsg_LDADD = $(LDADD) +inet_cmsg_DEPENDENCIES = libtests.a +init_module_SOURCES = init_module.c +init_module_OBJECTS = init_module.$(OBJEXT) +init_module_LDADD = $(LDADD) +init_module_DEPENDENCIES = libtests.a +inotify_SOURCES = inotify.c +inotify_OBJECTS = inotify.$(OBJEXT) +inotify_LDADD = $(LDADD) +inotify_DEPENDENCIES = libtests.a +inotify_init1_SOURCES = inotify_init1.c +inotify_init1_OBJECTS = inotify_init1.$(OBJEXT) +inotify_init1_LDADD = $(LDADD) +inotify_init1_DEPENDENCIES = libtests.a +ioctl_SOURCES = ioctl.c +ioctl_OBJECTS = ioctl.$(OBJEXT) +ioctl_LDADD = $(LDADD) +ioctl_DEPENDENCIES = libtests.a +ioctl_block_SOURCES = ioctl_block.c +ioctl_block_OBJECTS = ioctl_block.$(OBJEXT) +ioctl_block_LDADD = $(LDADD) +ioctl_block_DEPENDENCIES = libtests.a +ioctl_dm_SOURCES = ioctl_dm.c +ioctl_dm_OBJECTS = ioctl_dm.$(OBJEXT) +ioctl_dm_LDADD = $(LDADD) +ioctl_dm_DEPENDENCIES = libtests.a +ioctl_dm_v_SOURCES = ioctl_dm-v.c +ioctl_dm_v_OBJECTS = ioctl_dm-v.$(OBJEXT) +ioctl_dm_v_LDADD = $(LDADD) +ioctl_dm_v_DEPENDENCIES = libtests.a +ioctl_evdev_SOURCES = ioctl_evdev.c +ioctl_evdev_OBJECTS = ioctl_evdev.$(OBJEXT) +ioctl_evdev_LDADD = $(LDADD) +ioctl_evdev_DEPENDENCIES = libtests.a +ioctl_evdev_v_SOURCES = ioctl_evdev-v.c +ioctl_evdev_v_OBJECTS = ioctl_evdev-v.$(OBJEXT) +ioctl_evdev_v_LDADD = $(LDADD) +ioctl_evdev_v_DEPENDENCIES = libtests.a +ioctl_loop_SOURCES = ioctl_loop.c +ioctl_loop_OBJECTS = ioctl_loop.$(OBJEXT) +ioctl_loop_LDADD = $(LDADD) +ioctl_loop_DEPENDENCIES = libtests.a +ioctl_loop_nv_SOURCES = ioctl_loop-nv.c +ioctl_loop_nv_OBJECTS = ioctl_loop-nv.$(OBJEXT) +ioctl_loop_nv_LDADD = $(LDADD) +ioctl_loop_nv_DEPENDENCIES = libtests.a +ioctl_loop_v_SOURCES = ioctl_loop-v.c +ioctl_loop_v_OBJECTS = ioctl_loop-v.$(OBJEXT) +ioctl_loop_v_LDADD = $(LDADD) +ioctl_loop_v_DEPENDENCIES = libtests.a +ioctl_mtd_SOURCES = ioctl_mtd.c +ioctl_mtd_OBJECTS = ioctl_mtd.$(OBJEXT) +ioctl_mtd_LDADD = $(LDADD) +ioctl_mtd_DEPENDENCIES = libtests.a +ioctl_rtc_SOURCES = ioctl_rtc.c +ioctl_rtc_OBJECTS = ioctl_rtc.$(OBJEXT) +ioctl_rtc_LDADD = $(LDADD) +ioctl_rtc_DEPENDENCIES = libtests.a +ioctl_rtc_v_SOURCES = ioctl_rtc-v.c +ioctl_rtc_v_OBJECTS = ioctl_rtc-v.$(OBJEXT) +ioctl_rtc_v_LDADD = $(LDADD) +ioctl_rtc_v_DEPENDENCIES = libtests.a +ioctl_scsi_SOURCES = ioctl_scsi.c +ioctl_scsi_OBJECTS = ioctl_scsi.$(OBJEXT) +ioctl_scsi_LDADD = $(LDADD) +ioctl_scsi_DEPENDENCIES = libtests.a +ioctl_sg_io_v3_SOURCES = ioctl_sg_io_v3.c +ioctl_sg_io_v3_OBJECTS = ioctl_sg_io_v3.$(OBJEXT) +ioctl_sg_io_v3_LDADD = $(LDADD) +ioctl_sg_io_v3_DEPENDENCIES = libtests.a +ioctl_sg_io_v4_SOURCES = ioctl_sg_io_v4.c +ioctl_sg_io_v4_OBJECTS = ioctl_sg_io_v4.$(OBJEXT) +ioctl_sg_io_v4_LDADD = $(LDADD) +ioctl_sg_io_v4_DEPENDENCIES = libtests.a +ioctl_sock_gifconf_SOURCES = ioctl_sock_gifconf.c +ioctl_sock_gifconf_OBJECTS = ioctl_sock_gifconf.$(OBJEXT) +ioctl_sock_gifconf_LDADD = $(LDADD) +ioctl_sock_gifconf_DEPENDENCIES = libtests.a +ioctl_uffdio_SOURCES = ioctl_uffdio.c +ioctl_uffdio_OBJECTS = ioctl_uffdio.$(OBJEXT) +ioctl_uffdio_LDADD = $(LDADD) +ioctl_uffdio_DEPENDENCIES = libtests.a +ioctl_v4l2_SOURCES = ioctl_v4l2.c +ioctl_v4l2_OBJECTS = ioctl_v4l2.$(OBJEXT) +ioctl_v4l2_LDADD = $(LDADD) +ioctl_v4l2_DEPENDENCIES = libtests.a +ioperm_SOURCES = ioperm.c +ioperm_OBJECTS = ioperm.$(OBJEXT) +ioperm_LDADD = $(LDADD) +ioperm_DEPENDENCIES = libtests.a +iopl_SOURCES = iopl.c +iopl_OBJECTS = iopl.$(OBJEXT) +iopl_LDADD = $(LDADD) +iopl_DEPENDENCIES = libtests.a +ioprio_SOURCES = ioprio.c +ioprio_OBJECTS = ioprio.$(OBJEXT) +ioprio_LDADD = $(LDADD) +ioprio_DEPENDENCIES = libtests.a +ip_mreq_SOURCES = ip_mreq.c +ip_mreq_OBJECTS = ip_mreq.$(OBJEXT) +ip_mreq_LDADD = $(LDADD) +ip_mreq_DEPENDENCIES = libtests.a +ipc_SOURCES = ipc.c +ipc_OBJECTS = ipc.$(OBJEXT) +ipc_LDADD = $(LDADD) +ipc_DEPENDENCIES = libtests.a +ipc_msg_SOURCES = ipc_msg.c +ipc_msg_OBJECTS = ipc_msg.$(OBJEXT) +ipc_msg_LDADD = $(LDADD) +ipc_msg_DEPENDENCIES = libtests.a +ipc_msgbuf_SOURCES = ipc_msgbuf.c +ipc_msgbuf_OBJECTS = ipc_msgbuf.$(OBJEXT) +ipc_msgbuf_LDADD = $(LDADD) +ipc_msgbuf_DEPENDENCIES = libtests.a +ipc_sem_SOURCES = ipc_sem.c +ipc_sem_OBJECTS = ipc_sem.$(OBJEXT) +ipc_sem_LDADD = $(LDADD) +ipc_sem_DEPENDENCIES = libtests.a +ipc_shm_SOURCES = ipc_shm.c +ipc_shm_OBJECTS = ipc_shm.$(OBJEXT) +ipc_shm_LDADD = $(LDADD) +ipc_shm_DEPENDENCIES = libtests.a +kcmp_SOURCES = kcmp.c +kcmp_OBJECTS = kcmp.$(OBJEXT) +kcmp_LDADD = $(LDADD) +kcmp_DEPENDENCIES = libtests.a +kexec_file_load_SOURCES = kexec_file_load.c +kexec_file_load_OBJECTS = kexec_file_load.$(OBJEXT) +kexec_file_load_LDADD = $(LDADD) +kexec_file_load_DEPENDENCIES = libtests.a +kexec_load_SOURCES = kexec_load.c +kexec_load_OBJECTS = kexec_load.$(OBJEXT) +kexec_load_LDADD = $(LDADD) +kexec_load_DEPENDENCIES = libtests.a +keyctl_SOURCES = keyctl.c +keyctl_OBJECTS = keyctl.$(OBJEXT) +keyctl_LDADD = $(LDADD) +keyctl_DEPENDENCIES = libtests.a +kill_SOURCES = kill.c +kill_OBJECTS = kill.$(OBJEXT) +kill_LDADD = $(LDADD) +kill_DEPENDENCIES = libtests.a +ksysent_SOURCES = ksysent.c +ksysent_OBJECTS = ksysent.$(OBJEXT) +ksysent_LDADD = $(LDADD) +ksysent_DEPENDENCIES = libtests.a +lchown_SOURCES = lchown.c +lchown_OBJECTS = lchown.$(OBJEXT) +lchown_LDADD = $(LDADD) +lchown_DEPENDENCIES = libtests.a +lchown32_SOURCES = lchown32.c +lchown32_OBJECTS = lchown32.$(OBJEXT) +lchown32_LDADD = $(LDADD) +lchown32_DEPENDENCIES = libtests.a +link_SOURCES = link.c +link_OBJECTS = link.$(OBJEXT) +link_LDADD = $(LDADD) +link_DEPENDENCIES = libtests.a +linkat_SOURCES = linkat.c +linkat_OBJECTS = linkat.$(OBJEXT) +linkat_LDADD = $(LDADD) +linkat_DEPENDENCIES = libtests.a +llseek_SOURCES = llseek.c +llseek_OBJECTS = llseek.$(OBJEXT) +llseek_LDADD = $(LDADD) +llseek_DEPENDENCIES = libtests.a +lookup_dcookie_SOURCES = lookup_dcookie.c +lookup_dcookie_OBJECTS = lookup_dcookie.$(OBJEXT) +lookup_dcookie_LDADD = $(LDADD) +lookup_dcookie_DEPENDENCIES = libtests.a +lseek_SOURCES = lseek.c +lseek_OBJECTS = lseek.$(OBJEXT) +lseek_LDADD = $(LDADD) +lseek_DEPENDENCIES = libtests.a +lstat_SOURCES = lstat.c +lstat_OBJECTS = lstat.$(OBJEXT) +lstat_LDADD = $(LDADD) +lstat_DEPENDENCIES = libtests.a +lstat64_SOURCES = lstat64.c +lstat64_OBJECTS = lstat64-lstat64.$(OBJEXT) +lstat64_LDADD = $(LDADD) +lstat64_DEPENDENCIES = libtests.a +mbind_SOURCES = mbind.c +mbind_OBJECTS = mbind.$(OBJEXT) +mbind_LDADD = $(LDADD) +mbind_DEPENDENCIES = libtests.a +membarrier_SOURCES = membarrier.c +membarrier_OBJECTS = membarrier.$(OBJEXT) +membarrier_LDADD = $(LDADD) +membarrier_DEPENDENCIES = libtests.a +memfd_create_SOURCES = memfd_create.c +memfd_create_OBJECTS = memfd_create.$(OBJEXT) +memfd_create_LDADD = $(LDADD) +memfd_create_DEPENDENCIES = libtests.a +migrate_pages_SOURCES = migrate_pages.c +migrate_pages_OBJECTS = migrate_pages.$(OBJEXT) +migrate_pages_LDADD = $(LDADD) +migrate_pages_DEPENDENCIES = libtests.a +mincore_SOURCES = mincore.c +mincore_OBJECTS = mincore.$(OBJEXT) +mincore_LDADD = $(LDADD) +mincore_DEPENDENCIES = libtests.a +mkdir_SOURCES = mkdir.c +mkdir_OBJECTS = mkdir.$(OBJEXT) +mkdir_LDADD = $(LDADD) +mkdir_DEPENDENCIES = libtests.a +mkdirat_SOURCES = mkdirat.c +mkdirat_OBJECTS = mkdirat.$(OBJEXT) +mkdirat_LDADD = $(LDADD) +mkdirat_DEPENDENCIES = libtests.a +mknod_SOURCES = mknod.c +mknod_OBJECTS = mknod.$(OBJEXT) +mknod_LDADD = $(LDADD) +mknod_DEPENDENCIES = libtests.a +mknodat_SOURCES = mknodat.c +mknodat_OBJECTS = mknodat.$(OBJEXT) +mknodat_LDADD = $(LDADD) +mknodat_DEPENDENCIES = libtests.a +mlock_SOURCES = mlock.c +mlock_OBJECTS = mlock.$(OBJEXT) +mlock_LDADD = $(LDADD) +mlock_DEPENDENCIES = libtests.a +mlock2_SOURCES = mlock2.c +mlock2_OBJECTS = mlock2.$(OBJEXT) +mlock2_LDADD = $(LDADD) +mlock2_DEPENDENCIES = libtests.a +mlockall_SOURCES = mlockall.c +mlockall_OBJECTS = mlockall.$(OBJEXT) +mlockall_LDADD = $(LDADD) +mlockall_DEPENDENCIES = libtests.a +mmap_SOURCES = mmap.c +mmap_OBJECTS = mmap.$(OBJEXT) +mmap_LDADD = $(LDADD) +mmap_DEPENDENCIES = libtests.a +mmap64_SOURCES = mmap64.c +mmap64_OBJECTS = mmap64-mmap64.$(OBJEXT) +mmap64_LDADD = $(LDADD) +mmap64_DEPENDENCIES = libtests.a +mmsg_SOURCES = mmsg.c +mmsg_OBJECTS = mmsg.$(OBJEXT) +mmsg_LDADD = $(LDADD) +mmsg_DEPENDENCIES = libtests.a +mmsg_silent_SOURCES = mmsg-silent.c +mmsg_silent_OBJECTS = mmsg-silent.$(OBJEXT) +mmsg_silent_LDADD = $(LDADD) +mmsg_silent_DEPENDENCIES = libtests.a +mmsg_name_SOURCES = mmsg_name.c +mmsg_name_OBJECTS = mmsg_name.$(OBJEXT) +mmsg_name_LDADD = $(LDADD) +mmsg_name_DEPENDENCIES = libtests.a +mmsg_name_v_SOURCES = mmsg_name-v.c +mmsg_name_v_OBJECTS = mmsg_name-v.$(OBJEXT) +mmsg_name_v_LDADD = $(LDADD) +mmsg_name_v_DEPENDENCIES = libtests.a +mount_SOURCES = mount.c +mount_OBJECTS = mount.$(OBJEXT) +mount_LDADD = $(LDADD) +mount_DEPENDENCIES = libtests.a +move_pages_SOURCES = move_pages.c +move_pages_OBJECTS = move_pages.$(OBJEXT) +move_pages_LDADD = $(LDADD) +move_pages_DEPENDENCIES = libtests.a +mq_SOURCES = mq.c +mq_OBJECTS = mq.$(OBJEXT) +mq_DEPENDENCIES = $(LDADD) +mq_sendrecv_SOURCES = mq_sendrecv.c +mq_sendrecv_OBJECTS = mq_sendrecv.$(OBJEXT) +mq_sendrecv_DEPENDENCIES = $(LDADD) +mq_sendrecv_read_SOURCES = mq_sendrecv-read.c +mq_sendrecv_read_OBJECTS = mq_sendrecv-read.$(OBJEXT) +mq_sendrecv_read_DEPENDENCIES = $(LDADD) +mq_sendrecv_write_SOURCES = mq_sendrecv-write.c +mq_sendrecv_write_OBJECTS = mq_sendrecv-write.$(OBJEXT) +mq_sendrecv_write_DEPENDENCIES = $(LDADD) +msg_control_SOURCES = msg_control.c +msg_control_OBJECTS = msg_control.$(OBJEXT) +msg_control_LDADD = $(LDADD) +msg_control_DEPENDENCIES = libtests.a +msg_control_v_SOURCES = msg_control-v.c +msg_control_v_OBJECTS = msg_control-v.$(OBJEXT) +msg_control_v_LDADD = $(LDADD) +msg_control_v_DEPENDENCIES = libtests.a +msg_name_SOURCES = msg_name.c +msg_name_OBJECTS = msg_name.$(OBJEXT) +msg_name_LDADD = $(LDADD) +msg_name_DEPENDENCIES = libtests.a +munlockall_SOURCES = munlockall.c +munlockall_OBJECTS = munlockall.$(OBJEXT) +munlockall_LDADD = $(LDADD) +munlockall_DEPENDENCIES = libtests.a +nanosleep_SOURCES = nanosleep.c +nanosleep_OBJECTS = nanosleep.$(OBJEXT) +nanosleep_LDADD = $(LDADD) +nanosleep_DEPENDENCIES = libtests.a +net_accept_connect_SOURCES = net-accept-connect.c +net_accept_connect_OBJECTS = net-accept-connect.$(OBJEXT) +net_accept_connect_LDADD = $(LDADD) +net_accept_connect_DEPENDENCIES = libtests.a +net_icmp_filter_SOURCES = net-icmp_filter.c +net_icmp_filter_OBJECTS = net-icmp_filter.$(OBJEXT) +net_icmp_filter_LDADD = $(LDADD) +net_icmp_filter_DEPENDENCIES = libtests.a +net_sockaddr_SOURCES = net-sockaddr.c +net_sockaddr_OBJECTS = net-sockaddr.$(OBJEXT) +net_sockaddr_LDADD = $(LDADD) +net_sockaddr_DEPENDENCIES = libtests.a +net_y_unix_SOURCES = net-y-unix.c +net_y_unix_OBJECTS = net-y-unix.$(OBJEXT) +net_y_unix_LDADD = $(LDADD) +net_y_unix_DEPENDENCIES = libtests.a +net_yy_inet_SOURCES = net-yy-inet.c +net_yy_inet_OBJECTS = net-yy-inet.$(OBJEXT) +net_yy_inet_LDADD = $(LDADD) +net_yy_inet_DEPENDENCIES = libtests.a +net_yy_netlink_SOURCES = net-yy-netlink.c +net_yy_netlink_OBJECTS = net-yy-netlink.$(OBJEXT) +net_yy_netlink_LDADD = $(LDADD) +net_yy_netlink_DEPENDENCIES = libtests.a +net_yy_unix_SOURCES = net-yy-unix.c +net_yy_unix_OBJECTS = net-yy-unix.$(OBJEXT) +net_yy_unix_LDADD = $(LDADD) +net_yy_unix_DEPENDENCIES = libtests.a +netlink_inet_diag_SOURCES = netlink_inet_diag.c +netlink_inet_diag_OBJECTS = netlink_inet_diag.$(OBJEXT) +netlink_inet_diag_LDADD = $(LDADD) +netlink_inet_diag_DEPENDENCIES = libtests.a +netlink_netlink_diag_SOURCES = netlink_netlink_diag.c +netlink_netlink_diag_OBJECTS = netlink_netlink_diag.$(OBJEXT) +netlink_netlink_diag_LDADD = $(LDADD) +netlink_netlink_diag_DEPENDENCIES = libtests.a +netlink_protocol_SOURCES = netlink_protocol.c +netlink_protocol_OBJECTS = netlink_protocol.$(OBJEXT) +netlink_protocol_LDADD = $(LDADD) +netlink_protocol_DEPENDENCIES = libtests.a +netlink_unix_diag_SOURCES = netlink_unix_diag.c +netlink_unix_diag_OBJECTS = netlink_unix_diag.$(OBJEXT) +netlink_unix_diag_LDADD = $(LDADD) +netlink_unix_diag_DEPENDENCIES = libtests.a +newfstatat_SOURCES = newfstatat.c +newfstatat_OBJECTS = newfstatat-newfstatat.$(OBJEXT) +newfstatat_LDADD = $(LDADD) +newfstatat_DEPENDENCIES = libtests.a +nsyscalls_SOURCES = nsyscalls.c +nsyscalls_OBJECTS = nsyscalls.$(OBJEXT) +nsyscalls_LDADD = $(LDADD) +nsyscalls_DEPENDENCIES = libtests.a +old_mmap_SOURCES = old_mmap.c +old_mmap_OBJECTS = old_mmap.$(OBJEXT) +old_mmap_LDADD = $(LDADD) +old_mmap_DEPENDENCIES = libtests.a +oldfstat_SOURCES = oldfstat.c +oldfstat_OBJECTS = oldfstat.$(OBJEXT) +oldfstat_LDADD = $(LDADD) +oldfstat_DEPENDENCIES = libtests.a +oldlstat_SOURCES = oldlstat.c +oldlstat_OBJECTS = oldlstat.$(OBJEXT) +oldlstat_LDADD = $(LDADD) +oldlstat_DEPENDENCIES = libtests.a +oldselect_SOURCES = oldselect.c +oldselect_OBJECTS = oldselect.$(OBJEXT) +oldselect_LDADD = $(LDADD) +oldselect_DEPENDENCIES = libtests.a +oldstat_SOURCES = oldstat.c +oldstat_OBJECTS = oldstat.$(OBJEXT) +oldstat_LDADD = $(LDADD) +oldstat_DEPENDENCIES = libtests.a +open_SOURCES = open.c +open_OBJECTS = open.$(OBJEXT) +open_LDADD = $(LDADD) +open_DEPENDENCIES = libtests.a +openat_SOURCES = openat.c +openat_OBJECTS = openat.$(OBJEXT) +openat_LDADD = $(LDADD) +openat_DEPENDENCIES = libtests.a +pause_SOURCES = pause.c +pause_OBJECTS = pause.$(OBJEXT) +pause_LDADD = $(LDADD) +pause_DEPENDENCIES = libtests.a +pc_SOURCES = pc.c +pc_OBJECTS = pc.$(OBJEXT) +am__DEPENDENCIES_1 = +pc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(LDADD) +perf_event_open_SOURCES = perf_event_open.c +perf_event_open_OBJECTS = perf_event_open.$(OBJEXT) +perf_event_open_LDADD = $(LDADD) +perf_event_open_DEPENDENCIES = libtests.a +perf_event_open_nonverbose_SOURCES = perf_event_open_nonverbose.c +perf_event_open_nonverbose_OBJECTS = \ + perf_event_open_nonverbose.$(OBJEXT) +perf_event_open_nonverbose_LDADD = $(LDADD) +perf_event_open_nonverbose_DEPENDENCIES = libtests.a +perf_event_open_unabbrev_SOURCES = perf_event_open_unabbrev.c +perf_event_open_unabbrev_OBJECTS = perf_event_open_unabbrev.$(OBJEXT) +perf_event_open_unabbrev_LDADD = $(LDADD) +perf_event_open_unabbrev_DEPENDENCIES = libtests.a +personality_SOURCES = personality.c +personality_OBJECTS = personality.$(OBJEXT) +personality_LDADD = $(LDADD) +personality_DEPENDENCIES = libtests.a +pipe_SOURCES = pipe.c +pipe_OBJECTS = pipe.$(OBJEXT) +pipe_LDADD = $(LDADD) +pipe_DEPENDENCIES = libtests.a +pipe2_SOURCES = pipe2.c +pipe2_OBJECTS = pipe2.$(OBJEXT) +pipe2_LDADD = $(LDADD) +pipe2_DEPENDENCIES = libtests.a +pkey_alloc_SOURCES = pkey_alloc.c +pkey_alloc_OBJECTS = pkey_alloc.$(OBJEXT) +pkey_alloc_LDADD = $(LDADD) +pkey_alloc_DEPENDENCIES = libtests.a +pkey_free_SOURCES = pkey_free.c +pkey_free_OBJECTS = pkey_free.$(OBJEXT) +pkey_free_LDADD = $(LDADD) +pkey_free_DEPENDENCIES = libtests.a +pkey_mprotect_SOURCES = pkey_mprotect.c +pkey_mprotect_OBJECTS = pkey_mprotect.$(OBJEXT) +pkey_mprotect_LDADD = $(LDADD) +pkey_mprotect_DEPENDENCIES = libtests.a +poll_SOURCES = poll.c +poll_OBJECTS = poll.$(OBJEXT) +poll_LDADD = $(LDADD) +poll_DEPENDENCIES = libtests.a +ppoll_SOURCES = ppoll.c +ppoll_OBJECTS = ppoll.$(OBJEXT) +ppoll_LDADD = $(LDADD) +ppoll_DEPENDENCIES = libtests.a +prctl_arg2_intptr_SOURCES = prctl-arg2-intptr.c +prctl_arg2_intptr_OBJECTS = prctl-arg2-intptr.$(OBJEXT) +prctl_arg2_intptr_LDADD = $(LDADD) +prctl_arg2_intptr_DEPENDENCIES = libtests.a +prctl_dumpable_SOURCES = prctl-dumpable.c +prctl_dumpable_OBJECTS = prctl-dumpable.$(OBJEXT) +prctl_dumpable_LDADD = $(LDADD) +prctl_dumpable_DEPENDENCIES = libtests.a +prctl_name_SOURCES = prctl-name.c +prctl_name_OBJECTS = prctl-name.$(OBJEXT) +prctl_name_LDADD = $(LDADD) +prctl_name_DEPENDENCIES = libtests.a +prctl_no_args_SOURCES = prctl-no-args.c +prctl_no_args_OBJECTS = prctl-no-args.$(OBJEXT) +prctl_no_args_LDADD = $(LDADD) +prctl_no_args_DEPENDENCIES = libtests.a +prctl_pdeathsig_SOURCES = prctl-pdeathsig.c +prctl_pdeathsig_OBJECTS = prctl-pdeathsig.$(OBJEXT) +prctl_pdeathsig_LDADD = $(LDADD) +prctl_pdeathsig_DEPENDENCIES = libtests.a +prctl_seccomp_filter_v_SOURCES = prctl-seccomp-filter-v.c +prctl_seccomp_filter_v_OBJECTS = prctl-seccomp-filter-v.$(OBJEXT) +prctl_seccomp_filter_v_LDADD = $(LDADD) +prctl_seccomp_filter_v_DEPENDENCIES = libtests.a +prctl_seccomp_strict_SOURCES = prctl-seccomp-strict.c +prctl_seccomp_strict_OBJECTS = prctl-seccomp-strict.$(OBJEXT) +prctl_seccomp_strict_LDADD = $(LDADD) +prctl_seccomp_strict_DEPENDENCIES = libtests.a +prctl_securebits_SOURCES = prctl-securebits.c +prctl_securebits_OBJECTS = prctl-securebits.$(OBJEXT) +prctl_securebits_LDADD = $(LDADD) +prctl_securebits_DEPENDENCIES = libtests.a +prctl_tid_address_SOURCES = prctl-tid_address.c +prctl_tid_address_OBJECTS = prctl-tid_address.$(OBJEXT) +prctl_tid_address_LDADD = $(LDADD) +prctl_tid_address_DEPENDENCIES = libtests.a +prctl_tsc_SOURCES = prctl-tsc.c +prctl_tsc_OBJECTS = prctl-tsc.$(OBJEXT) +prctl_tsc_LDADD = $(LDADD) +prctl_tsc_DEPENDENCIES = libtests.a +pread64_pwrite64_SOURCES = pread64-pwrite64.c +pread64_pwrite64_OBJECTS = \ + pread64_pwrite64-pread64-pwrite64.$(OBJEXT) +pread64_pwrite64_LDADD = $(LDADD) +pread64_pwrite64_DEPENDENCIES = libtests.a +preadv_SOURCES = preadv.c +preadv_OBJECTS = preadv-preadv.$(OBJEXT) +preadv_LDADD = $(LDADD) +preadv_DEPENDENCIES = libtests.a +preadv_pwritev_SOURCES = preadv-pwritev.c +preadv_pwritev_OBJECTS = preadv_pwritev-preadv-pwritev.$(OBJEXT) +preadv_pwritev_LDADD = $(LDADD) +preadv_pwritev_DEPENDENCIES = libtests.a +preadv2_pwritev2_SOURCES = preadv2-pwritev2.c +preadv2_pwritev2_OBJECTS = preadv2-pwritev2.$(OBJEXT) +preadv2_pwritev2_LDADD = $(LDADD) +preadv2_pwritev2_DEPENDENCIES = libtests.a +print_maxfd_SOURCES = print_maxfd.c +print_maxfd_OBJECTS = print_maxfd.$(OBJEXT) +print_maxfd_LDADD = $(LDADD) +print_maxfd_DEPENDENCIES = libtests.a +printstr_SOURCES = printstr.c +printstr_OBJECTS = printstr.$(OBJEXT) +printstr_LDADD = $(LDADD) +printstr_DEPENDENCIES = libtests.a +prlimit64_SOURCES = prlimit64.c +prlimit64_OBJECTS = prlimit64.$(OBJEXT) +prlimit64_LDADD = $(LDADD) +prlimit64_DEPENDENCIES = libtests.a +process_vm_readv_SOURCES = process_vm_readv.c +process_vm_readv_OBJECTS = process_vm_readv.$(OBJEXT) +process_vm_readv_LDADD = $(LDADD) +process_vm_readv_DEPENDENCIES = libtests.a +process_vm_writev_SOURCES = process_vm_writev.c +process_vm_writev_OBJECTS = process_vm_writev.$(OBJEXT) +process_vm_writev_LDADD = $(LDADD) +process_vm_writev_DEPENDENCIES = libtests.a +pselect6_SOURCES = pselect6.c +pselect6_OBJECTS = pselect6.$(OBJEXT) +pselect6_LDADD = $(LDADD) +pselect6_DEPENDENCIES = libtests.a +ptrace_SOURCES = ptrace.c +ptrace_OBJECTS = ptrace.$(OBJEXT) +ptrace_LDADD = $(LDADD) +ptrace_DEPENDENCIES = libtests.a +pwritev_SOURCES = pwritev.c +pwritev_OBJECTS = pwritev-pwritev.$(OBJEXT) +pwritev_LDADD = $(LDADD) +pwritev_DEPENDENCIES = libtests.a +qual_fault_SOURCES = qual_fault.c +qual_fault_OBJECTS = qual_fault.$(OBJEXT) +qual_fault_LDADD = $(LDADD) +qual_fault_DEPENDENCIES = libtests.a +qual_inject_error_signal_SOURCES = qual_inject-error-signal.c +qual_inject_error_signal_OBJECTS = qual_inject-error-signal.$(OBJEXT) +qual_inject_error_signal_LDADD = $(LDADD) +qual_inject_error_signal_DEPENDENCIES = libtests.a +qual_inject_retval_SOURCES = qual_inject-retval.c +qual_inject_retval_OBJECTS = qual_inject-retval.$(OBJEXT) +qual_inject_retval_LDADD = $(LDADD) +qual_inject_retval_DEPENDENCIES = libtests.a +qual_inject_signal_SOURCES = qual_inject-signal.c +qual_inject_signal_OBJECTS = qual_inject-signal.$(OBJEXT) +qual_inject_signal_LDADD = $(LDADD) +qual_inject_signal_DEPENDENCIES = libtests.a +qual_signal_SOURCES = qual_signal.c +qual_signal_OBJECTS = qual_signal.$(OBJEXT) +qual_signal_LDADD = $(LDADD) +qual_signal_DEPENDENCIES = libtests.a +quotactl_SOURCES = quotactl.c +quotactl_OBJECTS = quotactl.$(OBJEXT) +quotactl_LDADD = $(LDADD) +quotactl_DEPENDENCIES = libtests.a +quotactl_v_SOURCES = quotactl-v.c +quotactl_v_OBJECTS = quotactl-v.$(OBJEXT) +quotactl_v_LDADD = $(LDADD) +quotactl_v_DEPENDENCIES = libtests.a +quotactl_xfs_SOURCES = quotactl-xfs.c +quotactl_xfs_OBJECTS = quotactl-xfs.$(OBJEXT) +quotactl_xfs_LDADD = $(LDADD) +quotactl_xfs_DEPENDENCIES = libtests.a +quotactl_xfs_v_SOURCES = quotactl-xfs-v.c +quotactl_xfs_v_OBJECTS = quotactl-xfs-v.$(OBJEXT) +quotactl_xfs_v_LDADD = $(LDADD) +quotactl_xfs_v_DEPENDENCIES = libtests.a +read_write_SOURCES = read-write.c +read_write_OBJECTS = read-write.$(OBJEXT) +read_write_LDADD = $(LDADD) +read_write_DEPENDENCIES = libtests.a +readahead_SOURCES = readahead.c +readahead_OBJECTS = readahead.$(OBJEXT) +readahead_LDADD = $(LDADD) +readahead_DEPENDENCIES = libtests.a +readdir_SOURCES = readdir.c +readdir_OBJECTS = readdir.$(OBJEXT) +readdir_LDADD = $(LDADD) +readdir_DEPENDENCIES = libtests.a +readlink_SOURCES = readlink.c +readlink_OBJECTS = readlink.$(OBJEXT) +readlink_LDADD = $(LDADD) +readlink_DEPENDENCIES = libtests.a +readlinkat_SOURCES = readlinkat.c +readlinkat_OBJECTS = readlinkat.$(OBJEXT) +readlinkat_LDADD = $(LDADD) +readlinkat_DEPENDENCIES = libtests.a +readv_SOURCES = readv.c +readv_OBJECTS = readv.$(OBJEXT) +readv_LDADD = $(LDADD) +readv_DEPENDENCIES = libtests.a +reboot_SOURCES = reboot.c +reboot_OBJECTS = reboot.$(OBJEXT) +reboot_LDADD = $(LDADD) +reboot_DEPENDENCIES = libtests.a +recvfrom_SOURCES = recvfrom.c +recvfrom_OBJECTS = recvfrom.$(OBJEXT) +recvfrom_LDADD = $(LDADD) +recvfrom_DEPENDENCIES = libtests.a +recvmmsg_timeout_SOURCES = recvmmsg-timeout.c +recvmmsg_timeout_OBJECTS = recvmmsg-timeout.$(OBJEXT) +recvmmsg_timeout_LDADD = $(LDADD) +recvmmsg_timeout_DEPENDENCIES = libtests.a +recvmsg_SOURCES = recvmsg.c +recvmsg_OBJECTS = recvmsg.$(OBJEXT) +recvmsg_LDADD = $(LDADD) +recvmsg_DEPENDENCIES = libtests.a +redirect_fds_SOURCES = redirect-fds.c +redirect_fds_OBJECTS = redirect-fds.$(OBJEXT) +redirect_fds_LDADD = $(LDADD) +redirect_fds_DEPENDENCIES = libtests.a +remap_file_pages_SOURCES = remap_file_pages.c +remap_file_pages_OBJECTS = remap_file_pages.$(OBJEXT) +remap_file_pages_LDADD = $(LDADD) +remap_file_pages_DEPENDENCIES = libtests.a +rename_SOURCES = rename.c +rename_OBJECTS = rename.$(OBJEXT) +rename_LDADD = $(LDADD) +rename_DEPENDENCIES = libtests.a +renameat_SOURCES = renameat.c +renameat_OBJECTS = renameat.$(OBJEXT) +renameat_LDADD = $(LDADD) +renameat_DEPENDENCIES = libtests.a +renameat2_SOURCES = renameat2.c +renameat2_OBJECTS = renameat2.$(OBJEXT) +renameat2_LDADD = $(LDADD) +renameat2_DEPENDENCIES = libtests.a +request_key_SOURCES = request_key.c +request_key_OBJECTS = request_key.$(OBJEXT) +request_key_LDADD = $(LDADD) +request_key_DEPENDENCIES = libtests.a +restart_syscall_SOURCES = restart_syscall.c +restart_syscall_OBJECTS = restart_syscall.$(OBJEXT) +restart_syscall_LDADD = $(LDADD) +restart_syscall_DEPENDENCIES = libtests.a +rmdir_SOURCES = rmdir.c +rmdir_OBJECTS = rmdir.$(OBJEXT) +rmdir_LDADD = $(LDADD) +rmdir_DEPENDENCIES = libtests.a +rt_sigpending_SOURCES = rt_sigpending.c +rt_sigpending_OBJECTS = rt_sigpending.$(OBJEXT) +rt_sigpending_LDADD = $(LDADD) +rt_sigpending_DEPENDENCIES = libtests.a +rt_sigprocmask_SOURCES = rt_sigprocmask.c +rt_sigprocmask_OBJECTS = rt_sigprocmask.$(OBJEXT) +rt_sigprocmask_LDADD = $(LDADD) +rt_sigprocmask_DEPENDENCIES = libtests.a +rt_sigqueueinfo_SOURCES = rt_sigqueueinfo.c +rt_sigqueueinfo_OBJECTS = rt_sigqueueinfo.$(OBJEXT) +rt_sigqueueinfo_LDADD = $(LDADD) +rt_sigqueueinfo_DEPENDENCIES = libtests.a +rt_sigsuspend_SOURCES = rt_sigsuspend.c +rt_sigsuspend_OBJECTS = rt_sigsuspend.$(OBJEXT) +rt_sigsuspend_LDADD = $(LDADD) +rt_sigsuspend_DEPENDENCIES = libtests.a +rt_sigtimedwait_SOURCES = rt_sigtimedwait.c +rt_sigtimedwait_OBJECTS = rt_sigtimedwait.$(OBJEXT) +rt_sigtimedwait_LDADD = $(LDADD) +rt_sigtimedwait_DEPENDENCIES = libtests.a +rt_tgsigqueueinfo_SOURCES = rt_tgsigqueueinfo.c +rt_tgsigqueueinfo_OBJECTS = rt_tgsigqueueinfo.$(OBJEXT) +rt_tgsigqueueinfo_LDADD = $(LDADD) +rt_tgsigqueueinfo_DEPENDENCIES = libtests.a +sched_get_priority_mxx_SOURCES = sched_get_priority_mxx.c +sched_get_priority_mxx_OBJECTS = sched_get_priority_mxx.$(OBJEXT) +sched_get_priority_mxx_LDADD = $(LDADD) +sched_get_priority_mxx_DEPENDENCIES = libtests.a +sched_rr_get_interval_SOURCES = sched_rr_get_interval.c +sched_rr_get_interval_OBJECTS = sched_rr_get_interval.$(OBJEXT) +sched_rr_get_interval_LDADD = $(LDADD) +sched_rr_get_interval_DEPENDENCIES = libtests.a +sched_xetaffinity_SOURCES = sched_xetaffinity.c +sched_xetaffinity_OBJECTS = sched_xetaffinity.$(OBJEXT) +sched_xetaffinity_LDADD = $(LDADD) +sched_xetaffinity_DEPENDENCIES = libtests.a +sched_xetattr_SOURCES = sched_xetattr.c +sched_xetattr_OBJECTS = sched_xetattr.$(OBJEXT) +sched_xetattr_LDADD = $(LDADD) +sched_xetattr_DEPENDENCIES = libtests.a +sched_xetparam_SOURCES = sched_xetparam.c +sched_xetparam_OBJECTS = sched_xetparam.$(OBJEXT) +sched_xetparam_LDADD = $(LDADD) +sched_xetparam_DEPENDENCIES = libtests.a +sched_xetscheduler_SOURCES = sched_xetscheduler.c +sched_xetscheduler_OBJECTS = sched_xetscheduler.$(OBJEXT) +sched_xetscheduler_LDADD = $(LDADD) +sched_xetscheduler_DEPENDENCIES = libtests.a +sched_yield_SOURCES = sched_yield.c +sched_yield_OBJECTS = sched_yield.$(OBJEXT) +sched_yield_LDADD = $(LDADD) +sched_yield_DEPENDENCIES = libtests.a +scm_rights_SOURCES = scm_rights.c +scm_rights_OBJECTS = scm_rights.$(OBJEXT) +scm_rights_LDADD = $(LDADD) +scm_rights_DEPENDENCIES = libtests.a +seccomp_filter_SOURCES = seccomp-filter.c +seccomp_filter_OBJECTS = seccomp-filter.$(OBJEXT) +seccomp_filter_LDADD = $(LDADD) +seccomp_filter_DEPENDENCIES = libtests.a +seccomp_filter_v_SOURCES = seccomp-filter-v.c +seccomp_filter_v_OBJECTS = seccomp-filter-v.$(OBJEXT) +seccomp_filter_v_LDADD = $(LDADD) +seccomp_filter_v_DEPENDENCIES = libtests.a +seccomp_strict_SOURCES = seccomp-strict.c +seccomp_strict_OBJECTS = seccomp-strict.$(OBJEXT) +seccomp_strict_LDADD = $(LDADD) +seccomp_strict_DEPENDENCIES = libtests.a +select_SOURCES = select.c +select_OBJECTS = select.$(OBJEXT) +select_LDADD = $(LDADD) +select_DEPENDENCIES = libtests.a +semop_SOURCES = semop.c +semop_OBJECTS = semop.$(OBJEXT) +semop_LDADD = $(LDADD) +semop_DEPENDENCIES = libtests.a +sendfile_SOURCES = sendfile.c +sendfile_OBJECTS = sendfile.$(OBJEXT) +sendfile_LDADD = $(LDADD) +sendfile_DEPENDENCIES = libtests.a +sendfile64_SOURCES = sendfile64.c +sendfile64_OBJECTS = sendfile64.$(OBJEXT) +sendfile64_LDADD = $(LDADD) +sendfile64_DEPENDENCIES = libtests.a +set_mempolicy_SOURCES = set_mempolicy.c +set_mempolicy_OBJECTS = set_mempolicy.$(OBJEXT) +set_mempolicy_LDADD = $(LDADD) +set_mempolicy_DEPENDENCIES = libtests.a +set_ptracer_any_SOURCES = set_ptracer_any.c +set_ptracer_any_OBJECTS = set_ptracer_any.$(OBJEXT) +set_ptracer_any_LDADD = $(LDADD) +set_ptracer_any_DEPENDENCIES = libtests.a +setdomainname_SOURCES = setdomainname.c +setdomainname_OBJECTS = setdomainname.$(OBJEXT) +setdomainname_LDADD = $(LDADD) +setdomainname_DEPENDENCIES = libtests.a +setfsgid_SOURCES = setfsgid.c +setfsgid_OBJECTS = setfsgid.$(OBJEXT) +setfsgid_LDADD = $(LDADD) +setfsgid_DEPENDENCIES = libtests.a +setfsgid32_SOURCES = setfsgid32.c +setfsgid32_OBJECTS = setfsgid32.$(OBJEXT) +setfsgid32_LDADD = $(LDADD) +setfsgid32_DEPENDENCIES = libtests.a +setfsuid_SOURCES = setfsuid.c +setfsuid_OBJECTS = setfsuid.$(OBJEXT) +setfsuid_LDADD = $(LDADD) +setfsuid_DEPENDENCIES = libtests.a +setfsuid32_SOURCES = setfsuid32.c +setfsuid32_OBJECTS = setfsuid32.$(OBJEXT) +setfsuid32_LDADD = $(LDADD) +setfsuid32_DEPENDENCIES = libtests.a +setgid_SOURCES = setgid.c +setgid_OBJECTS = setgid.$(OBJEXT) +setgid_LDADD = $(LDADD) +setgid_DEPENDENCIES = libtests.a +setgid32_SOURCES = setgid32.c +setgid32_OBJECTS = setgid32.$(OBJEXT) +setgid32_LDADD = $(LDADD) +setgid32_DEPENDENCIES = libtests.a +setgroups_SOURCES = setgroups.c +setgroups_OBJECTS = setgroups.$(OBJEXT) +setgroups_LDADD = $(LDADD) +setgroups_DEPENDENCIES = libtests.a +setgroups32_SOURCES = setgroups32.c +setgroups32_OBJECTS = setgroups32.$(OBJEXT) +setgroups32_LDADD = $(LDADD) +setgroups32_DEPENDENCIES = libtests.a +sethostname_SOURCES = sethostname.c +sethostname_OBJECTS = sethostname.$(OBJEXT) +sethostname_LDADD = $(LDADD) +sethostname_DEPENDENCIES = libtests.a +setns_SOURCES = setns.c +setns_OBJECTS = setns.$(OBJEXT) +setns_LDADD = $(LDADD) +setns_DEPENDENCIES = libtests.a +setregid_SOURCES = setregid.c +setregid_OBJECTS = setregid.$(OBJEXT) +setregid_LDADD = $(LDADD) +setregid_DEPENDENCIES = libtests.a +setregid32_SOURCES = setregid32.c +setregid32_OBJECTS = setregid32.$(OBJEXT) +setregid32_LDADD = $(LDADD) +setregid32_DEPENDENCIES = libtests.a +setresgid_SOURCES = setresgid.c +setresgid_OBJECTS = setresgid.$(OBJEXT) +setresgid_LDADD = $(LDADD) +setresgid_DEPENDENCIES = libtests.a +setresgid32_SOURCES = setresgid32.c +setresgid32_OBJECTS = setresgid32.$(OBJEXT) +setresgid32_LDADD = $(LDADD) +setresgid32_DEPENDENCIES = libtests.a +setresuid_SOURCES = setresuid.c +setresuid_OBJECTS = setresuid.$(OBJEXT) +setresuid_LDADD = $(LDADD) +setresuid_DEPENDENCIES = libtests.a +setresuid32_SOURCES = setresuid32.c +setresuid32_OBJECTS = setresuid32.$(OBJEXT) +setresuid32_LDADD = $(LDADD) +setresuid32_DEPENDENCIES = libtests.a +setreuid_SOURCES = setreuid.c +setreuid_OBJECTS = setreuid.$(OBJEXT) +setreuid_LDADD = $(LDADD) +setreuid_DEPENDENCIES = libtests.a +setreuid32_SOURCES = setreuid32.c +setreuid32_OBJECTS = setreuid32.$(OBJEXT) +setreuid32_LDADD = $(LDADD) +setreuid32_DEPENDENCIES = libtests.a +setrlimit_SOURCES = setrlimit.c +setrlimit_OBJECTS = setrlimit.$(OBJEXT) +setrlimit_LDADD = $(LDADD) +setrlimit_DEPENDENCIES = libtests.a +setuid_SOURCES = setuid.c +setuid_OBJECTS = setuid.$(OBJEXT) +setuid_LDADD = $(LDADD) +setuid_DEPENDENCIES = libtests.a +setuid32_SOURCES = setuid32.c +setuid32_OBJECTS = setuid32.$(OBJEXT) +setuid32_LDADD = $(LDADD) +setuid32_DEPENDENCIES = libtests.a +shmxt_SOURCES = shmxt.c +shmxt_OBJECTS = shmxt.$(OBJEXT) +shmxt_LDADD = $(LDADD) +shmxt_DEPENDENCIES = libtests.a +shutdown_SOURCES = shutdown.c +shutdown_OBJECTS = shutdown.$(OBJEXT) +shutdown_LDADD = $(LDADD) +shutdown_DEPENDENCIES = libtests.a +sigaction_SOURCES = sigaction.c +sigaction_OBJECTS = sigaction.$(OBJEXT) +sigaction_LDADD = $(LDADD) +sigaction_DEPENDENCIES = libtests.a +sigaltstack_SOURCES = sigaltstack.c +sigaltstack_OBJECTS = sigaltstack.$(OBJEXT) +sigaltstack_LDADD = $(LDADD) +sigaltstack_DEPENDENCIES = libtests.a +siginfo_SOURCES = siginfo.c +siginfo_OBJECTS = siginfo.$(OBJEXT) +siginfo_LDADD = $(LDADD) +siginfo_DEPENDENCIES = libtests.a +signal_receive_SOURCES = signal_receive.c +signal_receive_OBJECTS = signal_receive.$(OBJEXT) +signal_receive_LDADD = $(LDADD) +signal_receive_DEPENDENCIES = libtests.a +signalfd4_SOURCES = signalfd4.c +signalfd4_OBJECTS = signalfd4.$(OBJEXT) +signalfd4_LDADD = $(LDADD) +signalfd4_DEPENDENCIES = libtests.a +sigreturn_SOURCES = sigreturn.c +sigreturn_OBJECTS = sigreturn.$(OBJEXT) +sigreturn_LDADD = $(LDADD) +sigreturn_DEPENDENCIES = libtests.a +sleep_SOURCES = sleep.c +sleep_OBJECTS = sleep.$(OBJEXT) +sleep_LDADD = $(LDADD) +sleep_DEPENDENCIES = libtests.a +socketcall_SOURCES = socketcall.c +socketcall_OBJECTS = socketcall.$(OBJEXT) +socketcall_LDADD = $(LDADD) +socketcall_DEPENDENCIES = libtests.a +splice_SOURCES = splice.c +splice_OBJECTS = splice.$(OBJEXT) +splice_LDADD = $(LDADD) +splice_DEPENDENCIES = libtests.a +am_stack_fcall_OBJECTS = stack-fcall.$(OBJEXT) stack-fcall-0.$(OBJEXT) \ + stack-fcall-1.$(OBJEXT) stack-fcall-2.$(OBJEXT) \ + stack-fcall-3.$(OBJEXT) +stack_fcall_OBJECTS = $(am_stack_fcall_OBJECTS) +stack_fcall_LDADD = $(LDADD) +stack_fcall_DEPENDENCIES = libtests.a +stat_SOURCES = stat.c +stat_OBJECTS = stat.$(OBJEXT) +stat_LDADD = $(LDADD) +stat_DEPENDENCIES = libtests.a +stat64_SOURCES = stat64.c +stat64_OBJECTS = stat64-stat64.$(OBJEXT) +stat64_LDADD = $(LDADD) +stat64_DEPENDENCIES = libtests.a +statfs_SOURCES = statfs.c +statfs_OBJECTS = statfs-statfs.$(OBJEXT) +statfs_LDADD = $(LDADD) +statfs_DEPENDENCIES = libtests.a +statfs64_SOURCES = statfs64.c +statfs64_OBJECTS = statfs64.$(OBJEXT) +statfs64_LDADD = $(LDADD) +statfs64_DEPENDENCIES = libtests.a +swap_SOURCES = swap.c +swap_OBJECTS = swap.$(OBJEXT) +swap_LDADD = $(LDADD) +swap_DEPENDENCIES = libtests.a +symlink_SOURCES = symlink.c +symlink_OBJECTS = symlink.$(OBJEXT) +symlink_LDADD = $(LDADD) +symlink_DEPENDENCIES = libtests.a +symlinkat_SOURCES = symlinkat.c +symlinkat_OBJECTS = symlinkat.$(OBJEXT) +symlinkat_LDADD = $(LDADD) +symlinkat_DEPENDENCIES = libtests.a +sync_SOURCES = sync.c +sync_OBJECTS = sync.$(OBJEXT) +sync_LDADD = $(LDADD) +sync_DEPENDENCIES = libtests.a +sync_file_range_SOURCES = sync_file_range.c +sync_file_range_OBJECTS = sync_file_range.$(OBJEXT) +sync_file_range_LDADD = $(LDADD) +sync_file_range_DEPENDENCIES = libtests.a +sync_file_range2_SOURCES = sync_file_range2.c +sync_file_range2_OBJECTS = sync_file_range2.$(OBJEXT) +sync_file_range2_LDADD = $(LDADD) +sync_file_range2_DEPENDENCIES = libtests.a +sysinfo_SOURCES = sysinfo.c +sysinfo_OBJECTS = sysinfo.$(OBJEXT) +sysinfo_LDADD = $(LDADD) +sysinfo_DEPENDENCIES = libtests.a +syslog_SOURCES = syslog.c +syslog_OBJECTS = syslog.$(OBJEXT) +syslog_LDADD = $(LDADD) +syslog_DEPENDENCIES = libtests.a +tee_SOURCES = tee.c +tee_OBJECTS = tee.$(OBJEXT) +tee_LDADD = $(LDADD) +tee_DEPENDENCIES = libtests.a +threads_execve_SOURCES = threads-execve.c +threads_execve_OBJECTS = threads-execve.$(OBJEXT) +threads_execve_DEPENDENCIES = $(LDADD) +time_SOURCES = time.c +time_OBJECTS = time.$(OBJEXT) +time_LDADD = $(LDADD) +time_DEPENDENCIES = libtests.a +timer_create_SOURCES = timer_create.c +timer_create_OBJECTS = timer_create.$(OBJEXT) +timer_create_LDADD = $(LDADD) +timer_create_DEPENDENCIES = libtests.a +timer_xettime_SOURCES = timer_xettime.c +timer_xettime_OBJECTS = timer_xettime.$(OBJEXT) +timer_xettime_LDADD = $(LDADD) +timer_xettime_DEPENDENCIES = libtests.a +timerfd_xettime_SOURCES = timerfd_xettime.c +timerfd_xettime_OBJECTS = timerfd_xettime.$(OBJEXT) +timerfd_xettime_LDADD = $(LDADD) +timerfd_xettime_DEPENDENCIES = libtests.a +times_SOURCES = times.c +times_OBJECTS = times.$(OBJEXT) +times_DEPENDENCIES = $(LDADD) +times_fail_SOURCES = times-fail.c +times_fail_OBJECTS = times-fail.$(OBJEXT) +times_fail_LDADD = $(LDADD) +times_fail_DEPENDENCIES = libtests.a +truncate_SOURCES = truncate.c +truncate_OBJECTS = truncate.$(OBJEXT) +truncate_LDADD = $(LDADD) +truncate_DEPENDENCIES = libtests.a +truncate64_SOURCES = truncate64.c +truncate64_OBJECTS = truncate64-truncate64.$(OBJEXT) +truncate64_LDADD = $(LDADD) +truncate64_DEPENDENCIES = libtests.a +ugetrlimit_SOURCES = ugetrlimit.c +ugetrlimit_OBJECTS = ugetrlimit.$(OBJEXT) +ugetrlimit_LDADD = $(LDADD) +ugetrlimit_DEPENDENCIES = libtests.a +uio_SOURCES = uio.c +uio_OBJECTS = uio-uio.$(OBJEXT) +uio_LDADD = $(LDADD) +uio_DEPENDENCIES = libtests.a +umask_SOURCES = umask.c +umask_OBJECTS = umask.$(OBJEXT) +umask_LDADD = $(LDADD) +umask_DEPENDENCIES = libtests.a +umount_SOURCES = umount.c +umount_OBJECTS = umount.$(OBJEXT) +umount_LDADD = $(LDADD) +umount_DEPENDENCIES = libtests.a +umount2_SOURCES = umount2.c +umount2_OBJECTS = umount2.$(OBJEXT) +umount2_LDADD = $(LDADD) +umount2_DEPENDENCIES = libtests.a +umoven_illptr_SOURCES = umoven-illptr.c +umoven_illptr_OBJECTS = umoven-illptr.$(OBJEXT) +umoven_illptr_LDADD = $(LDADD) +umoven_illptr_DEPENDENCIES = libtests.a +umovestr_SOURCES = umovestr.c +umovestr_OBJECTS = umovestr.$(OBJEXT) +umovestr_LDADD = $(LDADD) +umovestr_DEPENDENCIES = libtests.a +umovestr_illptr_SOURCES = umovestr-illptr.c +umovestr_illptr_OBJECTS = umovestr-illptr.$(OBJEXT) +umovestr_illptr_LDADD = $(LDADD) +umovestr_illptr_DEPENDENCIES = libtests.a +umovestr2_SOURCES = umovestr2.c +umovestr2_OBJECTS = umovestr2.$(OBJEXT) +umovestr2_LDADD = $(LDADD) +umovestr2_DEPENDENCIES = libtests.a +umovestr3_SOURCES = umovestr3.c +umovestr3_OBJECTS = umovestr3.$(OBJEXT) +umovestr3_LDADD = $(LDADD) +umovestr3_DEPENDENCIES = libtests.a +uname_SOURCES = uname.c +uname_OBJECTS = uname.$(OBJEXT) +uname_LDADD = $(LDADD) +uname_DEPENDENCIES = libtests.a +unix_pair_send_recv_SOURCES = unix-pair-send-recv.c +unix_pair_send_recv_OBJECTS = unix-pair-send-recv.$(OBJEXT) +unix_pair_send_recv_LDADD = $(LDADD) +unix_pair_send_recv_DEPENDENCIES = libtests.a +unix_pair_sendto_recvfrom_SOURCES = unix-pair-sendto-recvfrom.c +unix_pair_sendto_recvfrom_OBJECTS = \ + unix-pair-sendto-recvfrom.$(OBJEXT) +unix_pair_sendto_recvfrom_LDADD = $(LDADD) +unix_pair_sendto_recvfrom_DEPENDENCIES = libtests.a +unlink_SOURCES = unlink.c +unlink_OBJECTS = unlink.$(OBJEXT) +unlink_LDADD = $(LDADD) +unlink_DEPENDENCIES = libtests.a +unlinkat_SOURCES = unlinkat.c +unlinkat_OBJECTS = unlinkat.$(OBJEXT) +unlinkat_LDADD = $(LDADD) +unlinkat_DEPENDENCIES = libtests.a +unshare_SOURCES = unshare.c +unshare_OBJECTS = unshare.$(OBJEXT) +unshare_LDADD = $(LDADD) +unshare_DEPENDENCIES = libtests.a +userfaultfd_SOURCES = userfaultfd.c +userfaultfd_OBJECTS = userfaultfd.$(OBJEXT) +userfaultfd_LDADD = $(LDADD) +userfaultfd_DEPENDENCIES = libtests.a +ustat_SOURCES = ustat.c +ustat_OBJECTS = ustat.$(OBJEXT) +ustat_LDADD = $(LDADD) +ustat_DEPENDENCIES = libtests.a +utime_SOURCES = utime.c +utime_OBJECTS = utime.$(OBJEXT) +utime_LDADD = $(LDADD) +utime_DEPENDENCIES = libtests.a +utimensat_SOURCES = utimensat.c +utimensat_OBJECTS = utimensat.$(OBJEXT) +utimensat_LDADD = $(LDADD) +utimensat_DEPENDENCIES = libtests.a +utimes_SOURCES = utimes.c +utimes_OBJECTS = utimes.$(OBJEXT) +utimes_LDADD = $(LDADD) +utimes_DEPENDENCIES = libtests.a +vfork_f_SOURCES = vfork-f.c +vfork_f_OBJECTS = vfork-f.$(OBJEXT) +vfork_f_LDADD = $(LDADD) +vfork_f_DEPENDENCIES = libtests.a +vhangup_SOURCES = vhangup.c +vhangup_OBJECTS = vhangup.$(OBJEXT) +vhangup_LDADD = $(LDADD) +vhangup_DEPENDENCIES = libtests.a +vmsplice_SOURCES = vmsplice.c +vmsplice_OBJECTS = vmsplice.$(OBJEXT) +vmsplice_LDADD = $(LDADD) +vmsplice_DEPENDENCIES = libtests.a +wait4_SOURCES = wait4.c +wait4_OBJECTS = wait4.$(OBJEXT) +wait4_LDADD = $(LDADD) +wait4_DEPENDENCIES = libtests.a +wait4_v_SOURCES = wait4-v.c +wait4_v_OBJECTS = wait4-v.$(OBJEXT) +wait4_v_LDADD = $(LDADD) +wait4_v_DEPENDENCIES = libtests.a +waitid_SOURCES = waitid.c +waitid_OBJECTS = waitid.$(OBJEXT) +waitid_LDADD = $(LDADD) +waitid_DEPENDENCIES = libtests.a +waitid_v_SOURCES = waitid-v.c +waitid_v_OBJECTS = waitid-v.$(OBJEXT) +waitid_v_LDADD = $(LDADD) +waitid_v_DEPENDENCIES = libtests.a +waitpid_SOURCES = waitpid.c +waitpid_OBJECTS = waitpid.$(OBJEXT) +waitpid_LDADD = $(LDADD) +waitpid_DEPENDENCIES = libtests.a +xattr_SOURCES = xattr.c +xattr_OBJECTS = xattr.$(OBJEXT) +xattr_LDADD = $(LDADD) +xattr_DEPENDENCIES = libtests.a +xattr_strings_SOURCES = xattr-strings.c +xattr_strings_OBJECTS = xattr-strings.$(OBJEXT) +xattr_strings_LDADD = $(LDADD) +xattr_strings_DEPENDENCIES = libtests.a +xet_robust_list_SOURCES = xet_robust_list.c +xet_robust_list_OBJECTS = xet_robust_list.$(OBJEXT) +xet_robust_list_LDADD = $(LDADD) +xet_robust_list_DEPENDENCIES = libtests.a +xetitimer_SOURCES = xetitimer.c +xetitimer_OBJECTS = xetitimer.$(OBJEXT) +xetitimer_LDADD = $(LDADD) +xetitimer_DEPENDENCIES = libtests.a +xetpgid_SOURCES = xetpgid.c +xetpgid_OBJECTS = xetpgid.$(OBJEXT) +xetpgid_LDADD = $(LDADD) +xetpgid_DEPENDENCIES = libtests.a +xetpriority_SOURCES = xetpriority.c +xetpriority_OBJECTS = xetpriority.$(OBJEXT) +xetpriority_LDADD = $(LDADD) +xetpriority_DEPENDENCIES = libtests.a +xettimeofday_SOURCES = xettimeofday.c +xettimeofday_OBJECTS = xettimeofday.$(OBJEXT) +xettimeofday_LDADD = $(LDADD) +xettimeofday_DEPENDENCIES = libtests.a +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libtests_a_SOURCES) _newselect.c accept.c accept4.c \ + access.c acct.c add_key.c adjtimex.c aio.c alarm.c answer.c \ + attach-f-p.c attach-f-p-cmd.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c caps-abbrev.c \ + chmod.c chown.c chown32.c chroot.c clock_adjtime.c \ + clock_nanosleep.c clock_xettime.c copy_file_range.c count-f.c \ + creat.c delete_module.c dup.c dup2.c dup3.c epoll_create.c \ + epoll_create1.c epoll_ctl.c epoll_pwait.c epoll_wait.c \ + erestartsys.c eventfd.c execve.c execve-v.c execveat.c \ + execveat-v.c faccessat.c fadvise64.c fadvise64_64.c \ + fallocate.c fanotify_init.c fanotify_mark.c fchdir.c fchmod.c \ + fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c fcntl64.c \ + fdatasync.c file_handle.c file_ioctl.c filter-unavailable.c \ + finit_module.c flock.c fork-f.c fstat.c fstat64.c fstatat64.c \ + fstatfs.c fstatfs64.c fsync.c ftruncate.c ftruncate64.c \ + futex.c futimesat.c get_mempolicy.c getcpu.c getcwd.c \ + getdents.c getdents64.c getegid.c getegid32.c geteuid.c \ + geteuid32.c getgid.c getgid32.c getgroups.c getgroups32.c \ + getpeername.c getpgrp.c getrandom.c getresgid.c getresgid32.c \ + getresuid.c getresuid32.c getrlimit.c getrusage.c getsid.c \ + getsockname.c getuid.c getuid32.c getxxid.c inet-cmsg.c \ + init_module.c inotify.c inotify_init1.c ioctl.c ioctl_block.c \ + ioctl_dm.c ioctl_dm-v.c ioctl_evdev.c ioctl_evdev-v.c \ + ioctl_loop.c ioctl_loop-nv.c ioctl_loop-v.c ioctl_mtd.c \ + ioctl_rtc.c ioctl_rtc-v.c ioctl_scsi.c ioctl_sg_io_v3.c \ + ioctl_sg_io_v4.c ioctl_sock_gifconf.c ioctl_uffdio.c \ + ioctl_v4l2.c ioperm.c iopl.c ioprio.c ip_mreq.c ipc.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kcmp.c \ + kexec_file_load.c kexec_load.c keyctl.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lookup_dcookie.c \ + lseek.c lstat.c lstat64.c mbind.c membarrier.c memfd_create.c \ + migrate_pages.c mincore.c mkdir.c mkdirat.c mknod.c mknodat.c \ + mlock.c mlock2.c mlockall.c mmap.c mmap64.c mmsg.c \ + mmsg-silent.c mmsg_name.c mmsg_name-v.c mount.c move_pages.c \ + mq.c mq_sendrecv.c mq_sendrecv-read.c mq_sendrecv-write.c \ + msg_control.c msg_control-v.c msg_name.c munlockall.c \ + nanosleep.c net-accept-connect.c net-icmp_filter.c \ + net-sockaddr.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_protocol.c netlink_unix_diag.c newfstatat.c \ + nsyscalls.c old_mmap.c oldfstat.c oldlstat.c oldselect.c \ + oldstat.c open.c openat.c pause.c pc.c perf_event_open.c \ + perf_event_open_nonverbose.c perf_event_open_unabbrev.c \ + personality.c pipe.c pipe2.c pkey_alloc.c pkey_free.c \ + pkey_mprotect.c poll.c ppoll.c prctl-arg2-intptr.c \ + prctl-dumpable.c prctl-name.c prctl-no-args.c \ + prctl-pdeathsig.c prctl-seccomp-filter-v.c \ + prctl-seccomp-strict.c prctl-securebits.c prctl-tid_address.c \ + prctl-tsc.c pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c print_maxfd.c printstr.c prlimit64.c \ + process_vm_readv.c process_vm_writev.c pselect6.c ptrace.c \ + pwritev.c qual_fault.c qual_inject-error-signal.c \ + qual_inject-retval.c qual_inject-signal.c qual_signal.c \ + quotactl.c quotactl-v.c quotactl-xfs.c quotactl-xfs-v.c \ + read-write.c readahead.c readdir.c readlink.c readlinkat.c \ + readv.c reboot.c recvfrom.c recvmmsg-timeout.c recvmsg.c \ + redirect-fds.c remap_file_pages.c rename.c renameat.c \ + renameat2.c request_key.c restart_syscall.c rmdir.c \ + rt_sigpending.c rt_sigprocmask.c rt_sigqueueinfo.c \ + rt_sigsuspend.c rt_sigtimedwait.c rt_tgsigqueueinfo.c \ + sched_get_priority_mxx.c sched_rr_get_interval.c \ + sched_xetaffinity.c sched_xetattr.c sched_xetparam.c \ + sched_xetscheduler.c sched_yield.c scm_rights.c \ + seccomp-filter.c seccomp-filter-v.c seccomp-strict.c select.c \ + semop.c sendfile.c sendfile64.c set_mempolicy.c \ + set_ptracer_any.c setdomainname.c setfsgid.c setfsgid32.c \ + setfsuid.c setfsuid32.c setgid.c setgid32.c setgroups.c \ + setgroups32.c sethostname.c setns.c setregid.c setregid32.c \ + setresgid.c setresgid32.c setresuid.c setresuid32.c setreuid.c \ + setreuid32.c setrlimit.c setuid.c setuid32.c shmxt.c \ + shutdown.c sigaction.c sigaltstack.c siginfo.c \ + signal_receive.c signalfd4.c sigreturn.c sleep.c socketcall.c \ + splice.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ + statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + threads-execve.c time.c timer_create.c timer_xettime.c \ + timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ + ugetrlimit.c uio.c umask.c umount.c umount2.c umoven-illptr.c \ + umovestr.c umovestr-illptr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unix-pair-sendto-recvfrom.c unlink.c \ + unlinkat.c unshare.c userfaultfd.c ustat.c utime.c utimensat.c \ + utimes.c vfork-f.c vhangup.c vmsplice.c wait4.c wait4-v.c \ + waitid.c waitid-v.c waitpid.c xattr.c xattr-strings.c \ + xet_robust_list.c xetitimer.c xetpgid.c xetpriority.c \ + xettimeofday.c +DIST_SOURCES = $(libtests_a_SOURCES) _newselect.c accept.c accept4.c \ + access.c acct.c add_key.c adjtimex.c aio.c alarm.c answer.c \ + attach-f-p.c attach-f-p-cmd.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c caps-abbrev.c \ + chmod.c chown.c chown32.c chroot.c clock_adjtime.c \ + clock_nanosleep.c clock_xettime.c copy_file_range.c count-f.c \ + creat.c delete_module.c dup.c dup2.c dup3.c epoll_create.c \ + epoll_create1.c epoll_ctl.c epoll_pwait.c epoll_wait.c \ + erestartsys.c eventfd.c execve.c execve-v.c execveat.c \ + execveat-v.c faccessat.c fadvise64.c fadvise64_64.c \ + fallocate.c fanotify_init.c fanotify_mark.c fchdir.c fchmod.c \ + fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c fcntl64.c \ + fdatasync.c file_handle.c file_ioctl.c filter-unavailable.c \ + finit_module.c flock.c fork-f.c fstat.c fstat64.c fstatat64.c \ + fstatfs.c fstatfs64.c fsync.c ftruncate.c ftruncate64.c \ + futex.c futimesat.c get_mempolicy.c getcpu.c getcwd.c \ + getdents.c getdents64.c getegid.c getegid32.c geteuid.c \ + geteuid32.c getgid.c getgid32.c getgroups.c getgroups32.c \ + getpeername.c getpgrp.c getrandom.c getresgid.c getresgid32.c \ + getresuid.c getresuid32.c getrlimit.c getrusage.c getsid.c \ + getsockname.c getuid.c getuid32.c getxxid.c inet-cmsg.c \ + init_module.c inotify.c inotify_init1.c ioctl.c ioctl_block.c \ + ioctl_dm.c ioctl_dm-v.c ioctl_evdev.c ioctl_evdev-v.c \ + ioctl_loop.c ioctl_loop-nv.c ioctl_loop-v.c ioctl_mtd.c \ + ioctl_rtc.c ioctl_rtc-v.c ioctl_scsi.c ioctl_sg_io_v3.c \ + ioctl_sg_io_v4.c ioctl_sock_gifconf.c ioctl_uffdio.c \ + ioctl_v4l2.c ioperm.c iopl.c ioprio.c ip_mreq.c ipc.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kcmp.c \ + kexec_file_load.c kexec_load.c keyctl.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lookup_dcookie.c \ + lseek.c lstat.c lstat64.c mbind.c membarrier.c memfd_create.c \ + migrate_pages.c mincore.c mkdir.c mkdirat.c mknod.c mknodat.c \ + mlock.c mlock2.c mlockall.c mmap.c mmap64.c mmsg.c \ + mmsg-silent.c mmsg_name.c mmsg_name-v.c mount.c move_pages.c \ + mq.c mq_sendrecv.c mq_sendrecv-read.c mq_sendrecv-write.c \ + msg_control.c msg_control-v.c msg_name.c munlockall.c \ + nanosleep.c net-accept-connect.c net-icmp_filter.c \ + net-sockaddr.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_protocol.c netlink_unix_diag.c newfstatat.c \ + nsyscalls.c old_mmap.c oldfstat.c oldlstat.c oldselect.c \ + oldstat.c open.c openat.c pause.c pc.c perf_event_open.c \ + perf_event_open_nonverbose.c perf_event_open_unabbrev.c \ + personality.c pipe.c pipe2.c pkey_alloc.c pkey_free.c \ + pkey_mprotect.c poll.c ppoll.c prctl-arg2-intptr.c \ + prctl-dumpable.c prctl-name.c prctl-no-args.c \ + prctl-pdeathsig.c prctl-seccomp-filter-v.c \ + prctl-seccomp-strict.c prctl-securebits.c prctl-tid_address.c \ + prctl-tsc.c pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c print_maxfd.c printstr.c prlimit64.c \ + process_vm_readv.c process_vm_writev.c pselect6.c ptrace.c \ + pwritev.c qual_fault.c qual_inject-error-signal.c \ + qual_inject-retval.c qual_inject-signal.c qual_signal.c \ + quotactl.c quotactl-v.c quotactl-xfs.c quotactl-xfs-v.c \ + read-write.c readahead.c readdir.c readlink.c readlinkat.c \ + readv.c reboot.c recvfrom.c recvmmsg-timeout.c recvmsg.c \ + redirect-fds.c remap_file_pages.c rename.c renameat.c \ + renameat2.c request_key.c restart_syscall.c rmdir.c \ + rt_sigpending.c rt_sigprocmask.c rt_sigqueueinfo.c \ + rt_sigsuspend.c rt_sigtimedwait.c rt_tgsigqueueinfo.c \ + sched_get_priority_mxx.c sched_rr_get_interval.c \ + sched_xetaffinity.c sched_xetattr.c sched_xetparam.c \ + sched_xetscheduler.c sched_yield.c scm_rights.c \ + seccomp-filter.c seccomp-filter-v.c seccomp-strict.c select.c \ + semop.c sendfile.c sendfile64.c set_mempolicy.c \ + set_ptracer_any.c setdomainname.c setfsgid.c setfsgid32.c \ + setfsuid.c setfsuid32.c setgid.c setgid32.c setgroups.c \ + setgroups32.c sethostname.c setns.c setregid.c setregid32.c \ + setresgid.c setresgid32.c setresuid.c setresuid32.c setreuid.c \ + setreuid32.c setrlimit.c setuid.c setuid32.c shmxt.c \ + shutdown.c sigaction.c sigaltstack.c siginfo.c \ + signal_receive.c signalfd4.c sigreturn.c sleep.c socketcall.c \ + splice.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ + statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + threads-execve.c time.c timer_create.c timer_xettime.c \ + timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ + ugetrlimit.c uio.c umask.c umount.c umount2.c umoven-illptr.c \ + umovestr.c umovestr-illptr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unix-pair-sendto-recvfrom.c unlink.c \ + unlinkat.c unshare.c userfaultfd.c ustat.c utime.c utimensat.c \ + utimes.c vfork-f.c vhangup.c vmsplice.c wait4.c wait4-v.c \ + waitid.c waitid-v.c waitpid.c xattr.c xattr-strings.c \ + xet_robust_list.c xetitimer.c xetpgid.c xetpriority.c \ + xettimeofday.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__extra_recursive_targets = check-valgrind-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +#am__EXEEXT_1 = strace-k.test +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = .test +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing aclocal-1.14 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AUTOCONF = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing autoconf +AUTOHEADER = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing autoheader +AUTOMAKE = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing automake-1.14 +AWK = gawk +BUILD_EXEEXT = +BUILD_OBJEXT = +CC = gcc +CCDEPMODE = depmode=gcc3 +CC_FOR_BUILD = gcc +CFLAGS = -g -O2 +CFLAGS_FOR_BUILD = -g -O2 +CODE_COVERAGE_CFLAGS = +CODE_COVERAGE_CPPFLAGS = +CODE_COVERAGE_CXXFLAGS = +CODE_COVERAGE_ENABLED = no +CODE_COVERAGE_LDFLAGS = +CPP = gcc -E +CPPFLAGS = +CPPFLAGS_FOR_BUILD = +CPP_FOR_BUILD = gcc -E +CYGPATH_W = echo +DEB_CHANGELOGTIME = Wed, 15 Feb 2017 11:38:25 -0800 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +ENABLE_VALGRIND_drd = no +ENABLE_VALGRIND_helgrind = no +ENABLE_VALGRIND_memcheck = yes +ENABLE_VALGRIND_sgcheck = +EXEEXT = +GCOV = +GENHTML = +GREP = /bin/grep +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LCOV = +LDFLAGS = +LDFLAGS_FOR_BUILD = +LIBOBJS = +LIBS = +LTLIBOBJS = +MAINT = # +MAKEINFO = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/missing makeinfo +MIPS_ABI = +MKDIR_P = /bin/mkdir -p +OBJEXT = o +PACKAGE = strace +PACKAGE_BUGREPORT = strace-devel@lists.sourceforge.net +PACKAGE_NAME = strace +PACKAGE_STRING = strace 4.16 +PACKAGE_TARNAME = strace +PACKAGE_URL = https://strace.io +PACKAGE_VERSION = 4.16 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +RANLIB = ranlib +RPM_CHANGELOGTIME = Wed Feb 15 2017 +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = +VALGRIND = valgrind +VALGRIND_ENABLED = yes +VERSION = 4.16 +WARN_CFLAGS = -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings +WARN_CFLAGS_FOR_BUILD = -Wall -Wempty-body -Wformat-security -Wignored-qualifiers -Winit-self -Wlogical-op -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wsign-compare -Wtype-limits -Wwrite-strings +abs_builddir = /usr/local/google/home/enh/Downloads/strace-4.16/tests +abs_srcdir = /usr/local/google/home/enh/Downloads/strace-4.16/tests +abs_top_builddir = /usr/local/google/home/enh/Downloads/strace-4.16 +abs_top_srcdir = /usr/local/google/home/enh/Downloads/strace-4.16 +ac_ct_CC = gcc +ac_ct_CC_FOR_BUILD = gcc +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +arch = x86_64 +arch_m32 = i386 +arch_mx32 = x32 +bindir = ${exec_prefix}/bin +build = x86_64-pc-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = pc +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +dl_LIBS = -ldl +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-pc-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /usr/local/google/home/enh/Downloads/strace-4.16/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +libunwind_CPPFLAGS = +libunwind_LDFLAGS = +libunwind_LIBS = +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +valgrind_enabled_tools = memcheck +valgrind_tools = memcheck helgrind drd sgcheck +OS = linux +ARCH = x86_64 +MPERS_NAME = +ARCH_MFLAGS = +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = $(ARCH_MFLAGS) \ + -I$(builddir) \ + -I$(top_builddir)/$(OS)/$(ARCH) \ + -I$(top_srcdir)/$(OS)/$(ARCH) \ + -I$(top_builddir)/$(OS) \ + -I$(top_srcdir)/$(OS) \ + -I$(top_builddir) \ + -I$(top_srcdir) + +AM_LDFLAGS = $(ARCH_MFLAGS) +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + fill_memory.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + libmmsg.c \ + libsocketcall.c \ + overflowuid.c \ + pipe_maxfd.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + signal2name.c \ + sprintrc.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES + +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) +fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mq_LDADD = -lrt $(LDADD) +mq_sendrecv_LDADD = -lrt $(LDADD) +mq_sendrecv_read_LDADD = -lrt $(LDADD) +mq_sendrecv_write_LDADD = -lrt $(LDADD) +newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +threads_execve_LDADD = -lrt -lpthread $(LDADD) +times_LDADD = -lrt $(LDADD) +truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stack_fcall_SOURCES = stack-fcall.c \ + stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c + +LIBUNWIND_TESTS = +#LIBUNWIND_TESTS = strace-k.test +DECODER_TESTS = \ + _newselect.test \ + accept.test \ + accept4.test \ + access.test \ + acct.test \ + add_key.test \ + adjtimex.test \ + aio.test \ + alarm.test \ + bpf.test \ + brk.test \ + btrfs-v.test \ + btrfs-vw.test \ + btrfs-w.test \ + btrfs.test \ + caps-abbrev.test \ + caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ + clock_nanosleep.test \ + clock_xettime.test \ + copy_file_range.test \ + creat.test \ + delete_module.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ + epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ + erestartsys.test \ + eventfd.test \ + execve-v.test \ + execve.test \ + execveat-v.test \ + execveat.test \ + faccessat.test \ + fadvise64.test \ + fadvise64_64.test \ + fallocate.test \ + fanotify_init.test \ + fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ + fcntl.test \ + fcntl64.test \ + fdatasync.test \ + file_handle.test \ + file_ioctl.test \ + finit_module.test \ + flock.test \ + fstat.test \ + fstat64.test \ + fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ + ftruncate.test \ + ftruncate64.test \ + futex.test \ + futimesat.test \ + get_mempolicy.test \ + getcpu.test \ + getcwd.test \ + getdents.test \ + getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpeername.test \ + getpgrp.test \ + getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrlimit.test \ + getrusage.test \ + getsid.test \ + getsockname.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ + inet-cmsg.test \ + init_module.test \ + inotify.test \ + inotify_init1.test \ + ioctl.test \ + ioctl_block.test \ + ioctl_dm-v.test \ + ioctl_dm.test \ + ioctl_evdev-v.test \ + ioctl_evdev.test \ + ioctl_loop-nv.test \ + ioctl_loop-v.test \ + ioctl_loop.test \ + ioctl_mtd.test \ + ioctl_rtc-v.test \ + ioctl_rtc.test \ + ioctl_scsi.test \ + ioctl_sg_io_v3.test \ + ioctl_sg_io_v4.test \ + ioctl_sock_gifconf.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ + ioprio.test \ + ip_mreq.test \ + ipc.test \ + ipc_msg.test \ + ipc_msgbuf.test \ + ipc_sem.test \ + ipc_shm.test \ + kcmp.test \ + kexec_file_load.test \ + kexec_load.test \ + keyctl.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ + llseek.test \ + lookup_dcookie.test \ + lseek.test \ + lstat.test \ + lstat64.test \ + mbind.test \ + membarrier.test \ + memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ + mlock2.test \ + mlockall.test \ + mmap.test \ + mmap64.test \ + mmsg-silent.test \ + mmsg.test \ + mmsg_name-v.test \ + mmsg_name.test \ + mount.test \ + move_pages.test \ + mq.test \ + mq_sendrecv-read.test \ + mq_sendrecv-write.test \ + mq_sendrecv.test \ + msg_control-v.test \ + msg_control.test \ + msg_name.test \ + munlockall.test \ + nanosleep.test \ + net-icmp_filter.test \ + net-sockaddr.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ + net.test \ + netlink_protocol.test \ + newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ + oldfstat.test \ + oldlstat.test \ + oldselect.test \ + oldstat.test \ + open.test \ + openat.test \ + pause.test \ + perf_event_open.test \ + perf_event_open_nonverbose.test \ + perf_event_open_unabbrev.test \ + personality.test \ + pipe.test \ + pipe2.test \ + pkey_alloc.test \ + pkey_free.test \ + pkey_mprotect.test \ + poll.test \ + ppoll.test \ + prctl-arg2-intptr.test \ + prctl-dumpable.test \ + prctl-name.test \ + prctl-no-args.test \ + prctl-pdeathsig.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + prctl-securebits.test \ + prctl-tid_address.test \ + prctl-tsc.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv.test \ + preadv2-pwritev2.test \ + printstr.test \ + prlimit64.test \ + process_vm_readv.test \ + process_vm_writev.test \ + pselect6.test \ + ptrace.test \ + pwritev.test \ + qual_fault-exit_group.test \ + quotactl-v.test \ + quotactl-xfs-v.test \ + quotactl-xfs.test \ + quotactl.test \ + read-write.test \ + readahead.test \ + readdir.test \ + readlink.test \ + readlinkat.test \ + readv.test \ + reboot.test \ + recvfrom.test \ + recvmmsg-timeout.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + request_key.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ + rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ + sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ + scm_rights-fd.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ + select.test \ + semop.test \ + sendfile.test \ + sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setns.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setrlimit.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ + shutdown.test \ + sigaction.test \ + sigaltstack.test \ + siginfo.test \ + signalfd4.test \ + sigreturn.test \ + socketcall.test \ + splice.test \ + stat.test \ + stat64.test \ + statfs.test \ + statfs64.test \ + sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ + sysinfo.test \ + syslog.test \ + tee.test \ + time.test \ + timer_create.test \ + timer_xettime.test \ + timerfd_xettime.test \ + times-fail.test \ + times.test \ + truncate.test \ + truncate64.test \ + ugetrlimit.test \ + uio.test \ + umask.test \ + umount.test \ + umount2.test \ + umoven-illptr.test \ + umovestr-illptr.test \ + umovestr.test \ + umovestr2.test \ + umovestr3.test \ + uname.test \ + unix-pair-send-recv.test \ + unix-pair-sendto-recvfrom.test \ + unlink.test \ + unlinkat.test \ + unshare.test \ + userfaultfd.test \ + ustat.test \ + utime.test \ + utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ + wait4-v.test \ + wait4.test \ + waitid-v.test \ + waitid.test \ + waitpid.test \ + xattr-strings.test \ + xattr.test \ + xet_robust_list.test \ + xetitimer.test \ + xetpgid.test \ + xetpriority.test \ + xettimeofday.test \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ + count.test \ + detach-running.test \ + detach-sleeping.test \ + detach-stopped.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + options-syntax.test \ + pc.test \ + qual_fault-syntax.test \ + qual_fault.test \ + qual_inject-error-signal.test \ + qual_inject-retval.test \ + qual_inject-signal.test \ + qual_inject-syntax.test \ + qual_signal.test \ + qual_syscall.test \ + redirect-fds.test \ + redirect.test \ + restart_syscall.test \ + signal_receive.test \ + strace-C.test \ + strace-E.test \ + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + threads-execve.test \ + vfork-f.test \ + # end of MISC_TESTS + +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) +TEST_LOG_COMPILER = env +AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh +VALGRIND_FLAGS = --quiet +VALGRIND_SUPPRESSIONS_FILES = $(srcdir)/strace.supp +EXTRA_DIST = init.sh run.sh match.awk \ + caps-abbrev.awk \ + caps.awk \ + count-f.expected \ + eventfd.expected \ + fadvise.h \ + filter-unavailable.expected \ + fstatat.c \ + fstatx.c \ + getresugid.c \ + init_delete_module.h \ + ipc.sh \ + ipc_msgbuf.expected \ + ksysent.sed \ + lstatx.c \ + net.expected \ + oldselect.expected \ + pipe.expected \ + ppoll-v.expected \ + ppoll.expected \ + process_vm_readv_writev.c \ + qual_fault-exit_group.expected \ + qual_inject-error-signal.expected \ + qual_inject-signal.expected \ + quotactl.h \ + scno_tampering.sh \ + setfsugid.c \ + setresugid.c \ + setreugid.c \ + setugid.c \ + sigaction.awk \ + sigaltstack.expected \ + sockname.c \ + statfs.expected \ + statx.sh \ + strace-C.expected \ + strace-E.expected \ + strace-T.expected \ + strace-ff.expected \ + strace-k.test \ + strace-r.expected \ + strace.supp \ + struct_flock.c \ + sun_path.expected \ + uio.expected \ + umode_t.c \ + umovestr.expected \ + unix-pair-send-recv.expected \ + unix-pair-sendto-recvfrom.expected \ + xchownx.c \ + xgetrlimit.c \ + xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ + xstatx.c \ + $(TESTS) + +objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT))) +CLEANFILES = ksysent.h $(TESTS:=.tmp) syscallent.i scno.h +SCNO_CPPFLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(ARCH_MFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) + +digits = [[:digit:]][[:digit:]]* +al_nums = [[:alnum:]_][[:alnum:]_]* +SCNO_SED = /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 +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(srcdir)/../scno.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/../scno.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkLIBRARIES: + -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) + +libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtests.a + $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) + $(AM_V_at)$(RANLIB) libtests.a + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) + +_newselect$(EXEEXT): $(_newselect_OBJECTS) $(_newselect_DEPENDENCIES) $(EXTRA__newselect_DEPENDENCIES) + @rm -f _newselect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(_newselect_OBJECTS) $(_newselect_LDADD) $(LIBS) + +accept$(EXEEXT): $(accept_OBJECTS) $(accept_DEPENDENCIES) $(EXTRA_accept_DEPENDENCIES) + @rm -f accept$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(accept_OBJECTS) $(accept_LDADD) $(LIBS) + +accept4$(EXEEXT): $(accept4_OBJECTS) $(accept4_DEPENDENCIES) $(EXTRA_accept4_DEPENDENCIES) + @rm -f accept4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(accept4_OBJECTS) $(accept4_LDADD) $(LIBS) + +access$(EXEEXT): $(access_OBJECTS) $(access_DEPENDENCIES) $(EXTRA_access_DEPENDENCIES) + @rm -f access$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(access_OBJECTS) $(access_LDADD) $(LIBS) + +acct$(EXEEXT): $(acct_OBJECTS) $(acct_DEPENDENCIES) $(EXTRA_acct_DEPENDENCIES) + @rm -f acct$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(acct_OBJECTS) $(acct_LDADD) $(LIBS) + +add_key$(EXEEXT): $(add_key_OBJECTS) $(add_key_DEPENDENCIES) $(EXTRA_add_key_DEPENDENCIES) + @rm -f add_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(add_key_OBJECTS) $(add_key_LDADD) $(LIBS) + +adjtimex$(EXEEXT): $(adjtimex_OBJECTS) $(adjtimex_DEPENDENCIES) $(EXTRA_adjtimex_DEPENDENCIES) + @rm -f adjtimex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(adjtimex_OBJECTS) $(adjtimex_LDADD) $(LIBS) + +aio$(EXEEXT): $(aio_OBJECTS) $(aio_DEPENDENCIES) $(EXTRA_aio_DEPENDENCIES) + @rm -f aio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(aio_OBJECTS) $(aio_LDADD) $(LIBS) + +alarm$(EXEEXT): $(alarm_OBJECTS) $(alarm_DEPENDENCIES) $(EXTRA_alarm_DEPENDENCIES) + @rm -f alarm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(alarm_OBJECTS) $(alarm_LDADD) $(LIBS) + +answer$(EXEEXT): $(answer_OBJECTS) $(answer_DEPENDENCIES) $(EXTRA_answer_DEPENDENCIES) + @rm -f answer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(answer_OBJECTS) $(answer_LDADD) $(LIBS) + +attach-f-p$(EXEEXT): $(attach_f_p_OBJECTS) $(attach_f_p_DEPENDENCIES) $(EXTRA_attach_f_p_DEPENDENCIES) + @rm -f attach-f-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_OBJECTS) $(attach_f_p_LDADD) $(LIBS) + +attach-f-p-cmd$(EXEEXT): $(attach_f_p_cmd_OBJECTS) $(attach_f_p_cmd_DEPENDENCIES) $(EXTRA_attach_f_p_cmd_DEPENDENCIES) + @rm -f attach-f-p-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_cmd_OBJECTS) $(attach_f_p_cmd_LDADD) $(LIBS) + +attach-p-cmd-cmd$(EXEEXT): $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_DEPENDENCIES) $(EXTRA_attach_p_cmd_cmd_DEPENDENCIES) + @rm -f attach-p-cmd-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_LDADD) $(LIBS) + +attach-p-cmd-p$(EXEEXT): $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_DEPENDENCIES) $(EXTRA_attach_p_cmd_p_DEPENDENCIES) + @rm -f attach-p-cmd-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_LDADD) $(LIBS) + +bpf$(EXEEXT): $(bpf_OBJECTS) $(bpf_DEPENDENCIES) $(EXTRA_bpf_DEPENDENCIES) + @rm -f bpf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(bpf_OBJECTS) $(bpf_LDADD) $(LIBS) + +brk$(EXEEXT): $(brk_OBJECTS) $(brk_DEPENDENCIES) $(EXTRA_brk_DEPENDENCIES) + @rm -f brk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(brk_OBJECTS) $(brk_LDADD) $(LIBS) + +btrfs$(EXEEXT): $(btrfs_OBJECTS) $(btrfs_DEPENDENCIES) $(EXTRA_btrfs_DEPENDENCIES) + @rm -f btrfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(btrfs_OBJECTS) $(btrfs_LDADD) $(LIBS) + +caps$(EXEEXT): $(caps_OBJECTS) $(caps_DEPENDENCIES) $(EXTRA_caps_DEPENDENCIES) + @rm -f caps$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(caps_OBJECTS) $(caps_LDADD) $(LIBS) + +caps-abbrev$(EXEEXT): $(caps_abbrev_OBJECTS) $(caps_abbrev_DEPENDENCIES) $(EXTRA_caps_abbrev_DEPENDENCIES) + @rm -f caps-abbrev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(caps_abbrev_OBJECTS) $(caps_abbrev_LDADD) $(LIBS) + +chmod$(EXEEXT): $(chmod_OBJECTS) $(chmod_DEPENDENCIES) $(EXTRA_chmod_DEPENDENCIES) + @rm -f chmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chmod_OBJECTS) $(chmod_LDADD) $(LIBS) + +chown$(EXEEXT): $(chown_OBJECTS) $(chown_DEPENDENCIES) $(EXTRA_chown_DEPENDENCIES) + @rm -f chown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown_OBJECTS) $(chown_LDADD) $(LIBS) + +chown32$(EXEEXT): $(chown32_OBJECTS) $(chown32_DEPENDENCIES) $(EXTRA_chown32_DEPENDENCIES) + @rm -f chown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown32_OBJECTS) $(chown32_LDADD) $(LIBS) + +chroot$(EXEEXT): $(chroot_OBJECTS) $(chroot_DEPENDENCIES) $(EXTRA_chroot_DEPENDENCIES) + @rm -f chroot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chroot_OBJECTS) $(chroot_LDADD) $(LIBS) + +clock_adjtime$(EXEEXT): $(clock_adjtime_OBJECTS) $(clock_adjtime_DEPENDENCIES) $(EXTRA_clock_adjtime_DEPENDENCIES) + @rm -f clock_adjtime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_adjtime_OBJECTS) $(clock_adjtime_LDADD) $(LIBS) + +clock_nanosleep$(EXEEXT): $(clock_nanosleep_OBJECTS) $(clock_nanosleep_DEPENDENCIES) $(EXTRA_clock_nanosleep_DEPENDENCIES) + @rm -f clock_nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_nanosleep_OBJECTS) $(clock_nanosleep_LDADD) $(LIBS) + +clock_xettime$(EXEEXT): $(clock_xettime_OBJECTS) $(clock_xettime_DEPENDENCIES) $(EXTRA_clock_xettime_DEPENDENCIES) + @rm -f clock_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_xettime_OBJECTS) $(clock_xettime_LDADD) $(LIBS) + +copy_file_range$(EXEEXT): $(copy_file_range_OBJECTS) $(copy_file_range_DEPENDENCIES) $(EXTRA_copy_file_range_DEPENDENCIES) + @rm -f copy_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(copy_file_range_OBJECTS) $(copy_file_range_LDADD) $(LIBS) + +count-f$(EXEEXT): $(count_f_OBJECTS) $(count_f_DEPENDENCIES) $(EXTRA_count_f_DEPENDENCIES) + @rm -f count-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(count_f_OBJECTS) $(count_f_LDADD) $(LIBS) + +creat$(EXEEXT): $(creat_OBJECTS) $(creat_DEPENDENCIES) $(EXTRA_creat_DEPENDENCIES) + @rm -f creat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(creat_OBJECTS) $(creat_LDADD) $(LIBS) + +delete_module$(EXEEXT): $(delete_module_OBJECTS) $(delete_module_DEPENDENCIES) $(EXTRA_delete_module_DEPENDENCIES) + @rm -f delete_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(delete_module_OBJECTS) $(delete_module_LDADD) $(LIBS) + +dup$(EXEEXT): $(dup_OBJECTS) $(dup_DEPENDENCIES) $(EXTRA_dup_DEPENDENCIES) + @rm -f dup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup_OBJECTS) $(dup_LDADD) $(LIBS) + +dup2$(EXEEXT): $(dup2_OBJECTS) $(dup2_DEPENDENCIES) $(EXTRA_dup2_DEPENDENCIES) + @rm -f dup2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup2_OBJECTS) $(dup2_LDADD) $(LIBS) + +dup3$(EXEEXT): $(dup3_OBJECTS) $(dup3_DEPENDENCIES) $(EXTRA_dup3_DEPENDENCIES) + @rm -f dup3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup3_OBJECTS) $(dup3_LDADD) $(LIBS) + +epoll_create$(EXEEXT): $(epoll_create_OBJECTS) $(epoll_create_DEPENDENCIES) $(EXTRA_epoll_create_DEPENDENCIES) + @rm -f epoll_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create_OBJECTS) $(epoll_create_LDADD) $(LIBS) + +epoll_create1$(EXEEXT): $(epoll_create1_OBJECTS) $(epoll_create1_DEPENDENCIES) $(EXTRA_epoll_create1_DEPENDENCIES) + @rm -f epoll_create1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create1_OBJECTS) $(epoll_create1_LDADD) $(LIBS) + +epoll_ctl$(EXEEXT): $(epoll_ctl_OBJECTS) $(epoll_ctl_DEPENDENCIES) $(EXTRA_epoll_ctl_DEPENDENCIES) + @rm -f epoll_ctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_ctl_OBJECTS) $(epoll_ctl_LDADD) $(LIBS) + +epoll_pwait$(EXEEXT): $(epoll_pwait_OBJECTS) $(epoll_pwait_DEPENDENCIES) $(EXTRA_epoll_pwait_DEPENDENCIES) + @rm -f epoll_pwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_pwait_OBJECTS) $(epoll_pwait_LDADD) $(LIBS) + +epoll_wait$(EXEEXT): $(epoll_wait_OBJECTS) $(epoll_wait_DEPENDENCIES) $(EXTRA_epoll_wait_DEPENDENCIES) + @rm -f epoll_wait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_wait_OBJECTS) $(epoll_wait_LDADD) $(LIBS) + +erestartsys$(EXEEXT): $(erestartsys_OBJECTS) $(erestartsys_DEPENDENCIES) $(EXTRA_erestartsys_DEPENDENCIES) + @rm -f erestartsys$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(erestartsys_OBJECTS) $(erestartsys_LDADD) $(LIBS) + +eventfd$(EXEEXT): $(eventfd_OBJECTS) $(eventfd_DEPENDENCIES) $(EXTRA_eventfd_DEPENDENCIES) + @rm -f eventfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(eventfd_OBJECTS) $(eventfd_LDADD) $(LIBS) + +execve$(EXEEXT): $(execve_OBJECTS) $(execve_DEPENDENCIES) $(EXTRA_execve_DEPENDENCIES) + @rm -f execve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_OBJECTS) $(execve_LDADD) $(LIBS) + +execve-v$(EXEEXT): $(execve_v_OBJECTS) $(execve_v_DEPENDENCIES) $(EXTRA_execve_v_DEPENDENCIES) + @rm -f execve-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_v_OBJECTS) $(execve_v_LDADD) $(LIBS) + +execveat$(EXEEXT): $(execveat_OBJECTS) $(execveat_DEPENDENCIES) $(EXTRA_execveat_DEPENDENCIES) + @rm -f execveat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_OBJECTS) $(execveat_LDADD) $(LIBS) + +execveat-v$(EXEEXT): $(execveat_v_OBJECTS) $(execveat_v_DEPENDENCIES) $(EXTRA_execveat_v_DEPENDENCIES) + @rm -f execveat-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_v_OBJECTS) $(execveat_v_LDADD) $(LIBS) + +faccessat$(EXEEXT): $(faccessat_OBJECTS) $(faccessat_DEPENDENCIES) $(EXTRA_faccessat_DEPENDENCIES) + @rm -f faccessat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(faccessat_OBJECTS) $(faccessat_LDADD) $(LIBS) + +fadvise64$(EXEEXT): $(fadvise64_OBJECTS) $(fadvise64_DEPENDENCIES) $(EXTRA_fadvise64_DEPENDENCIES) + @rm -f fadvise64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fadvise64_OBJECTS) $(fadvise64_LDADD) $(LIBS) + +fadvise64_64$(EXEEXT): $(fadvise64_64_OBJECTS) $(fadvise64_64_DEPENDENCIES) $(EXTRA_fadvise64_64_DEPENDENCIES) + @rm -f fadvise64_64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fadvise64_64_OBJECTS) $(fadvise64_64_LDADD) $(LIBS) + +fallocate$(EXEEXT): $(fallocate_OBJECTS) $(fallocate_DEPENDENCIES) $(EXTRA_fallocate_DEPENDENCIES) + @rm -f fallocate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fallocate_OBJECTS) $(fallocate_LDADD) $(LIBS) + +fanotify_init$(EXEEXT): $(fanotify_init_OBJECTS) $(fanotify_init_DEPENDENCIES) $(EXTRA_fanotify_init_DEPENDENCIES) + @rm -f fanotify_init$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fanotify_init_OBJECTS) $(fanotify_init_LDADD) $(LIBS) + +fanotify_mark$(EXEEXT): $(fanotify_mark_OBJECTS) $(fanotify_mark_DEPENDENCIES) $(EXTRA_fanotify_mark_DEPENDENCIES) + @rm -f fanotify_mark$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fanotify_mark_OBJECTS) $(fanotify_mark_LDADD) $(LIBS) + +fchdir$(EXEEXT): $(fchdir_OBJECTS) $(fchdir_DEPENDENCIES) $(EXTRA_fchdir_DEPENDENCIES) + @rm -f fchdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchdir_OBJECTS) $(fchdir_LDADD) $(LIBS) + +fchmod$(EXEEXT): $(fchmod_OBJECTS) $(fchmod_DEPENDENCIES) $(EXTRA_fchmod_DEPENDENCIES) + @rm -f fchmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmod_OBJECTS) $(fchmod_LDADD) $(LIBS) + +fchmodat$(EXEEXT): $(fchmodat_OBJECTS) $(fchmodat_DEPENDENCIES) $(EXTRA_fchmodat_DEPENDENCIES) + @rm -f fchmodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmodat_OBJECTS) $(fchmodat_LDADD) $(LIBS) + +fchown$(EXEEXT): $(fchown_OBJECTS) $(fchown_DEPENDENCIES) $(EXTRA_fchown_DEPENDENCIES) + @rm -f fchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown_OBJECTS) $(fchown_LDADD) $(LIBS) + +fchown32$(EXEEXT): $(fchown32_OBJECTS) $(fchown32_DEPENDENCIES) $(EXTRA_fchown32_DEPENDENCIES) + @rm -f fchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown32_OBJECTS) $(fchown32_LDADD) $(LIBS) + +fchownat$(EXEEXT): $(fchownat_OBJECTS) $(fchownat_DEPENDENCIES) $(EXTRA_fchownat_DEPENDENCIES) + @rm -f fchownat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchownat_OBJECTS) $(fchownat_LDADD) $(LIBS) + +fcntl$(EXEEXT): $(fcntl_OBJECTS) $(fcntl_DEPENDENCIES) $(EXTRA_fcntl_DEPENDENCIES) + @rm -f fcntl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcntl_OBJECTS) $(fcntl_LDADD) $(LIBS) + +fcntl64$(EXEEXT): $(fcntl64_OBJECTS) $(fcntl64_DEPENDENCIES) $(EXTRA_fcntl64_DEPENDENCIES) + @rm -f fcntl64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcntl64_OBJECTS) $(fcntl64_LDADD) $(LIBS) + +fdatasync$(EXEEXT): $(fdatasync_OBJECTS) $(fdatasync_DEPENDENCIES) $(EXTRA_fdatasync_DEPENDENCIES) + @rm -f fdatasync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fdatasync_OBJECTS) $(fdatasync_LDADD) $(LIBS) + +file_handle$(EXEEXT): $(file_handle_OBJECTS) $(file_handle_DEPENDENCIES) $(EXTRA_file_handle_DEPENDENCIES) + @rm -f file_handle$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_handle_OBJECTS) $(file_handle_LDADD) $(LIBS) + +file_ioctl$(EXEEXT): $(file_ioctl_OBJECTS) $(file_ioctl_DEPENDENCIES) $(EXTRA_file_ioctl_DEPENDENCIES) + @rm -f file_ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_ioctl_OBJECTS) $(file_ioctl_LDADD) $(LIBS) + +filter-unavailable$(EXEEXT): $(filter_unavailable_OBJECTS) $(filter_unavailable_DEPENDENCIES) $(EXTRA_filter_unavailable_DEPENDENCIES) + @rm -f filter-unavailable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(filter_unavailable_OBJECTS) $(filter_unavailable_LDADD) $(LIBS) + +finit_module$(EXEEXT): $(finit_module_OBJECTS) $(finit_module_DEPENDENCIES) $(EXTRA_finit_module_DEPENDENCIES) + @rm -f finit_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(finit_module_OBJECTS) $(finit_module_LDADD) $(LIBS) + +flock$(EXEEXT): $(flock_OBJECTS) $(flock_DEPENDENCIES) $(EXTRA_flock_DEPENDENCIES) + @rm -f flock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(flock_OBJECTS) $(flock_LDADD) $(LIBS) + +fork-f$(EXEEXT): $(fork_f_OBJECTS) $(fork_f_DEPENDENCIES) $(EXTRA_fork_f_DEPENDENCIES) + @rm -f fork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fork_f_OBJECTS) $(fork_f_LDADD) $(LIBS) + +fstat$(EXEEXT): $(fstat_OBJECTS) $(fstat_DEPENDENCIES) $(EXTRA_fstat_DEPENDENCIES) + @rm -f fstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstat_OBJECTS) $(fstat_LDADD) $(LIBS) + +fstat64$(EXEEXT): $(fstat64_OBJECTS) $(fstat64_DEPENDENCIES) $(EXTRA_fstat64_DEPENDENCIES) + @rm -f fstat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstat64_OBJECTS) $(fstat64_LDADD) $(LIBS) + +fstatat64$(EXEEXT): $(fstatat64_OBJECTS) $(fstatat64_DEPENDENCIES) $(EXTRA_fstatat64_DEPENDENCIES) + @rm -f fstatat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatat64_OBJECTS) $(fstatat64_LDADD) $(LIBS) + +fstatfs$(EXEEXT): $(fstatfs_OBJECTS) $(fstatfs_DEPENDENCIES) $(EXTRA_fstatfs_DEPENDENCIES) + @rm -f fstatfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs_OBJECTS) $(fstatfs_LDADD) $(LIBS) + +fstatfs64$(EXEEXT): $(fstatfs64_OBJECTS) $(fstatfs64_DEPENDENCIES) $(EXTRA_fstatfs64_DEPENDENCIES) + @rm -f fstatfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs64_OBJECTS) $(fstatfs64_LDADD) $(LIBS) + +fsync$(EXEEXT): $(fsync_OBJECTS) $(fsync_DEPENDENCIES) $(EXTRA_fsync_DEPENDENCIES) + @rm -f fsync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fsync_OBJECTS) $(fsync_LDADD) $(LIBS) + +ftruncate$(EXEEXT): $(ftruncate_OBJECTS) $(ftruncate_DEPENDENCIES) $(EXTRA_ftruncate_DEPENDENCIES) + @rm -f ftruncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftruncate_OBJECTS) $(ftruncate_LDADD) $(LIBS) + +ftruncate64$(EXEEXT): $(ftruncate64_OBJECTS) $(ftruncate64_DEPENDENCIES) $(EXTRA_ftruncate64_DEPENDENCIES) + @rm -f ftruncate64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftruncate64_OBJECTS) $(ftruncate64_LDADD) $(LIBS) + +futex$(EXEEXT): $(futex_OBJECTS) $(futex_DEPENDENCIES) $(EXTRA_futex_DEPENDENCIES) + @rm -f futex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futex_OBJECTS) $(futex_LDADD) $(LIBS) + +futimesat$(EXEEXT): $(futimesat_OBJECTS) $(futimesat_DEPENDENCIES) $(EXTRA_futimesat_DEPENDENCIES) + @rm -f futimesat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futimesat_OBJECTS) $(futimesat_LDADD) $(LIBS) + +get_mempolicy$(EXEEXT): $(get_mempolicy_OBJECTS) $(get_mempolicy_DEPENDENCIES) $(EXTRA_get_mempolicy_DEPENDENCIES) + @rm -f get_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(get_mempolicy_OBJECTS) $(get_mempolicy_LDADD) $(LIBS) + +getcpu$(EXEEXT): $(getcpu_OBJECTS) $(getcpu_DEPENDENCIES) $(EXTRA_getcpu_DEPENDENCIES) + @rm -f getcpu$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcpu_OBJECTS) $(getcpu_LDADD) $(LIBS) + +getcwd$(EXEEXT): $(getcwd_OBJECTS) $(getcwd_DEPENDENCIES) $(EXTRA_getcwd_DEPENDENCIES) + @rm -f getcwd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcwd_OBJECTS) $(getcwd_LDADD) $(LIBS) + +getdents$(EXEEXT): $(getdents_OBJECTS) $(getdents_DEPENDENCIES) $(EXTRA_getdents_DEPENDENCIES) + @rm -f getdents$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getdents_OBJECTS) $(getdents_LDADD) $(LIBS) + +getdents64$(EXEEXT): $(getdents64_OBJECTS) $(getdents64_DEPENDENCIES) $(EXTRA_getdents64_DEPENDENCIES) + @rm -f getdents64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getdents64_OBJECTS) $(getdents64_LDADD) $(LIBS) + +getegid$(EXEEXT): $(getegid_OBJECTS) $(getegid_DEPENDENCIES) $(EXTRA_getegid_DEPENDENCIES) + @rm -f getegid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid_OBJECTS) $(getegid_LDADD) $(LIBS) + +getegid32$(EXEEXT): $(getegid32_OBJECTS) $(getegid32_DEPENDENCIES) $(EXTRA_getegid32_DEPENDENCIES) + @rm -f getegid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid32_OBJECTS) $(getegid32_LDADD) $(LIBS) + +geteuid$(EXEEXT): $(geteuid_OBJECTS) $(geteuid_DEPENDENCIES) $(EXTRA_geteuid_DEPENDENCIES) + @rm -f geteuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid_OBJECTS) $(geteuid_LDADD) $(LIBS) + +geteuid32$(EXEEXT): $(geteuid32_OBJECTS) $(geteuid32_DEPENDENCIES) $(EXTRA_geteuid32_DEPENDENCIES) + @rm -f geteuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid32_OBJECTS) $(geteuid32_LDADD) $(LIBS) + +getgid$(EXEEXT): $(getgid_OBJECTS) $(getgid_DEPENDENCIES) $(EXTRA_getgid_DEPENDENCIES) + @rm -f getgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid_OBJECTS) $(getgid_LDADD) $(LIBS) + +getgid32$(EXEEXT): $(getgid32_OBJECTS) $(getgid32_DEPENDENCIES) $(EXTRA_getgid32_DEPENDENCIES) + @rm -f getgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid32_OBJECTS) $(getgid32_LDADD) $(LIBS) + +getgroups$(EXEEXT): $(getgroups_OBJECTS) $(getgroups_DEPENDENCIES) $(EXTRA_getgroups_DEPENDENCIES) + @rm -f getgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups_OBJECTS) $(getgroups_LDADD) $(LIBS) + +getgroups32$(EXEEXT): $(getgroups32_OBJECTS) $(getgroups32_DEPENDENCIES) $(EXTRA_getgroups32_DEPENDENCIES) + @rm -f getgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups32_OBJECTS) $(getgroups32_LDADD) $(LIBS) + +getpeername$(EXEEXT): $(getpeername_OBJECTS) $(getpeername_DEPENDENCIES) $(EXTRA_getpeername_DEPENDENCIES) + @rm -f getpeername$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpeername_OBJECTS) $(getpeername_LDADD) $(LIBS) + +getpgrp$(EXEEXT): $(getpgrp_OBJECTS) $(getpgrp_DEPENDENCIES) $(EXTRA_getpgrp_DEPENDENCIES) + @rm -f getpgrp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpgrp_OBJECTS) $(getpgrp_LDADD) $(LIBS) + +getrandom$(EXEEXT): $(getrandom_OBJECTS) $(getrandom_DEPENDENCIES) $(EXTRA_getrandom_DEPENDENCIES) + @rm -f getrandom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrandom_OBJECTS) $(getrandom_LDADD) $(LIBS) + +getresgid$(EXEEXT): $(getresgid_OBJECTS) $(getresgid_DEPENDENCIES) $(EXTRA_getresgid_DEPENDENCIES) + @rm -f getresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid_OBJECTS) $(getresgid_LDADD) $(LIBS) + +getresgid32$(EXEEXT): $(getresgid32_OBJECTS) $(getresgid32_DEPENDENCIES) $(EXTRA_getresgid32_DEPENDENCIES) + @rm -f getresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid32_OBJECTS) $(getresgid32_LDADD) $(LIBS) + +getresuid$(EXEEXT): $(getresuid_OBJECTS) $(getresuid_DEPENDENCIES) $(EXTRA_getresuid_DEPENDENCIES) + @rm -f getresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid_OBJECTS) $(getresuid_LDADD) $(LIBS) + +getresuid32$(EXEEXT): $(getresuid32_OBJECTS) $(getresuid32_DEPENDENCIES) $(EXTRA_getresuid32_DEPENDENCIES) + @rm -f getresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid32_OBJECTS) $(getresuid32_LDADD) $(LIBS) + +getrlimit$(EXEEXT): $(getrlimit_OBJECTS) $(getrlimit_DEPENDENCIES) $(EXTRA_getrlimit_DEPENDENCIES) + @rm -f getrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrlimit_OBJECTS) $(getrlimit_LDADD) $(LIBS) + +getrusage$(EXEEXT): $(getrusage_OBJECTS) $(getrusage_DEPENDENCIES) $(EXTRA_getrusage_DEPENDENCIES) + @rm -f getrusage$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrusage_OBJECTS) $(getrusage_LDADD) $(LIBS) + +getsid$(EXEEXT): $(getsid_OBJECTS) $(getsid_DEPENDENCIES) $(EXTRA_getsid_DEPENDENCIES) + @rm -f getsid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsid_OBJECTS) $(getsid_LDADD) $(LIBS) + +getsockname$(EXEEXT): $(getsockname_OBJECTS) $(getsockname_DEPENDENCIES) $(EXTRA_getsockname_DEPENDENCIES) + @rm -f getsockname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsockname_OBJECTS) $(getsockname_LDADD) $(LIBS) + +getuid$(EXEEXT): $(getuid_OBJECTS) $(getuid_DEPENDENCIES) $(EXTRA_getuid_DEPENDENCIES) + @rm -f getuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid_OBJECTS) $(getuid_LDADD) $(LIBS) + +getuid32$(EXEEXT): $(getuid32_OBJECTS) $(getuid32_DEPENDENCIES) $(EXTRA_getuid32_DEPENDENCIES) + @rm -f getuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid32_OBJECTS) $(getuid32_LDADD) $(LIBS) + +getxxid$(EXEEXT): $(getxxid_OBJECTS) $(getxxid_DEPENDENCIES) $(EXTRA_getxxid_DEPENDENCIES) + @rm -f getxxid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getxxid_OBJECTS) $(getxxid_LDADD) $(LIBS) + +inet-cmsg$(EXEEXT): $(inet_cmsg_OBJECTS) $(inet_cmsg_DEPENDENCIES) $(EXTRA_inet_cmsg_DEPENDENCIES) + @rm -f inet-cmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inet_cmsg_OBJECTS) $(inet_cmsg_LDADD) $(LIBS) + +init_module$(EXEEXT): $(init_module_OBJECTS) $(init_module_DEPENDENCIES) $(EXTRA_init_module_DEPENDENCIES) + @rm -f init_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(init_module_OBJECTS) $(init_module_LDADD) $(LIBS) + +inotify$(EXEEXT): $(inotify_OBJECTS) $(inotify_DEPENDENCIES) $(EXTRA_inotify_DEPENDENCIES) + @rm -f inotify$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inotify_OBJECTS) $(inotify_LDADD) $(LIBS) + +inotify_init1$(EXEEXT): $(inotify_init1_OBJECTS) $(inotify_init1_DEPENDENCIES) $(EXTRA_inotify_init1_DEPENDENCIES) + @rm -f inotify_init1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inotify_init1_OBJECTS) $(inotify_init1_LDADD) $(LIBS) + +ioctl$(EXEEXT): $(ioctl_OBJECTS) $(ioctl_DEPENDENCIES) $(EXTRA_ioctl_DEPENDENCIES) + @rm -f ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_OBJECTS) $(ioctl_LDADD) $(LIBS) + +ioctl_block$(EXEEXT): $(ioctl_block_OBJECTS) $(ioctl_block_DEPENDENCIES) $(EXTRA_ioctl_block_DEPENDENCIES) + @rm -f ioctl_block$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_block_OBJECTS) $(ioctl_block_LDADD) $(LIBS) + +ioctl_dm$(EXEEXT): $(ioctl_dm_OBJECTS) $(ioctl_dm_DEPENDENCIES) $(EXTRA_ioctl_dm_DEPENDENCIES) + @rm -f ioctl_dm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_dm_OBJECTS) $(ioctl_dm_LDADD) $(LIBS) + +ioctl_dm-v$(EXEEXT): $(ioctl_dm_v_OBJECTS) $(ioctl_dm_v_DEPENDENCIES) $(EXTRA_ioctl_dm_v_DEPENDENCIES) + @rm -f ioctl_dm-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_dm_v_OBJECTS) $(ioctl_dm_v_LDADD) $(LIBS) + +ioctl_evdev$(EXEEXT): $(ioctl_evdev_OBJECTS) $(ioctl_evdev_DEPENDENCIES) $(EXTRA_ioctl_evdev_DEPENDENCIES) + @rm -f ioctl_evdev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_OBJECTS) $(ioctl_evdev_LDADD) $(LIBS) + +ioctl_evdev-v$(EXEEXT): $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_DEPENDENCIES) $(EXTRA_ioctl_evdev_v_DEPENDENCIES) + @rm -f ioctl_evdev-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_LDADD) $(LIBS) + +ioctl_loop$(EXEEXT): $(ioctl_loop_OBJECTS) $(ioctl_loop_DEPENDENCIES) $(EXTRA_ioctl_loop_DEPENDENCIES) + @rm -f ioctl_loop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_OBJECTS) $(ioctl_loop_LDADD) $(LIBS) + +ioctl_loop-nv$(EXEEXT): $(ioctl_loop_nv_OBJECTS) $(ioctl_loop_nv_DEPENDENCIES) $(EXTRA_ioctl_loop_nv_DEPENDENCIES) + @rm -f ioctl_loop-nv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_nv_OBJECTS) $(ioctl_loop_nv_LDADD) $(LIBS) + +ioctl_loop-v$(EXEEXT): $(ioctl_loop_v_OBJECTS) $(ioctl_loop_v_DEPENDENCIES) $(EXTRA_ioctl_loop_v_DEPENDENCIES) + @rm -f ioctl_loop-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_v_OBJECTS) $(ioctl_loop_v_LDADD) $(LIBS) + +ioctl_mtd$(EXEEXT): $(ioctl_mtd_OBJECTS) $(ioctl_mtd_DEPENDENCIES) $(EXTRA_ioctl_mtd_DEPENDENCIES) + @rm -f ioctl_mtd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_mtd_OBJECTS) $(ioctl_mtd_LDADD) $(LIBS) + +ioctl_rtc$(EXEEXT): $(ioctl_rtc_OBJECTS) $(ioctl_rtc_DEPENDENCIES) $(EXTRA_ioctl_rtc_DEPENDENCIES) + @rm -f ioctl_rtc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_OBJECTS) $(ioctl_rtc_LDADD) $(LIBS) + +ioctl_rtc-v$(EXEEXT): $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_DEPENDENCIES) $(EXTRA_ioctl_rtc_v_DEPENDENCIES) + @rm -f ioctl_rtc-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_LDADD) $(LIBS) + +ioctl_scsi$(EXEEXT): $(ioctl_scsi_OBJECTS) $(ioctl_scsi_DEPENDENCIES) $(EXTRA_ioctl_scsi_DEPENDENCIES) + @rm -f ioctl_scsi$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_scsi_OBJECTS) $(ioctl_scsi_LDADD) $(LIBS) + +ioctl_sg_io_v3$(EXEEXT): $(ioctl_sg_io_v3_OBJECTS) $(ioctl_sg_io_v3_DEPENDENCIES) $(EXTRA_ioctl_sg_io_v3_DEPENDENCIES) + @rm -f ioctl_sg_io_v3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sg_io_v3_OBJECTS) $(ioctl_sg_io_v3_LDADD) $(LIBS) + +ioctl_sg_io_v4$(EXEEXT): $(ioctl_sg_io_v4_OBJECTS) $(ioctl_sg_io_v4_DEPENDENCIES) $(EXTRA_ioctl_sg_io_v4_DEPENDENCIES) + @rm -f ioctl_sg_io_v4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sg_io_v4_OBJECTS) $(ioctl_sg_io_v4_LDADD) $(LIBS) + +ioctl_sock_gifconf$(EXEEXT): $(ioctl_sock_gifconf_OBJECTS) $(ioctl_sock_gifconf_DEPENDENCIES) $(EXTRA_ioctl_sock_gifconf_DEPENDENCIES) + @rm -f ioctl_sock_gifconf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sock_gifconf_OBJECTS) $(ioctl_sock_gifconf_LDADD) $(LIBS) + +ioctl_uffdio$(EXEEXT): $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_DEPENDENCIES) $(EXTRA_ioctl_uffdio_DEPENDENCIES) + @rm -f ioctl_uffdio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_LDADD) $(LIBS) + +ioctl_v4l2$(EXEEXT): $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_DEPENDENCIES) $(EXTRA_ioctl_v4l2_DEPENDENCIES) + @rm -f ioctl_v4l2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_LDADD) $(LIBS) + +ioperm$(EXEEXT): $(ioperm_OBJECTS) $(ioperm_DEPENDENCIES) $(EXTRA_ioperm_DEPENDENCIES) + @rm -f ioperm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioperm_OBJECTS) $(ioperm_LDADD) $(LIBS) + +iopl$(EXEEXT): $(iopl_OBJECTS) $(iopl_DEPENDENCIES) $(EXTRA_iopl_DEPENDENCIES) + @rm -f iopl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(iopl_OBJECTS) $(iopl_LDADD) $(LIBS) + +ioprio$(EXEEXT): $(ioprio_OBJECTS) $(ioprio_DEPENDENCIES) $(EXTRA_ioprio_DEPENDENCIES) + @rm -f ioprio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioprio_OBJECTS) $(ioprio_LDADD) $(LIBS) + +ip_mreq$(EXEEXT): $(ip_mreq_OBJECTS) $(ip_mreq_DEPENDENCIES) $(EXTRA_ip_mreq_DEPENDENCIES) + @rm -f ip_mreq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ip_mreq_OBJECTS) $(ip_mreq_LDADD) $(LIBS) + +ipc$(EXEEXT): $(ipc_OBJECTS) $(ipc_DEPENDENCIES) $(EXTRA_ipc_DEPENDENCIES) + @rm -f ipc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_OBJECTS) $(ipc_LDADD) $(LIBS) + +ipc_msg$(EXEEXT): $(ipc_msg_OBJECTS) $(ipc_msg_DEPENDENCIES) $(EXTRA_ipc_msg_DEPENDENCIES) + @rm -f ipc_msg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_msg_OBJECTS) $(ipc_msg_LDADD) $(LIBS) + +ipc_msgbuf$(EXEEXT): $(ipc_msgbuf_OBJECTS) $(ipc_msgbuf_DEPENDENCIES) $(EXTRA_ipc_msgbuf_DEPENDENCIES) + @rm -f ipc_msgbuf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_msgbuf_OBJECTS) $(ipc_msgbuf_LDADD) $(LIBS) + +ipc_sem$(EXEEXT): $(ipc_sem_OBJECTS) $(ipc_sem_DEPENDENCIES) $(EXTRA_ipc_sem_DEPENDENCIES) + @rm -f ipc_sem$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_sem_OBJECTS) $(ipc_sem_LDADD) $(LIBS) + +ipc_shm$(EXEEXT): $(ipc_shm_OBJECTS) $(ipc_shm_DEPENDENCIES) $(EXTRA_ipc_shm_DEPENDENCIES) + @rm -f ipc_shm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_shm_OBJECTS) $(ipc_shm_LDADD) $(LIBS) + +kcmp$(EXEEXT): $(kcmp_OBJECTS) $(kcmp_DEPENDENCIES) $(EXTRA_kcmp_DEPENDENCIES) + @rm -f kcmp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kcmp_OBJECTS) $(kcmp_LDADD) $(LIBS) + +kexec_file_load$(EXEEXT): $(kexec_file_load_OBJECTS) $(kexec_file_load_DEPENDENCIES) $(EXTRA_kexec_file_load_DEPENDENCIES) + @rm -f kexec_file_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kexec_file_load_OBJECTS) $(kexec_file_load_LDADD) $(LIBS) + +kexec_load$(EXEEXT): $(kexec_load_OBJECTS) $(kexec_load_DEPENDENCIES) $(EXTRA_kexec_load_DEPENDENCIES) + @rm -f kexec_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kexec_load_OBJECTS) $(kexec_load_LDADD) $(LIBS) + +keyctl$(EXEEXT): $(keyctl_OBJECTS) $(keyctl_DEPENDENCIES) $(EXTRA_keyctl_DEPENDENCIES) + @rm -f keyctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(keyctl_OBJECTS) $(keyctl_LDADD) $(LIBS) + +kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES) $(EXTRA_kill_DEPENDENCIES) + @rm -f kill$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kill_OBJECTS) $(kill_LDADD) $(LIBS) + +ksysent$(EXEEXT): $(ksysent_OBJECTS) $(ksysent_DEPENDENCIES) $(EXTRA_ksysent_DEPENDENCIES) + @rm -f ksysent$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ksysent_OBJECTS) $(ksysent_LDADD) $(LIBS) + +lchown$(EXEEXT): $(lchown_OBJECTS) $(lchown_DEPENDENCIES) $(EXTRA_lchown_DEPENDENCIES) + @rm -f lchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown_OBJECTS) $(lchown_LDADD) $(LIBS) + +lchown32$(EXEEXT): $(lchown32_OBJECTS) $(lchown32_DEPENDENCIES) $(EXTRA_lchown32_DEPENDENCIES) + @rm -f lchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown32_OBJECTS) $(lchown32_LDADD) $(LIBS) + +link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES) $(EXTRA_link_DEPENDENCIES) + @rm -f link$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(link_OBJECTS) $(link_LDADD) $(LIBS) + +linkat$(EXEEXT): $(linkat_OBJECTS) $(linkat_DEPENDENCIES) $(EXTRA_linkat_DEPENDENCIES) + @rm -f linkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(linkat_OBJECTS) $(linkat_LDADD) $(LIBS) + +llseek$(EXEEXT): $(llseek_OBJECTS) $(llseek_DEPENDENCIES) $(EXTRA_llseek_DEPENDENCIES) + @rm -f llseek$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(llseek_OBJECTS) $(llseek_LDADD) $(LIBS) + +lookup_dcookie$(EXEEXT): $(lookup_dcookie_OBJECTS) $(lookup_dcookie_DEPENDENCIES) $(EXTRA_lookup_dcookie_DEPENDENCIES) + @rm -f lookup_dcookie$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lookup_dcookie_OBJECTS) $(lookup_dcookie_LDADD) $(LIBS) + +lseek$(EXEEXT): $(lseek_OBJECTS) $(lseek_DEPENDENCIES) $(EXTRA_lseek_DEPENDENCIES) + @rm -f lseek$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lseek_OBJECTS) $(lseek_LDADD) $(LIBS) + +lstat$(EXEEXT): $(lstat_OBJECTS) $(lstat_DEPENDENCIES) $(EXTRA_lstat_DEPENDENCIES) + @rm -f lstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lstat_OBJECTS) $(lstat_LDADD) $(LIBS) + +lstat64$(EXEEXT): $(lstat64_OBJECTS) $(lstat64_DEPENDENCIES) $(EXTRA_lstat64_DEPENDENCIES) + @rm -f lstat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lstat64_OBJECTS) $(lstat64_LDADD) $(LIBS) + +mbind$(EXEEXT): $(mbind_OBJECTS) $(mbind_DEPENDENCIES) $(EXTRA_mbind_DEPENDENCIES) + @rm -f mbind$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mbind_OBJECTS) $(mbind_LDADD) $(LIBS) + +membarrier$(EXEEXT): $(membarrier_OBJECTS) $(membarrier_DEPENDENCIES) $(EXTRA_membarrier_DEPENDENCIES) + @rm -f membarrier$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(membarrier_OBJECTS) $(membarrier_LDADD) $(LIBS) + +memfd_create$(EXEEXT): $(memfd_create_OBJECTS) $(memfd_create_DEPENDENCIES) $(EXTRA_memfd_create_DEPENDENCIES) + @rm -f memfd_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(memfd_create_OBJECTS) $(memfd_create_LDADD) $(LIBS) + +migrate_pages$(EXEEXT): $(migrate_pages_OBJECTS) $(migrate_pages_DEPENDENCIES) $(EXTRA_migrate_pages_DEPENDENCIES) + @rm -f migrate_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(migrate_pages_OBJECTS) $(migrate_pages_LDADD) $(LIBS) + +mincore$(EXEEXT): $(mincore_OBJECTS) $(mincore_DEPENDENCIES) $(EXTRA_mincore_DEPENDENCIES) + @rm -f mincore$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mincore_OBJECTS) $(mincore_LDADD) $(LIBS) + +mkdir$(EXEEXT): $(mkdir_OBJECTS) $(mkdir_DEPENDENCIES) $(EXTRA_mkdir_DEPENDENCIES) + @rm -f mkdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdir_OBJECTS) $(mkdir_LDADD) $(LIBS) + +mkdirat$(EXEEXT): $(mkdirat_OBJECTS) $(mkdirat_DEPENDENCIES) $(EXTRA_mkdirat_DEPENDENCIES) + @rm -f mkdirat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdirat_OBJECTS) $(mkdirat_LDADD) $(LIBS) + +mknod$(EXEEXT): $(mknod_OBJECTS) $(mknod_DEPENDENCIES) $(EXTRA_mknod_DEPENDENCIES) + @rm -f mknod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknod_OBJECTS) $(mknod_LDADD) $(LIBS) + +mknodat$(EXEEXT): $(mknodat_OBJECTS) $(mknodat_DEPENDENCIES) $(EXTRA_mknodat_DEPENDENCIES) + @rm -f mknodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknodat_OBJECTS) $(mknodat_LDADD) $(LIBS) + +mlock$(EXEEXT): $(mlock_OBJECTS) $(mlock_DEPENDENCIES) $(EXTRA_mlock_DEPENDENCIES) + @rm -f mlock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock_OBJECTS) $(mlock_LDADD) $(LIBS) + +mlock2$(EXEEXT): $(mlock2_OBJECTS) $(mlock2_DEPENDENCIES) $(EXTRA_mlock2_DEPENDENCIES) + @rm -f mlock2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock2_OBJECTS) $(mlock2_LDADD) $(LIBS) + +mlockall$(EXEEXT): $(mlockall_OBJECTS) $(mlockall_DEPENDENCIES) $(EXTRA_mlockall_DEPENDENCIES) + @rm -f mlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlockall_OBJECTS) $(mlockall_LDADD) $(LIBS) + +mmap$(EXEEXT): $(mmap_OBJECTS) $(mmap_DEPENDENCIES) $(EXTRA_mmap_DEPENDENCIES) + @rm -f mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmap_OBJECTS) $(mmap_LDADD) $(LIBS) + +mmap64$(EXEEXT): $(mmap64_OBJECTS) $(mmap64_DEPENDENCIES) $(EXTRA_mmap64_DEPENDENCIES) + @rm -f mmap64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmap64_OBJECTS) $(mmap64_LDADD) $(LIBS) + +mmsg$(EXEEXT): $(mmsg_OBJECTS) $(mmsg_DEPENDENCIES) $(EXTRA_mmsg_DEPENDENCIES) + @rm -f mmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_OBJECTS) $(mmsg_LDADD) $(LIBS) + +mmsg-silent$(EXEEXT): $(mmsg_silent_OBJECTS) $(mmsg_silent_DEPENDENCIES) $(EXTRA_mmsg_silent_DEPENDENCIES) + @rm -f mmsg-silent$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_silent_OBJECTS) $(mmsg_silent_LDADD) $(LIBS) + +mmsg_name$(EXEEXT): $(mmsg_name_OBJECTS) $(mmsg_name_DEPENDENCIES) $(EXTRA_mmsg_name_DEPENDENCIES) + @rm -f mmsg_name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_name_OBJECTS) $(mmsg_name_LDADD) $(LIBS) + +mmsg_name-v$(EXEEXT): $(mmsg_name_v_OBJECTS) $(mmsg_name_v_DEPENDENCIES) $(EXTRA_mmsg_name_v_DEPENDENCIES) + @rm -f mmsg_name-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_name_v_OBJECTS) $(mmsg_name_v_LDADD) $(LIBS) + +mount$(EXEEXT): $(mount_OBJECTS) $(mount_DEPENDENCIES) $(EXTRA_mount_DEPENDENCIES) + @rm -f mount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mount_OBJECTS) $(mount_LDADD) $(LIBS) + +move_pages$(EXEEXT): $(move_pages_OBJECTS) $(move_pages_DEPENDENCIES) $(EXTRA_move_pages_DEPENDENCIES) + @rm -f move_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(move_pages_OBJECTS) $(move_pages_LDADD) $(LIBS) + +mq$(EXEEXT): $(mq_OBJECTS) $(mq_DEPENDENCIES) $(EXTRA_mq_DEPENDENCIES) + @rm -f mq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_OBJECTS) $(mq_LDADD) $(LIBS) + +mq_sendrecv$(EXEEXT): $(mq_sendrecv_OBJECTS) $(mq_sendrecv_DEPENDENCIES) $(EXTRA_mq_sendrecv_DEPENDENCIES) + @rm -f mq_sendrecv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_OBJECTS) $(mq_sendrecv_LDADD) $(LIBS) + +mq_sendrecv-read$(EXEEXT): $(mq_sendrecv_read_OBJECTS) $(mq_sendrecv_read_DEPENDENCIES) $(EXTRA_mq_sendrecv_read_DEPENDENCIES) + @rm -f mq_sendrecv-read$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_read_OBJECTS) $(mq_sendrecv_read_LDADD) $(LIBS) + +mq_sendrecv-write$(EXEEXT): $(mq_sendrecv_write_OBJECTS) $(mq_sendrecv_write_DEPENDENCIES) $(EXTRA_mq_sendrecv_write_DEPENDENCIES) + @rm -f mq_sendrecv-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_write_OBJECTS) $(mq_sendrecv_write_LDADD) $(LIBS) + +msg_control$(EXEEXT): $(msg_control_OBJECTS) $(msg_control_DEPENDENCIES) $(EXTRA_msg_control_DEPENDENCIES) + @rm -f msg_control$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_control_OBJECTS) $(msg_control_LDADD) $(LIBS) + +msg_control-v$(EXEEXT): $(msg_control_v_OBJECTS) $(msg_control_v_DEPENDENCIES) $(EXTRA_msg_control_v_DEPENDENCIES) + @rm -f msg_control-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_control_v_OBJECTS) $(msg_control_v_LDADD) $(LIBS) + +msg_name$(EXEEXT): $(msg_name_OBJECTS) $(msg_name_DEPENDENCIES) $(EXTRA_msg_name_DEPENDENCIES) + @rm -f msg_name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_name_OBJECTS) $(msg_name_LDADD) $(LIBS) + +munlockall$(EXEEXT): $(munlockall_OBJECTS) $(munlockall_DEPENDENCIES) $(EXTRA_munlockall_DEPENDENCIES) + @rm -f munlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(munlockall_OBJECTS) $(munlockall_LDADD) $(LIBS) + +nanosleep$(EXEEXT): $(nanosleep_OBJECTS) $(nanosleep_DEPENDENCIES) $(EXTRA_nanosleep_DEPENDENCIES) + @rm -f nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nanosleep_OBJECTS) $(nanosleep_LDADD) $(LIBS) + +net-accept-connect$(EXEEXT): $(net_accept_connect_OBJECTS) $(net_accept_connect_DEPENDENCIES) $(EXTRA_net_accept_connect_DEPENDENCIES) + @rm -f net-accept-connect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_accept_connect_OBJECTS) $(net_accept_connect_LDADD) $(LIBS) + +net-icmp_filter$(EXEEXT): $(net_icmp_filter_OBJECTS) $(net_icmp_filter_DEPENDENCIES) $(EXTRA_net_icmp_filter_DEPENDENCIES) + @rm -f net-icmp_filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_icmp_filter_OBJECTS) $(net_icmp_filter_LDADD) $(LIBS) + +net-sockaddr$(EXEEXT): $(net_sockaddr_OBJECTS) $(net_sockaddr_DEPENDENCIES) $(EXTRA_net_sockaddr_DEPENDENCIES) + @rm -f net-sockaddr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_sockaddr_OBJECTS) $(net_sockaddr_LDADD) $(LIBS) + +net-y-unix$(EXEEXT): $(net_y_unix_OBJECTS) $(net_y_unix_DEPENDENCIES) $(EXTRA_net_y_unix_DEPENDENCIES) + @rm -f net-y-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_y_unix_OBJECTS) $(net_y_unix_LDADD) $(LIBS) + +net-yy-inet$(EXEEXT): $(net_yy_inet_OBJECTS) $(net_yy_inet_DEPENDENCIES) $(EXTRA_net_yy_inet_DEPENDENCIES) + @rm -f net-yy-inet$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_inet_OBJECTS) $(net_yy_inet_LDADD) $(LIBS) + +net-yy-netlink$(EXEEXT): $(net_yy_netlink_OBJECTS) $(net_yy_netlink_DEPENDENCIES) $(EXTRA_net_yy_netlink_DEPENDENCIES) + @rm -f net-yy-netlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_netlink_OBJECTS) $(net_yy_netlink_LDADD) $(LIBS) + +net-yy-unix$(EXEEXT): $(net_yy_unix_OBJECTS) $(net_yy_unix_DEPENDENCIES) $(EXTRA_net_yy_unix_DEPENDENCIES) + @rm -f net-yy-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_unix_OBJECTS) $(net_yy_unix_LDADD) $(LIBS) + +netlink_inet_diag$(EXEEXT): $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_DEPENDENCIES) $(EXTRA_netlink_inet_diag_DEPENDENCIES) + @rm -f netlink_inet_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_LDADD) $(LIBS) + +netlink_netlink_diag$(EXEEXT): $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_DEPENDENCIES) $(EXTRA_netlink_netlink_diag_DEPENDENCIES) + @rm -f netlink_netlink_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_LDADD) $(LIBS) + +netlink_protocol$(EXEEXT): $(netlink_protocol_OBJECTS) $(netlink_protocol_DEPENDENCIES) $(EXTRA_netlink_protocol_DEPENDENCIES) + @rm -f netlink_protocol$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_protocol_OBJECTS) $(netlink_protocol_LDADD) $(LIBS) + +netlink_unix_diag$(EXEEXT): $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_DEPENDENCIES) $(EXTRA_netlink_unix_diag_DEPENDENCIES) + @rm -f netlink_unix_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_LDADD) $(LIBS) + +newfstatat$(EXEEXT): $(newfstatat_OBJECTS) $(newfstatat_DEPENDENCIES) $(EXTRA_newfstatat_DEPENDENCIES) + @rm -f newfstatat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(newfstatat_OBJECTS) $(newfstatat_LDADD) $(LIBS) + +nsyscalls$(EXEEXT): $(nsyscalls_OBJECTS) $(nsyscalls_DEPENDENCIES) $(EXTRA_nsyscalls_DEPENDENCIES) + @rm -f nsyscalls$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nsyscalls_OBJECTS) $(nsyscalls_LDADD) $(LIBS) + +old_mmap$(EXEEXT): $(old_mmap_OBJECTS) $(old_mmap_DEPENDENCIES) $(EXTRA_old_mmap_DEPENDENCIES) + @rm -f old_mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(old_mmap_OBJECTS) $(old_mmap_LDADD) $(LIBS) + +oldfstat$(EXEEXT): $(oldfstat_OBJECTS) $(oldfstat_DEPENDENCIES) $(EXTRA_oldfstat_DEPENDENCIES) + @rm -f oldfstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldfstat_OBJECTS) $(oldfstat_LDADD) $(LIBS) + +oldlstat$(EXEEXT): $(oldlstat_OBJECTS) $(oldlstat_DEPENDENCIES) $(EXTRA_oldlstat_DEPENDENCIES) + @rm -f oldlstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldlstat_OBJECTS) $(oldlstat_LDADD) $(LIBS) + +oldselect$(EXEEXT): $(oldselect_OBJECTS) $(oldselect_DEPENDENCIES) $(EXTRA_oldselect_DEPENDENCIES) + @rm -f oldselect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldselect_OBJECTS) $(oldselect_LDADD) $(LIBS) + +oldstat$(EXEEXT): $(oldstat_OBJECTS) $(oldstat_DEPENDENCIES) $(EXTRA_oldstat_DEPENDENCIES) + @rm -f oldstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldstat_OBJECTS) $(oldstat_LDADD) $(LIBS) + +open$(EXEEXT): $(open_OBJECTS) $(open_DEPENDENCIES) $(EXTRA_open_DEPENDENCIES) + @rm -f open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(open_OBJECTS) $(open_LDADD) $(LIBS) + +openat$(EXEEXT): $(openat_OBJECTS) $(openat_DEPENDENCIES) $(EXTRA_openat_DEPENDENCIES) + @rm -f openat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(openat_OBJECTS) $(openat_LDADD) $(LIBS) + +pause$(EXEEXT): $(pause_OBJECTS) $(pause_DEPENDENCIES) $(EXTRA_pause_DEPENDENCIES) + @rm -f pause$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pause_OBJECTS) $(pause_LDADD) $(LIBS) + +pc$(EXEEXT): $(pc_OBJECTS) $(pc_DEPENDENCIES) $(EXTRA_pc_DEPENDENCIES) + @rm -f pc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pc_OBJECTS) $(pc_LDADD) $(LIBS) + +perf_event_open$(EXEEXT): $(perf_event_open_OBJECTS) $(perf_event_open_DEPENDENCIES) $(EXTRA_perf_event_open_DEPENDENCIES) + @rm -f perf_event_open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_OBJECTS) $(perf_event_open_LDADD) $(LIBS) + +perf_event_open_nonverbose$(EXEEXT): $(perf_event_open_nonverbose_OBJECTS) $(perf_event_open_nonverbose_DEPENDENCIES) $(EXTRA_perf_event_open_nonverbose_DEPENDENCIES) + @rm -f perf_event_open_nonverbose$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_nonverbose_OBJECTS) $(perf_event_open_nonverbose_LDADD) $(LIBS) + +perf_event_open_unabbrev$(EXEEXT): $(perf_event_open_unabbrev_OBJECTS) $(perf_event_open_unabbrev_DEPENDENCIES) $(EXTRA_perf_event_open_unabbrev_DEPENDENCIES) + @rm -f perf_event_open_unabbrev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_unabbrev_OBJECTS) $(perf_event_open_unabbrev_LDADD) $(LIBS) + +personality$(EXEEXT): $(personality_OBJECTS) $(personality_DEPENDENCIES) $(EXTRA_personality_DEPENDENCIES) + @rm -f personality$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(personality_OBJECTS) $(personality_LDADD) $(LIBS) + +pipe$(EXEEXT): $(pipe_OBJECTS) $(pipe_DEPENDENCIES) $(EXTRA_pipe_DEPENDENCIES) + @rm -f pipe$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pipe_OBJECTS) $(pipe_LDADD) $(LIBS) + +pipe2$(EXEEXT): $(pipe2_OBJECTS) $(pipe2_DEPENDENCIES) $(EXTRA_pipe2_DEPENDENCIES) + @rm -f pipe2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pipe2_OBJECTS) $(pipe2_LDADD) $(LIBS) + +pkey_alloc$(EXEEXT): $(pkey_alloc_OBJECTS) $(pkey_alloc_DEPENDENCIES) $(EXTRA_pkey_alloc_DEPENDENCIES) + @rm -f pkey_alloc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_alloc_OBJECTS) $(pkey_alloc_LDADD) $(LIBS) + +pkey_free$(EXEEXT): $(pkey_free_OBJECTS) $(pkey_free_DEPENDENCIES) $(EXTRA_pkey_free_DEPENDENCIES) + @rm -f pkey_free$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_free_OBJECTS) $(pkey_free_LDADD) $(LIBS) + +pkey_mprotect$(EXEEXT): $(pkey_mprotect_OBJECTS) $(pkey_mprotect_DEPENDENCIES) $(EXTRA_pkey_mprotect_DEPENDENCIES) + @rm -f pkey_mprotect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_mprotect_OBJECTS) $(pkey_mprotect_LDADD) $(LIBS) + +poll$(EXEEXT): $(poll_OBJECTS) $(poll_DEPENDENCIES) $(EXTRA_poll_DEPENDENCIES) + @rm -f poll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(poll_OBJECTS) $(poll_LDADD) $(LIBS) + +ppoll$(EXEEXT): $(ppoll_OBJECTS) $(ppoll_DEPENDENCIES) $(EXTRA_ppoll_DEPENDENCIES) + @rm -f ppoll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ppoll_OBJECTS) $(ppoll_LDADD) $(LIBS) + +prctl-arg2-intptr$(EXEEXT): $(prctl_arg2_intptr_OBJECTS) $(prctl_arg2_intptr_DEPENDENCIES) $(EXTRA_prctl_arg2_intptr_DEPENDENCIES) + @rm -f prctl-arg2-intptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_arg2_intptr_OBJECTS) $(prctl_arg2_intptr_LDADD) $(LIBS) + +prctl-dumpable$(EXEEXT): $(prctl_dumpable_OBJECTS) $(prctl_dumpable_DEPENDENCIES) $(EXTRA_prctl_dumpable_DEPENDENCIES) + @rm -f prctl-dumpable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_dumpable_OBJECTS) $(prctl_dumpable_LDADD) $(LIBS) + +prctl-name$(EXEEXT): $(prctl_name_OBJECTS) $(prctl_name_DEPENDENCIES) $(EXTRA_prctl_name_DEPENDENCIES) + @rm -f prctl-name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_name_OBJECTS) $(prctl_name_LDADD) $(LIBS) + +prctl-no-args$(EXEEXT): $(prctl_no_args_OBJECTS) $(prctl_no_args_DEPENDENCIES) $(EXTRA_prctl_no_args_DEPENDENCIES) + @rm -f prctl-no-args$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_no_args_OBJECTS) $(prctl_no_args_LDADD) $(LIBS) + +prctl-pdeathsig$(EXEEXT): $(prctl_pdeathsig_OBJECTS) $(prctl_pdeathsig_DEPENDENCIES) $(EXTRA_prctl_pdeathsig_DEPENDENCIES) + @rm -f prctl-pdeathsig$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_pdeathsig_OBJECTS) $(prctl_pdeathsig_LDADD) $(LIBS) + +prctl-seccomp-filter-v$(EXEEXT): $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_DEPENDENCIES) $(EXTRA_prctl_seccomp_filter_v_DEPENDENCIES) + @rm -f prctl-seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_LDADD) $(LIBS) + +prctl-seccomp-strict$(EXEEXT): $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_DEPENDENCIES) $(EXTRA_prctl_seccomp_strict_DEPENDENCIES) + @rm -f prctl-seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_LDADD) $(LIBS) + +prctl-securebits$(EXEEXT): $(prctl_securebits_OBJECTS) $(prctl_securebits_DEPENDENCIES) $(EXTRA_prctl_securebits_DEPENDENCIES) + @rm -f prctl-securebits$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_securebits_OBJECTS) $(prctl_securebits_LDADD) $(LIBS) + +prctl-tid_address$(EXEEXT): $(prctl_tid_address_OBJECTS) $(prctl_tid_address_DEPENDENCIES) $(EXTRA_prctl_tid_address_DEPENDENCIES) + @rm -f prctl-tid_address$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_tid_address_OBJECTS) $(prctl_tid_address_LDADD) $(LIBS) + +prctl-tsc$(EXEEXT): $(prctl_tsc_OBJECTS) $(prctl_tsc_DEPENDENCIES) $(EXTRA_prctl_tsc_DEPENDENCIES) + @rm -f prctl-tsc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_tsc_OBJECTS) $(prctl_tsc_LDADD) $(LIBS) + +pread64-pwrite64$(EXEEXT): $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_DEPENDENCIES) $(EXTRA_pread64_pwrite64_DEPENDENCIES) + @rm -f pread64-pwrite64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_LDADD) $(LIBS) + +preadv$(EXEEXT): $(preadv_OBJECTS) $(preadv_DEPENDENCIES) $(EXTRA_preadv_DEPENDENCIES) + @rm -f preadv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_OBJECTS) $(preadv_LDADD) $(LIBS) + +preadv-pwritev$(EXEEXT): $(preadv_pwritev_OBJECTS) $(preadv_pwritev_DEPENDENCIES) $(EXTRA_preadv_pwritev_DEPENDENCIES) + @rm -f preadv-pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_pwritev_OBJECTS) $(preadv_pwritev_LDADD) $(LIBS) + +preadv2-pwritev2$(EXEEXT): $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_DEPENDENCIES) $(EXTRA_preadv2_pwritev2_DEPENDENCIES) + @rm -f preadv2-pwritev2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_LDADD) $(LIBS) + +print_maxfd$(EXEEXT): $(print_maxfd_OBJECTS) $(print_maxfd_DEPENDENCIES) $(EXTRA_print_maxfd_DEPENDENCIES) + @rm -f print_maxfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(print_maxfd_OBJECTS) $(print_maxfd_LDADD) $(LIBS) + +printstr$(EXEEXT): $(printstr_OBJECTS) $(printstr_DEPENDENCIES) $(EXTRA_printstr_DEPENDENCIES) + @rm -f printstr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(printstr_OBJECTS) $(printstr_LDADD) $(LIBS) + +prlimit64$(EXEEXT): $(prlimit64_OBJECTS) $(prlimit64_DEPENDENCIES) $(EXTRA_prlimit64_DEPENDENCIES) + @rm -f prlimit64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prlimit64_OBJECTS) $(prlimit64_LDADD) $(LIBS) + +process_vm_readv$(EXEEXT): $(process_vm_readv_OBJECTS) $(process_vm_readv_DEPENDENCIES) $(EXTRA_process_vm_readv_DEPENDENCIES) + @rm -f process_vm_readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(process_vm_readv_OBJECTS) $(process_vm_readv_LDADD) $(LIBS) + +process_vm_writev$(EXEEXT): $(process_vm_writev_OBJECTS) $(process_vm_writev_DEPENDENCIES) $(EXTRA_process_vm_writev_DEPENDENCIES) + @rm -f process_vm_writev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(process_vm_writev_OBJECTS) $(process_vm_writev_LDADD) $(LIBS) + +pselect6$(EXEEXT): $(pselect6_OBJECTS) $(pselect6_DEPENDENCIES) $(EXTRA_pselect6_DEPENDENCIES) + @rm -f pselect6$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pselect6_OBJECTS) $(pselect6_LDADD) $(LIBS) + +ptrace$(EXEEXT): $(ptrace_OBJECTS) $(ptrace_DEPENDENCIES) $(EXTRA_ptrace_DEPENDENCIES) + @rm -f ptrace$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ptrace_OBJECTS) $(ptrace_LDADD) $(LIBS) + +pwritev$(EXEEXT): $(pwritev_OBJECTS) $(pwritev_DEPENDENCIES) $(EXTRA_pwritev_DEPENDENCIES) + @rm -f pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pwritev_OBJECTS) $(pwritev_LDADD) $(LIBS) + +qual_fault$(EXEEXT): $(qual_fault_OBJECTS) $(qual_fault_DEPENDENCIES) $(EXTRA_qual_fault_DEPENDENCIES) + @rm -f qual_fault$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_fault_OBJECTS) $(qual_fault_LDADD) $(LIBS) + +qual_inject-error-signal$(EXEEXT): $(qual_inject_error_signal_OBJECTS) $(qual_inject_error_signal_DEPENDENCIES) $(EXTRA_qual_inject_error_signal_DEPENDENCIES) + @rm -f qual_inject-error-signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_error_signal_OBJECTS) $(qual_inject_error_signal_LDADD) $(LIBS) + +qual_inject-retval$(EXEEXT): $(qual_inject_retval_OBJECTS) $(qual_inject_retval_DEPENDENCIES) $(EXTRA_qual_inject_retval_DEPENDENCIES) + @rm -f qual_inject-retval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_retval_OBJECTS) $(qual_inject_retval_LDADD) $(LIBS) + +qual_inject-signal$(EXEEXT): $(qual_inject_signal_OBJECTS) $(qual_inject_signal_DEPENDENCIES) $(EXTRA_qual_inject_signal_DEPENDENCIES) + @rm -f qual_inject-signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_signal_OBJECTS) $(qual_inject_signal_LDADD) $(LIBS) + +qual_signal$(EXEEXT): $(qual_signal_OBJECTS) $(qual_signal_DEPENDENCIES) $(EXTRA_qual_signal_DEPENDENCIES) + @rm -f qual_signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_signal_OBJECTS) $(qual_signal_LDADD) $(LIBS) + +quotactl$(EXEEXT): $(quotactl_OBJECTS) $(quotactl_DEPENDENCIES) $(EXTRA_quotactl_DEPENDENCIES) + @rm -f quotactl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_OBJECTS) $(quotactl_LDADD) $(LIBS) + +quotactl-v$(EXEEXT): $(quotactl_v_OBJECTS) $(quotactl_v_DEPENDENCIES) $(EXTRA_quotactl_v_DEPENDENCIES) + @rm -f quotactl-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_v_OBJECTS) $(quotactl_v_LDADD) $(LIBS) + +quotactl-xfs$(EXEEXT): $(quotactl_xfs_OBJECTS) $(quotactl_xfs_DEPENDENCIES) $(EXTRA_quotactl_xfs_DEPENDENCIES) + @rm -f quotactl-xfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_xfs_OBJECTS) $(quotactl_xfs_LDADD) $(LIBS) + +quotactl-xfs-v$(EXEEXT): $(quotactl_xfs_v_OBJECTS) $(quotactl_xfs_v_DEPENDENCIES) $(EXTRA_quotactl_xfs_v_DEPENDENCIES) + @rm -f quotactl-xfs-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_xfs_v_OBJECTS) $(quotactl_xfs_v_LDADD) $(LIBS) + +read-write$(EXEEXT): $(read_write_OBJECTS) $(read_write_DEPENDENCIES) $(EXTRA_read_write_DEPENDENCIES) + @rm -f read-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(read_write_OBJECTS) $(read_write_LDADD) $(LIBS) + +readahead$(EXEEXT): $(readahead_OBJECTS) $(readahead_DEPENDENCIES) $(EXTRA_readahead_DEPENDENCIES) + @rm -f readahead$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readahead_OBJECTS) $(readahead_LDADD) $(LIBS) + +readdir$(EXEEXT): $(readdir_OBJECTS) $(readdir_DEPENDENCIES) $(EXTRA_readdir_DEPENDENCIES) + @rm -f readdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readdir_OBJECTS) $(readdir_LDADD) $(LIBS) + +readlink$(EXEEXT): $(readlink_OBJECTS) $(readlink_DEPENDENCIES) $(EXTRA_readlink_DEPENDENCIES) + @rm -f readlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readlink_OBJECTS) $(readlink_LDADD) $(LIBS) + +readlinkat$(EXEEXT): $(readlinkat_OBJECTS) $(readlinkat_DEPENDENCIES) $(EXTRA_readlinkat_DEPENDENCIES) + @rm -f readlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readlinkat_OBJECTS) $(readlinkat_LDADD) $(LIBS) + +readv$(EXEEXT): $(readv_OBJECTS) $(readv_DEPENDENCIES) $(EXTRA_readv_DEPENDENCIES) + @rm -f readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readv_OBJECTS) $(readv_LDADD) $(LIBS) + +reboot$(EXEEXT): $(reboot_OBJECTS) $(reboot_DEPENDENCIES) $(EXTRA_reboot_DEPENDENCIES) + @rm -f reboot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(reboot_OBJECTS) $(reboot_LDADD) $(LIBS) + +recvfrom$(EXEEXT): $(recvfrom_OBJECTS) $(recvfrom_DEPENDENCIES) $(EXTRA_recvfrom_DEPENDENCIES) + @rm -f recvfrom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvfrom_OBJECTS) $(recvfrom_LDADD) $(LIBS) + +recvmmsg-timeout$(EXEEXT): $(recvmmsg_timeout_OBJECTS) $(recvmmsg_timeout_DEPENDENCIES) $(EXTRA_recvmmsg_timeout_DEPENDENCIES) + @rm -f recvmmsg-timeout$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmmsg_timeout_OBJECTS) $(recvmmsg_timeout_LDADD) $(LIBS) + +recvmsg$(EXEEXT): $(recvmsg_OBJECTS) $(recvmsg_DEPENDENCIES) $(EXTRA_recvmsg_DEPENDENCIES) + @rm -f recvmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmsg_OBJECTS) $(recvmsg_LDADD) $(LIBS) + +redirect-fds$(EXEEXT): $(redirect_fds_OBJECTS) $(redirect_fds_DEPENDENCIES) $(EXTRA_redirect_fds_DEPENDENCIES) + @rm -f redirect-fds$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(redirect_fds_OBJECTS) $(redirect_fds_LDADD) $(LIBS) + +remap_file_pages$(EXEEXT): $(remap_file_pages_OBJECTS) $(remap_file_pages_DEPENDENCIES) $(EXTRA_remap_file_pages_DEPENDENCIES) + @rm -f remap_file_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(remap_file_pages_OBJECTS) $(remap_file_pages_LDADD) $(LIBS) + +rename$(EXEEXT): $(rename_OBJECTS) $(rename_DEPENDENCIES) $(EXTRA_rename_DEPENDENCIES) + @rm -f rename$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rename_OBJECTS) $(rename_LDADD) $(LIBS) + +renameat$(EXEEXT): $(renameat_OBJECTS) $(renameat_DEPENDENCIES) $(EXTRA_renameat_DEPENDENCIES) + @rm -f renameat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat_OBJECTS) $(renameat_LDADD) $(LIBS) + +renameat2$(EXEEXT): $(renameat2_OBJECTS) $(renameat2_DEPENDENCIES) $(EXTRA_renameat2_DEPENDENCIES) + @rm -f renameat2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat2_OBJECTS) $(renameat2_LDADD) $(LIBS) + +request_key$(EXEEXT): $(request_key_OBJECTS) $(request_key_DEPENDENCIES) $(EXTRA_request_key_DEPENDENCIES) + @rm -f request_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(request_key_OBJECTS) $(request_key_LDADD) $(LIBS) + +restart_syscall$(EXEEXT): $(restart_syscall_OBJECTS) $(restart_syscall_DEPENDENCIES) $(EXTRA_restart_syscall_DEPENDENCIES) + @rm -f restart_syscall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(restart_syscall_OBJECTS) $(restart_syscall_LDADD) $(LIBS) + +rmdir$(EXEEXT): $(rmdir_OBJECTS) $(rmdir_DEPENDENCIES) $(EXTRA_rmdir_DEPENDENCIES) + @rm -f rmdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rmdir_OBJECTS) $(rmdir_LDADD) $(LIBS) + +rt_sigpending$(EXEEXT): $(rt_sigpending_OBJECTS) $(rt_sigpending_DEPENDENCIES) $(EXTRA_rt_sigpending_DEPENDENCIES) + @rm -f rt_sigpending$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigpending_OBJECTS) $(rt_sigpending_LDADD) $(LIBS) + +rt_sigprocmask$(EXEEXT): $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_DEPENDENCIES) $(EXTRA_rt_sigprocmask_DEPENDENCIES) + @rm -f rt_sigprocmask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_LDADD) $(LIBS) + +rt_sigqueueinfo$(EXEEXT): $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_DEPENDENCIES) $(EXTRA_rt_sigqueueinfo_DEPENDENCIES) + @rm -f rt_sigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_LDADD) $(LIBS) + +rt_sigsuspend$(EXEEXT): $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_DEPENDENCIES) $(EXTRA_rt_sigsuspend_DEPENDENCIES) + @rm -f rt_sigsuspend$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_LDADD) $(LIBS) + +rt_sigtimedwait$(EXEEXT): $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_DEPENDENCIES) $(EXTRA_rt_sigtimedwait_DEPENDENCIES) + @rm -f rt_sigtimedwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_LDADD) $(LIBS) + +rt_tgsigqueueinfo$(EXEEXT): $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_DEPENDENCIES) $(EXTRA_rt_tgsigqueueinfo_DEPENDENCIES) + @rm -f rt_tgsigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_LDADD) $(LIBS) + +sched_get_priority_mxx$(EXEEXT): $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_DEPENDENCIES) $(EXTRA_sched_get_priority_mxx_DEPENDENCIES) + @rm -f sched_get_priority_mxx$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_LDADD) $(LIBS) + +sched_rr_get_interval$(EXEEXT): $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_DEPENDENCIES) $(EXTRA_sched_rr_get_interval_DEPENDENCIES) + @rm -f sched_rr_get_interval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_LDADD) $(LIBS) + +sched_xetaffinity$(EXEEXT): $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_DEPENDENCIES) $(EXTRA_sched_xetaffinity_DEPENDENCIES) + @rm -f sched_xetaffinity$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_LDADD) $(LIBS) + +sched_xetattr$(EXEEXT): $(sched_xetattr_OBJECTS) $(sched_xetattr_DEPENDENCIES) $(EXTRA_sched_xetattr_DEPENDENCIES) + @rm -f sched_xetattr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetattr_OBJECTS) $(sched_xetattr_LDADD) $(LIBS) + +sched_xetparam$(EXEEXT): $(sched_xetparam_OBJECTS) $(sched_xetparam_DEPENDENCIES) $(EXTRA_sched_xetparam_DEPENDENCIES) + @rm -f sched_xetparam$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetparam_OBJECTS) $(sched_xetparam_LDADD) $(LIBS) + +sched_xetscheduler$(EXEEXT): $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_DEPENDENCIES) $(EXTRA_sched_xetscheduler_DEPENDENCIES) + @rm -f sched_xetscheduler$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_LDADD) $(LIBS) + +sched_yield$(EXEEXT): $(sched_yield_OBJECTS) $(sched_yield_DEPENDENCIES) $(EXTRA_sched_yield_DEPENDENCIES) + @rm -f sched_yield$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_yield_OBJECTS) $(sched_yield_LDADD) $(LIBS) + +scm_rights$(EXEEXT): $(scm_rights_OBJECTS) $(scm_rights_DEPENDENCIES) $(EXTRA_scm_rights_DEPENDENCIES) + @rm -f scm_rights$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(scm_rights_OBJECTS) $(scm_rights_LDADD) $(LIBS) + +seccomp-filter$(EXEEXT): $(seccomp_filter_OBJECTS) $(seccomp_filter_DEPENDENCIES) $(EXTRA_seccomp_filter_DEPENDENCIES) + @rm -f seccomp-filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_OBJECTS) $(seccomp_filter_LDADD) $(LIBS) + +seccomp-filter-v$(EXEEXT): $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_DEPENDENCIES) $(EXTRA_seccomp_filter_v_DEPENDENCIES) + @rm -f seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_LDADD) $(LIBS) + +seccomp-strict$(EXEEXT): $(seccomp_strict_OBJECTS) $(seccomp_strict_DEPENDENCIES) $(EXTRA_seccomp_strict_DEPENDENCIES) + @rm -f seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_strict_OBJECTS) $(seccomp_strict_LDADD) $(LIBS) + +select$(EXEEXT): $(select_OBJECTS) $(select_DEPENDENCIES) $(EXTRA_select_DEPENDENCIES) + @rm -f select$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(select_OBJECTS) $(select_LDADD) $(LIBS) + +semop$(EXEEXT): $(semop_OBJECTS) $(semop_DEPENDENCIES) $(EXTRA_semop_DEPENDENCIES) + @rm -f semop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(semop_OBJECTS) $(semop_LDADD) $(LIBS) + +sendfile$(EXEEXT): $(sendfile_OBJECTS) $(sendfile_DEPENDENCIES) $(EXTRA_sendfile_DEPENDENCIES) + @rm -f sendfile$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sendfile_OBJECTS) $(sendfile_LDADD) $(LIBS) + +sendfile64$(EXEEXT): $(sendfile64_OBJECTS) $(sendfile64_DEPENDENCIES) $(EXTRA_sendfile64_DEPENDENCIES) + @rm -f sendfile64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sendfile64_OBJECTS) $(sendfile64_LDADD) $(LIBS) + +set_mempolicy$(EXEEXT): $(set_mempolicy_OBJECTS) $(set_mempolicy_DEPENDENCIES) $(EXTRA_set_mempolicy_DEPENDENCIES) + @rm -f set_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_mempolicy_OBJECTS) $(set_mempolicy_LDADD) $(LIBS) + +set_ptracer_any$(EXEEXT): $(set_ptracer_any_OBJECTS) $(set_ptracer_any_DEPENDENCIES) $(EXTRA_set_ptracer_any_DEPENDENCIES) + @rm -f set_ptracer_any$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_ptracer_any_OBJECTS) $(set_ptracer_any_LDADD) $(LIBS) + +setdomainname$(EXEEXT): $(setdomainname_OBJECTS) $(setdomainname_DEPENDENCIES) $(EXTRA_setdomainname_DEPENDENCIES) + @rm -f setdomainname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setdomainname_OBJECTS) $(setdomainname_LDADD) $(LIBS) + +setfsgid$(EXEEXT): $(setfsgid_OBJECTS) $(setfsgid_DEPENDENCIES) $(EXTRA_setfsgid_DEPENDENCIES) + @rm -f setfsgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid_OBJECTS) $(setfsgid_LDADD) $(LIBS) + +setfsgid32$(EXEEXT): $(setfsgid32_OBJECTS) $(setfsgid32_DEPENDENCIES) $(EXTRA_setfsgid32_DEPENDENCIES) + @rm -f setfsgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid32_OBJECTS) $(setfsgid32_LDADD) $(LIBS) + +setfsuid$(EXEEXT): $(setfsuid_OBJECTS) $(setfsuid_DEPENDENCIES) $(EXTRA_setfsuid_DEPENDENCIES) + @rm -f setfsuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid_OBJECTS) $(setfsuid_LDADD) $(LIBS) + +setfsuid32$(EXEEXT): $(setfsuid32_OBJECTS) $(setfsuid32_DEPENDENCIES) $(EXTRA_setfsuid32_DEPENDENCIES) + @rm -f setfsuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid32_OBJECTS) $(setfsuid32_LDADD) $(LIBS) + +setgid$(EXEEXT): $(setgid_OBJECTS) $(setgid_DEPENDENCIES) $(EXTRA_setgid_DEPENDENCIES) + @rm -f setgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid_OBJECTS) $(setgid_LDADD) $(LIBS) + +setgid32$(EXEEXT): $(setgid32_OBJECTS) $(setgid32_DEPENDENCIES) $(EXTRA_setgid32_DEPENDENCIES) + @rm -f setgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid32_OBJECTS) $(setgid32_LDADD) $(LIBS) + +setgroups$(EXEEXT): $(setgroups_OBJECTS) $(setgroups_DEPENDENCIES) $(EXTRA_setgroups_DEPENDENCIES) + @rm -f setgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups_OBJECTS) $(setgroups_LDADD) $(LIBS) + +setgroups32$(EXEEXT): $(setgroups32_OBJECTS) $(setgroups32_DEPENDENCIES) $(EXTRA_setgroups32_DEPENDENCIES) + @rm -f setgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups32_OBJECTS) $(setgroups32_LDADD) $(LIBS) + +sethostname$(EXEEXT): $(sethostname_OBJECTS) $(sethostname_DEPENDENCIES) $(EXTRA_sethostname_DEPENDENCIES) + @rm -f sethostname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sethostname_OBJECTS) $(sethostname_LDADD) $(LIBS) + +setns$(EXEEXT): $(setns_OBJECTS) $(setns_DEPENDENCIES) $(EXTRA_setns_DEPENDENCIES) + @rm -f setns$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setns_OBJECTS) $(setns_LDADD) $(LIBS) + +setregid$(EXEEXT): $(setregid_OBJECTS) $(setregid_DEPENDENCIES) $(EXTRA_setregid_DEPENDENCIES) + @rm -f setregid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid_OBJECTS) $(setregid_LDADD) $(LIBS) + +setregid32$(EXEEXT): $(setregid32_OBJECTS) $(setregid32_DEPENDENCIES) $(EXTRA_setregid32_DEPENDENCIES) + @rm -f setregid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid32_OBJECTS) $(setregid32_LDADD) $(LIBS) + +setresgid$(EXEEXT): $(setresgid_OBJECTS) $(setresgid_DEPENDENCIES) $(EXTRA_setresgid_DEPENDENCIES) + @rm -f setresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid_OBJECTS) $(setresgid_LDADD) $(LIBS) + +setresgid32$(EXEEXT): $(setresgid32_OBJECTS) $(setresgid32_DEPENDENCIES) $(EXTRA_setresgid32_DEPENDENCIES) + @rm -f setresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid32_OBJECTS) $(setresgid32_LDADD) $(LIBS) + +setresuid$(EXEEXT): $(setresuid_OBJECTS) $(setresuid_DEPENDENCIES) $(EXTRA_setresuid_DEPENDENCIES) + @rm -f setresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid_OBJECTS) $(setresuid_LDADD) $(LIBS) + +setresuid32$(EXEEXT): $(setresuid32_OBJECTS) $(setresuid32_DEPENDENCIES) $(EXTRA_setresuid32_DEPENDENCIES) + @rm -f setresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid32_OBJECTS) $(setresuid32_LDADD) $(LIBS) + +setreuid$(EXEEXT): $(setreuid_OBJECTS) $(setreuid_DEPENDENCIES) $(EXTRA_setreuid_DEPENDENCIES) + @rm -f setreuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid_OBJECTS) $(setreuid_LDADD) $(LIBS) + +setreuid32$(EXEEXT): $(setreuid32_OBJECTS) $(setreuid32_DEPENDENCIES) $(EXTRA_setreuid32_DEPENDENCIES) + @rm -f setreuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid32_OBJECTS) $(setreuid32_LDADD) $(LIBS) + +setrlimit$(EXEEXT): $(setrlimit_OBJECTS) $(setrlimit_DEPENDENCIES) $(EXTRA_setrlimit_DEPENDENCIES) + @rm -f setrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setrlimit_OBJECTS) $(setrlimit_LDADD) $(LIBS) + +setuid$(EXEEXT): $(setuid_OBJECTS) $(setuid_DEPENDENCIES) $(EXTRA_setuid_DEPENDENCIES) + @rm -f setuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid_OBJECTS) $(setuid_LDADD) $(LIBS) + +setuid32$(EXEEXT): $(setuid32_OBJECTS) $(setuid32_DEPENDENCIES) $(EXTRA_setuid32_DEPENDENCIES) + @rm -f setuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid32_OBJECTS) $(setuid32_LDADD) $(LIBS) + +shmxt$(EXEEXT): $(shmxt_OBJECTS) $(shmxt_DEPENDENCIES) $(EXTRA_shmxt_DEPENDENCIES) + @rm -f shmxt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shmxt_OBJECTS) $(shmxt_LDADD) $(LIBS) + +shutdown$(EXEEXT): $(shutdown_OBJECTS) $(shutdown_DEPENDENCIES) $(EXTRA_shutdown_DEPENDENCIES) + @rm -f shutdown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shutdown_OBJECTS) $(shutdown_LDADD) $(LIBS) + +sigaction$(EXEEXT): $(sigaction_OBJECTS) $(sigaction_DEPENDENCIES) $(EXTRA_sigaction_DEPENDENCIES) + @rm -f sigaction$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigaction_OBJECTS) $(sigaction_LDADD) $(LIBS) + +sigaltstack$(EXEEXT): $(sigaltstack_OBJECTS) $(sigaltstack_DEPENDENCIES) $(EXTRA_sigaltstack_DEPENDENCIES) + @rm -f sigaltstack$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigaltstack_OBJECTS) $(sigaltstack_LDADD) $(LIBS) + +siginfo$(EXEEXT): $(siginfo_OBJECTS) $(siginfo_DEPENDENCIES) $(EXTRA_siginfo_DEPENDENCIES) + @rm -f siginfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(siginfo_OBJECTS) $(siginfo_LDADD) $(LIBS) + +signal_receive$(EXEEXT): $(signal_receive_OBJECTS) $(signal_receive_DEPENDENCIES) $(EXTRA_signal_receive_DEPENDENCIES) + @rm -f signal_receive$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(signal_receive_OBJECTS) $(signal_receive_LDADD) $(LIBS) + +signalfd4$(EXEEXT): $(signalfd4_OBJECTS) $(signalfd4_DEPENDENCIES) $(EXTRA_signalfd4_DEPENDENCIES) + @rm -f signalfd4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(signalfd4_OBJECTS) $(signalfd4_LDADD) $(LIBS) + +sigreturn$(EXEEXT): $(sigreturn_OBJECTS) $(sigreturn_DEPENDENCIES) $(EXTRA_sigreturn_DEPENDENCIES) + @rm -f sigreturn$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigreturn_OBJECTS) $(sigreturn_LDADD) $(LIBS) + +sleep$(EXEEXT): $(sleep_OBJECTS) $(sleep_DEPENDENCIES) $(EXTRA_sleep_DEPENDENCIES) + @rm -f sleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sleep_OBJECTS) $(sleep_LDADD) $(LIBS) + +socketcall$(EXEEXT): $(socketcall_OBJECTS) $(socketcall_DEPENDENCIES) $(EXTRA_socketcall_DEPENDENCIES) + @rm -f socketcall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(socketcall_OBJECTS) $(socketcall_LDADD) $(LIBS) + +splice$(EXEEXT): $(splice_OBJECTS) $(splice_DEPENDENCIES) $(EXTRA_splice_DEPENDENCIES) + @rm -f splice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(splice_OBJECTS) $(splice_LDADD) $(LIBS) + +stack-fcall$(EXEEXT): $(stack_fcall_OBJECTS) $(stack_fcall_DEPENDENCIES) $(EXTRA_stack_fcall_DEPENDENCIES) + @rm -f stack-fcall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stack_fcall_OBJECTS) $(stack_fcall_LDADD) $(LIBS) + +stat$(EXEEXT): $(stat_OBJECTS) $(stat_DEPENDENCIES) $(EXTRA_stat_DEPENDENCIES) + @rm -f stat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stat_OBJECTS) $(stat_LDADD) $(LIBS) + +stat64$(EXEEXT): $(stat64_OBJECTS) $(stat64_DEPENDENCIES) $(EXTRA_stat64_DEPENDENCIES) + @rm -f stat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stat64_OBJECTS) $(stat64_LDADD) $(LIBS) + +statfs$(EXEEXT): $(statfs_OBJECTS) $(statfs_DEPENDENCIES) $(EXTRA_statfs_DEPENDENCIES) + @rm -f statfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs_OBJECTS) $(statfs_LDADD) $(LIBS) + +statfs64$(EXEEXT): $(statfs64_OBJECTS) $(statfs64_DEPENDENCIES) $(EXTRA_statfs64_DEPENDENCIES) + @rm -f statfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs64_OBJECTS) $(statfs64_LDADD) $(LIBS) + +swap$(EXEEXT): $(swap_OBJECTS) $(swap_DEPENDENCIES) $(EXTRA_swap_DEPENDENCIES) + @rm -f swap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(swap_OBJECTS) $(swap_LDADD) $(LIBS) + +symlink$(EXEEXT): $(symlink_OBJECTS) $(symlink_DEPENDENCIES) $(EXTRA_symlink_DEPENDENCIES) + @rm -f symlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlink_OBJECTS) $(symlink_LDADD) $(LIBS) + +symlinkat$(EXEEXT): $(symlinkat_OBJECTS) $(symlinkat_DEPENDENCIES) $(EXTRA_symlinkat_DEPENDENCIES) + @rm -f symlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlinkat_OBJECTS) $(symlinkat_LDADD) $(LIBS) + +sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES) $(EXTRA_sync_DEPENDENCIES) + @rm -f sync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_OBJECTS) $(sync_LDADD) $(LIBS) + +sync_file_range$(EXEEXT): $(sync_file_range_OBJECTS) $(sync_file_range_DEPENDENCIES) $(EXTRA_sync_file_range_DEPENDENCIES) + @rm -f sync_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range_OBJECTS) $(sync_file_range_LDADD) $(LIBS) + +sync_file_range2$(EXEEXT): $(sync_file_range2_OBJECTS) $(sync_file_range2_DEPENDENCIES) $(EXTRA_sync_file_range2_DEPENDENCIES) + @rm -f sync_file_range2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range2_OBJECTS) $(sync_file_range2_LDADD) $(LIBS) + +sysinfo$(EXEEXT): $(sysinfo_OBJECTS) $(sysinfo_DEPENDENCIES) $(EXTRA_sysinfo_DEPENDENCIES) + @rm -f sysinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sysinfo_OBJECTS) $(sysinfo_LDADD) $(LIBS) + +syslog$(EXEEXT): $(syslog_OBJECTS) $(syslog_DEPENDENCIES) $(EXTRA_syslog_DEPENDENCIES) + @rm -f syslog$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(syslog_OBJECTS) $(syslog_LDADD) $(LIBS) + +tee$(EXEEXT): $(tee_OBJECTS) $(tee_DEPENDENCIES) $(EXTRA_tee_DEPENDENCIES) + @rm -f tee$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tee_OBJECTS) $(tee_LDADD) $(LIBS) + +threads-execve$(EXEEXT): $(threads_execve_OBJECTS) $(threads_execve_DEPENDENCIES) $(EXTRA_threads_execve_DEPENDENCIES) + @rm -f threads-execve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(threads_execve_OBJECTS) $(threads_execve_LDADD) $(LIBS) + +time$(EXEEXT): $(time_OBJECTS) $(time_DEPENDENCIES) $(EXTRA_time_DEPENDENCIES) + @rm -f time$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(time_OBJECTS) $(time_LDADD) $(LIBS) + +timer_create$(EXEEXT): $(timer_create_OBJECTS) $(timer_create_DEPENDENCIES) $(EXTRA_timer_create_DEPENDENCIES) + @rm -f timer_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timer_create_OBJECTS) $(timer_create_LDADD) $(LIBS) + +timer_xettime$(EXEEXT): $(timer_xettime_OBJECTS) $(timer_xettime_DEPENDENCIES) $(EXTRA_timer_xettime_DEPENDENCIES) + @rm -f timer_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timer_xettime_OBJECTS) $(timer_xettime_LDADD) $(LIBS) + +timerfd_xettime$(EXEEXT): $(timerfd_xettime_OBJECTS) $(timerfd_xettime_DEPENDENCIES) $(EXTRA_timerfd_xettime_DEPENDENCIES) + @rm -f timerfd_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timerfd_xettime_OBJECTS) $(timerfd_xettime_LDADD) $(LIBS) + +times$(EXEEXT): $(times_OBJECTS) $(times_DEPENDENCIES) $(EXTRA_times_DEPENDENCIES) + @rm -f times$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(times_OBJECTS) $(times_LDADD) $(LIBS) + +times-fail$(EXEEXT): $(times_fail_OBJECTS) $(times_fail_DEPENDENCIES) $(EXTRA_times_fail_DEPENDENCIES) + @rm -f times-fail$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(times_fail_OBJECTS) $(times_fail_LDADD) $(LIBS) + +truncate$(EXEEXT): $(truncate_OBJECTS) $(truncate_DEPENDENCIES) $(EXTRA_truncate_DEPENDENCIES) + @rm -f truncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(truncate_OBJECTS) $(truncate_LDADD) $(LIBS) + +truncate64$(EXEEXT): $(truncate64_OBJECTS) $(truncate64_DEPENDENCIES) $(EXTRA_truncate64_DEPENDENCIES) + @rm -f truncate64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(truncate64_OBJECTS) $(truncate64_LDADD) $(LIBS) + +ugetrlimit$(EXEEXT): $(ugetrlimit_OBJECTS) $(ugetrlimit_DEPENDENCIES) $(EXTRA_ugetrlimit_DEPENDENCIES) + @rm -f ugetrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ugetrlimit_OBJECTS) $(ugetrlimit_LDADD) $(LIBS) + +uio$(EXEEXT): $(uio_OBJECTS) $(uio_DEPENDENCIES) $(EXTRA_uio_DEPENDENCIES) + @rm -f uio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uio_OBJECTS) $(uio_LDADD) $(LIBS) + +umask$(EXEEXT): $(umask_OBJECTS) $(umask_DEPENDENCIES) $(EXTRA_umask_DEPENDENCIES) + @rm -f umask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umask_OBJECTS) $(umask_LDADD) $(LIBS) + +umount$(EXEEXT): $(umount_OBJECTS) $(umount_DEPENDENCIES) $(EXTRA_umount_DEPENDENCIES) + @rm -f umount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umount_OBJECTS) $(umount_LDADD) $(LIBS) + +umount2$(EXEEXT): $(umount2_OBJECTS) $(umount2_DEPENDENCIES) $(EXTRA_umount2_DEPENDENCIES) + @rm -f umount2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umount2_OBJECTS) $(umount2_LDADD) $(LIBS) + +umoven-illptr$(EXEEXT): $(umoven_illptr_OBJECTS) $(umoven_illptr_DEPENDENCIES) $(EXTRA_umoven_illptr_DEPENDENCIES) + @rm -f umoven-illptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umoven_illptr_OBJECTS) $(umoven_illptr_LDADD) $(LIBS) + +umovestr$(EXEEXT): $(umovestr_OBJECTS) $(umovestr_DEPENDENCIES) $(EXTRA_umovestr_DEPENDENCIES) + @rm -f umovestr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr_OBJECTS) $(umovestr_LDADD) $(LIBS) + +umovestr-illptr$(EXEEXT): $(umovestr_illptr_OBJECTS) $(umovestr_illptr_DEPENDENCIES) $(EXTRA_umovestr_illptr_DEPENDENCIES) + @rm -f umovestr-illptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr_illptr_OBJECTS) $(umovestr_illptr_LDADD) $(LIBS) + +umovestr2$(EXEEXT): $(umovestr2_OBJECTS) $(umovestr2_DEPENDENCIES) $(EXTRA_umovestr2_DEPENDENCIES) + @rm -f umovestr2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr2_OBJECTS) $(umovestr2_LDADD) $(LIBS) + +umovestr3$(EXEEXT): $(umovestr3_OBJECTS) $(umovestr3_DEPENDENCIES) $(EXTRA_umovestr3_DEPENDENCIES) + @rm -f umovestr3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr3_OBJECTS) $(umovestr3_LDADD) $(LIBS) + +uname$(EXEEXT): $(uname_OBJECTS) $(uname_DEPENDENCIES) $(EXTRA_uname_DEPENDENCIES) + @rm -f uname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uname_OBJECTS) $(uname_LDADD) $(LIBS) + +unix-pair-send-recv$(EXEEXT): $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_DEPENDENCIES) $(EXTRA_unix_pair_send_recv_DEPENDENCIES) + @rm -f unix-pair-send-recv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_LDADD) $(LIBS) + +unix-pair-sendto-recvfrom$(EXEEXT): $(unix_pair_sendto_recvfrom_OBJECTS) $(unix_pair_sendto_recvfrom_DEPENDENCIES) $(EXTRA_unix_pair_sendto_recvfrom_DEPENDENCIES) + @rm -f unix-pair-sendto-recvfrom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unix_pair_sendto_recvfrom_OBJECTS) $(unix_pair_sendto_recvfrom_LDADD) $(LIBS) + +unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) $(EXTRA_unlink_DEPENDENCIES) + @rm -f unlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS) + +unlinkat$(EXEEXT): $(unlinkat_OBJECTS) $(unlinkat_DEPENDENCIES) $(EXTRA_unlinkat_DEPENDENCIES) + @rm -f unlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlinkat_OBJECTS) $(unlinkat_LDADD) $(LIBS) + +unshare$(EXEEXT): $(unshare_OBJECTS) $(unshare_DEPENDENCIES) $(EXTRA_unshare_DEPENDENCIES) + @rm -f unshare$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unshare_OBJECTS) $(unshare_LDADD) $(LIBS) + +userfaultfd$(EXEEXT): $(userfaultfd_OBJECTS) $(userfaultfd_DEPENDENCIES) $(EXTRA_userfaultfd_DEPENDENCIES) + @rm -f userfaultfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(userfaultfd_OBJECTS) $(userfaultfd_LDADD) $(LIBS) + +ustat$(EXEEXT): $(ustat_OBJECTS) $(ustat_DEPENDENCIES) $(EXTRA_ustat_DEPENDENCIES) + @rm -f ustat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ustat_OBJECTS) $(ustat_LDADD) $(LIBS) + +utime$(EXEEXT): $(utime_OBJECTS) $(utime_DEPENDENCIES) $(EXTRA_utime_DEPENDENCIES) + @rm -f utime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utime_OBJECTS) $(utime_LDADD) $(LIBS) + +utimensat$(EXEEXT): $(utimensat_OBJECTS) $(utimensat_DEPENDENCIES) $(EXTRA_utimensat_DEPENDENCIES) + @rm -f utimensat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimensat_OBJECTS) $(utimensat_LDADD) $(LIBS) + +utimes$(EXEEXT): $(utimes_OBJECTS) $(utimes_DEPENDENCIES) $(EXTRA_utimes_DEPENDENCIES) + @rm -f utimes$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimes_OBJECTS) $(utimes_LDADD) $(LIBS) + +vfork-f$(EXEEXT): $(vfork_f_OBJECTS) $(vfork_f_DEPENDENCIES) $(EXTRA_vfork_f_DEPENDENCIES) + @rm -f vfork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfork_f_OBJECTS) $(vfork_f_LDADD) $(LIBS) + +vhangup$(EXEEXT): $(vhangup_OBJECTS) $(vhangup_DEPENDENCIES) $(EXTRA_vhangup_DEPENDENCIES) + @rm -f vhangup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vhangup_OBJECTS) $(vhangup_LDADD) $(LIBS) + +vmsplice$(EXEEXT): $(vmsplice_OBJECTS) $(vmsplice_DEPENDENCIES) $(EXTRA_vmsplice_DEPENDENCIES) + @rm -f vmsplice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vmsplice_OBJECTS) $(vmsplice_LDADD) $(LIBS) + +wait4$(EXEEXT): $(wait4_OBJECTS) $(wait4_DEPENDENCIES) $(EXTRA_wait4_DEPENDENCIES) + @rm -f wait4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wait4_OBJECTS) $(wait4_LDADD) $(LIBS) + +wait4-v$(EXEEXT): $(wait4_v_OBJECTS) $(wait4_v_DEPENDENCIES) $(EXTRA_wait4_v_DEPENDENCIES) + @rm -f wait4-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wait4_v_OBJECTS) $(wait4_v_LDADD) $(LIBS) + +waitid$(EXEEXT): $(waitid_OBJECTS) $(waitid_DEPENDENCIES) $(EXTRA_waitid_DEPENDENCIES) + @rm -f waitid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitid_OBJECTS) $(waitid_LDADD) $(LIBS) + +waitid-v$(EXEEXT): $(waitid_v_OBJECTS) $(waitid_v_DEPENDENCIES) $(EXTRA_waitid_v_DEPENDENCIES) + @rm -f waitid-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitid_v_OBJECTS) $(waitid_v_LDADD) $(LIBS) + +waitpid$(EXEEXT): $(waitpid_OBJECTS) $(waitpid_DEPENDENCIES) $(EXTRA_waitpid_DEPENDENCIES) + @rm -f waitpid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitpid_OBJECTS) $(waitpid_LDADD) $(LIBS) + +xattr$(EXEEXT): $(xattr_OBJECTS) $(xattr_DEPENDENCIES) $(EXTRA_xattr_DEPENDENCIES) + @rm -f xattr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xattr_OBJECTS) $(xattr_LDADD) $(LIBS) + +xattr-strings$(EXEEXT): $(xattr_strings_OBJECTS) $(xattr_strings_DEPENDENCIES) $(EXTRA_xattr_strings_DEPENDENCIES) + @rm -f xattr-strings$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xattr_strings_OBJECTS) $(xattr_strings_LDADD) $(LIBS) + +xet_robust_list$(EXEEXT): $(xet_robust_list_OBJECTS) $(xet_robust_list_DEPENDENCIES) $(EXTRA_xet_robust_list_DEPENDENCIES) + @rm -f xet_robust_list$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xet_robust_list_OBJECTS) $(xet_robust_list_LDADD) $(LIBS) + +xetitimer$(EXEEXT): $(xetitimer_OBJECTS) $(xetitimer_DEPENDENCIES) $(EXTRA_xetitimer_DEPENDENCIES) + @rm -f xetitimer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetitimer_OBJECTS) $(xetitimer_LDADD) $(LIBS) + +xetpgid$(EXEEXT): $(xetpgid_OBJECTS) $(xetpgid_DEPENDENCIES) $(EXTRA_xetpgid_DEPENDENCIES) + @rm -f xetpgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpgid_OBJECTS) $(xetpgid_LDADD) $(LIBS) + +xetpriority$(EXEEXT): $(xetpriority_OBJECTS) $(xetpriority_DEPENDENCIES) $(EXTRA_xetpriority_DEPENDENCIES) + @rm -f xetpriority$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpriority_OBJECTS) $(xetpriority_LDADD) $(LIBS) + +xettimeofday$(EXEEXT): $(xettimeofday_OBJECTS) $(xettimeofday_DEPENDENCIES) $(EXTRA_xettimeofday_DEPENDENCIES) + @rm -f xettimeofday$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xettimeofday_OBJECTS) $(xettimeofday_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/_newselect.Po +include ./$(DEPDIR)/accept.Po +include ./$(DEPDIR)/accept4.Po +include ./$(DEPDIR)/access.Po +include ./$(DEPDIR)/acct.Po +include ./$(DEPDIR)/add_key.Po +include ./$(DEPDIR)/adjtimex.Po +include ./$(DEPDIR)/aio.Po +include ./$(DEPDIR)/alarm.Po +include ./$(DEPDIR)/answer.Po +include ./$(DEPDIR)/attach-f-p-cmd.Po +include ./$(DEPDIR)/attach-f-p.Po +include ./$(DEPDIR)/attach-p-cmd-cmd.Po +include ./$(DEPDIR)/attach-p-cmd-p.Po +include ./$(DEPDIR)/bpf.Po +include ./$(DEPDIR)/brk.Po +include ./$(DEPDIR)/btrfs.Po +include ./$(DEPDIR)/caps-abbrev.Po +include ./$(DEPDIR)/caps.Po +include ./$(DEPDIR)/chmod.Po +include ./$(DEPDIR)/chown.Po +include ./$(DEPDIR)/chown32.Po +include ./$(DEPDIR)/chroot.Po +include ./$(DEPDIR)/clock_adjtime.Po +include ./$(DEPDIR)/clock_nanosleep.Po +include ./$(DEPDIR)/clock_xettime.Po +include ./$(DEPDIR)/copy_file_range.Po +include ./$(DEPDIR)/count-f.Po +include ./$(DEPDIR)/creat.Po +include ./$(DEPDIR)/delete_module.Po +include ./$(DEPDIR)/dup.Po +include ./$(DEPDIR)/dup2.Po +include ./$(DEPDIR)/dup3.Po +include ./$(DEPDIR)/epoll_create.Po +include ./$(DEPDIR)/epoll_create1.Po +include ./$(DEPDIR)/epoll_ctl.Po +include ./$(DEPDIR)/epoll_pwait.Po +include ./$(DEPDIR)/epoll_wait.Po +include ./$(DEPDIR)/erestartsys.Po +include ./$(DEPDIR)/eventfd.Po +include ./$(DEPDIR)/execve-v.Po +include ./$(DEPDIR)/execve.Po +include ./$(DEPDIR)/execveat-v.Po +include ./$(DEPDIR)/execveat.Po +include ./$(DEPDIR)/faccessat.Po +include ./$(DEPDIR)/fadvise64.Po +include ./$(DEPDIR)/fadvise64_64.Po +include ./$(DEPDIR)/fallocate.Po +include ./$(DEPDIR)/fanotify_init.Po +include ./$(DEPDIR)/fanotify_mark.Po +include ./$(DEPDIR)/fchdir.Po +include ./$(DEPDIR)/fchmod.Po +include ./$(DEPDIR)/fchmodat.Po +include ./$(DEPDIR)/fchown.Po +include ./$(DEPDIR)/fchown32.Po +include ./$(DEPDIR)/fchownat.Po +include ./$(DEPDIR)/fcntl.Po +include ./$(DEPDIR)/fcntl64.Po +include ./$(DEPDIR)/fdatasync.Po +include ./$(DEPDIR)/file_handle.Po +include ./$(DEPDIR)/file_ioctl.Po +include ./$(DEPDIR)/filter-unavailable.Po +include ./$(DEPDIR)/finit_module.Po +include ./$(DEPDIR)/flock.Po +include ./$(DEPDIR)/fork-f.Po +include ./$(DEPDIR)/fstat.Po +include ./$(DEPDIR)/fstat64-fstat64.Po +include ./$(DEPDIR)/fstatat64-fstatat64.Po +include ./$(DEPDIR)/fstatfs.Po +include ./$(DEPDIR)/fstatfs64.Po +include ./$(DEPDIR)/fsync.Po +include ./$(DEPDIR)/ftruncate.Po +include ./$(DEPDIR)/ftruncate64-ftruncate64.Po +include ./$(DEPDIR)/futex.Po +include ./$(DEPDIR)/futimesat.Po +include ./$(DEPDIR)/get_mempolicy.Po +include ./$(DEPDIR)/getcpu.Po +include ./$(DEPDIR)/getcwd.Po +include ./$(DEPDIR)/getdents.Po +include ./$(DEPDIR)/getdents64.Po +include ./$(DEPDIR)/getegid.Po +include ./$(DEPDIR)/getegid32.Po +include ./$(DEPDIR)/geteuid.Po +include ./$(DEPDIR)/geteuid32.Po +include ./$(DEPDIR)/getgid.Po +include ./$(DEPDIR)/getgid32.Po +include ./$(DEPDIR)/getgroups.Po +include ./$(DEPDIR)/getgroups32.Po +include ./$(DEPDIR)/getpeername.Po +include ./$(DEPDIR)/getpgrp.Po +include ./$(DEPDIR)/getrandom.Po +include ./$(DEPDIR)/getresgid.Po +include ./$(DEPDIR)/getresgid32.Po +include ./$(DEPDIR)/getresuid.Po +include ./$(DEPDIR)/getresuid32.Po +include ./$(DEPDIR)/getrlimit.Po +include ./$(DEPDIR)/getrusage.Po +include ./$(DEPDIR)/getsid.Po +include ./$(DEPDIR)/getsockname.Po +include ./$(DEPDIR)/getuid.Po +include ./$(DEPDIR)/getuid32.Po +include ./$(DEPDIR)/getxxid.Po +include ./$(DEPDIR)/inet-cmsg.Po +include ./$(DEPDIR)/init_module.Po +include ./$(DEPDIR)/inotify.Po +include ./$(DEPDIR)/inotify_init1.Po +include ./$(DEPDIR)/ioctl.Po +include ./$(DEPDIR)/ioctl_block.Po +include ./$(DEPDIR)/ioctl_dm-v.Po +include ./$(DEPDIR)/ioctl_dm.Po +include ./$(DEPDIR)/ioctl_evdev-v.Po +include ./$(DEPDIR)/ioctl_evdev.Po +include ./$(DEPDIR)/ioctl_loop-nv.Po +include ./$(DEPDIR)/ioctl_loop-v.Po +include ./$(DEPDIR)/ioctl_loop.Po +include ./$(DEPDIR)/ioctl_mtd.Po +include ./$(DEPDIR)/ioctl_rtc-v.Po +include ./$(DEPDIR)/ioctl_rtc.Po +include ./$(DEPDIR)/ioctl_scsi.Po +include ./$(DEPDIR)/ioctl_sg_io_v3.Po +include ./$(DEPDIR)/ioctl_sg_io_v4.Po +include ./$(DEPDIR)/ioctl_sock_gifconf.Po +include ./$(DEPDIR)/ioctl_uffdio.Po +include ./$(DEPDIR)/ioctl_v4l2.Po +include ./$(DEPDIR)/ioperm.Po +include ./$(DEPDIR)/iopl.Po +include ./$(DEPDIR)/ioprio.Po +include ./$(DEPDIR)/ip_mreq.Po +include ./$(DEPDIR)/ipc.Po +include ./$(DEPDIR)/ipc_msg.Po +include ./$(DEPDIR)/ipc_msgbuf.Po +include ./$(DEPDIR)/ipc_sem.Po +include ./$(DEPDIR)/ipc_shm.Po +include ./$(DEPDIR)/kcmp.Po +include ./$(DEPDIR)/kexec_file_load.Po +include ./$(DEPDIR)/kexec_load.Po +include ./$(DEPDIR)/keyctl.Po +include ./$(DEPDIR)/kill.Po +include ./$(DEPDIR)/ksysent.Po +include ./$(DEPDIR)/lchown.Po +include ./$(DEPDIR)/lchown32.Po +include ./$(DEPDIR)/libtests_a-errno2name.Po +include ./$(DEPDIR)/libtests_a-error_msg.Po +include ./$(DEPDIR)/libtests_a-fill_memory.Po +include ./$(DEPDIR)/libtests_a-get_page_size.Po +include ./$(DEPDIR)/libtests_a-hexdump_strdup.Po +include ./$(DEPDIR)/libtests_a-hexquote_strndup.Po +include ./$(DEPDIR)/libtests_a-inode_of_sockfd.Po +include ./$(DEPDIR)/libtests_a-libmmsg.Po +include ./$(DEPDIR)/libtests_a-libsocketcall.Po +include ./$(DEPDIR)/libtests_a-overflowuid.Po +include ./$(DEPDIR)/libtests_a-pipe_maxfd.Po +include ./$(DEPDIR)/libtests_a-print_quoted_string.Po +include ./$(DEPDIR)/libtests_a-printflags.Po +include ./$(DEPDIR)/libtests_a-printxval.Po +include ./$(DEPDIR)/libtests_a-signal2name.Po +include ./$(DEPDIR)/libtests_a-sprintrc.Po +include ./$(DEPDIR)/libtests_a-tail_alloc.Po +include ./$(DEPDIR)/libtests_a-tprintf.Po +include ./$(DEPDIR)/link.Po +include ./$(DEPDIR)/linkat.Po +include ./$(DEPDIR)/llseek.Po +include ./$(DEPDIR)/lookup_dcookie.Po +include ./$(DEPDIR)/lseek.Po +include ./$(DEPDIR)/lstat.Po +include ./$(DEPDIR)/lstat64-lstat64.Po +include ./$(DEPDIR)/mbind.Po +include ./$(DEPDIR)/membarrier.Po +include ./$(DEPDIR)/memfd_create.Po +include ./$(DEPDIR)/migrate_pages.Po +include ./$(DEPDIR)/mincore.Po +include ./$(DEPDIR)/mkdir.Po +include ./$(DEPDIR)/mkdirat.Po +include ./$(DEPDIR)/mknod.Po +include ./$(DEPDIR)/mknodat.Po +include ./$(DEPDIR)/mlock.Po +include ./$(DEPDIR)/mlock2.Po +include ./$(DEPDIR)/mlockall.Po +include ./$(DEPDIR)/mmap.Po +include ./$(DEPDIR)/mmap64-mmap64.Po +include ./$(DEPDIR)/mmsg-silent.Po +include ./$(DEPDIR)/mmsg.Po +include ./$(DEPDIR)/mmsg_name-v.Po +include ./$(DEPDIR)/mmsg_name.Po +include ./$(DEPDIR)/mount.Po +include ./$(DEPDIR)/move_pages.Po +include ./$(DEPDIR)/mq.Po +include ./$(DEPDIR)/mq_sendrecv-read.Po +include ./$(DEPDIR)/mq_sendrecv-write.Po +include ./$(DEPDIR)/mq_sendrecv.Po +include ./$(DEPDIR)/msg_control-v.Po +include ./$(DEPDIR)/msg_control.Po +include ./$(DEPDIR)/msg_name.Po +include ./$(DEPDIR)/munlockall.Po +include ./$(DEPDIR)/nanosleep.Po +include ./$(DEPDIR)/net-accept-connect.Po +include ./$(DEPDIR)/net-icmp_filter.Po +include ./$(DEPDIR)/net-sockaddr.Po +include ./$(DEPDIR)/net-y-unix.Po +include ./$(DEPDIR)/net-yy-inet.Po +include ./$(DEPDIR)/net-yy-netlink.Po +include ./$(DEPDIR)/net-yy-unix.Po +include ./$(DEPDIR)/netlink_inet_diag.Po +include ./$(DEPDIR)/netlink_netlink_diag.Po +include ./$(DEPDIR)/netlink_protocol.Po +include ./$(DEPDIR)/netlink_unix_diag.Po +include ./$(DEPDIR)/newfstatat-newfstatat.Po +include ./$(DEPDIR)/nsyscalls.Po +include ./$(DEPDIR)/old_mmap.Po +include ./$(DEPDIR)/oldfstat.Po +include ./$(DEPDIR)/oldlstat.Po +include ./$(DEPDIR)/oldselect.Po +include ./$(DEPDIR)/oldstat.Po +include ./$(DEPDIR)/open.Po +include ./$(DEPDIR)/openat.Po +include ./$(DEPDIR)/pause.Po +include ./$(DEPDIR)/pc.Po +include ./$(DEPDIR)/perf_event_open.Po +include ./$(DEPDIR)/perf_event_open_nonverbose.Po +include ./$(DEPDIR)/perf_event_open_unabbrev.Po +include ./$(DEPDIR)/personality.Po +include ./$(DEPDIR)/pipe.Po +include ./$(DEPDIR)/pipe2.Po +include ./$(DEPDIR)/pkey_alloc.Po +include ./$(DEPDIR)/pkey_free.Po +include ./$(DEPDIR)/pkey_mprotect.Po +include ./$(DEPDIR)/poll.Po +include ./$(DEPDIR)/ppoll.Po +include ./$(DEPDIR)/prctl-arg2-intptr.Po +include ./$(DEPDIR)/prctl-dumpable.Po +include ./$(DEPDIR)/prctl-name.Po +include ./$(DEPDIR)/prctl-no-args.Po +include ./$(DEPDIR)/prctl-pdeathsig.Po +include ./$(DEPDIR)/prctl-seccomp-filter-v.Po +include ./$(DEPDIR)/prctl-seccomp-strict.Po +include ./$(DEPDIR)/prctl-securebits.Po +include ./$(DEPDIR)/prctl-tid_address.Po +include ./$(DEPDIR)/prctl-tsc.Po +include ./$(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +include ./$(DEPDIR)/preadv-preadv.Po +include ./$(DEPDIR)/preadv2-pwritev2.Po +include ./$(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +include ./$(DEPDIR)/print_maxfd.Po +include ./$(DEPDIR)/printstr.Po +include ./$(DEPDIR)/prlimit64.Po +include ./$(DEPDIR)/process_vm_readv.Po +include ./$(DEPDIR)/process_vm_writev.Po +include ./$(DEPDIR)/pselect6.Po +include ./$(DEPDIR)/ptrace.Po +include ./$(DEPDIR)/pwritev-pwritev.Po +include ./$(DEPDIR)/qual_fault.Po +include ./$(DEPDIR)/qual_inject-error-signal.Po +include ./$(DEPDIR)/qual_inject-retval.Po +include ./$(DEPDIR)/qual_inject-signal.Po +include ./$(DEPDIR)/qual_signal.Po +include ./$(DEPDIR)/quotactl-v.Po +include ./$(DEPDIR)/quotactl-xfs-v.Po +include ./$(DEPDIR)/quotactl-xfs.Po +include ./$(DEPDIR)/quotactl.Po +include ./$(DEPDIR)/read-write.Po +include ./$(DEPDIR)/readahead.Po +include ./$(DEPDIR)/readdir.Po +include ./$(DEPDIR)/readlink.Po +include ./$(DEPDIR)/readlinkat.Po +include ./$(DEPDIR)/readv.Po +include ./$(DEPDIR)/reboot.Po +include ./$(DEPDIR)/recvfrom.Po +include ./$(DEPDIR)/recvmmsg-timeout.Po +include ./$(DEPDIR)/recvmsg.Po +include ./$(DEPDIR)/redirect-fds.Po +include ./$(DEPDIR)/remap_file_pages.Po +include ./$(DEPDIR)/rename.Po +include ./$(DEPDIR)/renameat.Po +include ./$(DEPDIR)/renameat2.Po +include ./$(DEPDIR)/request_key.Po +include ./$(DEPDIR)/restart_syscall.Po +include ./$(DEPDIR)/rmdir.Po +include ./$(DEPDIR)/rt_sigpending.Po +include ./$(DEPDIR)/rt_sigprocmask.Po +include ./$(DEPDIR)/rt_sigqueueinfo.Po +include ./$(DEPDIR)/rt_sigsuspend.Po +include ./$(DEPDIR)/rt_sigtimedwait.Po +include ./$(DEPDIR)/rt_tgsigqueueinfo.Po +include ./$(DEPDIR)/sched_get_priority_mxx.Po +include ./$(DEPDIR)/sched_rr_get_interval.Po +include ./$(DEPDIR)/sched_xetaffinity.Po +include ./$(DEPDIR)/sched_xetattr.Po +include ./$(DEPDIR)/sched_xetparam.Po +include ./$(DEPDIR)/sched_xetscheduler.Po +include ./$(DEPDIR)/sched_yield.Po +include ./$(DEPDIR)/scm_rights.Po +include ./$(DEPDIR)/seccomp-filter-v.Po +include ./$(DEPDIR)/seccomp-filter.Po +include ./$(DEPDIR)/seccomp-strict.Po +include ./$(DEPDIR)/select.Po +include ./$(DEPDIR)/semop.Po +include ./$(DEPDIR)/sendfile.Po +include ./$(DEPDIR)/sendfile64.Po +include ./$(DEPDIR)/set_mempolicy.Po +include ./$(DEPDIR)/set_ptracer_any.Po +include ./$(DEPDIR)/setdomainname.Po +include ./$(DEPDIR)/setfsgid.Po +include ./$(DEPDIR)/setfsgid32.Po +include ./$(DEPDIR)/setfsuid.Po +include ./$(DEPDIR)/setfsuid32.Po +include ./$(DEPDIR)/setgid.Po +include ./$(DEPDIR)/setgid32.Po +include ./$(DEPDIR)/setgroups.Po +include ./$(DEPDIR)/setgroups32.Po +include ./$(DEPDIR)/sethostname.Po +include ./$(DEPDIR)/setns.Po +include ./$(DEPDIR)/setregid.Po +include ./$(DEPDIR)/setregid32.Po +include ./$(DEPDIR)/setresgid.Po +include ./$(DEPDIR)/setresgid32.Po +include ./$(DEPDIR)/setresuid.Po +include ./$(DEPDIR)/setresuid32.Po +include ./$(DEPDIR)/setreuid.Po +include ./$(DEPDIR)/setreuid32.Po +include ./$(DEPDIR)/setrlimit.Po +include ./$(DEPDIR)/setuid.Po +include ./$(DEPDIR)/setuid32.Po +include ./$(DEPDIR)/shmxt.Po +include ./$(DEPDIR)/shutdown.Po +include ./$(DEPDIR)/sigaction.Po +include ./$(DEPDIR)/sigaltstack.Po +include ./$(DEPDIR)/siginfo.Po +include ./$(DEPDIR)/signal_receive.Po +include ./$(DEPDIR)/signalfd4.Po +include ./$(DEPDIR)/sigreturn.Po +include ./$(DEPDIR)/sleep.Po +include ./$(DEPDIR)/socketcall.Po +include ./$(DEPDIR)/splice.Po +include ./$(DEPDIR)/stack-fcall-0.Po +include ./$(DEPDIR)/stack-fcall-1.Po +include ./$(DEPDIR)/stack-fcall-2.Po +include ./$(DEPDIR)/stack-fcall-3.Po +include ./$(DEPDIR)/stack-fcall.Po +include ./$(DEPDIR)/stat.Po +include ./$(DEPDIR)/stat64-stat64.Po +include ./$(DEPDIR)/statfs-statfs.Po +include ./$(DEPDIR)/statfs64.Po +include ./$(DEPDIR)/swap.Po +include ./$(DEPDIR)/symlink.Po +include ./$(DEPDIR)/symlinkat.Po +include ./$(DEPDIR)/sync.Po +include ./$(DEPDIR)/sync_file_range.Po +include ./$(DEPDIR)/sync_file_range2.Po +include ./$(DEPDIR)/sysinfo.Po +include ./$(DEPDIR)/syslog.Po +include ./$(DEPDIR)/tee.Po +include ./$(DEPDIR)/threads-execve.Po +include ./$(DEPDIR)/time.Po +include ./$(DEPDIR)/timer_create.Po +include ./$(DEPDIR)/timer_xettime.Po +include ./$(DEPDIR)/timerfd_xettime.Po +include ./$(DEPDIR)/times-fail.Po +include ./$(DEPDIR)/times.Po +include ./$(DEPDIR)/truncate.Po +include ./$(DEPDIR)/truncate64-truncate64.Po +include ./$(DEPDIR)/ugetrlimit.Po +include ./$(DEPDIR)/uio-uio.Po +include ./$(DEPDIR)/umask.Po +include ./$(DEPDIR)/umount.Po +include ./$(DEPDIR)/umount2.Po +include ./$(DEPDIR)/umoven-illptr.Po +include ./$(DEPDIR)/umovestr-illptr.Po +include ./$(DEPDIR)/umovestr.Po +include ./$(DEPDIR)/umovestr2.Po +include ./$(DEPDIR)/umovestr3.Po +include ./$(DEPDIR)/uname.Po +include ./$(DEPDIR)/unix-pair-send-recv.Po +include ./$(DEPDIR)/unix-pair-sendto-recvfrom.Po +include ./$(DEPDIR)/unlink.Po +include ./$(DEPDIR)/unlinkat.Po +include ./$(DEPDIR)/unshare.Po +include ./$(DEPDIR)/userfaultfd.Po +include ./$(DEPDIR)/ustat.Po +include ./$(DEPDIR)/utime.Po +include ./$(DEPDIR)/utimensat.Po +include ./$(DEPDIR)/utimes.Po +include ./$(DEPDIR)/vfork-f.Po +include ./$(DEPDIR)/vhangup.Po +include ./$(DEPDIR)/vmsplice.Po +include ./$(DEPDIR)/wait4-v.Po +include ./$(DEPDIR)/wait4.Po +include ./$(DEPDIR)/waitid-v.Po +include ./$(DEPDIR)/waitid.Po +include ./$(DEPDIR)/waitpid.Po +include ./$(DEPDIR)/xattr-strings.Po +include ./$(DEPDIR)/xattr.Po +include ./$(DEPDIR)/xet_robust_list.Po +include ./$(DEPDIR)/xetitimer.Po +include ./$(DEPDIR)/xetpgid.Po +include ./$(DEPDIR)/xetpriority.Po +include ./$(DEPDIR)/xettimeofday.Po + +.c.o: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +libtests_a-errno2name.o: errno2name.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.o -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +# $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c + +libtests_a-errno2name.obj: errno2name.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +# $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` + +libtests_a-error_msg.o: error_msg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.o -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +# $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c + +libtests_a-error_msg.obj: error_msg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.obj -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +# $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` + +libtests_a-fill_memory.o: fill_memory.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-fill_memory.o -MD -MP -MF $(DEPDIR)/libtests_a-fill_memory.Tpo -c -o libtests_a-fill_memory.o `test -f 'fill_memory.c' || echo '$(srcdir)/'`fill_memory.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-fill_memory.Tpo $(DEPDIR)/libtests_a-fill_memory.Po +# $(AM_V_CC)source='fill_memory.c' object='libtests_a-fill_memory.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-fill_memory.o `test -f 'fill_memory.c' || echo '$(srcdir)/'`fill_memory.c + +libtests_a-fill_memory.obj: fill_memory.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-fill_memory.obj -MD -MP -MF $(DEPDIR)/libtests_a-fill_memory.Tpo -c -o libtests_a-fill_memory.obj `if test -f 'fill_memory.c'; then $(CYGPATH_W) 'fill_memory.c'; else $(CYGPATH_W) '$(srcdir)/fill_memory.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-fill_memory.Tpo $(DEPDIR)/libtests_a-fill_memory.Po +# $(AM_V_CC)source='fill_memory.c' object='libtests_a-fill_memory.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-fill_memory.obj `if test -f 'fill_memory.c'; then $(CYGPATH_W) 'fill_memory.c'; else $(CYGPATH_W) '$(srcdir)/fill_memory.c'; fi` + +libtests_a-get_page_size.o: get_page_size.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.o -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +# $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c + +libtests_a-get_page_size.obj: get_page_size.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.obj -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +# $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` + +libtests_a-hexdump_strdup.o: hexdump_strdup.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +# $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c + +libtests_a-hexdump_strdup.obj: hexdump_strdup.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +# $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` + +libtests_a-hexquote_strndup.o: hexquote_strndup.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +# $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c + +libtests_a-hexquote_strndup.obj: hexquote_strndup.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +# $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` + +libtests_a-inode_of_sockfd.o: inode_of_sockfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.o -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +# $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c + +libtests_a-inode_of_sockfd.obj: inode_of_sockfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +# $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` + +libtests_a-libmmsg.o: libmmsg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libmmsg.o -MD -MP -MF $(DEPDIR)/libtests_a-libmmsg.Tpo -c -o libtests_a-libmmsg.o `test -f 'libmmsg.c' || echo '$(srcdir)/'`libmmsg.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libmmsg.Tpo $(DEPDIR)/libtests_a-libmmsg.Po +# $(AM_V_CC)source='libmmsg.c' object='libtests_a-libmmsg.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libmmsg.o `test -f 'libmmsg.c' || echo '$(srcdir)/'`libmmsg.c + +libtests_a-libmmsg.obj: libmmsg.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libmmsg.obj -MD -MP -MF $(DEPDIR)/libtests_a-libmmsg.Tpo -c -o libtests_a-libmmsg.obj `if test -f 'libmmsg.c'; then $(CYGPATH_W) 'libmmsg.c'; else $(CYGPATH_W) '$(srcdir)/libmmsg.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libmmsg.Tpo $(DEPDIR)/libtests_a-libmmsg.Po +# $(AM_V_CC)source='libmmsg.c' object='libtests_a-libmmsg.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libmmsg.obj `if test -f 'libmmsg.c'; then $(CYGPATH_W) 'libmmsg.c'; else $(CYGPATH_W) '$(srcdir)/libmmsg.c'; fi` + +libtests_a-libsocketcall.o: libsocketcall.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libsocketcall.o -MD -MP -MF $(DEPDIR)/libtests_a-libsocketcall.Tpo -c -o libtests_a-libsocketcall.o `test -f 'libsocketcall.c' || echo '$(srcdir)/'`libsocketcall.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libsocketcall.Tpo $(DEPDIR)/libtests_a-libsocketcall.Po +# $(AM_V_CC)source='libsocketcall.c' object='libtests_a-libsocketcall.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libsocketcall.o `test -f 'libsocketcall.c' || echo '$(srcdir)/'`libsocketcall.c + +libtests_a-libsocketcall.obj: libsocketcall.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libsocketcall.obj -MD -MP -MF $(DEPDIR)/libtests_a-libsocketcall.Tpo -c -o libtests_a-libsocketcall.obj `if test -f 'libsocketcall.c'; then $(CYGPATH_W) 'libsocketcall.c'; else $(CYGPATH_W) '$(srcdir)/libsocketcall.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libsocketcall.Tpo $(DEPDIR)/libtests_a-libsocketcall.Po +# $(AM_V_CC)source='libsocketcall.c' object='libtests_a-libsocketcall.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libsocketcall.obj `if test -f 'libsocketcall.c'; then $(CYGPATH_W) 'libsocketcall.c'; else $(CYGPATH_W) '$(srcdir)/libsocketcall.c'; fi` + +libtests_a-overflowuid.o: overflowuid.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.o -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +# $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c + +libtests_a-overflowuid.obj: overflowuid.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.obj -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +# $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` + +libtests_a-pipe_maxfd.o: pipe_maxfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-pipe_maxfd.o -MD -MP -MF $(DEPDIR)/libtests_a-pipe_maxfd.Tpo -c -o libtests_a-pipe_maxfd.o `test -f 'pipe_maxfd.c' || echo '$(srcdir)/'`pipe_maxfd.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-pipe_maxfd.Tpo $(DEPDIR)/libtests_a-pipe_maxfd.Po +# $(AM_V_CC)source='pipe_maxfd.c' object='libtests_a-pipe_maxfd.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-pipe_maxfd.o `test -f 'pipe_maxfd.c' || echo '$(srcdir)/'`pipe_maxfd.c + +libtests_a-pipe_maxfd.obj: pipe_maxfd.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-pipe_maxfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-pipe_maxfd.Tpo -c -o libtests_a-pipe_maxfd.obj `if test -f 'pipe_maxfd.c'; then $(CYGPATH_W) 'pipe_maxfd.c'; else $(CYGPATH_W) '$(srcdir)/pipe_maxfd.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-pipe_maxfd.Tpo $(DEPDIR)/libtests_a-pipe_maxfd.Po +# $(AM_V_CC)source='pipe_maxfd.c' object='libtests_a-pipe_maxfd.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-pipe_maxfd.obj `if test -f 'pipe_maxfd.c'; then $(CYGPATH_W) 'pipe_maxfd.c'; else $(CYGPATH_W) '$(srcdir)/pipe_maxfd.c'; fi` + +libtests_a-print_quoted_string.o: print_quoted_string.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.o -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +# $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c + +libtests_a-print_quoted_string.obj: print_quoted_string.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.obj -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +# $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` + +libtests_a-printflags.o: printflags.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.o -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +# $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c + +libtests_a-printflags.obj: printflags.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.obj -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +# $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` + +libtests_a-printxval.o: printxval.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.o -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +# $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c + +libtests_a-printxval.obj: printxval.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.obj -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +# $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` + +libtests_a-signal2name.o: signal2name.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-signal2name.o -MD -MP -MF $(DEPDIR)/libtests_a-signal2name.Tpo -c -o libtests_a-signal2name.o `test -f 'signal2name.c' || echo '$(srcdir)/'`signal2name.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-signal2name.Tpo $(DEPDIR)/libtests_a-signal2name.Po +# $(AM_V_CC)source='signal2name.c' object='libtests_a-signal2name.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-signal2name.o `test -f 'signal2name.c' || echo '$(srcdir)/'`signal2name.c + +libtests_a-signal2name.obj: signal2name.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-signal2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-signal2name.Tpo -c -o libtests_a-signal2name.obj `if test -f 'signal2name.c'; then $(CYGPATH_W) 'signal2name.c'; else $(CYGPATH_W) '$(srcdir)/signal2name.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-signal2name.Tpo $(DEPDIR)/libtests_a-signal2name.Po +# $(AM_V_CC)source='signal2name.c' object='libtests_a-signal2name.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-signal2name.obj `if test -f 'signal2name.c'; then $(CYGPATH_W) 'signal2name.c'; else $(CYGPATH_W) '$(srcdir)/signal2name.c'; fi` + +libtests_a-sprintrc.o: sprintrc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-sprintrc.o -MD -MP -MF $(DEPDIR)/libtests_a-sprintrc.Tpo -c -o libtests_a-sprintrc.o `test -f 'sprintrc.c' || echo '$(srcdir)/'`sprintrc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-sprintrc.Tpo $(DEPDIR)/libtests_a-sprintrc.Po +# $(AM_V_CC)source='sprintrc.c' object='libtests_a-sprintrc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-sprintrc.o `test -f 'sprintrc.c' || echo '$(srcdir)/'`sprintrc.c + +libtests_a-sprintrc.obj: sprintrc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-sprintrc.obj -MD -MP -MF $(DEPDIR)/libtests_a-sprintrc.Tpo -c -o libtests_a-sprintrc.obj `if test -f 'sprintrc.c'; then $(CYGPATH_W) 'sprintrc.c'; else $(CYGPATH_W) '$(srcdir)/sprintrc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-sprintrc.Tpo $(DEPDIR)/libtests_a-sprintrc.Po +# $(AM_V_CC)source='sprintrc.c' object='libtests_a-sprintrc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-sprintrc.obj `if test -f 'sprintrc.c'; then $(CYGPATH_W) 'sprintrc.c'; else $(CYGPATH_W) '$(srcdir)/sprintrc.c'; fi` + +libtests_a-tail_alloc.o: tail_alloc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.o -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +# $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c + +libtests_a-tail_alloc.obj: tail_alloc.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.obj -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +# $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` + +libtests_a-tprintf.o: tprintf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.o -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +# $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c + +libtests_a-tprintf.obj: tprintf.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.obj -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +# $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` + +fstat64-fstat64.o: fstat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.o -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po +# $(AM_V_CC)source='fstat64.c' object='fstat64-fstat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c + +fstat64-fstat64.obj: fstat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.obj -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.obj `if test -f 'fstat64.c'; then $(CYGPATH_W) 'fstat64.c'; else $(CYGPATH_W) '$(srcdir)/fstat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po +# $(AM_V_CC)source='fstat64.c' object='fstat64-fstat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstat64-fstat64.obj `if test -f 'fstat64.c'; then $(CYGPATH_W) 'fstat64.c'; else $(CYGPATH_W) '$(srcdir)/fstat64.c'; fi` + +fstatat64-fstatat64.o: fstatat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstatat64-fstatat64.o -MD -MP -MF $(DEPDIR)/fstatat64-fstatat64.Tpo -c -o fstatat64-fstatat64.o `test -f 'fstatat64.c' || echo '$(srcdir)/'`fstatat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/fstatat64-fstatat64.Tpo $(DEPDIR)/fstatat64-fstatat64.Po +# $(AM_V_CC)source='fstatat64.c' object='fstatat64-fstatat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstatat64-fstatat64.o `test -f 'fstatat64.c' || echo '$(srcdir)/'`fstatat64.c + +fstatat64-fstatat64.obj: fstatat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstatat64-fstatat64.obj -MD -MP -MF $(DEPDIR)/fstatat64-fstatat64.Tpo -c -o fstatat64-fstatat64.obj `if test -f 'fstatat64.c'; then $(CYGPATH_W) 'fstatat64.c'; else $(CYGPATH_W) '$(srcdir)/fstatat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/fstatat64-fstatat64.Tpo $(DEPDIR)/fstatat64-fstatat64.Po +# $(AM_V_CC)source='fstatat64.c' object='fstatat64-fstatat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstatat64-fstatat64.obj `if test -f 'fstatat64.c'; then $(CYGPATH_W) 'fstatat64.c'; else $(CYGPATH_W) '$(srcdir)/fstatat64.c'; fi` + +ftruncate64-ftruncate64.o: ftruncate64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftruncate64-ftruncate64.o -MD -MP -MF $(DEPDIR)/ftruncate64-ftruncate64.Tpo -c -o ftruncate64-ftruncate64.o `test -f 'ftruncate64.c' || echo '$(srcdir)/'`ftruncate64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/ftruncate64-ftruncate64.Tpo $(DEPDIR)/ftruncate64-ftruncate64.Po +# $(AM_V_CC)source='ftruncate64.c' object='ftruncate64-ftruncate64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftruncate64-ftruncate64.o `test -f 'ftruncate64.c' || echo '$(srcdir)/'`ftruncate64.c + +ftruncate64-ftruncate64.obj: ftruncate64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftruncate64-ftruncate64.obj -MD -MP -MF $(DEPDIR)/ftruncate64-ftruncate64.Tpo -c -o ftruncate64-ftruncate64.obj `if test -f 'ftruncate64.c'; then $(CYGPATH_W) 'ftruncate64.c'; else $(CYGPATH_W) '$(srcdir)/ftruncate64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/ftruncate64-ftruncate64.Tpo $(DEPDIR)/ftruncate64-ftruncate64.Po +# $(AM_V_CC)source='ftruncate64.c' object='ftruncate64-ftruncate64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftruncate64-ftruncate64.obj `if test -f 'ftruncate64.c'; then $(CYGPATH_W) 'ftruncate64.c'; else $(CYGPATH_W) '$(srcdir)/ftruncate64.c'; fi` + +lstat64-lstat64.o: lstat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lstat64-lstat64.o -MD -MP -MF $(DEPDIR)/lstat64-lstat64.Tpo -c -o lstat64-lstat64.o `test -f 'lstat64.c' || echo '$(srcdir)/'`lstat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/lstat64-lstat64.Tpo $(DEPDIR)/lstat64-lstat64.Po +# $(AM_V_CC)source='lstat64.c' object='lstat64-lstat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lstat64-lstat64.o `test -f 'lstat64.c' || echo '$(srcdir)/'`lstat64.c + +lstat64-lstat64.obj: lstat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lstat64-lstat64.obj -MD -MP -MF $(DEPDIR)/lstat64-lstat64.Tpo -c -o lstat64-lstat64.obj `if test -f 'lstat64.c'; then $(CYGPATH_W) 'lstat64.c'; else $(CYGPATH_W) '$(srcdir)/lstat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/lstat64-lstat64.Tpo $(DEPDIR)/lstat64-lstat64.Po +# $(AM_V_CC)source='lstat64.c' object='lstat64-lstat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lstat64-lstat64.obj `if test -f 'lstat64.c'; then $(CYGPATH_W) 'lstat64.c'; else $(CYGPATH_W) '$(srcdir)/lstat64.c'; fi` + +mmap64-mmap64.o: mmap64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmap64-mmap64.o -MD -MP -MF $(DEPDIR)/mmap64-mmap64.Tpo -c -o mmap64-mmap64.o `test -f 'mmap64.c' || echo '$(srcdir)/'`mmap64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/mmap64-mmap64.Tpo $(DEPDIR)/mmap64-mmap64.Po +# $(AM_V_CC)source='mmap64.c' object='mmap64-mmap64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap64-mmap64.o `test -f 'mmap64.c' || echo '$(srcdir)/'`mmap64.c + +mmap64-mmap64.obj: mmap64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmap64-mmap64.obj -MD -MP -MF $(DEPDIR)/mmap64-mmap64.Tpo -c -o mmap64-mmap64.obj `if test -f 'mmap64.c'; then $(CYGPATH_W) 'mmap64.c'; else $(CYGPATH_W) '$(srcdir)/mmap64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/mmap64-mmap64.Tpo $(DEPDIR)/mmap64-mmap64.Po +# $(AM_V_CC)source='mmap64.c' object='mmap64-mmap64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap64-mmap64.obj `if test -f 'mmap64.c'; then $(CYGPATH_W) 'mmap64.c'; else $(CYGPATH_W) '$(srcdir)/mmap64.c'; fi` + +newfstatat-newfstatat.o: newfstatat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT newfstatat-newfstatat.o -MD -MP -MF $(DEPDIR)/newfstatat-newfstatat.Tpo -c -o newfstatat-newfstatat.o `test -f 'newfstatat.c' || echo '$(srcdir)/'`newfstatat.c + $(AM_V_at)$(am__mv) $(DEPDIR)/newfstatat-newfstatat.Tpo $(DEPDIR)/newfstatat-newfstatat.Po +# $(AM_V_CC)source='newfstatat.c' object='newfstatat-newfstatat.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.o `test -f 'newfstatat.c' || echo '$(srcdir)/'`newfstatat.c + +newfstatat-newfstatat.obj: newfstatat.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT newfstatat-newfstatat.obj -MD -MP -MF $(DEPDIR)/newfstatat-newfstatat.Tpo -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/newfstatat-newfstatat.Tpo $(DEPDIR)/newfstatat-newfstatat.Po +# $(AM_V_CC)source='newfstatat.c' object='newfstatat-newfstatat.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` + +pread64_pwrite64-pread64-pwrite64.o: pread64-pwrite64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.o -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +# $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c + +pread64_pwrite64-pread64-pwrite64.obj: pread64-pwrite64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.obj -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +# $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` + +preadv-preadv.o: preadv.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.o -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c + $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +# $(AM_V_CC)source='preadv.c' object='preadv-preadv.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c + +preadv-preadv.obj: preadv.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.obj -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +# $(AM_V_CC)source='preadv.c' object='preadv-preadv.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` + +preadv_pwritev-preadv-pwritev.o: preadv-pwritev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.o -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c + $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +# $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c + +preadv_pwritev-preadv-pwritev.obj: preadv-pwritev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.obj -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +# $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` + +pwritev-pwritev.o: pwritev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.o -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c + $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +# $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c + +pwritev-pwritev.obj: pwritev.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.obj -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +# $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` + +stat64-stat64.o: stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.o -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po +# $(AM_V_CC)source='stat64.c' object='stat64-stat64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c + +stat64-stat64.obj: stat64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.obj -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po +# $(AM_V_CC)source='stat64.c' object='stat64-stat64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat64-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` + +statfs-statfs.o: statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT statfs-statfs.o -MD -MP -MF $(DEPDIR)/statfs-statfs.Tpo -c -o statfs-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + $(AM_V_at)$(am__mv) $(DEPDIR)/statfs-statfs.Tpo $(DEPDIR)/statfs-statfs.Po +# $(AM_V_CC)source='statfs.c' object='statfs-statfs.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o statfs-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + +statfs-statfs.obj: statfs.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT statfs-statfs.obj -MD -MP -MF $(DEPDIR)/statfs-statfs.Tpo -c -o statfs-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/statfs-statfs.Tpo $(DEPDIR)/statfs-statfs.Po +# $(AM_V_CC)source='statfs.c' object='statfs-statfs.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o statfs-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + +truncate64-truncate64.o: truncate64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT truncate64-truncate64.o -MD -MP -MF $(DEPDIR)/truncate64-truncate64.Tpo -c -o truncate64-truncate64.o `test -f 'truncate64.c' || echo '$(srcdir)/'`truncate64.c + $(AM_V_at)$(am__mv) $(DEPDIR)/truncate64-truncate64.Tpo $(DEPDIR)/truncate64-truncate64.Po +# $(AM_V_CC)source='truncate64.c' object='truncate64-truncate64.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o truncate64-truncate64.o `test -f 'truncate64.c' || echo '$(srcdir)/'`truncate64.c + +truncate64-truncate64.obj: truncate64.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT truncate64-truncate64.obj -MD -MP -MF $(DEPDIR)/truncate64-truncate64.Tpo -c -o truncate64-truncate64.obj `if test -f 'truncate64.c'; then $(CYGPATH_W) 'truncate64.c'; else $(CYGPATH_W) '$(srcdir)/truncate64.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/truncate64-truncate64.Tpo $(DEPDIR)/truncate64-truncate64.Po +# $(AM_V_CC)source='truncate64.c' object='truncate64-truncate64.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o truncate64-truncate64.obj `if test -f 'truncate64.c'; then $(CYGPATH_W) 'truncate64.c'; else $(CYGPATH_W) '$(srcdir)/truncate64.c'; fi` + +uio-uio.o: uio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uio-uio.o -MD -MP -MF $(DEPDIR)/uio-uio.Tpo -c -o uio-uio.o `test -f 'uio.c' || echo '$(srcdir)/'`uio.c + $(AM_V_at)$(am__mv) $(DEPDIR)/uio-uio.Tpo $(DEPDIR)/uio-uio.Po +# $(AM_V_CC)source='uio.c' object='uio-uio.o' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uio-uio.o `test -f 'uio.c' || echo '$(srcdir)/'`uio.c + +uio-uio.obj: uio.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uio-uio.obj -MD -MP -MF $(DEPDIR)/uio-uio.Tpo -c -o uio-uio.obj `if test -f 'uio.c'; then $(CYGPATH_W) 'uio.c'; else $(CYGPATH_W) '$(srcdir)/uio.c'; fi` + $(AM_V_at)$(am__mv) $(DEPDIR)/uio-uio.Tpo $(DEPDIR)/uio-uio.Po +# $(AM_V_CC)source='uio.c' object='uio-uio.obj' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uio-uio.obj `if test -f 'uio.c'; then $(CYGPATH_W) 'uio.c'; else $(CYGPATH_W) '$(srcdir)/uio.c'; fi` +check-valgrind-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_LIBRARIES) $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +#.test$(EXEEXT).log: +# @p='$<'; \ +# $(am__set_b); \ +# $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +# --log-file $$b.log --trs-file $$b.trs \ +# $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +# "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-am + +check-valgrind-am: check-valgrind-local + +clean: clean-am + +clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am \ + check-valgrind-am check-valgrind-local clean \ + clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am + + + +# Valgrind check +# +# Optional: +# - VALGRIND_SUPPRESSIONS_FILES: Space-separated list of Valgrind suppressions +# files to load. (Default: empty) +# - VALGRIND_FLAGS: General flags to pass to all Valgrind tools. +# (Default: --num-callers=30) +# - VALGRIND_$toolname_FLAGS: Flags to pass to Valgrind $toolname (one of: +# memcheck, helgrind, drd, sgcheck). (Default: various) + +# Optional variables +VALGRIND_SUPPRESSIONS ?= $(addprefix --suppressions=,$(VALGRIND_SUPPRESSIONS_FILES)) +VALGRIND_FLAGS ?= --num-callers=30 +VALGRIND_memcheck_FLAGS ?= --leak-check=full --show-reachable=no +VALGRIND_helgrind_FLAGS ?= --history-level=approx +VALGRIND_drd_FLAGS ?= +VALGRIND_sgcheck_FLAGS ?= + +# Internal use +valgrind_log_files = $(addprefix test-suite-,$(addsuffix .log,$(valgrind_tools))) + +valgrind_memcheck_flags = --tool=memcheck $(VALGRIND_memcheck_FLAGS) +valgrind_helgrind_flags = --tool=helgrind $(VALGRIND_helgrind_FLAGS) +valgrind_drd_flags = --tool=drd $(VALGRIND_drd_FLAGS) +valgrind_sgcheck_flags = --tool=exp-sgcheck $(VALGRIND_sgcheck_FLAGS) + +valgrind_quiet = $(valgrind_quiet_$(V)) +valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY)) +valgrind_quiet_0 = --quiet +valgrind_v_use = $(valgrind_v_use_$(V)) +valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY)) +valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$@):; + +# Support running with and without libtool. +ifneq ($(LIBTOOL),) +valgrind_lt = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=execute +else +valgrind_lt = +endif + +# Use recursive makes in order to ignore errors during check +check-valgrind: +ifeq ($(VALGRIND_ENABLED),yes) + -$(AM_V_at)$(foreach tool,$(valgrind_enabled_tools), \ + $(MAKE) $(AM_MAKEFLAGS) -k check-valgrind-$(tool); \ + ) +else + @echo "Need to reconfigure with --enable-valgrind" +endif + +# Valgrind running +VALGRIND_TESTS_ENVIRONMENT = \ + $(TESTS_ENVIRONMENT) \ + env VALGRIND=$(VALGRIND) \ + G_SLICE=always-malloc,debug-blocks \ + G_DEBUG=fatal-warnings,fatal-criticals,gc-friendly + +VALGRIND_LOG_COMPILER = \ + $(valgrind_lt) \ + $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) + +define valgrind_tool_rule = +check-valgrind-$(1): $$(BUILT_SOURCES) +ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes) + $$(valgrind_v_use)$$(MAKE) $$(AM_MAKEFLAGS) check-am \ + TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \ + LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \ + LOG_FLAGS="$$(valgrind_$(1)_flags)" \ + TEST_SUITE_LOG=test-suite-$(1).log +else ifeq ($$(VALGRIND_ENABLED),yes) + @echo "Need to reconfigure with --enable-valgrind-$(1)" +else + @echo "Need to reconfigure with --enable-valgrind" +endif +endef + +$(foreach tool,$(valgrind_tools),$(eval $(call valgrind_tool_rule,$(tool)))) + +AM_DISTCHECK_CONFIGURE_FLAGS ?= +AM_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind + +MOSTLYCLEANFILES ?= +MOSTLYCLEANFILES += $(valgrind_log_files) + +.PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools)) + + +ksysent.h: $(srcdir)/ksysent.sed + echo '#include ' | \ + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 + LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 + mv -f $@.t2 $@ + rm -f $@.t1 + +ksysent.$(OBJEXT): ksysent.h +$(objects): scno.h + +syscallent.i: $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h + $(CPP) -P $(SCNO_CPPFLAGS) $^ -o $@ + +scno.h: $(top_srcdir)/scno.head syscallent.i + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + cat $< >> $@-t + LC_ALL=C sed -n '$(SCNO_SED)' $(filter-out $<,$^) >> $@-t + mv $@-t $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/Makefile.am b/tests/Makefile.am index 0c249696e..311d3bb3c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -43,6 +43,7 @@ AM_LDFLAGS = $(ARCH_MFLAGS) libtests_a_SOURCES = \ errno2name.c \ error_msg.c \ + fill_memory.c \ get_page_size.c \ hexdump_strdup.c \ hexquote_strndup.c \ @@ -50,6 +51,7 @@ libtests_a_SOURCES = \ libmmsg.c \ libsocketcall.c \ overflowuid.c \ + pipe_maxfd.c \ print_quoted_string.c \ printflags.c \ printxval.c \ @@ -73,13 +75,16 @@ check_PROGRAMS = \ adjtimex \ aio \ alarm \ + answer \ attach-f-p \ + attach-f-p-cmd \ attach-p-cmd-cmd \ attach-p-cmd-p \ bpf \ brk \ btrfs \ caps \ + caps-abbrev \ chmod \ chown \ chown32 \ @@ -90,6 +95,7 @@ check_PROGRAMS = \ copy_file_range \ count-f \ creat \ + delete_module \ dup \ dup2 \ dup3 \ @@ -98,6 +104,7 @@ check_PROGRAMS = \ epoll_ctl \ epoll_pwait \ epoll_wait \ + erestartsys \ eventfd \ execve \ execve-v \ @@ -107,6 +114,7 @@ check_PROGRAMS = \ fadvise64 \ fadvise64_64 \ fallocate \ + fanotify_init \ fanotify_mark \ fchdir \ fchmod \ @@ -120,6 +128,7 @@ check_PROGRAMS = \ file_handle \ file_ioctl \ filter-unavailable \ + finit_module \ flock \ fork-f \ fstat \ @@ -160,23 +169,39 @@ check_PROGRAMS = \ getuid32 \ getxxid \ inet-cmsg \ + init_module \ + inotify \ + inotify_init1 \ ioctl \ ioctl_block \ + ioctl_dm \ + ioctl_dm-v \ ioctl_evdev \ ioctl_evdev-v \ + ioctl_loop \ + ioctl_loop-nv \ + ioctl_loop-v \ ioctl_mtd \ ioctl_rtc \ ioctl_rtc-v \ + ioctl_scsi \ + ioctl_sg_io_v3 \ + ioctl_sg_io_v4 \ + ioctl_sock_gifconf \ ioctl_uffdio \ ioctl_v4l2 \ ioperm \ iopl \ + ioprio \ ip_mreq \ ipc \ ipc_msg \ ipc_msgbuf \ ipc_sem \ ipc_shm \ + kcmp \ + kexec_file_load \ + kexec_load \ keyctl \ kill \ ksysent \ @@ -185,6 +210,7 @@ check_PROGRAMS = \ link \ linkat \ llseek \ + lookup_dcookie \ lseek \ lstat \ lstat64 \ @@ -209,6 +235,9 @@ check_PROGRAMS = \ mount \ move_pages \ mq \ + mq_sendrecv \ + mq_sendrecv-read \ + mq_sendrecv-write \ msg_control \ msg_control-v \ msg_name \ @@ -228,26 +257,52 @@ check_PROGRAMS = \ newfstatat \ nsyscalls \ old_mmap \ + oldfstat \ + oldlstat \ oldselect \ + oldstat \ open \ openat \ pause \ pc \ perf_event_open \ + perf_event_open_nonverbose \ + perf_event_open_unabbrev \ personality \ pipe \ + pipe2 \ + pkey_alloc \ + pkey_free \ + pkey_mprotect \ poll \ ppoll \ + prctl-arg2-intptr \ + prctl-dumpable \ + prctl-name \ + prctl-no-args \ + prctl-pdeathsig \ prctl-seccomp-filter-v \ prctl-seccomp-strict \ + prctl-securebits \ + prctl-tid_address \ + prctl-tsc \ pread64-pwrite64 \ preadv \ preadv-pwritev \ preadv2-pwritev2 \ + print_maxfd \ + printstr \ prlimit64 \ + process_vm_readv \ + process_vm_writev \ pselect6 \ ptrace \ pwritev \ + qual_fault \ + qual_inject-error-signal \ + qual_inject-retval \ + qual_inject-signal \ + qual_signal \ quotactl \ quotactl-v \ quotactl-xfs \ @@ -303,6 +358,7 @@ check_PROGRAMS = \ setgroups \ setgroups32 \ sethostname \ + setns \ setregid \ setregid32 \ setresgid \ @@ -339,6 +395,7 @@ check_PROGRAMS = \ sysinfo \ syslog \ tee \ + threads-execve \ time \ timer_create \ timer_xettime \ @@ -352,7 +409,9 @@ check_PROGRAMS = \ umask \ umount \ umount2 \ + umoven-illptr \ umovestr \ + umovestr-illptr \ umovestr2 \ umovestr3 \ uname \ @@ -360,7 +419,9 @@ check_PROGRAMS = \ unix-pair-sendto-recvfrom \ unlink \ unlinkat \ + unshare \ userfaultfd \ + ustat \ utime \ utimensat \ utimes \ @@ -373,6 +434,7 @@ check_PROGRAMS = \ waitid-v \ waitpid \ xattr \ + xattr-strings \ xet_robust_list \ xetitimer \ xetpgid \ @@ -390,6 +452,9 @@ ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 mq_LDADD = -lrt $(LDADD) +mq_sendrecv_LDADD = -lrt $(LDADD) +mq_sendrecv_read_LDADD = -lrt $(LDADD) +mq_sendrecv_write_LDADD = -lrt $(LDADD) newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 pc_LDADD = $(dl_LIBS) $(LDADD) pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 @@ -398,6 +463,7 @@ preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +threads_execve_LDADD = -lrt -lpthread $(LDADD) times_LDADD = -lrt $(LDADD) truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 @@ -423,10 +489,11 @@ DECODER_TESTS = \ alarm.test \ bpf.test \ brk.test \ - btrfs.test \ btrfs-v.test \ - btrfs-w.test \ btrfs-vw.test \ + btrfs-w.test \ + btrfs.test \ + caps-abbrev.test \ caps.test \ chmod.test \ chown.test \ @@ -437,6 +504,7 @@ DECODER_TESTS = \ clock_xettime.test \ copy_file_range.test \ creat.test \ + delete_module.test \ dup.test \ dup2.test \ dup3.test \ @@ -445,6 +513,7 @@ DECODER_TESTS = \ epoll_ctl.test \ epoll_pwait.test \ epoll_wait.test \ + erestartsys.test \ eventfd.test \ execve-v.test \ execve.test \ @@ -454,6 +523,7 @@ DECODER_TESTS = \ fadvise64.test \ fadvise64_64.test \ fallocate.test \ + fanotify_init.test \ fanotify_mark.test \ fchdir.test \ fchmod.test \ @@ -466,6 +536,7 @@ DECODER_TESTS = \ fdatasync.test \ file_handle.test \ file_ioctl.test \ + finit_module.test \ flock.test \ fstat.test \ fstat64.test \ @@ -505,23 +576,39 @@ DECODER_TESTS = \ getuid32.test \ getxxid.test \ inet-cmsg.test \ + init_module.test \ + inotify.test \ + inotify_init1.test \ ioctl.test \ ioctl_block.test \ - ioctl_evdev.test \ + ioctl_dm-v.test \ + ioctl_dm.test \ ioctl_evdev-v.test \ + ioctl_evdev.test \ + ioctl_loop-nv.test \ + ioctl_loop-v.test \ + ioctl_loop.test \ ioctl_mtd.test \ - ioctl_rtc.test \ ioctl_rtc-v.test \ + ioctl_rtc.test \ + ioctl_scsi.test \ + ioctl_sg_io_v3.test \ + ioctl_sg_io_v4.test \ + ioctl_sock_gifconf.test \ ioctl_uffdio.test \ ioctl_v4l2.test \ ioperm.test \ iopl.test \ + ioprio.test \ ip_mreq.test \ ipc.test \ ipc_msg.test \ ipc_msgbuf.test \ ipc_sem.test \ ipc_shm.test \ + kcmp.test \ + kexec_file_load.test \ + kexec_load.test \ keyctl.test \ kill.test \ lchown.test \ @@ -529,6 +616,7 @@ DECODER_TESTS = \ link.test \ linkat.test \ llseek.test \ + lookup_dcookie.test \ lseek.test \ lstat.test \ lstat64.test \ @@ -546,15 +634,18 @@ DECODER_TESTS = \ mlockall.test \ mmap.test \ mmap64.test \ - mmsg.test \ mmsg-silent.test \ - mmsg_name.test \ + mmsg.test \ mmsg_name-v.test \ + mmsg_name.test \ mount.test \ move_pages.test \ mq.test \ - msg_control.test \ + mq_sendrecv-read.test \ + mq_sendrecv-write.test \ + mq_sendrecv.test \ msg_control-v.test \ + msg_control.test \ msg_name.test \ munlockall.test \ nanosleep.test \ @@ -569,29 +660,50 @@ DECODER_TESTS = \ newfstatat.test \ nsyscalls.test \ old_mmap.test \ + oldfstat.test \ + oldlstat.test \ oldselect.test \ + oldstat.test \ open.test \ openat.test \ pause.test \ perf_event_open.test \ + perf_event_open_nonverbose.test \ + perf_event_open_unabbrev.test \ personality.test \ pipe.test \ + pipe2.test \ + pkey_alloc.test \ + pkey_free.test \ + pkey_mprotect.test \ poll.test \ ppoll.test \ + prctl-arg2-intptr.test \ + prctl-dumpable.test \ + prctl-name.test \ + prctl-no-args.test \ + prctl-pdeathsig.test \ prctl-seccomp-filter-v.test \ prctl-seccomp-strict.test \ + prctl-securebits.test \ + prctl-tid_address.test \ + prctl-tsc.test \ pread64-pwrite64.test \ preadv-pwritev.test \ - preadv2-pwritev2.test \ preadv.test \ + preadv2-pwritev2.test \ + printstr.test \ prlimit64.test \ + process_vm_readv.test \ + process_vm_writev.test \ pselect6.test \ ptrace.test \ pwritev.test \ - quotactl.test \ + qual_fault-exit_group.test \ quotactl-v.test \ - quotactl-xfs.test \ quotactl-xfs-v.test \ + quotactl-xfs.test \ + quotactl.test \ read-write.test \ readahead.test \ readdir.test \ @@ -640,6 +752,7 @@ DECODER_TESTS = \ setgroups.test \ setgroups32.test \ sethostname.test \ + setns.test \ setregid.test \ setregid32.test \ setresgid.test \ @@ -687,6 +800,8 @@ DECODER_TESTS = \ umask.test \ umount.test \ umount2.test \ + umoven-illptr.test \ + umovestr-illptr.test \ umovestr.test \ umovestr2.test \ umovestr3.test \ @@ -695,17 +810,20 @@ DECODER_TESTS = \ unix-pair-sendto-recvfrom.test \ unlink.test \ unlinkat.test \ + unshare.test \ userfaultfd.test \ + ustat.test \ utime.test \ utimensat.test \ utimes.test \ vhangup.test \ vmsplice.test \ - wait4.test \ wait4-v.test \ - waitid.test \ + wait4.test \ waitid-v.test \ + waitid.test \ waitpid.test \ + xattr-strings.test \ xattr.test \ xet_robust_list.test \ xetitimer.test \ @@ -727,12 +845,21 @@ MISC_TESTS = \ fork-f.test \ ksysent.test \ opipe.test \ + options-syntax.test \ pc.test \ + qual_fault-syntax.test \ + qual_fault.test \ + qual_inject-error-signal.test \ + qual_inject-retval.test \ + qual_inject-signal.test \ + qual_inject-syntax.test \ + qual_signal.test \ qual_syscall.test \ - redirect.test \ redirect-fds.test \ + redirect.test \ restart_syscall.test \ signal_receive.test \ + strace-C.test \ strace-E.test \ strace-S.test \ strace-T.test \ @@ -742,6 +869,7 @@ MISC_TESTS = \ strace-t.test \ strace-tt.test \ strace-ttt.test \ + threads-execve.test \ vfork-f.test \ # end of MISC_TESTS @@ -755,7 +883,12 @@ XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) TEST_LOG_COMPILER = env AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh +@VALGRIND_CHECK_RULES@ +VALGRIND_FLAGS = --quiet +VALGRIND_SUPPRESSIONS_FILES = $(srcdir)/strace.supp + EXTRA_DIST = init.sh run.sh match.awk \ + caps-abbrev.awk \ caps.awk \ count-f.expected \ eventfd.expected \ @@ -764,31 +897,38 @@ EXTRA_DIST = init.sh run.sh match.awk \ fstatat.c \ fstatx.c \ getresugid.c \ + init_delete_module.h \ ipc.sh \ ipc_msgbuf.expected \ ksysent.sed \ lstatx.c \ - mq.expected \ net.expected \ oldselect.expected \ pipe.expected \ - ppoll.expected \ ppoll-v.expected \ + ppoll.expected \ + process_vm_readv_writev.c \ + qual_fault-exit_group.expected \ + qual_inject-error-signal.expected \ + qual_inject-signal.expected \ quotactl.h \ + scno_tampering.sh \ setfsugid.c \ - setreugid.c \ setresugid.c \ + setreugid.c \ setugid.c \ sigaction.awk \ sigaltstack.expected \ sockname.c \ statfs.expected \ statx.sh \ + strace-C.expected \ strace-E.expected \ strace-T.expected \ strace-ff.expected \ strace-k.test \ strace-r.expected \ + strace.supp \ struct_flock.c \ sun_path.expected \ uio.expected \ @@ -812,5 +952,11 @@ ksysent.h: $(srcdir)/ksysent.sed mv -f $@.t2 $@ rm -f $@.t1 -BUILT_SOURCES = ksysent.h +ksysent.$(OBJEXT): ksysent.h + +objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT))) +$(objects): scno.h + CLEANFILES = ksysent.h $(TESTS:=.tmp) + +include ../scno.am diff --git a/tests/Makefile.in b/tests/Makefile.in new file mode 100644 index 000000000..3a4d792a7 --- /dev/null +++ b/tests/Makefile.in @@ -0,0 +1,5714 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Automake input for strace tests. +# +# Copyright (c) 2011-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# scno.h make rules for strace. +# +# Copyright (c) 2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = _newselect$(EXEEXT) accept$(EXEEXT) accept4$(EXEEXT) \ + access$(EXEEXT) acct$(EXEEXT) add_key$(EXEEXT) \ + adjtimex$(EXEEXT) aio$(EXEEXT) alarm$(EXEEXT) answer$(EXEEXT) \ + attach-f-p$(EXEEXT) attach-f-p-cmd$(EXEEXT) \ + attach-p-cmd-cmd$(EXEEXT) attach-p-cmd-p$(EXEEXT) bpf$(EXEEXT) \ + brk$(EXEEXT) btrfs$(EXEEXT) caps$(EXEEXT) caps-abbrev$(EXEEXT) \ + chmod$(EXEEXT) chown$(EXEEXT) chown32$(EXEEXT) chroot$(EXEEXT) \ + clock_adjtime$(EXEEXT) clock_nanosleep$(EXEEXT) \ + clock_xettime$(EXEEXT) copy_file_range$(EXEEXT) \ + count-f$(EXEEXT) creat$(EXEEXT) delete_module$(EXEEXT) \ + dup$(EXEEXT) dup2$(EXEEXT) dup3$(EXEEXT) epoll_create$(EXEEXT) \ + epoll_create1$(EXEEXT) epoll_ctl$(EXEEXT) epoll_pwait$(EXEEXT) \ + epoll_wait$(EXEEXT) erestartsys$(EXEEXT) eventfd$(EXEEXT) \ + execve$(EXEEXT) execve-v$(EXEEXT) execveat$(EXEEXT) \ + execveat-v$(EXEEXT) faccessat$(EXEEXT) fadvise64$(EXEEXT) \ + fadvise64_64$(EXEEXT) fallocate$(EXEEXT) \ + fanotify_init$(EXEEXT) fanotify_mark$(EXEEXT) fchdir$(EXEEXT) \ + fchmod$(EXEEXT) fchmodat$(EXEEXT) fchown$(EXEEXT) \ + fchown32$(EXEEXT) fchownat$(EXEEXT) fcntl$(EXEEXT) \ + fcntl64$(EXEEXT) fdatasync$(EXEEXT) file_handle$(EXEEXT) \ + file_ioctl$(EXEEXT) filter-unavailable$(EXEEXT) \ + finit_module$(EXEEXT) flock$(EXEEXT) fork-f$(EXEEXT) \ + fstat$(EXEEXT) fstat64$(EXEEXT) fstatat64$(EXEEXT) \ + fstatfs$(EXEEXT) fstatfs64$(EXEEXT) fsync$(EXEEXT) \ + ftruncate$(EXEEXT) ftruncate64$(EXEEXT) futex$(EXEEXT) \ + futimesat$(EXEEXT) get_mempolicy$(EXEEXT) getcpu$(EXEEXT) \ + getcwd$(EXEEXT) getdents$(EXEEXT) getdents64$(EXEEXT) \ + getegid$(EXEEXT) getegid32$(EXEEXT) geteuid$(EXEEXT) \ + geteuid32$(EXEEXT) getgid$(EXEEXT) getgid32$(EXEEXT) \ + getgroups$(EXEEXT) getgroups32$(EXEEXT) getpeername$(EXEEXT) \ + getpgrp$(EXEEXT) getrandom$(EXEEXT) getresgid$(EXEEXT) \ + getresgid32$(EXEEXT) getresuid$(EXEEXT) getresuid32$(EXEEXT) \ + getrlimit$(EXEEXT) getrusage$(EXEEXT) getsid$(EXEEXT) \ + getsockname$(EXEEXT) getuid$(EXEEXT) getuid32$(EXEEXT) \ + getxxid$(EXEEXT) inet-cmsg$(EXEEXT) init_module$(EXEEXT) \ + inotify$(EXEEXT) inotify_init1$(EXEEXT) ioctl$(EXEEXT) \ + ioctl_block$(EXEEXT) ioctl_dm$(EXEEXT) ioctl_dm-v$(EXEEXT) \ + ioctl_evdev$(EXEEXT) ioctl_evdev-v$(EXEEXT) \ + ioctl_loop$(EXEEXT) ioctl_loop-nv$(EXEEXT) \ + ioctl_loop-v$(EXEEXT) ioctl_mtd$(EXEEXT) ioctl_rtc$(EXEEXT) \ + ioctl_rtc-v$(EXEEXT) ioctl_scsi$(EXEEXT) \ + ioctl_sg_io_v3$(EXEEXT) ioctl_sg_io_v4$(EXEEXT) \ + ioctl_sock_gifconf$(EXEEXT) ioctl_uffdio$(EXEEXT) \ + ioctl_v4l2$(EXEEXT) ioperm$(EXEEXT) iopl$(EXEEXT) \ + ioprio$(EXEEXT) ip_mreq$(EXEEXT) ipc$(EXEEXT) ipc_msg$(EXEEXT) \ + ipc_msgbuf$(EXEEXT) ipc_sem$(EXEEXT) ipc_shm$(EXEEXT) \ + kcmp$(EXEEXT) kexec_file_load$(EXEEXT) kexec_load$(EXEEXT) \ + keyctl$(EXEEXT) kill$(EXEEXT) ksysent$(EXEEXT) lchown$(EXEEXT) \ + lchown32$(EXEEXT) link$(EXEEXT) linkat$(EXEEXT) \ + llseek$(EXEEXT) lookup_dcookie$(EXEEXT) lseek$(EXEEXT) \ + lstat$(EXEEXT) lstat64$(EXEEXT) mbind$(EXEEXT) \ + membarrier$(EXEEXT) memfd_create$(EXEEXT) \ + migrate_pages$(EXEEXT) mincore$(EXEEXT) mkdir$(EXEEXT) \ + mkdirat$(EXEEXT) mknod$(EXEEXT) mknodat$(EXEEXT) \ + mlock$(EXEEXT) mlock2$(EXEEXT) mlockall$(EXEEXT) mmap$(EXEEXT) \ + mmap64$(EXEEXT) mmsg$(EXEEXT) mmsg-silent$(EXEEXT) \ + mmsg_name$(EXEEXT) mmsg_name-v$(EXEEXT) mount$(EXEEXT) \ + move_pages$(EXEEXT) mq$(EXEEXT) mq_sendrecv$(EXEEXT) \ + mq_sendrecv-read$(EXEEXT) mq_sendrecv-write$(EXEEXT) \ + msg_control$(EXEEXT) msg_control-v$(EXEEXT) msg_name$(EXEEXT) \ + munlockall$(EXEEXT) nanosleep$(EXEEXT) \ + net-accept-connect$(EXEEXT) net-icmp_filter$(EXEEXT) \ + net-sockaddr$(EXEEXT) net-y-unix$(EXEEXT) net-yy-inet$(EXEEXT) \ + net-yy-netlink$(EXEEXT) net-yy-unix$(EXEEXT) \ + netlink_inet_diag$(EXEEXT) netlink_netlink_diag$(EXEEXT) \ + netlink_protocol$(EXEEXT) netlink_unix_diag$(EXEEXT) \ + newfstatat$(EXEEXT) nsyscalls$(EXEEXT) old_mmap$(EXEEXT) \ + oldfstat$(EXEEXT) oldlstat$(EXEEXT) oldselect$(EXEEXT) \ + oldstat$(EXEEXT) open$(EXEEXT) openat$(EXEEXT) pause$(EXEEXT) \ + pc$(EXEEXT) perf_event_open$(EXEEXT) \ + perf_event_open_nonverbose$(EXEEXT) \ + perf_event_open_unabbrev$(EXEEXT) personality$(EXEEXT) \ + pipe$(EXEEXT) pipe2$(EXEEXT) pkey_alloc$(EXEEXT) \ + pkey_free$(EXEEXT) pkey_mprotect$(EXEEXT) poll$(EXEEXT) \ + ppoll$(EXEEXT) prctl-arg2-intptr$(EXEEXT) \ + prctl-dumpable$(EXEEXT) prctl-name$(EXEEXT) \ + prctl-no-args$(EXEEXT) prctl-pdeathsig$(EXEEXT) \ + prctl-seccomp-filter-v$(EXEEXT) prctl-seccomp-strict$(EXEEXT) \ + prctl-securebits$(EXEEXT) prctl-tid_address$(EXEEXT) \ + prctl-tsc$(EXEEXT) pread64-pwrite64$(EXEEXT) preadv$(EXEEXT) \ + preadv-pwritev$(EXEEXT) preadv2-pwritev2$(EXEEXT) \ + print_maxfd$(EXEEXT) printstr$(EXEEXT) prlimit64$(EXEEXT) \ + process_vm_readv$(EXEEXT) process_vm_writev$(EXEEXT) \ + pselect6$(EXEEXT) ptrace$(EXEEXT) pwritev$(EXEEXT) \ + qual_fault$(EXEEXT) qual_inject-error-signal$(EXEEXT) \ + qual_inject-retval$(EXEEXT) qual_inject-signal$(EXEEXT) \ + qual_signal$(EXEEXT) quotactl$(EXEEXT) quotactl-v$(EXEEXT) \ + quotactl-xfs$(EXEEXT) quotactl-xfs-v$(EXEEXT) \ + read-write$(EXEEXT) readahead$(EXEEXT) readdir$(EXEEXT) \ + readlink$(EXEEXT) readlinkat$(EXEEXT) readv$(EXEEXT) \ + reboot$(EXEEXT) recvfrom$(EXEEXT) recvmmsg-timeout$(EXEEXT) \ + recvmsg$(EXEEXT) redirect-fds$(EXEEXT) \ + remap_file_pages$(EXEEXT) rename$(EXEEXT) renameat$(EXEEXT) \ + renameat2$(EXEEXT) request_key$(EXEEXT) \ + restart_syscall$(EXEEXT) rmdir$(EXEEXT) rt_sigpending$(EXEEXT) \ + rt_sigprocmask$(EXEEXT) rt_sigqueueinfo$(EXEEXT) \ + rt_sigsuspend$(EXEEXT) rt_sigtimedwait$(EXEEXT) \ + rt_tgsigqueueinfo$(EXEEXT) sched_get_priority_mxx$(EXEEXT) \ + sched_rr_get_interval$(EXEEXT) sched_xetaffinity$(EXEEXT) \ + sched_xetattr$(EXEEXT) sched_xetparam$(EXEEXT) \ + sched_xetscheduler$(EXEEXT) sched_yield$(EXEEXT) \ + scm_rights$(EXEEXT) seccomp-filter$(EXEEXT) \ + seccomp-filter-v$(EXEEXT) seccomp-strict$(EXEEXT) \ + select$(EXEEXT) semop$(EXEEXT) sendfile$(EXEEXT) \ + sendfile64$(EXEEXT) set_mempolicy$(EXEEXT) \ + set_ptracer_any$(EXEEXT) setdomainname$(EXEEXT) \ + setfsgid$(EXEEXT) setfsgid32$(EXEEXT) setfsuid$(EXEEXT) \ + setfsuid32$(EXEEXT) setgid$(EXEEXT) setgid32$(EXEEXT) \ + setgroups$(EXEEXT) setgroups32$(EXEEXT) sethostname$(EXEEXT) \ + setns$(EXEEXT) setregid$(EXEEXT) setregid32$(EXEEXT) \ + setresgid$(EXEEXT) setresgid32$(EXEEXT) setresuid$(EXEEXT) \ + setresuid32$(EXEEXT) setreuid$(EXEEXT) setreuid32$(EXEEXT) \ + setrlimit$(EXEEXT) setuid$(EXEEXT) setuid32$(EXEEXT) \ + shmxt$(EXEEXT) shutdown$(EXEEXT) sigaction$(EXEEXT) \ + sigaltstack$(EXEEXT) siginfo$(EXEEXT) signal_receive$(EXEEXT) \ + signalfd4$(EXEEXT) sigreturn$(EXEEXT) sleep$(EXEEXT) \ + socketcall$(EXEEXT) splice$(EXEEXT) stack-fcall$(EXEEXT) \ + stat$(EXEEXT) stat64$(EXEEXT) statfs$(EXEEXT) \ + statfs64$(EXEEXT) swap$(EXEEXT) symlink$(EXEEXT) \ + symlinkat$(EXEEXT) sync$(EXEEXT) sync_file_range$(EXEEXT) \ + sync_file_range2$(EXEEXT) sysinfo$(EXEEXT) syslog$(EXEEXT) \ + tee$(EXEEXT) threads-execve$(EXEEXT) time$(EXEEXT) \ + timer_create$(EXEEXT) timer_xettime$(EXEEXT) \ + timerfd_xettime$(EXEEXT) times$(EXEEXT) times-fail$(EXEEXT) \ + truncate$(EXEEXT) truncate64$(EXEEXT) ugetrlimit$(EXEEXT) \ + uio$(EXEEXT) umask$(EXEEXT) umount$(EXEEXT) umount2$(EXEEXT) \ + umoven-illptr$(EXEEXT) umovestr$(EXEEXT) \ + umovestr-illptr$(EXEEXT) umovestr2$(EXEEXT) umovestr3$(EXEEXT) \ + uname$(EXEEXT) unix-pair-send-recv$(EXEEXT) \ + unix-pair-sendto-recvfrom$(EXEEXT) unlink$(EXEEXT) \ + unlinkat$(EXEEXT) unshare$(EXEEXT) userfaultfd$(EXEEXT) \ + ustat$(EXEEXT) utime$(EXEEXT) utimensat$(EXEEXT) \ + utimes$(EXEEXT) vfork-f$(EXEEXT) vhangup$(EXEEXT) \ + vmsplice$(EXEEXT) wait4$(EXEEXT) wait4-v$(EXEEXT) \ + waitid$(EXEEXT) waitid-v$(EXEEXT) waitpid$(EXEEXT) \ + xattr$(EXEEXT) xattr-strings$(EXEEXT) xet_robust_list$(EXEEXT) \ + xetitimer$(EXEEXT) xetpgid$(EXEEXT) xetpriority$(EXEEXT) \ + xettimeofday$(EXEEXT) +TESTS = $(DECODER_TESTS) $(MISC_TESTS) $(am__EXEEXT_1) +DIST_COMMON = $(srcdir)/../scno.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/depcomp \ + $(top_srcdir)/test-driver +subdir = tests +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/ax_valgrind_check.m4 \ + $(top_srcdir)/m4/mpers.m4 \ + $(top_srcdir)/m4/st_save_restore_var.m4 \ + $(top_srcdir)/m4/st_warn_cflags.m4 \ + $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AR = ar +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libtests_a_AR = $(AR) $(ARFLAGS) +libtests_a_LIBADD = +am_libtests_a_OBJECTS = libtests_a-errno2name.$(OBJEXT) \ + libtests_a-error_msg.$(OBJEXT) \ + libtests_a-fill_memory.$(OBJEXT) \ + libtests_a-get_page_size.$(OBJEXT) \ + libtests_a-hexdump_strdup.$(OBJEXT) \ + libtests_a-hexquote_strndup.$(OBJEXT) \ + libtests_a-inode_of_sockfd.$(OBJEXT) \ + libtests_a-libmmsg.$(OBJEXT) \ + libtests_a-libsocketcall.$(OBJEXT) \ + libtests_a-overflowuid.$(OBJEXT) \ + libtests_a-pipe_maxfd.$(OBJEXT) \ + libtests_a-print_quoted_string.$(OBJEXT) \ + libtests_a-printflags.$(OBJEXT) libtests_a-printxval.$(OBJEXT) \ + libtests_a-signal2name.$(OBJEXT) libtests_a-sprintrc.$(OBJEXT) \ + libtests_a-tail_alloc.$(OBJEXT) libtests_a-tprintf.$(OBJEXT) +libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) +_newselect_SOURCES = _newselect.c +_newselect_OBJECTS = _newselect.$(OBJEXT) +_newselect_LDADD = $(LDADD) +_newselect_DEPENDENCIES = libtests.a +accept_SOURCES = accept.c +accept_OBJECTS = accept.$(OBJEXT) +accept_LDADD = $(LDADD) +accept_DEPENDENCIES = libtests.a +accept4_SOURCES = accept4.c +accept4_OBJECTS = accept4.$(OBJEXT) +accept4_LDADD = $(LDADD) +accept4_DEPENDENCIES = libtests.a +access_SOURCES = access.c +access_OBJECTS = access.$(OBJEXT) +access_LDADD = $(LDADD) +access_DEPENDENCIES = libtests.a +acct_SOURCES = acct.c +acct_OBJECTS = acct.$(OBJEXT) +acct_LDADD = $(LDADD) +acct_DEPENDENCIES = libtests.a +add_key_SOURCES = add_key.c +add_key_OBJECTS = add_key.$(OBJEXT) +add_key_LDADD = $(LDADD) +add_key_DEPENDENCIES = libtests.a +adjtimex_SOURCES = adjtimex.c +adjtimex_OBJECTS = adjtimex.$(OBJEXT) +adjtimex_LDADD = $(LDADD) +adjtimex_DEPENDENCIES = libtests.a +aio_SOURCES = aio.c +aio_OBJECTS = aio.$(OBJEXT) +aio_LDADD = $(LDADD) +aio_DEPENDENCIES = libtests.a +alarm_SOURCES = alarm.c +alarm_OBJECTS = alarm.$(OBJEXT) +alarm_LDADD = $(LDADD) +alarm_DEPENDENCIES = libtests.a +answer_SOURCES = answer.c +answer_OBJECTS = answer.$(OBJEXT) +answer_LDADD = $(LDADD) +answer_DEPENDENCIES = libtests.a +attach_f_p_SOURCES = attach-f-p.c +attach_f_p_OBJECTS = attach-f-p.$(OBJEXT) +attach_f_p_DEPENDENCIES = $(LDADD) +attach_f_p_cmd_SOURCES = attach-f-p-cmd.c +attach_f_p_cmd_OBJECTS = attach-f-p-cmd.$(OBJEXT) +attach_f_p_cmd_LDADD = $(LDADD) +attach_f_p_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_cmd_SOURCES = attach-p-cmd-cmd.c +attach_p_cmd_cmd_OBJECTS = attach-p-cmd-cmd.$(OBJEXT) +attach_p_cmd_cmd_LDADD = $(LDADD) +attach_p_cmd_cmd_DEPENDENCIES = libtests.a +attach_p_cmd_p_SOURCES = attach-p-cmd-p.c +attach_p_cmd_p_OBJECTS = attach-p-cmd-p.$(OBJEXT) +attach_p_cmd_p_LDADD = $(LDADD) +attach_p_cmd_p_DEPENDENCIES = libtests.a +bpf_SOURCES = bpf.c +bpf_OBJECTS = bpf.$(OBJEXT) +bpf_LDADD = $(LDADD) +bpf_DEPENDENCIES = libtests.a +brk_SOURCES = brk.c +brk_OBJECTS = brk.$(OBJEXT) +brk_LDADD = $(LDADD) +brk_DEPENDENCIES = libtests.a +btrfs_SOURCES = btrfs.c +btrfs_OBJECTS = btrfs.$(OBJEXT) +btrfs_LDADD = $(LDADD) +btrfs_DEPENDENCIES = libtests.a +caps_SOURCES = caps.c +caps_OBJECTS = caps.$(OBJEXT) +caps_LDADD = $(LDADD) +caps_DEPENDENCIES = libtests.a +caps_abbrev_SOURCES = caps-abbrev.c +caps_abbrev_OBJECTS = caps-abbrev.$(OBJEXT) +caps_abbrev_LDADD = $(LDADD) +caps_abbrev_DEPENDENCIES = libtests.a +chmod_SOURCES = chmod.c +chmod_OBJECTS = chmod.$(OBJEXT) +chmod_LDADD = $(LDADD) +chmod_DEPENDENCIES = libtests.a +chown_SOURCES = chown.c +chown_OBJECTS = chown.$(OBJEXT) +chown_LDADD = $(LDADD) +chown_DEPENDENCIES = libtests.a +chown32_SOURCES = chown32.c +chown32_OBJECTS = chown32.$(OBJEXT) +chown32_LDADD = $(LDADD) +chown32_DEPENDENCIES = libtests.a +chroot_SOURCES = chroot.c +chroot_OBJECTS = chroot.$(OBJEXT) +chroot_LDADD = $(LDADD) +chroot_DEPENDENCIES = libtests.a +clock_adjtime_SOURCES = clock_adjtime.c +clock_adjtime_OBJECTS = clock_adjtime.$(OBJEXT) +clock_adjtime_LDADD = $(LDADD) +clock_adjtime_DEPENDENCIES = libtests.a +clock_nanosleep_SOURCES = clock_nanosleep.c +clock_nanosleep_OBJECTS = clock_nanosleep.$(OBJEXT) +clock_nanosleep_LDADD = $(LDADD) +clock_nanosleep_DEPENDENCIES = libtests.a +clock_xettime_SOURCES = clock_xettime.c +clock_xettime_OBJECTS = clock_xettime.$(OBJEXT) +clock_xettime_DEPENDENCIES = $(LDADD) +copy_file_range_SOURCES = copy_file_range.c +copy_file_range_OBJECTS = copy_file_range.$(OBJEXT) +copy_file_range_LDADD = $(LDADD) +copy_file_range_DEPENDENCIES = libtests.a +count_f_SOURCES = count-f.c +count_f_OBJECTS = count-f.$(OBJEXT) +count_f_DEPENDENCIES = $(LDADD) +creat_SOURCES = creat.c +creat_OBJECTS = creat.$(OBJEXT) +creat_LDADD = $(LDADD) +creat_DEPENDENCIES = libtests.a +delete_module_SOURCES = delete_module.c +delete_module_OBJECTS = delete_module.$(OBJEXT) +delete_module_LDADD = $(LDADD) +delete_module_DEPENDENCIES = libtests.a +dup_SOURCES = dup.c +dup_OBJECTS = dup.$(OBJEXT) +dup_LDADD = $(LDADD) +dup_DEPENDENCIES = libtests.a +dup2_SOURCES = dup2.c +dup2_OBJECTS = dup2.$(OBJEXT) +dup2_LDADD = $(LDADD) +dup2_DEPENDENCIES = libtests.a +dup3_SOURCES = dup3.c +dup3_OBJECTS = dup3.$(OBJEXT) +dup3_LDADD = $(LDADD) +dup3_DEPENDENCIES = libtests.a +epoll_create_SOURCES = epoll_create.c +epoll_create_OBJECTS = epoll_create.$(OBJEXT) +epoll_create_LDADD = $(LDADD) +epoll_create_DEPENDENCIES = libtests.a +epoll_create1_SOURCES = epoll_create1.c +epoll_create1_OBJECTS = epoll_create1.$(OBJEXT) +epoll_create1_LDADD = $(LDADD) +epoll_create1_DEPENDENCIES = libtests.a +epoll_ctl_SOURCES = epoll_ctl.c +epoll_ctl_OBJECTS = epoll_ctl.$(OBJEXT) +epoll_ctl_LDADD = $(LDADD) +epoll_ctl_DEPENDENCIES = libtests.a +epoll_pwait_SOURCES = epoll_pwait.c +epoll_pwait_OBJECTS = epoll_pwait.$(OBJEXT) +epoll_pwait_LDADD = $(LDADD) +epoll_pwait_DEPENDENCIES = libtests.a +epoll_wait_SOURCES = epoll_wait.c +epoll_wait_OBJECTS = epoll_wait.$(OBJEXT) +epoll_wait_LDADD = $(LDADD) +epoll_wait_DEPENDENCIES = libtests.a +erestartsys_SOURCES = erestartsys.c +erestartsys_OBJECTS = erestartsys.$(OBJEXT) +erestartsys_LDADD = $(LDADD) +erestartsys_DEPENDENCIES = libtests.a +eventfd_SOURCES = eventfd.c +eventfd_OBJECTS = eventfd.$(OBJEXT) +eventfd_LDADD = $(LDADD) +eventfd_DEPENDENCIES = libtests.a +execve_SOURCES = execve.c +execve_OBJECTS = execve.$(OBJEXT) +execve_LDADD = $(LDADD) +execve_DEPENDENCIES = libtests.a +execve_v_SOURCES = execve-v.c +execve_v_OBJECTS = execve-v.$(OBJEXT) +execve_v_LDADD = $(LDADD) +execve_v_DEPENDENCIES = libtests.a +execveat_SOURCES = execveat.c +execveat_OBJECTS = execveat.$(OBJEXT) +execveat_LDADD = $(LDADD) +execveat_DEPENDENCIES = libtests.a +execveat_v_SOURCES = execveat-v.c +execveat_v_OBJECTS = execveat-v.$(OBJEXT) +execveat_v_LDADD = $(LDADD) +execveat_v_DEPENDENCIES = libtests.a +faccessat_SOURCES = faccessat.c +faccessat_OBJECTS = faccessat.$(OBJEXT) +faccessat_LDADD = $(LDADD) +faccessat_DEPENDENCIES = libtests.a +fadvise64_SOURCES = fadvise64.c +fadvise64_OBJECTS = fadvise64.$(OBJEXT) +fadvise64_LDADD = $(LDADD) +fadvise64_DEPENDENCIES = libtests.a +fadvise64_64_SOURCES = fadvise64_64.c +fadvise64_64_OBJECTS = fadvise64_64.$(OBJEXT) +fadvise64_64_LDADD = $(LDADD) +fadvise64_64_DEPENDENCIES = libtests.a +fallocate_SOURCES = fallocate.c +fallocate_OBJECTS = fallocate.$(OBJEXT) +fallocate_LDADD = $(LDADD) +fallocate_DEPENDENCIES = libtests.a +fanotify_init_SOURCES = fanotify_init.c +fanotify_init_OBJECTS = fanotify_init.$(OBJEXT) +fanotify_init_LDADD = $(LDADD) +fanotify_init_DEPENDENCIES = libtests.a +fanotify_mark_SOURCES = fanotify_mark.c +fanotify_mark_OBJECTS = fanotify_mark.$(OBJEXT) +fanotify_mark_LDADD = $(LDADD) +fanotify_mark_DEPENDENCIES = libtests.a +fchdir_SOURCES = fchdir.c +fchdir_OBJECTS = fchdir.$(OBJEXT) +fchdir_LDADD = $(LDADD) +fchdir_DEPENDENCIES = libtests.a +fchmod_SOURCES = fchmod.c +fchmod_OBJECTS = fchmod.$(OBJEXT) +fchmod_LDADD = $(LDADD) +fchmod_DEPENDENCIES = libtests.a +fchmodat_SOURCES = fchmodat.c +fchmodat_OBJECTS = fchmodat.$(OBJEXT) +fchmodat_LDADD = $(LDADD) +fchmodat_DEPENDENCIES = libtests.a +fchown_SOURCES = fchown.c +fchown_OBJECTS = fchown.$(OBJEXT) +fchown_LDADD = $(LDADD) +fchown_DEPENDENCIES = libtests.a +fchown32_SOURCES = fchown32.c +fchown32_OBJECTS = fchown32.$(OBJEXT) +fchown32_LDADD = $(LDADD) +fchown32_DEPENDENCIES = libtests.a +fchownat_SOURCES = fchownat.c +fchownat_OBJECTS = fchownat.$(OBJEXT) +fchownat_LDADD = $(LDADD) +fchownat_DEPENDENCIES = libtests.a +fcntl_SOURCES = fcntl.c +fcntl_OBJECTS = fcntl.$(OBJEXT) +fcntl_LDADD = $(LDADD) +fcntl_DEPENDENCIES = libtests.a +fcntl64_SOURCES = fcntl64.c +fcntl64_OBJECTS = fcntl64.$(OBJEXT) +fcntl64_LDADD = $(LDADD) +fcntl64_DEPENDENCIES = libtests.a +fdatasync_SOURCES = fdatasync.c +fdatasync_OBJECTS = fdatasync.$(OBJEXT) +fdatasync_LDADD = $(LDADD) +fdatasync_DEPENDENCIES = libtests.a +file_handle_SOURCES = file_handle.c +file_handle_OBJECTS = file_handle.$(OBJEXT) +file_handle_LDADD = $(LDADD) +file_handle_DEPENDENCIES = libtests.a +file_ioctl_SOURCES = file_ioctl.c +file_ioctl_OBJECTS = file_ioctl.$(OBJEXT) +file_ioctl_LDADD = $(LDADD) +file_ioctl_DEPENDENCIES = libtests.a +filter_unavailable_SOURCES = filter-unavailable.c +filter_unavailable_OBJECTS = filter-unavailable.$(OBJEXT) +filter_unavailable_DEPENDENCIES = $(LDADD) +finit_module_SOURCES = finit_module.c +finit_module_OBJECTS = finit_module.$(OBJEXT) +finit_module_LDADD = $(LDADD) +finit_module_DEPENDENCIES = libtests.a +flock_SOURCES = flock.c +flock_OBJECTS = flock.$(OBJEXT) +flock_LDADD = $(LDADD) +flock_DEPENDENCIES = libtests.a +fork_f_SOURCES = fork-f.c +fork_f_OBJECTS = fork-f.$(OBJEXT) +fork_f_LDADD = $(LDADD) +fork_f_DEPENDENCIES = libtests.a +fstat_SOURCES = fstat.c +fstat_OBJECTS = fstat.$(OBJEXT) +fstat_LDADD = $(LDADD) +fstat_DEPENDENCIES = libtests.a +fstat64_SOURCES = fstat64.c +fstat64_OBJECTS = fstat64-fstat64.$(OBJEXT) +fstat64_LDADD = $(LDADD) +fstat64_DEPENDENCIES = libtests.a +fstatat64_SOURCES = fstatat64.c +fstatat64_OBJECTS = fstatat64-fstatat64.$(OBJEXT) +fstatat64_LDADD = $(LDADD) +fstatat64_DEPENDENCIES = libtests.a +fstatfs_SOURCES = fstatfs.c +fstatfs_OBJECTS = fstatfs.$(OBJEXT) +fstatfs_LDADD = $(LDADD) +fstatfs_DEPENDENCIES = libtests.a +fstatfs64_SOURCES = fstatfs64.c +fstatfs64_OBJECTS = fstatfs64.$(OBJEXT) +fstatfs64_LDADD = $(LDADD) +fstatfs64_DEPENDENCIES = libtests.a +fsync_SOURCES = fsync.c +fsync_OBJECTS = fsync.$(OBJEXT) +fsync_LDADD = $(LDADD) +fsync_DEPENDENCIES = libtests.a +ftruncate_SOURCES = ftruncate.c +ftruncate_OBJECTS = ftruncate.$(OBJEXT) +ftruncate_LDADD = $(LDADD) +ftruncate_DEPENDENCIES = libtests.a +ftruncate64_SOURCES = ftruncate64.c +ftruncate64_OBJECTS = ftruncate64-ftruncate64.$(OBJEXT) +ftruncate64_LDADD = $(LDADD) +ftruncate64_DEPENDENCIES = libtests.a +futex_SOURCES = futex.c +futex_OBJECTS = futex.$(OBJEXT) +futex_LDADD = $(LDADD) +futex_DEPENDENCIES = libtests.a +futimesat_SOURCES = futimesat.c +futimesat_OBJECTS = futimesat.$(OBJEXT) +futimesat_LDADD = $(LDADD) +futimesat_DEPENDENCIES = libtests.a +get_mempolicy_SOURCES = get_mempolicy.c +get_mempolicy_OBJECTS = get_mempolicy.$(OBJEXT) +get_mempolicy_LDADD = $(LDADD) +get_mempolicy_DEPENDENCIES = libtests.a +getcpu_SOURCES = getcpu.c +getcpu_OBJECTS = getcpu.$(OBJEXT) +getcpu_LDADD = $(LDADD) +getcpu_DEPENDENCIES = libtests.a +getcwd_SOURCES = getcwd.c +getcwd_OBJECTS = getcwd.$(OBJEXT) +getcwd_LDADD = $(LDADD) +getcwd_DEPENDENCIES = libtests.a +getdents_SOURCES = getdents.c +getdents_OBJECTS = getdents.$(OBJEXT) +getdents_LDADD = $(LDADD) +getdents_DEPENDENCIES = libtests.a +getdents64_SOURCES = getdents64.c +getdents64_OBJECTS = getdents64.$(OBJEXT) +getdents64_LDADD = $(LDADD) +getdents64_DEPENDENCIES = libtests.a +getegid_SOURCES = getegid.c +getegid_OBJECTS = getegid.$(OBJEXT) +getegid_LDADD = $(LDADD) +getegid_DEPENDENCIES = libtests.a +getegid32_SOURCES = getegid32.c +getegid32_OBJECTS = getegid32.$(OBJEXT) +getegid32_LDADD = $(LDADD) +getegid32_DEPENDENCIES = libtests.a +geteuid_SOURCES = geteuid.c +geteuid_OBJECTS = geteuid.$(OBJEXT) +geteuid_LDADD = $(LDADD) +geteuid_DEPENDENCIES = libtests.a +geteuid32_SOURCES = geteuid32.c +geteuid32_OBJECTS = geteuid32.$(OBJEXT) +geteuid32_LDADD = $(LDADD) +geteuid32_DEPENDENCIES = libtests.a +getgid_SOURCES = getgid.c +getgid_OBJECTS = getgid.$(OBJEXT) +getgid_LDADD = $(LDADD) +getgid_DEPENDENCIES = libtests.a +getgid32_SOURCES = getgid32.c +getgid32_OBJECTS = getgid32.$(OBJEXT) +getgid32_LDADD = $(LDADD) +getgid32_DEPENDENCIES = libtests.a +getgroups_SOURCES = getgroups.c +getgroups_OBJECTS = getgroups.$(OBJEXT) +getgroups_LDADD = $(LDADD) +getgroups_DEPENDENCIES = libtests.a +getgroups32_SOURCES = getgroups32.c +getgroups32_OBJECTS = getgroups32.$(OBJEXT) +getgroups32_LDADD = $(LDADD) +getgroups32_DEPENDENCIES = libtests.a +getpeername_SOURCES = getpeername.c +getpeername_OBJECTS = getpeername.$(OBJEXT) +getpeername_LDADD = $(LDADD) +getpeername_DEPENDENCIES = libtests.a +getpgrp_SOURCES = getpgrp.c +getpgrp_OBJECTS = getpgrp.$(OBJEXT) +getpgrp_LDADD = $(LDADD) +getpgrp_DEPENDENCIES = libtests.a +getrandom_SOURCES = getrandom.c +getrandom_OBJECTS = getrandom.$(OBJEXT) +getrandom_LDADD = $(LDADD) +getrandom_DEPENDENCIES = libtests.a +getresgid_SOURCES = getresgid.c +getresgid_OBJECTS = getresgid.$(OBJEXT) +getresgid_LDADD = $(LDADD) +getresgid_DEPENDENCIES = libtests.a +getresgid32_SOURCES = getresgid32.c +getresgid32_OBJECTS = getresgid32.$(OBJEXT) +getresgid32_LDADD = $(LDADD) +getresgid32_DEPENDENCIES = libtests.a +getresuid_SOURCES = getresuid.c +getresuid_OBJECTS = getresuid.$(OBJEXT) +getresuid_LDADD = $(LDADD) +getresuid_DEPENDENCIES = libtests.a +getresuid32_SOURCES = getresuid32.c +getresuid32_OBJECTS = getresuid32.$(OBJEXT) +getresuid32_LDADD = $(LDADD) +getresuid32_DEPENDENCIES = libtests.a +getrlimit_SOURCES = getrlimit.c +getrlimit_OBJECTS = getrlimit.$(OBJEXT) +getrlimit_LDADD = $(LDADD) +getrlimit_DEPENDENCIES = libtests.a +getrusage_SOURCES = getrusage.c +getrusage_OBJECTS = getrusage.$(OBJEXT) +getrusage_LDADD = $(LDADD) +getrusage_DEPENDENCIES = libtests.a +getsid_SOURCES = getsid.c +getsid_OBJECTS = getsid.$(OBJEXT) +getsid_LDADD = $(LDADD) +getsid_DEPENDENCIES = libtests.a +getsockname_SOURCES = getsockname.c +getsockname_OBJECTS = getsockname.$(OBJEXT) +getsockname_LDADD = $(LDADD) +getsockname_DEPENDENCIES = libtests.a +getuid_SOURCES = getuid.c +getuid_OBJECTS = getuid.$(OBJEXT) +getuid_LDADD = $(LDADD) +getuid_DEPENDENCIES = libtests.a +getuid32_SOURCES = getuid32.c +getuid32_OBJECTS = getuid32.$(OBJEXT) +getuid32_LDADD = $(LDADD) +getuid32_DEPENDENCIES = libtests.a +getxxid_SOURCES = getxxid.c +getxxid_OBJECTS = getxxid.$(OBJEXT) +getxxid_LDADD = $(LDADD) +getxxid_DEPENDENCIES = libtests.a +inet_cmsg_SOURCES = inet-cmsg.c +inet_cmsg_OBJECTS = inet-cmsg.$(OBJEXT) +inet_cmsg_LDADD = $(LDADD) +inet_cmsg_DEPENDENCIES = libtests.a +init_module_SOURCES = init_module.c +init_module_OBJECTS = init_module.$(OBJEXT) +init_module_LDADD = $(LDADD) +init_module_DEPENDENCIES = libtests.a +inotify_SOURCES = inotify.c +inotify_OBJECTS = inotify.$(OBJEXT) +inotify_LDADD = $(LDADD) +inotify_DEPENDENCIES = libtests.a +inotify_init1_SOURCES = inotify_init1.c +inotify_init1_OBJECTS = inotify_init1.$(OBJEXT) +inotify_init1_LDADD = $(LDADD) +inotify_init1_DEPENDENCIES = libtests.a +ioctl_SOURCES = ioctl.c +ioctl_OBJECTS = ioctl.$(OBJEXT) +ioctl_LDADD = $(LDADD) +ioctl_DEPENDENCIES = libtests.a +ioctl_block_SOURCES = ioctl_block.c +ioctl_block_OBJECTS = ioctl_block.$(OBJEXT) +ioctl_block_LDADD = $(LDADD) +ioctl_block_DEPENDENCIES = libtests.a +ioctl_dm_SOURCES = ioctl_dm.c +ioctl_dm_OBJECTS = ioctl_dm.$(OBJEXT) +ioctl_dm_LDADD = $(LDADD) +ioctl_dm_DEPENDENCIES = libtests.a +ioctl_dm_v_SOURCES = ioctl_dm-v.c +ioctl_dm_v_OBJECTS = ioctl_dm-v.$(OBJEXT) +ioctl_dm_v_LDADD = $(LDADD) +ioctl_dm_v_DEPENDENCIES = libtests.a +ioctl_evdev_SOURCES = ioctl_evdev.c +ioctl_evdev_OBJECTS = ioctl_evdev.$(OBJEXT) +ioctl_evdev_LDADD = $(LDADD) +ioctl_evdev_DEPENDENCIES = libtests.a +ioctl_evdev_v_SOURCES = ioctl_evdev-v.c +ioctl_evdev_v_OBJECTS = ioctl_evdev-v.$(OBJEXT) +ioctl_evdev_v_LDADD = $(LDADD) +ioctl_evdev_v_DEPENDENCIES = libtests.a +ioctl_loop_SOURCES = ioctl_loop.c +ioctl_loop_OBJECTS = ioctl_loop.$(OBJEXT) +ioctl_loop_LDADD = $(LDADD) +ioctl_loop_DEPENDENCIES = libtests.a +ioctl_loop_nv_SOURCES = ioctl_loop-nv.c +ioctl_loop_nv_OBJECTS = ioctl_loop-nv.$(OBJEXT) +ioctl_loop_nv_LDADD = $(LDADD) +ioctl_loop_nv_DEPENDENCIES = libtests.a +ioctl_loop_v_SOURCES = ioctl_loop-v.c +ioctl_loop_v_OBJECTS = ioctl_loop-v.$(OBJEXT) +ioctl_loop_v_LDADD = $(LDADD) +ioctl_loop_v_DEPENDENCIES = libtests.a +ioctl_mtd_SOURCES = ioctl_mtd.c +ioctl_mtd_OBJECTS = ioctl_mtd.$(OBJEXT) +ioctl_mtd_LDADD = $(LDADD) +ioctl_mtd_DEPENDENCIES = libtests.a +ioctl_rtc_SOURCES = ioctl_rtc.c +ioctl_rtc_OBJECTS = ioctl_rtc.$(OBJEXT) +ioctl_rtc_LDADD = $(LDADD) +ioctl_rtc_DEPENDENCIES = libtests.a +ioctl_rtc_v_SOURCES = ioctl_rtc-v.c +ioctl_rtc_v_OBJECTS = ioctl_rtc-v.$(OBJEXT) +ioctl_rtc_v_LDADD = $(LDADD) +ioctl_rtc_v_DEPENDENCIES = libtests.a +ioctl_scsi_SOURCES = ioctl_scsi.c +ioctl_scsi_OBJECTS = ioctl_scsi.$(OBJEXT) +ioctl_scsi_LDADD = $(LDADD) +ioctl_scsi_DEPENDENCIES = libtests.a +ioctl_sg_io_v3_SOURCES = ioctl_sg_io_v3.c +ioctl_sg_io_v3_OBJECTS = ioctl_sg_io_v3.$(OBJEXT) +ioctl_sg_io_v3_LDADD = $(LDADD) +ioctl_sg_io_v3_DEPENDENCIES = libtests.a +ioctl_sg_io_v4_SOURCES = ioctl_sg_io_v4.c +ioctl_sg_io_v4_OBJECTS = ioctl_sg_io_v4.$(OBJEXT) +ioctl_sg_io_v4_LDADD = $(LDADD) +ioctl_sg_io_v4_DEPENDENCIES = libtests.a +ioctl_sock_gifconf_SOURCES = ioctl_sock_gifconf.c +ioctl_sock_gifconf_OBJECTS = ioctl_sock_gifconf.$(OBJEXT) +ioctl_sock_gifconf_LDADD = $(LDADD) +ioctl_sock_gifconf_DEPENDENCIES = libtests.a +ioctl_uffdio_SOURCES = ioctl_uffdio.c +ioctl_uffdio_OBJECTS = ioctl_uffdio.$(OBJEXT) +ioctl_uffdio_LDADD = $(LDADD) +ioctl_uffdio_DEPENDENCIES = libtests.a +ioctl_v4l2_SOURCES = ioctl_v4l2.c +ioctl_v4l2_OBJECTS = ioctl_v4l2.$(OBJEXT) +ioctl_v4l2_LDADD = $(LDADD) +ioctl_v4l2_DEPENDENCIES = libtests.a +ioperm_SOURCES = ioperm.c +ioperm_OBJECTS = ioperm.$(OBJEXT) +ioperm_LDADD = $(LDADD) +ioperm_DEPENDENCIES = libtests.a +iopl_SOURCES = iopl.c +iopl_OBJECTS = iopl.$(OBJEXT) +iopl_LDADD = $(LDADD) +iopl_DEPENDENCIES = libtests.a +ioprio_SOURCES = ioprio.c +ioprio_OBJECTS = ioprio.$(OBJEXT) +ioprio_LDADD = $(LDADD) +ioprio_DEPENDENCIES = libtests.a +ip_mreq_SOURCES = ip_mreq.c +ip_mreq_OBJECTS = ip_mreq.$(OBJEXT) +ip_mreq_LDADD = $(LDADD) +ip_mreq_DEPENDENCIES = libtests.a +ipc_SOURCES = ipc.c +ipc_OBJECTS = ipc.$(OBJEXT) +ipc_LDADD = $(LDADD) +ipc_DEPENDENCIES = libtests.a +ipc_msg_SOURCES = ipc_msg.c +ipc_msg_OBJECTS = ipc_msg.$(OBJEXT) +ipc_msg_LDADD = $(LDADD) +ipc_msg_DEPENDENCIES = libtests.a +ipc_msgbuf_SOURCES = ipc_msgbuf.c +ipc_msgbuf_OBJECTS = ipc_msgbuf.$(OBJEXT) +ipc_msgbuf_LDADD = $(LDADD) +ipc_msgbuf_DEPENDENCIES = libtests.a +ipc_sem_SOURCES = ipc_sem.c +ipc_sem_OBJECTS = ipc_sem.$(OBJEXT) +ipc_sem_LDADD = $(LDADD) +ipc_sem_DEPENDENCIES = libtests.a +ipc_shm_SOURCES = ipc_shm.c +ipc_shm_OBJECTS = ipc_shm.$(OBJEXT) +ipc_shm_LDADD = $(LDADD) +ipc_shm_DEPENDENCIES = libtests.a +kcmp_SOURCES = kcmp.c +kcmp_OBJECTS = kcmp.$(OBJEXT) +kcmp_LDADD = $(LDADD) +kcmp_DEPENDENCIES = libtests.a +kexec_file_load_SOURCES = kexec_file_load.c +kexec_file_load_OBJECTS = kexec_file_load.$(OBJEXT) +kexec_file_load_LDADD = $(LDADD) +kexec_file_load_DEPENDENCIES = libtests.a +kexec_load_SOURCES = kexec_load.c +kexec_load_OBJECTS = kexec_load.$(OBJEXT) +kexec_load_LDADD = $(LDADD) +kexec_load_DEPENDENCIES = libtests.a +keyctl_SOURCES = keyctl.c +keyctl_OBJECTS = keyctl.$(OBJEXT) +keyctl_LDADD = $(LDADD) +keyctl_DEPENDENCIES = libtests.a +kill_SOURCES = kill.c +kill_OBJECTS = kill.$(OBJEXT) +kill_LDADD = $(LDADD) +kill_DEPENDENCIES = libtests.a +ksysent_SOURCES = ksysent.c +ksysent_OBJECTS = ksysent.$(OBJEXT) +ksysent_LDADD = $(LDADD) +ksysent_DEPENDENCIES = libtests.a +lchown_SOURCES = lchown.c +lchown_OBJECTS = lchown.$(OBJEXT) +lchown_LDADD = $(LDADD) +lchown_DEPENDENCIES = libtests.a +lchown32_SOURCES = lchown32.c +lchown32_OBJECTS = lchown32.$(OBJEXT) +lchown32_LDADD = $(LDADD) +lchown32_DEPENDENCIES = libtests.a +link_SOURCES = link.c +link_OBJECTS = link.$(OBJEXT) +link_LDADD = $(LDADD) +link_DEPENDENCIES = libtests.a +linkat_SOURCES = linkat.c +linkat_OBJECTS = linkat.$(OBJEXT) +linkat_LDADD = $(LDADD) +linkat_DEPENDENCIES = libtests.a +llseek_SOURCES = llseek.c +llseek_OBJECTS = llseek.$(OBJEXT) +llseek_LDADD = $(LDADD) +llseek_DEPENDENCIES = libtests.a +lookup_dcookie_SOURCES = lookup_dcookie.c +lookup_dcookie_OBJECTS = lookup_dcookie.$(OBJEXT) +lookup_dcookie_LDADD = $(LDADD) +lookup_dcookie_DEPENDENCIES = libtests.a +lseek_SOURCES = lseek.c +lseek_OBJECTS = lseek.$(OBJEXT) +lseek_LDADD = $(LDADD) +lseek_DEPENDENCIES = libtests.a +lstat_SOURCES = lstat.c +lstat_OBJECTS = lstat.$(OBJEXT) +lstat_LDADD = $(LDADD) +lstat_DEPENDENCIES = libtests.a +lstat64_SOURCES = lstat64.c +lstat64_OBJECTS = lstat64-lstat64.$(OBJEXT) +lstat64_LDADD = $(LDADD) +lstat64_DEPENDENCIES = libtests.a +mbind_SOURCES = mbind.c +mbind_OBJECTS = mbind.$(OBJEXT) +mbind_LDADD = $(LDADD) +mbind_DEPENDENCIES = libtests.a +membarrier_SOURCES = membarrier.c +membarrier_OBJECTS = membarrier.$(OBJEXT) +membarrier_LDADD = $(LDADD) +membarrier_DEPENDENCIES = libtests.a +memfd_create_SOURCES = memfd_create.c +memfd_create_OBJECTS = memfd_create.$(OBJEXT) +memfd_create_LDADD = $(LDADD) +memfd_create_DEPENDENCIES = libtests.a +migrate_pages_SOURCES = migrate_pages.c +migrate_pages_OBJECTS = migrate_pages.$(OBJEXT) +migrate_pages_LDADD = $(LDADD) +migrate_pages_DEPENDENCIES = libtests.a +mincore_SOURCES = mincore.c +mincore_OBJECTS = mincore.$(OBJEXT) +mincore_LDADD = $(LDADD) +mincore_DEPENDENCIES = libtests.a +mkdir_SOURCES = mkdir.c +mkdir_OBJECTS = mkdir.$(OBJEXT) +mkdir_LDADD = $(LDADD) +mkdir_DEPENDENCIES = libtests.a +mkdirat_SOURCES = mkdirat.c +mkdirat_OBJECTS = mkdirat.$(OBJEXT) +mkdirat_LDADD = $(LDADD) +mkdirat_DEPENDENCIES = libtests.a +mknod_SOURCES = mknod.c +mknod_OBJECTS = mknod.$(OBJEXT) +mknod_LDADD = $(LDADD) +mknod_DEPENDENCIES = libtests.a +mknodat_SOURCES = mknodat.c +mknodat_OBJECTS = mknodat.$(OBJEXT) +mknodat_LDADD = $(LDADD) +mknodat_DEPENDENCIES = libtests.a +mlock_SOURCES = mlock.c +mlock_OBJECTS = mlock.$(OBJEXT) +mlock_LDADD = $(LDADD) +mlock_DEPENDENCIES = libtests.a +mlock2_SOURCES = mlock2.c +mlock2_OBJECTS = mlock2.$(OBJEXT) +mlock2_LDADD = $(LDADD) +mlock2_DEPENDENCIES = libtests.a +mlockall_SOURCES = mlockall.c +mlockall_OBJECTS = mlockall.$(OBJEXT) +mlockall_LDADD = $(LDADD) +mlockall_DEPENDENCIES = libtests.a +mmap_SOURCES = mmap.c +mmap_OBJECTS = mmap.$(OBJEXT) +mmap_LDADD = $(LDADD) +mmap_DEPENDENCIES = libtests.a +mmap64_SOURCES = mmap64.c +mmap64_OBJECTS = mmap64-mmap64.$(OBJEXT) +mmap64_LDADD = $(LDADD) +mmap64_DEPENDENCIES = libtests.a +mmsg_SOURCES = mmsg.c +mmsg_OBJECTS = mmsg.$(OBJEXT) +mmsg_LDADD = $(LDADD) +mmsg_DEPENDENCIES = libtests.a +mmsg_silent_SOURCES = mmsg-silent.c +mmsg_silent_OBJECTS = mmsg-silent.$(OBJEXT) +mmsg_silent_LDADD = $(LDADD) +mmsg_silent_DEPENDENCIES = libtests.a +mmsg_name_SOURCES = mmsg_name.c +mmsg_name_OBJECTS = mmsg_name.$(OBJEXT) +mmsg_name_LDADD = $(LDADD) +mmsg_name_DEPENDENCIES = libtests.a +mmsg_name_v_SOURCES = mmsg_name-v.c +mmsg_name_v_OBJECTS = mmsg_name-v.$(OBJEXT) +mmsg_name_v_LDADD = $(LDADD) +mmsg_name_v_DEPENDENCIES = libtests.a +mount_SOURCES = mount.c +mount_OBJECTS = mount.$(OBJEXT) +mount_LDADD = $(LDADD) +mount_DEPENDENCIES = libtests.a +move_pages_SOURCES = move_pages.c +move_pages_OBJECTS = move_pages.$(OBJEXT) +move_pages_LDADD = $(LDADD) +move_pages_DEPENDENCIES = libtests.a +mq_SOURCES = mq.c +mq_OBJECTS = mq.$(OBJEXT) +mq_DEPENDENCIES = $(LDADD) +mq_sendrecv_SOURCES = mq_sendrecv.c +mq_sendrecv_OBJECTS = mq_sendrecv.$(OBJEXT) +mq_sendrecv_DEPENDENCIES = $(LDADD) +mq_sendrecv_read_SOURCES = mq_sendrecv-read.c +mq_sendrecv_read_OBJECTS = mq_sendrecv-read.$(OBJEXT) +mq_sendrecv_read_DEPENDENCIES = $(LDADD) +mq_sendrecv_write_SOURCES = mq_sendrecv-write.c +mq_sendrecv_write_OBJECTS = mq_sendrecv-write.$(OBJEXT) +mq_sendrecv_write_DEPENDENCIES = $(LDADD) +msg_control_SOURCES = msg_control.c +msg_control_OBJECTS = msg_control.$(OBJEXT) +msg_control_LDADD = $(LDADD) +msg_control_DEPENDENCIES = libtests.a +msg_control_v_SOURCES = msg_control-v.c +msg_control_v_OBJECTS = msg_control-v.$(OBJEXT) +msg_control_v_LDADD = $(LDADD) +msg_control_v_DEPENDENCIES = libtests.a +msg_name_SOURCES = msg_name.c +msg_name_OBJECTS = msg_name.$(OBJEXT) +msg_name_LDADD = $(LDADD) +msg_name_DEPENDENCIES = libtests.a +munlockall_SOURCES = munlockall.c +munlockall_OBJECTS = munlockall.$(OBJEXT) +munlockall_LDADD = $(LDADD) +munlockall_DEPENDENCIES = libtests.a +nanosleep_SOURCES = nanosleep.c +nanosleep_OBJECTS = nanosleep.$(OBJEXT) +nanosleep_LDADD = $(LDADD) +nanosleep_DEPENDENCIES = libtests.a +net_accept_connect_SOURCES = net-accept-connect.c +net_accept_connect_OBJECTS = net-accept-connect.$(OBJEXT) +net_accept_connect_LDADD = $(LDADD) +net_accept_connect_DEPENDENCIES = libtests.a +net_icmp_filter_SOURCES = net-icmp_filter.c +net_icmp_filter_OBJECTS = net-icmp_filter.$(OBJEXT) +net_icmp_filter_LDADD = $(LDADD) +net_icmp_filter_DEPENDENCIES = libtests.a +net_sockaddr_SOURCES = net-sockaddr.c +net_sockaddr_OBJECTS = net-sockaddr.$(OBJEXT) +net_sockaddr_LDADD = $(LDADD) +net_sockaddr_DEPENDENCIES = libtests.a +net_y_unix_SOURCES = net-y-unix.c +net_y_unix_OBJECTS = net-y-unix.$(OBJEXT) +net_y_unix_LDADD = $(LDADD) +net_y_unix_DEPENDENCIES = libtests.a +net_yy_inet_SOURCES = net-yy-inet.c +net_yy_inet_OBJECTS = net-yy-inet.$(OBJEXT) +net_yy_inet_LDADD = $(LDADD) +net_yy_inet_DEPENDENCIES = libtests.a +net_yy_netlink_SOURCES = net-yy-netlink.c +net_yy_netlink_OBJECTS = net-yy-netlink.$(OBJEXT) +net_yy_netlink_LDADD = $(LDADD) +net_yy_netlink_DEPENDENCIES = libtests.a +net_yy_unix_SOURCES = net-yy-unix.c +net_yy_unix_OBJECTS = net-yy-unix.$(OBJEXT) +net_yy_unix_LDADD = $(LDADD) +net_yy_unix_DEPENDENCIES = libtests.a +netlink_inet_diag_SOURCES = netlink_inet_diag.c +netlink_inet_diag_OBJECTS = netlink_inet_diag.$(OBJEXT) +netlink_inet_diag_LDADD = $(LDADD) +netlink_inet_diag_DEPENDENCIES = libtests.a +netlink_netlink_diag_SOURCES = netlink_netlink_diag.c +netlink_netlink_diag_OBJECTS = netlink_netlink_diag.$(OBJEXT) +netlink_netlink_diag_LDADD = $(LDADD) +netlink_netlink_diag_DEPENDENCIES = libtests.a +netlink_protocol_SOURCES = netlink_protocol.c +netlink_protocol_OBJECTS = netlink_protocol.$(OBJEXT) +netlink_protocol_LDADD = $(LDADD) +netlink_protocol_DEPENDENCIES = libtests.a +netlink_unix_diag_SOURCES = netlink_unix_diag.c +netlink_unix_diag_OBJECTS = netlink_unix_diag.$(OBJEXT) +netlink_unix_diag_LDADD = $(LDADD) +netlink_unix_diag_DEPENDENCIES = libtests.a +newfstatat_SOURCES = newfstatat.c +newfstatat_OBJECTS = newfstatat-newfstatat.$(OBJEXT) +newfstatat_LDADD = $(LDADD) +newfstatat_DEPENDENCIES = libtests.a +nsyscalls_SOURCES = nsyscalls.c +nsyscalls_OBJECTS = nsyscalls.$(OBJEXT) +nsyscalls_LDADD = $(LDADD) +nsyscalls_DEPENDENCIES = libtests.a +old_mmap_SOURCES = old_mmap.c +old_mmap_OBJECTS = old_mmap.$(OBJEXT) +old_mmap_LDADD = $(LDADD) +old_mmap_DEPENDENCIES = libtests.a +oldfstat_SOURCES = oldfstat.c +oldfstat_OBJECTS = oldfstat.$(OBJEXT) +oldfstat_LDADD = $(LDADD) +oldfstat_DEPENDENCIES = libtests.a +oldlstat_SOURCES = oldlstat.c +oldlstat_OBJECTS = oldlstat.$(OBJEXT) +oldlstat_LDADD = $(LDADD) +oldlstat_DEPENDENCIES = libtests.a +oldselect_SOURCES = oldselect.c +oldselect_OBJECTS = oldselect.$(OBJEXT) +oldselect_LDADD = $(LDADD) +oldselect_DEPENDENCIES = libtests.a +oldstat_SOURCES = oldstat.c +oldstat_OBJECTS = oldstat.$(OBJEXT) +oldstat_LDADD = $(LDADD) +oldstat_DEPENDENCIES = libtests.a +open_SOURCES = open.c +open_OBJECTS = open.$(OBJEXT) +open_LDADD = $(LDADD) +open_DEPENDENCIES = libtests.a +openat_SOURCES = openat.c +openat_OBJECTS = openat.$(OBJEXT) +openat_LDADD = $(LDADD) +openat_DEPENDENCIES = libtests.a +pause_SOURCES = pause.c +pause_OBJECTS = pause.$(OBJEXT) +pause_LDADD = $(LDADD) +pause_DEPENDENCIES = libtests.a +pc_SOURCES = pc.c +pc_OBJECTS = pc.$(OBJEXT) +am__DEPENDENCIES_1 = +pc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(LDADD) +perf_event_open_SOURCES = perf_event_open.c +perf_event_open_OBJECTS = perf_event_open.$(OBJEXT) +perf_event_open_LDADD = $(LDADD) +perf_event_open_DEPENDENCIES = libtests.a +perf_event_open_nonverbose_SOURCES = perf_event_open_nonverbose.c +perf_event_open_nonverbose_OBJECTS = \ + perf_event_open_nonverbose.$(OBJEXT) +perf_event_open_nonverbose_LDADD = $(LDADD) +perf_event_open_nonverbose_DEPENDENCIES = libtests.a +perf_event_open_unabbrev_SOURCES = perf_event_open_unabbrev.c +perf_event_open_unabbrev_OBJECTS = perf_event_open_unabbrev.$(OBJEXT) +perf_event_open_unabbrev_LDADD = $(LDADD) +perf_event_open_unabbrev_DEPENDENCIES = libtests.a +personality_SOURCES = personality.c +personality_OBJECTS = personality.$(OBJEXT) +personality_LDADD = $(LDADD) +personality_DEPENDENCIES = libtests.a +pipe_SOURCES = pipe.c +pipe_OBJECTS = pipe.$(OBJEXT) +pipe_LDADD = $(LDADD) +pipe_DEPENDENCIES = libtests.a +pipe2_SOURCES = pipe2.c +pipe2_OBJECTS = pipe2.$(OBJEXT) +pipe2_LDADD = $(LDADD) +pipe2_DEPENDENCIES = libtests.a +pkey_alloc_SOURCES = pkey_alloc.c +pkey_alloc_OBJECTS = pkey_alloc.$(OBJEXT) +pkey_alloc_LDADD = $(LDADD) +pkey_alloc_DEPENDENCIES = libtests.a +pkey_free_SOURCES = pkey_free.c +pkey_free_OBJECTS = pkey_free.$(OBJEXT) +pkey_free_LDADD = $(LDADD) +pkey_free_DEPENDENCIES = libtests.a +pkey_mprotect_SOURCES = pkey_mprotect.c +pkey_mprotect_OBJECTS = pkey_mprotect.$(OBJEXT) +pkey_mprotect_LDADD = $(LDADD) +pkey_mprotect_DEPENDENCIES = libtests.a +poll_SOURCES = poll.c +poll_OBJECTS = poll.$(OBJEXT) +poll_LDADD = $(LDADD) +poll_DEPENDENCIES = libtests.a +ppoll_SOURCES = ppoll.c +ppoll_OBJECTS = ppoll.$(OBJEXT) +ppoll_LDADD = $(LDADD) +ppoll_DEPENDENCIES = libtests.a +prctl_arg2_intptr_SOURCES = prctl-arg2-intptr.c +prctl_arg2_intptr_OBJECTS = prctl-arg2-intptr.$(OBJEXT) +prctl_arg2_intptr_LDADD = $(LDADD) +prctl_arg2_intptr_DEPENDENCIES = libtests.a +prctl_dumpable_SOURCES = prctl-dumpable.c +prctl_dumpable_OBJECTS = prctl-dumpable.$(OBJEXT) +prctl_dumpable_LDADD = $(LDADD) +prctl_dumpable_DEPENDENCIES = libtests.a +prctl_name_SOURCES = prctl-name.c +prctl_name_OBJECTS = prctl-name.$(OBJEXT) +prctl_name_LDADD = $(LDADD) +prctl_name_DEPENDENCIES = libtests.a +prctl_no_args_SOURCES = prctl-no-args.c +prctl_no_args_OBJECTS = prctl-no-args.$(OBJEXT) +prctl_no_args_LDADD = $(LDADD) +prctl_no_args_DEPENDENCIES = libtests.a +prctl_pdeathsig_SOURCES = prctl-pdeathsig.c +prctl_pdeathsig_OBJECTS = prctl-pdeathsig.$(OBJEXT) +prctl_pdeathsig_LDADD = $(LDADD) +prctl_pdeathsig_DEPENDENCIES = libtests.a +prctl_seccomp_filter_v_SOURCES = prctl-seccomp-filter-v.c +prctl_seccomp_filter_v_OBJECTS = prctl-seccomp-filter-v.$(OBJEXT) +prctl_seccomp_filter_v_LDADD = $(LDADD) +prctl_seccomp_filter_v_DEPENDENCIES = libtests.a +prctl_seccomp_strict_SOURCES = prctl-seccomp-strict.c +prctl_seccomp_strict_OBJECTS = prctl-seccomp-strict.$(OBJEXT) +prctl_seccomp_strict_LDADD = $(LDADD) +prctl_seccomp_strict_DEPENDENCIES = libtests.a +prctl_securebits_SOURCES = prctl-securebits.c +prctl_securebits_OBJECTS = prctl-securebits.$(OBJEXT) +prctl_securebits_LDADD = $(LDADD) +prctl_securebits_DEPENDENCIES = libtests.a +prctl_tid_address_SOURCES = prctl-tid_address.c +prctl_tid_address_OBJECTS = prctl-tid_address.$(OBJEXT) +prctl_tid_address_LDADD = $(LDADD) +prctl_tid_address_DEPENDENCIES = libtests.a +prctl_tsc_SOURCES = prctl-tsc.c +prctl_tsc_OBJECTS = prctl-tsc.$(OBJEXT) +prctl_tsc_LDADD = $(LDADD) +prctl_tsc_DEPENDENCIES = libtests.a +pread64_pwrite64_SOURCES = pread64-pwrite64.c +pread64_pwrite64_OBJECTS = \ + pread64_pwrite64-pread64-pwrite64.$(OBJEXT) +pread64_pwrite64_LDADD = $(LDADD) +pread64_pwrite64_DEPENDENCIES = libtests.a +preadv_SOURCES = preadv.c +preadv_OBJECTS = preadv-preadv.$(OBJEXT) +preadv_LDADD = $(LDADD) +preadv_DEPENDENCIES = libtests.a +preadv_pwritev_SOURCES = preadv-pwritev.c +preadv_pwritev_OBJECTS = preadv_pwritev-preadv-pwritev.$(OBJEXT) +preadv_pwritev_LDADD = $(LDADD) +preadv_pwritev_DEPENDENCIES = libtests.a +preadv2_pwritev2_SOURCES = preadv2-pwritev2.c +preadv2_pwritev2_OBJECTS = preadv2-pwritev2.$(OBJEXT) +preadv2_pwritev2_LDADD = $(LDADD) +preadv2_pwritev2_DEPENDENCIES = libtests.a +print_maxfd_SOURCES = print_maxfd.c +print_maxfd_OBJECTS = print_maxfd.$(OBJEXT) +print_maxfd_LDADD = $(LDADD) +print_maxfd_DEPENDENCIES = libtests.a +printstr_SOURCES = printstr.c +printstr_OBJECTS = printstr.$(OBJEXT) +printstr_LDADD = $(LDADD) +printstr_DEPENDENCIES = libtests.a +prlimit64_SOURCES = prlimit64.c +prlimit64_OBJECTS = prlimit64.$(OBJEXT) +prlimit64_LDADD = $(LDADD) +prlimit64_DEPENDENCIES = libtests.a +process_vm_readv_SOURCES = process_vm_readv.c +process_vm_readv_OBJECTS = process_vm_readv.$(OBJEXT) +process_vm_readv_LDADD = $(LDADD) +process_vm_readv_DEPENDENCIES = libtests.a +process_vm_writev_SOURCES = process_vm_writev.c +process_vm_writev_OBJECTS = process_vm_writev.$(OBJEXT) +process_vm_writev_LDADD = $(LDADD) +process_vm_writev_DEPENDENCIES = libtests.a +pselect6_SOURCES = pselect6.c +pselect6_OBJECTS = pselect6.$(OBJEXT) +pselect6_LDADD = $(LDADD) +pselect6_DEPENDENCIES = libtests.a +ptrace_SOURCES = ptrace.c +ptrace_OBJECTS = ptrace.$(OBJEXT) +ptrace_LDADD = $(LDADD) +ptrace_DEPENDENCIES = libtests.a +pwritev_SOURCES = pwritev.c +pwritev_OBJECTS = pwritev-pwritev.$(OBJEXT) +pwritev_LDADD = $(LDADD) +pwritev_DEPENDENCIES = libtests.a +qual_fault_SOURCES = qual_fault.c +qual_fault_OBJECTS = qual_fault.$(OBJEXT) +qual_fault_LDADD = $(LDADD) +qual_fault_DEPENDENCIES = libtests.a +qual_inject_error_signal_SOURCES = qual_inject-error-signal.c +qual_inject_error_signal_OBJECTS = qual_inject-error-signal.$(OBJEXT) +qual_inject_error_signal_LDADD = $(LDADD) +qual_inject_error_signal_DEPENDENCIES = libtests.a +qual_inject_retval_SOURCES = qual_inject-retval.c +qual_inject_retval_OBJECTS = qual_inject-retval.$(OBJEXT) +qual_inject_retval_LDADD = $(LDADD) +qual_inject_retval_DEPENDENCIES = libtests.a +qual_inject_signal_SOURCES = qual_inject-signal.c +qual_inject_signal_OBJECTS = qual_inject-signal.$(OBJEXT) +qual_inject_signal_LDADD = $(LDADD) +qual_inject_signal_DEPENDENCIES = libtests.a +qual_signal_SOURCES = qual_signal.c +qual_signal_OBJECTS = qual_signal.$(OBJEXT) +qual_signal_LDADD = $(LDADD) +qual_signal_DEPENDENCIES = libtests.a +quotactl_SOURCES = quotactl.c +quotactl_OBJECTS = quotactl.$(OBJEXT) +quotactl_LDADD = $(LDADD) +quotactl_DEPENDENCIES = libtests.a +quotactl_v_SOURCES = quotactl-v.c +quotactl_v_OBJECTS = quotactl-v.$(OBJEXT) +quotactl_v_LDADD = $(LDADD) +quotactl_v_DEPENDENCIES = libtests.a +quotactl_xfs_SOURCES = quotactl-xfs.c +quotactl_xfs_OBJECTS = quotactl-xfs.$(OBJEXT) +quotactl_xfs_LDADD = $(LDADD) +quotactl_xfs_DEPENDENCIES = libtests.a +quotactl_xfs_v_SOURCES = quotactl-xfs-v.c +quotactl_xfs_v_OBJECTS = quotactl-xfs-v.$(OBJEXT) +quotactl_xfs_v_LDADD = $(LDADD) +quotactl_xfs_v_DEPENDENCIES = libtests.a +read_write_SOURCES = read-write.c +read_write_OBJECTS = read-write.$(OBJEXT) +read_write_LDADD = $(LDADD) +read_write_DEPENDENCIES = libtests.a +readahead_SOURCES = readahead.c +readahead_OBJECTS = readahead.$(OBJEXT) +readahead_LDADD = $(LDADD) +readahead_DEPENDENCIES = libtests.a +readdir_SOURCES = readdir.c +readdir_OBJECTS = readdir.$(OBJEXT) +readdir_LDADD = $(LDADD) +readdir_DEPENDENCIES = libtests.a +readlink_SOURCES = readlink.c +readlink_OBJECTS = readlink.$(OBJEXT) +readlink_LDADD = $(LDADD) +readlink_DEPENDENCIES = libtests.a +readlinkat_SOURCES = readlinkat.c +readlinkat_OBJECTS = readlinkat.$(OBJEXT) +readlinkat_LDADD = $(LDADD) +readlinkat_DEPENDENCIES = libtests.a +readv_SOURCES = readv.c +readv_OBJECTS = readv.$(OBJEXT) +readv_LDADD = $(LDADD) +readv_DEPENDENCIES = libtests.a +reboot_SOURCES = reboot.c +reboot_OBJECTS = reboot.$(OBJEXT) +reboot_LDADD = $(LDADD) +reboot_DEPENDENCIES = libtests.a +recvfrom_SOURCES = recvfrom.c +recvfrom_OBJECTS = recvfrom.$(OBJEXT) +recvfrom_LDADD = $(LDADD) +recvfrom_DEPENDENCIES = libtests.a +recvmmsg_timeout_SOURCES = recvmmsg-timeout.c +recvmmsg_timeout_OBJECTS = recvmmsg-timeout.$(OBJEXT) +recvmmsg_timeout_LDADD = $(LDADD) +recvmmsg_timeout_DEPENDENCIES = libtests.a +recvmsg_SOURCES = recvmsg.c +recvmsg_OBJECTS = recvmsg.$(OBJEXT) +recvmsg_LDADD = $(LDADD) +recvmsg_DEPENDENCIES = libtests.a +redirect_fds_SOURCES = redirect-fds.c +redirect_fds_OBJECTS = redirect-fds.$(OBJEXT) +redirect_fds_LDADD = $(LDADD) +redirect_fds_DEPENDENCIES = libtests.a +remap_file_pages_SOURCES = remap_file_pages.c +remap_file_pages_OBJECTS = remap_file_pages.$(OBJEXT) +remap_file_pages_LDADD = $(LDADD) +remap_file_pages_DEPENDENCIES = libtests.a +rename_SOURCES = rename.c +rename_OBJECTS = rename.$(OBJEXT) +rename_LDADD = $(LDADD) +rename_DEPENDENCIES = libtests.a +renameat_SOURCES = renameat.c +renameat_OBJECTS = renameat.$(OBJEXT) +renameat_LDADD = $(LDADD) +renameat_DEPENDENCIES = libtests.a +renameat2_SOURCES = renameat2.c +renameat2_OBJECTS = renameat2.$(OBJEXT) +renameat2_LDADD = $(LDADD) +renameat2_DEPENDENCIES = libtests.a +request_key_SOURCES = request_key.c +request_key_OBJECTS = request_key.$(OBJEXT) +request_key_LDADD = $(LDADD) +request_key_DEPENDENCIES = libtests.a +restart_syscall_SOURCES = restart_syscall.c +restart_syscall_OBJECTS = restart_syscall.$(OBJEXT) +restart_syscall_LDADD = $(LDADD) +restart_syscall_DEPENDENCIES = libtests.a +rmdir_SOURCES = rmdir.c +rmdir_OBJECTS = rmdir.$(OBJEXT) +rmdir_LDADD = $(LDADD) +rmdir_DEPENDENCIES = libtests.a +rt_sigpending_SOURCES = rt_sigpending.c +rt_sigpending_OBJECTS = rt_sigpending.$(OBJEXT) +rt_sigpending_LDADD = $(LDADD) +rt_sigpending_DEPENDENCIES = libtests.a +rt_sigprocmask_SOURCES = rt_sigprocmask.c +rt_sigprocmask_OBJECTS = rt_sigprocmask.$(OBJEXT) +rt_sigprocmask_LDADD = $(LDADD) +rt_sigprocmask_DEPENDENCIES = libtests.a +rt_sigqueueinfo_SOURCES = rt_sigqueueinfo.c +rt_sigqueueinfo_OBJECTS = rt_sigqueueinfo.$(OBJEXT) +rt_sigqueueinfo_LDADD = $(LDADD) +rt_sigqueueinfo_DEPENDENCIES = libtests.a +rt_sigsuspend_SOURCES = rt_sigsuspend.c +rt_sigsuspend_OBJECTS = rt_sigsuspend.$(OBJEXT) +rt_sigsuspend_LDADD = $(LDADD) +rt_sigsuspend_DEPENDENCIES = libtests.a +rt_sigtimedwait_SOURCES = rt_sigtimedwait.c +rt_sigtimedwait_OBJECTS = rt_sigtimedwait.$(OBJEXT) +rt_sigtimedwait_LDADD = $(LDADD) +rt_sigtimedwait_DEPENDENCIES = libtests.a +rt_tgsigqueueinfo_SOURCES = rt_tgsigqueueinfo.c +rt_tgsigqueueinfo_OBJECTS = rt_tgsigqueueinfo.$(OBJEXT) +rt_tgsigqueueinfo_LDADD = $(LDADD) +rt_tgsigqueueinfo_DEPENDENCIES = libtests.a +sched_get_priority_mxx_SOURCES = sched_get_priority_mxx.c +sched_get_priority_mxx_OBJECTS = sched_get_priority_mxx.$(OBJEXT) +sched_get_priority_mxx_LDADD = $(LDADD) +sched_get_priority_mxx_DEPENDENCIES = libtests.a +sched_rr_get_interval_SOURCES = sched_rr_get_interval.c +sched_rr_get_interval_OBJECTS = sched_rr_get_interval.$(OBJEXT) +sched_rr_get_interval_LDADD = $(LDADD) +sched_rr_get_interval_DEPENDENCIES = libtests.a +sched_xetaffinity_SOURCES = sched_xetaffinity.c +sched_xetaffinity_OBJECTS = sched_xetaffinity.$(OBJEXT) +sched_xetaffinity_LDADD = $(LDADD) +sched_xetaffinity_DEPENDENCIES = libtests.a +sched_xetattr_SOURCES = sched_xetattr.c +sched_xetattr_OBJECTS = sched_xetattr.$(OBJEXT) +sched_xetattr_LDADD = $(LDADD) +sched_xetattr_DEPENDENCIES = libtests.a +sched_xetparam_SOURCES = sched_xetparam.c +sched_xetparam_OBJECTS = sched_xetparam.$(OBJEXT) +sched_xetparam_LDADD = $(LDADD) +sched_xetparam_DEPENDENCIES = libtests.a +sched_xetscheduler_SOURCES = sched_xetscheduler.c +sched_xetscheduler_OBJECTS = sched_xetscheduler.$(OBJEXT) +sched_xetscheduler_LDADD = $(LDADD) +sched_xetscheduler_DEPENDENCIES = libtests.a +sched_yield_SOURCES = sched_yield.c +sched_yield_OBJECTS = sched_yield.$(OBJEXT) +sched_yield_LDADD = $(LDADD) +sched_yield_DEPENDENCIES = libtests.a +scm_rights_SOURCES = scm_rights.c +scm_rights_OBJECTS = scm_rights.$(OBJEXT) +scm_rights_LDADD = $(LDADD) +scm_rights_DEPENDENCIES = libtests.a +seccomp_filter_SOURCES = seccomp-filter.c +seccomp_filter_OBJECTS = seccomp-filter.$(OBJEXT) +seccomp_filter_LDADD = $(LDADD) +seccomp_filter_DEPENDENCIES = libtests.a +seccomp_filter_v_SOURCES = seccomp-filter-v.c +seccomp_filter_v_OBJECTS = seccomp-filter-v.$(OBJEXT) +seccomp_filter_v_LDADD = $(LDADD) +seccomp_filter_v_DEPENDENCIES = libtests.a +seccomp_strict_SOURCES = seccomp-strict.c +seccomp_strict_OBJECTS = seccomp-strict.$(OBJEXT) +seccomp_strict_LDADD = $(LDADD) +seccomp_strict_DEPENDENCIES = libtests.a +select_SOURCES = select.c +select_OBJECTS = select.$(OBJEXT) +select_LDADD = $(LDADD) +select_DEPENDENCIES = libtests.a +semop_SOURCES = semop.c +semop_OBJECTS = semop.$(OBJEXT) +semop_LDADD = $(LDADD) +semop_DEPENDENCIES = libtests.a +sendfile_SOURCES = sendfile.c +sendfile_OBJECTS = sendfile.$(OBJEXT) +sendfile_LDADD = $(LDADD) +sendfile_DEPENDENCIES = libtests.a +sendfile64_SOURCES = sendfile64.c +sendfile64_OBJECTS = sendfile64.$(OBJEXT) +sendfile64_LDADD = $(LDADD) +sendfile64_DEPENDENCIES = libtests.a +set_mempolicy_SOURCES = set_mempolicy.c +set_mempolicy_OBJECTS = set_mempolicy.$(OBJEXT) +set_mempolicy_LDADD = $(LDADD) +set_mempolicy_DEPENDENCIES = libtests.a +set_ptracer_any_SOURCES = set_ptracer_any.c +set_ptracer_any_OBJECTS = set_ptracer_any.$(OBJEXT) +set_ptracer_any_LDADD = $(LDADD) +set_ptracer_any_DEPENDENCIES = libtests.a +setdomainname_SOURCES = setdomainname.c +setdomainname_OBJECTS = setdomainname.$(OBJEXT) +setdomainname_LDADD = $(LDADD) +setdomainname_DEPENDENCIES = libtests.a +setfsgid_SOURCES = setfsgid.c +setfsgid_OBJECTS = setfsgid.$(OBJEXT) +setfsgid_LDADD = $(LDADD) +setfsgid_DEPENDENCIES = libtests.a +setfsgid32_SOURCES = setfsgid32.c +setfsgid32_OBJECTS = setfsgid32.$(OBJEXT) +setfsgid32_LDADD = $(LDADD) +setfsgid32_DEPENDENCIES = libtests.a +setfsuid_SOURCES = setfsuid.c +setfsuid_OBJECTS = setfsuid.$(OBJEXT) +setfsuid_LDADD = $(LDADD) +setfsuid_DEPENDENCIES = libtests.a +setfsuid32_SOURCES = setfsuid32.c +setfsuid32_OBJECTS = setfsuid32.$(OBJEXT) +setfsuid32_LDADD = $(LDADD) +setfsuid32_DEPENDENCIES = libtests.a +setgid_SOURCES = setgid.c +setgid_OBJECTS = setgid.$(OBJEXT) +setgid_LDADD = $(LDADD) +setgid_DEPENDENCIES = libtests.a +setgid32_SOURCES = setgid32.c +setgid32_OBJECTS = setgid32.$(OBJEXT) +setgid32_LDADD = $(LDADD) +setgid32_DEPENDENCIES = libtests.a +setgroups_SOURCES = setgroups.c +setgroups_OBJECTS = setgroups.$(OBJEXT) +setgroups_LDADD = $(LDADD) +setgroups_DEPENDENCIES = libtests.a +setgroups32_SOURCES = setgroups32.c +setgroups32_OBJECTS = setgroups32.$(OBJEXT) +setgroups32_LDADD = $(LDADD) +setgroups32_DEPENDENCIES = libtests.a +sethostname_SOURCES = sethostname.c +sethostname_OBJECTS = sethostname.$(OBJEXT) +sethostname_LDADD = $(LDADD) +sethostname_DEPENDENCIES = libtests.a +setns_SOURCES = setns.c +setns_OBJECTS = setns.$(OBJEXT) +setns_LDADD = $(LDADD) +setns_DEPENDENCIES = libtests.a +setregid_SOURCES = setregid.c +setregid_OBJECTS = setregid.$(OBJEXT) +setregid_LDADD = $(LDADD) +setregid_DEPENDENCIES = libtests.a +setregid32_SOURCES = setregid32.c +setregid32_OBJECTS = setregid32.$(OBJEXT) +setregid32_LDADD = $(LDADD) +setregid32_DEPENDENCIES = libtests.a +setresgid_SOURCES = setresgid.c +setresgid_OBJECTS = setresgid.$(OBJEXT) +setresgid_LDADD = $(LDADD) +setresgid_DEPENDENCIES = libtests.a +setresgid32_SOURCES = setresgid32.c +setresgid32_OBJECTS = setresgid32.$(OBJEXT) +setresgid32_LDADD = $(LDADD) +setresgid32_DEPENDENCIES = libtests.a +setresuid_SOURCES = setresuid.c +setresuid_OBJECTS = setresuid.$(OBJEXT) +setresuid_LDADD = $(LDADD) +setresuid_DEPENDENCIES = libtests.a +setresuid32_SOURCES = setresuid32.c +setresuid32_OBJECTS = setresuid32.$(OBJEXT) +setresuid32_LDADD = $(LDADD) +setresuid32_DEPENDENCIES = libtests.a +setreuid_SOURCES = setreuid.c +setreuid_OBJECTS = setreuid.$(OBJEXT) +setreuid_LDADD = $(LDADD) +setreuid_DEPENDENCIES = libtests.a +setreuid32_SOURCES = setreuid32.c +setreuid32_OBJECTS = setreuid32.$(OBJEXT) +setreuid32_LDADD = $(LDADD) +setreuid32_DEPENDENCIES = libtests.a +setrlimit_SOURCES = setrlimit.c +setrlimit_OBJECTS = setrlimit.$(OBJEXT) +setrlimit_LDADD = $(LDADD) +setrlimit_DEPENDENCIES = libtests.a +setuid_SOURCES = setuid.c +setuid_OBJECTS = setuid.$(OBJEXT) +setuid_LDADD = $(LDADD) +setuid_DEPENDENCIES = libtests.a +setuid32_SOURCES = setuid32.c +setuid32_OBJECTS = setuid32.$(OBJEXT) +setuid32_LDADD = $(LDADD) +setuid32_DEPENDENCIES = libtests.a +shmxt_SOURCES = shmxt.c +shmxt_OBJECTS = shmxt.$(OBJEXT) +shmxt_LDADD = $(LDADD) +shmxt_DEPENDENCIES = libtests.a +shutdown_SOURCES = shutdown.c +shutdown_OBJECTS = shutdown.$(OBJEXT) +shutdown_LDADD = $(LDADD) +shutdown_DEPENDENCIES = libtests.a +sigaction_SOURCES = sigaction.c +sigaction_OBJECTS = sigaction.$(OBJEXT) +sigaction_LDADD = $(LDADD) +sigaction_DEPENDENCIES = libtests.a +sigaltstack_SOURCES = sigaltstack.c +sigaltstack_OBJECTS = sigaltstack.$(OBJEXT) +sigaltstack_LDADD = $(LDADD) +sigaltstack_DEPENDENCIES = libtests.a +siginfo_SOURCES = siginfo.c +siginfo_OBJECTS = siginfo.$(OBJEXT) +siginfo_LDADD = $(LDADD) +siginfo_DEPENDENCIES = libtests.a +signal_receive_SOURCES = signal_receive.c +signal_receive_OBJECTS = signal_receive.$(OBJEXT) +signal_receive_LDADD = $(LDADD) +signal_receive_DEPENDENCIES = libtests.a +signalfd4_SOURCES = signalfd4.c +signalfd4_OBJECTS = signalfd4.$(OBJEXT) +signalfd4_LDADD = $(LDADD) +signalfd4_DEPENDENCIES = libtests.a +sigreturn_SOURCES = sigreturn.c +sigreturn_OBJECTS = sigreturn.$(OBJEXT) +sigreturn_LDADD = $(LDADD) +sigreturn_DEPENDENCIES = libtests.a +sleep_SOURCES = sleep.c +sleep_OBJECTS = sleep.$(OBJEXT) +sleep_LDADD = $(LDADD) +sleep_DEPENDENCIES = libtests.a +socketcall_SOURCES = socketcall.c +socketcall_OBJECTS = socketcall.$(OBJEXT) +socketcall_LDADD = $(LDADD) +socketcall_DEPENDENCIES = libtests.a +splice_SOURCES = splice.c +splice_OBJECTS = splice.$(OBJEXT) +splice_LDADD = $(LDADD) +splice_DEPENDENCIES = libtests.a +am_stack_fcall_OBJECTS = stack-fcall.$(OBJEXT) stack-fcall-0.$(OBJEXT) \ + stack-fcall-1.$(OBJEXT) stack-fcall-2.$(OBJEXT) \ + stack-fcall-3.$(OBJEXT) +stack_fcall_OBJECTS = $(am_stack_fcall_OBJECTS) +stack_fcall_LDADD = $(LDADD) +stack_fcall_DEPENDENCIES = libtests.a +stat_SOURCES = stat.c +stat_OBJECTS = stat.$(OBJEXT) +stat_LDADD = $(LDADD) +stat_DEPENDENCIES = libtests.a +stat64_SOURCES = stat64.c +stat64_OBJECTS = stat64-stat64.$(OBJEXT) +stat64_LDADD = $(LDADD) +stat64_DEPENDENCIES = libtests.a +statfs_SOURCES = statfs.c +statfs_OBJECTS = statfs-statfs.$(OBJEXT) +statfs_LDADD = $(LDADD) +statfs_DEPENDENCIES = libtests.a +statfs64_SOURCES = statfs64.c +statfs64_OBJECTS = statfs64.$(OBJEXT) +statfs64_LDADD = $(LDADD) +statfs64_DEPENDENCIES = libtests.a +swap_SOURCES = swap.c +swap_OBJECTS = swap.$(OBJEXT) +swap_LDADD = $(LDADD) +swap_DEPENDENCIES = libtests.a +symlink_SOURCES = symlink.c +symlink_OBJECTS = symlink.$(OBJEXT) +symlink_LDADD = $(LDADD) +symlink_DEPENDENCIES = libtests.a +symlinkat_SOURCES = symlinkat.c +symlinkat_OBJECTS = symlinkat.$(OBJEXT) +symlinkat_LDADD = $(LDADD) +symlinkat_DEPENDENCIES = libtests.a +sync_SOURCES = sync.c +sync_OBJECTS = sync.$(OBJEXT) +sync_LDADD = $(LDADD) +sync_DEPENDENCIES = libtests.a +sync_file_range_SOURCES = sync_file_range.c +sync_file_range_OBJECTS = sync_file_range.$(OBJEXT) +sync_file_range_LDADD = $(LDADD) +sync_file_range_DEPENDENCIES = libtests.a +sync_file_range2_SOURCES = sync_file_range2.c +sync_file_range2_OBJECTS = sync_file_range2.$(OBJEXT) +sync_file_range2_LDADD = $(LDADD) +sync_file_range2_DEPENDENCIES = libtests.a +sysinfo_SOURCES = sysinfo.c +sysinfo_OBJECTS = sysinfo.$(OBJEXT) +sysinfo_LDADD = $(LDADD) +sysinfo_DEPENDENCIES = libtests.a +syslog_SOURCES = syslog.c +syslog_OBJECTS = syslog.$(OBJEXT) +syslog_LDADD = $(LDADD) +syslog_DEPENDENCIES = libtests.a +tee_SOURCES = tee.c +tee_OBJECTS = tee.$(OBJEXT) +tee_LDADD = $(LDADD) +tee_DEPENDENCIES = libtests.a +threads_execve_SOURCES = threads-execve.c +threads_execve_OBJECTS = threads-execve.$(OBJEXT) +threads_execve_DEPENDENCIES = $(LDADD) +time_SOURCES = time.c +time_OBJECTS = time.$(OBJEXT) +time_LDADD = $(LDADD) +time_DEPENDENCIES = libtests.a +timer_create_SOURCES = timer_create.c +timer_create_OBJECTS = timer_create.$(OBJEXT) +timer_create_LDADD = $(LDADD) +timer_create_DEPENDENCIES = libtests.a +timer_xettime_SOURCES = timer_xettime.c +timer_xettime_OBJECTS = timer_xettime.$(OBJEXT) +timer_xettime_LDADD = $(LDADD) +timer_xettime_DEPENDENCIES = libtests.a +timerfd_xettime_SOURCES = timerfd_xettime.c +timerfd_xettime_OBJECTS = timerfd_xettime.$(OBJEXT) +timerfd_xettime_LDADD = $(LDADD) +timerfd_xettime_DEPENDENCIES = libtests.a +times_SOURCES = times.c +times_OBJECTS = times.$(OBJEXT) +times_DEPENDENCIES = $(LDADD) +times_fail_SOURCES = times-fail.c +times_fail_OBJECTS = times-fail.$(OBJEXT) +times_fail_LDADD = $(LDADD) +times_fail_DEPENDENCIES = libtests.a +truncate_SOURCES = truncate.c +truncate_OBJECTS = truncate.$(OBJEXT) +truncate_LDADD = $(LDADD) +truncate_DEPENDENCIES = libtests.a +truncate64_SOURCES = truncate64.c +truncate64_OBJECTS = truncate64-truncate64.$(OBJEXT) +truncate64_LDADD = $(LDADD) +truncate64_DEPENDENCIES = libtests.a +ugetrlimit_SOURCES = ugetrlimit.c +ugetrlimit_OBJECTS = ugetrlimit.$(OBJEXT) +ugetrlimit_LDADD = $(LDADD) +ugetrlimit_DEPENDENCIES = libtests.a +uio_SOURCES = uio.c +uio_OBJECTS = uio-uio.$(OBJEXT) +uio_LDADD = $(LDADD) +uio_DEPENDENCIES = libtests.a +umask_SOURCES = umask.c +umask_OBJECTS = umask.$(OBJEXT) +umask_LDADD = $(LDADD) +umask_DEPENDENCIES = libtests.a +umount_SOURCES = umount.c +umount_OBJECTS = umount.$(OBJEXT) +umount_LDADD = $(LDADD) +umount_DEPENDENCIES = libtests.a +umount2_SOURCES = umount2.c +umount2_OBJECTS = umount2.$(OBJEXT) +umount2_LDADD = $(LDADD) +umount2_DEPENDENCIES = libtests.a +umoven_illptr_SOURCES = umoven-illptr.c +umoven_illptr_OBJECTS = umoven-illptr.$(OBJEXT) +umoven_illptr_LDADD = $(LDADD) +umoven_illptr_DEPENDENCIES = libtests.a +umovestr_SOURCES = umovestr.c +umovestr_OBJECTS = umovestr.$(OBJEXT) +umovestr_LDADD = $(LDADD) +umovestr_DEPENDENCIES = libtests.a +umovestr_illptr_SOURCES = umovestr-illptr.c +umovestr_illptr_OBJECTS = umovestr-illptr.$(OBJEXT) +umovestr_illptr_LDADD = $(LDADD) +umovestr_illptr_DEPENDENCIES = libtests.a +umovestr2_SOURCES = umovestr2.c +umovestr2_OBJECTS = umovestr2.$(OBJEXT) +umovestr2_LDADD = $(LDADD) +umovestr2_DEPENDENCIES = libtests.a +umovestr3_SOURCES = umovestr3.c +umovestr3_OBJECTS = umovestr3.$(OBJEXT) +umovestr3_LDADD = $(LDADD) +umovestr3_DEPENDENCIES = libtests.a +uname_SOURCES = uname.c +uname_OBJECTS = uname.$(OBJEXT) +uname_LDADD = $(LDADD) +uname_DEPENDENCIES = libtests.a +unix_pair_send_recv_SOURCES = unix-pair-send-recv.c +unix_pair_send_recv_OBJECTS = unix-pair-send-recv.$(OBJEXT) +unix_pair_send_recv_LDADD = $(LDADD) +unix_pair_send_recv_DEPENDENCIES = libtests.a +unix_pair_sendto_recvfrom_SOURCES = unix-pair-sendto-recvfrom.c +unix_pair_sendto_recvfrom_OBJECTS = \ + unix-pair-sendto-recvfrom.$(OBJEXT) +unix_pair_sendto_recvfrom_LDADD = $(LDADD) +unix_pair_sendto_recvfrom_DEPENDENCIES = libtests.a +unlink_SOURCES = unlink.c +unlink_OBJECTS = unlink.$(OBJEXT) +unlink_LDADD = $(LDADD) +unlink_DEPENDENCIES = libtests.a +unlinkat_SOURCES = unlinkat.c +unlinkat_OBJECTS = unlinkat.$(OBJEXT) +unlinkat_LDADD = $(LDADD) +unlinkat_DEPENDENCIES = libtests.a +unshare_SOURCES = unshare.c +unshare_OBJECTS = unshare.$(OBJEXT) +unshare_LDADD = $(LDADD) +unshare_DEPENDENCIES = libtests.a +userfaultfd_SOURCES = userfaultfd.c +userfaultfd_OBJECTS = userfaultfd.$(OBJEXT) +userfaultfd_LDADD = $(LDADD) +userfaultfd_DEPENDENCIES = libtests.a +ustat_SOURCES = ustat.c +ustat_OBJECTS = ustat.$(OBJEXT) +ustat_LDADD = $(LDADD) +ustat_DEPENDENCIES = libtests.a +utime_SOURCES = utime.c +utime_OBJECTS = utime.$(OBJEXT) +utime_LDADD = $(LDADD) +utime_DEPENDENCIES = libtests.a +utimensat_SOURCES = utimensat.c +utimensat_OBJECTS = utimensat.$(OBJEXT) +utimensat_LDADD = $(LDADD) +utimensat_DEPENDENCIES = libtests.a +utimes_SOURCES = utimes.c +utimes_OBJECTS = utimes.$(OBJEXT) +utimes_LDADD = $(LDADD) +utimes_DEPENDENCIES = libtests.a +vfork_f_SOURCES = vfork-f.c +vfork_f_OBJECTS = vfork-f.$(OBJEXT) +vfork_f_LDADD = $(LDADD) +vfork_f_DEPENDENCIES = libtests.a +vhangup_SOURCES = vhangup.c +vhangup_OBJECTS = vhangup.$(OBJEXT) +vhangup_LDADD = $(LDADD) +vhangup_DEPENDENCIES = libtests.a +vmsplice_SOURCES = vmsplice.c +vmsplice_OBJECTS = vmsplice.$(OBJEXT) +vmsplice_LDADD = $(LDADD) +vmsplice_DEPENDENCIES = libtests.a +wait4_SOURCES = wait4.c +wait4_OBJECTS = wait4.$(OBJEXT) +wait4_LDADD = $(LDADD) +wait4_DEPENDENCIES = libtests.a +wait4_v_SOURCES = wait4-v.c +wait4_v_OBJECTS = wait4-v.$(OBJEXT) +wait4_v_LDADD = $(LDADD) +wait4_v_DEPENDENCIES = libtests.a +waitid_SOURCES = waitid.c +waitid_OBJECTS = waitid.$(OBJEXT) +waitid_LDADD = $(LDADD) +waitid_DEPENDENCIES = libtests.a +waitid_v_SOURCES = waitid-v.c +waitid_v_OBJECTS = waitid-v.$(OBJEXT) +waitid_v_LDADD = $(LDADD) +waitid_v_DEPENDENCIES = libtests.a +waitpid_SOURCES = waitpid.c +waitpid_OBJECTS = waitpid.$(OBJEXT) +waitpid_LDADD = $(LDADD) +waitpid_DEPENDENCIES = libtests.a +xattr_SOURCES = xattr.c +xattr_OBJECTS = xattr.$(OBJEXT) +xattr_LDADD = $(LDADD) +xattr_DEPENDENCIES = libtests.a +xattr_strings_SOURCES = xattr-strings.c +xattr_strings_OBJECTS = xattr-strings.$(OBJEXT) +xattr_strings_LDADD = $(LDADD) +xattr_strings_DEPENDENCIES = libtests.a +xet_robust_list_SOURCES = xet_robust_list.c +xet_robust_list_OBJECTS = xet_robust_list.$(OBJEXT) +xet_robust_list_LDADD = $(LDADD) +xet_robust_list_DEPENDENCIES = libtests.a +xetitimer_SOURCES = xetitimer.c +xetitimer_OBJECTS = xetitimer.$(OBJEXT) +xetitimer_LDADD = $(LDADD) +xetitimer_DEPENDENCIES = libtests.a +xetpgid_SOURCES = xetpgid.c +xetpgid_OBJECTS = xetpgid.$(OBJEXT) +xetpgid_LDADD = $(LDADD) +xetpgid_DEPENDENCIES = libtests.a +xetpriority_SOURCES = xetpriority.c +xetpriority_OBJECTS = xetpriority.$(OBJEXT) +xetpriority_LDADD = $(LDADD) +xetpriority_DEPENDENCIES = libtests.a +xettimeofday_SOURCES = xettimeofday.c +xettimeofday_OBJECTS = xettimeofday.$(OBJEXT) +xettimeofday_LDADD = $(LDADD) +xettimeofday_DEPENDENCIES = libtests.a +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libtests_a_SOURCES) _newselect.c accept.c accept4.c \ + access.c acct.c add_key.c adjtimex.c aio.c alarm.c answer.c \ + attach-f-p.c attach-f-p-cmd.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c caps-abbrev.c \ + chmod.c chown.c chown32.c chroot.c clock_adjtime.c \ + clock_nanosleep.c clock_xettime.c copy_file_range.c count-f.c \ + creat.c delete_module.c dup.c dup2.c dup3.c epoll_create.c \ + epoll_create1.c epoll_ctl.c epoll_pwait.c epoll_wait.c \ + erestartsys.c eventfd.c execve.c execve-v.c execveat.c \ + execveat-v.c faccessat.c fadvise64.c fadvise64_64.c \ + fallocate.c fanotify_init.c fanotify_mark.c fchdir.c fchmod.c \ + fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c fcntl64.c \ + fdatasync.c file_handle.c file_ioctl.c filter-unavailable.c \ + finit_module.c flock.c fork-f.c fstat.c fstat64.c fstatat64.c \ + fstatfs.c fstatfs64.c fsync.c ftruncate.c ftruncate64.c \ + futex.c futimesat.c get_mempolicy.c getcpu.c getcwd.c \ + getdents.c getdents64.c getegid.c getegid32.c geteuid.c \ + geteuid32.c getgid.c getgid32.c getgroups.c getgroups32.c \ + getpeername.c getpgrp.c getrandom.c getresgid.c getresgid32.c \ + getresuid.c getresuid32.c getrlimit.c getrusage.c getsid.c \ + getsockname.c getuid.c getuid32.c getxxid.c inet-cmsg.c \ + init_module.c inotify.c inotify_init1.c ioctl.c ioctl_block.c \ + ioctl_dm.c ioctl_dm-v.c ioctl_evdev.c ioctl_evdev-v.c \ + ioctl_loop.c ioctl_loop-nv.c ioctl_loop-v.c ioctl_mtd.c \ + ioctl_rtc.c ioctl_rtc-v.c ioctl_scsi.c ioctl_sg_io_v3.c \ + ioctl_sg_io_v4.c ioctl_sock_gifconf.c ioctl_uffdio.c \ + ioctl_v4l2.c ioperm.c iopl.c ioprio.c ip_mreq.c ipc.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kcmp.c \ + kexec_file_load.c kexec_load.c keyctl.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lookup_dcookie.c \ + lseek.c lstat.c lstat64.c mbind.c membarrier.c memfd_create.c \ + migrate_pages.c mincore.c mkdir.c mkdirat.c mknod.c mknodat.c \ + mlock.c mlock2.c mlockall.c mmap.c mmap64.c mmsg.c \ + mmsg-silent.c mmsg_name.c mmsg_name-v.c mount.c move_pages.c \ + mq.c mq_sendrecv.c mq_sendrecv-read.c mq_sendrecv-write.c \ + msg_control.c msg_control-v.c msg_name.c munlockall.c \ + nanosleep.c net-accept-connect.c net-icmp_filter.c \ + net-sockaddr.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_protocol.c netlink_unix_diag.c newfstatat.c \ + nsyscalls.c old_mmap.c oldfstat.c oldlstat.c oldselect.c \ + oldstat.c open.c openat.c pause.c pc.c perf_event_open.c \ + perf_event_open_nonverbose.c perf_event_open_unabbrev.c \ + personality.c pipe.c pipe2.c pkey_alloc.c pkey_free.c \ + pkey_mprotect.c poll.c ppoll.c prctl-arg2-intptr.c \ + prctl-dumpable.c prctl-name.c prctl-no-args.c \ + prctl-pdeathsig.c prctl-seccomp-filter-v.c \ + prctl-seccomp-strict.c prctl-securebits.c prctl-tid_address.c \ + prctl-tsc.c pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c print_maxfd.c printstr.c prlimit64.c \ + process_vm_readv.c process_vm_writev.c pselect6.c ptrace.c \ + pwritev.c qual_fault.c qual_inject-error-signal.c \ + qual_inject-retval.c qual_inject-signal.c qual_signal.c \ + quotactl.c quotactl-v.c quotactl-xfs.c quotactl-xfs-v.c \ + read-write.c readahead.c readdir.c readlink.c readlinkat.c \ + readv.c reboot.c recvfrom.c recvmmsg-timeout.c recvmsg.c \ + redirect-fds.c remap_file_pages.c rename.c renameat.c \ + renameat2.c request_key.c restart_syscall.c rmdir.c \ + rt_sigpending.c rt_sigprocmask.c rt_sigqueueinfo.c \ + rt_sigsuspend.c rt_sigtimedwait.c rt_tgsigqueueinfo.c \ + sched_get_priority_mxx.c sched_rr_get_interval.c \ + sched_xetaffinity.c sched_xetattr.c sched_xetparam.c \ + sched_xetscheduler.c sched_yield.c scm_rights.c \ + seccomp-filter.c seccomp-filter-v.c seccomp-strict.c select.c \ + semop.c sendfile.c sendfile64.c set_mempolicy.c \ + set_ptracer_any.c setdomainname.c setfsgid.c setfsgid32.c \ + setfsuid.c setfsuid32.c setgid.c setgid32.c setgroups.c \ + setgroups32.c sethostname.c setns.c setregid.c setregid32.c \ + setresgid.c setresgid32.c setresuid.c setresuid32.c setreuid.c \ + setreuid32.c setrlimit.c setuid.c setuid32.c shmxt.c \ + shutdown.c sigaction.c sigaltstack.c siginfo.c \ + signal_receive.c signalfd4.c sigreturn.c sleep.c socketcall.c \ + splice.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ + statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + threads-execve.c time.c timer_create.c timer_xettime.c \ + timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ + ugetrlimit.c uio.c umask.c umount.c umount2.c umoven-illptr.c \ + umovestr.c umovestr-illptr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unix-pair-sendto-recvfrom.c unlink.c \ + unlinkat.c unshare.c userfaultfd.c ustat.c utime.c utimensat.c \ + utimes.c vfork-f.c vhangup.c vmsplice.c wait4.c wait4-v.c \ + waitid.c waitid-v.c waitpid.c xattr.c xattr-strings.c \ + xet_robust_list.c xetitimer.c xetpgid.c xetpriority.c \ + xettimeofday.c +DIST_SOURCES = $(libtests_a_SOURCES) _newselect.c accept.c accept4.c \ + access.c acct.c add_key.c adjtimex.c aio.c alarm.c answer.c \ + attach-f-p.c attach-f-p-cmd.c attach-p-cmd-cmd.c \ + attach-p-cmd-p.c bpf.c brk.c btrfs.c caps.c caps-abbrev.c \ + chmod.c chown.c chown32.c chroot.c clock_adjtime.c \ + clock_nanosleep.c clock_xettime.c copy_file_range.c count-f.c \ + creat.c delete_module.c dup.c dup2.c dup3.c epoll_create.c \ + epoll_create1.c epoll_ctl.c epoll_pwait.c epoll_wait.c \ + erestartsys.c eventfd.c execve.c execve-v.c execveat.c \ + execveat-v.c faccessat.c fadvise64.c fadvise64_64.c \ + fallocate.c fanotify_init.c fanotify_mark.c fchdir.c fchmod.c \ + fchmodat.c fchown.c fchown32.c fchownat.c fcntl.c fcntl64.c \ + fdatasync.c file_handle.c file_ioctl.c filter-unavailable.c \ + finit_module.c flock.c fork-f.c fstat.c fstat64.c fstatat64.c \ + fstatfs.c fstatfs64.c fsync.c ftruncate.c ftruncate64.c \ + futex.c futimesat.c get_mempolicy.c getcpu.c getcwd.c \ + getdents.c getdents64.c getegid.c getegid32.c geteuid.c \ + geteuid32.c getgid.c getgid32.c getgroups.c getgroups32.c \ + getpeername.c getpgrp.c getrandom.c getresgid.c getresgid32.c \ + getresuid.c getresuid32.c getrlimit.c getrusage.c getsid.c \ + getsockname.c getuid.c getuid32.c getxxid.c inet-cmsg.c \ + init_module.c inotify.c inotify_init1.c ioctl.c ioctl_block.c \ + ioctl_dm.c ioctl_dm-v.c ioctl_evdev.c ioctl_evdev-v.c \ + ioctl_loop.c ioctl_loop-nv.c ioctl_loop-v.c ioctl_mtd.c \ + ioctl_rtc.c ioctl_rtc-v.c ioctl_scsi.c ioctl_sg_io_v3.c \ + ioctl_sg_io_v4.c ioctl_sock_gifconf.c ioctl_uffdio.c \ + ioctl_v4l2.c ioperm.c iopl.c ioprio.c ip_mreq.c ipc.c \ + ipc_msg.c ipc_msgbuf.c ipc_sem.c ipc_shm.c kcmp.c \ + kexec_file_load.c kexec_load.c keyctl.c kill.c ksysent.c \ + lchown.c lchown32.c link.c linkat.c llseek.c lookup_dcookie.c \ + lseek.c lstat.c lstat64.c mbind.c membarrier.c memfd_create.c \ + migrate_pages.c mincore.c mkdir.c mkdirat.c mknod.c mknodat.c \ + mlock.c mlock2.c mlockall.c mmap.c mmap64.c mmsg.c \ + mmsg-silent.c mmsg_name.c mmsg_name-v.c mount.c move_pages.c \ + mq.c mq_sendrecv.c mq_sendrecv-read.c mq_sendrecv-write.c \ + msg_control.c msg_control-v.c msg_name.c munlockall.c \ + nanosleep.c net-accept-connect.c net-icmp_filter.c \ + net-sockaddr.c net-y-unix.c net-yy-inet.c net-yy-netlink.c \ + net-yy-unix.c netlink_inet_diag.c netlink_netlink_diag.c \ + netlink_protocol.c netlink_unix_diag.c newfstatat.c \ + nsyscalls.c old_mmap.c oldfstat.c oldlstat.c oldselect.c \ + oldstat.c open.c openat.c pause.c pc.c perf_event_open.c \ + perf_event_open_nonverbose.c perf_event_open_unabbrev.c \ + personality.c pipe.c pipe2.c pkey_alloc.c pkey_free.c \ + pkey_mprotect.c poll.c ppoll.c prctl-arg2-intptr.c \ + prctl-dumpable.c prctl-name.c prctl-no-args.c \ + prctl-pdeathsig.c prctl-seccomp-filter-v.c \ + prctl-seccomp-strict.c prctl-securebits.c prctl-tid_address.c \ + prctl-tsc.c pread64-pwrite64.c preadv.c preadv-pwritev.c \ + preadv2-pwritev2.c print_maxfd.c printstr.c prlimit64.c \ + process_vm_readv.c process_vm_writev.c pselect6.c ptrace.c \ + pwritev.c qual_fault.c qual_inject-error-signal.c \ + qual_inject-retval.c qual_inject-signal.c qual_signal.c \ + quotactl.c quotactl-v.c quotactl-xfs.c quotactl-xfs-v.c \ + read-write.c readahead.c readdir.c readlink.c readlinkat.c \ + readv.c reboot.c recvfrom.c recvmmsg-timeout.c recvmsg.c \ + redirect-fds.c remap_file_pages.c rename.c renameat.c \ + renameat2.c request_key.c restart_syscall.c rmdir.c \ + rt_sigpending.c rt_sigprocmask.c rt_sigqueueinfo.c \ + rt_sigsuspend.c rt_sigtimedwait.c rt_tgsigqueueinfo.c \ + sched_get_priority_mxx.c sched_rr_get_interval.c \ + sched_xetaffinity.c sched_xetattr.c sched_xetparam.c \ + sched_xetscheduler.c sched_yield.c scm_rights.c \ + seccomp-filter.c seccomp-filter-v.c seccomp-strict.c select.c \ + semop.c sendfile.c sendfile64.c set_mempolicy.c \ + set_ptracer_any.c setdomainname.c setfsgid.c setfsgid32.c \ + setfsuid.c setfsuid32.c setgid.c setgid32.c setgroups.c \ + setgroups32.c sethostname.c setns.c setregid.c setregid32.c \ + setresgid.c setresgid32.c setresuid.c setresuid32.c setreuid.c \ + setreuid32.c setrlimit.c setuid.c setuid32.c shmxt.c \ + shutdown.c sigaction.c sigaltstack.c siginfo.c \ + signal_receive.c signalfd4.c sigreturn.c sleep.c socketcall.c \ + splice.c $(stack_fcall_SOURCES) stat.c stat64.c statfs.c \ + statfs64.c swap.c symlink.c symlinkat.c sync.c \ + sync_file_range.c sync_file_range2.c sysinfo.c syslog.c tee.c \ + threads-execve.c time.c timer_create.c timer_xettime.c \ + timerfd_xettime.c times.c times-fail.c truncate.c truncate64.c \ + ugetrlimit.c uio.c umask.c umount.c umount2.c umoven-illptr.c \ + umovestr.c umovestr-illptr.c umovestr2.c umovestr3.c uname.c \ + unix-pair-send-recv.c unix-pair-sendto-recvfrom.c unlink.c \ + unlinkat.c unshare.c userfaultfd.c ustat.c utime.c utimensat.c \ + utimes.c vfork-f.c vhangup.c vmsplice.c wait4.c wait4-v.c \ + waitid.c waitid-v.c waitpid.c xattr.c xattr-strings.c \ + xet_robust_list.c xetitimer.c xetpgid.c xetpriority.c \ + xettimeofday.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__extra_recursive_targets = check-valgrind-recursive +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +@USE_LIBUNWIND_TRUE@am__EXEEXT_1 = strace-k.test +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_CPPFLAGS = @CODE_COVERAGE_CPPFLAGS@ +CODE_COVERAGE_CXXFLAGS = @CODE_COVERAGE_CXXFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CYGPATH_W = @CYGPATH_W@ +DEB_CHANGELOGTIME = @DEB_CHANGELOGTIME@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ +ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ +ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ +ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ +EXEEXT = @EXEEXT@ +GCOV = @GCOV@ +GENHTML = @GENHTML@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LCOV = @LCOV@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MIPS_ABI = @MIPS_ABI@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +RANLIB = @RANLIB@ +RPM_CHANGELOGTIME = @RPM_CHANGELOGTIME@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VALGRIND = @VALGRIND@ +VALGRIND_ENABLED = @VALGRIND_ENABLED@ +VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +arch = @arch@ +arch_m32 = @arch_m32@ +arch_mx32 = @arch_mx32@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +dl_LIBS = @dl_LIBS@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libunwind_CPPFLAGS = @libunwind_CPPFLAGS@ +libunwind_LDFLAGS = @libunwind_LDFLAGS@ +libunwind_LIBS = @libunwind_LIBS@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +valgrind_enabled_tools = @valgrind_enabled_tools@ +valgrind_tools = @valgrind_tools@ +OS = linux +ARCH = @arch@ +MPERS_NAME = +ARCH_MFLAGS = +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = $(ARCH_MFLAGS) \ + -I$(builddir) \ + -I$(top_builddir)/$(OS)/$(ARCH) \ + -I$(top_srcdir)/$(OS)/$(ARCH) \ + -I$(top_builddir)/$(OS) \ + -I$(top_srcdir)/$(OS) \ + -I$(top_builddir) \ + -I$(top_srcdir) + +AM_LDFLAGS = $(ARCH_MFLAGS) +libtests_a_SOURCES = \ + errno2name.c \ + error_msg.c \ + fill_memory.c \ + get_page_size.c \ + hexdump_strdup.c \ + hexquote_strndup.c \ + inode_of_sockfd.c \ + libmmsg.c \ + libsocketcall.c \ + overflowuid.c \ + pipe_maxfd.c \ + print_quoted_string.c \ + printflags.c \ + printxval.c \ + signal2name.c \ + sprintrc.c \ + tail_alloc.c \ + tests.h \ + tprintf.c \ + # end of libtests_a_SOURCES + +libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +check_LIBRARIES = libtests.a +LDADD = libtests.a +attach_f_p_LDADD = -lrt -lpthread $(LDADD) +clock_xettime_LDADD = -lrt $(LDADD) +count_f_LDADD = -lpthread $(LDADD) +filter_unavailable_LDADD = -lpthread $(LDADD) +fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +mq_LDADD = -lrt $(LDADD) +mq_sendrecv_LDADD = -lrt $(LDADD) +mq_sendrecv_read_LDADD = -lrt $(LDADD) +mq_sendrecv_write_LDADD = -lrt $(LDADD) +newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pc_LDADD = $(dl_LIBS) $(LDADD) +pread64_pwrite64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +preadv_pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +pwritev_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +threads_execve_LDADD = -lrt -lpthread $(LDADD) +times_LDADD = -lrt $(LDADD) +truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 +stack_fcall_SOURCES = stack-fcall.c \ + stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c + +@USE_LIBUNWIND_FALSE@LIBUNWIND_TESTS = +@USE_LIBUNWIND_TRUE@LIBUNWIND_TESTS = strace-k.test +DECODER_TESTS = \ + _newselect.test \ + accept.test \ + accept4.test \ + access.test \ + acct.test \ + add_key.test \ + adjtimex.test \ + aio.test \ + alarm.test \ + bpf.test \ + brk.test \ + btrfs-v.test \ + btrfs-vw.test \ + btrfs-w.test \ + btrfs.test \ + caps-abbrev.test \ + caps.test \ + chmod.test \ + chown.test \ + chown32.test \ + chroot.test \ + clock_adjtime.test \ + clock_nanosleep.test \ + clock_xettime.test \ + copy_file_range.test \ + creat.test \ + delete_module.test \ + dup.test \ + dup2.test \ + dup3.test \ + epoll_create.test \ + epoll_create1.test \ + epoll_ctl.test \ + epoll_pwait.test \ + epoll_wait.test \ + erestartsys.test \ + eventfd.test \ + execve-v.test \ + execve.test \ + execveat-v.test \ + execveat.test \ + faccessat.test \ + fadvise64.test \ + fadvise64_64.test \ + fallocate.test \ + fanotify_init.test \ + fanotify_mark.test \ + fchdir.test \ + fchmod.test \ + fchmodat.test \ + fchown.test \ + fchown32.test \ + fchownat.test \ + fcntl.test \ + fcntl64.test \ + fdatasync.test \ + file_handle.test \ + file_ioctl.test \ + finit_module.test \ + flock.test \ + fstat.test \ + fstat64.test \ + fstatat64.test \ + fstatfs.test \ + fstatfs64.test \ + fsync.test \ + ftruncate.test \ + ftruncate64.test \ + futex.test \ + futimesat.test \ + get_mempolicy.test \ + getcpu.test \ + getcwd.test \ + getdents.test \ + getdents64.test \ + getegid.test \ + getegid32.test \ + geteuid.test \ + geteuid32.test \ + getgid.test \ + getgid32.test \ + getgroups.test \ + getgroups32.test \ + getpeername.test \ + getpgrp.test \ + getrandom.test \ + getresgid.test \ + getresgid32.test \ + getresuid.test \ + getresuid32.test \ + getrlimit.test \ + getrusage.test \ + getsid.test \ + getsockname.test \ + getuid.test \ + getuid32.test \ + getxxid.test \ + inet-cmsg.test \ + init_module.test \ + inotify.test \ + inotify_init1.test \ + ioctl.test \ + ioctl_block.test \ + ioctl_dm-v.test \ + ioctl_dm.test \ + ioctl_evdev-v.test \ + ioctl_evdev.test \ + ioctl_loop-nv.test \ + ioctl_loop-v.test \ + ioctl_loop.test \ + ioctl_mtd.test \ + ioctl_rtc-v.test \ + ioctl_rtc.test \ + ioctl_scsi.test \ + ioctl_sg_io_v3.test \ + ioctl_sg_io_v4.test \ + ioctl_sock_gifconf.test \ + ioctl_uffdio.test \ + ioctl_v4l2.test \ + ioperm.test \ + iopl.test \ + ioprio.test \ + ip_mreq.test \ + ipc.test \ + ipc_msg.test \ + ipc_msgbuf.test \ + ipc_sem.test \ + ipc_shm.test \ + kcmp.test \ + kexec_file_load.test \ + kexec_load.test \ + keyctl.test \ + kill.test \ + lchown.test \ + lchown32.test \ + link.test \ + linkat.test \ + llseek.test \ + lookup_dcookie.test \ + lseek.test \ + lstat.test \ + lstat64.test \ + mbind.test \ + membarrier.test \ + memfd_create.test \ + migrate_pages.test \ + mincore.test \ + mkdir.test \ + mkdirat.test \ + mknod.test \ + mknodat.test \ + mlock.test \ + mlock2.test \ + mlockall.test \ + mmap.test \ + mmap64.test \ + mmsg-silent.test \ + mmsg.test \ + mmsg_name-v.test \ + mmsg_name.test \ + mount.test \ + move_pages.test \ + mq.test \ + mq_sendrecv-read.test \ + mq_sendrecv-write.test \ + mq_sendrecv.test \ + msg_control-v.test \ + msg_control.test \ + msg_name.test \ + munlockall.test \ + nanosleep.test \ + net-icmp_filter.test \ + net-sockaddr.test \ + net-y-unix.test \ + net-yy-inet.test \ + net-yy-netlink.test \ + net-yy-unix.test \ + net.test \ + netlink_protocol.test \ + newfstatat.test \ + nsyscalls.test \ + old_mmap.test \ + oldfstat.test \ + oldlstat.test \ + oldselect.test \ + oldstat.test \ + open.test \ + openat.test \ + pause.test \ + perf_event_open.test \ + perf_event_open_nonverbose.test \ + perf_event_open_unabbrev.test \ + personality.test \ + pipe.test \ + pipe2.test \ + pkey_alloc.test \ + pkey_free.test \ + pkey_mprotect.test \ + poll.test \ + ppoll.test \ + prctl-arg2-intptr.test \ + prctl-dumpable.test \ + prctl-name.test \ + prctl-no-args.test \ + prctl-pdeathsig.test \ + prctl-seccomp-filter-v.test \ + prctl-seccomp-strict.test \ + prctl-securebits.test \ + prctl-tid_address.test \ + prctl-tsc.test \ + pread64-pwrite64.test \ + preadv-pwritev.test \ + preadv.test \ + preadv2-pwritev2.test \ + printstr.test \ + prlimit64.test \ + process_vm_readv.test \ + process_vm_writev.test \ + pselect6.test \ + ptrace.test \ + pwritev.test \ + qual_fault-exit_group.test \ + quotactl-v.test \ + quotactl-xfs-v.test \ + quotactl-xfs.test \ + quotactl.test \ + read-write.test \ + readahead.test \ + readdir.test \ + readlink.test \ + readlinkat.test \ + readv.test \ + reboot.test \ + recvfrom.test \ + recvmmsg-timeout.test \ + recvmsg.test \ + remap_file_pages.test \ + rename.test \ + renameat.test \ + renameat2.test \ + request_key.test \ + rmdir.test \ + rt_sigpending.test \ + rt_sigprocmask.test \ + rt_sigqueueinfo.test \ + rt_sigsuspend.test \ + rt_sigtimedwait.test \ + rt_tgsigqueueinfo.test \ + sched_get_priority_mxx.test \ + sched_rr_get_interval.test \ + sched_xetaffinity.test \ + sched_xetattr.test \ + sched_xetparam.test \ + sched_xetscheduler.test \ + sched_yield.test \ + scm_rights-fd.test \ + seccomp-filter-v.test \ + seccomp-filter.test \ + seccomp-strict.test \ + select.test \ + semop.test \ + sendfile.test \ + sendfile64.test \ + set_mempolicy.test \ + setdomainname.test \ + setfsgid.test \ + setfsgid32.test \ + setfsuid.test \ + setfsuid32.test \ + setgid.test \ + setgid32.test \ + setgroups.test \ + setgroups32.test \ + sethostname.test \ + setns.test \ + setregid.test \ + setregid32.test \ + setresgid.test \ + setresgid32.test \ + setresuid.test \ + setresuid32.test \ + setreuid.test \ + setreuid32.test \ + setrlimit.test \ + setuid.test \ + setuid32.test \ + shmxt.test \ + shutdown.test \ + sigaction.test \ + sigaltstack.test \ + siginfo.test \ + signalfd4.test \ + sigreturn.test \ + socketcall.test \ + splice.test \ + stat.test \ + stat64.test \ + statfs.test \ + statfs64.test \ + sun_path.test \ + swap.test \ + symlink.test \ + symlinkat.test \ + sync.test \ + sync_file_range.test \ + sync_file_range2.test \ + sysinfo.test \ + syslog.test \ + tee.test \ + time.test \ + timer_create.test \ + timer_xettime.test \ + timerfd_xettime.test \ + times-fail.test \ + times.test \ + truncate.test \ + truncate64.test \ + ugetrlimit.test \ + uio.test \ + umask.test \ + umount.test \ + umount2.test \ + umoven-illptr.test \ + umovestr-illptr.test \ + umovestr.test \ + umovestr2.test \ + umovestr3.test \ + uname.test \ + unix-pair-send-recv.test \ + unix-pair-sendto-recvfrom.test \ + unlink.test \ + unlinkat.test \ + unshare.test \ + userfaultfd.test \ + ustat.test \ + utime.test \ + utimensat.test \ + utimes.test \ + vhangup.test \ + vmsplice.test \ + wait4-v.test \ + wait4.test \ + waitid-v.test \ + waitid.test \ + waitpid.test \ + xattr-strings.test \ + xattr.test \ + xet_robust_list.test \ + xetitimer.test \ + xetpgid.test \ + xetpriority.test \ + xettimeofday.test \ + # end of DECODER_TESTS + +MISC_TESTS = \ + attach-f-p.test \ + attach-p-cmd.test \ + bexecve.test \ + count-f.test \ + count.test \ + detach-running.test \ + detach-sleeping.test \ + detach-stopped.test \ + filter-unavailable.test \ + fork-f.test \ + ksysent.test \ + opipe.test \ + options-syntax.test \ + pc.test \ + qual_fault-syntax.test \ + qual_fault.test \ + qual_inject-error-signal.test \ + qual_inject-retval.test \ + qual_inject-signal.test \ + qual_inject-syntax.test \ + qual_signal.test \ + qual_syscall.test \ + redirect-fds.test \ + redirect.test \ + restart_syscall.test \ + signal_receive.test \ + strace-C.test \ + strace-E.test \ + strace-S.test \ + strace-T.test \ + strace-V.test \ + strace-ff.test \ + strace-r.test \ + strace-t.test \ + strace-tt.test \ + strace-ttt.test \ + threads-execve.test \ + vfork-f.test \ + # end of MISC_TESTS + +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) +TEST_LOG_COMPILER = env +AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh +VALGRIND_FLAGS = --quiet +VALGRIND_SUPPRESSIONS_FILES = $(srcdir)/strace.supp +EXTRA_DIST = init.sh run.sh match.awk \ + caps-abbrev.awk \ + caps.awk \ + count-f.expected \ + eventfd.expected \ + fadvise.h \ + filter-unavailable.expected \ + fstatat.c \ + fstatx.c \ + getresugid.c \ + init_delete_module.h \ + ipc.sh \ + ipc_msgbuf.expected \ + ksysent.sed \ + lstatx.c \ + net.expected \ + oldselect.expected \ + pipe.expected \ + ppoll-v.expected \ + ppoll.expected \ + process_vm_readv_writev.c \ + qual_fault-exit_group.expected \ + qual_inject-error-signal.expected \ + qual_inject-signal.expected \ + quotactl.h \ + scno_tampering.sh \ + setfsugid.c \ + setresugid.c \ + setreugid.c \ + setugid.c \ + sigaction.awk \ + sigaltstack.expected \ + sockname.c \ + statfs.expected \ + statx.sh \ + strace-C.expected \ + strace-E.expected \ + strace-T.expected \ + strace-ff.expected \ + strace-k.test \ + strace-r.expected \ + strace.supp \ + struct_flock.c \ + sun_path.expected \ + uio.expected \ + umode_t.c \ + umovestr.expected \ + unix-pair-send-recv.expected \ + unix-pair-sendto-recvfrom.expected \ + xchownx.c \ + xgetrlimit.c \ + xselect.c \ + xstatfs.c \ + xstatfs64.c \ + xstatfsx.c \ + xstatx.c \ + $(TESTS) + +objects = $(filter %.$(OBJEXT),$(SOURCES:.c=.$(OBJEXT))) +CLEANFILES = ksysent.h $(TESTS:=.tmp) syscallent.i scno.h +SCNO_CPPFLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(ARCH_MFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) + +digits = [[:digit:]][[:digit:]]* +al_nums = [[:alnum:]_][[:alnum:]_]* +SCNO_SED = /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 +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../scno.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/../scno.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkLIBRARIES: + -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) + +libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES) + $(AM_V_at)-rm -f libtests.a + $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) + $(AM_V_at)$(RANLIB) libtests.a + +clean-checkPROGRAMS: + -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) + +_newselect$(EXEEXT): $(_newselect_OBJECTS) $(_newselect_DEPENDENCIES) $(EXTRA__newselect_DEPENDENCIES) + @rm -f _newselect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(_newselect_OBJECTS) $(_newselect_LDADD) $(LIBS) + +accept$(EXEEXT): $(accept_OBJECTS) $(accept_DEPENDENCIES) $(EXTRA_accept_DEPENDENCIES) + @rm -f accept$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(accept_OBJECTS) $(accept_LDADD) $(LIBS) + +accept4$(EXEEXT): $(accept4_OBJECTS) $(accept4_DEPENDENCIES) $(EXTRA_accept4_DEPENDENCIES) + @rm -f accept4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(accept4_OBJECTS) $(accept4_LDADD) $(LIBS) + +access$(EXEEXT): $(access_OBJECTS) $(access_DEPENDENCIES) $(EXTRA_access_DEPENDENCIES) + @rm -f access$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(access_OBJECTS) $(access_LDADD) $(LIBS) + +acct$(EXEEXT): $(acct_OBJECTS) $(acct_DEPENDENCIES) $(EXTRA_acct_DEPENDENCIES) + @rm -f acct$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(acct_OBJECTS) $(acct_LDADD) $(LIBS) + +add_key$(EXEEXT): $(add_key_OBJECTS) $(add_key_DEPENDENCIES) $(EXTRA_add_key_DEPENDENCIES) + @rm -f add_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(add_key_OBJECTS) $(add_key_LDADD) $(LIBS) + +adjtimex$(EXEEXT): $(adjtimex_OBJECTS) $(adjtimex_DEPENDENCIES) $(EXTRA_adjtimex_DEPENDENCIES) + @rm -f adjtimex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(adjtimex_OBJECTS) $(adjtimex_LDADD) $(LIBS) + +aio$(EXEEXT): $(aio_OBJECTS) $(aio_DEPENDENCIES) $(EXTRA_aio_DEPENDENCIES) + @rm -f aio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(aio_OBJECTS) $(aio_LDADD) $(LIBS) + +alarm$(EXEEXT): $(alarm_OBJECTS) $(alarm_DEPENDENCIES) $(EXTRA_alarm_DEPENDENCIES) + @rm -f alarm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(alarm_OBJECTS) $(alarm_LDADD) $(LIBS) + +answer$(EXEEXT): $(answer_OBJECTS) $(answer_DEPENDENCIES) $(EXTRA_answer_DEPENDENCIES) + @rm -f answer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(answer_OBJECTS) $(answer_LDADD) $(LIBS) + +attach-f-p$(EXEEXT): $(attach_f_p_OBJECTS) $(attach_f_p_DEPENDENCIES) $(EXTRA_attach_f_p_DEPENDENCIES) + @rm -f attach-f-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_OBJECTS) $(attach_f_p_LDADD) $(LIBS) + +attach-f-p-cmd$(EXEEXT): $(attach_f_p_cmd_OBJECTS) $(attach_f_p_cmd_DEPENDENCIES) $(EXTRA_attach_f_p_cmd_DEPENDENCIES) + @rm -f attach-f-p-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_f_p_cmd_OBJECTS) $(attach_f_p_cmd_LDADD) $(LIBS) + +attach-p-cmd-cmd$(EXEEXT): $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_DEPENDENCIES) $(EXTRA_attach_p_cmd_cmd_DEPENDENCIES) + @rm -f attach-p-cmd-cmd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_cmd_OBJECTS) $(attach_p_cmd_cmd_LDADD) $(LIBS) + +attach-p-cmd-p$(EXEEXT): $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_DEPENDENCIES) $(EXTRA_attach_p_cmd_p_DEPENDENCIES) + @rm -f attach-p-cmd-p$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(attach_p_cmd_p_OBJECTS) $(attach_p_cmd_p_LDADD) $(LIBS) + +bpf$(EXEEXT): $(bpf_OBJECTS) $(bpf_DEPENDENCIES) $(EXTRA_bpf_DEPENDENCIES) + @rm -f bpf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(bpf_OBJECTS) $(bpf_LDADD) $(LIBS) + +brk$(EXEEXT): $(brk_OBJECTS) $(brk_DEPENDENCIES) $(EXTRA_brk_DEPENDENCIES) + @rm -f brk$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(brk_OBJECTS) $(brk_LDADD) $(LIBS) + +btrfs$(EXEEXT): $(btrfs_OBJECTS) $(btrfs_DEPENDENCIES) $(EXTRA_btrfs_DEPENDENCIES) + @rm -f btrfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(btrfs_OBJECTS) $(btrfs_LDADD) $(LIBS) + +caps$(EXEEXT): $(caps_OBJECTS) $(caps_DEPENDENCIES) $(EXTRA_caps_DEPENDENCIES) + @rm -f caps$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(caps_OBJECTS) $(caps_LDADD) $(LIBS) + +caps-abbrev$(EXEEXT): $(caps_abbrev_OBJECTS) $(caps_abbrev_DEPENDENCIES) $(EXTRA_caps_abbrev_DEPENDENCIES) + @rm -f caps-abbrev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(caps_abbrev_OBJECTS) $(caps_abbrev_LDADD) $(LIBS) + +chmod$(EXEEXT): $(chmod_OBJECTS) $(chmod_DEPENDENCIES) $(EXTRA_chmod_DEPENDENCIES) + @rm -f chmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chmod_OBJECTS) $(chmod_LDADD) $(LIBS) + +chown$(EXEEXT): $(chown_OBJECTS) $(chown_DEPENDENCIES) $(EXTRA_chown_DEPENDENCIES) + @rm -f chown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown_OBJECTS) $(chown_LDADD) $(LIBS) + +chown32$(EXEEXT): $(chown32_OBJECTS) $(chown32_DEPENDENCIES) $(EXTRA_chown32_DEPENDENCIES) + @rm -f chown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chown32_OBJECTS) $(chown32_LDADD) $(LIBS) + +chroot$(EXEEXT): $(chroot_OBJECTS) $(chroot_DEPENDENCIES) $(EXTRA_chroot_DEPENDENCIES) + @rm -f chroot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(chroot_OBJECTS) $(chroot_LDADD) $(LIBS) + +clock_adjtime$(EXEEXT): $(clock_adjtime_OBJECTS) $(clock_adjtime_DEPENDENCIES) $(EXTRA_clock_adjtime_DEPENDENCIES) + @rm -f clock_adjtime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_adjtime_OBJECTS) $(clock_adjtime_LDADD) $(LIBS) + +clock_nanosleep$(EXEEXT): $(clock_nanosleep_OBJECTS) $(clock_nanosleep_DEPENDENCIES) $(EXTRA_clock_nanosleep_DEPENDENCIES) + @rm -f clock_nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_nanosleep_OBJECTS) $(clock_nanosleep_LDADD) $(LIBS) + +clock_xettime$(EXEEXT): $(clock_xettime_OBJECTS) $(clock_xettime_DEPENDENCIES) $(EXTRA_clock_xettime_DEPENDENCIES) + @rm -f clock_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clock_xettime_OBJECTS) $(clock_xettime_LDADD) $(LIBS) + +copy_file_range$(EXEEXT): $(copy_file_range_OBJECTS) $(copy_file_range_DEPENDENCIES) $(EXTRA_copy_file_range_DEPENDENCIES) + @rm -f copy_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(copy_file_range_OBJECTS) $(copy_file_range_LDADD) $(LIBS) + +count-f$(EXEEXT): $(count_f_OBJECTS) $(count_f_DEPENDENCIES) $(EXTRA_count_f_DEPENDENCIES) + @rm -f count-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(count_f_OBJECTS) $(count_f_LDADD) $(LIBS) + +creat$(EXEEXT): $(creat_OBJECTS) $(creat_DEPENDENCIES) $(EXTRA_creat_DEPENDENCIES) + @rm -f creat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(creat_OBJECTS) $(creat_LDADD) $(LIBS) + +delete_module$(EXEEXT): $(delete_module_OBJECTS) $(delete_module_DEPENDENCIES) $(EXTRA_delete_module_DEPENDENCIES) + @rm -f delete_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(delete_module_OBJECTS) $(delete_module_LDADD) $(LIBS) + +dup$(EXEEXT): $(dup_OBJECTS) $(dup_DEPENDENCIES) $(EXTRA_dup_DEPENDENCIES) + @rm -f dup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup_OBJECTS) $(dup_LDADD) $(LIBS) + +dup2$(EXEEXT): $(dup2_OBJECTS) $(dup2_DEPENDENCIES) $(EXTRA_dup2_DEPENDENCIES) + @rm -f dup2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup2_OBJECTS) $(dup2_LDADD) $(LIBS) + +dup3$(EXEEXT): $(dup3_OBJECTS) $(dup3_DEPENDENCIES) $(EXTRA_dup3_DEPENDENCIES) + @rm -f dup3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(dup3_OBJECTS) $(dup3_LDADD) $(LIBS) + +epoll_create$(EXEEXT): $(epoll_create_OBJECTS) $(epoll_create_DEPENDENCIES) $(EXTRA_epoll_create_DEPENDENCIES) + @rm -f epoll_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create_OBJECTS) $(epoll_create_LDADD) $(LIBS) + +epoll_create1$(EXEEXT): $(epoll_create1_OBJECTS) $(epoll_create1_DEPENDENCIES) $(EXTRA_epoll_create1_DEPENDENCIES) + @rm -f epoll_create1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_create1_OBJECTS) $(epoll_create1_LDADD) $(LIBS) + +epoll_ctl$(EXEEXT): $(epoll_ctl_OBJECTS) $(epoll_ctl_DEPENDENCIES) $(EXTRA_epoll_ctl_DEPENDENCIES) + @rm -f epoll_ctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_ctl_OBJECTS) $(epoll_ctl_LDADD) $(LIBS) + +epoll_pwait$(EXEEXT): $(epoll_pwait_OBJECTS) $(epoll_pwait_DEPENDENCIES) $(EXTRA_epoll_pwait_DEPENDENCIES) + @rm -f epoll_pwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_pwait_OBJECTS) $(epoll_pwait_LDADD) $(LIBS) + +epoll_wait$(EXEEXT): $(epoll_wait_OBJECTS) $(epoll_wait_DEPENDENCIES) $(EXTRA_epoll_wait_DEPENDENCIES) + @rm -f epoll_wait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(epoll_wait_OBJECTS) $(epoll_wait_LDADD) $(LIBS) + +erestartsys$(EXEEXT): $(erestartsys_OBJECTS) $(erestartsys_DEPENDENCIES) $(EXTRA_erestartsys_DEPENDENCIES) + @rm -f erestartsys$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(erestartsys_OBJECTS) $(erestartsys_LDADD) $(LIBS) + +eventfd$(EXEEXT): $(eventfd_OBJECTS) $(eventfd_DEPENDENCIES) $(EXTRA_eventfd_DEPENDENCIES) + @rm -f eventfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(eventfd_OBJECTS) $(eventfd_LDADD) $(LIBS) + +execve$(EXEEXT): $(execve_OBJECTS) $(execve_DEPENDENCIES) $(EXTRA_execve_DEPENDENCIES) + @rm -f execve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_OBJECTS) $(execve_LDADD) $(LIBS) + +execve-v$(EXEEXT): $(execve_v_OBJECTS) $(execve_v_DEPENDENCIES) $(EXTRA_execve_v_DEPENDENCIES) + @rm -f execve-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execve_v_OBJECTS) $(execve_v_LDADD) $(LIBS) + +execveat$(EXEEXT): $(execveat_OBJECTS) $(execveat_DEPENDENCIES) $(EXTRA_execveat_DEPENDENCIES) + @rm -f execveat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_OBJECTS) $(execveat_LDADD) $(LIBS) + +execveat-v$(EXEEXT): $(execveat_v_OBJECTS) $(execveat_v_DEPENDENCIES) $(EXTRA_execveat_v_DEPENDENCIES) + @rm -f execveat-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(execveat_v_OBJECTS) $(execveat_v_LDADD) $(LIBS) + +faccessat$(EXEEXT): $(faccessat_OBJECTS) $(faccessat_DEPENDENCIES) $(EXTRA_faccessat_DEPENDENCIES) + @rm -f faccessat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(faccessat_OBJECTS) $(faccessat_LDADD) $(LIBS) + +fadvise64$(EXEEXT): $(fadvise64_OBJECTS) $(fadvise64_DEPENDENCIES) $(EXTRA_fadvise64_DEPENDENCIES) + @rm -f fadvise64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fadvise64_OBJECTS) $(fadvise64_LDADD) $(LIBS) + +fadvise64_64$(EXEEXT): $(fadvise64_64_OBJECTS) $(fadvise64_64_DEPENDENCIES) $(EXTRA_fadvise64_64_DEPENDENCIES) + @rm -f fadvise64_64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fadvise64_64_OBJECTS) $(fadvise64_64_LDADD) $(LIBS) + +fallocate$(EXEEXT): $(fallocate_OBJECTS) $(fallocate_DEPENDENCIES) $(EXTRA_fallocate_DEPENDENCIES) + @rm -f fallocate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fallocate_OBJECTS) $(fallocate_LDADD) $(LIBS) + +fanotify_init$(EXEEXT): $(fanotify_init_OBJECTS) $(fanotify_init_DEPENDENCIES) $(EXTRA_fanotify_init_DEPENDENCIES) + @rm -f fanotify_init$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fanotify_init_OBJECTS) $(fanotify_init_LDADD) $(LIBS) + +fanotify_mark$(EXEEXT): $(fanotify_mark_OBJECTS) $(fanotify_mark_DEPENDENCIES) $(EXTRA_fanotify_mark_DEPENDENCIES) + @rm -f fanotify_mark$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fanotify_mark_OBJECTS) $(fanotify_mark_LDADD) $(LIBS) + +fchdir$(EXEEXT): $(fchdir_OBJECTS) $(fchdir_DEPENDENCIES) $(EXTRA_fchdir_DEPENDENCIES) + @rm -f fchdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchdir_OBJECTS) $(fchdir_LDADD) $(LIBS) + +fchmod$(EXEEXT): $(fchmod_OBJECTS) $(fchmod_DEPENDENCIES) $(EXTRA_fchmod_DEPENDENCIES) + @rm -f fchmod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmod_OBJECTS) $(fchmod_LDADD) $(LIBS) + +fchmodat$(EXEEXT): $(fchmodat_OBJECTS) $(fchmodat_DEPENDENCIES) $(EXTRA_fchmodat_DEPENDENCIES) + @rm -f fchmodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchmodat_OBJECTS) $(fchmodat_LDADD) $(LIBS) + +fchown$(EXEEXT): $(fchown_OBJECTS) $(fchown_DEPENDENCIES) $(EXTRA_fchown_DEPENDENCIES) + @rm -f fchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown_OBJECTS) $(fchown_LDADD) $(LIBS) + +fchown32$(EXEEXT): $(fchown32_OBJECTS) $(fchown32_DEPENDENCIES) $(EXTRA_fchown32_DEPENDENCIES) + @rm -f fchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchown32_OBJECTS) $(fchown32_LDADD) $(LIBS) + +fchownat$(EXEEXT): $(fchownat_OBJECTS) $(fchownat_DEPENDENCIES) $(EXTRA_fchownat_DEPENDENCIES) + @rm -f fchownat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fchownat_OBJECTS) $(fchownat_LDADD) $(LIBS) + +fcntl$(EXEEXT): $(fcntl_OBJECTS) $(fcntl_DEPENDENCIES) $(EXTRA_fcntl_DEPENDENCIES) + @rm -f fcntl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcntl_OBJECTS) $(fcntl_LDADD) $(LIBS) + +fcntl64$(EXEEXT): $(fcntl64_OBJECTS) $(fcntl64_DEPENDENCIES) $(EXTRA_fcntl64_DEPENDENCIES) + @rm -f fcntl64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcntl64_OBJECTS) $(fcntl64_LDADD) $(LIBS) + +fdatasync$(EXEEXT): $(fdatasync_OBJECTS) $(fdatasync_DEPENDENCIES) $(EXTRA_fdatasync_DEPENDENCIES) + @rm -f fdatasync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fdatasync_OBJECTS) $(fdatasync_LDADD) $(LIBS) + +file_handle$(EXEEXT): $(file_handle_OBJECTS) $(file_handle_DEPENDENCIES) $(EXTRA_file_handle_DEPENDENCIES) + @rm -f file_handle$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_handle_OBJECTS) $(file_handle_LDADD) $(LIBS) + +file_ioctl$(EXEEXT): $(file_ioctl_OBJECTS) $(file_ioctl_DEPENDENCIES) $(EXTRA_file_ioctl_DEPENDENCIES) + @rm -f file_ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(file_ioctl_OBJECTS) $(file_ioctl_LDADD) $(LIBS) + +filter-unavailable$(EXEEXT): $(filter_unavailable_OBJECTS) $(filter_unavailable_DEPENDENCIES) $(EXTRA_filter_unavailable_DEPENDENCIES) + @rm -f filter-unavailable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(filter_unavailable_OBJECTS) $(filter_unavailable_LDADD) $(LIBS) + +finit_module$(EXEEXT): $(finit_module_OBJECTS) $(finit_module_DEPENDENCIES) $(EXTRA_finit_module_DEPENDENCIES) + @rm -f finit_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(finit_module_OBJECTS) $(finit_module_LDADD) $(LIBS) + +flock$(EXEEXT): $(flock_OBJECTS) $(flock_DEPENDENCIES) $(EXTRA_flock_DEPENDENCIES) + @rm -f flock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(flock_OBJECTS) $(flock_LDADD) $(LIBS) + +fork-f$(EXEEXT): $(fork_f_OBJECTS) $(fork_f_DEPENDENCIES) $(EXTRA_fork_f_DEPENDENCIES) + @rm -f fork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fork_f_OBJECTS) $(fork_f_LDADD) $(LIBS) + +fstat$(EXEEXT): $(fstat_OBJECTS) $(fstat_DEPENDENCIES) $(EXTRA_fstat_DEPENDENCIES) + @rm -f fstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstat_OBJECTS) $(fstat_LDADD) $(LIBS) + +fstat64$(EXEEXT): $(fstat64_OBJECTS) $(fstat64_DEPENDENCIES) $(EXTRA_fstat64_DEPENDENCIES) + @rm -f fstat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstat64_OBJECTS) $(fstat64_LDADD) $(LIBS) + +fstatat64$(EXEEXT): $(fstatat64_OBJECTS) $(fstatat64_DEPENDENCIES) $(EXTRA_fstatat64_DEPENDENCIES) + @rm -f fstatat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatat64_OBJECTS) $(fstatat64_LDADD) $(LIBS) + +fstatfs$(EXEEXT): $(fstatfs_OBJECTS) $(fstatfs_DEPENDENCIES) $(EXTRA_fstatfs_DEPENDENCIES) + @rm -f fstatfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs_OBJECTS) $(fstatfs_LDADD) $(LIBS) + +fstatfs64$(EXEEXT): $(fstatfs64_OBJECTS) $(fstatfs64_DEPENDENCIES) $(EXTRA_fstatfs64_DEPENDENCIES) + @rm -f fstatfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fstatfs64_OBJECTS) $(fstatfs64_LDADD) $(LIBS) + +fsync$(EXEEXT): $(fsync_OBJECTS) $(fsync_DEPENDENCIES) $(EXTRA_fsync_DEPENDENCIES) + @rm -f fsync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fsync_OBJECTS) $(fsync_LDADD) $(LIBS) + +ftruncate$(EXEEXT): $(ftruncate_OBJECTS) $(ftruncate_DEPENDENCIES) $(EXTRA_ftruncate_DEPENDENCIES) + @rm -f ftruncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftruncate_OBJECTS) $(ftruncate_LDADD) $(LIBS) + +ftruncate64$(EXEEXT): $(ftruncate64_OBJECTS) $(ftruncate64_DEPENDENCIES) $(EXTRA_ftruncate64_DEPENDENCIES) + @rm -f ftruncate64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ftruncate64_OBJECTS) $(ftruncate64_LDADD) $(LIBS) + +futex$(EXEEXT): $(futex_OBJECTS) $(futex_DEPENDENCIES) $(EXTRA_futex_DEPENDENCIES) + @rm -f futex$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futex_OBJECTS) $(futex_LDADD) $(LIBS) + +futimesat$(EXEEXT): $(futimesat_OBJECTS) $(futimesat_DEPENDENCIES) $(EXTRA_futimesat_DEPENDENCIES) + @rm -f futimesat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(futimesat_OBJECTS) $(futimesat_LDADD) $(LIBS) + +get_mempolicy$(EXEEXT): $(get_mempolicy_OBJECTS) $(get_mempolicy_DEPENDENCIES) $(EXTRA_get_mempolicy_DEPENDENCIES) + @rm -f get_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(get_mempolicy_OBJECTS) $(get_mempolicy_LDADD) $(LIBS) + +getcpu$(EXEEXT): $(getcpu_OBJECTS) $(getcpu_DEPENDENCIES) $(EXTRA_getcpu_DEPENDENCIES) + @rm -f getcpu$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcpu_OBJECTS) $(getcpu_LDADD) $(LIBS) + +getcwd$(EXEEXT): $(getcwd_OBJECTS) $(getcwd_DEPENDENCIES) $(EXTRA_getcwd_DEPENDENCIES) + @rm -f getcwd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getcwd_OBJECTS) $(getcwd_LDADD) $(LIBS) + +getdents$(EXEEXT): $(getdents_OBJECTS) $(getdents_DEPENDENCIES) $(EXTRA_getdents_DEPENDENCIES) + @rm -f getdents$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getdents_OBJECTS) $(getdents_LDADD) $(LIBS) + +getdents64$(EXEEXT): $(getdents64_OBJECTS) $(getdents64_DEPENDENCIES) $(EXTRA_getdents64_DEPENDENCIES) + @rm -f getdents64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getdents64_OBJECTS) $(getdents64_LDADD) $(LIBS) + +getegid$(EXEEXT): $(getegid_OBJECTS) $(getegid_DEPENDENCIES) $(EXTRA_getegid_DEPENDENCIES) + @rm -f getegid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid_OBJECTS) $(getegid_LDADD) $(LIBS) + +getegid32$(EXEEXT): $(getegid32_OBJECTS) $(getegid32_DEPENDENCIES) $(EXTRA_getegid32_DEPENDENCIES) + @rm -f getegid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getegid32_OBJECTS) $(getegid32_LDADD) $(LIBS) + +geteuid$(EXEEXT): $(geteuid_OBJECTS) $(geteuid_DEPENDENCIES) $(EXTRA_geteuid_DEPENDENCIES) + @rm -f geteuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid_OBJECTS) $(geteuid_LDADD) $(LIBS) + +geteuid32$(EXEEXT): $(geteuid32_OBJECTS) $(geteuid32_DEPENDENCIES) $(EXTRA_geteuid32_DEPENDENCIES) + @rm -f geteuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(geteuid32_OBJECTS) $(geteuid32_LDADD) $(LIBS) + +getgid$(EXEEXT): $(getgid_OBJECTS) $(getgid_DEPENDENCIES) $(EXTRA_getgid_DEPENDENCIES) + @rm -f getgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid_OBJECTS) $(getgid_LDADD) $(LIBS) + +getgid32$(EXEEXT): $(getgid32_OBJECTS) $(getgid32_DEPENDENCIES) $(EXTRA_getgid32_DEPENDENCIES) + @rm -f getgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgid32_OBJECTS) $(getgid32_LDADD) $(LIBS) + +getgroups$(EXEEXT): $(getgroups_OBJECTS) $(getgroups_DEPENDENCIES) $(EXTRA_getgroups_DEPENDENCIES) + @rm -f getgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups_OBJECTS) $(getgroups_LDADD) $(LIBS) + +getgroups32$(EXEEXT): $(getgroups32_OBJECTS) $(getgroups32_DEPENDENCIES) $(EXTRA_getgroups32_DEPENDENCIES) + @rm -f getgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getgroups32_OBJECTS) $(getgroups32_LDADD) $(LIBS) + +getpeername$(EXEEXT): $(getpeername_OBJECTS) $(getpeername_DEPENDENCIES) $(EXTRA_getpeername_DEPENDENCIES) + @rm -f getpeername$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpeername_OBJECTS) $(getpeername_LDADD) $(LIBS) + +getpgrp$(EXEEXT): $(getpgrp_OBJECTS) $(getpgrp_DEPENDENCIES) $(EXTRA_getpgrp_DEPENDENCIES) + @rm -f getpgrp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getpgrp_OBJECTS) $(getpgrp_LDADD) $(LIBS) + +getrandom$(EXEEXT): $(getrandom_OBJECTS) $(getrandom_DEPENDENCIES) $(EXTRA_getrandom_DEPENDENCIES) + @rm -f getrandom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrandom_OBJECTS) $(getrandom_LDADD) $(LIBS) + +getresgid$(EXEEXT): $(getresgid_OBJECTS) $(getresgid_DEPENDENCIES) $(EXTRA_getresgid_DEPENDENCIES) + @rm -f getresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid_OBJECTS) $(getresgid_LDADD) $(LIBS) + +getresgid32$(EXEEXT): $(getresgid32_OBJECTS) $(getresgid32_DEPENDENCIES) $(EXTRA_getresgid32_DEPENDENCIES) + @rm -f getresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresgid32_OBJECTS) $(getresgid32_LDADD) $(LIBS) + +getresuid$(EXEEXT): $(getresuid_OBJECTS) $(getresuid_DEPENDENCIES) $(EXTRA_getresuid_DEPENDENCIES) + @rm -f getresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid_OBJECTS) $(getresuid_LDADD) $(LIBS) + +getresuid32$(EXEEXT): $(getresuid32_OBJECTS) $(getresuid32_DEPENDENCIES) $(EXTRA_getresuid32_DEPENDENCIES) + @rm -f getresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getresuid32_OBJECTS) $(getresuid32_LDADD) $(LIBS) + +getrlimit$(EXEEXT): $(getrlimit_OBJECTS) $(getrlimit_DEPENDENCIES) $(EXTRA_getrlimit_DEPENDENCIES) + @rm -f getrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrlimit_OBJECTS) $(getrlimit_LDADD) $(LIBS) + +getrusage$(EXEEXT): $(getrusage_OBJECTS) $(getrusage_DEPENDENCIES) $(EXTRA_getrusage_DEPENDENCIES) + @rm -f getrusage$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getrusage_OBJECTS) $(getrusage_LDADD) $(LIBS) + +getsid$(EXEEXT): $(getsid_OBJECTS) $(getsid_DEPENDENCIES) $(EXTRA_getsid_DEPENDENCIES) + @rm -f getsid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsid_OBJECTS) $(getsid_LDADD) $(LIBS) + +getsockname$(EXEEXT): $(getsockname_OBJECTS) $(getsockname_DEPENDENCIES) $(EXTRA_getsockname_DEPENDENCIES) + @rm -f getsockname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getsockname_OBJECTS) $(getsockname_LDADD) $(LIBS) + +getuid$(EXEEXT): $(getuid_OBJECTS) $(getuid_DEPENDENCIES) $(EXTRA_getuid_DEPENDENCIES) + @rm -f getuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid_OBJECTS) $(getuid_LDADD) $(LIBS) + +getuid32$(EXEEXT): $(getuid32_OBJECTS) $(getuid32_DEPENDENCIES) $(EXTRA_getuid32_DEPENDENCIES) + @rm -f getuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getuid32_OBJECTS) $(getuid32_LDADD) $(LIBS) + +getxxid$(EXEEXT): $(getxxid_OBJECTS) $(getxxid_DEPENDENCIES) $(EXTRA_getxxid_DEPENDENCIES) + @rm -f getxxid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(getxxid_OBJECTS) $(getxxid_LDADD) $(LIBS) + +inet-cmsg$(EXEEXT): $(inet_cmsg_OBJECTS) $(inet_cmsg_DEPENDENCIES) $(EXTRA_inet_cmsg_DEPENDENCIES) + @rm -f inet-cmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inet_cmsg_OBJECTS) $(inet_cmsg_LDADD) $(LIBS) + +init_module$(EXEEXT): $(init_module_OBJECTS) $(init_module_DEPENDENCIES) $(EXTRA_init_module_DEPENDENCIES) + @rm -f init_module$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(init_module_OBJECTS) $(init_module_LDADD) $(LIBS) + +inotify$(EXEEXT): $(inotify_OBJECTS) $(inotify_DEPENDENCIES) $(EXTRA_inotify_DEPENDENCIES) + @rm -f inotify$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inotify_OBJECTS) $(inotify_LDADD) $(LIBS) + +inotify_init1$(EXEEXT): $(inotify_init1_OBJECTS) $(inotify_init1_DEPENDENCIES) $(EXTRA_inotify_init1_DEPENDENCIES) + @rm -f inotify_init1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(inotify_init1_OBJECTS) $(inotify_init1_LDADD) $(LIBS) + +ioctl$(EXEEXT): $(ioctl_OBJECTS) $(ioctl_DEPENDENCIES) $(EXTRA_ioctl_DEPENDENCIES) + @rm -f ioctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_OBJECTS) $(ioctl_LDADD) $(LIBS) + +ioctl_block$(EXEEXT): $(ioctl_block_OBJECTS) $(ioctl_block_DEPENDENCIES) $(EXTRA_ioctl_block_DEPENDENCIES) + @rm -f ioctl_block$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_block_OBJECTS) $(ioctl_block_LDADD) $(LIBS) + +ioctl_dm$(EXEEXT): $(ioctl_dm_OBJECTS) $(ioctl_dm_DEPENDENCIES) $(EXTRA_ioctl_dm_DEPENDENCIES) + @rm -f ioctl_dm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_dm_OBJECTS) $(ioctl_dm_LDADD) $(LIBS) + +ioctl_dm-v$(EXEEXT): $(ioctl_dm_v_OBJECTS) $(ioctl_dm_v_DEPENDENCIES) $(EXTRA_ioctl_dm_v_DEPENDENCIES) + @rm -f ioctl_dm-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_dm_v_OBJECTS) $(ioctl_dm_v_LDADD) $(LIBS) + +ioctl_evdev$(EXEEXT): $(ioctl_evdev_OBJECTS) $(ioctl_evdev_DEPENDENCIES) $(EXTRA_ioctl_evdev_DEPENDENCIES) + @rm -f ioctl_evdev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_OBJECTS) $(ioctl_evdev_LDADD) $(LIBS) + +ioctl_evdev-v$(EXEEXT): $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_DEPENDENCIES) $(EXTRA_ioctl_evdev_v_DEPENDENCIES) + @rm -f ioctl_evdev-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_evdev_v_OBJECTS) $(ioctl_evdev_v_LDADD) $(LIBS) + +ioctl_loop$(EXEEXT): $(ioctl_loop_OBJECTS) $(ioctl_loop_DEPENDENCIES) $(EXTRA_ioctl_loop_DEPENDENCIES) + @rm -f ioctl_loop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_OBJECTS) $(ioctl_loop_LDADD) $(LIBS) + +ioctl_loop-nv$(EXEEXT): $(ioctl_loop_nv_OBJECTS) $(ioctl_loop_nv_DEPENDENCIES) $(EXTRA_ioctl_loop_nv_DEPENDENCIES) + @rm -f ioctl_loop-nv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_nv_OBJECTS) $(ioctl_loop_nv_LDADD) $(LIBS) + +ioctl_loop-v$(EXEEXT): $(ioctl_loop_v_OBJECTS) $(ioctl_loop_v_DEPENDENCIES) $(EXTRA_ioctl_loop_v_DEPENDENCIES) + @rm -f ioctl_loop-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_loop_v_OBJECTS) $(ioctl_loop_v_LDADD) $(LIBS) + +ioctl_mtd$(EXEEXT): $(ioctl_mtd_OBJECTS) $(ioctl_mtd_DEPENDENCIES) $(EXTRA_ioctl_mtd_DEPENDENCIES) + @rm -f ioctl_mtd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_mtd_OBJECTS) $(ioctl_mtd_LDADD) $(LIBS) + +ioctl_rtc$(EXEEXT): $(ioctl_rtc_OBJECTS) $(ioctl_rtc_DEPENDENCIES) $(EXTRA_ioctl_rtc_DEPENDENCIES) + @rm -f ioctl_rtc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_OBJECTS) $(ioctl_rtc_LDADD) $(LIBS) + +ioctl_rtc-v$(EXEEXT): $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_DEPENDENCIES) $(EXTRA_ioctl_rtc_v_DEPENDENCIES) + @rm -f ioctl_rtc-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_rtc_v_OBJECTS) $(ioctl_rtc_v_LDADD) $(LIBS) + +ioctl_scsi$(EXEEXT): $(ioctl_scsi_OBJECTS) $(ioctl_scsi_DEPENDENCIES) $(EXTRA_ioctl_scsi_DEPENDENCIES) + @rm -f ioctl_scsi$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_scsi_OBJECTS) $(ioctl_scsi_LDADD) $(LIBS) + +ioctl_sg_io_v3$(EXEEXT): $(ioctl_sg_io_v3_OBJECTS) $(ioctl_sg_io_v3_DEPENDENCIES) $(EXTRA_ioctl_sg_io_v3_DEPENDENCIES) + @rm -f ioctl_sg_io_v3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sg_io_v3_OBJECTS) $(ioctl_sg_io_v3_LDADD) $(LIBS) + +ioctl_sg_io_v4$(EXEEXT): $(ioctl_sg_io_v4_OBJECTS) $(ioctl_sg_io_v4_DEPENDENCIES) $(EXTRA_ioctl_sg_io_v4_DEPENDENCIES) + @rm -f ioctl_sg_io_v4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sg_io_v4_OBJECTS) $(ioctl_sg_io_v4_LDADD) $(LIBS) + +ioctl_sock_gifconf$(EXEEXT): $(ioctl_sock_gifconf_OBJECTS) $(ioctl_sock_gifconf_DEPENDENCIES) $(EXTRA_ioctl_sock_gifconf_DEPENDENCIES) + @rm -f ioctl_sock_gifconf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_sock_gifconf_OBJECTS) $(ioctl_sock_gifconf_LDADD) $(LIBS) + +ioctl_uffdio$(EXEEXT): $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_DEPENDENCIES) $(EXTRA_ioctl_uffdio_DEPENDENCIES) + @rm -f ioctl_uffdio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_uffdio_OBJECTS) $(ioctl_uffdio_LDADD) $(LIBS) + +ioctl_v4l2$(EXEEXT): $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_DEPENDENCIES) $(EXTRA_ioctl_v4l2_DEPENDENCIES) + @rm -f ioctl_v4l2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioctl_v4l2_OBJECTS) $(ioctl_v4l2_LDADD) $(LIBS) + +ioperm$(EXEEXT): $(ioperm_OBJECTS) $(ioperm_DEPENDENCIES) $(EXTRA_ioperm_DEPENDENCIES) + @rm -f ioperm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioperm_OBJECTS) $(ioperm_LDADD) $(LIBS) + +iopl$(EXEEXT): $(iopl_OBJECTS) $(iopl_DEPENDENCIES) $(EXTRA_iopl_DEPENDENCIES) + @rm -f iopl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(iopl_OBJECTS) $(iopl_LDADD) $(LIBS) + +ioprio$(EXEEXT): $(ioprio_OBJECTS) $(ioprio_DEPENDENCIES) $(EXTRA_ioprio_DEPENDENCIES) + @rm -f ioprio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ioprio_OBJECTS) $(ioprio_LDADD) $(LIBS) + +ip_mreq$(EXEEXT): $(ip_mreq_OBJECTS) $(ip_mreq_DEPENDENCIES) $(EXTRA_ip_mreq_DEPENDENCIES) + @rm -f ip_mreq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ip_mreq_OBJECTS) $(ip_mreq_LDADD) $(LIBS) + +ipc$(EXEEXT): $(ipc_OBJECTS) $(ipc_DEPENDENCIES) $(EXTRA_ipc_DEPENDENCIES) + @rm -f ipc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_OBJECTS) $(ipc_LDADD) $(LIBS) + +ipc_msg$(EXEEXT): $(ipc_msg_OBJECTS) $(ipc_msg_DEPENDENCIES) $(EXTRA_ipc_msg_DEPENDENCIES) + @rm -f ipc_msg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_msg_OBJECTS) $(ipc_msg_LDADD) $(LIBS) + +ipc_msgbuf$(EXEEXT): $(ipc_msgbuf_OBJECTS) $(ipc_msgbuf_DEPENDENCIES) $(EXTRA_ipc_msgbuf_DEPENDENCIES) + @rm -f ipc_msgbuf$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_msgbuf_OBJECTS) $(ipc_msgbuf_LDADD) $(LIBS) + +ipc_sem$(EXEEXT): $(ipc_sem_OBJECTS) $(ipc_sem_DEPENDENCIES) $(EXTRA_ipc_sem_DEPENDENCIES) + @rm -f ipc_sem$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_sem_OBJECTS) $(ipc_sem_LDADD) $(LIBS) + +ipc_shm$(EXEEXT): $(ipc_shm_OBJECTS) $(ipc_shm_DEPENDENCIES) $(EXTRA_ipc_shm_DEPENDENCIES) + @rm -f ipc_shm$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ipc_shm_OBJECTS) $(ipc_shm_LDADD) $(LIBS) + +kcmp$(EXEEXT): $(kcmp_OBJECTS) $(kcmp_DEPENDENCIES) $(EXTRA_kcmp_DEPENDENCIES) + @rm -f kcmp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kcmp_OBJECTS) $(kcmp_LDADD) $(LIBS) + +kexec_file_load$(EXEEXT): $(kexec_file_load_OBJECTS) $(kexec_file_load_DEPENDENCIES) $(EXTRA_kexec_file_load_DEPENDENCIES) + @rm -f kexec_file_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kexec_file_load_OBJECTS) $(kexec_file_load_LDADD) $(LIBS) + +kexec_load$(EXEEXT): $(kexec_load_OBJECTS) $(kexec_load_DEPENDENCIES) $(EXTRA_kexec_load_DEPENDENCIES) + @rm -f kexec_load$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kexec_load_OBJECTS) $(kexec_load_LDADD) $(LIBS) + +keyctl$(EXEEXT): $(keyctl_OBJECTS) $(keyctl_DEPENDENCIES) $(EXTRA_keyctl_DEPENDENCIES) + @rm -f keyctl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(keyctl_OBJECTS) $(keyctl_LDADD) $(LIBS) + +kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES) $(EXTRA_kill_DEPENDENCIES) + @rm -f kill$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(kill_OBJECTS) $(kill_LDADD) $(LIBS) + +ksysent$(EXEEXT): $(ksysent_OBJECTS) $(ksysent_DEPENDENCIES) $(EXTRA_ksysent_DEPENDENCIES) + @rm -f ksysent$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ksysent_OBJECTS) $(ksysent_LDADD) $(LIBS) + +lchown$(EXEEXT): $(lchown_OBJECTS) $(lchown_DEPENDENCIES) $(EXTRA_lchown_DEPENDENCIES) + @rm -f lchown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown_OBJECTS) $(lchown_LDADD) $(LIBS) + +lchown32$(EXEEXT): $(lchown32_OBJECTS) $(lchown32_DEPENDENCIES) $(EXTRA_lchown32_DEPENDENCIES) + @rm -f lchown32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lchown32_OBJECTS) $(lchown32_LDADD) $(LIBS) + +link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES) $(EXTRA_link_DEPENDENCIES) + @rm -f link$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(link_OBJECTS) $(link_LDADD) $(LIBS) + +linkat$(EXEEXT): $(linkat_OBJECTS) $(linkat_DEPENDENCIES) $(EXTRA_linkat_DEPENDENCIES) + @rm -f linkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(linkat_OBJECTS) $(linkat_LDADD) $(LIBS) + +llseek$(EXEEXT): $(llseek_OBJECTS) $(llseek_DEPENDENCIES) $(EXTRA_llseek_DEPENDENCIES) + @rm -f llseek$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(llseek_OBJECTS) $(llseek_LDADD) $(LIBS) + +lookup_dcookie$(EXEEXT): $(lookup_dcookie_OBJECTS) $(lookup_dcookie_DEPENDENCIES) $(EXTRA_lookup_dcookie_DEPENDENCIES) + @rm -f lookup_dcookie$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lookup_dcookie_OBJECTS) $(lookup_dcookie_LDADD) $(LIBS) + +lseek$(EXEEXT): $(lseek_OBJECTS) $(lseek_DEPENDENCIES) $(EXTRA_lseek_DEPENDENCIES) + @rm -f lseek$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lseek_OBJECTS) $(lseek_LDADD) $(LIBS) + +lstat$(EXEEXT): $(lstat_OBJECTS) $(lstat_DEPENDENCIES) $(EXTRA_lstat_DEPENDENCIES) + @rm -f lstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lstat_OBJECTS) $(lstat_LDADD) $(LIBS) + +lstat64$(EXEEXT): $(lstat64_OBJECTS) $(lstat64_DEPENDENCIES) $(EXTRA_lstat64_DEPENDENCIES) + @rm -f lstat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lstat64_OBJECTS) $(lstat64_LDADD) $(LIBS) + +mbind$(EXEEXT): $(mbind_OBJECTS) $(mbind_DEPENDENCIES) $(EXTRA_mbind_DEPENDENCIES) + @rm -f mbind$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mbind_OBJECTS) $(mbind_LDADD) $(LIBS) + +membarrier$(EXEEXT): $(membarrier_OBJECTS) $(membarrier_DEPENDENCIES) $(EXTRA_membarrier_DEPENDENCIES) + @rm -f membarrier$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(membarrier_OBJECTS) $(membarrier_LDADD) $(LIBS) + +memfd_create$(EXEEXT): $(memfd_create_OBJECTS) $(memfd_create_DEPENDENCIES) $(EXTRA_memfd_create_DEPENDENCIES) + @rm -f memfd_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(memfd_create_OBJECTS) $(memfd_create_LDADD) $(LIBS) + +migrate_pages$(EXEEXT): $(migrate_pages_OBJECTS) $(migrate_pages_DEPENDENCIES) $(EXTRA_migrate_pages_DEPENDENCIES) + @rm -f migrate_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(migrate_pages_OBJECTS) $(migrate_pages_LDADD) $(LIBS) + +mincore$(EXEEXT): $(mincore_OBJECTS) $(mincore_DEPENDENCIES) $(EXTRA_mincore_DEPENDENCIES) + @rm -f mincore$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mincore_OBJECTS) $(mincore_LDADD) $(LIBS) + +mkdir$(EXEEXT): $(mkdir_OBJECTS) $(mkdir_DEPENDENCIES) $(EXTRA_mkdir_DEPENDENCIES) + @rm -f mkdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdir_OBJECTS) $(mkdir_LDADD) $(LIBS) + +mkdirat$(EXEEXT): $(mkdirat_OBJECTS) $(mkdirat_DEPENDENCIES) $(EXTRA_mkdirat_DEPENDENCIES) + @rm -f mkdirat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mkdirat_OBJECTS) $(mkdirat_LDADD) $(LIBS) + +mknod$(EXEEXT): $(mknod_OBJECTS) $(mknod_DEPENDENCIES) $(EXTRA_mknod_DEPENDENCIES) + @rm -f mknod$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknod_OBJECTS) $(mknod_LDADD) $(LIBS) + +mknodat$(EXEEXT): $(mknodat_OBJECTS) $(mknodat_DEPENDENCIES) $(EXTRA_mknodat_DEPENDENCIES) + @rm -f mknodat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mknodat_OBJECTS) $(mknodat_LDADD) $(LIBS) + +mlock$(EXEEXT): $(mlock_OBJECTS) $(mlock_DEPENDENCIES) $(EXTRA_mlock_DEPENDENCIES) + @rm -f mlock$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock_OBJECTS) $(mlock_LDADD) $(LIBS) + +mlock2$(EXEEXT): $(mlock2_OBJECTS) $(mlock2_DEPENDENCIES) $(EXTRA_mlock2_DEPENDENCIES) + @rm -f mlock2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlock2_OBJECTS) $(mlock2_LDADD) $(LIBS) + +mlockall$(EXEEXT): $(mlockall_OBJECTS) $(mlockall_DEPENDENCIES) $(EXTRA_mlockall_DEPENDENCIES) + @rm -f mlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mlockall_OBJECTS) $(mlockall_LDADD) $(LIBS) + +mmap$(EXEEXT): $(mmap_OBJECTS) $(mmap_DEPENDENCIES) $(EXTRA_mmap_DEPENDENCIES) + @rm -f mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmap_OBJECTS) $(mmap_LDADD) $(LIBS) + +mmap64$(EXEEXT): $(mmap64_OBJECTS) $(mmap64_DEPENDENCIES) $(EXTRA_mmap64_DEPENDENCIES) + @rm -f mmap64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmap64_OBJECTS) $(mmap64_LDADD) $(LIBS) + +mmsg$(EXEEXT): $(mmsg_OBJECTS) $(mmsg_DEPENDENCIES) $(EXTRA_mmsg_DEPENDENCIES) + @rm -f mmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_OBJECTS) $(mmsg_LDADD) $(LIBS) + +mmsg-silent$(EXEEXT): $(mmsg_silent_OBJECTS) $(mmsg_silent_DEPENDENCIES) $(EXTRA_mmsg_silent_DEPENDENCIES) + @rm -f mmsg-silent$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_silent_OBJECTS) $(mmsg_silent_LDADD) $(LIBS) + +mmsg_name$(EXEEXT): $(mmsg_name_OBJECTS) $(mmsg_name_DEPENDENCIES) $(EXTRA_mmsg_name_DEPENDENCIES) + @rm -f mmsg_name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_name_OBJECTS) $(mmsg_name_LDADD) $(LIBS) + +mmsg_name-v$(EXEEXT): $(mmsg_name_v_OBJECTS) $(mmsg_name_v_DEPENDENCIES) $(EXTRA_mmsg_name_v_DEPENDENCIES) + @rm -f mmsg_name-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mmsg_name_v_OBJECTS) $(mmsg_name_v_LDADD) $(LIBS) + +mount$(EXEEXT): $(mount_OBJECTS) $(mount_DEPENDENCIES) $(EXTRA_mount_DEPENDENCIES) + @rm -f mount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mount_OBJECTS) $(mount_LDADD) $(LIBS) + +move_pages$(EXEEXT): $(move_pages_OBJECTS) $(move_pages_DEPENDENCIES) $(EXTRA_move_pages_DEPENDENCIES) + @rm -f move_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(move_pages_OBJECTS) $(move_pages_LDADD) $(LIBS) + +mq$(EXEEXT): $(mq_OBJECTS) $(mq_DEPENDENCIES) $(EXTRA_mq_DEPENDENCIES) + @rm -f mq$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_OBJECTS) $(mq_LDADD) $(LIBS) + +mq_sendrecv$(EXEEXT): $(mq_sendrecv_OBJECTS) $(mq_sendrecv_DEPENDENCIES) $(EXTRA_mq_sendrecv_DEPENDENCIES) + @rm -f mq_sendrecv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_OBJECTS) $(mq_sendrecv_LDADD) $(LIBS) + +mq_sendrecv-read$(EXEEXT): $(mq_sendrecv_read_OBJECTS) $(mq_sendrecv_read_DEPENDENCIES) $(EXTRA_mq_sendrecv_read_DEPENDENCIES) + @rm -f mq_sendrecv-read$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_read_OBJECTS) $(mq_sendrecv_read_LDADD) $(LIBS) + +mq_sendrecv-write$(EXEEXT): $(mq_sendrecv_write_OBJECTS) $(mq_sendrecv_write_DEPENDENCIES) $(EXTRA_mq_sendrecv_write_DEPENDENCIES) + @rm -f mq_sendrecv-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(mq_sendrecv_write_OBJECTS) $(mq_sendrecv_write_LDADD) $(LIBS) + +msg_control$(EXEEXT): $(msg_control_OBJECTS) $(msg_control_DEPENDENCIES) $(EXTRA_msg_control_DEPENDENCIES) + @rm -f msg_control$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_control_OBJECTS) $(msg_control_LDADD) $(LIBS) + +msg_control-v$(EXEEXT): $(msg_control_v_OBJECTS) $(msg_control_v_DEPENDENCIES) $(EXTRA_msg_control_v_DEPENDENCIES) + @rm -f msg_control-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_control_v_OBJECTS) $(msg_control_v_LDADD) $(LIBS) + +msg_name$(EXEEXT): $(msg_name_OBJECTS) $(msg_name_DEPENDENCIES) $(EXTRA_msg_name_DEPENDENCIES) + @rm -f msg_name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(msg_name_OBJECTS) $(msg_name_LDADD) $(LIBS) + +munlockall$(EXEEXT): $(munlockall_OBJECTS) $(munlockall_DEPENDENCIES) $(EXTRA_munlockall_DEPENDENCIES) + @rm -f munlockall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(munlockall_OBJECTS) $(munlockall_LDADD) $(LIBS) + +nanosleep$(EXEEXT): $(nanosleep_OBJECTS) $(nanosleep_DEPENDENCIES) $(EXTRA_nanosleep_DEPENDENCIES) + @rm -f nanosleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nanosleep_OBJECTS) $(nanosleep_LDADD) $(LIBS) + +net-accept-connect$(EXEEXT): $(net_accept_connect_OBJECTS) $(net_accept_connect_DEPENDENCIES) $(EXTRA_net_accept_connect_DEPENDENCIES) + @rm -f net-accept-connect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_accept_connect_OBJECTS) $(net_accept_connect_LDADD) $(LIBS) + +net-icmp_filter$(EXEEXT): $(net_icmp_filter_OBJECTS) $(net_icmp_filter_DEPENDENCIES) $(EXTRA_net_icmp_filter_DEPENDENCIES) + @rm -f net-icmp_filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_icmp_filter_OBJECTS) $(net_icmp_filter_LDADD) $(LIBS) + +net-sockaddr$(EXEEXT): $(net_sockaddr_OBJECTS) $(net_sockaddr_DEPENDENCIES) $(EXTRA_net_sockaddr_DEPENDENCIES) + @rm -f net-sockaddr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_sockaddr_OBJECTS) $(net_sockaddr_LDADD) $(LIBS) + +net-y-unix$(EXEEXT): $(net_y_unix_OBJECTS) $(net_y_unix_DEPENDENCIES) $(EXTRA_net_y_unix_DEPENDENCIES) + @rm -f net-y-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_y_unix_OBJECTS) $(net_y_unix_LDADD) $(LIBS) + +net-yy-inet$(EXEEXT): $(net_yy_inet_OBJECTS) $(net_yy_inet_DEPENDENCIES) $(EXTRA_net_yy_inet_DEPENDENCIES) + @rm -f net-yy-inet$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_inet_OBJECTS) $(net_yy_inet_LDADD) $(LIBS) + +net-yy-netlink$(EXEEXT): $(net_yy_netlink_OBJECTS) $(net_yy_netlink_DEPENDENCIES) $(EXTRA_net_yy_netlink_DEPENDENCIES) + @rm -f net-yy-netlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_netlink_OBJECTS) $(net_yy_netlink_LDADD) $(LIBS) + +net-yy-unix$(EXEEXT): $(net_yy_unix_OBJECTS) $(net_yy_unix_DEPENDENCIES) $(EXTRA_net_yy_unix_DEPENDENCIES) + @rm -f net-yy-unix$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(net_yy_unix_OBJECTS) $(net_yy_unix_LDADD) $(LIBS) + +netlink_inet_diag$(EXEEXT): $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_DEPENDENCIES) $(EXTRA_netlink_inet_diag_DEPENDENCIES) + @rm -f netlink_inet_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_inet_diag_OBJECTS) $(netlink_inet_diag_LDADD) $(LIBS) + +netlink_netlink_diag$(EXEEXT): $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_DEPENDENCIES) $(EXTRA_netlink_netlink_diag_DEPENDENCIES) + @rm -f netlink_netlink_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_netlink_diag_OBJECTS) $(netlink_netlink_diag_LDADD) $(LIBS) + +netlink_protocol$(EXEEXT): $(netlink_protocol_OBJECTS) $(netlink_protocol_DEPENDENCIES) $(EXTRA_netlink_protocol_DEPENDENCIES) + @rm -f netlink_protocol$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_protocol_OBJECTS) $(netlink_protocol_LDADD) $(LIBS) + +netlink_unix_diag$(EXEEXT): $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_DEPENDENCIES) $(EXTRA_netlink_unix_diag_DEPENDENCIES) + @rm -f netlink_unix_diag$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(netlink_unix_diag_OBJECTS) $(netlink_unix_diag_LDADD) $(LIBS) + +newfstatat$(EXEEXT): $(newfstatat_OBJECTS) $(newfstatat_DEPENDENCIES) $(EXTRA_newfstatat_DEPENDENCIES) + @rm -f newfstatat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(newfstatat_OBJECTS) $(newfstatat_LDADD) $(LIBS) + +nsyscalls$(EXEEXT): $(nsyscalls_OBJECTS) $(nsyscalls_DEPENDENCIES) $(EXTRA_nsyscalls_DEPENDENCIES) + @rm -f nsyscalls$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(nsyscalls_OBJECTS) $(nsyscalls_LDADD) $(LIBS) + +old_mmap$(EXEEXT): $(old_mmap_OBJECTS) $(old_mmap_DEPENDENCIES) $(EXTRA_old_mmap_DEPENDENCIES) + @rm -f old_mmap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(old_mmap_OBJECTS) $(old_mmap_LDADD) $(LIBS) + +oldfstat$(EXEEXT): $(oldfstat_OBJECTS) $(oldfstat_DEPENDENCIES) $(EXTRA_oldfstat_DEPENDENCIES) + @rm -f oldfstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldfstat_OBJECTS) $(oldfstat_LDADD) $(LIBS) + +oldlstat$(EXEEXT): $(oldlstat_OBJECTS) $(oldlstat_DEPENDENCIES) $(EXTRA_oldlstat_DEPENDENCIES) + @rm -f oldlstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldlstat_OBJECTS) $(oldlstat_LDADD) $(LIBS) + +oldselect$(EXEEXT): $(oldselect_OBJECTS) $(oldselect_DEPENDENCIES) $(EXTRA_oldselect_DEPENDENCIES) + @rm -f oldselect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldselect_OBJECTS) $(oldselect_LDADD) $(LIBS) + +oldstat$(EXEEXT): $(oldstat_OBJECTS) $(oldstat_DEPENDENCIES) $(EXTRA_oldstat_DEPENDENCIES) + @rm -f oldstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(oldstat_OBJECTS) $(oldstat_LDADD) $(LIBS) + +open$(EXEEXT): $(open_OBJECTS) $(open_DEPENDENCIES) $(EXTRA_open_DEPENDENCIES) + @rm -f open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(open_OBJECTS) $(open_LDADD) $(LIBS) + +openat$(EXEEXT): $(openat_OBJECTS) $(openat_DEPENDENCIES) $(EXTRA_openat_DEPENDENCIES) + @rm -f openat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(openat_OBJECTS) $(openat_LDADD) $(LIBS) + +pause$(EXEEXT): $(pause_OBJECTS) $(pause_DEPENDENCIES) $(EXTRA_pause_DEPENDENCIES) + @rm -f pause$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pause_OBJECTS) $(pause_LDADD) $(LIBS) + +pc$(EXEEXT): $(pc_OBJECTS) $(pc_DEPENDENCIES) $(EXTRA_pc_DEPENDENCIES) + @rm -f pc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pc_OBJECTS) $(pc_LDADD) $(LIBS) + +perf_event_open$(EXEEXT): $(perf_event_open_OBJECTS) $(perf_event_open_DEPENDENCIES) $(EXTRA_perf_event_open_DEPENDENCIES) + @rm -f perf_event_open$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_OBJECTS) $(perf_event_open_LDADD) $(LIBS) + +perf_event_open_nonverbose$(EXEEXT): $(perf_event_open_nonverbose_OBJECTS) $(perf_event_open_nonverbose_DEPENDENCIES) $(EXTRA_perf_event_open_nonverbose_DEPENDENCIES) + @rm -f perf_event_open_nonverbose$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_nonverbose_OBJECTS) $(perf_event_open_nonverbose_LDADD) $(LIBS) + +perf_event_open_unabbrev$(EXEEXT): $(perf_event_open_unabbrev_OBJECTS) $(perf_event_open_unabbrev_DEPENDENCIES) $(EXTRA_perf_event_open_unabbrev_DEPENDENCIES) + @rm -f perf_event_open_unabbrev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(perf_event_open_unabbrev_OBJECTS) $(perf_event_open_unabbrev_LDADD) $(LIBS) + +personality$(EXEEXT): $(personality_OBJECTS) $(personality_DEPENDENCIES) $(EXTRA_personality_DEPENDENCIES) + @rm -f personality$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(personality_OBJECTS) $(personality_LDADD) $(LIBS) + +pipe$(EXEEXT): $(pipe_OBJECTS) $(pipe_DEPENDENCIES) $(EXTRA_pipe_DEPENDENCIES) + @rm -f pipe$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pipe_OBJECTS) $(pipe_LDADD) $(LIBS) + +pipe2$(EXEEXT): $(pipe2_OBJECTS) $(pipe2_DEPENDENCIES) $(EXTRA_pipe2_DEPENDENCIES) + @rm -f pipe2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pipe2_OBJECTS) $(pipe2_LDADD) $(LIBS) + +pkey_alloc$(EXEEXT): $(pkey_alloc_OBJECTS) $(pkey_alloc_DEPENDENCIES) $(EXTRA_pkey_alloc_DEPENDENCIES) + @rm -f pkey_alloc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_alloc_OBJECTS) $(pkey_alloc_LDADD) $(LIBS) + +pkey_free$(EXEEXT): $(pkey_free_OBJECTS) $(pkey_free_DEPENDENCIES) $(EXTRA_pkey_free_DEPENDENCIES) + @rm -f pkey_free$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_free_OBJECTS) $(pkey_free_LDADD) $(LIBS) + +pkey_mprotect$(EXEEXT): $(pkey_mprotect_OBJECTS) $(pkey_mprotect_DEPENDENCIES) $(EXTRA_pkey_mprotect_DEPENDENCIES) + @rm -f pkey_mprotect$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pkey_mprotect_OBJECTS) $(pkey_mprotect_LDADD) $(LIBS) + +poll$(EXEEXT): $(poll_OBJECTS) $(poll_DEPENDENCIES) $(EXTRA_poll_DEPENDENCIES) + @rm -f poll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(poll_OBJECTS) $(poll_LDADD) $(LIBS) + +ppoll$(EXEEXT): $(ppoll_OBJECTS) $(ppoll_DEPENDENCIES) $(EXTRA_ppoll_DEPENDENCIES) + @rm -f ppoll$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ppoll_OBJECTS) $(ppoll_LDADD) $(LIBS) + +prctl-arg2-intptr$(EXEEXT): $(prctl_arg2_intptr_OBJECTS) $(prctl_arg2_intptr_DEPENDENCIES) $(EXTRA_prctl_arg2_intptr_DEPENDENCIES) + @rm -f prctl-arg2-intptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_arg2_intptr_OBJECTS) $(prctl_arg2_intptr_LDADD) $(LIBS) + +prctl-dumpable$(EXEEXT): $(prctl_dumpable_OBJECTS) $(prctl_dumpable_DEPENDENCIES) $(EXTRA_prctl_dumpable_DEPENDENCIES) + @rm -f prctl-dumpable$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_dumpable_OBJECTS) $(prctl_dumpable_LDADD) $(LIBS) + +prctl-name$(EXEEXT): $(prctl_name_OBJECTS) $(prctl_name_DEPENDENCIES) $(EXTRA_prctl_name_DEPENDENCIES) + @rm -f prctl-name$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_name_OBJECTS) $(prctl_name_LDADD) $(LIBS) + +prctl-no-args$(EXEEXT): $(prctl_no_args_OBJECTS) $(prctl_no_args_DEPENDENCIES) $(EXTRA_prctl_no_args_DEPENDENCIES) + @rm -f prctl-no-args$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_no_args_OBJECTS) $(prctl_no_args_LDADD) $(LIBS) + +prctl-pdeathsig$(EXEEXT): $(prctl_pdeathsig_OBJECTS) $(prctl_pdeathsig_DEPENDENCIES) $(EXTRA_prctl_pdeathsig_DEPENDENCIES) + @rm -f prctl-pdeathsig$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_pdeathsig_OBJECTS) $(prctl_pdeathsig_LDADD) $(LIBS) + +prctl-seccomp-filter-v$(EXEEXT): $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_DEPENDENCIES) $(EXTRA_prctl_seccomp_filter_v_DEPENDENCIES) + @rm -f prctl-seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_filter_v_OBJECTS) $(prctl_seccomp_filter_v_LDADD) $(LIBS) + +prctl-seccomp-strict$(EXEEXT): $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_DEPENDENCIES) $(EXTRA_prctl_seccomp_strict_DEPENDENCIES) + @rm -f prctl-seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_seccomp_strict_OBJECTS) $(prctl_seccomp_strict_LDADD) $(LIBS) + +prctl-securebits$(EXEEXT): $(prctl_securebits_OBJECTS) $(prctl_securebits_DEPENDENCIES) $(EXTRA_prctl_securebits_DEPENDENCIES) + @rm -f prctl-securebits$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_securebits_OBJECTS) $(prctl_securebits_LDADD) $(LIBS) + +prctl-tid_address$(EXEEXT): $(prctl_tid_address_OBJECTS) $(prctl_tid_address_DEPENDENCIES) $(EXTRA_prctl_tid_address_DEPENDENCIES) + @rm -f prctl-tid_address$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_tid_address_OBJECTS) $(prctl_tid_address_LDADD) $(LIBS) + +prctl-tsc$(EXEEXT): $(prctl_tsc_OBJECTS) $(prctl_tsc_DEPENDENCIES) $(EXTRA_prctl_tsc_DEPENDENCIES) + @rm -f prctl-tsc$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prctl_tsc_OBJECTS) $(prctl_tsc_LDADD) $(LIBS) + +pread64-pwrite64$(EXEEXT): $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_DEPENDENCIES) $(EXTRA_pread64_pwrite64_DEPENDENCIES) + @rm -f pread64-pwrite64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pread64_pwrite64_OBJECTS) $(pread64_pwrite64_LDADD) $(LIBS) + +preadv$(EXEEXT): $(preadv_OBJECTS) $(preadv_DEPENDENCIES) $(EXTRA_preadv_DEPENDENCIES) + @rm -f preadv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_OBJECTS) $(preadv_LDADD) $(LIBS) + +preadv-pwritev$(EXEEXT): $(preadv_pwritev_OBJECTS) $(preadv_pwritev_DEPENDENCIES) $(EXTRA_preadv_pwritev_DEPENDENCIES) + @rm -f preadv-pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv_pwritev_OBJECTS) $(preadv_pwritev_LDADD) $(LIBS) + +preadv2-pwritev2$(EXEEXT): $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_DEPENDENCIES) $(EXTRA_preadv2_pwritev2_DEPENDENCIES) + @rm -f preadv2-pwritev2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(preadv2_pwritev2_OBJECTS) $(preadv2_pwritev2_LDADD) $(LIBS) + +print_maxfd$(EXEEXT): $(print_maxfd_OBJECTS) $(print_maxfd_DEPENDENCIES) $(EXTRA_print_maxfd_DEPENDENCIES) + @rm -f print_maxfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(print_maxfd_OBJECTS) $(print_maxfd_LDADD) $(LIBS) + +printstr$(EXEEXT): $(printstr_OBJECTS) $(printstr_DEPENDENCIES) $(EXTRA_printstr_DEPENDENCIES) + @rm -f printstr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(printstr_OBJECTS) $(printstr_LDADD) $(LIBS) + +prlimit64$(EXEEXT): $(prlimit64_OBJECTS) $(prlimit64_DEPENDENCIES) $(EXTRA_prlimit64_DEPENDENCIES) + @rm -f prlimit64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(prlimit64_OBJECTS) $(prlimit64_LDADD) $(LIBS) + +process_vm_readv$(EXEEXT): $(process_vm_readv_OBJECTS) $(process_vm_readv_DEPENDENCIES) $(EXTRA_process_vm_readv_DEPENDENCIES) + @rm -f process_vm_readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(process_vm_readv_OBJECTS) $(process_vm_readv_LDADD) $(LIBS) + +process_vm_writev$(EXEEXT): $(process_vm_writev_OBJECTS) $(process_vm_writev_DEPENDENCIES) $(EXTRA_process_vm_writev_DEPENDENCIES) + @rm -f process_vm_writev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(process_vm_writev_OBJECTS) $(process_vm_writev_LDADD) $(LIBS) + +pselect6$(EXEEXT): $(pselect6_OBJECTS) $(pselect6_DEPENDENCIES) $(EXTRA_pselect6_DEPENDENCIES) + @rm -f pselect6$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pselect6_OBJECTS) $(pselect6_LDADD) $(LIBS) + +ptrace$(EXEEXT): $(ptrace_OBJECTS) $(ptrace_DEPENDENCIES) $(EXTRA_ptrace_DEPENDENCIES) + @rm -f ptrace$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ptrace_OBJECTS) $(ptrace_LDADD) $(LIBS) + +pwritev$(EXEEXT): $(pwritev_OBJECTS) $(pwritev_DEPENDENCIES) $(EXTRA_pwritev_DEPENDENCIES) + @rm -f pwritev$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(pwritev_OBJECTS) $(pwritev_LDADD) $(LIBS) + +qual_fault$(EXEEXT): $(qual_fault_OBJECTS) $(qual_fault_DEPENDENCIES) $(EXTRA_qual_fault_DEPENDENCIES) + @rm -f qual_fault$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_fault_OBJECTS) $(qual_fault_LDADD) $(LIBS) + +qual_inject-error-signal$(EXEEXT): $(qual_inject_error_signal_OBJECTS) $(qual_inject_error_signal_DEPENDENCIES) $(EXTRA_qual_inject_error_signal_DEPENDENCIES) + @rm -f qual_inject-error-signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_error_signal_OBJECTS) $(qual_inject_error_signal_LDADD) $(LIBS) + +qual_inject-retval$(EXEEXT): $(qual_inject_retval_OBJECTS) $(qual_inject_retval_DEPENDENCIES) $(EXTRA_qual_inject_retval_DEPENDENCIES) + @rm -f qual_inject-retval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_retval_OBJECTS) $(qual_inject_retval_LDADD) $(LIBS) + +qual_inject-signal$(EXEEXT): $(qual_inject_signal_OBJECTS) $(qual_inject_signal_DEPENDENCIES) $(EXTRA_qual_inject_signal_DEPENDENCIES) + @rm -f qual_inject-signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_inject_signal_OBJECTS) $(qual_inject_signal_LDADD) $(LIBS) + +qual_signal$(EXEEXT): $(qual_signal_OBJECTS) $(qual_signal_DEPENDENCIES) $(EXTRA_qual_signal_DEPENDENCIES) + @rm -f qual_signal$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(qual_signal_OBJECTS) $(qual_signal_LDADD) $(LIBS) + +quotactl$(EXEEXT): $(quotactl_OBJECTS) $(quotactl_DEPENDENCIES) $(EXTRA_quotactl_DEPENDENCIES) + @rm -f quotactl$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_OBJECTS) $(quotactl_LDADD) $(LIBS) + +quotactl-v$(EXEEXT): $(quotactl_v_OBJECTS) $(quotactl_v_DEPENDENCIES) $(EXTRA_quotactl_v_DEPENDENCIES) + @rm -f quotactl-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_v_OBJECTS) $(quotactl_v_LDADD) $(LIBS) + +quotactl-xfs$(EXEEXT): $(quotactl_xfs_OBJECTS) $(quotactl_xfs_DEPENDENCIES) $(EXTRA_quotactl_xfs_DEPENDENCIES) + @rm -f quotactl-xfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_xfs_OBJECTS) $(quotactl_xfs_LDADD) $(LIBS) + +quotactl-xfs-v$(EXEEXT): $(quotactl_xfs_v_OBJECTS) $(quotactl_xfs_v_DEPENDENCIES) $(EXTRA_quotactl_xfs_v_DEPENDENCIES) + @rm -f quotactl-xfs-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(quotactl_xfs_v_OBJECTS) $(quotactl_xfs_v_LDADD) $(LIBS) + +read-write$(EXEEXT): $(read_write_OBJECTS) $(read_write_DEPENDENCIES) $(EXTRA_read_write_DEPENDENCIES) + @rm -f read-write$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(read_write_OBJECTS) $(read_write_LDADD) $(LIBS) + +readahead$(EXEEXT): $(readahead_OBJECTS) $(readahead_DEPENDENCIES) $(EXTRA_readahead_DEPENDENCIES) + @rm -f readahead$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readahead_OBJECTS) $(readahead_LDADD) $(LIBS) + +readdir$(EXEEXT): $(readdir_OBJECTS) $(readdir_DEPENDENCIES) $(EXTRA_readdir_DEPENDENCIES) + @rm -f readdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readdir_OBJECTS) $(readdir_LDADD) $(LIBS) + +readlink$(EXEEXT): $(readlink_OBJECTS) $(readlink_DEPENDENCIES) $(EXTRA_readlink_DEPENDENCIES) + @rm -f readlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readlink_OBJECTS) $(readlink_LDADD) $(LIBS) + +readlinkat$(EXEEXT): $(readlinkat_OBJECTS) $(readlinkat_DEPENDENCIES) $(EXTRA_readlinkat_DEPENDENCIES) + @rm -f readlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readlinkat_OBJECTS) $(readlinkat_LDADD) $(LIBS) + +readv$(EXEEXT): $(readv_OBJECTS) $(readv_DEPENDENCIES) $(EXTRA_readv_DEPENDENCIES) + @rm -f readv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(readv_OBJECTS) $(readv_LDADD) $(LIBS) + +reboot$(EXEEXT): $(reboot_OBJECTS) $(reboot_DEPENDENCIES) $(EXTRA_reboot_DEPENDENCIES) + @rm -f reboot$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(reboot_OBJECTS) $(reboot_LDADD) $(LIBS) + +recvfrom$(EXEEXT): $(recvfrom_OBJECTS) $(recvfrom_DEPENDENCIES) $(EXTRA_recvfrom_DEPENDENCIES) + @rm -f recvfrom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvfrom_OBJECTS) $(recvfrom_LDADD) $(LIBS) + +recvmmsg-timeout$(EXEEXT): $(recvmmsg_timeout_OBJECTS) $(recvmmsg_timeout_DEPENDENCIES) $(EXTRA_recvmmsg_timeout_DEPENDENCIES) + @rm -f recvmmsg-timeout$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmmsg_timeout_OBJECTS) $(recvmmsg_timeout_LDADD) $(LIBS) + +recvmsg$(EXEEXT): $(recvmsg_OBJECTS) $(recvmsg_DEPENDENCIES) $(EXTRA_recvmsg_DEPENDENCIES) + @rm -f recvmsg$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(recvmsg_OBJECTS) $(recvmsg_LDADD) $(LIBS) + +redirect-fds$(EXEEXT): $(redirect_fds_OBJECTS) $(redirect_fds_DEPENDENCIES) $(EXTRA_redirect_fds_DEPENDENCIES) + @rm -f redirect-fds$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(redirect_fds_OBJECTS) $(redirect_fds_LDADD) $(LIBS) + +remap_file_pages$(EXEEXT): $(remap_file_pages_OBJECTS) $(remap_file_pages_DEPENDENCIES) $(EXTRA_remap_file_pages_DEPENDENCIES) + @rm -f remap_file_pages$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(remap_file_pages_OBJECTS) $(remap_file_pages_LDADD) $(LIBS) + +rename$(EXEEXT): $(rename_OBJECTS) $(rename_DEPENDENCIES) $(EXTRA_rename_DEPENDENCIES) + @rm -f rename$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rename_OBJECTS) $(rename_LDADD) $(LIBS) + +renameat$(EXEEXT): $(renameat_OBJECTS) $(renameat_DEPENDENCIES) $(EXTRA_renameat_DEPENDENCIES) + @rm -f renameat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat_OBJECTS) $(renameat_LDADD) $(LIBS) + +renameat2$(EXEEXT): $(renameat2_OBJECTS) $(renameat2_DEPENDENCIES) $(EXTRA_renameat2_DEPENDENCIES) + @rm -f renameat2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(renameat2_OBJECTS) $(renameat2_LDADD) $(LIBS) + +request_key$(EXEEXT): $(request_key_OBJECTS) $(request_key_DEPENDENCIES) $(EXTRA_request_key_DEPENDENCIES) + @rm -f request_key$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(request_key_OBJECTS) $(request_key_LDADD) $(LIBS) + +restart_syscall$(EXEEXT): $(restart_syscall_OBJECTS) $(restart_syscall_DEPENDENCIES) $(EXTRA_restart_syscall_DEPENDENCIES) + @rm -f restart_syscall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(restart_syscall_OBJECTS) $(restart_syscall_LDADD) $(LIBS) + +rmdir$(EXEEXT): $(rmdir_OBJECTS) $(rmdir_DEPENDENCIES) $(EXTRA_rmdir_DEPENDENCIES) + @rm -f rmdir$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rmdir_OBJECTS) $(rmdir_LDADD) $(LIBS) + +rt_sigpending$(EXEEXT): $(rt_sigpending_OBJECTS) $(rt_sigpending_DEPENDENCIES) $(EXTRA_rt_sigpending_DEPENDENCIES) + @rm -f rt_sigpending$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigpending_OBJECTS) $(rt_sigpending_LDADD) $(LIBS) + +rt_sigprocmask$(EXEEXT): $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_DEPENDENCIES) $(EXTRA_rt_sigprocmask_DEPENDENCIES) + @rm -f rt_sigprocmask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigprocmask_OBJECTS) $(rt_sigprocmask_LDADD) $(LIBS) + +rt_sigqueueinfo$(EXEEXT): $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_DEPENDENCIES) $(EXTRA_rt_sigqueueinfo_DEPENDENCIES) + @rm -f rt_sigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigqueueinfo_OBJECTS) $(rt_sigqueueinfo_LDADD) $(LIBS) + +rt_sigsuspend$(EXEEXT): $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_DEPENDENCIES) $(EXTRA_rt_sigsuspend_DEPENDENCIES) + @rm -f rt_sigsuspend$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigsuspend_OBJECTS) $(rt_sigsuspend_LDADD) $(LIBS) + +rt_sigtimedwait$(EXEEXT): $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_DEPENDENCIES) $(EXTRA_rt_sigtimedwait_DEPENDENCIES) + @rm -f rt_sigtimedwait$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_sigtimedwait_OBJECTS) $(rt_sigtimedwait_LDADD) $(LIBS) + +rt_tgsigqueueinfo$(EXEEXT): $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_DEPENDENCIES) $(EXTRA_rt_tgsigqueueinfo_DEPENDENCIES) + @rm -f rt_tgsigqueueinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(rt_tgsigqueueinfo_OBJECTS) $(rt_tgsigqueueinfo_LDADD) $(LIBS) + +sched_get_priority_mxx$(EXEEXT): $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_DEPENDENCIES) $(EXTRA_sched_get_priority_mxx_DEPENDENCIES) + @rm -f sched_get_priority_mxx$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_get_priority_mxx_OBJECTS) $(sched_get_priority_mxx_LDADD) $(LIBS) + +sched_rr_get_interval$(EXEEXT): $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_DEPENDENCIES) $(EXTRA_sched_rr_get_interval_DEPENDENCIES) + @rm -f sched_rr_get_interval$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_rr_get_interval_OBJECTS) $(sched_rr_get_interval_LDADD) $(LIBS) + +sched_xetaffinity$(EXEEXT): $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_DEPENDENCIES) $(EXTRA_sched_xetaffinity_DEPENDENCIES) + @rm -f sched_xetaffinity$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetaffinity_OBJECTS) $(sched_xetaffinity_LDADD) $(LIBS) + +sched_xetattr$(EXEEXT): $(sched_xetattr_OBJECTS) $(sched_xetattr_DEPENDENCIES) $(EXTRA_sched_xetattr_DEPENDENCIES) + @rm -f sched_xetattr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetattr_OBJECTS) $(sched_xetattr_LDADD) $(LIBS) + +sched_xetparam$(EXEEXT): $(sched_xetparam_OBJECTS) $(sched_xetparam_DEPENDENCIES) $(EXTRA_sched_xetparam_DEPENDENCIES) + @rm -f sched_xetparam$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetparam_OBJECTS) $(sched_xetparam_LDADD) $(LIBS) + +sched_xetscheduler$(EXEEXT): $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_DEPENDENCIES) $(EXTRA_sched_xetscheduler_DEPENDENCIES) + @rm -f sched_xetscheduler$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_xetscheduler_OBJECTS) $(sched_xetscheduler_LDADD) $(LIBS) + +sched_yield$(EXEEXT): $(sched_yield_OBJECTS) $(sched_yield_DEPENDENCIES) $(EXTRA_sched_yield_DEPENDENCIES) + @rm -f sched_yield$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sched_yield_OBJECTS) $(sched_yield_LDADD) $(LIBS) + +scm_rights$(EXEEXT): $(scm_rights_OBJECTS) $(scm_rights_DEPENDENCIES) $(EXTRA_scm_rights_DEPENDENCIES) + @rm -f scm_rights$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(scm_rights_OBJECTS) $(scm_rights_LDADD) $(LIBS) + +seccomp-filter$(EXEEXT): $(seccomp_filter_OBJECTS) $(seccomp_filter_DEPENDENCIES) $(EXTRA_seccomp_filter_DEPENDENCIES) + @rm -f seccomp-filter$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_OBJECTS) $(seccomp_filter_LDADD) $(LIBS) + +seccomp-filter-v$(EXEEXT): $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_DEPENDENCIES) $(EXTRA_seccomp_filter_v_DEPENDENCIES) + @rm -f seccomp-filter-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_filter_v_OBJECTS) $(seccomp_filter_v_LDADD) $(LIBS) + +seccomp-strict$(EXEEXT): $(seccomp_strict_OBJECTS) $(seccomp_strict_DEPENDENCIES) $(EXTRA_seccomp_strict_DEPENDENCIES) + @rm -f seccomp-strict$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(seccomp_strict_OBJECTS) $(seccomp_strict_LDADD) $(LIBS) + +select$(EXEEXT): $(select_OBJECTS) $(select_DEPENDENCIES) $(EXTRA_select_DEPENDENCIES) + @rm -f select$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(select_OBJECTS) $(select_LDADD) $(LIBS) + +semop$(EXEEXT): $(semop_OBJECTS) $(semop_DEPENDENCIES) $(EXTRA_semop_DEPENDENCIES) + @rm -f semop$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(semop_OBJECTS) $(semop_LDADD) $(LIBS) + +sendfile$(EXEEXT): $(sendfile_OBJECTS) $(sendfile_DEPENDENCIES) $(EXTRA_sendfile_DEPENDENCIES) + @rm -f sendfile$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sendfile_OBJECTS) $(sendfile_LDADD) $(LIBS) + +sendfile64$(EXEEXT): $(sendfile64_OBJECTS) $(sendfile64_DEPENDENCIES) $(EXTRA_sendfile64_DEPENDENCIES) + @rm -f sendfile64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sendfile64_OBJECTS) $(sendfile64_LDADD) $(LIBS) + +set_mempolicy$(EXEEXT): $(set_mempolicy_OBJECTS) $(set_mempolicy_DEPENDENCIES) $(EXTRA_set_mempolicy_DEPENDENCIES) + @rm -f set_mempolicy$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_mempolicy_OBJECTS) $(set_mempolicy_LDADD) $(LIBS) + +set_ptracer_any$(EXEEXT): $(set_ptracer_any_OBJECTS) $(set_ptracer_any_DEPENDENCIES) $(EXTRA_set_ptracer_any_DEPENDENCIES) + @rm -f set_ptracer_any$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(set_ptracer_any_OBJECTS) $(set_ptracer_any_LDADD) $(LIBS) + +setdomainname$(EXEEXT): $(setdomainname_OBJECTS) $(setdomainname_DEPENDENCIES) $(EXTRA_setdomainname_DEPENDENCIES) + @rm -f setdomainname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setdomainname_OBJECTS) $(setdomainname_LDADD) $(LIBS) + +setfsgid$(EXEEXT): $(setfsgid_OBJECTS) $(setfsgid_DEPENDENCIES) $(EXTRA_setfsgid_DEPENDENCIES) + @rm -f setfsgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid_OBJECTS) $(setfsgid_LDADD) $(LIBS) + +setfsgid32$(EXEEXT): $(setfsgid32_OBJECTS) $(setfsgid32_DEPENDENCIES) $(EXTRA_setfsgid32_DEPENDENCIES) + @rm -f setfsgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsgid32_OBJECTS) $(setfsgid32_LDADD) $(LIBS) + +setfsuid$(EXEEXT): $(setfsuid_OBJECTS) $(setfsuid_DEPENDENCIES) $(EXTRA_setfsuid_DEPENDENCIES) + @rm -f setfsuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid_OBJECTS) $(setfsuid_LDADD) $(LIBS) + +setfsuid32$(EXEEXT): $(setfsuid32_OBJECTS) $(setfsuid32_DEPENDENCIES) $(EXTRA_setfsuid32_DEPENDENCIES) + @rm -f setfsuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setfsuid32_OBJECTS) $(setfsuid32_LDADD) $(LIBS) + +setgid$(EXEEXT): $(setgid_OBJECTS) $(setgid_DEPENDENCIES) $(EXTRA_setgid_DEPENDENCIES) + @rm -f setgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid_OBJECTS) $(setgid_LDADD) $(LIBS) + +setgid32$(EXEEXT): $(setgid32_OBJECTS) $(setgid32_DEPENDENCIES) $(EXTRA_setgid32_DEPENDENCIES) + @rm -f setgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgid32_OBJECTS) $(setgid32_LDADD) $(LIBS) + +setgroups$(EXEEXT): $(setgroups_OBJECTS) $(setgroups_DEPENDENCIES) $(EXTRA_setgroups_DEPENDENCIES) + @rm -f setgroups$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups_OBJECTS) $(setgroups_LDADD) $(LIBS) + +setgroups32$(EXEEXT): $(setgroups32_OBJECTS) $(setgroups32_DEPENDENCIES) $(EXTRA_setgroups32_DEPENDENCIES) + @rm -f setgroups32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setgroups32_OBJECTS) $(setgroups32_LDADD) $(LIBS) + +sethostname$(EXEEXT): $(sethostname_OBJECTS) $(sethostname_DEPENDENCIES) $(EXTRA_sethostname_DEPENDENCIES) + @rm -f sethostname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sethostname_OBJECTS) $(sethostname_LDADD) $(LIBS) + +setns$(EXEEXT): $(setns_OBJECTS) $(setns_DEPENDENCIES) $(EXTRA_setns_DEPENDENCIES) + @rm -f setns$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setns_OBJECTS) $(setns_LDADD) $(LIBS) + +setregid$(EXEEXT): $(setregid_OBJECTS) $(setregid_DEPENDENCIES) $(EXTRA_setregid_DEPENDENCIES) + @rm -f setregid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid_OBJECTS) $(setregid_LDADD) $(LIBS) + +setregid32$(EXEEXT): $(setregid32_OBJECTS) $(setregid32_DEPENDENCIES) $(EXTRA_setregid32_DEPENDENCIES) + @rm -f setregid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setregid32_OBJECTS) $(setregid32_LDADD) $(LIBS) + +setresgid$(EXEEXT): $(setresgid_OBJECTS) $(setresgid_DEPENDENCIES) $(EXTRA_setresgid_DEPENDENCIES) + @rm -f setresgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid_OBJECTS) $(setresgid_LDADD) $(LIBS) + +setresgid32$(EXEEXT): $(setresgid32_OBJECTS) $(setresgid32_DEPENDENCIES) $(EXTRA_setresgid32_DEPENDENCIES) + @rm -f setresgid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresgid32_OBJECTS) $(setresgid32_LDADD) $(LIBS) + +setresuid$(EXEEXT): $(setresuid_OBJECTS) $(setresuid_DEPENDENCIES) $(EXTRA_setresuid_DEPENDENCIES) + @rm -f setresuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid_OBJECTS) $(setresuid_LDADD) $(LIBS) + +setresuid32$(EXEEXT): $(setresuid32_OBJECTS) $(setresuid32_DEPENDENCIES) $(EXTRA_setresuid32_DEPENDENCIES) + @rm -f setresuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setresuid32_OBJECTS) $(setresuid32_LDADD) $(LIBS) + +setreuid$(EXEEXT): $(setreuid_OBJECTS) $(setreuid_DEPENDENCIES) $(EXTRA_setreuid_DEPENDENCIES) + @rm -f setreuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid_OBJECTS) $(setreuid_LDADD) $(LIBS) + +setreuid32$(EXEEXT): $(setreuid32_OBJECTS) $(setreuid32_DEPENDENCIES) $(EXTRA_setreuid32_DEPENDENCIES) + @rm -f setreuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setreuid32_OBJECTS) $(setreuid32_LDADD) $(LIBS) + +setrlimit$(EXEEXT): $(setrlimit_OBJECTS) $(setrlimit_DEPENDENCIES) $(EXTRA_setrlimit_DEPENDENCIES) + @rm -f setrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setrlimit_OBJECTS) $(setrlimit_LDADD) $(LIBS) + +setuid$(EXEEXT): $(setuid_OBJECTS) $(setuid_DEPENDENCIES) $(EXTRA_setuid_DEPENDENCIES) + @rm -f setuid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid_OBJECTS) $(setuid_LDADD) $(LIBS) + +setuid32$(EXEEXT): $(setuid32_OBJECTS) $(setuid32_DEPENDENCIES) $(EXTRA_setuid32_DEPENDENCIES) + @rm -f setuid32$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(setuid32_OBJECTS) $(setuid32_LDADD) $(LIBS) + +shmxt$(EXEEXT): $(shmxt_OBJECTS) $(shmxt_DEPENDENCIES) $(EXTRA_shmxt_DEPENDENCIES) + @rm -f shmxt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shmxt_OBJECTS) $(shmxt_LDADD) $(LIBS) + +shutdown$(EXEEXT): $(shutdown_OBJECTS) $(shutdown_DEPENDENCIES) $(EXTRA_shutdown_DEPENDENCIES) + @rm -f shutdown$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(shutdown_OBJECTS) $(shutdown_LDADD) $(LIBS) + +sigaction$(EXEEXT): $(sigaction_OBJECTS) $(sigaction_DEPENDENCIES) $(EXTRA_sigaction_DEPENDENCIES) + @rm -f sigaction$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigaction_OBJECTS) $(sigaction_LDADD) $(LIBS) + +sigaltstack$(EXEEXT): $(sigaltstack_OBJECTS) $(sigaltstack_DEPENDENCIES) $(EXTRA_sigaltstack_DEPENDENCIES) + @rm -f sigaltstack$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigaltstack_OBJECTS) $(sigaltstack_LDADD) $(LIBS) + +siginfo$(EXEEXT): $(siginfo_OBJECTS) $(siginfo_DEPENDENCIES) $(EXTRA_siginfo_DEPENDENCIES) + @rm -f siginfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(siginfo_OBJECTS) $(siginfo_LDADD) $(LIBS) + +signal_receive$(EXEEXT): $(signal_receive_OBJECTS) $(signal_receive_DEPENDENCIES) $(EXTRA_signal_receive_DEPENDENCIES) + @rm -f signal_receive$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(signal_receive_OBJECTS) $(signal_receive_LDADD) $(LIBS) + +signalfd4$(EXEEXT): $(signalfd4_OBJECTS) $(signalfd4_DEPENDENCIES) $(EXTRA_signalfd4_DEPENDENCIES) + @rm -f signalfd4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(signalfd4_OBJECTS) $(signalfd4_LDADD) $(LIBS) + +sigreturn$(EXEEXT): $(sigreturn_OBJECTS) $(sigreturn_DEPENDENCIES) $(EXTRA_sigreturn_DEPENDENCIES) + @rm -f sigreturn$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sigreturn_OBJECTS) $(sigreturn_LDADD) $(LIBS) + +sleep$(EXEEXT): $(sleep_OBJECTS) $(sleep_DEPENDENCIES) $(EXTRA_sleep_DEPENDENCIES) + @rm -f sleep$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sleep_OBJECTS) $(sleep_LDADD) $(LIBS) + +socketcall$(EXEEXT): $(socketcall_OBJECTS) $(socketcall_DEPENDENCIES) $(EXTRA_socketcall_DEPENDENCIES) + @rm -f socketcall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(socketcall_OBJECTS) $(socketcall_LDADD) $(LIBS) + +splice$(EXEEXT): $(splice_OBJECTS) $(splice_DEPENDENCIES) $(EXTRA_splice_DEPENDENCIES) + @rm -f splice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(splice_OBJECTS) $(splice_LDADD) $(LIBS) + +stack-fcall$(EXEEXT): $(stack_fcall_OBJECTS) $(stack_fcall_DEPENDENCIES) $(EXTRA_stack_fcall_DEPENDENCIES) + @rm -f stack-fcall$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stack_fcall_OBJECTS) $(stack_fcall_LDADD) $(LIBS) + +stat$(EXEEXT): $(stat_OBJECTS) $(stat_DEPENDENCIES) $(EXTRA_stat_DEPENDENCIES) + @rm -f stat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stat_OBJECTS) $(stat_LDADD) $(LIBS) + +stat64$(EXEEXT): $(stat64_OBJECTS) $(stat64_DEPENDENCIES) $(EXTRA_stat64_DEPENDENCIES) + @rm -f stat64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(stat64_OBJECTS) $(stat64_LDADD) $(LIBS) + +statfs$(EXEEXT): $(statfs_OBJECTS) $(statfs_DEPENDENCIES) $(EXTRA_statfs_DEPENDENCIES) + @rm -f statfs$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs_OBJECTS) $(statfs_LDADD) $(LIBS) + +statfs64$(EXEEXT): $(statfs64_OBJECTS) $(statfs64_DEPENDENCIES) $(EXTRA_statfs64_DEPENDENCIES) + @rm -f statfs64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(statfs64_OBJECTS) $(statfs64_LDADD) $(LIBS) + +swap$(EXEEXT): $(swap_OBJECTS) $(swap_DEPENDENCIES) $(EXTRA_swap_DEPENDENCIES) + @rm -f swap$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(swap_OBJECTS) $(swap_LDADD) $(LIBS) + +symlink$(EXEEXT): $(symlink_OBJECTS) $(symlink_DEPENDENCIES) $(EXTRA_symlink_DEPENDENCIES) + @rm -f symlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlink_OBJECTS) $(symlink_LDADD) $(LIBS) + +symlinkat$(EXEEXT): $(symlinkat_OBJECTS) $(symlinkat_DEPENDENCIES) $(EXTRA_symlinkat_DEPENDENCIES) + @rm -f symlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(symlinkat_OBJECTS) $(symlinkat_LDADD) $(LIBS) + +sync$(EXEEXT): $(sync_OBJECTS) $(sync_DEPENDENCIES) $(EXTRA_sync_DEPENDENCIES) + @rm -f sync$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_OBJECTS) $(sync_LDADD) $(LIBS) + +sync_file_range$(EXEEXT): $(sync_file_range_OBJECTS) $(sync_file_range_DEPENDENCIES) $(EXTRA_sync_file_range_DEPENDENCIES) + @rm -f sync_file_range$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range_OBJECTS) $(sync_file_range_LDADD) $(LIBS) + +sync_file_range2$(EXEEXT): $(sync_file_range2_OBJECTS) $(sync_file_range2_DEPENDENCIES) $(EXTRA_sync_file_range2_DEPENDENCIES) + @rm -f sync_file_range2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sync_file_range2_OBJECTS) $(sync_file_range2_LDADD) $(LIBS) + +sysinfo$(EXEEXT): $(sysinfo_OBJECTS) $(sysinfo_DEPENDENCIES) $(EXTRA_sysinfo_DEPENDENCIES) + @rm -f sysinfo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(sysinfo_OBJECTS) $(sysinfo_LDADD) $(LIBS) + +syslog$(EXEEXT): $(syslog_OBJECTS) $(syslog_DEPENDENCIES) $(EXTRA_syslog_DEPENDENCIES) + @rm -f syslog$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(syslog_OBJECTS) $(syslog_LDADD) $(LIBS) + +tee$(EXEEXT): $(tee_OBJECTS) $(tee_DEPENDENCIES) $(EXTRA_tee_DEPENDENCIES) + @rm -f tee$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tee_OBJECTS) $(tee_LDADD) $(LIBS) + +threads-execve$(EXEEXT): $(threads_execve_OBJECTS) $(threads_execve_DEPENDENCIES) $(EXTRA_threads_execve_DEPENDENCIES) + @rm -f threads-execve$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(threads_execve_OBJECTS) $(threads_execve_LDADD) $(LIBS) + +time$(EXEEXT): $(time_OBJECTS) $(time_DEPENDENCIES) $(EXTRA_time_DEPENDENCIES) + @rm -f time$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(time_OBJECTS) $(time_LDADD) $(LIBS) + +timer_create$(EXEEXT): $(timer_create_OBJECTS) $(timer_create_DEPENDENCIES) $(EXTRA_timer_create_DEPENDENCIES) + @rm -f timer_create$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timer_create_OBJECTS) $(timer_create_LDADD) $(LIBS) + +timer_xettime$(EXEEXT): $(timer_xettime_OBJECTS) $(timer_xettime_DEPENDENCIES) $(EXTRA_timer_xettime_DEPENDENCIES) + @rm -f timer_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timer_xettime_OBJECTS) $(timer_xettime_LDADD) $(LIBS) + +timerfd_xettime$(EXEEXT): $(timerfd_xettime_OBJECTS) $(timerfd_xettime_DEPENDENCIES) $(EXTRA_timerfd_xettime_DEPENDENCIES) + @rm -f timerfd_xettime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(timerfd_xettime_OBJECTS) $(timerfd_xettime_LDADD) $(LIBS) + +times$(EXEEXT): $(times_OBJECTS) $(times_DEPENDENCIES) $(EXTRA_times_DEPENDENCIES) + @rm -f times$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(times_OBJECTS) $(times_LDADD) $(LIBS) + +times-fail$(EXEEXT): $(times_fail_OBJECTS) $(times_fail_DEPENDENCIES) $(EXTRA_times_fail_DEPENDENCIES) + @rm -f times-fail$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(times_fail_OBJECTS) $(times_fail_LDADD) $(LIBS) + +truncate$(EXEEXT): $(truncate_OBJECTS) $(truncate_DEPENDENCIES) $(EXTRA_truncate_DEPENDENCIES) + @rm -f truncate$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(truncate_OBJECTS) $(truncate_LDADD) $(LIBS) + +truncate64$(EXEEXT): $(truncate64_OBJECTS) $(truncate64_DEPENDENCIES) $(EXTRA_truncate64_DEPENDENCIES) + @rm -f truncate64$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(truncate64_OBJECTS) $(truncate64_LDADD) $(LIBS) + +ugetrlimit$(EXEEXT): $(ugetrlimit_OBJECTS) $(ugetrlimit_DEPENDENCIES) $(EXTRA_ugetrlimit_DEPENDENCIES) + @rm -f ugetrlimit$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ugetrlimit_OBJECTS) $(ugetrlimit_LDADD) $(LIBS) + +uio$(EXEEXT): $(uio_OBJECTS) $(uio_DEPENDENCIES) $(EXTRA_uio_DEPENDENCIES) + @rm -f uio$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uio_OBJECTS) $(uio_LDADD) $(LIBS) + +umask$(EXEEXT): $(umask_OBJECTS) $(umask_DEPENDENCIES) $(EXTRA_umask_DEPENDENCIES) + @rm -f umask$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umask_OBJECTS) $(umask_LDADD) $(LIBS) + +umount$(EXEEXT): $(umount_OBJECTS) $(umount_DEPENDENCIES) $(EXTRA_umount_DEPENDENCIES) + @rm -f umount$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umount_OBJECTS) $(umount_LDADD) $(LIBS) + +umount2$(EXEEXT): $(umount2_OBJECTS) $(umount2_DEPENDENCIES) $(EXTRA_umount2_DEPENDENCIES) + @rm -f umount2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umount2_OBJECTS) $(umount2_LDADD) $(LIBS) + +umoven-illptr$(EXEEXT): $(umoven_illptr_OBJECTS) $(umoven_illptr_DEPENDENCIES) $(EXTRA_umoven_illptr_DEPENDENCIES) + @rm -f umoven-illptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umoven_illptr_OBJECTS) $(umoven_illptr_LDADD) $(LIBS) + +umovestr$(EXEEXT): $(umovestr_OBJECTS) $(umovestr_DEPENDENCIES) $(EXTRA_umovestr_DEPENDENCIES) + @rm -f umovestr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr_OBJECTS) $(umovestr_LDADD) $(LIBS) + +umovestr-illptr$(EXEEXT): $(umovestr_illptr_OBJECTS) $(umovestr_illptr_DEPENDENCIES) $(EXTRA_umovestr_illptr_DEPENDENCIES) + @rm -f umovestr-illptr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr_illptr_OBJECTS) $(umovestr_illptr_LDADD) $(LIBS) + +umovestr2$(EXEEXT): $(umovestr2_OBJECTS) $(umovestr2_DEPENDENCIES) $(EXTRA_umovestr2_DEPENDENCIES) + @rm -f umovestr2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr2_OBJECTS) $(umovestr2_LDADD) $(LIBS) + +umovestr3$(EXEEXT): $(umovestr3_OBJECTS) $(umovestr3_DEPENDENCIES) $(EXTRA_umovestr3_DEPENDENCIES) + @rm -f umovestr3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(umovestr3_OBJECTS) $(umovestr3_LDADD) $(LIBS) + +uname$(EXEEXT): $(uname_OBJECTS) $(uname_DEPENDENCIES) $(EXTRA_uname_DEPENDENCIES) + @rm -f uname$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(uname_OBJECTS) $(uname_LDADD) $(LIBS) + +unix-pair-send-recv$(EXEEXT): $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_DEPENDENCIES) $(EXTRA_unix_pair_send_recv_DEPENDENCIES) + @rm -f unix-pair-send-recv$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unix_pair_send_recv_OBJECTS) $(unix_pair_send_recv_LDADD) $(LIBS) + +unix-pair-sendto-recvfrom$(EXEEXT): $(unix_pair_sendto_recvfrom_OBJECTS) $(unix_pair_sendto_recvfrom_DEPENDENCIES) $(EXTRA_unix_pair_sendto_recvfrom_DEPENDENCIES) + @rm -f unix-pair-sendto-recvfrom$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unix_pair_sendto_recvfrom_OBJECTS) $(unix_pair_sendto_recvfrom_LDADD) $(LIBS) + +unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES) $(EXTRA_unlink_DEPENDENCIES) + @rm -f unlink$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS) + +unlinkat$(EXEEXT): $(unlinkat_OBJECTS) $(unlinkat_DEPENDENCIES) $(EXTRA_unlinkat_DEPENDENCIES) + @rm -f unlinkat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unlinkat_OBJECTS) $(unlinkat_LDADD) $(LIBS) + +unshare$(EXEEXT): $(unshare_OBJECTS) $(unshare_DEPENDENCIES) $(EXTRA_unshare_DEPENDENCIES) + @rm -f unshare$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(unshare_OBJECTS) $(unshare_LDADD) $(LIBS) + +userfaultfd$(EXEEXT): $(userfaultfd_OBJECTS) $(userfaultfd_DEPENDENCIES) $(EXTRA_userfaultfd_DEPENDENCIES) + @rm -f userfaultfd$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(userfaultfd_OBJECTS) $(userfaultfd_LDADD) $(LIBS) + +ustat$(EXEEXT): $(ustat_OBJECTS) $(ustat_DEPENDENCIES) $(EXTRA_ustat_DEPENDENCIES) + @rm -f ustat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(ustat_OBJECTS) $(ustat_LDADD) $(LIBS) + +utime$(EXEEXT): $(utime_OBJECTS) $(utime_DEPENDENCIES) $(EXTRA_utime_DEPENDENCIES) + @rm -f utime$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utime_OBJECTS) $(utime_LDADD) $(LIBS) + +utimensat$(EXEEXT): $(utimensat_OBJECTS) $(utimensat_DEPENDENCIES) $(EXTRA_utimensat_DEPENDENCIES) + @rm -f utimensat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimensat_OBJECTS) $(utimensat_LDADD) $(LIBS) + +utimes$(EXEEXT): $(utimes_OBJECTS) $(utimes_DEPENDENCIES) $(EXTRA_utimes_DEPENDENCIES) + @rm -f utimes$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(utimes_OBJECTS) $(utimes_LDADD) $(LIBS) + +vfork-f$(EXEEXT): $(vfork_f_OBJECTS) $(vfork_f_DEPENDENCIES) $(EXTRA_vfork_f_DEPENDENCIES) + @rm -f vfork-f$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vfork_f_OBJECTS) $(vfork_f_LDADD) $(LIBS) + +vhangup$(EXEEXT): $(vhangup_OBJECTS) $(vhangup_DEPENDENCIES) $(EXTRA_vhangup_DEPENDENCIES) + @rm -f vhangup$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vhangup_OBJECTS) $(vhangup_LDADD) $(LIBS) + +vmsplice$(EXEEXT): $(vmsplice_OBJECTS) $(vmsplice_DEPENDENCIES) $(EXTRA_vmsplice_DEPENDENCIES) + @rm -f vmsplice$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(vmsplice_OBJECTS) $(vmsplice_LDADD) $(LIBS) + +wait4$(EXEEXT): $(wait4_OBJECTS) $(wait4_DEPENDENCIES) $(EXTRA_wait4_DEPENDENCIES) + @rm -f wait4$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wait4_OBJECTS) $(wait4_LDADD) $(LIBS) + +wait4-v$(EXEEXT): $(wait4_v_OBJECTS) $(wait4_v_DEPENDENCIES) $(EXTRA_wait4_v_DEPENDENCIES) + @rm -f wait4-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(wait4_v_OBJECTS) $(wait4_v_LDADD) $(LIBS) + +waitid$(EXEEXT): $(waitid_OBJECTS) $(waitid_DEPENDENCIES) $(EXTRA_waitid_DEPENDENCIES) + @rm -f waitid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitid_OBJECTS) $(waitid_LDADD) $(LIBS) + +waitid-v$(EXEEXT): $(waitid_v_OBJECTS) $(waitid_v_DEPENDENCIES) $(EXTRA_waitid_v_DEPENDENCIES) + @rm -f waitid-v$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitid_v_OBJECTS) $(waitid_v_LDADD) $(LIBS) + +waitpid$(EXEEXT): $(waitpid_OBJECTS) $(waitpid_DEPENDENCIES) $(EXTRA_waitpid_DEPENDENCIES) + @rm -f waitpid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(waitpid_OBJECTS) $(waitpid_LDADD) $(LIBS) + +xattr$(EXEEXT): $(xattr_OBJECTS) $(xattr_DEPENDENCIES) $(EXTRA_xattr_DEPENDENCIES) + @rm -f xattr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xattr_OBJECTS) $(xattr_LDADD) $(LIBS) + +xattr-strings$(EXEEXT): $(xattr_strings_OBJECTS) $(xattr_strings_DEPENDENCIES) $(EXTRA_xattr_strings_DEPENDENCIES) + @rm -f xattr-strings$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xattr_strings_OBJECTS) $(xattr_strings_LDADD) $(LIBS) + +xet_robust_list$(EXEEXT): $(xet_robust_list_OBJECTS) $(xet_robust_list_DEPENDENCIES) $(EXTRA_xet_robust_list_DEPENDENCIES) + @rm -f xet_robust_list$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xet_robust_list_OBJECTS) $(xet_robust_list_LDADD) $(LIBS) + +xetitimer$(EXEEXT): $(xetitimer_OBJECTS) $(xetitimer_DEPENDENCIES) $(EXTRA_xetitimer_DEPENDENCIES) + @rm -f xetitimer$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetitimer_OBJECTS) $(xetitimer_LDADD) $(LIBS) + +xetpgid$(EXEEXT): $(xetpgid_OBJECTS) $(xetpgid_DEPENDENCIES) $(EXTRA_xetpgid_DEPENDENCIES) + @rm -f xetpgid$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpgid_OBJECTS) $(xetpgid_LDADD) $(LIBS) + +xetpriority$(EXEEXT): $(xetpriority_OBJECTS) $(xetpriority_DEPENDENCIES) $(EXTRA_xetpriority_DEPENDENCIES) + @rm -f xetpriority$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xetpriority_OBJECTS) $(xetpriority_LDADD) $(LIBS) + +xettimeofday$(EXEEXT): $(xettimeofday_OBJECTS) $(xettimeofday_DEPENDENCIES) $(EXTRA_xettimeofday_DEPENDENCIES) + @rm -f xettimeofday$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(xettimeofday_OBJECTS) $(xettimeofday_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_newselect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accept.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accept4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/access.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acct.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add_key.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alarm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/answer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-f-p-cmd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-f-p.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-p-cmd-cmd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attach-p-cmd-p.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bpf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/brk.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btrfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caps-abbrev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caps.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chroot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_adjtime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_nanosleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clock_xettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/count-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/creat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delete_module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_create1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_ctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_pwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoll_wait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erestartsys.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execveat-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execveat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fadvise64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fadvise64_64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fallocate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fanotify_init.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fanotify_mark.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchownat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdatasync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_handle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter-unavailable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/finit_module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fork-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat64-fstat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat64-fstatat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate64-ftruncate64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/futex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/futimesat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_mempolicy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcpu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdents.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdents64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getegid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getegid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geteuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geteuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpeername.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpgrp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrandom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getresuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrlimit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrusage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getsid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getsockname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getxxid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet-cmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init_module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inotify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inotify_init1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_block.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_dm-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_dm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_evdev-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_evdev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_loop-nv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_loop-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_loop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_mtd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_rtc-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_rtc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_scsi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_sg_io_v3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_sg_io_v4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_sock_gifconf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_uffdio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl_v4l2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioperm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iopl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioprio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip_mreq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_msg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_msgbuf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_sem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_shm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kcmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kexec_file_load.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kexec_load.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kill.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ksysent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-errno2name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-error_msg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-fill_memory.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-get_page_size.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-hexdump_strdup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-hexquote_strndup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-inode_of_sockfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-libmmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-libsocketcall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-overflowuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-pipe_maxfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-print_quoted_string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-printflags.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-printxval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-signal2name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-sprintrc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-tail_alloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtests_a-tprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llseek.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup_dcookie.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat64-lstat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbind.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/membarrier.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memfd_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/migrate_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mincore.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdirat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mknodat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlock2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlockall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap64-mmap64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg-silent.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg_name-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmsg_name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/move_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq_sendrecv-read.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq_sendrecv-write.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mq_sendrecv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_control-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_control.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/munlockall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-accept-connect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-icmp_filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-sockaddr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-y-unix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-inet.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-netlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net-yy-unix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_inet_diag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_netlink_diag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_protocol.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlink_unix_diag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newfstatat-newfstatat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsyscalls.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/old_mmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldfstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldlstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldselect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oldstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pause.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_event_open.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_event_open_nonverbose.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perf_event_open_unabbrev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/personality.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkey_alloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkey_free.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkey_mprotect.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppoll.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-arg2-intptr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-dumpable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-name.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-no-args.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-pdeathsig.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-seccomp-filter-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-seccomp-strict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-securebits.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-tid_address.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prctl-tsc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv-preadv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv2-pwritev2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preadv_pwritev-preadv-pwritev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_maxfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printstr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prlimit64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process_vm_readv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process_vm_writev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pselect6.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptrace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwritev-pwritev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_fault.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_inject-error-signal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_inject-retval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_inject-signal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qual_signal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotactl-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotactl-xfs-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotactl-xfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotactl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read-write.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readahead.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reboot.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvfrom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvmmsg-timeout.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/redirect-fds.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remap_file_pages.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renameat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renameat2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/request_key.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/restart_syscall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigpending.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigprocmask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigqueueinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigsuspend.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_sigtimedwait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rt_tgsigqueueinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_get_priority_mxx.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_rr_get_interval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetaffinity.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetattr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetparam.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_xetscheduler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_yield.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scm_rights.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-filter-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seccomp-strict.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/semop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendfile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendfile64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_mempolicy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_ptracer_any.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setdomainname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfsuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setgroups32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sethostname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setns.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setregid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setregid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresgid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setresuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setreuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setreuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setrlimit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setuid32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shmxt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shutdown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaltstack.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/siginfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal_receive.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signalfd4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigreturn.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socketcall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splice.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-0.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall-3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack-fcall.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat64-stat64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs-statfs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statfs64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_file_range.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_file_range2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syslog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tee.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threads-execve.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer_xettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timerfd_xettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/times-fail.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/times.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/truncate64-truncate64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ugetrlimit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uio-uio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umoven-illptr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr-illptr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umovestr3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix-pair-send-recv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix-pair-sendto-recvfrom.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unshare.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userfaultfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ustat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimensat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utimes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfork-f.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vhangup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vmsplice.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wait4-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wait4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/waitid-v.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/waitid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/waitpid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattr-strings.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xet_robust_list.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetitimer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetpgid.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xetpriority.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xettimeofday.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +libtests_a-errno2name.o: errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.o -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.o `test -f 'errno2name.c' || echo '$(srcdir)/'`errno2name.c + +libtests_a-errno2name.obj: errno2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-errno2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-errno2name.Tpo -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-errno2name.Tpo $(DEPDIR)/libtests_a-errno2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='errno2name.c' object='libtests_a-errno2name.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-errno2name.obj `if test -f 'errno2name.c'; then $(CYGPATH_W) 'errno2name.c'; else $(CYGPATH_W) '$(srcdir)/errno2name.c'; fi` + +libtests_a-error_msg.o: error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.o -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.o `test -f 'error_msg.c' || echo '$(srcdir)/'`error_msg.c + +libtests_a-error_msg.obj: error_msg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-error_msg.obj -MD -MP -MF $(DEPDIR)/libtests_a-error_msg.Tpo -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-error_msg.Tpo $(DEPDIR)/libtests_a-error_msg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error_msg.c' object='libtests_a-error_msg.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-error_msg.obj `if test -f 'error_msg.c'; then $(CYGPATH_W) 'error_msg.c'; else $(CYGPATH_W) '$(srcdir)/error_msg.c'; fi` + +libtests_a-fill_memory.o: fill_memory.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-fill_memory.o -MD -MP -MF $(DEPDIR)/libtests_a-fill_memory.Tpo -c -o libtests_a-fill_memory.o `test -f 'fill_memory.c' || echo '$(srcdir)/'`fill_memory.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-fill_memory.Tpo $(DEPDIR)/libtests_a-fill_memory.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fill_memory.c' object='libtests_a-fill_memory.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-fill_memory.o `test -f 'fill_memory.c' || echo '$(srcdir)/'`fill_memory.c + +libtests_a-fill_memory.obj: fill_memory.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-fill_memory.obj -MD -MP -MF $(DEPDIR)/libtests_a-fill_memory.Tpo -c -o libtests_a-fill_memory.obj `if test -f 'fill_memory.c'; then $(CYGPATH_W) 'fill_memory.c'; else $(CYGPATH_W) '$(srcdir)/fill_memory.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-fill_memory.Tpo $(DEPDIR)/libtests_a-fill_memory.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fill_memory.c' object='libtests_a-fill_memory.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-fill_memory.obj `if test -f 'fill_memory.c'; then $(CYGPATH_W) 'fill_memory.c'; else $(CYGPATH_W) '$(srcdir)/fill_memory.c'; fi` + +libtests_a-get_page_size.o: get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.o -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.o `test -f 'get_page_size.c' || echo '$(srcdir)/'`get_page_size.c + +libtests_a-get_page_size.obj: get_page_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-get_page_size.obj -MD -MP -MF $(DEPDIR)/libtests_a-get_page_size.Tpo -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-get_page_size.Tpo $(DEPDIR)/libtests_a-get_page_size.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='get_page_size.c' object='libtests_a-get_page_size.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-get_page_size.obj `if test -f 'get_page_size.c'; then $(CYGPATH_W) 'get_page_size.c'; else $(CYGPATH_W) '$(srcdir)/get_page_size.c'; fi` + +libtests_a-hexdump_strdup.o: hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.o `test -f 'hexdump_strdup.c' || echo '$(srcdir)/'`hexdump_strdup.c + +libtests_a-hexdump_strdup.obj: hexdump_strdup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexdump_strdup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexdump_strdup.Tpo -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexdump_strdup.Tpo $(DEPDIR)/libtests_a-hexdump_strdup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexdump_strdup.c' object='libtests_a-hexdump_strdup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexdump_strdup.obj `if test -f 'hexdump_strdup.c'; then $(CYGPATH_W) 'hexdump_strdup.c'; else $(CYGPATH_W) '$(srcdir)/hexdump_strdup.c'; fi` + +libtests_a-hexquote_strndup.o: hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.o -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.o `test -f 'hexquote_strndup.c' || echo '$(srcdir)/'`hexquote_strndup.c + +libtests_a-hexquote_strndup.obj: hexquote_strndup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-hexquote_strndup.obj -MD -MP -MF $(DEPDIR)/libtests_a-hexquote_strndup.Tpo -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-hexquote_strndup.Tpo $(DEPDIR)/libtests_a-hexquote_strndup.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hexquote_strndup.c' object='libtests_a-hexquote_strndup.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-hexquote_strndup.obj `if test -f 'hexquote_strndup.c'; then $(CYGPATH_W) 'hexquote_strndup.c'; else $(CYGPATH_W) '$(srcdir)/hexquote_strndup.c'; fi` + +libtests_a-inode_of_sockfd.o: inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.o -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.o `test -f 'inode_of_sockfd.c' || echo '$(srcdir)/'`inode_of_sockfd.c + +libtests_a-inode_of_sockfd.obj: inode_of_sockfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-inode_of_sockfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-inode_of_sockfd.Tpo $(DEPDIR)/libtests_a-inode_of_sockfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inode_of_sockfd.c' object='libtests_a-inode_of_sockfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-inode_of_sockfd.obj `if test -f 'inode_of_sockfd.c'; then $(CYGPATH_W) 'inode_of_sockfd.c'; else $(CYGPATH_W) '$(srcdir)/inode_of_sockfd.c'; fi` + +libtests_a-libmmsg.o: libmmsg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libmmsg.o -MD -MP -MF $(DEPDIR)/libtests_a-libmmsg.Tpo -c -o libtests_a-libmmsg.o `test -f 'libmmsg.c' || echo '$(srcdir)/'`libmmsg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libmmsg.Tpo $(DEPDIR)/libtests_a-libmmsg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmmsg.c' object='libtests_a-libmmsg.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libmmsg.o `test -f 'libmmsg.c' || echo '$(srcdir)/'`libmmsg.c + +libtests_a-libmmsg.obj: libmmsg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libmmsg.obj -MD -MP -MF $(DEPDIR)/libtests_a-libmmsg.Tpo -c -o libtests_a-libmmsg.obj `if test -f 'libmmsg.c'; then $(CYGPATH_W) 'libmmsg.c'; else $(CYGPATH_W) '$(srcdir)/libmmsg.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libmmsg.Tpo $(DEPDIR)/libtests_a-libmmsg.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmmsg.c' object='libtests_a-libmmsg.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libmmsg.obj `if test -f 'libmmsg.c'; then $(CYGPATH_W) 'libmmsg.c'; else $(CYGPATH_W) '$(srcdir)/libmmsg.c'; fi` + +libtests_a-libsocketcall.o: libsocketcall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libsocketcall.o -MD -MP -MF $(DEPDIR)/libtests_a-libsocketcall.Tpo -c -o libtests_a-libsocketcall.o `test -f 'libsocketcall.c' || echo '$(srcdir)/'`libsocketcall.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libsocketcall.Tpo $(DEPDIR)/libtests_a-libsocketcall.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libsocketcall.c' object='libtests_a-libsocketcall.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libsocketcall.o `test -f 'libsocketcall.c' || echo '$(srcdir)/'`libsocketcall.c + +libtests_a-libsocketcall.obj: libsocketcall.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-libsocketcall.obj -MD -MP -MF $(DEPDIR)/libtests_a-libsocketcall.Tpo -c -o libtests_a-libsocketcall.obj `if test -f 'libsocketcall.c'; then $(CYGPATH_W) 'libsocketcall.c'; else $(CYGPATH_W) '$(srcdir)/libsocketcall.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-libsocketcall.Tpo $(DEPDIR)/libtests_a-libsocketcall.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libsocketcall.c' object='libtests_a-libsocketcall.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-libsocketcall.obj `if test -f 'libsocketcall.c'; then $(CYGPATH_W) 'libsocketcall.c'; else $(CYGPATH_W) '$(srcdir)/libsocketcall.c'; fi` + +libtests_a-overflowuid.o: overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.o -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.o `test -f 'overflowuid.c' || echo '$(srcdir)/'`overflowuid.c + +libtests_a-overflowuid.obj: overflowuid.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-overflowuid.obj -MD -MP -MF $(DEPDIR)/libtests_a-overflowuid.Tpo -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-overflowuid.Tpo $(DEPDIR)/libtests_a-overflowuid.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='overflowuid.c' object='libtests_a-overflowuid.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-overflowuid.obj `if test -f 'overflowuid.c'; then $(CYGPATH_W) 'overflowuid.c'; else $(CYGPATH_W) '$(srcdir)/overflowuid.c'; fi` + +libtests_a-pipe_maxfd.o: pipe_maxfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-pipe_maxfd.o -MD -MP -MF $(DEPDIR)/libtests_a-pipe_maxfd.Tpo -c -o libtests_a-pipe_maxfd.o `test -f 'pipe_maxfd.c' || echo '$(srcdir)/'`pipe_maxfd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-pipe_maxfd.Tpo $(DEPDIR)/libtests_a-pipe_maxfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipe_maxfd.c' object='libtests_a-pipe_maxfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-pipe_maxfd.o `test -f 'pipe_maxfd.c' || echo '$(srcdir)/'`pipe_maxfd.c + +libtests_a-pipe_maxfd.obj: pipe_maxfd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-pipe_maxfd.obj -MD -MP -MF $(DEPDIR)/libtests_a-pipe_maxfd.Tpo -c -o libtests_a-pipe_maxfd.obj `if test -f 'pipe_maxfd.c'; then $(CYGPATH_W) 'pipe_maxfd.c'; else $(CYGPATH_W) '$(srcdir)/pipe_maxfd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-pipe_maxfd.Tpo $(DEPDIR)/libtests_a-pipe_maxfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pipe_maxfd.c' object='libtests_a-pipe_maxfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-pipe_maxfd.obj `if test -f 'pipe_maxfd.c'; then $(CYGPATH_W) 'pipe_maxfd.c'; else $(CYGPATH_W) '$(srcdir)/pipe_maxfd.c'; fi` + +libtests_a-print_quoted_string.o: print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.o -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.o `test -f 'print_quoted_string.c' || echo '$(srcdir)/'`print_quoted_string.c + +libtests_a-print_quoted_string.obj: print_quoted_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-print_quoted_string.obj -MD -MP -MF $(DEPDIR)/libtests_a-print_quoted_string.Tpo -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-print_quoted_string.Tpo $(DEPDIR)/libtests_a-print_quoted_string.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_quoted_string.c' object='libtests_a-print_quoted_string.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-print_quoted_string.obj `if test -f 'print_quoted_string.c'; then $(CYGPATH_W) 'print_quoted_string.c'; else $(CYGPATH_W) '$(srcdir)/print_quoted_string.c'; fi` + +libtests_a-printflags.o: printflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.o -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.o `test -f 'printflags.c' || echo '$(srcdir)/'`printflags.c + +libtests_a-printflags.obj: printflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printflags.obj -MD -MP -MF $(DEPDIR)/libtests_a-printflags.Tpo -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printflags.Tpo $(DEPDIR)/libtests_a-printflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printflags.c' object='libtests_a-printflags.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printflags.obj `if test -f 'printflags.c'; then $(CYGPATH_W) 'printflags.c'; else $(CYGPATH_W) '$(srcdir)/printflags.c'; fi` + +libtests_a-printxval.o: printxval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.o -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.o `test -f 'printxval.c' || echo '$(srcdir)/'`printxval.c + +libtests_a-printxval.obj: printxval.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-printxval.obj -MD -MP -MF $(DEPDIR)/libtests_a-printxval.Tpo -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-printxval.Tpo $(DEPDIR)/libtests_a-printxval.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='printxval.c' object='libtests_a-printxval.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-printxval.obj `if test -f 'printxval.c'; then $(CYGPATH_W) 'printxval.c'; else $(CYGPATH_W) '$(srcdir)/printxval.c'; fi` + +libtests_a-signal2name.o: signal2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-signal2name.o -MD -MP -MF $(DEPDIR)/libtests_a-signal2name.Tpo -c -o libtests_a-signal2name.o `test -f 'signal2name.c' || echo '$(srcdir)/'`signal2name.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-signal2name.Tpo $(DEPDIR)/libtests_a-signal2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signal2name.c' object='libtests_a-signal2name.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-signal2name.o `test -f 'signal2name.c' || echo '$(srcdir)/'`signal2name.c + +libtests_a-signal2name.obj: signal2name.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-signal2name.obj -MD -MP -MF $(DEPDIR)/libtests_a-signal2name.Tpo -c -o libtests_a-signal2name.obj `if test -f 'signal2name.c'; then $(CYGPATH_W) 'signal2name.c'; else $(CYGPATH_W) '$(srcdir)/signal2name.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-signal2name.Tpo $(DEPDIR)/libtests_a-signal2name.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signal2name.c' object='libtests_a-signal2name.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-signal2name.obj `if test -f 'signal2name.c'; then $(CYGPATH_W) 'signal2name.c'; else $(CYGPATH_W) '$(srcdir)/signal2name.c'; fi` + +libtests_a-sprintrc.o: sprintrc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-sprintrc.o -MD -MP -MF $(DEPDIR)/libtests_a-sprintrc.Tpo -c -o libtests_a-sprintrc.o `test -f 'sprintrc.c' || echo '$(srcdir)/'`sprintrc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-sprintrc.Tpo $(DEPDIR)/libtests_a-sprintrc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sprintrc.c' object='libtests_a-sprintrc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-sprintrc.o `test -f 'sprintrc.c' || echo '$(srcdir)/'`sprintrc.c + +libtests_a-sprintrc.obj: sprintrc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-sprintrc.obj -MD -MP -MF $(DEPDIR)/libtests_a-sprintrc.Tpo -c -o libtests_a-sprintrc.obj `if test -f 'sprintrc.c'; then $(CYGPATH_W) 'sprintrc.c'; else $(CYGPATH_W) '$(srcdir)/sprintrc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-sprintrc.Tpo $(DEPDIR)/libtests_a-sprintrc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sprintrc.c' object='libtests_a-sprintrc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-sprintrc.obj `if test -f 'sprintrc.c'; then $(CYGPATH_W) 'sprintrc.c'; else $(CYGPATH_W) '$(srcdir)/sprintrc.c'; fi` + +libtests_a-tail_alloc.o: tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.o -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.o `test -f 'tail_alloc.c' || echo '$(srcdir)/'`tail_alloc.c + +libtests_a-tail_alloc.obj: tail_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tail_alloc.obj -MD -MP -MF $(DEPDIR)/libtests_a-tail_alloc.Tpo -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tail_alloc.Tpo $(DEPDIR)/libtests_a-tail_alloc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tail_alloc.c' object='libtests_a-tail_alloc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tail_alloc.obj `if test -f 'tail_alloc.c'; then $(CYGPATH_W) 'tail_alloc.c'; else $(CYGPATH_W) '$(srcdir)/tail_alloc.c'; fi` + +libtests_a-tprintf.o: tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.o -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.o `test -f 'tprintf.c' || echo '$(srcdir)/'`tprintf.c + +libtests_a-tprintf.obj: tprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtests_a-tprintf.obj -MD -MP -MF $(DEPDIR)/libtests_a-tprintf.Tpo -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtests_a-tprintf.Tpo $(DEPDIR)/libtests_a-tprintf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tprintf.c' object='libtests_a-tprintf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtests_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtests_a-tprintf.obj `if test -f 'tprintf.c'; then $(CYGPATH_W) 'tprintf.c'; else $(CYGPATH_W) '$(srcdir)/tprintf.c'; fi` + +fstat64-fstat64.o: fstat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.o -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstat64.c' object='fstat64-fstat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstat64-fstat64.o `test -f 'fstat64.c' || echo '$(srcdir)/'`fstat64.c + +fstat64-fstat64.obj: fstat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstat64-fstat64.obj -MD -MP -MF $(DEPDIR)/fstat64-fstat64.Tpo -c -o fstat64-fstat64.obj `if test -f 'fstat64.c'; then $(CYGPATH_W) 'fstat64.c'; else $(CYGPATH_W) '$(srcdir)/fstat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstat64-fstat64.Tpo $(DEPDIR)/fstat64-fstat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstat64.c' object='fstat64-fstat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstat64-fstat64.obj `if test -f 'fstat64.c'; then $(CYGPATH_W) 'fstat64.c'; else $(CYGPATH_W) '$(srcdir)/fstat64.c'; fi` + +fstatat64-fstatat64.o: fstatat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstatat64-fstatat64.o -MD -MP -MF $(DEPDIR)/fstatat64-fstatat64.Tpo -c -o fstatat64-fstatat64.o `test -f 'fstatat64.c' || echo '$(srcdir)/'`fstatat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstatat64-fstatat64.Tpo $(DEPDIR)/fstatat64-fstatat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatat64.c' object='fstatat64-fstatat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstatat64-fstatat64.o `test -f 'fstatat64.c' || echo '$(srcdir)/'`fstatat64.c + +fstatat64-fstatat64.obj: fstatat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fstatat64-fstatat64.obj -MD -MP -MF $(DEPDIR)/fstatat64-fstatat64.Tpo -c -o fstatat64-fstatat64.obj `if test -f 'fstatat64.c'; then $(CYGPATH_W) 'fstatat64.c'; else $(CYGPATH_W) '$(srcdir)/fstatat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fstatat64-fstatat64.Tpo $(DEPDIR)/fstatat64-fstatat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fstatat64.c' object='fstatat64-fstatat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fstatat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fstatat64-fstatat64.obj `if test -f 'fstatat64.c'; then $(CYGPATH_W) 'fstatat64.c'; else $(CYGPATH_W) '$(srcdir)/fstatat64.c'; fi` + +ftruncate64-ftruncate64.o: ftruncate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftruncate64-ftruncate64.o -MD -MP -MF $(DEPDIR)/ftruncate64-ftruncate64.Tpo -c -o ftruncate64-ftruncate64.o `test -f 'ftruncate64.c' || echo '$(srcdir)/'`ftruncate64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ftruncate64-ftruncate64.Tpo $(DEPDIR)/ftruncate64-ftruncate64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ftruncate64.c' object='ftruncate64-ftruncate64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftruncate64-ftruncate64.o `test -f 'ftruncate64.c' || echo '$(srcdir)/'`ftruncate64.c + +ftruncate64-ftruncate64.obj: ftruncate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ftruncate64-ftruncate64.obj -MD -MP -MF $(DEPDIR)/ftruncate64-ftruncate64.Tpo -c -o ftruncate64-ftruncate64.obj `if test -f 'ftruncate64.c'; then $(CYGPATH_W) 'ftruncate64.c'; else $(CYGPATH_W) '$(srcdir)/ftruncate64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ftruncate64-ftruncate64.Tpo $(DEPDIR)/ftruncate64-ftruncate64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ftruncate64.c' object='ftruncate64-ftruncate64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ftruncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ftruncate64-ftruncate64.obj `if test -f 'ftruncate64.c'; then $(CYGPATH_W) 'ftruncate64.c'; else $(CYGPATH_W) '$(srcdir)/ftruncate64.c'; fi` + +lstat64-lstat64.o: lstat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lstat64-lstat64.o -MD -MP -MF $(DEPDIR)/lstat64-lstat64.Tpo -c -o lstat64-lstat64.o `test -f 'lstat64.c' || echo '$(srcdir)/'`lstat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lstat64-lstat64.Tpo $(DEPDIR)/lstat64-lstat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lstat64.c' object='lstat64-lstat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lstat64-lstat64.o `test -f 'lstat64.c' || echo '$(srcdir)/'`lstat64.c + +lstat64-lstat64.obj: lstat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lstat64-lstat64.obj -MD -MP -MF $(DEPDIR)/lstat64-lstat64.Tpo -c -o lstat64-lstat64.obj `if test -f 'lstat64.c'; then $(CYGPATH_W) 'lstat64.c'; else $(CYGPATH_W) '$(srcdir)/lstat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lstat64-lstat64.Tpo $(DEPDIR)/lstat64-lstat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lstat64.c' object='lstat64-lstat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lstat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lstat64-lstat64.obj `if test -f 'lstat64.c'; then $(CYGPATH_W) 'lstat64.c'; else $(CYGPATH_W) '$(srcdir)/lstat64.c'; fi` + +mmap64-mmap64.o: mmap64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmap64-mmap64.o -MD -MP -MF $(DEPDIR)/mmap64-mmap64.Tpo -c -o mmap64-mmap64.o `test -f 'mmap64.c' || echo '$(srcdir)/'`mmap64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mmap64-mmap64.Tpo $(DEPDIR)/mmap64-mmap64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mmap64.c' object='mmap64-mmap64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap64-mmap64.o `test -f 'mmap64.c' || echo '$(srcdir)/'`mmap64.c + +mmap64-mmap64.obj: mmap64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mmap64-mmap64.obj -MD -MP -MF $(DEPDIR)/mmap64-mmap64.Tpo -c -o mmap64-mmap64.obj `if test -f 'mmap64.c'; then $(CYGPATH_W) 'mmap64.c'; else $(CYGPATH_W) '$(srcdir)/mmap64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/mmap64-mmap64.Tpo $(DEPDIR)/mmap64-mmap64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mmap64.c' object='mmap64-mmap64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mmap64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap64-mmap64.obj `if test -f 'mmap64.c'; then $(CYGPATH_W) 'mmap64.c'; else $(CYGPATH_W) '$(srcdir)/mmap64.c'; fi` + +newfstatat-newfstatat.o: newfstatat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT newfstatat-newfstatat.o -MD -MP -MF $(DEPDIR)/newfstatat-newfstatat.Tpo -c -o newfstatat-newfstatat.o `test -f 'newfstatat.c' || echo '$(srcdir)/'`newfstatat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/newfstatat-newfstatat.Tpo $(DEPDIR)/newfstatat-newfstatat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='newfstatat.c' object='newfstatat-newfstatat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.o `test -f 'newfstatat.c' || echo '$(srcdir)/'`newfstatat.c + +newfstatat-newfstatat.obj: newfstatat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT newfstatat-newfstatat.obj -MD -MP -MF $(DEPDIR)/newfstatat-newfstatat.Tpo -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/newfstatat-newfstatat.Tpo $(DEPDIR)/newfstatat-newfstatat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='newfstatat.c' object='newfstatat-newfstatat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(newfstatat_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o newfstatat-newfstatat.obj `if test -f 'newfstatat.c'; then $(CYGPATH_W) 'newfstatat.c'; else $(CYGPATH_W) '$(srcdir)/newfstatat.c'; fi` + +pread64_pwrite64-pread64-pwrite64.o: pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.o -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.o `test -f 'pread64-pwrite64.c' || echo '$(srcdir)/'`pread64-pwrite64.c + +pread64_pwrite64-pread64-pwrite64.obj: pread64-pwrite64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pread64_pwrite64-pread64-pwrite64.obj -MD -MP -MF $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Tpo $(DEPDIR)/pread64_pwrite64-pread64-pwrite64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pread64-pwrite64.c' object='pread64_pwrite64-pread64-pwrite64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pread64_pwrite64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pread64_pwrite64-pread64-pwrite64.obj `if test -f 'pread64-pwrite64.c'; then $(CYGPATH_W) 'pread64-pwrite64.c'; else $(CYGPATH_W) '$(srcdir)/pread64-pwrite64.c'; fi` + +preadv-preadv.o: preadv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.o -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv.c' object='preadv-preadv.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.o `test -f 'preadv.c' || echo '$(srcdir)/'`preadv.c + +preadv-preadv.obj: preadv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv-preadv.obj -MD -MP -MF $(DEPDIR)/preadv-preadv.Tpo -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv-preadv.Tpo $(DEPDIR)/preadv-preadv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv.c' object='preadv-preadv.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv-preadv.obj `if test -f 'preadv.c'; then $(CYGPATH_W) 'preadv.c'; else $(CYGPATH_W) '$(srcdir)/preadv.c'; fi` + +preadv_pwritev-preadv-pwritev.o: preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.o -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.o `test -f 'preadv-pwritev.c' || echo '$(srcdir)/'`preadv-pwritev.c + +preadv_pwritev-preadv-pwritev.obj: preadv-pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT preadv_pwritev-preadv-pwritev.obj -MD -MP -MF $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/preadv_pwritev-preadv-pwritev.Tpo $(DEPDIR)/preadv_pwritev-preadv-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='preadv-pwritev.c' object='preadv_pwritev-preadv-pwritev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(preadv_pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o preadv_pwritev-preadv-pwritev.obj `if test -f 'preadv-pwritev.c'; then $(CYGPATH_W) 'preadv-pwritev.c'; else $(CYGPATH_W) '$(srcdir)/preadv-pwritev.c'; fi` + +pwritev-pwritev.o: pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.o -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.o `test -f 'pwritev.c' || echo '$(srcdir)/'`pwritev.c + +pwritev-pwritev.obj: pwritev.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pwritev-pwritev.obj -MD -MP -MF $(DEPDIR)/pwritev-pwritev.Tpo -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pwritev-pwritev.Tpo $(DEPDIR)/pwritev-pwritev.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pwritev.c' object='pwritev-pwritev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pwritev_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pwritev-pwritev.obj `if test -f 'pwritev.c'; then $(CYGPATH_W) 'pwritev.c'; else $(CYGPATH_W) '$(srcdir)/pwritev.c'; fi` + +stat64-stat64.o: stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.o -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stat64.c' object='stat64-stat64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat64-stat64.o `test -f 'stat64.c' || echo '$(srcdir)/'`stat64.c + +stat64-stat64.obj: stat64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stat64-stat64.obj -MD -MP -MF $(DEPDIR)/stat64-stat64.Tpo -c -o stat64-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stat64-stat64.Tpo $(DEPDIR)/stat64-stat64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stat64.c' object='stat64-stat64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat64-stat64.obj `if test -f 'stat64.c'; then $(CYGPATH_W) 'stat64.c'; else $(CYGPATH_W) '$(srcdir)/stat64.c'; fi` + +statfs-statfs.o: statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT statfs-statfs.o -MD -MP -MF $(DEPDIR)/statfs-statfs.Tpo -c -o statfs-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/statfs-statfs.Tpo $(DEPDIR)/statfs-statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='statfs-statfs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o statfs-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c + +statfs-statfs.obj: statfs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT statfs-statfs.obj -MD -MP -MF $(DEPDIR)/statfs-statfs.Tpo -c -o statfs-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/statfs-statfs.Tpo $(DEPDIR)/statfs-statfs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='statfs.c' object='statfs-statfs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(statfs_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o statfs-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi` + +truncate64-truncate64.o: truncate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT truncate64-truncate64.o -MD -MP -MF $(DEPDIR)/truncate64-truncate64.Tpo -c -o truncate64-truncate64.o `test -f 'truncate64.c' || echo '$(srcdir)/'`truncate64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/truncate64-truncate64.Tpo $(DEPDIR)/truncate64-truncate64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='truncate64.c' object='truncate64-truncate64.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o truncate64-truncate64.o `test -f 'truncate64.c' || echo '$(srcdir)/'`truncate64.c + +truncate64-truncate64.obj: truncate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT truncate64-truncate64.obj -MD -MP -MF $(DEPDIR)/truncate64-truncate64.Tpo -c -o truncate64-truncate64.obj `if test -f 'truncate64.c'; then $(CYGPATH_W) 'truncate64.c'; else $(CYGPATH_W) '$(srcdir)/truncate64.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/truncate64-truncate64.Tpo $(DEPDIR)/truncate64-truncate64.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='truncate64.c' object='truncate64-truncate64.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(truncate64_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o truncate64-truncate64.obj `if test -f 'truncate64.c'; then $(CYGPATH_W) 'truncate64.c'; else $(CYGPATH_W) '$(srcdir)/truncate64.c'; fi` + +uio-uio.o: uio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uio-uio.o -MD -MP -MF $(DEPDIR)/uio-uio.Tpo -c -o uio-uio.o `test -f 'uio.c' || echo '$(srcdir)/'`uio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uio-uio.Tpo $(DEPDIR)/uio-uio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uio.c' object='uio-uio.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uio-uio.o `test -f 'uio.c' || echo '$(srcdir)/'`uio.c + +uio-uio.obj: uio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uio-uio.obj -MD -MP -MF $(DEPDIR)/uio-uio.Tpo -c -o uio-uio.obj `if test -f 'uio.c'; then $(CYGPATH_W) 'uio.c'; else $(CYGPATH_W) '$(srcdir)/uio.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uio-uio.Tpo $(DEPDIR)/uio-uio.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uio.c' object='uio-uio.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uio-uio.obj `if test -f 'uio.c'; then $(CYGPATH_W) 'uio.c'; else $(CYGPATH_W) '$(srcdir)/uio.c'; fi` +check-valgrind-local: + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_LIBRARIES) $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +check-valgrind: check-valgrind-am + +check-valgrind-am: check-valgrind-local + +clean: clean-am + +clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am \ + check-valgrind-am check-valgrind-local clean \ + clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am + + +@VALGRIND_CHECK_RULES@ + +ksysent.h: $(srcdir)/ksysent.sed + echo '#include ' | \ + $(CPP) $(AM_CPPFLAGS) $(CPPFLAGS) -dM - > $@.t1 + LC_COLLATE=C sed -r -n -f $(srcdir)/ksysent.sed < $@.t1 > $@.t2 + mv -f $@.t2 $@ + rm -f $@.t1 + +ksysent.$(OBJEXT): ksysent.h +$(objects): scno.h + +syscallent.i: $(top_srcdir)/$(OS)/$(ARCH)/syscallent.h + $(CPP) -P $(SCNO_CPPFLAGS) $^ -o $@ + +scno.h: $(top_srcdir)/scno.head syscallent.i + echo '/* Generated by Makefile from $^; do not edit. */' > $@-t + cat $< >> $@-t + LC_ALL=C sed -n '$(SCNO_SED)' $(filter-out $<,$^) >> $@-t + mv $@-t $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/tests/add_key.c b/tests/add_key.c index 62f4be362..d2696f9bc 100644 --- a/tests/add_key.c +++ b/tests/add_key.c @@ -1,7 +1,7 @@ /* * Check decoding of add_key syscall. * - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,8 +28,8 @@ */ #include "tests.h" - #include +#include "scno.h" #ifdef __NR_add_key @@ -65,9 +65,6 @@ do_add_key(const char *type, const char *type_str, const char *desc, printf(") = %s\n", errstr); } -# define _STR(_arg) #_arg -# define ARG_STR(_arg) (_arg), #_arg - int main(void) { @@ -90,7 +87,7 @@ main(void) const char *str; } types[] = { { ARG_STR(NULL) }, - { (const char *) 0xfffffee1fffffbadULL, NULL }, + { bogus_type + sizeof(unterminated1), NULL }, { bogus_type, NULL }, { ARG_STR("\20\21\22\23\24") }, { ARG_STR("user") }, @@ -101,7 +98,7 @@ main(void) const char *str; } descs[] = { { ARG_STR(NULL) }, - { (const char *) 0xfffff00dfffffca7ULL, NULL }, + { bogus_desc + sizeof(unterminated2), NULL }, { bogus_desc, NULL }, { ARG_STR("\25\26\27\30\31") }, { ARG_STR("desc") }, @@ -114,7 +111,7 @@ main(void) size_t plen; } payloads[] = { { ARG_STR(NULL), 0 }, - { (const char *) 0xfffffacefffff157ULL, NULL, + { bogus_payload + sizeof(unterminated3), NULL, (size_t) 0xdeadbeefbadc0dedULL }, { bogus_payload, _STR(""), 0 }, { bogus_payload, _STR("\16\17\20\21\22"), 5 }, diff --git a/tests/adjtimex.c b/tests/adjtimex.c index 9507fbeee..1638b5356 100644 --- a/tests/adjtimex.c +++ b/tests/adjtimex.c @@ -48,9 +48,9 @@ main(void) printf("adjtimex\\(\\{modes=0, offset=%jd, freq=%jd, maxerror=%jd" ", esterror=%jd, status=%s, constant=%jd, precision=%jd" - ", tolerance=%jd, time=\\{%jd, %jd\\}, tick=%jd, ppsfreq=%jd" - ", jitter=%jd, shift=%d, stabil=%jd, jitcnt=%jd, calcnt=%jd" - ", errcnt=%jd, stbcnt=%jd" + ", tolerance=%jd, time=\\{tv_sec=%jd, tv_usec=%jd\\}, tick=%jd, " + "ppsfreq=%jd, jitter=%jd, shift=%d, stabil=%jd, jitcnt=%jd, " + "calcnt=%jd, errcnt=%jd, stbcnt=%jd" #ifdef HAVE_STRUCT_TIMEX_TAI ", tai=%d" #endif diff --git a/tests/aio.c b/tests/aio.c index 8717f4faf..0766d23a7 100644 --- a/tests/aio.c +++ b/tests/aio.c @@ -159,7 +159,7 @@ main(void) .aio_fildes = 0xdefaced1, .aio_buf = (unsigned long)data2, .aio_nbytes = sizeof(data2), - .aio_offset = 0xdeadda7abadc0ded, + .aio_offset = 0xdeadda7abadc0dedULL, }, { .aio_data = 0, @@ -267,7 +267,7 @@ main(void) printf("io_getevents(%#lx, %ld, %ld, [" "{data=%#" PRI__x64 ", obj=%p, res=%u, res2=0}, " "{data=%#" PRI__x64 ", obj=%p, res=%u, res2=0}" - "], {0, 123456789}) = %s\n", + "], {tv_sec=0, tv_nsec=123456789}) = %s\n", *ctx, (long) nr, (long) (nr + 1), cb[0].aio_data, &cb[0], sizeof_data0, cb[1].aio_data, &cb[1], sizeof_data1, @@ -301,7 +301,7 @@ main(void) "{key=%u, pwrite, reqprio=%hd, fildes=%d, str=NULL" ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 # ifdef IOCB_FLAG_RESFD - ", resfd=%d, flags=%x" + ", resfd=%d, flags=%#x" # endif "}, " "{key=%u, pwrite, reqprio=%hd, fildes=%d, buf=%#" PRI__x64 diff --git a/tests/alarm.c b/tests/alarm.c index f954dcf3b..291b26ad9 100644 --- a/tests/alarm.c +++ b/tests/alarm.c @@ -38,7 +38,7 @@ int main(void) { - int rc = syscall(__NR_alarm, (unsigned long) 0xffffffff0000002a); + int rc = syscall(__NR_alarm, (unsigned long) 0xffffffff0000002aULL); printf("alarm(%u) = %d\n", 42, rc); puts("+++ exited with 0 +++"); diff --git a/tests/answer.c b/tests/answer.c new file mode 100644 index 000000000..ae3059a48 --- /dev/null +++ b/tests/answer.c @@ -0,0 +1,44 @@ +/* + * Check decoding of fault injected exit_group syscall. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + static const kernel_ulong_t answer = + (kernel_ulong_t) 0xbadc0ded0000002aULL; + + syscall(__NR_exit_group, answer); + syscall(__NR_exit, answer); + + return 1; +} diff --git a/tests/attach-f-p-cmd.c b/tests/attach-f-p-cmd.c new file mode 100644 index 000000000..77594bebb --- /dev/null +++ b/tests/attach-f-p-cmd.c @@ -0,0 +1,46 @@ +/* + * This file is part of attach-f-p strace test. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + static const char dir[] = "attach-f-p.test cmd"; + pid_t pid = getpid(); + int rc = chdir(dir); + + printf("%-5d chdir(\"%s\") = %s\n" + "%-5d +++ exited with 0 +++\n", + pid, dir, sprintrc(rc), pid); + + return 0; +} diff --git a/tests/attach-f-p.c b/tests/attach-f-p.c index c75deb6fa..3f9a7e3e0 100644 --- a/tests/attach-f-p.c +++ b/tests/attach-f-p.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -71,7 +72,7 @@ main(void) pthread_t t[N]; unsigned int i; - if (write(3, "", 0) != 0) + if (write(1, "", 0) != 0) perror_msg_and_fail("write"); for (i = 0; i < N; ++i) { @@ -83,9 +84,18 @@ main(void) perror_msg_and_fail("pthread_create"); } - if (write(3, "\n", 1) != 1) + if (write(1, "\n", 1) != 1) perror_msg_and_fail("write"); + /* wait for the peer to write to stdout */ + struct stat st; + for (;;) { + if (fstat(1, &st)) + perror_msg_and_fail("fstat"); + if (st.st_size >= 103) + break; + } + for (i = 0; i < N; ++i) { /* sleep a bit to let the tracer catch up */ sleep(1); @@ -96,9 +106,9 @@ main(void) if (errno) perror_msg_and_fail("pthread_join"); errno = ENOENT; - printf("%-5d chdir(\"%s\") = -1 ENOENT (%m)\n" + printf("%-5d chdir(\"%s\") = %s\n" "%-5d +++ exited with 0 +++\n", - retval.pid, child[i], retval.pid); + retval.pid, child[i], sprintrc(-1), retval.pid); } /* sleep a bit more to let the tracer catch up */ diff --git a/tests/attach-f-p.test b/tests/attach-f-p.test index 030659a20..f41707409 100755 --- a/tests/attach-f-p.test +++ b/tests/attach-f-p.test @@ -34,16 +34,17 @@ framework_skip_ '/proc/self/task/ is not available' run_prog_skip_if_failed \ kill -0 $$ -run_prog ./attach-f-p > /dev/null 3>&1 +run_prog ./attach-f-p-cmd > /dev/null -./set_ptracer_any sh -c "exec ./attach-f-p > $EXP 3> $OUT" > /dev/null & +rm -f "$OUT" +./set_ptracer_any sh -c "exec ./attach-f-p >> $OUT" > /dev/null & tracee_pid=$! while ! [ -s "$OUT" ]; do kill -0 $tracee_pid 2> /dev/null || - fail_ 'set_ptracer_any sleep failed' + fail_ 'set_ptracer_any sh failed' done -run_strace -a32 -f -echdir -p $tracee_pid -match_diff "$LOG" "$EXP" -rm -f "$EXP" "$OUT" +run_strace -a32 -f -echdir -p $tracee_pid ./attach-f-p-cmd > "$OUT" +match_diff "$LOG" "$OUT" +rm -f "$OUT" diff --git a/tests/attach-p-cmd-cmd.c b/tests/attach-p-cmd-cmd.c index edfff2063..d0f824e95 100644 --- a/tests/attach-p-cmd-cmd.c +++ b/tests/attach-p-cmd-cmd.c @@ -28,19 +28,28 @@ */ #include "tests.h" +#include #include +#include #include int main(void) { + static const char lockdir[] = "attach-p-cmd.test-lock"; + /* wait for the lock directory to be created by peer */ + while (rmdir(lockdir)) { + if (ENOENT != errno) + perror_msg_and_fail("rmdir: %s", lockdir); + } + static const char dir[] = "attach-p-cmd.test cmd"; pid_t pid = getpid(); int rc = chdir(dir); - printf("%-5d chdir(\"%s\") = %d %s (%m)\n" + printf("%-5d chdir(\"%s\") = %s\n" "%-5d +++ exited with 0 +++\n", - pid, dir, rc, errno2name(), pid); + pid, dir, sprintrc(rc), pid); return 0; } diff --git a/tests/attach-p-cmd-p.c b/tests/attach-p-cmd-p.c index d63371d44..254d19ae0 100644 --- a/tests/attach-p-cmd-p.c +++ b/tests/attach-p-cmd-p.c @@ -28,9 +28,11 @@ */ #include "tests.h" +#include #include #include #include +#include #include static void @@ -43,12 +45,27 @@ main(void) { const struct sigaction act = { .sa_handler = handler }; if (sigaction(SIGALRM, &act, NULL)) - perror_msg_and_skip("sigaction"); + perror_msg_and_fail("sigaction"); sigset_t mask = {}; sigaddset(&mask, SIGALRM); if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) - perror_msg_and_skip("sigprocmask"); + perror_msg_and_fail("sigprocmask"); + + static const char lockdir[] = "attach-p-cmd.test-lock"; + /* create a lock directory */ + if (mkdir(lockdir, 0700)) + perror_msg_and_fail("mkdir: %s", lockdir); + + /* wait for the lock directory to be removed by peer */ + while (mkdir(lockdir, 0700)) { + if (EEXIST != errno) + perror_msg_and_fail("mkdir: %s", lockdir); + } + + /* remove the lock directory */ + if (rmdir(lockdir)) + perror_msg_and_fail("rmdir: %s", lockdir); alarm(1); pause(); diff --git a/tests/attach-p-cmd.test b/tests/attach-p-cmd.test index 27797196b..2068cf1d2 100755 --- a/tests/attach-p-cmd.test +++ b/tests/attach-p-cmd.test @@ -31,16 +31,15 @@ run_prog_skip_if_failed \ kill -0 $$ -run_prog ./attach-p-cmd-cmd > /dev/null -run_prog ./attach-p-cmd-p > /dev/null +rm -rf attach-p-cmd.test-lock rm -f "$OUT" ./set_ptracer_any ./attach-p-cmd-p >> "$OUT" & tracee_pid=$! while ! [ -s "$OUT" ]; do kill -0 $tracee_pid 2> /dev/null || - fail_ 'set_ptracer_any sleep failed' + fail_ 'set_ptracer_any ./attach-p-cmd-p failed' done run_strace -a30 -echdir -p $tracee_pid ./attach-p-cmd-cmd > "$OUT" diff --git a/tests/bpf.c b/tests/bpf.c index 5a1fcdc7d..7ef16c9f2 100644 --- a/tests/bpf.c +++ b/tests/bpf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2015-2017 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,20 +26,29 @@ */ #include "tests.h" -#include -#include -#include #include #if defined HAVE_UNION_BPF_ATTR_LOG_BUF && defined __NR_bpf +# include +# include +# include # include static const struct bpf_insn insns[] = { { .code = BPF_JMP | BPF_EXIT } }; +static const char *errstr; static char log_buf[4096]; +static long +sys_bpf(kernel_ulong_t cmd, kernel_ulong_t attr, kernel_ulong_t size) +{ + long rc = syscall(__NR_bpf, cmd, attr, size); + errstr = sprintrc(rc); + return rc; +} + static int map_create(void) { @@ -48,7 +57,8 @@ map_create(void) .value_size = 8, .max_entries = 256 }; - return syscall(__NR_bpf, BPF_MAP_CREATE, &attr, sizeof(attr)); + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(BPF_MAP_CREATE, (unsigned long) t_attr, sizeof(attr)); } static int @@ -59,7 +69,8 @@ map_any(int cmd) .key = 0xdeadbeef, .value = 0xbadc0ded }; - return syscall(__NR_bpf, cmd, &attr, sizeof(attr)); + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(cmd, (unsigned long) t_attr, sizeof(attr)); } static int @@ -73,52 +84,146 @@ prog_load(void) .log_size = sizeof(log_buf), .log_buf = (unsigned long) log_buf }; - return syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr)); + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(BPF_PROG_LOAD, (unsigned long) t_attr, sizeof(attr)); +} + +/* + * bpf() syscall and its first six commands were introduced in Linux kernel + * 3.18. Some additional commands were added afterwards, so we need to take + * precautions to make sure the tests compile. + * + * BPF_OBJ_PIN and BPF_OBJ_GET commands appear in kernel 4.4. + */ +# ifdef HAVE_UNION_BPF_ATTR_BPF_FD +static int +obj_manage(int cmd) +{ + union bpf_attr attr = { + .pathname = (unsigned long) "/sys/fs/bpf/foo/bar", + .bpf_fd = -1 + }; + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(cmd, (unsigned long) t_attr, sizeof(attr)); } +# endif + +/* BPF_PROG_ATTACH and BPF_PROG_DETACH commands appear in kernel 4.10. */ +# ifdef HAVE_UNION_BPF_ATTR_ATTACH_TYPE +static int +prog_cgroup(int cmd) +{ + union bpf_attr attr = { + .target_fd = -1, + .attach_bpf_fd = -1, + .attach_type = 0 + }; + void *const t_attr = tail_memdup(&attr, sizeof(attr)); + return sys_bpf(cmd, (unsigned long) t_attr, sizeof(attr)); +} +# endif + +static unsigned long efault; + +static void +bogus_bpf(int cmd, const char *name) +{ + const unsigned long bogus_size = 1024; + const unsigned long bogus_addr = efault - bogus_size; + + sys_bpf(cmd, efault, 4); + printf("bpf(%s, %#lx, %lu) = %s\n", + name, efault, 4UL, errstr); + + sys_bpf(cmd, efault, bogus_size); + printf("bpf(%s, %#lx, %lu) = %s\n", + name, efault, bogus_size, errstr); + + sys_bpf(cmd, bogus_addr, 0); + printf("bpf(%s, %#lx, %lu) = %s\n", + name, bogus_addr, 0UL, errstr); +} + +#define BOGUS_BPF(cmd) bogus_bpf(cmd, #cmd) int main(void) { - if (!map_create()) - perror_msg_and_skip("BPF_MAP_CREATE"); - printf("bpf\\(BPF_MAP_CREATE, " - "\\{map_type=BPF_MAP_TYPE_UNSPEC, key_size=4, value_size=8, max_entries=256\\}, " - "%u\\) += -1 .*\n", - (unsigned) sizeof(union bpf_attr)); - - if (!map_any(BPF_MAP_LOOKUP_ELEM)) - perror_msg_and_skip("BPF_MAP_LOOKUP_ELEM"); - printf("bpf\\(BPF_MAP_LOOKUP_ELEM, " - "\\{map_fd=-1, key=0xdeadbeef\\}, %u\\) += -1 .*\n", - (unsigned) sizeof(union bpf_attr)); - - if (!map_any(BPF_MAP_UPDATE_ELEM)) - perror_msg_and_skip("BPF_MAP_UPDATE_ELEM"); - printf("bpf\\(BPF_MAP_UPDATE_ELEM, " - "\\{map_fd=-1, key=0xdeadbeef, value=0xbadc0ded, flags=BPF_ANY\\}, " - "%u\\) += -1 .*\n", - (unsigned) sizeof(union bpf_attr)); - - if (!map_any(BPF_MAP_DELETE_ELEM)) - perror_msg_and_skip("BPF_MAP_DELETE_ELEM"); - printf("bpf\\(BPF_MAP_DELETE_ELEM, " - "\\{map_fd=-1, key=0xdeadbeef\\}, %u\\) += -1 .*\n", - (unsigned) sizeof(union bpf_attr)); - - if (!map_any(BPF_MAP_GET_NEXT_KEY)) - perror_msg_and_skip("BPF_MAP_GET_NEXT_KEY"); - printf("bpf\\(BPF_MAP_GET_NEXT_KEY, " - "\\{map_fd=-1, key=0xdeadbeef\\}, %u\\) += -1 .*\n", - (unsigned) sizeof(union bpf_attr)); - - if (!prog_load()) - perror_msg_and_skip("BPF_PROG_LOAD"); - printf("bpf\\(BPF_PROG_LOAD, " - "\\{prog_type=BPF_PROG_TYPE_UNSPEC, insn_cnt=1, insns=%p, " - "license=\"GPL\", log_level=42, log_size=4096, log_buf=%p, " - "kern_version=0\\}, %u\\) += -1 .*\n", - insns, log_buf, (unsigned) sizeof(union bpf_attr)); - + efault = (unsigned long) tail_alloc(1) + 1; + + map_create(); + printf("bpf(BPF_MAP_CREATE" + ", {map_type=BPF_MAP_TYPE_UNSPEC, key_size=4" + ", value_size=8, max_entries=256}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_CREATE); + + map_any(BPF_MAP_LOOKUP_ELEM); + printf("bpf(BPF_MAP_LOOKUP_ELEM" + ", {map_fd=-1, key=0xdeadbeef}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_LOOKUP_ELEM); + + map_any(BPF_MAP_UPDATE_ELEM); + printf("bpf(BPF_MAP_UPDATE_ELEM" + ", {map_fd=-1, key=0xdeadbeef" + ", value=0xbadc0ded, flags=BPF_ANY}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_UPDATE_ELEM); + + map_any(BPF_MAP_DELETE_ELEM); + printf("bpf(BPF_MAP_DELETE_ELEM" + ", {map_fd=-1, key=0xdeadbeef}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_DELETE_ELEM); + + map_any(BPF_MAP_GET_NEXT_KEY); + printf("bpf(BPF_MAP_GET_NEXT_KEY" + ", {map_fd=-1, key=0xdeadbeef}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_MAP_GET_NEXT_KEY); + + prog_load(); + printf("bpf(BPF_PROG_LOAD" + ", {prog_type=BPF_PROG_TYPE_UNSPEC, insn_cnt=1, insns=%p" + ", license=\"GPL\", log_level=42, log_size=4096, log_buf=%p" + ", kern_version=0}, %u) = %s\n", + insns, log_buf, (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_PROG_LOAD); + +# ifdef HAVE_UNION_BPF_ATTR_BPF_FD + obj_manage(BPF_OBJ_PIN); + printf("bpf(BPF_OBJ_PIN" + ", {pathname=\"/sys/fs/bpf/foo/bar\", bpf_fd=-1}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_OBJ_PIN); + + obj_manage(BPF_OBJ_GET); + printf("bpf(BPF_OBJ_GET" + ", {pathname=\"/sys/fs/bpf/foo/bar\", bpf_fd=-1}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_OBJ_GET); +# endif + +# ifdef HAVE_UNION_BPF_ATTR_ATTACH_TYPE + prog_cgroup(BPF_PROG_ATTACH); + printf("bpf(BPF_PROG_ATTACH" + ", {target_fd=-1, attach_bpf_fd=-1" + ", attach_type=BPF_CGROUP_INET_INGRESS}, %u) = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_PROG_ATTACH); + + prog_cgroup(BPF_PROG_DETACH); + printf("bpf(BPF_PROG_DETACH" + ", {target_fd=-1, attach_type=BPF_CGROUP_INET_INGRESS}, %u)" + " = %s\n", + (unsigned) sizeof(union bpf_attr), errstr); + BOGUS_BPF(BPF_PROG_DETACH); +# endif + + bogus_bpf(0xfacefeed, "0xfacefeed /* BPF_??? */"); + + puts("+++ exited with 0 +++"); return 0; } diff --git a/tests/bpf.test b/tests/bpf.test index 6c77ae113..adf0d576c 100755 --- a/tests/bpf.test +++ b/tests/bpf.test @@ -1,12 +1,6 @@ #!/bin/sh # Check bpf syscall decoding. - . "${srcdir=.}/init.sh" -run_prog > /dev/null -run_strace -ebpf $args > "$OUT" -match_grep "$LOG" "$OUT" -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a20 diff --git a/tests/btrfs.c b/tests/btrfs.c index d6005347f..b3e23f80c 100644 --- a/tests/btrfs.c +++ b/tests/btrfs.c @@ -199,7 +199,7 @@ btrfs_test_trans_ioctls(void) static void btrfs_test_sync_ioctls(void) { - uint64_t u64val = 0xdeadbeefbadc0ded; + uint64_t u64val = 0xdeadbeefbadc0dedULL; ioctl(-1, BTRFS_IOC_SYNC, NULL); printf("ioctl(-1, BTRFS_IOC_SYNC) = -1 EBADF (%m)\n"); @@ -286,8 +286,8 @@ btrfs_test_subvol_ioctls(void) { const char *subvol_name = "subvol-name"; char *long_subvol_name; - void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeed; - uint64_t u64val = 0xdeadbeefbadc0ded; + void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeedULL; + uint64_t u64val = 0xdeadbeefbadc0dedULL; struct btrfs_ioctl_vol_args vol_args = {}; struct btrfs_ioctl_vol_args_v2 vol_args_v2 = { .fd = 2, @@ -1567,8 +1567,8 @@ btrfs_test_dev_replace_ioctl(void) { struct btrfs_ioctl_dev_replace_args args = { .cmd = BTRFS_IOCTL_DEV_REPLACE_CMD_START, - .start.srcdevid = 1 }; + args.start.srcdevid = 1; strcpy((char *)args.start.srcdev_name, "/dev/sda1"); strcpy((char *)args.start.tgtdev_name, "/dev/sdb1"); diff --git a/tests/caps-abbrev.awk b/tests/caps-abbrev.awk new file mode 100644 index 000000000..86de7f236 --- /dev/null +++ b/tests/caps-abbrev.awk @@ -0,0 +1,52 @@ +#!/bin/gawk +# +# This file is part of caps strace test. +# +# Copyright (c) 2014-2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +BEGIN { + cap = "(0|1< +#include "scno.h" #if defined __NR_copy_file_range diff --git a/tests/delete_module.c b/tests/delete_module.c new file mode 100644 index 000000000..5a3176035 --- /dev/null +++ b/tests/delete_module.c @@ -0,0 +1,115 @@ +/* + * Check decoding of delete_module syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_delete_module) + +# include +# include +# include + +# include "init_delete_module.h" + +int +main(void) +{ + static const struct { + kernel_ulong_t val; + const char *str; + unsigned int val_prefix, val_suffix; + } flags[] = { + { ARG_STR(0), 0, 0 }, + { (kernel_ulong_t) 0xffffffff00000000ULL | O_NONBLOCK, + "O_NONBLOCK", 0, 0 }, + { (kernel_ulong_t) 0xbadc0dedfacef157ULL & ~(O_NONBLOCK | O_TRUNC), + " /* O_??? */", 0xfacef157U & ~(O_NONBLOCK | O_TRUNC), 0}, + { (kernel_ulong_t) (0xfacef157deade71cULL & ~O_NONBLOCK) | O_TRUNC, + "O_TRUNC", 0, 0xdeade71c & ~(O_NONBLOCK | O_TRUNC)}, + { -1LL, "O_NONBLOCK|O_TRUNC", 0, -1U & ~(O_NONBLOCK | O_TRUNC)}, + }; + + long rc; + char *bogus_param1 = tail_alloc(PARAM1_LEN); + char *bogus_param2 = tail_alloc(PARAM2_LEN); + const char *errstr; + + fill_memory_ex(bogus_param1, PARAM1_LEN, PARAM1_BASE, PARAM1_LEN); + fill_memory_ex(bogus_param2, PARAM2_LEN, PARAM2_BASE, PARAM2_LEN); + + rc = syscall(__NR_delete_module, NULL, bogus_zero); + printf("delete_module(NULL, 0) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_delete_module, bogus_param1, flags[0].val); + errstr = sprintrc(rc); + + printf("delete_module(\""); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\"..., %s) = %s\n", flags[0].str, errstr); + + bogus_param1[PARAM1_LEN - 1] = '\0'; + + rc = syscall(__NR_delete_module, bogus_param1, flags[1].val); + errstr = sprintrc(rc); + + printf("delete_module(\""); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\", %s) = %s\n", flags[1].str, errstr); + + rc = syscall(__NR_delete_module, bogus_param2 + PARAM2_LEN, + flags[2].val); + printf("delete_module(%p, %#x%s) = %s\n", + bogus_param2 + PARAM2_LEN, flags[2].val_prefix, + flags[2].str, sprintrc(rc)); + + rc = syscall(__NR_delete_module, bogus_param2, flags[3].val); + printf("delete_module(%p, %s|%#x) = %s\n", + bogus_param2, flags[3].str, flags[3].val_suffix, sprintrc(rc)); + + bogus_param2[PARAM2_LEN - 1] = '\0'; + + rc = syscall(__NR_delete_module, bogus_param2, flags[4].val); + errstr = sprintrc(rc); + + printf("delete_module(\""); + print_str(PARAM2_BASE, PARAM2_LEN - 1, true); + printf("\", %s|%#x) = %s\n", flags[4].str, flags[4].val_suffix, errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_delete_module"); + +#endif diff --git a/tests/delete_module.test b/tests/delete_module.test new file mode 100755 index 000000000..fb86ec9a0 --- /dev/null +++ b/tests/delete_module.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of delete_module syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a23 diff --git a/tests/detach-running.test b/tests/detach-running.test index b77dc51ce..006efb859 100755 --- a/tests/detach-running.test +++ b/tests/detach-running.test @@ -79,8 +79,8 @@ if [ -f /proc/self/status ]; then cleanup dump_log_and_fail_with 'tracee died after detach' } - grep '^State:.*R (running)' < /proc/$tracee_pid/status > /dev/null || { - grep '^State:' < /proc/$tracee_pid/status + grep_pid_status "$tracee_pid" '^State:.*R (running)' > /dev/null || { + grep_pid_status "$tracee_pid" '^State:' cleanup dump_log_and_fail_with 'tracee is not running after detach' } diff --git a/tests/detach-sleeping.test b/tests/detach-sleeping.test index 546c21d95..54304f311 100755 --- a/tests/detach-sleeping.test +++ b/tests/detach-sleeping.test @@ -80,8 +80,8 @@ if [ -f /proc/self/status ]; then cleanup dump_log_and_fail_with 'tracee died after detach' } - grep '^State:.*S (sleeping)' < /proc/$tracee_pid/status > /dev/null || { - grep '^State:' < /proc/$tracee_pid/status + grep_pid_status "$tracee_pid" '^State:.*S (sleeping)' > /dev/null || { + grep_pid_status "$tracee_pid" '^State:' cleanup dump_log_and_fail_with 'tracee is not sleeping after detach' } diff --git a/tests/detach-stopped.test b/tests/detach-stopped.test index ca4d4e95d..8f480e7f7 100755 --- a/tests/detach-stopped.test +++ b/tests/detach-stopped.test @@ -95,8 +95,8 @@ if [ -f /proc/self/status ]; then cleanup dump_log_and_fail_with 'tracee died after detach' } - grep '^State:.*T (stopped)' < /proc/$tracee_pid/status > /dev/null || { - grep '^State:' < /proc/$tracee_pid/status + grep_pid_status "$tracee_pid" '^State:.*T (stopped)' > /dev/null || { + grep_pid_status "$tracee_pid" '^State:' cleanup dump_log_and_fail_with 'tracee is not group-stopped after detach' } diff --git a/tests/dup2.c b/tests/dup2.c index 04a261c42..9f3addfa9 100644 --- a/tests/dup2.c +++ b/tests/dup2.c @@ -9,8 +9,8 @@ int main(void) { - const long int fd_old = (long int) 0xdeadbeefffffffff; - const long int fd_new = (long int) 0xdeadbeeffffffffe; + const long int fd_old = (long int) 0xdeadbeefffffffffULL; + const long int fd_new = (long int) 0xdeadbeeffffffffeULL; long rc = syscall(__NR_dup2, fd_old, fd_new); printf("dup2(%d, %d) = %ld %s (%m)\n", diff --git a/tests/dup3.c b/tests/dup3.c index 2611dd8c3..252e84693 100644 --- a/tests/dup3.c +++ b/tests/dup3.c @@ -10,8 +10,8 @@ int main(void) { - const long int fd_old = (long int) 0xdeadbeefffffffff; - const long int fd_new = (long int) 0xdeadbeeffffffffe; + const long int fd_old = (long int) 0xdeadbeefffffffffULL; + const long int fd_new = (long int) 0xdeadbeeffffffffeULL; long rc = syscall(__NR_dup3, fd_old, fd_new, O_CLOEXEC); printf("dup3(%d, %d, O_CLOEXEC) = %ld %s (%m)\n", diff --git a/tests/epoll_create.c b/tests/epoll_create.c index 1f2485239..44262c7db 100644 --- a/tests/epoll_create.c +++ b/tests/epoll_create.c @@ -9,7 +9,7 @@ int main(void) { - const long int size = (long int) 0xdeadbeefffffffff; + const long int size = (long int) 0xdeadbeefffffffffULL; long rc = syscall(__NR_epoll_create, size); printf("epoll_create(%d) = %ld %s (%m)\n", diff --git a/tests/epoll_ctl.c b/tests/epoll_ctl.c index 8b46f4e3a..e66605556 100644 --- a/tests/epoll_ctl.c +++ b/tests/epoll_ctl.c @@ -11,7 +11,7 @@ static long invoke_syscall(unsigned long epfd, unsigned long op, unsigned long fd, void *ev) { - op |= (unsigned long) 0xffffffff00000000; + op |= (unsigned long) 0xffffffff00000000ULL; return syscall(__NR_epoll_ctl, epfd, op, fd, (unsigned long) ev); } diff --git a/tests/epoll_pwait.c b/tests/epoll_pwait.c index 27337eceb..eaaa34d62 100644 --- a/tests/epoll_pwait.c +++ b/tests/epoll_pwait.c @@ -8,8 +8,6 @@ # include # include -# include "kernel_types.h" - int main(void) { diff --git a/tests/erestartsys.c b/tests/erestartsys.c new file mode 100644 index 000000000..97c9699c4 --- /dev/null +++ b/tests/erestartsys.c @@ -0,0 +1,81 @@ +/* + * Check decoding of ERESTARTSYS error code. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include + +static int sv[2]; + +static void +handler(int sig) +{ + close(sv[1]); + sv[1] = -1; +} + +int +main(void) +{ + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv)) + perror_msg_and_skip("socketpair"); + + const struct sigaction act = { + .sa_handler = handler, + .sa_flags = SA_RESTART + }; + if (sigaction(SIGALRM, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGALRM); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + const struct itimerval itv = { .it_value.tv_usec = 123456 }; + if (setitimer(ITIMER_REAL, &itv, NULL)) + perror_msg_and_fail("setitimer"); + + if (recvfrom(sv[0], &sv[1], sizeof(sv[1]), 0, NULL, NULL)) + perror_msg_and_fail("recvfrom"); + + printf("recvfrom(%d, %p, %d, 0, NULL, NULL) = ? ERESTARTSYS" + " (To be restarted if SA_RESTART is set)\n", + sv[0], &sv[1], (int) sizeof(sv[1])); + printf("recvfrom(%d, \"\", %d, 0, NULL, NULL) = 0\n", + sv[0], (int) sizeof(sv[1])); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests/erestartsys.test b/tests/erestartsys.test new file mode 100755 index 000000000..91f711f3b --- /dev/null +++ b/tests/erestartsys.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of ERESTARTSYS error code. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a34 -e signal=none -e trace=recvfrom diff --git a/tests/execveat.c b/tests/execveat.c index 4e444a2c3..9083830eb 100644 --- a/tests/execveat.c +++ b/tests/execveat.c @@ -28,12 +28,14 @@ */ #include "tests.h" -#include -#include #include +#include "scno.h" #ifdef __NR_execveat +# include +# include + # define FILENAME "test.execveat\nfilename" # define Q_FILENAME "test.execveat\\nfilename" diff --git a/tests/faccessat.c b/tests/faccessat.c index c21039d6b..ce81349d1 100644 --- a/tests/faccessat.c +++ b/tests/faccessat.c @@ -10,7 +10,7 @@ int main(void) { static const char sample[] = "faccessat.sample"; - const long int fd = (long int) 0xdeadbeefffffffff; + const long int fd = (long int) 0xdeadbeefffffffffULL; long rc = syscall(__NR_faccessat, fd, sample, F_OK); printf("faccessat(%d, \"%s\", F_OK) = %ld %s (%m)\n", diff --git a/tests/fadvise.h b/tests/fadvise.h index bc7909136..7a75f73b2 100644 --- a/tests/fadvise.h +++ b/tests/fadvise.h @@ -1,7 +1,7 @@ /* * Common definitions for fadvise64 and fadvise64_64 tests. * - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * Copyright (c) 2016 Dmitry V. Levin * All rights reserved. * @@ -38,13 +38,6 @@ # include "xlat.h" # include "xlat/advise.h" -# if WORDS_BIGENDIAN -# define LL_PAIR(HI, LO) (HI), (LO) -# else -# define LL_PAIR(HI, LO) (LO), (HI) -# endif -# define LL_VAL_TO_PAIR(llval) LL_PAIR((long) ((llval) >> 32), (long) (llval)) - static void do_fadvise(long fd, long long offset, long long llen, long advice); int diff --git a/tests/fadvise64.c b/tests/fadvise64.c index 02d7394bf..930680be1 100644 --- a/tests/fadvise64.c +++ b/tests/fadvise64.c @@ -1,7 +1,7 @@ /* * Check decoding of fadvise64 syscall. * - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * Copyright (c) 2016 Dmitry V. Levin * All rights reserved. * diff --git a/tests/fadvise64_64.c b/tests/fadvise64_64.c index 69b1c7f33..c23df97ff 100644 --- a/tests/fadvise64_64.c +++ b/tests/fadvise64_64.c @@ -1,7 +1,7 @@ /* * Check decoding of fadvise64_64 syscall. * - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * Copyright (c) 2016 Dmitry V. Levin * All rights reserved. * diff --git a/tests/fallocate.c b/tests/fallocate.c index 40ac24451..a31711b3b 100644 --- a/tests/fallocate.c +++ b/tests/fallocate.c @@ -1,7 +1,7 @@ /* * Check decoding of fallocate syscall. * - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/tests/fanotify_init.c b/tests/fanotify_init.c new file mode 100644 index 000000000..c14b41318 --- /dev/null +++ b/tests/fanotify_init.c @@ -0,0 +1,95 @@ +/* + * Check decoding of fanotify_init syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined __NR_fanotify_init + +# include +# include +# include + +/* Performs fanotify_init call via the syscall interface. */ +static void +do_call(kernel_ulong_t flags, const char *flags_str, + kernel_ulong_t event_f_flags, const char *event_f_flags_str) +{ + long rc; + + rc = syscall(__NR_fanotify_init, flags, event_f_flags); + + printf("fanotify_init(%s, %s) = %s\n", + flags_str, event_f_flags_str, sprintrc(rc)); +} + +struct strval { + kernel_ulong_t val; + const char *str; +}; + + +int +main(void) +{ + static const struct strval flags[] = { + { (kernel_ulong_t) 0xffffffff00000000ULL, "FAN_CLASS_NOTIF" }, + { (kernel_ulong_t) 0xffffffff0000000cULL, + "0xc /* FAN_CLASS_??? */" }, + { (kernel_ulong_t) 0xdec0deddefaced04ULL, + "FAN_CLASS_CONTENT|0xefaced00 /* FAN_??? */" }, + { (kernel_ulong_t) 0xffffffffffffffffULL, + "0xc /* FAN_CLASS_??? */|FAN_CLOEXEC|FAN_NONBLOCK|" + "FAN_UNLIMITED_QUEUE|FAN_UNLIMITED_MARKS|0xffffffc0" }, + }; + static const struct strval event_f_flags[] = { + { (kernel_ulong_t) 0xffffffff00000000ULL, "O_RDONLY" }, + { (kernel_ulong_t) 0xdeadbeef80000001ULL, + "O_WRONLY|0x80000000" } + }; + + unsigned int i; + unsigned int j; + + + for (i = 0; i < ARRAY_SIZE(flags); i++) + for (j = 0; j < ARRAY_SIZE(event_f_flags); j++) + do_call(flags[i].val, flags[i].str, + event_f_flags[j].val, event_f_flags[j].str); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_fanotify_init") + +#endif diff --git a/tests/fanotify_init.test b/tests/fanotify_init.test new file mode 100755 index 000000000..8d26af429 --- /dev/null +++ b/tests/fanotify_init.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of fanotify_init syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff diff --git a/tests/fanotify_mark.c b/tests/fanotify_mark.c index 9cac5ef7b..43f285d33 100644 --- a/tests/fanotify_mark.c +++ b/tests/fanotify_mark.c @@ -1,17 +1,174 @@ +/* + * Check decoding of fanotify_mark syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #include "tests.h" -#if defined HAVE_SYS_FANOTIFY_H && defined HAVE_FANOTIFY_MARK +#include + +#if defined HAVE_SYS_FANOTIFY_H && defined HAVE_FANOTIFY_MARK && \ + defined __NR_fanotify_mark +# include # include +# include # include +/* Performs fanotify_mark call via the syscall interface. */ +static void +do_call(kernel_ulong_t fd, kernel_ulong_t flags, const char *flags_str, + uint64_t mask, const char *mask_str, kernel_ulong_t dirfd, + const char *dirfd_str, kernel_ulong_t path, const char *path_str) +{ + long rc; + + rc = syscall(__NR_fanotify_mark, fd, flags, +# if (LONG_MAX > INT_MAX) \ + || (defined __x86_64__ && defined __ILP32__) \ + || defined LINUX_MIPSN32 + mask, +# else +/* arch/parisc/kernel/sys_parisc32.c, commit ab8a261b */ +# ifdef HPPA + LL_VAL_TO_PAIR((mask << 32) | (mask >> 32)), +# else + LL_VAL_TO_PAIR(mask), +# endif +# endif + dirfd, path); + + printf("fanotify_mark(%d, %s, %s, %s, %s) = %s\n", + (int) fd, flags_str, mask_str, dirfd_str, path_str, + sprintrc(rc)); +} + +struct strval { + kernel_ulong_t val; + const char *str; +}; + +struct strval64 { + uint64_t val; + const char *str; +}; + +#define STR16 "0123456789abcdef" +#define STR64 STR16 STR16 STR16 STR16 + int main(void) { - int rc = fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY | FAN_ONDIR, + enum { + PATH1_SIZE = 64, + }; + + static const kernel_ulong_t fds[] = { + (kernel_ulong_t) 0xdeadfeed12345678ULL, + (kernel_ulong_t) 0xffffffff00000000ULL, + (kernel_ulong_t) 0xdeb0d1edffffffffULL, + }; + static const struct strval flags[] = { + { (kernel_ulong_t) 0xffffffff00000000ULL, "0" }, + { (kernel_ulong_t) 0xdec0deddefaced00ULL, + "0xefaced00 /* FAN_MARK_??? */" }, + { (kernel_ulong_t) 0xda7a105700000040ULL, + "FAN_MARK_IGNORED_SURV_MODIFY" }, + { (kernel_ulong_t) 0xbadc0deddeadfeedULL, + "FAN_MARK_ADD|FAN_MARK_DONT_FOLLOW|FAN_MARK_ONLYDIR|" + "FAN_MARK_IGNORED_MASK|FAN_MARK_IGNORED_SURV_MODIFY|" + "FAN_MARK_FLUSH|0xdeadfe00" }, + }; + static const struct strval64 masks[] = { + { ARG_ULL_STR(0) }, + { 0xdeadfeedfacebeefULL, + "FAN_ACCESS|FAN_MODIFY|FAN_CLOSE_WRITE|FAN_OPEN|" + "FAN_ACCESS_PERM|FAN_ONDIR|FAN_EVENT_ON_CHILD|" + "0xdeadfeedb2ccbec4" }, + { ARG_ULL_STR(0xffffffffb7fcbfc4) " /* FAN_??? */" }, + }; + static const struct strval dirfds[] = { + { (kernel_ulong_t) 0xfacefeed00000001ULL, "1" }, + { (kernel_ulong_t) 0xdec0ded0ffffffffULL, "FAN_NOFD" }, + { (kernel_ulong_t) 0xbadfacedffffff9cULL, "AT_FDCWD" }, + { (kernel_ulong_t) 0xdefaced1beeff00dULL, "-1091571699" }, + }; + static const char str64[] = STR64; + + static char bogus_path1_addr[sizeof("0x") + sizeof(void *) * 2]; + static char bogus_path1_after_addr[sizeof("0x") + sizeof(void *) * 2]; + + char *bogus_path1 = tail_memdup(str64, PATH1_SIZE); + char *bogus_path2 = tail_memdup(str64, sizeof(str64)); + + struct strval paths[] = { + { (kernel_ulong_t) 0, "NULL" }, + { (kernel_ulong_t) (uintptr_t) (bogus_path1 + PATH1_SIZE), + bogus_path1_after_addr }, + { (kernel_ulong_t) (uintptr_t) bogus_path1, bogus_path1_addr }, + { (kernel_ulong_t) (uintptr_t) bogus_path2, "\"" STR64 "\"" }, + }; + + unsigned int i; + unsigned int j; + unsigned int k; + unsigned int l; + unsigned int m; + int rc; + + + snprintf(bogus_path1_addr, sizeof(bogus_path1_addr), "%p", bogus_path1); + snprintf(bogus_path1_after_addr, sizeof(bogus_path1_after_addr), "%p", + bogus_path1 + PATH1_SIZE); + + rc = fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY | FAN_ONDIR, -100, "."); printf("fanotify_mark(-1, FAN_MARK_ADD, FAN_MODIFY|FAN_ONDIR" - ", AT_FDCWD, \".\") = %d %s (%m)\n", rc, errno2name()); + ", AT_FDCWD, \".\") = %s\n", sprintrc(rc)); + + for (i = 0; i < ARRAY_SIZE(fds); i++) { + for (j = 0; j < ARRAY_SIZE(flags); j++) { + for (k = 0; k < ARRAY_SIZE(masks); k++) { + for (l = 0; l < ARRAY_SIZE(dirfds); l++) { + for (m = 0; m < ARRAY_SIZE(paths); m++) + do_call(fds[i], + flags[j].val, + flags[j].str, + masks[k].val, + masks[k].str, + dirfds[l].val, + dirfds[l].str, + paths[m].val, + paths[m].str); + } + } + } + } puts("+++ exited with 0 +++"); return 0; @@ -19,6 +176,7 @@ main(void) #else -SKIP_MAIN_UNDEFINED("HAVE_SYS_FANOTIFY_H && HAVE_FANOTIFY_MARK") +SKIP_MAIN_UNDEFINED("HAVE_SYS_FANOTIFY_H && HAVE_FANOTIFY_MARK && " + "__NR_fanotify_mark") #endif diff --git a/tests/fanotify_mark.test b/tests/fanotify_mark.test index 84b3c83ec..fd6713876 100755 --- a/tests/fanotify_mark.test +++ b/tests/fanotify_mark.test @@ -3,4 +3,4 @@ # Check decoding of fanotify_mark syscall. . "${srcdir=.}/init.sh" -run_strace_match_diff +run_strace_match_diff -a32 diff --git a/tests/fchdir.c b/tests/fchdir.c index 580887212..3cde5e635 100644 --- a/tests/fchdir.c +++ b/tests/fchdir.c @@ -9,7 +9,7 @@ int main(void) { - const long int fd = (long int) 0xdeadbeefffffffff; + const long int fd = (long int) 0xdeadbeefffffffffULL; long rc = syscall(__NR_fchdir, fd); printf("fchdir(%d) = %ld %s (%m)\n", diff --git a/tests/fcntl.c b/tests/fcntl.c index 4ae5beb7e..f060cdf8f 100644 --- a/tests/fcntl.c +++ b/tests/fcntl.c @@ -41,8 +41,8 @@ test_flock64_einval(const int cmd, const char *name) { struct_kernel_flock64 fl = { .l_type = F_RDLCK, - .l_start = 0xdefaced1facefeed, - .l_len = 0xdefaced2cafef00d + .l_start = 0xdefaced1facefeedULL, + .l_len = 0xdefaced2cafef00dULL }; invoke_test_syscall(cmd, &fl); printf("%s(0, %s, %p) = %s\n", diff --git a/tests/fcntl64.c b/tests/fcntl64.c index ff6a5315b..5ecd6eb98 100644 --- a/tests/fcntl64.c +++ b/tests/fcntl64.c @@ -41,8 +41,8 @@ test_flock64_einval(const int cmd, const char *name) { struct_kernel_flock64 fl = { .l_type = F_RDLCK, - .l_start = 0xdefaced1facefeed, - .l_len = 0xdefaced2cafef00d + .l_start = 0xdefaced1facefeedULL, + .l_len = 0xdefaced2cafef00dULL }; invoke_test_syscall(cmd, &fl); printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET" diff --git a/tests/fdatasync.c b/tests/fdatasync.c index c47a0bfbe..fc82ade33 100644 --- a/tests/fdatasync.c +++ b/tests/fdatasync.c @@ -9,7 +9,7 @@ int main(void) { - const long int fd = (long int) 0xdeadbeefffffffff; + const long int fd = (long int) 0xdeadbeefffffffffULL; long rc = syscall(__NR_fdatasync, fd); printf("fdatasync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); diff --git a/tests/file_handle.c b/tests/file_handle.c index ac2b358db..a5ad6c73d 100644 --- a/tests/file_handle.c +++ b/tests/file_handle.c @@ -1,5 +1,8 @@ /* + * Check decoding of name_to_handle_at and open_by_handle_at syscalls. + * * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,41 +29,271 @@ */ #include "tests.h" -#include +#include -#ifdef MAX_HANDLE_SZ +#if defined __NR_name_to_handle_at && defined __NR_open_by_handle_at -# include # include # include +# include +# include # include +# include +# include + +enum assert_rc { + ASSERT_NONE, + ASSERT_SUCCESS, + ASSERT_ERROR, +}; + +# ifndef MAX_HANDLE_SZ + +# define MAX_HANDLE_SZ 128 + +struct file_handle { + unsigned int handle_bytes; + int handle_type; + unsigned char f_handle[0]; +}; +# endif /* !MAX_HANDLE_SZ */ + + +void +print_handle_data(unsigned char *bytes, unsigned int size) +{ + unsigned int i; + + if (size > MAX_HANDLE_SZ) + size = MAX_HANDLE_SZ; + + printf("0x"); + for (i = 0; i < size; ++i) + printf("%02x", bytes[i]); +} + +void +do_name_to_handle_at(kernel_ulong_t dirfd, const char *dirfd_str, + kernel_ulong_t pathname, const char *pathname_str, + kernel_ulong_t handle, const char *handle_str, + kernel_ulong_t mount_id, + kernel_ulong_t flags, const char *flags_str, + enum assert_rc assert_rc, long assert_errno) +{ + long rc; + const char *errstr; + + rc = syscall(__NR_name_to_handle_at, dirfd, pathname, handle, mount_id, + flags); + errstr = sprintrc(rc); + + if (assert_rc != ASSERT_NONE) + assert(rc == (assert_rc == ASSERT_SUCCESS ? 0 : -1)); + if (assert_errno) + assert(errno != assert_errno); + + printf("name_to_handle_at(%s, %s, %s", + dirfd_str, pathname_str, handle_str); + + if (rc != -1) { + struct file_handle *fh = + (struct file_handle *) (uintptr_t) handle; + int *mount_id_ptr = (int *) (uintptr_t) mount_id; + + printf(" => %u, handle_type=%d, f_handle=", + fh->handle_bytes, fh->handle_type); + print_handle_data((unsigned char *) fh + + sizeof(struct file_handle), + fh->handle_bytes); + printf("}, [%d]", *mount_id_ptr); + } else { + if (mount_id) + printf(", %#llx", (unsigned long long) mount_id); + else + printf(", NULL"); + } + + printf(", %s) = %s\n", flags_str, errstr); +} + +void +do_open_by_handle_at(kernel_ulong_t mount_fd, + kernel_ulong_t handle, bool valid_handle, bool valid_data, + kernel_ulong_t flags, const char *flags_str) +{ + long rc; + + printf("open_by_handle_at(%d, ", (int) mount_fd); + if (valid_handle) { + struct file_handle *fh = + (struct file_handle *) (uintptr_t) handle; + + printf("{handle_bytes=%u, handle_type=%d", fh->handle_bytes, + fh->handle_type); + + if (valid_data) { + printf(", f_handle="); + print_handle_data((unsigned char *) fh + + sizeof(struct file_handle), + fh->handle_bytes); + } + + printf("}"); + } else { + if (handle) + printf("%#llx", (unsigned long long) handle); + else + printf("NULL"); + } + printf(", %s) = ", flags_str); + + rc = syscall(__NR_open_by_handle_at, mount_fd, handle, flags); + + printf("%s\n", sprintrc(rc)); +} + +struct strval { + kernel_ulong_t val; + const char *str; +}; + +#define STR16 "0123456789abcdef" +#define STR64 STR16 STR16 STR16 STR16 int main(void) { + enum { + PATH1_SIZE = 64, + }; + + static const kernel_ulong_t fdcwd = + (kernel_ulong_t) 0x87654321ffffff9cULL; + static const struct strval dirfds[] = { + { (kernel_ulong_t) 0xdeadca57badda7a1ULL, "-1159878751" }, + { (kernel_ulong_t) 0x12345678ffffff9cULL, "AT_FDCWD" }, + }; + static const struct strval name_flags[] = { + { (kernel_ulong_t) 0xdeadf15700000000ULL, "0" }, + { (kernel_ulong_t) 0xbadc0ded00001000ULL, + "AT_EMPTY_PATH" }, + { (kernel_ulong_t) 0xdeadc0deda7a1457ULL, + "AT_SYMLINK_FOLLOW|AT_EMPTY_PATH|0xda7a0057" }, + { (kernel_ulong_t) 0xdefaced1ffffebffULL, + "0xffffebff /* AT_??? */" }, + }; + static const kernel_ulong_t mount_fds[] = { + (kernel_ulong_t) 0xdeadca5701234567ULL, + (kernel_ulong_t) 0x12345678ffffff9cULL, + }; + static const struct strval open_flags[] = { + { (kernel_ulong_t) 0xffffffff00000000ULL, "O_RDONLY" }, + { (kernel_ulong_t) 0xdeadbeef80000001ULL, + "O_WRONLY|0x80000000" } + }; + + static const char str64[] = STR64; + + + char *bogus_path1 = tail_memdup(str64, PATH1_SIZE); + char *bogus_path2 = tail_memdup(str64, sizeof(str64)); + struct file_handle *handle = - alloca(sizeof(struct file_handle) + MAX_HANDLE_SZ); - const int dirfd = AT_FDCWD; - const int flags = AT_SYMLINK_FOLLOW; + tail_alloc(sizeof(struct file_handle) + MAX_HANDLE_SZ); + struct file_handle *handle_0 = + tail_alloc(sizeof(struct file_handle) + 0); + struct file_handle *handle_8 = + tail_alloc(sizeof(struct file_handle) + 8); + struct file_handle *handle_128 = + tail_alloc(sizeof(struct file_handle) + 128); + struct file_handle *handle_256 = + tail_alloc(sizeof(struct file_handle) + 256); + int *bogus_mount_id = tail_alloc(sizeof(*bogus_mount_id)); + + char handle_0_addr[sizeof("0x") + sizeof(void *) * 2]; + + char bogus_path1_addr[sizeof("0x") + sizeof(void *) * 2]; + char bogus_path1_after_addr[sizeof("0x") + sizeof(void *) * 2]; + + + struct strval paths[] = { + { (kernel_ulong_t) 0, "NULL" }, + { (kernel_ulong_t) (uintptr_t) (bogus_path1 + PATH1_SIZE), + bogus_path1_after_addr }, + { (kernel_ulong_t) (uintptr_t) bogus_path1, bogus_path1_addr }, + { (kernel_ulong_t) (uintptr_t) bogus_path2, "\"" STR64 "\"" }, + }; + struct strval name_handles[] = { + { (uintptr_t) (handle_0 + sizeof(struct file_handle)), + handle_0_addr }, + { (uintptr_t) handle_0, "{handle_bytes=256}" }, + { (uintptr_t) handle_8, "{handle_bytes=0}" }, + { (uintptr_t) handle_128, "{handle_bytes=128}" }, + { (uintptr_t) handle_256, "{handle_bytes=256}" }, + }; + struct { + kernel_ulong_t addr; + bool valid; + bool valid_data; + } open_handles[] = { + { 0, false, false }, + { (uintptr_t) (handle_0 + sizeof(struct file_handle)), + false, false }, + { (uintptr_t) handle_0 + 4, false, false }, + { (uintptr_t) handle_0, true, false }, + { (uintptr_t) handle_8, true, true }, + { (uintptr_t) handle_128, true, true }, + { (uintptr_t) handle_256, true, true }, + }; + kernel_ulong_t mount_ids[] = { + 0, + (kernel_ulong_t) (uintptr_t) (bogus_mount_id + 1), + (kernel_ulong_t) (uintptr_t) bogus_mount_id, + }; + + const int flags = 0x400; int mount_id; unsigned int i; + unsigned int j; + unsigned int k; + unsigned int l; + unsigned int m; + + + snprintf(bogus_path1_addr, sizeof(bogus_path1_addr), "%p", bogus_path1); + snprintf(bogus_path1_after_addr, sizeof(bogus_path1_after_addr), "%p", + bogus_path1 + PATH1_SIZE); + + handle_0->handle_bytes = 256; + handle_8->handle_bytes = 0; + handle_128->handle_bytes = 128; + handle_256->handle_bytes = 256; + + fill_memory((char *) handle_128 + sizeof(struct file_handle), 128); + fill_memory((char *) handle_256 + sizeof(struct file_handle), 256); + + snprintf(handle_0_addr, sizeof(handle_0_addr), "%p", + handle_0 + sizeof(struct file_handle)); handle->handle_bytes = 0; - assert(name_to_handle_at(dirfd, ".", handle, &mount_id, flags | 1) == -1); + assert(syscall(__NR_name_to_handle_at, fdcwd, ".", handle, &mount_id, + flags | 1) == -1); if (EINVAL != errno) perror_msg_and_skip("name_to_handle_at"); printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=0}, %p" ", AT_SYMLINK_FOLLOW|0x1) = -1 EINVAL (%m)\n", &mount_id); - assert(name_to_handle_at(dirfd, ".", handle, &mount_id, flags) == -1); + assert(syscall(__NR_name_to_handle_at, fdcwd, ".", handle, &mount_id, + flags) == -1); if (EOVERFLOW != errno) perror_msg_and_skip("name_to_handle_at"); printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=0 => %u}" ", %p, AT_SYMLINK_FOLLOW) = -1 EOVERFLOW (%m)\n", handle->handle_bytes, &mount_id); - assert(name_to_handle_at(dirfd, ".", handle, &mount_id, flags) == 0); + assert(syscall(__NR_name_to_handle_at, fdcwd, ".", handle, &mount_id, + flags) == 0); printf("name_to_handle_at(AT_FDCWD, \".\", {handle_bytes=%u" ", handle_type=%d, f_handle=0x", handle->handle_bytes, handle->handle_type); @@ -72,15 +305,52 @@ main(void) ", f_handle=0x", handle->handle_bytes, handle->handle_type); for (i = 0; i < handle->handle_bytes; ++i) printf("%02x", handle->f_handle[i]); - int rc = open_by_handle_at(-1, handle, O_RDONLY | O_DIRECTORY); + int rc = syscall(__NR_open_by_handle_at, -1, handle, + O_RDONLY | O_DIRECTORY); printf("}, O_RDONLY|O_DIRECTORY) = %d %s (%m)\n", rc, errno2name()); + for (i = 0; i < ARRAY_SIZE(dirfds); i++) { + for (j = 0; j < ARRAY_SIZE(paths); j++) { + for (k = 0; k < ARRAY_SIZE(name_handles); k++) { + for (l = 0; l < ARRAY_SIZE(mount_ids); l++) { + for (m = 0; m < ARRAY_SIZE(name_flags); + m++) { + do_name_to_handle_at( + dirfds[i].val, + dirfds[i].str, + paths[j].val, + paths[j].str, + name_handles[k].val, + name_handles[k].str, + mount_ids[l], + name_flags[m].val, + name_flags[m].str, + ASSERT_ERROR, 0); + } + } + } + } + } + + for (i = 0; i < ARRAY_SIZE(mount_fds); i++) { + for (j = 0; j < ARRAY_SIZE(open_handles); j++) { + for (k = 0; k < ARRAY_SIZE(open_flags); k++) { + do_open_by_handle_at(mount_fds[i], + open_handles[j].addr, + open_handles[j].valid, + open_handles[j].valid_data, + open_flags[k].val, + open_flags[k].str); + } + } + } + puts("+++ exited with 0 +++"); return 0; } #else -SKIP_MAIN_UNDEFINED("MAX_HANDLE_SZ") +SKIP_MAIN_UNDEFINED("__NR_name_to_handle_at && __NR_open_by_handle_at") #endif diff --git a/tests/fill_memory.c b/tests/fill_memory.c new file mode 100644 index 000000000..a0aeccba1 --- /dev/null +++ b/tests/fill_memory.c @@ -0,0 +1,19 @@ +#include "tests.h" + +void +fill_memory_ex(void *ptr, size_t size, unsigned char start, + unsigned char period) +{ + unsigned char *p = ptr; + size_t i; + + for (i = 0; i < size; i++) { + p[i] = start + i % period; + } +} + +void +fill_memory(void *ptr, size_t size) +{ + fill_memory_ex(ptr, size, 0x80, 0x80); +} diff --git a/tests/finit_module.c b/tests/finit_module.c new file mode 100644 index 000000000..3f0178f73 --- /dev/null +++ b/tests/finit_module.c @@ -0,0 +1,118 @@ +/* + * Check decoding of finit_module syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include "scno.h" + +#if defined(__NR_finit_module) + +# include +# include + +# include "init_delete_module.h" + +int +main(void) +{ + static const kernel_ulong_t bogus_fd = + (kernel_ulong_t) 0xdeb0d1edbeeff00dULL; + + static const struct { + kernel_ulong_t val; + const char *str; + } flags[] = { + { ARG_STR(0) }, + { (kernel_ulong_t) 0xffffffff00000002ULL, + "MODULE_INIT_IGNORE_VERMAGIC" }, + { (kernel_ulong_t) 0xbadc0deddefaced0ULL, + "0xdefaced0 /* MODULE_INIT_??? */" }, + { (kernel_ulong_t) 0xfacef157dec0ded1ULL, + "MODULE_INIT_IGNORE_MODVERSIONS|0xdec0ded0" }, + { -1LL, "MODULE_INIT_IGNORE_MODVERSIONS|" + "MODULE_INIT_IGNORE_VERMAGIC|0xfffffffc" }, + }; + + long rc; + char *bogus_param1 = tail_alloc(PARAM1_LEN); + char *bogus_param2 = tail_alloc(PARAM2_LEN); + const char *errstr; + + fill_memory_ex(bogus_param1, PARAM1_LEN, PARAM1_BASE, PARAM1_LEN); + fill_memory_ex(bogus_param2, PARAM2_LEN, PARAM2_BASE, PARAM2_LEN); + + rc = syscall(__NR_finit_module, bogus_zero, NULL, bogus_zero); + printf("finit_module(0, NULL, 0) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param1, flags[0].val); + errstr = sprintrc(rc); + + printf("finit_module(%d, \"", (int) bogus_fd); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\"..., %s) = %s\n", flags[0].str, errstr); + + bogus_param1[PARAM1_LEN - 1] = '\0'; + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param1, flags[1].val); + errstr = sprintrc(rc); + + printf("finit_module(%d, \"", (int) bogus_fd); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\", %s) = %s\n", flags[1].str, errstr); + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param2 + PARAM2_LEN, + flags[2].val); + printf("finit_module(%d, %p, %s) = %s\n", + (int) bogus_fd, bogus_param2 + PARAM2_LEN, flags[2].str, + sprintrc(rc)); + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param2, flags[3].val); + printf("finit_module(%d, %p, %s) = %s\n", + (int) bogus_fd, bogus_param2, flags[3].str, sprintrc(rc)); + + bogus_param2[PARAM2_LEN - 1] = '\0'; + + rc = syscall(__NR_finit_module, bogus_fd, bogus_param2, flags[4].val); + errstr = sprintrc(rc); + + printf("finit_module(%d, \"", (int) bogus_fd); + print_str(PARAM2_BASE, PARAM2_LEN - 1, true); + printf("\", %s) = %s\n", flags[4].str, errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_finit_module"); + +#endif diff --git a/tests/finit_module.test b/tests/finit_module.test new file mode 100755 index 000000000..bd644f386 --- /dev/null +++ b/tests/finit_module.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of finit_module syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a25 diff --git a/tests/flock.c b/tests/flock.c index cb231d53e..c154e4379 100644 --- a/tests/flock.c +++ b/tests/flock.c @@ -10,7 +10,7 @@ int main(void) { - const unsigned long fd = (long int) 0xdeadbeefffffffff; + const unsigned long fd = (long int) 0xdeadbeefffffffffULL; long rc = syscall(__NR_flock, fd, LOCK_SH); printf("flock(%d, LOCK_SH) = %ld %s (%m)\n", diff --git a/tests/fstat.c b/tests/fstat.c index 9ddc81185..12df3e19b 100644 --- a/tests/fstat.c +++ b/tests/fstat.c @@ -32,7 +32,7 @@ # define TEST_SYSCALL_NR __NR_fstat # define TEST_SYSCALL_STR "fstat" -# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418) +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 43147718418ULL) # include "fstatx.c" #else diff --git a/tests/fstat.test b/tests/fstat.test index 506b4406b..2ba0fbaab 100755 --- a/tests/fstat.test +++ b/tests/fstat.test @@ -12,7 +12,7 @@ syscall=$NAME run_prog > /dev/null sample=$syscall.sample > "$sample" -run_strace -ve$syscall -P$sample $args > "$OUT" +run_strace -ve$syscall -P$sample -a21 $args > "$OUT" match_diff "$LOG" "$OUT" rm -f "$OUT" diff --git a/tests/fstat64.c b/tests/fstat64.c index cf147df3c..a9c2e0725 100644 --- a/tests/fstat64.c +++ b/tests/fstat64.c @@ -35,7 +35,6 @@ # define STRUCT_STAT struct stat64 # define STRUCT_STAT_STR "struct stat64" # define STRUCT_STAT_IS_STAT64 1 -# define SAMPLE_SIZE ((libc_off_t) 43147718418) # include "fstatx.c" #else diff --git a/tests/fstatat.c b/tests/fstatat.c index ff4760114..66138c25e 100644 --- a/tests/fstatat.c +++ b/tests/fstatat.c @@ -28,11 +28,15 @@ #ifdef HAVE_FSTATAT # define TEST_SYSCALL_INVOKE(sample, pst) \ - fstatat(AT_FDCWD, sample, pst, AT_SYMLINK_NOFOLLOW) + syscall(TEST_SYSCALL_NR, AT_FDCWD, sample, pst, AT_SYMLINK_NOFOLLOW) # define PRINT_SYSCALL_HEADER(sample) \ - printf("%s(AT_FDCWD, \"%s\", ", TEST_SYSCALL_STR, sample) -# define PRINT_SYSCALL_FOOTER \ - puts(", AT_SYMLINK_NOFOLLOW) = 0") + do { \ + int saved_errno = errno; \ + printf("%s(AT_FDCWD, \"%s\", ", TEST_SYSCALL_STR, sample) +# define PRINT_SYSCALL_FOOTER(rc) \ + errno = saved_errno; \ + printf(", AT_SYMLINK_NOFOLLOW) = %s\n", sprintrc(rc)); \ + } while (0) # include "xstatx.c" diff --git a/tests/fstatat64.c b/tests/fstatat64.c index fa8992df5..03082a8fb 100644 --- a/tests/fstatat64.c +++ b/tests/fstatat64.c @@ -32,6 +32,9 @@ # define TEST_SYSCALL_NR __NR_fstatat64 # define TEST_SYSCALL_STR "fstatat64" +# define STRUCT_STAT struct stat64 +# define STRUCT_STAT_STR "struct stat64" +# define STRUCT_STAT_IS_STAT64 1 # include "fstatat.c" #else diff --git a/tests/fstatx.c b/tests/fstatx.c index 890e30d4e..f88d9a9c3 100644 --- a/tests/fstatx.c +++ b/tests/fstatx.c @@ -25,13 +25,16 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#define IS_FSTAT 1 #define TEST_SYSCALL_INVOKE(sample, pst) \ syscall(TEST_SYSCALL_NR, 0, pst) #define PRINT_SYSCALL_HEADER(sample) \ - printf("%s(0, ", TEST_SYSCALL_STR) -#define PRINT_SYSCALL_FOOTER \ - puts(") = 0") - -#define USE_ASM_STAT + do { \ + int saved_errno = errno; \ + printf("%s(0, ", TEST_SYSCALL_STR) +#define PRINT_SYSCALL_FOOTER(rc) \ + errno = saved_errno; \ + printf(") = %s\n", sprintrc(rc)); \ + } while (0) #include "xstatx.c" diff --git a/tests/fsync.c b/tests/fsync.c index 42aa5c734..2f5041068 100644 --- a/tests/fsync.c +++ b/tests/fsync.c @@ -9,7 +9,7 @@ int main(void) { - const long int fd = (long int) 0xdeadbeefffffffff; + const long int fd = (long int) 0xdeadbeefffffffffULL; long rc = syscall(__NR_fsync, fd); printf("fsync(%d) = %ld %s (%m)\n", (int) fd, rc, errno2name()); diff --git a/tests/ftruncate.c b/tests/ftruncate.c index 315f7bf12..ee17455f0 100644 --- a/tests/ftruncate.c +++ b/tests/ftruncate.c @@ -33,8 +33,6 @@ # include # include -# include "kernel_types.h" - int main(void) { diff --git a/tests/ftruncate64.c b/tests/ftruncate64.c index 7530e7070..90d9938fc 100644 --- a/tests/ftruncate64.c +++ b/tests/ftruncate64.c @@ -36,7 +36,7 @@ int main(void) { - const off_t len = 0xdefaceddeadbeef; + const off_t len = 0xdefaceddeadbeefULL; int rc = ftruncate(-1, len); printf("ftruncate64(-1, %llu) = %d %s (%m)\n", diff --git a/tests/futex.c b/tests/futex.c index 7cc6cc464..586b95d5e 100644 --- a/tests/futex.c +++ b/tests/futex.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -189,14 +189,14 @@ main(int argc, char *argv[]) /* uaddr is NULL */ CHECK_FUTEX(NULL, FUTEX_WAIT, VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EFAULT)); - printf("futex(NULL, FUTEX_WAIT, %u, {%jd, %jd}) = %s\n", + printf("futex(NULL, FUTEX_WAIT, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, sprintrc(rc)); /* uaddr is faulty */ CHECK_FUTEX(uaddr + 1, FUTEX_WAIT, VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EFAULT)); - printf("futex(%p, FUTEX_WAIT, %u, {%jd, %jd}) = %s\n", + printf("futex(%p, FUTEX_WAIT, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", uaddr + 1, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, sprintrc(rc)); @@ -209,14 +209,15 @@ main(int argc, char *argv[]) /* uaddr is not as provided; uaddr2 is faulty but ignored */ CHECK_FUTEX(uaddr, FUTEX_WAIT, VAL, tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EAGAIN)); - printf("futex(%p, FUTEX_WAIT, %u, {%jd, %jd}) = %s\n", + printf("futex(%p, FUTEX_WAIT, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, sprintrc(rc)); /* uaddr is not as provided; uaddr2 is faulty but ignored */ CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAIT, VAL, tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EAGAIN)); - printf("futex(%p, FUTEX_WAIT_PRIVATE, %u, {%jd, %jd}) = %s\n", + printf("futex(%p, FUTEX_WAIT_PRIVATE, %u, {tv_sec=%jd, tv_nsec=%jd}) = " + "%s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, sprintrc(rc)); @@ -227,7 +228,7 @@ main(int argc, char *argv[]) FUTEX_CLOCK_REALTIME | FUTEX_WAIT, VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EAGAIN)); printf("futex(%p, FUTEX_WAIT|FUTEX_CLOCK_REALTIME, %u, " - "{%jd, %jd}) = %s\n", uaddr, VAL_PR, + "{tv_sec=%jd, tv_nsec=%jd}) = %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, sprintrc(rc)); @@ -235,7 +236,7 @@ main(int argc, char *argv[]) FUTEX_CLOCK_REALTIME | FUTEX_PRIVATE_FLAG | FUTEX_WAIT , VAL, tmout, uaddr2, 0, (rc == -1) && (errno == EAGAIN)); printf("futex(%p, FUTEX_WAIT_PRIVATE|FUTEX_CLOCK_REALTIME, %u, " - "{%jd, %jd}) = %s\n", uaddr, VAL_PR, + "{tv_sec=%jd, tv_nsec=%jd}) = %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, sprintrc(rc)); @@ -253,21 +254,24 @@ main(int argc, char *argv[]) CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAIT_BITSET, VAL, tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EAGAIN)); - printf("futex(%p, FUTEX_WAIT_BITSET, %u, {%jd, %jd}, %#x) = %s\n", + printf("futex(%p, FUTEX_WAIT_BITSET, %u, {tv_sec=%jd, tv_nsec=%jd}, " + "%#x) = %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, VAL3_PR, sprintrc(rc)); /* val3 of 0 is invalid */ CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAIT_BITSET, VAL, tmout, uaddr2 + 1, 0, (rc == -1) && (errno == EINVAL)); - printf("futex(%p, FUTEX_WAIT_BITSET, %u, {%jd, %jd}, %#x) = %s\n", + printf("futex(%p, FUTEX_WAIT_BITSET, %u, {tv_sec=%jd, tv_nsec=%jd}, " + "%#x) = %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, 0, sprintrc(rc)); CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAIT_BITSET, VAL, tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EAGAIN)); - printf("futex(%p, FUTEX_WAIT_BITSET_PRIVATE, %u, {%jd, %jd}, %#x) = " - "%s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, + printf("futex(%p, FUTEX_WAIT_BITSET_PRIVATE, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %#x) = %s\n", + uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, VAL3_PR, sprintrc(rc)); /* Next 3 tests are with CLOCKRT bit set */ @@ -275,7 +279,7 @@ main(int argc, char *argv[]) CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_WAIT_BITSET, VAL, tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EAGAIN)); printf("futex(%p, FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %u, " - "{%jd, %jd}, %#x) = %s\n", uaddr, VAL_PR, + "{tv_sec=%jd, tv_nsec=%jd}, %#x) = %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, VAL3_PR, sprintrc(rc)); @@ -283,7 +287,7 @@ main(int argc, char *argv[]) CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_WAIT_BITSET, VAL, tmout, uaddr2 + 1, 0, (rc == -1) && (errno == EINVAL)); printf("futex(%p, FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %u, " - "{%jd, %jd}, %#x) = %s\n", uaddr, VAL_PR, + "{tv_sec=%jd, tv_nsec=%jd}, %#x) = %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, 0, sprintrc(rc)); @@ -291,7 +295,7 @@ main(int argc, char *argv[]) FUTEX_WAIT_BITSET, VAL, tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EAGAIN)); printf("futex(%p, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, %u, " - "{%jd, %jd}, %#x) = %s\n", uaddr, VAL_PR, + "{tv_sec=%jd, tv_nsec=%jd}, %#x) = %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, VAL3_PR, sprintrc(rc)); @@ -470,42 +474,47 @@ main(int argc, char *argv[]) int err; const char *errstr; } wake_ops[] = { - { 0x00000000, "{FUTEX_OP_SET, 0, FUTEX_OP_CMP_EQ, 0}" }, - { 0x00fff000, "{FUTEX_OP_SET, 4095, FUTEX_OP_CMP_EQ, 0}" }, - { 0x00000fff, "{FUTEX_OP_SET, 0, FUTEX_OP_CMP_EQ, 4095}" }, - { 0x00ffffff, "{FUTEX_OP_SET, 4095, FUTEX_OP_CMP_EQ, 4095}" }, - { 0x10000000, "{FUTEX_OP_ADD, 0, FUTEX_OP_CMP_EQ, 0}" }, - { 0x20000000, "{FUTEX_OP_OR, 0, FUTEX_OP_CMP_EQ, 0}" }, - { 0x30000000, "{FUTEX_OP_ANDN, 0, FUTEX_OP_CMP_EQ, 0}" }, - { 0x40000000, "{FUTEX_OP_XOR, 0, FUTEX_OP_CMP_EQ, 0}" }, - { 0x50000000, "{0x5 /* FUTEX_OP_??? */, 0, FUTEX_OP_CMP_EQ, 0}", + { 0x00000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x00fff000, "FUTEX_OP_SET<<28|0xfff<<12|FUTEX_OP_CMP_EQ<<24|" + "0" }, + { 0x00000fff, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_EQ<<24|" + "0xfff" }, + { 0x00ffffff, "FUTEX_OP_SET<<28|0xfff<<12|FUTEX_OP_CMP_EQ<<24|" + "0xfff" }, + { 0x10000000, "FUTEX_OP_ADD<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x20000000, "FUTEX_OP_OR<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x30000000, "FUTEX_OP_ANDN<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x40000000, "FUTEX_OP_XOR<<28|0<<12|FUTEX_OP_CMP_EQ<<24|0" }, + { 0x50000000, "0x5<<28 /* FUTEX_OP_??? */|0<<12|" + "FUTEX_OP_CMP_EQ<<24|0", ENOSYS, "ENOSYS" }, + { 0x70000000, "0x7<<28 /* FUTEX_OP_??? */|0<<12|" + "FUTEX_OP_CMP_EQ<<24|0", ENOSYS, "ENOSYS" }, + { 0x80000000, "FUTEX_OP_OPARG_SHIFT<<28|FUTEX_OP_SET<<28|0<<12|" + "FUTEX_OP_CMP_EQ<<24|0" }, + { 0xa0caffee, "FUTEX_OP_OPARG_SHIFT<<28|FUTEX_OP_OR<<28|" + "0xcaf<<12|FUTEX_OP_CMP_EQ<<24|0xfee" }, + { 0x01000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_NE<<24|0" }, + { 0x01234567, "FUTEX_OP_SET<<28|0x234<<12|FUTEX_OP_CMP_NE<<24|" + "0x567" }, + { 0x02000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_LT<<24|0" }, + { 0x03000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_LE<<24|0" }, + { 0x04000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_GT<<24|0" }, + { 0x05000000, "FUTEX_OP_SET<<28|0<<12|FUTEX_OP_CMP_GE<<24|0" }, + { 0x06000000, "FUTEX_OP_SET<<28|0<<12|" + "0x6<<24 /* FUTEX_OP_CMP_??? */|0", ENOSYS, "ENOSYS" }, + { 0x07000000, "FUTEX_OP_SET<<28|0<<12|" + "0x7<<24 /* FUTEX_OP_CMP_??? */|0", ENOSYS, "ENOSYS" }, + { 0x08000000, "FUTEX_OP_SET<<28|0<<12|" + "0x8<<24 /* FUTEX_OP_CMP_??? */|0", ENOSYS, "ENOSYS" }, + { 0x0f000000, "FUTEX_OP_SET<<28|0<<12|" + "0xf<<24 /* FUTEX_OP_CMP_??? */|0", ENOSYS, "ENOSYS" }, + { 0xbadfaced, "FUTEX_OP_OPARG_SHIFT<<28|FUTEX_OP_ANDN<<28|" + "0xdfa<<12|0xa<<24 /* FUTEX_OP_CMP_??? */|0xced", ENOSYS, "ENOSYS" }, - { 0x70000000, "{0x7 /* FUTEX_OP_??? */, 0, FUTEX_OP_CMP_EQ, 0}", + { 0xffffffff, "FUTEX_OP_OPARG_SHIFT<<28|" + "0x7<<28 /* FUTEX_OP_??? */|0xfff<<12|" + "0xf<<24 /* FUTEX_OP_CMP_??? */|0xfff", ENOSYS, "ENOSYS" }, - { 0x80000000, "{FUTEX_OP_OPARG_SHIFT|FUTEX_OP_SET, 0, " - "FUTEX_OP_CMP_EQ, 0}" }, - { 0xa0caffee, "{FUTEX_OP_OPARG_SHIFT|FUTEX_OP_OR, 3247, " - "FUTEX_OP_CMP_EQ, 4078}" }, - { 0x01000000, "{FUTEX_OP_SET, 0, FUTEX_OP_CMP_NE, 0}" }, - { 0x01234567, "{FUTEX_OP_SET, 564, FUTEX_OP_CMP_NE, 1383}" }, - { 0x02000000, "{FUTEX_OP_SET, 0, FUTEX_OP_CMP_LT, 0}" }, - { 0x03000000, "{FUTEX_OP_SET, 0, FUTEX_OP_CMP_LE, 0}" }, - { 0x04000000, "{FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 0}" }, - { 0x05000000, "{FUTEX_OP_SET, 0, FUTEX_OP_CMP_GE, 0}" }, - { 0x06000000, "{FUTEX_OP_SET, 0, 0x6 /* FUTEX_OP_CMP_??? */, " - "0}", ENOSYS, "ENOSYS" }, - { 0x07000000, "{FUTEX_OP_SET, 0, 0x7 /* FUTEX_OP_CMP_??? */, " - "0}", ENOSYS, "ENOSYS" }, - { 0x08000000, "{FUTEX_OP_SET, 0, 0x8 /* FUTEX_OP_CMP_??? */, " - "0}", ENOSYS, "ENOSYS" }, - { 0x0f000000, "{FUTEX_OP_SET, 0, 0xf /* FUTEX_OP_CMP_??? */, " - "0}", ENOSYS, "ENOSYS" }, - { 0xbadfaced, "{FUTEX_OP_OPARG_SHIFT|FUTEX_OP_ANDN, " - "3578, 0xa /* FUTEX_OP_CMP_??? */, 3309}", ENOSYS, - "ENOSYS" }, - { 0xffffffff, "{FUTEX_OP_OPARG_SHIFT|0x7 /* FUTEX_OP_??? */, " - "4095, 0xf /* FUTEX_OP_CMP_??? */, 4095}", ENOSYS, - "ENOSYS" }, }; for (i = 0; i < ARRAY_SIZE(wake_ops); i++) { @@ -522,8 +531,8 @@ main(int argc, char *argv[]) CHECK_INVALID_CLOCKRT(FUTEX_WAKE_OP, ARG3 | ARG4 | ARG5 | ARG6, "%u", "%u", "%#lx", /* Decoding of the 0xdeadbee4 value */ - "{FUTEX_OP_OPARG_SHIFT|0x5 /* FUTEX_OP_??? */, 2779, " - "0xe /* FUTEX_OP_CMP_??? */, 3812}"); + "FUTEX_OP_OPARG_SHIFT<<28|0x5<<28 /* FUTEX_OP_??? */|0xadb<<12|" + "0xe<<24 /* FUTEX_OP_CMP_??? */|0xee4"); /* FUTEX_LOCK_PI - slow path for mutex lock with process inheritance * support. Expect that futex has 0 in unlocked case and @@ -543,13 +552,14 @@ main(int argc, char *argv[]) CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_LOCK_PI, VAL, tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EFAULT)); - printf("futex(%p, FUTEX_LOCK_PI, {%jd, %jd}) = %s\n", + printf("futex(%p, FUTEX_LOCK_PI, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", uaddr + 1, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, sprintrc(rc)); CHECK_FUTEX_ENOSYS(uaddr + 1, FUTEX_PRIVATE_FLAG | FUTEX_LOCK_PI, VAL, tmout, uaddr2 + 1, VAL3, (rc == -1) && (errno == EFAULT)); - printf("futex(%p, FUTEX_LOCK_PI_PRIVATE, {%jd, %jd}) = %s\n", + printf("futex(%p, FUTEX_LOCK_PI_PRIVATE, {tv_sec=%jd, tv_nsec=%jd}) = " + "%s\n", uaddr + 1, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, sprintrc(rc)); @@ -623,20 +633,22 @@ main(int argc, char *argv[]) CHECK_FUTEX_ENOSYS(uaddr, FUTEX_WAIT_REQUEUE_PI, VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EAGAIN)); - printf("futex(%p, FUTEX_WAIT_REQUEUE_PI, %u, {%jd, %jd}, %p) = %s\n", + printf("futex(%p, FUTEX_WAIT_REQUEUE_PI, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %p) = %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, uaddr2, sprintrc(rc)); CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_WAIT_REQUEUE_PI, VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EAGAIN)); - printf("futex(%p, FUTEX_WAIT_REQUEUE_PI_PRIVATE, %u, {%jd, %jd}, %p) " + printf("futex(%p, FUTEX_WAIT_REQUEUE_PI_PRIVATE, %u, " + "{tv_sec=%jd, tv_nsec=%jd}, %p) " "= %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, uaddr2, sprintrc(rc)); CHECK_FUTEX_ENOSYS(uaddr, FUTEX_CLOCK_REALTIME | FUTEX_WAIT_REQUEUE_PI, VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EAGAIN)); printf("futex(%p, FUTEX_WAIT_REQUEUE_PI|FUTEX_CLOCK_REALTIME, %u, " - "{%jd, %jd}, %p) = %s\n", uaddr, VAL_PR, + "{tv_sec=%jd, tv_nsec=%jd}, %p) = %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, uaddr2, sprintrc(rc)); @@ -644,7 +656,7 @@ main(int argc, char *argv[]) FUTEX_WAIT_REQUEUE_PI, VAL, tmout, uaddr2, VAL3, (rc == -1) && (errno == EAGAIN)); printf("futex(%p, FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME, " - "%u, {%jd, %jd}, %p) = %s\n", uaddr, VAL_PR, + "%u, {tv_sec=%jd, tv_nsec=%jd}, %p) = %s\n", uaddr, VAL_PR, (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, uaddr2, sprintrc(rc)); diff --git a/tests/futimesat.c b/tests/futimesat.c index 4e76cc8a3..c35662912 100644 --- a/tests/futimesat.c +++ b/tests/futimesat.c @@ -32,14 +32,11 @@ #ifdef __NR_futimesat +# include # include # include # include -#define CAST_NUM(n) \ - (sizeof(n) == sizeof(long) ? \ - (unsigned long long) (unsigned long) (n) : \ - (unsigned long long) (n)) int main(void) @@ -49,30 +46,36 @@ main(void) perror_msg_and_fail("gettimeofday"); static const char sample[] = "futimesat_sample"; - unsigned long dirfd = (unsigned long) 0xdeadbeef00000000 | -100U; + unsigned long dirfd = (unsigned long) 0xdeadbeef00000000ULL | -100U; long rc = syscall(__NR_futimesat, dirfd, sample, 0); printf("futimesat(AT_FDCWD, \"%s\", NULL) = %ld %s (%m)\n", sample, rc, errno2name()); struct timeval *const ts = tail_alloc(sizeof(*ts) * 2); - dirfd = (unsigned long) 0xdeadbeefffffffff; - - rc = syscall(__NR_futimesat, dirfd, 0, ts + 1); - printf("futimesat(%d, NULL, %p) = %ld %s (%m)\n", - (int) dirfd, ts + 1, rc, errno2name()); + dirfd = (unsigned long) 0xdeadbeefffffffffULL; ts[0].tv_sec = tv.tv_sec; ts[0].tv_usec = tv.tv_usec; ts[1].tv_sec = tv.tv_sec - 1; ts[1].tv_usec = tv.tv_usec + 1; + rc = syscall(__NR_futimesat, dirfd, 0, ts + 2); + printf("futimesat(%d, NULL, %p) = %ld %s (%m)\n", + (int) dirfd, ts + 2, rc, errno2name()); + + rc = syscall(__NR_futimesat, dirfd, 0, ts + 1); + printf("futimesat(%d, NULL, [{tv_sec=%jd, tv_usec=%jd}, %p]) = " + "%ld %s (%m)\n", (int) dirfd, + (intmax_t) ts[1].tv_sec, (intmax_t) ts[1].tv_usec, + ts + 2, rc, errno2name()); + (void) close(0); rc = syscall(__NR_futimesat, 0, "", ts); - printf("futimesat(0, \"\", [{%llu, %llu}, {%llu, %llu}])" - " = %ld %s (%m)\n", - CAST_NUM(ts[0].tv_sec), CAST_NUM(ts[0].tv_usec), - CAST_NUM(ts[1].tv_sec), CAST_NUM(ts[1].tv_usec), + printf("futimesat(0, \"\", [{tv_sec=%jd, tv_usec=%jd}, " + "{tv_sec=%jd, tv_usec=%jd}]) = %ld %s (%m)\n", + (intmax_t) ts[0].tv_sec, (intmax_t) ts[0].tv_usec, + (intmax_t) ts[1].tv_sec, (intmax_t) ts[1].tv_usec, rc, errno2name()); puts("+++ exited with 0 +++"); diff --git a/tests/get_mempolicy.c b/tests/get_mempolicy.c index 6be3ef29d..03d1bffc5 100644 --- a/tests/get_mempolicy.c +++ b/tests/get_mempolicy.c @@ -81,9 +81,9 @@ main(void) puts("get_mempolicy(NULL, NULL, 0, NULL, 0) = 0"); int *mode = (void *) 0xdefaced1baddeed2; - unsigned long maxnode = (unsigned long) 0xcafef00dbadc0ded; - const unsigned long *nodemask = (void *) 0xfacedad3bebefed4; - const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + unsigned long maxnode = (unsigned long) 0xcafef00dbadc0dedULL; + const unsigned long *nodemask = (void *) 0xfacedad3bebefed4ULL; + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL; const unsigned long flags = -1U; rc = syscall(__NR_get_mempolicy, mode, nodemask, maxnode, addr, flags); printf("get_mempolicy(%p, %p, %lu, %#lx, %s|%#lx) = %ld %s (%m)\n", diff --git a/tests/getcpu.c b/tests/getcpu.c index baef1bb49..ec671f1e8 100644 --- a/tests/getcpu.c +++ b/tests/getcpu.c @@ -1,7 +1,7 @@ /* * Check decoding of getcpu syscall. * - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,12 +39,12 @@ int main(void) { - static const unsigned *bogus_cpu = - (unsigned *) (unsigned long) 0xfffffeedfffffaceULL; - static const unsigned *bogus_node = - (unsigned *) (unsigned long) 0xfffffca7ffffc0deULL; - static const unsigned *bogus_tcache = - (unsigned *) (unsigned long) 0xffffda7affffdeadULL; + unsigned *bogus_cpu = + (unsigned *) tail_alloc(sizeof(* bogus_cpu)) + 1; + unsigned *bogus_node = + (unsigned *) tail_alloc(sizeof(* bogus_node)) + 1; + unsigned *bogus_tcache = + (unsigned *) tail_alloc(sizeof(* bogus_tcache)) + 1; long res; unsigned *cpu = tail_alloc(sizeof(*cpu)); diff --git a/tests/getdents.c b/tests/getdents.c index 5e642340f..b787c837b 100644 --- a/tests/getdents.c +++ b/tests/getdents.c @@ -37,7 +37,6 @@ # include # include # include -# include "kernel_types.h" static const char fname[] = "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" @@ -106,12 +105,13 @@ main(int ac, const char **av) assert(!close(0)); assert(!open(".", O_RDONLY | O_DIRECTORY)); - unsigned long count = (unsigned long) 0xfacefeeddeadbeef; - long rc = syscall(__NR_getdents, (long) 0xdefacedffffffff, NULL, count); + unsigned long count = (unsigned long) 0xfacefeeddeadbeefULL; + long rc = syscall(__NR_getdents, (long) 0xdefacedffffffffULL, NULL, + count); printf("getdents(-1, NULL, %u) = %ld %s (%m)\n", (unsigned) count, rc, errno2name()); - count = (unsigned long) 0xfacefeed00000000 | sizeof(buf); + count = (unsigned long) 0xfacefeed00000000ULL | sizeof(buf); while ((rc = syscall(__NR_getdents, 0, buf, count))) { kernel_dirent *d; long i; diff --git a/tests/getdents64.c b/tests/getdents64.c index 2243b8420..9da2a23c2 100644 --- a/tests/getdents64.c +++ b/tests/getdents64.c @@ -111,12 +111,13 @@ main(int ac, const char **av) assert(!close(0)); assert(!open(".", O_RDONLY | O_DIRECTORY)); - unsigned long count = (unsigned long) 0xfacefeeddeadbeef; - long rc = syscall(__NR_getdents64, (long) 0xdefacedffffffff, NULL, count); + unsigned long count = (unsigned long) 0xfacefeeddeadbeefULL; + long rc = syscall(__NR_getdents64, (long) 0xdefacedffffffffULL, NULL, + count); printf("getdents64(-1, NULL, %u) = %ld %s (%m)\n", (unsigned) count, rc, errno2name()); - count = (unsigned long) 0xfacefeed00000000 | sizeof(buf); + count = (unsigned long) 0xfacefeed00000000ULL | sizeof(buf); while ((rc = syscall(__NR_getdents64, 0, buf, count))) { kernel_dirent64 *d; long i; diff --git a/tests/getgroups.c b/tests/getgroups.c index 4abcdef76..2617303f1 100644 --- a/tests/getgroups.c +++ b/tests/getgroups.c @@ -67,7 +67,7 @@ get_groups(const long size, GID_TYPE *const g) if (i != ngroups) perror_msg_and_fail("%s(%#lx, %p)", SYSCALL_NAME, size, g); - printf("%s(%u, [", SYSCALL_NAME, (unsigned) size); + printf("%s(%d, [", SYSCALL_NAME, (int) size); for (i = 0; i < ngroups; ++i) { if (i) printf(", "); @@ -95,18 +95,18 @@ main(void) printf("%s(0, NULL) = %ld\n", SYSCALL_NAME, rc); rc = syscall(SYSCALL_NR, -1U, 0); - printf("%s(%u, NULL) = %s\n", SYSCALL_NAME, -1U, sprintrc(rc)); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, -1, sprintrc(rc)); rc = syscall(SYSCALL_NR, -1L, 0); - printf("%s(%u, NULL) = %s\n", SYSCALL_NAME, -1U, sprintrc(rc)); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, -1, sprintrc(rc)); const unsigned int ngroups_max = sysconf(_SC_NGROUPS_MAX); rc = syscall(SYSCALL_NR, ngroups_max, 0); - printf("%s(%u, NULL) = %s\n", SYSCALL_NAME, ngroups_max, sprintrc(rc)); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, ngroups_max, sprintrc(rc)); rc = syscall(SYSCALL_NR, (long) 0xffffffff00000000ULL | ngroups_max, 0); - printf("%s(%u, NULL) = %s\n", SYSCALL_NAME, ngroups_max, sprintrc(rc)); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, ngroups_max, sprintrc(rc)); /* check how the second argument is decoded */ GID_TYPE *const g1 = @@ -120,7 +120,7 @@ main(void) if (ngroups) { rc = syscall(SYSCALL_NR, ngroups, efault); - printf("%s(%u, %p) = %s\n", + printf("%s(%d, %p) = %s\n", SYSCALL_NAME, (unsigned) ngroups, efault, sprintrc(rc)); } diff --git a/tests/getrandom.test b/tests/getrandom.test index e06367c93..ad34048fd 100755 --- a/tests/getrandom.test +++ b/tests/getrandom.test @@ -3,4 +3,4 @@ # Check getrandom syscall decoding. . "${srcdir=.}/init.sh" -run_strace_match_diff -a32 -xx -s3 +run_strace_match_diff -a32 -s3 diff --git a/tests/getrusage.c b/tests/getrusage.c index 3c09aa6e0..8b76eff69 100644 --- a/tests/getrusage.c +++ b/tests/getrusage.c @@ -41,16 +41,16 @@ main(void) { struct rusage *const usage = tail_alloc(sizeof(struct rusage)); int rc = syscall(__NR_getrusage, RUSAGE_SELF, usage); - printf("getrusage(RUSAGE_SELF, {ru_utime={%ju, %ju}" - ", ru_stime={%ju, %ju}, ru_maxrss=%lu, ru_ixrss=%lu" - ", ru_idrss=%lu, ru_isrss=%lu, ru_minflt=%lu" + printf("getrusage(RUSAGE_SELF, {ru_utime={tv_sec=%jd, tv_usec=%jd}" + ", ru_stime={tv_sec=%jd, tv_usec=%jd}, ru_maxrss=%lu" + ", ru_ixrss=%lu, ru_idrss=%lu, ru_isrss=%lu, ru_minflt=%lu" ", ru_majflt=%lu, ru_nswap=%lu, ru_inblock=%lu" ", ru_oublock=%lu, ru_msgsnd=%lu, ru_msgrcv=%lu" ", ru_nsignals=%lu, ru_nvcsw=%lu, ru_nivcsw=%lu}) = %d\n", - (uintmax_t) usage->ru_utime.tv_sec, - (uintmax_t) usage->ru_utime.tv_usec, - (uintmax_t) usage->ru_stime.tv_sec, - (uintmax_t) usage->ru_stime.tv_usec, + (intmax_t) usage->ru_utime.tv_sec, + (intmax_t) usage->ru_utime.tv_usec, + (intmax_t) usage->ru_stime.tv_sec, + (intmax_t) usage->ru_stime.tv_usec, usage->ru_maxrss, usage->ru_ixrss, usage->ru_idrss, usage->ru_isrss, usage->ru_minflt, usage->ru_majflt, usage->ru_nswap, usage->ru_inblock, usage->ru_oublock, diff --git a/tests/init.sh b/tests/init.sh index 46a08f95e..f368b98af 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -166,7 +166,7 @@ match_diff() # dump both files and fail with ERROR_MESSAGE. match_grep() { - local output patterns error pattern failed= + local output patterns error pattern cnt failed= if [ $# -eq 0 ]; then output="$LOG" else @@ -186,14 +186,16 @@ match_grep() check_prog wc check_prog grep + cnt=1 while read -r pattern; do LC_ALL=C grep -E -x -e "$pattern" < "$output" > /dev/null || { test -n "$failed" || { echo 'Failed patterns of expected output:' failed=1 } - printf '%s\n' "$pattern" + printf '#%d: %s\n' "$cnt" "$pattern" } + cnt=$(($cnt + 1)) done < "$patterns" test -z "$failed" || { echo 'Actual output:' @@ -214,12 +216,55 @@ run_strace_match_diff() rm -f "$EXP" } +# Print kernel version code. +# usage: kernel_version_code $(uname -r) +kernel_version_code() +{ + ( + set -f + IFS=. + set -- $1 + v1="${1%%[!0-9]*}" && [ -n "$v1" ] || v1=0 + v2="${2%%[!0-9]*}" && [ -n "$v2" ] || v2=0 + v3="${3%%[!0-9]*}" && [ -n "$v3" ] || v3=0 + echo "$(($v1 * 65536 + $v2 * 256 + $v3))" + ) +} + +# Usage: require_min_kernel_version_or_skip 3.0 +require_min_kernel_version_or_skip() +{ + local uname_r + uname_r="$(uname -r)" + + [ "$(kernel_version_code "$uname_r")" -ge \ + "$(kernel_version_code "$1")" ] || + skip_ "the kernel release $uname_r is not $1 or newer" +} + +# Usage: grep_pid_status $pid GREP-OPTIONS... +grep_pid_status() +{ + local pid + pid=$1; shift + cat < "/proc/$pid/status" | grep "$@" +} + check_prog cat check_prog rm rm -f "$LOG" -: "${STRACE:=../strace}" +[ -n "${STRACE-}" ] || { + STRACE=../strace + case "${LOG_COMPILER-} ${LOG_FLAGS-}" in + *--suppressions=*--error-exitcode=*--tool=*) + # add valgrind command prefix + STRACE="${LOG_COMPILER-} ${LOG_FLAGS-} $STRACE" + ;; + esac +} + : "${TIMEOUT_DURATION:=60}" : "${SLEEP_A_BIT:=sleep 1}" diff --git a/tests/init_delete_module.h b/tests/init_delete_module.h new file mode 100644 index 000000000..db550c33c --- /dev/null +++ b/tests/init_delete_module.h @@ -0,0 +1,64 @@ +/* + * Helper header containing common code for finit_module, init_module, + * and delete_module tests. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef STRACE_TESTS_INIT_DELETE_MODULE_H +#define STRACE_TESTS_INIT_DELETE_MODULE_H + +# include +# include + +enum { + PARAM1_LEN = 33, + PARAM2_LEN = 8, + PARAM1_BASE = 0x30, + PARAM2_BASE = 0x80, + MAX_STRLEN = 32, +}; + +static const kernel_ulong_t bogus_zero = + (kernel_ulong_t) 0xffffffff00000000ULL; + +static void +print_str(unsigned int base, unsigned int len, bool escape) +{ + unsigned int i; + + if (!escape) { + for (i = base; i < (base + len); i++) + putc(i, stdout); + + return; + } + + for (i = base; i < (base + len); i++) + printf("\\%u%u%u", (i >> 6) & 0x3, (i >> 3) & 0x7, i & 0x7); +} + +#endif /* !STRACE_TESTS_INIT_DELETE_MODULE_H */ diff --git a/tests/init_module.c b/tests/init_module.c new file mode 100644 index 000000000..88ef9ec83 --- /dev/null +++ b/tests/init_module.c @@ -0,0 +1,106 @@ +/* + * Check decoding of init_module syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_init_module) + +# include +# include + +# include "init_delete_module.h" + +int +main(void) +{ + + static const kernel_ulong_t bogus_addr = + (kernel_ulong_t) 0xfffffeedfffffaceULL; + static const kernel_ulong_t bogus_len = + (kernel_ulong_t) 0xfffffca7ffffc0deULL; + + long rc; + char *bogus_param1 = tail_alloc(PARAM1_LEN); + char *bogus_param2 = tail_alloc(PARAM2_LEN); + const char *errstr; + + fill_memory_ex(bogus_param1, PARAM1_LEN, PARAM1_BASE, PARAM1_LEN); + fill_memory_ex(bogus_param2, PARAM2_LEN, PARAM2_BASE, PARAM2_LEN); + + rc = syscall(__NR_init_module, NULL, bogus_zero, NULL); + printf("init_module(NULL, %llu, NULL) = %s\n", + (unsigned long long) bogus_zero, sprintrc(rc)); + + rc = syscall(__NR_init_module, bogus_addr, 0, bogus_param1); + errstr = sprintrc(rc); + + printf("init_module(%#llx, 0, \"", (unsigned long long) bogus_addr); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\"...) = %s\n", errstr); + + bogus_param1[PARAM1_LEN - 1] = '\0'; + + rc = syscall(__NR_init_module, bogus_addr, 0, bogus_param1); + errstr = sprintrc(rc); + + printf("init_module(%#llx, 0, \"", (unsigned long long) bogus_addr); + print_str(PARAM1_BASE, MAX_STRLEN, false); + printf("\") = %s\n", errstr); + + rc = syscall(__NR_init_module, bogus_addr, bogus_len, + bogus_param2 + PARAM2_LEN); + printf("init_module(%#llx, %llu, %p) = %s\n", + (unsigned long long) bogus_addr, (unsigned long long) bogus_len, + bogus_param2 + PARAM2_LEN, sprintrc(rc)); + + rc = syscall(__NR_init_module, NULL, bogus_len, bogus_param2); + printf("init_module(NULL, %llu, %p) = %s\n", + (unsigned long long) bogus_len, bogus_param2, sprintrc(rc)); + + bogus_param2[PARAM2_LEN - 1] = '\0'; + + rc = syscall(__NR_init_module, NULL, bogus_len, bogus_param2); + errstr = sprintrc(rc); + + printf("init_module(NULL, %llu, \"", (unsigned long long) bogus_len); + print_str(PARAM2_BASE, PARAM2_LEN - 1, true); + printf("\") = %s\n", errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_init_module"); + +#endif diff --git a/tests/init_module.test b/tests/init_module.test new file mode 100755 index 000000000..ef7c7325b --- /dev/null +++ b/tests/init_module.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of init_module syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests/inotify.c b/tests/inotify.c new file mode 100644 index 000000000..925d69ffe --- /dev/null +++ b/tests/inotify.c @@ -0,0 +1,90 @@ +/* + * Check decoding of inotify_add_watch and inotify_rm_watch syscalls. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_inotify_add_watch) && defined(__NR_inotify_rm_watch) + +# include +# include +# include + +int +main(void) +{ + static const struct { + const char *path; + const char *str; + } bogus_path_str = { + ARG_STR("/abc\1/def\2/ghi\3/jkl\4/mno\5/pqr\6/stu\7/vwx\10") }; + static const kernel_ulong_t bogus_fd = + (kernel_ulong_t) 0xfffffeedfffffaceULL; + static const kernel_ulong_t bogus_mask = + (kernel_ulong_t) 0xffffda7affffdeadULL; + static const char *bogus_mask_str = "IN_ACCESS|IN_ATTRIB|" + "IN_CLOSE_WRITE|IN_OPEN|IN_MOVED_TO|IN_DELETE|IN_DELETE_SELF|" + "IN_MOVE_SELF|IN_Q_OVERFLOW|IN_IGNORED|IN_ONLYDIR|" + "IN_DONT_FOLLOW|IN_EXCL_UNLINK|IN_MASK_ADD|IN_ISDIR|IN_ONESHOT|" + "0x18ff1000"; + + long rc; + char *bogus_path = tail_memdup(bogus_path_str.path, + strlen(bogus_path_str.path) + 1); + + rc = syscall(__NR_inotify_add_watch, 0, NULL, 0); + printf("inotify_add_watch(0, NULL, 0) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_inotify_add_watch, bogus_fd, bogus_path + 4096, 0); + printf("inotify_add_watch(%d, %p, %u) = %s\n", + (int) bogus_fd, bogus_path + 4096, 0, sprintrc(rc)); + + rc = syscall(__NR_inotify_add_watch, bogus_fd, bogus_path, bogus_mask); + printf("inotify_add_watch(%d, %s, %s) = %s\n", + (int) bogus_fd, bogus_path_str.str, bogus_mask_str, + sprintrc(rc)); + + rc = syscall(__NR_inotify_rm_watch, 0, 0); + printf("inotify_rm_watch(0, 0) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_inotify_rm_watch, bogus_fd, bogus_fd); + printf("inotify_rm_watch(%d, %d) = %s\n", + (int) bogus_fd, (int) bogus_fd, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_inotify_add_watch && __NR_inotify_rm_watch"); + +#endif diff --git a/tests/inotify.test b/tests/inotify.test new file mode 100755 index 000000000..436f3bc85 --- /dev/null +++ b/tests/inotify.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of inotify_add_watch and inotify_rm_watch syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=inotify_add_watch,inotify_rm_watch -a23 diff --git a/tests/inotify_init1.c b/tests/inotify_init1.c new file mode 100644 index 000000000..0325150d9 --- /dev/null +++ b/tests/inotify_init1.c @@ -0,0 +1,80 @@ +/* + * Check decoding of inotify_init1 syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_inotify_init1) + +# include +# include +# include + +# ifdef O_CLOEXEC +# define cloexec_flag O_CLOEXEC +# else +# define cloexec_flag 0 +# endif +# define all_flags (O_NONBLOCK | cloexec_flag) + +int +main(void) +{ + static const kernel_ulong_t bogus_flags1 = + (kernel_ulong_t) 0xfacefeeddeadbeefULL | O_NONBLOCK; + static const kernel_ulong_t bogus_flags2 = + (kernel_ulong_t) 0x55555550ff96b77bULL & ~all_flags; + + long rc; + + rc = syscall(__NR_inotify_init1, bogus_flags1); + printf("inotify_init1(IN_NONBLOCK|%s%#x) = %s\n", + bogus_flags1 & cloexec_flag ? "IN_CLOEXEC|" : "", + (unsigned int) (bogus_flags1 & ~all_flags), + sprintrc(rc)); + + rc = syscall(__NR_inotify_init1, bogus_flags2); + printf("inotify_init1(%#x /* IN_??? */) = %s\n", + (unsigned int) bogus_flags2, sprintrc(rc)); + + rc = syscall(__NR_inotify_init1, all_flags); + printf("inotify_init1(IN_NONBLOCK%s) = %s\n", + all_flags & cloexec_flag ? "|IN_CLOEXEC" : "", sprintrc(rc)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_inotify_init1"); + +#endif diff --git a/tests/inotify_init1.test b/tests/inotify_init1.test new file mode 100755 index 000000000..1a7c92615 --- /dev/null +++ b/tests/inotify_init1.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of inotify_init1 syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests/ioctl.c b/tests/ioctl.c index f05ff5ce8..92a3191d1 100644 --- a/tests/ioctl.c +++ b/tests/ioctl.c @@ -88,8 +88,12 @@ main(void ) printf("ioctl(-1, MIXER_READ(13) or OTPSELECT, [MTD_OTP_OFF])" " = -1 EBADF (%m)\n"); + (void) ioctl(-1, _IOC(_IOC_WRITE, 0xde, 0, 0), (kernel_ulong_t) -1ULL); + printf("ioctl(-1, _IOC(_IOC_WRITE, 0xde, 0, 0), %#lx)" + " = -1 EBADF (%m)\n", -1UL); + (void) ioctl(-1, _IOR(0xde, 0xad, data), &data); - printf("ioctl(-1, _IOC(_IOC_READ, 0xde, 0xad, 0x08), %p)" + printf("ioctl(-1, _IOC(_IOC_READ, 0xde, 0xad, 0x8), %p)" " = -1 EBADF (%m)\n", &data); puts("+++ exited with 0 +++"); diff --git a/tests/ioctl_block.c b/tests/ioctl_block.c index 07e7d34d2..f62b0b365 100644 --- a/tests/ioctl_block.c +++ b/tests/ioctl_block.c @@ -41,17 +41,7 @@ #include "xlat.h" static const unsigned int magic = 0xdeadbeef; -static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; - -static void -init_magic(void *addr, const unsigned int size) -{ - unsigned int *p = addr; - const unsigned int *end = addr + size - sizeof(int); - - for (; p <= end; ++p) - *(unsigned int *) p = magic + (p - (unsigned int *) addr); -} +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; static struct xlat block_argless[] = { XLAT(BLKRRPART), @@ -133,8 +123,8 @@ main(void) printf("ioctl(-1, BLKBSZSET, [%d]) = -1 EBADF (%m)\n", *val_int); uint64_t *pair_int64 = tail_alloc(sizeof(*pair_int64) * 2); - pair_int64[0] = 0xdeadbeefbadc0ded; - pair_int64[1] = 0xfacefeedcafef00d; + pair_int64[0] = 0xdeadbeefbadc0dedULL; + pair_int64[1] = 0xfacefeedcafef00dULL; #ifdef BLKDISCARD ioctl(-1, BLKDISCARD, pair_int64); @@ -158,7 +148,7 @@ main(void) blkpg->op = 3; blkpg->flags = 0xdeadbeef; blkpg->datalen = 0xbadc0ded; - blkpg->data = (void *) (unsigned long) 0xcafef00dfffffeed; + blkpg->data = (void *) (unsigned long) 0xcafef00dfffffeedULL; ioctl(-1, BLKPG, blkpg); printf("ioctl(-1, BLKPG, {%s, flags=%d, datalen=%d" @@ -167,8 +157,8 @@ main(void) (unsigned long) blkpg->data); struct blkpg_partition *const bp = tail_alloc(sizeof(*bp)); - bp->start = 0xfac1fed2dad3bef4; - bp->length = 0xfac5fed6dad7bef8; + bp->start = 0xfac1fed2dad3bef4ULL; + bp->length = 0xfac5fed6dad7bef8ULL; bp->pno = magic; memset(bp->devname, 'A', sizeof(bp->devname)); memset(bp->volname, 'B', sizeof(bp->volname)); @@ -188,7 +178,7 @@ main(void) #if defined BLKTRACESETUP && defined HAVE_STRUCT_BLK_USER_TRACE_SETUP struct blk_user_trace_setup *const buts = tail_alloc(sizeof(*buts)); - init_magic(buts, sizeof(*buts)); + fill_memory(buts, sizeof(*buts)); ioctl(-1, BLKTRACESETUP, buts); printf("ioctl(-1, BLKTRACESETUP, {act_mask=%hu, buf_size=%u, buf_nr=%u" diff --git a/tests/ioctl_dm-v.c b/tests/ioctl_dm-v.c new file mode 100644 index 000000000..d95058f2e --- /dev/null +++ b/tests/ioctl_dm-v.c @@ -0,0 +1,2 @@ +#define VERBOSE 1 +#include "ioctl_dm.c" diff --git a/tests/ioctl_dm-v.test b/tests/ioctl_dm-v.test new file mode 100755 index 000000000..ade3b9e85 --- /dev/null +++ b/tests/ioctl_dm-v.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check unabbreviated decoding of DM* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -s9 -veioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests/ioctl_dm.c b/tests/ioctl_dm.c new file mode 100644 index 000000000..08f036c6a --- /dev/null +++ b/tests/ioctl_dm.c @@ -0,0 +1,774 @@ +/* + * Check decoding of DM_* commands of ioctl syscall. + * + * Copyright (c) 2016 Mikulas Patocka + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_LINUX_DM_IOCTL_H + +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# ifndef VERBOSE +# define VERBOSE 0 +# endif + +# define STR32 "AbCdEfGhIjKlMnOpQrStUvWxYz012345" + +# define ALIGNED_SIZE(s_, t_) \ + (((s_) + (ALIGNOF(t_) - 1UL)) & ~(ALIGNOF(t_) - 1UL)) +# define ALIGNED_OFFSET(t_, m_) \ + ALIGNED_SIZE(offsetof(t_, m_), t_) + +static const char str129[] = STR32 STR32 STR32 STR32 "6"; + +static const __u64 dts_sector_base = (__u64) 0xdeadca75facef157ULL; +static const __u64 dts_sector_step = (__u64) 0x100000001ULL; +static const __u64 dts_length_base = (__u64) 0xbadc0dedda7a1057ULL; +static const __u64 dts_length_step = (__u64) 0x700000007ULL; +static const __s32 dts_status_base = (__s32) 3141592653U; +static const __s32 dts_status_step = 0x1234; + +static const size_t min_sizeof_dm_ioctl = + offsetof(struct dm_ioctl, data); + +static struct s { + struct dm_ioctl ioc; + union { + struct { + struct dm_target_spec target_spec; + char target_params[256]; + } ts; + struct { + struct dm_target_msg target_msg; + char target_string[256]; + } tm; + char string[256]; + } u; +} s; + +struct dm_table_open_test { + struct dm_ioctl ioc; + struct dm_target_spec target0; + char param0[1]; + struct dm_target_spec target1; + char param1[2]; + struct dm_target_spec target2; + char param2[3]; + struct dm_target_spec target3; + char param3[4]; + struct dm_target_spec target4; + char param4[5]; + struct dm_target_spec target5; + char param5[6]; + struct dm_target_spec target6; + char param6[7]; + struct dm_target_spec target7; + char param7[8]; + struct dm_target_spec target8; + char param8[9]; + struct dm_target_spec target9; + char param9[10]; +}; + +struct dm_target_msg_test { + struct dm_ioctl ioc; + struct dm_target_msg msg; +}; + +struct args { + unsigned int arg; + const char *str; + bool has_params; + bool has_event_nr; +}; + + +static void +init_s(struct dm_ioctl *s, size_t size, size_t offs) +{ + memset(s, 0, size); + s->version[0] = DM_VERSION_MAJOR; + s->version[1] = 1; + s->version[2] = 2; + s->data_size = size; + s->data_start = offs; + s->dev = 0x1234; + strcpy(s->name, "nnn"); + strcpy(s->uuid, "uuu"); +} + +static void +init_dm_target_spec(struct dm_target_spec *ptr, uint32_t id) +{ + ptr->sector_start = dts_sector_base + dts_sector_step * id; + ptr->length = dts_length_base + dts_length_step * id; + ptr->status = dts_status_base + dts_status_step * id; + + strncpy(ptr->target_type, str129 + + id % (sizeof(str129) - sizeof(ptr->target_type)), + id % (sizeof(ptr->target_type) + 1)); + if (id % (sizeof(ptr->target_type) + 1) < sizeof(ptr->target_type)) + ptr->target_type[id % (sizeof(ptr->target_type) + 1)] = '\0'; +} + +# if VERBOSE +static void +print_dm_target_spec(struct dm_target_spec *ptr, uint32_t id) +{ + printf("{sector_start=%" PRI__u64 ", length=%" PRI__u64 ", " + "target_type=\"%.*s\", string=", + dts_sector_base + dts_sector_step * id, + dts_length_base + dts_length_step * id, + (int) (id % (sizeof(ptr->target_type) + 1)), + str129 + id % (sizeof(str129) - sizeof(ptr->target_type))); +} +# endif /* VERBOSE */ + +int +main(void) +{ + static kernel_ulong_t dummy_dm_ioctl1 = + _IOC(_IOC_READ, DM_IOCTL, 0, 0x1fff); + static kernel_ulong_t dummy_dm_ioctl2 = + _IOC(_IOC_READ|_IOC_WRITE, DM_IOCTL, 0xed, 0); + static kernel_ulong_t dummy_dm_arg = + (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + /* We can't check these properly for now */ + static struct args dummy_check_cmds_nodev[] = { + { ARG_STR(DM_REMOVE_ALL), false }, + { ARG_STR(DM_LIST_DEVICES), true }, + { ARG_STR(DM_LIST_VERSIONS), true }, + }; + static struct args dummy_check_cmds[] = { + { ARG_STR(DM_DEV_CREATE), false }, + { ARG_STR(DM_DEV_REMOVE), false, true }, + { ARG_STR(DM_DEV_STATUS), false }, + { ARG_STR(DM_DEV_WAIT), true, true }, + { ARG_STR(DM_TABLE_CLEAR), false }, + { ARG_STR(DM_TABLE_DEPS), true }, + { ARG_STR(DM_TABLE_STATUS), true }, + }; + + struct dm_ioctl *unaligned_dm_arg = + tail_alloc(offsetof(struct dm_ioctl, data)); + struct dm_ioctl *dm_arg = + tail_alloc(ALIGNED_OFFSET(struct dm_ioctl, data)); + struct dm_table_open_test *dm_arg_open1 = + tail_alloc(ALIGNED_OFFSET(struct dm_table_open_test, target1)); + struct dm_table_open_test *dm_arg_open2 = + tail_alloc(ALIGNED_OFFSET(struct dm_table_open_test, param1)); + struct dm_table_open_test *dm_arg_open3 = + tail_alloc(ALIGNED_OFFSET(struct dm_table_open_test, target9)); + struct dm_target_msg_test *dm_arg_msg = + tail_alloc(sizeof(*dm_arg_msg)); + + long rc; + const char *errstr; + unsigned int i; + + + /* Incorrect operation */ + ioctl(-1, _IOW(DM_IOCTL, 0xde, int), dm_arg); + printf("ioctl(-1, _IOC(_IOC_WRITE, %#x, 0xde, %#zx), %p) = " + "-1 EBADF (%m)\n", + DM_IOCTL, sizeof(int), dm_arg); + + ioctl(-1, dummy_dm_ioctl1, 0); + printf("ioctl(-1, _IOC(_IOC_READ, %#x, 0, %#x), 0) = -1 EBADF (%m)\n", + DM_IOCTL, (unsigned int) _IOC_SIZE(dummy_dm_ioctl1)); + + ioctl(-1, dummy_dm_ioctl2, dummy_dm_arg); + printf("ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, %#x, %#x, 0), %#lx) = " + "-1 EBADF (%m)\n", + DM_IOCTL, (unsigned int) _IOC_NR(dummy_dm_ioctl2), + (unsigned long) dummy_dm_arg); + + + /* DM_VERSION */ + /* Incorrect pointer */ + ioctl(-1, DM_VERSION, dm_arg + 1); + printf("ioctl(-1, DM_VERSION, %p) = -1 EBADF (%m)\n", dm_arg + 1); + + /* Incorrect data_size */ + init_s(dm_arg, 0, 0); + ioctl(-1, DM_VERSION, &s); + printf("ioctl(-1, DM_VERSION, %p) = -1 EBADF (%m)\n", &s); + + /* Incorrect version */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + dm_arg->version[0] = 0xbadc0ded; + dm_arg->version[1] = 0xbadc0dee; + dm_arg->version[2] = 0xbadc0def; + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, {version=%u.%u.%u, " + "/* Unsupported device mapper ABI version */ ...}) = " + "-1 EBADF (%m)\n", 0xbadc0ded, 0xbadc0dee, 0xbadc0def); + + /* Incorrect data_size */ + init_s(dm_arg, 14, 64); + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, {version=4.1.2, data_size=14, " + "/* Incorrect data_size */ ...}) = -1 EBADF (%m)\n"); + + /* Unterminated name/uuid */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + strncpy(dm_arg->name, str129, sizeof(dm_arg->name)); + strncpy(dm_arg->uuid, str129, sizeof(dm_arg->uuid)); + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, {version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"%.127s\", uuid=\"%.128s\", " + "flags=0}) = -1 EBADF (%m)\n", + min_sizeof_dm_ioctl, str129, str129); + + /* Normal call */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = " + "-1 EBADF (%m)\n", min_sizeof_dm_ioctl); + + /* Zero dev, name, uuid */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + dm_arg->data_size = 0xfacefeed; + dm_arg->dev = 0; + dm_arg->name[0] = '\0'; + dm_arg->uuid[0] = '\0'; + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, data_size=%u, flags=0}) = " + "-1 EBADF (%m)\n", 0xfacefeed); + + /* Flag */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + dm_arg->flags = 0xffffffff; + ioctl(-1, DM_VERSION, dm_arg); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=" + "DM_READONLY_FLAG|DM_SUSPEND_FLAG|DM_EXISTS_FLAG|" + "DM_PERSISTENT_DEV_FLAG|DM_STATUS_TABLE_FLAG|" + "DM_ACTIVE_PRESENT_FLAG|DM_INACTIVE_PRESENT_FLAG|" + "DM_BUFFER_FULL_FLAG|DM_SKIP_BDGET_FLAG|DM_SKIP_LOCKFS_FLAG|" + "DM_NOFLUSH_FLAG|DM_QUERY_INACTIVE_TABLE_FLAG|" + "DM_UEVENT_GENERATED_FLAG|DM_UUID_FLAG|DM_SECURE_DATA_FLAG|" + "DM_DATA_OUT_FLAG|DM_DEFERRED_REMOVE|DM_INTERNAL_SUSPEND_FLAG|" + "0xfff80080}) = -1 EBADF (%m)\n", + min_sizeof_dm_ioctl); + + /* Normal call */ + init_s(&s.ioc, sizeof(s.ioc), 0); + ioctl(-1, DM_VERSION, &s); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = " + "-1 EBADF (%m)\n", sizeof(s.ioc)); + + + /* DM_REMOVE_ALL */ + /* DM_LIST_DEVICES */ + /* DM_LIST_VERSIONS */ + for (i = 0; i < ARRAY_SIZE(dummy_check_cmds_nodev); i++) { + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + ioctl(-1, dummy_check_cmds_nodev[i].arg, dm_arg); + printf("ioctl(-1, %s, {version=4.1.2, data_size=%zu%s, " + "flags=0}) = -1 EBADF (%m)\n", + dummy_check_cmds_nodev[i].str, + min_sizeof_dm_ioctl, + dummy_check_cmds_nodev[i].has_params ? + ", data_start=0" : ""); + } + + + /* DM_DEV_CREATE */ + /* DM_DEV_REMOVE */ + /* DM_DEV_STATUS */ + /* DM_DEV_WAIT */ + /* DM_TABLE_CLEAR */ + /* DM_TABLE_DEPS */ + /* DM_TABLE_STATUS */ + for (i = 0; i < ARRAY_SIZE(dummy_check_cmds); i++) { + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + ioctl(-1, dummy_check_cmds[i].arg, dm_arg); + printf("ioctl(-1, %s, {version=4.1.2, data_size=%zu%s, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\"%s, " + "flags=0}) = -1 EBADF (%m)\n", + dummy_check_cmds[i].str, min_sizeof_dm_ioctl, + dummy_check_cmds[i].has_params ? ", data_start=0" : "", + dummy_check_cmds[i].has_event_nr ? ", event_nr=0" : ""); + } + + + /* DM_DEV_SUSPEND */ + init_s(&s.ioc, sizeof(s.ioc), 0); + s.ioc.flags = DM_SUSPEND_FLAG; + s.ioc.event_nr = 0xbadc0ded; + ioctl(-1, DM_DEV_SUSPEND, &s); + printf("ioctl(-1, DM_DEV_SUSPEND, " + "{version=4.1.2, data_size=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "flags=DM_SUSPEND_FLAG}) = -1 EBADF (%m)\n", sizeof(s.ioc)); + + init_s(&s.ioc, sizeof(s.ioc), 0); + s.ioc.event_nr = 0xbadc0ded; + ioctl(-1, DM_DEV_SUSPEND, &s); + printf("ioctl(-1, DM_DEV_SUSPEND, " + "{version=4.1.2, data_size=%zu, dev=makedev(18, 52), " + "name=\"nnn\", uuid=\"uuu\", event_nr=3134983661, " + "flags=0}) = -1 EBADF (%m)\n", sizeof(s.ioc)); + + + /* DM_TABLE_LOAD */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + s.ioc.target_count = 1; + s.u.ts.target_spec.sector_start = 0x10; + s.u.ts.target_spec.length = 0x20; + s.u.ts.target_spec.next = + sizeof(s.u.ts.target_spec) + sizeof(s.u.ts.target_params); + strcpy(s.u.ts.target_spec.target_type, "tgt"); + strcpy(s.u.ts.target_params, "tparams"); + ioctl(-1, DM_TABLE_LOAD, &s); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=1, flags=0, " +# if VERBOSE + "{sector_start=16, length=32, target_type=\"tgt\", " + "string=\"tparams\"}" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", s.ioc.data_size, s.ioc.data_start); + + /* No targets */ + init_s(dm_arg, min_sizeof_dm_ioctl, min_sizeof_dm_ioctl); + dm_arg->data_size = sizeof(*dm_arg); + dm_arg->target_count = 0; + ioctl(-1, DM_TABLE_LOAD, dm_arg); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=0, flags=0}) = -1 EBADF (%m)\n", + sizeof(*dm_arg), min_sizeof_dm_ioctl); + + /* Invalid data_start */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0xfffffff8); + dm_arg->data_size = sizeof(*dm_arg); + dm_arg->target_count = 1234; + ioctl(-1, DM_TABLE_LOAD, dm_arg); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=1234, flags=0, " +# if VERBOSE + "/* misplaced struct dm_target_spec */ ..." +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", sizeof(*dm_arg), 0xfffffff8); + + /* Inaccessible pointer */ + init_s(&dm_arg_open1->ioc, offsetof(struct dm_table_open_test, target1), + offsetof(struct dm_table_open_test, target1)); + dm_arg_open1->ioc.data_size = sizeof(*dm_arg_open1); + dm_arg_open1->ioc.target_count = 0xdeaddea1; + ioctl(-1, DM_TABLE_LOAD, dm_arg_open1); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=3735936673, flags=0, " +# if VERBOSE + "%p" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", sizeof(*dm_arg_open1), + offsetof(struct dm_table_open_test, target1) +# if VERBOSE + , (char *) dm_arg_open1 + + offsetof(struct dm_table_open_test, target1) +# endif /* VERBOSE */ + ); + + /* Inaccessible string */ + init_s(&dm_arg_open2->ioc, offsetof(struct dm_table_open_test, param1), + offsetof(struct dm_table_open_test, target1)); + dm_arg_open2->ioc.data_size = sizeof(*dm_arg_open2); + dm_arg_open2->ioc.target_count = 2; + init_dm_target_spec(&dm_arg_open2->target1, 7); + dm_arg_open2->target1.next = + offsetof(struct dm_table_open_test, target3) - + offsetof(struct dm_table_open_test, target1); + rc = ioctl(-1, DM_TABLE_LOAD, dm_arg_open2); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=2, flags=0, ", + sizeof(*dm_arg_open2), + offsetof(struct dm_table_open_test, target1)); +# if VERBOSE + print_dm_target_spec(&dm_arg_open2->target1, 7); + printf("%p}, %p", + (char *) dm_arg_open2 + + offsetof(struct dm_table_open_test, param1), + (char *) dm_arg_open2 + + offsetof(struct dm_table_open_test, target3)); +# else /* !VERBOSE */ + printf("..."); +# endif /* VERBOSE */ + printf("}) = %s\n", errstr); + + /* Incorrect next */ + init_s(&dm_arg_open3->ioc, offsetof(struct dm_table_open_test, target5), + offsetof(struct dm_table_open_test, target0)); + dm_arg_open3->ioc.target_count = 4; + + init_dm_target_spec(&dm_arg_open3->target0, 9); + dm_arg_open3->target0.next = + offsetof(struct dm_table_open_test, target1) - + offsetof(struct dm_table_open_test, target0); + dm_arg_open3->param0[0] = '\0'; + + init_dm_target_spec(&dm_arg_open3->target1, 15); + dm_arg_open3->target1.next = + offsetof(struct dm_table_open_test, target3) - + offsetof(struct dm_table_open_test, target1); + dm_arg_open3->param1[0] = '\377'; + dm_arg_open3->param1[1] = '\0'; + + init_dm_target_spec(&dm_arg_open3->target3, 42); + dm_arg_open3->target3.next = 0xdeadbeef; + dm_arg_open3->param3[0] = '\1'; + dm_arg_open3->param3[1] = '\2'; + dm_arg_open3->param3[2] = '\0'; + + rc = ioctl(-1, DM_TABLE_LOAD, dm_arg_open3); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=4, flags=0, ", + offsetof(struct dm_table_open_test, target5), + offsetof(struct dm_table_open_test, target0)); +# if VERBOSE + print_dm_target_spec(&dm_arg_open3->target0, 9); + printf("\"\"}, "); + print_dm_target_spec(&dm_arg_open3->target1, 15); + printf("\"\\377\"}, "); + print_dm_target_spec(&dm_arg_open3->target1, 42); + printf("\"\\1\\2\"}, /* misplaced struct dm_target_spec */ ..."); +# else /* !VERBOSE */ + printf("..."); +# endif /* VERBOSE */ + printf("}) = %s\n", errstr); + + #define FILL_DM_TARGET(id, id_next) \ + do { \ + init_dm_target_spec(&dm_arg_open3->target##id, id); \ + dm_arg_open3->target##id.next = \ + offsetof(struct dm_table_open_test, \ + target##id_next) - \ + offsetof(struct dm_table_open_test, \ + target##id); \ + strncpy(dm_arg_open3->param##id, str129 + id * 2, id); \ + dm_arg_open3->param##id[id] = '\0'; \ + } while (0) + #define PRINT_DM_TARGET(id) \ + do { \ + print_dm_target_spec(&dm_arg_open3->target##id, id); \ + printf("\"%.*s\"}, ", id, str129 + id * 2); \ + } while (0) + + /* max_strlen limit */ + init_s(&dm_arg_open3->ioc, offsetof(struct dm_table_open_test, target9), + offsetof(struct dm_table_open_test, target0)); + dm_arg_open3->ioc.data_size = sizeof(*dm_arg_open3); + dm_arg_open3->ioc.target_count = 0xbadc0ded; + FILL_DM_TARGET(0, 1); + FILL_DM_TARGET(1, 2); + FILL_DM_TARGET(2, 3); + FILL_DM_TARGET(3, 4); + FILL_DM_TARGET(4, 5); + FILL_DM_TARGET(5, 6); + FILL_DM_TARGET(6, 7); + FILL_DM_TARGET(7, 8); + FILL_DM_TARGET(8, 9); + rc = ioctl(-1, DM_TABLE_LOAD, dm_arg_open3); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=3134983661, flags=0, ", + sizeof(*dm_arg_open3), + offsetof(struct dm_table_open_test, target0)); +# if VERBOSE + PRINT_DM_TARGET(0); + PRINT_DM_TARGET(1); + PRINT_DM_TARGET(2); + PRINT_DM_TARGET(3); + PRINT_DM_TARGET(4); + PRINT_DM_TARGET(5); + PRINT_DM_TARGET(6); + PRINT_DM_TARGET(7); + PRINT_DM_TARGET(8); +# endif /* VERBOSE */ + printf("...}) = %s\n", errstr); + + + /* DM_TARGET_MSG */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + s.u.tm.target_msg.sector = 0x1234; + strcpy(s.u.string + offsetof(struct dm_target_msg, message), + "long target msg"); + ioctl(-1, DM_TARGET_MSG, &s); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "{sector=4660, message=\"long targ\"...}" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size, s.ioc.data_start); + + /* Invalid data_start */ + init_s(dm_arg, min_sizeof_dm_ioctl, min_sizeof_dm_ioctl); + dm_arg->data_size = sizeof(*dm_arg); + ioctl(-1, DM_TARGET_MSG, dm_arg); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "/* misplaced struct dm_target_msg */" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + sizeof(*dm_arg), min_sizeof_dm_ioctl); + + /* Invalid data_start */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0xffffffff); + dm_arg->data_size = sizeof(*dm_arg); + ioctl(-1, DM_TARGET_MSG, dm_arg); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "/* misplaced struct dm_target_msg */" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + sizeof(*dm_arg), 0xffffffff); + + /* Inaccessible pointer */ + init_s(dm_arg, min_sizeof_dm_ioctl, 0); + dm_arg->data_size = sizeof(*dm_arg) + sizeof(struct dm_target_msg); + dm_arg->data_start = sizeof(*dm_arg); + ioctl(-1, DM_TARGET_MSG, dm_arg); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "%p" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + sizeof(*dm_arg) + sizeof(struct dm_target_msg), + sizeof(*dm_arg) +# if VERBOSE + , (char *) dm_arg + sizeof(*dm_arg) +# endif /* VERBOSE */ + ); + + /* Inaccessible string */ + init_s(&dm_arg_msg->ioc, sizeof(*dm_arg_msg), + offsetof(struct dm_target_msg_test, msg)); + dm_arg_msg->ioc.data_size = sizeof(*dm_arg_msg) + 1; + dm_arg_msg->msg.sector = (__u64) 0xdeadbeeffacef157ULL; + rc = ioctl(-1, DM_TARGET_MSG, dm_arg_msg); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, ", + sizeof(*dm_arg_msg) + 1, + offsetof(struct dm_target_msg_test, msg)); +# if VERBOSE + printf("{sector=%" PRI__u64 ", message=%p}", + (__u64) 0xdeadbeeffacef157ULL, + (char *) dm_arg_msg + + offsetof(struct dm_target_msg_test, msg.message)); +# else /* !VERBOSE */ + printf("..."); +# endif /* VERBOSE */ + printf("}) = %s\n", errstr); + + /* Zero-sied string */ + init_s(&dm_arg_msg->ioc, sizeof(*dm_arg_msg), + offsetof(struct dm_target_msg_test, msg)); + dm_arg_msg->msg.sector = (__u64) 0xdeadbeeffacef157ULL; + rc = ioctl(-1, DM_TARGET_MSG, dm_arg_msg); + errstr = sprintrc(rc); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, ", + sizeof(*dm_arg_msg), offsetof(struct dm_target_msg_test, msg)); +# if VERBOSE + printf("{sector=%" PRI__u64 ", message=\"\"}", + (__u64) 0xdeadbeeffacef157ULL); +# else /* !VERBOSE */ + printf("..."); +# endif /* VERBOSE */ + printf("}) = %s\n", errstr); + + + /* DM_DEV_SET_GEOMETRY */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + strcpy(s.u.string, "10 20 30 40"); + ioctl(-1, DM_DEV_SET_GEOMETRY, &s); + printf("ioctl(-1, DM_DEV_SET_GEOMETRY, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, " +# if VERBOSE + "string=\"10 20 30 \"..." +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size, s.ioc.data_start); + + + /* DM_DEV_RENAME */ + /* Inaccessible data */ + init_s(dm_arg, min_sizeof_dm_ioctl, min_sizeof_dm_ioctl); + dm_arg->data_size = sizeof(*dm_arg); + memcpy(unaligned_dm_arg, dm_arg, offsetof(struct dm_ioctl, data)); + ioctl(-1, DM_DEV_RENAME, unaligned_dm_arg); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, data_size=%zu, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " + "flags=0, " +# if VERBOSE + "string=%p" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + sizeof(*unaligned_dm_arg), min_sizeof_dm_ioctl +# if VERBOSE + , (char *) unaligned_dm_arg + min_sizeof_dm_ioctl +# endif /* VERBOSE */ + ); + + /* Incorrect data_start data */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + s.ioc.data_start = 0xdeadbeef; + ioctl(-1, DM_DEV_RENAME, &s); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, data_size=%u, data_start=3735928559, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " + "flags=0, " +# if VERBOSE + "/* misplaced string */" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size); + + /* Strange but still valid data_start */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + /* Curiously, this is a valid structure */ + s.ioc.data_start = offsetof(struct dm_ioctl, name) + 1; + ioctl(-1, DM_DEV_RENAME, &s); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, data_size=%u, data_start=%zu, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " + "flags=0, " +# if VERBOSE + "string=\"nn\"" +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size, + offsetof(struct dm_ioctl, name) + 1); + + /* Correct data */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + strcpy(s.u.string, "new long name"); + ioctl(-1, DM_DEV_RENAME, &s); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, " + "flags=0, " +# if VERBOSE + "string=\"new long \"..." +# else /* !VERBOSE */ + "..." +# endif /* VERBOSE */ + "}) = -1 EBADF (%m)\n", + s.ioc.data_size, s.ioc.data_start); + + + /* DM_TABLE_LOAD */ + init_s(&s.ioc, sizeof(s), offsetof(struct s, u)); + s.ioc.target_count = -1U; + ioctl(-1, DM_TABLE_LOAD, &s); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, data_size=%u, data_start=%u, " + "dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", " + "target_count=4294967295, flags=0, " +# if VERBOSE + "{sector_start=0, length=0, target_type=\"\", string=\"\"}, " + "/* misplaced struct dm_target_spec */ " +# endif /* VERBOSE */ + "...}) = -1 EBADF (%m)\n", + s.ioc.data_size, s.ioc.data_start); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else /* !HAVE_LINUX_DM_IOCTL_H */ + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_DM_IOCTL_H") + +#endif /* HAVE_LINUX_DM_IOCTL_H */ diff --git a/tests/ioctl_dm.test b/tests/ioctl_dm.test new file mode 100755 index 000000000..648520511 --- /dev/null +++ b/tests/ioctl_dm.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of DM* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a16 -s9 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests/ioctl_evdev.c b/tests/ioctl_evdev.c index 892075dc3..d12323ee2 100644 --- a/tests/ioctl_evdev.c +++ b/tests/ioctl_evdev.c @@ -39,17 +39,7 @@ # include static const unsigned int magic = 0xdeadbeef; -static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; - -static void -init_magic(void *addr, const unsigned int size) -{ - unsigned int *p = addr; - const unsigned int *end = addr + size - sizeof(int); - - for (; p <= end; ++p) - *(unsigned int *) p = magic; -} +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; # if VERBOSE static void @@ -156,7 +146,7 @@ main(void) const unsigned int size = get_page_size(); void *const page = tail_alloc(size); - init_magic(page, size); + fill_memory(page, size); int *const val_int = tail_alloc(sizeof(*val_int)); *val_int = magic; @@ -183,7 +173,7 @@ main(void) # ifdef EVIOCSKEYCODE_V2 struct input_keymap_entry *const ike = tail_alloc(sizeof(*ike)); - init_magic(ike, sizeof(*ike)); + fill_memory(ike, sizeof(*ike)); ike->keycode = 2; ioctl(-1, EVIOCSKEYCODE_V2, ike); @@ -207,7 +197,7 @@ main(void) # endif struct ff_effect *const ffe = tail_alloc(sizeof(*ffe)); - init_magic(ffe, sizeof(*ffe)); + fill_memory(ffe, sizeof(*ffe)); ffe->type = FF_CONSTANT; ioctl(-1, EVIOCSFF, ffe); @@ -262,18 +252,22 @@ main(void) printf("}) = -1 EBADF (%m)\n"); # endif - ioctl(-1, _IOC(_IOC_READ, 0x45, 0x01, 0xff), lmagic); + ioctl(-1, _IOC(_IOC_READ, 0x45, 0x1, 0xff), lmagic); printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", - "_IOC(_IOC_READ, 0x45, 0x01, 0xff)", lmagic); + "_IOC(_IOC_READ, 0x45, 0x1, 0xff)", lmagic); - ioctl(-1, _IOC(_IOC_WRITE, 0x45, 0x01, 0xff), lmagic); + ioctl(-1, _IOC(_IOC_WRITE, 0x45, 0x1, 0xff), lmagic); printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", - "_IOC(_IOC_WRITE, 0x45, 0x01, 0xff)", lmagic); + "_IOC(_IOC_WRITE, 0x45, 0x1, 0xff)", lmagic); ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x45, 0xfe, 0xff), lmagic); printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", "_IOC(_IOC_READ|_IOC_WRITE, 0x45, 0xfe, 0xff)", lmagic); + ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0x45, 0, 0), lmagic); + printf("ioctl(-1, %s, %#lx) = -1 EBADF (%m)\n", + "_IOC(_IOC_READ|_IOC_WRITE, 0x45, 0, 0)", lmagic); + puts("+++ exited with 0 +++"); return 0; } diff --git a/tests/ioctl_loop-nv.c b/tests/ioctl_loop-nv.c new file mode 100644 index 000000000..dc6b916d5 --- /dev/null +++ b/tests/ioctl_loop-nv.c @@ -0,0 +1,2 @@ +#define ABBREV 1 +#include "ioctl_loop.c" diff --git a/tests/ioctl_loop-nv.test b/tests/ioctl_loop-nv.test new file mode 100755 index 000000000..dcc27e1de --- /dev/null +++ b/tests/ioctl_loop-nv.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check non-verbose decoding of LOOP_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a22 -eioctl -e verbose=none $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests/ioctl_loop-v.c b/tests/ioctl_loop-v.c new file mode 100644 index 000000000..22e75727c --- /dev/null +++ b/tests/ioctl_loop-v.c @@ -0,0 +1,2 @@ +#define VERBOSE 1 +#include "ioctl_loop.c" diff --git a/tests/ioctl_loop-v.test b/tests/ioctl_loop-v.test new file mode 100755 index 000000000..ff3995d87 --- /dev/null +++ b/tests/ioctl_loop-v.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check non-abbreviated decoding of LOOP_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a22 -v -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests/ioctl_loop.c b/tests/ioctl_loop.c new file mode 100644 index 000000000..a95e775da --- /dev/null +++ b/tests/ioctl_loop.c @@ -0,0 +1,322 @@ +/* + * This file is part of ioctl_loop strace test. + * + * Copyright (c) 2016 JingPiao Chen + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include "xlat/loop_cmds.h" + +#ifndef ABBREV +# define ABBREV 0 +#endif + +static void +print_loop_info(struct loop_info * const info, bool print_encrypt, + const char *encrypt_type, const char *encrypt_key, + const char *flags) +{ +#if ABBREV + printf("%p", info); +#else + printf("{lo_number=%d", info->lo_number); +# if VERBOSE + printf(", lo_device=makedev(%u, %u), lo_inode=%lu, " + "lo_rdevice=makedev(%u, %u)", + major(info->lo_device), minor(info->lo_device), + info->lo_inode, + major(info->lo_rdevice), minor(info->lo_rdevice)); +# endif /* VERBOSE */ + + printf(", lo_offset=%#x", info->lo_offset); + + if (VERBOSE || print_encrypt) { + printf(", lo_encrypt_type="); + if (encrypt_type) + printf("%s", encrypt_type); + else + printf("%#x /* LO_CRYPT_??? */", info->lo_encrypt_type); + + printf(", lo_encrypt_key_size=%" PRIu32, + (uint32_t) info->lo_encrypt_key_size); + } + + printf(", lo_flags="); + if (flags) + printf("%s", flags); + else + printf("%#x /* LO_FLAGS_??? */", info->lo_flags); + + printf(", lo_name=\"%.*s\"", + (int) sizeof(info->lo_name) - 1, info->lo_name); + + if (VERBOSE || print_encrypt) + printf(", lo_encrypt_key=\"%.*s\"", + encrypt_key ? (int) strlen(encrypt_key) : + (int) sizeof(info->lo_encrypt_key), + encrypt_key ? encrypt_key : + (char *) info->lo_encrypt_key); + +# if VERBOSE + printf(", lo_init=[%#lx, %#lx]" + ", reserved=[%#hhx, %#hhx, %#hhx, %#hhx]}", + info->lo_init[0], info->lo_init[1], + info->reserved[0], info->reserved[1], + info->reserved[2], info->reserved[3]); +# else /* !VERBOSE */ + printf(", ...}"); +# endif /* VERBOSE */ +#endif /* !ABBREV */ +} + +static void +print_loop_info64(struct loop_info64 * const info64, bool print_encrypt, + const char *encrypt_type, const char *encrypt_key, + const char *flags) +{ +#if ABBREV + printf("%p", info64); +#else +# if VERBOSE + printf("{lo_device=makedev(%u, %u), lo_inode=%" PRIu64 + ", lo_rdevice=makedev(%u, %u), lo_offset=%#" PRIx64 + ", lo_sizelimit=%" PRIu64 ", lo_number=%" PRIu32, + major(info64->lo_device), minor(info64->lo_device), + (uint64_t) info64->lo_inode, + major(info64->lo_rdevice), minor(info64->lo_rdevice), + (uint64_t) info64->lo_offset, + (uint64_t) info64->lo_sizelimit, + (uint32_t) info64->lo_number); +# else /* !VERBOSE */ + printf("{lo_offset=%#" PRIx64 ", lo_number=%" PRIu32, + (uint64_t) info64->lo_offset, + (uint32_t) info64->lo_number); +# endif /* VERBOSE */ + + if (VERBOSE || print_encrypt) { + printf(", lo_encrypt_type="); + if (encrypt_type) + printf("%s", encrypt_type); + else + printf("%#x /* LO_CRYPT_??? */", + info64->lo_encrypt_type); + + printf(", lo_encrypt_key_size=%" PRIu32, + info64->lo_encrypt_key_size); + } + + printf(", lo_flags="); + if (flags) + printf("%s", flags); + else + printf("%#x /* LO_FLAGS_??? */", info64->lo_flags); + printf(", lo_file_name=\"%.*s\"", + (int) sizeof(info64->lo_file_name) - 1, info64->lo_file_name); + + if (VERBOSE || print_encrypt) + printf(", lo_crypt_name=\"%.*s\", lo_encrypt_key=\"%.*s\"", + (int) sizeof(info64->lo_crypt_name) - 1, + info64->lo_crypt_name, + encrypt_key ? (int) strlen(encrypt_key) : + (int) sizeof(info64->lo_encrypt_key), + encrypt_key ? encrypt_key : + (char *) info64->lo_encrypt_key); + +# if VERBOSE + printf(", lo_init=[%#" PRIx64 ", %#" PRIx64 "]}", + (uint64_t) info64->lo_init[0], + (uint64_t) info64->lo_init[1]); +# else /* !VERBOSE */ + printf(", ...}"); +# endif /* VERBOSE */ +#endif /* !ABBREV */ +} + +int +main(void) +{ + static const kernel_ulong_t unknown_loop_cmd = + (kernel_ulong_t) 0xbadc0dedfeed4cedULL; + static const kernel_ulong_t magic = + (kernel_ulong_t) 0xdeadbeefbadc0dedULL; + static const kernel_ulong_t kernel_mask = + ((kernel_ulong_t) -1) - ((unsigned long) -1L); + + struct loop_info * const info = tail_alloc(sizeof(*info)); + struct loop_info64 * const info64 = tail_alloc(sizeof(*info64)); + + /* Unknown loop commands */ + ioctl(-1, unknown_loop_cmd, magic); + printf("ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE%s, 0x4c, %#x, %#x), " + "%#lx) = -1 EBADF (%m)\n", + _IOC_DIR((unsigned int) unknown_loop_cmd) & _IOC_NONE ? + "|_IOC_NONE" : "", + _IOC_NR((unsigned int) unknown_loop_cmd), + _IOC_SIZE((unsigned int) unknown_loop_cmd), + (unsigned long) magic); + + ioctl(-1, LOOP_SET_DIRECT_IO + 1, magic); + printf("ioctl(-1, _IOC(0, 0x4c, %#x, %#x), %#lx) = " + "-1 EBADF (%m)\n", + _IOC_NR(LOOP_SET_DIRECT_IO + 1), + _IOC_SIZE(LOOP_SET_DIRECT_IO + 1), + (unsigned long) magic); + + ioctl(-1, LOOP_CTL_GET_FREE + 1, magic); + printf("ioctl(-1, _IOC(0, 0x4c, %#x, %#x), %#lx) = " + "-1 EBADF (%m)\n", + _IOC_NR(LOOP_CTL_GET_FREE + 1), + _IOC_SIZE(LOOP_CTL_GET_FREE + 1), + (unsigned long) magic); + + /* LOOP_SET_FD */ + ioctl(-1, LOOP_SET_FD, magic); + printf("ioctl(-1, LOOP_SET_FD, %d) = -1 EBADF (%m)\n", + (unsigned int) magic); + + /* LOOP_CLR_FD */ + ioctl(-1, LOOP_CLR_FD); + printf("ioctl(-1, LOOP_CLR_FD) = -1 EBADF (%m)\n"); + + /* LOOP_SET_STATUS */ + ioctl(-1, LOOP_SET_STATUS, NULL); + printf("ioctl(-1, LOOP_SET_STATUS, NULL) = -1 EBADF (%m)\n"); + + fill_memory(info, sizeof(*info)); + info->lo_flags = 0xdeface00; + info->lo_name[0] = '\0'; + info->lo_encrypt_key[0] = '\0'; + info->lo_encrypt_key_size = 1; + + printf("ioctl(-1, LOOP_SET_STATUS, "); + print_loop_info(info, true, NULL, "\\0", NULL); + ioctl(-1, LOOP_SET_STATUS, info); + printf(") = -1 EBADF (%m)\n"); + + fill_memory(info, sizeof(*info)); + info->lo_encrypt_type = LO_CRYPT_NONE; + info->lo_flags = LO_FLAGS_READ_ONLY; + memset(info->lo_name, 'A', sizeof(info->lo_name)); + memset(info->lo_encrypt_key, 'B', sizeof(info->lo_encrypt_key)); + + ioctl(-1, LOOP_SET_STATUS, (void *) info + ALIGNOF(info)); + printf("ioctl(-1, LOOP_SET_STATUS, %p) = -1 EBADF (%m)\n", + (void *) info + ALIGNOF(info)); + + printf("ioctl(-1, LOOP_SET_STATUS, "); + print_loop_info(info, false, "LO_CRYPT_NONE", NULL, + "LO_FLAGS_READ_ONLY"); + ioctl(-1, LOOP_SET_STATUS, info); + printf(") = -1 EBADF (%m)\n"); + + /* LOOP_GET_STATUS */ + ioctl(-1, LOOP_GET_STATUS, NULL); + printf("ioctl(-1, LOOP_GET_STATUS, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, LOOP_GET_STATUS, (unsigned long) info | kernel_mask); + printf("ioctl(-1, LOOP_GET_STATUS, %p) = -1 EBADF (%m)\n", info); + + /* LOOP_SET_STATUS64 */ + ioctl(-1, LOOP_SET_STATUS64, NULL); + printf("ioctl(-1, LOOP_SET_STATUS64, NULL) = -1 EBADF (%m)\n"); + + fill_memory(info64, sizeof(*info64)); + info64->lo_flags = 0xdec0de00; + info64->lo_file_name[0] = '\0'; + info64->lo_crypt_name[0] = '\0'; + info64->lo_encrypt_key[0] = '\0'; + info64->lo_encrypt_key_size = 1; + + printf("ioctl(-1, LOOP_SET_STATUS64, "); + print_loop_info64(info64, true, NULL, "\\0", NULL); + ioctl(-1, LOOP_SET_STATUS64, info64); + printf(") = -1 EBADF (%m)\n"); + + fill_memory(info64, sizeof(*info64)); + info64->lo_flags = LO_FLAGS_READ_ONLY; + info64->lo_encrypt_type = LO_CRYPT_NONE; + memset(info64->lo_file_name, 'C', sizeof(info64->lo_file_name)); + memset(info64->lo_crypt_name, 'D', sizeof(info64->lo_crypt_name)); + memset(info64->lo_encrypt_key, 'E', sizeof(info64->lo_encrypt_key)); + + ioctl(-1, LOOP_SET_STATUS64, (void *) info64 + ALIGNOF(info64)); + printf("ioctl(-1, LOOP_SET_STATUS64, %p) = -1 EBADF (%m)\n", + (void *) info64 + ALIGNOF(info64)); + + printf("ioctl(-1, LOOP_SET_STATUS64, "); + print_loop_info64(info64, false, "LO_CRYPT_NONE", NULL, + "LO_FLAGS_READ_ONLY"); + ioctl(-1, LOOP_SET_STATUS64, info64); + printf(") = -1 EBADF (%m)\n"); + + /* LOOP_GET_STATUS64 */ + ioctl(-1, LOOP_GET_STATUS64, NULL); + printf("ioctl(-1, LOOP_GET_STATUS64, NULL) = -1 EBADF (%m)\n"); + + ioctl(-1, LOOP_GET_STATUS64, (unsigned long) info64 | kernel_mask); + printf("ioctl(-1, LOOP_GET_STATUS64, %p) = -1 EBADF (%m)\n", info64); + + /* LOOP_CHANGE_FD */ + ioctl(-1, LOOP_CHANGE_FD, magic); + printf("ioctl(-1, LOOP_CHANGE_FD, %d) = -1 EBADF (%m)\n", + (unsigned int) magic); + + /* LOOP_SET_CAPACITY */ + ioctl(-1, LOOP_SET_CAPACITY); + printf("ioctl(-1, LOOP_SET_CAPACITY) = -1 EBADF (%m)\n"); + + /* LOOP_SET_DIRECT_IO */ + ioctl(-1, LOOP_SET_DIRECT_IO, magic); + printf("ioctl(-1, LOOP_SET_DIRECT_IO, %lu) = -1 EBADF (%m)\n", + (unsigned long) magic); + + /* LOOP_CTL_ADD */ + ioctl(-1, LOOP_CTL_ADD, magic); + printf("ioctl(-1, LOOP_CTL_ADD, %d) = -1 EBADF (%m)\n", + (unsigned int) magic); + + /* LOOP_CTL_REMOVE */ + ioctl(-1, LOOP_CTL_REMOVE, magic); + printf("ioctl(-1, LOOP_CTL_REMOVE, %d) = -1 EBADF (%m)\n", + (unsigned int) magic); + + /* LOOP_CTL_GET_FREE */ + ioctl(-1, LOOP_CTL_GET_FREE); + printf("ioctl(-1, LOOP_CTL_GET_FREE) = -1 EBADF (%m)\n"); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests/ioctl_loop.test b/tests/ioctl_loop.test new file mode 100755 index 000000000..112cd636c --- /dev/null +++ b/tests/ioctl_loop.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of LOOP_* ioctls. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a22 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests/ioctl_mtd.c b/tests/ioctl_mtd.c index b761da855..a37d5d0f0 100644 --- a/tests/ioctl_mtd.c +++ b/tests/ioctl_mtd.c @@ -42,18 +42,7 @@ # include #endif -static const unsigned int magic = 0xdeadbeef; -static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; - -static void -init_magic(void *addr, const unsigned int size) -{ - unsigned int *p = addr; - const unsigned int *end = addr + size - sizeof(int); - - for (; p <= end; ++p) - *(unsigned int *) p = magic; -} +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; #define TEST_NULL_ARG(cmd) \ do { \ @@ -113,7 +102,7 @@ main(void) " = -1 EBADF (%m)\n", (unsigned int) _IOC_NR(OTPSELECT)); uint64_t *const v64 = tail_alloc(sizeof(*v64)); - init_magic(v64, sizeof(*v64)); + fill_memory(v64, sizeof(*v64)); ioctl(-1, MEMGETBADBLOCK, v64); printf("ioctl(-1, MIXER_WRITE(%u) or MEMGETBADBLOCK, [%" PRIu64 "])" @@ -126,7 +115,7 @@ main(void) (unsigned int) _IOC_NR(MEMSETBADBLOCK), *v64); struct region_info_user *const riu = tail_alloc(sizeof(*riu)); - init_magic(riu, sizeof(*riu)); + fill_memory(riu, sizeof(*riu)); ioctl(-1, MEMGETREGIONINFO, riu); printf("ioctl(-1, %s, {regionindex=%#x}) = -1 EBADF (%m)\n", "MEMGETREGIONINFO" @@ -136,7 +125,7 @@ main(void) , riu->regionindex); struct erase_info_user *const eiu = tail_alloc(sizeof(*eiu)); - init_magic(eiu, sizeof(*eiu)); + fill_memory(eiu, sizeof(*eiu)); TEST_erase_info_user(MEMERASE, eiu); TEST_erase_info_user(MEMLOCK, eiu); @@ -144,7 +133,7 @@ main(void) TEST_erase_info_user(MEMISLOCKED, eiu); struct erase_info_user64 *const eiu64 = tail_alloc(sizeof(*eiu64)); - init_magic(eiu64, sizeof(*eiu64)); + fill_memory(eiu64, sizeof(*eiu64)); ioctl(-1, MEMERASE64, eiu64); printf("ioctl(-1, MIXER_WRITE(%u) or %s, {start=%#llx, length=%#llx})" " = -1 EBADF (%m)\n", @@ -153,7 +142,7 @@ main(void) (unsigned long long) eiu64->length); struct mtd_oob_buf *const oob = tail_alloc(sizeof(*oob)); - init_magic(oob, sizeof(*oob)); + fill_memory(oob, sizeof(*oob)); ioctl(-1, MEMWRITEOOB, oob); printf("ioctl(-1, MEMWRITEOOB, {start=%#x, length=%#x, ptr=%p})" @@ -164,7 +153,7 @@ main(void) " = -1 EBADF (%m)\n", oob->start, oob->length, oob->ptr); struct mtd_oob_buf64 *const oob64 = tail_alloc(sizeof(*oob64)); - init_magic(oob64, sizeof(*oob64)); + fill_memory(oob64, sizeof(*oob64)); ioctl(-1, MEMWRITEOOB64, oob64); printf("ioctl(-1, MEMWRITEOOB64" @@ -180,14 +169,14 @@ main(void) struct otp_info *const oi = tail_alloc(sizeof(*oi)); - init_magic(oi, sizeof(*oi)); + fill_memory(oi, sizeof(*oi)); ioctl(-1, OTPLOCK, oi); printf("ioctl(-1, MIXER_READ(%u) or OTPLOCK" ", {start=%#x, length=%#x, locked=%u}) = -1 EBADF (%m)\n", (unsigned int) _IOC_NR(OTPLOCK), oi->start, oi->length, oi->locked); struct mtd_write_req *const wr = tail_alloc(sizeof(*wr)); - init_magic(wr, sizeof(*wr)); + fill_memory(wr, sizeof(*wr)); wr->mode = MTD_OPS_PLACE_OOB; ioctl(-1, MEMWRITE, wr); printf("ioctl(-1, MEMWRITE, {start=%#llx, len=%#llx, ooblen=%#llx" diff --git a/tests/ioctl_rtc.c b/tests/ioctl_rtc.c index ac967637d..49d7ec7b0 100644 --- a/tests/ioctl_rtc.c +++ b/tests/ioctl_rtc.c @@ -36,18 +36,7 @@ #include #include "xlat.h" -static const unsigned int magic = 0xdeadbeef; -static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0ded; - -static void -init_magic(void *addr, const unsigned int size) -{ - unsigned int *p = addr; - const unsigned int *end = addr + size - sizeof(int); - - for (; p <= end; ++p) - *(unsigned int *) p = magic; -} +static const unsigned long lmagic = (unsigned long) 0xdeadbeefbadc0dedULL; static void print_rtc_time(const struct rtc_time *rt) @@ -82,16 +71,16 @@ main(void) const unsigned int size = get_page_size(); void *const page = tail_alloc(size); - init_magic(page, size); + fill_memory(page, size); struct rtc_time *rt = tail_alloc(sizeof(*rt)); - init_magic(rt, sizeof(*rt)); + fill_memory(rt, sizeof(*rt)); struct rtc_wkalrm *wk = tail_alloc(sizeof(*wk)); - init_magic(wk, sizeof(*wk)); + fill_memory(wk, sizeof(*wk)); struct rtc_pll_info *pll = tail_alloc(sizeof(*pll)); - init_magic(pll, sizeof(*pll)); + fill_memory(pll, sizeof(*pll)); /* RTC_ALM_READ */ ioctl(-1, RTC_ALM_READ, 0); diff --git a/tests/ioctl_scsi.c b/tests/ioctl_scsi.c new file mode 100644 index 000000000..0db94d849 --- /dev/null +++ b/tests/ioctl_scsi.c @@ -0,0 +1,156 @@ +/* + * Check decoding of SCSI ioctl commands. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_SCSI_SG_H + +# include +# include +# include +# include "xlat/scsi_sg_commands.h" + +# define TEST_NO_ARG(cmd) \ + do { \ + ioctl(-1, cmd, 0xdeadbeef); \ + printf("ioctl(-1, %s) = -1 EBADF (%m)\n", #cmd); \ + } while (0) + +# define TEST_NULL_ARG(cmd) \ + do { \ + ioctl(-1, cmd, 0); \ + printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", #cmd); \ + } while (0) + +# define TEST_TAKES_INT_BY_VAL(cmd, val) \ + do { \ + ioctl(-1, cmd, val); \ + printf("ioctl(-1, %s, %#x) = -1 EBADF (%m)\n", #cmd, val); \ + } while (0) + +# define TEST_TAKES_INT_BY_PTR(cmd, pint) \ + do { \ + ioctl(-1, cmd, pint); \ + printf("ioctl(-1, %s, [%d]) = -1 EBADF (%m)\n", #cmd, *(pint)); \ + } while (0) + +# define TEST_RETURNS_INT_BY_PTR(cmd, pint) \ + do { \ + ioctl(-1, cmd, pint); \ + printf("ioctl(-1, %s, %p) = -1 EBADF (%m)\n", #cmd, pint); \ + } while (0) + +int +main(void) +{ + int *const pint = tail_alloc(sizeof(*pint)); + *pint = (int) 0xfacefeed; + + TEST_NO_ARG(SG_GET_TIMEOUT); + + TEST_NULL_ARG(SG_SET_TIMEOUT); + TEST_NULL_ARG(SG_EMULATED_HOST); + TEST_NULL_ARG(SG_GET_TRANSFORM); + TEST_NULL_ARG(SG_GET_COMMAND_Q); + TEST_NULL_ARG(SG_SET_COMMAND_Q); + TEST_NULL_ARG(SG_GET_RESERVED_SIZE); + TEST_NULL_ARG(SG_SET_RESERVED_SIZE); + TEST_NULL_ARG(SG_GET_SCSI_ID); + TEST_NULL_ARG(SG_SET_FORCE_LOW_DMA); + TEST_NULL_ARG(SG_GET_LOW_DMA); + TEST_NULL_ARG(SG_SET_FORCE_PACK_ID); + TEST_NULL_ARG(SG_GET_PACK_ID); + TEST_NULL_ARG(SG_GET_NUM_WAITING); + TEST_NULL_ARG(SG_SET_DEBUG); + TEST_NULL_ARG(SG_GET_SG_TABLESIZE); + TEST_NULL_ARG(SG_GET_VERSION_NUM); + TEST_NULL_ARG(SG_NEXT_CMD_LEN); + TEST_NULL_ARG(SG_SCSI_RESET); + TEST_NULL_ARG(SG_IO); + TEST_NULL_ARG(SG_GET_REQUEST_TABLE); + TEST_NULL_ARG(SG_SET_KEEP_ORPHAN); + TEST_NULL_ARG(SG_GET_KEEP_ORPHAN); + TEST_NULL_ARG(SG_GET_ACCESS_COUNT); + + TEST_TAKES_INT_BY_VAL(SG_SET_TRANSFORM, 0); + TEST_TAKES_INT_BY_VAL(SG_SET_TRANSFORM, *pint); + + TEST_TAKES_INT_BY_PTR(SG_NEXT_CMD_LEN, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_COMMAND_Q, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_DEBUG, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_FORCE_LOW_DMA, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_FORCE_PACK_ID, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_KEEP_ORPHAN, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_RESERVED_SIZE, pint); + TEST_TAKES_INT_BY_PTR(SG_SET_TIMEOUT, pint); + + TEST_RETURNS_INT_BY_PTR(SG_EMULATED_HOST, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_ACCESS_COUNT, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_COMMAND_Q, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_KEEP_ORPHAN, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_LOW_DMA, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_NUM_WAITING, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_PACK_ID, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_RESERVED_SIZE, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_SG_TABLESIZE, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_TRANSFORM, pint); + TEST_RETURNS_INT_BY_PTR(SG_GET_VERSION_NUM, pint); + + ioctl(-1, SG_SCSI_RESET, pint); + printf("ioctl(-1, %s, [%#x /* %s_??? */]) = -1 EBADF (%m)\n", + "SG_SCSI_RESET", *pint, "SG_SCSI_RESET"); + + *pint = 0x100; + ioctl(-1, SG_SCSI_RESET, pint); + printf("ioctl(-1, %s, [SG_SCSI_RESET_NO_ESCALATE|SG_SCSI_RESET_NOTHING])" + " = -1 EBADF (%m)\n", "SG_SCSI_RESET"); + + *pint = 1; + ioctl(-1, SG_SCSI_RESET, pint); + printf("ioctl(-1, %s, [SG_SCSI_RESET_DEVICE]) = -1 EBADF (%m)\n", + "SG_SCSI_RESET"); + + ioctl(-1, 0x22ff, 0); + printf("ioctl(-1, _IOC(0, 0x22, 0xff, 0), 0) = -1 EBADF (%m)\n"); + + static const unsigned long magic = + (unsigned long) 0xdeadbeeffacefeedULL; + ioctl(-1, 0x22ff, magic); + printf("ioctl(-1, _IOC(0, 0x22, 0xff, 0), %#lx) = -1 EBADF (%m)\n", + magic); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SCSI_SG_H") + +#endif diff --git a/tests/ioctl_scsi.test b/tests/ioctl_scsi.test new file mode 100755 index 000000000..2710f12b3 --- /dev/null +++ b/tests/ioctl_scsi.test @@ -0,0 +1,4 @@ +#!/bin/sh + +# Check decoding of SCSI ioctl commands. +. "${srcdir=.}/ioctl.test" diff --git a/tests/ioctl_sg_io_v3.c b/tests/ioctl_sg_io_v3.c new file mode 100644 index 000000000..ef25795b7 --- /dev/null +++ b/tests/ioctl_sg_io_v3.c @@ -0,0 +1,418 @@ +/* + * Check decoding of ioctl SG_IO v3 commands. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_SCSI_SG_H + +# include +# include +# include +# include +# include + +int +main(void) +{ + ioctl(-1, SG_IO, 0); + printf("ioctl(-1, SG_IO, NULL) = -1 EBADF (%m)\n"); + + struct sg_io_hdr *const sg_io = tail_alloc(sizeof(*sg_io)); + fill_memory(sg_io, sizeof(*sg_io)); + + const void *const efault = sg_io + 1; + ioctl(-1, SG_IO, efault); + printf("ioctl(-1, SG_IO, %p) = -1 EBADF (%m)\n", efault); + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, [%u]) = -1 EBADF (%m)\n", sg_io->interface_id); + + unsigned int *const piid = tail_alloc(sizeof(*piid)); + *piid = (unsigned char) 'S'; + ioctl(-1, SG_IO, piid); + printf("ioctl(-1, SG_IO, {interface_id='S', %p}) = -1 EBADF (%m)\n", piid + 1); + + sg_io->interface_id = (unsigned char) 'S'; + sg_io->dxfer_direction = -2; + sg_io->flags = -1U; + sg_io->info = -1U; + sg_io->dxferp = (void *) (unsigned long) 0xfacefeedfffffff1ULL; + sg_io->cmdp = (void *) (unsigned long) 0xfacefeedfffffff2ULL; + sg_io->sbp = (void *) (unsigned long) 0xfacefeedfffffff3ULL; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_TO_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_DIRECT_IO|SG_FLAG_UNUSED_LUN_INHIBIT" + "|SG_FLAG_MMAP_IO|SG_FLAG_NO_DXFER" + "|SG_FLAG_Q_AT_TAIL|SG_FLAG_Q_AT_HEAD|0xfffeffc8" + ", dxferp=%p" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xfffffff8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + sg_io->dxferp, + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->dxfer_direction = -3; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_DIRECT_IO|SG_FLAG_UNUSED_LUN_INHIBIT" + "|SG_FLAG_MMAP_IO|SG_FLAG_NO_DXFER" + "|SG_FLAG_Q_AT_TAIL|SG_FLAG_Q_AT_HEAD|0xfffeffc8" + ", dxferp=%p" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xfffffff8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + sg_io->dxferp, + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + const struct iovec iov[] = { + { + .iov_base = (void *) efault - 2, + .iov_len = 2 + }, { + .iov_base = (void *) efault - 3, + .iov_len = 4 + } + }; + struct iovec *const t_iov = tail_memdup(iov, sizeof(iov)); + + sg_io->flags = 0x24; + sg_io->info = 1; + sg_io->dxfer_direction = -2; + + sg_io->iovec_count = ARRAY_SIZE(iov); + sg_io->dxfer_len = iov[0].iov_len + iov[1].iov_len - 1; + sg_io->dxferp = t_iov; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_TO_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_MMAP_IO|SG_FLAG_Q_AT_HEAD" + ", dxferp=[{iov_base=\"\\%o\\%o\", iov_len=%u}" + ", {iov_base=\"\\%o\\%o\\%o\", iov_len=%u}]" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (iov[0].iov_base + 0), + * (unsigned char *) (iov[0].iov_base + 1), + (unsigned int) iov[0].iov_len, + * (unsigned char *) (iov[1].iov_base + 0), + * (unsigned char *) (iov[1].iov_base + 1), + * (unsigned char *) (iov[1].iov_base + 2), + (unsigned int) iov[1].iov_len, + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->flags = 0x11; + sg_io->dxfer_direction = -3; + sg_io->resid = sg_io->dxfer_len + 1; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_DIRECT_IO|SG_FLAG_Q_AT_TAIL" + ", dxferp=[{iov_base=\"\\%o\\%o\", iov_len=%u}" + ", {iov_base=\"\\%o\\%o\\%o\", iov_len=%u}]" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (iov[0].iov_base + 0), + * (unsigned char *) (iov[0].iov_base + 1), + (unsigned int) iov[0].iov_len, + * (unsigned char *) (iov[1].iov_base + 0), + * (unsigned char *) (iov[1].iov_base + 1), + * (unsigned char *) (iov[1].iov_base + 2), + (unsigned int) iov[1].iov_len, + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->flags = 0x10000; + sg_io->info = 0xdeadbeef; + sg_io->iovec_count = 0; + sg_io->dxfer_len = 5; + sg_io->resid = 1; + sg_io->dxferp = (void *) efault - (sg_io->dxfer_len - sg_io->resid); + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_NO_DXFER" + ", dxferp=\"\\x%x\\x%x\\x%x\\x%x\"" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xdeadbee8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (sg_io->dxferp + 0), + * (unsigned char *) (sg_io->dxferp + 1), + * (unsigned char *) (sg_io->dxferp + 2), + * (unsigned char *) (sg_io->dxferp + 3), + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->flags = 2; + sg_io->dxfer_direction = -4; + sg_io->dxfer_len = 3; + sg_io->resid = 1; + sg_io->dxferp = (void *) efault - sg_io->dxfer_len; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_TO_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=SG_FLAG_UNUSED_LUN_INHIBIT" + ", dxferp=\"\\x%x\\x%x\\x%x\" => dxferp=\"\\x%x\\x%x\"" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xdeadbee8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (sg_io->dxferp + 0), + * (unsigned char *) (sg_io->dxferp + 1), + * (unsigned char *) (sg_io->dxferp + 2), + * (unsigned char *) (sg_io->dxferp + 0), + * (unsigned char *) (sg_io->dxferp + 1), + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + sg_io->flags = 0; + sg_io->resid = sg_io->dxfer_len; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {interface_id='S'" + ", dxfer_direction=SG_DXFER_TO_FROM_DEV" + ", cmd_len=%u" + ", cmdp=%p" + ", mx_sb_len=%u" + ", iovec_count=%u" + ", dxfer_len=%u" + ", timeout=%u" + ", flags=0" + ", dxferp=\"\\x%x\\x%x\\x%x\"" + ", status=%#x" + ", masked_status=%#x" + ", msg_status=%#x" + ", sb_len_wr=%u" + ", sbp=%p" + ", host_status=%#x" + ", driver_status=%#x" + ", resid=%d" + ", duration=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xdeadbee8" + "}) = -1 EBADF (%m)\n", + sg_io->cmd_len, + sg_io->cmdp, + sg_io->mx_sb_len, + sg_io->iovec_count, + sg_io->dxfer_len, + sg_io->timeout, + * (unsigned char *) (sg_io->dxferp + 0), + * (unsigned char *) (sg_io->dxferp + 1), + * (unsigned char *) (sg_io->dxferp + 2), + sg_io->status, + sg_io->masked_status, + sg_io->msg_status, + sg_io->sb_len_wr, + sg_io->sbp, + sg_io->host_status, + sg_io->driver_status, + sg_io->resid, + sg_io->duration); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SCSI_SG_H") + +#endif diff --git a/tests/ioctl_sg_io_v3.test b/tests/ioctl_sg_io_v3.test new file mode 100755 index 000000000..dacacdf47 --- /dev/null +++ b/tests/ioctl_sg_io_v3.test @@ -0,0 +1,4 @@ +#!/bin/sh + +# Check decoding of ioctl SG_IO v3 commands. +. "${srcdir=.}/ioctl.test" diff --git a/tests/ioctl_sg_io_v4.c b/tests/ioctl_sg_io_v4.c new file mode 100644 index 000000000..5f899eeea --- /dev/null +++ b/tests/ioctl_sg_io_v4.c @@ -0,0 +1,238 @@ +/* + * Check decoding of ioctl SG_IO v4 commands. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_LINUX_BSG_H + +# include +# include +# include +# include +# include + +# include "xlat/scsi_sg_commands.h" + +int +main(void) +{ + ioctl(-1, SG_IO, 0); + printf("ioctl(-1, SG_IO, NULL) = -1 EBADF (%m)\n"); + + struct sg_io_v4 *const sg_io = tail_alloc(sizeof(*sg_io)); + fill_memory(sg_io, sizeof(*sg_io)); + + const void *const efault = sg_io + 1; + ioctl(-1, SG_IO, efault); + printf("ioctl(-1, SG_IO, %p) = -1 EBADF (%m)\n", efault); + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, [%u]) = -1 EBADF (%m)\n", sg_io->guard); + + unsigned int *const pguard = tail_alloc(sizeof(*pguard)); + *pguard = (unsigned char) 'Q'; + ioctl(-1, SG_IO, pguard); + printf("ioctl(-1, SG_IO, {guard='Q', %p}) = -1 EBADF (%m)\n", pguard + 1); + + sg_io->guard = (unsigned char) 'Q'; + sg_io->protocol = 0; + sg_io->subprotocol = 1; + sg_io->flags = -1U; + sg_io->info = -1U; + sg_io->request = (kernel_ulong_t) 0xfacefeedfffffff1ULL; + sg_io->response = (kernel_ulong_t) 0xfacefeedfffffff2ULL; + sg_io->dout_xferp = (kernel_ulong_t) 0xfacefeedfffffff3ULL; + sg_io->din_xferp = (kernel_ulong_t) 0xfacefeedfffffff4ULL; + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {guard='Q'" + ", protocol=BSG_PROTOCOL_SCSI" + ", subprotocol=BSG_SUB_PROTOCOL_SCSI_TMF" + ", request_len=%u" + ", request=%#llx" + ", request_tag=%#" PRI__x64 + ", request_attr=%u" + ", request_priority=%u" + ", request_extra=%u" + ", max_response_len=%u" + ", dout_iovec_count=%u" + ", dout_xfer_len=%u" + ", din_iovec_count=%u" + ", din_xfer_len=%u" + ", dout_xferp=%#llx" + ", timeout=%u" + ", flags=BSG_FLAG_Q_AT_TAIL|BSG_FLAG_Q_AT_HEAD|0xffffffcf" + ", usr_ptr=%#" PRI__x64 + ", response_len=%u" + ", response=%#llx" + ", din_xferp=%#llx" + ", driver_status=%#x" + ", transport_status=%#x" + ", device_status=%#x" + ", retry_delay=%u" + ", info=SG_INFO_CHECK|SG_INFO_DIRECT_IO|SG_INFO_MIXED_IO|0xfffffff8" + ", duration=%u" + ", response_len=%u" + ", din_resid=%d" + ", dout_resid=%d" + ", generated_tag=%#" PRI__x64 "}) = -1 EBADF (%m)\n", + sg_io->request_len, + (unsigned long long) (kernel_ulong_t) sg_io->request, + sg_io->request_tag, + sg_io->request_attr, + sg_io->request_priority, + sg_io->request_extra, + sg_io->max_response_len, + sg_io->dout_iovec_count, + sg_io->dout_xfer_len, + sg_io->din_iovec_count, + sg_io->din_xfer_len, + (unsigned long long) (kernel_ulong_t) sg_io->dout_xferp, + sg_io->timeout, + sg_io->usr_ptr, + sg_io->response_len, + (unsigned long long) (kernel_ulong_t) sg_io->response, + (unsigned long long) (kernel_ulong_t) sg_io->din_xferp, + sg_io->driver_status, + sg_io->transport_status, + sg_io->device_status, + sg_io->retry_delay, + sg_io->duration, + sg_io->response_len, + sg_io->din_resid, + sg_io->dout_resid, + sg_io->generated_tag); + + const struct iovec iov[] = { + { + .iov_base = (void *) efault - 2, + .iov_len = 2 + }, { + .iov_base = (void *) efault - 3, + .iov_len = 4 + } + }; + const struct iovec *const t_iov = tail_memdup(iov, sizeof(iov)); + sg_io->dout_iovec_count = ARRAY_SIZE(iov); + sg_io->dout_xfer_len = iov[0].iov_len + iov[1].iov_len - 1; + sg_io->dout_xferp = (unsigned long) t_iov; + + sg_io->din_iovec_count = 0; + sg_io->din_xfer_len = 5; + sg_io->din_resid = 1; + sg_io->din_xferp = (unsigned long) efault - + (sg_io->dout_xfer_len - sg_io->din_resid); + + sg_io->request_len = 3; + sg_io->request = (unsigned long) efault - sg_io->request_len; + sg_io->response_len = 2; + sg_io->response = (unsigned long) efault - sg_io->response_len; + + sg_io->flags = 0x20; + sg_io->info = 1; + + ioctl(-1, SG_IO, sg_io); + printf("ioctl(-1, SG_IO, {guard='Q'" + ", protocol=BSG_PROTOCOL_SCSI" + ", subprotocol=BSG_SUB_PROTOCOL_SCSI_TMF" + ", request_len=%u" + ", request=\"\\x%x\\x%x\\x%x\"" + ", request_tag=%#" PRI__x64 + ", request_attr=%u" + ", request_priority=%u" + ", request_extra=%u" + ", max_response_len=%u" + ", dout_iovec_count=%u" + ", dout_xfer_len=%u" + ", din_iovec_count=%u" + ", din_xfer_len=%u" + ", dout_xferp=[{iov_base=\"\\%o\\%o\", iov_len=%u}" + ", {iov_base=\"\\%o\\%o\\%o\", iov_len=%u}]" + ", timeout=%u, flags=BSG_FLAG_Q_AT_HEAD" + ", usr_ptr=%#" PRI__x64 + ", response_len=%u" + ", response=\"\\x%x\\x%x\"" + ", din_xferp=\"\\x%x\\x%x\\x%x\\x%x\"" + ", driver_status=%#x" + ", transport_status=%#x" + ", device_status=%#x" + ", retry_delay=%u" + ", info=SG_INFO_CHECK" + ", duration=%u" + ", response_len=%u" + ", din_resid=%d" + ", dout_resid=%d" + ", generated_tag=%#" PRI__x64 "}) = -1 EBADF (%m)\n", + sg_io->request_len, + * (unsigned char *) ((unsigned long) sg_io->request + 0), + * (unsigned char *) ((unsigned long) sg_io->request + 1), + * (unsigned char *) ((unsigned long) sg_io->request + 2), + sg_io->request_tag, + sg_io->request_attr, + sg_io->request_priority, + sg_io->request_extra, + sg_io->max_response_len, + sg_io->dout_iovec_count, + sg_io->dout_xfer_len, + sg_io->din_iovec_count, + sg_io->din_xfer_len, + * (unsigned char *) (iov[0].iov_base + 0), + * (unsigned char *) (iov[0].iov_base + 1), + (unsigned int) iov[0].iov_len, + * (unsigned char *) (iov[1].iov_base + 0), + * (unsigned char *) (iov[1].iov_base + 1), + * (unsigned char *) (iov[1].iov_base + 2), + (unsigned int) iov[1].iov_len, + sg_io->timeout, + sg_io->usr_ptr, + sg_io->response_len, + * (unsigned char *) ((unsigned long) sg_io->response + 0), + * (unsigned char *) ((unsigned long) sg_io->response + 1), + * (unsigned char *) ((unsigned long) sg_io->din_xferp + 0), + * (unsigned char *) ((unsigned long) sg_io->din_xferp + 1), + * (unsigned char *) ((unsigned long) sg_io->din_xferp + 2), + * (unsigned char *) ((unsigned long) sg_io->din_xferp + 3), + sg_io->driver_status, + sg_io->transport_status, + sg_io->device_status, + sg_io->retry_delay, + sg_io->duration, + sg_io->response_len, + sg_io->din_resid, + sg_io->dout_resid, + sg_io->generated_tag); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_LINUX_BSG_H") + +#endif diff --git a/tests/ioctl_sg_io_v4.test b/tests/ioctl_sg_io_v4.test new file mode 100755 index 000000000..255672247 --- /dev/null +++ b/tests/ioctl_sg_io_v4.test @@ -0,0 +1,4 @@ +#!/bin/sh + +# Check decoding of ioctl SG_IO v4 commands. +. "${srcdir=.}/ioctl.test" diff --git a/tests/ioctl_sock_gifconf.c b/tests/ioctl_sock_gifconf.c new file mode 100644 index 000000000..ae0bea4f8 --- /dev/null +++ b/tests/ioctl_sock_gifconf.c @@ -0,0 +1,182 @@ +/* + * Check decoding of SIOCGIFCONF command of ioctl syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include + +#include +#include +#include +#include + +#define MAX_STRLEN 1 + +static void +print_ifc_len(int val) +{ + if (val % (int) sizeof(struct ifreq)) + printf("%d", val); + else + printf("%d * sizeof(struct ifreq)", + val / (int) sizeof(struct ifreq)); +} + +static void +print_ifconf(struct ifconf *ifc, int in_len, char *in_buf, long rc) +{ + if (in_buf) { + printf("{ifc_len="); + print_ifc_len(in_len); + + if (in_len != ifc->ifc_len) { + printf(" => "); + print_ifc_len(ifc->ifc_len); + } + } else { + printf("{ifc_len="); + print_ifc_len(ifc->ifc_len); + } + + printf(", ifc_buf="); + + if ((rc < 0) || !in_buf) { + if (in_buf) + printf("%p", in_buf); + else + printf("NULL"); + } else { + int i; + + printf("["); + for (i = 0; i < (ifc->ifc_len) && + i < (int) (MAX_STRLEN * sizeof(struct ifreq)); + i += sizeof(struct ifreq)) { + struct ifreq *ifr = (struct ifreq *) (ifc->ifc_buf + i); + struct sockaddr_in *const sa_in = + (struct sockaddr_in *) &(ifr->ifr_addr); + + if (i) + printf(", "); + printf("{ifr_name=\"%s\", ifr_addr={sa_family=AF_INET, " + "sin_port=htons(%u), sin_addr=inet_addr(\"%s\")}" + "}", ifr->ifr_name, ntohs(sa_in->sin_port), + inet_ntoa(sa_in->sin_addr)); + } + + if ((size_t) (ifc->ifc_len - i) >= sizeof(struct ifreq)) + printf(", ..."); + + printf("]"); + } + + printf("}"); +} + +static void +gifconf_ioctl(int fd, struct ifconf *ifc, bool ifc_valid) +{ + const char * errstr; + int in_len; + char *in_buf; + long rc; + + if (ifc_valid) { + in_len = ifc->ifc_len; + in_buf = ifc->ifc_buf; + } + + rc = ioctl(fd, SIOCGIFCONF, ifc); + errstr = sprintrc(rc); + + printf("ioctl(%d, SIOCGIFCONF, ", fd); + if (ifc_valid) { + print_ifconf(ifc, in_len, in_buf, rc); + } else { + if (ifc) + printf("%p", ifc); + else + printf("NULL"); + } + + printf(") = %s\n", errstr); +} + +int +main(int argc, char *argv[]) +{ + struct ifreq *ifr = tail_alloc(2 * sizeof(*ifr)); + struct ifconf *ifc = tail_alloc(sizeof(*ifc)); + + struct sockaddr_in addr; + int fd; + + memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + + if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) + perror_msg_and_skip("socket AF_INET"); + + gifconf_ioctl(fd, NULL, false); + gifconf_ioctl(fd, ifc + 1, false); + + ifc->ifc_len = 3141592653U; + ifc->ifc_buf = NULL; + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 0; + ifc->ifc_buf = (char *) (ifr + 2); + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 1; + ifc->ifc_buf = (char *) (ifr + 1); + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 1 * sizeof(*ifr); + ifc->ifc_buf = (char *) (ifr + 1); + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 2 * sizeof(*ifr); + ifc->ifc_buf = (char *) (ifr + 1); + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 2 * sizeof(*ifr) + 2; + ifc->ifc_buf = (char *) ifr; + gifconf_ioctl(fd, ifc, true); + + ifc->ifc_len = 3 * sizeof(*ifr) + 4; + ifc->ifc_buf = (char *) ifr; + gifconf_ioctl(fd, ifc, true); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests/ioctl_sock_gifconf.test b/tests/ioctl_sock_gifconf.test new file mode 100755 index 000000000..2e2fc019d --- /dev/null +++ b/tests/ioctl_sock_gifconf.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of SIOCGIFCONF ioctl. + +. "${srcdir=.}/init.sh" + +run_prog > /dev/null +run_strace -a28 -s1 -eioctl $args > "$EXP" +check_prog grep +grep -v '^ioctl([012],' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" +rm -f "$EXP" "$OUT" diff --git a/tests/ioctl_v4l2.c b/tests/ioctl_v4l2.c index 850783d59..af8c3419a 100644 --- a/tests/ioctl_v4l2.c +++ b/tests/ioctl_v4l2.c @@ -32,40 +32,38 @@ #include #include -static const unsigned int magic = 0xdeadbeef; - -static void -init_magic(void *addr, const unsigned int size) -{ - unsigned int *p = addr; - const unsigned int *end = addr + size; +#if WORDS_BIGENDIAN +# define cc0(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 24)) +# define cc1(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 16)) +# define cc2(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 8)) +# define cc3(arg) ((unsigned int) (unsigned char) (arg)) +# define fourcc(a0, a1, a2, a3) \ + ((unsigned int)(a3) | \ + ((unsigned int)(a2) << 8) | \ + ((unsigned int)(a1) << 16) | \ + ((unsigned int)(a0) << 24)) +#else +# define cc0(arg) ((unsigned int) (unsigned char) (arg)) +# define cc1(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 8)) +# define cc2(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 16)) +# define cc3(arg) ((unsigned int) (unsigned char) ((unsigned int) (arg) >> 24)) +# define fourcc(a0, a1, a2, a3) \ + ((unsigned int)(a0) | \ + ((unsigned int)(a1) << 8) | \ + ((unsigned int)(a2) << 16) | \ + ((unsigned int)(a3) << 24)) +#endif - for (; p < end; ++p) - *(unsigned int *) p = magic; -} +static const unsigned int magic = 0xdeadbeef; int main(void ) { const unsigned int size = get_page_size(); void *const page = tail_alloc(size); - init_magic(page, size); + fill_memory(page, size); - const union u_pixel_format { - unsigned int pixelformat; - unsigned char cc[sizeof(int)]; - } u = { -#if WORDS_BIGENDIAN - .cc = { - (unsigned char) (magic >> 24), - (unsigned char) (magic >> 16), - (unsigned char) (magic >> 8), - (unsigned char) magic - } -#else - .pixelformat = magic -#endif - }; + unsigned char cc[sizeof(int)] = { 'A', '\'', '\\', '\xfa' }; /* VIDIOC_QUERYCAP */ ioctl(-1, VIDIOC_QUERYCAP, 0); @@ -83,14 +81,14 @@ main(void ) p_fmtdesc->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ioctl(-1, VIDIOC_ENUM_FMT, p_fmtdesc); printf("ioctl(-1, VIDIOC_ENUM_FMT, {index=%u" - ", type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EBADF (%m)\n", magic); + ", type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EBADF (%m)\n", + p_fmtdesc->index); /* VIDIOC_G_FMT */ ioctl(-1, VIDIOC_G_FMT, 0); printf("ioctl(-1, VIDIOC_G_FMT, NULL) = -1 EBADF (%m)\n"); - struct v4l2_format *const p_format = - tail_alloc(sizeof(*p_format)); + struct v4l2_format *const p_format = tail_alloc(sizeof(*p_format)); p_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ioctl(-1, VIDIOC_G_FMT, p_format); @@ -104,7 +102,7 @@ main(void ) p_format->type = V4L2_BUF_TYPE_VIDEO_OUTPUT; p_format->fmt.pix.width = 0xdad1beaf; p_format->fmt.pix.height = 0xdad2beaf; - p_format->fmt.pix.pixelformat = 0xdeadbeef; + p_format->fmt.pix.pixelformat = magic; p_format->fmt.pix.field = V4L2_FIELD_NONE; p_format->fmt.pix.bytesperline = 0xdad3beaf; p_format->fmt.pix.sizeimage = 0xdad4beaf; @@ -117,7 +115,7 @@ main(void ) ", field=V4L2_FIELD_NONE, bytesperline=%u, sizeimage=%u" ", colorspace=V4L2_COLORSPACE_JPEG}}) = -1 EBADF (%m)\n", p_format->fmt.pix.width, p_format->fmt.pix.height, - u.cc[0], u.cc[1], u.cc[2], u.cc[3], + cc0(magic), cc1(magic), cc2(magic), cc3(magic), p_format->fmt.pix.bytesperline, p_format->fmt.pix.sizeimage); /* VIDIOC_TRY_FMT */ @@ -129,7 +127,7 @@ main(void ) p_format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; p_format->fmt.pix_mp.width = 0xdad1beaf; p_format->fmt.pix_mp.height = 0xdad2beaf; - p_format->fmt.pix_mp.pixelformat = 0xdeadbeef; + p_format->fmt.pix_mp.pixelformat = magic; p_format->fmt.pix_mp.field = V4L2_FIELD_NONE; p_format->fmt.pix_mp.colorspace = V4L2_COLORSPACE_JPEG; unsigned int i; @@ -145,7 +143,7 @@ main(void ) ", field=V4L2_FIELD_NONE, colorspace=V4L2_COLORSPACE_JPEG" ", plane_fmt=[", p_format->fmt.pix_mp.width, p_format->fmt.pix_mp.height, - u.cc[0], u.cc[1], u.cc[2], u.cc[3]); + cc0(magic), cc1(magic), cc2(magic), cc3(magic)); for (i = 0; i < ARRAY_SIZE(p_format->fmt.pix_mp.plane_fmt); ++i) { if (i) printf(", "); @@ -156,44 +154,55 @@ main(void ) printf("], num_planes=%u}}) = -1 EBADF (%m)\n", p_format->fmt.pix_mp.num_planes); #else - ioctl(-1, VIDIOC_TRY_FMT, page); + struct v4l2_format *const p_v4l2_format = + page + size - sizeof(*p_v4l2_format); + ioctl(-1, VIDIOC_TRY_FMT, p_v4l2_format); printf("ioctl(-1, VIDIOC_TRY_FMT, {type=%#x /* V4L2_BUF_TYPE_??? */})" - " = -1 EBADF (%m)\n", magic); + " = -1 EBADF (%m)\n", p_v4l2_format->type); #endif /* VIDIOC_REQBUFS */ ioctl(-1, VIDIOC_REQBUFS, 0); printf("ioctl(-1, VIDIOC_REQBUFS, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_REQBUFS, - page + size - sizeof(struct v4l2_requestbuffers)); + struct v4l2_requestbuffers *const p_v4l2_requestbuffers = + page + size - sizeof(*p_v4l2_requestbuffers); + ioctl(-1, VIDIOC_REQBUFS, p_v4l2_requestbuffers); printf("ioctl(-1, VIDIOC_REQBUFS, {count=%u, type=%#x" " /* V4L2_BUF_TYPE_??? */, memory=%#x /* V4L2_MEMORY_??? */})" - " = -1 EBADF (%m)\n", magic, magic, magic); + " = -1 EBADF (%m)\n", + p_v4l2_requestbuffers->count, + p_v4l2_requestbuffers->type, + p_v4l2_requestbuffers->memory); /* VIDIOC_QUERYBUF */ ioctl(-1, VIDIOC_QUERYBUF, 0); printf("ioctl(-1, VIDIOC_QUERYBUF, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_QUERYBUF, page + size - sizeof(struct v4l2_buffer)); + struct v4l2_buffer *const p_v4l2_buffer = + page + size - sizeof(*p_v4l2_buffer); + ioctl(-1, VIDIOC_QUERYBUF, p_v4l2_buffer); printf("ioctl(-1, VIDIOC_QUERYBUF, {type=%#x /* V4L2_BUF_TYPE_??? */" - ", index=%u}) = -1 EBADF (%m)\n", magic, magic); + ", index=%u}) = -1 EBADF (%m)\n", + p_v4l2_buffer->type, p_v4l2_buffer->index); /* VIDIOC_QBUF */ ioctl(-1, VIDIOC_QBUF, 0); printf("ioctl(-1, VIDIOC_QBUF, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_QBUF, page + size - sizeof(struct v4l2_buffer)); + ioctl(-1, VIDIOC_QBUF, p_v4l2_buffer); printf("ioctl(-1, VIDIOC_QBUF, {type=%#x /* V4L2_BUF_TYPE_??? */" - ", index=%u}) = -1 EBADF (%m)\n", magic, magic); + ", index=%u}) = -1 EBADF (%m)\n", + p_v4l2_buffer->type, p_v4l2_buffer->index); /* VIDIOC_DQBUF */ ioctl(-1, VIDIOC_DQBUF, 0); printf("ioctl(-1, VIDIOC_DQBUF, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_DQBUF, page + size - sizeof(struct v4l2_buffer)); + ioctl(-1, VIDIOC_DQBUF, p_v4l2_buffer); printf("ioctl(-1, VIDIOC_DQBUF, {type=%#x" - " /* V4L2_BUF_TYPE_??? */}) = -1 EBADF (%m)\n", magic); + " /* V4L2_BUF_TYPE_??? */}) = -1 EBADF (%m)\n", + p_v4l2_buffer->type); /* VIDIOC_G_FBUF */ ioctl(-1, VIDIOC_G_FBUF, 0); @@ -206,42 +215,49 @@ main(void ) ioctl(-1, VIDIOC_S_FBUF, 0); printf("ioctl(-1, VIDIOC_S_FBUF, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_S_FBUF, page + size - sizeof(struct v4l2_framebuffer)); + struct v4l2_framebuffer *const p_v4l2_framebuffer = + page + size - sizeof(*p_v4l2_framebuffer); + ioctl(-1, VIDIOC_S_FBUF, p_v4l2_framebuffer); printf("ioctl(-1, VIDIOC_S_FBUF, {capability=%#x" - ", flags=%#x, base=%#lx}) = -1 EBADF (%m)\n", - magic, magic, *(unsigned long *) page); + ", flags=%#x, base=%p}) = -1 EBADF (%m)\n", + p_v4l2_framebuffer->capability, + p_v4l2_framebuffer->flags, + p_v4l2_framebuffer->base); /* VIDIOC_STREAMON */ ioctl(-1, VIDIOC_STREAMON, 0); printf("ioctl(-1, VIDIOC_STREAMON, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_STREAMON, page + size - sizeof(int)); + int *const p_int = page + size - sizeof(int); + ioctl(-1, VIDIOC_STREAMON, p_int); printf("ioctl(-1, VIDIOC_STREAMON, [%#x /* V4L2_BUF_TYPE_??? */])" - " = -1 EBADF (%m)\n", magic); + " = -1 EBADF (%m)\n", *p_int); /* VIDIOC_STREAMOFF */ ioctl(-1, VIDIOC_STREAMOFF, 0); printf("ioctl(-1, VIDIOC_STREAMOFF, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_STREAMOFF, page + size - sizeof(int)); + ioctl(-1, VIDIOC_STREAMOFF, p_int); printf("ioctl(-1, VIDIOC_STREAMOFF, [%#x /* V4L2_BUF_TYPE_??? */])" - " = -1 EBADF (%m)\n", magic); + " = -1 EBADF (%m)\n", *p_int); /* VIDIOC_G_PARM */ ioctl(-1, VIDIOC_G_PARM, 0); printf("ioctl(-1, VIDIOC_G_PARM, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_G_PARM, page + size - sizeof(struct v4l2_streamparm)); + struct v4l2_streamparm *const p_v4l2_streamparm = + page + size - sizeof(*p_v4l2_streamparm); + ioctl(-1, VIDIOC_G_PARM, p_v4l2_streamparm); printf("ioctl(-1, VIDIOC_G_PARM, {type=%#x /* V4L2_BUF_TYPE_??? */})" - " = -1 EBADF (%m)\n", magic); + " = -1 EBADF (%m)\n", p_v4l2_streamparm->type); /* VIDIOC_S_PARM */ ioctl(-1, VIDIOC_S_PARM, 0); printf("ioctl(-1, VIDIOC_S_PARM, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_S_PARM, page); + ioctl(-1, VIDIOC_S_PARM, p_v4l2_streamparm); printf("ioctl(-1, VIDIOC_S_PARM, {type=%#x /* V4L2_BUF_TYPE_??? */})" - " = -1 EBADF (%m)\n", magic); + " = -1 EBADF (%m)\n", p_v4l2_streamparm->type); struct v4l2_streamparm *const p_streamparm = tail_alloc(sizeof(*p_streamparm)); @@ -279,58 +295,64 @@ main(void ) ioctl(-1, VIDIOC_S_STD, 0); printf("ioctl(-1, VIDIOC_S_STD, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_S_STD, page + size - sizeof(long long)); + long long *const p_longlong = page + size - sizeof(*p_longlong); + ioctl(-1, VIDIOC_S_STD, p_longlong); printf("ioctl(-1, VIDIOC_S_STD, [%#llx]) = -1 EBADF (%m)\n", - *(unsigned long long *) page); + *p_longlong); /* VIDIOC_ENUMSTD */ ioctl(-1, VIDIOC_ENUMSTD, 0); printf("ioctl(-1, VIDIOC_ENUMSTD, NULL) = -1 EBADF (%m)\n"); - struct v4l2_standard *const p_standard = - tail_alloc(sizeof(*p_standard)); - p_standard->index = magic; - ioctl(-1, VIDIOC_ENUMSTD, p_standard); + struct v4l2_standard *const p_v4l2_standard = + page + size - sizeof(*p_v4l2_standard); + ioctl(-1, VIDIOC_ENUMSTD, p_v4l2_standard); printf("ioctl(-1, VIDIOC_ENUMSTD, {index=%u}) = -1 EBADF (%m)\n", - magic); + p_v4l2_standard->index); /* VIDIOC_ENUMINPUT */ ioctl(-1, VIDIOC_ENUMINPUT, 0); printf("ioctl(-1, VIDIOC_ENUMINPUT, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_ENUMINPUT, page); + struct v4l2_input *const p_v4l2_input = + page + size - sizeof(*p_v4l2_input); + ioctl(-1, VIDIOC_ENUMINPUT, p_v4l2_input); printf("ioctl(-1, VIDIOC_ENUMINPUT, {index=%u}) = -1 EBADF (%m)\n", - magic); + p_v4l2_input->index); /* VIDIOC_G_CTRL */ ioctl(-1, VIDIOC_G_CTRL, 0); printf("ioctl(-1, VIDIOC_G_CTRL, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_G_CTRL, page + size - sizeof(struct v4l2_control)); + struct v4l2_control *const p_v4l2_control = + page + size - sizeof(*p_v4l2_control); + ioctl(-1, VIDIOC_G_CTRL, p_v4l2_control); printf("ioctl(-1, VIDIOC_G_CTRL, {id=%#x /* V4L2_CID_??? */})" - " = -1 EBADF (%m)\n", magic); + " = -1 EBADF (%m)\n", p_v4l2_control->id); /* VIDIOC_S_CTRL */ ioctl(-1, VIDIOC_S_CTRL, 0); printf("ioctl(-1, VIDIOC_S_CTRL, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_S_CTRL, page + size - sizeof(struct v4l2_control)); + ioctl(-1, VIDIOC_S_CTRL, p_v4l2_control); printf("ioctl(-1, VIDIOC_S_CTRL, {id=%#x /* V4L2_CID_??? */" - ", value=%d}) = -1 EBADF (%m)\n", magic, magic); + ", value=%d}) = -1 EBADF (%m)\n", + p_v4l2_control->id, p_v4l2_control->value); /* VIDIOC_QUERYCTRL */ ioctl(-1, VIDIOC_QUERYCTRL, 0); printf("ioctl(-1, VIDIOC_QUERYCTRL, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_QUERYCTRL, - page + size - sizeof(struct v4l2_queryctrl)); + struct v4l2_queryctrl *const p_v4l2_queryctrl = + page + size - sizeof(*p_v4l2_queryctrl); + ioctl(-1, VIDIOC_QUERYCTRL, p_v4l2_queryctrl); # ifdef V4L2_CTRL_FLAG_NEXT_CTRL printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=V4L2_CTRL_FLAG_NEXT_CTRL" "|%#x /* V4L2_CID_??? */}) = -1 EBADF (%m)\n", - magic & ~V4L2_CTRL_FLAG_NEXT_CTRL); + p_v4l2_queryctrl->id & ~V4L2_CTRL_FLAG_NEXT_CTRL); # else printf("ioctl(-1, VIDIOC_QUERYCTRL, {id=%#x /* V4L2_CID_??? */})" - " = -1 EBADF (%m)\n", magic); + " = -1 EBADF (%m)\n", p_v4l2_queryctrl->id); # endif struct v4l2_queryctrl *const p_queryctrl = @@ -351,33 +373,41 @@ main(void ) ioctl(-1, VIDIOC_S_INPUT, 0); printf("ioctl(-1, VIDIOC_S_INPUT, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_S_INPUT, page + size - sizeof(int)); - printf("ioctl(-1, VIDIOC_S_INPUT, [%u]) = -1 EBADF (%m)\n", magic); + ioctl(-1, VIDIOC_S_INPUT, p_int); + printf("ioctl(-1, VIDIOC_S_INPUT, [%u]) = -1 EBADF (%m)\n", *p_int); /* VIDIOC_CROPCAP */ ioctl(-1, VIDIOC_CROPCAP, 0); printf("ioctl(-1, VIDIOC_CROPCAP, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_CROPCAP, page + size - sizeof(struct v4l2_cropcap)); + struct v4l2_cropcap *const p_v4l2_cropcap = + page + size - sizeof(*p_v4l2_cropcap); + ioctl(-1, VIDIOC_CROPCAP, p_v4l2_cropcap); printf("ioctl(-1, VIDIOC_CROPCAP, {type=%#x /* V4L2_BUF_TYPE_??? */})" - " = -1 EBADF (%m)\n", magic); + " = -1 EBADF (%m)\n", p_v4l2_cropcap->type); /* VIDIOC_G_CROP */ ioctl(-1, VIDIOC_G_CROP, 0); printf("ioctl(-1, VIDIOC_G_CROP, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_G_CROP, page + size - sizeof(struct v4l2_crop)); + struct v4l2_crop *const p_v4l2_crop = + page + size - sizeof(*p_v4l2_crop); + ioctl(-1, VIDIOC_G_CROP, p_v4l2_crop); printf("ioctl(-1, VIDIOC_G_CROP, {type=%#x /* V4L2_BUF_TYPE_??? */})" - " = -1 EBADF (%m)\n", magic); + " = -1 EBADF (%m)\n", p_v4l2_crop->type); /* VIDIOC_S_CROP */ ioctl(-1, VIDIOC_S_CROP, 0); printf("ioctl(-1, VIDIOC_S_CROP, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_S_CROP, page + size - sizeof(struct v4l2_crop)); + ioctl(-1, VIDIOC_S_CROP, p_v4l2_crop); printf("ioctl(-1, VIDIOC_S_CROP, {type=%#x /* V4L2_BUF_TYPE_??? */" ", c={left=%d, top=%d, width=%u, height=%u}}) = -1 EBADF (%m)\n", - magic, magic, magic, magic, magic); + p_v4l2_crop->type, + p_v4l2_crop->c.left, + p_v4l2_crop->c.top, + p_v4l2_crop->c.width, + p_v4l2_crop->c.height); #ifdef VIDIOC_S_EXT_CTRLS /* VIDIOC_S_EXT_CTRLS */ @@ -406,7 +436,7 @@ main(void ) tail_alloc(sizeof(*p_ext_controls->controls) * p_ext_controls->count); p_ext_controls->controls[0].id = V4L2_CID_BRIGHTNESS; p_ext_controls->controls[0].size = 0; - p_ext_controls->controls[0].value64 = 0xfacefeeddeadbeef; + p_ext_controls->controls[0].value64 = 0xfacefeeddeadbeefULL; p_ext_controls->controls[1].id = V4L2_CID_CONTRAST; p_ext_controls->controls[1].size = 2; p_ext_controls->controls[1].string = @@ -473,48 +503,47 @@ main(void ) struct v4l2_frmsizeenum *const p_frmsizeenum = tail_alloc(sizeof(*p_frmsizeenum)); p_frmsizeenum->index = magic; - const union u_pixel_format u_frmsizeenum = { - .cc = { 'A', '\'', '\\', '\xfa' } - }; -#if WORDS_BIGENDIAN - p_frmsizeenum->pixel_format = - (unsigned) u_frmsizeenum.cc[0] << 24 | - (unsigned) u_frmsizeenum.cc[1] << 16 | - (unsigned) u_frmsizeenum.cc[2] << 8 | - (unsigned) u_frmsizeenum.cc[3]; -#else - p_frmsizeenum->pixel_format = u_frmsizeenum.pixelformat; -#endif + p_frmsizeenum->pixel_format = fourcc(cc[0], cc[1], cc[2], cc[3]); ioctl(-1, VIDIOC_ENUM_FRAMESIZES, p_frmsizeenum); printf("ioctl(-1, VIDIOC_ENUM_FRAMESIZES, {index=%u" ", pixel_format=v4l2_fourcc('%c', '\\%c', '\\%c', '\\x%x')})" " = -1 EBADF (%m)\n", p_frmsizeenum->index, - u_frmsizeenum.cc[0], u_frmsizeenum.cc[1], - u_frmsizeenum.cc[2], u_frmsizeenum.cc[3]); + cc[0], cc[1], cc[2], cc[3]); #endif /* VIDIOC_ENUM_FRAMESIZES */ #ifdef VIDIOC_ENUM_FRAMEINTERVALS ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, 0); printf("ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, page); + struct v4l2_frmivalenum *const p_v4l2_frmivalenum = + page + size - sizeof(*p_v4l2_frmivalenum); + ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, p_v4l2_frmivalenum); printf("ioctl(-1, VIDIOC_ENUM_FRAMEINTERVALS, {index=%u" ", pixel_format=v4l2_fourcc('\\x%x', '\\x%x', '\\x%x', '\\x%x')" ", width=%u, height=%u}) = -1 EBADF (%m)\n", - magic, u.cc[0], u.cc[1], u.cc[2], u.cc[3], magic, magic); + p_v4l2_frmivalenum->index, + cc0(p_v4l2_frmivalenum->pixel_format), + cc1(p_v4l2_frmivalenum->pixel_format), + cc2(p_v4l2_frmivalenum->pixel_format), + cc3(p_v4l2_frmivalenum->pixel_format), + p_v4l2_frmivalenum->width, + p_v4l2_frmivalenum->height); #endif /* VIDIOC_ENUM_FRAMEINTERVALS */ #ifdef VIDIOC_CREATE_BUFS ioctl(-1, VIDIOC_CREATE_BUFS, 0); printf("ioctl(-1, VIDIOC_CREATE_BUFS, NULL) = -1 EBADF (%m)\n"); - ioctl(-1, VIDIOC_CREATE_BUFS, - page + size - sizeof(struct v4l2_create_buffers)); + struct v4l2_create_buffers *const p_v4l2_create_buffers = + page + size - sizeof(*p_v4l2_create_buffers); + ioctl(-1, VIDIOC_CREATE_BUFS, p_v4l2_create_buffers); printf("ioctl(-1, VIDIOC_CREATE_BUFS, {count=%u, memory=%#x" " /* V4L2_MEMORY_??? */, format={type=%#x" " /* V4L2_BUF_TYPE_??? */}}) = -1 EBADF (%m)\n", - magic, magic, magic); + p_v4l2_create_buffers->count, + p_v4l2_create_buffers->memory, + p_v4l2_create_buffers->format.type); #endif /* VIDIOC_CREATE_BUFS */ puts("+++ exited with 0 +++"); diff --git a/tests/ioperm.c b/tests/ioperm.c index 12342f307..2f02b5234 100644 --- a/tests/ioperm.c +++ b/tests/ioperm.c @@ -9,7 +9,7 @@ int main(void) { - const unsigned long port = (unsigned long) 0xdeafbeefffffffff; + const unsigned long port = (unsigned long) 0xdeafbeefffffffffULL; long rc = syscall(__NR_ioperm, port, 1, 0); printf("ioperm(%#lx, %#lx, %d) = %ld %s (%m)\n", diff --git a/tests/ioprio.c b/tests/ioprio.c new file mode 100644 index 000000000..44ace6c3e --- /dev/null +++ b/tests/ioprio.c @@ -0,0 +1,102 @@ +/* + * Check decoding of ioprio_get and ioprio_set syscalls. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined(__NR_ioprio_get) && defined(__NR_ioprio_set) + +# include +# include + +enum { + IOPRIO_CLASS_NONE, + IOPRIO_CLASS_RT, + IOPRIO_CLASS_BE, + IOPRIO_CLASS_IDLE +}; + +# include "xlat.h" +# include "xlat/ioprio_class.h" + +void +print_ioprio(unsigned long val) +{ + printf(" (IOPRIO_PRIO_VALUE("); + printxval(ioprio_class, val >> 13, "IOPRIO_CLASS_???"); + printf(", %d))", (int) (val & 0x1fff)); +} + +int +main(void) +{ + static const kernel_ulong_t bogus_which = + (kernel_ulong_t) 0xdeadfacefa57beefULL; + static const kernel_ulong_t bogus_who = + (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + static const kernel_ulong_t bogus_ioprio = + (kernel_ulong_t) 0xdec0ded1facefeedULL; + static const char * const bogus_ioprio_str = + "IOPRIO_PRIO_VALUE(0x7d677 /* IOPRIO_CLASS_??? */, 7917)"; + + long rc; + + rc = syscall(__NR_ioprio_get, bogus_which, bogus_who); + printf("ioprio_get(%#x /* IOPRIO_WHO_??? */, %d) = %s\n", + (int) bogus_which, (int) bogus_who, sprintrc(rc)); + + rc = syscall(__NR_ioprio_get, 1, 0); + printf("ioprio_get(IOPRIO_WHO_PROCESS, 0) = %s", sprintrc(rc)); + + if (rc >= -1) + print_ioprio(rc); + + puts(""); + + rc = syscall(__NR_ioprio_set, 2, 0, 8191); + printf("ioprio_set(IOPRIO_WHO_PGRP, 0, " + "IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 8191)) = %s\n", + sprintrc(rc)); + + rc = syscall(__NR_ioprio_set, bogus_which, bogus_who, bogus_ioprio); + printf("ioprio_set(%#x /* IOPRIO_WHO_??? */, %d, %s) = %s\n", + (int) bogus_which, (int) bogus_who, bogus_ioprio_str, + sprintrc(rc)); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ioprio_get && __NR_ioprio_set"); + +#endif diff --git a/tests/ioprio.test b/tests/ioprio.test new file mode 100755 index 000000000..e79310b3a --- /dev/null +++ b/tests/ioprio.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check iprio_get and iprio_set syscalls decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a18 -e trace=ioprio_get,ioprio_set diff --git a/tests/ip_mreq.c b/tests/ip_mreq.c index 86cd2bc36..fa0c504b4 100644 --- a/tests/ip_mreq.c +++ b/tests/ip_mreq.c @@ -31,7 +31,6 @@ #if defined IP_ADD_MEMBERSHIP && defined IPV6_ADD_MEMBERSHIP \ && defined IPV6_JOIN_ANYCAST && defined HAVE_IF_INDEXTONAME -# include # include # include # include @@ -45,85 +44,106 @@ main(void) static const char multi6addr[] = "ff01::c"; static const char interface[] = "127.0.0.1"; - struct ip_mreq m4; - struct ipv6_mreq m6; + struct ip_mreq *const m4 = tail_alloc(sizeof(*m4)); + struct ipv6_mreq *const m6 = tail_alloc(sizeof(*m6)); + unsigned int i; + int rc; - inet_pton(AF_INET, multi4addr, &m4.imr_multiaddr); - inet_pton(AF_INET, interface, &m4.imr_interface); - inet_pton(AF_INET6, multi6addr, &m6.ipv6mr_multiaddr); + inet_pton(AF_INET, multi4addr, &m4->imr_multiaddr); + inet_pton(AF_INET, interface, &m4->imr_interface); + inet_pton(AF_INET6, multi6addr, &m6->ipv6mr_multiaddr); - m6.ipv6mr_interface = if_nametoindex("lo"); - if (!m6.ipv6mr_interface) + m6->ipv6mr_interface = if_nametoindex("lo"); + if (!m6->ipv6mr_interface) perror_msg_and_skip("lo"); (void) close(0); if (socket(AF_INET, SOCK_DGRAM, 0)) perror_msg_and_skip("socket"); - if (setsockopt(0, SOL_IP, IP_ADD_MEMBERSHIP, &m4, sizeof(m4)) || - setsockopt(0, SOL_IP, IP_DROP_MEMBERSHIP, &m4, sizeof(m4))) - perror_msg_and_skip("setsockopt"); - printf("setsockopt(0, SOL_IP, IP_ADD_MEMBERSHIP" - ", {imr_multiaddr=inet_addr(\"%s\")" - ", imr_interface=inet_addr(\"%s\")}, %u) = 0\n", - multi4addr, interface, (unsigned) sizeof(m4)); - printf("setsockopt(0, SOL_IP, IP_DROP_MEMBERSHIP" - ", {imr_multiaddr=inet_addr(\"%s\")" - ", imr_interface=inet_addr(\"%s\")}, %u) = 0\n", - multi4addr, interface, (unsigned) sizeof(m4)); - - assert(setsockopt(0, SOL_IP, IP_ADD_MEMBERSHIP, &m4, 1) == -1); - printf("setsockopt(0, SOL_IP, IP_ADD_MEMBERSHIP, \"\\%hho\", 1)" - " = -1 %s (%m)\n", - * (unsigned char *) (void *) &m4, errno2name()); - - assert(setsockopt(0, SOL_IP, IP_DROP_MEMBERSHIP, &m4, 1) == -1); - printf("setsockopt(0, SOL_IP, IP_DROP_MEMBERSHIP, \"\\%hho\", 1)" - " = -1 %s (%m)\n", - * (unsigned char *) (void *) &m4, errno2name()); - - assert(setsockopt(0, SOL_IPV6, IPV6_ADD_MEMBERSHIP, &m6, 1) == -1); - printf("setsockopt(0, SOL_IPV6, IPV6_ADD_MEMBERSHIP, \"\\%hho\", 1)" - " = -1 %s (%m)\n", - * (unsigned char *) (void *) &m6, errno2name()); - assert(setsockopt(0, SOL_IPV6, IPV6_DROP_MEMBERSHIP, &m6, 1) == -1); - printf("setsockopt(0, SOL_IPV6, IPV6_DROP_MEMBERSHIP, \"\\%hho\", 1)" - " = -1 %s (%m)\n", - * (unsigned char *) (void *) &m6, errno2name()); - - assert(setsockopt(0, SOL_IPV6, IPV6_ADD_MEMBERSHIP, &m6, sizeof(m6)) == -1); - printf("setsockopt(0, SOL_IPV6, IPV6_ADD_MEMBERSHIP" - ", {ipv6mr_multiaddr=inet_pton(\"%s\")" - ", ipv6mr_interface=if_nametoindex(\"lo\")}, 20) = -1 %s (%m)\n", - multi6addr, errno2name()); - - assert(setsockopt(0, SOL_IPV6, IPV6_DROP_MEMBERSHIP, &m6, sizeof(m6)) == -1); - printf("setsockopt(0, SOL_IPV6, IPV6_DROP_MEMBERSHIP" - ", {ipv6mr_multiaddr=inet_pton(\"%s\")" - ", ipv6mr_interface=if_nametoindex(\"lo\")}, 20) = -1 %s (%m)\n", - multi6addr, errno2name()); - - assert(setsockopt(0, SOL_IPV6, IPV6_JOIN_ANYCAST, &m6, 1) == -1); - printf("setsockopt(0, SOL_IPV6, IPV6_JOIN_ANYCAST, \"\\%hho\", 1)" - " = -1 %s (%m)\n", - * (unsigned char *) (void *) &m6, errno2name()); - - assert(setsockopt(0, SOL_IPV6, IPV6_LEAVE_ANYCAST, &m6, 1) == -1); - printf("setsockopt(0, SOL_IPV6, IPV6_LEAVE_ANYCAST, \"\\%hho\", 1)" - " = -1 %s (%m)\n", - * (unsigned char *) (void *) &m6, errno2name()); - - assert(setsockopt(0, SOL_IPV6, IPV6_JOIN_ANYCAST, &m6, sizeof(m6)) == -1); - printf("setsockopt(0, SOL_IPV6, IPV6_JOIN_ANYCAST" - ", {ipv6mr_multiaddr=inet_pton(\"%s\")" - ", ipv6mr_interface=if_nametoindex(\"lo\")}, 20) = -1 %s (%m)\n", - multi6addr, errno2name()); - - assert(setsockopt(0, SOL_IPV6, IPV6_LEAVE_ANYCAST, &m6, sizeof(m6)) == -1); - printf("setsockopt(0, SOL_IPV6, IPV6_LEAVE_ANYCAST" - ", {ipv6mr_multiaddr=inet_pton(\"%s\")" - ", ipv6mr_interface=if_nametoindex(\"lo\")}, 20) = -1 %s (%m)\n", - multi6addr, errno2name()); + struct { + int level; + const char *str_level; + int optname; + const char *str_optname; + void *optval; + unsigned int optsize; + } short_any[] = { + { + ARG_STR(SOL_IP), ARG_STR(IP_ADD_MEMBERSHIP), + m4, sizeof(*m4) + }, + { + ARG_STR(SOL_IP), ARG_STR(IP_DROP_MEMBERSHIP), + m4, sizeof(*m4) + }, + { + ARG_STR(SOL_IPV6), ARG_STR(IPV6_ADD_MEMBERSHIP), + m6, sizeof(*m6) + }, + { + ARG_STR(SOL_IPV6), ARG_STR(IPV6_DROP_MEMBERSHIP), + m6, sizeof(*m6) + }, + { + ARG_STR(SOL_IPV6), ARG_STR(IPV6_JOIN_ANYCAST), + m6, sizeof(*m6) + }, + { + ARG_STR(SOL_IPV6), ARG_STR(IPV6_LEAVE_ANYCAST), + m6, sizeof(*m6) + } + }; + + for (i = 0; i < ARRAY_SIZE(short_any); ++i) { + rc = setsockopt(0, short_any[i].level, short_any[i].optname, + short_any[i].optval, 1); + printf("setsockopt(0, %s, %s, \"\\%hho\", 1) = %s\n", + short_any[i].str_level, short_any[i].str_optname, + * (unsigned char *) short_any[i].optval, + sprintrc(rc)); + + rc = setsockopt(0, short_any[i].level, short_any[i].optname, + short_any[i].optval + 1, short_any[i].optsize); + printf("setsockopt(0, %s, %s, %p, %u) = %s\n", + short_any[i].str_level, short_any[i].str_optname, + short_any[i].optval + 1, short_any[i].optsize, + sprintrc(rc)); + } + + struct { + int optname; + const char *str_optname; + } long_ip[] = { + { ARG_STR(IP_ADD_MEMBERSHIP) }, + { ARG_STR(IP_DROP_MEMBERSHIP) } + }, long_ipv6[] = { + { ARG_STR(IPV6_ADD_MEMBERSHIP) }, + { ARG_STR(IPV6_DROP_MEMBERSHIP) }, + { ARG_STR(IPV6_JOIN_ANYCAST) }, + { ARG_STR(IPV6_LEAVE_ANYCAST) } + }; + + for (i = 0; i < ARRAY_SIZE(long_ip); ++i) { + rc = setsockopt(0, SOL_IP, long_ip[i].optname, + m4, sizeof(*m4)); + printf("setsockopt(0, SOL_IP, %s" + ", {imr_multiaddr=inet_addr(\"%s\")" + ", imr_interface=inet_addr(\"%s\")}, %u) = %s\n", + long_ip[i].str_optname, multi4addr, + interface, (unsigned) sizeof(*m4), sprintrc(rc)); + } + + for (i = 0; i < ARRAY_SIZE(long_ipv6); ++i) { + rc = setsockopt(0, SOL_IPV6, long_ipv6[i].optname, + m6, sizeof(*m6)); + printf("setsockopt(0, SOL_IPV6, %s" + ", {ipv6mr_multiaddr=inet_pton(\"%s\")" + ", ipv6mr_interface=if_nametoindex(\"lo\")}" + ", %u) = %s\n", + long_ipv6[i].str_optname, multi6addr, + (unsigned) sizeof(*m6), sprintrc(rc)); + } puts("+++ exited with 0 +++"); return 0; diff --git a/tests/ipc.c b/tests/ipc.c index f5b9ef5f7..c64d3716a 100644 --- a/tests/ipc.c +++ b/tests/ipc.c @@ -49,7 +49,7 @@ ipc_call(const unsigned short version, const unsigned short call, long a1, long a2, long a3, long a4, long a5) { const unsigned long val = - (unsigned long) 0xfacefeed00000000 | + (unsigned long) 0xfacefeed00000000ULL | (unsigned int) version << 16 | call; diff --git a/tests/ipc_msgbuf.c b/tests/ipc_msgbuf.c index 2c90d2688..1c34494d8 100644 --- a/tests/ipc_msgbuf.c +++ b/tests/ipc_msgbuf.c @@ -31,7 +31,6 @@ #include #include #include -#include "kernel_types.h" #define text_string "STRACE_STRING" #define msgsz sizeof(text_string) diff --git a/tests/ipc_sem.c b/tests/ipc_sem.c index 926fa898d..8f6382ccb 100644 --- a/tests/ipc_sem.c +++ b/tests/ipc_sem.c @@ -49,7 +49,8 @@ static void cleanup(void) { semctl(id, 0, IPC_RMID, 0); - printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_RMID, \\[?0\\]?\\) += 0\n", id); + printf("semctl\\(%d, 0, (IPC_64\\|)?IPC_RMID, \\[?NULL\\]?\\) += 0\n", + id); id = -1; } @@ -88,11 +89,7 @@ main(void) atexit(cleanup); rc = semctl(bogus_semid, bogus_semnum, bogus_cmd, bogus_arg); -#ifdef __GLIBC__ -# define SEMCTL_BOGUS_ARG_FMT "(%#lx|\\[(%#lx|0)\\])" -#else -# define SEMCTL_BOGUS_ARG_FMT "(%#lx|\\[(%#lx|0)\\]|0)" -#endif +#define SEMCTL_BOGUS_ARG_FMT "(%#lx|\\[(%#lx|NULL)\\]|NULL)" printf("semctl\\(%d, %d, (IPC_64\\|)?%#x /\\* SEM_\\?\\?\\? \\*/" ", " SEMCTL_BOGUS_ARG_FMT "\\) += %s\n", bogus_semid, bogus_semnum, bogus_cmd, diff --git a/tests/kcmp.c b/tests/kcmp.c new file mode 100644 index 000000000..cb497c9f2 --- /dev/null +++ b/tests/kcmp.c @@ -0,0 +1,103 @@ +/* + * Check decoding of kcmp syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include "scno.h" + +#ifdef __NR_kcmp + +# include +# include + +# define KCMP_FILE 0 +# define KCMP_SYSVSEM 6 + +static void +do_kcmp(kernel_ulong_t pid1, kernel_ulong_t pid2, kernel_ulong_t type, + const char *type_str, kernel_ulong_t idx1, kernel_ulong_t idx2) +{ + long rc; + const char *errstr; + + rc = syscall(__NR_kcmp, pid1, pid2, type, idx1, idx2); + errstr = sprintrc(rc); + + printf("kcmp(%d, %d, ", (int) pid1, (int) pid2); + + if (type_str) + printf("%s", type_str); + else + printf("%#x /* KCMP_??? */", (int) type); + + if (type == KCMP_FILE) + printf(", %u, %u", (unsigned) idx1, (unsigned) idx2); + else if (type > KCMP_SYSVSEM) + printf(", %#llx, %#llx", + (unsigned long long) idx1, (unsigned long long) idx2); + + printf(") = %s\n", errstr); +} + +int +main(void) +{ + static const kernel_ulong_t bogus_pid1 = + (kernel_ulong_t) 0xdeadca75face1057ULL; + static const kernel_ulong_t bogus_pid2 = + (kernel_ulong_t) 0xdefaced1defaced2ULL; + static const kernel_ulong_t bogus_type = + (kernel_ulong_t) 0xbadc0dedda7adeadULL; + static const kernel_ulong_t bogus_idx1 = + (kernel_ulong_t) 0xdec0ded3dec0ded4ULL; + static const kernel_ulong_t bogus_idx2 = + (kernel_ulong_t) 0xba5e1e55deadc0deULL; + + /* Invalid values */ + do_kcmp(bogus_pid1, bogus_pid2, bogus_type, NULL, bogus_idx1, + bogus_idx2); + do_kcmp(0, 0, KCMP_SYSVSEM + 1, NULL, 0, 0); + + /* KCMP_FILE is the only type which has additional args */ + do_kcmp(3141592653U, 2718281828U, ARG_STR(KCMP_FILE), bogus_idx1, + bogus_idx2); + /* Some type without additional args */ + do_kcmp(-1, -1, ARG_STR(KCMP_SYSVSEM), bogus_idx1, bogus_idx2); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kcmp"); + +#endif diff --git a/tests/kcmp.test b/tests/kcmp.test new file mode 100755 index 000000000..d022aeba0 --- /dev/null +++ b/tests/kcmp.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kcmp syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests/kexec_file_load.c b/tests/kexec_file_load.c new file mode 100644 index 000000000..be90a37d8 --- /dev/null +++ b/tests/kexec_file_load.c @@ -0,0 +1,127 @@ +/* + * Check decoding of kexec_file_load syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_kexec_file_load + +# include +# include +# include + +struct strval { + kernel_ulong_t val; + const char *str64; + const char *str32; + const char *str; +}; + +#define CMDLINE_STR "deadcodebaddatadefaced"; + +int +main(void) +{ + static const kernel_ulong_t bogus_kernel_fd = + (kernel_ulong_t) 0xdeadca57badda7a1ULL; + static const kernel_ulong_t bogus_initrd_fd = + (kernel_ulong_t) 0xdec0ded1defaced2ULL; + static const char cmdline_str[] = CMDLINE_STR; + static const char cmdline_short_str[] = "abcdef"; + + static const kernel_ulong_t cmdline_lens[] = { + 0, + (kernel_ulong_t) 0xcaffeeeddeadbeefULL, + sizeof(cmdline_str), + sizeof(cmdline_str) - 1, + sizeof(cmdline_short_str), + sizeof(cmdline_short_str) - 1, + sizeof(cmdline_short_str) + 1, + }; + static const struct strval flags[] = { + { (kernel_ulong_t) 0xbadc0dedda7a1058ULL, + "0xbadc0ded", "0x", + "da7a1058 /* KEXEC_FILE_??? */" }, + { 0, "", "", "0" }, + { 0xdeadbeef, "", "", "KEXEC_FILE_UNLOAD|KEXEC_FILE_ON_CRASH|" + "KEXEC_FILE_NO_INITRAMFS|0xdeadbee8" }, + }; + + + long rc; + char *cmdline = tail_memdup(cmdline_str, sizeof(cmdline_str)); + char *cmdline_short = + tail_memdup(cmdline_short_str, sizeof(cmdline_short_str)); + char cmdline_ptr[sizeof("0x") + sizeof(void *) * 2]; + char cmdline_short_ptr[sizeof("0x") + sizeof(void *) * 2]; + unsigned int i; + unsigned int j; + + struct strval cmdlines[] = { + { (uintptr_t) NULL, "", "", "NULL" }, + { (uintptr_t) (cmdline + sizeof(cmdline_str)), "", "", + cmdline_ptr }, + { (uintptr_t) cmdline, "", "", "\"deadcodeb\"..." }, + { (uintptr_t) cmdline, "", "", "\"deadcodeb\"..." }, + { (uintptr_t) cmdline_short, "", "", "\"abcdef\\0\"" }, + { (uintptr_t) cmdline_short, "", "", "\"abcdef\"" }, + { (uintptr_t) cmdline_short, "", "", cmdline_short_ptr }, + }; + + + snprintf(cmdline_ptr, sizeof(cmdline_ptr), "%p", + cmdline + sizeof(cmdline_str)); + snprintf(cmdline_short_ptr, sizeof(cmdline_short_ptr), "%p", + cmdline_short); + + for (i = 0; i < ARRAY_SIZE(flags); i++) { + for (j = 0; j < ARRAY_SIZE(cmdlines); j++) { + rc = syscall(__NR_kexec_file_load, bogus_kernel_fd, + bogus_initrd_fd, cmdline_lens[j], + cmdlines[j].val, flags[i].val); + printf("kexec_file_load(%d, %d, %llu, %s, %s%s) = %s\n", + (int) bogus_kernel_fd, (int) bogus_initrd_fd, + (unsigned long long) cmdline_lens[j], + cmdlines[j].str, + sizeof(kernel_ulong_t) == 8 ? flags[i].str64 : + flags[i].str32, flags[i].str, sprintrc(rc)); + } + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kexec_file_load"); + +#endif diff --git a/tests/kexec_file_load.test b/tests/kexec_file_load.test new file mode 100755 index 000000000..c95e12382 --- /dev/null +++ b/tests/kexec_file_load.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kexec_file_load syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s9 diff --git a/tests/kexec_load.c b/tests/kexec_load.c new file mode 100644 index 000000000..330238de0 --- /dev/null +++ b/tests/kexec_load.c @@ -0,0 +1,170 @@ +/* + * Check decoding of kexec_load syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_kexec_load + +# include +# include + +struct strval { + kernel_ulong_t val; + const char *str64; + const char *str32; + const char *str; +}; + +struct segm { + void *buf; + size_t bufsz; + void *mem; + size_t memsz; +}; + +int +main(void) +{ + enum { + NUM_SEGMS = 17, + NUM_SEGMS_UNCUT = 5, + NUM_SEGMS_UNCUT_MAX = 9, + NUM_SEGMS_CUT = 12, + SEGMS_ARRAY_SIZE = sizeof(struct segm) * NUM_SEGMS, + }; + + static const kernel_ulong_t bogus_zero = + sizeof(long) < sizeof(kernel_long_t) ? + (kernel_ulong_t) 0xffffffff00000000ULL : 0; + static const kernel_ulong_t bogus_entry = + (kernel_ulong_t) 0xdeadca57badda7a1ULL; + static const kernel_ulong_t bogus_nsegs = + (kernel_ulong_t) 0xdec0ded1defaced2ULL; + + static const struct strval flags[] = { + { (kernel_ulong_t) 0xbadc0dedda7a1054ULL, + "0xda7a0000 /* KEXEC_ARCH_??? */|0xbadc0ded0000", + "0xda7a0000 /* KEXEC_ARCH_??? */|0x", + "1054 /* KEXEC_??? */" }, + { 0, "", "", "KEXEC_ARCH_DEFAULT" }, + { 0x2a0003, "", "", + "KEXEC_ARCH_SH|KEXEC_ON_CRASH|KEXEC_PRESERVE_CONTEXT" }, + { 0xdead0000, "", "", "0xdead0000 /* KEXEC_ARCH_??? */" }, + }; + + const char *errstr; + long rc; + struct segm *segms = tail_alloc(SEGMS_ARRAY_SIZE); + unsigned int i; + + fill_memory(segms, SEGMS_ARRAY_SIZE); + segms[0].buf = segms[0].mem = NULL; + + rc = syscall(__NR_kexec_load, bogus_zero, bogus_zero, bogus_zero, + flags[0].val); + printf("kexec_load(NULL, 0, NULL, %s%s) = %s\n", + sizeof(long) == 8 ? flags[0].str64 : flags[0].str32, + flags[0].str, sprintrc(rc)); + + rc = syscall(__NR_kexec_load, bogus_entry, bogus_nsegs, + segms + SEGMS_ARRAY_SIZE, flags[1].val); + printf("kexec_load(%#lx, %lu, %p, %s) = %s\n", + (unsigned long) bogus_entry, (unsigned long) bogus_nsegs, + segms + SEGMS_ARRAY_SIZE, flags[1].str, sprintrc(rc)); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS, + segms, flags[2].val); + printf("kexec_load(%#lx, %lu, %p, %s) = %s\n", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS, + segms, flags[2].str, sprintrc(rc)); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS_CUT, + segms, flags[3].val); + errstr = sprintrc(rc); + printf("kexec_load(%#lx, %lu, [{buf=NULL, bufsz=%zu, mem=NULL, " + "memsz=%zu}, ", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS_CUT, + segms[0].bufsz, segms[0].memsz); + for (i = 1; i < NUM_SEGMS_UNCUT_MAX; i++) + printf("{buf=%p, bufsz=%zu, mem=%p, memsz=%zu}, ", + segms[i].buf, segms[i].bufsz, + segms[i].mem, segms[i].memsz); + printf("...], %s) = %s\n", flags[3].str, errstr); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS_CUT, + segms + (NUM_SEGMS - NUM_SEGMS_UNCUT_MAX), + flags[0].val); + errstr = sprintrc(rc); + printf("kexec_load(%#lx, %lu, [", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS_CUT); + for (i = NUM_SEGMS - NUM_SEGMS_UNCUT_MAX; i < NUM_SEGMS; i++) + printf("{buf=%p, bufsz=%zu, mem=%p, memsz=%zu}, ", + segms[i].buf, segms[i].bufsz, + segms[i].mem, segms[i].memsz); + printf("%p], %s%s) = %s\n", + segms + NUM_SEGMS, + sizeof(long) == 8 ? flags[0].str64 : flags[0].str32, + flags[0].str, errstr); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS_UNCUT, + segms + (NUM_SEGMS - NUM_SEGMS_UNCUT), + flags[1].val); + errstr = sprintrc(rc); + printf("kexec_load(%#lx, %lu, [", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS_UNCUT); + for (i = NUM_SEGMS - NUM_SEGMS_UNCUT; i < NUM_SEGMS; i++) + printf("{buf=%p, bufsz=%zu, mem=%p, memsz=%zu}%s", + segms[i].buf, segms[i].bufsz, + segms[i].mem, segms[i].memsz, + (i == NUM_SEGMS - 1) ? "" : ", "); + printf("], %s) = %s\n", flags[1].str, errstr); + + rc = syscall(__NR_kexec_load, bogus_entry, NUM_SEGMS_CUT, + segms + 1, flags[2].val); + errstr = sprintrc(rc); + printf("kexec_load(%#lx, %lu, [", + (unsigned long) bogus_entry, (unsigned long) NUM_SEGMS_CUT); + for (i = 1; i < NUM_SEGMS_UNCUT_MAX + 1; i++) + printf("{buf=%p, bufsz=%zu, mem=%p, memsz=%zu}, ", + segms[i].buf, segms[i].bufsz, + segms[i].mem, segms[i].memsz); + printf("...], %s) = %s\n", flags[2].str, errstr); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_kexec_load"); + +#endif diff --git a/tests/kexec_load.test b/tests/kexec_load.test new file mode 100755 index 000000000..4b1511e90 --- /dev/null +++ b/tests/kexec_load.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of kexec_load syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s9 diff --git a/tests/keyctl.c b/tests/keyctl.c index b5809810d..2e26076b1 100644 --- a/tests/keyctl.c +++ b/tests/keyctl.c @@ -1,7 +1,7 @@ /* * Check decoding of keyctl syscall. * - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -44,11 +44,8 @@ # include # include # include - # include -# include "kernel_types.h" - /* This check should be before #include "xlat/keyctl_commands.h" */ # ifndef KEYCTL_DH_COMPUTE struct keyctl_dh_params { @@ -128,7 +125,8 @@ print_arg(kernel_ulong_t arg, const char *str, const char *fmt, size_t size, else if (size == sizeof(uint32_t)) printf(fmt, (uint32_t)arg); else - print_quoted_string_limit((void *)arg, size, rc); + print_quoted_string_limit((void *) (uintptr_t) arg, + size, rc); } } @@ -190,8 +188,6 @@ do_keyctl(kernel_ulong_t cmd, const char *cmd_str, ...) printf(") = %s\n", errstr); } -# define ARG_STR(_arg) (_arg), #_arg - int main(void) { diff --git a/tests/kill.c b/tests/kill.c index 0e07e1f52..cb884aa1a 100644 --- a/tests/kill.c +++ b/tests/kill.c @@ -56,16 +56,16 @@ main(void) perror_msg_and_fail("sigprocmask"); const int pid = getpid(); - long rc = syscall(__NR_kill, pid, (long) 0xdefaced00000000 | SIGALRM); + long rc = syscall(__NR_kill, pid, (long) 0xdefaced00000000ULL | SIGALRM); printf("kill(%d, SIGALRM) = %ld\n", pid, rc); - const long big_pid = (long) 0xfacefeedbadc0ded; - const long big_sig = (long) 0xdeadbeefcafef00d; + const long big_pid = (long) 0xfacefeedbadc0dedULL; + const long big_sig = (long) 0xdeadbeefcafef00dULL; rc = syscall(__NR_kill, big_pid, big_sig); printf("kill(%d, %d) = %ld %s (%m)\n", (int) big_pid, (int) big_sig, rc, errno2name()); - rc = syscall(__NR_kill, (long) 0xdefaced00000000 | pid, 0); + rc = syscall(__NR_kill, (long) 0xdefaced00000000ULL | pid, 0); printf("kill(%d, SIG_0) = %ld\n", pid, rc); puts("+++ exited with 0 +++"); diff --git a/tests/ksysent.c b/tests/ksysent.c index 66b4ffb41..8cac93ca5 100644 --- a/tests/ksysent.c +++ b/tests/ksysent.c @@ -1,5 +1,7 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Validate syscallent.h file. + * + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,8 +27,11 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "defs.h" -#include "syscall.h" +#include "tests.h" +#include "sysent.h" +#include +#include +#include #define TD 0 #define TF 0 @@ -39,6 +44,7 @@ #define MA 0 #define SI 0 #define SE 0 +#define CST 0 #define SEN(arg) 0,0 static const struct_sysent syscallent[] = { diff --git a/tests/linkat.c b/tests/linkat.c index 2c3b8baa1..64b900ea0 100644 --- a/tests/linkat.c +++ b/tests/linkat.c @@ -11,8 +11,8 @@ main(void) { static const char sample_1[] = "linkat_sample_old"; static const char sample_2[] = "linkat_sample_new"; - const long fd_old = (long) 0xdeadbeefffffffff; - const long fd_new = (long) 0xdeadbeeffffffffe; + const long fd_old = (long) 0xdeadbeefffffffffULL; + const long fd_new = (long) 0xdeadbeeffffffffeULL; long rc = syscall(__NR_linkat, fd_old, sample_1, fd_new, sample_2, 0); printf("linkat(%d, \"%s\", %d, \"%s\", 0) = %ld %s (%m)\n", diff --git a/tests/lookup_dcookie.c b/tests/lookup_dcookie.c new file mode 100644 index 000000000..986180ce3 --- /dev/null +++ b/tests/lookup_dcookie.c @@ -0,0 +1,96 @@ +/* + * Check decoding of lookup_dcookie syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_lookup_dcookie + +# include +# include +# include +# include + +static void +do_lookup_cookie(uint64_t cookie, char *buf, kernel_ulong_t len) +{ + long rc; + const char *errstr; + +# if (LONG_MAX > INT_MAX) \ + || (defined __x86_64__ && defined __ILP32__) \ + || defined LINUX_MIPSN32 + rc = syscall(__NR_lookup_dcookie, cookie, buf, len); +# else + rc = syscall(__NR_lookup_dcookie, LL_VAL_TO_PAIR(cookie), buf, len); +# endif + + errstr = sprintrc(rc); + printf("lookup_dcookie(%" PRIu64 ", ", cookie); + + /* Here, we trust successful return code */ + if ((rc >= 0) && (rc < (long) INT_MAX)) { + printf("%.*s, ", (int) rc, buf); + } else { + if (buf != NULL) + printf("%p, ", buf); + else + printf("NULL, "); + } + + printf("%" PRIu64 ") = %s\n", (uint64_t) len, errstr); +} + +int +main(void) +{ + enum { BUF_SIZE = 4096 }; + + static const uint64_t bogus_cookie = + (uint64_t) 0xf157feeddeadfaceULL; + static const kernel_ulong_t bogus_len = + (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + + char *buf = tail_alloc(BUF_SIZE); + + do_lookup_cookie(0, NULL, 0); + do_lookup_cookie(bogus_cookie, buf + BUF_SIZE, bogus_len); + do_lookup_cookie(bogus_cookie, buf, BUF_SIZE); + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_lookup_dcookie"); + +#endif diff --git a/tests/lookup_dcookie.test b/tests/lookup_dcookie.test new file mode 100755 index 000000000..47e1c2d61 --- /dev/null +++ b/tests/lookup_dcookie.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of lookup_cookie syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a27 diff --git a/tests/lseek.c b/tests/lseek.c index 84b27529a..4428c4e91 100644 --- a/tests/lseek.c +++ b/tests/lseek.c @@ -32,7 +32,6 @@ # include # include -# include "kernel_types.h" int main(void) diff --git a/tests/lstat.c b/tests/lstat.c index 76cb8a2f8..3754f766c 100644 --- a/tests/lstat.c +++ b/tests/lstat.c @@ -32,7 +32,7 @@ # define TEST_SYSCALL_NR __NR_lstat # define TEST_SYSCALL_STR "lstat" -# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418) +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 43147718418ULL) # include "lstatx.c" #else diff --git a/tests/lstat64.c b/tests/lstat64.c index 68ef638be..da06609dd 100644 --- a/tests/lstat64.c +++ b/tests/lstat64.c @@ -35,7 +35,6 @@ # define STRUCT_STAT struct stat64 # define STRUCT_STAT_STR "struct stat64" # define STRUCT_STAT_IS_STAT64 1 -# define SAMPLE_SIZE ((libc_off_t) 43147718418) # include "lstatx.c" #else diff --git a/tests/lstatx.c b/tests/lstatx.c index 2bd4e9f5d..cdd1124b6 100644 --- a/tests/lstatx.c +++ b/tests/lstatx.c @@ -28,10 +28,12 @@ #define TEST_SYSCALL_INVOKE(sample, pst) \ syscall(TEST_SYSCALL_NR, sample, pst) #define PRINT_SYSCALL_HEADER(sample) \ - printf("%s(\"%s\", ", TEST_SYSCALL_STR, sample) -#define PRINT_SYSCALL_FOOTER \ - puts(") = 0") - -#define USE_ASM_STAT + do { \ + int saved_errno = errno; \ + printf("%s(\"%s\", ", TEST_SYSCALL_STR, sample) +#define PRINT_SYSCALL_FOOTER(rc) \ + errno = saved_errno; \ + printf(") = %s\n", sprintrc(rc)); \ + } while (0) #include "xstatx.c" diff --git a/tests/mbind.c b/tests/mbind.c index 94d455392..b0544263d 100644 --- a/tests/mbind.c +++ b/tests/mbind.c @@ -38,10 +38,10 @@ int main(void) { - const unsigned long len = (unsigned long) 0xcafef00dbadc0ded; + const unsigned long len = (unsigned long) 0xcafef00dbadc0dedULL; const unsigned long mode = 3; - const unsigned long nodemask = (unsigned long) 0xfacefeedfffffff1; - const unsigned long maxnode = (unsigned long) 0xdeadbeeffffffff2; + const unsigned long nodemask = (unsigned long) 0xfacefeedfffffff1ULL; + const unsigned long maxnode = (unsigned long) 0xdeadbeeffffffff2ULL; const unsigned long flags = -1UL; long rc = syscall(__NR_mbind, 0, len, mode, nodemask, maxnode, flags); diff --git a/tests/membarrier.c b/tests/membarrier.c index adf24efdc..330893b6c 100644 --- a/tests/membarrier.c +++ b/tests/membarrier.c @@ -27,6 +27,7 @@ #include "tests.h" #include +#include "scno.h" #ifdef __NR_membarrier @@ -39,9 +40,10 @@ int main(void) { assert(syscall(__NR_membarrier, 3, 255) == -1); - printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = -1 %s (%m)\n", - errno2name()); - if (errno != ENOSYS) { + int saved_errno = errno; + printf("membarrier(0x3 /* MEMBARRIER_CMD_??? */, 255) = %s\n", + sprintrc(-1)); + if (saved_errno != ENOSYS) { /* the test needs to be updated? */ assert(syscall(__NR_membarrier, 0, 0) == 1); puts("membarrier(MEMBARRIER_CMD_QUERY, 0)" diff --git a/tests/memfd_create.c b/tests/memfd_create.c index ef49bed15..480fd1771 100644 --- a/tests/memfd_create.c +++ b/tests/memfd_create.c @@ -1,5 +1,6 @@ #include "tests.h" #include +#include "scno.h" #ifdef __NR_memfd_create diff --git a/tests/migrate_pages.c b/tests/migrate_pages.c index 9f71b52c6..4c303e380 100644 --- a/tests/migrate_pages.c +++ b/tests/migrate_pages.c @@ -38,7 +38,7 @@ int main(void) { - const long pid = (long) 0xfacefeedffffffff; + const long pid = (long) 0xfacefeedffffffffULL; long rc = syscall(__NR_migrate_pages, pid, 0, 0, 0); printf("migrate_pages(%d, 0, NULL, NULL) = %ld %s (%m)\n", (int) pid, rc, errno2name()); diff --git a/tests/mincore.c b/tests/mincore.c index ff2922a24..ea2b49e38 100644 --- a/tests/mincore.c +++ b/tests/mincore.c @@ -42,6 +42,8 @@ print_mincore(const unsigned int pages, void *const addr, printf("mincore(%p, %zu, [", addr, size); for (i = 0; i < pages; ++i) { + if (i) + printf(", "); if (i >= DEFAULT_STRLEN) { printf("..."); break; diff --git a/tests/mkdirat.c b/tests/mkdirat.c index ce2e9c180..6bfe4a5fc 100644 --- a/tests/mkdirat.c +++ b/tests/mkdirat.c @@ -5,7 +5,7 @@ # define TEST_SYSCALL_NR __NR_mkdirat # define TEST_SYSCALL_STR "mkdirat" -# define TEST_SYSCALL_PREFIX_ARGS (long int) 0xdeadbeefffffffff, +# define TEST_SYSCALL_PREFIX_ARGS (long int) 0xdeadbeefffffffffULL, # define TEST_SYSCALL_PREFIX_STR "-1, " # include "umode_t.c" diff --git a/tests/mknod.c b/tests/mknod.c index 2d4287438..4cc1c5cb7 100644 --- a/tests/mknod.c +++ b/tests/mknod.c @@ -13,14 +13,14 @@ static const char sample[] = "mknod"; static long call_mknod(unsigned short mode, unsigned long dev) { - unsigned long lmode = (unsigned long) 0xffffffffffff0000 | mode; + unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode; return syscall(__NR_mknod, sample, lmode, dev); } int main(void) { - unsigned long dev = (unsigned long) 0xdeadbeefbadc0ded; + unsigned long dev = (unsigned long) 0xdeadbeefbadc0dedULL; long rc = call_mknod(0, dev); printf("mknod(\"%s\", 000) = %ld %s (%m)\n", @@ -46,14 +46,14 @@ main(void) printf("mknod(\"%s\", S_IFIFO|0600) = %ld %s (%m)\n", sample, rc, errno2name()); - dev = (unsigned long) 0xdeadbeef00000000 | makedev(1, 7); + dev = (unsigned long) 0xdeadbeef00000000ULL | makedev(1, 7); rc = call_mknod(S_IFCHR | 024, dev); printf("mknod(\"%s\", S_IFCHR|024, makedev(1, 7)) = %ld %s (%m)\n", sample, rc, errno2name()); const unsigned short mode = (0xffff & ~S_IFMT) | S_IFBLK; - dev = (unsigned long) 0xdeadbeefbadc0ded; + dev = (unsigned long) 0xdeadbeefbadc0dedULL; rc = call_mknod(mode, dev); printf("mknod(\"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho" diff --git a/tests/mknodat.c b/tests/mknodat.c index 614513e8b..756e27713 100644 --- a/tests/mknodat.c +++ b/tests/mknodat.c @@ -9,19 +9,19 @@ # include static const char sample[] = "mknodat_sample"; -static const long int fd = (long int) 0xdeadbeefffffffff; +static const long int fd = (long int) 0xdeadbeefffffffffULL; static long call_mknodat(unsigned short mode, unsigned long dev) { - unsigned long lmode = (unsigned long) 0xffffffffffff0000 | mode; + unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode; return syscall(__NR_mknodat, fd, sample, lmode, dev); } int main(void) { - unsigned long dev = (unsigned long) 0xdeadbeefbadc0ded; + unsigned long dev = (unsigned long) 0xdeadbeefbadc0dedULL; long rc = call_mknodat(0, dev); printf("mknodat(-1, \"%s\", 000) = %ld %s (%m)\n", @@ -47,14 +47,14 @@ main(void) printf("mknodat(-1, \"%s\", S_IFIFO|0600) = %ld %s (%m)\n", sample, rc, errno2name()); - dev = (unsigned long) 0xdeadbeef00000000 | makedev(1, 7); + dev = (unsigned long) 0xdeadbeef00000000ULL | makedev(1, 7); rc = call_mknodat(S_IFCHR | 024, dev); printf("mknodat(-1, \"%s\", S_IFCHR|024, makedev(1, 7)) = %ld %s (%m)\n", sample, rc, errno2name()); const unsigned short mode = (0xffff & ~S_IFMT) | S_IFBLK; - dev = (unsigned long) 0xdeadbeefbadc0ded; + dev = (unsigned long) 0xdeadbeefbadc0dedULL; rc = call_mknodat(mode, dev); printf("mknodat(-1, \"%s\", S_IFBLK|S_ISUID|S_ISGID|S_ISVTX|%#03ho" diff --git a/tests/mlock.c b/tests/mlock.c index be962e241..8e9806bd5 100644 --- a/tests/mlock.c +++ b/tests/mlock.c @@ -24,6 +24,6 @@ main(void) #else -SKIP_MAIN_DEFINED("__NR_mlock && __NR_munlock") +SKIP_MAIN_UNDEFINED("__NR_mlock && __NR_munlock") #endif diff --git a/tests/mlock2.c b/tests/mlock2.c index e557042ec..71a2003ea 100644 --- a/tests/mlock2.c +++ b/tests/mlock2.c @@ -27,6 +27,7 @@ #include "tests.h" #include +#include "scno.h" #ifdef __NR_mlock2 diff --git a/tests/mmap.c b/tests/mmap.c index e2ff71631..f726f63ef 100644 --- a/tests/mmap.c +++ b/tests/mmap.c @@ -45,10 +45,10 @@ main(int ac, char **av) void *addr, *p; #if ULONG_MAX > 4294967295UL - offset = 0xcafedeadbeef000 & -pagesize; + offset = 0xcafedeadbeef000ULL & -pagesize; addr = (void *) (uintmax_t) (0xfacefeed000 & -pagesize); #else - offset = 0xdeadbeef000 & -pagesize; + offset = 0xdeadbeef000ULL & -pagesize; addr = (void *) (unsigned int) (0xfaced000 & -pagesize); #endif const uintmax_t uoffset = diff --git a/tests/move_pages.c b/tests/move_pages.c index 3be7446ae..f4ccafa2c 100644 --- a/tests/move_pages.c +++ b/tests/move_pages.c @@ -136,7 +136,7 @@ static void print_stat_pages(const unsigned long pid, const unsigned long count, const void **const pages, int *const status) { - const unsigned long flags = (unsigned long) 0xfacefeed00000002; + const unsigned long flags = (unsigned long) 0xfacefeed00000002ULL; long rc = syscall(__NR_move_pages, pid, count, pages, NULL, status, flags); @@ -163,7 +163,7 @@ print_move_pages(const unsigned long pid, int *const nodes, int *const status) { - const unsigned long flags = (unsigned long) 0xfacefeed00000004; + const unsigned long flags = (unsigned long) 0xfacefeed00000004ULL; count += offset; long rc = syscall(__NR_move_pages, @@ -185,7 +185,7 @@ int main(void) { const unsigned long pid = - (unsigned long) 0xfacefeed00000000 | getpid(); + (unsigned long) 0xfacefeed00000000ULL | getpid(); unsigned long count = 1; const unsigned page_size = get_page_size(); const void *const page = tail_alloc(page_size); diff --git a/tests/mq.c b/tests/mq.c index d80f9270f..9c2ffc8ed 100644 --- a/tests/mq.c +++ b/tests/mq.c @@ -32,23 +32,42 @@ # include # include +# include # include # include # include +# define NAME "strace-mq.test" + int main (void) { struct mq_attr attr; (void) close(0); - if (mq_open("/strace-mq.test", O_CREAT, S_IRWXU, 0)) + + if (mq_open("/" NAME, O_CREAT, 0700, NULL)) perror_msg_and_skip("mq_open"); + printf("mq_open(\"%s\", O_RDONLY|O_CREAT, 0700, NULL) = 0\n", NAME); + if (mq_getattr(0, &attr)) perror_msg_and_skip("mq_getattr"); - if (mq_setattr(0, &attr, 0)) + printf("mq_getsetattr(0, NULL, {mq_flags=0, mq_maxmsg=%lld" + ", mq_msgsize=%lld, mq_curmsgs=0}) = 0\n", + (long long) attr.mq_maxmsg, + (long long) attr.mq_msgsize); + + if (mq_setattr(0, &attr, NULL)) perror_msg_and_skip("mq_setattr"); - if (mq_unlink("/strace-mq.test")) + printf("mq_getsetattr(0, {mq_flags=0, mq_maxmsg=%lld" + ", mq_msgsize=%lld, mq_curmsgs=0}, NULL) = 0\n", + (long long) attr.mq_maxmsg, + (long long) attr.mq_msgsize); + + if (mq_unlink("/" NAME)) perror_msg_and_skip("mq_unlink"); + printf("mq_unlink(\"%s\") = 0\n", NAME); + + puts("+++ exited with 0 +++"); return 0; } diff --git a/tests/mq.expected b/tests/mq.expected deleted file mode 100644 index 40b8eeef3..000000000 --- a/tests/mq.expected +++ /dev/null @@ -1,4 +0,0 @@ -mq_open\("strace-mq.test", O_RDONLY\|O_CREAT, 0700, NULL\) += 0 -mq_getsetattr\(0, NULL, \{mq_flags=O_RDONLY, mq_maxmsg=[1-9][0-9]*, mq_msgsize=[1-9][0-9]*, mq_curmsg=0\}\) += 0 -mq_getsetattr\(0, \{mq_flags=O_RDONLY, mq_maxmsg=[1-9][0-9]*, mq_msgsize=[1-9][0-9]*, mq_curmsg=0\}, NULL\) += 0 -mq_unlink\("strace-mq.test"\) += 0 diff --git a/tests/mq.test b/tests/mq.test index e900591b0..746b07b7d 100755 --- a/tests/mq.test +++ b/tests/mq.test @@ -1,11 +1,6 @@ #!/bin/sh -# Check mq_open, mq_getsetattr, mq_unlink syscalls decoding. - +# Check decoding of mq_open, mq_getsetattr, and mq_unlink syscalls. . "${srcdir=.}/init.sh" -run_prog -run_strace -v -e mq_getsetattr,mq_open,mq_unlink $args -match_grep - -exit 0 +run_strace_match_diff -a28 -e trace=mq_getsetattr,mq_open,mq_unlink diff --git a/tests/mq_sendrecv-read.c b/tests/mq_sendrecv-read.c new file mode 100644 index 000000000..cc9867b96 --- /dev/null +++ b/tests/mq_sendrecv-read.c @@ -0,0 +1,3 @@ +#define DUMPIO_READ 1 +#define MQ_NAME "mq_sendrecv-read.sample" +#include "mq_sendrecv.c" diff --git a/tests/mq_sendrecv-read.test b/tests/mq_sendrecv-read.test new file mode 100755 index 000000000..eb4ad75e0 --- /dev/null +++ b/tests/mq_sendrecv-read.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mq_open, mq_notify, mq_timedsend, mq_timedreceive syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mq_open,mq_notify,mq_timedsend,mq_timedreceive,mq_unlink -eread=0 -a14 diff --git a/tests/mq_sendrecv-write.c b/tests/mq_sendrecv-write.c new file mode 100644 index 000000000..ae34ee1a3 --- /dev/null +++ b/tests/mq_sendrecv-write.c @@ -0,0 +1,3 @@ +#define DUMPIO_WRITE 1 +#define MQ_NAME "mq_sendrecv-write.sample" +#include "mq_sendrecv.c" diff --git a/tests/mq_sendrecv-write.test b/tests/mq_sendrecv-write.test new file mode 100755 index 000000000..38277ec68 --- /dev/null +++ b/tests/mq_sendrecv-write.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mq_open, mq_notify, mq_timedsend, mq_timedreceive syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mq_open,mq_notify,mq_timedsend,mq_timedreceive,mq_unlink -ewrite=0 -a14 diff --git a/tests/mq_sendrecv.c b/tests/mq_sendrecv.c new file mode 100644 index 000000000..c151542ce --- /dev/null +++ b/tests/mq_sendrecv.c @@ -0,0 +1,480 @@ +/* + * Check decoding of mq_open, mq_timedsend, mq_notify, mq_timedreceive and + * mq_unlink syscalls. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#if defined __NR_mq_open && __NR_mq_timedsend && __NR_mq_timedreceive && \ + __NR_mq_notify && __NR_mq_unlink + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include "sigevent.h" + +# ifndef MQ_NAME +# define MQ_NAME "mq_sendrecv.sample" +# endif + +# ifndef DUMPIO_READ +# define DUMPIO_READ 0 +# endif + +# ifndef DUMPIO_WRITE +# define DUMPIO_WRITE 0 +# endif + + +enum { + NUM_ATTRS = 8, + MSG_CUT = 8, + MSG_MAX_UNCUT = 32, + MSG_SIZE = 64, + MSG_START = 0x80, +}; + + +static void +printstr(unsigned char start, unsigned int count) +{ + unsigned int i; + + printf("\""); + for (i = 0; i < count; i++) { + printf("\\%hho", (unsigned char) (start + i)); + } + printf("\""); +} + +#if DUMPIO_READ || DUMPIO_WRITE +static void +dumpstr(unsigned char start, unsigned int count) +{ + unsigned int i; + unsigned int j; + + for (i = 0; i < count; i++) { + if (i < count) { + if (!(i % 16)) + printf(" | %05x ", i); + if (!(i % 8)) + printf(" "); + + printf("%02hhx ", (unsigned char) (start + i)); + } + + if ((i % 16 == 15) || (i == (count - 1))) { + if (i % 16 != 15) + printf("%*s", 3 * (15 - i % 16) + + ((i + 8) % 16) / 8, " "); + + printf(" "); + + for (j = 0; j <= (i % 16); j++) + printf("."); + for (j = i % 16; j < 15; j++) + printf(" "); + + printf(" |\n"); + + } + } +} +#endif /* DUMPIO_READ || DUMPIO_WRITE */ + +static void +cleanup(void) +{ + long rc; + + rc = syscall(__NR_mq_unlink, MQ_NAME); + printf("mq_unlink(\"" MQ_NAME "\") = %s\n", sprintrc(rc)); + + puts("+++ exited with 0 +++"); +} + +static void +do_send(int fd, char *msg, unsigned int msg_size, struct timespec *tmout, + bool cropped) +{ + long rc; + long saved_errno; + + do { + rc = syscall(__NR_mq_timedsend, fd, msg, msg_size, 42, + tmout); + saved_errno = errno; + printf("mq_timedsend(%d, ", fd); + printstr(MSG_START, msg_size > MSG_MAX_UNCUT ? MSG_MAX_UNCUT : + msg_size); + if (cropped) + printf("..."); + errno = saved_errno; + printf(", %u, 42, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", msg_size, + (intmax_t) tmout->tv_sec, (intmax_t) tmout->tv_nsec, + sprintrc(rc)); + errno = saved_errno; + + if (rc == -1) { + if (errno == EINTR) + continue; + perror_msg_and_skip("mq_timedsend"); + } +# if DUMPIO_WRITE + dumpstr(MSG_START, msg_size); +# endif + } while (rc); +} + +static void +do_recv(int fd, char *msg, unsigned int msg_size, struct timespec *tmout, + bool cropped) +{ + long rc; + long saved_errno; + unsigned prio; + + do { + rc = syscall(__NR_mq_timedreceive, fd, msg, MSG_SIZE, &prio, + tmout); + saved_errno = errno; + printf("mq_timedreceive(%d, ", fd); + if (rc >= 0) { + printstr(MSG_START, rc > MSG_MAX_UNCUT ? MSG_MAX_UNCUT : + rc); + if (cropped) + printf("..."); + } else { + printf("%p", msg); + } + errno = saved_errno; + printf(", %u, [42], {tv_sec=%jd, tv_nsec=%jd}) = %s\n", MSG_SIZE, + (intmax_t) tmout->tv_sec, + (intmax_t) tmout->tv_nsec, sprintrc(rc)); + errno = saved_errno; + + if (rc == -1) { + if (errno == EINTR) + continue; + perror_msg_and_skip("mq_timedreceive"); + } + if ((rc >= 0) && ((unsigned long) rc != msg_size)) + error_msg_and_skip("mq_timedreceive size mismatch" + ": expected %u, got %ld", + msg_size, rc); +# if DUMPIO_READ + dumpstr(MSG_START, rc); +# endif + } while (rc < 0); +} + +int +main(void) +{ + static const kernel_ulong_t bogus_zero = + (kernel_ulong_t) 0x8765432100000000ULL; + static const kernel_ulong_t bogus_oflags = + (kernel_ulong_t) 0xdefaced100000003ULL; + static const kernel_ulong_t bogus_mode = + (kernel_ulong_t) 0xdec0deadfacefeedULL; + static const kernel_ulong_t bogus_fd = + (kernel_ulong_t) 0xfeedfacedeadba5eULL; + static const kernel_ulong_t bogus_zero_size = + (sizeof(kernel_ulong_t) > sizeof(int)) ? (kernel_ulong_t) 0 : + (kernel_ulong_t) 0xface1e5500000000ULL; + static const kernel_ulong_t bogus_size = + (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + static const kernel_ulong_t bogus_prio = + (kernel_ulong_t) 0xdec0ded1defaced3ULL; + static const struct timespec bogus_tmout_data = { + .tv_sec = (time_t) 0xdeadfacebeeff00dLL, + .tv_nsec = (long) 0xfacefee1deadfeedLL, + }; + static const struct timespec future_tmout_data = { + .tv_sec = (time_t) 0x7ea1fade7e57faceLL, + .tv_nsec = 999999999, + };; + struct_sigevent bogus_sev_data = { + .sigev_notify = 0xdefaced, + .sigev_signo = 0xfacefeed, + .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0dedULL + }; + + const char *errstr; + long rc; + kernel_long_t *bogus_attrs = tail_alloc(sizeof(*bogus_attrs) * + NUM_ATTRS); + char *msg = tail_alloc(MSG_SIZE); + unsigned *bogus_prio_ptr = tail_alloc(sizeof(*bogus_prio_ptr)); + struct timespec *bogus_tmout = tail_memdup(&bogus_tmout_data, + sizeof(*bogus_tmout)); + struct timespec *future_tmout = tail_memdup(&future_tmout_data, + sizeof(*future_tmout)); + struct_sigevent *bogus_sev = tail_memdup(&bogus_sev_data, + sizeof(*bogus_sev)); + int fd = -1; + + + fill_memory_ex(msg, MSG_SIZE, MSG_START, MSG_SIZE); + fill_memory_ex(bogus_attrs, sizeof(*bogus_attrs) * NUM_ATTRS, + 0xbb, 0x70); + + + /* mq_open */ + + /* Zero values, non-O_CREAT mode */ + rc = syscall(__NR_mq_open, NULL, bogus_zero, bogus_mode, NULL); + printf("mq_open(NULL, O_RDONLY) = %s\n", sprintrc(rc)); + + /* O_CREAT parsing, other flags, bogs values */ + rc = syscall(__NR_mq_open, msg, O_CREAT | bogus_oflags, bogus_mode, + NULL); + printf("mq_open(%p, O_ACCMODE|O_CREAT, %#o, NULL) = %s\n", + msg, (unsigned short) bogus_mode, sprintrc(rc)); + + /* Partially invalid attributes structure */ + rc = syscall(__NR_mq_open, msg, O_CREAT | bogus_oflags, bogus_mode, + bogus_attrs + 1); + printf("mq_open(%p, O_ACCMODE|O_CREAT, %#o, %p) = %s\n", + msg, (unsigned short) bogus_mode, bogus_attrs + 1, sprintrc(rc)); + + /* Valid attributes structure */ + rc = syscall(__NR_mq_open, msg, O_CREAT | bogus_oflags, bogus_mode, + bogus_attrs); + printf("mq_open(%p, O_ACCMODE|O_CREAT, %#o, {mq_flags=%#llx, " + "mq_maxmsg=%lld, mq_msgsize=%lld, mq_curmsgs=%lld}) = %s\n", + msg, (unsigned short) bogus_mode, + (unsigned long long) (kernel_ulong_t) bogus_attrs[0], + (long long) bogus_attrs[1], + (long long) bogus_attrs[2], + (long long) bogus_attrs[3], sprintrc(rc)); + + + /* mq_timedsend */ + + /* Zero values*/ + rc = syscall(__NR_mq_timedsend, bogus_zero, NULL, bogus_zero_size, + bogus_zero, NULL); + printf("mq_timedsend(0, NULL, 0, 0, NULL) = %s\n", sprintrc(rc)); + + /* Invalid pointers */ + rc = syscall(__NR_mq_timedsend, bogus_fd, msg + MSG_SIZE, bogus_size, + bogus_prio, bogus_tmout + 1); + printf("mq_timedsend(%d, %p, %llu, %u, %p) = %s\n", + (int) bogus_fd, msg + MSG_SIZE, (unsigned long long) bogus_size, + (unsigned) bogus_prio, bogus_tmout + 1, sprintrc(rc)); + + /* Partially invalid message (memory only partially available) */ + rc = syscall(__NR_mq_timedsend, bogus_fd, msg + MSG_SIZE - MSG_CUT, + MSG_SIZE, bogus_prio, bogus_tmout); + printf("mq_timedsend(%d, %p, %llu, %u, {tv_sec=%jd, tv_nsec=%jd}) = " + "%s\n", + (int) bogus_fd, msg + MSG_SIZE - MSG_CUT, + (unsigned long long) MSG_SIZE, (unsigned) bogus_prio, + (intmax_t) bogus_tmout->tv_sec, (intmax_t) bogus_tmout->tv_nsec, + sprintrc(rc)); + + /* Fully valid message, uncut */ + rc = syscall(__NR_mq_timedsend, bogus_fd, msg + MSG_SIZE - MSG_CUT, + MSG_CUT, bogus_prio, bogus_tmout); + errstr = sprintrc(rc); + printf("mq_timedsend(%d, ", (int) bogus_fd); + printstr(MSG_START + MSG_SIZE - MSG_CUT, MSG_CUT); + printf(", %llu, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + (unsigned long long) MSG_CUT, (unsigned) bogus_prio, + (intmax_t) bogus_tmout->tv_sec, (intmax_t) bogus_tmout->tv_nsec, + errstr); + + /* Partially invalid message, cut at maxstrlen */ + rc = syscall(__NR_mq_timedsend, bogus_fd, msg + MSG_CUT, MSG_SIZE, + bogus_prio, bogus_tmout); + errstr = sprintrc(rc); + printf("mq_timedsend(%d, ", (int) bogus_fd); + printstr(MSG_START + MSG_CUT, MSG_MAX_UNCUT); + printf("..., %llu, %u, {tv_sec=%jd, tv_nsec=%jd}) = %s\n", + (unsigned long long) MSG_SIZE, (unsigned) bogus_prio, + (intmax_t) bogus_tmout->tv_sec, (intmax_t) bogus_tmout->tv_nsec, + errstr); + + + /* mq_timedreceive */ + + /* Zero values */ + rc = syscall(__NR_mq_timedreceive, bogus_zero, NULL, bogus_zero_size, + NULL, NULL); + printf("mq_timedreceive(0, NULL, 0, NULL, NULL) = %s\n", sprintrc(rc)); + + /* Invalid addresses */ + rc = syscall(__NR_mq_timedreceive, bogus_fd, msg + MSG_SIZE, bogus_size, + bogus_prio_ptr + 1, bogus_tmout + 1); + printf("mq_timedreceive(%d, %p, %llu, %p, %p) = %s\n", + (int) bogus_fd, msg + MSG_SIZE, (unsigned long long) bogus_size, + bogus_prio_ptr + 1, bogus_tmout + 1, sprintrc(rc)); + + /* Invalid fd, valid msg pointer */ + rc = syscall(__NR_mq_timedreceive, bogus_fd, msg, bogus_size, + bogus_prio_ptr, bogus_tmout); + printf("mq_timedreceive(%d, %p, %llu, %p, {tv_sec=%jd, tv_nsec=%jd}) = " + "%s\n", + (int) bogus_fd, msg, (unsigned long long) bogus_size, + bogus_prio_ptr, (intmax_t) bogus_tmout->tv_sec, + (intmax_t) bogus_tmout->tv_nsec, sprintrc(rc)); + + + /* mq_notify */ + + /* Zero values */ + rc = syscall(__NR_mq_notify, bogus_zero, NULL); + printf("mq_notify(0, NULL) = %s\n", sprintrc(rc)); + + /* Invalid pointer */ + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev + 1); + printf("mq_notify(%d, %p) = %s\n", + (int) bogus_fd, bogus_sev + 1, sprintrc(rc)); + + /* Invalid SIGEV_* */ + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev); + printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}" + ", sigev_signo=%u, sigev_notify=%#x /* SIGEV_??? */}) = %s\n", + (int) bogus_fd, bogus_sev->sigev_value.sival_int, + bogus_sev->sigev_value.sival_ptr, + bogus_sev->sigev_signo, bogus_sev->sigev_notify, + sprintrc(rc)); + + /* SIGEV_NONE */ + bogus_sev->sigev_notify = SIGEV_NONE; + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev); + printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, " + "sigev_signo=%u, sigev_notify=SIGEV_NONE}) = %s\n", + (int) bogus_fd, bogus_sev->sigev_value.sival_int, + bogus_sev->sigev_value.sival_ptr, + bogus_sev->sigev_signo, sprintrc(rc)); + + /* SIGEV_SIGNAL */ + bogus_sev->sigev_notify = SIGEV_SIGNAL; + bogus_sev->sigev_signo = SIGALRM; + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev); + printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, " + "sigev_signo=SIGALRM, sigev_notify=SIGEV_SIGNAL}) = %s\n", + (int) bogus_fd, bogus_sev->sigev_value.sival_int, + bogus_sev->sigev_value.sival_ptr, sprintrc(rc)); + + /* SIGEV_THREAD */ + bogus_sev->sigev_notify = SIGEV_THREAD; + bogus_sev->sigev_un.sigev_thread.function = + (unsigned long) 0xdeadbeefbadc0dedULL; + bogus_sev->sigev_un.sigev_thread.attribute = + (unsigned long) 0xcafef00dfacefeedULL; + rc = syscall(__NR_mq_notify, bogus_fd, bogus_sev); + printf("mq_notify(%d, {sigev_value={sival_int=%d, sival_ptr=%#lx}, " + "sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD, " + "sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}) = " + "%s\n", + (int) bogus_fd, bogus_sev->sigev_value.sival_int, + bogus_sev->sigev_value.sival_ptr, + bogus_sev->sigev_un.sigev_thread.function, + bogus_sev->sigev_un.sigev_thread.attribute, sprintrc(rc)); + + /* mq_unlink */ + + /* Zero values */ + rc = syscall(__NR_mq_unlink, NULL); + printf("mq_unlink(NULL) = %s\n", sprintrc(rc)); + + /* Invalid ptr */ + rc = syscall(__NR_mq_unlink, msg + MSG_SIZE); + printf("mq_unlink(%p) = %s\n", msg + MSG_SIZE, sprintrc(rc)); + + /* Long unterminated string */ + rc = syscall(__NR_mq_unlink, msg); + errstr = sprintrc(rc); + printf("mq_unlink(%p) = %s\n", msg, errstr); + + + /* Sending and receiving test */ + +# if DUMPIO_READ || DUMPIO_WRITE + close(0); +# endif + bogus_attrs[1] = 2; + bogus_attrs[2] = MSG_SIZE; + fd = rc = syscall(__NR_mq_open, MQ_NAME, + O_CREAT|O_RDWR|O_NONBLOCK, S_IRWXU, bogus_attrs); + errstr = sprintrc(rc); + if (rc < 0) + perror_msg_and_skip("mq_open"); + else + atexit(cleanup); +# if DUMPIO_READ || DUMPIO_WRITE + if (fd != 0) + error_msg_and_skip("mq_open returned fd other than 0"); +# endif + fill_memory_ex(bogus_attrs, sizeof(*bogus_attrs) * NUM_ATTRS, + 0xbb, 0x70); + printf("mq_open(\"" MQ_NAME "\", O_RDWR|O_CREAT|O_NONBLOCK, " + "0700, {mq_flags=%#llx, mq_maxmsg=2, mq_msgsize=%u, " + "mq_curmsgs=%lld}) = %s\n", + (unsigned long long) (kernel_ulong_t) bogus_attrs[0], MSG_SIZE, + (long long) bogus_attrs[3], errstr); + + rc = syscall(__NR_mq_getsetattr, fd, NULL, bogus_attrs); + if (rc < 0) + perror_msg_and_skip("mq_getsetattr"); + if ((bogus_attrs[1] < 2) || (bogus_attrs[2] < MSG_SIZE)) + error_msg_and_skip("mq too small"); + + do_send(fd, msg, MSG_CUT, future_tmout, false); + do_send(fd, msg, MSG_SIZE, future_tmout, true); + + memset(msg, '\0', MSG_SIZE); + do_recv(fd, msg, MSG_CUT, future_tmout, false); + + memset(msg, '\0', MSG_SIZE); + do_recv(fd, msg, MSG_SIZE, future_tmout, true); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_mq_open && __NR_mq_timedsend && " + "__NR_mq_timedreceive && __NR_mq_notify && __NR_mq_unlink"); + +#endif diff --git a/tests/mq_sendrecv.test b/tests/mq_sendrecv.test new file mode 100755 index 000000000..67f4d63c5 --- /dev/null +++ b/tests/mq_sendrecv.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of mq_open, mq_notify, mq_timedsend, mq_timedreceive syscalls. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -e trace=mq_open,mq_notify,mq_timedsend,mq_timedreceive,mq_unlink -a14 diff --git a/tests/msg_control.c b/tests/msg_control.c index 7540c3d29..709a30758 100644 --- a/tests/msg_control.c +++ b/tests/msg_control.c @@ -53,8 +53,6 @@ #define MIN_SIZE_OF(type, member) \ (offsetof(type, member) + sizeof(((type *) 0)->member)) -#define VAL_STR(val) val, #val - static struct cmsghdr * get_cmsghdr(void *const page, const size_t len) { @@ -371,7 +369,7 @@ test_sol_socket(struct msghdr *const mh, void *const page) cmsg_len++) { test_scm_security(mh, msg_controllen, page, text, cmsg_len, - VAL_STR(SOL_SOCKET)); + ARG_STR(SOL_SOCKET)); } } @@ -379,7 +377,7 @@ test_sol_socket(struct msghdr *const mh, void *const page) test_scm_rights3(mh, page, DEFAULT_STRLEN); test_scm_rights3(mh, page, DEFAULT_STRLEN + 1); - test_unknown_type(mh, page, VAL_STR(SOL_SOCKET), "SCM_???"); + test_unknown_type(mh, page, ARG_STR(SOL_SOCKET), "SCM_???"); } static void @@ -604,32 +602,32 @@ test_ip_origdstaddr(struct msghdr *const mh, void *const page, static void test_sol_ip(struct msghdr *const mh, void *const page) { - test_ip_pktinfo(mh, page, VAL_STR(IP_PKTINFO)); - test_ip_uint(mh, page, VAL_STR(IP_TTL)); - test_ip_uint8_t(mh, page, VAL_STR(IP_TOS)); - test_ip_opts(mh, page, VAL_STR(IP_RECVOPTS), 1); - test_ip_opts(mh, page, VAL_STR(IP_RECVOPTS), 2); - test_ip_opts(mh, page, VAL_STR(IP_RECVOPTS), 3); - test_ip_opts(mh, page, VAL_STR(IP_RECVOPTS), 4); - test_ip_opts(mh, page, VAL_STR(IP_RETOPTS), 5); - test_ip_opts(mh, page, VAL_STR(IP_RETOPTS), 6); - test_ip_opts(mh, page, VAL_STR(IP_RETOPTS), 7); - test_ip_opts(mh, page, VAL_STR(IP_RETOPTS), 8); - test_ip_opts(mh, page, VAL_STR(IP_RETOPTS), DEFAULT_STRLEN - 1); - test_ip_opts(mh, page, VAL_STR(IP_RETOPTS), DEFAULT_STRLEN); - test_ip_opts(mh, page, VAL_STR(IP_RETOPTS), DEFAULT_STRLEN + 1); + test_ip_pktinfo(mh, page, ARG_STR(IP_PKTINFO)); + test_ip_uint(mh, page, ARG_STR(IP_TTL)); + test_ip_uint8_t(mh, page, ARG_STR(IP_TOS)); + test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 1); + test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 2); + test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 3); + test_ip_opts(mh, page, ARG_STR(IP_RECVOPTS), 4); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 5); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 6); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 7); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), 8); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), DEFAULT_STRLEN - 1); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), DEFAULT_STRLEN); + test_ip_opts(mh, page, ARG_STR(IP_RETOPTS), DEFAULT_STRLEN + 1); #ifdef IP_CHECKSUM - test_ip_recverr(mh, page, VAL_STR(IP_RECVERR)); + test_ip_recverr(mh, page, ARG_STR(IP_RECVERR)); #endif #ifdef IP_ORIGDSTADDR - test_ip_origdstaddr(mh, page, VAL_STR(IP_ORIGDSTADDR)); + test_ip_origdstaddr(mh, page, ARG_STR(IP_ORIGDSTADDR)); #endif #ifdef IP_CHECKSUM - test_ip_uint(mh, page, VAL_STR(IP_CHECKSUM)); + test_ip_uint(mh, page, ARG_STR(IP_CHECKSUM)); #endif test_scm_security(mh, CMSG_LEN(0), page, 0, CMSG_LEN(0), - VAL_STR(SOL_IP)); - test_unknown_type(mh, page, VAL_STR(SOL_IP), "IP_???"); + ARG_STR(SOL_IP)); + test_unknown_type(mh, page, ARG_STR(SOL_IP), "IP_???"); } static void diff --git a/tests/nanosleep.c b/tests/nanosleep.c index db430e516..9f0e626f1 100644 --- a/tests/nanosleep.c +++ b/tests/nanosleep.c @@ -57,7 +57,7 @@ main(void) if (nanosleep(&req.ts, NULL)) perror_msg_and_fail("nanosleep"); - printf("nanosleep({%jd, %jd}, NULL) = 0\n", + printf("nanosleep({tv_sec=%jd, tv_nsec=%jd}, NULL) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec); assert(nanosleep(NULL, &rem.ts) == -1); @@ -65,12 +65,12 @@ main(void) if (nanosleep(&req.ts, &rem.ts)) perror_msg_and_fail("nanosleep"); - printf("nanosleep({%jd, %jd}, %p) = 0\n", + printf("nanosleep({tv_sec=%jd, tv_nsec=%jd}, %p) = 0\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); req.ts.tv_nsec = 1000000000; assert(nanosleep(&req.ts, &rem.ts) == -1); - printf("nanosleep({%jd, %jd}, %p) = -1 EINVAL (%m)\n", + printf("nanosleep({tv_sec=%jd, tv_nsec=%jd}, %p) = -1 EINVAL (%m)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, &rem.ts); assert(sigaction(SIGALRM, &act, NULL) == 0); @@ -78,8 +78,8 @@ main(void) if (setitimer(ITIMER_REAL, &itv, NULL)) perror_msg_and_skip("setitimer"); - printf("setitimer(ITIMER_REAL, {it_interval={%jd, %jd}" - ", it_value={%jd, %jd}}, NULL) = 0\n", + printf("setitimer(ITIMER_REAL, {it_interval={tv_sec=%jd, tv_usec=%jd}" + ", it_value={tv_sec=%jd, tv_usec=%jd}}, NULL) = 0\n", (intmax_t) itv.it_interval.tv_sec, (intmax_t) itv.it_interval.tv_usec, (intmax_t) itv.it_value.tv_sec, @@ -87,7 +87,7 @@ main(void) req.ts.tv_nsec = 999999999; assert(nanosleep(&req.ts, &rem.ts) == -1); - printf("nanosleep({%jd, %jd}, {%jd, %jd})" + printf("nanosleep({tv_sec=%jd, tv_nsec=%jd}, {tv_sec=%jd, tv_nsec=%jd})" " = ? ERESTART_RESTARTBLOCK (Interrupted by signal)\n", (intmax_t) req.ts.tv_sec, (intmax_t) req.ts.tv_nsec, (intmax_t) rem.ts.tv_sec, (intmax_t) rem.ts.tv_nsec); diff --git a/tests/nsyscalls.c b/tests/nsyscalls.c index 8e09acb92..aecf7aa7e 100644 --- a/tests/nsyscalls.c +++ b/tests/nsyscalls.c @@ -27,9 +27,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "defs.h" -#include "kernel_types.h" -#include "syscall.h" +#include "tests.h" +#include "sysent.h" +#include +#include +#include +#include #define TD 0 #define TF 0 @@ -42,14 +45,13 @@ #define MA 0 #define SI 0 #define SE 0 +#define CST 0 #define SEN(arg) 0,0 static const struct_sysent syscallent[] = { #include "syscallent.h" }; -#include - #if defined __X32_SYSCALL_BIT && defined __NR_read \ && (__X32_SYSCALL_BIT & __NR_read) != 0 # define SYSCALL_BIT __X32_SYSCALL_BIT @@ -61,12 +63,12 @@ static void test_syscall(const unsigned long nr) { static const kernel_ulong_t a[] = { - (kernel_ulong_t) 0xface0fedbadc0ded, - (kernel_ulong_t) 0xface1fedbadc1ded, - (kernel_ulong_t) 0xface2fedbadc2ded, - (kernel_ulong_t) 0xface3fedbadc3ded, - (kernel_ulong_t) 0xface4fedbadc4ded, - (kernel_ulong_t) 0xface5fedbadc5ded + (kernel_ulong_t) 0xface0fedbadc0dedULL, + (kernel_ulong_t) 0xface1fedbadc1dedULL, + (kernel_ulong_t) 0xface2fedbadc2dedULL, + (kernel_ulong_t) 0xface3fedbadc3dedULL, + (kernel_ulong_t) 0xface4fedbadc4dedULL, + (kernel_ulong_t) 0xface5fedbadc5dedULL }; long rc = syscall(nr | SYSCALL_BIT, diff --git a/tests/old_mmap.c b/tests/old_mmap.c index de1bafb36..2725fb754 100644 --- a/tests/old_mmap.c +++ b/tests/old_mmap.c @@ -31,7 +31,7 @@ #include /* - * On s390x, this is the mmap syscall used by glibc, so, + * On s390x and m68k, this is the mmap syscall used by glibc, so, * from one side, it's already covered by another test, and, from another side, * it would require additional efforts to filter out mmap calls made by glibc. */ @@ -39,7 +39,6 @@ #if defined __NR_mmap && \ ( defined __arm__ \ || defined __i386__ \ - || defined __m68k__ \ || (defined __s390__ && !defined __s390x__) \ ) @@ -96,7 +95,7 @@ main(void) #else -SKIP_MAIN_UNDEFINED("__NR_mmap && (__arm__ || __i386__ || __m68k__" +SKIP_MAIN_UNDEFINED("__NR_mmap && (__arm__ || __i386__" " || (__s390__ && !__s390x__))") #endif diff --git a/tests/oldfstat.c b/tests/oldfstat.c new file mode 100644 index 000000000..f5a94416c --- /dev/null +++ b/tests/oldfstat.c @@ -0,0 +1,49 @@ +/* + * Check decoding of oldfstat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_oldfstat && HAVE_STRUCT___OLD_KERNEL_STAT + +# define OLD_STAT 1 +# define TEST_SYSCALL_NR __NR_oldfstat +# define TEST_SYSCALL_STR "oldfstat" +# define STRUCT_STAT struct __old_kernel_stat +# define STRUCT_STAT_STR "struct __old_kernel_stat" +# define STRUCT_STAT_IS_STAT64 0 +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 23147718418U) +# include "fstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_oldfstat && HAVE_STRUCT___OLD_KERNEL_STAT") + +#endif diff --git a/tests/oldfstat.test b/tests/oldfstat.test new file mode 100755 index 000000000..66a105612 --- /dev/null +++ b/tests/oldfstat.test @@ -0,0 +1,19 @@ +#!/bin/sh + +# Check oldfstat syscall decoding. + +. "${srcdir=.}/init.sh" + +# strace -P is implemented using /proc/self/fd +[ -d /proc/self/fd/ ] || + framework_skip_ '/proc/self/fd/ is not available' + +syscall=$NAME +run_prog > /dev/null +sample=$syscall.sample +> "$sample" +run_strace -ve$syscall -P$sample -a21 $args > "$OUT" +match_diff "$LOG" "$OUT" +rm -f "$OUT" + +exit 0 diff --git a/tests/oldlstat.c b/tests/oldlstat.c new file mode 100644 index 000000000..661323701 --- /dev/null +++ b/tests/oldlstat.c @@ -0,0 +1,49 @@ +/* + * Check decoding of oldlstat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_oldlstat && HAVE_STRUCT___OLD_KERNEL_STAT + +# define OLD_STAT 1 +# define TEST_SYSCALL_NR __NR_oldlstat +# define TEST_SYSCALL_STR "oldlstat" +# define STRUCT_STAT struct __old_kernel_stat +# define STRUCT_STAT_STR "struct __old_kernel_stat" +# define STRUCT_STAT_IS_STAT64 0 +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 23147718418U) +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_oldlstat && HAVE_STRUCT___OLD_KERNEL_STAT") + +#endif diff --git a/tests/oldlstat.test b/tests/oldlstat.test new file mode 100755 index 000000000..a0f9ab931 --- /dev/null +++ b/tests/oldlstat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check oldlstat syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests/oldselect.expected b/tests/oldselect.expected index c0426f42b..d6e7f3c4b 100644 --- a/tests/oldselect.expected +++ b/tests/oldselect.expected @@ -1,2 +1,2 @@ -select(2, [1], [0], NULL, {0, 42}) = 0 (Timeout) +select(2, [1], [0], NULL, {tv_sec=0, tv_usec=42}) = 0 (Timeout) +++ exited with 0 +++ diff --git a/tests/oldstat.c b/tests/oldstat.c new file mode 100644 index 000000000..d06e2bc64 --- /dev/null +++ b/tests/oldstat.c @@ -0,0 +1,49 @@ +/* + * Check decoding of oldstat syscall. + * + * Copyright (c) 2015-2016 Dmitry V. Levin + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_oldstat && HAVE_STRUCT___OLD_KERNEL_STAT + +# define OLD_STAT 1 +# define TEST_SYSCALL_NR __NR_oldstat +# define TEST_SYSCALL_STR "oldstat" +# define STRUCT_STAT struct __old_kernel_stat +# define STRUCT_STAT_STR "struct __old_kernel_stat" +# define STRUCT_STAT_IS_STAT64 0 +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 131478418U) +# include "lstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_oldstat && HAVE_STRUCT___OLD_KERNEL_STAT") + +#endif diff --git a/tests/oldstat.test b/tests/oldstat.test new file mode 100755 index 000000000..42d70f7f8 --- /dev/null +++ b/tests/oldstat.test @@ -0,0 +1,5 @@ +#!/bin/sh + +# Check oldstat syscall decoding. + +. "${srcdir=.}/statx.sh" diff --git a/tests/options-syntax.test b/tests/options-syntax.test new file mode 100755 index 000000000..592b0e034 --- /dev/null +++ b/tests/options-syntax.test @@ -0,0 +1,148 @@ +#!/bin/sh +# +# Check strace options syntax. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +check_exit_status_and_stderr() +{ + $STRACE "$@" 2> "$LOG" && + dump_log_and_fail_with \ + "strace $* failed to handle the error properly" + match_diff "$LOG" "$EXP" || + dump_log_and_fail_with \ + "strace $* failed to print expected diagnostics" +} + +strace_exp="${STRACE##* }" + +check_e() +{ + local pattern="$1"; shift + cat > "$EXP" << __EOF__ +$strace_exp: $pattern +__EOF__ + check_exit_status_and_stderr "$@" +} + +check_h() +{ + local pattern="$1"; shift + cat > "$EXP" << __EOF__ +$strace_exp: $pattern +Try '$strace_exp -h' for more information. +__EOF__ + check_exit_status_and_stderr "$@" +} + +check_e "Invalid process id: '0'" -p 0 +check_e "Invalid process id: '-42'" -p -42 +check_e "Invalid process id: '$$.'" -p $$. +check_e "Invalid process id: 'a'" -p 1,a +check_e "Syscall 'chdir' for -b isn't supported" -b chdir +check_e "Syscall 'chdir' for -b isn't supported" -b execve -b chdir + +check_e "invalid system call '-1'" -e-1 +check_e "invalid system call '-2'" -e -2 +check_e "invalid system call '-3'" -etrace=-3 +check_e "invalid system call '-4'" -e trace=-4 +check_e "invalid system call '-5'" -e trace=1,-5 +check_e "invalid system call '2147483647'" -e 2147483647 +check_e "invalid system call '2147483648'" -e 2147483648 +check_e "invalid system call '4294967295'" -e 4294967295 +check_e "invalid system call '4294967296'" -e 4294967296 + +check_e "invalid descriptor '-1'" -eread=-1 +check_e "invalid descriptor '-42'" -ewrite=-42 +check_e "invalid descriptor '2147483648'" -eread=2147483648 +check_e "invalid descriptor '4294967296'" -ewrite=4294967296 +check_e "invalid descriptor 'foo'" -eread=foo +check_e "invalid descriptor ''" -ewrite= +check_e "invalid descriptor ','" -eread=, +check_e "invalid descriptor '!'" -ewrite='!' +check_e "invalid descriptor '!'" -eread='0,!' +check_e "invalid descriptor '!,'" -ewrite='!,' + +check_h 'must have PROG [ARGS] or -p PID' +check_h 'PROG [ARGS] must be specified with -D' -D -p $$ +check_h '-c and -C are mutually exclusive' -c -C true +check_h '-c and -C are mutually exclusive' -C -c true +check_h '(-c or -C) and -ff are mutually exclusive' -c -ff true +check_h '(-c or -C) and -ff are mutually exclusive' -C -ff true +check_h '-w must be given with (-c or -C)' -w true +check_h 'piping the output and -ff are mutually exclusive' -o '|' -ff true +check_h 'piping the output and -ff are mutually exclusive' -o '!' -ff true +check_h "invalid -a argument: '-42'" -a -42 +check_h "invalid -O argument: '-42'" -O -42 +check_h "invalid -s argument: '-42'" -s -42 +check_h "invalid -I argument: '5'" -I 5 + +if [ -n "${UID-}" ]; then + if [ "${UID-}" = 0 ]; then + umsg="Cannot find user ':nosuchuser:'" + else + umsg='You must be root to use the -u option' + fi + + check_e "$umsg" -u :nosuchuser: true + + for c in i r t T y; do + check_e "-$c has no effect with -c +$strace_exp: $umsg" -u :nosuchuser: -c -$c true + done + check_e "-i has no effect with -c +$strace_exp: -r has no effect with -c +$strace_exp: -t has no effect with -c +$strace_exp: -T has no effect with -c +$strace_exp: -y has no effect with -c +$strace_exp: $umsg" -u :nosuchuser: -cirtTy true + + check_e "-tt has no effect with -r +$strace_exp: $umsg" -u :nosuchuser: -r -tt true +fi + +args='-p 2147483647' +$STRACE $args 2> "$LOG" && + dump_log_and_fail_with \ + "strace $args failed to handle the error properly" + +for cmd in PTRACE_SEIZE PTRACE_ATTACH; do + cat > "$EXP" << __EOF__ +$strace_exp: attach: ptrace($cmd, 2147483647): No such process +__EOF__ + diff -- "$EXP" "$LOG" || + continue + args= + break +done + +[ -z "$args" ] || + dump_log_and_fail_with \ + "strace $args failed to print expected diagnostics" + +rm -f "$EXP" diff --git a/tests/perf_event_open.c b/tests/perf_event_open.c index 72f5d3ce9..0ffea292f 100644 --- a/tests/perf_event_open.c +++ b/tests/perf_event_open.c @@ -1,7 +1,7 @@ /* - * Check decoding of perf_event_open syscall. + * Check verbose decoding of perf_event_open syscall. * - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,22 +32,80 @@ #if defined(__NR_perf_event_open) && defined(HAVE_LINUX_PERF_EVENT_H) +# include # include +# include +# include # include +# include +# include # include # include # include "xlat.h" # include "xlat/perf_event_open_flags.h" +# include "xlat/perf_attr_size.h" -#if ULONG_MAX > UINT_MAX -#define LONG_STR_PREFIX "ffffffff" -#else -#define LONG_STR_PREFIX "" -#endif +# if ULONG_MAX > UINT_MAX /* Poor man's "whether long is 8 bytes?" */ +# define LONG_STR_PREFIX "ffffffff" +# else /* !(ULONG_MAX > UINT_MAX) */ +# define LONG_STR_PREFIX "" +# endif /* ULONG_MAX > UINT_MAX */ + +# ifndef PERF_TYPE_BREAKPOINT +# define PERF_TYPE_BREAKPOINT 5 +# endif + +struct s32_val_str { + int32_t val; + const char *str; +}; -static const char *printaddr(void *ptr) +struct u32_val_str { + uint32_t val; + const char *str; +}; + +struct u64_val_str { + uint64_t val; + const char *str; +}; + +/* In order to avoid endianess-specific hackery */ +struct pea_flags { + uint64_t disabled :1, + inherit :1, + pinned :1, + exclusive :1, + exclude_user :1, + exclude_kernel :1, + exclude_hv :1, + exclude_idle :1, + mmap :1, + comm :1, + freq :1, + inherit_stat :1, + enable_on_exec :1, + task :1, + watermark :1, + precise_ip :2, + mmap_data :1, + sample_id_all :1, + exclude_host :1, + exclude_guest :1, + exclude_callchain_kernel :1, + exclude_callchain_user :1, + mmap2 :1, + comm_exec :1, + use_clockid :1, + context_switch :1, + write_backward :1, + __reserved_1 :36; +}; + +static const char * +printaddr(void *ptr) { static char buf[sizeof("0x") + sizeof(void *) * 2]; @@ -59,13 +117,571 @@ static const char *printaddr(void *ptr) return buf; } +/* + * Checklist: + * + * type - 8 IDs + * config - 13 IDs (0..11 + random), depends on type + * sample type - bitmask, up to 20 bits + * read_format - 5 IDs + * bp_type - 6, weird semantics (invalid/unknown) + * branch_sample_type - bitmask, 16 bits + * clockid - 13 values + * + * Unions: + * sample_period/sample_freq + * wakeup_event/wakeup_watermark + * bp_addr/config1 + * bp_len/config2 + */ + +/* + * The main idea behind all those numerous ifdefs is checking against version of + * structure provided in kernel headers and not use one defined in strace + * headers (assume the case when suddenly we add flag without proper update of + * __reserved_1 field or something like this). + */ +static void +print_event_attr(struct perf_event_attr *attr_ptr, size_t size, + const char *type, const char *config, const char *sample_type, + const char *read_format, const char *precise_ip_desc, + const char *bp_type, const char *branch_sample_type, + const char *clockid, uint32_t available_size) +{ + /* + * Currently, strace supports version 5 of the structure, which is + * 112 bytes in size. + */ + enum { + STRACE_PEA_ABBREV_SIZE = + offsetof(struct perf_event_attr, config) + + sizeof(attr_ptr->config), + STRACE_PEA_SIZE = 112, + }; + + uint32_t read_size; + struct perf_event_attr *attr; +# if VERBOSE + uint32_t cutoff; + uint64_t val; + uint64_t use_clockid; + union { + struct pea_flags flags; + uint64_t raw; + } flags_data; +# endif + + read_size = +# if !VERBOSE + STRACE_PEA_ABBREV_SIZE; +# else + size < STRACE_PEA_SIZE ? + (size ? size : PERF_ATTR_SIZE_VER0) : STRACE_PEA_SIZE; +# endif + + if (read_size > available_size) { + printf("%s", printaddr(attr_ptr)); + return; + } + + /* + * Replicate kernel's behaviour regarding copying structure from + * userspace. + */ + attr = calloc(1, STRACE_PEA_SIZE); + + if (!attr) + error_msg_and_fail("calloc"); + + + memcpy(attr, attr_ptr, read_size); + + if (size && (size < PERF_ATTR_SIZE_VER0)) { + printf("%s", printaddr(attr_ptr)); + free(attr); + return; + } + + printf("{type=%s, size=", type); + if (size != attr->size) { + printxval(perf_attr_size, size, "PERF_ATTR_SIZE_???"); + printf(" => "); + } + printxval(perf_attr_size, attr->size, "PERF_ATTR_SIZE_???"); + printf(", config=%s, ", config); + + if (!size) + size = PERF_ATTR_SIZE_VER0; + +# if !VERBOSE + printf("...}"); +# else /* !VERBOSE */ + printf("%s=%" PRI__u64", sample_type=%s, read_format=%s", + attr->freq ? "sample_freq" : "sample_period", + attr->freq ? attr->sample_freq : attr->sample_period, + sample_type, read_format); + + printf(", disabled=%u" + ", inherit=%u" + ", pinned=%u" + ", exclusive=%u" + ", exclusive_user=%u" + ", exclude_kernel=%u" + ", exclude_hv=%u" + ", exclude_idle=%u" + ", mmap=%u" + ", comm=%u" + ", freq=%u" + ", inherit_stat=%u" + ", enable_on_exec=%u" + ", task=%u" + ", watermark=%u", + attr->disabled, + attr->inherit, + attr->pinned, + attr->exclusive, + attr->exclude_user, + attr->exclude_kernel, + attr->exclude_hv, + attr->exclude_idle, + attr->mmap, + attr->comm, + attr->freq, + attr->inherit_stat, + attr->enable_on_exec, + attr->task, + attr->watermark); + + flags_data.raw = ((uint64_t *) attr)[5]; + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP + attr->precise_ip; +# else + flags_data.flags.precise_ip; +# endif + printf(", precise_ip=%" PRIu64 " /* %s */", val, precise_ip_desc); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_MMAP_DATA + attr->mmap_data; +# else + flags_data.flags.mmap_data; +# endif + printf(", mmap_data=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_ID_ALL + attr->sample_id_all; +# else + flags_data.flags.sample_id_all; +# endif + printf(", sample_id_all=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_HOST + attr->exclude_host; +# else + flags_data.flags.exclude_host; +# endif + printf(", exclude_host=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_GUEST + attr->exclude_guest; +# else + flags_data.flags.exclude_guest; +# endif + printf(", exclude_guest=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_KERNEL + attr->exclude_callchain_kernel; +# else + flags_data.flags.exclude_callchain_kernel; +# endif + printf(", exclude_callchain_kernel=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_EXCLUDE_CALLCHAIN_USER + attr->exclude_callchain_user; +# else + flags_data.flags.exclude_callchain_user; +# endif + printf(", exclude_callchain_user=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_MMAP2 + attr->mmap2; +# else + flags_data.flags.mmap2; +# endif + printf(", mmap2=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_COMM_EXEC + attr->comm_exec; +# else + flags_data.flags.comm_exec; +# endif + printf(", comm_exec=%" PRIu64, val); + + use_clockid = val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_USE_CLOCKID + attr->use_clockid; +# else + flags_data.flags.use_clockid; +# endif + printf(", use_clockid=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONTEXT_SWITCH + attr->context_switch; +# else + flags_data.flags.context_switch; +# endif + printf(", context_switch=%" PRIu64, val); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_WRITE_BACKWARD + attr->write_backward; +# else + flags_data.flags.write_backward; +# endif + printf(", write_backward=%" PRIu64, val); + + val = flags_data.flags.__reserved_1; + if (val) + printf(", __reserved_1=%#" PRIx64 " /* Bits 63..28 */", val); + + printf(", %s=%u", + attr->watermark ? "wakeup_watermark" : "wakeup_events", + attr->watermark ? attr->wakeup_watermark : attr->wakeup_events); + + if (attr->type == PERF_TYPE_BREAKPOINT) + printf(", bp_type=%s", bp_type); + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG1 + attr->config1; +# else + ((uint64_t *) attr)[56 / sizeof(uint64_t)]; +# endif + printf(", %s=%#" PRIx64, + attr->type == PERF_TYPE_BREAKPOINT ? "bp_addr" : "config1", + val); + + /* End of version 0 of the structure */ + if (size <= 64) { + cutoff = 64; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CONFIG2 + attr->config2; +# else + ((uint64_t *) attr)[64 / sizeof(uint64_t)]; +# endif + if (attr->type == PERF_TYPE_BREAKPOINT) + printf(", bp_len=%" PRIu64, val); + else + printf(", config2=%#" PRIx64, val); + + /* End of version 1 of the structure */ + if (size <= 72) { + cutoff = 72; + goto end; + } + + /* + * Print branch sample type only in case PERF_SAMPLE_BRANCH_STACK + * is set in the sample_type field. + */ + if (attr->sample_type & (1 << 11)) + printf(", branch_sample_type=%s", branch_sample_type); + + /* End of version 2 of the structure */ + if (size <= 80) { + cutoff = 80; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_USER + attr->sample_regs_user; +# else + ((uint64_t *) attr)[80 / sizeof(uint64_t)]; +# endif + printf(", sample_regs_user=%#" PRIx64, val); + + if (size <= 88) { + cutoff = 88; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_STACK_USER + attr->sample_stack_user; +# else + ((uint32_t *) attr)[88 / sizeof(uint32_t)]; +# endif + /* + * Print branch sample type only in case PERF_SAMPLE_STACK_USER + * is set in the sample_type field. + */ + if (attr->sample_type & (1 << 13)) + printf(", sample_stack_user=%#" PRIx32, (uint32_t) val); + + if (size <= 92) { + cutoff = 92; + goto end; + } + + if (use_clockid) + printf(", clockid=%s", clockid); + + /* End of version 3 of the structure */ + if (size <= 96) { + cutoff = 96; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_REGS_INTR + attr->sample_regs_intr; +# else + ((uint64_t *) attr)[96 / sizeof(uint64_t)]; +# endif + printf(", sample_regs_intr=%#" PRIx64, val); + + /* End of version 4 of the structure */ + if (size <= 104) { + cutoff =104; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_AUX_WATERMARK + attr->aux_watermark; +# else + ((uint32_t *) attr)[104 / sizeof(uint32_t)]; +# endif + printf(", aux_watermark=%" PRIu32, (uint32_t) val); + + if (size <= 108) { + cutoff =108; + goto end; + } + + val = +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_SAMPLE_MAX_STACK + attr->sample_max_stack; +# else + ((uint16_t *) attr)[108 / sizeof(uint16_t)]; +# endif + printf(", sample_max_stack=%" PRIu16, (uint16_t) val); + + if (size <= 110) { + cutoff =110; + goto end; + } + + cutoff = STRACE_PEA_SIZE; + +end: + if (size > cutoff) + printf(", ..."); + + printf("}"); +# endif /* !VERBOSE */ + + free(attr); +} + +/* These require aligned access, so no byte-grain checks possible */ +# if defined SPARC || defined SPARC64 || defined POWERPC || defined POWERPC64 +# define ATTR_REC(sz) { tail_alloc((sz + 7) & ~7), sz } +# else +# define ATTR_REC(sz) { tail_alloc(sz), sz } +# endif + +# define BRANCH_TYPE_ALL \ + "PERF_SAMPLE_BRANCH_USER|" \ + "PERF_SAMPLE_BRANCH_KERNEL|" \ + "PERF_SAMPLE_BRANCH_HV|" \ + "PERF_SAMPLE_BRANCH_ANY|" \ + "PERF_SAMPLE_BRANCH_ANY_CALL|" \ + "PERF_SAMPLE_BRANCH_ANY_RETURN|" \ + "PERF_SAMPLE_BRANCH_IND_CALL|" \ + "PERF_SAMPLE_BRANCH_ABORT_TX|" \ + "PERF_SAMPLE_BRANCH_IN_TX|" \ + "PERF_SAMPLE_BRANCH_NO_TX|" \ + "PERF_SAMPLE_BRANCH_COND|" \ + "PERF_SAMPLE_BRANCH_CALL_STACK|" \ + "PERF_SAMPLE_BRANCH_IND_JUMP|" \ + "PERF_SAMPLE_BRANCH_CALL|" \ + "PERF_SAMPLE_BRANCH_NO_FLAGS|" \ + "PERF_SAMPLE_BRANCH_NO_CYCLES" + int main(void) { - struct perf_event_attr *attr = tail_alloc(sizeof(*attr)); + static const size_t attr_small_size = PERF_ATTR_SIZE_VER0 - 8; + static const size_t attr_v0_size = PERF_ATTR_SIZE_VER0; + static const size_t attr_v1_size = PERF_ATTR_SIZE_VER1; + static const size_t attr_v2_size = PERF_ATTR_SIZE_VER2; + static const size_t attr_v2_5_size = PERF_ATTR_SIZE_VER2 + 8; + static const size_t attr_v2_75_size = PERF_ATTR_SIZE_VER2 + 12; + static const size_t attr_v3_size = PERF_ATTR_SIZE_VER3; + static const size_t attr_v4_size = PERF_ATTR_SIZE_VER4; + static const size_t attr_v4_5_size = PERF_ATTR_SIZE_VER4 + 4; + static const size_t attr_v4_625_size = PERF_ATTR_SIZE_VER4 + 5; + static const size_t attr_v4_875_size = PERF_ATTR_SIZE_VER4 + 7; + static const size_t attr_v5_size = PERF_ATTR_SIZE_VER5; + static const size_t attr_big_size = PERF_ATTR_SIZE_VER5 + 32; + + static const struct u64_val_str attr_types[] = { + { ARG_STR(PERF_TYPE_HARDWARE) }, + { ARG_STR(PERF_TYPE_SOFTWARE) }, + { ARG_STR(PERF_TYPE_TRACEPOINT) }, + { ARG_STR(PERF_TYPE_HW_CACHE) }, + { ARG_STR(PERF_TYPE_RAW) }, + { ARG_STR(PERF_TYPE_BREAKPOINT) }, + { ARG_STR(0x6) " /* PERF_TYPE_??? */" }, + { ARG_STR(0xdeadc0de) " /* PERF_TYPE_??? */" }, + }; + static const struct u64_val_str + attr_configs[ARRAY_SIZE(attr_types)][3] = { + /* PERF_TYPE_HARDWARE */ { + { 9, "PERF_COUNT_HW_REF_CPU_CYCLES" }, + { 10, "0xa /* PERF_COUNT_HW_??? */" }, + { ARG_ULL_STR(0xfaceca75deadb0d4) + " /* PERF_COUNT_HW_??? */" }, + }, + /* PERF_TYPE_SOFTWARE */ { + { 10, "PERF_COUNT_SW_BPF_OUTPUT" }, + { 11, "0xb /* PERF_COUNT_SW_??? */" }, + { ARG_ULL_STR(0xdec0ded1dec0ded2) + " /* PERF_COUNT_SW_??? */" }, + }, + /* PERF_TYPE_TRACEPOINT */ { + { ARG_STR(0) }, + { 4207856245U, "4207856245" }, + { ARG_ULL_STR(16051074073505095380) }, + }, + /* PERF_TYPE_HW_CACHE */ { + { 0, "PERF_COUNT_HW_CACHE_L1D|" + "PERF_COUNT_HW_CACHE_OP_READ<<8|" + "PERF_COUNT_HW_CACHE_RESULT_ACCESS<<16" }, + { 0x020207, "0x7 /* PERF_COUNT_HW_CACHE_??? */|" + "PERF_COUNT_HW_CACHE_OP_PREFETCH<<8|" + "0x2 /* PERF_COUNT_HW_CACHE_RESULT_??? */<<16" }, + { 0xdeadf157ed010306ULL, "PERF_COUNT_HW_CACHE_NODE|" + "0x3 /* PERF_COUNT_HW_CACHE_OP_??? */<<8|" + "PERF_COUNT_HW_CACHE_RESULT_MISS<<16|" + "0xdeadf157ed<<24 " + "/* PERF_COUNT_HW_CACHE_??? */" }, + }, + /* PERF_TYPE_RAW */ { + { ARG_STR(0) }, + { ARG_STR(0xda7a1057) }, + { ARG_ULL_STR(0xdec0ded7dec0ded8) }, + }, + /* PERF_TYPE_BREAKPOINT */ { + { ARG_STR(0) }, + { ARG_STR(0xbadc0ded) }, + { ARG_ULL_STR(0xdec0ded9dec0deda) }, + }, + /* invalid 1 */ { + { ARG_STR(0) }, + { ARG_STR(0xbeeff00d) }, + { ARG_ULL_STR(0xdec0dedbdec0dedc) }, + }, + /* invalid 2 */ { + { ARG_STR(0) }, + { ARG_STR(0xca75dead) }, + { ARG_ULL_STR(0xdec0dedddec0dede) }, + }, + }; + static const struct u64_val_str sample_types[] = { + { ARG_STR(0) }, + { 0x800, "PERF_SAMPLE_BRANCH_STACK" }, + { ARG_ULL_STR(0xdeadc0deda780000) " /* PERF_SAMPLE_??? */" }, + { 0xffffffffffffffffULL, + "PERF_SAMPLE_IP|PERF_SAMPLE_TID|PERF_SAMPLE_TIME|" + "PERF_SAMPLE_ADDR|PERF_SAMPLE_READ|" + "PERF_SAMPLE_CALLCHAIN|PERF_SAMPLE_ID|PERF_SAMPLE_CPU|" + "PERF_SAMPLE_PERIOD|PERF_SAMPLE_STREAM_ID|" + "PERF_SAMPLE_RAW|PERF_SAMPLE_BRANCH_STACK|" + "PERF_SAMPLE_REGS_USER|PERF_SAMPLE_STACK_USER|" + "PERF_SAMPLE_WEIGHT|PERF_SAMPLE_DATA_SRC|" + "PERF_SAMPLE_IDENTIFIER|PERF_SAMPLE_TRANSACTION|" + "PERF_SAMPLE_REGS_INTR|0xfffffffffff80000" }, + }; + static const struct u64_val_str read_formats[] = { + { ARG_STR(0) }, + { ARG_STR(PERF_FORMAT_TOTAL_TIME_ENABLED) }, + { 0xf, "PERF_FORMAT_TOTAL_TIME_ENABLED|" + "PERF_FORMAT_TOTAL_TIME_RUNNING|" + "PERF_FORMAT_ID|PERF_FORMAT_GROUP" }, + { ARG_ULL_STR(0xdeadf157dec0ded0) " /* PERF_FORMAT_??? */" }, + { 0xffffffffffffffffULL, + "PERF_FORMAT_TOTAL_TIME_ENABLED|" + "PERF_FORMAT_TOTAL_TIME_RUNNING|" + "PERF_FORMAT_ID|PERF_FORMAT_GROUP|" + "0xfffffffffffffff0" }, + }; + static const char *precise_ip_descs[] = { + "arbitrary skid", + "constant skid", + "requested to have 0 skid", + "must have 0 skid", + }; + static const struct u32_val_str bp_types[] = { + { 0, "HW_BREAKPOINT_EMPTY" }, + { 1, "HW_BREAKPOINT_R" }, + { 3, "HW_BREAKPOINT_RW" }, + { 5, "0x5 /* HW_BREAKPOINT_INVALID */" }, + { 8, "0x8 /* HW_BREAKPOINT_??? */" }, + { ARG_STR(0xface1e55) " /* HW_BREAKPOINT_??? */" }, + }; + static const struct u64_val_str branch_sample_types[] = { + { ARG_STR(0) }, + { 0x80, "PERF_SAMPLE_BRANCH_ABORT_TX" }, + { 0xffff, BRANCH_TYPE_ALL }, + { ARG_ULL_STR(0xdeadcaffeeed0000) + " /* PERF_SAMPLE_BRANCH_??? */" }, + { 0xffffffffffffffffULL, + BRANCH_TYPE_ALL "|0xffffffffffff0000" } + }; + static const struct s32_val_str clockids[] = { + { 11, "CLOCK_TAI" }, + { ARG_STR(0xc) " /* CLOCK_??? */" }, + { ARG_STR(0xbeeffeed) " /* CLOCK_??? */" }, + }; + - attr->type = PERF_TYPE_HARDWARE; - attr->size = sizeof(*attr); + struct { + struct perf_event_attr *ptr; + size_t size; + } attrs[] = { + ATTR_REC(sizeof(struct perf_event_attr)), + ATTR_REC(attr_v0_size), + ATTR_REC(attr_v1_size), + ATTR_REC(attr_v2_size), + ATTR_REC(attr_v2_5_size), + ATTR_REC(attr_v2_75_size), + ATTR_REC(attr_v3_size), + ATTR_REC(attr_v4_size), + ATTR_REC(attr_v4_5_size), + ATTR_REC(attr_v4_625_size), + ATTR_REC(attr_v4_875_size), + ATTR_REC(attr_v5_size), + ATTR_REC(attr_big_size), + }; + + struct perf_event_attr *small_attr = tail_alloc(sizeof(*small_attr)); struct { struct perf_event_attr *attr; @@ -75,31 +691,123 @@ main(void) unsigned long flags; const char *flags_str; } args[] = { - { NULL, 0xfacef00d, 0xbadabba7, -1, + { NULL, 0xfacef00d, 0xbadabba7, -1, (unsigned long) 0xFFFFFFFFFFFFFFFFLLU, "PERF_FLAG_FD_NO_GROUP|PERF_FLAG_FD_OUTPUT|" "PERF_FLAG_PID_CGROUP|PERF_FLAG_FD_CLOEXEC|" "0x" LONG_STR_PREFIX "fffffff0" }, - { attr + 1, 0, 0, 0, + { small_attr + 1, 0, 0, 0, 0, "0" }, - { attr, -1, -1, 1, - PERF_FLAG_FD_CLOEXEC, "PERF_FLAG_FD_CLOEXEC" }, - { attr - 1, -100, 100, 0xface1e55, + { small_attr, -1, -1, 1, PERF_FLAG_FD_NO_GROUP | PERF_FLAG_FD_OUTPUT | PERF_FLAG_PID_CGROUP | PERF_FLAG_FD_CLOEXEC, "PERF_FLAG_FD_NO_GROUP|PERF_FLAG_FD_OUTPUT|" "PERF_FLAG_PID_CGROUP|PERF_FLAG_FD_CLOEXEC" }, + { (struct perf_event_attr *) (uintptr_t) 0xfffffacefffffeedULL, + -100, 100, 0xface1e55, + PERF_FLAG_FD_CLOEXEC, "PERF_FLAG_FD_CLOEXEC" }, }; + size_t i; int rc; + fill_memory(small_attr, sizeof(*small_attr)); + small_attr->size = attr_small_size; + for (i = 0; i < ARRAY_SIZE(args); i++) { rc = syscall(__NR_perf_event_open, args[i].attr, args[i].pid, - args[i].cpu, args[i].group_fd, args[i].flags); + args[i].cpu, args[i].group_fd, args[i].flags); printf("perf_event_open(%s, %d, %d, %d, %s) = %s\n", - printaddr(args[i].attr), args[i].pid, args[i].cpu, - args[i].group_fd, args[i].flags_str, sprintrc(rc)); + printaddr(args[i].attr), args[i].pid, args[i].cpu, + args[i].group_fd, args[i].flags_str, sprintrc(rc)); + } + + for (i = 0; i < ARRAY_SIZE(attrs) * ARRAY_SIZE(attr_types) * + ARRAY_SIZE(attr_configs[0]) + 1; i++) { + struct perf_event_attr *attr = attrs[i % ARRAY_SIZE(attrs)].ptr; + uint32_t size = attrs[i % ARRAY_SIZE(attrs)].size; + unsigned char fill_start = 0x80 + i; + size_t type_idx = i % ARRAY_SIZE(attr_types); + size_t config_idx = i % ARRAY_SIZE(attr_configs[0]); + size_t sample_type_idx = i % ARRAY_SIZE(sample_types); + size_t read_format_idx = i % ARRAY_SIZE(read_formats); + size_t bp_type_idx = (i / ARRAY_SIZE(attr_configs[0])) % + ARRAY_SIZE(bp_types); + size_t branch_sample_type_idx = (i / ARRAY_SIZE(sample_types)) % + ARRAY_SIZE(branch_sample_types); + size_t clockid_idx = i % ARRAY_SIZE(clockids); + size_t args_idx = i % ARRAY_SIZE(args); + const char *ip_desc_str; + + fill_memory_ex(attr, size, fill_start, 0xff); + + attr->type = attr_types[type_idx].val; + attr->size = size; + attr->config = attr_configs[type_idx][config_idx].val; + attr->sample_type = sample_types[sample_type_idx].val; + attr->read_format = read_formats[read_format_idx].val; + + if ((i % 11) == 5) + attr->__reserved_1 = 0; + +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_BP_TYPE + attr->bp_type = +# else + ((uint32_t *) attr)[52 / sizeof(uint32_t)] = +# endif + bp_types[bp_type_idx].val; + + if (size >= 80) +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_BRANCH_SAMPLE_TYPE + attr->branch_sample_type = +# else + ((uint64_t *) attr)[72 / sizeof(uint64_t)] = +# endif + branch_sample_types[branch_sample_type_idx].val; + + if (size >= 96) +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_CLOCKID + attr->clockid = +# else + ((uint32_t *) attr)[92 / sizeof(uint32_t)] = +# endif + clockids[clockid_idx].val; + +# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_PRECISE_IP + ip_desc_str = precise_ip_descs[attr->precise_ip]; +# else + union { + struct pea_flags flags; + uint64_t raw; + } flags_data = { .raw = ((uint64_t *) attr)[5] }; + + ip_desc_str = precise_ip_descs[flags_data.flags.precise_ip]; +# endif + + if (i == 0) + attr->size = size + 8; + + if (i == 1) + attr->size = 0; + + rc = syscall(__NR_perf_event_open, attr, args[args_idx].pid, + args[args_idx].cpu, args[args_idx].group_fd, + args[args_idx].flags); + + printf("perf_event_open("); + print_event_attr(attr, i ? ((i == 1) ? 0 : size) : size + 8, + attr_types[type_idx].str, + attr_configs[type_idx][config_idx].str, + sample_types[sample_type_idx].str, + read_formats[read_format_idx].str, + ip_desc_str, + bp_types[bp_type_idx].str, + branch_sample_types[branch_sample_type_idx].str, + clockids[clockid_idx].str, size); + printf(", %d, %d, %d, %s) = %s\n", args[args_idx].pid, + args[args_idx].cpu, args[args_idx].group_fd, + args[args_idx].flags_str, sprintrc(rc)); } puts("+++ exited with 0 +++"); diff --git a/tests/perf_event_open.test b/tests/perf_event_open.test index 0e46556a9..499134b40 100755 --- a/tests/perf_event_open.test +++ b/tests/perf_event_open.test @@ -1,6 +1,7 @@ #!/bin/sh -# Check decoding of perf_event_open syscall. +# Check perf_event_open syscall decoding. . "${srcdir=.}/init.sh" -run_strace_match_diff -a34 + +run_strace_match_diff -a1 diff --git a/tests/perf_event_open_nonverbose.c b/tests/perf_event_open_nonverbose.c new file mode 100644 index 000000000..45d7c8f23 --- /dev/null +++ b/tests/perf_event_open_nonverbose.c @@ -0,0 +1,113 @@ +/* + * Check decoding of perf_event_open syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined(__NR_perf_event_open) && defined(HAVE_LINUX_PERF_EVENT_H) + +# include +# include +# include + +# include + +# include "xlat.h" +# include "xlat/perf_event_open_flags.h" + +#if ULONG_MAX > UINT_MAX +#define LONG_STR_PREFIX "ffffffff" +#else +#define LONG_STR_PREFIX "" +#endif + +static const char *printaddr(void *ptr) +{ + static char buf[sizeof("0x") + sizeof(void *) * 2]; + + if (ptr == NULL) + return "NULL"; + + snprintf(buf, sizeof(buf), "%#lx", (unsigned long)ptr); + + return buf; +} + +int +main(void) +{ + struct perf_event_attr *attr = tail_alloc(sizeof(*attr)); + + attr->type = PERF_TYPE_HARDWARE; + attr->size = sizeof(*attr); + + struct { + struct perf_event_attr *attr; + pid_t pid; + int cpu; + int group_fd; + unsigned long flags; + const char *flags_str; + } args[] = { + { NULL, 0xfacef00d, 0xbadabba7, -1, + (unsigned long) 0xFFFFFFFFFFFFFFFFLLU, + "PERF_FLAG_FD_NO_GROUP|PERF_FLAG_FD_OUTPUT|" + "PERF_FLAG_PID_CGROUP|PERF_FLAG_FD_CLOEXEC|" + "0x" LONG_STR_PREFIX "fffffff0" + }, + { attr + 1, 0, 0, 0, + 0, "0" }, + { attr, -1, -1, 1, + PERF_FLAG_FD_CLOEXEC, "PERF_FLAG_FD_CLOEXEC" }, + { attr - 1, -100, 100, 0xface1e55, + PERF_FLAG_FD_NO_GROUP | PERF_FLAG_FD_OUTPUT | + PERF_FLAG_PID_CGROUP | PERF_FLAG_FD_CLOEXEC, + "PERF_FLAG_FD_NO_GROUP|PERF_FLAG_FD_OUTPUT|" + "PERF_FLAG_PID_CGROUP|PERF_FLAG_FD_CLOEXEC" }, + }; + size_t i; + int rc; + + for (i = 0; i < ARRAY_SIZE(args); i++) { + rc = syscall(__NR_perf_event_open, args[i].attr, args[i].pid, + args[i].cpu, args[i].group_fd, args[i].flags); + printf("perf_event_open(%s, %d, %d, %d, %s) = %s\n", + printaddr(args[i].attr), args[i].pid, args[i].cpu, + args[i].group_fd, args[i].flags_str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_perf_event_open && HAVE_LINUX_PERF_EVENT_H"); + +#endif diff --git a/tests/perf_event_open_nonverbose.test b/tests/perf_event_open_nonverbose.test new file mode 100755 index 000000000..404827fed --- /dev/null +++ b/tests/perf_event_open_nonverbose.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of perf_event_open syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a34 -e verbose=none -e trace=perf_event_open diff --git a/tests/perf_event_open_unabbrev.c b/tests/perf_event_open_unabbrev.c new file mode 100644 index 000000000..c2f260dea --- /dev/null +++ b/tests/perf_event_open_unabbrev.c @@ -0,0 +1,2 @@ +#define VERBOSE 1 +#include "perf_event_open.c" diff --git a/tests/perf_event_open_unabbrev.test b/tests/perf_event_open_unabbrev.test new file mode 100755 index 000000000..f17fd17e8 --- /dev/null +++ b/tests/perf_event_open_unabbrev.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check perf_event_open syscall decoding. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a1 -v -e trace=perf_event_open diff --git a/tests/pipe.c b/tests/pipe.c index 68217f208..41c7f2154 100644 --- a/tests/pipe.c +++ b/tests/pipe.c @@ -1,4 +1,6 @@ /* + * Check decoding of pipe syscall. + * * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * @@ -26,8 +28,9 @@ */ #include "tests.h" +#include -#ifdef HAVE_PIPE2 +#ifdef __NR_pipe # include # include @@ -38,20 +41,15 @@ main(void) { (void) close(0); (void) close(1); - int fds[2]; + int *const fds = tail_alloc(sizeof(*fds) * 2); if (pipe(fds)) perror_msg_and_fail("pipe"); - (void) close(0); - (void) close(1); - if (pipe2(fds, O_NONBLOCK)) - perror_msg_and_skip("pipe2"); - return 0; } #else -SKIP_MAIN_UNDEFINED("HAVE_PIPE2") +SKIP_MAIN_UNDEFINED("__NR_pipe") #endif diff --git a/tests/pipe.expected b/tests/pipe.expected index 675cb85b2..2e46336c3 100644 --- a/tests/pipe.expected +++ b/tests/pipe.expected @@ -1,2 +1,2 @@ -pipe(\(\[0, 1\]|2\(\[0, 1\], 0)\) += 0 -pipe2\(\[0, 1\], O_NONBLOCK\) += 0 +pipe([0, 1]) = 0 ++++ exited with 0 +++ diff --git a/tests/pipe.test b/tests/pipe.test index a445f86e1..0ae414d49 100755 --- a/tests/pipe.test +++ b/tests/pipe.test @@ -1,16 +1,13 @@ #!/bin/sh -# Check pipe/pipe2 syscalls decoding. - +# Check decoding of pipe syscall. . "${srcdir=.}/init.sh" -syscall=pipe2 -for n in pipe; do - $STRACE -e$n -h > /dev/null && syscall=$syscall,$n -done - run_prog -run_strace -e$syscall $args -match_grep +run_strace -a13 -epipe $args + +check_prog grep +LC_ALL=C grep -x "pipe(.*" "$LOG" > /dev/null || + skip_ 'test executable does not use pipe syscall' -exit 0 +match_diff diff --git a/tests/pipe2.c b/tests/pipe2.c new file mode 100644 index 000000000..375ae74f1 --- /dev/null +++ b/tests/pipe2.c @@ -0,0 +1,71 @@ +/* + * Check decoding of pipe2 syscall. + * + * Copyright (c) 2015-2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_pipe2 + +# include +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_zero = + (kernel_ulong_t) 0xffffffff00000000ULL; + int *const fds = tail_alloc(sizeof(*fds) * 2); + int *const efault = fds + 1; + long rc; + + rc = syscall(__NR_pipe2, fds, bogus_zero | O_NONBLOCK); + if (rc) + perror_msg_and_skip("pipe2"); + printf("pipe2([%d, %d], O_NONBLOCK) = 0\n", fds[0], fds[1]); + + rc = syscall(__NR_pipe2, efault, bogus_zero); + printf("pipe2(%p, 0) = %s\n", efault, sprintrc(rc)); + + if (F8ILL_KULONG_SUPPORTED) { + const kernel_ulong_t ill = f8ill_ptr_to_kulong(fds); + rc = syscall(__NR_pipe2, ill, 0); + printf("pipe2(%#llx, 0) = %s\n", + (unsigned long long) ill, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pipe2") + +#endif diff --git a/tests/pipe2.test b/tests/pipe2.test new file mode 100755 index 000000000..aff6cd443 --- /dev/null +++ b/tests/pipe2.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pipe2 syscall. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a15 diff --git a/tests/pipe_maxfd.c b/tests/pipe_maxfd.c new file mode 100644 index 000000000..a1343f917 --- /dev/null +++ b/tests/pipe_maxfd.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +static void +move_fd(int *from, int *to) +{ + for (; *to > *from; --*to) { + if (dup2(*from, *to) != *to) + continue; + close(*from); + *from = *to; + break; + } +} + +void +pipe_maxfd(int pipefd[2]) +{ + struct rlimit rlim; + if (getrlimit(RLIMIT_NOFILE, &rlim)) + perror_msg_and_fail("getrlimit"); + if (rlim.rlim_cur < rlim.rlim_max) { + struct rlimit rlim_new; + rlim_new.rlim_cur = rlim_new.rlim_max = rlim.rlim_max; + if (!setrlimit(RLIMIT_NOFILE, &rlim_new)) + rlim.rlim_cur = rlim.rlim_max; + } + + if (pipe(pipefd)) + perror_msg_and_fail("pipe"); + + int max_fd = (rlim.rlim_cur > 0 && rlim.rlim_cur < INT_MAX) + ? rlim.rlim_cur - 1 : INT_MAX; + + move_fd(&pipefd[1], &max_fd); + --max_fd; + move_fd(&pipefd[0], &max_fd); +} diff --git a/tests/pkey_alloc.c b/tests/pkey_alloc.c new file mode 100644 index 000000000..457727873 --- /dev/null +++ b/tests/pkey_alloc.c @@ -0,0 +1,84 @@ +/* + * Check decoding of pkey_alloc syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_pkey_alloc + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t flags[] = { + 0, + (kernel_ulong_t) 0xbadc0ded00000000ULL, + (kernel_ulong_t) 0xffff0000eeee1111ULL, + (kernel_ulong_t) 0x123456789abcdef0ULL, + }; + static const struct { + kernel_ulong_t val; + const char *str; + } rights[] = { + { (kernel_ulong_t) 0xbadc0ded00000002ULL, + sizeof(kernel_ulong_t) > sizeof(int) ? + "PKEY_DISABLE_WRITE|0xbadc0ded00000000" : + "PKEY_DISABLE_WRITE" }, + { 0xdec0ded, "PKEY_DISABLE_ACCESS|0xdec0dec" }, + { 0x3, "PKEY_DISABLE_ACCESS|PKEY_DISABLE_WRITE" }, + { ARG_STR(0) }, + { 0xbadc0dec, "0xbadc0dec /* PKEY_??? */" }, + }; + + long rc; + unsigned int i; + unsigned int j; + + for (i = 0; i < ARRAY_SIZE(flags); i++) { + for (j = 0; j < ARRAY_SIZE(rights); j++) { + rc = syscall(__NR_pkey_alloc, flags[i], rights[j].val); + printf("pkey_alloc(%#llx, %s) = %s\n", + (unsigned long long) flags[i], rights[j].str, + sprintrc(rc)); + } + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pkey_alloc"); + +#endif diff --git a/tests/pkey_alloc.test b/tests/pkey_alloc.test new file mode 100755 index 000000000..f168c21a1 --- /dev/null +++ b/tests/pkey_alloc.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pkey_alloc syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a17 diff --git a/tests/pkey_free.c b/tests/pkey_free.c new file mode 100644 index 000000000..95a2ad263 --- /dev/null +++ b/tests/pkey_free.c @@ -0,0 +1,67 @@ +/* + * Check decoding of pkey_free syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_pkey_free + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t keys[] = { + 0, + 3141592653U, + (kernel_ulong_t) 0xbadc0ded00000000ULL, + (kernel_ulong_t) 0xffff00001111eeeeULL, + (kernel_ulong_t) 0x123456789abcdef0ULL, + }; + + long rc; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(keys); i++) { + rc = syscall(__NR_pkey_free, keys[i]); + printf("pkey_free(%d) = %s\n", (int) keys[i], sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pkey_free"); + +#endif diff --git a/tests/pkey_free.test b/tests/pkey_free.test new file mode 100755 index 000000000..9c01c3e75 --- /dev/null +++ b/tests/pkey_free.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pkey_free syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a13 diff --git a/tests/pkey_mprotect.c b/tests/pkey_mprotect.c new file mode 100644 index 000000000..529abd1f1 --- /dev/null +++ b/tests/pkey_mprotect.c @@ -0,0 +1,120 @@ +/* + * Check decoding of pkey_mprotect syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include "scno.h" + +#ifdef __NR_pkey_mprotect + +# include +# include +# include + +const char * +sprintptr(kernel_ulong_t ptr) +{ + static char buf[sizeof(ptr) * 2 + sizeof("0x")]; + + if (ptr) + snprintf(buf, sizeof(buf), "%#llx", (unsigned long long) ptr); + else + return "NULL"; + + return buf; +} + +int +main(void) +{ + static const kernel_ulong_t ptrs[] = { + 0, + (kernel_ulong_t) 0xfacebeef00000000ULL, + (kernel_ulong_t) 0xbadc0dedda7a1057ULL, + }; + static const kernel_ulong_t sizes[] = { + 0, + (kernel_ulong_t) 0xfacebeef00000000ULL, + (kernel_ulong_t) 0xfedcba9876543210ULL, + (kernel_ulong_t) 0x123456789abcdef0ULL, + (kernel_ulong_t) 0xbadc0dedda7a1057ULL, + }; + static const struct { + kernel_ulong_t val; + const char *str; + } prots[] = { + { ARG_STR(PROT_READ) }, + /* For now, only 0x0300001f are used */ + { (kernel_ulong_t) 0xdeadfeed00ca7500ULL, + sizeof(kernel_ulong_t) > sizeof(int) ? + "0xdeadfeed00ca7500 /* PROT_??? */" : + "0xca7500 /* PROT_??? */" }, + { ARG_STR(PROT_READ|PROT_WRITE|0xface00) }, + }; + static const kernel_ulong_t pkeys[] = { + 0, + -1LL, + (kernel_ulong_t) 0xface1e55, + (kernel_ulong_t) 0xbadc0ded00000001, + }; + + long rc; + unsigned int i; + unsigned int j; + unsigned int k; + unsigned int l; + + for (i = 0; i < ARRAY_SIZE(ptrs); i++) { + for (j = 0; j < ARRAY_SIZE(sizes); j++) { + for (k = 0; k < ARRAY_SIZE(prots); k++) { + for (l = 0; l < ARRAY_SIZE(pkeys); l++) { + rc = syscall(__NR_pkey_mprotect, + ptrs[i], sizes[j], + prots[k].val, pkeys[l]); + printf("pkey_mprotect(%s, %llu, %s, %d)" + " = %s\n", + sprintptr(ptrs[i]), + (unsigned long long) sizes[j], + prots[k].str, (int) pkeys[l], + sprintrc(rc)); + } + } + } + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_pkey_mprotect"); + +#endif diff --git a/tests/pkey_mprotect.test b/tests/pkey_mprotect.test new file mode 100755 index 000000000..922d4919f --- /dev/null +++ b/tests/pkey_mprotect.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of pkey_mprotect syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a37 diff --git a/tests/ppoll-v.expected b/tests/ppoll-v.expected index 5172717c8..31070ad16 100644 --- a/tests/ppoll-v.expected +++ b/tests/ppoll-v.expected @@ -1,3 +1,3 @@ -ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \{fd=3, events=POLLIN\|POLLPRI\}, \{fd=4, events=POLLOUT\}\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{42, 9[0-9]{8}\}\) -ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) +ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \{fd=3, events=POLLIN\|POLLPRI\}, \{fd=4, events=POLLOUT\}\], 4, \{tv_sec=42, tv_nsec=999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{tv_sec=42, tv_nsec=9[0-9]{8}\}\) +ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{tv_sec=0, tv_nsec=999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) = -1 EFAULT .* diff --git a/tests/ppoll.expected b/tests/ppoll.expected index 4dfc830d0..c38a2062a 100644 --- a/tests/ppoll.expected +++ b/tests/ppoll.expected @@ -1,3 +1,3 @@ -ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \.\.\.\], 4, \{42, 999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{42, 9[0-9]{8}\}\) -ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{0, 999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) +ppoll\(\[\{fd=0, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=1, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}, \.\.\.\], 4, \{tv_sec=42, tv_nsec=999999999\}, \[(USR2 CHLD|CHLD USR2)\], (4|8|16)\) = 2 \(\[\{fd=1, revents=POLLOUT(\|POLLWRNORM)?\}, \{fd=4, revents=POLLOUT\}\], left \{tv_sec=42, tv_nsec=9[0-9]{8}\}\) +ppoll\(\[\{fd=1, events=POLLIN\|POLLPRI\|POLLRDNORM\|POLLRDBAND\}, \{fd=0, events=POLLOUT(\|POLLWRNORM)?\|POLLWRBAND\}\], 2, \{tv_sec=0, tv_nsec=999\}, ~\[HUP KILL STOP[^]]*\], (4|8|16)\) = 0 \(Timeout\) ppoll\(NULL, 42, NULL, NULL, (4|8|16)\) = -1 EFAULT .* diff --git a/tests/prctl-arg2-intptr.c b/tests/prctl-arg2-intptr.c new file mode 100644 index 000000000..ee000ebe2 --- /dev/null +++ b/tests/prctl-arg2-intptr.c @@ -0,0 +1,120 @@ +/* + * Check decoding of prctl operations which use arg2 as pointer to an integer + * value: PR_GET_CHILD_SUBREAPER, PR_GET_ENDIAN, PR_GET_FPEMU, and PR_GET_FPEXC. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_prctl + +# include +# include +# include +# include + +static const char *errstr; + +static long +prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) +{ + static const kernel_ulong_t bogus_arg = + (kernel_ulong_t) 0xdeadbeefbadc0dedULL; + long rc = syscall(__NR_prctl, arg1, arg2, bogus_arg); + errstr = sprintrc(rc); + return rc; +} + +int +main(void) +{ + static const kernel_ulong_t bogus_addr1 = + (kernel_ulong_t) 0x1e55c0de00000000ULL; + static const kernel_ulong_t bogus_addr2 = + (kernel_ulong_t) 0xfffffffffffffffdULL; + static const kernel_ulong_t bogus_op_bits = + (kernel_ulong_t) 0xbadc0ded00000000ULL; + static const struct { + kernel_ulong_t val; + const char *str; + } options[] = { + { 37, "PR_GET_CHILD_SUBREAPER" }, + { 19, "PR_GET_ENDIAN" }, + { 9, "PR_GET_FPEMU" }, + { 11, "PR_GET_FPEXC" }, + }; + + unsigned int *ptr = tail_alloc(sizeof(*ptr)); + long rc; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(options); ++i) { + prctl(options[i].val | bogus_op_bits, 0); + printf("prctl(%s, NULL) = %s\n", options[i].str, errstr); + + if (bogus_addr1) { + prctl(options[i].val | bogus_op_bits, bogus_addr1); + printf("prctl(%s, %#llx) = %s\n", options[i].str, + (unsigned long long) bogus_addr1, errstr); + } + + prctl(options[i].val | bogus_op_bits, bogus_addr2); + printf("prctl(%s, %#llx) = %s\n", options[i].str, + (unsigned long long) bogus_addr2, errstr); + + prctl(options[i].val | bogus_op_bits, (uintptr_t) (ptr + 1)); + printf("prctl(%s, %p) = %s\n", options[i].str, + ptr + 1, errstr); + + rc = prctl(options[i].val | bogus_op_bits, (uintptr_t) ptr); + if (!rc) { + printf("prctl(%s, [%u]) = %s\n", + options[i].str, *ptr, errstr); + } else { + printf("prctl(%s, %p) = %s\n", + options[i].str, ptr, errstr); + } + + if (F8ILL_KULONG_SUPPORTED) { + kernel_ulong_t bogus_addr3 = f8ill_ptr_to_kulong(ptr); + prctl(options[i].val | bogus_op_bits, bogus_addr3); + printf("prctl(%s, %#llx) = %s\n", options[i].str, + (unsigned long long) bogus_addr3, errstr); + } + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl") + +#endif diff --git a/tests/prctl-arg2-intptr.test b/tests/prctl-arg2-intptr.test new file mode 100755 index 000000000..bcef80650 --- /dev/null +++ b/tests/prctl-arg2-intptr.test @@ -0,0 +1,14 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_CHILD_SUBREAPER, PR_GET_ENDIAN, PR_GET_FPEMU, +# and PR_GET_FPEXC operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a25 -eprctl $args > "$EXP" +LC_ALL=C grep -Ev '^prctl\(PR_[GS]ET_([^CEF]|.[^HNP]|..[^DEI])' \ + < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests/prctl-dumpable.c b/tests/prctl-dumpable.c new file mode 100644 index 000000000..1049bcee8 --- /dev/null +++ b/tests/prctl-dumpable.c @@ -0,0 +1,106 @@ +/* + * Check decoding of prctl PR_GET_DUMPABLE/PR_SET_DUMPABLE operations. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined PR_GET_DUMPABLE && defined PR_SET_DUMPABLE + +# include +# include + +static const char *errstr; + +static long +prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) +{ + static const kernel_ulong_t bogus_arg = + (kernel_ulong_t) 0xdeadbeefbadc0dedULL; + long rc = syscall(__NR_prctl, arg1, arg2, bogus_arg); + errstr = sprintrc(rc); + return rc; +} + +int +main(void) +{ + static const kernel_ulong_t bogus_dumpable1 = + (kernel_ulong_t) 0xdeadc0de00000001ULL; + static const kernel_ulong_t bogus_dumpable2 = + (kernel_ulong_t) 0xdeadc0defacebeefULL; + + static const char * const args[] = { + "SUID_DUMP_DISABLE", + "SUID_DUMP_USER", + "SUID_DUMP_ROOT", + }; + + unsigned int i; + + prctl(PR_SET_DUMPABLE, 3); + printf("prctl(PR_SET_DUMPABLE, 0x3 /* SUID_DUMP_??? */) = %s\n", + errstr); + + prctl(PR_SET_DUMPABLE, bogus_dumpable1); + if (bogus_dumpable1 == 1) { + printf("prctl(PR_SET_DUMPABLE, SUID_DUMP_USER) = %s\n", errstr); + } else { + printf("prctl(PR_SET_DUMPABLE, %#llx /* SUID_DUMP_??? */)" + " = %s\n", + (unsigned long long) bogus_dumpable1, errstr); + } + + prctl(PR_SET_DUMPABLE, bogus_dumpable2); + printf("prctl(PR_SET_DUMPABLE, %#llx /* SUID_DUMP_??? */) = %s\n", + (unsigned long long) bogus_dumpable2, errstr); + + for (i = 0; i < ARRAY_SIZE(args); ++i) { + prctl(PR_SET_DUMPABLE, i); + printf("prctl(PR_SET_DUMPABLE, %s) = %s\n", args[i], errstr); + + long rc = prctl(PR_GET_DUMPABLE, bogus_dumpable2); + if (rc >= 0 && rc < (long) ARRAY_SIZE(args)) { + printf("prctl(PR_GET_DUMPABLE) = %s (%s)\n", + errstr, args[rc]); + } else { + printf("prctl(PR_GET_DUMPABLE) = %s\n", errstr); + } + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_DUMPABLE && PR_SET_DUMPABLE") + +#endif diff --git a/tests/prctl-dumpable.test b/tests/prctl-dumpable.test new file mode 100755 index 000000000..08acb8b9a --- /dev/null +++ b/tests/prctl-dumpable.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_DUMPABLE and PR_SET_DUMPABLE operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a23 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^D][^U]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests/prctl-name.c b/tests/prctl-name.c new file mode 100644 index 000000000..308c275f2 --- /dev/null +++ b/tests/prctl-name.c @@ -0,0 +1,103 @@ +/* + * Check decoding of prctl PR_GET_NAME/PR_SET_NAME operations. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#ifdef HAVE_PRCTL +# include +#endif + +#if defined HAVE_PRCTL && defined PR_GET_NAME && defined PR_SET_NAME + +# include +# include +# include + +int +main(void) +{ + static const char str[] = "0123456789abcdef"; + static const int len = sizeof(str) - 1; + char *name = tail_memdup(str, sizeof(str)); + int i; + int rc; + + rc = prctl(PR_SET_NAME, NULL); + printf("prctl(PR_SET_NAME, NULL) = %s\n", sprintrc(rc)); + + for (i = 0; i <= len; ++i) { + rc = prctl(PR_SET_NAME, name + len - i); + printf("prctl(PR_SET_NAME, \"%.*s\"%s) = %s\n", + i < len - 1 ? i : len - 1, + str + len - i, + i < len - 1 ? "" : "...", + sprintrc(rc)); + } + + *name = -1; + ++name; + memcpy(name, str, len); + + for (i = 0; i <= len; ++i) { + rc = prctl(PR_SET_NAME, name + len - i); + if (i < len - 1) + printf("prctl(PR_SET_NAME, %p) = %s\n", + name + len - i, sprintrc(rc)); + else + printf("prctl(PR_SET_NAME, \"%.*s\"...) = %s\n", + len - 1, str + len - i, sprintrc(rc)); + } + + rc = prctl(PR_GET_NAME, NULL); + printf("prctl(PR_GET_NAME, NULL) = %s\n", sprintrc(rc)); + + for (i = 0; i < len; ++i) { + rc = prctl(PR_GET_NAME, name + len - i); + printf("prctl(PR_GET_NAME, %p) = %s\n", + name + len - i, sprintrc(rc)); + } + + rc = prctl(PR_GET_NAME, name); + if (rc) + printf("prctl(PR_GET_NAME, %p) = %s\n", + name, sprintrc(rc)); + else + printf("prctl(PR_GET_NAME, \"%.*s\") = %s\n", + len - 1, name, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_PRCTL && PR_GET_NAME && PR_SET_NAME") + +#endif diff --git a/tests/prctl-name.test b/tests/prctl-name.test new file mode 100755 index 000000000..071179c55 --- /dev/null +++ b/tests/prctl-name.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_NAME/PR_SET_NAME operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a23 -eprctl $args > "$EXP" +grep -v '^prctl(PR_GET_[^N][^A]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests/prctl-no-args.c b/tests/prctl-no-args.c new file mode 100644 index 000000000..57e1b733e --- /dev/null +++ b/tests/prctl-no-args.c @@ -0,0 +1,77 @@ +/* + * Check decoding of prctl operations without arguments and return code parsing: + * PR_GET_KEEPCAPS, PR_GET_SECCOMP, PR_GET_TIMERSLACK, PR_GET_TIMING, + * PR_TASK_PERF_EVENTS_DISABLE, and PR_TASK_PERF_EVENTS_ENABLE. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#if defined __NR_prctl + +# include +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_op_bits = + (kernel_ulong_t) 0xbadc0ded00000000ULL; + static const kernel_ulong_t bogus_arg = + (kernel_ulong_t) 0xfacefeeddeadbeefULL; + static const struct { + kernel_ulong_t val; + const char *str; + } options[] = { + { 7, "PR_GET_KEEPCAPS" }, + { 13, "PR_GET_TIMING" }, + { 21, "PR_GET_SECCOMP" }, + { 30, "PR_GET_TIMERSLACK" }, + { 31, "PR_TASK_PERF_EVENTS_DISABLE" }, + { 32, "PR_TASK_PERF_EVENTS_ENABLE" }, + }; + + unsigned int *ptr = tail_alloc(sizeof(*ptr)); + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(options); i++) { + long rc = syscall(__NR_prctl, options[i].val | bogus_op_bits, + bogus_arg); + printf("prctl(%s) = %s\n", options[i].str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl") + +#endif diff --git a/tests/prctl-no-args.test b/tests/prctl-no-args.test new file mode 100755 index 000000000..ce8ca67b7 --- /dev/null +++ b/tests/prctl-no-args.test @@ -0,0 +1,14 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_KEEPCAPS, PR_GET_SECCOMP, PR_GET_TIMERSLACK, +# PR_GET_TIMING, PR_TASK_PERF_EVENTS_DISABLE, and PR_TASK_PERF_EVENTS_ENABLE +# operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a21 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^KST][^EI][^CEM]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests/prctl-pdeathsig.c b/tests/prctl-pdeathsig.c new file mode 100644 index 000000000..c17603072 --- /dev/null +++ b/tests/prctl-pdeathsig.c @@ -0,0 +1,81 @@ +/* + * Check decoding of prctl PR_GET_PDEATHSIG/PR_SET_PDEATHSIG operations. + * + * Copyright (c) 2016 JingPiao Chen + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined PR_GET_PDEATHSIG && defined PR_SET_PDEATHSIG + +# include +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_signal = + (kernel_ulong_t) 0xbadc0deddeadfeedULL; + + int *pdeathsig = tail_alloc(sizeof(*pdeathsig)); + long rc; + + rc = syscall(__NR_prctl, PR_SET_PDEATHSIG, bogus_signal); + printf("prctl(PR_SET_PDEATHSIG, %llu) = %s\n", + (unsigned long long) bogus_signal, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_SET_PDEATHSIG, SIGINT); + printf("prctl(PR_SET_PDEATHSIG, SIGINT) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_PDEATHSIG, NULL); + printf("prctl(PR_GET_PDEATHSIG, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_PDEATHSIG, pdeathsig + 1); + printf("prctl(PR_GET_PDEATHSIG, %p) = %s\n", + pdeathsig + 1, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_PDEATHSIG, pdeathsig); + if (rc) { + printf("prctl(PR_GET_PDEATHSIG, %p) = %s\n", + pdeathsig, sprintrc(rc)); + } else { + printf("prctl(PR_GET_PDEATHSIG, [SIGINT]) = %s\n", + sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_PDEATHSIG && PR_SET_PDEATHSIG") + +#endif diff --git a/tests/prctl-pdeathsig.test b/tests/prctl-pdeathsig.test new file mode 100755 index 000000000..2777503ae --- /dev/null +++ b/tests/prctl-pdeathsig.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check prctl PR_GET_PDEATHSIG PR_SET_PDEATHSIG decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a30 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^P][^D]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests/prctl-securebits.c b/tests/prctl-securebits.c new file mode 100644 index 000000000..741973af9 --- /dev/null +++ b/tests/prctl-securebits.c @@ -0,0 +1,106 @@ +/* + * Check decoding of prctl PR_GET_SECUREBITS/PR_SET_SECUREBITS operations. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined PR_GET_SECUREBITS && defined PR_SET_SECUREBITS + +# include +# include + +# include "xlat.h" +# include "xlat/secbits.h" + +static const char *errstr; + +static long +prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) +{ + static const kernel_ulong_t bogus_arg = + (kernel_ulong_t) 0xdeadbeefbadc0dedULL; + long rc = syscall(__NR_prctl, arg1, arg2, bogus_arg); + errstr = sprintrc(rc); + return rc; +} + +int +main(void) +{ + static const kernel_ulong_t bits1 = + (kernel_ulong_t) 0xdeadc0defacebeefULL; + static const kernel_ulong_t bits2 = + (kernel_ulong_t) 0xbadc0ded00000000ULL; + static const kernel_ulong_t bits3 = + (kernel_ulong_t) 0xffULL; + + prctl(PR_SET_SECUREBITS, 0); + printf("prctl(PR_SET_SECUREBITS, 0) = %s\n", errstr); + + prctl(PR_SET_SECUREBITS, bits1); + printf("prctl(PR_SET_SECUREBITS, SECBIT_NOROOT|SECBIT_NOROOT_LOCKED|" + "SECBIT_NO_SETUID_FIXUP|SECBIT_NO_SETUID_FIXUP_LOCKED|" + "SECBIT_KEEP_CAPS_LOCKED|SECBIT_NO_CAP_AMBIENT_RAISE|" + "SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED|%#llx) = %s\n", + (unsigned long long) bits1 & ~0xffULL, errstr); + + if (bits2) { + prctl(PR_SET_SECUREBITS, bits2); + printf("prctl(PR_SET_SECUREBITS, %#llx /* SECBIT_??? */)" + " = %s\n", (unsigned long long) bits2, errstr); + } + + prctl(PR_SET_SECUREBITS, bits3); + printf("prctl(PR_SET_SECUREBITS, SECBIT_NOROOT|SECBIT_NOROOT_LOCKED|" + "SECBIT_NO_SETUID_FIXUP|SECBIT_NO_SETUID_FIXUP_LOCKED|" + "SECBIT_KEEP_CAPS|SECBIT_KEEP_CAPS_LOCKED|" + "SECBIT_NO_CAP_AMBIENT_RAISE|SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED)" + " = %s\n", errstr); + + long rc = prctl(PR_GET_SECUREBITS, bits1); + printf("prctl(PR_GET_SECUREBITS) = %s", errstr); + if (rc > 0) { + printf(" ("); + printflags(secbits, rc, NULL); + printf(")"); + } + + puts(""); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_SECUREBITS && PR_SET_SECUREBITS") + +#endif diff --git a/tests/prctl-securebits.test b/tests/prctl-securebits.test new file mode 100755 index 000000000..c91e62a61 --- /dev/null +++ b/tests/prctl-securebits.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_SECUREBITS/PR_SET_SECUREBITS operations. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a25 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^S][^E][^C][^U]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests/prctl-tid_address.c b/tests/prctl-tid_address.c new file mode 100644 index 000000000..24e45031b --- /dev/null +++ b/tests/prctl-tid_address.c @@ -0,0 +1,103 @@ +/* + * Check decoding of prctl PR_GET_TID_ADDRESS operation. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined __NR_set_tid_address && \ + defined PR_GET_TID_ADDRESS + +# include +# include +# include + +static const char * +sprintaddr(kernel_ulong_t addr) +{ + static char buf[sizeof("0x") + sizeof(addr) * 2]; + + if (addr) { + snprintf(buf, sizeof(buf), "%#llx", (unsigned long long) addr); + + return buf; + } + + return "NULL"; +} + +int +main(void) +{ + static const kernel_ulong_t bogus_addr = + (kernel_ulong_t) 0xfffffffffffffffdULL; + + /* Note that kernel puts kernel-sized pointer even on x32 */ + kernel_ulong_t *ptr = tail_alloc(sizeof(*ptr)); + long rc; + long set_ok; + + *ptr = (kernel_ulong_t) 0xbadc0dedda7a1057ULL; + + rc = syscall(__NR_prctl, PR_GET_TID_ADDRESS, NULL); + printf("prctl(PR_GET_TID_ADDRESS, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TID_ADDRESS, bogus_addr); + printf("prctl(PR_GET_TID_ADDRESS, %#llx) = %s\n", + (unsigned long long) bogus_addr, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TID_ADDRESS, ptr); + if (rc) { + printf("prctl(PR_GET_TID_ADDRESS, %p) = %s\n", + ptr, sprintrc(rc)); + } else { + printf("prctl(PR_GET_TID_ADDRESS, [%s]) = %s\n", + sprintaddr(*ptr), sprintrc(rc)); + } + + set_ok = syscall(__NR_set_tid_address, bogus_addr); + + rc = syscall(__NR_prctl, PR_GET_TID_ADDRESS, ptr); + if (rc) { + printf("prctl(PR_GET_TID_ADDRESS, %p) = %s\n", + ptr, sprintrc(rc)); + } else { + printf("prctl(PR_GET_TID_ADDRESS, [%s]) = %s\n", + sprintaddr(set_ok ? bogus_addr : *ptr), sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && __NR_set_tid_address && PR_GET_TID_ADDRESS") + +#endif diff --git a/tests/prctl-tid_address.test b/tests/prctl-tid_address.test new file mode 100755 index 000000000..dc7b7c328 --- /dev/null +++ b/tests/prctl-tid_address.test @@ -0,0 +1,12 @@ +#!/bin/sh + +# Check decoding of prctl PR_GET_TID_ADDRESS operation. +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a23 -eprctl $args > "$EXP" +LC_ALL=C grep -Ev '^prctl\(PR_[GS]ET_([^T]|.[^I]|..[^D])' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests/prctl-tsc.c b/tests/prctl-tsc.c new file mode 100644 index 000000000..fd9362d76 --- /dev/null +++ b/tests/prctl-tsc.c @@ -0,0 +1,80 @@ +/* + * Check decoding of prctl PR_GET_TSC/PR_SET_TSC operations. + * + * Copyright (c) 2016 JingPiao Chen + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +#if defined __NR_prctl && defined PR_GET_TSC && defined PR_SET_TSC + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_tsc = + (kernel_ulong_t) 0xdeadc0defacebeefULL; + + int *tsc = tail_alloc(sizeof(*tsc)); + long rc; + + rc = syscall(__NR_prctl, PR_SET_TSC, 0); + printf("prctl(PR_SET_TSC, 0 /* PR_TSC_??? */) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_SET_TSC, bogus_tsc); + printf("prctl(PR_SET_TSC, %#x /* PR_TSC_??? */) = %s\n", + (unsigned int) bogus_tsc, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_SET_TSC, PR_TSC_SIGSEGV); + printf("prctl(PR_SET_TSC, PR_TSC_SIGSEGV) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TSC, NULL); + printf("prctl(PR_GET_TSC, NULL) = %s\n", sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TSC, tsc + 1); + printf("prctl(PR_GET_TSC, %p) = %s\n", tsc + 1, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_GET_TSC, tsc); + if (rc) + printf("prctl(PR_GET_TSC, %p) = %s\n", tsc, sprintrc(rc)); + else + printf("prctl(PR_GET_TSC, [PR_TSC_SIGSEGV]) = %s\n", + sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_TSC && PR_SET_TSC") + +#endif diff --git a/tests/prctl-tsc.test b/tests/prctl-tsc.test new file mode 100755 index 000000000..a906ba894 --- /dev/null +++ b/tests/prctl-tsc.test @@ -0,0 +1,13 @@ +#!/bin/sh + +# Check prctl PR_GET_TSC PR_SET_TSC decoding. + +. "${srcdir=.}/init.sh" + +check_prog grep +run_prog > /dev/null +run_strace -a24 -eprctl $args > "$EXP" +grep -v '^prctl(PR_[GS]ET_[^T][^S]' < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" + +rm -f "$EXP" "$OUT" diff --git a/tests/preadv-pwritev.c b/tests/preadv-pwritev.c index 0770d694c..b2d2a8248 100644 --- a/tests/preadv-pwritev.c +++ b/tests/preadv-pwritev.c @@ -159,7 +159,7 @@ main(void) r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); rc = preadv(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); - if (rc != (int) w_len - r_len) + if (rc != (int) w_len - (int) r_len) perror_msg_and_fail("preadv: expected %d, returned %ld", (int) w_len - r_len, rc); tprintf("preadv(0, [{iov_base=\"%s\", iov_len=%u}" diff --git a/tests/preadv.c b/tests/preadv.c index eb53a5e97..fb5d3ad78 100644 --- a/tests/preadv.c +++ b/tests/preadv.c @@ -82,7 +82,8 @@ main(void) if (preadv(0, iov, 1, -1) != -1) perror_msg_and_fail("preadv"); - printf("preadv(0, %p, 1, -1) = -1 EINVAL (%m)\n", iov); + printf("preadv(0, [{iov_base=%p, iov_len=%zu}], 1, -1) = " + "-1 EINVAL (%m)\n", iov->iov_base, iov->iov_len); if (preadv(0, NULL, 1, -2) != -1) perror_msg_and_fail("preadv"); @@ -140,7 +141,7 @@ main(void) r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); rc = preadv(fd, r_iov, ARRAY_SIZE(r1_iov_), r_len); - if (rc != (int) LENGTH_OF(w) - r_len) + if (rc != (int) LENGTH_OF(w) - (int) r_len) perror_msg_and_fail("preadv: expected %d, returned %ld", (int) LENGTH_OF(w) - r_len, rc); printf("preadv(%d, [{iov_base=\"%s\", iov_len=%u}" diff --git a/tests/preadv2-pwritev2.c b/tests/preadv2-pwritev2.c index 032ac0354..f7c46c0af 100644 --- a/tests/preadv2-pwritev2.c +++ b/tests/preadv2-pwritev2.c @@ -29,6 +29,7 @@ #include "tests.h" #include +#include "scno.h" #if defined __NR_preadv2 && defined __NR_pwritev2 @@ -163,7 +164,7 @@ dumpio(void) r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); rc = pr(0, r_iov, ARRAY_SIZE(r1_iov_), r_len); - if (rc != (int) w_len - r_len) + if (rc != (int) w_len - (int) r_len) perror_msg_and_fail("preadv2: expected %d, returned %ld", (int) w_len - r_len, rc); tprintf("preadv2(0, [{iov_base=\"%s\", iov_len=%u}" @@ -179,11 +180,12 @@ dumpio(void) int main(void) { - const unsigned long vlen = (unsigned long) 0xfac1fed2dad3bef4; + const kernel_ulong_t vlen = (kernel_ulong_t) 0xfac1fed2dad3bef4ULL; const unsigned long long pos = 0xfac5fed6dad7bef8; - const unsigned long pos_l = (unsigned long) pos; - const unsigned long pos_h = (sizeof(long) == sizeof(long long)) ? - (unsigned long) 0xbadc0deddeadbeef : 0xfac5fed6UL; + const kernel_ulong_t pos_l = (kernel_ulong_t) pos; + const kernel_ulong_t pos_h = + (sizeof(kernel_ulong_t) == sizeof(long long)) ? + (kernel_ulong_t) 0xbadc0deddeadbeefULL : 0xfac5fed6UL; int test_dumpio = 1; tprintf("%s", ""); @@ -192,13 +194,13 @@ main(void) if (ENOSYS == errno) test_dumpio = 0; tprintf("preadv2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n", - vlen, pos, errno2name()); + (unsigned long) vlen, pos, errno2name()); syscall(__NR_pwritev2, -1, NULL, vlen, pos_l, pos_h, 1); if (ENOSYS == errno) test_dumpio = 0; tprintf("pwritev2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n", - vlen, pos, errno2name()); + (unsigned long) vlen, pos, errno2name()); if (test_dumpio) dumpio(); diff --git a/tests/print_maxfd.c b/tests/print_maxfd.c new file mode 100644 index 000000000..c3d4ea88c --- /dev/null +++ b/tests/print_maxfd.c @@ -0,0 +1,41 @@ +/* + * Print the maximum descriptor number available. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include + +int +main(void) +{ + int fds[2]; + pipe_maxfd(fds); + printf("%d\n", fds[1]); + return 0; +} diff --git a/tests/printstr.c b/tests/printstr.c new file mode 100644 index 000000000..330234f10 --- /dev/null +++ b/tests/printstr.c @@ -0,0 +1,69 @@ +/* + * Check decoding of non-NUL-terminated strings when len == -1. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include + +#define DEFAULT_STRLEN 32 + +int +main(void) +{ + char *const buf = tail_alloc(DEFAULT_STRLEN + 1); + const struct iovec io = { + .iov_base = buf, + .iov_len = -1 + }; + int rc; + + buf[0] = 0; + + tprintf("%s", ""); + + memset(buf + 1, 'X', DEFAULT_STRLEN); + buf[DEFAULT_STRLEN - 1] = 0; + + rc = writev(-1, &io, 1); + tprintf("writev(-1, [{iov_base=\"\\0%*s\\0\"..., iov_len=%lu}], 1)" + " = %s\n", DEFAULT_STRLEN - 2, buf + 1, -1UL, sprintrc(rc)); + + buf[DEFAULT_STRLEN - 1] = 'X'; + buf[DEFAULT_STRLEN] = 0; + + rc = writev(-1, &io, 1); + tprintf("writev(-1, [{iov_base=\"\\0%*s\"..., iov_len=%lu}], 1)" + " = %s\n", DEFAULT_STRLEN - 1, buf + 1, -1UL, sprintrc(rc)); + + tprintf("+++ exited with 0 +++\n"); + return 0; +} diff --git a/tests/printstr.test b/tests/printstr.test new file mode 100755 index 000000000..5f164eb7e --- /dev/null +++ b/tests/printstr.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of non-NUL-terminated strings when len == -1. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -e trace=writev diff --git a/tests/prlimit64.c b/tests/prlimit64.c index e62ea2611..1e6511610 100644 --- a/tests/prlimit64.c +++ b/tests/prlimit64.c @@ -62,12 +62,12 @@ int main(void) { unsigned long pid = - (unsigned long) 0xdefaced00000000 | (unsigned) getpid(); + (unsigned long) 0xdefaced00000000ULL | (unsigned) getpid(); uint64_t *const rlimit = tail_alloc(sizeof(*rlimit) * 2); const struct xlat *xlat; for (xlat = resources; xlat->str; ++xlat) { - unsigned long res = 0xfacefeed00000000 | xlat->val; + unsigned long res = 0xfacefeed00000000ULL | xlat->val; long rc = syscall(__NR_prlimit64, pid, res, 0, rlimit); if (rc) printf("prlimit64(%d, %s, NULL, %p) = %ld %s (%m)\n", diff --git a/tests/process_vm_readv.c b/tests/process_vm_readv.c new file mode 100644 index 000000000..cfb8f7861 --- /dev/null +++ b/tests/process_vm_readv.c @@ -0,0 +1,18 @@ +#include "tests.h" + +#include + +#ifdef __NR_process_vm_readv + +# define OP process_vm_readv +# define OP_NR __NR_process_vm_readv +# define OP_STR "process_vm_readv" +# define OP_WR 0 + +# include "process_vm_readv_writev.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_process_vm_readv"); + +#endif diff --git a/tests/process_vm_readv.test b/tests/process_vm_readv.test new file mode 100755 index 000000000..c092f5a39 --- /dev/null +++ b/tests/process_vm_readv.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of process_vm_readv syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s5 -a37 diff --git a/tests/process_vm_readv_writev.c b/tests/process_vm_readv_writev.c new file mode 100644 index 000000000..2a089395a --- /dev/null +++ b/tests/process_vm_readv_writev.c @@ -0,0 +1,306 @@ +/* + * Check decoding of process_vm_readv/process_vm_writev syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include + +#if OP_WR +# define in_iovec rmt_iovec +# define out_iovec lcl_iovec +# define in_iov rmt_iov +# define out_iov lcl_iov +#else +# define in_iovec lcl_iovec +# define out_iovec rmt_iovec +# define in_iov lcl_iov +# define out_iov rmt_iov +#endif + +typedef void (*iov_print_fn)(const struct iovec *, const void *, long); + +enum { MAX_SEGM_COUNT = 2, MAX_STR_LEN = 5 }; + +struct print_iov_arg { + uint32_t count; + uint32_t valid :1, + string :1, + addr_term:1, + check_rc :1; + uint32_t str_segms; + uint8_t str_base[MAX_SEGM_COUNT]; + uint8_t str_size[MAX_SEGM_COUNT]; +}; + +static void +print_iov(const struct iovec *iov, const void *arg_ptr, long rc) +{ + const struct print_iov_arg *arg = arg_ptr; + uint32_t i; + uint32_t num_segm = 0; + uint64_t segm_offs = 0; + + if (!arg || !arg->valid) { + if (iov) + printf("%p", iov); + else + printf("NULL"); + + return; + } + + printf("["); + + for (i = 0; i < arg->count; i++) { + if (i) + printf(", "); + + if (i >= MAX_STR_LEN) { + printf("..."); + break; + } + + printf("{iov_base="); + if (arg->string && (!arg->check_rc || (rc != -1))) { + uint64_t str_left = iov[i].iov_len; + uint64_t pr_count = 0; + + printf("\""); + + while (str_left--) { + static const char oct_str[] = "01234567"; + uint8_t c = arg->str_base[num_segm] + segm_offs; + + if ((num_segm >= arg->str_segms) || + (num_segm >= MAX_SEGM_COUNT)) + error_msg_and_fail("print_iov: segment " + "count overrun"); + + if (pr_count++ < MAX_STR_LEN) + printf("\\%.1s%.1s%d", + (c >> 6) ? + oct_str + (c >> 6) : "", + (c >> 3) ? + oct_str + ((c >> 3) & 7) : "", + c & 7); + + segm_offs++; + + if (segm_offs >= arg->str_size[num_segm]) { + num_segm++; + segm_offs = 0; + } + } + + printf("\""); + + if (pr_count > MAX_STR_LEN) + printf("..."); + } else { + if (iov[i].iov_base) + printf("%p", iov[i].iov_base); + else + printf("NULL"); + } + + printf(", iov_len=%zu}", iov[i].iov_len); + } + + if (arg->addr_term) + printf(", %p", iov + arg->count); + + printf("]"); +} + +static void +do_call(kernel_ulong_t pid, + kernel_ulong_t local_iov, const char *local_arg, + kernel_ulong_t liovcnt, + kernel_ulong_t remote_iov, const char *remote_arg, + kernel_ulong_t riovcnt, + kernel_ulong_t flags, iov_print_fn pr_iov) +{ + long rc; + const char *errstr; + + rc = syscall(OP_NR, pid, local_iov, liovcnt, remote_iov, riovcnt, + flags); + errstr = sprintrc(rc); + + printf("%s(%d, ", OP_STR, (int) pid); + + if (pr_iov) + pr_iov((const struct iovec *) (uintptr_t) local_iov, local_arg, + rc); + else + printf("%s", local_arg); + + printf(", %lu, ", (unsigned long) liovcnt); + + if (pr_iov) + pr_iov((const struct iovec *) (uintptr_t) remote_iov, + remote_arg, rc); + else + printf("%s", remote_arg); + + printf(", %lu, %lu) = %s\n", (unsigned long) riovcnt, + (unsigned long) flags, errstr); +} + +kernel_ulong_t +ptr_cast(void *ptr) +{ + return (kernel_ulong_t) (uintptr_t) ptr; +} + +int +main(void) +{ + enum { + SIZE_11 = 2, + SIZE_12 = 3, + SIZE_13 = 4, + SIZE_1 = SIZE_11 + SIZE_12 + SIZE_13, + SIZE_21 = 5, + SIZE_22 = 6, + SIZE_23 = 7, + SIZE_2 = SIZE_21 + SIZE_22 + SIZE_23, + }; + + enum { + SEGM1_BASE = 0x80, + SEGM2_BASE = 0xA0, + }; + + static const kernel_ulong_t bogus_pid = + (kernel_ulong_t) 0xbadfaceddeadca57ULL; + static const kernel_ulong_t bogus_iovcnt1 = + (kernel_ulong_t) 0xdec0ded1defaced2ULL; + static const kernel_ulong_t bogus_iovcnt2 = + (kernel_ulong_t) 0xdec0ded3defaced4ULL; + static const kernel_ulong_t bogus_flags = + (kernel_ulong_t) 0xdeadc0deda7adeadULL; + + pid_t my_pid = getpid(); + char *data1_out = tail_alloc(SIZE_1); + char *data2_out = tail_alloc(SIZE_2); + char *data1_in = tail_alloc(SIZE_2); + char *data2_in = tail_alloc(SIZE_1); + + struct iovec bogus_iovec[] = { + { data1_out + SIZE_1, (size_t) 0xdeadfaceca57beefULL }, + { data1_in + SIZE_2, (size_t) 0xbadc0dedda7adeadULL }, + { data2_out + SIZE_2, (size_t) 0xf157facedec0ded1ULL }, + { data2_in + SIZE_1, (size_t) 0xdefaced2bea7be57ULL }, + }; + + struct iovec out_iovec[] = { + { data1_out, SIZE_11 }, + { data1_out + SIZE_11, SIZE_12 }, + { data1_out + SIZE_11 + SIZE_12, SIZE_13 }, + { data2_out, SIZE_21 }, + { data2_out + SIZE_21, SIZE_22 }, + { data2_out + SIZE_21 + SIZE_22, SIZE_23 }, + }; + struct iovec in_iovec[] = { + { data1_in, SIZE_23 }, + { data1_in + SIZE_23, SIZE_22 }, + { data1_in + SIZE_23 + SIZE_22, SIZE_21 }, + { data2_in, SIZE_13 }, + { data2_in + SIZE_13, SIZE_12 }, + { data2_in + SIZE_13 + SIZE_12, SIZE_11 }, + }; + + struct iovec *bogus_iov = tail_memdup(bogus_iovec, sizeof(bogus_iovec)); + struct iovec *lcl_iov = tail_memdup(lcl_iovec, sizeof(lcl_iovec)); + struct iovec *rmt_iov = tail_memdup(rmt_iovec, sizeof(rmt_iovec)); + + struct print_iov_arg bogus_arg = { ARRAY_SIZE(bogus_iovec), 1 }; + struct print_iov_arg lcl_arg = { ARRAY_SIZE(lcl_iovec), 1, 1, 0, 0, + 2, {SEGM1_BASE, SEGM2_BASE}, {SIZE_1, SIZE_2} }; + struct print_iov_arg rmt_arg = { ARRAY_SIZE(rmt_iovec), 1 }; + + struct print_iov_arg bogus_arg_cut = + { ARRAY_SIZE(bogus_iovec) - 2, 1, 0, 1 }; + struct print_iov_arg lcl_arg_cut = + { ARRAY_SIZE(lcl_iovec) - 2, 1, 1, 1, 0, 2, + {SEGM1_BASE + SIZE_11 + SIZE_12, SEGM2_BASE}, + {SIZE_13, SIZE_2} }; + struct print_iov_arg rmt_arg_cut = + { ARRAY_SIZE(rmt_iovec) - 2, 1 }; + + + fill_memory_ex(data1_out, SIZE_1, SEGM1_BASE, SIZE_1); + fill_memory_ex(data2_out, SIZE_2, SEGM2_BASE, SIZE_2); + + + do_call(bogus_pid, (kernel_ulong_t) (uintptr_t) ARG_STR(NULL), + bogus_iovcnt1, (kernel_ulong_t) (uintptr_t) ARG_STR(NULL), + bogus_iovcnt2, bogus_flags, NULL); + + do_call(my_pid, ptr_cast(bogus_iov + ARRAY_SIZE(bogus_iovec)), + "[]", 0, ptr_cast(in_iov + ARRAY_SIZE(in_iovec)), "[]", + 0, 0, NULL); + do_call(my_pid, ptr_cast(bogus_iov + ARRAY_SIZE(bogus_iovec)), NULL, + bogus_iovcnt1, ptr_cast(in_iov + ARRAY_SIZE(in_iovec)), NULL, + bogus_iovcnt2, 0, print_iov); + + do_call(my_pid, ptr_cast(bogus_iov), (char *) &bogus_arg, + ARRAY_SIZE(bogus_iovec), ptr_cast(rmt_iov + 2), + (char *) &rmt_arg_cut, ARRAY_SIZE(rmt_iovec) - 2, 0, print_iov); + +#if !OP_WR + lcl_arg.check_rc = 1; + lcl_arg_cut.check_rc = 1; +#endif + + do_call(my_pid, ptr_cast(lcl_iov + 2), (char *) &lcl_arg_cut, + ARRAY_SIZE(lcl_iovec) - 1, ptr_cast(bogus_iov + 2), + (char *) &bogus_arg_cut, ARRAY_SIZE(bogus_iovec) - 1, 0, + print_iov); + + lcl_arg_cut.addr_term = 0; + + rmt_arg_cut.addr_term = 1; + rmt_arg_cut.count = 5; + + do_call(my_pid, ptr_cast(lcl_iov + 2), (char *) &lcl_arg_cut, + ARRAY_SIZE(lcl_iovec) - 2, ptr_cast(rmt_iov + 1), + (char *) &rmt_arg_cut, ARRAY_SIZE(rmt_iovec), 0, print_iov); + + /* Correct call */ + do_call(my_pid, ptr_cast(lcl_iov), (char *) &lcl_arg, + ARRAY_SIZE(lcl_iovec), ptr_cast(rmt_iov), (char *) &rmt_arg, + ARRAY_SIZE(rmt_iovec), 0, print_iov); + + puts("+++ exited with 0 +++"); + + return 0; +} diff --git a/tests/process_vm_writev.c b/tests/process_vm_writev.c new file mode 100644 index 000000000..6271c01bc --- /dev/null +++ b/tests/process_vm_writev.c @@ -0,0 +1,18 @@ +#include "tests.h" + +#include + +#ifdef __NR_process_vm_writev + +# define OP process_vm_writev +# define OP_NR __NR_process_vm_writev +# define OP_STR "process_vm_writev" +# define OP_WR 1 + +# include "process_vm_readv_writev.c" + +#else + +SKIP_MAIN_UNDEFINED("__NR_process_vm_writev"); + +#endif diff --git a/tests/process_vm_writev.test b/tests/process_vm_writev.test new file mode 100755 index 000000000..f690e6a96 --- /dev/null +++ b/tests/process_vm_writev.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of process_vm_writev syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -s5 -a38 diff --git a/tests/pselect6.c b/tests/pselect6.c index 7dbc06a9d..f26448531 100644 --- a/tests/pselect6.c +++ b/tests/pselect6.c @@ -30,9 +30,9 @@ */ #include "tests.h" +#include "nsig.h" #include #include -#include #include #include #include @@ -40,11 +40,6 @@ #ifdef __NR_pselect6 -#ifndef NSIG -# warning NSIG is not defined, using 32 -# define NSIG 32 -#endif - static fd_set set[3][0x1000000 / sizeof(fd_set)]; static void @@ -90,7 +85,7 @@ int main(int ac, char **av) "= 1 (out [%d])\n", fds[1] + 1, fds[0], fds[1], fds[0], fds[1], - NSIG / 8, fds[1]); + NSIG_BYTES, fds[1]); /* * Another simple one, with a timeout. @@ -100,8 +95,9 @@ int main(int ac, char **av) FD_SET(fds[0], set[1]); FD_SET(fds[1], set[1]); assert(syscall(__NR_pselect6, fds[1] + 1, NULL, set[1], NULL, &tm.ts, NULL) == 3); - printf("pselect6(%d, NULL, [1 2 %d %d], NULL, {%lld, %lld}, NULL)" - " = 3 (out [1 2 %d], left {%lld, %lld})\n", + printf("pselect6(%d, NULL, [1 2 %d %d], NULL, " + "{tv_sec=%lld, tv_nsec=%lld}, NULL) = 3 (out [1 2 %d], left " + "{tv_sec=%lld, tv_nsec=%lld})\n", fds[1] + 1, fds[0], fds[1], (long long) tm_in.ts.tv_sec, (long long) tm_in.ts.tv_nsec, fds[1], @@ -115,7 +111,7 @@ int main(int ac, char **av) FD_SET(fds[1],set[0]); assert(pselect(-1, NULL, set[0], NULL, NULL, &mask) == -1); printf("pselect6(-1, NULL, %p, NULL, NULL, {[HUP CHLD], %u}) " - "= -1 EINVAL (%m)\n", set[0], NSIG / 8); + "= -1 EINVAL (%m)\n", set[0], NSIG_BYTES); /* * Another variant, with nfds exceeding FD_SETSIZE limit. @@ -126,8 +122,9 @@ int main(int ac, char **av) tm.ts.tv_sec = 0; tm.ts.tv_nsec = 123; assert(pselect(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) == 0); - printf("pselect6(%d, [%d], [], NULL, {0, 123}, {[HUP CHLD], %u}) " - "= 0 (Timeout)\n", FD_SETSIZE + 1, fds[0], NSIG / 8); + printf("pselect6(%d, [%d], [], NULL, {tv_sec=0, tv_nsec=123}, " + "{[HUP CHLD], %u}) = 0 (Timeout)\n", + FD_SETSIZE + 1, fds[0], NSIG_BYTES); /* * See how timeouts are decoded. @@ -137,9 +134,10 @@ int main(int ac, char **av) tm.ts.tv_nsec = 222222222; assert(pselect(0, NULL, NULL, NULL, &tm.ts, &mask) == -1); - printf("pselect6(0, NULL, NULL, NULL, {0, 222222222}, {[HUP CHLD], %u})" - " = ? ERESTARTNOHAND (To be restarted if no handler)\n", - NSIG / 8); + printf("pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=222222222}, " + "{[HUP CHLD], %u}) = " + "? ERESTARTNOHAND (To be restarted if no handler)\n", + NSIG_BYTES); puts("--- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} ---"); puts("+++ exited with 0 +++"); diff --git a/tests/ptrace.c b/tests/ptrace.c index 1dcfec3b6..80ce8cbb2 100644 --- a/tests/ptrace.c +++ b/tests/ptrace.c @@ -345,10 +345,23 @@ main(void) do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGSYS" ", si_code=SYS_SECCOMP, si_errno=ENOENT, si_call_addr=%p" - ", si_syscall=__NR_syscall_%u, si_arch=AUDIT_ARCH_X86_64})" + ", si_syscall=%u, si_arch=AUDIT_ARCH_X86_64})" " = %s\n", (unsigned) pid, bad_request, sip->si_call_addr, sip->si_syscall, errstr); + + sip->si_errno = 3141592653U; + sip->si_call_addr = NULL; + sip->si_syscall = __NR_read; + sip->si_arch = 0xda7a1057; + + do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip); + printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGSYS" + ", si_code=SYS_SECCOMP, si_errno=%d, si_call_addr=NULL" + ", si_syscall=__NR_read, si_arch=%#x /* AUDIT_ARCH_??? */})" + " = %s\n", + (unsigned) pid, bad_request, sip->si_errno, sip->si_arch, + errstr); #endif #if defined HAVE_SIGINFO_T_SI_TIMERID && defined HAVE_SIGINFO_T_SI_OVERRUN diff --git a/tests/qual_fault-exit_group.expected b/tests/qual_fault-exit_group.expected new file mode 100644 index 000000000..dd9d4e46e --- /dev/null +++ b/tests/qual_fault-exit_group.expected @@ -0,0 +1,3 @@ +exit_group(42) = -1 ENOSYS (Function not implemented) (INJECTED) +exit(42) = ? ++++ exited with 42 +++ diff --git a/tests/qual_fault-exit_group.test b/tests/qual_fault-exit_group.test new file mode 100755 index 000000000..c98ffc6e0 --- /dev/null +++ b/tests/qual_fault-exit_group.test @@ -0,0 +1,53 @@ +#!/bin/sh +# +# Check decoding of fault injected exit_group syscall. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/scno_tampering.sh" + +test_with() +{ + > "$LOG" || fail_ "failed to write $LOG" + + $STRACE -o "$LOG" "$@" + rc=$? + [ $rc -eq 42 ] || + dump_log_and_fail_with "$STRACE $* failed with code $rc" + + match_diff +} + +test_with -eexit,exit_group -efault=exit_group:error=ENOSYS ./answer + +test_with -eexit,exit_group -efault=exit_group:error=ENOSYS \ + -efault=\!process:error=1 ./answer + +test_with -eexit,exit_group -efault=all:error=ENOSYS \ + -efault=exit:error=1:when=2+ ./answer + +test_with -eexit,exit_group -efault=exit_group:error=ENOSYS \ + -efault=\!desc,file,memory,process,signal,network,ipc:error=1 ./answer diff --git a/tests/qual_fault-syntax.test b/tests/qual_fault-syntax.test new file mode 100755 index 000000000..85093fc7d --- /dev/null +++ b/tests/qual_fault-syntax.test @@ -0,0 +1,111 @@ +#!/bin/sh +# +# Check -e fault= syntax. +# +# Copyright (c) 2016=2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# +# F +# F+ +# F+S + +fail_with() +{ + dump_log_and_fail_with \ + "strace -e fault=$* failed to handle an argument error properly" +} + +for arg in '' , ,, ,,, : :: ::: \! \!, \!: \ + invalid_syscall_name \ + invalid_syscall_name:when=3 \ + -1 \!-1 \ + -1:when=4 \ + -2 \ + -2:when=5 \ + 32767 \!32767 \ + 32767:when=6 \ + chdir:42 \!chdir:42 \ + chdir:42:when=7 \ + chdir:invalid \ + chdir:invalid:when=8 \ + chdir:error= \ + chdir:error=:when=10 \ + chdir:error=invalid_error_name \ + chdir:error=invalid_error_name:when=11 \ + chdir:error=-1 \ + chdir:error=-1:when=12 \ + chdir:error=-2 \ + chdir:error=-2:when=13 \ + chdir:error=3+ \ + chdir:error=3+:when=14 \ + chdir:error=4096 \ + chdir:error=4096:when=15 \ + chdir:when=7:error=invalid_error_name \ + chdir:when= \ + chdir:when=:error=19 \ + chdir:when=0 \ + chdir:when=0:error=20 \ + chdir:when=-1 \ + chdir:when=-1:error=21 \ + chdir:when=-2+ \ + chdir:when=-2+:error=22 \ + chdir:when=-3+0 \ + chdir:when=-3+0:error=23 \ + chdir:when=4- \ + chdir:when=4-:error=24 \ + chdir:when=5+- \ + chdir:when=5+-:error=25 \ + chdir:when=6++ \ + chdir:when=6++:error=26 \ + chdir:when=7+0 \ + chdir:when=7+0:error=27 \ + chdir:when=8+-1 \ + chdir:when=8+-1:error=28 \ + chdir:when=9+1+ \ + chdir:when=9+1+:error=29 \ + chdir:when=65536 \ + chdir:when=65536:error=30 \ + chdir:when=1+65536 \ + chdir:when=1+65536:error=31 \ + file,nonsense \ + \!desc,nonsense \ + chdir,nonsense \ + \!chdir,nonsense \ + 1,nonsense \ + \!1,nonsense \ + chdir:retval=0 \ + chdir:signal=1 \ + chdir:error=1:error=2 \ + ; do + $STRACE -e fault="$arg" true 2> "$LOG" && + fail_with "$arg" + LC_ALL=C grep -F 'invalid fault argument' < "$LOG" > /dev/null || + fail_with "$arg" +done + +exit 0 diff --git a/tests/qual_fault.c b/tests/qual_fault.c new file mode 100644 index 000000000..d26dc7ce7 --- /dev/null +++ b/tests/qual_fault.c @@ -0,0 +1,148 @@ +/* + * Check that fault injection works properly. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +static const int expfd = 4; +static const int gotfd = 5; + +#define DEFAULT_ERRNO ENOSYS + +static const char *errstr; +static int is_raw, err, first, step, iter, try; + +static void +invoke(int fail) +{ + static char buf[sizeof(int) * 3 + 3]; + const struct iovec io = { + .iov_base = buf, + .iov_len = sprintf(buf, "%d.", ++try) + }; + int rc; + + if (!fail) { + rc = write(expfd, io.iov_base, io.iov_len); + if (rc != (int) io.iov_len) + perror_msg_and_fail("write"); + } + + errno = 0; + rc = writev(gotfd, &io, 1); + + if (fail) { + if (!(rc == -1 && errno == err)) + perror_msg_and_fail("expected errno %d" + ", got rc == %d, errno == %d", + err, rc, errno); + + if (is_raw) + tprintf("writev(%#x, %p, 0x1) = -1 (errno %d)" + " (INJECTED)\n", gotfd, &io, err); + else + tprintf("writev(%d, [{iov_base=\"%s\", iov_len=%d}], 1)" + " = -1 %s (%m) (INJECTED)\n", + gotfd, buf, (int) io.iov_len, errstr); + } else { + if (rc != (int) io.iov_len) + perror_msg_and_fail("expected %d" + ", got rc == %d, errno == %d", + (int) io.iov_len, rc, errno); + + if (is_raw) + tprintf("writev(%#x, %p, 0x1) = %#x\n", gotfd, &io, rc); + else + tprintf("writev(%d, [{iov_base=\"%s\", iov_len=%d}], 1)" + " = %d\n", + gotfd, buf, (int) io.iov_len, (int) io.iov_len); + } +} + +int +main(int argc, char *argv[]) +{ + struct stat st; + + assert(fstat(expfd, &st) == 0); + assert(fstat(gotfd, &st) == 0); + + assert(argc == 6); + + is_raw = !strcmp("raw", argv[1]); + + errstr = argv[2]; + err = atoi(errstr); + assert(err >= 0); + + if (!err) { + if (!*errstr) + err = DEFAULT_ERRNO; + else if (!strcasecmp(errstr, "EINVAL")) + err = EINVAL; + else + err = ENOSYS; + } + + errno = err; + errstr = errno2name(); + + first = atoi(argv[3]); + step = atoi(argv[4]); + iter = atoi(argv[5]); + + assert(first > 0); + assert(step >= 0); + + tprintf("%s", ""); + + int i; + for (i = 1; i <= iter; ++i) { + int fail = 0; + if (first > 0) { + --first; + if (first == 0) { + fail = 1; + first = step; + } + } + invoke(fail); + } + + tprintf("%s\n", "+++ exited with 0 +++"); + return 0; +} diff --git a/tests/qual_fault.test b/tests/qual_fault.test new file mode 100755 index 000000000..e194a7879 --- /dev/null +++ b/tests/qual_fault.test @@ -0,0 +1,104 @@ +#!/bin/sh +# +# Check that fault injection works properly. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/scno_tampering.sh" + +# +# F +# F+ +# F+S + +N=16 + +check_fault_injection() +{ + local trace fault err first step extra + trace=$1; shift + fault=$1; shift + err=$1; shift + first=$1; shift + step=$1; shift + extra="$*" + + local when= + if [ -z "$first$step" ]; then + first=1 + step=1 + else + case "$step" in + '') when=":when=$first"; step=0 ;; + +) when=":when=$first+"; step=1 ;; + *) when=":when=$first+$step" ;; + esac + fi + + local error= + local raw=reg + set -- + case "$err" in + '') ;; + [123456789]*) + error=":error=$err" + raw=raw + set -- -e raw=all + ;; + *) error=":error=$err" ;; + esac + + outexp="$NAME.out.exp" + outgot="$NAME.out.got" + + run_strace -a11 -e trace=$trace \ + "$@" -e fault=$fault$when$error $extra \ + ./$NAME $raw "$err" "$first" "$step" $N \ + > "$EXP" 4> "$outexp" 5> "$outgot" + + match_diff "$EXP" "$LOG" + match_diff "$outexp" "$outgot" + rm -f "$EXP" "$outexp" "$outgot" +} + +for err in '' ENOSYS 22 einval; do + for fault in writev desc,51; do + check_fault_injection \ + writev $fault "$err" '' '' -efault=chdir + check_fault_injection \ + writev $fault "$err" '' '' -efault=chdir -efault=none + for F in 1 2 3 5 7 11; do + check_fault_injection \ + writev $fault "$err" $F '' + check_fault_injection \ + writev $fault "$err" $F + + for S in 1 2 3 5 7 11; do + check_fault_injection \ + writev $fault "$err" $F $S + done + done + done +done diff --git a/tests/qual_inject-error-signal.c b/tests/qual_inject-error-signal.c new file mode 100644 index 000000000..f4ccd8241 --- /dev/null +++ b/tests/qual_inject-error-signal.c @@ -0,0 +1,69 @@ +/* + * Check fault injection along with signal injection. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +static struct stat before, after; + +static void +handler(int sig) +{ + if (stat(".", &after)) + syscall(__NR_exit_group, 2); + + if (before.st_dev != after.st_dev || before.st_ino != after.st_ino) + syscall(__NR_exit_group, 3); + + syscall(__NR_exit_group, 0); +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGUSR1, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + if (stat(".", &before)) + perror_msg_and_fail("stat"); + + syscall(__NR_chdir, "."); + syscall(__NR_exit_group, 1); + return 1; +} diff --git a/tests/qual_inject-error-signal.expected b/tests/qual_inject-error-signal.expected new file mode 100644 index 000000000..24389b378 --- /dev/null +++ b/tests/qual_inject-error-signal.expected @@ -0,0 +1,4 @@ +chdir(".") = -1 ENOENT (No such file or directory) (INJECTED) +--- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_KERNEL} --- +exit_group(0) = ? ++++ exited with 0 +++ diff --git a/tests/qual_inject-error-signal.test b/tests/qual_inject-error-signal.test new file mode 100755 index 000000000..fcbcc398f --- /dev/null +++ b/tests/qual_inject-error-signal.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check fault injection along with signal injection. +. "${srcdir=.}/scno_tampering.sh" + +run_strace -a12 -echdir,exit_group -einject=chdir:error=ENOENT:signal=USR1 \ + "./$NAME" +match_diff diff --git a/tests/qual_inject-retval.c b/tests/qual_inject-retval.c new file mode 100644 index 000000000..ac9801ebf --- /dev/null +++ b/tests/qual_inject-retval.c @@ -0,0 +1,73 @@ +/* + * Check success injection. + * + * Copyright (c) 2017 Elvira Khabirova + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_chdir + +# include +# include +# include +# include +# include + +int +main(int argc, char *argv[]) +{ + assert(argc == 2); + + static const char dir[] = ".."; + struct stat before, after; + + if (stat(".", &before)) + perror_msg_and_fail("stat"); + + long rval = syscall(__NR_chdir, dir); + + if (stat(".", &after)) + perror_msg_and_fail("stat"); + + if (before.st_dev != after.st_dev || before.st_ino != after.st_ino) + error_msg_and_fail("syscall succeeded"); + if (atol(argv[1]) != rval) + error_msg_and_fail("expected retval %s, got retval %ld", + argv[1], rval); + + printf("chdir(\"%s\") = %ld (INJECTED)\n", dir, rval); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_chdir") + +#endif diff --git a/tests/qual_inject-retval.test b/tests/qual_inject-retval.test new file mode 100755 index 000000000..419030ad4 --- /dev/null +++ b/tests/qual_inject-retval.test @@ -0,0 +1,21 @@ +#!/bin/sh + +# Check success injection. + +. "${srcdir=.}/scno_tampering.sh" + +check_injection() +{ + local syscall rval + + syscall=chdir + rval="$1"; shift + + run_strace -a12 -e$syscall -einject="$syscall:retval=$rval" "$@" \ + ./qual_inject-retval "$rval" > "$EXP" + match_diff "$LOG" "$EXP" + rm -f "$EXP" +} + +check_injection 0 +check_injection 42 diff --git a/tests/qual_inject-signal.c b/tests/qual_inject-signal.c new file mode 100644 index 000000000..ff56a2862 --- /dev/null +++ b/tests/qual_inject-signal.c @@ -0,0 +1,57 @@ +/* + * Check that signal injection works properly. + * + * Copyright (c) 2017 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +static void +handler(int sig) +{ + syscall(__NR_exit_group, 0); +} + +int +main(void) +{ + const struct sigaction act = { .sa_handler = handler }; + if (sigaction(SIGUSR1, &act, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + syscall(__NR_chdir, "."); + syscall(__NR_exit_group, 1); + return 1; +} diff --git a/tests/qual_inject-signal.expected b/tests/qual_inject-signal.expected new file mode 100644 index 000000000..69a1d9793 --- /dev/null +++ b/tests/qual_inject-signal.expected @@ -0,0 +1,4 @@ +chdir(".") = 0 +--- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_KERNEL} --- +exit_group(0) = ? ++++ exited with 0 +++ diff --git a/tests/qual_inject-signal.test b/tests/qual_inject-signal.test new file mode 100755 index 000000000..88002ce94 --- /dev/null +++ b/tests/qual_inject-signal.test @@ -0,0 +1,8 @@ +#!/bin/sh + +# Check signal injection. +. "${srcdir=.}/init.sh" + +run_strace -a12 -echdir,exit_group -einject=chdir:signal=USR1 \ + ./$NAME +match_diff diff --git a/tests/qual_inject-syntax.test b/tests/qual_inject-syntax.test new file mode 100755 index 000000000..a9e44d748 --- /dev/null +++ b/tests/qual_inject-syntax.test @@ -0,0 +1,118 @@ +#!/bin/sh +# +# Check -e inject= syntax. +# +# Copyright (c) 2016-2017 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# +# F +# F+ +# F+S + +fail_with() +{ + dump_log_and_fail_with \ + "strace -e inject=$* failed to handle an argument error properly" +} + +for arg in '' , ,, ,,, : :: ::: \! \!, \!: \ + invalid_syscall_name \ + invalid_syscall_name:when=3 \ + -1 \!-1 \ + -1:when=4 \ + -2 \ + -2:when=5 \ + 32767 \!32767 \ + 32767:when=6 \ + 42 \ + chdir \ + chdir:42 \!chdir:42 \ + chdir:42:when=7 \ + chdir:invalid \ + chdir:invalid:when=8 \ + chdir:error= \ + chdir:error=:when=10 \ + chdir:error=invalid_error_name \ + chdir:error=invalid_error_name:when=11 \ + chdir:error=-1 \ + chdir:error=-1:when=12 \ + chdir:error=-2 \ + chdir:error=-2:when=13 \ + chdir:error=3+ \ + chdir:error=3+:when=14 \ + chdir:error=4096 \ + chdir:error=4096:when=15 \ + chdir:when=7:error=invalid_error_name \ + chdir:when= \ + chdir:when=:error=19 \ + chdir:when=0 \ + chdir:when=0:error=20 \ + chdir:when=-1 \ + chdir:when=-1:error=21 \ + chdir:when=-2+ \ + chdir:when=-2+:error=22 \ + chdir:when=-3+0 \ + chdir:when=-3+0:error=23 \ + chdir:when=4- \ + chdir:when=4-:error=24 \ + chdir:when=5+- \ + chdir:when=5+-:error=25 \ + chdir:when=6++ \ + chdir:when=6++:error=26 \ + chdir:when=7+0 \ + chdir:when=7+0:error=27 \ + chdir:when=8+-1 \ + chdir:when=8+-1:error=28 \ + chdir:when=9+1+ \ + chdir:when=9+1+:error=29 \ + chdir:when=65536 \ + chdir:when=65536:error=30 \ + chdir:when=1+65536 \ + chdir:when=1+65536:error=31 \ + file,nonsense \ + \!desc,nonsense \ + chdir,nonsense \ + \!chdir,nonsense \ + 1,nonsense \ + \!1,nonsense \ + chdir:retval=-1 \ + chdir:signal=0 \ + chdir:signal=129 \ + chdir:retval=0:retval=1 \ + chdir:error=1:error=2 \ + chdir:retval=0:error=1 \ + chdir:error=1:retval=0 \ + chdir:retval=0:signal=1:error=1 \ + ; do + $STRACE -e inject="$arg" true 2> "$LOG" && + fail_with "$arg" + LC_ALL=C grep -F 'invalid inject argument' < "$LOG" > /dev/null || + fail_with "$arg" +done + +exit 0 diff --git a/tests/qual_signal.c b/tests/qual_signal.c new file mode 100644 index 000000000..106dabea8 --- /dev/null +++ b/tests/qual_signal.c @@ -0,0 +1,82 @@ +/* + * Check how strace -e signal=set works. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include + +static pid_t pid; +static uid_t uid; + +static void +handler(int sig) +{ +} + +static void +test_sig(int signo, const char *name) +{ + const struct sigaction act = { .sa_handler = handler }; + + if (sigaction(signo, &act, NULL)) + perror_msg_and_fail("sigaction: %d", signo); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, signo); + if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask: %d", signo); + + if (kill(pid, signo)) + perror_msg_and_fail("kill(%d, %d)", pid, signo); + + if (name && *name) + printf("--- %s {si_signo=%s, si_code=SI_USER" + ", si_pid=%d, si_uid=%d} ---\n", + name, name, pid, uid); +} + +int +main(int ac, const char **av) +{ + assert(ac & 1); + + pid = getpid(); + uid = geteuid(); + + int i; + for (i = 1; i < ac; i += 2) + test_sig(atoi(av[i]), av[i + 1]); + + puts("+++ exited with 0 +++"); + return 0; +} diff --git a/tests/qual_signal.test b/tests/qual_signal.test new file mode 100755 index 000000000..54a37a30c --- /dev/null +++ b/tests/qual_signal.test @@ -0,0 +1,111 @@ +#!/bin/sh +# +# Check how strace -e signal=set works. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +test_one_sig() +{ + local sigs + sigs="$1"; shift + + run_prog "./$NAME" "$@" > /dev/null + run_strace -e trace=none -e signal="$sigs" "./$NAME" "$@" > "$EXP" + match_diff "$LOG" "$EXP" + rm -f "$EXP" +} + +test_sigs() +{ + local first second sigs + first="$1"; shift + second="$1"; shift + + for sigs; do + test_one_sig "$sigs" 2 "$first" 15 "$second" + done +} + +test_sigs '' '' \ + none '!all' \ + CHLD SIGCHLD ALRM SIGALRM \ + chld sigchld alrm sigalrm \ + CHLD,SIGALRM ALRM,SIGCHLD \ + chld,sigalrm alrm,sigchld \ + 9 9,4 9,4,11 \ + 4,CHLD,11,ALRM,9 \ + '!2,15' '!INT,TERM' '!SIGINT,TERM' '!INT,SIGTERM' '!SIGTERM,SIGINT' \ + '!2,INT,TERM' '!2,SIGTERM' '!SIGINT,15' '!INT,SIGTERM,15' \ + '!2,4,15' '!15,9,2,11,4' + +test_sigs SIGINT '' \ + 2 INT SIGINT \ + CHLD,SIGINT SIGINT,SIGALRM \ + chld,sigint sigint,sigalrm \ + ALRM,2,SIGCHLD \ + '!15' '!TERM' '!SIGTERM' \ + '!15,TERM' '!SIGTERM,15,TERM' \ + '!SIGALRM,TERM' '!CHLD,SIGTERM' \ + '!ALRM,15' '!SIGCHLD,ALRM,SIGTERM,KILL' \ + '!4,15' '!15,9,11,4' + +test_sigs '' SIGTERM \ + 15 TERM SIGTERM \ + CHLD,SIGTERM SIGTERM,SIGALRM \ + chld,sigterm sigterm,sigalrm \ + ALRM,15,SIGCHLD \ + '!2' '!INT' '!SIGINT' \ + '!2,INT' '!SIGINT,2,INT' \ + '!SIGALRM,INT' '!CHLD,SIGINT' \ + '!ALRM,2' '!SIGCHLD,ALRM,SIGINT,KILL' \ + '!4,2' '!2,9,11,4' + +test_sigs SIGINT SIGTERM \ + all '!none' \ + INT,TERM SIGINT,TERM SIGTERM,INT SIGINT,SIGTERM \ + int,term sigint,term sigterm,int sigint,sigterm \ + 2,15 2,TERM SIGTERM,2 TERM,15,SIGINT,2 \ + '!CHLD' '!SIGCHLD' '!ALRM' '!SIGALRM' \ + '!CHLD,SIGALRM' '!ALRM,SIGCHLD' \ + '!9' '!9,4' '!9,4,11' '!4,CHLD,11,ALRM,9' + +fail_with() +{ + dump_log_and_fail_with \ + "strace -e signal=$* failed to handle an argument error properly" +} + +for arg in ' ' invalid_signal_name SIG -1 256 1-1 \ + 1,2,4,8,16,32,64,128,256,512,1024 9,chdir; do + $STRACE -e signal="$arg" true 2> "$LOG" && + fail_with "$arg" + LC_ALL=C grep -F 'invalid signal' < "$LOG" > /dev/null || + fail_with "$arg" +done + +exit 0 diff --git a/tests/quotactl-xfs.c b/tests/quotactl-xfs.c index a08ccd25d..e420d1c9d 100644 --- a/tests/quotactl-xfs.c +++ b/tests/quotactl-xfs.c @@ -1,7 +1,7 @@ /* * Check decoding of quotactl xfs subcommands. * - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * Copyright (c) 2016 Dmitry V. Levin * All rights reserved. * @@ -199,6 +199,9 @@ print_xquota_statv(int rc, void *ptr, void *arg) int main(void) { + char *bogus_special = (char *) tail_alloc(1) + 1; + void *bogus_addr = (char *) tail_alloc(1) + 1; + char bogus_special_str[sizeof(void *) * 2 + sizeof("0x")]; char bogus_addr_str[sizeof(void *) * 2 + sizeof("0x")]; char unterminated_str[sizeof(void *) * 2 + sizeof("0x")]; @@ -280,7 +283,7 @@ main(void) check_quota(CQF_NONE, ARG_STR(QCMD(Q_XSETQLIM, PRJQUOTA)), bogus_special, bogus_special_str, 0, bogus_addr); - fill_memory_ex((char *) xdq, sizeof(*xdq), 0x8e); + fill_memory_ex(xdq, sizeof(*xdq), 0x8e, 0x80); check_quota(CQF_ADDR_CB, ARG_STR(QCMD(Q_XSETQLIM, PRJQUOTA)), bogus_dev, bogus_dev_str, 3141592653U, diff --git a/tests/quotactl.c b/tests/quotactl.c index d68c4ec8f..3a7c11323 100644 --- a/tests/quotactl.c +++ b/tests/quotactl.c @@ -1,7 +1,7 @@ /* * Check decoding of quotactl syscall. * - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * Copyright (c) 2016 Dmitry V. Levin * All rights reserved. * @@ -164,6 +164,9 @@ print_dqinfo(long rc, void *ptr, void *arg) int main(void) { + char *bogus_special = (char *) tail_alloc(1) + 1; + void *bogus_addr = (char *) tail_alloc(1) + 1; + char bogus_special_str[sizeof(void *) * 2 + sizeof("0x")]; char unterminated_str[sizeof(void *) * 2 + sizeof("0x")]; @@ -246,7 +249,7 @@ main(void) /* Q_SETQUOTA */ - fill_memory((char *) dqblk, sizeof(*dqblk)); + fill_memory(dqblk, sizeof(*dqblk)); check_quota(CQF_NONE, ARG_STR(QCMD(Q_SETQUOTA, PRJQUOTA)), bogus_special, bogus_special_str, 0, bogus_addr); @@ -269,7 +272,7 @@ main(void) /* Q_SETINFO */ - fill_memory((char *) dqinfo, sizeof(*dqinfo)); + fill_memory(dqinfo, sizeof(*dqinfo)); /* In order to check flag printing correctness */ dqinfo->dqi_flags = 0xdeadabcd; diff --git a/tests/quotactl.h b/tests/quotactl.h index 49a6f87c0..31eaec586 100644 --- a/tests/quotactl.h +++ b/tests/quotactl.h @@ -1,7 +1,7 @@ /* * Common definitions for Linux and XFS quota tests. * - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * Copyright (c) 2016 Dmitry V. Levin * All rights reserved. * @@ -69,8 +69,6 @@ printf("%s%s=%#llx", (prefix), #field, \ zero_extend_signed_to_ull((where)->field)) -# define ARG_STR(_arg) (_arg), #_arg - typedef void (*print_cb)(long rc, void *addr, void *arg); enum check_quotactl_flag_bits { @@ -91,22 +89,6 @@ enum check_quotactl_flags { }; -static inline void -fill_memory_ex(char *ptr, size_t size, unsigned char start) -{ - size_t i; - - for (i = 0; i < size; i++) { - ptr[i] = start + i % 80; - } -} - -static inline void -fill_memory(char *ptr, size_t size) -{ - fill_memory_ex(ptr, size, 0x80); -} - static inline void check_quota(uint32_t flags, int cmd, const char *cmd_str, const char *special, const char *special_str, ...) @@ -173,13 +155,9 @@ check_quota(uint32_t flags, int cmd, const char *cmd_str, static const int bogus_cmd = 0xbadc0ded; -static const char * const bogus_special = - (const char *) (unsigned long) 0xfffffca7ffffc0deULL; static const int bogus_id = 0xca7faced; -static void * const bogus_addr = - (void *) (unsigned long) 0xffffda7affffdeadULL; -/* It is invalid anyway due to the flash in the end */ +/* It is invalid anyway due to the slash in the end */ static const char *bogus_dev = "/dev/bogus/"; static const char *bogus_dev_str = "\"/dev/bogus/\""; diff --git a/tests/read-write.c b/tests/read-write.c index 4d1e7302c..262e07b5b 100644 --- a/tests/read-write.c +++ b/tests/read-write.c @@ -33,6 +33,7 @@ #include #include #include +#include static void dump_str(const char *str, const unsigned int len) @@ -77,6 +78,20 @@ print_hex(const char *str, const unsigned int len) } } +static long +k_read(unsigned int fd, void *buf, size_t count) +{ + kernel_ulong_t kfd = (kernel_ulong_t) 0xfacefeed00000000ULL | fd; + return syscall(__NR_read, kfd, buf, count); +} + +static long +k_write(unsigned int fd, const void *buf, size_t count) +{ + kernel_ulong_t kfd = (kernel_ulong_t) 0xfacefeed00000000ULL | fd; + return syscall(__NR_write, kfd, buf, count); +} + static void test_dump(const unsigned int len) { @@ -89,7 +104,7 @@ test_dump(const unsigned int len) buf = tail_alloc(len); } - long rc = read(0, buf, len); + long rc = k_read(0, buf, len); if (rc != (int) len) perror_msg_and_fail("read: expected %d, returned %ld", len, rc); @@ -103,7 +118,7 @@ test_dump(const unsigned int len) for (i = 0; i < len; ++i) buf[i] = i; - rc = write(1, buf, len); + rc = k_write(1, buf, len); if (rc != (int) len) perror_msg_and_fail("write: expected %d, returned %ld", len, rc); @@ -147,18 +162,18 @@ main(void) long rc; - rc = write(1, w, 0); + rc = k_write(1, w, 0); if (rc) perror_msg_and_fail("write: expected 0, returned %ld", rc); tprintf("write(1, \"\", 0) = 0\n"); - rc = write(1, efault, 1); + rc = k_write(1, efault, 1); if (rc != -1) perror_msg_and_fail("write: expected -1 EFAULT" ", returned %ld", rc); tprintf("write(1, %p, 1) = -1 EFAULT (%m)\n", efault); - rc = write(1, w, w_len); + rc = k_write(1, w, w_len); if (rc != (int) w_len) perror_msg_and_fail("write: expected %u, returned %ld", w_len, rc); @@ -167,17 +182,17 @@ main(void) w_c, w_len, rc, w_d, w_c); close(1); - rc = read(0, r0, 0); + rc = k_read(0, r0, 0); if (rc) perror_msg_and_fail("read: expected 0, returned %ld", rc); tprintf("read(0, \"\", 0) = 0\n"); - rc = read(0, efault, 1); + rc = k_read(0, efault, 1); if (rc != -1) perror_msg_and_fail("read: expected -1, returned %ld", rc); tprintf("read(0, %p, 1) = -1 EFAULT (%m)\n", efault); - rc = read(0, r0, r0_len); + rc = k_read(0, r0, r0_len); if (rc != (int) r0_len) perror_msg_and_fail("read: expected %u, returned %ld", r0_len, rc); @@ -185,7 +200,7 @@ main(void) " | 00000 %-49s %-16s |\n", r0_c, r0_len, rc, r0_d, r0_c); - rc = read(0, r1, w_len); + rc = k_read(0, r1, w_len); if (rc != (int) r1_len) perror_msg_and_fail("read: expected %u, returned %ld", r1_len, rc); diff --git a/tests/readahead.c b/tests/readahead.c index 5677c1edb..c11b577d2 100644 --- a/tests/readahead.c +++ b/tests/readahead.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,15 +29,24 @@ #include #ifdef HAVE_READAHEAD +/* Check for glibc readahead argument passing bugs. */ # ifdef __GLIBC__ /* - * Check for glibc readahead off64_t argument passing bug, + * glibc < 2.8 had an incorrect order of higher and lower parts of offset, * see https://sourceware.org/bugzilla/show_bug.cgi?id=5208 */ # if !(defined __GLIBC_MINOR__ && \ (__GLIBC__ << 16) + __GLIBC_MINOR__ >= (2 << 16) + 8) # undef HAVE_READAHEAD -# endif +# endif /* glibc < 2.8 */ +/* + * glibc < 2.25 had an incorrect implementation on mips n64, + * see https://sourceware.org/bugzilla/show_bug.cgi?id=21026 + */ +# if defined LINUX_MIPSN64 && !(defined __GLIBC_MINOR__ && \ + (__GLIBC__ << 16) + __GLIBC_MINOR__ >= (2 << 16) + 25) +# undef HAVE_READAHEAD +# endif /* LINUX_MIPSN64 && glibc < 2.25 */ # endif /* __GLIBC__ */ #endif /* HAVE_READAHEAD */ diff --git a/tests/readv.c b/tests/readv.c index c134d7265..0e5aab65c 100644 --- a/tests/readv.c +++ b/tests/readv.c @@ -40,10 +40,7 @@ main(void) tprintf("%s", ""); int fds[2]; - if (pipe(fds)) - perror_msg_and_fail("pipe"); - assert(0 == fds[0]); - assert(1 == fds[1]); + pipe_maxfd(fds); static const char w0_c[] = "012"; const char *w0_d = hexdump_strdup(w0_c); @@ -60,13 +57,13 @@ main(void) void *w2 = tail_memdup(w2_c, LENGTH_OF(w2_c)); long rc; - rc = writev(1, efault, 42); - tprintf("writev(1, %p, 42) = %ld %s (%m)\n", - efault, rc, errno2name()); + rc = writev(fds[1], efault, 42); + tprintf("writev(%d, %p, 42) = %ld %s (%m)\n", + fds[1], efault, rc, errno2name()); - rc = readv(0, efault, 42); - tprintf("readv(0, %p, 42) = %ld %s (%m)\n", - efault, rc, errno2name()); + rc = readv(fds[0], efault, 42); + tprintf("readv(%d, %p, 42) = %ld %s (%m)\n", + fds[0], efault, rc, errno2name()); static const char r0_c[] = "01234567"; const char *r0_d = hexdump_strdup(r0_c); @@ -87,21 +84,21 @@ main(void) }; const struct iovec *w_iov = tail_memdup(w_iov_, sizeof(w_iov_)); - tprintf("writev(1, [], 0) = %ld\n", - (long) writev(1, w_iov, 0)); + tprintf("writev(%d, [], 0) = %ld\n", + fds[1], (long) writev(fds[1], w_iov, 0)); - rc = writev(1, w_iov + ARRAY_SIZE(w_iov_) - 1, 2); - tprintf("writev(1, [{iov_base=\"%s\", iov_len=%u}, %p], 2)" + rc = writev(fds[1], w_iov + ARRAY_SIZE(w_iov_) - 1, 2); + tprintf("writev(%d, [{iov_base=\"%s\", iov_len=%u}, %p], 2)" " = %ld %s (%m)\n", - w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), + fds[1], w2_c, LENGTH_OF(w2_c), w_iov + ARRAY_SIZE(w_iov_), rc, errno2name()); const unsigned int w_len = LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c); - assert(writev(1, w_iov, ARRAY_SIZE(w_iov_)) == (int) w_len); - close(1); - tprintf("writev(1, [{iov_base=\"%s\", iov_len=%u}" + assert(writev(fds[1], w_iov, ARRAY_SIZE(w_iov_)) == (int) w_len); + close(fds[1]); + tprintf("writev(%d, [{iov_base=\"%s\", iov_len=%u}" ", {iov_base=\"%s\", iov_len=%u}" ", {iov_base=\"%s\", iov_len=%u}], %u) = %u\n" " * %u bytes in buffer 0\n" @@ -110,7 +107,7 @@ main(void) " | 00000 %-49s %-16s |\n" " * %u bytes in buffer 2\n" " | 00000 %-49s %-16s |\n", - w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), + fds[1], w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c), w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(w_iov_), w_len, LENGTH_OF(w0_c), w0_d, w0_c, LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c); @@ -125,10 +122,11 @@ main(void) }; const struct iovec *r_iov = tail_memdup(r0_iov_, sizeof(r0_iov_)); - assert(readv(0, r_iov, ARRAY_SIZE(r0_iov_)) == (int) r_len); - tprintf("readv(0, [{iov_base=\"%s\", iov_len=%u}], %u) = %u\n" + assert(readv(fds[0], r_iov, ARRAY_SIZE(r0_iov_)) == (int) r_len); + tprintf("readv(%d, [{iov_base=\"%s\", iov_len=%u}], %u) = %u\n" " * %u bytes in buffer 0\n" " | 00000 %-49s %-16s |\n", + fds[0], r0_c, r_len, ARRAY_SIZE(r0_iov_), r_len, r_len, r0_d, r0_c); void *r1 = tail_alloc(r_len); @@ -145,14 +143,14 @@ main(void) }; r_iov = tail_memdup(r1_iov_, sizeof(r1_iov_)); - assert(readv(0, r_iov, ARRAY_SIZE(r1_iov_)) == (int) w_len - r_len); - tprintf("readv(0, [{iov_base=\"%s\", iov_len=%u}" + assert(readv(fds[0], r_iov, ARRAY_SIZE(r1_iov_)) == (int) w_len - (int) r_len); + tprintf("readv(%d, [{iov_base=\"%s\", iov_len=%u}" ", {iov_base=\"\", iov_len=%u}], %u) = %u\n" " * %u bytes in buffer 0\n" " | 00000 %-49s %-16s |\n", - r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), w_len - r_len, + fds[0], r1_c, r_len, w_len, ARRAY_SIZE(r1_iov_), w_len - r_len, w_len - r_len, r1_d, r1_c); - close(0); + close(fds[0]); tprintf("+++ exited with 0 +++\n"); return 0; diff --git a/tests/readv.test b/tests/readv.test index cbcffde99..dc187996f 100755 --- a/tests/readv.test +++ b/tests/readv.test @@ -1,6 +1,65 @@ #!/bin/sh - -# Check decoding of readv and writev syscalls. +# +# Check decoding and dumping of readv and writev syscalls. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. . "${srcdir=.}/init.sh" -run_strace_match_diff -a16 -eread=0 -ewrite=1 -e trace=readv,writev + +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread=all -ewrite='!none' +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread='!none' -ewrite=all +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread=none -ewrite='!all' -eread='!0,1,2' -ewrite='!0,1,2' +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread='!all' -ewrite=none -eread='!0,1,2' -ewrite='!0,1,2' + +wfd="$(./print_maxfd)" +rfd="$(($wfd - 1))" +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread="$rfd" -ewrite="$wfd" +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread="!$rfd" -ewrite="!$wfd" -eread="$rfd" -ewrite="$wfd" + +rfds='!!!0' +[ $rfd -lt 1023 ] || rfd=1023 +i=0 +while [ $i -lt $rfd ]; do + rfds="$rfds,$i" + i=$(($i + 1)) +done + +wfds='!!!0' +[ $wfd -lt 1023 ] || wfd=1023 +i=0 +while [ $i -lt $wfd ]; do + wfds="$wfds,$i" + i=$(($i + 1)) +done + +run_strace_match_diff -a16 -e trace=readv,writev \ + -eread="$rfds" -ewrite="$wfds" diff --git a/tests/recvmmsg-timeout.c b/tests/recvmmsg-timeout.c index 4afd8a60f..7cf064db4 100644 --- a/tests/recvmmsg-timeout.c +++ b/tests/recvmmsg-timeout.c @@ -53,7 +53,7 @@ main(void) struct timespec t = { .tv_sec = 0, .tv_nsec = 12345678 }; int rc = recv_mmsg(-1, &mh, 1, 0, &t); - printf("recvmmsg(-1, %p, 1, 0, {0, 12345678})" + printf("recvmmsg(-1, %p, 1, 0, {tv_sec=0, tv_nsec=12345678})" " = %d %s (%m)\n", &mh, rc, errno2name()); rc = recv_mmsg(fds[0], &mh, 1, 0, &t); @@ -62,7 +62,8 @@ main(void) printf("recvmmsg(%d, [{msg_hdr={msg_name=NULL, msg_namelen=0" ", msg_iov=[{iov_base=\"A\", iov_len=1}], msg_iovlen=1" ", msg_controllen=0, msg_flags=0}, msg_len=1}], 1, 0" - ", {0, 12345678}) = %d (left {0, %d})\n", + ", {tv_sec=0, tv_nsec=12345678}) = " + "%d (left {tv_sec=0, tv_nsec=%d})\n", fds[0], rc, (int) t.tv_nsec); puts("+++ exited with 0 +++"); diff --git a/tests/recvmsg.c b/tests/recvmsg.c index 19afe8fa6..fa41a9d41 100644 --- a/tests/recvmsg.c +++ b/tests/recvmsg.c @@ -145,7 +145,7 @@ main(void) r_mh->msg_iov = r_iov; r_mh->msg_iovlen = ARRAY_SIZE(r1_iov_); - assert(recvmsg(0, r_mh, 0) == (int) w_len - r_len); + assert(recvmsg(0, r_mh, 0) == (int) w_len - (int) r_len); tprintf("recvmsg(0, {msg_name=NULL, msg_namelen=0, msg_iov=" "[{iov_base=\"%s\", iov_len=%u}, {iov_base=\"\", iov_len=%u}]" ", msg_iovlen=%u, msg_controllen=0, msg_flags=0}, 0) = %u\n" diff --git a/tests/redirect-fds.test b/tests/redirect-fds.test index a451917b2..ddef8fab1 100755 --- a/tests/redirect-fds.test +++ b/tests/redirect-fds.test @@ -29,6 +29,11 @@ . "${srcdir=.}/init.sh" +case "$STRACE" in + *valgrind\ *--suppressions=*) + skip_ 'incompatible with valgrind' ;; +esac + fd0="$LOG.fd0" fd1="$LOG.fd1" fd2="$LOG.fd2" diff --git a/tests/redirect.test b/tests/redirect.test index 07fbcdf09..fa0c53696 100755 --- a/tests/redirect.test +++ b/tests/redirect.test @@ -35,35 +35,44 @@ run_prog_skip_if_failed \ check_prog sleep check_prog yes +> "$OUT" > "$LOG" - ( + while [ -f "$LOG" ]; do + : + done $SLEEP_A_BIT & yes if kill -0 $! 2> /dev/null; then wait else - echo TIMEOUT >> $LOG + echo TIMEOUT >> "$OUT" fi ) | $STRACE -qq -enone -esignal=none \ - sh -c "exec <&- >&-; $SLEEP_A_BIT; $SLEEP_A_BIT" + sh -c "exec <&- >&-; rm -f -- $LOG; $SLEEP_A_BIT; $SLEEP_A_BIT" -if [ -s "$LOG" ]; then +if [ -s "$OUT" ]; then fail_ "$STRACE failed to redirect standard input" fi +> "$LOG" $STRACE -qq -enone -esignal=none \ - sh -c "exec <&- >&-; $SLEEP_A_BIT; $SLEEP_A_BIT" | + sh -c "exec <&- >&-; rm -f -- $LOG; $SLEEP_A_BIT; $SLEEP_A_BIT" | ( + while [ -f "$LOG" ]; do + : + done $SLEEP_A_BIT & cat > /dev/null if kill -0 $! 2> /dev/null; then wait else - echo TIMEOUT >> $LOG + echo TIMEOUT >> "$OUT" fi ) -if [ -s "$LOG" ]; then +if [ -s "$OUT" ]; then fail_ "$STRACE failed to redirect standard output" fi + +rm -f -- "$OUT" diff --git a/tests/remap_file_pages.c b/tests/remap_file_pages.c index 9298f2898..452d2de75 100644 --- a/tests/remap_file_pages.c +++ b/tests/remap_file_pages.c @@ -39,10 +39,10 @@ int main(void) { - const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; - const unsigned long size = (unsigned long) 0xdefaced1bad2f00d; + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL; + const unsigned long size = (unsigned long) 0xdefaced1bad2f00dULL; const unsigned long prot = PROT_READ|PROT_WRITE|PROT_EXEC; - const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deed; + const unsigned long pgoff = (unsigned long) 0xcaf3babebad4deedULL; const unsigned long flags = MAP_PRIVATE|MAP_ANONYMOUS; long rc = syscall(__NR_remap_file_pages, addr, size, prot, pgoff, flags); diff --git a/tests/renameat.c b/tests/renameat.c index d20157896..2b874efac 100644 --- a/tests/renameat.c +++ b/tests/renameat.c @@ -12,8 +12,8 @@ int main(void) { - const long int fd_old = (long int) 0xdeadbeefffffffff; - const long int fd_new = (long int) 0xdeadbeeffffffffe; + const long int fd_old = (long int) 0xdeadbeefffffffffULL; + const long int fd_new = (long int) 0xdeadbeeffffffffeULL; long rc = syscall(__NR_renameat, fd_old, OLD_FILE, fd_new, NEW_FILE); printf("renameat(%d, \"%s\", %d, \"%s\") = %ld %s (%m)\n", diff --git a/tests/renameat2.c b/tests/renameat2.c index ea5718513..33f889884 100644 --- a/tests/renameat2.c +++ b/tests/renameat2.c @@ -29,6 +29,7 @@ #include "tests.h" #include +#include "scno.h" #ifdef __NR_renameat2 diff --git a/tests/request_key.c b/tests/request_key.c index 361bf5290..fea977b2d 100644 --- a/tests/request_key.c +++ b/tests/request_key.c @@ -1,7 +1,7 @@ /* * Check decoding of request_key syscall. * - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -64,9 +64,6 @@ do_request_key(const char *type, const char *type_str, const char *desc, printf(") = %s\n", errstr); } -# define _STR(_arg) #_arg -# define ARG_STR(_arg) (_arg), #_arg - int main(void) { @@ -89,7 +86,7 @@ main(void) const char *str; } types[] = { { ARG_STR(NULL) }, - { (const char *) 0xfffffee1fffffbadULL, NULL }, + { bogus_type + sizeof(unterminated1), NULL }, { bogus_type, NULL }, { ARG_STR("\20\21\22\23\24") }, { ARG_STR("user") }, @@ -100,7 +97,7 @@ main(void) const char *str; } descs[] = { { ARG_STR(NULL) }, - { (const char *) 0xfffff00dfffffca7ULL, NULL }, + { bogus_desc + sizeof(unterminated2), NULL }, { bogus_desc, NULL }, { ARG_STR("\25\26\27\30\31") }, { ARG_STR("desc") }, @@ -112,7 +109,7 @@ main(void) const char *str; } infos[] = { { ARG_STR(NULL) }, - { (const char *) 0xfffffacefffff157ULL, NULL }, + { bogus_info + sizeof(unterminated3), NULL }, { bogus_info, NULL }, { ARG_STR("\32\33\34\35\36") }, { ARG_STR("info") }, diff --git a/tests/restart_syscall.c b/tests/restart_syscall.c index 3f07d7836..e492e62e2 100644 --- a/tests/restart_syscall.c +++ b/tests/restart_syscall.c @@ -55,7 +55,8 @@ main(void) if (nanosleep(&req, &rem)) perror_msg_and_fail("nanosleep"); - printf("nanosleep\\(\\{%jd, %jd\\}, \\{%jd, %jd\\}\\)" + printf("nanosleep\\(\\{tv_sec=%jd, tv_nsec=%jd\\}, " + "\\{tv_sec=%jd, tv_nsec=%jd\\}\\)" " = \\? ERESTART_RESTARTBLOCK \\(Interrupted by signal\\)\n", (intmax_t) req.tv_sec, (intmax_t) req.tv_nsec, (intmax_t) rem.tv_sec, (intmax_t) rem.tv_nsec); @@ -66,7 +67,8 @@ main(void) #else # define ALTERNATIVE_NANOSLEEP_REQ "" #endif - printf("(nanosleep\\((%s\\{%jd, %jd\\}), %p|restart_syscall\\(<\\.\\.\\." + printf("(nanosleep\\((%s\\{tv_sec=%jd, tv_nsec=%jd\\}), " + "%p|restart_syscall\\(<\\.\\.\\." " resuming interrupted nanosleep \\.\\.\\.>)\\) = 0\n", ALTERNATIVE_NANOSLEEP_REQ, (intmax_t) req.tv_sec, (intmax_t) req.tv_nsec, &rem); diff --git a/tests/rt_sigqueueinfo.c b/tests/rt_sigqueueinfo.c index 9ca860adf..aba6776c5 100644 --- a/tests/rt_sigqueueinfo.c +++ b/tests/rt_sigqueueinfo.c @@ -38,7 +38,7 @@ main (void) .sa_handler = SIG_IGN }; union sigval value = { - .sival_ptr = (void *) (unsigned long) 0xdeadbeefbadc0ded + .sival_ptr = (void *) (unsigned long) 0xdeadbeefbadc0dedULL }; pid_t pid = getpid(); diff --git a/tests/rt_sigtimedwait.c b/tests/rt_sigtimedwait.c index ee6d3b997..10311e6ef 100644 --- a/tests/rt_sigtimedwait.c +++ b/tests/rt_sigtimedwait.c @@ -54,19 +54,22 @@ iterate(const char *const text, const void *set, for (;;) { assert(k_sigtimedwait(set, NULL, timeout, size) == -1); if (EINTR == errno) { - tprintf("rt_sigtimedwait(%s, NULL, {%jd, %jd}, %u)" + tprintf("rt_sigtimedwait(%s, NULL, " + "{tv_sec=%jd, tv_nsec=%jd}, %u)" " = -1 EAGAIN (%m)\n", text, (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, size); } else { if (size < sizeof(long)) - tprintf("rt_sigtimedwait(%p, NULL, {%jd, %jd}" + tprintf("rt_sigtimedwait(%p, NULL, " + "{tv_sec=%jd, tv_nsec=%jd}" ", %u) = -1 EINVAL (%m)\n", set, (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, size); else - tprintf("rt_sigtimedwait(%s, NULL, {%jd, %jd}" + tprintf("rt_sigtimedwait(%s, NULL, " + "{tv_sec=%jd, tv_nsec=%jd}" ", %u) = -1 EINVAL (%m)\n", text, (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, size); @@ -97,14 +100,14 @@ main(void) assert(k_sigtimedwait(k_set, NULL, timeout, set_size) == -1); if (EAGAIN == errno) break; - tprintf("rt_sigtimedwait(%p, NULL, {%jd, %jd}, %u)" + tprintf("rt_sigtimedwait(%p, NULL, {tv_sec=%jd, tv_nsec=%jd}, %u)" " = -1 EINVAL (%m)\n", k_set, (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, set_size); } if (!set_size) perror_msg_and_fail("rt_sigtimedwait"); - tprintf("rt_sigtimedwait([], NULL, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + tprintf("rt_sigtimedwait([], NULL, {tv_sec=%jd, tv_nsec=%jd}, %u) = -1 EAGAIN (%m)\n", (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, set_size); @@ -115,7 +118,7 @@ main(void) assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); assert(EAGAIN == errno); - tprintf("rt_sigtimedwait([HUP], %p, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + tprintf("rt_sigtimedwait([HUP], %p, {tv_sec=%jd, tv_nsec=%jd}, %u) = -1 EAGAIN (%m)\n", info, (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, set_size); @@ -124,7 +127,7 @@ main(void) assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); assert(EAGAIN == errno); - tprintf("rt_sigtimedwait([HUP INT], %p, {%jd, %jd}, %u)" + tprintf("rt_sigtimedwait([HUP INT], %p, {tv_sec=%jd, tv_nsec=%jd}, %u)" " = -1 EAGAIN (%m)\n", info, (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, set_size); @@ -136,7 +139,7 @@ main(void) assert(k_sigtimedwait(k_set, info, timeout, set_size) == -1); assert(EAGAIN == errno); - tprintf("rt_sigtimedwait(%s, %p, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + tprintf("rt_sigtimedwait(%s, %p, {tv_sec=%jd, tv_nsec=%jd}, %u) = -1 EAGAIN (%m)\n", "[HUP INT QUIT ALRM TERM]", info, (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, set_size); @@ -144,7 +147,7 @@ main(void) memset(k_set - set_size, -1, set_size); assert(k_sigtimedwait(k_set - set_size, info, timeout, set_size) == -1); assert(EAGAIN == errno); - tprintf("rt_sigtimedwait(~[], %p, {%jd, %jd}, %u) = -1 EAGAIN (%m)\n", + tprintf("rt_sigtimedwait(~[], %p, {tv_sec=%jd, tv_nsec=%jd}, %u) = -1 EAGAIN (%m)\n", info, (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, set_size); @@ -161,7 +164,7 @@ main(void) raise(SIGALRM); assert(k_sigtimedwait(k_set, info, timeout, set_size) == SIGALRM); tprintf("rt_sigtimedwait(%s, {si_signo=%s, si_code=SI_TKILL" - ", si_pid=%d, si_uid=%d}, {%jd, %jd}, %u) = %d (%s)\n", + ", si_pid=%d, si_uid=%d}, {tv_sec=%jd, tv_nsec=%jd}, %u) = %d (%s)\n", "[HUP INT QUIT ALRM TERM]", "SIGALRM", getpid(), getuid(), (intmax_t) timeout->tv_sec, (intmax_t) timeout->tv_nsec, set_size, SIGALRM, "SIGALRM"); diff --git a/tests/rt_tgsigqueueinfo.c b/tests/rt_tgsigqueueinfo.c index ebfb71966..ec0934812 100644 --- a/tests/rt_tgsigqueueinfo.c +++ b/tests/rt_tgsigqueueinfo.c @@ -39,12 +39,12 @@ # include static long -k_tgsigqueueinfo(const pid_t pid, const int sig, const void const *info) +k_tgsigqueueinfo(const pid_t pid, const int sig, const void *const info) { return syscall(__NR_rt_tgsigqueueinfo, - (unsigned long) 0xffffffff00000000 | pid, - (unsigned long) 0xffffffff00000000 | pid, - (unsigned long) 0xffffffff00000000 | sig, + (unsigned long) 0xffffffff00000000ULL | pid, + (unsigned long) 0xffffffff00000000ULL | pid, + (unsigned long) 0xffffffff00000000ULL | sig, info); } @@ -64,7 +64,7 @@ main (void) info->si_code = SI_QUEUE; info->si_pid = getpid(); info->si_uid = getuid(); - info->si_value.sival_ptr = (void *) (unsigned long) 0xdeadbeeffacefeed; + info->si_value.sival_ptr = (void *) (unsigned long) 0xdeadbeeffacefeedULL; if (k_tgsigqueueinfo(info->si_pid, SIGUSR1, info)) (errno == ENOSYS ? perror_msg_and_skip : perror_msg_and_fail)( diff --git a/tests/sched_rr_get_interval.c b/tests/sched_rr_get_interval.c index 99943e7be..0aacd2b77 100644 --- a/tests/sched_rr_get_interval.c +++ b/tests/sched_rr_get_interval.c @@ -25,8 +25,8 @@ main(void) rc = syscall(__NR_sched_rr_get_interval, 0, tp); if (rc == 0) - printf("sched_rr_get_interval(0, {%jd, %jd}) = 0\n", - (intmax_t)tp->tv_sec, (intmax_t)tp->tv_nsec); + printf("sched_rr_get_interval(0, {tv_sec=%jd, tv_nsec=%jd}) = " + "0\n", (intmax_t)tp->tv_sec, (intmax_t)tp->tv_nsec); else printf("sched_rr_get_interval(-1, %p) = %s\n", tp, sprintrc(rc)); diff --git a/tests/sched_xetaffinity.c b/tests/sched_xetaffinity.c index 195f3af02..41a18202d 100644 --- a/tests/sched_xetaffinity.c +++ b/tests/sched_xetaffinity.c @@ -39,16 +39,22 @@ # include # include +static const char *errstr; + static int getaffinity(unsigned long pid, unsigned long size, void *set) { - return syscall(__NR_sched_getaffinity, pid, size, set); + int rc = syscall(__NR_sched_getaffinity, pid, size, set); + errstr = sprintrc(rc); + return rc; } static int setaffinity(unsigned long pid, unsigned long size, void *set) { - return syscall(__NR_sched_setaffinity, pid, size, set); + int rc = syscall(__NR_sched_setaffinity, pid, size, set); + errstr = sprintrc(rc); + return rc; } int @@ -63,31 +69,36 @@ main(void) break; if (EINVAL != errno) perror_msg_and_skip("sched_getaffinity"); - printf("sched_getaffinity(%d, %u, NULL) = -1 EINVAL (%m)\n", - pid, cpuset_size); + printf("sched_getaffinity(%d, %u, NULL) = %s\n", + pid, cpuset_size, errstr); cpuset_size <<= 1; } assert(cpuset_size); - printf("sched_getaffinity(%d, %u, NULL) = -1 EFAULT (%m)\n", - pid, cpuset_size); + printf("sched_getaffinity(%d, %u, NULL) = %s\n", + pid, cpuset_size, errstr); cpu_set_t *cpuset = tail_alloc(cpuset_size); - assert(getaffinity(pid, cpuset_size, cpuset + 1) == -1); - printf("sched_getaffinity(%d, %u, %p) = -1 EFAULT (%m)\n", - pid, cpuset_size, cpuset + 1); + getaffinity(pid, cpuset_size, cpuset + 1); + printf("sched_getaffinity(%d, %u, %p) = %s\n", + pid, cpuset_size, cpuset + 1, errstr); + + int ret_size = getaffinity(pid, cpuset_size, cpuset); + if (ret_size < 0) + perror_msg_and_fail("sched_getaffinity(%d, %u, %p) = %s\n", + pid, (unsigned) cpuset_size, cpuset, errstr); + assert(ret_size <= (int) cpuset_size); - assert(getaffinity(pid, cpuset_size, cpuset) == (int) cpuset_size); printf("sched_getaffinity(%d, %u, [", pid, cpuset_size); const char *sep; unsigned int i, cpu; - for (i = 0, cpu = 0, sep = ""; i < cpuset_size * 8; ++i) { - if (CPU_ISSET_S(i, cpuset_size, cpuset)) { + for (i = 0, cpu = 0, sep = ""; i < (unsigned) ret_size * 8; ++i) { + if (CPU_ISSET_S(i, (unsigned) ret_size, cpuset)) { printf("%s%u", sep, i); - sep = " "; + sep = ", "; cpu = i; } } - printf("]) = %u\n", cpuset_size); + printf("]) = %s\n", errstr); CPU_ZERO_S(cpuset_size, cpuset); CPU_SET_S(cpu, cpuset_size, cpuset); @@ -98,16 +109,19 @@ main(void) const unsigned int big_size = cpuset_size < 128 ? 128 : cpuset_size * 2; cpuset = tail_alloc(big_size); - const int ret_size = getaffinity(pid, big_size, cpuset); - assert(ret_size >= (int) cpuset_size && ret_size <= (int) big_size); + ret_size = getaffinity(pid, big_size, cpuset); + if (ret_size < 0) + perror_msg_and_fail("sched_getaffinity(%d, %u, %p) = %s\n", + pid, big_size, cpuset, errstr); + assert(ret_size <= (int) big_size); printf("sched_getaffinity(%d, %u, [", pid, big_size); for (i = 0, sep = ""; i < (unsigned) ret_size * 8; ++i) { if (CPU_ISSET_S(i, (unsigned) ret_size, cpuset)) { printf("%s%u", sep, i); - sep = " "; + sep = ", "; } } - printf("]) = %d\n", ret_size); + printf("]) = %s\n", errstr); puts("+++ exited with 0 +++"); return 0; diff --git a/tests/scno_tampering.sh b/tests/scno_tampering.sh new file mode 100755 index 000000000..6aa78432c --- /dev/null +++ b/tests/scno_tampering.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# +# Skip the test if arch+kernel combination is not supported. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +uname_r="$(uname -r)" +case "$STRACE_ARCH" in + arm) + # PTRACE_SET_SYSCALL is supported by linux kernel + # starting with commit v2.6.16-rc1~107^2. + require_min_kernel_version_or_skip 2.6.16 ;; + aarch64) + # NT_ARM_SYSTEM_CALL regset is supported by linux kernel + # starting with commit v3.19-rc1~59^2~16. + require_min_kernel_version_or_skip 3.19 ;; + hppa) + # Syscall number and return value modification did not work + # properly before commit v4.5-rc7~31^2~1. + require_min_kernel_version_or_skip 4.5 ;; + sparc*) + # Reloading the syscall number from %g1 register is supported + # by linux kernel starting with commit v4.5-rc7~35^2~3. + require_min_kernel_version_or_skip 4.5 ;; + mips) + # Only the native ABI is supported by the kernel properly, see + # https://sourceforge.net/p/strace/mailman/message/35587571/ + uname_m="$(uname -m)" + case "$MIPS_ABI:$uname_m" in + o32:mips|n64:mips64) ;; + *) skip_ "$MIPS_ABI scno tampering does not work on $uname_m yet" ;; + esac ;; +esac diff --git a/tests/seccomp-strict.c b/tests/seccomp-strict.c index 47d909d5a..237b0ecac 100644 --- a/tests/seccomp-strict.c +++ b/tests/seccomp-strict.c @@ -41,18 +41,18 @@ main(void) static const char text1[] = "seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL) = 0\n"; static const char text2[] = "+++ exited with 0 +++\n"; - const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + const kernel_ulong_t addr = (kernel_ulong_t) 0xfacefeeddeadbeefULL; long rc; rc = syscall(__NR_seccomp, -1L, -1L, addr); - printf("seccomp(%#x /* SECCOMP_SET_MODE_??? */, %u, %#lx)" - " = %ld %s (%m)\n", -1, -1, addr, rc, errno2name()); + printf("seccomp(%#x /* SECCOMP_SET_MODE_??? */, %u, %#llx)" + " = %s\n", -1, -1, (unsigned long long) addr, sprintrc(rc)); fflush(stdout); rc = syscall(__NR_seccomp, 0, 0, 0); if (rc) { - printf("seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL)" - " = %ld %s (%m)\n", rc, errno2name()); + printf("seccomp(SECCOMP_SET_MODE_STRICT, 0, NULL) = %s\n", + sprintrc(rc)); fflush(stdout); rc = 0; } else { diff --git a/tests/semop.c b/tests/semop.c index f9b74440a..a2ff2635a 100644 --- a/tests/semop.c +++ b/tests/semop.c @@ -92,8 +92,8 @@ main(void) id, sem_b + 1, ts + 1, sprintrc(rc)); rc = semtimedop(bogus_semid, sem_b2, 2, ts); - printf("semtimedop(%d, [{%hu, %hd, %s%s%#hx}, %p], %u, {%jd, %jd}) = " - "%s\n", + printf("semtimedop(%d, [{%hu, %hd, %s%s%#hx}, %p], %u, " + "{tv_sec=%jd, tv_nsec=%jd}) = %s\n", bogus_semid, sem_b2->sem_num, sem_b2->sem_op, sem_b2->sem_flg & SEM_UNDO ? "SEM_UNDO|" : "", sem_b2->sem_flg & IPC_NOWAIT ? "IPC_NOWAIT|" : "", @@ -110,7 +110,8 @@ main(void) sem_b->sem_op = -1; if (semtimedop(id, sem_b, 1, ts)) perror_msg_and_skip("semtimedop, -1"); - printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1, {%jd, %jd}) = 0\n", id, + printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1, " + "{tv_sec=%jd, tv_nsec=%jd}) = 0\n", id, (intmax_t) ts->tv_sec, (intmax_t) ts->tv_nsec); puts("+++ exited with 0 +++"); diff --git a/tests/sendfile.c b/tests/sendfile.c index 61f9212f2..23f096b62 100644 --- a/tests/sendfile.c +++ b/tests/sendfile.c @@ -107,7 +107,7 @@ main(int ac, const char **av) if (p_off != p) { uint64_t *p_off64 = (uint64_t *) p_off; - *p_off64 = 0xcafef00dfacefeed; + *p_off64 = 0xcafef00dfacefeedULL; assert(syscall(__NR_sendfile, sv[1], reg_in, p_off64, 1) == -1); printf("sendfile(%d, %d, [14627392582579060461], 1)" " = -1 EINVAL (%m)\n", sv[1], reg_in); diff --git a/tests/sendfile64.c b/tests/sendfile64.c index f757963e8..7208c3006 100644 --- a/tests/sendfile64.c +++ b/tests/sendfile64.c @@ -97,7 +97,7 @@ main(int ac, const char **av) (unsigned long) stb.st_size + 1, (unsigned long) blen); - *p_off = 0xcafef00dfacefeed; + *p_off = 0xcafef00dfacefeedULL; assert(syscall(__NR_sendfile64, sv[1], reg_in, p_off, 1) == -1); printf("sendfile64(%d, %d, [14627392582579060461], 1)" " = -1 EINVAL (%m)\n", sv[1], reg_in); diff --git a/tests/set_mempolicy.c b/tests/set_mempolicy.c index 3802eafa8..f3261a094 100644 --- a/tests/set_mempolicy.c +++ b/tests/set_mempolicy.c @@ -126,8 +126,8 @@ main(void) perror_msg_and_skip("set_mempolicy"); puts("set_mempolicy(MPOL_DEFAULT, NULL, 0) = 0"); - const unsigned long *nodemask = (void *) 0xfacefeedfffffffe; - const unsigned long maxnode = (unsigned long) 0xcafef00dbadc0ded; + const unsigned long *nodemask = (void *) 0xfacefeedfffffffeULL; + const unsigned long maxnode = (unsigned long) 0xcafef00dbadc0dedULL; long rc = syscall(__NR_set_mempolicy, 1, nodemask, maxnode); printf("set_mempolicy(MPOL_PREFERRED, %p, %lu) = %s\n", nodemask, maxnode, sprintrc(rc)); diff --git a/tests/setfsugid.c b/tests/setfsugid.c index 5b8f4fdd8..79ba34d89 100644 --- a/tests/setfsugid.c +++ b/tests/setfsugid.c @@ -30,15 +30,24 @@ #include #include +void +printuid(unsigned UGID_TYPE id) +{ + if (id == (unsigned UGID_TYPE) -1U) + printf("-1"); + else + printf("%u", id); +} + int main(void) { unsigned int ugid = GETUGID; - const long tests[] = { + const kernel_ulong_t tests[] = { ugid, 0xffff0000U | ugid, - (unsigned long) 0xffffffff00000000ULL | ugid, + (kernel_ulong_t) 0xffffffff00000000ULL | ugid, 0xffffU, -1U, -1L, @@ -54,7 +63,9 @@ main(void) unsigned int rc; rc = syscall(SYSCALL_NR, tests[i]); - printf("%s(%u) = %u\n", SYSCALL_NAME, num, rc); + printf("%s(", SYSCALL_NAME); + printuid(num); + printf(") = %u\n", rc); rc = syscall(SYSCALL_NR, ugid); printf("%s(%u) = %u\n", SYSCALL_NAME, ugid, rc); diff --git a/tests/setgroups.c b/tests/setgroups.c index 5068ff47a..1ec8333ff 100644 --- a/tests/setgroups.c +++ b/tests/setgroups.c @@ -57,9 +57,20 @@ # include # include +void +printuid(GID_TYPE id) +{ + if (id == (GID_TYPE) -1U) + printf("-1"); + else + printf("%u", id); +} + int main(void) { + const char *errstr; + /* check how the first argument is decoded */ long rc = syscall(SYSCALL_NR, 0, 0); printf("%s(0, NULL) = %s\n", SYSCALL_NAME, sprintrc(rc)); @@ -74,10 +85,10 @@ main(void) printf("%s(1, NULL) = %s\n", SYSCALL_NAME, sprintrc(rc)); rc = syscall(SYSCALL_NR, -1U, 0); - printf("%s(%u, NULL) = %s\n", SYSCALL_NAME, -1U, sprintrc(rc)); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, -1, sprintrc(rc)); rc = syscall(SYSCALL_NR, -1L, 0); - printf("%s(%u, NULL) = %s\n", SYSCALL_NAME, -1U, sprintrc(rc)); + printf("%s(%d, NULL) = %s\n", SYSCALL_NAME, -1, sprintrc(rc)); /* check how the second argument is decoded */ const GID_TYPE *const g1 = tail_alloc(sizeof(*g1)); @@ -88,8 +99,10 @@ main(void) printf("%s(0, []) = %s\n", SYSCALL_NAME, sprintrc(rc)); rc = syscall(SYSCALL_NR, 1, g1); - printf("%s(1, [%u]) = %s\n", - SYSCALL_NAME, (unsigned) *g1, sprintrc(rc)); + errstr = sprintrc(rc); + printf("%s(1, [", SYSCALL_NAME); + printuid(*g1); + printf("]) = %s\n", errstr); rc = syscall(SYSCALL_NR, 1, g1 + 1); printf("%s(1, %p) = %s\n", SYSCALL_NAME, g1 + 1, sprintrc(rc)); @@ -98,48 +111,71 @@ main(void) printf("%s(1, %#lx) = %s\n", SYSCALL_NAME, -1L, sprintrc(rc)); rc = syscall(SYSCALL_NR, 2, g1); - printf("%s(2, [%u, %p]) = %s\n", - SYSCALL_NAME, (unsigned) *g1, g1 + 1, sprintrc(rc)); + errstr = sprintrc(rc); + printf("%s(2, [", SYSCALL_NAME); + printuid(*g1); + printf(", %p]) = %s\n", g1 + 1, errstr); g2[0] = -2; g2[1] = -3; rc = syscall(SYSCALL_NR, 2, g2); - printf("%s(2, [%u, %u]) = %s\n", SYSCALL_NAME, - (unsigned) g2[0], (unsigned) g2[1], sprintrc(rc)); + errstr = sprintrc(rc); + printf("%s(2, [", SYSCALL_NAME); + printuid(g2[0]); + printf(", "); + printuid(g2[1]); + printf("]) = %s\n", errstr); rc = syscall(SYSCALL_NR, 3, g2); - printf("%s(3, [%u, %u, %p]) = %s\n", SYSCALL_NAME, - (unsigned) g2[0], (unsigned) g2[1], g2 + 2, sprintrc(rc)); + errstr = sprintrc(rc); + printf("%s(3, [", SYSCALL_NAME); + printuid(g2[0]); + printf(", "); + printuid(g2[1]); + printf(", %p]) = %s\n", g2 + 2, errstr); g3[0] = 0; g3[1] = 1; rc = syscall(SYSCALL_NR, 3, g3); - printf("%s(3, [%u, %u%s]) = %s\n", SYSCALL_NAME, - (unsigned) g3[0], (unsigned) g3[1], rc ? ", ..." : "", - sprintrc(rc)); + errstr = sprintrc(rc); + printf("%s(3, [", SYSCALL_NAME); + printuid(g3[0]); + printf(", "); + printuid(g3[1]); + printf(", ...]) = %s\n", errstr); rc = syscall(SYSCALL_NR, 4, g3); - printf("%s(4, [%u, %u, ...]) = %s\n", SYSCALL_NAME, - (unsigned) g3[0], (unsigned) g3[1], sprintrc(rc)); + errstr = sprintrc(rc); + printf("%s(4, [", SYSCALL_NAME); + printuid(g3[0]); + printf(", "); + printuid(g3[1]); + printf(", ...]) = %s\n", errstr); rc = sysconf(_SC_NGROUPS_MAX); const unsigned ngroups_max = rc; if ((unsigned long) rc == ngroups_max && (int) ngroups_max > 0) { rc = syscall(SYSCALL_NR, ngroups_max, g3); - printf("%s(%u, [%u, %u, ...]) = %s\n", SYSCALL_NAME, - ngroups_max, (unsigned) g3[0], (unsigned) g3[1], - sprintrc(rc)); + errstr = sprintrc(rc); + printf("%s(%d, [", SYSCALL_NAME, ngroups_max); + printuid(g3[0]); + printf(", "); + printuid(g3[1]); + printf(", ...]) = %s\n", errstr); const unsigned long size = (unsigned long) 0xffffffff00000000ULL | ngroups_max; rc = syscall(SYSCALL_NR, size, g3); - printf("%s(%u, [%u, %u, ...]) = %s\n", SYSCALL_NAME, - ngroups_max, (unsigned) g3[0], (unsigned) g3[1], - sprintrc(rc)); + errstr = sprintrc(rc); + printf("%s(%d, [", SYSCALL_NAME, ngroups_max); + printuid(g3[0]); + printf(", "); + printuid(g3[1]); + printf(", ...]) = %s\n", errstr); rc = syscall(SYSCALL_NR, ngroups_max + 1, g3); - printf("%s(%u, %p) = %s\n", SYSCALL_NAME, + printf("%s(%d, %p) = %s\n", SYSCALL_NAME, ngroups_max + 1, g3, sprintrc(rc)); } diff --git a/tests/sethostname.c b/tests/sethostname.c index dfa9d1a68..e1b2f0696 100644 --- a/tests/sethostname.c +++ b/tests/sethostname.c @@ -1,3 +1,33 @@ +/* + * Check decoding of sethostname syscall. + * + * Copyright (c) 2016 Fei Jie + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #include "tests.h" #include @@ -6,12 +36,37 @@ # include # include +#ifdef HAVE_LINUX_UTSNAME_H +# include +#endif + +#ifndef __NEW_UTS_LEN +# define __NEW_UTS_LEN 64 +#endif + int main(void) { - long rc = syscall(__NR_sethostname, 0, 63); - printf("sethostname(NULL, 63) = %ld %s (%m)\n", - rc, errno2name()); + kernel_ulong_t len; + long rc; + + len = __NEW_UTS_LEN; + rc = syscall(__NR_sethostname, 0, len); + printf("sethostname(NULL, %u) = %s\n", + (unsigned) len, sprintrc(rc)); + + if (F8ILL_KULONG_MASK) { + len |= F8ILL_KULONG_MASK; + rc = syscall(__NR_sethostname, 0, len); + printf("sethostname(NULL, %u) = %s\n", + (unsigned) len, sprintrc(rc)); + } + + len = __NEW_UTS_LEN + 1; + void *const p = tail_alloc(len); + rc = syscall(__NR_sethostname, p, len); + printf("sethostname(%p, %u) = %s\n", + p, (unsigned) len, sprintrc(rc)); puts("+++ exited with 0 +++"); return 0; diff --git a/tests/setns.c b/tests/setns.c new file mode 100644 index 000000000..54a15317e --- /dev/null +++ b/tests/setns.c @@ -0,0 +1,73 @@ +/* + * Check decoding of setns syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_setns + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_fd = + (kernel_ulong_t) 0xfeedfacedeadc0deULL; + + static struct { + kernel_ulong_t val; + const char *str; + } nstypes[] = { + { (kernel_ulong_t) 0xdefaced100000000ULL, "0" }, + { (kernel_ulong_t) 0xbadc0dedfeedfaceULL, + "0xfeedface /* CLONE_NEW??? */" }, + { (kernel_ulong_t) 0xca75f15702000000ULL, "CLONE_NEWCGROUP" }, + }; + + long rc; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(nstypes); i++) { + rc = syscall(__NR_setns, bogus_fd, nstypes[i].val); + printf("setns(%d, %s) = %s\n", + (int) bogus_fd, nstypes[i].str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_setns"); + +#endif diff --git a/tests/setns.test b/tests/setns.test new file mode 100755 index 000000000..e9a905abd --- /dev/null +++ b/tests/setns.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of setns syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a21 diff --git a/tests/setrlimit.c b/tests/setrlimit.c index 95dd89858..e93c8e372 100644 --- a/tests/setrlimit.c +++ b/tests/setrlimit.c @@ -41,7 +41,7 @@ main(void) const struct xlat *xlat; for (xlat = resources; xlat->str; ++xlat) { - unsigned long res = 0xfacefeed00000000 | xlat->val; + unsigned long res = 0xfacefeed00000000ULL | xlat->val; long rc = syscall(__NR_setrlimit, res, 0); printf("setrlimit(%s, NULL) = %s\n", xlat->str, sprintrc(rc)); diff --git a/tests/setugid.c b/tests/setugid.c index dd6b921a5..aba277c59 100644 --- a/tests/setugid.c +++ b/tests/setugid.c @@ -31,13 +31,13 @@ #include #include -static int -ugid2int(const unsigned UGID_TYPE ugid) +void +printuid(unsigned UGID_TYPE id) { - if ((unsigned UGID_TYPE) -1U == ugid) - return -1; + if (id == (unsigned UGID_TYPE) -1U) + printf("-1"); else - return ugid; + printf("%u", id); } int @@ -58,22 +58,23 @@ main(void) unsigned int i; for (i = 0; i < ARRAY_SIZE(tests); ++i) { - const unsigned int num = ugid2int(tests[i]); + const unsigned int num = (unsigned UGID_TYPE) tests[i]; long expected; if (num == ugid) expected = 0; - else if (num == -1U) + else if ((UGID_TYPE) num == (UGID_TYPE) -1U) expected = -1; else continue; const long rc = syscall(SYSCALL_NR, tests[i]); - int saved_errno = errno; + const char *errstr = sprintrc(rc); + if (rc != expected) { if (!i && ENOSYS == errno) { - printf("%s(%u) = -1 ENOSYS (%m)\n", - SYSCALL_NAME, ugid); + printf("%s(%u) = %s\n", + SYSCALL_NAME, ugid, errstr); break; } perror_msg_and_fail("%s(%#lx) != %ld", @@ -81,15 +82,8 @@ main(void) } printf("%s(", SYSCALL_NAME); - if (num == -1U) - printf("-1"); - else - printf("%u", num); - errno = saved_errno; - if (expected) - printf(") = -1 %s (%m)\n", errno2name()); - else - printf(") = 0\n"); + printuid(num); + printf(") = %s\n", errstr); } puts("+++ exited with 0 +++"); diff --git a/tests/sigaction.awk b/tests/sigaction.awk index 5c6b6d09f..9c3a9ed33 100644 --- a/tests/sigaction.awk +++ b/tests/sigaction.awk @@ -1,6 +1,7 @@ #!/bin/gawk # # Copyright (c) 2014-2015 Dmitry V. Levin +# Copyright (c) 2016 Elvira Khabirova # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -26,23 +27,44 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. BEGIN { - n1[1] = "SIG_IGN, \\[HUP INT\\], SA_RESTORER\\|SA_RESTART, 0x[0-9a-f]+" - n2[1] = "SIG_IGN, \\[HUP INT\\], SA_RESTART" + n1[1][1] = n2[1][1] = "SIG_IGN" + n1[1][2] = n2[1][2] = "\\[HUP INT\\]" + n1[1][3] = "SA_RESTORER\\|SA_RESTART" + n2[1][3] = "SA_RESTART" + n1[1][4] = ", sa_restorer=0x[0-9a-f]+" + n2[1][4] = "" - n1[2] = "0x[0-9a-f]+, \\[QUIT TERM\\], SA_RESTORER\\|SA_SIGINFO, 0x[0-9a-f]+" - n2[2] = "0x[0-9a-f]+, \\[QUIT TERM\\], SA_SIGINFO" + n1[2][1] = n2[2][1] = "0x[0-9a-f]+" + n1[2][2] = n2[2][2] = "\\[QUIT TERM\\]" + n1[2][3] = "SA_RESTORER\\|SA_SIGINFO" + n2[2][3] = "SA_SIGINFO" + n1[2][4] = ", sa_restorer=0x[0-9a-f]+" + n2[2][4] = "" - n1[3] = "SIG_DFL, \\[\\], SA_RESTORER, 0x[0-9a-f]+" - n2[3] = "SIG_DFL, \\[\\], 0" + n1[3][1] = n2[3][1] = "SIG_DFL" + n1[3][2] = n2[3][2] = "\\[\\]" + n1[3][3] = "SA_RESTORER" + n2[3][3] = "0" + n1[3][4] = ", sa_restorer=0x[0-9a-f]+" + n2[3][4] = "" - n1[4] = "SIG_DFL, ~\\[HUP( ((RT|SIGRT)[^] ]+|[3-9][0-9]|1[0-9][0-9]))*\\], SA_RESTORER, 0x[0-9a-f]+" - n2[4] = "SIG_DFL, ~\\[HUP( ((RT|SIGRT)[^] ]+|[3-9][0-9]|1[0-9][0-9]))*\\], 0" + n1[4][1] = n2[4][1] = "SIG_DFL" + n1[4][2] = n2[4][2] = "~\\[HUP( ((RT|SIGRT)[^] ]+|[3-9][0-9]|1[0-9][0-9]))*\\]" + n1[4][3] = "SA_RESTORER" + n2[4][3] = "0" + n1[4][4] = ", sa_restorer=0x[0-9a-f]+" + n2[4][4] = "" - o1[1] = o2[1] = "SIG_DFL, \\[\\], 0" + o1[1][1] = o2[1][1] = "SIG_DFL" + o1[1][2] = o2[1][2] = "\\[\\]" + o1[1][3] = o2[1][3] = "0" + o1[1][4] = o2[1][4] = "" for (i = 2; i < 5; i++) { - o1[i] = n1[i - 1] - o2[i] = n2[i - 1] + for (j = 1; j < 5; j++) { + o1[i][j] = n1[i - 1][j] + o2[i][j] = n2[i - 1][j] + } } a1 = "(0x[0-9a-f]+, )?(4|8|16)" @@ -51,9 +73,18 @@ BEGIN { for (i = 1; i < 5; i++) { r[i] = "^rt_sigaction\\(SIGUSR2, (" \ - "\\{" n1[i] "\\}, \\{" o1[i] "\\}, " a1 "|" \ - "\\{" n2[i] "\\}, \\{" o2[i] "\\}, " a2 "|" \ - "\\{" n2[i] "\\}, \\{" o2[i] "\\}, " a3 ")\\) = 0$" + "\\{sa_handler=" n1[i][1] ", sa_mask=" n1[i][2] \ + ", sa_flags=" n1[i][3] n1[i][4] "\\}, \\{sa_handler=" \ + o1[i][1] ", sa_mask=" o1[i][2] ", sa_flags=" o1[i][3] \ + o1[i][4] "\\}, " a1 "|" \ + "\\{sa_handler=" n2[i][1] ", sa_mask=" n2[i][2] \ + ", sa_flags=" n2[i][3] n2[i][4] "\\}, \\{sa_handler=" \ + o2[i][1] ", sa_mask=" o2[i][2] ", sa_flags=" o2[i][3] \ + o2[i][4] "\\}, " a2 "|" \ + "\\{sa_handler=" n2[i][1] ", sa_mask=" n2[i][2] \ + ", sa_flags=" n2[i][3] n2[i][4] "\\}, \\{sa_handler=" \ + o2[i][1] ", sa_mask=" o2[i][2] ", sa_flags=" o2[i][3] \ + o2[i][4] "\\}, " a3 ")\\) = 0$" } s[5] = "+++ exited with 0 +++" diff --git a/tests/socketcall.c b/tests/socketcall.c index d2ec959a7..4fe1ea3ac 100644 --- a/tests/socketcall.c +++ b/tests/socketcall.c @@ -55,7 +55,7 @@ static void test_socketcall(const int i, const void *const addr) { const unsigned long call = - (unsigned long) 0xfacefeed00000000 | (unsigned int) i; + (unsigned long) 0xfacefeed00000000ULL | (unsigned int) i; long rc = syscall(__NR_socketcall, call, addr); diff --git a/tests/splice.c b/tests/splice.c index 5a899109c..b6f252560 100644 --- a/tests/splice.c +++ b/tests/splice.c @@ -38,12 +38,12 @@ int main(void) { - const long int fd_in = (long int) 0xdeadbeefffffffff; - const long int fd_out = (long int) 0xdeadbeeffffffffe; + const long int fd_in = (long int) 0xdeadbeefffffffffULL; + const long int fd_out = (long int) 0xdeadbeeffffffffeULL; long long int *const off_in = tail_alloc(sizeof(*off_in)); long long int *const off_out = tail_alloc(sizeof(*off_out)); - *off_in = 0xdeadbef1facefed1; - *off_out = 0xdeadbef2facefed2; + *off_in = 0xdeadbef1facefed1ULL; + *off_out = 0xdeadbef2facefed2ULL; const size_t len = (size_t) 0xdeadbef3facefed3ULL; const unsigned int flags = 15; diff --git a/tests/sprintrc.c b/tests/sprintrc.c index a573a27ff..7423afb69 100644 --- a/tests/sprintrc.c +++ b/tests/sprintrc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Eugene Syromiatnikov + * Copyright (c) 2016 Eugene Syromyatnikov * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/tests/stat.c b/tests/stat.c index df6cab16b..d4ca7b0b9 100644 --- a/tests/stat.c +++ b/tests/stat.c @@ -32,7 +32,7 @@ # define TEST_SYSCALL_NR __NR_stat # define TEST_SYSCALL_STR "stat" -# define SAMPLE_SIZE ((kernel_ulong_t) 43147718418) +# define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 43147718418ULL) # include "lstatx.c" #else diff --git a/tests/stat64.c b/tests/stat64.c index 4c2101bb6..782de33d6 100644 --- a/tests/stat64.c +++ b/tests/stat64.c @@ -35,7 +35,6 @@ # define STRUCT_STAT struct stat64 # define STRUCT_STAT_STR "struct stat64" # define STRUCT_STAT_IS_STAT64 1 -# define SAMPLE_SIZE ((libc_off_t) 43147718418) # include "lstatx.c" #else diff --git a/tests/statfs.expected b/tests/statfs.expected index 0fa45109d..11e9f0b15 100644 --- a/tests/statfs.expected +++ b/tests/statfs.expected @@ -1 +1 @@ -statfs(64)?\("/proc/self/status"(, [1-9][0-9]*)?, \{f_type=PROC_SUPER_MAGIC, f_bsize=[1-9][0-9]*, f_blocks=[0-9]+, f_bfree=[0-9]+, f_bavail=[0-9]+, f_files=[0-9]+, f_ffree=[0-9]+, f_fsid=\{[0-9]+, [0-9]+\}, f_namelen=[1-9][0-9]*(, f_frsize=[0-9]+)?(, f_flags=ST_VALID(\|ST_[A-Z]+)*)?\}\) += 0 +statfs(64)?\("/proc/self/status"(, [1-9][0-9]*)?, \{f_type=PROC_SUPER_MAGIC, f_bsize=[1-9][0-9]*, f_blocks=[0-9]+, f_bfree=[0-9]+, f_bavail=[0-9]+, f_files=[0-9]+, f_ffree=[0-9]+, f_fsid=\{val=\[[0-9]+, [0-9]+\]\}, f_namelen=[1-9][0-9]*(, f_frsize=[0-9]+)?(, f_flags=ST_VALID(\|ST_[A-Z]+)*)?\}\) += 0 diff --git a/tests/statx.sh b/tests/statx.sh index 830e5fc71..a630193d7 100755 --- a/tests/statx.sh +++ b/tests/statx.sh @@ -3,4 +3,4 @@ # Check decoding of stat family syscalls. . "${srcdir=.}/init.sh" -run_strace_match_diff -v -P $NAME.sample +run_strace_match_diff -v -P $NAME.sample -P /dev/full -a32 diff --git a/tests/strace-C.expected b/tests/strace-C.expected new file mode 100644 index 000000000..832af1f38 --- /dev/null +++ b/tests/strace-C.expected @@ -0,0 +1,3 @@ +nanosleep\(\{tv_sec=1, tv_nsec=0\}, NULL\) = 0 +\+\+\+ exited with 0 \+\+\+ +[ ]*[0-9][0-9]*[.][0-9][0-9]* *0[.]0[0-9]* *[0-9][0-9]* *1 *nanosleep diff --git a/tests/strace-C.test b/tests/strace-C.test new file mode 100755 index 000000000..ccca9a091 --- /dev/null +++ b/tests/strace-C.test @@ -0,0 +1,9 @@ +#!/bin/sh + +# Check -C option. + +. "${srcdir=.}/init.sh" + +run_prog ./sleep 0 +run_strace -a24 -C -enanosleep ./sleep 1 +match_grep diff --git a/tests/strace-T.expected b/tests/strace-T.expected index 809b7ea1f..1ea020465 100644 --- a/tests/strace-T.expected +++ b/tests/strace-T.expected @@ -1 +1 @@ -nanosleep\(\{1, 0\}, NULL\) = 0 <(1\.[01]|0\.9)[[:digit:]]{5}> +nanosleep\(\{tv_sec=1, tv_nsec=0\}, NULL\) = 0 <(1\.[01]|0\.9)[[:digit:]]{5}> diff --git a/tests/strace-V.test b/tests/strace-V.test index d441371e5..9a051e00e 100755 --- a/tests/strace-V.test +++ b/tests/strace-V.test @@ -1,9 +1,11 @@ #!/bin/sh # Check -V option. - . "${srcdir=.}/init.sh" +run_prog_skip_if_failed date +%Y > /dev/null +year="$(date +%Y)" + run_strace -V > "$LOG" getval() @@ -11,7 +13,12 @@ getval() sed -r -n 's/#define[[:space:]]*'"$1"'[[:space:]]*"([^"]*)".*/\1/p' ../config.h } -printf "%s -- version %s\n" "$(getval PACKAGE_NAME)" "$(getval VERSION)" > "$EXP" +cat > "$EXP" << __EOF__ +$(getval PACKAGE_NAME) -- version $(getval PACKAGE_VERSION) +Copyright (C) 1991-$year The strace developers <$(getval PACKAGE_URL)>. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +__EOF__ match_diff "$EXP" "$LOG" rm -f "$EXP" diff --git a/tests/strace-tt.test b/tests/strace-tt.test index 237646d93..3f80001eb 100755 --- a/tests/strace-tt.test +++ b/tests/strace-tt.test @@ -4,17 +4,25 @@ . "${srcdir=.}/init.sh" -run_prog_skip_if_failed date +%T > /dev/null +run_prog_skip_if_failed date +%s > "$LOG" +run_prog_skip_if_failed date +%T --date "@$(cat "$LOG")" > /dev/null run_prog ./sleep 0 -t0="$(date +%T)" +s0="$(date +%s)" run_strace -tt -eexecve $args -t1="$(date +%T)" +s1="$(date +%s)" -EXPECTED="$LOG.expected" -cat > "$EXPECTED" << __EOF__ -($t0|$t1)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +s="$s0" +t_reg= +while [ "$s" -le "$s1" ]; do + t="$(date +%T --date "@$s")" + [ -z "$t_reg" ] && t_reg="$t" || t_reg="$t_reg|$t" + s=$(($s + 1)) +done + +cat > "$EXP" << __EOF__ +($t_reg)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 __EOF__ -match_grep "$LOG" "$EXPECTED" -rm -f "$EXPECTED" +match_grep "$LOG" "$EXP" +rm -f "$EXP" diff --git a/tests/strace-ttt.test b/tests/strace-ttt.test index 8b0032a2d..4439715b5 100755 --- a/tests/strace-ttt.test +++ b/tests/strace-ttt.test @@ -7,14 +7,20 @@ run_prog_skip_if_failed date +%s > /dev/null run_prog ./sleep 0 -t0="$(date +%s)" +s0="$(date +%s)" run_strace -ttt -eexecve $args -t1="$(date +%s)" +s1="$(date +%s)" -EXPECTED="$LOG.expected" -cat > "$EXPECTED" << __EOF__ -($t0|$t1)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 +s="$s0" +t_reg= +while [ "$s" -le "$s1" ]; do + [ -z "$t_reg" ] && t_reg="$s" || t_reg="$t_reg|$s" + s=$(($s + 1)) +done + +cat > "$EXP" << __EOF__ +($t_reg)\\.[[:digit:]]{6} execve\\("\\./sleep", \\["\\./sleep", "0"\\], \\[/\\* [[:digit:]]+ vars \\*/\\]\\) = 0 __EOF__ -match_grep "$LOG" "$EXPECTED" -rm -f "$EXPECTED" +match_grep "$LOG" "$EXP" +rm -f "$EXP" diff --git a/tests/strace.supp b/tests/strace.supp new file mode 100644 index 000000000..578b0a259 --- /dev/null +++ b/tests/strace.supp @@ -0,0 +1,7 @@ +{ + get_cpuset_size: sched_getaffinity with NULL mask + Memcheck:Param + sched_getaffinity(mask) + fun:sched_getaffinity* + fun:get_cpuset_size +} diff --git a/tests/struct_flock.c b/tests/struct_flock.c index aae71a034..34cf58e6b 100644 --- a/tests/struct_flock.c +++ b/tests/struct_flock.c @@ -45,7 +45,7 @@ static long invoke_test_syscall(const unsigned int cmd, void *const p) { - const unsigned long op = (unsigned long) 0xffffffff00000000 | cmd; + const unsigned long op = (unsigned long) 0xffffffff00000000ULL | cmd; return syscall(TEST_SYSCALL_NR, 0, op, (unsigned long) p); } @@ -55,8 +55,8 @@ test_flock_einval(const int cmd, const char *name) { struct_kernel_flock fl = { .l_type = F_RDLCK, - .l_start = (TYPEOF_FLOCK_OFF_T) 0xdefaced1facefeed, - .l_len = (TYPEOF_FLOCK_OFF_T) 0xdefaced2cafef00d + .l_start = (TYPEOF_FLOCK_OFF_T) 0xdefaced1facefeedULL, + .l_len = (TYPEOF_FLOCK_OFF_T) 0xdefaced2cafef00dULL }; invoke_test_syscall(cmd, &fl); printf("%s(0, %s, {l_type=F_RDLCK, l_whence=SEEK_SET" diff --git a/tests/swap.c b/tests/swap.c index ed8cec89c..77b25050a 100644 --- a/tests/swap.c +++ b/tests/swap.c @@ -23,7 +23,7 @@ main(void) rc = syscall(__NR_swapon, sample, SWAP_FLAG_PREFER); printf("swapon(\"%s\", %s) = %ld %s (%m)\n", - sample, "SWAP_FLAG_PREFER", rc, errno2name()); + sample, "SWAP_FLAG_PREFER|0", rc, errno2name()); rc = syscall(__NR_swapon, sample, SWAP_FLAG_PREFER | 42); printf("swapon(\"%s\", %s) = %ld %s (%m)\n", diff --git a/tests/symlinkat.c b/tests/symlinkat.c index d0116d07b..6e5d617db 100644 --- a/tests/symlinkat.c +++ b/tests/symlinkat.c @@ -9,7 +9,7 @@ int main(void) { - const long int fd = (long int) 0xdeadbeefffffffff; + const long int fd = (long int) 0xdeadbeefffffffffULL; static const char oldpath[] = "symlink_old"; static const char newpath[] = "symlink_new"; diff --git a/tests/sync_file_range.c b/tests/sync_file_range.c index aadef68cd..67d31a89b 100644 --- a/tests/sync_file_range.c +++ b/tests/sync_file_range.c @@ -39,8 +39,8 @@ int main(void) { const int fd = -1; - const off64_t offset = 0xdeadbeefbadc0ded; - const off64_t nbytes = 0xfacefeedcafef00d; + const off64_t offset = 0xdeadbeefbadc0dedULL; + const off64_t nbytes = 0xfacefeedcafef00dULL; const unsigned int flags = -1; int rc = sync_file_range(fd, offset, nbytes, flags); diff --git a/tests/syslog.c b/tests/syslog.c index d4d4a7bb7..5df96cb8c 100644 --- a/tests/syslog.c +++ b/tests/syslog.c @@ -11,7 +11,7 @@ int main(void) { - const long addr = (long) 0xfacefeeddeadbeef; + const long addr = (long) 0xfacefeeddeadbeefULL; int rc = syscall(__NR_syslog, SYSLOG_ACTION_READ, addr, -1); printf("syslog(SYSLOG_ACTION_READ, %#lx, -1) = %d %s (%m)\n", addr, rc, errno2name()); diff --git a/tests/tee.c b/tests/tee.c index eb562c7ce..66d1c94f9 100644 --- a/tests/tee.c +++ b/tests/tee.c @@ -38,8 +38,8 @@ int main(void) { - const long int fd_in = (long int) 0xdeadbeefffffffff; - const long int fd_out = (long int) 0xdeadbeeffffffffe; + const long int fd_in = (long int) 0xdeadbeefffffffffULL; + const long int fd_out = (long int) 0xdeadbeeffffffffeULL; const size_t len = (size_t) 0xdeadbef3facefed3ULL; const unsigned int flags = 15; diff --git a/tests/tests.h b/tests/tests.h index f3ddc85ed..d4294de9a 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -33,6 +33,7 @@ # endif # include +# include "kernel_types.h" # include "gcc_compat.h" /* Tests of "strace -v" are expected to define VERBOSE to 1. */ @@ -67,6 +68,16 @@ void *tail_alloc(const size_t) void *tail_memdup(const void *, const size_t) ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((2)); +/* + * Fill memory (pointed by ptr, having size bytes) with different bytes (with + * values starting with start and resetting every period) in order to catch + * sign, byte order and/or alignment errors. + */ +void fill_memory_ex(void *ptr, size_t size, unsigned char start, + unsigned char period); +/* Shortcut for fill_memory_ex(ptr, size, 0x80, 0x80) */ +void fill_memory(void *ptr, size_t size); + /* Close stdin, move stdout to a non-standard descriptor, and print. */ void tprintf(const char *, ...) ATTRIBUTE_FORMAT((printf, 1, 2)); @@ -127,6 +138,25 @@ struct timespec; int recv_mmsg(int, struct mmsghdr *, unsigned int, unsigned int, struct timespec *); int send_mmsg(int, struct mmsghdr *, unsigned int, unsigned int); +/* Create a pipe with maximized descriptor numbers. */ +void pipe_maxfd(int pipefd[2]); + +#define F8ILL_KULONG_SUPPORTED (sizeof(void *) < sizeof(kernel_ulong_t)) +#define F8ILL_KULONG_MASK ((kernel_ulong_t) 0xffffffff00000000ULL) + +/* + * For 64-bit kernel_ulong_t and 32-bit pointer, + * return a kernel_ulong_t value by filling higher bits. + * For other architertures, return the original pointer. + */ +static inline kernel_ulong_t +f8ill_ptr_to_kulong(const void *const ptr) +{ + const unsigned long uptr = (unsigned long) ptr; + return F8ILL_KULONG_SUPPORTED + ? F8ILL_KULONG_MASK | uptr : (kernel_ulong_t) uptr; +} + # define ARRAY_SIZE(arg) ((unsigned int) (sizeof(arg) / sizeof((arg)[0]))) # define LENGTH_OF(arg) ((unsigned int) sizeof(arg) - 1) @@ -169,4 +199,15 @@ int send_mmsg(int, struct mmsghdr *, unsigned int, unsigned int); # define PRI__u64 PRI__64"u" # define PRI__x64 PRI__64"x" +# if WORDS_BIGENDIAN +# define LL_PAIR(HI, LO) (HI), (LO) +# else +# define LL_PAIR(HI, LO) (LO), (HI) +# endif +# define LL_VAL_TO_PAIR(llval) LL_PAIR((long) ((llval) >> 32), (long) (llval)) + +# define _STR(_arg) #_arg +# define ARG_STR(_arg) (_arg), #_arg +# define ARG_ULL_STR(_arg) _arg##ULL, #_arg + #endif /* !STRACE_TESTS_H */ diff --git a/tests/threads-execve.c b/tests/threads-execve.c new file mode 100644 index 000000000..853645ffa --- /dev/null +++ b/tests/threads-execve.c @@ -0,0 +1,246 @@ +/* + * Check decoding of threads when a non-leader thread invokes execve. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +static pid_t leader; +static pid_t tid; + +static void +handler(int signo) +{ +} + +static unsigned int sigsetsize; +static long +k_sigsuspend(const sigset_t *const set) +{ + return syscall(__NR_rt_sigsuspend, set, sigsetsize); +} + +static pid_t +k_gettid(void) +{ + return syscall(__NR_gettid); +} + +static void +get_sigsetsize(void) +{ + static const struct sigaction sa = { .sa_handler = handler }; + if (sigaction(SIGUSR1, &sa, NULL)) + perror_msg_and_fail("sigaction"); + + sigset_t mask; + sigemptyset(&mask); + sigaddset(&mask, SIGUSR1); + if (sigprocmask(SIG_BLOCK, &mask, NULL)) + perror_msg_and_fail("sigprocmask"); + + raise(SIGUSR1); + + sigemptyset(&mask); + for (sigsetsize = sizeof(mask) / sizeof(long); + sigsetsize; sigsetsize >>= 1) { + long rc = k_sigsuspend(&mask); + if (!rc) + error_msg_and_fail("rt_sigsuspend"); + if (EINTR == errno) + break; + printf("%-5d rt_sigsuspend(%p, %u) = %s\n", + leader, &mask, sigsetsize, sprintrc(rc)); + } + if (!sigsetsize) + perror_msg_and_fail("rt_sigsuspend"); + printf("%-5d rt_sigsuspend([], %u) = ? ERESTARTNOHAND" + " (To be restarted if no handler)\n", leader, sigsetsize); +} + +enum { + ACTION_exit = 0, + ACTION_rt_sigsuspend, + ACTION_nanosleep, + NUMBER_OF_ACTIONS +}; + +static const unsigned int NUMBER_OF_ITERATIONS = 1; +static unsigned int action; +static int fds[2]; + +static unsigned int +arglen(char **args) +{ + char **p; + + for (p = args; *p; ++p) + ; + + return p - args; +} + +static void * +thread(void *arg) +{ + tid = k_gettid(); + + static char buf[sizeof(action) * 3]; + sprintf(buf, "%u", action + 1); + + char **argv = arg; + argv[2] = buf; + + if (read(fds[0], fds, sizeof(fds[0]))) + perror_msg_and_fail("execve"); + + struct timespec ts = { .tv_nsec = 100000000 }; + (void) clock_nanosleep(CLOCK_REALTIME, 0, &ts, NULL); + + ts.tv_nsec = 12345; + printf("%-5d nanosleep({tv_sec=0, tv_nsec=%u}, NULL) = 0\n", + tid, (unsigned int) ts.tv_nsec); + + switch (action % NUMBER_OF_ACTIONS) { + case ACTION_exit: + printf("%-5d execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" + ", [/* %u vars */] \n", + tid, argv[0], argv[0], argv[1], argv[2], + arglen(environ), leader); + break; + case ACTION_rt_sigsuspend: + printf("%-5d execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" + ", [/* %u vars */] \n" + "%-5d <... rt_sigsuspend resumed>) = ?\n", + tid, argv[0], argv[0], argv[1], argv[2], + arglen(environ), + leader); + break; + case ACTION_nanosleep: + printf("%-5d execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" + ", [/* %u vars */] \n" + "%-5d <... nanosleep resumed> )" + " = ?\n", + tid, argv[0], argv[0], argv[1], argv[2], + arglen(environ), + leader); + break; + } + + printf("%-5d +++ superseded by execve in pid %u +++\n" + "%-5d <... execve resumed> ) = 0\n", + leader, tid, + leader); + + (void) nanosleep(&ts, NULL); + execve(argv[0], argv, environ); + perror_msg_and_fail("execve"); +} + +int +main(int ac, char **av) +{ + setvbuf(stdout, NULL, _IONBF, 0); + leader = getpid(); + + if (ac < 3) { + struct timespec ts = { .tv_nsec = 1 }; + if (clock_nanosleep(CLOCK_REALTIME, 0, &ts, NULL)) + perror_msg_and_skip("clock_nanosleep CLOCK_REALTIME"); + + printf("%-5d execve(\"%s\", [\"%s\"], [/* %u vars */]) = 0\n", + leader, av[0], av[0], arglen(environ)); + + get_sigsetsize(); + static char buf[sizeof(sigsetsize) * 3]; + sprintf(buf, "%u", sigsetsize); + + char *argv[] = { av[0], buf, (char *) "0", NULL }; + printf("%-5d execve(\"%s\", [\"%s\", \"%s\", \"%s\"]" + ", [/* %u vars */]) = 0\n", + leader, argv[0], argv[0], argv[1], argv[2], + arglen(environ)); + execve(argv[0], argv, environ); + perror_msg_and_fail("execve"); + } + + sigsetsize = atoi(av[1]); + action = atoi(av[2]); + + if (action >= NUMBER_OF_ACTIONS * NUMBER_OF_ITERATIONS) { + printf("%-5d +++ exited with 0 +++\n", leader); + return 0; + } + + if (pipe(fds)) + perror_msg_and_fail("pipe"); + + pthread_t t; + errno = pthread_create(&t, NULL, thread, av); + if (errno) + perror_msg_and_fail("pthread_create"); + + struct timespec ts = { .tv_sec = 123 }; + sigset_t mask; + sigemptyset(&mask); + + static char leader_str[sizeof(leader) * 3]; + int leader_str_len = + snprintf(leader_str, sizeof(leader_str), "%-5d", leader); + + switch (action % NUMBER_OF_ACTIONS) { + case ACTION_exit: + printf("%s exit(42)%*s= ?\n", leader_str, + (int) sizeof(leader_str) - leader_str_len, " "); + close(fds[1]); + (void) syscall(__NR_exit, 42); + break; + case ACTION_rt_sigsuspend: + printf("%s rt_sigsuspend([], %u \n", + leader_str, sigsetsize); + close(fds[1]); + (void) k_sigsuspend(&mask); + break; + case ACTION_nanosleep: + printf("%s nanosleep({tv_sec=%u, tv_nsec=0}" + ", \n", + leader_str, (unsigned int) ts.tv_sec); + close(fds[1]); + (void) nanosleep(&ts, 0); + break; + } + + return 1; +} diff --git a/tests/threads-execve.test b/tests/threads-execve.test new file mode 100755 index 000000000..4a771467a --- /dev/null +++ b/tests/threads-execve.test @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Check decoding of threads when a non-leader thread invokes execve. +# +# Copyright (c) 2016 Dmitry V. Levin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. "${srcdir=.}/init.sh" + +# Check that PTRACE_EVENT_EXEC support in kernel is good enough. +# The kernel before commit v3.1-rc1~308^2~7 reported 0 instead of old pid. +require_min_kernel_version_or_skip 3.1 + +check_prog diff +run_prog > /dev/null + +set -- -a21 -f -esignal=none -e trace=execve,exit,nanosleep,rt_sigsuspend $args + +# Due to probabilistic nature of the test, try it several times. +i=0 +while [ $i -le 9 ]; do + run_strace "$@" > "$EXP" + diff -- "$EXP" "$LOG" || continue + rm -f "$EXP" + exit 0 +done + +fail_ "$STRACE $* output mismatch" diff --git a/tests/timer_create.c b/tests/timer_create.c index 6f98f3680..1a2596271 100644 --- a/tests/timer_create.c +++ b/tests/timer_create.c @@ -49,13 +49,13 @@ main(void) struct_sigevent sev = { .sigev_notify = 0xdefaced, .sigev_signo = 0xfacefeed, - .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0ded + .sigev_value.sival_ptr = (unsigned long) 0xdeadbeefbadc0dedULL }; syscall(__NR_timer_create, CLOCK_REALTIME, &sev, NULL); - printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" - ", sigev_signo=%u, sigev_notify=%#x /* SIGEV_??? */}" - ", NULL) = -1 %s (%m)\n", + printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=%u, " + "sigev_notify=%#x /* SIGEV_??? */}, NULL) = -1 %s (%m)\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, sev.sigev_signo, sev.sigev_notify, @@ -64,8 +64,9 @@ main(void) sev.sigev_notify = SIGEV_NONE; if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[0])) perror_msg_and_skip("timer_create CLOCK_REALTIME"); - printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" - ", sigev_signo=%u, sigev_notify=SIGEV_NONE}, [%d]) = 0\n", + printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=%u, sigev_notify=SIGEV_NONE}, " + "[%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, sev.sigev_signo, tid[0]); @@ -74,19 +75,21 @@ main(void) sev.sigev_signo = SIGALRM; if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[1])) perror_msg_and_skip("timer_create CLOCK_MONOTONIC"); - printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%#lx}" - ", sigev_signo=SIGALRM, sigev_notify=SIGEV_SIGNAL}" - ", [%d]) = 0\n", + printf("timer_create(CLOCK_MONOTONIC, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=SIGALRM, " + "sigev_notify=SIGEV_SIGNAL}, [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, tid[1]); sev.sigev_notify = SIGEV_THREAD; - sev.sigev_un.sigev_thread.function = (unsigned long) 0xdeadbeefbadc0ded; - sev.sigev_un.sigev_thread.attribute = (unsigned long) 0xcafef00dfacefeed; + sev.sigev_un.sigev_thread.function = + (unsigned long) 0xdeadbeefbadc0dedULL; + sev.sigev_un.sigev_thread.attribute = + (unsigned long) 0xcafef00dfacefeedULL; if (syscall(__NR_timer_create, CLOCK_REALTIME, &sev, &tid[2])) perror_msg_and_skip("timer_create CLOCK_REALTIME"); - printf("timer_create(CLOCK_REALTIME, {sigev_value={int=%d, ptr=%#lx}" - ", sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD" + printf("timer_create(CLOCK_REALTIME, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD" ", sigev_notify_function=%#lx, sigev_notify_attributes=%#lx}" ", [%d]) = 0\n", sev.sigev_value.sival_int, @@ -102,9 +105,9 @@ main(void) sev.sigev_un.tid = getpid(); if (syscall(__NR_timer_create, CLOCK_MONOTONIC, &sev, &tid[3])) perror_msg_and_skip("timer_create CLOCK_MONOTONIC"); - printf("timer_create(CLOCK_MONOTONIC, {sigev_value={int=%d, ptr=%#lx}" - ", sigev_signo=SIGALRM, sigev_notify=SIGEV_THREAD_ID" - ", sigev_notify_thread_id=%d}" + printf("timer_create(CLOCK_MONOTONIC, {sigev_value={sival_int=%d, " + "sival_ptr=%#lx}, sigev_signo=SIGALRM, " + "sigev_notify=SIGEV_THREAD_ID, sigev_notify_thread_id=%d}" ", [%d]) = 0\n", sev.sigev_value.sival_int, sev.sigev_value.sival_ptr, diff --git a/tests/timer_xettime.c b/tests/timer_xettime.c index 877f71738..9eabbf084 100644 --- a/tests/timer_xettime.c +++ b/tests/timer_xettime.c @@ -75,8 +75,10 @@ main(void) if (syscall(__NR_timer_settime, tid, 0, &new.its, &old.its)) perror_msg_and_skip("timer_settime"); printf("timer_settime(%d, 0" - ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" - ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}" ") = 0\n", tid, (intmax_t) new.its.it_interval.tv_sec, @@ -91,8 +93,8 @@ main(void) if (syscall(__NR_timer_gettime, tid, &old.its)) perror_msg_and_skip("timer_gettime"); printf("timer_gettime(%d" - ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" - ") = 0\n", + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}) = 0\n", tid, (intmax_t) old.its.it_interval.tv_sec, (intmax_t) old.its.it_interval.tv_nsec, diff --git a/tests/timerfd_xettime.c b/tests/timerfd_xettime.c index 2742ec2b3..ca7124ec3 100644 --- a/tests/timerfd_xettime.c +++ b/tests/timerfd_xettime.c @@ -67,8 +67,10 @@ main(void) if (syscall(__NR_timerfd_settime, 0, 0, &new.its, &old.its)) perror_msg_and_skip("timerfd_settime"); printf("timerfd_settime(0, 0" - ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" - ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}" + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}" ") = 0\n", (intmax_t) new.its.it_interval.tv_sec, (intmax_t) new.its.it_interval.tv_nsec, @@ -82,8 +84,8 @@ main(void) if (syscall(__NR_timerfd_gettime, 0, &old.its)) perror_msg_and_skip("timerfd_gettime"); printf("timerfd_gettime(0" - ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" - ") = 0\n", + ", {it_interval={tv_sec=%jd, tv_nsec=%jd}" + ", it_value={tv_sec=%jd, tv_nsec=%jd}}) = 0\n", (intmax_t) old.its.it_interval.tv_sec, (intmax_t) old.its.it_interval.tv_nsec, (intmax_t) old.its.it_value.tv_sec, diff --git a/tests/times.c b/tests/times.c index 18b209b22..2c7b95e58 100644 --- a/tests/times.c +++ b/tests/times.c @@ -53,7 +53,7 @@ main (void) { struct timespec ts; volatile int dummy = 0; - int i; + int i = 0; pid_t pid = fork(); if (pid < 0) @@ -67,6 +67,9 @@ main (void) if (ts.tv_sec || ts.tv_nsec >= cputime_limit) break; + if (i && !(ts.tv_sec || ts.tv_nsec)) + error_msg_and_skip("clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {0, 0})"); + for (i = 0; i < NUM_USER_ITERS; ++i) ++dummy; } diff --git a/tests/truncate.c b/tests/truncate.c index 3f16aefd1..d9529334e 100644 --- a/tests/truncate.c +++ b/tests/truncate.c @@ -32,7 +32,6 @@ # include # include -# include "kernel_types.h" int main(void) diff --git a/tests/truncate64.c b/tests/truncate64.c index c4a524d53..8c29ea81b 100644 --- a/tests/truncate64.c +++ b/tests/truncate64.c @@ -38,7 +38,7 @@ main(void) { static const char fname[] = "truncate64\nfilename"; static const char qname[] = "truncate64\\nfilename"; - const off_t len = 0xdefaceddeadbeef; + const off_t len = 0xdefaceddeadbeefULL; int rc = truncate(fname, len); printf("truncate64(\"%s\", %llu) = %d %s (%m)\n", diff --git a/tests/umode_t.c b/tests/umode_t.c index 7ab27dc00..5041638ee 100644 --- a/tests/umode_t.c +++ b/tests/umode_t.c @@ -43,7 +43,7 @@ static const char sample[] = TEST_SYSCALL_STR; static void test_syscall(unsigned short mode) { - unsigned long lmode = (unsigned long) 0xffffffffffff0000 | mode; + unsigned long lmode = (unsigned long) 0xffffffffffff0000ULL | mode; long rc = syscall(TEST_SYSCALL_NR, TEST_SYSCALL_PREFIX_ARGS sample, lmode); diff --git a/tests/umoven-illptr.c b/tests/umoven-illptr.c new file mode 100644 index 000000000..4deee1634 --- /dev/null +++ b/tests/umoven-illptr.c @@ -0,0 +1,57 @@ +/* + * Check decoding of invalid pointer by umoven. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include +#include + +int +main(void) +{ + if (F8ILL_KULONG_SUPPORTED) { + struct timespec ts = { 0, 0 }; + const void *const p = tail_memdup(&ts, sizeof(ts)); + + long rc = syscall(__NR_nanosleep, p, NULL); + printf("nanosleep({tv_sec=0, tv_nsec=0}, NULL) = %s\n", + sprintrc(rc)); + + const kernel_ulong_t ill = f8ill_ptr_to_kulong(p); + rc = syscall(__NR_nanosleep, ill, NULL); + printf("nanosleep(%#llx, NULL) = %s\n", + (unsigned long long) ill, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; + } else { + return 77; + } +} diff --git a/tests/umoven-illptr.test b/tests/umoven-illptr.test new file mode 100755 index 000000000..7b8cb314e --- /dev/null +++ b/tests/umoven-illptr.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of invalid pointer by umoven. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a36 -e trace=nanosleep diff --git a/tests/umovestr-illptr.c b/tests/umovestr-illptr.c new file mode 100644 index 000000000..dea6885d4 --- /dev/null +++ b/tests/umovestr-illptr.c @@ -0,0 +1,53 @@ +/* + * Check decoding of invalid pointer by umovestr. + * + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include +#include +#include + +int +main(void) +{ + if (F8ILL_KULONG_SUPPORTED) { + const void *const p = tail_memdup(".", 2); + long rc = syscall(__NR_chdir, p); + printf("chdir(\".\") = %s\n", sprintrc(rc)); + + const kernel_ulong_t ill = f8ill_ptr_to_kulong(p); + rc = syscall(__NR_chdir, ill); + printf("chdir(%#llx) = %s\n", + (unsigned long long) ill, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; + } else { + return 77; + } +} diff --git a/tests/umovestr-illptr.test b/tests/umovestr-illptr.test new file mode 100755 index 000000000..6f1cc8620 --- /dev/null +++ b/tests/umovestr-illptr.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of invalid pointer by umovestr. +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a11 -e trace=chdir diff --git a/tests/unlinkat.c b/tests/unlinkat.c index 0b69b0373..22c3de399 100644 --- a/tests/unlinkat.c +++ b/tests/unlinkat.c @@ -10,7 +10,7 @@ int main(void) { static const char sample[] = "unlinkat_sample"; - const long fd = (long) 0xdeadbeefffffffff; + const long fd = (long) 0xdeadbeefffffffffULL; long rc = syscall(__NR_unlinkat, fd, sample, 0); printf("unlinkat(%d, \"%s\", 0) = %ld %s (%m)\n", diff --git a/tests/unshare.c b/tests/unshare.c new file mode 100644 index 000000000..5aedde476 --- /dev/null +++ b/tests/unshare.c @@ -0,0 +1,80 @@ +/* + * Check decoding of unshare syscall. + * + * Copyright (c) 2016 Eugene Syromyatnikov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" + +#include + +#ifdef __NR_unshare + +# include +# include + +int +main(void) +{ + static const kernel_ulong_t bogus_flags = + (kernel_ulong_t) 0xbadc0ded0000000fULL; + + static struct { + kernel_ulong_t val; + const char *str; + } unshare_flags[] = { + { ARG_STR(0) }, + { 0xdeadca75, + "CLONE_THREAD|CLONE_FS|CLONE_SIGHAND|CLONE_SYSVSEM|" + "CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWNET|CLONE_NEWUSER|" + "CLONE_NEWCGROUP|0x80a8c075" }, + { 0x2000000, "CLONE_NEWCGROUP" }, + { ARG_STR(0x81f8f0ff) " /* CLONE_??? */" }, + }; + + long rc; + unsigned int i; + + rc = syscall(__NR_unshare, bogus_flags); + printf("unshare(%#llx /* CLONE_??? */) = %s\n", + (unsigned long long) bogus_flags, sprintrc(rc)); + + for (i = 0; i < ARRAY_SIZE(unshare_flags); i++) { + rc = syscall(__NR_unshare, unshare_flags[i].val); + printf("unshare(%s) = %s\n", + unshare_flags[i].str, sprintrc(rc)); + } + + puts("+++ exited with 0 +++"); + + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_unshare"); + +#endif diff --git a/tests/unshare.test b/tests/unshare.test new file mode 100755 index 000000000..ccb9575ef --- /dev/null +++ b/tests/unshare.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check decoding of setns syscall. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a11 diff --git a/tests/userfaultfd.c b/tests/userfaultfd.c index 254b84e95..60432fa38 100644 --- a/tests/userfaultfd.c +++ b/tests/userfaultfd.c @@ -28,6 +28,7 @@ #include "tests.h" #include #include +#include "scno.h" #if defined __NR_userfaultfd && defined O_CLOEXEC diff --git a/tests/ustat.c b/tests/ustat.c new file mode 100644 index 000000000..57bb29c27 --- /dev/null +++ b/tests/ustat.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2017 JingPiao Chen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tests.h" +#include + +#ifdef __NR_ustat + +# include +# include +# include +# include +# ifdef HAVE_USTAT_H +# include +# endif + +int +main(void) +{ + const kernel_ulong_t magic = (kernel_ulong_t) 0xfacefeedffffffff; + unsigned long long buf[4]; + unsigned int dev; + long rc; + +# ifdef HAVE_USTAT_H + struct ustat *const ust = tail_alloc(sizeof(*ust)); + struct stat st; + if (stat(".", &st)) + perror_msg_and_fail("stat"); + + dev = (unsigned int) st.st_dev; + rc = syscall(__NR_ustat, dev, ust); + if (rc) + printf("ustat(makedev(%u, %u), %p) = %s\n", + major(dev), minor(dev), ust, sprintrc(rc)); + else + printf("ustat(makedev(%u, %u)" + ", {f_tfree=%llu, f_tinode=%llu}) = 0\n", + major(dev), minor(dev), + zero_extend_signed_to_ull(ust->f_tfree), + zero_extend_signed_to_ull(ust->f_tinode)); +# endif /* HAVE_USTAT_H */ + + dev = (unsigned int) magic; + rc = syscall(__NR_ustat, magic, 0); + printf("ustat(makedev(%u, %u), NULL) = %s\n", + major(dev), minor(dev), sprintrc(rc)); + + rc = syscall(__NR_ustat, magic, buf); + printf("ustat(makedev(%u, %u), %p) = %s\n", + major(dev), minor(dev), buf, sprintrc(rc)); + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("__NR_ustat") + +#endif diff --git a/tests/ustat.test b/tests/ustat.test new file mode 100755 index 000000000..60a88e0af --- /dev/null +++ b/tests/ustat.test @@ -0,0 +1,6 @@ +#!/bin/sh + +# Check ustat syscall decoding. + +. "${srcdir=.}/init.sh" +run_strace_match_diff -a33 diff --git a/tests/utime.c b/tests/utime.c index ef40d1bd0..8fd594f07 100644 --- a/tests/utime.c +++ b/tests/utime.c @@ -1,5 +1,5 @@ /* - * This file is part of utime strace test. + * Check decoding of utime syscall. * * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. @@ -28,38 +28,70 @@ */ #include "tests.h" -#include -#include -#include -#include +#include + +#ifdef __NR_utime + +# include +# include +# include +# include +# include + static void print_tm(const struct tm * const p) { - printf("%02d/%02d/%02d-%02d:%02d:%02d", - p->tm_year + 1900, p->tm_mon + 1, p->tm_mday, - p->tm_hour, p->tm_min, p->tm_sec); + char buf[256]; + + strftime(buf, sizeof(buf), "%FT%T%z", p); + + printf("%s", buf); +} + +static long +k_utime(const void *const filename, const void *const times) +{ + return syscall(__NR_utime, filename, times); } int main(void) { - int rc = utime("", NULL); - printf("utime(\"\", NULL) = %s\n", sprintrc(rc)); + static const char *const dummy_str = "dummy filename"; const time_t t = time(NULL); const struct tm * const p = localtime(&t); const struct utimbuf u = { .actime = t, .modtime = t }; - const struct utimbuf const *tail_u = tail_memdup(&u, sizeof(u)); + const struct utimbuf *const tail_u = tail_memdup(&u, sizeof(u)); + const char *const dummy_filename = + tail_memdup(dummy_str, sizeof(dummy_str) - 1); + + long rc = k_utime("", NULL); + printf("utime(\"\", NULL) = %s\n", sprintrc(rc)); + + rc = k_utime(dummy_filename + sizeof(dummy_str), tail_u + 1); + printf("utime(%p, %p) = %s\n", dummy_filename + sizeof(dummy_str), + tail_u + 1, sprintrc(rc)); - rc = utime("utime\nfilename", tail_u); + rc = k_utime(dummy_filename, (struct tm *) tail_u + 1); + printf("utime(%p, %p) = %s\n", + dummy_filename, (struct tm *) tail_u + 1, sprintrc(rc)); + + rc = k_utime("utime\nfilename", tail_u); const char *errstr = sprintrc(rc); - printf("utime(\"utime\\nfilename\", ["); + printf("utime(\"utime\\nfilename\", {actime="); print_tm(p); - printf(", "); + printf(", modtime="); print_tm(p); - printf("]) = %s\n", errstr); + printf("}) = %s\n", errstr); puts("+++ exited with 0 +++"); return 0; } + +#else + +SKIP_MAIN_UNDEFINED("__NR_utime") + +#endif diff --git a/tests/utime.test b/tests/utime.test index 4cb95ea29..bd64c5329 100755 --- a/tests/utime.test +++ b/tests/utime.test @@ -1,22 +1,6 @@ #!/bin/sh # Check decoding of utime syscall. - . "${srcdir=.}/init.sh" -$STRACE -e utime -h > /dev/null || - skip_ 'utime syscall is not supported on this architecture' - -run_prog > /dev/null -run_strace -a 16 -e utime $args > "$OUT" - -check_prog grep -LC_ALL=C grep -x "utime(.*" "$LOG" > /dev/null || { - rm -f "$OUT" - skip_ 'test executable does not use utime syscall' -} -match_diff "$LOG" "$OUT" - -rm -f "$OUT" - -exit 0 +run_strace_match_diff -a 16 -e trace=utime diff --git a/tests/utimensat.c b/tests/utimensat.c index 24e91062f..6d9faac29 100644 --- a/tests/utimensat.c +++ b/tests/utimensat.c @@ -43,7 +43,8 @@ static void print_ts(const struct timespec *ts) { - printf("{%ju, %ju}", (uintmax_t) ts->tv_sec, (uintmax_t) ts->tv_nsec); + printf("{tv_sec=%ju, tv_nsec=%ju}", (uintmax_t) ts->tv_sec, + (uintmax_t) ts->tv_nsec); } int diff --git a/tests/utimes.c b/tests/utimes.c index 401d18a14..bbfa03105 100644 --- a/tests/utimes.c +++ b/tests/utimes.c @@ -32,15 +32,11 @@ #ifdef __NR_utimes +# include # include # include # include -#define CAST_NUM(n) \ - (sizeof(n) == sizeof(long) ? \ - (unsigned long long) (unsigned long) (n) : \ - (unsigned long long) (n)) - int main(void) { @@ -56,20 +52,25 @@ main(void) struct timeval *const ts = tail_alloc(sizeof(*ts) * 2); - rc = syscall(__NR_utimes, 0, ts + 1); - printf("utimes(NULL, %p) = %ld %s (%m)\n", - ts + 1, rc, errno2name()); - ts[0].tv_sec = tv.tv_sec; ts[0].tv_usec = tv.tv_usec; ts[1].tv_sec = tv.tv_sec - 1; ts[1].tv_usec = tv.tv_usec + 1; + rc = syscall(__NR_utimes, 0, ts + 2); + printf("utimes(NULL, %p) = %ld %s (%m)\n", ts + 2, rc, errno2name()); + + rc = syscall(__NR_utimes, 0, ts + 1); + printf("utimes(NULL, [{tv_sec=%jd, tv_usec=%jd}, %p]) = " + "%ld %s (%m)\n", + (intmax_t) ts[1].tv_sec, (intmax_t) ts[1].tv_usec, + ts + 2, rc, errno2name()); + rc = syscall(__NR_utimes, "", ts); - printf("utimes(\"\", [{%llu, %llu}, {%llu, %llu}])" - " = %ld %s (%m)\n", - CAST_NUM(ts[0].tv_sec), CAST_NUM(ts[0].tv_usec), - CAST_NUM(ts[1].tv_sec), CAST_NUM(ts[1].tv_usec), + printf("utimes(\"\", [{tv_sec=%jd, tv_usec=%jd}, " + "{tv_sec=%jd, tv_usec=%jd}]) = %ld %s (%m)\n", + (intmax_t) ts[0].tv_sec, (intmax_t) ts[0].tv_usec, + (intmax_t) ts[1].tv_sec, (intmax_t) ts[1].tv_usec, rc, errno2name()); puts("+++ exited with 0 +++"); diff --git a/tests/wait4.c b/tests/wait4.c index 2d316aa67..ccb3ebb9a 100644 --- a/tests/wait4.c +++ b/tests/wait4.c @@ -40,8 +40,8 @@ sprint_rusage(const struct rusage *const ru) { static char buf[1024]; snprintf(buf, sizeof(buf), - "{ru_utime={%lu, %lu}" - ", ru_stime={%lu, %lu}" + "{ru_utime={tv_sec=%lu, tv_usec=%lu}" + ", ru_stime={tv_sec=%lu, tv_usec=%lu}" #if VERBOSE ", ru_maxrss=%lu" ", ru_ixrss=%lu" diff --git a/tests/waitid.c b/tests/waitid.c index b379f1a18..6a102990a 100644 --- a/tests/waitid.c +++ b/tests/waitid.c @@ -42,8 +42,8 @@ sprint_rusage(const struct rusage *const ru) { static char buf[1024]; snprintf(buf, sizeof(buf), - "{ru_utime={%llu, %llu}" - ", ru_stime={%llu, %llu}" + "{ru_utime={tv_sec=%lld, tv_usec=%lld}" + ", ru_stime={tv_sec=%lld, tv_usec=%lld}" #if VERBOSE ", ru_maxrss=%llu" ", ru_ixrss=%llu" @@ -62,10 +62,10 @@ sprint_rusage(const struct rusage *const ru) #else ", ...}" #endif - , zero_extend_signed_to_ull(ru->ru_utime.tv_sec) - , zero_extend_signed_to_ull(ru->ru_utime.tv_usec) - , zero_extend_signed_to_ull(ru->ru_stime.tv_sec) - , zero_extend_signed_to_ull(ru->ru_stime.tv_usec) + , (long long) ru->ru_utime.tv_sec + , (long long) ru->ru_utime.tv_usec + , (long long) ru->ru_stime.tv_sec + , (long long) ru->ru_stime.tv_usec #if VERBOSE , zero_extend_signed_to_ull(ru->ru_maxrss) , zero_extend_signed_to_ull(ru->ru_ixrss) @@ -138,13 +138,13 @@ sprint_siginfo(const siginfo_t *const si, const char *const status_text) static unsigned long poison(unsigned int v) { - return (unsigned long) 0xfacefeed00000000 | v; + return (unsigned long) 0xfacefeed00000000ULL | v; } static long do_waitid(const unsigned int idtype, const unsigned int id, - const siginfo_t const *infop, + const siginfo_t *const infop, const unsigned int options, const struct rusage *const rusage) { diff --git a/tests/waitpid.c b/tests/waitpid.c index dbcdf8739..2e22e2453 100644 --- a/tests/waitpid.c +++ b/tests/waitpid.c @@ -40,7 +40,7 @@ int main(void) { unsigned long pid = - (unsigned long) 0xdefaced00000000 | (unsigned) getpid(); + (unsigned long) 0xdefaced00000000ULL | (unsigned) getpid(); long rc = syscall(__NR_waitpid, pid, 0L, (unsigned long) WNOHANG); printf("waitpid(%d, NULL, WNOHANG) = %ld %s (%m)\n", (int) pid, rc, errno2name()); diff --git a/tests/xattr-strings.c b/tests/xattr-strings.c new file mode 100644 index 000000000..310929a95 --- /dev/null +++ b/tests/xattr-strings.c @@ -0,0 +1,30 @@ +#include "tests.h" + +#ifdef HAVE_SYS_XATTR_H + +# include +# include + +int +main(void) +{ + static const char name[] = "strace.test"; + static const char c_value[] = "foobar"; + + const char *const z_value = tail_memdup(c_value, sizeof(c_value)); + long rc; + + rc = fsetxattr(-1, name, z_value, sizeof(c_value), XATTR_REPLACE); + printf("fsetxattr(-1, \"%.*s\"..., \"%.*s\"..., %u, XATTR_REPLACE) = %s\n", + 4, name, 4, c_value, (unsigned) sizeof(c_value), sprintrc(rc)); + + + puts("+++ exited with 0 +++"); + return 0; +} + +#else + +SKIP_MAIN_UNDEFINED("HAVE_SYS_XATTR_H") + +#endif diff --git a/tests/xattr-strings.test b/tests/xattr-strings.test new file mode 100755 index 000000000..25ef360b0 --- /dev/null +++ b/tests/xattr-strings.test @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check *xattr syscalls decoding when limiting string size. + +. "${srcdir=.}/init.sh" + +run_strace_match_diff -a22 -s 4 -e trace=fsetxattr diff --git a/tests/xattr.c b/tests/xattr.c index 877552fe1..a772eced6 100644 --- a/tests/xattr.c +++ b/tests/xattr.c @@ -36,6 +36,8 @@ # define XATTR_SIZE_MAX 65536 # endif +#define DEFAULT_STRLEN 32 + int main(void) { @@ -110,9 +112,13 @@ main(void) if (rc < 0) printf("%p", big); else { + const int ellipsis = rc > DEFAULT_STRLEN; + putchar('"'); - print_quoted_memory(big, rc); + print_quoted_memory(big, ellipsis ? DEFAULT_STRLEN : rc); putchar('"'); + if (ellipsis) + fputs("...", stdout); } printf(", %u) = %s\n", XATTR_SIZE_MAX + 1, errstr); diff --git a/tests/xet_robust_list.c b/tests/xet_robust_list.c index f8349303e..211dec459 100644 --- a/tests/xet_robust_list.c +++ b/tests/xet_robust_list.c @@ -33,6 +33,19 @@ # include # include +static const char * +sprintaddr(void *addr) +{ + static char buf[sizeof(addr) * 2 + sizeof("0x")]; + + if (!addr) + return "NULL"; + else + snprintf(buf, sizeof(buf), "%p", addr); + + return buf; +} + int main(void) { @@ -43,8 +56,8 @@ main(void) if (syscall(__NR_get_robust_list, long_pid, p_head, p_len)) perror_msg_and_skip("get_robust_list"); - printf("get_robust_list(%d, [%#lx], [%lu]) = 0\n", - (int) pid, (unsigned long) *p_head, (unsigned long) *p_len); + printf("get_robust_list(%d, [%s], [%lu]) = 0\n", + (int) pid, sprintaddr(*p_head), (unsigned long) *p_len); void *head = tail_alloc(*p_len); if (syscall(__NR_set_robust_list, head, *p_len)) @@ -54,8 +67,8 @@ main(void) if (syscall(__NR_get_robust_list, long_pid, p_head, p_len)) perror_msg_and_skip("get_robust_list"); - printf("get_robust_list(%d, [%#lx], [%lu]) = 0\n", - (int) pid, (unsigned long) *p_head, (unsigned long) *p_len); + printf("get_robust_list(%d, [%s], [%lu]) = 0\n", + (int) pid, sprintaddr(*p_head), (unsigned long) *p_len); puts("+++ exited with 0 +++"); return 0; diff --git a/tests/xetitimer.c b/tests/xetitimer.c index 9c9fd997a..4b17edd3a 100644 --- a/tests/xetitimer.c +++ b/tests/xetitimer.c @@ -49,9 +49,10 @@ main(void) if (setitimer(ITIMER_REAL, &new.itv, &old.itv)) perror_msg_and_skip("setitimer"); printf("setitimer(ITIMER_REAL" - ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" - ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" - ") = 0\n", + ", {it_interval={tv_sec=%jd, tv_usec=%jd}, " + "it_value={tv_sec=%jd, tv_usec=%jd}}" + ", {it_interval={tv_sec=%jd, tv_usec=%jd}, " + "it_value={tv_sec=%jd, tv_usec=%jd}}) = 0\n", (intmax_t) new.itv.it_interval.tv_sec, (intmax_t) new.itv.it_interval.tv_usec, (intmax_t) new.itv.it_value.tv_sec, @@ -64,8 +65,8 @@ main(void) if (getitimer(ITIMER_REAL, &old.itv)) perror_msg_and_skip("getitimer"); printf("getitimer(ITIMER_REAL" - ", {it_interval={%jd, %jd}, it_value={%jd, %jd}}" - ") = 0\n", + ", {it_interval={tv_sec=%jd, tv_usec=%jd}, " + "it_value={tv_sec=%jd, tv_usec=%jd}}) = 0\n", (intmax_t) old.itv.it_interval.tv_sec, (intmax_t) old.itv.it_interval.tv_usec, (intmax_t) old.itv.it_value.tv_sec, diff --git a/tests/xetpgid.c b/tests/xetpgid.c index d4d5545cd..24e0d7f0b 100644 --- a/tests/xetpgid.c +++ b/tests/xetpgid.c @@ -40,12 +40,12 @@ main(void) { const int pid = getpid(); long rc = syscall(__NR_getpgid, - (unsigned long) 0xffffffff00000000 | pid); + (unsigned long) 0xffffffff00000000ULL | pid); printf("getpgid(%d) = %ld\n", pid, rc); rc = syscall(__NR_setpgid, - (unsigned long) 0xffffffff00000000, - (unsigned long) 0xffffffff00000000 | pid); + (unsigned long) 0xffffffff00000000ULL, + (unsigned long) 0xffffffff00000000ULL | pid); printf("setpgid(0, %d) = %ld\n", pid, rc); puts("+++ exited with 0 +++"); diff --git a/tests/xetpriority.c b/tests/xetpriority.c index dfd32642a..ed5525988 100644 --- a/tests/xetpriority.c +++ b/tests/xetpriority.c @@ -12,12 +12,12 @@ main(void) { const int pid = getpid(); long rc = syscall(__NR_getpriority, PRIO_PROCESS, - (unsigned long) 0xffffffff00000000 | pid); + (unsigned long) 0xffffffff00000000ULL | pid); printf("getpriority(PRIO_PROCESS, %d) = %ld\n", pid, rc); rc = syscall(__NR_setpriority, PRIO_PROCESS, - (unsigned long) 0xffffffff00000000 | pid, - (unsigned long) 0xffffffff00000000); + (unsigned long) 0xffffffff00000000ULL | pid, + (unsigned long) 0xffffffff00000000ULL); printf("setpriority(PRIO_PROCESS, %d, 0) = %s\n", pid, sprintrc(rc)); puts("+++ exited with 0 +++"); diff --git a/tests/xettimeofday.c b/tests/xettimeofday.c index dd0509179..d36c57b4b 100644 --- a/tests/xettimeofday.c +++ b/tests/xettimeofday.c @@ -48,12 +48,12 @@ main(void) if (syscall(__NR_gettimeofday, &t.tv, NULL)) perror_msg_and_skip("gettimeofday"); - printf("gettimeofday({%jd, %jd}, NULL) = 0\n", + printf("gettimeofday({tv_sec=%jd, tv_usec=%jd}, NULL) = 0\n", (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec); if (syscall(__NR_gettimeofday, &t.tv, &t.tz)) perror_msg_and_skip("gettimeofday"); - printf("gettimeofday({%jd, %jd}" + printf("gettimeofday({tv_sec=%jd, tv_usec=%jd}" ", {tz_minuteswest=%d, tz_dsttime=%d}) = 0\n", (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, t.tz.tz_minuteswest, t.tz.tz_dsttime); @@ -61,7 +61,7 @@ main(void) t.tv.tv_sec = -1; t.tv.tv_usec = 1000000000; assert(syscall(__NR_settimeofday, &t.tv, &t.tz) == -1); - printf("settimeofday({%jd, %jd}" + printf("settimeofday({tv_sec=%jd, tv_usec=%jd}" ", {tz_minuteswest=%d, tz_dsttime=%d})" " = -1 EINVAL (%m)\n", (intmax_t) t.tv.tv_sec, (intmax_t) t.tv.tv_usec, diff --git a/tests/xgetrlimit.c b/tests/xgetrlimit.c index d787ce38b..78d9cb997 100644 --- a/tests/xgetrlimit.c +++ b/tests/xgetrlimit.c @@ -33,7 +33,6 @@ #include #include -#include "kernel_types.h" #include "xlat.h" #include "xlat/resources.h" @@ -68,7 +67,7 @@ main(void) const struct xlat *xlat; for (xlat = resources; xlat->str; ++xlat) { - unsigned long res = 0xfacefeed00000000 | xlat->val; + unsigned long res = 0xfacefeed00000000ULL | xlat->val; long rc = syscall(NR_GETRLIMIT, res, 0); if (rc && ENOSYS == errno) perror_msg_and_skip(STR_GETRLIMIT); diff --git a/tests/xselect.c b/tests/xselect.c index 08e29e1f4..39e87ac79 100644 --- a/tests/xselect.c +++ b/tests/xselect.c @@ -72,8 +72,8 @@ int main(void) FD_SET(fds[0], set); FD_SET(fds[1], set); assert(syscall(TEST_SYSCALL_NR, fds[1] + 1, NULL, set, NULL, &tm.tv) == 3); - printf("%s(%d, NULL, [1 2 %d %d], NULL, {%lld, %lld})" - " = 3 (out [1 2 %d], left {%lld, %lld})\n", + printf("%s(%d, NULL, [1 2 %d %d], NULL, {tv_sec=%lld, tv_usec=%lld})" + " = 3 (out [1 2 %d], left {tv_sec=%lld, tv_usec=%lld})\n", TEST_SYSCALL_STR, fds[1] + 1, fds[0], fds[1], (long long) tm_in.tv.tv_sec, (long long) tm_in.tv.tv_usec, fds[1], @@ -97,7 +97,7 @@ int main(void) tm.tv.tv_sec = 0; tm.tv.tv_usec = 123; assert(syscall(TEST_SYSCALL_NR, FD_SETSIZE + 1, set, set + 1, NULL, &tm.tv) == 0); - printf("%s(%d, [%d], [], NULL, {0, 123}) = 0 (Timeout)\n", + printf("%s(%d, [%d], [], NULL, {tv_sec=0, tv_usec=123}) = 0 (Timeout)\n", TEST_SYSCALL_STR, FD_SETSIZE + 1, fds[0]); puts("+++ exited with 0 +++"); diff --git a/tests/xstatfsx.c b/tests/xstatfsx.c index c5c04be2f..d8288f1ff 100644 --- a/tests/xstatfsx.c +++ b/tests/xstatfsx.c @@ -81,7 +81,7 @@ print_statfs(const char *const sample, const char *magic_str) PRINT_NUM(f_files); PRINT_NUM(f_ffree); #ifdef PRINT_F_FSID - printf(", f_fsid={%u, %u}", + printf(", f_fsid={val=[%u, %u]}", (unsigned) b->PRINT_F_FSID[0], (unsigned) b->PRINT_F_FSID[1]); #endif PRINT_NUM(f_namelen); @@ -110,7 +110,7 @@ main(void) printf("NULL) = %s\n", errstr); #ifdef CHECK_ODD_SIZE - const unsigned long addr = (unsigned long) 0xfacefeeddeadbeef; + const unsigned long addr = (unsigned long) 0xfacefeeddeadbeefULL; rc = SYSCALL_INVOKE("", -1, addr, sizeof(STRUCT_STATFS) + 1); errstr = sprintrc(rc); PRINT_SYSCALL_HEADER("", -1, sizeof(STRUCT_STATFS) + 1); diff --git a/tests/xstatx.c b/tests/xstatx.c index 2d0dac36e..0d5fca87b 100644 --- a/tests/xstatx.c +++ b/tests/xstatx.c @@ -40,6 +40,7 @@ # error PRINT_SYSCALL_FOOTER must be defined # endif +# include # include # include # include @@ -56,12 +57,15 @@ print_time(const time_t t) struct tm *p = localtime(&t); - if (p) - printf("%02d/%02d/%02d-%02d:%02d:%02d", - p->tm_year + 1900, p->tm_mon + 1, p->tm_mday, - p->tm_hour, p->tm_min, p->tm_sec); - else + if (p) { + char buf[256]; + + strftime(buf, sizeof(buf), "%FT%T%z", p); + + printf("%s", buf); + } else { printf("%llu", zero_extend_signed_to_ull(t)); + } } # ifndef STRUCT_STAT @@ -70,66 +74,60 @@ print_time(const time_t t) # define STRUCT_STAT_IS_STAT64 0 # endif # ifndef SAMPLE_SIZE -# define SAMPLE_SIZE 43147718418 +# define SAMPLE_SIZE ((libc_off_t) 43147718418ULL) # endif typedef off_t libc_off_t; -# ifdef USE_ASM_STAT -# define stat libc_stat -# define stat64 libc_stat64 -# endif +# define stat libc_stat +# define stat64 libc_stat64 # include # include -# ifdef USE_ASM_STAT -# undef stat -# undef stat64 -# endif +# undef stat +# undef stat64 -# ifdef USE_ASM_STAT -# undef st_atime -# undef st_mtime -# undef st_ctime -# include "asm_stat.h" +# undef st_atime +# undef st_mtime +# undef st_ctime +# include "asm_stat.h" -# if STRUCT_STAT_IS_STAT64 -# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC -# if defined MPERS_IS_m32 -# ifdef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC -# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -# endif -# elif defined MPERS_IS_mx32 -# ifdef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC -# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -# endif -# elif defined HAVE_STRUCT_STAT64_ST_MTIME_NSEC -# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -# endif /* MPERS_IS_m32 || MPERS_IS_mx32 || HAVE_STRUCT_STAT64_ST_MTIME_NSEC */ -# else /* !STRUCT_STAT_IS_STAT64 */ -# if defined MPERS_IS_m32 -# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC -# ifdef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC -# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -# endif -# elif defined MPERS_IS_mx32 -# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC -# ifdef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC -# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -# endif -# endif /* MPERS_IS_m32 || MPERS_IS_mx32 */ -# endif /* STRUCT_STAT_IS_STAT64 */ - -# else /* !USE_ASM_STAT */ +# if STRUCT_STAT_IS_STAT64 # undef HAVE_STRUCT_STAT_ST_MTIME_NSEC -# ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC +# if defined MPERS_IS_m32 +# ifdef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# elif defined MPERS_IS_mx32 +# ifdef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# elif defined HAVE_STRUCT_STAT64_ST_MTIME_NSEC # define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 -# undef st_atime_nsec -# define st_atime_nsec st_atim.tv_nsec -# undef st_ctime_nsec -# define st_ctime_nsec st_ctim.tv_nsec -# undef st_mtime_nsec -# define st_mtime_nsec st_mtim.tv_nsec -# endif /* HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC */ +# endif /* MPERS_IS_m32 || MPERS_IS_mx32 || HAVE_STRUCT_STAT64_ST_MTIME_NSEC */ +# else /* !STRUCT_STAT_IS_STAT64 */ +# if defined MPERS_IS_m32 +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# ifdef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# elif defined MPERS_IS_mx32 +# undef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# ifdef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC +# define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1 +# endif +# endif /* MPERS_IS_m32 || MPERS_IS_mx32 */ +# endif /* STRUCT_STAT_IS_STAT64 */ + +# ifndef TEST_BOGUS_STRUCT_STAT +# define TEST_BOGUS_STRUCT_STAT 1 +# endif + +# ifndef IS_FSTAT +# define IS_FSTAT 0 +# endif + +# ifndef OLD_STAT +# define OLD_STAT 0 # endif static void @@ -167,8 +165,12 @@ print_stat(const STRUCT_STAT *st) printf(", st_nlink=%llu", zero_extend_signed_to_ull(st->st_nlink)); printf(", st_uid=%llu", zero_extend_signed_to_ull(st->st_uid)); printf(", st_gid=%llu", zero_extend_signed_to_ull(st->st_gid)); +# if OLD_STAT + printf(", st_blksize=0, st_blocks=0"); +# else /* !OLD_STAT */ printf(", st_blksize=%llu", zero_extend_signed_to_ull(st->st_blksize)); printf(", st_blocks=%llu", zero_extend_signed_to_ull(st->st_blocks)); +# endif /* OLD_STAT */ switch (st->st_mode & S_IFMT) { case S_IFCHR: case S_IFBLK: @@ -182,19 +184,19 @@ print_stat(const STRUCT_STAT *st) printf(", st_atime="); print_time(sign_extend_unsigned_to_ll(st->st_atime)); -# ifdef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# if defined(HAVE_STRUCT_STAT_ST_MTIME_NSEC) && !OLD_STAT if (st->st_atime_nsec) printf(".%09llu", zero_extend_signed_to_ull(st->st_atime_nsec)); # endif printf(", st_mtime="); print_time(sign_extend_unsigned_to_ll(st->st_mtime)); -# ifdef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# if defined(HAVE_STRUCT_STAT_ST_MTIME_NSEC) && !OLD_STAT if (st->st_mtime_nsec) printf(".%09llu", zero_extend_signed_to_ull(st->st_mtime_nsec)); # endif printf(", st_ctime="); print_time(sign_extend_unsigned_to_ll(st->st_ctime)); -# ifdef HAVE_STRUCT_STAT_ST_MTIME_NSEC +# if defined(HAVE_STRUCT_STAT_ST_MTIME_NSEC) && !OLD_STAT if (st->st_ctime_nsec) printf(".%09llu", zero_extend_signed_to_ull(st->st_ctime_nsec)); # endif @@ -227,22 +229,50 @@ create_sample(const char *fname, const libc_off_t size) int main(void) { +# if !IS_FSTAT + static const char full[] = "/dev/full"; +# endif static const char sample[] = TEST_SYSCALL_STR ".sample"; STRUCT_STAT st[2]; - int rc = create_sample(sample, SAMPLE_SIZE); + int rc; + + rc = create_sample(sample, SAMPLE_SIZE); if (rc) { (void) unlink(sample); return rc; } - if (TEST_SYSCALL_INVOKE(sample, st)) { - perror(TEST_SYSCALL_STR); - (void) unlink(sample); - return 77; +# if TEST_BOGUS_STRUCT_STAT + STRUCT_STAT *st_cut = tail_alloc(sizeof(long) * 4); + rc = TEST_SYSCALL_INVOKE(sample, st_cut); + PRINT_SYSCALL_HEADER(sample); + printf("%p", st_cut); + PRINT_SYSCALL_FOOTER(rc); +# endif + +# if !IS_FSTAT + rc = TEST_SYSCALL_INVOKE(full, st); + PRINT_SYSCALL_HEADER(full); + if (rc) + printf("%p", st); + else + print_stat(st); + PRINT_SYSCALL_FOOTER(rc); +# endif + + if ((rc = TEST_SYSCALL_INVOKE(sample, st))) { +# if OLD_STAT + if (errno != EOVERFLOW) +# endif + { + perror(TEST_SYSCALL_STR); + (void) unlink(sample); + return 77; + } } (void) unlink(sample); - if (zero_extend_signed_to_ull(SAMPLE_SIZE) != + if (!rc && zero_extend_signed_to_ull(SAMPLE_SIZE) != zero_extend_signed_to_ull(st[0].st_size)) { fprintf(stderr, "Size mismatch: " "requested size(%llu) != st_size(%llu)\n", @@ -252,52 +282,36 @@ main(void) " definition of %s.\n" "Here is some diagnostics that might help:\n", STRUCT_STAT_STR); - fprintf(stderr, "offsetof(%s, st_dev) = %zu" - ", sizeof(st_dev) = %zu\n", - STRUCT_STAT_STR, offsetof(STRUCT_STAT, st_dev), - sizeof(st[0].st_dev)); - fprintf(stderr, "offsetof(%s, st_ino) = %zu" - ", sizeof(st_ino) = %zu\n", - STRUCT_STAT_STR, offsetof(STRUCT_STAT, st_ino), - sizeof(st[0].st_ino)); - fprintf(stderr, "offsetof(%s, st_mode) = %zu" - ", sizeof(st_mode) = %zu\n", - STRUCT_STAT_STR, offsetof(STRUCT_STAT, st_mode), - sizeof(st[0].st_mode)); - fprintf(stderr, "offsetof(%s, st_nlink) = %zu" - ", sizeof(st_nlink) = %zu\n", - STRUCT_STAT_STR, offsetof(STRUCT_STAT, st_nlink), - sizeof(st[0].st_nlink)); - fprintf(stderr, "offsetof(%s, st_uid) = %zu" - ", sizeof(st_uid) = %zu\n", - STRUCT_STAT_STR, offsetof(STRUCT_STAT, st_uid), - sizeof(st[0].st_uid)); - fprintf(stderr, "offsetof(%s, st_gid) = %zu" - ", sizeof(st_gid) = %zu\n", - STRUCT_STAT_STR, offsetof(STRUCT_STAT, st_gid), - sizeof(st[0].st_gid)); - fprintf(stderr, "offsetof(%s, st_rdev) = %zu" - ", sizeof(st_rdev) = %zu\n", - STRUCT_STAT_STR, offsetof(STRUCT_STAT, st_rdev), - sizeof(st[0].st_rdev)); - fprintf(stderr, "offsetof(%s, st_size) = %zu" - ", sizeof(st_size) = %zu\n", - STRUCT_STAT_STR, offsetof(STRUCT_STAT, st_size), - sizeof(st[0].st_size)); - fprintf(stderr, "offsetof(%s, st_blksize) = %zu" - ", sizeof(st_blksize) = %zu\n", - STRUCT_STAT_STR, offsetof(STRUCT_STAT, st_blksize), - sizeof(st[0].st_blksize)); - fprintf(stderr, "offsetof(%s, st_blocks) = %zu" - ", sizeof(st_blocks) = %zu\n", - STRUCT_STAT_STR, offsetof(STRUCT_STAT, st_blocks), - sizeof(st[0].st_blocks)); - return 77; + +#define LOG_STAT_OFFSETOF_SIZEOF(object, member) \ + fprintf(stderr, "offsetof(%s, %s) = %zu" \ + ", sizeof(%s) = %zu\n", \ + STRUCT_STAT_STR, #member, \ + offsetof(STRUCT_STAT, member), \ + #member, sizeof((object).member)) + + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_dev); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_ino); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_mode); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_nlink); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_uid); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_gid); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_rdev); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_size); +# if !OLD_STAT + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_blksize); + LOG_STAT_OFFSETOF_SIZEOF(st[0], st_blocks); +# endif /* !OLD_STAT */ + + return 1; } PRINT_SYSCALL_HEADER(sample); - print_stat(st); - PRINT_SYSCALL_FOOTER; + if (rc) + printf("%p", st); + else + print_stat(st); + PRINT_SYSCALL_FOOTER(rc); puts("+++ exited with 0 +++"); return 0; diff --git a/time.c b/time.c index b32eddf63..6c542f631 100644 --- a/time.c +++ b/time.c @@ -33,7 +33,7 @@ #include static void -print_timezone(struct tcb *tcp, const long addr) +print_timezone(struct tcb *const tcp, const kernel_ulong_t addr) { struct timezone tz; @@ -167,11 +167,11 @@ SYS_FUNC(osf_setitimer) #include "xlat/adjtimex_state.h" static int -do_adjtimex(struct tcb *tcp, long addr) +do_adjtimex(struct tcb *const tcp, const kernel_ulong_t addr) { if (print_timex(tcp, addr)) return 0; - tcp->auxstr = xlookup(adjtimex_state, (unsigned long) tcp->u_rval); + tcp->auxstr = xlookup(adjtimex_state, (kernel_ulong_t) tcp->u_rval); if (tcp->auxstr) return RVAL_STR; return 0; diff --git a/times.c b/times.c index 6af4f95a0..b165a2b0d 100644 --- a/times.c +++ b/times.c @@ -53,10 +53,5 @@ SYS_FUNC(times) zero_extend_signed_to_ull(tbuf.tms_cstime)); } - return syserror(tcp) ? RVAL_DECIMAL : -#if defined(RVAL_LUDECIMAL) && !defined(IN_MPERS) - RVAL_LUDECIMAL; -#else - RVAL_UDECIMAL; -#endif + return syserror(tcp) ? RVAL_DECIMAL : RVAL_UDECIMAL; } diff --git a/travis-build.sh b/travis-build.sh deleted file mode 100755 index 32ccd5080..000000000 --- a/travis-build.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -ex - -case "$CC" in - gcc) - ENABLE_GCC_WERROR=--enable-gcc-Werror - ;; - clang-*) - # clang -mx32 fails with the following error: - # clang: error: clang frontend command failed with exit code 70 (use -v to see invocation) - export st_cv_mx32_runtime=no - ;; -esac - -case "${TARGET-}" in - x32) - CC="$CC -mx32" - ;; - x86) - CC="$CC -m32" - export DISTCHECK_CONFIGURE_FLAGS='--build=i686-pc-linux-gnu --target=i686-pc-linux-gnu' - ;; -esac - -$CC --version -export CC_FOR_BUILD="$CC" - -./git-set-file-times -./bootstrap -./configure --enable-maintainer-mode ${ENABLE_GCC_WERROR-} ${DISTCHECK_CONFIGURE_FLAGS-} - -j=-j`getconf _NPROCESSORS_ONLN 2> /dev/null` || j= -make -k $j distcheck VERBOSE=${VERBOSE-} diff --git a/travis-install.sh b/travis-install.sh deleted file mode 100755 index ba5ff2dfc..000000000 --- a/travis-install.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -ex - -updated= -apt_get_install() -{ - [ -n "$updated" ] || { - sudo apt-get -qq update - updated=1 - } - sudo apt-get -qq --no-install-suggests --no-install-recommends \ - install -y "$@" -} - -case "$CC" in - gcc) - apt_get_install gcc-multilib - ;; - clang-*) - apt_get_install gcc-multilib "$CC" - ;; - musl-gcc) - apt_get_install gcc-multilib - git clone --depth=1 https://github.com/strace/musl - cd musl - CC=gcc - build= - case "${TARGET-}" in - x32) - CC="$CC -mx32" - ;; - x86) - CC="$CC -m32" - build='--build=i686-pc-linux-gnu --target=i686-pc-linux-gnu' - ;; - esac - ./configure --prefix=/opt/musl --exec-prefix=/usr ${build} - make - sudo make install - cd - - rm -rf musl - sudo ln -s \ - /usr/include/linux \ - /usr/include/asm \ - /usr/include/asm-generic \ - /usr/include/mtd \ - /opt/musl/include/ - ;; -esac - -if [ "${COVERAGE-}" = true ]; then - apt_get_install lcov - pip install --user codecov -fi diff --git a/travis-success.sh b/travis-success.sh deleted file mode 100755 index cb04d45d2..000000000 --- a/travis-success.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -ex - -if [ "${COVERAGE-}" = true ]; then - set -- strace-*.tar.xz - tar -xf "$1" - dir="${1%.tar.xz}" - cd "$dir" - export CC_FOR_BUILD="$CC" - ./configure --enable-code-coverage - make -k $j all check VERBOSE=${VERBOSE-} - codecov --gcov-args=-abcp ||: -fi diff --git a/truncate.c b/truncate.c index 1428094a9..f18394d97 100644 --- a/truncate.c +++ b/truncate.c @@ -3,7 +3,7 @@ SYS_FUNC(truncate) { printpath(tcp, tcp->u_arg[0]); - tprintf(", %lu", tcp->u_arg[1]); + tprintf(", %" PRI_klu, tcp->u_arg[1]); return RVAL_DECODED; } @@ -19,7 +19,7 @@ SYS_FUNC(truncate64) SYS_FUNC(ftruncate) { printfd(tcp, tcp->u_arg[0]); - tprintf(", %lu", tcp->u_arg[1]); + tprintf(", %" PRI_klu, tcp->u_arg[1]); return RVAL_DECODED; } diff --git a/ubi.c b/ubi.c index dfac0be0f..b4706552a 100644 --- a/ubi.c +++ b/ubi.c @@ -40,7 +40,8 @@ #include "xlat/ubi_volume_props.h" int -ubi_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +ubi_ioctl(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) { if (!verbose(tcp)) return RVAL_DECODED; diff --git a/uid.c b/uid.c index 67e8e58a0..80d81ce44 100644 --- a/uid.c +++ b/uid.c @@ -75,7 +75,7 @@ SYS_FUNC(getuid) SYS_FUNC(setfsuid) { - tprintf("%u", (uid_t) tcp->u_arg[0]); + printuid("", tcp->u_arg[0]); return RVAL_UDECIMAL | RVAL_DECODED; } @@ -88,13 +88,16 @@ SYS_FUNC(setuid) } static void -get_print_uid(struct tcb *tcp, const char *prefix, const long addr) +get_print_uid(struct tcb *const tcp, const char *const prefix, + const kernel_ulong_t addr) { uid_t uid; tprints(prefix); - if (!umove_or_printaddr(tcp, addr, &uid)) - tprintf("[%u]", uid); + if (!umove_or_printaddr(tcp, addr, &uid)) { + printuid("[", uid); + tprints("]"); + } } SYS_FUNC(getresuid) @@ -156,13 +159,14 @@ printuid(const char *text, const unsigned int uid) static bool print_gid(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) { - tprintf("%u", (unsigned int) (* (uid_t *) elem_buf)); + printuid("", (* (uid_t *) elem_buf)); return true; } static void -print_groups(struct tcb *tcp, const unsigned int len, const unsigned long addr) +print_groups(struct tcb *const tcp, const unsigned int len, + const kernel_ulong_t addr) { static unsigned long ngroups_max; if (!ngroups_max) @@ -180,9 +184,9 @@ print_groups(struct tcb *tcp, const unsigned int len, const unsigned long addr) SYS_FUNC(setgroups) { - const unsigned int len = tcp->u_arg[0]; + const int len = tcp->u_arg[0]; - tprintf("%u, ", len); + tprintf("%d, ", len); print_groups(tcp, len, tcp->u_arg[1]); return RVAL_DECODED; } @@ -190,7 +194,7 @@ SYS_FUNC(setgroups) SYS_FUNC(getgroups) { if (entering(tcp)) - tprintf("%u, ", (unsigned int) tcp->u_arg[0]); + tprintf("%d, ", (int) tcp->u_arg[0]); else print_groups(tcp, tcp->u_rval, tcp->u_arg[1]); return 0; diff --git a/unwind.c b/unwind.c index 238e215d0..326d184ee 100644 --- a/unwind.c +++ b/unwind.c @@ -103,6 +103,9 @@ unwind_init(void) void unwind_tcb_init(struct tcb *tcp) { + if (tcp->libunwind_ui) + return; + tcp->libunwind_ui = _UPT_create(tcp->pid); if (!tcp->libunwind_ui) die_out_of_memory(); diff --git a/upeek.c b/upeek.c index 1edfcaa9d..01a12d353 100644 --- a/upeek.c +++ b/upeek.c @@ -35,7 +35,7 @@ #include "ptrace.h" int -upeek(int pid, long off, long *res) +upeek(int pid, unsigned long off, kernel_ulong_t *res) { long val; @@ -47,6 +47,6 @@ upeek(int pid, long off, long *res) } return -1; } - *res = val; + *res = (unsigned long) val; return 0; } diff --git a/upoke.c b/upoke.c new file mode 100644 index 000000000..dda0b8d71 --- /dev/null +++ b/upoke.c @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2016 Dmitry V. Levin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#include "ptrace.h" + +int +upoke(int pid, unsigned long off, kernel_ulong_t val) +{ + if (ptrace(PTRACE_POKEUSER, pid, off, val)) { + if (errno != ESRCH) + perror_msg("upoke: PTRACE_POKEUSER pid:%d @%#lx)", pid, off); + return -1; + } + return 0; +} diff --git a/userfaultfd.c b/userfaultfd.c index 07094a10c..aeeb3eabc 100644 --- a/userfaultfd.c +++ b/userfaultfd.c @@ -55,7 +55,8 @@ tprintf_uffdio_range(const struct uffdio_range *range) } int -uffdio_ioctl(struct tcb *tcp, const unsigned int code, const long arg) +uffdio_ioctl(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) { switch (code) { case UFFDIO_API: { diff --git a/ustat.c b/ustat.c new file mode 100644 index 000000000..76550632c --- /dev/null +++ b/ustat.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2017 JingPiao Chen + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "defs.h" +#ifdef HAVE_USTAT_H +# include DEF_MPERS_TYPE(struct_ustat) +# include +typedef struct ustat struct_ustat; +#endif /* HAVE_USTAT_H */ + +#include MPERS_DEFS + +SYS_FUNC(ustat) +{ + if (entering(tcp)) + print_dev_t((unsigned int) tcp->u_arg[0]); + else { + tprints(", "); +#ifdef HAVE_USTAT_H + struct_ustat ust; + + if (!umove_or_printaddr(tcp, tcp->u_arg[1], &ust)) + tprintf("{f_tfree=%llu, f_tinode=%llu}", + zero_extend_signed_to_ull(ust.f_tfree), + zero_extend_signed_to_ull(ust.f_tinode)); +#else /* !HAVE_USTAT_H */ + printaddr(tcp->u_arg[1]); +#endif /* HAVE_USTAT_H */ + } + + return 0; +} diff --git a/util.c b/util.c index 23a5fdbfd..a38f82174 100644 --- a/util.c +++ b/util.c @@ -39,23 +39,42 @@ # include #endif #include +#include +#include "scno.h" #include "regs.h" #include "ptrace.h" int -string_to_uint(const char *str) +string_to_uint_ex(const char *const str, char **const endptr, + const unsigned int max_val, const char *const accepted_ending) { - char *error; - long value; + char *end; + long val; if (!*str) return -1; + errno = 0; - value = strtol(str, &error, 10); - if (errno || *error || value < 0 || (long)(int)value != value) + val = strtol(str, &end, 10); + + if (str == end || val < 0 || (unsigned long) val > max_val + || (val == LONG_MAX && errno == ERANGE)) + return -1; + + if (*end && (!accepted_ending || !strchr(accepted_ending, *end))) return -1; - return (int)value; + + if (endptr) + *endptr = end; + + return (int) val; +} + +int +string_to_uint(const char *const str) +{ + return string_to_uint_upto(str, INT_MAX); } int @@ -204,10 +223,18 @@ next_set_bit(const void *bit_array, unsigned cur_bit, unsigned size_bits) pos++; } } -/* + +/** * Print entry in struct xlat table, if there. + * + * @param val Value to search a literal representation for. + * @param dflt String (abbreviated in comment syntax) which should be emitted + * if no appropriate xlat value has been found. + * @param xlat (And the following arguments) Pointers to arrays of xlat values. + * The last argument should be NULL. + * @return 1 if appropriate xlat value has been found, 0 otherwise. */ -void +int printxvals(const uint64_t val, const char *dflt, const struct xlat *xlat, ...) { va_list args; @@ -219,13 +246,49 @@ printxvals(const uint64_t val, const char *dflt, const struct xlat *xlat, ...) if (str) { tprints(str); va_end(args); - return; + return 1; } } /* No hits -- print raw # instead. */ - tprintf("%#" PRIx64 " /* %s */", val, dflt); + tprintf("%#" PRIx64, val); + if (dflt) + tprintf(" /* %s */", dflt); va_end(args); + + return 0; +} + +/** + * Print entry in sorted struct xlat table, if it is there. + * + * @param xlat Pointer to an array of xlat values (not terminated with + * XLAT_END). + * @param xlat_size Number of xlat elements present in array (usually ARRAY_SIZE + * if array is declared in the unit's scope and not + * terminated with XLAT_END). + * @param val Value to search literal representation for. + * @param dflt String (abbreviated in comment syntax) which should be + * emitted if no appropriate xlat value has been found. + * @return 1 if appropriate xlat value has been found, 0 + * otherwise. + */ +int +printxval_searchn(const struct xlat *xlat, size_t xlat_size, uint64_t val, + const char *dflt) +{ + const char *s = xlat_search(xlat, xlat_size, val); + + if (s) { + tprints(s); + return 1; + } + + tprintf("%#" PRIx64, val); + if (dflt) + tprintf(" /* %s */", dflt); + + return 0; } /* @@ -235,40 +298,22 @@ printxvals(const uint64_t val, const char *dflt, const struct xlat *xlat, ...) int getllval(struct tcb *tcp, unsigned long long *val, int arg_no) { -#if SIZEOF_LONG > 4 && SIZEOF_LONG == SIZEOF_LONG_LONG -# if SUPPORTED_PERSONALITIES > 1 -# ifdef X86_64 - if (current_personality != 1) { -# else - if (current_wordsize > 4) { -# endif -# endif - *val = tcp->u_arg[arg_no]; - arg_no++; -# if SUPPORTED_PERSONALITIES > 1 - } else { +#if SIZEOF_KERNEL_LONG_T > 4 +# ifndef current_klongsize + if (current_klongsize < SIZEOF_KERNEL_LONG_T) { # if defined(AARCH64) || defined(POWERPC64) /* Align arg_no to the next even number. */ arg_no = (arg_no + 1) & 0xe; # endif /* AARCH64 || POWERPC64 */ - *val = LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]); - arg_no += 2; - } -# endif /* SUPPORTED_PERSONALITIES > 1 */ -#elif SIZEOF_LONG > 4 -# error Unsupported configuration: SIZEOF_LONG > 4 && SIZEOF_LONG_LONG > SIZEOF_LONG -#elif HAVE_STRUCT_TCB_EXT_ARG -# if SUPPORTED_PERSONALITIES > 1 - if (current_personality == 1) { - *val = LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]); + *val = ULONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]); arg_no += 2; } else -# endif +# endif /* !current_klongsize */ { - *val = tcp->ext_arg[arg_no]; + *val = tcp->u_arg[arg_no]; arg_no++; } -#else +#else /* SIZEOF_KERNEL_LONG_T == 4 */ # if defined __ARM_EABI__ || \ defined LINUX_MIPSO32 || \ defined POWERPC || \ @@ -286,7 +331,7 @@ getllval(struct tcb *tcp, unsigned long long *val, int arg_no) if (arg_no == 3) arg_no++; # endif /* __ARM_EABI__ || LINUX_MIPSO32 || POWERPC || XTENSA || SH */ - *val = LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]); + *val = ULONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]); arg_no += 2; #endif @@ -406,17 +451,18 @@ printflags64(const struct xlat *xlat, uint64_t flags, const char *dflt) } void -printaddr(const long addr) +printaddr(const kernel_ulong_t addr) { if (!addr) tprints("NULL"); else - tprintf("%#lx", addr); + tprintf("%#" PRI_klx, addr); } #define DEF_PRINTNUM(name, type) \ bool \ -printnum_ ## name(struct tcb *tcp, const long addr, const char *fmt) \ +printnum_ ## name(struct tcb *const tcp, const kernel_ulong_t addr, \ + const char *const fmt) \ { \ type num; \ if (umove_or_printaddr(tcp, addr, &num)) \ @@ -427,9 +473,23 @@ printnum_ ## name(struct tcb *tcp, const long addr, const char *fmt) \ return true; \ } +#define DEF_PRINTNUM_ADDR(name, type) \ +bool \ +printnum_addr_ ## name(struct tcb *tcp, const kernel_ulong_t addr) \ +{ \ + type num; \ + if (umove_or_printaddr(tcp, addr, &num)) \ + return false; \ + tprints("["); \ + printaddr(num); \ + tprints("]"); \ + return true; \ +} + #define DEF_PRINTPAIR(name, type) \ bool \ -printpair_ ## name(struct tcb *tcp, const long addr, const char *fmt) \ +printpair_ ## name(struct tcb *const tcp, const kernel_ulong_t addr, \ + const char *const fmt) \ { \ type pair[2]; \ if (umove_or_printaddr(tcp, addr, &pair)) \ @@ -443,15 +503,17 @@ printpair_ ## name(struct tcb *tcp, const long addr, const char *fmt) \ } DEF_PRINTNUM(int, int) +DEF_PRINTNUM_ADDR(int, unsigned int) DEF_PRINTPAIR(int, int) DEF_PRINTNUM(short, short) DEF_PRINTNUM(int64, uint64_t) +DEF_PRINTNUM_ADDR(int64, uint64_t) DEF_PRINTPAIR(int64, uint64_t) -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 +#ifndef current_wordsize bool -printnum_long_int(struct tcb *tcp, const long addr, - const char *fmt_long, const char *fmt_int) +printnum_long_int(struct tcb *const tcp, const kernel_ulong_t addr, + const char *const fmt_long, const char *const fmt_int) { if (current_wordsize > sizeof(int)) { return printnum_int64(tcp, addr, fmt_long); @@ -459,13 +521,35 @@ printnum_long_int(struct tcb *tcp, const long addr, return printnum_int(tcp, addr, fmt_int); } } -#endif + +bool +printnum_addr_long_int(struct tcb *tcp, const kernel_ulong_t addr) +{ + if (current_wordsize > sizeof(int)) { + return printnum_addr_int64(tcp, addr); + } else { + return printnum_addr_int(tcp, addr); + } +} +#endif /* !current_wordsize */ + +#ifndef current_klongsize +bool +printnum_addr_klong_int(struct tcb *tcp, const kernel_ulong_t addr) +{ + if (current_klongsize > sizeof(int)) { + return printnum_addr_int64(tcp, addr); + } else { + return printnum_addr_int(tcp, addr); + } +} +#endif /* !current_klongsize */ const char * sprinttime(time_t t) { struct tm *tmp; - static char buf[sizeof(int) * 3 * 6]; + static char buf[sizeof(int) * 3 * 6 + sizeof("+0000")]; if (t == 0) { strcpy(buf, "0"); @@ -473,11 +557,9 @@ sprinttime(time_t t) } tmp = localtime(&t); if (tmp) - snprintf(buf, sizeof buf, "%02d/%02d/%02d-%02d:%02d:%02d", - tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday, - tmp->tm_hour, tmp->tm_min, tmp->tm_sec); + strftime(buf, sizeof(buf), "%FT%T%z", tmp); else - snprintf(buf, sizeof buf, "%lu", (unsigned long) t); + snprintf(buf, sizeof(buf), "%lu", (unsigned long) t); return buf; } @@ -572,9 +654,9 @@ string_quote(const char *instr, char *outstr, const unsigned int size, eol = 0x100; /* this can never match a char */ usehex = 0; - if (xflag > 1) + if ((xflag > 1) || (style & QUOTE_FORCE_HEX)) { usehex = 1; - else if (xflag) { + } else if (xflag) { /* Check for presence of symbol which require to hex-quote the whole string. */ for (i = 0; i < size; ++i) { @@ -759,7 +841,7 @@ print_quoted_string(const char *str, unsigned int size, * If path length exceeds `n', append `...' to the output. */ void -printpathn(struct tcb *tcp, long addr, unsigned int n) +printpathn(struct tcb *const tcp, const kernel_ulong_t addr, unsigned int n) { char path[PATH_MAX + 1]; int nul_seen; @@ -786,7 +868,7 @@ printpathn(struct tcb *tcp, long addr, unsigned int n) } void -printpath(struct tcb *tcp, long addr) +printpath(struct tcb *const tcp, const kernel_ulong_t addr) { /* Size must correspond to char path[] size in printpathn */ printpathn(tcp, addr, PATH_MAX); @@ -794,16 +876,21 @@ printpath(struct tcb *tcp, long addr) /* * Print string specified by address `addr' and length `len'. - * If `len' < 0, treat the string as a NUL-terminated string. - * If string length exceeds `max_strlen', append `...' to the output. + * If `user_style' has QUOTE_0_TERMINATED bit set, treat the string + * as a NUL-terminated string. + * Pass `user_style' on to `string_quote'. + * Append `...' to the output if either the string length exceeds `max_strlen', + * or QUOTE_0_TERMINATED bit is set and the string length exceeds `len'. */ void -printstr_ex(struct tcb *tcp, long addr, long len, unsigned int user_style) +printstr_ex(struct tcb *const tcp, const kernel_ulong_t addr, + const kernel_ulong_t len, const unsigned int user_style) { static char *str = NULL; static char *outstr; unsigned int size; - unsigned int style; + unsigned int style = user_style; + int rc; int ellipsis; if (!addr) { @@ -820,35 +907,33 @@ printstr_ex(struct tcb *tcp, long addr, long len, unsigned int user_style) outstr = xmalloc(outstr_size); } - size = max_strlen; - if (len == -1) { - /* - * Treat as a NUL-terminated string: fetch one byte more - * because string_quote may look one byte ahead. - */ - if (umovestr(tcp, addr, size + 1, str) < 0) { - printaddr(addr); - return; - } - style = QUOTE_0_TERMINATED; - } - else { - if (size > (unsigned long)len) - size = (unsigned long)len; - if (umoven(tcp, addr, size, str) < 0) { - printaddr(addr); - return; - } - style = 0; + /* Fetch one byte more because string_quote may look one byte ahead. */ + size = max_strlen + 1; + + if (size > len) + size = len; + if (style & QUOTE_0_TERMINATED) + rc = umovestr(tcp, addr, size, str); + else + rc = umoven(tcp, addr, size, str); + + if (rc < 0) { + printaddr(addr); + return; } - style |= user_style; + if (size > max_strlen) + size = max_strlen; + else + str[size] = '\xff'; /* If string_quote didn't see NUL and (it was supposed to be ASCIZ str * or we were requested to print more than -s NUM chars)... */ - ellipsis = (string_quote(str, outstr, size, style) && - (len < 0 || (unsigned long) len > max_strlen)); + ellipsis = string_quote(str, outstr, size, style) + && len + && ((style & QUOTE_0_TERMINATED) + || len > max_strlen); tprints(outstr); if (ellipsis) @@ -856,9 +941,10 @@ printstr_ex(struct tcb *tcp, long addr, long len, unsigned int user_style) } void -dumpiov_upto(struct tcb *tcp, int len, long addr, unsigned long data_size) +dumpiov_upto(struct tcb *const tcp, const int len, const kernel_ulong_t addr, + kernel_ulong_t data_size) { -#if SUPPORTED_PERSONALITIES > 1 +#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG union { struct { uint32_t base; uint32_t len; } *iov32; struct { uint64_t base; uint64_t len; } *iov64; @@ -873,7 +959,7 @@ dumpiov_upto(struct tcb *tcp, int len, long addr, unsigned long data_size) #else struct iovec *iov; #define sizeof_iov sizeof(*iov) -#define iov_iov_base(i) iov[i].iov_base +#define iov_iov_base(i) ptr_to_kulong(iov[i].iov_base) #define iov_iov_len(i) iov[i].iov_len #endif int i; @@ -888,7 +974,7 @@ dumpiov_upto(struct tcb *tcp, int len, long addr, unsigned long data_size) } if (umoven(tcp, addr, size, iov) >= 0) { for (i = 0; i < len; i++) { - unsigned long iov_len = iov_iov_len(i); + kernel_ulong_t iov_len = iov_iov_len(i); if (iov_len > data_size) iov_len = data_size; if (!iov_len) @@ -896,8 +982,8 @@ dumpiov_upto(struct tcb *tcp, int len, long addr, unsigned long data_size) data_size -= iov_len; /* include the buffer number to make it easy to * match up the trace with the source */ - tprintf(" * %lu bytes in buffer %d\n", iov_len, i); - dumpstr(tcp, (long) iov_iov_base(i), iov_len); + tprintf(" * %" PRI_klu " bytes in buffer %d\n", iov_len, i); + dumpstr(tcp, iov_iov_base(i), iov_len); } } free(iov); @@ -908,7 +994,7 @@ dumpiov_upto(struct tcb *tcp, int len, long addr, unsigned long data_size) } void -dumpstr(struct tcb *tcp, long addr, int len) +dumpstr(struct tcb *const tcp, const kernel_ulong_t addr, const int len) { static int strsize = -1; static unsigned char *str; @@ -979,27 +1065,13 @@ dumpstr(struct tcb *tcp, long addr, int len) } } -#ifdef HAVE_PROCESS_VM_READV -/* C library supports this, but the kernel might not. */ static bool process_vm_readv_not_supported = 0; -#else - -/* Need to do this since process_vm_readv() is not yet available in libc. +#ifndef HAVE_PROCESS_VM_READV +/* + * Need to do this since process_vm_readv() is not yet available in libc. * When libc is be updated, only "static bool process_vm_readv_not_supported" * line should remain. */ -#if !defined(__NR_process_vm_readv) -# if defined(I386) -# define __NR_process_vm_readv 347 -# elif defined(X86_64) -# define __NR_process_vm_readv 310 -# elif defined(POWERPC) -# define __NR_process_vm_readv 351 -# endif -#endif - -#if defined(__NR_process_vm_readv) -static bool process_vm_readv_not_supported = 0; /* Have to avoid duplicating with the C library headers. */ static ssize_t strace_process_vm_readv(pid_t pid, const struct iovec *lvec, @@ -1010,23 +1082,26 @@ static ssize_t strace_process_vm_readv(pid_t pid, { return syscall(__NR_process_vm_readv, (long)pid, lvec, liovcnt, rvec, riovcnt, flags); } -#define process_vm_readv strace_process_vm_readv -#else -static bool process_vm_readv_not_supported = 1; -# define process_vm_readv(...) (errno = ENOSYS, -1) -#endif - -#endif /* end of hack */ +# define process_vm_readv strace_process_vm_readv +#endif /* !HAVE_PROCESS_VM_READV */ static ssize_t -vm_read_mem(pid_t pid, void *laddr, long raddr, size_t len) +vm_read_mem(const pid_t pid, void *const laddr, + const kernel_ulong_t raddr, const size_t len) { + const unsigned long truncated_raddr = raddr; + + if (raddr != (kernel_ulong_t) truncated_raddr) { + errno = EIO; + return -1; + } + const struct iovec local = { .iov_base = laddr, .iov_len = len }; const struct iovec remote = { - .iov_base = (void *) raddr, + .iov_base = (void *) truncated_raddr, .iov_len = len }; @@ -1038,7 +1113,8 @@ vm_read_mem(pid_t pid, void *laddr, long raddr, size_t len) * at address `addr' to our space at `our_addr' */ int -umoven(struct tcb *tcp, long addr, unsigned int len, void *our_addr) +umoven(struct tcb *const tcp, kernel_ulong_t addr, unsigned int len, + void *const our_addr) { char *laddr = our_addr; int pid = tcp->pid; @@ -1048,9 +1124,11 @@ umoven(struct tcb *tcp, long addr, unsigned int len, void *our_addr) char x[sizeof(long)]; } u; -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 - if (current_wordsize < sizeof(addr)) - addr &= (1ul << 8 * current_wordsize) - 1; +#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG + if (current_wordsize < sizeof(addr) + && (addr & (~ (kernel_ulong_t) -1U))) { + return -1; + } #endif if (!process_vm_readv_not_supported) { @@ -1058,7 +1136,7 @@ umoven(struct tcb *tcp, long addr, unsigned int len, void *our_addr) if ((unsigned int) r == len) return 0; if (r >= 0) { - error_msg("umoven: short read (%u < %u) @0x%lx", + error_msg("umoven: short read (%u < %u) @0x%" PRI_klx, (unsigned int) r, len, addr); return -1; } @@ -1088,7 +1166,7 @@ umoven(struct tcb *tcp, long addr, unsigned int len, void *our_addr) n = addr & (sizeof(long) - 1); /* residue */ addr &= -sizeof(long); /* aligned address */ errno = 0; - u.val = ptrace(PTRACE_PEEKDATA, pid, (void *) addr, 0); + u.val = ptrace(PTRACE_PEEKDATA, pid, addr, 0); switch (errno) { case 0: break; @@ -1100,7 +1178,7 @@ umoven(struct tcb *tcp, long addr, unsigned int len, void *our_addr) return -1; default: /* all the rest is strange and should be reported */ - perror_msg("umoven: PTRACE_PEEKDATA pid:%d @0x%lx", + perror_msg("umoven: PTRACE_PEEKDATA pid:%d @0x%" PRI_klx, pid, addr); return -1; } @@ -1113,7 +1191,7 @@ umoven(struct tcb *tcp, long addr, unsigned int len, void *our_addr) } while (len) { errno = 0; - u.val = ptrace(PTRACE_PEEKDATA, pid, (void *) addr, 0); + u.val = ptrace(PTRACE_PEEKDATA, pid, addr, 0); switch (errno) { case 0: break; @@ -1123,13 +1201,13 @@ umoven(struct tcb *tcp, long addr, unsigned int len, void *our_addr) case EFAULT: case EIO: case EPERM: /* address space is inaccessible */ if (nread) { - perror_msg("umoven: short read (%u < %u) @0x%lx", + perror_msg("umoven: short read (%u < %u) @0x%" PRI_klx, nread, nread + len, addr - nread); } return -1; default: /* all the rest is strange and should be reported */ - perror_msg("umoven: PTRACE_PEEKDATA pid:%d @0x%lx", + perror_msg("umoven: PTRACE_PEEKDATA pid:%d @0x%" PRI_klx, pid, addr); return -1; } @@ -1145,8 +1223,8 @@ umoven(struct tcb *tcp, long addr, unsigned int len, void *our_addr) } int -umoven_or_printaddr(struct tcb *tcp, const long addr, const unsigned int len, - void *our_addr) +umoven_or_printaddr(struct tcb *const tcp, const kernel_ulong_t addr, + const unsigned int len, void *const our_addr) { if (!addr || !verbose(tcp) || (exiting(tcp) && syserror(tcp)) || umoven(tcp, addr, len, our_addr) < 0) { @@ -1156,6 +1234,19 @@ umoven_or_printaddr(struct tcb *tcp, const long addr, const unsigned int len, return 0; } +int +umoven_or_printaddr_ignore_syserror(struct tcb *const tcp, + const kernel_ulong_t addr, + const unsigned int len, + void *const our_addr) +{ + if (!addr || !verbose(tcp) || umoven(tcp, addr, len, our_addr) < 0) { + printaddr(addr); + return -1; + } + return 0; +} + /* * Like `umove' but make the additional effort of looking * for a terminating zero byte. @@ -1169,17 +1260,10 @@ umoven_or_printaddr(struct tcb *tcp, const long addr, const unsigned int len, * we never write past laddr[len-1]). */ int -umovestr(struct tcb *tcp, long addr, unsigned int len, char *laddr) +umovestr(struct tcb *const tcp, kernel_ulong_t addr, unsigned int len, char *laddr) { -#if SIZEOF_LONG == 4 - const unsigned long x01010101 = 0x01010101ul; - const unsigned long x80808080 = 0x80808080ul; -#elif SIZEOF_LONG == 8 - const unsigned long x01010101 = 0x0101010101010101ul; - const unsigned long x80808080 = 0x8080808080808080ul; -#else -# error SIZEOF_LONG > 8 -#endif + const unsigned long x01010101 = (unsigned long) 0x0101010101010101ULL; + const unsigned long x80808080 = (unsigned long) 0x8080808080808080ULL; int pid = tcp->pid; unsigned int n, m, nread; @@ -1188,9 +1272,11 @@ umovestr(struct tcb *tcp, long addr, unsigned int len, char *laddr) char x[sizeof(long)]; } u; -#if SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4 - if (current_wordsize < sizeof(addr)) - addr &= (1ul << 8 * current_wordsize) - 1; +#if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG + if (current_wordsize < sizeof(addr) + && (addr & (~ (kernel_ulong_t) -1U))) { + return -1; + } #endif nread = 0; @@ -1237,7 +1323,7 @@ umovestr(struct tcb *tcp, long addr, unsigned int len, char *laddr) case EFAULT: case EIO: /* address space is inaccessible */ if (nread) { - perror_msg("umovestr: short read (%d < %d) @0x%lx", + perror_msg("umovestr: short read (%d < %d) @0x%" PRI_klx, nread, nread + len, addr - nread); } return -1; @@ -1256,7 +1342,7 @@ umovestr(struct tcb *tcp, long addr, unsigned int len, char *laddr) n = addr & (sizeof(long) - 1); /* residue */ addr &= -sizeof(long); /* aligned address */ errno = 0; - u.val = ptrace(PTRACE_PEEKDATA, pid, (void *) addr, 0); + u.val = ptrace(PTRACE_PEEKDATA, pid, addr, 0); switch (errno) { case 0: break; @@ -1268,7 +1354,7 @@ umovestr(struct tcb *tcp, long addr, unsigned int len, char *laddr) return -1; default: /* all the rest is strange and should be reported */ - perror_msg("umovestr: PTRACE_PEEKDATA pid:%d @0x%lx", + perror_msg("umovestr: PTRACE_PEEKDATA pid:%d @0x%" PRI_klx, pid, addr); return -1; } @@ -1285,7 +1371,7 @@ umovestr(struct tcb *tcp, long addr, unsigned int len, char *laddr) while (len) { errno = 0; - u.val = ptrace(PTRACE_PEEKDATA, pid, (void *) addr, 0); + u.val = ptrace(PTRACE_PEEKDATA, pid, addr, 0); switch (errno) { case 0: break; @@ -1295,13 +1381,13 @@ umovestr(struct tcb *tcp, long addr, unsigned int len, char *laddr) case EFAULT: case EIO: case EPERM: /* address space is inaccessible */ if (nread) { - perror_msg("umovestr: short read (%d < %d) @0x%lx", + perror_msg("umovestr: short read (%d < %d) @0x%" PRI_klx, nread, nread + len, addr - nread); } return -1; default: /* all the rest is strange and should be reported */ - perror_msg("umovestr: PTRACE_PEEKDATA pid:%d @0x%lx", + perror_msg("umovestr: PTRACE_PEEKDATA pid:%d @0x%" PRI_klx, pid, addr); return -1; } @@ -1353,13 +1439,13 @@ umovestr(struct tcb *tcp, long addr, unsigned int len, char *laddr) * - umoven_func has not returned false. */ bool -print_array(struct tcb *tcp, - const unsigned long start_addr, +print_array(struct tcb *const tcp, + const kernel_ulong_t start_addr, const size_t nmemb, void *const elem_buf, const size_t elem_size, int (*const umoven_func)(struct tcb *, - long, + kernel_ulong_t, unsigned int, void *), bool (*const print_func)(struct tcb *, @@ -1379,17 +1465,17 @@ print_array(struct tcb *tcp, } const size_t size = nmemb * elem_size; - const unsigned long end_addr = start_addr + size; + const kernel_ulong_t end_addr = start_addr + size; if (end_addr <= start_addr || size / elem_size != nmemb) { printaddr(start_addr); return false; } - const unsigned long abbrev_end = + const kernel_ulong_t abbrev_end = (abbrev(tcp) && max_strlen < nmemb) ? start_addr + elem_size * max_strlen : end_addr; - unsigned long cur; + kernel_ulong_t cur; for (cur = start_addr; cur < end_addr; cur += elem_size) { if (cur != start_addr) @@ -1418,46 +1504,14 @@ print_array(struct tcb *tcp, return cur >= end_addr; } -long long -getarg_ll(struct tcb *tcp, int argn) -{ -#if HAVE_STRUCT_TCB_EXT_ARG -# if SUPPORTED_PERSONALITIES > 1 - if (current_personality == 1) - return (long) tcp->u_arg[argn]; - else -# endif - return (long long) tcp->ext_arg[argn]; -#else - return (long) tcp->u_arg[argn]; -#endif -} - -unsigned long long -getarg_ull(struct tcb *tcp, int argn) -{ -#if HAVE_STRUCT_TCB_EXT_ARG -# if SUPPORTED_PERSONALITIES > 1 - if (current_personality == 1) - return (unsigned long) tcp->u_arg[argn]; - else -# endif - return (unsigned long long) tcp->ext_arg[argn]; -#else - return (unsigned long) tcp->u_arg[argn]; -#endif -} - int printargs(struct tcb *tcp) { - if (entering(tcp)) { - int i; - int n = tcp->s_ent->nargs; - for (i = 0; i < n; i++) - tprintf("%s%#llx", i ? ", " : "", getarg_ull(tcp, i)); - } - return 0; + const int n = tcp->s_ent->nargs; + int i; + for (i = 0; i < n; ++i) + tprintf("%s%#" PRI_klx, i ? ", " : "", tcp->u_arg[i]); + return RVAL_DECODED; } int diff --git a/utime.c b/utime.c index 4f8f40a1e..8126b350f 100644 --- a/utime.c +++ b/utime.c @@ -15,8 +15,8 @@ SYS_FUNC(utime) printpath(tcp, tcp->u_arg[0]); tprints(", "); if (!umove_or_printaddr(tcp, tcp->u_arg[1], &u)) { - tprintf("[%s,", sprinttime(u.actime)); - tprintf(" %s]", sprinttime(u.modtime)); + tprintf("{actime=%s,", sprinttime(u.actime)); + tprintf(" modtime=%s}", sprinttime(u.modtime)); } return RVAL_DECODED; diff --git a/v4l2.c b/v4l2.c index 237766e2f..637e8788a 100644 --- a/v4l2.c +++ b/v4l2.c @@ -133,7 +133,7 @@ print_pixelformat(uint32_t fourcc) #include "xlat/v4l2_device_capabilities_flags.h" static int -print_v4l2_capability(struct tcb *tcp, const long arg) +print_v4l2_capability(struct tcb *const tcp, const kernel_ulong_t arg) { struct v4l2_capability caps; @@ -170,7 +170,7 @@ print_v4l2_capability(struct tcb *tcp, const long arg) #include "xlat/v4l2_format_description_flags.h" static int -print_v4l2_fmtdesc(struct tcb *tcp, const long arg) +print_v4l2_fmtdesc(struct tcb *const tcp, const kernel_ulong_t arg) { struct v4l2_fmtdesc f; @@ -283,7 +283,8 @@ print_v4l2_format_fmt(const char *prefix, const struct_v4l2_format *f) } static int -print_v4l2_format(struct tcb *tcp, const long arg, const bool is_get) +print_v4l2_format(struct tcb *const tcp, const kernel_ulong_t arg, + const bool is_get) { struct_v4l2_format f; @@ -309,7 +310,7 @@ print_v4l2_format(struct tcb *tcp, const long arg, const bool is_get) #include "xlat/v4l2_memories.h" static int -print_v4l2_requestbuffers(struct tcb *tcp, const long arg) +print_v4l2_requestbuffers(struct tcb *const tcp, const kernel_ulong_t arg) { struct v4l2_requestbuffers reqbufs; @@ -337,7 +338,8 @@ print_v4l2_requestbuffers(struct tcb *tcp, const long arg) #include "xlat/v4l2_buf_flags.h" static int -print_v4l2_buffer(struct tcb *tcp, const unsigned int code, const long arg) +print_v4l2_buffer(struct tcb *const tcp, const unsigned int code, + const kernel_ulong_t arg) { struct_v4l2_buffer b; @@ -360,16 +362,16 @@ print_v4l2_buffer(struct tcb *tcp, const unsigned int code, const long arg) tprintf(", m.offset=%#x", b.m.offset); } else if (b.memory == V4L2_MEMORY_USERPTR) { tprints(", m.userptr="); - printaddr((unsigned long) b.m.userptr); + printaddr(b.m.userptr); } tprintf(", length=%u, bytesused=%u, flags=", b.length, b.bytesused); printflags(v4l2_buf_flags, b.flags, "V4L2_BUF_FLAG_???"); - if (code == VIDIOC_DQBUF) - tprintf(", timestamp = {%ju.%06ju}", - (uintmax_t)b.timestamp.tv_sec, - (uintmax_t)b.timestamp.tv_usec); + if (code == VIDIOC_DQBUF) { + tprints(", timestamp = "); + MPERS_FUNC_NAME(print_struct_timeval)(&b.timestamp); + } tprints(", ..."); } tprints("}"); @@ -378,7 +380,7 @@ print_v4l2_buffer(struct tcb *tcp, const unsigned int code, const long arg) } static int -print_v4l2_framebuffer(struct tcb *tcp, const long arg) +print_v4l2_framebuffer(struct tcb *const tcp, const kernel_ulong_t arg) { struct_v4l2_framebuffer b; @@ -386,7 +388,7 @@ print_v4l2_framebuffer(struct tcb *tcp, const long arg) if (!umove_or_printaddr(tcp, arg, &b)) { tprintf("{capability=%#x, flags=%#x, base=", b.capability, b.flags); - printaddr((unsigned long) b.base); + printaddr(ptr_to_kulong(b.base)); tprints("}"); } @@ -394,7 +396,7 @@ print_v4l2_framebuffer(struct tcb *tcp, const long arg) } static int -print_v4l2_buf_type(struct tcb *tcp, const long arg) +print_v4l2_buf_type(struct tcb *const tcp, const kernel_ulong_t arg) { int type; @@ -411,7 +413,8 @@ print_v4l2_buf_type(struct tcb *tcp, const long arg) #include "xlat/v4l2_capture_modes.h" static int -print_v4l2_streamparm(struct tcb *tcp, const long arg, const bool is_get) +print_v4l2_streamparm(struct tcb *const tcp, const kernel_ulong_t arg, + const bool is_get) { struct v4l2_streamparm s; @@ -475,7 +478,7 @@ print_v4l2_streamparm(struct tcb *tcp, const long arg, const bool is_get) } static int -print_v4l2_standard(struct tcb *tcp, const long arg) +print_v4l2_standard(struct tcb *const tcp, const kernel_ulong_t arg) { struct_v4l2_standard s; @@ -502,7 +505,7 @@ print_v4l2_standard(struct tcb *tcp, const long arg) #include "xlat/v4l2_input_types.h" static int -print_v4l2_input(struct tcb *tcp, const long arg) +print_v4l2_input(struct tcb *const tcp, const kernel_ulong_t arg) { struct_v4l2_input i; @@ -529,7 +532,8 @@ print_v4l2_input(struct tcb *tcp, const long arg) #include "xlat/v4l2_control_ids.h" static int -print_v4l2_control(struct tcb *tcp, const long arg, const bool is_get) +print_v4l2_control(struct tcb *const tcp, const kernel_ulong_t arg, + const bool is_get) { struct v4l2_control c; @@ -557,7 +561,7 @@ print_v4l2_control(struct tcb *tcp, const long arg, const bool is_get) #include "xlat/v4l2_control_flags.h" static int -print_v4l2_queryctrl(struct tcb *tcp, const long arg) +print_v4l2_queryctrl(struct tcb *const tcp, const kernel_ulong_t arg) { struct v4l2_queryctrl c; @@ -604,7 +608,7 @@ print_v4l2_queryctrl(struct tcb *tcp, const long arg) } static int -print_v4l2_cropcap(struct tcb *tcp, const long arg) +print_v4l2_cropcap(struct tcb *const tcp, const kernel_ulong_t arg) { struct v4l2_cropcap c; @@ -629,7 +633,8 @@ print_v4l2_cropcap(struct tcb *tcp, const long arg) } static int -print_v4l2_crop(struct tcb *tcp, const long arg, const bool is_get) +print_v4l2_crop(struct tcb *const tcp, const kernel_ulong_t arg, + const bool is_get) { struct v4l2_crop c; @@ -663,11 +668,10 @@ print_v4l2_ext_control(struct tcb *tcp, void *elem_buf, size_t elem_size, void * tprintf(", size=%u", p->size); if (p->size > 0) { tprints(", string="); - printstr(tcp, (long) p->string, p->size); + printstrn(tcp, ptr_to_kulong(p->string), p->size); } else # endif - tprintf(", value=%d, value64=%lld", p->value, - (long long) p->value64); + tprintf(", value=%d, value64=%" PRId64, p->value, (int64_t) p->value64); tprints("}"); return true; @@ -676,18 +680,8 @@ print_v4l2_ext_control(struct tcb *tcp, void *elem_buf, size_t elem_size, void * #include "xlat/v4l2_control_classes.h" static int -umoven_or_printaddr_ignore_syserror(struct tcb *tcp, const long addr, - const unsigned int len, void *our_addr) -{ - if (!addr || umoven(tcp, addr, len, our_addr) < 0) { - printaddr(addr); - return -1; - } - return 0; -} - -static int -print_v4l2_ext_controls(struct tcb *tcp, const long arg, const bool is_get) +print_v4l2_ext_controls(struct tcb *const tcp, const kernel_ulong_t arg, + const bool is_get) { struct_v4l2_ext_controls c; @@ -716,7 +710,7 @@ print_v4l2_ext_controls(struct tcb *tcp, const long arg, const bool is_get) tprints("controls="); struct_v4l2_ext_control ctrl; - bool fail = !print_array(tcp, (unsigned long) c.controls, c.count, + bool fail = !print_array(tcp, ptr_to_kulong(c.controls), c.count, &ctrl, sizeof(ctrl), umoven_or_printaddr_ignore_syserror, print_v4l2_ext_control, 0); @@ -736,7 +730,7 @@ print_v4l2_ext_controls(struct tcb *tcp, const long arg, const bool is_get) # include "xlat/v4l2_framesize_types.h" static int -print_v4l2_frmsizeenum(struct tcb *tcp, const long arg) +print_v4l2_frmsizeenum(struct tcb *const tcp, const kernel_ulong_t arg) { struct v4l2_frmsizeenum s; @@ -776,7 +770,7 @@ print_v4l2_frmsizeenum(struct tcb *tcp, const long arg) # include "xlat/v4l2_frameinterval_types.h" static int -print_v4l2_frmivalenum(struct tcb *tcp, const long arg) +print_v4l2_frmivalenum(struct tcb *const tcp, const kernel_ulong_t arg) { struct v4l2_frmivalenum f; @@ -815,7 +809,7 @@ print_v4l2_frmivalenum(struct tcb *tcp, const long arg) #ifdef VIDIOC_CREATE_BUFS static int -print_v4l2_create_buffers(struct tcb *tcp, const long arg) +print_v4l2_create_buffers(struct tcb *const tcp, const kernel_ulong_t arg) { struct_v4l2_create_buffers b; @@ -845,8 +839,8 @@ print_v4l2_create_buffers(struct tcb *tcp, const long arg) } #endif /* VIDIOC_CREATE_BUFS */ -MPERS_PRINTER_DECL(int, v4l2_ioctl, - struct tcb *tcp, const unsigned int code, const long arg) +MPERS_PRINTER_DECL(int, v4l2_ioctl, struct tcb *const tcp, + const unsigned int code, const kernel_ulong_t arg) { if (!verbose(tcp)) return RVAL_DECODED; diff --git a/vsprintf.c b/vsprintf.c deleted file mode 100644 index aae40db30..000000000 --- a/vsprintf.c +++ /dev/null @@ -1,788 +0,0 @@ -/* - * Taken from Linux kernel's linux/lib/vsprintf.c - * and somewhat simplified. - * - * Copyright (C) 1991, 1992 Linus Torvalds - */ -/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */ -/* - * Wirzenius wrote this portably, Torvalds fucked it up :-) - */ - -#include "defs.h" - -#if USE_CUSTOM_PRINTF - -#include -#include - -#ifndef HAVE_FPUTS_UNLOCKED -# define fputs_unlocked fputs -#endif - -#define noinline_for_stack /*nothing*/ -#define likely(expr) (expr) -#define unlikely(expr) (expr) - -#define do_div(n, d) ({ __typeof(num) t = n % d; n /= d; t; }) - -#undef isdigit -#define isdigit(a) ((unsigned char)((a) - '0') <= 9) - -static inline -int skip_atoi(const char **s) -{ - int i = 0; - const char *p = *s; - - while (isdigit(*p)) - i = i*10 + *p++ - '0'; - - *s = p; - return i; -} - -/* Decimal conversion is by far the most typical, and is used - * for /proc and /sys data. This directly impacts e.g. top performance - * with many processes running. We optimize it for speed - * using ideas described at - * (with permission from the author, Douglas W. Jones). - */ - -#if LONG_MAX != 0x7fffffffUL || LLONG_MAX != 0x7fffffffffffffffULL -/* Formats correctly any integer in [0, 999999999] */ -static noinline_for_stack -char *put_dec_full9(char *buf, unsigned q) -{ - unsigned r; - - /* Possible ways to approx. divide by 10 - * (x * 0x1999999a) >> 32 x < 1073741829 (multiply must be 64-bit) - * (x * 0xcccd) >> 19 x < 81920 (x < 262149 when 64-bit mul) - * (x * 0x6667) >> 18 x < 43699 - * (x * 0x3334) >> 17 x < 16389 - * (x * 0x199a) >> 16 x < 16389 - * (x * 0x0ccd) >> 15 x < 16389 - * (x * 0x0667) >> 14 x < 2739 - * (x * 0x0334) >> 13 x < 1029 - * (x * 0x019a) >> 12 x < 1029 - * (x * 0x00cd) >> 11 x < 1029 shorter code than * 0x67 (on i386) - * (x * 0x0067) >> 10 x < 179 - * (x * 0x0034) >> 9 x < 69 same - * (x * 0x001a) >> 8 x < 69 same - * (x * 0x000d) >> 7 x < 69 same, shortest code (on i386) - * (x * 0x0007) >> 6 x < 19 - * See - */ - r = (q * (uint64_t)0x1999999a) >> 32; - *buf++ = (q - 10 * r) + '0'; /* 1 */ - q = (r * (uint64_t)0x1999999a) >> 32; - *buf++ = (r - 10 * q) + '0'; /* 2 */ - r = (q * (uint64_t)0x1999999a) >> 32; - *buf++ = (q - 10 * r) + '0'; /* 3 */ - q = (r * (uint64_t)0x1999999a) >> 32; - *buf++ = (r - 10 * q) + '0'; /* 4 */ - r = (q * (uint64_t)0x1999999a) >> 32; - *buf++ = (q - 10 * r) + '0'; /* 5 */ - /* Now value is under 10000, can avoid 64-bit multiply */ - q = (r * 0x199a) >> 16; - *buf++ = (r - 10 * q) + '0'; /* 6 */ - r = (q * 0xcd) >> 11; - *buf++ = (q - 10 * r) + '0'; /* 7 */ - q = (r * 0xcd) >> 11; - *buf++ = (r - 10 * q) + '0'; /* 8 */ - *buf++ = q + '0'; /* 9 */ - return buf; -} -#endif - -/* Similar to above but do not pad with zeros. - * Code can be easily arranged to print 9 digits too, but our callers - * always call put_dec_full9() instead when the number has 9 decimal digits. - */ -static noinline_for_stack -char *put_dec_trunc8(char *buf, unsigned r) -{ - unsigned q; - - /* Copy of previous function's body with added early returns */ - q = (r * (uint64_t)0x1999999a) >> 32; - *buf++ = (r - 10 * q) + '0'; /* 2 */ - if (q == 0) return buf; - r = (q * (uint64_t)0x1999999a) >> 32; - *buf++ = (q - 10 * r) + '0'; /* 3 */ - if (r == 0) return buf; - q = (r * (uint64_t)0x1999999a) >> 32; - *buf++ = (r - 10 * q) + '0'; /* 4 */ - if (q == 0) return buf; - r = (q * (uint64_t)0x1999999a) >> 32; - *buf++ = (q - 10 * r) + '0'; /* 5 */ - if (r == 0) return buf; - q = (r * 0x199a) >> 16; - *buf++ = (r - 10 * q) + '0'; /* 6 */ - if (q == 0) return buf; - r = (q * 0xcd) >> 11; - *buf++ = (q - 10 * r) + '0'; /* 7 */ - if (r == 0) return buf; - q = (r * 0xcd) >> 11; - *buf++ = (r - 10 * q) + '0'; /* 8 */ - if (q == 0) return buf; - *buf++ = q + '0'; /* 9 */ - return buf; -} - -/* There are two algorithms to print larger numbers. - * One is generic: divide by 1000000000 and repeatedly print - * groups of (up to) 9 digits. It's conceptually simple, - * but requires a (unsigned long long) / 1000000000 division. - * - * Second algorithm splits 64-bit unsigned long long into 16-bit chunks, - * manipulates them cleverly and generates groups of 4 decimal digits. - * It so happens that it does NOT require long long division. - * - * If long is > 32 bits, division of 64-bit values is relatively easy, - * and we will use the first algorithm. - * If long long is > 64 bits (strange architecture with VERY large long long), - * second algorithm can't be used, and we again use the first one. - * - * Else (if long is 32 bits and long long is 64 bits) we use second one. - */ - -#if LONG_MAX != 0x7fffffffUL || LLONG_MAX != 0x7fffffffffffffffULL - -/* First algorithm: generic */ - -static -char *put_dec(char *buf, unsigned long long n) -{ - if (n >= 100*1000*1000) { - while (n >= 1000*1000*1000) - buf = put_dec_full9(buf, do_div(n, 1000*1000*1000)); - if (n >= 100*1000*1000) - return put_dec_full9(buf, n); - } - return put_dec_trunc8(buf, n); -} - -#else - -/* Second algorithm: valid only for 64-bit long longs */ - -static noinline_for_stack -char *put_dec_full4(char *buf, unsigned q) -{ - unsigned r; - r = (q * 0xcccd) >> 19; - *buf++ = (q - 10 * r) + '0'; - q = (r * 0x199a) >> 16; - *buf++ = (r - 10 * q) + '0'; - r = (q * 0xcd) >> 11; - *buf++ = (q - 10 * r) + '0'; - *buf++ = r + '0'; - return buf; -} - -/* Based on code by Douglas W. Jones found at - * - * (with permission from the author). - * Performs no 64-bit division and hence should be fast on 32-bit machines. - */ -static -char *put_dec(char *buf, unsigned long long n) -{ - uint32_t d3, d2, d1, q, h; - - if (n < 100*1000*1000) - return put_dec_trunc8(buf, n); - - d1 = ((uint32_t)n >> 16); /* implicit "& 0xffff" */ - h = (n >> 32); - d2 = (h ) & 0xffff; - d3 = (h >> 16); /* implicit "& 0xffff" */ - - q = 656 * d3 + 7296 * d2 + 5536 * d1 + ((uint32_t)n & 0xffff); - - buf = put_dec_full4(buf, q % 10000); - q = q / 10000; - - d1 = q + 7671 * d3 + 9496 * d2 + 6 * d1; - buf = put_dec_full4(buf, d1 % 10000); - q = d1 / 10000; - - d2 = q + 4749 * d3 + 42 * d2; - buf = put_dec_full4(buf, d2 % 10000); - q = d2 / 10000; - - d3 = q + 281 * d3; - if (!d3) - goto done; - buf = put_dec_full4(buf, d3 % 10000); - q = d3 / 10000; - if (!q) - goto done; - buf = put_dec_full4(buf, q); - done: - while (buf[-1] == '0') - --buf; - - return buf; -} - -#endif - -/* - * For strace, the following formats are not supported: - * %h[h]u, %zu, %tu - use [unsigned] int/long/long long fmt instead - * %8.4u - no precision field for integers allowed (ok for strings) - * %+d, % d - no forced sign or force "space positive" sign - * %-07u - use %-7u instead - * %X - works as %x - */ - -#define ZEROPAD 1 /* pad with zero */ -#define SIGN 2 /* unsigned/signed long */ -//#define PLUS 4 /* show plus */ -//#define SPACE 8 /* space if plus */ -#define LEFT 16 /* left justified */ -//#deefine SMALL 32 /* use lowercase in hex (must be 32 == 0x20) */ -#define SPECIAL 64 /* prefix hex with "0x", octal with "0" */ - -enum format_type { - FORMAT_TYPE_NONE, /* Just a string part */ - FORMAT_TYPE_WIDTH, - FORMAT_TYPE_PRECISION, - FORMAT_TYPE_CHAR, - FORMAT_TYPE_STR, - FORMAT_TYPE_PTR, - FORMAT_TYPE_PERCENT_CHAR, - FORMAT_TYPE_INVALID, - FORMAT_TYPE_LONG_LONG, - FORMAT_TYPE_ULONG, - FORMAT_TYPE_LONG, - FORMAT_TYPE_UINT, - FORMAT_TYPE_INT, -}; - -struct printf_spec { - uint8_t type; /* format_type enum */ - uint8_t flags; /* flags to number() */ - uint8_t base; /* number base, 8, 10 or 16 only */ - uint8_t qualifier; /* number qualifier, one of 'hHlLtzZ' */ - int field_width; /* width of output field */ - int precision; /* # of digits/chars */ -}; - -static noinline_for_stack -char *number(char *buf, char *end, unsigned long long num, - struct printf_spec spec) -{ - /* we are called with base 8, 10 or 16, only, thus don't need "G..." */ - static const char digits[16] = "0123456789abcdef"; /* "GHIJKLMNOPQRSTUVWXYZ"; */ - - char tmp[sizeof(long long)*3 + 4]; - char sign; - int need_pfx = ((spec.flags & SPECIAL) && spec.base != 10); - int i; - - /* We may overflow the buf. Crudely check for it */ - i = sizeof(long long)*3 + 4; - if (i < spec.field_width) - i = spec.field_width; - if ((end - buf) <= i) - return buf + i; - -//we don't use formats like "%-07u" -// if (spec.flags & LEFT) -// spec.flags &= ~ZEROPAD; - sign = 0; - if (spec.flags & SIGN) { - if ((signed long long)num < 0) { - sign = '-'; - num = -(signed long long)num; - spec.field_width--; -// } else if (spec.flags & PLUS) { -// sign = '+'; -// spec.field_width--; -// } else if (spec.flags & SPACE) { -// sign = ' '; -// spec.field_width--; - } - } - if (need_pfx) { - spec.field_width--; - if (spec.base == 16) - spec.field_width--; - } - - /* generate full string in tmp[], in reverse order */ - i = 0; - if (num < spec.base) - tmp[i++] = digits[num]; - /* Generic code, for any base: - else do { - tmp[i++] = (digits[do_div(num,base)]); - } while (num != 0); - */ - else if (spec.base != 10) { /* 8 or 16 */ - int mask = spec.base - 1; - int shift = 3; - - if (spec.base == 16) - shift = 4; - do { - tmp[i++] = digits[((unsigned char)num) & mask]; - num >>= shift; - } while (num); - } else { /* base 10 */ - i = put_dec(tmp, num) - tmp; - } - -//spec.precision is assumed 0 ("not specified") -// /* printing 100 using %2d gives "100", not "00" */ -// if (i > spec.precision) -// spec.precision = i; -// /* leading space padding */ -// spec.field_width -= spec.precision; - spec.field_width -= i; - if (!(spec.flags & (ZEROPAD+LEFT))) { - while (--spec.field_width >= 0) { - ///if (buf < end) - *buf = ' '; - ++buf; - } - } - /* sign */ - if (sign) { - ///if (buf < end) - *buf = sign; - ++buf; - } - /* "0x" / "0" prefix */ - if (need_pfx) { - ///if (buf < end) - *buf = '0'; - ++buf; - if (spec.base == 16) { - ///if (buf < end) - *buf = 'x'; - ++buf; - } - } - /* zero or space padding */ - if (!(spec.flags & LEFT)) { - char c = (spec.flags & ZEROPAD) ? '0' : ' '; - while (--spec.field_width >= 0) { - ///if (buf < end) - *buf = c; - ++buf; - } - } -// /* hmm even more zero padding? */ -// while (i <= --spec.precision) { -// ///if (buf < end) -// *buf = '0'; -// ++buf; -// } - /* actual digits of result */ - while (--i >= 0) { - ///if (buf < end) - *buf = tmp[i]; - ++buf; - } - /* trailing space padding */ - while (--spec.field_width >= 0) { - ///if (buf < end) - *buf = ' '; - ++buf; - } - - return buf; -} - -static noinline_for_stack -char *string(char *buf, char *end, const char *s, struct printf_spec spec) -{ - int len, i; - - if (!s) - s = "(null)"; - - len = strnlen(s, spec.precision); - - /* We may overflow the buf. Crudely check for it */ - i = len; - if (i < spec.field_width) - i = spec.field_width; - if ((end - buf) <= i) - return buf + i; - - if (!(spec.flags & LEFT)) { - while (len < spec.field_width--) { - ///if (buf < end) - *buf = ' '; - ++buf; - } - } - for (i = 0; i < len; ++i) { - ///if (buf < end) - *buf = *s; - ++buf; ++s; - } - while (len < spec.field_width--) { - ///if (buf < end) - *buf = ' '; - ++buf; - } - - return buf; -} - -static noinline_for_stack -char *pointer(const char *fmt, char *buf, char *end, void *ptr, - struct printf_spec spec) -{ -// spec.flags |= SMALL; - if (spec.field_width == -1) { - spec.field_width = 2 * sizeof(void *); - spec.flags |= ZEROPAD; - } - spec.base = 16; - - return number(buf, end, (unsigned long) ptr, spec); -} - -/* - * Helper function to decode printf style format. - * Each call decode a token from the format and return the - * number of characters read (or likely the delta where it wants - * to go on the next call). - * The decoded token is returned through the parameters - * - * 'h', 'l', or 'L' for integer fields - * 'z' support added 23/7/1999 S.H. - * 'z' changed to 'Z' --davidm 1/25/99 - * 't' added for ptrdiff_t - * - * @fmt: the format string - * @type of the token returned - * @flags: various flags such as +, -, # tokens.. - * @field_width: overwritten width - * @base: base of the number (octal, hex, ...) - * @precision: precision of a number - * @qualifier: qualifier of a number (long, size_t, ...) - */ -static noinline_for_stack -int format_decode(const char *fmt, struct printf_spec *spec) -{ - const char *start = fmt; - - /* we finished early by reading the field width */ - if (spec->type == FORMAT_TYPE_WIDTH) { - if (spec->field_width < 0) { - spec->field_width = -spec->field_width; - spec->flags |= LEFT; - } - spec->type = FORMAT_TYPE_NONE; - goto precision; - } - - /* we finished early by reading the precision */ - if (spec->type == FORMAT_TYPE_PRECISION) { - if (spec->precision < 0) - spec->precision = 0; - - spec->type = FORMAT_TYPE_NONE; - goto qualifier; - } - - /* By default */ - spec->type = FORMAT_TYPE_NONE; - - for (;;) { - if (*fmt == '\0') - return fmt - start; - if (*fmt == '%') - break; - ++fmt; - } - - /* Return the current non-format string */ - if (fmt != start) - return fmt - start; - - /* Process flags */ - spec->flags = 0; - - while (1) { /* this also skips first '%' */ - bool found = true; - - ++fmt; - - switch (*fmt) { - case '-': spec->flags |= LEFT; break; -// case '+': spec->flags |= PLUS; break; -// case ' ': spec->flags |= SPACE; break; - case '#': spec->flags |= SPECIAL; break; - case '0': spec->flags |= ZEROPAD; break; - default: found = false; - } - - if (!found) - break; - } - - /* get field width */ - spec->field_width = -1; - - if (isdigit(*fmt)) - spec->field_width = skip_atoi(&fmt); - else if (*fmt == '*') { - /* it's the next argument */ - spec->type = FORMAT_TYPE_WIDTH; - return ++fmt - start; - } - -precision: - /* get the precision */ - spec->precision = -1; - if (*fmt == '.') { - ++fmt; - if (isdigit(*fmt)) { - spec->precision = skip_atoi(&fmt); -// if (spec->precision < 0) -// spec->precision = 0; - } else if (*fmt == '*') { - /* it's the next argument */ - spec->type = FORMAT_TYPE_PRECISION; - return ++fmt - start; - } - } - -qualifier: - /* get the conversion qualifier */ - spec->qualifier = -1; - if (*fmt == 'l') { - spec->qualifier = *fmt++; - if (unlikely(spec->qualifier == *fmt)) { - spec->qualifier = 'L'; - ++fmt; - } - } - - /* default base */ - spec->base = 10; - switch (*fmt) { - case 'c': - spec->type = FORMAT_TYPE_CHAR; - return ++fmt - start; - - case 's': - spec->type = FORMAT_TYPE_STR; - return ++fmt - start; - - case 'p': - spec->type = FORMAT_TYPE_PTR; - return ++fmt - start; - - case '%': - spec->type = FORMAT_TYPE_PERCENT_CHAR; - return ++fmt - start; - - /* integer number formats - set up the flags and "break" */ - case 'o': - spec->base = 8; - break; - - case 'x': -// spec->flags |= SMALL; - - case 'X': - spec->base = 16; - break; - - case 'd': - case 'i': - spec->flags |= SIGN; - case 'u': - break; - - default: - spec->type = FORMAT_TYPE_INVALID; - return fmt - start; - } - - if (spec->qualifier == 'L') - spec->type = FORMAT_TYPE_LONG_LONG; - else if (spec->qualifier == 'l') { - if (spec->flags & SIGN) - spec->type = FORMAT_TYPE_LONG; - else - spec->type = FORMAT_TYPE_ULONG; - } else { - if (spec->flags & SIGN) - spec->type = FORMAT_TYPE_INT; - else - spec->type = FORMAT_TYPE_UINT; - } - - return ++fmt - start; -} - -/** - * vsnprintf - Format a string and place it in a buffer - * @buf: The buffer to place the result into - * @size: The size of the buffer, including the trailing null space - * @fmt: The format string to use - * @args: Arguments for the format string - * - * The return value is the number of characters which would - * be generated for the given input, excluding the trailing - * '\0', as per ISO C99. If you want to have the exact - * number of characters written into @buf as return value - * (not including the trailing '\0'), use vscnprintf(). If the - * return is greater than or equal to @size, the resulting - * string is truncated. - * - * If you're not already dealing with a va_list consider using snprintf(). - */ -static -int kernel_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) -{ - unsigned long long num; - char *str, *end; - struct printf_spec spec = {0}; - - str = buf; - end = buf + size; - - while (*fmt) { - const char *old_fmt = fmt; - int read = format_decode(fmt, &spec); - - fmt += read; - - switch (spec.type) { - case FORMAT_TYPE_NONE: { - int copy = read; - if (str < end) { - if (copy > end - str) - copy = end - str; - memcpy(str, old_fmt, copy); - } - str += read; - break; - } - - case FORMAT_TYPE_WIDTH: - spec.field_width = va_arg(args, int); - break; - - case FORMAT_TYPE_PRECISION: - spec.precision = va_arg(args, int); - break; - - case FORMAT_TYPE_CHAR: { - char c; - - if (!(spec.flags & LEFT)) { - while (--spec.field_width > 0) { - if (str < end) - *str = ' '; - ++str; - - } - } - c = (unsigned char) va_arg(args, int); - if (str < end) - *str = c; - ++str; - while (--spec.field_width > 0) { - if (str < end) - *str = ' '; - ++str; - } - break; - } - - case FORMAT_TYPE_STR: - str = string(str, end, va_arg(args, char *), spec); - break; - - case FORMAT_TYPE_PTR: - str = pointer(fmt+1, str, end, va_arg(args, void *), - spec); -// while (isalnum(*fmt)) -// fmt++; - break; - - case FORMAT_TYPE_PERCENT_CHAR: - if (str < end) - *str = '%'; - ++str; - break; - - case FORMAT_TYPE_INVALID: - if (str < end) - *str = '%'; - ++str; - break; - - default: - switch (spec.type) { - case FORMAT_TYPE_LONG_LONG: - num = va_arg(args, long long); - break; - case FORMAT_TYPE_ULONG: - num = va_arg(args, unsigned long); - break; - case FORMAT_TYPE_LONG: - num = va_arg(args, long); - break; - case FORMAT_TYPE_INT: - num = (int) va_arg(args, int); - break; - default: - num = va_arg(args, unsigned int); - } - - str = number(str, end, num, spec); - } - } - -// if (size > 0) { - if (str < end) - *str = '\0'; -// else -// end[-1] = '\0'; -// } - - /* the trailing null byte doesn't count towards the total */ - return str-buf; - -} - -int strace_vfprintf(FILE *fp, const char *fmt, va_list args) -{ - static char *buf = NULL; - static unsigned buflen = 0; - - int r; - va_list a1; - - va_copy(a1, args); - unsigned len = kernel_vsnprintf(buf, buflen, fmt, a1); - va_end(a1); - - if (len >= buflen) { - buflen = len + 256; - free(buf); - buf = xmalloc(buflen); - /*len =*/ kernel_vsnprintf(buf, buflen, fmt, args); - } - - r = fputs_unlocked(buf, fp); - if (r < 0) return r; - return len; -} - -#endif /* USE_CUSTOM_PRINTF */ diff --git a/wait.c b/wait.c index 64bd3b7d3..58dba8e4a 100644 --- a/wait.c +++ b/wait.c @@ -117,7 +117,8 @@ printstatus(int status) } static int -printwaitn(struct tcb *tcp, void (*const print_rusage)(struct tcb *, long)) +printwaitn(struct tcb *const tcp, + void (*const print_rusage)(struct tcb *, kernel_ulong_t)) { if (entering(tcp)) { /* On Linux, kernel-side pid_t is typedef'ed to int diff --git a/xattr.c b/xattr.c index 30a8467ca..e7f550bff 100644 --- a/xattr.c +++ b/xattr.c @@ -40,32 +40,25 @@ #endif static void -print_xattr_val(struct tcb *tcp, - unsigned long addr, - unsigned long insize, - unsigned long size) +print_xattr_val(struct tcb *const tcp, + const kernel_ulong_t addr, + const kernel_ulong_t insize, + const kernel_ulong_t size) { - static char buf[XATTR_SIZE_MAX]; - tprints(", "); - if (!addr || size > sizeof(buf)) + if (size > XATTR_SIZE_MAX) printaddr(addr); - else if (!size || !umoven_or_printaddr(tcp, addr, size, buf)) { - /* Don't print terminating NUL if there is one. */ - if (size && buf[size - 1] == '\0') - --size; - - print_quoted_string(buf, size, 0); - } - tprintf(", %lu", insize); + else + printstr_ex(tcp, addr, size, QUOTE_OMIT_TRAILING_0); + tprintf(", %" PRI_klu, insize); } SYS_FUNC(setxattr) { printpath(tcp, tcp->u_arg[0]); tprints(", "); - printstr(tcp, tcp->u_arg[1], -1); + printstr(tcp, tcp->u_arg[1]); print_xattr_val(tcp, tcp->u_arg[2], tcp->u_arg[3], tcp->u_arg[3]); tprints(", "); printflags(xattrflags, tcp->u_arg[4], "XATTR_???"); @@ -76,7 +69,7 @@ SYS_FUNC(fsetxattr) { printfd(tcp, tcp->u_arg[0]); tprints(", "); - printstr(tcp, tcp->u_arg[1], -1); + printstr(tcp, tcp->u_arg[1]); print_xattr_val(tcp, tcp->u_arg[2], tcp->u_arg[3], tcp->u_arg[3]); tprints(", "); printflags(xattrflags, tcp->u_arg[4], "XATTR_???"); @@ -88,7 +81,7 @@ SYS_FUNC(getxattr) if (entering(tcp)) { printpath(tcp, tcp->u_arg[0]); tprints(", "); - printstr(tcp, tcp->u_arg[1], -1); + printstr(tcp, tcp->u_arg[1]); } else { print_xattr_val(tcp, tcp->u_arg[2], tcp->u_arg[3], tcp->u_rval); } @@ -100,7 +93,7 @@ SYS_FUNC(fgetxattr) if (entering(tcp)) { printfd(tcp, tcp->u_arg[0]); tprints(", "); - printstr(tcp, tcp->u_arg[1], -1); + printstr(tcp, tcp->u_arg[1]); } else { print_xattr_val(tcp, tcp->u_arg[2], tcp->u_arg[3], tcp->u_rval); } @@ -108,14 +101,15 @@ SYS_FUNC(fgetxattr) } static void -print_xattr_list(struct tcb *tcp, unsigned long addr, unsigned long size) +print_xattr_list(struct tcb *const tcp, const kernel_ulong_t addr, + const kernel_ulong_t size) { if (!size || syserror(tcp)) { printaddr(addr); } else { - printstr(tcp, addr, tcp->u_rval); + printstrn(tcp, addr, tcp->u_rval); } - tprintf(", %lu", size); + tprintf(", %" PRI_klu, size); } SYS_FUNC(listxattr) @@ -144,7 +138,7 @@ SYS_FUNC(removexattr) { printpath(tcp, tcp->u_arg[0]); tprints(", "); - printstr(tcp, tcp->u_arg[1], -1); + printstr(tcp, tcp->u_arg[1]); return RVAL_DECODED; } @@ -152,6 +146,6 @@ SYS_FUNC(fremovexattr) { printfd(tcp, tcp->u_arg[0]); tprints(", "); - printstr(tcp, tcp->u_arg[1], -1); + printstr(tcp, tcp->u_arg[1]); return RVAL_DECODED; } diff --git a/xlat/.gitignore b/xlat/.gitignore deleted file mode 100644 index 3e8e62e57..000000000 --- a/xlat/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Makemodule.am diff --git a/xlat/Makemodule.am b/xlat/Makemodule.am index 2e7abca5c..5ba716a10 100644 --- a/xlat/Makemodule.am +++ b/xlat/Makemodule.am @@ -1,5 +1,5 @@ -XLAT_INPUT_FILES = xlat/access_flags.in xlat/aclipc.in xlat/addrfams.in xlat/adjtimex_modes.in xlat/adjtimex_state.in xlat/adjtimex_status.in xlat/advise.in xlat/af_packet_types.in xlat/archvals.in xlat/arp_hardware_types.in xlat/at_flags.in xlat/atomic_ops.in xlat/audit_arch.in xlat/baud_options.in xlat/blkpg_ops.in xlat/bootflags1.in xlat/bootflags2.in xlat/bootflags3.in xlat/bpf_class.in xlat/bpf_commands.in xlat/bpf_map_types.in xlat/bpf_map_update_elem_flags.in xlat/bpf_miscop.in xlat/bpf_mode.in xlat/bpf_op_alu.in xlat/bpf_op_jmp.in xlat/bpf_prog_types.in xlat/bpf_rval.in xlat/bpf_size.in xlat/bpf_src.in xlat/bsg_protocol.in xlat/bsg_subprotocol.in xlat/bt_protocols.in xlat/btrfs_balance_args.in xlat/btrfs_balance_ctl_cmds.in xlat/btrfs_balance_flags.in xlat/btrfs_balance_state.in xlat/btrfs_compress_types.in xlat/btrfs_defrag_flags.in xlat/btrfs_dev_replace_cmds.in xlat/btrfs_dev_replace_results.in xlat/btrfs_dev_replace_state.in xlat/btrfs_dev_stats_flags.in xlat/btrfs_dev_stats_values.in xlat/btrfs_features_compat.in xlat/btrfs_features_compat_ro.in xlat/btrfs_features_incompat.in xlat/btrfs_key_types.in xlat/btrfs_qgroup_ctl_cmds.in xlat/btrfs_qgroup_inherit_flags.in xlat/btrfs_qgroup_limit_flags.in xlat/btrfs_qgroup_status_flags.in xlat/btrfs_scrub_flags.in xlat/btrfs_send_flags.in xlat/btrfs_snap_flags_v2.in xlat/btrfs_space_info_flags.in xlat/btrfs_tree_objectids.in xlat/cacheflush_scope.in xlat/cap.in xlat/cap_mask0.in xlat/cap_mask1.in xlat/cap_version.in xlat/clockflags.in xlat/clocknames.in xlat/clone_flags.in xlat/cpuclocknames.in xlat/delete_module_flags.in xlat/dirent_types.in xlat/efd_flags.in xlat/epollctls.in xlat/epollevents.in xlat/epollflags.in xlat/ethernet_protocols.in xlat/evdev_abs.in xlat/evdev_autorepeat.in xlat/evdev_ev.in xlat/evdev_ff_status.in xlat/evdev_ff_types.in xlat/evdev_keycode.in xlat/evdev_leds.in xlat/evdev_misc.in xlat/evdev_mtslots.in xlat/evdev_prop.in xlat/evdev_relative_axes.in xlat/evdev_snd.in xlat/evdev_switch.in xlat/evdev_sync.in xlat/falloc_flags.in xlat/fan_classes.in xlat/fan_event_flags.in xlat/fan_init_flags.in xlat/fan_mark_flags.in xlat/fcntl64cmds.in xlat/fcntlcmds.in xlat/fdflags.in xlat/fiemap_extent_flags.in xlat/fiemap_flags.in xlat/flockcmds.in xlat/f_owner_types.in xlat/f_seals.in xlat/fsmagic.in xlat/futexops.in xlat/futexwakecmps.in xlat/futexwakeops.in xlat/getrandom_flags.in xlat/getsockipoptions.in xlat/getsockipv6options.in xlat/hci_channels.in xlat/icmpfilterflags.in xlat/if_dqblk_valid.in xlat/if_dqinfo_flags.in xlat/if_dqinfo_valid.in xlat/iffflags.in xlat/inet_protocols.in xlat/inotify_flags.in xlat/inotify_init_flags.in xlat/ioctl_dirs.in xlat/ioprio_class.in xlat/ioprio_who.in xlat/ipccalls.in xlat/ipc_msg_flags.in xlat/ip_cmsg_types.in xlat/itimer_which.in xlat/kcmp_types.in xlat/kexec_arch_values.in xlat/kexec_file_load_flags.in xlat/kexec_load_flags.in xlat/keyctl_commands.in xlat/key_perms.in xlat/key_reqkeys.in xlat/key_spec.in xlat/lockfcmds.in xlat/loop_crypt_type_options.in xlat/loop_flags_options.in xlat/madvise_cmds.in xlat/mbindflags.in xlat/mctl_sync.in xlat/membarrier_cmds.in xlat/memfd_create_flags.in xlat/mempolicyflags.in xlat/mlockall_flags.in xlat/mlock_flags.in xlat/mmap_flags.in xlat/mmap_prot.in xlat/modem_flags.in xlat/modetypes.in xlat/module_init_flags.in xlat/mount_flags.in xlat/move_pages_flags.in xlat/mremap_flags.in xlat/msgctl_flags.in xlat/msg_flags.in xlat/mtd_file_mode_options.in xlat/mtd_flags_options.in xlat/mtd_mode_options.in xlat/mtd_nandecc_options.in xlat/mtd_otp_options.in xlat/mtd_type_options.in xlat/netlink_flags.in xlat/netlink_protocols.in xlat/netlink_types.in xlat/notifyflags.in xlat/nt_descriptor_types.in xlat/open_access_modes.in xlat/open_mode_flags.in xlat/openmodessol.in xlat/packet_mreq_type.in xlat/perf_event_open_flags.in xlat/personality_flags.in xlat/personality_types.in xlat/policies.in xlat/pollflags.in xlat/pr_cap_ambient.in xlat/prctl_options.in xlat/priorities.in xlat/pr_mce_kill.in xlat/pr_mce_kill_policy.in xlat/pr_set_mm.in xlat/pr_tsc.in xlat/pr_unalign_flags.in xlat/ptp_flags_options.in xlat/ptrace_cmds.in xlat/ptrace_events.in xlat/ptrace_peeksiginfo_flags.in xlat/ptrace_setoptions_flags.in xlat/quotacmds.in xlat/quota_formats.in xlat/quotatypes.in xlat/rename_flags.in xlat/resource_flags.in xlat/resources.in xlat/rwf_flags.in xlat/sa_handler_values.in xlat/sched_flags.in xlat/schedulers.in xlat/scmvals.in xlat/secbits.in xlat/seccomp_filter_flags.in xlat/seccomp_mode.in xlat/seccomp_ops.in xlat/seccomp_ret_action.in xlat/semctl_flags.in xlat/semop_flags.in xlat/setsockipoptions.in xlat/setsockipv6options.in xlat/sfd_flags.in xlat/sg_io_dxfer_direction.in xlat/shmctl_flags.in xlat/shm_flags.in xlat/shm_resource_flags.in xlat/shutdown_modes.in xlat/sigact_flags.in xlat/sigaltstack_flags.in xlat/sigbus_codes.in xlat/sigchld_codes.in xlat/sigemt_codes.in xlat/sigev_value.in xlat/sigfpe_codes.in xlat/sigill_codes.in xlat/siginfo_codes.in xlat/sigpoll_codes.in xlat/sigprocmaskcmds.in xlat/sigprof_codes.in xlat/sigsegv_codes.in xlat/sigsys_codes.in xlat/sigtrap_codes.in xlat/socketcalls.in xlat/socketlayers.in xlat/sockipoptions.in xlat/sockipv6options.in xlat/sockipxoptions.in xlat/sockoptions.in xlat/sockpacketoptions.in xlat/sockrawoptions.in xlat/socksctpoptions.in xlat/socktcpoptions.in xlat/sock_type_flags.in xlat/socktypes.in xlat/splice_flags.in xlat/sram_alloc_flags.in xlat/statfs_flags.in xlat/swap_flags.in xlat/sync_file_range_flags.in xlat/sysctl_kern.in xlat/sysctl_net_core.in xlat/sysctl_net.in xlat/sysctl_net_ipv4_conf.in xlat/sysctl_net_ipv4.in xlat/sysctl_net_ipv4_route.in xlat/sysctl_net_ipv6.in xlat/sysctl_net_ipv6_route.in xlat/sysctl_net_unix.in xlat/sysctl_root.in xlat/sysctl_vm.in xlat/syslog_action_type.in xlat/sysmips_operations.in xlat/tcflsh_options.in xlat/tcxonc_options.in xlat/timerfdflags.in xlat/ubi_volume_props.in xlat/ubi_volume_types.in xlat/uffd_api_flags.in xlat/uffd_copy_flags.in xlat/uffd_flags.in xlat/uffd_register_ioctl_flags.in xlat/uffd_register_mode_flags.in xlat/uffd_zeropage_flags.in xlat/umount_flags.in xlat/usagewho.in xlat/v4l2_buf_flags.in xlat/v4l2_buf_types.in xlat/v4l2_capture_modes.in xlat/v4l2_colorspaces.in xlat/v4l2_control_classes.in xlat/v4l2_control_flags.in xlat/v4l2_control_ids.in xlat/v4l2_control_types.in xlat/v4l2_device_capabilities_flags.in xlat/v4l2_fields.in xlat/v4l2_format_description_flags.in xlat/v4l2_frameinterval_types.in xlat/v4l2_framesize_types.in xlat/v4l2_input_types.in xlat/v4l2_memories.in xlat/v4l2_streaming_capabilities.in xlat/wait4_options.in xlat/waitid_types.in xlat/whence_codes.in xlat/xattrflags.in xlat/xfs_dqblk_flags.in xlat/xfs_quota_flags.in -XLAT_HEADER_FILES = xlat/access_flags.h xlat/aclipc.h xlat/addrfams.h xlat/adjtimex_modes.h xlat/adjtimex_state.h xlat/adjtimex_status.h xlat/advise.h xlat/af_packet_types.h xlat/archvals.h xlat/arp_hardware_types.h xlat/at_flags.h xlat/atomic_ops.h xlat/audit_arch.h xlat/baud_options.h xlat/blkpg_ops.h xlat/bootflags1.h xlat/bootflags2.h xlat/bootflags3.h xlat/bpf_class.h xlat/bpf_commands.h xlat/bpf_map_types.h xlat/bpf_map_update_elem_flags.h xlat/bpf_miscop.h xlat/bpf_mode.h xlat/bpf_op_alu.h xlat/bpf_op_jmp.h xlat/bpf_prog_types.h xlat/bpf_rval.h xlat/bpf_size.h xlat/bpf_src.h xlat/bsg_protocol.h xlat/bsg_subprotocol.h xlat/bt_protocols.h xlat/btrfs_balance_args.h xlat/btrfs_balance_ctl_cmds.h xlat/btrfs_balance_flags.h xlat/btrfs_balance_state.h xlat/btrfs_compress_types.h xlat/btrfs_defrag_flags.h xlat/btrfs_dev_replace_cmds.h xlat/btrfs_dev_replace_results.h xlat/btrfs_dev_replace_state.h xlat/btrfs_dev_stats_flags.h xlat/btrfs_dev_stats_values.h xlat/btrfs_features_compat.h xlat/btrfs_features_compat_ro.h xlat/btrfs_features_incompat.h xlat/btrfs_key_types.h xlat/btrfs_qgroup_ctl_cmds.h xlat/btrfs_qgroup_inherit_flags.h xlat/btrfs_qgroup_limit_flags.h xlat/btrfs_qgroup_status_flags.h xlat/btrfs_scrub_flags.h xlat/btrfs_send_flags.h xlat/btrfs_snap_flags_v2.h xlat/btrfs_space_info_flags.h xlat/btrfs_tree_objectids.h xlat/cacheflush_scope.h xlat/cap.h xlat/cap_mask0.h xlat/cap_mask1.h xlat/cap_version.h xlat/clockflags.h xlat/clocknames.h xlat/clone_flags.h xlat/cpuclocknames.h xlat/delete_module_flags.h xlat/dirent_types.h xlat/efd_flags.h xlat/epollctls.h xlat/epollevents.h xlat/epollflags.h xlat/ethernet_protocols.h xlat/evdev_abs.h xlat/evdev_autorepeat.h xlat/evdev_ev.h xlat/evdev_ff_status.h xlat/evdev_ff_types.h xlat/evdev_keycode.h xlat/evdev_leds.h xlat/evdev_misc.h xlat/evdev_mtslots.h xlat/evdev_prop.h xlat/evdev_relative_axes.h xlat/evdev_snd.h xlat/evdev_switch.h xlat/evdev_sync.h xlat/falloc_flags.h xlat/fan_classes.h xlat/fan_event_flags.h xlat/fan_init_flags.h xlat/fan_mark_flags.h xlat/fcntl64cmds.h xlat/fcntlcmds.h xlat/fdflags.h xlat/fiemap_extent_flags.h xlat/fiemap_flags.h xlat/flockcmds.h xlat/f_owner_types.h xlat/f_seals.h xlat/fsmagic.h xlat/futexops.h xlat/futexwakecmps.h xlat/futexwakeops.h xlat/getrandom_flags.h xlat/getsockipoptions.h xlat/getsockipv6options.h xlat/hci_channels.h xlat/icmpfilterflags.h xlat/if_dqblk_valid.h xlat/if_dqinfo_flags.h xlat/if_dqinfo_valid.h xlat/iffflags.h xlat/inet_protocols.h xlat/inotify_flags.h xlat/inotify_init_flags.h xlat/ioctl_dirs.h xlat/ioprio_class.h xlat/ioprio_who.h xlat/ipccalls.h xlat/ipc_msg_flags.h xlat/ip_cmsg_types.h xlat/itimer_which.h xlat/kcmp_types.h xlat/kexec_arch_values.h xlat/kexec_file_load_flags.h xlat/kexec_load_flags.h xlat/keyctl_commands.h xlat/key_perms.h xlat/key_reqkeys.h xlat/key_spec.h xlat/lockfcmds.h xlat/loop_crypt_type_options.h xlat/loop_flags_options.h xlat/madvise_cmds.h xlat/mbindflags.h xlat/mctl_sync.h xlat/membarrier_cmds.h xlat/memfd_create_flags.h xlat/mempolicyflags.h xlat/mlockall_flags.h xlat/mlock_flags.h xlat/mmap_flags.h xlat/mmap_prot.h xlat/modem_flags.h xlat/modetypes.h xlat/module_init_flags.h xlat/mount_flags.h xlat/move_pages_flags.h xlat/mremap_flags.h xlat/msgctl_flags.h xlat/msg_flags.h xlat/mtd_file_mode_options.h xlat/mtd_flags_options.h xlat/mtd_mode_options.h xlat/mtd_nandecc_options.h xlat/mtd_otp_options.h xlat/mtd_type_options.h xlat/netlink_flags.h xlat/netlink_protocols.h xlat/netlink_types.h xlat/notifyflags.h xlat/nt_descriptor_types.h xlat/open_access_modes.h xlat/open_mode_flags.h xlat/openmodessol.h xlat/packet_mreq_type.h xlat/perf_event_open_flags.h xlat/personality_flags.h xlat/personality_types.h xlat/policies.h xlat/pollflags.h xlat/pr_cap_ambient.h xlat/prctl_options.h xlat/priorities.h xlat/pr_mce_kill.h xlat/pr_mce_kill_policy.h xlat/pr_set_mm.h xlat/pr_tsc.h xlat/pr_unalign_flags.h xlat/ptp_flags_options.h xlat/ptrace_cmds.h xlat/ptrace_events.h xlat/ptrace_peeksiginfo_flags.h xlat/ptrace_setoptions_flags.h xlat/quotacmds.h xlat/quota_formats.h xlat/quotatypes.h xlat/rename_flags.h xlat/resource_flags.h xlat/resources.h xlat/rwf_flags.h xlat/sa_handler_values.h xlat/sched_flags.h xlat/schedulers.h xlat/scmvals.h xlat/secbits.h xlat/seccomp_filter_flags.h xlat/seccomp_mode.h xlat/seccomp_ops.h xlat/seccomp_ret_action.h xlat/semctl_flags.h xlat/semop_flags.h xlat/setsockipoptions.h xlat/setsockipv6options.h xlat/sfd_flags.h xlat/sg_io_dxfer_direction.h xlat/shmctl_flags.h xlat/shm_flags.h xlat/shm_resource_flags.h xlat/shutdown_modes.h xlat/sigact_flags.h xlat/sigaltstack_flags.h xlat/sigbus_codes.h xlat/sigchld_codes.h xlat/sigemt_codes.h xlat/sigev_value.h xlat/sigfpe_codes.h xlat/sigill_codes.h xlat/siginfo_codes.h xlat/sigpoll_codes.h xlat/sigprocmaskcmds.h xlat/sigprof_codes.h xlat/sigsegv_codes.h xlat/sigsys_codes.h xlat/sigtrap_codes.h xlat/socketcalls.h xlat/socketlayers.h xlat/sockipoptions.h xlat/sockipv6options.h xlat/sockipxoptions.h xlat/sockoptions.h xlat/sockpacketoptions.h xlat/sockrawoptions.h xlat/socksctpoptions.h xlat/socktcpoptions.h xlat/sock_type_flags.h xlat/socktypes.h xlat/splice_flags.h xlat/sram_alloc_flags.h xlat/statfs_flags.h xlat/swap_flags.h xlat/sync_file_range_flags.h xlat/sysctl_kern.h xlat/sysctl_net_core.h xlat/sysctl_net.h xlat/sysctl_net_ipv4_conf.h xlat/sysctl_net_ipv4.h xlat/sysctl_net_ipv4_route.h xlat/sysctl_net_ipv6.h xlat/sysctl_net_ipv6_route.h xlat/sysctl_net_unix.h xlat/sysctl_root.h xlat/sysctl_vm.h xlat/syslog_action_type.h xlat/sysmips_operations.h xlat/tcflsh_options.h xlat/tcxonc_options.h xlat/timerfdflags.h xlat/ubi_volume_props.h xlat/ubi_volume_types.h xlat/uffd_api_flags.h xlat/uffd_copy_flags.h xlat/uffd_flags.h xlat/uffd_register_ioctl_flags.h xlat/uffd_register_mode_flags.h xlat/uffd_zeropage_flags.h xlat/umount_flags.h xlat/usagewho.h xlat/v4l2_buf_flags.h xlat/v4l2_buf_types.h xlat/v4l2_capture_modes.h xlat/v4l2_colorspaces.h xlat/v4l2_control_classes.h xlat/v4l2_control_flags.h xlat/v4l2_control_ids.h xlat/v4l2_control_types.h xlat/v4l2_device_capabilities_flags.h xlat/v4l2_fields.h xlat/v4l2_format_description_flags.h xlat/v4l2_frameinterval_types.h xlat/v4l2_framesize_types.h xlat/v4l2_input_types.h xlat/v4l2_memories.h xlat/v4l2_streaming_capabilities.h xlat/wait4_options.h xlat/waitid_types.h xlat/whence_codes.h xlat/xattrflags.h xlat/xfs_dqblk_flags.h xlat/xfs_quota_flags.h +XLAT_INPUT_FILES = xlat/access_flags.in xlat/aclipc.in xlat/addrfams.in xlat/adjtimex_modes.in xlat/adjtimex_state.in xlat/adjtimex_status.in xlat/advise.in xlat/af_packet_types.in xlat/archvals.in xlat/arp_hardware_types.in xlat/at_flags.in xlat/atomic_ops.in xlat/audit_arch.in xlat/baud_options.in xlat/blkpg_ops.in xlat/bootflags1.in xlat/bootflags2.in xlat/bootflags3.in xlat/bpf_attach_type.in xlat/bpf_class.in xlat/bpf_commands.in xlat/bpf_map_types.in xlat/bpf_map_update_elem_flags.in xlat/bpf_miscop.in xlat/bpf_mode.in xlat/bpf_op_alu.in xlat/bpf_op_jmp.in xlat/bpf_prog_types.in xlat/bpf_rval.in xlat/bpf_size.in xlat/bpf_src.in xlat/bsg_flags.in xlat/bsg_protocol.in xlat/bsg_subprotocol.in xlat/bt_protocols.in xlat/btrfs_balance_args.in xlat/btrfs_balance_ctl_cmds.in xlat/btrfs_balance_flags.in xlat/btrfs_balance_state.in xlat/btrfs_compress_types.in xlat/btrfs_defrag_flags.in xlat/btrfs_dev_replace_cmds.in xlat/btrfs_dev_replace_results.in xlat/btrfs_dev_replace_state.in xlat/btrfs_dev_stats_flags.in xlat/btrfs_dev_stats_values.in xlat/btrfs_features_compat.in xlat/btrfs_features_compat_ro.in xlat/btrfs_features_incompat.in xlat/btrfs_key_types.in xlat/btrfs_qgroup_ctl_cmds.in xlat/btrfs_qgroup_inherit_flags.in xlat/btrfs_qgroup_limit_flags.in xlat/btrfs_qgroup_status_flags.in xlat/btrfs_scrub_flags.in xlat/btrfs_send_flags.in xlat/btrfs_snap_flags_v2.in xlat/btrfs_space_info_flags.in xlat/btrfs_tree_objectids.in xlat/cacheflush_scope.in xlat/cap.in xlat/cap_mask0.in xlat/cap_mask1.in xlat/cap_version.in xlat/clockflags.in xlat/clocknames.in xlat/clone_flags.in xlat/cpuclocknames.in xlat/delete_module_flags.in xlat/dirent_types.in xlat/dm_flags.in xlat/efd_flags.in xlat/epollctls.in xlat/epollevents.in xlat/epollflags.in xlat/ethernet_protocols.in xlat/evdev_abs.in xlat/evdev_autorepeat.in xlat/evdev_ev.in xlat/evdev_ff_status.in xlat/evdev_ff_types.in xlat/evdev_keycode.in xlat/evdev_leds.in xlat/evdev_misc.in xlat/evdev_mtslots.in xlat/evdev_prop.in xlat/evdev_relative_axes.in xlat/evdev_snd.in xlat/evdev_switch.in xlat/evdev_sync.in xlat/f_owner_types.in xlat/f_seals.in xlat/falloc_flags.in xlat/fan_classes.in xlat/fan_event_flags.in xlat/fan_init_flags.in xlat/fan_mark_flags.in xlat/fcntl64cmds.in xlat/fcntlcmds.in xlat/fdflags.in xlat/fiemap_extent_flags.in xlat/fiemap_flags.in xlat/flockcmds.in xlat/fsmagic.in xlat/futexops.in xlat/futexwakecmps.in xlat/futexwakeops.in xlat/getrandom_flags.in xlat/getsockipoptions.in xlat/getsockipv6options.in xlat/hci_channels.in xlat/hw_breakpoint_len.in xlat/hw_breakpoint_type.in xlat/icmpfilterflags.in xlat/if_dqblk_valid.in xlat/if_dqinfo_flags.in xlat/if_dqinfo_valid.in xlat/iffflags.in xlat/inet_protocols.in xlat/inotify_flags.in xlat/inotify_init_flags.in xlat/ioctl_dirs.in xlat/ioprio_class.in xlat/ioprio_who.in xlat/ip_cmsg_types.in xlat/ipc_msg_flags.in xlat/ipccalls.in xlat/itimer_which.in xlat/kcmp_types.in xlat/kexec_arch_values.in xlat/kexec_file_load_flags.in xlat/kexec_load_flags.in xlat/key_perms.in xlat/key_reqkeys.in xlat/key_spec.in xlat/keyctl_commands.in xlat/lockfcmds.in xlat/loop_cmds.in xlat/loop_crypt_type_options.in xlat/loop_flags_options.in xlat/madvise_cmds.in xlat/mbindflags.in xlat/mctl_sync.in xlat/membarrier_cmds.in xlat/memfd_create_flags.in xlat/mempolicyflags.in xlat/mlock_flags.in xlat/mlockall_flags.in xlat/mmap_flags.in xlat/mmap_prot.in xlat/modem_flags.in xlat/modetypes.in xlat/module_init_flags.in xlat/mount_flags.in xlat/move_pages_flags.in xlat/mq_attr_flags.in xlat/mremap_flags.in xlat/msg_flags.in xlat/msgctl_flags.in xlat/mtd_file_mode_options.in xlat/mtd_flags_options.in xlat/mtd_mode_options.in xlat/mtd_nandecc_options.in xlat/mtd_otp_options.in xlat/mtd_type_options.in xlat/name_to_handle_at_flags.in xlat/netlink_flags.in xlat/netlink_protocols.in xlat/netlink_types.in xlat/notifyflags.in xlat/nt_descriptor_types.in xlat/open_access_modes.in xlat/open_mode_flags.in xlat/openmodessol.in xlat/packet_mreq_type.in xlat/perf_attr_size.in xlat/perf_branch_sample_type.in xlat/perf_event_open_flags.in xlat/perf_event_read_format.in xlat/perf_event_sample_format.in xlat/perf_hw_cache_id.in xlat/perf_hw_cache_op_id.in xlat/perf_hw_cache_op_result_id.in xlat/perf_hw_id.in xlat/perf_sw_ids.in xlat/perf_type_id.in xlat/personality_flags.in xlat/personality_types.in xlat/pkey_access.in xlat/policies.in xlat/pollflags.in xlat/pr_cap_ambient.in xlat/pr_dumpable.in xlat/pr_fp_mode.in xlat/pr_mce_kill.in xlat/pr_mce_kill_policy.in xlat/pr_set_mm.in xlat/pr_tsc.in xlat/pr_unalign_flags.in xlat/prctl_options.in xlat/priorities.in xlat/ptp_flags_options.in xlat/ptrace_cmds.in xlat/ptrace_events.in xlat/ptrace_peeksiginfo_flags.in xlat/ptrace_setoptions_flags.in xlat/quota_formats.in xlat/quotacmds.in xlat/quotatypes.in xlat/rename_flags.in xlat/resource_flags.in xlat/resources.in xlat/rwf_flags.in xlat/sa_handler_values.in xlat/sched_flags.in xlat/schedulers.in xlat/scmvals.in xlat/scsi_sg_commands.in xlat/secbits.in xlat/seccomp_filter_flags.in xlat/seccomp_mode.in xlat/seccomp_ops.in xlat/seccomp_ret_action.in xlat/semctl_flags.in xlat/semop_flags.in xlat/setns_types.in xlat/setsockipoptions.in xlat/setsockipv6options.in xlat/sfd_flags.in xlat/sg_io_dxfer_direction.in xlat/sg_io_flags.in xlat/sg_io_info.in xlat/sg_scsi_reset.in xlat/shm_flags.in xlat/shm_resource_flags.in xlat/shmctl_flags.in xlat/shutdown_modes.in xlat/sigact_flags.in xlat/sigaltstack_flags.in xlat/sigbus_codes.in xlat/sigchld_codes.in xlat/sigemt_codes.in xlat/sigev_value.in xlat/sigfpe_codes.in xlat/sigill_codes.in xlat/siginfo_codes.in xlat/sigpoll_codes.in xlat/sigprocmaskcmds.in xlat/sigprof_codes.in xlat/sigsegv_codes.in xlat/sigsys_codes.in xlat/sigtrap_codes.in xlat/sock_type_flags.in xlat/socketcalls.in xlat/socketlayers.in xlat/sockipoptions.in xlat/sockipv6options.in xlat/sockipxoptions.in xlat/sockoptions.in xlat/sockpacketoptions.in xlat/sockrawoptions.in xlat/socksctpoptions.in xlat/socktcpoptions.in xlat/socktypes.in xlat/splice_flags.in xlat/sram_alloc_flags.in xlat/statfs_flags.in xlat/swap_flags.in xlat/sync_file_range_flags.in xlat/sysctl_kern.in xlat/sysctl_net.in xlat/sysctl_net_core.in xlat/sysctl_net_ipv4.in xlat/sysctl_net_ipv4_conf.in xlat/sysctl_net_ipv4_route.in xlat/sysctl_net_ipv6.in xlat/sysctl_net_ipv6_route.in xlat/sysctl_net_unix.in xlat/sysctl_root.in xlat/sysctl_vm.in xlat/syslog_action_type.in xlat/sysmips_operations.in xlat/tcflsh_options.in xlat/tcxonc_options.in xlat/timerfdflags.in xlat/ubi_volume_props.in xlat/ubi_volume_types.in xlat/uffd_api_flags.in xlat/uffd_copy_flags.in xlat/uffd_flags.in xlat/uffd_register_ioctl_flags.in xlat/uffd_register_mode_flags.in xlat/uffd_zeropage_flags.in xlat/umount_flags.in xlat/unshare_flags.in xlat/usagewho.in xlat/v4l2_buf_flags.in xlat/v4l2_buf_types.in xlat/v4l2_capture_modes.in xlat/v4l2_colorspaces.in xlat/v4l2_control_classes.in xlat/v4l2_control_flags.in xlat/v4l2_control_ids.in xlat/v4l2_control_types.in xlat/v4l2_device_capabilities_flags.in xlat/v4l2_fields.in xlat/v4l2_format_description_flags.in xlat/v4l2_frameinterval_types.in xlat/v4l2_framesize_types.in xlat/v4l2_input_types.in xlat/v4l2_memories.in xlat/v4l2_streaming_capabilities.in xlat/wait4_options.in xlat/waitid_types.in xlat/whence_codes.in xlat/xattrflags.in xlat/xfs_dqblk_flags.in xlat/xfs_quota_flags.in +XLAT_HEADER_FILES = xlat/access_flags.h xlat/aclipc.h xlat/addrfams.h xlat/adjtimex_modes.h xlat/adjtimex_state.h xlat/adjtimex_status.h xlat/advise.h xlat/af_packet_types.h xlat/archvals.h xlat/arp_hardware_types.h xlat/at_flags.h xlat/atomic_ops.h xlat/audit_arch.h xlat/baud_options.h xlat/blkpg_ops.h xlat/bootflags1.h xlat/bootflags2.h xlat/bootflags3.h xlat/bpf_attach_type.h xlat/bpf_class.h xlat/bpf_commands.h xlat/bpf_map_types.h xlat/bpf_map_update_elem_flags.h xlat/bpf_miscop.h xlat/bpf_mode.h xlat/bpf_op_alu.h xlat/bpf_op_jmp.h xlat/bpf_prog_types.h xlat/bpf_rval.h xlat/bpf_size.h xlat/bpf_src.h xlat/bsg_flags.h xlat/bsg_protocol.h xlat/bsg_subprotocol.h xlat/bt_protocols.h xlat/btrfs_balance_args.h xlat/btrfs_balance_ctl_cmds.h xlat/btrfs_balance_flags.h xlat/btrfs_balance_state.h xlat/btrfs_compress_types.h xlat/btrfs_defrag_flags.h xlat/btrfs_dev_replace_cmds.h xlat/btrfs_dev_replace_results.h xlat/btrfs_dev_replace_state.h xlat/btrfs_dev_stats_flags.h xlat/btrfs_dev_stats_values.h xlat/btrfs_features_compat.h xlat/btrfs_features_compat_ro.h xlat/btrfs_features_incompat.h xlat/btrfs_key_types.h xlat/btrfs_qgroup_ctl_cmds.h xlat/btrfs_qgroup_inherit_flags.h xlat/btrfs_qgroup_limit_flags.h xlat/btrfs_qgroup_status_flags.h xlat/btrfs_scrub_flags.h xlat/btrfs_send_flags.h xlat/btrfs_snap_flags_v2.h xlat/btrfs_space_info_flags.h xlat/btrfs_tree_objectids.h xlat/cacheflush_scope.h xlat/cap.h xlat/cap_mask0.h xlat/cap_mask1.h xlat/cap_version.h xlat/clockflags.h xlat/clocknames.h xlat/clone_flags.h xlat/cpuclocknames.h xlat/delete_module_flags.h xlat/dirent_types.h xlat/dm_flags.h xlat/efd_flags.h xlat/epollctls.h xlat/epollevents.h xlat/epollflags.h xlat/ethernet_protocols.h xlat/evdev_abs.h xlat/evdev_autorepeat.h xlat/evdev_ev.h xlat/evdev_ff_status.h xlat/evdev_ff_types.h xlat/evdev_keycode.h xlat/evdev_leds.h xlat/evdev_misc.h xlat/evdev_mtslots.h xlat/evdev_prop.h xlat/evdev_relative_axes.h xlat/evdev_snd.h xlat/evdev_switch.h xlat/evdev_sync.h xlat/f_owner_types.h xlat/f_seals.h xlat/falloc_flags.h xlat/fan_classes.h xlat/fan_event_flags.h xlat/fan_init_flags.h xlat/fan_mark_flags.h xlat/fcntl64cmds.h xlat/fcntlcmds.h xlat/fdflags.h xlat/fiemap_extent_flags.h xlat/fiemap_flags.h xlat/flockcmds.h xlat/fsmagic.h xlat/futexops.h xlat/futexwakecmps.h xlat/futexwakeops.h xlat/getrandom_flags.h xlat/getsockipoptions.h xlat/getsockipv6options.h xlat/hci_channels.h xlat/hw_breakpoint_len.h xlat/hw_breakpoint_type.h xlat/icmpfilterflags.h xlat/if_dqblk_valid.h xlat/if_dqinfo_flags.h xlat/if_dqinfo_valid.h xlat/iffflags.h xlat/inet_protocols.h xlat/inotify_flags.h xlat/inotify_init_flags.h xlat/ioctl_dirs.h xlat/ioprio_class.h xlat/ioprio_who.h xlat/ip_cmsg_types.h xlat/ipc_msg_flags.h xlat/ipccalls.h xlat/itimer_which.h xlat/kcmp_types.h xlat/kexec_arch_values.h xlat/kexec_file_load_flags.h xlat/kexec_load_flags.h xlat/key_perms.h xlat/key_reqkeys.h xlat/key_spec.h xlat/keyctl_commands.h xlat/lockfcmds.h xlat/loop_cmds.h xlat/loop_crypt_type_options.h xlat/loop_flags_options.h xlat/madvise_cmds.h xlat/mbindflags.h xlat/mctl_sync.h xlat/membarrier_cmds.h xlat/memfd_create_flags.h xlat/mempolicyflags.h xlat/mlock_flags.h xlat/mlockall_flags.h xlat/mmap_flags.h xlat/mmap_prot.h xlat/modem_flags.h xlat/modetypes.h xlat/module_init_flags.h xlat/mount_flags.h xlat/move_pages_flags.h xlat/mq_attr_flags.h xlat/mremap_flags.h xlat/msg_flags.h xlat/msgctl_flags.h xlat/mtd_file_mode_options.h xlat/mtd_flags_options.h xlat/mtd_mode_options.h xlat/mtd_nandecc_options.h xlat/mtd_otp_options.h xlat/mtd_type_options.h xlat/name_to_handle_at_flags.h xlat/netlink_flags.h xlat/netlink_protocols.h xlat/netlink_types.h xlat/notifyflags.h xlat/nt_descriptor_types.h xlat/open_access_modes.h xlat/open_mode_flags.h xlat/openmodessol.h xlat/packet_mreq_type.h xlat/perf_attr_size.h xlat/perf_branch_sample_type.h xlat/perf_event_open_flags.h xlat/perf_event_read_format.h xlat/perf_event_sample_format.h xlat/perf_hw_cache_id.h xlat/perf_hw_cache_op_id.h xlat/perf_hw_cache_op_result_id.h xlat/perf_hw_id.h xlat/perf_sw_ids.h xlat/perf_type_id.h xlat/personality_flags.h xlat/personality_types.h xlat/pkey_access.h xlat/policies.h xlat/pollflags.h xlat/pr_cap_ambient.h xlat/pr_dumpable.h xlat/pr_fp_mode.h xlat/pr_mce_kill.h xlat/pr_mce_kill_policy.h xlat/pr_set_mm.h xlat/pr_tsc.h xlat/pr_unalign_flags.h xlat/prctl_options.h xlat/priorities.h xlat/ptp_flags_options.h xlat/ptrace_cmds.h xlat/ptrace_events.h xlat/ptrace_peeksiginfo_flags.h xlat/ptrace_setoptions_flags.h xlat/quota_formats.h xlat/quotacmds.h xlat/quotatypes.h xlat/rename_flags.h xlat/resource_flags.h xlat/resources.h xlat/rwf_flags.h xlat/sa_handler_values.h xlat/sched_flags.h xlat/schedulers.h xlat/scmvals.h xlat/scsi_sg_commands.h xlat/secbits.h xlat/seccomp_filter_flags.h xlat/seccomp_mode.h xlat/seccomp_ops.h xlat/seccomp_ret_action.h xlat/semctl_flags.h xlat/semop_flags.h xlat/setns_types.h xlat/setsockipoptions.h xlat/setsockipv6options.h xlat/sfd_flags.h xlat/sg_io_dxfer_direction.h xlat/sg_io_flags.h xlat/sg_io_info.h xlat/sg_scsi_reset.h xlat/shm_flags.h xlat/shm_resource_flags.h xlat/shmctl_flags.h xlat/shutdown_modes.h xlat/sigact_flags.h xlat/sigaltstack_flags.h xlat/sigbus_codes.h xlat/sigchld_codes.h xlat/sigemt_codes.h xlat/sigev_value.h xlat/sigfpe_codes.h xlat/sigill_codes.h xlat/siginfo_codes.h xlat/sigpoll_codes.h xlat/sigprocmaskcmds.h xlat/sigprof_codes.h xlat/sigsegv_codes.h xlat/sigsys_codes.h xlat/sigtrap_codes.h xlat/sock_type_flags.h xlat/socketcalls.h xlat/socketlayers.h xlat/sockipoptions.h xlat/sockipv6options.h xlat/sockipxoptions.h xlat/sockoptions.h xlat/sockpacketoptions.h xlat/sockrawoptions.h xlat/socksctpoptions.h xlat/socktcpoptions.h xlat/socktypes.h xlat/splice_flags.h xlat/sram_alloc_flags.h xlat/statfs_flags.h xlat/swap_flags.h xlat/sync_file_range_flags.h xlat/sysctl_kern.h xlat/sysctl_net.h xlat/sysctl_net_core.h xlat/sysctl_net_ipv4.h xlat/sysctl_net_ipv4_conf.h xlat/sysctl_net_ipv4_route.h xlat/sysctl_net_ipv6.h xlat/sysctl_net_ipv6_route.h xlat/sysctl_net_unix.h xlat/sysctl_root.h xlat/sysctl_vm.h xlat/syslog_action_type.h xlat/sysmips_operations.h xlat/tcflsh_options.h xlat/tcxonc_options.h xlat/timerfdflags.h xlat/ubi_volume_props.h xlat/ubi_volume_types.h xlat/uffd_api_flags.h xlat/uffd_copy_flags.h xlat/uffd_flags.h xlat/uffd_register_ioctl_flags.h xlat/uffd_register_mode_flags.h xlat/uffd_zeropage_flags.h xlat/umount_flags.h xlat/unshare_flags.h xlat/usagewho.h xlat/v4l2_buf_flags.h xlat/v4l2_buf_types.h xlat/v4l2_capture_modes.h xlat/v4l2_colorspaces.h xlat/v4l2_control_classes.h xlat/v4l2_control_flags.h xlat/v4l2_control_ids.h xlat/v4l2_control_types.h xlat/v4l2_device_capabilities_flags.h xlat/v4l2_fields.h xlat/v4l2_format_description_flags.h xlat/v4l2_frameinterval_types.h xlat/v4l2_framesize_types.h xlat/v4l2_input_types.h xlat/v4l2_memories.h xlat/v4l2_streaming_capabilities.h xlat/wait4_options.h xlat/waitid_types.h xlat/whence_codes.h xlat/xattrflags.h xlat/xfs_dqblk_flags.h xlat/xfs_quota_flags.h $(top_srcdir)/xlat/access_flags.h: $(top_srcdir)/xlat/access_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/aclipc.h: $(top_srcdir)/xlat/aclipc.in $(top_srcdir)/xlat/gen.sh @@ -36,6 +36,8 @@ $(top_srcdir)/xlat/bootflags2.h: $(top_srcdir)/xlat/bootflags2.in $(top_srcdir)/ $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/bootflags3.h: $(top_srcdir)/xlat/bootflags3.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bpf_attach_type.h: $(top_srcdir)/xlat/bpf_attach_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/bpf_class.h: $(top_srcdir)/xlat/bpf_class.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/bpf_commands.h: $(top_srcdir)/xlat/bpf_commands.in $(top_srcdir)/xlat/gen.sh @@ -60,6 +62,8 @@ $(top_srcdir)/xlat/bpf_size.h: $(top_srcdir)/xlat/bpf_size.in $(top_srcdir)/xlat $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/bpf_src.h: $(top_srcdir)/xlat/bpf_src.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/bsg_flags.h: $(top_srcdir)/xlat/bsg_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/bsg_protocol.h: $(top_srcdir)/xlat/bsg_protocol.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/bsg_subprotocol.h: $(top_srcdir)/xlat/bsg_subprotocol.in $(top_srcdir)/xlat/gen.sh @@ -136,6 +140,8 @@ $(top_srcdir)/xlat/delete_module_flags.h: $(top_srcdir)/xlat/delete_module_flags $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/dirent_types.h: $(top_srcdir)/xlat/dirent_types.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/dm_flags.h: $(top_srcdir)/xlat/dm_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/efd_flags.h: $(top_srcdir)/xlat/efd_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/epollctls.h: $(top_srcdir)/xlat/epollctls.in $(top_srcdir)/xlat/gen.sh @@ -174,6 +180,10 @@ $(top_srcdir)/xlat/evdev_switch.h: $(top_srcdir)/xlat/evdev_switch.in $(top_srcd $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/evdev_sync.h: $(top_srcdir)/xlat/evdev_sync.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/f_owner_types.h: $(top_srcdir)/xlat/f_owner_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/f_seals.h: $(top_srcdir)/xlat/f_seals.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/falloc_flags.h: $(top_srcdir)/xlat/falloc_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/fan_classes.h: $(top_srcdir)/xlat/fan_classes.in $(top_srcdir)/xlat/gen.sh @@ -196,10 +206,6 @@ $(top_srcdir)/xlat/fiemap_flags.h: $(top_srcdir)/xlat/fiemap_flags.in $(top_srcd $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/flockcmds.h: $(top_srcdir)/xlat/flockcmds.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/f_owner_types.h: $(top_srcdir)/xlat/f_owner_types.in $(top_srcdir)/xlat/gen.sh - $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/f_seals.h: $(top_srcdir)/xlat/f_seals.in $(top_srcdir)/xlat/gen.sh - $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/fsmagic.h: $(top_srcdir)/xlat/fsmagic.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/futexops.h: $(top_srcdir)/xlat/futexops.in $(top_srcdir)/xlat/gen.sh @@ -216,6 +222,10 @@ $(top_srcdir)/xlat/getsockipv6options.h: $(top_srcdir)/xlat/getsockipv6options.i $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/hci_channels.h: $(top_srcdir)/xlat/hci_channels.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/hw_breakpoint_len.h: $(top_srcdir)/xlat/hw_breakpoint_len.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/hw_breakpoint_type.h: $(top_srcdir)/xlat/hw_breakpoint_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/icmpfilterflags.h: $(top_srcdir)/xlat/icmpfilterflags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/if_dqblk_valid.h: $(top_srcdir)/xlat/if_dqblk_valid.in $(top_srcdir)/xlat/gen.sh @@ -238,11 +248,11 @@ $(top_srcdir)/xlat/ioprio_class.h: $(top_srcdir)/xlat/ioprio_class.in $(top_srcd $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/ioprio_who.h: $(top_srcdir)/xlat/ioprio_who.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/ipccalls.h: $(top_srcdir)/xlat/ipccalls.in $(top_srcdir)/xlat/gen.sh +$(top_srcdir)/xlat/ip_cmsg_types.h: $(top_srcdir)/xlat/ip_cmsg_types.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/ipc_msg_flags.h: $(top_srcdir)/xlat/ipc_msg_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/ip_cmsg_types.h: $(top_srcdir)/xlat/ip_cmsg_types.in $(top_srcdir)/xlat/gen.sh +$(top_srcdir)/xlat/ipccalls.h: $(top_srcdir)/xlat/ipccalls.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/itimer_which.h: $(top_srcdir)/xlat/itimer_which.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ @@ -254,16 +264,18 @@ $(top_srcdir)/xlat/kexec_file_load_flags.h: $(top_srcdir)/xlat/kexec_file_load_f $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/kexec_load_flags.h: $(top_srcdir)/xlat/kexec_load_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/keyctl_commands.h: $(top_srcdir)/xlat/keyctl_commands.in $(top_srcdir)/xlat/gen.sh - $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/key_perms.h: $(top_srcdir)/xlat/key_perms.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/key_reqkeys.h: $(top_srcdir)/xlat/key_reqkeys.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/key_spec.h: $(top_srcdir)/xlat/key_spec.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/keyctl_commands.h: $(top_srcdir)/xlat/keyctl_commands.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/lockfcmds.h: $(top_srcdir)/xlat/lockfcmds.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/loop_cmds.h: $(top_srcdir)/xlat/loop_cmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/loop_crypt_type_options.h: $(top_srcdir)/xlat/loop_crypt_type_options.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/loop_flags_options.h: $(top_srcdir)/xlat/loop_flags_options.in $(top_srcdir)/xlat/gen.sh @@ -280,10 +292,10 @@ $(top_srcdir)/xlat/memfd_create_flags.h: $(top_srcdir)/xlat/memfd_create_flags.i $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/mempolicyflags.h: $(top_srcdir)/xlat/mempolicyflags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/mlockall_flags.h: $(top_srcdir)/xlat/mlockall_flags.in $(top_srcdir)/xlat/gen.sh - $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/mlock_flags.h: $(top_srcdir)/xlat/mlock_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/mlockall_flags.h: $(top_srcdir)/xlat/mlockall_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/mmap_flags.h: $(top_srcdir)/xlat/mmap_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/mmap_prot.h: $(top_srcdir)/xlat/mmap_prot.in $(top_srcdir)/xlat/gen.sh @@ -298,12 +310,14 @@ $(top_srcdir)/xlat/mount_flags.h: $(top_srcdir)/xlat/mount_flags.in $(top_srcdir $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/move_pages_flags.h: $(top_srcdir)/xlat/move_pages_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/mremap_flags.h: $(top_srcdir)/xlat/mremap_flags.in $(top_srcdir)/xlat/gen.sh +$(top_srcdir)/xlat/mq_attr_flags.h: $(top_srcdir)/xlat/mq_attr_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/msgctl_flags.h: $(top_srcdir)/xlat/msgctl_flags.in $(top_srcdir)/xlat/gen.sh +$(top_srcdir)/xlat/mremap_flags.h: $(top_srcdir)/xlat/mremap_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/msg_flags.h: $(top_srcdir)/xlat/msg_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/msgctl_flags.h: $(top_srcdir)/xlat/msgctl_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/mtd_file_mode_options.h: $(top_srcdir)/xlat/mtd_file_mode_options.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/mtd_flags_options.h: $(top_srcdir)/xlat/mtd_flags_options.in $(top_srcdir)/xlat/gen.sh @@ -316,6 +330,8 @@ $(top_srcdir)/xlat/mtd_otp_options.h: $(top_srcdir)/xlat/mtd_otp_options.in $(to $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/mtd_type_options.h: $(top_srcdir)/xlat/mtd_type_options.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/name_to_handle_at_flags.h: $(top_srcdir)/xlat/name_to_handle_at_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/netlink_flags.h: $(top_srcdir)/xlat/netlink_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/netlink_protocols.h: $(top_srcdir)/xlat/netlink_protocols.in $(top_srcdir)/xlat/gen.sh @@ -334,21 +350,43 @@ $(top_srcdir)/xlat/openmodessol.h: $(top_srcdir)/xlat/openmodessol.in $(top_srcd $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/packet_mreq_type.h: $(top_srcdir)/xlat/packet_mreq_type.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_attr_size.h: $(top_srcdir)/xlat/perf_attr_size.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_branch_sample_type.h: $(top_srcdir)/xlat/perf_branch_sample_type.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/perf_event_open_flags.h: $(top_srcdir)/xlat/perf_event_open_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_event_read_format.h: $(top_srcdir)/xlat/perf_event_read_format.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_event_sample_format.h: $(top_srcdir)/xlat/perf_event_sample_format.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_hw_cache_id.h: $(top_srcdir)/xlat/perf_hw_cache_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_hw_cache_op_id.h: $(top_srcdir)/xlat/perf_hw_cache_op_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_hw_cache_op_result_id.h: $(top_srcdir)/xlat/perf_hw_cache_op_result_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_hw_id.h: $(top_srcdir)/xlat/perf_hw_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_sw_ids.h: $(top_srcdir)/xlat/perf_sw_ids.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/perf_type_id.h: $(top_srcdir)/xlat/perf_type_id.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/personality_flags.h: $(top_srcdir)/xlat/personality_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/personality_types.h: $(top_srcdir)/xlat/personality_types.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/pkey_access.h: $(top_srcdir)/xlat/pkey_access.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/policies.h: $(top_srcdir)/xlat/policies.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/pollflags.h: $(top_srcdir)/xlat/pollflags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/pr_cap_ambient.h: $(top_srcdir)/xlat/pr_cap_ambient.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/prctl_options.h: $(top_srcdir)/xlat/prctl_options.in $(top_srcdir)/xlat/gen.sh +$(top_srcdir)/xlat/pr_dumpable.h: $(top_srcdir)/xlat/pr_dumpable.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/priorities.h: $(top_srcdir)/xlat/priorities.in $(top_srcdir)/xlat/gen.sh +$(top_srcdir)/xlat/pr_fp_mode.h: $(top_srcdir)/xlat/pr_fp_mode.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/pr_mce_kill.h: $(top_srcdir)/xlat/pr_mce_kill.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ @@ -360,6 +398,10 @@ $(top_srcdir)/xlat/pr_tsc.h: $(top_srcdir)/xlat/pr_tsc.in $(top_srcdir)/xlat/gen $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/pr_unalign_flags.h: $(top_srcdir)/xlat/pr_unalign_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/prctl_options.h: $(top_srcdir)/xlat/prctl_options.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/priorities.h: $(top_srcdir)/xlat/priorities.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/ptp_flags_options.h: $(top_srcdir)/xlat/ptp_flags_options.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/ptrace_cmds.h: $(top_srcdir)/xlat/ptrace_cmds.in $(top_srcdir)/xlat/gen.sh @@ -370,10 +412,10 @@ $(top_srcdir)/xlat/ptrace_peeksiginfo_flags.h: $(top_srcdir)/xlat/ptrace_peeksig $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/ptrace_setoptions_flags.h: $(top_srcdir)/xlat/ptrace_setoptions_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/quotacmds.h: $(top_srcdir)/xlat/quotacmds.in $(top_srcdir)/xlat/gen.sh - $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/quota_formats.h: $(top_srcdir)/xlat/quota_formats.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/quotacmds.h: $(top_srcdir)/xlat/quotacmds.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/quotatypes.h: $(top_srcdir)/xlat/quotatypes.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/rename_flags.h: $(top_srcdir)/xlat/rename_flags.in $(top_srcdir)/xlat/gen.sh @@ -392,6 +434,8 @@ $(top_srcdir)/xlat/schedulers.h: $(top_srcdir)/xlat/schedulers.in $(top_srcdir)/ $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/scmvals.h: $(top_srcdir)/xlat/scmvals.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/scsi_sg_commands.h: $(top_srcdir)/xlat/scsi_sg_commands.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/secbits.h: $(top_srcdir)/xlat/secbits.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/seccomp_filter_flags.h: $(top_srcdir)/xlat/seccomp_filter_flags.in $(top_srcdir)/xlat/gen.sh @@ -406,6 +450,8 @@ $(top_srcdir)/xlat/semctl_flags.h: $(top_srcdir)/xlat/semctl_flags.in $(top_srcd $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/semop_flags.h: $(top_srcdir)/xlat/semop_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/setns_types.h: $(top_srcdir)/xlat/setns_types.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/setsockipoptions.h: $(top_srcdir)/xlat/setsockipoptions.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/setsockipv6options.h: $(top_srcdir)/xlat/setsockipv6options.in $(top_srcdir)/xlat/gen.sh @@ -414,12 +460,18 @@ $(top_srcdir)/xlat/sfd_flags.h: $(top_srcdir)/xlat/sfd_flags.in $(top_srcdir)/xl $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/sg_io_dxfer_direction.h: $(top_srcdir)/xlat/sg_io_dxfer_direction.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/shmctl_flags.h: $(top_srcdir)/xlat/shmctl_flags.in $(top_srcdir)/xlat/gen.sh +$(top_srcdir)/xlat/sg_io_flags.h: $(top_srcdir)/xlat/sg_io_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sg_io_info.h: $(top_srcdir)/xlat/sg_io_info.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sg_scsi_reset.h: $(top_srcdir)/xlat/sg_scsi_reset.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/shm_flags.h: $(top_srcdir)/xlat/shm_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/shm_resource_flags.h: $(top_srcdir)/xlat/shm_resource_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/shmctl_flags.h: $(top_srcdir)/xlat/shmctl_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/shutdown_modes.h: $(top_srcdir)/xlat/shutdown_modes.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/sigact_flags.h: $(top_srcdir)/xlat/sigact_flags.in $(top_srcdir)/xlat/gen.sh @@ -452,6 +504,8 @@ $(top_srcdir)/xlat/sigsys_codes.h: $(top_srcdir)/xlat/sigsys_codes.in $(top_srcd $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/sigtrap_codes.h: $(top_srcdir)/xlat/sigtrap_codes.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sock_type_flags.h: $(top_srcdir)/xlat/sock_type_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/socketcalls.h: $(top_srcdir)/xlat/socketcalls.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/socketlayers.h: $(top_srcdir)/xlat/socketlayers.in $(top_srcdir)/xlat/gen.sh @@ -472,8 +526,6 @@ $(top_srcdir)/xlat/socksctpoptions.h: $(top_srcdir)/xlat/socksctpoptions.in $(to $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/socktcpoptions.h: $(top_srcdir)/xlat/socktcpoptions.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/sock_type_flags.h: $(top_srcdir)/xlat/sock_type_flags.in $(top_srcdir)/xlat/gen.sh - $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/socktypes.h: $(top_srcdir)/xlat/socktypes.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/splice_flags.h: $(top_srcdir)/xlat/splice_flags.in $(top_srcdir)/xlat/gen.sh @@ -488,14 +540,14 @@ $(top_srcdir)/xlat/sync_file_range_flags.h: $(top_srcdir)/xlat/sync_file_range_f $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/sysctl_kern.h: $(top_srcdir)/xlat/sysctl_kern.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/sysctl_net_core.h: $(top_srcdir)/xlat/sysctl_net_core.in $(top_srcdir)/xlat/gen.sh - $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/sysctl_net.h: $(top_srcdir)/xlat/sysctl_net.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ -$(top_srcdir)/xlat/sysctl_net_ipv4_conf.h: $(top_srcdir)/xlat/sysctl_net_ipv4_conf.in $(top_srcdir)/xlat/gen.sh +$(top_srcdir)/xlat/sysctl_net_core.h: $(top_srcdir)/xlat/sysctl_net_core.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/sysctl_net_ipv4.h: $(top_srcdir)/xlat/sysctl_net_ipv4.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/sysctl_net_ipv4_conf.h: $(top_srcdir)/xlat/sysctl_net_ipv4_conf.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/sysctl_net_ipv4_route.h: $(top_srcdir)/xlat/sysctl_net_ipv4_route.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/sysctl_net_ipv6.h: $(top_srcdir)/xlat/sysctl_net_ipv6.in $(top_srcdir)/xlat/gen.sh @@ -536,6 +588,8 @@ $(top_srcdir)/xlat/uffd_zeropage_flags.h: $(top_srcdir)/xlat/uffd_zeropage_flags $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/umount_flags.h: $(top_srcdir)/xlat/umount_flags.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ +$(top_srcdir)/xlat/unshare_flags.h: $(top_srcdir)/xlat/unshare_flags.in $(top_srcdir)/xlat/gen.sh + $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/usagewho.h: $(top_srcdir)/xlat/usagewho.in $(top_srcdir)/xlat/gen.sh $(AM_V_GEN)$(top_srcdir)/xlat/gen.sh $< $@ $(top_srcdir)/xlat/v4l2_buf_flags.h: $(top_srcdir)/xlat/v4l2_buf_flags.in $(top_srcdir)/xlat/gen.sh diff --git a/xlat/aclcmds.h b/xlat/aclcmds.h deleted file mode 100644 index d12302ade..000000000 --- a/xlat/aclcmds.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Generated by ./xlat/gen.sh from ./xlat/aclcmds.in; do not edit. */ - -static const struct xlat aclcmds[] = { -#if defined(SETACL) || (defined(HAVE_DECL_SETACL) && HAVE_DECL_SETACL) - XLAT(SETACL), -#endif -#if defined(GETACL) || (defined(HAVE_DECL_GETACL) && HAVE_DECL_GETACL) - XLAT(GETACL), -#endif -#if defined(GETACLCNT) || (defined(HAVE_DECL_GETACLCNT) && HAVE_DECL_GETACLCNT) - XLAT(GETACLCNT), -#endif -#if defined(ACL_GET) || (defined(HAVE_DECL_ACL_GET) && HAVE_DECL_ACL_GET) - XLAT(ACL_GET), -#endif -#if defined(ACL_SET) || (defined(HAVE_DECL_ACL_SET) && HAVE_DECL_ACL_SET) - XLAT(ACL_SET), -#endif -#if defined(ACL_CNT) || (defined(HAVE_DECL_ACL_CNT) && HAVE_DECL_ACL_CNT) - XLAT(ACL_CNT), -#endif - XLAT_END -}; diff --git a/xlat/archvals.h b/xlat/archvals.h index 9ace509e9..1f441d521 100644 --- a/xlat/archvals.h +++ b/xlat/archvals.h @@ -1,4 +1,13 @@ /* Generated by ./xlat/gen.sh from ./xlat/archvals.in; do not edit. */ +#if !(defined(ARCH_MAP_VDSO_X32) || (defined(HAVE_DECL_ARCH_MAP_VDSO_X32) && HAVE_DECL_ARCH_MAP_VDSO_X32)) +# define ARCH_MAP_VDSO_X32 0x2001 +#endif +#if !(defined(ARCH_MAP_VDSO_32) || (defined(HAVE_DECL_ARCH_MAP_VDSO_32) && HAVE_DECL_ARCH_MAP_VDSO_32)) +# define ARCH_MAP_VDSO_32 0x2002 +#endif +#if !(defined(ARCH_MAP_VDSO_64) || (defined(HAVE_DECL_ARCH_MAP_VDSO_64) && HAVE_DECL_ARCH_MAP_VDSO_64)) +# define ARCH_MAP_VDSO_64 0x2003 +#endif #ifdef IN_MPERS @@ -20,6 +29,9 @@ const struct xlat archvals[] = { #if defined(ARCH_GET_GS) || (defined(HAVE_DECL_ARCH_GET_GS) && HAVE_DECL_ARCH_GET_GS) XLAT(ARCH_GET_GS), #endif + XLAT(ARCH_MAP_VDSO_X32), + XLAT(ARCH_MAP_VDSO_32), + XLAT(ARCH_MAP_VDSO_64), XLAT_END }; diff --git a/xlat/archvals.in b/xlat/archvals.in index 22ad7c1bd..def419d09 100644 --- a/xlat/archvals.in +++ b/xlat/archvals.in @@ -2,3 +2,6 @@ ARCH_SET_GS ARCH_SET_FS ARCH_GET_FS ARCH_GET_GS +ARCH_MAP_VDSO_X32 0x2001 +ARCH_MAP_VDSO_32 0x2002 +ARCH_MAP_VDSO_64 0x2003 diff --git a/xlat/bpf_attach_type.h b/xlat/bpf_attach_type.h new file mode 100644 index 000000000..267455338 --- /dev/null +++ b/xlat/bpf_attach_type.h @@ -0,0 +1,26 @@ +/* Generated by ./xlat/gen.sh from ./xlat/bpf_attach_type.in; do not edit. */ +#if !(defined(BPF_CGROUP_INET_INGRESS) || (defined(HAVE_DECL_BPF_CGROUP_INET_INGRESS) && HAVE_DECL_BPF_CGROUP_INET_INGRESS)) +# define BPF_CGROUP_INET_INGRESS 0 +#endif +#if !(defined(BPF_CGROUP_INET_EGRESS) || (defined(HAVE_DECL_BPF_CGROUP_INET_EGRESS) && HAVE_DECL_BPF_CGROUP_INET_EGRESS)) +# define BPF_CGROUP_INET_EGRESS 1 +#endif +#if !(defined(BPF_CGROUP_INET_SOCK_CREATE) || (defined(HAVE_DECL_BPF_CGROUP_INET_SOCK_CREATE) && HAVE_DECL_BPF_CGROUP_INET_SOCK_CREATE)) +# define BPF_CGROUP_INET_SOCK_CREATE 2 +#endif + +#ifdef IN_MPERS + +# error static const struct xlat bpf_attach_type in mpers mode + +#else + +static +const struct xlat bpf_attach_type[] = { + XLAT(BPF_CGROUP_INET_INGRESS), + XLAT(BPF_CGROUP_INET_EGRESS), + XLAT(BPF_CGROUP_INET_SOCK_CREATE), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff --git a/xlat/bpf_attach_type.in b/xlat/bpf_attach_type.in new file mode 100644 index 000000000..f78bc5bef --- /dev/null +++ b/xlat/bpf_attach_type.in @@ -0,0 +1,3 @@ +BPF_CGROUP_INET_INGRESS 0 +BPF_CGROUP_INET_EGRESS 1 +BPF_CGROUP_INET_SOCK_CREATE 2 diff --git a/xlat/bpf_commands.h b/xlat/bpf_commands.h index 56e996896..a498ee356 100644 --- a/xlat/bpf_commands.h +++ b/xlat/bpf_commands.h @@ -17,6 +17,18 @@ #if !(defined(BPF_PROG_LOAD) || (defined(HAVE_DECL_BPF_PROG_LOAD) && HAVE_DECL_BPF_PROG_LOAD)) # define BPF_PROG_LOAD 5 #endif +#if !(defined(BPF_OBJ_PIN) || (defined(HAVE_DECL_BPF_OBJ_PIN) && HAVE_DECL_BPF_OBJ_PIN)) +# define BPF_OBJ_PIN 6 +#endif +#if !(defined(BPF_OBJ_GET) || (defined(HAVE_DECL_BPF_OBJ_GET) && HAVE_DECL_BPF_OBJ_GET)) +# define BPF_OBJ_GET 7 +#endif +#if !(defined(BPF_PROG_ATTACH) || (defined(HAVE_DECL_BPF_PROG_ATTACH) && HAVE_DECL_BPF_PROG_ATTACH)) +# define BPF_PROG_ATTACH 8 +#endif +#if !(defined(BPF_PROG_DETACH) || (defined(HAVE_DECL_BPF_PROG_DETACH) && HAVE_DECL_BPF_PROG_DETACH)) +# define BPF_PROG_DETACH 9 +#endif #ifdef IN_MPERS @@ -32,6 +44,10 @@ const struct xlat bpf_commands[] = { XLAT(BPF_MAP_DELETE_ELEM), XLAT(BPF_MAP_GET_NEXT_KEY), XLAT(BPF_PROG_LOAD), + XLAT(BPF_OBJ_PIN), + XLAT(BPF_OBJ_GET), + XLAT(BPF_PROG_ATTACH), + XLAT(BPF_PROG_DETACH), XLAT_END }; diff --git a/xlat/bpf_commands.in b/xlat/bpf_commands.in index 5c3035fde..bcec9a5d7 100644 --- a/xlat/bpf_commands.in +++ b/xlat/bpf_commands.in @@ -4,3 +4,7 @@ BPF_MAP_UPDATE_ELEM 2 BPF_MAP_DELETE_ELEM 3 BPF_MAP_GET_NEXT_KEY 4 BPF_PROG_LOAD 5 +BPF_OBJ_PIN 6 +BPF_OBJ_GET 7 +BPF_PROG_ATTACH 8 +BPF_PROG_DETACH 9 diff --git a/xlat/bpf_map_types.h b/xlat/bpf_map_types.h index c77f47b26..2544c89c8 100644 --- a/xlat/bpf_map_types.h +++ b/xlat/bpf_map_types.h @@ -26,6 +26,15 @@ #if !(defined(BPF_MAP_TYPE_CGROUP_ARRAY) || (defined(HAVE_DECL_BPF_MAP_TYPE_CGROUP_ARRAY) && HAVE_DECL_BPF_MAP_TYPE_CGROUP_ARRAY)) # define BPF_MAP_TYPE_CGROUP_ARRAY 8 #endif +#if !(defined(BPF_MAP_TYPE_LRU_HASH) || (defined(HAVE_DECL_BPF_MAP_TYPE_LRU_HASH) && HAVE_DECL_BPF_MAP_TYPE_LRU_HASH)) +# define BPF_MAP_TYPE_LRU_HASH 9 +#endif +#if !(defined(BPF_MAP_TYPE_LRU_PERCPU_HASH) || (defined(HAVE_DECL_BPF_MAP_TYPE_LRU_PERCPU_HASH) && HAVE_DECL_BPF_MAP_TYPE_LRU_PERCPU_HASH)) +# define BPF_MAP_TYPE_LRU_PERCPU_HASH 10 +#endif +#if !(defined(BPF_MAP_TYPE_LPM_TRIE) || (defined(HAVE_DECL_BPF_MAP_TYPE_LPM_TRIE) && HAVE_DECL_BPF_MAP_TYPE_LPM_TRIE)) +# define BPF_MAP_TYPE_LPM_TRIE 11 +#endif #ifdef IN_MPERS @@ -44,6 +53,9 @@ const struct xlat bpf_map_types[] = { XLAT(BPF_MAP_TYPE_PERCPU_ARRAY), XLAT(BPF_MAP_TYPE_STACK_TRACE), XLAT(BPF_MAP_TYPE_CGROUP_ARRAY), + XLAT(BPF_MAP_TYPE_LRU_HASH), + XLAT(BPF_MAP_TYPE_LRU_PERCPU_HASH), + XLAT(BPF_MAP_TYPE_LPM_TRIE), XLAT_END }; diff --git a/xlat/bpf_map_types.in b/xlat/bpf_map_types.in index ccb24f33c..e3222d38d 100644 --- a/xlat/bpf_map_types.in +++ b/xlat/bpf_map_types.in @@ -7,3 +7,6 @@ BPF_MAP_TYPE_PERCPU_HASH 5 BPF_MAP_TYPE_PERCPU_ARRAY 6 BPF_MAP_TYPE_STACK_TRACE 7 BPF_MAP_TYPE_CGROUP_ARRAY 8 +BPF_MAP_TYPE_LRU_HASH 9 +BPF_MAP_TYPE_LRU_PERCPU_HASH 10 +BPF_MAP_TYPE_LPM_TRIE 11 diff --git a/xlat/bpf_prog_types.h b/xlat/bpf_prog_types.h index 4f3b4453e..9eac9520c 100644 --- a/xlat/bpf_prog_types.h +++ b/xlat/bpf_prog_types.h @@ -20,6 +20,24 @@ #if !(defined(BPF_PROG_TYPE_XDP) || (defined(HAVE_DECL_BPF_PROG_TYPE_XDP) && HAVE_DECL_BPF_PROG_TYPE_XDP)) # define BPF_PROG_TYPE_XDP 6 #endif +#if !(defined(BPF_PROG_TYPE_PERF_EVENT) || (defined(HAVE_DECL_BPF_PROG_TYPE_PERF_EVENT) && HAVE_DECL_BPF_PROG_TYPE_PERF_EVENT)) +# define BPF_PROG_TYPE_PERF_EVENT 7 +#endif +#if !(defined(BPF_PROG_TYPE_CGROUP_SKB) || (defined(HAVE_DECL_BPF_PROG_TYPE_CGROUP_SKB) && HAVE_DECL_BPF_PROG_TYPE_CGROUP_SKB)) +# define BPF_PROG_TYPE_CGROUP_SKB 8 +#endif +#if !(defined(BPF_PROG_TYPE_CGROUP_SOCK) || (defined(HAVE_DECL_BPF_PROG_TYPE_CGROUP_SOCK) && HAVE_DECL_BPF_PROG_TYPE_CGROUP_SOCK)) +# define BPF_PROG_TYPE_CGROUP_SOCK 9 +#endif +#if !(defined(BPF_PROG_TYPE_LWT_IN) || (defined(HAVE_DECL_BPF_PROG_TYPE_LWT_IN) && HAVE_DECL_BPF_PROG_TYPE_LWT_IN)) +# define BPF_PROG_TYPE_LWT_IN 10 +#endif +#if !(defined(BPF_PROG_TYPE_LWT_OUT) || (defined(HAVE_DECL_BPF_PROG_TYPE_LWT_OUT) && HAVE_DECL_BPF_PROG_TYPE_LWT_OUT)) +# define BPF_PROG_TYPE_LWT_OUT 11 +#endif +#if !(defined(BPF_PROG_TYPE_LWT_XMIT) || (defined(HAVE_DECL_BPF_PROG_TYPE_LWT_XMIT) && HAVE_DECL_BPF_PROG_TYPE_LWT_XMIT)) +# define BPF_PROG_TYPE_LWT_XMIT 12 +#endif #ifdef IN_MPERS @@ -36,6 +54,12 @@ const struct xlat bpf_prog_types[] = { XLAT(BPF_PROG_TYPE_SCHED_ACT), XLAT(BPF_PROG_TYPE_TRACEPOINT), XLAT(BPF_PROG_TYPE_XDP), + XLAT(BPF_PROG_TYPE_PERF_EVENT), + XLAT(BPF_PROG_TYPE_CGROUP_SKB), + XLAT(BPF_PROG_TYPE_CGROUP_SOCK), + XLAT(BPF_PROG_TYPE_LWT_IN), + XLAT(BPF_PROG_TYPE_LWT_OUT), + XLAT(BPF_PROG_TYPE_LWT_XMIT), XLAT_END }; diff --git a/xlat/bpf_prog_types.in b/xlat/bpf_prog_types.in index 16f51d63d..bad608ec1 100644 --- a/xlat/bpf_prog_types.in +++ b/xlat/bpf_prog_types.in @@ -5,3 +5,9 @@ BPF_PROG_TYPE_SCHED_CLS 3 BPF_PROG_TYPE_SCHED_ACT 4 BPF_PROG_TYPE_TRACEPOINT 5 BPF_PROG_TYPE_XDP 6 +BPF_PROG_TYPE_PERF_EVENT 7 +BPF_PROG_TYPE_CGROUP_SKB 8 +BPF_PROG_TYPE_CGROUP_SOCK 9 +BPF_PROG_TYPE_LWT_IN 10 +BPF_PROG_TYPE_LWT_OUT 11 +BPF_PROG_TYPE_LWT_XMIT 12 diff --git a/xlat/bsg_flags.h b/xlat/bsg_flags.h new file mode 100644 index 000000000..c5f28d9a7 --- /dev/null +++ b/xlat/bsg_flags.h @@ -0,0 +1,22 @@ +/* Generated by ./xlat/gen.sh from ./xlat/bsg_flags.in; do not edit. */ +#if !(defined(BSG_FLAG_Q_AT_TAIL) || (defined(HAVE_DECL_BSG_FLAG_Q_AT_TAIL) && HAVE_DECL_BSG_FLAG_Q_AT_TAIL)) +# define BSG_FLAG_Q_AT_TAIL 0x10 +#endif +#if !(defined(BSG_FLAG_Q_AT_HEAD) || (defined(HAVE_DECL_BSG_FLAG_Q_AT_HEAD) && HAVE_DECL_BSG_FLAG_Q_AT_HEAD)) +# define BSG_FLAG_Q_AT_HEAD 0x20 +#endif + +#ifdef IN_MPERS + +# error static const struct xlat bsg_flags in mpers mode + +#else + +static +const struct xlat bsg_flags[] = { + XLAT(BSG_FLAG_Q_AT_TAIL), + XLAT(BSG_FLAG_Q_AT_HEAD), + XLAT_END +}; + +#endif /* !IN_MPERS */ diff --git a/xlat/bsg_flags.in b/xlat/bsg_flags.in new file mode 100644 index 000000000..6ef777294 --- /dev/null +++ b/xlat/bsg_flags.in @@ -0,0 +1,2 @@ +BSG_FLAG_Q_AT_TAIL 0x10 +BSG_FLAG_Q_AT_HEAD 0x20 diff --git a/xlat/btrfs_features_compat_ro.h b/xlat/btrfs_features_compat_ro.h index adb9a4d0a..324324a2c 100644 --- a/xlat/btrfs_features_compat_ro.h +++ b/xlat/btrfs_features_compat_ro.h @@ -2,6 +2,9 @@ #if !(defined(BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE) || (defined(HAVE_DECL_BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE) && HAVE_DECL_BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE)) # define BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE (1ULL << 0) #endif +#if !(defined(BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID) || (defined(HAVE_DECL_BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID) && HAVE_DECL_BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID)) +# define BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID (1ULL << 1) +#endif #ifdef IN_MPERS @@ -14,6 +17,7 @@ static # endif const struct xlat btrfs_features_compat_ro[] = { XLAT_TYPE(uint64_t, BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE), + XLAT_TYPE(uint64_t, BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID), XLAT_END }; diff --git a/xlat/btrfs_features_compat_ro.in b/xlat/btrfs_features_compat_ro.in index 3fd1b6dcc..5a745ee38 100644 --- a/xlat/btrfs_features_compat_ro.in +++ b/xlat/btrfs_features_compat_ro.in @@ -1,2 +1,3 @@ #val_type uint64_t BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE (1ULL << 0) +BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID (1ULL << 1) diff --git a/xlat/capabilities.h b/xlat/capabilities.h deleted file mode 100644 index e7539a8bf..000000000 --- a/xlat/capabilities.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Generated by ./xlat/gen.sh from ./xlat/capabilities.in; do not edit. */ - -static const struct xlat capabilities[] = { - { 1<